@abp/ng.schematics 10.5.0 → 10.6.0-rc.2
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 -31
- 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/source.js
CHANGED
|
@@ -1,166 +1,166 @@
|
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
body =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
assignment
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createApiDefinitionGetter = createApiDefinitionGetter;
|
|
4
|
+
exports.createRootNamespaceGetter = createRootNamespaceGetter;
|
|
5
|
+
exports.getSourceUrl = getSourceUrl;
|
|
6
|
+
exports.createProxyConfigReader = createProxyConfigReader;
|
|
7
|
+
exports.createProxyClearer = createProxyClearer;
|
|
8
|
+
exports.createProxyWarningSaver = createProxyWarningSaver;
|
|
9
|
+
exports.createProxyConfigSaver = createProxyConfigSaver;
|
|
10
|
+
exports.createProxyConfigWriterCreator = createProxyConfigWriterCreator;
|
|
11
|
+
exports.createFileWriterCreator = createFileWriterCreator;
|
|
12
|
+
exports.createProxyConfigJsonCreator = createProxyConfigJsonCreator;
|
|
13
|
+
exports.generateProxyConfigJson = generateProxyConfigJson;
|
|
14
|
+
const tslib_1 = require("tslib");
|
|
15
|
+
/* eslint-disable no-empty */
|
|
16
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
17
|
+
const got_1 = tslib_1.__importDefault(require("got"));
|
|
18
|
+
const constants_1 = require("../constants");
|
|
19
|
+
const ast_1 = require("./ast");
|
|
20
|
+
const common_1 = require("./common");
|
|
21
|
+
const workspace_1 = require("./workspace");
|
|
22
|
+
function createApiDefinitionGetter(params) {
|
|
23
|
+
const apiName = params.apiName || 'default';
|
|
24
|
+
let sourceUrl = params.url;
|
|
25
|
+
return async (host) => {
|
|
26
|
+
const source = await (0, workspace_1.resolveProject)(host, params.source);
|
|
27
|
+
if (!sourceUrl) {
|
|
28
|
+
sourceUrl = getSourceUrl(host, source, apiName);
|
|
29
|
+
}
|
|
30
|
+
return await getApiDefinition(sourceUrl);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async function getApiDefinition(sourceUrl) {
|
|
34
|
+
const url = sourceUrl + constants_1.API_DEFINITION_ENDPOINT;
|
|
35
|
+
let body;
|
|
36
|
+
try {
|
|
37
|
+
({ body } = await (0, got_1.default)(url, {
|
|
38
|
+
responseType: 'json',
|
|
39
|
+
searchParams: { includeTypes: true },
|
|
40
|
+
https: { rejectUnauthorized: false },
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
catch ({ response }) {
|
|
44
|
+
// handle redirects
|
|
45
|
+
if (!response?.body || response.statusCode >= 400)
|
|
46
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[API Not Available] Request to {0} is unsuccessful. Please double-check the URL in the source project environment and make sure your application is up and running." /* Exception.NoApi */, url));
|
|
47
|
+
body = response.body;
|
|
48
|
+
}
|
|
49
|
+
return body;
|
|
50
|
+
}
|
|
51
|
+
function createRootNamespaceGetter(params) {
|
|
52
|
+
const apiName = params.apiName || 'default';
|
|
53
|
+
return async (tree) => {
|
|
54
|
+
const project = await (0, workspace_1.resolveProject)(tree, params.source);
|
|
55
|
+
const environmentExpr = (0, workspace_1.readEnvironment)(tree, project.definition);
|
|
56
|
+
if (!environmentExpr)
|
|
57
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[Environment Not Found] An environment file cannot be located in \"{0}\" project." /* Exception.NoEnvironment */, project.name));
|
|
58
|
+
let assignment = (0, ast_1.getAssignedPropertyFromObjectliteral)(environmentExpr, [
|
|
59
|
+
'apis',
|
|
60
|
+
apiName,
|
|
61
|
+
'rootNamespace',
|
|
62
|
+
]);
|
|
63
|
+
if (!assignment)
|
|
64
|
+
assignment = (0, ast_1.getAssignedPropertyFromObjectliteral)(environmentExpr, [
|
|
65
|
+
'apis',
|
|
66
|
+
'default',
|
|
67
|
+
'rootNamespace',
|
|
68
|
+
]);
|
|
69
|
+
if (!assignment)
|
|
70
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[Root Namespace Not Found] Cannot resolve root namespace for \"{1}\" api from \"{0}\" project." /* Exception.NoRootNamespace */, project.name, apiName));
|
|
71
|
+
return assignment.replace(/[`'"]/g, '');
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function getSourceUrl(tree, project, apiName) {
|
|
75
|
+
const environmentExpr = (0, workspace_1.readEnvironment)(tree, project.definition);
|
|
76
|
+
if (!environmentExpr)
|
|
77
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[Environment Not Found] An environment file cannot be located in \"{0}\" project." /* Exception.NoEnvironment */, project.name));
|
|
78
|
+
let assignment = (0, ast_1.getAssignedPropertyFromObjectliteral)(environmentExpr, ['apis', apiName, 'url']);
|
|
79
|
+
if (!assignment)
|
|
80
|
+
assignment = (0, ast_1.getAssignedPropertyFromObjectliteral)(environmentExpr, ['apis', 'default', 'url']);
|
|
81
|
+
if (!assignment)
|
|
82
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[API URL Not Found] Cannot resolve API URL for \"{1}\" remote service name from \"{0}\" project." /* Exception.NoApiUrl */, project.name, apiName));
|
|
83
|
+
return assignment.replace(/[`'"]/g, '');
|
|
84
|
+
}
|
|
85
|
+
function createProxyConfigReader(targetPath) {
|
|
86
|
+
targetPath += constants_1.PROXY_CONFIG_PATH;
|
|
87
|
+
return (tree) => {
|
|
88
|
+
try {
|
|
89
|
+
const buffer = tree.read(targetPath);
|
|
90
|
+
return JSON.parse(buffer.toString());
|
|
91
|
+
}
|
|
92
|
+
catch (_) { }
|
|
93
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[Proxy Config Not Found] There is no JSON file at \"{0}\"." /* Exception.NoProxyConfig */, targetPath));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function createProxyClearer(targetPath) {
|
|
97
|
+
targetPath += constants_1.PROXY_PATH;
|
|
98
|
+
const proxyIndexPath = `${targetPath}/index.ts`;
|
|
99
|
+
return (tree) => {
|
|
100
|
+
try {
|
|
101
|
+
tree.getDir(targetPath).subdirs.forEach(dirName => {
|
|
102
|
+
const dirPath = `${targetPath}/${dirName}`;
|
|
103
|
+
tree.getDir(dirPath).visit(filePath => tree.delete(filePath));
|
|
104
|
+
tree.delete(dirPath);
|
|
105
|
+
});
|
|
106
|
+
if (tree.exists(proxyIndexPath))
|
|
107
|
+
tree.delete(proxyIndexPath);
|
|
108
|
+
return tree;
|
|
109
|
+
}
|
|
110
|
+
catch (_) {
|
|
111
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[Directory Remove Failed] Cannot remove \"{0}\"." /* Exception.DirRemoveFailed */, targetPath));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function createProxyWarningSaver(targetPath) {
|
|
116
|
+
targetPath += constants_1.PROXY_WARNING_PATH;
|
|
117
|
+
const createFileWriter = createFileWriterCreator(targetPath);
|
|
118
|
+
return (tree) => {
|
|
119
|
+
const op = tree.exists(targetPath) ? 'overwrite' : 'create';
|
|
120
|
+
const writeWarningMD = createFileWriter(op, constants_1.PROXY_WARNING);
|
|
121
|
+
writeWarningMD(tree);
|
|
122
|
+
return tree;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function createProxyConfigSaver(apiDefinition, targetPath) {
|
|
126
|
+
const createProxyConfigJson = createProxyConfigJsonCreator(apiDefinition);
|
|
127
|
+
const readPreviousConfig = createProxyConfigReader(targetPath);
|
|
128
|
+
const createProxyConfigWriter = createProxyConfigWriterCreator(targetPath);
|
|
129
|
+
targetPath += constants_1.PROXY_CONFIG_PATH;
|
|
130
|
+
return (tree) => {
|
|
131
|
+
const generated = [];
|
|
132
|
+
let op = 'create';
|
|
133
|
+
if (tree.exists(targetPath)) {
|
|
134
|
+
op = 'overwrite';
|
|
135
|
+
try {
|
|
136
|
+
readPreviousConfig(tree).generated.forEach(m => generated.push(m));
|
|
137
|
+
}
|
|
138
|
+
catch (_) { }
|
|
139
|
+
}
|
|
140
|
+
const json = createProxyConfigJson(generated);
|
|
141
|
+
const writeProxyConfig = createProxyConfigWriter(op, json);
|
|
142
|
+
writeProxyConfig(tree);
|
|
143
|
+
return tree;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function createProxyConfigWriterCreator(targetPath) {
|
|
147
|
+
targetPath += constants_1.PROXY_CONFIG_PATH;
|
|
148
|
+
return createFileWriterCreator(targetPath);
|
|
149
|
+
}
|
|
150
|
+
function createFileWriterCreator(targetPath) {
|
|
151
|
+
return (op, data) => (tree) => {
|
|
152
|
+
try {
|
|
153
|
+
tree[op](targetPath, data);
|
|
154
|
+
return tree;
|
|
155
|
+
}
|
|
156
|
+
catch (_) { }
|
|
157
|
+
throw new schematics_1.SchematicsException((0, common_1.interpolate)("[File Write Failed] Cannot write file at \"{0}\"." /* Exception.FileWriteFailed */, targetPath));
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function createProxyConfigJsonCreator(apiDefinition) {
|
|
161
|
+
return (generated) => generateProxyConfigJson({ generated, ...apiDefinition });
|
|
162
|
+
}
|
|
163
|
+
function generateProxyConfigJson(proxyConfig) {
|
|
164
|
+
return JSON.stringify(proxyConfig, null, 2);
|
|
165
|
+
}
|
|
166
166
|
//# sourceMappingURL=source.js.map
|
package/utils/source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/source.ts"],"names":[],"mappings":";;AAgBA,8DAWC;AAuBD,8DA4BC;AAED,oCAeC;AAED,0DAWC;AAED,gDAmBC;AAED,0DAWC;AAED,wDAwBC;AAED,wEAIC;AAED,0DASC;AAED,oEAEC;AAED,0DAEC;;AAjMD,6BAA6B;AAC7B,2DAAuE;AACvE,sDAAsB;AACtB,4CAMsB;AAGtB,+BAA6D;AAC7D,qCAAuC;AACvC,2CAA8D;AAE9D,SAAgB,yBAAyB,CAAC,MAA2B;IACnE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,SAAS,CAAC;IAC5C,IAAI,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC;IAE3B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CAAA,CAAC;QAChB,CAAC;QAED,MAAM,IAAI,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC3D,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAEvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,8BAA8B,CAAC,UAAkB;IAC/D,UAAU,IAAI,6BAAiB,CAAC;IAEhC,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,uBAAuB,CAAC,UAAkB;IACxD,OAAO,CAAC,EAAW,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,IAAU,EAAE,EAAE;QACnD,IAAI,CAAC;YACH,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QAEd,MAAM,IAAI,gCAAmB,CAAC,IAAA,oBAAW,uFAA4B,UAAU,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAAC,aAA4B;IACvE,OAAO,CAAC,SAAmB,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC;AAC3F,CAAC;AAED,SAAgB,uBAAuB,CAAC,WAAwB;IAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
package/utils/standalone.d.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Tree, UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
|
-
import * as ts from 'typescript';
|
|
3
|
-
import { Path } from '@angular-devkit/core';
|
|
4
|
-
/**
|
|
5
|
-
* Retrieves the file path of the application's configuration used in a standalone
|
|
6
|
-
* Angular application setup.
|
|
7
|
-
*
|
|
8
|
-
* This function locates the `bootstrapApplication` call in the main entry file and
|
|
9
|
-
* resolves the path to the configuration object passed to it (typically `appConfig`).
|
|
10
|
-
*
|
|
11
|
-
* @param host - The virtual file system tree used by Angular schematics.
|
|
12
|
-
* @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
|
|
13
|
-
* @returns The resolved file path of the application's configuration, or an empty string if not found.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getAppConfigPath: (host: Tree, mainFilePath: string) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Attempts to locate the file path of the `routes` array used in a standalone
|
|
18
|
-
* Angular application configuration.
|
|
19
|
-
*
|
|
20
|
-
* This function resolves the application's config file (typically where `routes` is defined or imported),
|
|
21
|
-
* parses the file, and inspects its import declarations to find the import associated with `routes`.
|
|
22
|
-
* It then resolves and normalizes the file path of the `routes` definition and returns it.
|
|
23
|
-
*
|
|
24
|
-
* @param tree - The virtual file system tree used by Angular schematics.
|
|
25
|
-
* @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
|
|
26
|
-
* @returns The normalized workspace-relative path to the file where `routes` is defined, or `null` if not found.
|
|
27
|
-
* @throws If the `routes` import path is found but the file does not exist in the tree.
|
|
28
|
-
*/
|
|
29
|
-
export declare function findAppRoutesPath(tree: Tree, mainFilePath: string): Path | null;
|
|
30
|
-
/**
|
|
31
|
-
* Checks whether a specific provider is registered in the `providers` array of the
|
|
32
|
-
* standalone application configuration (typically within `app.config.ts`) in an Angular project.
|
|
33
|
-
*
|
|
34
|
-
* This function reads and parses the application configuration file, looks for the
|
|
35
|
-
* `providers` property in the configuration object, and checks whether it includes
|
|
36
|
-
* the specified provider name.
|
|
37
|
-
*
|
|
38
|
-
* @param host - The virtual file system tree used by Angular schematics.
|
|
39
|
-
* @param projectName - The name of the Angular project.
|
|
40
|
-
* @param providerName - The name of the provider to search for (as a string match).
|
|
41
|
-
* @returns A promise that resolves to `true` if the provider is found, otherwise `false`.
|
|
42
|
-
* @throws SchematicsException if the app config file cannot be read.
|
|
43
|
-
*/
|
|
44
|
-
export declare const hasProviderInStandaloneAppConfig: (host: Tree, projectName: string, providerName: string) => Promise<boolean>;
|
|
45
|
-
/**
|
|
46
|
-
* Cleans up empty or invalid expressions (e.g., extra or trailing commas) from the
|
|
47
|
-
* `providers` array within a standalone Angular application configuration object.
|
|
48
|
-
*
|
|
49
|
-
* This function parses the source file's AST to locate variable declarations that
|
|
50
|
-
* define an object literal. It then searches for a `providers` property and removes
|
|
51
|
-
* any empty elements from its array literal, replacing it with a cleaned version.
|
|
52
|
-
*
|
|
53
|
-
* Typically used in Angular schematics to ensure the `providers` array in `app.config.ts`
|
|
54
|
-
* is free of empty slots after modifications.
|
|
55
|
-
*
|
|
56
|
-
* @param source - The TypeScript source file containing the app configuration.
|
|
57
|
-
* @param recorder - The recorder used to apply changes to the source file.
|
|
58
|
-
*/
|
|
59
|
-
export declare function cleanEmptyExprFromProviders(source: ts.SourceFile, recorder: UpdateRecorder): void;
|
|
1
|
+
import { Tree, UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
|
+
import * as ts from 'typescript';
|
|
3
|
+
import { Path } from '@angular-devkit/core';
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves the file path of the application's configuration used in a standalone
|
|
6
|
+
* Angular application setup.
|
|
7
|
+
*
|
|
8
|
+
* This function locates the `bootstrapApplication` call in the main entry file and
|
|
9
|
+
* resolves the path to the configuration object passed to it (typically `appConfig`).
|
|
10
|
+
*
|
|
11
|
+
* @param host - The virtual file system tree used by Angular schematics.
|
|
12
|
+
* @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
|
|
13
|
+
* @returns The resolved file path of the application's configuration, or an empty string if not found.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getAppConfigPath: (host: Tree, mainFilePath: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Attempts to locate the file path of the `routes` array used in a standalone
|
|
18
|
+
* Angular application configuration.
|
|
19
|
+
*
|
|
20
|
+
* This function resolves the application's config file (typically where `routes` is defined or imported),
|
|
21
|
+
* parses the file, and inspects its import declarations to find the import associated with `routes`.
|
|
22
|
+
* It then resolves and normalizes the file path of the `routes` definition and returns it.
|
|
23
|
+
*
|
|
24
|
+
* @param tree - The virtual file system tree used by Angular schematics.
|
|
25
|
+
* @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
|
|
26
|
+
* @returns The normalized workspace-relative path to the file where `routes` is defined, or `null` if not found.
|
|
27
|
+
* @throws If the `routes` import path is found but the file does not exist in the tree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function findAppRoutesPath(tree: Tree, mainFilePath: string): Path | null;
|
|
30
|
+
/**
|
|
31
|
+
* Checks whether a specific provider is registered in the `providers` array of the
|
|
32
|
+
* standalone application configuration (typically within `app.config.ts`) in an Angular project.
|
|
33
|
+
*
|
|
34
|
+
* This function reads and parses the application configuration file, looks for the
|
|
35
|
+
* `providers` property in the configuration object, and checks whether it includes
|
|
36
|
+
* the specified provider name.
|
|
37
|
+
*
|
|
38
|
+
* @param host - The virtual file system tree used by Angular schematics.
|
|
39
|
+
* @param projectName - The name of the Angular project.
|
|
40
|
+
* @param providerName - The name of the provider to search for (as a string match).
|
|
41
|
+
* @returns A promise that resolves to `true` if the provider is found, otherwise `false`.
|
|
42
|
+
* @throws SchematicsException if the app config file cannot be read.
|
|
43
|
+
*/
|
|
44
|
+
export declare const hasProviderInStandaloneAppConfig: (host: Tree, projectName: string, providerName: string) => Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Cleans up empty or invalid expressions (e.g., extra or trailing commas) from the
|
|
47
|
+
* `providers` array within a standalone Angular application configuration object.
|
|
48
|
+
*
|
|
49
|
+
* This function parses the source file's AST to locate variable declarations that
|
|
50
|
+
* define an object literal. It then searches for a `providers` property and removes
|
|
51
|
+
* any empty elements from its array literal, replacing it with a cleaned version.
|
|
52
|
+
*
|
|
53
|
+
* Typically used in Angular schematics to ensure the `providers` array in `app.config.ts`
|
|
54
|
+
* is free of empty slots after modifications.
|
|
55
|
+
*
|
|
56
|
+
* @param source - The TypeScript source file containing the app configuration.
|
|
57
|
+
* @param recorder - The recorder used to apply changes to the source file.
|
|
58
|
+
*/
|
|
59
|
+
export declare function cleanEmptyExprFromProviders(source: ts.SourceFile, recorder: UpdateRecorder): void;
|