@toa.io/extensions.configuration 1.0.0-alpha.275 → 1.0.0-alpha.276

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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.276](https://github.com/toa-io/toa/compare/v1.0.0-alpha.275...v1.0.0-alpha.276) (2026-09-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * **configuration:** log the epoch a value was resolved under ([ff51ff6](https://github.com/toa-io/toa/commit/ff51ff629592159eeac562059ceb944f193ad7e8))
12
+
13
+
14
+
15
+
16
+
6
17
  # [1.0.0-alpha.275](https://github.com/toa-io/toa/compare/v1.0.0-alpha.274...v1.0.0-alpha.275) (2026-09-02)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.configuration",
3
- "version": "1.0.0-alpha.275",
3
+ "version": "1.0.0-alpha.276",
4
4
  "description": "Toa Configuration",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -29,7 +29,7 @@
29
29
  "<rootDir>/ui"
30
30
  ]
31
31
  },
32
- "gitHead": "ed4e01a7709ca245c738766c9f01724bd1d54e96",
32
+ "gitHead": "6f81af829c7bf8a2db5a409f3d60ea40d15583ef",
33
33
  "dependencies": {
34
34
  "@toa.io/core": "1.0.0-alpha.273",
35
35
  "@toa.io/generic": "1.0.0-alpha.273",
package/source/Aspect.ts CHANGED
@@ -53,6 +53,9 @@ export class Aspect extends Connector implements extensions.Aspect {
53
53
  this.value = fit(configuration, this.manifest)
54
54
  this.created = created
55
55
  this.client.subscribe(this.locator.id, this.epoch, this.listener)
56
+
57
+ console.info('Configuration resolved',
58
+ { component: this.locator.id, epoch: this.epoch, created })
56
59
  }
57
60
 
58
61
  protected override async close (): Promise<void> {
@@ -68,10 +71,12 @@ export class Aspect extends Connector implements extensions.Aspect {
68
71
  this.value = fit(configuration, this.manifest)
69
72
  this.created = created
70
73
 
71
- console.info('Configuration updated', { component: this.locator.id, created })
74
+ console.info('Configuration updated',
75
+ { component: this.locator.id, epoch: this.epoch, created })
72
76
  } catch (error) {
73
77
  // the service validated it against the schema of its epoch, so the two schemas differ
74
- console.error('Configuration value does not match the schema', { component: this.locator.id, error })
78
+ console.error('Configuration value does not match the schema',
79
+ { component: this.locator.id, epoch: this.epoch, error })
75
80
  }
76
81
  }
77
82
  }
@@ -122,7 +122,7 @@ function prepare (annotation: Annotation, instances: Instance[]): Annotation {
122
122
  return normalized
123
123
  }
124
124
 
125
- export type Annotation = Record<string, any>
125
+ export type Annotation = Record<string, object>
126
126
  export type Instance = context.Dependency<Manifest>
127
127
  export type Values = Record<string, Entry>
128
128
 
@@ -42,6 +42,7 @@ class Aspect extends core_1.Connector {
42
42
  this.value = (0, configuration_1.fit)(configuration, this.manifest);
43
43
  this.created = created;
44
44
  this.client.subscribe(this.locator.id, this.epoch, this.listener);
45
+ openspan_1.console.info('Configuration resolved', { component: this.locator.id, epoch: this.epoch, created });
45
46
  }
46
47
  async close() {
47
48
  this.client?.unsubscribe(this.locator.id, this.epoch, this.listener);
@@ -53,11 +54,11 @@ class Aspect extends core_1.Connector {
53
54
  try {
54
55
  this.value = (0, configuration_1.fit)(configuration, this.manifest);
55
56
  this.created = created;
56
- openspan_1.console.info('Configuration updated', { component: this.locator.id, created });
57
+ openspan_1.console.info('Configuration updated', { component: this.locator.id, epoch: this.epoch, created });
57
58
  }
58
59
  catch (error) {
59
60
  // the service validated it against the schema of its epoch, so the two schemas differ
60
- openspan_1.console.error('Configuration value does not match the schema', { component: this.locator.id, error });
61
+ openspan_1.console.error('Configuration value does not match the schema', { component: this.locator.id, epoch: this.epoch, error });
61
62
  }
62
63
  };
63
64
  }
@@ -1 +1 @@
1
- {"version":3,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,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC,CAAA;CACF;AA1ED,wBA0EC"}
@@ -4,7 +4,7 @@ import type { context } from '@toa.io/norm';
4
4
  export declare function deployment(instances: Instance[], annotation?: Annotation): Dependency;
5
5
  /** What the values service is given: the epoch, the schema and the defaults of every component. */
6
6
  export declare function describe(instances: Instance[], annotation?: Annotation): Values;
7
- export type Annotation = Record<string, any>;
7
+ export type Annotation = Record<string, object>;
8
8
  export type Instance = context.Dependency<Manifest>;
9
9
  export type Values = Record<string, Entry>;
10
10
  export interface Entry {