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