@diaryx/wasm-node 1.0.1-dev.b9c03a2 → 1.1.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/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,12 +466,12 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
459
466
|
|
|
460
467
|
export interface InitOutput {
|
|
461
468
|
readonly memory: WebAssembly.Memory;
|
|
462
|
-
readonly
|
|
463
|
-
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
469
|
+
readonly init: () => void;
|
|
464
470
|
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
465
471
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
466
472
|
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
467
|
-
readonly
|
|
473
|
+
readonly now_timestamp: () => [number, number];
|
|
474
|
+
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
468
475
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
469
476
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
470
477
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -499,6 +506,7 @@ export interface InitOutput {
|
|
|
499
506
|
readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
500
507
|
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
501
508
|
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
509
|
+
readonly wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
|
|
502
510
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => 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;
|
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,12 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const today_formatted: (a: number, b: number) => [number, number];
|
|
4
|
+
export const init: () => void;
|
|
6
5
|
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
7
6
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
8
7
|
export const jsasyncfilesystem_new: (a: any) => number;
|
|
9
|
-
export const
|
|
8
|
+
export const now_timestamp: () => [number, number];
|
|
9
|
+
export const today_formatted: (a: number, b: number) => [number, number];
|
|
10
10
|
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
11
11
|
export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
12
12
|
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -41,6 +41,7 @@ export const wasmsyncclient_pollOutgoingBinary: (a: number) => any;
|
|
|
41
41
|
export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
42
42
|
export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
43
43
|
export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
44
|
+
export const wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
|
|
44
45
|
export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => 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;
|
package/package.json
CHANGED