@travetto/config 4.0.0-rc.6 → 4.0.0-rc.8

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/README.md CHANGED
@@ -199,18 +199,20 @@ $ trv main doc/dbconfig-run.ts
199
199
  category: 'data',
200
200
  type: 'ValidationResultError',
201
201
  at: 2029-03-14T04:00:00.618Z,
202
- class: '@travetto/config:doc/dbconfig○DBConfig',
203
- file: './doc/dbconfig.ts',
204
- errors: [
205
- {
206
- kind: 'required',
207
- active: true,
208
- value: undefined,
209
- message: 'port is required',
210
- path: 'port',
211
- type: undefined
212
- }
213
- ]
202
+ details: {
203
+ class: '@travetto/config:doc/dbconfig○DBConfig',
204
+ file: './doc/dbconfig.ts',
205
+ errors: [
206
+ {
207
+ kind: 'required',
208
+ active: true,
209
+ value: undefined,
210
+ message: 'port is required',
211
+ path: 'port',
212
+ type: undefined
213
+ }
214
+ ]
215
+ }
214
216
  }
215
217
  ```
216
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/config",
3
- "version": "4.0.0-rc.6",
3
+ "version": "4.0.0-rc.8",
4
4
  "description": "Configuration support",
5
5
  "keywords": [
6
6
  "yaml",
@@ -26,9 +26,9 @@
26
26
  "directory": "module/config"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/di": "^4.0.0-rc.6",
30
- "@travetto/schema": "^4.0.0-rc.6",
31
- "@travetto/yaml": "^4.0.0-rc.6"
29
+ "@travetto/di": "^4.0.0-rc.8",
30
+ "@travetto/schema": "^4.0.0-rc.8",
31
+ "@travetto/yaml": "^4.0.0-rc.8"
32
32
  },
33
33
  "travetto": {
34
34
  "displayName": "Configuration"
package/src/service.ts CHANGED
@@ -128,7 +128,7 @@ export class ConfigurationService {
128
128
  err.message = `Failed to construct ${cls.Ⲑid} as validation errors have occurred`;
129
129
  err.stack = err.stack?.replace(ogMessage, err.message);
130
130
  const file = RuntimeIndex.getFunctionMetadata(cls)!.source;
131
- err.payload = { class: cls.Ⲑid, file, ...(err.payload ?? {}) };
131
+ err.details = { class: cls.Ⲑid, file, ...(err.details ?? {}) };
132
132
  }
133
133
  throw err;
134
134
  }
@@ -140,7 +140,7 @@ export class ConfigurationService {
140
140
  * Log current configuration state
141
141
  */
142
142
  async initBanner(): Promise<void> {
143
- const og = util.inspect.defaultOptions.depth;
143
+ const ogDepth = util.inspect.defaultOptions.depth;
144
144
  util.inspect.defaultOptions.depth = 100;
145
145
 
146
146
  console.log('Initialized', {
@@ -158,7 +158,6 @@ export class ConfigurationService {
158
158
  },
159
159
  config: await this.exportActive()
160
160
  });
161
-
162
- util.inspect.defaultOptions.depth = og;
161
+ util.inspect.defaultOptions.depth = ogDepth;
163
162
  }
164
163
  }