@mouryaamit/nx-polystack 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (680) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -2
  3. package/USER-MANUAL.md +1968 -0
  4. package/dist/bin/cli.d.ts +1 -0
  5. package/dist/bin/cli.js +92 -0
  6. package/dist/bin/cli.js.map +1 -0
  7. package/dist/executors.json +32 -0
  8. package/dist/generators.json +47 -0
  9. package/dist/migrations.json +87 -0
  10. package/dist/runtime/env-secret.cjs +736 -0
  11. package/dist/src/cli/args.d.ts +18 -0
  12. package/dist/src/cli/args.js +67 -0
  13. package/dist/src/cli/args.js.map +1 -0
  14. package/dist/src/cli/commands/app.d.ts +3 -0
  15. package/dist/src/cli/commands/app.js +108 -0
  16. package/dist/src/cli/commands/app.js.map +1 -0
  17. package/dist/src/cli/commands/build.d.ts +8 -0
  18. package/dist/src/cli/commands/build.js +132 -0
  19. package/dist/src/cli/commands/build.js.map +1 -0
  20. package/dist/src/cli/commands/csp.d.ts +19 -0
  21. package/dist/src/cli/commands/csp.js +238 -0
  22. package/dist/src/cli/commands/csp.js.map +1 -0
  23. package/dist/src/cli/commands/encryption.d.ts +4 -0
  24. package/dist/src/cli/commands/encryption.js +261 -0
  25. package/dist/src/cli/commands/encryption.js.map +1 -0
  26. package/dist/src/cli/commands/env.d.ts +2 -0
  27. package/dist/src/cli/commands/env.js +74 -0
  28. package/dist/src/cli/commands/env.js.map +1 -0
  29. package/dist/src/cli/commands/hardening.d.ts +2 -0
  30. package/dist/src/cli/commands/hardening.js +176 -0
  31. package/dist/src/cli/commands/hardening.js.map +1 -0
  32. package/dist/src/cli/commands/index.d.ts +3 -0
  33. package/dist/src/cli/commands/index.js +45 -0
  34. package/dist/src/cli/commands/index.js.map +1 -0
  35. package/dist/src/cli/commands/infra.d.ts +25 -0
  36. package/dist/src/cli/commands/infra.js +85 -0
  37. package/dist/src/cli/commands/infra.js.map +1 -0
  38. package/dist/src/cli/commands/internal-migrate.d.ts +3 -0
  39. package/dist/src/cli/commands/internal-migrate.js +65 -0
  40. package/dist/src/cli/commands/internal-migrate.js.map +1 -0
  41. package/dist/src/cli/commands/lib.d.ts +2 -0
  42. package/dist/src/cli/commands/lib.js +70 -0
  43. package/dist/src/cli/commands/lib.js.map +1 -0
  44. package/dist/src/cli/commands/llm.d.ts +2 -0
  45. package/dist/src/cli/commands/llm.js +46 -0
  46. package/dist/src/cli/commands/llm.js.map +1 -0
  47. package/dist/src/cli/commands/migrate.d.ts +2 -0
  48. package/dist/src/cli/commands/migrate.js +230 -0
  49. package/dist/src/cli/commands/migrate.js.map +1 -0
  50. package/dist/src/cli/commands/new.d.ts +6 -0
  51. package/dist/src/cli/commands/new.js +97 -0
  52. package/dist/src/cli/commands/new.js.map +1 -0
  53. package/dist/src/cli/commands/preset.d.ts +2 -0
  54. package/dist/src/cli/commands/preset.js +47 -0
  55. package/dist/src/cli/commands/preset.js.map +1 -0
  56. package/dist/src/cli/commands/release.d.ts +3 -0
  57. package/dist/src/cli/commands/release.js +83 -0
  58. package/dist/src/cli/commands/release.js.map +1 -0
  59. package/dist/src/cli/commands/shared.d.ts +3 -0
  60. package/dist/src/cli/commands/shared.js +55 -0
  61. package/dist/src/cli/commands/shared.js.map +1 -0
  62. package/dist/src/cli/commands/update.d.ts +11 -0
  63. package/dist/src/cli/commands/update.js +120 -0
  64. package/dist/src/cli/commands/update.js.map +1 -0
  65. package/dist/src/cli/context.d.ts +18 -0
  66. package/dist/src/cli/context.js +66 -0
  67. package/dist/src/cli/context.js.map +1 -0
  68. package/dist/src/cli/exec.d.ts +9 -0
  69. package/dist/src/cli/exec.js +34 -0
  70. package/dist/src/cli/exec.js.map +1 -0
  71. package/dist/src/cli/help.d.ts +1 -0
  72. package/dist/src/cli/help.js +291 -0
  73. package/dist/src/cli/help.js.map +1 -0
  74. package/dist/src/cli/install-source.d.ts +16 -0
  75. package/dist/src/cli/install-source.js +49 -0
  76. package/dist/src/cli/install-source.js.map +1 -0
  77. package/dist/src/cli/launcher.d.ts +32 -0
  78. package/dist/src/cli/launcher.js +168 -0
  79. package/dist/src/cli/launcher.js.map +1 -0
  80. package/dist/src/cli/migrations.d.ts +25 -0
  81. package/dist/src/cli/migrations.js +35 -0
  82. package/dist/src/cli/migrations.js.map +1 -0
  83. package/dist/src/cli/run-tree.d.ts +9 -0
  84. package/dist/src/cli/run-tree.js +32 -0
  85. package/dist/src/cli/run-tree.js.map +1 -0
  86. package/dist/src/cli/types.d.ts +18 -0
  87. package/dist/src/cli/types.js +12 -0
  88. package/dist/src/cli/types.js.map +1 -0
  89. package/dist/src/cli/update-plan.d.ts +15 -0
  90. package/dist/src/cli/update-plan.js +40 -0
  91. package/dist/src/cli/update-plan.js.map +1 -0
  92. package/dist/src/cli/versions.d.ts +26 -0
  93. package/dist/src/cli/versions.js +83 -0
  94. package/dist/src/cli/versions.js.map +1 -0
  95. package/dist/src/executors/build/executor.d.ts +19 -0
  96. package/dist/src/executors/build/executor.js +251 -0
  97. package/dist/src/executors/build/executor.js.map +1 -0
  98. package/dist/src/executors/build/schema.d.ts +42 -0
  99. package/dist/src/executors/build/schema.json +104 -0
  100. package/dist/src/executors/capacitor/executor.d.ts +8 -0
  101. package/dist/src/executors/capacitor/executor.js +45 -0
  102. package/dist/src/executors/capacitor/executor.js.map +1 -0
  103. package/dist/src/executors/capacitor/schema.d.ts +10 -0
  104. package/dist/src/executors/capacitor/schema.json +24 -0
  105. package/dist/src/executors/clean/executor.d.ts +19 -0
  106. package/dist/src/executors/clean/executor.js +134 -0
  107. package/dist/src/executors/clean/executor.js.map +1 -0
  108. package/dist/src/executors/clean/schema.d.ts +6 -0
  109. package/dist/src/executors/clean/schema.json +21 -0
  110. package/dist/src/executors/flutter-build/executor.d.ts +8 -0
  111. package/dist/src/executors/flutter-build/executor.js +70 -0
  112. package/dist/src/executors/flutter-build/executor.js.map +1 -0
  113. package/dist/src/executors/flutter-build/schema.d.ts +10 -0
  114. package/dist/src/executors/flutter-build/schema.json +44 -0
  115. package/dist/src/executors/flutter-export/executor.d.ts +8 -0
  116. package/dist/src/executors/flutter-export/executor.js +36 -0
  117. package/dist/src/executors/flutter-export/executor.js.map +1 -0
  118. package/dist/src/executors/flutter-export/schema.d.ts +6 -0
  119. package/dist/src/executors/flutter-export/schema.json +28 -0
  120. package/dist/src/generators/app/files/angular/.eslintrc.json__template__ +28 -0
  121. package/dist/src/generators/app/files/angular/csp-allowlist.json__template__ +1 -0
  122. package/dist/src/generators/app/files/angular/server/README.md__template__ +31 -0
  123. package/dist/src/generators/app/files/angular/src/app/app-routing.module.ts__template__ +10 -0
  124. package/dist/src/generators/app/files/angular/src/app/app.component.html__template__ +4 -0
  125. package/dist/src/generators/app/files/angular/src/app/app.component.scss__template__ +1 -0
  126. package/dist/src/generators/app/files/angular/src/app/app.component.ts__template__ +9 -0
  127. package/dist/src/generators/app/files/angular/src/app/app.module.ts__template__ +13 -0
  128. package/dist/src/generators/app/files/angular/src/index.html__template__ +12 -0
  129. package/dist/src/generators/app/files/angular/src/main.ts__template__ +16 -0
  130. package/dist/src/generators/app/files/angular/src/styles.scss__template__ +1 -0
  131. package/dist/src/generators/app/files/angular/tsconfig.app.json__template__ +10 -0
  132. package/dist/src/generators/app/files/angular/tsconfig.json__template__ +25 -0
  133. package/dist/src/generators/app/files/angular/tsconfig.spec.json__template__ +8 -0
  134. package/dist/src/generators/app/files/flutter/.gitignore__template__ +10 -0
  135. package/dist/src/generators/app/files/flutter/analysis_options.yaml__template__ +8 -0
  136. package/dist/src/generators/app/files/flutter/lib/main.dart__template__ +23 -0
  137. package/dist/src/generators/app/files/flutter/pubspec.yaml__template__ +26 -0
  138. package/dist/src/generators/app/files/flutter/server/nginx.conf__template__ +35 -0
  139. package/dist/src/generators/app/files/ionic/.gitignore__template__ +7 -0
  140. package/dist/src/generators/app/files/ionic/capacitor.config.ts__template__ +19 -0
  141. package/dist/src/generators/app/files/ionic/package.json__template__ +14 -0
  142. package/dist/src/generators/app/files/ionic/src/app/app.component.html__template__ +3 -0
  143. package/dist/src/generators/app/files/ionic/src/app/app.component.scss__template__ +0 -0
  144. package/dist/src/generators/app/files/ionic/src/app/app.module.ts__template__ +16 -0
  145. package/dist/src/generators/app/files/ionic/src/index.html__template__ +17 -0
  146. package/dist/src/generators/app/files/ionic/src/styles.scss__template__ +12 -0
  147. package/dist/src/generators/app/generator.d.ts +15 -0
  148. package/dist/src/generators/app/generator.js +363 -0
  149. package/dist/src/generators/app/generator.js.map +1 -0
  150. package/dist/src/generators/app/schema.d.ts +19 -0
  151. package/dist/src/generators/app/schema.json +77 -0
  152. package/dist/src/generators/env/generator.d.ts +3 -0
  153. package/dist/src/generators/env/generator.js +454 -0
  154. package/dist/src/generators/env/generator.js.map +1 -0
  155. package/dist/src/generators/env/schema.d.ts +18 -0
  156. package/dist/src/generators/env/schema.json +47 -0
  157. package/dist/src/generators/infra/files/ci/commitlint/commitlint.config.js__template__ +6 -0
  158. package/dist/src/generators/infra/files/ci/common/tools/config/allowed-cycles.json__template__ +1 -0
  159. package/dist/src/generators/infra/files/ci/common/tools/scripts/check-cycles.js__template__ +201 -0
  160. package/dist/src/generators/infra/files/ci/github-actions/.github/workflows/ci.yml__template__ +68 -0
  161. package/dist/src/generators/infra/files/ci/github-actions/.github/workflows/pr-title.yml__template__ +36 -0
  162. package/dist/src/generators/infra/files/ci/jenkins/Jenkinsfile__template__ +45 -0
  163. package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/bug.yml__template__ +39 -0
  164. package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/config.yml__template__ +1 -0
  165. package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/feature.yml__template__ +23 -0
  166. package/dist/src/generators/infra/files/docs/.github/PULL_REQUEST_TEMPLATE.md__template__ +23 -0
  167. package/dist/src/generators/infra/files/docs/CODE_OF_CONDUCT.md__template__ +18 -0
  168. package/dist/src/generators/infra/files/docs/CONTRIBUTING.md__template__ +61 -0
  169. package/dist/src/generators/infra/files/docs/SECURITY.md__template__ +25 -0
  170. package/dist/src/generators/infra/files/quality/.husky/pre-push__template__ +2 -0
  171. package/dist/src/generators/infra/files/quality/.secretlintignore__template__ +7 -0
  172. package/dist/src/generators/infra/files/quality/.secretlintrc.json__template__ +7 -0
  173. package/dist/src/generators/infra/files/quality/knip.json__template__ +9 -0
  174. package/dist/src/generators/infra/files/upgrades/.github/workflows/dependency-upgrade.yml__template__ +80 -0
  175. package/dist/src/generators/infra/generator.d.ts +60 -0
  176. package/dist/src/generators/infra/generator.js +356 -0
  177. package/dist/src/generators/infra/generator.js.map +1 -0
  178. package/dist/src/generators/infra/options.d.ts +28 -0
  179. package/dist/src/generators/infra/options.js +80 -0
  180. package/dist/src/generators/infra/options.js.map +1 -0
  181. package/dist/src/generators/infra/schema.d.ts +19 -0
  182. package/dist/src/generators/infra/schema.json +59 -0
  183. package/dist/src/generators/lib/angular-lib.d.ts +27 -0
  184. package/dist/src/generators/lib/angular-lib.js +85 -0
  185. package/dist/src/generators/lib/angular-lib.js.map +1 -0
  186. package/dist/src/generators/lib/files/angular/component/src/index.ts__template__ +2 -0
  187. package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.html__template__ +1 -0
  188. package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.scss__template__ +3 -0
  189. package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.ts__template__ +9 -0
  190. package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__.module.ts__template__ +11 -0
  191. package/dist/src/generators/lib/files/angular/config/.eslintrc.json__template__ +32 -0
  192. package/dist/src/generators/lib/files/angular/config/tsconfig.json__template__ +22 -0
  193. package/dist/src/generators/lib/files/angular/config/tsconfig.lib.json__template__ +12 -0
  194. package/dist/src/generators/lib/files/assets/README.md__template__ +13 -0
  195. package/dist/src/generators/lib/files/design-tokens/README.md__template__ +90 -0
  196. package/dist/src/generators/lib/files/design-tokens/generated/dart/pubspec.yaml__template__ +11 -0
  197. package/dist/src/generators/lib/files/design-tokens/src/index.ts__template__ +1 -0
  198. package/dist/src/generators/lib/files/design-tokens/style-dictionary.config.js__template__ +41 -0
  199. package/dist/src/generators/lib/files/flutter/.gitignore__template__ +7 -0
  200. package/dist/src/generators/lib/files/flutter/analysis_options.yaml__template__ +6 -0
  201. package/dist/src/generators/lib/files/flutter/lib/__snakeName__.dart__template__ +1 -0
  202. package/dist/src/generators/lib/files/flutter/lib/src/__snakeName__.dart__template__ +6 -0
  203. package/dist/src/generators/lib/files/flutter/pubspec.yaml__template__ +18 -0
  204. package/dist/src/generators/lib/files/flutter/test/__snakeName___test.dart__template__ +8 -0
  205. package/dist/src/generators/lib/files/ionic/src/index.ts__template__ +2 -0
  206. package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.html__template__ +9 -0
  207. package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.scss__template__ +3 -0
  208. package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.ts__template__ +9 -0
  209. package/dist/src/generators/lib/files/ionic/src/lib/__fileName__.module.ts__template__ +12 -0
  210. package/dist/src/generators/lib/files/pii/README.md__template__ +35 -0
  211. package/dist/src/generators/lib/files/pii/src/index.ts__template__ +5 -0
  212. package/dist/src/generators/lib/files/pii/src/lib/pii-mask.directive.ts__template__ +30 -0
  213. package/dist/src/generators/lib/files/pii/src/lib/pii-mask.module.ts__template__ +17 -0
  214. package/dist/src/generators/lib/files/pii/src/lib/pii-mask.options.ts__template__ +6 -0
  215. package/dist/src/generators/lib/files/pii/src/lib/pii-mask.pipe.ts__template__ +14 -0
  216. package/dist/src/generators/lib/files/pii/src/lib/pii-mask.ts__template__ +117 -0
  217. package/dist/src/generators/lib/files/session/README.md__template__ +39 -0
  218. package/dist/src/generators/lib/files/session/src/index.ts__template__ +5 -0
  219. package/dist/src/generators/lib/files/session/src/lib/session-clock.ts__template__ +113 -0
  220. package/dist/src/generators/lib/files/session/src/lib/session-timeout.config.ts__template__ +8 -0
  221. package/dist/src/generators/lib/files/session/src/lib/session-timeout.module.ts__template__ +23 -0
  222. package/dist/src/generators/lib/files/session/src/lib/session-timeout.service.ts__template__ +289 -0
  223. package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.html__template__ +21 -0
  224. package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.scss__template__ +40 -0
  225. package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.ts__template__ +105 -0
  226. package/dist/src/generators/lib/files/state/ngrx/README.md__template__ +33 -0
  227. package/dist/src/generators/lib/files/state/ngrx/src/index.ts__template__ +6 -0
  228. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__-state.module.ts__template__ +18 -0
  229. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.actions.ts__template__ +12 -0
  230. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.effects.ts__template__ +26 -0
  231. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.models.ts__template__ +4 -0
  232. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.reducer.ts__template__ +33 -0
  233. package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.selectors.ts__template__ +14 -0
  234. package/dist/src/generators/lib/files/state/simple-service/README.md__template__ +20 -0
  235. package/dist/src/generators/lib/files/state/simple-service/src/index.ts__template__ +2 -0
  236. package/dist/src/generators/lib/files/state/simple-service/src/lib/__fileName__.store.ts__template__ +58 -0
  237. package/dist/src/generators/lib/files/state/simple-service/src/lib/store.ts__template__ +34 -0
  238. package/dist/src/generators/lib/files/styles/README.md__template__ +39 -0
  239. package/dist/src/generators/lib/files/styles/src/_index.scss__template__ +3 -0
  240. package/dist/src/generators/lib/files/styles/src/mixins/_index.scss__template__ +13 -0
  241. package/dist/src/generators/lib/files/styles/src/themes/_index.scss__template__ +20 -0
  242. package/dist/src/generators/lib/files/styles/src/tokens/_index.scss__template__ +27 -0
  243. package/dist/src/generators/lib/files/ts/config/.eslintrc.json__template__ +10 -0
  244. package/dist/src/generators/lib/files/ts/config/tsconfig.json__template__ +14 -0
  245. package/dist/src/generators/lib/files/ts/config/tsconfig.lib.json__template__ +10 -0
  246. package/dist/src/generators/lib/files/ts/sample/src/index.ts__template__ +1 -0
  247. package/dist/src/generators/lib/files/ts/sample/src/lib/__fileName__.ts__template__ +4 -0
  248. package/dist/src/generators/lib/generator.d.ts +3 -0
  249. package/dist/src/generators/lib/generator.js +53 -0
  250. package/dist/src/generators/lib/generator.js.map +1 -0
  251. package/dist/src/generators/lib/lib-utils.d.ts +72 -0
  252. package/dist/src/generators/lib/lib-utils.js +170 -0
  253. package/dist/src/generators/lib/lib-utils.js.map +1 -0
  254. package/dist/src/generators/lib/schema.d.ts +31 -0
  255. package/dist/src/generators/lib/schema.json +63 -0
  256. package/dist/src/generators/lib/style-dictionary.d.ts +36 -0
  257. package/dist/src/generators/lib/style-dictionary.js +183 -0
  258. package/dist/src/generators/lib/style-dictionary.js.map +1 -0
  259. package/dist/src/generators/lib/types/angular.d.ts +2 -0
  260. package/dist/src/generators/lib/types/angular.js +20 -0
  261. package/dist/src/generators/lib/types/angular.js.map +1 -0
  262. package/dist/src/generators/lib/types/assets.d.ts +2 -0
  263. package/dist/src/generators/lib/types/assets.js +20 -0
  264. package/dist/src/generators/lib/types/assets.js.map +1 -0
  265. package/dist/src/generators/lib/types/design-tokens.d.ts +10 -0
  266. package/dist/src/generators/lib/types/design-tokens.js +78 -0
  267. package/dist/src/generators/lib/types/design-tokens.js.map +1 -0
  268. package/dist/src/generators/lib/types/flutter.d.ts +2 -0
  269. package/dist/src/generators/lib/types/flutter.js +28 -0
  270. package/dist/src/generators/lib/types/flutter.js.map +1 -0
  271. package/dist/src/generators/lib/types/index.d.ts +8 -0
  272. package/dist/src/generators/lib/types/index.js +31 -0
  273. package/dist/src/generators/lib/types/index.js.map +1 -0
  274. package/dist/src/generators/lib/types/ionic.d.ts +4 -0
  275. package/dist/src/generators/lib/types/ionic.js +35 -0
  276. package/dist/src/generators/lib/types/ionic.js.map +1 -0
  277. package/dist/src/generators/lib/types/pii.d.ts +3 -0
  278. package/dist/src/generators/lib/types/pii.js +19 -0
  279. package/dist/src/generators/lib/types/pii.js.map +1 -0
  280. package/dist/src/generators/lib/types/session.d.ts +3 -0
  281. package/dist/src/generators/lib/types/session.js +21 -0
  282. package/dist/src/generators/lib/types/session.js.map +1 -0
  283. package/dist/src/generators/lib/types/state.d.ts +5 -0
  284. package/dist/src/generators/lib/types/state.js +48 -0
  285. package/dist/src/generators/lib/types/state.js.map +1 -0
  286. package/dist/src/generators/lib/types/styles.d.ts +2 -0
  287. package/dist/src/generators/lib/types/styles.js +19 -0
  288. package/dist/src/generators/lib/types/styles.js.map +1 -0
  289. package/dist/src/generators/lib/types/ts.d.ts +5 -0
  290. package/dist/src/generators/lib/types/ts.js +30 -0
  291. package/dist/src/generators/lib/types/ts.js.map +1 -0
  292. package/dist/src/generators/llm/generator.d.ts +8 -0
  293. package/dist/src/generators/llm/generator.js +13 -0
  294. package/dist/src/generators/llm/generator.js.map +1 -0
  295. package/dist/src/generators/llm/schema.d.ts +4 -0
  296. package/dist/src/generators/llm/schema.json +16 -0
  297. package/dist/src/generators/migrate/adapters/angular-cli.d.ts +82 -0
  298. package/dist/src/generators/migrate/adapters/angular-cli.js +439 -0
  299. package/dist/src/generators/migrate/adapters/angular-cli.js.map +1 -0
  300. package/dist/src/generators/migrate/adapters/angular-workspace.d.ts +28 -0
  301. package/dist/src/generators/migrate/adapters/angular-workspace.js +397 -0
  302. package/dist/src/generators/migrate/adapters/angular-workspace.js.map +1 -0
  303. package/dist/src/generators/migrate/adapters/external.d.ts +23 -0
  304. package/dist/src/generators/migrate/adapters/external.js +230 -0
  305. package/dist/src/generators/migrate/adapters/external.js.map +1 -0
  306. package/dist/src/generators/migrate/adapters/flutter.d.ts +26 -0
  307. package/dist/src/generators/migrate/adapters/flutter.js +176 -0
  308. package/dist/src/generators/migrate/adapters/flutter.js.map +1 -0
  309. package/dist/src/generators/migrate/adapters/index.d.ts +34 -0
  310. package/dist/src/generators/migrate/adapters/index.js +136 -0
  311. package/dist/src/generators/migrate/adapters/index.js.map +1 -0
  312. package/dist/src/generators/migrate/adapters/ionic.d.ts +17 -0
  313. package/dist/src/generators/migrate/adapters/ionic.js +137 -0
  314. package/dist/src/generators/migrate/adapters/ionic.js.map +1 -0
  315. package/dist/src/generators/migrate/adapters/npm-workspaces.d.ts +23 -0
  316. package/dist/src/generators/migrate/adapters/npm-workspaces.js +734 -0
  317. package/dist/src/generators/migrate/adapters/npm-workspaces.js.map +1 -0
  318. package/dist/src/generators/migrate/adapters/nx-workspace.d.ts +47 -0
  319. package/dist/src/generators/migrate/adapters/nx-workspace.js +1037 -0
  320. package/dist/src/generators/migrate/adapters/nx-workspace.js.map +1 -0
  321. package/dist/src/generators/migrate/adapters/scaffold.d.ts +2 -0
  322. package/dist/src/generators/migrate/adapters/scaffold.js +200 -0
  323. package/dist/src/generators/migrate/adapters/scaffold.js.map +1 -0
  324. package/dist/src/generators/migrate/adapters/types.d.ts +184 -0
  325. package/dist/src/generators/migrate/adapters/types.js +63 -0
  326. package/dist/src/generators/migrate/adapters/types.js.map +1 -0
  327. package/dist/src/generators/migrate/angular-code-scan.d.ts +6 -0
  328. package/dist/src/generators/migrate/angular-code-scan.js +150 -0
  329. package/dist/src/generators/migrate/angular-code-scan.js.map +1 -0
  330. package/dist/src/generators/migrate/angular-config-files.d.ts +49 -0
  331. package/dist/src/generators/migrate/angular-config-files.js +158 -0
  332. package/dist/src/generators/migrate/angular-config-files.js.map +1 -0
  333. package/dist/src/generators/migrate/angular-project-json.d.ts +73 -0
  334. package/dist/src/generators/migrate/angular-project-json.js +352 -0
  335. package/dist/src/generators/migrate/angular-project-json.js.map +1 -0
  336. package/dist/src/generators/migrate/angular-workspace/aliases.d.ts +30 -0
  337. package/dist/src/generators/migrate/angular-workspace/aliases.js +73 -0
  338. package/dist/src/generators/migrate/angular-workspace/aliases.js.map +1 -0
  339. package/dist/src/generators/migrate/angular-workspace/eslint.d.ts +8 -0
  340. package/dist/src/generators/migrate/angular-workspace/eslint.js +38 -0
  341. package/dist/src/generators/migrate/angular-workspace/eslint.js.map +1 -0
  342. package/dist/src/generators/migrate/angular-workspace/ng-package.d.ts +4 -0
  343. package/dist/src/generators/migrate/angular-workspace/ng-package.js +16 -0
  344. package/dist/src/generators/migrate/angular-workspace/ng-package.js.map +1 -0
  345. package/dist/src/generators/migrate/angular-workspace/source.d.ts +15 -0
  346. package/dist/src/generators/migrate/angular-workspace/source.js +108 -0
  347. package/dist/src/generators/migrate/angular-workspace/source.js.map +1 -0
  348. package/dist/src/generators/migrate/angular17.d.ts +45 -0
  349. package/dist/src/generators/migrate/angular17.js +495 -0
  350. package/dist/src/generators/migrate/angular17.js.map +1 -0
  351. package/dist/src/generators/migrate/batch.d.ts +29 -0
  352. package/dist/src/generators/migrate/batch.js +211 -0
  353. package/dist/src/generators/migrate/batch.js.map +1 -0
  354. package/dist/src/generators/migrate/copy.d.ts +60 -0
  355. package/dist/src/generators/migrate/copy.js +224 -0
  356. package/dist/src/generators/migrate/copy.js.map +1 -0
  357. package/dist/src/generators/migrate/dependencies.d.ts +38 -0
  358. package/dist/src/generators/migrate/dependencies.js +196 -0
  359. package/dist/src/generators/migrate/dependencies.js.map +1 -0
  360. package/dist/src/generators/migrate/generator.d.ts +9 -0
  361. package/dist/src/generators/migrate/generator.js +347 -0
  362. package/dist/src/generators/migrate/generator.js.map +1 -0
  363. package/dist/src/generators/migrate/imports/rewrite.d.ts +46 -0
  364. package/dist/src/generators/migrate/imports/rewrite.js +382 -0
  365. package/dist/src/generators/migrate/imports/rewrite.js.map +1 -0
  366. package/dist/src/generators/migrate/ionic/capacitor-config.d.ts +24 -0
  367. package/dist/src/generators/migrate/ionic/capacitor-config.js +113 -0
  368. package/dist/src/generators/migrate/ionic/capacitor-config.js.map +1 -0
  369. package/dist/src/generators/migrate/ionic/packages.d.ts +34 -0
  370. package/dist/src/generators/migrate/ionic/packages.js +92 -0
  371. package/dist/src/generators/migrate/ionic/packages.js.map +1 -0
  372. package/dist/src/generators/migrate/ionic/shape.d.ts +32 -0
  373. package/dist/src/generators/migrate/ionic/shape.js +221 -0
  374. package/dist/src/generators/migrate/ionic/shape.js.map +1 -0
  375. package/dist/src/generators/migrate/ionic/skip.d.ts +3 -0
  376. package/dist/src/generators/migrate/ionic/skip.js +25 -0
  377. package/dist/src/generators/migrate/ionic/skip.js.map +1 -0
  378. package/dist/src/generators/migrate/names.d.ts +3 -0
  379. package/dist/src/generators/migrate/names.js +21 -0
  380. package/dist/src/generators/migrate/names.js.map +1 -0
  381. package/dist/src/generators/migrate/npm-deps.d.ts +28 -0
  382. package/dist/src/generators/migrate/npm-deps.js +63 -0
  383. package/dist/src/generators/migrate/npm-deps.js.map +1 -0
  384. package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.d.ts +10 -0
  385. package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.js +246 -0
  386. package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.js.map +1 -0
  387. package/dist/src/generators/migrate/npm-workspaces/source.d.ts +46 -0
  388. package/dist/src/generators/migrate/npm-workspaces/source.js +253 -0
  389. package/dist/src/generators/migrate/npm-workspaces/source.js.map +1 -0
  390. package/dist/src/generators/migrate/nx/build-scripts.d.ts +22 -0
  391. package/dist/src/generators/migrate/nx/build-scripts.js +147 -0
  392. package/dist/src/generators/migrate/nx/build-scripts.js.map +1 -0
  393. package/dist/src/generators/migrate/nx/detect.d.ts +3 -0
  394. package/dist/src/generators/migrate/nx/detect.js +43 -0
  395. package/dist/src/generators/migrate/nx/detect.js.map +1 -0
  396. package/dist/src/generators/migrate/nx/env-encryption.d.ts +35 -0
  397. package/dist/src/generators/migrate/nx/env-encryption.js +423 -0
  398. package/dist/src/generators/migrate/nx/env-encryption.js.map +1 -0
  399. package/dist/src/generators/migrate/nx/rewrite.d.ts +27 -0
  400. package/dist/src/generators/migrate/nx/rewrite.js +223 -0
  401. package/dist/src/generators/migrate/nx/rewrite.js.map +1 -0
  402. package/dist/src/generators/migrate/nx/selection.d.ts +25 -0
  403. package/dist/src/generators/migrate/nx/selection.js +173 -0
  404. package/dist/src/generators/migrate/nx/selection.js.map +1 -0
  405. package/dist/src/generators/migrate/nx/shared-folders.d.ts +58 -0
  406. package/dist/src/generators/migrate/nx/shared-folders.js +239 -0
  407. package/dist/src/generators/migrate/nx/shared-folders.js.map +1 -0
  408. package/dist/src/generators/migrate/nx/workspace-source.d.ts +58 -0
  409. package/dist/src/generators/migrate/nx/workspace-source.js +275 -0
  410. package/dist/src/generators/migrate/nx/workspace-source.js.map +1 -0
  411. package/dist/src/generators/migrate/pnpm.d.ts +42 -0
  412. package/dist/src/generators/migrate/pnpm.js +132 -0
  413. package/dist/src/generators/migrate/pnpm.js.map +1 -0
  414. package/dist/src/generators/migrate/report.d.ts +21 -0
  415. package/dist/src/generators/migrate/report.js +243 -0
  416. package/dist/src/generators/migrate/report.js.map +1 -0
  417. package/dist/src/generators/migrate/rollback/manifest.d.ts +84 -0
  418. package/dist/src/generators/migrate/rollback/manifest.js +162 -0
  419. package/dist/src/generators/migrate/rollback/manifest.js.map +1 -0
  420. package/dist/src/generators/migrate/rollback/recording-tree.d.ts +19 -0
  421. package/dist/src/generators/migrate/rollback/recording-tree.js +87 -0
  422. package/dist/src/generators/migrate/rollback/recording-tree.js.map +1 -0
  423. package/dist/src/generators/migrate/rollback/rollback.d.ts +29 -0
  424. package/dist/src/generators/migrate/rollback/rollback.js +271 -0
  425. package/dist/src/generators/migrate/rollback/rollback.js.map +1 -0
  426. package/dist/src/generators/migrate/schema.d.ts +41 -0
  427. package/dist/src/generators/migrate/schema.json +85 -0
  428. package/dist/src/generators/migrate/source.d.ts +26 -0
  429. package/dist/src/generators/migrate/source.js +70 -0
  430. package/dist/src/generators/migrate/source.js.map +1 -0
  431. package/dist/src/generators/preset/files/root/.editorconfig__template__ +15 -0
  432. package/dist/src/generators/preset/files/root/.eslintignore__template__ +2 -0
  433. package/dist/src/generators/preset/files/root/.eslintrc.json__template__ +38 -0
  434. package/dist/src/generators/preset/files/root/.gitattributes__template__ +12 -0
  435. package/dist/src/generators/preset/files/root/.gitignore__template__ +9 -0
  436. package/dist/src/generators/preset/files/root/.husky/commit-msg__template__ +1 -0
  437. package/dist/src/generators/preset/files/root/.husky/pre-commit__template__ +1 -0
  438. package/dist/src/generators/preset/files/root/.npmrc__template__ +4 -0
  439. package/dist/src/generators/preset/files/root/.nvmrc__template__ +1 -0
  440. package/dist/src/generators/preset/files/root/.prettierignore__template__ +6 -0
  441. package/dist/src/generators/preset/files/root/.prettierrc__template__ +7 -0
  442. package/dist/src/generators/preset/files/root/commitlint.config.js__template__ +6 -0
  443. package/dist/src/generators/preset/files/root/nx.json__template__ +30 -0
  444. package/dist/src/generators/preset/files/root/package.json__template__ +34 -0
  445. package/dist/src/generators/preset/files/root/tools/config/sri-cdn-allowlist.json__template__ +1 -0
  446. package/dist/src/generators/preset/files/root/tsconfig.base.json__template__ +18 -0
  447. package/dist/src/generators/preset/generator.d.ts +11 -0
  448. package/dist/src/generators/preset/generator.js +91 -0
  449. package/dist/src/generators/preset/generator.js.map +1 -0
  450. package/dist/src/generators/preset/schema.d.ts +20 -0
  451. package/dist/src/generators/preset/schema.json +86 -0
  452. package/dist/src/generators/shared-libs/generator.d.ts +4 -0
  453. package/dist/src/generators/shared-libs/generator.js +60 -0
  454. package/dist/src/generators/shared-libs/generator.js.map +1 -0
  455. package/dist/src/generators/shared-libs/schema.d.ts +6 -0
  456. package/dist/src/generators/shared-libs/schema.json +21 -0
  457. package/dist/src/index.d.ts +16 -0
  458. package/dist/src/index.js +20 -0
  459. package/dist/src/index.js.map +1 -0
  460. package/dist/src/lib/csp/allowlist.d.ts +64 -0
  461. package/dist/src/lib/csp/allowlist.js +126 -0
  462. package/dist/src/lib/csp/allowlist.js.map +1 -0
  463. package/dist/src/lib/csp/import.d.ts +52 -0
  464. package/dist/src/lib/csp/import.js +291 -0
  465. package/dist/src/lib/csp/import.js.map +1 -0
  466. package/dist/src/lib/csp/render.d.ts +19 -0
  467. package/dist/src/lib/csp/render.js +116 -0
  468. package/dist/src/lib/csp/render.js.map +1 -0
  469. package/dist/src/lib/env/derive.d.ts +38 -0
  470. package/dist/src/lib/env/derive.js +115 -0
  471. package/dist/src/lib/env/derive.js.map +1 -0
  472. package/dist/src/lib/env-encryption/backup.d.ts +40 -0
  473. package/dist/src/lib/env-encryption/backup.js +234 -0
  474. package/dist/src/lib/env-encryption/backup.js.map +1 -0
  475. package/dist/src/lib/env-encryption/config.d.ts +50 -0
  476. package/dist/src/lib/env-encryption/config.js +173 -0
  477. package/dist/src/lib/env-encryption/config.js.map +1 -0
  478. package/dist/src/lib/env-encryption/domains.d.ts +9 -0
  479. package/dist/src/lib/env-encryption/domains.js +52 -0
  480. package/dist/src/lib/env-encryption/domains.js.map +1 -0
  481. package/dist/src/lib/env-encryption/encrypt.d.ts +48 -0
  482. package/dist/src/lib/env-encryption/encrypt.js +407 -0
  483. package/dist/src/lib/env-encryption/encrypt.js.map +1 -0
  484. package/dist/src/lib/env-encryption/env-file.d.ts +72 -0
  485. package/dist/src/lib/env-encryption/env-file.js +395 -0
  486. package/dist/src/lib/env-encryption/env-file.js.map +1 -0
  487. package/dist/src/lib/env-encryption/gcm.d.ts +51 -0
  488. package/dist/src/lib/env-encryption/gcm.js +76 -0
  489. package/dist/src/lib/env-encryption/gcm.js.map +1 -0
  490. package/dist/src/lib/env-encryption/key-material.d.ts +53 -0
  491. package/dist/src/lib/env-encryption/key-material.js +148 -0
  492. package/dist/src/lib/env-encryption/key-material.js.map +1 -0
  493. package/dist/src/lib/env-encryption/placeholders.d.ts +15 -0
  494. package/dist/src/lib/env-encryption/placeholders.js +93 -0
  495. package/dist/src/lib/env-encryption/placeholders.js.map +1 -0
  496. package/dist/src/lib/env-encryption/prepare.d.ts +43 -0
  497. package/dist/src/lib/env-encryption/prepare.js +245 -0
  498. package/dist/src/lib/env-encryption/prepare.js.map +1 -0
  499. package/dist/src/lib/env-encryption/sensitive.d.ts +2 -0
  500. package/dist/src/lib/env-encryption/sensitive.js +180 -0
  501. package/dist/src/lib/env-encryption/sensitive.js.map +1 -0
  502. package/dist/src/lib/env-encryption/stamp.d.ts +2 -0
  503. package/dist/src/lib/env-encryption/stamp.js +52 -0
  504. package/dist/src/lib/env-encryption/stamp.js.map +1 -0
  505. package/dist/src/lib/env-encryption/switch-gcm.d.ts +43 -0
  506. package/dist/src/lib/env-encryption/switch-gcm.js +371 -0
  507. package/dist/src/lib/env-encryption/switch-gcm.js.map +1 -0
  508. package/dist/src/lib/env-encryption/workspace.d.ts +10 -0
  509. package/dist/src/lib/env-encryption/workspace.js +48 -0
  510. package/dist/src/lib/env-encryption/workspace.js.map +1 -0
  511. package/dist/src/lib/hardening/files.d.ts +17 -0
  512. package/dist/src/lib/hardening/files.js +43 -0
  513. package/dist/src/lib/hardening/files.js.map +1 -0
  514. package/dist/src/lib/hardening/integrity.d.ts +24 -0
  515. package/dist/src/lib/hardening/integrity.js +112 -0
  516. package/dist/src/lib/hardening/integrity.js.map +1 -0
  517. package/dist/src/lib/hardening/leak-check.d.ts +15 -0
  518. package/dist/src/lib/hardening/leak-check.js +100 -0
  519. package/dist/src/lib/hardening/leak-check.js.map +1 -0
  520. package/dist/src/lib/hardening/ngsw.d.ts +7 -0
  521. package/dist/src/lib/hardening/ngsw.js +55 -0
  522. package/dist/src/lib/hardening/ngsw.js.map +1 -0
  523. package/dist/src/lib/hardening/obfuscate.d.ts +36 -0
  524. package/dist/src/lib/hardening/obfuscate.js +153 -0
  525. package/dist/src/lib/hardening/obfuscate.js.map +1 -0
  526. package/dist/src/lib/hardening/options.d.ts +36 -0
  527. package/dist/src/lib/hardening/options.js +143 -0
  528. package/dist/src/lib/hardening/options.js.map +1 -0
  529. package/dist/src/lib/hardening/source-maps.d.ts +7 -0
  530. package/dist/src/lib/hardening/source-maps.js +37 -0
  531. package/dist/src/lib/hardening/source-maps.js.map +1 -0
  532. package/dist/src/lib/hardening/strip.d.ts +55 -0
  533. package/dist/src/lib/hardening/strip.js +178 -0
  534. package/dist/src/lib/hardening/strip.js.map +1 -0
  535. package/dist/src/lib/helpers/encrypt-env.d.ts +13 -0
  536. package/dist/src/lib/helpers/encrypt-env.js +33 -0
  537. package/dist/src/lib/helpers/encrypt-env.js.map +1 -0
  538. package/dist/src/lib/helpers/inject-meta.d.ts +14 -0
  539. package/dist/src/lib/helpers/inject-meta.js +49 -0
  540. package/dist/src/lib/helpers/inject-meta.js.map +1 -0
  541. package/dist/src/lib/helpers/inject-nonce.d.ts +7 -0
  542. package/dist/src/lib/helpers/inject-nonce.js +59 -0
  543. package/dist/src/lib/helpers/inject-nonce.js.map +1 -0
  544. package/dist/src/lib/helpers/inject-sri.d.ts +11 -0
  545. package/dist/src/lib/helpers/inject-sri.js +92 -0
  546. package/dist/src/lib/helpers/inject-sri.js.map +1 -0
  547. package/dist/src/lib/helpers/strip-exif.d.ts +9 -0
  548. package/dist/src/lib/helpers/strip-exif.js +52 -0
  549. package/dist/src/lib/helpers/strip-exif.js.map +1 -0
  550. package/dist/src/lib/release/plan.d.ts +45 -0
  551. package/dist/src/lib/release/plan.js +76 -0
  552. package/dist/src/lib/release/plan.js.map +1 -0
  553. package/dist/src/lib/release/run.d.ts +46 -0
  554. package/dist/src/lib/release/run.js +160 -0
  555. package/dist/src/lib/release/run.js.map +1 -0
  556. package/dist/src/lib/utils/angular-deps.d.ts +22 -0
  557. package/dist/src/lib/utils/angular-deps.js +108 -0
  558. package/dist/src/lib/utils/angular-deps.js.map +1 -0
  559. package/dist/src/lib/utils/angular-project.d.ts +52 -0
  560. package/dist/src/lib/utils/angular-project.js +168 -0
  561. package/dist/src/lib/utils/angular-project.js.map +1 -0
  562. package/dist/src/lib/utils/app-dir.d.ts +17 -0
  563. package/dist/src/lib/utils/app-dir.js +52 -0
  564. package/dist/src/lib/utils/app-dir.js.map +1 -0
  565. package/dist/src/lib/utils/base-href.d.ts +26 -0
  566. package/dist/src/lib/utils/base-href.js +60 -0
  567. package/dist/src/lib/utils/base-href.js.map +1 -0
  568. package/dist/src/lib/utils/ci-resolve.d.ts +10 -0
  569. package/dist/src/lib/utils/ci-resolve.js +50 -0
  570. package/dist/src/lib/utils/ci-resolve.js.map +1 -0
  571. package/dist/src/lib/utils/csp-nonce.d.ts +34 -0
  572. package/dist/src/lib/utils/csp-nonce.js +142 -0
  573. package/dist/src/lib/utils/csp-nonce.js.map +1 -0
  574. package/dist/src/lib/utils/dependencies.d.ts +25 -0
  575. package/dist/src/lib/utils/dependencies.js +71 -0
  576. package/dist/src/lib/utils/dependencies.js.map +1 -0
  577. package/dist/src/lib/utils/devkit-deps.d.ts +19 -0
  578. package/dist/src/lib/utils/devkit-deps.js +34 -0
  579. package/dist/src/lib/utils/devkit-deps.js.map +1 -0
  580. package/dist/src/lib/utils/env-files.d.ts +18 -0
  581. package/dist/src/lib/utils/env-files.js +41 -0
  582. package/dist/src/lib/utils/env-files.js.map +1 -0
  583. package/dist/src/lib/utils/filesystem.d.ts +7 -0
  584. package/dist/src/lib/utils/filesystem.js +20 -0
  585. package/dist/src/lib/utils/filesystem.js.map +1 -0
  586. package/dist/src/lib/utils/flutter-web.d.ts +7 -0
  587. package/dist/src/lib/utils/flutter-web.js +56 -0
  588. package/dist/src/lib/utils/flutter-web.js.map +1 -0
  589. package/dist/src/lib/utils/knip.d.ts +16 -0
  590. package/dist/src/lib/utils/knip.js +71 -0
  591. package/dist/src/lib/utils/knip.js.map +1 -0
  592. package/dist/src/lib/utils/lint-staged.d.ts +5 -0
  593. package/dist/src/lib/utils/lint-staged.js +34 -0
  594. package/dist/src/lib/utils/lint-staged.js.map +1 -0
  595. package/dist/src/lib/utils/llm-block.d.ts +88 -0
  596. package/dist/src/lib/utils/llm-block.js +457 -0
  597. package/dist/src/lib/utils/llm-block.js.map +1 -0
  598. package/dist/src/lib/utils/node-engine.d.ts +9 -0
  599. package/dist/src/lib/utils/node-engine.js +63 -0
  600. package/dist/src/lib/utils/node-engine.js.map +1 -0
  601. package/dist/src/lib/utils/npm-scripts.d.ts +7 -0
  602. package/dist/src/lib/utils/npm-scripts.js +28 -0
  603. package/dist/src/lib/utils/npm-scripts.js.map +1 -0
  604. package/dist/src/lib/utils/nx-targets.d.ts +3 -0
  605. package/dist/src/lib/utils/nx-targets.js +25 -0
  606. package/dist/src/lib/utils/nx-targets.js.map +1 -0
  607. package/dist/src/lib/utils/project-json-files.d.ts +23 -0
  608. package/dist/src/lib/utils/project-json-files.js +73 -0
  609. package/dist/src/lib/utils/project-json-files.js.map +1 -0
  610. package/dist/src/lib/utils/quality.d.ts +71 -0
  611. package/dist/src/lib/utils/quality.js +295 -0
  612. package/dist/src/lib/utils/quality.js.map +1 -0
  613. package/dist/src/lib/utils/serve-port.d.ts +28 -0
  614. package/dist/src/lib/utils/serve-port.js +73 -0
  615. package/dist/src/lib/utils/serve-port.js.map +1 -0
  616. package/dist/src/lib/utils/shared-libs.d.ts +37 -0
  617. package/dist/src/lib/utils/shared-libs.js +152 -0
  618. package/dist/src/lib/utils/shared-libs.js.map +1 -0
  619. package/dist/src/lib/utils/ts-paths.d.ts +3 -0
  620. package/dist/src/lib/utils/ts-paths.js +31 -0
  621. package/dist/src/lib/utils/ts-paths.js.map +1 -0
  622. package/dist/src/lib/utils/workspace.d.ts +3 -0
  623. package/dist/src/lib/utils/workspace.js +15 -0
  624. package/dist/src/lib/utils/workspace.js.map +1 -0
  625. package/dist/src/migrate-sdk.d.ts +31 -0
  626. package/dist/src/migrate-sdk.js +35 -0
  627. package/dist/src/migrate-sdk.js.map +1 -0
  628. package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.d.ts +2 -0
  629. package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.js +40 -0
  630. package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.js.map +1 -0
  631. package/dist/src/migrations/add-executor-peers/add-executor-peers.d.ts +6 -0
  632. package/dist/src/migrations/add-executor-peers/add-executor-peers.js +21 -0
  633. package/dist/src/migrations/add-executor-peers/add-executor-peers.js.map +1 -0
  634. package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.d.ts +7 -0
  635. package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.js +47 -0
  636. package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.js.map +1 -0
  637. package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.d.ts +6 -0
  638. package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.js +27 -0
  639. package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.js.map +1 -0
  640. package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.d.ts +7 -0
  641. package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.js +22 -0
  642. package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.js.map +1 -0
  643. package/dist/src/migrations/angular-release-target/angular-release-target.d.ts +3 -0
  644. package/dist/src/migrations/angular-release-target/angular-release-target.js +80 -0
  645. package/dist/src/migrations/angular-release-target/angular-release-target.js.map +1 -0
  646. package/dist/src/migrations/app-clean-and-port/app-clean-and-port.d.ts +7 -0
  647. package/dist/src/migrations/app-clean-and-port/app-clean-and-port.js +89 -0
  648. package/dist/src/migrations/app-clean-and-port/app-clean-and-port.js.map +1 -0
  649. package/dist/src/migrations/env-encryption-config/env-encryption-config.d.ts +7 -0
  650. package/dist/src/migrations/env-encryption-config/env-encryption-config.js +42 -0
  651. package/dist/src/migrations/env-encryption-config/env-encryption-config.js.map +1 -0
  652. package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.d.ts +3 -0
  653. package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.js +15 -0
  654. package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.js.map +1 -0
  655. package/dist/src/migrations/fix-lint-script/fix-lint-script.d.ts +7 -0
  656. package/dist/src/migrations/fix-lint-script/fix-lint-script.js +27 -0
  657. package/dist/src/migrations/fix-lint-script/fix-lint-script.js.map +1 -0
  658. package/dist/src/migrations/flutter-web-platform/flutter-web-platform.d.ts +8 -0
  659. package/dist/src/migrations/flutter-web-platform/flutter-web-platform.js +35 -0
  660. package/dist/src/migrations/flutter-web-platform/flutter-web-platform.js.map +1 -0
  661. package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.d.ts +9 -0
  662. package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.js +42 -0
  663. package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.js.map +1 -0
  664. package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.d.ts +8 -0
  665. package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.js +30 -0
  666. package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.js.map +1 -0
  667. package/dist/src/migrations/quality-checks/quality-checks.d.ts +7 -0
  668. package/dist/src/migrations/quality-checks/quality-checks.js +46 -0
  669. package/dist/src/migrations/quality-checks/quality-checks.js.map +1 -0
  670. package/dist/src/migrations/release-hardening/release-hardening.d.ts +8 -0
  671. package/dist/src/migrations/release-hardening/release-hardening.js +98 -0
  672. package/dist/src/migrations/release-hardening/release-hardening.js.map +1 -0
  673. package/dist/src/migrations/sharp-security-update/sharp-security-update.d.ts +10 -0
  674. package/dist/src/migrations/sharp-security-update/sharp-security-update.js +40 -0
  675. package/dist/src/migrations/sharp-security-update/sharp-security-update.js.map +1 -0
  676. package/migrate/package.json +5 -0
  677. package/package.json +120 -4
  678. package/runtime/csp-nonce.js +109 -0
  679. package/runtime/env-secret.d.ts +63 -0
  680. package/runtime/env-secret.mjs +698 -0
