@workflow/web 5.0.0-beta.39 → 5.0.0-beta.40

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.
Files changed (24) hide show
  1. package/build/client/assets/{app-BqwHo5GR.css → app-BkGXg64e.css} +1 -1
  2. package/build/client/assets/{arrow-up-right-Ccx_FPfU.js → arrow-up-right-Br49goey.js} +1 -1
  3. package/build/client/assets/{highlighted-body-B3W2YXNL-DMawUm9n.js → highlighted-body-B3W2YXNL-B5pbFkUr.js} +1 -1
  4. package/build/client/assets/{home-B6O_uPSC.js → home-DrXIdsG5.js} +60 -35
  5. package/build/client/assets/{loader-circle-BrO0dxVn.js → loader-circle-3PJSFf84.js} +1 -1
  6. package/build/client/assets/{manifest-7e8691f4.js → manifest-0c933230.js} +1 -1
  7. package/build/client/assets/{mermaid-3ZIDBTTL-D20ZkB54.js → mermaid-3ZIDBTTL-qqUSEahK.js} +151 -107
  8. package/build/client/assets/{root-CxZylOIf.css → root-ZRjqDhEN.css} +1 -1
  9. package/build/client/assets/{root-dudvdmvf.js → root-n7Zz0dTX.js} +3 -3
  10. package/build/client/assets/{run-detail-DtCCxxv2.js → run-detail-DHeMEsdg.js} +8 -4
  11. package/build/client/assets/{workflow-graph-viewer-B01nH75E.js → workflow-graph-viewer-DWdsfF3d.js} +7 -3
  12. package/build/client/assets/{zstd-browser-decoder-Dw3HhTgO.js → zstd-browser-decoder-DemK2pIP.js} +1 -1
  13. package/build/server/assets/{app-Bd12Opaf.js → app-BJXoDV4n.js} +3132 -614
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-CFlRme7u.js → highlighted-body-B3W2YXNL-Kki0lKyo.js} +3 -1
  15. package/build/server/assets/{index-DIXsjgfZ.js → index-7-uV1dU1.js} +142 -1
  16. package/build/server/assets/index-XksKPyou.js +143 -0
  17. package/build/server/assets/{mermaid-3ZIDBTTL-CQsU8DGa.js → mermaid-3ZIDBTTL-Bh_zbSQ-.js} +3 -1
  18. package/build/server/assets/{token-XJr1pjmC.js → token-D8pb4TJ8.js} +1 -1
  19. package/build/server/assets/{token-util-BJaMxWWP.js → token-util-DPJj3x0B.js} +1 -1
  20. package/build/server/assets/wrapper-CsxTXsPR.js +3708 -0
  21. package/build/server/assets/{zstd-browser-decoder-DL7Vc3pV.js → zstd-browser-decoder-CWJVPmcb.js} +3 -1
  22. package/build/server/index.js +5 -3
  23. package/package.json +7 -7
  24. package/build/server/assets/index-B6SJpqpo.js +0 -137
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { aA as reactExports, aB as R, aC as Ks, aD as jsxRuntimeExports, aE as Qe } from "./app-Bd12Opaf.js";
5
+ import { aE as reactExports, aF as R, aG as Ks, aH as jsxRuntimeExports, aI as Qe } from "./app-BJXoDV4n.js";
6
6
  import "node:stream";
7
7
  import "stream";
8
8
  import "util";
@@ -40,6 +40,8 @@ import "node:timers";
40
40
  import "node:dns";
41
41
  import "path";
42
42
  import "fs";
43
+ import "constants";
44
+ import "assert";
43
45
  import "os";
44
46
  import "net";
45
47
  import "express";
@@ -309,6 +309,47 @@ function requireGetContext() {
309
309
  }
310
310
  return getContext_1;
311
311
  }
