@ricsam/isolate-runtime 0.1.14 → 0.1.15
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/README.md +88 -24
- package/dist/cjs/index.cjs +308 -38
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +314 -24
- package/dist/mjs/index.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/dist/types/index.d.ts +41 -5
- package/package.json +1 -1
- package/dist/cjs/internal.cjs +0 -95
- package/dist/cjs/internal.cjs.map +0 -10
- package/dist/mjs/internal.mjs +0 -52
- package/dist/mjs/internal.mjs.map +0 -10
- package/dist/types/internal.d.ts +0 -39
package/dist/types/internal.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal APIs for @ricsam/isolate-runtime
|
|
3
|
-
*
|
|
4
|
-
* These are not part of the public API and may change without notice.
|
|
5
|
-
* Only used by @ricsam/isolate-daemon internally.
|
|
6
|
-
*/
|
|
7
|
-
import ivm from "isolated-vm";
|
|
8
|
-
import type { ConsoleOptions, ConsoleHandle } from "@ricsam/isolate-console";
|
|
9
|
-
import type { FetchOptions, FetchHandle } from "@ricsam/isolate-fetch";
|
|
10
|
-
import type { FsOptions } from "@ricsam/isolate-fs";
|
|
11
|
-
import type { TimersHandle } from "@ricsam/isolate-timers";
|
|
12
|
-
/**
|
|
13
|
-
* @internal Options for creating a legacy runtime.
|
|
14
|
-
*/
|
|
15
|
-
export interface InternalRuntimeOptions {
|
|
16
|
-
memoryLimitMB?: number;
|
|
17
|
-
console?: ConsoleOptions;
|
|
18
|
-
fetch?: FetchOptions;
|
|
19
|
-
fs?: FsOptions;
|
|
20
|
-
/** Current working directory for path.resolve(). Defaults to "/" */
|
|
21
|
-
cwd?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @internal Runtime handle with direct isolate/context access.
|
|
25
|
-
* Used by isolate-daemon for low-level operations.
|
|
26
|
-
*/
|
|
27
|
-
export interface InternalRuntimeHandle {
|
|
28
|
-
readonly isolate: ivm.Isolate;
|
|
29
|
-
readonly context: ivm.Context;
|
|
30
|
-
readonly fetch: FetchHandle;
|
|
31
|
-
readonly timers: TimersHandle;
|
|
32
|
-
readonly console: ConsoleHandle;
|
|
33
|
-
dispose(): void;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @internal Create a runtime with direct access to isolate and context.
|
|
37
|
-
* This is for internal use by @ricsam/isolate-daemon only.
|
|
38
|
-
*/
|
|
39
|
-
export declare function createInternalRuntime(options?: InternalRuntimeOptions): Promise<InternalRuntimeHandle>;
|