@automerge/sedimentree 0.8.2 → 0.9.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/dist/cjs/wasm-base64.cjs +1 -1
- package/dist/cjs/web-bindings.cjs +345 -80
- package/dist/cjs/web.cjs +346 -81
- package/dist/esm/wasm-base64.js +1 -1
- package/dist/iife/index.js +345 -81
- package/dist/index.d.ts +107 -33
- package/dist/sedimentree.wasm +0 -0
- package/dist/wasm_bindgen/bundler/sedimentree_wasm.d.ts +107 -33
- package/dist/wasm_bindgen/bundler/sedimentree_wasm.js +1 -1
- package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.js +360 -81
- package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.wasm.d.ts +26 -16
- package/dist/wasm_bindgen/nodejs/sedimentree_wasm.cjs +361 -81
- package/dist/wasm_bindgen/nodejs/sedimentree_wasm.d.ts +107 -33
- package/dist/wasm_bindgen/nodejs/sedimentree_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/nodejs/sedimentree_wasm_bg.wasm.d.ts +26 -16
- package/dist/wasm_bindgen/web/sedimentree_wasm.d.ts +133 -49
- package/dist/wasm_bindgen/web/sedimentree_wasm.js +360 -81
- package/dist/wasm_bindgen/web/sedimentree_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/web/sedimentree_wasm_bg.wasm.d.ts +26 -16
- package/package.json +1 -1
- /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
- /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
- /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
- /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
- /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
- /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
- /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
- /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
- /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
|
@@ -48,7 +48,7 @@ export class BlobMeta {
|
|
|
48
48
|
* @param {Uint8Array} blob
|
|
49
49
|
*/
|
|
50
50
|
constructor(blob) {
|
|
51
|
-
const ptr0 = passArray8ToWasm0(blob, wasm.
|
|
51
|
+
const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_export);
|
|
52
52
|
const len0 = WASM_VECTOR_LEN;
|
|
53
53
|
const ret = wasm.blobmeta_new(ptr0, len0);
|
|
54
54
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -66,6 +66,142 @@ export class BlobMeta {
|
|
|
66
66
|
}
|
|
67
67
|
if (Symbol.dispose) BlobMeta.prototype[Symbol.dispose] = BlobMeta.prototype.free;
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* A user-supplied opaque identifier for a loose commit.
|
|
71
|
+
*
|
|
72
|
+
* Unlike [`Digest`](crate::digest::WasmDigest), which is a content hash
|
|
73
|
+
* computed by the system, `CommitId` is provided by the caller at construction
|
|
74
|
+
* time. This is the identity used for DAG traversal, fragment boundaries,
|
|
75
|
+
* and sync.
|
|
76
|
+
*/
|
|
77
|
+
export class CommitId {
|
|
78
|
+
static __wrap(ptr) {
|
|
79
|
+
ptr = ptr >>> 0;
|
|
80
|
+
const obj = Object.create(CommitId.prototype);
|
|
81
|
+
obj.__wbg_ptr = ptr;
|
|
82
|
+
CommitIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
__destroy_into_raw() {
|
|
86
|
+
const ptr = this.__wbg_ptr;
|
|
87
|
+
this.__wbg_ptr = 0;
|
|
88
|
+
CommitIdFinalization.unregister(this);
|
|
89
|
+
return ptr;
|
|
90
|
+
}
|
|
91
|
+
free() {
|
|
92
|
+
const ptr = this.__destroy_into_raw();
|
|
93
|
+
wasm.__wbg_commitid_free(ptr, 0);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Upcasts; to the JS-import type for [`WasmCommitId`].
|
|
97
|
+
* @returns {CommitId}
|
|
98
|
+
*/
|
|
99
|
+
__wasm_refgen_toWasmCommitId() {
|
|
100
|
+
const ret = wasm.commitid___wasm_refgen_toWasmCommitId(this.__wbg_ptr);
|
|
101
|
+
return CommitId.__wrap(ret);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Creates a new commit identifier from its Base58 string representation.
|
|
105
|
+
*
|
|
106
|
+
* # Errors
|
|
107
|
+
*
|
|
108
|
+
* Returns an error if the string cannot be decoded or is not 32 bytes.
|
|
109
|
+
* @param {string} s
|
|
110
|
+
* @returns {CommitId}
|
|
111
|
+
*/
|
|
112
|
+
static fromBase58(s) {
|
|
113
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
114
|
+
const len0 = WASM_VECTOR_LEN;
|
|
115
|
+
const ret = wasm.commitid_fromBase58(ptr0, len0);
|
|
116
|
+
if (ret[2]) {
|
|
117
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
118
|
+
}
|
|
119
|
+
return CommitId.__wrap(ret[0]);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Creates a new commit identifier from its byte representation.
|
|
123
|
+
*
|
|
124
|
+
* # Errors
|
|
125
|
+
*
|
|
126
|
+
* Returns an error if the byte slice is not exactly 32 bytes.
|
|
127
|
+
* @param {Uint8Array} bytes
|
|
128
|
+
* @returns {CommitId}
|
|
129
|
+
*/
|
|
130
|
+
static fromBytes(bytes) {
|
|
131
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
132
|
+
const len0 = WASM_VECTOR_LEN;
|
|
133
|
+
const ret = wasm.commitid_fromBytes(ptr0, len0);
|
|
134
|
+
if (ret[2]) {
|
|
135
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
136
|
+
}
|
|
137
|
+
return CommitId.__wrap(ret[0]);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Creates a new commit identifier from its hexadecimal string representation.
|
|
141
|
+
*
|
|
142
|
+
* # Errors
|
|
143
|
+
*
|
|
144
|
+
* Returns an error if the string is not valid hex or not 32 bytes.
|
|
145
|
+
* @param {string} s
|
|
146
|
+
* @returns {CommitId}
|
|
147
|
+
*/
|
|
148
|
+
static fromHexString(s) {
|
|
149
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
151
|
+
const ret = wasm.commitid_fromHexString(ptr0, len0);
|
|
152
|
+
if (ret[2]) {
|
|
153
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
154
|
+
}
|
|
155
|
+
return CommitId.__wrap(ret[0]);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Creates a new commit identifier from its byte representation.
|
|
159
|
+
*
|
|
160
|
+
* # Errors
|
|
161
|
+
*
|
|
162
|
+
* Returns an error if the byte slice is not exactly 32 bytes.
|
|
163
|
+
* @param {Uint8Array} bytes
|
|
164
|
+
*/
|
|
165
|
+
constructor(bytes) {
|
|
166
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
167
|
+
const len0 = WASM_VECTOR_LEN;
|
|
168
|
+
const ret = wasm.commitid_new(ptr0, len0);
|
|
169
|
+
if (ret[2]) {
|
|
170
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
171
|
+
}
|
|
172
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
173
|
+
CommitIdFinalization.register(this, this.__wbg_ptr, this);
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Returns the byte representation of the commit identifier.
|
|
178
|
+
* @returns {Uint8Array}
|
|
179
|
+
*/
|
|
180
|
+
toBytes() {
|
|
181
|
+
const ret = wasm.commitid_toBytes(this.__wbg_ptr);
|
|
182
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
183
|
+
wasm.__wbindgen_export6(ret[0], ret[1] * 1, 1);
|
|
184
|
+
return v1;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Returns the hexadecimal string representation.
|
|
188
|
+
* @returns {string}
|
|
189
|
+
*/
|
|
190
|
+
toHexString() {
|
|
191
|
+
let deferred1_0;
|
|
192
|
+
let deferred1_1;
|
|
193
|
+
try {
|
|
194
|
+
const ret = wasm.commitid_toHexString(this.__wbg_ptr);
|
|
195
|
+
deferred1_0 = ret[0];
|
|
196
|
+
deferred1_1 = ret[1];
|
|
197
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
198
|
+
} finally {
|
|
199
|
+
wasm.__wbindgen_export6(deferred1_0, deferred1_1, 1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (Symbol.dispose) CommitId.prototype[Symbol.dispose] = CommitId.prototype.free;
|
|
204
|
+
|
|
69
205
|
/**
|
|
70
206
|
* A commit stored with its associated blob.
|
|
71
207
|
*/
|
|
@@ -234,7 +370,7 @@ export class Digest {
|
|
|
234
370
|
* @returns {Digest}
|
|
235
371
|
*/
|
|
236
372
|
static fromBase58(s) {
|
|
237
|
-
const ptr0 = passStringToWasm0(s, wasm.
|
|
373
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
238
374
|
const len0 = WASM_VECTOR_LEN;
|
|
239
375
|
const ret = wasm.digest_fromBase58(ptr0, len0);
|
|
240
376
|
if (ret[2]) {
|
|
@@ -252,7 +388,7 @@ export class Digest {
|
|
|
252
388
|
* @returns {Digest}
|
|
253
389
|
*/
|
|
254
390
|
static fromBytes(bytes) {
|
|
255
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.
|
|
391
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
256
392
|
const len0 = WASM_VECTOR_LEN;
|
|
257
393
|
const ret = wasm.digest_fromBytes(ptr0, len0);
|
|
258
394
|
if (ret[2]) {
|
|
@@ -270,7 +406,7 @@ export class Digest {
|
|
|
270
406
|
* @returns {Digest}
|
|
271
407
|
*/
|
|
272
408
|
static fromHexString(s) {
|
|
273
|
-
const ptr0 = passStringToWasm0(s, wasm.
|
|
409
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
274
410
|
const len0 = WASM_VECTOR_LEN;
|
|
275
411
|
const ret = wasm.digest_fromHexString(ptr0, len0);
|
|
276
412
|
if (ret[2]) {
|
|
@@ -287,7 +423,7 @@ export class Digest {
|
|
|
287
423
|
* @param {Uint8Array} bytes
|
|
288
424
|
*/
|
|
289
425
|
constructor(bytes) {
|
|
290
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.
|
|
426
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
291
427
|
const len0 = WASM_VECTOR_LEN;
|
|
292
428
|
const ret = wasm.digest_new(ptr0, len0);
|
|
293
429
|
if (ret[2]) {
|
|
@@ -364,8 +500,8 @@ export class Fragment {
|
|
|
364
500
|
return BlobMeta.__wrap(ret);
|
|
365
501
|
}
|
|
366
502
|
/**
|
|
367
|
-
* Get the boundary
|
|
368
|
-
* @returns {
|
|
503
|
+
* Get the boundary commit identifiers of the fragment.
|
|
504
|
+
* @returns {CommitId[]}
|
|
369
505
|
*/
|
|
370
506
|
get boundary() {
|
|
371
507
|
const ret = wasm.fragment_boundary(this.__wbg_ptr);
|
|
@@ -374,29 +510,29 @@ export class Fragment {
|
|
|
374
510
|
return v1;
|
|
375
511
|
}
|
|
376
512
|
/**
|
|
377
|
-
* Get the head
|
|
378
|
-
* @returns {
|
|
513
|
+
* Get the head commit identifier of the fragment.
|
|
514
|
+
* @returns {CommitId}
|
|
379
515
|
*/
|
|
380
516
|
get head() {
|
|
381
517
|
const ret = wasm.fragment_head(this.__wbg_ptr);
|
|
382
|
-
return
|
|
518
|
+
return CommitId.__wrap(ret);
|
|
383
519
|
}
|
|
384
520
|
/**
|
|
385
521
|
* Create a new fragment from the given sedimentree ID, head, boundary, checkpoints, and blob metadata.
|
|
386
522
|
* @param {SedimentreeId} sedimentree_id
|
|
387
|
-
* @param {
|
|
388
|
-
* @param {
|
|
389
|
-
* @param {
|
|
523
|
+
* @param {CommitId} head
|
|
524
|
+
* @param {CommitId[]} boundary
|
|
525
|
+
* @param {CommitId[]} checkpoints
|
|
390
526
|
* @param {BlobMeta} blob_meta
|
|
391
527
|
*/
|
|
392
528
|
constructor(sedimentree_id, head, boundary, checkpoints, blob_meta) {
|
|
393
529
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
394
530
|
var ptr0 = sedimentree_id.__destroy_into_raw();
|
|
395
|
-
_assertClass(head,
|
|
531
|
+
_assertClass(head, CommitId);
|
|
396
532
|
var ptr1 = head.__destroy_into_raw();
|
|
397
|
-
const ptr2 = passArrayJsValueToWasm0(boundary, wasm.
|
|
533
|
+
const ptr2 = passArrayJsValueToWasm0(boundary, wasm.__wbindgen_export);
|
|
398
534
|
const len2 = WASM_VECTOR_LEN;
|
|
399
|
-
const ptr3 = passArrayJsValueToWasm0(checkpoints, wasm.
|
|
535
|
+
const ptr3 = passArrayJsValueToWasm0(checkpoints, wasm.__wbindgen_export);
|
|
400
536
|
const len3 = WASM_VECTOR_LEN;
|
|
401
537
|
_assertClass(blob_meta, BlobMeta);
|
|
402
538
|
var ptr4 = blob_meta.__destroy_into_raw();
|
|
@@ -536,7 +672,15 @@ export class LooseCommit {
|
|
|
536
672
|
return BlobMeta.__wrap(ret);
|
|
537
673
|
}
|
|
538
674
|
/**
|
|
539
|
-
* Get the
|
|
675
|
+
* Get the commit's head identifier.
|
|
676
|
+
* @returns {CommitId}
|
|
677
|
+
*/
|
|
678
|
+
get commitId() {
|
|
679
|
+
const ret = wasm.loosecommit_commitId(this.__wbg_ptr);
|
|
680
|
+
return CommitId.__wrap(ret);
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Get the digest of the commit (content hash).
|
|
540
684
|
* @returns {Digest}
|
|
541
685
|
*/
|
|
542
686
|
get digest() {
|
|
@@ -544,25 +688,28 @@ export class LooseCommit {
|
|
|
544
688
|
return Digest.__wrap(ret);
|
|
545
689
|
}
|
|
546
690
|
/**
|
|
547
|
-
* Create a new `LooseCommit` from the given sedimentree ID, parents, and blob metadata.
|
|
691
|
+
* Create a new `LooseCommit` from the given sedimentree ID, head, parents, and blob metadata.
|
|
548
692
|
* @param {SedimentreeId} sedimentree_id
|
|
549
|
-
* @param {
|
|
693
|
+
* @param {CommitId} head
|
|
694
|
+
* @param {CommitId[]} parents
|
|
550
695
|
* @param {BlobMeta} blob_meta
|
|
551
696
|
*/
|
|
552
|
-
constructor(sedimentree_id, parents, blob_meta) {
|
|
697
|
+
constructor(sedimentree_id, head, parents, blob_meta) {
|
|
553
698
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
554
699
|
var ptr0 = sedimentree_id.__destroy_into_raw();
|
|
555
|
-
|
|
556
|
-
|
|
700
|
+
_assertClass(head, CommitId);
|
|
701
|
+
var ptr1 = head.__destroy_into_raw();
|
|
702
|
+
const ptr2 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
|
|
703
|
+
const len2 = WASM_VECTOR_LEN;
|
|
557
704
|
_assertClass(blob_meta, BlobMeta);
|
|
558
|
-
const ret = wasm.loosecommit_new(ptr0, ptr1,
|
|
705
|
+
const ret = wasm.loosecommit_new(ptr0, ptr1, ptr2, len2, blob_meta.__wbg_ptr);
|
|
559
706
|
this.__wbg_ptr = ret >>> 0;
|
|
560
707
|
LooseCommitFinalization.register(this, this.__wbg_ptr, this);
|
|
561
708
|
return this;
|
|
562
709
|
}
|
|
563
710
|
/**
|
|
564
|
-
* Get the parent
|
|
565
|
-
* @returns {
|
|
711
|
+
* Get the parent commit identifiers.
|
|
712
|
+
* @returns {CommitId[]}
|
|
566
713
|
*/
|
|
567
714
|
get parents() {
|
|
568
715
|
const ret = wasm.loosecommit_parents(this.__wbg_ptr);
|
|
@@ -610,27 +757,27 @@ export class MemoryStorage {
|
|
|
610
757
|
return ret;
|
|
611
758
|
}
|
|
612
759
|
/**
|
|
613
|
-
* Delete a commit by
|
|
760
|
+
* Delete a single commit by its ID.
|
|
614
761
|
* @param {SedimentreeId} sedimentree_id
|
|
615
|
-
* @param {
|
|
762
|
+
* @param {CommitId} commit_id
|
|
616
763
|
* @returns {Promise<any>}
|
|
617
764
|
*/
|
|
618
|
-
deleteCommit(sedimentree_id,
|
|
765
|
+
deleteCommit(sedimentree_id, commit_id) {
|
|
619
766
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
620
|
-
_assertClass(
|
|
621
|
-
const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
767
|
+
_assertClass(commit_id, CommitId);
|
|
768
|
+
const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
|
|
622
769
|
return ret;
|
|
623
770
|
}
|
|
624
771
|
/**
|
|
625
|
-
* Delete a fragment by
|
|
772
|
+
* Delete a fragment by its identifier.
|
|
626
773
|
* @param {SedimentreeId} sedimentree_id
|
|
627
|
-
* @param {
|
|
774
|
+
* @param {CommitId} fragment_head
|
|
628
775
|
* @returns {Promise<any>}
|
|
629
776
|
*/
|
|
630
|
-
deleteFragment(sedimentree_id,
|
|
777
|
+
deleteFragment(sedimentree_id, fragment_head) {
|
|
631
778
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
632
|
-
_assertClass(
|
|
633
|
-
const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
779
|
+
_assertClass(fragment_head, CommitId);
|
|
780
|
+
const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
|
|
634
781
|
return ret;
|
|
635
782
|
}
|
|
636
783
|
/**
|
|
@@ -644,23 +791,23 @@ export class MemoryStorage {
|
|
|
644
791
|
return ret;
|
|
645
792
|
}
|
|
646
793
|
/**
|
|
647
|
-
* List all commit
|
|
794
|
+
* List all commit IDs for a sedimentree.
|
|
648
795
|
* @param {SedimentreeId} sedimentree_id
|
|
649
796
|
* @returns {Promise<any>}
|
|
650
797
|
*/
|
|
651
|
-
|
|
798
|
+
listCommitIds(sedimentree_id) {
|
|
652
799
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
653
|
-
const ret = wasm.
|
|
800
|
+
const ret = wasm.memorystorage_listCommitIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
|
|
654
801
|
return ret;
|
|
655
802
|
}
|
|
656
803
|
/**
|
|
657
|
-
* List all fragment
|
|
804
|
+
* List all fragment IDs for a sedimentree.
|
|
658
805
|
* @param {SedimentreeId} sedimentree_id
|
|
659
806
|
* @returns {Promise<any>}
|
|
660
807
|
*/
|
|
661
|
-
|
|
808
|
+
listFragmentIds(sedimentree_id) {
|
|
662
809
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
663
|
-
const ret = wasm.
|
|
810
|
+
const ret = wasm.memorystorage_listFragmentIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
|
|
664
811
|
return ret;
|
|
665
812
|
}
|
|
666
813
|
/**
|
|
@@ -692,27 +839,27 @@ export class MemoryStorage {
|
|
|
692
839
|
return ret;
|
|
693
840
|
}
|
|
694
841
|
/**
|
|
695
|
-
* Load a commit by
|
|
842
|
+
* Load a single commit by its ID, returning `CommitWithBlob` or null.
|
|
696
843
|
* @param {SedimentreeId} sedimentree_id
|
|
697
|
-
* @param {
|
|
844
|
+
* @param {CommitId} commit_id
|
|
698
845
|
* @returns {Promise<any>}
|
|
699
846
|
*/
|
|
700
|
-
loadCommit(sedimentree_id,
|
|
847
|
+
loadCommit(sedimentree_id, commit_id) {
|
|
701
848
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
702
|
-
_assertClass(
|
|
703
|
-
const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
849
|
+
_assertClass(commit_id, CommitId);
|
|
850
|
+
const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
|
|
704
851
|
return ret;
|
|
705
852
|
}
|
|
706
853
|
/**
|
|
707
|
-
* Load a fragment by
|
|
854
|
+
* Load a fragment by its identifier, returning `FragmentWithBlob` or null.
|
|
708
855
|
* @param {SedimentreeId} sedimentree_id
|
|
709
|
-
* @param {
|
|
856
|
+
* @param {CommitId} fragment_head
|
|
710
857
|
* @returns {Promise<any>}
|
|
711
858
|
*/
|
|
712
|
-
loadFragment(sedimentree_id,
|
|
859
|
+
loadFragment(sedimentree_id, fragment_head) {
|
|
713
860
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
714
|
-
_assertClass(
|
|
715
|
-
const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
861
|
+
_assertClass(fragment_head, CommitId);
|
|
862
|
+
const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
|
|
716
863
|
return ret;
|
|
717
864
|
}
|
|
718
865
|
/**
|
|
@@ -724,34 +871,55 @@ export class MemoryStorage {
|
|
|
724
871
|
MemoryStorageFinalization.register(this, this.__wbg_ptr, this);
|
|
725
872
|
return this;
|
|
726
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* Save commits and fragments in a single batch.
|
|
876
|
+
* @param {SedimentreeId} sedimentree_id
|
|
877
|
+
* @param {Array<any>} commits
|
|
878
|
+
* @param {Array<any>} fragments
|
|
879
|
+
* @returns {Promise<any>}
|
|
880
|
+
*/
|
|
881
|
+
saveBatchAll(sedimentree_id, commits, fragments) {
|
|
882
|
+
_assertClass(sedimentree_id, SedimentreeId);
|
|
883
|
+
const ret = wasm.memorystorage_saveBatchAll(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commits, fragments);
|
|
884
|
+
return ret;
|
|
885
|
+
}
|
|
727
886
|
/**
|
|
728
887
|
* Save a commit with its blob.
|
|
888
|
+
*
|
|
889
|
+
* The `commit_id` parameter must match the `head()` embedded in
|
|
890
|
+
* the signed commit payload. Returns an error if they differ.
|
|
891
|
+
*
|
|
892
|
+
* # Errors
|
|
893
|
+
*
|
|
894
|
+
* Returns a JS error if:
|
|
895
|
+
* - The signed payload cannot be decoded
|
|
896
|
+
* - The `commit_id` does not match the embedded `head()`
|
|
729
897
|
* @param {SedimentreeId} sedimentree_id
|
|
730
|
-
* @param {
|
|
898
|
+
* @param {CommitId} commit_id
|
|
731
899
|
* @param {SignedLooseCommit} signed_commit
|
|
732
900
|
* @param {Uint8Array} blob
|
|
733
901
|
* @returns {Promise<any>}
|
|
734
902
|
*/
|
|
735
|
-
saveCommit(sedimentree_id,
|
|
903
|
+
saveCommit(sedimentree_id, commit_id, signed_commit, blob) {
|
|
736
904
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
737
|
-
_assertClass(
|
|
905
|
+
_assertClass(commit_id, CommitId);
|
|
738
906
|
_assertClass(signed_commit, SignedLooseCommit);
|
|
739
|
-
const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
907
|
+
const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr, signed_commit.__wbg_ptr, blob);
|
|
740
908
|
return ret;
|
|
741
909
|
}
|
|
742
910
|
/**
|
|
743
911
|
* Save a fragment with its blob.
|
|
744
912
|
* @param {SedimentreeId} sedimentree_id
|
|
745
|
-
* @param {
|
|
913
|
+
* @param {CommitId} _fragment_head
|
|
746
914
|
* @param {SignedFragment} signed_fragment
|
|
747
915
|
* @param {Uint8Array} blob
|
|
748
916
|
* @returns {Promise<any>}
|
|
749
917
|
*/
|
|
750
|
-
saveFragment(sedimentree_id,
|
|
918
|
+
saveFragment(sedimentree_id, _fragment_head, signed_fragment, blob) {
|
|
751
919
|
_assertClass(sedimentree_id, SedimentreeId);
|
|
752
|
-
_assertClass(
|
|
920
|
+
_assertClass(_fragment_head, CommitId);
|
|
753
921
|
_assertClass(signed_fragment, SignedFragment);
|
|
754
|
-
const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr,
|
|
922
|
+
const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _fragment_head.__wbg_ptr, signed_fragment.__wbg_ptr, blob);
|
|
755
923
|
return ret;
|
|
756
924
|
}
|
|
757
925
|
/**
|
|
@@ -802,9 +970,9 @@ export class Sedimentree {
|
|
|
802
970
|
* @param {LooseCommit[]} commits
|
|
803
971
|
*/
|
|
804
972
|
constructor(fragments, commits) {
|
|
805
|
-
const ptr0 = passArrayJsValueToWasm0(fragments, wasm.
|
|
973
|
+
const ptr0 = passArrayJsValueToWasm0(fragments, wasm.__wbindgen_export);
|
|
806
974
|
const len0 = WASM_VECTOR_LEN;
|
|
807
|
-
const ptr1 = passArrayJsValueToWasm0(commits, wasm.
|
|
975
|
+
const ptr1 = passArrayJsValueToWasm0(commits, wasm.__wbindgen_export);
|
|
808
976
|
const len1 = WASM_VECTOR_LEN;
|
|
809
977
|
const ret = wasm.sedimentree_new(ptr0, len0, ptr1, len1);
|
|
810
978
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -853,7 +1021,7 @@ export class SedimentreeId {
|
|
|
853
1021
|
* @returns {SedimentreeId}
|
|
854
1022
|
*/
|
|
855
1023
|
static fromBytes(bytes) {
|
|
856
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.
|
|
1024
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
857
1025
|
const len0 = WASM_VECTOR_LEN;
|
|
858
1026
|
const ret = wasm.sedimentreeid_fromBytes(ptr0, len0);
|
|
859
1027
|
if (ret[2]) {
|
|
@@ -930,6 +1098,12 @@ export class SignedFragment {
|
|
|
930
1098
|
SignedFragmentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
931
1099
|
return obj;
|
|
932
1100
|
}
|
|
1101
|
+
static __unwrap(jsValue) {
|
|
1102
|
+
if (!(jsValue instanceof SignedFragment)) {
|
|
1103
|
+
return 0;
|
|
1104
|
+
}
|
|
1105
|
+
return jsValue.__destroy_into_raw();
|
|
1106
|
+
}
|
|
933
1107
|
__destroy_into_raw() {
|
|
934
1108
|
const ptr = this.__wbg_ptr;
|
|
935
1109
|
this.__wbg_ptr = 0;
|
|
@@ -1001,6 +1175,12 @@ export class SignedLooseCommit {
|
|
|
1001
1175
|
SignedLooseCommitFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1002
1176
|
return obj;
|
|
1003
1177
|
}
|
|
1178
|
+
static __unwrap(jsValue) {
|
|
1179
|
+
if (!(jsValue instanceof SignedLooseCommit)) {
|
|
1180
|
+
return 0;
|
|
1181
|
+
}
|
|
1182
|
+
return jsValue.__destroy_into_raw();
|
|
1183
|
+
}
|
|
1004
1184
|
__destroy_into_raw() {
|
|
1005
1185
|
const ptr = this.__wbg_ptr;
|
|
1006
1186
|
this.__wbg_ptr = 0;
|
|
@@ -1064,24 +1244,31 @@ if (Symbol.dispose) SignedLooseCommit.prototype[Symbol.dispose] = SignedLooseCom
|
|
|
1064
1244
|
function __wbg_get_imports() {
|
|
1065
1245
|
const import0 = {
|
|
1066
1246
|
__proto__: null,
|
|
1067
|
-
|
|
1068
|
-
const ret = arg0.
|
|
1069
|
-
_assertClass(ret,
|
|
1247
|
+
__wbg___wasm_refgen_toWasmCommitId_65b818e358f27de6: function(arg0) {
|
|
1248
|
+
const ret = arg0.__wasm_refgen_toWasmCommitId();
|
|
1249
|
+
_assertClass(ret, CommitId);
|
|
1070
1250
|
var ptr1 = ret.__destroy_into_raw();
|
|
1071
1251
|
return ptr1;
|
|
1072
1252
|
},
|
|
1073
|
-
|
|
1253
|
+
__wbg___wasm_refgen_toWasmFragment_38ddb9958dbdc455: function(arg0) {
|
|
1074
1254
|
const ret = arg0.__wasm_refgen_toWasmFragment();
|
|
1075
1255
|
_assertClass(ret, Fragment);
|
|
1076
1256
|
var ptr1 = ret.__destroy_into_raw();
|
|
1077
1257
|
return ptr1;
|
|
1078
1258
|
},
|
|
1079
|
-
|
|
1259
|
+
__wbg___wasm_refgen_toWasmLooseCommit_876edb05490f6350: function(arg0) {
|
|
1080
1260
|
const ret = arg0.__wasm_refgen_toWasmLooseCommit();
|
|
1081
1261
|
_assertClass(ret, LooseCommit);
|
|
1082
1262
|
var ptr1 = ret.__destroy_into_raw();
|
|
1083
1263
|
return ptr1;
|
|
1084
1264
|
},
|
|
1265
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
1266
|
+
const ret = debugString(arg1);
|
|
1267
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1268
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1269
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1270
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1271
|
+
},
|
|
1085
1272
|
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
1086
1273
|
const ret = typeof(arg0) === 'function';
|
|
1087
1274
|
return ret;
|
|
@@ -1106,26 +1293,42 @@ function __wbg_get_imports() {
|
|
|
1106
1293
|
const ret = arg0.call(arg1, arg2);
|
|
1107
1294
|
return ret;
|
|
1108
1295
|
}, arguments); },
|
|
1109
|
-
|
|
1110
|
-
const ret =
|
|
1296
|
+
__wbg_commitid_new: function(arg0) {
|
|
1297
|
+
const ret = CommitId.__wrap(arg0);
|
|
1111
1298
|
return ret;
|
|
1112
1299
|
},
|
|
1113
|
-
|
|
1114
|
-
const ret =
|
|
1300
|
+
__wbg_commitwithblob_new: function(arg0) {
|
|
1301
|
+
const ret = CommitWithBlob.__wrap(arg0);
|
|
1115
1302
|
return ret;
|
|
1116
1303
|
},
|
|
1117
1304
|
__wbg_fragmentwithblob_new: function(arg0) {
|
|
1118
1305
|
const ret = FragmentWithBlob.__wrap(arg0);
|
|
1119
1306
|
return ret;
|
|
1120
1307
|
},
|
|
1308
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
1309
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1310
|
+
return ret;
|
|
1311
|
+
}, arguments); },
|
|
1312
|
+
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
1313
|
+
const ret = arg0[arg1 >>> 0];
|
|
1314
|
+
return ret;
|
|
1315
|
+
},
|
|
1121
1316
|
__wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
|
|
1122
1317
|
const ret = Number.isSafeInteger(arg0);
|
|
1123
1318
|
return ret;
|
|
1124
1319
|
},
|
|
1320
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
1321
|
+
const ret = arg0.length;
|
|
1322
|
+
return ret;
|
|
1323
|
+
},
|
|
1125
1324
|
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
1126
1325
|
const ret = arg0.length;
|
|
1127
1326
|
return ret;
|
|
1128
1327
|
},
|
|
1328
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
1329
|
+
const ret = new Uint8Array(arg0);
|
|
1330
|
+
return ret;
|
|
1331
|
+
},
|
|
1129
1332
|
__wbg_new_a70fbab9066b301f: function() {
|
|
1130
1333
|
const ret = new Array();
|
|
1131
1334
|
return ret;
|
|
@@ -1145,7 +1348,7 @@ function __wbg_get_imports() {
|
|
|
1145
1348
|
const a = state0.a;
|
|
1146
1349
|
state0.a = 0;
|
|
1147
1350
|
try {
|
|
1148
|
-
return
|
|
1351
|
+
return __wasm_bindgen_func_elem_563_75(a, state0.b, arg0, arg1);
|
|
1149
1352
|
} finally {
|
|
1150
1353
|
state0.a = a;
|
|
1151
1354
|
}
|
|
@@ -1181,6 +1384,14 @@ function __wbg_get_imports() {
|
|
|
1181
1384
|
__wbg_set_name_7ef37fe858379aaf: function(arg0, arg1, arg2) {
|
|
1182
1385
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
1183
1386
|
},
|
|
1387
|
+
__wbg_signedfragment_unwrap: function(arg0) {
|
|
1388
|
+
const ret = SignedFragment.__unwrap(arg0);
|
|
1389
|
+
return ret;
|
|
1390
|
+
},
|
|
1391
|
+
__wbg_signedloosecommit_unwrap: function(arg0) {
|
|
1392
|
+
const ret = SignedLooseCommit.__unwrap(arg0);
|
|
1393
|
+
return ret;
|
|
1394
|
+
},
|
|
1184
1395
|
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
1185
1396
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1186
1397
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
@@ -1202,8 +1413,8 @@ function __wbg_get_imports() {
|
|
|
1202
1413
|
return ret;
|
|
1203
1414
|
},
|
|
1204
1415
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1205
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1206
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1416
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 73, function: Function { arguments: [Externref], shim_idx: 136, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1417
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_400, __wasm_bindgen_func_elem_563);
|
|
1207
1418
|
return ret;
|
|
1208
1419
|
},
|
|
1209
1420
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -1232,15 +1443,15 @@ function __wbg_get_imports() {
|
|
|
1232
1443
|
};
|
|
1233
1444
|
}
|
|
1234
1445
|
|
|
1235
|
-
function
|
|
1236
|
-
const ret = wasm.
|
|
1446
|
+
function __wasm_bindgen_func_elem_563(arg0, arg1, arg2) {
|
|
1447
|
+
const ret = wasm.__wasm_bindgen_func_elem_563(arg0, arg1, arg2);
|
|
1237
1448
|
if (ret[1]) {
|
|
1238
1449
|
throw takeFromExternrefTable0(ret[0]);
|
|
1239
1450
|
}
|
|
1240
1451
|
}
|
|
1241
1452
|
|
|
1242
|
-
function
|
|
1243
|
-
wasm.
|
|
1453
|
+
function __wasm_bindgen_func_elem_563_75(arg0, arg1, arg2, arg3) {
|
|
1454
|
+
wasm.__wasm_bindgen_func_elem_563_75(arg0, arg1, arg2, arg3);
|
|
1244
1455
|
}
|
|
1245
1456
|
|
|
1246
1457
|
const MemoryStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1249,6 +1460,9 @@ const MemoryStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1249
1460
|
const BlobMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1250
1461
|
? { register: () => {}, unregister: () => {} }
|
|
1251
1462
|
: new FinalizationRegistry(ptr => wasm.__wbg_blobmeta_free(ptr >>> 0, 1));
|
|
1463
|
+
const CommitIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1464
|
+
? { register: () => {}, unregister: () => {} }
|
|
1465
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_commitid_free(ptr >>> 0, 1));
|
|
1252
1466
|
const CommitWithBlobFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1253
1467
|
? { register: () => {}, unregister: () => {} }
|
|
1254
1468
|
: new FinalizationRegistry(ptr => wasm.__wbg_commitwithblob_free(ptr >>> 0, 1));
|
|
@@ -1287,7 +1501,7 @@ const SignedLooseCommitFinalization = (typeof FinalizationRegistry === 'undefine
|
|
|
1287
1501
|
: new FinalizationRegistry(ptr => wasm.__wbg_signedloosecommit_free(ptr >>> 0, 1));
|
|
1288
1502
|
|
|
1289
1503
|
function addToExternrefTable0(obj) {
|
|
1290
|
-
const idx = wasm.
|
|
1504
|
+
const idx = wasm.__wbindgen_export4();
|
|
1291
1505
|
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1292
1506
|
return idx;
|
|
1293
1507
|
}
|
|
@@ -1302,6 +1516,71 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
|
1302
1516
|
? { register: () => {}, unregister: () => {} }
|
|
1303
1517
|
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
1304
1518
|
|
|
1519
|
+
function debugString(val) {
|
|
1520
|
+
// primitive types
|
|
1521
|
+
const type = typeof val;
|
|
1522
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1523
|
+
return `${val}`;
|
|
1524
|
+
}
|
|
1525
|
+
if (type == 'string') {
|
|
1526
|
+
return `"${val}"`;
|
|
1527
|
+
}
|
|
1528
|
+
if (type == 'symbol') {
|
|
1529
|
+
const description = val.description;
|
|
1530
|
+
if (description == null) {
|
|
1531
|
+
return 'Symbol';
|
|
1532
|
+
} else {
|
|
1533
|
+
return `Symbol(${description})`;
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
if (type == 'function') {
|
|
1537
|
+
const name = val.name;
|
|
1538
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1539
|
+
return `Function(${name})`;
|
|
1540
|
+
} else {
|
|
1541
|
+
return 'Function';
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
// objects
|
|
1545
|
+
if (Array.isArray(val)) {
|
|
1546
|
+
const length = val.length;
|
|
1547
|
+
let debug = '[';
|
|
1548
|
+
if (length > 0) {
|
|
1549
|
+
debug += debugString(val[0]);
|
|
1550
|
+
}
|
|
1551
|
+
for(let i = 1; i < length; i++) {
|
|
1552
|
+
debug += ', ' + debugString(val[i]);
|
|
1553
|
+
}
|
|
1554
|
+
debug += ']';
|
|
1555
|
+
return debug;
|
|
1556
|
+
}
|
|
1557
|
+
// Test for built-in
|
|
1558
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1559
|
+
let className;
|
|
1560
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1561
|
+
className = builtInMatches[1];
|
|
1562
|
+
} else {
|
|
1563
|
+
// Failed to match the standard '[object ClassName]'
|
|
1564
|
+
return toString.call(val);
|
|
1565
|
+
}
|
|
1566
|
+
if (className == 'Object') {
|
|
1567
|
+
// we're a user defined class or Object
|
|
1568
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1569
|
+
// easier than looping through ownProperties of `val`.
|
|
1570
|
+
try {
|
|
1571
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1572
|
+
} catch (_) {
|
|
1573
|
+
return 'Object';
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
// errors
|
|
1577
|
+
if (val instanceof Error) {
|
|
1578
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1579
|
+
}
|
|
1580
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1581
|
+
return className;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1305
1584
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1306
1585
|
ptr = ptr >>> 0;
|
|
1307
1586
|
const mem = getDataViewMemory0();
|
|
@@ -1344,7 +1623,7 @@ function handleError(f, args) {
|
|
|
1344
1623
|
return f.apply(this, args);
|
|
1345
1624
|
} catch (e) {
|
|
1346
1625
|
const idx = addToExternrefTable0(e);
|
|
1347
|
-
wasm.
|
|
1626
|
+
wasm.__wbindgen_export3(idx);
|
|
1348
1627
|
}
|
|
1349
1628
|
}
|
|
1350
1629
|
|
|
@@ -1436,7 +1715,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
1436
1715
|
|
|
1437
1716
|
function takeFromExternrefTable0(idx) {
|
|
1438
1717
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1439
|
-
wasm.
|
|
1718
|
+
wasm.__wbindgen_export5(idx);
|
|
1440
1719
|
return value;
|
|
1441
1720
|
}
|
|
1442
1721
|
|