@nrwl/angular 14.4.0-beta.5 → 14.4.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/esm2020/mf/index.mjs +2 -0
  3. package/esm2020/mf/mf.mjs +45 -0
  4. package/esm2020/mf/nrwl-angular-mf.mjs +5 -0
  5. package/fesm2015/{nrwl-angular-mfe.mjs → nrwl-angular-mf.mjs} +1 -1
  6. package/fesm2015/nrwl-angular-mf.mjs.map +1 -0
  7. package/fesm2020/{nrwl-angular-mfe.mjs → nrwl-angular-mf.mjs} +1 -1
  8. package/fesm2020/nrwl-angular-mf.mjs.map +1 -0
  9. package/generators.d.ts +1 -1
  10. package/generators.js +1 -1
  11. package/generators.js.map +1 -1
  12. package/generators.json +6 -6
  13. package/{mfe → mf}/index.d.ts +1 -1
  14. package/{mfe → mf}/index.js +4 -4
  15. package/mf/index.js.map +1 -0
  16. package/{mfe/mfe.d.ts → mf/mf.d.ts} +0 -0
  17. package/{mfe/mfe.js → mf/mf.js} +1 -1
  18. package/mf/mf.js.map +1 -0
  19. package/{mfe → mf}/ng-package.json +0 -0
  20. package/migrations.json +8 -2
  21. package/module-federation/index.d.ts +2 -2
  22. package/module-federation/index.js +2 -2
  23. package/module-federation/index.js.map +1 -1
  24. package/package.json +16 -16
  25. package/src/executors/file-server/file-server.impl.js +0 -3
  26. package/src/executors/file-server/file-server.impl.js.map +1 -1
  27. package/src/generators/application/application.js +2 -2
  28. package/src/generators/application/application.js.map +1 -1
  29. package/src/generators/application/lib/{add-mfe.d.ts → add-mf.d.ts} +1 -1
  30. package/src/generators/application/lib/{add-mfe.js → add-mf.js} +7 -7
  31. package/src/generators/application/lib/add-mf.js.map +1 -0
  32. package/src/generators/application/lib/index.d.ts +1 -1
  33. package/src/generators/application/lib/index.js +1 -1
  34. package/src/generators/application/lib/index.js.map +1 -1
  35. package/src/generators/application/schema.d.ts +2 -2
  36. package/src/generators/application/schema.json +2 -2
  37. package/src/generators/component/lib/component.js +4 -4
  38. package/src/generators/component/lib/component.js.map +1 -1
  39. package/src/generators/host/host.js +1 -1
  40. package/src/generators/host/host.js.map +1 -1
  41. package/src/generators/move/lib/update-ng-package.js +1 -1
  42. package/src/generators/move/lib/update-ng-package.js.map +1 -1
  43. package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.facade.spec.ts__tmpl__ +3 -3
  44. package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.spec.ts__tmpl__ +4 -4
  45. package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.reducer.ts__tmpl__ +3 -3
  46. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.actions.ts__tmpl__ +1 -1
  47. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.effects.spec.ts__tmpl__ +1 -1
  48. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.effects.ts__tmpl__ +4 -4
  49. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.facade.spec.ts__tmpl__ +5 -5
  50. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.facade.ts__tmpl__ +1 -1
  51. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.reducer.spec.ts__tmpl__ +4 -4
  52. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.reducer.ts__tmpl__ +8 -8
  53. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.selectors.spec.ts__tmpl__ +2 -2
  54. package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.selectors.ts__tmpl__ +7 -7
  55. package/src/generators/ngrx/lib/add-imports-to-module.js +2 -1
  56. package/src/generators/ngrx/lib/add-imports-to-module.js.map +1 -1
  57. package/src/generators/remote/remote.js +4 -4
  58. package/src/generators/remote/remote.js.map +1 -1
  59. package/src/generators/scam/lib/convert-component-to-scam.d.ts +3 -3
  60. package/src/generators/scam/lib/convert-component-to-scam.js +10 -10
  61. package/src/generators/scam/lib/convert-component-to-scam.js.map +1 -1
  62. package/src/generators/scam/lib/index.d.ts +0 -1
  63. package/src/generators/scam/lib/index.js +0 -1
  64. package/src/generators/scam/lib/index.js.map +1 -1
  65. package/src/generators/scam/scam.js +4 -3
  66. package/src/generators/scam/scam.js.map +1 -1
  67. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.d.ts +4 -0
  68. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +43 -0
  69. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js.map +1 -0
  70. package/src/generators/scam-pipe/lib/index.d.ts +2 -0
  71. package/src/generators/scam-pipe/lib/index.js +5 -0
  72. package/src/generators/scam-pipe/lib/index.js.map +1 -1
  73. package/src/generators/scam-pipe/lib/normalize-options.d.ts +3 -0
  74. package/src/generators/scam-pipe/lib/normalize-options.js +16 -0
  75. package/src/generators/scam-pipe/lib/normalize-options.js.map +1 -0
  76. package/src/generators/scam-pipe/scam-pipe.d.ts +1 -1
  77. package/src/generators/scam-pipe/scam-pipe.js +11 -6
  78. package/src/generators/scam-pipe/scam-pipe.js.map +1 -1
  79. package/src/generators/scam-pipe/schema.d.ts +7 -0
  80. package/src/generators/{setup-mfe → setup-mf}/files/entry-module-files/entry.component.ts__tmpl__ +0 -0
  81. package/src/generators/{setup-mfe → setup-mf}/files/entry-module-files/entry.module.ts__tmpl__ +0 -0
  82. package/src/generators/{setup-mfe → setup-mf}/files/webpack/module-federation.config.js__tmpl__ +0 -0
  83. package/src/generators/{setup-mfe → setup-mf}/files/webpack/webpack.config.js__tmpl__ +0 -0
  84. package/src/generators/{setup-mfe → setup-mf}/files/webpack/webpack.prod.config.js__tmpl__ +0 -0
  85. package/src/generators/{setup-mfe → setup-mf}/lib/add-cypress-workaround.d.ts +0 -0
  86. package/src/generators/{setup-mfe → setup-mf}/lib/add-cypress-workaround.js +0 -0
  87. package/src/generators/setup-mf/lib/add-cypress-workaround.js.map +1 -0
  88. package/src/generators/{setup-mfe → setup-mf}/lib/add-entry-module.d.ts +1 -1
  89. package/src/generators/{setup-mfe → setup-mf}/lib/add-entry-module.js +2 -2
  90. package/src/generators/setup-mf/lib/add-entry-module.js.map +1 -0
  91. package/src/generators/{setup-mfe → setup-mf}/lib/add-remote-to-host.d.ts +1 -1
  92. package/src/generators/{setup-mfe → setup-mf}/lib/add-remote-to-host.js +8 -8
  93. package/src/generators/setup-mf/lib/add-remote-to-host.js.map +1 -0
  94. package/src/generators/{setup-mfe → setup-mf}/lib/change-build-target.d.ts +0 -0
  95. package/src/generators/{setup-mfe → setup-mf}/lib/change-build-target.js +0 -0
  96. package/src/generators/setup-mf/lib/change-build-target.js.map +1 -0
  97. package/src/generators/{setup-mfe → setup-mf}/lib/fix-bootstrap.d.ts +0 -0
  98. package/src/generators/{setup-mfe → setup-mf}/lib/fix-bootstrap.js +2 -2
  99. package/src/generators/setup-mf/lib/fix-bootstrap.js.map +1 -0
  100. package/src/generators/{setup-mfe → setup-mf}/lib/generate-config.d.ts +0 -0
  101. package/src/generators/{setup-mfe → setup-mf}/lib/generate-config.js +1 -1
  102. package/src/generators/setup-mf/lib/generate-config.js.map +1 -0
  103. package/src/generators/{setup-mfe → setup-mf}/lib/get-remotes-with-ports.d.ts +0 -0
  104. package/src/generators/{setup-mfe → setup-mf}/lib/get-remotes-with-ports.js +1 -1
  105. package/src/generators/setup-mf/lib/get-remotes-with-ports.js.map +1 -0
  106. package/src/generators/{setup-mfe → setup-mf}/lib/index.d.ts +0 -0
  107. package/src/generators/{setup-mfe → setup-mf}/lib/index.js +0 -0
  108. package/src/generators/setup-mf/lib/index.js.map +1 -0
  109. package/src/generators/{setup-mfe → setup-mf}/lib/set-tsconfig-target.d.ts +0 -0
  110. package/src/generators/{setup-mfe → setup-mf}/lib/set-tsconfig-target.js +0 -0
  111. package/src/generators/setup-mf/lib/set-tsconfig-target.js.map +1 -0
  112. package/src/generators/{setup-mfe → setup-mf}/lib/setup-host-if-dynamic.d.ts +0 -0
  113. package/src/generators/{setup-mfe → setup-mf}/lib/setup-host-if-dynamic.js +1 -1
  114. package/src/generators/setup-mf/lib/setup-host-if-dynamic.js.map +1 -0
  115. package/src/generators/{setup-mfe → setup-mf}/lib/setup-serve-target.d.ts +0 -0
  116. package/src/generators/{setup-mfe → setup-mf}/lib/setup-serve-target.js +2 -2
  117. package/src/generators/setup-mf/lib/setup-serve-target.js.map +1 -0
  118. package/src/generators/{setup-mfe → setup-mf}/schema.d.ts +1 -1
  119. package/src/generators/{setup-mfe → setup-mf}/schema.json +3 -3
  120. package/src/generators/{setup-mfe/setup-mfe.compat.d.ts → setup-mf/setup-mf.compat.d.ts} +0 -0
  121. package/src/generators/setup-mf/setup-mf.compat.js +6 -0
  122. package/src/generators/setup-mf/setup-mf.compat.js.map +1 -0
  123. package/src/generators/setup-mf/setup-mf.d.ts +4 -0
  124. package/src/generators/{setup-mfe/setup-mfe.js → setup-mf/setup-mf.js} +5 -5
  125. package/src/generators/setup-mf/setup-mf.js.map +1 -0
  126. package/src/generators/utils/export-scam.d.ts +9 -0
  127. package/src/generators/{scam/lib → utils}/export-scam.js +9 -8
  128. package/src/generators/utils/export-scam.js.map +1 -0
  129. package/src/generators/utils/file-info.d.ts +15 -0
  130. package/src/generators/utils/{component.js → file-info.js} +14 -7
  131. package/src/generators/utils/file-info.js.map +1 -0
  132. package/src/migrations/update-13-8-1/{add-cypress-mfe-workaround.d.ts → add-cypress-mf-workaround.d.ts} +0 -0
  133. package/src/migrations/update-13-8-1/{add-cypress-mfe-workaround.js → add-cypress-mf-workaround.js} +1 -1
  134. package/src/migrations/update-13-8-1/add-cypress-mf-workaround.js.map +1 -0
  135. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +5 -0
  136. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +94 -0
  137. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js.map +1 -0
  138. package/src/utils/{mfe/mfe-webpack.d.ts → mf/mf-webpack.d.ts} +0 -0
  139. package/src/utils/{mfe/mfe-webpack.js → mf/mf-webpack.js} +2 -2
  140. package/src/utils/mf/mf-webpack.js.map +1 -0
  141. package/src/utils/{mfe → mf}/utils.d.ts +0 -0
  142. package/src/utils/{mfe → mf}/utils.js +1 -1
  143. package/src/utils/mf/utils.js.map +1 -0
  144. package/src/utils/{mfe → mf}/with-module-federation.d.ts +5 -5
  145. package/src/utils/{mfe → mf}/with-module-federation.js +6 -6
  146. package/src/utils/mf/with-module-federation.js.map +1 -0
  147. package/esm2020/mfe/index.mjs +0 -2
  148. package/esm2020/mfe/mfe.mjs +0 -45
  149. package/esm2020/mfe/nrwl-angular-mfe.mjs +0 -5
  150. package/fesm2015/nrwl-angular-mfe.mjs.map +0 -1
  151. package/fesm2020/nrwl-angular-mfe.mjs.map +0 -1
  152. package/mfe/index.js.map +0 -1
  153. package/mfe/mfe.js.map +0 -1
  154. package/src/generators/application/lib/add-mfe.js.map +0 -1
  155. package/src/generators/scam/lib/export-scam.d.ts +0 -4
  156. package/src/generators/scam/lib/export-scam.js.map +0 -1
  157. package/src/generators/scam-pipe/lib/create-module.d.ts +0 -3
  158. package/src/generators/scam-pipe/lib/create-module.js +0 -90
  159. package/src/generators/scam-pipe/lib/create-module.js.map +0 -1
  160. package/src/generators/setup-mfe/lib/add-cypress-workaround.js.map +0 -1
  161. package/src/generators/setup-mfe/lib/add-entry-module.js.map +0 -1
  162. package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +0 -1
  163. package/src/generators/setup-mfe/lib/change-build-target.js.map +0 -1
  164. package/src/generators/setup-mfe/lib/fix-bootstrap.js.map +0 -1
  165. package/src/generators/setup-mfe/lib/generate-config.js.map +0 -1
  166. package/src/generators/setup-mfe/lib/get-remotes-with-ports.js.map +0 -1
  167. package/src/generators/setup-mfe/lib/index.js.map +0 -1
  168. package/src/generators/setup-mfe/lib/set-tsconfig-target.js.map +0 -1
  169. package/src/generators/setup-mfe/lib/setup-host-if-dynamic.js.map +0 -1
  170. package/src/generators/setup-mfe/lib/setup-serve-target.js.map +0 -1
  171. package/src/generators/setup-mfe/setup-mfe.compat.js +0 -6
  172. package/src/generators/setup-mfe/setup-mfe.compat.js.map +0 -1
  173. package/src/generators/setup-mfe/setup-mfe.d.ts +0 -4
  174. package/src/generators/setup-mfe/setup-mfe.js.map +0 -1
  175. package/src/generators/utils/component.d.ts +0 -14
  176. package/src/generators/utils/component.js.map +0 -1
  177. package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js.map +0 -1
  178. package/src/utils/mfe/mfe-webpack.js.map +0 -1
  179. package/src/utils/mfe/utils.js.map +0 -1
  180. package/src/utils/mfe/with-module-federation.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { <%= className %>Loaded } from './<%= fileName %>.actions';
