@nrwl/angular 14.4.0-beta.6 → 14.4.0-beta.9

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 (181) 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/generators/application/application.js +2 -2
  26. package/src/generators/application/application.js.map +1 -1
  27. package/src/generators/application/lib/{add-mfe.d.ts → add-mf.d.ts} +1 -1
  28. package/src/generators/application/lib/{add-mfe.js → add-mf.js} +7 -7
  29. package/src/generators/application/lib/add-mf.js.map +1 -0
  30. package/src/generators/application/lib/index.d.ts +1 -1
  31. package/src/generators/application/lib/index.js +1 -1
  32. package/src/generators/application/lib/index.js.map +1 -1
  33. package/src/generators/application/schema.d.ts +2 -2
  34. package/src/generators/application/schema.json +2 -2
  35. package/src/generators/component/lib/component.js +4 -4
  36. package/src/generators/component/lib/component.js.map +1 -1
  37. package/src/generators/host/host.js +1 -1
  38. package/src/generators/host/host.js.map +1 -1
  39. package/src/generators/remote/remote.js +4 -4
  40. package/src/generators/remote/remote.js.map +1 -1
  41. package/src/generators/scam/lib/convert-component-to-scam.d.ts +3 -3
  42. package/src/generators/scam/lib/convert-component-to-scam.js +10 -10
  43. package/src/generators/scam/lib/convert-component-to-scam.js.map +1 -1
  44. package/src/generators/scam/lib/index.d.ts +0 -1
  45. package/src/generators/scam/lib/index.js +0 -1
  46. package/src/generators/scam/lib/index.js.map +1 -1
  47. package/src/generators/scam/lib/normalize-options.js +2 -2
  48. package/src/generators/scam/lib/normalize-options.js.map +1 -1
  49. package/src/generators/scam/scam.js +5 -4
  50. package/src/generators/scam/scam.js.map +1 -1
  51. package/src/generators/scam/schema.d.ts +2 -0
  52. package/src/generators/scam-directive/lib/convert-directive-to-scam.d.ts +4 -0
  53. package/src/generators/scam-directive/lib/convert-directive-to-scam.js +43 -0
  54. package/src/generators/scam-directive/lib/convert-directive-to-scam.js.map +1 -0
  55. package/src/generators/scam-directive/lib/index.d.ts +2 -0
  56. package/src/generators/scam-directive/lib/index.js +5 -0
  57. package/src/generators/scam-directive/lib/index.js.map +1 -1
  58. package/src/generators/scam-directive/lib/normalize-options.d.ts +3 -0
  59. package/src/generators/scam-directive/lib/normalize-options.js +16 -0
  60. package/src/generators/scam-directive/lib/normalize-options.js.map +1 -0
  61. package/src/generators/scam-directive/scam-directive.d.ts +1 -1
  62. package/src/generators/scam-directive/scam-directive.js +11 -6
  63. package/src/generators/scam-directive/scam-directive.js.map +1 -1
  64. package/src/generators/scam-directive/schema.d.ts +9 -0
  65. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.d.ts +4 -0
  66. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +43 -0
  67. package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js.map +1 -0
  68. package/src/generators/scam-pipe/lib/index.d.ts +2 -0
  69. package/src/generators/scam-pipe/lib/index.js +5 -0
  70. package/src/generators/scam-pipe/lib/index.js.map +1 -1
  71. package/src/generators/scam-pipe/lib/normalize-options.d.ts +3 -0
  72. package/src/generators/scam-pipe/lib/normalize-options.js +16 -0
  73. package/src/generators/scam-pipe/lib/normalize-options.js.map +1 -0
  74. package/src/generators/scam-pipe/scam-pipe.d.ts +1 -1
  75. package/src/generators/scam-pipe/scam-pipe.js +11 -6
  76. package/src/generators/scam-pipe/scam-pipe.js.map +1 -1
  77. package/src/generators/scam-pipe/schema.d.ts +9 -0
  78. package/src/generators/{setup-mfe → setup-mf}/files/entry-module-files/entry.component.ts__tmpl__ +0 -0
  79. package/src/generators/{setup-mfe → setup-mf}/files/entry-module-files/entry.module.ts__tmpl__ +0 -0
  80. package/src/generators/{setup-mfe → setup-mf}/files/webpack/module-federation.config.js__tmpl__ +0 -0
  81. package/src/generators/{setup-mfe → setup-mf}/files/webpack/webpack.config.js__tmpl__ +0 -0
  82. package/src/generators/{setup-mfe → setup-mf}/files/webpack/webpack.prod.config.js__tmpl__ +0 -0
  83. package/src/generators/{setup-mfe → setup-mf}/lib/add-cypress-workaround.d.ts +0 -0
  84. package/src/generators/{setup-mfe → setup-mf}/lib/add-cypress-workaround.js +0 -0
  85. package/src/generators/setup-mf/lib/add-cypress-workaround.js.map +1 -0
  86. package/src/generators/{setup-mfe → setup-mf}/lib/add-entry-module.d.ts +1 -1
  87. package/src/generators/{setup-mfe → setup-mf}/lib/add-entry-module.js +2 -2
  88. package/src/generators/setup-mf/lib/add-entry-module.js.map +1 -0
  89. package/src/generators/{setup-mfe → setup-mf}/lib/add-remote-to-host.d.ts +1 -1
  90. package/src/generators/{setup-mfe → setup-mf}/lib/add-remote-to-host.js +8 -8
  91. package/src/generators/setup-mf/lib/add-remote-to-host.js.map +1 -0
  92. package/src/generators/{setup-mfe → setup-mf}/lib/change-build-target.d.ts +0 -0
  93. package/src/generators/{setup-mfe → setup-mf}/lib/change-build-target.js +0 -0
  94. package/src/generators/setup-mf/lib/change-build-target.js.map +1 -0
  95. package/src/generators/{setup-mfe → setup-mf}/lib/fix-bootstrap.d.ts +0 -0
  96. package/src/generators/{setup-mfe → setup-mf}/lib/fix-bootstrap.js +2 -2
  97. package/src/generators/setup-mf/lib/fix-bootstrap.js.map +1 -0
  98. package/src/generators/{setup-mfe → setup-mf}/lib/generate-config.d.ts +0 -0
  99. package/src/generators/{setup-mfe → setup-mf}/lib/generate-config.js +1 -1
  100. package/src/generators/setup-mf/lib/generate-config.js.map +1 -0
  101. package/src/generators/{setup-mfe → setup-mf}/lib/get-remotes-with-ports.d.ts +0 -0
  102. package/src/generators/{setup-mfe → setup-mf}/lib/get-remotes-with-ports.js +1 -1
  103. package/src/generators/setup-mf/lib/get-remotes-with-ports.js.map +1 -0
  104. package/src/generators/{setup-mfe → setup-mf}/lib/index.d.ts +0 -0
  105. package/src/generators/{setup-mfe → setup-mf}/lib/index.js +0 -0
  106. package/src/generators/setup-mf/lib/index.js.map +1 -0
  107. package/src/generators/{setup-mfe → setup-mf}/lib/set-tsconfig-target.d.ts +0 -0
  108. package/src/generators/{setup-mfe → setup-mf}/lib/set-tsconfig-target.js +0 -0
  109. package/src/generators/setup-mf/lib/set-tsconfig-target.js.map +1 -0
  110. package/src/generators/{setup-mfe → setup-mf}/lib/setup-host-if-dynamic.d.ts +0 -0
  111. package/src/generators/{setup-mfe → setup-mf}/lib/setup-host-if-dynamic.js +1 -1
  112. package/src/generators/setup-mf/lib/setup-host-if-dynamic.js.map +1 -0
  113. package/src/generators/{setup-mfe → setup-mf}/lib/setup-serve-target.d.ts +0 -0
  114. package/src/generators/{setup-mfe → setup-mf}/lib/setup-serve-target.js +2 -2
  115. package/src/generators/setup-mf/lib/setup-serve-target.js.map +1 -0
  116. package/src/generators/{setup-mfe → setup-mf}/schema.d.ts +1 -1
  117. package/src/generators/{setup-mfe → setup-mf}/schema.json +3 -3
  118. package/src/generators/{setup-mfe/setup-mfe.compat.d.ts → setup-mf/setup-mf.compat.d.ts} +0 -0
  119. package/src/generators/setup-mf/setup-mf.compat.js +6 -0
  120. package/src/generators/setup-mf/setup-mf.compat.js.map +1 -0
  121. package/src/generators/setup-mf/setup-mf.d.ts +4 -0
  122. package/src/generators/{setup-mfe/setup-mfe.js → setup-mf/setup-mf.js} +5 -5
  123. package/src/generators/setup-mf/setup-mf.js.map +1 -0
  124. package/src/generators/utils/export-scam.d.ts +9 -0
  125. package/src/generators/{scam/lib → utils}/export-scam.js +9 -8
  126. package/src/generators/utils/export-scam.js.map +1 -0
  127. package/src/generators/utils/file-info.d.ts +16 -0
  128. package/src/generators/utils/{component.js → file-info.js} +18 -7
  129. package/src/generators/utils/file-info.js.map +1 -0
  130. package/src/migrations/update-13-8-1/{add-cypress-mfe-workaround.d.ts → add-cypress-mf-workaround.d.ts} +0 -0
  131. package/src/migrations/update-13-8-1/{add-cypress-mfe-workaround.js → add-cypress-mf-workaround.js} +1 -1
  132. package/src/migrations/update-13-8-1/add-cypress-mf-workaround.js.map +1 -0
  133. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +5 -0
  134. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +94 -0
  135. package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js.map +1 -0
  136. package/src/utils/{mfe/mfe-webpack.d.ts → mf/mf-webpack.d.ts} +0 -0
  137. package/src/utils/{mfe/mfe-webpack.js → mf/mf-webpack.js} +2 -2
  138. package/src/utils/mf/mf-webpack.js.map +1 -0
  139. package/src/utils/{mfe → mf}/utils.d.ts +0 -0
  140. package/src/utils/{mfe → mf}/utils.js +1 -1
  141. package/src/utils/mf/utils.js.map +1 -0
  142. package/src/utils/{mfe → mf}/with-module-federation.d.ts +5 -5
  143. package/src/utils/{mfe → mf}/with-module-federation.js +6 -6
  144. package/src/utils/mf/with-module-federation.js.map +1 -0
  145. package/esm2020/mfe/index.mjs +0 -2
  146. package/esm2020/mfe/mfe.mjs +0 -45
  147. package/esm2020/mfe/nrwl-angular-mfe.mjs +0 -5
  148. package/fesm2015/nrwl-angular-mfe.mjs.map +0 -1
  149. package/fesm2020/nrwl-angular-mfe.mjs.map +0 -1
  150. package/mfe/index.js.map +0 -1
  151. package/mfe/mfe.js.map +0 -1
  152. package/src/generators/application/lib/add-mfe.js.map +0 -1
  153. package/src/generators/scam/lib/export-scam.d.ts +0 -4
  154. package/src/generators/scam/lib/export-scam.js.map +0 -1
  155. package/src/generators/scam-directive/lib/create-module.d.ts +0 -3
  156. package/src/generators/scam-directive/lib/create-module.js +0 -90
  157. package/src/generators/scam-directive/lib/create-module.js.map +0 -1
  158. package/src/generators/scam-pipe/lib/create-module.d.ts +0 -3
  159. package/src/generators/scam-pipe/lib/create-module.js +0 -90
  160. package/src/generators/scam-pipe/lib/create-module.js.map +0 -1
  161. package/src/generators/setup-mfe/lib/add-cypress-workaround.js.map +0 -1
  162. package/src/generators/setup-mfe/lib/add-entry-module.js.map +0 -1
  163. package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +0 -1
  164. package/src/generators/setup-mfe/lib/change-build-target.js.map +0 -1
  165. package/src/generators/setup-mfe/lib/fix-bootstrap.js.map +0 -1
  166. package/src/generators/setup-mfe/lib/generate-config.js.map +0 -1
  167. package/src/generators/setup-mfe/lib/get-remotes-with-ports.js.map +0 -1
  168. package/src/generators/setup-mfe/lib/index.js.map +0 -1
  169. package/src/generators/setup-mfe/lib/set-tsconfig-target.js.map +0 -1
  170. package/src/generators/setup-mfe/lib/setup-host-if-dynamic.js.map +0 -1
  171. package/src/generators/setup-mfe/lib/setup-serve-target.js.map +0 -1
  172. package/src/generators/setup-mfe/setup-mfe.compat.js +0 -6
  173. package/src/generators/setup-mfe/setup-mfe.compat.js.map +0 -1
  174. package/src/generators/setup-mfe/setup-mfe.d.ts +0 -4
  175. package/src/generators/setup-mfe/setup-mfe.js.map +0 -1
  176. package/src/generators/utils/component.d.ts +0 -14
  177. package/src/generators/utils/component.js.map +0 -1
  178. package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js.map +0 -1
  179. package/src/utils/mfe/mfe-webpack.js.map +0 -1
  180. package/src/utils/mfe/utils.js.map +0 -1
  181. package/src/utils/mfe/with-module-federation.js.map +0 -1
