@cr_docs_t/dts 0.21.0 → 0.22.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.
|
@@ -106,9 +106,9 @@ export class FugueList {
|
|
|
106
106
|
* @param value - Value to insert
|
|
107
107
|
*/
|
|
108
108
|
insertMultiple(index, value) {
|
|
109
|
-
if (value.length
|
|
109
|
+
if (value.length === 0)
|
|
110
110
|
return;
|
|
111
|
-
if (value.length
|
|
111
|
+
if (value.length === 1) {
|
|
112
112
|
this.insert(index, value);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -229,7 +229,7 @@ export class FugueList {
|
|
|
229
229
|
deleteMultiple(index, count) {
|
|
230
230
|
if (count <= 0)
|
|
231
231
|
return;
|
|
232
|
-
if (count
|
|
232
|
+
if (count === 1) {
|
|
233
233
|
this.delete(index);
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
@@ -297,7 +297,7 @@ export class FugueList {
|
|
|
297
297
|
*/
|
|
298
298
|
singleEffect(msg) {
|
|
299
299
|
const { replicaId, operation, data, position } = msg;
|
|
300
|
-
if (replicaId
|
|
300
|
+
if (replicaId === this.totalOrder.getReplicaId())
|
|
301
301
|
return;
|
|
302
302
|
switch (operation) {
|
|
303
303
|
case Operation.INSERT:
|
|
@@ -319,7 +319,7 @@ export class FugueList {
|
|
|
319
319
|
// Separate operations
|
|
320
320
|
for (const msg of msgs) {
|
|
321
321
|
const { replicaId, operation, position, data } = msg;
|
|
322
|
-
if (replicaId
|
|
322
|
+
if (replicaId === this.totalOrder.getReplicaId())
|
|
323
323
|
continue;
|
|
324
324
|
switch (operation) {
|
|
325
325
|
case Operation.INSERT:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/dts/Serailizers/Fugue/Message.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,gBAAgB,EAInB,MAAM,yBAAyB,CAAC;AAEjC,iBAAS,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,2BAEhD;AAED,iBAAS,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAM/D;
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/dts/Serailizers/Fugue/Message.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,gBAAgB,EAInB,MAAM,yBAAyB,CAAC;AAEjC,iBAAS,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,2BAEhD;AAED,iBAAS,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAM/D;AAoDD,eAAO,MAAM,sBAAsB;;;CAGlC,CAAC"}
|
|
@@ -14,7 +14,7 @@ function toTuple(msg) {
|
|
|
14
14
|
// Check if msg is of FugueJoinMessage type
|
|
15
15
|
switch (msg.operation) {
|
|
16
16
|
case Operation.JOIN:
|
|
17
|
-
return [msg.operation, msg.documentID, msg.state, msg.userIdentity, msg.collaborators];
|
|
17
|
+
return [msg.operation, msg.documentID, msg.state, msg.userIdentity, msg.collaborators, msg.offlineChanges];
|
|
18
18
|
case Operation.INSERT:
|
|
19
19
|
case Operation.DELETE:
|
|
20
20
|
return [msg.operation, msg.documentID, msg.replicaId, msg.position, msg.data, msg.userIdentity];
|
|
@@ -33,7 +33,8 @@ function fromTuple(tuple) {
|
|
|
33
33
|
documentID: tuple[1],
|
|
34
34
|
state: tuple[2],
|
|
35
35
|
userIdentity: tuple[3],
|
|
36
|
-
collaborators: tuple[4]
|
|
36
|
+
collaborators: tuple[4],
|
|
37
|
+
offlineChanges: tuple[5]
|
|
37
38
|
};
|
|
38
39
|
case Operation.INSERT:
|
|
39
40
|
case Operation.DELETE:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/types/Fugue/Message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,oBAAY,SAAS;IACjB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,KAAK,IAAA;CACR;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,CAAC;IACZ,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/types/Fugue/Message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,oBAAY,SAAS;IACjB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,KAAK,IAAA;CACR;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,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