@workflow/world-testing 4.0.1-beta.41 → 4.0.1-beta.43

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.
@@ -1,16 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
3
  "steps": {
4
- "workflows/addition.ts": {
5
- "add": {
6
- "stepId": "step//workflows/addition.ts//add"
7
- }
8
- },
9
- "workflows/hooks.ts": {
10
- "writeEvent": {
11
- "stepId": "step//workflows/hooks.ts//writeEvent"
12
- }
13
- },
14
4
  "workflow/dist/internal/builtins.js": {
15
5
  "__builtin_response_array_buffer": {
16
6
  "stepId": "__builtin_response_array_buffer"
@@ -22,9 +12,9 @@
22
12
  "stepId": "__builtin_response_text"
23
13
  }
24
14
  },
25
- "workflow/dist/stdlib.js": {
26
- "fetch": {
27
- "stepId": "step//workflow/dist/stdlib.js//fetch"
15
+ "workflows/addition.ts": {
16
+ "add": {
17
+ "stepId": "step//workflows/addition.ts//add"
28
18
  }
29
19
  },
30
20
  "workflows/null-byte.ts": {
@@ -32,11 +22,6 @@
32
22
  "stepId": "step//workflows/null-byte.ts//nullByteStep"
33
23
  }
34
24
  },
35
- "workflows/noop.ts": {
36
- "noop": {
37
- "stepId": "step//workflows/noop.ts//noop"
38
- }
39
- },
40
25
  "workflows/retriable-and-fatal.ts": {
41
26
  "stepThatFails": {
42
27
  "stepId": "step//workflows/retriable-and-fatal.ts//stepThatFails"
@@ -44,6 +29,21 @@
44
29
  "stepThatThrowsRetryableError": {
45
30
  "stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
46
31
  }
32
+ },
33
+ "workflows/hooks.ts": {
34
+ "writeEvent": {
35
+ "stepId": "step//workflows/hooks.ts//writeEvent"
36
+ }
37
+ },
38
+ "workflows/noop.ts": {
39
+ "noop": {
40
+ "stepId": "step//workflows/noop.ts//noop"
41
+ }
42
+ },
43
+ "workflow/dist/stdlib.js": {
44
+ "fetch": {
45
+ "stepId": "step//workflow/dist/stdlib.js//fetch"
46
+ }
47
47
  }
48
48
  },
49
49
  "workflows": {
@@ -95,16 +95,16 @@
95
95
  }
96
96
  }
97
97
  },
