@poe-platform/safe-js 0.1.449 → 0.1.451
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-7OZYVM5K.js +55542 -0
- package/dist/safe-js/chunks/chunk-7OZYVM5K.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-FOE6VBOD.js → chunk-YIPIBBVN.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/dist/safe-js/interp/intl-numberformat.d.ts +13 -0
- package/dist/safe-js/interp/numberformat-backend.d.ts +7 -0
- package/dist/safe-js/interp/numberformat-portable.d.ts +9 -0
- package/dist/safe-js/intl-data/dist/numberformat-engine.d.ts +1 -0
- package/dist/safe-js/snapshot/guest-heap.d.ts +6 -0
- package/package.json +5 -2
- package/dist/safe-js/chunks/chunk-264RHYEA.js +0 -48025
- package/dist/safe-js/chunks/chunk-264RHYEA.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-FOE6VBOD.js.map → chunk-YIPIBBVN.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7OZYVM5K.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-YIPIBBVN.js.map
|
package/dist/safe-js/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveFsConfig,
|
|
23
23
|
splitFrontmatter,
|
|
24
24
|
withBrokenPipeGuard
|
|
25
|
-
} from "./chunks/chunk-
|
|
25
|
+
} from "./chunks/chunk-YIPIBBVN.js";
|
|
26
26
|
import {
|
|
27
27
|
Budget,
|
|
28
28
|
SandboxError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
replaceErrorStack,
|
|
35
35
|
restore,
|
|
36
36
|
run
|
|
37
|
-
} from "./chunks/chunk-
|
|
37
|
+
} from "./chunks/chunk-7OZYVM5K.js";
|
|
38
38
|
import "./chunks/chunk-4YIDX44G.js";
|
|
39
39
|
|
|
40
40
|
// packages/safe-js/src/cli.ts
|
package/dist/safe-js/core.js
CHANGED
package/dist/safe-js/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runWithSpawnUsageAccumulator,
|
|
27
27
|
splitFrontmatter,
|
|
28
28
|
supportsSpawnMode
|
|
29
|
-
} from "./chunks/chunk-
|
|
29
|
+
} from "./chunks/chunk-YIPIBBVN.js";
|
|
30
30
|
import {
|
|
31
31
|
Budget,
|
|
32
32
|
FileSnapshotBackend,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
registerPendingHostCallPolicy,
|
|
51
51
|
restore,
|
|
52
52
|
run
|
|
53
|
-
} from "./chunks/chunk-
|
|
53
|
+
} from "./chunks/chunk-7OZYVM5K.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Budget } from "./budget.js";
|
|
2
|
+
import { createNumberFormatter } from "./numberformat-backend.js";
|
|
3
|
+
import type { SandboxCallContext, SandboxClosure, SandboxObject, SandboxValue } from "./values.js";
|
|
4
|
+
export type NumberFormatOptions = Record<string, string | number | boolean>;
|
|
5
|
+
export declare function createSandboxNumberFormat(locales: string | string[], options: NumberFormatOptions): SandboxObject;
|
|
6
|
+
export declare function isSandboxNumberFormat(value: unknown): value is SandboxObject;
|
|
7
|
+
export declare function numberFormatState(value: unknown): {
|
|
8
|
+
native: ReturnType<typeof createNumberFormatter>;
|
|
9
|
+
options: NumberFormatOptions;
|
|
10
|
+
format?: SandboxClosure;
|
|
11
|
+
};
|
|
12
|
+
export declare function numberFormatValue(value: SandboxValue, budget: Budget, context?: SandboxCallContext): Promise<number | bigint | string>;
|
|
13
|
+
export declare function formatNumberValue(receiver: unknown, method: "format" | "formatToParts" | "formatRange" | "formatRangeToParts", values: Array<number | bigint | string>): SandboxValue;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PortableFormatter, Options } from "./numberformat-portable.js";
|
|
2
|
+
import type { SandboxValue } from "./values.js";
|
|
3
|
+
type Formatter = Intl.NumberFormat | PortableFormatter;
|
|
4
|
+
export declare function createNumberFormatter(locales: string | string[], options: Options): Formatter;
|
|
5
|
+
export declare function numberFormatterOptions(formatter: Formatter): Options;
|
|
6
|
+
export declare function numberFormatterResult(formatter: Formatter, method: "format" | "formatToParts" | "formatRange" | "formatRangeToParts", values: Array<string | number | bigint>): SandboxValue;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NumberFormat as PortableNumberFormat } from "../intl-data/dist/numberformat-engine.js";
|
|
2
|
+
import type { SandboxValue } from "./values.js";
|
|
3
|
+
export type Options = Record<string, string | number | boolean>;
|
|
4
|
+
export type PortableFormatter = InstanceType<typeof PortableNumberFormat>;
|
|
5
|
+
type Formatter = PortableFormatter;
|
|
6
|
+
export declare function createPortableNumberFormatter(locales: string | string[], options: Options): Formatter;
|
|
7
|
+
export declare function numberFormatterOptions(formatter: Formatter): Options;
|
|
8
|
+
export declare function numberFormatterResult(formatter: Formatter, method: "format" | "formatToParts" | "formatRange" | "formatRangeToParts", values: Array<string | number | bigint>): SandboxValue;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumberFormat } from "@formatjs/intl-numberformat";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SandboxErrorName } from "../error/shape.js";
|
|
2
2
|
import { type ResolvedCollatorOptions } from "../interp/intl-collator.js";
|
|
3
|
+
import { type NumberFormatOptions } from "../interp/intl-numberformat.js";
|
|
3
4
|
import { type CollectionIterationMethod } from "../interp/collection-iterator.js";
|
|
4
5
|
import { type IteratorHelperState } from "../interp/iterator-helper.js";
|
|
5
6
|
import { type ScopeFrame } from "../interp/scope.js";
|
|
@@ -223,6 +224,11 @@ export type GuestHeapNode<T> = {
|
|
|
223
224
|
options: ResolvedCollatorOptions;
|
|
224
225
|
compare?: T;
|
|
225
226
|
state: GuestObjectState<T>;
|
|
227
|
+
} | {
|
|
228
|
+
kind: "guest-numberformat";
|
|
229
|
+
options: NumberFormatOptions;
|
|
230
|
+
format?: T;
|
|
231
|
+
state: GuestObjectState<T>;
|
|
226
232
|
} | {
|
|
227
233
|
kind: "iterator-helper";
|
|
228
234
|
method: IteratorHelperState["method"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.451",
|
|
4
4
|
"description": "Budgeted JavaScript interpreter with explicit host capabilities and resumable execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,10 +58,13 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@poe-platform/safe-fs": "0.1.
|
|
61
|
+
"@poe-platform/safe-fs": "0.1.451",
|
|
62
62
|
"@petamoriken/float16": "^3.9.3",
|
|
63
|
+
"@formatjs/intl-localematcher": "0.8.13",
|
|
64
|
+
"@formatjs/bigdecimal": "0.2.7",
|
|
63
65
|
"yaml": "^2.8.2",
|
|
64
66
|
"jose": "^6.1.3",
|
|
67
|
+
"@formatjs/intl-numberformat": "9.4.0",
|
|
65
68
|
"@types/node": "^25.2.2"
|
|
66
69
|
},
|
|
67
70
|
"bin": {
|