@nrwl/angular 13.10.0 → 14.0.0-beta.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 (77) hide show
  1. package/README.md +1 -1
  2. package/generators.d.ts +0 -2
  3. package/generators.js +0 -2
  4. package/generators.js.map +1 -1
  5. package/generators.json +0 -20
  6. package/module-federation/index.d.ts +1 -0
  7. package/module-federation/index.js +2 -0
  8. package/module-federation/index.js.map +1 -1
  9. package/package.json +6 -6
  10. package/src/generators/add-linting/schema.json +1 -0
  11. package/src/generators/application/schema.json +11 -5
  12. package/src/generators/component/schema.json +1 -1
  13. package/src/generators/component-cypress-spec/schema.json +1 -0
  14. package/src/generators/component-story/schema.json +1 -0
  15. package/src/generators/convert-to-with-mf/schema.json +1 -1
  16. package/src/generators/convert-tslint-to-eslint/schema.json +1 -1
  17. package/src/generators/downgrade-module/schema.json +1 -1
  18. package/src/generators/init/schema.json +1 -1
  19. package/src/generators/mfe-host/mfe-host.js +1 -9
  20. package/src/generators/mfe-host/mfe-host.js.map +1 -1
  21. package/src/generators/mfe-host/schema.d.ts +18 -0
  22. package/src/generators/mfe-host/schema.json +118 -1
  23. package/src/generators/mfe-remote/mfe-remote.js +1 -8
  24. package/src/generators/mfe-remote/mfe-remote.js.map +1 -1
  25. package/src/generators/mfe-remote/schema.d.ts +18 -0
  26. package/src/generators/mfe-remote/schema.json +117 -0
  27. package/src/generators/ng-add/migrate-from-angular-cli.js +27 -8
  28. package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -1
  29. package/src/generators/ng-add/utilities/app.migrator.d.ts +2 -1
  30. package/src/generators/ng-add/utilities/app.migrator.js +82 -15
  31. package/src/generators/ng-add/utilities/app.migrator.js.map +1 -1
  32. package/src/generators/ng-add/utilities/e2e-project.migrator.d.ts +5 -1
  33. package/src/generators/ng-add/utilities/e2e-project.migrator.js +146 -55
  34. package/src/generators/ng-add/utilities/e2e-project.migrator.js.map +1 -1
  35. package/src/generators/ng-add/utilities/logger.d.ts +8 -0
  36. package/src/generators/ng-add/utilities/logger.js +21 -0
  37. package/src/generators/ng-add/utilities/logger.js.map +1 -0
  38. package/src/generators/ng-add/utilities/project.migrator.d.ts +2 -0
  39. package/src/generators/ng-add/utilities/project.migrator.js +2 -0
  40. package/src/generators/ng-add/utilities/project.migrator.js.map +1 -1
  41. package/src/generators/ng-add/utilities/types.d.ts +4 -0
  42. package/src/generators/ng-add/utilities/workspace.d.ts +4 -2
  43. package/src/generators/ng-add/utilities/workspace.js +92 -50
  44. package/src/generators/ng-add/utilities/workspace.js.map +1 -1
  45. package/src/generators/scam/schema.json +1 -1
  46. package/src/generators/scam-directive/schema.json +1 -1
  47. package/src/generators/scam-pipe/schema.json +1 -1
  48. package/src/generators/setup-mfe/lib/index.d.ts +0 -1
  49. package/src/generators/setup-mfe/lib/index.js +0 -1
  50. package/src/generators/setup-mfe/lib/index.js.map +1 -1
  51. package/src/generators/setup-mfe/setup-mfe.js +0 -1
  52. package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
  53. package/src/generators/stories/schema.json +1 -1
  54. package/src/generators/utils/storybook.js +4 -2
  55. package/src/generators/utils/storybook.js.map +1 -1
  56. package/src/utils/versions.js +1 -1
  57. package/src/generators/ng-add/utilities/e2e-utils.d.ts +0 -7
  58. package/src/generators/ng-add/utilities/e2e-utils.js +0 -46
  59. package/src/generators/ng-add/utilities/e2e-utils.js.map +0 -1
  60. package/src/generators/setup-mfe/lib/add-implicit-deps.d.ts +0 -3
  61. package/src/generators/setup-mfe/lib/add-implicit-deps.js +0 -17
  62. package/src/generators/setup-mfe/lib/add-implicit-deps.js.map +0 -1
  63. package/src/generators/storybook-migrate-defaults-5-to-6/compat.d.ts +0 -2
  64. package/src/generators/storybook-migrate-defaults-5-to-6/compat.js +0 -6
  65. package/src/generators/storybook-migrate-defaults-5-to-6/compat.js.map +0 -1
  66. package/src/generators/storybook-migrate-defaults-5-to-6/schema.d.ts +0 -5
  67. package/src/generators/storybook-migrate-defaults-5-to-6/schema.json +0 -30
  68. package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.d.ts +0 -4
  69. package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js +0 -14
  70. package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js.map +0 -1
  71. package/src/generators/storybook-migrate-stories-to-6-2/compat.d.ts +0 -2
  72. package/src/generators/storybook-migrate-stories-to-6-2/compat.js +0 -6
  73. package/src/generators/storybook-migrate-stories-to-6-2/compat.js.map +0 -1
  74. package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.d.ts +0 -3
  75. package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js +0 -13
  76. package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js.map +0 -1
  77. package/src/generators/storybook-migrate-stories-to-6-2/schema.json +0 -11
