@nrwl/angular 14.7.18 → 15.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.
- package/CHANGELOG.md +1 -1
- package/esm2020/index.mjs +2 -3
- package/esm2020/src/runtime/nx/data-persistence.mjs +2 -59
- package/esm2020/testing/index.mjs +1 -18
- package/fesm2015/nrwl-angular-testing.mjs +1 -19
- package/fesm2015/nrwl-angular-testing.mjs.map +1 -1
- package/fesm2015/nrwl-angular.mjs +2 -79
- package/fesm2015/nrwl-angular.mjs.map +1 -1
- package/fesm2020/nrwl-angular-testing.mjs +1 -19
- package/fesm2020/nrwl-angular-testing.mjs.map +1 -1
- package/fesm2020/nrwl-angular.mjs +2 -79
- package/fesm2020/nrwl-angular.mjs.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -4
- package/index.js.map +1 -1
- package/migrations.json +6 -0
- package/ng-package.json +0 -1
- package/package.json +9 -10
- package/src/generators/application/application.js +0 -3
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/files/src/app/app.routes.ts__tpl__ +3 -0
- package/src/generators/application/lib/convert-to-standalone-app.js +1 -0
- package/src/generators/application/lib/convert-to-standalone-app.js.map +1 -1
- package/src/generators/application/lib/create-files.d.ts +1 -1
- package/src/generators/application/lib/create-files.js +5 -2
- package/src/generators/application/lib/create-files.js.map +1 -1
- package/src/generators/application/lib/index.d.ts +0 -1
- package/src/generators/application/lib/index.js +0 -1
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/application/lib/normalized-schema.d.ts +3 -2
- package/src/generators/application/lib/root-router-config.js +2 -1
- package/src/generators/application/lib/root-router-config.js.map +1 -1
- package/src/generators/application/schema.d.ts +1 -23
- package/src/generators/application/schema.json +0 -30
- package/src/generators/host/host.js +4 -16
- package/src/generators/host/host.js.map +1 -1
- package/src/generators/host/schema.d.ts +1 -3
- package/src/generators/init/schema.d.ts +1 -1
- package/src/generators/library/lib/add-children.js +9 -14
- package/src/generators/library/lib/add-children.js.map +1 -1
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.d.ts +1 -1
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js +17 -8
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js.map +1 -1
- package/src/generators/library/lib/add-load-children.js +7 -13
- package/src/generators/library/lib/add-load-children.js.map +1 -1
- package/src/generators/library/lib/add-module.js +2 -2
- package/src/generators/library/lib/add-module.js.map +1 -1
- package/src/generators/library/lib/add-router-configuration.d.ts +1 -1
- package/src/generators/library/lib/add-router-configuration.js +13 -5
- package/src/generators/library/lib/add-router-configuration.js.map +1 -1
- package/src/generators/library/lib/add-standalone-component.js +4 -4
- package/src/generators/library/lib/add-standalone-component.js.map +1 -1
- package/src/generators/library/lib/normalized-schema.d.ts +3 -3
- package/src/generators/library/schema.d.ts +2 -4
- package/src/generators/library/schema.json +2 -3
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.spec.ts__tmpl__ +2 -6
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.ts__tmpl__ +5 -17
- package/src/generators/ngrx/files/__directory__/__fileName__.facade.spec.ts__tmpl__ +0 -2
- package/src/generators/ngrx/lib/add-imports-to-module.js +0 -6
- package/src/generators/ngrx/lib/add-imports-to-module.js.map +1 -1
- package/src/generators/ngrx/schema.d.ts +0 -5
- package/src/generators/ngrx/schema.json +0 -6
- package/src/generators/remote/schema.d.ts +1 -3
- package/src/generators/setup-mf/files/entry-module-files/entry.module.ts__tmpl__ +3 -7
- package/src/generators/setup-mf/files/{standalone-entry-component-files/routes.ts__tmpl__ → entry-module-files/entry.routes.ts__tmpl__} +1 -1
- package/src/generators/setup-mf/files/standalone-entry-component-files/entry.routes.ts__tmpl__ +4 -0
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/lib/add-remote-entry.js +8 -1
- package/src/generators/setup-mf/lib/add-remote-entry.js.map +1 -1
- package/src/generators/setup-mf/lib/add-remote-to-host.js +9 -23
- package/src/generators/setup-mf/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-mf/lib/fix-bootstrap.js +2 -2
- package/src/generators/storybook-configuration/schema.d.ts +1 -1
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.d.ts +2 -0
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +94 -0
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js.map +1 -0
- package/src/runtime/nx/data-persistence.d.ts +4 -46
- package/src/runtime/nx/data-persistence.js +1 -57
- package/src/runtime/nx/data-persistence.js.map +1 -1
- package/src/utils/nx-devkit/ast-utils.d.ts +1 -1
- package/src/utils/nx-devkit/ast-utils.js +3 -3
- package/src/utils/nx-devkit/ast-utils.js.map +1 -1
- package/src/utils/nx-devkit/route-utils.d.ts +2 -0
- package/src/utils/nx-devkit/route-utils.js +39 -0
- package/src/utils/nx-devkit/route-utils.js.map +1 -0
- package/src/utils/versions.d.ts +1 -0
- package/src/utils/versions.js +2 -1
- package/src/utils/versions.js.map +1 -1
- package/testing/index.d.ts +0 -17
- package/testing/index.js +1 -18
- package/testing/index.js.map +1 -1
- package/esm2020/src/runtime/nx/nx.module.mjs +0 -23
- package/src/generators/application/lib/add-mf.d.ts +0 -3
- package/src/generators/application/lib/add-mf.js +0 -24
- package/src/generators/application/lib/add-mf.js.map +0 -1
- package/src/runtime/nx/nx.module.d.ts +0 -15
- package/src/runtime/nx/nx.module.js +0 -24
- package/src/runtime/nx/nx.module.js.map +0 -1
- package/src/utils/nx-devkit/standalone-utils.d.ts +0 -2
- package/src/utils/nx-devkit/standalone-utils.js +0 -37
- package/src/utils/nx-devkit/standalone-utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-lazy-loaded-router-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-lazy-loaded-router-configuration.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"add-lazy-loaded-router-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-lazy-loaded-router-configuration.ts"],"names":[],"mappings":";;;AAAA,yCAA8D;AAC9D,uEAAuE;AACvE,iCAAiC;AACjC,kEAAuE;AAEvE,+BAA+B;AAE/B,SAAgB,gCAAgC,CAC9C,IAAU,EACV,OAA2C;IAE3C,MAAM,SAAS,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,YAAY,QAAQ,CAAC;IAClE,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,IAAA,cAAO,EAAC,OAAO,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC,EAC/D;;eAEW,SAAS,wFAAwF,CAC7G,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/D,IAAI,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAClC,OAAO,CAAC,UAAU,EAClB,eAAe,EACf,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,OAAO,CAAC,UAAU,EAClB;4BACwB,SAAS,IAAI,CACtC,CAAC;IAEF,UAAU,GAAG,IAAA,wBAAY,EACvB,IAAI,EACJ,UAAU,EACV,OAAO,CAAC,UAAU,EAClB,cAAc,EACd,iBAAiB,CAClB,CAAC;IACF,UAAU,GAAG,IAAA,wBAAY,EACvB,IAAI,EACJ,UAAU,EACV,OAAO,CAAC,UAAU,EAClB,SAAS,EACT,cAAc,CACf,CAAC;IAEF,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC3E,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK,CACR,WAAW,EACX,GAAG,iBAAiB;oCACY,CACjC,CAAC;AACJ,CAAC;AAjDD,4EAiDC"}
|
|
@@ -3,23 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addLoadChildren = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const ts = require("typescript");
|
|
6
|
-
const
|
|
7
|
-
const standalone_utils_1 = require("../../../utils/nx-devkit/standalone-utils");
|
|
6
|
+
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
|
8
7
|
function addLoadChildren(tree, options) {
|
|
9
|
-
if (!tree.exists(options.
|
|
10
|
-
throw new Error(`Cannot find '${options.
|
|
8
|
+
if (!tree.exists(options.parent)) {
|
|
9
|
+
throw new Error(`Cannot find '${options.parent}'`);
|
|
11
10
|
}
|
|
12
|
-
const moduleSource = tree.read(options.
|
|
13
|
-
const sourceFile = ts.createSourceFile(options.
|
|
11
|
+
const moduleSource = tree.read(options.parent, 'utf-8');
|
|
12
|
+
const sourceFile = ts.createSourceFile(options.parent, moduleSource, ts.ScriptTarget.Latest, true);
|
|
14
13
|
const route = `{path: '${(0, devkit_1.names)(options.fileName).fileName}', loadChildren: () => import('${options.importPath}').then(m => m.${options.standalone
|
|
15
|
-
? `${(0, devkit_1.names)(options.name).
|
|
14
|
+
? `${(0, devkit_1.names)(options.name).propertyName}Routes`
|
|
16
15
|
: options.moduleName})}`;
|
|
17
|
-
|
|
18
|
-
(0, ast_utils_1.addRoute)(tree, options.parentModule, sourceFile, route);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
(0, standalone_utils_1.addStandaloneRoute)(tree, options.parentModule, route);
|
|
22
|
-
}
|
|
16
|
+
(0, route_utils_1.addRoute)(tree, options.parent, route);
|
|
23
17
|
}
|
|
24
18
|
exports.addLoadChildren = addLoadChildren;
|
|
25
19
|
//# sourceMappingURL=add-load-children.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-load-children.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-load-children.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAC3C,iCAAiC;
|
|
1
|
+
{"version":3,"file":"add-load-children.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-load-children.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAC3C,iCAAiC;AAEjC,sEAAgE;AAEhE,SAAgB,eAAe,CAC7B,IAAU,EACV,OAA2C;IAE3C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAChC,MAAM,IAAI,KAAK,CAAC,gBAAgB,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;KACpD;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,OAAO,CAAC,MAAM,EACd,YAAY,EACZ,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IAEF,MAAM,KAAK,GAAG,WACZ,IAAA,cAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAC1B,kCAAkC,OAAO,CAAC,UAAU,kBAClD,OAAO,CAAC,UAAU;QAChB,CAAC,CAAC,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,QAAQ;QAC7C,CAAC,CAAC,OAAO,CAAC,UACd,IAAI,CAAC;IAEL,IAAA,sBAAQ,EAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAzBD,0CAyBC"}
|
|
@@ -9,13 +9,13 @@ function addModule(host, options) {
|
|
|
9
9
|
if (options.routing && options.lazy) {
|
|
10
10
|
(0, add_lazy_loaded_router_configuration_1.addLazyLoadedRouterConfiguration)(host, options);
|
|
11
11
|
}
|
|
12
|
-
if (options.routing && options.lazy && options.
|
|
12
|
+
if (options.routing && options.lazy && options.parent) {
|
|
13
13
|
(0, add_load_children_1.addLoadChildren)(host, options);
|
|
14
14
|
}
|
|
15
15
|
if (options.routing && !options.lazy) {
|
|
16
16
|
(0, add_router_configuration_1.addRouterConfiguration)(host, options);
|
|
17
17
|
}
|
|
18
|
-
if (options.routing && !options.lazy && options.
|
|
18
|
+
if (options.routing && !options.lazy && options.parent) {
|
|
19
19
|
(0, add_children_1.addChildren)(host, options);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-module.ts"],"names":[],"mappings":";;;AACA,iDAA6C;AAC7C,iGAA0F;AAC1F,2DAAsD;AACtD,yEAAoE;AAGpE,SAAgB,SAAS,CACvB,IAAU,EACV,OAA2C;IAE3C,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;QACnC,IAAA,uEAAgC,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACjD;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"add-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-module.ts"],"names":[],"mappings":";;;AACA,iDAA6C;AAC7C,iGAA0F;AAC1F,2DAAsD;AACtD,yEAAoE;AAGpE,SAAgB,SAAS,CACvB,IAAU,EACV,OAA2C;IAE3C,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;QACnC,IAAA,uEAAgC,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACjD;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE;QACrD,IAAA,mCAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KAChC;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QACpC,IAAA,iDAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACvC;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE;QACtD,IAAA,0BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KAC5B;AACH,CAAC;AAhBD,8BAgBC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Tree } from '@nrwl/devkit';
|
|
2
2
|
import { NormalizedSchema } from './normalized-schema';
|
|
3
|
-
export declare function addRouterConfiguration(
|
|
3
|
+
export declare function addRouterConfiguration(tree: Tree, options: NormalizedSchema['libraryOptions']): void;
|
|
@@ -5,13 +5,21 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
5
5
|
const ast_utils_1 = require("@nrwl/workspace/src/utilities/ast-utils");
|
|
6
6
|
const ts = require("typescript");
|
|
7
7
|
const ast_utils_2 = require("../../../utils/nx-devkit/ast-utils");
|
|
8
|
-
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
function addRouterConfiguration(tree, options) {
|
|
9
10
|
const constName = `${(0, devkit_1.names)(options.fileName).propertyName}Routes`;
|
|
10
|
-
const moduleSource =
|
|
11
|
+
const moduleSource = tree.read(options.modulePath, 'utf-8');
|
|
11
12
|
let moduleSourceFile = ts.createSourceFile(options.modulePath, moduleSource, ts.ScriptTarget.Latest, true);
|
|
12
|
-
moduleSourceFile = (0, ast_utils_2.addImportToModule)(
|
|
13
|
-
moduleSourceFile = (0, ast_utils_1.insertImport)(
|
|
14
|
-
moduleSourceFile = (0, ast_utils_1.
|
|
13
|
+
moduleSourceFile = (0, ast_utils_2.addImportToModule)(tree, moduleSourceFile, options.modulePath, `RouterModule`);
|
|
14
|
+
moduleSourceFile = (0, ast_utils_1.insertImport)(tree, moduleSourceFile, options.modulePath, 'RouterModule, Route', '@angular/router');
|
|
15
|
+
moduleSourceFile = (0, ast_utils_1.insertImport)(tree, moduleSourceFile, options.modulePath, constName, './lib.routes');
|
|
16
|
+
tree.write((0, devkit_1.joinPathFragments)((0, path_1.dirname)(options.modulePath), 'lib.routes.ts'), `import { Route } from '@angular/router';
|
|
17
|
+
|
|
18
|
+
export const ${constName}: Route[] = [];`);
|
|
19
|
+
const pathToIndex = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/index.ts');
|
|
20
|
+
const indexFileContents = tree.read(pathToIndex, 'utf-8');
|
|
21
|
+
tree.write(pathToIndex, `${indexFileContents}
|
|
22
|
+
export * from './lib/lib.routes';`);
|
|
15
23
|
}
|
|
16
24
|
exports.addRouterConfiguration = addRouterConfiguration;
|
|
17
25
|
//# sourceMappingURL=add-router-configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-router-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-router-configuration.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"add-router-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-router-configuration.ts"],"names":[],"mappings":";;;AACA,yCAAwD;AACxD,uEAAuE;AACvE,iCAAiC;AACjC,kEAAuE;AAEvE,+BAA+B;AAE/B,SAAgB,sBAAsB,CACpC,IAAU,EACV,OAA2C;IAE3C,MAAM,SAAS,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,YAAY,QAAQ,CAAC;IAClE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,IAAI,gBAAgB,GAAG,EAAE,CAAC,gBAAgB,CACxC,OAAO,CAAC,UAAU,EAClB,YAAY,EACZ,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IAEF,gBAAgB,GAAG,IAAA,6BAAiB,EAClC,IAAI,EACJ,gBAAgB,EAChB,OAAO,CAAC,UAAU,EAClB,cAAc,CACf,CAAC;IACF,gBAAgB,GAAG,IAAA,wBAAY,EAC7B,IAAI,EACJ,gBAAgB,EAChB,OAAO,CAAC,UAAU,EAClB,qBAAqB,EACrB,iBAAiB,CAClB,CAAC;IACF,gBAAgB,GAAG,IAAA,wBAAY,EAC7B,IAAI,EACJ,gBAAgB,EAChB,OAAO,CAAC,UAAU,EAClB,SAAS,EACT,cAAc,CACf,CAAC;IAEF,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,IAAA,cAAO,EAAC,OAAO,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC,EAC/D;;eAEW,SAAS,iBAAiB,CACtC,CAAC;IAEF,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC3E,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK,CACR,WAAW,EACX,GAAG,iBAAiB;oCACY,CACjC,CAAC;AACJ,CAAC;AAhDD,wDAgDC"}
|
|
@@ -11,19 +11,19 @@ function addStandaloneComponent(tree, { libraryOptions, componentOptions }) {
|
|
|
11
11
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
12
|
yield (0, component_1.default)(tree, Object.assign(Object.assign({}, componentOptions), { name: componentOptions.name, standalone: true, export: true, project: libraryOptions.name }));
|
|
13
13
|
if (libraryOptions.routing) {
|
|
14
|
-
const pathToRoutes = (0, path_1.joinPathFragments)(libraryOptions.projectRoot, 'src/lib/routes.ts');
|
|
14
|
+
const pathToRoutes = (0, path_1.joinPathFragments)(libraryOptions.projectRoot, 'src/lib/lib.routes.ts');
|
|
15
15
|
const routesContents = `import { Route } from '@angular/router';
|
|
16
16
|
import { ${libraryOptions.standaloneComponentName} } from './${(0, path_1.joinPathFragments)(libraryOptions.fileName, `${libraryOptions.fileName}.component`)}';
|
|
17
17
|
|
|
18
|
-
export const ${(0, devkit_1.names)(libraryOptions.name).
|
|
18
|
+
export const ${(0, devkit_1.names)(libraryOptions.name).propertyName}Routes: Route[] = [
|
|
19
19
|
{path: '', component: ${libraryOptions.standaloneComponentName}}
|
|
20
20
|
];`;
|
|
21
21
|
tree.write(pathToRoutes, routesContents);
|
|
22
22
|
const pathToEntryFile = (0, path_1.joinPathFragments)(libraryOptions.projectRoot, 'src', `${libraryOptions.entryFile}.ts`);
|
|
23
23
|
const entryFileContents = tree.read(pathToEntryFile, 'utf-8');
|
|
24
24
|
tree.write(pathToEntryFile, `${entryFileContents}
|
|
25
|
-
export * from './lib/routes'`);
|
|
26
|
-
if (libraryOptions.
|
|
25
|
+
export * from './lib/lib.routes'`);
|
|
26
|
+
if (libraryOptions.parent) {
|
|
27
27
|
if (libraryOptions.lazy) {
|
|
28
28
|
(0, add_load_children_1.addLoadChildren)(tree, libraryOptions);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-standalone-component.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-standalone-component.ts"],"names":[],"mappings":";;;;AAEA,yDAA2D;AAC3D,4CAAsD;AACtD,yCAAqC;AACrC,2DAAsD;AACtD,iDAA6C;AAE7C,SAAsB,sBAAsB,CAC1C,IAAU,EACV,EAAE,cAAc,EAAE,gBAAgB,EAAoB;;QAEtD,MAAM,IAAA,mBAAkB,EAAC,IAAI,kCACxB,gBAAgB,KACnB,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,cAAc,CAAC,IAAI,IAC5B,CAAC;QAEH,IAAI,cAAc,CAAC,OAAO,EAAE;YAC1B,MAAM,YAAY,GAAG,IAAA,wBAAiB,EACpC,cAAc,CAAC,WAAW,EAC1B,
|
|
1
|
+
{"version":3,"file":"add-standalone-component.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-standalone-component.ts"],"names":[],"mappings":";;;;AAEA,yDAA2D;AAC3D,4CAAsD;AACtD,yCAAqC;AACrC,2DAAsD;AACtD,iDAA6C;AAE7C,SAAsB,sBAAsB,CAC1C,IAAU,EACV,EAAE,cAAc,EAAE,gBAAgB,EAAoB;;QAEtD,MAAM,IAAA,mBAAkB,EAAC,IAAI,kCACxB,gBAAgB,KACnB,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,cAAc,CAAC,IAAI,IAC5B,CAAC;QAEH,IAAI,cAAc,CAAC,OAAO,EAAE;YAC1B,MAAM,YAAY,GAAG,IAAA,wBAAiB,EACpC,cAAc,CAAC,WAAW,EAC1B,uBAAuB,CACxB,CAAC;YAEF,MAAM,cAAc,GAAG;eAErB,cAAc,CAAC,uBACjB,cAAc,IAAA,wBAAiB,EAC7B,cAAc,CAAC,QAAQ,EACvB,GAAG,cAAc,CAAC,QAAQ,YAAY,CACvC;;uBAGK,IAAA,cAAK,EAAC,cAAc,CAAC,IAAI,CAAC,CAAC,YAC7B;kCAC0B,cAAc,CAAC,uBAAuB;WAC7D,CAAC;YACR,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;YAEzC,MAAM,eAAe,GAAG,IAAA,wBAAiB,EACvC,cAAc,CAAC,WAAW,EAC1B,KAAK,EACL,GAAG,cAAc,CAAC,SAAS,KAAK,CACjC,CAAC;YACF,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;YAC9D,IAAI,CAAC,KAAK,CACR,eAAe,EACf,GAAG,iBAAiB;yCACe,CACpC,CAAC;YAEF,IAAI,cAAc,CAAC,MAAM,EAAE;gBACzB,IAAI,cAAc,CAAC,IAAI,EAAE;oBACvB,IAAA,mCAAe,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;iBACvC;qBAAM;oBACL,IAAA,0BAAW,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;iBACnC;aACF;SACF;IACH,CAAC;CAAA;AArDD,wDAqDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnitTestRunner } from '../../../utils/test-runners';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Linter } from '@nrwl/linter';
|
|
3
3
|
export interface NormalizedSchema {
|
|
4
4
|
libraryOptions: {
|
|
5
5
|
name: string;
|
|
@@ -18,7 +18,7 @@ export interface NormalizedSchema {
|
|
|
18
18
|
commonModule?: boolean;
|
|
19
19
|
routing?: boolean;
|
|
20
20
|
lazy?: boolean;
|
|
21
|
-
|
|
21
|
+
parent?: string;
|
|
22
22
|
tags?: string;
|
|
23
23
|
strict?: boolean;
|
|
24
24
|
compilationMode?: 'full' | 'partial';
|
|
@@ -27,7 +27,7 @@ export interface NormalizedSchema {
|
|
|
27
27
|
skipPackageJson?: boolean;
|
|
28
28
|
skipPostInstall?: boolean;
|
|
29
29
|
standalone?: boolean;
|
|
30
|
-
linter:
|
|
30
|
+
linter: Linter;
|
|
31
31
|
unitTestRunner: UnitTestRunner;
|
|
32
32
|
prefix: string;
|
|
33
33
|
fileName: string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { UnitTestRunner } from '../../utils/test-runners';
|
|
2
2
|
import { Linter } from '@nrwl/linter';
|
|
3
3
|
|
|
4
|
-
type AngularLinter = Exclude<Linter, Linter.TsLint>;
|
|
5
|
-
|
|
6
4
|
export interface Schema {
|
|
7
5
|
name: string;
|
|
8
6
|
addTailwind?: boolean;
|
|
@@ -21,10 +19,10 @@ export interface Schema {
|
|
|
21
19
|
prefix?: string;
|
|
22
20
|
routing?: boolean;
|
|
23
21
|
lazy?: boolean;
|
|
24
|
-
|
|
22
|
+
parent?: string;
|
|
25
23
|
tags?: string;
|
|
26
24
|
strict?: boolean;
|
|
27
|
-
linter?:
|
|
25
|
+
linter?: Linter;
|
|
28
26
|
unitTestRunner?: UnitTestRunner;
|
|
29
27
|
compilationMode?: 'full' | 'partial';
|
|
30
28
|
setParserOptionsProject?: boolean;
|
|
@@ -76,10 +76,9 @@
|
|
|
76
76
|
"default": false,
|
|
77
77
|
"description": "Add `RouterModule.forChild` when set to true, and a simple array of routes when set to false."
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"parent": {
|
|
80
80
|
"type": "string",
|
|
81
|
-
"description": "
|
|
82
|
-
"alias": "parent"
|
|
81
|
+
"description": "Path to the parent route configuration using `loadChildren` or `children`, depending on what `lazy` is set to."
|
|
83
82
|
},
|
|
84
83
|
"tags": {
|
|
85
84
|
"type": "string",
|
|
@@ -2,7 +2,6 @@ import { TestBed } from '@angular/core/testing';
|
|
|
2
2
|
import { provideMockActions } from '@ngrx/effects/testing';
|
|
3
3
|
import { Action } from '@ngrx/store';
|
|
4
4
|
import { provideMockStore } from '@ngrx/store/testing';
|
|
5
|
-
import { NxModule<% if (useDataPersistence) { %>, DataPersistence<% } %> } from '@nrwl/angular';
|
|
6
5
|
import { hot } from 'jasmine-marbles';
|
|
7
6
|
import { Observable } from 'rxjs';
|
|
8
7
|
|
|
@@ -15,12 +14,9 @@ describe('<%= className %>Effects', () => {
|
|
|
15
14
|
|
|
16
15
|
beforeEach(() => {
|
|
17
16
|
TestBed.configureTestingModule({
|
|
18
|
-
imports: [
|
|
19
|
-
NxModule.forRoot(),
|
|
20
|
-
],
|
|
17
|
+
imports: [],
|
|
21
18
|
providers: [
|
|
22
|
-
<%= className %>Effects
|
|
23
|
-
DataPersistence,<% } %>
|
|
19
|
+
<%= className %>Effects,
|
|
24
20
|
provideMockActions(() => actions),
|
|
25
21
|
provideMockStore()
|
|
26
22
|
],
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { createEffect, Actions, ofType } from '@ngrx/effects';
|
|
3
|
-
import {
|
|
3
|
+
import { fetch } from '@nrwl/angular';
|
|
4
4
|
|
|
5
5
|
import * as <%= className %>Actions from './<%= fileName %>.actions';
|
|
6
6
|
import * as <%= className %>Feature from './<%= fileName %>.reducer';
|
|
7
7
|
|
|
8
8
|
@Injectable()
|
|
9
9
|
export class <%= className %>Effects {
|
|
10
|
-
|
|
11
|
-
run: (action: ReturnType<typeof <%= className %>Actions.init<%= className %>>, state: <%= className %>Feature.<%= className %>PartialState) => {
|
|
12
|
-
// Your custom service 'load' logic goes here. For now just return a success action...
|
|
13
|
-
return <%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] });
|
|
14
|
-
},
|
|
15
|
-
onError: (action: ReturnType<typeof <%= className %>Actions.init<%= className %>>, error) => {
|
|
16
|
-
console.error('Error', error);
|
|
17
|
-
return <%= className %>Actions.load<%= className %>Failure({ error });
|
|
18
|
-
}
|
|
19
|
-
}));<% } else { %>init$ = createEffect(() => this.actions$.pipe(
|
|
10
|
+
init$ = createEffect(() => this.actions$.pipe(
|
|
20
11
|
ofType(<%= className %>Actions.init<%= className %>),
|
|
21
12
|
fetch({
|
|
22
|
-
run: action => {
|
|
13
|
+
run: (action) => {
|
|
23
14
|
// Your custom service 'load' logic goes here. For now just return a success action...
|
|
24
15
|
return <%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] });
|
|
25
16
|
},
|
|
@@ -28,10 +19,7 @@ export class <%= className %>Effects {
|
|
|
28
19
|
return <%= className %>Actions.load<%= className %>Failure({ error });
|
|
29
20
|
}
|
|
30
21
|
})
|
|
31
|
-
))
|
|
22
|
+
));
|
|
32
23
|
|
|
33
|
-
constructor(
|
|
34
|
-
private readonly actions$: Actions<% if (useDataPersistence) { %>,
|
|
35
|
-
private readonly dataPersistence: DataPersistence<<%= className %>Feature.<%= className %>PartialState><% } %>
|
|
36
|
-
) {}
|
|
24
|
+
constructor(private readonly actions$: Actions) {}
|
|
37
25
|
}
|
|
@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
|
|
|
2
2
|
import { TestBed } from '@angular/core/testing';
|
|
3
3
|
import { EffectsModule } from '@ngrx/effects';
|
|
4
4
|
import { StoreModule, Store } from '@ngrx/store';
|
|
5
|
-
import { NxModule } from '@nrwl/angular';
|
|
6
5
|
import { readFirst } from '@nrwl/angular/testing';
|
|
7
6
|
|
|
8
7
|
import * as <%= className %>Actions from './<%= fileName %>.actions';
|
|
@@ -42,7 +41,6 @@ describe('<%= className %>Facade', () => {
|
|
|
42
41
|
|
|
43
42
|
@NgModule({
|
|
44
43
|
imports: [
|
|
45
|
-
NxModule.forRoot(),
|
|
46
44
|
StoreModule.forRoot({}),
|
|
47
45
|
EffectsModule.forRoot([]),
|
|
48
46
|
CustomFeatureModule,
|
|
@@ -31,7 +31,6 @@ function addImportsToModule(tree, options) {
|
|
|
31
31
|
strictStateImmutability: true
|
|
32
32
|
}
|
|
33
33
|
})`;
|
|
34
|
-
const nxModule = 'NxModule.forRoot()';
|
|
35
34
|
const effectsForRoot = `EffectsModule.forRoot([${effectsName}])`;
|
|
36
35
|
const effectsForEmptyRoot = `EffectsModule.forRoot([])`;
|
|
37
36
|
const storeForFeature = `StoreModule.forFeature(from${className}.${constantName}_FEATURE_KEY, from${className}.${propertyName}Reducer)`;
|
|
@@ -40,7 +39,6 @@ function addImportsToModule(tree, options) {
|
|
|
40
39
|
const storeRouterModule = 'StoreRouterConnectingModule.forRoot()';
|
|
41
40
|
// this is just a heuristic
|
|
42
41
|
const hasRouter = sourceText.indexOf('RouterModule') > -1;
|
|
43
|
-
const hasNxModule = sourceText.includes(nxModule);
|
|
44
42
|
sourceFile = addImport(sourceFile, 'StoreModule', '@ngrx/store');
|
|
45
43
|
sourceFile = addImport(sourceFile, 'EffectsModule', '@ngrx/effects');
|
|
46
44
|
if (options.minimal && options.root) {
|
|
@@ -66,10 +64,6 @@ function addImportsToModule(tree, options) {
|
|
|
66
64
|
};
|
|
67
65
|
if (options.root) {
|
|
68
66
|
sourceFile = addCommonImports();
|
|
69
|
-
if (!hasNxModule) {
|
|
70
|
-
sourceFile = addImport(sourceFile, 'NxModule', '@nrwl/angular');
|
|
71
|
-
sourceFile = (0, ast_utils_2.addImportToModule)(tree, sourceFile, modulePath, nxModule);
|
|
72
|
-
}
|
|
73
67
|
sourceFile = addImport(sourceFile, 'StoreDevtoolsModule', '@ngrx/store-devtools');
|
|
74
68
|
sourceFile = addImport(sourceFile, 'environment', '../environments/environment');
|
|
75
69
|
sourceFile = (0, ast_utils_2.addImportToModule)(tree, sourceFile, modulePath, storeForRoot);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-imports-to-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/add-imports-to-module.ts"],"names":[],"mappings":";;;AACA,yCAAqC;AACrC,uEAAuE;AAEvE,2CAA4D;AAC5D,kEAG4C;AAG5C,SAAgB,kBAAkB,CAChC,IAAU,EACV,OAA6B;IAE7B,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAClC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClD,IAAI,UAAU,GAAG,IAAA,6BAAgB,EAC/B,UAAU,EACV,UAAU,EACV,yBAAY,CAAC,MAAM,EACnB,IAAI,CACL,CAAC;IACF,MAAM,SAAS,GAAG,CAChB,MAAkB,EAClB,UAAkB,EAClB,QAAgB,EAChB,SAAS,GAAG,KAAK,EACL,EAAE;QACd,OAAO,IAAA,wBAAY,EACjB,IAAI,EACJ,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,CACV,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,GAAG,GAAG,KAAK,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;IACrD,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC5D,MAAM,WAAW,GAAG,GAAG,UAAU,UAAU,CAAC;IAC5C,MAAM,WAAW,GAAG,GAAG,UAAU,UAAU,CAAC;IAC5C,MAAM,UAAU,GAAG,GAAG,UAAU,SAAS,CAAC;IAE1C,MAAM,YAAY,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;IAC3D,MAAM,WAAW,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,SAAS,CAAC;IAC9D,MAAM,UAAU,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,QAAQ,CAAC;IAC5D,MAAM,SAAS,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IACrD,MAAM,YAAY,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;IAC3D,MAAM,cAAc,GAAG,YAAY,SAAS,EAAE,CAAC;IAE/C,MAAM,iBAAiB,GAAG,iDAAiD,CAAC;IAE5E,MAAM,YAAY,GAAG;QACf,iBAAiB;;;;;OAKlB,CAAC;IACN,MAAM,
|
|
1
|
+
{"version":3,"file":"add-imports-to-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngrx/lib/add-imports-to-module.ts"],"names":[],"mappings":";;;AACA,yCAAqC;AACrC,uEAAuE;AAEvE,2CAA4D;AAC5D,kEAG4C;AAG5C,SAAgB,kBAAkB,CAChC,IAAU,EACV,OAA6B;IAE7B,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAClC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClD,IAAI,UAAU,GAAG,IAAA,6BAAgB,EAC/B,UAAU,EACV,UAAU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,EACJ,UAAU,EACV,UAAU,EACV,eAAe,CAChB,CAAC;SACH;aAAM;YACL,UAAU,GAAG,gBAAgB,EAAE,CAAC;YAEhC,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,eAAe,CAChB,CAAC;YACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,iBAAiB,CAClB,CAAC;SACH;KACF;AACH,CAAC;AApLD,gDAoLC"}
|
|
@@ -9,9 +9,4 @@ export interface NgRxGeneratorOptions {
|
|
|
9
9
|
skipFormat?: boolean;
|
|
10
10
|
skipImport?: boolean;
|
|
11
11
|
skipPackageJson?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated This option is deprecated and will be removed in v15.
|
|
14
|
-
* Using the individual operators is recommended.
|
|
15
|
-
*/
|
|
16
|
-
useDataPersistence?: boolean;
|
|
17
12
|
}
|
|
@@ -57,12 +57,6 @@
|
|
|
57
57
|
"default": false,
|
|
58
58
|
"description": "Do not update the `package.json` with NgRx dependencies."
|
|
59
59
|
},
|
|
60
|
-
"useDataPersistence": {
|
|
61
|
-
"type": "boolean",
|
|
62
|
-
"default": false,
|
|
63
|
-
"description": "Generate NgRx Effects with the `DataPersistence` helper service. Set to false to use plain effects data persistence operators.",
|
|
64
|
-
"x-deprecated": "This option is deprecated and will be removed in v15. Using the individual operators is recommended."
|
|
65
|
-
},
|
|
66
60
|
"barrels": {
|
|
67
61
|
"type": "boolean",
|
|
68
62
|
"default": false,
|
|
@@ -2,8 +2,6 @@ import { Linter } from '@nrwl/linter';
|
|
|
2
2
|
import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
|
3
3
|
import type { Styles } from '../utils/types';
|
|
4
4
|
|
|
5
|
-
type AngularLinter = Exclude<Linter, Linter.TsLint>;
|
|
6
|
-
|
|
7
5
|
export interface Schema {
|
|
8
6
|
name: string;
|
|
9
7
|
host?: string;
|
|
@@ -16,7 +14,7 @@ export interface Schema {
|
|
|
16
14
|
skipTests?: boolean;
|
|
17
15
|
directory?: string;
|
|
18
16
|
tags?: string;
|
|
19
|
-
linter?:
|
|
17
|
+
linter?: Linter;
|
|
20
18
|
unitTestRunner?: UnitTestRunner;
|
|
21
19
|
e2eTestRunner?: E2eTestRunner;
|
|
22
20
|
backendProject?: string;
|
|
@@ -3,18 +3,14 @@ import { CommonModule } from '@angular/common';<% if(routing) { %>
|
|
|
3
3
|
import { RouterModule } from '@angular/router';<% } %>
|
|
4
4
|
|
|
5
5
|
import { RemoteEntryComponent } from './entry.component';
|
|
6
|
-
import { NxWelcomeComponent } from './nx-welcome.component'
|
|
6
|
+
import { NxWelcomeComponent } from './nx-welcome.component';<% if(routing) { %>
|
|
7
|
+
import { remoteRoutes } from './entry.routes';<% } %>
|
|
7
8
|
|
|
8
9
|
@NgModule({
|
|
9
10
|
declarations: [RemoteEntryComponent, NxWelcomeComponent],
|
|
10
11
|
imports: [
|
|
11
12
|
CommonModule,<% if(routing) { %>
|
|
12
|
-
RouterModule.forChild(
|
|
13
|
-
{
|
|
14
|
-
path: '',
|
|
15
|
-
component: RemoteEntryComponent,
|
|
16
|
-
},
|
|
17
|
-
]),<% } %>
|
|
13
|
+
RouterModule.forChild(remoteRoutes),<% } %>
|
|
18
14
|
],
|
|
19
15
|
providers: [],<% if(!routing) { %>
|
|
20
16
|
exports: [RemoteEntryComponent],<% } %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Route } from '@angular/router';
|
|
2
2
|
import { RemoteEntryComponent } from './entry.component';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const remoteRoutes: Route[] = [{ path: '', component: RemoteEntryComponent }];
|
|
@@ -2,7 +2,7 @@ module.exports = {
|
|
|
2
2
|
name: '<%= name %>',<% if(type === 'host') { %>
|
|
3
3
|
remotes: [<% remotes.forEach(function(remote) { %>'<%= remote.remoteName %>',<% }); %>]<% } %><% if(type === 'remote') { %>
|
|
4
4
|
exposes: {<% if(standalone) { %>
|
|
5
|
-
'./Routes': '<%= projectRoot %>/src/app/remote-entry/routes.ts',<% } else { %>
|
|
5
|
+
'./Routes': '<%= projectRoot %>/src/app/remote-entry/entry.routes.ts',<% } else { %>
|
|
6
6
|
'./Module': '<%= projectRoot %>/src/app/remote-entry/entry.module.ts',<% } %>
|
|
7
7
|
},<% } %>
|
|
8
8
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addRemoteEntry = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
|
5
6
|
function addRemoteEntry(tree, { appName, routing, mfType, prefix, standalone }, appRoot) {
|
|
6
7
|
if (mfType === 'remote') {
|
|
7
8
|
prefix = prefix !== null && prefix !== void 0 ? prefix : (0, devkit_1.readWorkspaceConfiguration)(tree).npmScope;
|
|
@@ -13,7 +14,13 @@ function addRemoteEntry(tree, { appName, routing, mfType, prefix, standalone },
|
|
|
13
14
|
routing,
|
|
14
15
|
prefix,
|
|
15
16
|
});
|
|
16
|
-
if (
|
|
17
|
+
if (standalone && routing) {
|
|
18
|
+
(0, route_utils_1.addRoute)(tree, (0, devkit_1.joinPathFragments)(appRoot, 'src/app/app.routes.ts'), `{path: '', loadChildren: () => import('./remote-entry/entry.routes').then(m => m.remoteRoutes)}`);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (routing) {
|
|
22
|
+
(0, route_utils_1.addRoute)(tree, (0, devkit_1.joinPathFragments)(appRoot, 'src/app/app.routes.ts'), `{path: '', loadChildren: () => import('./remote-entry/entry.module').then(m => m.RemoteEntryModule)}`);
|
|
23
|
+
}
|
|
17
24
|
tree.write(`${appRoot}/src/app/app.module.ts`, `/*
|
|
18
25
|
* This RemoteEntryModule is imported here to allow TS to find the Module during
|
|
19
26
|
* compilation, allowing it to be included in the built bundle. This is required
|
|
@@ -1 +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;
|
|
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;AAEtB,sEAAgE;AAEhE,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,UAAU,IAAI,OAAO,EAAE;YACzB,IAAA,sBAAQ,EACN,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,EAAE,uBAAuB,CAAC,EACnD,iGAAiG,CAClG,CAAC;SACH;aAAM;YACL,IAAI,OAAO,EAAE;gBACX,IAAA,sBAAQ,EACN,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,EAAE,uBAAuB,CAAC,EACnD,sGAAsG,CACvG,CAAC;aACH;YAED,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;AAnDD,wCAmDC"}
|
|
@@ -4,9 +4,8 @@ exports.addRemoteToHost = exports.checkIsCommaNeeded = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
6
6
|
const ts = require("typescript");
|
|
7
|
-
const ast_utils_1 = require("
|
|
8
|
-
const
|
|
9
|
-
const standalone_utils_1 = require("../../../utils/nx-devkit/standalone-utils");
|
|
7
|
+
const ast_utils_1 = require("@nrwl/workspace/src/utilities/ast-utils");
|
|
8
|
+
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
|
10
9
|
function checkIsCommaNeeded(mfRemoteText) {
|
|
11
10
|
const remoteText = mfRemoteText.replace(/\s+/g, '');
|
|
12
11
|
return !remoteText.endsWith(',]')
|
|
@@ -61,39 +60,26 @@ function addRemoteToDynamicHost(tree, options, pathToMfManifest) {
|
|
|
61
60
|
// TODO(colum): future work: allow dev to pass to path to routing module
|
|
62
61
|
function addLazyLoadedRouteToHostAppModule(tree, options, hostFederationType) {
|
|
63
62
|
const hostAppConfig = (0, devkit_1.readProjectConfiguration)(tree, options.host);
|
|
64
|
-
const
|
|
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`;
|
|
63
|
+
const pathToHostRootRouting = `${hostAppConfig.sourceRoot}/app/app.routes.ts`;
|
|
70
64
|
if (!tree.exists(pathToHostRootRouting)) {
|
|
71
65
|
return;
|
|
72
66
|
}
|
|
73
67
|
const hostRootRoutingFile = tree.read(pathToHostRootRouting, 'utf-8');
|
|
74
|
-
if (!hostRootRoutingFile.includes('RouterModule.forRoot(')) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
68
|
let sourceFile = ts.createSourceFile(pathToHostRootRouting, hostRootRoutingFile, ts.ScriptTarget.Latest, true);
|
|
78
69
|
if (hostFederationType === 'dynamic') {
|
|
79
|
-
sourceFile = (0,
|
|
70
|
+
sourceFile = (0, ast_utils_1.insertImport)(tree, sourceFile, pathToHostRootRouting, 'loadRemoteModule', '@nrwl/angular/mf');
|
|
80
71
|
}
|
|
81
72
|
const routePathName = options.standalone ? 'Routes' : 'Module';
|
|
73
|
+
const exportedRemote = options.standalone
|
|
74
|
+
? 'remoteRoutes'
|
|
75
|
+
: 'RemoteEntryModule';
|
|
82
76
|
const routeToAdd = hostFederationType === 'dynamic'
|
|
83
77
|
? `loadRemoteModule('${options.appName}', './${routePathName}')`
|
|
84
78
|
: `import('${options.appName}/${routePathName}')`;
|
|
85
|
-
|
|
86
|
-
sourceFile = (0, ast_utils_1.addRoute)(tree, pathToHostRootRouting, sourceFile, `{
|
|
87
|
-
path: '${options.appName}',
|
|
88
|
-
loadChildren: () => ${routeToAdd}.then(m => m.RemoteEntryModule)
|
|
89
|
-
}`);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
(0, standalone_utils_1.addStandaloneRoute)(tree, pathToHostRootRouting, `{
|
|
79
|
+
(0, route_utils_1.addRoute)(tree, pathToHostRootRouting, `{
|
|
93
80
|
path: '${options.appName}',
|
|
94
|
-
loadChildren: () => ${routeToAdd}.then(m => m
|
|
81
|
+
loadChildren: () => ${routeToAdd}.then(m => m.${exportedRemote})
|
|
95
82
|
}`);
|
|
96
|
-
}
|
|
97
83
|
const pathToAppComponentTemplate = (0, devkit_1.joinPathFragments)(hostAppConfig.sourceRoot, 'app/app.component.html');
|
|
98
84
|
const appComponent = tree.read(pathToAppComponentTemplate, 'utf-8');
|
|
99
85
|
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,
|
|
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,uEAAuE;AACvE,sEAAgE;AAEhE,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,gBAAg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ACzB,cAAc,YAAY,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;KACzD;AACH,CAAC"}
|
|
@@ -28,7 +28,7 @@ import {enableProdMode, importProvidersFrom} from "@angular/core";
|
|
|
28
28
|
import {bootstrapApplication} from "@angular/platform-browser";
|
|
29
29
|
import {RouterModule} from "@angular/router";
|
|
30
30
|
import {RemoteEntryComponent} from "./app/remote-entry/entry.component";
|
|
31
|
-
import {
|
|
31
|
+
import {appRoutes} from "./app/app.routes";
|
|
32
32
|
|
|
33
33
|
if (environment.production) {
|
|
34
34
|
enableProdMode();
|
|
@@ -37,7 +37,7 @@ if (environment.production) {
|
|
|
37
37
|
bootstrapApplication(RemoteEntryComponent, {
|
|
38
38
|
providers: [
|
|
39
39
|
importProvidersFrom(
|
|
40
|
-
RouterModule.forRoot(
|
|
40
|
+
RouterModule.forRoot(appRoutes, {initialNavigation: 'enabledBlocking'})
|
|
41
41
|
)
|
|
42
42
|
]
|
|
43
43
|
});`;
|
|
@@ -4,7 +4,7 @@ export interface StorybookConfigurationOptions {
|
|
|
4
4
|
configureCypress: boolean;
|
|
5
5
|
generateCypressSpecs: boolean;
|
|
6
6
|
generateStories: boolean;
|
|
7
|
-
linter:
|
|
7
|
+
linter: Linter;
|
|
8
8
|
name: string;
|
|
9
9
|
cypressDirectory?: string;
|
|
10
10
|
tsConfiguration?: boolean;
|