/
usr
/
local
/
lib
/
node_modules
/
pm2
/
node_modules
/
@tootallnate
/
quickjs-emscripten
/
dist
/
/usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist
mkdir
upload
Name
Size
Mode
Actions
generated/
-
0755
rm
asyncify-helpers.d.ts
1475
0644
edit
dl
rm
asyncify-helpers.js
1818
0644
edit
dl
rm
asyncify-helpers.js.map
4205
0644
edit
dl
rm
context-asyncify.d.ts
2177
0644
edit
dl
rm
context-asyncify.js
2370
0644
edit
dl
rm
context-asyncify.js.map
4651
0644
edit
dl
rm
context.d.ts
16065
0644
edit
dl
rm
context.js
29595
0644
edit
dl
rm
context.js.map
53303
0644
edit
dl
rm
debug.d.ts
156
0644
edit
dl
rm
debug.js
327
0644
edit
dl
rm
debug.js.map
518
0644
edit
dl
rm
deferred-promise.d.ts
2957
0644
edit
dl
rm
deferred-promise.js
3754
0644
edit
dl
rm
deferred-promise.js.map
6176
0644
edit
dl
rm
emscripten-types.d.ts
3886
0644
edit
dl
rm
emscripten-types.js
776
0644
edit
dl
rm
emscripten-types.js.map
5484
0644
edit
dl
rm
errors.d.ts
836
0644
edit
dl
rm
errors.js
1914
0644
edit
dl
rm
errors.js.map
1780
0644
edit
dl
rm
esmHelpers.d.ts
420
0644
edit
dl
rm
esmHelpers.js
778
0644
edit
dl
rm
esmHelpers.js.map
1126
0644
edit
dl
rm
index.d.ts
4076
0644
edit
dl
rm
index.js
5949
0644
edit
dl
rm
index.js.map
6569
0644
edit
dl
rm
lifetime.d.ts
4399
0644
edit
dl
rm
lifetime.js
6724
0644
edit
dl
rm
lifetime.js.map
11858
0644
edit
dl
rm
memory.d.ts
775
0644
edit
dl
rm
memory.js
1707
0644
edit
dl
rm
memory.js.map
3896
0644
edit
dl
rm
module-asyncify.d.ts
2386
0644
edit
dl
rm
module-asyncify.js
4035
0644
edit
dl
rm
module-asyncify.js.map
6459
0644
edit
dl
rm
module-test.d.ts
1118
0644
edit
dl
rm
module-test.js
2669
0644
edit
dl
rm
module-test.js.map
4672
0644
edit
dl
rm
module.d.ts
6272
0644
edit
dl
rm
module.js
12740
0644
edit
dl
rm
module.js.map
21716
0644
edit
dl
rm
runtime-asyncify.d.ts
1687
0644
edit
dl
rm
runtime-asyncify.js
1880
0644
edit
dl
rm
runtime-asyncify.js.map
4082
0644
edit
dl
rm
runtime.d.ts
7048
0644
edit
dl
rm
runtime.js
12909
0644
edit
dl
rm
runtime.js.map
22367
0644
edit
dl
rm
types-ffi.d.ts
3439
0644
edit
dl
rm
types-ffi.js
1346
0644
edit
dl
rm
types-ffi.js.map
4712
0644
edit
dl
rm
types.d.ts
6751
0644
edit
dl
rm
types.js
1722
0644
edit
dl
rm
types.js.map
9272
0644
edit
dl
rm
variants.d.ts
4784
0644
edit
dl
rm
variants.js
6893
0644
edit
dl
rm
variants.js.map
10226
0644
edit
dl
rm
vm-interface.d.ts
2669
0644
edit
dl
rm
vm-interface.js
384
0644
edit
dl
rm
vm-interface.js.map
3179
0644
edit
dl
rm
Edit:
/usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist/module.d.ts
(6272B)
import { QuickJSContext } from "./context"; import { Asyncify, AsyncifySleepResult, EitherModule, EmscriptenModuleCallbacks } from "./emscripten-types"; import { JSContextPointer, JSRuntimePointer } from "./types-ffi"; import { InterruptHandler, QuickJSRuntime } from "./runtime"; import { ContextOptions, EitherFFI, JSModuleLoader, RuntimeOptions, RuntimeOptionsBase } from "./types"; type EmscriptenCallback<BaseArgs extends any[], Result> = (...args: [Asyncify | undefined, ...BaseArgs]) => Result | AsyncifySleepResult<Result>; type MaybeAsyncEmscriptenCallback<T extends EmscriptenCallback<any, any>> = T extends EmscriptenCallback<infer Args, infer Result> ? (...args: Args) => Result | Promise<Result> : never; type MaybeAsyncEmscriptenCallbacks = { [K in keyof EmscriptenModuleCallbacks]: MaybeAsyncEmscriptenCallback<EmscriptenModuleCallbacks[K]>; }; /** * @private */ export interface ContextCallbacks { callFunction: MaybeAsyncEmscriptenCallbacks["callFunction"]; } /** * @private */ export interface RuntimeCallbacks { shouldInterrupt: MaybeAsyncEmscriptenCallbacks["shouldInterrupt"]; loadModuleSource: MaybeAsyncEmscriptenCallbacks["loadModuleSource"]; normalizeModule: MaybeAsyncEmscriptenCallbacks["normalizeModule"]; } /** * Options for [[QuickJSWASMModule.evalCode]]. */ export interface ModuleEvalOptions { /** * Interrupt evaluation if `shouldInterrupt` returns `true`. * See [[shouldInterruptAfterDeadline]]. */ shouldInterrupt?: InterruptHandler; /** * Memory limit, in bytes, of WebAssembly heap memory used by the QuickJS VM. */ memoryLimitBytes?: number; /** * Stack size limit for this vm, in bytes * To remove the limit, set to `0`. */ maxStackSizeBytes?: number; /** * Module loader for any `import` statements or expressions. */ moduleLoader?: JSModuleLoader; } /** * We use static functions per module to dispatch runtime or context calls from * C to the host. This class manages the indirection from a specific runtime or * context pointer to the appropriate callback handler. * * @private */ export declare class QuickJSModuleCallbacks { private module; private contextCallbacks; private runtimeCallbacks; constructor(module: EitherModule); setRuntimeCallbacks(rt: JSRuntimePointer, callbacks: RuntimeCallbacks): void; deleteRuntime(rt: JSRuntimePointer): void; setContextCallbacks(ctx: JSContextPointer, callbacks: ContextCallbacks): void; deleteContext(ctx: JSContextPointer): void; private suspendedCount; private suspended; private handleAsyncify; private cToHostCallbacks; } /** * Process RuntimeOptions and apply them to a QuickJSRuntime. * @private */ export declare function applyBaseRuntimeOptions(runtime: QuickJSRuntime, options: RuntimeOptionsBase): void; /** * Process ModuleEvalOptions and apply them to a QuickJSRuntime. * @private */ export declare function applyModuleEvalRuntimeOptions<T extends QuickJSRuntime>(runtime: T, options: ModuleEvalOptions): void; /** * This class presents a Javascript interface to QuickJS, a Javascript interpreter * that supports EcmaScript 2020 (ES2020). * * It wraps a single WebAssembly module containing the QuickJS library and * associated helper C code. WebAssembly modules are completely isolated from * each other by the host's WebAssembly runtime. Separate WebAssembly modules * have the most isolation guarantees possible with this library. * * The simplest way to start running code is {@link evalCode}. This shortcut * method will evaluate Javascript safely and return the result as a native * Javascript value. * * For more control over the execution environment, or to interact with values * inside QuickJS, create a context with {@link newContext} or a runtime with * {@link newRuntime}. */ export declare class QuickJSWASMModule { /** @private */ protected ffi: EitherFFI; /** @private */ protected callbacks: QuickJSModuleCallbacks; /** @private */ protected module: EitherModule; /** @private */ constructor(module: EitherModule, ffi: EitherFFI); /** * Create a runtime. * Use the runtime to set limits on CPU and memory usage and configure module * loading for one or more [[QuickJSContext]]s inside the runtime. */ newRuntime(options?: RuntimeOptions): QuickJSRuntime; /** * A simplified API to create a new [[QuickJSRuntime]] and a * [[QuickJSContext]] inside that runtime at the same time. The runtime will * be disposed when the context is disposed. */ newContext(options?: ContextOptions): QuickJSContext; /** * One-off evaluate code without needing to create a [[QuickJSRuntime]] or * [[QuickJSContext]] explicitly. * * To protect against infinite loops, use the `shouldInterrupt` option. The * [[shouldInterruptAfterDeadline]] function will create a time-based deadline. * * If you need more control over how the code executes, create a * [[QuickJSRuntime]] (with [[newRuntime]]) or a [[QuickJSContext]] (with * [[newContext]] or [[QuickJSRuntime.newContext]]), and use its * [[QuickJSContext.evalCode]] method. * * Asynchronous callbacks may not run during the first call to `evalCode`. If * you need to work with async code inside QuickJS, create a runtime and use * [[QuickJSRuntime.executePendingJobs]]. * * @returns The result is coerced to a native Javascript value using JSON * serialization, so properties and values unsupported by JSON will be dropped. * * @throws If `code` throws during evaluation, the exception will be * converted into a native Javascript value and thrown. * * @throws if `options.shouldInterrupt` interrupted execution, will throw a Error * with name `"InternalError"` and message `"interrupted"`. */ evalCode(code: string, options?: ModuleEvalOptions): unknown; /** * Get a low-level interface to the QuickJS functions in this WebAssembly * module. * @experimental * @unstable No warranty is provided with this API. It could change at any time. * @private */ getFFI(): EitherFFI; } export {};
Save
cmd:
run