@workflow/world-testing 5.0.0-beta.21 → 5.0.0-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.
|
@@ -16000,6 +16000,7 @@ var init_events2 = __esm({
|
|
|
16000
16000
|
runId: external_exports2.string(),
|
|
16001
16001
|
eventId: external_exports2.string(),
|
|
16002
16002
|
createdAt: external_exports2.coerce.date(),
|
|
16003
|
+
occurredAt: external_exports2.coerce.date().optional(),
|
|
16003
16004
|
specVersion: external_exports2.number().optional()
|
|
16004
16005
|
}));
|
|
16005
16006
|
}
|
|
@@ -19192,7 +19193,7 @@ var version4;
|
|
|
19192
19193
|
var init_version3 = __esm({
|
|
19193
19194
|
"../core/dist/version.js"() {
|
|
19194
19195
|
"use strict";
|
|
19195
|
-
version4 = "5.0.0-beta.
|
|
19196
|
+
version4 = "5.0.0-beta.22";
|
|
19196
19197
|
}
|
|
19197
19198
|
});
|
|
19198
19199
|
|
|
@@ -25338,14 +25339,6 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
25338
25339
|
}
|
|
25339
25340
|
__name(connect2, "connect");
|
|
25340
25341
|
async function reconnect() {
|
|
25341
|
-
reconnectCount++;
|
|
25342
|
-
totalReconnectCount++;
|
|
25343
|
-
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS2) {
|
|
25344
|
-
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS2})`);
|
|
25345
|
-
}
|
|
25346
|
-
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS2) {
|
|
25347
|
-
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS2})`);
|
|
25348
|
-
}
|
|
25349
25342
|
if (reader) {
|
|
25350
25343
|
await reader.cancel().catch(() => {
|
|
25351
25344
|
});
|
|
@@ -25354,7 +25347,21 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
25354
25347
|
currentStartIndex += consumedFrames;
|
|
25355
25348
|
consumedFrames = 0;
|
|
25356
25349
|
buffer3 = new Uint8Array(0);
|
|
25357
|
-
|
|
25350
|
+
for (; ; ) {
|
|
25351
|
+
reconnectCount++;
|
|
25352
|
+
totalReconnectCount++;
|
|
25353
|
+
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS2) {
|
|
25354
|
+
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS2})`);
|
|
25355
|
+
}
|
|
25356
|
+
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS2) {
|
|
25357
|
+
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS2})`);
|
|
25358
|
+
}
|
|
25359
|
+
try {
|
|
25360
|
+
await connect2();
|
|
25361
|
+
return;
|
|
25362
|
+
} catch {
|
|
25363
|
+
}
|
|
25364
|
+
}
|
|
25358
25365
|
}
|
|
25359
25366
|
__name(reconnect, "reconnect");
|
|
25360
25367
|
return new ReadableStream({
|
|
@@ -72128,6 +72135,7 @@ var init_events = __esm2({
|
|
|
72128
72135
|
runId: external_exports.string(),
|
|
72129
72136
|
eventId: external_exports.string(),
|
|
72130
72137
|
createdAt: external_exports.coerce.date(),
|
|
72138
|
+
occurredAt: external_exports.coerce.date().optional(),
|
|
72131
72139
|
specVersion: external_exports.number().optional()
|
|
72132
72140
|
}));
|
|
72133
72141
|
}
|
|
@@ -79548,7 +79556,7 @@ var version2;
|
|
|
79548
79556
|
var init_version = __esm2({
|
|
79549
79557
|
"../core/dist/version.js"() {
|
|
79550
79558
|
"use strict";
|
|
79551
|
-
version2 = "5.0.0-beta.
|
|
79559
|
+
version2 = "5.0.0-beta.22";
|
|
79552
79560
|
}
|
|
79553
79561
|
});
|
|
79554
79562
|
function getWorkflowQueueName(workflowName, namespace) {
|
|
@@ -81293,14 +81301,6 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
81293
81301
|
__name(connect2, "connect");
|
|
81294
81302
|
__name2(connect2, "connect");
|
|
81295
81303
|
async function reconnect() {
|
|
81296
|
-
reconnectCount++;
|
|
81297
|
-
totalReconnectCount++;
|
|
81298
|
-
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS) {
|
|
81299
|
-
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS})`);
|
|
81300
|
-
}
|
|
81301
|
-
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS) {
|
|
81302
|
-
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS})`);
|
|
81303
|
-
}
|
|
81304
81304
|
if (reader) {
|
|
81305
81305
|
await reader.cancel().catch(() => {
|
|
81306
81306
|
});
|
|
@@ -81309,7 +81309,21 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
81309
81309
|
currentStartIndex += consumedFrames;
|
|
81310
81310
|
consumedFrames = 0;
|
|
81311
81311
|
buffer22 = new Uint8Array(0);
|
|
81312
|
-
|
|
81312
|
+
for (; ; ) {
|
|
81313
|
+
reconnectCount++;
|
|
81314
|
+
totalReconnectCount++;
|
|
81315
|
+
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS) {
|
|
81316
|
+
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS})`);
|
|
81317
|
+
}
|
|
81318
|
+
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS) {
|
|
81319
|
+
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS})`);
|
|
81320
|
+
}
|
|
81321
|
+
try {
|
|
81322
|
+
await connect2();
|
|
81323
|
+
return;
|
|
81324
|
+
} catch {
|
|
81325
|
+
}
|
|
81326
|
+
}
|
|
81313
81327
|
}
|
|
81314
81328
|
__name(reconnect, "reconnect");
|
|
81315
81329
|
__name2(reconnect, "reconnect");
|
|
@@ -82779,7 +82793,7 @@ __name2(start, "start");
|
|
|
82779
82793
|
value: "start",
|
|
82780
82794
|
configurable: true
|
|
82781
82795
|
});
|
|
82782
|
-
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.
|
|
82796
|
+
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.22//start");
|
|
82783
82797
|
function isRetryableStartError(err) {
|
|
82784
82798
|
if (ThrottleError.is(err)) return true;
|
|
82785
82799
|
if (WorkflowWorldError.is(err) && err.status && err.status >= 500) return true;
|
|
@@ -83113,7 +83127,7 @@ var Run = class _Run {
|
|
|
83113
83127
|
value: "wakeUp",
|
|
83114
83128
|
configurable: true
|
|
83115
83129
|
});
|
|
83116
|
-
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83130
|
+
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#wakeUp");
|
|
83117
83131
|
(function(__wf_fn, __wf_id) {
|
|
83118
83132
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83119
83133
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83122,7 +83136,7 @@ var Run = class _Run {
|
|
|
83122
83136
|
value: "cancel",
|
|
83123
83137
|
configurable: true
|
|
83124
83138
|
});
|
|
83125
|
-
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83139
|
+
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#cancel");
|
|
83126
83140
|
(function(__wf_fn, __wf_id) {
|
|
83127
83141
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83128
83142
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83131,7 +83145,7 @@ var Run = class _Run {
|
|
|
83131
83145
|
value: "getReadable",
|
|
83132
83146
|
configurable: true
|
|
83133
83147
|
});
|
|
83134
|
-
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83148
|
+
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#getReadable");
|
|
83135
83149
|
(function(__wf_fn, __wf_id) {
|
|
83136
83150
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83137
83151
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83140,7 +83154,7 @@ var Run = class _Run {
|
|
|
83140
83154
|
value: "exists",
|
|
83141
83155
|
configurable: true
|
|
83142
83156
|
});
|
|
83143
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83157
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#exists");
|
|
83144
83158
|
(function(__wf_fn, __wf_id) {
|
|
83145
83159
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83146
83160
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83149,7 +83163,7 @@ var Run = class _Run {
|
|
|
83149
83163
|
value: "status",
|
|
83150
83164
|
configurable: true
|
|
83151
83165
|
});
|
|
83152
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83166
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#status");
|
|
83153
83167
|
(function(__wf_fn, __wf_id) {
|
|
83154
83168
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83155
83169
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83158,7 +83172,7 @@ var Run = class _Run {
|
|
|
83158
83172
|
value: "returnValue",
|
|
83159
83173
|
configurable: true
|
|
83160
83174
|
});
|
|
83161
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83175
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#returnValue");
|
|
83162
83176
|
(function(__wf_fn, __wf_id) {
|
|
83163
83177
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83164
83178
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83167,7 +83181,7 @@ var Run = class _Run {
|
|
|
83167
83181
|
value: "workflowName",
|
|
83168
83182
|
configurable: true
|
|
83169
83183
|
});
|
|
83170
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83184
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#workflowName");
|
|
83171
83185
|
(function(__wf_fn, __wf_id) {
|
|
83172
83186
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83173
83187
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83176,7 +83190,7 @@ var Run = class _Run {
|
|
|
83176
83190
|
value: "createdAt",
|
|
83177
83191
|
configurable: true
|
|
83178
83192
|
});
|
|
83179
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83193
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#createdAt");
|
|
83180
83194
|
(function(__wf_fn, __wf_id) {
|
|
83181
83195
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83182
83196
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83185,7 +83199,7 @@ var Run = class _Run {
|
|
|
83185
83199
|
value: "startedAt",
|
|
83186
83200
|
configurable: true
|
|
83187
83201
|
});
|
|
83188
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83202
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#startedAt");
|
|
83189
83203
|
(function(__wf_fn, __wf_id) {
|
|
83190
83204
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83191
83205
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -83194,7 +83208,7 @@ var Run = class _Run {
|
|
|
83194
83208
|
value: "completedAt",
|
|
83195
83209
|
configurable: true
|
|
83196
83210
|
});
|
|
83197
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83211
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#completedAt");
|
|
83198
83212
|
(function(__wf_cls, __wf_id) {
|
|
83199
83213
|
var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
83200
83214
|
__wf_reg.set(__wf_id, __wf_cls);
|
|
@@ -83204,7 +83218,7 @@ var Run = class _Run {
|
|
|
83204
83218
|
enumerable: false,
|
|
83205
83219
|
configurable: false
|
|
83206
83220
|
});
|
|
83207
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
83221
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.22//Run");
|
|
83208
83222
|
async function fetch2(...args) {
|
|
83209
83223
|
return globalThis.fetch(...args);
|
|
83210
83224
|
}
|
|
@@ -94287,7 +94301,7 @@ import os from "node:os";
|
|
|
94287
94301
|
import { inspect } from "node:util";
|
|
94288
94302
|
|
|
94289
94303
|
// ../world-vercel/dist/version.js
|
|
94290
|
-
var version5 = "5.0.0-beta.
|
|
94304
|
+
var version5 = "5.0.0-beta.20";
|
|
94291
94305
|
|
|
94292
94306
|
// ../world-vercel/dist/utils.js
|
|
94293
94307
|
var HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
@@ -94933,6 +94947,8 @@ function buildPostFrameMeta(input) {
|
|
|
94933
94947
|
meta5.correlationId = input.correlationId;
|
|
94934
94948
|
if (input.vercelId !== void 0)
|
|
94935
94949
|
meta5.vercelId = input.vercelId;
|
|
94950
|
+
if (input.occurredAt !== void 0)
|
|
94951
|
+
meta5.occurredAt = input.occurredAt;
|
|
94936
94952
|
if (input.remoteRefBehavior !== void 0) {
|
|
94937
94953
|
meta5.remoteRefBehavior = input.remoteRefBehavior;
|
|
94938
94954
|
}
|
|
@@ -94970,6 +94986,8 @@ function buildPostFrameMeta(input) {
|
|
|
94970
94986
|
}
|
|
94971
94987
|
if (input.sinceCursor !== void 0)
|
|
94972
94988
|
meta5.sinceCursor = input.sinceCursor;
|
|
94989
|
+
if (input.skipPreload !== void 0)
|
|
94990
|
+
meta5.skipPreload = input.skipPreload;
|
|
94973
94991
|
return meta5;
|
|
94974
94992
|
}
|
|
94975
94993
|
__name(buildPostFrameMeta, "buildPostFrameMeta");
|
|
@@ -95500,6 +95518,9 @@ function buildEventFromV4(decoded, payloadBody, resolveData) {
|
|
|
95500
95518
|
runId: decoded.runId,
|
|
95501
95519
|
eventType: decoded.eventType,
|
|
95502
95520
|
createdAt: decoded.createdAt instanceof Date ? decoded.createdAt : new Date(decoded.createdAt),
|
|
95521
|
+
...decoded.occurredAt !== void 0 ? {
|
|
95522
|
+
occurredAt: decoded.occurredAt instanceof Date ? decoded.occurredAt : new Date(decoded.occurredAt)
|
|
95523
|
+
} : {},
|
|
95503
95524
|
...decoded.correlationId ? { correlationId: decoded.correlationId } : {},
|
|
95504
95525
|
eventData,
|
|
95505
95526
|
...decoded.specVersion !== void 0 ? { specVersion: decoded.specVersion } : {}
|
|
@@ -95585,6 +95606,7 @@ async function createWorkflowRunEventInner(id, data, params, config4) {
|
|
|
95585
95606
|
specVersion: data.specVersion ?? 2,
|
|
95586
95607
|
...data.correlationId ? { correlationId: data.correlationId } : {},
|
|
95587
95608
|
...params?.requestId ? { vercelId: params.requestId } : {},
|
|
95609
|
+
occurredAt: params?.occurredAt ?? /* @__PURE__ */ new Date(),
|
|
95588
95610
|
// Opt-in inline-delta: forward the cursor the runtime held before
|
|
95589
95611
|
// this write so the server can return the authoritative event-log
|
|
95590
95612
|
// delta on the response (events/cursor/hasMore), letting the inline
|
|
@@ -95592,6 +95614,11 @@ async function createWorkflowRunEventInner(id, data, params, config4) {
|
|
|
95592
95614
|
// step_completed/step_failed; older servers ignore it and the runtime
|
|
95593
95615
|
// falls back to events.list.
|
|
95594
95616
|
...params?.sinceCursor ? { sinceCursor: params.sinceCursor } : {},
|
|
95617
|
+
// Run-started preload opt-out: turbo backgrounds run_started as a write
|
|
95618
|
+
// barrier only and never reads the preloaded log, so tell the server to
|
|
95619
|
+
// skip the list+resolve. The server only acts on it for run_started;
|
|
95620
|
+
// older servers ignore it and simply preload as before.
|
|
95621
|
+
...params?.skipPreload ? { skipPreload: true } : {},
|
|
95595
95622
|
remoteRefBehavior,
|
|
95596
95623
|
payload,
|
|
95597
95624
|
...meta5
|
|
@@ -95731,6 +95758,10 @@ function getStreamUrl(name, runId, httpConfig) {
|
|
|
95731
95758
|
return new URL(`${httpConfig.baseUrl}/v2/runs/${encodeURIComponent(runId)}/stream/${encodeURIComponent(name)}`);
|
|
95732
95759
|
}
|
|
95733
95760
|
__name(getStreamUrl, "getStreamUrl");
|
|
95761
|
+
function getStreamReadUrl(name, runId, httpConfig) {
|
|
95762
|
+
return new URL(`${httpConfig.baseUrl}/v3/runs/${encodeURIComponent(runId)}/stream/${encodeURIComponent(name)}`);
|
|
95763
|
+
}
|
|
95764
|
+
__name(getStreamReadUrl, "getStreamReadUrl");
|
|
95734
95765
|
function createStreamRequestError(operation, url3, response, text) {
|
|
95735
95766
|
const context2 = [`PUT ${url3.origin}${url3.pathname}`];
|
|
95736
95767
|
for (const header of ["x-vercel-id", "x-vercel-error"]) {
|
|
@@ -95830,7 +95861,7 @@ function createStreamer2(config4) {
|
|
|
95830
95861
|
},
|
|
95831
95862
|
async get(runId, name, startIndex) {
|
|
95832
95863
|
const httpConfig = await getHttpConfig(config4);
|
|
95833
|
-
const url3 =
|
|
95864
|
+
const url3 = getStreamReadUrl(name, runId, httpConfig);
|
|
95834
95865
|
if (typeof startIndex === "number") {
|
|
95835
95866
|
url3.searchParams.set("startIndex", String(startIndex));
|
|
95836
95867
|
}
|
|
@@ -100109,7 +100140,18 @@ function workflowEntrypoint(workflowCode2, options) {
|
|
|
100109
100140
|
} : {}
|
|
100110
100141
|
};
|
|
100111
100142
|
if (turbo && runInput) {
|
|
100112
|
-
const startedPromise = world.events.create(
|
|
100143
|
+
const startedPromise = world.events.create(
|
|
100144
|
+
runId,
|
|
100145
|
+
runStartedEvent,
|
|
100146
|
+
// We background this purely as a write barrier and
|
|
100147
|
+
// never read its preloaded events (preloadedEvents is
|
|
100148
|
+
// forced to [] below), so tell the World to skip the
|
|
100149
|
+
// run_started event-log preload. That trims the
|
|
100150
|
+
// run_started request the chained first step_started
|
|
100151
|
+
// waits on — shortening time-to-second-step — and the
|
|
100152
|
+
// wasted list+resolve it would otherwise compute.
|
|
100153
|
+
{ requestId, skipPreload: true }
|
|
100154
|
+
);
|
|
100113
100155
|
runReadyBarrier = startedPromise;
|
|
100114
100156
|
startedPromise.catch(() => {
|
|
100115
100157
|
});
|
|
@@ -116602,6 +116644,7 @@ var EventSchema = AllEventsSchema.and(external_exports.object({
|
|
|
116602
116644
|
runId: external_exports.string(),
|
|
116603
116645
|
eventId: external_exports.string(),
|
|
116604
116646
|
createdAt: external_exports.coerce.date(),
|
|
116647
|
+
occurredAt: external_exports.coerce.date().optional(),
|
|
116605
116648
|
specVersion: external_exports.number().optional()
|
|
116606
116649
|
}));
|
|
116607
116650
|
|
|
@@ -116964,10 +117007,10 @@ var Run = class _Run {
|
|
|
116964
117007
|
return this.getReadable();
|
|
116965
117008
|
}
|
|
116966
117009
|
};
|
|
116967
|
-
Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
116968
|
-
Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
116969
|
-
Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
116970
|
-
var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117010
|
+
Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#wakeUp");
|
|
117011
|
+
Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#cancel");
|
|
117012
|
+
Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#getReadable");
|
|
117013
|
+
var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#exists");
|
|
116971
117014
|
Object.defineProperty(Run.prototype, "exists", {
|
|
116972
117015
|
get() {
|
|
116973
117016
|
return __step_Run$exists.call(this);
|
|
@@ -116975,7 +117018,7 @@ Object.defineProperty(Run.prototype, "exists", {
|
|
|
116975
117018
|
configurable: true,
|
|
116976
117019
|
enumerable: false
|
|
116977
117020
|
});
|
|
116978
|
-
var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117021
|
+
var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#status");
|
|
116979
117022
|
Object.defineProperty(Run.prototype, "status", {
|
|
116980
117023
|
get() {
|
|
116981
117024
|
return __step_Run$status.call(this);
|
|
@@ -116983,7 +117026,7 @@ Object.defineProperty(Run.prototype, "status", {
|
|
|
116983
117026
|
configurable: true,
|
|
116984
117027
|
enumerable: false
|
|
116985
117028
|
});
|
|
116986
|
-
var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117029
|
+
var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#returnValue");
|
|
116987
117030
|
Object.defineProperty(Run.prototype, "returnValue", {
|
|
116988
117031
|
get() {
|
|
116989
117032
|
return __step_Run$returnValue.call(this);
|
|
@@ -116991,7 +117034,7 @@ Object.defineProperty(Run.prototype, "returnValue", {
|
|
|
116991
117034
|
configurable: true,
|
|
116992
117035
|
enumerable: false
|
|
116993
117036
|
});
|
|
116994
|
-
var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117037
|
+
var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#workflowName");
|
|
116995
117038
|
Object.defineProperty(Run.prototype, "workflowName", {
|
|
116996
117039
|
get() {
|
|
116997
117040
|
return __step_Run$workflowName.call(this);
|
|
@@ -116999,7 +117042,7 @@ Object.defineProperty(Run.prototype, "workflowName", {
|
|
|
116999
117042
|
configurable: true,
|
|
117000
117043
|
enumerable: false
|
|
117001
117044
|
});
|
|
117002
|
-
var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117045
|
+
var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#createdAt");
|
|
117003
117046
|
Object.defineProperty(Run.prototype, "createdAt", {
|
|
117004
117047
|
get() {
|
|
117005
117048
|
return __step_Run$createdAt.call(this);
|
|
@@ -117007,7 +117050,7 @@ Object.defineProperty(Run.prototype, "createdAt", {
|
|
|
117007
117050
|
configurable: true,
|
|
117008
117051
|
enumerable: false
|
|
117009
117052
|
});
|
|
117010
|
-
var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117053
|
+
var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#startedAt");
|
|
117011
117054
|
Object.defineProperty(Run.prototype, "startedAt", {
|
|
117012
117055
|
get() {
|
|
117013
117056
|
return __step_Run$startedAt.call(this);
|
|
@@ -117015,7 +117058,7 @@ Object.defineProperty(Run.prototype, "startedAt", {
|
|
|
117015
117058
|
configurable: true,
|
|
117016
117059
|
enumerable: false
|
|
117017
117060
|
});
|
|
117018
|
-
var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
117061
|
+
var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.22//Run#completedAt");
|
|
117019
117062
|
Object.defineProperty(Run.prototype, "completedAt", {
|
|
117020
117063
|
get() {
|
|
117021
117064
|
return __step_Run$completedAt.call(this);
|
|
@@ -117032,7 +117075,7 @@ Object.defineProperty(Run.prototype, "completedAt", {
|
|
|
117032
117075
|
enumerable: false,
|
|
117033
117076
|
configurable: false
|
|
117034
117077
|
});
|
|
117035
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
117078
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.22//Run");
|
|
117036
117079
|
|
|
117037
117080
|
// ../core/dist/workflow/create-hook.js
|
|
117038
117081
|
aliasSerializationClass(RUN_CLASS_ID, Run);
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"steps": {
|
|
4
|
-
"workflows/
|
|
5
|
-
"
|
|
6
|
-
"stepId": "step//./workflows/
|
|
4
|
+
"workflows/retriable-and-fatal.ts": {
|
|
5
|
+
"stepThatFails": {
|
|
6
|
+
"stepId": "step//./workflows/retriable-and-fatal//stepThatFails"
|
|
7
|
+
},
|
|
8
|
+
"stepThatThrowsRetryableError": {
|
|
9
|
+
"stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"workflows/hooks.ts": {
|
|
13
|
+
"writeEvent": {
|
|
14
|
+
"stepId": "step//./workflows/hooks//writeEvent"
|
|
7
15
|
}
|
|
8
16
|
},
|
|
9
17
|
"workflows/null-byte.ts": {
|
|
@@ -11,9 +19,25 @@
|
|
|
11
19
|
"stepId": "step//./workflows/null-byte//nullByteStep"
|
|
12
20
|
}
|
|
13
21
|
},
|
|
14
|
-
"workflows/
|
|
22
|
+
"workflows/inline-execution.ts": {
|
|
15
23
|
"add": {
|
|
16
|
-
"stepId": "step//./workflows/
|
|
24
|
+
"stepId": "step//./workflows/inline-execution//add"
|
|
25
|
+
},
|
|
26
|
+
"closeOutputStream": {
|
|
27
|
+
"stepId": "step//./workflows/inline-execution//closeOutputStream"
|
|
28
|
+
},
|
|
29
|
+
"writeToStream": {
|
|
30
|
+
"stepId": "step//./workflows/inline-execution//writeToStream"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"workflows/noop.ts": {
|
|
34
|
+
"noop": {
|
|
35
|
+
"stepId": "step//./workflows/noop//noop"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"workflow/dist/stdlib.js": {
|
|
39
|
+
"fetch": {
|
|
40
|
+
"stepId": "step//./workflow/dist/stdlib//fetch"
|
|
17
41
|
}
|
|
18
42
|
},
|
|
19
43
|
"workflow/dist/internal/builtins.js": {
|
|
@@ -30,84 +54,60 @@
|
|
|
30
54
|
"stepId": "__builtin_set_attributes"
|
|
31
55
|
}
|
|
32
56
|
},
|
|
33
|
-
"workflows/
|
|
34
|
-
"stepThatFails": {
|
|
35
|
-
"stepId": "step//./workflows/retriable-and-fatal//stepThatFails"
|
|
36
|
-
},
|
|
37
|
-
"stepThatThrowsRetryableError": {
|
|
38
|
-
"stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"workflows/inline-execution.ts": {
|
|
57
|
+
"workflows/addition.ts": {
|
|
42
58
|
"add": {
|
|
43
|
-
"stepId": "step//./workflows/
|
|
44
|
-
},
|
|
45
|
-
"closeOutputStream": {
|
|
46
|
-
"stepId": "step//./workflows/inline-execution//closeOutputStream"
|
|
47
|
-
},
|
|
48
|
-
"writeToStream": {
|
|
49
|
-
"stepId": "step//./workflows/inline-execution//writeToStream"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"workflow/dist/stdlib.js": {
|
|
53
|
-
"fetch": {
|
|
54
|
-
"stepId": "step//./workflow/dist/stdlib//fetch"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"workflows/hooks.ts": {
|
|
58
|
-
"writeEvent": {
|
|
59
|
-
"stepId": "step//./workflows/hooks//writeEvent"
|
|
59
|
+
"stepId": "step//./workflows/addition//add"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"core/dist/runtime/start.js": {
|
|
63
63
|
"start": {
|
|
64
|
-
"stepId": "step//@workflow/core/runtime/start@5.0.0-beta.
|
|
64
|
+
"stepId": "step//@workflow/core/runtime/start@5.0.0-beta.22//start"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"core/dist/runtime/run.js": {
|
|
68
68
|
"Run#cancel": {
|
|
69
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
69
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#cancel"
|
|
70
70
|
},
|
|
71
71
|
"Run#completedAt": {
|
|
72
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
72
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#completedAt"
|
|
73
73
|
},
|
|
74
74
|
"Run#createdAt": {
|
|
75
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
75
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#createdAt"
|
|
76
76
|
},
|
|
77
77
|
"Run#exists": {
|
|
78
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
78
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#exists"
|
|
79
79
|
},
|
|
80
80
|
"Run#getReadable": {
|
|
81
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
81
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#getReadable"
|
|
82
82
|
},
|
|
83
83
|
"Run#returnValue": {
|
|
84
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
84
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#returnValue"
|
|
85
85
|
},
|
|
86
86
|
"Run#startedAt": {
|
|
87
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
87
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#startedAt"
|
|
88
88
|
},
|
|
89
89
|
"Run#status": {
|
|
90
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
90
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#status"
|
|
91
91
|
},
|
|
92
92
|
"Run#wakeUp": {
|
|
93
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#wakeUp"
|
|
94
94
|
},
|
|
95
95
|
"Run#workflowName": {
|
|
96
|
-
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
96
|
+
"stepId": "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#workflowName"
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"workflows": {
|
|
101
|
-
"workflows/
|
|
102
|
-
"
|
|
103
|
-
"workflowId": "workflow//./workflows/
|
|
101
|
+
"workflows/retriable-and-fatal.ts": {
|
|
102
|
+
"retryableAndFatalErrorWorkflow": {
|
|
103
|
+
"workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
|
|
104
104
|
"graph": {
|
|
105
105
|
"nodes": [
|
|
106
106
|
{
|
|
107
107
|
"id": "start",
|
|
108
108
|
"type": "workflowStart",
|
|
109
109
|
"data": {
|
|
110
|
-
"label": "Start:
|
|
110
|
+
"label": "Start: retryableAndFatalErrorWorkflow",
|
|
111
111
|
"nodeKind": "workflow_start"
|
|
112
112
|
}
|
|
113
113
|
},
|
|
@@ -131,16 +131,16 @@
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
|
-
"workflows/
|
|
135
|
-
"
|
|
136
|
-
"workflowId": "workflow//./workflows/
|
|
134
|
+
"workflows/hooks.ts": {
|
|
135
|
+
"collectWithHook": {
|
|
136
|
+
"workflowId": "workflow//./workflows/hooks//collectWithHook",
|
|
137
137
|
"graph": {
|
|
138
138
|
"nodes": [
|
|
139
139
|
{
|
|
140
140
|
"id": "start",
|
|
141
141
|
"type": "workflowStart",
|
|
142
142
|
"data": {
|
|
143
|
-
"label": "Start:
|
|
143
|
+
"label": "Start: collectWithHook",
|
|
144
144
|
"nodeKind": "workflow_start"
|
|
145
145
|
}
|
|
146
146
|
},
|
|
@@ -164,16 +164,16 @@
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
"workflows/
|
|
168
|
-
"
|
|
169
|
-
"workflowId": "workflow//./workflows/
|
|
167
|
+
"workflows/null-byte.ts": {
|
|
168
|
+
"nullByteWorkflow": {
|
|
169
|
+
"workflowId": "workflow//./workflows/null-byte//nullByteWorkflow",
|
|
170
170
|
"graph": {
|
|
171
171
|
"nodes": [
|
|
172
172
|
{
|
|
173
173
|
"id": "start",
|
|
174
174
|
"type": "workflowStart",
|
|
175
175
|
"data": {
|
|
176
|
-
"label": "Start:
|
|
176
|
+
"label": "Start: nullByteWorkflow",
|
|
177
177
|
"nodeKind": "workflow_start"
|
|
178
178
|
}
|
|
179
179
|
},
|
|
@@ -195,16 +195,18 @@
|
|
|
195
195
|
}
|
|
196
196
|
]
|
|
197
197
|
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"workflows/inline-execution.ts": {
|
|
201
|
+
"hookWorkflow": {
|
|
202
|
+
"workflowId": "workflow//./workflows/inline-execution//hookWorkflow",
|
|
201
203
|
"graph": {
|
|
202
204
|
"nodes": [
|
|
203
205
|
{
|
|
204
206
|
"id": "start",
|
|
205
207
|
"type": "workflowStart",
|
|
206
208
|
"data": {
|
|
207
|
-
"label": "Start:
|
|
209
|
+
"label": "Start: hookWorkflow",
|
|
208
210
|
"nodeKind": "workflow_start"
|
|
209
211
|
}
|
|
210
212
|
},
|
|
@@ -226,18 +228,16 @@
|
|
|
226
228
|
}
|
|
227
229
|
]
|
|
228
230
|
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"retryableAndFatalErrorWorkflow": {
|
|
233
|
-
"workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
|
|
231
|
+
},
|
|
232
|
+
"parallelStepsWorkflow": {
|
|
233
|
+
"workflowId": "workflow//./workflows/inline-execution//parallelStepsWorkflow",
|
|
234
234
|
"graph": {
|
|
235
235
|
"nodes": [
|
|
236
236
|
{
|
|
237
237
|
"id": "start",
|
|
238
238
|
"type": "workflowStart",
|
|
239
239
|
"data": {
|
|
240
|
-
"label": "Start:
|
|
240
|
+
"label": "Start: parallelStepsWorkflow",
|
|
241
241
|
"nodeKind": "workflow_start"
|
|
242
242
|
}
|
|
243
243
|
},
|
|
@@ -259,18 +259,16 @@
|
|
|
259
259
|
}
|
|
260
260
|
]
|
|
261
261
|
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
"hookWorkflow": {
|
|
266
|
-
"workflowId": "workflow//./workflows/inline-execution//hookWorkflow",
|
|
262
|
+
},
|
|
263
|
+
"sequentialStepsWithStreamWorkflow": {
|
|
264
|
+
"workflowId": "workflow//./workflows/inline-execution//sequentialStepsWithStreamWorkflow",
|
|
267
265
|
"graph": {
|
|
268
266
|
"nodes": [
|
|
269
267
|
{
|
|
270
268
|
"id": "start",
|
|
271
269
|
"type": "workflowStart",
|
|
272
270
|
"data": {
|
|
273
|
-
"label": "Start:
|
|
271
|
+
"label": "Start: sequentialStepsWithStreamWorkflow",
|
|
274
272
|
"nodeKind": "workflow_start"
|
|
275
273
|
}
|
|
276
274
|
},
|
|
@@ -293,15 +291,15 @@
|
|
|
293
291
|
]
|
|
294
292
|
}
|
|
295
293
|
},
|
|
296
|
-
"
|
|
297
|
-
"workflowId": "workflow//./workflows/inline-execution//
|
|
294
|
+
"sequentialStepsWorkflow": {
|
|
295
|
+
"workflowId": "workflow//./workflows/inline-execution//sequentialStepsWorkflow",
|
|
298
296
|
"graph": {
|
|
299
297
|
"nodes": [
|
|
300
298
|
{
|
|
301
299
|
"id": "start",
|
|
302
300
|
"type": "workflowStart",
|
|
303
301
|
"data": {
|
|
304
|
-
"label": "Start:
|
|
302
|
+
"label": "Start: sequentialStepsWorkflow",
|
|
305
303
|
"nodeKind": "workflow_start"
|
|
306
304
|
}
|
|
307
305
|
},
|
|
@@ -324,18 +322,26 @@
|
|
|
324
322
|
]
|
|
325
323
|
}
|
|
326
324
|
},
|
|
327
|
-
"
|
|
328
|
-
"workflowId": "workflow//./workflows/inline-execution//
|
|
325
|
+
"sleepWorkflow": {
|
|
326
|
+
"workflowId": "workflow//./workflows/inline-execution//sleepWorkflow",
|
|
329
327
|
"graph": {
|
|
330
328
|
"nodes": [
|
|
331
329
|
{
|
|
332
330
|
"id": "start",
|
|
333
331
|
"type": "workflowStart",
|
|
334
332
|
"data": {
|
|
335
|
-
"label": "Start:
|
|
333
|
+
"label": "Start: sleepWorkflow",
|
|
336
334
|
"nodeKind": "workflow_start"
|
|
337
335
|
}
|
|
338
336
|
},
|
|
337
|
+
{
|
|
338
|
+
"id": "node_0",
|
|
339
|
+
"type": "primitive",
|
|
340
|
+
"data": {
|
|
341
|
+
"label": "sleep",
|
|
342
|
+
"nodeKind": "primitive"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
339
345
|
{
|
|
340
346
|
"id": "end",
|
|
341
347
|
"type": "workflowEnd",
|
|
@@ -347,23 +353,29 @@
|
|
|
347
353
|
],
|
|
348
354
|
"edges": [
|
|
349
355
|
{
|
|
350
|
-
"id": "
|
|
356
|
+
"id": "e_start_node_0",
|
|
351
357
|
"source": "start",
|
|
358
|
+
"target": "node_0",
|
|
359
|
+
"type": "default"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"id": "e_node_0_end",
|
|
363
|
+
"source": "node_0",
|
|
352
364
|
"target": "end",
|
|
353
365
|
"type": "default"
|
|
354
366
|
}
|
|
355
367
|
]
|
|
356
368
|
}
|
|
357
369
|
},
|
|
358
|
-
"
|
|
359
|
-
"workflowId": "workflow//./workflows/inline-execution//
|
|
370
|
+
"threeBatchesOfFiveWorkflow": {
|
|
371
|
+
"workflowId": "workflow//./workflows/inline-execution//threeBatchesOfFiveWorkflow",
|
|
360
372
|
"graph": {
|
|
361
373
|
"nodes": [
|
|
362
374
|
{
|
|
363
375
|
"id": "start",
|
|
364
376
|
"type": "workflowStart",
|
|
365
377
|
"data": {
|
|
366
|
-
"label": "Start:
|
|
378
|
+
"label": "Start: threeBatchesOfFiveWorkflow",
|
|
367
379
|
"nodeKind": "workflow_start"
|
|
368
380
|
}
|
|
369
381
|
},
|
|
@@ -385,27 +397,21 @@
|
|
|
385
397
|
}
|
|
386
398
|
]
|
|
387
399
|
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"workflows/noop.ts": {
|
|
403
|
+
"brokenWf": {
|
|
404
|
+
"workflowId": "workflow//./workflows/noop//brokenWf",
|
|
391
405
|
"graph": {
|
|
392
406
|
"nodes": [
|
|
393
407
|
{
|
|
394
408
|
"id": "start",
|
|
395
409
|
"type": "workflowStart",
|
|
396
410
|
"data": {
|
|
397
|
-
"label": "Start:
|
|
411
|
+
"label": "Start: brokenWf",
|
|
398
412
|
"nodeKind": "workflow_start"
|
|
399
413
|
}
|
|
400
414
|
},
|
|
401
|
-
{
|
|
402
|
-
"id": "node_0",
|
|
403
|
-
"type": "primitive",
|
|
404
|
-
"data": {
|
|
405
|
-
"label": "sleep",
|
|
406
|
-
"nodeKind": "primitive"
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
415
|
{
|
|
410
416
|
"id": "end",
|
|
411
417
|
"type": "workflowEnd",
|
|
@@ -417,29 +423,25 @@
|
|
|
417
423
|
],
|
|
418
424
|
"edges": [
|
|
419
425
|
{
|
|
420
|
-
"id": "
|
|
426
|
+
"id": "e_start_end",
|
|
421
427
|
"source": "start",
|
|
422
|
-
"target": "node_0",
|
|
423
|
-
"type": "default"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"id": "e_node_0_end",
|
|
427
|
-
"source": "node_0",
|
|
428
428
|
"target": "end",
|
|
429
429
|
"type": "default"
|
|
430
430
|
}
|
|
431
431
|
]
|
|
432
432
|
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"workflows/addition.ts": {
|
|
436
|
+
"addTenWorkflow": {
|
|
437
|
+
"workflowId": "workflow//./workflows/addition//addTenWorkflow",
|
|
436
438
|
"graph": {
|
|
437
439
|
"nodes": [
|
|
438
440
|
{
|
|
439
441
|
"id": "start",
|
|
440
442
|
"type": "workflowStart",
|
|
441
443
|
"data": {
|
|
442
|
-
"label": "Start:
|
|
444
|
+
"label": "Start: addTenWorkflow",
|
|
443
445
|
"nodeKind": "workflow_start"
|
|
444
446
|
}
|
|
445
447
|
},
|
|
@@ -461,18 +463,16 @@
|
|
|
461
463
|
}
|
|
462
464
|
]
|
|
463
465
|
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
"collectWithHook": {
|
|
468
|
-
"workflowId": "workflow//./workflows/hooks//collectWithHook",
|
|
466
|
+
},
|
|
467
|
+
"addition": {
|
|
468
|
+
"workflowId": "workflow//./workflows/addition//addition",
|
|
469
469
|
"graph": {
|
|
470
470
|
"nodes": [
|
|
471
471
|
{
|
|
472
472
|
"id": "start",
|
|
473
473
|
"type": "workflowStart",
|
|
474
474
|
"data": {
|
|
475
|
-
"label": "Start:
|
|
475
|
+
"label": "Start: addition",
|
|
476
476
|
"nodeKind": "workflow_start"
|
|
477
477
|
}
|
|
478
478
|
},
|
|
@@ -500,7 +500,7 @@
|
|
|
500
500
|
"classes": {
|
|
501
501
|
"core/dist/runtime/run.js": {
|
|
502
502
|
"Run": {
|
|
503
|
-
"classId": "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
503
|
+
"classId": "class//@workflow/core/runtime/run@5.0.0-beta.22//Run"
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
}
|
|
@@ -16698,6 +16698,7 @@ var init_events = __esm({
|
|
|
16698
16698
|
runId: external_exports.string(),
|
|
16699
16699
|
eventId: external_exports.string(),
|
|
16700
16700
|
createdAt: external_exports.coerce.date(),
|
|
16701
|
+
occurredAt: external_exports.coerce.date().optional(),
|
|
16701
16702
|
specVersion: external_exports.number().optional()
|
|
16702
16703
|
}));
|
|
16703
16704
|
}
|
|
@@ -23995,7 +23996,7 @@ var version2;
|
|
|
23995
23996
|
var init_version = __esm({
|
|
23996
23997
|
"../core/dist/version.js"() {
|
|
23997
23998
|
"use strict";
|
|
23998
|
-
version2 = "5.0.0-beta.
|
|
23999
|
+
version2 = "5.0.0-beta.22";
|
|
23999
24000
|
}
|
|
24000
24001
|
});
|
|
24001
24002
|
|
|
@@ -25722,14 +25723,6 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
25722
25723
|
}
|
|
25723
25724
|
__name(connect, "connect");
|
|
25724
25725
|
async function reconnect() {
|
|
25725
|
-
reconnectCount++;
|
|
25726
|
-
totalReconnectCount++;
|
|
25727
|
-
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS) {
|
|
25728
|
-
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS})`);
|
|
25729
|
-
}
|
|
25730
|
-
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS) {
|
|
25731
|
-
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS})`);
|
|
25732
|
-
}
|
|
25733
25726
|
if (reader) {
|
|
25734
25727
|
await reader.cancel().catch(() => {
|
|
25735
25728
|
});
|
|
@@ -25738,7 +25731,21 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
25738
25731
|
currentStartIndex += consumedFrames;
|
|
25739
25732
|
consumedFrames = 0;
|
|
25740
25733
|
buffer2 = new Uint8Array(0);
|
|
25741
|
-
|
|
25734
|
+
for (; ; ) {
|
|
25735
|
+
reconnectCount++;
|
|
25736
|
+
totalReconnectCount++;
|
|
25737
|
+
if (reconnectCount > FRAMED_STREAM_MAX_RECONNECTS) {
|
|
25738
|
+
throw new Error(`Stream "${name}" exceeded maximum reconnection attempts (${FRAMED_STREAM_MAX_RECONNECTS})`);
|
|
25739
|
+
}
|
|
25740
|
+
if (totalReconnectCount > FRAMED_STREAM_MAX_TOTAL_RECONNECTS) {
|
|
25741
|
+
throw new Error(`Stream "${name}" exceeded maximum total reconnection attempts (${FRAMED_STREAM_MAX_TOTAL_RECONNECTS})`);
|
|
25742
|
+
}
|
|
25743
|
+
try {
|
|
25744
|
+
await connect();
|
|
25745
|
+
return;
|
|
25746
|
+
} catch {
|
|
25747
|
+
}
|
|
25748
|
+
}
|
|
25742
25749
|
}
|
|
25743
25750
|
__name(reconnect, "reconnect");
|
|
25744
25751
|
return new ReadableStream({
|
|
@@ -27172,7 +27179,7 @@ __name(start, "start");
|
|
|
27172
27179
|
value: "start",
|
|
27173
27180
|
configurable: true
|
|
27174
27181
|
});
|
|
27175
|
-
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.
|
|
27182
|
+
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.22//start");
|
|
27176
27183
|
function isRetryableStartError(err) {
|
|
27177
27184
|
if (ThrottleError.is(err)) return true;
|
|
27178
27185
|
if (WorkflowWorldError.is(err) && err.status && err.status >= 500) return true;
|
|
@@ -27505,7 +27512,7 @@ var Run = class _Run {
|
|
|
27505
27512
|
value: "wakeUp",
|
|
27506
27513
|
configurable: true
|
|
27507
27514
|
});
|
|
27508
|
-
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27515
|
+
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#wakeUp");
|
|
27509
27516
|
(function(__wf_fn, __wf_id) {
|
|
27510
27517
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27511
27518
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27514,7 +27521,7 @@ var Run = class _Run {
|
|
|
27514
27521
|
value: "cancel",
|
|
27515
27522
|
configurable: true
|
|
27516
27523
|
});
|
|
27517
|
-
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27524
|
+
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#cancel");
|
|
27518
27525
|
(function(__wf_fn, __wf_id) {
|
|
27519
27526
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27520
27527
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27523,7 +27530,7 @@ var Run = class _Run {
|
|
|
27523
27530
|
value: "getReadable",
|
|
27524
27531
|
configurable: true
|
|
27525
27532
|
});
|
|
27526
|
-
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27533
|
+
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#getReadable");
|
|
27527
27534
|
(function(__wf_fn, __wf_id) {
|
|
27528
27535
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27529
27536
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27532,7 +27539,7 @@ var Run = class _Run {
|
|
|
27532
27539
|
value: "exists",
|
|
27533
27540
|
configurable: true
|
|
27534
27541
|
});
|
|
27535
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27542
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#exists");
|
|
27536
27543
|
(function(__wf_fn, __wf_id) {
|
|
27537
27544
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27538
27545
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27541,7 +27548,7 @@ var Run = class _Run {
|
|
|
27541
27548
|
value: "status",
|
|
27542
27549
|
configurable: true
|
|
27543
27550
|
});
|
|
27544
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27551
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#status");
|
|
27545
27552
|
(function(__wf_fn, __wf_id) {
|
|
27546
27553
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27547
27554
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27550,7 +27557,7 @@ var Run = class _Run {
|
|
|
27550
27557
|
value: "returnValue",
|
|
27551
27558
|
configurable: true
|
|
27552
27559
|
});
|
|
27553
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27560
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#returnValue");
|
|
27554
27561
|
(function(__wf_fn, __wf_id) {
|
|
27555
27562
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27556
27563
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27559,7 +27566,7 @@ var Run = class _Run {
|
|
|
27559
27566
|
value: "workflowName",
|
|
27560
27567
|
configurable: true
|
|
27561
27568
|
});
|
|
27562
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27569
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#workflowName");
|
|
27563
27570
|
(function(__wf_fn, __wf_id) {
|
|
27564
27571
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27565
27572
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27568,7 +27575,7 @@ var Run = class _Run {
|
|
|
27568
27575
|
value: "createdAt",
|
|
27569
27576
|
configurable: true
|
|
27570
27577
|
});
|
|
27571
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27578
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#createdAt");
|
|
27572
27579
|
(function(__wf_fn, __wf_id) {
|
|
27573
27580
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27574
27581
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27577,7 +27584,7 @@ var Run = class _Run {
|
|
|
27577
27584
|
value: "startedAt",
|
|
27578
27585
|
configurable: true
|
|
27579
27586
|
});
|
|
27580
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27587
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#startedAt");
|
|
27581
27588
|
(function(__wf_fn, __wf_id) {
|
|
27582
27589
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27583
27590
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -27586,7 +27593,7 @@ var Run = class _Run {
|
|
|
27586
27593
|
value: "completedAt",
|
|
27587
27594
|
configurable: true
|
|
27588
27595
|
});
|
|
27589
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
27596
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.22//Run#completedAt");
|
|
27590
27597
|
(function(__wf_cls, __wf_id) {
|
|
27591
27598
|
var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
27592
27599
|
__wf_reg.set(__wf_id, __wf_cls);
|
|
@@ -27596,7 +27603,7 @@ var Run = class _Run {
|
|
|
27596
27603
|
enumerable: false,
|
|
27597
27604
|
configurable: false
|
|
27598
27605
|
});
|
|
27599
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
27606
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.22//Run");
|
|
27600
27607
|
|
|
27601
27608
|
// ../workflow/dist/stdlib.js
|
|
27602
27609
|
async function fetch2(...args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow/world-testing",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.22",
|
|
4
4
|
"description": "Testing utilities and World implementation for Workflow SDK",
|
|
5
5
|
"main": "dist/src/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"hono": "4.12.25",
|
|
22
22
|
"jsonlines": "0.1.1",
|
|
23
23
|
"zod": "4.3.6",
|
|
24
|
-
"@workflow/cli": "5.0.0-beta.
|
|
25
|
-
"@workflow/core": "5.0.0-beta.
|
|
26
|
-
"@workflow/world": "5.0.0-beta.
|
|
27
|
-
"workflow": "5.0.0-beta.
|
|
24
|
+
"@workflow/cli": "5.0.0-beta.22",
|
|
25
|
+
"@workflow/core": "5.0.0-beta.22",
|
|
26
|
+
"@workflow/world": "5.0.0-beta.13",
|
|
27
|
+
"workflow": "5.0.0-beta.22"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/jsonlines": "0.1.5",
|