@workflow/web 5.0.0-beta.5 → 5.0.0-beta.50

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 (48) hide show
  1. package/README.md +1 -0
  2. package/build/client/assets/app-9JVnf-IU.css +1 -0
  3. package/build/client/assets/arrow-up-right-CSovqivK.js +15 -0
  4. package/build/client/assets/{entry.client-DtOpLtMQ.js → entry.client-LwI3HNYl.js} +25 -25
  5. package/build/client/assets/{highlighted-body-B3W2YXNL-L1CrwoL_.js → highlighted-body-B3W2YXNL-BO5_Ufo-.js} +2 -2
  6. package/build/client/assets/{home-B6UmDDP6.js → home-BbyW_T74.js} +1762 -291
  7. package/build/client/assets/index-HqNj_XIX.js +200 -0
  8. package/build/client/assets/{index-BsV8i_Jn.js → index-PFjW8YjQ.js} +26 -26
  9. package/build/client/assets/loader-circle-BX6ycuOI.js +12 -0
  10. package/build/client/assets/manifest-34c486ef.js +1 -0
  11. package/build/client/assets/{mermaid-3ZIDBTTL-BQLU7GUr.js → mermaid-3ZIDBTTL-BKwl_LgA.js} +6469 -4784
  12. package/build/client/assets/mermaid-3ZIDBTTL-D8CjRQta.css +1 -0
  13. package/build/client/assets/root-Bl5xphvU.css +1 -0
  14. package/build/client/assets/{root-Yk3JVwUh.js → root-qx_45_fH.js} +17 -42
  15. package/build/client/assets/{run-detail-DMUaWXhb.js → run-detail-BoGFG1Fe.js} +2208 -1597
  16. package/build/client/assets/run-detail-CWoGxu_0.css +1 -0
  17. package/build/client/assets/{workflow-graph-viewer-yqeN-U_2.js → workflow-graph-viewer-C-1D0sAn.js} +5111 -5254
  18. package/build/client/assets/zstd-B5R2yJjB.wasm +0 -0
  19. package/build/client/assets/zstd-browser-decoder-By3hr1F0.js +27 -0
  20. package/build/server/assets/{server-build-DtcOUEHS.js → app-CBtZR8rR.js} +66453 -43314
  21. package/build/server/assets/{highlighted-body-B3W2YXNL-CZjJIpdD.js → highlighted-body-B3W2YXNL-BjGiR49i.js} +15 -8
  22. package/build/server/assets/index-BYoi2wsy.js +1262 -0
  23. package/build/server/assets/index-BfLBLRRi.js +204 -0
  24. package/build/server/assets/index-CETb4fkq.js +1164 -0
  25. package/build/server/assets/index-glWWjG5N.js +173 -0
  26. package/build/server/assets/{mermaid-3ZIDBTTL-Cc8IPTBj.js → mermaid-3ZIDBTTL-DRi-PBW7.js} +16 -9
  27. package/build/server/assets/{token-DHnArVm7.js → token-RGgCwymE.js} +5 -2
  28. package/build/server/assets/{token-util-B3uKeZ0s.js → token-util-wecZ3LiF.js} +5 -2
  29. package/build/server/assets/websocket-server-DwbEw-Dm.js +3669 -0
  30. package/build/server/assets/wrapper-B4hIt4qi.js +68 -0
  31. package/build/server/assets/ws-transport-Dj_kuAkL.js +550 -0
  32. package/build/server/assets/zstd-browser-decoder-Coywki2m.js +71 -0
  33. package/build/server/index.js +49 -2
  34. package/handler.d.ts +22 -0
  35. package/handler.js +186 -0
  36. package/package.json +27 -13
  37. package/registry.d.ts +29 -0
  38. package/registry.js +89 -0
  39. package/build/client/assets/encryption-CEh0YXii.js +0 -28
  40. package/build/client/assets/index-B4xuge0I.js +0 -249
  41. package/build/client/assets/manifest-e4c1c787.js +0 -1
  42. package/build/client/assets/mermaid-3ZIDBTTL-DKxHcEOp.css +0 -1
  43. package/build/client/assets/root-C0Tu5TVN.css +0 -1
  44. package/build/client/assets/server-build-DqaxIrF0.css +0 -1
  45. package/build/client/assets/worker-CqHKTA7D.js +0 -115
  46. package/build/server/assets/app-L1V62FgT.js +0 -9213
  47. package/build/server/assets/index-BwtNigf1.js +0 -80
  48. package/build/server/assets/index-meg9qk8y.js +0 -1282