98
- "workflows/hooks.ts": {
99
- "collectWithHook": {
100
- "workflowId": "workflow//workflows/hooks.ts//collectWithHook",
98
+ "workflows/null-byte.ts": {
99
+ "nullByteWorkflow": {
100
+ "workflowId": "workflow//workflows/null-byte.ts//nullByteWorkflow",
101
101
  "graph": {
102
102
  "nodes": [
103
103
  {
104
104
  "id": "start",
105
105
  "type": "workflowStart",
106
106
  "data": {
107
- "label": "Start: collectWithHook",
107
+ "label": "Start: nullByteWorkflow",
108
108
  "nodeKind": "workflow_start"
109
109
  }
110
110
  },
@@ -112,22 +112,9 @@
112
112
  "id": "node_0",
113
113
  "type": "step",
114
114
  "data": {
115
- "label": "writeEvent",
116
- "nodeKind": "step",
117
- "stepId": "step//workflows/hooks.ts//writeEvent"
118
- }
119
- },
120
- {
121
- "id": "node_1",
122
- "type": "step",
123
- "data": {
124
- "label": "writeEvent",
115
+ "label": "nullByteStep",
125
116
  "nodeKind": "step",
126
- "stepId": "step//workflows/hooks.ts//writeEvent"
127
- },
128
- "metadata": {
129
- "loopId": "loop_0",
130
- "loopIsAwait": true
117
+ "stepId": "step//workflows/null-byte.ts//nullByteStep"
131
118
  }
132
119
  },
133
120
  {
@@ -147,20 +134,8 @@
147
134
  "type": "default"
148
135
  },
149
136
  {
150
- "id": "e_node_1_back_node_1",
151
- "source": "node_1",
152
- "target": "node_1",
153
- "type": "loop"
154
- },
155
- {
156
- "id": "e_node_0_node_1",
137
+ "id": "e_node_0_end",
157
138
  "source": "node_0",
158
- "target": "node_1",
159
- "type": "default"
160
- },
161
- {
162
- "id": "e_node_1_end",
163
- "source": "node_1",
164
139
  "target": "end",
165
140
  "type": "default"
166
141
  }
@@ -168,16 +143,16 @@
168
143
  }
169
144
  }
170
145
  },
171
- "workflows/null-byte.ts": {
172
- "nullByteWorkflow": {
173
- "workflowId": "workflow//workflows/null-byte.ts//nullByteWorkflow",
146
+ "workflows/retriable-and-fatal.ts": {
147
+ "retryableAndFatalErrorWorkflow": {
148
+ "workflowId": "workflow//workflows/retriable-and-fatal.ts//retryableAndFatalErrorWorkflow",
174
149
  "graph": {
175
150
  "nodes": [
176
151
  {
177
152
  "id": "start",
178
153
  "type": "workflowStart",
179
154
  "data": {
180
- "label": "Start: nullByteWorkflow",
155
+ "label": "Start: retryableAndFatalErrorWorkflow",
181
156
  "nodeKind": "workflow_start"
182
157
  }
183
158
  },
@@ -185,9 +160,9 @@
185
160
  "id": "node_0",
186
161
  "type": "step",
187
162
  "data": {
188
- "label": "nullByteStep",
163
+ "label": "stepThatThrowsRetryableError",
189
164
  "nodeKind": "step",
190
- "stepId": "step//workflows/null-byte.ts//nullByteStep"
165
+ "stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
191
166
  }
192
167
  },
193
168
  {
@@ -216,16 +191,16 @@
216
191
  }
217
192
  }
218
193
  },
219
- "workflows/noop.ts": {
220
- "brokenWf": {
221
- "workflowId": "workflow//workflows/noop.ts//brokenWf",
194
+ "workflows/hooks.ts": {
195
+ "collectWithHook": {
196
+ "workflowId": "workflow//workflows/hooks.ts//collectWithHook",
222
197
  "graph": {
223
198
  "nodes": [
224
199
  {
225
200
  "id": "start",
226
201
  "type": "workflowStart",
227
202
  "data": {
228
- "label": "Start: brokenWf",
203
+ "label": "Start: collectWithHook",
229
204
  "nodeKind": "workflow_start"
230
205
  }
231
206
  },
@@ -233,18 +208,22 @@
233
208
  "id": "node_0",
234
209
  "type": "step",
235
210
  "data": {
236
- "label": "noop",
211
+ "label": "writeEvent",
237
212
  "nodeKind": "step",
238
- "stepId": "step//workflows/noop.ts//noop"
213
+ "stepId": "step//workflows/hooks.ts//writeEvent"
239
214
  }
240
215
  },
241
216
  {
242
217
  "id": "node_1",
243
218
  "type": "step",
244
219
  "data": {
245
- "label": "noop",
220
+ "label": "writeEvent",
246
221
  "nodeKind": "step",
247
- "stepId": "step//workflows/noop.ts//noop"
222
+ "stepId": "step//workflows/hooks.ts//writeEvent"
223
+ },
224
+ "metadata": {
225
+ "loopId": "loop_0",
226
+ "loopIsAwait": true
248
227
  }
249
228
  },
250
229
  {
@@ -263,6 +242,12 @@
263
242
  "target": "node_0",
264
243
  "type": "default"
265
244
  },
245
+ {
246
+ "id": "e_node_1_back_node_1",
247
+ "source": "node_1",
248
+ "target": "node_1",
249
+ "type": "loop"
250
+ },
266
251
  {
267
252
  "id": "e_node_0_node_1",
268
253
  "source": "node_0",
@@ -279,16 +264,16 @@
279
264
  }
280
265
  }
281
266
  },
282
- "workflows/retriable-and-fatal.ts": {
283
- "retryableAndFatalErrorWorkflow": {
284
- "workflowId": "workflow//workflows/retriable-and-fatal.ts//retryableAndFatalErrorWorkflow",
267
+ "workflows/noop.ts": {
268
+ "brokenWf": {
269
+ "workflowId": "workflow//workflows/noop.ts//brokenWf",
285
270
  "graph": {
286
271
  "nodes": [
287
272
  {
288
273
  "id": "start",
289
274
  "type": "workflowStart",
290
275
  "data": {
291
- "label": "Start: retryableAndFatalErrorWorkflow",
276
+ "label": "Start: brokenWf",
292
277
  "nodeKind": "workflow_start"
293
278
  }
294
279
  },
@@ -296,9 +281,18 @@
296
281
  "id": "node_0",
297
282
  "type": "step",
298
283
  "data": {
299
- "label": "stepThatThrowsRetryableError",
284
+ "label": "noop",
300
285
  "nodeKind": "step",
301
- "stepId": "step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError"
286
+ "stepId": "step//workflows/noop.ts//noop"
287
+ }
288
+ },
289
+ {
290
+ "id": "node_1",
291
+ "type": "step",
292
+ "data": {
293
+ "label": "noop",
294
+ "nodeKind": "step",
295
+ "stepId": "step//workflows/noop.ts//noop"
302
296
  }
303
297
  },
304
298
  {
@@ -318,8 +312,14 @@
318
312
  "type": "default"
319
313
  },
320
314
  {
321
- "id": "e_node_0_end",
315
+ "id": "e_node_0_node_1",
322
316
  "source": "node_0",
317
+ "target": "node_1",
318
+ "type": "default"
319
+ },
320
+ {
321
+ "id": "e_node_1_end",
322
+ "source": "node_1",
323
323
  "target": "end",
324
324
  "type": "default"
325
325
  }
@@ -24528,6 +24528,17 @@ __name(__builtin_response_text, "__builtin_response_text");
24528
24528
  registerStepFunction("__builtin_response_array_buffer", __builtin_response_array_buffer);
24529
24529
  registerStepFunction("__builtin_response_json", __builtin_response_json);
24530
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);
24531
24542
  // ../utils/dist/pluralize.js
24532
24543
  function pluralize(singular, plural, count2) {
24533
24544
  return count2 === 1 ? singular : plural;
@@ -44282,17 +44293,6 @@ async function writeEvent(writable, event, payload) {
44282
44293
  }
44283
44294
  __name(writeEvent, "writeEvent");
44284
44295
  registerStepFunction("step//workflows/hooks.ts//writeEvent", writeEvent);
44285
- // workflows/null-byte.ts
44286
- async function nullByteStep() {
44287
- return "null byte \0";
44288
- }
44289
- __name(nullByteStep, "nullByteStep");
44290
- async function nullByteWorkflow() {
44291
- throw new Error("You attempted to execute workflow nullByteWorkflow function directly. To start a workflow, use start(nullByteWorkflow) from workflow/api");
44292
- }
44293
- __name(nullByteWorkflow, "nullByteWorkflow");
44294
- nullByteWorkflow.workflowId = "workflow//workflows/null-byte.ts//nullByteWorkflow";
44295
- registerStepFunction("step//workflows/null-byte.ts//nullByteStep", nullByteStep);
44296
44296
  // workflows/noop.ts
44297
44297
  var count = 0;
44298
44298
  async function noop(_i) {
@@ -44306,6 +44306,17 @@ async function brokenWf() {
44306
44306
  __name(brokenWf, "brokenWf");
44307
44307
  brokenWf.workflowId = "workflow//workflows/noop.ts//brokenWf";
44308
44308
  registerStepFunction("step//workflows/noop.ts//noop", noop);
44309
+ // workflows/null-byte.ts
44310
+ async function nullByteStep() {
44311
+ return "null byte \0";
44312
+ }
44313
+ __name(nullByteStep, "nullByteStep");
44314
+ async function nullByteWorkflow() {
44315
+ throw new Error("You attempted to execute workflow nullByteWorkflow function directly. To start a workflow, use start(nullByteWorkflow) from workflow/api");
44316
+ }
44317
+ __name(nullByteWorkflow, "nullByteWorkflow");
44318
+ nullByteWorkflow.workflowId = "workflow//workflows/null-byte.ts//nullByteWorkflow";
44319
+ registerStepFunction("step//workflows/null-byte.ts//nullByteStep", nullByteStep);
44309
44320
  // workflows/retriable-and-fatal.ts
44310
44321
  async function retryableAndFatalErrorWorkflow() {
44311
44322
  throw new Error("You attempted to execute workflow retryableAndFatalErrorWorkflow function directly. To start a workflow, use start(retryableAndFatalErrorWorkflow) from workflow/api");
@@ -44333,17 +44344,6 @@ async function stepThatFails() {
44333
44344
  __name(stepThatFails, "stepThatFails");
44334
44345
  registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatThrowsRetryableError", stepThatThrowsRetryableError);
44335
44346
  registerStepFunction("step//workflows/retriable-and-fatal.ts//stepThatFails", stepThatFails);
44336
- // workflows/addition.ts
44337
- async function add(num, num2) {
44338
- return num + num2;
44339
- }
44340
- __name(add, "add");
44341
- async function addition(num, num2) {
44342
- throw new Error("You attempted to execute workflow addition function directly. To start a workflow, use start(addition) from workflow/api");
44343
- }
44344
- __name(addition, "addition");
44345
- addition.workflowId = "workflow//workflows/addition.ts//addition";
44346
- registerStepFunction("step//workflows/addition.ts//add", add);
44347
44347
  // ../core/dist/logger.js
44348
44348
  var import_debug = __toESM(require_src2(), 1);
44349
44349
  function createLogger(namespace) {
@@ -44550,6 +44550,7 @@ var stepHandler = getWorldHandlers().createQueueHandler("__wkf_step_", async (me
44550
44550
  correlationId: stepId,
44551
44551
  eventData: {
44552
44552
  error: errorMessage,
44553
+ stack: step.error?.stack,
44553
44554
  fatal: true
44554
44555
  }
44555
44556
  });