@nrwl/angular 14.6.0-beta.7 → 14.6.0-rc.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 (57) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/esm2020/src/runtime/nx/data-persistence.mjs +3 -3
  3. package/esm2020/src/runtime/nx/nx.module.mjs +4 -4
  4. package/fesm2015/nrwl-angular.mjs +7 -7
  5. package/fesm2020/nrwl-angular.mjs +7 -7
  6. package/migrations.json +46 -0
  7. package/package.json +11 -11
  8. package/src/executors/delegate-build/schema.json +5 -2
  9. package/src/executors/ng-packagr-lite/schema.json +3 -1
  10. package/src/executors/package/schema.json +6 -2
  11. package/src/generators/application/application.js +3 -3
  12. package/src/generators/application/application.js.map +1 -1
  13. package/src/generators/application/schema.d.ts +15 -0
  14. package/src/generators/component/schema.json +1 -3
  15. package/src/generators/host/host.js +31 -7
  16. package/src/generators/host/host.js.map +1 -1
  17. package/src/generators/host/schema.d.ts +1 -0
  18. package/src/generators/host/schema.json +5 -0
  19. package/src/generators/karma-project/schema.json +1 -3
  20. package/src/generators/library-secondary-entry-point/schema.json +1 -3
  21. package/src/generators/remote/remote.js +28 -6
  22. package/src/generators/remote/remote.js.map +1 -1
  23. package/src/generators/remote/schema.d.ts +1 -0
  24. package/src/generators/remote/schema.json +6 -3
  25. package/src/generators/scam/schema.json +1 -3
  26. package/src/generators/scam-directive/schema.json +1 -3
  27. package/src/generators/scam-pipe/schema.json +1 -3
  28. package/src/generators/setup-mf/files/entry-module-files/entry.component.ts__tmpl__ +1 -1
  29. package/src/generators/setup-mf/files/standalone-entry-component-files/entry.component.ts__tmpl__ +13 -0
  30. package/src/generators/setup-mf/files/standalone-entry-component-files/routes.ts__tmpl__ +4 -0
  31. package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +3 -2
  32. package/src/generators/setup-mf/lib/add-cypress-workaround.js +10 -5
  33. package/src/generators/setup-mf/lib/add-cypress-workaround.js.map +1 -1
  34. package/src/generators/setup-mf/lib/add-remote-entry.d.ts +3 -0
  35. package/src/generators/setup-mf/lib/add-remote-entry.js +28 -0
  36. package/src/generators/setup-mf/lib/add-remote-entry.js.map +1 -0
  37. package/src/generators/setup-mf/lib/add-remote-to-host.js +26 -10
  38. package/src/generators/setup-mf/lib/add-remote-to-host.js.map +1 -1
  39. package/src/generators/setup-mf/lib/fix-bootstrap.js +24 -1
  40. package/src/generators/setup-mf/lib/fix-bootstrap.js.map +1 -1
  41. package/src/generators/setup-mf/lib/generate-config.js +1 -0
  42. package/src/generators/setup-mf/lib/generate-config.js.map +1 -1
  43. package/src/generators/setup-mf/lib/index.d.ts +1 -1
  44. package/src/generators/setup-mf/lib/index.js +1 -1
  45. package/src/generators/setup-mf/schema.d.ts +1 -0
  46. package/src/generators/setup-mf/schema.json +5 -0
  47. package/src/generators/setup-mf/setup-mf.js +1 -1
  48. package/src/generators/setup-mf/setup-mf.js.map +1 -1
  49. package/src/generators/web-worker/schema.json +1 -3
  50. package/src/migrations/update-14-6-0/update-angular-cli.d.ts +2 -0
  51. package/src/migrations/update-14-6-0/update-angular-cli.js +27 -0
  52. package/src/migrations/update-14-6-0/update-angular-cli.js.map +1 -0
  53. package/src/utils/versions.d.ts +3 -3
  54. package/src/utils/versions.js +3 -3
  55. package/src/generators/setup-mf/lib/add-entry-module.d.ts +0 -3
  56. package/src/generators/setup-mf/lib/add-entry-module.js +0 -23
  57. package/src/generators/setup-mf/lib/add-entry-module.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [14.6.0-beta.7](https://github.com/nrwl/nx/compare/14.5.7...14.6.0-beta.7) (2022-08-19)
6
+ # [14.6.0-rc.0](https://github.com/nrwl/nx/compare/14.5.7...14.6.0-rc.0) (2022-08-29)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/angular
@@ -370,9 +370,9 @@ export class DataPersistence {
370
370
  return this.actions.pipe(withLatestFrom(this.store), navigation(component, opts));
371
371
  }
372
372
  }
373
- DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
374
- DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence });
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, decorators: [{
373
+ DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
374
+ DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence });
375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, decorators: [{
376
376
  type: Injectable
377
377
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Actions }]; } });
378
378
  function findSnapshot(component, s) {
@@ -13,10 +13,10 @@ export class NxModule {
13
13
  return { ngModule: NxModule, providers: [DataPersistence] };
14
14
  }
15
15
  }
16
- NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
- NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
18
- NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, decorators: [{
16
+ NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
+ NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
18
+ NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, decorators: [{
20
20
  type: NgModule,
21
21
  args: [{}]
22
22
  }] });
@@ -371,9 +371,9 @@ class DataPersistence {
371
371
  return this.actions.pipe(withLatestFrom(this.store), navigation(component, opts));
372
372
  }
373
373
  }
374
- DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
375
- DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence });
376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, decorators: [{
374
+ DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
375
+ DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence });
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, decorators: [{
377
377
  type: Injectable
378
378
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Actions }]; } });
379
379
  function findSnapshot(component, s) {
@@ -412,10 +412,10 @@ class NxModule {
412
412
  return { ngModule: NxModule, providers: [DataPersistence] };
413
413
  }
414
414
  }
415
- NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
416
- NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
417
- NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, decorators: [{
415
+ NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
416
+ NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
417
+ NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, decorators: [{
419
419
  type: NgModule,
420
420
  args: [{}]
421
421
  }] });
@@ -371,9 +371,9 @@ class DataPersistence {
371
371
  return this.actions.pipe(withLatestFrom(this.store), navigation(component, opts));
372
372
  }
373
373
  }
374
- DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
375
- DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence });
376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DataPersistence, decorators: [{
374
+ DataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, deps: [{ token: i1.Store }, { token: i2.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
375
+ DataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence });
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DataPersistence, decorators: [{
377
377
  type: Injectable
378
378
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Actions }]; } });
379
379
  function findSnapshot(component, s) {
@@ -412,10 +412,10 @@ class NxModule {
412
412
  return { ngModule: NxModule, providers: [DataPersistence] };
413
413
  }
414
414
  }
415
- NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
416
- NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
417
- NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule });
418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NxModule, decorators: [{
415
+ NxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
416
+ NxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
417
+ NxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule });
418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NxModule, decorators: [{
419
419
  type: NgModule,
420
420
  args: [{}]
421
421
  }] });
package/migrations.json CHANGED
@@ -160,6 +160,12 @@
160
160
  "version": "14.5.2-beta.0",
161
161
  "description": "Update the @angular/cli package version to ~14.1.0.",
162
162
  "factory": "./src/migrations/update-14-5-2/update-angular-cli"
163
+ },
164
+ "update-angular-cli-version-14-2-0": {
165
+ "cli": "nx",
166
+ "version": "14.6.0-beta.0",
167
+ "description": "Update the @angular/cli package version to ~14.2.0.",
168
+ "factory": "./src/migrations/update-14-6-0/update-angular-cli"
163
169
  }
164
170
  },
