32 Commits

Author SHA1 Message Date
Erik Erikson
93c7afb3f5 Resolve PR Comments
1. Improve wording of documentation.  Note the concrete object that will be written in its entirety
2. Expand documentation.  Note a potential security risk for secrets
3. Move, without changes, the `warnIfNotFound` method because it was putting space between `getValueFromSource` and the various source type specific functions it uses
4. Implement unit tests for `warnIfNotFound`
5. Implement unit tests for `logWarning`
2017-02-10 18:31:02 -08:00
Erik Erikson
7376fc0dff Merge branch 'master' into allow-self-reference
# Conflicts:
#	lib/classes/Error.js
2017-02-08 15:51:57 -08:00
Erik Erikson
079d964908 Add Warning Messages for Unresolvable Variables
1. define new `logWarning` method in Error class and consolidate message formatting for consistency.
2. use new `logWarning` to inform users if a variable cannot be resolved.
2017-02-08 15:40:31 -08:00
Erik Erikson
b936492af1 Allow for Top Level References & Commit Comments
1. Newly allow `${opt:}` and `${env:}` as a valid reference to the root of the option and environment settings hive, respectively
2. Write a test ensuring the above
3. Document the new capability
4. Eliminate a silly through-${self:} use example
5. Allow for the use of populateProperty in a not-in-place manner
6. Allow for the valid (albeit odd) valueToPopulate[''] case
2017-02-08 14:05:36 -08:00
Erik Erikson
230f37f4a4 Allow for Self-Reference
1. Newly allow '${self:}' as a valid reference to the current serverless.yml's root
  a. This allows for a more clean manner of passing names and identifiers around between projects.  Particularly, this facilitates exporting values from projects so they can be used in other projects via Fn::ImportValue.
2. Write a test ensuring the above
3. Document the new capability

Example usage: https://github.com/Nordstrom/hello-retail/pull/26/files
2017-02-07 19:19:30 -08:00
Philipp Muens
54fbaadede Remove defaults service property 2017-01-30 11:03:40 +01:00
John McKim
adea45e978 Temporarily remove provider.variableSyntax during variable population 2016-12-08 17:42:07 +10:00
ac360
d0b84ce1a9 fix formatting errors 2016-11-08 07:39:24 -08:00
Austen
1c93db6089 minor tweak for clearer errors 2016-11-08 06:56:35 -08:00
Austen
8b180452e3 minor tweaks for better error messages 2016-11-08 06:52:52 -08:00
ac360
15d0df22ae fix tests, add errors for better ux 2016-11-07 21:51:01 -08:00
ac360
eb97845ad5 remove console.log 2016-11-06 23:16:52 -08:00
ac360
16aa2c4072 add docs 2016-11-06 23:11:56 -08:00
ac360
d7b5afa459 fix test 2016-11-06 23:04:33 -08:00
ac360
59cebc01c1 start tests 2016-11-06 23:00:11 -08:00
ac360
fe26deb470 add js support to serverless variables 2016-11-06 22:07:33 -08:00
Philipp Muens
31cae71158 Fix regex linting errors 2016-10-31 09:08:50 +01:00
Eslam A. Hefnawy
cd260f0743 removed overwrite for file variable 2016-10-28 16:41:55 +07:00
Eslam A. Hefnawy
531e782dbb fixed conflicts in variables 2016-10-28 16:35:21 +07:00
Eslam λ Hefnawy
3a59cd8857 Merge pull request #2541 from miltador/fix-variables-overwriting
fix overwriting undefined variables #2081, #2522
2016-10-27 15:36:42 +07:00
horike37
56ca36c400 fixed test that should populate non string variables 2016-10-27 01:24:16 +09:00
Vasiliy Solovey
c870a037a5
fix overwriting empty object values 2016-10-25 19:55:44 +03:00
horike37
0dfb7aa437 fixed issue 2490 2016-10-23 22:49:10 +09:00
horike37
bdc5170d43 fixed issue 2500 2016-10-23 19:19:14 +09:00
John McKim
9e7f7c89f3 fix bug where variableSyntax is never set from config 2016-09-16 17:15:25 +10:00
Eslam A. Hefnawy
2e6cce979d fixed issue when referencing to self or file properties with var references 2016-09-08 17:53:18 +09:00
Eslam A. Hefnawy
bbce402fb8 sls vars - skip getting value once a value has been found 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
ee0af0121f fixed bugs for new variable syntax 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
b96e449a93 removed comments 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
714020e65d added unit tests for variables class 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
1585711b17 refactored variables class and overwrites 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
9ed7a2a766 overwrite functionality working 2016-08-31 16:37:58 +09:00