@cadenza.io/core 3.19.4 → 3.19.5
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.js +28 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3753,8 +3753,8 @@ var Task = class _Task extends SignalEmitter {
|
|
|
3753
3753
|
isSubMeta: this.isSubMeta,
|
|
3754
3754
|
validateInputContext: this.validateInputContext,
|
|
3755
3755
|
validateOutputContext: this.validateOutputContext,
|
|
3756
|
-
|
|
3757
|
-
|
|
3756
|
+
inputContextSchemaId: this.inputContextSchema,
|
|
3757
|
+
outputContextSchemaId: this.outputContextSchema,
|
|
3758
3758
|
signals: {
|
|
3759
3759
|
emits: Array.from(this.emitsSignals),
|
|
3760
3760
|
signalsToEmitAfter: Array.from(this.signalsToEmitAfter),
|
|
@@ -3919,9 +3919,17 @@ var Task = class _Task extends SignalEmitter {
|
|
|
3919
3919
|
if (key in properties) {
|
|
3920
3920
|
const prop = properties[key];
|
|
3921
3921
|
if (Array.isArray(prop)) {
|
|
3922
|
+
let propErrors = {};
|
|
3922
3923
|
for (const p of prop) {
|
|
3923
|
-
|
|
3924
|
+
const pe = this.validateProp(p, key, value, path);
|
|
3925
|
+
if (Object.keys(pe).length > 0) {
|
|
3926
|
+
Object.assign(propErrors, pe);
|
|
3927
|
+
} else {
|
|
3928
|
+
propErrors = {};
|
|
3929
|
+
break;
|
|
3930
|
+
}
|
|
3924
3931
|
}
|
|
3932
|
+
Object.assign(errors, propErrors);
|
|
3925
3933
|
} else {
|
|
3926
3934
|
Object.assign(errors, this.validateProp(prop, key, value, path));
|
|
3927
3935
|
}
|
|
@@ -3955,13 +3963,23 @@ var Task = class _Task extends SignalEmitter {
|
|
|
3955
3963
|
errors[`${path}.${key}`] = `Expected 'object' for '${key}', got '${typeof value}'`;
|
|
3956
3964
|
} else if (propType === "array" && prop.items) {
|
|
3957
3965
|
value.forEach((item, index) => {
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3966
|
+
if (Array.isArray(prop.items)) {
|
|
3967
|
+
for (const p of prop.items) {
|
|
3968
|
+
Object.assign(
|
|
3969
|
+
errors,
|
|
3970
|
+
this.validateProp(p, key, item, `${path}.${key}[${index}]`)
|
|
3971
|
+
);
|
|
3972
|
+
}
|
|
3973
|
+
} else {
|
|
3974
|
+
Object.assign(
|
|
3975
|
+
errors,
|
|
3976
|
+
this.validateProp(
|
|
3977
|
+
prop.items,
|
|
3978
|
+
key,
|
|
3979
|
+
item,
|
|
3980
|
+
`${path}.${key}[${index}]`
|
|
3981
|
+
)
|
|
3982
|
+
);
|
|
3965
3983
|
}
|
|
3966
3984
|
});
|
|
3967
3985
|
} else if (propType === "object" && !Array.isArray(value) && value !== null) {
|