@workflow/web 5.0.0-beta.16 → 5.0.0-beta.17
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/server/assets/{app-BxW1wRWj.js → app-BEmI6bFe.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-CP6Zp179.js → highlighted-body-B3W2YXNL-B_a6Jc52.js} +2 -2
- package/build/server/assets/{index-Cxv7xPiz.js → index-Bg5S_1qh.js} +3 -3
- package/build/server/assets/{mermaid-3ZIDBTTL-BMFjZDcW.js → mermaid-3ZIDBTTL-C7y9g953.js} +2 -2
- package/build/server/assets/{server-build-B4JanZE6.js → server-build-B3KD951q.js} +56 -15
- package/build/server/assets/{token-w6r7bnnd.js → token-B95VJmzW.js} +2 -2
- package/build/server/assets/{token-util-Cw2FB_2n.js → token-util-q0eyRDZK.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +6 -6
|
@@ -9176,7 +9176,7 @@ const app = express();
|
|
|
9176
9176
|
app.all(
|
|
9177
9177
|
"/{*splat}",
|
|
9178
9178
|
createRequestHandler({
|
|
9179
|
-
build: () => import("./server-build-
|
|
9179
|
+
build: () => import("./server-build-B3KD951q.js").then((n) => n.a3)
|
|
9180
9180
|
})
|
|
9181
9181
|
);
|
|
9182
9182
|
app.use(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as R, _ as Ks, $ as jsxRuntimeExports, a0 as Qe } from "./server-build-
|
|
2
|
-
import { r as reactExports } from "./app-
|
|
1
|
+
import { Z as R, _ as Ks, $ as jsxRuntimeExports, a0 as Qe } from "./server-build-B3KD951q.js";
|
|
2
|
+
import { r as reactExports } from "./app-BEmI6bFe.js";
|
|
3
3
|
import "node:stream";
|
|
4
4
|
import "util";
|
|
5
5
|
import "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HookSchema } from "./server-build-
|
|
2
|
-
import { A, a, b, c, d, e, B, D, f, E, g, h, i, L, M, P, Q, j, R, k, S, l, m, n, o, p, q, r, s, V, W, t, u, v, w, x, y, z, C, F, G, I, J, K, O, T, U, X, Y } from "./server-build-
|
|
3
|
-
import "./app-
|
|
1
|
+
import { H as HookSchema } from "./server-build-B3KD951q.js";
|
|
2
|
+
import { A, a, b, c, d, e, B, D, f, E, g, h, i, L, M, P, Q, j, R, k, S, l, m, n, o, p, q, r, s, V, W, t, u, v, w, x, y, z, C, F, G, I, J, K, O, T, U, X, Y } from "./server-build-B3KD951q.js";
|
|
3
|
+
import "./app-BEmI6bFe.js";
|
|
4
4
|
import "stream";
|
|
5
5
|
import "express";
|
|
6
6
|
import "node:stream";
|
|
@@ -14,7 +14,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
14
14
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
15
15
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
16
16
|
var _a2, _b, _c, _d, _listeners, _onabort, _reader, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _worldPromise, _Run_instances, lazyWorldPromise_get, _encryptionKeyPromise, _resilientStart, getEncryptionKey_fn, getEncryptionKeyLazily_fn, pollReturnValue_fn;
|
|
17
|
-
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-
|
|
17
|
+
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-BEmI6bFe.js";
|
|
18
18
|
import require$$0$4, { PassThrough } from "node:stream";
|
|
19
19
|
import require$$0 from "util";
|
|
20
20
|
import require$$1 from "crypto";
|
|
@@ -30082,6 +30082,25 @@ function formatStepName(name2) {
|
|
|
30082
30082
|
function formatWorkflowName(name2) {
|
|
30083
30083
|
return formatParsedName(parseWorkflowName(name2), name2);
|
|
30084
30084
|
}
|
|
30085
|
+
function workflowDisplayName(name2) {
|
|
30086
|
+
var _a3;
|
|
30087
|
+
return ((_a3 = parseWorkflowName(name2)) == null ? void 0 : _a3.shortName) ?? shortNameFromSanitized("workflow", name2) ?? name2;
|
|
30088
|
+
}
|
|
30089
|
+
function shortNameFromSanitized(tag, name2) {
|
|
30090
|
+
var _a3;
|
|
30091
|
+
if (!name2.startsWith(`${tag}--`))
|
|
30092
|
+
return null;
|
|
30093
|
+
const segments = name2.split("--").filter(Boolean);
|
|
30094
|
+
const functionPart = segments.at(-1);
|
|
30095
|
+
let shortName = (functionPart == null ? void 0 : functionPart.split("-").filter(Boolean).at(-1)) ?? "";
|
|
30096
|
+
if (["default", "__default"].includes(shortName)) {
|
|
30097
|
+
const moduleShortName = (_a3 = segments.at(-2)) == null ? void 0 : _a3.split("-").filter(Boolean).at(-1);
|
|
30098
|
+
if (moduleShortName && moduleShortName !== tag) {
|
|
30099
|
+
shortName = moduleShortName;
|
|
30100
|
+
}
|
|
30101
|
+
}
|
|
30102
|
+
return shortName || null;
|
|
30103
|
+
}
|
|
30085
30104
|
function formatParsedName(parsed, fallback) {
|
|
30086
30105
|
if (!parsed)
|
|
30087
30106
|
return fallback;
|
|
@@ -83123,7 +83142,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
83123
83142
|
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 });
|
|
83124
83143
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
83125
83144
|
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 }) });
|
|
83126
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
83145
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-B_a6Jc52.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
83127
83146
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
83128
83147
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
83129
83148
|
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 }) })] }) });
|
|
@@ -83445,7 +83464,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
83445
83464
|
}, []), 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] });
|
|
83446
83465
|
};
|
|
83447
83466
|
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 }) })] });
|
|
83448
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
83467
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-C7y9g953.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
83449
83468
|
function ke(e, t) {
|
|
83450
83469
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
83451
83470
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -91151,6 +91170,19 @@ async function withOtel(fn2) {
|
|
|
91151
91170
|
return void 0;
|
|
91152
91171
|
return await fn2(otel);
|
|
91153
91172
|
}
|
|
91173
|
+
async function linkToTraceCarrier(carrier) {
|
|
91174
|
+
if (!carrier)
|
|
91175
|
+
return;
|
|
91176
|
+
const [context, otel] = await Promise.all([
|
|
91177
|
+
getSpanContextForTraceCarrier(carrier),
|
|
91178
|
+
OtelApi.value
|
|
91179
|
+
]);
|
|
91180
|
+
if (!context || !otel)
|
|
91181
|
+
return;
|
|
91182
|
+
if (!otel.trace.isSpanContextValid(context))
|
|
91183
|
+
return;
|
|
91184
|
+
return { context };
|
|
91185
|
+
}
|
|
91154
91186
|
function matchesDebugNamespace(namespace2, patternList) {
|
|
91155
91187
|
if (!patternList) {
|
|
91156
91188
|
return false;
|
|
@@ -91279,7 +91311,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
91279
91311
|
encrypt: encrypt$1,
|
|
91280
91312
|
importKey
|
|
91281
91313
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91282
|
-
const version$1 = "5.0.0-beta.
|
|
91314
|
+
const version$1 = "5.0.0-beta.17";
|
|
91283
91315
|
const WorldCacheKey = Symbol.for("@workflow/world//cache");
|
|
91284
91316
|
const WorldCachePromiseKey = Symbol.for("@workflow/world//cachePromise");
|
|
91285
91317
|
const GetWorldFnKey$1 = Symbol.for("@workflow/world//getWorldFn");
|
|
@@ -121719,7 +121751,7 @@ function createLocalWorld(args) {
|
|
|
121719
121751
|
const basedir = mergedConfig.dataDir;
|
|
121720
121752
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
121721
121753
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
121722
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
121754
|
+
const { HookSchema: HookSchema2 } = await import("./index-Bg5S_1qh.js");
|
|
121723
121755
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
121724
121756
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
121725
121757
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -121872,8 +121904,8 @@ function requireGetVercelOidcToken() {
|
|
|
121872
121904
|
}
|
|
121873
121905
|
try {
|
|
121874
121906
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
121875
|
-
await import("./token-util-
|
|
121876
|
-
await import("./token-
|
|
121907
|
+
await import("./token-util-q0eyRDZK.js").then((n) => n.t),
|
|
121908
|
+
await import("./token-B95VJmzW.js").then((n) => n.t)
|
|
121877
121909
|
]);
|
|
121878
121910
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
121879
121911
|
await refreshToken(options);
|
|
@@ -122600,6 +122632,16 @@ async function getSpanKind(field) {
|
|
|
122600
122632
|
return void 0;
|
|
122601
122633
|
return otel.SpanKind[field];
|
|
122602
122634
|
}
|
|
122635
|
+
async function injectTraceContextIntoHeaders(headers2) {
|
|
122636
|
+
const otel = await getOtelApi();
|
|
122637
|
+
if (!otel)
|
|
122638
|
+
return;
|
|
122639
|
+
const carrier = {};
|
|
122640
|
+
otel.propagation.inject(otel.context.active(), carrier);
|
|
122641
|
+
for (const [key, value] of Object.entries(carrier)) {
|
|
122642
|
+
headers2.set(key, value);
|
|
122643
|
+
}
|
|
122644
|
+
}
|
|
122603
122645
|
function SemanticConvention(...names) {
|
|
122604
122646
|
return (value) => Object.fromEntries(names.map((name2) => [name2, value]));
|
|
122605
122647
|
}
|
|
@@ -127148,7 +127190,7 @@ var QueueClient = class {
|
|
|
127148
127190
|
setApi(this, new ApiClient({ ...options, region }));
|
|
127149
127191
|
}
|
|
127150
127192
|
};
|
|
127151
|
-
const version = "5.0.0-beta.
|
|
127193
|
+
const version = "5.0.0-beta.16";
|
|
127152
127194
|
const HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
127153
127195
|
function httpLog(method, endpoint, response2, ms2) {
|
|
127154
127196
|
if (HTTP_DEBUG_ENABLED) {
|
|
@@ -127260,6 +127302,7 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
127260
127302
|
...RpcService("workflow-server")
|
|
127261
127303
|
});
|
|
127262
127304
|
headers2.set("Accept", "application/cbor");
|
|
127305
|
+
await injectTraceContextIntoHeaders(headers2);
|
|
127263
127306
|
let body2;
|
|
127264
127307
|
if (data !== void 0) {
|
|
127265
127308
|
headers2.set("Content-Type", "application/cbor");
|
|
@@ -131470,12 +131513,9 @@ async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
|
131470
131513
|
span == null ? void 0 : span.setAttributes({
|
|
131471
131514
|
...WorkflowName(workflowRun.workflowName)
|
|
131472
131515
|
});
|
|
131473
|
-
const
|
|
131474
|
-
if (
|
|
131475
|
-
|
|
131476
|
-
if (context) {
|
|
131477
|
-
(_d2 = span == null ? void 0 : span.addLink) == null ? void 0 : _d2.call(span, { context });
|
|
131478
|
-
}
|
|
131516
|
+
const originLink = await linkToTraceCarrier((_c2 = workflowRun.executionContext) == null ? void 0 : _c2.traceCarrier);
|
|
131517
|
+
if (originLink) {
|
|
131518
|
+
(_d2 = span == null ? void 0 : span.addLink) == null ? void 0 : _d2.call(span, originLink);
|
|
131479
131519
|
}
|
|
131480
131520
|
await world.queue(getWorkflowQueueName(workflowRun.workflowName), {
|
|
131481
131521
|
runId: hook.runId,
|
|
@@ -131568,7 +131608,8 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
131568
131608
|
if (!workflowName) {
|
|
131569
131609
|
throw new WorkflowRuntimeError(`'start' received an invalid workflow function. Ensure the Workflow SDK is configured correctly and the function includes a 'use workflow' directive.`, { slug: "start-invalid-workflow-function" });
|
|
131570
131610
|
}
|
|
131571
|
-
|
|
131611
|
+
const spanName2 = `workflow.start ${workflowDisplayName(workflowName)}`;
|
|
131612
|
+
return trace$2(spanName2, async (span) => {
|
|
131572
131613
|
var _a3, _b2;
|
|
131573
131614
|
span == null ? void 0 : span.setAttributes({
|
|
131574
131615
|
...WorkflowName(workflowName),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs } from "./app-
|
|
2
|
-
import { a2 as requireTokenError, a1 as requireTokenUtil } from "./server-build-
|
|
1
|
+
import { g as getDefaultExportFromCjs } from "./app-BEmI6bFe.js";
|
|
2
|
+
import { a2 as requireTokenError, a1 as requireTokenUtil } from "./server-build-B3KD951q.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs } from "./app-
|
|
2
|
-
import { a1 as requireTokenUtil } from "./server-build-
|
|
1
|
+
import { g as getDefaultExportFromCjs } from "./app-BEmI6bFe.js";
|
|
2
|
+
import { a1 as requireTokenUtil } from "./server-build-B3KD951q.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
package/build/server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow/web",
|
|
3
3
|
"description": "Workflow Observability UI",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"typescript": "^5.9.3",
|
|
73
73
|
"vite": "^6",
|
|
74
74
|
"vitest": "^3",
|
|
75
|
-
"@workflow/core": "5.0.0-beta.
|
|
76
|
-
"@workflow/errors": "5.0.0-beta.
|
|
77
|
-
"@workflow/utils": "5.0.0-beta.
|
|
78
|
-
"@workflow/web-shared": "5.0.0-beta.
|
|
75
|
+
"@workflow/core": "5.0.0-beta.17",
|
|
76
|
+
"@workflow/errors": "5.0.0-beta.8",
|
|
77
|
+
"@workflow/utils": "5.0.0-beta.4",
|
|
78
|
+
"@workflow/web-shared": "5.0.0-beta.17",
|
|
79
79
|
"@workflow/world": "5.0.0-beta.10",
|
|
80
|
-
"@workflow/world-vercel": "5.0.0-beta.
|
|
80
|
+
"@workflow/world-vercel": "5.0.0-beta.16"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"dev": "react-router dev",
|