@diaryx/wasm-node 1.0.0 → 1.0.1-dev.241bbf9
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/diaryx_wasm.d.ts +11 -3
- package/diaryx_wasm.js +15 -1
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +4 -3
- package/package.json +1 -1
package/diaryx_wasm.d.ts
CHANGED
|
@@ -434,6 +434,13 @@ export class WasmSyncClient {
|
|
|
434
434
|
* Call this before connecting to join a share session.
|
|
435
435
|
*/
|
|
436
436
|
setSessionCode(code: string): void;
|
|
437
|
+
/**
|
|
438
|
+
* Request body sync for specific files (lazy sync on demand).
|
|
439
|
+
*
|
|
440
|
+
* Sends SyncBodyFiles event through the session to initiate body
|
|
441
|
+
* SyncStep1 for just the requested files, rather than all files.
|
|
442
|
+
*/
|
|
443
|
+
syncBodyFiles(file_paths: string[]): Promise<any>;
|
|
437
444
|
/**
|
|
438
445
|
* Send an unfocus message for specific files.
|
|
439
446
|
*/
|
|
@@ -459,9 +466,12 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
459
466
|
|
|
460
467
|
export interface InitOutput {
|
|
461
468
|
readonly memory: WebAssembly.Memory;
|
|
469
|
+
readonly init: () => void;
|
|
462
470
|
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
463
471
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
464
472
|
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
473
|
+
readonly now_timestamp: () => [number, number];
|
|
474
|
+
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
465
475
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
466
476
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
467
477
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -496,10 +506,8 @@ export interface InitOutput {
|
|
|
496
506
|
readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
497
507
|
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
498
508
|
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
509
|
+
readonly wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
|
|
499
510
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
500
|
-
readonly now_timestamp: () => [number, number];
|
|
501
|
-
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
502
|
-
readonly init: () => void;
|
|
503
511
|
readonly wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
504
512
|
readonly wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
505
513
|
readonly wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
package/diaryx_wasm.js
CHANGED
|
@@ -600,6 +600,20 @@ export class WasmSyncClient {
|
|
|
600
600
|
const len0 = WASM_VECTOR_LEN;
|
|
601
601
|
wasm.wasmsyncclient_setSessionCode(this.__wbg_ptr, ptr0, len0);
|
|
602
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Request body sync for specific files (lazy sync on demand).
|
|
605
|
+
*
|
|
606
|
+
* Sends SyncBodyFiles event through the session to initiate body
|
|
607
|
+
* SyncStep1 for just the requested files, rather than all files.
|
|
608
|
+
* @param {string[]} file_paths
|
|
609
|
+
* @returns {Promise<any>}
|
|
610
|
+
*/
|
|
611
|
+
syncBodyFiles(file_paths) {
|
|
612
|
+
const ptr0 = passArrayJsValueToWasm0(file_paths, wasm.__wbindgen_malloc);
|
|
613
|
+
const len0 = WASM_VECTOR_LEN;
|
|
614
|
+
const ret = wasm.wasmsyncclient_syncBodyFiles(this.__wbg_ptr, ptr0, len0);
|
|
615
|
+
return ret;
|
|
616
|
+
}
|
|
603
617
|
/**
|
|
604
618
|
* Send an unfocus message for specific files.
|
|
605
619
|
* @param {string[]} files
|
|
@@ -1003,7 +1017,7 @@ function __wbg_get_imports() {
|
|
|
1003
1017
|
console.warn(arg0, arg1, arg2, arg3);
|
|
1004
1018
|
},
|
|
1005
1019
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1006
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1020
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 615, function: Function { arguments: [Externref], shim_idx: 616, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1007
1021
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h358403ff5b31de35, wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a);
|
|
1008
1022
|
return ret;
|
|
1009
1023
|
},
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const init: () => void;
|
|
4
5
|
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
5
6
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
6
7
|
export const jsasyncfilesystem_new: (a: any) => number;
|
|
8
|
+
export const now_timestamp: () => [number, number];
|
|
9
|
+
export const today_formatted: (a: number, b: number) => [number, number];
|
|
7
10
|
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
8
11
|
export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
9
12
|
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -38,10 +41,8 @@ export const wasmsyncclient_pollOutgoingBinary: (a: number) => any;
|
|
|
38
41
|
export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
39
42
|
export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
40
43
|
export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
44
|
+
export const wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
|
|
41
45
|
export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
42
|
-
export const now_timestamp: () => [number, number];
|
|
43
|
-
export const today_formatted: (a: number, b: number) => [number, number];
|
|
44
|
-
export const init: () => void;
|
|
45
46
|
export const wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
46
47
|
export const wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
47
48
|
export const wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
package/package.json
CHANGED