@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,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** @public */
|
|
6
|
+
export declare class Asyncify {
|
|
7
|
+
private value;
|
|
8
|
+
private exports;
|
|
9
|
+
private dataPtr;
|
|
10
|
+
init<T extends WebAssembly.Exports, U extends Array<Exclude<keyof T, AsyncifyExportName>>>(memory: WebAssembly.Memory, instance: {
|
|
11
|
+
readonly exports: T;
|
|
12
|
+
}, options: AsyncifyOptions): {
|
|
13
|
+
readonly exports: AsyncifyExports<T, U>;
|
|
14
|
+
};
|
|
15
|
+
private assertState;
|
|
16
|
+
wrapImportFunction<T extends Function>(f: T): T;
|
|
17
|
+
wrapImports<T extends WebAssembly.Imports>(imports: T): T;
|
|
18
|
+
wrapExportFunction<T extends Function>(f: T): AsyncifyExportFunction<T>;
|
|
19
|
+
wrapExports<T extends WebAssembly.Exports>(exports: T): AsyncifyExports<T, void>;
|
|
20
|
+
wrapExports<T extends WebAssembly.Exports, U extends Array<Exclude<keyof T, AsyncifyExportName>>>(exports: T, needWrap: U): AsyncifyExports<T, U>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** @public */
|
|
24
|
+
export declare type AsyncifyExportFunction<T> = T extends Callable ? (...args: Parameters<T>) => Promise<ReturnType<T>> : T;
|
|
25
|
+
|
|
26
|
+
/** @public */
|
|
27
|
+
export declare type AsyncifyExportName = 'asyncify_get_state' | 'asyncify_start_unwind' | 'asyncify_stop_unwind' | 'asyncify_start_rewind' | 'asyncify_stop_rewind';
|
|
28
|
+
|
|
29
|
+
/** @public */
|
|
30
|
+
export declare type AsyncifyExports<T, U> = T extends Record<string, any> ? {
|
|
31
|
+
[P in keyof T]: T[P] extends Callable ? U extends Array<Exclude<keyof T, AsyncifyExportName>> ? P extends U[number] ? AsyncifyExportFunction<T[P]> : T[P] : AsyncifyExportFunction<T[P]> : T[P];
|
|
32
|
+
} : T;
|
|
33
|
+
|
|
34
|
+
/** @public */
|
|
35
|
+
export declare function asyncifyLoad(asyncify: AsyncifyOptions, urlOrBuffer: string | URL | BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): Promise<WebAssembly.WebAssemblyInstantiatedSource>;
|
|
36
|
+
|
|
37
|
+
/** @public */
|
|
38
|
+
export declare function asyncifyLoadSync(asyncify: AsyncifyOptions, buffer: BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): WebAssembly.WebAssemblyInstantiatedSource;
|
|
39
|
+
|
|
40
|
+
/** @public */
|
|
41
|
+
export declare interface AsyncifyOptions {
|
|
42
|
+
wasm64?: boolean;
|
|
43
|
+
tryAllocate?: boolean | {
|
|
44
|
+
size?: number;
|
|
45
|
+
name?: string;
|
|
46
|
+
};
|
|
47
|
+
wrapExports?: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @public */
|
|
51
|
+
export declare interface AsyncWASIOptions extends WASIOptions {
|
|
52
|
+
fs: {
|
|
53
|
+
promises: IFsPromises;
|
|
54
|
+
};
|
|
55
|
+
asyncify?: Asyncify;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @public */
|
|
59
|
+
export declare interface BaseEncodingOptions {
|
|
60
|
+
encoding?: BufferEncoding_2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** @public */
|
|
64
|
+
export declare interface BigIntStats extends StatsBase<bigint> {
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** @public */
|
|
68
|
+
declare type BufferEncoding_2 = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
69
|
+
export { BufferEncoding_2 as BufferEncoding }
|
|
70
|
+
|
|
71
|
+
/** @public */
|
|
72
|
+
export declare type BufferEncodingOption = 'buffer' | {
|
|
73
|
+
encoding: 'buffer';
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @public */
|
|
77
|
+
export declare type Callable = (...args: any[]) => any;
|
|
78
|
+
|
|
79
|
+
/** @public */
|
|
80
|
+
export declare function createAsyncWASI(options?: AsyncWASIOptions): Promise<WASI>;
|
|
81
|
+
|
|
82
|
+
/** @public */
|
|
83
|
+
export declare function extendMemory(memory: WebAssembly.Memory): Memory;
|
|
84
|
+
|
|
85
|
+
/** @public */
|
|
86
|
+
export declare interface FileHandle {
|
|
87
|
+
readonly fd: number;
|
|
88
|
+
datasync(): Promise<void>;
|
|
89
|
+
sync(): Promise<void>;
|
|
90
|
+
read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
91
|
+
bytesRead: number;
|
|
92
|
+
buffer: TBuffer;
|
|
93
|
+
}>;
|
|
94
|
+
stat(opts?: StatOptions & {
|
|
95
|
+
bigint?: false;
|
|
96
|
+
}): Promise<Stats>;
|
|
97
|
+
stat(opts: StatOptions & {
|
|
98
|
+
bigint: true;
|
|
99
|
+
}): Promise<BigIntStats>;
|
|
100
|
+
stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
|
|
101
|
+
truncate(len?: number): Promise<void>;
|
|
102
|
+
utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
103
|
+
write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
104
|
+
bytesWritten: number;
|
|
105
|
+
buffer: TBuffer;
|
|
106
|
+
}>;
|
|
107
|
+
write(data: string | Uint8Array, position?: number, encoding?: BufferEncoding_2): Promise<{
|
|
108
|
+
bytesWritten: number;
|
|
109
|
+
buffer: string;
|
|
110
|
+
}>;
|
|
111
|
+
close(): Promise<void>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @public */
|
|
115
|
+
export declare interface IDirent {
|
|
116
|
+
isFile(): boolean;
|
|
117
|
+
isDirectory(): boolean;
|
|
118
|
+
isBlockDevice(): boolean;
|
|
119
|
+
isCharacterDevice(): boolean;
|
|
120
|
+
isSymbolicLink(): boolean;
|
|
121
|
+
isFIFO(): boolean;
|
|
122
|
+
isSocket(): boolean;
|
|
123
|
+
name: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** @public */
|
|
127
|
+
export declare interface IFs {
|
|
128
|
+
fstatSync(fd: number, options?: StatOptions & {
|
|
129
|
+
bigint?: false;
|
|
130
|
+
}): Stats;
|
|
131
|
+
fstatSync(fd: number, options: StatOptions & {
|
|
132
|
+
bigint: true;
|
|
133
|
+
}): BigIntStats;
|
|
134
|
+
fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
135
|
+
statSync(path: PathLike, options?: StatOptions & {
|
|
136
|
+
bigint?: false;
|
|
137
|
+
}): Stats;
|
|
138
|
+
statSync(path: PathLike, options: StatOptions & {
|
|
139
|
+
bigint: true;
|
|
140
|
+
}): BigIntStats;
|
|
141
|
+
statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
142
|
+
lstatSync(path: PathLike, options?: StatOptions & {
|
|
143
|
+
bigint?: false;
|
|
144
|
+
}): Stats;
|
|
145
|
+
lstatSync(path: PathLike, options: StatOptions & {
|
|
146
|
+
bigint: true;
|
|
147
|
+
}): BigIntStats;
|
|
148
|
+
lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
149
|
+
utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
150
|
+
openSync(path: PathLike, flags: OpenMode, mode?: Mode): number;
|
|
151
|
+
readSync(fd: number, buffer: ArrayBufferView, offset: number, length: number, position: number | null): number;
|
|
152
|
+
readSync(fd: number, buffer: ArrayBufferView, opts?: ReadSyncOptions): number;
|
|
153
|
+
writeSync(fd: number, buffer: ArrayBufferView, offset?: number, length?: number, position?: number): number;
|
|
154
|
+
writeSync(fd: number, string: string, position?: number, encoding?: BufferEncoding_2): number;
|
|
155
|
+
closeSync(fd: number): void;
|
|
156
|
+
readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): string;
|
|
157
|
+
readlinkSync(path: PathLike, options: BufferEncodingOption): Uint8Array;
|
|
158
|
+
readlinkSync(path: PathLike, options?: BaseEncodingOptions | string): string | Uint8Array;
|
|
159
|
+
realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): string;
|
|
160
|
+
realpathSync(path: PathLike, options: BufferEncodingOption): Uint8Array;
|
|
161
|
+
realpathSync(path: PathLike, options?: BaseEncodingOptions | string): string | Uint8Array;
|
|
162
|
+
truncateSync(path: PathLike, len?: number): void;
|
|
163
|
+
ftruncateSync(fd: number, len?: number): void;
|
|
164
|
+
fdatasyncSync(fd: number): void;
|
|
165
|
+
futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
|
|
166
|
+
readdirSync(path: PathLike, options?: {
|
|
167
|
+
encoding: BufferEncoding_2 | null;
|
|
168
|
+
withFileTypes?: false;
|
|
169
|
+
} | BufferEncoding_2): string[];
|
|
170
|
+
readdirSync(path: PathLike, options: {
|
|
171
|
+
encoding: 'buffer';
|
|
172
|
+
withFileTypes?: false;
|
|
173
|
+
} | 'buffer'): Uint8Array[];
|
|
174
|
+
readdirSync(path: PathLike, options?: BaseEncodingOptions & {
|
|
175
|
+
withFileTypes?: false;
|
|
176
|
+
} | BufferEncoding_2): string[] | Uint8Array[];
|
|
177
|
+
readdirSync(path: PathLike, options: BaseEncodingOptions & {
|
|
178
|
+
withFileTypes: true;
|
|
179
|
+
}): IDirent[];
|
|
180
|
+
fsyncSync(fd: number): void;
|
|
181
|
+
mkdirSync(path: PathLike, options: MakeDirectoryOptions & {
|
|
182
|
+
recursive: true;
|
|
183
|
+
}): string | undefined;
|
|
184
|
+
mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
|
|
185
|
+
recursive?: false;
|
|
186
|
+
})): void;
|
|
187
|
+
mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions): string | undefined;
|
|
188
|
+
rmdirSync(path: PathLike, options?: RmDirOptions): void;
|
|
189
|
+
linkSync(existingPath: PathLike, newPath: PathLike): void;
|
|
190
|
+
unlinkSync(path: PathLike): void;
|
|
191
|
+
renameSync(oldPath: PathLike, newPath: PathLike): void;
|
|
192
|
+
symlinkSync(target: PathLike, path: PathLike, type?: 'dir' | 'file' | 'junction'): void;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @public */
|
|
196
|
+
export declare interface IFsPromises {
|
|
197
|
+
stat(path: PathLike, options?: StatOptions & {
|
|
198
|
+
bigint?: false;
|
|
199
|
+
}): Promise<Stats>;
|
|
200
|
+
stat(path: PathLike, options: StatOptions & {
|
|
201
|
+
bigint: true;
|
|
202
|
+
}): Promise<BigIntStats>;
|
|
203
|
+
stat(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
204
|
+
lstat(path: PathLike, options?: StatOptions & {
|
|
205
|
+
bigint?: false;
|
|
206
|
+
}): Promise<Stats>;
|
|
207
|
+
lstat(path: PathLike, options: StatOptions & {
|
|
208
|
+
bigint: true;
|
|
209
|
+
}): Promise<BigIntStats>;
|
|
210
|
+
lstat(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
211
|
+
utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
212
|
+
open(path: PathLike, flags: OpenMode, mode?: Mode): Promise<FileHandle>;
|
|
213
|
+
read<TBuffer extends Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
214
|
+
bytesRead: number;
|
|
215
|
+
buffer: TBuffer;
|
|
216
|
+
}>;
|
|
217
|
+
write<TBuffer extends Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
218
|
+
bytesWritten: number;
|
|
219
|
+
buffer: TBuffer;
|
|
220
|
+
}>;
|
|
221
|
+
readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): Promise<string>;
|
|
222
|
+
readlink(path: PathLike, options: BufferEncodingOption): Promise<Uint8Array>;
|
|
223
|
+
readlink(path: PathLike, options?: BaseEncodingOptions | string): Promise<string | Uint8Array>;
|
|
224
|
+
realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): Promise<string>;
|
|
225
|
+
realpath(path: PathLike, options: BufferEncodingOption): Promise<Uint8Array>;
|
|
226
|
+
realpath(path: PathLike, options?: BaseEncodingOptions | string): Promise<string | Uint8Array>;
|
|
227
|
+
truncate(path: PathLike, len?: number): Promise<void>;
|
|
228
|
+
ftruncate(handle: FileHandle, len?: number): Promise<void>;
|
|
229
|
+
fdatasync(handle: FileHandle): Promise<void>;
|
|
230
|
+
futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
231
|
+
readdir(path: PathLike, options?: {
|
|
232
|
+
encoding: BufferEncoding_2 | null;
|
|
233
|
+
withFileTypes?: false;
|
|
234
|
+
} | BufferEncoding_2): Promise<string[]>;
|
|
235
|
+
readdir(path: PathLike, options: {
|
|
236
|
+
encoding: 'buffer';
|
|
237
|
+
withFileTypes?: false;
|
|
238
|
+
} | 'buffer'): Promise<Uint8Array[]>;
|
|
239
|
+
readdir(path: PathLike, options?: BaseEncodingOptions & {
|
|
240
|
+
withFileTypes?: false;
|
|
241
|
+
} | BufferEncoding_2): Promise<string[] | Uint8Array[]>;
|
|
242
|
+
readdir(path: PathLike, options: BaseEncodingOptions & {
|
|
243
|
+
withFileTypes: true;
|
|
244
|
+
}): Promise<IDirent[]>;
|
|
245
|
+
fsync(handle: FileHandle): Promise<void>;
|
|
246
|
+
mkdir(path: PathLike, options: MakeDirectoryOptions & {
|
|
247
|
+
recursive: true;
|
|
248
|
+
}): Promise<string | undefined>;
|
|
249
|
+
mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
|
|
250
|
+
recursive?: false;
|
|
251
|
+
})): Promise<void>;
|
|
252
|
+
mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions): Promise<string | undefined>;
|
|
253
|
+
rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
|
|
254
|
+
link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
255
|
+
unlink(path: PathLike): Promise<void>;
|
|
256
|
+
rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
|
|
257
|
+
symlink(target: PathLike, path: PathLike, type?: 'dir' | 'file' | 'junction'): Promise<void>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
declare const kBindingName: unique symbol;
|
|
261
|
+
|
|
262
|
+
declare const kExitCode: unique symbol;
|
|
263
|
+
|
|
264
|
+
declare const kInstance: unique symbol;
|
|
265
|
+
|
|
266
|
+
declare const kSetMemory: unique symbol;
|
|
267
|
+
|
|
268
|
+
declare const kStarted: unique symbol;
|
|
269
|
+
|
|
270
|
+
/** @public */
|
|
271
|
+
export declare function load(wasmInput: string | URL | BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): Promise<WebAssembly.WebAssemblyInstantiatedSource>;
|
|
272
|
+
|
|
273
|
+
/** @public */
|
|
274
|
+
export declare function loadSync(wasmInput: BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): WebAssembly.WebAssemblyInstantiatedSource;
|
|
275
|
+
|
|
276
|
+
/** @public */
|
|
277
|
+
export declare interface MakeDirectoryOptions {
|
|
278
|
+
recursive?: boolean;
|
|
279
|
+
mode?: Mode;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/** @public */
|
|
283
|
+
export declare class Memory extends WebAssemblyMemory {
|
|
284
|
+
constructor(descriptor: WebAssembly.MemoryDescriptor);
|
|
285
|
+
get HEAP8(): Int8Array;
|
|
286
|
+
get HEAPU8(): Uint8Array;
|
|
287
|
+
get HEAP16(): Int16Array;
|
|
288
|
+
get HEAPU16(): Uint16Array;
|
|
289
|
+
get HEAP32(): Int32Array;
|
|
290
|
+
get HEAPU32(): Uint32Array;
|
|
291
|
+
get HEAP64(): BigInt64Array;
|
|
292
|
+
get HEAPU64(): BigUint64Array;
|
|
293
|
+
get HEAPF32(): Float32Array;
|
|
294
|
+
get HEAPF64(): Float64Array;
|
|
295
|
+
get view(): DataView;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** @public */
|
|
299
|
+
export declare type Mode = number | string;
|
|
300
|
+
|
|
301
|
+
/** @public */
|
|
302
|
+
export declare type OpenMode = number | string;
|
|
303
|
+
|
|
304
|
+
/** @public */
|
|
305
|
+
export declare type PathLike = string | Uint8Array | URL;
|
|
306
|
+
|
|
307
|
+
/** @public */
|
|
308
|
+
export declare type PromisifyExports<T, U> = T extends Record<string, any> ? {
|
|
309
|
+
[P in keyof T]: T[P] extends Callable ? U extends Array<keyof T> ? P extends U[number] ? AsyncifyExportFunction<T[P]> : T[P] : AsyncifyExportFunction<T[P]> : T[P];
|
|
310
|
+
} : T;
|
|
311
|
+
|
|
312
|
+
/** @public */
|
|
313
|
+
export declare interface ReadSyncOptions {
|
|
314
|
+
offset?: number;
|
|
315
|
+
length?: number;
|
|
316
|
+
position?: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/** @public */
|
|
320
|
+
export declare interface RmDirOptions {
|
|
321
|
+
maxRetries?: number;
|
|
322
|
+
recursive?: boolean;
|
|
323
|
+
retryDelay?: number;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** @public */
|
|
327
|
+
export declare interface StatOptions {
|
|
328
|
+
bigint?: boolean;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** @public */
|
|
332
|
+
export declare interface Stats extends StatsBase<number> {
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** @public */
|
|
336
|
+
export declare interface StatsBase<T> {
|
|
337
|
+
isFile(): boolean;
|
|
338
|
+
isDirectory(): boolean;
|
|
339
|
+
isBlockDevice(): boolean;
|
|
340
|
+
isCharacterDevice(): boolean;
|
|
341
|
+
isSymbolicLink(): boolean;
|
|
342
|
+
isFIFO(): boolean;
|
|
343
|
+
isSocket(): boolean;
|
|
344
|
+
dev: T;
|
|
345
|
+
ino: T;
|
|
346
|
+
mode: T;
|
|
347
|
+
nlink: T;
|
|
348
|
+
uid: T;
|
|
349
|
+
gid: T;
|
|
350
|
+
rdev: T;
|
|
351
|
+
size: T;
|
|
352
|
+
blksize: T;
|
|
353
|
+
blocks: T;
|
|
354
|
+
atimeMs: T;
|
|
355
|
+
mtimeMs: T;
|
|
356
|
+
ctimeMs: T;
|
|
357
|
+
birthtimeMs: T;
|
|
358
|
+
atime: Date;
|
|
359
|
+
mtime: Date;
|
|
360
|
+
ctime: Date;
|
|
361
|
+
birthtime: Date;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/** @public */
|
|
365
|
+
export declare interface SyncWASIOptions extends WASIOptions {
|
|
366
|
+
fs?: IFs;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** @public */
|
|
370
|
+
export declare class WASI {
|
|
371
|
+
private [kSetMemory];
|
|
372
|
+
private [kStarted];
|
|
373
|
+
private [kExitCode];
|
|
374
|
+
private [kInstance];
|
|
375
|
+
private [kBindingName];
|
|
376
|
+
readonly wasiImport: Record<string, any>;
|
|
377
|
+
constructor(options?: SyncWASIOptions);
|
|
378
|
+
start(instance: WebAssembly.Instance): number | undefined | Promise<number> | Promise<undefined>;
|
|
379
|
+
initialize(instance: WebAssembly.Instance): void | Promise<void>;
|
|
380
|
+
getImportObject(): Record<string, Record<string, any>>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/** @public */
|
|
384
|
+
export declare interface WASIOptions {
|
|
385
|
+
version?: 'unstable' | 'preview1';
|
|
386
|
+
args?: string[] | undefined;
|
|
387
|
+
env?: Record<string, string> | undefined;
|
|
388
|
+
preopens?: Record<string, string> | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* @defaultValue `false`
|
|
391
|
+
*/
|
|
392
|
+
returnOnExit?: boolean | undefined;
|
|
393
|
+
print?: (str: string) => void;
|
|
394
|
+
printErr?: (str: string) => void;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/** @public */
|
|
398
|
+
export declare const WebAssemblyMemory: {
|
|
399
|
+
new (descriptor: WebAssembly.MemoryDescriptor): WebAssembly.Memory;
|
|
400
|
+
prototype: WebAssembly.Memory;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/** @public */
|
|
404
|
+
export declare function wrapAsyncExport<T extends Function = any>(f: Function): T;
|
|
405
|
+
|
|
406
|
+
/** @public */
|
|
407
|
+
export declare function wrapAsyncImport<T extends (...args: any[]) => any>(f: T, parameterType: WebAssembly.ValueType[], returnType: WebAssembly.ValueType[]): (...args: [object, ...Parameters<T>]) => ReturnType<T>;
|
|
408
|
+
|
|
409
|
+
/** @public */
|
|
410
|
+
export declare function wrapExports<T extends WebAssembly.Exports>(exports: T): PromisifyExports<T, void>;
|
|
411
|
+
|
|
412
|
+
/** @public */
|
|
413
|
+
export declare function wrapExports<T extends WebAssembly.Exports, U extends Array<keyof T>>(exports: T, needWrap: U): PromisifyExports<T, U>;
|
|
414
|
+
|
|
415
|
+
export { }
|
|
416
|
+
|
|
417
|
+
export as namespace wasmUtil;
|