@poe-platform/safe-js 0.1.130 → 0.1.132

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.
@@ -22,7 +22,7 @@ import {
22
22
  resolveFsConfig,
23
23
  splitFrontmatter,
24
24
  withBrokenPipeGuard
25
- } from "./chunks/chunk-SGKEOIQL.js";
25
+ } from "./chunks/chunk-TCWJR6OI.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-ZTGKRKQH.js";
37
+ } from "./chunks/chunk-7IGOMKO4.js";
38
38
  import "./chunks/chunk-4YIDX44G.js";
39
39
 
40
40
  // packages/safe-js/src/cli.ts
@@ -5,7 +5,7 @@ import {
5
5
  defineExtension,
6
6
  lint,
7
7
  run
8
- } from "./chunks/chunk-ZTGKRKQH.js";
8
+ } from "./chunks/chunk-7IGOMKO4.js";
9
9
  import "./chunks/chunk-4YIDX44G.js";
10
10
  export {
11
11
  Budget,
@@ -26,7 +26,7 @@ import {
26
26
  runWithSpawnUsageAccumulator,
27
27
  splitFrontmatter,
28
28
  supportsSpawnMode
29
- } from "./chunks/chunk-SGKEOIQL.js";
29
+ } from "./chunks/chunk-TCWJR6OI.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-ZTGKRKQH.js";
53
+ } from "./chunks/chunk-7IGOMKO4.js";
54
54
  import "./chunks/chunk-4YIDX44G.js";
55
55
 
56
56
  // packages/safe-js/src/parse.ts
@@ -4,6 +4,7 @@ import type { Budget, CompileTicket } from "./budget.js";
4
4
  import { CompileScope } from "./regex/compile-guard.js";
5
5
  import type { GeneratorChannel } from "./generator.js";
6
6
  import { type RegexPattern } from "./regex/parse.js";
7
+ import type { FunctionSource } from "../parse/function-source.js";
7
8
  export { createSandboxArguments, isSandboxArguments } from "./arguments.js";
8
9
  export { isSandboxMap, isSandboxSet } from "./collection-brands.js";
9
10
  declare const sandboxClosureBrand: unique symbol;
@@ -57,6 +58,7 @@ export type SandboxCallContext = {
57
58
  readonly invokeClosure?: (closure: SandboxClosure, args: readonly SandboxValue[], thisValue: SandboxValue, construct?: boolean) => Promise<SandboxValue>;
58
59
  };
59
60
  export type SandboxClosure = {
61
+ readonly sourceRange?: FunctionSource;
60
62
  readonly async?: true;
61
63
  readonly generator?: true;
62
64
  readonly sandbox?: true;
@@ -94,6 +96,7 @@ type CopyFromSandboxOptions = {
94
96
  compilation?: CompileScope;
95
97
  };
96
98
  export declare function createSandboxClosure(input: {
99
+ sourceRange?: FunctionSource;
97
100
  guest?: boolean;
98
101
  async?: boolean;
99
102
  generator?: boolean;
@@ -0,0 +1,7 @@
1
+ import type { FunctionNode } from "./parser.js";
2
+ export type FunctionSource = {
3
+ readonly text: string;
4
+ readonly start: number;
5
+ readonly end: number;
6
+ };
7
+ export declare const functionSources: WeakMap<FunctionNode, FunctionSource>;
@@ -1,5 +1,5 @@
1
1
  export declare const DUMP_FORMAT_VERSION = 1;
2
- export declare const EXECUTION_SEMANTICS = "jobs-v7";
2
+ export declare const EXECUTION_SEMANTICS = "jobs-v8";
3
3
  export type DumpableSnapshot = {
4
4
  sourceHash: string;
5
5
  [key: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.130",
3
+ "version": "0.1.132",
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.130",
61
+ "@poe-platform/safe-fs": "0.1.132",
62
62
  "yaml": "^2.8.2",
63
63
  "jose": "^6.1.3",
64
64
  "@types/node": "^25.2.2"