165
171
  "packageJsonUpdates": {
@@ -1469,6 +1475,46 @@
1469
1475
  "jest-preset-angular": {
1470
1476
  "version": "~12.2.0",
1471
1477
  "alwaysAddToPackageJson": false
1478
+ },
1479
+ "@angular-devkit/architect": {
1480
+ "version": "~0.1402.0",
1481
+ "alwaysAddToPackageJson": false
1482
+ },
1483
+ "@angular-devkit/build-angular": {
1484
+ "version": "~14.2.0",
1485
+ "alwaysAddToPackageJson": false
1486
+ },
1487
+ "@angular-devkit/build-webpack": {
1488
+ "version": "~0.1402.0",
1489
+ "alwaysAddToPackageJson": false
1490
+ },
1491
+ "@angular-devkit/core": {
1492
+ "version": "~14.2.0",
1493
+ "alwaysAddToPackageJson": false
1494
+ },
1495
+ "@angular-devkit/schematics": {
1496
+ "version": "~14.2.0",
1497
+ "alwaysAddToPackageJson": false
1498
+ },
1499
+ "@schematics/angular": {
1500
+ "version": "~14.2.0",
1501
+ "alwaysAddToPackageJson": false
1502
+ },
1503
+ "@angular/core": {
1504
+ "version": "~14.2.0",
1505
+ "alwaysAddToPackageJson": true
1506
+ },
1507
+ "@angular/material": {
1508
+ "version": "~14.2.0",
1509
+ "alwaysAddToPackageJson": false
1510
+ },
1511
+ "@angular/cdk": {
1512
+ "version": "~14.2.0",
1513
+ "alwaysAddToPackageJson": false
1514
+ },
1515
+ "ng-packagr": {
1516
+ "version": "~14.2.0",
1517
+ "alwaysAddToPackageJson": false
1472
1518
  }
1473
1519
  }
1474
1520
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/angular",
3
- "version": "14.6.0-beta.7",
3
+ "version": "14.6.0-rc.0",
4
4
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,16 +64,16 @@
64
64
  "migrations": "./migrations.json"
65
65
  },
66
66
  "dependencies": {
67
- "@angular-devkit/schematics": "~14.1.1",
68
- "@nrwl/cypress": "14.6.0-beta.7",
69
- "@nrwl/devkit": "14.6.0-beta.7",
70
- "@nrwl/jest": "14.6.0-beta.7",
71
- "@nrwl/linter": "14.6.0-beta.7",
72
- "@nrwl/storybook": "14.6.0-beta.7",
73
- "@nrwl/web": "14.6.0-beta.7",
74
- "@nrwl/workspace": "14.6.0-beta.7",
67
+ "@angular-devkit/schematics": "~14.2.0",
68
+ "@nrwl/cypress": "14.6.0-rc.0",
69
+ "@nrwl/devkit": "14.6.0-rc.0",
70
+ "@nrwl/jest": "14.6.0-rc.0",
71
+ "@nrwl/linter": "14.6.0-rc.0",
72
+ "@nrwl/storybook": "14.6.0-rc.0",
73
+ "@nrwl/web": "14.6.0-rc.0",
74
+ "@nrwl/workspace": "14.6.0-rc.0",
75
75
  "@phenomnomnominal/tsquery": "4.1.1",
76
- "@schematics/angular": "~14.1.0",
76
+ "@schematics/angular": "~14.2.0",
77
77
  "chalk": "4.1.0",
78
78
  "chokidar": "^3.5.1",
79
79
  "http-server": "^14.1.0",
@@ -95,5 +95,5 @@
95
95
  "fesm2015": "fesm2015/nrwl-angular.mjs",
96
96
  "typings": "index.d.ts",
97
97
  "sideEffects": false,
98
- "gitHead": "c0dd2f58324ddc21383a76805f1b6fd19d2f4a3e"
98
+ "gitHead": "a3126116826b4bc8d492341e2b2b02daa4b2195e"
99
99
  }
@@ -11,11 +11,14 @@
11
11
  },
12
12
  "outputPath": {
13
13
  "type": "string",
14
- "description": "The full path for the output directory, relative to the workspace root."
14
+ "description": "The full path for the output directory, relative to the workspace root.",
15
+ "x-completion-type": "directory"
15
16
  },
16
17
  "tsConfig": {
17
18
  "type": "string",
18
- "description": "The full path for the TypeScript configuration file, relative to the workspace root."
19
+ "description": "The full path for the TypeScript configuration file, relative to the workspace root.",
20
+ "x-completion-type": "file",
21
+ "x-completion-glob": "tsconfig.*.json"
19
22
  },
20
23
  "watch": {
21
24
  "type": "boolean",
@@ -25,7 +25,9 @@
25
25
  },
26
26
  "tsConfig": {
27
27
  "type": "string",
28
- "description": "The full path for the TypeScript configuration file, relative to the workspace root."
28
+ "description": "The full path for the TypeScript configuration file, relative to the workspace root.",
29
+ "x-completion-type": "file",
30
+ "x-completion-glob": "tsconfig.*.json"
29
31
  },
30
32
  "watch": {
31
33
  "type": "boolean",
@@ -25,7 +25,9 @@
25
25
  },
26
26
  "tsConfig": {
27
27
  "type": "string",
28
- "description": "The full path for the TypeScript configuration file, relative to the workspace root."
28
+ "description": "The full path for the TypeScript configuration file, relative to the workspace root.",
29
+ "x-completion-type": "file",
30
+ "x-completion-glob": "tsconfig.*.json"
29
31
  },
30
32
  "watch": {
31
33
  "type": "boolean",
@@ -45,7 +47,9 @@
45
47
  },
46
48
  "tailwindConfig": {
47
49
  "type": "string",
48
- "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured."
50
+ "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured.",
51
+ "x-completion-type": "file",
52
+ "x-completion-glob": "tailwind.config.js"
49
53
  }
50
54
  },
51
55
  "additionalProperties": false,
@@ -82,12 +82,12 @@ function applicationGenerator(host, schema) {
82
82
  all: false,
83
83
  });
84
84
  }
85
- if (options.mf) {
86
- yield (0, lib_1.addMf)(host, options);
87
- }
88
85
  if (options.standalone) {
89
86
  (0, lib_1.convertToStandaloneApp)(host, options);
90
87
  }
