@nrwl/angular 14.3.5 → 14.4.0-beta.1
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/testing/index.mjs +5 -5
- package/fesm2015/nrwl-angular-testing.mjs +4 -4
- package/fesm2015/nrwl-angular-testing.mjs.map +1 -1
- package/fesm2020/nrwl-angular-testing.mjs +4 -4
- package/fesm2020/nrwl-angular-testing.mjs.map +1 -1
- package/generators.d.ts +1 -0
- package/generators.js +1 -0
- package/generators.js.map +1 -1
- package/migrations.json +37 -0
- package/package.json +9 -8
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +66 -25
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -1
- package/src/builders/webpack-server/schema.d.ts +1 -0
- package/src/builders/webpack-server/schema.json +4 -0
- package/src/builders/webpack-server/webpack-server.impl.d.ts +1 -1
- package/src/builders/webpack-server/webpack-server.impl.js +61 -31
- package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
- package/src/generators/application/application.js +1 -0
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/lib/index.d.ts +1 -0
- package/src/generators/application/lib/index.js +1 -0
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/application/lib/nrwl-home-tpl.js +1 -1
- package/src/generators/application/lib/set-default-project.d.ts +3 -0
- package/src/generators/application/lib/set-default-project.js +13 -0
- package/src/generators/application/lib/set-default-project.js.map +1 -0
- package/src/generators/library/lib/normalize-options.js +2 -1
- package/src/generators/library/lib/normalize-options.js.map +1 -1
- package/src/generators/ng-add/utilities/normalize-options.js +5 -9
- package/src/generators/ng-add/utilities/normalize-options.js.map +1 -1
- package/src/generators/ng-add/utilities/workspace.js +7 -13
- package/src/generators/ng-add/utilities/workspace.js.map +1 -1
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.actions.ts__tmpl__ +2 -2
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.facade.spec.ts__tmpl__ +2 -2
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.spec.ts__tmpl__ +3 -3
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.ts__tmpl__ +2 -2
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.selectors.spec.ts__tmpl__ +5 -5
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -0
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js.map +1 -1
- package/src/migrations/update-12-0-0/update-ngcc-postinstall.d.ts +2 -1
- package/src/migrations/update-12-0-0/update-ngcc-postinstall.js +16 -15
- package/src/migrations/update-12-0-0/update-ngcc-postinstall.js.map +1 -1
- package/src/utils/mfe/with-module-federation.js +5 -4
- package/src/utils/mfe/with-module-federation.js.map +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
- package/testing/index.d.ts +4 -4
- package/testing/index.js +4 -4
- package/src/utils/testing.d.ts +0 -3
- package/src/utils/testing.js +0 -22
- package/src/utils/testing.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [14.4.0-beta.1](https://github.com/nrwl/nx/compare/14.3.6...14.4.0-beta.1) (2022-06-24)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/angular
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { cold as rxjsMarblesCold, hot as rxjsMarblesHot, getTestScheduler as rxjsMarblesTestScheduler, time as rxjsMarblesTime, } from 'jasmine-marbles';
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
3
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
4
4
|
*/
|
|
5
5
|
export const cold = rxjsMarblesCold;
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
7
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
8
8
|
*/
|
|
9
9
|
export const hot = rxjsMarblesHot;
|
|
10
10
|
/**
|
|
11
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
11
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
12
12
|
*/
|
|
13
13
|
export const getTestScheduler = rxjsMarblesTestScheduler;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
15
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
16
16
|
*/
|
|
17
17
|
export const time = rxjsMarblesTime;
|
|
18
18
|
export { readAll, readFirst } from './src/testing-utils';
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90ZXN0aW5nL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxJQUFJLElBQUksZUFBZSxFQUN2QixHQUFHLElBQUksY0FBYyxFQUNyQixnQkFBZ0IsSUFBSSx3QkFBd0IsRUFDNUMsSUFBSSxJQUFJLGVBQWUsR0FDeEIsTUFBTSxpQkFBaUIsQ0FBQztBQUV6Qjs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLElBQUksR0FBRyxlQUFlLENBQUM7QUFDcEM7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxHQUFHLEdBQUcsY0FBYyxDQUFDO0FBQ2xDOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsd0JBQXdCLENBQUM7QUF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b25zdCB0aW1lID0gcnhqc01hcmJsZXNUaW1lO1xuXG5leHBvcnQgeyByZWFkQWxsLCByZWFkRmlyc3QgfSBmcm9tICcuL3NyYy90ZXN0aW5nLXV0aWxzJztcbiJdfQ==
|
|
@@ -33,19 +33,19 @@ function readFirst(o) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
36
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
37
37
|
*/
|
|
38
38
|
const cold = cold$1;
|
|
39
39
|
/**
|
|
40
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
40
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
41
41
|
*/
|
|
42
42
|
const hot = hot$1;
|
|
43
43
|
/**
|
|
44
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
44
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
45
45
|
*/
|
|
46
46
|
const getTestScheduler = getTestScheduler$1;
|
|
47
47
|
/**
|
|
48
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
48
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
49
49
|
*/
|
|
50
50
|
const time = time$1;
|
|
51
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nrwl-angular-testing.mjs","sources":["../../testing/src/testing-utils.ts","../../testing/index.ts","../../testing/nrwl-angular-testing.ts"],"sourcesContent":["import type { Observable } from 'rxjs';\nimport { first, toArray } from 'rxjs/operators';\n\n/**\n * @whatItDoes reads all the values from an observable and returns a promise\n * with an array of all values. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readAll(obs)\n * expect(res).toEqual([1, 2, 3, 4]);\n * ```\n */\nexport function readAll<T>(o: Observable<T>): Promise<T[]> {\n return o.pipe(toArray()).toPromise();\n}\n\n/**\n * @whatItDoes reads the first value from an observable and returns a promise\n * with it. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readFirst(obs)\n * expect(res).toEqual(1);\n * ```\n */\nexport function readFirst<T>(o: Observable<T>): Promise<T> {\n return o.pipe(first()).toPromise();\n}\n","import {\n cold as rxjsMarblesCold,\n hot as rxjsMarblesHot,\n getTestScheduler as rxjsMarblesTestScheduler,\n time as rxjsMarblesTime,\n} from 'jasmine-marbles';\n\n/**\n * @deprecated Import from 'jasmine-marbles' instead
|
|
1
|
+
{"version":3,"file":"nrwl-angular-testing.mjs","sources":["../../testing/src/testing-utils.ts","../../testing/index.ts","../../testing/nrwl-angular-testing.ts"],"sourcesContent":["import type { Observable } from 'rxjs';\nimport { first, toArray } from 'rxjs/operators';\n\n/**\n * @whatItDoes reads all the values from an observable and returns a promise\n * with an array of all values. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readAll(obs)\n * expect(res).toEqual([1, 2, 3, 4]);\n * ```\n */\nexport function readAll<T>(o: Observable<T>): Promise<T[]> {\n return o.pipe(toArray()).toPromise();\n}\n\n/**\n * @whatItDoes reads the first value from an observable and returns a promise\n * with it. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readFirst(obs)\n * expect(res).toEqual(1);\n * ```\n */\nexport function readFirst<T>(o: Observable<T>): Promise<T> {\n return o.pipe(first()).toPromise();\n}\n","import {\n cold as rxjsMarblesCold,\n hot as rxjsMarblesHot,\n getTestScheduler as rxjsMarblesTestScheduler,\n time as rxjsMarblesTime,\n} from 'jasmine-marbles';\n\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const cold = rxjsMarblesCold;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const hot = rxjsMarblesHot;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const getTestScheduler = rxjsMarblesTestScheduler;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const time = rxjsMarblesTime;\n\nexport { readAll, readFirst } from './src/testing-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["rxjsMarblesCold","rxjsMarblesHot","rxjsMarblesTestScheduler","rxjsMarblesTime"],"mappings":";;;AAGA;;;;;;;;;;;AAWG;AACG,SAAU,OAAO,CAAI,CAAgB,EAAA;IACzC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;AAWG;AACG,SAAU,SAAS,CAAI,CAAgB,EAAA;IAC3C,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACrC;;AC1BA;;AAEG;AACI,MAAM,IAAI,GAAGA,OAAgB;AACpC;;AAEG;AACI,MAAM,GAAG,GAAGC,MAAe;AAClC;;AAEG;AACI,MAAM,gBAAgB,GAAGC,mBAAyB;AACzD;;AAEG;AACI,MAAM,IAAI,GAAGC;;ACtBpB;;AAEG;;;;"}
|
|
@@ -33,19 +33,19 @@ function readFirst(o) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
36
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
37
37
|
*/
|
|
38
38
|
const cold = cold$1;
|
|
39
39
|
/**
|
|
40
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
40
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
41
41
|
*/
|
|
42
42
|
const hot = hot$1;
|
|
43
43
|
/**
|
|
44
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
44
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
45
45
|
*/
|
|
46
46
|
const getTestScheduler = getTestScheduler$1;
|
|
47
47
|
/**
|
|
48
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
48
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
49
49
|
*/
|
|
50
50
|
const time = time$1;
|
|
51
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nrwl-angular-testing.mjs","sources":["../../testing/src/testing-utils.ts","../../testing/index.ts","../../testing/nrwl-angular-testing.ts"],"sourcesContent":["import type { Observable } from 'rxjs';\nimport { first, toArray } from 'rxjs/operators';\n\n/**\n * @whatItDoes reads all the values from an observable and returns a promise\n * with an array of all values. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readAll(obs)\n * expect(res).toEqual([1, 2, 3, 4]);\n * ```\n */\nexport function readAll<T>(o: Observable<T>): Promise<T[]> {\n return o.pipe(toArray()).toPromise();\n}\n\n/**\n * @whatItDoes reads the first value from an observable and returns a promise\n * with it. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readFirst(obs)\n * expect(res).toEqual(1);\n * ```\n */\nexport function readFirst<T>(o: Observable<T>): Promise<T> {\n return o.pipe(first()).toPromise();\n}\n","import {\n cold as rxjsMarblesCold,\n hot as rxjsMarblesHot,\n getTestScheduler as rxjsMarblesTestScheduler,\n time as rxjsMarblesTime,\n} from 'jasmine-marbles';\n\n/**\n * @deprecated Import from 'jasmine-marbles' instead
|
|
1
|
+
{"version":3,"file":"nrwl-angular-testing.mjs","sources":["../../testing/src/testing-utils.ts","../../testing/index.ts","../../testing/nrwl-angular-testing.ts"],"sourcesContent":["import type { Observable } from 'rxjs';\nimport { first, toArray } from 'rxjs/operators';\n\n/**\n * @whatItDoes reads all the values from an observable and returns a promise\n * with an array of all values. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readAll(obs)\n * expect(res).toEqual([1, 2, 3, 4]);\n * ```\n */\nexport function readAll<T>(o: Observable<T>): Promise<T[]> {\n return o.pipe(toArray()).toPromise();\n}\n\n/**\n * @whatItDoes reads the first value from an observable and returns a promise\n * with it. This should be used in combination with async/await.\n *\n * ## Example\n *\n * ```typescript\n * const obs = of(1, 2, 3, 4);\n * const res = await readFirst(obs)\n * expect(res).toEqual(1);\n * ```\n */\nexport function readFirst<T>(o: Observable<T>): Promise<T> {\n return o.pipe(first()).toPromise();\n}\n","import {\n cold as rxjsMarblesCold,\n hot as rxjsMarblesHot,\n getTestScheduler as rxjsMarblesTestScheduler,\n time as rxjsMarblesTime,\n} from 'jasmine-marbles';\n\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const cold = rxjsMarblesCold;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const hot = rxjsMarblesHot;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const getTestScheduler = rxjsMarblesTestScheduler;\n/**\n * @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.\n */\nexport const time = rxjsMarblesTime;\n\nexport { readAll, readFirst } from './src/testing-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["rxjsMarblesCold","rxjsMarblesHot","rxjsMarblesTestScheduler","rxjsMarblesTime"],"mappings":";;;AAGA;;;;;;;;;;;AAWG;AACG,SAAU,OAAO,CAAI,CAAgB,EAAA;IACzC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;AAWG;AACG,SAAU,SAAS,CAAI,CAAgB,EAAA;IAC3C,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACrC;;AC1BA;;AAEG;AACI,MAAM,IAAI,GAAGA,OAAgB;AACpC;;AAEG;AACI,MAAM,GAAG,GAAGC,MAAe;AAClC;;AAEG;AACI,MAAM,gBAAgB,GAAGC,mBAAyB;AACzD;;AAEG;AACI,MAAM,IAAI,GAAGC;;ACtBpB;;AAEG;;;;"}
|
package/generators.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export * from './src/generators/component-story/component-story';
|
|
|
23
23
|
export * from './src/generators/web-worker/web-worker';
|
|
24
24
|
export * from './src/generators/remote/remote';
|
|
25
25
|
export * from './src/generators/change-storybook-targets/change-storybook-targets';
|
|
26
|
+
export * from './src/generators/component/component';
|
package/generators.js
CHANGED
|
@@ -26,4 +26,5 @@ tslib_1.__exportStar(require("./src/generators/component-story/component-story")
|
|
|
26
26
|
tslib_1.__exportStar(require("./src/generators/web-worker/web-worker"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./src/generators/remote/remote"), exports);
|
|
28
28
|
tslib_1.__exportStar(require("./src/generators/change-storybook-targets/change-storybook-targets"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./src/generators/component/component"), exports);
|
|
29
30
|
//# sourceMappingURL=generators.js.map
|
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,yFAA+D;AAC/D,+EAAqD;AACrD,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,+EAAqD;AACrD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,iFAAuD;AACvD,yEAA+C;AAC/C,6GAAmF"}
|
|
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,qEAA2C;AAC3C,qEAA2C;AAC3C,yFAA+D;AAC/D,+EAAqD;AACrD,mFAAyD;AACzD,yGAA+E;AAC/E,2FAAiE;AACjE,iFAAuD;AACvD,yEAA+C;AAC/C,6GAAmF;AACnF,+EAAqD"}
|
package/migrations.json
CHANGED
|
@@ -1148,6 +1148,10 @@
|
|
|
1148
1148
|
"version": "~14.0.0",
|
|
1149
1149
|
"alwaysAddToPackageJson": false
|
|
1150
1150
|
},
|
|
1151
|
+
"@schematics/angular": {
|
|
1152
|
+
"version": "~14.0.0",
|
|
1153
|
+
"alwaysAddToPackageJson": false
|
|
1154
|
+
},
|
|
1151
1155
|
"@angular/core": {
|
|
1152
1156
|
"version": "~14.0.0",
|
|
1153
1157
|
"alwaysAddToPackageJson": true
|
|
@@ -1281,6 +1285,39 @@
|
|
|
1281
1285
|
"alwaysAddToPackageJson": false
|
|
1282
1286
|
}
|
|
1283
1287
|
}
|
|
1288
|
+
},
|
|
1289
|
+
"14.3.7": {
|
|
1290
|
+
"version": "14.3.7-beta.0",
|
|
1291
|
+
"packages": {
|
|
1292
|
+
"@ngrx/store": {
|
|
1293
|
+
"version": "~14.0.0",
|
|
1294
|
+
"alwaysAddToPackageJson": false
|
|
1295
|
+
},
|
|
1296
|
+
"@ngrx/effects": {
|
|
1297
|
+
"version": "~14.0.0",
|
|
1298
|
+
"alwaysAddToPackageJson": false
|
|
1299
|
+
},
|
|
1300
|
+
"@ngrx/entity": {
|
|
1301
|
+
"version": "~14.0.0",
|
|
1302
|
+
"alwaysAddToPackageJson": false
|
|
1303
|
+
},
|
|
1304
|
+
"@ngrx/router-store": {
|
|
1305
|
+
"version": "~14.0.0",
|
|
1306
|
+
"alwaysAddToPackageJson": false
|
|
1307
|
+
},
|
|
1308
|
+
"@ngrx/schematics": {
|
|
1309
|
+
"version": "~14.0.0",
|
|
1310
|
+
"alwaysAddToPackageJson": false
|
|
1311
|
+
},
|
|
1312
|
+
"@ngrx/store-devtools": {
|
|
1313
|
+
"version": "~14.0.0",
|
|
1314
|
+
"alwaysAddToPackageJson": false
|
|
1315
|
+
},
|
|
1316
|
+
"@ngrx/component-store": {
|
|
1317
|
+
"version": "~14.0.0",
|
|
1318
|
+
"alwaysAddToPackageJson": false
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1284
1321
|
}
|
|
1285
1322
|
}
|
|
1286
1323
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/angular",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0-beta.1",
|
|
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,12 +65,13 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@angular-devkit/schematics": "~14.0.0",
|
|
68
|
-
"@nrwl/cypress": "14.
|
|
69
|
-
"@nrwl/devkit": "14.
|
|
70
|
-
"@nrwl/jest": "14.
|
|
71
|
-
"@nrwl/linter": "14.
|
|
72
|
-
"@nrwl/storybook": "14.
|
|
73
|
-
"@nrwl/
|
|
68
|
+
"@nrwl/cypress": "14.4.0-beta.1",
|
|
69
|
+
"@nrwl/devkit": "14.4.0-beta.1",
|
|
70
|
+
"@nrwl/jest": "14.4.0-beta.1",
|
|
71
|
+
"@nrwl/linter": "14.4.0-beta.1",
|
|
72
|
+
"@nrwl/storybook": "14.4.0-beta.1",
|
|
73
|
+
"@nrwl/web": "14.4.0-beta.1",
|
|
74
|
+
"@nrwl/workspace": "14.4.0-beta.1",
|
|
74
75
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
75
76
|
"@schematics/angular": "~14.0.0",
|
|
76
77
|
"chalk": "4.1.0",
|
|
@@ -93,5 +94,5 @@
|
|
|
93
94
|
"fesm2015": "fesm2015/nrwl-angular.mjs",
|
|
94
95
|
"typings": "index.d.ts",
|
|
95
96
|
"sideEffects": false,
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "5b905140089128a21e5e77081958ae7fe6ba14bf"
|
|
97
98
|
}
|
|
@@ -8,35 +8,38 @@ const architect_1 = require("@angular-devkit/architect");
|
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const webpack_server_impl_1 = require("../webpack-server/webpack-server.impl");
|
|
10
10
|
const fs_1 = require("fs");
|
|
11
|
-
|
|
11
|
+
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
12
|
+
function getDynamicRemotes(project, context, workspaceProjects) {
|
|
12
13
|
// check for dynamic remotes
|
|
13
14
|
// we should only check for dynamic based on what we generate
|
|
14
15
|
// and fallback to empty array
|
|
15
|
-
const standardPathToGeneratedMFManifestJson = (0, path_1.join)(context.workspaceRoot,
|
|
16
|
+
const standardPathToGeneratedMFManifestJson = (0, path_1.join)(context.workspaceRoot, project.sourceRoot, 'assets/module-federation.manifest.json');
|
|
16
17
|
if (!(0, fs_1.existsSync)(standardPathToGeneratedMFManifestJson)) {
|
|
17
18
|
return [];
|
|
18
19
|
}
|
|
19
20
|
const moduleFederationManifestJson = (0, fs_1.readFileSync)(standardPathToGeneratedMFManifestJson, 'utf-8');
|
|
20
|
-
if (moduleFederationManifestJson) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
...remotesArray,
|
|
31
|
-
[remoteName, remoteLocation],
|
|
32
|
-
], []);
|
|
21
|
+
if (!moduleFederationManifestJson) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
// This should have shape of
|
|
25
|
+
// {
|
|
26
|
+
// "remoteName": "remoteLocation",
|
|
27
|
+
// }
|
|
28
|
+
const parsedManifest = JSON.parse(moduleFederationManifestJson);
|
|
29
|
+
if (!Object.keys(parsedManifest).every((key) => typeof key === 'string' && typeof parsedManifest[key] === 'string')) {
|
|
30
|
+
return [];
|
|
33
31
|
}
|
|
34
|
-
|
|
32
|
+
const dynamicRemotes = Object.entries(parsedManifest).map(([remoteName]) => remoteName);
|
|
33
|
+
const invalidDynamicRemotes = dynamicRemotes.filter((remote) => !workspaceProjects[remote]);
|
|
34
|
+
if (invalidDynamicRemotes.length) {
|
|
35
|
+
throw new Error(invalidDynamicRemotes.length === 1
|
|
36
|
+
? `Invalid dynamic remote configured in "${standardPathToGeneratedMFManifestJson}": ${invalidDynamicRemotes[0]}.`
|
|
37
|
+
: `Invalid dynamic remotes configured in "${standardPathToGeneratedMFManifestJson}": ${invalidDynamicRemotes.join(', ')}.`);
|
|
38
|
+
}
|
|
39
|
+
return dynamicRemotes;
|
|
35
40
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
const p = workspaceConfig.projects[context.target.project];
|
|
39
|
-
const mfConfigPath = (0, path_1.join)(context.workspaceRoot, p.root, 'module-federation.config.js');
|
|
41
|
+
function getStaticRemotes(project, context, workspaceProjects) {
|
|
42
|
+
const mfConfigPath = (0, path_1.join)(context.workspaceRoot, project.root, 'module-federation.config.js');
|
|
40
43
|
let mfeConfig;
|
|
41
44
|
try {
|
|
42
45
|
mfeConfig = require(mfConfigPath);
|
|
@@ -44,11 +47,35 @@ function executeModuleFederationDevServerBuilder(schema, context) {
|
|
|
44
47
|
catch (_a) {
|
|
45
48
|
throw new Error(`Could not load ${mfConfigPath}. Was this project generated with "@nrwl/angular:host"?`);
|
|
46
49
|
}
|
|
50
|
+
const staticRemotes = mfeConfig.remotes.length > 0 ? mfeConfig.remotes : [];
|
|
51
|
+
const invalidStaticRemotes = staticRemotes.filter((remote) => !workspaceProjects[remote]);
|
|
52
|
+
if (invalidStaticRemotes.length) {
|
|
53
|
+
throw new Error(invalidStaticRemotes.length === 1
|
|
54
|
+
? `Invalid static remote configured in "${mfConfigPath}": ${invalidStaticRemotes[0]}.`
|
|
55
|
+
: `Invalid static remotes configured in "${mfConfigPath}": ${invalidStaticRemotes.join(', ')}.`);
|
|
56
|
+
}
|
|
57
|
+
return staticRemotes;
|
|
58
|
+
}
|
|
59
|
+
function validateDevRemotes(options, workspaceProjects) {
|
|
60
|
+
var _a;
|
|
61
|
+
const invalidDevRemotes = (_a = options.devRemotes) === null || _a === void 0 ? void 0 : _a.filter((remote) => !workspaceProjects[remote]);
|
|
62
|
+
if (invalidDevRemotes.length) {
|
|
63
|
+
throw new Error(invalidDevRemotes.length === 1
|
|
64
|
+
? `Invalid dev remote provided: ${invalidDevRemotes[0]}.`
|
|
65
|
+
: `Invalid dev remotes provided: ${invalidDevRemotes.join(', ')}.`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function executeModuleFederationDevServerBuilder(schema, context) {
|
|
69
|
+
var _a, _b;
|
|
47
70
|
const options = tslib_1.__rest(schema, []);
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const
|
|
71
|
+
const projectGraph = (0, devkit_1.readCachedProjectGraph)();
|
|
72
|
+
const { projects: workspaceProjects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
|
|
73
|
+
const ws = new devkit_1.Workspaces(devkit_1.workspaceRoot);
|
|
74
|
+
const project = workspaceProjects[context.target.project];
|
|
75
|
+
validateDevRemotes(options, workspaceProjects);
|
|
76
|
+
const staticRemotes = getStaticRemotes(project, context, workspaceProjects);
|
|
77
|
+
const dynamicRemotes = getDynamicRemotes(project, context, workspaceProjects);
|
|
78
|
+
const remotes = [...staticRemotes, ...dynamicRemotes];
|
|
52
79
|
const devServeRemotes = !options.devRemotes
|
|
53
80
|
? []
|
|
54
81
|
: Array.isArray(options.devRemotes)
|
|
@@ -57,11 +84,25 @@ function executeModuleFederationDevServerBuilder(schema, context) {
|
|
|
57
84
|
for (const remote of remotes) {
|
|
58
85
|
const isDev = devServeRemotes.includes(remote);
|
|
59
86
|
const target = isDev ? 'serve' : 'serve-static';
|
|
87
|
+
if (!((_a = workspaceProjects[remote].targets) === null || _a === void 0 ? void 0 : _a[target])) {
|
|
88
|
+
throw new Error(`Could not find "${target}" target in "${remote}" project.`);
|
|
89
|
+
}
|
|
90
|
+
else if (!((_b = workspaceProjects[remote].targets) === null || _b === void 0 ? void 0 : _b[target].executor)) {
|
|
91
|
+
throw new Error(`Could not find executor for "${target}" target in "${remote}" project.`);
|
|
92
|
+
}
|
|
93
|
+
const runOptions = {};
|
|
94
|
+
if (options.verbose) {
|
|
95
|
+
const [collection, executor] = workspaceProjects[remote].targets[target].executor.split(':');
|
|
96
|
+
const { schema } = ws.readExecutor(collection, executor);
|
|
97
|
+
if (schema.additionalProperties || 'verbose' in schema.properties) {
|
|
98
|
+
runOptions.verbose = options.verbose;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
60
101
|
(0, ngcli_adapter_1.scheduleTarget)(context.workspaceRoot, {
|
|
61
102
|
project: remote,
|
|
62
103
|
target,
|
|
63
104
|
configuration: context.target.configuration,
|
|
64
|
-
runOptions
|
|
105
|
+
runOptions,
|
|
65
106
|
executor: context.builder.builderName,
|
|
66
107
|
}, options.verbose).then((obs) => {
|
|
67
108
|
obs.toPromise().catch((err) => {
|
|
@@ -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,
|
|
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,yCAKsB;AACtB,gEAA8D;AAC9D,yDAA0E;AAE1E,+BAA4B;AAC5B,+EAAoF;AACpF,2BAA8C;AAC9C,sEAA+F;AAE/F,SAAS,iBAAiB,CACxB,OAA6B,EAC7B,OAAuB,EACvB,iBAAuD;IAEvD,4BAA4B;IAC5B,6DAA6D;IAC7D,8BAA8B;IAE9B,MAAM,qCAAqC,GAAG,IAAA,WAAI,EAChD,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,UAAU,EAClB,wCAAwC,CACzC,CAAC;IACF,IAAI,CAAC,IAAA,eAAU,EAAC,qCAAqC,CAAC,EAAE;QACtD,OAAO,EAAE,CAAC;KACX;IAED,MAAM,4BAA4B,GAAG,IAAA,iBAAY,EAC/C,qCAAqC,EACrC,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,E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AAE,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;YACV,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW;SACtC,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,iDAA2B,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC;AApED,0FAoEC;AAED,kBAAe,IAAA,yBAAa,EAC1B,uCAAuC,CACxC,CAAC"}
|
|
@@ -102,6 +102,10 @@
|
|
|
102
102
|
"poll": {
|
|
103
103
|
"type": "number",
|
|
104
104
|
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
105
|
+
},
|
|
106
|
+
"buildLibsFromSource": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"description": "Read buildable libraries from source instead of building them separately. If not set, it will take the value specified in the `browserTarget` options, or it will default to `true` if it's also not set in the `browserTarget` options."
|
|
105
109
|
}
|
|
106
110
|
},
|
|
107
111
|
"additionalProperties": false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
2
2
|
import type { Schema } from './schema';
|
|
3
|
-
export declare function executeWebpackServerBuilder(
|
|
3
|
+
export declare function executeWebpackServerBuilder(rawOptions: Schema, context: BuilderContext): import("rxjs").Observable<import("@angular-devkit/build-angular").DevServerBuilderOutput>;
|
|
4
4
|
declare const _default: any;
|
|
5
5
|
export default _default;
|
|
@@ -3,51 +3,81 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.executeWebpackServerBuilder = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const architect_1 = require("@angular-devkit/architect");
|
|
6
|
-
const
|
|
6
|
+
const build_angular_1 = require("@angular-devkit/build-angular");
|
|
7
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
|
+
const webpack_nx_build_coordination_plugin_1 = require("@nrwl/web/src/plugins/webpack-nx-build-coordination-plugin");
|
|
9
|
+
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
10
|
+
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
8
11
|
const fs_1 = require("fs");
|
|
12
|
+
const operators_1 = require("nx/src/project-graph/operators");
|
|
9
13
|
const webpack_merge_1 = require("webpack-merge");
|
|
10
14
|
const webpack_1 = require("../utilities/webpack");
|
|
11
15
|
const lib_1 = require("./lib");
|
|
12
|
-
function executeWebpackServerBuilder(
|
|
13
|
-
var _a;
|
|
16
|
+
function executeWebpackServerBuilder(rawOptions, context) {
|
|
17
|
+
var _a, _b, _c, _d, _e;
|
|
14
18
|
process.env.NX_TSCONFIG_PATH = (0, devkit_1.joinPathFragments)(context.workspaceRoot, 'tsconfig.base.json');
|
|
15
|
-
const options = (0, lib_1.normalizeOptions)(
|
|
16
|
-
const workspaceConfig = (0, devkit_1.readAllWorkspaceConfiguration)();
|
|
19
|
+
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
17
20
|
const parsedBrowserTarget = (0, devkit_1.parseTargetString)(options.browserTarget);
|
|
18
|
-
const
|
|
19
|
-
const
|
|
21
|
+
const browserTargetProjectConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(parsedBrowserTarget.project);
|
|
22
|
+
const buildTarget = browserTargetProjectConfiguration.targets[parsedBrowserTarget.target];
|
|
23
|
+
const buildTargetConfiguration = parsedBrowserTarget.configuration
|
|
20
24
|
? buildTarget.configurations[parsedBrowserTarget.configuration]
|
|
21
25
|
: buildTarget.defaultConfiguration
|
|
22
26
|
? buildTarget.configurations[buildTarget.defaultConfiguration]
|
|
23
|
-
:
|
|
24
|
-
const
|
|
27
|
+
: undefined;
|
|
28
|
+
const buildLibsFromSource = (_c = (_b = (_a = options.buildLibsFromSource) !== null && _a !== void 0 ? _a : buildTargetConfiguration === null || buildTargetConfiguration === void 0 ? void 0 : buildTargetConfiguration.buildLibsFromSource) !== null && _b !== void 0 ? _b : buildTarget.options.buildLibsFromSource) !== null && _c !== void 0 ? _c : true;
|
|
29
|
+
const customWebpackConfig = (_d = buildTargetConfiguration === null || buildTargetConfiguration === void 0 ? void 0 : buildTargetConfiguration.customWebpackConfig) !== null && _d !== void 0 ? _d : buildTarget.options.customWebpackConfig;
|
|
30
|
+
let pathToWebpackConfig;
|
|
25
31
|
if (customWebpackConfig && customWebpackConfig.path) {
|
|
26
|
-
|
|
27
|
-
if ((0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
28
|
-
return (0, dev_server_1.serveWebpackBrowser)(options, context, {
|
|
29
|
-
webpackConfiguration: (baseWebpackConfig) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, buildTarget.options.tsConfig);
|
|
31
|
-
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
32
|
-
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
33
|
-
// then await will just resolve that object.
|
|
34
|
-
const config = yield customWebpackConfiguration;
|
|
35
|
-
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
|
36
|
-
// for instance: `module.exports = async config => { ... }`.
|
|
37
|
-
if (typeof config === 'function') {
|
|
38
|
-
return config(baseWebpackConfig, selectedConfiguration, context.target);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
32
|
+
pathToWebpackConfig = (0, devkit_1.joinPathFragments)(context.workspaceRoot, customWebpackConfig.path);
|
|
33
|
+
if (!(0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
47
34
|
throw new Error(`Custom Webpack Config File Not Found!\nTo use a custom webpack config, please ensure the path to the custom webpack file is correct: \n${pathToWebpackConfig}`);
|
|
48
35
|
}
|
|
49
36
|
}
|
|
50
|
-
|
|
37
|
+
let dependencies;
|
|
38
|
+
if (!buildLibsFromSource) {
|
|
39
|
+
const buildTargetTsConfigPath = (_e = buildTargetConfiguration === null || buildTargetConfiguration === void 0 ? void 0 : buildTargetConfiguration.tsConfig) !== null && _e !== void 0 ? _e : buildTarget.options.tsConfig;
|
|
40
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_1.readCachedProjectGraph)(), context.workspaceRoot, context.target.project, parsedBrowserTarget.target, context.target.configuration);
|
|
41
|
+
dependencies = result.dependencies;
|
|
42
|
+
const updatedTsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.workspaceRoot, buildTargetTsConfigPath), context.workspaceRoot, result.target.data.root, dependencies);
|
|
43
|
+
process.env.NX_TSCONFIG_PATH = updatedTsConfig;
|
|
44
|
+
// We can't just pass the tsconfig path in memory to the angular builder
|
|
45
|
+
// function because we can't pass the build target options to it, the build
|
|
46
|
+
// targets options will be retrieved by the builder from the project
|
|
47
|
+
// configuration. Therefore, we patch the method in the context to retrieve
|
|
48
|
+
// the target options to overwrite the tsconfig path to use the generated
|
|
49
|
+
// one with the updated path mappings.
|
|
50
|
+
const originalGetTargetOptions = context.getTargetOptions;
|
|
51
|
+
context.getTargetOptions = (target) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const options = yield originalGetTargetOptions(target);
|
|
53
|
+
options.tsConfig = updatedTsConfig;
|
|
54
|
+
return options;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return (0, build_angular_1.executeDevServerBuilder)(options, context, {
|
|
58
|
+
webpackConfiguration: (baseWebpackConfig) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (!buildLibsFromSource) {
|
|
60
|
+
const workspaceDependencies = dependencies
|
|
61
|
+
.filter((dep) => !(0, operators_1.isNpmProject)(dep.node))
|
|
62
|
+
.map((dep) => dep.node.name);
|
|
63
|
+
baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBrowserTarget.target} --projects=${workspaceDependencies.join(',')}`));
|
|
64
|
+
}
|
|
65
|
+
if (!pathToWebpackConfig) {
|
|
66
|
+
return baseWebpackConfig;
|
|
67
|
+
}
|
|
68
|
+
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, buildTarget.options.tsConfig);
|
|
69
|
+
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
70
|
+
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
71
|
+
// then await will just resolve that object.
|
|
72
|
+
const config = yield customWebpackConfiguration;
|
|
73
|
+
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
|
74
|
+
// for instance: `module.exports = async config => { ... }`.
|
|
75
|
+
if (typeof config === 'function') {
|
|
76
|
+
return config(baseWebpackConfig, buildTargetConfiguration, context.target);
|
|
77
|
+
}
|
|
78
|
+
return (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
51
81
|
}
|
|
52
82
|
exports.executeWebpackServerBuilder = executeWebpackServerBuilder;
|
|
53
83
|
exports.default = (0, architect_1.createBuilder)(executeWebpackServerBuilder);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,iEAGuC;AAEvC,yCAIsB;AACtB,qHAA8G;AAC9G,6FAI4D;AAC5D,sEAAoF;AACpF,2BAAgC;AAChC,8DAA8D;AAC9D,iDAAsC;AACtC,kDAAkE;AAClE,+BAAyC;AAGzC,SAAgB,2BAA2B,CACzC,UAAkB,EAClB,OAAuB;;IAEvB,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAA,0BAAiB,EAC9C,OAAO,CAAC,aAAa,EACrB,oBAAoB,CACrB,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,UAAU,CAAC,CAAC;IAE7C,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACrE,MAAM,iCAAiC,GAAG,IAAA,8CAA8B,EACtE,mBAAmB,CAAC,OAAO,CAC5B,CAAC;IAEF,MAAM,WAAW,GACf,iCAAiC,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAExE,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,aAAa;QAChE,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,mBAAmB,CAAC,aAAa,CAAC;QAC/D,CAAC,CAAC,WAAW,CAAC,oBAAoB;YAClC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,WAAW,CAAC,oBAAoB,CAAC;YAC9D,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,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hD,0FAA0F;YAC1F,4DAA4D;YAC5D,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;gBAChC,OAAO,MAAM,CACX,iBAAiB,EACjB,wBAAwB,EACxB,OAAO,CAAC,MAAM,CACf,CAAC;aACH;YAED,OAAO,IAAA,qBAAK,EAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAC1C,CAAC,CAAA;KACF,CAAC,CAAC;AACL,CAAC;AA5HD,kEA4HC;AAED,kBAAe,IAAA,yBAAa,EAC1B,2BAA2B,CACrB,CAAC"}
|
|
@@ -62,6 +62,7 @@ function applicationGenerator(host, schema) {
|
|
|
62
62
|
yield (0, lib_1.addUnitTestRunner)(host, options);
|
|
63
63
|
yield (0, lib_1.addE2e)(host, options);
|
|
64
64
|
(0, lib_1.updateEditorTsConfig)(host, options);
|
|
65
|
+
(0, lib_1.setDefaultProject)(host, options);
|
|
65
66
|
if (options.backendProject) {
|
|
66
67
|
(0, lib_1.addProxyConfig)(host, options);
|
|
67
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,8DAAwE;AACxE,2DAAyE;AAEzE,uCAAoD;AACpD,qEAA0E;AAC1E,+
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AACtB,8DAAwE;AACxE,2DAAyE;AAEzE,uCAAoD;AACpD,qEAA0E;AAC1E,+BAiBe;AAGf,SAAsB,oBAAoB,CACxC,IAAU,EACV,MAAuB;;QAEvB,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,IAAA,2BAAoB,EAAC,IAAI,kCAC1B,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QAEH,MAAM,mBAAmB,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OAAO,CAAC,CAAC;SAC7B;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AA5GD,oDA4GC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -12,6 +12,7 @@ export * from './nrwl-home-tpl';
|
|
|
12
12
|
export * from './remove-scaffolded-e2e';
|
|
13
13
|
export * from './root-router-config';
|
|
14
14
|
export * from './set-app-strict-default';
|
|
15
|
+
export * from './set-default-project';
|
|
15
16
|
export * from './update-component-spec';
|
|
16
17
|
export * from './update-app-component-template';
|
|
17
18
|
export * from './update-nx-component-template';
|
|
@@ -15,6 +15,7 @@ tslib_1.__exportStar(require("./nrwl-home-tpl"), exports);
|
|
|
15
15
|
tslib_1.__exportStar(require("./remove-scaffolded-e2e"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./root-router-config"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./set-app-strict-default"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./set-default-project"), exports);
|
|
18
19
|
tslib_1.__exportStar(require("./update-component-spec"), exports);
|
|
19
20
|
tslib_1.__exportStar(require("./update-app-component-template"), exports);
|
|
20
21
|
tslib_1.__exportStar(require("./update-nx-component-template"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,wDAA8B;AAC9B,oDAA0B;AAC1B,2DAAiC;AACjC,6DAAmC;AACnC,iEAAuC;AACvC,yDAA+B;AAC/B,wEAA8C;AAC9C,8DAAoC;AACpC,8DAAoC;AACpC,0DAAgC;AAChC,kEAAwC;AACxC,+DAAqC;AACrC,mEAAyC;AACzC,kEAAwC;AACxC,0EAAgD;AAChD,yEAA+C;AAC/C,gEAAsC;AACtC,+DAAqC;AACrC,mEAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,wDAA8B;AAC9B,oDAA0B;AAC1B,2DAAiC;AACjC,6DAAmC;AACnC,iEAAuC;AACvC,yDAA+B;AAC/B,wEAA8C;AAC9C,8DAAoC;AACpC,8DAAoC;AACpC,0DAAgC;AAChC,kEAAwC;AACxC,+DAAqC;AACrC,mEAAyC;AACzC,gEAAsC;AACtC,kEAAwC;AACxC,0EAAgD;AAChD,yEAA+C;AAC/C,gEAAsC;AACtC,+DAAqC;AACrC,mEAAyC"}
|
|
@@ -569,7 +569,7 @@ exports.nrwlHomeTemplate = {
|
|
|
569
569
|
/>
|
|
570
570
|
</svg>
|
|
571
571
|
</a>
|
|
572
|
-
<a href="https://nx.dev/tutorial/01-create-application?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
572
|
+
<a href="https://nx.dev/angular-tutorial/01-create-application?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
573
573
|
<svg
|
|
574
574
|
fill="none"
|
|
575
575
|
stroke="currentColor"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setDefaultProject = void 0;
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
function setDefaultProject(tree, options) {
|
|
6
|
+
const workspace = (0, devkit_1.readWorkspaceConfiguration)(tree);
|
|
7
|
+
if (!workspace.defaultProject) {
|
|
8
|
+
workspace.defaultProject = options.name;
|
|
9
|
+
(0, devkit_1.updateWorkspaceConfiguration)(tree, workspace);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.setDefaultProject = setDefaultProject;
|
|
13
|
+
//# sourceMappingURL=set-default-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-default-project.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/set-default-project.ts"],"names":[],"mappings":";;;AACA,yCAGsB;AAGtB,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAyB;IACrE,MAAM,SAAS,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;IAEnD,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;QAC7B,SAAS,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;QACxC,IAAA,qCAA4B,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC/C;AACH,CAAC;AAPD,8CAOC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const path_1 = require("nx/src/utils/path");
|
|
5
6
|
const devkit_2 = require("@nrwl/devkit");
|
|
6
7
|
const linter_1 = require("@nrwl/linter");
|
|
7
8
|
const project_1 = require("../../utils/project");
|
|
@@ -30,7 +31,7 @@ function normalizeOptions(host, schema) {
|
|
|
30
31
|
const modulePath = `${projectRoot}/src/lib/${fileName}.module.ts`;
|
|
31
32
|
const prefix = (0, project_1.normalizePrefix)(options.prefix, npmScope);
|
|
32
33
|
options.standaloneConfig = (_c = options.standaloneConfig) !== null && _c !== void 0 ? _c : standaloneAsDefault;
|
|
33
|
-
const importPath = options.importPath ||
|
|
34
|
+
const importPath = options.importPath || (0, path_1.getImportPath)(npmScope, projectDirectory);
|
|
34
35
|
// Determine the roots where @schematics/angular will place the projects
|
|
35
36
|
// This might not be where the projects actually end up
|
|
36
37
|
const workspaceJsonPath = (0, devkit_1.getWorkspacePath)(host);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,4CAAkD;AAGlD,yCAAqC;AACrC,yCAAsC;AAEtC,iDAAsD;AAEtD,SAAgB,gBAAgB,CAC9B,IAAU,EACV,MAAuB;;IAEvB,gDAAgD;IAChD,MAAM,OAAO,mBACX,SAAS,EAAE,KAAK,EAChB,MAAM,EAAE,eAAM,CAAC,MAAM,EACrB,IAAI,EAAE,EAAE,EACR,WAAW,EAAE,KAAK,EAClB,gBAAgB,EAAE,KAAK,EACvB,UAAU,EAAE,KAAK,EACjB,cAAc;QACd,yGAAyG;QACzG,eAAe,EAAE,MAAM,CAAC,WAAW;YACjC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,MAAA,MAAM,CAAC,eAAe,mCAAI,MAAM,EACpC,UAAU,EAAE,MAAA,MAAM,CAAC,UAAU,mCAAI,KAAK,IACnC,MAAM,CACV,CAAC;IAEF,MAAM,IAAI,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;IAC1C,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS;QACxC,CAAC,CAAC,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;QACrE,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAE5E,MAAM,WAAW,GAAG,gBAAgB;SACjC,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC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C;IAEhB,uCACK,OAAO,KACV,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,eAAM,CAAC,MAAM,EACvC,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mEAAuB,EAC7D,MAAM,EACN,IAAI,EAAE,WAAW,EACjB,WAAW,EACX,SAAS,EAAE,OAAO,EAClB,UAAU;QACV,gBAAgB;QAChB,UAAU;QACV,UAAU;QACV,QAAQ;QACR,UAAU;QACV,qBAAqB,IACrB;AACJ,CAAC;AAzED,4CAyEC"}
|
|
@@ -15,19 +15,15 @@ function normalizeOptions(tree, options, projects) {
|
|
|
15
15
|
continue;
|
|
16
16
|
}
|
|
17
17
|
const { name } = (0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(lib.config.root, 'package.json'));
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
npmScope = (0, devkit_1.detectWorkspaceScope)(name);
|
|
19
|
+
if (npmScope) {
|
|
20
20
|
break;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
if
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (name) {
|
|
28
|
-
npmScope = name.startsWith('@') ? name.split('/')[0].substring(1) : name;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
24
|
+
// use the name (scope if exists) in the root package.json
|
|
25
|
+
npmScope =
|
|
26
|
+
npmScope || (0, devkit_1.detectWorkspaceScope)((0, devkit_1.readJson)(tree, 'package.json').name);
|
|
31
27
|
return Object.assign(Object.assign({}, options), { npmScope });
|
|
32
28
|
}
|
|
33
29
|
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/normalize-options.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/normalize-options.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AAItB,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAyB,EACzB,QAA2B;IAE3B,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAChC,IAAI,QAAQ,EAAE;QACZ,QAAQ,GAAG,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;KACrC;SAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACnC,mDAAmD;QACnD,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE;YAC/B,MAAM,eAAe,GAAG,IAAA,0BAAiB,EACvC,GAAG,CAAC,MAAM,CAAC,IAAI,EACf,cAAc,CACf,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACjC,SAAS;aACV;YAED,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iBAAQ,EACvB,IAAI,EACJ,IAAA,0BAAiB,EAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CACnD,CAAC;YACF,QAAQ,GAAG,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;YACtC,IAAI,QAAQ,EAAE;gBACZ,MAAM;aACP;SACF;KACF;IAED,0DAA0D;IAC1D,QAAQ;QACN,QAAQ,IAAI,IAAA,6BAAoB,EAAC,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;IAExE,uCAAY,OAAO,KAAE,QAAQ,IAAG;AAClC,CAAC;AAnCD,4CAmCC"}
|
|
@@ -33,33 +33,27 @@ exports.validateWorkspace = validateWorkspace;
|
|
|
33
33
|
function createNxJson(tree, options, setWorkspaceLayoutAsNewProjectRoot = false) {
|
|
34
34
|
var _a;
|
|
35
35
|
const { newProjectRoot = '' } = (0, devkit_1.readJson)(tree, 'angular.json');
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
affected: {
|
|
36
|
+
const { npmScope } = options;
|
|
37
|
+
(0, devkit_1.writeJson)(tree, 'nx.json', Object.assign(Object.assign({}, (npmScope ? { npmScope } : {})), { affected: {
|
|
39
38
|
defaultBase: (_a = options.defaultBase) !== null && _a !== void 0 ? _a : (0, default_base_1.deduceDefaultBase)(),
|
|
40
|
-
},
|
|
41
|
-
implicitDependencies: {
|
|
39
|
+
}, implicitDependencies: {
|
|
42
40
|
'package.json': {
|
|
43
41
|
dependencies: '*',
|
|
44
42
|
devDependencies: '*',
|
|
45
43
|
},
|
|
46
44
|
'.eslintrc.json': '*',
|
|
47
|
-
},
|
|
48
|
-
tasksRunnerOptions: {
|
|
45
|
+
}, tasksRunnerOptions: {
|
|
49
46
|
default: {
|
|
50
47
|
runner: 'nx/tasks-runners/default',
|
|
51
48
|
options: {
|
|
52
49
|
cacheableOperations: ['build', 'lint', 'test', 'e2e'],
|
|
53
50
|
},
|
|
54
51
|
},
|
|
55
|
-
},
|
|
56
|
-
targetDefaults: {
|
|
52
|
+
}, targetDefaults: {
|
|
57
53
|
build: { dependsOn: ['^build'] },
|
|
58
|
-
},
|
|
59
|
-
workspaceLayout: setWorkspaceLayoutAsNewProjectRoot
|
|
54
|
+
}, workspaceLayout: setWorkspaceLayoutAsNewProjectRoot
|
|
60
55
|
? { appsDir: newProjectRoot, libsDir: newProjectRoot }
|
|
61
|
-
: undefined
|
|
62
|
-
});
|
|
56
|
+
: undefined }));
|
|
63
57
|
}
|
|
64
58
|
exports.createNxJson = createNxJson;
|
|
65
59
|
function decorateAngularCli(tree) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/workspace.ts"],"names":[],"mappings":";;;;AAAA,yCAUsB;AACtB,yCAAyD;AACzD,kFAAkG;AAClG,6EAA+E;AAC/E,qEAA2F;AAC3F,yEAAqF;AACrF,iEAAqE;AACrE,2BAAkC;AAClC,4DAAkE;AAClE,+BAAqC;AACrC,sDAA0E;AAG1E,6DAAsE;AAEtE,SAAgB,iBAAiB,CAAC,IAAU;IAC1C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAChC,MAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;KAC5D;IACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAChC,MAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;KAC5D;IAED,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;QAClB,OAAO;KACR;IAED,MAAM,IAAI,KAAK,CAAC,GAAG,mDAA8B;;MAE7C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AAhBD,8CAgBC;AAED,SAAgB,YAAY,CAC1B,IAAU,EACV,OAAyB,EACzB,qCAA8C,KAAK;;IAEnD,MAAM,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/workspace.ts"],"names":[],"mappings":";;;;AAAA,yCAUsB;AACtB,yCAAyD;AACzD,kFAAkG;AAClG,6EAA+E;AAC/E,qEAA2F;AAC3F,yEAAqF;AACrF,iEAAqE;AACrE,2BAAkC;AAClC,4DAAkE;AAClE,+BAAqC;AACrC,sDAA0E;AAG1E,6DAAsE;AAEtE,SAAgB,iBAAiB,CAAC,IAAU;IAC1C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAChC,MAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;KAC5D;IACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CA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,EAAE;oBAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACtC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;KACH;SAAM;QACL,IAAA,kBAAS,EAAC,IAAI,EAAE,yBAAyB,EAAE;YACzC,eAAe;SAChB,CAAC,CAAC;KACJ;AACH,CAAC;AAED,SAAe,oBAAoB,CAAC,IAAU;;QAC5C,MAAM,sBAAsB,GAAG,MAAM,IAAA,4CAAiC,GAAE,CAAC;QACzE,IAAI,CAAC,sBAAsB,EAAE;YAC3B,IAAA,kBAAS,EAAC,IAAI,EAAE,aAAa,EAAE,wCAA4B,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;YACnC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,mBAAmB,CAAC,EACjD,GAAG,EACH,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CACvB,CAAC;SACH;IACH,CAAC;CAAA"}
|
package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.actions.ts__tmpl__
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Action} from '@ngrx/store';
|
|
2
|
-
import {Entity} from './<%= fileName %>.reducer';
|
|
2
|
+
import {<%= className %>Entity} from './<%= fileName %>.reducer';
|
|
3
3
|
|
|
4
4
|
export enum <%= className %>ActionTypes {
|
|
5
5
|
Load<%= className %> = '[<%= className %>] Load <%= className %>',
|
|
@@ -20,7 +20,7 @@ export class <%= className %>LoadError implements Action {
|
|
|
20
20
|
export class <%= className %>Loaded implements Action {
|
|
21
21
|
readonly type = <%= className %>ActionTypes.<%= className %>Loaded;
|
|
22
22
|
|
|
23
|
-
constructor(public payload: Entity[]) {}
|
|
23
|
+
constructor(public payload: <%= className %>Entity[]) {}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export type <%= className %>Action = Load<%= className %> | <%= className %>Loaded | <%= className %>LoadError;
|
package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.facade.spec.ts__tmpl__
CHANGED
|
@@ -10,7 +10,7 @@ import { <%= className %>Effects } from './<%= fileName %>.effects';
|
|
|
10
10
|
import { <%= className %>Facade } from './<%= fileName %>.facade';
|
|
11
11
|
import {
|
|
12
12
|
<%= className %>State,
|
|
13
|
-
Entity,
|
|
13
|
+
<%= className %>Entity,
|
|
14
14
|
initialState,
|
|
15
15
|
reducer
|
|
16
16
|
} from './<%= fileName %>.reducer';
|
|
@@ -23,7 +23,7 @@ interface TestSchema {
|
|
|
23
23
|
describe('<%= className %>Facade', () => {
|
|
24
24
|
let facade: <%= className %>Facade;
|
|
25
25
|
let store: Store<TestSchema>;
|
|
26
|
-
const create<%= className %> = (id: string, name?: string): Entity => ({
|
|
26
|
+
const create<%= className %> = (id: string, name?: string): <%= className %>Entity => ({
|
|
27
27
|
id,
|
|
28
28
|
name: name || `name-${id}`
|
|
29
29
|
});
|
package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.spec.ts__tmpl__
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { <%= className %>Loaded } from './<%= fileName %>.actions';
|
|
2
|
-
import { <%= className %>State, Entity, initialState, reducer } from './<%= fileName %>.reducer';
|
|
2
|
+
import { <%= className %>State, <%= className %>Entity, initialState, reducer } from './<%= fileName %>.reducer';
|
|
3
3
|
|
|
4
4
|
describe('<%= className %> Reducer', () => {
|
|
5
|
-
const get<%= className %>Id = (it: Entity) => it.id;
|
|
6
|
-
const create<%= className %> = (id: string, name = ''): Entity => ({
|
|
5
|
+
const get<%= className %>Id = (it: <%= className %>Entity) => it.id;
|
|
6
|
+
const create<%= className %> = (id: string, name = ''): <%= className %>Entity => ({
|
|
7
7
|
id,
|
|
8
8
|
name: name || `name-${id}`
|
|
9
9
|
});
|
package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.ts__tmpl__
CHANGED
|
@@ -8,13 +8,13 @@ export const <%= constantName %>_FEATURE_KEY = '<%= propertyName %>';
|
|
|
8
8
|
*
|
|
9
9
|
* Note: replace if already defined in another module
|
|
10
10
|
*/
|
|
11
|
-
export interface Entity {
|
|
11
|
+
export interface <%= className %>Entity {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface <%= className %>State {
|
|
17
|
-
list: Entity[]; // list of <%= className %>; analogous to a sql normalized table
|
|
17
|
+
list: <%= className %>Entity[]; // list of <%= className %>; analogous to a sql normalized table
|
|
18
18
|
selectedId?: string | number; // which <%= className %> record has been selected
|
|
19
19
|
loaded: boolean; // has the <%= className %> list been loaded
|
|
20
20
|
error?: any; // last none error (if any)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Entity, <%= className %>PartialState } from './<%= fileName %>.reducer';
|
|
1
|
+
import { <%= className %>Entity, <%= className %>PartialState } from './<%= fileName %>.reducer';
|
|
2
2
|
import { <%= propertyName %>Query } from './<%= fileName %>.selectors';
|
|
3
3
|
|
|
4
4
|
describe('<%= className %> Selectors', () => {
|
|
5
5
|
const ERROR_MSG = 'No Error Available';
|
|
6
|
-
const get<%= className %>Id = (it: Entity) => it.id;
|
|
6
|
+
const get<%= className %>Id = (it: <%= className %>Entity) => it.id;
|
|
7
7
|
|
|
8
8
|
let storeState: <%= className %>PartialState;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
-
const create<%= className %> = (id: string, name = ''): Entity => ({
|
|
11
|
+
const create<%= className %> = (id: string, name = ''): <%= className %>Entity => ({
|
|
12
12
|
id,
|
|
13
13
|
name: name || `name-${id}`
|
|
14
14
|
});
|
|
@@ -35,8 +35,8 @@ describe('<%= className %> Selectors', () => {
|
|
|
35
35
|
expect(selId).toBe('PRODUCT-BBB');
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
it('getSelected<%= className %>() should return the selected Entity', () => {
|
|
39
|
-
const result = <%= propertyName %>Query.getSelected<%= className %>(storeState) as Entity;
|
|
38
|
+
it('getSelected<%= className %>() should return the selected <%= className %>Entity', () => {
|
|
39
|
+
const result = <%= propertyName %>Query.getSelected<%= className %>(storeState) as <%= className %>Entity;
|
|
40
40
|
const selId = get<%= className %>Id(result);
|
|
41
41
|
|
|
42
42
|
expect(selId).toBe('PRODUCT-BBB');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-storybook-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/storybook-configuration/lib/generate-storybook-configuration.ts"],"names":[],"mappings":";;;;AACA,+CAAyD;AAGzD,SAAsB,8BAA8B,CAClD,IAAU,EACV,OAAsC;;QAEtC,OAAO,MAAM,IAAA,kCAAsB,EAAC,IAAI,EAAE;YACxC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,oBAAoB;YACjC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"generate-storybook-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/storybook-configuration/lib/generate-storybook-configuration.ts"],"names":[],"mappings":";;;;AACA,+CAAyD;AAGzD,SAAsB,8BAA8B,CAClD,IAAU,EACV,OAAsC;;QAEtC,OAAO,MAAM,IAAA,kCAAsB,EAAC,IAAI,EAAE;YACxC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,oBAAoB;YACjC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,eAAe,EAAE,OAAO,CAAC,eAAe;SACzC,CAAC,CAAC;IACL,CAAC;CAAA;AAZD,wEAYC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Tree } from '@nrwl/devkit';
|
|
2
|
+
export default function (tree: Tree): Promise<void>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
json.scripts.postinstall.includes('ngcc')) {
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
function default_1(tree) {
|
|
6
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
7
|
+
let shouldFormat = false;
|
|
8
|
+
(0, devkit_1.updateJson)(tree, 'package.json', (json) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
if ((_b = (_a = json.scripts) === null || _a === void 0 ? void 0 : _a.postinstall) === null || _b === void 0 ? void 0 : _b.includes('ngcc')) {
|
|
11
|
+
json.scripts.postinstall = json.scripts.postinstall.replace(/(.*)(ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points)(.*)/, '$1ngcc --properties es2015 browser module main$3');
|
|
12
|
+
shouldFormat = true;
|
|
13
|
+
}
|
|
14
|
+
return json;
|
|
15
|
+
});
|
|
16
|
+
if (shouldFormat) {
|
|
17
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
})(host, context);
|
|
16
|
-
};
|
|
17
|
-
function default_1() {
|
|
18
|
-
return (0, schematics_1.chain)([udpateNgccPostinstallScript, (0, workspace_2.formatFiles)()]);
|
|
19
|
+
});
|
|
19
20
|
}
|
|
20
21
|
exports.default = default_1;
|
|
21
22
|
//# sourceMappingURL=update-ngcc-postinstall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-ngcc-postinstall.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-12-0-0/update-ngcc-postinstall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-ngcc-postinstall.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-12-0-0/update-ngcc-postinstall.ts"],"names":[],"mappings":";;;AACA,yCAAuD;AAEvD,mBAA+B,IAAU;;QACvC,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;;YACxC,IAAI,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,WAAW,0CAAE,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC/C,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CACzD,+FAA+F,EAC/F,kDAAkD,CACnD,CAAC;gBACF,YAAY,GAAG,IAAI,CAAC;aACrB;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,EAAE;YAChB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AAlBD,4BAkBC"}
|
|
@@ -8,6 +8,7 @@ const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
|
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
|
|
11
|
+
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
11
12
|
function collectDependencies(projectGraph, name, dependencies = {
|
|
12
13
|
workspaceLibraries: new Set(),
|
|
13
14
|
npmPackages: new Set(),
|
|
@@ -30,7 +31,7 @@ function collectDependencies(projectGraph, name, dependencies = {
|
|
|
30
31
|
}
|
|
31
32
|
function mapWorkspaceLibrariesToTsConfigImport(workspaceLibraries) {
|
|
32
33
|
var _a, _b;
|
|
33
|
-
const {
|
|
34
|
+
const { nodes: projectGraphNodes } = (0, devkit_1.readCachedProjectGraph)();
|
|
34
35
|
const tsConfigPath = (_a = process.env.NX_TSCONFIG_PATH) !== null && _a !== void 0 ? _a : (0, typescript_1.getRootTsConfigPath)();
|
|
35
36
|
const tsConfig = (0, typescript_1.readTsConfig)(tsConfigPath);
|
|
36
37
|
const tsconfigPathAliases = (_b = tsConfig.options) === null || _b === void 0 ? void 0 : _b.paths;
|
|
@@ -39,7 +40,7 @@ function mapWorkspaceLibrariesToTsConfigImport(workspaceLibraries) {
|
|
|
39
40
|
}
|
|
40
41
|
const mappedLibraries = [];
|
|
41
42
|
for (const lib of workspaceLibraries) {
|
|
42
|
-
const sourceRoot =
|
|
43
|
+
const sourceRoot = projectGraphNodes[lib].data.sourceRoot;
|
|
43
44
|
let found = false;
|
|
44
45
|
for (const [key, value] of Object.entries(tsconfigPathAliases)) {
|
|
45
46
|
if (value.find((p) => p.startsWith(sourceRoot))) {
|
|
@@ -66,10 +67,10 @@ function getDependentPackagesForProject(projectGraph, name) {
|
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
function determineRemoteUrl(remote) {
|
|
69
|
-
const
|
|
70
|
+
const remoteProjectConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(remote);
|
|
70
71
|
let publicHost = '';
|
|
71
72
|
try {
|
|
72
|
-
publicHost =
|
|
73
|
+
publicHost = remoteProjectConfiguration.targets.serve.options.publicHost;
|
|
73
74
|
}
|
|
74
75
|
catch (error) {
|
|
75
76
|
throw new Error(`Cannot automatically determine URL of remote (${remote}). Looked for property "publicHost" in the project's "serve" target.\n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/utils/mfe/with-module-federation.ts"],"names":[],"mappings":";;;;AAAA,+CAKuB;AACvB,
|
|
1
|
+
{"version":3,"file":"with-module-federation.js","sourceRoot":"","sources":["../../../../../../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,CAAC;wBACzB,IAAI,EAAE,OAAO,CAAC,IAAI;wBAClB,QAAQ,EAAE,iBAAiB;wBAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;wBACxB,OAAO,EAAE,aAAa;wBACtB,MAAM,oBACD,kBAAkB,CACtB;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;yBACf;qBACF,CAAC;oBACF,eAAe,CAAC,oBAAoB,EAAE;iBACvC,IACD,CAAA;SAAA,CAAC;IACL,CAAC;CAAA;AAvFD,oDAuFC"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const angularVersion = "~14.0.0";
|
|
|
3
3
|
export declare const angularDevkitVersion = "~14.0.0";
|
|
4
4
|
export declare const ngPackagrVersion = "~14.0.0";
|
|
5
5
|
export declare const angularJsVersion = "1.7.9";
|
|
6
|
-
export declare const ngrxVersion = "~
|
|
6
|
+
export declare const ngrxVersion = "~14.0.0";
|
|
7
7
|
export declare const rxjsVersion = "~7.4.0";
|
|
8
8
|
export declare const jestPresetAngularVersion = "~11.1.2";
|
|
9
9
|
export declare const angularEslintVersion = "~13.2.1";
|
package/src/utils/versions.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.angularVersion = '~14.0.0';
|
|
|
6
6
|
exports.angularDevkitVersion = '~14.0.0';
|
|
7
7
|
exports.ngPackagrVersion = '~14.0.0';
|
|
8
8
|
exports.angularJsVersion = '1.7.9';
|
|
9
|
-
exports.ngrxVersion = '~
|
|
9
|
+
exports.ngrxVersion = '~14.0.0';
|
|
10
10
|
exports.rxjsVersion = '~7.4.0';
|
|
11
11
|
exports.jestPresetAngularVersion = '~11.1.2';
|
|
12
12
|
exports.angularEslintVersion = '~13.2.1';
|
package/testing/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { cold as rxjsMarblesCold, hot as rxjsMarblesHot, getTestScheduler as rxjsMarblesTestScheduler, time as rxjsMarblesTime } from 'jasmine-marbles';
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
3
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
4
4
|
*/
|
|
5
5
|
export declare const cold: typeof rxjsMarblesCold;
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
7
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
8
8
|
*/
|
|
9
9
|
export declare const hot: typeof rxjsMarblesHot;
|
|
10
10
|
/**
|
|
11
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
11
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
12
12
|
*/
|
|
13
13
|
export declare const getTestScheduler: typeof rxjsMarblesTestScheduler;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
15
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
16
16
|
*/
|
|
17
17
|
export declare const time: typeof rxjsMarblesTime;
|
|
18
18
|
export { readAll, readFirst } from './src/testing-utils';
|
package/testing/index.js
CHANGED
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readFirst = exports.readAll = exports.time = exports.getTestScheduler = exports.hot = exports.cold = void 0;
|
|
4
4
|
const jasmine_marbles_1 = require("jasmine-marbles");
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
6
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
7
7
|
*/
|
|
8
8
|
exports.cold = jasmine_marbles_1.cold;
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
10
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
11
11
|
*/
|
|
12
12
|
exports.hot = jasmine_marbles_1.hot;
|
|
13
13
|
/**
|
|
14
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
14
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
15
15
|
*/
|
|
16
16
|
exports.getTestScheduler = jasmine_marbles_1.getTestScheduler;
|
|
17
17
|
/**
|
|
18
|
-
* @deprecated Import from 'jasmine-marbles' instead
|
|
18
|
+
* @deprecated Import from 'jasmine-marbles' instead. Will be removed in Nx v15.
|
|
19
19
|
*/
|
|
20
20
|
exports.time = jasmine_marbles_1.time;
|
|
21
21
|
var testing_utils_1 = require("./src/testing-utils");
|
package/src/utils/testing.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Rule, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
export declare function runMigration<SchemaOptions extends object = any>(schematicName: string, options: SchemaOptions, tree: Tree): Promise<import("@angular-devkit/schematics/testing").UnitTestTree>;
|
|
3
|
-
export declare function callRule(rule: Rule, tree: Tree): Promise<import("@angular-devkit/schematics/src/tree/interface").Tree>;
|
package/src/utils/testing.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callRule = exports.runMigration = void 0;
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
6
|
-
const testRunner = new testing_1.SchematicTestRunner('@nrwl/angular', (0, path_1.join)(__dirname, '../../generators.json'));
|
|
7
|
-
testRunner.registerCollection('@nrwl/jest', (0, path_1.join)(__dirname, '../../../jest/generators.json'));
|
|
8
|
-
testRunner.registerCollection('@nrwl/workspace', (0, path_1.join)(__dirname, '../../../workspace/generators.json'));
|
|
9
|
-
testRunner.registerCollection('@nrwl/cypress', (0, path_1.join)(__dirname, '../../../cypress/generators.json'));
|
|
10
|
-
testRunner.registerCollection('@nrwl/storybook', (0, path_1.join)(__dirname, '../../../storybook/generators.json'));
|
|
11
|
-
const migrationTestRunner = new testing_1.SchematicTestRunner('@nrwl/workspace', (0, path_1.join)(__dirname, '../../migrations.json'));
|
|
12
|
-
function runMigration(schematicName, options, tree) {
|
|
13
|
-
return migrationTestRunner
|
|
14
|
-
.runSchematicAsync(schematicName, options, tree)
|
|
15
|
-
.toPromise();
|
|
16
|
-
}
|
|
17
|
-
exports.runMigration = runMigration;
|
|
18
|
-
function callRule(rule, tree) {
|
|
19
|
-
return testRunner.callRule(rule, tree).toPromise();
|
|
20
|
-
}
|
|
21
|
-
exports.callRule = callRule;
|
|
22
|
-
//# sourceMappingURL=testing.js.map
|
package/src/utils/testing.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/testing.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,gEAAyE;AAGzE,MAAM,UAAU,GAAG,IAAI,6BAAmB,CACxC,eAAe,EACf,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC,CACzC,CAAC;AAEF,UAAU,CAAC,kBAAkB,CAC3B,YAAY,EACZ,IAAA,WAAI,EAAC,SAAS,EAAE,+BAA+B,CAAC,CACjD,CAAC;AAEF,UAAU,CAAC,kBAAkB,CAC3B,iBAAiB,EACjB,IAAA,WAAI,EAAC,SAAS,EAAE,oCAAoC,CAAC,CACtD,CAAC;AAEF,UAAU,CAAC,kBAAkB,CAC3B,eAAe,EACf,IAAA,WAAI,EAAC,SAAS,EAAE,kCAAkC,CAAC,CACpD,CAAC;AAEF,UAAU,CAAC,kBAAkB,CAC3B,iBAAiB,EACjB,IAAA,WAAI,EAAC,SAAS,EAAE,oCAAoC,CAAC,CACtD,CAAC;AAEF,MAAM,mBAAmB,GAAG,IAAI,6BAAmB,CACjD,iBAAiB,EACjB,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC,CACzC,CAAC;AAEF,SAAgB,YAAY,CAC1B,aAAqB,EACrB,OAAsB,EACtB,IAAU;IAEV,OAAO,mBAAmB;SACvB,iBAAiB,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;SAC/C,SAAS,EAAE,CAAC;AACjB,CAAC;AARD,oCAQC;AAED,SAAgB,QAAQ,CAAC,IAAU,EAAE,IAAU;IAC7C,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AACrD,CAAC;AAFD,4BAEC"}
|