@@ -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,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,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACvE,IAAI,MAAM,GAAG,IAAA,6BAAgB,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,yBAAY,CAAC,MAAM,EACnB,IAAI,CACL,CAAC;QAEF,MAAM,GAAG,IAAA,wBAAY,EACnB,IAAI,EACJ,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,eAAe,CAChB,CAAC;QACF,MAAM,GAAG,IAAA,wBAAY,EACnB,IAAI,EACJ,MAAM,EACN,iBAAiB,EACjB,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,EAAE,sBAAsB,CAAC,CAAC;QACtD,OAAO;KACR;IAED,MAAM,cAAc,GAAG,IAAA,0BAAiB,EACtC,kBAAkB,EAClB,GAAG,cAAc,CAAC,QAAQ,YAAY,CACvC,CAAC;IAEF,IAAI,CAAC,KAAK,CACR,cAAc,EACd,oBAAoB,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAC5D,CAAC;AACJ,CAAC;AA7DD,wDA6DC;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
+ {"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,C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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"}
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
5
  function normalizeOptions(tree, options) {
6
- var _a, _b;
6
+ var _a, _b, _c, _d;
7
7
  const project = (_a = options.project) !== null && _a !== void 0 ? _a : (0, devkit_1.readWorkspaceConfiguration)(tree).defaultProject;
8
8
  const { projectType, root, sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, project);
9
9
  const projectSourceRoot = sourceRoot !== null && sourceRoot !== void 0 ? sourceRoot : (0, devkit_1.joinPathFragments)(root, 'src');
10
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), { path,
11
+ return Object.assign(Object.assign({}, options), { export: (_c = options.export) !== null && _c !== void 0 ? _c : true, inlineScam: (_d = options.inlineScam) !== null && _d !== void 0 ? _d : true, path,
12
12
  project,
13
13
  projectSourceRoot });
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/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;QACJ,OAAO;QACP,iBAAiB,IACjB;AACJ,CAAC;AAxBD,4CAwBC"}
1
+ {"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam/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,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI,EAC9B,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,EACtC,IAAI;QACJ,OAAO;QACP,iBAAiB,IACjB;AACJ,CAAC;AA1BD,4CA0BC"}
@@ -4,19 +4,20 @@ 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);
13
14
  const { inlineScam, projectSourceRoot } = options, schematicOptions = tslib_1.__rest(options, ["inlineScam", "projectSourceRoot"]);