88
+ if (options.mf) {
89
+ yield (0, lib_1.addMf)(host, options);
90
+ }
91
91
  if (!options.skipFormat) {
92
92
  yield (0, devkit_1.formatFiles)(host);
93
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,8DAAwE;AACxE,2DAAyE;AACzE,2DAA0D;AAC1D,uCAAoD;AACpD,qEAA0E;AAC1E,+BAkBe;AAGf,SAAsB,oBAAoB,CACxC,IAAU,EACV,MAAuB;;QAEvB,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,IAAA,2BAAoB,EAAC,IAAI,kCAC1B,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QAEH,MAAM,mBAAmB,GAAG,IAAA,0CAA0B,EACpD,qBAAqB,EACrB,aAAa,CACd,CAAC;QACF,MAAM,mBAAmB,CAAC,IAAI,EAAE;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,OAAO,EAAE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AAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AApHD,oDAoHC;AAED,kBAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,8DAAwE;AACxE,2DAAyE;AACzE,2DAA0D;AAC1D,uCAAoD;AACpD,qEAA0E;AAC1E,+BAkBe;AAGf,SAAsB,oBAAoB,CACxC,IAAU,EACV,MAAuB;;QAEvB,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,IAAA,2BAAoB,EAAC,IAAI,kCAC1B,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QAEH,MAAM,mBAAmB,GAAG,IAAA,0CAA0B,EACpD,qBAAqB,EACrB,aAAa,CACd,CAAC;QACF,MAAM,mBAAmB,CAAC,IAAI,EAAE;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,IAAI;YACjB,eAAe,EAAE,OAAO,CAAC,eAAe;SACzC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,qBAAqB,KAAK,OAAO,CAAC,cAAc,EAAE;YAC5D,IAAA,gCAAuB,EACrB,IAAI,EACJ,OAAO,CAAC,qBAAqB,EAC7B,OAAO,CAAC,cAAc,CACvB,CAAC;SACH;QAED,IAAA,iBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,IAAA,uBAAiB,EAAC,IAAI,EAAE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AC;QAEpC,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;YAC/B,IAAA,uBAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAClC;QAED,IAAI,OAAO,CAAC,cAAc,EAAE;YAC1B,IAAA,oBAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC/B;QAED,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,IAAA,8BAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACzC;aAAM;YACL,IAAA,iCAA2B,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1C;QAED,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC5B,MAAM,IAAA,wCAA2B,EAAC,IAAI,EAAE;gBACtC,OAAO,EAAE,OAAO,CAAC,IAAI;gBACrB,GAAG,EAAE,KAAK;aACX,CAAC,CAAC;SACJ;QAED,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAA,4BAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACvC;QAED,IAAI,OAAO,CAAC,EAAE,EAAE;YACd,MAAM,IAAA,WAAK,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC5B;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AApHD,oDAoHC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -23,14 +23,29 @@ export interface Schema {
23
23
  backendProject?: string;
24
24
  strict?: boolean;
25
25
  standaloneConfig?: boolean;
26
+ /**
27
+ * @deprecated Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version.
28
+ */
26
29
  mf?: boolean;
30
+ /**
31
+ * @deprecated Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version.
32
+ */
27
33
  mfType?: 'host' | 'remote';
34
+ /**
35
+ * @deprecated Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version.
36
+ */
28
37
  remotes?: string[];
29
38
  port?: number;
39
+ /**
40
+ * @deprecated Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version.
41
+ */
30
42
  host?: string;
31
43
  setParserOptionsProject?: boolean;
32
44
  skipPackageJson?: boolean;
33
45
  skipPostInstall?: boolean;
46
+ /**
47
+ * @deprecated Use the `host` or `remote` generators instead. Support for generating Module Federation applications using the application generator will be removed in an upcoming version.
48
+ */
34
49
  federationType?: 'static' | 'dynamic';
35
50
  skipDefaultProject?: boolean;
36
51
  standalone?: boolean;
@@ -16,9 +16,7 @@
16
16
  "project": {
17
17
  "type": "string",
18
18
  "description": "The name of the project.",
19
- "$default": {
20
- "$source": "projectName"
21
- }
19
+ "x-dropdown": "projects"
22
20
  },
23
21
  "name": {
24
22
  "type": "string",
@@ -7,6 +7,8 @@ const remote_1 = require("../remote/remote");
7
7
  const project_1 = require("../utils/project");
8
8
  const ts = require("typescript");
9
9
  const ast_utils_1 = require("../../utils/nx-devkit/ast-utils");
10
+ const standalone_utils_1 = require("../../utils/nx-devkit/standalone-utils");
11
+ const setup_mf_1 = require("../setup-mf/setup-mf");
10
12
  function host(tree, options) {
11
13
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
14
  const projects = (0, devkit_1.getProjects)(tree);
@@ -22,9 +24,21 @@ function host(tree, options) {
22
24
  }
23
25
  });
24
26
  }
25
- const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mf: true, mfType: 'host', routing: true, remotes: remotesToIntegrate !== null && remotesToIntegrate !== void 0 ? remotesToIntegrate : [], port: 4200, federationType: options.dynamic ? 'dynamic' : 'static', skipFormat: true }));
27
+ const appName = (0, project_1.normalizeProjectName)(options.name, options.directory);
28
+ const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { routing: true, port: 4200, skipFormat: true }));
29
+ yield (0, setup_mf_1.setupMf)(tree, {
30
+ appName,
31
+ mfType: 'host',
32
+ routing: true,
33
+ port: 4200,
34
+ remotes: remotesToIntegrate !== null && remotesToIntegrate !== void 0 ? remotesToIntegrate : [],
35
+ federationType: options.dynamic ? 'dynamic' : 'static',
36
+ skipPackageJson: options.skipPackageJson,
37
+ skipFormat: true,
38
+ e2eProjectName: `${appName}-e2e`,
39
+ });
26
40
  for (const remote of remotesToGenerate) {
27
- yield (0, remote_1.default)(tree, Object.assign(Object.assign({}, options), { name: remote, host: (0, project_1.normalizeProjectName)(options.name, options.directory), skipFormat: true }));
41
+ yield (0, remote_1.default)(tree, Object.assign(Object.assign({}, options), { name: remote, host: appName, skipFormat: true, standalone: options.standalone }));
28
42
  }
29
43
  routeToNxWelcome(tree, options);
30
44
  if (!options.skipFormat) {
@@ -45,15 +59,25 @@ ${remoteRoutes}
45
59
  </ul>
46
60
  <router-outlet></router-outlet>
47
61
  `);
48
- const pathToHostAppModule = (0, devkit_1.joinPathFragments)(sourceRoot, 'app/app.module.ts');
49
- const hostAppModule = tree.read(pathToHostAppModule, 'utf-8');
50
- if (!hostAppModule.includes('RouterModule.forRoot(')) {
62
+ const pathToHostRootRoutingFile = (0, devkit_1.joinPathFragments)(sourceRoot, options.standalone ? 'bootstrap.ts' : 'app/app.module.ts');
63
+ const hostRootRoutingFile = tree.read(pathToHostRootRoutingFile, 'utf-8');
64
+ if (!hostRootRoutingFile.includes('RouterModule.forRoot(')) {
51
65
  return;
52
66
  }
53
- let sourceFile = ts.createSourceFile(pathToHostAppModule, hostAppModule, ts.ScriptTarget.Latest, true);
54
- sourceFile = (0, ast_utils_1.addRoute)(tree, pathToHostAppModule, sourceFile, `{
67
+ let sourceFile = ts.createSourceFile(pathToHostRootRoutingFile, hostRootRoutingFile, ts.ScriptTarget.Latest, true);
68
+ if (hostRootRoutingFile.includes('@NgModule')) {
69
+ sourceFile = (0, ast_utils_1.addRoute)(tree, pathToHostRootRoutingFile, sourceFile, `{
55
70
  path: '',
56
71
  component: NxWelcomeComponent
57
72
  }`);
73
+ }
74
+ else {
75
+ (0, standalone_utils_1.addStandaloneRoute)(tree, pathToHostRootRoutingFile, `{
76
+ path: '',
77
+ component: NxWelcomeComponent
78
+ }`);
79
+ tree.write(pathToHostRootRoutingFile, `import { NxWelcomeComponent } from './app/nx-welcome.component';
80
+ ${tree.read(pathToHostRootRoutingFile, 'utf-8')}`);
81
+ }
58
82
  }
59
83
  //# sourceMappingURL=host.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/host/host.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAEtB,4DAA8D;AAC9D,6CAA+C;AAC/C,8CAAwD;AACxD,iCAAiC;AACjC,+DAA2D;AAE3D,SAA8B,IAAI,CAAC,IAAU,EAAE,OAAe;;QAC5D,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,MAAM,kBAAkB,GAAa,EAAE,CAAC;QAExC,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACjD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;oBACzB,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBAChC;qBAAM;oBACL,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACjC;YACH,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,kCAC9C,OAAO,KACV,EAAE,EAAE,IAAI,EACR,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,I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C;IAET,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,UAAU,EAAE,wBAAwB,CAAC,EACvD;;EAEF,YAAY;;;CAGb,CACE,CAAC;IAEF,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,UAAU,EACV,mBAAmB,CACpB,CAAC;IACF,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAE9D,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE;QACpD,OAAO;KACR;IAED,IAAI,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAClC,mBAAmB,EACnB,aAAa,EACb,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IAEF,UAAU,GAAG,IAAA,oBAAQ,EACnB,IAAI,EACJ,mBAAmB,EACnB,UAAU,EACV;;;OAGG,CACJ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/host/host.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAEtB,4DAA8D;AAC9D,6CAA+C;AAC/C,8CAAwD;AACxD,iCAAiC;AACjC,+DAA2D;AAC3D,6EAA4E;AAC5E,mDAA+C;AAE/C,SAA8B,IAAI,CAAC,IAAU,EAAE,OAAe;;QAC5D,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,MAAM,kBAAkB,GAAa,EAAE,CAAC;QAExC,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACjD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;oBACzB,iBAAiB,CAAC,IAAI,CAAC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AM;QACL,IAAA,qCAAkB,EAChB,IAAI,EACJ,yBAAyB,EACzB;;;MAGA,CACD,CAAC;QAEF,IAAI,CAAC,KAAK,CACR,yBAAyB,EACzB;MACA,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC,EAAE,CAChD,CAAC;KACH;AACH,CAAC"}
@@ -27,4 +27,5 @@ export interface Schema {
27
27
  inlineTemplate?: boolean;
28
28
  viewEncapsulation?: 'Emulated' | 'Native' | 'None';
29
29
  skipFormat?: boolean;
30
+ standalone?: boolean;
30
31
  }
@@ -149,6 +149,11 @@
149
149
  "description": "Skip formatting files.",
150
150
  "type": "boolean",
151
151
  "default": false
152
+ },
153
+ "standalone": {
154
+ "type": "boolean",
155
+ "description": "Whether to generate a host application that uses standalone components.",
156
+ "default": false
152
157
  }
