150 Commits

Author SHA1 Message Date
Mariusz Nowak
4944f471b1
Prettify 2019-06-26 12:43:01 +02:00
Matthieu Napoli
1019939969 #6017 Plugin relative paths should start with ./
Following the discussion in #6261 it should be possible to load plugin via relative paths, as long as the path starts with `./`.

For example:

```yaml
plugins:
    # will load myfirstplugin/plugin.js or myfirstplugin/plugin/index.js
    - './myfirstplugin/plugin'
    # will load mysecondplugin/plugin.js or mysecondplugin/plugin/index.js
    - './mysecondplugin/plugin'
```
2019-06-20 11:55:55 +02:00
Matthieu Napoli
152b4c460a Fix #6017 Allow to load plugin from path
The list of plugins can now contain relative paths.

For example:

```yaml
plugins:
    # will load myfirstplugin/plugin.js or myfirstplugin/plugin/index.js
    - 'myfirstplugin/plugin'
    # will load mysecondplugin/plugin.js or mysecondplugin/plugin/index.js
    - 'mysecondplugin/plugin'
```
2019-06-18 16:12:49 +02:00
Daniel Schep
970a1cc3f8 refactor getServerlessConfigFile to simply accept a serverless object 2019-06-10 11:19:14 -04:00
Daniel Schep
94bf5a4382 delint 2019-06-10 11:19:14 -04:00
Daniel Schep
2b81303370 --config option.
closes #5589
closes #4485
closes #4473
closes #4124
closes #5822
2019-06-10 11:19:14 -04:00
Daniel Schep
6135a1e14c fix yarn install of SFE integration
closes #6181
2019-05-28 16:03:01 -04:00
Daniel Schep
9e4621cb23 re add enterprise disable d sflag support 2019-05-24 12:54:34 -04:00
Daniel Schep
18befe012e remove unneeded eslint directive 2019-05-24 12:48:23 -04:00
Daniel Schep
82065121ff lint 2019-05-23 09:08:30 -04:00
Daniel Schep
631a939621 fat fingers 2019-05-21 14:34:10 -04:00
Daniel Schep
ad235a6a7a remove sfe node version check & change what require hacks we use 2019-05-21 14:31:58 -04:00
Daniel Schep
c17196aef7 remove sfe node version check 2019-05-21 14:27:53 -04:00
Daniel Schep
68b9c39f34 Merge remote-tracking branch 'origin/master' into plat-916 2019-05-14 09:49:29 -04:00
Daniel Schep
537140ccbd add a hook for plugins to perform asyncronous initialization.
needed for SFE to enable deployment profiles
2019-05-09 09:17:54 -04:00
Daniel Schep
049d14706e update check 2019-05-08 09:21:50 -04:00
Daniel Schep
da1587bdbd serverlessrc based config instead of env var 2019-05-03 14:10:21 -04:00
Daniel Schep
ab88c1aa36 check for version of node that the SFEplugin requires too 2019-05-03 11:10:49 -04:00
Daniel Schep
b7d0c53d7c check that node version is compatible with SFE plugin 2019-05-03 11:05:41 -04:00
Daniel Schep
2a3d0397fa add option to disable SFE 2019-05-03 09:20:56 -04:00
Daniel Schep
6914063101 avoid duplicate plugin issue w/SFE 2019-05-03 09:16:15 -04:00
Daniel Schep
c06a67851e built in integration of serverless enterprise 2019-05-01 15:48:12 -04:00
TylerSustare
28ea91bfd2 Add more specific sub command error handling. 2019-04-21 23:10:59 -07:00
danielconde
8a7d9113fc dont use destructuring as is not supported in earlier versions of node 2019-02-16 20:29:07 +00:00
danielconde
0d16fbc182 export getServerlessConfigFilePath in getServerlessConfigFile.js module 2019-02-16 17:58:49 +00:00
Daniel Conde
1a4ce917a7 add support for command type='container' 2019-02-09 14:59:13 +00:00
Eslam A. Hefnawy
5896f0c43b fix race condition when loading config file 2019-02-05 15:05:31 +03:00
Shane Handley
afcff8dd54 Better naming 2018-12-30 19:48:34 +11:00
Shane Handley
ee36246e7b Load config earlier in pluginManager and store as instance property to prevent duplicate calls to getServerlessConfigFile. 2018-12-30 18:37:41 +11:00
Shane Handley
c49ebdfffc Update serverless config file lookup in pluginmanager to use the serverless config default value always. 2018-10-13 19:25:04 +09:00
Shane Handley
1726daef2e Merge branch 'master' into 2116-consistent-errors-missing-config 2018-10-12 15:02:19 +09:00
Shane Handley
7b664e949f Update the way that the configDependent property is checked, switch some lookups to getServerlessConfig to use the service path from sls.config rather than assume process.cwd() 2018-09-30 15:40:21 +09:00
Erik Erikson
553e6cf0da Provide Consistent Service Path
Fix #5242

Do this by first supplying the `servicePath` in `~/lib/plugins/lib/validate.js` and `~/lib/plugins/print.js` in a consistent manner with the code in `~/lib/classes/PluginManager.js`.  Then, provide a default of `process.cwd()` for `servicePath` in `getCacheFilePath` and `getServerlessConfigFile`.
2018-09-19 17:03:29 -07:00
Shane Handley
efe3d1c73b Linting 2018-09-16 04:24:52 +10:00
Shane Handley
9a3ba1f717 Removed accidental formatting, again :(. 2018-09-16 03:17:52 +10:00
Shane Handley
7837a062fa Removed accidental formatting, again :(. 2018-09-16 03:16:14 +10:00
Shane Handley
10ac3fa950 Removed accidental formatting. 2018-09-16 03:13:31 +10:00
Shane Handley
515fd8c6ab Updated config to require serverless config for selecte plugins. 2018-09-16 03:04:50 +10:00
Shane Handley
860fd938a0 Test coverage of the flag to check for serverless config befre executing a command which requires a config to exist. 2018-09-15 14:32:34 +10:00
Shane Handley
d81ad1b913 Initial conversion to validation within the PluginManager, rather than a per-plugin invocation of the validation. 2018-09-10 21:41:39 +10:00
GuruRAM
b9c7260881 #4839 pluginInstance.provider check type fixed. 2018-04-23 00:51:04 +03:00
GuruRAM
00b2024f76 #4839 reimplemented yamlAstParser addNewArrayItem and removeExistingArrayItem methods.
Extended install.test.js, uninstall.test.js unit tests to cover complex plugins object.
2018-04-15 23:01:11 +03:00
GuruRAM
0081afd78c #4839 use lodash check functions (isString, isArray, isObject) instead of native ones. 2018-04-09 21:43:28 +03:00
GuruRAM
1c180c850a #4839 Configurable local plugins folder feature. 2018-04-08 23:28:52 +03:00
horike37
4a3e140dc2 update code to synchronous 2017-12-19 01:10:43 +09:00
horike37
fbce5ed4ae add suggestion feature 2017-12-17 15:13:20 +09:00
horike37
0cf7c9a329 first commit 2017-12-16 20:27:33 +09:00
horike37
355bfa01c0 fix the plugin commands bug 2017-12-12 05:05:00 +09:00
Mariusz Nowak
7689cff5a9 Improve plugin initialization error reporting
Distinguish not found errors from "initialization errors (so far in both cases not found error was thrown)
2017-09-29 16:25:29 +02:00
Doug Moscrop
778f510c35 fix #4272 use instanceof to detect duplicate plugins and log a warning 2017-09-18 14:49:57 -04:00