devextreme-internal-tools 12.0.0-beta.1 → 12.0.0-beta.3
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/bin/DevExtreme.Declarations.Discoverer.dll +0 -0
- package/bin/DevExtreme.Declarations.Discoverer.exe +0 -0
- package/bin/DevExtreme.Declarations.IntegrityValidator.dll +0 -0
- package/bin/DevExtreme.Declarations.IntegrityValidator.exe +0 -0
- package/bin/DevExtreme.Declarations.dll +0 -0
- package/bin/DevExtreme.Descriptions.Injector.dll +0 -0
- package/bin/DevExtreme.Descriptions.Injector.exe +0 -0
- package/bin/DevExtreme.Infrastructure.dll +0 -0
- package/bin/DevExtreme.IntegrationDataGenerator.dll +0 -0
- package/bin/DevExtreme.IntegrationDataGenerator.exe +0 -0
- package/bin/DevExtreme.NgSmdGenerator.dll +0 -0
- package/bin/DevExtreme.NgSmdGenerator.exe +0 -0
- package/bin/DevExtreme.SmdCommon.dll +0 -0
- package/bin/DevExtreme.StrongMetaDataGenerator.dll +0 -0
- package/bin/DevExtreme.StrongMetaDataGenerator.exe +0 -0
- package/bin/DevExtreme.Topics.ExtraFilesGenerator.dll +0 -0
- package/bin/DevExtreme.Topics.ExtraFilesGenerator.exe +0 -0
- package/bin/DevExtreme.Topics.Generator.dll +0 -0
- package/bin/DevExtreme.Topics.Generator.exe +0 -0
- package/bin/DevExtreme.Topics.ModulesGuideValidator.dll +0 -0
- package/bin/DevExtreme.Topics.ModulesGuideValidator.exe +0 -0
- package/bin/DevExtreme.Topics.Validation.dll +0 -0
- package/bin/DevExtreme.Topics.Validation.exe +0 -0
- package/bin/DevExtreme.Topics.dll +0 -0
- package/bin/DevExtreme.WebSite.ContentMapCreator.dll +0 -0
- package/bin/DevExtreme.WebSite.ContentMapCreator.exe +0 -0
- package/bin/DevExtreme.WebSite.LinksConverter.dll +0 -0
- package/bin/DevExtreme.WebSite.LinksConverter.exe +0 -0
- package/bin/DevExtreme.WebSite.SyntaxDataGenerator.dll +0 -0
- package/bin/DevExtreme.WebSite.SyntaxDataGenerator.exe +0 -0
- package/cli.d.ts +2 -0
- package/cli.js +50 -0
- package/cli.js.map +1 -0
- package/index.d.ts +9 -0
- package/index.js +18 -47
- package/index.js.map +1 -1
- package/integration-data-model.d.ts +76 -0
- package/integration-data-model.js +3 -0
- package/integration-data-model.js.map +1 -0
- package/package.json +17 -9
- package/ts/angular-components-generator/common-reexports-generator.d.ts +4 -0
- package/ts/angular-components-generator/common-reexports-generator.js +36 -0
- package/ts/angular-components-generator/common-reexports-generator.js.map +1 -0
- package/ts/angular-components-generator/component-names-generator.d.ts +8 -0
- package/ts/angular-components-generator/component-names-generator.js +31 -0
- package/ts/angular-components-generator/component-names-generator.js.map +1 -0
- package/ts/angular-components-generator/dot-generator.d.ts +8 -0
- package/ts/angular-components-generator/dot-generator.js +86 -0
- package/ts/angular-components-generator/dot-generator.js.map +1 -0
- package/ts/angular-components-generator/facade-generator.d.ts +4 -0
- package/ts/angular-components-generator/facade-generator.js +45 -0
- package/ts/angular-components-generator/facade-generator.js.map +1 -0
- package/ts/angular-components-generator/helpers.d.ts +2 -0
- package/ts/angular-components-generator/helpers.js +12 -0
- package/ts/angular-components-generator/helpers.js.map +1 -0
- package/ts/angular-components-generator/import-helper.d.ts +6 -0
- package/ts/angular-components-generator/import-helper.js +73 -0
- package/ts/angular-components-generator/import-helper.js.map +1 -0
- package/ts/angular-components-generator/logger.d.ts +1 -0
- package/ts/angular-components-generator/logger.js +16 -0
- package/ts/angular-components-generator/logger.js.map +1 -0
- package/ts/angular-components-generator/metadata-generator.d.ts +27 -0
- package/ts/angular-components-generator/metadata-generator.js +490 -0
- package/ts/angular-components-generator/metadata-generator.js.map +1 -0
- package/ts/angular-components-generator/metadata-model.d.ts +48 -0
- package/ts/angular-components-generator/metadata-model.js +3 -0
- package/ts/angular-components-generator/metadata-model.js.map +1 -0
- package/ts/angular-components-generator/module-facade-generator.d.ts +5 -0
- package/ts/angular-components-generator/module-facade-generator.js +50 -0
- package/ts/angular-components-generator/module-facade-generator.js.map +1 -0
- package/ts/angular-components-generator/templates/base-nested-component.tst +20 -0
- package/ts/angular-components-generator/templates/component.tst +251 -0
- package/ts/angular-components-generator/templates/nested-component.tst +140 -0
- package/ts/bundler/bundler.d.ts +6 -0
- package/ts/collapser/collapser.d.ts +4 -0
- package/ts/common/common-resolving.d.ts +11 -0
- package/ts/common/id.d.ts +12 -0
- package/ts/common/tags/comparing.d.ts +3 -0
- package/ts/common/tags/generating.d.ts +4 -0
- package/ts/common/tags/merging.d.ts +12 -0
- package/ts/common/tags/parameter-field-tag.d.ts +7 -0
- package/ts/common/tags.d.ts +12 -0
- package/ts/common/ts-type-resolving.d.ts +16 -0
- package/ts/common/ts-utils.d.ts +31 -0
- package/ts/common/type-resolving.d.ts +42 -0
- package/ts/common/utils.d.ts +22 -0
- package/ts/component-exports-generator/generator.d.ts +3 -0
- package/ts/discoverer/data-model.d.ts +105 -0
- package/ts/discoverer/discovering-error.d.ts +4 -0
- package/ts/discoverer/discovering.d.ts +4 -0
- package/ts/discoverer/parsing/enum-collecting.d.ts +6 -0
- package/ts/discoverer/parsing/file-reader.d.ts +2 -0
- package/ts/discoverer/parsing/widget-parsing.d.ts +11 -0
- package/ts/discoverer/parsing.d.ts +29 -0
- package/ts/discoverer/types.d.ts +20 -0
- package/ts/logging.d.ts +16 -0
- package/ts/modules-meta-generator/modules-meta-generator.d.ts +3 -0
- package/ts/react-components-generator/common-reexports-generator.d.ts +2 -0
- package/ts/react-components-generator/common-reexports-generator.js +10 -0
- package/ts/react-components-generator/common-reexports-generator.js.map +1 -0
- package/ts/react-components-generator/component-generator.d.ts +62 -0
- package/ts/react-components-generator/component-generator.js +407 -0
- package/ts/react-components-generator/component-generator.js.map +1 -0
- package/ts/react-components-generator/converter.d.ts +3 -0
- package/ts/react-components-generator/converter.js +59 -0
- package/ts/react-components-generator/converter.js.map +1 -0
- package/ts/react-components-generator/generator.d.ts +60 -0
- package/ts/react-components-generator/generator.js +383 -0
- package/ts/react-components-generator/generator.js.map +1 -0
- package/ts/react-components-generator/helpers.d.ts +11 -0
- package/ts/react-components-generator/helpers.js +53 -0
- package/ts/react-components-generator/helpers.js.map +1 -0
- package/ts/react-components-generator/import-overrides.json +109 -0
- package/ts/react-components-generator/index-generator.d.ts +7 -0
- package/ts/react-components-generator/index-generator.js +10 -0
- package/ts/react-components-generator/index-generator.js.map +1 -0
- package/ts/react-components-generator/template.d.ts +10 -0
- package/ts/react-components-generator/template.js +43 -0
- package/ts/react-components-generator/template.js.map +1 -0
- package/ts/scripts/args.d.ts +37 -0
- package/ts/scripts/helpers.d.ts +10 -0
- package/ts/scripts/tools.d.ts +17 -0
- package/ts/vue-components-generator/common-reexports-generator.d.ts +2 -0
- package/ts/vue-components-generator/common-reexports-generator.js +10 -0
- package/ts/vue-components-generator/common-reexports-generator.js.map +1 -0
- package/ts/vue-components-generator/component-generator.d.ts +40 -0
- package/ts/vue-components-generator/component-generator.js +197 -0
- package/ts/vue-components-generator/component-generator.js.map +1 -0
- package/ts/vue-components-generator/converter.d.ts +3 -0
- package/ts/vue-components-generator/converter.js +45 -0
- package/ts/vue-components-generator/converter.js.map +1 -0
- package/ts/vue-components-generator/generator.d.ts +11 -0
- package/ts/vue-components-generator/generator.js +126 -0
- package/ts/vue-components-generator/generator.js.map +1 -0
- package/ts/vue-components-generator/helpers.d.ts +6 -0
- package/ts/vue-components-generator/helpers.js +30 -0
- package/ts/vue-components-generator/helpers.js.map +1 -0
- package/ts/vue-components-generator/index-generator.d.ts +7 -0
- package/ts/vue-components-generator/index-generator.js +9 -0
- package/ts/vue-components-generator/index-generator.js.map +1 -0
- package/ts/vue-components-generator/template.d.ts +11 -0
- package/ts/vue-components-generator/template.js +45 -0
- package/ts/vue-components-generator/template.js.map +1 -0
- package/bin/integration-data-model.ts +0 -86
- package/bin/internal-tools-log.txt +0 -21
- package/integration-data-model.ts +0 -86
- package/ts/discoverer/parsing/file-reader.tests.js +0 -24
- package/ts/discoverer/parsing/file-reader.tests.js.map +0 -1
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/cli.d.ts
ADDED
package/cli.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
"use strict";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
var shelljs_1 = require("shelljs");
|
5
|
+
var typescript_1 = require("typescript");
|
6
|
+
var tools_1 = require("./ts/scripts/tools");
|
7
|
+
var args_1 = require("./ts/scripts/args");
|
8
|
+
var helpers_1 = require("./ts/scripts/helpers");
|
9
|
+
var package_json_1 = require("./package.json");
|
10
|
+
var logging_1 = require("./ts/logging");
|
11
|
+
var scripts = {
|
12
|
+
'discover-declarations': [tools_1.runDiscoverers],
|
13
|
+
'make-integration-metadata': [tools_1.runImdGenerator],
|
14
|
+
'make-angular-metadata': [tools_1.runNgSmdGenerator],
|
15
|
+
'make-aspnet-metadata': [tools_1.runSmdGenerator],
|
16
|
+
'make-syntax-metadata': [tools_1.runSyntaxDataGenerator],
|
17
|
+
'make-content-map': [tools_1.runContentMapGenerator],
|
18
|
+
'generate-ts-bundle': [tools_1.runDtsBundler],
|
19
|
+
'generate-reexports': [tools_1.runReexportsGenerator],
|
20
|
+
'generate-topics': [tools_1.runDocGenerator],
|
21
|
+
'generate-extra-topics': [tools_1.runExtraTopicsGenerator],
|
22
|
+
'inject-descriptions': [tools_1.runInjector],
|
23
|
+
'convert-links': [tools_1.runLinksConverter],
|
24
|
+
'validate-declarations': [tools_1.runTsDiscoverer, tools_1.runValidator],
|
25
|
+
'validate-topics': [tools_1.runTopicsValidation],
|
26
|
+
'validate-modules-guide': [tools_1.runModulesGuideValidator],
|
27
|
+
};
|
28
|
+
if (process.argv.length < 3) {
|
29
|
+
logging_1.log('Script is not specified', { lvl: 'error' });
|
30
|
+
shelljs_1.exit(1);
|
31
|
+
}
|
32
|
+
var scriptName = process.argv[2];
|
33
|
+
if (scriptName === '-v') {
|
34
|
+
console.log(package_json_1.version);
|
35
|
+
shelljs_1.exit(0);
|
36
|
+
}
|
37
|
+
var allArgs = args_1.parseArgs(process.argv);
|
38
|
+
logging_1.setLogDir(allArgs.artifacts);
|
39
|
+
logging_1.setAreaName('CLI');
|
40
|
+
logging_1.log("Process args: " + process.argv.join(' '), { lvl: 'debug' });
|
41
|
+
var scriptNames = Object.keys(scripts);
|
42
|
+
if (scriptNames.indexOf(scriptName) === -1) {
|
43
|
+
logging_1.log("Invalid script name: '" + scriptName + "'. Use one of the following: \n\n" + scriptNames.join('\n'), { lvl: 'error' });
|
44
|
+
shelljs_1.exit(1);
|
45
|
+
}
|
46
|
+
helpers_1.ensureDir(allArgs.artifacts);
|
47
|
+
allArgs.toolsVersion = package_json_1.version;
|
48
|
+
logging_1.log("Tools version: " + package_json_1.version + "\nTS version: " + typescript_1.version);
|
49
|
+
scripts[scriptName].forEach(function (tool) { return tool(allArgs); });
|
50
|
+
//# sourceMappingURL=cli.js.map
|
package/cli.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;AAEA,mCAA+B;AAC/B,yCAAkD;AAElD,4CAiB4B;AAC5B,0CAAuD;AACvD,gDAAiD;AACjD,+CAAyC;AACzC,wCAIsB;AAItB,IAAM,OAAO,GAAgD;IAE3D,uBAAuB,EAAE,CAAC,sBAAc,CAAC;IAEzC,2BAA2B,EAAE,CAAC,uBAAe,CAAC;IAC9C,uBAAuB,EAAE,CAAC,yBAAiB,CAAC;IAC5C,sBAAsB,EAAE,CAAC,uBAAe,CAAC;IACzC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AAK,CAAC,CAAC,EAAE;IAC1C,aAAG,CAAC,2BAAyB,UAAU,yCAAoC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAG,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACvH,cAAI,CAAC,CAAC,CAAC,CAAC;CACT;AAED,mBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC7B,OAAO,CAAC,YAAY,GAAG,sBAAO,CAAC;AAC/B,aAAG,CAAC,oBAAkB,sBAAO,sBAAiB,oBAAW,CAAC,CAAC;AAC3D,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,OAAO,CAAC,EAAb,CAAa,CAAC,CAAC"}
|
package/index.d.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
export * as IntegrationMetadata from './integration-data-model';
|
2
|
+
export { generate as generateReactComponents, } from './ts/react-components-generator/generator';
|
3
|
+
export { generate as generateVueComponents, } from './ts/vue-components-generator/generator';
|
4
|
+
export { ComponentMetadataGenerator as AngularMetadataGenerator, } from './ts/angular-components-generator/metadata-generator';
|
5
|
+
export { DotGenerator as AngularDotGenerator, } from './ts/angular-components-generator/dot-generator';
|
6
|
+
export { FacadeGenerator as AngularFacadeGenerator, } from './ts/angular-components-generator/facade-generator';
|
7
|
+
export { ModuleFacadeGenerator as AngularModuleFacadeGenerator, } from './ts/angular-components-generator/module-facade-generator';
|
8
|
+
export { ComponentNamesGenerator as AngularComponentNamesGenerator, } from './ts/angular-components-generator/component-names-generator';
|
9
|
+
export { CommonReexportsGenerator as AngularCommonReexportsGenerator, } from './ts/angular-components-generator/common-reexports-generator';
|
package/index.js
CHANGED
@@ -1,50 +1,21 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
1
|
"use strict";
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
|
5
|
-
|
6
|
-
var
|
7
|
-
|
8
|
-
var
|
9
|
-
|
10
|
-
var
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
'inject-descriptions': [tools_1.runInjector],
|
23
|
-
'convert-links': [tools_1.runLinksConverter],
|
24
|
-
'validate-declarations': [tools_1.runTsDiscoverer, tools_1.runValidator],
|
25
|
-
'validate-topics': [tools_1.runTopicsValidation],
|
26
|
-
'validate-modules-guide': [tools_1.runModulesGuideValidator],
|
27
|
-
};
|
28
|
-
if (process.argv.length < 3) {
|
29
|
-
logging_1.log('Script is not specified', { lvl: 'error' });
|
30
|
-
shelljs_1.exit(1);
|
31
|
-
}
|
32
|
-
var scriptName = process.argv[2];
|
33
|
-
if (scriptName === '-v') {
|
34
|
-
console.log(package_json_1.version);
|
35
|
-
shelljs_1.exit(0);
|
36
|
-
}
|
37
|
-
var allArgs = args_1.parseArgs(process.argv);
|
38
|
-
logging_1.setLogDir(allArgs.artifacts);
|
39
|
-
logging_1.setAreaName('CLI');
|
40
|
-
logging_1.log("Process args: " + process.argv.join(' '), { lvl: 'debug' });
|
41
|
-
var scriptNames = Object.keys(scripts);
|
42
|
-
if (scriptNames.indexOf(scriptName) === -1) {
|
43
|
-
logging_1.log("Invalid script name. Use one of the following: \n\n" + scriptNames.join('\n'), { lvl: 'error' });
|
44
|
-
shelljs_1.exit(1);
|
45
|
-
}
|
46
|
-
helpers_1.ensureDir(allArgs.artifacts);
|
47
|
-
allArgs.toolsVersion = package_json_1.version;
|
48
|
-
logging_1.log("Tools version: " + package_json_1.version + "\nTS version: " + typescript_1.version);
|
49
|
-
scripts[scriptName].forEach(function (tool) { return tool(allArgs); });
|
3
|
+
exports.AngularCommonReexportsGenerator = exports.AngularComponentNamesGenerator = exports.AngularModuleFacadeGenerator = exports.AngularFacadeGenerator = exports.AngularDotGenerator = exports.AngularMetadataGenerator = exports.generateVueComponents = exports.generateReactComponents = exports.IntegrationMetadata = void 0;
|
4
|
+
exports.IntegrationMetadata = require("./integration-data-model");
|
5
|
+
var generator_1 = require("./ts/react-components-generator/generator");
|
6
|
+
Object.defineProperty(exports, "generateReactComponents", { enumerable: true, get: function () { return generator_1.generate; } });
|
7
|
+
var generator_2 = require("./ts/vue-components-generator/generator");
|
8
|
+
Object.defineProperty(exports, "generateVueComponents", { enumerable: true, get: function () { return generator_2.generate; } });
|
9
|
+
var metadata_generator_1 = require("./ts/angular-components-generator/metadata-generator");
|
10
|
+
Object.defineProperty(exports, "AngularMetadataGenerator", { enumerable: true, get: function () { return metadata_generator_1.ComponentMetadataGenerator; } });
|
11
|
+
var dot_generator_1 = require("./ts/angular-components-generator/dot-generator");
|
12
|
+
Object.defineProperty(exports, "AngularDotGenerator", { enumerable: true, get: function () { return dot_generator_1.DotGenerator; } });
|
13
|
+
var facade_generator_1 = require("./ts/angular-components-generator/facade-generator");
|
14
|
+
Object.defineProperty(exports, "AngularFacadeGenerator", { enumerable: true, get: function () { return facade_generator_1.FacadeGenerator; } });
|
15
|
+
var module_facade_generator_1 = require("./ts/angular-components-generator/module-facade-generator");
|
16
|
+
Object.defineProperty(exports, "AngularModuleFacadeGenerator", { enumerable: true, get: function () { return module_facade_generator_1.ModuleFacadeGenerator; } });
|
17
|
+
var component_names_generator_1 = require("./ts/angular-components-generator/component-names-generator");
|
18
|
+
Object.defineProperty(exports, "AngularComponentNamesGenerator", { enumerable: true, get: function () { return component_names_generator_1.ComponentNamesGenerator; } });
|
19
|
+
var common_reexports_generator_1 = require("./ts/angular-components-generator/common-reexports-generator");
|
20
|
+
Object.defineProperty(exports, "AngularCommonReexportsGenerator", { enumerable: true, get: function () { return common_reexports_generator_1.CommonReexportsGenerator; } });
|
50
21
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,kEAAgE;AAEhE,uEAEmD;AADjD,oHAAA,QAAQ,OAA2B;AAGrC,qEAEiD;AAD/C,kHAAA,QAAQ,OAAyB;AAGnC,2FAE8D;AAD5D,8HAAA,0BAA0B,OAA4B;AAGxD,iFAEyD;AADvD,oHAAA,YAAY,OAAuB;AAGrC,uFAE4D;AAD1D,0HAAA,eAAe,OAA0B;AAG3C,qGAEmE;AADjE,uIAAA,qBAAqB,OAAgC;AAGvD,yGAEqE;AADnE,2IAAA,uBAAuB,OAAkC;AAG3D,2GAEsE;AADpE,6IAAA,wBAAwB,OAAmC"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
export interface IModel {
|
2
|
+
commonReexports: Record<string, string[]>;
|
3
|
+
customTypes: ICustomType[];
|
4
|
+
meta: IMeta;
|
5
|
+
widgets: IWidget[];
|
6
|
+
}
|
7
|
+
export interface IMeta {
|
8
|
+
scriptsRevision: string;
|
9
|
+
toolsVersion: string;
|
10
|
+
}
|
11
|
+
export interface IWidget {
|
12
|
+
complexOptions: IComplexProp[];
|
13
|
+
exportPath: string;
|
14
|
+
hasTranscludedContent: boolean;
|
15
|
+
isEditor: boolean;
|
16
|
+
isExtension: boolean;
|
17
|
+
name: string;
|
18
|
+
nesteds: IComponentRef[];
|
19
|
+
options: IProp[];
|
20
|
+
optionsTypeParams: string[];
|
21
|
+
reexports: string[];
|
22
|
+
templates: string[];
|
23
|
+
}
|
24
|
+
export interface IProp {
|
25
|
+
firedEvents: string[];
|
26
|
+
isDeprecated: boolean;
|
27
|
+
isSubscribable: boolean;
|
28
|
+
name: string;
|
29
|
+
props: IProp[];
|
30
|
+
types: ITypeDescr[];
|
31
|
+
}
|
32
|
+
export interface IComplexProp {
|
33
|
+
isCollectionItem: boolean;
|
34
|
+
name: string;
|
35
|
+
nesteds: IComponentRef[];
|
36
|
+
optionName: string;
|
37
|
+
owners: string[];
|
38
|
+
predefinedProps: Record<string, any>;
|
39
|
+
props: IProp[];
|
40
|
+
templates: string[];
|
41
|
+
}
|
42
|
+
export interface IComponentRef {
|
43
|
+
componentName: string;
|
44
|
+
isCollectionItem: boolean;
|
45
|
+
optionName: string;
|
46
|
+
}
|
47
|
+
export interface ICustomType {
|
48
|
+
module: string;
|
49
|
+
name: string;
|
50
|
+
props: IProp[];
|
51
|
+
templates: string[];
|
52
|
+
types: ITypeDescr[];
|
53
|
+
}
|
54
|
+
export interface ITypeDescr {
|
55
|
+
acceptableValues: string[];
|
56
|
+
importPath: string;
|
57
|
+
isCustomType: boolean;
|
58
|
+
isImportedType: boolean;
|
59
|
+
type: string;
|
60
|
+
}
|
61
|
+
export interface IArrayDescr extends ITypeDescr {
|
62
|
+
itemTypes: ITypeDescr[];
|
63
|
+
}
|
64
|
+
export interface IFunctionDescr extends ITypeDescr {
|
65
|
+
params: {
|
66
|
+
name: string;
|
67
|
+
types: ITypeDescr[];
|
68
|
+
}[];
|
69
|
+
returnValueTypes: ITypeDescr[];
|
70
|
+
}
|
71
|
+
export interface IObjectDescr extends ITypeDescr {
|
72
|
+
fields: {
|
73
|
+
name: string;
|
74
|
+
types: ITypeDescr[];
|
75
|
+
}[];
|
76
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"integration-data-model.js","sourceRoot":"","sources":["../integration-data-model.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
"name": "devextreme-internal-tools",
|
3
3
|
"description": "DevExtreme internal tools",
|
4
4
|
"author": "Developer Express Inc.",
|
5
|
-
"version": "12.0.0-beta.
|
5
|
+
"version": "12.0.0-beta.3",
|
6
6
|
"license": "MIT",
|
7
|
+
"main": "./index.js",
|
7
8
|
"bin": {
|
8
|
-
"dx-tools": "./
|
9
|
+
"dx-tools": "./cli.js"
|
9
10
|
},
|
10
11
|
"engines": {
|
11
12
|
"node": ">=12.0.0"
|
@@ -14,11 +15,11 @@
|
|
14
15
|
"build": "tsc ./build.ts --outdir ./dist && node ./dist/build.js",
|
15
16
|
"build-ts": "tsc",
|
16
17
|
"build-ts-watch": "tsc -w",
|
17
|
-
"dx-tools": "node dist/
|
18
|
-
"discover": "node dist/
|
19
|
-
"discover-watch": "nodemon --delay 500ms -e js,.ts,d.ts --watch dist --watch ../devextreme/packages/devextreme/js --exec node dist/
|
20
|
-
"generate-ts-bundle": "node dist/
|
21
|
-
"inject-descriptions": "node dist/
|
18
|
+
"dx-tools": "node dist/cli.js",
|
19
|
+
"discover": "node dist/cli.js discover-declarations --artifacts dist/bin --sources ../devextreme/packages/devextreme/js --exclude \"js/(renovation|__internal|.eslintrc.js)\" --compiler-options \"{ \\\"typeRoots\\\": [] }\"",
|
20
|
+
"discover-watch": "nodemon --delay 500ms -e js,.ts,d.ts --watch dist --watch ../devextreme/packages/devextreme/js --exec node dist/cli.js discover-ts-declarations --artifacts dist/bin --sources ../devextreme/packages/devextreme/js --exclude \"js/(renovation|__internal|.eslintrc.js)\"",
|
21
|
+
"generate-ts-bundle": "node dist/cli.js generate-ts-bundle --artifacts dist/bin --sources ../devextreme/packages/devextreme/js --output-path ../devextreme/packages/devextreme/ts/dx.all.d.ts --exclude \"js/(renovation|__internal|.eslintrc.js)\"",
|
22
|
+
"inject-descriptions": "node dist/cli.js inject-descriptions --collapse-tags --artifacts dist/bin --sources ../devextreme/packages/devextreme/js",
|
22
23
|
"lint": "npm run lint-ts && npm run lint-netcore",
|
23
24
|
"lint-ts": "eslint .",
|
24
25
|
"install-lint-netcore": "dotnet tool install -g dotnet-format || echo skip installation",
|
@@ -27,14 +28,21 @@
|
|
27
28
|
"pack": "npm run build && cd dist && npm pack",
|
28
29
|
"test": "npm run test-ts & npm run test-netcore",
|
29
30
|
"test-ts": "jest",
|
30
|
-
"test-netcore": "dotnet test ./netcore --verbosity quiet"
|
31
|
+
"test-netcore": "dotnet test ./netcore --verbosity quiet",
|
32
|
+
"regenerate": "dotnet build netcore/DevExtreme.IntegrationDataGenerator/DevExtreme.IntegrationDataGenerator.csproj && dotnet run --project netcore/DevExtreme.IntegrationDataModelGenerator/DevExtreme.IntegrationDataModelGenerator.csproj --artifacts=dist/bin --output-path=./integration-data-model.ts"
|
31
33
|
},
|
32
34
|
"dependencies": {
|
35
|
+
"dasherize": "2.0.0",
|
36
|
+
"deepmerge": "4.3.1",
|
37
|
+
"dot": "1.1.3",
|
38
|
+
"inflector-js": "1.0.1",
|
33
39
|
"logform": "2.4.2",
|
40
|
+
"mkdirp": "3.0.1",
|
34
41
|
"prettier": "2.3.2",
|
35
42
|
"shelljs": "^0.8.3",
|
36
43
|
"typescript": "4.2",
|
37
|
-
"winston": "~3.4.0"
|
44
|
+
"winston": "~3.4.0",
|
45
|
+
"yargs": "17.7.2"
|
38
46
|
},
|
39
47
|
"devDependencies": {
|
40
48
|
"@devextreme-generator/declarations": "2.3.3",
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CommonReexportsGenerator = void 0;
|
4
|
+
var fs_1 = require("fs");
|
5
|
+
var path_1 = require("path");
|
6
|
+
var dot_generator_1 = require("./dot-generator");
|
7
|
+
var render = dot_generator_1.createTemplateFromString("\nexport {<#~ it.reexports :reExport #>\n <#= reExport #>,<#~#>\n} from 'devextreme/<#= it.module #>';\n".trimLeft());
|
8
|
+
var CommonReexportsGenerator = (function () {
|
9
|
+
function CommonReexportsGenerator() {
|
10
|
+
}
|
11
|
+
CommonReexportsGenerator.prototype.generate = function (config) {
|
12
|
+
var _this = this;
|
13
|
+
var metadata = JSON.parse(fs_1.readFileSync(config.metadataPath).toString());
|
14
|
+
if (!metadata.CommonReexports) {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
var commonTargetFolderName = 'common';
|
18
|
+
var commonPath = path_1.join(config.outputPath, commonTargetFolderName);
|
19
|
+
if (!fs_1.existsSync(commonPath)) {
|
20
|
+
fs_1.mkdirSync(commonPath);
|
21
|
+
}
|
22
|
+
Object.keys(metadata.CommonReexports).forEach(function (key) {
|
23
|
+
var targetFileName = key === commonTargetFolderName ? 'index.ts' : key.replace(commonTargetFolderName + "/", '') + ".ts";
|
24
|
+
var fullPath = path_1.join(commonPath, targetFileName);
|
25
|
+
fs_1.mkdirSync(path_1.dirname(fullPath), { recursive: true });
|
26
|
+
fs_1.writeFileSync(fullPath, _this.generateReexports(key, metadata.CommonReexports[key]), { encoding: 'utf8' });
|
27
|
+
});
|
28
|
+
};
|
29
|
+
CommonReexportsGenerator.prototype.generateReexports = function (module, reexports) {
|
30
|
+
var result = render({ module: module, reexports: reexports });
|
31
|
+
return result;
|
32
|
+
};
|
33
|
+
return CommonReexportsGenerator;
|
34
|
+
}());
|
35
|
+
exports.CommonReexportsGenerator = CommonReexportsGenerator;
|
36
|
+
//# sourceMappingURL=common-reexports-generator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"common-reexports-generator.js","sourceRoot":"","sources":["../../../ts/angular-components-generator/common-reexports-generator.ts"],"names":[],"mappings":";;;AAAA,yBAEY;AACZ,6BAAgE;AAChE,iDAA2D;AAE3D,IAAM,MAAM,GAA+D,wCAAwB,CAAC,6GAInG,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEd;IAAA;IA8BA,CAAC;IA7BC,2CAAQ,GAAR,UAAS,MAAM;QAAf,iBAsBC;QArBC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAY,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE1E,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE;YAC7B,OAAO;SACR;QAED,IAAM,sBAAsB,GAAG,QAAQ,CAAC;QACxC,IAAM,UAAU,GAAG,WAAS,CAAC,MAAM,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC;QACxE,IAAI,CAAC,eAAU,CAAC,UAAU,CAAC,EAAE;YAC3B,cAAS,CAAC,UAAU,CAAC,CAAC;SACvB;QACD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG;YAChD,IAAM,cAAc,GAAG,GAAG,KAAK,sBAAsB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAI,GAAG,CAAC,OAAO,CAAI,sBAAsB,MAAG,EAAE,EAAE,CAAC,QAAK,CAAC;YAC3H,IAAM,QAAQ,GAAG,WAAS,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YACvD,cAAS,CAAC,cAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACrD,kBAAa,CACX,QAAQ,EACR,KAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAC1D,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAGO,oDAAiB,GAAzB,UAA0B,MAAc,EAAE,SAAmB;QAC3D,IAAM,MAAM,GAAG,MAAM,CAAC,EAAE,MAAM,QAAA,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,+BAAC;AAAD,CAAC,AA9BD,IA8BC;AA9BY,4DAAwB"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ComponentNamesGenerator = void 0;
|
4
|
+
var fs = require("fs");
|
5
|
+
var path = require("path");
|
6
|
+
var ComponentNamesGenerator = (function () {
|
7
|
+
function ComponentNamesGenerator(config) {
|
8
|
+
this.encoding = 'utf8';
|
9
|
+
this.config = config;
|
10
|
+
}
|
11
|
+
ComponentNamesGenerator.prototype.prepareTagName = function (fileName) {
|
12
|
+
return " '" + fileName.replace('.ts', '') + "'";
|
13
|
+
};
|
14
|
+
ComponentNamesGenerator.prototype.validateFileName = function (fileName) {
|
15
|
+
return this.config.excludedFileNames.indexOf(fileName) < 0;
|
16
|
+
};
|
17
|
+
ComponentNamesGenerator.prototype.generate = function () {
|
18
|
+
var _this = this;
|
19
|
+
var directoryPath = this.config.componentFilesPath;
|
20
|
+
var files = fs.readdirSync(directoryPath);
|
21
|
+
var fileList = files
|
22
|
+
.filter(function (fileName) { return !fs.lstatSync(path.join(directoryPath, fileName)).isFile()
|
23
|
+
&& _this.validateFileName(fileName); }).map(function (fileName) { return _this.prepareTagName(fileName); })
|
24
|
+
.join(',\n');
|
25
|
+
var resultContent = "export const componentNames = [\n" + fileList + "\n];\n";
|
26
|
+
fs.writeFileSync(this.config.outputFileName, resultContent, { encoding: this.encoding });
|
27
|
+
};
|
28
|
+
return ComponentNamesGenerator;
|
29
|
+
}());
|
30
|
+
exports.ComponentNamesGenerator = ComponentNamesGenerator;
|
31
|
+
//# sourceMappingURL=component-names-generator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component-names-generator.js","sourceRoot":"","sources":["../../../ts/angular-components-generator/component-names-generator.ts"],"names":[],"mappings":";;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B;IAKE,iCAAY,MAAM;QAJV,aAAQ,GAAmB,MAAM,CAAC;QAKxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAGD,gDAAc,GAAd,UAAe,QAAgB;QAC7B,OAAO,UAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,MAAG,CAAC;IAChD,CAAC;IAED,kDAAgB,GAAhB,UAAiB,QAAgB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;IAED,0CAAQ,GAAR;QAAA,iBASC;QARC,IAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACrD,IAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAM,QAAQ,GAAG,KAAK;aACnB,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE;eAC3E,KAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EADd,CACc,CAAC,CAAC,GAAG,CAAC,UAAC,QAAQ,IAAK,OAAA,KAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAA7B,CAA6B,CAAC;aACrF,IAAI,CAAC,KAAK,CAAC,CAAC;QACf,IAAM,aAAa,GAAG,sCAAoC,QAAQ,WAAQ,CAAC;QAC3E,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;IACH,8BAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,0DAAuB"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare function createTemplateFromString(templateString: string): any;
|
2
|
+
export declare class DotGenerator {
|
3
|
+
private _encoding;
|
4
|
+
createTemplate(templateFilePath: string): any;
|
5
|
+
generate(config: any): void;
|
6
|
+
private generateTemplate;
|
7
|
+
private createEntryPoint;
|
8
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DotGenerator = exports.createTemplateFromString = void 0;
|
4
|
+
var fs = require("fs");
|
5
|
+
var path = require("path");
|
6
|
+
var mkdirp = require("mkdirp");
|
7
|
+
var doT = require("dot");
|
8
|
+
var logger_1 = require("./logger");
|
9
|
+
doT.templateSettings = {
|
10
|
+
evaluate: /\<#([\s\S]+?)#\>/g,
|
11
|
+
interpolate: /\<#=([\s\S]+?)#\>/g,
|
12
|
+
encode: /\<#!([\s\S]+?)#\>/g,
|
13
|
+
use: /\<##([\s\S]+?)#\>/g,
|
14
|
+
define: /\<###\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)##\>/g,
|
15
|
+
conditional: /\<#\?(\?)?\s*([\s\S]*?)\s*#\>/g,
|
16
|
+
iterate: /\<#~\s*(?:#\>|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*#\>)/g,
|
17
|
+
varname: 'it',
|
18
|
+
strip: false,
|
19
|
+
append: true,
|
20
|
+
selfcontained: false,
|
21
|
+
};
|
22
|
+
function createTemplateFromString(templateString) {
|
23
|
+
return doT.template(templateString);
|
24
|
+
}
|
25
|
+
exports.createTemplateFromString = createTemplateFromString;
|
26
|
+
var DotGenerator = (function () {
|
27
|
+
function DotGenerator() {
|
28
|
+
this._encoding = 'utf8';
|
29
|
+
}
|
30
|
+
DotGenerator.prototype.createTemplate = function (templateFilePath) {
|
31
|
+
logger_1.default("Create doT template from " + templateFilePath);
|
32
|
+
var templateString = fs.readFileSync(templateFilePath, this._encoding);
|
33
|
+
return createTemplateFromString(templateString);
|
34
|
+
};
|
35
|
+
DotGenerator.prototype.generate = function (config) {
|
36
|
+
this.generateTemplate(config.templateFilePath || path.join(__dirname, './templates/component.tst'), config.metadataFolderPath, config.outputFolderPath, true);
|
37
|
+
this.generateTemplate(config.nestedTemplateFilePath || path.join(__dirname, './templates/nested-component.tst'), path.join(config.metadataFolderPath, config.nestedPathPart), path.join(config.outputFolderPath, config.nestedPathPart));
|
38
|
+
this.generateTemplate(config.baseNestedTemplateFilePath || path.join(__dirname, './templates/base-nested-component.tst'), path.join(config.metadataFolderPath, config.nestedPathPart, config.basePathPart), path.join(config.outputFolderPath, config.nestedPathPart, config.basePathPart));
|
39
|
+
this.createEntryPoint(config.outputFolderPath, 'nested');
|
40
|
+
};
|
41
|
+
DotGenerator.prototype.generateTemplate = function (templateFilePath, metadataFolderPath, outputFolderPath, isSecondaryEntryPoint) {
|
42
|
+
var _this = this;
|
43
|
+
if (isSecondaryEntryPoint === void 0) { isSecondaryEntryPoint = false; }
|
44
|
+
var template = this.createTemplate(templateFilePath);
|
45
|
+
mkdirp.sync(outputFolderPath);
|
46
|
+
logger_1.default("List directory: " + metadataFolderPath);
|
47
|
+
var names = [];
|
48
|
+
fs.readdirSync(metadataFolderPath)
|
49
|
+
.filter(function (fileName) { return fs.lstatSync(path.join(metadataFolderPath, fileName)).isFile(); })
|
50
|
+
.forEach(function (fileName) {
|
51
|
+
var filePath = path.join(metadataFolderPath, fileName);
|
52
|
+
logger_1.default("Read data from " + filePath);
|
53
|
+
var data = fs.readFileSync(filePath, { encoding: _this._encoding });
|
54
|
+
logger_1.default('Apply template');
|
55
|
+
var result = template(JSON.parse(data));
|
56
|
+
var widgetName = path.parse(filePath).name;
|
57
|
+
names.push(widgetName);
|
58
|
+
var resultFilePath;
|
59
|
+
if (isSecondaryEntryPoint) {
|
60
|
+
fs.mkdirSync(path.join(outputFolderPath, widgetName));
|
61
|
+
resultFilePath = path.join(outputFolderPath, widgetName + "/index.ts");
|
62
|
+
_this.createEntryPoint(outputFolderPath, widgetName);
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
resultFilePath = path.join(outputFolderPath, widgetName + ".ts");
|
66
|
+
}
|
67
|
+
logger_1.default("Write result to " + resultFilePath);
|
68
|
+
fs.writeFileSync(resultFilePath, result, { encoding: _this._encoding });
|
69
|
+
});
|
70
|
+
if (!isSecondaryEntryPoint) {
|
71
|
+
fs.writeFileSync(outputFolderPath + "/index.ts", names.map(function (name) { return "export * from './" + name + "';\n"; }).join('') + "\n", { encoding: this._encoding });
|
72
|
+
}
|
73
|
+
};
|
74
|
+
DotGenerator.prototype.createEntryPoint = function (outputFolderPath, entryPoint) {
|
75
|
+
fs.writeFileSync(path.join(outputFolderPath, entryPoint + "/package.json"), JSON.stringify({
|
76
|
+
ngPackage: {
|
77
|
+
lib: {
|
78
|
+
entryFile: 'index.ts',
|
79
|
+
},
|
80
|
+
},
|
81
|
+
}, null, ' '), { encoding: this._encoding });
|
82
|
+
};
|
83
|
+
return DotGenerator;
|
84
|
+
}());
|
85
|
+
exports.DotGenerator = DotGenerator;
|
86
|
+
//# sourceMappingURL=dot-generator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dot-generator.js","sourceRoot":"","sources":["../../../ts/angular-components-generator/dot-generator.ts"],"names":[],"mappings":";;;AAEA,uBAAyB;AACzB,2BAA6B;AAC7B,+BAAiC;AACjC,yBAA2B;AAC3B,mCAA8B;AAE9B,GAAG,CAAC,gBAAgB,GAAG;IACrB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,oBAAoB;IACjC,MAAM,EAAE,oBAAoB;IAC5B,GAAG,EAAE,oBAAoB;IACzB,MAAM,EAAE,4CAA4C;IACpD,WAAW,EAAE,gCAAgC;IAC7C,OAAO,EAAE,uEAAuE;IAChF,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,SAAgB,wBAAwB,CAAC,cAAsB;IAC7D,OAAO,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AACtC,CAAC;AAFD,4DAEC;AAED;IAAA;QACU,cAAS,GAAmB,MAAM,CAAC;IAgF7C,CAAC;IA9EC,qCAAc,GAAd,UAAe,gBAAwB;QACrC,gBAAM,CAAC,8BAA4B,gBAAkB,CAAC,CAAC;QACvD,IAAM,cAAc,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACzE,OAAO,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,+BAAQ,GAAR,UAAS,MAAM;QACb,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,EAChG,MAAM,CAAC,kBAAkB,EACzB,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BAAgB,cAAW,EAC3B,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,sBAAoB,IAAI,SAAM,EAA9B,CAA8B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,OAAI,EACnE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAC7B,CAAC;SACH;IACH,CAAC;IAEO,uCAAgB,GAAxB,UAAyB,gBAAwB,EAAE,UAAkB;QACnE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAK,UAAU,kBAAe,CAAC,EACxE,IAAI,CAAC,SAAS,CAAC;YACb,SAAS,EAAE;gBACT,GAAG,EAAE;oBACH,SAAS,EAAE,UAAU;iBACtB;aACF;SACF,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAClD,CAAC;IACH,mBAAC;AAAD,CAAC,AAjFD,IAiFC;AAjFY,oCAAY"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FacadeGenerator = void 0;
|
4
|
+
var fs = require("fs");
|
5
|
+
var path = require("path");
|
6
|
+
var inflector = require("inflector-js");
|
7
|
+
var logger_1 = require("./logger");
|
8
|
+
var FacadeGenerator = (function () {
|
9
|
+
function FacadeGenerator() {
|
10
|
+
this.encoding = 'utf8';
|
11
|
+
}
|
12
|
+
FacadeGenerator.prototype.generate = function (config) {
|
13
|
+
var _this = this;
|
14
|
+
Object.keys(config.facades).forEach(function (facadeFilePath) {
|
15
|
+
logger_1.default("Generate facade: " + facadeFilePath);
|
16
|
+
var facadeConfig = config.facades[facadeFilePath];
|
17
|
+
var resultContent = '';
|
18
|
+
resultContent += 'export * from \'devextreme-angular/core\';\n';
|
19
|
+
resultContent += 'export * from \'./ui/all\';\n';
|
20
|
+
config.commonImports.forEach(function (i) {
|
21
|
+
resultContent += "import '" + i + "';\n";
|
22
|
+
});
|
23
|
+
fs.readdirSync(facadeConfig.sourceDirectories[0])
|
24
|
+
.filter(function (fileName) { return fs
|
25
|
+
.lstatSync(path.join(facadeConfig.sourceDirectories[0], fileName))
|
26
|
+
.isFile(); }).forEach(function (fileName) {
|
27
|
+
var name = path.parse(path.join(facadeConfig.sourceDirectories[0], fileName)).name;
|
28
|
+
var formattedName = formatName(name);
|
29
|
+
var where = "'devextreme-angular/ui/" + name + "'";
|
30
|
+
resultContent += "export { Dx" + formattedName + "Component, Dx" + formattedName + "Module } from " + where + ";\n";
|
31
|
+
});
|
32
|
+
logger_1.default("Write result to " + facadeFilePath);
|
33
|
+
fs.writeFileSync(facadeFilePath, resultContent, { encoding: _this.encoding });
|
34
|
+
});
|
35
|
+
};
|
36
|
+
return FacadeGenerator;
|
37
|
+
}());
|
38
|
+
exports.FacadeGenerator = FacadeGenerator;
|
39
|
+
function formatName(name) {
|
40
|
+
if (!name.includes('-')) {
|
41
|
+
return inflector.camelize(name);
|
42
|
+
}
|
43
|
+
return name.split('-').map(function (n) { return inflector.camelize(n); }).join('');
|
44
|
+
}
|
45
|
+
//# sourceMappingURL=facade-generator.js.map
|