@workglow/task-graph 0.0.71 → 0.0.73
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 +8 -3
- package/dist/browser.js.map +4 -4
- package/dist/bun.js +8 -3
- package/dist/bun.js.map +4 -4
- package/dist/node.js +8 -3
- package/dist/node.js.map +4 -4
- package/dist/task/ArrayTask.d.ts.map +1 -1
- package/dist/task/GraphAsTaskRunner.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/browser.js
CHANGED
|
@@ -1444,8 +1444,14 @@ class GraphAsTaskRunner extends TaskRunner {
|
|
|
1444
1444
|
super.handleDisable();
|
|
1445
1445
|
}
|
|
1446
1446
|
fixInput(input) {
|
|
1447
|
+
const inputSchema = this.task.inputSchema();
|
|
1448
|
+
if (typeof inputSchema === "boolean") {
|
|
1449
|
+
return input;
|
|
1450
|
+
}
|
|
1447
1451
|
const flattenedInput = Object.entries(input).reduce((acc, [key, value]) => {
|
|
1448
|
-
|
|
1452
|
+
const inputDef = inputSchema.properties?.[key];
|
|
1453
|
+
const shouldFlatten = Array.isArray(value) && typeof inputDef === "object" && inputDef !== null && "x-replicate" in inputDef && inputDef["x-replicate"] === true;
|
|
1454
|
+
if (shouldFlatten) {
|
|
1449
1455
|
return { ...acc, [key]: value[0] };
|
|
1450
1456
|
}
|
|
1451
1457
|
return { ...acc, [key]: value };
|
|
@@ -2363,7 +2369,6 @@ class ArrayTask extends GraphAsTask {
|
|
|
2363
2369
|
super.regenerateGraph();
|
|
2364
2370
|
return;
|
|
2365
2371
|
}
|
|
2366
|
-
this.subGraph = new TaskGraph;
|
|
2367
2372
|
const inputIds = Array.from(arrayInputs.keys());
|
|
2368
2373
|
const inputObject = Object.fromEntries(arrayInputs);
|
|
2369
2374
|
const combinations = this.generateCombinations(inputObject, inputIds);
|
|
@@ -2967,4 +2972,4 @@ export {
|
|
|
2967
2972
|
ArrayTask
|
|
2968
2973
|
};
|
|
2969
2974
|
|
|
2970
|
-
//# debugId=
|
|
2975
|
+
//# debugId=3CC0A3193480C90164756E2164756E21
|