package/README.md CHANGED
@@ -79,6 +79,6 @@ A few links to help you get started:
79
79
  - [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
80
80
  - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
81
81
 
82
- <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
82
+ <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
83
83
  width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
84
84
 
package/generators.d.ts CHANGED
@@ -11,8 +11,6 @@ export * from './src/generators/ngrx/ngrx';
11
11
  export * from './src/generators/setup-tailwind/setup-tailwind';
12
12
  export * from './src/generators/stories/stories';
13
13
  export * from './src/generators/storybook-configuration/storybook-configuration';
14
- export * from './src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6';
15
- export * from './src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2';
16
14
  export * from './src/generators/upgrade-module/upgrade-module';
17
15
  export * from './src/generators/setup-mfe/setup-mfe';
18
16
  export * from './src/generators/mfe-host/mfe-host';
package/generators.js CHANGED
@@ -14,8 +14,6 @@ tslib_1.__exportStar(require("./src/generators/ngrx/ngrx"), exports);
14
14
  tslib_1.__exportStar(require("./src/generators/setup-tailwind/setup-tailwind"), exports);
15
15
  tslib_1.__exportStar(require("./src/generators/stories/stories"), exports);
16
16
  tslib_1.__exportStar(require("./src/generators/storybook-configuration/storybook-configuration"), exports);
17
- tslib_1.__exportStar(require("./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6"), exports);
18
- tslib_1.__exportStar(require("./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2"), exports);
19
17
  tslib_1.__exportStar(require("./src/generators/upgrade-module/upgrade-module"), exports);
20
18
  tslib_1.__exportStar(require("./src/generators/setup-mfe/setup-mfe"), exports);
21
19
  tslib_1.__exportStar(require("./src/generators/mfe-host/mfe-host"), exports);
package/generators.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,mFAAyD;AACzD,6GAAmF;AACnF,6FAAmE;AACnE,qEAA2C;AAC3C,uEAA6C;AAC7C,uFAA6D;AAC7D,2EAAiD;AACjD,uHAA6F;AAC7F,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,2EAAiD;AACjD,2GAAiF;AACjF,+HAAqG;AACrG,mHAAyF;AACzF,yFAA+D;AAC/D,+EAAqD;AACrD,6EAAmD;AACnD,qEAA2C;AAC3C,yFAA+D;AAC/D,+EAAqD;AACrD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,iFAAuD;AACvD,iFAAuD"}
1
+ {"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,mFAAyD;AACzD,6GAAmF;AACnF,6FAAmE;AACnE,qEAA2C;AAC3C,uEAA6C;AAC7C,uFAA6D;AAC7D,2EAAiD;AACjD,uHAA6F;AAC7F,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,2EAAiD;AACjD,2GAAiF;AACjF,yFAA+D;AAC/D,+EAAqD;AACrD,6EAAmD;AACnD,qEAA2C;AAC3C,yFAA+D;AAC/D,+EAAqD;AACrD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,iFAAuD;AACvD,iFAAuD"}
package/generators.json CHANGED
@@ -140,16 +140,6 @@
140
140
  "schema": "./src/generators/storybook-configuration/schema.json",
141
141
  "description": "Adds Storybook configuration to a project."
142
142
  },
