@toa.io/extensions.configuration 0.20.0-dev.3 → 0.20.0-dev.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.configuration",
3
- "version": "0.20.0-dev.3",
3
+ "version": "0.20.0-dev.30",
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.3",
20
- "@toa.io/generic": "0.20.0-dev.3",
21
- "@toa.io/schema": "0.20.0-dev.3",
22
- "@toa.io/yaml": "0.20.0-dev.3",
19
+ "@toa.io/core": "0.20.0-dev.30",
20
+ "@toa.io/generic": "0.20.0-dev.30",
21
+ "@toa.io/schema": "0.20.0-dev.30",
22
+ "@toa.io/yaml": "0.20.0-dev.30",
23
23
  "clone-deep": "4.0.1"
24
24
  },
25
- "gitHead": "3eabf45761f4cf211e1e4c331933ec60b4a828a7"
25
+ "gitHead": "61c8e74a336385265767e9fd37d49128cb51b17f"
26
26
  }
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # Toa Configuration Extension
1
+ # Toa Configuration
2
2
 
3
3
  ## TL;DR
4
4
 
@@ -38,14 +38,15 @@ configuration:
38
38
  ### Deploy secrets
39
39
 
40
40
  ```shell
41
- $ toa conceal configuration BAZ_VALUE '$ecr3t'
41
+ $ toa conceal configuration BAZ_VALUE=$ecr3t
42
42
  ```
43
43
 
44
44
  ---
45
45
 
46
46
  ## Problem Definition
47
47
 
48
- - Components must be reusable in different contexts and deployment environments that are in different configurations.
48
+ - Components must be reusable in different contexts and deployment environments that are in
49
+ different configurations.
49
50
  - Some algorithm parameters must be deployed secretly.
50
51
 
51
52
  ## Definitions
@@ -188,7 +189,7 @@ manually ([`toa conceal`](../../runtime/cli/readme.md#conceal)).
188
189
  Deployed kubernetes secret's name is predefined as `configuration`.
189
190
 
190
191
  ```shell
191
- $ toa conceal configuration STRIPE_API_KEY xxxxxxxx
192
+ $ toa conceal configuration STRIPE_API_KEY=xxxxxxxx
192
193
  ```
193
194
 
194
195
  ## Aspect
@@ -232,7 +233,8 @@ Configuration can be exported by [`toa env`](/runtime/cli/readme.md#env).
232
233
  Context Configuration values may contain placeholders that reference environment variables.
233
234
  Placeholders are replaced with values if the corresponding environment variables are set.
234
235
 
235
- > Placeholders can only be used with local environment (exported by `toa env`), as these values are not
236
+ > Placeholders can only be used with local environment (exported by `toa env`), as these values are
237
+ > not
236
238
  > deployed.
237
239
 
238
240
  ```yaml
@@ -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
- const base64 = process.env[variable]
113
-
114
- return decode(base64)
112
+ return process.env[variable]
115
113
  })
116
114
  }
117
115
  }
@@ -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] = encode(value)
111
+ process.env[variable] = value
112
112
  usedVariables.push(variable)
113
113
  }
114
114
  }
File without changes