@workglow/tasks 0.0.92 → 0.0.94
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 +41 -1
- package/dist/browser.js.map +4 -4
- package/dist/bun.js +41 -1
- package/dist/bun.js.map +4 -4
- package/dist/node.js +41 -1
- package/dist/node.js.map +4 -4
- package/dist/task/InputTask.d.ts +7 -1
- package/dist/task/InputTask.d.ts.map +1 -1
- package/dist/task/OutputTask.d.ts +7 -1
- package/dist/task/OutputTask.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/browser.js
CHANGED
|
@@ -1436,6 +1436,26 @@ class InputTask extends Task13 {
|
|
|
1436
1436
|
async executeReactive(input) {
|
|
1437
1437
|
return input;
|
|
1438
1438
|
}
|
|
1439
|
+
async* executeStream(input, context) {
|
|
1440
|
+
if (context.inputStreams) {
|
|
1441
|
+
for (const [, stream] of context.inputStreams) {
|
|
1442
|
+
const reader = stream.getReader();
|
|
1443
|
+
try {
|
|
1444
|
+
while (true) {
|
|
1445
|
+
const { done, value } = await reader.read();
|
|
1446
|
+
if (done)
|
|
1447
|
+
break;
|
|
1448
|
+
if (value.type === "finish")
|
|
1449
|
+
continue;
|
|
1450
|
+
yield value;
|
|
1451
|
+
}
|
|
1452
|
+
} finally {
|
|
1453
|
+
reader.releaseLock();
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
yield { type: "finish", data: input };
|
|
1458
|
+
}
|
|
1439
1459
|
}
|
|
1440
1460
|
Workflow15.prototype.input = CreateWorkflow14(InputTask);
|
|
1441
1461
|
// src/task/JavaScriptTask.ts
|
|
@@ -6191,6 +6211,26 @@ class OutputTask extends Task17 {
|
|
|
6191
6211
|
async executeReactive(input2) {
|
|
6192
6212
|
return input2;
|
|
6193
6213
|
}
|
|
6214
|
+
async* executeStream(input2, context) {
|
|
6215
|
+
if (context.inputStreams) {
|
|
6216
|
+
for (const [, stream] of context.inputStreams) {
|
|
6217
|
+
const reader = stream.getReader();
|
|
6218
|
+
try {
|
|
6219
|
+
while (true) {
|
|
6220
|
+
const { done, value } = await reader.read();
|
|
6221
|
+
if (done)
|
|
6222
|
+
break;
|
|
6223
|
+
if (value.type === "finish")
|
|
6224
|
+
continue;
|
|
6225
|
+
yield value;
|
|
6226
|
+
}
|
|
6227
|
+
} finally {
|
|
6228
|
+
reader.releaseLock();
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
yield { type: "finish", data: input2 };
|
|
6233
|
+
}
|
|
6194
6234
|
}
|
|
6195
6235
|
Workflow20.prototype.output = CreateWorkflow19(OutputTask);
|
|
6196
6236
|
// src/task/SplitTask.ts
|
|
@@ -6856,4 +6896,4 @@ export {
|
|
|
6856
6896
|
ArrayTask
|
|
6857
6897
|
};
|
|
6858
6898
|
|
|
6859
|
-
//# debugId=
|
|
6899
|
+
//# debugId=36DF5FE9FCA51F3064756E2164756E21
|