@workflow/world-testing 5.0.4 → 5.0.6
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.
|
@@ -446,7 +446,9 @@ var init_dist2 = __esm({
|
|
|
446
446
|
STEP_NOT_REGISTERED: "step-not-registered",
|
|
447
447
|
WORKFLOW_NOT_REGISTERED: "workflow-not-registered",
|
|
448
448
|
RUNTIME_DECRYPTION_FAILED: "runtime-decryption-failed",
|
|
449
|
-
DEPLOYMENT_MISMATCH: "deployment-mismatch"
|
|
449
|
+
DEPLOYMENT_MISMATCH: "deployment-mismatch",
|
|
450
|
+
MAX_EVENTS_EXCEEDED: "max-events-exceeded",
|
|
451
|
+
REPLAY_TIMEOUT: "replay-timeout"
|
|
450
452
|
};
|
|
451
453
|
WorkflowError = class extends Error {
|
|
452
454
|
static {
|
|
@@ -1621,10 +1623,10 @@ var init_encryption2 = __esm({
|
|
|
1621
1623
|
}
|
|
1622
1624
|
});
|
|
1623
1625
|
|
|
1624
|
-
// ../../node_modules/.pnpm/devalue@
|
|
1626
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/constants.js
|
|
1625
1627
|
var UNDEFINED, HOLE, NAN, POSITIVE_INFINITY, NEGATIVE_INFINITY, NEGATIVE_ZERO, SPARSE, MAX_ARRAY_LEN, MAX_ARRAY_INDEX;
|
|
1626
1628
|
var init_constants = __esm({
|
|
1627
|
-
"../../node_modules/.pnpm/devalue@
|
|
1629
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/constants.js"() {
|
|
1628
1630
|
"use strict";
|
|
1629
1631
|
UNDEFINED = -1;
|
|
1630
1632
|
HOLE = -2;
|
|
@@ -1638,7 +1640,21 @@ var init_constants = __esm({
|
|
|
1638
1640
|
}
|
|
1639
1641
|
});
|
|
1640
1642
|
|
|
1641
|
-
// ../../node_modules/.pnpm/devalue@
|
|
1643
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/utils.js
|
|
1644
|
+
function format_path(keys, format_map_key) {
|
|
1645
|
+
const path = [];
|
|
1646
|
+
for (let i2 = 0; i2 < keys.length; i2 += 1) {
|
|
1647
|
+
const segment = keys[i2];
|
|
1648
|
+
if (segment === MAP_KEY) {
|
|
1649
|
+
path.push(`.get(${format_map_key(keys[++i2])})`);
|
|
1650
|
+
} else if (typeof segment === "number") {
|
|
1651
|
+
path.push(`[${segment}]`);
|
|
1652
|
+
} else {
|
|
1653
|
+
path.push(stringify_key(segment));
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
return path;
|
|
1657
|
+
}
|
|
1642
1658
|
function is_plain_object(thing) {
|
|
1643
1659
|
const proto = Object.getPrototypeOf(thing);
|
|
1644
1660
|
return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
|
|
@@ -1646,48 +1662,29 @@ function is_plain_object(thing) {
|
|
|
1646
1662
|
function get_type(thing) {
|
|
1647
1663
|
return Object.prototype.toString.call(thing).slice(8, -1);
|
|
1648
1664
|
}
|
|
1649
|
-
function
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
return "\\u003C";
|
|
1655
|
-
case "\\":
|
|
1656
|
-
return "\\\\";
|
|
1657
|
-
case "\n":
|
|
1658
|
-
return "\\n";
|
|
1659
|
-
case "\r":
|
|
1660
|
-
return "\\r";
|
|
1661
|
-
case " ":
|
|
1662
|
-
return "\\t";
|
|
1663
|
-
case "\b":
|
|
1664
|
-
return "\\b";
|
|
1665
|
-
case "\f":
|
|
1666
|
-
return "\\f";
|
|
1667
|
-
case "\u2028":
|
|
1668
|
-
return "\\u2028";
|
|
1669
|
-
case "\u2029":
|
|
1670
|
-
return "\\u2029";
|
|
1671
|
-
default:
|
|
1672
|
-
return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
|
|
1673
|
-
}
|
|
1665
|
+
function is_buffer(thing) {
|
|
1666
|
+
return typeof Buffer !== "undefined" && Buffer.isBuffer(thing);
|
|
1667
|
+
}
|
|
1668
|
+
function escape_raw(char) {
|
|
1669
|
+
return raw_escapes[char];
|
|
1674
1670
|
}
|
|
1675
1671
|
function stringify_string(str) {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1672
|
+
if (!needs_escape.test(str) && str.isWellFormed()) return `"${str}"`;
|
|
1673
|
+
return JSON.stringify(str).replace(json_leaves_raw, escape_raw);
|
|
1674
|
+
}
|
|
1675
|
+
function quote_key(key) {
|
|
1676
|
+
if (key.length > MAX_CACHED_KEY_LENGTH) return stringify_string(key);
|
|
1677
|
+
let quoted = quoted_keys.get(key);
|
|
1678
|
+
if (quoted === void 0) {
|
|
1679
|
+
if (quoted_keys.size >= 1024) quoted_keys.clear();
|
|
1680
|
+
quoted = stringify_string(key);
|
|
1681
|
+
quoted_keys.set(key, quoted);
|
|
1686
1682
|
}
|
|
1687
|
-
return
|
|
1683
|
+
return quoted;
|
|
1688
1684
|
}
|
|
1689
1685
|
function enumerable_symbols(object2) {
|
|
1690
|
-
|
|
1686
|
+
const symbols = Object.getOwnPropertySymbols(object2);
|
|
1687
|
+
return symbols.length === 0 ? symbols : symbols.filter((symbol2) => Object.getOwnPropertyDescriptor(object2, symbol2)?.enumerable);
|
|
1691
1688
|
}
|
|
1692
1689
|
function stringify_key(key) {
|
|
1693
1690
|
return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
|
|
@@ -1726,9 +1723,9 @@ function valid_array_indices(array2) {
|
|
|
1726
1723
|
keys.length = array_index_cut(keys);
|
|
1727
1724
|
return keys;
|
|
1728
1725
|
}
|
|
1729
|
-
var DevalueError, object_proto_names, is_identifier;
|
|
1726
|
+
var DevalueError, MAP_KEY, object_proto_names, needs_escape, json_leaves_raw, raw_escapes, MAX_CACHED_KEY_LENGTH, quoted_keys, is_identifier;
|
|
1730
1727
|
var init_utils = __esm({
|
|
1731
|
-
"../../node_modules/.pnpm/devalue@
|
|
1728
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/utils.js"() {
|
|
1732
1729
|
"use strict";
|
|
1733
1730
|
init_constants();
|
|
1734
1731
|
DevalueError = class extends Error {
|
|
@@ -1749,11 +1746,24 @@ var init_utils = __esm({
|
|
|
1749
1746
|
this.root = root;
|
|
1750
1747
|
}
|
|
1751
1748
|
};
|
|
1749
|
+
MAP_KEY = /* @__PURE__ */ Symbol();
|
|
1750
|
+
__name(format_path, "format_path");
|
|
1752
1751
|
object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1753
1752
|
__name(is_plain_object, "is_plain_object");
|
|
1754
1753
|
__name(get_type, "get_type");
|
|
1755
|
-
__name(
|
|
1754
|
+
__name(is_buffer, "is_buffer");
|
|
1755
|
+
needs_escape = /["<\\\u0000-\u001f\u2028\u2029]/;
|
|
1756
|
+
json_leaves_raw = /[<\u2028\u2029]/g;
|
|
1757
|
+
raw_escapes = {
|
|
1758
|
+
"<": "\\u003C",
|
|
1759
|
+
"\u2028": "\\u2028",
|
|
1760
|
+
"\u2029": "\\u2029"
|
|
1761
|
+
};
|
|
1762
|
+
__name(escape_raw, "escape_raw");
|
|
1756
1763
|
__name(stringify_string, "stringify_string");
|
|
1764
|
+
MAX_CACHED_KEY_LENGTH = 64;
|
|
1765
|
+
quoted_keys = /* @__PURE__ */ new Map();
|
|
1766
|
+
__name(quote_key, "quote_key");
|
|
1757
1767
|
__name(enumerable_symbols, "enumerable_symbols");
|
|
1758
1768
|
is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
1759
1769
|
__name(stringify_key, "stringify_key");
|
|
@@ -1765,7 +1775,7 @@ var init_utils = __esm({
|
|
|
1765
1775
|
}
|
|
1766
1776
|
});
|
|
1767
1777
|
|
|
1768
|
-
// ../../node_modules/.pnpm/devalue@
|
|
1778
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/base64.js
|
|
1769
1779
|
function encode_native(array_buffer) {
|
|
1770
1780
|
return new Uint8Array(array_buffer).toBase64();
|
|
1771
1781
|
}
|
|
@@ -1784,7 +1794,11 @@ function encode_legacy(array_buffer) {
|
|
|
1784
1794
|
const chunk_size = 32768;
|
|
1785
1795
|
for (let i2 = 0; i2 < array2.length; i2 += chunk_size) {
|
|
1786
1796
|
const chunk = array2.subarray(i2, i2 + chunk_size);
|
|
1787
|
-
binary += String.fromCharCode.apply(
|
|
1797
|
+
binary += String.fromCharCode.apply(
|
|
1798
|
+
null,
|
|
1799
|
+
/** @type {unknown} */
|
|
1800
|
+
chunk
|
|
1801
|
+
);
|
|
1788
1802
|
}
|
|
1789
1803
|
return btoa(binary);
|
|
1790
1804
|
}
|
|
@@ -1799,7 +1813,7 @@ function decode_legacy(base643) {
|
|
|
1799
1813
|
}
|
|
1800
1814
|
var native, buffer, encode64, decode64;
|
|
1801
1815
|
var init_base64 = __esm({
|
|
1802
|
-
"../../node_modules/.pnpm/devalue@
|
|
1816
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/base64.js"() {
|
|
1803
1817
|
"use strict";
|
|
1804
1818
|
__name(encode_native, "encode_native");
|
|
1805
1819
|
__name(decode_native, "decode_native");
|
|
@@ -1814,7 +1828,7 @@ var init_base64 = __esm({
|
|
|
1814
1828
|
}
|
|
1815
1829
|
});
|
|
1816
1830
|
|
|
1817
|
-
// ../../node_modules/.pnpm/devalue@
|
|
1831
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/operations.js
|
|
1818
1832
|
function merge_operations(defaults, overrides) {
|
|
1819
1833
|
if (!overrides) return defaults;
|
|
1820
1834
|
const merged = (
|
|
@@ -1826,17 +1840,17 @@ function merge_operations(defaults, overrides) {
|
|
|
1826
1840
|
}
|
|
1827
1841
|
return merged;
|
|
1828
1842
|
}
|
|
1829
|
-
var NOT_PLAIN, SYMBOL_KEYS, stringify_operations, default_stringify_operations, parse_operations, default_parse_operations;
|
|
1843
|
+
var NOT_PLAIN, SYMBOL_KEYS, stringify_operations, default_stringify_operations, array_buffer_byte_length, shared_array_buffer_byte_length, parse_operations, default_parse_operations;
|
|
1830
1844
|
var init_operations = __esm({
|
|
1831
|
-
"../../node_modules/.pnpm/devalue@
|
|
1845
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/operations.js"() {
|
|
1832
1846
|
"use strict";
|
|
1833
1847
|
init_constants();
|
|
1834
1848
|
init_utils();
|
|
1835
1849
|
__name(merge_operations, "merge_operations");
|
|
1836
|
-
NOT_PLAIN = Object.freeze({
|
|
1850
|
+
NOT_PLAIN = /* @__PURE__ */ Object.freeze({
|
|
1837
1851
|
kind: "not-plain"
|
|
1838
1852
|
});
|
|
1839
|
-
SYMBOL_KEYS = Object.freeze({
|
|
1853
|
+
SYMBOL_KEYS = /* @__PURE__ */ Object.freeze({
|
|
1840
1854
|
kind: "symbol-keys"
|
|
1841
1855
|
});
|
|
1842
1856
|
stringify_operations = {
|
|
@@ -1855,13 +1869,16 @@ var init_operations = __esm({
|
|
|
1855
1869
|
}), "regExpInfo"),
|
|
1856
1870
|
valuesOf: /* @__PURE__ */ __name((set2) => set2, "valuesOf"),
|
|
1857
1871
|
entriesOf: /* @__PURE__ */ __name((map2) => map2, "entriesOf"),
|
|
1858
|
-
viewInfo: /* @__PURE__ */ __name((view) =>
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1872
|
+
viewInfo: /* @__PURE__ */ __name((view) => {
|
|
1873
|
+
if (is_buffer(view)) view = new Uint8Array(view);
|
|
1874
|
+
return {
|
|
1875
|
+
buffer: view.buffer,
|
|
1876
|
+
byteOffset: view.byteOffset,
|
|
1877
|
+
byteLength: view.byteLength,
|
|
1878
|
+
length: view.length,
|
|
1879
|
+
bufferByteLength: view.buffer.byteLength
|
|
1880
|
+
};
|
|
1881
|
+
}, "viewInfo"),
|
|
1865
1882
|
toArrayBuffer: /* @__PURE__ */ __name((buffer2) => buffer2, "toArrayBuffer"),
|
|
1866
1883
|
lengthOf: /* @__PURE__ */ __name((array2) => array2.length, "lengthOf"),
|
|
1867
1884
|
hasOwn: /* @__PURE__ */ __name((value, key) => Object.hasOwn(value, key), "hasOwn"),
|
|
@@ -1876,7 +1893,10 @@ var init_operations = __esm({
|
|
|
1876
1893
|
}, "shapeOf"),
|
|
1877
1894
|
get: /* @__PURE__ */ __name((value, key) => value[key], "get")
|
|
1878
1895
|
};
|
|
1879
|
-
default_stringify_operations = Object.freeze(stringify_operations);
|
|
1896
|
+
default_stringify_operations = /* @__PURE__ */ Object.freeze(stringify_operations);
|
|
1897
|
+
array_buffer_byte_length = /** @type {() => number} */
|
|
1898
|
+
Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength")?.get;
|
|
1899
|
+
shared_array_buffer_byte_length = typeof SharedArrayBuffer === "undefined" ? void 0 : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, "byteLength")?.get;
|
|
1880
1900
|
parse_operations = {
|
|
1881
1901
|
fromPrimitive: /* @__PURE__ */ __name((primitive) => primitive, "fromPrimitive"),
|
|
1882
1902
|
fromISOString: /* @__PURE__ */ __name((iso) => new Date(iso), "fromISOString"),
|
|
@@ -1888,6 +1908,12 @@ var init_operations = __esm({
|
|
|
1888
1908
|
fromArrayBuffer: /* @__PURE__ */ __name((buffer2) => buffer2, "fromArrayBuffer"),
|
|
1889
1909
|
fromRegExpInfo: /* @__PURE__ */ __name((source, flags) => new RegExp(source, flags), "fromRegExpInfo"),
|
|
1890
1910
|
fromViewInfo: /* @__PURE__ */ __name((tag, buffer2, byteOffset, length) => {
|
|
1911
|
+
try {
|
|
1912
|
+
array_buffer_byte_length.call(buffer2);
|
|
1913
|
+
} catch (error61) {
|
|
1914
|
+
if (!shared_array_buffer_byte_length) throw error61;
|
|
1915
|
+
shared_array_buffer_byte_length.call(buffer2);
|
|
1916
|
+
}
|
|
1891
1917
|
const Constructor = (
|
|
1892
1918
|
/** @type {any} */
|
|
1893
1919
|
globalThis[tag]
|
|
@@ -1917,11 +1943,14 @@ var init_operations = __esm({
|
|
|
1917
1943
|
map2.set(key, value);
|
|
1918
1944
|
}, "addEntry")
|
|
1919
1945
|
};
|
|
1920
|
-
default_parse_operations = Object.freeze(parse_operations);
|
|
1946
|
+
default_parse_operations = /* @__PURE__ */ Object.freeze(parse_operations);
|
|
1921
1947
|
}
|
|
1922
1948
|
});
|
|
1923
1949
|
|
|
1924
|
-
// ../../node_modules/.pnpm/devalue@
|
|
1950
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/parse.js
|
|
1951
|
+
function invalid() {
|
|
1952
|
+
throw new Error("Invalid input");
|
|
1953
|
+
}
|
|
1925
1954
|
function parse(serialized, revivers, options) {
|
|
1926
1955
|
return unflatten(JSON.parse(serialized), revivers, options);
|
|
1927
1956
|
}
|
|
@@ -1929,7 +1958,7 @@ function unflatten(parsed, revivers, options) {
|
|
|
1929
1958
|
const ops = merge_operations(default_parse_operations, options?.operations);
|
|
1930
1959
|
if (typeof parsed === "number") return hydrate(parsed, true);
|
|
1931
1960
|
if (!Array.isArray(parsed) || parsed.length === 0) {
|
|
1932
|
-
|
|
1961
|
+
invalid();
|
|
1933
1962
|
}
|
|
1934
1963
|
const values = (
|
|
1935
1964
|
/** @type {any[]} */
|
|
@@ -1937,6 +1966,13 @@ function unflatten(parsed, revivers, options) {
|
|
|
1937
1966
|
);
|
|
1938
1967
|
const hydrated = Array(values.length);
|
|
1939
1968
|
let hydrating = null;
|
|
1969
|
+
function get_raw(index) {
|
|
1970
|
+
if (!is_valid_array_index(index) || index >= values.length) {
|
|
1971
|
+
invalid();
|
|
1972
|
+
}
|
|
1973
|
+
return values[index];
|
|
1974
|
+
}
|
|
1975
|
+
__name(get_raw, "get_raw");
|
|
1940
1976
|
function hydrate(index, standalone = false) {
|
|
1941
1977
|
if (index === UNDEFINED) return ops.fromPrimitive(void 0);
|
|
1942
1978
|
if (index === NAN) return ops.fromPrimitive(NaN);
|
|
@@ -1944,11 +1980,11 @@ function unflatten(parsed, revivers, options) {
|
|
|
1944
1980
|
if (index === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);
|
|
1945
1981
|
if (index === NEGATIVE_ZERO) return ops.fromPrimitive(-0);
|
|
1946
1982
|
if (standalone || typeof index !== "number") {
|
|
1947
|
-
|
|
1983
|
+
invalid();
|
|
1948
1984
|
}
|
|
1949
1985
|
if (index in hydrated) return hydrated[index];
|
|
1950
1986
|
if (index >= values.length) {
|
|
1951
|
-
|
|
1987
|
+
invalid();
|
|
1952
1988
|
}
|
|
1953
1989
|
const value = values[index];
|
|
1954
1990
|
if (!value || typeof value !== "object") {
|
|
@@ -1997,8 +2033,13 @@ function unflatten(parsed, revivers, options) {
|
|
|
1997
2033
|
break;
|
|
1998
2034
|
case "Object": {
|
|
1999
2035
|
const wrapped_index = value[1];
|
|
2000
|
-
|
|
2001
|
-
|
|
2036
|
+
const is_boxable_sentinel = wrapped_index === NAN || wrapped_index === POSITIVE_INFINITY || wrapped_index === NEGATIVE_INFINITY || wrapped_index === NEGATIVE_ZERO;
|
|
2037
|
+
if (!is_boxable_sentinel) {
|
|
2038
|
+
const wrapped = get_raw(wrapped_index);
|
|
2039
|
+
const is_bigint = Array.isArray(wrapped) && wrapped[0] === "BigInt";
|
|
2040
|
+
if ((wrapped === void 0 || typeof wrapped === "object") && !is_bigint) {
|
|
2041
|
+
invalid();
|
|
2042
|
+
}
|
|
2002
2043
|
}
|
|
2003
2044
|
hydrated[index] = ops.box(hydrate(wrapped_index));
|
|
2004
2045
|
break;
|
|
@@ -2010,10 +2051,14 @@ function unflatten(parsed, revivers, options) {
|
|
|
2010
2051
|
const obj = ops.createNullPrototypeObject();
|
|
2011
2052
|
hydrated[index] = obj;
|
|
2012
2053
|
for (let i2 = 1; i2 < value.length; i2 += 2) {
|
|
2013
|
-
|
|
2054
|
+
const key = value[i2];
|
|
2055
|
+
if (typeof key !== "string") {
|
|
2056
|
+
throw new Error("Cannot parse an object with a non-string key");
|
|
2057
|
+
}
|
|
2058
|
+
if (key === "__proto__") {
|
|
2014
2059
|
throw new Error("Cannot parse an object with a `__proto__` property");
|
|
2015
2060
|
}
|
|
2016
|
-
ops.set(obj,
|
|
2061
|
+
ops.set(obj, key, hydrate(value[i2 + 1]));
|
|
2017
2062
|
}
|
|
2018
2063
|
break;
|
|
2019
2064
|
case "Int8Array":
|
|
@@ -2029,10 +2074,12 @@ function unflatten(parsed, revivers, options) {
|
|
|
2029
2074
|
case "BigInt64Array":
|
|
2030
2075
|
case "BigUint64Array":
|
|
2031
2076
|
case "DataView": {
|
|
2032
|
-
|
|
2033
|
-
|
|
2077
|
+
const buffer_index = value[1];
|
|
2078
|
+
const raw = get_raw(buffer_index);
|
|
2079
|
+
if (!Array.isArray(raw) || raw[0] !== "ArrayBuffer") {
|
|
2080
|
+
invalid();
|
|
2034
2081
|
}
|
|
2035
|
-
const buffer2 = hydrate(
|
|
2082
|
+
const buffer2 = hydrate(buffer_index);
|
|
2036
2083
|
hydrated[index] = ops.fromViewInfo(type, buffer2, value[2], value[3]);
|
|
2037
2084
|
break;
|
|
2038
2085
|
}
|
|
@@ -2063,14 +2110,14 @@ function unflatten(parsed, revivers, options) {
|
|
|
2063
2110
|
} else if (value[0] === SPARSE) {
|
|
2064
2111
|
const len = value[1];
|
|
2065
2112
|
if (!is_valid_array_len(len)) {
|
|
2066
|
-
|
|
2113
|
+
invalid();
|
|
2067
2114
|
}
|
|
2068
2115
|
const array2 = ops.createSparseArray(len);
|
|
2069
2116
|
hydrated[index] = array2;
|
|
2070
2117
|
for (let i2 = 2; i2 < value.length; i2 += 2) {
|
|
2071
2118
|
const idx = value[i2];
|
|
2072
2119
|
if (!is_valid_array_index(idx) || idx >= len) {
|
|
2073
|
-
|
|
2120
|
+
invalid();
|
|
2074
2121
|
}
|
|
2075
2122
|
ops.set(array2, idx, hydrate(value[i2 + 1]));
|
|
2076
2123
|
}
|
|
@@ -2099,18 +2146,19 @@ function unflatten(parsed, revivers, options) {
|
|
|
2099
2146
|
return hydrate(0);
|
|
2100
2147
|
}
|
|
2101
2148
|
var init_parse = __esm({
|
|
2102
|
-
"../../node_modules/.pnpm/devalue@
|
|
2149
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/parse.js"() {
|
|
2103
2150
|
"use strict";
|
|
2104
2151
|
init_base64();
|
|
2105
2152
|
init_constants();
|
|
2106
2153
|
init_operations();
|
|
2107
2154
|
init_utils();
|
|
2155
|
+
__name(invalid, "invalid");
|
|
2108
2156
|
__name(parse, "parse");
|
|
2109
2157
|
__name(unflatten, "unflatten");
|
|
2110
2158
|
}
|
|
2111
2159
|
});
|
|
2112
2160
|
|
|
2113
|
-
// ../../node_modules/.pnpm/devalue@
|
|
2161
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/stringify.js
|
|
2114
2162
|
function stringify(value, reducers, options) {
|
|
2115
2163
|
const stringified = run(false, value, reducers, options);
|
|
2116
2164
|
return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
|
|
@@ -2128,8 +2176,17 @@ function run(async, value, reducers, options) {
|
|
|
2128
2176
|
});
|
|
2129
2177
|
}
|
|
2130
2178
|
}
|
|
2131
|
-
|
|
2179
|
+
let keys = [];
|
|
2132
2180
|
let p = 0;
|
|
2181
|
+
function error61(message, thing) {
|
|
2182
|
+
const path = format_path(keys, (key) => {
|
|
2183
|
+
const key_type = ops.typeOf(key);
|
|
2184
|
+
const key_is_primitive = key_type !== "object" && key_type !== "function" && key_type !== "symbol";
|
|
2185
|
+
return key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : "...";
|
|
2186
|
+
});
|
|
2187
|
+
throw new DevalueError(message, path, thing, value);
|
|
2188
|
+
}
|
|
2189
|
+
__name(error61, "error");
|
|
2133
2190
|
function flatten(thing, index2) {
|
|
2134
2191
|
const type = ops.typeOf(thing);
|
|
2135
2192
|
if (type === "undefined") return UNDEFINED;
|
|
@@ -2157,21 +2214,25 @@ function run(async, value, reducers, options) {
|
|
|
2157
2214
|
}
|
|
2158
2215
|
}
|
|
2159
2216
|
if (type === "function") {
|
|
2160
|
-
|
|
2217
|
+
error61(`Cannot stringify a function`, thing);
|
|
2161
2218
|
} else if (type === "symbol") {
|
|
2162
|
-
|
|
2219
|
+
error61(`Cannot stringify a Symbol primitive`, thing);
|
|
2163
2220
|
}
|
|
2164
2221
|
let str = "";
|
|
2165
2222
|
if (type !== "object") {
|
|
2166
2223
|
str = stringify_primitive(type === "number" ? number4 : ops.toPrimitive(thing));
|
|
2167
2224
|
} else if (ops.isThenable(thing)) {
|
|
2168
2225
|
if (!async) {
|
|
2169
|
-
|
|
2226
|
+
error61(`Cannot stringify a Promise or thenable \u2014 use stringifyAsync instead`, thing);
|
|
2170
2227
|
}
|
|
2228
|
+
const prev_keys = keys.slice();
|
|
2171
2229
|
str = ops.toPromise(thing).then((value2) => {
|
|
2230
|
+
keys = prev_keys;
|
|
2172
2231
|
const i2 = flatten(value2, index2);
|
|
2173
2232
|
if (i2 < 0) stringified[index2] = i2;
|
|
2174
2233
|
});
|
|
2234
|
+
str.catch(() => {
|
|
2235
|
+
});
|
|
2175
2236
|
} else {
|
|
2176
2237
|
const tag = ops.tagOf(thing);
|
|
2177
2238
|
switch (tag) {
|
|
@@ -2201,7 +2262,7 @@ function run(async, value, reducers, options) {
|
|
|
2201
2262
|
for (let i2 = 0; i2 < length; i2 += 1) {
|
|
2202
2263
|
if (i2 > 0) str += ",";
|
|
2203
2264
|
if (ops.hasOwn(thing, i2)) {
|
|
2204
|
-
keys.push(
|
|
2265
|
+
keys.push(i2);
|
|
2205
2266
|
str += flatten(ops.get(thing, i2));
|
|
2206
2267
|
keys.pop();
|
|
2207
2268
|
} else if (mostly_dense) {
|
|
@@ -2216,7 +2277,7 @@ function run(async, value, reducers, options) {
|
|
|
2216
2277
|
str = "[" + SPARSE + "," + length;
|
|
2217
2278
|
for (let j = 0; j < populated_keys.length; j++) {
|
|
2218
2279
|
const key = populated_keys[j];
|
|
2219
|
-
keys.push(
|
|
2280
|
+
keys.push(+key);
|
|
2220
2281
|
str += "," + key + "," + flatten(ops.get(thing, key));
|
|
2221
2282
|
keys.pop();
|
|
2222
2283
|
}
|
|
@@ -2240,11 +2301,10 @@ function run(async, value, reducers, options) {
|
|
|
2240
2301
|
case "Map":
|
|
2241
2302
|
str = '["Map"';
|
|
2242
2303
|
for (const [key, value2] of ops.entriesOf(thing)) {
|
|
2243
|
-
|
|
2244
|
-
const key_is_primitive = key_type !== "object" && key_type !== "function" && key_type !== "symbol";
|
|
2245
|
-
keys.push(`.get(${key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : "..."})`);
|
|
2304
|
+
keys.push(MAP_KEY, key);
|
|
2246
2305
|
str += `,${flatten(key)},${flatten(value2)}`;
|
|
2247
2306
|
keys.pop();
|
|
2307
|
+
keys.pop();
|
|
2248
2308
|
}
|
|
2249
2309
|
str += "]";
|
|
2250
2310
|
break;
|
|
@@ -2295,19 +2355,19 @@ function run(async, value, reducers, options) {
|
|
|
2295
2355
|
default: {
|
|
2296
2356
|
const shape = ops.shapeOf(thing);
|
|
2297
2357
|
if (shape.kind === "not-plain") {
|
|
2298
|
-
|
|
2358
|
+
error61(`Cannot stringify arbitrary non-POJOs`, thing);
|
|
2299
2359
|
}
|
|
2300
2360
|
if (shape.kind === "symbol-keys") {
|
|
2301
|
-
|
|
2361
|
+
error61(`Cannot stringify POJOs with symbolic keys`, thing);
|
|
2302
2362
|
}
|
|
2303
2363
|
if (shape.kind === "null-proto") {
|
|
2304
2364
|
str = '["null"';
|
|
2305
2365
|
for (const key of shape.keys) {
|
|
2306
2366
|
if (key === "__proto__") {
|
|
2307
|
-
|
|
2367
|
+
error61(`Cannot stringify objects with __proto__ keys`, thing);
|
|
2308
2368
|
}
|
|
2309
|
-
keys.push(
|
|
2310
|
-
str += `,${
|
|
2369
|
+
keys.push(key);
|
|
2370
|
+
str += `,${quote_key(key)},${flatten(ops.get(thing, key))}`;
|
|
2311
2371
|
keys.pop();
|
|
2312
2372
|
}
|
|
2313
2373
|
str += "]";
|
|
@@ -2316,12 +2376,12 @@ function run(async, value, reducers, options) {
|
|
|
2316
2376
|
let started = false;
|
|
2317
2377
|
for (const key of shape.keys) {
|
|
2318
2378
|
if (key === "__proto__") {
|
|
2319
|
-
|
|
2379
|
+
error61(`Cannot stringify objects with __proto__ keys`, thing);
|
|
2320
2380
|
}
|
|
2321
2381
|
if (started) str += ",";
|
|
2322
2382
|
started = true;
|
|
2323
|
-
keys.push(
|
|
2324
|
-
str += `${
|
|
2383
|
+
keys.push(key);
|
|
2384
|
+
str += `${quote_key(key)}:${flatten(ops.get(thing, key))}`;
|
|
2325
2385
|
keys.pop();
|
|
2326
2386
|
}
|
|
2327
2387
|
str += "}";
|
|
@@ -2346,7 +2406,7 @@ function stringify_primitive(thing) {
|
|
|
2346
2406
|
return String(thing);
|
|
2347
2407
|
}
|
|
2348
2408
|
var init_stringify = __esm({
|
|
2349
|
-
"../../node_modules/.pnpm/devalue@
|
|
2409
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/stringify.js"() {
|
|
2350
2410
|
"use strict";
|
|
2351
2411
|
init_utils();
|
|
2352
2412
|
init_constants();
|
|
@@ -2358,9 +2418,9 @@ var init_stringify = __esm({
|
|
|
2358
2418
|
}
|
|
2359
2419
|
});
|
|
2360
2420
|
|
|
2361
|
-
// ../../node_modules/.pnpm/devalue@
|
|
2362
|
-
var
|
|
2363
|
-
"../../node_modules/.pnpm/devalue@
|
|
2421
|
+
// ../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/index.js
|
|
2422
|
+
var init_src = __esm({
|
|
2423
|
+
"../../node_modules/.pnpm/devalue@6.0.3/node_modules/devalue/src/index.js"() {
|
|
2364
2424
|
"use strict";
|
|
2365
2425
|
init_parse();
|
|
2366
2426
|
init_stringify();
|
|
@@ -25915,6 +25975,19 @@ var init_queue = __esm({
|
|
|
25915
25975
|
* probe response. That lets the caller seal the workflow arguments without
|
|
25916
25976
|
* a separate key lookup. Absent for probes issued for other reasons (CLI
|
|
25917
25977
|
* health command, dashboard), in which case no key is returned.
|
|
25978
|
+
*
|
|
25979
|
+
* Deliberately not named `runId`: `runId` is the only required field of
|
|
25980
|
+
* `WorkflowInvokePayloadSchema`, and 4.x deployments parse queue payloads
|
|
25981
|
+
* with a union that tries the invoke schema before the health check. A
|
|
25982
|
+
* probe carrying `runId` is read there as "replay this run", which POSTs
|
|
25983
|
+
* `run_started` for a run that does not exist yet (404) and retries the
|
|
25984
|
+
* delivery, so the probe never answers.
|
|
25985
|
+
*/
|
|
25986
|
+
probeRunId: external_exports.string().optional(),
|
|
25987
|
+
/**
|
|
25988
|
+
* Legacy spelling of {@link probeRunId}, sent by 5.x callers released
|
|
25989
|
+
* before the rename. Accepted so those callers still get a public key
|
|
25990
|
+
* back from this deployment; never sent.
|
|
25918
25991
|
*/
|
|
25919
25992
|
runId: external_exports.string().optional()
|
|
25920
25993
|
}));
|
|
@@ -26460,7 +26533,7 @@ var init_hardened = __esm({
|
|
|
26460
26533
|
"../core/dist/serialization/hardened.js"() {
|
|
26461
26534
|
"use strict";
|
|
26462
26535
|
init_dist();
|
|
26463
|
-
|
|
26536
|
+
init_src();
|
|
26464
26537
|
GUEST_CODE_EXECUTION_SAMPLE_LIMIT = 5;
|
|
26465
26538
|
activeStats = null;
|
|
26466
26539
|
reportedProxies = null;
|
|
@@ -27266,7 +27339,7 @@ var encoder, decoder, MAX_SPARSE_ARRAY_LENGTH, parseOptions, devalueCodec;
|
|
|
27266
27339
|
var init_codec_devalue = __esm({
|
|
27267
27340
|
"../core/dist/serialization/codec-devalue.js"() {
|
|
27268
27341
|
"use strict";
|
|
27269
|
-
|
|
27342
|
+
init_src();
|
|
27270
27343
|
init_hardened();
|
|
27271
27344
|
init_class();
|
|
27272
27345
|
init_common();
|
|
@@ -27795,7 +27868,7 @@ function SemanticConvention(...names) {
|
|
|
27795
27868
|
value
|
|
27796
27869
|
]));
|
|
27797
27870
|
}
|
|
27798
|
-
var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowExecutionMode, WorkflowDynamic, WorkflowDynamicSourceHash, WorkflowDynamicCodeBytes, WorkflowDynamicCodeStorage, WorkflowBundleCompileCacheHit, WorkflowReplayLoadSource, WorkflowParkedEventsCount, WorkflowParkedEventId, WorkflowParkedEventType, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowVm, QuickJSOutcome, QuickJSEventsPreloaded, QuickJSEventsFetchedCount, QuickJSEventsFetchedPages, QuickJSPendingOpsCount, QuickJSInlineSteps, QuickJSSnapshotRestored, QuickJSSnapshotDeltaEvents, QuickJSSnapshotRestoreMs, QuickJSSnapshotFallbackReason, QuickJSSnapshotSaveMs, QuickJSSnapshotPlaintextBytes, QuickJSSnapshotStoredBytes, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowStepsFailedSerialization, WorkflowOwnedRecoverySteps, WorkflowBackstopWakesArmed, WorkflowDispatchRepublishSkipped, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, FaasInstance, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepTtfsMs, StepStsoMs, StepRsfsMs, StepFinalSchedulingReplayMs, StepLatencyOptimizations, StepStartStrategy, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, MessagingBatchMessageCount, QueueOverheadMs, DeploymentId, WorkflowRunPinnedDeploymentId, WorkflowDeploymentMismatchRetryCount, WorkflowDeploymentMismatchRecovered, WorkflowRunSpecVersion, WorkflowRunSpecVersionSource, WorkflowCapabilityProbeLatencyMs, WorkflowCapabilityProbeCached, WorkflowCapabilityProbeError, HookToken, HookId, HookFound, HookResilientResume, HookResumeCommitted, HookWakePublished, HookResilientResumeMaterialized, HookResumeSetupSource,
|
|
27871
|
+
var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowExecutionMode, WorkflowDynamic, WorkflowDynamicSourceHash, WorkflowDynamicCodeBytes, WorkflowDynamicCodeStorage, WorkflowBundleCompileCacheHit, WorkflowReplayLoadSource, WorkflowParkedEventsCount, WorkflowParkedEventId, WorkflowParkedEventType, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowVm, QuickJSOutcome, QuickJSEventsPreloaded, QuickJSEventsFetchedCount, QuickJSEventsFetchedPages, QuickJSPendingOpsCount, QuickJSInlineSteps, QuickJSSnapshotRestored, QuickJSSnapshotDeltaEvents, QuickJSSnapshotRestoreMs, QuickJSSnapshotFallbackReason, QuickJSSnapshotSaveMs, QuickJSSnapshotPlaintextBytes, QuickJSSnapshotStoredBytes, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowStepsFailedSerialization, WorkflowOwnedRecoverySteps, WorkflowBackstopWakesArmed, WorkflowDispatchRepublishSkipped, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, FaasInstance, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepTtfsMs, StepStsoMs, StepRsfsMs, StepFinalSchedulingReplayMs, StepLatencyOptimizations, StepStartStrategy, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, MessagingBatchMessageCount, QueueOverheadMs, DeploymentId, WorkflowRunPinnedDeploymentId, WorkflowDeploymentMismatchRetryCount, WorkflowDeploymentMismatchRecovered, WorkflowRunSpecVersion, WorkflowRunSpecVersionSource, WorkflowCapabilityProbeLatencyMs, WorkflowCapabilityProbeCached, WorkflowCapabilityProbeError, HookToken, HookId, HookFound, HookResilientResume, HookResumeCommitted, HookWakePublished, HookResilientResumeMaterialized, HookResumeSetupSource, StepDispatchPrologue, ResumeTotalMs, ResumeProducerPrepMs, ResumeQueueDeliveryMs, ResumeSetupMs, ResumeReplayMs, ResumeStepDispatchMs, ResumeStepClaimMs, ResumeStepPrepareMs, ResumeTrigger, ResumeStrategy, ResumeSetupSource, ResumeStepExecution, WebhookHandlersTriggered, WorkflowSuspensionState, WorkflowSuspensionHookCount, WorkflowSuspensionStepCount, WorkflowSuspensionWaitCount, HttpRequestMethod, HttpRoute, UrlFull, ServerAddress, ServerPort, HttpResponseStatusCode, ErrorType, WorldParseFormat, WorkflowEventsPagesLoaded, QueueDeserializeTimeMs, QueueExecutionTimeMs, QueueSerializeTimeMs, SerializationOperation, SerializationCompressed, SerializationCodec, SerializationUncompressedBytes, SerializationStoredBytes, SerializationCompressionRatio, SerializationGuestCodeExecutions, SerializationGuestCodeDetails, PeerService, RpcSystem, RpcService, RpcMethod, ErrorRetryable, ErrorCategory;
|
|
27799
27872
|
var init_semantic_conventions = __esm({
|
|
27800
27873
|
"../core/dist/telemetry/semantic-conventions.js"() {
|
|
27801
27874
|
"use strict";
|
|
@@ -27896,8 +27969,6 @@ var init_semantic_conventions = __esm({
|
|
|
27896
27969
|
HookWakePublished = SemanticConvention("workflow.hook.wake_published");
|
|
27897
27970
|
HookResilientResumeMaterialized = SemanticConvention("workflow.hook.resilient_resume_materialized");
|
|
27898
27971
|
HookResumeSetupSource = SemanticConvention("workflow.resume_setup_source");
|
|
27899
|
-
StepResilientDispatchRecovered = SemanticConvention("workflow.step.resilient_dispatch_recovered");
|
|
27900
|
-
StepResilientDispatchMaterialized = SemanticConvention("workflow.step.resilient_dispatch_materialized");
|
|
27901
27972
|
StepDispatchPrologue = SemanticConvention("workflow.step.dispatch_prologue");
|
|
27902
27973
|
ResumeTotalMs = SemanticConvention("workflow.resume.total_ms");
|
|
27903
27974
|
ResumeProducerPrepMs = SemanticConvention("workflow.resume.phase.producer_prep_ms");
|
|
@@ -30284,7 +30355,7 @@ var init_errors3 = __esm({
|
|
|
30284
30355
|
"../core/dist/serialization/errors.js"() {
|
|
30285
30356
|
"use strict";
|
|
30286
30357
|
init_dist2();
|
|
30287
|
-
|
|
30358
|
+
init_src();
|
|
30288
30359
|
init_logger();
|
|
30289
30360
|
__name(rethrowIfRuntimeError, "rethrowIfRuntimeError");
|
|
30290
30361
|
__name(formatSerializationError, "formatSerializationError");
|
|
@@ -32597,7 +32668,7 @@ var version2;
|
|
|
32597
32668
|
var init_version = __esm({
|
|
32598
32669
|
"../core/dist/version.js"() {
|
|
32599
32670
|
"use strict";
|
|
32600
|
-
version2 = "5.2.
|
|
32671
|
+
version2 = "5.2.3";
|
|
32601
32672
|
}
|
|
32602
32673
|
});
|
|
32603
32674
|
|
|
@@ -32607,7 +32678,7 @@ function isDynamicWorkflowsEnabled() {
|
|
|
32607
32678
|
if (raw === void 0) return false;
|
|
32608
32679
|
return raw === "1" || raw.toLowerCase() === "true";
|
|
32609
32680
|
}
|
|
32610
|
-
var warned,
|
|
32681
|
+
var warned, DYNAMIC_WORKFLOWS_ENV;
|
|
32611
32682
|
var init_constants2 = __esm({
|
|
32612
32683
|
"../core/dist/runtime/constants.js"() {
|
|
32613
32684
|
"use strict";
|
|
@@ -32619,7 +32690,6 @@ var init_constants2 = __esm({
|
|
|
32619
32690
|
maxInlineStepsValues: /* @__PURE__ */ new Set(),
|
|
32620
32691
|
maxEventsValues: /* @__PURE__ */ new Set()
|
|
32621
32692
|
}));
|
|
32622
|
-
MAX_RESILIENT_STEP_INPUT_BYTES = 128 * 1024;
|
|
32623
32693
|
DYNAMIC_WORKFLOWS_ENV = "WORKFLOW_EXPERIMENTAL_DYNAMIC_WORKFLOWS";
|
|
32624
32694
|
__name(isDynamicWorkflowsEnabled, "isDynamicWorkflowsEnabled");
|
|
32625
32695
|
}
|
|
@@ -32733,8 +32803,11 @@ async function healthCheck(world, options) {
|
|
|
32733
32803
|
await world.queue(queueName, {
|
|
32734
32804
|
__healthCheck: true,
|
|
32735
32805
|
correlationId,
|
|
32806
|
+
// Sent as `probeRunId`, never `runId`: a 4.x responder would parse a
|
|
32807
|
+
// `runId`-bearing probe as a run invocation (see
|
|
32808
|
+
// `HealthCheckPayloadSchema`).
|
|
32736
32809
|
...options?.runId ? {
|
|
32737
|
-
|
|
32810
|
+
probeRunId: options.runId
|
|
32738
32811
|
} : {}
|
|
32739
32812
|
}, {
|
|
32740
32813
|
// Use JSON transport so the health check works against both
|
|
@@ -37891,7 +37964,9 @@ async function resolveHookResumeInfo(hook) {
|
|
|
37891
37964
|
source: "hook"
|
|
37892
37965
|
};
|
|
37893
37966
|
}
|
|
37894
|
-
const run2 = await (await getWorldLazy()).runs.get(hook.runId
|
|
37967
|
+
const run2 = await (await getWorldLazy()).runs.get(hook.runId, {
|
|
37968
|
+
resolveData: "none"
|
|
37969
|
+
});
|
|
37895
37970
|
return {
|
|
37896
37971
|
resumeContext: resumeContextFromRun(run2),
|
|
37897
37972
|
source: "run_fallback",
|
|
@@ -37900,7 +37975,7 @@ async function resolveHookResumeInfo(hook) {
|
|
|
37900
37975
|
}
|
|
37901
37976
|
async function resolveHookEncryptionKey(hook, info) {
|
|
37902
37977
|
const world = await getWorldLazy();
|
|
37903
|
-
const rawKey =
|
|
37978
|
+
const rawKey = await world.getEncryptionKeyForRun?.(hook.runId, {
|
|
37904
37979
|
deploymentId: info.resumeContext.deploymentId
|
|
37905
37980
|
});
|
|
37906
37981
|
return rawKey ? await importKey(rawKey) : void 0;
|
|
@@ -37916,7 +37991,7 @@ function withLazyMetadata(raw) {
|
|
|
37916
37991
|
const hydrate = /* @__PURE__ */ __name(async () => {
|
|
37917
37992
|
const world = await getWorldLazy();
|
|
37918
37993
|
const info = await resolveHookResumeInfo(raw);
|
|
37919
|
-
const rawKey =
|
|
37994
|
+
const rawKey = await world.getEncryptionKeyForRun?.(raw.runId, {
|
|
37920
37995
|
deploymentId: info.resumeContext.deploymentId
|
|
37921
37996
|
});
|
|
37922
37997
|
encryptionKey = rawKey ? await deriveRunPayloadKeys(rawKey) : void 0;
|
|
@@ -39259,9 +39334,12 @@ async function getForwardedWritableEncryptionKey(runId, deploymentId, encryption
|
|
|
39259
39334
|
if (ownerPublicKey) return sealTo(ownerPublicKey);
|
|
39260
39335
|
const world = await getWorldLazy();
|
|
39261
39336
|
if (!world.getEncryptionKeyForRun) return void 0;
|
|
39262
|
-
const
|
|
39263
|
-
|
|
39264
|
-
})
|
|
39337
|
+
const ownerDeploymentId = deploymentId ?? (await world.runs.get(runId, {
|
|
39338
|
+
resolveData: "none"
|
|
39339
|
+
})).deploymentId;
|
|
39340
|
+
const rawKey = await world.getEncryptionKeyForRun(runId, {
|
|
39341
|
+
deploymentId: ownerDeploymentId
|
|
39342
|
+
});
|
|
39265
39343
|
return rawKey ? await importKey(rawKey, [
|
|
39266
39344
|
"encrypt"
|
|
39267
39345
|
]) : void 0;
|
|
@@ -39798,7 +39876,7 @@ var init_serialization2 = __esm({
|
|
|
39798
39876
|
init_dist2();
|
|
39799
39877
|
init_dist();
|
|
39800
39878
|
init_env_config();
|
|
39801
|
-
|
|
39879
|
+
init_src();
|
|
39802
39880
|
init_node();
|
|
39803
39881
|
init_encryption();
|
|
39804
39882
|
init_flushable_stream();
|
|
@@ -47314,6 +47392,7 @@ function getWorkflowVmFromEnv(env = process.env) {
|
|
|
47314
47392
|
throw new WorkflowRuntimeError(`Invalid WORKFLOW_VM value: "${raw}". Expected one of: ${WORKFLOW_VMS.join(", ")}.`);
|
|
47315
47393
|
}
|
|
47316
47394
|
__name(getWorkflowVmFromEnv, "getWorkflowVmFromEnv");
|
|
47395
|
+
var DEFAULT_QUICKJS_SNAPSHOT_THRESHOLD = 1e3;
|
|
47317
47396
|
function getSnapshotThresholdFromEnv(env = process.env) {
|
|
47318
47397
|
const raw = env.WORKFLOW_SNAPSHOT_THRESHOLD;
|
|
47319
47398
|
if (raw === void 0 || raw === "") return void 0;
|
|
@@ -47324,6 +47403,12 @@ function getSnapshotThresholdFromEnv(env = process.env) {
|
|
|
47324
47403
|
return parsed;
|
|
47325
47404
|
}
|
|
47326
47405
|
__name(getSnapshotThresholdFromEnv, "getSnapshotThresholdFromEnv");
|
|
47406
|
+
function getSnapshotThresholdForStart(workflowVm, env = process.env) {
|
|
47407
|
+
const fromEnv = getSnapshotThresholdFromEnv(env);
|
|
47408
|
+
if (fromEnv !== void 0) return fromEnv;
|
|
47409
|
+
return workflowVm === "quickjs" ? DEFAULT_QUICKJS_SNAPSHOT_THRESHOLD : void 0;
|
|
47410
|
+
}
|
|
47411
|
+
__name(getSnapshotThresholdForStart, "getSnapshotThresholdForStart");
|
|
47327
47412
|
|
|
47328
47413
|
// ../core/dist/runtime/start.js
|
|
47329
47414
|
init_wait_until();
|
|
@@ -47624,7 +47709,7 @@ async function start(workflow, argsOrOptions, options) {
|
|
|
47624
47709
|
encryptionPublicKey = rawKey ? bytesToBase64((await deriveRunKeyPair(rawKey)).publicKey) : void 0;
|
|
47625
47710
|
}
|
|
47626
47711
|
const workflowVm = getWorkflowVmFromEnv();
|
|
47627
|
-
const snapshotThreshold =
|
|
47712
|
+
const snapshotThreshold = getSnapshotThresholdForStart(workflowVm);
|
|
47628
47713
|
const queueNamespace = resolveQueueNamespace(opts.namespace);
|
|
47629
47714
|
const executionContext = {
|
|
47630
47715
|
traceCarrier,
|
|
@@ -47797,7 +47882,7 @@ __name(start, "start");
|
|
|
47797
47882
|
value: "start",
|
|
47798
47883
|
configurable: true
|
|
47799
47884
|
});
|
|
47800
|
-
})(start, "step//@workflow/core/runtime/start@5.2.
|
|
47885
|
+
})(start, "step//@workflow/core/runtime/start@5.2.3//start");
|
|
47801
47886
|
|
|
47802
47887
|
// ../core/dist/runtime/runs.js
|
|
47803
47888
|
async function wakeUpRun(world, runId, options) {
|
|
@@ -47978,8 +48063,18 @@ var Run = class _Run {
|
|
|
47978
48063
|
if (!this.#encryptionKeyPromise) {
|
|
47979
48064
|
this.#encryptionKeyPromise = (async () => {
|
|
47980
48065
|
const world = await this.#lazyWorldPromise;
|
|
47981
|
-
|
|
47982
|
-
|
|
48066
|
+
if (!world.getEncryptionKeyForRun) return void 0;
|
|
48067
|
+
let rawKey;
|
|
48068
|
+
if (run2) {
|
|
48069
|
+
rawKey = await world.getEncryptionKeyForRun(run2);
|
|
48070
|
+
} else {
|
|
48071
|
+
const { deploymentId } = await world.runs.get(this.runId, {
|
|
48072
|
+
resolveData: "none"
|
|
48073
|
+
});
|
|
48074
|
+
rawKey = await world.getEncryptionKeyForRun(this.runId, {
|
|
48075
|
+
deploymentId
|
|
48076
|
+
});
|
|
48077
|
+
}
|
|
47983
48078
|
return rawKey ? await deriveRunPayloadKeys(rawKey) : void 0;
|
|
47984
48079
|
})();
|
|
47985
48080
|
}
|
|
@@ -48271,7 +48366,7 @@ var Run = class _Run {
|
|
|
48271
48366
|
value: "wakeUp",
|
|
48272
48367
|
configurable: true
|
|
48273
48368
|
});
|
|
48274
|
-
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.2.
|
|
48369
|
+
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.2.3//Run#wakeUp");
|
|
48275
48370
|
(function(__wf_fn, __wf_id) {
|
|
48276
48371
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48277
48372
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48280,7 +48375,7 @@ var Run = class _Run {
|
|
|
48280
48375
|
value: "cancel",
|
|
48281
48376
|
configurable: true
|
|
48282
48377
|
});
|
|
48283
|
-
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.2.
|
|
48378
|
+
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.2.3//Run#cancel");
|
|
48284
48379
|
(function(__wf_fn, __wf_id) {
|
|
48285
48380
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48286
48381
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48289,7 +48384,7 @@ var Run = class _Run {
|
|
|
48289
48384
|
value: "getReadable",
|
|
48290
48385
|
configurable: true
|
|
48291
48386
|
});
|
|
48292
|
-
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.2.
|
|
48387
|
+
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.2.3//Run#getReadable");
|
|
48293
48388
|
(function(__wf_fn, __wf_id) {
|
|
48294
48389
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48295
48390
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48298,7 +48393,7 @@ var Run = class _Run {
|
|
|
48298
48393
|
value: "getWritable",
|
|
48299
48394
|
configurable: true
|
|
48300
48395
|
});
|
|
48301
|
-
})(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.2.
|
|
48396
|
+
})(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.2.3//Run#getWritable");
|
|
48302
48397
|
(function(__wf_fn, __wf_id) {
|
|
48303
48398
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48304
48399
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48307,7 +48402,7 @@ var Run = class _Run {
|
|
|
48307
48402
|
value: "exists",
|
|
48308
48403
|
configurable: true
|
|
48309
48404
|
});
|
|
48310
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.2.
|
|
48405
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.2.3//Run#exists");
|
|
48311
48406
|
(function(__wf_fn, __wf_id) {
|
|
48312
48407
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48313
48408
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48316,7 +48411,7 @@ var Run = class _Run {
|
|
|
48316
48411
|
value: "status",
|
|
48317
48412
|
configurable: true
|
|
48318
48413
|
});
|
|
48319
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.2.
|
|
48414
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.2.3//Run#status");
|
|
48320
48415
|
(function(__wf_fn, __wf_id) {
|
|
48321
48416
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48322
48417
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48325,7 +48420,7 @@ var Run = class _Run {
|
|
|
48325
48420
|
value: "returnValue",
|
|
48326
48421
|
configurable: true
|
|
48327
48422
|
});
|
|
48328
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.2.
|
|
48423
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.2.3//Run#returnValue");
|
|
48329
48424
|
(function(__wf_fn, __wf_id) {
|
|
48330
48425
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48331
48426
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48334,7 +48429,7 @@ var Run = class _Run {
|
|
|
48334
48429
|
value: "workflowName",
|
|
48335
48430
|
configurable: true
|
|
48336
48431
|
});
|
|
48337
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.2.
|
|
48432
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.2.3//Run#workflowName");
|
|
48338
48433
|
(function(__wf_fn, __wf_id) {
|
|
48339
48434
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48340
48435
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48343,7 +48438,7 @@ var Run = class _Run {
|
|
|
48343
48438
|
value: "createdAt",
|
|
48344
48439
|
configurable: true
|
|
48345
48440
|
});
|
|
48346
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.2.
|
|
48441
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.2.3//Run#createdAt");
|
|
48347
48442
|
(function(__wf_fn, __wf_id) {
|
|
48348
48443
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48349
48444
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48352,7 +48447,7 @@ var Run = class _Run {
|
|
|
48352
48447
|
value: "startedAt",
|
|
48353
48448
|
configurable: true
|
|
48354
48449
|
});
|
|
48355
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.2.
|
|
48450
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.2.3//Run#startedAt");
|
|
48356
48451
|
(function(__wf_fn, __wf_id) {
|
|
48357
48452
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48358
48453
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -48361,7 +48456,7 @@ var Run = class _Run {
|
|
|
48361
48456
|
value: "completedAt",
|
|
48362
48457
|
configurable: true
|
|
48363
48458
|
});
|
|
48364
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.2.
|
|
48459
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.2.3//Run#completedAt");
|
|
48365
48460
|
(function(__wf_cls, __wf_id) {
|
|
48366
48461
|
var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
48367
48462
|
__wf_reg.set(__wf_id, __wf_cls);
|
|
@@ -48371,7 +48466,7 @@ var Run = class _Run {
|
|
|
48371
48466
|
enumerable: false,
|
|
48372
48467
|
configurable: false
|
|
48373
48468
|
});
|
|
48374
|
-
})(Run, "class//@workflow/core/runtime/run@5.2.
|
|
48469
|
+
})(Run, "class//@workflow/core/runtime/run@5.2.3//Run");
|
|
48375
48470
|
|
|
48376
48471
|
// ../workflow/dist/stdlib.js
|
|
48377
48472
|
async function fetch2(...args) {
|