14
15
  checkPathUnderProjectRoot(tree, options);
15
16
  const angularComponentSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'component');
16
- yield angularComponentSchematic(tree, Object.assign(Object.assign({}, schematicOptions), { skipImport: true, export: false }));
17
- const componentFileInfo = (0, component_1.getComponentFileInfo)(tree, options);
17
+ yield angularComponentSchematic(tree, Object.assign(Object.assign({}, schematicOptions), { skipImport: true, export: false, standalone: false }));
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,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,gBAAU,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,I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/B,gBAAgB,KACnB,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,IACjB,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;AAtBD,sCAsBC;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"}
@@ -19,6 +19,8 @@ export interface Schema {
19
19
  }
20
20
 
21
21
  export interface NormalizedSchema extends Schema {
22
+ export: boolean;
23
+ inlineScam: boolean;
22
24
  path: string;
23
25
  project: string;
24
26
  projectSourceRoot: string;
@@ -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 convertDirectiveToScam(tree: Tree, directiveFileInfo: FileInfo, options: NormalizedSchema): void;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertDirectiveToScam = 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 convertDirectiveToScam(tree, directiveFileInfo, options) {
8
+ if (!tree.exists(directiveFileInfo.filePath)) {
9
+ throw new Error(`Couldn't find directive at path ${directiveFileInfo.filePath} to add SCAM setup.`);
10
+ }
11
+ const directiveNames = (0, devkit_1.names)(options.name);
12
+ const typeNames = (0, devkit_1.names)('directive');
13
+ const directiveClassName = `${directiveNames.className}${typeNames.className}`;
14
+ if (options.inlineScam) {
15
+ const currentDirectiveContents = tree.read(directiveFileInfo.filePath, 'utf-8');
16
+ let source = (0, typescript_1.createSourceFile)(directiveFileInfo.filePath, currentDirectiveContents, typescript_1.ScriptTarget.Latest, true);
17
+ source = (0, ast_utils_1.insertImport)(tree, source, directiveFileInfo.filePath, 'NgModule', '@angular/core');
18
+ source = (0, ast_utils_1.insertImport)(tree, source, directiveFileInfo.filePath, 'CommonModule', '@angular/common');
19
+ let updatedDirectiveSource = source.getText();
20
+ updatedDirectiveSource = `${updatedDirectiveSource}${getNgModuleDeclaration(directiveClassName)}`;
21
+ tree.write(directiveFileInfo.filePath, updatedDirectiveSource);
22
+ return;
23
+ }
24
+ const scamFilePath = (0, devkit_1.joinPathFragments)(directiveFileInfo.directory, `${directiveNames.fileName}.module.ts`);
25
+ tree.write(scamFilePath, getModuleFileContent(directiveClassName, directiveFileInfo.fileName));
26
+ }
27
+ exports.convertDirectiveToScam = convertDirectiveToScam;
28
+ function getModuleFileContent(directiveClassName, directiveFileName) {
29
+ return `import { NgModule } from '@angular/core';
30
+ import { CommonModule } from '@angular/common';
31
+ import { ${directiveClassName} } from './${directiveFileName}';
32
+ ${getNgModuleDeclaration(directiveClassName)}`;
33
+ }
34
+ function getNgModuleDeclaration(directiveClassName) {
35
+ return `
36
+ @NgModule({
37
+ imports: [CommonModule],
38
+ declarations: [${directiveClassName}],
39
+ exports: [${directiveClassName}],
40
+ })
41
+ export class ${directiveClassName}Module {}`;
42
+ }
43
+ //# sourceMappingURL=convert-directive-to-scam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-directive-to-scam.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-directive/lib/convert-directive-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,WAAW,CAAC,CAAC;IACrC,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,YAAY,GAAG,IAAA,0BAAiB,EACpC,iBAAiB,CAAC,SAAS,EAC3B,GAAG,cAAc,CAAC,QAAQ,YAAY,CACvC,CAAC;IAEF,IAAI,CAAC,KAAK,CACR,YAAY,EACZ,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"}
@@ -0,0 +1,2 @@
1
+ export * from './convert-directive-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-directive-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-directive/lib/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/scam-directive/lib/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C;AAC5C,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, _d, _e;
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), { export: (_c = options.export) !== null && _c !== void 0 ? _c : true, flat: (_d = options.flat) !== null && _d !== void 0 ? _d : true, inlineScam: (_e = options.inlineScam) !== null && _e !== void 0 ? _e : 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-directive/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,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI,EAC9B,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,EAC1B,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,EACtC,IAAI;QACJ,OAAO;QACP,iBAAiB,IACjB;AACJ,CAAC;AA3BD,4CA2BC"}
@@ -1,4 +1,4 @@
1
1
  import type { Tree } from '@nrwl/devkit';
2
2
  import type { Schema } from './schema';
3
- export declare function scamDirectiveGenerator(tree: Tree, schema: Schema): Promise<void>;
3
+ export declare function scamDirectiveGenerator(tree: Tree, rawOptions: Schema): Promise<void>;
4
4
  export default scamDirectiveGenerator;
@@ -2,17 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.scamDirectiveGenerator = 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 scamDirectiveGenerator(tree, schema) {
10
+ const lib_1 = require("./lib");
11
+ function scamDirectiveGenerator(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 angularDirectiveSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'directive');
14
- yield angularDirectiveSchematic(tree, Object.assign(Object.assign({}, options), { skipImport: true, export: false }));
15
- (0, create_module_1.createScamDirective)(tree, schema);
17
+ yield angularDirectiveSchematic(tree, Object.assign(Object.assign({}, schematicOptions), { skipImport: true, export: false, standalone: false }));
18
+ const pipeFileInfo = (0, file_info_1.getDirectiveFileInfo)(tree, options);
19
+ (0, lib_1.convertDirectiveToScam)(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-directive.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-directive/scam-directive.ts"],"names":[],"mappings":";;;;AAEA,8DAAwE;AACxE,yCAKsB;AACtB,uDAA0D;AAE1D,wCAA+C;AAE/C,SAAsB,sBAAsB,CAAC,IAAU,EAAE,MAAc;;QACrE,MAAM,EAAE,UAAU,KAAiB,MAAM,EAAlB,OAAO,kBAAK,MAAM,EAAnC,cAA0B,CAAS,CAAC;QAE1C,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,OAAO,KACV,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,KAAK,IACb,CAAC;QAEH,IAAA,mCAAmB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAElC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAlBD,wDAkBC;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,sBAAsB,CAAC"}
1
+ {"version":3,"file":"scam-directive.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-directive/scam-directive.ts"],"names":[],"mappings":";;;;AACA,yCAKsB;AACtB,8DAAwE;AACxE,sDAAkD;AAClD,kDAA0D;AAC1D,wCAA+C;AAC/C,+BAAiE;AAGj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Ae,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,sBAAsB,CAAC"}
@@ -9,3 +9,12 @@ export interface Schema {
9
9
  selector?: string;
10
10
  export?: boolean;
11
11
  }
12
+
13
+ export interface NormalizedSchema extends Schema {
14
+ export: boolean;
15
+ flat: boolean;
16
+ inlineScam: boolean;
17
+ path: string;
18
+ project: string;
19
+ projectSourceRoot: string;
20
+ }
@@ -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,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC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AAE,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, _d, _e;
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), { export: (_c = options.export) !== null && _c !== void 0 ? _c : true, flat: (_d = options.flat) !== null && _d !== void 0 ? _d : true, inlineScam: (_e = options.inlineScam) !== null && _e !== void 0 ? _e : 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,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI,EAC9B,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,EAC1B,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,EACtC,IAAI;QACJ,OAAO;QACP,iBAAiB,IACjB;AACJ,CAAC;AA3BD,4CA2BC"}
@@ -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, standalone: 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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C,EAAE;QACrC,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,CAAC,IAAI,4CAA4C,IAAI,IAAI,CACpG,CAAC;KACH;AACH,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"scam-pipe.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/scam-pipe/scam-pipe.ts"],"names":[],"mappings":";;;;AACA,yCAKsB;AACtB,8DAAwE;AACxE,sDAAkD;AAClD,kDAAqD;AACrD,wCAA+C;AAC/C,+BAA4D;AAG5D,SAAsB,iBAAiB,CAAC,IAAU,EAAE,UAAkB;;QACpE,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,oBAAoB,GAAG,IAAA,0CAA0B,EACrD,qBAAqB,EACrB,MAAM,CACP,CAAC;QACF,MAAM,oBAAoB,CAAC,IAAI,kCAC1B,gBAAgB,KACnB,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,IACjB,CAAC;QAEH,MAAM,YAAY,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpD,IAAA,uBAAiB,EAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;QAC/C,IAAA,wBAAU,EAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;QAExC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAtBD,8CAsBC;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,UAAU,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAE3E,IAAI,CAAC,IAAA,qBAAc,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE;QACrC,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,CAAC,IAAI,4CAA4C,IAAI,IAAI,CACpG,CAAC;KACH;AACH,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
@@ -7,3 +7,12 @@ export interface Schema {
7
7
  flat?: boolean;
8
8
  export?: boolean;
9
9
  }
10
+
11
+ export interface NormalizedSchema extends Schema {
12
+ export: boolean;
13
+ flat: boolean;
14
+ inlineScam: boolean;
15
+ path: string;
16
+ project: string;
17
+ projectSourceRoot: string;
18
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-cypress-workaround.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-cypress-workaround.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,iEAAiE;AACjE,iDAAiD;;;AAKjD,yCAIsB;AAEtB,SAAgB,2BAA2B,CAAC,IAAU,EAAE,MAAc;;IACpE,MAAM,cAAc,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC;IACxE,IAAI,UAAgC,CAAC;IAErC,IAAI;QACF,UAAU,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;KAC7D;IAAC,WAAM;QACN,eAAM,CAAC,IAAI,CAAC,gDAAgD,MAAM,CAAC,OAAO,cAAc,cAAc;iIACuB,CAAC,CAAC;QAC/H,OAAO;KACR;IAED,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,uBAAuB,EAAE;QAC/D,kCAAkC;QAClC,OAAO;KACR;IAED,MAAM,YAAY,GAAG;;;;;MAKjB,CAAC;IAEL,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,UAAU,CAAC,UAAU,EACrB,kBAAkB,CACnB,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,eAAe,KAAK,YAAY,EAAE,CAAC,CAAC;AACxE,CAAC;AAjCD,kEAiCC"}
@@ -1,3 +1,3 @@
1
1
  import type { Tree } from '@nrwl/devkit';
2
2
  import type { Schema } from '../schema';
3
- export declare function addEntryModule(host: Tree, { appName, routing, mfeType, prefix }: Schema, appRoot: string): void;
3
+ export declare function addEntryModule(host: Tree, { appName, routing, mfType, prefix }: Schema, appRoot: string): void;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addEntryModule = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
- function addEntryModule(host, { appName, routing, mfeType, prefix }, appRoot) {
6
- if (mfeType === 'remote') {
5
+ function addEntryModule(host, { appName, routing, mfType, prefix }, appRoot) {
6
+ if (mfType === 'remote') {
7
7
  (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, '../files/entry-module-files'), `${appRoot}/src/app/remote-entry`, {
8
8
  tmpl: '',
9
9
  appName,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-entry-module.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-entry-module.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAGhE,SAAgB,cAAc,CAC5B,IAAU,EACV,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,EAC5C,OAAe;IAEf,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,6BAA6B,CAAC,EAC3D,GAAG,OAAO,uBAAuB,EACjC;YACE,IAAI,EAAE,EAAE;YACR,OAAO;YACP,OAAO;YACP,MAAM;SACP,CACF,CAAC;QAEF,IAAI,CAAC,KAAK,CACR,GAAG,OAAO,wBAAwB,EAClC;;;;;;EAMJ,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,wBAAwB,EAAE,OAAO,CAAC,EAAE,CACrD,CAAC;KACH;AACH,CAAC;AA7BD,wCA6BC"}
@@ -1,4 +1,4 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
2
  import type { Schema } from '../schema';
3
- export declare function checkIsCommaNeeded(mfeRemoteText: string): boolean;
3
+ export declare function checkIsCommaNeeded(mfRemoteText: string): boolean;
4
4
  export declare function addRemoteToHost(tree: Tree, options: Schema): void;
@@ -6,8 +6,8 @@ const tsquery_1 = require("@phenomnomnominal/tsquery");
6
6
  const ts = require("typescript");
7
7
  const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
8
8
  const ast_utils_2 = require("@nrwl/workspace/src/utilities/ast-utils");
9
- function checkIsCommaNeeded(mfeRemoteText) {
10
- const remoteText = mfeRemoteText.replace(/\s+/g, '');
9
+ function checkIsCommaNeeded(mfRemoteText) {
10
+ const remoteText = mfRemoteText.replace(/\s+/g, '');
11
11
  return !remoteText.endsWith(',]')
12
12
  ? remoteText === '[]'
13
13
  ? false
@@ -16,7 +16,7 @@ function checkIsCommaNeeded(mfeRemoteText) {
16
16
  }
17
17
  exports.checkIsCommaNeeded = checkIsCommaNeeded;
18
18
  function addRemoteToHost(tree, options) {
19
- if (options.mfeType === 'remote' && options.host) {
19
+ if (options.mfType === 'remote' && options.host) {
20
20
  const hostProject = (0, devkit_1.readProjectConfiguration)(tree, options.host);
21
21
  const pathToMFManifest = (0, devkit_1.joinPathFragments)(hostProject.sourceRoot, 'assets/module-federation.manifest.json');
22
22
  const hostFederationType = determineHostFederationType(tree, pathToMFManifest);
@@ -35,8 +35,8 @@ function addRemoteToHost(tree, options) {
35
35
  }
36
36
  }
37
37
  exports.addRemoteToHost = addRemoteToHost;
38
- function determineHostFederationType(tree, pathToMfeManifest) {
39
- return tree.exists(pathToMfeManifest) ? 'dynamic' : 'static';
38
+ function determineHostFederationType(tree, pathToMfManifest) {
39
+ return tree.exists(pathToMfManifest) ? 'dynamic' : 'static';
40
40
  }
41
41
  function addRemoteToStaticHost(tree, options, hostProject) {
42
42
  const hostMFConfigPath = (0, devkit_1.joinPathFragments)(hostProject.root, 'module-federation.config.js');
@@ -51,8 +51,8 @@ function addRemoteToStaticHost(tree, options, hostProject) {
51
51
  const updatedConfig = `${hostMFConfig.slice(0, endOfPropertiesPos)}${isCommaNeeded ? ',' : ''}'${options.appName}',${hostMFConfig.slice(endOfPropertiesPos)}`;
52
52
  tree.write(hostMFConfigPath, updatedConfig);
53
53
  }
54
- function addRemoteToDynamicHost(tree, options, pathToMfeManifest) {
55
- (0, devkit_1.updateJson)(tree, pathToMfeManifest, (manifest) => {
54
+ function addRemoteToDynamicHost(tree, options, pathToMfManifest) {
55
+ (0, devkit_1.updateJson)(tree, pathToMfManifest, (manifest) => {
56
56
  return Object.assign(Object.assign({}, manifest), { [options.appName]: `http://localhost:${options.port}` });
57
57
  });
58
58
  }
@@ -69,7 +69,7 @@ function addLazyLoadedRouteToHostAppModule(tree, options, hostFederationType) {
69
69
  }
70
70
  let sourceFile = ts.createSourceFile(pathToHostAppModule, hostAppModule, ts.ScriptTarget.Latest, true);
71
71
  if (hostFederationType === 'dynamic') {
72
- sourceFile = (0, ast_utils_2.insertImport)(tree, sourceFile, pathToHostAppModule, 'loadRemoteModule', '@nrwl/angular/mfe');
72
+ sourceFile = (0, ast_utils_2.insertImport)(tree, sourceFile, pathToHostAppModule, 'loadRemoteModule', '@nrwl/angular/mf');
73
73
  }
74
74
  const routeToAdd = hostFederationType === 'dynamic'
75
75
  ? `loadRemoteModule('${options.appName}', './Module')`
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-remote-to-host.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/add-remote-to-host.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAEtB,uDAAoD;AACpD,iCAAiC;AAEjC,kEAA8D;AAC9D,uEAAuE;AAEvE,SAAgB,kBAAkB,CAAC,YAAoB;IACrD,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,UAAU,KAAK,IAAI;YACnB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI;QACR,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC;AAPD,gDAOC;AAED,SAAgB,eAAe,CAAC,IAAU,EAAE,OAAe;IACzD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE;QAC/C,MAAM,WAAW,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,gBAAgB,GAAG,IAAA,0BAAiB,EACxC,WAAW,CAAC,UAAU,EACtB,wCAAwC,CACzC,CAAC;QACF,MAAM,kBAAkB,GAAG,2BAA2B,CACpD,IAAI,EACJ,gBAAgB,CACjB,CAAC;QAEF,IAAI,kBAAkB,KAAK,QAAQ,EAAE;YACnC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,C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eAAe,CAAC,CAAC;KACzD;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-build-target.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/change-build-target.ts"],"names":[],"mappings":";;;AAGA,yCAGsB;AAEtB,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAe;IAC3D,MAAM,SAAS,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAElE,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,+BAA+B,CAAC;IACnE,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,mCAC1B,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,KAClC,mBAAmB,EAAE;YACnB,IAAI,EAAE,GAAG,SAAS,CAAC,IAAI,oBAAoB;SAC5C,GACF,CAAC;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,mCAC5C,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,KACpD,mBAAmB,EAAE;YACnB,IAAI,EAAE,GAAG,SAAS,CAAC,IAAI,yBAAyB;SACjD,GACF,CAAC;IAEF,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC;AAnBD,8CAmBC"}
@@ -7,13 +7,13 @@ function fixBootstrap(tree, appRoot, options) {
7
7
  const bootstrapCode = tree.read(mainFilePath, 'utf-8');
8
8
  tree.write((0, devkit_1.joinPathFragments)(appRoot, 'src/bootstrap.ts'), bootstrapCode);
9
9
  const bootstrapImportCode = `import('./bootstrap').catch(err => console.error(err))`;
10
- const fetchMFManifestCode = `import { setRemoteDefinitions } from '@nrwl/angular/mfe';
10
+ const fetchMFManifestCode = `import { setRemoteDefinitions } from '@nrwl/angular/mf';
11
11
 
12
12
  fetch('/assets/module-federation.manifest.json')
13
13
  .then((res) => res.json())
14
14
  .then(definitions => setRemoteDefinitions(definitions))
15
15
  .then(() => ${bootstrapImportCode})`;
16
- tree.write(mainFilePath, options.mfeType === 'host' && options.federationType === 'dynamic'
16
+ tree.write(mainFilePath, options.mfType === 'host' && options.federationType === 'dynamic'
17
17
  ? fetchMFManifestCode
18
18
  : bootstrapImportCode);
19
19
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fix-bootstrap.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mf/lib/fix-bootstrap.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AAGjD,SAAgB,YAAY,CAAC,IAAU,EAAE,OAAe,EAAE,OAAe;IACvE,MAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC;IAE1E,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;IAErF,MAAM,mBAAmB,GAAG;;;;;gBAKd,mBAAmB,GAAG,CAAC;IAErC,IAAI,CAAC,KAAK,CACR,YAAY,EACZ,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS;QAC/D,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,mBAAmB,CACxB,CAAC;AACJ,CAAC;AApBD,oCAoBC"}
@@ -11,7 +11,7 @@ function generateWebpackConfig(host, options, appRoot, remotesWithPorts) {
11
11
  }
12
12
  (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, '../files/webpack'), appRoot, {
13
13
  tmpl: '',
14
- type: options.mfeType,
14
+ type: options.mfType,
15
15
  name: options.appName,
16
16
  remotes: remotesWithPorts !== null && remotesWithPorts !== void 0 ? remotesWithPorts : [],
17
17
  projectRoot: appRoot,