@workflow/web 4.1.20 → 4.1.21
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/build/client/assets/{manifest-0285e96f.js → manifest-d91343fe.js} +1 -1
- package/build/client/assets/{run-detail-Cbuf5qtv.js → run-detail-1KdCfmI4.js} +1 -0
- package/build/server/assets/{app-C6I0cOSv.js → app-eQjjf4RE.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-cjj8MLkd.js → highlighted-body-B3W2YXNL-DkTToHdM.js} +2 -2
- package/build/server/assets/{index-DKbGT0YI.js → index-Ctx7nEpR.js} +3 -3
- package/build/server/assets/{mermaid-3ZIDBTTL-hoeX1Afz.js → mermaid-3ZIDBTTL-DvwsvCUy.js} +2 -2
- package/build/server/assets/{server-build-DMT2kgzu.js → server-build-BFktO0pM.js} +197 -48
- package/build/server/assets/{token-BY9pJoVX.js → token-B9AfalZB.js} +2 -2
- package/build/server/assets/{token-util-VIl8FT7v.js → token-util-u3-O6-cJ.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-C_C46bD6.js","imports":["/assets/index-BsV8i_Jn.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-BxnaECGo.js","imports":["/assets/index-BsV8i_Jn.js","/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js"],"css":["/assets/root-BOS11TzD.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-Blj6TeEE.js","imports":["/assets/index-BsV8i_Jn.js","/assets/workflow-graph-viewer-C6PWoIIU.js","/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js","/assets/index-DZSXezpI.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-C_C46bD6.js","imports":["/assets/index-BsV8i_Jn.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-BxnaECGo.js","imports":["/assets/index-BsV8i_Jn.js","/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js"],"css":["/assets/root-BOS11TzD.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-Blj6TeEE.js","imports":["/assets/index-BsV8i_Jn.js","/assets/workflow-graph-viewer-C6PWoIIU.js","/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js","/assets/index-DZSXezpI.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-1KdCfmI4.js","imports":["/assets/index-BsV8i_Jn.js","/assets/workflow-graph-viewer-C6PWoIIU.js","/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js","/assets/encryption-BRhjWsZh.js","/assets/index-DZSXezpI.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-d91343fe.js","version":"d91343fe"};
|
|
@@ -6175,6 +6175,7 @@ function useEventsListData(env, runId, options = {}) {
|
|
|
6175
6175
|
}
|
|
6176
6176
|
const { error: fetchError, result } = await unwrapServerActionResult(
|
|
6177
6177
|
fetchEventsByCorrelationId(env, id, {
|
|
6178
|
+
runId,
|
|
6178
6179
|
cursor: nextCursor,
|
|
6179
6180
|
sortOrder,
|
|
6180
6181
|
limit: 100,
|
|
@@ -9180,7 +9180,7 @@ const app = express();
|
|
|
9180
9180
|
app.all(
|
|
9181
9181
|
"/{*splat}",
|
|
9182
9182
|
createRequestHandler({
|
|
9183
|
-
build: () => import("./server-build-
|
|
9183
|
+
build: () => import("./server-build-BFktO0pM.js").then((n) => n.a6)
|
|
9184
9184
|
})
|
|
9185
9185
|
);
|
|
9186
9186
|
app.use(
|
|
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { a0 as R, a1 as Ks, a2 as jsxRuntimeExports, a3 as Qe } from "./server-build-
|
|
6
|
-
import { r as reactExports } from "./app-
|
|
5
|
+
import { a0 as R, a1 as Ks, a2 as jsxRuntimeExports, a3 as Qe } from "./server-build-BFktO0pM.js";
|
|
6
|
+
import { r as reactExports } from "./app-eQjjf4RE.js";
|
|
7
7
|
import "node:stream";
|
|
8
8
|
import "util";
|
|
9
9
|
import "crypto";
|
|
@@ -2,9 +2,9 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { H as HookSchema } from "./server-build-
|
|
6
|
-
import { B, D, a, E, b, c, d, e, L, M, f, g, P, Q, h, R, S, i, j, k, l, m, n, o, p, T, q, r, s, t, u, V, W, v, w, x, y, z, A, C, F, G, I, J, K, O, U, X, Y, Z, _, $ } from "./server-build-
|
|
7
|
-
import "./app-
|
|
5
|
+
import { H as HookSchema } from "./server-build-BFktO0pM.js";
|
|
6
|
+
import { B, D, a, E, b, c, d, e, L, M, f, g, P, Q, h, R, S, i, j, k, l, m, n, o, p, T, q, r, s, t, u, V, W, v, w, x, y, z, A, C, F, G, I, J, K, O, U, X, Y, Z, _, $ } from "./server-build-BFktO0pM.js";
|
|
7
|
+
import "./app-eQjjf4RE.js";
|
|
8
8
|
import "stream";
|
|
9
9
|
import "express";
|
|
10
10
|
import "node:stream";
|
|
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { N as Nt } from "./server-build-
|
|
6
|
-
import "./app-
|
|
5
|
+
import { N as Nt } from "./server-build-BFktO0pM.js";
|
|
6
|
+
import "./app-eQjjf4RE.js";
|
|
7
7
|
import "stream";
|
|
8
8
|
import "express";
|
|
9
9
|
import "node:stream";
|
|
@@ -18,7 +18,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
18
18
|
if (typeof globalThis.require === "undefined") {
|
|
19
19
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
20
20
|
}
|
|
21
|
-
import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-
|
|
21
|
+
import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-eQjjf4RE.js";
|
|
22
22
|
import require$$0$5, { PassThrough, Transform as Transform$1 } from "node:stream";
|
|
23
23
|
import require$$0 from "util";
|
|
24
24
|
import require$$1 from "crypto";
|
|
@@ -48889,7 +48889,8 @@ const QueuePayloadSchema = union([
|
|
|
48889
48889
|
StepInvokePayloadSchema,
|
|
48890
48890
|
HealthCheckPayloadSchema
|
|
48891
48891
|
]);
|
|
48892
|
-
async function reenqueueActiveRuns(runs, enqueue, label) {
|
|
48892
|
+
async function reenqueueActiveRuns(runs, enqueue, label, namespace2) {
|
|
48893
|
+
const workflowQueuePrefix = getQueueTopicPrefix("workflow", resolveQueueNamespace(namespace2));
|
|
48893
48894
|
let reenqueued = 0;
|
|
48894
48895
|
for (const status of ["pending", "running"]) {
|
|
48895
48896
|
let cursor;
|
|
@@ -48902,7 +48903,7 @@ async function reenqueueActiveRuns(runs, enqueue, label) {
|
|
|
48902
48903
|
});
|
|
48903
48904
|
for (const run2 of page.data) {
|
|
48904
48905
|
try {
|
|
48905
|
-
const queueName =
|
|
48906
|
+
const queueName = `${workflowQueuePrefix}${run2.workflowName}`;
|
|
48906
48907
|
await enqueue(queueName, { runId: run2.runId });
|
|
48907
48908
|
reenqueued++;
|
|
48908
48909
|
} catch (err) {
|
|
@@ -81857,7 +81858,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
81857
81858
|
var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
|
|
81858
81859
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
81859
81860
|
var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
|
|
81860
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
81861
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DkTToHdM.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
81861
81862
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
81862
81863
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
81863
81864
|
return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
|
|
@@ -82179,7 +82180,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
82179
82180
|
}, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i, children: [jsxRuntimeExports.jsx("button", { className: f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: c, onClick: () => r2(!s2), title: "Download table", type: "button", children: e != null ? e : jsxRuntimeExports.jsx(Z, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
|
|
82180
82181
|
};
|
|
82181
82182
|
var Vt = ({ children: e, className: t, showControls: o, ...n }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f("w-full divide-y divide-border", t), "data-streamdown": "table", ...n, children: e }) })] });
|
|
82182
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
82183
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DvwsvCUy.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
82183
82184
|
function ke(e, t) {
|
|
82184
82185
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
82185
82186
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -92071,7 +92072,7 @@ createLogger("build", {
|
|
|
92071
92072
|
debugNamespace: "workflow:build"
|
|
92072
92073
|
});
|
|
92073
92074
|
const MAX_QUEUE_DELIVERIES = 48;
|
|
92074
|
-
const version$1 = "4.8.
|
|
92075
|
+
const version$1 = "4.8.5";
|
|
92075
92076
|
const execFileAsync = promisify(execFile);
|
|
92076
92077
|
function parsePort$1(value, radix = 10) {
|
|
92077
92078
|
const port = parseInt(value, radix);
|
|
@@ -92320,6 +92321,18 @@ const config = once(() => {
|
|
|
92320
92321
|
const baseUrl = getBaseUrlFromEnv();
|
|
92321
92322
|
return { dataDir, baseUrl };
|
|
92322
92323
|
});
|
|
92324
|
+
function resolveRecoverActiveRuns(config2) {
|
|
92325
|
+
var _a3;
|
|
92326
|
+
if (config2.recoverActiveRuns !== void 0) {
|
|
92327
|
+
return config2.recoverActiveRuns;
|
|
92328
|
+
}
|
|
92329
|
+
const raw2 = (_a3 = process.env.WORKFLOW_LOCAL_RECOVER_ACTIVE_RUNS) == null ? void 0 : _a3.toLowerCase();
|
|
92330
|
+
if (raw2 === "0" || raw2 === "false")
|
|
92331
|
+
return false;
|
|
92332
|
+
if (raw2 === "1" || raw2 === "true")
|
|
92333
|
+
return true;
|
|
92334
|
+
return true;
|
|
92335
|
+
}
|
|
92323
92336
|
function resolveDirectBaseUrl(config2) {
|
|
92324
92337
|
return config2.baseUrl ?? process.env.WORKFLOW_LOCAL_BASE_URL ?? createWorkflowBaseUrl("http://localhost");
|
|
92325
92338
|
}
|
|
@@ -92392,8 +92405,10 @@ async function withWindowsRetry(fn2, maxRetries = 5) {
|
|
|
92392
92405
|
throw new Error("Retry loop exited unexpectedly");
|
|
92393
92406
|
}
|
|
92394
92407
|
const createdFilesCache = /* @__PURE__ */ new Set();
|
|
92408
|
+
const createdDirectoriesCache = /* @__PURE__ */ new Set();
|
|
92395
92409
|
function clearCreatedFilesCache() {
|
|
92396
92410
|
createdFilesCache.clear();
|
|
92411
|
+
createdDirectoriesCache.clear();
|
|
92397
92412
|
}
|
|
92398
92413
|
const TAG_PATTERN = /\.[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
92399
92414
|
function stripTag(fileId) {
|
|
@@ -92446,11 +92461,29 @@ async function listTaggedFilesByExtension(dirPath, tag, extension2) {
|
|
|
92446
92461
|
}
|
|
92447
92462
|
}
|
|
92448
92463
|
async function ensureDir(dirPath) {
|
|
92464
|
+
const resolvedPath = path$3.resolve(dirPath);
|
|
92465
|
+
if (createdDirectoriesCache.has(resolvedPath)) {
|
|
92466
|
+
return;
|
|
92467
|
+
}
|
|
92449
92468
|
try {
|
|
92450
|
-
await promises.mkdir(
|
|
92469
|
+
await promises.mkdir(resolvedPath, { recursive: true });
|
|
92470
|
+
createdDirectoriesCache.add(resolvedPath);
|
|
92451
92471
|
} catch (_error) {
|
|
92452
92472
|
}
|
|
92453
92473
|
}
|
|
92474
|
+
async function withEnsuredDirectory(dirPath, operation) {
|
|
92475
|
+
await ensureDir(dirPath);
|
|
92476
|
+
try {
|
|
92477
|
+
return await operation();
|
|
92478
|
+
} catch (error2) {
|
|
92479
|
+
if (error2.code !== "ENOENT") {
|
|
92480
|
+
throw error2;
|
|
92481
|
+
}
|
|
92482
|
+
createdDirectoriesCache.delete(path$3.resolve(dirPath));
|
|
92483
|
+
await ensureDir(dirPath);
|
|
92484
|
+
return operation();
|
|
92485
|
+
}
|
|
92486
|
+
}
|
|
92454
92487
|
function jsonReplacer(_key, value) {
|
|
92455
92488
|
if (value instanceof Uint8Array) {
|
|
92456
92489
|
return {
|
|
@@ -92487,10 +92520,11 @@ async function write(filePath, data, opts) {
|
|
|
92487
92520
|
const tempPath = `${filePath}.tmp.${ulid$1()}`;
|
|
92488
92521
|
let tempFileCreated = false;
|
|
92489
92522
|
try {
|
|
92490
|
-
await
|
|
92491
|
-
|
|
92492
|
-
|
|
92493
|
-
|
|
92523
|
+
await withEnsuredDirectory(path$3.dirname(filePath), async () => {
|
|
92524
|
+
await promises.writeFile(tempPath, data);
|
|
92525
|
+
tempFileCreated = true;
|
|
92526
|
+
await withWindowsRetry(() => promises.rename(tempPath, filePath));
|
|
92527
|
+
});
|
|
92494
92528
|
createdFilesCache.add(filePath);
|
|
92495
92529
|
} catch (error2) {
|
|
92496
92530
|
if (tempFileCreated) {
|
|
@@ -92533,21 +92567,22 @@ async function deleteJSON(filePath) {
|
|
|
92533
92567
|
}
|
|
92534
92568
|
}
|
|
92535
92569
|
async function writeExclusive(filePath, data) {
|
|
92536
|
-
await ensureDir(path$3.dirname(filePath));
|
|
92537
92570
|
const tempPath = `${filePath}.tmp.${ulid$1()}`;
|
|
92538
92571
|
let tempFileCreated = false;
|
|
92539
92572
|
try {
|
|
92540
|
-
await
|
|
92541
|
-
|
|
92542
|
-
|
|
92543
|
-
|
|
92544
|
-
|
|
92545
|
-
|
|
92546
|
-
|
|
92547
|
-
|
|
92573
|
+
return await withEnsuredDirectory(path$3.dirname(filePath), async () => {
|
|
92574
|
+
await promises.writeFile(tempPath, data, { flag: "wx" });
|
|
92575
|
+
tempFileCreated = true;
|
|
92576
|
+
try {
|
|
92577
|
+
await withWindowsRetry(() => promises.link(tempPath, filePath));
|
|
92578
|
+
return true;
|
|
92579
|
+
} catch (error2) {
|
|
92580
|
+
if (error2.code === "EEXIST") {
|
|
92581
|
+
return false;
|
|
92582
|
+
}
|
|
92583
|
+
throw error2;
|
|
92548
92584
|
}
|
|
92549
|
-
|
|
92550
|
-
}
|
|
92585
|
+
});
|
|
92551
92586
|
} finally {
|
|
92552
92587
|
if (tempFileCreated) {
|
|
92553
92588
|
await withWindowsRetry(() => promises.unlink(tempPath), 3).catch(() => {
|
|
@@ -92581,11 +92616,12 @@ function createCursor(timestamp, id2) {
|
|
|
92581
92616
|
return id2 ? `${timestamp.toISOString()}|${id2}` : timestamp.toISOString();
|
|
92582
92617
|
}
|
|
92583
92618
|
async function paginatedFileSystemQuery(config2) {
|
|
92584
|
-
const { directory, schema, filePrefix, fileIdFilter, filter: filter2, sortOrder = "desc", limit = 20, cursor, getCreatedAt, getId } = config2;
|
|
92619
|
+
const { directory, schema, cachedItems, filePrefix, fileIdFilter, filter: filter2, sortOrder = "desc", limit = 20, cursor, getCreatedAt, getId } = config2;
|
|
92585
92620
|
if (filePrefix !== void 0) {
|
|
92586
92621
|
assertSafeEntityId("filePrefix", filePrefix);
|
|
92587
92622
|
}
|
|
92588
|
-
const
|
|
92623
|
+
const resolvedDirectory = path$3.resolve(directory);
|
|
92624
|
+
const fileIds = await listJSONFiles(resolvedDirectory);
|
|
92589
92625
|
const relevantFileIds = filePrefix ? fileIds.filter((fileId) => fileId.startsWith(filePrefix)) : fileIds;
|
|
92590
92626
|
const filteredFileIds = fileIdFilter ? relevantFileIds.filter(fileIdFilter) : relevantFileIds;
|
|
92591
92627
|
const parsedCursor = parseCursor(cursor);
|
|
@@ -92607,10 +92643,11 @@ async function paginatedFileSystemQuery(config2) {
|
|
|
92607
92643
|
}
|
|
92608
92644
|
const validItems = [];
|
|
92609
92645
|
for (const fileId of candidateFileIds) {
|
|
92610
|
-
const filePath = path$3.join(
|
|
92646
|
+
const filePath = path$3.join(resolvedDirectory, `${fileId}.json`);
|
|
92611
92647
|
let item = null;
|
|
92612
92648
|
try {
|
|
92613
|
-
|
|
92649
|
+
const cachedItem = cachedItems == null ? void 0 : cachedItems.get(filePath);
|
|
92650
|
+
item = cachedItem === void 0 ? await readJSON(filePath, schema) : structuredClone(cachedItem);
|
|
92614
92651
|
} catch (error2) {
|
|
92615
92652
|
if (error2 instanceof ZodError) {
|
|
92616
92653
|
console.warn(`Skipping item ${fileId} due to malformed JSON: ${error2.message}`);
|
|
@@ -119451,8 +119488,75 @@ async function deleteAllWaitsForRun(basedir, runId) {
|
|
|
119451
119488
|
}
|
|
119452
119489
|
}
|
|
119453
119490
|
function createEventsStorage(basedir, tag) {
|
|
119491
|
+
const maxCachedEventBytes = 4 * 1024 * 1024;
|
|
119492
|
+
const maxCachedEventEntries = 1e3;
|
|
119493
|
+
const eventCache = /* @__PURE__ */ new Map();
|
|
119494
|
+
const cachedEventBytes = /* @__PURE__ */ new Map();
|
|
119495
|
+
const cachedPathsByRunId = /* @__PURE__ */ new Map();
|
|
119496
|
+
let totalCachedEventBytes = 0;
|
|
119497
|
+
function deleteCachedEvent(eventPath) {
|
|
119498
|
+
const event = eventCache.get(eventPath);
|
|
119499
|
+
if (!event) {
|
|
119500
|
+
return;
|
|
119501
|
+
}
|
|
119502
|
+
eventCache.delete(eventPath);
|
|
119503
|
+
totalCachedEventBytes -= cachedEventBytes.get(eventPath) ?? 0;
|
|
119504
|
+
cachedEventBytes.delete(eventPath);
|
|
119505
|
+
const cachedPaths = cachedPathsByRunId.get(event.runId);
|
|
119506
|
+
cachedPaths == null ? void 0 : cachedPaths.delete(eventPath);
|
|
119507
|
+
if ((cachedPaths == null ? void 0 : cachedPaths.size) === 0) {
|
|
119508
|
+
cachedPathsByRunId.delete(event.runId);
|
|
119509
|
+
}
|
|
119510
|
+
}
|
|
119511
|
+
function clearRunCache(runId) {
|
|
119512
|
+
for (const cachedPath of cachedPathsByRunId.get(runId) ?? []) {
|
|
119513
|
+
deleteCachedEvent(cachedPath);
|
|
119514
|
+
}
|
|
119515
|
+
}
|
|
119516
|
+
function clearCache() {
|
|
119517
|
+
eventCache.clear();
|
|
119518
|
+
cachedEventBytes.clear();
|
|
119519
|
+
cachedPathsByRunId.clear();
|
|
119520
|
+
totalCachedEventBytes = 0;
|
|
119521
|
+
}
|
|
119522
|
+
function cacheEvent(eventPath, cachedEvent, serializedBytes) {
|
|
119523
|
+
if (serializedBytes > maxCachedEventBytes) {
|
|
119524
|
+
return;
|
|
119525
|
+
}
|
|
119526
|
+
while (eventCache.size > 0 && (eventCache.size >= maxCachedEventEntries || totalCachedEventBytes + serializedBytes > maxCachedEventBytes)) {
|
|
119527
|
+
const oldestPath = eventCache.keys().next().value;
|
|
119528
|
+
deleteCachedEvent(oldestPath);
|
|
119529
|
+
}
|
|
119530
|
+
eventCache.set(eventPath, cachedEvent);
|
|
119531
|
+
cachedEventBytes.set(eventPath, serializedBytes);
|
|
119532
|
+
totalCachedEventBytes += serializedBytes;
|
|
119533
|
+
const cachedPaths = cachedPathsByRunId.get(cachedEvent.runId) ?? /* @__PURE__ */ new Set();
|
|
119534
|
+
cachedPaths.add(eventPath);
|
|
119535
|
+
cachedPathsByRunId.set(cachedEvent.runId, cachedPaths);
|
|
119536
|
+
}
|
|
119537
|
+
function rememberStoredEvent(event, eventPath, serializedEvent) {
|
|
119538
|
+
if (event.eventType === "run_completed" || event.eventType === "run_failed" || event.eventType === "run_cancelled") {
|
|
119539
|
+
clearRunCache(event.runId);
|
|
119540
|
+
return;
|
|
119541
|
+
}
|
|
119542
|
+
const serializedBytes = Buffer.byteLength(serializedEvent);
|
|
119543
|
+
if (serializedBytes > maxCachedEventBytes) {
|
|
119544
|
+
return;
|
|
119545
|
+
}
|
|
119546
|
+
const cachedEvent = EventSchema.safeParse(JSON.parse(serializedEvent, jsonReviver));
|
|
119547
|
+
if (cachedEvent.success) {
|
|
119548
|
+
cacheEvent(eventPath, cachedEvent.data, serializedBytes);
|
|
119549
|
+
}
|
|
119550
|
+
}
|
|
119551
|
+
async function storeEvent(event) {
|
|
119552
|
+
const eventPath = taggedPath(basedir, "events", `${event.runId}-${event.eventId}`, tag);
|
|
119553
|
+
const serializedEvent = JSON.stringify(event, jsonReplacer, 2);
|
|
119554
|
+
await write(eventPath, serializedEvent);
|
|
119555
|
+
rememberStoredEvent(event, eventPath, serializedEvent);
|
|
119556
|
+
}
|
|
119454
119557
|
const hookLocks = /* @__PURE__ */ new Map();
|
|
119455
119558
|
return {
|
|
119559
|
+
clearCache,
|
|
119456
119560
|
async create(runId, data, params) {
|
|
119457
119561
|
if (runId != null && runId !== "") {
|
|
119458
119562
|
assertSafeEntityId("runId", runId);
|
|
@@ -119523,8 +119627,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119523
119627
|
executionContext: runInputData.executionContext
|
|
119524
119628
|
}
|
|
119525
119629
|
};
|
|
119526
|
-
|
|
119527
|
-
await writeJSON(taggedPath(basedir, "events", createdCompositeKey, tag), runCreatedEvent);
|
|
119630
|
+
await storeEvent(runCreatedEvent);
|
|
119528
119631
|
currentRun = createdRun;
|
|
119529
119632
|
} else {
|
|
119530
119633
|
currentRun = await readJSONWithFallback(basedir, "runs", effectiveRunId, WorkflowRunSchema, tag);
|
|
@@ -119554,8 +119657,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119554
119657
|
createdAt: now2,
|
|
119555
119658
|
specVersion: effectiveSpecVersion
|
|
119556
119659
|
};
|
|
119557
|
-
|
|
119558
|
-
await writeJSON(taggedPath(basedir, "events", compositeKey2, tag), event2);
|
|
119660
|
+
await storeEvent(event2);
|
|
119559
119661
|
const resolveData2 = (params == null ? void 0 : params.resolveData) ?? DEFAULT_RESOLVE_DATA_OPTION$1;
|
|
119560
119662
|
return {
|
|
119561
119663
|
event: stripEventDataRefs(event2, resolveData2),
|
|
@@ -119904,8 +120006,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119904
120006
|
createdAt: now2,
|
|
119905
120007
|
specVersion: effectiveSpecVersion
|
|
119906
120008
|
};
|
|
119907
|
-
|
|
119908
|
-
await writeJSON(taggedPath(basedir, "events", compositeKey2, tag), conflictEvent);
|
|
120009
|
+
await storeEvent(conflictEvent);
|
|
119909
120010
|
const resolveData2 = (params == null ? void 0 : params.resolveData) ?? DEFAULT_RESOLVE_DATA_OPTION$1;
|
|
119910
120011
|
const filteredEvent2 = stripEventDataRefs(conflictEvent, resolveData2);
|
|
119911
120012
|
return {
|
|
@@ -119989,13 +120090,16 @@ function createEventsStorage(basedir, tag) {
|
|
|
119989
120090
|
await writeJSON(taggedPath(basedir, "waits", waitCompositeKey, tag), wait2, { overwrite: true });
|
|
119990
120091
|
}
|
|
119991
120092
|
const compositeKey = `${effectiveRunId}-${eventId}`;
|
|
119992
|
-
const
|
|
120093
|
+
const eventPath = taggedPath(basedir, "events", compositeKey, tag);
|
|
120094
|
+
const serializedEvent = JSON.stringify(event, jsonReplacer, 2);
|
|
120095
|
+
const eventPublished = await writeExclusive(eventPath, serializedEvent);
|
|
119993
120096
|
if (!eventPublished) {
|
|
119994
120097
|
if (data.eventType === "hook_created" && data.correlationId) {
|
|
119995
120098
|
await repairHookEntityFromPersistedEvent(basedir, effectiveRunId, data.correlationId, eventId, tag);
|
|
119996
120099
|
}
|
|
119997
120100
|
throw new EntityConflictError(`Event "${eventId}" already exists for run "${effectiveRunId}"`);
|
|
119998
120101
|
}
|
|
120102
|
+
rememberStoredEvent(event, eventPath, serializedEvent);
|
|
119999
120103
|
if (hook && data.eventType === "hook_created") {
|
|
120000
120104
|
await writeJSON(taggedPath(basedir, "hooks", hook.hookId, tag), hook, hookEntityWriteOptions);
|
|
120001
120105
|
}
|
|
@@ -120008,6 +120112,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
120008
120112
|
const allEvents = await paginatedFileSystemQuery({
|
|
120009
120113
|
directory: path$3.join(basedir, "events"),
|
|
120010
120114
|
schema: EventSchema,
|
|
120115
|
+
cachedItems: eventCache,
|
|
120011
120116
|
filePrefix: `${effectiveRunId}-`,
|
|
120012
120117
|
sortOrder: "asc",
|
|
120013
120118
|
limit: 1e3,
|
|
@@ -120051,6 +120156,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
120051
120156
|
const result = await paginatedFileSystemQuery({
|
|
120052
120157
|
directory: path$3.join(basedir, "events"),
|
|
120053
120158
|
schema: EventSchema,
|
|
120159
|
+
cachedItems: eventCache,
|
|
120054
120160
|
filePrefix: `${runId}-`,
|
|
120055
120161
|
// Events in chronological order (oldest first) by default,
|
|
120056
120162
|
// different from the default for other list calls.
|
|
@@ -120076,8 +120182,9 @@ function createEventsStorage(basedir, tag) {
|
|
|
120076
120182
|
const result = await paginatedFileSystemQuery({
|
|
120077
120183
|
directory: path$3.join(basedir, "events"),
|
|
120078
120184
|
schema: EventSchema,
|
|
120185
|
+
cachedItems: eventCache,
|
|
120079
120186
|
// No filePrefix - search all events
|
|
120080
|
-
filter: (event) => event.correlationId === correlationId,
|
|
120187
|
+
filter: (event) => event.correlationId === correlationId && (params.runId === void 0 || event.runId === params.runId),
|
|
120081
120188
|
// Events in chronological order (oldest first) by default,
|
|
120082
120189
|
// different from the default for other list calls.
|
|
120083
120190
|
sortOrder: ((_a3 = params.pagination) == null ? void 0 : _a3.sortOrder) ?? "asc",
|
|
@@ -120202,7 +120309,8 @@ function createStorage$1(basedir, tag) {
|
|
|
120202
120309
|
runs: instrumentObject$1("world.runs", runs),
|
|
120203
120310
|
steps: instrumentObject$1("world.steps", steps),
|
|
120204
120311
|
events: instrumentObject$1("world.events", events2),
|
|
120205
|
-
hooks: instrumentObject$1("world.hooks", hooks)
|
|
120312
|
+
hooks: instrumentObject$1("world.hooks", hooks),
|
|
120313
|
+
clearCache: () => events2.clearCache()
|
|
120206
120314
|
};
|
|
120207
120315
|
}
|
|
120208
120316
|
const monotonicUlid = monotonicFactory(() => Math.random());
|
|
@@ -120582,8 +120690,8 @@ function createLocalWorld(args) {
|
|
|
120582
120690
|
const mergedConfig = { ...config.value, ...definedArgs };
|
|
120583
120691
|
const tag = mergedConfig.tag;
|
|
120584
120692
|
const queue = createQueue$2(mergedConfig);
|
|
120585
|
-
const storage = createStorage$1(mergedConfig.dataDir, tag);
|
|
120586
|
-
const recoverActiveRuns = mergedConfig
|
|
120693
|
+
const { clearCache: clearStorageCache, ...storage } = createStorage$1(mergedConfig.dataDir, tag);
|
|
120694
|
+
const recoverActiveRuns = resolveRecoverActiveRuns(mergedConfig);
|
|
120587
120695
|
return {
|
|
120588
120696
|
specVersion: SPEC_VERSION_CURRENT,
|
|
120589
120697
|
...queue,
|
|
@@ -120610,14 +120718,16 @@ function createLocalWorld(args) {
|
|
|
120610
120718
|
await reenqueueActiveRuns(recoveryRuns, queue.queue, "world-local");
|
|
120611
120719
|
},
|
|
120612
120720
|
async close() {
|
|
120721
|
+
clearStorageCache();
|
|
120613
120722
|
await queue.close();
|
|
120614
120723
|
},
|
|
120615
120724
|
async clear() {
|
|
120725
|
+
clearStorageCache();
|
|
120616
120726
|
if (tag) {
|
|
120617
120727
|
const basedir = mergedConfig.dataDir;
|
|
120618
120728
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
120619
120729
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
120620
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
120730
|
+
const { HookSchema: HookSchema2 } = await import("./index-Ctx7nEpR.js");
|
|
120621
120731
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
120622
120732
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
120623
120733
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -120646,6 +120756,7 @@ function createLocalWorld(args) {
|
|
|
120646
120756
|
})));
|
|
120647
120757
|
clearCreatedFilesCache();
|
|
120648
120758
|
} else {
|
|
120759
|
+
clearCreatedFilesCache();
|
|
120649
120760
|
await rm(mergedConfig.dataDir, { recursive: true, force: true });
|
|
120650
120761
|
await initDataDir(mergedConfig.dataDir);
|
|
120651
120762
|
}
|
|
@@ -121043,8 +121154,8 @@ function requireGetVercelOidcToken() {
|
|
|
121043
121154
|
}
|
|
121044
121155
|
try {
|
|
121045
121156
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
121046
|
-
await import("./token-util-
|
|
121047
|
-
await import("./token-
|
|
121157
|
+
await import("./token-util-u3-O6-cJ.js").then((n) => n.t),
|
|
121158
|
+
await import("./token-B9AfalZB.js").then((n) => n.t)
|
|
121048
121159
|
]);
|
|
121049
121160
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
121050
121161
|
await refreshToken(options);
|
|
@@ -126531,7 +126642,7 @@ var QueueClient = class {
|
|
|
126531
126642
|
setApi(this, new ApiClient({ ...options, region }));
|
|
126532
126643
|
}
|
|
126533
126644
|
};
|
|
126534
|
-
const version = "4.7.
|
|
126645
|
+
const version = "4.7.1";
|
|
126535
126646
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
126536
126647
|
const MAX_BODY_PARSE_RETRIES = 2;
|
|
126537
126648
|
const BODY_PARSE_RETRY_BASE_MS = 100;
|
|
@@ -127508,10 +127619,12 @@ async function getWorkflowRunEventsV4(runId, params = {}, config2) {
|
|
|
127508
127619
|
const url2 = `${baseUrl}/v4/runs/${encodeURIComponent(runId)}/events` + paginationToQuery(params);
|
|
127509
127620
|
return consumeListFrameStream(url2, headers2, config2, "listEvents");
|
|
127510
127621
|
}
|
|
127511
|
-
async function getEventsByCorrelationIdV4(correlationId, params = {}, config2) {
|
|
127622
|
+
async function getEventsByCorrelationIdV4(correlationId, params = {}, config2, runId) {
|
|
127512
127623
|
const { baseUrl, headers: headers2 } = await getHttpConfig(config2);
|
|
127513
127624
|
const sp = new URLSearchParams();
|
|
127514
127625
|
sp.set("correlationId", correlationId);
|
|
127626
|
+
if (runId !== void 0)
|
|
127627
|
+
sp.set("runId", runId);
|
|
127515
127628
|
appendListParams(sp, params);
|
|
127516
127629
|
const url2 = `${baseUrl}/v4/events?${sp.toString()}`;
|
|
127517
127630
|
return consumeListFrameStream(url2, headers2, config2, "listEventsByCorrelationId");
|
|
@@ -127896,10 +128009,13 @@ async function getWorkflowRunEvents(params, config2) {
|
|
|
127896
128009
|
sortOrder: pagination == null ? void 0 : pagination.sortOrder,
|
|
127897
128010
|
remoteRefBehavior: resolveData === "none" ? "lazy" : "resolve"
|
|
127898
128011
|
};
|
|
127899
|
-
const
|
|
128012
|
+
const runId = "correlationId" in params ? params.runId : void 0;
|
|
128013
|
+
const result = await ("correlationId" in params ? getEventsByCorrelationIdV4(params.correlationId, wirePagination, config2, runId) : getWorkflowRunEventsV4(params.runId, wirePagination, config2));
|
|
127900
128014
|
const events2 = result.events.map((listed) => buildEventFromV4(listed.event, listed.body, resolveData));
|
|
127901
128015
|
return {
|
|
127902
|
-
|
|
128016
|
+
// Older servers may ignore the runId query parameter. Keep the client
|
|
128017
|
+
// filter as a compatibility guard until every server honors it.
|
|
128018
|
+
data: runId !== void 0 ? events2.filter((event) => event.runId === runId) : events2,
|
|
127903
128019
|
cursor: result.next ?? null,
|
|
127904
128020
|
hasMore: Boolean(result.next)
|
|
127905
128021
|
};
|
|
@@ -129048,7 +129164,7 @@ class WorkflowServerReadableStream extends ReadableStream {
|
|
|
129048
129164
|
_reader = new WeakMap();
|
|
129049
129165
|
const FRAMED_STREAM_MAX_RECONNECTS = 50;
|
|
129050
129166
|
const FRAMED_STREAM_MAX_TOTAL_RECONNECTS = 1e3;
|
|
129051
|
-
function createReconnectingFramedStream(name2, startIndex) {
|
|
129167
|
+
function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
129052
129168
|
const reconnectSupported = startIndex === void 0 || startIndex >= 0;
|
|
129053
129169
|
let currentStartIndex = startIndex ?? 0;
|
|
129054
129170
|
let consumedFrames = 0;
|
|
@@ -129062,6 +129178,15 @@ function createReconnectingFramedStream(name2, startIndex) {
|
|
|
129062
129178
|
const stream = await world.readFromStream(name2, effectiveStartIndex);
|
|
129063
129179
|
reader = stream.getReader();
|
|
129064
129180
|
}
|
|
129181
|
+
async function isVerifiedComplete() {
|
|
129182
|
+
try {
|
|
129183
|
+
const world = getWorld();
|
|
129184
|
+
const info = await world.getStreamInfo(name2, runId);
|
|
129185
|
+
return info.done && currentStartIndex + consumedFrames > info.tailIndex;
|
|
129186
|
+
} catch {
|
|
129187
|
+
return true;
|
|
129188
|
+
}
|
|
129189
|
+
}
|
|
129065
129190
|
async function reconnect() {
|
|
129066
129191
|
if (reader) {
|
|
129067
129192
|
await reader.cancel().catch(() => {
|
|
@@ -129116,6 +129241,15 @@ function createReconnectingFramedStream(name2, startIndex) {
|
|
|
129116
129241
|
}
|
|
129117
129242
|
if (result.done || !result.value) {
|
|
129118
129243
|
reader = void 0;
|
|
129244
|
+
if (reconnectSupported && !await isVerifiedComplete()) {
|
|
129245
|
+
try {
|
|
129246
|
+
await reconnect();
|
|
129247
|
+
} catch (reconnectErr) {
|
|
129248
|
+
controller.error(reconnectErr);
|
|
129249
|
+
return;
|
|
129250
|
+
}
|
|
129251
|
+
continue;
|
|
129252
|
+
}
|
|
129119
129253
|
controller.close();
|
|
129120
129254
|
return;
|
|
129121
129255
|
}
|
|
@@ -129643,7 +129777,7 @@ function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey) {
|
|
|
129643
129777
|
pollReadableLock(userReadable, state);
|
|
129644
129778
|
return userReadable;
|
|
129645
129779
|
} else {
|
|
129646
|
-
const readable2 = createReconnectingFramedStream(value.name, value.startIndex);
|
|
129780
|
+
const readable2 = createReconnectingFramedStream(runId, value.name, value.startIndex);
|
|
129647
129781
|
const transform2 = getDeserializeStream(getExternalRevivers(global2, ops, runId, cryptoKey), cryptoKey);
|
|
129648
129782
|
const state = createFlushableState();
|
|
129649
129783
|
ops.push(state.promise);
|
|
@@ -130030,6 +130164,10 @@ async function dehydrateStepReturnValue(value, runId, key, ops = [], global2 = g
|
|
|
130030
130164
|
throw new WorkflowRuntimeError(formatSerializationError("step return value", error2), { slug: "serialization-failed", cause: error2 });
|
|
130031
130165
|
}
|
|
130032
130166
|
}
|
|
130167
|
+
const UNSERIALIZABLE_FLAG = "__workflowUnserializableStepInput";
|
|
130168
|
+
function isUnserializableStepInputPlaceholder(hydratedInput) {
|
|
130169
|
+
return typeof hydratedInput === "object" && hydratedInput !== null && hydratedInput[UNSERIALIZABLE_FLAG] === true;
|
|
130170
|
+
}
|
|
130033
130171
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
130034
130172
|
var intToChar = new Uint8Array(64);
|
|
130035
130173
|
var charToInt = new Uint8Array(128);
|
|
@@ -133644,6 +133782,9 @@ createQueueHandler(stepPrefix, async (message_, metadata) => {
|
|
|
133644
133782
|
let userCodeFailed = false;
|
|
133645
133783
|
const executionStartTime = Date.now();
|
|
133646
133784
|
try {
|
|
133785
|
+
if (isUnserializableStepInputPlaceholder(hydratedInput)) {
|
|
133786
|
+
throw new FatalError(formatSerializationError("step arguments", void 0));
|
|
133787
|
+
}
|
|
133647
133788
|
result = await trace$2("step.execute", {}, async () => {
|
|
133648
133789
|
return await contextStorage.run({
|
|
133649
133790
|
stepMetadata: {
|
|
@@ -134431,11 +134572,18 @@ async function fetchEvent(worldEnv, runId, eventId, resolveData = "all") {
|
|
|
134431
134572
|
}
|
|
134432
134573
|
}
|
|
134433
134574
|
async function fetchEventsByCorrelationId(worldEnv, correlationId, params) {
|
|
134434
|
-
const {
|
|
134575
|
+
const {
|
|
134576
|
+
runId,
|
|
134577
|
+
cursor,
|
|
134578
|
+
sortOrder = "asc",
|
|
134579
|
+
limit = 100,
|
|
134580
|
+
withData = false
|
|
134581
|
+
} = params;
|
|
134435
134582
|
try {
|
|
134436
134583
|
const world = await getWorldFromEnv(worldEnv);
|
|
134437
134584
|
const result = await world.events.listByCorrelationId({
|
|
134438
134585
|
correlationId,
|
|
134586
|
+
runId,
|
|
134439
134587
|
pagination: { cursor, limit, sortOrder },
|
|
134440
134588
|
resolveData: withData ? "all" : "none"
|
|
134441
134589
|
});
|
|
@@ -154893,6 +155041,7 @@ function useEventsListData(env2, runId, options = {}) {
|
|
|
154893
155041
|
}
|
|
154894
155042
|
const { error: fetchError, result } = await unwrapServerActionResult(
|
|
154895
155043
|
fetchEventsByCorrelationId$1(env2, id2, {
|
|
155044
|
+
runId,
|
|
154896
155045
|
cursor: nextCursor,
|
|
154897
155046
|
sortOrder,
|
|
154898
155047
|
limit: 100,
|
|
@@ -155649,7 +155798,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
155649
155798
|
__proto__: null,
|
|
155650
155799
|
loader
|
|
155651
155800
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
155652
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-C_C46bD6.js", "imports": ["/assets/index-BsV8i_Jn.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-BxnaECGo.js", "imports": ["/assets/index-BsV8i_Jn.js", "/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js"], "css": ["/assets/root-BOS11TzD.css", "/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-Blj6TeEE.js", "imports": ["/assets/index-BsV8i_Jn.js", "/assets/workflow-graph-viewer-C6PWoIIU.js", "/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js", "/assets/index-DZSXezpI.js"], "css": ["/assets/workflow-graph-viewer-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-
|
|
155801
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-C_C46bD6.js", "imports": ["/assets/index-BsV8i_Jn.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-BxnaECGo.js", "imports": ["/assets/index-BsV8i_Jn.js", "/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js"], "css": ["/assets/root-BOS11TzD.css", "/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-Blj6TeEE.js", "imports": ["/assets/index-BsV8i_Jn.js", "/assets/workflow-graph-viewer-C6PWoIIU.js", "/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js", "/assets/index-DZSXezpI.js"], "css": ["/assets/workflow-graph-viewer-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-1KdCfmI4.js", "imports": ["/assets/index-BsV8i_Jn.js", "/assets/workflow-graph-viewer-C6PWoIIU.js", "/assets/mermaid-3ZIDBTTL-Bp6ZST9_.js", "/assets/encryption-BRhjWsZh.js", "/assets/index-DZSXezpI.js"], "css": ["/assets/workflow-graph-viewer-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-d91343fe.js", "version": "d91343fe", "sri": void 0 };
|
|
155653
155802
|
const assetsBuildDirectory = "build/client";
|
|
155654
155803
|
const basename = "/";
|
|
155655
155804
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|
|
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { g as getDefaultExportFromCjs } from "./app-
|
|
6
|
-
import { a5 as requireTokenError, a4 as requireTokenUtil } from "./server-build-
|
|
5
|
+
import { g as getDefaultExportFromCjs } from "./app-eQjjf4RE.js";
|
|
6
|
+
import { a5 as requireTokenError, a4 as requireTokenUtil } from "./server-build-BFktO0pM.js";
|
|
7
7
|
function _mergeNamespaces(n, m) {
|
|
8
8
|
for (var i = 0; i < m.length; i++) {
|
|
9
9
|
const e = m[i];
|
|
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { g as getDefaultExportFromCjs } from "./app-
|
|
6
|
-
import { a4 as requireTokenUtil } from "./server-build-
|
|
5
|
+
import { g as getDefaultExportFromCjs } from "./app-eQjjf4RE.js";
|
|
6
|
+
import { a4 as requireTokenUtil } from "./server-build-BFktO0pM.js";
|
|
7
7
|
function _mergeNamespaces(n, m) {
|
|
8
8
|
for (var i = 0; i < m.length; i++) {
|
|
9
9
|
const e = m[i];
|
package/build/server/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
|
|
|
2
2
|
if (typeof globalThis.require === "undefined") {
|
|
3
3
|
globalThis.require = __wkfCreateRequire(import.meta.url);
|
|
4
4
|
}
|
|
5
|
-
import { n } from "./assets/app-
|
|
5
|
+
import { n } from "./assets/app-eQjjf4RE.js";
|
|
6
6
|
import "express";
|
|
7
7
|
import "stream";
|
|
8
8
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow/web",
|
|
3
3
|
"description": "Workflow Observability UI",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"vite": "^6",
|
|
72
72
|
"vitest": "^3",
|
|
73
73
|
"jsdom": "^26",
|
|
74
|
-
"@workflow/core": "4.8.
|
|
74
|
+
"@workflow/core": "4.8.5",
|
|
75
75
|
"@workflow/errors": "4.2.1",
|
|
76
76
|
"@workflow/utils": "4.1.4",
|
|
77
|
-
"@workflow/web-shared": "4.1.
|
|
78
|
-
"@workflow/world": "4.
|
|
79
|
-
"@workflow/world-vercel": "4.7.
|
|
77
|
+
"@workflow/web-shared": "4.1.21",
|
|
78
|
+
"@workflow/world": "4.5.0",
|
|
79
|
+
"@workflow/world-vercel": "4.7.1"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"dev": "react-router dev",
|