@@ -0,0 +1,7 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.35.0: apps get a `clean` target when they have none, and apps whose dev servers fall back to
4
+ * port 4200 get distinct ports: the first by name keeps 4200 unless another app sets it
5
+ * explicitly; explicit ports (numbers or numeric strings) are kept.
6
+ */
7
+ export default function appCleanAndPort(tree: Tree): Promise<void>;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const executor_1 = require("../../executors/clean/executor");
5
+ const angular_project_1 = require("../../lib/utils/angular-project");
6
+ const project_json_files_1 = require("../../lib/utils/project-json-files");
7
+ const serve_port_1 = require("../../lib/utils/serve-port");
8
+ const shared_libs_1 = require("../../lib/utils/shared-libs");
9
+ /**
10
+ * v0.35.0: apps get a `clean` target when they have none, and apps whose dev servers fall back to
11
+ * port 4200 get distinct ports: the first by name keeps 4200 unless another app sets it
12
+ * explicitly; explicit ports (numbers or numeric strings) are kept.
13
+ */
14
+ async function appCleanAndPort(tree) {
15
+ let projects;
16
+ try {
17
+ projects = (0, project_json_files_1.readProjects)(tree);
18
+ }
19
+ catch (err) {
20
+ devkit_1.logger.warn(`app-clean-and-port: skipped (${err.message}).`);
21
+ return;
22
+ }
23
+ const apps = projects
24
+ .filter((p) => p.json['projectType'] === 'application' && (0, serve_port_1.serveTargetOf)(p.json))
25
+ .sort((a, b) => a.name.localeCompare(b.name));
26
+ const cleaned = [];
27
+ const skipped = [];
28
+ const ported = [];
29
+ const touched = new Set();
30
+ for (const app of apps) {
31
+ const targets = (app.json['targets'] ?? {});
32
+ if (targets['clean'])
33
+ continue;
34
+ const serve = (0, serve_port_1.serveTargetOf)(app.json);
35
+ const flutter = serve.executor === '@mouryaamit/nx-polystack:flutter-build';
36
+ const build = flutter ? undefined : (0, shared_libs_1.angularBuildTargetOf)(app.json);
37
+ const outputPath = build?.options?.['outputPath'];
38
+ let outputs;
39
+ if (typeof outputPath === 'string' && outputPath.trim() !== '') {
40
+ const out = outputPath.trim().replace(/\/+$/, '');
41
+ if ((0, executor_1.cleanPathProblem)(out, app.root) === null)
42
+ outputs = [out];
43
+ else
44
+ skipped.push(`${app.name} (${out})`);
45
+ }
46
+ const target = (0, angular_project_1.cleanTarget)(app.root, { flutter, outputs, name: app.name });
47
+ target.options.paths = target.options.paths.filter((p) => (0, executor_1.cleanPathProblem)(p, app.root) === null);
48
+ targets['clean'] = target;
49
+ app.json['targets'] = targets;
50
+ cleaned.push(app.name);
51
+ touched.add(app.name);
52
+ }
53
+ const portOfApp = (a) => (0, serve_port_1.explicitPort)((0, serve_port_1.serveTargetOf)(a.json));
54
+ const used = apps.map(portOfApp).filter((p) => p !== undefined);
55
+ let first = true;
56
+ for (const app of apps.filter((a) => portOfApp(a) === undefined)) {
57
+ if (first && !used.includes(serve_port_1.DEFAULT_SERVE_PORT)) {
58
+ used.push(serve_port_1.DEFAULT_SERVE_PORT);
59
+ first = false;
60
+ continue;
61
+ }
62
+ first = false;
63
+ const port = (0, serve_port_1.nextFreePort)(used);
64
+ used.push(port);
65
+ const serve = (0, serve_port_1.serveTargetOf)(app.json);
66
+ serve.options = { ...(serve.options ?? {}), port };
67
+ ported.push(`${app.name} → ${port}`);
68
+ touched.add(app.name);
69
+ }
70
+ for (const app of apps) {
71
+ if (!touched.has(app.name))
72
+ continue;
73
+ tree.write(`${app.root}/project.json`, JSON.stringify(app.json, null, 2) + '\n');
74
+ }
75
+ if (cleaned.length > 0) {
76
+ devkit_1.logger.info(`app-clean-and-port: clean target added to ${cleaned.join(', ')}.`);
77
+ }
78
+ if (skipped.length > 0) {
79
+ devkit_1.logger.info('app-clean-and-port: build outputs left out of clean (not below dist/, coverage/ or tmp/, ' +
80
+ `nor an output folder of the project): ${skipped.join(', ')}.`);
81
+ }
82
+ if (ported.length > 0) {
83
+ devkit_1.logger.info(`app-clean-and-port: these apps served on 4200; dev-server ports set: ${ported.join(', ')}. ` + 'Update local OAuth redirect URIs or CORS allowlists that name localhost:4200.');
84
+ }
85
+ if (touched.size > 0)
86
+ await (0, devkit_1.formatFiles)(tree);
87
+ }
88
+ exports.default = appCleanAndPort;
89
+ //# sourceMappingURL=app-clean-and-port.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-clean-and-port.js","sourceRoot":"","sources":["../../../../src/migrations/app-clean-and-port/app-clean-and-port.ts"],"names":[],"mappings":";;AAAA,uCAAuD;AAEvD,6DAAkE;AAClE,qEAA8D;AAC9D,2EAAkE;AAClE,2DAKoC;AACpC,6DAAmE;AAInE;;;;GAIG;AACY,KAAK,UAAU,eAAe,CAAC,IAAU;IACtD,IAAI,QAAQ,CAAC;IACb,IAAI;QACF,QAAQ,GAAG,IAAA,iCAAY,EAAC,IAAI,CAAC,CAAC;KAC/B;IAAC,OAAO,GAAG,EAAE;QACZ,eAAM,CAAC,IAAI,CAAC,gCAAiC,GAAa,CAAC,OAAO,IAAI,CAAC,CAAC;QACxE,OAAO;KACR;IACD,MAAM,IAAI,GAAG,QAAQ;SAClB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,aAAa,IAAI,IAAA,0BAAa,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SAC/E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAElC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAA2B,CAAC;QACtE,IAAI,OAAO,CAAC,OAAO,CAAC;YAAE,SAAS;QAC/B,MAAM,KAAK,GAAG,IAAA,0BAAa,EAAC,GAAG,CAAC,IAAI,CAAW,CAAC;QAChD,MAAM,OAAO,GAAG,K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AAK,CAAC,GAAG,GAAG,CAAC,IAAI,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;KAClF;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,eAAM,CAAC,IAAI,CAAC,6CAA6C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACjF;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,eAAM,CAAC,IAAI,CACT,2FAA2F;YACzF,yCAAyC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACjE,CAAC;KACH;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,eAAM,CAAC,IAAI,CACT,wEAAwE,MAAM,CAAC,IAAI,CACjF,IAAI,CACL,IAAI,GAAG,+EAA+E,CACxF,CAAC;KACH;IACD,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC;QAAE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AA/ED,kCA+EC"}
@@ -0,0 +1,7 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.25.0: env encryption settings move into nx.json (`pstack.envEncryption`, mode "listed" with
4
+ * the keys of tools/config/encrypt-keys.json, which is removed), and `.env.local` is ignored.
5
+ * Builds encrypt the same fields as before.
6
+ */
7
+ export default function envEncryptionConfig(tree: Tree): void;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const config_1 = require("../../lib/env-encryption/config");
5
+ const workspace_1 = require("../../lib/env-encryption/workspace");
6
+ /**
7
+ * v0.25.0: env encryption settings move into nx.json (`pstack.envEncryption`, mode "listed" with
8
+ * the keys of tools/config/encrypt-keys.json, which is removed), and `.env.local` is ignored.
9
+ * Builds encrypt the same fields as before.
10
+ */
11
+ function envEncryptionConfig(tree) {
12
+ if (!tree.exists('nx.json'))
13
+ return;
14
+ const notes = [];
15
+ if ((0, workspace_1.readEnvEncryptionBlock)(tree) === undefined) {
16
+ const cfg = (0, workspace_1.initialEnvEncryption)(tree);
17
+ if (tree.exists(config_1.LEGACY_KEYS_FILE)) {
18
+ let valid = true;
19
+ try {
20
+ (0, config_1.keysFromLegacy)((0, devkit_1.readJson)(tree, config_1.LEGACY_KEYS_FILE));
21
+ }
22
+ catch {
23
+ valid = false;
24
+ }
25
+ if (valid) {
26
+ tree.delete(config_1.LEGACY_KEYS_FILE);
27
+ notes.push(`moved the keys of ${config_1.LEGACY_KEYS_FILE} into nx.json and removed it`);
28
+ }
29
+ else {
30
+ notes.push(`${config_1.LEGACY_KEYS_FILE} could not be read; it was kept, default keys were written`);
31
+ }
32
+ }
33
+ (0, workspace_1.writeEnvEncryptionBlock)(tree, cfg);
34
+ notes.push('nx.json pstack.envEncryption written (mode "listed")');
35
+ }
36
+ if ((0, workspace_1.ignoreDotEnvLocal)(tree))
37
+ notes.push('.env.local added to .gitignore');
38
+ if (notes.length > 0)
39
+ devkit_1.logger.info(`env-encryption-config: ${notes.join('; ')}.`);
40
+ }
41
+ exports.default = envEncryptionConfig;
42
+ //# sourceMappingURL=env-encryption-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-encryption-config.js","sourceRoot":"","sources":["../../../../src/migrations/env-encryption-config/env-encryption-config.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,4DAAmF;AACnF,kEAK4C;AAE5C;;;;GAIG;AACH,SAAwB,mBAAmB,CAAC,IAAU;IACpD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAAE,OAAO;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,IAAA,kCAAsB,EAAC,IAAI,CAAC,KAAK,SAAS,EAAE;QAC9C,MAAM,GAAG,GAAG,IAAA,gCAAoB,EAAC,IAAI,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,MAAM,CAAC,yBAAgB,CAAC,EAAE;YACjC,IAAI,KAAK,GAAG,IAAI,CAAC;YACjB,IAAI;gBACF,IAAA,uBAAc,EAAC,IAAA,iBAAQ,EAAC,IAAI,EAAE,yBAAgB,CAAC,CAAC,CAAC;aAClD;YAAC,MAAM;gBACN,KAAK,GAAG,KAAK,CAAC;aACf;YACD,IAAI,KAAK,EAAE;gBACT,IAAI,CAAC,MAAM,CAAC,yBAAgB,CAAC,CAAC;gBAC9B,KAAK,CAAC,IAAI,CAAC,qBAAqB,yBAAgB,8BAA8B,CAAC,CAAC;aACjF;iBAAM;gBACL,KAAK,CAAC,IAAI,CAAC,GAAG,yBAAgB,4DAA4D,CAAC,CAAC;aAC7F;SACF;QACD,IAAA,mCAAuB,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;KACpE;IACD,IAAI,IAAA,6BAAiB,EAAC,IAAI,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAC1E,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,eAAM,CAAC,IAAI,CAAC,0BAA0B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnF,CAAC;AAxBD,sCAwBC"}
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /** v0.28.0: `pstack.envEncryption.keySource` becomes `keySources` (aes-gcm key factors). */
3
+ export default function envEncryptionKeySources(tree: Tree): void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const config_1 = require("../../lib/env-encryption/config");
5
+ const workspace_1 = require("../../lib/env-encryption/workspace");
6
+ /** v0.28.0: `pstack.envEncryption.keySource` becomes `keySources` (aes-gcm key factors). */
7
+ function envEncryptionKeySources(tree) {
8
+ const raw = (0, workspace_1.readEnvEncryptionBlock)(tree);
9
+ if (!raw || typeof raw !== 'object' || !('keySource' in raw))
10
+ return;
11
+ (0, workspace_1.writeEnvEncryptionBlock)(tree, (0, config_1.normalizeEnvEncryption)(raw));
12
+ devkit_1.logger.info('env-encryption-key-sources: nx.json pstack.envEncryption.keySource → keySources.');
13
+ }
14
+ exports.default = envEncryptionKeySources;
15
+ //# sourceMappingURL=env-encryption-key-sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-encryption-key-sources.js","sourceRoot":"","sources":["../../../../src/migrations/env-encryption-key-sources/env-encryption-key-sources.ts"],"names":[],"mappings":";;AAAA,uCAA0C;AAE1C,4DAAyE;AACzE,kEAG4C;AAE5C,4FAA4F;AAC5F,SAAwB,uBAAuB,CAAC,IAAU;IACxD,MAAM,GAAG,GAAG,IAAA,kCAAsB,EAAC,IAAI,CAAwC,CAAC;IAChF,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,GAAG,CAAC;QAAE,OAAO;IACrE,IAAA,mCAAuB,EAAC,IAAI,EAAE,IAAA,+BAAsB,EAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,eAAM,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;AAClG,CAAC;AALD,0CAKC"}
@@ -0,0 +1,7 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.8.0: `pstack new` wrote `"lint": "npm run lint"` (and `"lint:fix": "npm run lint --fix"`) into
4
+ * the workspace package.json, so `npm run lint` called itself forever. Replaces only an exactly
5
+ * self-calling `lint` script (and `lint:fix` with it) with `nx run-many -t lint`; any other lint script is left alone.
6
+ */
7
+ export default function fixLintScript(tree: Tree): Promise<void>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const generator_1 = require("../../generators/preset/generator");
5
+ /**
6
+ * v0.8.0: `pstack new` wrote `"lint": "npm run lint"` (and `"lint:fix": "npm run lint --fix"`) into
7
+ * the workspace package.json, so `npm run lint` called itself forever. Replaces only an exactly
8
+ * self-calling `lint` script (and `lint:fix` with it) with `nx run-many -t lint`; any other lint script is left alone.
9
+ */
10
+ async function fixLintScript(tree) {
11
+ if (!tree.exists('package.json'))
12
+ return;
13
+ const scripts = (0, devkit_1.readJson)(tree, 'package.json').scripts ?? {};
14
+ const fixLint = typeof scripts.lint === 'string' && (0, generator_1.isRecursiveLintCommand)(scripts.lint);
15
+ if (!fixLint)
16
+ return;
17
+ // lint:fix ("npm run lint --fix") only recursed through lint; fix it only alongside lint.
18
+ const fixLintFix = typeof scripts['lint:fix'] === 'string' && (0, generator_1.isRecursiveLintCommand)(scripts['lint:fix']);
19
+ (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
20
+ json.scripts.lint = generator_1.DEFAULT_LINT_SCRIPT;
21
+ if (fixLintFix)
22
+ json.scripts['lint:fix'] = `${generator_1.DEFAULT_LINT_SCRIPT} --fix`;
23
+ return json;
24
+ });
25
+ }
26
+ exports.default = fixLintScript;
27
+ //# sourceMappingURL=fix-lint-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fix-lint-script.js","sourceRoot":"","sources":["../../../../src/migrations/fix-lint-script/fix-lint-script.ts"],"names":[],"mappings":";;AAAA,uCAAwD;AAExD,iEAAgG;AAEhG;;;;GAIG;AACY,KAAK,UAAU,aAAa,CAAC,IAAU;IACpD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAAE,OAAO;IACzC,MAAM,OAAO,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAC7D,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAA,kCAAsB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzF,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,0FAA0F;IAC1F,MAAM,UAAU,GACd,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,QAAQ,IAAI,IAAA,kCAAsB,EAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;QACxC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,+BAAmB,CAAC;QACxC,IAAI,UAAU;YAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,GAAG,+BAAmB,QAAQ,CAAC;QAC1E,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAbD,gCAaC"}
@@ -0,0 +1,8 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * v1.0.0: Flutter apps generated by earlier versions had no web/ folder, so `flutter build web`
4
+ * (the build-web and serve targets) stopped with "This project is not configured for the web".
5
+ * Adds web/index.html and web/manifest.json to apps built with the plugin's flutter-build executor
6
+ * for the web target. Apps that already have web/index.html are left alone.
7
+ */
8
+ export default function flutterWebPlatform(tree: Tree): Promise<void>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const flutter_web_1 = require("../../lib/utils/flutter-web");
5
+ const project_json_files_1 = require("../../lib/utils/project-json-files");
6
+ const FLUTTER_BUILD = '@mouryaamit/nx-polystack:flutter-build';
7
+ /**
8
+ * v1.0.0: Flutter apps generated by earlier versions had no web/ folder, so `flutter build web`
9
+ * (the build-web and serve targets) stopped with "This project is not configured for the web".
10
+ * Adds web/index.html and web/manifest.json to apps built with the plugin's flutter-build executor
11
+ * for the web target. Apps that already have web/index.html are left alone.
12
+ */
13
+ async function flutterWebPlatform(tree) {
14
+ const added = [];
15
+ for (const { name, root, json } of (0, project_json_files_1.readProjects)(tree)) {
16
+ const targets = (json.targets ?? {});
17
+ const buildsWeb = Object.values(targets).some((t) => t.executor === FLUTTER_BUILD && (t.options?.target ?? 'web') === 'web');
18
+ if (!buildsWeb || !tree.exists(`${root}/pubspec.yaml`))
19
+ continue;
20
+ if (tree.exists(`${root}/web/index.html`))
21
+ continue;
22
+ for (const [file, content] of Object.entries((0, flutter_web_1.flutterWebFiles)(name))) {
23
+ const target = `${root}/${file}`;
24
+ if (!tree.exists(target))
25
+ tree.write(target, content);
26
+ }
27
+ added.push(name);
28
+ }
29
+ if (added.length > 0) {
30
+ devkit_1.logger.info(`flutter-web-platform: web/index.html and web/manifest.json added to ${added.join(', ')}. ` +
31
+ 'Needs Flutter 3.22 or later (flutter_bootstrap.js); add icons under web/ if you want them.');
32
+ }
33
+ }
34
+ exports.default = flutterWebPlatform;
35
+ //# sourceMappingURL=flutter-web-platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flutter-web-platform.js","sourceRoot":"","sources":["../../../../src/migrations/flutter-web-platform/flutter-web-platform.ts"],"names":[],"mappings":";;AAAA,uCAA0C;AAE1C,6DAA8D;AAC9D,2EAAkE;AAOlE,MAAM,aAAa,GAAG,wCAAwC,CAAC;AAE/D;;;;;GAKG;AACY,KAAK,UAAU,kBAAkB,CAAC,IAAU;IACzD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,IAAA,iCAAY,EAAC,IAAI,CAAC,EAAE;QACrD,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAA2B,CAAC;QAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAC3C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,aAAa,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,CAC9E,CAAC;QACF,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,eAAe,CAAC;YAAE,SAAS;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,iBAAiB,CAAC;YAAE,SAAS;QACpD,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAA,6BAAe,EAAC,IAAI,CAAC,CAAC,EAAE;YACnE,MAAM,MAAM,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;gBAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACvD;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClB;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,eAAM,CAAC,IAAI,CACT,uEAAuE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACzF,4FAA4F,CAC/F,CAAC;KACH;AACH,CAAC;AArBD,qCAqBC"}
@@ -0,0 +1,9 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /** Text with the earlier repo name replaced by the development repo. */
3
+ export declare function renamePluginRepo(text: string): string;
4
+ /**
5
+ * v0.38.2: the plugin repo is now example-org/private-plugin. GitHub workflows that name the
6
+ * earlier repo (the dependency-upgrade workflow reads its releases) point at the new name.
7
+ * `pstack update` itself moves the package.json pin.
8
+ */
9
+ export default function pluginRepoDev(tree: Tree): Promise<void>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renamePluginRepo = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const install_source_1 = require("../../cli/install-source");
6
+ const versions_1 = require("../../cli/versions");
7
+ const WORKFLOWS = '.github/workflows';
8
+ const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
9
+ /** The earlier repo name as a whole word: not the package name (@…), not a longer repo name. */
10
+ const LEGACY = new RegExp(`(?<![@\\w.-])(?:${versions_1.LEGACY_GITHUB_REPOS.map(escapeRegExp).join('|')})(?![\\w-])`, 'g');
11
+ /** Text with the earlier repo name replaced by the development repo. */
12
+ function renamePluginRepo(text) {
13
+ return text.replace(LEGACY, versions_1.PLUGIN_GITHUB_REPO);
14
+ }
15
+ exports.renamePluginRepo = renamePluginRepo;
16
+ /**
17
+ * v0.38.2: the plugin repo is now example-org/private-plugin. GitHub workflows that name the
18
+ * earlier repo (the dependency-upgrade workflow reads its releases) point at the new name.
19
+ * `pstack update` itself moves the package.json pin.
20
+ */
21
+ async function pluginRepoDev(tree) {
22
+ // In the npm build the earlier name is the public repo: nothing to point elsewhere.
23
+ if ((0, install_source_1.installSource)().kind === 'npm' || !tree.exists(WORKFLOWS))
24
+ return;
25
+ const changed = [];
26
+ for (const name of tree.children(WORKFLOWS)) {
27
+ const file = `${WORKFLOWS}/${name}`;
28
+ if (!/\.ya?ml$/.test(name) || !tree.isFile(file))
29
+ continue;
30
+ const text = tree.read(file, 'utf-8') ?? '';
31
+ const next = renamePluginRepo(text);
32
+ if (next !== text) {
33
+ tree.write(file, next);
34
+ changed.push(file);
35
+ }
36
+ }
37
+ if (changed.length > 0) {
38
+ devkit_1.logger.info(`plugin-repo-dev: ${changed.join(', ')} now name ${versions_1.PLUGIN_GITHUB_REPO}.`);
39
+ }
40
+ }
41
+ exports.default = pluginRepoDev;
42
+ //# sourceMappingURL=plugin-repo-dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-repo-dev.js","sourceRoot":"","sources":["../../../../src/migrations/plugin-repo-dev/plugin-repo-dev.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAE1C,6DAAyD;AACzD,iDAA6E;AAE7E,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,MAAM,YAAY,GA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C,IAAI,CAAC,oBAAoB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,6BAAkB,GAAG,CAAC,CAAC;KACvF;AACH,CAAC;AAjBD,gCAiBC"}
@@ -0,0 +1,8 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.9.1: the v0.9.0 `check:prepush` ran `npm audit` first and blocked the push on any high
4
+ * advisory, including ones with no fix for the workspace's framework major. In workspaces that have
5
+ * `check:prepush`, rewrites it only when it is exactly the v0.9.0 default (secret scan first and
6
+ * blocking, audit warn-only), and adds the strict `check:audit` when missing.
7
+ */
8
+ export default function prepushAuditWarnOnly(tree: Tree): Promise<void>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const generator_1 = require("../../generators/infra/generator");
5
+ /**
6
+ * v0.9.1: the v0.9.0 `check:prepush` ran `npm audit` first and blocked the push on any high
7
+ * advisory, including ones with no fix for the workspace's framework major. In workspaces that have
8
+ * `check:prepush`, rewrites it only when it is exactly the v0.9.0 default (secret scan first and
9
+ * blocking, audit warn-only), and adds the strict `check:audit` when missing.
10
+ */
11
+ async function prepushAuditWarnOnly(tree) {
12
+ if (!tree.exists('package.json'))
13
+ return;
14
+ const scripts = (0, devkit_1.readJson)(tree, 'package.json').scripts ?? {};
15
+ if (typeof scripts['check:prepush'] !== 'string')
16
+ return;
17
+ const rewrite = scripts['check:prepush'] === generator_1.PREPUSH_V0_9_0;
18
+ const addAudit = scripts['check:audit'] === undefined;
19
+ if (!rewrite && !addAudit)
20
+ return;
21
+ (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
22
+ if (rewrite)
23
+ json.scripts['check:prepush'] = generator_1.INFRA_SCRIPTS['check:prepush'];
24
+ if (addAudit)
25
+ json.scripts['check:audit'] = generator_1.INFRA_SCRIPTS['check:audit'];
26
+ return json;
27
+ });
28
+ }
29
+ exports.default = prepushAuditWarnOnly;
30
+ //# sourceMappingURL=prepush-audit-warn-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepush-audit-warn-only.js","sourceRoot":"","sources":["../../../../src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.ts"],"names":[],"mappings":";;AAAA,uCAAwD;AAExD,gEAAiF;AAEjF;;;;;GAKG;AACY,KAAK,UAAU,oBAAoB,CAAC,IAAU;IAC3D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAAE,OAAO;IACzC,MAAM,OAAO,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAC7D,IAAI,OAAO,OAAO,CAAC,eAAe,CAAC,KAAK,QAAQ;QAAE,OAAO;IACzD,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,KAAK,0BAAc,CAAC;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,SAAS,CAAC;IACtD,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ;QAAE,OAAO;IAClC,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;QACxC,IAAI,OAAO;YAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,yBAAa,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,QAAQ;YAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,yBAAa,CAAC,aAAa,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,uCAYC"}
@@ -0,0 +1,7 @@
1
+ import { GeneratorCallback, Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.36.0: typecheck targets (tsc --noEmit) on projects with a tsconfig.app/lib.json, cached in
4
+ * nx.json, run by the CI affected step; import/no-unresolved and unused-imports as ESLint
5
+ * warnings with their packages. The commit hook is not changed.
6
+ */
7
+ export default function qualityChecks(tree: Tree): Promise<GeneratorCallback | undefined>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const generator_1 = require("../../generators/infra/generator");
5
+ const dependencies_1 = require("../../lib/utils/dependencies");
6
+ const quality_1 = require("../../lib/utils/quality");
7
+ /**
8
+ * v0.36.0: typecheck targets (tsc --noEmit) on projects with a tsconfig.app/lib.json, cached in
9
+ * nx.json, run by the CI affected step; import/no-unresolved and unused-imports as ESLint
10
+ * warnings with their packages. The commit hook is not changed.
11
+ */
12
+ async function qualityChecks(tree) {
13
+ const typed = (0, quality_1.addTypecheckTargets)(tree);
14
+ const nxChanged = (0, quality_1.addTypecheckNxDefaults)(tree);
15
+ const ci = (0, quality_1.addTypecheckToCi)(tree);
16
+ const eslint = (0, quality_1.addQualityEslintRules)(tree);
17
+ const install = eslint === 'added'
18
+ ? (0, dependencies_1.addMissingDependencies)(tree, {}, (0, quality_1.qualityEslintDependencies)(tree))
19
+ : undefined;
20
+ if (typed.length > 0) {
21
+ devkit_1.logger.info(`quality-checks: typecheck target added to ${typed.join(', ')}. Run ` +
22
+ 'npx nx run-many -t typecheck once before merging: libraries are now type-checked as a ' +
23
+ 'whole (not only what apps import), and CI runs it for every affected project.');
24
+ }
25
+ if (nxChanged)
26
+ devkit_1.logger.info('quality-checks: typecheck is cached (nx.json targetDefaults).');
27
+ if (ci.changed.length > 0) {
28
+ devkit_1.logger.info(`quality-checks: typecheck added to the CI affected step in ${ci.changed.join(', ')}.`);
29
+ }
30
+ if (ci.unknown.length > 0) {
31
+ devkit_1.logger.info(`quality-checks: add typecheck to the nx affected targets in ${ci.unknown.join(', ')} ` +
32
+ 'by hand (e.g. nx affected -t lint typecheck test build).');
33
+ }
34
+ if (eslint === 'added') {
35
+ devkit_1.logger.info('quality-checks: ESLint warns on unresolved imports and unused imports (root ' +
36
+ '.eslintrc.json); npm install adds the ESLint plugins.');
37
+ }
38
+ for (const note of (0, generator_1.eslintNote)(eslint))
39
+ devkit_1.logger.info(`quality-checks: ${note}`);
40
+ if (typed.length > 0 || nxChanged || ci.changed.length > 0 || eslint === 'added') {
41
+ await (0, devkit_1.formatFiles)(tree);
42
+ }
43
+ return install;
44
+ }
45
+ exports.default = qualityChecks;
46
+ //# sourceMappingURL=quality-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-checks.js","sourceRoot":"","sources":["../../../../src/migrations/quality-checks/quality-checks.ts"],"names":[],"mappings":";;AAAA,uCAA0E;AAE1E,gEAA8D;AAC9D,+DAAsE;AACtE,qDAMiC;AAEjC;;;;GAIG;AACY,KAAK,UAAU,aAAa,CAAC,IAAU;IACpD,MAAM,KAAK,GAAG,IAAA,6BAAmB,EAAC,IAAI,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,IAAA,gCAAsB,EAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,IAAA,0BAAgB,EAAC,IAAI,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,+BAAqB,EAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,OAAO,GACX,MAAM,KAAK,OAAO;QAChB,CAAC,CAAC,IAAA,qCAAsB,EAAC,IAAI,EAAE,EAAE,EAAE,IAAA,mCAAyB,EAAC,IAAI,CAAC,CAAC;QACnE,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,eAAM,CAAC,IAAI,CACT,6CAA6C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ;YACnE,wFAAwF;YACxF,+EAA+E,CAClF,CAAC;KACH;IACD,IAAI,SAAS;QAAE,eAAM,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAC5F,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACzB,eAAM,CAAC,IAAI,CACT,8DAA8D,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACvF,CAAC;KACH;IACD,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACzB,eAAM,CAAC,IAAI,CACT,+DAA+D,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YACrF,0DAA0D,CAC7D,CAAC;KACH;IACD,IAAI,MAAM,KAAK,OAAO,EAAE;QACtB,eAAM,CAAC,IAAI,CACT,8EAA8E;YAC5E,uDAAuD,CAC1D,CAAC;KACH;IACD,KAAK,MAAM,IAAI,IAAI,IAAA,sBAAU,EAAC,MAAM,CAAC;QAAE,eAAM,CAAC,IAAI,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IAE9E,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,KAAK,OAAO,EAAE;QAChF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;KACzB;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAzCD,gCAyCC"}
@@ -0,0 +1,8 @@
1
+ import { GeneratorCallback, Tree } from '@nx/devkit';
2
+ /**
3
+ * v0.29.0: polystack release targets turn on the leak check, source-map guard, comment stripping
4
+ * and console removal for their UAT/PROD configurations (values already set are kept); the
5
+ * replaced `harden` option is removed (other envs it applied to keep its meaning); terser is added
6
+ * to the workspace devDependencies.
7
+ */
8
+ export default function releaseHardening(tree: Tree): Promise<GeneratorCallback | undefined>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const options_1 = require("../../lib/hardening/options");
5
+ const angular_project_1 = require("../../lib/utils/angular-project");
6
+ const dependencies_1 = require("../../lib/utils/dependencies");
7
+ const project_json_files_1 = require("../../lib/utils/project-json-files");
8
+ /**
9
+ * v0.29.0: polystack release targets turn on the leak check, source-map guard, comment stripping
10
+ * and console removal for their UAT/PROD configurations (values already set are kept); the
11
+ * replaced `harden` option is removed (other envs it applied to keep its meaning); terser is added
12
+ * to the workspace devDependencies.
13
+ */
14
+ async function releaseHardening(tree) {
15
+ const changed = [];
16
+ const hardenMapped = [];
17
+ for (const file of (0, project_json_files_1.projectJsonFiles)(tree)) {
18
+ let project;
19
+ try {
20
+ project = (0, devkit_1.readJson)(tree, file);
21
+ }
22
+ catch {
23
+ continue;
24
+ }
25
+ const name = project.name ?? file.split('/').slice(-2, -1)[0];
26
+ let touched = false;
27
+ for (const target of Object.values(project.targets ?? {})) {
28
+ if (target.executor !== angular_project_1.POLYSTACK_BUILD_EXECUTOR)
29
+ continue;
30
+ const result = hardenTarget(target);
31
+ touched = result.changed || touched;
32
+ hardenMapped.push(...result.hardenMapped.map((c) => `${name}:${c}`));
33
+ }
34
+ if (!touched)
35
+ continue;
36
+ (0, devkit_1.writeJson)(tree, file, project);
37
+ changed.push(name);
38
+ }
39
+ if (changed.length === 0)
40
+ return undefined;
41
+ devkit_1.logger.info(`release-hardening: updated release hardening for ${changed.join(', ')}. ` +
42
+ 'leakCheck/sourceMaps fail the build on a hit; set them to "warn" to report only.');
43
+ if (hardenMapped.length > 0) {
44
+ devkit_1.logger.info(`release-hardening: harden replaced by stripComments and dropConsole in ${hardenMapped.join(', ')}.`);
45
+ }
46
+ return (0, dependencies_1.ensureReleaseHardeningDependencies)(tree);
47
+ }
48
+ exports.default = releaseHardening;
49
+ /**
50
+ * Hardens one release target in place. UAT/PROD configurations get every hardening option; other
51
+ * non-DEV configurations that `harden: true` applied to keep its meaning (stripComments and the
52
+ * default dropConsole). A key set in the configuration or the target options is kept. `harden`
53
+ * is removed everywhere.
54
+ */
55
+ function hardenTarget(target) {
56
+ const options = target.options ?? {};
57
+ const hardenMapped = [];
58
+ let changed = false;
59
+ for (const [name, config] of Object.entries(target.configurations ?? {})) {
60
+ const env = config['env'] ?? options['env'];
61
+ const harden = (config['harden'] ?? options['harden']) === true;
62
+ changed = removeHarden(config) || changed;
63
+ if (typeof env !== 'string')
64
+ continue;
65
+ const wanted = releaseOptionsFor(env, harden);
66
+ if (!wanted)
67
+ continue;
68
+ const added = Object.entries(wanted).filter(([key]) => !(key in config) && !(key in options));
69
+ for (const [key, value] of added)
70
+ config[key] = value;
71
+ changed = changed || added.length > 0;
72
+ if (harden && !isReleaseEnv(env) && added.length > 0)
73
+ hardenMapped.push(name);
74
+ }
75
+ changed = removeHarden(target.options) || changed;
76
+ return { changed, hardenMapped };
77
+ }
78
+ /** The options a configuration should end up with, or undefined for none. */
79
+ function releaseOptionsFor(env, harden) {
80
+ if (isReleaseEnv(env)) {
81
+ const { env: _env, ...hardening } = (0, angular_project_1.withReleaseHardening)({ env });
82
+ return hardening;
83
+ }
84
+ if (harden && env.toUpperCase() !== 'DEV') {
85
+ return { stripComments: true, dropConsole: [...options_1.DEFAULT_DROP_CONSOLE] };
86
+ }
87
+ return undefined;
88
+ }
89
+ function isReleaseEnv(env) {
90
+ return ['UAT', 'PROD'].includes(env.toUpperCase());
91
+ }
92
+ function removeHarden(options) {
93
+ if (!options || !('harden' in options))
94
+ return false;
95
+ delete options['harden'];
96
+ return true;
97
+ }
98
+ //# sourceMappingURL=release-hardening.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-hardening.js","sourceRoot":"","sources":["../../../../src/migrations/release-hardening/release-hardening.ts"],"names":[],"mappings":";;AAAA,uCAAkF;AAElF,yDAAmE;AACnE,qEAAiG;AACjG,+DAAkF;AAClF,2EAAsE;AAUtE;;;;;GAKG;AACY,KAAK,UAAU,gBAAgB,CAAC,IAAU;IACvD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,IAAA,qCAAgB,EAAC,IAAI,CAAC,EAAE;QACzC,IAAI,OAA4D,CAAC;QACjE,IAAI;YACF,OAAO,GAAG,IAAA,iBAAQ,EA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AAC;KAC/E;IACD,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;IAClD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AACnC,CAAC;AAED,6EAA6E;AAC7E,SAAS,iBAAiB,CAAC,GAAW,EAAE,MAAe;IACrD,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,IAAA,sCAAoB,EAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,MAAM,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACzC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,GAAG,8BAAoB,CAAC,EAAE,CAAC;KACxE;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,YAAY,CAAC,OAA4B;IAChD,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACrD,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /** sharp before 0.35.5 bundles libvips, libheif and librsvg versions with known vulnerabilities. */
3
+ export declare const SHARP_FIXED = "^0.35.5";
4
+ /** A caret or tilde range, or an exact version, below 0.35.5; other specs are left alone. */
5
+ export declare function needsSharpUpdate(spec: unknown): boolean;
6
+ /**
7
+ * v0.39.3: sharp (used by the release build to strip image metadata) moves to ^0.35.5, the first
8
+ * version without the libvips, libheif and librsvg vulnerabilities. Run npm install afterwards.
9
+ */
10
+ export default function sharpSecurityUpdate(tree: Tree): Promise<void>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.needsSharpUpdate = exports.SHARP_FIXED = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ /** sharp before 0.35.5 bundles libvips, libheif and librsvg versions with known vulnerabilities. */
6
+ exports.SHARP_FIXED = '^0.35.5';
7
+ /** A caret or tilde range, or an exact version, below 0.35.5; other specs are left alone. */
8
+ function needsSharpUpdate(spec) {
9
+ if (typeof spec !== 'string')
10
+ return false;
11
+ const m = /^[\^~]?0\.(\d+)\.(\d+)$/.exec(spec.trim());
12
+ if (!m)
13
+ return false;
14
+ const [minor, patch] = [Number(m[1]), Number(m[2])];
15
+ return minor < 35 || (minor === 35 && patch < 5);
16
+ }
17
+ exports.needsSharpUpdate = needsSharpUpdate;
18
+ /**
19
+ * v0.39.3: sharp (used by the release build to strip image metadata) moves to ^0.35.5, the first
20
+ * version without the libvips, libheif and librsvg vulnerabilities. Run npm install afterwards.
21
+ */
22
+ async function sharpSecurityUpdate(tree) {
23
+ if (!tree.exists('package.json'))
24
+ return;
25
+ const pkg = (0, devkit_1.readJson)(tree, 'package.json');
26
+ let changed;
27
+ for (const field of ['dependencies', 'devDependencies']) {
28
+ const spec = pkg[field]?.sharp;
29
+ if (needsSharpUpdate(spec)) {
30
+ pkg[field].sharp = exports.SHARP_FIXED;
31
+ changed = `${field}: sharp ${spec} → ${exports.SHARP_FIXED}`;
32
+ }
33
+ }
34
+ if (!changed)
35
+ return;
36
+ (0, devkit_1.writeJson)(tree, 'package.json', pkg);
37
+ devkit_1.logger.info(`sharp-security-update: ${changed}. Run npm install.`);
38
+ }
39
+ exports.default = sharpSecurityUpdate;
40
+ //# sourceMappingURL=sharp-security-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharp-security-update.js","sourceRoot":"","sources":["../../../../src/migrations/sharp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