loro-crdt 1.10.0 → 1.10.1
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/CHANGELOG.md +6 -0
- package/base64/index.js +51 -51
- package/base64/loro_wasm.d.ts +10 -10
- package/bundler/loro_wasm.d.ts +10 -10
- package/bundler/loro_wasm_bg.js +46 -46
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +1 -1
- package/nodejs/loro_wasm.d.ts +10 -10
- package/nodejs/loro_wasm.js +46 -46
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +11 -11
- package/web/loro_wasm.js +46 -46
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +1 -1
package/base64/loro_wasm.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Get the version of Loro
|
|
5
|
-
*/
|
|
6
|
-
export function LORO_VERSION(): string;
|
|
7
|
-
/**
|
|
8
|
-
* Enable debug info of Loro
|
|
9
|
-
*/
|
|
10
|
-
export function setDebug(): void;
|
|
11
|
-
export function run(): void;
|
|
12
|
-
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
13
3
|
/**
|
|
14
4
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
15
5
|
*
|
|
@@ -43,8 +33,18 @@ export function redactJsonUpdates(json_updates: string | JsonSchema, version_ran
|
|
|
43
33
|
* - changeNum
|
|
44
34
|
*/
|
|
45
35
|
export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
|
|
36
|
+
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
37
|
+
export function run(): void;
|
|
46
38
|
export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
|
|
39
|
+
/**
|
|
40
|
+
* Enable debug info of Loro
|
|
41
|
+
*/
|
|
42
|
+
export function setDebug(): void;
|
|
47
43
|
export function callPendingEvents(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get the version of Loro
|
|
46
|
+
*/
|
|
47
|
+
export function LORO_VERSION(): string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Container types supported by loro.
|
package/bundler/loro_wasm.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Get the version of Loro
|
|
5
|
-
*/
|
|
6
|
-
export function LORO_VERSION(): string;
|
|
7
|
-
/**
|
|
8
|
-
* Enable debug info of Loro
|
|
9
|
-
*/
|
|
10
|
-
export function setDebug(): void;
|
|
11
|
-
export function run(): void;
|
|
12
|
-
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
13
3
|
/**
|
|
14
4
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
15
5
|
*
|
|
@@ -43,8 +33,18 @@ export function redactJsonUpdates(json_updates: string | JsonSchema, version_ran
|
|
|
43
33
|
* - changeNum
|
|
44
34
|
*/
|
|
45
35
|
export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
|
|
36
|
+
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
37
|
+
export function run(): void;
|
|
46
38
|
export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
|
|
39
|
+
/**
|
|
40
|
+
* Enable debug info of Loro
|
|
41
|
+
*/
|
|
42
|
+
export function setDebug(): void;
|
|
47
43
|
export function callPendingEvents(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get the version of Loro
|
|
46
|
+
*/
|
|
47
|
+
export function LORO_VERSION(): string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Container types supported by loro.
|
package/bundler/loro_wasm_bg.js
CHANGED
|
@@ -240,48 +240,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
240
240
|
wasm.__externref_drop_slice(ptr, len);
|
|
241
241
|
return result;
|
|
242
242
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Get the version of Loro
|
|
245
|
-
* @returns {string}
|
|
246
|
-
*/
|
|
247
|
-
export function LORO_VERSION() {
|
|
248
|
-
let deferred1_0;
|
|
249
|
-
let deferred1_1;
|
|
250
|
-
try {
|
|
251
|
-
const ret = wasm.LORO_VERSION();
|
|
252
|
-
deferred1_0 = ret[0];
|
|
253
|
-
deferred1_1 = ret[1];
|
|
254
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
255
|
-
} finally {
|
|
256
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Enable debug info of Loro
|
|
262
|
-
*/
|
|
263
|
-
export function setDebug() {
|
|
264
|
-
wasm.setDebug();
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export function run() {
|
|
268
|
-
wasm.run();
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @param {Uint8Array} bytes
|
|
273
|
-
* @returns {{ peer: PeerID, counter: number }[]}
|
|
274
|
-
*/
|
|
275
|
-
export function decodeFrontiers(bytes) {
|
|
276
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
277
|
-
const len0 = WASM_VECTOR_LEN;
|
|
278
|
-
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
279
|
-
if (ret[2]) {
|
|
280
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
281
|
-
}
|
|
282
|
-
return takeFromExternrefTable0(ret[0]);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
243
|
/**
|
|
286
244
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
287
245
|
*
|
|
@@ -337,6 +295,24 @@ export function decodeImportBlobMeta(blob, check_checksum) {
|
|
|
337
295
|
return takeFromExternrefTable0(ret[0]);
|
|
338
296
|
}
|
|
339
297
|
|
|
298
|
+
/**
|
|
299
|
+
* @param {Uint8Array} bytes
|
|
300
|
+
* @returns {{ peer: PeerID, counter: number }[]}
|
|
301
|
+
*/
|
|
302
|
+
export function decodeFrontiers(bytes) {
|
|
303
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
305
|
+
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
306
|
+
if (ret[2]) {
|
|
307
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
308
|
+
}
|
|
309
|
+
return takeFromExternrefTable0(ret[0]);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export function run() {
|
|
313
|
+
wasm.run();
|
|
314
|
+
}
|
|
315
|
+
|
|
340
316
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
341
317
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
342
318
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -362,16 +338,40 @@ export function encodeFrontiers(frontiers) {
|
|
|
362
338
|
return v2;
|
|
363
339
|
}
|
|
364
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Enable debug info of Loro
|
|
343
|
+
*/
|
|
344
|
+
export function setDebug() {
|
|
345
|
+
wasm.setDebug();
|
|
346
|
+
}
|
|
347
|
+
|
|
365
348
|
export function callPendingEvents() {
|
|
366
349
|
wasm.callPendingEvents();
|
|
367
350
|
}
|
|
368
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Get the version of Loro
|
|
354
|
+
* @returns {string}
|
|
355
|
+
*/
|
|
356
|
+
export function LORO_VERSION() {
|
|
357
|
+
let deferred1_0;
|
|
358
|
+
let deferred1_1;
|
|
359
|
+
try {
|
|
360
|
+
const ret = wasm.LORO_VERSION();
|
|
361
|
+
deferred1_0 = ret[0];
|
|
362
|
+
deferred1_1 = ret[1];
|
|
363
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
364
|
+
} finally {
|
|
365
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
369
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
370
370
|
wasm.closure11_externref_shim(arg0, arg1, arg2);
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
function __wbg_adapter_65(arg0, arg1) {
|
|
374
|
-
wasm.
|
|
374
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4(arg0, arg1);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5521,7 +5521,7 @@ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
|
5521
5521
|
}
|
|
5522
5522
|
};
|
|
5523
5523
|
|
|
5524
|
-
export function
|
|
5524
|
+
export function __wbg_error_f6ddbf3300c73fe1(arg0, arg1) {
|
|
5525
5525
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5526
5526
|
};
|
|
5527
5527
|
|
|
@@ -5640,7 +5640,7 @@ export function __wbg_log_0cc1b7768397bcfe(arg0, arg1, arg2, arg3, arg4, arg5, a
|
|
|
5640
5640
|
}
|
|
5641
5641
|
};
|
|
5642
5642
|
|
|
5643
|
-
export function
|
|
5643
|
+
export function __wbg_log_3c0d0f235e1c209c(arg0, arg1) {
|
|
5644
5644
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5645
5645
|
};
|
|
5646
5646
|
|
|
@@ -5890,7 +5890,7 @@ export function __wbg_versionvector_new(arg0) {
|
|
|
5890
5890
|
return ret;
|
|
5891
5891
|
};
|
|
5892
5892
|
|
|
5893
|
-
export function
|
|
5893
|
+
export function __wbg_warn_e3fad33818dd84d2(arg0, arg1) {
|
|
5894
5894
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5895
5895
|
};
|
|
5896
5896
|
|
|
Binary file
|
|
@@ -324,5 +324,5 @@ export const __wbindgen_export_6: WebAssembly.Table;
|
|
|
324
324
|
export const __externref_table_dealloc: (a: number) => void;
|
|
325
325
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
326
326
|
export const closure11_externref_shim: (a: number, b: number, c: any) => void;
|
|
327
|
-
export const
|
|
327
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4: (a: number, b: number) => void;
|
|
328
328
|
export const __wbindgen_start: () => void;
|
package/nodejs/loro_wasm.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Get the version of Loro
|
|
5
|
-
*/
|
|
6
|
-
export function LORO_VERSION(): string;
|
|
7
|
-
/**
|
|
8
|
-
* Enable debug info of Loro
|
|
9
|
-
*/
|
|
10
|
-
export function setDebug(): void;
|
|
11
|
-
export function run(): void;
|
|
12
|
-
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
13
3
|
/**
|
|
14
4
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
15
5
|
*
|
|
@@ -43,8 +33,18 @@ export function redactJsonUpdates(json_updates: string | JsonSchema, version_ran
|
|
|
43
33
|
* - changeNum
|
|
44
34
|
*/
|
|
45
35
|
export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
|
|
36
|
+
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
37
|
+
export function run(): void;
|
|
46
38
|
export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
|
|
39
|
+
/**
|
|
40
|
+
* Enable debug info of Loro
|
|
41
|
+
*/
|
|
42
|
+
export function setDebug(): void;
|
|
47
43
|
export function callPendingEvents(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get the version of Loro
|
|
46
|
+
*/
|
|
47
|
+
export function LORO_VERSION(): string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Container types supported by loro.
|
package/nodejs/loro_wasm.js
CHANGED
|
@@ -236,48 +236,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
236
236
|
wasm.__externref_drop_slice(ptr, len);
|
|
237
237
|
return result;
|
|
238
238
|
}
|
|
239
|
-
/**
|
|
240
|
-
* Get the version of Loro
|
|
241
|
-
* @returns {string}
|
|
242
|
-
*/
|
|
243
|
-
module.exports.LORO_VERSION = function() {
|
|
244
|
-
let deferred1_0;
|
|
245
|
-
let deferred1_1;
|
|
246
|
-
try {
|
|
247
|
-
const ret = wasm.LORO_VERSION();
|
|
248
|
-
deferred1_0 = ret[0];
|
|
249
|
-
deferred1_1 = ret[1];
|
|
250
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
251
|
-
} finally {
|
|
252
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Enable debug info of Loro
|
|
258
|
-
*/
|
|
259
|
-
module.exports.setDebug = function() {
|
|
260
|
-
wasm.setDebug();
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
module.exports.run = function() {
|
|
264
|
-
wasm.run();
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* @param {Uint8Array} bytes
|
|
269
|
-
* @returns {{ peer: PeerID, counter: number }[]}
|
|
270
|
-
*/
|
|
271
|
-
module.exports.decodeFrontiers = function(bytes) {
|
|
272
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
273
|
-
const len0 = WASM_VECTOR_LEN;
|
|
274
|
-
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
275
|
-
if (ret[2]) {
|
|
276
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
277
|
-
}
|
|
278
|
-
return takeFromExternrefTable0(ret[0]);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
239
|
/**
|
|
282
240
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
283
241
|
*
|
|
@@ -333,6 +291,24 @@ module.exports.decodeImportBlobMeta = function(blob, check_checksum) {
|
|
|
333
291
|
return takeFromExternrefTable0(ret[0]);
|
|
334
292
|
};
|
|
335
293
|
|
|
294
|
+
/**
|
|
295
|
+
* @param {Uint8Array} bytes
|
|
296
|
+
* @returns {{ peer: PeerID, counter: number }[]}
|
|
297
|
+
*/
|
|
298
|
+
module.exports.decodeFrontiers = function(bytes) {
|
|
299
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
300
|
+
const len0 = WASM_VECTOR_LEN;
|
|
301
|
+
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
302
|
+
if (ret[2]) {
|
|
303
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
304
|
+
}
|
|
305
|
+
return takeFromExternrefTable0(ret[0]);
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
module.exports.run = function() {
|
|
309
|
+
wasm.run();
|
|
310
|
+
};
|
|
311
|
+
|
|
336
312
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
337
313
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
338
314
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -358,16 +334,40 @@ module.exports.encodeFrontiers = function(frontiers) {
|
|
|
358
334
|
return v2;
|
|
359
335
|
};
|
|
360
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Enable debug info of Loro
|
|
339
|
+
*/
|
|
340
|
+
module.exports.setDebug = function() {
|
|
341
|
+
wasm.setDebug();
|
|
342
|
+
};
|
|
343
|
+
|
|
361
344
|
module.exports.callPendingEvents = function() {
|
|
362
345
|
wasm.callPendingEvents();
|
|
363
346
|
};
|
|
364
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Get the version of Loro
|
|
350
|
+
* @returns {string}
|
|
351
|
+
*/
|
|
352
|
+
module.exports.LORO_VERSION = function() {
|
|
353
|
+
let deferred1_0;
|
|
354
|
+
let deferred1_1;
|
|
355
|
+
try {
|
|
356
|
+
const ret = wasm.LORO_VERSION();
|
|
357
|
+
deferred1_0 = ret[0];
|
|
358
|
+
deferred1_1 = ret[1];
|
|
359
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
360
|
+
} finally {
|
|
361
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
|
|
365
365
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
366
366
|
wasm.closure11_externref_shim(arg0, arg1, arg2);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
function __wbg_adapter_65(arg0, arg1) {
|
|
370
|
-
wasm.
|
|
370
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4(arg0, arg1);
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5531,7 +5531,7 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
|
5531
5531
|
}
|
|
5532
5532
|
};
|
|
5533
5533
|
|
|
5534
|
-
module.exports.
|
|
5534
|
+
module.exports.__wbg_error_f6ddbf3300c73fe1 = function(arg0, arg1) {
|
|
5535
5535
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5536
5536
|
};
|
|
5537
5537
|
|
|
@@ -5650,7 +5650,7 @@ module.exports.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg
|
|
|
5650
5650
|
}
|
|
5651
5651
|
};
|
|
5652
5652
|
|
|
5653
|
-
module.exports.
|
|
5653
|
+
module.exports.__wbg_log_3c0d0f235e1c209c = function(arg0, arg1) {
|
|
5654
5654
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5655
5655
|
};
|
|
5656
5656
|
|
|
@@ -5900,7 +5900,7 @@ module.exports.__wbg_versionvector_new = function(arg0) {
|
|
|
5900
5900
|
return ret;
|
|
5901
5901
|
};
|
|
5902
5902
|
|
|
5903
|
-
module.exports.
|
|
5903
|
+
module.exports.__wbg_warn_e3fad33818dd84d2 = function(arg0, arg1) {
|
|
5904
5904
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5905
5905
|
};
|
|
5906
5906
|
|
package/nodejs/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -324,5 +324,5 @@ export const __wbindgen_export_6: WebAssembly.Table;
|
|
|
324
324
|
export const __externref_table_dealloc: (a: number) => void;
|
|
325
325
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
326
326
|
export const closure11_externref_shim: (a: number, b: number, c: any) => void;
|
|
327
|
-
export const
|
|
327
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4: (a: number, b: number) => void;
|
|
328
328
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
package/web/loro_wasm.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Get the version of Loro
|
|
5
|
-
*/
|
|
6
|
-
export function LORO_VERSION(): string;
|
|
7
|
-
/**
|
|
8
|
-
* Enable debug info of Loro
|
|
9
|
-
*/
|
|
10
|
-
export function setDebug(): void;
|
|
11
|
-
export function run(): void;
|
|
12
|
-
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
13
3
|
/**
|
|
14
4
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
15
5
|
*
|
|
@@ -43,8 +33,18 @@ export function redactJsonUpdates(json_updates: string | JsonSchema, version_ran
|
|
|
43
33
|
* - changeNum
|
|
44
34
|
*/
|
|
45
35
|
export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
|
|
36
|
+
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
37
|
+
export function run(): void;
|
|
46
38
|
export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
|
|
39
|
+
/**
|
|
40
|
+
* Enable debug info of Loro
|
|
41
|
+
*/
|
|
42
|
+
export function setDebug(): void;
|
|
47
43
|
export function callPendingEvents(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get the version of Loro
|
|
46
|
+
*/
|
|
47
|
+
export function LORO_VERSION(): string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Container types supported by loro.
|
|
@@ -4017,7 +4017,7 @@ export interface InitOutput {
|
|
|
4017
4017
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
4018
4018
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
4019
4019
|
readonly closure11_externref_shim: (a: number, b: number, c: any) => void;
|
|
4020
|
-
readonly
|
|
4020
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4: (a: number, b: number) => void;
|
|
4021
4021
|
readonly __wbindgen_start: () => void;
|
|
4022
4022
|
}
|
|
4023
4023
|
|
package/web/loro_wasm.js
CHANGED
|
@@ -232,48 +232,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
232
232
|
wasm.__externref_drop_slice(ptr, len);
|
|
233
233
|
return result;
|
|
234
234
|
}
|
|
235
|
-
/**
|
|
236
|
-
* Get the version of Loro
|
|
237
|
-
* @returns {string}
|
|
238
|
-
*/
|
|
239
|
-
export function LORO_VERSION() {
|
|
240
|
-
let deferred1_0;
|
|
241
|
-
let deferred1_1;
|
|
242
|
-
try {
|
|
243
|
-
const ret = wasm.LORO_VERSION();
|
|
244
|
-
deferred1_0 = ret[0];
|
|
245
|
-
deferred1_1 = ret[1];
|
|
246
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
247
|
-
} finally {
|
|
248
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Enable debug info of Loro
|
|
254
|
-
*/
|
|
255
|
-
export function setDebug() {
|
|
256
|
-
wasm.setDebug();
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export function run() {
|
|
260
|
-
wasm.run();
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* @param {Uint8Array} bytes
|
|
265
|
-
* @returns {{ peer: PeerID, counter: number }[]}
|
|
266
|
-
*/
|
|
267
|
-
export function decodeFrontiers(bytes) {
|
|
268
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
269
|
-
const len0 = WASM_VECTOR_LEN;
|
|
270
|
-
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
271
|
-
if (ret[2]) {
|
|
272
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
273
|
-
}
|
|
274
|
-
return takeFromExternrefTable0(ret[0]);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
235
|
/**
|
|
278
236
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
279
237
|
*
|
|
@@ -329,6 +287,24 @@ export function decodeImportBlobMeta(blob, check_checksum) {
|
|
|
329
287
|
return takeFromExternrefTable0(ret[0]);
|
|
330
288
|
}
|
|
331
289
|
|
|
290
|
+
/**
|
|
291
|
+
* @param {Uint8Array} bytes
|
|
292
|
+
* @returns {{ peer: PeerID, counter: number }[]}
|
|
293
|
+
*/
|
|
294
|
+
export function decodeFrontiers(bytes) {
|
|
295
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
296
|
+
const len0 = WASM_VECTOR_LEN;
|
|
297
|
+
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
298
|
+
if (ret[2]) {
|
|
299
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
300
|
+
}
|
|
301
|
+
return takeFromExternrefTable0(ret[0]);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export function run() {
|
|
305
|
+
wasm.run();
|
|
306
|
+
}
|
|
307
|
+
|
|
332
308
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
333
309
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
334
310
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -354,16 +330,40 @@ export function encodeFrontiers(frontiers) {
|
|
|
354
330
|
return v2;
|
|
355
331
|
}
|
|
356
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Enable debug info of Loro
|
|
335
|
+
*/
|
|
336
|
+
export function setDebug() {
|
|
337
|
+
wasm.setDebug();
|
|
338
|
+
}
|
|
339
|
+
|
|
357
340
|
export function callPendingEvents() {
|
|
358
341
|
wasm.callPendingEvents();
|
|
359
342
|
}
|
|
360
343
|
|
|
344
|
+
/**
|
|
345
|
+
* Get the version of Loro
|
|
346
|
+
* @returns {string}
|
|
347
|
+
*/
|
|
348
|
+
export function LORO_VERSION() {
|
|
349
|
+
let deferred1_0;
|
|
350
|
+
let deferred1_1;
|
|
351
|
+
try {
|
|
352
|
+
const ret = wasm.LORO_VERSION();
|
|
353
|
+
deferred1_0 = ret[0];
|
|
354
|
+
deferred1_1 = ret[1];
|
|
355
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
356
|
+
} finally {
|
|
357
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
361
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
362
362
|
wasm.closure11_externref_shim(arg0, arg1, arg2);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
function __wbg_adapter_65(arg0, arg1) {
|
|
366
|
-
wasm.
|
|
366
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4(arg0, arg1);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5532,7 +5532,7 @@ function __wbg_get_imports() {
|
|
|
5532
5532
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5533
5533
|
}
|
|
5534
5534
|
};
|
|
5535
|
-
imports.wbg.
|
|
5535
|
+
imports.wbg.__wbg_error_f6ddbf3300c73fe1 = function(arg0, arg1) {
|
|
5536
5536
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5537
5537
|
};
|
|
5538
5538
|
imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
@@ -5633,7 +5633,7 @@ function __wbg_get_imports() {
|
|
|
5633
5633
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5634
5634
|
}
|
|
5635
5635
|
};
|
|
5636
|
-
imports.wbg.
|
|
5636
|
+
imports.wbg.__wbg_log_3c0d0f235e1c209c = function(arg0, arg1) {
|
|
5637
5637
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5638
5638
|
};
|
|
5639
5639
|
imports.wbg.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
|
|
@@ -5836,7 +5836,7 @@ function __wbg_get_imports() {
|
|
|
5836
5836
|
const ret = VersionVector.__wrap(arg0);
|
|
5837
5837
|
return ret;
|
|
5838
5838
|
};
|
|
5839
|
-
imports.wbg.
|
|
5839
|
+
imports.wbg.__wbg_warn_e3fad33818dd84d2 = function(arg0, arg1) {
|
|
5840
5840
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5841
5841
|
};
|
|
5842
5842
|
imports.wbg.__wbindgen_as_number = function(arg0) {
|
package/web/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -324,5 +324,5 @@ export const __wbindgen_export_6: WebAssembly.Table;
|
|
|
324
324
|
export const __externref_table_dealloc: (a: number) => void;
|
|
325
325
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
326
326
|
export const closure11_externref_shim: (a: number, b: number, c: any) => void;
|
|
327
|
-
export const
|
|
327
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb782650185ad08f4: (a: number, b: number) => void;
|
|
328
328
|
export const __wbindgen_start: () => void;
|