@poe-platform/safe-js 0.1.134 → 0.1.135
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-L74RZHUW.js → chunk-RU2BCN4G.js} +8 -15
- package/dist/safe-js/chunks/{chunk-L74RZHUW.js.map → chunk-RU2BCN4G.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-2I6B4TFA.js → chunk-SPSQUTGG.js} +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-2I6B4TFA.js.map → chunk-SPSQUTGG.js.map} +0 -0
|
@@ -30905,7 +30905,13 @@ function createConsoleJsonGlobals(options) {
|
|
|
30905
30905
|
JSON: {
|
|
30906
30906
|
parse: createSandboxClosure({
|
|
30907
30907
|
sandbox: true,
|
|
30908
|
-
call: async ([text]) =>
|
|
30908
|
+
call: async ([text], context) => {
|
|
30909
|
+
const converted = sandboxString(text, options.budget, context);
|
|
30910
|
+
return copyJsonToSandbox(
|
|
30911
|
+
JSON.parse(converted instanceof Promise ? await converted : converted),
|
|
30912
|
+
options.budget
|
|
30913
|
+
);
|
|
30914
|
+
},
|
|
30909
30915
|
name: "parse"
|
|
30910
30916
|
}),
|
|
30911
30917
|
stringify: createSandboxClosure({
|
|
@@ -30971,10 +30977,6 @@ function createConsoleJsonGlobals(options) {
|
|
|
30971
30977
|
)
|
|
30972
30978
|
};
|
|
30973
30979
|
}
|
|
30974
|
-
function parseJson(input, budget) {
|
|
30975
|
-
const text = budget.allocateString(toJsonParseText(input));
|
|
30976
|
-
return copyJsonToSandbox(JSON.parse(text), budget);
|
|
30977
|
-
}
|
|
30978
30980
|
async function stringifyJson(value, replacer, indent, budget, context) {
|
|
30979
30981
|
if (replacer !== void 0 && replacer !== null && !isSandboxClosure(replacer)) {
|
|
30980
30982
|
throw new TypeError(
|
|
@@ -31000,15 +31002,6 @@ async function stringifyJson(value, replacer, indent, budget, context) {
|
|
|
31000
31002
|
}
|
|
31001
31003
|
return budget.allocateString(output);
|
|
31002
31004
|
}
|
|
31003
|
-
function toJsonParseText(input) {
|
|
31004
|
-
if (Array.isArray(input)) {
|
|
31005
|
-
return input.map((entry) => entry === null || entry === void 0 ? "" : toJsonParseText(entry)).join(",");
|
|
31006
|
-
}
|
|
31007
|
-
if (typeof input === "object" && input !== null) {
|
|
31008
|
-
return "[object Object]";
|
|
31009
|
-
}
|
|
31010
|
-
return String(input);
|
|
31011
|
-
}
|
|
31012
31005
|
async function stringifyProperty(key, holder, state, indent = "") {
|
|
31013
31006
|
let value = getOwnDataValue(holder, key);
|
|
31014
31007
|
if (isSandboxDate(value)) {
|
|
@@ -33999,4 +33992,4 @@ export {
|
|
|
33999
33992
|
FileSnapshotBackend,
|
|
34000
33993
|
run
|
|
34001
33994
|
};
|
|
34002
|
-
//# sourceMappingURL=chunk-
|
|
33995
|
+
//# sourceMappingURL=chunk-RU2BCN4G.js.map
|