153
158
  },
154
159
  "additionalProperties": false,
@@ -9,9 +9,7 @@
9
9
  "project": {
10
10
  "type": "string",
11
11
  "description": "The name of the project.",
12
- "$default": {
13
- "$source": "projectName"
14
- }
12
+ "x-dropdown": "projects"
15
13
  },
16
14
  "skipFormat": {
17
15
  "description": "Skip formatting files.",
@@ -21,9 +21,7 @@
21
21
  "description": "The name of the library to create the secondary entry point for.",
22
22
  "x-prompt": "What library would you like to create the secondary entry point for?",
23
23
  "pattern": "^[a-zA-Z].*$",
24
- "$default": {
25
- "$source": "projectName"
26
- }
24
+ "x-dropdown": "projects"
27
25
  },
28
26
  "skipModule": {
29
27
  "type": "boolean",
@@ -5,6 +5,7 @@ const devkit_1 = require("@nrwl/devkit");
5
5
  const application_1 = require("../application/application");
6
6
  const get_mf_projects_1 = require("../../utils/get-mf-projects");
7
7
  const project_1 = require("../utils/project");
8
+ const setup_mf_1 = require("../setup-mf/setup-mf");
8
9
  function findNextAvailablePort(tree) {
9
10
  var _a, _b, _c;
10
11
  const mfProjects = (0, get_mf_projects_1.getMFProjects)(tree);
@@ -24,8 +25,24 @@ function remote(tree, options) {
24
25
  if (options.host && !projects.has(options.host)) {
25
26
  throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
26
27
  }
27
- const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mf: true, mfType: 'remote', routing: true, host: options.host, port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree), skipDefaultProject: true }));
28
+ const appName = (0, project_1.normalizeProjectName)(options.name, options.directory);
29
+ const port = (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree);
30
+ const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { routing: true, skipDefaultProject: true, port }));
31
+ yield (0, setup_mf_1.setupMf)(tree, {
32
+ appName,
33
+ mfType: 'remote',
34
+ routing: true,
35
+ host: options.host,
36
+ port,
37
+ skipPackageJson: options.skipPackageJson,
38
+ skipFormat: true,
39
+ e2eProjectName: `${appName}-e2e`,
40
+ standalone: options.standalone,
41
+ });
28
42
  removeDeadCode(tree, options);
43
+ if (!options.skipFormat) {
44
+ yield (0, devkit_1.formatFiles)(tree);
45
+ }
29
46
  return installTask;
30
47
  });
31
48
  }
@@ -42,13 +59,14 @@ function removeDeadCode(tree, options) {
42
59
  tree.rename((0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/nx-welcome.component.ts'), (0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/remote-entry/nx-welcome.component.ts'));
43
60
  tree.delete((0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.component.spec.ts'));
44
61
  tree.delete((0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.component.html'));
45
- const pathToComponent = (0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.component.ts');
46
- const component = tree.read(pathToComponent, 'utf-8').split('templateUrl')[0] +
47
- `template: '<router-outlet></router-outlet>'
62
+ const pathToAppComponent = (0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.component.ts');
63
+ if (!options.standalone) {
64
+ const component = tree.read(pathToAppComponent, 'utf-8').split('templateUrl')[0] +
65
+ `template: '<router-outlet></router-outlet>'
48
66
  })
49
67
  export class AppComponent {}`;
50
- tree.write(pathToComponent, component);
51
- tree.write((0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.module.ts'), `import { NgModule } from '@angular/core';
68
+ tree.write(pathToAppComponent, component);
69
+ tree.write((0, devkit_1.joinPathFragments)(project.sourceRoot, 'app/app.module.ts'), `import { NgModule } from '@angular/core';
52
70
  import { BrowserModule } from '@angular/platform-browser';
53
71
  import { RouterModule } from '@angular/router';
54
72
  import { AppComponent } from './app.component';
@@ -66,5 +84,9 @@ import { AppComponent } from './app.component';
66
84
  bootstrap: [AppComponent],
67
85
  })
68
86
  export class AppModule {}`);
87
+ }
88
+ else {
89
+ tree.delete(pathToAppComponent);
90
+ }
69
91
  }
70
92
  //# sourceMappingURL=remote.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB,4DAA8D;AAC9D,iEAA4D;AAC5D,8CAAwD;AAExD,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,UAAU,GAAG,IAAA,+BAAa,EAAC,IAAI,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,MAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,OAAO,0CAAE,IAAI,mCAAI,IAAI,CAAC;QACnD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACjB;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IA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C,CAAC;SACnC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,6BAA6B,CAAC,EACpE,IAAA,0BAAiB,EACf,OAAO,CAAC,UAAU,EAClB,0CAA0C,CAC3C,CACF,CAAC;IACF,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,2BAA2B,CAAC,CACnE,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAE7E,MAAM,eAAe,GAAG,IAAA,0BAAiB,EACvC,OAAO,CAAC,UAAU,EAClB,sBAAsB,CACvB,CAAC;IACF,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3D;;6BAEyB,CAAC;IAE5B,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAEvC,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAC1D;;;;;;;;;;;;;;;;;0BAiBsB,CACvB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AAEtB,4DAA8D;AAC9D,iEAA4D;AAC5D,8CAAwD;AACxD,mDAA+C;AAE/C,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,UAAU,GAAG,IAAA,+BAAa,EAAC,IAAI,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,EA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,OAAO,CAAC,UAAU,EAClB,sBAAsB,CACvB,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;QACvB,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC9D;;6BAEuB,CAAC;QAE1B,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAE1C,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAC1D;;;;;;;;;;;;;;;;;0BAiBoB,CACrB,CAAC;KACH;SAAM;QACL,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;KACjC;AACH,CAAC"}
@@ -26,4 +26,5 @@ export interface Schema {
26
26
  inlineTemplate?: boolean;
27
27
  viewEncapsulation?: 'Emulated' | 'Native' | 'None';
28
28
  skipFormat?: boolean;
29
+ standalone?: boolean;
29
30
  }
@@ -23,9 +23,7 @@
23
23
  "host": {
24
24
  "type": "string",
25
25
  "description": "The name of the host app to attach this remote app to.",
26
- "$default": {
27
- "$source": "projectName"
28
- }
26
+ "x-dropdown": "projects"
29
27
  },
30
28
  "port": {
31
29
  "type": "number",
@@ -146,6 +144,11 @@
146
144
  "description": "Skip formatting files.",
147
145
  "type": "boolean",
148
146
  "default": false
147
+ },
148
+ "standalone": {
149
+ "description": "Whether to generate a remote application with standalone components.",
150
+ "type": "boolean",
151
+ "default": false
149
152
  }
150
153
  },
151
154
  "additionalProperties": false,
@@ -16,9 +16,7 @@
16
16
  "project": {
17
17
  "type": "string",
18
18
  "description": "The name of the project.",
19
- "$default": {
20
- "$source": "projectName"
21
- }
19
+ "x-dropdown": "projects"
22
20
  },
23
21
  "name": {
24
22
  "type": "string",
@@ -16,9 +16,7 @@
16
16
  "project": {
17
17
  "type": "string",
18
18
  "description": "The name of the project.",
19
- "$default": {
20
- "$source": "projectName"
21
- }
19
+ "x-dropdown": "projects"
22
20
  },
23
21
  "name": {
24
22
  "type": "string",
@@ -16,9 +16,7 @@
16
16
  "project": {
17
17
  "type": "string",
18
18
  "description": "The name of the project.",
19
- "$default": {
20
- "$source": "projectName"
21
- }
19
+ "x-dropdown": "projects"
22
20
  },
23
21
  "name": {
24
22
  "type": "string",
@@ -4,6 +4,6 @@ import { Component } from '@angular/core';
4
4
  selector: '<%= prefix %>-<%= appName %>-entry',
5
5
  template: `<<%= prefix %>-nx-welcome></<%= prefix %>-nx-welcome>`<% } else { %>
6
6
  selector: '<%= appName %>-entry',
7
- template: `nx-welcome></nx-welcome>`<% } %>
7
+ template: `<nx-welcome></nx-welcome>`<% } %>
8
8
  })
