@poe-platform/safe-js 0.1.448 → 0.1.449
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-D32JKK5K.js → chunk-264RHYEA.js} +195 -19
- package/dist/safe-js/chunks/chunk-264RHYEA.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-HPTZH7MW.js → chunk-FOE6VBOD.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-collator.d.ts +20 -0
- package/dist/safe-js/snapshot/guest-heap.d.ts +6 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-D32JKK5K.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-HPTZH7MW.js.map → chunk-FOE6VBOD.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-264RHYEA.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-FOE6VBOD.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-FOE6VBOD.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-264RHYEA.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-FOE6VBOD.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-264RHYEA.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Budget } from "./budget.js";
|
|
2
|
+
import type { SandboxCallContext, SandboxClosure, SandboxObject, SandboxValue } from "./values.js";
|
|
3
|
+
export type ResolvedCollatorOptions = {
|
|
4
|
+
locale: string;
|
|
5
|
+
usage: "sort" | "search";
|
|
6
|
+
sensitivity: "base" | "accent" | "case" | "variant";
|
|
7
|
+
ignorePunctuation: boolean;
|
|
8
|
+
collation: string;
|
|
9
|
+
numeric: boolean;
|
|
10
|
+
caseFirst: "upper" | "lower" | "false";
|
|
11
|
+
};
|
|
12
|
+
export declare function readCollatorOptions(input: SandboxValue, budget: Budget, context?: SandboxCallContext, invalid?: (key: string, text: string) => void): Promise<Record<string, string | boolean>>;
|
|
13
|
+
export declare function createSandboxCollator(locales: string | string[], options: Record<string, string | boolean>): SandboxObject;
|
|
14
|
+
export declare function isSandboxCollator(value: unknown): value is SandboxObject;
|
|
15
|
+
export declare function collatorState(value: unknown): {
|
|
16
|
+
options: ResolvedCollatorOptions;
|
|
17
|
+
native: Intl.Collator;
|
|
18
|
+
compare?: SandboxClosure;
|
|
19
|
+
};
|
|
20
|
+
export declare function compareCollatorStrings(value: unknown, first: string, second: string): number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SandboxErrorName } from "../error/shape.js";
|
|
2
|
+
import { type ResolvedCollatorOptions } from "../interp/intl-collator.js";
|
|
2
3
|
import { type CollectionIterationMethod } from "../interp/collection-iterator.js";
|
|
3
4
|
import { type IteratorHelperState } from "../interp/iterator-helper.js";
|
|
4
5
|
import { type ScopeFrame } from "../interp/scope.js";
|
|
@@ -217,6 +218,11 @@ export type GuestHeapNode<T> = {
|
|
|
217
218
|
kind: "guest-locale";
|
|
218
219
|
tag: string;
|
|
219
220
|
state: GuestObjectState<T>;
|
|
221
|
+
} | {
|
|
222
|
+
kind: "guest-collator";
|
|
223
|
+
options: ResolvedCollatorOptions;
|
|
224
|
+
compare?: T;
|
|
225
|
+
state: GuestObjectState<T>;
|
|
220
226
|
} | {
|
|
221
227
|
kind: "iterator-helper";
|
|
222
228
|
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.449",
|
|
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.449",
|
|
62
62
|
"@petamoriken/float16": "^3.9.3",
|
|
63
63
|
"yaml": "^2.8.2",
|
|
64
64
|
"jose": "^6.1.3",
|