@poe-platform/safe-js 0.1.95 → 0.1.97
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-ADIFHHXM.js → chunk-INBDLJSN.js} +2 -2
- package/dist/safe-js/chunks/{chunk-T3NC5O24.js → chunk-XC53RECY.js} +54 -27
- package/dist/safe-js/chunks/chunk-XC53RECY.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/budget.d.ts +1 -0
- package/dist/safe-js/interp/exceptions.d.ts +3 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-T3NC5O24.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-ADIFHHXM.js.map → chunk-INBDLJSN.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-INBDLJSN.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-XC53RECY.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-INBDLJSN.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-XC53RECY.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -2,6 +2,7 @@ import type { BreakStatement, ContinueStatement, ParseResult, ThrowStatement, Tr
|
|
|
2
2
|
import { type SandboxErrorName, type ErrorSourceSpan } from "../error/shape.js";
|
|
3
3
|
import { type Budget } from "./budget.js";
|
|
4
4
|
import type { Scope } from "./scope.js";
|
|
5
|
+
import type { InterpreterError } from "./interpreter.js";
|
|
5
6
|
import { type SandboxObject, type SandboxValue } from "./values.js";
|
|
6
7
|
declare const capturedExceptionBrand: unique symbol;
|
|
7
8
|
export type { SandboxErrorName } from "../error/shape.js";
|
|
@@ -35,6 +36,8 @@ type ExceptionContext = {
|
|
|
35
36
|
type EvaluateExceptionNode<TContext, TError> = (node: ParseResult, context: TContext) => Promise<EvaluationResult<TError>>;
|
|
36
37
|
export declare function evaluateThrowStatement<TContext extends ExceptionContext, TError>(node: ThrowStatement, context: TContext, evaluateNode: EvaluateExceptionNode<TContext, TError>): Promise<EvaluationResult<TError>>;
|
|
37
38
|
export declare function evaluateTryStatement<TContext extends ExceptionContext, TError>(node: TryStatement, context: TContext, evaluateNode: EvaluateExceptionNode<TContext, TError>): Promise<EvaluationResult<TError>>;
|
|
39
|
+
export declare function createThrowCompletion(error: unknown, budget: Budget, stackFrames: readonly string[], span?: ErrorSourceSpan): CompletionResult;
|
|
40
|
+
export declare function isInterpreterError(value: unknown): value is InterpreterError;
|
|
38
41
|
export declare function createCapturedException(reason: unknown, stackFrames: readonly string[], sandbox?: boolean): CapturedException;
|
|
39
42
|
export declare function isCapturedException(value: unknown): value is CapturedException;
|
|
40
43
|
export declare function coerceThrownValue(reason: unknown, budget: Budget, stackFrames: readonly string[], span?: ErrorSourceSpan, sandbox?: boolean): SandboxValue;
|
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.97",
|
|
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.97",
|
|
62
62
|
"yaml": "^2.8.2",
|
|
63
63
|
"jose": "^6.1.3",
|
|
64
64
|
"@types/node": "^25.2.2"
|