9
9
  export class RemoteEntryComponent {}
@@ -0,0 +1,13 @@
1
+ import { Component } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { NxWelcomeComponent } from './nx-welcome.component';
4
+
5
+ @Component({
6
+ standalone: true,
7
+ imports: [CommonModule, NxWelcomeComponent],<% if (prefix) { %>
8
+ selector: '<%= prefix %>-<%= appName %>-entry',
9
+ template: `<<%= prefix %>-nx-welcome></<%= prefix %>-nx-welcome>`<% } else { %>
10
+ selector: '<%= appName %>-entry',
11
+ template: `<nx-welcome></nx-welcome>`<% } %>
12
+ })
13
+ export class RemoteEntryComponent {}
@@ -0,0 +1,4 @@
1
+ import { Route } from '@angular/router';
2
+ import { RemoteEntryComponent } from './entry.component';
3
+
4
+ export const RemoteRoutes: Route[] = [{path: '', component: RemoteEntryComponent}]
@@ -1,7 +1,8 @@
1
1
  module.exports = {
2
2
  name: '<%= name %>',<% if(type === 'host') { %>
3
3
  remotes: [<% remotes.forEach(function(remote) { %>'<%= remote.remoteName %>',<% }); %>]<% } %><% if(type === 'remote') { %>
4
- exposes: {
5
- './Module': '<%= projectRoot %>/src/app/remote-entry/entry.module.ts',
4
+ exposes: {<% if(standalone) { %>
5
+ './Routes': '<%= projectRoot %>/src/app/remote-entry/routes.ts',<% } else { %>
6
+ './Module': '<%= projectRoot %>/src/app/remote-entry/entry.module.ts',<% } %>
6
7
  },<% } %>
7
8
  }
@@ -6,15 +6,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.addCypressOnErrorWorkaround = void 0;
7
7
  const devkit_1 = require("@nrwl/devkit");
8
8
  function addCypressOnErrorWorkaround(tree, schema) {
9
- var _a;
10
- const e2eProjectName = (_a = schema.e2eProjectName) !== null && _a !== void 0 ? _a : `${schema.appName}-e2e`;
9
+ if (!schema.e2eProjectName) {
10
+ return;
11
+ }
12
+ const e2eProjectName = schema.e2eProjectName;
11
13
  let e2eProject;
12
14
  try {
13
15
  e2eProject = (0, devkit_1.readProjectConfiguration)(tree, e2eProjectName);
14
16
  }
15
- catch (_b) {
16
- devkit_1.logger.warn(`Could not find an associated e2e project for ${schema.appName} with name ${e2eProjectName}.
17
- If the app does have an associated Cypress e2e project, you can pass the name of it to the generator using --e2eProjectName.`);
17
+ catch (_a) {
18
+ devkit_1.logger.warn(`Could not find an associated e2e project for ${schema.appName} with name ${e2eProjectName}.
19
+ If there is an associated e2e project for this application, and it uses Cypress, you will need to add a workaround to allow Cypress to test correctly.
20
+ An error will be thrown in the console when you serve the application, coming from styles.js. It is an error that can be safely ignored and will not reach production due to how production builds of Angular are created.
21
+ You can find how to implement that workaround here: https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions
22
+ `);
18
23
  return;
19
24
  }
20
25
  if (e2eProject.targets.e2e.executor !== '@nrwl/cypress:cypress') {
@@ -1 +1 @@
1
- {"version":3,"file":"add-cypress-workaround.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,iEAAiE;AACjE,iDAAiD;;;AAKjD,yCAIsB;AAEtB,SAAgB,2BAA2B,CAAC,IAAU,EAAE,MAAc;;IACpE,MAAM,cAAc,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC;IACxE,IAAI,UAAgC,CAAC;IAErC,IAAI;QACF,UAAU,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;KAC7D;IAAC,WAAM;QACN,eAAM,CAAC,IAAI,CAAC,gDAAgD,MAAM,CAAC,OAAO,cAAc,cAAc;iIACuB,CAAC,CAAC;QAC/H,OAAO;KACR;IAED,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,uBAAuB,EAAE;QAC/D,kCAAkC;QAClC,OAAO;KACR;IAED,MAAM,YAAY,GAAG;;;;;MAKjB,CAAC;IAEL,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,UAAU,CAAC,UAAU,EACrB,kBAAkB,CACnB,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,eAAe,KAAK,YAAY,EAAE,CAAC,CAAC;AACxE,CAAC;AAjCD,kEAiCC"}
1
+ {"version":3,"file":"add-cypress-workaround.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,iEAAiE;AACjE,iDAAiD;;;AAGjD,yCAIsB;AAGtB,SAAgB,2BAA2B,CAAC,IAAU,EAAE,MAAc;IACpE,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;QAC1B,OAAO;KACR;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC7C,IAAI,UAAgC,CAAC;IAErC,IAAI;QACF,UAAU,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;KAC7D;IAAC,WAAM;QACN,eAAM,CAAC,IAAI,CAAC,gDAAgD,MAAM,CAAC,OAAO,cAAc,cAAc;;;;KAIrG,CAAC,CAAC;QACH,OAAO;KACR;IAED,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,uBAAuB,EAAE;QAC/D,kCAAkC;QAClC,OAAO;KACR;IAED,MAAM,YAAY,GAAG;;;;;MAKjB,CAAC;IAEL,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,UAAU,CAAC,UAAU,EACrB,kBAAkB,CACnB,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,eAAe,KAAK,YAAY,EAAE,CAAC,CAAC;AACxE,CAAC;AAxCD,kEAwCC"}
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nrwl/devkit';
2
+ import type { Schema } from '../schema';
3
+ export declare function addRemoteEntry(tree: Tree, { appName, routing, mfType, prefix, standalone }: Schema, appRoot: string): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addRemoteEntry = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ function addRemoteEntry(tree, { appName, routing, mfType, prefix, standalone }, appRoot) {
6
+ if (mfType === 'remote') {
7
+ prefix = prefix !== null && prefix !== void 0 ? prefix : (0, devkit_1.readWorkspaceConfiguration)(tree).npmScope;
8
+ (0, devkit_1.generateFiles)(tree, standalone
9
+ ? (0, devkit_1.joinPathFragments)(__dirname, '../files/standalone-entry-component-files')
10
+ : (0, devkit_1.joinPathFragments)(__dirname, '../files/entry-module-files'), `${appRoot}/src/app/remote-entry`, {
11
+ tmpl: '',
12
+ appName,
13
+ routing,
14
+ prefix,
15
+ });
16
+ if (!standalone) {
17
+ tree.write(`${appRoot}/src/app/app.module.ts`, `/*
18
+ * This RemoteEntryModule is imported here to allow TS to find the Module during
19
+ * compilation, allowing it to be included in the built bundle. This is required
20
+ * for the Module Federation Plugin to expose the Module correctly.
21
+ * */
22
+ import { RemoteEntryModule } from './remote-entry/entry.module';
23
+ ${tree.read(`${appRoot}/src/app/app.module.ts`, 'utf-8')}`);
24
+ }
25
+ }
26
+ }
27
+ exports.addRemoteEntry = addRemoteEntry;
28
+ //# sourceMappingURL=add-remote-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-remote-entry.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-remote-entry.ts"],"names":[],"mappings":";;;AACA,yCAIsB;AAGtB,SAAgB,cAAc,CAC5B,IAAU,EACV,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAU,EACxD,OAAe;IAEf,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;QAC7D,IAAA,sBAAa,EACX,IAAI,EACJ,UAAU;YACR,CAAC,CAAC,IAAA,0BAAiB,EACf,SAAS,EACT,2CAA2C,CAC5C;YACH,CAAC,CAAC,IAAA,0BAAiB,EAAC,SAAS,EAAE,6BAA6B,CAAC,EAC/D,GAAG,OAAO,uBAAuB,EACjC;YACE,IAAI,EAAE,EAAE;YACR,OAAO;YACP,OAAO;YACP,MAAM;SACP,CACF,CAAC;QAEF,IAAI,CAAC,UAAU,EAAE;YACf,IAAI,CAAC,KAAK,CACR,GAAG,OAAO,wBAAwB,EAClC;;;;;;EAMN,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,wBAAwB,EAAE,OAAO,CAAC,EAAE,CACnD,CAAC;SACH;KACF;AACH,CAAC;AArCD,wCAqCC"}
@@ -6,6 +6,7 @@ const tsquery_1 = require("@phenomnomnominal/tsquery");
6
6
  const ts = require("typescript");
7
7
  const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
8
8
  const ast_utils_2 = require("@nrwl/workspace/src/utilities/ast-utils");
9
+ const standalone_utils_1 = require("../../../utils/nx-devkit/standalone-utils");
9
10
  function checkIsCommaNeeded(mfRemoteText) {
10
11
  const remoteText = mfRemoteText.replace(/\s+/g, '');
11
12
  return !remoteText.endsWith(',]')
@@ -29,7 +30,8 @@ function addRemoteToHost(tree, options) {
29
30
  const declarationFilePath = (0, devkit_1.joinPathFragments)(hostProject.sourceRoot, 'remotes.d.ts');
30
31
  const declarationFileContent = (tree.exists(declarationFilePath)
31
32
  ? tree.read(declarationFilePath, 'utf-8')
32
- : '') + `\ndeclare module '${options.appName}/Module';`;
33
+ : '') +
34
+ `\ndeclare module '${options.appName}/${options.standalone ? `Routes` : `Module`}';`;
33
35
  tree.write(declarationFilePath, declarationFileContent);
34
36
  addLazyLoadedRouteToHostAppModule(tree, options, hostFederationType);
35
37
  }
@@ -59,25 +61,39 @@ function addRemoteToDynamicHost(tree, options, pathToMfManifest) {
59
61
  // TODO(colum): future work: allow dev to pass to path to routing module
60
62
  function addLazyLoadedRouteToHostAppModule(tree, options, hostFederationType) {
61
63
  const hostAppConfig = (0, devkit_1.readProjectConfiguration)(tree, options.host);
62
- const pathToHostAppModule = `${hostAppConfig.sourceRoot}/app/app.module.ts`;
63
- if (!tree.exists(pathToHostAppModule)) {
64
+ const isHostStandalone = !tree
65
+ .read((0, devkit_1.joinPathFragments)(hostAppConfig.sourceRoot, 'bootstrap.ts'), 'utf-8')
66
+ .includes('bootstrapModule');
67
+ const pathToHostRootRouting = isHostStandalone
68
+ ? `${hostAppConfig.sourceRoot}/bootstrap.ts`
69
+ : `${hostAppConfig.sourceRoot}/app/app.module.ts`;
70
+ if (!tree.exists(pathToHostRootRouting)) {
64
71
  return;
65
72
  }
66
- const hostAppModule = tree.read(pathToHostAppModule, 'utf-8');
67
- if (!hostAppModule.includes('RouterModule.forRoot(')) {
73
+ const hostRootRoutingFile = tree.read(pathToHostRootRouting, 'utf-8');
74
+ if (!hostRootRoutingFile.includes('RouterModule.forRoot(')) {
68
75
  return;
69
76
  }
70
- let sourceFile = ts.createSourceFile(pathToHostAppModule, hostAppModule, ts.ScriptTarget.Latest, true);
77
+ let sourceFile = ts.createSourceFile(pathToHostRootRouting, hostRootRoutingFile, ts.ScriptTarget.Latest, true);
71
78
  if (hostFederationType === 'dynamic') {
72
- sourceFile = (0, ast_utils_2.insertImport)(tree, sourceFile, pathToHostAppModule, 'loadRemoteModule', '@nrwl/angular/mf');
79
+ sourceFile = (0, ast_utils_2.insertImport)(tree, sourceFile, pathToHostRootRouting, 'loadRemoteModule', '@nrwl/angular/mf');
73
80
  }
81
+ const routePathName = options.standalone ? 'Routes' : 'Module';
74
82
  const routeToAdd = hostFederationType === 'dynamic'
75
- ? `loadRemoteModule('${options.appName}', './Module')`
76
- : `import('${options.appName}/Module')`;
77
- sourceFile = (0, ast_utils_1.addRoute)(tree, pathToHostAppModule, sourceFile, `{
83
+ ? `loadRemoteModule('${options.appName}', './${routePathName}')`
84
+ : `import('${options.appName}/${routePathName}')`;
85
+ if (hostRootRoutingFile.includes('@NgModule')) {
86
+ sourceFile = (0, ast_utils_1.addRoute)(tree, pathToHostRootRouting, sourceFile, `{
78
87
  path: '${options.appName}',
79
88
  loadChildren: () => ${routeToAdd}.then(m => m.RemoteEntryModule)
80
89
  }`);
90
+ }
91
+ else {
92
+ (0, standalone_utils_1.addStandaloneRoute)(tree, pathToHostRootRouting, `{
93
+ path: '${options.appName}',
94
+ loadChildren: () => ${routeToAdd}.then(m => m.RemoteRoutes)
95
+ }`);
96
+ }
81
97
  const pathToAppComponentTemplate = (0, devkit_1.joinPathFragments)(hostAppConfig.sourceRoot, 'app/app.component.html');
82
98
  const appComponent = tree.read(pathToAppComponentTemplate, 'utf-8');
83
99
  if (appComponent.includes(`<ul class="remote-menu">`) &&
@@ -1 +1 @@
1
- {"version":3,"file":"add-remote-to-host.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-remote-to-host.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAEtB,uDAAoD;AACpD,iCAAiC;AAEjC,kEAA8D;AAC9D,uEAAuE;AAEvE,SAAgB,kBAAkB,CAAC,YAAoB;IACrD,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,UAAU,KAAK,IAAI;YACnB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI;QACR,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC;AAPD,gDAOC;AAED,SAAgB,eAAe,CAAC,IAAU,EAAE,OAAe;IACzD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE;QAC/C,MAAM,WAAW,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,gBAAgB,GAAG,IAAA,0BAAiB,EACxC,WAAW,CAAC,UAAU,EACtB,wCAAwC,CACzC,CAAC;QACF,MAAM,kBAAkB,GAAG,2BAA2B,CACpD,IAAI,EACJ,gBAAgB,CACjB,CAAC;QAEF,IAAI,kBAAkB,KAAK,QAAQ,EAAE;YACnC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;SACnD;aAAM,IAAI,kBAAkB,KAAK,SAAS,EAAE;YAC3C,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;SACzD;QAED,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,WAAW,CAAC,UAAU,EACtB,cAAc,CACf,CAAC;QAEF,MAAM,sBA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E;QACpC,UAAU,GAAG,IAAA,wBAAY,EACvB,IAAI,EACJ,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,CACnB,CAAC;KACH;IACD,MAAM,UAAU,GACd,kBAAkB,KAAK,SAAS;QAC9B,CAAC,CAAC,qBAAqB,OAAO,CAAC,OAAO,gBAAgB;QACtD,CAAC,CAAC,WAAW,OAAO,CAAC,OAAO,WAAW,CAAC;IAE5C,UAAU,GAAG,IAAA,oBAAQ,EACnB,IAAI,EACJ,mBAAmB,EACnB,UAAU,EACV;kBACc,OAAO,CAAC,OAAO;+BACF,UAAU;OAClC,CACJ,CAAC;IACF,MAAM,0BAA0B,GAAG,IAAA,0BAAiB,EAClD,aAAa,CAAC,UAAU,EACxB,wBAAwB,CACzB,CAAC;IACF,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACpE,IACE,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QACjD,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,EAC9B;QACA,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5D,MAAM,eAAe,GAAG,GAAG,YAAY,CAAC,KAAK,CAC3C,CAAC,EACD,qBAAqB,CACtB,sBAAsB,OAAO,CAAC,OAAO,KACpC,IAAA,cAAK,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,SACzB,cAAc,YAAY,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;KACzD;AACH,CAAC"}
1
+ {"version":3,"file":"add-remote-to-host.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-remote-to-host.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAEtB,uDAAoD;AACpD,iCAAiC;AAEjC,kEAA8D;AAC9D,uEAAuE;AAC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,OAAO,CAAC,OAAO,KACpC,IAAA,cAAK,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,SACzB,cAAc,YAAY,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;KACzD;AACH,CAAC"}
@@ -5,7 +5,12 @@ const devkit_1 = require("@nrwl/devkit");
5
5
  function fixBootstrap(tree, appRoot, options) {
6
6
  const mainFilePath = (0, devkit_1.joinPathFragments)(appRoot, 'src/main.ts');
7
7
  const bootstrapCode = tree.read(mainFilePath, 'utf-8');
8
- tree.write((0, devkit_1.joinPathFragments)(appRoot, 'src/bootstrap.ts'), bootstrapCode);
8
+ if (options.standalone) {
9
+ tree.write(`${appRoot}/src/bootstrap.ts`, standaloneBootstrapCode);
10
+ }
11
+ else {
12
+ tree.write((0, devkit_1.joinPathFragments)(appRoot, 'src/bootstrap.ts'), bootstrapCode);
13
+ }
9
14
  const bootstrapImportCode = `import('./bootstrap').catch(err => console.error(err))`;
10
15
  const fetchMFManifestCode = `import { setRemoteDefinitions } from '@nrwl/angular/mf';
11
16
 
@@ -18,4 +23,22 @@ function fixBootstrap(tree, appRoot, options) {
18
23
  : bootstrapImportCode);
19
24
  }
20
25
  exports.fixBootstrap = fixBootstrap;
26
+ const standaloneBootstrapCode = `import {environment} from "./environments/environment";
27
+ import {enableProdMode, importProvidersFrom} from "@angular/core";
28
+ import {bootstrapApplication} from "@angular/platform-browser";
29
+ import {RouterModule} from "@angular/router";
30
+ import {RemoteEntryComponent} from "./app/remote-entry/entry.component";
31
+ import {RemoteRoutes} from "./app/remote-entry/routes";
32
+
33
+ if (environment.production) {
34
+ enableProdMode();
35
+ }
36
+
37
+ bootstrapApplication(RemoteEntryComponent, {
38
+ providers: [
39
+ importProvidersFrom(
40
+ RouterModule.forRoot(RemoteRoutes, {initialNavigation: 'enabledBlocking'})
41
+ )
42
+ ]
43
+ });`;
21
44
  //# sourceMappingURL=fix-bootstrap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fix-bootstrap.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/fix-bootstrap.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAGjD,SAAgB,YAAY,CAAC,IAAU,EAAE,OAAe,EAAE,OAAe;IACvE,MAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC;IAE1E,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;IAErF,MAAM,mBAAmB,GAAG;;;;;gBAKd,mBAAmB,GAAG,CAAC;IAErC,IAAI,CAAC,KAAK,CACR,YAAY,EACZ,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS;QAC/D,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,mBAAmB,CACxB,CAAC;AACJ,CAAC;AApBD,oCAoBC"}
1
+ {"version":3,"file":"fix-bootstrap.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/fix-bootstrap.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAGjD,SAAgB,YAAY,CAAC,IAAU,EAAE,OAAe,EAAE,OAAe;IACvE,MAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;KACpE;SAAM;QACL,IAAI,CAAC,KAAK,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC3E;IAED,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;IAErF,MAAM,mBAAmB,GAAG;;;;;gBAKd,mBAAmB,GAAG,CAAC;IAErC,IAAI,CAAC,KAAK,CACR,YAAY,EACZ,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS;QAC/D,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,mBAAmB,CACxB,CAAC;AACJ,CAAC;AAxBD,oCAwBC;AAED,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;IAiB5B,CAAC"}
@@ -15,6 +15,7 @@ function generateWebpackConfig(host, options, appRoot, remotesWithPorts) {
15
15
  name: options.appName,
16
16
  remotes: remotesWithPorts !== null && remotesWithPorts !== void 0 ? remotesWithPorts : [],
17
17
  projectRoot: appRoot,
18
+ standalone: options.standalone,
18
19
  });
19
20
  }
20
21
  exports.generateWebpackConfig = generateWebpackConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/generate-config.ts"],"names":[],"mappings":";;;AACA,yCAAwE;AAGxE,SAAgB,qBAAqB,CACnC,IAAU,EACV,OAAe,EACf,OAAe,EACf,gBAAwD;IAExD,IACE,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,8BAA8B,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,oBAAoB,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAChD;QACA,eAAM,CAAC,IAAI,CACT,+DAA+D,OAAO,CAAC,OAAO;qKACiF,CAChK,CAAC;KACH;IAED,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,kBAAkB,CAAC,EAChD,OAAO,EACP;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO,CAAC,MAAM;QACpB,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,EAAE;QAC/B,WAAW,EAAE,OAAO;KACrB,CACF,CAAC;AACJ,CAAC;AA7BD,sDA6BC"}
1
+ {"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/generate-config.ts"],"names":[],"mappings":";;;AACA,yCAAwE;AAGxE,SAAgB,qBAAqB,CACnC,IAAU,EACV,OAAe,EACf,OAAe,EACf,gBAAwD;IAExD,IACE,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,8BAA8B,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,oBAAoB,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAChD;QACA,eAAM,CAAC,IAAI,CACT,+DAA+D,OAAO,CAAC,OAAO;qKACiF,CAChK,CAAC;KACH;IAED,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,kBAAkB,CAAC,EAChD,OAAO,EACP;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO,CAAC,MAAM;QACpB,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,EAAE;QAC/B,WAAW,EAAE,OAAO;QACpB,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CACF,CAAC;AACJ,CAAC;AA9BD,sDA8BC"}
@@ -1,5 +1,5 @@
1
1
  export * from './add-cypress-workaround';
2
- export * from './add-entry-module';
2
+ export * from './add-remote-entry';
3
3
  export * from './add-remote-to-host';
4
4
  export * from './change-build-target';
5
5
  export * from './fix-bootstrap';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./add-cypress-workaround"), exports);
5
- tslib_1.__exportStar(require("./add-entry-module"), exports);
5
+ tslib_1.__exportStar(require("./add-remote-entry"), exports);
6
6
  tslib_1.__exportStar(require("./add-remote-to-host"), exports);
7
7
  tslib_1.__exportStar(require("./change-build-target"), exports);
8
8
  tslib_1.__exportStar(require("./fix-bootstrap"), exports);
@@ -10,4 +10,5 @@ export interface Schema {
10
10
  skipPackageJson?: boolean;
11
11
  e2eProjectName?: string;
12
12
  prefix?: string;
13
+ standalone?: boolean;
13
14
  }
@@ -60,6 +60,11 @@
60
60
  "prefix": {
61
61
  "type": "string",
62
62
  "description": "The prefix to use for any generated component."
63
+ },
64
+ "standalone": {
65
+ "type": "boolean",
66
+ "description": "Whether the application is a standalone application.",
67
+ "default": false
63
68
  }
64
69
  },
65
70
  "required": ["appName", "mfType"],
@@ -13,7 +13,7 @@ function setupMf(tree, options) {
13
13
  const remotesWithPorts = (0, lib_1.getRemotesWithPorts)(tree, options);
14
14
  (0, lib_1.addRemoteToHost)(tree, options);
15
15
  (0, lib_1.generateWebpackConfig)(tree, options, projectConfig.root, remotesWithPorts);
16
- (0, lib_1.addEntryModule)(tree, options, projectConfig.root);
16
+ (0, lib_1.addRemoteEntry)(tree, options, projectConfig.root);
17
17
  (0, lib_1.changeBuildTarget)(tree, options);
18
18
  (0, lib_1.updateTsConfigTarget)(tree, options);
19
19
  (0, lib_1.setupServeTarget)(tree, options);
@@ -1 +1 @@
1
- {"version":3,"file":"setup-mf.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-mf/setup-mf.ts"],"names":[],"mappings":";;;;AACA,yCAAqE;AAGrE,+BAWe;AAEf,SAAsB,OAAO,CAAC,IAAU,EAAE,OAAe;;;QACvD,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;Q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AQ,CAAC;QAE5D,IAAA,wBAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAElC,MAAM,gBAAgB,GAAG,IAAA,yBAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5D,IAAA,qBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE/B,IAAA,2BAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAE3E,IAAA,oBAAc,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAElD,IAAA,uBAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAA,0BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpC,IAAA,sBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEhC,IAAA,kBAAY,EAAC,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAA,iCAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,eAAe;QACf,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;;CACF;AA1BD,0BA0BC;AAED,kBAAe,OAAO,CAAC"}
@@ -14,9 +14,7 @@
14
14
  "project": {
15
15
  "type": "string",
16
16
  "description": "The name of the project.",
17
- "$default": {
18
- "$source": "projectName"
19
- }
17
+ "x-dropdown": "projects"
20
18
  },
21
19
  "name": {
22
20
  "type": "string",
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ export default function (tree: Tree): Promise<void>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const angularCliVersion = '~14.2.0';
6
+ function default_1(tree) {
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ let shouldFormat = false;
9
+ (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
10
+ var _a, _b;
11
+ if ((_a = json.devDependencies) === null || _a === void 0 ? void 0 : _a['@angular/cli']) {
12
+ json.devDependencies['@angular/cli'] = angularCliVersion;
13
+ shouldFormat = true;
14
+ }
15
+ else if ((_b = json.dependencies) === null || _b === void 0 ? void 0 : _b['@angular/cli']) {
16
+ json.dependencies['@angular/cli'] = angularCliVersion;
17
+ shouldFormat = true;
18
+ }
19
+ return json;
20
+ });
21
+ if (shouldFormat) {
22
+ yield (0, devkit_1.formatFiles)(tree);
23
+ }
24
+ });
25
+ }
26
+ exports.default = default_1;
27
+ //# sourceMappingURL=update-angular-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-angular-cli.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-14-6-0/update-angular-cli.ts"],"names":[],"mappings":";;;AAAA,yCAA6D;AAE7D,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAEpC,mBAA+B,IAAU;;QACvC,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;;YACxC,IAAI,MAAA,IAAI,CAAC,eAAe,0CAAG,cAAc,CAAC,EAAE;gBAC1C,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,GAAG,iBAAiB,CAAC;gBACzD,YAAY,GAAG,IAAI,CAAC;aACrB;iBAAM,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAG,cAAc,CAAC,EAAE;gBAC9C,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,iBAAiB,CAAC;gBACtD,YAAY,GAAG,IAAI,CAAC;aACrB;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,EAAE;YAChB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AAlBD,4BAkBC"}
@@ -1,7 +1,7 @@
1
1
  export declare const nxVersion: any;
2
- export declare const angularVersion = "~14.1.1";
3
- export declare const angularDevkitVersion = "~14.1.1";
4
- export declare const ngPackagrVersion = "~14.1.0";
2
+ export declare const angularVersion = "~14.2.0";
3
+ export declare const angularDevkitVersion = "~14.2.0";
4
+ export declare const ngPackagrVersion = "~14.2.0";
5
5
  export declare const ngrxVersion = "~14.0.0";
6
6
  export declare const rxjsVersion = "~7.5.0";
7
7
  export declare const zoneJsVersion = "~0.11.4";
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typesNodeVersion = exports.typesJasminewd2Version = exports.typesJasmineVersion = exports.jasmineSpecReporterVersion = exports.jasmineCoreVersion = exports.karmaJasmineHtmlReporterVersion = exports.karmaJasmineVersion = exports.karmaCoverageVersion = exports.karmaChromeLauncherVersion = exports.karmaVersion = exports.protractorVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssPresetEnvVersion = exports.postcssImportVersion = exports.postcssVersion = exports.tailwindVersion = exports.angularEslintVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.angularVersion = '~14.1.1';
6
- exports.angularDevkitVersion = '~14.1.1';
7
- exports.ngPackagrVersion = '~14.1.0';
5
+ exports.angularVersion = '~14.2.0';
6
+ exports.angularDevkitVersion = '~14.2.0';
7
+ exports.ngPackagrVersion = '~14.2.0';
8
8
  exports.ngrxVersion = '~14.0.0';
9
9
  exports.rxjsVersion = '~7.5.0';
10
10
  exports.zoneJsVersion = '~0.11.4';
@@ -1,3 +0,0 @@
1
- import type { Tree } from '@nrwl/devkit';
2
- import type { Schema } from '../schema';
3
- export declare function addEntryModule(host: Tree, { appName, routing, mfType, prefix }: Schema, appRoot: string): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addEntryModule = void 0;
4
- const devkit_1 = require("@nrwl/devkit");
5
- function addEntryModule(host, { appName, routing, mfType, prefix }, appRoot) {
6
- if (mfType === 'remote') {
7
- (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, '../files/entry-module-files'), `${appRoot}/src/app/remote-entry`, {
8
- tmpl: '',
9
- appName,
10
- routing,
11
- prefix,
12
- });
13
- host.write(`${appRoot}/src/app/app.module.ts`, `/*
14
- * This RemoteEntryModule is imported here to allow TS to find the Module during
15
- * compilation, allowing it to be included in the built bundle. This is required
16
- * for the Module Federation Plugin to expose the Module correctly.
17
- * */
18
- import { RemoteEntryModule } from './remote-entry/entry.module';
19
- ${host.read(`${appRoot}/src/app/app.module.ts`, 'utf-8')}`);
20
- }
21
- }
22
- exports.addEntryModule = addEntryModule;
23
- //# sourceMappingURL=add-entry-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-entry-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-entry-module.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAGhE,SAAgB,cAAc,CAC5B,IAAU,EACV,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,EAC5C,OAAe;IAEf,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,6BAA6B,CAAC,EAC3D,GAAG,OAAO,uBAAuB,EACjC;YACE,IAAI,EAAE,EAAE;YACR,OAAO;YACP,OAAO;YACP,MAAM;SACP,CACF,CAAC;QAEF,IAAI,CAAC,KAAK,CACR,GAAG,OAAO,wBAAwB,EAClC;;;;;;EAMJ,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,wBAAwB,EAAE,OAAO,CAAC,EAAE,CACrD,CAAC;KACH;AACH,CAAC;AA7BD,wCA6BC"}