@poe-platform/safe-js 0.1.169 → 0.1.170

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-MWL55BSP.js";
25
+ } from "./chunks/chunk-MZW43CYT.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-6UY4Z7WY.js";
37
+ } from "./chunks/chunk-WPI4GGVU.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-6UY4Z7WY.js";
8
+ } from "./chunks/chunk-WPI4GGVU.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-MWL55BSP.js";
29
+ } from "./chunks/chunk-MZW43CYT.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-6UY4Z7WY.js";
53
+ } from "./chunks/chunk-WPI4GGVU.js";
54
54
  import "./chunks/chunk-4YIDX44G.js";
55
55
 
56
56
  // packages/safe-js/src/parse.ts
@@ -0,0 +1,3 @@
1
+ import type { SandboxObject, SandboxRegex } from "./values.js";
2
+ export declare const regexGuestProperties: WeakMap<object, SandboxObject>;
3
+ export declare function getRegexProperties(value: SandboxRegex): SandboxObject;
@@ -1,3 +1,4 @@
1
+ export { getRegexProperties } from "./regexp-properties.js";
1
2
  import { sandboxMapBrand, sandboxSetBrand } from "./collection-brands.js";
2
3
  import { type SandboxCollectionIterator } from "./collection-iterator.js";
3
4
  import type { Budget, CompileTicket } from "./budget.js";
@@ -0,0 +1,18 @@
1
+ import { type SandboxRegex } from "../interp/values.js";
2
+ import { type SerializedSymbolProperty } from "./symbols.js";
3
+ type DataProperty<T> = {
4
+ value: T;
5
+ enumerable: boolean;
6
+ writable: boolean;
7
+ configurable: boolean;
8
+ };
9
+ export type RegexPropertyData<T> = {
10
+ properties?: Record<string, DataProperty<T>>;
11
+ symbolEntries?: Array<SerializedSymbolProperty<T>>;
12
+ extensible?: boolean;
13
+ };
14
+ export declare function hasCustomRegexProperties(value: SandboxRegex): boolean;
15
+ export declare function serializeRegexProperties<T>(value: SandboxRegex, encode: (entry: unknown) => T): RegexPropertyData<T>;
16
+ export declare function validateRegexProperties(data: RegexPropertyData<unknown>): void;
17
+ export declare function restoreRegexProperties<T>(value: SandboxRegex, data: RegexPropertyData<T>, decode: (entry: T) => unknown): void;
18
+ export {};
@@ -1,3 +1,4 @@
1
+ import { type RegexPropertyData } from "./regexp-properties.js";
1
2
  import { type SerializedSymbol, type SerializedSymbolProperty } from "./symbols.js";
2
3
  import { type CollectionIterationMethod } from "../interp/collection-iterator.js";
3
4
  import { CompileScope } from "../interp/regex/compile-guard.js";
@@ -70,12 +71,12 @@ type DataNode = SerializedSymbol | {
70
71
  } | {
71
72
  kind: "set";
72
73
  values: Atom[];
73
- } | {
74
+ } | ({
74
75
  kind: "regex";
75
76
  source: string;
76
77
  flags: string;
77
78
  lastIndex: Atom;
78
- };
79
+ } & RegexPropertyData<Atom>);
79
80
  export type ReplayData = {
80
81
  root: Atom;
81
82
  nodes: DataNode[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
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.169",
61
+ "@poe-platform/safe-fs": "0.1.170",
62
62
  "yaml": "^2.8.2",
63
63
  "jose": "^6.1.3",
64
64
  "@types/node": "^25.2.2"