@magic-xpa/cli 4.1100.0-dev4110.19 → 4.1100.0-dev4110.190
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/index.d.ts +1 -1
- package/index.js +4 -4
- package/package.json +2 -2
- package/src/public_api.d.ts +3 -3
- package/src/public_api.js +6 -6
- package/src/schematics/magic-utils/Util.d.ts +6 -6
- package/src/schematics/magic-utils/Util.js +26 -26
- package/src/schematics/magic-utils/config.d.ts +12 -12
- package/src/schematics/magic-utils/config.js +56 -56
- package/src/schematics/magic-utils/env.d.ts +23 -23
- package/src/schematics/magic-utils/env.js +39 -39
- package/src/schematics/magic-utils/env.js.map +1 -1
- package/src/schematics/magic-utils/env.ts +5 -5
- package/src/schematics/magic-utils/manifest.d.ts +11 -11
- package/src/schematics/magic-utils/manifest.js +40 -40
- package/src/schematics/magic-utils/manifest.js.map +1 -1
- package/src/schematics/magic-utils/metadata.class.d.ts +51 -51
- package/src/schematics/magic-utils/metadata.class.js +124 -124
- package/src/schematics/magic-utils/metadata.class.js.map +1 -1
- package/src/schematics/magic-utils/process-json.d.ts +2 -2
- package/src/schematics/magic-utils/process-json.js +158 -158
- package/src/schematics/magic-utils/process-json.js.map +1 -1
- package/src/schematics/magic-utils/rules/build-control.rule.d.ts +5 -5
- package/src/schematics/magic-utils/rules/build-control.rule.js +74 -74
- package/src/schematics/magic-utils/rules/build-control.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/build-view.rule.d.ts +3 -3
- package/src/schematics/magic-utils/rules/build-view.rule.js +83 -80
- package/src/schematics/magic-utils/rules/build-view.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/build-view.rule.ts +4 -0
- package/src/schematics/magic-utils/rules/component-list.rule.d.ts +3 -3
- package/src/schematics/magic-utils/rules/component-list.rule.js +317 -317
- package/src/schematics/magic-utils/rules/component-list.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/generate.rule.d.ts +5 -5
- package/src/schematics/magic-utils/rules/generate.rule.js +54 -54
- package/src/schematics/magic-utils/rules/generate.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/init-add-modules.rule.d.ts +12 -12
- package/src/schematics/magic-utils/rules/init-add-modules.rule.js +296 -296
- package/src/schematics/magic-utils/rules/init-add-modules.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/init-gen-components.rule.d.ts +4 -4
- package/src/schematics/magic-utils/rules/init-gen-components.rule.js +66 -66
- package/src/schematics/magic-utils/rules/init-gen-components.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/init-magic-metadata.rule.d.ts +3 -3
- package/src/schematics/magic-utils/rules/init-magic-metadata.rule.js +18 -18
- package/src/schematics/magic-utils/rules/init-magic-metadata.rule.js.map +1 -1
- package/src/schematics/magic-utils/rules/load-views-gen.rule.d.ts +3 -3
- package/src/schematics/magic-utils/rules/load-views-gen.rule.js +29 -29
- package/src/schematics/magic-utils/rules/magic-option.scheme.d.ts +22 -21
- package/src/schematics/magic-utils/rules/magic-option.scheme.js +2 -2
- package/src/schematics/magic-utils/rules/magic-option.scheme.js.map +1 -1
- package/src/schematics/magic-utils/rules/magic-option.scheme.ts +1 -0
- package/src/schematics/magic-utils/utils.d.ts +12 -12
- package/src/schematics/magic-utils/utils.js +117 -117
- package/src/schematics/magic-utils/utils.js.map +1 -1
- package/src/schematics/mg-Install-prerequisites/index.d.ts +3 -3
- package/src/schematics/mg-Install-prerequisites/index.js +25 -25
- package/src/schematics/mg-Install-prerequisites/index.js.map +1 -1
- package/src/schematics/mg-add/files/src/app/magic/magic.gen.lib.module.ts +19 -19
- package/src/schematics/mg-add/files/src/magic-styles.css +1 -1
- package/src/schematics/mg-add/index.d.ts +3 -3
- package/src/schematics/mg-add/index.js +151 -151
- package/src/schematics/mg-add/index.js.map +1 -1
- package/src/schematics/mg-add/utils/add-declaration-to-root-module.d.ts +2 -2
- package/src/schematics/mg-add/utils/add-declaration-to-root-module.js +11 -11
- package/src/schematics/mg-add-tasks/index.d.ts +3 -3
- package/src/schematics/mg-add-tasks/index.js +30 -30
- package/src/schematics/mg-delete-files/index.d.ts +3 -3
- package/src/schematics/mg-delete-files/index.js +13 -13
- package/src/schematics/mg-gen-module/index.d.ts +3 -3
- package/src/schematics/mg-gen-module/index.js +15 -15
- package/src/schematics/mg-generate/index.d.ts +3 -3
- package/src/schematics/mg-generate/index.js +13 -13
- package/src/schematics/mg-generate-component/index.d.ts +3 -3
- package/src/schematics/mg-generate-component/index.js +35 -35
- package/src/schematics/mg-generate-component/index.js.map +1 -1
- package/src/schematics/mg-generate-component/schema.json +6 -0
- package/src/schematics/mg-install/index.d.ts +3 -3
- package/src/schematics/mg-install/index.js +30 -30
- package/src/schematics/mg-install/index.js.map +1 -1
- package/src/schematics/mg-routes/index.d.ts +6 -6
- package/src/schematics/mg-routes/index.js +63 -63
- package/src/schematics/mg-routes/index.js.map +1 -1
- package/src/schematics/mg-single-control/index.d.ts +3 -3
- package/src/schematics/mg-single-control/index.js +29 -29
- package/src/schematics/utils/ast.d.ts +21 -21
- package/src/schematics/utils/ast.js +91 -91
- package/src/schematics/utils/ast.js.map +1 -1
- package/src/schematics/utils/ast.ts +1 -1
- package/src/schematics/utils/devkit-utils/ast-utils.d.ts +87 -87
- package/src/schematics/utils/devkit-utils/ast-utils.js +490 -490
- package/src/schematics/utils/devkit-utils/ast-utils.js.map +1 -1
- package/src/schematics/utils/devkit-utils/ast-utils_old.d.ts +68 -68
- package/src/schematics/utils/devkit-utils/ast-utils_old.js +420 -420
- package/src/schematics/utils/devkit-utils/ast-utils_old.js.map +1 -1
- package/src/schematics/utils/devkit-utils/change.d.ts +66 -66
- package/src/schematics/utils/devkit-utils/change.js +94 -94
- package/src/schematics/utils/devkit-utils/change.js.map +1 -1
- package/src/schematics/utils/devkit-utils/component.d.ts +2 -2
- package/src/schematics/utils/devkit-utils/component.js +97 -97
- package/src/schematics/utils/devkit-utils/component.js.map +1 -1
- package/src/schematics/utils/devkit-utils/config.d.ts +78 -78
- package/src/schematics/utils/devkit-utils/config.js +52 -52
- package/src/schematics/utils/devkit-utils/config.js.map +1 -1
- package/src/schematics/utils/devkit-utils/find-module.d.ts +28 -28
- package/src/schematics/utils/devkit-utils/find-module.js +93 -93
- package/src/schematics/utils/devkit-utils/find-module.js.map +1 -1
- package/src/schematics/utils/devkit-utils/ng-ast-utils.d.ts +5 -5
- package/src/schematics/utils/devkit-utils/ng-ast-utils.js +74 -74
- package/src/schematics/utils/devkit-utils/ng-ast-utils.js.map +1 -1
- package/src/schematics/utils/devkit-utils/parse-name.d.ts +13 -13
- package/src/schematics/utils/devkit-utils/parse-name.js +20 -20
- package/src/schematics/utils/devkit-utils/route-utils.d.ts +20 -20
- package/src/schematics/utils/devkit-utils/route-utils.js +134 -134
- package/src/schematics/utils/devkit-utils/route-utils.js.map +1 -1
- package/src/schematics/utils/devkit-utils/validation.d.ts +1 -1
- package/src/schematics/utils/devkit-utils/validation.js +18 -18
- package/src/schematics/utils/devkit-utils/validation.js.map +1 -1
- package/src/schematics/utils/html.d.ts +18 -18
- package/src/schematics/utils/html.js +60 -60
- package/src/schematics/utils/html.js.map +1 -1
- package/src/schematics/utils/lib-versions.d.ts +3 -3
- package/src/schematics/utils/lib-versions.js +6 -6
- package/src/schematics/utils/package.d.ts +5 -5
- package/src/schematics/utils/package.js +21 -21
- package/src/schematics/utils/package.js.map +1 -1
- package/src/schematics/utils/testing.d.ts +5 -5
- package/src/schematics/utils/testing.js +27 -27
- package/src/schematics/utils/testing.js.map +1 -1
- package/src/schematics/utils/testing.ts +2 -2
- package/src/types/enums/Enums.d.ts +1646 -1646
- package/src/types/enums/Enums.js +1862 -1862
- package/src/types/enums/Enums.js.map +1 -1
- package/src/types/enums/generated-file-types.enum.d.ts +6 -6
- package/src/types/enums/generated-file-types.enum.js +10 -10
- package/src/types/enums/generated-file-types.enum.js.map +1 -1
- package/src/types/enums/horizontal-alignments.enum.d.ts +5 -5
- package/src/types/enums/horizontal-alignments.enum.js +9 -9
- package/src/types/enums/horizontal-alignments.enum.js.map +1 -1
- package/src/types/enums/themes.enum.d.ts +6 -6
- package/src/types/enums/themes.enum.js +10 -10
- package/src/types/enums/themes.enum.js.map +1 -1
- package/src/types/index.d.ts +7 -7
- package/src/types/index.js +10 -10
- package/src/types/interfaces/app.d.ts +53 -53
- package/src/types/interfaces/app.js +9 -9
- package/src/types/interfaces/control.d.ts +82 -82
- package/src/types/interfaces/control.js +2 -2
- package/src/types/interfaces/env.interface.d.ts +19 -19
- package/src/types/interfaces/env.interface.js +10 -10
- package/src/types/interfaces/template.config.d.ts +8 -8
- package/src/types/interfaces/template.config.js +2 -2
- package/templates/themes/basicHTML/edit.ejs +2 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mgGenerateComponent = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
-
const Util_1 = require("../magic-utils/Util");
|
|
7
|
-
const init_gen_components_rule_1 = require("../magic-utils/rules/init-gen-components.rule");
|
|
8
|
-
function mgGenerateComponent(options) {
|
|
9
|
-
if (options.component == '') {
|
|
10
|
-
(0, Util_1.LogLn)('Component name should not be empty.');
|
|
11
|
-
return (0, schematics_1.chain)([]);
|
|
12
|
-
}
|
|
13
|
-
options.module = getModuleName(options);
|
|
14
|
-
options.loadOnDemand = getLoadOnDemandFlagForModule(options);
|
|
15
|
-
return (0, schematics_1.chain)([
|
|
16
|
-
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
17
|
-
(0, init_gen_components_rule_1.initAndGenComponentsForModule)(options, true, true)
|
|
18
|
-
]);
|
|
19
|
-
}
|
|
20
|
-
exports.mgGenerateComponent = mgGenerateComponent;
|
|
21
|
-
// To get the module name from the FormId
|
|
22
|
-
// In the case of containertype="Directory", consider root module.
|
|
23
|
-
// In all other cases gets the first string value till separator(/) from the formId.
|
|
24
|
-
function getModuleName(options) {
|
|
25
|
-
let moduleName = "";
|
|
26
|
-
if (options.containertype && options.containertype !== "Directory")
|
|
27
|
-
moduleName = options.component.split('/')[0];
|
|
28
|
-
return moduleName;
|
|
29
|
-
}
|
|
30
|
-
// To get loadOnDemand flag for the module
|
|
31
|
-
// In the case of containertype == "LoadOnDemandModule", consider it as true
|
|
32
|
-
// In all other cases, consider it as false
|
|
33
|
-
function getLoadOnDemandFlagForModule(options) {
|
|
34
|
-
return options.containertype === "LoadOnDemandModule";
|
|
35
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mgGenerateComponent = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
+
const Util_1 = require("../magic-utils/Util");
|
|
7
|
+
const init_gen_components_rule_1 = require("../magic-utils/rules/init-gen-components.rule");
|
|
8
|
+
function mgGenerateComponent(options) {
|
|
9
|
+
if (options.component == '') {
|
|
10
|
+
(0, Util_1.LogLn)('Component name should not be empty.');
|
|
11
|
+
return (0, schematics_1.chain)([]);
|
|
12
|
+
}
|
|
13
|
+
options.module = getModuleName(options);
|
|
14
|
+
options.loadOnDemand = getLoadOnDemandFlagForModule(options);
|
|
15
|
+
return (0, schematics_1.chain)([
|
|
16
|
+
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
17
|
+
(0, init_gen_components_rule_1.initAndGenComponentsForModule)(options, true, true)
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
exports.mgGenerateComponent = mgGenerateComponent;
|
|
21
|
+
// To get the module name from the FormId
|
|
22
|
+
// In the case of containertype="Directory", consider root module.
|
|
23
|
+
// In all other cases gets the first string value till separator(/) from the formId.
|
|
24
|
+
function getModuleName(options) {
|
|
25
|
+
let moduleName = "";
|
|
26
|
+
if (options.containertype && options.containertype !== "Directory")
|
|
27
|
+
moduleName = options.component.split('/')[0];
|
|
28
|
+
return moduleName;
|
|
29
|
+
}
|
|
30
|
+
// To get loadOnDemand flag for the module
|
|
31
|
+
// In the case of containertype == "LoadOnDemandModule", consider it as true
|
|
32
|
+
// In all other cases, consider it as false
|
|
33
|
+
function getLoadOnDemandFlagForModule(options) {
|
|
34
|
+
return options.containertype === "LoadOnDemandModule";
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,4FAAmF;AAEnF,8CAA0C;AAC1C,4FAA4F;AAE5F,SAAgB,mBAAmB,CAAC,OAAyB;IAE3D,IAAG,OAAO,CAAC,SAAS,IAAI,EAAE,EAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,4FAAmF;AAEnF,8CAA0C;AAC1C,4FAA4F;AAE5F,SAAgB,mBAAmB,CAAC,OAAyB;IAE3D,IAAG,OAAO,CAAC,SAAS,IAAI,EAAE,EAAC,CAAC;QAC1B,IAAA,YAAK,EAAC,qCAAqC,CAAC,CAAC;QAC7C,OAAO,IAAA,kBAAK,EAAC,EAAE,CAAC,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,OAAO,CAAC,YAAY,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IAE7D,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,4CAAiB,EAAE,OAAO,CAAC;QAC3B,IAAA,wDAA6B,EAAC,OAAO,EAAE,IAAI,EAAC,IAAI,CAAC;KAClD,CAAC,CAAC;AACL,CAAC;AAdD,kDAcC;AAED,yCAAyC;AACzC,kEAAkE;AAClE,oFAAoF;AACpF,SAAS,aAAa,CAAC,OAA0B;IAC/C,IAAI,UAAU,GAAU,EAAE,CAAC;IAC3B,IAAG,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,aAAa,KAAK,WAAW;QAC/D,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,0CAA0C;AAC1C,4EAA4E;AAC5E,2CAA2C;AAC3C,SAAS,4BAA4B,CAAC,OAA0B;IAC7D,OAAO,OAAO,CAAC,aAAa,KAAK,oBAAoB,CAAC;AACzD,CAAC","sourcesContent":["import { chain, Rule, SchematicContext, Tree } from \"@angular-devkit/schematics\";\r\nimport { initMagicMetadata} from \"../magic-utils/rules/init-magic-metadata.rule\";\r\nimport { MagicOptionScheme } from \"../magic-utils/rules/magic-option.scheme\";\r\nimport {LogLn} from \"../magic-utils/Util\";\r\nimport {initAndGenComponentsForModule} from \"../magic-utils/rules/init-gen-components.rule\";\r\n\r\nexport function mgGenerateComponent(options:MagicOptionScheme): Rule {\r\n\r\n if(options.component == ''){\r\n LogLn('Component name should not be empty.');\r\n return chain([]);\r\n }\r\n\r\n options.module = getModuleName(options);\r\n options.loadOnDemand = getLoadOnDemandFlagForModule(options);\r\n\r\n return chain([\r\n initMagicMetadata (options),\r\n initAndGenComponentsForModule(options, true,true)\r\n ]);\r\n}\r\n\r\n// To get the module name from the FormId\r\n// In the case of containertype=\"Directory\", consider root module.\r\n// In all other cases gets the first string value till separator(/) from the formId.\r\nfunction getModuleName(options: MagicOptionScheme){\r\n let moduleName:string = \"\";\r\n if(options.containertype && options.containertype !== \"Directory\")\r\n moduleName = options.component.split('/')[0];\r\n return moduleName;\r\n}\r\n\r\n// To get loadOnDemand flag for the module\r\n// In the case of containertype == \"LoadOnDemandModule\", consider it as true\r\n// In all other cases, consider it as false\r\nfunction getLoadOnDemandFlagForModule(options: MagicOptionScheme){\r\n return options.containertype === \"LoadOnDemandModule\";\r\n}\r\n"]}
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"type": "string",
|
|
29
29
|
"description": "The value of container type (EagerModule, Directory, LoadOnDemandModule, '')",
|
|
30
30
|
"aliases" : ["ct"]
|
|
31
|
+
},
|
|
32
|
+
"controlsaccessoronly": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": false,
|
|
35
|
+
"description": "To generate controls accessor only",
|
|
36
|
+
"aliases": ["ca"]
|
|
31
37
|
}
|
|
32
38
|
},
|
|
33
39
|
"required": []
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
-
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
-
export declare function mgInstall(options: MagicOptionScheme): Rule;
|
|
1
|
+
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
+
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
+
export declare function mgInstall(options: MagicOptionScheme): Rule;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mgInstall = void 0;
|
|
4
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
-
const package_1 = require("../utils/package");
|
|
6
|
-
function mgInstall(options) {
|
|
7
|
-
return (host, context) => {
|
|
8
|
-
// for debug only
|
|
9
|
-
// if (options.dependencies == null) {
|
|
10
|
-
// options.dependencies = [];
|
|
11
|
-
// options.dependencies.push(new Idependencies("@magic-xpa/angular", "0.0.177"));
|
|
12
|
-
// }
|
|
13
|
-
if (!options.skipPackageJson) {
|
|
14
|
-
for (let dep of options.dependencies) {
|
|
15
|
-
context.logger.info(`[>] Add dependencies ${dep.name} ${dep.version}`);
|
|
16
|
-
(0, package_1.addPackageToPackageJson)(host, 'dependencies', dep.name, dep.version);
|
|
17
|
-
}
|
|
18
|
-
for (let dep of options.devDependencies) {
|
|
19
|
-
context.logger.info(`[>] Add devDependencies ${dep.name} ${dep.version}`);
|
|
20
|
-
(0, package_1.addPackageToPackageJson)(host, 'devDependencies', dep.name, dep.version);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (!options.skipInstall) {
|
|
24
|
-
context.logger.info(`[>] Install dependencies.`);
|
|
25
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
26
|
-
}
|
|
27
|
-
return host;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
exports.mgInstall = mgInstall;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mgInstall = void 0;
|
|
4
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const package_1 = require("../utils/package");
|
|
6
|
+
function mgInstall(options) {
|
|
7
|
+
return (host, context) => {
|
|
8
|
+
// for debug only
|
|
9
|
+
// if (options.dependencies == null) {
|
|
10
|
+
// options.dependencies = [];
|
|
11
|
+
// options.dependencies.push(new Idependencies("@magic-xpa/angular", "0.0.177"));
|
|
12
|
+
// }
|
|
13
|
+
if (!options.skipPackageJson) {
|
|
14
|
+
for (let dep of options.dependencies) {
|
|
15
|
+
context.logger.info(`[>] Add dependencies ${dep.name} ${dep.version}`);
|
|
16
|
+
(0, package_1.addPackageToPackageJson)(host, 'dependencies', dep.name, dep.version);
|
|
17
|
+
}
|
|
18
|
+
for (let dep of options.devDependencies) {
|
|
19
|
+
context.logger.info(`[>] Add devDependencies ${dep.name} ${dep.version}`);
|
|
20
|
+
(0, package_1.addPackageToPackageJson)(host, 'devDependencies', dep.name, dep.version);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (!options.skipInstall) {
|
|
24
|
+
context.logger.info(`[>] Install dependencies.`);
|
|
25
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
26
|
+
}
|
|
27
|
+
return host;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
exports.mgInstall = mgInstall;
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,4DAA4F;AAC5F,8CAA2D;AAI3D,SAAgB,SAAS,CAAC,OAAyB;IACjD,OAAO,CAAC,IAAS,EAAE,OAAwB,EAAC,EAAE;QAE5C,iBAAiB;QACjB,sCAAsC;QACtC,+BAA+B;QAC/B,mFAAmF;QACnF,IAAI;QAEJ,IAAG,CAAC,OAAO,CAAC,eAAe,EAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,4DAA4F;AAC5F,8CAA2D;AAI3D,SAAgB,SAAS,CAAC,OAAyB;IACjD,OAAO,CAAC,IAAS,EAAE,OAAwB,EAAC,EAAE;QAE5C,iBAAiB;QACjB,sCAAsC;QACtC,+BAA+B;QAC/B,mFAAmF;QACnF,IAAI;QAEJ,IAAG,CAAC,OAAO,CAAC,eAAe,EAAC,CAAC;YAC3B,KAAK,IAAI,GAAG,IAAI,OAAO,CAAC,YAAY,EAAC,CAAC;gBACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvE,IAAA,iCAAuB,EAAC,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;YACvE,CAAC;YACD,KAAK,IAAI,GAAG,IAAI,OAAO,CAAC,eAAe,EAAC,CAAC;gBACvC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC1E,IAAA,iCAAuB,EAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,IAAG,CAAC,OAAO,CAAC,WAAW,EAAC,CAAC;YACvB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YACjD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,IAAI,CAAC;IAEd,CAAC,CAAC;AACJ,CAAC;AA5BD,8BA4BC","sourcesContent":["import { Rule,Tree,SchematicContext } from \"@angular-devkit/schematics\";\nimport { NodePackageInstallTask, RunSchematicTask } from \"@angular-devkit/schematics/tasks\";\nimport { addPackageToPackageJson } from \"../utils/package\";\nimport { dependencies, devDependencies, Idependencies } from \"../magic-utils/env\";\nimport { MagicOptionScheme } from \"../magic-utils/rules/magic-option.scheme\";\n\nexport function mgInstall(options:MagicOptionScheme): Rule {\n return (host:Tree, context:SchematicContext)=>{\n\n // for debug only\n // if (options.dependencies == null) {\n // options.dependencies = [];\n // options.dependencies.push(new Idependencies(\"@magic-xpa/angular\", \"0.0.177\"));\n // }\n\n if(!options.skipPackageJson){\n for (let dep of options.dependencies){\n context.logger.info(`[>] Add dependencies ${dep.name} ${dep.version}`);\n addPackageToPackageJson(host, 'dependencies', dep.name, dep.version);\n }\n for (let dep of options.devDependencies){\n context.logger.info(`[>] Add devDependencies ${dep.name} ${dep.version}`);\n addPackageToPackageJson(host, 'devDependencies', dep.name, dep.version);\n }\n }\n\n if(!options.skipInstall){\n context.logger.info(`[>] Install dependencies.`);\n context.addTask(new NodePackageInstallTask());\n }\n\n return host;\n\n };\n}\n\n\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
-
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
-
import { RouteTable } from "../../types/interfaces/app";
|
|
4
|
-
export declare function mgGenerateRoutes(options: MagicOptionScheme): Rule;
|
|
5
|
-
export declare function genRoutesFile(options: MagicOptionScheme): Rule;
|
|
6
|
-
export declare function genRouteFile(options: MagicOptionScheme, routeItem: RouteTable): Rule;
|
|
1
|
+
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
+
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
+
import { RouteTable } from "../../types/interfaces/app";
|
|
4
|
+
export declare function mgGenerateRoutes(options: MagicOptionScheme): Rule;
|
|
5
|
+
export declare function genRoutesFile(options: MagicOptionScheme): Rule;
|
|
6
|
+
export declare function genRouteFile(options: MagicOptionScheme, routeItem: RouteTable): Rule;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.genRouteFile = exports.genRoutesFile = exports.mgGenerateRoutes = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
-
const types_1 = require("../../types");
|
|
7
|
-
const generate_rule_1 = require("../magic-utils/rules/generate.rule");
|
|
8
|
-
const env_1 = require("../magic-utils/env");
|
|
9
|
-
const Util_1 = require("../magic-utils/Util");
|
|
10
|
-
function mgGenerateRoutes(options) {
|
|
11
|
-
return (0, schematics_1.chain)([
|
|
12
|
-
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
13
|
-
genRoutesFile(options)
|
|
14
|
-
]);
|
|
15
|
-
}
|
|
16
|
-
exports.mgGenerateRoutes = mgGenerateRoutes;
|
|
17
|
-
//-------------------------------------------------------------------------------------------------
|
|
18
|
-
// generate all the modules in env.modulesGen
|
|
19
|
-
//-------------------------------------------------------------------------------------------------
|
|
20
|
-
function genRoutesFile(options) {
|
|
21
|
-
return (tree, context) => {
|
|
22
|
-
const metadata = env_1.env.metadata;
|
|
23
|
-
let routeTable = metadata.routesTable;
|
|
24
|
-
let rules = [];
|
|
25
|
-
context.logger.info(`routes length: ${routeTable.length}`);
|
|
26
|
-
for (let routeItem of routeTable) {
|
|
27
|
-
rules.push(genRouteFile(options, routeItem));
|
|
28
|
-
}
|
|
29
|
-
return (0, schematics_1.chain)(rules)(tree, context);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
exports.genRoutesFile = genRoutesFile;
|
|
33
|
-
function genRouteFile(options, routeItem) {
|
|
34
|
-
return (host, context) => {
|
|
35
|
-
const metadata = env_1.env.metadata;
|
|
36
|
-
let createRootRoute = routeItem.module_name == '' ? true : false;
|
|
37
|
-
(0, Util_1.LogLn)(`genRouteFile : [${routeItem.module_name}] createRootRoute = ${createRootRoute}`);
|
|
38
|
-
const data = {
|
|
39
|
-
routesArray: routeItem.routesArray,
|
|
40
|
-
createRootRoute: createRootRoute
|
|
41
|
-
};
|
|
42
|
-
let template = `./templates/angular/src/app.routes.ts`;
|
|
43
|
-
let destinationPath = metadata.paths.rootMagicGenFolder;
|
|
44
|
-
if (routeItem.module_name != '') {
|
|
45
|
-
destinationPath = metadata.paths.magicGenFolderPath + `/${routeItem.module_name}`;
|
|
46
|
-
}
|
|
47
|
-
if (data.routesArray == undefined)
|
|
48
|
-
context.logger.info(`RouteTable is not defined !`);
|
|
49
|
-
else
|
|
50
|
-
context.logger.info(`generating ${data.routesArray.length} root routes`);
|
|
51
|
-
const componentFile = {
|
|
52
|
-
type: types_1.GeneratedFileTypes.TS,
|
|
53
|
-
template: template,
|
|
54
|
-
destination: destinationPath,
|
|
55
|
-
name: 'app.routes.ts',
|
|
56
|
-
data: data
|
|
57
|
-
};
|
|
58
|
-
return (0, schematics_1.chain)([
|
|
59
|
-
(0, generate_rule_1.generate)(componentFile, options)
|
|
60
|
-
])(host, context);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
exports.genRouteFile = genRouteFile;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.genRouteFile = exports.genRoutesFile = exports.mgGenerateRoutes = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
+
const types_1 = require("../../types");
|
|
7
|
+
const generate_rule_1 = require("../magic-utils/rules/generate.rule");
|
|
8
|
+
const env_1 = require("../magic-utils/env");
|
|
9
|
+
const Util_1 = require("../magic-utils/Util");
|
|
10
|
+
function mgGenerateRoutes(options) {
|
|
11
|
+
return (0, schematics_1.chain)([
|
|
12
|
+
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
13
|
+
genRoutesFile(options)
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
exports.mgGenerateRoutes = mgGenerateRoutes;
|
|
17
|
+
//-------------------------------------------------------------------------------------------------
|
|
18
|
+
// generate all the modules in env.modulesGen
|
|
19
|
+
//-------------------------------------------------------------------------------------------------
|
|
20
|
+
function genRoutesFile(options) {
|
|
21
|
+
return (tree, context) => {
|
|
22
|
+
const metadata = env_1.env.metadata;
|
|
23
|
+
let routeTable = metadata.routesTable;
|
|
24
|
+
let rules = [];
|
|
25
|
+
context.logger.info(`routes length: ${routeTable.length}`);
|
|
26
|
+
for (let routeItem of routeTable) {
|
|
27
|
+
rules.push(genRouteFile(options, routeItem));
|
|
28
|
+
}
|
|
29
|
+
return (0, schematics_1.chain)(rules)(tree, context);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.genRoutesFile = genRoutesFile;
|
|
33
|
+
function genRouteFile(options, routeItem) {
|
|
34
|
+
return (host, context) => {
|
|
35
|
+
const metadata = env_1.env.metadata;
|
|
36
|
+
let createRootRoute = routeItem.module_name == '' ? true : false;
|
|
37
|
+
(0, Util_1.LogLn)(`genRouteFile : [${routeItem.module_name}] createRootRoute = ${createRootRoute}`);
|
|
38
|
+
const data = {
|
|
39
|
+
routesArray: routeItem.routesArray,
|
|
40
|
+
createRootRoute: createRootRoute
|
|
41
|
+
};
|
|
42
|
+
let template = `./templates/angular/src/app.routes.ts`;
|
|
43
|
+
let destinationPath = metadata.paths.rootMagicGenFolder;
|
|
44
|
+
if (routeItem.module_name != '') {
|
|
45
|
+
destinationPath = metadata.paths.magicGenFolderPath + `/${routeItem.module_name}`;
|
|
46
|
+
}
|
|
47
|
+
if (data.routesArray == undefined)
|
|
48
|
+
context.logger.info(`RouteTable is not defined !`);
|
|
49
|
+
else
|
|
50
|
+
context.logger.info(`generating ${data.routesArray.length} root routes`);
|
|
51
|
+
const componentFile = {
|
|
52
|
+
type: types_1.GeneratedFileTypes.TS,
|
|
53
|
+
template: template, // `./templates/angular/src/app.routes.ts`,
|
|
54
|
+
destination: destinationPath, // metadata.paths.rootMagicGenFolder,
|
|
55
|
+
name: 'app.routes.ts',
|
|
56
|
+
data: data
|
|
57
|
+
};
|
|
58
|
+
return (0, schematics_1.chain)([
|
|
59
|
+
(0, generate_rule_1.generate)(componentFile, options)
|
|
60
|
+
])(host, context);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
exports.genRouteFile = genRouteFile;
|
|
64
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAA+F;AAC/F,4FAAkF;AAClF,uCAAiE;AACjE,sEAA8D;AAC9D,4CAAyC;AAGzC,8CAA4C;AAE5C,SAAgB,gBAAgB,CAAC,OAA0B;IACzD,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,4CAAiB,EAAE,OAAO,CAAC;QAC3B,aAAa,CAAM,OAAO,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC;AALD,4CAKC;AAED,mGAAmG;AACnG,8CAA8C;AAC9C,mGAAmG;AACnG,SAAgB,aAAa,CAAC,OAA0B;IACtD,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,QAAQ,GAAI,SAAG,CAAC,QAAQ,CAAC;QAC/B,IAAI,UAAU,GAAkB,QAAQ,CAAC,WAAW,CAAC;QACrD,IAAI,KAAK,GAAU,EAAE,CAAC;QAEtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3D,KAAK,IAAI,SAAS,IAAI,UAAU,EAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAA+F;AAC/F,4FAAkF;AAClF,uCAAiE;AACjE,sEAA8D;AAC9D,4CAAyC;AAGzC,8CAA4C;AAE5C,SAAgB,gBAAgB,CAAC,OAA0B;IACzD,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,4CAAiB,EAAE,OAAO,CAAC;QAC3B,aAAa,CAAM,OAAO,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC;AALD,4CAKC;AAED,mGAAmG;AACnG,8CAA8C;AAC9C,mGAAmG;AACnG,SAAgB,aAAa,CAAC,OAA0B;IACtD,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,QAAQ,GAAI,SAAG,CAAC,QAAQ,CAAC;QAC/B,IAAI,UAAU,GAAkB,QAAQ,CAAC,WAAW,CAAC;QACrD,IAAI,KAAK,GAAU,EAAE,CAAC;QAEtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3D,KAAK,IAAI,SAAS,IAAI,UAAU,EAAC,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,IAAA,kBAAK,EAAC,KAAK,CAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAfD,sCAeC;AAMD,SAAgB,YAAY,CAAC,OAA0B,EAAE,SAAsB;IAC7E,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,MAAM,QAAQ,GAAI,SAAG,CAAC,QAAQ,CAAC;QAC/B,IAAI,eAAe,GAAW,SAAS,CAAC,WAAW,IAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA,CAAC,CAAC,KAAK,CAAC;QACvE,IAAA,YAAK,EAAC,mBAAmB,SAAS,CAAC,WAAW,wBAAwB,eAAe,EAAE,CAAC,CAAA;QAExF,MAAM,IAAI,GAAQ;YAChB,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,eAAe,EAAC,eAAe;SAChC,CAAC;QAEF,IAAI,QAAQ,GAAY,uCAAuC,CAAC;QAChE,IAAI,eAAe,GAAW,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC;QAChE,IAAI,SAAS,CAAC,WAAW,IAAI,EAAE,EAC/B,CAAC;YACC,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,kBAAkB,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;QACpF,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,IAAK,SAAS;YAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;;YAEnD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,WAAW,CAAC,MAAM,cAAc,CAAC,CAAC;QAE3E,MAAM,aAAa,GAAmB;YACpC,IAAI,EAAU,0BAAkB,CAAC,EAAE;YACnC,QAAQ,EAAM,QAAQ,EAAoC,2CAA2C;YACrG,WAAW,EAAG,eAAe,EAA6B,qCAAqC;YAC/F,IAAI,EAAU,eAAe;YAC7B,IAAI,EAAU,IAAI;SACnB,CAAC;QAEF,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,wBAAQ,EAAC,aAAa,EAAC,OAAO,CAAC;SAChC,CAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC;IACnB,CAAC,CAAA;AACH,CAAC;AAnCD,oCAmCC","sourcesContent":["import { chain, forEach, Rule, SchematicContext, Tree, url } from \"@angular-devkit/schematics\";\r\nimport { initMagicMetadata } from \"../magic-utils/rules/init-magic-metadata.rule\";\r\nimport { GeneratedFileTypes, TemplateConfig } from \"../../types\";\r\nimport { generate } from \"../magic-utils/rules/generate.rule\";\r\nimport { env } from \"../magic-utils/env\";\r\nimport { MagicOptionScheme } from \"../magic-utils/rules/magic-option.scheme\";\r\nimport { RouteTable } from \"../../types/interfaces/app\";\r\nimport { LogLn } from \"../magic-utils/Util\";\r\n\r\nexport function mgGenerateRoutes(options: MagicOptionScheme): Rule {\r\n return chain([\r\n initMagicMetadata (options),\r\n genRoutesFile (options)\r\n ]);\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// generate all the modules in env.modulesGen\r\n//-------------------------------------------------------------------------------------------------\r\nexport function genRoutesFile(options: MagicOptionScheme): Rule {\r\n return (tree: Tree, context: SchematicContext) => {\r\n\r\n const metadata = env.metadata;\r\n let routeTable: RouteTable[] = metadata.routesTable;\r\n let rules:Rule[] = [];\r\n\r\n context.logger.info(`routes length: ${routeTable.length}`);\r\n\r\n for (let routeItem of routeTable){\r\n rules.push(genRouteFile(options, routeItem));\r\n }\r\n\r\n return chain(rules)(tree,context);\r\n };\r\n}\r\n\r\n\r\n\r\n\r\n\r\nexport function genRouteFile(options: MagicOptionScheme, routeItem : RouteTable ) : Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n const metadata = env.metadata;\r\n let createRootRoute:boolean = routeItem.module_name =='' ? true: false;\r\n LogLn(`genRouteFile : [${routeItem.module_name}] createRootRoute = ${createRootRoute}`)\r\n\r\n const data: any = {\r\n routesArray: routeItem.routesArray,\r\n createRootRoute:createRootRoute\r\n };\r\n\r\n let template : string = `./templates/angular/src/app.routes.ts`;\r\n let destinationPath:string = metadata.paths.rootMagicGenFolder;\r\n if (routeItem.module_name != '')\r\n {\r\n destinationPath = metadata.paths.magicGenFolderPath + `/${routeItem.module_name}`;\r\n }\r\n\r\n if (data.routesArray == undefined)\r\n context.logger.info(`RouteTable is not defined !`);\r\n else\r\n context.logger.info(`generating ${data.routesArray.length} root routes`);\r\n\r\n const componentFile: TemplateConfig = {\r\n type : GeneratedFileTypes.TS,\r\n template : template, // `./templates/angular/src/app.routes.ts`,\r\n destination : destinationPath, // metadata.paths.rootMagicGenFolder,\r\n name : 'app.routes.ts',\r\n data : data\r\n };\r\n\r\n return chain([\r\n generate(componentFile,options)\r\n ])(host,context);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
-
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
-
export declare function mgSingleControl(options: MagicOptionScheme): Rule;
|
|
1
|
+
import { Rule } from "@angular-devkit/schematics";
|
|
2
|
+
import { MagicOptionScheme } from "../magic-utils/rules/magic-option.scheme";
|
|
3
|
+
export declare function mgSingleControl(options: MagicOptionScheme): Rule;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mgSingleControl = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
-
const init_gen_components_rule_1 = require("../magic-utils/rules/init-gen-components.rule");
|
|
7
|
-
const build_control_rule_1 = require("../magic-utils/rules/build-control.rule");
|
|
8
|
-
const env_1 = require("../magic-utils/env");
|
|
9
|
-
//
|
|
10
|
-
// entry point for generation of single control HTML
|
|
11
|
-
//
|
|
12
|
-
function mgSingleControl(options) {
|
|
13
|
-
return (0, schematics_1.chain)([
|
|
14
|
-
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
15
|
-
initSingleControl(options),
|
|
16
|
-
(0, init_gen_components_rule_1.initAndGenComponentsForModule)(options, false),
|
|
17
|
-
(0, build_control_rule_1.buildControl)(options, "")
|
|
18
|
-
]);
|
|
19
|
-
}
|
|
20
|
-
exports.mgSingleControl = mgSingleControl;
|
|
21
|
-
//
|
|
22
|
-
// single control generation helper - turn on the no-log flag
|
|
23
|
-
//
|
|
24
|
-
function initSingleControl(options) {
|
|
25
|
-
return (host, context) => {
|
|
26
|
-
env_1.env.prevent_log = true;
|
|
27
|
-
return host;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mgSingleControl = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const init_magic_metadata_rule_1 = require("../magic-utils/rules/init-magic-metadata.rule");
|
|
6
|
+
const init_gen_components_rule_1 = require("../magic-utils/rules/init-gen-components.rule");
|
|
7
|
+
const build_control_rule_1 = require("../magic-utils/rules/build-control.rule");
|
|
8
|
+
const env_1 = require("../magic-utils/env");
|
|
9
|
+
//
|
|
10
|
+
// entry point for generation of single control HTML
|
|
11
|
+
//
|
|
12
|
+
function mgSingleControl(options) {
|
|
13
|
+
return (0, schematics_1.chain)([
|
|
14
|
+
(0, init_magic_metadata_rule_1.initMagicMetadata)(options),
|
|
15
|
+
initSingleControl(options),
|
|
16
|
+
(0, init_gen_components_rule_1.initAndGenComponentsForModule)(options, false),
|
|
17
|
+
(0, build_control_rule_1.buildControl)(options, "")
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
exports.mgSingleControl = mgSingleControl;
|
|
21
|
+
//
|
|
22
|
+
// single control generation helper - turn on the no-log flag
|
|
23
|
+
//
|
|
24
|
+
function initSingleControl(options) {
|
|
25
|
+
return (host, context) => {
|
|
26
|
+
env_1.env.prevent_log = true;
|
|
27
|
+
return host;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as ts from 'typescript';
|
|
3
|
-
import { Project } from './devkit-utils/config';
|
|
4
|
-
/** Reads file given path and returns TypeScript source file. */
|
|
5
|
-
export declare function getSourceFile(host: Tree, path: string): ts.SourceFile;
|
|
6
|
-
/** Import and add module to root app module. */
|
|
7
|
-
export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: Project): void;
|
|
8
|
-
/**
|
|
9
|
-
* Import and add module to specific module path.
|
|
10
|
-
* @param host the tree we are updating
|
|
11
|
-
* @param modulePath src location of the module to import
|
|
12
|
-
* @param moduleName name of module to import
|
|
13
|
-
* @param src src location to import
|
|
14
|
-
*/
|
|
15
|
-
export declare function addModuleImportToModule(host: Tree, modulePath: string, moduleName: string, src: string): void;
|
|
16
|
-
/** Gets the app index.html file */
|
|
17
|
-
export declare function getIndexHtmlPath(host: Tree, project: Project): string;
|
|
18
|
-
/** Get the root stylesheet file. */
|
|
19
|
-
export declare function getStylesPath(host: Tree, project: Project): string;
|
|
20
|
-
/** Wraps the internal find module from options with undefined path handling */
|
|
21
|
-
export declare function findModuleFromOptions(host: Tree, options: any): import("@angular-devkit/core").Path;
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import * as ts from 'typescript';
|
|
3
|
+
import { Project } from './devkit-utils/config';
|
|
4
|
+
/** Reads file given path and returns TypeScript source file. */
|
|
5
|
+
export declare function getSourceFile(host: Tree, path: string): ts.SourceFile;
|
|
6
|
+
/** Import and add module to root app module. */
|
|
7
|
+
export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: Project): void;
|
|
8
|
+
/**
|
|
9
|
+
* Import and add module to specific module path.
|
|
10
|
+
* @param host the tree we are updating
|
|
11
|
+
* @param modulePath src location of the module to import
|
|
12
|
+
* @param moduleName name of module to import
|
|
13
|
+
* @param src src location to import
|
|
14
|
+
*/
|
|
15
|
+
export declare function addModuleImportToModule(host: Tree, modulePath: string, moduleName: string, src: string): void;
|
|
16
|
+
/** Gets the app index.html file */
|
|
17
|
+
export declare function getIndexHtmlPath(host: Tree, project: Project): string;
|
|
18
|
+
/** Get the root stylesheet file. */
|
|
19
|
+
export declare function getStylesPath(host: Tree, project: Project): string;
|
|
20
|
+
/** Wraps the internal find module from options with undefined path handling */
|
|
21
|
+
export declare function findModuleFromOptions(host: Tree, options: any): import("@angular-devkit/core").Path;
|