@poe-platform/safe-js 0.1.253 → 0.1.254
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-FTO62YAZ.js → chunk-4MBS7HVN.js} +2 -2
- package/dist/safe-js/chunks/{chunk-F46UKJYT.js → chunk-VFXTEJXR.js} +9 -3
- package/dist/safe-js/chunks/{chunk-F46UKJYT.js.map → chunk-VFXTEJXR.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-FTO62YAZ.js.map → chunk-4MBS7HVN.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VFXTEJXR.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-4MBS7HVN.js.map
|
|
@@ -22174,12 +22174,14 @@ function createMathGlobals(options = {}) {
|
|
|
22174
22174
|
PI: Math.PI,
|
|
22175
22175
|
SQRT1_2: Math.SQRT1_2,
|
|
22176
22176
|
SQRT2: Math.SQRT2,
|
|
22177
|
-
random: createSandboxClosure({ sandbox: true, call: () => random(), name: "random" })
|
|
22177
|
+
random: createSandboxClosure({ sandbox: true, guest: true, call: () => random(), name: "random", length: 0 })
|
|
22178
22178
|
};
|
|
22179
22179
|
for (const [name, method] of Object.entries(mathMethods)) {
|
|
22180
22180
|
const variadic = method === Math.max || method === Math.min || method === Math.hypot;
|
|
22181
22181
|
mathObject[name] = createSandboxClosure({
|
|
22182
22182
|
sandbox: true,
|
|
22183
|
+
guest: true,
|
|
22184
|
+
length: method.length,
|
|
22183
22185
|
call: (args, context) => callNumericMethod(method, args, variadic, budget, context),
|
|
22184
22186
|
name
|
|
22185
22187
|
});
|
|
@@ -22193,6 +22195,11 @@ function createMathGlobals(options = {}) {
|
|
|
22193
22195
|
});
|
|
22194
22196
|
}
|
|
22195
22197
|
Object.defineProperty(mathObject, Symbol.toStringTag, { value: "Math", configurable: true });
|
|
22198
|
+
registerBuiltinIdentities(budget, { Math: mathObject });
|
|
22199
|
+
for (const descriptor of Object.values(Object.getOwnPropertyDescriptors(mathObject))) {
|
|
22200
|
+
if (isSandboxClosure(descriptor.value)) registerIntrinsicFunction(budget, descriptor.value);
|
|
22201
|
+
}
|
|
22202
|
+
registerIntrinsicObject(budget, mathObject);
|
|
22196
22203
|
return {
|
|
22197
22204
|
Infinity: Infinity,
|
|
22198
22205
|
Math: mathObject,
|
|
@@ -22897,7 +22904,6 @@ function createBuiltinBindings(options) {
|
|
|
22897
22904
|
...createRegexGlobals(options)
|
|
22898
22905
|
};
|
|
22899
22906
|
registerBuiltinIdentities(options.budget, bindings);
|
|
22900
|
-
registerIntrinsicObject(options.budget, bindings.Math);
|
|
22901
22907
|
return bindings;
|
|
22902
22908
|
}
|
|
22903
22909
|
|
|
@@ -39614,4 +39620,4 @@ export {
|
|
|
39614
39620
|
FileSnapshotBackend,
|
|
39615
39621
|
run
|
|
39616
39622
|
};
|
|
39617
|
-
//# sourceMappingURL=chunk-
|
|
39623
|
+
//# sourceMappingURL=chunk-VFXTEJXR.js.map
|