@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 CHANGED
@@ -19,6 +19,7 @@ declare class GraphContext {
19
19
  * @returns Cloned full context.
20
20
  */
21
21
  getFullContext(): AnyObject;
22
+ getClonedFullContext(): AnyObject;
22
23
  /**
23
24
  * Gets frozen metadata (read-only).
24
25
  * @returns Frozen metadata object.
@@ -365,7 +366,7 @@ declare class SignalParticipant extends SignalEmitter {
365
366
  destroy(): void;
366
367
  }
367
368
 
368
- type SchemaType = "string" | "number" | "boolean" | "array" | "object" | "null" | "any";
369
+ type SchemaType = "string" | "number" | "boolean" | "array" | "object" | "any";
369
370
  type SchemaConstraints = {
370
371
  min?: number;
371
372
  max?: number;
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ declare class GraphContext {
19
19
  * @returns Cloned full context.
20
20
  */
21
21
  getFullContext(): AnyObject;
22
+ getClonedFullContext(): AnyObject;
22
23
  /**
23
24
  * Gets frozen metadata (read-only).
24
25
  * @returns Frozen metadata object.
@@ -365,7 +366,7 @@ declare class SignalParticipant extends SignalEmitter {
365
366
  destroy(): void;
366
367
  }
367
368
 
368
- type SchemaType = "string" | "number" | "boolean" | "array" | "object" | "null" | "any";
369
+ type SchemaType = "string" | "number" | "boolean" | "array" | "object" | "any";
369
370
  type SchemaConstraints = {
370
371
  min?: number;
371
372
  max?: number;
package/dist/index.js CHANGED
@@ -527,6 +527,9 @@ var GraphContext = class _GraphContext {
527
527
  getFullContext() {
528
528
  return this.fullContext;
529
529
  }
530
+ getClonedFullContext() {
531
+ return deepCloneFilter(this.fullContext);
532
+ }
530
533
  /**
531
534
  * Gets frozen metadata (read-only).
532
535
  * @returns Frozen metadata object.
@@ -771,7 +774,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
771
774
  if (!this.divided && !this.processing) {
772
775
  this.processing = true;
773
776
  const inputValidation = this.task.validateInput(
774
- this.context.getContext()
777
+ this.isMeta() ? this.context.getMetaData() : this.context.getContext()
775
778
  );
776
779
  if (inputValidation !== true) {
777
780
  this.onError(inputValidation.__validationErrors);
@@ -1343,6 +1346,12 @@ var Task = class extends SignalParticipant {
1343
1346
  if (key in properties) {
1344
1347
  const prop = properties[key];
1345
1348
  const propType = prop.type;
1349
+ if (propType === "any") {
1350
+ continue;
1351
+ }
1352
+ if ((value === void 0 || value === null) && !prop.strict) {
1353
+ continue;
1354
+ }
1346
1355
  if (propType === "string" && typeof value !== "string") {
1347
1356
  errors[`${path}.${key}`] = `Expected 'string' for '${key}', got '${typeof value}'`;
1348
1357
  } else if (propType === "number" && typeof value !== "number") {
@@ -1476,7 +1485,10 @@ var Task = class extends SignalParticipant {
1476
1485
  * @edge If validateOutputContext is true, validates output; on failure, emits 'meta.task.outputValidationFailed' with detailed errors.
1477
1486
  */
1478
1487
  execute(context, progressCallback) {
1479
- return this.taskFunction(context.getClonedContext(), progressCallback);
1488
+ return this.taskFunction(
1489
+ this.isMeta ? context.getClonedFullContext() : context.getClonedContext(),
1490
+ progressCallback
1491
+ );
1480
1492
  }
1481
1493
  doAfter(...tasks) {
1482
1494
  for (const pred of tasks) {