@loro-dev/flock 2.1.1 → 3.0.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/README.md +8 -8
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/_moon_flock.d.ts +3 -3
- package/src/_moon_flock.ts +1128 -1114
- package/src/index.ts +40 -46
package/dist/index.d.mts
CHANGED
|
@@ -31,8 +31,7 @@ type ExportBundle = {
|
|
|
31
31
|
type EntryClock = {
|
|
32
32
|
physicalTime: number;
|
|
33
33
|
logicalCounter: number;
|
|
34
|
-
|
|
35
|
-
peerId: Uint8Array;
|
|
34
|
+
peerId: string;
|
|
36
35
|
};
|
|
37
36
|
type ExportPayload = {
|
|
38
37
|
data?: Value;
|
|
@@ -111,12 +110,12 @@ type EventBatch = {
|
|
|
111
110
|
};
|
|
112
111
|
declare class Flock {
|
|
113
112
|
private inner;
|
|
114
|
-
constructor(peerId?:
|
|
113
|
+
constructor(peerId?: string);
|
|
115
114
|
private static fromInner;
|
|
116
|
-
static fromJson(bundle: ExportBundle, peerId:
|
|
115
|
+
static fromJson(bundle: ExportBundle, peerId: string): Flock;
|
|
117
116
|
static checkConsistency(a: Flock, b: Flock): boolean;
|
|
118
117
|
checkInvariants(): void;
|
|
119
|
-
setPeerId(peerId:
|
|
118
|
+
setPeerId(peerId: string): void;
|
|
120
119
|
private putWithMetaInternal;
|
|
121
120
|
private putWithMetaWithHooks;
|
|
122
121
|
/**
|
|
@@ -148,7 +147,7 @@ declare class Flock {
|
|
|
148
147
|
importJson(bundle: ExportBundle): ImportReport;
|
|
149
148
|
importJson(options: ImportOptions): Promise<ImportReport>;
|
|
150
149
|
getMaxPhysicalTime(): number;
|
|
151
|
-
peerId():
|
|
150
|
+
peerId(): string;
|
|
152
151
|
digest(): string;
|
|
153
152
|
kvToJson(): ExportBundle;
|
|
154
153
|
putMvr(key: KeyPart[], value: Value, now?: number): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,8 +31,7 @@ type ExportBundle = {
|
|
|
31
31
|
type EntryClock = {
|
|
32
32
|
physicalTime: number;
|
|
33
33
|
logicalCounter: number;
|
|
34
|
-
|
|
35
|
-
peerId: Uint8Array;
|
|
34
|
+
peerId: string;
|
|
36
35
|
};
|
|
37
36
|
type ExportPayload = {
|
|
38
37
|
data?: Value;
|
|
@@ -111,12 +110,12 @@ type EventBatch = {
|
|
|
111
110
|
};
|
|
112
111
|
declare class Flock {
|
|
113
112
|
private inner;
|
|
114
|
-
constructor(peerId?:
|
|
113
|
+
constructor(peerId?: string);
|
|
115
114
|
private static fromInner;
|
|
116
|
-
static fromJson(bundle: ExportBundle, peerId:
|
|
115
|
+
static fromJson(bundle: ExportBundle, peerId: string): Flock;
|
|
117
116
|
static checkConsistency(a: Flock, b: Flock): boolean;
|
|
118
117
|
checkInvariants(): void;
|
|
119
|
-
setPeerId(peerId:
|
|
118
|
+
setPeerId(peerId: string): void;
|
|
120
119
|
private putWithMetaInternal;
|
|
121
120
|
private putWithMetaWithHooks;
|
|
122
121
|
/**
|
|
@@ -148,7 +147,7 @@ declare class Flock {
|
|
|
148
147
|
importJson(bundle: ExportBundle): ImportReport;
|
|
149
148
|
importJson(options: ImportOptions): Promise<ImportReport>;
|
|
150
149
|
getMaxPhysicalTime(): number;
|
|
151
|
-
peerId():
|
|
150
|
+
peerId(): string;
|
|
152
151
|
digest(): string;
|
|
153
152
|
kvToJson(): ExportBundle;
|
|
154
153
|
putMvr(key: KeyPart[], value: Value, now?: number): void;
|