@toa.io/extensions.configuration 0.7.3-dev.2 → 1.0.0-dev.0
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 +13 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/extensions.configuration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-dev.0",
|
|
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
|
-
"@toa.io/generic": "0.9.0
|
|
21
|
-
"@toa.io/schema": "0.7.
|
|
22
|
-
"@toa.io/yaml": "0.7.
|
|
19
|
+
"@toa.io/core": "1.0.0-dev.0",
|
|
20
|
+
"@toa.io/generic": "0.9.0",
|
|
21
|
+
"@toa.io/schema": "0.7.4-dev.0",
|
|
22
|
+
"@toa.io/yaml": "0.7.4-dev.0",
|
|
23
23
|
"clone-deep": "4.0.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "2417f76be3783bd7f790cb4580e4139f2c3ff580"
|
|
26
26
|
}
|
package/readme.md
CHANGED
|
@@ -45,8 +45,7 @@ $ toa conceal
|
|
|
45
45
|
|
|
46
46
|
## Problem Definition
|
|
47
47
|
|
|
48
|
-
- Components must be reusable in different contexts and deployment environments
|
|
49
|
-
that is in different configurations.
|
|
48
|
+
- Components must be reusable in different contexts and deployment environments that are in different configurations.
|
|
50
49
|
- Some algorithm parameters must be deployed secretly.
|
|
51
50
|
|
|
52
51
|
## Definitions
|
|
@@ -57,8 +56,7 @@ Set of static[^1] parameters for all algorithms within a given system.
|
|
|
57
56
|
|
|
58
57
|
### Configuration Schema
|
|
59
58
|
|
|
60
|
-
Schema defining component's
|
|
61
|
-
values).
|
|
59
|
+
Schema is defining component's algorithm parameters (optionally with default values).
|
|
62
60
|
|
|
63
61
|
### Configuration Object
|
|
64
62
|
|
|
@@ -66,7 +64,7 @@ Value valid against Configuration Schema.
|
|
|
66
64
|
|
|
67
65
|
### Configuration Value
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
The merge result of Configuration Schema's defaults and Configuration Object.
|
|
70
68
|
|
|
71
69
|
### Context Configuration
|
|
72
70
|
|
|
@@ -86,7 +84,7 @@ Configuration Schema is declared as a component extension
|
|
|
86
84
|
using [JSON Schema](https://json-schema.org) `object` type.
|
|
87
85
|
|
|
88
86
|
> <br/>
|
|
89
|
-
> By introducing non-backward compatible changes to a Configuration Schema the compatibility
|
|
87
|
+
> By introducing non-backward compatible changes to a Configuration Schema, the compatibility
|
|
90
88
|
> with existent contexts and deployment environments will be broken. That is, Configuration
|
|
91
89
|
> Schema changes are subjects of component versioning.
|
|
92
90
|
|
|
@@ -109,7 +107,7 @@ extensions:
|
|
|
109
107
|
default: 'baz'
|
|
110
108
|
bar:
|
|
111
109
|
type: number
|
|
112
|
-
required: [foo]
|
|
110
|
+
required: [ foo ]
|
|
113
111
|
```
|
|
114
112
|
|
|
115
113
|
### Concise Declaration
|
|
@@ -121,7 +119,7 @@ type and no additional properties allowed.
|
|
|
121
119
|
|
|
122
120
|
Also note that a well-known shortcut `configuration` is available.
|
|
123
121
|
|
|
124
|
-
|
|
122
|
+
The next two declarations are equivalent.
|
|
125
123
|
|
|
126
124
|
```yaml
|
|
127
125
|
# component.toa.yaml
|
|
@@ -142,13 +140,13 @@ extensions:
|
|
|
142
140
|
type: number
|
|
143
141
|
default: 1
|
|
144
142
|
additionalProperties: false
|
|
145
|
-
required: [foo, bar]
|
|
143
|
+
required: [ foo, bar ]
|
|
146
144
|
```
|
|
147
145
|
|
|
148
146
|
## Context Configuration
|
|
149
147
|
|
|
150
|
-
Context Configuration is declared as a context
|
|
151
|
-
component identifiers and its values must be Configuration Objects for those
|
|
148
|
+
Context Configuration is declared as a context annotation. Its keys must be
|
|
149
|
+
component identifiers, and its values must be Configuration Objects for those
|
|
152
150
|
components.
|
|
153
151
|
|
|
154
152
|
Context Configuration keys and Configuration Object keys may be defined
|
|
@@ -172,6 +170,9 @@ by [`toa configure`](../../runtime/cli/readme.md#configure) command.
|
|
|
172
170
|
|
|
173
171
|
## Configuration Secrets
|
|
174
172
|
|
|
173
|
+
> <br/>
|
|
174
|
+
> Not implemented. [#132](https://github.com/toa-io/toa/issues/132)
|
|
175
|
+
|
|
175
176
|
Context Configuration values which are uppercase strings prefixed with `$`
|
|
176
177
|
considered as Secrets.
|
|
177
178
|
|
|
@@ -207,7 +208,7 @@ function transition (input, entity, context) {
|
|
|
207
208
|
|
|
208
209
|
> <br/>
|
|
209
210
|
> It is strongly **not** recommended to store a copy of value type configuration
|
|
210
|
-
> values outside
|
|
211
|
+
> values outside operation scope, thus it prevents operation to benefit
|
|
211
212
|
> from [hot updates](#).
|
|
212
213
|
>
|
|
213
214
|
> ```javascript
|