fix system entity registration by re-applying configs to modules

This commit is contained in:
dswbx
2025-01-17 15:46:05 +01:00
parent 9422cc5bb8
commit a6fd9f0d96
10 changed files with 112 additions and 14 deletions

View File

@@ -130,7 +130,10 @@ export class SchemaObject<Schema extends TObject> {
//console.log("overwritePaths", this.options?.overwritePaths);
if (this.options?.overwritePaths) {
const keys = getFullPathKeys(value).map((k) => path + "." + k);
const keys = getFullPathKeys(value).map((k) => {
// only prepend path if given
return path.length > 0 ? path + "." + k : k;
});
const overwritePaths = keys.filter((k) => {
return this.options?.overwritePaths?.some((p) => {
if (typeof p === "string") {

View File

@@ -115,6 +115,7 @@ export function parse<Schema extends TSchema = TSchema>(
} else if (options?.onError) {
options.onError(Errors(schema, data));
} else {
//console.warn("errors", JSON.stringify([...Errors(schema, data)], null, 2));
throw new TypeInvalidError(schema, data);
}