@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.
Files changed (78) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/configuration.values/operations/create.js +1 -1
  3. package/components/configuration.values/operations/fetch.js +1 -1
  4. package/components/configuration.values/operations/get.js +1 -1
  5. package/components/configuration.values/operations/lib/map.js +1 -1
  6. package/components/configuration.values/operations/lib/resolve.js +1 -1
  7. package/components/configuration.values/operations/list.js +1 -1
  8. package/components/configuration.values/tsconfig.json +1 -1
  9. package/components/configuration.values/tsconfig.tsbuildinfo +1 -1
  10. package/components/configuration.values/types/index.d.ts +3 -0
  11. package/components/configuration.values/types/toa.d.ts +68 -0
  12. package/package.json +5 -5
  13. package/source/Secret.ts +6 -3
  14. package/source/context.ts +13 -0
  15. package/source/index.ts +6 -0
  16. package/transpiled/Secret.d.ts +6 -3
  17. package/transpiled/Secret.js +5 -1
  18. package/transpiled/Secret.js.map +1 -1
  19. package/transpiled/context.d.ts +4 -0
  20. package/transpiled/context.js +9 -0
  21. package/transpiled/context.js.map +1 -0
  22. package/transpiled/index.d.ts +2 -0
  23. package/transpiled/index.js +4 -0
  24. package/transpiled/index.js.map +1 -1
  25. package/tsconfig.json +3 -0
  26. package/tsconfig.tsbuildinfo +1 -1
  27. package/ui/dist/_app/immutable/chunks/{_OCUOSf_.js → Bxde3uE_.js} +2 -2
  28. package/ui/dist/_app/immutable/chunks/{BI4iTnyC.js → BzG-gka8.js} +1 -1
  29. package/ui/dist/_app/immutable/chunks/{XPGIBZyO.js → _I_MUoRn.js} +1 -1
  30. package/ui/dist/_app/immutable/chunks/{CcWYApmX.js → mvspXr3J.js} +2 -2
  31. package/ui/dist/_app/immutable/chunks/{DNNahQnI.js → p9RyiXQ-.js} +1 -1
  32. package/ui/dist/_app/immutable/entry/{app.Dm0NVzuV.js → app.C1VIepN7.js} +2 -2
  33. package/ui/dist/_app/immutable/entry/start.BQWCs_Pq.js +1 -0
  34. package/ui/dist/_app/immutable/nodes/{0.C1zAG1m5.js → 0.D_0dtFej.js} +1 -1
  35. package/ui/dist/_app/immutable/nodes/{1.QblBNjka.js → 1.DFlgHh-H.js} +1 -1
  36. package/ui/dist/_app/immutable/nodes/{2.CyVYZW9A.js → 2.BIHgAxXR.js} +1 -1
  37. package/ui/dist/_app/immutable/nodes/3.R-_yCt5X.js +1 -0
  38. package/ui/dist/_app/immutable/nodes/{4.CZA2PMJQ.js → 4.BZMuJGfA.js} +1 -1
  39. package/ui/dist/_app/version.json +1 -1
  40. package/ui/dist/index.html +10 -10
  41. package/components/configuration.values/operations/create.d.ts +0 -16
  42. package/components/configuration.values/operations/create.js.map +0 -1
  43. package/components/configuration.values/operations/fetch.d.ts +0 -11
  44. package/components/configuration.values/operations/fetch.js.map +0 -1
  45. package/components/configuration.values/operations/get.d.ts +0 -17
  46. package/components/configuration.values/operations/get.js.map +0 -1
  47. package/components/configuration.values/operations/lib/map.d.ts +0 -11
  48. package/components/configuration.values/operations/lib/map.js.map +0 -1
  49. package/components/configuration.values/operations/lib/map.test.d.ts +0 -1
  50. package/components/configuration.values/operations/lib/map.test.js +0 -26
  51. package/components/configuration.values/operations/lib/map.test.js.map +0 -1
  52. package/components/configuration.values/operations/lib/resolve.d.ts +0 -27
  53. package/components/configuration.values/operations/lib/resolve.js.map +0 -1
  54. package/components/configuration.values/operations/list.d.ts +0 -10
  55. package/components/configuration.values/operations/list.js.map +0 -1
  56. package/transpiled/Aspect.test.d.ts +0 -1
  57. package/transpiled/Aspect.test.js +0 -66
  58. package/transpiled/Aspect.test.js.map +0 -1
  59. package/transpiled/Client.test.d.ts +0 -1
  60. package/transpiled/Client.test.js +0 -78
  61. package/transpiled/Client.test.js.map +0 -1
  62. package/transpiled/Secret.test.d.ts +0 -1
  63. package/transpiled/Secret.test.js +0 -26
  64. package/transpiled/Secret.test.js.map +0 -1
  65. package/transpiled/configuration.test.d.ts +0 -1
  66. package/transpiled/configuration.test.js +0 -111
  67. package/transpiled/configuration.test.js.map +0 -1
  68. package/transpiled/deployment.test.d.ts +0 -1
  69. package/transpiled/deployment.test.js +0 -66
  70. package/transpiled/deployment.test.js.map +0 -1
  71. package/transpiled/epoch.test.d.ts +0 -1
  72. package/transpiled/epoch.test.js +0 -22
  73. package/transpiled/epoch.test.js.map +0 -1
  74. package/transpiled/manifest.test.d.ts +0 -1
  75. package/transpiled/manifest.test.js +0 -14
  76. package/transpiled/manifest.test.js.map +0 -1
  77. package/ui/dist/_app/immutable/entry/start.DWjxVbPv.js +0 -1
  78. 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.282",
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": "4007c814725dd015d3bbebb9a28e28a247645c4f",
26
+ "gitHead": "006755556879e91e8d68fa86753aa3b475bdf4bf",
27
27
  "dependencies": {
28
- "@toa.io/core": "1.0.0-alpha.282",
29
- "@toa.io/generic": "1.0.0-alpha.282",
30
- "@toa.io/schemas": "1.0.0-alpha.282",
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
- /** A configuration value that must not leak: a string only to whoever asks for it. */
5
- export class Secret implements Contract {
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'
@@ -1,7 +1,10 @@
1
1
  import { inspect } from 'node:util';
2
- import type { Secret as Contract } from '@toa.io/types';
3
- /** A configuration value that must not leak: a string only to whoever asks for it. */
4
- export declare class Secret implements Contract {
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;
@@ -1,5 +1,9 @@
1
1
  import { inspect } from 'node:util';
2
- /** A configuration value that must not leak: a string only to whoever asks for it. */
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) {
@@ -1 +1 @@
1
- {"version":3,"file":"Secret.js","sourceRoot":"","sources":["../source/Secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,sFAAsF;AACtF,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"}
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,4 @@
1
+ import type { Manifest } from './manifest.js';
2
+ import type { Contribution } from '@toa.io/core';
3
+ /** What this extension puts on the context of a component that declares it. */
4
+ export declare function context(declaration: Manifest): Contribution;
@@ -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"}
@@ -2,3 +2,5 @@ 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
+ export { Secret } from './Secret.js';
6
+ export { context } from './context.js';
@@ -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
@@ -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"}
package/tsconfig.json CHANGED
@@ -6,5 +6,8 @@
6
6
  },
7
7
  "include": [
8
8
  "source"
9
+ ],
10
+ "exclude": [
11
+ "**/*.test.ts"
9
12
  ]
10
13
  }