devextreme-internal-tools 12.0.0-beta.1 → 12.0.0-beta.10

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.
Files changed (195) hide show
  1. package/bin/DevExtreme.Declarations.Discoverer.dll +0 -0
  2. package/bin/DevExtreme.Declarations.Discoverer.exe +0 -0
  3. package/bin/DevExtreme.Declarations.IntegrityValidator.dll +0 -0
  4. package/bin/DevExtreme.Declarations.IntegrityValidator.exe +0 -0
  5. package/bin/DevExtreme.Declarations.dll +0 -0
  6. package/bin/DevExtreme.Descriptions.Injector.dll +0 -0
  7. package/bin/DevExtreme.Descriptions.Injector.exe +0 -0
  8. package/bin/DevExtreme.Infrastructure.dll +0 -0
  9. package/bin/DevExtreme.IntegrationDataGenerator.dll +0 -0
  10. package/bin/DevExtreme.IntegrationDataGenerator.exe +0 -0
  11. package/bin/DevExtreme.NgSmdGenerator.dll +0 -0
  12. package/bin/DevExtreme.NgSmdGenerator.exe +0 -0
  13. package/bin/DevExtreme.SmdCommon.dll +0 -0
  14. package/bin/DevExtreme.StrongMetaDataGenerator.dll +0 -0
  15. package/bin/DevExtreme.StrongMetaDataGenerator.exe +0 -0
  16. package/bin/DevExtreme.Topics.ExtraFilesGenerator.dll +0 -0
  17. package/bin/DevExtreme.Topics.ExtraFilesGenerator.exe +0 -0
  18. package/bin/DevExtreme.Topics.Generator.dll +0 -0
  19. package/bin/DevExtreme.Topics.Generator.exe +0 -0
  20. package/bin/DevExtreme.Topics.ModulesGuideValidator.dll +0 -0
  21. package/bin/DevExtreme.Topics.ModulesGuideValidator.exe +0 -0
  22. package/bin/DevExtreme.Topics.Validation.dll +0 -0
  23. package/bin/DevExtreme.Topics.Validation.exe +0 -0
  24. package/bin/DevExtreme.Topics.dll +0 -0
  25. package/bin/DevExtreme.WebSite.ContentMapCreator.dll +0 -0
  26. package/bin/DevExtreme.WebSite.ContentMapCreator.exe +0 -0
  27. package/bin/DevExtreme.WebSite.LinksConverter.dll +0 -0
  28. package/bin/DevExtreme.WebSite.LinksConverter.exe +0 -0
  29. package/bin/DevExtreme.WebSite.SyntaxDataGenerator.dll +0 -0
  30. package/bin/DevExtreme.WebSite.SyntaxDataGenerator.exe +0 -0
  31. package/bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
  32. package/bin/Microsoft.Extensions.DependencyInjection.dll +0 -0
  33. package/bin/NLog.dll +0 -0
  34. package/bin/Newtonsoft.Json.dll +0 -0
  35. package/bin/System.IO.Abstractions.dll +0 -0
  36. package/cli.d.ts +2 -0
  37. package/cli.js +50 -0
  38. package/cli.js.map +1 -0
  39. package/index.d.ts +9 -0
  40. package/index.js +18 -47
  41. package/index.js.map +1 -1
  42. package/integration-data-model.d.ts +76 -0
  43. package/integration-data-model.js +3 -0
  44. package/integration-data-model.js.map +1 -0
  45. package/package.json +28 -29
  46. package/ts/angular-components-generator/common-reexports-generator.d.ts +4 -0
  47. package/ts/angular-components-generator/common-reexports-generator.js +38 -0
  48. package/ts/angular-components-generator/common-reexports-generator.js.map +1 -0
  49. package/ts/angular-components-generator/component-names-generator.d.ts +8 -0
  50. package/ts/angular-components-generator/component-names-generator.js +31 -0
  51. package/ts/angular-components-generator/component-names-generator.js.map +1 -0
  52. package/ts/angular-components-generator/dot-generator.d.ts +8 -0
  53. package/ts/angular-components-generator/dot-generator.js +84 -0
  54. package/ts/angular-components-generator/dot-generator.js.map +1 -0
  55. package/ts/angular-components-generator/facade-generator.d.ts +4 -0
  56. package/ts/angular-components-generator/facade-generator.js +50 -0
  57. package/ts/angular-components-generator/facade-generator.js.map +1 -0
  58. package/ts/angular-components-generator/helpers.d.ts +2 -0
  59. package/ts/angular-components-generator/helpers.js +12 -0
  60. package/ts/angular-components-generator/helpers.js.map +1 -0
  61. package/ts/angular-components-generator/import-helper.d.ts +6 -0
  62. package/ts/angular-components-generator/import-helper.js +73 -0
  63. package/ts/angular-components-generator/import-helper.js.map +1 -0
  64. package/ts/angular-components-generator/logger.d.ts +1 -0
  65. package/ts/angular-components-generator/logger.js +16 -0
  66. package/ts/angular-components-generator/logger.js.map +1 -0
  67. package/ts/angular-components-generator/metadata-generator.d.ts +27 -0
  68. package/ts/angular-components-generator/metadata-generator.js +490 -0
  69. package/ts/angular-components-generator/metadata-generator.js.map +1 -0
  70. package/ts/angular-components-generator/metadata-model.d.ts +48 -0
  71. package/ts/angular-components-generator/metadata-model.js +3 -0
  72. package/ts/angular-components-generator/metadata-model.js.map +1 -0
  73. package/ts/angular-components-generator/module-facade-generator.d.ts +5 -0
  74. package/ts/angular-components-generator/module-facade-generator.js +50 -0
  75. package/ts/angular-components-generator/module-facade-generator.js.map +1 -0
  76. package/ts/angular-components-generator/templates/base-nested-component.tst +20 -0
  77. package/ts/angular-components-generator/templates/component.tst +253 -0
  78. package/ts/angular-components-generator/templates/nested-component.tst +140 -0
  79. package/ts/bundler/bundler.d.ts +6 -0
  80. package/ts/bundler/bundler.js +43 -45
  81. package/ts/bundler/bundler.js.map +1 -1
  82. package/ts/collapser/collapser.d.ts +4 -0
  83. package/ts/collapser/collapser.js +53 -49
  84. package/ts/collapser/collapser.js.map +1 -1
  85. package/ts/common/common-resolving.d.ts +11 -0
  86. package/ts/common/common-resolving.js +7 -7
  87. package/ts/common/common-resolving.js.map +1 -1
  88. package/ts/common/id.d.ts +12 -0
  89. package/ts/common/id.js +24 -20
  90. package/ts/common/id.js.map +1 -1
  91. package/ts/common/tags/comparing.d.ts +3 -0
  92. package/ts/common/tags/generating.d.ts +4 -0
  93. package/ts/common/tags/generating.js +16 -12
  94. package/ts/common/tags/generating.js.map +1 -1
  95. package/ts/common/tags/merging.d.ts +12 -0
  96. package/ts/common/tags/merging.js +14 -14
  97. package/ts/common/tags/merging.js.map +1 -1
  98. package/ts/common/tags/parameter-field-tag.d.ts +7 -0
  99. package/ts/common/tags/parameter-field-tag.js +2 -2
  100. package/ts/common/tags/parameter-field-tag.js.map +1 -1
  101. package/ts/common/tags.d.ts +12 -0
  102. package/ts/common/tags.js +24 -21
  103. package/ts/common/tags.js.map +1 -1
  104. package/ts/common/ts-type-resolving.d.ts +16 -0
  105. package/ts/common/ts-type-resolving.js +89 -89
  106. package/ts/common/ts-type-resolving.js.map +1 -1
  107. package/ts/common/ts-utils.d.ts +35 -0
  108. package/ts/common/ts-utils.js +59 -31
  109. package/ts/common/ts-utils.js.map +1 -1
  110. package/ts/common/type-resolving.d.ts +42 -0
  111. package/ts/common/type-resolving.js +52 -52
  112. package/ts/common/type-resolving.js.map +1 -1
  113. package/ts/common/utils.d.ts +22 -0
  114. package/ts/common/utils.js +5 -5
  115. package/ts/common/utils.js.map +1 -1
  116. package/ts/component-exports-generator/generator.d.ts +3 -0
  117. package/ts/component-exports-generator/generator.js +14 -14
  118. package/ts/component-exports-generator/generator.js.map +1 -1
  119. package/ts/components-generation/common-reexports-generator.d.ts +6 -0
  120. package/ts/components-generation/common-reexports-generator.js +27 -0
  121. package/ts/components-generation/common-reexports-generator.js.map +1 -0
  122. package/ts/components-generation/reexports-generator.d.ts +10 -0
  123. package/ts/components-generation/reexports-generator.js +18 -0
  124. package/ts/components-generation/reexports-generator.js.map +1 -0
  125. package/ts/components-generation/template.d.ts +22 -0
  126. package/ts/components-generation/template.js +57 -0
  127. package/ts/components-generation/template.js.map +1 -0
  128. package/ts/discoverer/data-model.d.ts +105 -0
  129. package/ts/discoverer/discovering-error.d.ts +4 -0
  130. package/ts/discoverer/discovering-error.js +2 -4
  131. package/ts/discoverer/discovering-error.js.map +1 -1
  132. package/ts/discoverer/discovering.d.ts +4 -0
  133. package/ts/discoverer/discovering.js +7 -7
  134. package/ts/discoverer/discovering.js.map +1 -1
  135. package/ts/discoverer/parsing/enum-collecting.d.ts +6 -0
  136. package/ts/discoverer/parsing/enum-collecting.js +19 -15
  137. package/ts/discoverer/parsing/enum-collecting.js.map +1 -1
  138. package/ts/discoverer/parsing/file-reader.d.ts +2 -0
  139. package/ts/discoverer/parsing/file-reader.js +8 -2
  140. package/ts/discoverer/parsing/file-reader.js.map +1 -1
  141. package/ts/discoverer/parsing/widget-parsing.d.ts +11 -0
  142. package/ts/discoverer/parsing/widget-parsing.js +15 -11
  143. package/ts/discoverer/parsing/widget-parsing.js.map +1 -1
  144. package/ts/discoverer/parsing.d.ts +29 -0
  145. package/ts/discoverer/parsing.js +60 -56
  146. package/ts/discoverer/parsing.js.map +1 -1
  147. package/ts/discoverer/types.d.ts +20 -0
  148. package/ts/logging.d.ts +16 -0
  149. package/ts/logging.js +14 -14
  150. package/ts/logging.js.map +1 -1
  151. package/ts/modules-meta-generator/modules-meta-generator.d.ts +3 -0
  152. package/ts/modules-meta-generator/modules-meta-generator.js +9 -10
  153. package/ts/modules-meta-generator/modules-meta-generator.js.map +1 -1
  154. package/ts/react-components-generator/component-generator.d.ts +62 -0
  155. package/ts/react-components-generator/component-generator.js +412 -0
  156. package/ts/react-components-generator/component-generator.js.map +1 -0
  157. package/ts/react-components-generator/converter.d.ts +3 -0
  158. package/ts/react-components-generator/converter.js +59 -0
  159. package/ts/react-components-generator/converter.js.map +1 -0
  160. package/ts/react-components-generator/generator.d.ts +60 -0
  161. package/ts/react-components-generator/generator.js +382 -0
  162. package/ts/react-components-generator/generator.js.map +1 -0
  163. package/ts/react-components-generator/helpers.d.ts +11 -0
  164. package/ts/react-components-generator/helpers.js +53 -0
  165. package/ts/react-components-generator/helpers.js.map +1 -0
  166. package/ts/react-components-generator/import-overrides.json +108 -0
  167. package/ts/react-components-generator/index-generator.d.ts +3 -0
  168. package/ts/react-components-generator/index-generator.js +22 -0
  169. package/ts/react-components-generator/index-generator.js.map +1 -0
  170. package/ts/scripts/args.d.ts +37 -0
  171. package/ts/scripts/args.js +7 -7
  172. package/ts/scripts/args.js.map +1 -1
  173. package/ts/scripts/helpers.d.ts +10 -0
  174. package/ts/scripts/helpers.js +12 -12
  175. package/ts/scripts/helpers.js.map +1 -1
  176. package/ts/scripts/tools.d.ts +17 -0
  177. package/ts/scripts/tools.js +30 -30
  178. package/ts/scripts/tools.js.map +1 -1
  179. package/ts/vue-components-generator/component-generator.d.ts +40 -0
  180. package/ts/vue-components-generator/component-generator.js +197 -0
  181. package/ts/vue-components-generator/component-generator.js.map +1 -0
  182. package/ts/vue-components-generator/converter.d.ts +3 -0
  183. package/ts/vue-components-generator/converter.js +45 -0
  184. package/ts/vue-components-generator/converter.js.map +1 -0
  185. package/ts/vue-components-generator/generator.d.ts +11 -0
  186. package/ts/vue-components-generator/generator.js +120 -0
  187. package/ts/vue-components-generator/generator.js.map +1 -0
  188. package/ts/vue-components-generator/helpers.d.ts +6 -0
  189. package/ts/vue-components-generator/helpers.js +30 -0
  190. package/ts/vue-components-generator/helpers.js.map +1 -0
  191. package/bin/integration-data-model.ts +0 -86
  192. package/bin/internal-tools-log.txt +0 -21
  193. package/integration-data-model.ts +0 -86
  194. package/ts/discoverer/parsing/file-reader.tests.js +0 -24
  195. package/ts/discoverer/parsing/file-reader.tests.js.map +0 -1
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertTypes = void 0;
4
+ function convertTypes(types, customTypes) {
5
+ if (types === undefined || types === null || types.length === 0) {
6
+ return undefined;
7
+ }
8
+ var actualTypes = customTypes
9
+ ? types.concat(expandTypes(types, customTypes))
10
+ : types;
11
+ var convertedTypes = new Set(actualTypes.map(convertType));
12
+ if (convertedTypes.has('Any')) {
13
+ return undefined;
14
+ }
15
+ return Array.from(convertedTypes);
16
+ }
17
+ exports.convertTypes = convertTypes;
18
+ function expandTypes(types, customTypes) {
19
+ var expandedTypes = [];
20
+ types.forEach(function (t) {
21
+ if (t.isCustomType) {
22
+ var aliases = customTypes[t.type].types;
23
+ if (aliases) {
24
+ expandedTypes.push.apply(expandedTypes, aliases);
25
+ }
26
+ }
27
+ });
28
+ return expandedTypes;
29
+ }
30
+ function convertType(typeDescr) {
31
+ switch (typeDescr.type) {
32
+ case 'String':
33
+ case 'Number':
34
+ case 'Boolean':
35
+ case 'Array':
36
+ case 'Object':
37
+ case 'Function':
38
+ return typeDescr.type;
39
+ }
40
+ if (typeDescr.isCustomType) {
41
+ return 'Object';
42
+ }
43
+ return 'Any';
44
+ }
45
+ //# sourceMappingURL=converter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../ts/vue-components-generator/converter.ts"],"names":[],"mappings":";;;AAEA,SAAS,YAAY,CACnB,KAAsC,EACtC,WAAyC;IAEzC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC/D,OAAO,SAAS,CAAC;KAClB;IAED,IAAM,WAAW,GAAG,WAAW;QAC7B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/C,CAAC,CAAC,KAAK,CAAC;IAEV,IAAM,cAAc,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7D,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC7B,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC;AAgCQ,oCAAY;AA9BrB,SAAS,WAAW,CAAC,KAAmB,EAAE,WAAwC;IAChF,IAAM,aAAa,GAAiB,EAAE,CAAC;IACvC,KAAK,CAAC,OAAO,CAAC,UAAC,CAAC;QACd,IAAI,CAAC,CAAC,YAAY,EAAE;YAClB,IAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;YAC1C,IAAI,OAAO,EAAE;gBACX,aAAa,CAAC,IAAI,OAAlB,aAAa,EAAS,OAAO,EAAE;aAChC;SACF;IACH,CAAC,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC;AACD,SAAS,WAAW,CAAC,SAAqB;IACxC,QAAQ,SAAS,CAAC,IAAI,EAAE;QACtB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS,CAAC;QACf,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACb,OAAO,SAAS,CAAC,IAAI,CAAC;KACzB;IAED,IAAI,SAAS,CAAC,YAAY,EAAE;QAC1B,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ICustomType, IModel, IWidget } from '../../integration-data-model';
2
+ import { IComponent } from './component-generator';
3
+ declare function generate(rawData: IModel, baseComponentPath: string, configComponentPath: string, out: {
4
+ componentsDir: string;
5
+ indexFileName: string;
6
+ }, widgetsPackage: string, vueVersion: number, generateReexports?: boolean): void;
7
+ declare function mapWidget(raw: IWidget, baseComponentPath: string, configComponentPath: string, customTypes: ICustomType[]): {
8
+ fileName: string;
9
+ component: IComponent;
10
+ };
11
+ export { generate, mapWidget, };
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapWidget = exports.generate = void 0;
4
+ var fs_1 = require("fs");
5
+ var path_1 = require("path");
6
+ var component_generator_1 = require("./component-generator");
7
+ var converter_1 = require("./converter");
8
+ var helpers_1 = require("./helpers");
9
+ var reexports_generator_1 = require("../components-generation/reexports-generator");
10
+ var common_reexports_generator_1 = require("../components-generation/common-reexports-generator");
11
+ function generate(rawData, baseComponentPath, configComponentPath, out, widgetsPackage, vueVersion, generateReexports) {
12
+ var modulePaths = [];
13
+ rawData.widgets.forEach(function (data) {
14
+ var widgetFile = mapWidget(data, baseComponentPath, configComponentPath, rawData.customTypes);
15
+ var widgetFilePath = (0, path_1.join)(out.componentsDir, widgetFile.fileName);
16
+ var indexFileDir = (0, path_1.dirname)(out.indexFileName);
17
+ (0, fs_1.writeFileSync)(widgetFilePath, (0, component_generator_1.default)(widgetFile.component, widgetsPackage, vueVersion, generateReexports), { encoding: 'utf8' });
18
+ modulePaths.push({
19
+ names: [widgetFile.component.name],
20
+ path: "./".concat((0, helpers_1.removeExtension)((0, path_1.relative)(indexFileDir, widgetFilePath)).replace(path_1.sep, '/')),
21
+ });
22
+ });
23
+ (0, fs_1.writeFileSync)(out.indexFileName, (0, reexports_generator_1.default)(modulePaths), { encoding: 'utf8' });
24
+ if (generateReexports && rawData.commonReexports) {
25
+ (0, common_reexports_generator_1.generateCommonReexports)({
26
+ componentsDir: out.componentsDir,
27
+ widgetsPackage: widgetsPackage,
28
+ commonReexports: rawData.commonReexports,
29
+ });
30
+ }
31
+ }
32
+ exports.generate = generate;
33
+ function mapWidget(raw, baseComponentPath, configComponentPath, customTypes) {
34
+ var _a, _b, _c;
35
+ var name = (0, helpers_1.removePrefix)(raw.name, 'dx');
36
+ var customTypeHash = customTypes.reduce(function (result, type) {
37
+ result[type.name] = type;
38
+ return result;
39
+ }, {});
40
+ return {
41
+ fileName: "".concat((0, helpers_1.toKebabCase)(name), ".ts"),
42
+ component: {
43
+ name: "Dx".concat(name),
44
+ widgetComponent: {
45
+ name: name,
46
+ path: raw.exportPath,
47
+ },
48
+ baseComponent: {
49
+ name: raw.isExtension ? 'createExtensionComponent' : 'createComponent',
50
+ path: baseComponentPath,
51
+ },
52
+ configComponent: {
53
+ name: 'createConfigurationComponent',
54
+ path: configComponentPath,
55
+ },
56
+ props: getProps(raw.options, customTypeHash),
57
+ hasModel: !!raw.isEditor,
58
+ hasExplicitTypes: !!((_a = raw.optionsTypeParams) === null || _a === void 0 ? void 0 : _a.length),
59
+ nestedComponents: raw.complexOptions
60
+ ? raw.complexOptions.map(function (o) { return mapNestedComponent(o, customTypeHash); })
61
+ : undefined,
62
+ expectedChildren: mapExpectedChildren(raw.nesteds),
63
+ containsReexports: !!((_c = (_b = raw.reexports) === null || _b === void 0 ? void 0 : _b.filter(function (r) { return r !== 'default'; })) === null || _c === void 0 ? void 0 : _c.length),
64
+ },
65
+ };
66
+ }
67
+ exports.mapWidget = mapWidget;
68
+ function mapNestedComponent(complexOption, customTypes) {
69
+ return {
70
+ name: "Dx".concat((0, helpers_1.uppercaseFirst)(complexOption.name)),
71
+ optionName: complexOption.optionName,
72
+ props: getProps(complexOption.props, customTypes),
73
+ isCollectionItem: complexOption.isCollectionItem,
74
+ predefinedProps: complexOption.predefinedProps,
75
+ expectedChildren: mapExpectedChildren(complexOption.nesteds),
76
+ };
77
+ }
78
+ function getProps(options, customTypes) {
79
+ var reservedPropNames = ['key'];
80
+ return options
81
+ .filter(function (o) { return reservedPropNames.indexOf(o.name) < 0; })
82
+ .map(function (o) { return mapProp(o, customTypes); });
83
+ }
84
+ function buildValueRestriction(restrictedTypes) {
85
+ var valueRestriction = restrictedTypes.length > 0 ? restrictedTypes[0] : undefined;
86
+ var acceptableValueType = valueRestriction && valueRestriction.type.toLowerCase();
87
+ if (!valueRestriction || acceptableValueType === 'string') {
88
+ return {};
89
+ }
90
+ return {
91
+ acceptableValueType: acceptableValueType,
92
+ acceptableValues: valueRestriction.acceptableValues,
93
+ };
94
+ }
95
+ function mapProp(rawOption, customTypes) {
96
+ var types = (0, converter_1.convertTypes)(rawOption.types, customTypes);
97
+ var restrictedTypes = rawOption.types.filter(function (t) { return t.acceptableValues && t.acceptableValues.length > 0; });
98
+ var valueRestriction = buildValueRestriction(restrictedTypes);
99
+ return {
100
+ name: rawOption.name,
101
+ acceptableValues: valueRestriction.acceptableValues,
102
+ types: types,
103
+ isArray: types && types.length === 1 && types[0] === 'Array',
104
+ acceptableValueType: valueRestriction.acceptableValueType,
105
+ };
106
+ }
107
+ function mapExpectedChildren(nesteds) {
108
+ if (!nesteds || nesteds.length === 0) {
109
+ return undefined;
110
+ }
111
+ var expectedChildren = {};
112
+ nesteds.forEach(function (n) {
113
+ expectedChildren[n.componentName] = {
114
+ isCollectionItem: !!n.isCollectionItem,
115
+ optionName: n.optionName,
116
+ };
117
+ });
118
+ return expectedChildren;
119
+ }
120
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../ts/vue-components-generator/generator.ts"],"names":[],"mappings":";;;AAAA,yBAAgD;AAEhD,6BAKc;AAWd,6DAK+B;AAE/B,yCAA2C;AAC3C,qCAEmB;AACnB,oFAA4F;AAC5F,kGAA8F;AAE9F,SAAS,QAAQ,CACf,OAAe,EACf,iBAAyB,EACzB,mBAA2B,EAC3B,GAGC,EACD,cAAsB,EACtB,UAAkB,EAClB,iBAA2B;IAE3B,IAAM,WAAW,GAAgB,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,IAAI;QAC3B,IAAM,UAAU,GAAG,SAAS,CAC1B,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,CAAC,WAAW,CACpB,CAAC;QACF,IAAM,cAAc,GAAG,IAAA,WAAS,EAAC,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;QACzE,IAAM,YAAY,GAAG,IAAA,cAAU,EAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAEnD,IAAA,kBAAS,EACP,cAAc,EACd,IAAA,6BAAiB,EAAC,UAAU,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,CAAC,EACtF,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QACF,WAAW,CAAC,IAAI,CAAC;YACf,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;YAClC,IAAI,EAAE,YAAK,IAAA,yBAAe,EAAC,IAAA,eAAe,EAAC,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,UAAa,EAAE,GAAG,CAAC,CAAE;SACxG,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,kBAAS,EAAC,GAAG,CAAC,aAAa,EAAE,IAAA,6BAAiB,EAAC,WAAW,CAAC,EAAE,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,gBAAgB,GAAG,EAAE,CAAC;IAC5B,OAAO,CAAC,OAAO,CAAC,UAAC,CAAC;QAChB,gBAAgB,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG;YAClC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB;YACtC,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function removeExtension(path: string): string;
2
+ export declare function removePrefix(value: string, prefix: string): string;
3
+ export declare function toKebabCase(value: string): string;
4
+ export declare function uppercaseFirst(value: string): string;
5
+ export declare function lowercaseFirst(value: string): string;
6
+ export declare function compareStrings(a: string, b: string): number;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compareStrings = exports.lowercaseFirst = exports.uppercaseFirst = exports.toKebabCase = exports.removePrefix = exports.removeExtension = void 0;
4
+ var dasherize = require("dasherize");
5
+ var path_1 = require("path");
6
+ function removeExtension(path) {
7
+ return path.slice(0, -(0, path_1.extname)(path).length);
8
+ }
9
+ exports.removeExtension = removeExtension;
10
+ function removePrefix(value, prefix) {
11
+ return new RegExp("^".concat(prefix), 'i').test(value) ? value.substring(prefix.length) : value;
12
+ }
13
+ exports.removePrefix = removePrefix;
14
+ function toKebabCase(value) {
15
+ return dasherize(value);
16
+ }
17
+ exports.toKebabCase = toKebabCase;
18
+ function uppercaseFirst(value) {
19
+ return value[0].toUpperCase() + value.substr(1);
20
+ }
21
+ exports.uppercaseFirst = uppercaseFirst;
22
+ function lowercaseFirst(value) {
23
+ return value[0].toLowerCase() + value.substr(1);
24
+ }
25
+ exports.lowercaseFirst = lowercaseFirst;
26
+ function compareStrings(a, b) {
27
+ return a.localeCompare(b, undefined, { caseFirst: 'upper' });
28
+ }
29
+ exports.compareStrings = compareStrings;
30
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../ts/vue-components-generator/helpers.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,6BAAmD;AAEnD,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,IAAA,cAAgB,EAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAFD,0CAEC;AAED,SAAgB,YAAY,CAAC,KAAa,EAAE,MAAc;IACxD,OAAO,IAAI,MAAM,CAAC,WAAI,MAAM,CAAE,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5F,CAAC;AAFD,oCAEC;AAED,SAAgB,WAAW,CAAC,KAAa;IACvC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAFD,kCAEC;AAED,SAAgB,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAFD,wCAEC;AAED,SAAgB,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAFD,wCAEC;AAED,SAAgB,cAAc,CAAC,CAAS,EAAE,CAAS;IACjD,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/D,CAAC;AAFD,wCAEC"}
@@ -1,86 +0,0 @@
1
- export interface IModel {
2
- commonReexports: Record<string, string[]>;
3
- customTypes: ICustomType[];
4
- meta: IMeta;
5
- widgets: IWidget[];
6
- }
7
-
8
- export interface IMeta {
9
- scriptsRevision: string;
10
- toolsVersion: string;
11
- }
12
-
13
- export interface IWidget {
14
- complexOptions: IComplexProp[];
15
- exportPath: string;
16
- hasTranscludedContent: boolean;
17
- isEditor: boolean;
18
- isExtension: boolean;
19
- name: string;
20
- nesteds: IComponentRef[];
21
- options: IProp[];
22
- optionsTypeParams: string[];
23
- reexports: string[];
24
- templates: string[];
25
- }
26
-
27
- export interface IProp {
28
- firedEvents: string[];
29
- isDeprecated: boolean;
30
- isSubscribable: boolean;
31
- name: string;
32
- props: IProp[];
33
- types: ITypeDescr[];
34
- }
35
-
36
- export interface IComplexProp {
37
- isCollectionItem: boolean;
38
- name: string;
39
- nesteds: IComponentRef[];
40
- optionName: string;
41
- owners: string[];
42
- predefinedProps: Record<string, any>;
43
- props: IProp[];
44
- templates: string[];
45
- }
46
-
47
- export interface IComponentRef {
48
- componentName: string;
49
- isCollectionItem: boolean;
50
- optionName: string;
51
- }
52
-
53
- export interface ICustomType {
54
- module: string;
55
- name: string;
56
- props: IProp[];
57
- templates: string[];
58
- types: ITypeDescr[];
59
- }
60
-
61
- export interface ITypeDescr {
62
- acceptableValues: string[];
63
- importPath: string;
64
- isCustomType: boolean;
65
- isImportedType: boolean;
66
- type: string;
67
- }
68
-
69
- export interface IArrayDescr extends ITypeDescr {
70
- itemTypes: ITypeDescr[];
71
- }
72
-
73
- export interface IFunctionDescr extends ITypeDescr {
74
- params: {
75
- name: string;
76
- types: ITypeDescr[];
77
- }[];
78
- returnValueTypes: ITypeDescr[];
79
- }
80
-
81
- export interface IObjectDescr extends ITypeDescr {
82
- fields: {
83
- name: string;
84
- types: ITypeDescr[];
85
- }[];
86
- }
@@ -1,21 +0,0 @@
1
- 2023-09-08 13:34:45.1399 | Info | IntegrationDataModel Generation
2
-
3
- ================================================================
4
- IntegrationDataModel Generation Started
5
- Path to log file: D:\a\devextreme-internal-tools\devextreme-internal-tools\dist\bin\internal-tools-log.txt
6
- ================================================================
7
-
8
- 2023-09-08 13:34:45.2157 | Info | IntegrationDataModel Generation
9
- Model saved to: D:\a\devextreme-internal-tools\devextreme-internal-tools\dist\bin\integration-data-model.ts
10
- 2023-09-08 13:34:45.2157 | Info | IntegrationDataModel Generation
11
-
12
- ================================================================
13
-
14
- ================================================================
15
-
16
- IntegrationDataModel Generation SUCCEEDED
17
-
18
- Warnings: 0
19
- Errors: 0
20
- Ellapsed time: 0.085 sec
21
-
@@ -1,86 +0,0 @@
1
- export interface IModel {
2
- commonReexports: Record<string, string[]>;
3
- customTypes: ICustomType[];
4
- meta: IMeta;
5
- widgets: IWidget[];
6
- }
7
-
8
- export interface IMeta {
9
- scriptsRevision: string;
10
- toolsVersion: string;
11
- }
12
-
13
- export interface IWidget {
14
- complexOptions: IComplexProp[];
15
- exportPath: string;
16
- hasTranscludedContent: boolean;
17
- isEditor: boolean;
18
- isExtension: boolean;
19
- name: string;
20
- nesteds: IComponentRef[];
21
- options: IProp[];
22
- optionsTypeParams: string[];
23
- reexports: string[];
24
- templates: string[];
25
- }
26
-
27
- export interface IProp {
28
- firedEvents: string[];
29
- isDeprecated: boolean;
30
- isSubscribable: boolean;
31
- name: string;
32
- props: IProp[];
33
- types: ITypeDescr[];
34
- }
35
-
36
- export interface IComplexProp {
37
- isCollectionItem: boolean;
38
- name: string;
39
- nesteds: IComponentRef[];
40
- optionName: string;
41
- owners: string[];
42
- predefinedProps: Record<string, any>;
43
- props: IProp[];
44
- templates: string[];
45
- }
46
-
47
- export interface IComponentRef {
48
- componentName: string;
49
- isCollectionItem: boolean;
50
- optionName: string;
51
- }
52
-
53
- export interface ICustomType {
54
- module: string;
55
- name: string;
56
- props: IProp[];
57
- templates: string[];
58
- types: ITypeDescr[];
59
- }
60
-
61
- export interface ITypeDescr {
62
- acceptableValues: string[];
63
- importPath: string;
64
- isCustomType: boolean;
65
- isImportedType: boolean;
66
- type: string;
67
- }
68
-
69
- export interface IArrayDescr extends ITypeDescr {
70
- itemTypes: ITypeDescr[];
71
- }
72
-
73
- export interface IFunctionDescr extends ITypeDescr {
74
- params: {
75
- name: string;
76
- types: ITypeDescr[];
77
- }[];
78
- returnValueTypes: ITypeDescr[];
79
- }
80
-
81
- export interface IObjectDescr extends ITypeDescr {
82
- fields: {
83
- name: string;
84
- types: ITypeDescr[];
85
- }[];
86
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var path_1 = require("path");
4
- var typescript_1 = require("typescript");
5
- var file_reader_1 = require("./file-reader");
6
- describe('file-reader', function () {
7
- it('discovers exported', function () {
8
- var filePath = path_1.join(__dirname, '/file-reader.tests/exported.ts');
9
- var files = [filePath];
10
- var program = typescript_1.createProgram(files, { typeRoots: [], lib: [] });
11
- var actual = file_reader_1.getDiscoverableSymbols(program.getSourceFile(filePath), program.getTypeChecker())
12
- .map(function (s) { return s.escapedName; });
13
- expect(actual).toEqual(['ExportedType']);
14
- });
15
- it('discovers exported', function () {
16
- var filePath = path_1.join(__dirname, '/file-reader.tests/not-exported.ts');
17
- var files = [filePath];
18
- var program = typescript_1.createProgram(files, { typeRoots: [], lib: [] });
19
- var actual = file_reader_1.getDiscoverableSymbols(program.getSourceFile(filePath), program.getTypeChecker())
20
- .map(function (s) { return s.escapedName; });
21
- expect(actual).toEqual(['TypeWithTag']);
22
- });
23
- });
24
- //# sourceMappingURL=file-reader.tests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-reader.tests.js","sourceRoot":"","sources":["../../../../ts/discoverer/parsing/file-reader.tests.ts"],"names":[],"mappings":";;AAAA,6BAAyC;AACzC,yCAA2C;AAC3C,6CAAuD;AAEvD,QAAQ,CAAC,aAAa,EAAE;IAEtB,EAAE,CAAC,oBAAoB,EAAE;QACvB,IAAM,QAAQ,GAAG,WAAS,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;QACxE,IAAM,KAAK,GAAa,CAAE,QAAQ,CAAE,CAAC;QACrC,IAAM,OAA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