312
+ var deadline;
313
+ var hasRequiredDeadline;
314
+ function requireDeadline() {
315
+ if (hasRequiredDeadline) return deadline;
316
+ hasRequiredDeadline = 1;
317
+ var __defProp = Object.defineProperty;
318
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
319
+ var __getOwnPropNames = Object.getOwnPropertyNames;
320
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
321
+ var __export = (target, all) => {
322
+ for (var name in all)
323
+ __defProp(target, name, { get: all[name], enumerable: true });
324
+ };
325
+ var __copyProps = (to, from, except, desc) => {
326
+ if (from && typeof from === "object" || typeof from === "function") {
327
+ for (let key of __getOwnPropNames(from))
328
+ if (!__hasOwnProp.call(to, key) && key !== except)
329
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
330
+ }
331
+ return to;
332
+ };
333
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
334
+ var deadline_exports = {};
335
+ __export(deadline_exports, {
336
+ getDeadline: () => getDeadline
337
+ });
338
+ deadline = __toCommonJS(deadline_exports);
339
+ var import_get_context = requireGetContext();
340
+ function getDeadline() {
341
+ const deadline2 = (0, import_get_context.getContext)().deadline;
342
+ if (deadline2 === void 0) {
343
+ return void 0;
344
+ }
345
+ const date = new Date(deadline2);
346
+ if (isNaN(date.getTime())) {
347
+ return void 0;
348
+ }
349
+ return date;
350
+ }
351
+ return deadline;
352
+ }
312
353
  var waitUntil_1;
313
354
  var hasRequiredWaitUntil;
