@suchipi/quickjs 0.1.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/LICENSE +40 -0
- package/README.md +145 -0
- package/build/aarch64-apple-darwin/bin/qjs +0 -0
- package/build/aarch64-apple-darwin/bin/qjsbootstrap +0 -0
- package/build/aarch64-apple-darwin/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-apple-darwin/bin/qjsc +0 -0
- package/build/aarch64-apple-darwin/bin/quickjs-run +0 -0
- package/build/aarch64-apple-darwin/dts/inspect.d.ts +123 -0
- package/build/aarch64-apple-darwin/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/aarch64-apple-darwin/dts/quickjs-libc.d.ts +1309 -0
- package/build/aarch64-apple-darwin/dts/quickjs-libcontext.d.ts +179 -0
- package/build/aarch64-apple-darwin/dts/quickjs.d.ts +859 -0
- package/build/aarch64-apple-darwin/lib/quickjs-core.a +0 -0
- package/build/aarch64-apple-darwin/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-gnu/dts/inspect.d.ts +123 -0
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libc.d.ts +1309 -0
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libcontext.d.ts +179 -0
- package/build/aarch64-unknown-linux-gnu/dts/quickjs.d.ts +859 -0
- package/build/aarch64-unknown-linux-gnu/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-gnu/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-musl/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-musl/dts/inspect.d.ts +123 -0
- package/build/aarch64-unknown-linux-musl/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/aarch64-unknown-linux-musl/dts/quickjs-libc.d.ts +1309 -0
- package/build/aarch64-unknown-linux-musl/dts/quickjs-libcontext.d.ts +179 -0
- package/build/aarch64-unknown-linux-musl/dts/quickjs.d.ts +859 -0
- package/build/aarch64-unknown-linux-musl/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-musl/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-static/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-static/dts/inspect.d.ts +123 -0
- package/build/aarch64-unknown-linux-static/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/aarch64-unknown-linux-static/dts/quickjs-libc.d.ts +1309 -0
- package/build/aarch64-unknown-linux-static/dts/quickjs-libcontext.d.ts +179 -0
- package/build/aarch64-unknown-linux-static/dts/quickjs.d.ts +859 -0
- package/build/aarch64-unknown-linux-static/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-static/lib/quickjs-full.a +0 -0
- package/build/x86_64-apple-darwin/bin/qjs +0 -0
- package/build/x86_64-apple-darwin/bin/qjsbootstrap +0 -0
- package/build/x86_64-apple-darwin/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-apple-darwin/bin/qjsc +0 -0
- package/build/x86_64-apple-darwin/bin/quickjs-run +0 -0
- package/build/x86_64-apple-darwin/dts/inspect.d.ts +123 -0
- package/build/x86_64-apple-darwin/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/x86_64-apple-darwin/dts/quickjs-libc.d.ts +1309 -0
- package/build/x86_64-apple-darwin/dts/quickjs-libcontext.d.ts +179 -0
- package/build/x86_64-apple-darwin/dts/quickjs.d.ts +859 -0
- package/build/x86_64-apple-darwin/lib/quickjs-core.a +0 -0
- package/build/x86_64-apple-darwin/lib/quickjs-full.a +0 -0
- package/build/x86_64-pc-windows-static/bin/qjs.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsbootstrap-bytecode.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsbootstrap.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsc.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/quickjs-run.exe +0 -0
- package/build/x86_64-pc-windows-static/dts/inspect.d.ts +123 -0
- package/build/x86_64-pc-windows-static/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/x86_64-pc-windows-static/dts/quickjs-libc.d.ts +1309 -0
- package/build/x86_64-pc-windows-static/dts/quickjs-libcontext.d.ts +179 -0
- package/build/x86_64-pc-windows-static/dts/quickjs.d.ts +859 -0
- package/build/x86_64-pc-windows-static/lib/quickjs-core.a +0 -0
- package/build/x86_64-pc-windows-static/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-gnu/dts/inspect.d.ts +123 -0
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libc.d.ts +1309 -0
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libcontext.d.ts +179 -0
- package/build/x86_64-unknown-linux-gnu/dts/quickjs.d.ts +859 -0
- package/build/x86_64-unknown-linux-gnu/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-gnu/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-musl/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-musl/dts/inspect.d.ts +123 -0
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libc.d.ts +1309 -0
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libcontext.d.ts +179 -0
- package/build/x86_64-unknown-linux-musl/dts/quickjs.d.ts +859 -0
- package/build/x86_64-unknown-linux-musl/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-musl/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-static/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-static/dts/inspect.d.ts +123 -0
- package/build/x86_64-unknown-linux-static/dts/quickjs-libbytecode.d.ts +24 -0
- package/build/x86_64-unknown-linux-static/dts/quickjs-libc.d.ts +1309 -0
- package/build/x86_64-unknown-linux-static/dts/quickjs-libcontext.d.ts +179 -0
- package/build/x86_64-unknown-linux-static/dts/quickjs.d.ts +859 -0
- package/build/x86_64-unknown-linux-static/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-static/lib/quickjs-full.a +0 -0
- package/npm/cli/qjs.js +4 -0
- package/npm/cli/qjsc.js +4 -0
- package/npm/cli/quickjs-run.js +4 -0
- package/npm/cli/run-binary.js +17 -0
- package/npm/index.js +68 -0
- package/package.json +35 -0
- package/tsconfig.json +19 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** npm: @suchipi/print@2.3.0. License: ISC */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright (c) 2016-2022, John Gardner
|
|
5
|
+
Copyright (c) 2022 Lily Skye
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
copyright notice and this permission notice appear in all copies.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Options for {@link inspect}.
|
|
22
|
+
*/
|
|
23
|
+
declare interface InspectOptions {
|
|
24
|
+
/** Whether to display non-enumerable properties. Defaults to false. */
|
|
25
|
+
all?: boolean;
|
|
26
|
+
|
|
27
|
+
/** Whether to invoke getter functions. Defaults to false. */
|
|
28
|
+
followGetters?: boolean;
|
|
29
|
+
|
|
30
|
+
/** Whether to display the indexes of iterable entries. Defaults to false. */
|
|
31
|
+
indexes?: boolean;
|
|
32
|
+
|
|
33
|
+
/** Hide object details after 𝑁 recursions. Defaults to Infinity. */
|
|
34
|
+
maxDepth?: number;
|
|
35
|
+
|
|
36
|
+
/** If true, don't identify well-known symbols as `@@…`. Defaults to false. */
|
|
37
|
+
noAmp?: boolean;
|
|
38
|
+
|
|
39
|
+
/** If true, don't format byte-arrays as hexadecimal. Defaults to false. */
|
|
40
|
+
noHex?: boolean;
|
|
41
|
+
|
|
42
|
+
/** If true, don't display function source code. Defaults to false. */
|
|
43
|
+
noSource?: boolean;
|
|
44
|
+
|
|
45
|
+
/** Whether to show `__proto__` properties if possible. Defaults to false. */
|
|
46
|
+
proto?: boolean;
|
|
47
|
+
|
|
48
|
+
/** Whether to sort properties alphabetically. When false, properties are sorted by creation order. Defaults to false. */
|
|
49
|
+
sort?: boolean;
|
|
50
|
+
|
|
51
|
+
/** Options that control whether and how ANSI terminal escape sequences for colours should be added to the output. Defaults to false, meaning no colours. */
|
|
52
|
+
colours?: boolean | 256 | 8 | InspectColours;
|
|
53
|
+
|
|
54
|
+
/** Prefix string to use for indentation. Defaults to '\t'. */
|
|
55
|
+
indent?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare interface InspectColours {
|
|
59
|
+
off?: string | number;
|
|
60
|
+
red?: string | number;
|
|
61
|
+
grey?: string | number;
|
|
62
|
+
green?: string | number;
|
|
63
|
+
darkGreen?: string | number;
|
|
64
|
+
punct?: string | number;
|
|
65
|
+
keys?: string | number;
|
|
66
|
+
keyEscape?: string | number;
|
|
67
|
+
typeColour?: string | number;
|
|
68
|
+
primitive?: string | number;
|
|
69
|
+
escape?: string | number;
|
|
70
|
+
date?: string | number;
|
|
71
|
+
hexBorder?: string | number;
|
|
72
|
+
hexValue?: string | number;
|
|
73
|
+
hexOffset?: string | number;
|
|
74
|
+
reference?: string | number;
|
|
75
|
+
srcBorder?: string | number;
|
|
76
|
+
srcRowNum?: string | number;
|
|
77
|
+
srcRowText?: string | number;
|
|
78
|
+
nul?: string | number;
|
|
79
|
+
nulProt?: string | number;
|
|
80
|
+
undef?: string | number;
|
|
81
|
+
noExts?: string | number;
|
|
82
|
+
frozen?: string | number;
|
|
83
|
+
sealed?: string | number;
|
|
84
|
+
regex?: string | number;
|
|
85
|
+
string?: string | number;
|
|
86
|
+
symbol?: string | number;
|
|
87
|
+
symbolFade?: string | number;
|
|
88
|
+
braces?: string | number;
|
|
89
|
+
quotes?: string | number;
|
|
90
|
+
empty?: string | number;
|
|
91
|
+
dot?: string | number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface InspectFunction {
|
|
95
|
+
/**
|
|
96
|
+
* Generate a human-readable representation of a value.
|
|
97
|
+
*
|
|
98
|
+
* @param value - Value to inspect
|
|
99
|
+
* @param options - Additional settings for refining output
|
|
100
|
+
* @returns A string representation of `value`.
|
|
101
|
+
*/
|
|
102
|
+
(value: any, options?: InspectOptions): string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Generate a human-readable representation of a value.
|
|
106
|
+
*
|
|
107
|
+
* @param value - Value to inspect
|
|
108
|
+
* @param key - The value's corresponding member name
|
|
109
|
+
* @param options - Additional settings for refining output
|
|
110
|
+
* @returns A string representation of `value`.
|
|
111
|
+
*/
|
|
112
|
+
(value: any, key?: string | symbol, options?: InspectOptions): string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Generate a human-readable representation of a value.
|
|
117
|
+
*
|
|
118
|
+
* @param value - Value to inspect
|
|
119
|
+
* @param key - The value's corresponding member name
|
|
120
|
+
* @param options - Additional settings for refining output
|
|
121
|
+
* @returns A string representation of `value`.
|
|
122
|
+
*/
|
|
123
|
+
declare var inspect: InspectFunction;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare module "quickjs:bytecode" {
|
|
2
|
+
/**
|
|
3
|
+
* Convert the module or script in the specified file into bytecode.
|
|
4
|
+
*
|
|
5
|
+
* When converted back to a value, it will be a function.
|
|
6
|
+
*/
|
|
7
|
+
export function fromFile(
|
|
8
|
+
path: string,
|
|
9
|
+
options?: { byteSwap?: boolean; sourceType?: "module" | "script" }
|
|
10
|
+
): ArrayBuffer;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Convert the provided value into bytecode. Doesn't work with all values.
|
|
14
|
+
*/
|
|
15
|
+
export function fromValue(
|
|
16
|
+
value: any,
|
|
17
|
+
options?: { byteSwap?: boolean }
|
|
18
|
+
): ArrayBuffer;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Convert the provided bytecode into a value.
|
|
22
|
+
*/
|
|
23
|
+
export function toValue(bytecode: ArrayBuffer): any;
|
|
24
|
+
}
|