@poe-platform/safe-js 0.1.451 → 0.1.453
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-YIPIBBVN.js → chunk-CEBPHXBL.js} +2 -2
- package/dist/safe-js/chunks/{chunk-7OZYVM5K.js → chunk-E2VDSNJC.js} +290 -13
- package/dist/safe-js/chunks/{chunk-7OZYVM5K.js.map → chunk-E2VDSNJC.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/dist/safe-js/interp/intl-listformat.d.ts +16 -0
- package/dist/safe-js/interp/intl-relativetimeformat.d.ts +18 -0
- package/dist/safe-js/snapshot/guest-heap.d.ts +10 -0
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-YIPIBBVN.js.map → chunk-CEBPHXBL.js.map} +0 -0
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-CEBPHXBL.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-E2VDSNJC.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-CEBPHXBL.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-E2VDSNJC.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SandboxObject } from "./values.js";
|
|
2
|
+
export type ResolvedListFormatOptions = {
|
|
3
|
+
locale: string;
|
|
4
|
+
type: "conjunction" | "disjunction" | "unit";
|
|
5
|
+
style: "long" | "short" | "narrow";
|
|
6
|
+
};
|
|
7
|
+
export declare function createSandboxListFormat(locales: string | string[], options: Intl.ListFormatOptions): SandboxObject;
|
|
8
|
+
export declare function isSandboxListFormat(value: unknown): value is SandboxObject;
|
|
9
|
+
export declare function listFormatState(value: unknown): {
|
|
10
|
+
native: Intl.ListFormat;
|
|
11
|
+
options: ResolvedListFormatOptions;
|
|
12
|
+
};
|
|
13
|
+
export declare function formatList(value: unknown, strings: string[], parts: boolean): string | Array<{
|
|
14
|
+
type: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SandboxObject } from "./values.js";
|
|
2
|
+
export type ResolvedRelativeTimeFormatOptions = {
|
|
3
|
+
locale: string;
|
|
4
|
+
numberingSystem: string;
|
|
5
|
+
style: "long" | "short" | "narrow";
|
|
6
|
+
numeric: "always" | "auto";
|
|
7
|
+
};
|
|
8
|
+
export declare function createSandboxRelativeTimeFormat(locales: string | string[], options: Intl.RelativeTimeFormatOptions): SandboxObject;
|
|
9
|
+
export declare function isSandboxRelativeTimeFormat(value: unknown): value is SandboxObject;
|
|
10
|
+
export declare function relativeTimeFormatState(value: unknown): {
|
|
11
|
+
native: Intl.RelativeTimeFormat;
|
|
12
|
+
options: ResolvedRelativeTimeFormatOptions;
|
|
13
|
+
};
|
|
14
|
+
export declare function formatRelativeTime(value: unknown, amount: number, unit: string, parts: boolean): string | Array<{
|
|
15
|
+
type: string;
|
|
16
|
+
value: string;
|
|
17
|
+
unit?: string;
|
|
18
|
+
}>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type SandboxErrorName } from "../error/shape.js";
|
|
2
2
|
import { type ResolvedCollatorOptions } from "../interp/intl-collator.js";
|
|
3
|
+
import { type ResolvedListFormatOptions } from "../interp/intl-listformat.js";
|
|
4
|
+
import { type ResolvedRelativeTimeFormatOptions } from "../interp/intl-relativetimeformat.js";
|
|
3
5
|
import { type NumberFormatOptions } from "../interp/intl-numberformat.js";
|
|
4
6
|
import { type CollectionIterationMethod } from "../interp/collection-iterator.js";
|
|
5
7
|
import { type IteratorHelperState } from "../interp/iterator-helper.js";
|
|
@@ -229,6 +231,14 @@ export type GuestHeapNode<T> = {
|
|
|
229
231
|
options: NumberFormatOptions;
|
|
230
232
|
format?: T;
|
|
231
233
|
state: GuestObjectState<T>;
|
|
234
|
+
} | {
|
|
235
|
+
kind: "guest-listformat";
|
|
236
|
+
options: ResolvedListFormatOptions;
|
|
237
|
+
state: GuestObjectState<T>;
|
|
238
|
+
} | {
|
|
239
|
+
kind: "guest-relativetimeformat";
|
|
240
|
+
options: ResolvedRelativeTimeFormatOptions;
|
|
241
|
+
state: GuestObjectState<T>;
|
|
232
242
|
} | {
|
|
233
243
|
kind: "iterator-helper";
|
|
234
244
|
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.453",
|
|
4
4
|
"description": "Budgeted JavaScript interpreter with explicit host capabilities and resumable execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@poe-platform/safe-fs": "0.1.
|
|
61
|
+
"@poe-platform/safe-fs": "0.1.453",
|
|
62
62
|
"@petamoriken/float16": "^3.9.3",
|
|
63
63
|
"@formatjs/intl-localematcher": "0.8.13",
|
|
64
64
|
"@formatjs/bigdecimal": "0.2.7",
|
|
File without changes
|