143
- "storybook-migrate-defaults-5-to-6": {
144
- "factory": "./src/generators/storybook-migrate-defaults-5-to-6/compat",
145
- "schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
146
- "description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
147
- },
148
- "storybook-migrate-stories-to-6-2": {
149
- "factory": "./src/generators/storybook-migrate-stories-to-6-2/compat",
150
- "schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
151
- "description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
152
- },
153
143
  "upgrade-module": {
154
144
  "factory": "./src/generators/upgrade-module/compat",
155
145
  "schema": "./src/generators/upgrade-module/schema.json",
@@ -299,16 +289,6 @@
299
289
  "schema": "./src/generators/storybook-configuration/schema.json",
300
290
  "description": "Adds Storybook configuration to a project."
301
291
  },
302
- "storybook-migrate-defaults-5-to-6": {
303
- "factory": "./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6",
304
- "schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
305
- "description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
306
- },
307
- "storybook-migrate-stories-to-6-2": {
308
- "factory": "./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2",
309
- "schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
310
- "description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
311
- },
312
292
  "upgrade-module": {
313
293
  "factory": "./src/generators/upgrade-module/upgrade-module",
314
294
  "schema": "./src/generators/upgrade-module/schema.json",
@@ -1 +1,2 @@
1
1
  export { withModuleFederation } from '../src/utils/mfe/with-module-federation';
2
+ export * from '../src/utils/mfe/mfe-webpack';
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withModuleFederation = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  var with_module_federation_1 = require("../src/utils/mfe/with-module-federation");
5
6
  Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
7
+ tslib_1.__exportStar(require("../src/utils/mfe/mfe-webpack"), exports);
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/module-federation/index.ts"],"names":[],"mappings":";;;AAAA,kFAA+E;AAAtE,8HAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/module-federation/index.ts"],"names":[],"mappings":";;;;AAAA,kFAA+E;AAAtE,8HAAA,oBAAoB,OAAA;AAC7B,uEAA6C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/angular",
3
- "version": "13.10.0",
3
+ "version": "14.0.0-beta.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",
@@ -65,11 +65,11 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@angular-devkit/schematics": "~13.3.0",
68
- "@nrwl/cypress": "13.10.0",
69
- "@nrwl/devkit": "13.10.0",
70
- "@nrwl/jest": "13.10.0",
71
- "@nrwl/linter": "13.10.0",
72
- "@nrwl/storybook": "13.10.0",
68
+ "@nrwl/cypress": "14.0.0-beta.0",
69
+ "@nrwl/devkit": "14.0.0-beta.0",
70
+ "@nrwl/jest": "14.0.0-beta.0",
71
+ "@nrwl/linter": "14.0.0-beta.0",
72
+ "@nrwl/storybook": "14.0.0-beta.0",
73
73
  "@schematics/angular": "~13.3.0",
74
74
  "@phenomnomnominal/tsquery": "4.1.1",
75
75
  "ignore": "^5.0.4",
@@ -2,6 +2,7 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "$id": "NxAngularAddLintingGenerator",
4
4
  "title": "Add linting to an Angular project.",
5
+ "description": "Adds linting configuration to an Angular project.",
5
6
  "cli": "nx",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "$id": "GeneratorNxApp",
4
4
  "title": "Creates an Angular application.",
5
+ "description": "Creates an Angular application.",
5
6
  "type": "object",
6
7
  "cli": "nx",
7
8
  "properties": {
@@ -130,19 +131,22 @@
130
131
  "mfe": {
131
132
  "description": "Generate a Module Federation configuration for the application",
132
133
  "type": "boolean",
133
- "default": false
134
+ "default": false,
135
+ "x-deprecated": "Use the `mfe-host` or `mfe-remote` generators instead. Support for generating MFE applications using the application generator will be removed in an upcoming version."
134
136
  },
135
137
  "mfeType": {
136
138
  "type": "string",
137
139
  "enum": ["host", "remote"],
138
140
  "description": "Type of application to generate the Module Federation configuration for.",
139
- "default": "remote"
141
+ "default": "remote",
142
+ "x-deprecated": "Use the `mfe-host` or `mfe-remote` generators instead. Support for generating MFE applications using the application generator will be removed in an upcoming version."
140
143
  },
141
144
  "federationType": {
142
145
  "type": "string",
143
146
  "enum": ["static", "dynamic"],
144
147
  "description": "Use either Static or Dynamic Module Federation pattern for the application.",
145
- "default": "static"
148
+ "default": "static",
149
+ "x-deprecated": "Use the `mfe-host` or `mfe-remote` generators instead. Support for generating MFE applications using the application generator will be removed in an upcoming version."
146
150
  },
147
151
  "port": {
148
152
  "type": "number",
@@ -150,11 +154,13 @@
150
154
  },
151
155
  "remotes": {
152
156
  "type": "array",
153
- "description": "A list of remote application names that the host application should consume."
157
+ "description": "A list of remote application names that the host application should consume.",
158
+ "x-deprecated": "Use the `mfe-host` or `mfe-remote` generators instead. Support for generating MFE applications using the application generator will be removed in an upcoming version."
154
159
  },
155
160
  "host": {
156
161
  "type": "string",
157
- "description": "The name of the host application that the remote application will be consumed by."
162
+ "description": "The name of the host application that the remote application will be consumed by.",
163
+ "x-deprecated": "Use the `mfe-host` or `mfe-remote` generators instead. Support for generating MFE applications using the application generator will be removed in an upcoming version."
158
164
  },
159
165
  "setParserOptionsProject": {
160
166
  "type": "boolean",
@@ -4,7 +4,7 @@
4
4
  "title": "Angular Component Schema",
5
5
  "cli": "nx",
6
6
  "type": "object",
7
- "description": "Creates a new, generic component definition in the given or default project.",
7
+ "description": "Creates a new, generic Angular component definition in the given or default project.",
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
10
  "path": {
@@ -3,6 +3,7 @@
3
3
  "$id": "NxAngularComponentCypressSpecGenerator",
4
4
  "type": "object",
5
5
  "cli": "nx",
6
+ "description": "Creates a Cypress spec for a UI component that has a story.",
6
7
  "properties": {
7
8
  "projectName": {
8
9
  "type": "string",
@@ -3,6 +3,7 @@
3
3
  "$id": "NxAngularComponentStoryGenerator",
4
4
  "type": "object",
5
5
  "cli": "nx",
6
+ "description": "Creates a `stories.ts` file for an Angular component.",
6
7
  "properties": {
7
8
  "projectPath": {
8
9
  "type": "string",
@@ -4,7 +4,7 @@
4
4
  "cli": "nx",
5
5
  "title": "Convert to withModuleFederation Generator Options Schema",
6
6
  "type": "object",
7
- "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n _**Note:** This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!_",
7
+ "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n _**Note:** This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!_.",
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
10
  "project": {
@@ -3,7 +3,7 @@
3
3
  "$id": "NxAngularConvertTSLintToESLintGenerator",
4
4
  "cli": "nx",
5
5
  "title": "Convert an Angular project from TSLint to ESLint",
6
- "description": "Convert an Angular project from TSLint to ESLint. NOTE: Does not work in `--dry-run mode`",
6
+ "description": "Convert an Angular project from TSLint to ESLint. NOTE: Does not work in `--dry-run mode`.",
7
7
  "examples": [
8
8
  {
9
9
  "command": "nx g convert-tslint-to-eslint myapp",
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "$id": "NxDowngradeModuleGenerator",
4
4
  "title": "Generates downgradeModule setup.",
5
- "description": "Sets up a Downgrade Module.",
5
+ "description": "Sets up a Downgrade Module for using AngularJS and Angular.",
6
6
  "cli": "nx",
7
7
  "type": "object",
8
8
  "properties": {
@@ -3,7 +3,7 @@
3
3
  "$id": "SchematicsAngularModuleInit",
4
4
  "cli": "nx",
5
5
  "title": "Init Angular Plugin",
6
- "description": "Initializes the `@nrwl/angular` plugin. NOTE: Does not work in the `--dry-run` mode",
6
+ "description": "Initializes the `@nrwl/angular` plugin. NOTE: Does not work in the `--dry-run` mode.",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "unitTestRunner": {
@@ -14,15 +14,7 @@ function mfeHost(tree, options) {
14
14
  }
15
15
  });
16
16
  }
17
- const installTask = yield (0, application_1.default)(tree, {
18
- name: options.name,
19
- mfe: true,
20
- mfeType: 'host',
21
- routing: true,
22
- remotes: (_a = options.remotes) !== null && _a !== void 0 ? _a : [],
23
- port: 4200,
24
- federationType: options.dynamic ? 'dynamic' : 'static',
25
- });
17
+ const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mfe: true, mfeType: 'host', routing: true, remotes: (_a = options.remotes) !== null && _a !== void 0 ? _a : [], port: 4200, federationType: options.dynamic ? 'dynamic' : 'static' }));
26
18
  return installTask;
27
19
  });
28
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mfe-host.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-host/mfe-host.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAC3C,4DAA8D;AAE9D,SAA8B,OAAO,CAAC,IAAU,EAAE,OAAe;;;QAC/D,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,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,MAAM,IAAI,KAAK,CACb,gDAAgD,MAAM,GAAG,CAC1D,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,EAAE;YACnD,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,IAAI;YACT,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE;YAC9B,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;SACvD,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;;CACpB;AAxBD,0BAwBC"}
1
+ {"version":3,"file":"mfe-host.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-host/mfe-host.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAC3C,4DAA8D;AAE9D,SAA8B,OAAO,CAAC,IAAU,EAAE,OAAe;;;QAC/D,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,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,MAAM,IAAI,KAAK,CACb,gDAAgD,MAAM,GAAG,CAC1D,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,kCAC9C,OAAO,KACV,GAAG,EAAE,IAAI,EACT,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,EAC9B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IACtD,CAAC;QAEH,OAAO,WAAW,CAAC;;CACpB;AAxBD,0BAwBC"}
@@ -2,4 +2,22 @@ export interface Schema {
2
2
  name: string;
3
3
  remotes?: string[];
4
4
  dynamic?: boolean;
5
+ setParserOptionsProject?: boolean;
6
+ skipPackageJson?: boolean;
7
+ addTailwind?: boolean;
8
+ prefix?: string;
9
+ style?: Styles;
10
+ skipTests?: boolean;
11
+ directory?: string;
12
+ tags?: string;
13
+ linter?: AngularLinter;
14
+ unitTestRunner?: UnitTestRunner;
15
+ e2eTestRunner?: E2eTestRunner;
16
+ backendProject?: string;
17
+ strict?: boolean;
18
+ standaloneConfig?: boolean;
19
+ inlineStyle?: boolean;
20
+ inlineTemplate?: boolean;
21
+ viewEncapsulation?: 'Emulated' | 'Native' | 'None';
22
+ skipFormat?: boolean;
5
23
  }
@@ -3,7 +3,7 @@
3
3
  "$id": "NxMFEHost",
4
4
  "cli": "nx",
5
5
  "title": "Nx MFE Host Application",
6
- "description": "Create an Angular Host Micro Frontend Application",
6
+ "description": "Create an Angular Host Micro Frontend Application.",
7
7
  "type": "object",
8
8
  "examples": [
9
9
  {
@@ -28,7 +28,124 @@
28
28
  "type": "boolean",
29
29
  "description": "Should the host application use dynamic federation?",
30
30
  "default": false
31
+ },
32
+ "directory": {
33
+ "description": "The directory of the new application.",
34
+ "type": "string"
35
+ },
36
+ "style": {
37
+ "description": "The file extension to be used for style files.",
38
+ "type": "string",
39
+ "default": "css",
40
+ "enum": ["css", "scss", "sass", "less"],
41
+ "x-prompt": {
42
+ "message": "Which stylesheet format would you like to use?",
43
+ "type": "list",
44
+ "items": [
45
+ {
46
+ "value": "css",
47
+ "label": "CSS"
48
+ },
49
+ {
50
+ "value": "scss",
51
+ "label": "SASS(.scss) [ http://sass-lang.com ]"
52
+ },
53
+ {
54
+ "value": "sass",
55
+ "label": "SASS(.sass) [ http://sass-lang.com ]"
56
+ },
57
+ {
58
+ "value": "less",
59
+ "label": "LESS [ http://lesscss.org ]"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ "inlineStyle": {
65
+ "description": "Specifies if the style will be in the ts file.",
66
+ "type": "boolean",
67
+ "default": false,
68
+ "alias": "s"
69
+ },
70
+ "inlineTemplate": {
71
+ "description": "Specifies if the template will be in the ts file.",
72
+ "type": "boolean",
73
+ "default": false,
74
+ "alias": "t"
75
+ },
76
+ "viewEncapsulation": {
77
+ "description": "Specifies the view encapsulation strategy.",
78
+ "enum": ["Emulated", "None", "ShadowDom"],
79
+ "type": "string"
80
+ },
81
+ "prefix": {
82
+ "type": "string",
83
+ "format": "html-selector",
84
+ "description": "The prefix to apply to generated selectors.",
85
+ "alias": "p"
86
+ },
87
+ "skipTests": {
88
+ "description": "Skip creating spec files.",
89
+ "type": "boolean",
90
+ "default": false,
91
+ "alias": "S"
92
+ },
93
+ "skipPackageJson": {
94
+ "type": "boolean",
95
+ "default": false,
96
+ "description": "Do not add dependencies to `package.json`."
97
+ },
98
+ "unitTestRunner": {
99
+ "type": "string",
100
+ "enum": ["karma", "jest", "none"],
101
+ "description": "Test runner to use for unit tests.",
102
+ "default": "jest"
103
+ },
104
+ "e2eTestRunner": {
105
+ "type": "string",
106
+ "enum": ["protractor", "cypress", "none"],
107
+ "description": "Test runner to use for end to end (E2E) tests.",
108
+ "default": "cypress"
109
+ },
110
+ "tags": {
111
+ "type": "string",
112
+ "description": "Add tags to the application (used for linting)."
113
+ },
114
+ "linter": {
115
+ "description": "The tool to use for running lint checks.",
116
+ "type": "string",
117
+ "enum": ["eslint", "none"],
118
+ "default": "eslint"
119
+ },
120
+ "backendProject": {
121
+ "type": "string",
122
+ "description": "Backend project that provides data to this application. This sets up `proxy.config.json`."
123
+ },
124
+ "strict": {
125
+ "type": "boolean",
126
+ "description": "Create an application with stricter type checking and build optimization options.",
127
+ "default": true
128
+ },
129
+ "standaloneConfig": {
130
+ "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
131
+ "type": "boolean"
132
+ },
133
+ "setParserOptionsProject": {
134
+ "type": "boolean",
135
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
136
+ "default": false
137
+ },
138
+ "addTailwind": {
139
+ "type": "boolean",
140
+ "description": "Whether to configure Tailwind CSS for the application.",
141
+ "default": false
142
+ },
143
+ "skipFormat": {
144
+ "description": "Skip formatting files.",
145
+ "type": "boolean",
146
+ "default": false
31
147
  }
32
148
  },
149
+ "additionalProperties": false,
33
150
  "required": ["name"]
34
151
  }
@@ -23,14 +23,7 @@ function mfeRemote(tree, options) {
23
23
  if (options.host && !projects.has(options.host)) {
24
24
  throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
25
25
  }
26
- const installTask = yield (0, application_1.default)(tree, {
27
- name: options.name,
28
- mfe: true,
29
- mfeType: 'remote',
30
- routing: true,
31
- host: options.host,
32
- port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree),
33
- });
26
+ const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mfe: true, mfeType: 'remote', routing: true, host: options.host, port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree) }));
34
27
  return installTask;
35
28
  });
36
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mfe-remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-remote/mfe-remote.ts"],"names":[],"mappings":";;;AAEA,yCAAqE;AACrE,4DAA8D;AAC9D,mEAA8D;AAE9D,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/D,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;IAEjD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAA8B,SAAS,CAAC,IAAU,EAAE,OAAe;;;QACjE,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC/C,MAAM,IAAI,KAAK,CACb,2EAA2E,OAAO,CAAC,IAAI,GAAG,CAC3F,CAAC;SACH;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,EAAE;YACnD,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,IAAI;YACT,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,qBAAqB,CAAC,IAAI,CAAC;SAClD,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;;CACpB;AAlBD,4BAkBC"}
1
+ {"version":3,"file":"mfe-remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/mfe-remote/mfe-remote.ts"],"names":[],"mappings":";;;AAEA,yCAAqE;AACrE,4DAA8D;AAC9D,mEAA8D;AAE9D,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/D,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;IAEjD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAA8B,SAAS,CAAC,IAAU,EAAE,OAAe;;;QACjE,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC/C,MAAM,IAAI,KAAK,CACb,2EAA2E,OAAO,CAAC,IAAI,GAAG,CAC3F,CAAC;SACH;QAED,MAAM,WAAW,GAAG,MAAM,IAAA,qBAAoB,EAAC,IAAI,kCAC9C,OAAO,KACV,GAAG,EAAE,IAAI,EACT,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,qBAAqB,CAAC,IAAI,CAAC,IACjD,CAAC;QAEH,OAAO,WAAW,CAAC;;CACpB;AAlBD,4BAkBC"}
@@ -2,4 +2,22 @@ export interface Schema {
2
2
  name: string;
3
3
  host?: string;
4
4
  port?: number;
5
+ setParserOptionsProject?: boolean;
6
+ skipPackageJson?: boolean;
7
+ addTailwind?: boolean;
8
+ prefix?: string;
9
+ style?: Styles;
10
+ skipTests?: boolean;
11
+ directory?: string;
12
+ tags?: string;
13
+ linter?: AngularLinter;
14
+ unitTestRunner?: UnitTestRunner;
15
+ e2eTestRunner?: E2eTestRunner;
16
+ backendProject?: string;
17
+ strict?: boolean;
18
+ standaloneConfig?: boolean;
19
+ inlineStyle?: boolean;
20
+ inlineTemplate?: boolean;
21
+ viewEncapsulation?: 'Emulated' | 'Native' | 'None';
22
+ skipFormat?: boolean;
5
23
  }
@@ -27,7 +27,124 @@
27
27
  "port": {
28
28
  "type": "number",
29
29
  "description": "The port on which this app should be served."
30
+ },
31
+ "directory": {
32
+ "description": "The directory of the new application.",
33
+ "type": "string"
34
+ },
35
+ "style": {
36
+ "description": "The file extension to be used for style files.",
37
+ "type": "string",
38
+ "default": "css",
39
+ "enum": ["css", "scss", "sass", "less"],
40
+ "x-prompt": {
41
+ "message": "Which stylesheet format would you like to use?",
42
+ "type": "list",
43
+ "items": [
44
+ {
45
+ "value": "css",
46
+ "label": "CSS"
47
+ },
48
+ {
49
+ "value": "scss",
50
+ "label": "SASS(.scss) [ http://sass-lang.com ]"
51
+ },
52
+ {
53
+ "value": "sass",
54
+ "label": "SASS(.sass) [ http://sass-lang.com ]"
55
+ },
56
+ {
57
+ "value": "less",
58
+ "label": "LESS [ http://lesscss.org ]"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ "inlineStyle": {
64
+ "description": "Specifies if the style will be in the ts file.",
65
+ "type": "boolean",
66
+ "default": false,
67
+ "alias": "s"
68
+ },
69
+ "inlineTemplate": {
70
+ "description": "Specifies if the template will be in the ts file.",
71
+ "type": "boolean",
72
+ "default": false,
73
+ "alias": "t"
74
+ },
75
+ "viewEncapsulation": {
76
+ "description": "Specifies the view encapsulation strategy.",
77
+ "enum": ["Emulated", "None", "ShadowDom"],
78
+ "type": "string"
79
+ },
80
+ "prefix": {
81
+ "type": "string",
82
+ "format": "html-selector",
83
+ "description": "The prefix to apply to generated selectors.",
84
+ "alias": "p"
85
+ },
86
+ "skipTests": {
87
+ "description": "Skip creating spec files.",
88
+ "type": "boolean",
89
+ "default": false,
90
+ "alias": "S"
91
+ },
92
+ "skipPackageJson": {
93
+ "type": "boolean",
94
+ "default": false,
95
+ "description": "Do not add dependencies to `package.json`."
96
+ },
97
+ "unitTestRunner": {
98
+ "type": "string",
99
+ "enum": ["karma", "jest", "none"],
100
+ "description": "Test runner to use for unit tests.",
101
+ "default": "jest"
102
+ },
103
+ "e2eTestRunner": {
104
+ "type": "string",
105
+ "enum": ["protractor", "cypress", "none"],
106
+ "description": "Test runner to use for end to end (E2E) tests.",
107
+ "default": "cypress"
108
+ },
109
+ "tags": {
110
+ "type": "string",
111
+ "description": "Add tags to the application (used for linting)."
112
+ },
113
+ "linter": {
114
+ "description": "The tool to use for running lint checks.",
115
+ "type": "string",
116
+ "enum": ["eslint", "none"],
117
+ "default": "eslint"
118
+ },
119
+ "backendProject": {
120
+ "type": "string",
121
+ "description": "Backend project that provides data to this application. This sets up `proxy.config.json`."
122
+ },
123
+ "strict": {
124
+ "type": "boolean",
125
+ "description": "Create an application with stricter type checking and build optimization options.",
126
+ "default": true
127
+ },
128
+ "standaloneConfig": {
129
+ "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
130
+ "type": "boolean"
131
+ },
132
+ "setParserOptionsProject": {
133
+ "type": "boolean",
134
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
135
+ "default": false
136
+ },
137
+ "addTailwind": {
138
+ "type": "boolean",
139
+ "description": "Whether to configure Tailwind CSS for the application.",
140
+ "default": false
141
+ },
142
+ "skipFormat": {
143
+ "description": "Skip formatting files.",
144
+ "type": "boolean",
145
+ "default": false
30
146
  }
31
147
  },
148
+ "additionalProperties": false,
32
149
  "required": ["name"]
33
150
  }