@pyscript/core 0.0.0
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 +33 -0
- package/cjs/custom-types.js +212 -0
- package/cjs/fetch-utils.js +12 -0
- package/cjs/index.js +73 -0
- package/cjs/interpreter/_python.js +16 -0
- package/cjs/interpreter/_utils.js +141 -0
- package/cjs/interpreter/micropython.js +34 -0
- package/cjs/interpreter/pyodide.js +38 -0
- package/cjs/interpreter/ruby-wasm-wasi.js +43 -0
- package/cjs/interpreter/wasmoon.js +40 -0
- package/cjs/interpreters.js +64 -0
- package/cjs/listeners.js +71 -0
- package/cjs/loader.js +43 -0
- package/cjs/package.json +1 -0
- package/cjs/plugins/pyscript.js +105 -0
- package/cjs/script-handler.js +141 -0
- package/cjs/toml.js +10 -0
- package/cjs/utils.js +19 -0
- package/cjs/worker/class.js +46 -0
- package/cjs/worker/hooks.js +2 -0
- package/cjs/worker/xworker.js +3 -0
- package/esm/custom-types.js +207 -0
- package/esm/fetch-utils.js +8 -0
- package/esm/index.js +68 -0
- package/esm/interpreter/_python.js +12 -0
- package/esm/interpreter/_utils.js +133 -0
- package/esm/interpreter/micropython.js +33 -0
- package/esm/interpreter/pyodide.js +37 -0
- package/esm/interpreter/ruby-wasm-wasi.js +42 -0
- package/esm/interpreter/wasmoon.js +39 -0
- package/esm/interpreters.js +58 -0
- package/esm/listeners.js +68 -0
- package/esm/loader.js +40 -0
- package/esm/script-handler.js +136 -0
- package/esm/toml.js +8 -0
- package/esm/utils.js +20 -0
- package/esm/worker/class.js +45 -0
- package/esm/worker/hooks.js +1 -0
- package/esm/worker/xworker.js +2 -0
- package/min.js +2 -0
- package/package.json +55 -0
- package/types/coincident/structured.d.ts +5 -0
- package/types/fetch-utils.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/loader.d.ts +2 -0
- package/types/plugins.d.ts +61 -0
- package/types/pyscript/pyscript.core/esm/custom-types.d.ts +54 -0
- package/types/pyscript/pyscript.core/esm/fetch-utils.d.ts +3 -0
- package/types/pyscript/pyscript.core/esm/index.d.ts +2 -0
- package/types/pyscript/pyscript.core/esm/interpreter/_python.d.ts +5 -0
- package/types/pyscript/pyscript.core/esm/interpreter/_utils.d.ts +11 -0
- package/types/pyscript/pyscript.core/esm/interpreter/micropython.d.ts +17 -0
- package/types/pyscript/pyscript.core/esm/interpreter/pyodide.d.ts +17 -0
- package/types/pyscript/pyscript.core/esm/interpreter/ruby-wasm-wasi.d.ts +15 -0
- package/types/pyscript/pyscript.core/esm/interpreter/ruby.d.ts +16 -0
- package/types/pyscript/pyscript.core/esm/interpreter/wasmoon.d.ts +21 -0
- package/types/pyscript/pyscript.core/esm/interpreters.d.ts +9 -0
- package/types/pyscript/pyscript.core/esm/listeners.d.ts +2 -0
- package/types/pyscript/pyscript.core/esm/loader.d.ts +2 -0
- package/types/pyscript/pyscript.core/esm/plugins.d.ts +54 -0
- package/types/pyscript/pyscript.core/esm/runtime/_python.d.ts +8 -0
- package/types/pyscript/pyscript.core/esm/runtime/_utils.d.ts +11 -0
- package/types/pyscript/pyscript.core/esm/runtime/micropython.d.ts +20 -0
- package/types/pyscript/pyscript.core/esm/runtime/pyodide.d.ts +20 -0
- package/types/pyscript/pyscript.core/esm/runtime/ruby.d.ts +15 -0
- package/types/pyscript/pyscript.core/esm/runtime/wasmoon.d.ts +21 -0
- package/types/pyscript/pyscript.core/esm/runtimes.d.ts +9 -0
- package/types/pyscript/pyscript.core/esm/script-handler.d.ts +4 -0
- package/types/pyscript/pyscript.core/esm/toml.d.ts +1 -0
- package/types/pyscript/pyscript.core/esm/utils.d.ts +23 -0
- package/types/pyscript/pyscript.core/esm/worker/class.d.ts +19 -0
- package/types/pyscript/pyscript.core/esm/worker/hooks.d.ts +2 -0
- package/types/pyscript/pyscript.core/esm/worker/xworker.d.ts +2 -0
- package/types/runtime/_python.d.ts +8 -0
- package/types/runtime/_utils.d.ts +11 -0
- package/types/runtime/micropython.d.ts +20 -0
- package/types/runtime/pyodide.d.ts +20 -0
- package/types/runtime/ruby.d.ts +15 -0
- package/types/runtime/wasmoon.d.ts +21 -0
- package/types/runtimes.d.ts +9 -0
- package/types/script-handler.d.ts +3 -0
- package/types/toml.d.ts +1 -0
- package/types/utils.d.ts +23 -0
- package/types/worker/class.d.ts +19 -0
- package/types/worker/hooks.d.ts +2 -0
- package/types/worker/xworker.d.ts +2 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { type };
|
3
|
+
export function module(version?: string): string;
|
4
|
+
export function engine({ loadMicroPython }: {
|
5
|
+
loadMicroPython: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export function setGlobal(interpreter: any, name: any, value: any): void;
|
8
|
+
export function deleteGlobal(interpreter: any, name: any): void;
|
9
|
+
export { run };
|
10
|
+
export { runAsync };
|
11
|
+
export { writeFile };
|
12
|
+
}
|
13
|
+
export default _default;
|
14
|
+
declare const type: "micropython";
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { type };
|
3
|
+
export function module(version?: string): string;
|
4
|
+
export function engine({ loadPyodide }: {
|
5
|
+
loadPyodide: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export function setGlobal(interpreter: any, name: any, value: any): void;
|
8
|
+
export function deleteGlobal(interpreter: any, name: any): void;
|
9
|
+
export { run };
|
10
|
+
export { runAsync };
|
11
|
+
export { writeFile };
|
12
|
+
}
|
13
|
+
export default _default;
|
14
|
+
declare const type: "pyodide";
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { type };
|
3
|
+
export let experimental: boolean;
|
4
|
+
export function module(version?: string): string;
|
5
|
+
export function engine({ DefaultRubyVM }: {
|
6
|
+
DefaultRubyVM: any;
|
7
|
+
}, config: any, url: any): Promise<any>;
|
8
|
+
export function setGlobal(interpreter: any, name: any, value: any): void;
|
9
|
+
export function deleteGlobal(interpreter: any, name: any): void;
|
10
|
+
export function run(interpreter: any, code: any): any;
|
11
|
+
export function runAsync(interpreter: any, code: any): any;
|
12
|
+
export function writeFile(): never;
|
13
|
+
}
|
14
|
+
export default _default;
|
15
|
+
declare const type: "ruby-wasm-wasi";
|
@@ -0,0 +1,16 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { type };
|
3
|
+
export let experimental: boolean;
|
4
|
+
export function module(version?: string): string;
|
5
|
+
export function engine({ DefaultRubyVM }: {
|
6
|
+
DefaultRubyVM: any;
|
7
|
+
}, config: any, url: any): Promise<any>;
|
8
|
+
export function run(interpreter: any, code: any): any;
|
9
|
+
export function runAsync(interpreter: any, code: any): any;
|
10
|
+
export function runEvent(interpreter: any, code: any, key: any): any;
|
11
|
+
export function runWorker(interpreter: any, code: any, xworker: any): any;
|
12
|
+
export function runWorkerAsync(interpreter: any, code: any, xworker: any): any;
|
13
|
+
export function writeFile(): never;
|
14
|
+
}
|
15
|
+
export default _default;
|
16
|
+
declare const type: "ruby-wasm-wasi";
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { type };
|
3
|
+
export function module(version?: string): string;
|
4
|
+
export function engine({ LuaFactory, LuaLibraries }: {
|
5
|
+
LuaFactory: any;
|
6
|
+
LuaLibraries: any;
|
7
|
+
}, config: any): Promise<any>;
|
8
|
+
export function setGlobal(interpreter: any, name: any, value: any): void;
|
9
|
+
export function deleteGlobal(interpreter: any, name: any): void;
|
10
|
+
export function run(interpreter: any, code: any): any;
|
11
|
+
export function runAsync(interpreter: any, code: any): any;
|
12
|
+
export function writeFile({ cmodule: { module: { FS }, }, }: {
|
13
|
+
cmodule: {
|
14
|
+
module: {
|
15
|
+
FS: any;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
}, path: any, buffer: any): any;
|
19
|
+
}
|
20
|
+
export default _default;
|
21
|
+
declare const type: "wasmoon";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/** @type {Map<string, object>} */
|
2
|
+
export const registry: Map<string, object>;
|
3
|
+
/** @type {Map<string, object>} */
|
4
|
+
export const configs: Map<string, object>;
|
5
|
+
/** @type {string[]} */
|
6
|
+
export const selectors: string[];
|
7
|
+
/** @type {string[]} */
|
8
|
+
export const prefixes: string[];
|
9
|
+
export const interpreter: Map<any, any>;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
export const CUSTOM_SELECTORS: any[];
|
2
|
+
export function handlePlugin(node: Element): void;
|
3
|
+
export function define(type: string, options: PluginOptions): void;
|
4
|
+
export function whenDefined(type: string): Promise<object>;
|
5
|
+
/**
|
6
|
+
* plugin configuration
|
7
|
+
*/
|
8
|
+
export type Runtime = {
|
9
|
+
/**
|
10
|
+
* the bootstrapped interpreter
|
11
|
+
*/
|
12
|
+
interpreter: object;
|
13
|
+
/**
|
14
|
+
* an XWorker constructor that defaults to same interpreter on the Worker.
|
15
|
+
*/
|
16
|
+
XWorker: (url: string, options?: object) => Worker;
|
17
|
+
/**
|
18
|
+
* a cloned config used to bootstrap the interpreter
|
19
|
+
*/
|
20
|
+
config: object;
|
21
|
+
/**
|
22
|
+
* an utility to run code within the interpreter
|
23
|
+
*/
|
24
|
+
run: (code: string) => any;
|
25
|
+
/**
|
26
|
+
* an utility to run code asynchronously within the interpreter
|
27
|
+
*/
|
28
|
+
runAsync: (code: string) => Promise<any>;
|
29
|
+
/**
|
30
|
+
* an utility to write a file in the virtual FS, if available
|
31
|
+
*/
|
32
|
+
writeFile: (path: string, data: ArrayBuffer) => void;
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
* plugin configuration
|
36
|
+
*/
|
37
|
+
export type PluginOptions = {
|
38
|
+
/**
|
39
|
+
* the interpreter to use
|
40
|
+
*/
|
41
|
+
interpreter: 'pyodide' | 'micropython' | 'wasmoon' | 'ruby-wasm-wasi';
|
42
|
+
/**
|
43
|
+
* the optional interpreter version to use
|
44
|
+
*/
|
45
|
+
version?: string;
|
46
|
+
/**
|
47
|
+
* the optional config to use within such interpreter
|
48
|
+
*/
|
49
|
+
config?: string;
|
50
|
+
/**
|
51
|
+
* the callback that will be invoked once
|
52
|
+
*/
|
53
|
+
onRuntimeReady?: (environment: object, node: Element) => void;
|
54
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export function runEvent(runtime: any, code: any, key: any): any;
|
2
|
+
export function run(runtime: any, code: any): any;
|
3
|
+
export function runAsync(runtime: any, code: any): any;
|
4
|
+
export function runWorker(runtime: any, code: any, xworker: any): any;
|
5
|
+
export function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
6
|
+
export function writeFile({ FS }: {
|
7
|
+
FS: any;
|
8
|
+
}, path: any, buffer: any): any;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export function clean(code: string): string;
|
2
|
+
export const io: WeakMap<object, any>;
|
3
|
+
export function stdio(init: any): {
|
4
|
+
stderr: (...args: any[]) => any;
|
5
|
+
stdout: (...args: any[]) => any;
|
6
|
+
get(engine: any): Promise<any>;
|
7
|
+
};
|
8
|
+
export function writeFile(FS: any, path: any, buffer: any): any;
|
9
|
+
export function writeFileShim(FS: any, path: any, buffer: any): any;
|
10
|
+
export const base: WeakMap<object, any>;
|
11
|
+
export function fetchPaths(module: any, runtime: any, config_fetch: any): Promise<any[]>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export let type: string[];
|
3
|
+
export function module(): string;
|
4
|
+
export function engine({ loadMicroPython }: {
|
5
|
+
loadMicroPython: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export { run };
|
8
|
+
export { runAsync };
|
9
|
+
export { runEvent };
|
10
|
+
export { runWorker };
|
11
|
+
export { runWorkerAsync };
|
12
|
+
export { writeFile };
|
13
|
+
}
|
14
|
+
export default _default;
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { runEvent } from "./_python.js";
|
18
|
+
import { runWorker } from "./_python.js";
|
19
|
+
import { runWorkerAsync } from "./_python.js";
|
20
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export let type: string[];
|
3
|
+
export function module(version?: string): string;
|
4
|
+
export function engine({ loadPyodide }: {
|
5
|
+
loadPyodide: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export { run };
|
8
|
+
export { runAsync };
|
9
|
+
export { runEvent };
|
10
|
+
export { runWorker };
|
11
|
+
export { runWorkerAsync };
|
12
|
+
export { writeFile };
|
13
|
+
}
|
14
|
+
export default _default;
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { runEvent } from "./_python.js";
|
18
|
+
import { runWorker } from "./_python.js";
|
19
|
+
import { runWorkerAsync } from "./_python.js";
|
20
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let experimental: boolean;
|
3
|
+
let type: string[];
|
4
|
+
function module(version?: string): string;
|
5
|
+
function engine({ DefaultRubyVM }: {
|
6
|
+
DefaultRubyVM: any;
|
7
|
+
}, config: any, url: any): Promise<any>;
|
8
|
+
function run(runtime: any, code: any): any;
|
9
|
+
function runAsync(runtime: any, code: any): any;
|
10
|
+
function runEvent(runtime: any, code: any, key: any): any;
|
11
|
+
function runWorker(runtime: any, code: any, xworker: any): any;
|
12
|
+
function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
13
|
+
function writeFile(): never;
|
14
|
+
}
|
15
|
+
export default _default;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let type: string[];
|
3
|
+
function module(version?: string): string;
|
4
|
+
function engine({ LuaFactory, LuaLibraries }: {
|
5
|
+
LuaFactory: any;
|
6
|
+
LuaLibraries: any;
|
7
|
+
}, config: any): Promise<any>;
|
8
|
+
function run(runtime: any, code: any): any;
|
9
|
+
function runAsync(runtime: any, code: any): any;
|
10
|
+
function runEvent(runtime: any, code: any, key: any): any;
|
11
|
+
function runWorker(runtime: any, code: any, xworker: any): any;
|
12
|
+
function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
13
|
+
function writeFile({ cmodule: { module: { FS }, }, }: {
|
14
|
+
cmodule: {
|
15
|
+
module: {
|
16
|
+
FS: any;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
}, path: any, buffer: any): any;
|
20
|
+
}
|
21
|
+
export default _default;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/** @type {Map<string, object>} */
|
2
|
+
export const registry: Map<string, object>;
|
3
|
+
/** @type {Map<string, object>} */
|
4
|
+
export const configs: Map<string, object>;
|
5
|
+
/** @type {string[]} */
|
6
|
+
export const selectors: string[];
|
7
|
+
/** @type {string[]} */
|
8
|
+
export const prefixes: string[];
|
9
|
+
export const runtime: Map<any, any>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export function parse(text: string): object;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const isArray: (arg: any) => arg is any[];
|
2
|
+
export const assign: {
|
3
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
4
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
5
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
6
|
+
(target: object, ...sources: any[]): any;
|
7
|
+
};
|
8
|
+
export const create: {
|
9
|
+
(o: object): any;
|
10
|
+
(o: object, properties: PropertyDescriptorMap & ThisType<any>): any;
|
11
|
+
};
|
12
|
+
export const defineProperties: <T>(o: T, properties: PropertyDescriptorMap & ThisType<any>) => T;
|
13
|
+
export const defineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
14
|
+
export const all: {
|
15
|
+
<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
16
|
+
<T_1 extends [] | readonly unknown[]>(values: T_1): Promise<{ -readonly [P in keyof T_1]: Awaited<T_1[P]>; }>;
|
17
|
+
};
|
18
|
+
export const resolve: {
|
19
|
+
(): Promise<void>;
|
20
|
+
<T>(value: T): Promise<Awaited<T>>;
|
21
|
+
<T_1>(value: T_1 | PromiseLike<T_1>): Promise<Awaited<T_1>>;
|
22
|
+
};
|
23
|
+
export function absoluteURL(path: any, base?: string): string;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
declare function _default(...args: any[]): (url: string, options?: WorkerOptions) => Worker;
|
2
|
+
export default _default;
|
3
|
+
/**
|
4
|
+
* custom configuration
|
5
|
+
*/
|
6
|
+
export type WorkerOptions = {
|
7
|
+
/**
|
8
|
+
* the interpreter type to use
|
9
|
+
*/
|
10
|
+
type: string;
|
11
|
+
/**
|
12
|
+
* the optional interpreter version to use
|
13
|
+
*/
|
14
|
+
version?: string;
|
15
|
+
/**
|
16
|
+
* the optional config to use within such interpreter
|
17
|
+
*/
|
18
|
+
config?: string;
|
19
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export function runEvent(runtime: any, code: any, key: any): any;
|
2
|
+
export function run(runtime: any, code: any): any;
|
3
|
+
export function runAsync(runtime: any, code: any): any;
|
4
|
+
export function runWorker(runtime: any, code: any, xworker: any): any;
|
5
|
+
export function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
6
|
+
export function writeFile({ FS }: {
|
7
|
+
FS: any;
|
8
|
+
}, path: any, buffer: any): any;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export function clean(code: string): string;
|
2
|
+
export const io: WeakMap<object, any>;
|
3
|
+
export function stdio(init: any): {
|
4
|
+
stderr: (...args: any[]) => any;
|
5
|
+
stdout: (...args: any[]) => any;
|
6
|
+
get(engine: any): Promise<any>;
|
7
|
+
};
|
8
|
+
export function writeFile(FS: any, path: any, buffer: any): any;
|
9
|
+
export function writeFileShim(FS: any, path: any, buffer: any): any;
|
10
|
+
export const base: WeakMap<object, any>;
|
11
|
+
export function fetchPaths(module: any, runtime: any, config_fetch: any): Promise<any[]>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export let type: string[];
|
3
|
+
export function module(): string;
|
4
|
+
export function engine({ loadMicroPython }: {
|
5
|
+
loadMicroPython: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export { run };
|
8
|
+
export { runAsync };
|
9
|
+
export { runEvent };
|
10
|
+
export { runWorker };
|
11
|
+
export { runWorkerAsync };
|
12
|
+
export { writeFile };
|
13
|
+
}
|
14
|
+
export default _default;
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { runEvent } from "./_python.js";
|
18
|
+
import { runWorker } from "./_python.js";
|
19
|
+
import { runWorkerAsync } from "./_python.js";
|
20
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export let type: string[];
|
3
|
+
export function module(version?: string): string;
|
4
|
+
export function engine({ loadPyodide }: {
|
5
|
+
loadPyodide: any;
|
6
|
+
}, config: any, url: any): Promise<any>;
|
7
|
+
export { run };
|
8
|
+
export { runAsync };
|
9
|
+
export { runEvent };
|
10
|
+
export { runWorker };
|
11
|
+
export { runWorkerAsync };
|
12
|
+
export { writeFile };
|
13
|
+
}
|
14
|
+
export default _default;
|
15
|
+
import { run } from "./_python.js";
|
16
|
+
import { runAsync } from "./_python.js";
|
17
|
+
import { runEvent } from "./_python.js";
|
18
|
+
import { runWorker } from "./_python.js";
|
19
|
+
import { runWorkerAsync } from "./_python.js";
|
20
|
+
import { writeFile } from "./_python.js";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let experimental: boolean;
|
3
|
+
let type: string[];
|
4
|
+
function module(version?: string): string;
|
5
|
+
function engine({ DefaultRubyVM }: {
|
6
|
+
DefaultRubyVM: any;
|
7
|
+
}, config: any, url: any): Promise<any>;
|
8
|
+
function run(runtime: any, code: any): any;
|
9
|
+
function runAsync(runtime: any, code: any): any;
|
10
|
+
function runEvent(runtime: any, code: any, key: any): any;
|
11
|
+
function runWorker(runtime: any, code: any, xworker: any): any;
|
12
|
+
function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
13
|
+
function writeFile(): never;
|
14
|
+
}
|
15
|
+
export default _default;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let type: string[];
|
3
|
+
function module(version?: string): string;
|
4
|
+
function engine({ LuaFactory, LuaLibraries }: {
|
5
|
+
LuaFactory: any;
|
6
|
+
LuaLibraries: any;
|
7
|
+
}, config: any): Promise<any>;
|
8
|
+
function run(runtime: any, code: any): any;
|
9
|
+
function runAsync(runtime: any, code: any): any;
|
10
|
+
function runEvent(runtime: any, code: any, key: any): any;
|
11
|
+
function runWorker(runtime: any, code: any, xworker: any): any;
|
12
|
+
function runWorkerAsync(runtime: any, code: any, xworker: any): any;
|
13
|
+
function writeFile({ cmodule: { module: { FS }, }, }: {
|
14
|
+
cmodule: {
|
15
|
+
module: {
|
16
|
+
FS: any;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
}, path: any, buffer: any): any;
|
20
|
+
}
|
21
|
+
export default _default;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/** @type {Map<string, object>} */
|
2
|
+
export const registry: Map<string, object>;
|
3
|
+
/** @type {Map<string, object>} */
|
4
|
+
export const configs: Map<string, object>;
|
5
|
+
/** @type {string[]} */
|
6
|
+
export const selectors: string[];
|
7
|
+
/** @type {string[]} */
|
8
|
+
export const prefixes: string[];
|
9
|
+
export const runtime: Map<any, any>;
|
package/types/toml.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export function parse(text: string): object;
|
package/types/utils.d.ts
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
export const isArray: (arg: any) => arg is any[];
|
2
|
+
export const assign: {
|
3
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
4
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
5
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
6
|
+
(target: object, ...sources: any[]): any;
|
7
|
+
};
|
8
|
+
export const create: {
|
9
|
+
(o: object): any;
|
10
|
+
(o: object, properties: PropertyDescriptorMap & ThisType<any>): any;
|
11
|
+
};
|
12
|
+
export const defineProperties: <T>(o: T, properties: PropertyDescriptorMap & ThisType<any>) => T;
|
13
|
+
export const defineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
14
|
+
export const all: {
|
15
|
+
<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
16
|
+
<T_1 extends [] | readonly unknown[]>(values: T_1): Promise<{ -readonly [P in keyof T_1]: Awaited<T_1[P]>; }>;
|
17
|
+
};
|
18
|
+
export const resolve: {
|
19
|
+
(): Promise<void>;
|
20
|
+
<T>(value: T): Promise<Awaited<T>>;
|
21
|
+
<T_1>(value: T_1 | PromiseLike<T_1>): Promise<Awaited<T_1>>;
|
22
|
+
};
|
23
|
+
export function absoluteURL(path: any, base?: string): string;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
declare function _default(...args: any[]): (url: string, options?: WorkerOptions) => Worker;
|
2
|
+
export default _default;
|
3
|
+
/**
|
4
|
+
* plugin configuration
|
5
|
+
*/
|
6
|
+
export type WorkerOptions = {
|
7
|
+
/**
|
8
|
+
* the runtime/interpreter type to use
|
9
|
+
*/
|
10
|
+
type: string;
|
11
|
+
/**
|
12
|
+
* the optional runtime version to use
|
13
|
+
*/
|
14
|
+
version?: string;
|
15
|
+
/**
|
16
|
+
* the optional config to use within such runtime
|
17
|
+
*/
|
18
|
+
config?: string;
|
19
|
+
};
|