@travetto/config 5.1.0 → 6.0.0-rc.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 +3 -3
- package/src/service.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-rc.0",
|
|
4
4
|
"description": "Configuration support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yaml",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"directory": "module/config"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/di": "^
|
|
30
|
-
"@travetto/schema": "^
|
|
29
|
+
"@travetto/di": "^6.0.0-rc.0",
|
|
30
|
+
"@travetto/schema": "^6.0.0-rc.0",
|
|
31
31
|
"yaml": "^2.7.0"
|
|
32
32
|
},
|
|
33
33
|
"travetto": {
|
package/src/service.ts
CHANGED
|
@@ -117,10 +117,10 @@ export class ConfigurationService {
|
|
|
117
117
|
if (!SchemaRegistry.has(cls)) {
|
|
118
118
|
throw new AppError(`${classId} is not a valid schema class, config is not supported`);
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
BindUtil.bindSchemaToObject(cls, item, this.#get(namespace));
|
|
121
121
|
if (validate) {
|
|
122
122
|
try {
|
|
123
|
-
await SchemaValidator.validate(cls,
|
|
123
|
+
await SchemaValidator.validate(cls, item);
|
|
124
124
|
} catch (err) {
|
|
125
125
|
if (err instanceof ValidationResultError) {
|
|
126
126
|
const ogMessage = err.message;
|
|
@@ -132,7 +132,7 @@ export class ConfigurationService {
|
|
|
132
132
|
throw err;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
return
|
|
135
|
+
return item;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|