@tailwindcss/oxide-wasm32-wasi 0.0.0-insiders.d801d8d
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 +3 -0
- package/node_modules/@emnapi/core/LICENSE +21 -0
- package/node_modules/@emnapi/core/README.md +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.js +6661 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.d.ts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.ts +365 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js +7411 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.js +8390 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.mjs +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.mjs +6650 -0
- package/node_modules/@emnapi/core/index.js +5 -0
- package/node_modules/@emnapi/core/package.json +49 -0
- package/node_modules/@emnapi/runtime/LICENSE +21 -0
- package/node_modules/@emnapi/runtime/README.md +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.js +1347 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.ts +665 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js +1403 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts +420 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.js +1474 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.js +1475 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.mjs +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.mjs +1316 -0
- package/node_modules/@emnapi/runtime/index.js +5 -0
- package/node_modules/@emnapi/runtime/package.json +48 -0
- package/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
- package/node_modules/@emnapi/wasi-threads/README.md +203 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js +881 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +216 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js +929 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +941 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs +876 -0
- package/node_modules/@emnapi/wasi-threads/index.js +5 -0
- package/node_modules/@emnapi/wasi-threads/package.json +50 -0
- package/node_modules/@napi-rs/wasm-runtime/LICENSE +43 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +23712 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/runtime.js +12269 -0
- package/node_modules/@napi-rs/wasm-runtime/fs-proxy.cjs +193 -0
- package/node_modules/@napi-rs/wasm-runtime/package.json +60 -0
- package/node_modules/@napi-rs/wasm-runtime/runtime.cjs +15 -0
- package/node_modules/@tybys/wasm-util/README.md +193 -0
- package/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +417 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.js +2760 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +194 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +174 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1544 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +188 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +168 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1539 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/node_modules/@tybys/wasm-util/package.json +58 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +393 -0
- package/node_modules/tslib/tslib.es6.mjs +392 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +475 -0
- package/package.json +45 -0
- package/tailwindcss-oxide.wasi-browser.js +63 -0
- package/tailwindcss-oxide.wasi.cjs +88 -0
- package/tailwindcss-oxide.wasm32-wasi.wasm +0 -0
- package/wasi-worker-browser.mjs +39 -0
- package/wasi-worker.mjs +63 -0
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
export declare type Ptr = number | bigint
|
|
2
|
+
|
|
3
|
+
export declare interface IBuffer extends Uint8Array {}
|
|
4
|
+
export declare interface BufferCtor {
|
|
5
|
+
readonly prototype: IBuffer
|
|
6
|
+
/** @deprecated */
|
|
7
|
+
new (...args: any[]): IBuffer
|
|
8
|
+
from: {
|
|
9
|
+
(buffer: ArrayBufferLike): IBuffer
|
|
10
|
+
(buffer: ArrayBufferLike, byteOffset: number, length: number): IBuffer
|
|
11
|
+
}
|
|
12
|
+
alloc: (size: number) => IBuffer
|
|
13
|
+
isBuffer: (obj: unknown) => obj is IBuffer
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare const enum GlobalHandle {
|
|
17
|
+
UNDEFINED = 1,
|
|
18
|
+
NULL,
|
|
19
|
+
FALSE,
|
|
20
|
+
TRUE,
|
|
21
|
+
GLOBAL
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare const enum Version {
|
|
25
|
+
NODE_API_SUPPORTED_VERSION_MIN = 1,
|
|
26
|
+
NODE_API_DEFAULT_MODULE_API_VERSION = 8,
|
|
27
|
+
NODE_API_SUPPORTED_VERSION_MAX = 10,
|
|
28
|
+
NAPI_VERSION_EXPERIMENTAL = 2147483647 // INT_MAX
|
|
29
|
+
}
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
export declare type Pointer<T> = number
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
export declare type PointerPointer<T> = number
|
|
34
|
+
export declare type FunctionPointer<T extends (...args: any[]) => any> = Pointer<T>
|
|
35
|
+
export declare type Const<T> = T
|
|
36
|
+
|
|
37
|
+
export declare type void_p = Pointer<void>
|
|
38
|
+
export declare type void_pp = Pointer<void_p>
|
|
39
|
+
export declare type bool = number
|
|
40
|
+
export declare type char = number
|
|
41
|
+
export declare type char_p = Pointer<char>
|
|
42
|
+
export declare type unsigned_char = number
|
|
43
|
+
export declare type const_char = Const<char>
|
|
44
|
+
export declare type const_char_p = Pointer<const_char>
|
|
45
|
+
export declare type char16_t_p = number
|
|
46
|
+
export declare type const_char16_t_p = number
|
|
47
|
+
|
|
48
|
+
export declare type short = number
|
|
49
|
+
export declare type unsigned_short = number
|
|
50
|
+
export declare type int = number
|
|
51
|
+
export declare type unsigned_int = number
|
|
52
|
+
export declare type long = number
|
|
53
|
+
export declare type unsigned_long = number
|
|
54
|
+
export declare type long_long = bigint
|
|
55
|
+
export declare type unsigned_long_long = bigint
|
|
56
|
+
export declare type float = number
|
|
57
|
+
export declare type double = number
|
|
58
|
+
export declare type long_double = number
|
|
59
|
+
export declare type size_t = number
|
|
60
|
+
|
|
61
|
+
export declare type int8_t = number
|
|
62
|
+
export declare type uint8_t = number
|
|
63
|
+
export declare type int16_t = number
|
|
64
|
+
export declare type uint16_t = number
|
|
65
|
+
export declare type int32_t = number
|
|
66
|
+
export declare type uint32_t = number
|
|
67
|
+
export declare type int64_t = bigint
|
|
68
|
+
export declare type uint64_t = bigint
|
|
69
|
+
export declare type napi_env = Pointer<unknown>
|
|
70
|
+
|
|
71
|
+
export declare type napi_value = Pointer<unknown>
|
|
72
|
+
export declare type napi_ref = Pointer<unknown>
|
|
73
|
+
export declare type napi_deferred = Pointer<unknown>
|
|
74
|
+
export declare type napi_handle_scope = Pointer<unknown>
|
|
75
|
+
export declare type napi_escapable_handle_scope = Pointer<unknown>
|
|
76
|
+
|
|
77
|
+
export declare type napi_addon_register_func = FunctionPointer<(env: napi_env, exports: napi_value) => napi_value>
|
|
78
|
+
|
|
79
|
+
export declare type napi_callback_info = Pointer<unknown>
|
|
80
|
+
export declare type napi_callback = FunctionPointer<(env: napi_env, info: napi_callback_info) => napi_value>
|
|
81
|
+
|
|
82
|
+
export declare interface napi_extended_error_info {
|
|
83
|
+
error_message: const_char_p
|
|
84
|
+
engine_reserved: void_p
|
|
85
|
+
engine_error_code: uint32_t
|
|
86
|
+
error_code: napi_status
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export declare interface napi_property_descriptor {
|
|
90
|
+
// One of utf8name or name should be NULL.
|
|
91
|
+
utf8name: const_char_p
|
|
92
|
+
name: napi_value
|
|
93
|
+
|
|
94
|
+
method: napi_callback
|
|
95
|
+
getter: napi_callback
|
|
96
|
+
setter: napi_callback
|
|
97
|
+
value: napi_value
|
|
98
|
+
/* napi_property_attributes */
|
|
99
|
+
attributes: number
|
|
100
|
+
data: void_p
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare type napi_finalize = FunctionPointer<(
|
|
104
|
+
env: napi_env,
|
|
105
|
+
finalize_data: void_p,
|
|
106
|
+
finalize_hint: void_p
|
|
107
|
+
) => void>
|
|
108
|
+
|
|
109
|
+
export declare interface node_module {
|
|
110
|
+
nm_version: int32_t
|
|
111
|
+
nm_flags: uint32_t
|
|
112
|
+
nm_filename: Pointer<const_char>
|
|
113
|
+
nm_register_func: napi_addon_register_func
|
|
114
|
+
nm_modname: Pointer<const_char>
|
|
115
|
+
nm_priv: Pointer<void>
|
|
116
|
+
reserved: PointerPointer<void>
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare interface napi_node_version {
|
|
120
|
+
major: uint32_t
|
|
121
|
+
minor: uint32_t
|
|
122
|
+
patch: uint32_t
|
|
123
|
+
release: const_char_p
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare interface emnapi_emscripten_version {
|
|
127
|
+
major: uint32_t
|
|
128
|
+
minor: uint32_t
|
|
129
|
+
patch: uint32_t
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare const enum napi_status {
|
|
133
|
+
napi_ok,
|
|
134
|
+
napi_invalid_arg,
|
|
135
|
+
napi_object_expected,
|
|
136
|
+
napi_string_expected,
|
|
137
|
+
napi_name_expected,
|
|
138
|
+
napi_function_expected,
|
|
139
|
+
napi_number_expected,
|
|
140
|
+
napi_boolean_expected,
|
|
141
|
+
napi_array_expected,
|
|
142
|
+
napi_generic_failure,
|
|
143
|
+
napi_pending_exception,
|
|
144
|
+
napi_cancelled,
|
|
145
|
+
napi_escape_called_twice,
|
|
146
|
+
napi_handle_scope_mismatch,
|
|
147
|
+
napi_callback_scope_mismatch,
|
|
148
|
+
napi_queue_full,
|
|
149
|
+
napi_closing,
|
|
150
|
+
napi_bigint_expected,
|
|
151
|
+
napi_date_expected,
|
|
152
|
+
napi_arraybuffer_expected,
|
|
153
|
+
napi_detachable_arraybuffer_expected,
|
|
154
|
+
napi_would_deadlock, // unused
|
|
155
|
+
napi_no_external_buffers_allowed,
|
|
156
|
+
napi_cannot_run_js
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export declare const enum napi_property_attributes {
|
|
160
|
+
napi_default = 0,
|
|
161
|
+
napi_writable = 1 << 0,
|
|
162
|
+
napi_enumerable = 1 << 1,
|
|
163
|
+
napi_configurable = 1 << 2,
|
|
164
|
+
|
|
165
|
+
// Used with napi_define_class to distinguish static properties
|
|
166
|
+
// from instance properties. Ignored by napi_define_properties.
|
|
167
|
+
napi_static = 1 << 10,
|
|
168
|
+
|
|
169
|
+
/// #ifdef NAPI_EXPERIMENTAL
|
|
170
|
+
// Default for class methods.
|
|
171
|
+
napi_default_method = napi_writable | napi_configurable,
|
|
172
|
+
|
|
173
|
+
// Default for object properties, like in JS obj[prop].
|
|
174
|
+
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable
|
|
175
|
+
/// #endif // NAPI_EXPERIMENTAL
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export declare const enum napi_valuetype {
|
|
179
|
+
napi_undefined,
|
|
180
|
+
napi_null,
|
|
181
|
+
napi_boolean,
|
|
182
|
+
napi_number,
|
|
183
|
+
napi_string,
|
|
184
|
+
napi_symbol,
|
|
185
|
+
napi_object,
|
|
186
|
+
napi_function,
|
|
187
|
+
napi_external,
|
|
188
|
+
napi_bigint
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export declare const enum napi_typedarray_type {
|
|
192
|
+
napi_int8_array,
|
|
193
|
+
napi_uint8_array,
|
|
194
|
+
napi_uint8_clamped_array,
|
|
195
|
+
napi_int16_array,
|
|
196
|
+
napi_uint16_array,
|
|
197
|
+
napi_int32_array,
|
|
198
|
+
napi_uint32_array,
|
|
199
|
+
napi_float32_array,
|
|
200
|
+
napi_float64_array,
|
|
201
|
+
napi_bigint64_array,
|
|
202
|
+
napi_biguint64_array
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export declare const enum napi_key_collection_mode {
|
|
206
|
+
napi_key_include_prototypes,
|
|
207
|
+
napi_key_own_only
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export declare const enum napi_key_filter {
|
|
211
|
+
napi_key_all_properties = 0,
|
|
212
|
+
napi_key_writable = 1,
|
|
213
|
+
napi_key_enumerable = 1 << 1,
|
|
214
|
+
napi_key_configurable = 1 << 2,
|
|
215
|
+
napi_key_skip_strings = 1 << 3,
|
|
216
|
+
napi_key_skip_symbols = 1 << 4
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export declare const enum napi_key_conversion {
|
|
220
|
+
napi_key_keep_numbers,
|
|
221
|
+
napi_key_numbers_to_strings
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare const enum emnapi_memory_view_type {
|
|
225
|
+
emnapi_int8_array,
|
|
226
|
+
emnapi_uint8_array,
|
|
227
|
+
emnapi_uint8_clamped_array,
|
|
228
|
+
emnapi_int16_array,
|
|
229
|
+
emnapi_uint16_array,
|
|
230
|
+
emnapi_int32_array,
|
|
231
|
+
emnapi_uint32_array,
|
|
232
|
+
emnapi_float32_array,
|
|
233
|
+
emnapi_float64_array,
|
|
234
|
+
emnapi_bigint64_array,
|
|
235
|
+
emnapi_biguint64_array,
|
|
236
|
+
emnapi_data_view = -1,
|
|
237
|
+
emnapi_buffer = -2
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export declare const enum napi_threadsafe_function_call_mode {
|
|
241
|
+
napi_tsfn_nonblocking,
|
|
242
|
+
napi_tsfn_blocking
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare const enum napi_threadsafe_function_release_mode {
|
|
246
|
+
napi_tsfn_release,
|
|
247
|
+
napi_tsfn_abort
|
|
248
|
+
}
|
|
249
|
+
export declare type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
|
250
|
+
|
|
251
|
+
export declare class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
|
252
|
+
constructor(id: number, value: S);
|
|
253
|
+
dispose(): void;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export declare class Context {
|
|
257
|
+
private _isStopping;
|
|
258
|
+
private _canCallIntoJs;
|
|
259
|
+
private _suppressDestroy;
|
|
260
|
+
envStore: Store<Env>;
|
|
261
|
+
scopeStore: ScopeStore;
|
|
262
|
+
refStore: Store<Reference>;
|
|
263
|
+
deferredStore: Store<Deferred<any>>;
|
|
264
|
+
handleStore: HandleStore;
|
|
265
|
+
private readonly refCounter?;
|
|
266
|
+
private readonly cleanupQueue;
|
|
267
|
+
feature: {
|
|
268
|
+
supportReflect: boolean;
|
|
269
|
+
supportFinalizer: boolean;
|
|
270
|
+
supportWeakSymbol: boolean;
|
|
271
|
+
supportBigInt: boolean;
|
|
272
|
+
supportNewFunction: boolean;
|
|
273
|
+
canSetFunctionName: boolean;
|
|
274
|
+
setImmediate: (callback: () => void) => void;
|
|
275
|
+
Buffer: BufferCtor | undefined;
|
|
276
|
+
MessageChannel: {
|
|
277
|
+
new (): MessageChannel;
|
|
278
|
+
prototype: MessageChannel;
|
|
279
|
+
} | undefined;
|
|
280
|
+
};
|
|
281
|
+
constructor();
|
|
282
|
+
/**
|
|
283
|
+
* Suppress the destroy on `beforeExit` event in Node.js.
|
|
284
|
+
* Call this method if you want to keep the context and
|
|
285
|
+
* all associated {@link Env | Env} alive,
|
|
286
|
+
* this also means that cleanup hooks will not be called.
|
|
287
|
+
* After call this method, you should call
|
|
288
|
+
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
|
289
|
+
*/
|
|
290
|
+
suppressDestroy(): void;
|
|
291
|
+
getRuntimeVersions(): {
|
|
292
|
+
version: string;
|
|
293
|
+
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
|
294
|
+
NAPI_VERSION_EXPERIMENTAL: Version;
|
|
295
|
+
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
|
296
|
+
};
|
|
297
|
+
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
|
298
|
+
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
|
299
|
+
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
|
300
|
+
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
|
301
|
+
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
|
302
|
+
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
|
303
|
+
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
|
304
|
+
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
|
305
|
+
getCurrentScope(): HandleScope | null;
|
|
306
|
+
addToCurrentScope<V>(value: V): Handle<V>;
|
|
307
|
+
openScope(envObject: Env): HandleScope;
|
|
308
|
+
closeScope(envObject: Env, _scope?: HandleScope): void;
|
|
309
|
+
ensureHandle<S>(value: S): Handle<S>;
|
|
310
|
+
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
|
311
|
+
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
|
312
|
+
runCleanup(): void;
|
|
313
|
+
increaseWaitingRequestCounter(): void;
|
|
314
|
+
decreaseWaitingRequestCounter(): void;
|
|
315
|
+
setCanCallIntoJs(value: boolean): void;
|
|
316
|
+
setStopping(value: boolean): void;
|
|
317
|
+
canCallIntoJs(): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Destroy the context and call cleanup hooks.
|
|
320
|
+
* Associated {@link Env | Env} will be destroyed.
|
|
321
|
+
*/
|
|
322
|
+
destroy(): void;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export declare function createContext(): Context;
|
|
326
|
+
|
|
327
|
+
export declare class Deferred<T = any> implements IStoreValue {
|
|
328
|
+
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
|
329
|
+
id: number;
|
|
330
|
+
ctx: Context;
|
|
331
|
+
value: IDeferrdValue<T>;
|
|
332
|
+
constructor(ctx: Context, value: IDeferrdValue<T>);
|
|
333
|
+
resolve(value: T): void;
|
|
334
|
+
reject(reason?: any): void;
|
|
335
|
+
dispose(): void;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export declare class EmnapiError extends Error {
|
|
339
|
+
constructor(message?: string);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export declare abstract class Env implements IStoreValue {
|
|
343
|
+
readonly ctx: Context;
|
|
344
|
+
moduleApiVersion: number;
|
|
345
|
+
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
|
346
|
+
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
|
347
|
+
abort: (msg?: string) => never;
|
|
348
|
+
id: number;
|
|
349
|
+
openHandleScopes: number;
|
|
350
|
+
instanceData: TrackedFinalizer | null;
|
|
351
|
+
tryCatch: TryCatch;
|
|
352
|
+
refs: number;
|
|
353
|
+
reflist: RefTracker;
|
|
354
|
+
finalizing_reflist: RefTracker;
|
|
355
|
+
pendingFinalizers: RefTracker[];
|
|
356
|
+
lastError: {
|
|
357
|
+
errorCode: napi_status;
|
|
358
|
+
engineErrorCode: number;
|
|
359
|
+
engineReserved: Ptr;
|
|
360
|
+
};
|
|
361
|
+
inGcFinalizer: boolean;
|
|
362
|
+
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
|
363
|
+
/** @virtual */
|
|
364
|
+
canCallIntoJs(): boolean;
|
|
365
|
+
terminatedOrTerminating(): boolean;
|
|
366
|
+
ref(): void;
|
|
367
|
+
unref(): void;
|
|
368
|
+
ensureHandle<S>(value: S): Handle<S>;
|
|
369
|
+
ensureHandleId(value: any): napi_value;
|
|
370
|
+
clearLastError(): napi_status;
|
|
371
|
+
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
|
372
|
+
getReturnStatus(): napi_status;
|
|
373
|
+
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
|
374
|
+
/** @virtual */
|
|
375
|
+
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
376
|
+
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
|
377
|
+
checkGCAccess(): void;
|
|
378
|
+
/** @virtual */
|
|
379
|
+
enqueueFinalizer(finalizer: RefTracker): void;
|
|
380
|
+
/** @virtual */
|
|
381
|
+
dequeueFinalizer(finalizer: RefTracker): void;
|
|
382
|
+
/** @virtual */
|
|
383
|
+
deleteMe(): void;
|
|
384
|
+
dispose(): void;
|
|
385
|
+
private readonly _bindingMap;
|
|
386
|
+
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
|
387
|
+
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
|
388
|
+
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
|
389
|
+
getInstanceData(): number;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** @public */
|
|
393
|
+
declare interface External_2 extends Record<any, any> {
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** @public */
|
|
397
|
+
declare const External_2: {
|
|
398
|
+
new (value: number | bigint): External_2;
|
|
399
|
+
prototype: null;
|
|
400
|
+
};
|
|
401
|
+
export { External_2 as External }
|
|
402
|
+
|
|
403
|
+
export declare class Finalizer {
|
|
404
|
+
envObject: Env;
|
|
405
|
+
private _finalizeCallback;
|
|
406
|
+
private _finalizeData;
|
|
407
|
+
private _finalizeHint;
|
|
408
|
+
private _makeDynCall_vppp;
|
|
409
|
+
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
|
410
|
+
callback(): napi_finalize;
|
|
411
|
+
data(): void_p;
|
|
412
|
+
hint(): void_p;
|
|
413
|
+
resetEnv(): void;
|
|
414
|
+
resetFinalizer(): void;
|
|
415
|
+
callFinalizer(): void;
|
|
416
|
+
dispose(): void;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export declare function getDefaultContext(): Context;
|
|
420
|
+
|
|
421
|
+
/** @public */
|
|
422
|
+
export declare function getExternalValue(external: External_2): number | bigint;
|
|
423
|
+
|
|
424
|
+
export declare class Handle<S> {
|
|
425
|
+
id: number;
|
|
426
|
+
value: S;
|
|
427
|
+
constructor(id: number, value: S);
|
|
428
|
+
data(): void_p;
|
|
429
|
+
isNumber(): boolean;
|
|
430
|
+
isBigInt(): boolean;
|
|
431
|
+
isString(): boolean;
|
|
432
|
+
isFunction(): boolean;
|
|
433
|
+
isExternal(): boolean;
|
|
434
|
+
isObject(): boolean;
|
|
435
|
+
isArray(): boolean;
|
|
436
|
+
isArrayBuffer(): boolean;
|
|
437
|
+
isTypedArray(): boolean;
|
|
438
|
+
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
|
439
|
+
isDataView(): boolean;
|
|
440
|
+
isDate(): boolean;
|
|
441
|
+
isPromise(): boolean;
|
|
442
|
+
isBoolean(): boolean;
|
|
443
|
+
isUndefined(): boolean;
|
|
444
|
+
isSymbol(): boolean;
|
|
445
|
+
isNull(): boolean;
|
|
446
|
+
dispose(): void;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export declare class HandleScope {
|
|
450
|
+
handleStore: HandleStore;
|
|
451
|
+
id: number;
|
|
452
|
+
parent: HandleScope | null;
|
|
453
|
+
child: HandleScope | null;
|
|
454
|
+
start: number;
|
|
455
|
+
end: number;
|
|
456
|
+
private _escapeCalled;
|
|
457
|
+
callbackInfo: ICallbackInfo;
|
|
458
|
+
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
|
459
|
+
add<V>(value: V): Handle<V>;
|
|
460
|
+
addExternal(data: void_p): Handle<object>;
|
|
461
|
+
dispose(): void;
|
|
462
|
+
escape(handle: number): Handle<any> | null;
|
|
463
|
+
escapeCalled(): boolean;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export declare class HandleStore {
|
|
467
|
+
static UNDEFINED: ConstHandle<undefined>;
|
|
468
|
+
static NULL: ConstHandle<null>;
|
|
469
|
+
static FALSE: ConstHandle<false>;
|
|
470
|
+
static TRUE: ConstHandle<true>;
|
|
471
|
+
static GLOBAL: ConstHandle<typeof globalThis>;
|
|
472
|
+
static MIN_ID: 6;
|
|
473
|
+
private readonly _values;
|
|
474
|
+
private _next;
|
|
475
|
+
push<S>(value: S): Handle<S>;
|
|
476
|
+
erase(start: number, end: number): void;
|
|
477
|
+
get(id: Ptr): Handle<any> | undefined;
|
|
478
|
+
swap(a: number, b: number): void;
|
|
479
|
+
dispose(): void;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export declare interface ICallbackInfo {
|
|
483
|
+
thiz: any;
|
|
484
|
+
data: void_p;
|
|
485
|
+
args: ArrayLike<any>;
|
|
486
|
+
fn: Function;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export declare interface IDeferrdValue<T = any> {
|
|
490
|
+
resolve: (value: T) => void;
|
|
491
|
+
reject: (reason?: any) => void;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export declare interface IReferenceBinding {
|
|
495
|
+
wrapped: number;
|
|
496
|
+
tag: Uint32Array | null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/** @public */
|
|
500
|
+
export declare function isExternal(object: unknown): object is External_2;
|
|
501
|
+
|
|
502
|
+
export declare function isReferenceType(v: any): v is object;
|
|
503
|
+
|
|
504
|
+
export declare interface IStoreValue {
|
|
505
|
+
id: number;
|
|
506
|
+
dispose(): void;
|
|
507
|
+
[x: string]: any;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export declare const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
|
511
|
+
|
|
512
|
+
export declare const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
|
513
|
+
|
|
514
|
+
export declare const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
|
515
|
+
|
|
516
|
+
export declare const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
|
517
|
+
|
|
518
|
+
export declare class NodeEnv extends Env {
|
|
519
|
+
filename: string;
|
|
520
|
+
private readonly nodeBinding?;
|
|
521
|
+
destructing: boolean;
|
|
522
|
+
finalizationScheduled: boolean;
|
|
523
|
+
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
|
524
|
+
deleteMe(): void;
|
|
525
|
+
canCallIntoJs(): boolean;
|
|
526
|
+
triggerFatalException(err: any): void;
|
|
527
|
+
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
|
528
|
+
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
529
|
+
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
530
|
+
enqueueFinalizer(finalizer: RefTracker): void;
|
|
531
|
+
drainFinalizerQueue(): void;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export declare class NotSupportBufferError extends EmnapiError {
|
|
535
|
+
constructor(api: string, message: string);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export declare class NotSupportWeakRefError extends EmnapiError {
|
|
539
|
+
constructor(api: string, message: string);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export declare class Persistent<T> {
|
|
543
|
+
private _ref;
|
|
544
|
+
private _param;
|
|
545
|
+
private _callback;
|
|
546
|
+
private static readonly _registry;
|
|
547
|
+
constructor(value: T);
|
|
548
|
+
setWeak<P>(param: P, callback: (param: P) => void): void;
|
|
549
|
+
clearWeak(): void;
|
|
550
|
+
reset(): void;
|
|
551
|
+
isEmpty(): boolean;
|
|
552
|
+
deref(): T | undefined;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export declare class Reference extends RefTracker implements IStoreValue {
|
|
556
|
+
private static weakCallback;
|
|
557
|
+
id: number;
|
|
558
|
+
envObject: Env;
|
|
559
|
+
private readonly canBeWeak;
|
|
560
|
+
private _refcount;
|
|
561
|
+
private readonly _ownership;
|
|
562
|
+
persistent: Persistent<object>;
|
|
563
|
+
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
|
564
|
+
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
|
565
|
+
ref(): number;
|
|
566
|
+
unref(): number;
|
|
567
|
+
get(envObject?: Env): napi_value;
|
|
568
|
+
/** @virtual */
|
|
569
|
+
resetFinalizer(): void;
|
|
570
|
+
/** @virtual */
|
|
571
|
+
data(): void_p;
|
|
572
|
+
refcount(): number;
|
|
573
|
+
ownership(): ReferenceOwnership;
|
|
574
|
+
/** @virtual */
|
|
575
|
+
protected callUserFinalizer(): void;
|
|
576
|
+
/** @virtual */
|
|
577
|
+
protected invokeFinalizerFromGC(): void;
|
|
578
|
+
private _setWeak;
|
|
579
|
+
finalize(): void;
|
|
580
|
+
dispose(): void;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export declare enum ReferenceOwnership {
|
|
584
|
+
kRuntime = 0,
|
|
585
|
+
kUserland = 1
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export declare class ReferenceWithData extends Reference {
|
|
589
|
+
private readonly _data;
|
|
590
|
+
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
|
591
|
+
private constructor();
|
|
592
|
+
data(): void_p;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export declare class ReferenceWithFinalizer extends Reference {
|
|
596
|
+
private _finalizer;
|
|
597
|
+
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
|
598
|
+
private constructor();
|
|
599
|
+
resetFinalizer(): void;
|
|
600
|
+
data(): void_p;
|
|
601
|
+
protected callUserFinalizer(): void;
|
|
602
|
+
protected invokeFinalizerFromGC(): void;
|
|
603
|
+
dispose(): void;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export declare class RefTracker {
|
|
607
|
+
/** @virtual */
|
|
608
|
+
dispose(): void;
|
|
609
|
+
/** @virtual */
|
|
610
|
+
finalize(): void;
|
|
611
|
+
private _next;
|
|
612
|
+
private _prev;
|
|
613
|
+
link(list: RefTracker): void;
|
|
614
|
+
unlink(): void;
|
|
615
|
+
static finalizeAll(list: RefTracker): void;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export declare class ScopeStore {
|
|
619
|
+
private readonly _rootScope;
|
|
620
|
+
currentScope: HandleScope;
|
|
621
|
+
private readonly _values;
|
|
622
|
+
constructor();
|
|
623
|
+
get(id: number): HandleScope | undefined;
|
|
624
|
+
openScope(envObject: Env): HandleScope;
|
|
625
|
+
closeScope(envObject: Env): void;
|
|
626
|
+
dispose(): void;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export declare class Store<V extends IStoreValue> {
|
|
630
|
+
protected _values: Array<V | undefined>;
|
|
631
|
+
private _freeList;
|
|
632
|
+
private _size;
|
|
633
|
+
constructor();
|
|
634
|
+
add(value: V): void;
|
|
635
|
+
get(id: Ptr): V | undefined;
|
|
636
|
+
has(id: Ptr): boolean;
|
|
637
|
+
remove(id: Ptr): void;
|
|
638
|
+
dispose(): void;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export declare class TrackedFinalizer extends RefTracker {
|
|
642
|
+
private _finalizer;
|
|
643
|
+
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
|
644
|
+
private constructor();
|
|
645
|
+
data(): void_p;
|
|
646
|
+
dispose(): void;
|
|
647
|
+
finalize(): void;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export declare class TryCatch {
|
|
651
|
+
private _exception;
|
|
652
|
+
private _caught;
|
|
653
|
+
isEmpty(): boolean;
|
|
654
|
+
hasCaught(): boolean;
|
|
655
|
+
exception(): any;
|
|
656
|
+
setError(err: any): void;
|
|
657
|
+
reset(): void;
|
|
658
|
+
extractException(): any;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export declare const version: string;
|
|
662
|
+
|
|
663
|
+
export { }
|
|
664
|
+
|
|
665
|
+
export as namespace emnapi;
|