@workflow/world-testing 4.1.22 → 4.1.24
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.
|
@@ -33710,9 +33710,9 @@ var require_redirect = __commonJS({
|
|
|
33710
33710
|
var require_response_error = __commonJS({
|
|
33711
33711
|
"../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/response-error.js"(exports2, module2) {
|
|
33712
33712
|
"use strict";
|
|
33713
|
-
var
|
|
33713
|
+
var DecoratorHandler2 = require_decorator_handler();
|
|
33714
33714
|
var { ResponseError } = require_errors();
|
|
33715
|
-
var ResponseErrorHandler = class extends
|
|
33715
|
+
var ResponseErrorHandler = class extends DecoratorHandler2 {
|
|
33716
33716
|
static {
|
|
33717
33717
|
__name(this, "ResponseErrorHandler");
|
|
33718
33718
|
}
|
|
@@ -33820,8 +33820,8 @@ var require_dump = __commonJS({
|
|
|
33820
33820
|
"../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/dump.js"(exports2, module2) {
|
|
33821
33821
|
"use strict";
|
|
33822
33822
|
var { InvalidArgumentError, RequestAbortedError } = require_errors();
|
|
33823
|
-
var
|
|
33824
|
-
var DumpHandler = class extends
|
|
33823
|
+
var DecoratorHandler2 = require_decorator_handler();
|
|
33824
|
+
var DumpHandler = class extends DecoratorHandler2 {
|
|
33825
33825
|
static {
|
|
33826
33826
|
__name(this, "DumpHandler");
|
|
33827
33827
|
}
|
|
@@ -33911,7 +33911,7 @@ var require_dns = __commonJS({
|
|
|
33911
33911
|
"use strict";
|
|
33912
33912
|
var { isIP } = require("node:net");
|
|
33913
33913
|
var { lookup } = require("node:dns");
|
|
33914
|
-
var
|
|
33914
|
+
var DecoratorHandler2 = require_decorator_handler();
|
|
33915
33915
|
var { InvalidArgumentError, InformationalError } = require_errors();
|
|
33916
33916
|
var maxInt = Math.pow(2, 31) - 1;
|
|
33917
33917
|
function hasSafeIterator(headers) {
|
|
@@ -34220,7 +34220,7 @@ var require_dns = __commonJS({
|
|
|
34220
34220
|
return new DNSDispatchHandler(this, meta3, opts);
|
|
34221
34221
|
}
|
|
34222
34222
|
};
|
|
34223
|
-
var DNSDispatchHandler = class extends
|
|
34223
|
+
var DNSDispatchHandler = class extends DecoratorHandler2 {
|
|
34224
34224
|
static {
|
|
34225
34225
|
__name(this, "DNSDispatchHandler");
|
|
34226
34226
|
}
|
|
@@ -36150,7 +36150,7 @@ var require_decompress = __commonJS({
|
|
|
36150
36150
|
"use strict";
|
|
36151
36151
|
var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = require("node:zlib");
|
|
36152
36152
|
var { pipeline } = require("node:stream");
|
|
36153
|
-
var
|
|
36153
|
+
var DecoratorHandler2 = require_decorator_handler();
|
|
36154
36154
|
var { runtimeFeatures } = require_runtime_features();
|
|
36155
36155
|
var supportedEncodings = {
|
|
36156
36156
|
gzip: createGunzip,
|
|
@@ -36169,7 +36169,7 @@ var require_decompress = __commonJS({
|
|
|
36169
36169
|
/** @type {boolean} */
|
|
36170
36170
|
false
|
|
36171
36171
|
);
|
|
36172
|
-
var DecompressHandler = class extends
|
|
36172
|
+
var DecompressHandler = class extends DecoratorHandler2 {
|
|
36173
36173
|
static {
|
|
36174
36174
|
__name(this, "DecompressHandler");
|
|
36175
36175
|
}
|
|
@@ -44146,7 +44146,7 @@ var require_undici = __commonJS({
|
|
|
44146
44146
|
var mockErrors = require_mock_errors();
|
|
44147
44147
|
var RetryHandler = require_retry_handler();
|
|
44148
44148
|
var { getGlobalDispatcher, setGlobalDispatcher } = require_global2();
|
|
44149
|
-
var
|
|
44149
|
+
var DecoratorHandler2 = require_decorator_handler();
|
|
44150
44150
|
var RedirectHandler = require_redirect_handler();
|
|
44151
44151
|
Object.assign(Dispatcher.prototype, api);
|
|
44152
44152
|
module2.exports.Dispatcher = Dispatcher;
|
|
@@ -44161,7 +44161,7 @@ var require_undici = __commonJS({
|
|
|
44161
44161
|
module2.exports.RetryAgent = RetryAgent2;
|
|
44162
44162
|
module2.exports.H2CClient = H2CClient;
|
|
44163
44163
|
module2.exports.RetryHandler = RetryHandler;
|
|
44164
|
-
module2.exports.DecoratorHandler =
|
|
44164
|
+
module2.exports.DecoratorHandler = DecoratorHandler2;
|
|
44165
44165
|
module2.exports.RedirectHandler = RedirectHandler;
|
|
44166
44166
|
module2.exports.interceptors = {
|
|
44167
44167
|
redirect: require_redirect(),
|
|
@@ -50526,7 +50526,7 @@ init_dist();
|
|
|
50526
50526
|
init_node();
|
|
50527
50527
|
|
|
50528
50528
|
// ../core/dist/version.js
|
|
50529
|
-
var version2 = "4.8.
|
|
50529
|
+
var version2 = "4.8.9";
|
|
50530
50530
|
|
|
50531
50531
|
// ../core/dist/runtime/world.js
|
|
50532
50532
|
var import_node_module = require("node:module");
|
|
@@ -53893,6 +53893,7 @@ init_zod();
|
|
|
53893
53893
|
init_dist();
|
|
53894
53894
|
var import_undici2 = __toESM(require_undici(), 1);
|
|
53895
53895
|
var _dispatcher;
|
|
53896
|
+
var _queueDispatcher;
|
|
53896
53897
|
var _streamDispatcher;
|
|
53897
53898
|
var _streamCloseDispatcher;
|
|
53898
53899
|
var _nodeHttpAgents;
|
|
@@ -53947,6 +53948,61 @@ function getAgentOptions() {
|
|
|
53947
53948
|
};
|
|
53948
53949
|
}
|
|
53949
53950
|
__name(getAgentOptions, "getAgentOptions");
|
|
53951
|
+
var QUEUE_AGENT_CONNECTIONS = 64;
|
|
53952
|
+
var QUEUE_REQUEST_TIMEOUT_MS = 3e4;
|
|
53953
|
+
var getQueueRequestTimeoutMs = /* @__PURE__ */ __name(() => envNumber("WORKFLOW_VERCEL_QUEUE_TIMEOUT_MS", QUEUE_REQUEST_TIMEOUT_MS, {
|
|
53954
|
+
integer: true,
|
|
53955
|
+
min: 5e3,
|
|
53956
|
+
max: 12e4
|
|
53957
|
+
}), "getQueueRequestTimeoutMs");
|
|
53958
|
+
function getQueueAgentOptions() {
|
|
53959
|
+
const timeoutMs = getQueueRequestTimeoutMs();
|
|
53960
|
+
return {
|
|
53961
|
+
...getAgentOptions(),
|
|
53962
|
+
connections: envNumber("WORKFLOW_VERCEL_QUEUE_CONNECTIONS", QUEUE_AGENT_CONNECTIONS, { integer: true, min: 1, max: 1024 }),
|
|
53963
|
+
headersTimeout: timeoutMs,
|
|
53964
|
+
bodyTimeout: timeoutMs
|
|
53965
|
+
};
|
|
53966
|
+
}
|
|
53967
|
+
__name(getQueueAgentOptions, "getQueueAgentOptions");
|
|
53968
|
+
var ForwardingHandler = import_undici2.DecoratorHandler;
|
|
53969
|
+
function deadlineInterceptor(timeoutMs) {
|
|
53970
|
+
class DeadlineHandler extends ForwardingHandler {
|
|
53971
|
+
static {
|
|
53972
|
+
__name(this, "DeadlineHandler");
|
|
53973
|
+
}
|
|
53974
|
+
#expired = false;
|
|
53975
|
+
#controller;
|
|
53976
|
+
#timer;
|
|
53977
|
+
constructor(handler) {
|
|
53978
|
+
super(handler);
|
|
53979
|
+
this.#timer = setTimeout(() => {
|
|
53980
|
+
this.#expired = true;
|
|
53981
|
+
this.#abort();
|
|
53982
|
+
}, timeoutMs);
|
|
53983
|
+
this.#timer.unref?.();
|
|
53984
|
+
}
|
|
53985
|
+
#abort() {
|
|
53986
|
+
this.#controller?.abort(new Error(`Queue request exceeded its ${timeoutMs}ms deadline`));
|
|
53987
|
+
}
|
|
53988
|
+
onRequestStart(controller, context2) {
|
|
53989
|
+
this.#controller = controller;
|
|
53990
|
+
super.onRequestStart(controller, context2);
|
|
53991
|
+
if (this.#expired)
|
|
53992
|
+
this.#abort();
|
|
53993
|
+
}
|
|
53994
|
+
onResponseEnd(controller, trailers) {
|
|
53995
|
+
clearTimeout(this.#timer);
|
|
53996
|
+
super.onResponseEnd(controller, trailers);
|
|
53997
|
+
}
|
|
53998
|
+
onResponseError(controller, error48) {
|
|
53999
|
+
clearTimeout(this.#timer);
|
|
54000
|
+
super.onResponseError(controller, error48);
|
|
54001
|
+
}
|
|
54002
|
+
}
|
|
54003
|
+
return (dispatch) => (opts, handler) => dispatch(opts, new DeadlineHandler(handler));
|
|
54004
|
+
}
|
|
54005
|
+
__name(deadlineInterceptor, "deadlineInterceptor");
|
|
53950
54006
|
function getEventsAgentOptions() {
|
|
53951
54007
|
return {
|
|
53952
54008
|
...getBaseAgentOptions(),
|
|
@@ -54137,7 +54193,7 @@ function getDispatcher(config3) {
|
|
|
54137
54193
|
}
|
|
54138
54194
|
__name(getDispatcher, "getDispatcher");
|
|
54139
54195
|
function getQueueDispatcher(config3) {
|
|
54140
|
-
return config3
|
|
54196
|
+
return resolveDispatcher(config3, getDefaultQueueDispatcher);
|
|
54141
54197
|
}
|
|
54142
54198
|
__name(getQueueDispatcher, "getQueueDispatcher");
|
|
54143
54199
|
function getEventsDispatcher(config3) {
|
|
@@ -54174,6 +54230,15 @@ function createStreamDispatcher(retryOptions, agentOverrides) {
|
|
|
54174
54230
|
return new import_undici2.RetryAgent(new import_undici2.Agent({ ...getStreamAgentOptions(), ...agentOverrides }), retryOptions);
|
|
54175
54231
|
}
|
|
54176
54232
|
__name(createStreamDispatcher, "createStreamDispatcher");
|
|
54233
|
+
function createQueueDispatcher() {
|
|
54234
|
+
return new import_undici2.RetryAgent(new import_undici2.Agent(getQueueAgentOptions()).compose(deadlineInterceptor(getQueueRequestTimeoutMs())), getRetryAgentOptions());
|
|
54235
|
+
}
|
|
54236
|
+
__name(createQueueDispatcher, "createQueueDispatcher");
|
|
54237
|
+
function getDefaultQueueDispatcher() {
|
|
54238
|
+
_queueDispatcher ??= createQueueDispatcher();
|
|
54239
|
+
return _queueDispatcher;
|
|
54240
|
+
}
|
|
54241
|
+
__name(getDefaultQueueDispatcher, "getDefaultQueueDispatcher");
|
|
54177
54242
|
function getDefaultDispatcher() {
|
|
54178
54243
|
_dispatcher ??= new import_undici2.RetryAgent(new import_undici2.Agent(getAgentOptions()), getRetryAgentOptions());
|
|
54179
54244
|
return _dispatcher;
|
|
@@ -61638,7 +61703,7 @@ var import_oidc3 = __toESM(require_dist(), 1);
|
|
|
61638
61703
|
init_dist();
|
|
61639
61704
|
|
|
61640
61705
|
// ../world-vercel/dist/version.js
|
|
61641
|
-
var version3 = "4.7.
|
|
61706
|
+
var version3 = "4.7.4";
|
|
61642
61707
|
|
|
61643
61708
|
// ../world-vercel/dist/utils.js
|
|
61644
61709
|
var WORKFLOW_SERVER_URL_OVERRIDE = "";
|
|
@@ -63561,10 +63626,10 @@ var getWorld = /* @__PURE__ */ __name(() => {
|
|
|
63561
63626
|
}, "getWorld");
|
|
63562
63627
|
|
|
63563
63628
|
// ../core/dist/runtime/helpers.js
|
|
63564
|
-
var SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
|
|
63629
|
+
var SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@()[\]]+$/;
|
|
63565
63630
|
function getWorkflowQueueName(workflowName, namespace) {
|
|
63566
63631
|
if (!SAFE_WORKFLOW_NAME_PATTERN.test(workflowName)) {
|
|
63567
|
-
throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, or
|
|
63632
|
+
throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, at signs, parentheses, or square brackets`);
|
|
63568
63633
|
}
|
|
63569
63634
|
const prefix = getQueueTopicPrefix("workflow", resolveQueueNamespace(namespace));
|
|
63570
63635
|
return `${prefix}${workflowName}`;
|
|
@@ -63830,7 +63895,7 @@ var import_node_util3 = require("node:util");
|
|
|
63830
63895
|
var WORKFLOW_SERIALIZE = /* @__PURE__ */ Symbol.for("workflow-serialize");
|
|
63831
63896
|
var WORKFLOW_DESERIALIZE = /* @__PURE__ */ Symbol.for("workflow-deserialize");
|
|
63832
63897
|
|
|
63833
|
-
// ../../node_modules/.pnpm/devalue@5.
|
|
63898
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/constants.js
|
|
63834
63899
|
var UNDEFINED = -1;
|
|
63835
63900
|
var HOLE = -2;
|
|
63836
63901
|
var NAN = -3;
|
|
@@ -63841,7 +63906,7 @@ var SPARSE = -7;
|
|
|
63841
63906
|
var MAX_ARRAY_LEN = 2 ** 32 - 1;
|
|
63842
63907
|
var MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
|
|
63843
63908
|
|
|
63844
|
-
// ../../node_modules/.pnpm/devalue@5.
|
|
63909
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/utils.js
|
|
63845
63910
|
var DevalueError = class extends Error {
|
|
63846
63911
|
static {
|
|
63847
63912
|
__name(this, "DevalueError");
|
|
@@ -63860,10 +63925,6 @@ var DevalueError = class extends Error {
|
|
|
63860
63925
|
this.root = root;
|
|
63861
63926
|
}
|
|
63862
63927
|
};
|
|
63863
|
-
function is_primitive(thing) {
|
|
63864
|
-
return thing === null || typeof thing !== "object" && typeof thing !== "function";
|
|
63865
|
-
}
|
|
63866
|
-
__name(is_primitive, "is_primitive");
|
|
63867
63928
|
var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
63868
63929
|
function is_plain_object(thing) {
|
|
63869
63930
|
const proto = Object.getPrototypeOf(thing);
|
|
@@ -63951,19 +64012,23 @@ function is_valid_array_index_string(s) {
|
|
|
63951
64012
|
return is_valid_array_index(+s);
|
|
63952
64013
|
}
|
|
63953
64014
|
__name(is_valid_array_index_string, "is_valid_array_index_string");
|
|
63954
|
-
function
|
|
63955
|
-
const keys = Object.keys(array2);
|
|
64015
|
+
function array_index_cut(keys) {
|
|
63956
64016
|
for (var i = keys.length - 1; i >= 0; i--) {
|
|
63957
64017
|
if (is_valid_array_index_string(keys[i])) {
|
|
63958
64018
|
break;
|
|
63959
64019
|
}
|
|
63960
64020
|
}
|
|
63961
|
-
|
|
64021
|
+
return i + 1;
|
|
64022
|
+
}
|
|
64023
|
+
__name(array_index_cut, "array_index_cut");
|
|
64024
|
+
function valid_array_indices(array2) {
|
|
64025
|
+
const keys = Object.keys(array2);
|
|
64026
|
+
keys.length = array_index_cut(keys);
|
|
63962
64027
|
return keys;
|
|
63963
64028
|
}
|
|
63964
64029
|
__name(valid_array_indices, "valid_array_indices");
|
|
63965
64030
|
|
|
63966
|
-
// ../../node_modules/.pnpm/devalue@5.
|
|
64031
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/base64.js
|
|
63967
64032
|
function encode_native(array_buffer) {
|
|
63968
64033
|
return new Uint8Array(array_buffer).toBase64();
|
|
63969
64034
|
}
|
|
@@ -64006,12 +64071,109 @@ var buffer = typeof process === "object" && process.versions?.node !== void 0;
|
|
|
64006
64071
|
var encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
|
|
64007
64072
|
var decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
|
|
64008
64073
|
|
|
64009
|
-
// ../../node_modules/.pnpm/devalue@5.
|
|
64010
|
-
function
|
|
64011
|
-
|
|
64074
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/operations.js
|
|
64075
|
+
function merge_operations(defaults2, overrides) {
|
|
64076
|
+
if (!overrides) return defaults2;
|
|
64077
|
+
const merged = (
|
|
64078
|
+
/** @type {T} */
|
|
64079
|
+
{}
|
|
64080
|
+
);
|
|
64081
|
+
for (
|
|
64082
|
+
const key of
|
|
64083
|
+
/** @type {(keyof T)[]} */
|
|
64084
|
+
Object.keys(defaults2)
|
|
64085
|
+
) {
|
|
64086
|
+
merged[key] = overrides[key] ?? defaults2[key];
|
|
64087
|
+
}
|
|
64088
|
+
return merged;
|
|
64089
|
+
}
|
|
64090
|
+
__name(merge_operations, "merge_operations");
|
|
64091
|
+
var NOT_PLAIN = Object.freeze({ kind: "not-plain" });
|
|
64092
|
+
var SYMBOL_KEYS = Object.freeze({ kind: "symbol-keys" });
|
|
64093
|
+
var stringify_operations = {
|
|
64094
|
+
identify: /* @__PURE__ */ __name((value) => value, "identify"),
|
|
64095
|
+
typeOf: /* @__PURE__ */ __name((value) => value === null ? "null" : typeof value, "typeOf"),
|
|
64096
|
+
toPrimitive: /* @__PURE__ */ __name((value) => value, "toPrimitive"),
|
|
64097
|
+
tagOf: /* @__PURE__ */ __name((value) => get_type(value), "tagOf"),
|
|
64098
|
+
isThenable: /* @__PURE__ */ __name((value) => typeof value.then === "function", "isThenable"),
|
|
64099
|
+
toPromise: /* @__PURE__ */ __name((thenable) => Promise.resolve(thenable), "toPromise"),
|
|
64100
|
+
unbox: /* @__PURE__ */ __name((boxed) => boxed.valueOf(), "unbox"),
|
|
64101
|
+
toISOString: /* @__PURE__ */ __name((date5) => isNaN(date5.getDate()) ? "" : date5.toISOString(), "toISOString"),
|
|
64102
|
+
toStringValue: /* @__PURE__ */ __name((value) => value.toString(), "toStringValue"),
|
|
64103
|
+
regExpInfo: /* @__PURE__ */ __name((regexp) => ({ source: regexp.source, flags: regexp.flags }), "regExpInfo"),
|
|
64104
|
+
valuesOf: /* @__PURE__ */ __name((set2) => set2, "valuesOf"),
|
|
64105
|
+
entriesOf: /* @__PURE__ */ __name((map2) => map2, "entriesOf"),
|
|
64106
|
+
viewInfo: /* @__PURE__ */ __name((view) => ({
|
|
64107
|
+
buffer: view.buffer,
|
|
64108
|
+
byteOffset: view.byteOffset,
|
|
64109
|
+
byteLength: view.byteLength,
|
|
64110
|
+
length: view.length,
|
|
64111
|
+
bufferByteLength: view.buffer.byteLength
|
|
64112
|
+
}), "viewInfo"),
|
|
64113
|
+
toArrayBuffer: /* @__PURE__ */ __name((buffer2) => buffer2, "toArrayBuffer"),
|
|
64114
|
+
lengthOf: /* @__PURE__ */ __name((array2) => array2.length, "lengthOf"),
|
|
64115
|
+
hasOwn: /* @__PURE__ */ __name((value, key) => Object.hasOwn(value, key), "hasOwn"),
|
|
64116
|
+
indicesOf: /* @__PURE__ */ __name((array2) => valid_array_indices(array2), "indicesOf"),
|
|
64117
|
+
shapeOf: /* @__PURE__ */ __name((value) => {
|
|
64118
|
+
if (!is_plain_object(value)) return NOT_PLAIN;
|
|
64119
|
+
if (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;
|
|
64120
|
+
return {
|
|
64121
|
+
kind: Object.getPrototypeOf(value) === null ? "null-proto" : "plain",
|
|
64122
|
+
keys: Object.keys(value)
|
|
64123
|
+
};
|
|
64124
|
+
}, "shapeOf"),
|
|
64125
|
+
get: /* @__PURE__ */ __name((value, key) => value[key], "get")
|
|
64126
|
+
};
|
|
64127
|
+
var default_stringify_operations = Object.freeze(stringify_operations);
|
|
64128
|
+
var parse_operations = {
|
|
64129
|
+
fromPrimitive: /* @__PURE__ */ __name((primitive) => primitive, "fromPrimitive"),
|
|
64130
|
+
fromISOString: /* @__PURE__ */ __name((iso) => new Date(iso), "fromISOString"),
|
|
64131
|
+
fromStringValue: /* @__PURE__ */ __name((tag, text) => {
|
|
64132
|
+
if (tag === "URL") return new URL(text);
|
|
64133
|
+
if (tag === "URLSearchParams") return new URLSearchParams(text);
|
|
64134
|
+
return Temporal[tag.slice(9)].from(text);
|
|
64135
|
+
}, "fromStringValue"),
|
|
64136
|
+
fromArrayBuffer: /* @__PURE__ */ __name((buffer2) => buffer2, "fromArrayBuffer"),
|
|
64137
|
+
fromRegExpInfo: /* @__PURE__ */ __name((source, flags) => new RegExp(source, flags), "fromRegExpInfo"),
|
|
64138
|
+
fromViewInfo: /* @__PURE__ */ __name((tag, buffer2, byteOffset, length) => {
|
|
64139
|
+
const Constructor = (
|
|
64140
|
+
/** @type {any} */
|
|
64141
|
+
globalThis[tag]
|
|
64142
|
+
);
|
|
64143
|
+
return byteOffset !== void 0 ? new Constructor(buffer2, byteOffset, length) : new Constructor(buffer2);
|
|
64144
|
+
}, "fromViewInfo"),
|
|
64145
|
+
box: /* @__PURE__ */ __name((value) => Object(value), "box"),
|
|
64146
|
+
createArray: /* @__PURE__ */ __name((length) => new Array(length), "createArray"),
|
|
64147
|
+
createSparseArray: /* @__PURE__ */ __name((length) => {
|
|
64148
|
+
const array2 = [];
|
|
64149
|
+
array2[MAX_ARRAY_INDEX] = void 0;
|
|
64150
|
+
delete array2[MAX_ARRAY_INDEX];
|
|
64151
|
+
array2.length = length;
|
|
64152
|
+
return array2;
|
|
64153
|
+
}, "createSparseArray"),
|
|
64154
|
+
createObject: /* @__PURE__ */ __name(() => ({}), "createObject"),
|
|
64155
|
+
createNullPrototypeObject: /* @__PURE__ */ __name(() => /* @__PURE__ */ Object.create(null), "createNullPrototypeObject"),
|
|
64156
|
+
createSet: /* @__PURE__ */ __name(() => /* @__PURE__ */ new Set(), "createSet"),
|
|
64157
|
+
createMap: /* @__PURE__ */ __name(() => /* @__PURE__ */ new Map(), "createMap"),
|
|
64158
|
+
set: /* @__PURE__ */ __name((target2, key, value) => {
|
|
64159
|
+
target2[key] = value;
|
|
64160
|
+
}, "set"),
|
|
64161
|
+
addValue: /* @__PURE__ */ __name((set2, value) => {
|
|
64162
|
+
set2.add(value);
|
|
64163
|
+
}, "addValue"),
|
|
64164
|
+
addEntry: /* @__PURE__ */ __name((map2, key, value) => {
|
|
64165
|
+
map2.set(key, value);
|
|
64166
|
+
}, "addEntry")
|
|
64167
|
+
};
|
|
64168
|
+
var default_parse_operations = Object.freeze(parse_operations);
|
|
64169
|
+
|
|
64170
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/parse.js
|
|
64171
|
+
function parse3(serialized, revivers, options) {
|
|
64172
|
+
return unflatten(JSON.parse(serialized), revivers, options);
|
|
64012
64173
|
}
|
|
64013
64174
|
__name(parse3, "parse");
|
|
64014
|
-
function unflatten(parsed, revivers) {
|
|
64175
|
+
function unflatten(parsed, revivers, options) {
|
|
64176
|
+
const ops = merge_operations(default_parse_operations, options?.operations);
|
|
64015
64177
|
if (typeof parsed === "number") return hydrate(parsed, true);
|
|
64016
64178
|
if (!Array.isArray(parsed) || parsed.length === 0) {
|
|
64017
64179
|
throw new Error("Invalid input");
|
|
@@ -64023,18 +64185,21 @@ function unflatten(parsed, revivers) {
|
|
|
64023
64185
|
const hydrated = Array(values.length);
|
|
64024
64186
|
let hydrating = null;
|
|
64025
64187
|
function hydrate(index, standalone = false) {
|
|
64026
|
-
if (index === UNDEFINED) return void 0;
|
|
64027
|
-
if (index === NAN) return NaN;
|
|
64028
|
-
if (index === POSITIVE_INFINITY) return Infinity;
|
|
64029
|
-
if (index === NEGATIVE_INFINITY) return -Infinity;
|
|
64030
|
-
if (index === NEGATIVE_ZERO) return -0;
|
|
64188
|
+
if (index === UNDEFINED) return ops.fromPrimitive(void 0);
|
|
64189
|
+
if (index === NAN) return ops.fromPrimitive(NaN);
|
|
64190
|
+
if (index === POSITIVE_INFINITY) return ops.fromPrimitive(Infinity);
|
|
64191
|
+
if (index === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);
|
|
64192
|
+
if (index === NEGATIVE_ZERO) return ops.fromPrimitive(-0);
|
|
64031
64193
|
if (standalone || typeof index !== "number") {
|
|
64032
64194
|
throw new Error(`Invalid input`);
|
|
64033
64195
|
}
|
|
64034
64196
|
if (index in hydrated) return hydrated[index];
|
|
64197
|
+
if (index >= values.length) {
|
|
64198
|
+
throw new Error(`Invalid input`);
|
|
64199
|
+
}
|
|
64035
64200
|
const value = values[index];
|
|
64036
64201
|
if (!value || typeof value !== "object") {
|
|
64037
|
-
hydrated[index] = value;
|
|
64202
|
+
hydrated[index] = ops.fromPrimitive(value);
|
|
64038
64203
|
} else if (Array.isArray(value)) {
|
|
64039
64204
|
if (typeof value[0] === "string") {
|
|
64040
64205
|
const type = value[0];
|
|
@@ -64044,6 +64209,9 @@ function unflatten(parsed, revivers) {
|
|
|
64044
64209
|
if (typeof i !== "number") {
|
|
64045
64210
|
i = values.push(value[1]) - 1;
|
|
64046
64211
|
}
|
|
64212
|
+
if (Object.hasOwn(hydrated, i)) {
|
|
64213
|
+
return hydrated[index] = reviver(hydrated[i]);
|
|
64214
|
+
}
|
|
64047
64215
|
hydrating ??= /* @__PURE__ */ new Set();
|
|
64048
64216
|
if (hydrating.has(i)) {
|
|
64049
64217
|
throw new Error("Invalid circular reference");
|
|
@@ -64055,44 +64223,44 @@ function unflatten(parsed, revivers) {
|
|
|
64055
64223
|
}
|
|
64056
64224
|
switch (type) {
|
|
64057
64225
|
case "Date":
|
|
64058
|
-
hydrated[index] =
|
|
64226
|
+
hydrated[index] = ops.fromISOString(value[1]);
|
|
64059
64227
|
break;
|
|
64060
64228
|
case "Set":
|
|
64061
|
-
const set2 =
|
|
64229
|
+
const set2 = ops.createSet();
|
|
64062
64230
|
hydrated[index] = set2;
|
|
64063
64231
|
for (let i = 1; i < value.length; i += 1) {
|
|
64064
|
-
|
|
64232
|
+
ops.addValue(set2, hydrate(value[i]));
|
|
64065
64233
|
}
|
|
64066
64234
|
break;
|
|
64067
64235
|
case "Map":
|
|
64068
|
-
const map2 =
|
|
64236
|
+
const map2 = ops.createMap();
|
|
64069
64237
|
hydrated[index] = map2;
|
|
64070
64238
|
for (let i = 1; i < value.length; i += 2) {
|
|
64071
|
-
|
|
64239
|
+
ops.addEntry(map2, hydrate(value[i]), hydrate(value[i + 1]));
|
|
64072
64240
|
}
|
|
64073
64241
|
break;
|
|
64074
64242
|
case "RegExp":
|
|
64075
|
-
hydrated[index] =
|
|
64243
|
+
hydrated[index] = ops.fromRegExpInfo(value[1], value[2]);
|
|
64076
64244
|
break;
|
|
64077
64245
|
case "Object": {
|
|
64078
64246
|
const wrapped_index = value[1];
|
|
64079
64247
|
if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") {
|
|
64080
64248
|
throw new Error("Invalid input");
|
|
64081
64249
|
}
|
|
64082
|
-
hydrated[index] =
|
|
64250
|
+
hydrated[index] = ops.box(hydrate(wrapped_index));
|
|
64083
64251
|
break;
|
|
64084
64252
|
}
|
|
64085
64253
|
case "BigInt":
|
|
64086
|
-
hydrated[index] = BigInt(value[1]);
|
|
64254
|
+
hydrated[index] = ops.fromPrimitive(BigInt(value[1]));
|
|
64087
64255
|
break;
|
|
64088
64256
|
case "null":
|
|
64089
|
-
const obj =
|
|
64257
|
+
const obj = ops.createNullPrototypeObject();
|
|
64090
64258
|
hydrated[index] = obj;
|
|
64091
64259
|
for (let i = 1; i < value.length; i += 2) {
|
|
64092
64260
|
if (value[i] === "__proto__") {
|
|
64093
64261
|
throw new Error("Cannot parse an object with a `__proto__` property");
|
|
64094
64262
|
}
|
|
64095
|
-
obj
|
|
64263
|
+
ops.set(obj, value[i], hydrate(value[i + 1]));
|
|
64096
64264
|
}
|
|
64097
64265
|
break;
|
|
64098
64266
|
case "Int8Array":
|
|
@@ -64111,9 +64279,8 @@ function unflatten(parsed, revivers) {
|
|
|
64111
64279
|
if (values[value[1]][0] !== "ArrayBuffer") {
|
|
64112
64280
|
throw new Error("Invalid data");
|
|
64113
64281
|
}
|
|
64114
|
-
const TypedArrayConstructor = globalThis[type];
|
|
64115
64282
|
const buffer2 = hydrate(value[1]);
|
|
64116
|
-
hydrated[index] =
|
|
64283
|
+
hydrated[index] = ops.fromViewInfo(type, buffer2, value[2], value[3]);
|
|
64117
64284
|
break;
|
|
64118
64285
|
}
|
|
64119
64286
|
case "ArrayBuffer": {
|
|
@@ -64121,10 +64288,11 @@ function unflatten(parsed, revivers) {
|
|
|
64121
64288
|
if (typeof base643 !== "string") {
|
|
64122
64289
|
throw new Error("Invalid ArrayBuffer encoding");
|
|
64123
64290
|
}
|
|
64124
|
-
|
|
64125
|
-
hydrated[index] = arraybuffer;
|
|
64291
|
+
hydrated[index] = ops.fromArrayBuffer(decode64(base643));
|
|
64126
64292
|
break;
|
|
64127
64293
|
}
|
|
64294
|
+
case "URL":
|
|
64295
|
+
case "URLSearchParams":
|
|
64128
64296
|
case "Temporal.Duration":
|
|
64129
64297
|
case "Temporal.Instant":
|
|
64130
64298
|
case "Temporal.PlainDate":
|
|
@@ -64133,18 +64301,7 @@ function unflatten(parsed, revivers) {
|
|
|
64133
64301
|
case "Temporal.PlainMonthDay":
|
|
64134
64302
|
case "Temporal.PlainYearMonth":
|
|
64135
64303
|
case "Temporal.ZonedDateTime": {
|
|
64136
|
-
|
|
64137
|
-
hydrated[index] = Temporal[temporalName].from(value[1]);
|
|
64138
|
-
break;
|
|
64139
|
-
}
|
|
64140
|
-
case "URL": {
|
|
64141
|
-
const url2 = new URL(value[1]);
|
|
64142
|
-
hydrated[index] = url2;
|
|
64143
|
-
break;
|
|
64144
|
-
}
|
|
64145
|
-
case "URLSearchParams": {
|
|
64146
|
-
const url2 = new URLSearchParams(value[1]);
|
|
64147
|
-
hydrated[index] = url2;
|
|
64304
|
+
hydrated[index] = ops.fromStringValue(type, value[1]);
|
|
64148
64305
|
break;
|
|
64149
64306
|
}
|
|
64150
64307
|
default:
|
|
@@ -64155,36 +64312,32 @@ function unflatten(parsed, revivers) {
|
|
|
64155
64312
|
if (!is_valid_array_len(len)) {
|
|
64156
64313
|
throw new Error("Invalid input");
|
|
64157
64314
|
}
|
|
64158
|
-
const array2 =
|
|
64315
|
+
const array2 = ops.createSparseArray(len);
|
|
64159
64316
|
hydrated[index] = array2;
|
|
64160
|
-
array2[MAX_ARRAY_INDEX] = void 0;
|
|
64161
|
-
delete array2[MAX_ARRAY_INDEX];
|
|
64162
64317
|
for (let i = 2; i < value.length; i += 2) {
|
|
64163
64318
|
const idx = value[i];
|
|
64164
64319
|
if (!is_valid_array_index(idx) || idx >= len) {
|
|
64165
64320
|
throw new Error("Invalid input");
|
|
64166
64321
|
}
|
|
64167
|
-
array2
|
|
64322
|
+
ops.set(array2, idx, hydrate(value[i + 1]));
|
|
64168
64323
|
}
|
|
64169
|
-
array2.length = len;
|
|
64170
64324
|
} else {
|
|
64171
|
-
const array2 =
|
|
64325
|
+
const array2 = ops.createArray(value.length);
|
|
64172
64326
|
hydrated[index] = array2;
|
|
64173
64327
|
for (let i = 0; i < value.length; i += 1) {
|
|
64174
64328
|
const n = value[i];
|
|
64175
64329
|
if (n === HOLE) continue;
|
|
64176
|
-
array2
|
|
64330
|
+
ops.set(array2, i, hydrate(n));
|
|
64177
64331
|
}
|
|
64178
64332
|
}
|
|
64179
64333
|
} else {
|
|
64180
|
-
const object2 =
|
|
64334
|
+
const object2 = ops.createObject();
|
|
64181
64335
|
hydrated[index] = object2;
|
|
64182
64336
|
for (const key of Object.keys(value)) {
|
|
64183
64337
|
if (key === "__proto__") {
|
|
64184
64338
|
throw new Error("Cannot parse an object with a `__proto__` property");
|
|
64185
64339
|
}
|
|
64186
|
-
|
|
64187
|
-
object2[key] = hydrate(n);
|
|
64340
|
+
ops.set(object2, key, hydrate(value[key]));
|
|
64188
64341
|
}
|
|
64189
64342
|
}
|
|
64190
64343
|
return hydrated[index];
|
|
@@ -64194,13 +64347,14 @@ function unflatten(parsed, revivers) {
|
|
|
64194
64347
|
}
|
|
64195
64348
|
__name(unflatten, "unflatten");
|
|
64196
64349
|
|
|
64197
|
-
// ../../node_modules/.pnpm/devalue@5.
|
|
64198
|
-
function stringify(value, reducers) {
|
|
64199
|
-
const stringified = run(false, value, reducers);
|
|
64350
|
+
// ../../node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/stringify.js
|
|
64351
|
+
function stringify(value, reducers, options) {
|
|
64352
|
+
const stringified = run(false, value, reducers, options);
|
|
64200
64353
|
return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
|
|
64201
64354
|
}
|
|
64202
64355
|
__name(stringify, "stringify");
|
|
64203
|
-
function run(async, value, reducers) {
|
|
64356
|
+
function run(async, value, reducers, options) {
|
|
64357
|
+
const ops = merge_operations(default_stringify_operations, options?.operations);
|
|
64204
64358
|
const stringified = [];
|
|
64205
64359
|
const indexes = /* @__PURE__ */ new Map();
|
|
64206
64360
|
const custom2 = [];
|
|
@@ -64212,17 +64366,24 @@ function run(async, value, reducers) {
|
|
|
64212
64366
|
const keys = [];
|
|
64213
64367
|
let p = 0;
|
|
64214
64368
|
function flatten(thing, index2) {
|
|
64215
|
-
|
|
64216
|
-
if (
|
|
64217
|
-
|
|
64218
|
-
if (
|
|
64219
|
-
|
|
64220
|
-
|
|
64369
|
+
const type = ops.typeOf(thing);
|
|
64370
|
+
if (type === "undefined") return UNDEFINED;
|
|
64371
|
+
let number4;
|
|
64372
|
+
if (type === "number") {
|
|
64373
|
+
number4 = /** @type {number} */
|
|
64374
|
+
ops.toPrimitive(thing);
|
|
64375
|
+
if (Number.isNaN(number4)) return NAN;
|
|
64376
|
+
if (number4 === Infinity) return POSITIVE_INFINITY;
|
|
64377
|
+
if (number4 === -Infinity) return NEGATIVE_INFINITY;
|
|
64378
|
+
if (number4 === 0 && 1 / number4 < 0) return NEGATIVE_ZERO;
|
|
64379
|
+
}
|
|
64380
|
+
const id = ops.identify(thing);
|
|
64381
|
+
if (indexes.has(id)) return (
|
|
64221
64382
|
/** @type {number} */
|
|
64222
|
-
indexes.get(
|
|
64383
|
+
indexes.get(id)
|
|
64223
64384
|
);
|
|
64224
64385
|
index2 ??= p++;
|
|
64225
|
-
indexes.set(
|
|
64386
|
+
indexes.set(id, index2);
|
|
64226
64387
|
for (const { key, fn } of custom2) {
|
|
64227
64388
|
const value2 = fn(thing);
|
|
64228
64389
|
if (value2) {
|
|
@@ -64230,15 +64391,15 @@ function run(async, value, reducers) {
|
|
|
64230
64391
|
return index2;
|
|
64231
64392
|
}
|
|
64232
64393
|
}
|
|
64233
|
-
if (
|
|
64394
|
+
if (type === "function") {
|
|
64234
64395
|
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
|
64235
|
-
} else if (
|
|
64396
|
+
} else if (type === "symbol") {
|
|
64236
64397
|
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
|
64237
64398
|
}
|
|
64238
64399
|
let str = "";
|
|
64239
|
-
if (
|
|
64240
|
-
str = stringify_primitive(thing);
|
|
64241
|
-
} else if (
|
|
64400
|
+
if (type !== "object") {
|
|
64401
|
+
str = stringify_primitive(type === "number" ? number4 : ops.toPrimitive(thing));
|
|
64402
|
+
} else if (ops.isThenable(thing)) {
|
|
64242
64403
|
if (!async) {
|
|
64243
64404
|
throw new DevalueError(
|
|
64244
64405
|
`Cannot stringify a Promise or thenable \u2014 use stringifyAsync instead`,
|
|
@@ -64247,59 +64408,56 @@ function run(async, value, reducers) {
|
|
|
64247
64408
|
value
|
|
64248
64409
|
);
|
|
64249
64410
|
}
|
|
64250
|
-
str =
|
|
64411
|
+
str = ops.toPromise(thing).then((value2) => {
|
|
64251
64412
|
const i = flatten(value2, index2);
|
|
64252
64413
|
if (i < 0) stringified[index2] = i;
|
|
64253
64414
|
});
|
|
64254
64415
|
} else {
|
|
64255
|
-
const
|
|
64256
|
-
switch (
|
|
64416
|
+
const tag = ops.tagOf(thing);
|
|
64417
|
+
switch (tag) {
|
|
64257
64418
|
case "Number":
|
|
64258
64419
|
case "String":
|
|
64259
64420
|
case "Boolean":
|
|
64260
64421
|
case "BigInt":
|
|
64261
|
-
str = `["Object",${flatten(
|
|
64422
|
+
str = `["Object",${flatten(ops.unbox(thing))}]`;
|
|
64262
64423
|
break;
|
|
64263
64424
|
case "Date":
|
|
64264
|
-
|
|
64265
|
-
str = `["Date","${valid ? thing.toISOString() : ""}"]`;
|
|
64425
|
+
str = `["Date","${ops.toISOString(thing)}"]`;
|
|
64266
64426
|
break;
|
|
64267
64427
|
case "URL":
|
|
64268
|
-
str = `["URL",${stringify_string(
|
|
64428
|
+
str = `["URL",${stringify_string(ops.toStringValue(thing))}]`;
|
|
64269
64429
|
break;
|
|
64270
64430
|
case "URLSearchParams":
|
|
64271
|
-
str = `["URLSearchParams",${stringify_string(
|
|
64431
|
+
str = `["URLSearchParams",${stringify_string(ops.toStringValue(thing))}]`;
|
|
64272
64432
|
break;
|
|
64273
64433
|
case "RegExp":
|
|
64274
|
-
const { source, flags } = thing;
|
|
64434
|
+
const { source, flags } = ops.regExpInfo(thing);
|
|
64275
64435
|
str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`;
|
|
64276
64436
|
break;
|
|
64277
64437
|
case "Array": {
|
|
64278
64438
|
let mostly_dense = false;
|
|
64439
|
+
const length = ops.lengthOf(thing);
|
|
64279
64440
|
str = "[";
|
|
64280
|
-
for (let i = 0; i <
|
|
64441
|
+
for (let i = 0; i < length; i += 1) {
|
|
64281
64442
|
if (i > 0) str += ",";
|
|
64282
|
-
if (
|
|
64443
|
+
if (ops.hasOwn(thing, i)) {
|
|
64283
64444
|
keys.push(`[${i}]`);
|
|
64284
|
-
str += flatten(thing
|
|
64445
|
+
str += flatten(ops.get(thing, i));
|
|
64285
64446
|
keys.pop();
|
|
64286
64447
|
} else if (mostly_dense) {
|
|
64287
64448
|
str += HOLE;
|
|
64288
64449
|
} else {
|
|
64289
|
-
const populated_keys =
|
|
64290
|
-
/** @type {any[]} */
|
|
64291
|
-
thing
|
|
64292
|
-
);
|
|
64450
|
+
const populated_keys = ops.indicesOf(thing);
|
|
64293
64451
|
const population = populated_keys.length;
|
|
64294
|
-
const d = String(
|
|
64295
|
-
const hole_cost = (
|
|
64452
|
+
const d = String(length).length;
|
|
64453
|
+
const hole_cost = (length - population) * 3;
|
|
64296
64454
|
const sparse_cost = 4 + d + population * (d + 1);
|
|
64297
64455
|
if (hole_cost > sparse_cost) {
|
|
64298
|
-
str = "[" + SPARSE + "," +
|
|
64456
|
+
str = "[" + SPARSE + "," + length;
|
|
64299
64457
|
for (let j = 0; j < populated_keys.length; j++) {
|
|
64300
64458
|
const key = populated_keys[j];
|
|
64301
64459
|
keys.push(`[${key}]`);
|
|
64302
|
-
str += "," + key + "," + flatten(thing
|
|
64460
|
+
str += "," + key + "," + flatten(ops.get(thing, key));
|
|
64303
64461
|
keys.pop();
|
|
64304
64462
|
}
|
|
64305
64463
|
break;
|
|
@@ -64314,15 +64472,19 @@ function run(async, value, reducers) {
|
|
|
64314
64472
|
}
|
|
64315
64473
|
case "Set":
|
|
64316
64474
|
str = '["Set"';
|
|
64317
|
-
for (const value2 of thing) {
|
|
64475
|
+
for (const value2 of ops.valuesOf(thing)) {
|
|
64318
64476
|
str += `,${flatten(value2)}`;
|
|
64319
64477
|
}
|
|
64320
64478
|
str += "]";
|
|
64321
64479
|
break;
|
|
64322
64480
|
case "Map":
|
|
64323
64481
|
str = '["Map"';
|
|
64324
|
-
for (const [key, value2] of thing) {
|
|
64325
|
-
|
|
64482
|
+
for (const [key, value2] of ops.entriesOf(thing)) {
|
|
64483
|
+
const key_type = ops.typeOf(key);
|
|
64484
|
+
const key_is_primitive = key_type !== "object" && key_type !== "function" && key_type !== "symbol";
|
|
64485
|
+
keys.push(
|
|
64486
|
+
`.get(${key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : "..."})`
|
|
64487
|
+
);
|
|
64326
64488
|
str += `,${flatten(key)},${flatten(value2)}`;
|
|
64327
64489
|
keys.pop();
|
|
64328
64490
|
}
|
|
@@ -64339,19 +64501,26 @@ function run(async, value, reducers) {
|
|
|
64339
64501
|
case "Float32Array":
|
|
64340
64502
|
case "Float64Array":
|
|
64341
64503
|
case "BigInt64Array":
|
|
64342
|
-
case "BigUint64Array":
|
|
64504
|
+
case "BigUint64Array": {
|
|
64505
|
+
const info = ops.viewInfo(thing);
|
|
64506
|
+
str = '["' + tag + '",' + flatten(info.buffer);
|
|
64507
|
+
if (info.byteLength !== info.bufferByteLength) {
|
|
64508
|
+
str += `,${info.byteOffset},${info.length}`;
|
|
64509
|
+
}
|
|
64510
|
+
str += "]";
|
|
64511
|
+
break;
|
|
64512
|
+
}
|
|
64343
64513
|
case "DataView": {
|
|
64344
|
-
const
|
|
64345
|
-
str = '["' +
|
|
64346
|
-
if (
|
|
64347
|
-
str += `,${
|
|
64514
|
+
const info = ops.viewInfo(thing);
|
|
64515
|
+
str = '["' + tag + '",' + flatten(info.buffer);
|
|
64516
|
+
if (info.byteLength !== info.bufferByteLength) {
|
|
64517
|
+
str += `,${info.byteOffset},${info.byteLength}`;
|
|
64348
64518
|
}
|
|
64349
64519
|
str += "]";
|
|
64350
64520
|
break;
|
|
64351
64521
|
}
|
|
64352
64522
|
case "ArrayBuffer": {
|
|
64353
|
-
const
|
|
64354
|
-
const base643 = encode64(arraybuffer);
|
|
64523
|
+
const base643 = encode64(ops.toArrayBuffer(thing));
|
|
64355
64524
|
str = `["ArrayBuffer","${base643}"]`;
|
|
64356
64525
|
break;
|
|
64357
64526
|
}
|
|
@@ -64363,18 +64532,19 @@ function run(async, value, reducers) {
|
|
|
64363
64532
|
case "Temporal.PlainMonthDay":
|
|
64364
64533
|
case "Temporal.PlainYearMonth":
|
|
64365
64534
|
case "Temporal.ZonedDateTime":
|
|
64366
|
-
str = `["${
|
|
64535
|
+
str = `["${tag}",${stringify_string(ops.toStringValue(thing))}]`;
|
|
64367
64536
|
break;
|
|
64368
|
-
default:
|
|
64369
|
-
|
|
64537
|
+
default: {
|
|
64538
|
+
const shape = ops.shapeOf(thing);
|
|
64539
|
+
if (shape.kind === "not-plain") {
|
|
64370
64540
|
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
64371
64541
|
}
|
|
64372
|
-
if (
|
|
64542
|
+
if (shape.kind === "symbol-keys") {
|
|
64373
64543
|
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
64374
64544
|
}
|
|
64375
|
-
if (
|
|
64545
|
+
if (shape.kind === "null-proto") {
|
|
64376
64546
|
str = '["null"';
|
|
64377
|
-
for (const key of
|
|
64547
|
+
for (const key of shape.keys) {
|
|
64378
64548
|
if (key === "__proto__") {
|
|
64379
64549
|
throw new DevalueError(
|
|
64380
64550
|
`Cannot stringify objects with __proto__ keys`,
|
|
@@ -64384,14 +64554,14 @@ function run(async, value, reducers) {
|
|
|
64384
64554
|
);
|
|
64385
64555
|
}
|
|
64386
64556
|
keys.push(stringify_key(key));
|
|
64387
|
-
str += `,${stringify_string(key)},${flatten(thing
|
|
64557
|
+
str += `,${stringify_string(key)},${flatten(ops.get(thing, key))}`;
|
|
64388
64558
|
keys.pop();
|
|
64389
64559
|
}
|
|
64390
64560
|
str += "]";
|
|
64391
64561
|
} else {
|
|
64392
64562
|
str = "{";
|
|
64393
64563
|
let started = false;
|
|
64394
|
-
for (const key of
|
|
64564
|
+
for (const key of shape.keys) {
|
|
64395
64565
|
if (key === "__proto__") {
|
|
64396
64566
|
throw new DevalueError(
|
|
64397
64567
|
`Cannot stringify objects with __proto__ keys`,
|
|
@@ -64403,11 +64573,12 @@ function run(async, value, reducers) {
|
|
|
64403
64573
|
if (started) str += ",";
|
|
64404
64574
|
started = true;
|
|
64405
64575
|
keys.push(stringify_key(key));
|
|
64406
|
-
str += `${stringify_string(key)}:${flatten(thing
|
|
64576
|
+
str += `${stringify_string(key)}:${flatten(ops.get(thing, key))}`;
|
|
64407
64577
|
keys.pop();
|
|
64408
64578
|
}
|
|
64409
64579
|
str += "}";
|
|
64410
64580
|
}
|
|
64581
|
+
}
|
|
64411
64582
|
}
|
|
64412
64583
|
}
|
|
64413
64584
|
stringified[index2] = str;
|