2
- import { <%= className %>State, <%= className %>Entity, initialState, reducer } from './<%= fileName %>.reducer';
2
+ import { <%= className %>State, <%= className %>Entity, initial<%= className %>State, <%= propertyName %>Reducer } from './<%= fileName %>.reducer';
3
3
 
4
4
  describe('<%= className %> Reducer', () => {
5
5
  const get<%= className %>Id = (it: <%= className %>Entity) => it.id;
@@ -12,7 +12,7 @@ describe('<%= className %> Reducer', () => {
12
12
  it('should return the list of known <%= className %>', () => {
13
13
  const <%= propertyName %> = [create<%= className %>('PRODUCT-AAA'), create<%= className %>('PRODUCT-zzz')];
14
14
  const action = new <%= className %>Loaded(<%= propertyName %>);
15
- const result: <%= className %>State = reducer(initialState, action);
15
+ const result: <%= className %>State = <%= propertyName %>Reducer(initial<%= className %>State, action);
16
16
  const selId: string = get<%= className %>Id(result.list[1]);
17
17
 
18
18
  expect(result.loaded).toBe(true);
@@ -24,9 +24,9 @@ describe('<%= className %> Reducer', () => {
24
24
  describe('unknown action', () => {
25
25
  it('should return the previous state', () => {
26
26
  const action = {} as any;
27
- const result = reducer(initialState, action);
27
+ const result = <%= propertyName %>Reducer(initial<%= className %>State, action);
28
28
 
29
- expect(result).toBe(initialState);
29
+ expect(result).toBe(initial<%= className %>State);
30
30
  });
31
31
  });
32
32
  });
@@ -24,13 +24,13 @@ export interface <%= className %>PartialState {
24
24
  readonly [<%= constantName %>_FEATURE_KEY]: <%= className %>State;
25
25
  }
26
26
 
27
- export const initialState: <%= className %>State = {
27
+ export const initial<%= className %>State: <%= className %>State = {
28
28
  list: [],
29
29
  loaded: false
30
30
  };
31
31
 
32
- export function reducer(
33
- state: <%= className %>State = initialState,
32
+ export function <%= propertyName %>Reducer(
33
+ state: <%= className %>State = initial<%= className %>State,
34
34
  action: <%= className %>Action): <%= className %>State
35
35
  {
36
36
  switch (action.type) {
@@ -1,7 +1,7 @@
1
1
  import { createAction, props } from '@ngrx/store';
2
2
  import { <%= className %>Entity } from './<%= fileName %>.models';
3
3
 
4
- export const init = createAction(
4
+ export const init<%= className %> = createAction(
5
5
  '[<%= className %> Page] Init'
6
6
  );
7
7
 
@@ -31,7 +31,7 @@ describe('<%= className %>Effects', () => {
31
31
 
32
32
  describe('init$', () => {
33
33
  it('should work', () => {
34
- actions = hot('-a-|', { a: <%= className %>Actions.init() });
34
+ actions = hot('-a-|', { a: <%= className %>Actions.init<%= className %>() });
35
35
 
36
36
  const expected = hot('-a-|', { a: <%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] }) });
37
37
 
@@ -7,17 +7,17 @@ import * as <%= className %>Feature from './<%= fileName %>.reducer';
7
7
 
8
8
  @Injectable()
9
9
  export class <%= className %>Effects {
10
- <% if (useDataPersistence) { %>init$ = createEffect(() => this.dataPersistence.fetch(<%= className %>Actions.init, {
11
- run: (action: ReturnType<typeof <%= className %>Actions.init>, state: <%= className %>Feature.<%= className %>PartialState) => {
10
+ <% if (useDataPersistence) { %>init$ = createEffect(() => this.dataPersistence.fetch(<%= className %>Actions.<%= className %>init, {
11
+ run: (action: ReturnType<typeof <%= className %>Actions.init<%= className %>>, state: <%= className %>Feature.<%= className %>PartialState) => {
12
12
  // Your custom service 'load' logic goes here. For now just return a success action...
13
13
  return <%= className %>Actions.load<%= className %>Success({ <%= propertyName %>: [] });
14
14
  },
15
- onError: (action: ReturnType<typeof <%= className %>Actions.init>, error) => {
15
+ onError: (action: ReturnType<typeof <%= className %>Actions.init<%= className %>>, error) => {
16
16
  console.error('Error', error);
17
17
  return <%= className %>Actions.load<%= className %>Failure({ error });
18
18
  }
19
19
  }));<% } else { %>init$ = createEffect(() => this.actions$.pipe(
20
- ofType(<%= className %>Actions.init),
20
+ ofType(<%= className %>Actions.init<%= className %>),
21
21
  fetch({
22
22
  run: action => {
23
23
  // Your custom service 'load' logic goes here. For now just return a success action...
@@ -11,14 +11,14 @@ import { <%= className %>Facade } from './<%= fileName %>.facade';
11
11
  import { <%= className %>Entity } from './<%= fileName %>.models';
12
12
  import {
13
13
  <%= constantName %>_FEATURE_KEY,
14
- State,
15
- initialState,
16
- reducer
14
+ <%= className %>State,
15
+ initial<%= className %>State,
16
+ <%= propertyName %>Reducer
17
17
  } from './<%= fileName %>.reducer';
18
18
  import * as <%= className %>Selectors from './<%= fileName %>.selectors';
19
19
 
20
20
  interface TestSchema {
21
- <%= propertyName %>: State;
21
+ <%= propertyName %>: <%= className %>State;
22
22
  }
23
23
 
24
24
  describe('<%= className %>Facade', () => {
@@ -33,7 +33,7 @@ describe('<%= className %>Facade', () => {
33
33
  beforeEach(() => {
34
34
  @NgModule({
35
35
  imports: [
36
- StoreModule.forFeature(<%= constantName %>_FEATURE_KEY, reducer),
36
+ StoreModule.forFeature(<%= constantName %>_FEATURE_KEY, <%= propertyName %>Reducer),
37
37
  EffectsModule.forFeature([<%= className %>Effects])
38
38
  ],
39
39
  providers: [<%= className %>Facade]
@@ -22,6 +22,6 @@ export class <%= className %>Facade {
22
22
  * or more tasks in your Effects.
23
23
  */
24
24
  init() {
25
- this.store.dispatch(<%= className %>Actions.init());
25
+ this.store.dispatch(<%= className %>Actions.init<%= className %>());
26
26
  }
27
27
  }
@@ -2,7 +2,7 @@ import { Action } from '@ngrx/store';
2
2
 
3
3
  import * as <%= className %>Actions from './<%= fileName %>.actions';
4
4
  import { <%= className %>Entity } from './<%= fileName %>.models';
5
- import { State, initialState, reducer } from './<%= fileName %>.reducer';
5
+ import { <%= className %>State, initial<%= className %>State, <%= propertyName %>Reducer } from './<%= fileName %>.reducer';
6
6
 
7
7
  describe('<%= className %> Reducer', () => {
8
8
  const create<%= className %>Entity = (id: string, name = ''): <%= className %>Entity => ({
@@ -18,7 +18,7 @@ describe('<%= className %> Reducer', () => {
18
18
  ];
19
19
  const action = <%= className %>Actions.load<%= className %>Success({ <%= propertyName %> });
20
20
 
21
- const result: State = reducer(initialState, action);
21
+ const result: <%= className %>State = <%= propertyName %>Reducer(initial<%= className %>State, action);
22
22
 
23
23
  expect(result.loaded).toBe(true);
24
24
  expect(result.ids.length).toBe(2);
@@ -29,9 +29,9 @@ describe('<%= className %> Reducer', () => {
29
29
  it('should return the previous state', () => {
30
30
  const action = {} as Action;
31
31
 
32
- const result = reducer(initialState, action);
32
+ const result = <%= propertyName %>Reducer(initial<%= className %>State, action);
33
33
 
34
- expect(result).toBe(initialState);
34
+ expect(result).toBe(initial<%= className %>State);
35
35
  });
36
36
  });
37
37
  });
@@ -6,26 +6,26 @@ import { <%= className %>Entity } from './<%= fileName %>.models';
6
6
 
7
7
  export const <%= constantName %>_FEATURE_KEY = '<%= propertyName %>';
8
8
 
9
- export interface State extends EntityState<<%= className %>Entity> {
9
+ export interface <%= className %>State extends EntityState<<%= className %>Entity> {
10
10
  selectedId?: string | number; // which <%= className %> record has been selected
11
11
  loaded: boolean; // has the <%= className %> list been loaded
12
12
  error?: string | null; // last known error (if any)
13
13
  }
14
14
 
15
15
  export interface <%= className %>PartialState {
16
- readonly [<%= constantName %>_FEATURE_KEY]: State;
16
+ readonly [<%= constantName %>_FEATURE_KEY]: <%= className %>State;
17
17
  }
18
18
 
19
19
  export const <%= propertyName %>Adapter: EntityAdapter<<%= className %>Entity> = createEntityAdapter<<%= className %>Entity>();
20
20
 
21
- export const initialState: State = <%= propertyName %>Adapter.getInitialState({
21
+ export const initial<%= className %>State: <%= className %>State = <%= propertyName %>Adapter.getInitialState({
22
22
  // set initial required properties
23
23
  loaded: false
24
24
  });
25
25
 
26
- const <%= propertyName %>Reducer = createReducer(
27
- initialState,
28
- on(<%= className %>Actions.init,
26
+ const reducer = createReducer(
27
+ initial<%= className %>State,
28
+ on(<%= className %>Actions.init<%= className %>,
29
29
  state => ({ ...state, loaded: false, error: null })
30
30
  ),
31
31
  on(<%= className %>Actions.load<%= className %>Success,
@@ -36,6 +36,6 @@ const <%= propertyName %>Reducer = createReducer(
36
36
  ),
37
37
  );
38
38
 
39
- export function reducer(state: State | undefined, action: Action) {
40
- return <%= propertyName %>Reducer(state, action);
39
+ export function <%= propertyName %>Reducer(state: <%= className %>State | undefined, action: Action) {
40
+ return reducer(state, action);
41
41
  }
@@ -1,5 +1,5 @@
1
1
  import { <%= className %>Entity } from './<%= fileName %>.models';
2
- import { <%= propertyName %>Adapter, <%= className %>PartialState, initialState } from './<%= fileName %>.reducer';
2
+ import { <%= propertyName %>Adapter, <%= className %>PartialState, initial<%= className %>State } from './<%= fileName %>.reducer';
3
3
  import * as <%= className %>Selectors from './<%= fileName %>.selectors';
4
4
 
5
5
  describe('<%= className %> Selectors', () => {
@@ -19,7 +19,7 @@ describe('<%= className %> Selectors', () => {
19
19
  create<%= className %>Entity('PRODUCT-BBB'),
20
20
  create<%= className %>Entity('PRODUCT-CCC')
21
21
  ], {
22
- ...initialState,
22
+ ...initial<%= className %>State,
23
23
  selectedId : 'PRODUCT-BBB',
24
24
  error: ERROR_MSG,
25
25
  loaded: true
@@ -1,34 +1,34 @@
1
1
  import { createFeatureSelector, createSelector } from '@ngrx/store';
2
- import { <%= constantName %>_FEATURE_KEY, State, <%= propertyName %>Adapter } from './<%= fileName %>.reducer';
2
+ import { <%= constantName %>_FEATURE_KEY, <%= className %>State, <%= propertyName %>Adapter } from './<%= fileName %>.reducer';
3
3
 
4
4
  // Lookup the '<%= className %>' feature state managed by NgRx
5
- export const get<%= className %>State = createFeatureSelector<State>(<%= constantName %>_FEATURE_KEY);
5
+ export const get<%= className %>State = createFeatureSelector<<%= className %>State>(<%= constantName %>_FEATURE_KEY);
6
6
 
7
7
  const { selectAll, selectEntities } = <%= propertyName %>Adapter.getSelectors();
8
8
 
9
9
  export const get<%= className %>Loaded = createSelector(
10
10
  get<%= className %>State,
11
- (state: State) => state.loaded
11
+ (state: <%= className %>State) => state.loaded
12
12
  );
13
13
 
14
14
  export const get<%= className %>Error = createSelector(
15
15
  get<%= className %>State,
16
- (state: State) => state.error
16
+ (state: <%= className %>State) => state.error
17
17
  );
18
18
 
19
19
  export const getAll<%= className %> = createSelector(
20
20
  get<%= className %>State,
21
- (state: State) => selectAll(state)
21
+ (state: <%= className %>State) => selectAll(state)
22
22
  );
23
23
 
24
24
  export const get<%= className %>Entities = createSelector(
25
25
  get<%= className %>State,
26
- (state: State) => selectEntities(state)
26
+ (state: <%= className %>State) => selectEntities(state)
27
27
  );
28
28
 
29
29
  export const getSelectedId = createSelector(
30
30
  get<%= className %>State,
31
- (state: State) => state.selectedId
31
+ (state: <%= className %>State) => state.selectedId
32
32
  );
33
33
 
34
34
  export const getSelected = createSelector(
@@ -21,6 +21,7 @@ function addImportsToModule(tree, options) {
21
21
  const effectsName = `${(0, devkit_1.names)(options.name).className}Effects`;
22
22
  const facadeName = `${(0, devkit_1.names)(options.name).className}Facade`;
23
23
  const className = `${(0, devkit_1.names)(options.name).className}`;
24
+ const propertyName = `${(0, devkit_1.names)(options.name).propertyName}`;
24
25
  const reducerImports = `* as from${className}`;
25
26
  const storeMetaReducers = `metaReducers: !environment.production ? [] : []`;
26
27
  const storeForRoot = `StoreModule.forRoot({}, {
@@ -33,7 +34,7 @@ function addImportsToModule(tree, options) {
33
34
  const nxModule = 'NxModule.forRoot()';
34
35
  const effectsForRoot = `EffectsModule.forRoot([${effectsName}])`;
35
36
  const effectsForEmptyRoot = `EffectsModule.forRoot([])`;
36
- const storeForFeature = `StoreModule.forFeature(from${className}.${constantName}_FEATURE_KEY, from${className}.reducer)`;
37
+ const storeForFeature = `StoreModule.forFeature(from${className}.${constantName}_FEATURE_KEY, from${className}.${propertyName}Reducer)`;
37
38
  const effectsForFeature = `EffectsModule.forFeature([${effectsName}])`;
38
39
  const devTools = `!environment.production ? StoreDevtoolsModule.instrument() : []`;
39
40
  const storeRouterModule = 'StoreRouterConnectingModule.forRoot()';
@@ -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,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AAE;gBAChB,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;gBAChE,UAAU,GAAG,IAAA,6BAAiB,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aACxE;YAED,UAAU,GAAG,SAAS,CACpB,UAAU,EACV,qBAAqB,EACrB,sBAAsB,CACvB,CAAC;YACF,UAAU,GAAG,SAAS,CACpB,UAAU,EACV,aAAa,EACb,6BAA6B,CAC9B,CAAC;YAEF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,YAAY,CACb,CAAC;YACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,cAAc,CACf,CAAC;YACF,UAAU,GAAG,IAAA,6BAAiB,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;YAEvE,IAAI,SAAS,EAAE;gBACb,UAAU,GAAG,SAAS,CACpB,UAAU,EACV,6BAA6B,EAC7B,oBAAoB,CACrB,CAAC;gBACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,iBAAiB,CAClB,CAAC;aACH;YAED,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,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;AA1LD,gDA0LC"}
1
+ {"version":3,"file":"add-imports-to-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ngr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AS,CACpB,UAAU,EACV,qBAAqB,EACrB,sBAAsB,CACvB,CAAC;YACF,UAAU,GAAG,SAAS,CACpB,UAAU,EACV,aAAa,EACb,6BAA6B,CAC9B,CAAC;YAEF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,YAAY,CACb,CAAC;YACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,cAAc,CACf,CAAC;YACF,UAAU,GAAG,IAAA,6BAAiB,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;YAEvE,IAAI,SAAS,EAAE;gBACb,UAAU,GAAG,SAAS,CACpB,UAAU,EACV,6BAA6B,EAC7B,oBAAoB,CACrB,CAAC;gBACF,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,iBAAiB,CAClB,CAAC;aACH;YAED,UAAU,GAAG,IAAA,6BAAiB,EAC5B,IAAI,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;AA3LD,gDA2LC"}
@@ -7,10 +7,10 @@ const get_mf_projects_1 = require("../../utils/get-mf-projects");
7
7
  const project_1 = require("../utils/project");
8
8
  function findNextAvailablePort(tree) {
9
9
  var _a, _b, _c;
10
- const mfeProjects = (0, get_mf_projects_1.getMFProjects)(tree);
10
+ const mfProjects = (0, get_mf_projects_1.getMFProjects)(tree);
11
11
  const ports = new Set([4200]);
12
- for (const mfeProject of mfeProjects) {
13
- const { targets } = (0, devkit_1.readProjectConfiguration)(tree, mfeProject);
12
+ for (const mfProject of mfProjects) {
13
+ const { targets } = (0, devkit_1.readProjectConfiguration)(tree, mfProject);
14
14
  const port = (_c = (_b = (_a = targets === null || targets === void 0 ? void 0 : targets.serve) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.port) !== null && _c !== void 0 ? _c : 4200;
15
15
  ports.add(port);
16
16
  }
@@ -24,7 +24,7 @@ function remote(tree, options) {
24
24
  if (options.host && !projects.has(options.host)) {
25
25
  throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
26
26
  }
27
- const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mfe: true, mfeType: 'remote', routing: true, host: options.host, port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree) }));
27
+ const installTask = yield (0, application_1.default)(tree, Object.assign(Object.assign({}, options), { mf: true, mfType: 'remote', routing: true, host: options.host, port: (_a = options.port) !== null && _a !== void 0 ? _a : findNextAvailablePort(tree) }));
28
28
  removeDeadCode(tree, options);
29
29
  return installTask;
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB,4DAA8D;AAC9D,iEAA4D;AAC5D,8CAAwD;AAExD,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,WAAW,GAAG,IAAA,+BAAa,EAAC,IAAI,CAAC,CAAC;IAExC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CA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C,OAAO,CAAC,UAAU,EAClB,qBAAqB,KAAK,EAAE,CAC7B,CAAC;QACF,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE;YACrC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;SACnC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,6BAA6B,CAAC,EACpE,IAAA,0BAAiB,EACf,OAAO,CAAC,UAAU,EAClB,0CAA0C,CAC3C,CACF,CAAC;IACF,IAAI,CAAC,MAAM,CACT,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,2BAA2B,CAAC,CACnE,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAE7E,MAAM,eAAe,GAAG,IAAA,0BAAiB,EACvC,OAAO,CAAC,UAAU,EAClB,sBAAsB,CACvB,CAAC;IACF,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3D;;6BAEyB,CAAC;IAE5B,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAEvC,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAC1D;;;;;;;;;;;;;;;;;0BAiBsB,CACvB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/remote/remote.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB,4DAA8D;AAC9D,iEAA4D;AAC5D,8CAAwD;AAExD,SAAS,qBAAqB,CAAC,IAAU;;IACvC,MAAM,UAAU,GAAG,IAAA,+BAAa,EAAC,IAAI,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AmB,CAAC,EAC1D;;;;;;;;;;;;;;;;;0BAiBsB,CACvB,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { Tree } from '@nrwl/devkit';
2
- import type { Schema } from '../schema';
3
- import type { ComponentFileInfo } from '../../utils/component';
4
- export declare function convertComponentToScam(tree: Tree, { componentDirectory, componentFileName, componentFilePath, }: ComponentFileInfo, options: Schema): void;
2
+ import type { FileInfo } from '../../utils/file-info';
3
+ import type { NormalizedSchema } from '../schema';
4
+ export declare function convertComponentToScam(tree: Tree, componentFileInfo: FileInfo, options: NormalizedSchema): void;
@@ -4,26 +4,26 @@ exports.convertComponentToScam = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
5
  const ast_utils_1 = require("@nrwl/workspace/src/utilities/ast-utils");
6
6
  const typescript_1 = require("typescript");
7
- function convertComponentToScam(tree, { componentDirectory, componentFileName, componentFilePath, }, options) {
7
+ function convertComponentToScam(tree, componentFileInfo, options) {
8
8
  var _a;
9
- if (!tree.exists(componentFilePath)) {
10
- throw new Error(`Couldn't find component at path ${componentFilePath} to add SCAM setup.`);
9
+ if (!tree.exists(componentFileInfo.filePath)) {
10
+ throw new Error(`Couldn't find component at path ${componentFileInfo.filePath} to add SCAM setup.`);
11
11
  }
12
12
  const componentNames = (0, devkit_1.names)(options.name);
13
13
  const typeNames = (0, devkit_1.names)((_a = options.type) !== null && _a !== void 0 ? _a : 'component');
14
14
  const componentClassName = `${componentNames.className}${typeNames.className}`;
15
15
  if (options.inlineScam) {
16
- const currentComponentContents = tree.read(componentFilePath, 'utf-8');
17
- let source = (0, typescript_1.createSourceFile)(componentFilePath, currentComponentContents, typescript_1.ScriptTarget.Latest, true);
18
- source = (0, ast_utils_1.insertImport)(tree, source, componentFilePath, 'NgModule', '@angular/core');
19
- source = (0, ast_utils_1.insertImport)(tree, source, componentFilePath, 'CommonModule', '@angular/common');
16
+ const currentComponentContents = tree.read(componentFileInfo.filePath, 'utf-8');
17
+ let source = (0, typescript_1.createSourceFile)(componentFileInfo.filePath, currentComponentContents, typescript_1.ScriptTarget.Latest, true);
18
+ source = (0, ast_utils_1.insertImport)(tree, source, componentFileInfo.filePath, 'NgModule', '@angular/core');
19
+ source = (0, ast_utils_1.insertImport)(tree, source, componentFileInfo.filePath, 'CommonModule', '@angular/common');
20
20
  let updatedComponentSource = source.getText();
21
21
  updatedComponentSource = `${updatedComponentSource}${getNgModuleDeclaration(componentClassName)}`;
22
- tree.write(componentFilePath, updatedComponentSource);
22
+ tree.write(componentFileInfo.filePath, updatedComponentSource);
23
23
  return;
24
24
  }
25
- const moduleFilePath = (0, devkit_1.joinPathFragments)(componentDirectory, `${componentNames.fileName}.module.ts`);
26
- tree.write(moduleFilePath, getModuleFileContent(componentClassName, componentFileName));
25
+ const moduleFilePath = (0, devkit_1.joinPathFragments)(componentFileInfo.directory, `${componentNames.fileName}.module.ts`);
26
+ tree.write(moduleFilePath, getModuleFileContent(componentClassName, componentFileInfo.fileName));
27
27
  }
28
28
  exports.convertComponentToScam = convertComponentToScam;
29
29
  function getModuleFileContent(componentClassName, componentFileName) {
@@ -1 +1 @@
1
- {"version":3,"file":"convert-component-to-scam.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/lib/convert-component-to-scam.ts"],"names":[],"mappings":";;;AACA,yCAAwD;AACxD,uEAAuE;AACvE,2CAA4D;AAI5D,SAAgB,sBAAsB,CACpC,IAAU,EACV,EACE,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GACC,EACpB,OAAe;;IAEf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;QACnC,MAAM,IAAI,KAAK,CACb,mCAAmC,iBAAiB,qBAAqB,CAC1E,CAAC;KACH;IAED,MAAM,cAAc,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAA,cAAK,EAAC,MAAA,OAAO,CAAC,IAAI,mCAAI,WAAW,C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kBAAkB,WAAW,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"convert-component-to-scam.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/lib/convert-component-to-scam.ts"],"names":[],"mappings":";;;AACA,yCAAwD;AACxD,uEAAuE;AACvE,2CAA4D;AAI5D,SAAgB,sBAAsB,CACpC,IAAU,EACV,iBAA2B,EAC3B,OAAyB;;IAEzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE;QAC5C,MAAM,IAAI,KAAK,CACb,mCAAmC,iBAAiB,CAAC,QAAQ,qBAAqB,CACnF,CAAC;KACH;IAED,MAAM,cAAc,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAA,cAAK,EAAC,MAAA,OAAO,CAAC,IAAI,mCAAI,WAAW,CAAC,CAAC;IACrD,MAAM,kBAAkB,GAAG,GAAG,cAAc,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;IAE/E,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,MAAM,wBAAwB,GAAG,IAAI,CAAC,IAAI,CACxC,iBAAiB,CAAC,QAAQ,EAC1B,OAAO,CACR,CAAC;QACF,IAAI,MAAM,GAAG,IAAA,6BAAgB,EAC3B,iBAAiB,CAAC,QAAQ,EAC1B,wBAAwB,EACxB,yBAAY,CAAC,MAAM,EACnB,IAAI,CACL,CAAC;QAEF,MAAM,GAAG,IAAA,wBAAY,EACnB,IAAI,EACJ,MAAM,EACN,iBAAiB,CAAC,QAAQ,EAC1B,UAAU,EACV,eAAe,CAChB,CAAC;QACF,MAAM,GAAG,IAAA,wBAAY,EACnB,IAAI,EACJ,MAAM,EACN,iBAAiB,CAAC,QAAQ,EAC1B,cAAc,EACd,iBAAiB,CAClB,CAAC;QAEF,IAAI,sBAAsB,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QAC9C,sBAAsB,GAAG,GAAG,sBAAsB,GAAG,sBAAsB,CACzE,kBAAkB,CACnB,EAAE,CAAC;QAEJ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QAC/D,OAAO;KACR;IAED,MAAM,cAAc,GAAG,IAAA,0BAAiB,EACtC,iBAAiB,CAAC,SAAS,EAC3B,GAAG,cAAc,CAAC,QAAQ,YAAY,CACvC,CAAC;IAEF,IAAI,CAAC,KAAK,CACR,cAAc,EACd,oBAAoB,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CACrE,CAAC;AACJ,CAAC;AA5DD,wDA4DC;AAED,SAAS,oBAAoB,CAC3B,kBAA0B,EAC1B,iBAAyB;IAEzB,OAAO;;WAEE,kBAAkB,cAAc,iBAAiB;EAC1D,sBAAsB,CAAC,kBAAkB,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,sBAAsB,CAAC,kBAA0B;IACxD,OAAO;;;mBAGU,kBAAkB;cACvB,kBAAkB;;eAEjB,kBAAkB,WAAW,CAAC;AAC7C,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './convert-component-to-scam';
2
- export * from './export-scam';
3
2
  export * from './normalize-options';
@@ -2,6 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./convert-component-to-scam"), exports);
5
- tslib_1.__exportStar(require("./export-scam"), exports);
6
5
  tslib_1.__exportStar(require("./normalize-options"), exports);
7
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/lib/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C;AAC5C,wDAA8B;AAC9B,8DAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/lib/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C;AAC5C,8DAAoC"}
@@ -4,9 +4,10 @@ exports.scamGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nrwl/devkit");
6
6
  const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
7
+ const export_scam_1 = require("../utils/export-scam");
8
+ const file_info_1 = require("../utils/file-info");
7
9
  const path_1 = require("../utils/path");
8
10
  const lib_1 = require("./lib");
9
- const component_1 = require("../utils/component");
10
11
  function scamGenerator(tree, rawOptions) {
11
12
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
13
  const options = (0, lib_1.normalizeOptions)(tree, rawOptions);
@@ -14,9 +15,9 @@ function scamGenerator(tree, rawOptions) {
14
15
  checkPathUnderProjectRoot(tree, options);
15
16
  const angularComponentSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'component');
16
17
  yield angularComponentSchematic(tree, Object.assign(Object.assign({}, schematicOptions), { skipImport: true, export: false }));
17
- const componentFileInfo = (0, component_1.getComponentFileInfo)(tree, options);
18
+ const componentFileInfo = (0, file_info_1.getComponentFileInfo)(tree, options);
18
19
  (0, lib_1.convertComponentToScam)(tree, componentFileInfo, options);
19
- (0, lib_1.exportScam)(tree, componentFileInfo, options);
20
+ (0, export_scam_1.exportScam)(tree, componentFileInfo, options);
20
21
  yield (0, devkit_1.formatFiles)(tree);
21
22
  });
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scam.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam/scam.ts"],"names":[],"mappings":";;;;AACA,yCAKsB;AACtB,8DAAwE;AACxE,wCAA+C;AAC/C,+BAA6E;AAC7E,kDAA0D;AAG1D,SAAsB,aAAa,CAAC,IAAU,EAAE,UAAkB;;QAChE,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,EAAE,UAAU,EAAE,iBAAiB,KAA0B,OAAO,EA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,4CAA4C,IAAI,IAAI,CACpG,CAAC;KACH;AACH,CAAC;AAED,kBAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"scam.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam/scam.ts"],"names":[],"mappings":";;;;AACA,yCAKsB;AACtB,8DAAwE;AACxE,sDAAkD;AAClD,kDAA0D;AAC1D,wCAA+C;AAC/C,+BAAiE;AAGjE,SAAsB,aAAa,CAAC,IAAU,EAAE,UAAkB;;QAChE,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,EAAE,UAAU,EAAE,iBAAiB,KAA0B,OAAO,EAA5B,gBAAgB,kBAAK,OAAO,EAAhE,mCAAsD,CAAU,CAAC;QAEvE,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEzC,MAAM,yBAAyB,GAAG,IAAA,0CAA0B,EAC1D,qBAAqB,EACrB,WAAW,CACZ,CAAC;QACF,MAAM,yBAAyB,CAAC,IAAI,kCAC/B,gBAAgB,KACnB,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,KAAK,IACb,CAAC;QAEH,MAAM,iBAAiB,GAAG,IAAA,gCAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAA,4BAAsB,EAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACzD,IAAA,wBAAU,EAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAE7C,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AArBD,sCAqBC;AAED,SAAS,yBAAyB,CAAC,IAAU,EAAE,OAAwB;;IACrE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QACjB,OAAO;KACR;IAED,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCAAI,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC,cAAc,CAAC;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEzD,IAAI,eAAe,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,eAAe,GAAG,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC;QAC/C,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC,eAAe,CAAC;IAEpB,IAAI,CAAC,IAAA,qBAAc,EAAC,eAAe,EAAE,IAAI,CAAC,EAAE;QAC1C,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,CAAC,IAAI,4CAA4C,IAAI,IAAI,CACpG,CAAC;KACH;AACH,CAAC;AAED,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Tree } from '@nrwl/devkit';
2
+ import type { FileInfo } from '../../utils/file-info';
3
+ import type { NormalizedSchema } from '../schema';
4
+ export declare function convertPipeToScam(tree: Tree, pipeFileInfo: FileInfo, options: NormalizedSchema): void;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertPipeToScam = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const ast_utils_1 = require("@nrwl/workspace/src/utilities/ast-utils");
6
+ const typescript_1 = require("typescript");
7
+ function convertPipeToScam(tree, pipeFileInfo, options) {
8
+ if (!tree.exists(pipeFileInfo.filePath)) {
9
+ throw new Error(`Couldn't find pipe at path ${pipeFileInfo.filePath} to add SCAM setup.`);
10
+ }
11
+ const pipeNames = (0, devkit_1.names)(options.name);
12
+ const typeNames = (0, devkit_1.names)('pipe');
13
+ const pipeClassName = `${pipeNames.className}${typeNames.className}`;
14
+ if (options.inlineScam) {
15
+ const currentPipeContents = tree.read(pipeFileInfo.filePath, 'utf-8');
16
+ let source = (0, typescript_1.createSourceFile)(pipeFileInfo.filePath, currentPipeContents, typescript_1.ScriptTarget.Latest, true);
17
+ source = (0, ast_utils_1.insertImport)(tree, source, pipeFileInfo.filePath, 'NgModule', '@angular/core');
18
+ source = (0, ast_utils_1.insertImport)(tree, source, pipeFileInfo.filePath, 'CommonModule', '@angular/common');
19
+ let updatedPipeSource = source.getText();
20
+ updatedPipeSource = `${updatedPipeSource}${getNgModuleDeclaration(pipeClassName)}`;
21
+ tree.write(pipeFileInfo.filePath, updatedPipeSource);
22
+ return;
23
+ }
24
+ const scamFilePath = (0, devkit_1.joinPathFragments)(pipeFileInfo.directory, `${pipeNames.fileName}.module.ts`);
25
+ tree.write(scamFilePath, getModuleFileContent(pipeClassName, pipeFileInfo.fileName));
26
+ }
27
+ exports.convertPipeToScam = convertPipeToScam;
28
+ function getModuleFileContent(pipeClassName, pipeFileName) {
29
+ return `import { NgModule } from '@angular/core';
30
+ import { CommonModule } from '@angular/common';
31
+ import { ${pipeClassName} } from './${pipeFileName}';
32
+ ${getNgModuleDeclaration(pipeClassName)}`;
33
+ }
34
+ function getNgModuleDeclaration(pipeClassName) {
35
+ return `
36
+ @NgModule({
37
+ imports: [CommonModule],
38
+ declarations: [${pipeClassName}],
39
+ exports: [${pipeClassName}],
40
+ })
41
+ export class ${pipeClassName}Module {}`;
42
+ }
43
+ //# sourceMappingURL=convert-pipe-to-scam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-pipe-to-scam.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-pipe/lib/convert-pipe-to-scam.ts"],"names":[],"mappings":";;;AACA,yCAAwD;AACxD,uEAAuE;AACvE,2CAA4D;AAI5D,SAAgB,iBAAiB,CAC/B,IAAU,EACV,YAAsB,EACtB,OAAyB;IAEzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CACb,8BAA8B,YAAY,CAAC,QAAQ,qBAAqB,CACzE,CAAC;KACH;IAED,MAAM,SAAS,GAA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Ac,YAAY;EAChD,sBAAsB,CAAC,aAAa,CAAC,EAAE,CAAC;AAC1C,CAAC;AAED,SAAS,sBAAsB,CAAC,aAAqB;IACnD,OAAO;;;mBAGU,aAAa;cAClB,aAAa;;eAEZ,aAAa,WAAW,CAAC;AACxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './convert-pipe-to-scam';
2
+ export * from './normalize-options';
@@ -1 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./convert-pipe-to-scam"), exports);
5
+ tslib_1.__exportStar(require("./normalize-options"), exports);
1
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-pipe/lib/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-pipe/lib/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,8DAAoC"}
@@ -0,0 +1,3 @@
1
+ import type { Tree } from '@nrwl/devkit';
2
+ import type { NormalizedSchema, Schema } from '../schema';
3
+ export declare function normalizeOptions(tree: Tree, options: Schema): NormalizedSchema;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ function normalizeOptions(tree, options) {
6
+ var _a, _b, _c;
7
+ const project = (_a = options.project) !== null && _a !== void 0 ? _a : (0, devkit_1.readWorkspaceConfiguration)(tree).defaultProject;
8
+ const { projectType, root, sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, project);
9
+ const projectSourceRoot = sourceRoot !== null && sourceRoot !== void 0 ? sourceRoot : (0, devkit_1.joinPathFragments)(root, 'src');
10
+ const path = (_b = options.path) !== null && _b !== void 0 ? _b : (0, devkit_1.joinPathFragments)(projectSourceRoot, projectType === 'application' ? 'app' : 'lib');
11
+ return Object.assign(Object.assign({}, options), { flat: (_c = options.flat) !== null && _c !== void 0 ? _c : true, path,
12
+ project,
13
+ projectSourceRoot });
14
+ }
15
+ exports.normalizeOptions = normalizeOptions;
16
+ //# sourceMappingURL=normalize-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-pipe/lib/normalize-options.ts"],"names":[],"mappings":";;;AACA,yCAIsB;AAGtB,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAe;;IAEf,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCAAI,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC,cAAc,CAAC;IACrE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAA,iCAAwB,EAChE,IAAI,EACJ,OAAO,CACR,CAAC;IACF,MAAM,iBAAiB,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAA,0BAAiB,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvE,MAAM,IAAI,GACR,MAAA,OAAO,CAAC,IAAI,mCACZ,IAAA,0BAAiB,EACf,iBAAiB,EACjB,WAAW,KAAK,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAC9C,CAAC;IAEJ,uCACK,OAAO,KACV,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,EAC1B,IAAI;QACJ,OAAO;QACP,iBAAiB,IACjB;AACJ,CAAC;AAzBD,4CAyBC"}
@@ -1,4 +1,4 @@
1
1
  import type { Tree } from '@nrwl/devkit';
2
2
  import type { Schema } from './schema';
3
- export declare function scamPipeGenerator(tree: Tree, schema: Schema): Promise<void>;
3
+ export declare function scamPipeGenerator(tree: Tree, rawOptions: Schema): Promise<void>;
4
4
  export default scamPipeGenerator;
@@ -2,17 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.scamPipeGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
6
5
  const devkit_1 = require("@nrwl/devkit");
7
- const create_module_1 = require("./lib/create-module");
6
+ const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
7
+ const export_scam_1 = require("../utils/export-scam");
8
+ const file_info_1 = require("../utils/file-info");
8
9
  const path_1 = require("../utils/path");
9
- function scamPipeGenerator(tree, schema) {
10
+ const lib_1 = require("./lib");
11
+ function scamPipeGenerator(tree, rawOptions) {
10
12
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
- const { inlineScam } = schema, options = tslib_1.__rest(schema, ["inlineScam"]);
13
+ const options = (0, lib_1.normalizeOptions)(tree, rawOptions);
14
+ const { inlineScam, projectSourceRoot } = options, schematicOptions = tslib_1.__rest(options, ["inlineScam", "projectSourceRoot"]);
12
15
  checkPathUnderProjectRoot(tree, options);
13
16
  const angularPipeSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'pipe');
14
- yield angularPipeSchematic(tree, Object.assign(Object.assign({}, options), { skipImport: true, export: false }));
15
- (0, create_module_1.createScamPipe)(tree, schema);
17
+ yield angularPipeSchematic(tree, Object.assign(Object.assign({}, schematicOptions), { skipImport: true, export: false }));
18
+ const pipeFileInfo = (0, file_info_1.getPipeFileInfo)(tree, options);
19
+ (0, lib_1.convertPipeToScam)(tree, pipeFileInfo, options);
20
+ (0, export_scam_1.exportScam)(tree, pipeFileInfo, options);
16
21
  yield (0, devkit_1.formatFiles)(tree);
17
22
  });
18
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scam-pipe.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-pipe/scam-pipe.ts"],"names":[],"mappings":";;;;AAEA,8DAAwE;AACxE,yCAKsB;AACtB,uDAAqD;AAErD,wCAA+C;AAE/C,SAAsB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