314
355
  function requireWaitUntil() {
@@ -740,7 +781,10 @@ function requireCache() {
740
781
  return resolveCache().get(makeKey(key));
741
782
  },
742
783
  set: (key, value, options) => {
743
- return resolveCache().set(makeKey(key), value, options);
784
+ return resolveCache().set(makeKey(key), value, {
785
+ ...options,
786
+ name: (options == null ? void 0 : options.name) ?? key
787
+ });
744
788
  },
745
789
  delete: (key) => {
746
790
  return resolveCache().delete(makeKey(key));
@@ -1062,6 +1106,99 @@ function requireAddcachetag() {
1062
1106
  };
1063
1107
  return addcachetag;
1064
1108
  }
1109
+ var websocket;
1110
+ var hasRequiredWebsocket;
1111
+ function requireWebsocket() {
1112
+ if (hasRequiredWebsocket) return websocket;
1113
+ hasRequiredWebsocket = 1;
1114
+ var __defProp = Object.defineProperty;
1115
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1116
+ var __getOwnPropNames = Object.getOwnPropertyNames;
1117
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
1118
+ var __export = (target, all) => {
1119
+ for (var name in all)
1120
+ __defProp(target, name, { get: all[name], enumerable: true });
1121
+ };
1122
+ var __copyProps = (to, from, except, desc) => {
1123
+ if (from && typeof from === "object" || typeof from === "function") {
1124
+ for (let key of __getOwnPropNames(from))
1125
+ if (!__hasOwnProp.call(to, key) && key !== except)
1126
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
1127
+ }
1128
+ return to;
1129
+ };
1130
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1131
+ var websocket_exports = {};
1132
+ __export(websocket_exports, {
1133
+ experimental_upgradeWebSocket: () => experimental_upgradeWebSocket
1134
+ });
1135
+ websocket = __toCommonJS(websocket_exports);
1136
+ var import_get_context = requireGetContext();
1137
+ const DEFAULT_MAX_PAYLOAD = 256 * 1024;
1138
+ async function loadWebSocketServer() {
1139
+ try {
1140
+ const ws = await import("./wrapper-CsxTXsPR.js");
1141
+ return ws.WebSocketServer;
1142
+ } catch {
1143
+ throw new Error(
1144
+ 'The "ws" package is required for experimental_upgradeWebSocket(). Install it with: npm install ws'
1145
+ );
1146
+ }
1147
+ }
1148
+ async function experimental_upgradeWebSocket(handler, options = {}) {
1149
+ const ctx = (0, import_get_context.getContext)();
1150
+ if (typeof ctx.upgradeWebSocket !== "function") {
1151
+ throw new Error(
1152
+ "experimental_upgradeWebSocket is not available in the current runtime environment. This feature requires a Vercel runtime that supports WebSocket upgrades."
1153
+ );
1154
+ }
1155
+ const WebSocketServer = await loadWebSocketServer();
1156
+ const { req, socket, head } = ctx.upgradeWebSocket();
1157
+ const wss = new WebSocketServer({
1158
+ noServer: true,
1159
+ maxPayload: options.maxPayload ?? DEFAULT_MAX_PAYLOAD
1160
+ });
1161
+ const ws = await new Promise((resolve, reject) => {
1162
+ const cleanup = () => {
1163
+ socket.removeListener("error", onError);
1164
+ socket.removeListener("close", onClose);
1165
+ };
1166
+ const rejectUpgrade = (err) => {
1167
+ cleanup();
1168
+ if (err instanceof Error) {
1169
+ reject(err);
1170
+ return;
1171
+ }
1172
+ const error = new Error("WebSocket upgrade failed");
1173
+ error.cause = err;
1174
+ reject(error);
1175
+ };
1176
+ const resolveUpgrade = (ws2) => {
1177
+ cleanup();
1178
+ resolve(ws2);
1179
+ };
1180
+ const onError = (err) => rejectUpgrade(err);
1181
+ const onClose = () => rejectUpgrade(
1182
+ new Error("socket closed before the WebSocket upgrade completed")
1183
+ );
1184
+ socket.once("error", onError);
1185
+ socket.once("close", onClose);
1186
+ try {
1187
+ wss.handleUpgrade(req, socket, head, resolveUpgrade);
1188
+ } catch (err) {
1189
+ rejectUpgrade(err);
1190
+ }
1191
+ });
1192
+ try {
1193
+ await handler(ws);
1194
+ } catch (err) {
1195
+ ws.close(1011, "WebSocket handler failed");
1196
+ throw err;
1197
+ }
1198
+ return new Response(null, { status: 204 });
1199
+ }
1200
+ return websocket;
1201
+ }
1065
1202
  var functions;
1066
1203
  var hasRequiredFunctions;
1067
1204
  function requireFunctions() {
@@ -1091,8 +1228,10 @@ function requireFunctions() {
1091
1228
  dangerouslyDeleteBySrcImage: () => import_purge.dangerouslyDeleteBySrcImage,
1092
1229
  dangerouslyDeleteByTag: () => import_purge.dangerouslyDeleteByTag,
1093
1230
  experimental_attachDatabasePool: () => import_db_connections.experimental_attachDatabasePool,
1231
+ experimental_upgradeWebSocket: () => import_websocket.experimental_upgradeWebSocket,
1094
1232
  geolocation: () => import_headers.geolocation,
1095
1233
  getCache: () => import_cache.getCache,
1234
+ getDeadline: () => import_deadline.getDeadline,
1096
1235
  getEnv: () => import_get_env.getEnv,
1097
1236
  invalidateBySrcImage: () => import_purge.invalidateBySrcImage,
1098
1237
  invalidateByTag: () => import_purge.invalidateByTag,
@@ -1104,12 +1243,14 @@ function requireFunctions() {
1104
1243
  functions = __toCommonJS(src_exports);
1105
1244
  var import_headers = requireHeaders();
1106
1245
  var import_get_env = requireGetEnv();
1246
+ var import_deadline = requireDeadline();
1107
1247
  var import_wait_until = requireWaitUntil();
1108
1248
  var import_middleware = requireMiddleware();
1109
1249
  var import_cache = requireCache();
1110
1250
  var import_db_connections = requireDbConnections();
1111
1251
  var import_purge = requirePurge();
1112
1252
  var import_addcachetag = requireAddcachetag();
1253
+ var import_websocket = requireWebsocket();
1113
1254
  return functions;
1114
1255
  }
1115
1256
  var functionsExports = requireFunctions();
@@ -0,0 +1,143 @@
1
+ import { createRequire as __wkfCreateRequire } from "node:module";
2
+ if (typeof require === "undefined") {
3
+ globalThis.require = __wkfCreateRequire(import.meta.url);
4
+ }
5
+ import { H as HookSchema } from "./app-BJXoDV4n.js";
6
+ import { A, a, b, c, d, e, f, g, h, i, j, k, B, l, m, n, o, C, D, p, E, q, r, s, t, u, v, w, x, y, z, L, M, P, F, Q, G, R, I, J, S, K, O, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD } from "./app-BJXoDV4n.js";
7
+ import "node:stream";
8
+ import "stream";
9
+ import "util";
10
+ import "crypto";
11
+ import "async_hooks";
12
+ import "node:crypto";
13
+ import "node:process";
14
+ import "node:path";
15
+ import "node:url";
16
+ import "module";
17
+ import "node:fs/promises";
18
+ import "node:module";
19
+ import "node:util";
20
+ import "node:async_hooks";
21
+ import "node:fs";
22
+ import "node:os";
23
+ import "node:child_process";
24
+ import "node:timers/promises";
25
+ import "events";
26
+ import "node:assert";
27
+ import "node:net";
28
+ import "node:http";
29
+ import "node:querystring";
30
+ import "node:events";
31
+ import "node:diagnostics_channel";
32
+ import "node:tls";
33
+ import "node:buffer";
34
+ import "node:zlib";
35
+ import "node:perf_hooks";
36
+ import "node:util/types";
37
+ import "node:sqlite";
38
+ import "node:worker_threads";
39
+ import "node:console";
40
+ import "node:timers";
41
+ import "node:dns";
42
+ import "path";
43
+ import "fs";
44
+ import "constants";
45
+ import "assert";
46
+ import "os";
47
+ import "net";
48
+ import "express";
49
+ export {
50
+ A as ATTRIBUTE_KEY_MAX_LENGTH,
51
+ a as ATTRIBUTE_MAX_PER_RUN,
52
+ b as ATTRIBUTE_VALUE_MAX_BYTES,
53
+ c as AnalyticsAttributeKeySchema,
54
+ d as AnalyticsEventSchema,
55
+ e as AnalyticsHookSchema,
56
+ f as AnalyticsRunSchema,
57
+ g as AnalyticsStepSchema,
58
+ h as AnalyticsWaitSchema,
59
+ i as AttributeChangeSchema,
60
+ j as AttributeChangesSchema,
61
+ k as AttributeValidationError,
62
+ B as BULK_CANCEL_MAX_RUN_IDS,
63
+ l as BaseEventSchema,
64
+ m as BulkCancelWorkflowRunResultSchema,
65
+ n as BulkCancelWorkflowRunsRequestSchema,
66
+ o as BulkCancelWorkflowRunsResultSchema,
67
+ C as CHILD_ENTITY_CREATION_EVENT_TYPES,
68
+ D as DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS,
69
+ p as DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS,
70
+ E as EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE,
71
+ q as EVENT_DATA_REF_FIELDS,
72
+ r as EventSchema,
73
+ s as EventTypeSchema,
74
+ t as HOOK_EVENTS_REQUIRING_EXISTENCE,
75
+ u as HOOK_LIFECYCLE_EVENT_TYPES,
76
+ v as HOOK_RESUME_DEDUP_VERSION,
77
+ w as HOOK_RESUME_INPUT_VERSION,
78
+ x as HealthCheckPayloadSchema,
79
+ y as HookCreatedEventSchema,
80
+ z as HookResumeCapabilitiesSchema,
81
+ HookSchema,
82
+ L as LegacySerializedDataSchemaV1,
83
+ M as MessageId,
84
+ P as PARENT_RUN_ID_ATTRIBUTE,
85
+ F as PaginatedResponseSchema,
86
+ Q as QueuePayloadSchema,
87
+ G as QueuePrefix,
88
+ R as RESERVED_ATTRIBUTE_KEY_PREFIX,
89
+ I as ROOT_RUN_ID_ATTRIBUTE,
90
+ J as RunInputSchema,
91
+ S as SPEC_VERSION_CURRENT,
92
+ K as SPEC_VERSION_LEGACY,
93
+ O as SPEC_VERSION_SUPPORTS_ATTRIBUTES,
94
+ T as SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT,
95
+ U as SPEC_VERSION_SUPPORTS_COMPRESSION,
96
+ V as STEP_EVENT_TYPES,
97
+ W as SerializedDataSchema,
98
+ X as StepSchema,
99
+ Y as StepStatusSchema,
100
+ Z as StructuredErrorSchema,
101
+ _ as TERMINAL_RUN_EVENT_TYPES,
102
+ $ as TERMINAL_STEP_EVENT_TYPES,
103
+ a0 as TERMINAL_STEP_STATUSES,
104
+ a1 as TERMINAL_WORKFLOW_RUN_STATUSES,
105
+ a2 as TerminalRunEventTypeSchema,
106
+ a3 as TerminalStepStatusSchema,
107
+ a4 as TerminalWorkflowRunStatusSchema,
108
+ a5 as ValidQueueName,
109
+ a6 as WAIT_EVENT_TYPES,
110
+ a7 as WaitSchema,
111
+ a8 as WaitStatusSchema,
112
+ a9 as WorkflowInvokePayloadSchema,
113
+ aa as WorkflowRunBaseSchema,
114
+ ab as WorkflowRunSchema,
115
+ ac as WorkflowRunStatusSchema,
116
+ ad as applyAttributeChanges,
117
+ ae as envNumber,
118
+ af as getEventDataPayloadField,
119
+ ag as getEventDataRefFields,
120
+ ah as getQueueTopicPrefix,
121
+ ai as isChildEntityCreationEvent,
122
+ aj as isChildEntityCreationEventType,
123
+ ak as isHookEventRequiringExistence,
124
+ al as isHookLifecycleEventType,
125
+ am as isLegacySpecVersion,
126
+ an as isStepEventType,
127
+ ao as isTerminalRunEventType,
128
+ ap as isTerminalStepEventType,
129
+ aq as isTerminalStepStatus,
130
+ ar as isTerminalWorkflowRunStatus,
131
+ as as isWaitEventType,
132
+ at as parseQueueName,
133
+ au as reenqueueActiveRuns,
134
+ av as requiresNewerWorld,
135
+ aw as resolveQueueNamespace,
136
+ ax as stripEventDataRefs,
137
+ ay as ulidToDate,
138
+ az as validateAttributeChanges,
139
+ aA as validateAttributeKey,
140
+ aB as validateAttributeValue,
141
+ aC as validateUlidTimestamp,
142
+ aD as workflowRunIdSchema
143
+ };
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { N as Nt } from "./app-Bd12Opaf.js";
5
+ import { N as Nt } from "./app-BJXoDV4n.js";
6
6
  import "node:stream";
7
7
  import "stream";
8
8
  import "util";
@@ -40,6 +40,8 @@ import "node:timers";
40
40
  import "node:dns";
41
41
  import "path";
42
42
  import "fs";
43
+ import "constants";
44
+ import "assert";
43
45
  import "os";
44
46
  import "net";
45
47
  import "express";
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { aI as requireTokenError, aH as requireTokenUtil, aG as getDefaultExportFromCjs } from "./app-Bd12Opaf.js";
5
+ import { aM as requireTokenError, aL as requireTokenUtil, aK as getDefaultExportFromCjs } from "./app-BJXoDV4n.js";
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { aG as getDefaultExportFromCjs, aH as requireTokenUtil } from "./app-Bd12Opaf.js";
5
+ import { aK as getDefaultExportFromCjs, aL as requireTokenUtil } from "./app-BJXoDV4n.js";
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];