@workflow/world-testing 4.0.1-beta.40 → 4.0.1-beta.42
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 +58 -49
- package/dist/.well-known/workflow/v1/flow.js.map +1 -1
- package/dist/.well-known/workflow/v1/manifest.json +88 -88
- package/dist/.well-known/workflow/v1/step.js +59 -43
- package/dist/.well-known/workflow/v1/step.js.map +1 -1
- package/dist/src/idempotency.mjs +2 -2
- package/dist/src/idempotency.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"steps": {
|
|
4
|
+
"workflows/null-byte.ts": {
|
|
5
|
+
"nullByteStep": {
|
|
6
|
+
"stepId": "step//workflows/null-byte.ts//nullByteStep"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
4
9
|
"workflow/dist/internal/builtins.js": {
|
|
5
10
|
"__builtin_response_array_buffer": {
|
|
6
11
|
"stepId": "__builtin_response_array_buffer"
|
|
@@ -12,14 +17,9 @@
|
|
|
12
17
|
"stepId": "__builtin_response_text"
|
|
13
18
|
}
|
|
14
19
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"stepId": "step//
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"workflows/addition.ts": {
|
|
21
|
-
"add": {
|
|
22
|
-
"stepId": "step//workflows/addition.ts//add"
|
|
20
|
+
"workflow/dist/stdlib.js": {
|
|
21
|
+
"fetch": {
|
|
22
|
+
"stepId": "step//workflow/dist/stdlib.js//fetch"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"workflows/noop.ts": {
|
|
@@ -35,28 +35,28 @@
|
|
|
35
35
|
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"stepId": "step//
|
|
38
|
+
"workflows/hooks.ts": {
|
|
39
|
+
"writeEvent": {
|
|
40
|
+
"stepId": "step//workflows/hooks.ts//writeEvent"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"workflows/
|
|
44
|
-
"
|
|
45
|
-
"stepId": "step//workflows/
|
|
43
|
+
"workflows/addition.ts": {
|
|
44
|
+
"add": {
|
|
45
|
+
"stepId": "step//workflows/addition.ts//add"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"workflows": {
|
|
50
|
-
"workflows/
|
|
51
|
-
"
|
|
52
|
-
"workflowId": "workflow//workflows/
|
|
50
|
+
"workflows/null-byte.ts": {
|
|
51
|
+
"nullByteWorkflow": {
|
|
52
|
+
"workflowId": "workflow//workflows/null-byte.ts//nullByteWorkflow",
|
|
53
53
|
"graph": {
|
|
54
54
|
"nodes": [
|
|
55
55
|
{
|
|
56
56
|
"id": "start",
|
|
57
57
|
"type": "workflowStart",
|
|
58
58
|
"data": {
|
|
59
|
-
"label": "Start:
|
|
59
|
+
"label": "Start: nullByteWorkflow",
|
|
60
60
|
"nodeKind": "workflow_start"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
@@ -64,22 +64,9 @@
|
|
|
64
64
|
"id": "node_0",
|
|
65
65
|
"type": "step",
|
|
66
66
|
"data": {
|
|
67
|
-
"label": "
|
|
68
|
-
"nodeKind": "step",
|
|
69
|
-
"stepId": "step//workflows/hooks.ts//writeEvent"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"id": "node_1",
|
|
74
|
-
"type": "step",
|
|
75
|
-
"data": {
|
|
76
|
-
"label": "writeEvent",
|
|
67
|
+
"label": "nullByteStep",
|
|
77
68
|
"nodeKind": "step",
|
|
78
|
-
"stepId": "step//workflows/
|
|
79
|
-
},
|
|
80
|
-
"metadata": {
|
|
81
|
-
"loopId": "loop_0",
|
|
82
|
-
"loopIsAwait": true
|
|
69
|
+
"stepId": "step//workflows/null-byte.ts//nullByteStep"
|
|
83
70
|
}
|
|
84
71
|
},
|
|
85
72
|
{
|
|
@@ -99,20 +86,8 @@
|
|
|
99
86
|
"type": "default"
|
|
100
87
|
},
|
|
101
88
|
{
|
|
102
|
-
"id": "
|
|
103
|
-
"source": "node_1",
|
|
104
|
-
"target": "node_1",
|
|
105
|
-
"type": "loop"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"id": "e_node_0_node_1",
|
|
89
|
+
"id": "e_node_0_end",
|
|
109
90
|
"source": "node_0",
|
|
110
|
-
"target": "node_1",
|
|
111
|
-
"type": "default"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"id": "e_node_1_end",
|
|
115
|
-
"source": "node_1",
|
|
116
91
|
"target": "end",
|
|
117
92
|
"type": "default"
|
|
118
93
|
}
|
|
@@ -120,16 +95,16 @@
|
|
|
120
95
|
}
|
|
121
96
|
}
|
|
122
97
|
},
|
|
123
|
-
"workflows/
|
|
124
|
-
"
|
|
125
|
-
"workflowId": "workflow//workflows/
|
|
98
|
+
"workflows/noop.ts": {
|
|
99
|
+
"brokenWf": {
|
|
100
|
+
"workflowId": "workflow//workflows/noop.ts//brokenWf",
|
|
126
101
|
"graph": {
|
|
127
102
|
"nodes": [
|
|
128
103
|
{
|
|
129
104
|
"id": "start",
|
|
130
105
|
"type": "workflowStart",
|
|
131
106
|
"data": {
|
|
132
|
-
"label": "Start:
|
|
107
|
+
"label": "Start: brokenWf",
|
|
133
108
|
"nodeKind": "workflow_start"
|
|
134
109
|
}
|
|
135
110
|
},
|
|
@@ -137,9 +112,18 @@
|
|
|
137
112
|
"id": "node_0",
|
|
138
113
|
"type": "step",
|
|
139
114
|
"data": {
|
|
140
|
-
"label": "
|
|
115
|
+
"label": "noop",
|
|
141
116
|
"nodeKind": "step",
|
|
142
|
-
"stepId": "step//workflows/
|
|
117
|
+
"stepId": "step//workflows/noop.ts//noop"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "node_1",
|
|
122
|
+
"type": "step",
|
|
123
|
+
"data": {
|
|
124
|
+
"label": "noop",
|
|
125
|
+
"nodeKind": "step",
|
|
126
|
+
"stepId": "step//workflows/noop.ts//noop"
|
|
143
127
|
}
|
|
144
128
|
},
|
|
145
129
|
{
|
|
@@ -159,8 +143,14 @@
|
|
|
159
143
|
"type": "default"
|
|
160
144
|
},
|
|
161
145
|
{
|
|
162
|
-
"id": "
|
|
146
|
+
"id": "e_node_0_node_1",
|
|
163
147
|
"source": "node_0",
|
|
148
|
+
"target": "node_1",
|
|
149
|
+
"type": "default"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "e_node_1_end",
|
|
153
|
+
"source": "node_1",
|
|
164
154
|
"target": "end",
|
|
165
155
|
"type": "default"
|
|
166
156
|
}
|
|
@@ -168,16 +158,16 @@
|
|
|
168
158
|
}
|
|
169
159
|
}
|
|
170
160
|
},
|
|
171
|
-
"workflows/
|
|
172
|
-
"
|
|
173
|
-
"workflowId": "workflow//workflows/
|
|
161
|
+
"workflows/retriable-and-fatal.ts": {
|
|
162
|
+
"retryableAndFatalErrorWorkflow": {
|
|
163
|
+
"workflowId": "workflow//workflows/retriable-and-fatal.ts//retryableAndFatalErrorWorkflow",
|
|
174
164
|
"graph": {
|
|
175
165
|
"nodes": [
|
|
176
166
|
{
|
|
177
167
|
"id": "start",
|
|
178
168
|
"type": "workflowStart",
|
|
179
169
|
"data": {
|
|
180
|
-
"label": "Start:
|
|
170
|
+
"label": "Start: retryableAndFatalErrorWorkflow",
|
|
181
171
|
"nodeKind": "workflow_start"
|
|
182
172
|
}
|
|
183
173
|
},
|
|
@@ -185,18 +175,9 @@
|
|
|
185
175
|
"id": "node_0",
|
|
186
176
|
"type": "step",
|
|
187
177
|
"data": {
|
|
188
|
-
"label": "
|
|
189
|
-
"nodeKind": "step",
|
|
190
|
-
"stepId": "step//workflows/noop.ts//noop"
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"id": "node_1",
|
|
195
|
-
"type": "step",
|
|
196
|
-
"data": {
|
|
197
|
-
"label": "noop",
|
|
178
|
+
"label": "stepThatThrowsRetryableError",
|
|
198
179
|
"nodeKind": "step",
|
|
199
|
-
"stepId": "step//workflows/
|
|
180
|
+
"stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
|
|
200
181
|
}
|
|
201
182
|
},
|
|
202
183
|
{
|
|
@@ -216,14 +197,8 @@
|
|
|
216
197
|
"type": "default"
|
|
217
198
|
},
|
|
218
199
|
{
|
|
219
|
-
"id": "
|
|
200
|
+
"id": "e_node_0_end",
|
|
220
201
|
"source": "node_0",
|
|
221
|
-
"target": "node_1",
|
|
222
|
-
"type": "default"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"id": "e_node_1_end",
|
|
226
|
-
"source": "node_1",
|
|
227
202
|
"target": "end",
|
|
228
203
|
"type": "default"
|
|
229
204
|
}
|
|
@@ -231,16 +206,16 @@
|
|
|
231
206
|
}
|
|
232
207
|
}
|
|
233
208
|
},
|
|
234
|
-
"workflows/
|
|
235
|
-
"
|
|
236
|
-
"workflowId": "workflow//workflows/
|
|
209
|
+
"workflows/hooks.ts": {
|
|
210
|
+
"collectWithHook": {
|
|
211
|
+
"workflowId": "workflow//workflows/hooks.ts//collectWithHook",
|
|
237
212
|
"graph": {
|
|
238
213
|
"nodes": [
|
|
239
214
|
{
|
|
240
215
|
"id": "start",
|
|
241
216
|
"type": "workflowStart",
|
|
242
217
|
"data": {
|
|
243
|
-
"label": "Start:
|
|
218
|
+
"label": "Start: collectWithHook",
|
|
244
219
|
"nodeKind": "workflow_start"
|
|
245
220
|
}
|
|
246
221
|
},
|
|
@@ -248,9 +223,22 @@
|
|
|
248
223
|
"id": "node_0",
|
|
249
224
|
"type": "step",
|
|
250
225
|
"data": {
|
|
251
|
-
"label": "
|
|
226
|
+
"label": "writeEvent",
|
|
252
227
|
"nodeKind": "step",
|
|
253
|
-
"stepId": "step//workflows/
|
|
228
|
+
"stepId": "step//workflows/hooks.ts//writeEvent"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "node_1",
|
|
233
|
+
"type": "step",
|
|
234
|
+
"data": {
|
|
235
|
+
"label": "writeEvent",
|
|
236
|
+
"nodeKind": "step",
|
|
237
|
+
"stepId": "step//workflows/hooks.ts//writeEvent"
|
|
238
|
+
},
|
|
239
|
+
"metadata": {
|
|
240
|
+
"loopId": "loop_0",
|
|
241
|
+
"loopIsAwait": true
|
|
254
242
|
}
|
|
255
243
|
},
|
|
256
244
|
{
|
|
@@ -270,8 +258,20 @@
|
|
|
270
258
|
"type": "default"
|
|
271
259
|
},
|
|
272
260
|
{
|
|
273
|
-
"id": "
|
|
261
|
+
"id": "e_node_1_back_node_1",
|
|
262
|
+
"source": "node_1",
|
|
263
|
+
"target": "node_1",
|
|
264
|
+
"type": "loop"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "e_node_0_node_1",
|
|
274
268
|
"source": "node_0",
|
|
269
|
+
"target": "node_1",
|
|
270
|
+
"type": "default"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"id": "e_node_1_end",
|
|
274
|
+
"source": "node_1",
|
|
275
275
|
"target": "end",
|
|
276
276
|
"type": "default"
|
|
277
277
|
}
|
|
@@ -279,16 +279,16 @@
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
|
-
"workflows/
|
|
283
|
-
"
|
|
284
|
-
"workflowId": "workflow//workflows/
|
|
282
|
+
"workflows/addition.ts": {
|
|
283
|
+
"addition": {
|
|
284
|
+
"workflowId": "workflow//workflows/addition.ts//addition",
|
|
285
285
|
"graph": {
|
|
286
286
|
"nodes": [
|
|
287
287
|
{
|
|
288
288
|
"id": "start",
|
|
289
289
|
"type": "workflowStart",
|
|
290
290
|
"data": {
|
|
291
|
-
"label": "Start:
|
|
291
|
+
"label": "Start: addition",
|
|
292
292
|
"nodeKind": "workflow_start"
|
|
293
293
|
}
|
|
294
294
|
},
|
|
@@ -296,9 +296,9 @@
|
|
|
296
296
|
"id": "node_0",
|
|
297
297
|
"type": "step",
|
|
298
298
|
"data": {
|
|
299
|
-
"label": "
|
|
299
|
+
"label": "add",
|
|
300
300
|
"nodeKind": "step",
|
|
301
|
-
"stepId": "step//workflows/
|
|
301
|
+
"stepId": "step//workflows/addition.ts//add"
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// biome-ignore-all lint: generated file
|
|
3
2
|
/* eslint-disable */
|
|
3
|
+
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -33,6 +33,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
33
33
|
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
34
34
|
var require_ms = __commonJS({
|
|
35
35
|
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
|
|
36
|
+
"use strict";
|
|
36
37
|
var s = 1e3;
|
|
37
38
|
var m = s * 60;
|
|
38
39
|
var h = m * 60;
|
|
@@ -2030,6 +2031,7 @@ var require_lib = __commonJS({
|
|
|
2030
2031
|
// ../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/core/symbols.js
|
|
2031
2032
|
var require_symbols = __commonJS({
|
|
2032
2033
|
"../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/core/symbols.js"(exports2, module2) {
|
|
2034
|
+
"use strict";
|
|
2033
2035
|
module2.exports = {
|
|
2034
2036
|
kClose: Symbol("close"),
|
|
2035
2037
|
kDestroy: Symbol("destroy"),
|
|
@@ -10016,6 +10018,7 @@ var require_fixed_queue = __commonJS({
|
|
|
10016
10018
|
// ../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/dispatcher/pool-stats.js
|
|
10017
10019
|
var require_pool_stats = __commonJS({
|
|
10018
10020
|
"../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/dispatcher/pool-stats.js"(exports2, module2) {
|
|
10021
|
+
"use strict";
|
|
10019
10022
|
var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols();
|
|
10020
10023
|
var kPool = Symbol("pool");
|
|
10021
10024
|
var PoolStats = class {
|
|
@@ -11614,6 +11617,7 @@ var require_readable = __commonJS({
|
|
|
11614
11617
|
// ../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/api/util.js
|
|
11615
11618
|
var require_util3 = __commonJS({
|
|
11616
11619
|
"../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/api/util.js"(exports2, module2) {
|
|
11620
|
+
"use strict";
|
|
11617
11621
|
var assert2 = require("node:assert");
|
|
11618
11622
|
var { ResponseStatusCodeError } = require_errors();
|
|
11619
11623
|
var { chunksDecode } = require_readable();
|
|
@@ -11881,6 +11885,7 @@ var require_api_request = __commonJS({
|
|
|
11881
11885
|
// ../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/api/abort-signal.js
|
|
11882
11886
|
var require_abort_signal = __commonJS({
|
|
11883
11887
|
"../../node_modules/.pnpm/undici@6.22.0/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) {
|
|
11888
|
+
"use strict";
|
|
11884
11889
|
var { addAbortListener } = require_util();
|
|
11885
11890
|
var { RequestAbortedError } = require_errors();
|
|
11886
11891
|
var kListener = Symbol("kListener");
|
|
@@ -23039,6 +23044,7 @@ var require_src = __commonJS({
|
|
|
23039
23044
|
// ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js
|
|
23040
23045
|
var require_common = __commonJS({
|
|
23041
23046
|
"../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js"(exports2, module2) {
|
|
23047
|
+
"use strict";
|
|
23042
23048
|
function setup(env) {
|
|
23043
23049
|
createDebug.debug = createDebug;
|
|
23044
23050
|
createDebug.default = createDebug;
|
|
@@ -23230,6 +23236,7 @@ var require_common = __commonJS({
|
|
|
23230
23236
|
// ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js
|
|
23231
23237
|
var require_browser = __commonJS({
|
|
23232
23238
|
"../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
23239
|
+
"use strict";
|
|
23233
23240
|
exports2.formatArgs = formatArgs;
|
|
23234
23241
|
exports2.save = save;
|
|
23235
23242
|
exports2.load = load;
|
|
@@ -23551,6 +23558,7 @@ var require_supports_color = __commonJS({
|
|
|
23551
23558
|
// ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js
|
|
23552
23559
|
var require_node2 = __commonJS({
|
|
23553
23560
|
"../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js"(exports2, module2) {
|
|
23561
|
+
"use strict";
|
|
23554
23562
|
var tty = require("tty");
|
|
23555
23563
|
var util = require("util");
|
|
23556
23564
|
exports2.init = init;
|
|
@@ -23741,6 +23749,7 @@ var require_node2 = __commonJS({
|
|
|
23741
23749
|
// ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js
|
|
23742
23750
|
var require_src2 = __commonJS({
|
|
23743
23751
|
"../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js"(exports2, module2) {
|
|
23752
|
+
"use strict";
|
|
23744
23753
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
23745
23754
|
module2.exports = require_browser();
|
|
23746
23755
|
}
|
|
@@ -23752,6 +23761,7 @@ var require_src2 = __commonJS({
|
|
|
23752
23761
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js
|
|
23753
23762
|
var require_alea = __commonJS({
|
|
23754
23763
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js"(exports2, module2) {
|
|
23764
|
+
"use strict";
|
|
23755
23765
|
(function (global2, module1, define1) {
|
|
23756
23766
|
function Alea(seed) {
|
|
23757
23767
|
var me = this, mash = Mash();
|
|
@@ -23845,6 +23855,7 @@ var require_alea = __commonJS({
|
|
|
23845
23855
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js
|
|
23846
23856
|
var require_xor128 = __commonJS({
|
|
23847
23857
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js"(exports2, module2) {
|
|
23858
|
+
"use strict";
|
|
23848
23859
|
(function (global2, module1, define1) {
|
|
23849
23860
|
function XorGen(seed) {
|
|
23850
23861
|
var me = this, strseed = "";
|
|
@@ -23920,6 +23931,7 @@ var require_xor128 = __commonJS({
|
|
|
23920
23931
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js
|
|
23921
23932
|
var require_xorwow = __commonJS({
|
|
23922
23933
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js"(exports2, module2) {
|
|
23934
|
+
"use strict";
|
|
23923
23935
|
(function (global2, module1, define1) {
|
|
23924
23936
|
function XorGen(seed) {
|
|
23925
23937
|
var me = this, strseed = "";
|
|
@@ -24002,6 +24014,7 @@ var require_xorwow = __commonJS({
|
|
|
24002
24014
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js
|
|
24003
24015
|
var require_xorshift7 = __commonJS({
|
|
24004
24016
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js"(exports2, module2) {
|
|
24017
|
+
"use strict";
|
|
24005
24018
|
(function (global2, module1, define1) {
|
|
24006
24019
|
function XorGen(seed) {
|
|
24007
24020
|
var me = this;
|
|
@@ -24101,6 +24114,7 @@ var require_xorshift7 = __commonJS({
|
|
|
24101
24114
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js
|
|
24102
24115
|
var require_xor4096 = __commonJS({
|
|
24103
24116
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js"(exports2, module2) {
|
|
24117
|
+
"use strict";
|
|
24104
24118
|
(function (global2, module1, define1) {
|
|
24105
24119
|
function XorGen(seed) {
|
|
24106
24120
|
var me = this;
|
|
@@ -24215,6 +24229,7 @@ var require_xor4096 = __commonJS({
|
|
|
24215
24229
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js
|
|
24216
24230
|
var require_tychei = __commonJS({
|
|
24217
24231
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js"(exports2, module2) {
|
|
24232
|
+
"use strict";
|
|
24218
24233
|
(function (global2, module1, define1) {
|
|
24219
24234
|
function XorGen(seed) {
|
|
24220
24235
|
var me = this, strseed = "";
|
|
@@ -24296,6 +24311,7 @@ var require_tychei = __commonJS({
|
|
|
24296
24311
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js
|
|
24297
24312
|
var require_seedrandom = __commonJS({
|
|
24298
24313
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js"(exports2, module2) {
|
|
24314
|
+
"use strict";
|
|
24299
24315
|
(function (global2, pool, math) {
|
|
24300
24316
|
var width = 256, chunks = 6, digits = 52, rngname = "random", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;
|
|
24301
24317
|
function seedrandom2(seed, options, callback) {
|
|
@@ -24460,6 +24476,7 @@ var require_seedrandom = __commonJS({
|
|
|
24460
24476
|
// ../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js
|
|
24461
24477
|
var require_seedrandom2 = __commonJS({
|
|
24462
24478
|
"../../node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js"(exports2, module2) {
|
|
24479
|
+
"use strict";
|
|
24463
24480
|
var alea = require_alea();
|
|
24464
24481
|
var xor128 = require_xor128();
|
|
24465
24482
|
var xorwow = require_xorwow();
|
|
@@ -24511,6 +24528,22 @@ __name(__builtin_response_text, "__builtin_response_text");
|
|
|
24511
24528
|
registerStepFunction("__builtin_response_array_buffer", __builtin_response_array_buffer);
|
|
24512
24529
|
registerStepFunction("__builtin_response_json", __builtin_response_json);
|
|
24513
24530
|
registerStepFunction("__builtin_response_text", __builtin_response_text);
|
|
24531
|
+
// workflows/addition.ts
|
|
24532
|
+
async function add(num, num2) {
|
|
24533
|
+
return num + num2;
|
|
24534
|
+
}
|
|
24535
|
+
__name(add, "add");
|
|
24536
|
+
async function addition(num, num2) {
|
|
24537
|
+
throw new Error("You attempted to execute workflow addition function directly. To start a workflow, use start(addition) from workflow/api");
|
|
24538
|
+
}
|
|
24539
|
+
__name(addition, "addition");
|
|
24540
|
+
addition.workflowId = "workflow//workflows/addition.ts//addition";
|
|
24541
|
+
registerStepFunction("step//workflows/addition.ts//add", add);
|
|
24542
|
+
// ../utils/dist/pluralize.js
|
|
24543
|
+
function pluralize(singular, plural, count2) {
|
|
24544
|
+
return count2 === 1 ? singular : plural;
|
|
24545
|
+
}
|
|
24546
|
+
__name(pluralize, "pluralize");
|
|
24514
24547
|
// ../utils/dist/promise.js
|
|
24515
24548
|
function once(fn) {
|
|
24516
24549
|
const result = {
|
|
@@ -42530,7 +42563,7 @@ __name(createLocalWorld, "createLocalWorld");
|
|
|
42530
42563
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
42531
42564
|
var import_oidc2 = __toESM(require_dist(), 1);
|
|
42532
42565
|
// ../world-vercel/dist/version.js
|
|
42533
|
-
var version2 = "4.0.1-beta.
|
|
42566
|
+
var version2 = "4.0.1-beta.25";
|
|
42534
42567
|
// ../world-vercel/dist/utils.js
|
|
42535
42568
|
var DEFAULT_RESOLVE_DATA_OPTION2 = "all";
|
|
42536
42569
|
function dateToStringReplacer(_key, value) {
|
|
@@ -43949,16 +43982,16 @@ var WorkflowSuspension = class _WorkflowSuspension extends Error {
|
|
|
43949
43982
|
}
|
|
43950
43983
|
const parts = [];
|
|
43951
43984
|
if (stepCount > 0) {
|
|
43952
|
-
parts.push(`${stepCount} ${
|
|
43985
|
+
parts.push(`${stepCount} ${pluralize("step", "steps", stepCount)}`);
|
|
43953
43986
|
}
|
|
43954
43987
|
if (hookCount > 0) {
|
|
43955
|
-
parts.push(`${hookCount} ${
|
|
43988
|
+
parts.push(`${hookCount} ${pluralize("hook", "hooks", hookCount)}`);
|
|
43956
43989
|
}
|
|
43957
43990
|
if (waitCount > 0) {
|
|
43958
|
-
parts.push(`${waitCount} ${
|
|
43991
|
+
parts.push(`${waitCount} ${pluralize("wait", "waits", waitCount)}`);
|
|
43959
43992
|
}
|
|
43960
43993
|
const totalCount = stepCount + hookCount + waitCount;
|
|
43961
|
-
const hasOrHave =
|
|
43994
|
+
const hasOrHave = pluralize("has", "have", totalCount);
|
|
43962
43995
|
let action;
|
|
43963
43996
|
if (stepCount > 0) {
|
|
43964
43997
|
action = "run";
|
|
@@ -44260,17 +44293,6 @@ async function writeEvent(writable, event, payload) {
|
|
|
44260
44293
|
}
|
|
44261
44294
|
__name(writeEvent, "writeEvent");
|
|
44262
44295
|
registerStepFunction("step//workflows/hooks.ts//writeEvent", writeEvent);
|
|
44263
|
-
// workflows/addition.ts
|
|
44264
|
-
async function add(num, num2) {
|
|
44265
|
-
return num + num2;
|
|
44266
|
-
}
|
|
44267
|
-
__name(add, "add");
|
|
44268
|
-
async function addition(num, num2) {
|
|
44269
|
-
throw new Error("You attempted to execute workflow addition function directly. To start a workflow, use start(addition) from workflow/api");
|
|
44270
|
-
}
|
|
44271
|
-
__name(addition, "addition");
|
|
44272
|
-
addition.workflowId = "workflow//workflows/addition.ts//addition";
|
|
44273
|
-
registerStepFunction("step//workflows/addition.ts//add", add);
|
|
44274
44296
|
// workflows/null-byte.ts
|
|
44275
44297
|
async function nullByteStep() {
|
|
44276
44298
|
return "null byte \0";
|
|
@@ -44282,6 +44304,19 @@ async function nullByteWorkflow() {
|
|
|
44282
44304
|
__name(nullByteWorkflow, "nullByteWorkflow");
|
|
44283
44305
|
nullByteWorkflow.workflowId = "workflow//workflows/null-byte.ts//nullByteWorkflow";
|
|
44284
44306
|
registerStepFunction("step//workflows/null-byte.ts//nullByteStep", nullByteStep);
|
|
44307
|
+
// workflows/noop.ts
|
|
44308
|
+
var count = 0;
|
|
44309
|
+
async function noop(_i) {
|
|
44310
|
+
count++;
|
|
44311
|
+
return count;
|
|
44312
|
+
}
|
|
44313
|
+
__name(noop, "noop");
|
|
44314
|
+
async function brokenWf() {
|
|
44315
|
+
throw new Error("You attempted to execute workflow brokenWf function directly. To start a workflow, use start(brokenWf) from workflow/api");
|
|
44316
|
+
}
|
|
44317
|
+
__name(brokenWf, "brokenWf");
|
|
44318
|
+
brokenWf.workflowId = "workflow//workflows/noop.ts//brokenWf";
|
|
44319
|
+
registerStepFunction("step//workflows/noop.ts//noop", noop);
|
|
44285
44320
|
// workflows/retriable-and-fatal.ts
|
|
44286
44321
|
async function retryableAndFatalErrorWorkflow() {
|
|
44287
44322
|
throw new Error("You attempted to execute workflow retryableAndFatalErrorWorkflow function directly. To start a workflow, use start(retryableAndFatalErrorWorkflow) from workflow/api");
|
|
@@ -44309,19 +44344,6 @@ async function stepThatFails() {
|
|
|
44309
44344
|
__name(stepThatFails, "stepThatFails");
|
|
44310
44345
|
registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError", stepThatThrowsRetryableError);
|
|
44311
44346
|
registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatFails", stepThatFails);
|
|
44312
|
-
// workflows/noop.ts
|
|
44313
|
-
var count = 0;
|
|
44314
|
-
async function noop(_i) {
|
|
44315
|
-
count++;
|
|
44316
|
-
return count;
|
|
44317
|
-
}
|
|
44318
|
-
__name(noop, "noop");
|
|
44319
|
-
async function brokenWf() {
|
|
44320
|
-
throw new Error("You attempted to execute workflow brokenWf function directly. To start a workflow, use start(brokenWf) from workflow/api");
|
|
44321
|
-
}
|
|
44322
|
-
__name(brokenWf, "brokenWf");
|
|
44323
|
-
brokenWf.workflowId = "workflow//workflows/noop.ts//brokenWf";
|
|
44324
|
-
registerStepFunction("step//workflows/noop.ts//noop", noop);
|
|
44325
44347
|
// ../core/dist/logger.js
|
|
44326
44348
|
var import_debug = __toESM(require_src2(), 1);
|
|
44327
44349
|
function createLogger(namespace) {
|
|
@@ -44512,8 +44534,9 @@ var stepHandler = getWorldHandlers().createQueueHandler("__wkf_step_", async (me
|
|
|
44512
44534
|
}
|
|
44513
44535
|
let result;
|
|
44514
44536
|
const attempt = step.attempt + 1;
|
|
44515
|
-
if (attempt > maxRetries) {
|
|
44516
|
-
const
|
|
44537
|
+
if (attempt > maxRetries + 1) {
|
|
44538
|
+
const retryCount = attempt - 1;
|
|
44539
|
+
const errorMessage = `Step "${stepName}" exceeded max retries (${retryCount} ${pluralize("retry", "retries", retryCount)})`;
|
|
44517
44540
|
console.error(`[Workflows] "${workflowRunId}" - ${errorMessage}`);
|
|
44518
44541
|
await world.steps.update(workflowRunId, stepId, {
|
|
44519
44542
|
status: "failed",
|
|
@@ -44665,15 +44688,16 @@ Bubbling up error to parent workflow`);
|
|
|
44665
44688
|
...StepAttempt(attempt),
|
|
44666
44689
|
...StepMaxRetries(maxRetries2)
|
|
44667
44690
|
});
|
|
44668
|
-
if (attempt
|
|
44691
|
+
if (attempt >= maxRetries2 + 1) {
|
|
44669
44692
|
const errorStack = getErrorStack(err);
|
|
44670
44693
|
const stackLines = errorStack.split("\n").slice(0, 4);
|
|
44671
|
-
|
|
44694
|
+
const retryCount = attempt - 1;
|
|
44695
|
+
console.error(`[Workflows] "${workflowRunId}" - Encountered \`Error\` while executing step "${stepName}" (attempt ${attempt}, ${retryCount} ${pluralize("retry", "retries", retryCount)}):
|
|
44672
44696
|
> ${stackLines.join("\n > ")}
|
|
44673
44697
|
|
|
44674
44698
|
Max retries reached
|
|
44675
44699
|
Bubbling error to parent workflow`);
|
|
44676
|
-
const errorMessage = `Step "${stepName}" failed after
|
|
44700
|
+
const errorMessage = `Step "${stepName}" failed after ${maxRetries2} ${pluralize("retry", "retries", maxRetries2)}: ${String(err)}`;
|
|
44677
44701
|
await world.events.create(workflowRunId, {
|
|
44678
44702
|
eventType: "step_failed",
|
|
44679
44703
|
correlationId: stepId,
|
|
@@ -44747,12 +44771,4 @@ var stepEntrypoint = /* @__PURE__ */ withHealthCheck(stepHandler);
|
|
|
44747
44771
|
0 && (module.exports = {
|
|
44748
44772
|
POST
|
|
44749
44773
|
});
|
|
44750
|
-
/*! Bundled license information:
|
|
44751
|
-
|
|
44752
|
-
undici/lib/web/fetch/body.js:
|
|
44753
|
-
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
44754
|
-
|
|
44755
|
-
undici/lib/web/websocket/frame.js:
|
|
44756
|
-
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
44757
|
-
*/
|
|
44758
44774
|
//# sourceMappingURL=step.js.map
|