@rivetkit/sqlite-vfs 2.1.4 → 2.1.6-rc.1
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/tsup/index.cjs +739 -101
- package/dist/tsup/index.cjs.map +1 -1
- package/dist/tsup/index.d.cts +136 -6
- package/dist/tsup/index.d.ts +136 -6
- package/dist/tsup/index.js +737 -99
- package/dist/tsup/index.js.map +1 -1
- package/package.json +4 -3
- package/src/generated/empty-db-page.ts +23 -0
- package/src/index.ts +3 -0
- package/src/kv.ts +18 -3
- package/src/pool.ts +495 -0
- package/src/vfs.ts +604 -131
- package/src/wasm.d.ts +60 -0
package/src/wasm.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal WebAssembly type declarations for Node.js environments where
|
|
3
|
+
* lib.dom.d.ts is not included. Only the types needed by the VFS pool
|
|
4
|
+
* module caching are declared here.
|
|
5
|
+
*/
|
|
6
|
+
declare namespace WebAssembly {
|
|
7
|
+
class Module {
|
|
8
|
+
constructor(bytes: BufferSource);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class Instance {
|
|
12
|
+
readonly exports: Exports;
|
|
13
|
+
constructor(module: Module, importObject?: Imports);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type Imports = Record<string, Record<string, ImportValue>>;
|
|
17
|
+
type ImportValue = Function | Global | Memory | Table | number;
|
|
18
|
+
type Exports = Record<string, Function | Global | Memory | Table | number>;
|
|
19
|
+
|
|
20
|
+
class Global {
|
|
21
|
+
constructor(descriptor: GlobalDescriptor, value?: number);
|
|
22
|
+
value: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface GlobalDescriptor {
|
|
26
|
+
value: string;
|
|
27
|
+
mutable?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class Memory {
|
|
31
|
+
constructor(descriptor: MemoryDescriptor);
|
|
32
|
+
readonly buffer: ArrayBuffer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface MemoryDescriptor {
|
|
36
|
+
initial: number;
|
|
37
|
+
maximum?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
class Table {
|
|
41
|
+
constructor(descriptor: TableDescriptor);
|
|
42
|
+
readonly length: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface TableDescriptor {
|
|
46
|
+
element: string;
|
|
47
|
+
initial: number;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function compile(bytes: BufferSource): Promise<Module>;
|
|
52
|
+
function instantiate(
|
|
53
|
+
module: Module,
|
|
54
|
+
importObject?: Imports,
|
|
55
|
+
): Promise<Instance>;
|
|
56
|
+
function instantiate(
|
|
57
|
+
bytes: BufferSource,
|
|
58
|
+
importObject?: Imports,
|
|
59
|
+
): Promise<{ module: Module; instance: Instance }>;
|
|
60
|
+
}
|