@toa.io/extensions.configuration 0.20.0-dev.14 → 0.20.0-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/readme.md +2 -2
- package/source/provider.js +1 -3
- package/source/provider.test.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/extensions.configuration",
|
|
3
|
-
"version": "0.20.0-dev.
|
|
3
|
+
"version": "0.20.0-dev.16",
|
|
4
4
|
"description": "Toa Configuration",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@toa.io/core": "0.20.0-dev.
|
|
20
|
-
"@toa.io/generic": "0.20.0-dev.
|
|
21
|
-
"@toa.io/schema": "0.20.0-dev.
|
|
22
|
-
"@toa.io/yaml": "0.20.0-dev.
|
|
19
|
+
"@toa.io/core": "0.20.0-dev.16",
|
|
20
|
+
"@toa.io/generic": "0.20.0-dev.16",
|
|
21
|
+
"@toa.io/schema": "0.20.0-dev.16",
|
|
22
|
+
"@toa.io/yaml": "0.20.0-dev.16",
|
|
23
23
|
"clone-deep": "4.0.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "ea33b54b708fe3f97949143c72c5e1d6606fd5ec"
|
|
26
26
|
}
|
package/readme.md
CHANGED
|
@@ -38,7 +38,7 @@ configuration:
|
|
|
38
38
|
### Deploy secrets
|
|
39
39
|
|
|
40
40
|
```shell
|
|
41
|
-
$ toa conceal configuration BAZ_VALUE
|
|
41
|
+
$ toa conceal configuration BAZ_VALUE=$ecr3t
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
---
|
|
@@ -188,7 +188,7 @@ manually ([`toa conceal`](../../runtime/cli/readme.md#conceal)).
|
|
|
188
188
|
Deployed kubernetes secret's name is predefined as `configuration`.
|
|
189
189
|
|
|
190
190
|
```shell
|
|
191
|
-
$ toa conceal configuration STRIPE_API_KEY
|
|
191
|
+
$ toa conceal configuration STRIPE_API_KEY=xxxxxxxx
|
|
192
192
|
```
|
|
193
193
|
|
|
194
194
|
## Aspect
|
package/source/provider.js
CHANGED
|
@@ -109,9 +109,7 @@ class Provider extends Connector {
|
|
|
109
109
|
return secrets(object, (variable) => {
|
|
110
110
|
if (!(variable in process.env)) throw new Error(`Configuration secret value ${variable} is not set`)
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return decode(base64)
|
|
112
|
+
return process.env[variable]
|
|
115
113
|
})
|
|
116
114
|
}
|
|
117
115
|
}
|
package/source/provider.test.js
CHANGED
|
@@ -108,7 +108,7 @@ function setEnv (configuration, secrets) {
|
|
|
108
108
|
for (const [key, value] of Object.entries(secrets)) {
|
|
109
109
|
const variable = PREFIX + '_' + key
|
|
110
110
|
|
|
111
|
-
process.env[variable] =
|
|
111
|
+
process.env[variable] = value
|
|
112
112
|
usedVariables.push(variable)
|
|
113
113
|
}
|
|
114
114
|
}
|