@workflow/world-testing 4.0.1-beta.21 → 4.0.1-beta.22
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/.well-known/workflow/v1/flow.js +86 -84
- package/dist/.well-known/workflow/v1/flow.js.map +1 -1
- package/dist/.well-known/workflow/v1/manifest.debug.json +23 -23
- package/dist/.well-known/workflow/v1/step.js +42 -42
- package/dist/.well-known/workflow/v1/step.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"steps": {
|
|
3
|
+
"workflows/addition.ts": {
|
|
4
|
+
"add": {
|
|
5
|
+
"stepId": "step//workflows/addition.ts//add"
|
|
6
|
+
}
|
|
7
|
+
},
|
|
3
8
|
"workflow/dist/internal/builtins.js": {
|
|
4
9
|
"__builtin_response_array_buffer": {
|
|
5
10
|
"stepId": "__builtin_response_array_buffer"
|
|
@@ -11,41 +16,41 @@
|
|
|
11
16
|
"stepId": "__builtin_response_text"
|
|
12
17
|
}
|
|
13
18
|
},
|
|
19
|
+
"workflows/retriable-and-fatal.ts": {
|
|
20
|
+
"stepThatFails": {
|
|
21
|
+
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatFails"
|
|
22
|
+
},
|
|
23
|
+
"stepThatThrowsRetryableError": {
|
|
24
|
+
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
14
27
|
"workflows/null-byte.ts": {
|
|
15
28
|
"nullByteStep": {
|
|
16
29
|
"stepId": "step//workflows/null-byte.ts//nullByteStep"
|
|
17
30
|
}
|
|
18
31
|
},
|
|
19
|
-
"workflows/addition.ts": {
|
|
20
|
-
"add": {
|
|
21
|
-
"stepId": "step//workflows/addition.ts//add"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"workflow/dist/stdlib.js": {
|
|
25
|
-
"fetch": {
|
|
26
|
-
"stepId": "step//workflow/dist/stdlib.js//fetch"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
32
|
"workflows/noop.ts": {
|
|
30
33
|
"noop": {
|
|
31
34
|
"stepId": "step//workflows/noop.ts//noop"
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
|
-
"workflows/retriable-and-fatal.ts": {
|
|
35
|
-
"stepThatFails": {
|
|
36
|
-
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatFails"
|
|
37
|
-
},
|
|
38
|
-
"stepThatThrowsRetryableError": {
|
|
39
|
-
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
37
|
"workflows/hooks.ts": {
|
|
43
38
|
"writeEvent": {
|
|
44
39
|
"stepId": "step//workflows/hooks.ts//writeEvent"
|
|
45
40
|
}
|
|
41
|
+
},
|
|
42
|
+
"workflow/dist/stdlib.js": {
|
|
43
|
+
"fetch": {
|
|
44
|
+
"stepId": "step//workflow/dist/stdlib.js//fetch"
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"workflows": {
|
|
49
|
+
"workflows/null-byte.ts": {
|
|
50
|
+
"nullByteWorkflow": {
|
|
51
|
+
"workflowId": "workflow//workflows/null-byte.ts//nullByteWorkflow"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
49
54
|
"workflows/addition.ts": {
|
|
50
55
|
"addition": {
|
|
51
56
|
"workflowId": "workflow//workflows/addition.ts//addition"
|
|
@@ -65,11 +70,6 @@
|
|
|
65
70
|
"retryableAndFatalErrorWorkflow": {
|
|
66
71
|
"workflowId": "workflow//workflows/retriable-and-fatal.ts//retryableAndFatalErrorWorkflow"
|
|
67
72
|
}
|
|
68
|
-
},
|
|
69
|
-
"workflows/null-byte.ts": {
|
|
70
|
-
"nullByteWorkflow": {
|
|
71
|
-
"workflowId": "workflow//workflows/null-byte.ts//nullByteWorkflow"
|
|
72
|
-
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -24014,6 +24014,20 @@ async function nullByteStep() {
|
|
|
24014
24014
|
}
|
|
24015
24015
|
__name(nullByteStep, "nullByteStep");
|
|
24016
24016
|
registerStepFunction("step//workflows/null-byte.ts//nullByteStep", nullByteStep);
|
|
24017
|
+
// workflows/noop.ts
|
|
24018
|
+
var count = 0;
|
|
24019
|
+
async function noop(_i) {
|
|
24020
|
+
count++;
|
|
24021
|
+
return count;
|
|
24022
|
+
}
|
|
24023
|
+
__name(noop, "noop");
|
|
24024
|
+
registerStepFunction("step//workflows/noop.ts//noop", noop);
|
|
24025
|
+
// workflows/addition.ts
|
|
24026
|
+
async function add(num, num2) {
|
|
24027
|
+
return num + num2;
|
|
24028
|
+
}
|
|
24029
|
+
__name(add, "add");
|
|
24030
|
+
registerStepFunction("step//workflows/addition.ts//add", add);
|
|
24017
24031
|
// ../utils/dist/index.js
|
|
24018
24032
|
var import_ms = __toESM(require_ms(), 1);
|
|
24019
24033
|
function once(fn) {
|
|
@@ -26571,13 +26585,13 @@ var handleSendStrict = /* @__PURE__ */ __name(({ anyProcess, channel, isSubproce
|
|
|
26571
26585
|
const ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);
|
|
26572
26586
|
const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
|
|
26573
26587
|
return {
|
|
26574
|
-
id:
|
|
26588
|
+
id: count2++,
|
|
26575
26589
|
type: REQUEST_TYPE,
|
|
26576
26590
|
message,
|
|
26577
26591
|
hasListeners
|
|
26578
26592
|
};
|
|
26579
26593
|
}, "handleSendStrict");
|
|
26580
|
-
var
|
|
26594
|
+
var count2 = 0n;
|
|
26581
26595
|
var validateStrictDeadlock = /* @__PURE__ */ __name((outgoingMessages, wrappedMessage) => {
|
|
26582
26596
|
if (wrappedMessage?.type !== REQUEST_TYPE || wrappedMessage.hasListeners) {
|
|
26583
26597
|
return;
|
|
@@ -27438,7 +27452,7 @@ var MaxBufferError = class extends Error {
|
|
|
27438
27452
|
};
|
|
27439
27453
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
27440
27454
|
var identity2 = /* @__PURE__ */ __name((value) => value, "identity");
|
|
27441
|
-
var
|
|
27455
|
+
var noop2 = /* @__PURE__ */ __name(() => void 0, "noop");
|
|
27442
27456
|
var getContentsProperty = /* @__PURE__ */ __name(({ contents }) => contents, "getContentsProperty");
|
|
27443
27457
|
var throwObjectStream = /* @__PURE__ */ __name((chunk) => {
|
|
27444
27458
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
@@ -27468,9 +27482,9 @@ var arrayMethods = {
|
|
|
27468
27482
|
others: identity2
|
|
27469
27483
|
},
|
|
27470
27484
|
getSize: increment,
|
|
27471
|
-
truncateChunk:
|
|
27485
|
+
truncateChunk: noop2,
|
|
27472
27486
|
addChunk: addArrayChunk,
|
|
27473
|
-
getFinalChunk:
|
|
27487
|
+
getFinalChunk: noop2,
|
|
27474
27488
|
finalize: getContentsProperty
|
|
27475
27489
|
};
|
|
27476
27490
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
@@ -27527,7 +27541,7 @@ var arrayBufferMethods = {
|
|
|
27527
27541
|
getSize: getLengthProperty,
|
|
27528
27542
|
truncateChunk: truncateArrayBufferChunk,
|
|
27529
27543
|
addChunk: addArrayBufferChunk,
|
|
27530
|
-
getFinalChunk:
|
|
27544
|
+
getFinalChunk: noop2,
|
|
27531
27545
|
finalize: finalizeArrayBuffer
|
|
27532
27546
|
};
|
|
27533
27547
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
@@ -30194,11 +30208,11 @@ var abortStream = /* @__PURE__ */ __name((stream) => {
|
|
|
30194
30208
|
}, "abortStream");
|
|
30195
30209
|
var errorStream = /* @__PURE__ */ __name((stream, error45) => {
|
|
30196
30210
|
if (!stream.destroyed) {
|
|
30197
|
-
stream.once("error",
|
|
30211
|
+
stream.once("error", noop3);
|
|
30198
30212
|
stream.destroy(error45);
|
|
30199
30213
|
}
|
|
30200
30214
|
}, "errorStream");
|
|
30201
|
-
var
|
|
30215
|
+
var noop3 = /* @__PURE__ */ __name(() => {
|
|
30202
30216
|
}, "noop");
|
|
30203
30217
|
var updateMaxListeners = /* @__PURE__ */ __name((passThroughStream, increment2) => {
|
|
30204
30218
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
@@ -48864,7 +48878,7 @@ __name(createEmbeddedWorld, "createEmbeddedWorld");
|
|
|
48864
48878
|
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
48865
48879
|
var import_oidc2 = __toESM(require_dist(), 1);
|
|
48866
48880
|
// ../world-vercel/dist/version.js
|
|
48867
|
-
var version2 = "4.0.1-beta.
|
|
48881
|
+
var version2 = "4.0.1-beta.12";
|
|
48868
48882
|
// ../world-vercel/dist/utils.js
|
|
48869
48883
|
var DEFAULT_RESOLVE_DATA_OPTION2 = "all";
|
|
48870
48884
|
function dateToStringReplacer(_key, value) {
|
|
@@ -49022,7 +49036,7 @@ function createQueue2(config3) {
|
|
|
49022
49036
|
const queue = /* @__PURE__ */ __name(async (queueName, x, opts) => {
|
|
49023
49037
|
const hasEncoder = typeof MessageWrapper.encode === "function";
|
|
49024
49038
|
if (!hasEncoder) {
|
|
49025
|
-
|
|
49039
|
+
console.warn("Using zod v3 compatibility mode for queue() calls - this may not work as expected");
|
|
49026
49040
|
}
|
|
49027
49041
|
const encoder = hasEncoder ? MessageWrapper.encode : (data) => data;
|
|
49028
49042
|
const encoded = encoder({
|
|
@@ -50376,31 +50390,6 @@ async function fetch2(...args) {
|
|
|
50376
50390
|
}
|
|
50377
50391
|
__name(fetch2, "fetch");
|
|
50378
50392
|
registerStepFunction("step//workflow/dist/stdlib.js//fetch", fetch2);
|
|
50379
|
-
// workflows/hooks.ts
|
|
50380
|
-
var Hook = defineHook({
|
|
50381
|
-
schema: object({
|
|
50382
|
-
data: string2(),
|
|
50383
|
-
done: boolean2().optional(),
|
|
50384
|
-
metadata: unknown()
|
|
50385
|
-
})
|
|
50386
|
-
});
|
|
50387
|
-
async function writeEvent(writable2, event, payload) {
|
|
50388
|
-
console.log("writing event", event, payload);
|
|
50389
|
-
const writer = writable2.getWriter();
|
|
50390
|
-
await writer.write(new TextEncoder().encode(`${JSON.stringify({
|
|
50391
|
-
event,
|
|
50392
|
-
payload
|
|
50393
|
-
})}\r
|
|
50394
|
-
`));
|
|
50395
|
-
}
|
|
50396
|
-
__name(writeEvent, "writeEvent");
|
|
50397
|
-
registerStepFunction("step//workflows/hooks.ts//writeEvent", writeEvent);
|
|
50398
|
-
// workflows/addition.ts
|
|
50399
|
-
async function add(num, num2) {
|
|
50400
|
-
return num + num2;
|
|
50401
|
-
}
|
|
50402
|
-
__name(add, "add");
|
|
50403
|
-
registerStepFunction("step//workflows/addition.ts//add", add);
|
|
50404
50393
|
// workflows/retriable-and-fatal.ts
|
|
50405
50394
|
async function stepThatThrowsRetryableError() {
|
|
50406
50395
|
const { attempt, stepStartedAt } = getStepMetadata();
|
|
@@ -50423,14 +50412,25 @@ async function stepThatFails() {
|
|
|
50423
50412
|
__name(stepThatFails, "stepThatFails");
|
|
50424
50413
|
registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError", stepThatThrowsRetryableError);
|
|
50425
50414
|
registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatFails", stepThatFails);
|
|
50426
|
-
// workflows/
|
|
50427
|
-
var
|
|
50428
|
-
|
|
50429
|
-
|
|
50430
|
-
|
|
50415
|
+
// workflows/hooks.ts
|
|
50416
|
+
var Hook = defineHook({
|
|
50417
|
+
schema: object({
|
|
50418
|
+
data: string2(),
|
|
50419
|
+
done: boolean2().optional(),
|
|
50420
|
+
metadata: unknown()
|
|
50421
|
+
})
|
|
50422
|
+
});
|
|
50423
|
+
async function writeEvent(writable2, event, payload) {
|
|
50424
|
+
console.log("writing event", event, payload);
|
|
50425
|
+
const writer = writable2.getWriter();
|
|
50426
|
+
await writer.write(new TextEncoder().encode(`${JSON.stringify({
|
|
50427
|
+
event,
|
|
50428
|
+
payload
|
|
50429
|
+
})}\r
|
|
50430
|
+
`));
|
|
50431
50431
|
}
|
|
50432
|
-
__name(
|
|
50433
|
-
registerStepFunction("step//workflows/
|
|
50432
|
+
__name(writeEvent, "writeEvent");
|
|
50433
|
+
registerStepFunction("step//workflows/hooks.ts//writeEvent", writeEvent);
|
|
50434
50434
|
// ../core/dist/runtime.js
|
|
50435
50435
|
var import_functions4 = __toESM(require_functions(), 1);
|
|
50436
50436
|
// ../core/dist/logger.js
|