@fluid-experimental/property-changeset 0.59.2001 → 0.59.3000
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
|
@@ -18,94 +18,94 @@ const typeidHelper_1 = require("../../helpers/typeidHelper");
|
|
|
18
18
|
var MSG = require('@fluid-experimental/property-common').constants.MSG;
|
|
19
19
|
it('getPrimitiveTypeId() should return all primitive typeids', () => {
|
|
20
20
|
const result = typeidHelper_1.TypeIdHelper.getPrimitiveTypeIds();
|
|
21
|
-
chai_1.expect(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',
|
|
21
|
+
(0, chai_1.expect)(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',
|
|
22
22
|
'Uint32', 'Bool', 'String', 'Reference', 'Enum', 'Int64', 'Uint64',
|
|
23
23
|
]);
|
|
24
24
|
});
|
|
25
25
|
it('getReservedTypeId() should return all reserved typeids', () => {
|
|
26
26
|
const result = typeidHelper_1.TypeIdHelper.getReservedTypeIds();
|
|
27
|
-
chai_1.expect(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',
|
|
27
|
+
(0, chai_1.expect)(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',
|
|
28
28
|
'NamedNodeProperty', 'RelationshipProperty',
|
|
29
29
|
]);
|
|
30
30
|
});
|
|
31
31
|
describe('nativeInheritsFrom() method', function () {
|
|
32
32
|
it('should throw an error if the input is undefine', () => {
|
|
33
|
-
chai_1.expect(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
33
|
+
(0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
34
34
|
// @ts-ignore
|
|
35
|
-
chai_1.expect(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
35
|
+
(0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
36
36
|
// @ts-ignore
|
|
37
|
-
chai_1.expect(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
37
|
+
(0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);
|
|
38
38
|
});
|
|
39
39
|
it('should throw an error if the inputs are not native typeids', () => {
|
|
40
|
-
chai_1.expect(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })
|
|
40
|
+
(0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })
|
|
41
41
|
.to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');
|
|
42
|
-
chai_1.expect(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })
|
|
42
|
+
(0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })
|
|
43
43
|
.to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');
|
|
44
44
|
});
|
|
45
45
|
it('should recognize that all the native type inherit from BaseProperty', () => {
|
|
46
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;
|
|
47
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;
|
|
48
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;
|
|
49
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;
|
|
50
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;
|
|
51
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;
|
|
52
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;
|
|
53
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;
|
|
54
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;
|
|
55
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;
|
|
56
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;
|
|
57
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;
|
|
58
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;
|
|
59
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;
|
|
60
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;
|
|
61
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;
|
|
62
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;
|
|
63
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;
|
|
64
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;
|
|
65
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;
|
|
66
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;
|
|
46
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;
|
|
47
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;
|
|
48
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;
|
|
49
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;
|
|
50
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;
|
|
51
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;
|
|
52
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;
|
|
53
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;
|
|
54
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;
|
|
55
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;
|
|
56
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;
|
|
57
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;
|
|
58
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;
|
|
59
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;
|
|
60
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;
|
|
61
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;
|
|
62
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;
|
|
63
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;
|
|
64
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;
|
|
65
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;
|
|
66
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;
|
|
67
67
|
});
|
|
68
68
|
it('should recognize that the Reference<NodeProperty> inherits from BaseProperty', () => {
|
|
69
69
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'BaseProperty');
|
|
70
|
-
chai_1.expect(result).to.be.true;
|
|
70
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
71
71
|
});
|
|
72
72
|
it('should throw an error if in_typeid is enum<> ', () => {
|
|
73
|
-
chai_1.expect(() => {
|
|
73
|
+
(0, chai_1.expect)(() => {
|
|
74
74
|
typeidHelper_1.TypeIdHelper.nativeInheritsFrom('enum<NodeProperty>', 'BaseProperty');
|
|
75
75
|
}).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');
|
|
76
76
|
});
|
|
77
77
|
it('should throw an error if base_typeid is enum<> ', () => {
|
|
78
|
-
chai_1.expect(() => {
|
|
78
|
+
(0, chai_1.expect)(() => {
|
|
79
79
|
typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'enum<NodeProperty>');
|
|
80
80
|
}).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');
|
|
81
81
|
});
|
|
82
82
|
it('should recognize that the Enum inherits from Int32', () => {
|
|
83
83
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Enum', 'Int32');
|
|
84
|
-
chai_1.expect(result).to.be.true;
|
|
84
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
85
85
|
});
|
|
86
86
|
it('should recognize that the NodeProperty inherits from ContainerProperty', () => {
|
|
87
87
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'ContainerProperty');
|
|
88
|
-
chai_1.expect(result).to.be.true;
|
|
88
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
89
89
|
});
|
|
90
90
|
it('should recognize that the NamedProperty inherits from ContainerProperty', () => {
|
|
91
91
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedProperty', 'ContainerProperty');
|
|
92
|
-
chai_1.expect(result).to.be.true;
|
|
92
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
93
93
|
});
|
|
94
94
|
it('should recognize that the String inherits from ContainerProperty', () => {
|
|
95
95
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('String', 'ContainerProperty');
|
|
96
|
-
chai_1.expect(result).to.be.true;
|
|
96
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
97
97
|
});
|
|
98
98
|
it('should recognize that the NamedNodeProperty inherits from NamedProperty', () => {
|
|
99
99
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NamedProperty');
|
|
100
|
-
chai_1.expect(result).to.be.true;
|
|
100
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
101
101
|
});
|
|
102
102
|
it('should recognize that the NamedNodeProperty inherits from NodeProperty', () => {
|
|
103
103
|
const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NodeProperty');
|
|
104
|
-
chai_1.expect(result).to.be.true;
|
|
104
|
+
(0, chai_1.expect)(result).to.be.true;
|
|
105
105
|
});
|
|
106
106
|
it('should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty', () => {
|
|
107
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;
|
|
108
|
-
chai_1.expect(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;
|
|
107
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;
|
|
108
|
+
(0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeidHelper.spec.js","sourceRoot":"","sources":["../../../src/test/validator/typeidHelper.spec.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,qCAAqC;AACrC,m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aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;gBAC/E,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;gBAErF,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;gBAC9E,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;gBAEpF,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,6FAA6F,EAAE,GAAG,EAAE;gBACnG,aAAM,CAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;gBAC3F,aAAM,CAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAChG,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint no-unused-expressions: 0 */\n/* eslint-disable no-unused-vars */\n/* eslint-disable no-undef */\n/* eslint-disable max-nested-callbacks */\n/**\n * @fileoverview In this file, we will test typeid_helper functions.\n */\n\nimport { expect } from \"chai\";\nimport { TypeIdHelper } from '../../helpers/typeidHelper';\n\n(function() {\n describe('Typeid helper', function() {\n var MSG = require('@fluid-experimental/property-common').constants.MSG;\n\n it('getPrimitiveTypeId() should return all primitive typeids', () => {\n const result = TypeIdHelper.getPrimitiveTypeIds();\n expect(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',\n 'Uint32', 'Bool', 'String', 'Reference', 'Enum', 'Int64', 'Uint64',\n ]);\n });\n\n it('getReservedTypeId() should return all reserved typeids', () => {\n const result = TypeIdHelper.getReservedTypeIds();\n\n expect(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',\n 'NamedNodeProperty', 'RelationshipProperty',\n ]);\n });\n\n describe('nativeInheritsFrom() method', function() {\n it('should throw an error if the input is undefine', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n });\n\n it('should throw an error if the inputs are not native typeids', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n });\n\n it('should recognize that all the native type inherit from BaseProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;\n });\n\n it('should recognize that the Reference<NodeProperty> inherits from BaseProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'BaseProperty');\n\n expect(result).to.be.true;\n });\n\n it('should throw an error if in_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('enum<NodeProperty>', 'BaseProperty');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should throw an error if base_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('NodeProperty', 'enum<NodeProperty>');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should recognize that the Enum inherits from Int32', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Enum', 'Int32');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NodeProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NodeProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the String inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('String', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NamedProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NamedProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NodeProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NodeProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;\n });\n });\n });\n})();\n"]}
|
|
1
|
+
{"version":3,"file":"typeidHelper.spec.js","sourceRoot":"","sources":["../../../src/test/validator/typeidHelper.spec.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,qCAAqC;AACrC,mCAAmC;AACnC,6BAA6B;AAC7B,yCAAyC;AACzC;;GAEG;;AAEH,+BAA8B;AAC9B,6DAA0D;AAE1D,CAAC;IACG,QAAQ,CAAC,eAAe,EAAE;QACtB,IAAI,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAA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AmB,CAAC,CAAC;gBAE9E,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;gBAC/E,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;gBAErF,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;gBAC9E,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;gBAEpF,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,6FAA6F,EAAE,GAAG,EAAE;gBACnG,IAAA,aAAM,EAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;gBAC3F,IAAA,aAAM,EAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAChG,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint no-unused-expressions: 0 */\n/* eslint-disable no-unused-vars */\n/* eslint-disable no-undef */\n/* eslint-disable max-nested-callbacks */\n/**\n * @fileoverview In this file, we will test typeid_helper functions.\n */\n\nimport { expect } from \"chai\";\nimport { TypeIdHelper } from '../../helpers/typeidHelper';\n\n(function() {\n describe('Typeid helper', function() {\n var MSG = require('@fluid-experimental/property-common').constants.MSG;\n\n it('getPrimitiveTypeId() should return all primitive typeids', () => {\n const result = TypeIdHelper.getPrimitiveTypeIds();\n expect(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',\n 'Uint32', 'Bool', 'String', 'Reference', 'Enum', 'Int64', 'Uint64',\n ]);\n });\n\n it('getReservedTypeId() should return all reserved typeids', () => {\n const result = TypeIdHelper.getReservedTypeIds();\n\n expect(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',\n 'NamedNodeProperty', 'RelationshipProperty',\n ]);\n });\n\n describe('nativeInheritsFrom() method', function() {\n it('should throw an error if the input is undefine', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n });\n\n it('should throw an error if the inputs are not native typeids', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n });\n\n it('should recognize that all the native type inherit from BaseProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;\n });\n\n it('should recognize that the Reference<NodeProperty> inherits from BaseProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'BaseProperty');\n\n expect(result).to.be.true;\n });\n\n it('should throw an error if in_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('enum<NodeProperty>', 'BaseProperty');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should throw an error if base_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('NodeProperty', 'enum<NodeProperty>');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should recognize that the Enum inherits from Int32', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Enum', 'Int32');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NodeProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NodeProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the String inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('String', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NamedProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NamedProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NodeProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NodeProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;\n });\n });\n });\n})();\n"]}
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4B,aAAa,EAA+B,MAAM,OAAO,CAAC;AAW7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAg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AG,mBAAmB,CAyBpH;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,UAAU,yBAAyB,CAAC,YAAY,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAAE,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;SAAE,CAAC;KAAE,CAiBpN;;CACJ"}
|
package/dist/utils.js
CHANGED
|
@@ -54,7 +54,7 @@ var Utils;
|
|
|
54
54
|
undefined;
|
|
55
55
|
in_context.setSplitTypeID(splitTypeId);
|
|
56
56
|
let currentUserData;
|
|
57
|
-
async_1.series([
|
|
57
|
+
(0, async_1.series)([
|
|
58
58
|
function (next) {
|
|
59
59
|
if (in_preCallback !== undefined) {
|
|
60
60
|
in_preCallback(in_context, next);
|
|
@@ -103,12 +103,12 @@ var Utils;
|
|
|
103
103
|
// Process an individual change recursively, by preparing the traversal context and invoking
|
|
104
104
|
// _traverseChangeSetRecursively
|
|
105
105
|
const processChange = function (in_segment, in_subChangeSet, in_nestedTypeid, in_escape, in_parentPropertyType, in_arrayOperationIndex, in_arrayLocalIndex, in_arrayOperationOffset, in_arrayIteratorOffset, in_callback) {
|
|
106
|
-
async_1.series([
|
|
106
|
+
(0, async_1.series)([
|
|
107
107
|
function (n2) {
|
|
108
108
|
try {
|
|
109
109
|
// Update the path
|
|
110
110
|
in_context._lastSegment = in_segment;
|
|
111
|
-
const escapedSegment = in_escape && isString_1.default(in_segment) ? pathHelper_1.PathHelper.quotePathSegmentIfNeeded(in_segment) : in_segment;
|
|
111
|
+
const escapedSegment = in_escape && (0, isString_1.default)(in_segment) ? pathHelper_1.PathHelper.quotePathSegmentIfNeeded(in_segment) : in_segment;
|
|
112
112
|
let nextSegmentToPushInParentStack = in_context.getLastSegment();
|
|
113
113
|
// Note: we don't quote the path string here, since the paths
|
|
114
114
|
// in a ChangeSet are already quoted, if necessary
|
|
@@ -129,7 +129,7 @@ var Utils;
|
|
|
129
129
|
in_context._arrayLocalIndex = in_arrayLocalIndex;
|
|
130
130
|
in_context._arrayOperationOffset = in_arrayOperationOffset;
|
|
131
131
|
in_context._arrayIteratorOffset = in_arrayIteratorOffset;
|
|
132
|
-
if (in_arrayIteratorOffset !== undefined && isNumber_1.default(in_segment)) {
|
|
132
|
+
if (in_arrayIteratorOffset !== undefined && (0, isNumber_1.default)(in_segment)) {
|
|
133
133
|
if (in_context._operationType === "remove") {
|
|
134
134
|
nextSegmentToPushInParentStack =
|
|
135
135
|
in_context.getLastSegment() + in_arrayIteratorOffset - in_arrayLocalIndex;
|
|
@@ -172,7 +172,7 @@ var Utils;
|
|
|
172
172
|
in_callback(err);
|
|
173
173
|
});
|
|
174
174
|
};
|
|
175
|
-
async_1.series([
|
|
175
|
+
(0, async_1.series)([
|
|
176
176
|
function (n3) {
|
|
177
177
|
// If this property is a collection, we set the correct type, otherwise we assume it is a NodeProperty
|
|
178
178
|
const propertyContainerType = (splitTypeId.context === "map" ||
|
|
@@ -185,7 +185,7 @@ var Utils;
|
|
|
185
185
|
let insertCounter = 0;
|
|
186
186
|
let removeCounter = 0;
|
|
187
187
|
let modifyCounter = 0;
|
|
188
|
-
async_1.whilst(function (callback) {
|
|
188
|
+
(0, async_1.whilst)(function (callback) {
|
|
189
189
|
return callback(null, !arrayIterator.atEnd());
|
|
190
190
|
}, function (n4) {
|
|
191
191
|
let operation;
|
|
@@ -193,7 +193,7 @@ var Utils;
|
|
|
193
193
|
case operationTypes_1.ArrayIteratorOperationTypes.INSERT:
|
|
194
194
|
in_context._operationType = "insert";
|
|
195
195
|
operation = arrayIterator.opDescription.operation;
|
|
196
|
-
async_1.eachOfSeries(operation[1], function (item, i, n5) {
|
|
196
|
+
(0, async_1.eachOfSeries)(operation[1], function (item, i, n5) {
|
|
197
197
|
// The typeid is stored inline for arrays
|
|
198
198
|
const typeid = item.typeid;
|
|
199
199
|
property_common_1.ConsoleUtils.assert(typeid, MSG.NON_PRIMITIVE_ARRAY_NO_TYPEID);
|
|
@@ -207,7 +207,7 @@ var Utils;
|
|
|
207
207
|
case operationTypes_1.ArrayIteratorOperationTypes.REMOVE:
|
|
208
208
|
in_context._operationType = "remove";
|
|
209
209
|
operation = arrayIterator.opDescription.operation;
|
|
210
|
-
async_1.timesSeries(operation[1], function (i, n5) {
|
|
210
|
+
(0, async_1.timesSeries)(operation[1], function (i, n5) {
|
|
211
211
|
// For removals, we don't have a typeid and we use the ChangeSet
|
|
212
212
|
// of the removal operation as nested
|
|
213
213
|
// ChangeSet -- TODO: doing this is maybe not really nice here
|
|
@@ -221,7 +221,7 @@ var Utils;
|
|
|
221
221
|
case operationTypes_1.ArrayIteratorOperationTypes.MODIFY:
|
|
222
222
|
operation = arrayIterator.opDescription.operation;
|
|
223
223
|
in_context._operationType = "modify";
|
|
224
|
-
async_1.timesSeries(operation[1].length, function (i, n5) {
|
|
224
|
+
(0, async_1.timesSeries)(operation[1].length, function (i, n5) {
|
|
225
225
|
// The typeid is stored inline for arrays
|
|
226
226
|
const typeid = operation[1][i].typeid;
|
|
227
227
|
property_common_1.ConsoleUtils.assert(typeid, MSG.NON_PRIMITIVE_ARRAY_NO_TYPEID);
|
|
@@ -243,14 +243,14 @@ var Utils;
|
|
|
243
243
|
}
|
|
244
244
|
else {
|
|
245
245
|
// Process insertion of dynamic property, maps and sets
|
|
246
|
-
async_1.series([
|
|
246
|
+
(0, async_1.series)([
|
|
247
247
|
function (n4) {
|
|
248
248
|
if (nestedChangeSet.remove) {
|
|
249
249
|
oldOperationType = in_context._operationType;
|
|
250
250
|
in_context._operationType = "remove";
|
|
251
251
|
let paths = nestedChangeSet.remove;
|
|
252
252
|
if (Array.isArray(paths)) {
|
|
253
|
-
async_1.timesSeries(paths.length, function (i, n5) {
|
|
253
|
+
(0, async_1.timesSeries)(paths.length, function (i, n5) {
|
|
254
254
|
// For removals in irreversible CSs, we don't have a typeid and we use the ChangeSet of the
|
|
255
255
|
// removal operation as nested ChangeSet
|
|
256
256
|
processChange(paths[i], nestedChangeSet.remove, undefined, true, propertyContainerType, undefined, undefined, undefined, undefined, n5);
|
|
@@ -262,10 +262,10 @@ var Utils;
|
|
|
262
262
|
else {
|
|
263
263
|
// for removals in reversible changesets we have an object containing the types
|
|
264
264
|
const typeids = Object.keys(nestedChangeSet.remove);
|
|
265
|
-
async_1.timesSeries(typeids.length, function (i, n5) {
|
|
265
|
+
(0, async_1.timesSeries)(typeids.length, function (i, n5) {
|
|
266
266
|
const typeid = typeids[i];
|
|
267
267
|
paths = Object.keys(nestedChangeSet.remove[typeid]);
|
|
268
|
-
async_1.timesSeries(paths.length, function (j, n6) {
|
|
268
|
+
(0, async_1.timesSeries)(paths.length, function (j, n6) {
|
|
269
269
|
processChange(paths[j], nestedChangeSet.remove[typeid][paths[j]], typeid, true, propertyContainerType, undefined, undefined, undefined, undefined, n6);
|
|
270
270
|
}, n5);
|
|
271
271
|
}, function (err) {
|
|
@@ -285,10 +285,10 @@ var Utils;
|
|
|
285
285
|
in_context._operationType = "insert";
|
|
286
286
|
// Maps and NodeProperties group the insertions by type
|
|
287
287
|
const typeids = Object.keys(nestedChangeSet.insert);
|
|
288
|
-
async_1.timesSeries(typeids.length, function (i, n5) {
|
|
288
|
+
(0, async_1.timesSeries)(typeids.length, function (i, n5) {
|
|
289
289
|
const typeid = typeids[i];
|
|
290
290
|
const paths = Object.keys(nestedChangeSet.insert[typeid]);
|
|
291
|
-
async_1.timesSeries(paths.length, function (j, n6) {
|
|
291
|
+
(0, async_1.timesSeries)(paths.length, function (j, n6) {
|
|
292
292
|
processChange(paths[j], nestedChangeSet.insert[typeid][paths[j]], typeid, true, propertyContainerType, undefined, undefined, undefined, undefined, n6);
|
|
293
293
|
}, n5);
|
|
294
294
|
}, function (err) {
|
|
@@ -304,10 +304,10 @@ var Utils;
|
|
|
304
304
|
if (nestedChangeSet.modify) {
|
|
305
305
|
// Maps and NodeProperties group modifications by type
|
|
306
306
|
const typeids = Object.keys(nestedChangeSet.modify);
|
|
307
|
-
async_1.timesSeries(typeids.length, function (i, n5) {
|
|
307
|
+
(0, async_1.timesSeries)(typeids.length, function (i, n5) {
|
|
308
308
|
const typeid = typeids[i];
|
|
309
309
|
const paths = Object.keys(nestedChangeSet.modify[typeid]);
|
|
310
|
-
async_1.timesSeries(paths.length, function (j, n6) {
|
|
310
|
+
(0, async_1.timesSeries)(paths.length, function (j, n6) {
|
|
311
311
|
processChange(paths[j], nestedChangeSet.modify[typeid][paths[j]], typeid, true, propertyContainerType, undefined, undefined, undefined, undefined, n6);
|
|
312
312
|
}, n5);
|
|
313
313
|
}, n4);
|
|
@@ -320,11 +320,11 @@ var Utils;
|
|
|
320
320
|
// Process nested properties
|
|
321
321
|
if (splitTypeId.context === "single") {
|
|
322
322
|
const typeids = Object.keys(nestedChangeSet);
|
|
323
|
-
async_1.timesSeries(typeids.length, function (i, n5) {
|
|
323
|
+
(0, async_1.timesSeries)(typeids.length, function (i, n5) {
|
|
324
324
|
const typeid = typeids[i];
|
|
325
|
-
if (!isReservedKeyword_1.isReservedKeyword(typeid)) {
|
|
325
|
+
if (!(0, isReservedKeyword_1.isReservedKeyword)(typeid)) {
|
|
326
326
|
const paths = Object.keys(nestedChangeSet[typeid]);
|
|
327
|
-
async_1.timesSeries(paths.length, function (j, n6) {
|
|
327
|
+
(0, async_1.timesSeries)(paths.length, function (j, n6) {
|
|
328
328
|
processChange(paths[j], nestedChangeSet[typeid][paths[j]], typeid, false, "template", undefined, undefined, undefined, undefined, n6);
|
|
329
329
|
}, n5);
|
|
330
330
|
}
|
|
@@ -385,7 +385,7 @@ var Utils;
|
|
|
385
385
|
in_objectToPopulate.remove[in_context.getTypeid()] =
|
|
386
386
|
in_objectToPopulate.remove[in_context.getTypeid()] || {};
|
|
387
387
|
in_objectToPopulate.remove[in_context.getTypeid()][in_context.getLastSegment()] =
|
|
388
|
-
fastest_json_copy_1.copy(in_context.getNestedChangeSet());
|
|
388
|
+
(0, fastest_json_copy_1.copy)(in_context.getNestedChangeSet());
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
else {
|
|
@@ -394,7 +394,7 @@ var Utils;
|
|
|
394
394
|
in_objectToPopulate[in_context.getOperationType()][in_context.getTypeid()] || {};
|
|
395
395
|
if (typeidHelper_1.TypeIdHelper.isPrimitiveType(in_context.getTypeid()) || in_isLeaf) {
|
|
396
396
|
in_objectToPopulate[in_context.getOperationType()][in_context.getTypeid()][in_context.getLastSegment()] =
|
|
397
|
-
fastest_json_copy_1.copy(in_context.getNestedChangeSet());
|
|
397
|
+
(0, fastest_json_copy_1.copy)(in_context.getNestedChangeSet());
|
|
398
398
|
}
|
|
399
399
|
else {
|
|
400
400
|
in_objectToPopulate[in_context.getOperationType()][in_context.getTypeid()][in_context.getLastSegment()] =
|
|
@@ -406,7 +406,7 @@ var Utils;
|
|
|
406
406
|
in_objectToPopulate[in_context.getTypeid()] = in_objectToPopulate[in_context.getTypeid()] || {};
|
|
407
407
|
if (typeidHelper_1.TypeIdHelper.isPrimitiveType(in_context.getTypeid()) || in_isLeaf) {
|
|
408
408
|
in_objectToPopulate[in_context.getTypeid()][in_context.getLastSegment()] =
|
|
409
|
-
fastest_json_copy_1.copy(in_context.getNestedChangeSet());
|
|
409
|
+
(0, fastest_json_copy_1.copy)(in_context.getNestedChangeSet());
|
|
410
410
|
}
|
|
411
411
|
else {
|
|
412
412
|
in_objectToPopulate[in_context.getTypeid()][in_context.getLastSegment()] =
|
|
@@ -466,7 +466,7 @@ var Utils;
|
|
|
466
466
|
const processChange = function (in_segment, in_subChangeSet, in_nestedTypeid, in_escape, in_parentPropertyType, in_arrayOperationIndex, in_arrayLocalIndex, in_arrayOperationOffset, in_arrayIteratorOffset) {
|
|
467
467
|
// Update the path
|
|
468
468
|
in_context._lastSegment = in_segment;
|
|
469
|
-
const escapedSegment = in_escape && isString_1.default(in_segment) ? pathHelper_1.PathHelper.quotePathSegmentIfNeeded(in_segment) : in_segment;
|
|
469
|
+
const escapedSegment = in_escape && (0, isString_1.default)(in_segment) ? pathHelper_1.PathHelper.quotePathSegmentIfNeeded(in_segment) : in_segment;
|
|
470
470
|
let nextSegmentToPushInParentStack = in_context._lastSegment;
|
|
471
471
|
// Note: we don't quote the path string here, since the paths in a ChangeSet are already quoted, if necessary
|
|
472
472
|
if (currentTypeIdContext === "map" ||
|
|
@@ -630,7 +630,7 @@ var Utils;
|
|
|
630
630
|
typeids = Object.keys(nestedChangeSet);
|
|
631
631
|
for (i = 0; i < typeids.length; i++) {
|
|
632
632
|
typeid = typeids[i];
|
|
633
|
-
if (!isReservedKeyword_1.isReservedKeyword(typeid)) {
|
|
633
|
+
if (!(0, isReservedKeyword_1.isReservedKeyword)(typeid)) {
|
|
634
634
|
paths = Object.keys(nestedChangeSet[typeid]);
|
|
635
635
|
for (j = 0; j < paths.length; j++) {
|
|
636
636
|
processChange(paths[j], nestedChangeSet[typeid][paths[j]], typeid, false, "template");
|
|
@@ -739,7 +739,7 @@ var Utils;
|
|
|
739
739
|
* @returns Wether the object is empty
|
|
740
740
|
*/
|
|
741
741
|
_isEmptyObject(in_context) {
|
|
742
|
-
return Object(in_context._nestedChangeSet) && isEmpty_1.default(in_context._nestedChangeSet);
|
|
742
|
+
return Object(in_context._nestedChangeSet) && (0, isEmpty_1.default)(in_context._nestedChangeSet);
|
|
743
743
|
}
|
|
744
744
|
/**
|
|
745
745
|
* Returns true if we're at the tip of a path
|
|
@@ -758,7 +758,7 @@ var Utils;
|
|
|
758
758
|
* @returns The last segment index
|
|
759
759
|
*/
|
|
760
760
|
getPostLastSegment() {
|
|
761
|
-
if (this._propertyContainerType === "array" && isNumber_1.default(this._lastSegment) && this._arrayIteratorOffset !== undefined) {
|
|
761
|
+
if (this._propertyContainerType === "array" && (0, isNumber_1.default)(this._lastSegment) && this._arrayIteratorOffset !== undefined) {
|
|
762
762
|
if (this._operationType === "remove") {
|
|
763
763
|
return this._lastSegment + this._arrayIteratorOffset - this._arrayLocalIndex;
|
|
764
764
|
}
|
|
@@ -1083,7 +1083,7 @@ var Utils;
|
|
|
1083
1083
|
const result = [];
|
|
1084
1084
|
if (in_changeSet.insertTemplates) {
|
|
1085
1085
|
const keys = Object.keys(in_changeSet.insertTemplates);
|
|
1086
|
-
async_1.eachSeries(keys, function (k, next) {
|
|
1086
|
+
(0, async_1.eachSeries)(keys, function (k, next) {
|
|
1087
1087
|
in_callback({
|
|
1088
1088
|
key: k,
|
|
1089
1089
|
value: in_changeSet.insertTemplates[k],
|
|
@@ -1113,7 +1113,7 @@ var Utils;
|
|
|
1113
1113
|
const userData = in_context.getUserData();
|
|
1114
1114
|
if (in_context.getOperationType() === "remove") {
|
|
1115
1115
|
if (!userData[in_context.getOperationType()]) {
|
|
1116
|
-
userData[in_context.getOperationType()] = fastest_json_copy_1.copy(in_context.getNestedChangeSet());
|
|
1116
|
+
userData[in_context.getOperationType()] = (0, fastest_json_copy_1.copy)(in_context.getNestedChangeSet());
|
|
1117
1117
|
}
|
|
1118
1118
|
return;
|
|
1119
1119
|
}
|
|
@@ -1150,7 +1150,7 @@ var Utils;
|
|
|
1150
1150
|
// Remove all existing keys from the ChangeSet
|
|
1151
1151
|
Object.keys(io_changeSet).forEach(function (key) { delete io_changeSet[key]; });
|
|
1152
1152
|
// Assign from the result user data
|
|
1153
|
-
extend_1.default(io_changeSet, result);
|
|
1153
|
+
(0, extend_1.default)(io_changeSet, result);
|
|
1154
1154
|
}
|
|
1155
1155
|
Utils._stripTypeids = _stripTypeids;
|
|
1156
1156
|
/**
|
|
@@ -1179,12 +1179,12 @@ var Utils;
|
|
|
1179
1179
|
if (in_excludeTypeids) {
|
|
1180
1180
|
const insertKeys = Object.keys(result.insert);
|
|
1181
1181
|
for (let i = 0; i < insertKeys.length; i++) {
|
|
1182
|
-
result.insert[insertKeys[i]] = fastest_json_copy_1.copy(result.insert[insertKeys[i]]);
|
|
1182
|
+
result.insert[insertKeys[i]] = (0, fastest_json_copy_1.copy)(result.insert[insertKeys[i]]);
|
|
1183
1183
|
Utils._stripTypeids(result.insert[insertKeys[i]]);
|
|
1184
1184
|
}
|
|
1185
1185
|
const modifyKeys = Object.keys(result.modify);
|
|
1186
1186
|
for (let i = 0; i < modifyKeys.length; i++) {
|
|
1187
|
-
result.modify[modifyKeys[i]] = fastest_json_copy_1.copy(result.modify[modifyKeys[i]]);
|
|
1187
|
+
result.modify[modifyKeys[i]] = (0, fastest_json_copy_1.copy)(result.modify[modifyKeys[i]]);
|
|
1188
1188
|
Utils._stripTypeids(result.modify[modifyKeys[i]]);
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1250,7 +1250,7 @@ var Utils;
|
|
|
1250
1250
|
result[in_context.getOperationType()] = {};
|
|
1251
1251
|
let currentChangeSet = in_context.getNestedChangeSet();
|
|
1252
1252
|
if (in_excludetypeids) {
|
|
1253
|
-
currentChangeSet = fastest_json_copy_1.copy(currentChangeSet);
|
|
1253
|
+
currentChangeSet = (0, fastest_json_copy_1.copy)(currentChangeSet);
|
|
1254
1254
|
Utils._stripTypeids(currentChangeSet);
|
|
1255
1255
|
}
|
|
1256
1256
|
result[in_context.getOperationType()][in_context.getFullPath()] = currentChangeSet;
|
|
@@ -1657,9 +1657,9 @@ var Utils;
|
|
|
1657
1657
|
});
|
|
1658
1658
|
// Delete entries from the change set that we do not want.
|
|
1659
1659
|
// We can enter this case when dealing with folded paths.
|
|
1660
|
-
each_1.default(toPurge, function (item, fullPath) {
|
|
1660
|
+
(0, each_1.default)(toPurge, function (item, fullPath) {
|
|
1661
1661
|
delete item.changeSet[item.typeid][item.pathToPurge];
|
|
1662
|
-
if (isEmpty_1.default(item.changeSet[item.typeid])) {
|
|
1662
|
+
if ((0, isEmpty_1.default)(item.changeSet[item.typeid])) {
|
|
1663
1663
|
delete item.changeSet[item.typeid];
|
|
1664
1664
|
}
|
|
1665
1665
|
});
|
|
@@ -1678,10 +1678,10 @@ var Utils;
|
|
|
1678
1678
|
const operationCS = CS[operation];
|
|
1679
1679
|
let typeidCS = CS[operation][removalInformation.typeid];
|
|
1680
1680
|
delete typeidCS[removalInformation.lastSegment];
|
|
1681
|
-
if (isEmpty_1.default(typeidCS)) {
|
|
1681
|
+
if ((0, isEmpty_1.default)(typeidCS)) {
|
|
1682
1682
|
delete operationCS[removalInformation.typeid];
|
|
1683
1683
|
}
|
|
1684
|
-
if (isEmpty_1.default(CS[operation])) {
|
|
1684
|
+
if ((0, isEmpty_1.default)(CS[operation])) {
|
|
1685
1685
|
delete CS[operation];
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
@@ -1689,7 +1689,7 @@ var Utils;
|
|
|
1689
1689
|
else {
|
|
1690
1690
|
let typeidCS = CS[removalInformation.typeid];
|
|
1691
1691
|
delete typeidCS[removalInformation.lastSegment];
|
|
1692
|
-
if (isEmpty_1.default(typeidCS)) {
|
|
1692
|
+
if ((0, isEmpty_1.default)(typeidCS)) {
|
|
1693
1693
|
delete CS[removalInformation.typeid];
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
@@ -1769,16 +1769,16 @@ var Utils;
|
|
|
1769
1769
|
* @returns - Filtered ChangeSet
|
|
1770
1770
|
*/
|
|
1771
1771
|
function excludePathsFromChangeSet(in_changeSet, in_paths) {
|
|
1772
|
-
if (!in_changeSet || !in_paths || isEmpty_1.default(in_paths)) {
|
|
1772
|
+
if (!in_changeSet || !in_paths || (0, isEmpty_1.default)(in_paths)) {
|
|
1773
1773
|
return in_changeSet;
|
|
1774
1774
|
}
|
|
1775
1775
|
in_paths = Array.isArray(in_paths) ? in_paths : [in_paths];
|
|
1776
1776
|
// create an array of arrays splitting by .
|
|
1777
1777
|
const tokenizedPaths = in_paths.map((path) => pathHelper_1.PathHelper.tokenizePathString(path));
|
|
1778
|
-
const rootChangeSet = fastest_json_copy_1.copy(in_changeSet);
|
|
1778
|
+
const rootChangeSet = (0, fastest_json_copy_1.copy)(in_changeSet);
|
|
1779
1779
|
Utils.traverseChangeSetRecursively(rootChangeSet, {
|
|
1780
1780
|
preCallback: (in_context) => {
|
|
1781
|
-
const shouldExclude = find_1.default(tokenizedPaths, (val) => { return isEqual_1.default(val, in_context.getParentStack()); });
|
|
1781
|
+
const shouldExclude = (0, find_1.default)(tokenizedPaths, (val) => { return (0, isEqual_1.default)(val, in_context.getParentStack()); });
|
|
1782
1782
|
if (shouldExclude) {
|
|
1783
1783
|
const operationType = in_context.getOperationType();
|
|
1784
1784
|
const typeId = in_context.getTypeid();
|