@abp/ng.schematics 10.5.0-rc.4 → 10.6.0-rc.1
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/commands/ai-config/index.d.ts +3 -3
- package/commands/ai-config/index.js +88 -88
- package/commands/ai-config/index.js.map +1 -1
- package/commands/ai-config/model.d.ts +10 -10
- package/commands/ai-config/model.js +2 -2
- package/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template +6 -4
- package/commands/api/index.d.ts +2 -2
- package/commands/api/index.js +139 -138
- package/commands/api/index.js.map +1 -1
- package/commands/change-theme/index.d.ts +28 -28
- package/commands/change-theme/index.js +474 -473
- package/commands/change-theme/index.js.map +1 -1
- package/commands/change-theme/model.d.ts +5 -5
- package/commands/change-theme/model.js +2 -2
- package/commands/change-theme/style-map.d.ts +16 -16
- package/commands/change-theme/style-map.js +424 -424
- package/commands/change-theme/theme-options.enum.d.ts +6 -6
- package/commands/change-theme/theme-options.enum.js +11 -11
- package/commands/change-theme/theme-options.enum.js.map +1 -1
- package/commands/create-lib/index.d.ts +13 -13
- package/commands/create-lib/index.js +298 -298
- package/commands/create-lib/index.js.map +1 -1
- package/commands/create-lib/models/generate-lib-schema.d.ts +20 -20
- package/commands/create-lib/models/generate-lib-schema.js +8 -8
- package/commands/create-lib/models/generate-lib-schema.js.map +1 -1
- package/commands/create-lib/models/index.d.ts +1 -1
- package/commands/create-lib/models/index.js +4 -17
- package/commands/create-lib/models/index.js.map +1 -1
- package/commands/proxy-add/index.d.ts +2 -2
- package/commands/proxy-add/index.js +41 -41
- package/commands/proxy-add/index.js.map +1 -1
- package/commands/proxy-index/index.d.ts +5 -5
- package/commands/proxy-index/index.js +14 -14
- package/commands/proxy-index/index.js.map +1 -1
- package/commands/proxy-refresh/index.d.ts +3 -3
- package/commands/proxy-refresh/index.js +27 -27
- package/commands/proxy-refresh/index.js.map +1 -1
- package/commands/proxy-remove/index.d.ts +3 -3
- package/commands/proxy-remove/index.js +33 -33
- package/commands/proxy-remove/index.js.map +1 -1
- package/commands/ssr-add/index.d.ts +11 -11
- package/commands/ssr-add/index.js +360 -361
- package/commands/ssr-add/index.js.map +1 -1
- package/commands/ssr-add/server/index.d.ts +10 -10
- package/commands/ssr-add/server/index.js +209 -205
- package/commands/ssr-add/server/index.js.map +1 -1
- package/commands/ssr-add/server/index.ts +6 -2
- package/constants/api.d.ts +1 -1
- package/constants/api.js +4 -4
- package/constants/index.d.ts +4 -4
- package/constants/index.js +7 -20
- package/constants/index.js.map +1 -1
- package/constants/proxy.d.ts +4 -4
- package/constants/proxy.js +7 -7
- package/constants/symbols.d.ts +1 -1
- package/constants/symbols.js +4 -4
- package/constants/system-types.d.ts +1 -1
- package/constants/system-types.js +29 -29
- package/constants/volo.d.ts +5 -5
- package/constants/volo.js +34 -34
- package/enums/binding-source-id.d.ts +8 -7
- package/enums/binding-source-id.js +12 -11
- package/enums/binding-source-id.js.map +1 -1
- package/enums/exception.d.ts +17 -17
- package/enums/exception.js +2 -2
- package/enums/import-keyword.d.ts +4 -4
- package/enums/import-keyword.js +8 -8
- package/enums/import-keyword.js.map +1 -1
- package/enums/index.d.ts +5 -5
- package/enums/index.js +8 -21
- package/enums/index.js.map +1 -1
- package/enums/method-modifier.d.ts +6 -6
- package/enums/method-modifier.js +10 -10
- package/enums/method-modifier.js.map +1 -1
- package/enums/service-types.d.ts +6 -6
- package/enums/service-types.js +10 -10
- package/enums/service-types.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +6 -19
- package/index.js.map +1 -1
- package/models/api-definition.d.ts +97 -93
- package/models/api-definition.js +2 -2
- package/models/generate-proxy-schema.d.ts +28 -28
- package/models/generate-proxy-schema.js +2 -2
- package/models/import.d.ts +11 -11
- package/models/import.js +13 -13
- package/models/index.d.ts +11 -11
- package/models/index.js +14 -27
- package/models/index.js.map +1 -1
- package/models/method.d.ts +36 -34
- package/models/method.js +73 -70
- package/models/method.js.map +1 -1
- package/models/model.d.ts +48 -48
- package/models/model.js +76 -76
- package/models/model.js.map +1 -1
- package/models/project.d.ts +5 -5
- package/models/project.js +2 -2
- package/models/proxy-config.d.ts +4 -4
- package/models/proxy-config.js +2 -2
- package/models/rule.d.ts +2 -2
- package/models/rule.js +2 -2
- package/models/service.d.ts +21 -21
- package/models/service.js +11 -11
- package/models/tree.d.ts +1 -1
- package/models/tree.js +2 -2
- package/models/util.d.ts +7 -7
- package/models/util.js +2 -2
- package/package.json +6 -6
- package/utils/angular/add-declaration-to-ng-module.d.ts +20 -20
- package/utils/angular/add-declaration-to-ng-module.js +45 -45
- package/utils/angular/add-declaration-to-ng-module.js.map +1 -1
- package/utils/angular/ast-utils.d.ts +106 -106
- package/utils/angular/ast-utils.js +518 -518
- package/utils/angular/ast-utils.js.map +1 -1
- package/utils/angular/change.d.ts +68 -68
- package/utils/angular/change.js +121 -121
- package/utils/angular/change.js.map +1 -1
- package/utils/angular/dependencies.d.ts +23 -23
- package/utils/angular/dependencies.js +56 -56
- package/utils/angular/dependencies.js.map +1 -1
- package/utils/angular/dependency.d.ts +96 -96
- package/utils/angular/dependency.js +123 -122
- package/utils/angular/dependency.js.map +1 -1
- package/utils/angular/eol.d.ts +8 -8
- package/utils/angular/eol.js +22 -23
- package/utils/angular/eol.js.map +1 -1
- package/utils/angular/find-module.d.ts +33 -33
- package/utils/angular/find-module.js +105 -105
- package/utils/angular/find-module.js.map +1 -1
- package/utils/angular/generate-from-files.d.ts +19 -19
- package/utils/angular/generate-from-files.js +48 -49
- package/utils/angular/generate-from-files.js.map +1 -1
- package/utils/angular/index.d.ts +15 -15
- package/utils/angular/index.js +18 -31
- package/utils/angular/index.js.map +1 -1
- package/utils/angular/json-file.d.ts +24 -24
- package/utils/angular/json-file.js +71 -71
- package/utils/angular/json-file.js.map +1 -1
- package/utils/angular/latest-versions/index.d.ts +28 -28
- package/utils/angular/latest-versions/index.js +31 -31
- package/utils/angular/ng-ast-utils.d.ts +12 -12
- package/utils/angular/ng-ast-utils.js +79 -79
- package/utils/angular/ng-ast-utils.js.map +1 -1
- package/utils/angular/parse-name.d.ts +13 -13
- package/utils/angular/parse-name.js +19 -20
- package/utils/angular/parse-name.js.map +1 -1
- package/utils/angular/paths.d.ts +8 -8
- package/utils/angular/paths.js +17 -18
- package/utils/angular/paths.js.map +1 -1
- package/utils/angular/project-targets.d.ts +11 -11
- package/utils/angular/project-targets.js +21 -22
- package/utils/angular/project-targets.js.map +1 -1
- package/utils/angular/standalone/app_component.d.ts +29 -29
- package/utils/angular/standalone/app_component.js +107 -107
- package/utils/angular/standalone/app_component.js.map +1 -1
- package/utils/angular/standalone/app_config.d.ts +23 -23
- package/utils/angular/standalone/app_config.js +89 -89
- package/utils/angular/standalone/app_config.js.map +1 -1
- package/utils/angular/standalone/code_block.d.ts +53 -53
- package/utils/angular/standalone/code_block.js +80 -79
- package/utils/angular/standalone/code_block.js.map +1 -1
- package/utils/angular/standalone/index.d.ts +9 -9
- package/utils/angular/standalone/index.js +13 -13
- package/utils/angular/standalone/rules.d.ts +45 -45
- package/utils/angular/standalone/rules.js +187 -188
- package/utils/angular/standalone/rules.js.map +1 -1
- package/utils/angular/standalone/util.d.ts +35 -35
- package/utils/angular/standalone/util.js +135 -135
- package/utils/angular/standalone/util.js.map +1 -1
- package/utils/angular/test/create-app-module.d.ts +9 -9
- package/utils/angular/test/create-app-module.js +14 -15
- package/utils/angular/test/create-app-module.js.map +1 -1
- package/utils/angular/test/get-file-content.d.ts +9 -9
- package/utils/angular/test/get-file-content.js +17 -18
- package/utils/angular/test/get-file-content.js.map +1 -1
- package/utils/angular/test/index.d.ts +9 -9
- package/utils/angular/test/index.js +12 -25
- package/utils/angular/test/index.js.map +1 -1
- package/utils/angular/validation.d.ts +10 -10
- package/utils/angular/validation.js +28 -28
- package/utils/angular/validation.js.map +1 -1
- package/utils/angular/workspace-models.d.ts +167 -167
- package/utils/angular/workspace-models.js +43 -43
- package/utils/angular/workspace-models.js.map +1 -1
- package/utils/angular/workspace.d.ts +65 -65
- package/utils/angular/workspace.js +135 -135
- package/utils/angular/workspace.js.map +1 -1
- package/utils/angular-schematic/generate-lib.d.ts +3 -3
- package/utils/angular-schematic/generate-lib.js +52 -53
- package/utils/angular-schematic/generate-lib.js.map +1 -1
- package/utils/angular-schematic/index.d.ts +1 -1
- package/utils/angular-schematic/index.js +4 -17
- package/utils/angular-schematic/index.js.map +1 -1
- package/utils/api.d.ts +2 -2
- package/utils/api.js +7 -8
- package/utils/api.js.map +1 -1
- package/utils/ast.d.ts +5 -5
- package/utils/ast.js +28 -28
- package/utils/ast.js.map +1 -1
- package/utils/barrel.d.ts +4 -4
- package/utils/barrel.js +86 -87
- package/utils/barrel.js.map +1 -1
- package/utils/common.d.ts +11 -11
- package/utils/common.js +78 -78
- package/utils/common.js.map +1 -1
- package/utils/enum.d.ts +18 -18
- package/utils/enum.js +39 -40
- package/utils/enum.js.map +1 -1
- package/utils/file.d.ts +2 -2
- package/utils/file.js +8 -9
- package/utils/file.js.map +1 -1
- package/utils/generics.d.ts +26 -26
- package/utils/generics.js +89 -89
- package/utils/generics.js.map +1 -1
- package/utils/import.d.ts +3 -3
- package/utils/import.js +10 -11
- package/utils/import.js.map +1 -1
- package/utils/index.d.ts +22 -22
- package/utils/index.js +25 -38
- package/utils/index.js.map +1 -1
- package/utils/methods.d.ts +4 -4
- package/utils/methods.js +31 -29
- package/utils/methods.js.map +1 -1
- package/utils/model.d.ts +14 -14
- package/utils/model.js +217 -211
- package/utils/model.js.map +1 -1
- package/utils/namespace.d.ts +1 -1
- package/utils/namespace.js +17 -18
- package/utils/namespace.js.map +1 -1
- package/utils/ng-module.d.ts +46 -46
- package/utils/ng-module.js +126 -125
- package/utils/ng-module.js.map +1 -1
- package/utils/path.d.ts +2 -2
- package/utils/path.js +35 -36
- package/utils/path.js.map +1 -1
- package/utils/rule.d.ts +4 -4
- package/utils/rule.js +32 -33
- package/utils/rule.js.map +1 -1
- package/utils/service.d.ts +8 -8
- package/utils/service.js +280 -171
- package/utils/service.js.map +1 -1
- package/utils/source.d.ts +13 -13
- package/utils/source.js +165 -165
- package/utils/source.js.map +1 -1
- package/utils/standalone.d.ts +59 -59
- package/utils/standalone.js +146 -145
- package/utils/standalone.js.map +1 -1
- package/utils/text.d.ts +10 -10
- package/utils/text.js +59 -59
- package/utils/text.js.map +1 -1
- package/utils/tree.d.ts +14 -14
- package/utils/tree.js +83 -83
- package/utils/tree.js.map +1 -1
- package/utils/type.d.ts +13 -13
- package/utils/type.js +112 -113
- package/utils/type.js.map +1 -1
- package/utils/workspace.d.ts +20 -20
- package/utils/workspace.js +113 -114
- package/utils/workspace.js.map +1 -1
package/utils/ng-module.js
CHANGED
|
@@ -1,126 +1,127 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
24
|
-
* @
|
|
25
|
-
* @
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* file
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
70
|
-
return null;
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (!
|
|
77
|
-
continue;
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
continue;
|
|
81
|
-
|
|
82
|
-
if (!
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasImportInNgModule = void 0;
|
|
4
|
+
exports.findAppRoutesModulePath = findAppRoutesModulePath;
|
|
5
|
+
exports.cleanEmptyExprFromModule = cleanEmptyExprFromModule;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
8
|
+
const util_1 = require("./angular/standalone/util");
|
|
9
|
+
const ts = tslib_1.__importStar(require("typescript"));
|
|
10
|
+
const angular_1 = require("./angular");
|
|
11
|
+
const index_1 = require("../commands/change-theme/index");
|
|
12
|
+
const core_1 = require("@angular-devkit/core");
|
|
13
|
+
const path = tslib_1.__importStar(require("path"));
|
|
14
|
+
const ast_1 = require("./ast");
|
|
15
|
+
/**
|
|
16
|
+
* Checks whether a specific import or provider exists in the specified metadata
|
|
17
|
+
* array (`imports`, `providers`, etc.) of the `NgModule` decorator in the AppModule.
|
|
18
|
+
*
|
|
19
|
+
* This function locates the AppModule file of the given Angular project,
|
|
20
|
+
* parses its AST, and inspects the specified metadata array to determine
|
|
21
|
+
* if it includes an element matching the provided string (e.g., `CommonModule`, `HttpClientModule`).
|
|
22
|
+
*
|
|
23
|
+
* @param host - The virtual file system tree used by Angular schematics.
|
|
24
|
+
* @param projectName - The name of the Angular project.
|
|
25
|
+
* @param metadataFn - The name (string) to match against the elements of the metadata array.
|
|
26
|
+
* @param metadataName - The metadata field to search in (e.g., 'imports', 'providers'). Defaults to 'imports'.
|
|
27
|
+
* @returns A promise that resolves to `true` if the metadata function is found, or `false` otherwise.
|
|
28
|
+
* @throws SchematicsException if the AppModule file or expected metadata is not found or malformed.
|
|
29
|
+
*/
|
|
30
|
+
const hasImportInNgModule = async (host, projectName, metadataFn, metadataName = 'imports') => {
|
|
31
|
+
const mainFilePath = await (0, util_1.getMainFilePath)(host, projectName);
|
|
32
|
+
const appModulePath = (0, angular_1.getAppModulePath)(host, mainFilePath);
|
|
33
|
+
const buffer = host.read(appModulePath);
|
|
34
|
+
if (!buffer) {
|
|
35
|
+
throw new schematics_1.SchematicsException(`Could not read file: ${appModulePath}`);
|
|
36
|
+
}
|
|
37
|
+
const source = (0, index_1.createSourceFile)(host, appModulePath);
|
|
38
|
+
// Get the NgModule decorator metadata
|
|
39
|
+
const ngModuleDecorator = (0, angular_1.getDecoratorMetadata)(source, 'NgModule', '@angular/core')[0];
|
|
40
|
+
if (!ngModuleDecorator) {
|
|
41
|
+
throw new schematics_1.SchematicsException('The app module does not found');
|
|
42
|
+
}
|
|
43
|
+
const matchingProperties = (0, angular_1.getMetadataField)(ngModuleDecorator, metadataName);
|
|
44
|
+
const assignment = matchingProperties[0];
|
|
45
|
+
const assignmentInit = assignment.initializer;
|
|
46
|
+
const elements = assignmentInit.elements;
|
|
47
|
+
if (!elements || elements.length < 1) {
|
|
48
|
+
throw new schematics_1.SchematicsException(`Elements could not found: ${elements}`);
|
|
49
|
+
}
|
|
50
|
+
return elements.some(f => f.getText().match(metadataFn));
|
|
51
|
+
};
|
|
52
|
+
exports.hasImportInNgModule = hasImportInNgModule;
|
|
53
|
+
/**
|
|
54
|
+
* Attempts to locate the path of the `AppRoutingModule` file that is imported
|
|
55
|
+
* within the root AppModule file of an Angular application.
|
|
56
|
+
*
|
|
57
|
+
* This function reads the AppModule file (resolved from the main file path),
|
|
58
|
+
* parses its AST, and searches for an import declaration that imports
|
|
59
|
+
* `AppRoutingModule`. Once found, it resolves the import path to a normalized
|
|
60
|
+
* file path relative to the workspace root.
|
|
61
|
+
*
|
|
62
|
+
* @param tree - The virtual file system tree used by Angular schematics.
|
|
63
|
+
* @param mainFilePath - The path to the main entry file of the Angular application (typically `main.ts`).
|
|
64
|
+
* @returns A normalized workspace-relative path to the AppRoutingModule file if found, or `null` otherwise.
|
|
65
|
+
* @throws If the route file path is resolved but the file does not exist in the tree.
|
|
66
|
+
*/
|
|
67
|
+
async function findAppRoutesModulePath(tree, mainFilePath) {
|
|
68
|
+
const appModulePath = (0, angular_1.getAppModulePath)(tree, mainFilePath);
|
|
69
|
+
if (!appModulePath || !tree.exists(appModulePath))
|
|
70
|
+
return null;
|
|
71
|
+
const buffer = tree.read(appModulePath);
|
|
72
|
+
if (!buffer)
|
|
73
|
+
return null;
|
|
74
|
+
const source = ts.createSourceFile(appModulePath, buffer.toString('utf-8'), ts.ScriptTarget.Latest, true);
|
|
75
|
+
for (const stmt of source.statements) {
|
|
76
|
+
if (!ts.isImportDeclaration(stmt))
|
|
77
|
+
continue;
|
|
78
|
+
const importClause = stmt.importClause;
|
|
79
|
+
if (!importClause?.namedBindings || !ts.isNamedImports(importClause.namedBindings))
|
|
80
|
+
continue;
|
|
81
|
+
const isRoutesImport = importClause.namedBindings.elements.some(el => el.name.getText() === 'AppRoutingModule');
|
|
82
|
+
if (!isRoutesImport || !ts.isStringLiteral(stmt.moduleSpecifier))
|
|
83
|
+
continue;
|
|
84
|
+
let importPath = stmt.moduleSpecifier.text;
|
|
85
|
+
if (!importPath.endsWith('.ts')) {
|
|
86
|
+
importPath += '.ts';
|
|
87
|
+
}
|
|
88
|
+
const configDir = path.dirname(appModulePath);
|
|
89
|
+
const resolvedFsPath = path.resolve(configDir, importPath);
|
|
90
|
+
const workspaceRelativePath = path.relative(process.cwd(), resolvedFsPath).replace(/\\/g, '/');
|
|
91
|
+
const normalizedPath = (0, core_1.normalize)(workspaceRelativePath);
|
|
92
|
+
if (!tree.exists(normalizedPath)) {
|
|
93
|
+
throw new Error(`Cannot find routes file: ${normalizedPath}`);
|
|
94
|
+
}
|
|
95
|
+
return normalizedPath;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Cleans up empty or invalid expressions (e.g., extra commas) from the `imports` and `providers`
|
|
101
|
+
* arrays in the NgModule decorator of an Angular module file.
|
|
102
|
+
*
|
|
103
|
+
* This function parses the source file's AST, locates the `NgModule` decorator, and processes
|
|
104
|
+
* the `imports` and `providers` metadata fields. If these fields contain array literals with
|
|
105
|
+
* empty slots (such as trailing or double commas), they are removed and the array is rewritten.
|
|
106
|
+
*
|
|
107
|
+
* @param source - The TypeScript source file containing the Angular module.
|
|
108
|
+
* @param recorder - The recorder used to apply changes to the source file.
|
|
109
|
+
*/
|
|
110
|
+
function cleanEmptyExprFromModule(source, recorder) {
|
|
111
|
+
const ngModuleNode = (0, angular_1.getDecoratorMetadata)(source, 'NgModule', '@angular/core')[0];
|
|
112
|
+
if (!ngModuleNode)
|
|
113
|
+
return;
|
|
114
|
+
const printer = ts.createPrinter();
|
|
115
|
+
const metadataKeys = ['imports', 'providers'];
|
|
116
|
+
for (const key of metadataKeys) {
|
|
117
|
+
const metadataField = (0, angular_1.getMetadataField)(ngModuleNode, key);
|
|
118
|
+
if (!metadataField.length)
|
|
119
|
+
continue;
|
|
120
|
+
const assignment = metadataField[0];
|
|
121
|
+
const arrayLiteral = assignment.initializer;
|
|
122
|
+
const cleanedArray = (0, ast_1.removeEmptyElementsFromArrayLiteral)(arrayLiteral);
|
|
123
|
+
recorder.remove(arrayLiteral.getStart(), arrayLiteral.getWidth());
|
|
124
|
+
recorder.insertLeft(arrayLiteral.getStart(), printer.printNode(ts.EmitHint.Expression, cleanedArray, source));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
126
127
|
//# sourceMappingURL=ng-module.js.map
|
package/utils/ng-module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-module.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/ng-module.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ng-module.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/ng-module.ts"],"names":[],"mappings":";;;AA4EA,0DAgDC;AAaD,4DAqBC;;AA9JD,2DAAuF;AACvF,oDAA4D;AAC5D,uDAAiC;AACjC,uCAAqF;AACrF,0DAAkE;AAClE,+CAAuD;AACvD,mDAA6B;AAC7B,+BAA4D;AAE5D;;;;;;;;;;;;;;GAcG;AACI,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAAU,EACV,WAAmB,EACnB,UAAkB,EAClB,YAAY,GAAG,SAAS,EACN,EAAE;IACpB,MAAM,YAAY,GAAG,MAAM,IAAA,sBAAe,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC9D,MAAM,aAAa,GAAG,IAAA,0BAAgB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CA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,CAAC,CAChE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/utils/path.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function relativePathToEnum(namespace: string, enumNamespace: string, enumName: string): string;
|
|
2
|
-
export declare function relativePathToModel(namespace: string, modelNamespace: string): string;
|
|
1
|
+
export declare function relativePathToEnum(namespace: string, enumNamespace: string, enumName: string): string;
|
|
2
|
+
export declare function relativePathToModel(namespace: string, modelNamespace: string): string;
|
package/utils/path.js
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function relativePathToModel(namespace, modelNamespace) {
|
|
12
|
-
const path = calculateRelativePath(namespace, modelNamespace);
|
|
13
|
-
return path + '/models';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.relativePathToEnum = relativePathToEnum;
|
|
4
|
+
exports.relativePathToModel = relativePathToModel;
|
|
5
|
+
const core_1 = require("@angular-devkit/core");
|
|
6
|
+
const text_1 = require("./text");
|
|
7
|
+
function relativePathToEnum(namespace, enumNamespace, enumName) {
|
|
8
|
+
const path = calculateRelativePath(namespace, enumNamespace);
|
|
9
|
+
return path + `/${(0, text_1.kebab)(enumName)}.enum`;
|
|
10
|
+
}
|
|
11
|
+
function relativePathToModel(namespace, modelNamespace) {
|
|
12
|
+
const path = calculateRelativePath(namespace, modelNamespace);
|
|
13
|
+
return path + '/models';
|
|
14
|
+
}
|
|
15
|
+
function calculateRelativePath(ns1, ns2) {
|
|
16
|
+
if (ns1 === ns2)
|
|
17
|
+
return '.';
|
|
18
|
+
const parts1 = ns1 ? ns1.split('.') : [];
|
|
19
|
+
const parts2 = ns2 ? ns2.split('.') : [];
|
|
20
|
+
while (parts1.length && parts2.length) {
|
|
21
|
+
if (parts1[0] !== parts2[0])
|
|
22
|
+
break;
|
|
23
|
+
parts1.shift();
|
|
24
|
+
parts2.shift();
|
|
25
|
+
}
|
|
26
|
+
const up = '../'.repeat(parts1.length) || '.';
|
|
27
|
+
const down = parts2.reduce((acc, p) => acc + '/' + core_1.strings.dasherize(p), '');
|
|
28
|
+
return removeTrailingSlash(removeDoubleSlash(up + down));
|
|
29
|
+
}
|
|
30
|
+
function removeDoubleSlash(path) {
|
|
31
|
+
return path.replace(/\/{2,}/g, '/');
|
|
32
|
+
}
|
|
33
|
+
function removeTrailingSlash(path) {
|
|
34
|
+
return path.replace(/\/+$/, '');
|
|
35
|
+
}
|
|
37
36
|
//# sourceMappingURL=path.js.map
|
package/utils/path.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/path.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/path.ts"],"names":[],"mappings":";;AAGA,gDAGC;AAED,kDAGC;AAXD,+CAA+C;AAC/C,iCAA+B;AAE/B,SAAgB,kBAAkB,CAAC,SAAiB,EAAE,aAAqB,EAAE,QAAgB;IAC3F,MAAM,IAAI,GAAG,qBAAqB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAC7D,OAAO,IAAI,GAAG,IAAI,IAAA,YAAK,EAAC,QAAQ,CA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AAmB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
package/utils/rule.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rule, SchematicContext, Source, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
export declare function applyWithOverwrite(source: Source, rules: Rule[]): Rule;
|
|
3
|
-
export declare function mergeAndAllowDelete(host: Tree, rule: Rule): (tree: Tree, context: SchematicContext) => Promise<void>;
|
|
4
|
-
export declare function overwriteFileIfExists(tree: Tree): Rule;
|
|
1
|
+
import { Rule, SchematicContext, Source, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
export declare function applyWithOverwrite(source: Source, rules: Rule[]): Rule;
|
|
3
|
+
export declare function mergeAndAllowDelete(host: Tree, rule: Rule): (tree: Tree, context: SchematicContext) => Promise<void>;
|
|
4
|
+
export declare function overwriteFileIfExists(tree: Tree): Rule;
|
package/utils/rule.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function overwriteFileIfExists(tree) {
|
|
26
|
-
return (0, schematics_1.forEach)(fileEntry => {
|
|
27
|
-
if (!tree.exists(fileEntry.path))
|
|
28
|
-
return fileEntry;
|
|
29
|
-
tree.overwrite(fileEntry.path, fileEntry.content);
|
|
30
|
-
return null;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.overwriteFileIfExists = overwriteFileIfExists;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyWithOverwrite = applyWithOverwrite;
|
|
4
|
+
exports.mergeAndAllowDelete = mergeAndAllowDelete;
|
|
5
|
+
exports.overwriteFileIfExists = overwriteFileIfExists;
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
function applyWithOverwrite(source, rules) {
|
|
8
|
+
return (tree, _context) => {
|
|
9
|
+
const mapped = rules.map(r => {
|
|
10
|
+
return ((_tree, _ctx) => new Promise(res => res(r(_tree, _ctx))));
|
|
11
|
+
});
|
|
12
|
+
const rule = (0, schematics_1.mergeWith)((0, schematics_1.apply)(source, [...mapped, overwriteFileIfExists(tree)]));
|
|
13
|
+
return rule(tree, _context);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function mergeAndAllowDelete(host, rule) {
|
|
17
|
+
return async (tree, context) => {
|
|
18
|
+
const nextTree = await (0, schematics_1.callRule)(rule, tree, context).toPromise();
|
|
19
|
+
if (!nextTree) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
host.merge(nextTree, schematics_1.MergeStrategy.AllowDeleteConflict);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function overwriteFileIfExists(tree) {
|
|
26
|
+
return (0, schematics_1.forEach)(fileEntry => {
|
|
27
|
+
if (!tree.exists(fileEntry.path))
|
|
28
|
+
return fileEntry;
|
|
29
|
+
tree.overwrite(fileEntry.path, fileEntry.content);
|
|
30
|
+
return null;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
34
33
|
//# sourceMappingURL=rule.js.map
|
package/utils/rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/rule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I,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/utils/service.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Action, Body, Controller, Method, Property, Service, ServiceGeneratorParams, Signature } from '../models';
|
|
2
|
-
export declare function serializeParameters(parameters: Property[]): string;
|
|
3
|
-
export declare function createControllerToServiceMapper({ solution, types, apiName, }: ServiceGeneratorParams): (controller: Controller) => Service;
|
|
4
|
-
export declare function createActionToMethodMapper(): (action: Action) => Method;
|
|
5
|
-
export declare function createActionToBodyMapper(): ({ httpMethod, parameters, returnValue, url }: Action) => Body;
|
|
6
|
-
export declare function createActionToSignatureMapper(): (action: Action) => Signature;
|
|
7
|
-
export declare function isRemoteStreamContent(type: string): boolean;
|
|
8
|
-
export declare function isRemoteStreamContentArray(type: string): boolean;
|
|
1
|
+
import { Action, Body, Controller, Method, Property, Service, ServiceGeneratorParams, Signature } from '../models';
|
|
2
|
+
export declare function serializeParameters(parameters: Property[]): string;
|
|
3
|
+
export declare function createControllerToServiceMapper({ solution, types, apiName, }: ServiceGeneratorParams): (controller: Controller) => Service;
|
|
4
|
+
export declare function createActionToMethodMapper(): (action: Action) => Method;
|
|
5
|
+
export declare function createActionToBodyMapper(): ({ httpMethod, parameters, returnValue, url }: Action) => Body;
|
|
6
|
+
export declare function createActionToSignatureMapper(): (action: Action) => Signature;
|
|
7
|
+
export declare function isRemoteStreamContent(type: string): boolean;
|
|
8
|
+
export declare function isRemoteStreamContentArray(type: string): boolean;
|