loro-crdt 1.13.7 → 1.13.8

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.
@@ -269,10 +269,29 @@ export function run() {
269
269
  }
270
270
 
271
271
  /**
272
- * Enable debug info of Loro
272
+ * @param {Uint8Array} bytes
273
+ * @returns {{ peer: PeerID, counter: number }[]}
273
274
  */
274
- export function setDebug() {
275
- wasm.setDebug();
275
+ export function decodeFrontiers(bytes) {
276
+ try {
277
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
278
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
279
+ const len0 = WASM_VECTOR_LEN;
280
+ wasm.decodeFrontiers(retptr, ptr0, len0);
281
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
282
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
283
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
284
+ if (r2) {
285
+ throw takeObject(r1);
286
+ }
287
+ return takeObject(r0);
288
+ } finally {
289
+ wasm.__wbindgen_add_to_stack_pointer(16);
290
+ }
291
+ }
292
+
293
+ export function callPendingEvents() {
294
+ wasm.callPendingEvents();
276
295
  }
277
296
 
278
297
  /**
@@ -296,39 +315,6 @@ export function LORO_VERSION() {
296
315
  }
297
316
  }
298
317
 
299
- /**
300
- * Decode the metadata of the import blob.
301
- *
302
- * This method is useful to get the following metadata of the import blob:
303
- *
304
- * - startVersionVector
305
- * - endVersionVector
306
- * - startTimestamp
307
- * - endTimestamp
308
- * - mode
309
- * - changeNum
310
- * @param {Uint8Array} blob
311
- * @param {boolean} check_checksum
312
- * @returns {ImportBlobMetadata}
313
- */
314
- export function decodeImportBlobMeta(blob, check_checksum) {
315
- try {
316
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
317
- const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
318
- const len0 = WASM_VECTOR_LEN;
319
- wasm.decodeImportBlobMeta(retptr, ptr0, len0, check_checksum);
320
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
321
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
322
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
323
- if (r2) {
324
- throw takeObject(r1);
325
- }
326
- return takeObject(r0);
327
- } finally {
328
- wasm.__wbindgen_add_to_stack_pointer(16);
329
- }
330
- }
331
-
332
318
  /**
333
319
  * Redacts sensitive content in JSON updates within the specified version range.
334
320
  *
@@ -367,32 +353,6 @@ export function redactJsonUpdates(json_updates, version_range) {
367
353
  }
368
354
  }
369
355
 
370
- /**
371
- * @param {Uint8Array} bytes
372
- * @returns {{ peer: PeerID, counter: number }[]}
373
- */
374
- export function decodeFrontiers(bytes) {
375
- try {
376
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
378
- const len0 = WASM_VECTOR_LEN;
379
- wasm.decodeFrontiers(retptr, ptr0, len0);
380
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
381
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
382
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
383
- if (r2) {
384
- throw takeObject(r1);
385
- }
386
- return takeObject(r0);
387
- } finally {
388
- wasm.__wbindgen_add_to_stack_pointer(16);
389
- }
390
- }
391
-
392
- export function callPendingEvents() {
393
- wasm.callPendingEvents();
394
- }
395
-
396
356
  function passArrayJsValueToWasm0(array, malloc) {
397
357
  const ptr = malloc(array.length * 4, 4) >>> 0;
398
358
  const mem = getDataViewMemory0();
@@ -427,12 +387,52 @@ export function encodeFrontiers(frontiers) {
427
387
  }
428
388
  }
429
389
 
390
+ /**
391
+ * Decode the metadata of the import blob.
392
+ *
393
+ * This method is useful to get the following metadata of the import blob:
394
+ *
395
+ * - startVersionVector
396
+ * - endVersionVector
397
+ * - startTimestamp
398
+ * - endTimestamp
399
+ * - mode
400
+ * - changeNum
401
+ * @param {Uint8Array} blob
402
+ * @param {boolean} check_checksum
403
+ * @returns {ImportBlobMetadata}
404
+ */
405
+ export function decodeImportBlobMeta(blob, check_checksum) {
406
+ try {
407
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
408
+ const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
409
+ const len0 = WASM_VECTOR_LEN;
410
+ wasm.decodeImportBlobMeta(retptr, ptr0, len0, check_checksum);
411
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
412
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
413
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
414
+ if (r2) {
415
+ throw takeObject(r1);
416
+ }
417
+ return takeObject(r0);
418
+ } finally {
419
+ wasm.__wbindgen_add_to_stack_pointer(16);
420
+ }
421
+ }
422
+
423
+ /**
424
+ * Enable debug info of Loro
425
+ */
426
+ export function setDebug() {
427
+ wasm.setDebug();
428
+ }
429
+
430
430
  function __wbg_adapter_60(arg0, arg1, arg2) {
431
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc243e3100319c48(arg0, arg1, addHeapObject(arg2));
431
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03abcb20aecec54f(arg0, arg1, addHeapObject(arg2));
432
432
  }
433
433
 
434
434
  function __wbg_adapter_63(arg0, arg1) {
435
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09294ef44fc27173(arg0, arg1);
435
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03e188dc81fd4288(arg0, arg1);
436
436
  }
437
437
 
438
438
  const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -7010,7 +7010,7 @@ export function __wbg_entries_c8a90a7ed73e84ce(arg0) {
7010
7010
  return addHeapObject(ret);
7011
7011
  };
7012
7012
 
7013
- export function __wbg_error_30083555868aa7a9(arg0, arg1) {
7013
+ export function __wbg_error_2caaeb4a4ddff603(arg0, arg1) {
7014
7014
  console.error(getStringFromWasm0(arg0, arg1));
7015
7015
  };
7016
7016
 
@@ -7141,10 +7141,6 @@ export function __wbg_log_0cc1b7768397bcfe(arg0, arg1, arg2, arg3, arg4, arg5, a
7141
7141
  }
7142
7142
  };
7143
7143
 
7144
- export function __wbg_log_c534a954ce262324(arg0, arg1) {
7145
- console.log(getStringFromWasm0(arg0, arg1));
7146
- };
7147
-
7148
7144
  export function __wbg_log_cb9e190acc5753fb(arg0, arg1) {
7149
7145
  let deferred0_0;
7150
7146
  let deferred0_1;
@@ -7157,6 +7153,10 @@ export function __wbg_log_cb9e190acc5753fb(arg0, arg1) {
7157
7153
  }
7158
7154
  };
7159
7155
 
7156
+ export function __wbg_log_fc81db84f828b288(arg0, arg1) {
7157
+ console.log(getStringFromWasm0(arg0, arg1));
7158
+ };
7159
+
7160
7160
  export function __wbg_lorocounter_new(arg0) {
7161
7161
  const ret = LoroCounter.__wrap(arg0);
7162
7162
  return addHeapObject(ret);
@@ -7278,7 +7278,7 @@ export function __wbg_node_905d3e251edff8a2(arg0) {
7278
7278
  return addHeapObject(ret);
7279
7279
  };
7280
7280
 
7281
- export function __wbg_now_9a16e63446ca7697() {
7281
+ export function __wbg_now_829357f5fa91c9dd() {
7282
7282
  const ret = Date.now();
7283
7283
  return ret;
7284
7284
  };
@@ -7391,7 +7391,7 @@ export function __wbg_versionvector_new(arg0) {
7391
7391
  return addHeapObject(ret);
7392
7392
  };
7393
7393
 
7394
- export function __wbg_warn_994f3bd0367746f9(arg0, arg1) {
7394
+ export function __wbg_warn_5e3717ed8ac922f8(arg0, arg1) {
7395
7395
  console.warn(getStringFromWasm0(arg0, arg1));
7396
7396
  };
7397
7397
 
Binary file
@@ -330,6 +330,6 @@ export const __wbindgen_exn_store: (a: number) => void;
330
330
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
331
331
  export const __wbindgen_export_4: WebAssembly.Table;
332
332
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
333
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc243e3100319c48: (a: number, b: number, c: number) => void;
334
- export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09294ef44fc27173: (a: number, b: number) => void;
333
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03abcb20aecec54f: (a: number, b: number, c: number) => void;
334
+ export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03e188dc81fd4288: (a: number, b: number) => void;
335
335
  export const __wbindgen_start: () => void;
@@ -1,27 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function run(): void;
4
- /**
5
- * Enable debug info of Loro
6
- */
7
- export function setDebug(): void;
4
+ export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
5
+ export function callPendingEvents(): void;
8
6
  /**
9
7
  * Get the version of Loro
10
8
  */
11
9
  export function LORO_VERSION(): string;
12
- /**
13
- * Decode the metadata of the import blob.
14
- *
15
- * This method is useful to get the following metadata of the import blob:
16
- *
17
- * - startVersionVector
18
- * - endVersionVector
19
- * - startTimestamp
20
- * - endTimestamp
21
- * - mode
22
- * - changeNum
23
- */
24
- export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
25
10
  /**
26
11
  * Redacts sensitive content in JSON updates within the specified version range.
27
12
  *
@@ -42,9 +27,24 @@ export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean):
42
27
  * @returns {Object} The redacted JSON updates
43
28
  */
44
29
  export function redactJsonUpdates(json_updates: string | JsonSchema, version_range: any): JsonSchema;
45
- export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
46
- export function callPendingEvents(): void;
47
30
  export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
31
+ /**
32
+ * Decode the metadata of the import blob.
33
+ *
34
+ * This method is useful to get the following metadata of the import blob:
35
+ *
36
+ * - startVersionVector
37
+ * - endVersionVector
38
+ * - startTimestamp
39
+ * - endTimestamp
40
+ * - mode
41
+ * - changeNum
42
+ */
43
+ export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
44
+ /**
45
+ * Enable debug info of Loro
46
+ */
47
+ export function setDebug(): void;
48
48
 
49
49
  /**
50
50
  * Container types supported by loro.
@@ -265,10 +265,29 @@ module.exports.run = function() {
265
265
  };
266
266
 
267
267
  /**
268
- * Enable debug info of Loro
268
+ * @param {Uint8Array} bytes
269
+ * @returns {{ peer: PeerID, counter: number }[]}
269
270
  */
270
- module.exports.setDebug = function() {
271
- wasm.setDebug();
271
+ module.exports.decodeFrontiers = function(bytes) {
272
+ try {
273
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
274
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
275
+ const len0 = WASM_VECTOR_LEN;
276
+ wasm.decodeFrontiers(retptr, ptr0, len0);
277
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
278
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
279
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
280
+ if (r2) {
281
+ throw takeObject(r1);
282
+ }
283
+ return takeObject(r0);
284
+ } finally {
285
+ wasm.__wbindgen_add_to_stack_pointer(16);
286
+ }
287
+ };
288
+
289
+ module.exports.callPendingEvents = function() {
290
+ wasm.callPendingEvents();
272
291
  };
273
292
 
274
293
  /**
@@ -292,39 +311,6 @@ module.exports.LORO_VERSION = function() {
292
311
  }
293
312
  };
294
313
 
295
- /**
296
- * Decode the metadata of the import blob.
297
- *
298
- * This method is useful to get the following metadata of the import blob:
299
- *
300
- * - startVersionVector
301
- * - endVersionVector
302
- * - startTimestamp
303
- * - endTimestamp
304
- * - mode
305
- * - changeNum
306
- * @param {Uint8Array} blob
307
- * @param {boolean} check_checksum
308
- * @returns {ImportBlobMetadata}
309
- */
310
- module.exports.decodeImportBlobMeta = function(blob, check_checksum) {
311
- try {
312
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
313
- const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
314
- const len0 = WASM_VECTOR_LEN;
315
- wasm.decodeImportBlobMeta(retptr, ptr0, len0, check_checksum);
316
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
317
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
318
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
319
- if (r2) {
320
- throw takeObject(r1);
321
- }
322
- return takeObject(r0);
323
- } finally {
324
- wasm.__wbindgen_add_to_stack_pointer(16);
325
- }
326
- };
327
-
328
314
  /**
329
315
  * Redacts sensitive content in JSON updates within the specified version range.
330
316
  *
@@ -363,32 +349,6 @@ module.exports.redactJsonUpdates = function(json_updates, version_range) {
363
349
  }
364
350
  };
365
351
 
366
- /**
367
- * @param {Uint8Array} bytes
368
- * @returns {{ peer: PeerID, counter: number }[]}
369
- */
370
- module.exports.decodeFrontiers = function(bytes) {
371
- try {
372
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
373
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
374
- const len0 = WASM_VECTOR_LEN;
375
- wasm.decodeFrontiers(retptr, ptr0, len0);
376
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
377
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
378
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
379
- if (r2) {
380
- throw takeObject(r1);
381
- }
382
- return takeObject(r0);
383
- } finally {
384
- wasm.__wbindgen_add_to_stack_pointer(16);
385
- }
386
- };
387
-
388
- module.exports.callPendingEvents = function() {
389
- wasm.callPendingEvents();
390
- };
391
-
392
352
  function passArrayJsValueToWasm0(array, malloc) {
393
353
  const ptr = malloc(array.length * 4, 4) >>> 0;
394
354
  const mem = getDataViewMemory0();
@@ -423,12 +383,52 @@ module.exports.encodeFrontiers = function(frontiers) {
423
383
  }
424
384
  };
425
385
 
386
+ /**
387
+ * Decode the metadata of the import blob.
388
+ *
389
+ * This method is useful to get the following metadata of the import blob:
390
+ *
391
+ * - startVersionVector
392
+ * - endVersionVector
393
+ * - startTimestamp
394
+ * - endTimestamp
395
+ * - mode
396
+ * - changeNum
397
+ * @param {Uint8Array} blob
398
+ * @param {boolean} check_checksum
399
+ * @returns {ImportBlobMetadata}
400
+ */
401
+ module.exports.decodeImportBlobMeta = function(blob, check_checksum) {
402
+ try {
403
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
404
+ const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
405
+ const len0 = WASM_VECTOR_LEN;
406
+ wasm.decodeImportBlobMeta(retptr, ptr0, len0, check_checksum);
407
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
409
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
410
+ if (r2) {
411
+ throw takeObject(r1);
412
+ }
413
+ return takeObject(r0);
414
+ } finally {
415
+ wasm.__wbindgen_add_to_stack_pointer(16);
416
+ }
417
+ };
418
+
419
+ /**
420
+ * Enable debug info of Loro
421
+ */
422
+ module.exports.setDebug = function() {
423
+ wasm.setDebug();
424
+ };
425
+
426
426
  function __wbg_adapter_60(arg0, arg1, arg2) {
427
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc243e3100319c48(arg0, arg1, addHeapObject(arg2));
427
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03abcb20aecec54f(arg0, arg1, addHeapObject(arg2));
428
428
  }
429
429
 
430
430
  function __wbg_adapter_63(arg0, arg1) {
431
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09294ef44fc27173(arg0, arg1);
431
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03e188dc81fd4288(arg0, arg1);
432
432
  }
433
433
 
434
434
  const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -7020,7 +7020,7 @@ module.exports.__wbg_entries_c8a90a7ed73e84ce = function(arg0) {
7020
7020
  return addHeapObject(ret);
7021
7021
  };
7022
7022
 
7023
- module.exports.__wbg_error_30083555868aa7a9 = function(arg0, arg1) {
7023
+ module.exports.__wbg_error_2caaeb4a4ddff603 = function(arg0, arg1) {
7024
7024
  console.error(getStringFromWasm0(arg0, arg1));
7025
7025
  };
7026
7026
 
@@ -7151,10 +7151,6 @@ module.exports.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg
7151
7151
  }
7152
7152
  };
7153
7153
 
7154
- module.exports.__wbg_log_c534a954ce262324 = function(arg0, arg1) {
7155
- console.log(getStringFromWasm0(arg0, arg1));
7156
- };
7157
-
7158
7154
  module.exports.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
7159
7155
  let deferred0_0;
7160
7156
  let deferred0_1;
@@ -7167,6 +7163,10 @@ module.exports.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
7167
7163
  }
7168
7164
  };
7169
7165
 
7166
+ module.exports.__wbg_log_fc81db84f828b288 = function(arg0, arg1) {
7167
+ console.log(getStringFromWasm0(arg0, arg1));
7168
+ };
7169
+
7170
7170
  module.exports.__wbg_lorocounter_new = function(arg0) {
7171
7171
  const ret = LoroCounter.__wrap(arg0);
7172
7172
  return addHeapObject(ret);
@@ -7288,7 +7288,7 @@ module.exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
7288
7288
  return addHeapObject(ret);
7289
7289
  };
7290
7290
 
7291
- module.exports.__wbg_now_9a16e63446ca7697 = function() {
7291
+ module.exports.__wbg_now_829357f5fa91c9dd = function() {
7292
7292
  const ret = Date.now();
7293
7293
  return ret;
7294
7294
  };
@@ -7401,7 +7401,7 @@ module.exports.__wbg_versionvector_new = function(arg0) {
7401
7401
  return addHeapObject(ret);
7402
7402
  };
7403
7403
 
7404
- module.exports.__wbg_warn_994f3bd0367746f9 = function(arg0, arg1) {
7404
+ module.exports.__wbg_warn_5e3717ed8ac922f8 = function(arg0, arg1) {
7405
7405
  console.warn(getStringFromWasm0(arg0, arg1));
7406
7406
  };
7407
7407
 
Binary file
@@ -330,6 +330,6 @@ export const __wbindgen_exn_store: (a: number) => void;
330
330
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
331
331
  export const __wbindgen_export_4: WebAssembly.Table;
332
332
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
333
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc243e3100319c48: (a: number, b: number, c: number) => void;
334
- export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09294ef44fc27173: (a: number, b: number) => void;
333
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03abcb20aecec54f: (a: number, b: number, c: number) => void;
334
+ export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03e188dc81fd4288: (a: number, b: number) => void;
335
335
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loro-crdt",
3
- "version": "1.13.7",
3
+ "version": "1.13.8",
4
4
  "description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.",
5
5
  "keywords": [
6
6
  "crdt",
@@ -77,7 +77,8 @@
77
77
  "scripts": {
78
78
  "build-dev": "deno run -A ./scripts/build.ts dev && rollup -c && deno run -A ./scripts/post-rollup.ts && npm run test",
79
79
  "build-release": "deno run -A ./scripts/build.ts release && rollup -c && deno run -A ./scripts/post-rollup.ts && npm run test",
80
- "test": "node --expose-gc ./node_modules/vitest/vitest.mjs run && npx tsc --noEmit && cd ./deno_tests && deno test -A && cd ../bun_tests && bun test"
80
+ "test": "node --expose-gc ./node_modules/vitest/vitest.mjs run && npx tsc --noEmit && cd ./deno_tests && deno test -A && cd ../bun_tests && bun test",
81
+ "test:snapshot-memory": "node --expose-gc ./scripts/measure-snapshot-round-memory.cjs"
81
82
  },
82
83
  "homepage": "https://loro.dev",
83
84
  "author": "",
@@ -1,27 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function run(): void;
4
- /**
5
- * Enable debug info of Loro
6
- */
7
- export function setDebug(): void;
4
+ export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
5
+ export function callPendingEvents(): void;
8
6
  /**
9
7
  * Get the version of Loro
10
8
  */
11
9
  export function LORO_VERSION(): string;
12
- /**
13
- * Decode the metadata of the import blob.
14
- *
15
- * This method is useful to get the following metadata of the import blob:
16
- *
17
- * - startVersionVector
18
- * - endVersionVector
19
- * - startTimestamp
20
- * - endTimestamp
21
- * - mode
22
- * - changeNum
23
- */
24
- export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
25
10
  /**
26
11
  * Redacts sensitive content in JSON updates within the specified version range.
27
12
  *
@@ -42,9 +27,24 @@ export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean):
42
27
  * @returns {Object} The redacted JSON updates
43
28
  */
44
29
  export function redactJsonUpdates(json_updates: string | JsonSchema, version_range: any): JsonSchema;
45
- export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
46
- export function callPendingEvents(): void;
47
30
  export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
31
+ /**
32
+ * Decode the metadata of the import blob.
33
+ *
34
+ * This method is useful to get the following metadata of the import blob:
35
+ *
36
+ * - startVersionVector
37
+ * - endVersionVector
38
+ * - startTimestamp
39
+ * - endTimestamp
40
+ * - mode
41
+ * - changeNum
42
+ */
43
+ export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
44
+ /**
45
+ * Enable debug info of Loro
46
+ */
47
+ export function setDebug(): void;
48
48
 
49
49
  /**
50
50
  * Container types supported by loro.
@@ -4224,8 +4224,8 @@ export interface InitOutput {
4224
4224
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
4225
4225
  readonly __wbindgen_export_4: WebAssembly.Table;
4226
4226
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
4227
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc243e3100319c48: (a: number, b: number, c: number) => void;
4228
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09294ef44fc27173: (a: number, b: number) => void;
4227
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03abcb20aecec54f: (a: number, b: number, c: number) => void;
4228
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03e188dc81fd4288: (a: number, b: number) => void;
4229
4229
  readonly __wbindgen_start: () => void;
4230
4230
  }
4231
4231