@poe-platform/safe-js 0.1.87 → 0.1.89
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-J6FLHEO5.js → chunk-KWV4LCEU.js} +2 -2
- package/dist/safe-js/chunks/{chunk-GO774BRE.js → chunk-M4M56OCI.js} +240 -184
- package/dist/safe-js/chunks/chunk-M4M56OCI.js.map +7 -0
- 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/async.d.ts +1 -0
- package/dist/safe-js/interp/exceptions.d.ts +1 -0
- package/dist/safe-js/interp/interpreter.d.ts +1 -0
- package/dist/safe-js/interp/patterns.d.ts +1 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-GO774BRE.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-J6FLHEO5.js.map → chunk-KWV4LCEU.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-KWV4LCEU.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-M4M56OCI.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-KWV4LCEU.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-M4M56OCI.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -52,6 +52,7 @@ export declare function emitResumeBreakpoint(context: AsyncEvaluationContext, br
|
|
|
52
52
|
export declare function evaluateArrowFunctionExpression(node: ArrowFunctionExpression, context: AsyncEvaluationContext, evaluateNode: EvaluateAsyncNode): Promise<AsyncEvaluationResult>;
|
|
53
53
|
export declare function evaluateFunctionExpression(node: FunctionExpression, context: AsyncEvaluationContext, evaluateNode: EvaluateAsyncNode): Promise<AsyncEvaluationResult>;
|
|
54
54
|
export declare function createInterpretedClosure(node: ArrowFunctionExpression | FunctionDeclaration | FunctionExpression, context: AsyncEvaluationContext, evaluateNode: EvaluateAsyncNode): import("./values.js").SandboxClosure;
|
|
55
|
+
export declare function executeAsyncFunction(execute: (onSuspend: () => void) => Promise<SandboxValue>, budget: Budget, signal?: AbortSignal): import("./values.js").SandboxPromise;
|
|
55
56
|
export declare function evaluateAwaitExpression(node: AwaitExpression, context: AsyncEvaluationContext, evaluateNode: EvaluateAsyncNode): Promise<AsyncEvaluationResult>;
|
|
56
57
|
export declare function normalizeClosureResult(result: SandboxValue | Promise<SandboxValue> | PromiseLike<SandboxValue>, budget?: Budget): SandboxValue;
|
|
57
58
|
export {};
|
|
@@ -29,6 +29,7 @@ type ExceptionContext = {
|
|
|
29
29
|
budget: Budget;
|
|
30
30
|
callStack: readonly string[];
|
|
31
31
|
scope: Scope;
|
|
32
|
+
toPropertyKey?: (value: SandboxValue) => Promise<string>;
|
|
32
33
|
};
|
|
33
34
|
type EvaluateExceptionNode<TContext, TError> = (node: ParseResult, context: TContext) => Promise<EvaluationResult<TError>>;
|
|
34
35
|
export declare function evaluateThrowStatement<TContext extends ExceptionContext, TError>(node: ThrowStatement, context: TContext, evaluateNode: EvaluateExceptionNode<TContext, TError>): Promise<EvaluationResult<TError>>;
|
|
@@ -11,6 +11,7 @@ export type PatternTarget = {
|
|
|
11
11
|
};
|
|
12
12
|
export type PatternContext = {
|
|
13
13
|
evaluate(node: ParseResult): Promise<AsyncEvaluationResult>;
|
|
14
|
+
toPropertyKey(value: SandboxValue): Promise<string>;
|
|
14
15
|
getProperty(value: SandboxValue, key: string | number): SandboxValue;
|
|
15
16
|
setProperty(target: SandboxValue, key: string | number, value: SandboxValue): void;
|
|
16
17
|
};
|
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.89",
|
|
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.89",
|
|
62
62
|
"yaml": "^2.8.2",
|
|
63
63
|
"jose": "^6.1.3",
|
|
64
64
|
"@types/node": "^25.2.2"
|