@nx/workspace 16.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -0
  3. package/README.md +61 -0
  4. package/executors.json +11 -0
  5. package/generators.d.ts +5 -0
  6. package/generators.js +14 -0
  7. package/generators.js.map +1 -0
  8. package/generators.json +92 -0
  9. package/index.d.ts +21 -0
  10. package/index.js +52 -0
  11. package/index.js.map +1 -0
  12. package/migrations.json +165 -0
  13. package/package.json +90 -0
  14. package/presets/core.json +11 -0
  15. package/presets/npm.json +7 -0
  16. package/src/core/file-utils.d.ts +1 -0
  17. package/src/core/file-utils.js +5 -0
  18. package/src/core/file-utils.js.map +1 -0
  19. package/src/core/project-graph.d.ts +1 -0
  20. package/src/core/project-graph.js +5 -0
  21. package/src/core/project-graph.js.map +1 -0
  22. package/src/executors/counter/counter.impl.d.ts +12 -0
  23. package/src/executors/counter/counter.impl.js +48 -0
  24. package/src/executors/counter/counter.impl.js.map +1 -0
  25. package/src/executors/counter/schema.json +20 -0
  26. package/src/generators/ci-workflow/ci-workflow.d.ts +6 -0
  27. package/src/generators/ci-workflow/ci-workflow.js +46 -0
  28. package/src/generators/ci-workflow/ci-workflow.js.map +1 -0
  29. package/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +58 -0
  30. package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +36 -0
  31. package/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +73 -0
  32. package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +29 -0
  33. package/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +47 -0
  34. package/src/generators/ci-workflow/schema.json +38 -0
  35. package/src/generators/convert-to-nx-project/convert-to-nx-project.d.ts +6 -0
  36. package/src/generators/convert-to-nx-project/convert-to-nx-project.js +86 -0
  37. package/src/generators/convert-to-nx-project/convert-to-nx-project.js.map +1 -0
  38. package/src/generators/convert-to-nx-project/schema.d.ts +7 -0
  39. package/src/generators/convert-to-nx-project/schema.json +38 -0
  40. package/src/generators/move/lib/check-destination.d.ts +11 -0
  41. package/src/generators/move/lib/check-destination.js +24 -0
  42. package/src/generators/move/lib/check-destination.js.map +1 -0
  43. package/src/generators/move/lib/create-project-configuration-in-new-destination.d.ts +3 -0
  44. package/src/generators/move/lib/create-project-configuration-in-new-destination.js +17 -0
  45. package/src/generators/move/lib/create-project-configuration-in-new-destination.js.map +1 -0
  46. package/src/generators/move/lib/move-project-files.d.ts +8 -0
  47. package/src/generators/move/lib/move-project-files.js +22 -0
  48. package/src/generators/move/lib/move-project-files.js.map +1 -0
  49. package/src/generators/move/lib/normalize-schema.d.ts +3 -0
  50. package/src/generators/move/lib/normalize-schema.js +17 -0
  51. package/src/generators/move/lib/normalize-schema.js.map +1 -0
  52. package/src/generators/move/lib/update-build-targets.d.ts +6 -0
  53. package/src/generators/move/lib/update-build-targets.js +54 -0
  54. package/src/generators/move/lib/update-build-targets.js.map +1 -0
  55. package/src/generators/move/lib/update-cypress-config.d.ts +10 -0
  56. package/src/generators/move/lib/update-cypress-config.js +39 -0
  57. package/src/generators/move/lib/update-cypress-config.js.map +1 -0
  58. package/src/generators/move/lib/update-default-project.d.ts +10 -0
  59. package/src/generators/move/lib/update-default-project.js +21 -0
  60. package/src/generators/move/lib/update-default-project.js.map +1 -0
  61. package/src/generators/move/lib/update-eslintrc-json.d.ts +8 -0
  62. package/src/generators/move/lib/update-eslintrc-json.js +44 -0
  63. package/src/generators/move/lib/update-eslintrc-json.js.map +1 -0
  64. package/src/generators/move/lib/update-implicit-dependencies.d.ts +6 -0
  65. package/src/generators/move/lib/update-implicit-dependencies.js +20 -0
  66. package/src/generators/move/lib/update-implicit-dependencies.js.map +1 -0
  67. package/src/generators/move/lib/update-imports.d.ts +8 -0
  68. package/src/generators/move/lib/update-imports.js +159 -0
  69. package/src/generators/move/lib/update-imports.js.map +1 -0
  70. package/src/generators/move/lib/update-jest-config.d.ts +10 -0
  71. package/src/generators/move/lib/update-jest-config.js +36 -0
  72. package/src/generators/move/lib/update-jest-config.js.map +1 -0
  73. package/src/generators/move/lib/update-package-json.d.ts +8 -0
  74. package/src/generators/move/lib/update-package-json.js +22 -0
  75. package/src/generators/move/lib/update-package-json.js.map +1 -0
  76. package/src/generators/move/lib/update-project-root-files.d.ts +10 -0
  77. package/src/generators/move/lib/update-project-root-files.js +44 -0
  78. package/src/generators/move/lib/update-project-root-files.js.map +1 -0
  79. package/src/generators/move/lib/update-readme.d.ts +8 -0
  80. package/src/generators/move/lib/update-readme.js +22 -0
  81. package/src/generators/move/lib/update-readme.js.map +1 -0
  82. package/src/generators/move/lib/update-storybook-config.d.ts +10 -0
  83. package/src/generators/move/lib/update-storybook-config.js +44 -0
  84. package/src/generators/move/lib/update-storybook-config.js.map +1 -0
  85. package/src/generators/move/lib/utils.d.ts +22 -0
  86. package/src/generators/move/lib/utils.js +43 -0
  87. package/src/generators/move/lib/utils.js.map +1 -0
  88. package/src/generators/move/move.d.ts +5 -0
  89. package/src/generators/move/move.js +48 -0
  90. package/src/generators/move/move.js.map +1 -0
  91. package/src/generators/move/schema.d.ts +13 -0
  92. package/src/generators/move/schema.json +47 -0
  93. package/src/generators/new/files-integrated-repo/__dot__editorconfig +13 -0
  94. package/src/generators/new/files-integrated-repo/__dot__gitignore +39 -0
  95. package/src/generators/new/files-integrated-repo/__dot__vscode/extensions.json__tmpl__ +9 -0
  96. package/src/generators/new/files-integrated-repo/package.json__tmpl__ +14 -0
  97. package/src/generators/new/files-integrated-repo/tools/generators/.gitkeep +0 -0
  98. package/src/generators/new/files-integrated-repo/tools/tsconfig.tools.json +12 -0
  99. package/src/generators/new/files-package-based-repo/__dot__gitignore +39 -0
  100. package/src/generators/new/files-package-based-repo/__dot__vscode/extensions.json__tmpl__ +8 -0
  101. package/src/generators/new/files-package-based-repo/package.json__tmpl__ +13 -0
  102. package/src/generators/new/files-readme/README.md.template +21 -0
  103. package/src/generators/new/files-root-app/__dot__gitignore +39 -0
  104. package/src/generators/new/files-root-app/__dot__vscode/extensions.json__tmpl__ +6 -0
  105. package/src/generators/new/files-root-app/package.json__tmpl__ +14 -0
  106. package/src/generators/new/generate-preset.d.ts +4 -0
  107. package/src/generators/new/generate-preset.js +129 -0
  108. package/src/generators/new/generate-preset.js.map +1 -0
  109. package/src/generators/new/generate-workspace-files.d.ts +3 -0
  110. package/src/generators/new/generate-workspace-files.js +169 -0
  111. package/src/generators/new/generate-workspace-files.js.map +1 -0
  112. package/src/generators/new/new.d.ts +26 -0
  113. package/src/generators/new/new.js +73 -0
  114. package/src/generators/new/new.js.map +1 -0
  115. package/src/generators/new/schema.json +77 -0
  116. package/src/generators/npm-package/files/index.js.template +1 -0
  117. package/src/generators/npm-package/npm-package.d.ts +6 -0
  118. package/src/generators/npm-package/npm-package.js +42 -0
  119. package/src/generators/npm-package/npm-package.js.map +1 -0
  120. package/src/generators/npm-package/schema.json +21 -0
  121. package/src/generators/preset/files/angular/app.module.d.ts +0 -0
  122. package/src/generators/preset/files/angular/app.module.js +1 -0
  123. package/src/generators/preset/files/angular/app.module.js.map +1 -0
  124. package/src/generators/preset/files/angular/app.module.ts +0 -0
  125. package/src/generators/preset/preset.d.ts +4 -0
  126. package/src/generators/preset/preset.js +152 -0
  127. package/src/generators/preset/preset.js.map +1 -0
  128. package/src/generators/preset/schema.d.ts +17 -0
  129. package/src/generators/preset/schema.json +88 -0
  130. package/src/generators/remove/lib/__fixtures__/jest-project.config.d.ts +14 -0
  131. package/src/generators/remove/lib/__fixtures__/jest-project.config.js +18 -0
  132. package/src/generators/remove/lib/__fixtures__/jest-project.config.js.map +1 -0
  133. package/src/generators/remove/lib/__fixtures__/jest.config.d.ts +0 -0
  134. package/src/generators/remove/lib/__fixtures__/jest.config.js +9 -0
  135. package/src/generators/remove/lib/__fixtures__/jest.config.js.map +1 -0
  136. package/src/generators/remove/lib/check-dependencies.d.ts +7 -0
  137. package/src/generators/remove/lib/check-dependencies.js +27 -0
  138. package/src/generators/remove/lib/check-dependencies.js.map +1 -0
  139. package/src/generators/remove/lib/check-project-is-safe-to-remove.d.ts +3 -0
  140. package/src/generators/remove/lib/check-project-is-safe-to-remove.js +26 -0
  141. package/src/generators/remove/lib/check-project-is-safe-to-remove.js.map +1 -0
  142. package/src/generators/remove/lib/check-targets.d.ts +10 -0
  143. package/src/generators/remove/lib/check-targets.js +72 -0
  144. package/src/generators/remove/lib/check-targets.js.map +1 -0
  145. package/src/generators/remove/lib/remove-project-references-in-config.d.ts +3 -0
  146. package/src/generators/remove/lib/remove-project-references-in-config.js +22 -0
  147. package/src/generators/remove/lib/remove-project-references-in-config.js.map +1 -0
  148. package/src/generators/remove/lib/remove-project.d.ts +5 -0
  149. package/src/generators/remove/lib/remove-project.js +15 -0
  150. package/src/generators/remove/lib/remove-project.js.map +1 -0
  151. package/src/generators/remove/lib/update-jest-config.d.ts +6 -0
  152. package/src/generators/remove/lib/update-jest-config.js +64 -0
  153. package/src/generators/remove/lib/update-jest-config.js.map +1 -0
  154. package/src/generators/remove/lib/update-tsconfig.d.ts +8 -0
  155. package/src/generators/remove/lib/update-tsconfig.js +35 -0
  156. package/src/generators/remove/lib/update-tsconfig.js.map +1 -0
  157. package/src/generators/remove/remove.d.ts +5 -0
  158. package/src/generators/remove/remove.js +31 -0
  159. package/src/generators/remove/remove.js.map +1 -0
  160. package/src/generators/remove/schema.d.ts +10 -0
  161. package/src/generators/remove/schema.json +47 -0
  162. package/src/generators/run-commands/run-commands.d.ts +5 -0
  163. package/src/generators/run-commands/run-commands.js +30 -0
  164. package/src/generators/run-commands/run-commands.js.map +1 -0
  165. package/src/generators/run-commands/schema.d.ts +8 -0
  166. package/src/generators/run-commands/schema.json +49 -0
  167. package/src/generators/utils/get-npm-package-version.d.ts +1 -0
  168. package/src/generators/utils/get-npm-package-version.js +18 -0
  169. package/src/generators/utils/get-npm-package-version.js.map +1 -0
  170. package/src/generators/utils/insert-import.d.ts +2 -0
  171. package/src/generators/utils/insert-import.js +48 -0
  172. package/src/generators/utils/insert-import.js.map +1 -0
  173. package/src/generators/utils/insert-statement.d.ts +5 -0
  174. package/src/generators/utils/insert-statement.js +34 -0
  175. package/src/generators/utils/insert-statement.js.map +1 -0
  176. package/src/generators/utils/presets.d.ts +18 -0
  177. package/src/generators/utils/presets.js +23 -0
  178. package/src/generators/utils/presets.js.map +1 -0
  179. package/src/generators/workspace-generator/files/index.ts__tmpl__ +10 -0
  180. package/src/generators/workspace-generator/files/schema.json__tmpl__ +17 -0
  181. package/src/generators/workspace-generator/schema.d.ts +4 -0
  182. package/src/generators/workspace-generator/schema.json +25 -0
  183. package/src/generators/workspace-generator/workspace-generator.d.ts +3 -0
  184. package/src/generators/workspace-generator/workspace-generator.js +27 -0
  185. package/src/generators/workspace-generator/workspace-generator.js.map +1 -0
  186. package/src/migrations/update-12-5-0/add-target-dependencies.d.ts +3 -0
  187. package/src/migrations/update-12-5-0/add-target-dependencies.js +39 -0
  188. package/src/migrations/update-12-5-0/add-target-dependencies.js.map +1 -0
  189. package/src/migrations/update-13-0-0/config-locations/config-locations.d.ts +2 -0
  190. package/src/migrations/update-13-0-0/config-locations/config-locations.js +34 -0
  191. package/src/migrations/update-13-0-0/config-locations/config-locations.js.map +1 -0
  192. package/src/migrations/update-13-0-0/set-default-base-if-not-set.d.ts +3 -0
  193. package/src/migrations/update-13-0-0/set-default-base-if-not-set.js +30 -0
  194. package/src/migrations/update-13-0-0/set-default-base-if-not-set.js.map +1 -0
  195. package/src/migrations/update-13-10-0/update-decorate-cli.d.ts +3 -0
  196. package/src/migrations/update-13-10-0/update-decorate-cli.js +14 -0
  197. package/src/migrations/update-13-10-0/update-decorate-cli.js.map +1 -0
  198. package/src/migrations/update-13-10-0/update-tasks-runner.d.ts +3 -0
  199. package/src/migrations/update-13-10-0/update-tasks-runner.js +17 -0
  200. package/src/migrations/update-13-10-0/update-tasks-runner.js.map +1 -0
  201. package/src/migrations/update-13-2-0/set-parallel-default.d.ts +3 -0
  202. package/src/migrations/update-13-2-0/set-parallel-default.js +27 -0
  203. package/src/migrations/update-13-2-0/set-parallel-default.js.map +1 -0
  204. package/src/migrations/update-13-3-0/update-tsc-executor-location.d.ts +3 -0
  205. package/src/migrations/update-13-3-0/update-tsc-executor-location.js +31 -0
  206. package/src/migrations/update-13-3-0/update-tsc-executor-location.js.map +1 -0
  207. package/src/migrations/update-13-6-0/remove-old-task-runner-options.d.ts +3 -0
  208. package/src/migrations/update-13-6-0/remove-old-task-runner-options.js +17 -0
  209. package/src/migrations/update-13-6-0/remove-old-task-runner-options.js.map +1 -0
  210. package/src/migrations/update-13-9-0/replace-tao-with-nx.d.ts +3 -0
  211. package/src/migrations/update-13-9-0/replace-tao-with-nx.js +28 -0
  212. package/src/migrations/update-13-9-0/replace-tao-with-nx.js.map +1 -0
  213. package/src/migrations/update-13-9-0/update-decorate-cli.d.ts +3 -0
  214. package/src/migrations/update-13-9-0/update-decorate-cli.js +13 -0
  215. package/src/migrations/update-13-9-0/update-decorate-cli.js.map +1 -0
  216. package/src/migrations/update-14-0-0/change-npm-script-executor.d.ts +3 -0
  217. package/src/migrations/update-14-0-0/change-npm-script-executor.js +20 -0
  218. package/src/migrations/update-14-0-0/change-npm-script-executor.js.map +1 -0
  219. package/src/migrations/update-14-0-0/change-nx-json-presets.d.ts +3 -0
  220. package/src/migrations/update-14-0-0/change-nx-json-presets.js +21 -0
  221. package/src/migrations/update-14-0-0/change-nx-json-presets.js.map +1 -0
  222. package/src/migrations/update-14-2-0/enable-source-analysis.d.ts +3 -0
  223. package/src/migrations/update-14-2-0/enable-source-analysis.js +28 -0
  224. package/src/migrations/update-14-2-0/enable-source-analysis.js.map +1 -0
  225. package/src/migrations/update-14-8-0/change-run-commands-executor.d.ts +3 -0
  226. package/src/migrations/update-14-8-0/change-run-commands-executor.js +20 -0
  227. package/src/migrations/update-14-8-0/change-run-commands-executor.js.map +1 -0
  228. package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.d.ts +3 -0
  229. package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.js +15 -0
  230. package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.js.map +1 -0
  231. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  232. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  233. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  234. package/src/tasks-runner/cache.d.ts +1 -0
  235. package/src/tasks-runner/cache.js +6 -0
  236. package/src/tasks-runner/cache.js.map +1 -0
  237. package/src/tasks-runner/default-tasks-runner.d.ts +1 -0
  238. package/src/tasks-runner/default-tasks-runner.js +5 -0
  239. package/src/tasks-runner/default-tasks-runner.js.map +1 -0
  240. package/src/tasks-runner/life-cycle.d.ts +1 -0
  241. package/src/tasks-runner/life-cycle.js +6 -0
  242. package/src/tasks-runner/life-cycle.js.map +1 -0
  243. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +1 -0
  244. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +5 -0
  245. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js.map +1 -0
  246. package/src/tasks-runner/tasks-runner-v2.d.ts +1 -0
  247. package/src/tasks-runner/tasks-runner-v2.js +7 -0
  248. package/src/tasks-runner/tasks-runner-v2.js.map +1 -0
  249. package/src/tasks-runner/tasks-runner.d.ts +2 -0
  250. package/src/tasks-runner/tasks-runner.js +5 -0
  251. package/src/tasks-runner/tasks-runner.js.map +1 -0
  252. package/src/tasks-runner/utils.d.ts +1 -0
  253. package/src/tasks-runner/utils.js +5 -0
  254. package/src/tasks-runner/utils.js.map +1 -0
  255. package/src/utilities/app-root.d.ts +1 -0
  256. package/src/utilities/app-root.js +5 -0
  257. package/src/utilities/app-root.js.map +1 -0
  258. package/src/utilities/buildable-libs-utils.d.ts +41 -0
  259. package/src/utilities/buildable-libs-utils.js +316 -0
  260. package/src/utilities/buildable-libs-utils.js.map +1 -0
  261. package/src/utilities/default-base.d.ts +1 -0
  262. package/src/utilities/default-base.js +16 -0
  263. package/src/utilities/default-base.js.map +1 -0
  264. package/src/utilities/fileutils.d.ts +13 -0
  265. package/src/utilities/fileutils.js +52 -0
  266. package/src/utilities/fileutils.js.map +1 -0
  267. package/src/utilities/output.d.ts +1 -0
  268. package/src/utilities/output.js +5 -0
  269. package/src/utilities/output.js.map +1 -0
  270. package/src/utilities/run-tasks-in-serial.d.ts +8 -0
  271. package/src/utilities/run-tasks-in-serial.js +19 -0
  272. package/src/utilities/run-tasks-in-serial.js.map +1 -0
  273. package/src/utilities/ts-config.d.ts +5 -0
  274. package/src/utilities/ts-config.js +40 -0
  275. package/src/utilities/ts-config.js.map +1 -0
  276. package/src/utilities/typescript/compilation.d.ts +22 -0
  277. package/src/utilities/typescript/compilation.js +120 -0
  278. package/src/utilities/typescript/compilation.js.map +1 -0
  279. package/src/utilities/typescript/get-source-nodes.d.ts +5 -0
  280. package/src/utilities/typescript/get-source-nodes.js +22 -0
  281. package/src/utilities/typescript/get-source-nodes.js.map +1 -0
  282. package/src/utilities/typescript.d.ts +22 -0
  283. package/src/utilities/typescript.js +71 -0
  284. package/src/utilities/typescript.js.map +1 -0
  285. package/src/utilities/version-utils.d.ts +4 -0
  286. package/src/utilities/version-utils.js +14 -0
  287. package/src/utilities/version-utils.js.map +1 -0
  288. package/src/utils/ast-utils.d.ts +1 -0
  289. package/src/utils/ast-utils.js +6 -0
  290. package/src/utils/ast-utils.js.map +1 -0
  291. package/src/utils/cli-config-utils.d.ts +16 -0
  292. package/src/utils/cli-config-utils.js +30 -0
  293. package/src/utils/cli-config-utils.js.map +1 -0
  294. package/src/utils/fileutils.d.ts +24 -0
  295. package/src/utils/fileutils.js +67 -0
  296. package/src/utils/fileutils.js.map +1 -0
  297. package/src/utils/lint.d.ts +4 -0
  298. package/src/utils/lint.js +3 -0
  299. package/src/utils/lint.js.map +1 -0
  300. package/src/utils/output.d.ts +52 -0
  301. package/src/utils/output.js +134 -0
  302. package/src/utils/output.js.map +1 -0
  303. package/src/utils/perf-logging.d.ts +1 -0
  304. package/src/utils/perf-logging.js +11 -0
  305. package/src/utils/perf-logging.js.map +1 -0
  306. package/src/utils/project-type.d.ts +5 -0
  307. package/src/utils/project-type.js +18 -0
  308. package/src/utils/project-type.js.map +1 -0
  309. package/src/utils/rules/add-install-task.d.ts +7 -0
  310. package/src/utils/rules/add-install-task.js +18 -0
  311. package/src/utils/rules/add-install-task.js.map +1 -0
  312. package/src/utils/rules/deleteFile.d.ts +6 -0
  313. package/src/utils/rules/deleteFile.js +12 -0
  314. package/src/utils/rules/deleteFile.js.map +1 -0
  315. package/src/utils/rules/format-files.d.ts +7 -0
  316. package/src/utils/rules/format-files.js +58 -0
  317. package/src/utils/rules/format-files.js.map +1 -0
  318. package/src/utils/rules/visit-not-ignored-files.d.ts +6 -0
  319. package/src/utils/rules/visit-not-ignored-files.js +39 -0
  320. package/src/utils/rules/visit-not-ignored-files.js.map +1 -0
  321. package/src/utils/strings.d.ts +107 -0
  322. package/src/utils/strings.js +160 -0
  323. package/src/utils/strings.js.map +1 -0
  324. package/src/utils/testing-utils.d.ts +54 -0
  325. package/src/utils/testing-utils.js +147 -0
  326. package/src/utils/testing-utils.js.map +1 -0
  327. package/src/utils/version-utils.d.ts +1 -0
  328. package/src/utils/version-utils.js +5 -0
  329. package/src/utils/version-utils.js.map +1 -0
  330. package/src/utils/versions.d.ts +7 -0
  331. package/src/utils/versions.js +13 -0
  332. package/src/utils/versions.js.map +1 -0
  333. package/src/utils/workspace.d.ts +20 -0
  334. package/src/utils/workspace.js +97 -0
  335. package/src/utils/workspace.js.map +1 -0
  336. package/tasks-runners/default.d.ts +1 -0
  337. package/tasks-runners/default.js +6 -0
  338. package/tasks-runners/default.js.map +1 -0
  339. package/testing.d.ts +1 -0
  340. package/testing.js +8 -0
  341. package/testing.js.map +1 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateProjectRootFiles = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path = require("path");
