@nrwl/angular 14.0.5 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/package.json +7 -7
  2. package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +40 -2
  3. package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -1
  4. package/src/executors/file-server/file-server.impl.js +0 -3
  5. package/src/executors/file-server/file-server.impl.js.map +1 -1
  6. package/src/generators/application/lib/normalize-options.js +3 -3
  7. package/src/generators/application/lib/normalize-options.js.map +1 -1
  8. package/src/generators/application/lib/update-config-files.js +3 -0
  9. package/src/generators/application/lib/update-config-files.js.map +1 -1
  10. package/src/generators/library/lib/normalize-options.js +5 -4
  11. package/src/generators/library/lib/normalize-options.js.map +1 -1
  12. package/src/generators/library/lib/update-project.js +3 -0
  13. package/src/generators/library/lib/update-project.js.map +1 -1
  14. package/src/generators/ng-add/migrate-from-angular-cli.js +0 -4
  15. package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -1
  16. package/src/generators/ng-add/utilities/app.migrator.d.ts +16 -2
  17. package/src/generators/ng-add/utilities/app.migrator.js +278 -83
  18. package/src/generators/ng-add/utilities/app.migrator.js.map +1 -1
  19. package/src/generators/ng-add/utilities/e2e.migrator.d.ts +6 -2
  20. package/src/generators/ng-add/utilities/e2e.migrator.js +112 -70
  21. package/src/generators/ng-add/utilities/e2e.migrator.js.map +1 -1
  22. package/src/generators/ng-add/utilities/lib.migrator.d.ts +3 -5
  23. package/src/generators/ng-add/utilities/lib.migrator.js +26 -108
  24. package/src/generators/ng-add/utilities/lib.migrator.js.map +1 -1
  25. package/src/generators/ng-add/utilities/project.migrator.d.ts +9 -5
  26. package/src/generators/ng-add/utilities/project.migrator.js +120 -11
  27. package/src/generators/ng-add/utilities/project.migrator.js.map +1 -1
  28. package/src/generators/ng-add/utilities/types.d.ts +4 -0
  29. package/src/generators/utils/project.d.ts +1 -0
  30. package/src/generators/utils/project.js +13 -4
  31. package/src/generators/utils/project.js.map +1 -1
  32. package/src/utils/mfe/with-module-federation.js +6 -1
  33. package/src/utils/mfe/with-module-federation.js.map +1 -1
  34. package/src/utils/versions.js +1 -1
@@ -9,10 +9,33 @@ const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
9
9
  const path_1 = require("path");
10
10
  const e2e_migrator_1 = require("./e2e.migrator");
11
11
  const project_migrator_1 = require("./project.migrator");
12
+ const supportedTargets = {
13
+ build: { builders: ['@angular-devkit/build-angular:browser'] },
14
+ e2e: {
15
+ acceptMultipleDefinitions: true,
16
+ builders: [
17
+ '@angular-devkit/build-angular:protractor',
18
+ '@cypress/schematic:cypress',
19
+ ],
20
+ },
21
+ i18n: { builders: ['@angular-devkit/build-angular:extract-i18n'] },
22
+ lint: { builders: ['@angular-eslint/builder:lint'] },
23
+ prerender: { builders: ['@nguniversal/builders:prerender'] },
24
+ serve: { builders: ['@angular-devkit/build-angular:dev-server'] },
25
+ server: { builders: ['@angular-devkit/build-angular:server'] },
26
+ serveSsr: { builders: ['@nguniversal/builders:ssr-dev-server'] },
27
+ test: { builders: ['@angular-devkit/build-angular:karma'] },
28
+ };
12
29
  class AppMigrator extends project_migrator_1.ProjectMigrator {
13
- constructor(tree, options, project) {
14
- super(tree, options, project, 'apps');
15
- this.e2eMigrator = new e2e_migrator_1.E2eProjectMigrator(tree, options, project);
30
+ constructor(tree, options, project, logger) {
31
+ var _a, _b;
32
+ super(tree, options, supportedTargets, project, 'apps', logger);
33
+ this.e2eMigrator = new e2e_migrator_1.E2eMigrator(tree, options, project, this.targetNames.lint);
34
+ if (this.targetNames.lint) {
35
+ this.oldEsLintConfigPath =
36
+ (_b = (_a = this.projectConfig.targets[this.targetNames.lint].options) === null || _a === void 0 ? void 0 : _a.eslintConfig) !== null && _b !== void 0 ? _b : (0, devkit_1.joinPathFragments)(this.project.oldRoot, '.eslintrc.json');
37
+ this.newEsLintConfigPath = this.convertRootPath(this.oldEsLintConfigPath);
38
+ }
16
39
  }
17
40
  migrate() {
18
41
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -21,50 +44,57 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
21
44
  yield this.updateProjectConfiguration();
22
45
  this.updateTsConfigs();
23
46
  this.updateEsLintConfig();
47
+ this.updateCacheableOperations([
48
+ this.targetNames.build,
49
+ this.targetNames.lint,
50
+ this.targetNames.test,
51
+ this.targetNames.e2e,
52
+ ].filter(Boolean));
24
53
  });
25
54
  }
