@workflow/web 5.0.0-beta.12 → 5.0.0-beta.13
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/{highlighted-body-B3W2YXNL-DmlmGvFd.js → highlighted-body-B3W2YXNL-B8ZRlnzz.js} +1 -1
- package/build/client/assets/{home-BQRPxkXT.js → home-1yC3MOjQ.js} +2 -2
- package/build/client/assets/{manifest-b8838010.js → manifest-9f37c22f.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-CeSti4VQ.js → mermaid-3ZIDBTTL-BDM4-x6u.js} +312 -292
- package/build/client/assets/root-Bqr5evzw.css +1 -0
- package/build/client/assets/{root-8wYQKqnE.js → root-C5RLIKj5.js} +1 -1
- package/build/client/assets/{run-detail-Dn4QeKHW.js → run-detail-DM1PDAnQ.js} +28 -32
- package/build/client/assets/server-build-CNnlgxpd.css +1 -0
- package/build/client/assets/{workflow-graph-viewer-CxZS9r2o.js → workflow-graph-viewer-C8H50hkM.js} +1 -1
- package/build/server/assets/{app-D-W9Jr82.js → app-eXXkzWLS.js} +2 -2
- package/build/server/assets/{highlighted-body-B3W2YXNL-CcRpp5rq.js → highlighted-body-B3W2YXNL-DMxq-VLe.js} +2 -2
- package/build/server/assets/{index-BUU6Hdm_.js → index-BjEgWhxl.js} +3 -3
- package/build/server/assets/{mermaid-3ZIDBTTL-Nh9-IDfL.js → mermaid-3ZIDBTTL-DNPNsNRF.js} +2 -2
- package/build/server/assets/{server-build-BshzAvNv.js → server-build-CSP1Aknr.js} +847 -770
- package/build/server/assets/{token-BaJALexf.js → token-DOrkjd5O.js} +2 -2
- package/build/server/assets/{token-util-Bc0jltWL.js → token-util-Hv7wRzsW.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +8 -8
- package/build/client/assets/root-DvB36HGI.css +0 -1
- package/build/client/assets/server-build-B5Dibl7P.css +0 -1
|
@@ -13,8 +13,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
13
13
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
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
|
-
var _a2, _b, _c, _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, 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-
|
|
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-eXXkzWLS.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";
|
|
@@ -25838,7 +25838,7 @@ var CONTENT_NAME$9 = "PopperContent";
|
|
|
25838
25838
|
var [PopperContentProvider$1, useContentContext$1] = createPopperContext$1(CONTENT_NAME$9);
|
|
25839
25839
|
var PopperContent$1 = reactExports.forwardRef(
|
|
25840
25840
|
(props, forwardedRef) => {
|
|
25841
|
-
var _a3, _b2, _c2,
|
|
25841
|
+
var _a3, _b2, _c2, _d2, _e2, _f;
|
|
25842
25842
|
const {
|
|
25843
25843
|
__scopePopper,
|
|
25844
25844
|
side = "bottom",
|
|
@@ -25936,7 +25936,7 @@ var PopperContent$1 = reactExports.forwardRef(
|
|
|
25936
25936
|
minWidth: "max-content",
|
|
25937
25937
|
zIndex: contentZIndex,
|
|
25938
25938
|
["--radix-popper-transform-origin"]: [
|
|
25939
|
-
(
|
|
25939
|
+
(_d2 = middlewareData.transformOrigin) == null ? void 0 : _d2.x,
|
|
25940
25940
|
(_e2 = middlewareData.transformOrigin) == null ? void 0 : _e2.y
|
|
25941
25941
|
].join(" "),
|
|
25942
25942
|
// hide the content if using the hide middleware and should be hidden
|
|
@@ -34018,6 +34018,42 @@ const Lr = /* @__PURE__ */ K$3(() => {
|
|
|
34018
34018
|
function kn$1(t, e, n) {
|
|
34019
34019
|
return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct$1.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
|
|
34020
34020
|
}
|
|
34021
|
+
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
34022
|
+
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
34023
|
+
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
34024
|
+
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
34025
|
+
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
34026
|
+
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
34027
|
+
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
34028
|
+
const match2 = query.match(pattern2);
|
|
34029
|
+
if (!match2) {
|
|
34030
|
+
return null;
|
|
34031
|
+
}
|
|
34032
|
+
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
34033
|
+
}
|
|
34034
|
+
function parseExactWorkflowSearchId(query) {
|
|
34035
|
+
const trimmed = query.trim();
|
|
34036
|
+
if (!trimmed) {
|
|
34037
|
+
return null;
|
|
34038
|
+
}
|
|
34039
|
+
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
34040
|
+
}
|
|
34041
|
+
function looksLikeWorkflowIdSearchInput(query) {
|
|
34042
|
+
const trimmed = query.trim();
|
|
34043
|
+
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
34044
|
+
return false;
|
|
34045
|
+
}
|
|
34046
|
+
return /\d/.test(trimmed);
|
|
34047
|
+
}
|
|
34048
|
+
const UNDEFINED = -1;
|
|
34049
|
+
const HOLE = -2;
|
|
34050
|
+
const NAN = -3;
|
|
34051
|
+
const POSITIVE_INFINITY = -4;
|
|
34052
|
+
const NEGATIVE_INFINITY = -5;
|
|
34053
|
+
const NEGATIVE_ZERO = -6;
|
|
34054
|
+
const SPARSE = -7;
|
|
34055
|
+
const MAX_ARRAY_LEN = 2 ** 32 - 1;
|
|
34056
|
+
const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
|
|
34021
34057
|
class DevalueError extends Error {
|
|
34022
34058
|
/**
|
|
34023
34059
|
* @param {string} message
|
|
@@ -34034,11 +34070,9 @@ class DevalueError extends Error {
|
|
|
34034
34070
|
}
|
|
34035
34071
|
}
|
|
34036
34072
|
function is_primitive(thing) {
|
|
34037
|
-
return
|
|
34073
|
+
return thing === null || typeof thing !== "object" && typeof thing !== "function";
|
|
34038
34074
|
}
|
|
34039
|
-
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(
|
|
34040
|
-
Object.prototype
|
|
34041
|
-
).sort().join("\0");
|
|
34075
|
+
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
34042
34076
|
function is_plain_object(thing) {
|
|
34043
34077
|
const proto2 = Object.getPrototypeOf(thing);
|
|
34044
34078
|
return proto2 === Object.prototype || proto2 === null || Object.getPrototypeOf(proto2) === null || Object.getOwnPropertyNames(proto2).sort().join("\0") === object_proto_names;
|
|
@@ -34095,105 +34129,72 @@ const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
|
34095
34129
|
function stringify_key(key) {
|
|
34096
34130
|
return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
|
|
34097
34131
|
}
|
|
34098
|
-
function is_valid_array_index(
|
|
34132
|
+
function is_valid_array_index(n) {
|
|
34133
|
+
if (!Number.isInteger(n)) return false;
|
|
34134
|
+
if (n < 0) return false;
|
|
34135
|
+
if (n > MAX_ARRAY_INDEX) return false;
|
|
34136
|
+
return true;
|
|
34137
|
+
}
|
|
34138
|
+
function is_valid_array_len(n) {
|
|
34139
|
+
if (!Number.isInteger(n)) return false;
|
|
34140
|
+
if (n < 0) return false;
|
|
34141
|
+
if (n > MAX_ARRAY_LEN) return false;
|
|
34142
|
+
return true;
|
|
34143
|
+
}
|
|
34144
|
+
function is_valid_array_index_string(s2) {
|
|
34099
34145
|
if (s2.length === 0) return false;
|
|
34100
34146
|
if (s2.length > 1 && s2.charCodeAt(0) === 48) return false;
|
|
34101
34147
|
for (let i = 0; i < s2.length; i++) {
|
|
34102
34148
|
const c = s2.charCodeAt(i);
|
|
34103
34149
|
if (c < 48 || c > 57) return false;
|
|
34104
34150
|
}
|
|
34105
|
-
|
|
34106
|
-
if (n >= 2 ** 32 - 1) return false;
|
|
34107
|
-
if (n < 0) return false;
|
|
34108
|
-
return true;
|
|
34151
|
+
return is_valid_array_index(+s2);
|
|
34109
34152
|
}
|
|
34110
34153
|
function valid_array_indices(array2) {
|
|
34111
34154
|
const keys2 = Object.keys(array2);
|
|
34112
34155
|
for (var i = keys2.length - 1; i >= 0; i--) {
|
|
34113
|
-
if (
|
|
34156
|
+
if (is_valid_array_index_string(keys2[i])) {
|
|
34114
34157
|
break;
|
|
34115
34158
|
}
|
|
34116
34159
|
}
|
|
34117
34160
|
keys2.length = i + 1;
|
|
34118
34161
|
return keys2;
|
|
34119
34162
|
}
|
|
34120
|
-
function
|
|
34121
|
-
|
|
34122
|
-
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
|
|
34126
|
-
|
|
34127
|
-
|
|
34128
|
-
|
|
34129
|
-
|
|
34130
|
-
|
|
34131
|
-
|
|
34132
|
-
|
|
34133
|
-
|
|
34134
|
-
|
|
34135
|
-
|
|
34136
|
-
|
|
34137
|
-
const
|
|
34138
|
-
|
|
34139
|
-
if (data.length % 4 === 0) {
|
|
34140
|
-
data = data.replace(/==?$/, "");
|
|
34141
|
-
}
|
|
34142
|
-
let output = "";
|
|
34143
|
-
let buffer = 0;
|
|
34144
|
-
let accumulatedBits = 0;
|
|
34145
|
-
for (let i = 0; i < data.length; i++) {
|
|
34146
|
-
buffer <<= 6;
|
|
34147
|
-
buffer |= KEY_STRING.indexOf(data[i]);
|
|
34148
|
-
accumulatedBits += 6;
|
|
34149
|
-
if (accumulatedBits === 24) {
|
|
34150
|
-
output += String.fromCharCode((buffer & 16711680) >> 16);
|
|
34151
|
-
output += String.fromCharCode((buffer & 65280) >> 8);
|
|
34152
|
-
output += String.fromCharCode(buffer & 255);
|
|
34153
|
-
buffer = accumulatedBits = 0;
|
|
34154
|
-
}
|
|
34155
|
-
}
|
|
34156
|
-
if (accumulatedBits === 12) {
|
|
34157
|
-
buffer >>= 4;
|
|
34158
|
-
output += String.fromCharCode(buffer);
|
|
34159
|
-
} else if (accumulatedBits === 18) {
|
|
34160
|
-
buffer >>= 2;
|
|
34161
|
-
output += String.fromCharCode((buffer & 65280) >> 8);
|
|
34162
|
-
output += String.fromCharCode(buffer & 255);
|
|
34163
|
-
}
|
|
34164
|
-
return output;
|
|
34165
|
-
}
|
|
34166
|
-
function binaryToAscii(str) {
|
|
34167
|
-
let out = "";
|
|
34168
|
-
for (let i = 0; i < str.length; i += 3) {
|
|
34169
|
-
const groupsOfSix = [void 0, void 0, void 0, void 0];
|
|
34170
|
-
groupsOfSix[0] = str.charCodeAt(i) >> 2;
|
|
34171
|
-
groupsOfSix[1] = (str.charCodeAt(i) & 3) << 4;
|
|
34172
|
-
if (str.length > i + 1) {
|
|
34173
|
-
groupsOfSix[1] |= str.charCodeAt(i + 1) >> 4;
|
|
34174
|
-
groupsOfSix[2] = (str.charCodeAt(i + 1) & 15) << 2;
|
|
34175
|
-
}
|
|
34176
|
-
if (str.length > i + 2) {
|
|
34177
|
-
groupsOfSix[2] |= str.charCodeAt(i + 2) >> 6;
|
|
34178
|
-
groupsOfSix[3] = str.charCodeAt(i + 2) & 63;
|
|
34179
|
-
}
|
|
34180
|
-
for (let j2 = 0; j2 < groupsOfSix.length; j2++) {
|
|
34181
|
-
if (typeof groupsOfSix[j2] === "undefined") {
|
|
34182
|
-
out += "=";
|
|
34183
|
-
} else {
|
|
34184
|
-
out += KEY_STRING[groupsOfSix[j2]];
|
|
34185
|
-
}
|
|
34186
|
-
}
|
|
34163
|
+
function encode_native(array_buffer) {
|
|
34164
|
+
return new Uint8Array(array_buffer).toBase64();
|
|
34165
|
+
}
|
|
34166
|
+
function decode_native(base642) {
|
|
34167
|
+
return Uint8Array.fromBase64(base642).buffer;
|
|
34168
|
+
}
|
|
34169
|
+
function encode_buffer(array_buffer) {
|
|
34170
|
+
return Buffer.from(array_buffer).toString("base64");
|
|
34171
|
+
}
|
|
34172
|
+
function decode_buffer(base642) {
|
|
34173
|
+
return Uint8Array.from(Buffer.from(base642, "base64")).buffer;
|
|
34174
|
+
}
|
|
34175
|
+
function encode_legacy(array_buffer) {
|
|
34176
|
+
const array2 = new Uint8Array(array_buffer);
|
|
34177
|
+
let binary = "";
|
|
34178
|
+
const chunk_size = 32768;
|
|
34179
|
+
for (let i = 0; i < array2.length; i += chunk_size) {
|
|
34180
|
+
const chunk = array2.subarray(i, i + chunk_size);
|
|
34181
|
+
binary += String.fromCharCode.apply(null, chunk);
|
|
34187
34182
|
}
|
|
34188
|
-
return
|
|
34183
|
+
return btoa(binary);
|
|
34189
34184
|
}
|
|
34190
|
-
|
|
34191
|
-
const
|
|
34192
|
-
const
|
|
34193
|
-
const
|
|
34194
|
-
|
|
34195
|
-
|
|
34196
|
-
|
|
34185
|
+
function decode_legacy(base642) {
|
|
34186
|
+
const binary_string = atob(base642);
|
|
34187
|
+
const len = binary_string.length;
|
|
34188
|
+
const array2 = new Uint8Array(len);
|
|
34189
|
+
for (let i = 0; i < len; i++) {
|
|
34190
|
+
array2[i] = binary_string.charCodeAt(i);
|
|
34191
|
+
}
|
|
34192
|
+
return array2.buffer;
|
|
34193
|
+
}
|
|
34194
|
+
const native = typeof Uint8Array.fromBase64 === "function";
|
|
34195
|
+
const buffer = typeof process === "object" && ((_a2 = process.versions) == null ? void 0 : _a2.node) !== void 0;
|
|
34196
|
+
const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
|
|
34197
|
+
const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
|
|
34197
34198
|
function parse$7(serialized, revivers) {
|
|
34198
34199
|
return unflatten(JSON.parse(serialized), revivers);
|
|
34199
34200
|
}
|
|
@@ -34260,9 +34261,14 @@ function unflatten(parsed, revivers) {
|
|
|
34260
34261
|
case "RegExp":
|
|
34261
34262
|
hydrated[index2] = new RegExp(value[1], value[2]);
|
|
34262
34263
|
break;
|
|
34263
|
-
case "Object":
|
|
34264
|
-
|
|
34264
|
+
case "Object": {
|
|
34265
|
+
const wrapped_index = value[1];
|
|
34266
|
+
if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") {
|
|
34267
|
+
throw new Error("Invalid input");
|
|
34268
|
+
}
|
|
34269
|
+
hydrated[index2] = Object(hydrate(wrapped_index));
|
|
34265
34270
|
break;
|
|
34271
|
+
}
|
|
34266
34272
|
case "BigInt":
|
|
34267
34273
|
hydrated[index2] = BigInt(value[1]);
|
|
34268
34274
|
break;
|
|
@@ -34270,6 +34276,9 @@ function unflatten(parsed, revivers) {
|
|
|
34270
34276
|
const obj = /* @__PURE__ */ Object.create(null);
|
|
34271
34277
|
hydrated[index2] = obj;
|
|
34272
34278
|
for (let i = 1; i < value.length; i += 2) {
|
|
34279
|
+
if (value[i] === "__proto__") {
|
|
34280
|
+
throw new Error("Cannot parse an object with a `__proto__` property");
|
|
34281
|
+
}
|
|
34273
34282
|
obj[value[i]] = hydrate(value[i + 1]);
|
|
34274
34283
|
}
|
|
34275
34284
|
break;
|
|
@@ -34278,19 +34287,20 @@ function unflatten(parsed, revivers) {
|
|
|
34278
34287
|
case "Uint8ClampedArray":
|
|
34279
34288
|
case "Int16Array":
|
|
34280
34289
|
case "Uint16Array":
|
|
34290
|
+
case "Float16Array":
|
|
34281
34291
|
case "Int32Array":
|
|
34282
34292
|
case "Uint32Array":
|
|
34283
34293
|
case "Float32Array":
|
|
34284
34294
|
case "Float64Array":
|
|
34285
34295
|
case "BigInt64Array":
|
|
34286
|
-
case "BigUint64Array":
|
|
34296
|
+
case "BigUint64Array":
|
|
34297
|
+
case "DataView": {
|
|
34287
34298
|
if (values[value[1]][0] !== "ArrayBuffer") {
|
|
34288
34299
|
throw new Error("Invalid data");
|
|
34289
34300
|
}
|
|
34290
34301
|
const TypedArrayConstructor = globalThis[type];
|
|
34291
|
-
const
|
|
34292
|
-
|
|
34293
|
-
hydrated[index2] = value[2] !== void 0 ? typedArray.subarray(value[2], value[3]) : typedArray;
|
|
34302
|
+
const buffer2 = hydrate(value[1]);
|
|
34303
|
+
hydrated[index2] = value[2] !== void 0 ? new TypedArrayConstructor(buffer2, value[2], value[3]) : new TypedArrayConstructor(buffer2);
|
|
34294
34304
|
break;
|
|
34295
34305
|
}
|
|
34296
34306
|
case "ArrayBuffer": {
|
|
@@ -34329,12 +34339,21 @@ function unflatten(parsed, revivers) {
|
|
|
34329
34339
|
}
|
|
34330
34340
|
} else if (value[0] === SPARSE) {
|
|
34331
34341
|
const len = value[1];
|
|
34332
|
-
|
|
34342
|
+
if (!is_valid_array_len(len)) {
|
|
34343
|
+
throw new Error("Invalid input");
|
|
34344
|
+
}
|
|
34345
|
+
const array2 = [];
|
|
34333
34346
|
hydrated[index2] = array2;
|
|
34347
|
+
array2[MAX_ARRAY_INDEX] = void 0;
|
|
34348
|
+
delete array2[MAX_ARRAY_INDEX];
|
|
34334
34349
|
for (let i = 2; i < value.length; i += 2) {
|
|
34335
34350
|
const idx = value[i];
|
|
34351
|
+
if (!is_valid_array_index(idx) || idx >= len) {
|
|
34352
|
+
throw new Error("Invalid input");
|
|
34353
|
+
}
|
|
34336
34354
|
array2[idx] = hydrate(value[i + 1]);
|
|
34337
34355
|
}
|
|
34356
|
+
array2.length = len;
|
|
34338
34357
|
} else {
|
|
34339
34358
|
const array2 = new Array(value.length);
|
|
34340
34359
|
hydrated[index2] = array2;
|
|
@@ -34360,6 +34379,10 @@ function unflatten(parsed, revivers) {
|
|
|
34360
34379
|
return hydrate(0);
|
|
34361
34380
|
}
|
|
34362
34381
|
function stringify$2(value, reducers) {
|
|
34382
|
+
const stringified = run(false, value, reducers);
|
|
34383
|
+
return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
|
|
34384
|
+
}
|
|
34385
|
+
function run(async, value, reducers) {
|
|
34363
34386
|
const stringified = [];
|
|
34364
34387
|
const indexes = /* @__PURE__ */ new Map();
|
|
34365
34388
|
const custom2 = [];
|
|
@@ -34370,14 +34393,17 @@ function stringify$2(value, reducers) {
|
|
|
34370
34393
|
}
|
|
34371
34394
|
const keys2 = [];
|
|
34372
34395
|
let p2 = 0;
|
|
34373
|
-
function flatten(thing) {
|
|
34396
|
+
function flatten(thing, index3) {
|
|
34374
34397
|
if (thing === void 0) return UNDEFINED;
|
|
34375
34398
|
if (Number.isNaN(thing)) return NAN;
|
|
34376
34399
|
if (thing === Infinity) return POSITIVE_INFINITY;
|
|
34377
34400
|
if (thing === -Infinity) return NEGATIVE_INFINITY;
|
|
34378
34401
|
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
|
|
34379
|
-
if (indexes.has(thing)) return
|
|
34380
|
-
|
|
34402
|
+
if (indexes.has(thing)) return (
|
|
34403
|
+
/** @type {number} */
|
|
34404
|
+
indexes.get(thing)
|
|
34405
|
+
);
|
|
34406
|
+
index3 ?? (index3 = p2++);
|
|
34381
34407
|
indexes.set(thing, index3);
|
|
34382
34408
|
for (const { key, fn: fn2 } of custom2) {
|
|
34383
34409
|
const value2 = fn2(thing);
|
|
@@ -34388,20 +34414,29 @@ function stringify$2(value, reducers) {
|
|
|
34388
34414
|
}
|
|
34389
34415
|
if (typeof thing === "function") {
|
|
34390
34416
|
throw new DevalueError(`Cannot stringify a function`, keys2, thing, value);
|
|
34417
|
+
} else if (typeof thing === "symbol") {
|
|
34418
|
+
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys2, thing, value);
|
|
34391
34419
|
}
|
|
34392
34420
|
let str = "";
|
|
34393
34421
|
if (is_primitive(thing)) {
|
|
34394
34422
|
str = stringify_primitive(thing);
|
|
34423
|
+
} else if (typeof thing.then === "function") {
|
|
34424
|
+
{
|
|
34425
|
+
throw new DevalueError(
|
|
34426
|
+
`Cannot stringify a Promise or thenable — use stringifyAsync instead`,
|
|
34427
|
+
keys2,
|
|
34428
|
+
thing,
|
|
34429
|
+
value
|
|
34430
|
+
);
|
|
34431
|
+
}
|
|
34395
34432
|
} else {
|
|
34396
34433
|
const type = get_type(thing);
|
|
34397
34434
|
switch (type) {
|
|
34398
34435
|
case "Number":
|
|
34399
34436
|
case "String":
|
|
34400
34437
|
case "Boolean":
|
|
34401
|
-
str = `["Object",${stringify_primitive(thing)}]`;
|
|
34402
|
-
break;
|
|
34403
34438
|
case "BigInt":
|
|
34404
|
-
str = `["
|
|
34439
|
+
str = `["Object",${flatten(thing.valueOf())}]`;
|
|
34405
34440
|
break;
|
|
34406
34441
|
case "Date":
|
|
34407
34442
|
const valid2 = !isNaN(thing.getDate());
|
|
@@ -34465,9 +34500,7 @@ function stringify$2(value, reducers) {
|
|
|
34465
34500
|
case "Map":
|
|
34466
34501
|
str = '["Map"';
|
|
34467
34502
|
for (const [key, value2] of thing) {
|
|
34468
|
-
keys2.push(
|
|
34469
|
-
`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`
|
|
34470
|
-
);
|
|
34503
|
+
keys2.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
|
|
34471
34504
|
str += `,${flatten(key)},${flatten(value2)}`;
|
|
34472
34505
|
keys2.pop();
|
|
34473
34506
|
}
|
|
@@ -34478,19 +34511,18 @@ function stringify$2(value, reducers) {
|
|
|
34478
34511
|
case "Uint8ClampedArray":
|
|
34479
34512
|
case "Int16Array":
|
|
34480
34513
|
case "Uint16Array":
|
|
34514
|
+
case "Float16Array":
|
|
34481
34515
|
case "Int32Array":
|
|
34482
34516
|
case "Uint32Array":
|
|
34483
34517
|
case "Float32Array":
|
|
34484
34518
|
case "Float64Array":
|
|
34485
34519
|
case "BigInt64Array":
|
|
34486
|
-
case "BigUint64Array":
|
|
34520
|
+
case "BigUint64Array":
|
|
34521
|
+
case "DataView": {
|
|
34487
34522
|
const typedArray = thing;
|
|
34488
34523
|
str = '["' + type + '",' + flatten(typedArray.buffer);
|
|
34489
|
-
|
|
34490
|
-
|
|
34491
|
-
if (a2 > 0 || b2 !== typedArray.buffer.byteLength) {
|
|
34492
|
-
const m2 = +/(\d+)/.exec(type)[1] / 8;
|
|
34493
|
-
str += `,${a2 / m2},${b2 / m2}`;
|
|
34524
|
+
if (typedArray.byteLength !== typedArray.buffer.byteLength) {
|
|
34525
|
+
str += `,${typedArray.byteOffset},${typedArray.length}`;
|
|
34494
34526
|
}
|
|
34495
34527
|
str += "]";
|
|
34496
34528
|
break;
|
|
@@ -34513,20 +34545,10 @@ function stringify$2(value, reducers) {
|
|
|
34513
34545
|
break;
|
|
34514
34546
|
default:
|
|
34515
34547
|
if (!is_plain_object(thing)) {
|
|
34516
|
-
throw new DevalueError(
|
|
34517
|
-
`Cannot stringify arbitrary non-POJOs`,
|
|
34518
|
-
keys2,
|
|
34519
|
-
thing,
|
|
34520
|
-
value
|
|
34521
|
-
);
|
|
34548
|
+
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys2, thing, value);
|
|
34522
34549
|
}
|
|
34523
34550
|
if (enumerable_symbols(thing).length > 0) {
|
|
34524
|
-
throw new DevalueError(
|
|
34525
|
-
`Cannot stringify POJOs with symbolic keys`,
|
|
34526
|
-
keys2,
|
|
34527
|
-
thing,
|
|
34528
|
-
value
|
|
34529
|
-
);
|
|
34551
|
+
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys2, thing, value);
|
|
34530
34552
|
}
|
|
34531
34553
|
if (Object.getPrototypeOf(thing) === null) {
|
|
34532
34554
|
str = '["null"';
|
|
@@ -34571,12 +34593,11 @@ function stringify$2(value, reducers) {
|
|
|
34571
34593
|
}
|
|
34572
34594
|
const index2 = flatten(value);
|
|
34573
34595
|
if (index2 < 0) return `${index2}`;
|
|
34574
|
-
return
|
|
34596
|
+
return stringified;
|
|
34575
34597
|
}
|
|
34576
34598
|
function stringify_primitive(thing) {
|
|
34577
34599
|
const type = typeof thing;
|
|
34578
34600
|
if (type === "string") return stringify_string(thing);
|
|
34579
|
-
if (thing instanceof String) return stringify_string(thing.toString());
|
|
34580
34601
|
if (thing === void 0) return UNDEFINED.toString();
|
|
34581
34602
|
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
34582
34603
|
if (type === "bigint") return `["BigInt","${thing}"]`;
|
|
@@ -35497,10 +35518,10 @@ function unwrapMessage(message2) {
|
|
|
35497
35518
|
return typeof message2 === "string" ? message2 : message2 == null ? void 0 : message2.message;
|
|
35498
35519
|
}
|
|
35499
35520
|
function finalizeIssue(iss, ctx, config2) {
|
|
35500
|
-
var _a3, _b2, _c2,
|
|
35521
|
+
var _a3, _b2, _c2, _d2, _e2, _f;
|
|
35501
35522
|
const full = { ...iss, path: iss.path ?? [] };
|
|
35502
35523
|
if (!iss.message) {
|
|
35503
|
-
const message2 = unwrapMessage((_c2 = (_b2 = (_a3 = iss.inst) == null ? void 0 : _a3._zod.def) == null ? void 0 : _b2.error) == null ? void 0 : _c2.call(_b2, iss)) ?? unwrapMessage((
|
|
35524
|
+
const message2 = unwrapMessage((_c2 = (_b2 = (_a3 = iss.inst) == null ? void 0 : _a3._zod.def) == null ? void 0 : _b2.error) == null ? void 0 : _c2.call(_b2, iss)) ?? unwrapMessage((_d2 = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d2.call(ctx, iss)) ?? unwrapMessage((_e2 = config2.customError) == null ? void 0 : _e2.call(config2, iss)) ?? unwrapMessage((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
|
|
35504
35525
|
full.message = message2;
|
|
35505
35526
|
}
|
|
35506
35527
|
delete full.inst;
|
|
@@ -37295,10 +37316,10 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
|
37295
37316
|
}
|
|
37296
37317
|
}
|
|
37297
37318
|
function normalizeDef(def) {
|
|
37298
|
-
var _a3, _b2, _c2,
|
|
37319
|
+
var _a3, _b2, _c2, _d2;
|
|
37299
37320
|
const keys2 = Object.keys(def.shape);
|
|
37300
37321
|
for (const k2 of keys2) {
|
|
37301
|
-
if (!((
|
|
37322
|
+
if (!((_d2 = (_c2 = (_b2 = (_a3 = def.shape) == null ? void 0 : _a3[k2]) == null ? void 0 : _b2._zod) == null ? void 0 : _c2.traits) == null ? void 0 : _d2.has("$ZodType"))) {
|
|
37302
37323
|
throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
|
|
37303
37324
|
}
|
|
37304
37325
|
}
|
|
@@ -45268,7 +45289,7 @@ function process$1(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
45268
45289
|
return _result.schema;
|
|
45269
45290
|
}
|
|
45270
45291
|
function extractDefs(ctx, schema) {
|
|
45271
|
-
var _a3, _b2, _c2,
|
|
45292
|
+
var _a3, _b2, _c2, _d2;
|
|
45272
45293
|
const root2 = ctx.seen.get(schema);
|
|
45273
45294
|
if (!root2)
|
|
45274
45295
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -45342,7 +45363,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45342
45363
|
continue;
|
|
45343
45364
|
}
|
|
45344
45365
|
}
|
|
45345
|
-
const id2 = (
|
|
45366
|
+
const id2 = (_d2 = ctx.metadataRegistry.get(entry2[0])) == null ? void 0 : _d2.id;
|
|
45346
45367
|
if (id2) {
|
|
45347
45368
|
extractToDef(entry2);
|
|
45348
45369
|
continue;
|
|
@@ -48984,13 +49005,13 @@ async function reenqueueActiveRuns(runs, enqueue, label) {
|
|
|
48984
49005
|
resolveData: "none",
|
|
48985
49006
|
pagination: { cursor }
|
|
48986
49007
|
});
|
|
48987
|
-
for (const
|
|
49008
|
+
for (const run2 of page.data) {
|
|
48988
49009
|
try {
|
|
48989
|
-
const queueName = `__wkf_workflow_${
|
|
48990
|
-
await enqueue(queueName, { runId:
|
|
49010
|
+
const queueName = `__wkf_workflow_${run2.workflowName}`;
|
|
49011
|
+
await enqueue(queueName, { runId: run2.runId });
|
|
48991
49012
|
reenqueued++;
|
|
48992
49013
|
} catch (err) {
|
|
48993
|
-
console.warn(`[${label}] Failed to re-enqueue run ${
|
|
49014
|
+
console.warn(`[${label}] Failed to re-enqueue run ${run2.runId}: ${err}`);
|
|
48994
49015
|
}
|
|
48995
49016
|
}
|
|
48996
49017
|
hasMore = page.hasMore;
|
|
@@ -49274,9 +49295,9 @@ function detectPRNG(root2) {
|
|
|
49274
49295
|
const globalCrypto = rootLookup && (rootLookup.crypto || rootLookup.msCrypto) || (typeof crypto !== "undefined" ? crypto : null);
|
|
49275
49296
|
if (typeof (globalCrypto == null ? void 0 : globalCrypto.getRandomValues) === "function") {
|
|
49276
49297
|
return () => {
|
|
49277
|
-
const
|
|
49278
|
-
globalCrypto.getRandomValues(
|
|
49279
|
-
return
|
|
49298
|
+
const buffer2 = new Uint8Array(1);
|
|
49299
|
+
globalCrypto.getRandomValues(buffer2);
|
|
49300
|
+
return buffer2[0] / 255;
|
|
49280
49301
|
};
|
|
49281
49302
|
} else if (typeof (globalCrypto == null ? void 0 : globalCrypto.randomBytes) === "function") {
|
|
49282
49303
|
return () => globalCrypto.randomBytes(1).readUInt8() / 255;
|
|
@@ -49709,91 +49730,6 @@ function hasEncryptedFields(resource) {
|
|
|
49709
49730
|
}
|
|
49710
49731
|
return false;
|
|
49711
49732
|
}
|
|
49712
|
-
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
49713
|
-
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
49714
|
-
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
49715
|
-
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
49716
|
-
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
49717
|
-
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
49718
|
-
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
49719
|
-
const match2 = query.match(pattern2);
|
|
49720
|
-
if (!match2) {
|
|
49721
|
-
return null;
|
|
49722
|
-
}
|
|
49723
|
-
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
49724
|
-
}
|
|
49725
|
-
function parseExactWorkflowSearchId(query) {
|
|
49726
|
-
const trimmed = query.trim();
|
|
49727
|
-
if (!trimmed) {
|
|
49728
|
-
return null;
|
|
49729
|
-
}
|
|
49730
|
-
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
49731
|
-
}
|
|
49732
|
-
function looksLikeWorkflowIdSearchInput(query) {
|
|
49733
|
-
const trimmed = query.trim();
|
|
49734
|
-
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
49735
|
-
return false;
|
|
49736
|
-
}
|
|
49737
|
-
return /\d/.test(trimmed);
|
|
49738
|
-
}
|
|
49739
|
-
const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
|
|
49740
|
-
function Spinner({ size: size2 = 14, color: color5 }) {
|
|
49741
|
-
const config2 = size2 <= 12 ? {
|
|
49742
|
-
angle: 45,
|
|
49743
|
-
delays: [-875, -750, -625, -500, -375, -250, -125, 0],
|
|
49744
|
-
duration: 1e3,
|
|
49745
|
-
lineW: 3,
|
|
49746
|
-
lineH: 1.5
|
|
49747
|
-
} : size2 <= 16 ? {
|
|
49748
|
-
angle: 36,
|
|
49749
|
-
delays: [-900, -800, -700, -600, -500, -400, -300, -200, -100, 0],
|
|
49750
|
-
duration: 1e3,
|
|
49751
|
-
lineW: 4,
|
|
49752
|
-
lineH: 1.5
|
|
49753
|
-
} : {
|
|
49754
|
-
angle: 30,
|
|
49755
|
-
delays: [
|
|
49756
|
-
-1100,
|
|
49757
|
-
-1e3,
|
|
49758
|
-
-900,
|
|
49759
|
-
-800,
|
|
49760
|
-
-700,
|
|
49761
|
-
-600,
|
|
49762
|
-
-500,
|
|
49763
|
-
-400,
|
|
49764
|
-
-300,
|
|
49765
|
-
-200,
|
|
49766
|
-
-100,
|
|
49767
|
-
0
|
|
49768
|
-
],
|
|
49769
|
-
duration: 1200,
|
|
49770
|
-
lineW: size2 * 0.24,
|
|
49771
|
-
lineH: size2 * 0.08
|
|
49772
|
-
};
|
|
49773
|
-
return jsxRuntimeExports.jsxs("span", { style: {
|
|
49774
|
-
display: "inline-flex",
|
|
49775
|
-
position: "relative",
|
|
49776
|
-
width: size2,
|
|
49777
|
-
height: size2
|
|
49778
|
-
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
|
|
49779
|
-
position: "absolute",
|
|
49780
|
-
left: "50%",
|
|
49781
|
-
top: "50%",
|
|
49782
|
-
width: config2.lineW,
|
|
49783
|
-
height: config2.lineH,
|
|
49784
|
-
marginLeft: -config2.lineW / 2,
|
|
49785
|
-
marginTop: -config2.lineH / 2,
|
|
49786
|
-
borderRadius: 1,
|
|
49787
|
-
backgroundColor: color5 ?? "var(--ds-gray-700)",
|
|
49788
|
-
transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
|
|
49789
|
-
animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
|
|
49790
|
-
animationDelay: `${delay}ms`
|
|
49791
|
-
} }, delay))] });
|
|
49792
|
-
}
|
|
49793
|
-
const STYLES$2 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
|
|
49794
|
-
function DecryptButton({ decrypted = false, loading = false, onClick }) {
|
|
49795
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$2 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
|
|
49796
|
-
}
|
|
49797
49733
|
function __insertCSS(code2) {
|
|
49798
49734
|
if (typeof document == "undefined") return;
|
|
49799
49735
|
let head = document.head || document.getElementsByTagName("head")[0];
|
|
@@ -51830,6 +51766,60 @@ const buttonVariants$1 = cva([
|
|
|
51830
51766
|
function Button$1({ className, variant, size: size2, type = "button", ...props }) {
|
|
51831
51767
|
return jsxRuntimeExports.jsx("button", { type, className: cn$4(buttonVariants$1({ variant, size: size2, className })), ...props });
|
|
51832
51768
|
}
|
|
51769
|
+
const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
|
|
51770
|
+
function Spinner({ size: size2 = 14, color: color5 }) {
|
|
51771
|
+
const config2 = size2 <= 12 ? {
|
|
51772
|
+
angle: 45,
|
|
51773
|
+
delays: [-875, -750, -625, -500, -375, -250, -125, 0],
|
|
51774
|
+
duration: 1e3,
|
|
51775
|
+
lineW: 3,
|
|
51776
|
+
lineH: 1.5
|
|
51777
|
+
} : size2 <= 16 ? {
|
|
51778
|
+
angle: 36,
|
|
51779
|
+
delays: [-900, -800, -700, -600, -500, -400, -300, -200, -100, 0],
|
|
51780
|
+
duration: 1e3,
|
|
51781
|
+
lineW: 4,
|
|
51782
|
+
lineH: 1.5
|
|
51783
|
+
} : {
|
|
51784
|
+
angle: 30,
|
|
51785
|
+
delays: [
|
|
51786
|
+
-1100,
|
|
51787
|
+
-1e3,
|
|
51788
|
+
-900,
|
|
51789
|
+
-800,
|
|
51790
|
+
-700,
|
|
51791
|
+
-600,
|
|
51792
|
+
-500,
|
|
51793
|
+
-400,
|
|
51794
|
+
-300,
|
|
51795
|
+
-200,
|
|
51796
|
+
-100,
|
|
51797
|
+
0
|
|
51798
|
+
],
|
|
51799
|
+
duration: 1200,
|
|
51800
|
+
lineW: size2 * 0.24,
|
|
51801
|
+
lineH: size2 * 0.08
|
|
51802
|
+
};
|
|
51803
|
+
return jsxRuntimeExports.jsxs("span", { style: {
|
|
51804
|
+
display: "inline-flex",
|
|
51805
|
+
position: "relative",
|
|
51806
|
+
width: size2,
|
|
51807
|
+
height: size2
|
|
51808
|
+
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
|
|
51809
|
+
position: "absolute",
|
|
51810
|
+
left: "50%",
|
|
51811
|
+
top: "50%",
|
|
51812
|
+
width: config2.lineW,
|
|
51813
|
+
height: config2.lineH,
|
|
51814
|
+
marginLeft: -config2.lineW / 2,
|
|
51815
|
+
marginTop: -config2.lineH / 2,
|
|
51816
|
+
borderRadius: 1,
|
|
51817
|
+
backgroundColor: color5 ?? "var(--ds-gray-700)",
|
|
51818
|
+
transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
|
|
51819
|
+
animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
|
|
51820
|
+
animationDelay: `${delay}ms`
|
|
51821
|
+
} }, delay))] });
|
|
51822
|
+
}
|
|
51833
51823
|
const STREAM_REF_TYPE = "__workflow_stream_ref__";
|
|
51834
51824
|
const CLASS_INSTANCE_REF_TYPE = "__workflow_class_instance_ref__";
|
|
51835
51825
|
const RUN_REF_TYPE = "__workflow_run_ref__";
|
|
@@ -52064,8 +52054,8 @@ function isObjectLike(value) {
|
|
|
52064
52054
|
return typeof value === "object" && value !== null;
|
|
52065
52055
|
}
|
|
52066
52056
|
function isSameBytesDisplay(a2, b2) {
|
|
52067
|
-
var _a3, _b2, _c2,
|
|
52068
|
-
return a2.text === b2.text && ((_a3 = a2.decodedFrom) == null ? void 0 : _a3.type) === ((_b2 = b2.decodedFrom) == null ? void 0 : _b2.type) && ((_c2 = a2.decodedFrom) == null ? void 0 : _c2.encoding) === ((
|
|
52057
|
+
var _a3, _b2, _c2, _d2, _e2, _f;
|
|
52058
|
+
return a2.text === b2.text && ((_a3 = a2.decodedFrom) == null ? void 0 : _a3.type) === ((_b2 = b2.decodedFrom) == null ? void 0 : _b2.type) && ((_c2 = a2.decodedFrom) == null ? void 0 : _c2.encoding) === ((_d2 = b2.decodedFrom) == null ? void 0 : _d2.encoding) && ((_e2 = a2.decodedFrom) == null ? void 0 : _e2.rawSummary) === ((_f = b2.decodedFrom) == null ? void 0 : _f.rawSummary);
|
|
52069
52059
|
}
|
|
52070
52060
|
function isDeepEqual(a2, b2, seen = /* @__PURE__ */ new WeakMap()) {
|
|
52071
52061
|
if (Object.is(a2, b2))
|
|
@@ -52128,6 +52118,10 @@ function isDeepEqual(a2, b2, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
52128
52118
|
}
|
|
52129
52119
|
return true;
|
|
52130
52120
|
}
|
|
52121
|
+
const STYLES$2 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
|
|
52122
|
+
function DecryptButton({ decrypted = false, loading = false, onClick }) {
|
|
52123
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$2 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
|
|
52124
|
+
}
|
|
52131
52125
|
function CopyButton({ copyText, ariaLabel, className }) {
|
|
52132
52126
|
const [copied, setCopied] = reactExports.useState(false);
|
|
52133
52127
|
const timeoutRef = reactExports.useRef(null);
|
|
@@ -52149,20 +52143,21 @@ function CopyButton({ copyText, ariaLabel, className }) {
|
|
|
52149
52143
|
});
|
|
52150
52144
|
}, children: jsxRuntimeExports.jsxs("div", { className: "relative w-3 h-3", children: [jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-100 opacity-100" : "scale-0 opacity-0"), children: jsxRuntimeExports.jsx(Check, { className: "w-3 h-3" }) }), jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-0 opacity-0" : "scale-100 opacity-100"), children: jsxRuntimeExports.jsx(Copy, { className: "w-3 h-3" }) })] }) });
|
|
52151
52145
|
}
|
|
52152
|
-
function
|
|
52153
|
-
return value != null && typeof value === "object" && "
|
|
52146
|
+
function isStructuredError(value) {
|
|
52147
|
+
return value != null && typeof value === "object" && (typeof value.message === "string" || typeof value.stack === "string");
|
|
52154
52148
|
}
|
|
52155
52149
|
function deriveTitle(message2) {
|
|
52156
52150
|
const firstLine = message2.split("\n").find((line) => line.trim().length > 0) ?? message2;
|
|
52157
52151
|
return firstLine.trim();
|
|
52158
52152
|
}
|
|
52159
52153
|
function ErrorStackBlock({ value }) {
|
|
52160
|
-
const stack = value.stack;
|
|
52154
|
+
const stack = typeof value.stack === "string" ? value.stack : void 0;
|
|
52161
52155
|
const message2 = typeof value.message === "string" ? value.message : void 0;
|
|
52162
|
-
const
|
|
52163
|
-
const
|
|
52156
|
+
const body2 = stack ?? message2 ?? "";
|
|
52157
|
+
const title = message2 ? deriveTitle(message2) : deriveTitle(body2);
|
|
52158
|
+
const copyText = message2 && stack && !stack.includes(message2) ? `${message2}
|
|
52164
52159
|
|
|
52165
|
-
${stack}` :
|
|
52160
|
+
${stack}` : body2;
|
|
52166
52161
|
return jsxRuntimeExports.jsxs("div", { className: "relative overflow-hidden rounded-md border", style: {
|
|
52167
52162
|
borderColor: "var(--ds-red-400)",
|
|
52168
52163
|
background: "var(--ds-red-100)"
|
|
@@ -52171,16 +52166,16 @@ ${stack}` : stack;
|
|
|
52171
52166
|
borderBottom: "1px solid var(--ds-red-400)"
|
|
52172
52167
|
}, children: [jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4 shrink-0" }), jsxRuntimeExports.jsx("p", {
|
|
52173
52168
|
className: "text-xs font-semibold m-0 truncate",
|
|
52174
|
-
// The full
|
|
52175
|
-
//
|
|
52169
|
+
// The full message or stack is in the body below; the header just
|
|
52170
|
+
// shows the first line, single-line, with overflow
|
|
52176
52171
|
// ellipsised so a long title doesn't push the copy button or
|
|
52177
52172
|
// wrap into the framed hint/docs lines.
|
|
52178
52173
|
title: message2,
|
|
52179
52174
|
children: title
|
|
52180
|
-
})] }), jsxRuntimeExports.jsx("pre", { className: "px-3 py-2.5 text-xs font-mono whitespace-pre-wrap break-words overflow-auto m-0", style: {
|
|
52175
|
+
})] }), body2 && jsxRuntimeExports.jsx("pre", { className: "px-3 py-2.5 text-xs font-mono whitespace-pre-wrap break-words overflow-auto m-0", style: {
|
|
52181
52176
|
color: "var(--ds-red-900)",
|
|
52182
52177
|
background: "var(--ds-red-200)"
|
|
52183
|
-
}, children:
|
|
52178
|
+
}, children: body2 })] });
|
|
52184
52179
|
}
|
|
52185
52180
|
const STYLES$1 = `.wf-load-more{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;border-radius:6px;font-size:13px;font-weight:500;line-height:20px;color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400);cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-load-more:hover{background:var(--ds-gray-alpha-200)}.wf-load-more:disabled{opacity:.6;cursor:default}.wf-load-more:disabled:hover{background:var(--ds-background-100)}`;
|
|
52186
52181
|
function LoadMoreButton({ loading = false, onClick, label = "Load more", loadingLabel = "Loading..." }) {
|
|
@@ -52453,7 +52448,7 @@ function getStatusDotColor(eventType) {
|
|
|
52453
52448
|
}
|
|
52454
52449
|
return "var(--ds-gray-600)";
|
|
52455
52450
|
}
|
|
52456
|
-
function buildNameMaps(events2,
|
|
52451
|
+
function buildNameMaps(events2, run2) {
|
|
52457
52452
|
var _a3, _b2;
|
|
52458
52453
|
const correlationNameMap = /* @__PURE__ */ new Map();
|
|
52459
52454
|
if (events2) {
|
|
@@ -52465,7 +52460,7 @@ function buildNameMaps(events2, run) {
|
|
|
52465
52460
|
}
|
|
52466
52461
|
}
|
|
52467
52462
|
}
|
|
52468
|
-
const workflowName = (
|
|
52463
|
+
const workflowName = (run2 == null ? void 0 : run2.workflowName) ? ((_b2 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _b2.shortName) ?? run2.workflowName : null;
|
|
52469
52464
|
return { correlationNameMap, workflowName };
|
|
52470
52465
|
}
|
|
52471
52466
|
function buildDurationMap(events2) {
|
|
@@ -52646,9 +52641,9 @@ function extractStructuredError(data, eventType) {
|
|
|
52646
52641
|
if (data == null || typeof data !== "object")
|
|
52647
52642
|
return null;
|
|
52648
52643
|
const record2 = data;
|
|
52649
|
-
if (
|
|
52644
|
+
if (isStructuredError(record2.error))
|
|
52650
52645
|
return record2.error;
|
|
52651
|
-
if (
|
|
52646
|
+
if (isStructuredError(record2))
|
|
52652
52647
|
return record2;
|
|
52653
52648
|
return null;
|
|
52654
52649
|
}
|
|
@@ -52852,7 +52847,7 @@ function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggl
|
|
|
52852
52847
|
color: "var(--ds-red-900)"
|
|
52853
52848
|
}, children: loadError }) : isLoading || loadedEventData === null && !hasAttemptedLoad && event.correlationId ? jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 p-3", children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "75%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "50%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "60%" } })] }) : jsxRuntimeExports.jsx("div", { className: "p-2 text-xs", style: { color: "var(--ds-gray-900)" }, children: "No data" })] })] })] });
|
|
52854
52849
|
}
|
|
52855
|
-
function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey, isLoading = false, sortOrder: sortOrderProp, onSortOrderChange, onDecrypt, isDecrypting = false, hasEncryptedData: hasEncryptedDataProp = false, onExactIdSearch }) {
|
|
52850
|
+
function EventListView({ events: events2, run: run2, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey, isLoading = false, sortOrder: sortOrderProp, onSortOrderChange, onDecrypt, isDecrypting = false, hasEncryptedData: hasEncryptedDataProp = false, onExactIdSearch }) {
|
|
52856
52851
|
const toast2 = useToast();
|
|
52857
52852
|
const [internalSortOrder, setInternalSortOrder] = reactExports.useState("asc");
|
|
52858
52853
|
const effectiveSortOrder = sortOrderProp ?? internalSortOrder;
|
|
@@ -52896,7 +52891,7 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
|
|
|
52896
52891
|
setFoundEncryptedInLazyData(true);
|
|
52897
52892
|
}, []);
|
|
52898
52893
|
const hasEncryptedData = hasEncryptedDataProp || hasEncryptedInlineData || foundEncryptedInLazyData;
|
|
52899
|
-
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(isExactSearchActive ? searchResults : events2 ?? null,
|
|
52894
|
+
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(isExactSearchActive ? searchResults : events2 ?? null, run2 ?? null), [events2, isExactSearchActive, run2, searchResults]);
|
|
52900
52895
|
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents2), [sortedEvents2]);
|
|
52901
52896
|
const [selectedGroupKey, setSelectedGroupKey] = reactExports.useState(void 0);
|
|
52902
52897
|
const [hoveredGroupKey, setHoveredGroupKey] = reactExports.useState(void 0);
|
|
@@ -53625,21 +53620,21 @@ function hookToSpan(hookEvents, maxEndTime) {
|
|
|
53625
53620
|
duration: calculateDuration(hook.createdAt, endTime)
|
|
53626
53621
|
};
|
|
53627
53622
|
}
|
|
53628
|
-
function runToSpan(
|
|
53623
|
+
function runToSpan(run2, runEvents, nowTime) {
|
|
53629
53624
|
var _a3;
|
|
53630
53625
|
const now2 = nowTime ?? /* @__PURE__ */ new Date();
|
|
53631
|
-
const { input: _i, output: _o2, error: _e2, ...runIdentity } =
|
|
53626
|
+
const { input: _i, output: _o2, error: _e2, ...runIdentity } = run2;
|
|
53632
53627
|
const attributes = {
|
|
53633
53628
|
resource: "run",
|
|
53634
53629
|
data: runIdentity
|
|
53635
53630
|
};
|
|
53636
|
-
const spanStartTime = new Date(
|
|
53637
|
-
const activeStartTime =
|
|
53638
|
-
const endTime =
|
|
53631
|
+
const spanStartTime = new Date(run2.createdAt);
|
|
53632
|
+
const activeStartTime = run2.startedAt ? new Date(run2.startedAt) : void 0;
|
|
53633
|
+
const endTime = run2.completedAt ?? now2;
|
|
53639
53634
|
const events2 = convertEventsToSpanEvents(runEvents, false);
|
|
53640
53635
|
return {
|
|
53641
|
-
spanId: String(
|
|
53642
|
-
name: String(((_a3 = parseWorkflowName(
|
|
53636
|
+
spanId: String(run2.runId),
|
|
53637
|
+
name: String(((_a3 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _a3.shortName) ?? "?"),
|
|
53643
53638
|
kind: 1,
|
|
53644
53639
|
// INTERNAL span kind
|
|
53645
53640
|
resource: "run",
|
|
@@ -53694,8 +53689,8 @@ function groupEventsByCorrelation(events2) {
|
|
|
53694
53689
|
}
|
|
53695
53690
|
return { eventsByStepId, runLevelEvents, timerEvents, hookEvents };
|
|
53696
53691
|
}
|
|
53697
|
-
function computeLatestKnownTime(events2,
|
|
53698
|
-
let latest = new Date(
|
|
53692
|
+
function computeLatestKnownTime(events2, run2) {
|
|
53693
|
+
let latest = new Date(run2.createdAt).getTime();
|
|
53699
53694
|
for (const event of events2) {
|
|
53700
53695
|
const t = new Date(event.createdAt).getTime();
|
|
53701
53696
|
if (t > latest)
|
|
@@ -53703,14 +53698,14 @@ function computeLatestKnownTime(events2, run) {
|
|
|
53703
53698
|
}
|
|
53704
53699
|
return new Date(latest);
|
|
53705
53700
|
}
|
|
53706
|
-
function buildSpans(
|
|
53701
|
+
function buildSpans(run2, groupedEvents, now2, latestKnownTime) {
|
|
53707
53702
|
const childMaxEnd = latestKnownTime;
|
|
53708
|
-
const runMaxEnd =
|
|
53703
|
+
const runMaxEnd = run2.completedAt ?? now2;
|
|
53709
53704
|
const stepSpans = Array.from(groupedEvents.eventsByStepId.values()).map((events2) => stepToSpan(events2, childMaxEnd)).filter((span) => span !== null);
|
|
53710
53705
|
const hookSpans = Array.from(groupedEvents.hookEvents.values()).map((events2) => hookToSpan(events2, childMaxEnd)).filter((span) => span !== null);
|
|
53711
53706
|
const waitSpans = Array.from(groupedEvents.timerEvents.values()).map((events2) => waitToSpan(events2, childMaxEnd, runMaxEnd)).filter((span) => span !== null);
|
|
53712
53707
|
return {
|
|
53713
|
-
runSpan: runToSpan(
|
|
53708
|
+
runSpan: runToSpan(run2, groupedEvents.runLevelEvents, now2),
|
|
53714
53709
|
spans: [...stepSpans, ...hookSpans, ...waitSpans]
|
|
53715
53710
|
};
|
|
53716
53711
|
}
|
|
@@ -53731,16 +53726,16 @@ function cascadeSpans(runSpan, spans) {
|
|
|
53731
53726
|
};
|
|
53732
53727
|
});
|
|
53733
53728
|
}
|
|
53734
|
-
function buildTrace(
|
|
53729
|
+
function buildTrace(run2, events2, now2) {
|
|
53735
53730
|
const groupedEvents = groupEventsByCorrelation(events2);
|
|
53736
|
-
const latestKnownTime = computeLatestKnownTime(events2,
|
|
53737
|
-
const { runSpan, spans } = buildSpans(
|
|
53731
|
+
const latestKnownTime = computeLatestKnownTime(events2, run2);
|
|
53732
|
+
const { runSpan, spans } = buildSpans(run2, groupedEvents, now2, latestKnownTime);
|
|
53738
53733
|
const sortedCascadingSpans = cascadeSpans(runSpan, spans);
|
|
53739
53734
|
const traceStartMs = otelTimeToMs(runSpan.startTime);
|
|
53740
53735
|
const knownDurationMs = latestKnownTime.getTime() - traceStartMs;
|
|
53741
53736
|
return {
|
|
53742
|
-
traceId:
|
|
53743
|
-
rootSpanId:
|
|
53737
|
+
traceId: run2.runId,
|
|
53738
|
+
rootSpanId: run2.runId,
|
|
53744
53739
|
spans: sortedCascadingSpans,
|
|
53745
53740
|
resources: [
|
|
53746
53741
|
{
|
|
@@ -54546,8 +54541,8 @@ const deserializer = ($2, _2) => {
|
|
|
54546
54541
|
case "ArrayBuffer":
|
|
54547
54542
|
return as(new Uint8Array(value).buffer, value);
|
|
54548
54543
|
case "DataView": {
|
|
54549
|
-
const { buffer } = new Uint8Array(value);
|
|
54550
|
-
return as(new DataView(
|
|
54544
|
+
const { buffer: buffer2 } = new Uint8Array(value);
|
|
54545
|
+
return as(new DataView(buffer2), value);
|
|
54551
54546
|
}
|
|
54552
54547
|
}
|
|
54553
54548
|
return as(new env[type](value), index2);
|
|
@@ -70455,27 +70450,27 @@ function tokenizeWwwAutolink(effects, ok2, nok) {
|
|
|
70455
70450
|
}
|
|
70456
70451
|
function tokenizeProtocolAutolink(effects, ok2, nok) {
|
|
70457
70452
|
const self2 = this;
|
|
70458
|
-
let
|
|
70453
|
+
let buffer2 = "";
|
|
70459
70454
|
let seen = false;
|
|
70460
70455
|
return protocolStart;
|
|
70461
70456
|
function protocolStart(code2) {
|
|
70462
70457
|
if ((code2 === 72 || code2 === 104) && previousProtocol.call(self2, self2.previous) && !previousUnbalanced(self2.events)) {
|
|
70463
70458
|
effects.enter("literalAutolink");
|
|
70464
70459
|
effects.enter("literalAutolinkHttp");
|
|
70465
|
-
|
|
70460
|
+
buffer2 += String.fromCodePoint(code2);
|
|
70466
70461
|
effects.consume(code2);
|
|
70467
70462
|
return protocolPrefixInside;
|
|
70468
70463
|
}
|
|
70469
70464
|
return nok(code2);
|
|
70470
70465
|
}
|
|
70471
70466
|
function protocolPrefixInside(code2) {
|
|
70472
|
-
if (asciiAlpha(code2) &&
|
|
70473
|
-
|
|
70467
|
+
if (asciiAlpha(code2) && buffer2.length < 5) {
|
|
70468
|
+
buffer2 += String.fromCodePoint(code2);
|
|
70474
70469
|
effects.consume(code2);
|
|
70475
70470
|
return protocolPrefixInside;
|
|
70476
70471
|
}
|
|
70477
70472
|
if (code2 === 58) {
|
|
70478
|
-
const protocol =
|
|
70473
|
+
const protocol = buffer2.toLowerCase();
|
|
70479
70474
|
if (protocol === "http" || protocol === "https") {
|
|
70480
70475
|
effects.consume(code2);
|
|
70481
70476
|
return protocolSlashesInside;
|
|
@@ -72405,7 +72400,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72405
72400
|
const self2 = this;
|
|
72406
72401
|
let marker2;
|
|
72407
72402
|
let closingTag;
|
|
72408
|
-
let
|
|
72403
|
+
let buffer2;
|
|
72409
72404
|
let index2;
|
|
72410
72405
|
let markerB;
|
|
72411
72406
|
return start2;
|
|
@@ -72435,7 +72430,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72435
72430
|
}
|
|
72436
72431
|
if (asciiAlpha(code2)) {
|
|
72437
72432
|
effects.consume(code2);
|
|
72438
|
-
|
|
72433
|
+
buffer2 = String.fromCharCode(code2);
|
|
72439
72434
|
return tagName;
|
|
72440
72435
|
}
|
|
72441
72436
|
return nok(code2);
|
|
@@ -72480,7 +72475,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72480
72475
|
function tagCloseStart(code2) {
|
|
72481
72476
|
if (asciiAlpha(code2)) {
|
|
72482
72477
|
effects.consume(code2);
|
|
72483
|
-
|
|
72478
|
+
buffer2 = String.fromCharCode(code2);
|
|
72484
72479
|
return tagName;
|
|
72485
72480
|
}
|
|
72486
72481
|
return nok(code2);
|
|
@@ -72488,12 +72483,12 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72488
72483
|
function tagName(code2) {
|
|
72489
72484
|
if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
|
|
72490
72485
|
const slash = code2 === 47;
|
|
72491
|
-
const name2 =
|
|
72486
|
+
const name2 = buffer2.toLowerCase();
|
|
72492
72487
|
if (!slash && !closingTag && htmlRawNames.includes(name2)) {
|
|
72493
72488
|
marker2 = 1;
|
|
72494
72489
|
return self2.interrupt ? ok2(code2) : continuation(code2);
|
|
72495
72490
|
}
|
|
72496
|
-
if (htmlBlockNames.includes(
|
|
72491
|
+
if (htmlBlockNames.includes(buffer2.toLowerCase())) {
|
|
72497
72492
|
marker2 = 6;
|
|
72498
72493
|
if (slash) {
|
|
72499
72494
|
effects.consume(code2);
|
|
@@ -72506,7 +72501,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72506
72501
|
}
|
|
72507
72502
|
if (code2 === 45 || asciiAlphanumeric(code2)) {
|
|
72508
72503
|
effects.consume(code2);
|
|
72509
|
-
|
|
72504
|
+
buffer2 += String.fromCharCode(code2);
|
|
72510
72505
|
return tagName;
|
|
72511
72506
|
}
|
|
72512
72507
|
return nok(code2);
|
|
@@ -72673,23 +72668,23 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
|
|
|
72673
72668
|
function continuationRawTagOpen(code2) {
|
|
72674
72669
|
if (code2 === 47) {
|
|
72675
72670
|
effects.consume(code2);
|
|
72676
|
-
|
|
72671
|
+
buffer2 = "";
|
|
72677
72672
|
return continuationRawEndTag;
|
|
72678
72673
|
}
|
|
72679
72674
|
return continuation(code2);
|
|
72680
72675
|
}
|
|
72681
72676
|
function continuationRawEndTag(code2) {
|
|
72682
72677
|
if (code2 === 62) {
|
|
72683
|
-
const name2 =
|
|
72678
|
+
const name2 = buffer2.toLowerCase();
|
|
72684
72679
|
if (htmlRawNames.includes(name2)) {
|
|
72685
72680
|
effects.consume(code2);
|
|
72686
72681
|
return continuationClose;
|
|
72687
72682
|
}
|
|
72688
72683
|
return continuation(code2);
|
|
72689
72684
|
}
|
|
72690
|
-
if (asciiAlpha(code2) &&
|
|
72685
|
+
if (asciiAlpha(code2) && buffer2.length < 8) {
|
|
72691
72686
|
effects.consume(code2);
|
|
72692
|
-
|
|
72687
|
+
buffer2 += String.fromCharCode(code2);
|
|
72693
72688
|
return continuationRawEndTag;
|
|
72694
72689
|
}
|
|
72695
72690
|
return continuation(code2);
|
|
@@ -76559,7 +76554,7 @@ function postprocess(events2) {
|
|
|
76559
76554
|
const search = /[\0\t\n\r]/g;
|
|
76560
76555
|
function preprocess() {
|
|
76561
76556
|
let column = 1;
|
|
76562
|
-
let
|
|
76557
|
+
let buffer2 = "";
|
|
76563
76558
|
let start2 = true;
|
|
76564
76559
|
let atCarriageReturn;
|
|
76565
76560
|
return preprocessor;
|
|
@@ -76570,9 +76565,9 @@ function preprocess() {
|
|
|
76570
76565
|
let startPosition;
|
|
76571
76566
|
let endPosition;
|
|
76572
76567
|
let code2;
|
|
76573
|
-
value =
|
|
76568
|
+
value = buffer2 + (typeof value === "string" ? value.toString() : new TextDecoder(encoding2 || void 0).decode(value));
|
|
76574
76569
|
startPosition = 0;
|
|
76575
|
-
|
|
76570
|
+
buffer2 = "";
|
|
76576
76571
|
if (start2) {
|
|
76577
76572
|
if (value.charCodeAt(0) === 65279) {
|
|
76578
76573
|
startPosition++;
|
|
@@ -76585,7 +76580,7 @@ function preprocess() {
|
|
|
76585
76580
|
endPosition = match2 && match2.index !== void 0 ? match2.index : value.length;
|
|
76586
76581
|
code2 = value.charCodeAt(endPosition);
|
|
76587
76582
|
if (!match2) {
|
|
76588
|
-
|
|
76583
|
+
buffer2 = value.slice(startPosition);
|
|
76589
76584
|
break;
|
|
76590
76585
|
}
|
|
76591
76586
|
if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
|
|
@@ -76627,7 +76622,7 @@ function preprocess() {
|
|
|
76627
76622
|
}
|
|
76628
76623
|
if (end) {
|
|
76629
76624
|
if (atCarriageReturn) chunks.push(-5);
|
|
76630
|
-
if (
|
|
76625
|
+
if (buffer2) chunks.push(buffer2);
|
|
76631
76626
|
chunks.push(null);
|
|
76632
76627
|
}
|
|
76633
76628
|
return chunks;
|
|
@@ -76654,26 +76649,26 @@ function compiler(options) {
|
|
|
76654
76649
|
characterEscape: onenterdata,
|
|
76655
76650
|
characterReference: onenterdata,
|
|
76656
76651
|
codeFenced: opener(codeFlow),
|
|
76657
|
-
codeFencedFenceInfo:
|
|
76658
|
-
codeFencedFenceMeta:
|
|
76659
|
-
codeIndented: opener(codeFlow,
|
|
76660
|
-
codeText: opener(codeText2,
|
|
76652
|
+
codeFencedFenceInfo: buffer2,
|
|
76653
|
+
codeFencedFenceMeta: buffer2,
|
|
76654
|
+
codeIndented: opener(codeFlow, buffer2),
|
|
76655
|
+
codeText: opener(codeText2, buffer2),
|
|
76661
76656
|
codeTextData: onenterdata,
|
|
76662
76657
|
data: onenterdata,
|
|
76663
76658
|
codeFlowValue: onenterdata,
|
|
76664
76659
|
definition: opener(definition2),
|
|
76665
|
-
definitionDestinationString:
|
|
76666
|
-
definitionLabelString:
|
|
76667
|
-
definitionTitleString:
|
|
76660
|
+
definitionDestinationString: buffer2,
|
|
76661
|
+
definitionLabelString: buffer2,
|
|
76662
|
+
definitionTitleString: buffer2,
|
|
76668
76663
|
emphasis: opener(emphasis2),
|
|
76669
76664
|
hardBreakEscape: opener(hardBreak2),
|
|
76670
76665
|
hardBreakTrailing: opener(hardBreak2),
|
|
76671
|
-
htmlFlow: opener(html2,
|
|
76666
|
+
htmlFlow: opener(html2, buffer2),
|
|
76672
76667
|
htmlFlowData: onenterdata,
|
|
76673
|
-
htmlText: opener(html2,
|
|
76668
|
+
htmlText: opener(html2, buffer2),
|
|
76674
76669
|
htmlTextData: onenterdata,
|
|
76675
76670
|
image: opener(image2),
|
|
76676
|
-
label:
|
|
76671
|
+
label: buffer2,
|
|
76677
76672
|
link: opener(link2),
|
|
76678
76673
|
listItem: opener(listItem2),
|
|
76679
76674
|
listItemValue: onenterlistitemvalue,
|
|
@@ -76681,9 +76676,9 @@ function compiler(options) {
|
|
|
76681
76676
|
listUnordered: opener(list2),
|
|
76682
76677
|
paragraph: opener(paragraph2),
|
|
76683
76678
|
reference: onenterreference,
|
|
76684
|
-
referenceString:
|
|
76685
|
-
resourceDestinationString:
|
|
76686
|
-
resourceTitleString:
|
|
76679
|
+
referenceString: buffer2,
|
|
76680
|
+
resourceDestinationString: buffer2,
|
|
76681
|
+
resourceTitleString: buffer2,
|
|
76687
76682
|
setextHeading: opener(heading2),
|
|
76688
76683
|
strong: opener(strong2),
|
|
76689
76684
|
thematicBreak: opener(thematicBreak2)
|
|
@@ -76754,7 +76749,7 @@ function compiler(options) {
|
|
|
76754
76749
|
config: config2,
|
|
76755
76750
|
enter,
|
|
76756
76751
|
exit: exit2,
|
|
76757
|
-
buffer,
|
|
76752
|
+
buffer: buffer2,
|
|
76758
76753
|
resume,
|
|
76759
76754
|
data
|
|
76760
76755
|
};
|
|
@@ -76898,7 +76893,7 @@ function compiler(options) {
|
|
|
76898
76893
|
if (and) and.call(this, token);
|
|
76899
76894
|
}
|
|
76900
76895
|
}
|
|
76901
|
-
function
|
|
76896
|
+
function buffer2() {
|
|
76902
76897
|
this.stack.push({
|
|
76903
76898
|
type: "fragment",
|
|
76904
76899
|
children: []
|
|
@@ -78218,9 +78213,9 @@ function isPlainObject(value) {
|
|
|
78218
78213
|
}
|
|
78219
78214
|
function trough() {
|
|
78220
78215
|
const fns = [];
|
|
78221
|
-
const pipeline = { run, use };
|
|
78216
|
+
const pipeline = { run: run2, use };
|
|
78222
78217
|
return pipeline;
|
|
78223
|
-
function
|
|
78218
|
+
function run2(...values) {
|
|
78224
78219
|
let middlewareIndex = -1;
|
|
78225
78220
|
const callback = values.pop();
|
|
78226
78221
|
if (typeof callback !== "function") {
|
|
@@ -79952,7 +79947,7 @@ var x = class u2 {
|
|
|
79952
79947
|
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
79953
79948
|
}
|
|
79954
79949
|
inlineTokens(e, t = []) {
|
|
79955
|
-
var _a3, _b2, _c2,
|
|
79950
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
79956
79951
|
let n = e, r2 = null;
|
|
79957
79952
|
if (this.tokens.links) {
|
|
79958
79953
|
let o = Object.keys(this.tokens.links);
|
|
@@ -79966,7 +79961,7 @@ var x = class u2 {
|
|
|
79966
79961
|
for (; e; ) {
|
|
79967
79962
|
s2 || (a2 = ""), s2 = false;
|
|
79968
79963
|
let o;
|
|
79969
|
-
if ((
|
|
79964
|
+
if ((_d2 = (_c2 = this.options.extensions) == null ? void 0 : _c2.inline) == null ? void 0 : _d2.some((p2) => (o = p2.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
|
|
79970
79965
|
if (o = this.tokenizer.escape(e)) {
|
|
79971
79966
|
e = e.substring(o.raw.length), t.push(o);
|
|
79972
79967
|
continue;
|
|
@@ -80336,7 +80331,7 @@ var b = class u3 {
|
|
|
80336
80331
|
return n;
|
|
80337
80332
|
}
|
|
80338
80333
|
};
|
|
80339
|
-
var P = (
|
|
80334
|
+
var P = (_b = class {
|
|
80340
80335
|
constructor(e) {
|
|
80341
80336
|
__publicField(this, "options");
|
|
80342
80337
|
__publicField(this, "block");
|
|
@@ -80360,7 +80355,7 @@ var P = (_a2 = class {
|
|
|
80360
80355
|
provideParser() {
|
|
80361
80356
|
return this.block ? b.parse : b.parseInline;
|
|
80362
80357
|
}
|
|
80363
|
-
}, __publicField(
|
|
80358
|
+
}, __publicField(_b, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_b, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _b);
|
|
80364
80359
|
var B = class {
|
|
80365
80360
|
constructor(...e) {
|
|
80366
80361
|
__publicField(this, "defaults", M());
|
|
@@ -80656,7 +80651,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
80656
80651
|
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 });
|
|
80657
80652
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
80658
80653
|
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 }) });
|
|
80659
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
80654
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DMxq-VLe.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
80660
80655
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
80661
80656
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
80662
80657
|
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 }) })] }) });
|
|
@@ -80978,7 +80973,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
80978
80973
|
}, []), 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] });
|
|
80979
80974
|
};
|
|
80980
80975
|
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 }) })] });
|
|
80981
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
80976
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DNPNsNRF.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
80982
80977
|
function ke(e, t) {
|
|
80983
80978
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
80984
80979
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -81858,7 +81853,7 @@ const attributeToDisplayFn = {
|
|
|
81858
81853
|
return jsxRuntimeExports.jsx(ExpiredFieldBlock, {});
|
|
81859
81854
|
if (!hasDisplayContent(value))
|
|
81860
81855
|
return null;
|
|
81861
|
-
if (
|
|
81856
|
+
if (isStructuredError(value)) {
|
|
81862
81857
|
return jsxRuntimeExports.jsx(DetailCard, { summary: "Error", defaultOpen: true, children: jsxRuntimeExports.jsx(ErrorStackBlock, { value }) });
|
|
81863
81858
|
}
|
|
81864
81859
|
return jsxRuntimeExports.jsx(DetailCard, { summary: "Error", defaultOpen: true, children: JsonBlock(value) });
|
|
@@ -82109,10 +82104,10 @@ function EventDataBlock({ eventType, data }) {
|
|
|
82109
82104
|
}
|
|
82110
82105
|
if (ERROR_EVENT_TYPES.has(eventType) && data != null && typeof data === "object") {
|
|
82111
82106
|
const record2 = data;
|
|
82112
|
-
if (
|
|
82107
|
+
if (isStructuredError(record2.error)) {
|
|
82113
82108
|
return jsxRuntimeExports.jsx(ErrorStackBlock, { value: record2.error });
|
|
82114
82109
|
}
|
|
82115
|
-
if (
|
|
82110
|
+
if (isStructuredError(record2)) {
|
|
82116
82111
|
return jsxRuntimeExports.jsx(ErrorStackBlock, { value: record2 });
|
|
82117
82112
|
}
|
|
82118
82113
|
}
|
|
@@ -82131,6 +82126,13 @@ SidebarDataContext.displayName = "SidebarDataContext";
|
|
|
82131
82126
|
function SidebarDataProvider({ value, children: children2 }) {
|
|
82132
82127
|
return jsxRuntimeExports.jsx(SidebarDataContext.Provider, { value, children: children2 });
|
|
82133
82128
|
}
|
|
82129
|
+
function useSidebarData() {
|
|
82130
|
+
const ctx = reactExports.useContext(SidebarDataContext);
|
|
82131
|
+
if (!ctx) {
|
|
82132
|
+
throw new Error("useSidebarData must be used within a SidebarDataProvider");
|
|
82133
|
+
}
|
|
82134
|
+
return ctx;
|
|
82135
|
+
}
|
|
82134
82136
|
function useSidebarDataOptional() {
|
|
82135
82137
|
return reactExports.useContext(SidebarDataContext);
|
|
82136
82138
|
}
|
|
@@ -82143,7 +82145,7 @@ function isWorkflowRun(data) {
|
|
|
82143
82145
|
function isHook(data) {
|
|
82144
82146
|
return data !== null && typeof data === "object" && "hookId" in data;
|
|
82145
82147
|
}
|
|
82146
|
-
function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spanDetailError, spanDetailLoading, onSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan }) {
|
|
82148
|
+
function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, spanDetailData, spanDetailError, spanDetailLoading, onSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan }) {
|
|
82147
82149
|
const toast2 = useToast();
|
|
82148
82150
|
const [stoppingSleep, setStoppingSleep] = reactExports.useState(false);
|
|
82149
82151
|
const [showResolveHookModal, setShowResolveHookModal] = reactExports.useState(false);
|
|
@@ -82193,21 +82195,21 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
|
|
|
82193
82195
|
if (resource !== "sleep" || !rawEvents)
|
|
82194
82196
|
return false;
|
|
82195
82197
|
const terminalStates = ["completed", "failed", "cancelled"];
|
|
82196
|
-
if (terminalStates.includes(
|
|
82198
|
+
if (terminalStates.includes(run2.status))
|
|
82197
82199
|
return false;
|
|
82198
82200
|
const hasWaitCreated = rawEvents.some((e) => e.eventType === "wait_created");
|
|
82199
82201
|
if (!hasWaitCreated)
|
|
82200
82202
|
return false;
|
|
82201
82203
|
const hasWaitCompleted = rawEvents.some((e) => e.eventType === "wait_completed");
|
|
82202
82204
|
return !hasWaitCompleted;
|
|
82203
|
-
}, [resource, rawEvents, rawEventsLength,
|
|
82205
|
+
}, [resource, rawEvents, rawEventsLength, run2.status]);
|
|
82204
82206
|
const canResolveHook = reactExports.useMemo(() => {
|
|
82205
82207
|
if (resource !== "hook" || !rawEvents || !resourceId)
|
|
82206
82208
|
return false;
|
|
82207
82209
|
if (resolvedHookIds.has(resourceId))
|
|
82208
82210
|
return false;
|
|
82209
82211
|
const terminalStates = ["completed", "failed", "cancelled"];
|
|
82210
|
-
if (terminalStates.includes(
|
|
82212
|
+
if (terminalStates.includes(run2.status))
|
|
82211
82213
|
return false;
|
|
82212
82214
|
const hasHookDisposed = rawEvents.some((e) => e.eventType === "hook_disposed");
|
|
82213
82215
|
if (hasHookDisposed)
|
|
@@ -82218,7 +82220,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
|
|
|
82218
82220
|
resourceId,
|
|
82219
82221
|
rawEvents,
|
|
82220
82222
|
rawEventsLength,
|
|
82221
|
-
|
|
82223
|
+
run2.status,
|
|
82222
82224
|
resolvedHookIds
|
|
82223
82225
|
]);
|
|
82224
82226
|
const error2 = spanDetailError ?? void 0;
|
|
@@ -82252,7 +82254,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
|
|
|
82252
82254
|
}
|
|
82253
82255
|
try {
|
|
82254
82256
|
setStoppingSleep(true);
|
|
82255
|
-
const result = await onWakeUpSleep(
|
|
82257
|
+
const result = await onWakeUpSleep(run2.runId, resourceId);
|
|
82256
82258
|
if (result.stoppedCount > 0) {
|
|
82257
82259
|
toast2.success("Run woken up", {
|
|
82258
82260
|
description: "The sleep call has been interrupted and the run woken up."
|
|
@@ -82318,11 +82320,11 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
|
|
|
82318
82320
|
if (typeof displayWorkflowName === "string") {
|
|
82319
82321
|
return displayWorkflowName;
|
|
82320
82322
|
}
|
|
82321
|
-
if (typeof
|
|
82322
|
-
return
|
|
82323
|
+
if (typeof run2.workflowName === "string") {
|
|
82324
|
+
return run2.workflowName;
|
|
82323
82325
|
}
|
|
82324
82326
|
return void 0;
|
|
82325
|
-
}, [displayData,
|
|
82327
|
+
}, [displayData, run2.workflowName]);
|
|
82326
82328
|
if (!selectedSpan || !resource || !resourceId) {
|
|
82327
82329
|
return null;
|
|
82328
82330
|
}
|
|
@@ -82336,7 +82338,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, spanDetailData, spa
|
|
|
82336
82338
|
}, children: [jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4" }), stoppingSleep ? "Waking up..." : "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", resolvingHook ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
|
|
82337
82339
|
background: "var(--ds-gray-1000)",
|
|
82338
82340
|
color: "var(--ds-background-100)"
|
|
82339
|
-
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, expiredAt:
|
|
82341
|
+
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), resource !== "run" && rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, encryptionKey })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
82340
82342
|
}
|
|
82341
82343
|
const MAP_HEIGHT = 56;
|
|
82342
82344
|
const TIMELINE_PADDING = 8;
|
|
@@ -83698,10 +83700,10 @@ function Kbd({ children: children2, className }) {
|
|
|
83698
83700
|
return jsxRuntimeExports.jsx("kbd", { className: cn$4("inline-flex h-5 min-w-5 items-center justify-center rounded bg-background-100/20 px-1 text-center font-sans text-xs leading-none", className), children: children2 });
|
|
83699
83701
|
}
|
|
83700
83702
|
const WorkflowIcon = () => {
|
|
83701
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16",
|
|
83703
|
+
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", style: { color: "currentColor" }, viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
|
|
83702
83704
|
};
|
|
83703
83705
|
const WebhookIcon = () => {
|
|
83704
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16",
|
|
83706
|
+
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", style: { color: "currentColor" }, children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.8349 3.24994C5.14454 4.44567 5.55423 5.97464 6.74996 6.665L7.39465 7.03721L7.02726 7.68466L5.14599 11C5.21289 11.1531 5.25 11.3222 5.25 11.5C5.25 12.1904 4.69036 12.75 4 12.75C3.30964 12.75 2.75 12.1904 2.75 11.5C2.75 10.8634 3.22584 10.338 3.84123 10.26L5.38944 7.5316C3.95909 6.30274 3.55857 4.19264 4.53586 2.49994C5.64043 0.586765 8.08679 -0.0687357 9.99996 1.03583C11.836 2.09584 12.5137 4.39156 11.5892 6.26591L10.4949 4.33754C10.4418 3.53274 10.0009 2.76843 9.24996 2.33487C8.05423 1.64452 6.52525 2.0542 5.8349 3.24994ZM9.146 4.99996C9.21289 4.84686 9.25 4.67776 9.25 4.5C9.25 3.80964 8.69036 3.25 8 3.25C7.30964 3.25 6.75 3.80964 6.75 4.5C6.75 5.13659 7.22586 5.66203 7.84127 5.74002L9.72266 9.05556L10.0956 9.71274L10.75 9.33493C11.9457 8.64458 13.4747 9.05427 14.165 10.25C14.8554 11.4457 14.4457 12.9747 13.25 13.6651C12.5047 14.0953 11.63 14.0983 10.9096 13.75H8.69252C9.85895 15.4685 12.1727 16.0191 14 14.9641C15.9131 13.8595 16.5686 11.4132 15.4641 9.5C14.4886 7.81038 12.4665 7.10169 10.6895 7.71998L9.146 4.99996ZM13.25 11.5C13.25 12.1904 12.6904 12.75 12 12.75C11.591 12.75 11.228 12.5536 10.9999 12.25H7.9298C7.57875 14.1006 5.95279 15.5 4 15.5C1.79086 15.5 0 13.7091 0 11.5C0 9.40018 1.61801 7.67826 3.67529 7.51299L2.58098 9.44147C1.92792 9.89251 1.5 10.6463 1.5 11.5C1.5 12.8807 2.61929 14 4 14C5.38071 14 6.5 12.8807 6.5 11.5V10.75H7.25H10.9999C11.228 10.4464 11.591 10.25 12 10.25C12.6904 10.25 13.25 10.8096 13.25 11.5Z", fill: "currentColor" }) });
|
|
83705
83707
|
};
|
|
83706
83708
|
const SleepIcon = () => {
|
|
83707
83709
|
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", style: { color: "currentColor" }, children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.25 1.25V2.03971C5.87928 2.18571 4.62678 2.72736 3.6089 3.54824L3.03033 2.96967L2.5 2.43934L1.43934 3.5L1.96967 4.03033L2.54824 4.6089C1.57979 5.80976 1 7.33717 1 9C1 12.866 4.13401 16 8 16C11.866 16 15 12.866 15 9C15 7.33717 14.4202 5.80976 13.4518 4.6089L14.0303 4.03033L14.5607 3.5L13.5 2.43934L12.9697 2.96967L12.3911 3.54824C11.3732 2.72736 10.1207 2.18571 8.75 2.03971V1.25H9.25H10V-0.25H9.25H8.75H7.25H6.75H6V1.25H6.75H7.25ZM2.5 9C2.5 5.96243 4.96243 3.5 8 3.5C11.0376 3.5 13.5 5.96243 13.5 9C13.5 12.0376 11.0376 14.5 8 14.5C4.96243 14.5 2.5 12.0376 2.5 9ZM8.75 6.75V6H7.25V6.75V9V9.75H8.75V9V6.75Z", fill: "currentColor" }) });
|
|
@@ -84221,8 +84223,10 @@ function getEventStyle(resource, isErrored) {
|
|
|
84221
84223
|
};
|
|
84222
84224
|
}
|
|
84223
84225
|
const EventRow = ({ span, isSelected, isDimmed, onSelectSpan }) => {
|
|
84226
|
+
var _a3;
|
|
84224
84227
|
const durationMs = getSpanDurationMs(span);
|
|
84225
|
-
const
|
|
84228
|
+
const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
|
|
84229
|
+
const isErrored = span.status.code === 2 || workflowStatus === "failed";
|
|
84226
84230
|
const { icon: Icon2, className: tagClassName } = getEventStyle(span.resource, isErrored);
|
|
84227
84231
|
return jsxRuntimeExports.jsx("li", { className: cn$4("relative overflow-clip group transition-opacity", ROW_HEIGHT_CLASS, isDimmed && "opacity-35"), role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, onClick: () => onSelectSpan(span.spanId), children: jsxRuntimeExports.jsx("div", { className: "h-full hover:bg-gray-100 group-aria-selected:bg-gray-100 group-aria-selected:hover:bg-gray-200", children: jsxRuntimeExports.jsxs("div", { className: "flex h-full min-w-0 items-center pl-4 pr-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx("span", { className: cn$4("shrink-0", tagClassName), children: jsxRuntimeExports.jsx(Icon2, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx("span", { className: "min-w-0 text-label-14", children: jsxRuntimeExports.jsx(MiddleTruncate, { value: span.name }) })] }), jsxRuntimeExports.jsx("div", { className: "ml-2 shrink-0", children: jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-900 tabular-nums", children: formatDuration(durationMs) }) })] }) }) });
|
|
84228
84232
|
};
|
|
@@ -84434,7 +84438,7 @@ function SegmentBar({ segments }) {
|
|
|
84434
84438
|
minWidth: 1,
|
|
84435
84439
|
background: overrideBg,
|
|
84436
84440
|
borderColor: overrideBorder
|
|
84437
|
-
}, children: showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null },
|
|
84441
|
+
}, children: showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null }, i);
|
|
84438
84442
|
}) });
|
|
84439
84443
|
}
|
|
84440
84444
|
const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, isDimmed, onSelect }) {
|
|
@@ -84469,7 +84473,7 @@ const DeltaIndicator = reactExports.memo(function DeltaIndicator2({ leftFrac, ri
|
|
|
84469
84473
|
}, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute left-0 right-0 top-1/2 h-px bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("span", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-label-12 leading-none whitespace-nowrap rounded-xs px-1 py-0.5 text-gray-100 bg-amber-800", children: label })] });
|
|
84470
84474
|
});
|
|
84471
84475
|
function TimelineHeader({ markers: markers2, hoverInfo: hoverInfo2 }) {
|
|
84472
|
-
return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label },
|
|
84476
|
+
return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, String(m2.value))), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }) });
|
|
84473
84477
|
}
|
|
84474
84478
|
function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, searchResult, onSelect, hoverFraction, altHeld = false }) {
|
|
84475
84479
|
const containerRef = reactExports.useRef(null);
|
|
@@ -84490,7 +84494,7 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
|
|
|
84490
84494
|
const gaps = reactExports.useMemo(() => computeSpanGaps(spans, viewStart, viewEnd), [spans, viewStart, viewEnd]);
|
|
84491
84495
|
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers2.map((marker2) => (
|
|
84492
84496
|
// Skip the "0s" origin marker since the left edge already implies it.
|
|
84493
|
-
Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } },
|
|
84497
|
+
Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
|
|
84494
84498
|
)) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start2 * ROW_HEIGHT_PX}px)` }, children: spans.slice(start2, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
|
|
84495
84499
|
}
|
|
84496
84500
|
const TooltipProvider = Provider$2;
|
|
@@ -84541,12 +84545,6 @@ const useActiveSpan = () => {
|
|
|
84541
84545
|
}
|
|
84542
84546
|
return context;
|
|
84543
84547
|
};
|
|
84544
|
-
function DetailPanel({ span, rootStart, onClose }) {
|
|
84545
|
-
const startMs = getHighResInMs(span.startTime);
|
|
84546
|
-
const durationMs = getSpanDurationMs(span);
|
|
84547
|
-
const offsetMs = startMs - rootStart;
|
|
84548
|
-
return jsxRuntimeExports.jsxs("aside", { className: "grid h-full max-h-full grid-rows-[2.5rem_1fr] bg-background-200", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-3 border-b border-gray-alpha-400", children: [jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-1000 truncate", children: span.name }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", onClick: onClose, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] }), jsxRuntimeExports.jsx("div", { className: "overflow-y-auto p-3 space-y-3", children: jsxRuntimeExports.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm", children: [jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Resource" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 font-mono", children: span.resource }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Duration" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 tabular-nums font-mono", children: formatDuration(durationMs) }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Offset" }), jsxRuntimeExports.jsxs("dd", { className: "text-gray-1000 tabular-nums font-mono", children: ["+", formatDuration(offsetMs)] }), jsxRuntimeExports.jsx("dt", { className: "text-gray-900", children: "Status" }), jsxRuntimeExports.jsx("dd", { className: "text-gray-1000 font-mono", children: span.status.code === 2 ? "Error" : "OK" })] }) })] });
|
|
84549
|
-
}
|
|
84550
84548
|
const MIN_VIEWPORT_MS = 1e-3;
|
|
84551
84549
|
function useAnimatedViewport(initial) {
|
|
84552
84550
|
const [viewport, setViewportState] = reactExports.useState(initial);
|
|
@@ -84602,10 +84600,10 @@ function useAnimatedViewport(initial) {
|
|
|
84602
84600
|
}
|
|
84603
84601
|
function useSelectedSpanInfo() {
|
|
84604
84602
|
const { activeSpan } = useActiveSpan();
|
|
84605
|
-
const sidebar =
|
|
84603
|
+
const sidebar = useSidebarData();
|
|
84606
84604
|
return reactExports.useMemo(() => {
|
|
84607
84605
|
var _a3, _b2;
|
|
84608
|
-
if (!activeSpan
|
|
84606
|
+
if (!activeSpan)
|
|
84609
84607
|
return null;
|
|
84610
84608
|
const correlationId = activeSpan.spanId;
|
|
84611
84609
|
const rawEvents = correlationId ? sidebar.events.filter((e) => e.correlationId === correlationId) : [];
|
|
@@ -84622,7 +84620,7 @@ function NewTraceViewer$1({ trace: trace2, onLoadMore, hasMore, isLoadingMore })
|
|
|
84622
84620
|
}
|
|
84623
84621
|
function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMore }) {
|
|
84624
84622
|
const { activeSpan, activeSpanId, setActiveSpan, clearActiveSpan } = useActiveSpan();
|
|
84625
|
-
const sidebar =
|
|
84623
|
+
const sidebar = useSidebarData();
|
|
84626
84624
|
const selectedSpan = useSelectedSpanInfo();
|
|
84627
84625
|
const [searchQuery, setSearchQuery] = reactExports.useState("");
|
|
84628
84626
|
const deferredSearchQuery = reactExports.useDeferredValue(searchQuery);
|
|
@@ -84904,16 +84902,15 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
84904
84902
|
e.stopPropagation();
|
|
84905
84903
|
setSearchQuery("");
|
|
84906
84904
|
}
|
|
84907
|
-
}, placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => setSearchQuery(""), className: "-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-base text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex", children: jsxRuntimeExports.jsx("kbd", { className: "inline-flex h-5 min-h-5 min-w-5 items-center justify-center rounded border border-gray-alpha-400 bg-background-100 px-1 font-sans text-[13px] font-medium leading-[1.7em] text-gray-900", children: "Esc" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace2.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-sm text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace2.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, hoverFraction, altHeld }) })] }), jsxRuntimeExports.jsxs("div", { className: "absolute right-3 bottom-3 z-[5] flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomOut, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomIn, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] }), activeSpan
|
|
84905
|
+
}, placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => setSearchQuery(""), className: "-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-base text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex", children: jsxRuntimeExports.jsx("kbd", { className: "inline-flex h-5 min-h-5 min-w-5 items-center justify-center rounded border border-gray-alpha-400 bg-background-100 px-1 font-sans text-[13px] font-medium leading-[1.7em] text-gray-900", children: "Esc" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace2.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-sm text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace2.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, hoverFraction, altHeld }) })] }), jsxRuntimeExports.jsxs("div", { className: "absolute right-3 bottom-3 z-[5] flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomOut, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomIn, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] }), activeSpan ? jsxRuntimeExports.jsxs("aside", { className: "flex flex-col h-full max-h-full bg-background-100 border-l border-gray-alpha-400 overflow-auto", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 pt-3 pb-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrevSpan, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNextSpan, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: clearActiveSpan, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, spanDetailData: sidebar.spanDetailData, spanDetailError: sidebar.spanDetailError, spanDetailLoading: sidebar.spanDetailLoading, onSpanSelect: sidebar.onSpanSelect, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan }) }) })] }) : null] });
|
|
84908
84906
|
}
|
|
84909
|
-
const NewTraceViewer = ({ run, events: events2, sidebarData, onLoadMore, hasMore, isLoadingMore, loading = false }) => {
|
|
84910
|
-
const
|
|
84911
|
-
if (!(
|
|
84907
|
+
const NewTraceViewer = ({ run: run2, events: events2, sidebarData, onLoadMore, hasMore, isLoadingMore, loading = false }) => {
|
|
84908
|
+
const trace2 = reactExports.useMemo(() => {
|
|
84909
|
+
if (!(run2 == null ? void 0 : run2.runId)) {
|
|
84912
84910
|
return void 0;
|
|
84913
84911
|
}
|
|
84914
|
-
return buildTrace(
|
|
84915
|
-
}, [
|
|
84916
|
-
const trace2 = traceWithMeta;
|
|
84912
|
+
return buildTrace(run2, events2, /* @__PURE__ */ new Date());
|
|
84913
|
+
}, [run2, events2]);
|
|
84917
84914
|
if (!trace2 || loading && events2.length === 0) {
|
|
84918
84915
|
return jsxRuntimeExports.jsx(TraceViewerSkeleton, {});
|
|
84919
84916
|
}
|
|
@@ -86052,15 +86049,15 @@ currentExtensions[0] = (dateString) => {
|
|
|
86052
86049
|
currentExtensions[1] = (epochSec) => {
|
|
86053
86050
|
return new Date(Math.round(epochSec * 1e3));
|
|
86054
86051
|
};
|
|
86055
|
-
currentExtensions[2] = (
|
|
86052
|
+
currentExtensions[2] = (buffer2) => {
|
|
86056
86053
|
let value = BigInt(0);
|
|
86057
|
-
for (let i = 0, l =
|
|
86058
|
-
value = BigInt(
|
|
86054
|
+
for (let i = 0, l = buffer2.byteLength; i < l; i++) {
|
|
86055
|
+
value = BigInt(buffer2[i]) + (value << BigInt(8));
|
|
86059
86056
|
}
|
|
86060
86057
|
return value;
|
|
86061
86058
|
};
|
|
86062
|
-
currentExtensions[3] = (
|
|
86063
|
-
return BigInt(-1) - currentExtensions[2](
|
|
86059
|
+
currentExtensions[3] = (buffer2) => {
|
|
86060
|
+
return BigInt(-1) - currentExtensions[2](buffer2);
|
|
86064
86061
|
};
|
|
86065
86062
|
currentExtensions[4] = (fraction) => {
|
|
86066
86063
|
return +(fraction[1] + "e" + fraction[0]);
|
|
@@ -86247,19 +86244,19 @@ function registerTypedArray(TypedArray, tag) {
|
|
|
86247
86244
|
if (!littleEndian && bytesPerElement == 1)
|
|
86248
86245
|
continue;
|
|
86249
86246
|
let sizeShift = bytesPerElement == 2 ? 1 : bytesPerElement == 4 ? 2 : bytesPerElement == 8 ? 3 : 0;
|
|
86250
|
-
currentExtensions[littleEndian ? tag : tag - 4] = bytesPerElement == 1 || littleEndian == isLittleEndianMachine$1 ? (
|
|
86247
|
+
currentExtensions[littleEndian ? tag : tag - 4] = bytesPerElement == 1 || littleEndian == isLittleEndianMachine$1 ? (buffer2) => {
|
|
86251
86248
|
if (!TypedArray)
|
|
86252
86249
|
throw new Error("Could not find typed array for code " + tag);
|
|
86253
86250
|
if (!currentDecoder.copyBuffers) {
|
|
86254
|
-
if (bytesPerElement === 1 || bytesPerElement === 2 && !(
|
|
86255
|
-
return new TypedArray(
|
|
86251
|
+
if (bytesPerElement === 1 || bytesPerElement === 2 && !(buffer2.byteOffset & 1) || bytesPerElement === 4 && !(buffer2.byteOffset & 3) || bytesPerElement === 8 && !(buffer2.byteOffset & 7))
|
|
86252
|
+
return new TypedArray(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength >> sizeShift);
|
|
86256
86253
|
}
|
|
86257
|
-
return new TypedArray(Uint8Array.prototype.slice.call(
|
|
86258
|
-
} : (
|
|
86254
|
+
return new TypedArray(Uint8Array.prototype.slice.call(buffer2, 0).buffer);
|
|
86255
|
+
} : (buffer2) => {
|
|
86259
86256
|
if (!TypedArray)
|
|
86260
86257
|
throw new Error("Could not find typed array for code " + tag);
|
|
86261
|
-
let dv = new DataView(
|
|
86262
|
-
let elements =
|
|
86258
|
+
let dv = new DataView(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength);
|
|
86259
|
+
let elements = buffer2.length >> sizeShift;
|
|
86263
86260
|
let ta2 = new TypedArray(elements);
|
|
86264
86261
|
let method = dv[dvMethod];
|
|
86265
86262
|
for (let i = 0; i < elements; i++) {
|
|
@@ -87212,8 +87209,8 @@ class Encoder extends Decoder {
|
|
|
87212
87209
|
}
|
|
87213
87210
|
}
|
|
87214
87211
|
}
|
|
87215
|
-
useBuffer(
|
|
87216
|
-
target =
|
|
87212
|
+
useBuffer(buffer2) {
|
|
87213
|
+
target = buffer2;
|
|
87217
87214
|
targetView = new DataView(target.buffer, target.byteOffset, target.byteLength);
|
|
87218
87215
|
position = 0;
|
|
87219
87216
|
}
|
|
@@ -87479,13 +87476,13 @@ function typedArrayEncoder(tag, size2) {
|
|
|
87479
87476
|
encode: function writeExtBuffer(typedArray, encode2) {
|
|
87480
87477
|
let length = typedArray.byteLength;
|
|
87481
87478
|
let offset2 = typedArray.byteOffset || 0;
|
|
87482
|
-
let
|
|
87483
|
-
encode2(hasNodeBuffer ? Buffer$1.from(
|
|
87479
|
+
let buffer2 = typedArray.buffer || typedArray;
|
|
87480
|
+
encode2(hasNodeBuffer ? Buffer$1.from(buffer2, offset2, length) : new Uint8Array(buffer2, offset2, length));
|
|
87484
87481
|
}
|
|
87485
87482
|
};
|
|
87486
87483
|
}
|
|
87487
|
-
function writeBuffer(
|
|
87488
|
-
let length =
|
|
87484
|
+
function writeBuffer(buffer2, makeRoom) {
|
|
87485
|
+
let length = buffer2.byteLength;
|
|
87489
87486
|
if (length < 24) {
|
|
87490
87487
|
target[position++] = 64 + length;
|
|
87491
87488
|
} else if (length < 256) {
|
|
@@ -87503,7 +87500,7 @@ function writeBuffer(buffer, makeRoom) {
|
|
|
87503
87500
|
if (position + length >= target.length) {
|
|
87504
87501
|
makeRoom(position + length);
|
|
87505
87502
|
}
|
|
87506
|
-
target.set(
|
|
87503
|
+
target.set(buffer2.buffer ? buffer2 : new Uint8Array(buffer2), position);
|
|
87507
87504
|
position += length;
|
|
87508
87505
|
}
|
|
87509
87506
|
function insertIds(serialized, idsToInsert) {
|
|
@@ -87569,8 +87566,8 @@ async function rpc(method, params) {
|
|
|
87569
87566
|
});
|
|
87570
87567
|
if (!res.ok) {
|
|
87571
87568
|
try {
|
|
87572
|
-
const
|
|
87573
|
-
const errorBody = decode(new Uint8Array(
|
|
87569
|
+
const buffer22 = await res.arrayBuffer();
|
|
87570
|
+
const errorBody = decode(new Uint8Array(buffer22));
|
|
87574
87571
|
if ((_a3 = errorBody == null ? void 0 : errorBody.error) == null ? void 0 : _a3.message) {
|
|
87575
87572
|
throw new Error(errorBody.error.message);
|
|
87576
87573
|
}
|
|
@@ -87583,8 +87580,8 @@ async function rpc(method, params) {
|
|
|
87583
87580
|
`RPC call ${method} failed: ${res.status} ${res.statusText}`
|
|
87584
87581
|
);
|
|
87585
87582
|
}
|
|
87586
|
-
const
|
|
87587
|
-
return decode(new Uint8Array(
|
|
87583
|
+
const buffer2 = await res.arrayBuffer();
|
|
87584
|
+
return decode(new Uint8Array(buffer2));
|
|
87588
87585
|
}
|
|
87589
87586
|
async function fetchRuns$1(worldEnv, params) {
|
|
87590
87587
|
return rpc("fetchRuns", { worldEnv, params });
|
|
@@ -88890,7 +88887,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
88890
88887
|
encrypt: encrypt$1,
|
|
88891
88888
|
importKey
|
|
88892
88889
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
88893
|
-
const version$1 = "5.0.0-beta.
|
|
88890
|
+
const version$1 = "5.0.0-beta.13";
|
|
88894
88891
|
const WorldCacheKey = Symbol.for("@workflow/world//cache");
|
|
88895
88892
|
const WorldCachePromiseKey = Symbol.for("@workflow/world//cachePromise");
|
|
88896
88893
|
const GetWorldFnKey$1 = Symbol.for("@workflow/world//getWorldFn");
|
|
@@ -88973,6 +88970,9 @@ function parseHealthCheckResponse(chunks) {
|
|
|
88973
88970
|
if (typeof r2.specVersion === "number") {
|
|
88974
88971
|
parsed.specVersion = r2.specVersion;
|
|
88975
88972
|
}
|
|
88973
|
+
if (typeof r2.workflowCoreVersion === "string") {
|
|
88974
|
+
parsed.workflowCoreVersion = r2.workflowCoreVersion;
|
|
88975
|
+
}
|
|
88976
88976
|
return parsed;
|
|
88977
88977
|
}
|
|
88978
88978
|
async function healthCheck(world, endpoint, options) {
|
|
@@ -89312,10 +89312,10 @@ function viewToBase64(value) {
|
|
|
89312
89312
|
}
|
|
89313
89313
|
function reviveArrayBuffer(value, global2) {
|
|
89314
89314
|
const base642 = value === "." ? "" : value;
|
|
89315
|
-
const
|
|
89316
|
-
const arrayBuffer = new global2.ArrayBuffer(
|
|
89315
|
+
const buffer2 = Buffer.from(base642, "base64");
|
|
89316
|
+
const arrayBuffer = new global2.ArrayBuffer(buffer2.length);
|
|
89317
89317
|
const uint8Array = new global2.Uint8Array(arrayBuffer);
|
|
89318
|
-
uint8Array.set(
|
|
89318
|
+
uint8Array.set(buffer2);
|
|
89319
89319
|
return arrayBuffer;
|
|
89320
89320
|
}
|
|
89321
89321
|
function revive(str) {
|
|
@@ -89803,6 +89803,9 @@ function decodeFormatPrefix(data) {
|
|
|
89803
89803
|
const payload = data.subarray(FORMAT_PREFIX_LENGTH);
|
|
89804
89804
|
return { format: str, payload };
|
|
89805
89805
|
}
|
|
89806
|
+
async function resolveEncryptionKey(key) {
|
|
89807
|
+
return typeof key === "function" ? key() : key;
|
|
89808
|
+
}
|
|
89806
89809
|
async function encrypt(data, key) {
|
|
89807
89810
|
if (!key || !(data instanceof Uint8Array))
|
|
89808
89811
|
return data;
|
|
@@ -90412,7 +90415,7 @@ function requireBuildClient() {
|
|
|
90412
90415
|
timeout: timeout2 = 500
|
|
90413
90416
|
}) {
|
|
90414
90417
|
this.get = async (key) => {
|
|
90415
|
-
var _a3, _b2, _c2,
|
|
90418
|
+
var _a3, _b2, _c2, _d2;
|
|
90416
90419
|
const controller = new AbortController();
|
|
90417
90420
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
90418
90421
|
try {
|
|
@@ -90450,7 +90453,7 @@ function requireBuildClient() {
|
|
|
90450
90453
|
timeoutError.stack = error2.stack;
|
|
90451
90454
|
(_c2 = this.onError) == null ? void 0 : _c2.call(this, timeoutError);
|
|
90452
90455
|
} else {
|
|
90453
|
-
(
|
|
90456
|
+
(_d2 = this.onError) == null ? void 0 : _d2.call(this, error2);
|
|
90454
90457
|
}
|
|
90455
90458
|
return null;
|
|
90456
90459
|
}
|
|
@@ -91034,13 +91037,13 @@ var EventConsumerResult;
|
|
|
91034
91037
|
EventConsumerResult2[EventConsumerResult2["NotConsumed"] = 1] = "NotConsumed";
|
|
91035
91038
|
EventConsumerResult2[EventConsumerResult2["Finished"] = 2] = "Finished";
|
|
91036
91039
|
})(EventConsumerResult || (EventConsumerResult = {}));
|
|
91037
|
-
|
|
91040
|
+
_d = ABORT_STREAM_NAME, _c = ABORT_HOOK_TOKEN;
|
|
91038
91041
|
class WorkflowAbortSignal {
|
|
91039
91042
|
constructor(streamName, hookToken) {
|
|
91040
91043
|
__publicField(this, "aborted", false);
|
|
91041
91044
|
__publicField(this, "reason");
|
|
91045
|
+
__publicField(this, _d);
|
|
91042
91046
|
__publicField(this, _c);
|
|
91043
|
-
__publicField(this, _b);
|
|
91044
91047
|
__privateAdd(this, _listeners, []);
|
|
91045
91048
|
__privateAdd(this, _onabort, null);
|
|
91046
91049
|
this[ABORT_STREAM_NAME] = streamName;
|
|
@@ -91122,7 +91125,7 @@ function getSerializeStream(reducers, cryptoKey) {
|
|
|
91122
91125
|
async transform(chunk, controller) {
|
|
91123
91126
|
try {
|
|
91124
91127
|
if (!keyState.resolved) {
|
|
91125
|
-
keyState.key = await cryptoKey;
|
|
91128
|
+
keyState.key = await resolveEncryptionKey(cryptoKey);
|
|
91126
91129
|
keyState.resolved = true;
|
|
91127
91130
|
}
|
|
91128
91131
|
const serialized = stringify$2(chunk, reducers);
|
|
@@ -91150,26 +91153,26 @@ function getSerializeStream(reducers, cryptoKey) {
|
|
|
91150
91153
|
}
|
|
91151
91154
|
function getDeserializeStream(revivers, cryptoKey) {
|
|
91152
91155
|
const decoder2 = new TextDecoder();
|
|
91153
|
-
let
|
|
91156
|
+
let buffer2 = new Uint8Array(0);
|
|
91154
91157
|
const keyState = { resolved: false, key: void 0 };
|
|
91155
91158
|
function appendToBuffer(data) {
|
|
91156
|
-
const newBuffer = new Uint8Array(
|
|
91157
|
-
newBuffer.set(
|
|
91158
|
-
newBuffer.set(data,
|
|
91159
|
-
|
|
91159
|
+
const newBuffer = new Uint8Array(buffer2.length + data.length);
|
|
91160
|
+
newBuffer.set(buffer2, 0);
|
|
91161
|
+
newBuffer.set(data, buffer2.length);
|
|
91162
|
+
buffer2 = newBuffer;
|
|
91160
91163
|
}
|
|
91161
91164
|
async function processFrames(controller) {
|
|
91162
91165
|
if (!keyState.resolved) {
|
|
91163
|
-
keyState.key = await cryptoKey;
|
|
91166
|
+
keyState.key = await resolveEncryptionKey(cryptoKey);
|
|
91164
91167
|
keyState.resolved = true;
|
|
91165
91168
|
}
|
|
91166
|
-
while (
|
|
91167
|
-
const frameLength = new DataView(
|
|
91168
|
-
if (
|
|
91169
|
+
while (buffer2.length >= FRAME_HEADER_SIZE$1) {
|
|
91170
|
+
const frameLength = new DataView(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength).getUint32(0, false);
|
|
91171
|
+
if (buffer2.length < FRAME_HEADER_SIZE$1 + frameLength) {
|
|
91169
91172
|
break;
|
|
91170
91173
|
}
|
|
91171
|
-
const frameData =
|
|
91172
|
-
|
|
91174
|
+
const frameData = buffer2.slice(FRAME_HEADER_SIZE$1, FRAME_HEADER_SIZE$1 + frameLength);
|
|
91175
|
+
buffer2 = buffer2.slice(FRAME_HEADER_SIZE$1 + frameLength);
|
|
91173
91176
|
let { format: format2, payload } = decodeFormatPrefix(frameData);
|
|
91174
91177
|
if (format2 === SerializationFormat.ENCRYPTED) {
|
|
91175
91178
|
if (!keyState.key) {
|
|
@@ -91201,14 +91204,14 @@ function getDeserializeStream(revivers, cryptoKey) {
|
|
|
91201
91204
|
}
|
|
91202
91205
|
const stream = new TransformStream({
|
|
91203
91206
|
async transform(chunk, controller) {
|
|
91204
|
-
if (
|
|
91207
|
+
if (buffer2.length === 0 && chunk.length >= FRAME_HEADER_SIZE$1) {
|
|
91205
91208
|
const possibleLength = new DataView(chunk.buffer, chunk.byteOffset, chunk.byteLength).getUint32(0, false);
|
|
91206
91209
|
if (possibleLength > 0 && possibleLength < 1e8) {
|
|
91207
91210
|
appendToBuffer(chunk);
|
|
91208
91211
|
await processFrames(controller);
|
|
91209
91212
|
return;
|
|
91210
91213
|
}
|
|
91211
|
-
} else if (
|
|
91214
|
+
} else if (buffer2.length > 0) {
|
|
91212
91215
|
appendToBuffer(chunk);
|
|
91213
91216
|
await processFrames(controller);
|
|
91214
91217
|
return;
|
|
@@ -91222,7 +91225,7 @@ function getDeserializeStream(revivers, cryptoKey) {
|
|
|
91222
91225
|
}
|
|
91223
91226
|
},
|
|
91224
91227
|
async flush(controller) {
|
|
91225
|
-
if (
|
|
91228
|
+
if (buffer2.length > 0) {
|
|
91226
91229
|
await processFrames(controller);
|
|
91227
91230
|
}
|
|
91228
91231
|
}
|
|
@@ -91278,7 +91281,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
91278
91281
|
throw new WorkflowRuntimeError(`"name" is required, got "${name2}"`);
|
|
91279
91282
|
}
|
|
91280
91283
|
const worldPromise = getWorldLazy();
|
|
91281
|
-
let
|
|
91284
|
+
let buffer2 = [];
|
|
91282
91285
|
let flushTimer = null;
|
|
91283
91286
|
let flushPromise = null;
|
|
91284
91287
|
let resolvedFlushIntervalMs;
|
|
@@ -91287,9 +91290,9 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
91287
91290
|
clearTimeout(flushTimer);
|
|
91288
91291
|
flushTimer = null;
|
|
91289
91292
|
}
|
|
91290
|
-
if (
|
|
91293
|
+
if (buffer2.length === 0)
|
|
91291
91294
|
return;
|
|
91292
|
-
const chunksToFlush =
|
|
91295
|
+
const chunksToFlush = buffer2.slice();
|
|
91293
91296
|
const world = await worldPromise;
|
|
91294
91297
|
if (resolvedFlushIntervalMs === void 0) {
|
|
91295
91298
|
resolvedFlushIntervalMs = world.streamFlushIntervalMs ?? STREAM_FLUSH_INTERVAL_MS;
|
|
@@ -91301,7 +91304,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
91301
91304
|
await world.streams.write(runId, name2, chunk);
|
|
91302
91305
|
}
|
|
91303
91306
|
}
|
|
91304
|
-
|
|
91307
|
+
buffer2 = [];
|
|
91305
91308
|
};
|
|
91306
91309
|
let flushWaiters = [];
|
|
91307
91310
|
const scheduleFlush = () => {
|
|
@@ -91326,7 +91329,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
91326
91329
|
await flushPromise;
|
|
91327
91330
|
flushPromise = null;
|
|
91328
91331
|
}
|
|
91329
|
-
|
|
91332
|
+
buffer2.push(chunk);
|
|
91330
91333
|
scheduleFlush();
|
|
91331
91334
|
await new Promise((resolve2, reject) => {
|
|
91332
91335
|
flushWaiters.push({ resolve: resolve2, reject });
|
|
@@ -91346,7 +91349,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
91346
91349
|
clearTimeout(flushTimer);
|
|
91347
91350
|
flushTimer = null;
|
|
91348
91351
|
}
|
|
91349
|
-
|
|
91352
|
+
buffer2 = [];
|
|
91350
91353
|
const waiters = flushWaiters;
|
|
91351
91354
|
flushWaiters = [];
|
|
91352
91355
|
const abortError = reason ?? new Error("Stream aborted");
|
|
@@ -91442,7 +91445,7 @@ function attachAbortListenerOnce(signal, streamName, runId, cryptoKey, ops) {
|
|
|
91442
91445
|
signal.addEventListener("abort", () => {
|
|
91443
91446
|
ops.push((async () => {
|
|
91444
91447
|
try {
|
|
91445
|
-
const key = await cryptoKey;
|
|
91448
|
+
const key = await resolveEncryptionKey(cryptoKey);
|
|
91446
91449
|
const payload = await dehydrateStepArguments({ aborted: true, reason: signal.reason }, runId, key);
|
|
91447
91450
|
const writable = new WorkflowServerWritableStream(runId, streamName);
|
|
91448
91451
|
const writer = writable.getWriter();
|
|
@@ -92659,14 +92662,25 @@ async function deleteJSON(filePath) {
|
|
|
92659
92662
|
}
|
|
92660
92663
|
async function writeExclusive(filePath, data) {
|
|
92661
92664
|
await ensureDir(path$3.dirname(filePath));
|
|
92665
|
+
const tempPath = `${filePath}.tmp.${ulid$1()}`;
|
|
92666
|
+
let tempFileCreated = false;
|
|
92662
92667
|
try {
|
|
92663
|
-
await promises.writeFile(
|
|
92664
|
-
|
|
92665
|
-
|
|
92666
|
-
|
|
92667
|
-
return
|
|
92668
|
+
await promises.writeFile(tempPath, data, { flag: "wx" });
|
|
92669
|
+
tempFileCreated = true;
|
|
92670
|
+
try {
|
|
92671
|
+
await withWindowsRetry(() => promises.link(tempPath, filePath));
|
|
92672
|
+
return true;
|
|
92673
|
+
} catch (error2) {
|
|
92674
|
+
if (error2.code === "EEXIST") {
|
|
92675
|
+
return false;
|
|
92676
|
+
}
|
|
92677
|
+
throw error2;
|
|
92678
|
+
}
|
|
92679
|
+
} finally {
|
|
92680
|
+
if (tempFileCreated) {
|
|
92681
|
+
await withWindowsRetry(() => promises.unlink(tempPath), 3).catch(() => {
|
|
92682
|
+
});
|
|
92668
92683
|
}
|
|
92669
|
-
throw error2;
|
|
92670
92684
|
}
|
|
92671
92685
|
}
|
|
92672
92686
|
async function listJSONFiles(dirPath) {
|
|
@@ -94035,11 +94049,11 @@ function requireConstants$5() {
|
|
|
94035
94049
|
const wellknownHeaderNameBuffers = {};
|
|
94036
94050
|
Object.setPrototypeOf(wellknownHeaderNameBuffers, null);
|
|
94037
94051
|
function getHeaderNameAsBuffer(header) {
|
|
94038
|
-
let
|
|
94039
|
-
if (
|
|
94040
|
-
|
|
94052
|
+
let buffer2 = wellknownHeaderNameBuffers[header];
|
|
94053
|
+
if (buffer2 === void 0) {
|
|
94054
|
+
buffer2 = Buffer.from(header);
|
|
94041
94055
|
}
|
|
94042
|
-
return
|
|
94056
|
+
return buffer2;
|
|
94043
94057
|
}
|
|
94044
94058
|
for (let i = 0; i < wellknownHeaderNames.length; ++i) {
|
|
94045
94059
|
const key = wellknownHeaderNames[i];
|
|
@@ -94474,8 +94488,8 @@ function requireUtil$5() {
|
|
|
94474
94488
|
}
|
|
94475
94489
|
return headers2.map((x2) => Buffer.from(x2));
|
|
94476
94490
|
}
|
|
94477
|
-
function isBuffer(
|
|
94478
|
-
return
|
|
94491
|
+
function isBuffer(buffer2) {
|
|
94492
|
+
return buffer2 instanceof Uint8Array || Buffer.isBuffer(buffer2);
|
|
94479
94493
|
}
|
|
94480
94494
|
function assertRequestHandler(handler, method, upgrade) {
|
|
94481
94495
|
if (!handler || typeof handler !== "object") {
|
|
@@ -95884,7 +95898,7 @@ function requireUnwrapHandler() {
|
|
|
95884
95898
|
var dispatcherBase;
|
|
95885
95899
|
var hasRequiredDispatcherBase;
|
|
95886
95900
|
function requireDispatcherBase() {
|
|
95887
|
-
var _a3, _b2, _c2,
|
|
95901
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
95888
95902
|
if (hasRequiredDispatcherBase) return dispatcherBase;
|
|
95889
95903
|
hasRequiredDispatcherBase = 1;
|
|
95890
95904
|
const Dispatcher = requireDispatcher();
|
|
@@ -95897,11 +95911,11 @@ function requireDispatcherBase() {
|
|
|
95897
95911
|
const { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = requireSymbols();
|
|
95898
95912
|
const kOnDestroyed = Symbol("onDestroyed");
|
|
95899
95913
|
const kOnClosed = Symbol("onClosed");
|
|
95900
|
-
class DispatcherBase extends (_e2 = Dispatcher,
|
|
95914
|
+
class DispatcherBase extends (_e2 = Dispatcher, _d2 = kDestroyed, _c2 = kOnDestroyed, _b2 = kClosed, _a3 = kOnClosed, _e2) {
|
|
95901
95915
|
constructor() {
|
|
95902
95916
|
super(...arguments);
|
|
95903
95917
|
/** @type {boolean} */
|
|
95904
|
-
__publicField(this,
|
|
95918
|
+
__publicField(this, _d2, false);
|
|
95905
95919
|
/** @type {Array<Function|null} */
|
|
95906
95920
|
__publicField(this, _c2, null);
|
|
95907
95921
|
/** @type {boolean} */
|
|
@@ -97088,14 +97102,14 @@ function requireEncoding() {
|
|
|
97088
97102
|
if (hasRequiredEncoding) return encoding;
|
|
97089
97103
|
hasRequiredEncoding = 1;
|
|
97090
97104
|
const textDecoder = new TextDecoder();
|
|
97091
|
-
function utf8DecodeBytes(
|
|
97092
|
-
if (
|
|
97105
|
+
function utf8DecodeBytes(buffer2) {
|
|
97106
|
+
if (buffer2.length === 0) {
|
|
97093
97107
|
return "";
|
|
97094
97108
|
}
|
|
97095
|
-
if (
|
|
97096
|
-
|
|
97109
|
+
if (buffer2[0] === 239 && buffer2[1] === 187 && buffer2[2] === 191) {
|
|
97110
|
+
buffer2 = buffer2.subarray(3);
|
|
97097
97111
|
}
|
|
97098
|
-
const output = textDecoder.decode(
|
|
97112
|
+
const output = textDecoder.decode(buffer2);
|
|
97099
97113
|
return output;
|
|
97100
97114
|
}
|
|
97101
97115
|
encoding = {
|
|
@@ -97146,8 +97160,8 @@ function requireInfra() {
|
|
|
97146
97160
|
if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {
|
|
97147
97161
|
return "failure";
|
|
97148
97162
|
}
|
|
97149
|
-
const
|
|
97150
|
-
return new Uint8Array(
|
|
97163
|
+
const buffer2 = Buffer.from(data, "base64");
|
|
97164
|
+
return new Uint8Array(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength);
|
|
97151
97165
|
}
|
|
97152
97166
|
function isASCIIWhitespace(char) {
|
|
97153
97167
|
return char === 9 || // \t
|
|
@@ -99435,12 +99449,12 @@ function requireFormdataParser() {
|
|
|
99435
99449
|
}
|
|
99436
99450
|
return lead === 0 && trail2 === buf.length - 1 ? buf : buf.subarray(lead, trail2 + 1);
|
|
99437
99451
|
}
|
|
99438
|
-
function bufferStartsWith(
|
|
99439
|
-
if (
|
|
99452
|
+
function bufferStartsWith(buffer2, start2, position2) {
|
|
99453
|
+
if (buffer2.length < start2.length) {
|
|
99440
99454
|
return false;
|
|
99441
99455
|
}
|
|
99442
99456
|
for (let i = 0; i < start2.length; i++) {
|
|
99443
|
-
if (start2[i] !==
|
|
99457
|
+
if (start2[i] !== buffer2[position2.position + i]) {
|
|
99444
99458
|
return false;
|
|
99445
99459
|
}
|
|
99446
99460
|
}
|
|
@@ -100802,14 +100816,14 @@ upgrade: ${upgrade}\r
|
|
|
100802
100816
|
if (contentLength != null && contentLength !== body2.size) {
|
|
100803
100817
|
throw new RequestContentLengthMismatchError();
|
|
100804
100818
|
}
|
|
100805
|
-
const
|
|
100819
|
+
const buffer2 = Buffer.from(await body2.arrayBuffer());
|
|
100806
100820
|
socket.cork();
|
|
100807
100821
|
socket.write(`${header}content-length: ${contentLength}\r
|
|
100808
100822
|
\r
|
|
100809
100823
|
`, "latin1");
|
|
100810
|
-
socket.write(
|
|
100824
|
+
socket.write(buffer2);
|
|
100811
100825
|
socket.uncork();
|
|
100812
|
-
request2.onBodySent(
|
|
100826
|
+
request2.onBodySent(buffer2);
|
|
100813
100827
|
request2.onRequestSent();
|
|
100814
100828
|
if (!expectsPayload && request2.reset !== false) {
|
|
100815
100829
|
socket[kReset] = true;
|
|
@@ -101654,12 +101668,12 @@ function requireClientH2() {
|
|
|
101654
101668
|
if (contentLength != null && contentLength !== body2.size) {
|
|
101655
101669
|
throw new RequestContentLengthMismatchError();
|
|
101656
101670
|
}
|
|
101657
|
-
const
|
|
101671
|
+
const buffer2 = Buffer.from(await body2.arrayBuffer());
|
|
101658
101672
|
h2stream.cork();
|
|
101659
|
-
h2stream.write(
|
|
101673
|
+
h2stream.write(buffer2);
|
|
101660
101674
|
h2stream.uncork();
|
|
101661
101675
|
h2stream.end();
|
|
101662
|
-
request2.onBodySent(
|
|
101676
|
+
request2.onBodySent(buffer2);
|
|
101663
101677
|
request2.onRequestSent();
|
|
101664
101678
|
if (!expectsPayload) {
|
|
101665
101679
|
socket[kReset] = true;
|
|
@@ -102322,7 +102336,7 @@ function requireFixedQueue() {
|
|
|
102322
102336
|
var poolBase;
|
|
102323
102337
|
var hasRequiredPoolBase;
|
|
102324
102338
|
function requirePoolBase() {
|
|
102325
|
-
var _a3, _b2, _c2,
|
|
102339
|
+
var _a3, _b2, _c2, _d2, _e2, _f, _g;
|
|
102326
102340
|
if (hasRequiredPoolBase) return poolBase;
|
|
102327
102341
|
hasRequiredPoolBase = 1;
|
|
102328
102342
|
const { PoolStats } = requireStats();
|
|
@@ -102346,7 +102360,7 @@ function requirePoolBase() {
|
|
|
102346
102360
|
__publicField(this, _g, new FixedQueue());
|
|
102347
102361
|
__publicField(this, _f, 0);
|
|
102348
102362
|
__publicField(this, _e2, []);
|
|
102349
|
-
__publicField(this,
|
|
102363
|
+
__publicField(this, _d2, false);
|
|
102350
102364
|
__publicField(this, _c2, (origin, targets) => {
|
|
102351
102365
|
this.emit("connect", origin, [this, ...targets]);
|
|
102352
102366
|
});
|
|
@@ -102357,7 +102371,7 @@ function requirePoolBase() {
|
|
|
102357
102371
|
this.emit("connectionError", origin, [this, ...targets], err);
|
|
102358
102372
|
});
|
|
102359
102373
|
}
|
|
102360
|
-
[(_g = kQueue, _f = kQueued, _e2 = kClients,
|
|
102374
|
+
[(_g = kQueue, _f = kQueued, _e2 = kClients, _d2 = kNeedDrain, kOnDrain)](client2, origin, targets) {
|
|
102361
102375
|
const queue = this[kQueue];
|
|
102362
102376
|
let needDrain = false;
|
|
102363
102377
|
while (!needDrain) {
|
|
@@ -103034,7 +103048,7 @@ function requireSocks5Utils() {
|
|
|
103034
103048
|
};
|
|
103035
103049
|
}
|
|
103036
103050
|
function parseIPv6(address) {
|
|
103037
|
-
const
|
|
103051
|
+
const buffer2 = Buffer2.alloc(16);
|
|
103038
103052
|
const doubleColonIndex = address.indexOf("::");
|
|
103039
103053
|
if (doubleColonIndex !== -1) {
|
|
103040
103054
|
const before = address.slice(0, doubleColonIndex);
|
|
@@ -103043,21 +103057,21 @@ function requireSocks5Utils() {
|
|
|
103043
103057
|
const afterParts = after === "" ? [] : after.split(":");
|
|
103044
103058
|
let bufferIndex = 0;
|
|
103045
103059
|
for (const part of beforeParts) {
|
|
103046
|
-
|
|
103060
|
+
buffer2.writeUInt16BE(parseInt(part, 16), bufferIndex);
|
|
103047
103061
|
bufferIndex += 2;
|
|
103048
103062
|
}
|
|
103049
103063
|
bufferIndex = 16 - afterParts.length * 2;
|
|
103050
103064
|
for (const part of afterParts) {
|
|
103051
|
-
|
|
103065
|
+
buffer2.writeUInt16BE(parseInt(part, 16), bufferIndex);
|
|
103052
103066
|
bufferIndex += 2;
|
|
103053
103067
|
}
|
|
103054
103068
|
} else {
|
|
103055
103069
|
const parts = address.split(":");
|
|
103056
103070
|
for (let i = 0; i < parts.length; i++) {
|
|
103057
|
-
|
|
103071
|
+
buffer2.writeUInt16BE(parseInt(parts[i], 16), i * 2);
|
|
103058
103072
|
}
|
|
103059
103073
|
}
|
|
103060
|
-
return
|
|
103074
|
+
return buffer2;
|
|
103061
103075
|
}
|
|
103062
103076
|
function buildAddressBuffer(type, addressBuffer, port) {
|
|
103063
103077
|
const portBuffer = Buffer2.allocUnsafe(2);
|
|
@@ -103068,42 +103082,42 @@ function requireSocks5Utils() {
|
|
|
103068
103082
|
portBuffer
|
|
103069
103083
|
]);
|
|
103070
103084
|
}
|
|
103071
|
-
function parseResponseAddress(
|
|
103072
|
-
if (
|
|
103085
|
+
function parseResponseAddress(buffer2, offset2 = 0) {
|
|
103086
|
+
if (buffer2.length < offset2 + 1) {
|
|
103073
103087
|
throw new InvalidArgumentError("Buffer too small to contain address type");
|
|
103074
103088
|
}
|
|
103075
|
-
const addressType =
|
|
103089
|
+
const addressType = buffer2[offset2];
|
|
103076
103090
|
let address;
|
|
103077
103091
|
let currentOffset = offset2 + 1;
|
|
103078
103092
|
switch (addressType) {
|
|
103079
103093
|
case 1: {
|
|
103080
|
-
if (
|
|
103094
|
+
if (buffer2.length < currentOffset + 6) {
|
|
103081
103095
|
throw new InvalidArgumentError("Buffer too small for IPv4 address");
|
|
103082
103096
|
}
|
|
103083
|
-
address = Array.from(
|
|
103097
|
+
address = Array.from(buffer2.subarray(currentOffset, currentOffset + 4)).join(".");
|
|
103084
103098
|
currentOffset += 4;
|
|
103085
103099
|
break;
|
|
103086
103100
|
}
|
|
103087
103101
|
case 3: {
|
|
103088
|
-
if (
|
|
103102
|
+
if (buffer2.length < currentOffset + 1) {
|
|
103089
103103
|
throw new InvalidArgumentError("Buffer too small for domain length");
|
|
103090
103104
|
}
|
|
103091
|
-
const domainLength =
|
|
103105
|
+
const domainLength = buffer2[currentOffset];
|
|
103092
103106
|
currentOffset += 1;
|
|
103093
|
-
if (
|
|
103107
|
+
if (buffer2.length < currentOffset + domainLength + 2) {
|
|
103094
103108
|
throw new InvalidArgumentError("Buffer too small for domain address");
|
|
103095
103109
|
}
|
|
103096
|
-
address =
|
|
103110
|
+
address = buffer2.subarray(currentOffset, currentOffset + domainLength).toString("utf8");
|
|
103097
103111
|
currentOffset += domainLength;
|
|
103098
103112
|
break;
|
|
103099
103113
|
}
|
|
103100
103114
|
case 4: {
|
|
103101
|
-
if (
|
|
103115
|
+
if (buffer2.length < currentOffset + 18) {
|
|
103102
103116
|
throw new InvalidArgumentError("Buffer too small for IPv6 address");
|
|
103103
103117
|
}
|
|
103104
103118
|
const parts = [];
|
|
103105
103119
|
for (let i = 0; i < 8; i++) {
|
|
103106
|
-
const value =
|
|
103120
|
+
const value = buffer2.readUInt16BE(currentOffset + i * 2);
|
|
103107
103121
|
parts.push(value.toString(16));
|
|
103108
103122
|
}
|
|
103109
103123
|
address = parts.join(":");
|
|
@@ -103113,10 +103127,10 @@ function requireSocks5Utils() {
|
|
|
103113
103127
|
default:
|
|
103114
103128
|
throw new InvalidArgumentError(`Invalid address type: ${addressType}`);
|
|
103115
103129
|
}
|
|
103116
|
-
if (
|
|
103130
|
+
if (buffer2.length < currentOffset + 2) {
|
|
103117
103131
|
throw new InvalidArgumentError("Buffer too small for port");
|
|
103118
103132
|
}
|
|
103119
|
-
const port =
|
|
103133
|
+
const port = buffer2.readUInt16BE(currentOffset);
|
|
103120
103134
|
currentOffset += 2;
|
|
103121
103135
|
return {
|
|
103122
103136
|
address,
|
|
@@ -104128,7 +104142,7 @@ function requireRetryHandler() {
|
|
|
104128
104142
|
this.etag = null;
|
|
104129
104143
|
}
|
|
104130
104144
|
onResponseStartWithRetry(controller, statusCode, headers2, statusMessage, err) {
|
|
104131
|
-
var _a3, _b2, _c2,
|
|
104145
|
+
var _a3, _b2, _c2, _d2;
|
|
104132
104146
|
if (this.retryOpts.throwOnError) {
|
|
104133
104147
|
if (this.retryOpts.statusCodes.includes(statusCode) === false) {
|
|
104134
104148
|
this.headersSent = true;
|
|
@@ -104140,7 +104154,7 @@ function requireRetryHandler() {
|
|
|
104140
104154
|
}
|
|
104141
104155
|
if (isDisturbed(this.opts.body)) {
|
|
104142
104156
|
this.headersSent = true;
|
|
104143
|
-
(
|
|
104157
|
+
(_d2 = (_c2 = this.handler).onResponseStart) == null ? void 0 : _d2.call(_c2, controller, statusCode, headers2, statusMessage);
|
|
104144
104158
|
return;
|
|
104145
104159
|
}
|
|
104146
104160
|
function shouldRetry(passedErr) {
|
|
@@ -104212,7 +104226,7 @@ function requireRetryHandler() {
|
|
|
104212
104226
|
setTimeout(() => cb(null), retryTimeout);
|
|
104213
104227
|
}
|
|
104214
104228
|
onResponseStart(controller, statusCode, headers2, statusMessage) {
|
|
104215
|
-
var _a3, _b2, _c2,
|
|
104229
|
+
var _a3, _b2, _c2, _d2;
|
|
104216
104230
|
this.error = null;
|
|
104217
104231
|
this.retryCount += 1;
|
|
104218
104232
|
if (statusCode >= 300) {
|
|
@@ -104288,7 +104302,7 @@ function requireRetryHandler() {
|
|
|
104288
104302
|
this.etag = null;
|
|
104289
104303
|
}
|
|
104290
104304
|
this.headersSent = true;
|
|
104291
|
-
(
|
|
104305
|
+
(_d2 = (_c2 = this.handler).onResponseStart) == null ? void 0 : _d2.call(
|
|
104292
104306
|
_c2,
|
|
104293
104307
|
controller,
|
|
104294
104308
|
statusCode,
|
|
@@ -104791,13 +104805,13 @@ function requireReadable() {
|
|
|
104791
104805
|
if (chunks.length === 0 || length === 0) {
|
|
104792
104806
|
return "";
|
|
104793
104807
|
}
|
|
104794
|
-
const
|
|
104795
|
-
const bufferLength =
|
|
104796
|
-
const start2 = bufferLength > 2 &&
|
|
104808
|
+
const buffer2 = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length);
|
|
104809
|
+
const bufferLength = buffer2.length;
|
|
104810
|
+
const start2 = bufferLength > 2 && buffer2[0] === 239 && buffer2[1] === 187 && buffer2[2] === 191 ? 3 : 0;
|
|
104797
104811
|
if (!encoding2 || encoding2 === "utf8" || encoding2 === "utf-8") {
|
|
104798
|
-
return
|
|
104812
|
+
return buffer2.utf8Slice(start2, bufferLength);
|
|
104799
104813
|
} else {
|
|
104800
|
-
return
|
|
104814
|
+
return buffer2.subarray(start2, bufferLength).toString(encoding2);
|
|
104801
104815
|
}
|
|
104802
104816
|
}
|
|
104803
104817
|
function chunksConcat(chunks, length) {
|
|
@@ -104807,14 +104821,14 @@ function requireReadable() {
|
|
|
104807
104821
|
if (chunks.length === 1) {
|
|
104808
104822
|
return new Uint8Array(chunks[0]);
|
|
104809
104823
|
}
|
|
104810
|
-
const
|
|
104824
|
+
const buffer2 = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer);
|
|
104811
104825
|
let offset2 = 0;
|
|
104812
104826
|
for (let i = 0; i < chunks.length; ++i) {
|
|
104813
104827
|
const chunk = chunks[i];
|
|
104814
|
-
|
|
104828
|
+
buffer2.set(chunk, offset2);
|
|
104815
104829
|
offset2 += chunk.length;
|
|
104816
104830
|
}
|
|
104817
|
-
return
|
|
104831
|
+
return buffer2;
|
|
104818
104832
|
}
|
|
104819
104833
|
function consumeEnd(consume2, encoding2) {
|
|
104820
104834
|
const { type, body: body2, resolve: resolve2, stream, length } = consume2;
|
|
@@ -108456,7 +108470,7 @@ function requireDns() {
|
|
|
108456
108470
|
_newOrigin = new WeakMap();
|
|
108457
108471
|
_firstTry = new WeakMap();
|
|
108458
108472
|
dns = (interceptorOpts) => {
|
|
108459
|
-
var _a3, _b2, _c2,
|
|
108473
|
+
var _a3, _b2, _c2, _d2;
|
|
108460
108474
|
if ((interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) != null && (typeof (interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) !== "number" || (interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) < 0)) {
|
|
108461
108475
|
throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number");
|
|
108462
108476
|
}
|
|
@@ -108477,7 +108491,7 @@ function requireDns() {
|
|
|
108477
108491
|
if ((interceptorOpts == null ? void 0 : interceptorOpts.pick) != null && typeof (interceptorOpts == null ? void 0 : interceptorOpts.pick) !== "function") {
|
|
108478
108492
|
throw new InvalidArgumentError("Invalid pick. Must be a function");
|
|
108479
108493
|
}
|
|
108480
|
-
if ((interceptorOpts == null ? void 0 : interceptorOpts.storage) != null && (typeof ((_a3 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _a3.get) !== "function" || typeof ((_b2 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _b2.set) !== "function" || typeof ((_c2 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _c2.full) !== "function" || typeof ((
|
|
108494
|
+
if ((interceptorOpts == null ? void 0 : interceptorOpts.storage) != null && (typeof ((_a3 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _a3.get) !== "function" || typeof ((_b2 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _b2.set) !== "function" || typeof ((_c2 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _c2.full) !== "function" || typeof ((_d2 = interceptorOpts == null ? void 0 : interceptorOpts.storage) == null ? void 0 : _d2.delete) !== "function")) {
|
|
108481
108495
|
throw new InvalidArgumentError("Invalid storage. Must be a object with methods: { get, set, full, delete }");
|
|
108482
108496
|
}
|
|
108483
108497
|
const dualStack = (interceptorOpts == null ? void 0 : interceptorOpts.dualStack) ?? true;
|
|
@@ -109922,7 +109936,7 @@ function requireCacheRevalidationHandler() {
|
|
|
109922
109936
|
(_b2 = (_a3 = __privateGet(this, _handler)).onRequestUpgrade) == null ? void 0 : _b2.call(_a3, controller, statusCode, headers2, socket);
|
|
109923
109937
|
}
|
|
109924
109938
|
onResponseStart(controller, statusCode, headers2, statusMessage) {
|
|
109925
|
-
var _a3, _b2, _c2,
|
|
109939
|
+
var _a3, _b2, _c2, _d2;
|
|
109926
109940
|
assert2(__privateGet(this, _callback) != null);
|
|
109927
109941
|
__privateSet(this, _successful, statusCode === 304 || __privateGet(this, _allowErrorStatusCodes) && statusCode >= 500 && statusCode <= 504);
|
|
109928
109942
|
__privateGet(this, _callback).call(this, __privateGet(this, _successful), __privateGet(this, _context));
|
|
@@ -109931,7 +109945,7 @@ function requireCacheRevalidationHandler() {
|
|
|
109931
109945
|
return true;
|
|
109932
109946
|
}
|
|
109933
109947
|
(_b2 = (_a3 = __privateGet(this, _handler)).onRequestStart) == null ? void 0 : _b2.call(_a3, controller, __privateGet(this, _context));
|
|
109934
|
-
(
|
|
109948
|
+
(_d2 = (_c2 = __privateGet(this, _handler)).onResponseStart) == null ? void 0 : _d2.call(
|
|
109935
109949
|
_c2,
|
|
109936
109950
|
controller,
|
|
109937
109951
|
statusCode,
|
|
@@ -110737,7 +110751,7 @@ function requireDeduplicationHandler() {
|
|
|
110737
110751
|
* @param {object} trailers
|
|
110738
110752
|
*/
|
|
110739
110753
|
onResponseEnd(controller, trailers) {
|
|
110740
|
-
var _a3, _b2, _c2,
|
|
110754
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
110741
110755
|
if (__privateGet(this, _aborted) || __privateGet(this, _completed)) {
|
|
110742
110756
|
return;
|
|
110743
110757
|
}
|
|
@@ -110758,7 +110772,7 @@ function requireDeduplicationHandler() {
|
|
|
110758
110772
|
continue;
|
|
110759
110773
|
}
|
|
110760
110774
|
try {
|
|
110761
|
-
(
|
|
110775
|
+
(_d2 = (_c2 = waitingHandler.handler).onResponseEnd) == null ? void 0 : _d2.call(_c2, waitingHandler.controller, trailers);
|
|
110762
110776
|
} catch {
|
|
110763
110777
|
}
|
|
110764
110778
|
waitingHandler.done = true;
|
|
@@ -114080,9 +114094,9 @@ function requireFetch() {
|
|
|
114080
114094
|
fetchParams.controller.terminate(bytes);
|
|
114081
114095
|
return;
|
|
114082
114096
|
}
|
|
114083
|
-
const
|
|
114084
|
-
if (
|
|
114085
|
-
fetchParams.controller.controller.enqueue(
|
|
114097
|
+
const buffer2 = new Uint8Array(bytes);
|
|
114098
|
+
if (buffer2.byteLength) {
|
|
114099
|
+
fetchParams.controller.controller.enqueue(buffer2);
|
|
114086
114100
|
}
|
|
114087
114101
|
if (isErrored(stream)) {
|
|
114088
114102
|
fetchParams.controller.terminate();
|
|
@@ -115524,13 +115538,13 @@ function requireEvents() {
|
|
|
115524
115538
|
});
|
|
115525
115539
|
}
|
|
115526
115540
|
static createFastMessageEvent(type, init2) {
|
|
115527
|
-
var _a3, _b2, _c2,
|
|
115541
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
115528
115542
|
const messageEvent = new _MessageEvent(kConstruct, type, init2);
|
|
115529
115543
|
__privateSet(messageEvent, _eventInit, init2);
|
|
115530
115544
|
(_a3 = __privateGet(messageEvent, _eventInit)).data ?? (_a3.data = null);
|
|
115531
115545
|
(_b2 = __privateGet(messageEvent, _eventInit)).origin ?? (_b2.origin = "");
|
|
115532
115546
|
(_c2 = __privateGet(messageEvent, _eventInit)).lastEventId ?? (_c2.lastEventId = "");
|
|
115533
|
-
(
|
|
115547
|
+
(_d2 = __privateGet(messageEvent, _eventInit)).source ?? (_d2.source = null);
|
|
115534
115548
|
(_e2 = __privateGet(messageEvent, _eventInit)).ports ?? (_e2.ports = []);
|
|
115535
115549
|
return messageEvent;
|
|
115536
115550
|
}
|
|
@@ -115822,11 +115836,11 @@ function requireUtil$1() {
|
|
|
115822
115836
|
function websocketMessageReceived(handler, type, data) {
|
|
115823
115837
|
handler.onMessage(type, data);
|
|
115824
115838
|
}
|
|
115825
|
-
function toArrayBuffer(
|
|
115826
|
-
if (
|
|
115827
|
-
return
|
|
115839
|
+
function toArrayBuffer(buffer2) {
|
|
115840
|
+
if (buffer2.byteLength === buffer2.buffer.byteLength) {
|
|
115841
|
+
return buffer2.buffer;
|
|
115828
115842
|
}
|
|
115829
|
-
return new Uint8Array(
|
|
115843
|
+
return new Uint8Array(buffer2).buffer;
|
|
115830
115844
|
}
|
|
115831
115845
|
function isValidSubprotocol(protocol) {
|
|
115832
115846
|
if (protocol.length === 0) {
|
|
@@ -115942,9 +115956,9 @@ function requireUtil$1() {
|
|
|
115942
115956
|
const fatalDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
115943
115957
|
return fatalDecoder.decode.bind(fatalDecoder);
|
|
115944
115958
|
}
|
|
115945
|
-
return function(
|
|
115946
|
-
if (isUtf8(
|
|
115947
|
-
return
|
|
115959
|
+
return function(buffer2) {
|
|
115960
|
+
if (isUtf8(buffer2)) {
|
|
115961
|
+
return buffer2.toString("utf-8");
|
|
115948
115962
|
}
|
|
115949
115963
|
throw new TypeError("Invalid utf-8 received.");
|
|
115950
115964
|
};
|
|
@@ -115979,20 +115993,20 @@ function requireFrame() {
|
|
|
115979
115993
|
const { runtimeFeatures: runtimeFeatures2 } = requireRuntimeFeatures();
|
|
115980
115994
|
const { maxUnsigned16Bit, opcodes } = requireConstants$1();
|
|
115981
115995
|
const BUFFER_SIZE = 8 * 1024;
|
|
115982
|
-
let
|
|
115996
|
+
let buffer2 = null;
|
|
115983
115997
|
let bufIdx = BUFFER_SIZE;
|
|
115984
|
-
const randomFillSync = runtimeFeatures2.has("crypto") ? crypto.randomFillSync : function randomFillSync2(
|
|
115985
|
-
for (let i = 0; i <
|
|
115986
|
-
|
|
115998
|
+
const randomFillSync = runtimeFeatures2.has("crypto") ? crypto.randomFillSync : function randomFillSync2(buffer3, _offset, _size2) {
|
|
115999
|
+
for (let i = 0; i < buffer3.length; ++i) {
|
|
116000
|
+
buffer3[i] = Math.random() * 255 | 0;
|
|
115987
116001
|
}
|
|
115988
|
-
return
|
|
116002
|
+
return buffer3;
|
|
115989
116003
|
};
|
|
115990
116004
|
function generateMask() {
|
|
115991
116005
|
if (bufIdx === BUFFER_SIZE) {
|
|
115992
116006
|
bufIdx = 0;
|
|
115993
|
-
randomFillSync(
|
|
116007
|
+
randomFillSync(buffer2 ?? (buffer2 = Buffer.allocUnsafeSlow(BUFFER_SIZE)), 0, BUFFER_SIZE);
|
|
115994
116008
|
}
|
|
115995
|
-
return [
|
|
116009
|
+
return [buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++]];
|
|
115996
116010
|
}
|
|
115997
116011
|
class WebsocketFrameSend {
|
|
115998
116012
|
/**
|
|
@@ -116014,36 +116028,36 @@ function requireFrame() {
|
|
|
116014
116028
|
offset2 += 2;
|
|
116015
116029
|
payloadLength = 126;
|
|
116016
116030
|
}
|
|
116017
|
-
const
|
|
116018
|
-
|
|
116019
|
-
|
|
116020
|
-
|
|
116031
|
+
const buffer3 = Buffer.allocUnsafe(bodyLength + offset2);
|
|
116032
|
+
buffer3[0] = buffer3[1] = 0;
|
|
116033
|
+
buffer3[0] |= 128;
|
|
116034
|
+
buffer3[0] = (buffer3[0] & 240) + opcode;
|
|
116021
116035
|
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
|
|
116022
|
-
|
|
116023
|
-
|
|
116024
|
-
|
|
116025
|
-
|
|
116026
|
-
|
|
116036
|
+
buffer3[offset2 - 4] = maskKey[0];
|
|
116037
|
+
buffer3[offset2 - 3] = maskKey[1];
|
|
116038
|
+
buffer3[offset2 - 2] = maskKey[2];
|
|
116039
|
+
buffer3[offset2 - 1] = maskKey[3];
|
|
116040
|
+
buffer3[1] = payloadLength;
|
|
116027
116041
|
if (payloadLength === 126) {
|
|
116028
|
-
|
|
116042
|
+
buffer3.writeUInt16BE(bodyLength, 2);
|
|
116029
116043
|
} else if (payloadLength === 127) {
|
|
116030
|
-
|
|
116031
|
-
|
|
116044
|
+
buffer3[2] = buffer3[3] = 0;
|
|
116045
|
+
buffer3.writeUIntBE(bodyLength, 4, 6);
|
|
116032
116046
|
}
|
|
116033
|
-
|
|
116047
|
+
buffer3[1] |= 128;
|
|
116034
116048
|
for (let i = 0; i < bodyLength; ++i) {
|
|
116035
|
-
|
|
116049
|
+
buffer3[offset2 + i] = frameData[i] ^ maskKey[i & 3];
|
|
116036
116050
|
}
|
|
116037
|
-
return
|
|
116051
|
+
return buffer3;
|
|
116038
116052
|
}
|
|
116039
116053
|
/**
|
|
116040
116054
|
* @param {Uint8Array} buffer
|
|
116041
116055
|
*/
|
|
116042
|
-
static createFastTextFrame(
|
|
116056
|
+
static createFastTextFrame(buffer3) {
|
|
116043
116057
|
const maskKey = generateMask();
|
|
116044
|
-
const bodyLength =
|
|
116058
|
+
const bodyLength = buffer3.length;
|
|
116045
116059
|
for (let i = 0; i < bodyLength; ++i) {
|
|
116046
|
-
|
|
116060
|
+
buffer3[i] ^= maskKey[i & 3];
|
|
116047
116061
|
}
|
|
116048
116062
|
let payloadLength = bodyLength;
|
|
116049
116063
|
let offset2 = 6;
|
|
@@ -116067,7 +116081,7 @@ function requireFrame() {
|
|
|
116067
116081
|
head[2] = head[3] = 0;
|
|
116068
116082
|
head.writeUIntBE(bodyLength, 4, 6);
|
|
116069
116083
|
}
|
|
116070
|
-
return [head,
|
|
116084
|
+
return [head, buffer3];
|
|
116071
116085
|
}
|
|
116072
116086
|
}
|
|
116073
116087
|
frame$1 = {
|
|
@@ -116124,7 +116138,7 @@ function requireConnection() {
|
|
|
116124
116138
|
useParallelQueue: true,
|
|
116125
116139
|
dispatcher: options.dispatcher,
|
|
116126
116140
|
processResponse(response2) {
|
|
116127
|
-
var _a3, _b2, _c2,
|
|
116141
|
+
var _a3, _b2, _c2, _d2;
|
|
116128
116142
|
if (response2.type === "error" || response2.status !== 101) {
|
|
116129
116143
|
if (((_a3 = response2.socket) == null ? void 0 : _a3.session) == null) {
|
|
116130
116144
|
failWebsocketConnection(handler, 1002, "Received network error or non-101 status code.", response2.error);
|
|
@@ -116147,7 +116161,7 @@ function requireConnection() {
|
|
|
116147
116161
|
failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".');
|
|
116148
116162
|
return;
|
|
116149
116163
|
}
|
|
116150
|
-
if (response2.socket.session == null && ((
|
|
116164
|
+
if (response2.socket.session == null && ((_d2 = response2.headersList.get("Connection")) == null ? void 0 : _d2.toLowerCase()) !== "upgrade") {
|
|
116151
116165
|
failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".');
|
|
116152
116166
|
return;
|
|
116153
116167
|
}
|
|
@@ -116400,15 +116414,15 @@ function requireReceiver() {
|
|
|
116400
116414
|
if (__privateGet(this, _byteOffset) < 2) {
|
|
116401
116415
|
return callback();
|
|
116402
116416
|
}
|
|
116403
|
-
const
|
|
116404
|
-
const fin = (
|
|
116405
|
-
const opcode =
|
|
116406
|
-
const masked = (
|
|
116417
|
+
const buffer2 = this.consume(2);
|
|
116418
|
+
const fin = (buffer2[0] & 128) !== 0;
|
|
116419
|
+
const opcode = buffer2[0] & 15;
|
|
116420
|
+
const masked = (buffer2[1] & 128) === 128;
|
|
116407
116421
|
const fragmented = !fin && opcode !== opcodes.CONTINUATION;
|
|
116408
|
-
const payloadLength =
|
|
116409
|
-
const rsv1 =
|
|
116410
|
-
const rsv2 =
|
|
116411
|
-
const rsv3 =
|
|
116422
|
+
const payloadLength = buffer2[1] & 127;
|
|
116423
|
+
const rsv1 = buffer2[0] & 64;
|
|
116424
|
+
const rsv2 = buffer2[0] & 32;
|
|
116425
|
+
const rsv3 = buffer2[0] & 16;
|
|
116412
116426
|
if (!isValidOpcode(opcode)) {
|
|
116413
116427
|
failWebsocketConnection(__privateGet(this, _handler), 1002, "Invalid opcode received");
|
|
116414
116428
|
return callback();
|
|
@@ -116465,16 +116479,16 @@ function requireReceiver() {
|
|
|
116465
116479
|
if (__privateGet(this, _byteOffset) < 2) {
|
|
116466
116480
|
return callback();
|
|
116467
116481
|
}
|
|
116468
|
-
const
|
|
116469
|
-
__privateGet(this, _info).payloadLength =
|
|
116482
|
+
const buffer2 = this.consume(2);
|
|
116483
|
+
__privateGet(this, _info).payloadLength = buffer2.readUInt16BE(0);
|
|
116470
116484
|
__privateSet(this, _state, parserStates.READ_DATA);
|
|
116471
116485
|
} else if (__privateGet(this, _state) === parserStates.PAYLOADLENGTH_64) {
|
|
116472
116486
|
if (__privateGet(this, _byteOffset) < 8) {
|
|
116473
116487
|
return callback();
|
|
116474
116488
|
}
|
|
116475
|
-
const
|
|
116476
|
-
const upper =
|
|
116477
|
-
const lower2 =
|
|
116489
|
+
const buffer2 = this.consume(8);
|
|
116490
|
+
const upper = buffer2.readUInt32BE(0);
|
|
116491
|
+
const lower2 = buffer2.readUInt32BE(4);
|
|
116478
116492
|
if (upper !== 0 || lower2 > 2 ** 31 - 1) {
|
|
116479
116493
|
failWebsocketConnection(__privateGet(this, _handler), 1009, "Received payload length > 2^31 bytes.");
|
|
116480
116494
|
return;
|
|
@@ -116542,23 +116556,23 @@ function requireReceiver() {
|
|
|
116542
116556
|
return __privateGet(this, _buffers).shift();
|
|
116543
116557
|
} else {
|
|
116544
116558
|
let offset2 = 0;
|
|
116545
|
-
const
|
|
116559
|
+
const buffer2 = Buffer.allocUnsafeSlow(n);
|
|
116546
116560
|
while (offset2 !== n) {
|
|
116547
116561
|
const next2 = __privateGet(this, _buffers)[0];
|
|
116548
116562
|
const length = next2.length;
|
|
116549
116563
|
if (length + offset2 === n) {
|
|
116550
|
-
|
|
116564
|
+
buffer2.set(__privateGet(this, _buffers).shift(), offset2);
|
|
116551
116565
|
break;
|
|
116552
116566
|
} else if (length + offset2 > n) {
|
|
116553
|
-
|
|
116567
|
+
buffer2.set(next2.subarray(0, n - offset2), offset2);
|
|
116554
116568
|
__privateGet(this, _buffers)[0] = next2.subarray(n - offset2);
|
|
116555
116569
|
break;
|
|
116556
116570
|
} else {
|
|
116557
|
-
|
|
116571
|
+
buffer2.set(__privateGet(this, _buffers).shift(), offset2);
|
|
116558
116572
|
offset2 += length;
|
|
116559
116573
|
}
|
|
116560
116574
|
}
|
|
116561
|
-
return
|
|
116575
|
+
return buffer2;
|
|
116562
116576
|
}
|
|
116563
116577
|
}
|
|
116564
116578
|
writeFragments(fragment2) {
|
|
@@ -116574,9 +116588,9 @@ function requireReceiver() {
|
|
|
116574
116588
|
let offset2 = 0;
|
|
116575
116589
|
const output = Buffer.allocUnsafeSlow(__privateGet(this, _fragmentsBytes));
|
|
116576
116590
|
for (let i = 0; i < fragments.length; ++i) {
|
|
116577
|
-
const
|
|
116578
|
-
output.set(
|
|
116579
|
-
offset2 +=
|
|
116591
|
+
const buffer2 = fragments[i];
|
|
116592
|
+
output.set(buffer2, offset2);
|
|
116593
|
+
offset2 += buffer2.length;
|
|
116580
116594
|
}
|
|
116581
116595
|
__privateSet(this, _fragments, []);
|
|
116582
116596
|
__privateSet(this, _fragmentsBytes, 0);
|
|
@@ -116921,10 +116935,10 @@ function requireWebsocket() {
|
|
|
116921
116935
|
return;
|
|
116922
116936
|
}
|
|
116923
116937
|
if (typeof data === "string") {
|
|
116924
|
-
const
|
|
116925
|
-
__privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) +
|
|
116926
|
-
__privateGet(this, _sendQueue).add(
|
|
116927
|
-
__privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) -
|
|
116938
|
+
const buffer2 = Buffer.from(data);
|
|
116939
|
+
__privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + buffer2.byteLength);
|
|
116940
|
+
__privateGet(this, _sendQueue).add(buffer2, () => {
|
|
116941
|
+
__privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) - buffer2.byteLength);
|
|
116928
116942
|
}, sendHints.text);
|
|
116929
116943
|
} else if (isArrayBuffer(data)) {
|
|
116930
116944
|
__privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + data.byteLength);
|
|
@@ -117047,17 +117061,17 @@ function requireWebsocket() {
|
|
|
117047
117061
|
* @param {WebSocket} ws
|
|
117048
117062
|
* @param {Buffer|undefined} buffer
|
|
117049
117063
|
*/
|
|
117050
|
-
static ping(ws,
|
|
117051
|
-
if (Buffer.isBuffer(
|
|
117052
|
-
if (
|
|
117064
|
+
static ping(ws, buffer2) {
|
|
117065
|
+
if (Buffer.isBuffer(buffer2)) {
|
|
117066
|
+
if (buffer2.length > 125) {
|
|
117053
117067
|
throw new TypeError("A PING frame cannot have a body larger than 125 bytes.");
|
|
117054
117068
|
}
|
|
117055
|
-
} else if (
|
|
117069
|
+
} else if (buffer2 !== void 0) {
|
|
117056
117070
|
throw new TypeError("Expected buffer payload");
|
|
117057
117071
|
}
|
|
117058
117072
|
const readyState = __privateGet(ws, _handler).readyState;
|
|
117059
117073
|
if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
|
|
117060
|
-
const frame2 = new WebsocketFrameSend(
|
|
117074
|
+
const frame2 = new WebsocketFrameSend(buffer2);
|
|
117061
117075
|
__privateGet(ws, _handler).socket.write(frame2.createFrame(opcodes.PING));
|
|
117062
117076
|
}
|
|
117063
117077
|
}
|
|
@@ -118676,15 +118690,15 @@ const getObjectCreatedAt = (idPrefix) => (filename) => {
|
|
|
118676
118690
|
const ulid2 = id2.replace(replaceRegex, "");
|
|
118677
118691
|
return ulidToDate(ulid2);
|
|
118678
118692
|
};
|
|
118679
|
-
function filterRunData$1(
|
|
118693
|
+
function filterRunData$1(run2, resolveData) {
|
|
118680
118694
|
if (resolveData === "none") {
|
|
118681
118695
|
return {
|
|
118682
|
-
...
|
|
118696
|
+
...run2,
|
|
118683
118697
|
input: void 0,
|
|
118684
118698
|
output: void 0
|
|
118685
118699
|
};
|
|
118686
118700
|
}
|
|
118687
|
-
return
|
|
118701
|
+
return run2;
|
|
118688
118702
|
}
|
|
118689
118703
|
function filterStepData$1(step, resolveData) {
|
|
118690
118704
|
if (resolveData === "none") {
|
|
@@ -118781,7 +118795,7 @@ async function handleLegacyEvent(basedir, runId, data, currentRun, params) {
|
|
|
118781
118795
|
switch (data.eventType) {
|
|
118782
118796
|
case "run_cancelled": {
|
|
118783
118797
|
const now2 = /* @__PURE__ */ new Date();
|
|
118784
|
-
const
|
|
118798
|
+
const run2 = {
|
|
118785
118799
|
runId: currentRun.runId,
|
|
118786
118800
|
deploymentId: currentRun.deploymentId,
|
|
118787
118801
|
workflowName: currentRun.workflowName,
|
|
@@ -118799,11 +118813,11 @@ async function handleLegacyEvent(basedir, runId, data, currentRun, params) {
|
|
|
118799
118813
|
attributes: currentRun.attributes
|
|
118800
118814
|
};
|
|
118801
118815
|
const runPath = resolveWithinBase(basedir, "runs", `${runId}.json`);
|
|
118802
|
-
await writeJSON(runPath,
|
|
118816
|
+
await writeJSON(runPath, run2, { overwrite: true });
|
|
118803
118817
|
await deleteAllHooksForRun(basedir, runId);
|
|
118804
118818
|
return {
|
|
118805
118819
|
event: void 0,
|
|
118806
|
-
run: filterRunData$1(
|
|
118820
|
+
run: filterRunData$1(run2, resolveData)
|
|
118807
118821
|
};
|
|
118808
118822
|
}
|
|
118809
118823
|
case "wait_completed":
|
|
@@ -118849,12 +118863,12 @@ function createRunsStorage(basedir, tag) {
|
|
|
118849
118863
|
return {
|
|
118850
118864
|
get: (async (id2, params) => {
|
|
118851
118865
|
assertSafeEntityId("runId", id2);
|
|
118852
|
-
const
|
|
118853
|
-
if (!
|
|
118866
|
+
const run2 = await readJSONWithFallback(basedir, "runs", id2, WorkflowRunSchema, tag);
|
|
118867
|
+
if (!run2) {
|
|
118854
118868
|
throw new WorkflowRunNotFoundError(id2);
|
|
118855
118869
|
}
|
|
118856
118870
|
const resolveData = (params == null ? void 0 : params.resolveData) ?? DEFAULT_RESOLVE_DATA_OPTION$1;
|
|
118857
|
-
return filterRunData$1(
|
|
118871
|
+
return filterRunData$1(run2, resolveData);
|
|
118858
118872
|
}),
|
|
118859
118873
|
list: (async (params) => {
|
|
118860
118874
|
var _a3, _b2, _c2;
|
|
@@ -118863,11 +118877,11 @@ function createRunsStorage(basedir, tag) {
|
|
|
118863
118877
|
directory: path$3.join(basedir, "runs"),
|
|
118864
118878
|
schema: WorkflowRunSchema,
|
|
118865
118879
|
fileIdFilter: params == null ? void 0 : params.fileIdFilter,
|
|
118866
|
-
filter: (
|
|
118867
|
-
if ((params == null ? void 0 : params.workflowName) &&
|
|
118880
|
+
filter: (run2) => {
|
|
118881
|
+
if ((params == null ? void 0 : params.workflowName) && run2.workflowName !== params.workflowName) {
|
|
118868
118882
|
return false;
|
|
118869
118883
|
}
|
|
118870
|
-
if ((params == null ? void 0 : params.status) &&
|
|
118884
|
+
if ((params == null ? void 0 : params.status) && run2.status !== params.status) {
|
|
118871
118885
|
return false;
|
|
118872
118886
|
}
|
|
118873
118887
|
return true;
|
|
@@ -118876,13 +118890,13 @@ function createRunsStorage(basedir, tag) {
|
|
|
118876
118890
|
limit: (_b2 = params == null ? void 0 : params.pagination) == null ? void 0 : _b2.limit,
|
|
118877
118891
|
cursor: (_c2 = params == null ? void 0 : params.pagination) == null ? void 0 : _c2.cursor,
|
|
118878
118892
|
getCreatedAt: getObjectCreatedAt("wrun"),
|
|
118879
|
-
getId: (
|
|
118893
|
+
getId: (run2) => run2.runId
|
|
118880
118894
|
});
|
|
118881
118895
|
if (resolveData === "none") {
|
|
118882
118896
|
return {
|
|
118883
118897
|
...result,
|
|
118884
|
-
data: result.data.map((
|
|
118885
|
-
...
|
|
118898
|
+
data: result.data.map((run2) => ({
|
|
118899
|
+
...run2,
|
|
118886
118900
|
input: void 0,
|
|
118887
118901
|
output: void 0
|
|
118888
118902
|
}))
|
|
@@ -118893,13 +118907,13 @@ function createRunsStorage(basedir, tag) {
|
|
|
118893
118907
|
experimentalSetAttributes: async (runId, changes, options) => {
|
|
118894
118908
|
assertSafeEntityId("runId", runId);
|
|
118895
118909
|
return withRunFileLock(runId, async () => {
|
|
118896
|
-
const
|
|
118897
|
-
if (!
|
|
118910
|
+
const run2 = await readJSONWithFallback(basedir, "runs", runId, WorkflowRunSchema, tag);
|
|
118911
|
+
if (!run2) {
|
|
118898
118912
|
throw new WorkflowRunNotFoundError(runId);
|
|
118899
118913
|
}
|
|
118900
118914
|
try {
|
|
118901
118915
|
validateAttributeChanges(changes, {
|
|
118902
|
-
existingKeys: Object.keys(
|
|
118916
|
+
existingKeys: Object.keys(run2.attributes ?? {}),
|
|
118903
118917
|
allowReservedAttributes: options == null ? void 0 : options.allowReservedAttributes
|
|
118904
118918
|
});
|
|
118905
118919
|
} catch (err) {
|
|
@@ -118908,9 +118922,9 @@ function createRunsStorage(basedir, tag) {
|
|
|
118908
118922
|
}
|
|
118909
118923
|
throw err;
|
|
118910
118924
|
}
|
|
118911
|
-
const nextAttributes = applyAttributeChanges(
|
|
118925
|
+
const nextAttributes = applyAttributeChanges(run2.attributes, changes);
|
|
118912
118926
|
const updatedRun = {
|
|
118913
|
-
...
|
|
118927
|
+
...run2,
|
|
118914
118928
|
attributes: nextAttributes,
|
|
118915
118929
|
updatedAt: /* @__PURE__ */ new Date()
|
|
118916
118930
|
};
|
|
@@ -119144,13 +119158,13 @@ function createEventsStorage(basedir, tag) {
|
|
|
119144
119158
|
if (data.eventType === "run_started" && "eventData" in event) {
|
|
119145
119159
|
delete event.eventData;
|
|
119146
119160
|
}
|
|
119147
|
-
let
|
|
119161
|
+
let run2;
|
|
119148
119162
|
let step;
|
|
119149
119163
|
let hook;
|
|
119150
119164
|
let wait;
|
|
119151
119165
|
if (data.eventType === "run_created" && "eventData" in data) {
|
|
119152
119166
|
const runData = data.eventData;
|
|
119153
|
-
|
|
119167
|
+
run2 = {
|
|
119154
119168
|
runId: effectiveRunId,
|
|
119155
119169
|
deploymentId: runData.deploymentId,
|
|
119156
119170
|
status: "pending",
|
|
@@ -119168,7 +119182,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119168
119182
|
updatedAt: now2
|
|
119169
119183
|
};
|
|
119170
119184
|
const runPath = taggedPath(basedir, "runs", effectiveRunId, tag);
|
|
119171
|
-
const created = await writeExclusive(runPath, JSON.stringify(
|
|
119185
|
+
const created = await writeExclusive(runPath, JSON.stringify(run2, jsonReplacer, 2));
|
|
119172
119186
|
if (!created) {
|
|
119173
119187
|
throw new EntityConflictError(`Workflow run "${effectiveRunId}" already exists`);
|
|
119174
119188
|
}
|
|
@@ -119177,7 +119191,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119177
119191
|
if (currentRun.status === "running") {
|
|
119178
119192
|
return { run: currentRun };
|
|
119179
119193
|
}
|
|
119180
|
-
|
|
119194
|
+
run2 = await writeRunUnderLifecycleLock(basedir, effectiveRunId, tag, {
|
|
119181
119195
|
runId: currentRun.runId,
|
|
119182
119196
|
deploymentId: currentRun.deploymentId,
|
|
119183
119197
|
workflowName: currentRun.workflowName,
|
|
@@ -119198,7 +119212,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119198
119212
|
} else if (data.eventType === "run_completed" && "eventData" in data) {
|
|
119199
119213
|
const completedData = data.eventData;
|
|
119200
119214
|
if (currentRun) {
|
|
119201
|
-
|
|
119215
|
+
run2 = await writeRunUnderLifecycleLock(basedir, effectiveRunId, tag, {
|
|
119202
119216
|
runId: currentRun.runId,
|
|
119203
119217
|
deploymentId: currentRun.deploymentId,
|
|
119204
119218
|
workflowName: currentRun.workflowName,
|
|
@@ -119223,7 +119237,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119223
119237
|
} else if (data.eventType === "run_failed" && "eventData" in data) {
|
|
119224
119238
|
const failedData = data.eventData;
|
|
119225
119239
|
if (currentRun) {
|
|
119226
|
-
|
|
119240
|
+
run2 = await writeRunUnderLifecycleLock(basedir, effectiveRunId, tag, {
|
|
119227
119241
|
runId: currentRun.runId,
|
|
119228
119242
|
deploymentId: currentRun.deploymentId,
|
|
119229
119243
|
workflowName: currentRun.workflowName,
|
|
@@ -119248,7 +119262,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119248
119262
|
}
|
|
119249
119263
|
} else if (data.eventType === "run_cancelled") {
|
|
119250
119264
|
if (currentRun) {
|
|
119251
|
-
|
|
119265
|
+
run2 = await writeRunUnderLifecycleLock(basedir, effectiveRunId, tag, {
|
|
119252
119266
|
runId: currentRun.runId,
|
|
119253
119267
|
deploymentId: currentRun.deploymentId,
|
|
119254
119268
|
workflowName: currentRun.workflowName,
|
|
@@ -119406,7 +119420,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119406
119420
|
const filteredEvent2 = stripEventDataRefs(conflictEvent, resolveData2);
|
|
119407
119421
|
return {
|
|
119408
119422
|
event: filteredEvent2,
|
|
119409
|
-
run,
|
|
119423
|
+
run: run2,
|
|
119410
119424
|
step,
|
|
119411
119425
|
hook: void 0
|
|
119412
119426
|
};
|
|
@@ -119489,7 +119503,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119489
119503
|
let events2;
|
|
119490
119504
|
let cursor;
|
|
119491
119505
|
let hasMore;
|
|
119492
|
-
if (data.eventType === "run_started" &&
|
|
119506
|
+
if (data.eventType === "run_started" && run2) {
|
|
119493
119507
|
const allEvents = await paginatedFileSystemQuery({
|
|
119494
119508
|
directory: path$3.join(basedir, "events"),
|
|
119495
119509
|
schema: EventSchema,
|
|
@@ -119505,7 +119519,7 @@ function createEventsStorage(basedir, tag) {
|
|
|
119505
119519
|
}
|
|
119506
119520
|
return {
|
|
119507
119521
|
event: filteredEvent,
|
|
119508
|
-
run,
|
|
119522
|
+
run: run2,
|
|
119509
119523
|
step,
|
|
119510
119524
|
hook,
|
|
119511
119525
|
wait,
|
|
@@ -120045,7 +120059,7 @@ function createLocalWorld(args) {
|
|
|
120045
120059
|
const basedir = mergedConfig.dataDir;
|
|
120046
120060
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
120047
120061
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
120048
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
120062
|
+
const { HookSchema: HookSchema2 } = await import("./index-BjEgWhxl.js");
|
|
120049
120063
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
120050
120064
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
120051
120065
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -120197,8 +120211,8 @@ function requireGetVercelOidcToken() {
|
|
|
120197
120211
|
}
|
|
120198
120212
|
try {
|
|
120199
120213
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
120200
|
-
await import("./token-util-
|
|
120201
|
-
await import("./token-
|
|
120214
|
+
await import("./token-util-Hv7wRzsW.js").then((n) => n.t),
|
|
120215
|
+
await import("./token-DOrkjd5O.js").then((n) => n.t)
|
|
120202
120216
|
]);
|
|
120203
120217
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
120204
120218
|
await refreshToken(options);
|
|
@@ -120861,9 +120875,9 @@ function createGetEncryptionKeyForRun(projectId, teamId, token, dispatcher2) {
|
|
|
120861
120875
|
localDeploymentKey = Buffer.from(deploymentKeyBase64, "base64");
|
|
120862
120876
|
return localDeploymentKey;
|
|
120863
120877
|
}
|
|
120864
|
-
return async function getEncryptionKeyForRun2(
|
|
120865
|
-
const runId = typeof
|
|
120866
|
-
const deploymentId = typeof
|
|
120878
|
+
return async function getEncryptionKeyForRun2(run2, context) {
|
|
120879
|
+
const runId = typeof run2 === "string" ? run2 : run2.runId;
|
|
120880
|
+
const deploymentId = typeof run2 === "string" ? context == null ? void 0 : context.deploymentId : run2.deploymentId;
|
|
120867
120881
|
if (isServerlessRuntime) {
|
|
120868
120882
|
if (!deploymentId || deploymentId === process.env.VERCEL_DEPLOYMENT_ID) {
|
|
120869
120883
|
const localKey = getLocalDeploymentKey();
|
|
@@ -121591,7 +121605,7 @@ function expand_(str, max2, isTop) {
|
|
|
121591
121605
|
const x2 = numeric(n[0]);
|
|
121592
121606
|
const y2 = numeric(n[1]);
|
|
121593
121607
|
const width = Math.max(n[0].length, n[1].length);
|
|
121594
|
-
let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
|
|
121608
|
+
let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
121595
121609
|
let test = lte;
|
|
121596
121610
|
const reverse = y2 < x2;
|
|
121597
121611
|
if (reverse) {
|
|
@@ -121600,7 +121614,7 @@ function expand_(str, max2, isTop) {
|
|
|
121600
121614
|
}
|
|
121601
121615
|
const pad = n.some(isPadded);
|
|
121602
121616
|
N2 = [];
|
|
121603
|
-
for (let i = x2; test(i, y2); i += incr) {
|
|
121617
|
+
for (let i = x2; test(i, y2) && N2.length < max2; i += incr) {
|
|
121604
121618
|
let c;
|
|
121605
121619
|
if (isAlphaSequence) {
|
|
121606
121620
|
c = String.fromCharCode(i);
|
|
@@ -121758,9 +121772,9 @@ const parseClass = (glob, position2) => {
|
|
|
121758
121772
|
};
|
|
121759
121773
|
const unescape$1 = (s2, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
121760
121774
|
if (magicalBraces) {
|
|
121761
|
-
return windowsPathsNoEscape ? s2.replace(/\[([
|
|
121775
|
+
return windowsPathsNoEscape ? s2.replace(/\[([^/\\])\]/g, "$1") : s2.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
121762
121776
|
}
|
|
121763
|
-
return windowsPathsNoEscape ? s2.replace(/\[([
|
|
121777
|
+
return windowsPathsNoEscape ? s2.replace(/\[([^/\\{}])\]/g, "$1") : s2.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
121764
121778
|
};
|
|
121765
121779
|
var _a;
|
|
121766
121780
|
const types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
@@ -121881,13 +121895,7 @@ class AST {
|
|
|
121881
121895
|
}
|
|
121882
121896
|
// reconstructs the pattern
|
|
121883
121897
|
toString() {
|
|
121884
|
-
|
|
121885
|
-
return __privateGet(this, _toString);
|
|
121886
|
-
if (!this.type) {
|
|
121887
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p2) => String(p2)).join(""));
|
|
121888
|
-
} else {
|
|
121889
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p2) => String(p2)).join("|") + ")");
|
|
121890
|
-
}
|
|
121898
|
+
return __privateGet(this, _toString) !== void 0 ? __privateGet(this, _toString) : !this.type ? __privateSet(this, _toString, __privateGet(this, _parts).map((p2) => String(p2)).join("")) : __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p2) => String(p2)).join("|") + ")");
|
|
121891
121899
|
}
|
|
121892
121900
|
push(...parts) {
|
|
121893
121901
|
for (const p2 of parts) {
|
|
@@ -122170,7 +122178,7 @@ fillNegs_fn = function() {
|
|
|
122170
122178
|
};
|
|
122171
122179
|
_AST_static = new WeakSet();
|
|
122172
122180
|
parseAST_fn = function(str, ast, pos, opt, extDepth) {
|
|
122173
|
-
var _a3, _b2, _c2,
|
|
122181
|
+
var _a3, _b2, _c2, _d2;
|
|
122174
122182
|
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
122175
122183
|
let escaping = false;
|
|
122176
122184
|
let inBrace = false;
|
|
@@ -122253,7 +122261,7 @@ parseAST_fn = function(str, ast, pos, opt, extDepth) {
|
|
|
122253
122261
|
acc = "";
|
|
122254
122262
|
const ext2 = new _a(c, part);
|
|
122255
122263
|
part.push(ext2);
|
|
122256
|
-
i = __privateMethod(
|
|
122264
|
+
i = __privateMethod(_d2 = _a, _AST_static, parseAST_fn).call(_d2, str, ext2, i, opt, extDepth + depthAdd);
|
|
122257
122265
|
continue;
|
|
122258
122266
|
}
|
|
122259
122267
|
if (c === "|") {
|
|
@@ -122449,7 +122457,7 @@ const minimatch = (p2, pattern2, options = {}) => {
|
|
|
122449
122457
|
}
|
|
122450
122458
|
return new Minimatch(pattern2, options).match(p2);
|
|
122451
122459
|
};
|
|
122452
|
-
const starDotExtRE = /^\*+([
|
|
122460
|
+
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
122453
122461
|
const starDotExtTest = (ext2) => (f2) => !f2.startsWith(".") && f2.endsWith(ext2);
|
|
122454
122462
|
const starDotExtTestDot = (ext2) => (f2) => f2.endsWith(ext2);
|
|
122455
122463
|
const starDotExtTestNocase = (ext2) => {
|
|
@@ -122468,7 +122476,7 @@ const dotStarTest = (f2) => f2 !== "." && f2 !== ".." && f2.startsWith(".");
|
|
|
122468
122476
|
const starRE = /^\*+$/;
|
|
122469
122477
|
const starTest = (f2) => f2.length !== 0 && !f2.startsWith(".");
|
|
122470
122478
|
const starTestDot = (f2) => f2.length !== 0 && f2 !== "." && f2 !== "..";
|
|
122471
|
-
const qmarksRE = /^\?+([
|
|
122479
|
+
const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
|
|
122472
122480
|
const qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
122473
122481
|
const noext = qmarksTestNoExt([$0]);
|
|
122474
122482
|
if (!ext2)
|
|
@@ -122688,10 +122696,10 @@ class Minimatch {
|
|
|
122688
122696
|
// of patterns that we have to process.
|
|
122689
122697
|
preprocess(globParts) {
|
|
122690
122698
|
if (this.options.noglobstar) {
|
|
122691
|
-
for (
|
|
122692
|
-
for (let j2 = 0; j2 <
|
|
122693
|
-
if (
|
|
122694
|
-
|
|
122699
|
+
for (const partset of globParts) {
|
|
122700
|
+
for (let j2 = 0; j2 < partset.length; j2++) {
|
|
122701
|
+
if (partset[j2] === "**") {
|
|
122702
|
+
partset[j2] = "*";
|
|
122695
122703
|
}
|
|
122696
122704
|
}
|
|
122697
122705
|
}
|
|
@@ -122769,7 +122777,7 @@ class Minimatch {
|
|
|
122769
122777
|
let dd = 0;
|
|
122770
122778
|
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
122771
122779
|
const p2 = parts[dd - 1];
|
|
122772
|
-
if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
|
|
122780
|
+
if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p2))) {
|
|
122773
122781
|
didSomething = true;
|
|
122774
122782
|
parts.splice(dd - 1, 2);
|
|
122775
122783
|
dd -= 2;
|
|
@@ -123050,7 +123058,7 @@ class Minimatch {
|
|
|
123050
123058
|
re2 = "^(?!" + re2 + ").+$";
|
|
123051
123059
|
try {
|
|
123052
123060
|
this.regexp = new RegExp(re2, [...flags].join(""));
|
|
123053
|
-
} catch
|
|
123061
|
+
} catch {
|
|
123054
123062
|
this.regexp = false;
|
|
123055
123063
|
}
|
|
123056
123064
|
return this.regexp;
|
|
@@ -123058,7 +123066,7 @@ class Minimatch {
|
|
|
123058
123066
|
slashSplit(p2) {
|
|
123059
123067
|
if (this.preserveMultipleSlashes) {
|
|
123060
123068
|
return p2.split("/");
|
|
123061
|
-
} else if (this.isWindows && /^\/\/[
|
|
123069
|
+
} else if (this.isWindows && /^\/\/[^/]+/.test(p2)) {
|
|
123062
123070
|
return ["", ...p2.split(/\/+/)];
|
|
123063
123071
|
} else {
|
|
123064
123072
|
return p2.split(/\/+/);
|
|
@@ -123089,8 +123097,7 @@ class Minimatch {
|
|
|
123089
123097
|
filename = ff[i];
|
|
123090
123098
|
}
|
|
123091
123099
|
}
|
|
123092
|
-
for (
|
|
123093
|
-
const pattern2 = set2[i];
|
|
123100
|
+
for (const pattern2 of set2) {
|
|
123094
123101
|
let file2 = ff;
|
|
123095
123102
|
if (options.matchBase && pattern2.length === 1) {
|
|
123096
123103
|
file2 = [filename];
|
|
@@ -123359,8 +123366,8 @@ var JsonTransport$1 = class JsonTransport {
|
|
|
123359
123366
|
return Buffer.from(JSON.stringify(value, this.replacer), "utf8");
|
|
123360
123367
|
}
|
|
123361
123368
|
async deserialize(stream) {
|
|
123362
|
-
const
|
|
123363
|
-
return JSON.parse(
|
|
123369
|
+
const buffer2 = await streamToBuffer(stream);
|
|
123370
|
+
return JSON.parse(buffer2.toString("utf8"), this.reviver);
|
|
123364
123371
|
}
|
|
123365
123372
|
};
|
|
123366
123373
|
var MessageNotFoundError = class extends Error {
|
|
@@ -124849,7 +124856,7 @@ Cause: ${cause}`
|
|
|
124849
124856
|
}
|
|
124850
124857
|
console.debug("[VQS Debug] Request:", JSON.stringify(logData, null, 2));
|
|
124851
124858
|
}
|
|
124852
|
-
init2.headers.set("User-Agent", `@vercel/queue/${"0.
|
|
124859
|
+
init2.headers.set("User-Agent", `@vercel/queue/${"0.3.0"}`);
|
|
124853
124860
|
init2.headers.set("Vqs-Client-Ts", (/* @__PURE__ */ new Date()).toISOString());
|
|
124854
124861
|
const fetchInit = this.dispatcher ? { ...init2, dispatcher: this.dispatcher } : init2;
|
|
124855
124862
|
const response2 = await fetch(url2, fetchInit);
|
|
@@ -124943,6 +124950,7 @@ Cause: ${cause}`
|
|
|
124943
124950
|
);
|
|
124944
124951
|
}
|
|
124945
124952
|
if (response2.status === 202) {
|
|
124953
|
+
await response2.text();
|
|
124946
124954
|
return { messageId: null };
|
|
124947
124955
|
}
|
|
124948
124956
|
const responseData = await response2.json();
|
|
@@ -124980,6 +124988,7 @@ Cause: ${cause}`
|
|
|
124980
124988
|
}
|
|
124981
124989
|
);
|
|
124982
124990
|
if (response2.status === 204) {
|
|
124991
|
+
await response2.text();
|
|
124983
124992
|
return;
|
|
124984
124993
|
}
|
|
124985
124994
|
if (!response2.ok) {
|
|
@@ -125129,6 +125138,7 @@ Cause: ${cause}`
|
|
|
125129
125138
|
"Missing or invalid receipt handle"
|
|
125130
125139
|
);
|
|
125131
125140
|
}
|
|
125141
|
+
await response2.text();
|
|
125132
125142
|
return { acknowledged: true };
|
|
125133
125143
|
}
|
|
125134
125144
|
async changeVisibility(options) {
|
|
@@ -125180,6 +125190,7 @@ Cause: ${cause}`
|
|
|
125180
125190
|
"Missing receipt handle or invalid visibility timeout"
|
|
125181
125191
|
);
|
|
125182
125192
|
}
|
|
125193
|
+
await response2.text();
|
|
125183
125194
|
return { success: true };
|
|
125184
125195
|
}
|
|
125185
125196
|
};
|
|
@@ -125391,13 +125402,25 @@ var QueueClient = class {
|
|
|
125391
125402
|
setApi(this, new ApiClient({ ...options, region }));
|
|
125392
125403
|
}
|
|
125393
125404
|
};
|
|
125394
|
-
const version = "5.0.0-beta.
|
|
125405
|
+
const version = "5.0.0-beta.12";
|
|
125395
125406
|
const HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
125396
|
-
function httpLog(method, endpoint,
|
|
125407
|
+
function httpLog(method, endpoint, response2, ms2) {
|
|
125397
125408
|
if (HTTP_DEBUG_ENABLED) {
|
|
125398
|
-
|
|
125409
|
+
const responseContext = getResponseDiagnosticHeaders(response2);
|
|
125410
|
+
const diagnosticSuffix = responseContext.length > 0 ? `; ${responseContext.join("; ")}` : "";
|
|
125411
|
+
console.debug(`[workflow:world-vercel:http] ${method} ${endpoint} -> ${response2.status} (${ms2}ms${diagnosticSuffix})`);
|
|
125399
125412
|
}
|
|
125400
125413
|
}
|
|
125414
|
+
function getResponseDiagnosticHeaders(response2) {
|
|
125415
|
+
return ["x-vercel-id", "x-vercel-error"].flatMap((header) => {
|
|
125416
|
+
const value = response2.headers.get(header);
|
|
125417
|
+
return value ? [`${header}=${value}`] : [];
|
|
125418
|
+
});
|
|
125419
|
+
}
|
|
125420
|
+
function formatResponseDiagnostics(response2) {
|
|
125421
|
+
const headers2 = getResponseDiagnosticHeaders(response2);
|
|
125422
|
+
return headers2.length > 0 ? ` (${headers2.join("; ")})` : "";
|
|
125423
|
+
}
|
|
125401
125424
|
const REQUEST_TIMEOUT_MS = 6e4;
|
|
125402
125425
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
125403
125426
|
const MAX_BODY_PARSE_RETRIES = 2;
|
|
@@ -125498,6 +125521,7 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
125498
125521
|
}
|
|
125499
125522
|
const canRetryBody = IDEMPOTENT_METHODS.has(method.toUpperCase());
|
|
125500
125523
|
let parseResult;
|
|
125524
|
+
let responseDiagnostics = "";
|
|
125501
125525
|
for (let attempt = 0; ; attempt++) {
|
|
125502
125526
|
headers2.set("X-Request-Time", Date.now().toString());
|
|
125503
125527
|
const timeoutSignal = AbortSignal.timeout(REQUEST_TIMEOUT_MS);
|
|
@@ -125525,7 +125549,8 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
125525
125549
|
throw error2;
|
|
125526
125550
|
}
|
|
125527
125551
|
const fetchMs = Date.now() - fetchStart;
|
|
125528
|
-
|
|
125552
|
+
responseDiagnostics = formatResponseDiagnostics(response2);
|
|
125553
|
+
httpLog(method, endpoint, response2, fetchMs);
|
|
125529
125554
|
span == null ? void 0 : span.setAttributes({
|
|
125530
125555
|
...HttpResponseStatusCode(response2.status)
|
|
125531
125556
|
});
|
|
@@ -125544,7 +125569,7 @@ curl -X ${request2.method} ${stringifiedHeaders} "${url2}"`);
|
|
|
125544
125569
|
retryAfter = parsed;
|
|
125545
125570
|
}
|
|
125546
125571
|
}
|
|
125547
|
-
const defaultMessage = errorData.message || `${request2.method} ${endpoint} -> HTTP ${response2.status}: ${response2.statusText}
|
|
125572
|
+
const defaultMessage = (errorData.message || `${request2.method} ${endpoint} -> HTTP ${response2.status}: ${response2.statusText}`) + responseDiagnostics;
|
|
125548
125573
|
const throwWithTrace = (error2) => {
|
|
125549
125574
|
var _a4;
|
|
125550
125575
|
span == null ? void 0 : span.setAttributes({
|
|
@@ -125597,7 +125622,7 @@ curl -X ${request2.method} ${stringifiedHeaders} "${url2}"`);
|
|
|
125597
125622
|
continue;
|
|
125598
125623
|
}
|
|
125599
125624
|
const contentType = response2.headers.get("Content-Type") || "unknown";
|
|
125600
|
-
throw new WorkflowWorldError(`Failed to parse response body for ${method} ${endpoint} (Content-Type: ${contentType}):
|
|
125625
|
+
throw new WorkflowWorldError(`Failed to parse response body for ${method} ${endpoint}${responseDiagnostics} (Content-Type: ${contentType}):
|
|
125601
125626
|
|
|
125602
125627
|
${error2}`, { url: url2, code: "PARSE_ERROR", cause: error2 });
|
|
125603
125628
|
}
|
|
@@ -125609,7 +125634,7 @@ ${error2}`, { url: url2, code: "PARSE_ERROR", cause: error2 });
|
|
|
125609
125634
|
const debugContext = process.env.DEBUG ? `
|
|
125610
125635
|
|
|
125611
125636
|
Response context: ${parseResult.getDebugContext()}` : "";
|
|
125612
|
-
throw new WorkflowWorldError(`Schema validation failed for ${method} ${endpoint}:
|
|
125637
|
+
throw new WorkflowWorldError(`Schema validation failed for ${method} ${endpoint}${responseDiagnostics}:
|
|
125613
125638
|
${issues}${debugContext}`, { url: url2, code: "SCHEMA_VALIDATION", cause: validationResult.error });
|
|
125614
125639
|
}
|
|
125615
125640
|
return validationResult.data;
|
|
@@ -125625,11 +125650,11 @@ function createPreview(data) {
|
|
|
125625
125650
|
async function parseResponseBody(response2) {
|
|
125626
125651
|
const contentType = response2.headers.get("Content-Type") || "";
|
|
125627
125652
|
if (contentType.includes("application/cbor")) {
|
|
125628
|
-
const
|
|
125629
|
-
const data2 = decode(new Uint8Array(
|
|
125653
|
+
const buffer2 = await response2.arrayBuffer();
|
|
125654
|
+
const data2 = decode(new Uint8Array(buffer2));
|
|
125630
125655
|
return {
|
|
125631
125656
|
data: data2,
|
|
125632
|
-
getDebugContext: () => `Content-Type: ${contentType}, ${
|
|
125657
|
+
getDebugContext: () => `Content-Type: ${contentType}, ${buffer2.byteLength} bytes (CBOR), preview: ${createPreview(data2)}`
|
|
125633
125658
|
};
|
|
125634
125659
|
}
|
|
125635
125660
|
const text2 = await response2.text();
|
|
@@ -125696,11 +125721,11 @@ class DualTransport {
|
|
|
125696
125721
|
if (value)
|
|
125697
125722
|
chunks.push(value);
|
|
125698
125723
|
}
|
|
125699
|
-
const
|
|
125724
|
+
const buffer2 = Buffer.concat(chunks);
|
|
125700
125725
|
try {
|
|
125701
|
-
return decode(
|
|
125726
|
+
return decode(buffer2);
|
|
125702
125727
|
} catch {
|
|
125703
|
-
return JSON.parse(
|
|
125728
|
+
return JSON.parse(buffer2.toString());
|
|
125704
125729
|
}
|
|
125705
125730
|
}
|
|
125706
125731
|
}
|
|
@@ -125887,6 +125912,38 @@ function isRefDescriptor(value) {
|
|
|
125887
125912
|
return typeof value === "object" && value !== null && "_type" in value && "_ref" in value && typeof value._ref === "string" && value._type === "RemoteRef";
|
|
125888
125913
|
}
|
|
125889
125914
|
const REF_RESOLVE_CONCURRENCY = 10;
|
|
125915
|
+
const MIN_BINARY_REF_PAYLOAD_BYTES = 4;
|
|
125916
|
+
function assertValidRefBody(buffer2, ctx) {
|
|
125917
|
+
const { ref, url: url2, status, contentType, contentLengthHeader, contentEncodingHeader, span } = ctx;
|
|
125918
|
+
const actualLength = buffer2.byteLength;
|
|
125919
|
+
const isBinary = contentType.includes("application/octet-stream");
|
|
125920
|
+
const throwInvalid = (code2, message2) => {
|
|
125921
|
+
var _a3;
|
|
125922
|
+
const error2 = new WorkflowWorldError(message2, { url: url2, status, code: code2 });
|
|
125923
|
+
span == null ? void 0 : span.setAttributes({ ...ErrorType(code2) });
|
|
125924
|
+
(_a3 = span == null ? void 0 : span.recordException) == null ? void 0 : _a3.call(span, error2);
|
|
125925
|
+
throw error2;
|
|
125926
|
+
};
|
|
125927
|
+
if (actualLength === 0) {
|
|
125928
|
+
throwInvalid("empty-ref-body", `Ref resolve returned a zero-byte body for ${ref} (Content-Type=${contentType || "<none>"}). Refusing to corrupt the event log with an empty payload.`);
|
|
125929
|
+
}
|
|
125930
|
+
if (isBinary && actualLength < MIN_BINARY_REF_PAYLOAD_BYTES) {
|
|
125931
|
+
throwInvalid("truncated-ref-body", `Ref resolve returned a truncated ${actualLength}-byte binary body for ${ref} (Content-Type=${contentType}); minimum valid payload is ${MIN_BINARY_REF_PAYLOAD_BYTES} bytes (4-byte format prefix).`);
|
|
125932
|
+
}
|
|
125933
|
+
if (contentLengthHeader == null)
|
|
125934
|
+
return;
|
|
125935
|
+
if (contentEncodingHeader != null) {
|
|
125936
|
+
const encoding2 = contentEncodingHeader.trim().toLowerCase();
|
|
125937
|
+
if (encoding2 !== "" && encoding2 !== "identity")
|
|
125938
|
+
return;
|
|
125939
|
+
}
|
|
125940
|
+
if (!/^\d+$/.test(contentLengthHeader))
|
|
125941
|
+
return;
|
|
125942
|
+
const declaredLength = Number.parseInt(contentLengthHeader, 10);
|
|
125943
|
+
if (declaredLength === actualLength)
|
|
125944
|
+
return;
|
|
125945
|
+
throwInvalid("ref-body-length-mismatch", `Ref resolve body length mismatch for ${ref}: Content-Length=${contentLengthHeader}, actual=${actualLength} bytes. The response body was truncated in transit; refusing to use it.`);
|
|
125946
|
+
}
|
|
125890
125947
|
async function resolveRefDescriptor(descriptor, runId, config2) {
|
|
125891
125948
|
const ref = descriptor._ref;
|
|
125892
125949
|
if (ref.startsWith("dbrf:")) {
|
|
@@ -125929,11 +125986,22 @@ async function resolveRefDescriptor(descriptor, runId, config2) {
|
|
|
125929
125986
|
throw error2;
|
|
125930
125987
|
}
|
|
125931
125988
|
const contentType = response2.headers.get("content-type") || "";
|
|
125932
|
-
const
|
|
125989
|
+
const contentLengthHeader = response2.headers.get("content-length");
|
|
125990
|
+
const contentEncodingHeader = response2.headers.get("content-encoding");
|
|
125991
|
+
const buffer2 = await response2.arrayBuffer();
|
|
125992
|
+
assertValidRefBody(buffer2, {
|
|
125993
|
+
ref,
|
|
125994
|
+
url: url2,
|
|
125995
|
+
status: response2.status,
|
|
125996
|
+
contentType,
|
|
125997
|
+
contentLengthHeader,
|
|
125998
|
+
contentEncodingHeader,
|
|
125999
|
+
span
|
|
126000
|
+
});
|
|
125933
126001
|
if (contentType.includes("application/octet-stream")) {
|
|
125934
|
-
return new Uint8Array(
|
|
126002
|
+
return new Uint8Array(buffer2);
|
|
125935
126003
|
}
|
|
125936
|
-
return decode(new Uint8Array(
|
|
126004
|
+
return decode(new Uint8Array(buffer2));
|
|
125937
126005
|
});
|
|
125938
126006
|
}
|
|
125939
126007
|
async function resolveRefDescriptors(refs, config2, concurrency) {
|
|
@@ -125985,9 +126053,9 @@ const WorkflowRunWireWithRefsSchema = WorkflowRunWireBaseSchema.omit({
|
|
|
125985
126053
|
input: union([_instanceof(Uint8Array), any()]).optional(),
|
|
125986
126054
|
output: union([_instanceof(Uint8Array), any()]).optional()
|
|
125987
126055
|
});
|
|
125988
|
-
function filterRunData(
|
|
126056
|
+
function filterRunData(run2, resolveData) {
|
|
125989
126057
|
if (resolveData === "none") {
|
|
125990
|
-
const { inputRef: _inputRef, outputRef: _outputRef, ...rest } =
|
|
126058
|
+
const { inputRef: _inputRef, outputRef: _outputRef, ...rest } = run2;
|
|
125991
126059
|
const deserialized = deserializeError(rest);
|
|
125992
126060
|
return {
|
|
125993
126061
|
...deserialized,
|
|
@@ -125995,7 +126063,7 @@ function filterRunData(run, resolveData) {
|
|
|
125995
126063
|
output: void 0
|
|
125996
126064
|
};
|
|
125997
126065
|
}
|
|
125998
|
-
return deserializeError(
|
|
126066
|
+
return deserializeError(run2);
|
|
125999
126067
|
}
|
|
126000
126068
|
async function listWorkflowRuns(params = {}, config2) {
|
|
126001
126069
|
const { workflowName, status, pagination, resolveData = DEFAULT_RESOLVE_DATA_OPTION } = params;
|
|
@@ -126022,18 +126090,18 @@ async function listWorkflowRuns(params = {}, config2) {
|
|
|
126022
126090
|
});
|
|
126023
126091
|
return {
|
|
126024
126092
|
...response2,
|
|
126025
|
-
data: response2.data.map((
|
|
126093
|
+
data: response2.data.map((run2) => filterRunData(run2, resolveData))
|
|
126026
126094
|
};
|
|
126027
126095
|
}
|
|
126028
126096
|
async function createWorkflowRunV1(data, config2) {
|
|
126029
|
-
const
|
|
126097
|
+
const run2 = await makeRequest({
|
|
126030
126098
|
endpoint: "/v1/runs/create",
|
|
126031
126099
|
options: { method: "POST" },
|
|
126032
126100
|
data,
|
|
126033
126101
|
config: config2,
|
|
126034
126102
|
schema: WorkflowRunWireSchema
|
|
126035
126103
|
});
|
|
126036
|
-
return deserializeError(
|
|
126104
|
+
return deserializeError(run2);
|
|
126037
126105
|
}
|
|
126038
126106
|
async function getWorkflowRun(id2, params, config2) {
|
|
126039
126107
|
const resolveData = (params == null ? void 0 : params.resolveData) ?? DEFAULT_RESOLVE_DATA_OPTION;
|
|
@@ -126043,13 +126111,13 @@ async function getWorkflowRun(id2, params, config2) {
|
|
|
126043
126111
|
const queryString = searchParams.toString();
|
|
126044
126112
|
const endpoint = `/v2/runs/${encodeURIComponent(id2)}${queryString ? `?${queryString}` : ""}`;
|
|
126045
126113
|
try {
|
|
126046
|
-
const
|
|
126114
|
+
const run2 = await makeRequest({
|
|
126047
126115
|
endpoint,
|
|
126048
126116
|
options: { method: "GET" },
|
|
126049
126117
|
config: config2,
|
|
126050
126118
|
schema: remoteRefBehavior === "lazy" ? WorkflowRunWireWithRefsSchema : WorkflowRunWireSchema
|
|
126051
126119
|
});
|
|
126052
|
-
return filterRunData(
|
|
126120
|
+
return filterRunData(run2, resolveData);
|
|
126053
126121
|
} catch (error2) {
|
|
126054
126122
|
if (error2 instanceof WorkflowWorldError && error2.status === 404) {
|
|
126055
126123
|
throw new WorkflowRunNotFoundError(id2);
|
|
@@ -126065,13 +126133,13 @@ async function cancelWorkflowRunV1(id2, params, config2) {
|
|
|
126065
126133
|
const queryString = searchParams.toString();
|
|
126066
126134
|
const endpoint = `/v1/runs/${encodeURIComponent(id2)}/cancel${queryString ? `?${queryString}` : ""}`;
|
|
126067
126135
|
try {
|
|
126068
|
-
const
|
|
126136
|
+
const run2 = await makeRequest({
|
|
126069
126137
|
endpoint,
|
|
126070
126138
|
options: { method: "PUT" },
|
|
126071
126139
|
config: config2,
|
|
126072
126140
|
schema: remoteRefBehavior === "lazy" ? WorkflowRunWireWithRefsSchema : WorkflowRunWireSchema
|
|
126073
126141
|
});
|
|
126074
|
-
return filterRunData(
|
|
126142
|
+
return filterRunData(run2, resolveData);
|
|
126075
126143
|
} catch (error2) {
|
|
126076
126144
|
if (error2 instanceof WorkflowWorldError && error2.status === 404) {
|
|
126077
126145
|
throw new WorkflowRunNotFoundError(id2);
|
|
@@ -126400,11 +126468,11 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
126400
126468
|
const v1Compat = (params == null ? void 0 : params.v1Compat) ?? false;
|
|
126401
126469
|
if (v1Compat) {
|
|
126402
126470
|
if (data.eventType === "run_cancelled" && id2) {
|
|
126403
|
-
const
|
|
126404
|
-
return { run };
|
|
126471
|
+
const run2 = await cancelWorkflowRunV1(id2, params, config2);
|
|
126472
|
+
return { run: run2 };
|
|
126405
126473
|
} else if (data.eventType === "run_created") {
|
|
126406
|
-
const
|
|
126407
|
-
return { run };
|
|
126474
|
+
const run2 = await createWorkflowRunV1(data.eventData, config2);
|
|
126475
|
+
return { run: run2 };
|
|
126408
126476
|
}
|
|
126409
126477
|
const wireResult2 = await makeRequest({
|
|
126410
126478
|
endpoint: `/v1/runs/${encodeURIComponent(id2)}/events`,
|
|
@@ -129461,13 +129529,13 @@ async function getHookByTokenWithKey(token) {
|
|
|
129461
129529
|
var _a3;
|
|
129462
129530
|
const world = await getWorldLazy();
|
|
129463
129531
|
const hook = await world.hooks.getByToken(token);
|
|
129464
|
-
const
|
|
129465
|
-
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world,
|
|
129532
|
+
const run2 = await world.runs.get(hook.runId);
|
|
129533
|
+
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, run2));
|
|
129466
129534
|
const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
|
|
129467
129535
|
if (typeof hook.metadata !== "undefined") {
|
|
129468
129536
|
hook.metadata = await hydrateStepArguments(hook.metadata, hook.runId, encryptionKey);
|
|
129469
129537
|
}
|
|
129470
|
-
return { hook, run, encryptionKey };
|
|
129538
|
+
return { hook, run: run2, encryptionKey };
|
|
129471
129539
|
}
|
|
129472
129540
|
async function getHookByToken(token) {
|
|
129473
129541
|
const { hook } = await getHookByTokenWithKey(token);
|
|
@@ -129476,7 +129544,7 @@ async function getHookByToken(token) {
|
|
|
129476
129544
|
async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
129477
129545
|
return await waitedUntil(() => {
|
|
129478
129546
|
return trace$2("hook.resume", async (span) => {
|
|
129479
|
-
var _a3, _b2, _c2,
|
|
129547
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
129480
129548
|
const world = await getWorldLazy();
|
|
129481
129549
|
try {
|
|
129482
129550
|
let hook;
|
|
@@ -129530,7 +129598,7 @@ async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
|
129530
129598
|
if (traceCarrier) {
|
|
129531
129599
|
const context = await getSpanContextForTraceCarrier(traceCarrier);
|
|
129532
129600
|
if (context) {
|
|
129533
|
-
(
|
|
129601
|
+
(_d2 = span == null ? void 0 : span.addLink) == null ? void 0 : _d2.call(span, { context });
|
|
129534
129602
|
}
|
|
129535
129603
|
}
|
|
129536
129604
|
await world.queue(getWorkflowQueueName(workflowRun.workflowName), {
|
|
@@ -129719,13 +129787,13 @@ const normalizeWorkflowArgs = (args) => {
|
|
|
129719
129787
|
async function recreateRunFromExisting(world, runId, options = {}) {
|
|
129720
129788
|
var _a3;
|
|
129721
129789
|
try {
|
|
129722
|
-
const
|
|
129723
|
-
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world,
|
|
129790
|
+
const run2 = await world.runs.get(runId, { resolveData: "all" });
|
|
129791
|
+
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, run2));
|
|
129724
129792
|
const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
|
|
129725
|
-
const workflowArgs = normalizeWorkflowArgs(await hydrateWorkflowArguments(
|
|
129726
|
-
const specVersion = options.specVersion ??
|
|
129727
|
-
const deploymentId = options.deploymentId ??
|
|
129728
|
-
const newRun = await start$1({ workflowId:
|
|
129793
|
+
const workflowArgs = normalizeWorkflowArgs(await hydrateWorkflowArguments(run2.input, runId, encryptionKey, globalThis));
|
|
129794
|
+
const specVersion = options.specVersion ?? run2.specVersion ?? SPEC_VERSION_LEGACY;
|
|
129795
|
+
const deploymentId = options.deploymentId ?? run2.deploymentId;
|
|
129796
|
+
const newRun = await start$1({ workflowId: run2.workflowName }, workflowArgs, {
|
|
129729
129797
|
deploymentId,
|
|
129730
129798
|
world,
|
|
129731
129799
|
specVersion
|
|
@@ -129737,8 +129805,8 @@ async function recreateRunFromExisting(world, runId, options = {}) {
|
|
|
129737
129805
|
}
|
|
129738
129806
|
async function cancelRun$2(world, runId) {
|
|
129739
129807
|
try {
|
|
129740
|
-
const
|
|
129741
|
-
const specVersion =
|
|
129808
|
+
const run2 = await world.runs.get(runId, { resolveData: "none" });
|
|
129809
|
+
const specVersion = run2.specVersion ?? SPEC_VERSION_LEGACY;
|
|
129742
129810
|
const compatMode = isLegacySpecVersion(specVersion);
|
|
129743
129811
|
const eventData = {
|
|
129744
129812
|
eventType: "run_cancelled",
|
|
@@ -129751,12 +129819,12 @@ async function cancelRun$2(world, runId) {
|
|
|
129751
129819
|
}
|
|
129752
129820
|
async function reenqueueRun$2(world, runId) {
|
|
129753
129821
|
try {
|
|
129754
|
-
const
|
|
129755
|
-
await world.queue(getWorkflowQueueName(
|
|
129822
|
+
const run2 = await world.runs.get(runId, { resolveData: "none" });
|
|
129823
|
+
await world.queue(getWorkflowQueueName(run2.workflowName), {
|
|
129756
129824
|
runId
|
|
129757
129825
|
}, {
|
|
129758
|
-
deploymentId:
|
|
129759
|
-
specVersion:
|
|
129826
|
+
deploymentId: run2.deploymentId,
|
|
129827
|
+
specVersion: run2.specVersion ?? SPEC_VERSION_LEGACY
|
|
129760
129828
|
});
|
|
129761
129829
|
} catch (err) {
|
|
129762
129830
|
throw new Error(`Failed to re-enqueue run ${runId}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
@@ -129764,8 +129832,8 @@ async function reenqueueRun$2(world, runId) {
|
|
|
129764
129832
|
}
|
|
129765
129833
|
async function wakeUpRun$2(world, runId, options) {
|
|
129766
129834
|
try {
|
|
129767
|
-
const
|
|
129768
|
-
const compatMode = isLegacySpecVersion(
|
|
129835
|
+
const run2 = await world.runs.get(runId, { resolveData: "none" });
|
|
129836
|
+
const compatMode = isLegacySpecVersion(run2.specVersion);
|
|
129769
129837
|
const allEvents = [];
|
|
129770
129838
|
let cursor = null;
|
|
129771
129839
|
do {
|
|
@@ -129795,7 +129863,7 @@ async function wakeUpRun$2(world, runId, options) {
|
|
|
129795
129863
|
} : {
|
|
129796
129864
|
eventType: "wait_completed",
|
|
129797
129865
|
correlationId: waitEvent.correlationId,
|
|
129798
|
-
specVersion:
|
|
129866
|
+
specVersion: run2.specVersion,
|
|
129799
129867
|
eventData: {
|
|
129800
129868
|
resumeAt: waitEvent.eventData.resumeAt
|
|
129801
129869
|
}
|
|
@@ -129812,11 +129880,11 @@ async function wakeUpRun$2(world, runId, options) {
|
|
|
129812
129880
|
}
|
|
129813
129881
|
}
|
|
129814
129882
|
if (stoppedCount > 0) {
|
|
129815
|
-
await world.queue(getWorkflowQueueName(
|
|
129883
|
+
await world.queue(getWorkflowQueueName(run2.workflowName), {
|
|
129816
129884
|
runId
|
|
129817
129885
|
}, {
|
|
129818
|
-
deploymentId:
|
|
129819
|
-
specVersion:
|
|
129886
|
+
deploymentId: run2.deploymentId,
|
|
129887
|
+
specVersion: run2.specVersion ?? SPEC_VERSION_LEGACY
|
|
129820
129888
|
});
|
|
129821
129889
|
}
|
|
129822
129890
|
if (errors2.length > 0) {
|
|
@@ -129904,7 +129972,7 @@ const _Run = class _Run {
|
|
|
129904
129972
|
*/
|
|
129905
129973
|
get status() {
|
|
129906
129974
|
"use step";
|
|
129907
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((
|
|
129975
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.status));
|
|
129908
129976
|
}
|
|
129909
129977
|
/**
|
|
129910
129978
|
* The return value of the workflow run.
|
|
@@ -129919,14 +129987,14 @@ const _Run = class _Run {
|
|
|
129919
129987
|
*/
|
|
129920
129988
|
get workflowName() {
|
|
129921
129989
|
"use step";
|
|
129922
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((
|
|
129990
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.workflowName));
|
|
129923
129991
|
}
|
|
129924
129992
|
/**
|
|
129925
129993
|
* The timestamp when the workflow run was created.
|
|
129926
129994
|
*/
|
|
129927
129995
|
get createdAt() {
|
|
129928
129996
|
"use step";
|
|
129929
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((
|
|
129997
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.createdAt));
|
|
129930
129998
|
}
|
|
129931
129999
|
/**
|
|
129932
130000
|
* The timestamp when the workflow run started execution.
|
|
@@ -129934,7 +130002,7 @@ const _Run = class _Run {
|
|
|
129934
130002
|
*/
|
|
129935
130003
|
get startedAt() {
|
|
129936
130004
|
"use step";
|
|
129937
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((
|
|
130005
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.startedAt));
|
|
129938
130006
|
}
|
|
129939
130007
|
/**
|
|
129940
130008
|
* The timestamp when the workflow run completed.
|
|
@@ -129942,7 +130010,7 @@ const _Run = class _Run {
|
|
|
129942
130010
|
*/
|
|
129943
130011
|
get completedAt() {
|
|
129944
130012
|
"use step";
|
|
129945
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((
|
|
130013
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.completedAt));
|
|
129946
130014
|
}
|
|
129947
130015
|
/**
|
|
129948
130016
|
* The readable stream of the workflow run.
|
|
@@ -129966,7 +130034,7 @@ const _Run = class _Run {
|
|
|
129966
130034
|
"use step";
|
|
129967
130035
|
const { ops = [], global: global2 = globalThis, startIndex, namespace: namespace2 } = options;
|
|
129968
130036
|
const name2 = getWorkflowRunStreamId(this.runId, namespace2);
|
|
129969
|
-
const encryptionKey = __privateMethod(this, _Run_instances,
|
|
130037
|
+
const encryptionKey = __privateMethod(this, _Run_instances, getEncryptionKeyLazily_fn).call(this);
|
|
129970
130038
|
const stream = getExternalRevivers(global2, ops, this.runId, encryptionKey).ReadableStream({
|
|
129971
130039
|
name: name2,
|
|
129972
130040
|
startIndex
|
|
@@ -130002,13 +130070,22 @@ getEncryptionKey_fn = function() {
|
|
|
130002
130070
|
__privateSet(this, _encryptionKeyPromise, (async () => {
|
|
130003
130071
|
var _a3;
|
|
130004
130072
|
const world = await __privateGet(this, _Run_instances, lazyWorldPromise_get);
|
|
130005
|
-
const
|
|
130006
|
-
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world,
|
|
130073
|
+
const run2 = await world.runs.get(this.runId);
|
|
130074
|
+
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, run2));
|
|
130007
130075
|
return rawKey ? await importKey(rawKey) : void 0;
|
|
130008
130076
|
})());
|
|
130009
130077
|
}
|
|
130010
130078
|
return __privateGet(this, _encryptionKeyPromise);
|
|
130011
130079
|
};
|
|
130080
|
+
/**
|
|
130081
|
+
* Defer fetching the run and its encryption key until serialized stream data
|
|
130082
|
+
* is actually read. An empty or metadata-only stream must not start an
|
|
130083
|
+
* unobserved run lookup.
|
|
130084
|
+
* @internal
|
|
130085
|
+
*/
|
|
130086
|
+
getEncryptionKeyLazily_fn = function() {
|
|
130087
|
+
return () => __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this);
|
|
130088
|
+
};
|
|
130012
130089
|
pollReturnValue_fn = async function() {
|
|
130013
130090
|
const world = await __privateGet(this, _Run_instances, lazyWorldPromise_get);
|
|
130014
130091
|
let notFoundRetries = 0;
|
|
@@ -130016,27 +130093,27 @@ pollReturnValue_fn = async function() {
|
|
|
130016
130093
|
const NOT_FOUND_DELAYS = [1e3, 3e3, 6e3];
|
|
130017
130094
|
while (true) {
|
|
130018
130095
|
try {
|
|
130019
|
-
const
|
|
130020
|
-
if (
|
|
130096
|
+
const run2 = await world.runs.get(this.runId);
|
|
130097
|
+
if (run2.status === "completed") {
|
|
130021
130098
|
const encryptionKey = await __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this);
|
|
130022
|
-
return await hydrateWorkflowReturnValue(
|
|
130099
|
+
return await hydrateWorkflowReturnValue(run2.output, this.runId, encryptionKey);
|
|
130023
130100
|
}
|
|
130024
|
-
if (
|
|
130101
|
+
if (run2.status === "cancelled") {
|
|
130025
130102
|
throw new WorkflowRunCancelledError(this.runId);
|
|
130026
130103
|
}
|
|
130027
|
-
if (
|
|
130104
|
+
if (run2.status === "failed") {
|
|
130028
130105
|
const encryptionKey = await __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this);
|
|
130029
130106
|
let hydratedError;
|
|
130030
130107
|
try {
|
|
130031
|
-
hydratedError = await hydrateRunError(
|
|
130108
|
+
hydratedError = await hydrateRunError(run2.error, this.runId, encryptionKey);
|
|
130032
130109
|
} catch {
|
|
130033
130110
|
hydratedError = new Error("Failed to hydrate workflow run error");
|
|
130034
130111
|
}
|
|
130035
130112
|
throw new WorkflowRunFailedError(this.runId, hydratedError, {
|
|
130036
|
-
errorCode:
|
|
130113
|
+
errorCode: run2.errorCode
|
|
130037
130114
|
});
|
|
130038
130115
|
}
|
|
130039
|
-
throw new WorkflowRunNotCompletedError(this.runId,
|
|
130116
|
+
throw new WorkflowRunNotCompletedError(this.runId, run2.status);
|
|
130040
130117
|
} catch (error2) {
|
|
130041
130118
|
if (WorkflowRunNotCompletedError.is(error2)) {
|
|
130042
130119
|
await new Promise((resolve2) => setTimeout(resolve2, 1e3));
|
|
@@ -130494,8 +130571,8 @@ async function fetchRuns(worldEnv, params) {
|
|
|
130494
130571
|
async function fetchRun(worldEnv, runId, resolveData = "all") {
|
|
130495
130572
|
try {
|
|
130496
130573
|
const world = await getWorldFromEnv(worldEnv);
|
|
130497
|
-
const
|
|
130498
|
-
return createResponse(
|
|
130574
|
+
const run2 = await world.runs.get(runId, { resolveData });
|
|
130575
|
+
return createResponse(run2);
|
|
130499
130576
|
} catch (error2) {
|
|
130500
130577
|
return createServerActionError(error2, "world.runs.get", {
|
|
130501
130578
|
runId,
|
|
@@ -130827,8 +130904,8 @@ async function getEncryptionKeyForRun(worldEnv, runId) {
|
|
|
130827
130904
|
if (!world.getEncryptionKeyForRun) {
|
|
130828
130905
|
return createResponse(null);
|
|
130829
130906
|
}
|
|
130830
|
-
const
|
|
130831
|
-
const key = await world.getEncryptionKeyForRun(
|
|
130907
|
+
const run2 = await world.runs.get(runId);
|
|
130908
|
+
const key = await world.getEncryptionKeyForRun(run2);
|
|
130832
130909
|
return createResponse(key ?? null);
|
|
130833
130910
|
} catch (error2) {
|
|
130834
130911
|
return createServerActionError(
|
|
@@ -132007,7 +132084,7 @@ var CONTENT_NAME$7 = "PopperContent";
|
|
|
132007
132084
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$7);
|
|
132008
132085
|
var PopperContent = reactExports.forwardRef(
|
|
132009
132086
|
(props, forwardedRef) => {
|
|
132010
|
-
var _a3, _b2, _c2,
|
|
132087
|
+
var _a3, _b2, _c2, _d2, _e2, _f;
|
|
132011
132088
|
const {
|
|
132012
132089
|
__scopePopper,
|
|
132013
132090
|
side = "bottom",
|
|
@@ -132105,7 +132182,7 @@ var PopperContent = reactExports.forwardRef(
|
|
|
132105
132182
|
minWidth: "max-content",
|
|
132106
132183
|
zIndex: contentZIndex,
|
|
132107
132184
|
["--radix-popper-transform-origin"]: [
|
|
132108
|
-
(
|
|
132185
|
+
(_d2 = middlewareData.transformOrigin) == null ? void 0 : _d2.x,
|
|
132109
132186
|
(_e2 = middlewareData.transformOrigin) == null ? void 0 : _e2.y
|
|
132110
132187
|
].join(" "),
|
|
132111
132188
|
// hide the content if using the hide middleware and should be hidden
|
|
@@ -132811,51 +132888,51 @@ function innerCreateMedium(defaults2, middleware2) {
|
|
|
132811
132888
|
if (middleware2 === void 0) {
|
|
132812
132889
|
middleware2 = ItoI;
|
|
132813
132890
|
}
|
|
132814
|
-
var
|
|
132891
|
+
var buffer2 = [];
|
|
132815
132892
|
var assigned = false;
|
|
132816
132893
|
var medium = {
|
|
132817
132894
|
read: function() {
|
|
132818
132895
|
if (assigned) {
|
|
132819
132896
|
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
132820
132897
|
}
|
|
132821
|
-
if (
|
|
132822
|
-
return
|
|
132898
|
+
if (buffer2.length) {
|
|
132899
|
+
return buffer2[buffer2.length - 1];
|
|
132823
132900
|
}
|
|
132824
132901
|
return defaults2;
|
|
132825
132902
|
},
|
|
132826
132903
|
useMedium: function(data) {
|
|
132827
132904
|
var item = middleware2(data, assigned);
|
|
132828
|
-
|
|
132905
|
+
buffer2.push(item);
|
|
132829
132906
|
return function() {
|
|
132830
|
-
|
|
132907
|
+
buffer2 = buffer2.filter(function(x2) {
|
|
132831
132908
|
return x2 !== item;
|
|
132832
132909
|
});
|
|
132833
132910
|
};
|
|
132834
132911
|
},
|
|
132835
132912
|
assignSyncMedium: function(cb) {
|
|
132836
132913
|
assigned = true;
|
|
132837
|
-
while (
|
|
132838
|
-
var cbs =
|
|
132839
|
-
|
|
132914
|
+
while (buffer2.length) {
|
|
132915
|
+
var cbs = buffer2;
|
|
132916
|
+
buffer2 = [];
|
|
132840
132917
|
cbs.forEach(cb);
|
|
132841
132918
|
}
|
|
132842
|
-
|
|
132919
|
+
buffer2 = {
|
|
132843
132920
|
push: function(x2) {
|
|
132844
132921
|
return cb(x2);
|
|
132845
132922
|
},
|
|
132846
132923
|
filter: function() {
|
|
132847
|
-
return
|
|
132924
|
+
return buffer2;
|
|
132848
132925
|
}
|
|
132849
132926
|
};
|
|
132850
132927
|
},
|
|
132851
132928
|
assignMedium: function(cb) {
|
|
132852
132929
|
assigned = true;
|
|
132853
132930
|
var pendingQueue = [];
|
|
132854
|
-
if (
|
|
132855
|
-
var cbs =
|
|
132856
|
-
|
|
132931
|
+
if (buffer2.length) {
|
|
132932
|
+
var cbs = buffer2;
|
|
132933
|
+
buffer2 = [];
|
|
132857
132934
|
cbs.forEach(cb);
|
|
132858
|
-
pendingQueue =
|
|
132935
|
+
pendingQueue = buffer2;
|
|
132859
132936
|
}
|
|
132860
132937
|
var executeQueue = function() {
|
|
132861
132938
|
var cbs2 = pendingQueue;
|
|
@@ -132866,14 +132943,14 @@ function innerCreateMedium(defaults2, middleware2) {
|
|
|
132866
132943
|
return Promise.resolve().then(executeQueue);
|
|
132867
132944
|
};
|
|
132868
132945
|
cycle();
|
|
132869
|
-
|
|
132946
|
+
buffer2 = {
|
|
132870
132947
|
push: function(x2) {
|
|
132871
132948
|
pendingQueue.push(x2);
|
|
132872
132949
|
cycle();
|
|
132873
132950
|
},
|
|
132874
132951
|
filter: function(filter2) {
|
|
132875
132952
|
pendingQueue = pendingQueue.filter(filter2);
|
|
132876
|
-
return
|
|
132953
|
+
return buffer2;
|
|
132877
132954
|
}
|
|
132878
132955
|
};
|
|
132879
132956
|
}
|
|
@@ -134646,9 +134723,9 @@ function getDefaultOptions() {
|
|
|
134646
134723
|
return defaultOptions$1;
|
|
134647
134724
|
}
|
|
134648
134725
|
function startOfWeek(date2, options) {
|
|
134649
|
-
var _a3, _b2, _c2,
|
|
134726
|
+
var _a3, _b2, _c2, _d2;
|
|
134650
134727
|
const defaultOptions2 = getDefaultOptions();
|
|
134651
|
-
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((
|
|
134728
|
+
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d2 = (_c2 = defaultOptions2.locale) == null ? void 0 : _c2.options) == null ? void 0 : _d2.weekStartsOn) ?? 0;
|
|
134652
134729
|
const _date2 = toDate(date2, options == null ? void 0 : options.in);
|
|
134653
134730
|
const day = _date2.getDay();
|
|
134654
134731
|
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
@@ -135254,11 +135331,11 @@ function getISOWeek(date2, options) {
|
|
|
135254
135331
|
return Math.round(diff / millisecondsInWeek) + 1;
|
|
135255
135332
|
}
|
|
135256
135333
|
function getWeekYear(date2, options) {
|
|
135257
|
-
var _a3, _b2, _c2,
|
|
135334
|
+
var _a3, _b2, _c2, _d2;
|
|
135258
135335
|
const _date2 = toDate(date2, options == null ? void 0 : options.in);
|
|
135259
135336
|
const year = _date2.getFullYear();
|
|
135260
135337
|
const defaultOptions2 = getDefaultOptions();
|
|
135261
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((
|
|
135338
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d2 = (_c2 = defaultOptions2.locale) == null ? void 0 : _c2.options) == null ? void 0 : _d2.firstWeekContainsDate) ?? 1;
|
|
135262
135339
|
const firstWeekOfNextYear = constructFrom((options == null ? void 0 : options.in) || date2, 0);
|
|
135263
135340
|
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
135264
135341
|
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
@@ -135276,9 +135353,9 @@ function getWeekYear(date2, options) {
|
|
|
135276
135353
|
}
|
|
135277
135354
|
}
|
|
135278
135355
|
function startOfWeekYear(date2, options) {
|
|
135279
|
-
var _a3, _b2, _c2,
|
|
135356
|
+
var _a3, _b2, _c2, _d2;
|
|
135280
135357
|
const defaultOptions2 = getDefaultOptions();
|
|
135281
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((
|
|
135358
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d2 = (_c2 = defaultOptions2.locale) == null ? void 0 : _c2.options) == null ? void 0 : _d2.firstWeekContainsDate) ?? 1;
|
|
135282
135359
|
const year = getWeekYear(date2, options);
|
|
135283
135360
|
const firstWeek = constructFrom((options == null ? void 0 : options.in) || date2, 0);
|
|
135284
135361
|
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
@@ -136075,10 +136152,10 @@ const escapedStringRegExp = /^'([^]*?)'?$/;
|
|
|
136075
136152
|
const doubleQuoteRegExp = /''/g;
|
|
136076
136153
|
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
136077
136154
|
function format(date2, formatStr, options) {
|
|
136078
|
-
var _a3, _b2, _c2,
|
|
136155
|
+
var _a3, _b2, _c2, _d2, _e2, _f, _g, _h;
|
|
136079
136156
|
const defaultOptions2 = getDefaultOptions();
|
|
136080
136157
|
const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
|
|
136081
|
-
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((
|
|
136158
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b2 = (_a3 = options == null ? void 0 : options.locale) == null ? void 0 : _a3.options) == null ? void 0 : _b2.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d2 = (_c2 = defaultOptions2.locale) == null ? void 0 : _c2.options) == null ? void 0 : _d2.firstWeekContainsDate) ?? 1;
|
|
136082
136159
|
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e2 = options == null ? void 0 : options.locale) == null ? void 0 : _e2.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
|
|
136083
136160
|
const originalDate = toDate(date2, options == null ? void 0 : options.in);
|
|
136084
136161
|
if (!isValid(originalDate)) {
|
|
@@ -136790,7 +136867,7 @@ const LIVE_UPDATE_INTERVAL_MS = 5e3;
|
|
|
136790
136867
|
const AUTO_LOAD_MAX_EVENTS = 500;
|
|
136791
136868
|
function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
136792
136869
|
const { live = false } = options;
|
|
136793
|
-
const [
|
|
136870
|
+
const [run2, setRun] = reactExports.useState(null);
|
|
136794
136871
|
const [events2, setEvents] = reactExports.useState([]);
|
|
136795
136872
|
const [loading, setLoading] = reactExports.useState(true);
|
|
136796
136873
|
const [error2, setError] = reactExports.useState(null);
|
|
@@ -136903,7 +136980,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
136903
136980
|
loadMoreTraceData();
|
|
136904
136981
|
}, [events2.length, loadMoreTraceData]);
|
|
136905
136982
|
const pollRun = reactExports.useCallback(async () => {
|
|
136906
|
-
if (
|
|
136983
|
+
if (run2 == null ? void 0 : run2.completedAt) {
|
|
136907
136984
|
return false;
|
|
136908
136985
|
}
|
|
136909
136986
|
const { error: error22, result } = await unwrapServerActionResult(
|
|
@@ -136916,7 +136993,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
136916
136993
|
setError(null);
|
|
136917
136994
|
setRun(hydrateResourceIO(result));
|
|
136918
136995
|
return true;
|
|
136919
|
-
}, [env2, runId,
|
|
136996
|
+
}, [env2, runId, run2 == null ? void 0 : run2.completedAt]);
|
|
136920
136997
|
const pollEvents = reactExports.useCallback(
|
|
136921
136998
|
() => pollResource({
|
|
136922
136999
|
fetchFn: () => unwrapServerActionResult(
|
|
@@ -136958,7 +137035,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
136958
137035
|
};
|
|
136959
137036
|
}, []);
|
|
136960
137037
|
reactExports.useEffect(() => {
|
|
136961
|
-
if (!live || !initialLoadCompleted || (
|
|
137038
|
+
if (!live || !initialLoadCompleted || (run2 == null ? void 0 : run2.completedAt)) {
|
|
136962
137039
|
return;
|
|
136963
137040
|
}
|
|
136964
137041
|
const interval2 = setInterval(() => {
|
|
@@ -136967,9 +137044,9 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
136967
137044
|
return () => {
|
|
136968
137045
|
clearInterval(interval2);
|
|
136969
137046
|
};
|
|
136970
|
-
}, [live, initialLoadCompleted, update,
|
|
137047
|
+
}, [live, initialLoadCompleted, update, run2 == null ? void 0 : run2.completedAt]);
|
|
136971
137048
|
return {
|
|
136972
|
-
run:
|
|
137049
|
+
run: run2 ?? {},
|
|
136973
137050
|
events: events2,
|
|
136974
137051
|
loading,
|
|
136975
137052
|
error: error2,
|
|
@@ -139624,8 +139701,8 @@ function RunActionsDropdownContentInner({
|
|
|
139624
139701
|
}) {
|
|
139625
139702
|
const [events2, setEvents] = reactExports.useState(void 0);
|
|
139626
139703
|
const [isLoading, setIsLoading] = reactExports.useState(true);
|
|
139627
|
-
const [
|
|
139628
|
-
const status = (
|
|
139704
|
+
const [run2, setRun] = reactExports.useState(void 0);
|
|
139705
|
+
const status = (run2 == null ? void 0 : run2.status) || runStatus;
|
|
139629
139706
|
reactExports.useEffect(() => {
|
|
139630
139707
|
setIsLoading(true);
|
|
139631
139708
|
Promise.all([
|
|
@@ -139836,7 +139913,7 @@ function FilterControls({
|
|
|
139836
139913
|
] });
|
|
139837
139914
|
}
|
|
139838
139915
|
function RunsTable({ onRunClick }) {
|
|
139839
|
-
var _a3, _b2, _c2,
|
|
139916
|
+
var _a3, _b2, _c2, _d2;
|
|
139840
139917
|
const [searchParams] = useSearchParams();
|
|
139841
139918
|
const handleWorkflowFilter = useWorkflowFilter();
|
|
139842
139919
|
const handleStatusFilter = useStatusFilter();
|
|
@@ -139874,15 +139951,15 @@ function RunsTable({ onRunClick }) {
|
|
|
139874
139951
|
status: status === "all" ? void 0 : status
|
|
139875
139952
|
});
|
|
139876
139953
|
const selection2 = useTableSelection({
|
|
139877
|
-
getItemId: (
|
|
139954
|
+
getItemId: (run2) => run2.runId
|
|
139878
139955
|
});
|
|
139879
139956
|
const runs = data.data ?? [];
|
|
139880
139957
|
const [isBulkCancelling, setIsBulkCancelling] = reactExports.useState(false);
|
|
139881
139958
|
const [isBulkReenqueuing, setIsBulkReenqueuing] = reactExports.useState(false);
|
|
139882
|
-
const isLocalAndHasMissingData = isLocal && (!localDataDirPath || !((
|
|
139959
|
+
const isLocalAndHasMissingData = isLocal && (!localDataDirPath || !((_d2 = data == null ? void 0 : data.data) == null ? void 0 : _d2.length));
|
|
139883
139960
|
reactExports.useEffect(() => {
|
|
139884
139961
|
if (data.data && data.data.length > 0) {
|
|
139885
|
-
const newNames = new Set(data.data.map((
|
|
139962
|
+
const newNames = new Set(data.data.map((run2) => run2.workflowName));
|
|
139886
139963
|
setSeenWorkflowNames((prev) => {
|
|
139887
139964
|
const updated = new Set(prev);
|
|
139888
139965
|
for (const name2 of newNames) {
|
|
@@ -139911,11 +139988,11 @@ function RunsTable({ onRunClick }) {
|
|
|
139911
139988
|
refresh();
|
|
139912
139989
|
}, [refresh]);
|
|
139913
139990
|
const selectedRuns = reactExports.useMemo(() => {
|
|
139914
|
-
return runs.filter((
|
|
139991
|
+
return runs.filter((run2) => selection2.selectedIds.has(run2.runId));
|
|
139915
139992
|
}, [runs, selection2.selectedIds]);
|
|
139916
139993
|
const cancellableSelectedRuns = reactExports.useMemo(() => {
|
|
139917
139994
|
return selectedRuns.filter(
|
|
139918
|
-
(
|
|
139995
|
+
(run2) => run2.status === "pending" || run2.status === "running"
|
|
139919
139996
|
);
|
|
139920
139997
|
}, [selectedRuns]);
|
|
139921
139998
|
const hasCancellableSelection = cancellableSelectedRuns.length > 0;
|
|
@@ -139924,7 +140001,7 @@ function RunsTable({ onRunClick }) {
|
|
|
139924
140001
|
setIsBulkCancelling(true);
|
|
139925
140002
|
try {
|
|
139926
140003
|
const results = await Promise.allSettled(
|
|
139927
|
-
cancellableSelectedRuns.map((
|
|
140004
|
+
cancellableSelectedRuns.map((run2) => cancelRun(env2, run2.runId))
|
|
139928
140005
|
);
|
|
139929
140006
|
const succeeded = results.filter((r2) => r2.status === "fulfilled").length;
|
|
139930
140007
|
const failed = results.filter((r2) => r2.status === "rejected").length;
|
|
@@ -139954,7 +140031,7 @@ function RunsTable({ onRunClick }) {
|
|
|
139954
140031
|
setIsBulkReenqueuing(true);
|
|
139955
140032
|
try {
|
|
139956
140033
|
const results = await Promise.allSettled(
|
|
139957
|
-
selectedRuns.map((
|
|
140034
|
+
selectedRuns.map((run2) => reenqueueRun(env2, run2.runId))
|
|
139958
140035
|
);
|
|
139959
140036
|
const succeeded = results.filter((r2) => r2.status === "fulfilled").length;
|
|
139960
140037
|
const failed = results.filter((r2) => r2.status === "rejected").length;
|
|
@@ -140057,47 +140134,47 @@ function RunsTable({ onRunClick }) {
|
|
|
140057
140134
|
"."
|
|
140058
140135
|
] }),
|
|
140059
140136
|
isLocalAndHasMissingData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm flex items-center gap-2", children: "This view will update once you run a workflow." })
|
|
140060
|
-
] }) }) }) : runs.map((
|
|
140137
|
+
] }) }) }) : runs.map((run2) => {
|
|
140061
140138
|
var _a4;
|
|
140062
140139
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
140063
140140
|
TableRow,
|
|
140064
140141
|
{
|
|
140065
140142
|
className: "cursor-pointer group relative",
|
|
140066
|
-
onClick: () => onRunClick(
|
|
140067
|
-
"data-selected": selection2.isSelected(
|
|
140143
|
+
onClick: () => onRunClick(run2.runId),
|
|
140144
|
+
"data-selected": selection2.isSelected(run2),
|
|
140068
140145
|
children: [
|
|
140069
140146
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140070
140147
|
Checkbox,
|
|
140071
140148
|
{
|
|
140072
|
-
checked: selection2.isSelected(
|
|
140073
|
-
onCheckedChange: () => selection2.toggleSelection(
|
|
140074
|
-
"aria-label": `Select run ${
|
|
140149
|
+
checked: selection2.isSelected(run2),
|
|
140150
|
+
onCheckedChange: () => selection2.toggleSelection(run2),
|
|
140151
|
+
"aria-label": `Select run ${run2.runId}`
|
|
140075
140152
|
}
|
|
140076
140153
|
) }),
|
|
140077
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text:
|
|
140078
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "font-mono text-xs py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text:
|
|
140154
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run2.workflowName, overlay: true, children: ((_a4 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _a4.shortName) || "?" }) }),
|
|
140155
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "font-mono text-xs py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run2.runId, overlay: true, children: run2.runId }) }),
|
|
140079
140156
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140080
140157
|
StatusBadge,
|
|
140081
140158
|
{
|
|
140082
|
-
status:
|
|
140083
|
-
context:
|
|
140084
|
-
durationMs:
|
|
140159
|
+
status: run2.status,
|
|
140160
|
+
context: run2,
|
|
140161
|
+
durationMs: run2.startedAt ? (run2.completedAt ? new Date(run2.completedAt).getTime() : Date.now()) - new Date(run2.startedAt).getTime() : void 0
|
|
140085
140162
|
}
|
|
140086
140163
|
) }),
|
|
140087
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children:
|
|
140088
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children:
|
|
140164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run2.startedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.startedAt }) : "-" }),
|
|
140165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run2.completedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.completedAt }) : "-" }),
|
|
140089
140166
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140090
140167
|
LazyDropdownMenu,
|
|
140091
140168
|
{
|
|
140092
140169
|
env: env2,
|
|
140093
|
-
runId:
|
|
140094
|
-
runStatus:
|
|
140170
|
+
runId: run2.runId,
|
|
140171
|
+
runStatus: run2.status,
|
|
140095
140172
|
onSuccess: onReload
|
|
140096
140173
|
}
|
|
140097
140174
|
) })
|
|
140098
140175
|
]
|
|
140099
140176
|
},
|
|
140100
|
-
|
|
140177
|
+
run2.runId
|
|
140101
140178
|
);
|
|
140102
140179
|
}) })
|
|
140103
140180
|
] }) }) }),
|
|
@@ -147183,13 +147260,13 @@ function useResizeHandler(domNode) {
|
|
|
147183
147260
|
const store = useStoreApi();
|
|
147184
147261
|
reactExports.useEffect(() => {
|
|
147185
147262
|
const updateDimensions = () => {
|
|
147186
|
-
var _a3, _b2, _c2,
|
|
147263
|
+
var _a3, _b2, _c2, _d2;
|
|
147187
147264
|
if (!domNode.current || !(((_b2 = (_a3 = domNode.current).checkVisibility) == null ? void 0 : _b2.call(_a3)) ?? true)) {
|
|
147188
147265
|
return false;
|
|
147189
147266
|
}
|
|
147190
147267
|
const size2 = getDimensions(domNode.current);
|
|
147191
147268
|
if (size2.height === 0 || size2.width === 0) {
|
|
147192
|
-
(
|
|
147269
|
+
(_d2 = (_c2 = store.getState()).onError) == null ? void 0 : _d2.call(_c2, "004", errorMessages["error004"]());
|
|
147193
147270
|
}
|
|
147194
147271
|
store.setState({ width: size2.width || 500, height: size2.height || 500 });
|
|
147195
147272
|
};
|
|
@@ -147761,7 +147838,7 @@ const builtinNodeTypes = {
|
|
|
147761
147838
|
group: GroupNode
|
|
147762
147839
|
};
|
|
147763
147840
|
function getNodeInlineStyleDimensions(node2) {
|
|
147764
|
-
var _a3, _b2, _c2,
|
|
147841
|
+
var _a3, _b2, _c2, _d2;
|
|
147765
147842
|
if (node2.internals.handleBounds === void 0) {
|
|
147766
147843
|
return {
|
|
147767
147844
|
width: node2.width ?? node2.initialWidth ?? ((_a3 = node2.style) == null ? void 0 : _a3.width),
|
|
@@ -147770,7 +147847,7 @@ function getNodeInlineStyleDimensions(node2) {
|
|
|
147770
147847
|
}
|
|
147771
147848
|
return {
|
|
147772
147849
|
width: node2.width ?? ((_c2 = node2.style) == null ? void 0 : _c2.width),
|
|
147773
|
-
height: node2.height ?? ((
|
|
147850
|
+
height: node2.height ?? ((_d2 = node2.style) == null ? void 0 : _d2.height)
|
|
147774
147851
|
};
|
|
147775
147852
|
}
|
|
147776
147853
|
const selector$f = (s2) => {
|
|
@@ -149541,7 +149618,7 @@ const LAYOUT$1 = {
|
|
|
149541
149618
|
PARALLEL_GROUP_PADDING: 25
|
|
149542
149619
|
};
|
|
149543
149620
|
function LoopNodeComponent({ data, selected: selected2 }) {
|
|
149544
|
-
var _a3, _b2, _c2,
|
|
149621
|
+
var _a3, _b2, _c2, _d2;
|
|
149545
149622
|
const nodeData = data;
|
|
149546
149623
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
149547
149624
|
"div",
|
|
@@ -149555,7 +149632,7 @@ function LoopNodeComponent({ data, selected: selected2 }) {
|
|
|
149555
149632
|
borderStyle: "solid",
|
|
149556
149633
|
backgroundColor: (_b2 = nodeData.nodeStyle) == null ? void 0 : _b2.backgroundColor,
|
|
149557
149634
|
borderColor: ((_c2 = nodeData.nodeStyle) == null ? void 0 : _c2.borderColor) ?? "#9ca3af",
|
|
149558
|
-
opacity: (
|
|
149635
|
+
opacity: (_d2 = nodeData.nodeStyle) == null ? void 0 : _d2.opacity,
|
|
149559
149636
|
boxShadow: selected2 ? "0 0 0 2px rgba(168, 85, 247, 0.5)" : void 0
|
|
149560
149637
|
},
|
|
149561
149638
|
children: [
|
|
@@ -149845,7 +149922,7 @@ function getNodeIcon(nodeKind, label) {
|
|
|
149845
149922
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { className: "h-3.5 w-3.5 text-green-600 dark:text-green-400" });
|
|
149846
149923
|
}
|
|
149847
149924
|
function calculateEnhancedLayout(workflow, layoutConfig = LAYOUT$1) {
|
|
149848
|
-
var _a3, _b2, _c2,
|
|
149925
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
149849
149926
|
const nodes = workflow.nodes.map((node2) => ({ ...node2 }));
|
|
149850
149927
|
const groupNodes = [];
|
|
149851
149928
|
const additionalEdges = [];
|
|
@@ -149923,7 +150000,7 @@ function calculateEnhancedLayout(workflow, layoutConfig = LAYOUT$1) {
|
|
|
149923
150000
|
const elseNodes = branches.elseBranch;
|
|
149924
150001
|
if (thenNodes.length > 0 && elseNodes.length > 0) {
|
|
149925
150002
|
const baseY = Math.min(
|
|
149926
|
-
((
|
|
150003
|
+
((_d2 = thenNodes[0]) == null ? void 0 : _d2.position.y) || 0,
|
|
149927
150004
|
((_e2 = elseNodes[0]) == null ? void 0 : _e2.position.y) || 0
|
|
149928
150005
|
);
|
|
149929
150006
|
thenNodes.forEach((node2, idx) => {
|
|
@@ -152455,15 +152532,15 @@ function useStreamReader(env2, streamId, runId, encryptionKey, runStatus) {
|
|
|
152455
152532
|
const skipFrames = (options == null ? void 0 : options.skipFrames) ?? 0;
|
|
152456
152533
|
const reader = streamResponse.body.getReader();
|
|
152457
152534
|
const decoder2 = new TextDecoder();
|
|
152458
|
-
let
|
|
152535
|
+
let buffer2 = new Uint8Array(0);
|
|
152459
152536
|
let encoding2 = null;
|
|
152460
152537
|
let textRemainder = "";
|
|
152461
152538
|
let frameIndex = 0;
|
|
152462
152539
|
const appendToBuffer = (data) => {
|
|
152463
|
-
const newBuffer = new Uint8Array(
|
|
152464
|
-
newBuffer.set(
|
|
152465
|
-
newBuffer.set(data,
|
|
152466
|
-
|
|
152540
|
+
const newBuffer = new Uint8Array(buffer2.length + data.length);
|
|
152541
|
+
newBuffer.set(buffer2, 0);
|
|
152542
|
+
newBuffer.set(data, buffer2.length);
|
|
152543
|
+
buffer2 = newBuffer;
|
|
152467
152544
|
};
|
|
152468
152545
|
for (; ; ) {
|
|
152469
152546
|
if (abortController.signal.aborted) break;
|
|
@@ -152480,12 +152557,12 @@ function useStreamReader(env2, streamId, runId, encryptionKey, runStatus) {
|
|
|
152480
152557
|
}
|
|
152481
152558
|
if (encoding2 === null) {
|
|
152482
152559
|
appendToBuffer(value);
|
|
152483
|
-
if (
|
|
152484
|
-
encoding2 = detectEncoding(
|
|
152560
|
+
if (buffer2.length >= FRAME_HEADER_SIZE) {
|
|
152561
|
+
encoding2 = detectEncoding(buffer2);
|
|
152485
152562
|
}
|
|
152486
152563
|
if (encoding2 === "legacy") {
|
|
152487
|
-
textRemainder = decoder2.decode(
|
|
152488
|
-
|
|
152564
|
+
textRemainder = decoder2.decode(buffer2, { stream: true });
|
|
152565
|
+
buffer2 = new Uint8Array(0);
|
|
152489
152566
|
}
|
|
152490
152567
|
} else if (encoding2 === "legacy") {
|
|
152491
152568
|
textRemainder += decoder2.decode(value, { stream: true });
|
|
@@ -152508,20 +152585,20 @@ function useStreamReader(env2, streamId, runId, encryptionKey, runStatus) {
|
|
|
152508
152585
|
}
|
|
152509
152586
|
let offset2 = 0;
|
|
152510
152587
|
let framesInBatch = 0;
|
|
152511
|
-
while (offset2 + FRAME_HEADER_SIZE <=
|
|
152588
|
+
while (offset2 + FRAME_HEADER_SIZE <= buffer2.length) {
|
|
152512
152589
|
const view = new DataView(
|
|
152513
|
-
|
|
152514
|
-
|
|
152515
|
-
|
|
152590
|
+
buffer2.buffer,
|
|
152591
|
+
buffer2.byteOffset + offset2,
|
|
152592
|
+
buffer2.byteLength - offset2
|
|
152516
152593
|
);
|
|
152517
152594
|
const frameLength = view.getUint32(0, false);
|
|
152518
152595
|
if (frameLength === 0 || frameLength > 10 * 1024 * 1024) {
|
|
152519
152596
|
break;
|
|
152520
152597
|
}
|
|
152521
|
-
if (offset2 + FRAME_HEADER_SIZE + frameLength >
|
|
152598
|
+
if (offset2 + FRAME_HEADER_SIZE + frameLength > buffer2.length) {
|
|
152522
152599
|
break;
|
|
152523
152600
|
}
|
|
152524
|
-
const frameData =
|
|
152601
|
+
const frameData = buffer2.slice(
|
|
152525
152602
|
offset2 + FRAME_HEADER_SIZE,
|
|
152526
152603
|
offset2 + FRAME_HEADER_SIZE + frameLength
|
|
152527
152604
|
);
|
|
@@ -152543,7 +152620,7 @@ function useStreamReader(env2, streamId, runId, encryptionKey, runStatus) {
|
|
|
152543
152620
|
if (abortController.signal.aborted || !mounted) break;
|
|
152544
152621
|
}
|
|
152545
152622
|
}
|
|
152546
|
-
|
|
152623
|
+
buffer2 = buffer2.slice(offset2);
|
|
152547
152624
|
}
|
|
152548
152625
|
return {
|
|
152549
152626
|
encrypted: false,
|
|
@@ -152774,7 +152851,7 @@ function RunDetailView({
|
|
|
152774
152851
|
hasMoreTraceData,
|
|
152775
152852
|
isLoadingMoreTraceData
|
|
152776
152853
|
} = useWorkflowTraceViewerData(env2, runId, { live: true });
|
|
152777
|
-
const
|
|
152854
|
+
const run2 = runData ?? {};
|
|
152778
152855
|
const [encryptionKey, setEncryptionKey] = reactExports.useState(null);
|
|
152779
152856
|
encryptionKeyRef.current = encryptionKey;
|
|
152780
152857
|
const [eventsSortOrder, setEventsSortOrder] = reactExports.useState("asc");
|
|
@@ -152837,7 +152914,7 @@ function RunDetailView({
|
|
|
152837
152914
|
}, []);
|
|
152838
152915
|
const sidebarData = reactExports.useMemo(
|
|
152839
152916
|
() => ({
|
|
152840
|
-
run,
|
|
152917
|
+
run: run2,
|
|
152841
152918
|
events: allEvents ?? [],
|
|
152842
152919
|
spanDetailData: spanDetailData ?? null,
|
|
152843
152920
|
spanDetailError,
|
|
@@ -152854,7 +152931,7 @@ function RunDetailView({
|
|
|
152854
152931
|
hasEncryptedData
|
|
152855
152932
|
}),
|
|
152856
152933
|
[
|
|
152857
|
-
|
|
152934
|
+
run2,
|
|
152858
152935
|
allEvents,
|
|
152859
152936
|
spanDetailData,
|
|
152860
152937
|
spanDetailError,
|
|
@@ -152880,7 +152957,7 @@ function RunDetailView({
|
|
|
152880
152957
|
chunks: streamChunks,
|
|
152881
152958
|
isLive: streamIsLive,
|
|
152882
152959
|
error: streamError
|
|
152883
|
-
} = useStreamReader(env2, selectedStreamId, runId, encryptionKey,
|
|
152960
|
+
} = useStreamReader(env2, selectedStreamId, runId, encryptionKey, run2.status);
|
|
152884
152961
|
const handleCancelClick = () => {
|
|
152885
152962
|
setShowCancelDialog(true);
|
|
152886
152963
|
};
|
|
@@ -152909,7 +152986,7 @@ function RunDetailView({
|
|
|
152909
152986
|
try {
|
|
152910
152987
|
setRerunning(true);
|
|
152911
152988
|
setShowRerunDialog(false);
|
|
152912
|
-
const newRunId = await recreateRun(env2,
|
|
152989
|
+
const newRunId = await recreateRun(env2, run2.runId);
|
|
152913
152990
|
toast.success("New run started successfully", {
|
|
152914
152991
|
description: `Run ID: ${newRunId}`
|
|
152915
152992
|
});
|
|
@@ -152931,7 +153008,7 @@ function RunDetailView({
|
|
|
152931
153008
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDescription, { children: error2.message })
|
|
152932
153009
|
] });
|
|
152933
153010
|
}
|
|
152934
|
-
const workflowName = (_a3 = parseWorkflowName(
|
|
153011
|
+
const workflowName = (_a3 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _a3.shortName;
|
|
152935
153012
|
const hasError = false;
|
|
152936
153013
|
const errorMessage = "";
|
|
152937
153014
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -152979,7 +153056,7 @@ function RunDetailView({
|
|
|
152979
153056
|
{
|
|
152980
153057
|
env: env2,
|
|
152981
153058
|
runId,
|
|
152982
|
-
runStatus:
|
|
153059
|
+
runStatus: run2.status,
|
|
152983
153060
|
events: allEvents,
|
|
152984
153061
|
eventsLoading: loading,
|
|
152985
153062
|
loading,
|
|
@@ -152993,12 +153070,12 @@ function RunDetailView({
|
|
|
152993
153070
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-8", children: [
|
|
152994
153071
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
152995
153072
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Status" }),
|
|
152996
|
-
|
|
153073
|
+
run2.status ? /* @__PURE__ */ jsxRuntimeExports.jsx(StatusBadge, { status: run2.status, context: run2 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[55px] h-[24px]" })
|
|
152997
153074
|
] }),
|
|
152998
153075
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
152999
153076
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Duration" }),
|
|
153000
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children:
|
|
153001
|
-
const ms2 = (
|
|
153077
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: run2.runId ? run2.startedAt ? (() => {
|
|
153078
|
+
const ms2 = (run2.completedAt ? new Date(run2.completedAt).getTime() : Date.now()) - new Date(run2.startedAt).getTime();
|
|
153002
153079
|
const seconds = Math.floor(ms2 / 1e3);
|
|
153003
153080
|
if (seconds < 60) return `${seconds}s`;
|
|
153004
153081
|
const minutes = Math.floor(seconds / 60);
|
|
@@ -153013,21 +153090,21 @@ function RunDetailView({
|
|
|
153013
153090
|
] }),
|
|
153014
153091
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
153015
153092
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Run ID" }),
|
|
153016
|
-
|
|
153093
|
+
run2.runId ? /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run2.runId, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs mt-0.5 font-mono", children: run2.runId }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[280px] h-[20px]" })
|
|
153017
153094
|
] }),
|
|
153018
153095
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
153019
153096
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Queued" }),
|
|
153020
|
-
|
|
153097
|
+
run2.createdAt ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.createdAt }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[110px] h-[20px]" })
|
|
153021
153098
|
] }),
|
|
153022
153099
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
153023
153100
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Started" }),
|
|
153024
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children:
|
|
153101
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: run2.runId ? run2.startedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.startedAt }) : "-" : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[110px] h-[20px]" }) })
|
|
153025
153102
|
] }),
|
|
153026
153103
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
153027
153104
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Completed" }),
|
|
153028
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children:
|
|
153105
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: run2.runId ? run2.completedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.completedAt }) : "-" : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[110px] h-[20px]" }) })
|
|
153029
153106
|
] }),
|
|
153030
|
-
|
|
153107
|
+
run2.expiredAt != null && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
153031
153108
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
153032
153109
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-muted-foreground cursor-help flex items-center gap-1", children: [
|
|
153033
153110
|
"Expired",
|
|
@@ -153035,7 +153112,7 @@ function RunDetailView({
|
|
|
153035
153112
|
] }) }),
|
|
153036
153113
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "The storage data for this run has expired and is no longer available." }) })
|
|
153037
153114
|
] }),
|
|
153038
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date:
|
|
153115
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run2.expiredAt }) })
|
|
153039
153116
|
] })
|
|
153040
153117
|
] })
|
|
153041
153118
|
] })
|
|
@@ -153065,7 +153142,7 @@ function RunDetailView({
|
|
|
153065
153142
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "trace", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary$1, { title: "Failed to load trace viewer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full -mx-6 bg-background-100 border-t border-gray-alpha-400 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
153066
153143
|
NewTraceViewer,
|
|
153067
153144
|
{
|
|
153068
|
-
run,
|
|
153145
|
+
run: run2,
|
|
153069
153146
|
events: allEvents ?? [],
|
|
153070
153147
|
loading,
|
|
153071
153148
|
sidebarData,
|
|
@@ -153078,7 +153155,7 @@ function RunDetailView({
|
|
|
153078
153155
|
EventListView,
|
|
153079
153156
|
{
|
|
153080
153157
|
events: eventsListData,
|
|
153081
|
-
run,
|
|
153158
|
+
run: run2,
|
|
153082
153159
|
onLoadEventData: handleLoadEventData,
|
|
153083
153160
|
hasMoreEvents: hasMoreEventsTab,
|
|
153084
153161
|
isLoadingMoreEvents: loadingMoreEventsTab,
|
|
@@ -153267,8 +153344,8 @@ async function action({
|
|
|
153267
153344
|
const contentType = request2.headers.get("content-type") || "";
|
|
153268
153345
|
try {
|
|
153269
153346
|
if (contentType.includes("application/cbor")) {
|
|
153270
|
-
const
|
|
153271
|
-
body2 = decode(new Uint8Array(
|
|
153347
|
+
const buffer2 = await request2.arrayBuffer();
|
|
153348
|
+
body2 = decode(new Uint8Array(buffer2));
|
|
153272
153349
|
} else {
|
|
153273
153350
|
body2 = await request2.json();
|
|
153274
153351
|
}
|
|
@@ -153385,7 +153462,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
153385
153462
|
__proto__: null,
|
|
153386
153463
|
loader
|
|
153387
153464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
153388
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-DOJDY_4b.js", "imports": ["/assets/index-BXZSIDEp.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-
|
|
153465
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-DOJDY_4b.js", "imports": ["/assets/index-BXZSIDEp.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-C5RLIKj5.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/mermaid-3ZIDBTTL-BDM4-x6u.js"], "css": ["/assets/root-Bqr5evzw.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-1yC3MOjQ.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-C8H50hkM.js", "/assets/mermaid-3ZIDBTTL-BDM4-x6u.js", "/assets/index-B6-SzLmT.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-DM1PDAnQ.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-C8H50hkM.js", "/assets/mermaid-3ZIDBTTL-BDM4-x6u.js", "/assets/encryption-g14N5vQl.js", "/assets/index-B6-SzLmT.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-9f37c22f.js", "version": "9f37c22f", "sri": void 0 };
|
|
153389
153466
|
const assetsBuildDirectory = "build/client";
|
|
153390
153467
|
const basename = "/";
|
|
153391
153468
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|