@fluid-experimental/property-changeset 2.0.0-rc.2.0.2 → 2.0.0-rc.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/dist/ajvFactory.cjs +19 -0
- package/dist/ajvFactory.cjs.map +1 -0
- package/dist/ajvFactory.d.cts +7 -0
- package/dist/ajvFactory.d.cts.map +1 -0
- package/dist/changeset.d.ts +3 -6
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +75 -75
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts +6 -2
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +94 -96
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.d.ts +2 -5
- package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.js +11 -12
- package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
- package/dist/changeset_operations/changesetConflictTypes.js +2 -2
- package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts +1 -4
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +48 -49
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.d.ts +1 -4
- package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.js +9 -9
- package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/dist/helpers/typeidHelper.d.ts +0 -3
- package/dist/helpers/typeidHelper.d.ts.map +1 -1
- package/dist/helpers/typeidHelper.js +10 -10
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/isReservedKeyword.d.ts.map +1 -1
- package/dist/isReservedKeyword.js +2 -2
- package/dist/isReservedKeyword.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/pathHelper.d.ts +0 -3
- package/dist/pathHelper.d.ts.map +1 -1
- package/dist/pathHelper.js +2 -2
- package/dist/pathHelper.js.map +1 -1
- package/dist/rebase.js +8 -8
- package/dist/rebase.js.map +1 -1
- package/dist/templateSchema.d.ts.map +1 -1
- package/dist/templateSchema.js +2 -2
- package/dist/templateSchema.js.map +1 -1
- package/dist/templateValidator.d.ts +1 -1
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +49 -54
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +34 -36
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/indexedCollection.spec.js +9 -6
- package/dist/test/indexedCollection.spec.js.map +1 -1
- package/dist/test/map.spec.js +4 -4
- package/dist/test/map.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +185 -185
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/reversibleCs.spec.js +5 -5
- package/dist/test/reversibleCs.spec.js.map +1 -1
- package/dist/test/schemaValidator.js +12 -11
- package/dist/test/schemaValidator.js.map +1 -1
- package/dist/test/schemas/badBothPropertiesAndTypeid.js +18 -18
- package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
- package/dist/test/schemas/badInvalidSemverInTypeid.js +40 -40
- package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badMissingSemverInTypeid.js +40 -40
- package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badNestedProperties.js +40 -40
- package/dist/test/schemas/badNestedProperties.js.map +1 -1
- package/dist/test/schemas/badPrimitiveTypeid.js +25 -25
- package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/schemas/badVersionedTypeid.js +41 -41
- package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
- package/dist/test/schemas/goodColorPalette.js +15 -15
- package/dist/test/schemas/goodColorPalette.js.map +1 -1
- package/dist/test/schemas/goodDraftAsVersion.js +12 -12
- package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
- package/dist/test/schemas/goodPointId.js +40 -40
- package/dist/test/schemas/goodPointId.js.map +1 -1
- package/dist/test/schemas/goodReferenceAndRegular.js +16 -16
- package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
- package/dist/test/schemas/goodReservedTypes.js +22 -22
- package/dist/test/schemas/goodReservedTypes.js.map +1 -1
- package/dist/test/schemas/goodUIBorder.js +34 -34
- package/dist/test/schemas/goodUIBorder.js.map +1 -1
- package/dist/test/schemas/index.js +55 -0
- package/dist/test/schemas/index.js.map +1 -0
- package/dist/test/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/test/validator/templateSyntax.spec.js +20 -25
- package/dist/test/validator/templateSyntax.spec.js.map +1 -1
- package/dist/test/validator/templateValidator.spec.js +118 -89
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/test/validator/typeidHelper.spec.js +42 -41
- package/dist/test/validator/typeidHelper.spec.js.map +1 -1
- package/dist/utils.d.ts +17 -13
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +79 -79
- package/dist/utils.js.map +1 -1
- package/dist/validationResultBuilder.d.ts +2 -1
- package/dist/validationResultBuilder.d.ts.map +1 -1
- package/dist/validationResultBuilder.js.map +1 -1
- package/lib/ajvFactory.cjs +19 -0
- package/lib/ajvFactory.cjs.map +1 -0
- package/lib/ajvFactory.d.cts +7 -0
- package/lib/ajvFactory.d.cts.map +1 -0
- package/lib/changeset.d.ts +3 -6
- package/lib/changeset.d.ts.map +1 -1
- package/lib/changeset.js +16 -16
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.d.ts +6 -2
- package/lib/changeset_operations/array.d.ts.map +1 -1
- package/lib/changeset_operations/array.js +7 -9
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.d.ts +2 -5
- package/lib/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.js +3 -4
- package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/lib/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
- package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.d.ts +1 -4
- package/lib/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +10 -11
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/changeset_operations/isEmptyChangeset.d.ts +1 -4
- package/lib/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
- package/lib/changeset_operations/isEmptyChangeset.js +3 -3
- package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/lib/helpers/typeidHelper.d.ts +0 -3
- package/lib/helpers/typeidHelper.d.ts.map +1 -1
- package/lib/helpers/typeidHelper.js +1 -1
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/index.d.ts +8 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -8
- package/lib/index.js.map +1 -1
- package/lib/isReservedKeyword.d.ts.map +1 -1
- package/lib/isReservedKeyword.js.map +1 -1
- package/lib/pathHelper.d.ts +0 -3
- package/lib/pathHelper.d.ts.map +1 -1
- package/lib/pathHelper.js.map +1 -1
- package/lib/rebase.js +2 -2
- package/lib/rebase.js.map +1 -1
- package/lib/templateSchema.d.ts.map +1 -1
- package/lib/templateSchema.js.map +1 -1
- package/lib/templateValidator.d.ts +1 -1
- package/lib/templateValidator.d.ts.map +1 -1
- package/lib/templateValidator.js +24 -29
- package/lib/templateValidator.js.map +1 -1
- package/lib/test/array.spec.js +768 -0
- package/lib/test/array.spec.js.map +1 -0
- package/lib/test/indexedCollection.spec.js +75 -0
- package/lib/test/indexedCollection.spec.js.map +1 -0
- package/lib/test/map.spec.js +17 -0
- package/lib/test/map.spec.js.map +1 -0
- package/lib/test/pathHelper.spec.js +435 -0
- package/lib/test/pathHelper.spec.js.map +1 -0
- package/lib/test/reversibleCs.spec.js +42 -0
- package/lib/test/reversibleCs.spec.js.map +1 -0
- package/lib/test/schemaValidator.js +103 -0
- package/lib/test/schemaValidator.js.map +1 -0
- package/lib/test/schemas/badBothPropertiesAndTypeid.js +24 -0
- package/lib/test/schemas/badBothPropertiesAndTypeid.js.map +1 -0
- package/lib/test/schemas/badInvalidSemverInTypeid.js +46 -0
- package/lib/test/schemas/badInvalidSemverInTypeid.js.map +1 -0
- package/lib/test/schemas/badMissingSemverInTypeid.js +46 -0
- package/lib/test/schemas/badMissingSemverInTypeid.js.map +1 -0
- package/lib/test/schemas/badNestedProperties.js +46 -0
- package/lib/test/schemas/badNestedProperties.js.map +1 -0
- package/lib/test/schemas/badPrimitiveTypeid.js +31 -0
- package/lib/test/schemas/badPrimitiveTypeid.js.map +1 -0
- package/lib/test/schemas/badVersionedTypeid.js +47 -0
- package/lib/test/schemas/badVersionedTypeid.js.map +1 -0
- package/lib/test/schemas/goodColorPalette.js +21 -0
- package/lib/test/schemas/goodColorPalette.js.map +1 -0
- package/lib/test/schemas/goodDraftAsVersion.js +18 -0
- package/lib/test/schemas/goodDraftAsVersion.js.map +1 -0
- package/lib/test/schemas/goodPointId.js +46 -0
- package/lib/test/schemas/goodPointId.js.map +1 -0
- package/lib/test/schemas/goodReferenceAndRegular.js +22 -0
- package/lib/test/schemas/goodReferenceAndRegular.js.map +1 -0
- package/lib/test/schemas/goodReservedTypes.js +29 -0
- package/lib/test/schemas/goodReservedTypes.js.map +1 -0
- package/lib/test/schemas/goodUIBorder.js +41 -0
- package/lib/test/schemas/goodUIBorder.js.map +1 -0
- package/lib/test/schemas/index.js +29 -0
- package/lib/test/schemas/index.js.map +1 -0
- package/lib/test/tsconfig.tsbuildinfo +1 -0
- package/lib/test/validator/templateSyntax.spec.js +83 -0
- package/lib/test/validator/templateSyntax.spec.js.map +1 -0
- package/lib/test/validator/templateValidator.spec.js +1022 -0
- package/lib/test/validator/templateValidator.spec.js.map +1 -0
- package/lib/test/validator/typeidHelper.spec.js +142 -0
- package/lib/test/validator/typeidHelper.spec.js.map +1 -0
- package/lib/utils.d.ts +17 -13
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +23 -23
- package/lib/utils.js.map +1 -1
- package/lib/validationResultBuilder.d.ts +2 -1
- package/lib/validationResultBuilder.d.ts.map +1 -1
- package/lib/validationResultBuilder.js.map +1 -1
- package/package.json +37 -16
- package/dist/test/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ajvFactory = void 0;
|
|
11
|
+
const ajv_1 = __importDefault(require("ajv"));
|
|
12
|
+
const ajv_keywords_1 = __importDefault(require("ajv-keywords"));
|
|
13
|
+
exports.ajvFactory = new ajv_1.default({
|
|
14
|
+
allErrors: true,
|
|
15
|
+
verbose: true,
|
|
16
|
+
});
|
|
17
|
+
(0, ajv_keywords_1.default)(exports.ajvFactory, "prohibited");
|
|
18
|
+
(0, ajv_keywords_1.default)(exports.ajvFactory, "typeof");
|
|
19
|
+
//# sourceMappingURL=ajvFactory.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ajvFactory.cjs","sourceRoot":"","sources":["../src/ajvFactory.cts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,8CAAsB;AACtB,gEAAuC;AAE1B,QAAA,UAAU,GAAG,IAAI,aAAG,CAAC;IACjC,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,IAAA,sBAAW,EAAC,kBAAU,EAAE,YAAY,CAAC,CAAC;AACtC,IAAA,sBAAW,EAAC,kBAAU,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport Ajv from \"ajv\";\nimport ajvKeywords from \"ajv-keywords\";\n\nexport const ajvFactory = new Ajv({\n\tallErrors: true,\n\tverbose: true,\n});\n\najvKeywords(ajvFactory, \"prohibited\");\najvKeywords(ajvFactory, \"typeof\");\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ajvFactory.d.cts","sourceRoot":"","sources":["../src/ajvFactory.cts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,UAAU,KAGrB,CAAC"}
|
package/dist/changeset.d.ts
CHANGED
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { ChangeSetArrayFunctions } from "./changeset_operations/array";
|
|
9
|
-
import { ConflictType } from "./changeset_operations/changesetConflictTypes";
|
|
10
|
-
import { ChangeSetIndexedCollectionFunctions } from "./changeset_operations/indexedCollection";
|
|
5
|
+
import { ChangeSetArrayFunctions } from "./changeset_operations/array.js";
|
|
6
|
+
import { ConflictType } from "./changeset_operations/changesetConflictTypes.js";
|
|
7
|
+
import { ChangeSetIndexedCollectionFunctions } from "./changeset_operations/indexedCollection.js";
|
|
11
8
|
export interface ApplyChangeSetOptions {
|
|
12
9
|
/**
|
|
13
10
|
* Additional meta information which help later to obtain more compact changeset during the apply operation.
|
package/dist/changeset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../src/changeset.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../src/changeset.ts"],"names":[],"mappings":"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"}
|
package/dist/changeset.js
CHANGED
|
@@ -3,35 +3,35 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* @fileoverview Serialized representation of the changes in a repository
|
|
8
|
-
*/
|
|
9
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
8
|
};
|
|
12
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
10
|
exports.ChangeSet = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @fileoverview Serialized representation of the changes in a repository
|
|
13
|
+
*/
|
|
14
|
+
const property_common_1 = require("@fluid-experimental/property-common");
|
|
16
15
|
const fastest_json_copy_1 = require("fastest-json-copy");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
16
|
+
const each_js_1 = __importDefault(require("lodash/each.js"));
|
|
17
|
+
const extend_js_1 = __importDefault(require("lodash/extend.js"));
|
|
18
|
+
const isEmpty_js_1 = __importDefault(require("lodash/isEmpty.js"));
|
|
19
|
+
const isObject_js_1 = __importDefault(require("lodash/isObject.js"));
|
|
20
|
+
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
20
21
|
// @ts-ignore
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const arrayChangesetIterator_1 = require("./changeset_operations/arrayChangesetIterator");
|
|
25
|
-
const changesetConflictTypes_1 = require("./changeset_operations/changesetConflictTypes");
|
|
22
|
+
const array_js_1 = require("./changeset_operations/array.js");
|
|
23
|
+
const arrayChangesetIterator_js_1 = require("./changeset_operations/arrayChangesetIterator.js");
|
|
24
|
+
const changesetConflictTypes_js_1 = require("./changeset_operations/changesetConflictTypes.js");
|
|
26
25
|
// Add the indexed collection functions into the prototype of the ChangeSet
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
26
|
+
const indexedCollection_js_1 = require("./changeset_operations/indexedCollection.js");
|
|
27
|
+
const isEmptyChangeset_js_1 = require("./changeset_operations/isEmptyChangeset.js");
|
|
28
|
+
const operationTypes_js_1 = require("./changeset_operations/operationTypes.js");
|
|
29
|
+
const typeidHelper_js_1 = require("./helpers/typeidHelper.js");
|
|
30
|
+
const isReservedKeyword_js_1 = require("./isReservedKeyword.js");
|
|
31
|
+
const templateValidator_js_1 = require("./templateValidator.js");
|
|
32
|
+
const utils_js_1 = require("./utils.js");
|
|
33
33
|
const { PROPERTY_PATH_DELIMITER, MSG } = property_common_1.constants;
|
|
34
|
-
const { extractContext, isPrimitiveType } =
|
|
34
|
+
const { extractContext, isPrimitiveType } = typeidHelper_js_1.TypeIdHelper;
|
|
35
35
|
/**
|
|
36
36
|
* The ChangeSet represents an operation to be done (or that was done) on the data. It encapsulate one or
|
|
37
37
|
* many addition/insertion and deletion of properties. The ChangeSetObject also provides functionality
|
|
@@ -47,7 +47,7 @@ class ChangeSet {
|
|
|
47
47
|
if (in_changes === undefined || in_changes === null) {
|
|
48
48
|
this._changes = {};
|
|
49
49
|
}
|
|
50
|
-
else if ((0,
|
|
50
|
+
else if ((0, isString_js_1.default)(in_changes)) {
|
|
51
51
|
// Stringified Serialized JSON
|
|
52
52
|
this._changes = JSON.parse(in_changes);
|
|
53
53
|
}
|
|
@@ -115,8 +115,8 @@ class ChangeSet {
|
|
|
115
115
|
if (in_changeSet instanceof ChangeSet) {
|
|
116
116
|
changes = in_changeSet.getSerializedChangeSet();
|
|
117
117
|
}
|
|
118
|
-
if (!(0,
|
|
119
|
-
const oldValue = (0,
|
|
118
|
+
if (!(0, isObject_js_1.default)(this._changes) || Array.isArray(this._changes)) {
|
|
119
|
+
const oldValue = (0, isObject_js_1.default)(changes) && changes.value !== undefined
|
|
120
120
|
? changes.value
|
|
121
121
|
: changes;
|
|
122
122
|
this._changes = Array.isArray(oldValue) ? oldValue.slice() : oldValue;
|
|
@@ -142,9 +142,9 @@ class ChangeSet {
|
|
|
142
142
|
in_appliedPropertyChanges.remove) {
|
|
143
143
|
this._performApplyAfterOnPropertyIndexedCollection(io_basePropertyChanges, in_appliedPropertyChanges, "NodeProperty", in_options); // TODO: recursively propagate the typeid?
|
|
144
144
|
}
|
|
145
|
-
if (!(0,
|
|
145
|
+
if (!(0, isEmpty_js_1.default)(in_appliedPropertyChanges.insertTemplates)) {
|
|
146
146
|
io_basePropertyChanges.insertTemplates = io_basePropertyChanges.insertTemplates || {};
|
|
147
|
-
(0,
|
|
147
|
+
(0, extend_js_1.default)(io_basePropertyChanges.insertTemplates, in_appliedPropertyChanges.insertTemplates);
|
|
148
148
|
}
|
|
149
149
|
// Apply ChangeSet to the properties
|
|
150
150
|
const modifiedTypeids = Object.keys(in_appliedPropertyChanges);
|
|
@@ -161,7 +161,7 @@ class ChangeSet {
|
|
|
161
161
|
this.performApplyAfterOnPropertyWithTypeid(changedKeys[j], baseChanges, in_appliedPropertyChanges[typeid], typeid, in_removeEmpty, in_options);
|
|
162
162
|
}
|
|
163
163
|
// Remove the type when it no longer contains any changed keys
|
|
164
|
-
if (in_removeEmpty && (0,
|
|
164
|
+
if (in_removeEmpty && (0, isEmpty_js_1.default)(io_basePropertyChanges[typeid])) {
|
|
165
165
|
delete io_basePropertyChanges[typeid];
|
|
166
166
|
}
|
|
167
167
|
}
|
|
@@ -212,7 +212,7 @@ class ChangeSet {
|
|
|
212
212
|
in_baseChanges[in_changedKey] = in_baseChanges[in_changedKey] || {};
|
|
213
213
|
this._performApplyAfterOnPropertyIndexedCollection(in_baseChanges[in_changedKey], in_appliedPropertyChanges[in_changedKey], splitTypeid.typeid, in_options);
|
|
214
214
|
// Remove the key, when it no longer contains a changeset
|
|
215
|
-
if (in_removeEmpty && (0,
|
|
215
|
+
if (in_removeEmpty && (0, isEmpty_js_1.default)(in_baseChanges[in_changedKey])) {
|
|
216
216
|
delete in_baseChanges[in_changedKey];
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -222,7 +222,7 @@ class ChangeSet {
|
|
|
222
222
|
let baseIsSetChange = false;
|
|
223
223
|
let oldValue;
|
|
224
224
|
if (splitTypeid.typeid === "String" &&
|
|
225
|
-
((0,
|
|
225
|
+
((0, isString_js_1.default)(in_baseChanges[in_changedKey]) ||
|
|
226
226
|
(in_baseChanges[in_changedKey] &&
|
|
227
227
|
in_baseChanges[in_changedKey].hasOwnProperty("value")))) {
|
|
228
228
|
oldValue = in_baseChanges[in_changedKey].oldValue;
|
|
@@ -240,10 +240,10 @@ class ChangeSet {
|
|
|
240
240
|
baseIsSetChange = true;
|
|
241
241
|
}
|
|
242
242
|
let appliedChanges = in_appliedPropertyChanges[in_changedKey];
|
|
243
|
-
if ((0,
|
|
243
|
+
if ((0, isObject_js_1.default)(appliedChanges) && appliedChanges.hasOwnProperty("value")) {
|
|
244
244
|
appliedChanges = appliedChanges.value;
|
|
245
245
|
}
|
|
246
|
-
if (splitTypeid.typeid === "String" && (0,
|
|
246
|
+
if (splitTypeid.typeid === "String" && (0, isString_js_1.default)(appliedChanges)) {
|
|
247
247
|
// we've got a 'set' command and just overwrite the changes
|
|
248
248
|
in_baseChanges[in_changedKey] =
|
|
249
249
|
baseIsSetChange && oldValue !== undefined
|
|
@@ -259,7 +259,7 @@ class ChangeSet {
|
|
|
259
259
|
if (baseIsSetChange) {
|
|
260
260
|
// we have to convert back to a string, if it had been converted before
|
|
261
261
|
let newValue;
|
|
262
|
-
newValue = (0,
|
|
262
|
+
newValue = (0, isEmpty_js_1.default)(in_baseChanges[in_changedKey])
|
|
263
263
|
? ""
|
|
264
264
|
: in_baseChanges[in_changedKey].insert[0][1];
|
|
265
265
|
in_baseChanges[in_changedKey] =
|
|
@@ -349,18 +349,18 @@ class ChangeSet {
|
|
|
349
349
|
false, // don't use square brackets (use dots instead)
|
|
350
350
|
out_conflicts, in_options);
|
|
351
351
|
}
|
|
352
|
-
if (!(0,
|
|
352
|
+
if (!(0, isEmpty_js_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
|
|
353
353
|
const typeids = Object.keys(io_rebasePropertyChangeSet.insertTemplates);
|
|
354
354
|
const templateMismatchChangeSet = { insertTemplates: {} };
|
|
355
355
|
const templateMismatchConflict = {
|
|
356
356
|
type: ChangeSet.ConflictType.MISMATCH_TEMPLATES,
|
|
357
357
|
conflictingChange: templateMismatchChangeSet,
|
|
358
358
|
};
|
|
359
|
-
(0,
|
|
359
|
+
(0, each_js_1.default)(typeids, function (typeid) {
|
|
360
360
|
const template = io_rebasePropertyChangeSet.insertTemplates[typeid];
|
|
361
361
|
if (in_ownPropertyChangeSet.insertTemplates &&
|
|
362
362
|
in_ownPropertyChangeSet.insertTemplates[typeid]) {
|
|
363
|
-
const isEqual =
|
|
363
|
+
const isEqual = templateValidator_js_1.TemplateValidator.Utils.psetDeepEquals(template, in_ownPropertyChangeSet.insertTemplates[template.typeid]);
|
|
364
364
|
if (!isEqual) {
|
|
365
365
|
if (in_options && in_options.throwOnTemplateMismatch) {
|
|
366
366
|
throw new Error(MSG.TEMPLATE_MISMATCH + typeid);
|
|
@@ -374,10 +374,10 @@ class ChangeSet {
|
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
// Remove insertTemplates key if it is empty
|
|
377
|
-
if ((0,
|
|
377
|
+
if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
|
|
378
378
|
delete io_rebasePropertyChangeSet.insertTemplates;
|
|
379
379
|
}
|
|
380
|
-
if (!(0,
|
|
380
|
+
if (!(0, isEmpty_js_1.default)(templateMismatchConflict.conflictingChange.insertTemplates)) {
|
|
381
381
|
out_conflicts.push(templateMismatchConflict);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -400,7 +400,7 @@ class ChangeSet {
|
|
|
400
400
|
for (let z = 0; z < tempPaths.length; z++) {
|
|
401
401
|
if (tempPaths[z] in io_rebasePropertyChangeSet.modify[tempTypeid]) {
|
|
402
402
|
let rebasedPropContent = io_rebasePropertyChangeSet.modify[tempTypeid][tempPaths[z]];
|
|
403
|
-
if ((0,
|
|
403
|
+
if ((0, isObject_js_1.default)(rebasedPropContent) &&
|
|
404
404
|
"oldValue" in rebasedPropContent) {
|
|
405
405
|
rebasedPropContent.oldValue =
|
|
406
406
|
in_ownPropertyChangeSet.modify[tempTypeid][tempPaths[z]].value;
|
|
@@ -418,7 +418,7 @@ class ChangeSet {
|
|
|
418
418
|
if (typeid in io_rebasePropertyChangeSet &&
|
|
419
419
|
paths[j] in io_rebasePropertyChangeSet[typeid]) {
|
|
420
420
|
let rebasedPropContent = io_rebasePropertyChangeSet[typeid][paths[j]];
|
|
421
|
-
if ((0,
|
|
421
|
+
if ((0, isObject_js_1.default)(rebasedPropContent) && "oldValue" in rebasedPropContent) {
|
|
422
422
|
// if oldValue already be update above, we don't need to update
|
|
423
423
|
if (io_rebasePropertyChangeSet[typeid][paths[j]].oldValue !==
|
|
424
424
|
in_ownPropertyChangeSet[typeid][paths[j]].value) {
|
|
@@ -451,17 +451,17 @@ class ChangeSet {
|
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
// Remove the typeid, when it no longer contains any keys
|
|
454
|
-
if ((0,
|
|
454
|
+
if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[typeid][paths[j]])) {
|
|
455
455
|
delete io_rebasePropertyChangeSet[typeid][paths[j]];
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
// Remove the typeid, when it no longer contains any keys
|
|
459
|
-
if ((0,
|
|
459
|
+
if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[typeid])) {
|
|
460
460
|
delete io_rebasePropertyChangeSet[typeid];
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
// If there were conflicts in the set operations, report them
|
|
464
|
-
if (!(0,
|
|
464
|
+
if (!(0, isEmpty_js_1.default)(changeSet)) {
|
|
465
465
|
const conflict = {
|
|
466
466
|
path: in_basePath,
|
|
467
467
|
type: ChangeSet.ConflictType.COLLIDING_SET,
|
|
@@ -496,21 +496,21 @@ class ChangeSet {
|
|
|
496
496
|
this._rebaseIndexedCollectionChangeSetForProperty(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet[in_key], in_basePath, splitTypeid.typeid, true, // use square brackets
|
|
497
497
|
out_conflicts, in_options);
|
|
498
498
|
// Remove the key, when it no longer contains a changeset
|
|
499
|
-
if (in_removeEmpty && (0,
|
|
499
|
+
if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
|
|
500
500
|
delete io_rebasePropertyChangeSet[in_key];
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
else if (splitTypeid.context === "array") {
|
|
504
504
|
this._rebaseArrayChangeSetForProperty(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet[in_key], in_basePath, out_conflicts, splitTypeid.typeid, in_options);
|
|
505
505
|
// Remove the key, when it no longer contains a changeset
|
|
506
|
-
if (in_removeEmpty && (0,
|
|
506
|
+
if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
|
|
507
507
|
delete io_rebasePropertyChangeSet[in_key];
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
else if (splitTypeid.typeid === "String") {
|
|
511
511
|
this._rebaseChangeSetForString(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet, in_key, in_basePath, out_conflicts, in_options);
|
|
512
512
|
// Remove the key, when it no longer contains a changeset
|
|
513
|
-
if (in_removeEmpty && (0,
|
|
513
|
+
if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
|
|
514
514
|
delete io_rebasePropertyChangeSet[in_key];
|
|
515
515
|
}
|
|
516
516
|
}
|
|
@@ -572,10 +572,10 @@ class ChangeSet {
|
|
|
572
572
|
}
|
|
573
573
|
let oldValue = current;
|
|
574
574
|
// store it in reversibleChangeSet
|
|
575
|
-
if (type === "String" && !(0,
|
|
575
|
+
if (type === "String" && !(0, isString_js_1.default)(nestedChangeset)) {
|
|
576
576
|
// String is a special case
|
|
577
577
|
let oldString;
|
|
578
|
-
if ((0,
|
|
578
|
+
if ((0, isString_js_1.default)(oldValue)) {
|
|
579
579
|
oldString = oldValue;
|
|
580
580
|
}
|
|
581
581
|
if (nestedChangeset.modify) {
|
|
@@ -591,7 +591,7 @@ class ChangeSet {
|
|
|
591
591
|
let entry = nestedChangeset.remove[i];
|
|
592
592
|
let entryOffset = entry[0];
|
|
593
593
|
let removeRangeLength = entry[1];
|
|
594
|
-
if ((0,
|
|
594
|
+
if ((0, isString_js_1.default)(removeRangeLength)) {
|
|
595
595
|
removeRangeLength = entry[1].length;
|
|
596
596
|
}
|
|
597
597
|
entry[1] = oldString.slice(entryOffset, entryOffset + removeRangeLength);
|
|
@@ -741,8 +741,8 @@ class ChangeSet {
|
|
|
741
741
|
*/
|
|
742
742
|
_toReversibleChangeSet(in_oldSerializedState) {
|
|
743
743
|
property_common_1.ConsoleUtils.assert(in_oldSerializedState !== undefined, `${MSG.ASSERTION_FAILED}Missing function parameter "in_oldSerializedState" of "_toReversibleChangeSet".`);
|
|
744
|
-
if (!(0,
|
|
745
|
-
if (!(0,
|
|
744
|
+
if (!(0, isObject_js_1.default)(in_oldSerializedState) || Array.isArray(in_oldSerializedState)) {
|
|
745
|
+
if (!(0, isObject_js_1.default)(this._changes) || Array.isArray(this._changes)) {
|
|
746
746
|
this._changes = {
|
|
747
747
|
oldValue: Array.isArray(in_oldSerializedState)
|
|
748
748
|
? in_oldSerializedState.slice()
|
|
@@ -758,7 +758,7 @@ class ChangeSet {
|
|
|
758
758
|
}
|
|
759
759
|
else {
|
|
760
760
|
const workspace = { oldState: in_oldSerializedState };
|
|
761
|
-
|
|
761
|
+
utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
|
|
762
762
|
preCallback: this._recursivelyBuildReversibleChangeSet,
|
|
763
763
|
userData: workspace,
|
|
764
764
|
});
|
|
@@ -783,7 +783,7 @@ class ChangeSet {
|
|
|
783
783
|
if (isPrimitiveType(type)) {
|
|
784
784
|
// remove old state
|
|
785
785
|
let nestedChangeset = in_context.getNestedChangeSet();
|
|
786
|
-
if (type === "String" && !(0,
|
|
786
|
+
if (type === "String" && !(0, isString_js_1.default)(nestedChangeset)) {
|
|
787
787
|
// String is a special case
|
|
788
788
|
if (nestedChangeset.modify) {
|
|
789
789
|
for (let i = 0; i < nestedChangeset.modify.length; i++) {
|
|
@@ -795,7 +795,7 @@ class ChangeSet {
|
|
|
795
795
|
for (let i = 0; i < nestedChangeset.remove.length; i++) {
|
|
796
796
|
let entry = nestedChangeset.remove[i];
|
|
797
797
|
let removeRangeLength = entry[1];
|
|
798
|
-
if ((0,
|
|
798
|
+
if ((0, isString_js_1.default)(removeRangeLength)) {
|
|
799
799
|
removeRangeLength = entry[1].length;
|
|
800
800
|
}
|
|
801
801
|
entry[1] = removeRangeLength;
|
|
@@ -875,13 +875,13 @@ class ChangeSet {
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
};
|
|
878
|
-
if ((0,
|
|
878
|
+
if ((0, isObject_js_1.default)(this._changes) &&
|
|
879
879
|
this._changes.oldValue !== undefined &&
|
|
880
880
|
this._changes.value !== undefined) {
|
|
881
881
|
this._changes = this._changes.value;
|
|
882
882
|
return;
|
|
883
883
|
}
|
|
884
|
-
|
|
884
|
+
utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
|
|
885
885
|
preCallback: callback,
|
|
886
886
|
});
|
|
887
887
|
}
|
|
@@ -899,8 +899,8 @@ class ChangeSet {
|
|
|
899
899
|
}
|
|
900
900
|
else {
|
|
901
901
|
paths = [];
|
|
902
|
-
(0,
|
|
903
|
-
(0,
|
|
902
|
+
(0, each_js_1.default)(in_changeSet, function (nestedChangeSet) {
|
|
903
|
+
(0, each_js_1.default)(nestedChangeSet, function (nestedChangeSet2, path) {
|
|
904
904
|
paths.push(path);
|
|
905
905
|
});
|
|
906
906
|
});
|
|
@@ -930,10 +930,10 @@ class ChangeSet {
|
|
|
930
930
|
}
|
|
931
931
|
const nestedChangeset = in_context.getNestedChangeSet();
|
|
932
932
|
if ((isPrimitiveType(type) && type !== "String") ||
|
|
933
|
-
(type === "String" && (0,
|
|
933
|
+
(type === "String" && (0, isString_js_1.default)(nestedChangeset.oldValue))) {
|
|
934
934
|
// check if we were called with an irreversible changeset
|
|
935
935
|
if (in_context.getOperationType() === "modify" &&
|
|
936
|
-
(!(0,
|
|
936
|
+
(!(0, isObject_js_1.default)(nestedChangeset) ||
|
|
937
937
|
typeof nestedChangeset.oldValue === "undefined")) {
|
|
938
938
|
throw new Error(MSG.OLD_VALUE_NOT_FOUND);
|
|
939
939
|
}
|
|
@@ -942,10 +942,10 @@ class ChangeSet {
|
|
|
942
942
|
nestedChangeset.oldValue = nestedChangeset.value;
|
|
943
943
|
nestedChangeset.value = tmp;
|
|
944
944
|
}
|
|
945
|
-
else if ((type === "String" && !(0,
|
|
945
|
+
else if ((type === "String" && !(0, isString_js_1.default)(nestedChangeset.oldValue)) ||
|
|
946
946
|
splitType.context === "array") {
|
|
947
947
|
// String and Arrays need special treatment:
|
|
948
|
-
const arrayIterator = new
|
|
948
|
+
const arrayIterator = new arrayChangesetIterator_js_1.ArrayChangeSetIterator(nestedChangeset);
|
|
949
949
|
const resultChangeset = {};
|
|
950
950
|
if (nestedChangeset.modify) {
|
|
951
951
|
resultChangeset.modify = [];
|
|
@@ -959,7 +959,7 @@ class ChangeSet {
|
|
|
959
959
|
// Successively invert the changes from the changeSet
|
|
960
960
|
while (!arrayIterator.atEnd()) {
|
|
961
961
|
switch (arrayIterator.opDescription.type) {
|
|
962
|
-
case
|
|
962
|
+
case operationTypes_js_1.ArrayIteratorOperationTypes.INSERT:
|
|
963
963
|
// Handle inserts
|
|
964
964
|
resultChangeset.remove.push([
|
|
965
965
|
arrayIterator.opDescription.operation[0] +
|
|
@@ -967,7 +967,7 @@ class ChangeSet {
|
|
|
967
967
|
arrayIterator.opDescription.operation[1],
|
|
968
968
|
]);
|
|
969
969
|
break;
|
|
970
|
-
case
|
|
970
|
+
case operationTypes_js_1.ArrayIteratorOperationTypes.REMOVE:
|
|
971
971
|
// Handle removes
|
|
972
972
|
resultChangeset.insert.push([
|
|
973
973
|
arrayIterator.opDescription.operation[0] +
|
|
@@ -975,7 +975,7 @@ class ChangeSet {
|
|
|
975
975
|
arrayIterator.opDescription.operation[1],
|
|
976
976
|
]);
|
|
977
977
|
break;
|
|
978
|
-
case
|
|
978
|
+
case operationTypes_js_1.ArrayIteratorOperationTypes.MODIFY:
|
|
979
979
|
// Handle modifies
|
|
980
980
|
if (isPrimitiveType(splitType.typeid)) {
|
|
981
981
|
resultChangeset.modify.push([
|
|
@@ -1021,7 +1021,7 @@ class ChangeSet {
|
|
|
1021
1021
|
nestedChangeset.remove = undefined;
|
|
1022
1022
|
delete nestedChangeset.remove;
|
|
1023
1023
|
const isPrimitiveTypeid = isPrimitiveType(in_context.getSplitTypeID().typeid);
|
|
1024
|
-
(0,
|
|
1024
|
+
(0, each_js_1.default)(this._extractFirstLevelPaths(nestedChangeset.insert, isPrimitiveTypeid), function (path) {
|
|
1025
1025
|
const fullPath = (0, property_common_1.joinPaths)(in_context.getFullPath(), path, PROPERTY_PATH_DELIMITER);
|
|
1026
1026
|
in_context.getUserData()[fullPath] = true;
|
|
1027
1027
|
});
|
|
@@ -1036,7 +1036,7 @@ class ChangeSet {
|
|
|
1036
1036
|
delete nestedChangeset.insert;
|
|
1037
1037
|
}
|
|
1038
1038
|
const isPrimitiveTypeid = isPrimitiveType(in_context.getSplitTypeID().typeid);
|
|
1039
|
-
(0,
|
|
1039
|
+
(0, each_js_1.default)(this._extractFirstLevelPaths(nestedChangeset.remove, isPrimitiveTypeid), function (path) {
|
|
1040
1040
|
const fullPath = (0, property_common_1.joinPaths)(in_context.getFullPath(), path, PROPERTY_PATH_DELIMITER);
|
|
1041
1041
|
in_context.getUserData()[fullPath] = true;
|
|
1042
1042
|
});
|
|
@@ -1057,26 +1057,26 @@ class ChangeSet {
|
|
|
1057
1057
|
this._changes.oldValue = tmp;
|
|
1058
1058
|
}
|
|
1059
1059
|
else {
|
|
1060
|
-
|
|
1060
|
+
utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
|
|
1061
1061
|
preCallback: this._recursivelyInvertReversibleChangeset.bind(this),
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
exports.ChangeSet = ChangeSet;
|
|
1067
|
-
ChangeSet.ConflictType =
|
|
1068
|
-
ChangeSet.isEmptyChangeSet =
|
|
1069
|
-
ChangeSet.isReservedKeyword =
|
|
1067
|
+
ChangeSet.ConflictType = changesetConflictTypes_js_1.ConflictType;
|
|
1068
|
+
ChangeSet.isEmptyChangeSet = isEmptyChangeset_js_1.isEmptyChangeSet;
|
|
1069
|
+
ChangeSet.isReservedKeyword = isReservedKeyword_js_1.isReservedKeyword;
|
|
1070
1070
|
ChangeSet.prototype._performApplyAfterOnPropertyArray =
|
|
1071
|
-
|
|
1071
|
+
array_js_1.ChangeSetArrayFunctions._performApplyAfterOnPropertyArray;
|
|
1072
1072
|
ChangeSet.prototype._rebaseArrayChangeSetForProperty =
|
|
1073
|
-
|
|
1074
|
-
ChangeSet.prototype._rebaseChangeSetForString =
|
|
1073
|
+
array_js_1.ChangeSetArrayFunctions._rebaseArrayChangeSetForProperty;
|
|
1074
|
+
ChangeSet.prototype._rebaseChangeSetForString = array_js_1.ChangeSetArrayFunctions._rebaseChangeSetForString;
|
|
1075
1075
|
// Add the indexed collection functions into the prototype of the ChangeSet
|
|
1076
1076
|
ChangeSet.prototype._performApplyAfterOnPropertyIndexedCollection =
|
|
1077
|
-
|
|
1077
|
+
indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._performApplyAfterOnPropertyIndexedCollection;
|
|
1078
1078
|
ChangeSet.prototype._cleanIndexedCollectionChangeSet =
|
|
1079
|
-
|
|
1079
|
+
indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._cleanIndexedCollectionChangeSet;
|
|
1080
1080
|
ChangeSet.prototype._rebaseIndexedCollectionChangeSetForProperty =
|
|
1081
|
-
|
|
1081
|
+
indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._rebaseIndexedCollectionChangeSetForProperty;
|
|
1082
1082
|
//# sourceMappingURL=changeset.js.map
|