nuxt-ai-ready 2.5.0 → 2.5.2
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/dist/chunks/agent-skills.mjs +1 -1
- package/dist/chunks/prerender.mjs +1 -1
- package/dist/cli.mjs +2 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/server/db/drizzle/queries.js +0 -1
- package/dist/runtime/server/db/queries.d.ts +2 -0
- package/dist/runtime/server/db/queries.js +11 -5
- package/dist/runtime/server/db/seed.d.ts +2 -2
- package/dist/runtime/server/routes/__ai-ready/reindex.post.js +2 -0
- package/dist/runtime/server/utils/batchIndex.js +4 -2
- package/dist/runtime/server/utils/checkStale.d.ts +1 -1
- package/dist/runtime/server/utils/checkStale.js +1 -1
- package/dist/runtime/server/utils/indexPage.d.ts +8 -1
- package/dist/runtime/server/utils/indexPage.js +13 -5
- package/dist/shared/{nuxt-ai-ready.DsokNmXc.mjs → nuxt-ai-ready.CLSWou20.mjs} +2 -0
- package/node_modules/@mdream/js/LICENSE.md +9 -0
- package/node_modules/@mdream/js/README.md +792 -0
- package/node_modules/@mdream/js/bin/mdream.mjs +2 -0
- package/node_modules/@mdream/js/dist/_chunks/const.mjs +134 -0
- package/node_modules/@mdream/js/dist/_chunks/index.d.mts +9 -0
- package/node_modules/@mdream/js/dist/_chunks/markdown-processor.mjs +1968 -0
- package/node_modules/@mdream/js/dist/_chunks/minimal.d.mts +6 -0
- package/node_modules/@mdream/js/dist/_chunks/parse.mjs +2756 -0
- package/node_modules/@mdream/js/dist/_chunks/plugins.mjs +725 -0
- package/node_modules/@mdream/js/dist/_chunks/resolve-plugins.mjs +44 -0
- package/node_modules/@mdream/js/dist/_chunks/stream.mjs +37 -0
- package/node_modules/@mdream/js/dist/_chunks/types.d.mts +473 -0
- package/node_modules/@mdream/js/dist/cli.d.mts +1 -0
- package/node_modules/@mdream/js/dist/cli.mjs +32 -0
- package/node_modules/@mdream/js/dist/core.d.mts +15 -0
- package/node_modules/@mdream/js/dist/core.mjs +28 -0
- package/node_modules/@mdream/js/dist/index.d.mts +4 -0
- package/node_modules/@mdream/js/dist/index.mjs +58 -0
- package/node_modules/@mdream/js/dist/llms-txt.d.mts +86 -0
- package/node_modules/@mdream/js/dist/llms-txt.mjs +308 -0
- package/node_modules/@mdream/js/dist/negotiate.d.mts +35 -0
- package/node_modules/@mdream/js/dist/negotiate.mjs +121 -0
- package/node_modules/@mdream/js/dist/parse.d.mts +90 -0
- package/node_modules/@mdream/js/dist/parse.mjs +2 -0
- package/node_modules/@mdream/js/dist/plugins.d.mts +85 -0
- package/node_modules/@mdream/js/dist/plugins.mjs +2 -0
- package/node_modules/@mdream/js/dist/preset/minimal.d.mts +2 -0
- package/node_modules/@mdream/js/dist/preset/minimal.mjs +33 -0
- package/node_modules/@mdream/js/dist/splitter.d.mts +18 -0
- package/node_modules/@mdream/js/dist/splitter.mjs +194 -0
- package/node_modules/@mdream/js/package.json +103 -0
- package/node_modules/cac/LICENSE +21 -0
- package/node_modules/cac/README.md +492 -0
- package/node_modules/cac/dist/index.d.ts +196 -0
- package/node_modules/cac/dist/index.js +638 -0
- package/node_modules/cac/package.json +72 -0
- package/node_modules/mdream/LICENSE.md +9 -0
- package/node_modules/mdream/README.md +1091 -0
- package/node_modules/mdream/bin/mdream.mjs +46 -0
- package/node_modules/mdream/dist/browser.d.mts +105 -0
- package/node_modules/mdream/dist/browser.mjs +262 -0
- package/node_modules/mdream/dist/edge.d.mts +100 -0
- package/node_modules/mdream/dist/edge.mjs +250 -0
- package/node_modules/mdream/dist/iife.js +605 -0
- package/node_modules/mdream/dist/index.d.mts +89 -0
- package/node_modules/mdream/dist/index.mjs +184 -0
- package/node_modules/mdream/dist/wasm.d.mts +100 -0
- package/node_modules/mdream/dist/wasm.mjs +140 -0
- package/node_modules/mdream/dist/worker.d.mts +101 -0
- package/node_modules/mdream/dist/worker.mjs +217 -0
- package/node_modules/mdream/napi/index.d.mts +127 -0
- package/node_modules/mdream/napi/index.d.ts +127 -0
- package/node_modules/mdream/napi/index.mjs +725 -0
- package/node_modules/mdream/napi/rust.android-arm-eabi.node +0 -0
- package/node_modules/mdream/napi/rust.android-arm64.node +0 -0
- package/node_modules/mdream/napi/rust.darwin-arm64.node +0 -0
- package/node_modules/mdream/napi/rust.darwin-x64.node +0 -0
- package/node_modules/mdream/napi/rust.freebsd-x64.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm-gnueabihf.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm64-gnu.node +0 -0
- package/node_modules/mdream/napi/rust.linux-arm64-musl.node +0 -0
- package/node_modules/mdream/napi/rust.linux-x64-gnu.node +0 -0
- package/node_modules/mdream/napi/rust.linux-x64-musl.node +0 -0
- package/node_modules/mdream/napi/rust.wasi.cjs +2144 -0
- package/node_modules/mdream/napi/rust.wasm32-wasi.wasm +0 -0
- package/node_modules/mdream/napi/rust.win32-arm64-msvc.node +0 -0
- package/node_modules/mdream/napi/rust.win32-x64-msvc.node +0 -0
- package/node_modules/mdream/node_modules/@emnapi/core/LICENSE +21 -0
- package/node_modules/mdream/node_modules/@emnapi/core/README.md +1 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.d.ts +392 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.d.ts +392 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.full.js +8351 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/emnapi-core.js +7268 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.d.ts +5 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/async-work.js +843 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.d.ts +4 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/index.js +3 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.d.ts +5 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/threadsafe-function.js +1010 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.d.ts +5 -0
- package/node_modules/mdream/node_modules/@emnapi/core/dist/plugins/v8.js +1446 -0
- package/node_modules/mdream/node_modules/@emnapi/core/package.json +39 -0
- package/node_modules/mdream/node_modules/@emnapi/core/rollup.config.js +60 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/LICENSE +21 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/README.md +1 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.d.ts +833 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js +2306 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/dist/emnapi.js.map +1 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/index.cjs +63 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/package.json +39 -0
- package/node_modules/mdream/node_modules/@emnapi/runtime/rollup.config.js +25 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/README.md +203 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +236 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +1086 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/package.json +35 -0
- package/node_modules/mdream/node_modules/@emnapi/wasi-threads/rollup.config.js +6 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +1472 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +1470 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +237 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/dist/fs.js +18260 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +317 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/package.json +67 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.cjs +39 -0
- package/node_modules/mdream/node_modules/@napi-rs/wasm-runtime/runtime.js +36 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/LICENSE +21 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/README.md +193 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +423 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2932 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2932 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.js +2954 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +192 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +316 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1599 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +186 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +310 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1593 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/node_modules/mdream/node_modules/@tybys/wasm-util/package.json +58 -0
- package/node_modules/mdream/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/mdream/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/mdream/node_modules/tslib/README.md +164 -0
- package/node_modules/mdream/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/mdream/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/mdream/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/mdream/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/mdream/node_modules/tslib/package.json +47 -0
- package/node_modules/mdream/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/mdream/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/mdream/node_modules/tslib/tslib.es6.js +402 -0
- package/node_modules/mdream/node_modules/tslib/tslib.es6.mjs +401 -0
- package/node_modules/mdream/node_modules/tslib/tslib.html +1 -0
- package/node_modules/mdream/node_modules/tslib/tslib.js +484 -0
- package/node_modules/mdream/package.json +110 -0
- package/node_modules/mdream/skills/mdream/SKILL.md +124 -0
- package/node_modules/mdream/skills/mdream/references/runtimes.md +49 -0
- package/node_modules/mdream/wasm/mdream_edge.d.ts +90 -0
- package/node_modules/mdream/wasm/mdream_edge.js +517 -0
- package/node_modules/mdream/wasm/mdream_edge_bg.wasm +0 -0
- package/node_modules/mdream/wasm/mdream_edge_bg.wasm.d.ts +20 -0
- package/node_modules/mdream/wasm/package.json +17 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge.d.ts +45 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge.js +13 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.js +413 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm +0 -0
- package/node_modules/mdream/wasm-bundler/mdream_edge_bg.wasm.d.ts +20 -0
- package/node_modules/mdream/wasm-bundler/package.json +19 -0
- package/node_modules/pathe/LICENSE +70 -0
- package/node_modules/pathe/README.md +73 -0
- package/node_modules/pathe/dist/index.cjs +39 -0
- package/node_modules/pathe/dist/index.d.cts +47 -0
- package/node_modules/pathe/dist/index.d.mts +47 -0
- package/node_modules/pathe/dist/index.d.ts +47 -0
- package/node_modules/pathe/dist/index.mjs +19 -0
- package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +266 -0
- package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +249 -0
- package/node_modules/pathe/dist/utils.cjs +82 -0
- package/node_modules/pathe/dist/utils.d.cts +32 -0
- package/node_modules/pathe/dist/utils.d.mts +32 -0
- package/node_modules/pathe/dist/utils.d.ts +32 -0
- package/node_modules/pathe/dist/utils.mjs +77 -0
- package/node_modules/pathe/package.json +61 -0
- package/node_modules/pathe/utils.d.ts +1 -0
- package/package.json +8 -64
|
@@ -0,0 +1,423 @@
|
|
|
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 FinalizeBindingsOptions {
|
|
116
|
+
memory?: WebAssembly.Memory;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** @public */
|
|
120
|
+
export declare interface IDirent {
|
|
121
|
+
isFile(): boolean;
|
|
122
|
+
isDirectory(): boolean;
|
|
123
|
+
isBlockDevice(): boolean;
|
|
124
|
+
isCharacterDevice(): boolean;
|
|
125
|
+
isSymbolicLink(): boolean;
|
|
126
|
+
isFIFO(): boolean;
|
|
127
|
+
isSocket(): boolean;
|
|
128
|
+
name: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** @public */
|
|
132
|
+
export declare interface IFs {
|
|
133
|
+
fstatSync(fd: number, options?: StatOptions & {
|
|
134
|
+
bigint?: false;
|
|
135
|
+
}): Stats;
|
|
136
|
+
fstatSync(fd: number, options: StatOptions & {
|
|
137
|
+
bigint: true;
|
|
138
|
+
}): BigIntStats;
|
|
139
|
+
fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
140
|
+
statSync(path: PathLike, options?: StatOptions & {
|
|
141
|
+
bigint?: false;
|
|
142
|
+
}): Stats;
|
|
143
|
+
statSync(path: PathLike, options: StatOptions & {
|
|
144
|
+
bigint: true;
|
|
145
|
+
}): BigIntStats;
|
|
146
|
+
statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
147
|
+
lstatSync(path: PathLike, options?: StatOptions & {
|
|
148
|
+
bigint?: false;
|
|
149
|
+
}): Stats;
|
|
150
|
+
lstatSync(path: PathLike, options: StatOptions & {
|
|
151
|
+
bigint: true;
|
|
152
|
+
}): BigIntStats;
|
|
153
|
+
lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
154
|
+
utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
155
|
+
openSync(path: PathLike, flags: OpenMode, mode?: Mode): number;
|
|
156
|
+
readSync(fd: number, buffer: ArrayBufferView, offset: number, length: number, position: number | null): number;
|
|
157
|
+
readSync(fd: number, buffer: ArrayBufferView, opts?: ReadSyncOptions): number;
|
|
158
|
+
writeSync(fd: number, buffer: ArrayBufferView, offset?: number, length?: number, position?: number): number;
|
|
159
|
+
writeSync(fd: number, string: string, position?: number, encoding?: BufferEncoding_2): number;
|
|
160
|
+
closeSync(fd: number): void;
|
|
161
|
+
readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): string;
|
|
162
|
+
readlinkSync(path: PathLike, options: BufferEncodingOption): Uint8Array;
|
|
163
|
+
readlinkSync(path: PathLike, options?: BaseEncodingOptions | string): string | Uint8Array;
|
|
164
|
+
realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): string;
|
|
165
|
+
realpathSync(path: PathLike, options: BufferEncodingOption): Uint8Array;
|
|
166
|
+
realpathSync(path: PathLike, options?: BaseEncodingOptions | string): string | Uint8Array;
|
|
167
|
+
truncateSync(path: PathLike, len?: number): void;
|
|
168
|
+
ftruncateSync(fd: number, len?: number): void;
|
|
169
|
+
fdatasyncSync(fd: number): void;
|
|
170
|
+
futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
|
|
171
|
+
readdirSync(path: PathLike, options?: {
|
|
172
|
+
encoding: BufferEncoding_2 | null;
|
|
173
|
+
withFileTypes?: false;
|
|
174
|
+
} | BufferEncoding_2): string[];
|
|
175
|
+
readdirSync(path: PathLike, options: {
|
|
176
|
+
encoding: 'buffer';
|
|
177
|
+
withFileTypes?: false;
|
|
178
|
+
} | 'buffer'): Uint8Array[];
|
|
179
|
+
readdirSync(path: PathLike, options?: BaseEncodingOptions & {
|
|
180
|
+
withFileTypes?: false;
|
|
181
|
+
} | BufferEncoding_2): string[] | Uint8Array[];
|
|
182
|
+
readdirSync(path: PathLike, options: BaseEncodingOptions & {
|
|
183
|
+
withFileTypes: true;
|
|
184
|
+
}): IDirent[];
|
|
185
|
+
fsyncSync(fd: number): void;
|
|
186
|
+
mkdirSync(path: PathLike, options: MakeDirectoryOptions & {
|
|
187
|
+
recursive: true;
|
|
188
|
+
}): string | undefined;
|
|
189
|
+
mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
|
|
190
|
+
recursive?: false;
|
|
191
|
+
})): void;
|
|
192
|
+
mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions): string | undefined;
|
|
193
|
+
rmdirSync(path: PathLike, options?: RmDirOptions): void;
|
|
194
|
+
linkSync(existingPath: PathLike, newPath: PathLike): void;
|
|
195
|
+
unlinkSync(path: PathLike): void;
|
|
196
|
+
renameSync(oldPath: PathLike, newPath: PathLike): void;
|
|
197
|
+
symlinkSync(target: PathLike, path: PathLike, type?: 'dir' | 'file' | 'junction'): void;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** @public */
|
|
201
|
+
export declare interface IFsPromises {
|
|
202
|
+
stat(path: PathLike, options?: StatOptions & {
|
|
203
|
+
bigint?: false;
|
|
204
|
+
}): Promise<Stats>;
|
|
205
|
+
stat(path: PathLike, options: StatOptions & {
|
|
206
|
+
bigint: true;
|
|
207
|
+
}): Promise<BigIntStats>;
|
|
208
|
+
stat(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
209
|
+
lstat(path: PathLike, options?: StatOptions & {
|
|
210
|
+
bigint?: false;
|
|
211
|
+
}): Promise<Stats>;
|
|
212
|
+
lstat(path: PathLike, options: StatOptions & {
|
|
213
|
+
bigint: true;
|
|
214
|
+
}): Promise<BigIntStats>;
|
|
215
|
+
lstat(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
216
|
+
utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
217
|
+
open(path: PathLike, flags: OpenMode, mode?: Mode): Promise<FileHandle>;
|
|
218
|
+
read<TBuffer extends Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
219
|
+
bytesRead: number;
|
|
220
|
+
buffer: TBuffer;
|
|
221
|
+
}>;
|
|
222
|
+
write<TBuffer extends Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number, length?: number, position?: number): Promise<{
|
|
223
|
+
bytesWritten: number;
|
|
224
|
+
buffer: TBuffer;
|
|
225
|
+
}>;
|
|
226
|
+
readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): Promise<string>;
|
|
227
|
+
readlink(path: PathLike, options: BufferEncodingOption): Promise<Uint8Array>;
|
|
228
|
+
readlink(path: PathLike, options?: BaseEncodingOptions | string): Promise<string | Uint8Array>;
|
|
229
|
+
realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding_2): Promise<string>;
|
|
230
|
+
realpath(path: PathLike, options: BufferEncodingOption): Promise<Uint8Array>;
|
|
231
|
+
realpath(path: PathLike, options?: BaseEncodingOptions | string): Promise<string | Uint8Array>;
|
|
232
|
+
truncate(path: PathLike, len?: number): Promise<void>;
|
|
233
|
+
ftruncate(handle: FileHandle, len?: number): Promise<void>;
|
|
234
|
+
fdatasync(handle: FileHandle): Promise<void>;
|
|
235
|
+
futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
236
|
+
readdir(path: PathLike, options?: {
|
|
237
|
+
encoding: BufferEncoding_2 | null;
|
|
238
|
+
withFileTypes?: false;
|
|
239
|
+
} | BufferEncoding_2): Promise<string[]>;
|
|
240
|
+
readdir(path: PathLike, options: {
|
|
241
|
+
encoding: 'buffer';
|
|
242
|
+
withFileTypes?: false;
|
|
243
|
+
} | 'buffer'): Promise<Uint8Array[]>;
|
|
244
|
+
readdir(path: PathLike, options?: BaseEncodingOptions & {
|
|
245
|
+
withFileTypes?: false;
|
|
246
|
+
} | BufferEncoding_2): Promise<string[] | Uint8Array[]>;
|
|
247
|
+
readdir(path: PathLike, options: BaseEncodingOptions & {
|
|
248
|
+
withFileTypes: true;
|
|
249
|
+
}): Promise<IDirent[]>;
|
|
250
|
+
fsync(handle: FileHandle): Promise<void>;
|
|
251
|
+
mkdir(path: PathLike, options: MakeDirectoryOptions & {
|
|
252
|
+
recursive: true;
|
|
253
|
+
}): Promise<string | undefined>;
|
|
254
|
+
mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
|
|
255
|
+
recursive?: false;
|
|
256
|
+
})): Promise<void>;
|
|
257
|
+
mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions): Promise<string | undefined>;
|
|
258
|
+
rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
|
|
259
|
+
link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
260
|
+
unlink(path: PathLike): Promise<void>;
|
|
261
|
+
rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
|
|
262
|
+
symlink(target: PathLike, path: PathLike, type?: 'dir' | 'file' | 'junction'): Promise<void>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare const kBindingName: unique symbol;
|
|
266
|
+
|
|
267
|
+
declare const kExitCode: unique symbol;
|
|
268
|
+
|
|
269
|
+
declare const kInstance: unique symbol;
|
|
270
|
+
|
|
271
|
+
declare const kSetMemory: unique symbol;
|
|
272
|
+
|
|
273
|
+
declare const kStarted: unique symbol;
|
|
274
|
+
|
|
275
|
+
/** @public */
|
|
276
|
+
export declare function load(wasmInput: string | URL | BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): Promise<WebAssembly.WebAssemblyInstantiatedSource>;
|
|
277
|
+
|
|
278
|
+
/** @public */
|
|
279
|
+
export declare function loadSync(wasmInput: BufferSource | WebAssembly.Module, imports?: WebAssembly.Imports): WebAssembly.WebAssemblyInstantiatedSource;
|
|
280
|
+
|
|
281
|
+
/** @public */
|
|
282
|
+
export declare interface MakeDirectoryOptions {
|
|
283
|
+
recursive?: boolean;
|
|
284
|
+
mode?: Mode;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** @public */
|
|
288
|
+
export declare class Memory extends WebAssemblyMemory {
|
|
289
|
+
constructor(descriptor: WebAssembly.MemoryDescriptor);
|
|
290
|
+
get HEAP8(): Int8Array;
|
|
291
|
+
get HEAPU8(): Uint8Array;
|
|
292
|
+
get HEAP16(): Int16Array;
|
|
293
|
+
get HEAPU16(): Uint16Array;
|
|
294
|
+
get HEAP32(): Int32Array;
|
|
295
|
+
get HEAPU32(): Uint32Array;
|
|
296
|
+
get HEAP64(): BigInt64Array;
|
|
297
|
+
get HEAPU64(): BigUint64Array;
|
|
298
|
+
get HEAPF32(): Float32Array;
|
|
299
|
+
get HEAPF64(): Float64Array;
|
|
300
|
+
get view(): DataView;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** @public */
|
|
304
|
+
export declare type Mode = number | string;
|
|
305
|
+
|
|
306
|
+
/** @public */
|
|
307
|
+
export declare type OpenMode = number | string;
|
|
308
|
+
|
|
309
|
+
/** @public */
|
|
310
|
+
export declare type PathLike = string | Uint8Array | URL;
|
|
311
|
+
|
|
312
|
+
/** @public */
|
|
313
|
+
export declare type PromisifyExports<T, U> = T extends Record<string, any> ? {
|
|
314
|
+
[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];
|
|
315
|
+
} : T;
|
|
316
|
+
|
|
317
|
+
/** @public */
|
|
318
|
+
export declare interface ReadSyncOptions {
|
|
319
|
+
offset?: number;
|
|
320
|
+
length?: number;
|
|
321
|
+
position?: number;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/** @public */
|
|
325
|
+
export declare interface RmDirOptions {
|
|
326
|
+
maxRetries?: number;
|
|
327
|
+
recursive?: boolean;
|
|
328
|
+
retryDelay?: number;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** @public */
|
|
332
|
+
export declare interface StatOptions {
|
|
333
|
+
bigint?: boolean;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** @public */
|
|
337
|
+
export declare interface Stats extends StatsBase<number> {
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/** @public */
|
|
341
|
+
export declare interface StatsBase<T> {
|
|
342
|
+
isFile(): boolean;
|
|
343
|
+
isDirectory(): boolean;
|
|
344
|
+
isBlockDevice(): boolean;
|
|
345
|
+
isCharacterDevice(): boolean;
|
|
346
|
+
isSymbolicLink(): boolean;
|
|
347
|
+
isFIFO(): boolean;
|
|
348
|
+
isSocket(): boolean;
|
|
349
|
+
dev: T;
|
|
350
|
+
ino: T;
|
|
351
|
+
mode: T;
|
|
352
|
+
nlink: T;
|
|
353
|
+
uid: T;
|
|
354
|
+
gid: T;
|
|
355
|
+
rdev: T;
|
|
356
|
+
size: T;
|
|
357
|
+
blksize: T;
|
|
358
|
+
blocks: T;
|
|
359
|
+
atimeMs: T;
|
|
360
|
+
mtimeMs: T;
|
|
361
|
+
ctimeMs: T;
|
|
362
|
+
birthtimeMs: T;
|
|
363
|
+
atime: Date;
|
|
364
|
+
mtime: Date;
|
|
365
|
+
ctime: Date;
|
|
366
|
+
birthtime: Date;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** @public */
|
|
370
|
+
export declare interface SyncWASIOptions extends WASIOptions {
|
|
371
|
+
fs?: IFs;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/** @public */
|
|
375
|
+
export declare class WASI {
|
|
376
|
+
private [kSetMemory];
|
|
377
|
+
private [kStarted];
|
|
378
|
+
private [kExitCode];
|
|
379
|
+
private [kInstance];
|
|
380
|
+
private [kBindingName];
|
|
381
|
+
readonly wasiImport: Record<string, any>;
|
|
382
|
+
constructor(options?: SyncWASIOptions);
|
|
383
|
+
finalizeBindings(instance: WebAssembly.Instance, { memory }?: FinalizeBindingsOptions): void;
|
|
384
|
+
start(instance: WebAssembly.Instance): number | undefined | Promise<number> | Promise<undefined>;
|
|
385
|
+
initialize(instance: WebAssembly.Instance): void | Promise<void>;
|
|
386
|
+
getImportObject(): Record<string, Record<string, any>>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/** @public */
|
|
390
|
+
export declare interface WASIOptions {
|
|
391
|
+
version?: 'unstable' | 'preview1';
|
|
392
|
+
args?: string[] | undefined;
|
|
393
|
+
env?: Record<string, string> | undefined;
|
|
394
|
+
preopens?: Record<string, string> | undefined;
|
|
395
|
+
/**
|
|
396
|
+
* @defaultValue `false`
|
|
397
|
+
*/
|
|
398
|
+
returnOnExit?: boolean | undefined;
|
|
399
|
+
print?: (str: string) => void;
|
|
400
|
+
printErr?: (str: string) => void;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** @public */
|
|
404
|
+
export declare const WebAssemblyMemory: {
|
|
405
|
+
new (descriptor: WebAssembly.MemoryDescriptor): WebAssembly.Memory;
|
|
406
|
+
prototype: WebAssembly.Memory;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
/** @public */
|
|
410
|
+
export declare function wrapAsyncExport<T extends Function = any>(f: Function): T;
|
|
411
|
+
|
|
412
|
+
/** @public */
|
|
413
|
+
export declare function wrapAsyncImport<T extends (...args: any[]) => any>(f: T, parameterType: WebAssembly.ValueType[], returnType: WebAssembly.ValueType[]): (...args: [object, ...Parameters<T>]) => ReturnType<T>;
|
|
414
|
+
|
|
415
|
+
/** @public */
|
|
416
|
+
export declare function wrapExports<T extends WebAssembly.Exports>(exports: T): PromisifyExports<T, void>;
|
|
417
|
+
|
|
418
|
+
/** @public */
|
|
419
|
+
export declare function wrapExports<T extends WebAssembly.Exports, U extends Array<keyof T>>(exports: T, needWrap: U): PromisifyExports<T, U>;
|
|
420
|
+
|
|
421
|
+
export { }
|
|
422
|
+
|
|
423
|
+
export as namespace wasmUtil;
|