@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,103 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Basic implementation of part of the PropertyFactory needed to run test on validation.
|
|
7
|
+
*/
|
|
8
|
+
import { TypeIdHelper } from "../helpers/typeidHelper.js";
|
|
9
|
+
import { TemplateValidator } from "../templateValidator.js";
|
|
10
|
+
export class SchemaValidator {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.hasSchemaAsync = async (typeid) => new Promise((resolve, reject) => {
|
|
13
|
+
setTimeout(() => {
|
|
14
|
+
resolve(this.schemaMap[typeid] !== undefined);
|
|
15
|
+
}, 5);
|
|
16
|
+
});
|
|
17
|
+
this.schemaMap = {};
|
|
18
|
+
}
|
|
19
|
+
inheritsFrom(in_templateTypeid, in_baseTypeid, in_options) {
|
|
20
|
+
in_options = in_options || {};
|
|
21
|
+
if (in_templateTypeid === in_baseTypeid &&
|
|
22
|
+
(!!in_options.includeSelf || in_options.includeSelf === undefined)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
const parents = {};
|
|
26
|
+
this.getAllParentsForTemplate(in_templateTypeid, parents, true);
|
|
27
|
+
return parents[in_baseTypeid] !== undefined;
|
|
28
|
+
}
|
|
29
|
+
hasSchema(typeid) {
|
|
30
|
+
return this.schemaMap[typeid] !== undefined;
|
|
31
|
+
}
|
|
32
|
+
register(schema) {
|
|
33
|
+
this.schemaMap[schema.typeid] = schema;
|
|
34
|
+
}
|
|
35
|
+
async inheritsFromAsync(child, ancestor) {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
try {
|
|
39
|
+
resolve(this.inheritsFrom(child, ancestor));
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error("Error in inheritsFrom: ", error);
|
|
43
|
+
reject(error);
|
|
44
|
+
}
|
|
45
|
+
}, 5);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getAllParentsForTemplate(in_typeid, out_parents, in_includeBaseProperty) {
|
|
49
|
+
if (TypeIdHelper.isPrimitiveType(in_typeid)) {
|
|
50
|
+
// Everything inherits from BaseProperty.
|
|
51
|
+
if (in_includeBaseProperty) {
|
|
52
|
+
out_parents.ContainerProperty = true;
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const template = this.schemaMap[in_typeid];
|
|
57
|
+
if (!template) {
|
|
58
|
+
throw new Error(`Missing typeid: ${in_typeid}`);
|
|
59
|
+
}
|
|
60
|
+
// Everything inherits from BaseProperty.
|
|
61
|
+
if (in_includeBaseProperty) {
|
|
62
|
+
out_parents.ContainerProperty = true;
|
|
63
|
+
}
|
|
64
|
+
// Run over all parents and insert them into the parents array
|
|
65
|
+
if (template.inherits) {
|
|
66
|
+
// We have to distinguish the cases where the parents are either specified as a single string or an array
|
|
67
|
+
const parents = Array.isArray(template.inherits)
|
|
68
|
+
? template.inherits
|
|
69
|
+
: [template.inherits];
|
|
70
|
+
for (let i = 0; i < parents.length; i++) {
|
|
71
|
+
// Mark it as parent
|
|
72
|
+
out_parents[parents[i]] = true;
|
|
73
|
+
// Continue recursively
|
|
74
|
+
this.getAllParentsForTemplate(parents[i], out_parents, undefined);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
|
79
|
+
validate(in_schema, in_previousSchema, in_async, in_skipSemver, in_allowDraft) {
|
|
80
|
+
in_skipSemver = in_skipSemver || false;
|
|
81
|
+
if (in_async) {
|
|
82
|
+
let options = {
|
|
83
|
+
inheritsFromAsync: this.inheritsFromAsync,
|
|
84
|
+
hasSchemaAsync: this.hasSchemaAsync,
|
|
85
|
+
skipSemver: in_skipSemver,
|
|
86
|
+
allowDraft: in_allowDraft,
|
|
87
|
+
};
|
|
88
|
+
let templateValidator = new TemplateValidator(options);
|
|
89
|
+
return templateValidator.validateAsync(in_schema, in_previousSchema);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
let options = {
|
|
93
|
+
inheritsFrom: this.inheritsFrom,
|
|
94
|
+
hasSchema: this.hasSchema,
|
|
95
|
+
skipSemver: in_skipSemver,
|
|
96
|
+
allowDraft: in_allowDraft,
|
|
97
|
+
};
|
|
98
|
+
let templateValidator = new TemplateValidator(options);
|
|
99
|
+
return templateValidator.validate(in_schema, in_previousSchema);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=schemaValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaValidator.js","sourceRoot":"","sources":["../../src/test/schemaValidator.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Basic implementation of part of the PropertyFactory needed to run test on validation.\n */\n\nimport { TypeIdHelper } from \"../helpers/typeidHelper.js\";\nimport { type PropertySchema, TemplateValidator } from \"../templateValidator.js\";\nimport type { SchemaValidationResult } from \"../validationResultBuilder.js\";\n\nexport class SchemaValidator {\n\tschemaMap: Record<string, any>;\n\tconstructor() {\n\t\tthis.schemaMap = {};\n\t}\n\n\tinheritsFrom(\n\t\tin_templateTypeid: string,\n\t\tin_baseTypeid: string | number,\n\t\tin_options?: { includeSelf?: any },\n\t) {\n\t\tin_options = in_options || {};\n\n\t\tif (\n\t\t\tin_templateTypeid === in_baseTypeid &&\n\t\t\t(!!in_options.includeSelf || in_options.includeSelf === undefined)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst parents = {};\n\t\tthis.getAllParentsForTemplate(in_templateTypeid, parents, true);\n\n\t\treturn parents[in_baseTypeid] !== undefined;\n\t}\n\n\thasSchema(typeid: string | number) {\n\t\treturn this.schemaMap[typeid] !== undefined;\n\t}\n\n\tregister(schema) {\n\t\tthis.schemaMap[schema.typeid] = schema;\n\t}\n\n\tasync inheritsFromAsync(child, ancestor): Promise<boolean> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(this.inheritsFrom(child, ancestor));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\"Error in inheritsFrom: \", error);\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t}, 5);\n\t\t});\n\t}\n\n\thasSchemaAsync = async (typeid) =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tresolve(this.schemaMap[typeid] !== undefined);\n\t\t\t}, 5);\n\t\t});\n\n\tgetAllParentsForTemplate(in_typeid: string, out_parents, in_includeBaseProperty) {\n\t\tif (TypeIdHelper.isPrimitiveType(in_typeid)) {\n\t\t\t// Everything inherits from BaseProperty.\n\t\t\tif (in_includeBaseProperty) {\n\t\t\t\tout_parents.ContainerProperty = true;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst template = this.schemaMap[in_typeid];\n\t\tif (!template) {\n\t\t\tthrow new Error(`Missing typeid: ${in_typeid}`);\n\t\t}\n\n\t\t// Everything inherits from BaseProperty.\n\t\tif (in_includeBaseProperty) {\n\t\t\tout_parents.ContainerProperty = true;\n\t\t}\n\n\t\t// Run over all parents and insert them into the parents array\n\t\tif (template.inherits) {\n\t\t\t// We have to distinguish the cases where the parents are either specified as a single string or an array\n\t\t\tconst parents = Array.isArray(template.inherits)\n\t\t\t\t? template.inherits\n\t\t\t\t: [template.inherits];\n\n\t\t\tfor (let i = 0; i < parents.length; i++) {\n\t\t\t\t// Mark it as parent\n\t\t\t\tout_parents[parents[i]] = true;\n\n\t\t\t\t// Continue recursively\n\t\t\t\tthis.getAllParentsForTemplate(parents[i], out_parents, undefined);\n\t\t\t}\n\t\t}\n\t}\n\n\tvalidate(\n\t\tin_schema: PropertySchema,\n\t\tin_previousSchema: PropertySchema,\n\t\tin_async: true,\n\t\tin_skipSemver?: boolean,\n\t\tin_allowDraft?: boolean,\n\t): Promise<SchemaValidationResult>;\n\tvalidate(\n\t\tin_schema: PropertySchema,\n\t\tin_previousSchema?: PropertySchema,\n\t\tin_async?: false,\n\t\tin_skipSemver?: boolean,\n\t\tin_allowDraft?: boolean,\n\t): SchemaValidationResult;\n\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\tvalidate(\n\t\tin_schema: PropertySchema,\n\t\tin_previousSchema?: PropertySchema,\n\t\tin_async?: boolean,\n\t\tin_skipSemver?: boolean,\n\t\tin_allowDraft?: boolean,\n\t) {\n\t\tin_skipSemver = in_skipSemver || false;\n\n\t\tif (in_async) {\n\t\t\tlet options = {\n\t\t\t\tinheritsFromAsync: this.inheritsFromAsync as any,\n\t\t\t\thasSchemaAsync: this.hasSchemaAsync as any,\n\t\t\t\tskipSemver: in_skipSemver,\n\t\t\t\tallowDraft: in_allowDraft,\n\t\t\t};\n\t\t\tlet templateValidator = new TemplateValidator(options);\n\n\t\t\treturn templateValidator.validateAsync(in_schema, in_previousSchema);\n\t\t} else {\n\t\t\tlet options = {\n\t\t\t\tinheritsFrom: this.inheritsFrom as any,\n\t\t\t\thasSchema: this.hasSchema as any,\n\t\t\t\tskipSemver: in_skipSemver,\n\t\t\t\tallowDraft: in_allowDraft,\n\t\t\t};\n\t\t\tlet templateValidator = new TemplateValidator(options);\n\n\t\t\treturn templateValidator.validate(in_schema, in_previousSchema);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badBothPropertiesAndTypeid.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "r",
|
|
18
|
+
typeid: "Float32",
|
|
19
|
+
properties: [{ typeid: "Int32", id: "ri" }],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=badBothPropertiesAndTypeid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badBothPropertiesAndTypeid.js","sourceRoot":"","sources":["../../../src/test/schemas/badBothPropertiesAndTypeid.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;SAC3C;KACD;IACD,MAAM,EAAE,kCAAkC;CAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badBothPropertiesAndTypeid.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"r\",\n\t\t\ttypeid: \"Float32\",\n\t\t\tproperties: [{ typeid: \"Int32\", id: \"ri\" }],\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template semver testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "position",
|
|
18
|
+
properties: [
|
|
19
|
+
{
|
|
20
|
+
id: "x",
|
|
21
|
+
typeid: "Float32",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "y",
|
|
25
|
+
typeid: "Float32",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "z",
|
|
29
|
+
typeid: "Float32",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "color",
|
|
35
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "normal",
|
|
39
|
+
typeid: "Float32",
|
|
40
|
+
context: "array",
|
|
41
|
+
length: 3,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
typeid: "TeamLeoValidation2:PointID-1.0.0.1",
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=badInvalidSemverInTypeid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badInvalidSemverInTypeid.js","sourceRoot":"","sources":["../../../src/test/schemas/badInvalidSemverInTypeid.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,UAAU;YACd,UAAU,EAAE;gBACX;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;aACD;SACD;QACD;YACC,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,kCAAkC;SAC1C;QACD;YACC,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,CAAC;SACT;KACD;IACD,MAAM,EAAE,oCAAoC;CAC5C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template semver testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"position\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"x\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"y\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"z\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tid: \"color\",\n\t\t\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n\t\t},\n\t\t{\n\t\t\tid: \"normal\",\n\t\t\ttypeid: \"Float32\",\n\t\t\tcontext: \"array\",\n\t\t\tlength: 3,\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:PointID-1.0.0.1\",\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template semver testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "position",
|
|
18
|
+
properties: [
|
|
19
|
+
{
|
|
20
|
+
id: "x",
|
|
21
|
+
typeid: "Float32",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "y",
|
|
25
|
+
typeid: "Float32",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "z",
|
|
29
|
+
typeid: "Float32",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "color",
|
|
35
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "normal",
|
|
39
|
+
typeid: "Float32",
|
|
40
|
+
context: "array",
|
|
41
|
+
length: 3,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
typeid: "TeamLeoValidation2:PointID",
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=badMissingSemverInTypeid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badMissingSemverInTypeid.js","sourceRoot":"","sources":["../../../src/test/schemas/badMissingSemverInTypeid.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,UAAU;YACd,UAAU,EAAE;gBACX;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;aACD;SACD;QACD;YACC,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,kCAAkC;SAC1C;QACD;YACC,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,CAAC;SACT;KACD;IACD,MAAM,EAAE,4BAA4B;CACpC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template semver testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"position\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"x\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"y\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"z\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tid: \"color\",\n\t\t\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n\t\t},\n\t\t{\n\t\t\tid: \"normal\",\n\t\t\ttypeid: \"Float32\",\n\t\t\tcontext: \"array\",\n\t\t\tlength: 3,\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:PointID\",\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "r",
|
|
18
|
+
typeid: "Float32",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "g",
|
|
22
|
+
typeid: "Float32",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "b",
|
|
26
|
+
typeid: "Float32",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "nest",
|
|
30
|
+
properties: [
|
|
31
|
+
{ id: "x", typeid: "Float32" },
|
|
32
|
+
{ id: "y", typeid: "Float32" },
|
|
33
|
+
{ id: "reftype", typeid: "Reference<NS.NS2:Core.Adsk.RefType-1.0.0>" },
|
|
34
|
+
{
|
|
35
|
+
id: "nestedAgain",
|
|
36
|
+
properties: [
|
|
37
|
+
{ id: "a", typeid: "Int32" },
|
|
38
|
+
{ id: "b", typeid: "Flob" },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
typeid: "TeamLeoValidation2:NestedTest-1.0.0",
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=badNestedProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badNestedProperties.js","sourceRoot":"","sources":["../../../src/test/schemas/badNestedProperties.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,MAAM;YACV,UAAU,EAAE;gBACX,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE;gBAC9B,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE;gBAC9B,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,2CAA2C,EAAE;gBACtE;oBACC,EAAE,EAAE,aAAa;oBACjB,UAAU,EAAE;wBACX,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;wBAC5B,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;qBAC3B;iBACD;aACD;SACD;KACD;IACD,MAAM,EAAE,qCAAqC;CAC7C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"r\",\n\t\t\ttypeid: \"Float32\",\n\t\t},\n\t\t{\n\t\t\tid: \"g\",\n\t\t\ttypeid: \"Float32\",\n\t\t},\n\t\t{\n\t\t\tid: \"b\",\n\t\t\ttypeid: \"Float32\",\n\t\t},\n\t\t{\n\t\t\tid: \"nest\",\n\t\t\tproperties: [\n\t\t\t\t{ id: \"x\", typeid: \"Float32\" },\n\t\t\t\t{ id: \"y\", typeid: \"Float32\" },\n\t\t\t\t{ id: \"reftype\", typeid: \"Reference<NS.NS2:Core.Adsk.RefType-1.0.0>\" },\n\t\t\t\t{\n\t\t\t\t\tid: \"nestedAgain\",\n\t\t\t\t\tproperties: [\n\t\t\t\t\t\t{ id: \"a\", typeid: \"Int32\" },\n\t\t\t\t\t\t{ id: \"b\", typeid: \"Flob\" },\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:NestedTest-1.0.0\",\n};\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "r",
|
|
18
|
+
typeid: "Float32",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "g",
|
|
22
|
+
typeid: "Float32",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "b",
|
|
26
|
+
typeid: "Flob32",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=badPrimitiveTypeid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badPrimitiveTypeid.js","sourceRoot":"","sources":["../../../src/test/schemas/badPrimitiveTypeid.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,SAAS;SACjB;QACD;YACC,EAAE,EAAE,GAAG;YACP,MAAM,EAAE,QAAQ;SAChB;KACD;IACD,MAAM,EAAE,kCAAkC;CAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"r\",\n\t\t\ttypeid: \"Float32\",\n\t\t},\n\t\t{\n\t\t\tid: \"g\",\n\t\t\ttypeid: \"Float32\",\n\t\t},\n\t\t{\n\t\t\tid: \"b\",\n\t\t\ttypeid: \"Flob32\",\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n};\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "position",
|
|
18
|
+
properties: [
|
|
19
|
+
{
|
|
20
|
+
id: "x",
|
|
21
|
+
typeid: "Float32",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "y",
|
|
25
|
+
typeid: "Float32",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "z",
|
|
29
|
+
typeid: "Float32",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "color",
|
|
35
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "normal",
|
|
39
|
+
typeid: "Float32",
|
|
40
|
+
context: "array",
|
|
41
|
+
length: 3,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
_comment: "typeid is missing",
|
|
45
|
+
typeid: "Int32",
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=badVersionedTypeid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badVersionedTypeid.js","sourceRoot":"","sources":["../../../src/test/schemas/badVersionedTypeid.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,UAAU;YACd,UAAU,EAAE;gBACX;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;aACD;SACD;QACD;YACC,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,kCAAkC;SAC1C;QACD;YACC,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,CAAC;SACT;KACD;IACD,QAAQ,EAAE,mBAAmB;IAC7B,MAAM,EAAE,OAAO;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"position\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"x\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"y\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"z\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tid: \"color\",\n\t\t\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n\t\t},\n\t\t{\n\t\t\tid: \"normal\",\n\t\t\ttypeid: \"Float32\",\n\t\t\tcontext: \"array\",\n\t\t\tlength: 3,\n\t\t},\n\t],\n\t_comment: \"typeid is missing\",\n\ttypeid: \"Int32\",\n};\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
typeid: "Adsk.Library:Colors.ColorPalette-1.0.0",
|
|
16
|
+
properties: [
|
|
17
|
+
{ id: "colors", typeid: "Reference<Adsk.Core:Math.Color-1.0.0>", context: "map" },
|
|
18
|
+
{ id: "testref", typeid: "Reference", context: "map" },
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=goodColorPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodColorPalette.js","sourceRoot":"","sources":["../../../src/test/schemas/goodColorPalette.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,MAAM,EAAE,wCAAwC;IAChD,UAAU,EAAE;QACX,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,uCAAuC,EAAE,OAAO,EAAE,KAAK,EAAE;QACjF,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE;KACtD;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\ttypeid: \"Adsk.Library:Colors.ColorPalette-1.0.0\",\n\tproperties: [\n\t\t{ id: \"colors\", typeid: \"Reference<Adsk.Core:Math.Color-1.0.0>\", context: \"map\" },\n\t\t{ id: \"testref\", typeid: \"Reference\", context: \"map\" },\n\t],\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias goodDraftAsVersion.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
typeid: "autodesk:GoodDraftAsVersion-draft",
|
|
16
|
+
properties: [{ id: "int", typeid: "Int32" }],
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=goodDraftAsVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodDraftAsVersion.js","sourceRoot":"","sources":["../../../src/test/schemas/goodDraftAsVersion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,MAAM,EAAE,mCAAmC;IAC3C,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;CAC5C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias goodDraftAsVersion.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\ttypeid: \"autodesk:GoodDraftAsVersion-draft\",\n\tproperties: [{ id: \"int\", typeid: \"Int32\" }],\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
id: "position",
|
|
18
|
+
properties: [
|
|
19
|
+
{
|
|
20
|
+
id: "x",
|
|
21
|
+
typeid: "Float32",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "y",
|
|
25
|
+
typeid: "Float32",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "z",
|
|
29
|
+
typeid: "Float32",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "color",
|
|
35
|
+
typeid: "TeamLeoValidation2:ColorID-1.0.0",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "normal",
|
|
39
|
+
typeid: "Float32",
|
|
40
|
+
context: "array",
|
|
41
|
+
length: 3,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
typeid: "TeamLeoValidation2:PointID-1.0.0",
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=goodPointId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodPointId.js","sourceRoot":"","sources":["../../../src/test/schemas/goodPointId.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,UAAU,EAAE;QACX;YACC,EAAE,EAAE,UAAU;YACd,UAAU,EAAE;gBACX;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;gBACD;oBACC,EAAE,EAAE,GAAG;oBACP,MAAM,EAAE,SAAS;iBACjB;aACD;SACD;QACD;YACC,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,kCAAkC;SAC1C;QACD;YACC,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,CAAC;SACT;KACD;IACD,MAAM,EAAE,kCAAkC;CAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\tproperties: [\n\t\t{\n\t\t\tid: \"position\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"x\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"y\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"z\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tid: \"color\",\n\t\t\ttypeid: \"TeamLeoValidation2:ColorID-1.0.0\",\n\t\t},\n\t\t{\n\t\t\tid: \"normal\",\n\t\t\ttypeid: \"Float32\",\n\t\t\tcontext: \"array\",\n\t\t\tlength: 3,\n\t\t},\n\t],\n\ttypeid: \"TeamLeoValidation2:PointID-1.0.0\",\n};\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
typeid: "Adsk.Library:Colors.ColorPalette-1.0.0",
|
|
16
|
+
properties: [
|
|
17
|
+
{ id: "colorsRef", typeid: "Reference<Adsk.Core:Math.Color-1.0.0>", context: "map" },
|
|
18
|
+
{ id: "colors", typeid: "Adsk.Core:Math.Color-1.0.0" },
|
|
19
|
+
{ id: "testref", typeid: "Reference", context: "map" },
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=goodReferenceAndRegular.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodReferenceAndRegular.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReferenceAndRegular.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,MAAM,EAAE,wCAAwC;IAChD,UAAU,EAAE;QACX,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,uCAAuC,EAAE,OAAO,EAAE,KAAK,EAAE;QACpF,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,4BAA4B,EAAE;QACtD,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE;KACtD;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\ttypeid: \"Adsk.Library:Colors.ColorPalette-1.0.0\",\n\tproperties: [\n\t\t{ id: \"colorsRef\", typeid: \"Reference<Adsk.Core:Math.Color-1.0.0>\", context: \"map\" },\n\t\t{ id: \"colors\", typeid: \"Adsk.Core:Math.Color-1.0.0\" },\n\t\t{ id: \"testref\", typeid: \"Reference\", context: \"map\" },\n\t],\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
* Tests reserved types: NamedProperty and NodeProperty
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @namespace property-changeset.Test
|
|
12
|
+
* @alias goodReservedTypes.js
|
|
13
|
+
* Namespace containing all schema-related data for property set validation
|
|
14
|
+
*/
|
|
15
|
+
export const templateSchema = {
|
|
16
|
+
typeid: "TeamLeoValidation2:Example-1.0.0",
|
|
17
|
+
inherits: "NamedProperty",
|
|
18
|
+
properties: [
|
|
19
|
+
{
|
|
20
|
+
id: "exampleProperty1",
|
|
21
|
+
typeid: "String",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "exampleProperty2",
|
|
25
|
+
typeid: "NodeProperty",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=goodReservedTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodReservedTypes.js","sourceRoot":"","sources":["../../../src/test/schemas/goodReservedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,MAAM,EAAE,kCAAkC;IAC1C,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE;QACX;YACC,EAAE,EAAE,kBAAkB;YACtB,MAAM,EAAE,QAAQ;SAChB;QACD;YACC,EAAE,EAAE,kBAAkB;YACtB,MAAM,EAAE,cAAc;SACtB;KACD;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n * Tests reserved types: NamedProperty and NodeProperty\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias goodReservedTypes.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\ttypeid: \"TeamLeoValidation2:Example-1.0.0\",\n\tinherits: \"NamedProperty\",\n\tproperties: [\n\t\t{\n\t\t\tid: \"exampleProperty1\",\n\t\t\ttypeid: \"String\",\n\t\t},\n\t\t{\n\t\t\tid: \"exampleProperty2\",\n\t\t\ttypeid: \"NodeProperty\",\n\t\t},\n\t],\n};\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview
|
|
7
|
+
* Test data for property set template schema testing
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @namespace property-changeset.Test
|
|
11
|
+
* @alias badNestedProperties.js
|
|
12
|
+
* Namespace containing all schema-related data for property set validation
|
|
13
|
+
*/
|
|
14
|
+
export const templateSchema = {
|
|
15
|
+
typeid: "Adsk.Core:UI.Border-1.0.0",
|
|
16
|
+
properties: [
|
|
17
|
+
{
|
|
18
|
+
id: "lineType",
|
|
19
|
+
typeid: "Enum",
|
|
20
|
+
properties: [
|
|
21
|
+
{ id: "solid", value: 200, annotation: { description: "solid line" } },
|
|
22
|
+
{ id: "dashed", value: 100, annotation: { description: "dashed line" } },
|
|
23
|
+
{ id: "dotted", value: 300, annotation: { description: "dotted line" } },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "style",
|
|
28
|
+
properties: [
|
|
29
|
+
{
|
|
30
|
+
id: "thickness",
|
|
31
|
+
typeid: "Uint32",
|
|
32
|
+
annotation: {
|
|
33
|
+
description: "border thickness in Pixels",
|
|
34
|
+
},
|
|
35
|
+
unit: "Adsk.Core:Units.Imaging-1.0.0",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=goodUIBorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goodUIBorder.js","sourceRoot":"","sources":["../../../src/test/schemas/goodUIBorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,MAAM,EAAE,2BAA2B;IACnC,UAAU,EAAE;QACX;YACC,EAAE,EAAE,UAAU;YACd,MAAM,EAAE,MAAM;YACd,UAAU,EAAE;gBACX,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE;gBACtE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE;gBACxE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE;aACxE;SACD;QACD;YACC,EAAE,EAAE,OAAO;YACX,UAAU,EAAE;gBACX;oBACC,EAAE,EAAE,WAAW;oBACf,MAAM,EAAE,QAAQ;oBAChB,UAAU,EAAE;wBACX,WAAW,EAAE,4BAA4B;qBACzC;oBACD,IAAI,EAAE,+BAA+B;iBACrC;aACD;SACD;KACD;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Test data for property set template schema testing\n */\n\n/**\n * @namespace property-changeset.Test\n * @alias badNestedProperties.js\n * Namespace containing all schema-related data for property set validation\n */\nexport const templateSchema = {\n\ttypeid: \"Adsk.Core:UI.Border-1.0.0\",\n\tproperties: [\n\t\t{\n\t\t\tid: \"lineType\",\n\t\t\ttypeid: \"Enum\",\n\t\t\tproperties: [\n\t\t\t\t{ id: \"solid\", value: 200, annotation: { description: \"solid line\" } },\n\t\t\t\t{ id: \"dashed\", value: 100, annotation: { description: \"dashed line\" } },\n\t\t\t\t{ id: \"dotted\", value: 300, annotation: { description: \"dotted line\" } },\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tid: \"style\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"thickness\",\n\t\t\t\t\ttypeid: \"Uint32\",\n\t\t\t\t\tannotation: {\n\t\t\t\t\t\tdescription: \"border thickness in Pixels\",\n\t\t\t\t\t},\n\t\t\t\t\tunit: \"Adsk.Core:Units.Imaging-1.0.0\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import * as badBothPropertiesAndTypeid from "./badBothPropertiesAndTypeid.js";
|
|
6
|
+
export { badBothPropertiesAndTypeid };
|
|
7
|
+
import * as badInvalidSemverInTypeid from "./badInvalidSemverInTypeid.js";
|
|
8
|
+
export { badInvalidSemverInTypeid };
|
|
9
|
+
import * as badMissingSemverInTypeid from "./badMissingSemverInTypeid.js";
|
|
10
|
+
export { badMissingSemverInTypeid };
|
|
11
|
+
import * as badNestedProperties from "./badNestedProperties.js";
|
|
12
|
+
export { badNestedProperties };
|
|
13
|
+
import * as badPrimitiveTypeid from "./badPrimitiveTypeid.js";
|
|
14
|
+
export { badPrimitiveTypeid };
|
|
15
|
+
import * as badVersionedTypeid from "./badVersionedTypeid.js";
|
|
16
|
+
export { badVersionedTypeid };
|
|
17
|
+
import * as goodColorPalette from "./goodColorPalette.js";
|
|
18
|
+
export { goodColorPalette };
|
|
19
|
+
import * as goodDraftAsVersion from "./goodDraftAsVersion.js";
|
|
20
|
+
export { goodDraftAsVersion };
|
|
21
|
+
import * as goodPointId from "./goodPointId.js";
|
|
22
|
+
export { goodPointId };
|
|
23
|
+
import * as goodReferenceAndRegular from "./goodReferenceAndRegular.js";
|
|
24
|
+
export { goodReferenceAndRegular };
|
|
25
|
+
import * as goodReservedTypes from "./goodReservedTypes.js";
|
|
26
|
+
export { goodReservedTypes };
|
|
27
|
+
import * as goodUIBorder from "./goodUIBorder.js";
|
|
28
|
+
export { goodUIBorder };
|
|
29
|
+
//# sourceMappingURL=index.js.map
|