@ricsam/isolate-daemon 0.1.13 → 0.1.14
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/cjs/connection.cjs +453 -750
- package/dist/cjs/connection.cjs.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/connection.mjs +455 -753
- package/dist/mjs/connection.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/dist/types/types.d.ts +11 -19
- package/package.json +1 -1
package/dist/mjs/package.json
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
* Internal types for the isolate daemon.
|
|
3
3
|
*/
|
|
4
4
|
import type { Socket } from "node:net";
|
|
5
|
-
import type
|
|
6
|
-
import type { InternalRuntimeHandle } from "@ricsam/isolate-runtime";
|
|
5
|
+
import type { RuntimeHandle } from "@ricsam/isolate-runtime";
|
|
7
6
|
import type { CallbackRegistration } from "@ricsam/isolate-protocol";
|
|
8
|
-
import type { PlaywrightHandle } from "@ricsam/isolate-playwright";
|
|
9
|
-
import type { SourceMap } from "@ricsam/isolate-transform";
|
|
10
7
|
/**
|
|
11
8
|
* Options for starting the daemon.
|
|
12
9
|
*/
|
|
@@ -47,25 +44,11 @@ export interface DaemonStats {
|
|
|
47
44
|
*/
|
|
48
45
|
export interface IsolateInstance {
|
|
49
46
|
isolateId: string;
|
|
50
|
-
runtime:
|
|
47
|
+
runtime: RuntimeHandle;
|
|
51
48
|
ownerConnection: Socket | null;
|
|
52
49
|
callbacks: Map<number, CallbackRegistration>;
|
|
53
50
|
createdAt: number;
|
|
54
51
|
lastActivity: number;
|
|
55
|
-
/** Whether test environment is enabled */
|
|
56
|
-
testEnvironmentEnabled?: boolean;
|
|
57
|
-
/** Playwright handle for event management (if setup) */
|
|
58
|
-
playwrightHandle?: PlaywrightHandle;
|
|
59
|
-
/** Module loader callback ID (if registered) */
|
|
60
|
-
moduleLoaderCallbackId?: number;
|
|
61
|
-
/** Cache of compiled ES modules */
|
|
62
|
-
moduleCache?: Map<string, ivm.Module>;
|
|
63
|
-
/** Map from module to its filename (for tracking importer path) */
|
|
64
|
-
moduleToFilename?: Map<ivm.Module, string>;
|
|
65
|
-
/** Pending callback promises for current eval */
|
|
66
|
-
pendingCallbacks: Promise<unknown>[];
|
|
67
|
-
/** Source maps for error stack trace mapping */
|
|
68
|
-
sourceMaps?: Map<string, SourceMap>;
|
|
69
52
|
/** Functions returned by custom function calls (callable from isolate) */
|
|
70
53
|
returnedCallbacks?: Map<number, Function>;
|
|
71
54
|
/** Promises returned by custom function calls (resolvable from isolate) */
|
|
@@ -96,6 +79,15 @@ export interface CallbackContext {
|
|
|
96
79
|
fetch?: number;
|
|
97
80
|
/** Module loader callback ID */
|
|
98
81
|
moduleLoader?: number;
|
|
82
|
+
/** testEnvironment.onEvent callback ID */
|
|
83
|
+
testEnvironmentOnEvent?: number;
|
|
84
|
+
/** Playwright callback IDs */
|
|
85
|
+
playwright: {
|
|
86
|
+
handlerCallbackId?: number;
|
|
87
|
+
onBrowserConsoleLogCallbackId?: number;
|
|
88
|
+
onNetworkRequestCallbackId?: number;
|
|
89
|
+
onNetworkResponseCallbackId?: number;
|
|
90
|
+
};
|
|
99
91
|
/** FS callback IDs by name */
|
|
100
92
|
fs: {
|
|
101
93
|
readFile?: number;
|