@poe-platform/safe-js 0.1.445 → 0.1.446
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-UDJ5WEWH.js → chunk-E6MWIIYR.js} +2 -2
- package/dist/safe-js/chunks/{chunk-EMOUVQDE.js → chunk-F5KDPGJX.js} +26 -1
- package/dist/safe-js/chunks/{chunk-EMOUVQDE.js.map → chunk-F5KDPGJX.js.map} +4 -4
- 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-UDJ5WEWH.js.map → chunk-E6MWIIYR.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-F5KDPGJX.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-E6MWIIYR.js.map
|
|
@@ -25547,6 +25547,29 @@ function createReflectGlobal(budget) {
|
|
|
25547
25547
|
return reflect;
|
|
25548
25548
|
}
|
|
25549
25549
|
|
|
25550
|
+
// packages/safe-js/src/interp/globals/intl.ts
|
|
25551
|
+
var supportedValuesOf = Intl.supportedValuesOf;
|
|
25552
|
+
function createIntlGlobal(budget) {
|
|
25553
|
+
const methods2 = {
|
|
25554
|
+
getCanonicalLocales: async ([locales], context) => allocateProducedSandboxValue(await canonicalizeGuestLocales(locales, budget, context), budget),
|
|
25555
|
+
supportedValuesOf: async ([key], context) => {
|
|
25556
|
+
const text = await sandboxString(key, budget, context);
|
|
25557
|
+
budget.visitNode(text.length);
|
|
25558
|
+
return allocateProducedSandboxValue(supportedValuesOf(text), budget);
|
|
25559
|
+
}
|
|
25560
|
+
};
|
|
25561
|
+
const intl = createIntrinsicObject();
|
|
25562
|
+
for (const [name, call] of Object.entries(methods2)) {
|
|
25563
|
+
const closure = createSandboxClosure({ guest: true, sandbox: true, name, length: 1, call });
|
|
25564
|
+
Object.defineProperty(intl, name, { value: closure, writable: true, configurable: true });
|
|
25565
|
+
}
|
|
25566
|
+
Object.defineProperty(intl, Symbol.toStringTag, { value: "Intl", configurable: true });
|
|
25567
|
+
registerBuiltinIdentities(budget, { Intl: intl });
|
|
25568
|
+
for (const name of Object.keys(methods2)) registerIntrinsicFunction(budget, intl[name]);
|
|
25569
|
+
registerIntrinsicObject(budget, intl);
|
|
25570
|
+
return intl;
|
|
25571
|
+
}
|
|
25572
|
+
|
|
25550
25573
|
// packages/safe-js/src/interp/globals.ts
|
|
25551
25574
|
function createBuiltinBindings(options) {
|
|
25552
25575
|
const bindings = {
|
|
@@ -25563,6 +25586,7 @@ function createBuiltinBindings(options) {
|
|
|
25563
25586
|
DisposableStack: createDisposableStackGlobal(options.budget),
|
|
25564
25587
|
AsyncDisposableStack: createAsyncDisposableStackGlobal(options.budget),
|
|
25565
25588
|
Reflect: createReflectGlobal(options.budget),
|
|
25589
|
+
Intl: createIntlGlobal(options.budget),
|
|
25566
25590
|
ArrayBuffer: createArrayBufferGlobal(options.budget),
|
|
25567
25591
|
DataView: createDataViewGlobal(options.budget),
|
|
25568
25592
|
...createMiscGlobals(options),
|
|
@@ -35061,6 +35085,7 @@ var KNOWN_RUNTIME_GLOBALS = [
|
|
|
35061
35085
|
"Error",
|
|
35062
35086
|
"EvalError",
|
|
35063
35087
|
"Infinity",
|
|
35088
|
+
"Intl",
|
|
35064
35089
|
"globalThis",
|
|
35065
35090
|
"isFinite",
|
|
35066
35091
|
"isNaN",
|
|
@@ -47613,4 +47638,4 @@ export {
|
|
|
47613
47638
|
FileSnapshotBackend,
|
|
47614
47639
|
run
|
|
47615
47640
|
};
|
|
47616
|
-
//# sourceMappingURL=chunk-
|
|
47641
|
+
//# sourceMappingURL=chunk-F5KDPGJX.js.map
|