6
+ const path_1 = require("path");
7
+ const allowedExt = ['.ts', '.js', '.json'];
8
+ /**
9
+ * Updates the files in the root of the project
10
+ *
11
+ * Typically these are config files which point outside of the project folder
12
+ *
13
+ * @param schema The options provided to the schematic
14
+ */
15
+ function updateProjectRootFiles(tree, schema, project) {
16
+ const newRelativeRoot = path
17
+ .relative(path.join(devkit_1.workspaceRoot, schema.relativeToRootDestination), devkit_1.workspaceRoot)
18
+ .split(path.sep)
19
+ .join('/');
20
+ const oldRelativeRoot = path
21
+ .relative(path.join(devkit_1.workspaceRoot, project.root), devkit_1.workspaceRoot)
22
+ .split(path.sep)
23
+ .join('/');
24
+ if (newRelativeRoot === oldRelativeRoot) {
25
+ // nothing to do
26
+ return;
27
+ }
28
+ const dots = /\./g;
29
+ const regex = new RegExp(`(?<!\\.\\.\\/)${oldRelativeRoot.replace(dots, '\\.')}(?!\\/\\.\\.)`, 'g');
30
+ for (const file of tree.children(schema.relativeToRootDestination)) {
31
+ const ext = (0, path_1.extname)(file);
32
+ if (!allowedExt.includes(ext)) {
33
+ continue;
34
+ }
35
+ if (file === '.eslintrc.json') {
36
+ continue;
37
+ }
38
+ const oldContent = tree.read((0, path_1.join)(schema.relativeToRootDestination, file), 'utf-8');
39
+ const newContent = oldContent.replace(regex, newRelativeRoot);
40
+ tree.write((0, path_1.join)(schema.relativeToRootDestination, file), newContent);
41
+ }
42
+ }
43
+ exports.updateProjectRootFiles = updateProjectRootFiles;
44
+ //# sourceMappingURL=update-project-root-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-project-root-files.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-project-root-files.ts"],"names":[],"mappings":";;;AACA,uCAA2C;AAC3C,6BAA6B;AAC7B,+BAAqC;AAErC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3C;;;;;;GAMG;AACH,SAAgB,sBAAsB,CACpC,IAAU,EACV,MAAwB,EACxB,OAA6B;IAE7B,MAAM,eAAe,GAAG,IAAI;SACzB,QAAQ,CACP,IAAI,CAAC,IAAI,CAAC,sBAAa,EAAE,MAAM,CAAC,yBAAyB,CAAC,EAC1D,sBAAa,CACd;SACA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,eAAe,GAAG,IAAI;SACzB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAa,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,sBAAa,CAAC;SAC/D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,IAAI,eAAe,KAAK,eAAe,EAAE;QACvC,gBAAgB;QAChB,OAAO;KACR;IAED,MAAM,IAAI,GAAG,KAAK,CAAC;IACnB,MAAM,KAAK,GAAG,IAAI,MAAM,CACtB,iBAAiB,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,eAAe,EACpE,GAAG,CACJ,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE;QAClE,MAAM,GAAG,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC7B,SAAS;SACV;QACD,IAAI,IAAI,KAAK,gBAAgB,EAAE;YAC7B,SAAS;SACV;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAC1B,IAAA,WAAI,EAAC,MAAM,CAAC,yBAAyB,EAAE,IAAI,CAAC,EAC5C,OAAO,CACR,CAAC;QACF,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,IAAA,WAAI,EAAC,MAAM,CAAC,yBAAyB,EAAE,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;KACtE;AACH,CAAC;AA3CD,wDA2CC"}
@@ -0,0 +1,8 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { NormalizedSchema } from '../schema';
3
+ /**
4
+ * Update the README.md file of the project if it exists.
5
+ *
6
+ * @param schema The options provided to the schematic
7
+ */
8
+ export declare function updateReadme(tree: Tree, schema: NormalizedSchema): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateReadme = void 0;
4
+ const path_1 = require("path");
5
+ /**
6
+ * Update the README.md file of the project if it exists.
7
+ *
8
+ * @param schema The options provided to the schematic
9
+ */
10
+ function updateReadme(tree, schema) {
11
+ const readmePath = (0, path_1.join)(schema.relativeToRootDestination, 'README.md');
12
+ if (!tree.exists(readmePath)) {
13
+ // no README found. nothing to do
14
+ return;
15
+ }
16
+ const findName = new RegExp(`${schema.projectName}`, 'g');
17
+ const oldContent = tree.read(readmePath, 'utf-8');
18
+ const newContent = oldContent.replace(findName, schema.newProjectName);
19
+ tree.write(readmePath, newContent);
20
+ }
21
+ exports.updateReadme = updateReadme;
22
+ //# sourceMappingURL=update-readme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-readme.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-readme.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAG5B;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAU,EAAE,MAAwB;IAC/D,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;IAEvE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;QAC5B,iCAAiC;QACjC,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACrC,CAAC;AAXD,oCAWC"}
@@ -0,0 +1,10 @@
1
+ import { ProjectConfiguration, Tree } from '@nx/devkit';
2
+ import { NormalizedSchema } from '../schema';
3
+ /**
4
+ * Updates relative path to root storybook config for `main.js` & `webpack.config.js`
5
+ *
6
+ * @param {Tree} tree
7
+ * @param {NormalizedSchema} schema The options provided to the schematic
8
+ * @param {ProjectConfiguration} project
9
+ */
10
+ export declare function updateStorybookConfig(tree: Tree, schema: NormalizedSchema, project: ProjectConfiguration): void;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateStorybookConfig = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path = require("path");
6
+ const path_1 = require("path");
7
+ /**
8
+ * Updates relative path to root storybook config for `main.js` & `webpack.config.js`
9
+ *
10
+ * @param {Tree} tree
11
+ * @param {NormalizedSchema} schema The options provided to the schematic
12
+ * @param {ProjectConfiguration} project
13
+ */
14
+ function updateStorybookConfig(tree, schema, project) {
15
+ const oldRelativeRoot = path
16
+ .relative(path.join(devkit_1.workspaceRoot, `${project.root}/.storybook`), devkit_1.workspaceRoot)
17
+ .split(path.sep)
18
+ .join('/');
19
+ const newRelativeRoot = path
20
+ .relative(path.join(devkit_1.workspaceRoot, `${schema.relativeToRootDestination}/.storybook`), devkit_1.workspaceRoot)
21
+ .split(path.sep)
22
+ .join('/');
23
+ const storybookDir = path.join(schema.relativeToRootDestination, '.storybook');
24
+ if (!storybookDir) {
25
+ return;
26
+ }
27
+ // Replace relative import path to root storybook folder for each file under project storybook
28
+ updateRecursively(tree, storybookDir, oldRelativeRoot, newRelativeRoot);
29
+ }
30
+ exports.updateStorybookConfig = updateStorybookConfig;
31
+ function updateRecursively(tree, dir, oldRoot, newRoot) {
32
+ for (const child of tree.children(dir)) {
33
+ const childPath = (0, path_1.join)(dir, child);
34
+ if (tree.isFile(childPath)) {
35
+ const oldContent = tree.read(childPath, 'utf-8');
36
+ const newContent = oldContent.replace(oldRoot, newRoot);
37
+ tree.write(childPath, newContent);
38
+ }
39
+ else {
40
+ updateRecursively(tree, childPath, oldRoot, newRoot);
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=update-storybook-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-storybook-config.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-storybook-config.ts"],"names":[],"mappings":";;;AACA,uCAA2C;AAC3C,6BAA6B;AAC7B,+BAA4B;AAG5B;;;;;;GAMG;AACH,SAAgB,qBAAqB,CACnC,IAAU,EACV,MAAwB,EACxB,OAA6B;IAE7B,MAAM,eAAe,GAAG,IAAI;SACzB,QAAQ,CACP,IAAI,CAAC,IAAI,CAAC,sBAAa,EAAE,GAAG,OAAO,CAAC,IAAI,aAAa,CAAC,EACtD,sBAAa,CACd;SACA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,eAAe,GAAG,IAAI;SACzB,QAAQ,CACP,IAAI,CAAC,IAAI,CACP,sBAAa,EACb,GAAG,MAAM,CAAC,yBAAyB,aAAa,CACjD,EACD,sBAAa,CACd;SACA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAC5B,MAAM,CAAC,yBAAyB,EAChC,YAAY,CACb,CAAC;IAEF,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,8FAA8F;IAC9F,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;AAC1E,CAAC;AAlCD,sDAkCC;AAED,SAAS,iBAAiB,CACxB,IAAU,EACV,GAAW,EACX,OAAe,EACf,OAAe;IAEf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtC,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACjD,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxD,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;SACnC;aAAM;YACL,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACtD;KACF;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ProjectConfiguration, Tree } from '@nx/devkit';
2
+ import { Schema } from '../schema';
3
+ /**
4
+ * This helper function ensures that we don't move libs or apps
5
+ * outside of the folders they should be in.
6
+ *
7
+ * This will break if someone isn't using the default libs/apps
8
+ * folders. In that case, they're on their own :/
9
+ */
10
+ export declare function getDestination(host: Tree, schema: Schema, project: ProjectConfiguration): string;
11
+ /**
12
+ * Replaces slashes with dashes
13
+ *
14
+ * @param path
15
+ */
16
+ export declare function getNewProjectName(path: string): string;
17
+ /**
18
+ * Normalizes slashes (removes duplicates)
19
+ *
20
+ * @param input
21
+ */
22
+ export declare function normalizeSlashes(input: string): string;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeSlashes = exports.getNewProjectName = exports.getDestination = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ /**
6
+ * This helper function ensures that we don't move libs or apps
7
+ * outside of the folders they should be in.
8
+ *
9
+ * This will break if someone isn't using the default libs/apps
10
+ * folders. In that case, they're on their own :/
11
+ */
12
+ function getDestination(host, schema, project) {
13
+ const projectType = project.projectType;
14
+ const workspaceLayout = (0, devkit_1.getWorkspaceLayout)(host);
15
+ let rootFolder = workspaceLayout.libsDir;
16
+ if (projectType === 'application') {
17
+ rootFolder = workspaceLayout.appsDir;
18
+ }
19
+ return (0, devkit_1.joinPathFragments)(rootFolder, schema.destination);
20
+ }
21
+ exports.getDestination = getDestination;
22
+ /**
23
+ * Replaces slashes with dashes
24
+ *
25
+ * @param path
26
+ */
27
+ function getNewProjectName(path) {
28
+ return path.replace(/\//g, '-');
29
+ }
30
+ exports.getNewProjectName = getNewProjectName;
31
+ /**
32
+ * Normalizes slashes (removes duplicates)
33
+ *
34
+ * @param input
35
+ */
36
+ function normalizeSlashes(input) {
37
+ return input
38
+ .split('/')
39
+ .filter((x) => !!x)
40
+ .join('/');
41
+ }
42
+ exports.normalizeSlashes = normalizeSlashes;
43
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/utils.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAIpB;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,IAAU,EACV,MAAc,EACd,OAA6B;IAE7B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAExC,MAAM,eAAe,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC;IACzC,IAAI,WAAW,KAAK,aAAa,EAAE;QACjC,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC;KACtC;IACD,OAAO,IAAA,0BAAiB,EAAC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;AAC3D,CAAC;AAdD,wCAcC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAFD,8CAEC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SAClB,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AALD,4CAKC"}
@@ -0,0 +1,5 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { Schema } from './schema';
3
+ export declare function moveGenerator(tree: Tree, rawSchema: Schema): Promise<void>;
4
+ export default moveGenerator;
5
+ export declare const moveSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.moveSchematic = exports.moveGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const check_destination_1 = require("./lib/check-destination");
7
+ const create_project_configuration_in_new_destination_1 = require("./lib/create-project-configuration-in-new-destination");
8
+ const move_project_files_1 = require("./lib/move-project-files");
9
+ const normalize_schema_1 = require("./lib/normalize-schema");
10
+ const update_build_targets_1 = require("./lib/update-build-targets");
11
+ const update_cypress_config_1 = require("./lib/update-cypress-config");
12
+ const update_default_project_1 = require("./lib/update-default-project");
13
+ const update_eslintrc_json_1 = require("./lib/update-eslintrc-json");
14
+ const update_implicit_dependencies_1 = require("./lib/update-implicit-dependencies");
15
+ const update_imports_1 = require("./lib/update-imports");
16
+ const update_jest_config_1 = require("./lib/update-jest-config");
17
+ const update_package_json_1 = require("./lib/update-package-json");
18
+ const update_project_root_files_1 = require("./lib/update-project-root-files");
19
+ const update_readme_1 = require("./lib/update-readme");
20
+ const update_storybook_config_1 = require("./lib/update-storybook-config");
21
+ function moveGenerator(tree, rawSchema) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, rawSchema.projectName);
24
+ (0, check_destination_1.checkDestination)(tree, rawSchema, projectConfig);
25
+ const schema = (0, normalize_schema_1.normalizeSchema)(tree, rawSchema, projectConfig);
26
+ (0, devkit_1.removeProjectConfiguration)(tree, schema.projectName);
27
+ (0, move_project_files_1.moveProjectFiles)(tree, schema, projectConfig);
28
+ (0, create_project_configuration_in_new_destination_1.createProjectConfigurationInNewDestination)(tree, schema, projectConfig);
29
+ (0, update_imports_1.updateImports)(tree, schema, projectConfig);
30
+ (0, update_project_root_files_1.updateProjectRootFiles)(tree, schema, projectConfig);
31
+ (0, update_cypress_config_1.updateCypressConfig)(tree, schema, projectConfig);
32
+ (0, update_jest_config_1.updateJestConfig)(tree, schema, projectConfig);
33
+ (0, update_storybook_config_1.updateStorybookConfig)(tree, schema, projectConfig);
34
+ (0, update_eslintrc_json_1.updateEslintrcJson)(tree, schema, projectConfig);
35
+ (0, update_readme_1.updateReadme)(tree, schema);
36
+ (0, update_package_json_1.updatePackageJson)(tree, schema);
37
+ (0, update_build_targets_1.updateBuildTargets)(tree, schema);
38
+ (0, update_default_project_1.updateDefaultProject)(tree, schema);
39
+ (0, update_implicit_dependencies_1.updateImplicitDependencies)(tree, schema);
40
+ if (!schema.skipFormat) {
41
+ yield (0, devkit_1.formatFiles)(tree);
42
+ }
43
+ });
44
+ }
45
+ exports.moveGenerator = moveGenerator;
46
+ exports.default = moveGenerator;
47
+ exports.moveSchematic = (0, devkit_1.convertNxGenerator)(moveGenerator);
48
+ //# sourceMappingURL=move.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/generators/move/move.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,+DAA2D;AAC3D,2HAAmH;AACnH,iEAA4D;AAC5D,6DAAyD;AACzD,qEAAgE;AAChE,uEAAkE;AAClE,yEAAoE;AACpE,qEAAgE;AAChE,qFAAgF;AAChF,yDAAqD;AACrD,iEAA4D;AAC5D,mEAA8D;AAC9D,+EAAyE;AACzE,uDAAmD;AACnD,2EAAsE;AAGtE,SAAsB,aAAa,CAAC,IAAU,EAAE,SAAiB;;QAC/D,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QAC5E,IAAA,oCAAgB,EAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,IAAA,kCAAe,EAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAE/D,IAAA,mCAA0B,EAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACrD,IAAA,qCAAgB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAC9C,IAAA,4FAA0C,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QACxE,IAAA,8BAAa,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAC3C,IAAA,kDAAsB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QACpD,IAAA,2CAAmB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QACjD,IAAA,qCAAgB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAC9C,IAAA,+CAAqB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QACnD,IAAA,yCAAkB,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAChD,IAAA,4BAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC3B,IAAA,uCAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChC,IAAA,yCAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACjC,IAAA,6CAAoB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnC,IAAA,yDAA0B,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AAvBD,sCAuBC;AAED,kBAAe,aAAa,CAAC;AAEhB,QAAA,aAAa,GAAG,IAAA,2BAAkB,EAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface Schema {
2
+ projectName: string;
3
+ destination: string;
4
+ importPath?: string;
5
+ updateImportPath: boolean;
6
+ skipFormat?: boolean;
7
+ }
8
+
9
+ export interface NormalizedSchema extends Schema {
10
+ importPath: string;
11
+ newProjectName: string;
12
+ relativeToRootDestination: string;
13
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "NxWorkspaceMove",
4
+ "cli": "nx",
5
+ "title": "Nx Move",
6
+ "description": "Move a project to another folder in the workspace.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "command": "nx g @nrwl/workspace:move --project my-feature-lib --destination shared/my-feature-lib",
11
+ "description": "Move `libs/my-feature-lib` to `libs/shared/my-feature-lib`"
12
+ }
13
+ ],
14
+ "properties": {
15
+ "projectName": {
16
+ "type": "string",
17
+ "alias": "project",
18
+ "description": "The name of the project to move.",
19
+ "x-dropdown": "projects"
20
+ },
21
+ "destination": {
22
+ "type": "string",
23
+ "description": "The folder to move the project into.",
24
+ "$default": {
25
+ "$source": "argv",
26
+ "index": 0
27
+ }
28
+ },
29
+ "importPath": {
30
+ "type": "string",
31
+ "description": "The new import path to use in the `tsconfig.base.json`."
32
+ },
33
+ "updateImportPath": {
34
+ "type": "boolean",
35
+ "description": "Should the generator update the import path to reflect the new location?",
36
+ "default": true
37
+ },
38
+ "skipFormat": {
39
+ "type": "boolean",
40
+ "aliases": ["skip-format"],
41
+ "description": "Skip formatting files.",
42
+ "default": false,
43
+ "x-priority": "internal"
44
+ }
45
+ },
46
+ "required": ["projectName", "destination"]
47
+ }
@@ -0,0 +1,13 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.md]
12
+ max_line_length = off
13
+ trim_trailing_whitespace = false
@@ -0,0 +1,39 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # compiled output
4
+ dist
5
+ tmp
6
+ /out-tsc
7
+
8
+ # dependencies
9
+ node_modules
10
+
11
+ # IDEs and editors
12
+ /.idea
13
+ .project
14
+ .classpath
15
+ .c9/
16
+ *.launch
17
+ .settings/
18
+ *.sublime-workspace
19
+
20
+ # IDE - VSCode
21
+ .vscode/*
22
+ !.vscode/settings.json
23
+ !.vscode/tasks.json
24
+ !.vscode/launch.json
25
+ !.vscode/extensions.json
26
+
27
+ # misc
28
+ /.sass-cache
29
+ /connect.lock
30
+ /coverage
31
+ /libpeerconnection.log
32
+ npm-debug.log
33
+ yarn-error.log
34
+ testem.log
35
+ /typings
36
+
37
+ # System Files
38
+ .DS_Store
39
+ Thumbs.db
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ <% if(cliCommand === 'ng') { %>
4
+ "angular.ng-template",<% }
5
+ %>
6
+ "nrwl.angular-console",
7
+ "esbenp.prettier-vscode"
8
+ ]
9
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "<%= formattedNames.fileName %>",
3
+ "version": "0.0.0",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ },
7
+ "private": true,
8
+ "dependencies": {
9
+ },
10
+ "devDependencies": {
11
+ "nx": "<%= nxVersion %>",
12
+ "@nrwl/workspace": "<%= nxVersion %>"
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "../dist/out-tsc/tools",
5
+ "rootDir": ".",
6
+ "module": "commonjs",
7
+ "target": "es5",
8
+ "types": ["node"],
9
+ "importHelpers": false
10
+ },
11
+ "include": ["**/*.ts"]
12
+ }
@@ -0,0 +1,39 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # compiled output
4
+ dist
5
+ tmp
6
+ /out-tsc
7
+
8
+ # dependencies
9
+ node_modules
10
+
11
+ # IDEs and editors
12
+ /.idea
13
+ .project
14
+ .classpath
15
+ .c9/
16
+ *.launch
17
+ .settings/
18
+ *.sublime-workspace
19
+
20
+ # IDE - VSCode
21
+ .vscode/*
22
+ !.vscode/settings.json
23
+ !.vscode/tasks.json
24
+ !.vscode/launch.json
25
+ !.vscode/extensions.json
26
+
27
+ # misc
28
+ /.sass-cache
29
+ /connect.lock
30
+ /coverage
31
+ /libpeerconnection.log
32
+ npm-debug.log
33
+ yarn-error.log
34
+ testem.log
35
+ /typings
36
+
37
+ # System Files
38
+ .DS_Store
39
+ Thumbs.db
@@ -0,0 +1,8 @@
1
+ {
2
+ "recommendations": [
3
+ <% if(cliCommand === 'ng') { %>
4
+ "angular.ng-template",<% }
5
+ %>
6
+ "nrwl.angular-console"
7
+ ]
8
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "<%= formattedNames.fileName %>",
3
+ "version": "0.0.0",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ },
7
+ "private": true,
8
+ "dependencies": {
9
+ },
10
+ "devDependencies": {
11
+ "nx": "<%= nxVersion %>"
12
+ }
13
+ }
@@ -0,0 +1,21 @@
1
+ # <%= formattedNames.className %>
2
+
3
+ <a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
4
+
5
+ ✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨<% if (!!appName) { %>
6
+
7
+ ## Development server
8
+
9
+ Run `nx serve <%= appName %>` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.<% } %>
10
+
11
+ ## Understand this workspace
12
+
13
+ Run `nx graph` to see a diagram of the dependencies of the projects.
14
+
15
+ ## Remote caching
16
+
17
+ Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster.
18
+
19
+ ## Further help
20
+
21
+ Visit the [Nx Documentation](https://nx.dev) to learn more.
@@ -0,0 +1,39 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # compiled output
4
+ dist
5
+ tmp
6
+ /out-tsc
7
+
8
+ # dependencies
9
+ node_modules
10
+
11
+ # IDEs and editors
12
+ /.idea
13
+ .project
14
+ .classpath
15
+ .c9/
16
+ *.launch
17
+ .settings/
18
+ *.sublime-workspace
19
+
20
+ # IDE - VSCode
21
+ .vscode/*
22
+ !.vscode/settings.json
23
+ !.vscode/tasks.json
24
+ !.vscode/launch.json
25
+ !.vscode/extensions.json
26
+
27
+ # misc
28
+ /.sass-cache
29
+ /connect.lock
30
+ /coverage
31
+ /libpeerconnection.log
32
+ npm-debug.log
33
+ yarn-error.log
34
+ testem.log
35
+ /typings
36
+
37
+ # System Files
38
+ .DS_Store
39
+ Thumbs.db
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [<% if(cliCommand === 'ng') { %>
3
+ "angular.ng-template",<% } %>
4
+ "nrwl.angular-console"
5
+ ]
6
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "<%= formattedNames.fileName %>",
3
+ "version": "0.0.0",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ },
7
+ "private": true,
8
+ "dependencies": {
9
+ },
10
+ "devDependencies": {
11
+ "@nrwl/workspace": "<%= nxVersion %>",
12
+ "nx": "<%= nxVersion %>"
13
+ }
14
+ }
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { NormalizedSchema } from './new';
3
+ export declare function addPresetDependencies(host: Tree, options: NormalizedSchema): import("@nx/devkit").GeneratorCallback;
4
+ export declare function generatePreset(host: Tree, opts: NormalizedSchema): Promise<void>;