@diaryx/wasm-node 0.12.0 → 0.13.0
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 +19 -0
- package/diaryx_wasm.d.ts +8 -8
- package/diaryx_wasm.js +7 -7
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,25 @@ To build the WebAssembly module:
|
|
|
27
27
|
wasm-pack build --target web --out-dir ../../apps/web/src/lib/wasm
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Testing
|
|
31
|
+
|
|
32
|
+
Run browser filesystem integration tests (wasm + browser):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
nix develop -c wasm-pack test --headless --chrome crates/diaryx_wasm
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Current filesystem test suites live in:
|
|
39
|
+
|
|
40
|
+
- `crates/diaryx_wasm/tests/opfs_fs.rs`
|
|
41
|
+
- `crates/diaryx_wasm/tests/fs_trait_parity.rs`
|
|
42
|
+
|
|
43
|
+
`fs_trait_parity.rs` runs the same contract checks across:
|
|
44
|
+
|
|
45
|
+
- `OpfsFileSystem`
|
|
46
|
+
- `IndexedDbFileSystem`
|
|
47
|
+
- `FsaFileSystem`
|
|
48
|
+
|
|
30
49
|
## Architecture
|
|
31
50
|
|
|
32
51
|
The crate provides typed class-based APIs that wrap `diaryx_core` functionality:
|
package/diaryx_wasm.d.ts
CHANGED
|
@@ -447,9 +447,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
447
447
|
|
|
448
448
|
export interface InitOutput {
|
|
449
449
|
readonly memory: WebAssembly.Memory;
|
|
450
|
-
readonly init: () => void;
|
|
451
450
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
452
|
-
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
453
451
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
454
452
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
455
453
|
readonly diaryxbackend_createInMemory: () => [number, number, number];
|
|
@@ -465,7 +463,8 @@ export interface InitOutput {
|
|
|
465
463
|
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
466
464
|
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
467
465
|
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
468
|
-
readonly
|
|
466
|
+
readonly now_timestamp: () => [number, number];
|
|
467
|
+
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
469
468
|
readonly wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
|
|
470
469
|
readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
|
|
471
470
|
readonly wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
|
|
@@ -483,12 +482,13 @@ export interface InitOutput {
|
|
|
483
482
|
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
484
483
|
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
485
484
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
485
|
+
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
486
|
+
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
486
487
|
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
487
|
-
readonly
|
|
488
|
-
readonly
|
|
489
|
-
readonly
|
|
490
|
-
readonly
|
|
491
|
-
readonly wasm_bindgen__convert__closures_____invoke__he720d3228b6c7e0b: (a: number, b: number, c: any) => void;
|
|
488
|
+
readonly init: () => void;
|
|
489
|
+
readonly wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
490
|
+
readonly wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
491
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
|
492
492
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
493
493
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
494
494
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/diaryx_wasm.js
CHANGED
|
@@ -862,7 +862,7 @@ function __wbg_get_imports() {
|
|
|
862
862
|
const a = state0.a;
|
|
863
863
|
state0.a = 0;
|
|
864
864
|
try {
|
|
865
|
-
return
|
|
865
|
+
return wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260(a, state0.b, arg0, arg1);
|
|
866
866
|
} finally {
|
|
867
867
|
state0.a = a;
|
|
868
868
|
}
|
|
@@ -984,8 +984,8 @@ function __wbg_get_imports() {
|
|
|
984
984
|
console.warn(arg0, arg1, arg2, arg3);
|
|
985
985
|
},
|
|
986
986
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
987
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
988
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
987
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 610, function: Function { arguments: [Externref], shim_idx: 611, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
988
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h358403ff5b31de35, wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a);
|
|
989
989
|
return ret;
|
|
990
990
|
},
|
|
991
991
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -1029,12 +1029,12 @@ function __wbg_get_imports() {
|
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
|
-
function
|
|
1033
|
-
wasm.
|
|
1032
|
+
function wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a(arg0, arg1, arg2) {
|
|
1033
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a(arg0, arg1, arg2);
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
-
function
|
|
1037
|
-
wasm.
|
|
1036
|
+
function wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260(arg0, arg1, arg2, arg3) {
|
|
1037
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260(arg0, arg1, arg2, arg3);
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
1040
|
const DiaryxBackendFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const init: () => void;
|
|
5
4
|
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
6
|
-
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
7
5
|
export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
8
6
|
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
9
7
|
export const diaryxbackend_createInMemory: () => [number, number, number];
|
|
@@ -19,7 +17,8 @@ export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
|
19
17
|
export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
20
18
|
export const diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
21
19
|
export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
22
|
-
export const
|
|
20
|
+
export const now_timestamp: () => [number, number];
|
|
21
|
+
export const today_formatted: (a: number, b: number) => [number, number];
|
|
23
22
|
export const wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
|
|
24
23
|
export const wasmsyncclient_getServerUrl: (a: number) => [number, number];
|
|
25
24
|
export const wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
|
|
@@ -37,12 +36,13 @@ export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
|
37
36
|
export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
38
37
|
export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
39
38
|
export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
40
|
+
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
40
41
|
export const jsasyncfilesystem_new: (a: any) => number;
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const
|
|
45
|
-
export const wasm_bindgen__convert__closures_____invoke__he720d3228b6c7e0b: (a: number, b: number, c: any) => void;
|
|
42
|
+
export const init: () => void;
|
|
43
|
+
export const wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
44
|
+
export const wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
45
|
+
export const wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
|
46
46
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
47
47
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
48
48
|
export const __wbindgen_exn_store: (a: number) => void;
|
package/package.json
CHANGED