@poe-platform/safe-js 0.1.138 → 0.1.139
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/README.md +2 -2
- package/dist/safe-js/chunks/{chunk-WBWD7ZCM.js → chunk-EZAX76DY.js} +1621 -760
- package/dist/safe-js/chunks/chunk-EZAX76DY.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-3PGVVY7D.js → chunk-I5E3GOL7.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/exceptions.d.ts +1 -1
- package/dist/safe-js/interp/interpreter.d.ts +2 -2
- package/dist/safe-js/interp/patterns.d.ts +2 -2
- package/dist/safe-js/interp/values.d.ts +2 -1
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-WBWD7ZCM.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-3PGVVY7D.js.map → chunk-I5E3GOL7.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-EZAX76DY.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-I5E3GOL7.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-I5E3GOL7.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-EZAX76DY.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-I5E3GOL7.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-EZAX76DY.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -31,7 +31,7 @@ type ExceptionContext = {
|
|
|
31
31
|
callStack: readonly string[];
|
|
32
32
|
scope: Scope;
|
|
33
33
|
toPropertyKey?: (value: SandboxValue) => Promise<string>;
|
|
34
|
-
getProperty?: (value: SandboxValue, key: string | number) => SandboxValue
|
|
34
|
+
getProperty?: (value: SandboxValue, key: string | number) => SandboxValue | Promise<SandboxValue>;
|
|
35
35
|
};
|
|
36
36
|
type EvaluateExceptionNode<TContext, TError> = (node: ParseResult, context: TContext) => Promise<EvaluationResult<TError>>;
|
|
37
37
|
export declare function evaluateThrowStatement<TContext extends ExceptionContext, TError>(node: ThrowStatement, context: TContext, evaluateNode: EvaluateExceptionNode<TContext, TError>): Promise<EvaluationResult<TError>>;
|
|
@@ -5,7 +5,7 @@ import type { GeneratorCompletion } from "./generator.js";
|
|
|
5
5
|
import { Budget, type CompileOwner } from "./budget.js";
|
|
6
6
|
import { CompileScope } from "./regex/compile-guard.js";
|
|
7
7
|
import { type PatternContext } from "./patterns.js";
|
|
8
|
-
import { type SandboxValue } from "./values.js";
|
|
8
|
+
import { type SandboxCallContext, type SandboxValue } from "./values.js";
|
|
9
9
|
import { Scope } from "./scope.js";
|
|
10
10
|
export type InterpreterValue = SandboxValue;
|
|
11
11
|
export type InterpreterStats = {
|
|
@@ -71,4 +71,4 @@ export declare function interpret(node: ParseResult, options?: InterpretOptions)
|
|
|
71
71
|
export { Scope } from "./scope.js";
|
|
72
72
|
declare function evaluateNode(node: ParseResult, context: EvaluationContext): Promise<EvaluationResult>;
|
|
73
73
|
export declare function createPatternContext(context: AsyncEvaluationContext, scope?: Scope, evaluate?: typeof evaluateNode): PatternContext;
|
|
74
|
-
export declare function setSandboxProperty(target: SandboxValue, property: string | number, value: SandboxValue, budget: Budget, checkInherited?: boolean): void
|
|
74
|
+
export declare function setSandboxProperty(target: SandboxValue, property: string | number, value: SandboxValue, budget: Budget, checkInherited?: boolean, context?: SandboxCallContext): void | Promise<void>;
|
|
@@ -14,8 +14,8 @@ export type PatternContext = {
|
|
|
14
14
|
budget?: Budget;
|
|
15
15
|
evaluate(node: ParseResult, inferredName?: string): Promise<AsyncEvaluationResult>;
|
|
16
16
|
toPropertyKey(value: SandboxValue): Promise<string>;
|
|
17
|
-
getProperty(value: SandboxValue, key: string | number): SandboxValue
|
|
18
|
-
setProperty(target: SandboxValue, key: string | number, value: SandboxValue): void
|
|
17
|
+
getProperty(value: SandboxValue, key: string | number): SandboxValue | Promise<SandboxValue>;
|
|
18
|
+
setProperty(target: SandboxValue, key: string | number, value: SandboxValue): void | Promise<void>;
|
|
19
19
|
};
|
|
20
20
|
export type BindPatternResult = {
|
|
21
21
|
ok: true;
|
|
@@ -54,7 +54,7 @@ export type SandboxCallContext = {
|
|
|
54
54
|
};
|
|
55
55
|
readonly stack: readonly string[];
|
|
56
56
|
readonly thisValue: SandboxValue;
|
|
57
|
-
readonly getProperty?: (value: SandboxValue, property: string | number) => SandboxValue
|
|
57
|
+
readonly getProperty?: (value: SandboxValue, property: string | number) => SandboxValue | Promise<SandboxValue>;
|
|
58
58
|
readonly reconcileData?: (value: SandboxValue) => void;
|
|
59
59
|
readonly invokeClosure?: (closure: SandboxClosure, args: readonly SandboxValue[], thisValue: SandboxValue, construct?: boolean, newTarget?: SandboxClosure) => Promise<SandboxValue>;
|
|
60
60
|
};
|
|
@@ -112,6 +112,7 @@ export declare function createSandboxClosure(input: {
|
|
|
112
112
|
retainedValues?: () => Iterable<SandboxValue>;
|
|
113
113
|
}): SandboxClosure;
|
|
114
114
|
export declare function ownEnumerableSandboxEntries(value: SandboxValue, excludedKeys?: ReadonlySet<string>): Array<[string, SandboxValue]>;
|
|
115
|
+
export declare function ownEnumerableSandboxKeys(value: SandboxValue): string[];
|
|
115
116
|
export declare function createSandboxPromise(promise: Promise<SandboxValue>, metadata?: {
|
|
116
117
|
trackReplay?: boolean;
|
|
117
118
|
synchronousPrefix?: Promise<void>;
|
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.139",
|
|
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.139",
|
|
62
62
|
"yaml": "^2.8.2",
|
|
63
63
|
"jose": "^6.1.3",
|
|
64
64
|
"@types/node": "^25.2.2"
|