668 Commits

Author SHA1 Message Date
Daniel Schep
11a6688146 test covering #5493 2018-11-15 13:19:31 -05:00
Jerzy Kozera
efa6963242 Fix issues with PR #5631 causing base64 errors
- Some of values were not converted back from base64, which resulted in
  spurious errors with base64 strings.
  (This was caused by nested arrays, like commands, not being converted
   back, combined with the wrong assumption that commands always occur
   before options. It is not always true, as the added test case
   demonstrates.)
- Some other values were converted *from* base64, but they weren't
  base64 in the first place, which resulted in junk binary data.
  (This was due to the invalid assumption that only odd-numbered values
   need to be converted.)
2018-11-15 17:39:35 +01:00
Daniel Schep
4cf2db57f9
Merge pull request #5298 from shanehandley/2116-consistent-errors-missing-config
2116 consistent errors missing config
2018-11-13 08:18:04 -05:00
Takahiro Horike
af26fbbc1a
Merge pull request #5361 from 07Gond/master
Avoid args being rounded and converted to numbers
2018-10-14 13:48:27 +09: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
Gerson Niño
2549145fd1 Adding code comments 2018-10-06 01:22:03 -05:00
Gerson Niño
d1e0fbd6f1 Adding unit test 2018-10-06 01:15:04 -05:00
Gerson Niño
74a27d13ac Adding support to node4 and fix naming 2018-10-06 00:42:43 -05: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
Gerson Niño
9a0f5763cf Workaround to avoid convert string to numbers with minimist 2018-09-28 10:06:13 -05: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
f817bc954e Fix tests after inadvertantly changing case after linting. 2018-09-16 04:59:27 +09: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
Erik Erikson
2ebc65fe97 Fix Embedded Deep Variable in Variable String, within Override bug
If an override comes back as a variable containing a deep variable (e.g. `''${self:custom.${deep:1}, "fallback"}''`) or really any variable at all, it needs to be made a deep variable and paused for next iteration.  Do this generally rather than only in the case of deep variables.  See the test case for a circumstance that the prior fix didn't resolve.  This more generalized handling improves the fix and solves a remaining issue we found locally.
2018-08-17 17:50:58 -07:00
Erik Erikson
73ebe0f66b Fix #5205
Use the variable string from which the overwrite parameters were extracted as the replacement target (in the case of deep variable discovery) rather than the context property which represents the entire original value that the replacement is being waited upon.  That context property can contain far more content than the overwrite string itself.
2018-08-16 18:35:53 -07:00
Takahiro Horike
659df3651c
Merge pull request #5119 from gcphost/master
#5110 null error on undefined AWS SSM variables
2018-08-06 21:31:57 +09:00
Takahiro Horike
8c85ed0db1
Merge pull request #5156 from erikerikson/fix-overwrite-to-deep-unresolvable
During Overwrite, Pause on Deep Variables
2018-08-02 20:41:27 +09:00
Erik Erikson
42d1749c36 When evaluating overwrite values, identify deep values and pause population.
This avoids taking a deep value as a valid term within an overwrite 
(defaulting) variable statement that will later resolve to undefined 
but, as a deep variable string, is valid in immediate evaluation.

Fixes #5027
2018-07-24 14:42:21 -07:00
Erik Erikson
0b97b74be4 Improve messaging and formatting of pending promise warnings
Add explanatory text:
```
This can result from latent connections but may represent a cyclic 
variable dependency
```

Also, rather than messages such as:
```
Serverless Information ----------------------------------

##########################################################################################
 
 Serverless Information ----------------------------------
 
 # 0: 0 of 2 promises have settled
 
 Serverless Information ----------------------------------
 
 # 0: 2 unsettled promises:
 
 Serverless Information ----------------------------------
 
 # 0:   foo waited on by: ${foo:}
 
 Serverless Information ----------------------------------
 
 # 0:   foo waited on by: ${foo:}
 
 Serverless Information ----------------------------------
 
##########################################################################################
```

Collate the message to read like:
```
Serverless Information ----------------------------------

##########################################################################################
 # 0: 0 of 2 promises have settled
 # 0: 2 unsettled promises:
 # 0:   foo waited on by: ${foo:}
 # 0:   foo waited on by: ${foo:}
 # This can result from latent connections but may represent a cyclic 
variable dependency
##########################################################################################
```
2018-07-23 17:03:34 -07:00
William
0f1c8047da Use statusCode for comparison, update tests to provide correct statusCode. 2018-07-16 21:51:02 -07:00
William
58c8352ec2
Switch to lodash get. 2018-07-16 20:54:30 -07:00
William
20401e7c3c
Remove extra space 2018-07-12 21:37:11 -07:00
William
2d6248f08b
Remove additional space 2018-07-12 14:26:02 -07:00
William
849d3b206f
Change error detection
Use code provided by the errors providerError.
2018-07-12 14:24:56 -07:00
William
880ba0b788
#5110 null error on undefined SSM variables
Ignore null errors to allow resolution instead of rejection on undefined SSM variables.
2018-07-11 08:44:58 -07:00
Eslam A. Hefnawy
e7e4b0154e add getLocalAccessKey method 2018-07-11 15:42:14 +03:00
Eslam λ Hefnawy
743efc9e75
Merge pull request #5043 from serverless/dashboard-integration
Integrate with Serverless Dashboard
2018-07-04 08:11:00 +03:00
Eslam A. Hefnawy
ee72cee853 add all events 2018-06-20 12:33:54 +03:00
Takahiro Horike
aeffbae743
Merge pull request #5029 from dougmoscrop/cycles
only use json-cycles when opt-in, for state serialization
2018-06-18 04:14:02 +09:00
GuruRAM
77f33e789e Merge branch 'master' of https://github.com/serverless/serverless 2018-06-17 12:54:26 +03:00
Eslam A. Hefnawy
396febb306 publish, archive, access keys and login updated 2018-06-15 16:10:52 +03:00
Doug Moscrop
8d9f4a296b only use json-cycles when opt-in, for state serialization 2018-06-06 15:07:03 -04:00
Erik Erikson
534dda6285 Fix #4973
Do a better job of extracting the current variable syntax for use in deep variable generation.
2018-05-18 00:04:37 -07:00
Erik Erikson
63045fd206 Fix #4946
Use the variable syntax present in the given variable string, extracting it from the given string that may contain embedded custom variables (i.e. `${{self:var.${{self:var.foo}}.bar}}`).
2018-05-02 11:52:24 -07: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
78c46ee943 #4839 lint error fixes 2018-04-09 00:14:38 +03:00
GuruRAM
1c180c850a #4839 Configurable local plugins folder feature. 2018-04-08 23:28:52 +03:00
Doug Moscrop
8bde1b4902 Support arrays in function definition too 2018-04-04 20:03:56 -04:00
Takahiro Horike
6cbd0a95bd
Merge pull request #4665 from americansystems/sls-govcloud
Support AWS GovCloud and China region deployments
2018-04-03 19:09:26 +09:00
Takahiro Horike
a9e6a79d01
Merge pull request #4743 from svdgraaf/feature/pass-serverless-variable
Pass serverless variable when calling function in referenced file
2018-04-03 05:04:08 +09:00
Takahiro Horike
721f8b6580
Merge pull request #4859 from erikerikson/self-service-rewrite
Re-write `self:service.[...]` to `self:serviceObject.[...]`
2018-03-29 09:14:50 +09:00