82 Commits

Author SHA1 Message Date
Mariusz Nowak
77e21f9045 fix(Variables): Fix reporting of unresolved sources 2022-05-16 21:10:15 +02:00
Piotr Grzesik
f7ffb19788 refactor: Support custom error message for variables resolution 2022-04-20 13:07:59 +02:00
Mariusz Nowak
8dae213758 feat(Variables): Ensure support for promise properties at file source 2022-04-08 13:00:31 +02:00
Julian Grinblat
df08283810
feat(Variables): Add support for csj in file source (#10776) 2022-03-01 11:15:50 +01:00
Mariusz Nowak
ba34c573f4 refactor: Expose isDashboardEnabled resolver 2022-02-25 20:12:02 +01:00
Mariusz Nowak
7289137073 refactor: Rename lib/Serverless.js 2022-01-27 15:21:58 +01:00
Mariusz Nowak
731b3ba1e1 feat(Variables): Remove old variables resolver
BREAKING CHANGE:
Old variables resolver is permanently removed. Any resolution error as approached with current resolver is assumed as final (there's no longer fallback to old resolver)
2022-01-27 15:21:58 +01:00
Mariusz Nowak
d62c3288b2 feat: Unconditionally fallback when local installation found
BREAKING CHANGE:
`enableLocalInstallationFallback` configuration property is no longer supported.
2022-01-27 15:21:58 +01:00
Mariusz Nowak
5fc55c0464 refactor: Replace ncjsm/resolve usage with native createRequire 2022-01-27 15:21:58 +01:00
Steven Noorbergen
8db03c90ff
fix(Variables): Fix too eager nested resolution tracking (#10554) 2022-01-24 14:03:32 +01:00
Mariusz Nowak
5a764373c4 feat(Variables): Resign from projectDir concept 2022-01-10 11:52:25 +01:00
Omer Shacham
503c0319b7
fix(Variables): Provide opt-out from forced decryption atssm source
(PR #10315)
2021-12-08 12:39:47 +01:00
Mariusz Nowak
63d54e1537 fix(Variables): Resolve variables in resolved address & params values 2021-12-02 11:51:08 +01:00
Mariusz Nowak
6204672746 test(Variables): Improve test error reporting 2021-12-02 11:51:08 +01:00
Mariusz Nowak
ca045bae3e refactor(Variables): Improve reliability of tests 2021-12-02 11:51:08 +01:00
Mariusz Nowak
971168dbe1 refactor(Variables): Improve tests reliability 2021-12-02 11:51:08 +01:00
Piotr Grzesik
723927f2dc feat(Variables): Recognize : in address to support output source 2021-11-08 16:55:03 +01:00
Sudipto Das
05fff98a00
refactor: Replace fse.writeFile with fs.promises.writeFile (#9870) 2021-08-30 11:08:47 +02:00
Mariusz Nowak
56e9423cd7 refactor(Variables): Enable early sls:stage resolution 2021-08-27 14:54:15 +02:00
Mariusz Nowak
479569a185 test(Variables): Refactor util signature 2021-08-27 14:54:15 +02:00
Piotr Grzesik
60d729b5d4 feat(Telemetry): Detect used variable sources 2021-07-28 13:18:31 +02:00
Shane R. Spencer
612f668c93
feat(Variables): Accept case-insensitive strings in strToBool (#9770)
* Lowercase stringValue to allow for wider range of inputs.

This change simply adds toLowerCase() when assigning stringValue to allow enable a case-insensitive input (True, TRUE, False, False)

* Update variables.md

Added documentation showing lowercase change to strToBool

* Update str-to-bool.test.js

Added uppercase/mixedcase test

* Update str-to-bool.test.js

fixed test description for str-to-bool case checks

* fix linting/prettier issues with strToBool test/func patch
2021-07-27 13:53:58 +02:00
Sudipto Das
daee1d5375
refactor: Replace fse.unlink with fs.promises.unlink (#9754) 2021-07-16 09:27:13 +02:00
Mariusz Nowak
8c741d1d97 fix(Variables): In ssm source auto parse only object JSON notation 2021-07-15 11:20:13 +02:00
Piotr Grzesik
33794ea504 feat(Variables): Support aws:region and aws:accountId variables 2021-06-30 13:02:59 +02:00
Mariusz Nowak
80b76406ac feat(Variables): Support variables across file address resolution 2021-06-29 17:37:11 +02:00
Mariusz Nowak
0e3db01db8 feat(Variables): Resolve vars in strings which are subject to be joined 2021-06-29 17:37:11 +02:00
Mariusz Nowak
bc3fc11d79 test: Adapt to deprecation notification error mode 2021-06-21 17:31:50 +02:00
Mariusz Nowak
81ddcf8ecb test: Upgrade from deprecated forms when not testing them intentionally 2021-06-21 17:31:50 +02:00
Mariusz Nowak
f61859fd25 fix(Variables): Strip unrecognized legacy instructions 2021-06-14 13:28:33 +02:00
Mariusz Nowak
8dbb56ecbd feat(Variables): Allow to reference files in scope of project directory 2021-06-08 10:22:19 +02:00
Mariusz Nowak
6efc161e5f refactor(Variables): Seclude resolution of sources from external plugins 2021-06-02 15:17:06 +02:00
Piotr Grzesik
ee66585fdc fix(Variables): Ensure proper resolution in case of errors 2021-05-25 12:04:26 +02:00
Mariusz Nowak
f6b7cfaaaf fix(Variables): Fix reporting of variable resolution errors 2021-05-14 13:42:54 +02:00
Mariusz Nowak
2ff58b16bf feat(Variables): Expose variable resolver function to variable sources 2021-04-27 13:48:57 +02:00
Mariusz Nowak
d662150976 test: Improve internal naming 2021-04-27 13:48:57 +02:00
Piotr Grzesik
395bdc8b23 refactor: Add code to ServerlessError in lib/configuration 2021-04-23 13:34:20 +02:00
Mariusz Nowak
53a7872f78 fix(Variables): Fix unresolved sources resolver 2021-04-23 10:22:48 +02:00
Matthieu Napoli
ef91ae1972
feat(Variables): sls:stage variable (#9296)
A shortcut to

```
${opt:stage, self:provider.stage, "dev"}
```
2021-04-20 15:37:57 +02:00
Mariusz Nowak
c63244ce96 fix(Variables): Clear escape slashes
New variables engine supports escape syntax (so e.g. "\${foo:}" was not recognized as variable notation.
Still there was no logic that would clear "\" characters. This patch fixes that
2021-04-20 10:28:06 +02:00
Mariusz Nowak
712a569d52 feat(Variables): serviceDir option as replacement for servicePath
Support for `servicePath` is maintained until next major
2021-04-16 13:32:13 +02:00
Mariusz Nowak
10f956777c test: Rename servicePath to serviceDir 2021-04-16 13:32:13 +02:00
Mariusz Nowak
a2f1808b2f refactor(Variables): Testing purpose variable resolution util 2021-04-09 16:10:21 +02:00
Adam Pancutt
88baf06b42
fix: Avoid re-registration of ts-node (#9254) 2021-04-07 14:09:53 +02:00
Mariusz Nowak
83cac533a3 fix(Variables): Ensure valid region value type in SSM resolution 2021-04-03 09:55:26 +02:00
Mariusz Nowak
4eba512c15 fix(Variables): Support resolving "raw" JSON string form of SSM params 2021-04-02 12:03:29 +02:00
Mariusz Nowak
1d77f46a98 test(Variables): Fix file name 2021-03-30 10:22:40 +02:00
Mariusz Nowak
3f7f67ccc1 refactor(Variables): Configure ssm source in a new resolver 2021-03-30 10:22:40 +02:00
Mariusz Nowak
12a4cad102 refactor(Variables): Configure s3 source in a new resolver 2021-03-30 10:22:40 +02:00
Mariusz Nowak
a60e90f61c refactor(Variables): Configure cf source in a new resolver 2021-03-30 10:22:40 +02:00