Sebastien Bramille
6d2eb61166
Align with Plugin
2017-07-30 02:16:21 +01:00
Sebastien Bramille
5174bf98ec
Improve deprecated hook message
2017-07-30 02:12:15 +01:00
Philipp Muens
e07f48f80b
Merge pull request #3960 from RafalWilinski/master
...
Load Serverless plugins only once
2017-07-21 11:16:23 +02:00
Philipp Muens
9c856dc7b6
Minor code refactorings
2017-07-21 11:09:05 +02:00
Philipp Muens
99a12414e1
Merge pull request #3959 from RafalWilinski/3956-catch-unknown-plugin
...
Wrap addPlugin in try/catch statement when loading plugins
2017-07-21 10:58:44 +02:00
Philipp Muens
d04889b4aa
Minor refactorings
2017-07-21 10:41:30 +02:00
Rafal Wilinski
32bf998406
Prepend messages with correct prefixes
2017-07-20 11:26:20 +02:00
Rafal Wilinski
787341d5bf
Conditionally throw error or log a warning
2017-07-20 10:47:42 +02:00
Rafal Wilinski
675233ffc0
Change log to throwing an Error
2017-07-20 10:08:55 +02:00
Rafal Wilinski
550f9d9d97
Replace Array.includes with _.includes
2017-07-20 07:30:17 +02:00
Rafal Wilinski
007c5c9607
Add duplicate check in PluginManager.addPlugin function
2017-07-20 07:13:28 +02:00
Rafal Wilinski
157e8b88dc
Wrap this.addPlugin function into try/catch statement and log a warning
2017-07-20 06:16:01 +02:00
Eslam λ Hefnawy
de6bebeea9
Merge pull request #3808 from rpunkfu/specify-default-option-values
...
Allow to provide a default value for plugin options
2017-07-19 19:25:03 +07:00
Oskar Cieslik
d9dcd73e5d
Allow to provide a default value for plugin options
2017-06-19 21:10:53 +02:00
Nik Graf
4514bb01c3
remove legacy imports
2017-06-19 12:21:54 +02:00
Nik Graf
c5537c2343
Merge branch 'master' into services
2017-06-19 11:26:46 +02:00
Philipp Muens
2a9636a18c
Fix updateAutocompleteCacheFile() bug caused by empty commands object
2017-06-12 09:08:27 +02:00
Philipp Muens
39f0ad94a5
Merge pull request #3746 from HyperBrain/filter-nested-entrypoints-for-help
...
Filter nested entrypoints on getCommands(). Used by help.
2017-06-11 20:59:45 +02:00
Brian Neisler
851df3921a
Make autocomplete async through promises
2017-06-07 18:40:05 -07:00
davidwells
75a97441a1
run autocomplete.json creation in async fashion
2017-06-07 15:15:11 -07:00
davidwells
75af2ae3dd
silently fail on FS error
2017-06-07 13:48:47 -07:00
Eslam A. Hefnawy
5696513789
added cache file validation by hash to autocomplete
2017-06-08 01:27:11 +07:00
Frank Schmid
b73466641e
Filter nested entrypoints on getCommands(). Used by help.
2017-06-07 17:24:37 +02:00
Eslam A. Hefnawy
e2cc1451a5
resolved comments on autocomplete
2017-06-07 22:02:23 +07:00
Eslam A. Hefnawy
67dc1c2463
using cache file for autocomplete
2017-06-07 22:01:15 +07:00
Brian Neisler
a537e58424
Remove serverless-alpha plugin autoloading.
2017-06-01 14:53:55 -07:00
davidwells
3f1b375c1f
update log message
2017-05-26 16:18:10 -07:00
Eslam A. Hefnawy
9e53ea68a3
show warning instead of error when there are no hooks
2017-04-21 18:24:35 +07:00
Philipp Muens
df3f02fcff
Show hook deprecation warnings only when SLS_DEBUG is set
2017-04-11 14:44:53 +02:00
Frank Schmid
bad7990799
Hide entrypoint commands
2017-04-08 11:37:52 +02:00
Eslam A. Hefnawy
bc0eaf23e6
fixed unit tests
2017-04-07 18:30:11 +07:00
Eslam A. Hefnawy
ca809f2940
removed deprecation for alpha plugin
2017-04-06 21:37:00 +07:00
Eslam A. Hefnawy
7da3a1ae35
resovled conflicts on master
2017-04-06 18:28:59 +07:00
Frank Schmid
d9637fc534
Support deprecation with redirects
2017-04-06 18:28:59 +07:00
Philipp Muens
532d89c1f6
Update tests to be side-effect free
...
Use proxyquire and stubbing to make the tests side-effect free. This way the tests will succeed even when someone who runs the tests has the serverless-alpha plugin installed globally.
2017-03-30 09:57:02 +02:00
Philipp Muens
44db0960ec
Fix tests and restructure code to fail silently
2017-03-30 08:55:07 +02:00
Brian Neisler
ad5aa1ea97
Use resolve-from instead of absolute paths.
2017-03-29 13:41:22 -07:00
Philipp Muens
59c8c41057
Update local lookup to use service directory
2017-03-29 21:31:52 +02:00
Philipp Muens
80cfb77840
Update serverless-alpha detection
2017-03-29 20:34:00 +02:00
Eslam λ Hefnawy
2d2c2543b9
Merge pull request #3373 from serverless/add-serverless-alpha-autoloading
...
Add serverless-alpha autoloading
2017-03-29 19:02:07 +07:00
Philipp Muens
bc7c5a64d7
Merge master into PR and resolve conflicts
2017-03-23 12:50:31 +01:00
Eslam λ Hefnawy
eeb8b8a68c
Merge pull request #3327 from HyperBrain/support-entrypoints-for-plugins
...
Allow entrypoints to be defined and called by plugins.
2017-03-17 23:59:05 +08:00
Philipp Muens
4ee198c62c
Add serverless-alpha autoloading
2017-03-16 13:06:14 +01:00
Frank Schmid
07d1141f99
Allow entrypoints to be defined and called by plugins.
...
Commands can contain a type property. The only allowed value currently is 'entrypoint'. This declares the command as hidden from the CLI. It will not appear in the help screen, nor can it be called from there.
However, entrypoint type commands can be called by plugins via the new PluginManager.spawn(commandsArray) method. In contrast to PluginManager.run() this method allows access to entrypoint commands and can be used to enter a plugin internal sub lifecycle. With this mechanism in place, plugins can expose their own lifecycle events which become then part of the global lifecycle and can be hooked again by dependent plugins.
2017-03-03 15:05:09 +01:00
Nicholas Rakoto
00bd68cef2
Fix node_modules (serverless plugins) lookup
...
This reset the `module.paths` relatively to the current working directory
`process.cwd()`. So the array of paths used to resolve packages is relative
to where the `serverless` CLI is run.
2017-02-25 00:19:44 +01:00
Doug Moscrop
4c8e3421f8
add Expose plugin hooks so that I can visualize them with an external plugin
2017-02-08 10:50:55 -05:00
ac360
00ad5626c7
improve code style and tests
2016-11-04 08:13:32 -07:00
ac360
de2042cb8f
reduce line length
2016-11-04 07:48:15 -07:00
ac360
decbd6eaef
reduce long line
2016-11-04 07:28:55 -07:00
ac360
c8a9b3cf6d
fix for empty plugins property in serverless.yml
2016-11-04 07:21:16 -07:00