@nrwl/angular 15.8.0-beta.0 → 15.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators.d.ts +0 -1
- package/generators.js +0 -1
- package/generators.js.map +1 -1
- package/generators.json +0 -11
- package/mf/mf.d.ts +1 -1
- package/mf/mf.js +2 -1
- package/mf/mf.js.map +1 -1
- package/ng-package.json +2 -1
- package/package.json +10 -8
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +14 -1
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -1
- package/src/builders/module-federation-dev-server/schema.d.ts +1 -0
- package/src/builders/module-federation-dev-server/schema.json +4 -0
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +13 -1
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js.map +1 -1
- package/src/builders/module-federation-dev-ssr/schema.d.ts +1 -0
- package/src/builders/module-federation-dev-ssr/schema.json +4 -0
- package/src/builders/utilities/module-federation.d.ts +1 -1
- package/src/builders/utilities/module-federation.js +5 -6
- package/src/builders/utilities/module-federation.js.map +1 -1
- package/src/builders/webpack-browser/webpack-browser.impl.d.ts +1 -1
- package/src/executors/utilities/angular-version-utils.d.ts +1 -1
- package/src/generators/add-linting/add-linting.js +2 -1
- package/src/generators/add-linting/add-linting.js.map +1 -1
- package/src/generators/add-linting/angular-v14/lib/create-eslint-configuration.d.ts +1 -1
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +1 -1
- package/src/generators/application/angular-v14/lib/convert-to-standalone-app.js +6 -5
- package/src/generators/application/angular-v14/lib/convert-to-standalone-app.js.map +1 -1
- package/src/generators/application/angular-v14/lib/create-files.js.map +1 -1
- package/src/generators/application/angular-v14/lib/update-component-spec.js +5 -2
- package/src/generators/application/angular-v14/lib/update-component-spec.js.map +1 -1
- package/src/generators/application/angular-v14/lib/update-config-files.js +2 -2
- package/src/generators/application/angular-v14/lib/update-config-files.js.map +1 -1
- package/src/generators/application/angular-v14/lib/update-e2e-project.js +2 -2
- package/src/generators/application/angular-v14/lib/update-e2e-project.js.map +1 -1
- package/src/generators/application/application.d.ts +2 -2
- package/src/generators/application/application.js +12 -1
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/lib/convert-to-standalone-app.js +6 -5
- package/src/generators/application/lib/convert-to-standalone-app.js.map +1 -1
- package/src/generators/application/lib/create-files.js +2 -2
- package/src/generators/application/lib/create-files.js.map +1 -1
- package/src/generators/application/lib/root-router-config.js +5 -2
- package/src/generators/application/lib/root-router-config.js.map +1 -1
- package/src/generators/application/lib/update-app-component-template.d.ts +1 -1
- package/src/generators/application/lib/update-app-component-template.js +18 -12
- package/src/generators/application/lib/update-app-component-template.js.map +1 -1
- package/src/generators/application/lib/update-component-spec.js +5 -2
- package/src/generators/application/lib/update-component-spec.js.map +1 -1
- package/src/generators/application/lib/update-config-files.js +2 -2
- package/src/generators/application/lib/update-config-files.js.map +1 -1
- package/src/generators/application/lib/update-e2e-project.js +2 -2
- package/src/generators/application/lib/update-e2e-project.js.map +1 -1
- package/src/generators/application/lib/update-nx-component-template.js +7 -4
- package/src/generators/application/lib/update-nx-component-template.js.map +1 -1
- package/src/generators/application/schema.json +1 -1
- package/src/generators/component/lib/entry-point.js +3 -3
- package/src/generators/component/lib/entry-point.js.map +1 -1
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +3 -3
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js.map +1 -1
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +5 -5
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js.map +1 -1
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +2 -2
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +8 -6
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js.map +1 -1
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +1 -1
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +2 -2
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js.map +1 -1
- package/src/generators/host/host.js +2 -1
- package/src/generators/host/host.js.map +1 -1
- package/src/generators/init/angular-v14/init.js +10 -4
- package/src/generators/init/angular-v14/init.js.map +1 -1
- package/src/generators/init/angular-v14/schema.d.ts +1 -0
- package/src/generators/init/init.js +12 -5
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.d.ts +1 -0
- package/src/generators/karma/karma.js +2 -1
- package/src/generators/karma/karma.js.map +1 -1
- package/src/generators/karma-project/lib/generate-karma-project-files.js +3 -3
- package/src/generators/karma-project/lib/generate-karma-project-files.js.map +1 -1
- package/src/generators/library/lib/add-children.js +5 -2
- package/src/generators/library/lib/add-children.js.map +1 -1
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js +5 -2
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js.map +1 -1
- package/src/generators/library/lib/add-load-children.js +5 -2
- package/src/generators/library/lib/add-load-children.js.map +1 -1
- package/src/generators/library/lib/add-router-configuration.js +5 -2
- package/src/generators/library/lib/add-router-configuration.js.map +1 -1
- package/src/generators/library/lib/update-project.js +2 -2
- package/src/generators/library/lib/update-project.js.map +1 -1
- package/src/generators/library/lib/update-tsconfig.js +2 -17
- package/src/generators/library/lib/update-tsconfig.js.map +1 -1
- package/src/generators/library/library.d.ts +2 -2
- package/src/generators/library/library.js +5 -3
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js +2 -2
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js.map +1 -1
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +2 -2
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js.map +1 -1
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js +2 -2
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js.map +1 -1
- package/src/generators/ng-add/migrators/builders/builder-migrator-class.type.d.ts +1 -1
- package/src/generators/ng-add/migrators/projects/app.migrator.d.ts +1 -1
- package/src/generators/ng-add/migrators/projects/app.migrator.js +2 -2
- package/src/generators/ng-add/migrators/projects/app.migrator.js.map +1 -1
- package/src/generators/ng-add/migrators/projects/e2e.migrator.d.ts +1 -1
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +21 -20
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js.map +1 -1
- package/src/generators/ng-add/migrators/projects/project.migrator.js +3 -3
- package/src/generators/ng-add/migrators/projects/project.migrator.js.map +1 -1
- package/src/generators/ng-add/utilities/file-change-recorder.js +5 -5
- package/src/generators/ng-add/utilities/file-change-recorder.js.map +1 -1
- package/src/generators/ng-add/utilities/types.d.ts +8 -8
- package/src/generators/ng-add/utilities/workspace.js +3 -3
- package/src/generators/ng-add/utilities/workspace.js.map +1 -1
- package/src/generators/ngrx/lib/normalize-options.d.ts +1 -1
- package/src/generators/remote/remote.js +2 -2
- package/src/generators/remote/remote.js.map +1 -1
- package/src/generators/setup-mf/lib/add-remote-to-host.js +5 -2
- package/src/generators/setup-mf/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-ssr/lib/update-app-module.js +3 -3
- package/src/generators/setup-ssr/lib/update-app-module.js.map +1 -1
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -1
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js.map +1 -1
- package/src/generators/utils/create-ts-config.d.ts +1 -1
- package/src/generators/utils/create-ts-config.js +4 -4
- package/src/generators/utils/create-ts-config.js.map +1 -1
- package/src/generators/utils/export-scam.d.ts +1 -1
- package/src/generators/utils/file-info.d.ts +2 -2
- package/src/generators/utils/insert-ngmodule-import.d.ts +1 -1
- package/src/generators/utils/storybook-ast/entry-point.d.ts +1 -1
- package/src/generators/utils/storybook-ast/module-info.js +3 -3
- package/src/generators/utils/storybook-ast/module-info.js.map +1 -1
- package/src/generators/utils/storybook-ast/storybook-inputs.d.ts +1 -1
- package/src/generators/utils/types.d.ts +1 -1
- package/src/generators/web-worker/lib/update-tsconfig.js +2 -2
- package/src/generators/web-worker/lib/update-tsconfig.js.map +1 -1
- package/src/runtime/nx/data-persistence.d.ts +4 -4
- package/src/utils/backward-compatible-versions.d.ts +3 -3
- package/src/utils/nx-devkit/ast-utils.d.ts +2 -2
- package/src/utils/nx-devkit/ast-utils.js +78 -43
- package/src/utils/nx-devkit/ast-utils.js.map +1 -1
- package/src/utils/nx-devkit/route-utils.js +14 -10
- package/src/utils/nx-devkit/route-utils.js.map +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
- package/src/generators/change-storybook-targets/change-storybook-targets.d.ts +0 -4
- package/src/generators/change-storybook-targets/change-storybook-targets.js +0 -19
- package/src/generators/change-storybook-targets/change-storybook-targets.js.map +0 -1
- package/src/generators/change-storybook-targets/compat.d.ts +0 -2
- package/src/generators/change-storybook-targets/compat.js +0 -6
- package/src/generators/change-storybook-targets/compat.js.map +0 -1
- package/src/generators/change-storybook-targets/schema.d.ts +0 -3
- package/src/generators/change-storybook-targets/schema.json +0 -19
package/generators.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './src/generators/add-linting/add-linting';
|
|
2
2
|
export * from './src/generators/application/application';
|
|
3
|
-
export * from './src/generators/change-storybook-targets/change-storybook-targets';
|
|
4
3
|
export * from './src/generators/component-cypress-spec/component-cypress-spec';
|
|
5
4
|
export * from './src/generators/component-story/component-story';
|
|
6
5
|
export * from './src/generators/component/component';
|
package/generators.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./src/generators/add-linting/add-linting"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./src/generators/application/application"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./src/generators/change-storybook-targets/change-storybook-targets"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./src/generators/component-cypress-spec/component-cypress-spec"), exports);
|
|
8
7
|
tslib_1.__exportStar(require("./src/generators/component-story/component-story"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./src/generators/component/component"), 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,mFAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,mFAAyD;AACzD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,+EAAqD;AACrD,6GAAmF;AACnF,6FAAmE;AACnE,qEAA2C;AAC3C,qEAA2C;AAC3C,uFAA6D;AAC7D,uEAA6C;AAC7C,uHAA6F;AAC7F,2EAAiD;AACjD,qEAA2C;AAC3C,qEAA2C;AAC3C,yEAA+C;AAC/C,yFAA+D;AAC/D,+EAAqD;AACrD,iGAAuE;AACvE,qEAA2C;AAC3C,6EAAmD;AACnD,+EAAqD;AACrD,yFAA+D;AAC/D,2EAAiD;AACjD,2GAAiF;AACjF,yFAA+D;AAC/D,iFAAuD;AACvD,2HAAiG;AACjG,yFAA+D;AAC/D,mEAAyC"}
|
package/generators.json
CHANGED
|
@@ -171,12 +171,6 @@
|
|
|
171
171
|
"factory": "./src/generators/web-worker/compat",
|
|
172
172
|
"schema": "./src/generators/web-worker/schema.json",
|
|
173
173
|
"description": "Creates a Web Worker."
|
|
174
|
-
},
|
|
175
|
-
"change-storybook-targets": {
|
|
176
|
-
"factory": "./src/generators/change-storybook-targets/compat",
|
|
177
|
-
"schema": "./src/generators/change-storybook-targets/schema.json",
|
|
178
|
-
"description": "Change storybook targets for Angular projects to use @storybook/angular executors",
|
|
179
|
-
"hidden": false
|
|
180
174
|
}
|
|
181
175
|
},
|
|
182
176
|
"generators": {
|
|
@@ -348,11 +342,6 @@
|
|
|
348
342
|
"factory": "./src/generators/web-worker/web-worker",
|
|
349
343
|
"schema": "./src/generators/web-worker/schema.json",
|
|
350
344
|
"description": "Creates a Web Worker."
|
|
351
|
-
},
|
|
352
|
-
"change-storybook-targets": {
|
|
353
|
-
"factory": "./src/generators/change-storybook-targets/change-storybook-targets",
|
|
354
|
-
"schema": "./src/generators/change-storybook-targets/schema.json",
|
|
355
|
-
"description": "Change storybook targets for Angular projects to use @storybook/angular executors"
|
|
356
345
|
}
|
|
357
346
|
}
|
|
358
347
|
}
|
package/mf/mf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ResolveRemoteUrlFunction = (remoteName: string) => string | Promise<string>;
|
|
2
2
|
export declare function setRemoteUrlResolver(_resolveRemoteUrl: ResolveRemoteUrlFunction): void;
|
|
3
3
|
export declare function setRemoteDefinitions(definitions: Record<string, string>): void;
|
|
4
4
|
export declare function loadRemoteModule(remoteName: string, moduleName: string): Promise<any>;
|
package/mf/mf.js
CHANGED
|
@@ -31,7 +31,8 @@ function loadRemoteModule(remoteName, moduleName) {
|
|
|
31
31
|
}
|
|
32
32
|
exports.loadRemoteModule = loadRemoteModule;
|
|
33
33
|
function loadModule(url) {
|
|
34
|
-
|
|
34
|
+
var _a;
|
|
35
|
+
return _a = url, Promise.resolve().then(() => require(_a));
|
|
35
36
|
}
|
|
36
37
|
let initialSharingScopeCreated = false;
|
|
37
38
|
function loadRemoteContainer(remoteName) {
|
package/mf/mf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mf.js","sourceRoot":"","sources":["../../../../packages/angular/mf/mf.ts"],"names":[],"mappings":";;;;AAOA,IAAI,gBAA0C,CAAC;AAC/C,SAAgB,oBAAoB,CAClC,iBAA2C;IAE3C,gBAAgB,GAAG,iBAAiB,CAAC;AACvC,CAAC;AAJD,oDAIC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YAAY,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC7D,YAAY,GAAG,GAAG,SAAS,GACzB,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACjC,iBAAiB,CAAC;SACnB;QAED,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,SAAS,CAAC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAEvD,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;CAAA"}
|
package/ng-package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/angular",
|
|
3
|
-
"version": "15.8.0-beta.
|
|
3
|
+
"version": "15.8.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"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.",
|
|
6
6
|
"repository": {
|
|
@@ -63,15 +63,17 @@
|
|
|
63
63
|
"migrations": "./migrations.json"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@nrwl/cypress": "15.8.0-beta.
|
|
67
|
-
"@nrwl/devkit": "15.8.0-beta.
|
|
68
|
-
"@nrwl/jest": "15.8.0-beta.
|
|
69
|
-
"@nrwl/
|
|
70
|
-
"@nrwl/
|
|
71
|
-
"@nrwl/
|
|
66
|
+
"@nrwl/cypress": "15.8.0-beta.2",
|
|
67
|
+
"@nrwl/devkit": "15.8.0-beta.2",
|
|
68
|
+
"@nrwl/jest": "15.8.0-beta.2",
|
|
69
|
+
"@nrwl/js": "15.8.0-beta.2",
|
|
70
|
+
"@nrwl/linter": "15.8.0-beta.2",
|
|
71
|
+
"@nrwl/webpack": "15.8.0-beta.2",
|
|
72
|
+
"@nrwl/workspace": "15.8.0-beta.2",
|
|
72
73
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
73
74
|
"chalk": "^4.1.0",
|
|
74
75
|
"chokidar": "^3.5.1",
|
|
76
|
+
"enquirer": "^2.3.6",
|
|
75
77
|
"http-server": "^14.1.0",
|
|
76
78
|
"ignore": "^5.0.4",
|
|
77
79
|
"magic-string": "~0.26.2",
|
|
@@ -106,5 +108,5 @@
|
|
|
106
108
|
"fesm2015": "fesm2015/nrwl-angular.mjs",
|
|
107
109
|
"typings": "index.d.ts",
|
|
108
110
|
"sideEffects": false,
|
|
109
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "5a67ea3e0f445870130c2e9110f07062a47c22bf"
|
|
110
112
|
}
|
|
@@ -7,6 +7,8 @@ const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
|
7
7
|
const webpack_dev_server_impl_1 = require("../webpack-dev-server/webpack-dev-server.impl");
|
|
8
8
|
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
9
9
|
const module_federation_1 = require("../utilities/module-federation");
|
|
10
|
+
const fs_1 = require("fs");
|
|
11
|
+
const path_1 = require("path");
|
|
10
12
|
function executeModuleFederationDevServerBuilder(schema, context) {
|
|
11
13
|
var _a, _b, _c;
|
|
12
14
|
const options = tslib_1.__rest(schema, []);
|
|
@@ -14,10 +16,21 @@ function executeModuleFederationDevServerBuilder(schema, context) {
|
|
|
14
16
|
const { projects: workspaceProjects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
|
|
15
17
|
const ws = new devkit_1.Workspaces(devkit_1.workspaceRoot);
|
|
16
18
|
const project = workspaceProjects[context.target.project];
|
|
19
|
+
let pathToManifestFile = (0, path_1.join)(context.workspaceRoot, project.sourceRoot, 'assets/module-federation.manifest.json');
|
|
20
|
+
if (options.pathToManifestFile) {
|
|
21
|
+
const userPathToManifestFile = (0, path_1.join)(context.workspaceRoot, options.pathToManifestFile);
|
|
22
|
+
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
23
|
+
throw new Error(`The provided Module Federation manifest file path does not exist. Please check the file exists at "${userPathToManifestFile}".`);
|
|
24
|
+
}
|
|
25
|
+
else if ((0, path_1.extname)(options.pathToManifestFile) !== '.json') {
|
|
26
|
+
throw new Error(`The Module Federation manifest file must be a JSON. Please ensure the file at ${userPathToManifestFile} is a JSON.`);
|
|
27
|
+
}
|
|
28
|
+
pathToManifestFile = userPathToManifestFile;
|
|
29
|
+
}
|
|
17
30
|
(0, module_federation_1.validateDevRemotes)(options, workspaceProjects);
|
|
18
31
|
const remotesToSkip = new Set((_a = options.skipRemotes) !== null && _a !== void 0 ? _a : []);
|
|
19
32
|
const staticRemotes = (0, module_federation_1.getStaticRemotes)(project, context, workspaceProjects, remotesToSkip);
|
|
20
|
-
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip);
|
|
33
|
+
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip, pathToManifestFile);
|
|
21
34
|
const remotes = [...staticRemotes, ...dynamicRemotes];
|
|
22
35
|
const devServeRemotes = !options.devRemotes
|
|
23
36
|
? []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation-dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,gEAA8D;AAC9D,2FAA+F;AAC/F,sEAA+F;AAC/F,sEAIwC;
|
|
1
|
+
{"version":3,"file":"module-federation-dev-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,gEAA8D;AAC9D,2FAA+F;AAC/F,sEAA+F;AAC/F,sEAIwC;AACxC,2BAAgC;AAChC,+BAAqC;AAErC,SAAgB,uCAAuC,CACrD,MAAc,EACd,OAA2D;;IAE3D,MAAW,OAAO,kBAAK,MAAM,EAAvB,EAAc,CAAS,CAAC;IAC9B,MAAM,YAAY,GAAG,IAAA,+BAAsB,GAAE,CAAC;IAC9C,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GACnC,IAAA,yDAAyC,EAAC,YAAY,CAAC,CAAC;IAC1D,MAAM,EAAE,GAAG,IAAI,mBAAU,CAAC,sBAAa,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE1D,IAAI,kBAAkB,GAAG,IAAA,WAAI,EAC3B,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,UAAU,EAClB,wCAAwC,CACzC,CAAC;IACF,IAAI,OAAO,CAAC,kBAAkB,EAAE;QAC9B,MAAM,sBAAsB,GAAG,IAAA,WAAI,EACjC,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,kBAAkB,CAC3B,CAAC;QACF,IAAI,CAAC,IAAA,eAAU,EAAC,sBAAsB,CAAC,EAAE;YACvC,MAAM,IAAI,KAAK,CACb,sGAAsG,sBAAsB,IAAI,CACjI,CAAC;SACH;aAAM,IAAI,IAAA,cAAO,EAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,OAAO,EAAE;YAC1D,MAAM,IAAI,KAAK,CACb,iFAAiF,sBAAsB,aAAa,CACrH,CAAC;SACH;QAED,kBAAkB,GAAG,sBAAsB,CAAC;KAC7C;IAED,IA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AAU,GAA0B,EAAE,CAAC;QAC7C,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,GAC1B,iBAAiB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YAEzD,IAAI,MAAM,CAAC,oBAAoB,IAAI,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE;gBACjE,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;aACtC;SACF;QAED,IAAA,8BAAc,EACZ,OAAO,CAAC,aAAa,EACrB;YACE,OAAO,EAAE,MAAM;YACf,MAAM;YACN,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa;YAC3C,UAAU;SACX,EACD,OAAO,CAAC,OAAO,CAChB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,GAAG,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC5B,MAAM,IAAI,KAAK,CACb,WAAW,MAAM,yDAAyD,GAAG,CAAC,QAAQ,EAAE,EAAE,CAC3F,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,IAAA,wDAA8B,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAtGD,0FAsGC;AAED,kBAAe,OAAO,CAAC,2BAA2B,CAAC,CAAC,aAAa,CAC/D,uCAAuC,CACxC,CAAC"}
|
|
@@ -118,6 +118,10 @@
|
|
|
118
118
|
"type": "string"
|
|
119
119
|
},
|
|
120
120
|
"description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository."
|
|
121
|
+
},
|
|
122
|
+
"pathToManifestFile": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic remote applications relative to the workspace root."
|
|
121
125
|
}
|
|
122
126
|
},
|
|
123
127
|
"additionalProperties": false,
|
|
@@ -10,6 +10,7 @@ const rxjs_1 = require("rxjs");
|
|
|
10
10
|
const path_1 = require("path");
|
|
11
11
|
const child_process_1 = require("child_process");
|
|
12
12
|
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
13
|
+
const fs_1 = require("fs");
|
|
13
14
|
function executeModuleFederationDevSSRBuilder(schema, context) {
|
|
14
15
|
var _a, _b, _c;
|
|
15
16
|
const options = tslib_1.__rest(schema, []);
|
|
@@ -17,10 +18,21 @@ function executeModuleFederationDevSSRBuilder(schema, context) {
|
|
|
17
18
|
const { projects: workspaceProjects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
|
|
18
19
|
const ws = new devkit_1.Workspaces(devkit_1.workspaceRoot);
|
|
19
20
|
const project = workspaceProjects[context.target.project];
|
|
21
|
+
let pathToManifestFile = (0, path_1.join)(context.workspaceRoot, project.sourceRoot, 'assets/module-federation.manifest.json');
|
|
22
|
+
if (options.pathToManifestFile) {
|
|
23
|
+
const userPathToManifestFile = (0, path_1.join)(context.workspaceRoot, options.pathToManifestFile);
|
|
24
|
+
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
25
|
+
throw new Error(`The provided Module Federation manifest file path does not exist. Please check the file exists at "${userPathToManifestFile}".`);
|
|
26
|
+
}
|
|
27
|
+
else if ((0, path_1.extname)(options.pathToManifestFile) !== '.json') {
|
|
28
|
+
throw new Error(`The Module Federation manifest file must be a JSON. Please ensure the file at ${userPathToManifestFile} is a JSON.`);
|
|
29
|
+
}
|
|
30
|
+
pathToManifestFile = userPathToManifestFile;
|
|
31
|
+
}
|
|
20
32
|
(0, module_federation_1.validateDevRemotes)(options, workspaceProjects);
|
|
21
33
|
const remotesToSkip = new Set((_a = options.skipRemotes) !== null && _a !== void 0 ? _a : []);
|
|
22
34
|
const staticRemotes = (0, module_federation_1.getStaticRemotes)(project, context, workspaceProjects, remotesToSkip);
|
|
23
|
-
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip);
|
|
35
|
+
const dynamicRemotes = (0, module_federation_1.getDynamicRemotes)(project, context, workspaceProjects, remotesToSkip, pathToManifestFile);
|
|
24
36
|
const remotes = [...staticRemotes, ...dynamicRemotes];
|
|
25
37
|
const devServeRemotes = !options.devRemotes
|
|
26
38
|
? []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation-dev-ssr.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.ts"],"names":[],"mappings":";;;;AACA,sEAA+F;AAC/F,yCAIsB;AACtB,sEAIwC;AACxC,8CAAgD;AAChD,+BAA4B;AAC5B,+
|
|
1
|
+
{"version":3,"file":"module-federation-dev-ssr.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.ts"],"names":[],"mappings":";;;;AACA,sEAA+F;AAC/F,yCAIsB;AACtB,sEAIwC;AACxC,8CAAgD;AAChD,+BAA4B;AAC5B,+BAAqC;AACrC,iDAA+C;AAC/C,gEAA8D;AAC9D,2BAAgC;AAEhC,SAAgB,oCAAoC,CAClD,MAAc,EACd,OAA2D;;IAE3D,MAAW,OAAO,kBAAK,MAAM,EAAvB,EAAc,CAAS,CAAC;IAC9B,MAAM,YAAY,GAAG,IAAA,+BAAsB,GAAE,CAAC;IAC9C,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GACnC,IAAA,yDAAyC,EAAC,YAAY,CAAC,CAAC;IAC1D,MAAM,EAAE,GAAG,IAAI,mBAAU,CAAC,sBAAa,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,iBAA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AAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAC3C;IAED,OAAO,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAClD,IAAA,qBAAS,EAAC,GAAG,EAAE,CAAC,IAAA,WAAI,uCAAQ,uBAAuB,GAAE,CAAC,EACtD,IAAA,qBAAS,EAAC,CAAC,EAAE,0BAA0B,EAAE,EAAE,EAAE,CAC3C,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CAC7C,CACF,CAAC;AACJ,CAAC;AA7ID,oFA6IC;AAED,kBAAe,OAAO,CAAC,2BAA2B,CAAC,CAAC,aAAa,CAC/D,oCAAoC,CACrC,CAAC"}
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"verbose": {
|
|
79
79
|
"type": "boolean",
|
|
80
80
|
"description": "Adds more details to output logging."
|
|
81
|
+
},
|
|
82
|
+
"pathToManifestFile": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic remote applications relative to the workspace root."
|
|
81
85
|
}
|
|
82
86
|
},
|
|
83
87
|
"additionalProperties": false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectConfiguration } from 'nx/src/config/workspace-json-project-json';
|
|
2
|
-
export declare function getDynamicRemotes(project: ProjectConfiguration, context: import('@angular-devkit/architect').BuilderContext, workspaceProjects: Record<string, ProjectConfiguration>, remotesToSkip: Set<string
|
|
2
|
+
export declare function getDynamicRemotes(project: ProjectConfiguration, context: import('@angular-devkit/architect').BuilderContext, workspaceProjects: Record<string, ProjectConfiguration>, remotesToSkip: Set<string>, pathToManifestFile?: string): string[];
|
|
3
3
|
export declare function getStaticRemotes(project: ProjectConfiguration, context: import('@angular-devkit/architect').BuilderContext, workspaceProjects: Record<string, ProjectConfiguration>, remotesToSkip: Set<string>): string[];
|
|
4
4
|
export declare function validateDevRemotes(options: {
|
|
5
5
|
devRemotes?: string[];
|
|
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateDevRemotes = exports.getStaticRemotes = exports.getDynamicRemotes = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
|
-
function getDynamicRemotes(project, context, workspaceProjects, remotesToSkip) {
|
|
6
|
+
function getDynamicRemotes(project, context, workspaceProjects, remotesToSkip, pathToManifestFile = (0, path_1.join)(context.workspaceRoot, project.sourceRoot, 'assets/module-federation.manifest.json')) {
|
|
7
7
|
// check for dynamic remotes
|
|
8
8
|
// we should only check for dynamic based on what we generate
|
|
9
9
|
// and fallback to empty array
|
|
10
|
-
|
|
11
|
-
if (!(0, fs_1.existsSync)(standardPathToGeneratedMFManifestJson)) {
|
|
10
|
+
if (!(0, fs_1.existsSync)(pathToManifestFile)) {
|
|
12
11
|
return [];
|
|
13
12
|
}
|
|
14
|
-
const moduleFederationManifestJson = (0, fs_1.readFileSync)(
|
|
13
|
+
const moduleFederationManifestJson = (0, fs_1.readFileSync)(pathToManifestFile, 'utf-8');
|
|
15
14
|
if (!moduleFederationManifestJson) {
|
|
16
15
|
return [];
|
|
17
16
|
}
|
|
@@ -29,8 +28,8 @@ function getDynamicRemotes(project, context, workspaceProjects, remotesToSkip) {
|
|
|
29
28
|
const invalidDynamicRemotes = dynamicRemotes.filter((remote) => !workspaceProjects[remote]);
|
|
30
29
|
if (invalidDynamicRemotes.length) {
|
|
31
30
|
throw new Error(invalidDynamicRemotes.length === 1
|
|
32
|
-
? `Invalid dynamic remote configured in "${
|
|
33
|
-
: `Invalid dynamic remotes configured in "${
|
|
31
|
+
? `Invalid dynamic remote configured in "${pathToManifestFile}": ${invalidDynamicRemotes[0]}.`
|
|
32
|
+
: `Invalid dynamic remotes configured in "${pathToManifestFile}": ${invalidDynamicRemotes.join(', ')}.`);
|
|
34
33
|
}
|
|
35
34
|
return dynamicRemotes;
|
|
36
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/utilities/module-federation.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,2BAA8C;AAG9C,SAAgB,iBAAiB,CAC/B,OAA6B,EAC7B,OAA2D,EAC3D,iBAAuD,EACvD,aAA0B
|
|
1
|
+
{"version":3,"file":"module-federation.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/utilities/module-federation.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,2BAA8C;AAG9C,SAAgB,iBAAiB,CAC/B,OAA6B,EAC7B,OAA2D,EAC3D,iBAAuD,EACvD,aAA0B,EAC1B,kBAAkB,GAAG,IAAA,WAAI,EACvB,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,UAAU,EAClB,wCAAwC,CACzC;IAED,4BAA4B;IAC5B,6DAA6D;IAC7D,8BAA8B;IAE9B,IAAI,CAAC,IAAA,eAAU,EAAC,kBAAkB,CAAC,EAAE;QACnC,OAAO,EAAE,CAAC;KACX;IAED,MAAM,4BAA4B,GAAG,IAAA,iBAAY,EAC/C,kBAAkB,EAClB,OAAO,CACR,CAAC;IAEF,IAAI,CAAC,4BAA4B,EAAE;QACjC,OAAO,EAAE,CAAC;KACX;IAED,4BAA4B;IAC5B,IAAI;IACJ,oCAAoC;IACpC,IAAI;IACJ,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChE,IACE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAChC,CAAC,GAAG,EAAE,EAAE,CACN,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,cAAc,CAAC,GAAG,CAAC,KAAK,QAAQ,CACrE,EACD;QACA,OAAO,EAAE,CAAC;KACX;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;SAClD,GAAG,CAAC,CA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import('@angular-devkit/build-angular/src/builders/browser/schema').Schema & {
|
|
3
3
|
customWebpackConfig?: {
|
|
4
4
|
path: string;
|
|
5
5
|
};
|
|
@@ -12,9 +12,10 @@ const add_angular_eslint_dependencies_1 = require("./lib/add-angular-eslint-depe
|
|
|
12
12
|
const create_eslint_configuration_1 = require("./lib/create-eslint-configuration");
|
|
13
13
|
function addLintingGenerator(tree, options) {
|
|
14
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
var _a;
|
|
15
16
|
const generatorDirectory = (0, version_utils_1.getGeneratorDirectoryForInstalledAngularVersion)(tree);
|
|
16
17
|
if (generatorDirectory) {
|
|
17
|
-
let previousGenerator = yield
|
|
18
|
+
let previousGenerator = yield (_a = (0, path_1.join)(__dirname, generatorDirectory, 'add-linting'), Promise.resolve().then(() => require(_a)));
|
|
18
19
|
yield previousGenerator.default(tree, options);
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/add-linting/add-linting.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,yCAA4D;AAC5D,wFAAuF;AACvF,2FAAqF;AACrF,+BAA4B;AAC5B,0DAAyF;AACzF,2FAAqF;AACrF,mFAA4E;AAG5E,SAAsB,mBAAmB,CACvC,IAAU,EACV,OAAkC
|
|
1
|
+
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/add-linting/add-linting.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,yCAA4D;AAC5D,wFAAuF;AACvF,2FAAqF;AACrF,+BAA4B;AAC5B,0DAAyF;AACzF,2FAAqF;AACrF,mFAA4E;AAG5E,SAAsB,mBAAmB,CACvC,IAAU,EACV,OAAkC;;;QAElC,MAAM,kBAAkB,GACtB,IAAA,+DAA+C,EAAC,IAAI,CAAC,CAAC;QACxD,IAAI,kBAAkB,EAA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C,IAAI,CAAC,WAAW,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA7CD,kDA6CC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Tree } from '@nrwl/devkit';
|
|
2
2
|
import type { Linter } from 'eslint';
|
|
3
3
|
import type { AddLintingGeneratorSchema } from '../schema';
|
|
4
|
-
|
|
4
|
+
type EslintExtensionSchema = {
|
|
5
5
|
prefix: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Tree } from '@nrwl/devkit';
|
|
2
2
|
import type { Linter } from 'eslint';
|
|
3
3
|
import type { AddLintingGeneratorSchema } from '../schema';
|
|
4
|
-
|
|
4
|
+
type EslintExtensionSchema = {
|
|
5
5
|
prefix: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToStandaloneApp = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
6
5
|
function convertToStandaloneApp(tree, options) {
|
|
7
6
|
const pathToAppModule = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src/app/app.module.ts');
|
|
8
7
|
updateMainEntrypoint(options, tree, pathToAppModule);
|
|
@@ -16,10 +15,11 @@ exports.convertToStandaloneApp = convertToStandaloneApp;
|
|
|
16
15
|
function updateMainEntrypoint(options, tree, pathToAppModule) {
|
|
17
16
|
let routerModuleSetup;
|
|
18
17
|
if (options.routing) {
|
|
18
|
+
const { tsquery } = require('@phenomnomnominal/tsquery');
|
|
19
19
|
const appModuleContents = tree.read(pathToAppModule, 'utf-8');
|
|
20
|
-
const ast =
|
|
20
|
+
const ast = tsquery.ast(appModuleContents);
|
|
21
21
|
const ROUTER_MODULE_SELECTOR = 'PropertyAssignment:has(Identifier[name=imports]) CallExpression:has(PropertyAccessExpression > Identifier[name=RouterModule])';
|
|
22
|
-
const nodes =
|
|
22
|
+
const nodes = tsquery(ast, ROUTER_MODULE_SELECTOR, {
|
|
23
23
|
visitAllChildren: true,
|
|
24
24
|
});
|
|
25
25
|
if (nodes.length > 0) {
|
|
@@ -47,9 +47,10 @@ bootstrapApplication(AppComponent${routerModuleSetup
|
|
|
47
47
|
function updateAppComponent(tree, options) {
|
|
48
48
|
const pathToAppComponent = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src/app/app.component.ts');
|
|
49
49
|
const appComponentContents = tree.read(pathToAppComponent, 'utf-8');
|
|
50
|
-
const
|
|
50
|
+
const { tsquery } = require('@phenomnomnominal/tsquery');
|
|
51
|
+
const ast = tsquery.ast(appComponentContents);
|
|
51
52
|
const COMPONENT_DECORATOR_SELECTOR = 'Decorator > CallExpression:has(Identifier[name=Component]) ObjectLiteralExpression';
|
|
52
|
-
const nodes =
|
|
53
|
+
const nodes = tsquery(ast, COMPONENT_DECORATOR_SELECTOR, {
|
|
53
54
|
visitAllChildren: true,
|
|
54
55
|
});
|
|
55
56
|
if (nodes.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-standalone-app.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/convert-to-standalone-app.ts"],"names":[],"mappings":";;;AACA,yCAAiD;
|
|
1
|
+
{"version":3,"file":"convert-to-standalone-app.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/convert-to-standalone-app.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAGjD,SAAgB,sBAAsB,CAAC,IAAU,EAAE,OAAyB;IAC1E,MAAM,eA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AC;AAC1D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAU,EAAE,OAAyB;IACnE,MAAM,sBAAsB,GAAG,IAAA,0BAAiB,EAC9C,OAAO,CAAC,cAAc,EACtB,+BAA+B,CAChC,CAAC;IACF,MAAM,wBAAwB,GAAG,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAE5E,IAAI,2BAAmC,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;QACpB,2BAA2B,GAAG,wBAAwB,CAAC,OAAO,CAC5D,cAAc,EACd,SAAS,CACV,CAAC;KACH;SAAM;QACL,2BAA2B,GAAG,wBAAwB;aACnD,OAAO,CACN,iCAAiC,EACjC,kEAAkE,CACnE;aACA,OAAO,CAAC,kDAAkD,EAAE,EAAE,CAAC,CAAC;KACpE;IAED,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-files.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/create-files.ts"],"names":[],"mappings":";;;AACA,yCAAgE;
|
|
1
|
+
{"version":3,"file":"create-files.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/create-files.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAGhE,SAAgB,WAAW,CAAC,IAAU,EAAE,OAAyB;IAC/D,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,UAAU,CAAC,EACxC,OAAO,CAAC,cAAc,kCAEjB,OAAO,KACV,GAAG,EAAE,EAAE,IAEV,CAAC;IAEF,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;QACpB,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EAAC,OAAO,CAAC,cAAc,EAAE,uBAAuB,CAAC,CACnE,CAAC;KACH;AACH,CAAC;AAhBD,kCAgBC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateComponentSpec = void 0;
|
|
4
|
-
const ts = require("typescript");
|
|
5
4
|
const ast_utils_1 = require("@nrwl/workspace/src/utilities/ast-utils");
|
|
6
5
|
const ast_utils_2 = require("../../../../utils/nx-devkit/ast-utils");
|
|
6
|
+
let tsModule;
|
|
7
7
|
function updateComponentSpec(host, options) {
|
|
8
|
+
if (!tsModule) {
|
|
9
|
+
tsModule = require('typescript');
|
|
10
|
+
}
|
|
8
11
|
if (options.skipTests !== true) {
|
|
9
12
|
const componentSpecPath = `${options.appProjectRoot}/src/app/app.component.spec.ts`;
|
|
10
13
|
const componentSpecSource = host.read(componentSpecPath, 'utf-8');
|
|
11
|
-
let componentSpecSourceFile =
|
|
14
|
+
let componentSpecSourceFile = tsModule.createSourceFile(componentSpecPath, componentSpecSource, tsModule.ScriptTarget.Latest, true);
|
|
12
15
|
host.write(componentSpecPath, componentSpecSource
|
|
13
16
|
.replace('.content span', 'h1')
|
|
14
17
|
.replace(`${options.name} app is running!`, `Welcome ${options.name}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-component-spec.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-component-spec.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"update-component-spec.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-component-spec.ts"],"names":[],"mappings":";;;AAGA,uEAAuE;AACvE,qEAG+C;AAE/C,IAAI,QAAqC,CAAC;AAE1C,SAAgB,mBAAmB,CAAC,IAAU,EAAE,OAAyB;IACvE,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;KAClC;IACD,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI,EAAE;QAC9B,MAAM,iBAAiB,GAAG,GAAG,OAAO,CAAC,cAAc,gCAAgC,CAAC;QACpF,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAElE,IAAI,uBAAuB,GAAG,QAAQ,CAAC,gBAAgB,CACrD,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,CAAC,YAAY,CAAC,MAAM,EAC5B,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,KAAK,CACR,iBAAiB,EACjB,mBAAmB;aAChB,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC;aAC9B,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,kBAAkB,EAAE,WAAW,OAAO,CAAC,IAAI,EAAE,CAAC,CACzE,CAAC;QAEF,mDAAmD;QACnD,uBAAuB,GAAG,IAAA,wBAAY,EACpC,IAAI,EACJ,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,CACzB,CAAC;QAEF,uBAAuB,GAAG,IAAA,gCAAoB,EAC5C,IAAI,EACJ,uBAAuB,EACvB,iBAAiB,EACjB,kDAAkD,EAClD;;;;KAID,CACA,CAAC;QAEF,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,uBAAuB,GAAG,IAAA,wBAAY,EACpC,IAAI,EACJ,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,CAC1B,CAAC;YAEF,uBAAuB,GAAG,IAAA,8BAAkB,EAC1C,IAAI,EACJ,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,CACtB,CAAC;SACH;KACF;AACH,CAAC;AA5DD,kDA4DC"}
|
|
@@ -4,9 +4,9 @@ exports.updateConfigFiles = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const cli_config_utils_1 = require("@nrwl/workspace/src/utils/cli-config-utils");
|
|
7
|
+
const js_1 = require("@nrwl/js");
|
|
7
8
|
const test_runners_1 = require("../../../../utils/test-runners");
|
|
8
9
|
const create_ts_config_1 = require("../../../utils/create-ts-config");
|
|
9
|
-
const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
|
|
10
10
|
function updateConfigFiles(host, options) {
|
|
11
11
|
if (!options.rootProject) {
|
|
12
12
|
(0, create_ts_config_1.extractTsConfigBase)(host);
|
|
@@ -25,7 +25,7 @@ function updateTsConfigOptions(host, options) {
|
|
|
25
25
|
'**/*.spec.ts',
|
|
26
26
|
]),
|
|
27
27
|
] })));
|
|
28
|
-
(0, create_ts_config_1.createTsConfig)(host, options.appProjectRoot, 'app', options, (0,
|
|
28
|
+
(0, create_ts_config_1.createTsConfig)(host, options.appProjectRoot, 'app', options, (0, js_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot));
|
|
29
29
|
}
|
|
30
30
|
function updateAppAndE2EProjectConfigurations(host, options) {
|
|
31
31
|
let project = (0, devkit_1.readProjectConfiguration)(host, options.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-config-files.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-config-files.ts"],"names":[],"mappings":";;;;AACA,yCAQsB;AACtB,iFAAoF;AACpF,iEAA+E;AAE/E,sEAGyC;
|
|
1
|
+
{"version":3,"file":"update-config-files.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-config-files.ts"],"names":[],"mappings":";;;;AACA,yCAQsB;AACtB,iFAAoF;AACpF,iCAAyD;AACzD,iEAA+E;AAE/E,sEAGyC;AAEzC,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;QACxB,IAAA,sCAAmB,EAAC,IAAI,CAAC,CAAC;KAC3B;IACD,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,oCAAoC,CAAC,IAAI,EAAE,OAAO,CAAC,CAA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GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YACxC,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;SAC1D;KACF;IAED,mCAAmC;IACnC,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,gBAAgB,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,cAAc,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateE2eProject = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const js_1 = require("@nrwl/js");
|
|
6
6
|
function updateE2eProject(tree, options) {
|
|
7
7
|
const spec = `${options.e2eProjectRoot}/src/app.e2e-spec.ts`;
|
|
8
8
|
const content = tree.read(spec, 'utf-8');
|
|
@@ -33,7 +33,7 @@ function updateE2eProject(tree, options) {
|
|
|
33
33
|
});
|
|
34
34
|
// update tsconfig
|
|
35
35
|
(0, devkit_1.updateJson)(tree, `${options.e2eProjectRoot}/tsconfig.json`, (json) => {
|
|
36
|
-
return Object.assign(Object.assign({}, json), { extends: (0,
|
|
36
|
+
return Object.assign(Object.assign({}, json), { extends: (0, js_1.getRelativePathToRootTsConfig)(tree, options.e2eProjectRoot) });
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
exports.updateE2eProject = updateE2eProject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-e2e-project.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-e2e-project.ts"],"names":[],"mappings":";;;AACA,yCAMsB;AACtB,
|
|
1
|
+
{"version":3,"file":"update-e2e-project.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/application/angular-v14/lib/update-e2e-project.ts"],"names":[],"mappings":";;;AACA,yCAM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E,IAAI,CAAC,CAAC;IAErD,sBAAsB;IACtB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,oBAAoB,CAAC,EAAE;QAC/D,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,cAAc,oBAAoB,EAAE,IAAI,CAAC,CAAC;KACjE;IAED,IAAA,mBAAU,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE;QACvE,uCACK,IAAI,KACP,OAAO,EAAE,iBAAiB,EAC1B,eAAe,kCACV,IAAI,CAAC,eAAe,KACvB,MAAM,EAAE,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,CAAC,cAAc,OAEjE;IACJ,CAAC,CAAC,CAAC;IAEH,kBAAkB;IAClB,IAAA,mBAAU,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE;QACnE,uCACK,IAAI,KACP,OAAO,EAAE,IAAA,kCAA6B,EAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,IACpE;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAtDD,4CAsDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tree } from '@nrwl/devkit';
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
2
2
|
import type { Schema } from './schema';
|
|
3
|
-
export declare function applicationGenerator(tree: Tree, schema: Partial<Schema>): Promise<
|
|
3
|
+
export declare function applicationGenerator(tree: Tree, schema: Partial<Schema>): Promise<GeneratorCallback>;
|
|
4
4
|
export default applicationGenerator;
|
|
@@ -10,16 +10,27 @@ const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
|
10
10
|
const version_utils_1 = require("../utils/version-utils");
|
|
11
11
|
const lib_1 = require("./lib");
|
|
12
12
|
const semver_1 = require("semver");
|
|
13
|
+
const enquirer_1 = require("enquirer");
|
|
13
14
|
function applicationGenerator(tree, schema) {
|
|
14
15
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
var _a;
|
|
15
17
|
const installedAngularVersionInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
16
18
|
if ((0, semver_1.lt)(installedAngularVersionInfo.version, '14.1.0') && schema.standalone) {
|
|
17
19
|
throw new Error((0, devkit_1.stripIndents) `The "standalone" option is only supported in Angular >= 14.1.0. You are currently using ${installedAngularVersionInfo.version}.
|
|
18
20
|
You can resolve this error by removing the "standalone" option or by migrating to Angular 14.1.0.`);
|
|
19
21
|
}
|
|
22
|
+
if ((0, semver_1.gte)(installedAngularVersionInfo.version, '14.1.0') &&
|
|
23
|
+
schema.standalone === undefined &&
|
|
24
|
+
process.env.NX_INTERACTIVE === 'true') {
|
|
25
|
+
schema.standalone = yield (0, enquirer_1.prompt)({
|
|
26
|
+
name: 'standalone-components',
|
|
27
|
+
message: 'Would you like to use Standalone Components?',
|
|
28
|
+
type: 'confirm',
|
|
29
|
+
}).then((a) => a['standalone-components']);
|
|
30
|
+
}
|
|
20
31
|
const generatorDirectory = (0, version_utils_1.getGeneratorDirectoryForInstalledAngularVersion)(tree);
|
|
21
32
|
if (generatorDirectory) {
|
|
22
|
-
let previousGenerator = yield
|
|
33
|
+
let previousGenerator = yield (_a = (0, path_1.join)(__dirname, generatorDirectory, 'application'), Promise.resolve().then(() => require(_a)));
|
|
23
34
|
return yield previousGenerator.default(tree, schema);
|
|
24
35
|
}
|
|
25
36
|
const options = (0, lib_1.normalizeOptions)(tree, schema);
|