@fluid-experimental/property-changeset 0.59.2000 → 0.59.3000-67119
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/changeset.d.ts.map +1 -1
- package/dist/changeset.js +50 -50
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +22 -22
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.js +3 -3
- package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +21 -21
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.js +2 -2
- package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pathHelper.js.map +1 -1
- package/dist/rebase.js +6 -6
- package/dist/rebase.js.map +1 -1
- package/dist/templateSchema.d.ts.map +1 -1
- package/dist/templateSchema.js +1 -0
- package/dist/templateSchema.js.map +1 -1
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +32 -32
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +40 -40
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +147 -147
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/reversibleCs.spec.js +2 -2
- package/dist/test/reversibleCs.spec.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1660
- package/dist/test/validator/templateSyntax.spec.js +29 -29
- package/dist/test/validator/templateSyntax.spec.js.map +1 -1
- package/dist/test/validator/templateValidator.spec.js +202 -202
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/test/validator/typeidHelper.spec.js +39 -39
- package/dist/test/validator/typeidHelper.spec.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +41 -41
- package/dist/utils.js.map +1 -1
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/pathHelper.js.map +1 -1
- package/lib/rebase.js.map +1 -1
- package/lib/templateSchema.js +1 -0
- package/lib/templateSchema.js.map +1 -1
- package/lib/templateValidator.js +1 -1
- package/lib/templateValidator.js.map +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +4 -4
|
@@ -85,7 +85,7 @@ const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_
|
|
|
85
85
|
throw new Error(`getRangeForCurrentStateOperation: ${MSG.UNKNOWN_OPERATION}`);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
const getOpLength = (op) => isNumber_1.default(op[1]) ? op[1] : op[1].length;
|
|
88
|
+
const getOpLength = (op) => (0, isNumber_1.default)(op[1]) ? op[1] : op[1].length;
|
|
89
89
|
/**
|
|
90
90
|
* computes the impact range for a given operation of the applied change set
|
|
91
91
|
* @param in_operation the op
|
|
@@ -163,13 +163,13 @@ const getRangeForAppliedOperation = function (in_operation, io_resultingRange, i
|
|
|
163
163
|
*/
|
|
164
164
|
const _splitArrayParameter = function (in_firstResult, in_secondResult, in_data, in_start) {
|
|
165
165
|
let firstTmp;
|
|
166
|
-
if (isString_1.default(in_data[1])) {
|
|
166
|
+
if ((0, isString_1.default)(in_data[1])) {
|
|
167
167
|
firstTmp = in_data[1].substr(0, in_start);
|
|
168
168
|
in_secondResult[1] = in_data[1].substr(in_start);
|
|
169
169
|
if (in_firstResult) {
|
|
170
170
|
in_firstResult[1] = firstTmp;
|
|
171
171
|
}
|
|
172
|
-
if (in_data[2] !== undefined && isString_1.default(in_data[2])) {
|
|
172
|
+
if (in_data[2] !== undefined && (0, isString_1.default)(in_data[2])) {
|
|
173
173
|
firstTmp = in_data[2].substr(0, in_start);
|
|
174
174
|
in_secondResult[2] = in_data[2].substr(in_start);
|
|
175
175
|
if (in_firstResult) {
|
|
@@ -334,7 +334,7 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
|
|
|
334
334
|
operationMetaInfo.currentInsertOffset;
|
|
335
335
|
rangeLength = operationMetaInfo.rebasedRemoveInsertRanges[i].rangeLength;
|
|
336
336
|
if (io_rangeA.op.operation[1].length - startOffset >= rangeLength &&
|
|
337
|
-
isEqual_1.default(io_rangeA.op.operation[1].slice(startOffset, startOffset + rangeLength), io_rangeB.op.operation[1].slice(rangeStart, rangeStart + rangeLength))) {
|
|
337
|
+
(0, isEqual_1.default)(io_rangeA.op.operation[1].slice(startOffset, startOffset + rangeLength), io_rangeB.op.operation[1].slice(rangeStart, rangeStart + rangeLength))) {
|
|
338
338
|
matchFound = true;
|
|
339
339
|
// If we have an remove / insert operation in the range A we have to make sure,
|
|
340
340
|
// the insert happens at the correct position within the remove range after canceling
|
|
@@ -357,7 +357,7 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
|
|
|
357
357
|
}
|
|
358
358
|
else {
|
|
359
359
|
if (io_rangeA.op.operation[1].length === rangeLength &&
|
|
360
|
-
isEqual_1.default(io_rangeA.op.operation[1], io_rangeB.op.operation[1])) {
|
|
360
|
+
(0, isEqual_1.default)(io_rangeA.op.operation[1], io_rangeB.op.operation[1])) {
|
|
361
361
|
matchFound = true;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -445,7 +445,7 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
|
|
|
445
445
|
io_rangeA.end === io_rangeB.begin) {
|
|
446
446
|
if (in_options && in_options.applyAfterMetaInformation) {
|
|
447
447
|
let length = io_rangeB.op.operation[1];
|
|
448
|
-
if (!isNumber_1.default(length)) {
|
|
448
|
+
if (!(0, isNumber_1.default)(length)) {
|
|
449
449
|
length = length.length;
|
|
450
450
|
}
|
|
451
451
|
in_options.applyAfterMetaInformation.set(io_rangeB.op.operation[1], {
|
|
@@ -594,7 +594,7 @@ const mergeWithLastIfPossible = function (in_op, io_changeset, in_targetIndex, i
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
// merge with last insert
|
|
597
|
-
if (isString_1.default(in_op.operation[1])) {
|
|
597
|
+
if ((0, isString_1.default)(in_op.operation[1])) {
|
|
598
598
|
for (let i = 0; i < in_op.operation[1].length; i++) {
|
|
599
599
|
lastOp[1] += in_op.operation[1][i];
|
|
600
600
|
}
|
|
@@ -678,7 +678,7 @@ const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_las
|
|
|
678
678
|
}
|
|
679
679
|
switch (in_op.type) {
|
|
680
680
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT: {
|
|
681
|
-
if (in_options && in_options.applyAfterMetaInformation && !isNumber_1.default(in_op.operation[1])) {
|
|
681
|
+
if (in_options && in_options.applyAfterMetaInformation && !(0, isNumber_1.default)(in_op.operation[1])) {
|
|
682
682
|
// If we don't have any meta information yet, we add an entry with the correct offset applied
|
|
683
683
|
const metaInfo = in_options.applyAfterMetaInformation.get(in_op.operation[1]);
|
|
684
684
|
if (!metaInfo) {
|
|
@@ -747,7 +747,7 @@ const handleCombinations = function (in_segment, in_isPrimitiveType) {
|
|
|
747
747
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE: {
|
|
748
748
|
// Attention: B removes A completely, kill A to avoid zero inserts
|
|
749
749
|
let opBLen;
|
|
750
|
-
if (isNumber_1.default(opB.operation[1])) {
|
|
750
|
+
if ((0, isNumber_1.default)(opB.operation[1])) {
|
|
751
751
|
opBLen = opB.operation[1];
|
|
752
752
|
}
|
|
753
753
|
else {
|
|
@@ -908,7 +908,7 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
908
908
|
if (in_options && in_options.applyAfterMetaInformation) {
|
|
909
909
|
let length;
|
|
910
910
|
const insertEntries = opB.operation[1];
|
|
911
|
-
if (!isNumber_1.default(insertEntries)) {
|
|
911
|
+
if (!(0, isNumber_1.default)(insertEntries)) {
|
|
912
912
|
length = insertEntries.length;
|
|
913
913
|
in_options.applyAfterMetaInformation.set(insertEntries, {
|
|
914
914
|
rebasedRemoveInsertRanges: [{
|
|
@@ -927,7 +927,7 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
927
927
|
const conflict = {
|
|
928
928
|
path: in_basePath,
|
|
929
929
|
type: changesetConflictTypes_1.ConflictType.INSERTED_ENTRY_WITH_SAME_KEY,
|
|
930
|
-
conflictingChange: fastest_json_copy_1.copy(baseOp),
|
|
930
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(baseOp),
|
|
931
931
|
};
|
|
932
932
|
out_conflicts.push(conflict);
|
|
933
933
|
// move to the right side of the insert
|
|
@@ -976,13 +976,13 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
976
976
|
// Remove already in A, no need to add the same again -> write nop
|
|
977
977
|
let opBLen;
|
|
978
978
|
let opALen;
|
|
979
|
-
if (isNumber_1.default(opB.operation[1])) {
|
|
979
|
+
if ((0, isNumber_1.default)(opB.operation[1])) {
|
|
980
980
|
opBLen = opB.operation[1];
|
|
981
981
|
}
|
|
982
982
|
else {
|
|
983
983
|
opBLen = opB.operation[1].length;
|
|
984
984
|
}
|
|
985
|
-
if (isNumber_1.default(opA.operation[1])) {
|
|
985
|
+
if ((0, isNumber_1.default)(opA.operation[1])) {
|
|
986
986
|
opALen = opA.operation[1];
|
|
987
987
|
}
|
|
988
988
|
else {
|
|
@@ -1005,7 +1005,7 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
1005
1005
|
let conflict = {
|
|
1006
1006
|
path: in_basePath,
|
|
1007
1007
|
type: changesetConflictTypes_1.ConflictType.ENTRY_MODIFIED_AFTER_REMOVE,
|
|
1008
|
-
conflictingChange: fastest_json_copy_1.copy(opB),
|
|
1008
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(opB),
|
|
1009
1009
|
};
|
|
1010
1010
|
out_conflicts.push(conflict);
|
|
1011
1011
|
}
|
|
@@ -1027,7 +1027,7 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
1027
1027
|
let conflict = {
|
|
1028
1028
|
path: in_basePath,
|
|
1029
1029
|
type: changesetConflictTypes_1.ConflictType.COLLIDING_SET,
|
|
1030
|
-
conflictingChange: fastest_json_copy_1.copy(opB),
|
|
1030
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(opB),
|
|
1031
1031
|
};
|
|
1032
1032
|
out_conflicts.push(conflict);
|
|
1033
1033
|
// If opB new value is same as opA new value, replace the modify with a NOP
|
|
@@ -1051,7 +1051,7 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
1051
1051
|
let conflict = {
|
|
1052
1052
|
path: in_basePath,
|
|
1053
1053
|
type: changesetConflictTypes_1.ConflictType.REMOVE_AFTER_MODIFY,
|
|
1054
|
-
conflictingChange: fastest_json_copy_1.copy(opB),
|
|
1054
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(opB),
|
|
1055
1055
|
};
|
|
1056
1056
|
out_conflicts.push(conflict);
|
|
1057
1057
|
}
|
|
@@ -1142,8 +1142,8 @@ var ChangeSetArrayFunctions;
|
|
|
1142
1142
|
*/
|
|
1143
1143
|
function _performApplyAfterOnPropertyArray(io_basePropertyChanges, in_appliedPropertyChanges, in_typeid, in_options) {
|
|
1144
1144
|
property_common_1.ConsoleUtils.assert(in_typeid, "_performApplyAfterOnPropertyArray: typeid missing");
|
|
1145
|
-
property_common_1.ConsoleUtils.assert(!isString_1.default(io_basePropertyChanges), io_basePropertyChanges);
|
|
1146
|
-
property_common_1.ConsoleUtils.assert(!isString_1.default(in_appliedPropertyChanges), in_appliedPropertyChanges);
|
|
1145
|
+
property_common_1.ConsoleUtils.assert(!(0, isString_1.default)(io_basePropertyChanges), io_basePropertyChanges);
|
|
1146
|
+
property_common_1.ConsoleUtils.assert(!(0, isString_1.default)(in_appliedPropertyChanges), in_appliedPropertyChanges);
|
|
1147
1147
|
const isPrimitiveTypeid = isPrimitiveType(in_typeid);
|
|
1148
1148
|
// Iterator to process the changes in the ChangeSet in the correct order
|
|
1149
1149
|
const iteratorA = new arrayChangesetIterator_1.ArrayChangeSetIterator((io_basePropertyChanges));
|
|
@@ -1435,13 +1435,13 @@ var ChangeSetArrayFunctions;
|
|
|
1435
1435
|
* @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
|
|
1436
1436
|
*/
|
|
1437
1437
|
function _rebaseChangeSetForString(in_ownPropertyChangeSet, io_rebasePropertyChangeSetParent, in_key, in_basePath, out_conflicts, in_options) {
|
|
1438
|
-
if (isString_1.default(io_rebasePropertyChangeSetParent[in_key]) || (io_rebasePropertyChangeSetParent[in_key] &&
|
|
1438
|
+
if ((0, isString_1.default)(io_rebasePropertyChangeSetParent[in_key]) || (io_rebasePropertyChangeSetParent[in_key] &&
|
|
1439
1439
|
io_rebasePropertyChangeSetParent[in_key].hasOwnProperty("value"))) {
|
|
1440
1440
|
// other overwrites any old changes, we ignore them and report the conflict
|
|
1441
1441
|
let conflict = {
|
|
1442
1442
|
path: in_basePath,
|
|
1443
1443
|
type: changesetConflictTypes_1.ConflictType.COLLIDING_SET,
|
|
1444
|
-
conflictingChange: fastest_json_copy_1.copy(in_ownPropertyChangeSet),
|
|
1444
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(in_ownPropertyChangeSet),
|
|
1445
1445
|
};
|
|
1446
1446
|
out_conflicts.push(conflict);
|
|
1447
1447
|
// If value is the same, delete the entry
|
|
@@ -1457,14 +1457,14 @@ var ChangeSetArrayFunctions;
|
|
|
1457
1457
|
delete io_rebasePropertyChangeSetParent[in_key];
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
else if (isString_1.default(in_ownPropertyChangeSet) || (in_ownPropertyChangeSet &&
|
|
1460
|
+
else if ((0, isString_1.default)(in_ownPropertyChangeSet) || (in_ownPropertyChangeSet &&
|
|
1461
1461
|
in_ownPropertyChangeSet.hasOwnProperty("value"))) {
|
|
1462
1462
|
// we have a conflict since we cannot allow insert/remove/modify on an unknown state
|
|
1463
1463
|
// we just ignore other's modifications and take own's set
|
|
1464
1464
|
let conflict = {
|
|
1465
1465
|
path: in_basePath,
|
|
1466
1466
|
type: changesetConflictTypes_1.ConflictType.COLLIDING_SET,
|
|
1467
|
-
conflictingChange: fastest_json_copy_1.copy(io_rebasePropertyChangeSetParent[in_key]),
|
|
1467
|
+
conflictingChange: (0, fastest_json_copy_1.copy)(io_rebasePropertyChangeSetParent[in_key]),
|
|
1468
1468
|
};
|
|
1469
1469
|
out_conflicts.push(conflict);
|
|
1470
1470
|
io_rebasePropertyChangeSetParent[in_key] = in_ownPropertyChangeSet;
|