@workglow/task-graph 0.0.101 → 0.0.102

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/browser.js CHANGED
@@ -14,15 +14,28 @@ var TaskStatus = {
14
14
  var TaskConfigSchema = {
15
15
  type: "object",
16
16
  properties: {
17
- id: {},
17
+ id: {
18
+ "x-ui-hidden": true
19
+ },
18
20
  title: { type: "string" },
19
21
  description: { type: "string" },
20
22
  cacheable: { type: "boolean" },
21
- inputSchema: { type: "object", properties: {}, additionalProperties: true },
22
- outputSchema: { type: "object", properties: {}, additionalProperties: true },
23
+ inputSchema: {
24
+ type: "object",
25
+ properties: {},
26
+ additionalProperties: true,
27
+ "x-ui-hidden": true
28
+ },
29
+ outputSchema: {
30
+ type: "object",
31
+ properties: {},
32
+ additionalProperties: true,
33
+ "x-ui-hidden": true
34
+ },
23
35
  extras: {
24
36
  type: "object",
25
- additionalProperties: true
37
+ additionalProperties: true,
38
+ "x-ui-hidden": true
26
39
  }
27
40
  },
28
41
  additionalProperties: false
@@ -829,6 +842,7 @@ class Task {
829
842
  static cacheable = true;
830
843
  static hasDynamicSchemas = false;
831
844
  static passthroughInputsToOutputs = false;
845
+ static customizable = false;
832
846
  static inputSchema() {
833
847
  return {
834
848
  type: "object",
@@ -1167,7 +1181,14 @@ class Task {
1167
1181
  return this.constructor.getInputSchemaNode(type);
1168
1182
  }
1169
1183
  async validateInput(input) {
1170
- const schemaNode = this.getInputSchemaNode(this.type);
1184
+ const ctor = this.constructor;
1185
+ let schemaNode;
1186
+ if (ctor.hasDynamicSchemas) {
1187
+ const instanceSchema = this.inputSchema();
1188
+ schemaNode = ctor.generateInputSchemaNode(instanceSchema);
1189
+ } else {
1190
+ schemaNode = this.getInputSchemaNode(this.type);
1191
+ }
1171
1192
  const result = schemaNode.validate(input);
1172
1193
  if (!result.valid) {
1173
1194
  const errorMessages = result.errors.map((e) => {
@@ -2179,7 +2200,7 @@ var graphAsTaskConfigSchema = {
2179
2200
  type: "object",
2180
2201
  properties: {
2181
2202
  ...TaskConfigSchema["properties"],
2182
- compoundMerge: { type: "string" }
2203
+ compoundMerge: { type: "string", "x-ui-hidden": true }
2183
2204
  },
2184
2205
  additionalProperties: false
2185
2206
  };
@@ -3635,23 +3656,17 @@ function inferIterationFromSchema(schema) {
3635
3656
  return false;
3636
3657
  }
3637
3658
  function createFlexibleSchema(baseSchema) {
3638
- if (typeof baseSchema === "boolean")
3639
- return baseSchema;
3640
3659
  return {
3641
3660
  anyOf: [baseSchema, { type: "array", items: baseSchema }]
3642
3661
  };
3643
3662
  }
3644
3663
  function createArraySchema(baseSchema) {
3645
- if (typeof baseSchema === "boolean")
3646
- return baseSchema;
3647
3664
  return {
3648
3665
  type: "array",
3649
3666
  items: baseSchema
3650
3667
  };
3651
3668
  }
3652
3669
  function extractBaseSchema(schema) {
3653
- if (typeof schema === "boolean")
3654
- return schema;
3655
3670
  const schemaType = schema.type;
3656
3671
  if (schemaType === "array" && schema.items) {
3657
3672
  return schema.items;
@@ -4711,7 +4726,11 @@ var jobQueueTaskConfigSchema = {
4711
4726
  type: "object",
4712
4727
  properties: {
4713
4728
  ...graphAsTaskConfigSchema["properties"],
4714
- queue: {}
4729
+ queue: {
4730
+ oneOf: [{ type: "boolean" }, { type: "string" }],
4731
+ description: "Queue handling: false=run inline, true=use default, string=explicit queue name",
4732
+ "x-ui-hidden": true
4733
+ }
4715
4734
  },
4716
4735
  additionalProperties: false
4717
4736
  };
@@ -5358,4 +5377,4 @@ export {
5358
5377
  ConditionalTask
5359
5378
  };
5360
5379
 
5361
- //# debugId=365A916C098B8CB464756E2164756E21
5380
+ //# debugId=14156C72FE37DB7964756E2164756E21