26
55
  validate() {
27
- var _a;
28
- const result = [];
29
- if (this.projectConfig.targets.lint &&
30
- this.projectConfig.targets.lint.executor !==
31
- '@angular-eslint/builder:lint') {
32
- result.push({
33
- message: `The "lint" target is using an unsupported builder "${this.projectConfig.targets.lint.executor}".`,
34
- hint: `The supported builder is "@angular-eslint/builder:lint".`,
35
- });
36
- }
37
- result.push(...((_a = this.e2eMigrator.validate()) !== null && _a !== void 0 ? _a : []));
56
+ var _a, _b;
57
+ const result = [
58
+ ...((_a = super.validate()) !== null && _a !== void 0 ? _a : []),
59
+ ...((_b = this.e2eMigrator.validate()) !== null && _b !== void 0 ? _b : []),
60
+ ];
38
61
  return result.length ? result : null;
39
62
  }
40
63
  moveProjectFiles() {
41
- var _a;
64
+ // project is self-contained and can be safely moved
65
+ if (this.projectConfig.root !== '') {
66
+ this.moveDir(this.project.oldRoot, this.project.newRoot);
67
+ return;
68
+ }
69
+ // we need to pick what to move because the project is in the workspace root
42
70
  // it is not required to have a browserslist
43
- this.moveProjectRootFile((0, devkit_1.joinPathFragments)(this.project.oldRoot, 'browserslist'), false);
44
- this.moveProjectRootFile((0, devkit_1.joinPathFragments)(this.project.oldRoot, '.browserslistrc'), false);
45
- this.moveFilePathsFromTargetToProjectRoot(this.projectConfig.targets.build, ['tsConfig', 'webWorkerTsConfig', 'ngswConfigPath']);
46
- if (this.projectConfig.targets.test) {
47
- this.moveFilePathsFromTargetToProjectRoot(this.projectConfig.targets.test, ['karmaConfig', 'tsConfig', 'webWorkerTsConfig']);
71
+ this.moveProjectRootFile('browserslist', false);
72
+ this.moveProjectRootFile('.browserslistrc', false);
73
+ if (this.targetNames.build) {
74
+ this.moveFilePathsFromTargetToProjectRoot(this.projectConfig.targets[this.targetNames.build], ['tsConfig', 'webWorkerTsConfig', 'ngswConfigPath']);
75
+ }
76
+ if (this.targetNames.test) {
77
+ this.moveFilePathsFromTargetToProjectRoot(this.projectConfig.targets[this.targetNames.test], ['karmaConfig', 'tsConfig', 'webWorkerTsConfig']);
48
78
  }
49
79
  else {
50
80
  // there could still be a karma.conf.js file in the root
51
81
  // so move to new location
52
- const karmaConfig = (0, devkit_1.joinPathFragments)(this.project.oldRoot, 'karma.conf.js');
82
+ const karmaConfig = 'karma.conf.js';
53
83
  if (this.tree.exists(karmaConfig)) {
54
84
  this.logger.info('No "test" target was found, but a root Karma config file was found in the project root. The file will be moved to the new location.');
55
85
  this.moveProjectRootFile(karmaConfig);
56
86
  }
57
87
  }
58
- if (this.projectConfig.targets.server) {
59
- this.moveProjectRootFile(this.projectConfig.targets.server.options.tsConfig);
88
+ if (this.targetNames.server) {
89
+ this.moveFilePathsFromTargetToProjectRoot(this.projectConfig.targets[this.targetNames.server], ['tsConfig']);
60
90
  }
61
- if (this.projectConfig.targets.lint) {
62
- this.moveProjectRootFile((_a = this.projectConfig.targets.lint.options.eslintConfig) !== null && _a !== void 0 ? _a : (0, devkit_1.joinPathFragments)(this.project.oldRoot, '.eslintrc.json'));
91
+ if (this.targetNames.lint) {
92
+ this.moveProjectRootFile(this.oldEsLintConfigPath);
63
93
  }
64
94
  else {
65
95
  // there could still be a .eslintrc.json file in the root
66
96
  // so move to new location
67
- const eslintConfig = (0, devkit_1.joinPathFragments)(this.project.oldRoot, '.eslintrc.json');
97
+ const eslintConfig = '.eslintrc.json';
68
98
  if (this.tree.exists(eslintConfig)) {
69
99
  this.logger.info('No "lint" target was found, but an ESLint config file was found in the project root. The file will be moved to the new location.');
70
100
  this.moveProjectRootFile(eslintConfig);
@@ -73,49 +103,20 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
73
103
  this.moveDir(this.project.oldSourceRoot, this.project.newSourceRoot);
74
104
  }
75
105
  updateProjectConfiguration() {
76
- var _a, _b;
77
106
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
78
107
  this.projectConfig.root = this.project.newRoot;
79
108
  this.projectConfig.sourceRoot = this.project.newSourceRoot;
80
- this.convertBuildOptions(this.projectConfig.targets.build.options);
81
- Object.values((_a = this.projectConfig.targets.build.configurations) !== null && _a !== void 0 ? _a : {}).forEach((config) => this.convertBuildOptions(config));
82
- if (this.projectConfig.targets.test) {
83
- const testOptions = this.projectConfig.targets.test.options;
84
- testOptions.main =
85
- testOptions.main && this.convertAsset(testOptions.main);
86
- testOptions.polyfills =
87
- testOptions.polyfills && this.convertAsset(testOptions.polyfills);
88
- testOptions.tsConfig = (0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.spec.json');
89
- testOptions.karmaConfig = (0, devkit_1.joinPathFragments)(this.project.newRoot, 'karma.conf.js');
90
- testOptions.assets =
91
- testOptions.assets &&
92
- testOptions.assets.map((asset) => this.convertAsset(asset));
93
- testOptions.styles =
94
- testOptions.styles &&
95
- testOptions.styles.map((style) => this.convertAsset(style));
96
- testOptions.scripts =
97
- testOptions.scripts &&
98
- testOptions.scripts.map((script) => this.convertAsset(script));
99
- }
100
- if (this.projectConfig.targets.lint) {
101
- this.projectConfig.targets.lint.executor = '@nrwl/linter:eslint';
102
- const lintOptions = this.projectConfig.targets.lint.options;
103
- lintOptions.eslintConfig =
104
- lintOptions.eslintConfig &&
105
- (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(lintOptions.eslintConfig));
106
- lintOptions.lintFilePatterns =
107
- lintOptions.lintFilePatterns &&
108
- lintOptions.lintFilePatterns.map((pattern) => this.convertPath(pattern));
109
- const eslintConfigPath = (_b = lintOptions.eslintConfig) !== null && _b !== void 0 ? _b : (0, devkit_1.joinPathFragments)(this.project.newRoot, '.eslintrc.json');
110
- const eslintConfig = (0, devkit_1.readJson)(this.tree, eslintConfigPath);
111
- if ((0, linter_1.hasRulesRequiringTypeChecking)(eslintConfig)) {
112
- lintOptions.hasTypeAwareRules = true;
113
- }
109
+ if (!this.projectConfig.targets ||
110
+ !Object.keys(this.projectConfig.targets).length) {
111
+ this.logger.warn('The project does not have any targets configured. Skipping updating targets.');
114
112
  }
115
- if (this.projectConfig.targets.server) {
116
- const serverOptions = this.projectConfig.targets.server.options;
117
- this.convertServerOptions(serverOptions);
118
- Object.values(this.projectConfig.targets.server.configurations).forEach((config) => this.convertServerOptions(config));
113
+ else {
114
+ this.updateBuildTargetConfiguration();
115
+ this.updateLintTargetConfiguration();
116
+ this.updateTestTargetConfiguration();
117
+ this.updateServerTargetConfiguration();
118
+ this.updatePrerenderTargetConfiguration();
119
+ this.updateServeSsrTargetConfiguration();
119
120
  }
120
121
  (0, devkit_1.updateProjectConfiguration)(this.tree, this.project.name, Object.assign({}, this.projectConfig));
121
122
  yield (0, generators_1.convertToNxProjectGenerator)(this.tree, {
@@ -127,30 +128,24 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
127
128
  updateTsConfigs() {
128
129
  const rootTsConfigFile = (0, typescript_1.getRootTsConfigPathInTree)(this.tree);
129
130
  const projectOffsetFromRoot = (0, devkit_1.offsetFromRoot)(this.projectConfig.root);
130
- this.updateTsConfigFile(this.projectConfig.targets.build.options.tsConfig, rootTsConfigFile, projectOffsetFromRoot);
131
- if (this.projectConfig.targets.test) {
132
- this.updateTsConfigFile(this.projectConfig.targets.test.options.tsConfig, rootTsConfigFile, projectOffsetFromRoot);
133
- }
134
- if (this.projectConfig.targets.server) {
135
- this.updateTsConfigFile(this.projectConfig.targets.server.options.tsConfig, rootTsConfigFile, projectOffsetFromRoot);
136
- }
131
+ this.updateTsConfigFileUsedByBuildTarget(rootTsConfigFile, projectOffsetFromRoot);
132
+ this.updateTsConfigFileUsedByTestTarget(rootTsConfigFile, projectOffsetFromRoot);
133
+ this.updateTsConfigFileUsedByServerTarget(projectOffsetFromRoot);
137
134
  }
138
135
  updateEsLintConfig() {
139
- var _a, _b, _c;
140
- const eslintConfigPath = (_c = (_b = (_a = this.projectConfig.targets.lint) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.eslintConfig) !== null && _c !== void 0 ? _c : (0, devkit_1.joinPathFragments)(this.project.newRoot, '.eslintrc.json');
141
- if (!this.tree.exists(eslintConfigPath)) {
136
+ if (!this.targetNames.lint || !this.tree.exists(this.newEsLintConfigPath)) {
142
137
  return;
143
138
  }
144
- (0, devkit_1.updateJson)(this.tree, eslintConfigPath, (json) => {
139
+ (0, devkit_1.updateJson)(this.tree, this.newEsLintConfigPath, (json) => {
145
140
  var _a;
146
141
  delete json.root;
147
142
  json.ignorePatterns = ['!**/*'];
148
143
  const rootEsLintConfigRelativePath = (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(this.projectConfig.root), '.eslintrc.json');
149
144
  if (Array.isArray(json.extends)) {
150
- json.extends = json.extends.map((extend) => this.convertEsLintConfigExtendToNewPath(eslintConfigPath, extend));
145
+ json.extends = json.extends.map((extend) => this.convertEsLintConfigExtendToNewPath(this.oldEsLintConfigPath, extend));
151
146
  // it might have not been extending from the root config, make sure it does
152
147
  if (!json.extends.includes(rootEsLintConfigRelativePath)) {
153
- json.extends.push(rootEsLintConfigRelativePath);
148
+ json.extends.unshift(rootEsLintConfigRelativePath);
154
149
  }
155
150
  }
156
151
  else {
@@ -171,7 +166,7 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
171
166
  convertBuildOptions(buildOptions) {
172
167
  buildOptions.outputPath =
173
168
  buildOptions.outputPath &&
174
- (0, devkit_1.joinPathFragments)('dist', this.project.newRoot);
169
+ (0, devkit_1.joinPathFragments)('dist', this.project.newRoot, this.targetNames.server ? 'browser' : '');
175
170
  buildOptions.index =
176
171
  buildOptions.index && this.convertAsset(buildOptions.index);
177
172
  buildOptions.main =
@@ -180,7 +175,7 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
180
175
  buildOptions.polyfills && this.convertAsset(buildOptions.polyfills);
181
176
  buildOptions.tsConfig =
182
177
  buildOptions.tsConfig &&
183
- (0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.app.json');
178
+ (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(buildOptions.tsConfig));
184
179
  buildOptions.assets =
185
180
  buildOptions.assets &&
186
181
  buildOptions.assets.map((asset) => this.convertAsset(asset));
@@ -200,12 +195,12 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
200
195
  convertServerOptions(serverOptions) {
201
196
  serverOptions.outputPath =
202
197
  serverOptions.outputPath &&
203
- (0, devkit_1.joinPathFragments)('dist', 'apps', `${this.project.name}-server`);
198
+ (0, devkit_1.joinPathFragments)('dist', this.project.newRoot, 'server');
204
199
  serverOptions.main =
205
- serverOptions.main && this.convertAsset(serverOptions.main);
200
+ serverOptions.main && this.convertPath(serverOptions.main);
206
201
  serverOptions.tsConfig =
207
202
  serverOptions.tsConfig &&
208
- (0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.server.json');
203
+ (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(serverOptions.tsConfig));
209
204
  serverOptions.fileReplacements =
210
205
  serverOptions.fileReplacements &&
211
206
  serverOptions.fileReplacements.map((replacement) => ({
@@ -220,6 +215,206 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
220
215
  });
221
216
  });
222
217
  }
218
+ updateBuildTargetConfiguration() {
219
+ var _a, _b, _c, _d, _e, _f;
220
+ if (!this.targetNames.build) {
221
+ this.logger.warn('There is no build target in the project configuration. Skipping updating the build target configuration.');
222
+ return;
223
+ }
224
+ const buildTarget = this.projectConfig.targets[this.targetNames.build];
225
+ if (!buildTarget.options &&
226
+ (!buildTarget.configurations ||
227
+ !Object.keys(buildTarget.configurations).length)) {
228
+ this.logger.warn(`The target "${this.targetNames.build}" is not specifying any options or configurations. Skipping updating the target configuration.`);
229
+ return;
230
+ }
231
+ const buildDevTsConfig = (_b = (_a = buildTarget.options) === null || _a === void 0 ? void 0 : _a.tsConfig) !== null && _b !== void 0 ? _b : (_d = (_c = buildTarget.configurations) === null || _c === void 0 ? void 0 : _c.development) === null || _d === void 0 ? void 0 : _d.tsConfig;
232
+ if (!buildDevTsConfig) {
233
+ this.logger.warn(`The "${this.targetNames.build}" target does not have the "tsConfig" option configured. Skipping updating the tsConfig file.`);
234
+ }
235
+ else if (!this.tree.exists(buildDevTsConfig)) {
236
+ this.logger.warn(`The tsConfig file "${buildDevTsConfig}" specified in the "${this.targetNames.build}" target could not be found. Skipping updating the tsConfig file.`);
237
+ }
238
+ this.convertBuildOptions((_e = buildTarget.options) !== null && _e !== void 0 ? _e : {});
239
+ Object.values((_f = buildTarget.configurations) !== null && _f !== void 0 ? _f : {}).forEach((config) => this.convertBuildOptions(config));
240
+ }
241
+ updateLintTargetConfiguration() {
242
+ if (!this.targetNames.lint) {
243
+ return;
244
+ }
245
+ this.projectConfig.targets[this.targetNames.lint].executor =
246
+ '@nrwl/linter:eslint';
247
+ const lintOptions = this.projectConfig.targets[this.targetNames.lint].options;
248
+ if (!lintOptions) {
249
+ this.logger.warn(`The target "${this.targetNames.lint}" is not specifying any options. Skipping updating the target configuration.`);
250
+ return;
251
+ }
252
+ const existEsLintConfigPath = this.tree.exists(this.newEsLintConfigPath);
253
+ if (!existEsLintConfigPath) {
254
+ this.logger.warn(`The ESLint config file "${this.oldEsLintConfigPath}" could not be found. Skipping updating the file.`);
255
+ }
256
+ lintOptions.eslintConfig =
257
+ lintOptions.eslintConfig &&
258
+ (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(lintOptions.eslintConfig));
259
+ lintOptions.lintFilePatterns =
260
+ lintOptions.lintFilePatterns &&
261
+ lintOptions.lintFilePatterns.map((pattern) => {
262
+ // replace the old source root with the new root, we want to lint all
263
+ // matching files in the project, not just the ones in the source root
264
+ if (pattern.startsWith(this.project.oldSourceRoot)) {
265
+ return (0, devkit_1.joinPathFragments)(this.project.newRoot, pattern.replace(this.project.oldSourceRoot, ''));
266
+ }
267
+ // replace the old root with the new root
268
+ if (pattern.startsWith(this.project.oldRoot)) {
269
+ return (0, devkit_1.joinPathFragments)(this.project.newRoot, pattern.replace(this.project.oldRoot, ''));
270
+ }
271
+ // do nothing, warn about the pattern
272
+ this.logger.warn(`The lint file pattern "${pattern}" specified in the "${this.targetNames.lint}" target is not contained in the project root or source root. The pattern will not be updated.`);
273
+ return pattern;
274
+ });
275
+ if (!existEsLintConfigPath) {
276
+ return;
277
+ }
278
+ const eslintConfig = (0, devkit_1.readJson)(this.tree, this.newEsLintConfigPath);
279
+ if ((0, linter_1.hasRulesRequiringTypeChecking)(eslintConfig)) {
280
+ lintOptions.hasTypeAwareRules = true;
281
+ }
282
+ }
283
+ updatePrerenderTargetConfiguration() {
284
+ if (!this.targetNames.prerender) {
285
+ return;
286
+ }
287
+ const prerenderTarget = this.projectConfig.targets[this.targetNames.prerender];
288
+ if (!prerenderTarget.options) {
289
+ this.logger.warn(`The target "${this.targetNames.prerender}" is not specifying any options. Skipping updating the target configuration.`);
290
+ return;
291
+ }
292
+ prerenderTarget.options.routesFile =
293
+ prerenderTarget.options.routesFile &&
294
+ this.convertPath(prerenderTarget.options.routesFile);
295
+ }
296
+ updateServerTargetConfiguration() {
297
+ var _a, _b, _c, _d, _e, _f;
298
+ if (!this.targetNames.server) {
299
+ return;
300
+ }
301
+ const serverTarget = this.projectConfig.targets[this.targetNames.server];
302
+ if (!serverTarget.options &&
303
+ (!serverTarget.configurations ||
304
+ !Object.keys(serverTarget.configurations).length)) {
305
+ this.logger.warn(`The target "${this.targetNames.server}" is not specifying any options or configurations. Skipping updating the target configuration.`);
306
+ return;
307
+ }
308
+ const serverDevTsConfig = (_b = (_a = serverTarget.options) === null || _a === void 0 ? void 0 : _a.tsConfig) !== null && _b !== void 0 ? _b : (_d = (_c = serverTarget.configurations) === null || _c === void 0 ? void 0 : _c.development) === null || _d === void 0 ? void 0 : _d.tsConfig;
309
+ if (!serverDevTsConfig) {
310
+ this.logger.warn(`The "${this.targetNames.server}" target does not have the "tsConfig" option configured. Skipping updating the tsConfig file.`);
311
+ }
312
+ else if (!this.tree.exists(serverDevTsConfig)) {
313
+ this.logger.warn(`The tsConfig file "${serverDevTsConfig}" specified in the "${this.targetNames.server}" target could not be found. Skipping updating the tsConfig file.`);
314
+ }
315
+ this.convertServerOptions((_e = serverTarget.options) !== null && _e !== void 0 ? _e : {});
316
+ Object.values((_f = serverTarget.configurations) !== null && _f !== void 0 ? _f : {}).forEach((config) => this.convertServerOptions(config));
317
+ }
318
+ updateServeSsrTargetConfiguration() {
319
+ if (!this.targetNames.serveSsr) {
320
+ return;
321
+ }
322
+ const serveSsrTarget = this.projectConfig.targets[this.targetNames.serveSsr];
323
+ if (!serveSsrTarget.options &&
324
+ (!serveSsrTarget.configurations ||
325
+ !Object.keys(serveSsrTarget.configurations).length)) {
326
+ this.logger.warn(`The target "${this.targetNames.serveSsr}" is not specifying any options or configurations. Skipping updating the target configuration.`);
327
+ return;
328
+ }
329
+ ['sslKey', 'sslCert', 'proxyConfig'].forEach((option) => {
330
+ var _a;
331
+ if (serveSsrTarget.options) {
332
+ serveSsrTarget.options[option] =
333
+ serveSsrTarget.options[option] &&
334
+ this.convertPath(serveSsrTarget.options[option]);
335
+ }
336
+ for (const configuration of Object.values((_a = serveSsrTarget.configurations) !== null && _a !== void 0 ? _a : {})) {
337
+ serveSsrTarget.configurations[configuration][option] =
338
+ serveSsrTarget.configurations[configuration][option] &&
339
+ this.convertPath(serveSsrTarget.configurations[configuration][option]);
340
+ }
341
+ });
342
+ }
343
+ updateTestTargetConfiguration() {
344
+ if (!this.targetNames.test) {
345
+ return;
346
+ }
347
+ const testOptions = this.projectConfig.targets[this.targetNames.test].options;
348
+ if (!testOptions) {
349
+ this.logger.warn(`The target "${this.targetNames.test}" is not specifying any options. Skipping updating the target configuration.`);
350
+ return;
351
+ }
352
+ if (!testOptions.tsConfig) {
353
+ this.logger.warn(`The "${this.targetNames.test}" target does not have the "tsConfig" option configured. Skipping updating the tsConfig file.`);
354
+ }
355
+ else if (!this.tree.exists(testOptions.tsConfig)) {
356
+ this.logger.warn(`The tsConfig file "${testOptions.tsConfig}" specified in the "${this.targetNames.test}" target could not be found. Skipping updating the tsConfig file.`);
357
+ }
358
+ testOptions.main = testOptions.main && this.convertAsset(testOptions.main);
359
+ testOptions.polyfills =
360
+ testOptions.polyfills && this.convertAsset(testOptions.polyfills);
361
+ testOptions.tsConfig =
362
+ testOptions.tsConfig &&
363
+ (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(testOptions.tsConfig));
364
+ testOptions.karmaConfig =
365
+ testOptions.karmaConfig &&
366
+ (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(testOptions.karmaConfig));
367
+ testOptions.assets =
368
+ testOptions.assets &&
369
+ testOptions.assets.map((asset) => this.convertAsset(asset));
370
+ testOptions.styles =
371
+ testOptions.styles &&
372
+ testOptions.styles.map((style) => this.convertAsset(style));
373
+ testOptions.scripts =
374
+ testOptions.scripts &&
375
+ testOptions.scripts.map((script) => this.convertAsset(script));
376
+ }
377
+ updateTsConfigFileUsedByBuildTarget(rootTsConfigFile, projectOffsetFromRoot) {
378
+ var _a, _b, _c, _d;
379
+ if (!this.targetNames.build) {
380
+ return;
381
+ }
382
+ const tsConfigPath = (_b = (_a = this.projectConfig.targets[this.targetNames.build].options) === null || _a === void 0 ? void 0 : _a.tsConfig) !== null && _b !== void 0 ? _b : (_d = (_c = this.projectConfig.targets[this.targetNames.build].configurations) === null || _c === void 0 ? void 0 : _c.development) === null || _d === void 0 ? void 0 : _d.tsConfig;
383
+ if (!tsConfigPath || !this.tree.exists(tsConfigPath)) {
384
+ // we already logged a warning for these cases, so just return
385
+ return;
386
+ }
387
+ this.updateTsConfigFile(tsConfigPath, rootTsConfigFile, projectOffsetFromRoot);
388
+ }
389
+ updateTsConfigFileUsedByServerTarget(projectOffsetFromRoot) {
390
+ var _a, _b, _c, _d;
391
+ if (!this.targetNames.server) {
392
+ return;
393
+ }
394
+ const tsConfigPath = (_b = (_a = this.projectConfig.targets[this.targetNames.server].options) === null || _a === void 0 ? void 0 : _a.tsConfig) !== null && _b !== void 0 ? _b : (_d = (_c = this.projectConfig.targets[this.targetNames.server].configurations) === null || _c === void 0 ? void 0 : _c.development) === null || _d === void 0 ? void 0 : _d.tsConfig;
395
+ if (!tsConfigPath || !this.tree.exists(tsConfigPath)) {
396
+ // we already logged a warning for these cases, so just return
397
+ return;
398
+ }
399
+ (0, devkit_1.updateJson)(this.tree, tsConfigPath, (json) => {
400
+ var _a;
401
+ json.compilerOptions = (_a = json.compilerOptions) !== null && _a !== void 0 ? _a : {};
402
+ json.compilerOptions.outDir = `${projectOffsetFromRoot}dist/out-tsc`;
403
+ return json;
404
+ });
405
+ }
406
+ updateTsConfigFileUsedByTestTarget(rootTsConfigFile, projectOffsetFromRoot) {
407
+ var _a;
408
+ if (!this.targetNames.test) {
409
+ return;
410
+ }
411
+ const tsConfig = (_a = this.projectConfig.targets[this.targetNames.test].options) === null || _a === void 0 ? void 0 : _a.tsConfig;
412
+ if (!tsConfig || !this.tree.exists(tsConfig)) {
413
+ // we already logged a warning for these cases, so just return
414
+ return;
415
+ }
416
+ this.updateTsConfigFile(tsConfig, rootTsConfigFile, projectOffsetFromRoot);
417
+ }
223
418
  }
224
419
  exports.AppMigrator = AppMigrator;
225
420
  //# sourceMappingURL=app.migrator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.migrator.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/app.migrator.ts"],"names":[],"mappings":";;;;AAAA,yCAQsB;AACtB,yCAA6D;AAC7D,2DAAyE;AACzE,yEAAqF;AACrF,+BAAgC;AAEhC,iDAAoD;AACpD,yDAAqD;AAGrD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,CAAC,CAAC;QACnE,aAAa,CAAC,IAAI;YAChB,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC9D,aAAa,CAAC,QAAQ;YACpB,aAAa,CAAC,QAAQ;gBACtB,IAAA,0BAAiB,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;QAClE,aAAa,CAAC,gBAAgB;YAC5B,aAAa,CAAC,gBAAgB;gBAC9B,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;oBACnD,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC;oBAC/C,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC;iBAC1C,CAAC,CAAC,CAAC;IACR,CAAC;IAEO,oCAAoC,CAC1C,MAA2B,EAC3B,OAAiB;QAEjB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC7D,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtTD,kCAsTC"}
1
+ {"version":3,"file":"app.migrator.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/app.migrator.ts"],"names":[],"mappings":";;;;AAAA,yCAQsB;AACtB,yCAA6D;AAC7D,2DAAyE;AACzE,yEAAqF;AACrF,+BAAgC;AAEhC,iDAA6C;AAE7C,yDAAqD;AAiBrD,MAAM,gBAAgB,GAAqC;IACzD,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,uCAAuC,CAAC,EAAE;IAC9D,GAAG,EAAE;QACH,yBAAyB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ACtE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YAC5C,8DAA8D;YAC9D,OAAO;SACR;QAED,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC7E,CAAC;CACF;AApkBD,kCAokBC"}
@@ -1,12 +1,15 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
2
  import { GeneratorOptions } from '../schema';
3
+ import { Logger } from './logger';
3
4
  import { ProjectMigrator } from './project.migrator';
4
5
  import { MigrationProjectConfiguration, ValidationResult } from './types';
5
- export declare class E2eProjectMigrator extends ProjectMigrator {
6
+ declare type SupportedTargets = 'e2e';
7
+ export declare class E2eMigrator extends ProjectMigrator<SupportedTargets> {
8
+ private lintTargetName;
6
9
  private appConfig;
7
10
  private appName;
8
11
  private isProjectUsingEsLint;
9
- constructor(tree: Tree, options: GeneratorOptions, project: MigrationProjectConfiguration);
12
+ constructor(tree: Tree, options: GeneratorOptions, project: MigrationProjectConfiguration, lintTargetName: string | undefined, logger?: Logger);
10
13
  migrate(): Promise<void>;
11
14
  validate(): ValidationResult;
12
15
  private initialize;
@@ -21,3 +24,4 @@ export declare class E2eProjectMigrator extends ProjectMigrator {
21
24
  private isCypressE2eProject;
22
25
  private isProtractorE2eProject;
23
26
  }
27
+ export {};