@poe-platform/safe-js 0.1.262 → 0.1.264
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-LTZBKTUZ.js → chunk-5ICV3URR.js} +14 -4
- package/dist/safe-js/chunks/{chunk-LTZBKTUZ.js.map → chunk-5ICV3URR.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-O5Y6Q2W5.js → chunk-ZZ7KERZ7.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-O5Y6Q2W5.js.map → chunk-ZZ7KERZ7.js.map} +0 -0
|
@@ -13584,7 +13584,7 @@ function createObjectArrayGlobals(options) {
|
|
|
13584
13584
|
sandbox: true,
|
|
13585
13585
|
call: async ([value, key], context) => {
|
|
13586
13586
|
const descriptor = Object.getOwnPropertyDescriptor(
|
|
13587
|
-
|
|
13587
|
+
reflectionProperties(value),
|
|
13588
13588
|
await toPropertyKey(key, options.budget, context)
|
|
13589
13589
|
);
|
|
13590
13590
|
if (descriptor === void 0) return void 0;
|
|
@@ -13599,7 +13599,7 @@ function createObjectArrayGlobals(options) {
|
|
|
13599
13599
|
sandbox: true,
|
|
13600
13600
|
call: ([value]) => {
|
|
13601
13601
|
const descriptors2 = /* @__PURE__ */ Object.create(null);
|
|
13602
|
-
const properties =
|
|
13602
|
+
const properties = reflectionProperties(value);
|
|
13603
13603
|
for (const key of [...Object.getOwnPropertyNames(properties), ...ownSandboxSymbolKeys(value)])
|
|
13604
13604
|
defineOwnDataProperty(descriptors2, key, exposePropertyDescriptor(Object.getOwnPropertyDescriptor(properties, key)));
|
|
13605
13605
|
return allocateProducedSandboxValue(descriptors2, options.budget);
|
|
@@ -13608,7 +13608,7 @@ function createObjectArrayGlobals(options) {
|
|
|
13608
13608
|
}),
|
|
13609
13609
|
getOwnPropertyNames: createSandboxClosure({
|
|
13610
13610
|
sandbox: true,
|
|
13611
|
-
call: ([value]) => budgetSandboxValue2(Object.getOwnPropertyNames(
|
|
13611
|
+
call: ([value]) => budgetSandboxValue2(Object.getOwnPropertyNames(reflectionProperties(value)), options.budget),
|
|
13612
13612
|
name: "getOwnPropertyNames"
|
|
13613
13613
|
}),
|
|
13614
13614
|
getOwnPropertySymbols: createSandboxClosure({
|
|
@@ -13656,6 +13656,11 @@ function createObjectArrayGlobals(options) {
|
|
|
13656
13656
|
setPrototypeOf: createSandboxClosure({
|
|
13657
13657
|
sandbox: true,
|
|
13658
13658
|
call: ([value, prototype]) => {
|
|
13659
|
+
if (value === null || value === void 0)
|
|
13660
|
+
throw new TypeError("Cannot set the prototype of null or undefined.");
|
|
13661
|
+
if (prototype !== null && typeof prototype !== "object")
|
|
13662
|
+
throw new TypeError("Prototype must be an object or null.");
|
|
13663
|
+
if (typeof value !== "object") return value;
|
|
13659
13664
|
objectProperties(value, true);
|
|
13660
13665
|
if (prototype !== null) objectProperties(prototype);
|
|
13661
13666
|
setSandboxPrototype(value, prototype, options.budget);
|
|
@@ -13958,6 +13963,11 @@ function assignSandboxValues(target, sources, budget, context) {
|
|
|
13958
13963
|
}
|
|
13959
13964
|
})();
|
|
13960
13965
|
}
|
|
13966
|
+
function reflectionProperties(value) {
|
|
13967
|
+
if (value !== null && value !== void 0 && typeof value !== "object")
|
|
13968
|
+
value = createSandboxBox(value);
|
|
13969
|
+
return objectProperties(value);
|
|
13970
|
+
}
|
|
13961
13971
|
function objectProperties(value, mutable = false) {
|
|
13962
13972
|
if (isSandboxMap(value) || isSandboxSet(value)) return getCollectionProperties(value);
|
|
13963
13973
|
if (isSandboxRegex(value)) return getRegexProperties(value);
|
|
@@ -40036,4 +40046,4 @@ export {
|
|
|
40036
40046
|
FileSnapshotBackend,
|
|
40037
40047
|
run
|
|
40038
40048
|
};
|
|
40039
|
-
//# sourceMappingURL=chunk-
|
|
40049
|
+
//# sourceMappingURL=chunk-5ICV3URR.js.map
|