@cadenza.io/core 1.7.8 → 1.7.10
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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -489,6 +489,9 @@ var GraphContext = class _GraphContext {
|
|
|
489
489
|
getFullContext() {
|
|
490
490
|
return this.fullContext;
|
|
491
491
|
}
|
|
492
|
+
getClonedFullContext() {
|
|
493
|
+
return deepCloneFilter(this.fullContext);
|
|
494
|
+
}
|
|
492
495
|
/**
|
|
493
496
|
* Gets frozen metadata (read-only).
|
|
494
497
|
* @returns Frozen metadata object.
|
|
@@ -733,7 +736,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
733
736
|
if (!this.divided && !this.processing) {
|
|
734
737
|
this.processing = true;
|
|
735
738
|
const inputValidation = this.task.validateInput(
|
|
736
|
-
this.context.getContext()
|
|
739
|
+
this.isMeta() ? this.context.getMetaData() : this.context.getContext()
|
|
737
740
|
);
|
|
738
741
|
if (inputValidation !== true) {
|
|
739
742
|
this.onError(inputValidation.__validationErrors);
|
|
@@ -1305,6 +1308,12 @@ var Task = class extends SignalParticipant {
|
|
|
1305
1308
|
if (key in properties) {
|
|
1306
1309
|
const prop = properties[key];
|
|
1307
1310
|
const propType = prop.type;
|
|
1311
|
+
if (propType === "any") {
|
|
1312
|
+
continue;
|
|
1313
|
+
}
|
|
1314
|
+
if ((value === void 0 || value === null) && !prop.strict) {
|
|
1315
|
+
continue;
|
|
1316
|
+
}
|
|
1308
1317
|
if (propType === "string" && typeof value !== "string") {
|
|
1309
1318
|
errors[`${path}.${key}`] = `Expected 'string' for '${key}', got '${typeof value}'`;
|
|
1310
1319
|
} else if (propType === "number" && typeof value !== "number") {
|
|
@@ -1438,7 +1447,10 @@ var Task = class extends SignalParticipant {
|
|
|
1438
1447
|
* @edge If validateOutputContext is true, validates output; on failure, emits 'meta.task.outputValidationFailed' with detailed errors.
|
|
1439
1448
|
*/
|
|
1440
1449
|
execute(context, progressCallback) {
|
|
1441
|
-
return this.taskFunction(
|
|
1450
|
+
return this.taskFunction(
|
|
1451
|
+
this.isMeta ? context.getClonedFullContext() : context.getClonedContext(),
|
|
1452
|
+
progressCallback
|
|
1453
|
+
);
|
|
1442
1454
|
}
|
|
1443
1455
|
doAfter(...tasks) {
|
|
1444
1456
|
for (const pred of tasks) {
|