@ricsam/quickjs-runtime 0.2.13 → 0.2.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/dist/cjs/index.cjs +39 -3
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +42 -4
- package/dist/mjs/index.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/package.json +7 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -121,19 +121,55 @@ function setupRuntime(context, options = {}) {
|
|
|
121
121
|
if (!context.runtime.hasPendingJob())
|
|
122
122
|
break;
|
|
123
123
|
const result = context.runtime.executePendingJobs();
|
|
124
|
-
if (result.error)
|
|
124
|
+
if (result.error)
|
|
125
125
|
result.error.dispose();
|
|
126
|
-
}
|
|
127
126
|
}
|
|
128
127
|
timers?.dispose();
|
|
129
128
|
encoding?.dispose();
|
|
130
129
|
consoleHandle?.dispose();
|
|
131
130
|
fs?.dispose();
|
|
132
131
|
fetch?.dispose();
|
|
132
|
+
for (let i = 0;i < 1000; i++) {
|
|
133
|
+
if (!context.runtime.hasPendingJob())
|
|
134
|
+
break;
|
|
135
|
+
const result = context.runtime.executePendingJobs();
|
|
136
|
+
if (result.error)
|
|
137
|
+
result.error.dispose();
|
|
138
|
+
}
|
|
139
|
+
import_quickjs_core.cleanupUnmarshaledHandles(context);
|
|
140
|
+
import_quickjs_core.clearAllInstanceState();
|
|
141
|
+
try {
|
|
142
|
+
const clearGlobals = context.evalCode(`
|
|
143
|
+
(function() {
|
|
144
|
+
const keysToDelete = Object.keys(globalThis).filter(k =>
|
|
145
|
+
k !== 'globalThis' && k !== 'undefined' && k !== 'NaN' && k !== 'Infinity'
|
|
146
|
+
);
|
|
147
|
+
for (const key of keysToDelete) {
|
|
148
|
+
try { globalThis[key] = undefined; } catch (e) {}
|
|
149
|
+
}
|
|
150
|
+
for (const key of keysToDelete) {
|
|
151
|
+
try { delete globalThis[key]; } catch (e) {}
|
|
152
|
+
}
|
|
153
|
+
return keysToDelete.length;
|
|
154
|
+
})()
|
|
155
|
+
`);
|
|
156
|
+
if (clearGlobals.error) {
|
|
157
|
+
clearGlobals.error.dispose();
|
|
158
|
+
} else {
|
|
159
|
+
clearGlobals.value.dispose();
|
|
160
|
+
}
|
|
161
|
+
} catch (e) {}
|
|
162
|
+
for (let i = 0;i < 100; i++) {
|
|
163
|
+
if (!context.runtime.hasPendingJob())
|
|
164
|
+
break;
|
|
165
|
+
const result = context.runtime.executePendingJobs();
|
|
166
|
+
if (result.error)
|
|
167
|
+
result.error.dispose();
|
|
168
|
+
}
|
|
133
169
|
core.dispose();
|
|
134
170
|
}
|
|
135
171
|
};
|
|
136
172
|
}
|
|
137
173
|
})
|
|
138
174
|
|
|
139
|
-
//# debugId=
|
|
175
|
+
//# debugId=08932F65633CC6C364756E2164756E21
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"// Re-export everything from sub-packages\nexport * from \"@ricsam/quickjs-core\";\nexport * from \"@ricsam/quickjs-console\";\nexport * from \"@ricsam/quickjs-encoding\";\nexport * from \"@ricsam/quickjs-fetch\";\nexport * from \"@ricsam/quickjs-fs\";\nexport * from \"@ricsam/quickjs-timers\";\n\nimport type { QuickJSContext } from \"quickjs-emscripten\";\nimport {\n setupCore,\n createStateMap,\n type StateMap,\n type CoreHandle,\n} from \"@ricsam/quickjs-core\";\nimport {\n setupFetch,\n type SetupFetchOptions,\n type FetchHandle,\n} from \"@ricsam/quickjs-fetch\";\nimport {\n setupFs,\n type SetupFsOptions,\n type FsHandle,\n} from \"@ricsam/quickjs-fs\";\nimport {\n setupConsole,\n type SetupConsoleOptions,\n type ConsoleHandle,\n} from \"@ricsam/quickjs-console\";\nimport {\n setupEncoding,\n type SetupEncodingOptions,\n type EncodingHandle,\n} from \"@ricsam/quickjs-encoding\";\nimport {\n setupTimers,\n type SetupTimersOptions,\n type TimersHandle,\n} from \"@ricsam/quickjs-timers\";\n\n/**\n * Options for setting up the runtime\n */\nexport interface SetupRuntimeOptions {\n /**\n * Fetch API options\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n fetch?: SetupFetchOptions | boolean;\n\n /**\n * File system options\n * Pass options object to enable\n * Pass `false` or omit to disable\n */\n fs?: SetupFsOptions | false;\n\n /**\n * Console options\n * Pass `true` to enable with defaults\n * Pass handlers object to customize\n * Pass `false` or omit to disable\n */\n console?: SetupConsoleOptions | boolean;\n\n /**\n * Encoding options (atob/btoa)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n encoding?: SetupEncodingOptions | boolean;\n\n /**\n * Timer options (setTimeout, setInterval, clearTimeout, clearInterval)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n timers?: SetupTimersOptions | boolean;\n}\n\n/**\n * Handle returned from setupRuntime\n */\nexport interface RuntimeHandle {\n /** Core handle (always present) */\n core: CoreHandle;\n\n /** Fetch handle (if enabled) */\n fetch?: FetchHandle;\n\n /** File system handle (if enabled) */\n fs?: FsHandle;\n\n /** Console handle (if enabled) */\n console?: ConsoleHandle;\n\n /** Encoding handle (if enabled) */\n encoding?: EncodingHandle;\n\n /** Timers handle (if enabled) */\n timers?: TimersHandle;\n\n /** Shared state map */\n readonly stateMap: StateMap;\n\n /** Get the underlying QuickJS context */\n readonly context: QuickJSContext;\n\n /**\n * Drain all pending jobs with timeout.\n * Call BEFORE dispose() to prevent GC assertion failures.\n * @param maxIterations - Maximum iterations (default: 1000)\n * @returns true if all jobs completed, false if timed out\n */\n drainPendingJobs(maxIterations?: number): boolean;\n\n /** Dispose all handles and cleanup */\n dispose(): void;\n}\n\n/**\n * Setup multiple APIs in a QuickJS context\n *\n * @example\n * const handle = setupRuntime(context, {\n * fetch: {\n * onFetch: async (req) => fetch(req),\n * },\n * fs: {\n * getDirectory: async (path) => createNodeDirectoryHandle(`/sandbox${path}`),\n * },\n * });\n *\n * // Use the context...\n *\n * handle.dispose();\n */\nexport function setupRuntime(\n context: QuickJSContext,\n options: SetupRuntimeOptions = {}\n): RuntimeHandle {\n const stateMap = createStateMap();\n\n // Always setup core\n const core = setupCore(context, { stateMap });\n\n let fetch: FetchHandle | undefined;\n let fs: FsHandle | undefined;\n let consoleHandle: ConsoleHandle | undefined;\n let encoding: EncodingHandle | undefined;\n let timers: TimersHandle | undefined;\n\n // Setup fetch if enabled\n if (options.fetch) {\n const fetchOptions: SetupFetchOptions =\n options.fetch === true\n ? { stateMap, coreHandle: core }\n : { ...options.fetch, stateMap, coreHandle: core };\n\n fetch = setupFetch(context, fetchOptions);\n }\n\n // Setup fs if provided\n if (options.fs) {\n fs = setupFs(context, {\n ...options.fs,\n stateMap,\n coreHandle: core,\n });\n }\n\n // Setup console if enabled\n if (options.console) {\n const consoleOptions: SetupConsoleOptions =\n options.console === true\n ? { stateMap, coreHandle: core }\n : { ...options.console, stateMap, coreHandle: core };\n\n consoleHandle = setupConsole(context, consoleOptions);\n }\n\n // Setup encoding if enabled\n if (options.encoding) {\n const encodingOptions: SetupEncodingOptions =\n options.encoding === true\n ? { stateMap, coreHandle: core }\n : { ...options.encoding, stateMap, coreHandle: core };\n\n encoding = setupEncoding(context, encodingOptions);\n }\n\n // Setup timers if enabled\n if (options.timers) {\n const timersOptions: SetupTimersOptions =\n options.timers === true\n ? { stateMap, coreHandle: core }\n : { ...options.timers, stateMap, coreHandle: core };\n\n timers = setupTimers(context, timersOptions);\n }\n\n return {\n core,\n fetch,\n fs,\n console: consoleHandle,\n encoding,\n timers,\n stateMap,\n get context() {\n return context;\n },\n drainPendingJobs(maxIterations = 1000): boolean {\n for (let i = 0; i < maxIterations; i++) {\n if (!context.runtime.hasPendingJob()) {\n return true;\n }\n const result = context.runtime.executePendingJobs();\n if (result.error) {\n result.error.dispose();\n }\n }\n return !context.runtime.hasPendingJob();\n },\n dispose() {\n //
|
|
5
|
+
"// Re-export everything from sub-packages\nexport * from \"@ricsam/quickjs-core\";\nexport * from \"@ricsam/quickjs-console\";\nexport * from \"@ricsam/quickjs-encoding\";\nexport * from \"@ricsam/quickjs-fetch\";\nexport * from \"@ricsam/quickjs-fs\";\nexport * from \"@ricsam/quickjs-timers\";\n\nimport type { QuickJSContext } from \"quickjs-emscripten\";\nimport {\n setupCore,\n createStateMap,\n cleanupUnmarshaledHandles,\n clearAllInstanceState,\n type StateMap,\n type CoreHandle,\n} from \"@ricsam/quickjs-core\";\nimport {\n setupFetch,\n type SetupFetchOptions,\n type FetchHandle,\n} from \"@ricsam/quickjs-fetch\";\nimport {\n setupFs,\n type SetupFsOptions,\n type FsHandle,\n} from \"@ricsam/quickjs-fs\";\nimport {\n setupConsole,\n type SetupConsoleOptions,\n type ConsoleHandle,\n} from \"@ricsam/quickjs-console\";\nimport {\n setupEncoding,\n type SetupEncodingOptions,\n type EncodingHandle,\n} from \"@ricsam/quickjs-encoding\";\nimport {\n setupTimers,\n type SetupTimersOptions,\n type TimersHandle,\n} from \"@ricsam/quickjs-timers\";\n\n/**\n * Options for setting up the runtime\n */\nexport interface SetupRuntimeOptions {\n /**\n * Fetch API options\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n fetch?: SetupFetchOptions | boolean;\n\n /**\n * File system options\n * Pass options object to enable\n * Pass `false` or omit to disable\n */\n fs?: SetupFsOptions | false;\n\n /**\n * Console options\n * Pass `true` to enable with defaults\n * Pass handlers object to customize\n * Pass `false` or omit to disable\n */\n console?: SetupConsoleOptions | boolean;\n\n /**\n * Encoding options (atob/btoa)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n encoding?: SetupEncodingOptions | boolean;\n\n /**\n * Timer options (setTimeout, setInterval, clearTimeout, clearInterval)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n timers?: SetupTimersOptions | boolean;\n}\n\n/**\n * Handle returned from setupRuntime\n */\nexport interface RuntimeHandle {\n /** Core handle (always present) */\n core: CoreHandle;\n\n /** Fetch handle (if enabled) */\n fetch?: FetchHandle;\n\n /** File system handle (if enabled) */\n fs?: FsHandle;\n\n /** Console handle (if enabled) */\n console?: ConsoleHandle;\n\n /** Encoding handle (if enabled) */\n encoding?: EncodingHandle;\n\n /** Timers handle (if enabled) */\n timers?: TimersHandle;\n\n /** Shared state map */\n readonly stateMap: StateMap;\n\n /** Get the underlying QuickJS context */\n readonly context: QuickJSContext;\n\n /**\n * Drain all pending jobs with timeout.\n * Call BEFORE dispose() to prevent GC assertion failures.\n * @param maxIterations - Maximum iterations (default: 1000)\n * @returns true if all jobs completed, false if timed out\n */\n drainPendingJobs(maxIterations?: number): boolean;\n\n /** Dispose all handles and cleanup */\n dispose(): void;\n}\n\n/**\n * Setup multiple APIs in a QuickJS context\n *\n * @example\n * const handle = setupRuntime(context, {\n * fetch: {\n * onFetch: async (req) => fetch(req),\n * },\n * fs: {\n * getDirectory: async (path) => createNodeDirectoryHandle(`/sandbox${path}`),\n * },\n * });\n *\n * // Use the context...\n *\n * handle.dispose();\n */\nexport function setupRuntime(\n context: QuickJSContext,\n options: SetupRuntimeOptions = {}\n): RuntimeHandle {\n const stateMap = createStateMap();\n\n // Always setup core\n const core = setupCore(context, { stateMap });\n\n let fetch: FetchHandle | undefined;\n let fs: FsHandle | undefined;\n let consoleHandle: ConsoleHandle | undefined;\n let encoding: EncodingHandle | undefined;\n let timers: TimersHandle | undefined;\n\n // Setup fetch if enabled\n if (options.fetch) {\n const fetchOptions: SetupFetchOptions =\n options.fetch === true\n ? { stateMap, coreHandle: core }\n : { ...options.fetch, stateMap, coreHandle: core };\n\n fetch = setupFetch(context, fetchOptions);\n }\n\n // Setup fs if provided\n if (options.fs) {\n fs = setupFs(context, {\n ...options.fs,\n stateMap,\n coreHandle: core,\n });\n }\n\n // Setup console if enabled\n if (options.console) {\n const consoleOptions: SetupConsoleOptions =\n options.console === true\n ? { stateMap, coreHandle: core }\n : { ...options.console, stateMap, coreHandle: core };\n\n consoleHandle = setupConsole(context, consoleOptions);\n }\n\n // Setup encoding if enabled\n if (options.encoding) {\n const encodingOptions: SetupEncodingOptions =\n options.encoding === true\n ? { stateMap, coreHandle: core }\n : { ...options.encoding, stateMap, coreHandle: core };\n\n encoding = setupEncoding(context, encodingOptions);\n }\n\n // Setup timers if enabled\n if (options.timers) {\n const timersOptions: SetupTimersOptions =\n options.timers === true\n ? { stateMap, coreHandle: core }\n : { ...options.timers, stateMap, coreHandle: core };\n\n timers = setupTimers(context, timersOptions);\n }\n\n return {\n core,\n fetch,\n fs,\n console: consoleHandle,\n encoding,\n timers,\n stateMap,\n get context() {\n return context;\n },\n drainPendingJobs(maxIterations = 1000): boolean {\n for (let i = 0; i < maxIterations; i++) {\n if (!context.runtime.hasPendingJob()) {\n return true;\n }\n const result = context.runtime.executePendingJobs();\n if (result.error) {\n result.error.dispose();\n }\n }\n return !context.runtime.hasPendingJob();\n },\n dispose() {\n // Drain pending jobs before disposal\n for (let i = 0; i < 1000; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n // Dispose sub-handles in reverse order\n timers?.dispose();\n encoding?.dispose();\n consoleHandle?.dispose();\n fs?.dispose();\n fetch?.dispose();\n\n // Drain pending jobs again after sub-handle disposal\n // (fetch?.dispose() calls evalCode which can create new jobs)\n for (let i = 0; i < 1000; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n // Clean up tracked handles\n cleanupUnmarshaledHandles(context);\n clearAllInstanceState();\n\n // Clear globals to help GC break circular references\n try {\n const clearGlobals = context.evalCode(`\n (function() {\n const keysToDelete = Object.keys(globalThis).filter(k =>\n k !== 'globalThis' && k !== 'undefined' && k !== 'NaN' && k !== 'Infinity'\n );\n for (const key of keysToDelete) {\n try { globalThis[key] = undefined; } catch (e) {}\n }\n for (const key of keysToDelete) {\n try { delete globalThis[key]; } catch (e) {}\n }\n return keysToDelete.length;\n })()\n `);\n if (clearGlobals.error) {\n clearGlobals.error.dispose();\n } else {\n clearGlobals.value.dispose();\n }\n } catch (e) {\n // Ignore errors during cleanup\n }\n\n // Final drain\n for (let i = 0; i < 100; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n core.dispose();\n },\n };\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "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",
|
|
8
|
+
"debugId": "08932F65633CC6C364756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/index.mjs
CHANGED
|
@@ -8,7 +8,9 @@ export * from "@ricsam/quickjs-fs";
|
|
|
8
8
|
export * from "@ricsam/quickjs-timers";
|
|
9
9
|
import {
|
|
10
10
|
setupCore,
|
|
11
|
-
createStateMap
|
|
11
|
+
createStateMap,
|
|
12
|
+
cleanupUnmarshaledHandles,
|
|
13
|
+
clearAllInstanceState
|
|
12
14
|
} from "@ricsam/quickjs-core";
|
|
13
15
|
import {
|
|
14
16
|
setupFetch
|
|
@@ -84,15 +86,51 @@ function setupRuntime(context, options = {}) {
|
|
|
84
86
|
if (!context.runtime.hasPendingJob())
|
|
85
87
|
break;
|
|
86
88
|
const result = context.runtime.executePendingJobs();
|
|
87
|
-
if (result.error)
|
|
89
|
+
if (result.error)
|
|
88
90
|
result.error.dispose();
|
|
89
|
-
}
|
|
90
91
|
}
|
|
91
92
|
timers?.dispose();
|
|
92
93
|
encoding?.dispose();
|
|
93
94
|
consoleHandle?.dispose();
|
|
94
95
|
fs?.dispose();
|
|
95
96
|
fetch?.dispose();
|
|
97
|
+
for (let i = 0;i < 1000; i++) {
|
|
98
|
+
if (!context.runtime.hasPendingJob())
|
|
99
|
+
break;
|
|
100
|
+
const result = context.runtime.executePendingJobs();
|
|
101
|
+
if (result.error)
|
|
102
|
+
result.error.dispose();
|
|
103
|
+
}
|
|
104
|
+
cleanupUnmarshaledHandles(context);
|
|
105
|
+
clearAllInstanceState();
|
|
106
|
+
try {
|
|
107
|
+
const clearGlobals = context.evalCode(`
|
|
108
|
+
(function() {
|
|
109
|
+
const keysToDelete = Object.keys(globalThis).filter(k =>
|
|
110
|
+
k !== 'globalThis' && k !== 'undefined' && k !== 'NaN' && k !== 'Infinity'
|
|
111
|
+
);
|
|
112
|
+
for (const key of keysToDelete) {
|
|
113
|
+
try { globalThis[key] = undefined; } catch (e) {}
|
|
114
|
+
}
|
|
115
|
+
for (const key of keysToDelete) {
|
|
116
|
+
try { delete globalThis[key]; } catch (e) {}
|
|
117
|
+
}
|
|
118
|
+
return keysToDelete.length;
|
|
119
|
+
})()
|
|
120
|
+
`);
|
|
121
|
+
if (clearGlobals.error) {
|
|
122
|
+
clearGlobals.error.dispose();
|
|
123
|
+
} else {
|
|
124
|
+
clearGlobals.value.dispose();
|
|
125
|
+
}
|
|
126
|
+
} catch (e) {}
|
|
127
|
+
for (let i = 0;i < 100; i++) {
|
|
128
|
+
if (!context.runtime.hasPendingJob())
|
|
129
|
+
break;
|
|
130
|
+
const result = context.runtime.executePendingJobs();
|
|
131
|
+
if (result.error)
|
|
132
|
+
result.error.dispose();
|
|
133
|
+
}
|
|
96
134
|
core.dispose();
|
|
97
135
|
}
|
|
98
136
|
};
|
|
@@ -101,4 +139,4 @@ export {
|
|
|
101
139
|
setupRuntime
|
|
102
140
|
};
|
|
103
141
|
|
|
104
|
-
//# debugId=
|
|
142
|
+
//# debugId=91E27187E6392B3064756E2164756E21
|
package/dist/mjs/index.mjs.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"// Re-export everything from sub-packages\nexport * from \"@ricsam/quickjs-core\";\nexport * from \"@ricsam/quickjs-console\";\nexport * from \"@ricsam/quickjs-encoding\";\nexport * from \"@ricsam/quickjs-fetch\";\nexport * from \"@ricsam/quickjs-fs\";\nexport * from \"@ricsam/quickjs-timers\";\n\nimport type { QuickJSContext } from \"quickjs-emscripten\";\nimport {\n setupCore,\n createStateMap,\n type StateMap,\n type CoreHandle,\n} from \"@ricsam/quickjs-core\";\nimport {\n setupFetch,\n type SetupFetchOptions,\n type FetchHandle,\n} from \"@ricsam/quickjs-fetch\";\nimport {\n setupFs,\n type SetupFsOptions,\n type FsHandle,\n} from \"@ricsam/quickjs-fs\";\nimport {\n setupConsole,\n type SetupConsoleOptions,\n type ConsoleHandle,\n} from \"@ricsam/quickjs-console\";\nimport {\n setupEncoding,\n type SetupEncodingOptions,\n type EncodingHandle,\n} from \"@ricsam/quickjs-encoding\";\nimport {\n setupTimers,\n type SetupTimersOptions,\n type TimersHandle,\n} from \"@ricsam/quickjs-timers\";\n\n/**\n * Options for setting up the runtime\n */\nexport interface SetupRuntimeOptions {\n /**\n * Fetch API options\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n fetch?: SetupFetchOptions | boolean;\n\n /**\n * File system options\n * Pass options object to enable\n * Pass `false` or omit to disable\n */\n fs?: SetupFsOptions | false;\n\n /**\n * Console options\n * Pass `true` to enable with defaults\n * Pass handlers object to customize\n * Pass `false` or omit to disable\n */\n console?: SetupConsoleOptions | boolean;\n\n /**\n * Encoding options (atob/btoa)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n encoding?: SetupEncodingOptions | boolean;\n\n /**\n * Timer options (setTimeout, setInterval, clearTimeout, clearInterval)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n timers?: SetupTimersOptions | boolean;\n}\n\n/**\n * Handle returned from setupRuntime\n */\nexport interface RuntimeHandle {\n /** Core handle (always present) */\n core: CoreHandle;\n\n /** Fetch handle (if enabled) */\n fetch?: FetchHandle;\n\n /** File system handle (if enabled) */\n fs?: FsHandle;\n\n /** Console handle (if enabled) */\n console?: ConsoleHandle;\n\n /** Encoding handle (if enabled) */\n encoding?: EncodingHandle;\n\n /** Timers handle (if enabled) */\n timers?: TimersHandle;\n\n /** Shared state map */\n readonly stateMap: StateMap;\n\n /** Get the underlying QuickJS context */\n readonly context: QuickJSContext;\n\n /**\n * Drain all pending jobs with timeout.\n * Call BEFORE dispose() to prevent GC assertion failures.\n * @param maxIterations - Maximum iterations (default: 1000)\n * @returns true if all jobs completed, false if timed out\n */\n drainPendingJobs(maxIterations?: number): boolean;\n\n /** Dispose all handles and cleanup */\n dispose(): void;\n}\n\n/**\n * Setup multiple APIs in a QuickJS context\n *\n * @example\n * const handle = setupRuntime(context, {\n * fetch: {\n * onFetch: async (req) => fetch(req),\n * },\n * fs: {\n * getDirectory: async (path) => createNodeDirectoryHandle(`/sandbox${path}`),\n * },\n * });\n *\n * // Use the context...\n *\n * handle.dispose();\n */\nexport function setupRuntime(\n context: QuickJSContext,\n options: SetupRuntimeOptions = {}\n): RuntimeHandle {\n const stateMap = createStateMap();\n\n // Always setup core\n const core = setupCore(context, { stateMap });\n\n let fetch: FetchHandle | undefined;\n let fs: FsHandle | undefined;\n let consoleHandle: ConsoleHandle | undefined;\n let encoding: EncodingHandle | undefined;\n let timers: TimersHandle | undefined;\n\n // Setup fetch if enabled\n if (options.fetch) {\n const fetchOptions: SetupFetchOptions =\n options.fetch === true\n ? { stateMap, coreHandle: core }\n : { ...options.fetch, stateMap, coreHandle: core };\n\n fetch = setupFetch(context, fetchOptions);\n }\n\n // Setup fs if provided\n if (options.fs) {\n fs = setupFs(context, {\n ...options.fs,\n stateMap,\n coreHandle: core,\n });\n }\n\n // Setup console if enabled\n if (options.console) {\n const consoleOptions: SetupConsoleOptions =\n options.console === true\n ? { stateMap, coreHandle: core }\n : { ...options.console, stateMap, coreHandle: core };\n\n consoleHandle = setupConsole(context, consoleOptions);\n }\n\n // Setup encoding if enabled\n if (options.encoding) {\n const encodingOptions: SetupEncodingOptions =\n options.encoding === true\n ? { stateMap, coreHandle: core }\n : { ...options.encoding, stateMap, coreHandle: core };\n\n encoding = setupEncoding(context, encodingOptions);\n }\n\n // Setup timers if enabled\n if (options.timers) {\n const timersOptions: SetupTimersOptions =\n options.timers === true\n ? { stateMap, coreHandle: core }\n : { ...options.timers, stateMap, coreHandle: core };\n\n timers = setupTimers(context, timersOptions);\n }\n\n return {\n core,\n fetch,\n fs,\n console: consoleHandle,\n encoding,\n timers,\n stateMap,\n get context() {\n return context;\n },\n drainPendingJobs(maxIterations = 1000): boolean {\n for (let i = 0; i < maxIterations; i++) {\n if (!context.runtime.hasPendingJob()) {\n return true;\n }\n const result = context.runtime.executePendingJobs();\n if (result.error) {\n result.error.dispose();\n }\n }\n return !context.runtime.hasPendingJob();\n },\n dispose() {\n //
|
|
5
|
+
"// Re-export everything from sub-packages\nexport * from \"@ricsam/quickjs-core\";\nexport * from \"@ricsam/quickjs-console\";\nexport * from \"@ricsam/quickjs-encoding\";\nexport * from \"@ricsam/quickjs-fetch\";\nexport * from \"@ricsam/quickjs-fs\";\nexport * from \"@ricsam/quickjs-timers\";\n\nimport type { QuickJSContext } from \"quickjs-emscripten\";\nimport {\n setupCore,\n createStateMap,\n cleanupUnmarshaledHandles,\n clearAllInstanceState,\n type StateMap,\n type CoreHandle,\n} from \"@ricsam/quickjs-core\";\nimport {\n setupFetch,\n type SetupFetchOptions,\n type FetchHandle,\n} from \"@ricsam/quickjs-fetch\";\nimport {\n setupFs,\n type SetupFsOptions,\n type FsHandle,\n} from \"@ricsam/quickjs-fs\";\nimport {\n setupConsole,\n type SetupConsoleOptions,\n type ConsoleHandle,\n} from \"@ricsam/quickjs-console\";\nimport {\n setupEncoding,\n type SetupEncodingOptions,\n type EncodingHandle,\n} from \"@ricsam/quickjs-encoding\";\nimport {\n setupTimers,\n type SetupTimersOptions,\n type TimersHandle,\n} from \"@ricsam/quickjs-timers\";\n\n/**\n * Options for setting up the runtime\n */\nexport interface SetupRuntimeOptions {\n /**\n * Fetch API options\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n fetch?: SetupFetchOptions | boolean;\n\n /**\n * File system options\n * Pass options object to enable\n * Pass `false` or omit to disable\n */\n fs?: SetupFsOptions | false;\n\n /**\n * Console options\n * Pass `true` to enable with defaults\n * Pass handlers object to customize\n * Pass `false` or omit to disable\n */\n console?: SetupConsoleOptions | boolean;\n\n /**\n * Encoding options (atob/btoa)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n encoding?: SetupEncodingOptions | boolean;\n\n /**\n * Timer options (setTimeout, setInterval, clearTimeout, clearInterval)\n * Pass `true` to enable with defaults\n * Pass `false` or omit to disable\n */\n timers?: SetupTimersOptions | boolean;\n}\n\n/**\n * Handle returned from setupRuntime\n */\nexport interface RuntimeHandle {\n /** Core handle (always present) */\n core: CoreHandle;\n\n /** Fetch handle (if enabled) */\n fetch?: FetchHandle;\n\n /** File system handle (if enabled) */\n fs?: FsHandle;\n\n /** Console handle (if enabled) */\n console?: ConsoleHandle;\n\n /** Encoding handle (if enabled) */\n encoding?: EncodingHandle;\n\n /** Timers handle (if enabled) */\n timers?: TimersHandle;\n\n /** Shared state map */\n readonly stateMap: StateMap;\n\n /** Get the underlying QuickJS context */\n readonly context: QuickJSContext;\n\n /**\n * Drain all pending jobs with timeout.\n * Call BEFORE dispose() to prevent GC assertion failures.\n * @param maxIterations - Maximum iterations (default: 1000)\n * @returns true if all jobs completed, false if timed out\n */\n drainPendingJobs(maxIterations?: number): boolean;\n\n /** Dispose all handles and cleanup */\n dispose(): void;\n}\n\n/**\n * Setup multiple APIs in a QuickJS context\n *\n * @example\n * const handle = setupRuntime(context, {\n * fetch: {\n * onFetch: async (req) => fetch(req),\n * },\n * fs: {\n * getDirectory: async (path) => createNodeDirectoryHandle(`/sandbox${path}`),\n * },\n * });\n *\n * // Use the context...\n *\n * handle.dispose();\n */\nexport function setupRuntime(\n context: QuickJSContext,\n options: SetupRuntimeOptions = {}\n): RuntimeHandle {\n const stateMap = createStateMap();\n\n // Always setup core\n const core = setupCore(context, { stateMap });\n\n let fetch: FetchHandle | undefined;\n let fs: FsHandle | undefined;\n let consoleHandle: ConsoleHandle | undefined;\n let encoding: EncodingHandle | undefined;\n let timers: TimersHandle | undefined;\n\n // Setup fetch if enabled\n if (options.fetch) {\n const fetchOptions: SetupFetchOptions =\n options.fetch === true\n ? { stateMap, coreHandle: core }\n : { ...options.fetch, stateMap, coreHandle: core };\n\n fetch = setupFetch(context, fetchOptions);\n }\n\n // Setup fs if provided\n if (options.fs) {\n fs = setupFs(context, {\n ...options.fs,\n stateMap,\n coreHandle: core,\n });\n }\n\n // Setup console if enabled\n if (options.console) {\n const consoleOptions: SetupConsoleOptions =\n options.console === true\n ? { stateMap, coreHandle: core }\n : { ...options.console, stateMap, coreHandle: core };\n\n consoleHandle = setupConsole(context, consoleOptions);\n }\n\n // Setup encoding if enabled\n if (options.encoding) {\n const encodingOptions: SetupEncodingOptions =\n options.encoding === true\n ? { stateMap, coreHandle: core }\n : { ...options.encoding, stateMap, coreHandle: core };\n\n encoding = setupEncoding(context, encodingOptions);\n }\n\n // Setup timers if enabled\n if (options.timers) {\n const timersOptions: SetupTimersOptions =\n options.timers === true\n ? { stateMap, coreHandle: core }\n : { ...options.timers, stateMap, coreHandle: core };\n\n timers = setupTimers(context, timersOptions);\n }\n\n return {\n core,\n fetch,\n fs,\n console: consoleHandle,\n encoding,\n timers,\n stateMap,\n get context() {\n return context;\n },\n drainPendingJobs(maxIterations = 1000): boolean {\n for (let i = 0; i < maxIterations; i++) {\n if (!context.runtime.hasPendingJob()) {\n return true;\n }\n const result = context.runtime.executePendingJobs();\n if (result.error) {\n result.error.dispose();\n }\n }\n return !context.runtime.hasPendingJob();\n },\n dispose() {\n // Drain pending jobs before disposal\n for (let i = 0; i < 1000; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n // Dispose sub-handles in reverse order\n timers?.dispose();\n encoding?.dispose();\n consoleHandle?.dispose();\n fs?.dispose();\n fetch?.dispose();\n\n // Drain pending jobs again after sub-handle disposal\n // (fetch?.dispose() calls evalCode which can create new jobs)\n for (let i = 0; i < 1000; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n // Clean up tracked handles\n cleanupUnmarshaledHandles(context);\n clearAllInstanceState();\n\n // Clear globals to help GC break circular references\n try {\n const clearGlobals = context.evalCode(`\n (function() {\n const keysToDelete = Object.keys(globalThis).filter(k =>\n k !== 'globalThis' && k !== 'undefined' && k !== 'NaN' && k !== 'Infinity'\n );\n for (const key of keysToDelete) {\n try { globalThis[key] = undefined; } catch (e) {}\n }\n for (const key of keysToDelete) {\n try { delete globalThis[key]; } catch (e) {}\n }\n return keysToDelete.length;\n })()\n `);\n if (clearGlobals.error) {\n clearGlobals.error.dispose();\n } else {\n clearGlobals.value.dispose();\n }\n } catch (e) {\n // Ignore errors during cleanup\n }\n\n // Final drain\n for (let i = 0; i < 100; i++) {\n if (!context.runtime.hasPendingJob()) break;\n const result = context.runtime.executePendingJobs();\n if (result.error) result.error.dispose();\n }\n\n core.dispose();\n },\n };\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "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",
|
|
8
|
+
"debugId": "91E27187E6392B3064756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/mjs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/quickjs-runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"main": "./dist/cjs/index.cjs",
|
|
5
5
|
"types": "./dist/types/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"typecheck": "tsc --noEmit"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ricsam/quickjs-core": "^0.2.
|
|
20
|
-
"@ricsam/quickjs-console": "^0.2.
|
|
21
|
-
"@ricsam/quickjs-encoding": "^0.2.
|
|
22
|
-
"@ricsam/quickjs-fetch": "^0.2.
|
|
23
|
-
"@ricsam/quickjs-fs": "^0.2.
|
|
24
|
-
"@ricsam/quickjs-timers": "^0.2.
|
|
19
|
+
"@ricsam/quickjs-core": "^0.2.12",
|
|
20
|
+
"@ricsam/quickjs-console": "^0.2.12",
|
|
21
|
+
"@ricsam/quickjs-encoding": "^0.2.12",
|
|
22
|
+
"@ricsam/quickjs-fetch": "^0.2.13",
|
|
23
|
+
"@ricsam/quickjs-fs": "^0.2.12",
|
|
24
|
+
"@ricsam/quickjs-timers": "^0.2.12",
|
|
25
25
|
"quickjs-emscripten": "^0.31.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|