hyperdb-wasm 0.0.26862-dev.wasm.g8c0876f6 → 0.0.26979-dev.wasm.g78ca8a1b
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/api.d.ts +17 -40
- package/dist/browser.d.ts +6 -3
- package/dist/browser.js +4340 -3080
- package/dist/browser_external_directory.d.ts +13 -0
- package/dist/browser_worker.js +317 -176
- package/dist/client.d.ts +8 -13
- package/dist/hyperdb-wasm.cjs +1 -1
- package/dist/hyperdb-wasm.js +1 -1
- package/dist/hyperdb-wasm.wasm.br +0 -0
- package/dist/index.d.ts +10 -9
- package/dist/index.node.d.ts +5 -4
- package/dist/node.d.ts +4 -2
- package/dist/node.js +4373 -3128
- package/dist/node_external_directory.d.ts +11 -0
- package/dist/node_worker.js +335 -179
- package/dist/protocol.d.ts +71 -50
- package/dist/raw.browser.js +246 -140
- package/dist/raw.d.ts +2 -1
- package/dist/raw.node.js +239 -135
- package/dist/wasm_bindings.d.ts +22 -8
- package/dist/worker_setup.d.ts +8 -2
- package/examples/node-attached-databases.mjs +10 -9
- package/package.json +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { ExternalDirectoryBackend } from './wasm_bindings.js';
|
|
2
|
+
export type BrowserDirectoryEntry = {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly kind: 'file' | 'directory';
|
|
5
|
+
};
|
|
2
6
|
export declare class BrowserExternalDirectoryBackend implements ExternalDirectoryBackend {
|
|
3
7
|
private readonly directories;
|
|
4
8
|
private readonly paths;
|
|
@@ -11,6 +15,14 @@ export declare class BrowserExternalDirectoryBackend implements ExternalDirector
|
|
|
11
15
|
registered(path: string, locator: string): void;
|
|
12
16
|
removed(pathOrLocator: string): void;
|
|
13
17
|
list(locator: string): Promise<readonly string[]>;
|
|
18
|
+
listEntries(locator: string, path: string): Promise<readonly BrowserDirectoryEntry[]>;
|
|
19
|
+
lookup(locator: string, path: string): Promise<{
|
|
20
|
+
readonly kind: 'directory';
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'file';
|
|
23
|
+
readonly locator: string;
|
|
24
|
+
readonly size: number;
|
|
25
|
+
} | undefined>;
|
|
14
26
|
open(locator: string, path: string): Promise<{
|
|
15
27
|
readonly locator: string;
|
|
16
28
|
readonly size: number;
|
|
@@ -24,6 +36,7 @@ export declare class BrowserExternalDirectoryBackend implements ExternalDirector
|
|
|
24
36
|
shutdown(): void;
|
|
25
37
|
private getDirectory;
|
|
26
38
|
private getWritableDirectory;
|
|
39
|
+
private openDirectory;
|
|
27
40
|
private getOpenWriter;
|
|
28
41
|
private cleanupWriter;
|
|
29
42
|
private enqueue;
|