@@ -0,0 +1,200 @@
1
+ const compiledCache = /* @__PURE__ */ new WeakMap();
2
+ async function compileSource(source) {
3
+ const resolved = await source;
4
+ if (resolved instanceof WebAssembly.Module)
5
+ return resolved;
6
+ const buf = resolved;
7
+ const cacheKey = buf.buffer instanceof ArrayBuffer ? buf.buffer : buf;
8
+ const cached = compiledCache.get(cacheKey);
9
+ if (cached)
10
+ return cached;
11
+ const compiled = await WebAssembly.compile(buf);
12
+ compiledCache.set(cacheKey, compiled);
13
+ return compiled;
14
+ }
15
+ const BUF_LAYOUT = {
16
+ src: 0,
17
+ srcSize: 4,
18
+ srcPos: 8,
19
+ dst: 12,
20
+ dstSize: 16,
21
+ dstPos: 20,
22
+ SIZE: 24
23
+ };
24
+ function readCString(memory, ptr) {
25
+ const bytes = new Uint8Array(memory.buffer, ptr);
26
+ let end = 0;
27
+ while (bytes[end] !== 0 && end < bytes.length)
28
+ end++;
29
+ return new TextDecoder().decode(bytes.subarray(0, end));
30
+ }
31
+ class ZstdDecoder {
32
+ constructor(exports, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr) {
33
+ this.exports = exports;
34
+ this.dctxPtr = dctxPtr;
35
+ this.inPtr = inPtr;
36
+ this.inCap = inCap;
37
+ this.outPtr = outPtr;
38
+ this.outCap = outCap;
39
+ this.bufPtr = bufPtr;
40
+ }
41
+ /**
42
+ * Compile the bundled `zstd.wasm` (or a pre-compiled module) and
43
+ * return a ready-to-use `ZstdDecoder`.
44
+ */
45
+ static async create(wasm) {
46
+ const module = await compileSource(wasm);
47
+ const instance = await WebAssembly.instantiate(module, {});
48
+ const exports = instance.exports;
49
+ const dctxPtr = exports.dctx_new();
50
+ if (!dctxPtr)
51
+ throw new Error("zstd: failed to allocate decompression context");
52
+ const inCap = exports.dstream_in_size();
53
+ const outCap = exports.dstream_out_size();
54
+ const inPtr = exports.zstd_malloc(inCap);
55
+ const outPtr = exports.zstd_malloc(outCap);
56
+ const bufPtr = exports.zstd_malloc(BUF_LAYOUT.SIZE);
57
+ if (!inPtr || !outPtr || !bufPtr) {
58
+ throw new Error("zstd: failed to allocate streaming buffers");
59
+ }
60
+ return new ZstdDecoder(exports, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr);
61
+ }
62
+ dispose() {
63
+ if (!this.dctxPtr)
64
+ return;
65
+ const e = this.exports;
66
+ e.dctx_free(this.dctxPtr);
67
+ e.zstd_free(this.inPtr);
68
+ e.zstd_free(this.outPtr);
69
+ e.zstd_free(this.bufPtr);
70
+ this.dctxPtr = 0;
71
+ }
72
+ /**
73
+ * Get a fresh `Uint8Array` view of WASM linear memory.
74
+ *
75
+ * IMPORTANT: any call into WASM may grow `memory.buffer`, which
76
+ * detaches all existing `ArrayBuffer`-backed views. Always
77
+ * re-acquire views from this getter (and `bufView`) AFTER each
78
+ * WASM call rather than caching them.
79
+ */
80
+ get heap() {
81
+ return new Uint8Array(this.exports.memory.buffer);
82
+ }
83
+ get bufView() {
84
+ return new DataView(this.exports.memory.buffer, this.bufPtr, BUF_LAYOUT.SIZE);
85
+ }
86
+ checkError(ret) {
87
+ if (this.exports.is_error(ret) !== 0) {
88
+ const name = readCString(this.exports.memory, this.exports.get_error_name(ret));
89
+ throw new Error(`zstd: ${name} (code ${ret})`);
90
+ }
91
+ }
92
+ /**
93
+ * Feed `chunk` to the decoder and pull out as much decoded data
94
+ * as fits in our output buffer. Calls `onOutput` zero or more
95
+ * times with non-empty `Uint8Array` slices into the WASM memory.
96
+ *
97
+ * IMPORTANT: the slices passed to `onOutput` are views into WASM
98
+ * memory and are only valid until the next decoder call. Callers
99
+ * that need to keep the data must copy it (`.slice()` or
100
+ * `.set()` into their own buffer).
101
+ */
102
+ push(chunk, onOutput) {
103
+ const e = this.exports;
104
+ let chunkOffset = 0;
105
+ while (chunkOffset < chunk.length) {
106
+ const copyLen = Math.min(chunk.length - chunkOffset, this.inCap);
107
+ this.heap.set(chunk.subarray(chunkOffset, chunkOffset + copyLen), this.inPtr);
108
+ chunkOffset += copyLen;
109
+ let srcPos = 0;
110
+ while (srcPos < copyLen) {
111
+ let view = this.bufView;
112
+ view.setUint32(BUF_LAYOUT.src, this.inPtr, true);
113
+ view.setUint32(BUF_LAYOUT.srcSize, copyLen, true);
114
+ view.setUint32(BUF_LAYOUT.srcPos, srcPos, true);
115
+ view.setUint32(BUF_LAYOUT.dst, this.outPtr, true);
116
+ view.setUint32(BUF_LAYOUT.dstSize, this.outCap, true);
117
+ view.setUint32(BUF_LAYOUT.dstPos, 0, true);
118
+ const ret = e.decompress_stream(this.dctxPtr, this.bufPtr);
119
+ this.checkError(ret);
120
+ view = this.bufView;
121
+ const dstPos = view.getUint32(BUF_LAYOUT.dstPos, true);
122
+ if (dstPos > 0) {
123
+ onOutput(this.heap.subarray(this.outPtr, this.outPtr + dstPos));
124
+ }
125
+ const newSrcPos = view.getUint32(BUF_LAYOUT.srcPos, true);
126
+ if (newSrcPos === srcPos && dstPos === 0) {
127
+ throw new Error("zstd: decoder made no progress");
128
+ }
129
+ srcPos = newSrcPos;
130
+ if (ret === 0 && srcPos === copyLen)
131
+ break;
132
+ }
133
+ }
134
+ }
135
+ /**
136
+ * Decompress an entire compressed buffer in one shot. Convenient
137
+ * for small inputs; large inputs should prefer
138
+ * `ZstdDecompressStream` to avoid buffering everything in memory.
139
+ */
140
+ decode(compressed) {
141
+ const out = [];
142
+ let total = 0;
143
+ this.push(compressed, (chunk) => {
144
+ const copy = new Uint8Array(chunk);
145
+ out.push(copy);
146
+ total += copy.length;
147
+ });
148
+ const result = new Uint8Array(total);
149
+ let off = 0;
150
+ for (const c of out) {
151
+ result.set(c, off);
152
+ off += c.length;
153
+ }
154
+ return result;
155
+ }
156
+ }
157
+ class ZstdDecompressStream extends TransformStream {
158
+ constructor(wasm) {
159
+ let decoderPromise = null;
160
+ const getDecoder = () => {
161
+ if (!decoderPromise)
162
+ decoderPromise = ZstdDecoder.create(wasm);
163
+ return decoderPromise;
164
+ };
165
+ super({
166
+ async transform(chunk, controller) {
167
+ try {
168
+ const dec = await getDecoder();
169
+ dec.push(chunk, (out) => {
170
+ controller.enqueue(new Uint8Array(out));
171
+ });
172
+ } catch (err) {
173
+ controller.error(err);
174
+ }
175
+ },
176
+ async flush() {
177
+ if (decoderPromise) {
178
+ try {
179
+ const dec = await decoderPromise;
180
+ dec.dispose();
181
+ } catch {
182
+ }
183
+ }
184
+ }
185
+ });
186
+ }
187
+ }
188
+ async function decompressBytes(wasm, compressed) {
189
+ const dec = await ZstdDecoder.create(wasm);
190
+ try {
191
+ return dec.decode(compressed);
192
+ } finally {
193
+ dec.dispose();
194
+ }
195
+ }
196
+ export {
197
+ ZstdDecoder,
198
+ ZstdDecompressStream,
199
+ decompressBytes
200
+ };
@@ -9388,45 +9388,45 @@ function useViewTransitionState(to, { relative } = {}) {
9388
9388
  var reactDomExports = requireReactDom();
9389
9389
  const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
9390
9390
  export {
9391
- Link as A,
9392
- useNavigate as B,
9393
- useSearchParams as C,
9391
+ mapRouteProperties as A,
9392
+ hydrationRouteProperties as B,
9393
+ useLocation as C,
9394
9394
  ReactDOM as D,
9395
9395
  ErrorResponseImpl as E,
9396
9396
  FrameworkContext as F,
9397
- useLocation as G,
9398
- useParams as H,
9399
- React as I,
9397
+ useParams as G,
9398
+ React as H,
9399
+ getDefaultExportFromCjs as I,
9400
9400
  Links as L,
9401
9401
  Meta as M,
9402
9402
  NO_BODY_STATUS_CODES as N,
9403
9403
  Outlet as O,
9404
9404
  ReactExports as R,
9405
9405
  ScrollRestoration as S,
9406
- requireReact as a,
9407
- requireReactDom as b,
9408
- invariant as c,
9409
- RemixErrorBoundary as d,
9410
- RouterProvider as e,
9411
- reactDomExports as f,
9412
- getDefaultExportFromCjs as g,
9413
- decodeViaTurboStream as h,
9406
+ withErrorBoundaryProps as a,
9407
+ Scripts as b,
9408
+ Link as c,
9409
+ useNavigate as d,
9410
+ useSearchParams as e,
9411
+ requireReact as f,
9412
+ requireReactDom as g,
9413
+ invariant as h,
9414
9414
  isRouteErrorResponse as i,
9415
9415
  jsxRuntimeExports as j,
9416
- createClientRoutes as k,
9417
- createRouter as l,
9416
+ useFogOFWarDiscovery as k,
9417
+ RemixErrorBoundary as l,
9418
9418
  matchRoutes as m,
9419
- getPatchRoutesOnNavigationFunction as n,
9420
- getTurboStreamSingleFetchDataStrategy as o,
9421
- createBrowserHistory as p,
9422
- createClientRoutesWithHMRRevalidationOptOut as q,
9419
+ RouterProvider as n,
9420
+ reactDomExports as o,
9421
+ decodeViaTurboStream as p,
9422
+ createClientRoutes as q,
9423
9423
  reactExports as r,
9424
9424
  shouldHydrateRouteLoader as s,
9425
- mapRouteProperties as t,
9426
- useFogOFWarDiscovery as u,
9427
- hydrationRouteProperties as v,
9425
+ createRouter as t,
9426
+ useRouteError as u,
9427
+ getPatchRoutesOnNavigationFunction as v,
9428
9428
  withComponentProps as w,
9429
- withErrorBoundaryProps as x,
9430
- Scripts as y,
9431
- useRouteError as z
9429
+ getTurboStreamSingleFetchDataStrategy as x,
9430
+ createBrowserHistory as y,
9431
+ createClientRoutesWithHMRRevalidationOptOut as z
9432
9432
  };
@@ -0,0 +1,12 @@
1
+ import { c as createLucideIcon } from "./mermaid-3ZIDBTTL-BKwl_LgA.js";
2
+ /**
3
+ * @license lucide-react v0.575.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const __iconNode = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
9
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode);
10
+ export {
11
+ LoaderCircle as L
12
+ };
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-LwI3HNYl.js","imports":["/assets/index-PFjW8YjQ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-qx_45_fH.js","imports":["/assets/index-PFjW8YjQ.js","/assets/mermaid-3ZIDBTTL-BKwl_LgA.js","/assets/loader-circle-BX6ycuOI.js","/assets/arrow-up-right-CSovqivK.js"],"css":["/assets/root-Bl5xphvU.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.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-BbyW_T74.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-C-1D0sAn.js","/assets/mermaid-3ZIDBTTL-BKwl_LgA.js","/assets/loader-circle-BX6ycuOI.js"],"css":["/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.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-BoGFG1Fe.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-C-1D0sAn.js","/assets/mermaid-3ZIDBTTL-BKwl_LgA.js","/assets/arrow-up-right-CSovqivK.js"],"css":["/assets/run-detail-CWoGxu_0.css","/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.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-34c486ef.js","version":"34c486ef"};