sandboxedjs 0.1.83 → 0.1.85
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/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/{container-DtVUncWL.d.ts → container-BGmhPbSD.d.cts} +10 -1
- package/dist/{container-B14Q03ng.d.cts → container-DCwYX_Cx.d.ts} +10 -1
- package/dist/{contracts-DNkSvBCM.d.cts → contracts-BkWBTH8E.d.cts} +22 -3
- package/dist/{contracts-DNkSvBCM.d.ts → contracts-BkWBTH8E.d.ts} +22 -3
- package/dist/index.cjs +2386 -397
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -9
- package/dist/index.d.ts +19 -9
- package/dist/index.js +2386 -397
- package/dist/index.js.map +1 -1
- package/dist/{memory-volume-n-LY8Vdv.d.cts → memory-volume-DCm-DiXH.d.cts} +1 -1
- package/dist/{memory-volume-D4FLjyEU.d.ts → memory-volume-DJA-vFYW.d.ts} +1 -1
- package/dist/python/python.data +140 -145
- package/dist/python/python.js +1 -1
- package/dist/python/python.wasm +0 -0
- package/dist/python/runtime.json +3 -3
- package/dist/python-abi.cjs +18 -4
- package/dist/python-abi.cjs.map +1 -1
- package/dist/python-abi.d.cts +3 -3
- package/dist/python-abi.d.ts +3 -3
- package/dist/python-abi.js +18 -4
- package/dist/python-abi.js.map +1 -1
- package/dist/worker-entry.js +1407 -212
- package/dist/worker-entry.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as Shell, a as ShellIO, b as Session, N as Node, c as Command, K as Kernel, E as ExecContext, O as OutputStream, C as Container, B as BinaryBackend, d as createContainer } from './container-
|
|
2
|
-
export { e as BinaryExecutionRegistry, f as BinaryInfo, g as BinaryRequest, h as BufferSink, i as CallbackSink, j as CommandRegistry, k as ContainerFs, l as ContainerOptions, m as ContextInit, n as Env, o as ExecOptions, p as ExecResult, q as ExecutionDecision, r as ExecutionTier, F as FileData, s as FileInput, t as FileOutput, G as GroupEntry, H as HttpResponse, I as InputStream, J as Job, u as KernelOptions, L as ListeningPort, M as MANIFEST_FORMAT, v as MANIFEST_SCHEMA_VERSION, w as MountEntry, x as NetInterface, y as NetworkOptions, z as NetworkStack, A as NullInput, D as NullOutput, P as PYTHON_VERSION, Q as PasswdEntry, R as Pipe, T as Preparation, U as PreparedBinary, V as Process, W as ProcessKind, X as ProcessOptions, Y as ProcessState, Z as ProcessTable, _ as PythonCapabilities, $ as PythonOptions, a0 as PythonProfile, a1 as PythonRuntimeManifest, a2 as ResolvedExecutable, a3 as RunOptions, a4 as RunResult, a5 as SessionInit, a6 as SessionResult, a7 as SessionRunOptions, a8 as ShellExit, a9 as ShellInit, aa as ShellOptions, ab as SpawnHandle, ac as Stdio, ad as TeeOutput, ae as UserDatabase, af as Variables, ag as WasmCommandArtifact, ah as WasmTranslator, ai as binaryDigest, aj as braceExpand, ak as captureStdio, al as configurePython, am as createContext, an as createTranslationBackend, ao as createWasmCompatibilityBackend, ap as defineCommand, aq as expandWord, ar as expandWords, as as inspectElf, at as installWasmCommands, au as isElfBinary, av as isPythonAvailable, aw as resetPidCounter, ax as shellQuote, ay as validateManifest } from './container-
|
|
3
|
-
import { V as Vfs, C as Cred, R as RuntimeVolume, a as VirtualTcpNetwork, b as RuntimeHttpResponse, O as OutboundPolicy, S as SpawnChild, c as SyncSpawn, I as IpcTransport, d as VolumeStat, e as VolumeStats, f as RuntimePod, g as RuntimePackageInstaller, h as ChildSpawnConfig, i as ChildHandle, j as RuntimeProcess, k as RuntimeSocketPeer, l as RuntimeConnection } from './contracts-
|
|
4
|
-
export { D as DirEntry, m as ROOT_CRED, n as RuntimeProcessManager, o as RuntimeProcessResult, p as Stats, q as VirtualNode, r as VirtualProvider, W as WriteOptions, s as applyChmod, t as createChildProcessModule, u as formatMode, v as makeCred, w as octalMode, x as parseUmask } from './contracts-
|
|
5
|
-
import { M as MemoryVolume, a as MemoryVolumeSnapshotEntry } from './memory-volume-
|
|
1
|
+
import { S as Shell, a as ShellIO, b as Session, N as Node, c as Command, K as Kernel, E as ExecContext, O as OutputStream, C as Container, B as BinaryBackend, d as createContainer } from './container-BGmhPbSD.cjs';
|
|
2
|
+
export { e as BinaryExecutionRegistry, f as BinaryInfo, g as BinaryRequest, h as BufferSink, i as CallbackSink, j as CommandRegistry, k as ContainerFs, l as ContainerOptions, m as ContextInit, n as Env, o as ExecOptions, p as ExecResult, q as ExecutionDecision, r as ExecutionTier, F as FileData, s as FileInput, t as FileOutput, G as GroupEntry, H as HttpResponse, I as InputStream, J as Job, u as KernelOptions, L as ListeningPort, M as MANIFEST_FORMAT, v as MANIFEST_SCHEMA_VERSION, w as MountEntry, x as NetInterface, y as NetworkOptions, z as NetworkStack, A as NullInput, D as NullOutput, P as PYTHON_VERSION, Q as PasswdEntry, R as Pipe, T as Preparation, U as PreparedBinary, V as Process, W as ProcessKind, X as ProcessOptions, Y as ProcessState, Z as ProcessTable, _ as PythonCapabilities, $ as PythonOptions, a0 as PythonProfile, a1 as PythonRuntimeManifest, a2 as ResolvedExecutable, a3 as RunOptions, a4 as RunResult, a5 as SessionInit, a6 as SessionResult, a7 as SessionRunOptions, a8 as ShellExit, a9 as ShellInit, aa as ShellOptions, ab as SpawnHandle, ac as Stdio, ad as TeeOutput, ae as UserDatabase, af as Variables, ag as WasmCommandArtifact, ah as WasmTranslator, ai as binaryDigest, aj as braceExpand, ak as captureStdio, al as configurePython, am as createContext, an as createTranslationBackend, ao as createWasmCompatibilityBackend, ap as defineCommand, aq as expandWord, ar as expandWords, as as inspectElf, at as installWasmCommands, au as isElfBinary, av as isPythonAvailable, aw as resetPidCounter, ax as shellQuote, ay as validateManifest } from './container-BGmhPbSD.cjs';
|
|
3
|
+
import { V as Vfs, C as Cred, R as RuntimeVolume, a as VirtualTcpNetwork, b as RuntimeHttpResponse, O as OutboundPolicy, S as SpawnChild, c as SyncSpawn, I as IpcTransport, d as VolumeStat, e as VolumeStats, f as RuntimePod, g as RuntimePackageInstaller, h as ChildSpawnConfig, i as ChildHandle, j as RuntimeProcess, k as RuntimeSocketPeer, l as RuntimeConnection } from './contracts-BkWBTH8E.cjs';
|
|
4
|
+
export { D as DirEntry, m as ROOT_CRED, n as RuntimeProcessManager, o as RuntimeProcessResult, p as Stats, q as VirtualNode, r as VirtualProvider, W as WriteOptions, s as applyChmod, t as createChildProcessModule, u as formatMode, v as makeCred, w as octalMode, x as parseUmask } from './contracts-BkWBTH8E.cjs';
|
|
5
|
+
import { M as MemoryVolume, a as MemoryVolumeSnapshotEntry } from './memory-volume-DCm-DiXH.cjs';
|
|
6
6
|
import EventEmitter from 'events/events.js';
|
|
7
7
|
import streamModule from 'stream-browserify';
|
|
8
8
|
|
|
@@ -611,6 +611,9 @@ declare class VirtualServerResponse extends streamModule.Writable {
|
|
|
611
611
|
constructor(request: VirtualIncomingMessage);
|
|
612
612
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
613
613
|
_final(callback: (error?: Error | null) => void): void;
|
|
614
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
615
|
+
private settled;
|
|
616
|
+
private settle;
|
|
614
617
|
setHeader(name: string, value: string | number | readonly string[]): this;
|
|
615
618
|
appendHeader(name: string, value: string | readonly string[]): this;
|
|
616
619
|
getHeader(name: string): string | string[] | undefined;
|
|
@@ -620,6 +623,12 @@ declare class VirtualServerResponse extends streamModule.Writable {
|
|
|
620
623
|
removeHeader(name: string): void;
|
|
621
624
|
writeHead(statusCode: number, statusMessage?: string | Record<string, unknown>, headers?: Record<string, unknown>): this;
|
|
622
625
|
flushHeaders(): void;
|
|
626
|
+
_implicitHeader(): void;
|
|
627
|
+
get _header(): string | null;
|
|
628
|
+
get finished(): boolean;
|
|
629
|
+
chunkedEncoding: boolean;
|
|
630
|
+
useChunkedEncodingByDefault: boolean;
|
|
631
|
+
strictContentLength: boolean;
|
|
623
632
|
writeContinue(): void;
|
|
624
633
|
writeProcessing(): void;
|
|
625
634
|
addTrailers(_headers: Record<string, string>): void;
|
|
@@ -761,8 +770,9 @@ interface CoreModulesOptions {
|
|
|
761
770
|
cwd?: string;
|
|
762
771
|
env?: Record<string, string>;
|
|
763
772
|
argv?: string[];
|
|
764
|
-
|
|
765
|
-
|
|
773
|
+
/** A `Buffer` written to the stream arrives as bytes, a string as a string. */
|
|
774
|
+
stdout?: (chunk: string | Uint8Array) => void;
|
|
775
|
+
stderr?: (chunk: string | Uint8Array) => void;
|
|
766
776
|
onExit?: (code: number) => void;
|
|
767
777
|
http?: {
|
|
768
778
|
router: VirtualHttpRouter;
|
|
@@ -802,8 +812,8 @@ declare function createCoreModules(options: CoreModulesOptions): {
|
|
|
802
812
|
builtins: Record<string, unknown>;
|
|
803
813
|
globals: Record<string, unknown>;
|
|
804
814
|
process: Record<string, any>;
|
|
805
|
-
/** Deliver a chunk of input to an interactive `process.stdin
|
|
806
|
-
writeStdin(data: string): void;
|
|
815
|
+
/** Deliver a chunk of input to an interactive `process.stdin`; bytes stay bytes. */
|
|
816
|
+
writeStdin(data: string | Uint8Array): void;
|
|
807
817
|
/** Signal end-of-input to an interactive `process.stdin`. */
|
|
808
818
|
endStdin(): void;
|
|
809
819
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as Shell, a as ShellIO, b as Session, N as Node, c as Command, K as Kernel, E as ExecContext, O as OutputStream, C as Container, B as BinaryBackend, d as createContainer } from './container-
|
|
2
|
-
export { e as BinaryExecutionRegistry, f as BinaryInfo, g as BinaryRequest, h as BufferSink, i as CallbackSink, j as CommandRegistry, k as ContainerFs, l as ContainerOptions, m as ContextInit, n as Env, o as ExecOptions, p as ExecResult, q as ExecutionDecision, r as ExecutionTier, F as FileData, s as FileInput, t as FileOutput, G as GroupEntry, H as HttpResponse, I as InputStream, J as Job, u as KernelOptions, L as ListeningPort, M as MANIFEST_FORMAT, v as MANIFEST_SCHEMA_VERSION, w as MountEntry, x as NetInterface, y as NetworkOptions, z as NetworkStack, A as NullInput, D as NullOutput, P as PYTHON_VERSION, Q as PasswdEntry, R as Pipe, T as Preparation, U as PreparedBinary, V as Process, W as ProcessKind, X as ProcessOptions, Y as ProcessState, Z as ProcessTable, _ as PythonCapabilities, $ as PythonOptions, a0 as PythonProfile, a1 as PythonRuntimeManifest, a2 as ResolvedExecutable, a3 as RunOptions, a4 as RunResult, a5 as SessionInit, a6 as SessionResult, a7 as SessionRunOptions, a8 as ShellExit, a9 as ShellInit, aa as ShellOptions, ab as SpawnHandle, ac as Stdio, ad as TeeOutput, ae as UserDatabase, af as Variables, ag as WasmCommandArtifact, ah as WasmTranslator, ai as binaryDigest, aj as braceExpand, ak as captureStdio, al as configurePython, am as createContext, an as createTranslationBackend, ao as createWasmCompatibilityBackend, ap as defineCommand, aq as expandWord, ar as expandWords, as as inspectElf, at as installWasmCommands, au as isElfBinary, av as isPythonAvailable, aw as resetPidCounter, ax as shellQuote, ay as validateManifest } from './container-
|
|
3
|
-
import { V as Vfs, C as Cred, R as RuntimeVolume, a as VirtualTcpNetwork, b as RuntimeHttpResponse, O as OutboundPolicy, S as SpawnChild, c as SyncSpawn, I as IpcTransport, d as VolumeStat, e as VolumeStats, f as RuntimePod, g as RuntimePackageInstaller, h as ChildSpawnConfig, i as ChildHandle, j as RuntimeProcess, k as RuntimeSocketPeer, l as RuntimeConnection } from './contracts-
|
|
4
|
-
export { D as DirEntry, m as ROOT_CRED, n as RuntimeProcessManager, o as RuntimeProcessResult, p as Stats, q as VirtualNode, r as VirtualProvider, W as WriteOptions, s as applyChmod, t as createChildProcessModule, u as formatMode, v as makeCred, w as octalMode, x as parseUmask } from './contracts-
|
|
5
|
-
import { M as MemoryVolume, a as MemoryVolumeSnapshotEntry } from './memory-volume-
|
|
1
|
+
import { S as Shell, a as ShellIO, b as Session, N as Node, c as Command, K as Kernel, E as ExecContext, O as OutputStream, C as Container, B as BinaryBackend, d as createContainer } from './container-DCwYX_Cx.js';
|
|
2
|
+
export { e as BinaryExecutionRegistry, f as BinaryInfo, g as BinaryRequest, h as BufferSink, i as CallbackSink, j as CommandRegistry, k as ContainerFs, l as ContainerOptions, m as ContextInit, n as Env, o as ExecOptions, p as ExecResult, q as ExecutionDecision, r as ExecutionTier, F as FileData, s as FileInput, t as FileOutput, G as GroupEntry, H as HttpResponse, I as InputStream, J as Job, u as KernelOptions, L as ListeningPort, M as MANIFEST_FORMAT, v as MANIFEST_SCHEMA_VERSION, w as MountEntry, x as NetInterface, y as NetworkOptions, z as NetworkStack, A as NullInput, D as NullOutput, P as PYTHON_VERSION, Q as PasswdEntry, R as Pipe, T as Preparation, U as PreparedBinary, V as Process, W as ProcessKind, X as ProcessOptions, Y as ProcessState, Z as ProcessTable, _ as PythonCapabilities, $ as PythonOptions, a0 as PythonProfile, a1 as PythonRuntimeManifest, a2 as ResolvedExecutable, a3 as RunOptions, a4 as RunResult, a5 as SessionInit, a6 as SessionResult, a7 as SessionRunOptions, a8 as ShellExit, a9 as ShellInit, aa as ShellOptions, ab as SpawnHandle, ac as Stdio, ad as TeeOutput, ae as UserDatabase, af as Variables, ag as WasmCommandArtifact, ah as WasmTranslator, ai as binaryDigest, aj as braceExpand, ak as captureStdio, al as configurePython, am as createContext, an as createTranslationBackend, ao as createWasmCompatibilityBackend, ap as defineCommand, aq as expandWord, ar as expandWords, as as inspectElf, at as installWasmCommands, au as isElfBinary, av as isPythonAvailable, aw as resetPidCounter, ax as shellQuote, ay as validateManifest } from './container-DCwYX_Cx.js';
|
|
3
|
+
import { V as Vfs, C as Cred, R as RuntimeVolume, a as VirtualTcpNetwork, b as RuntimeHttpResponse, O as OutboundPolicy, S as SpawnChild, c as SyncSpawn, I as IpcTransport, d as VolumeStat, e as VolumeStats, f as RuntimePod, g as RuntimePackageInstaller, h as ChildSpawnConfig, i as ChildHandle, j as RuntimeProcess, k as RuntimeSocketPeer, l as RuntimeConnection } from './contracts-BkWBTH8E.js';
|
|
4
|
+
export { D as DirEntry, m as ROOT_CRED, n as RuntimeProcessManager, o as RuntimeProcessResult, p as Stats, q as VirtualNode, r as VirtualProvider, W as WriteOptions, s as applyChmod, t as createChildProcessModule, u as formatMode, v as makeCred, w as octalMode, x as parseUmask } from './contracts-BkWBTH8E.js';
|
|
5
|
+
import { M as MemoryVolume, a as MemoryVolumeSnapshotEntry } from './memory-volume-DJA-vFYW.js';
|
|
6
6
|
import EventEmitter from 'events/events.js';
|
|
7
7
|
import streamModule from 'stream-browserify';
|
|
8
8
|
|
|
@@ -611,6 +611,9 @@ declare class VirtualServerResponse extends streamModule.Writable {
|
|
|
611
611
|
constructor(request: VirtualIncomingMessage);
|
|
612
612
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
613
613
|
_final(callback: (error?: Error | null) => void): void;
|
|
614
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
615
|
+
private settled;
|
|
616
|
+
private settle;
|
|
614
617
|
setHeader(name: string, value: string | number | readonly string[]): this;
|
|
615
618
|
appendHeader(name: string, value: string | readonly string[]): this;
|
|
616
619
|
getHeader(name: string): string | string[] | undefined;
|
|
@@ -620,6 +623,12 @@ declare class VirtualServerResponse extends streamModule.Writable {
|
|
|
620
623
|
removeHeader(name: string): void;
|
|
621
624
|
writeHead(statusCode: number, statusMessage?: string | Record<string, unknown>, headers?: Record<string, unknown>): this;
|
|
622
625
|
flushHeaders(): void;
|
|
626
|
+
_implicitHeader(): void;
|
|
627
|
+
get _header(): string | null;
|
|
628
|
+
get finished(): boolean;
|
|
629
|
+
chunkedEncoding: boolean;
|
|
630
|
+
useChunkedEncodingByDefault: boolean;
|
|
631
|
+
strictContentLength: boolean;
|
|
623
632
|
writeContinue(): void;
|
|
624
633
|
writeProcessing(): void;
|
|
625
634
|
addTrailers(_headers: Record<string, string>): void;
|
|
@@ -761,8 +770,9 @@ interface CoreModulesOptions {
|
|
|
761
770
|
cwd?: string;
|
|
762
771
|
env?: Record<string, string>;
|
|
763
772
|
argv?: string[];
|
|
764
|
-
|
|
765
|
-
|
|
773
|
+
/** A `Buffer` written to the stream arrives as bytes, a string as a string. */
|
|
774
|
+
stdout?: (chunk: string | Uint8Array) => void;
|
|
775
|
+
stderr?: (chunk: string | Uint8Array) => void;
|
|
766
776
|
onExit?: (code: number) => void;
|
|
767
777
|
http?: {
|
|
768
778
|
router: VirtualHttpRouter;
|
|
@@ -802,8 +812,8 @@ declare function createCoreModules(options: CoreModulesOptions): {
|
|
|
802
812
|
builtins: Record<string, unknown>;
|
|
803
813
|
globals: Record<string, unknown>;
|
|
804
814
|
process: Record<string, any>;
|
|
805
|
-
/** Deliver a chunk of input to an interactive `process.stdin
|
|
806
|
-
writeStdin(data: string): void;
|
|
815
|
+
/** Deliver a chunk of input to an interactive `process.stdin`; bytes stay bytes. */
|
|
816
|
+
writeStdin(data: string | Uint8Array): void;
|
|
807
817
|
/** Signal end-of-input to an interactive `process.stdin`. */
|
|
808
818
|
endStdin(): void;
|
|
809
819
|
/**
|