@toa.io/extensions.configuration 1.0.0-alpha.282 → 1.0.0-alpha.284
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/CHANGELOG.md +25 -0
- package/components/configuration.values/operations/create.js +1 -1
- package/components/configuration.values/operations/fetch.js +1 -1
- package/components/configuration.values/operations/get.js +1 -1
- package/components/configuration.values/operations/lib/map.js +1 -1
- package/components/configuration.values/operations/lib/resolve.js +1 -1
- package/components/configuration.values/operations/list.js +1 -1
- package/components/configuration.values/tsconfig.json +1 -1
- package/components/configuration.values/tsconfig.tsbuildinfo +1 -1
- package/components/configuration.values/types/index.d.ts +3 -0
- package/components/configuration.values/types/toa.d.ts +68 -0
- package/package.json +5 -5
- package/source/Secret.ts +6 -3
- package/source/context.ts +13 -0
- package/source/index.ts +6 -0
- package/transpiled/Secret.d.ts +6 -3
- package/transpiled/Secret.js +5 -1
- package/transpiled/Secret.js.map +1 -1
- package/transpiled/context.d.ts +4 -0
- package/transpiled/context.js +9 -0
- package/transpiled/context.js.map +1 -0
- package/transpiled/index.d.ts +2 -0
- package/transpiled/index.js +4 -0
- package/transpiled/index.js.map +1 -1
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/ui/dist/_app/immutable/chunks/{_OCUOSf_.js → Bxde3uE_.js} +2 -2
- package/ui/dist/_app/immutable/chunks/{BI4iTnyC.js → BzG-gka8.js} +1 -1
- package/ui/dist/_app/immutable/chunks/{XPGIBZyO.js → _I_MUoRn.js} +1 -1
- package/ui/dist/_app/immutable/chunks/{CcWYApmX.js → mvspXr3J.js} +2 -2
- package/ui/dist/_app/immutable/chunks/{DNNahQnI.js → p9RyiXQ-.js} +1 -1
- package/ui/dist/_app/immutable/entry/{app.Dm0NVzuV.js → app.C1VIepN7.js} +2 -2
- package/ui/dist/_app/immutable/entry/start.BQWCs_Pq.js +1 -0
- package/ui/dist/_app/immutable/nodes/{0.C1zAG1m5.js → 0.D_0dtFej.js} +1 -1
- package/ui/dist/_app/immutable/nodes/{1.QblBNjka.js → 1.DFlgHh-H.js} +1 -1
- package/ui/dist/_app/immutable/nodes/{2.CyVYZW9A.js → 2.BIHgAxXR.js} +1 -1
- package/ui/dist/_app/immutable/nodes/3.R-_yCt5X.js +1 -0
- package/ui/dist/_app/immutable/nodes/{4.CZA2PMJQ.js → 4.BZMuJGfA.js} +1 -1
- package/ui/dist/_app/version.json +1 -1
- package/ui/dist/index.html +10 -10
- package/components/configuration.values/operations/create.d.ts +0 -16
- package/components/configuration.values/operations/create.js.map +0 -1
- package/components/configuration.values/operations/fetch.d.ts +0 -11
- package/components/configuration.values/operations/fetch.js.map +0 -1
- package/components/configuration.values/operations/get.d.ts +0 -17
- package/components/configuration.values/operations/get.js.map +0 -1
- package/components/configuration.values/operations/lib/map.d.ts +0 -11
- package/components/configuration.values/operations/lib/map.js.map +0 -1
- package/components/configuration.values/operations/lib/map.test.d.ts +0 -1
- package/components/configuration.values/operations/lib/map.test.js +0 -26
- package/components/configuration.values/operations/lib/map.test.js.map +0 -1
- package/components/configuration.values/operations/lib/resolve.d.ts +0 -27
- package/components/configuration.values/operations/lib/resolve.js.map +0 -1
- package/components/configuration.values/operations/list.d.ts +0 -10
- package/components/configuration.values/operations/list.js.map +0 -1
- package/transpiled/Aspect.test.d.ts +0 -1
- package/transpiled/Aspect.test.js +0 -66
- package/transpiled/Aspect.test.js.map +0 -1
- package/transpiled/Client.test.d.ts +0 -1
- package/transpiled/Client.test.js +0 -78
- package/transpiled/Client.test.js.map +0 -1
- package/transpiled/Secret.test.d.ts +0 -1
- package/transpiled/Secret.test.js +0 -26
- package/transpiled/Secret.test.js.map +0 -1
- package/transpiled/configuration.test.d.ts +0 -1
- package/transpiled/configuration.test.js +0 -111
- package/transpiled/configuration.test.js.map +0 -1
- package/transpiled/deployment.test.d.ts +0 -1
- package/transpiled/deployment.test.js +0 -66
- package/transpiled/deployment.test.js.map +0 -1
- package/transpiled/epoch.test.d.ts +0 -1
- package/transpiled/epoch.test.js +0 -22
- package/transpiled/epoch.test.js.map +0 -1
- package/transpiled/manifest.test.d.ts +0 -1
- package/transpiled/manifest.test.js +0 -14
- package/transpiled/manifest.test.js.map +0 -1
- package/ui/dist/_app/immutable/entry/start.DWjxVbPv.js +0 -1
- package/ui/dist/_app/immutable/nodes/3.DJ58VY-o.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/extensions.configuration",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.284",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa Configuration",
|
|
6
6
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"prepack": "npm run build:ui",
|
|
24
24
|
"features": "TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "006755556879e91e8d68fa86753aa3b475bdf4bf",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
29
|
-
"@toa.io/generic": "1.0.0-alpha.
|
|
30
|
-
"@toa.io/schemas": "1.0.0-alpha.
|
|
28
|
+
"@toa.io/core": "1.0.0-alpha.284",
|
|
29
|
+
"@toa.io/generic": "1.0.0-alpha.283",
|
|
30
|
+
"@toa.io/schemas": "1.0.0-alpha.283",
|
|
31
31
|
"openspan": "1.0.0-alpha.277"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/source/Secret.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { inspect } from 'node:util'
|
|
2
|
-
import type { Secret as Contract } from '@toa.io/types'
|
|
3
2
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* A configuration value that must not leak: a string only to whoever asks for it.
|
|
5
|
+
*
|
|
6
|
+
* This is what a value declared `format: secret` is on a component's context.
|
|
7
|
+
*/
|
|
8
|
+
export class Secret {
|
|
6
9
|
readonly #value: string
|
|
7
10
|
|
|
8
11
|
public constructor (value: string) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Manifest } from './manifest.js'
|
|
2
|
+
import type { Contribution } from '@toa.io/core'
|
|
3
|
+
|
|
4
|
+
/** What this extension puts on the context of a component that declares it. */
|
|
5
|
+
export function context (declaration: Manifest): Contribution {
|
|
6
|
+
const contribution: Contribution = { name: 'configuration', schema: declaration.schema }
|
|
7
|
+
|
|
8
|
+
// a value the schema declares a secret is one on the context, not a string
|
|
9
|
+
if (JSON.stringify(declaration.schema).includes('"secret"'))
|
|
10
|
+
contribution.imports = { '@toa.io/extensions.configuration': ['Secret'] }
|
|
11
|
+
|
|
12
|
+
return contribution
|
|
13
|
+
}
|
package/source/index.ts
CHANGED
|
@@ -2,3 +2,9 @@ export { manifest } from './manifest.js'
|
|
|
2
2
|
export { deployment, describe } from './deployment.js'
|
|
3
3
|
export { components } from './Composition.js'
|
|
4
4
|
export { Factory } from './Factory.js'
|
|
5
|
+
|
|
6
|
+
// what a value declared `format: secret` is on a component's context
|
|
7
|
+
export { Secret } from './Secret.js'
|
|
8
|
+
|
|
9
|
+
// what this extension puts on a component's context
|
|
10
|
+
export { context } from './context.js'
|
package/transpiled/Secret.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* A configuration value that must not leak: a string only to whoever asks for it.
|
|
4
|
+
*
|
|
5
|
+
* This is what a value declared `format: secret` is on a component's context.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Secret {
|
|
5
8
|
#private;
|
|
6
9
|
constructor(value: string);
|
|
7
10
|
unwrap(): string;
|
package/transpiled/Secret.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A configuration value that must not leak: a string only to whoever asks for it.
|
|
4
|
+
*
|
|
5
|
+
* This is what a value declared `format: secret` is on a component's context.
|
|
6
|
+
*/
|
|
3
7
|
export class Secret {
|
|
4
8
|
#value;
|
|
5
9
|
constructor(value) {
|
package/transpiled/Secret.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Secret.js","sourceRoot":"","sources":["../source/Secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"Secret.js","sourceRoot":"","sources":["../source/Secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC;;;;GAIG;AACH,MAAM,OAAO,MAAM;IACR,MAAM,CAAQ;IAEvB,YAAoB,KAAa;QAC/B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAEM,QAAQ;QACb,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEM,MAAM;QACX,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEM,CAAC,OAAO,CAAC,MAAM,CAAC;QACrB,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** What this extension puts on the context of a component that declares it. */
|
|
2
|
+
export function context(declaration) {
|
|
3
|
+
const contribution = { name: 'configuration', schema: declaration.schema };
|
|
4
|
+
// a value the schema declares a secret is one on the context, not a string
|
|
5
|
+
if (JSON.stringify(declaration.schema).includes('"secret"'))
|
|
6
|
+
contribution.imports = { '@toa.io/extensions.configuration': ['Secret'] };
|
|
7
|
+
return contribution;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../source/context.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,MAAM,UAAU,OAAO,CAAE,WAAqB;IAC5C,MAAM,YAAY,GAAiB,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAA;IAExF,2EAA2E;IAC3E,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzD,YAAY,CAAC,OAAO,GAAG,EAAE,kCAAkC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAA;IAE3E,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
package/transpiled/index.d.ts
CHANGED
package/transpiled/index.js
CHANGED
|
@@ -2,4 +2,8 @@ export { manifest } from './manifest.js';
|
|
|
2
2
|
export { deployment, describe } from './deployment.js';
|
|
3
3
|
export { components } from './Composition.js';
|
|
4
4
|
export { Factory } from './Factory.js';
|
|
5
|
+
// what a value declared `format: secret` is on a component's context
|
|
6
|
+
export { Secret } from './Secret.js';
|
|
7
|
+
// what this extension puts on a component's context
|
|
8
|
+
export { context } from './context.js';
|
|
5
9
|
//# sourceMappingURL=index.js.map
|
package/transpiled/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,qEAAqE;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,oDAAoD;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|