@loro-dev/flock-wasm 0.1.2 → 0.1.3
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/base64/flock_wasm.js +19 -14
- package/base64/index.d.ts +11 -6
- package/base64/index.js +11 -6
- package/base64/wasm.js +1 -1
- package/bundler/flock_wasm.d.ts +16 -11
- package/bundler/flock_wasm_bg.js +19 -14
- package/bundler/flock_wasm_bg.wasm +0 -0
- package/bundler/index.d.ts +11 -6
- package/bundler/index.js +11 -6
- package/nodejs/flock_wasm.d.ts +16 -11
- package/nodejs/flock_wasm.js +19 -14
- package/nodejs/flock_wasm_bg.wasm +0 -0
- package/nodejs/index.d.ts +11 -6
- package/nodejs/index.js +11 -6
- package/package.json +2 -1
- package/web/flock_wasm.d.ts +16 -11
- package/web/flock_wasm.js +19 -14
- package/web/flock_wasm_bg.wasm +0 -0
- package/web/index.d.ts +11 -6
- package/web/index.js +11 -6
package/base64/flock_wasm.js
CHANGED
|
@@ -197,16 +197,6 @@ function debugString(val) {
|
|
|
197
197
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
|
-
/**
|
|
201
|
-
* Initializes the WASM module.
|
|
202
|
-
*
|
|
203
|
-
* This function is automatically called when the WASM module is loaded.
|
|
204
|
-
* It sets up the panic hook to route Rust panics to the JavaScript console.
|
|
205
|
-
*/
|
|
206
|
-
export function start() {
|
|
207
|
-
wasm.start();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
200
|
/**
|
|
211
201
|
* Drains the pending callback queue, invoking all enqueued callbacks.
|
|
212
202
|
*
|
|
@@ -220,6 +210,16 @@ export function callPendingEvents() {
|
|
|
220
210
|
wasm.callPendingEvents();
|
|
221
211
|
}
|
|
222
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Initializes the WASM module.
|
|
215
|
+
*
|
|
216
|
+
* This function is automatically called when the WASM module is loaded.
|
|
217
|
+
* It sets up the panic hook to route Rust panics to the JavaScript console.
|
|
218
|
+
*/
|
|
219
|
+
export function start() {
|
|
220
|
+
wasm.start();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
223
|
function takeFromExternrefTable0(idx) {
|
|
224
224
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
225
225
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -430,8 +430,11 @@ export class RawFlock {
|
|
|
430
430
|
/**
|
|
431
431
|
* Returns the inclusive version vector for this flock.
|
|
432
432
|
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
433
|
+
* This vector tracks max seen clocks per peer for the current process
|
|
434
|
+
* lifetime (open/import/local writes), including peers that may no longer
|
|
435
|
+
* own visible entries.
|
|
436
|
+
*
|
|
437
|
+
* Use this vector for completeness checks, not incremental export baselines.
|
|
435
438
|
*
|
|
436
439
|
* # Errors
|
|
437
440
|
*
|
|
@@ -617,8 +620,10 @@ export class RawFlock {
|
|
|
617
620
|
/**
|
|
618
621
|
* Returns the exclusive version vector for this flock.
|
|
619
622
|
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
623
|
+
* This vector only includes peers that currently own at least one visible
|
|
624
|
+
* entry (excluding tombstones and shadowed entries).
|
|
625
|
+
*
|
|
626
|
+
* Use this vector as the baseline for incremental export/replication.
|
|
622
627
|
*
|
|
623
628
|
* # Errors
|
|
624
629
|
*
|
package/base64/index.d.ts
CHANGED
|
@@ -156,18 +156,23 @@ export declare class Flock {
|
|
|
156
156
|
getEntry(key: KeyPart[]): EntryInfo | undefined;
|
|
157
157
|
merge(other: Flock): void;
|
|
158
158
|
/**
|
|
159
|
-
* Returns the exclusive version vector
|
|
160
|
-
*
|
|
161
|
-
*
|
|
159
|
+
* Returns the exclusive/visible version vector.
|
|
160
|
+
*
|
|
161
|
+
* Only peers that currently own at least one visible entry are included.
|
|
162
|
+
* This vector is consistent with current visible state and is the correct
|
|
163
|
+
* baseline for incremental export/replication.
|
|
162
164
|
*
|
|
163
165
|
* Use this version when sending to other peers for incremental sync.
|
|
164
166
|
*/
|
|
165
167
|
version(): VersionVector;
|
|
166
168
|
/**
|
|
167
|
-
* Returns the inclusive version vector
|
|
168
|
-
*
|
|
169
|
+
* Returns the inclusive/max-seen version vector.
|
|
170
|
+
*
|
|
171
|
+
* Tracks max seen clocks per peer for this process lifetime
|
|
172
|
+
* (open/import/local writes), including peers that may no longer own visible
|
|
173
|
+
* entries.
|
|
169
174
|
*
|
|
170
|
-
* Use this version
|
|
175
|
+
* Use this version for completeness checks, not incremental export baselines.
|
|
171
176
|
*/
|
|
172
177
|
inclusiveVersion(): VersionVector;
|
|
173
178
|
private exportJsonInternal;
|
package/base64/index.js
CHANGED
|
@@ -650,9 +650,11 @@ export class Flock {
|
|
|
650
650
|
void this.inner.merge(other.inner);
|
|
651
651
|
}
|
|
652
652
|
/**
|
|
653
|
-
* Returns the exclusive version vector
|
|
654
|
-
*
|
|
655
|
-
*
|
|
653
|
+
* Returns the exclusive/visible version vector.
|
|
654
|
+
*
|
|
655
|
+
* Only peers that currently own at least one visible entry are included.
|
|
656
|
+
* This vector is consistent with current visible state and is the correct
|
|
657
|
+
* baseline for incremental export/replication.
|
|
656
658
|
*
|
|
657
659
|
* Use this version when sending to other peers for incremental sync.
|
|
658
660
|
*/
|
|
@@ -660,10 +662,13 @@ export class Flock {
|
|
|
660
662
|
return decodeVersionVectorFromRaw(this.inner.version());
|
|
661
663
|
}
|
|
662
664
|
/**
|
|
663
|
-
* Returns the inclusive version vector
|
|
664
|
-
*
|
|
665
|
+
* Returns the inclusive/max-seen version vector.
|
|
666
|
+
*
|
|
667
|
+
* Tracks max seen clocks per peer for this process lifetime
|
|
668
|
+
* (open/import/local writes), including peers that may no longer own visible
|
|
669
|
+
* entries.
|
|
665
670
|
*
|
|
666
|
-
* Use this version
|
|
671
|
+
* Use this version for completeness checks, not incremental export baselines.
|
|
667
672
|
*/
|
|
668
673
|
inclusiveVersion() {
|
|
669
674
|
return decodeVersionVectorFromRaw(this.inner.inclusiveVersion());
|