@poe-platform/safe-js 0.1.207 → 0.1.209
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/dist/safe-js/chunks/{chunk-CCGG45AK.js → chunk-26O7OBXJ.js} +2 -2
- package/dist/safe-js/chunks/{chunk-NKPHEPKA.js → chunk-NP6FU3M7.js} +49 -25
- package/dist/safe-js/chunks/{chunk-NKPHEPKA.js.map → chunk-NP6FU3M7.js.map} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-CCGG45AK.js.map → chunk-26O7OBXJ.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NP6FU3M7.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-26O7OBXJ.js.map
|
|
@@ -34936,29 +34936,53 @@ function createConsoleJsonGlobals(options) {
|
|
|
34936
34936
|
};
|
|
34937
34937
|
}
|
|
34938
34938
|
async function stringifyJson(value, replacer, indent, budget, context) {
|
|
34939
|
-
|
|
34940
|
-
|
|
34941
|
-
|
|
34942
|
-
|
|
34943
|
-
|
|
34944
|
-
|
|
34945
|
-
|
|
34946
|
-
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
|
|
34957
|
-
|
|
34958
|
-
|
|
34959
|
-
|
|
34939
|
+
const allocation = {};
|
|
34940
|
+
let propertyList;
|
|
34941
|
+
const release = retainValues(budget, () => [value, replacer, indent]);
|
|
34942
|
+
try {
|
|
34943
|
+
if (Array.isArray(replacer)) {
|
|
34944
|
+
propertyList = [];
|
|
34945
|
+
const seen = /* @__PURE__ */ new Set();
|
|
34946
|
+
let size = 0;
|
|
34947
|
+
const state = { budget, context, gap: "", stack: [] };
|
|
34948
|
+
const length = replacer.length;
|
|
34949
|
+
for (let index = 0; index < length; index++) {
|
|
34950
|
+
budget.visitNode();
|
|
34951
|
+
const entry = await getStringifyProperty(replacer, String(index), state);
|
|
34952
|
+
const primitive = isSandboxBox(entry) ? boxedValue(entry) : entry;
|
|
34953
|
+
if (typeof primitive !== "string" && typeof primitive !== "number") continue;
|
|
34954
|
+
const key = await sandboxString(entry, budget, context);
|
|
34955
|
+
if (seen.has(key)) continue;
|
|
34956
|
+
budget.allocateArrayLength(propertyList.length + 1);
|
|
34957
|
+
size += key.length + 2;
|
|
34958
|
+
budget.setRetainedDataUsage(allocation, size);
|
|
34959
|
+
propertyList.push(key);
|
|
34960
|
+
seen.add(key);
|
|
34961
|
+
}
|
|
34962
|
+
}
|
|
34963
|
+
if (indent !== void 0 && typeof indent !== "number" && typeof indent !== "string") {
|
|
34964
|
+
throw new TypeError(
|
|
34965
|
+
"JSON.stringify(value, replacer, indent) requires indent to be a string, number, or undefined."
|
|
34966
|
+
);
|
|
34967
|
+
}
|
|
34968
|
+
const holder = {};
|
|
34969
|
+
defineDataProperty2(holder, "", value);
|
|
34970
|
+
const output = await stringifyProperty("", holder, {
|
|
34971
|
+
budget,
|
|
34972
|
+
context,
|
|
34973
|
+
gap: normalizeStringifyGap(indent),
|
|
34974
|
+
replacer: isSandboxClosure(replacer) ? replacer : void 0,
|
|
34975
|
+
propertyList,
|
|
34976
|
+
stack: []
|
|
34977
|
+
});
|
|
34978
|
+
if (output === void 0) {
|
|
34979
|
+
return void 0;
|
|
34980
|
+
}
|
|
34981
|
+
return budget.allocateString(output);
|
|
34982
|
+
} finally {
|
|
34983
|
+
budget.setRetainedDataUsage(allocation, 0);
|
|
34984
|
+
release();
|
|
34960
34985
|
}
|
|
34961
|
-
return budget.allocateString(output);
|
|
34962
34986
|
}
|
|
34963
34987
|
async function stringifyProperty(key, holder, state, indent = "") {
|
|
34964
34988
|
let value = await getStringifyProperty(holder, key, state);
|
|
@@ -35048,7 +35072,7 @@ async function stringifyObject(value, state, indent) {
|
|
|
35048
35072
|
const release = retainValues(state.budget, () => entries);
|
|
35049
35073
|
try {
|
|
35050
35074
|
const nextIndent = indent + state.gap;
|
|
35051
|
-
for (const key of Object.keys(value)) {
|
|
35075
|
+
for (const key of state.propertyList ?? Object.keys(value)) {
|
|
35052
35076
|
const serialized = await stringifyProperty(key, value, state, nextIndent);
|
|
35053
35077
|
if (serialized !== void 0) {
|
|
35054
35078
|
entries.push(`${quoteJsonString(key)}:${state.gap === "" ? "" : " "}${serialized}`);
|
|
@@ -35111,7 +35135,7 @@ function isStringifyObject(value) {
|
|
|
35111
35135
|
return isStringifyContainer(value) && !Array.isArray(value);
|
|
35112
35136
|
}
|
|
35113
35137
|
function toSandboxValue(value) {
|
|
35114
|
-
if (value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean" || isSandboxClosure(value) || isSandboxPromise(value) || Array.isArray(value) || isStringifyContainer(value)) {
|
|
35138
|
+
if (value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "symbol" || typeof value === "boolean" || isSandboxClosure(value) || isSandboxPromise(value) || Array.isArray(value) || isStringifyContainer(value)) {
|
|
35115
35139
|
return value;
|
|
35116
35140
|
}
|
|
35117
35141
|
throw new TypeError(
|
|
@@ -37905,4 +37929,4 @@ export {
|
|
|
37905
37929
|
FileSnapshotBackend,
|
|
37906
37930
|
run
|
|
37907
37931
|
};
|
|
37908
|
-
//# sourceMappingURL=chunk-
|
|
37932
|
+
//# sourceMappingURL=chunk-NP6FU3M7.js.map
|