@fluid-experimental/property-changeset 0.58.1001 → 0.58.2000-58133
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 +1 -18
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +0 -3
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.d.ts +4 -4
- package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.js +1 -5
- 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 +0 -1
- package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +1 -3
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/dist/changeset_operations/operationTypes.js +0 -1
- package/dist/changeset_operations/operationTypes.js.map +1 -1
- package/dist/helpers/typeidHelper.d.ts.map +1 -1
- package/dist/helpers/typeidHelper.js +4 -5
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pathHelper.d.ts +2 -2
- package/dist/pathHelper.d.ts.map +1 -1
- package/dist/pathHelper.js +0 -2
- package/dist/pathHelper.js.map +1 -1
- package/dist/rebase.js +0 -1
- package/dist/rebase.js.map +1 -1
- package/dist/templateValidator.d.ts +3 -3
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +10 -12
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +56 -56
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +14 -14
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/schemaValidator.js +2 -8
- package/dist/test/schemaValidator.js.map +1 -1
- package/dist/test/schemas/badBothPropertiesAndTypeid.js +3 -3
- package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
- package/dist/test/schemas/badInvalidSemverInTypeid.js +9 -9
- package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badMissingSemverInTypeid.js +9 -9
- package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badNestedProperties.js +9 -9
- package/dist/test/schemas/badNestedProperties.js.map +1 -1
- package/dist/test/schemas/badPrimitiveTypeid.js +5 -5
- package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/schemas/badVersionedTypeid.js +9 -9
- package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
- package/dist/test/schemas/goodColorPalette.js +2 -2
- package/dist/test/schemas/goodColorPalette.js.map +1 -1
- package/dist/test/schemas/goodDraftAsVersion.js +2 -2
- package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
- package/dist/test/schemas/goodPointId.js +9 -9
- package/dist/test/schemas/goodPointId.js.map +1 -1
- package/dist/test/schemas/goodReferenceAndRegular.js +2 -2
- package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
- package/dist/test/schemas/goodReservedTypes.js +4 -4
- package/dist/test/schemas/goodReservedTypes.js.map +1 -1
- package/dist/test/schemas/goodUIBorder.js +7 -7
- package/dist/test/schemas/goodUIBorder.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +23 -23
- package/dist/test/validator/templateValidator.spec.js +27 -27
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/test/validator/typeidHelper.spec.js +2 -2
- package/dist/test/validator/typeidHelper.spec.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -4
- package/dist/utils.js.map +1 -1
- package/lib/changeset.js +1 -18
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.js +0 -3
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.js +1 -5
- package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/lib/changeset_operations/changesetConflictTypes.js +0 -1
- package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +1 -3
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/lib/changeset_operations/operationTypes.js +0 -1
- package/lib/changeset_operations/operationTypes.js.map +1 -1
- package/lib/helpers/typeidHelper.js +4 -5
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/pathHelper.js +0 -2
- package/lib/pathHelper.js.map +1 -1
- package/lib/rebase.js +0 -1
- package/lib/rebase.js.map +1 -1
- package/lib/templateValidator.js +10 -12
- package/lib/templateValidator.js.map +1 -1
- package/lib/utils.js +2 -4
- package/lib/utils.js.map +1 -1
- package/package.json +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodDraftAsVersion.js","sourceRoot":"","sources":["../../../src/test/schemas/goodDraftAsVersion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,mCAAmC;QAC7C,YAAY,EAAE;YACV,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE;SACrC;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias goodDraftAsVersion.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'autodesk:GoodDraftAsVersion-draft',\n 'properties': [\n { 'id': 'int', 'typeid': 'Int32' }
|
|
1
|
+
{"version":3,"file":"goodDraftAsVersion.js","sourceRoot":"","sources":["../../../src/test/schemas/goodDraftAsVersion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,mCAAmC;QAC7C,YAAY,EAAE;YACV,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE;SACrC;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias goodDraftAsVersion.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'autodesk:GoodDraftAsVersion-draft',\n 'properties': [\n { 'id': 'int', 'typeid': 'Int32' },\n ],\n };\n module.exports = templateSchema;\n})();\n"]}
|
|
@@ -17,30 +17,30 @@
|
|
|
17
17
|
'id': 'position',
|
|
18
18
|
'properties': [{
|
|
19
19
|
'id': 'x',
|
|
20
|
-
'typeid': 'Float32'
|
|
20
|
+
'typeid': 'Float32',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
'id': 'y',
|
|
24
|
-
'typeid': 'Float32'
|
|
24
|
+
'typeid': 'Float32',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
'id': 'z',
|
|
28
|
-
'typeid': 'Float32'
|
|
29
|
-
}
|
|
30
|
-
]
|
|
28
|
+
'typeid': 'Float32',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
'id': 'color',
|
|
34
|
-
'typeid': 'TeamLeoValidation2:ColorID-1.0.0'
|
|
34
|
+
'typeid': 'TeamLeoValidation2:ColorID-1.0.0',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
'id': 'normal',
|
|
38
38
|
'typeid': 'Float32',
|
|
39
39
|
'context': 'array',
|
|
40
|
-
'length': 3
|
|
41
|
-
}
|
|
40
|
+
'length': 3,
|
|
41
|
+
},
|
|
42
42
|
],
|
|
43
|
-
'typeid': 'TeamLeoValidation2:PointID-1.0.0'
|
|
43
|
+
'typeid': 'TeamLeoValidation2:PointID-1.0.0',
|
|
44
44
|
};
|
|
45
45
|
module.exports = templateSchema;
|
|
46
46
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodPointId.js","sourceRoot":"","sources":["../../../src/test/schemas/goodPointId.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,UAAU;gBAChB,YAAY,EAAE,CAAC;wBACP,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;oBACD;wBACI,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;oBACD;wBACI,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;iBACJ;aACJ;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,kCAAkC;aAC/C;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,SAAS;gBACnB,SAAS,EAAE,OAAO;gBAClB,QAAQ,EAAE,CAAC;aACd;SACJ;QACD,QAAQ,EAAE,kCAAkC;KAC/C,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'properties': [{\n 'id': 'position',\n 'properties': [{\n 'id': 'x',\n 'typeid': 'Float32'
|
|
1
|
+
{"version":3,"file":"goodPointId.js","sourceRoot":"","sources":["../../../src/test/schemas/goodPointId.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,UAAU;gBAChB,YAAY,EAAE,CAAC;wBACP,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;oBACD;wBACI,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;oBACD;wBACI,IAAI,EAAE,GAAG;wBACT,QAAQ,EAAE,SAAS;qBACtB;iBACJ;aACJ;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,kCAAkC;aAC/C;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,SAAS;gBACnB,SAAS,EAAE,OAAO;gBAClB,QAAQ,EAAE,CAAC;aACd;SACJ;QACD,QAAQ,EAAE,kCAAkC;KAC/C,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'properties': [{\n 'id': 'position',\n 'properties': [{\n 'id': 'x',\n 'typeid': 'Float32',\n },\n {\n 'id': 'y',\n 'typeid': 'Float32',\n },\n {\n 'id': 'z',\n 'typeid': 'Float32',\n },\n ],\n },\n {\n 'id': 'color',\n 'typeid': 'TeamLeoValidation2:ColorID-1.0.0',\n },\n {\n 'id': 'normal',\n 'typeid': 'Float32',\n 'context': 'array',\n 'length': 3,\n },\n ],\n 'typeid': 'TeamLeoValidation2:PointID-1.0.0',\n };\n module.exports = templateSchema;\n})();\n"]}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
'properties': [
|
|
18
18
|
{ 'id': 'colorsRef', 'typeid': 'Reference<Adsk.Core:Math.Color-1.0.0>', 'context': 'map' },
|
|
19
19
|
{ 'id': 'colors', 'typeid': 'Adsk.Core:Math.Color-1.0.0' },
|
|
20
|
-
{ 'id': 'testref', 'typeid': 'Reference', 'context': 'map' }
|
|
21
|
-
]
|
|
20
|
+
{ 'id': 'testref', 'typeid': 'Reference', 'context': 'map' },
|
|
21
|
+
],
|
|
22
22
|
};
|
|
23
23
|
module.exports = templateSchema;
|
|
24
24
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodReferenceAndRegular.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReferenceAndRegular.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,wCAAwC;QAClD,YAAY,EAAE;YACV,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,uCAAuC,EAAE,SAAS,EAAE,KAAK,EAAE;YAC1F,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,4BAA4B,EAAE;YAC1D,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE;SAC/D;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'Adsk.Library:Colors.ColorPalette-1.0.0',\n 'properties': [\n { 'id': 'colorsRef', 'typeid': 'Reference<Adsk.Core:Math.Color-1.0.0>', 'context': 'map' },\n { 'id': 'colors', 'typeid': 'Adsk.Core:Math.Color-1.0.0' },\n { 'id': 'testref', 'typeid': 'Reference', 'context': 'map' }
|
|
1
|
+
{"version":3,"file":"goodReferenceAndRegular.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReferenceAndRegular.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,wCAAwC;QAClD,YAAY,EAAE;YACV,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,uCAAuC,EAAE,SAAS,EAAE,KAAK,EAAE;YAC1F,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,4BAA4B,EAAE;YAC1D,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE;SAC/D;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'Adsk.Library:Colors.ColorPalette-1.0.0',\n 'properties': [\n { 'id': 'colorsRef', 'typeid': 'Reference<Adsk.Core:Math.Color-1.0.0>', 'context': 'map' },\n { 'id': 'colors', 'typeid': 'Adsk.Core:Math.Color-1.0.0' },\n { 'id': 'testref', 'typeid': 'Reference', 'context': 'map' },\n ],\n };\n module.exports = templateSchema;\n})();\n"]}
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
'inherits': 'NamedProperty',
|
|
19
19
|
'properties': [{
|
|
20
20
|
'id': 'exampleProperty1',
|
|
21
|
-
'typeid': 'String'
|
|
21
|
+
'typeid': 'String',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
'id': 'exampleProperty2',
|
|
25
|
-
'typeid': 'NodeProperty'
|
|
26
|
-
}
|
|
27
|
-
]
|
|
25
|
+
'typeid': 'NodeProperty',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
28
|
};
|
|
29
29
|
module.exports = templateSchema;
|
|
30
30
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodReservedTypes.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReservedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;GAIG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,kCAAkC;QAC5C,UAAU,EAAE,eAAe;QAC3B,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,QAAQ;aACrB;YACD;gBACI,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,cAAc;aAC3B;SACJ;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n * Tests reserved types: NamedProperty and NodeProperty\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias goodReservedTypes.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'TeamLeoValidation2:Example-1.0.0',\n 'inherits': 'NamedProperty',\n 'properties': [{\n 'id': 'exampleProperty1',\n 'typeid': 'String'
|
|
1
|
+
{"version":3,"file":"goodReservedTypes.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReservedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;GAIG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,kCAAkC;QAC5C,UAAU,EAAE,eAAe;QAC3B,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,QAAQ;aACrB;YACD;gBACI,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,cAAc;aAC3B;SACJ;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n * Tests reserved types: NamedProperty and NodeProperty\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias goodReservedTypes.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'TeamLeoValidation2:Example-1.0.0',\n 'inherits': 'NamedProperty',\n 'properties': [{\n 'id': 'exampleProperty1',\n 'typeid': 'String',\n },\n {\n 'id': 'exampleProperty2',\n 'typeid': 'NodeProperty',\n },\n ],\n };\n module.exports = templateSchema;\n})();\n"]}
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
'properties': [
|
|
21
21
|
{ 'id': 'solid', 'value': 200, 'annotation': { 'description': 'solid line' } },
|
|
22
22
|
{ 'id': 'dashed', 'value': 100, 'annotation': { 'description': 'dashed line' } },
|
|
23
|
-
{ 'id': 'dotted', 'value': 300, 'annotation': { 'description': 'dotted line' } }
|
|
24
|
-
]
|
|
23
|
+
{ 'id': 'dotted', 'value': 300, 'annotation': { 'description': 'dotted line' } },
|
|
24
|
+
],
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
'id': 'style',
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
'id': 'thickness',
|
|
30
30
|
'typeid': 'Uint32',
|
|
31
31
|
'annotation': {
|
|
32
|
-
'description': 'border thickness in Pixels'
|
|
32
|
+
'description': 'border thickness in Pixels',
|
|
33
33
|
},
|
|
34
|
-
'unit': 'Adsk.Core:Units.Imaging-1.0.0'
|
|
35
|
-
}]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
34
|
+
'unit': 'Adsk.Core:Units.Imaging-1.0.0',
|
|
35
|
+
}],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
38
|
};
|
|
39
39
|
module.exports = templateSchema;
|
|
40
40
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodUIBorder.js","sourceRoot":"","sources":["../../../src/test/schemas/goodUIBorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,2BAA2B;QACrC,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,MAAM;gBAChB,YAAY,EAAE;oBACV,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE;oBAC9E,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE;oBAChF,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE;iBACnF;aACJ;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,CAAC;wBACX,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE,QAAQ;wBAClB,YAAY,EAAE;4BACV,aAAa,EAAE,4BAA4B;yBAC9C;wBACD,MAAM,EAAE,+BAA+B;qBAC1C,CAAC;aACL;SACJ;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'Adsk.Core:UI.Border-1.0.0',\n 'properties': [{\n 'id': 'lineType',\n 'typeid': 'Enum',\n 'properties': [\n { 'id': 'solid', 'value': 200, 'annotation': { 'description': 'solid line' } },\n { 'id': 'dashed', 'value': 100, 'annotation': { 'description': 'dashed line' } },\n { 'id': 'dotted', 'value': 300, 'annotation': { 'description': 'dotted line' } }
|
|
1
|
+
{"version":3,"file":"goodUIBorder.js","sourceRoot":"","sources":["../../../src/test/schemas/goodUIBorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;GAGG;AACH,CAAC;IACG;;;;OAIG;IACH,IAAI,cAAc,GAAG;QACjB,QAAQ,EAAE,2BAA2B;QACrC,YAAY,EAAE,CAAC;gBACP,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,MAAM;gBAChB,YAAY,EAAE;oBACV,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE;oBAC9E,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE;oBAChF,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE;iBACnF;aACJ;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,CAAC;wBACX,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE,QAAQ;wBAClB,YAAY,EAAE;4BACV,aAAa,EAAE,4BAA4B;yBAC9C;wBACD,MAAM,EAAE,+BAA+B;qBAC1C,CAAC;aACL;SACJ;KACJ,CAAC;IACF,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC;AACpC,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n(function() {\n /**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\n var templateSchema = {\n 'typeid': 'Adsk.Core:UI.Border-1.0.0',\n 'properties': [{\n 'id': 'lineType',\n 'typeid': 'Enum',\n 'properties': [\n { 'id': 'solid', 'value': 200, 'annotation': { 'description': 'solid line' } },\n { 'id': 'dashed', 'value': 100, 'annotation': { 'description': 'dashed line' } },\n { 'id': 'dotted', 'value': 300, 'annotation': { 'description': 'dotted line' } },\n ],\n },\n {\n 'id': 'style',\n 'properties': [{\n 'id': 'thickness',\n 'typeid': 'Uint32',\n 'annotation': {\n 'description': 'border thickness in Pixels',\n },\n 'unit': 'Adsk.Core:Units.Imaging-1.0.0',\n }],\n },\n ],\n };\n module.exports = templateSchema;\n})();\n"]}
|
|
@@ -232,8 +232,8 @@
|
|
|
232
232
|
"affectsGlobalScope": false
|
|
233
233
|
},
|
|
234
234
|
"../changeset_operations/arrayChangesetIterator.d.ts": {
|
|
235
|
-
"version": "
|
|
236
|
-
"signature": "
|
|
235
|
+
"version": "521e70241ef4038881395d05db810a4f0dd00b2071cb1955a0e7b284616170c6",
|
|
236
|
+
"signature": "521e70241ef4038881395d05db810a4f0dd00b2071cb1955a0e7b284616170c6",
|
|
237
237
|
"affectsGlobalScope": false
|
|
238
238
|
},
|
|
239
239
|
"../changeset_operations/array.d.ts": {
|
|
@@ -257,17 +257,17 @@
|
|
|
257
257
|
"affectsGlobalScope": false
|
|
258
258
|
},
|
|
259
259
|
"../../src/test/array.spec.ts": {
|
|
260
|
-
"version": "
|
|
260
|
+
"version": "0aadd2fad7f47bd244da6b7ceeb7d875f16e83dcff30edb4f2a8ccfbd4741a3a",
|
|
261
261
|
"signature": "abc949a48872f03572ff3108a999c28e5e394296186194fa9e4ad357fa3cfcd7",
|
|
262
262
|
"affectsGlobalScope": false
|
|
263
263
|
},
|
|
264
264
|
"../pathHelper.d.ts": {
|
|
265
|
-
"version": "
|
|
266
|
-
"signature": "
|
|
265
|
+
"version": "e767784c9d3ac35853ab4606c55167be0ca5235429641d375335523e0cdcb828",
|
|
266
|
+
"signature": "e767784c9d3ac35853ab4606c55167be0ca5235429641d375335523e0cdcb828",
|
|
267
267
|
"affectsGlobalScope": false
|
|
268
268
|
},
|
|
269
269
|
"../../src/test/pathHelper.spec.ts": {
|
|
270
|
-
"version": "
|
|
270
|
+
"version": "986d8abd8a5c1c819b3c3ac494d1198040b1745051411b165be96568e043fa86",
|
|
271
271
|
"signature": "8ad26b88ae4afb442683c252e2aec17a13470599b768ce678a21620b8591e930",
|
|
272
272
|
"affectsGlobalScope": false
|
|
273
273
|
},
|
|
@@ -282,8 +282,8 @@
|
|
|
282
282
|
"affectsGlobalScope": false
|
|
283
283
|
},
|
|
284
284
|
"../templateValidator.d.ts": {
|
|
285
|
-
"version": "
|
|
286
|
-
"signature": "
|
|
285
|
+
"version": "1840555ab8869b114e75f90fbaa38689769eb9f6e9f23b4b87c3a6547a120a0b",
|
|
286
|
+
"signature": "1840555ab8869b114e75f90fbaa38689769eb9f6e9f23b4b87c3a6547a120a0b",
|
|
287
287
|
"affectsGlobalScope": false
|
|
288
288
|
},
|
|
289
289
|
"../helpers/typeidHelper.d.ts": {
|
|
@@ -292,67 +292,67 @@
|
|
|
292
292
|
"affectsGlobalScope": false
|
|
293
293
|
},
|
|
294
294
|
"../../src/test/schemaValidator.ts": {
|
|
295
|
-
"version": "
|
|
295
|
+
"version": "8e41c7bae6a18a80d9b2d3cffb278c32468519b4ecd5068d11ac66e39ec2863d",
|
|
296
296
|
"signature": "09696b20409adde103678012c7c844922ccdc37c17836d83c23d16cabad567bf",
|
|
297
297
|
"affectsGlobalScope": false
|
|
298
298
|
},
|
|
299
299
|
"../../src/test/schemas/badBothPropertiesAndTypeid.ts": {
|
|
300
|
-
"version": "
|
|
300
|
+
"version": "a05c24245de393428c87d935f017f5eb413d828966b8d679d08236b4f6e4718d",
|
|
301
301
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
302
302
|
"affectsGlobalScope": true
|
|
303
303
|
},
|
|
304
304
|
"../../src/test/schemas/badInvalidSemverInTypeid.ts": {
|
|
305
|
-
"version": "
|
|
305
|
+
"version": "af0d4bd8f72a86fe127b70b450ad6da1f5e5a99d913ea69f34a4a60fe01e2ac1",
|
|
306
306
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
307
307
|
"affectsGlobalScope": true
|
|
308
308
|
},
|
|
309
309
|
"../../src/test/schemas/badMissingSemverInTypeid.ts": {
|
|
310
|
-
"version": "
|
|
310
|
+
"version": "a5ace5338a1fcb53baf6ca79933b410292f02c4a5310f387b259ee388b3c515f",
|
|
311
311
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
312
312
|
"affectsGlobalScope": true
|
|
313
313
|
},
|
|
314
314
|
"../../src/test/schemas/badNestedProperties.ts": {
|
|
315
|
-
"version": "
|
|
315
|
+
"version": "23bd3e6d0ae175bf64d4663571f6e8d1eb7bb1689d22ac0767edddb7ccff2c35",
|
|
316
316
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
317
317
|
"affectsGlobalScope": true
|
|
318
318
|
},
|
|
319
319
|
"../../src/test/schemas/badPrimitiveTypeid.ts": {
|
|
320
|
-
"version": "
|
|
320
|
+
"version": "787a8b81ee1b603b8c171053d934416b4c6c7669ab2197b866a63ddc17aee047",
|
|
321
321
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
322
322
|
"affectsGlobalScope": true
|
|
323
323
|
},
|
|
324
324
|
"../../src/test/schemas/badVersionedTypeid.ts": {
|
|
325
|
-
"version": "
|
|
325
|
+
"version": "4d69f21bd866f6a542689c6e1001574978d94d513873c748a2fc57d655118023",
|
|
326
326
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
327
327
|
"affectsGlobalScope": true
|
|
328
328
|
},
|
|
329
329
|
"../../src/test/schemas/goodColorPalette.ts": {
|
|
330
|
-
"version": "
|
|
330
|
+
"version": "df48817c63cb5955ce0e1f21c57418aba1785eeaa35c4b8aadc7df3f4b83086f",
|
|
331
331
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
332
332
|
"affectsGlobalScope": true
|
|
333
333
|
},
|
|
334
334
|
"../../src/test/schemas/goodDraftAsVersion.ts": {
|
|
335
|
-
"version": "
|
|
335
|
+
"version": "3179622a2e05a59e1104e7f28f1e407119b7c47d0c01e617f82790e4591fe592",
|
|
336
336
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
337
337
|
"affectsGlobalScope": true
|
|
338
338
|
},
|
|
339
339
|
"../../src/test/schemas/goodPointId.ts": {
|
|
340
|
-
"version": "
|
|
340
|
+
"version": "6a21fb3374bab4a2a807b8f1ab538488e71650ebf1370c45e533281d2f28b59c",
|
|
341
341
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
342
342
|
"affectsGlobalScope": true
|
|
343
343
|
},
|
|
344
344
|
"../../src/test/schemas/goodReferenceAndRegular.ts": {
|
|
345
|
-
"version": "
|
|
345
|
+
"version": "22a409fc6f9c0b55d0ff1146c8415125766b5dbe73bb23ff15ed9937e423a7c9",
|
|
346
346
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
347
347
|
"affectsGlobalScope": true
|
|
348
348
|
},
|
|
349
349
|
"../../src/test/schemas/goodReservedTypes.ts": {
|
|
350
|
-
"version": "
|
|
350
|
+
"version": "f724101943b8cc1c96851b31ba4d95eeb8b82d578a0ae1702753c71d27263410",
|
|
351
351
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
352
352
|
"affectsGlobalScope": true
|
|
353
353
|
},
|
|
354
354
|
"../../src/test/schemas/goodUIBorder.ts": {
|
|
355
|
-
"version": "
|
|
355
|
+
"version": "8450fc871ee026acfe464e1b0a4b72acf66739131c44724131fb86c8e247c5ed",
|
|
356
356
|
"signature": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
357
357
|
"affectsGlobalScope": true
|
|
358
358
|
},
|
|
@@ -362,12 +362,12 @@
|
|
|
362
362
|
"affectsGlobalScope": false
|
|
363
363
|
},
|
|
364
364
|
"../../src/test/validator/templateValidator.spec.ts": {
|
|
365
|
-
"version": "
|
|
365
|
+
"version": "7968a169abfee9ed350365d3f80dd5343f08338a26f0eb1e845ad7655721f4ac",
|
|
366
366
|
"signature": "72b1289d24001a442bbabb2113684a4c514e1ca387fa9631dc7590d2a914ec20",
|
|
367
367
|
"affectsGlobalScope": false
|
|
368
368
|
},
|
|
369
369
|
"../../src/test/validator/typeidHelper.spec.ts": {
|
|
370
|
-
"version": "
|
|
370
|
+
"version": "4bc3ad225f1f3321c19517b1c398dcb3b3eb79ab5a511588dc07b7fdffef738e",
|
|
371
371
|
"signature": "e4058bce831379186fdac71c63217427f484510fc574367da812a61588cb4a6b",
|
|
372
372
|
"affectsGlobalScope": false
|
|
373
373
|
},
|
|
@@ -25,7 +25,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
return new Promise(resolve => {
|
|
28
|
+
return new Promise((resolve) => {
|
|
29
29
|
resolve(schemaValidator.validate(template, templatePrevious, async, skipSemver));
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -673,7 +673,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
673
673
|
let template = JSON.parse(JSON.stringify(templatePrevious));
|
|
674
674
|
let copies = [
|
|
675
675
|
JSON.parse(JSON.stringify(templatePrevious)),
|
|
676
|
-
JSON.parse(JSON.stringify(template))
|
|
676
|
+
JSON.parse(JSON.stringify(template)),
|
|
677
677
|
];
|
|
678
678
|
let expectations = function (result) {
|
|
679
679
|
chai_1.expect(result).property('isValid', true);
|
|
@@ -721,7 +721,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
721
721
|
it('should pass a schema with an empty array of properties', function () {
|
|
722
722
|
let EmptyPropertySchema = {
|
|
723
723
|
typeid: 'Test:EmptyPropertySchema-1.0.0',
|
|
724
|
-
properties: []
|
|
724
|
+
properties: [],
|
|
725
725
|
};
|
|
726
726
|
let expectations = function (result) {
|
|
727
727
|
chai_1.expect(result.isValid).to.equal(true);
|
|
@@ -763,10 +763,10 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
763
763
|
describe('pass: deep equal between no properties and an empty properties array', () => {
|
|
764
764
|
let templateArray = {
|
|
765
765
|
typeid: 'SimpleTest:Shape-1.0.0',
|
|
766
|
-
properties: []
|
|
766
|
+
properties: [],
|
|
767
767
|
};
|
|
768
768
|
let templateAbstract = {
|
|
769
|
-
typeid: 'SimpleTest:Shape-1.0.0'
|
|
769
|
+
typeid: 'SimpleTest:Shape-1.0.0',
|
|
770
770
|
};
|
|
771
771
|
it('source is abstract and target is an empty properties array', function () {
|
|
772
772
|
let expectations = function (result) {
|
|
@@ -795,7 +795,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
795
795
|
new templateValidator_1.TemplateValidator({
|
|
796
796
|
skipSemver: true,
|
|
797
797
|
inheritsFrom: schemaValidator.inheritsFrom,
|
|
798
|
-
hasSchema: schemaValidator.hasSchema
|
|
798
|
+
hasSchema: schemaValidator.hasSchema,
|
|
799
799
|
});
|
|
800
800
|
});
|
|
801
801
|
let expectationsGenerator = function (msg) {
|
|
@@ -809,7 +809,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
809
809
|
it('should pass a valid template', function () {
|
|
810
810
|
let ConstantValid = {
|
|
811
811
|
typeid: 'ConstantTest:ConstantValid-1.0.0',
|
|
812
|
-
constants: [{ id: 'valid', typeid: 'String', value: 'value' }]
|
|
812
|
+
constants: [{ id: 'valid', typeid: 'String', value: 'value' }],
|
|
813
813
|
};
|
|
814
814
|
let expectations = function (result) {
|
|
815
815
|
chai_1.expect(result.isValid).to.equal(true);
|
|
@@ -820,25 +820,25 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
820
820
|
it('should fail if constants array has no elements', function () {
|
|
821
821
|
let ConstantEmptyArray = {
|
|
822
822
|
typeid: 'ConstantTest:ConstantEmptyArray-1.0.0',
|
|
823
|
-
constants: []
|
|
823
|
+
constants: [],
|
|
824
824
|
};
|
|
825
825
|
return validate(expectationsGenerator('/constants should NOT have fewer than 1 items'), ConstantEmptyArray, null, true);
|
|
826
826
|
});
|
|
827
827
|
it('should fail if constant does not have an id', function () {
|
|
828
828
|
let ConstantNoId = {
|
|
829
829
|
typeid: 'ConstantTest:ConstantNoId-1.0.0',
|
|
830
|
-
constants: [{ typeid: 'String', value: 'value' }]
|
|
830
|
+
constants: [{ typeid: 'String', value: 'value' }],
|
|
831
831
|
};
|
|
832
832
|
return validate(expectationsGenerator('/constants/0 should have required property \'id\''), ConstantNoId, null, true);
|
|
833
833
|
});
|
|
834
834
|
it('should fail if constant does not have a typeid', function () {
|
|
835
835
|
let ConstantNoTypeid = {
|
|
836
836
|
typeid: 'ConstantTest:ConstantNoTypeid-1.0.0',
|
|
837
|
-
constants: [{ id: 'id', value: 'value' }]
|
|
837
|
+
constants: [{ id: 'id', value: 'value' }],
|
|
838
838
|
};
|
|
839
839
|
return validate(function (result) {
|
|
840
840
|
chai_1.expect(result.isValid).to.equal(false);
|
|
841
|
-
//console.log(result.errors);
|
|
841
|
+
// console.log(result.errors);
|
|
842
842
|
chai_1.expect(result.errors.length).to.equal(5);
|
|
843
843
|
chai_1.expect(result.errors[3].message).to.include("should have required property 'inherits'");
|
|
844
844
|
chai_1.expect(result.errors[4].message).to.include("/constants/0 should have required property 'typeid'");
|
|
@@ -849,7 +849,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
849
849
|
let ConstantNoTypeid = {
|
|
850
850
|
typeid: 'ConstantTest:ConstantNoTypeid-1.0.0',
|
|
851
851
|
inherits: 'ConstantTest:ConstantParentWithTypeid-1.0.0',
|
|
852
|
-
constants: [{ id: 'id', value: 'value' }]
|
|
852
|
+
constants: [{ id: 'id', value: 'value' }],
|
|
853
853
|
};
|
|
854
854
|
let expectations = function (result) {
|
|
855
855
|
chai_1.expect(result.isValid).to.equal(true);
|
|
@@ -860,7 +860,7 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
860
860
|
it('should not fail if constant does not have a value or typedValue', function () {
|
|
861
861
|
let ConstantNoValue = {
|
|
862
862
|
typeid: 'ConstantTest:ConstantNoValue-1.0.0',
|
|
863
|
-
constants: [{ id: 'id', typeid: 'String' }]
|
|
863
|
+
constants: [{ id: 'id', typeid: 'String' }],
|
|
864
864
|
};
|
|
865
865
|
let expectations = function (result) {
|
|
866
866
|
chai_1.expect(result.isValid).to.equal(true);
|
|
@@ -876,8 +876,8 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
876
876
|
typeid: 'Int32',
|
|
877
877
|
context: 'map',
|
|
878
878
|
contextKeyType: 'typeid',
|
|
879
|
-
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 }
|
|
880
|
-
}]
|
|
879
|
+
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 },
|
|
880
|
+
}],
|
|
881
881
|
};
|
|
882
882
|
let expectations = function (result) {
|
|
883
883
|
chai_1.expect(result.isValid).to.equal(true);
|
|
@@ -893,8 +893,8 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
893
893
|
typeid: 'Int32',
|
|
894
894
|
context: 'map',
|
|
895
895
|
contextKeyType: 'badvalue',
|
|
896
|
-
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 }
|
|
897
|
-
}]
|
|
896
|
+
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 },
|
|
897
|
+
}],
|
|
898
898
|
};
|
|
899
899
|
return validate(function (result) {
|
|
900
900
|
chai_1.expect(result.isValid).to.equal(false);
|
|
@@ -911,8 +911,8 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
911
911
|
typeid: 'Int32',
|
|
912
912
|
context: 'map',
|
|
913
913
|
contextKeyType: 'typeid',
|
|
914
|
-
value: { 'NotATypeId': 1, 'AlsoNotATypeId': -1 }
|
|
915
|
-
}]
|
|
914
|
+
value: { 'NotATypeId': 1, 'AlsoNotATypeId': -1 },
|
|
915
|
+
}],
|
|
916
916
|
};
|
|
917
917
|
let expectations = function (result) {
|
|
918
918
|
chai_1.expect(result.isValid).to.equal(false);
|
|
@@ -931,8 +931,8 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
931
931
|
typeid: 'Int32',
|
|
932
932
|
context: 'map',
|
|
933
933
|
contextKeyType: 'typeid',
|
|
934
|
-
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 }
|
|
935
|
-
}]
|
|
934
|
+
value: { 'SimpleTest:ConstantTemplate1-1.0.0': 1, 'SimpleTest:ConstantTemplate2-1.0.0': -1 },
|
|
935
|
+
}],
|
|
936
936
|
};
|
|
937
937
|
let expectations = function (result) {
|
|
938
938
|
throw new Error('This should not be called');
|
|
@@ -949,29 +949,29 @@ const templateValidator_1 = require("../../templateValidator");
|
|
|
949
949
|
let schemaValidator = new schemaValidator_1.SchemaValidator();
|
|
950
950
|
let templateValidator = new templateValidator_1.TemplateValidator({
|
|
951
951
|
inheritsFromAsync: schemaValidator.inheritsFromAsync,
|
|
952
|
-
hasSchemaAsync: schemaValidator.hasSchemaAsync
|
|
952
|
+
hasSchemaAsync: schemaValidator.hasSchemaAsync,
|
|
953
953
|
});
|
|
954
954
|
// Doesn't inherit from 'NamedProperty'. Will cause an error
|
|
955
955
|
let grandParentSchema = {
|
|
956
|
-
'typeid': 'test:grandparentschema-1.0.0'
|
|
956
|
+
'typeid': 'test:grandparentschema-1.0.0',
|
|
957
957
|
};
|
|
958
958
|
let parentSchema = {
|
|
959
959
|
'typeid': 'test:parentschema-1.0.0',
|
|
960
|
-
'inherits': ['test:grandparentschema-1.0.0']
|
|
960
|
+
'inherits': ['test:grandparentschema-1.0.0'],
|
|
961
961
|
};
|
|
962
962
|
let childSchema = {
|
|
963
963
|
'typeid': 'test:childchema-1.0.0',
|
|
964
964
|
properties: [{
|
|
965
965
|
id: 'set',
|
|
966
966
|
typeid: 'test:parentschema-1.0.0',
|
|
967
|
-
context: 'set'
|
|
968
|
-
}]
|
|
967
|
+
context: 'set',
|
|
968
|
+
}],
|
|
969
969
|
};
|
|
970
970
|
schemaValidator.register(grandParentSchema);
|
|
971
971
|
schemaValidator.register(parentSchema);
|
|
972
972
|
templateValidator.validateAsync(childSchema).then(() => {
|
|
973
973
|
done(new Error('Should not be valid!'));
|
|
974
|
-
}, error => {
|
|
974
|
+
}, (error) => {
|
|
975
975
|
chai_1.expect(error).to.exist;
|
|
976
976
|
done();
|
|
977
977
|
});
|