@diaryx/wasm-node 0.11.0 → 0.11.1-dev.193efc4
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 +90 -342
- package/diaryx_wasm.js +122 -450
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +21 -43
- package/package.json +1 -1
- package/diaryx_wasm_bg.js +0 -1600
package/diaryx_wasm.d.ts
CHANGED
|
@@ -140,42 +140,43 @@ export class DiaryxBackend {
|
|
|
140
140
|
/**
|
|
141
141
|
* Create a new sync client for the given server and workspace.
|
|
142
142
|
*
|
|
143
|
-
*
|
|
144
|
-
* JavaScript manages WebSocket
|
|
143
|
+
* Creates a `WasmSyncClient` backed by the shared `SyncSession` protocol
|
|
144
|
+
* handler. JavaScript manages the WebSocket while Rust handles all sync
|
|
145
|
+
* protocol logic (handshake, message routing, framing).
|
|
145
146
|
*
|
|
146
147
|
* ## Example
|
|
147
148
|
*
|
|
148
149
|
* ```javascript
|
|
149
150
|
* const client = backend.createSyncClient(
|
|
150
|
-
* '
|
|
151
|
+
* 'https://sync.example.com',
|
|
151
152
|
* 'my-workspace-id',
|
|
152
153
|
* 'auth-token-optional'
|
|
153
154
|
* );
|
|
154
155
|
*
|
|
155
|
-
* // Get
|
|
156
|
-
* const
|
|
157
|
-
* const
|
|
158
|
-
*
|
|
159
|
-
* // Create WebSockets and connect them to the client
|
|
160
|
-
* const metaWs = new WebSocket(metaUrl);
|
|
161
|
-
* metaWs.binaryType = 'arraybuffer';
|
|
162
|
-
* metaWs.onopen = () => client.markMetadataConnected();
|
|
163
|
-
* metaWs.onclose = () => client.markMetadataDisconnected();
|
|
164
|
-
* metaWs.onmessage = async (e) => {
|
|
165
|
-
* const response = await client.injectMetadataMessage(new Uint8Array(e.data));
|
|
166
|
-
* if (response) metaWs.send(response);
|
|
167
|
-
* };
|
|
168
|
-
* // Similar for body WebSocket...
|
|
156
|
+
* // Get the WebSocket URL
|
|
157
|
+
* const wsUrl = client.getWsUrl();
|
|
158
|
+
* const ws = new WebSocket(wsUrl);
|
|
159
|
+
* ws.binaryType = 'arraybuffer';
|
|
169
160
|
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
161
|
+
* ws.onopen = async () => {
|
|
162
|
+
* await client.onConnected();
|
|
163
|
+
* // Drain outgoing messages
|
|
172
164
|
* let msg;
|
|
173
|
-
* while ((msg = client.
|
|
174
|
-
* while ((msg = client.
|
|
175
|
-
* }
|
|
165
|
+
* while ((msg = client.pollOutgoingBinary())) ws.send(msg);
|
|
166
|
+
* while ((msg = client.pollOutgoingText())) ws.send(msg);
|
|
167
|
+
* };
|
|
176
168
|
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
169
|
+
* ws.onmessage = async (e) => {
|
|
170
|
+
* if (typeof e.data === 'string') {
|
|
171
|
+
* await client.onTextMessage(e.data);
|
|
172
|
+
* } else {
|
|
173
|
+
* await client.onBinaryMessage(new Uint8Array(e.data));
|
|
174
|
+
* }
|
|
175
|
+
* // Drain outgoing messages and events
|
|
176
|
+
* let msg;
|
|
177
|
+
* while ((msg = client.pollOutgoingBinary())) ws.send(msg);
|
|
178
|
+
* while ((msg = client.pollOutgoingText())) ws.send(msg);
|
|
179
|
+
* };
|
|
179
180
|
* ```
|
|
180
181
|
*/
|
|
181
182
|
createSyncClient(server_url: string, workspace_id: string, auth_token?: string | null): WasmSyncClient;
|
|
@@ -221,37 +222,11 @@ export class DiaryxBackend {
|
|
|
221
222
|
* This avoids JSON serialization overhead for better performance.
|
|
222
223
|
*/
|
|
223
224
|
executeJs(command: any): Promise<any>;
|
|
224
|
-
/**
|
|
225
|
-
* Get initial body sync step1 message for a document.
|
|
226
|
-
*
|
|
227
|
-
* Returns a Uint8Array containing the Y-sync step1 message for
|
|
228
|
-
* the specified document's body content.
|
|
229
|
-
*
|
|
230
|
-
* ## Example
|
|
231
|
-
* ```javascript
|
|
232
|
-
* const step1 = backend.getBodySyncStep1("notes/my-note.md");
|
|
233
|
-
* // Frame it for multiplexed connection and send
|
|
234
|
-
* ```
|
|
235
|
-
*/
|
|
236
|
-
getBodySyncStep1(doc_name: string): Uint8Array;
|
|
237
225
|
/**
|
|
238
226
|
* Get the current configuration from root index frontmatter.
|
|
239
227
|
* Config keys are stored as `diaryx_*` properties.
|
|
240
228
|
*/
|
|
241
229
|
getConfig(): Promise<any>;
|
|
242
|
-
/**
|
|
243
|
-
* Get initial workspace sync step1 message.
|
|
244
|
-
*
|
|
245
|
-
* Returns a Uint8Array containing the Y-sync step1 message to send
|
|
246
|
-
* over the WebSocket to initiate workspace metadata sync.
|
|
247
|
-
*
|
|
248
|
-
* ## Example
|
|
249
|
-
* ```javascript
|
|
250
|
-
* const step1 = backend.getWorkspaceSyncStep1();
|
|
251
|
-
* ws.send(step1);
|
|
252
|
-
* ```
|
|
253
|
-
*/
|
|
254
|
-
getWorkspaceSyncStep1(): Uint8Array;
|
|
255
230
|
/**
|
|
256
231
|
* Check if this backend has native sync support.
|
|
257
232
|
*
|
|
@@ -259,42 +234,6 @@ export class DiaryxBackend {
|
|
|
259
234
|
* provides a unified approach that works across all platforms.
|
|
260
235
|
*/
|
|
261
236
|
hasNativeSync(): boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Check if there are pending outgoing sync messages.
|
|
264
|
-
*/
|
|
265
|
-
hasOutgoingSyncMessages(): boolean;
|
|
266
|
-
/**
|
|
267
|
-
* Inject an incoming body sync message.
|
|
268
|
-
*
|
|
269
|
-
* Call this when the WebSocket receives a message for a body document.
|
|
270
|
-
* The message should already be unframed (doc_name extracted separately).
|
|
271
|
-
* Returns a response message to send back, or null if no response is needed.
|
|
272
|
-
*
|
|
273
|
-
* ## Example
|
|
274
|
-
* ```javascript
|
|
275
|
-
* // After unframing the multiplexed message:
|
|
276
|
-
* const response = await backend.injectBodySyncMessage(docName, data, true);
|
|
277
|
-
* if (response) ws.send(frameBodyMessage(docName, response));
|
|
278
|
-
* ```
|
|
279
|
-
*/
|
|
280
|
-
injectBodySyncMessage(doc_name: string, message: Uint8Array, write_to_disk: boolean): Promise<any>;
|
|
281
|
-
/**
|
|
282
|
-
* Inject an incoming workspace sync message.
|
|
283
|
-
*
|
|
284
|
-
* Call this when the WebSocket receives a message for the workspace
|
|
285
|
-
* (metadata) connection. Returns a response message to send back,
|
|
286
|
-
* or null if no response is needed.
|
|
287
|
-
*
|
|
288
|
-
* ## Example
|
|
289
|
-
* ```javascript
|
|
290
|
-
* ws.onmessage = (event) => {
|
|
291
|
-
* const data = new Uint8Array(event.data);
|
|
292
|
-
* const response = backend.injectWorkspaceSyncMessage(data, true);
|
|
293
|
-
* if (response) ws.send(response);
|
|
294
|
-
* };
|
|
295
|
-
* ```
|
|
296
|
-
*/
|
|
297
|
-
injectWorkspaceSyncMessage(message: Uint8Array, write_to_disk: boolean): Promise<any>;
|
|
298
237
|
/**
|
|
299
238
|
* Unsubscribe from filesystem events.
|
|
300
239
|
*
|
|
@@ -331,35 +270,6 @@ export class DiaryxBackend {
|
|
|
331
270
|
* ```
|
|
332
271
|
*/
|
|
333
272
|
onFileSystemEvent(callback: Function): bigint;
|
|
334
|
-
/**
|
|
335
|
-
* Get count of pending outgoing sync messages.
|
|
336
|
-
*/
|
|
337
|
-
outgoingSyncMessageCount(): number;
|
|
338
|
-
/**
|
|
339
|
-
* Poll for an outgoing sync message.
|
|
340
|
-
*
|
|
341
|
-
* Returns the next outgoing message as a JavaScript object with:
|
|
342
|
-
* - `docName`: Document name ("workspace" or file path)
|
|
343
|
-
* - `message`: Uint8Array message data
|
|
344
|
-
* - `isBody`: Boolean indicating body (true) or workspace (false)
|
|
345
|
-
*
|
|
346
|
-
* Returns null if no messages are queued.
|
|
347
|
-
*
|
|
348
|
-
* ## Example
|
|
349
|
-
* ```javascript
|
|
350
|
-
* setInterval(() => {
|
|
351
|
-
* let msg;
|
|
352
|
-
* while ((msg = backend.pollOutgoingSyncMessage()) !== null) {
|
|
353
|
-
* if (msg.isBody) {
|
|
354
|
-
* bodyWs.send(frameBodyMessage(msg.docName, msg.message));
|
|
355
|
-
* } else {
|
|
356
|
-
* workspaceWs.send(msg.message);
|
|
357
|
-
* }
|
|
358
|
-
* }
|
|
359
|
-
* }, 50);
|
|
360
|
-
* ```
|
|
361
|
-
*/
|
|
362
|
-
pollOutgoingSyncMessage(): any;
|
|
363
273
|
/**
|
|
364
274
|
* Read binary file.
|
|
365
275
|
*
|
|
@@ -371,26 +281,6 @@ export class DiaryxBackend {
|
|
|
371
281
|
* Config keys are stored as `diaryx_*` properties.
|
|
372
282
|
*/
|
|
373
283
|
saveConfig(config_js: any): Promise<any>;
|
|
374
|
-
/**
|
|
375
|
-
* Start sync session and set up event bridge.
|
|
376
|
-
*
|
|
377
|
-
* This wires up the sync manager's event callback to queue outgoing
|
|
378
|
-
* messages. Call this before connecting WebSocket.
|
|
379
|
-
*
|
|
380
|
-
* ## Example
|
|
381
|
-
* ```javascript
|
|
382
|
-
* backend.startSync();
|
|
383
|
-
* const ws = new WebSocket(url);
|
|
384
|
-
* // ... rest of setup
|
|
385
|
-
* ```
|
|
386
|
-
*/
|
|
387
|
-
startSync(): void;
|
|
388
|
-
/**
|
|
389
|
-
* Stop sync session.
|
|
390
|
-
*
|
|
391
|
-
* Clears the outgoing message queue. Call after disconnecting WebSocket.
|
|
392
|
-
*/
|
|
393
|
-
stopSync(): void;
|
|
394
284
|
/**
|
|
395
285
|
* Write binary file.
|
|
396
286
|
*
|
|
@@ -434,57 +324,22 @@ export class JsAsyncFileSystem {
|
|
|
434
324
|
}
|
|
435
325
|
|
|
436
326
|
/**
|
|
437
|
-
* WASM sync client
|
|
327
|
+
* WASM sync client backed by the shared SyncSession protocol handler.
|
|
438
328
|
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
* - Getting WebSocket URLs for connection
|
|
444
|
-
* - Notifying connection status changes
|
|
445
|
-
* - Injecting incoming messages
|
|
446
|
-
* - Polling for outgoing messages
|
|
447
|
-
* - Starting and stopping sync
|
|
329
|
+
* JavaScript feeds WebSocket events in via `onConnected()`, `onBinaryMessage()`,
|
|
330
|
+
* etc. The client processes them through `SyncSession` and queues outgoing
|
|
331
|
+
* messages/events for JavaScript to poll.
|
|
448
332
|
*/
|
|
449
333
|
export class WasmSyncClient {
|
|
450
334
|
private constructor();
|
|
451
335
|
free(): void;
|
|
452
336
|
[Symbol.dispose](): void;
|
|
453
337
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* Sends a focus message to the server indicating which files the client
|
|
457
|
-
* is currently interested in syncing. Other clients will receive a
|
|
458
|
-
* `focus_list_changed` notification and can subscribe to sync updates
|
|
459
|
-
* for these files.
|
|
460
|
-
*
|
|
461
|
-
* Call this when a file is opened in the editor.
|
|
338
|
+
* Send a focus message for specific files.
|
|
462
339
|
*
|
|
463
|
-
*
|
|
464
|
-
* ```javascript
|
|
465
|
-
* // User opens a file
|
|
466
|
-
* client.focusFiles(["workspace/notes.md"]);
|
|
467
|
-
* ```
|
|
340
|
+
* Other clients will be notified which files this client is interested in.
|
|
468
341
|
*/
|
|
469
342
|
focusFiles(files: string[]): void;
|
|
470
|
-
/**
|
|
471
|
-
* Get the initial SyncStep1 message for a body document.
|
|
472
|
-
*
|
|
473
|
-
* Returns a Uint8Array containing the framed message to send via WebSocket.
|
|
474
|
-
*/
|
|
475
|
-
getBodySyncStep1(doc_name: string): Uint8Array;
|
|
476
|
-
/**
|
|
477
|
-
* Get the WebSocket URL for the body connection.
|
|
478
|
-
*
|
|
479
|
-
* Returns null if sync hasn't been configured.
|
|
480
|
-
*/
|
|
481
|
-
getBodyUrl(): string | undefined;
|
|
482
|
-
/**
|
|
483
|
-
* Get the WebSocket URL for the metadata connection.
|
|
484
|
-
*
|
|
485
|
-
* Returns null if sync hasn't been configured.
|
|
486
|
-
*/
|
|
487
|
-
getMetadataUrl(): string | undefined;
|
|
488
343
|
/**
|
|
489
344
|
* Get the server URL.
|
|
490
345
|
*/
|
|
@@ -494,166 +349,81 @@ export class WasmSyncClient {
|
|
|
494
349
|
*/
|
|
495
350
|
getWorkspaceId(): string;
|
|
496
351
|
/**
|
|
497
|
-
* Get the
|
|
352
|
+
* Get the WebSocket URL for the v2 sync connection.
|
|
498
353
|
*
|
|
499
|
-
* Returns a
|
|
354
|
+
* Returns a URL like `wss://sync.example.com/sync2?token=...&session=...`
|
|
500
355
|
*/
|
|
501
|
-
|
|
356
|
+
getWsUrl(): string;
|
|
502
357
|
/**
|
|
503
|
-
* Check if there are pending
|
|
358
|
+
* Check if there are pending events.
|
|
504
359
|
*/
|
|
505
|
-
|
|
360
|
+
hasEvents(): boolean;
|
|
506
361
|
/**
|
|
507
|
-
* Check if there are pending
|
|
362
|
+
* Check if there are pending outgoing messages or events.
|
|
508
363
|
*/
|
|
509
|
-
|
|
364
|
+
hasOutgoing(): boolean;
|
|
510
365
|
/**
|
|
511
|
-
*
|
|
512
|
-
*/
|
|
513
|
-
hasMetadataOutgoing(): boolean;
|
|
514
|
-
/**
|
|
515
|
-
* Inject an incoming body message.
|
|
366
|
+
* Inject an incoming binary WebSocket message.
|
|
516
367
|
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* Returns a Promise that resolves to a Uint8Array response (or null).
|
|
368
|
+
* Returns a Promise that resolves when processing is complete.
|
|
369
|
+
* After this, poll outgoing queues.
|
|
520
370
|
*/
|
|
521
|
-
|
|
371
|
+
onBinaryMessage(data: Uint8Array): Promise<any>;
|
|
522
372
|
/**
|
|
523
|
-
*
|
|
373
|
+
* Notify that the WebSocket connected.
|
|
524
374
|
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
* The response should be sent back via the WebSocket if not null.
|
|
375
|
+
* Triggers workspace SyncStep1 and handshake. After calling this,
|
|
376
|
+
* poll `pollOutgoingBinary()` / `pollOutgoingText()` to get messages to send.
|
|
529
377
|
*/
|
|
530
|
-
|
|
378
|
+
onConnected(): Promise<any>;
|
|
531
379
|
/**
|
|
532
|
-
*
|
|
380
|
+
* Notify that the WebSocket disconnected.
|
|
533
381
|
*/
|
|
534
|
-
|
|
382
|
+
onDisconnected(): Promise<any>;
|
|
535
383
|
/**
|
|
536
|
-
*
|
|
537
|
-
*/
|
|
538
|
-
isConnected(): boolean;
|
|
539
|
-
/**
|
|
540
|
-
* Check if the metadata connection is established.
|
|
541
|
-
*/
|
|
542
|
-
isMetadataConnected(): boolean;
|
|
543
|
-
/**
|
|
544
|
-
* Check if the sync client is running.
|
|
545
|
-
*/
|
|
546
|
-
isRunning(): boolean;
|
|
547
|
-
/**
|
|
548
|
-
* Mark the body connection as connected.
|
|
549
|
-
*
|
|
550
|
-
* Call this when the body WebSocket opens.
|
|
551
|
-
*/
|
|
552
|
-
markBodyConnected(): void;
|
|
553
|
-
/**
|
|
554
|
-
* Mark the body connection as disconnected.
|
|
384
|
+
* Notify that a snapshot was downloaded and imported.
|
|
555
385
|
*
|
|
556
|
-
* Call this
|
|
386
|
+
* Call this after handling a `downloadSnapshot` event.
|
|
557
387
|
*/
|
|
558
|
-
|
|
388
|
+
onSnapshotImported(): Promise<any>;
|
|
559
389
|
/**
|
|
560
|
-
*
|
|
390
|
+
* Inject an incoming text WebSocket message (JSON control message).
|
|
561
391
|
*
|
|
562
|
-
*
|
|
392
|
+
* Returns a Promise that resolves when processing is complete.
|
|
563
393
|
*/
|
|
564
|
-
|
|
394
|
+
onTextMessage(text: string): Promise<any>;
|
|
565
395
|
/**
|
|
566
|
-
*
|
|
396
|
+
* Poll for a JSON-serialized event.
|
|
567
397
|
*
|
|
568
|
-
*
|
|
398
|
+
* Returns a JSON string representing a SyncEvent, or null.
|
|
569
399
|
*/
|
|
570
|
-
|
|
400
|
+
pollEvent(): string | undefined;
|
|
571
401
|
/**
|
|
572
|
-
* Poll for an outgoing
|
|
402
|
+
* Poll for an outgoing binary message.
|
|
573
403
|
*
|
|
574
404
|
* Returns a Uint8Array if there's a message to send, null otherwise.
|
|
575
|
-
* The message is already framed with the document name.
|
|
576
405
|
*/
|
|
577
|
-
|
|
406
|
+
pollOutgoingBinary(): Uint8Array | undefined;
|
|
578
407
|
/**
|
|
579
|
-
* Poll for an outgoing
|
|
408
|
+
* Poll for an outgoing text message.
|
|
580
409
|
*
|
|
581
|
-
* Returns a string if there's a
|
|
582
|
-
* JavaScript should call this in a polling loop and send any messages
|
|
583
|
-
* via the body WebSocket as text frames.
|
|
410
|
+
* Returns a string if there's a message to send, null otherwise.
|
|
584
411
|
*/
|
|
585
|
-
|
|
412
|
+
pollOutgoingText(): string | undefined;
|
|
586
413
|
/**
|
|
587
|
-
*
|
|
414
|
+
* Queue a local CRDT update for sending to the server.
|
|
588
415
|
*
|
|
589
|
-
*
|
|
590
|
-
* JavaScript should call this in a polling loop and send any messages
|
|
591
|
-
* via the metadata WebSocket.
|
|
416
|
+
* Call this when local CRDT changes need to be synced.
|
|
592
417
|
*/
|
|
593
|
-
|
|
418
|
+
queueLocalUpdate(doc_id: string, data: Uint8Array): Promise<any>;
|
|
594
419
|
/**
|
|
595
|
-
*
|
|
420
|
+
* Set a share session code.
|
|
596
421
|
*
|
|
597
|
-
*
|
|
598
|
-
* and queues it for sending via the body WebSocket.
|
|
422
|
+
* Call this before connecting to join a share session.
|
|
599
423
|
*/
|
|
600
|
-
|
|
424
|
+
setSessionCode(code: string): void;
|
|
601
425
|
/**
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
* This creates a Y-sync Update message from the current workspace state
|
|
605
|
-
* and queues it for sending via the metadata WebSocket.
|
|
606
|
-
*/
|
|
607
|
-
queueWorkspaceUpdate(): void;
|
|
608
|
-
/**
|
|
609
|
-
* Start the sync session.
|
|
610
|
-
*
|
|
611
|
-
* This should be called after both WebSocket connections are established.
|
|
612
|
-
* It sends the initial SyncStep1 messages and subscribes to all body docs.
|
|
613
|
-
*
|
|
614
|
-
* Returns a Promise that resolves when initial sync messages are sent.
|
|
615
|
-
*/
|
|
616
|
-
start(): Promise<any>;
|
|
617
|
-
/**
|
|
618
|
-
* Stop the sync session.
|
|
619
|
-
*
|
|
620
|
-
* Clears all pending messages and resets state.
|
|
621
|
-
*/
|
|
622
|
-
stop(): void;
|
|
623
|
-
/**
|
|
624
|
-
* Subscribe to body sync for the currently focused files.
|
|
625
|
-
*
|
|
626
|
-
* This sends SyncStep1 messages for all files in the provided list.
|
|
627
|
-
* Call this after receiving a `focus_list_changed` message from the server.
|
|
628
|
-
*
|
|
629
|
-
* ## Example
|
|
630
|
-
* ```javascript
|
|
631
|
-
* // Received focus_list_changed event
|
|
632
|
-
* const files = event.files;
|
|
633
|
-
* client.subscribeBodies(files);
|
|
634
|
-
* ```
|
|
635
|
-
*/
|
|
636
|
-
subscribeBodies(files: string[]): void;
|
|
637
|
-
/**
|
|
638
|
-
* Subscribe to body sync for a specific document.
|
|
639
|
-
*
|
|
640
|
-
* This queues a SyncStep1 message for the given document.
|
|
641
|
-
* Call this when a new file is created or when opening a file for editing.
|
|
642
|
-
*/
|
|
643
|
-
subscribeBody(doc_name: string): void;
|
|
644
|
-
/**
|
|
645
|
-
* Unfocus specific files.
|
|
646
|
-
*
|
|
647
|
-
* Sends an unfocus message to the server indicating the client is no
|
|
648
|
-
* longer interested in syncing these files.
|
|
649
|
-
*
|
|
650
|
-
* Call this when a file is closed in the editor.
|
|
651
|
-
*
|
|
652
|
-
* ## Example
|
|
653
|
-
* ```javascript
|
|
654
|
-
* // User closes a file
|
|
655
|
-
* client.unfocusFiles(["workspace/notes.md"]);
|
|
656
|
-
* ```
|
|
426
|
+
* Send an unfocus message for specific files.
|
|
657
427
|
*/
|
|
658
428
|
unfocusFiles(files: string[]): void;
|
|
659
429
|
}
|
|
@@ -678,10 +448,8 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
678
448
|
export interface InitOutput {
|
|
679
449
|
readonly memory: WebAssembly.Memory;
|
|
680
450
|
readonly init: () => void;
|
|
681
|
-
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
682
|
-
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
683
|
-
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
684
451
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
452
|
+
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
685
453
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
686
454
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
687
455
|
readonly diaryxbackend_createInMemory: () => [number, number, number];
|
|
@@ -690,57 +458,37 @@ export interface InitOutput {
|
|
|
690
458
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
691
459
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
692
460
|
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
693
|
-
readonly diaryxbackend_getBodySyncStep1: (a: number, b: number, c: number) => any;
|
|
694
461
|
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
695
|
-
readonly diaryxbackend_getWorkspaceSyncStep1: (a: number) => any;
|
|
696
462
|
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
697
|
-
readonly diaryxbackend_hasOutgoingSyncMessages: (a: number) => number;
|
|
698
|
-
readonly diaryxbackend_injectBodySyncMessage: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
699
|
-
readonly diaryxbackend_injectWorkspaceSyncMessage: (a: number, b: number, c: number, d: number) => any;
|
|
700
463
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
701
464
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
702
|
-
readonly diaryxbackend_outgoingSyncMessageCount: (a: number) => number;
|
|
703
|
-
readonly diaryxbackend_pollOutgoingSyncMessage: (a: number) => any;
|
|
704
465
|
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
705
466
|
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
706
|
-
readonly diaryxbackend_startSync: (a: number) => void;
|
|
707
|
-
readonly diaryxbackend_stopSync: (a: number) => void;
|
|
708
467
|
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
709
|
-
readonly
|
|
710
|
-
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
468
|
+
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
711
469
|
readonly wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
|
|
712
|
-
readonly wasmsyncclient_getBodySyncStep1: (a: number, b: number, c: number) => any;
|
|
713
|
-
readonly wasmsyncclient_getBodyUrl: (a: number) => [number, number];
|
|
714
|
-
readonly wasmsyncclient_getMetadataUrl: (a: number) => [number, number];
|
|
715
470
|
readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
|
|
716
471
|
readonly wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
|
|
717
|
-
readonly
|
|
718
|
-
readonly
|
|
719
|
-
readonly
|
|
720
|
-
readonly
|
|
721
|
-
readonly
|
|
722
|
-
readonly
|
|
723
|
-
readonly
|
|
724
|
-
readonly
|
|
725
|
-
readonly
|
|
726
|
-
readonly
|
|
727
|
-
readonly
|
|
728
|
-
readonly
|
|
729
|
-
readonly
|
|
730
|
-
readonly wasmsyncclient_markMetadataDisconnected: (a: number) => void;
|
|
731
|
-
readonly wasmsyncclient_pollBodyOutgoing: (a: number) => any;
|
|
732
|
-
readonly wasmsyncclient_pollBodyOutgoingText: (a: number) => [number, number];
|
|
733
|
-
readonly wasmsyncclient_pollMetadataOutgoing: (a: number) => any;
|
|
734
|
-
readonly wasmsyncclient_queueBodyUpdate: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
735
|
-
readonly wasmsyncclient_queueWorkspaceUpdate: (a: number) => [number, number];
|
|
736
|
-
readonly wasmsyncclient_start: (a: number) => any;
|
|
737
|
-
readonly wasmsyncclient_stop: (a: number) => void;
|
|
738
|
-
readonly wasmsyncclient_subscribeBodies: (a: number, b: number, c: number) => void;
|
|
739
|
-
readonly wasmsyncclient_subscribeBody: (a: number, b: number, c: number) => void;
|
|
472
|
+
readonly wasmsyncclient_getWsUrl: (a: number) => [number, number];
|
|
473
|
+
readonly wasmsyncclient_hasEvents: (a: number) => number;
|
|
474
|
+
readonly wasmsyncclient_hasOutgoing: (a: number) => number;
|
|
475
|
+
readonly wasmsyncclient_onBinaryMessage: (a: number, b: number, c: number) => any;
|
|
476
|
+
readonly wasmsyncclient_onConnected: (a: number) => any;
|
|
477
|
+
readonly wasmsyncclient_onDisconnected: (a: number) => any;
|
|
478
|
+
readonly wasmsyncclient_onSnapshotImported: (a: number) => any;
|
|
479
|
+
readonly wasmsyncclient_onTextMessage: (a: number, b: number, c: number) => any;
|
|
480
|
+
readonly wasmsyncclient_pollEvent: (a: number) => [number, number];
|
|
481
|
+
readonly wasmsyncclient_pollOutgoingBinary: (a: number) => any;
|
|
482
|
+
readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
483
|
+
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
484
|
+
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
740
485
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
741
|
-
readonly
|
|
742
|
-
readonly
|
|
743
|
-
readonly
|
|
486
|
+
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
487
|
+
readonly now_timestamp: () => [number, number];
|
|
488
|
+
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
489
|
+
readonly wasm_bindgen__closure__destroy__h676385b1ad3ac0e9: (a: number, b: number) => void;
|
|
490
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
|
|
491
|
+
readonly wasm_bindgen__convert__closures_____invoke__he720d3228b6c7e0b: (a: number, b: number, c: any) => void;
|
|
744
492
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
745
493
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
746
494
|
readonly __wbindgen_exn_store: (a: number) => void;
|