@cbnventures/nova 0.32.0 → 0.34.0

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 (316) hide show
  1. package/bin/nova.mjs +5 -2
  2. package/build/package.json +3 -2
  3. package/build/scaffold-versions.json +21 -14
  4. package/build/src/api/app-store-connect.d.ts +28 -0
  5. package/build/src/api/app-store-connect.d.ts.map +1 -0
  6. package/build/src/api/app-store-connect.js +494 -0
  7. package/build/src/api/app-store-connect.js.map +1 -0
  8. package/build/src/api/google-play-console.d.ts +15 -0
  9. package/build/src/api/google-play-console.d.ts.map +1 -0
  10. package/build/src/api/google-play-console.js +136 -0
  11. package/build/src/api/google-play-console.js.map +1 -0
  12. package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts +4 -2
  13. package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts.map +1 -1
  14. package/build/src/cli/generate/github/workflows-blueprint-validate.js +219 -3
  15. package/build/src/cli/generate/github/workflows-blueprint-validate.js.map +1 -1
  16. package/build/src/cli/generate/github/workflows-blueprint.d.ts +6 -0
  17. package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -1
  18. package/build/src/cli/generate/github/workflows-blueprint.js +469 -59
  19. package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -1
  20. package/build/src/cli/index.js +188 -47
  21. package/build/src/cli/index.js.map +1 -1
  22. package/build/src/cli/integration/app-store-connect.d.ts +22 -0
  23. package/build/src/cli/integration/app-store-connect.d.ts.map +1 -0
  24. package/build/src/cli/integration/app-store-connect.js +502 -0
  25. package/build/src/cli/integration/app-store-connect.js.map +1 -0
  26. package/build/src/cli/integration/discord-developer-portal.d.ts +6 -0
  27. package/build/src/cli/integration/discord-developer-portal.d.ts.map +1 -0
  28. package/build/src/cli/integration/discord-developer-portal.js +42 -0
  29. package/build/src/cli/integration/discord-developer-portal.js.map +1 -0
  30. package/build/src/cli/integration/google-play-console.d.ts +16 -0
  31. package/build/src/cli/integration/google-play-console.d.ts.map +1 -0
  32. package/build/src/cli/integration/google-play-console.js +199 -0
  33. package/build/src/cli/integration/google-play-console.js.map +1 -0
  34. package/build/src/cli/integration/index.d.ts +8 -0
  35. package/build/src/cli/integration/index.d.ts.map +1 -0
  36. package/build/src/cli/integration/index.js +139 -0
  37. package/build/src/cli/integration/index.js.map +1 -0
  38. package/build/src/cli/recipe/github/sync-rulesets.js +2 -2
  39. package/build/src/cli/recipe/github/sync-rulesets.js.map +1 -1
  40. package/build/src/cli/recipe/index.d.ts.map +1 -1
  41. package/build/src/cli/recipe/index.js +5 -0
  42. package/build/src/cli/recipe/index.js.map +1 -1
  43. package/build/src/cli/recipe/miscellaneous/fix-markdown-tables.d.ts.map +1 -1
  44. package/build/src/cli/recipe/miscellaneous/fix-markdown-tables.js +15 -0
  45. package/build/src/cli/recipe/miscellaneous/fix-markdown-tables.js.map +1 -1
  46. package/build/src/cli/recipe/nova-config/normalize-order.d.ts +5 -0
  47. package/build/src/cli/recipe/nova-config/normalize-order.d.ts.map +1 -0
  48. package/build/src/cli/recipe/nova-config/normalize-order.js +104 -0
  49. package/build/src/cli/recipe/nova-config/normalize-order.js.map +1 -0
  50. package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
  51. package/build/src/cli/recipe/package-json/normalize-tooling.js +55 -10
  52. package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
  53. package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -1
  54. package/build/src/cli/recipe/package-json/sync-identity.js +51 -18
  55. package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -1
  56. package/build/src/cli/scaffold/app/android.d.ts.map +1 -1
  57. package/build/src/cli/scaffold/app/android.js +6 -0
  58. package/build/src/cli/scaffold/app/android.js.map +1 -1
  59. package/build/src/cli/scaffold/app/apple.d.ts.map +1 -1
  60. package/build/src/cli/scaffold/app/apple.js +7 -0
  61. package/build/src/cli/scaffold/app/apple.js.map +1 -1
  62. package/build/src/cli/scaffold/app/astro.d.ts.map +1 -1
  63. package/build/src/cli/scaffold/app/astro.js +15 -0
  64. package/build/src/cli/scaffold/app/astro.js.map +1 -1
  65. package/build/src/cli/scaffold/app/discord-bot.d.ts.map +1 -1
  66. package/build/src/cli/scaffold/app/discord-bot.js +20 -1
  67. package/build/src/cli/scaffold/app/discord-bot.js.map +1 -1
  68. package/build/src/cli/scaffold/app/expressjs.d.ts.map +1 -1
  69. package/build/src/cli/scaffold/app/expressjs.js +20 -1
  70. package/build/src/cli/scaffold/app/expressjs.js.map +1 -1
  71. package/build/src/cli/scaffold/app/nextjs.d.ts.map +1 -1
  72. package/build/src/cli/scaffold/app/nextjs.js +9 -1
  73. package/build/src/cli/scaffold/app/nextjs.js.map +1 -1
  74. package/build/src/cli/scaffold/app/vite.d.ts.map +1 -1
  75. package/build/src/cli/scaffold/app/vite.js +15 -1
  76. package/build/src/cli/scaffold/app/vite.js.map +1 -1
  77. package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -1
  78. package/build/src/cli/scaffold/docs/docusaurus.js +13 -2
  79. package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -1
  80. package/build/src/cli/scaffold/package/github-action.d.ts.map +1 -1
  81. package/build/src/cli/scaffold/package/github-action.js +5 -0
  82. package/build/src/cli/scaffold/package/github-action.js.map +1 -1
  83. package/build/src/cli/scaffold/package/homebridge.d.ts.map +1 -1
  84. package/build/src/cli/scaffold/package/homebridge.js +5 -0
  85. package/build/src/cli/scaffold/package/homebridge.js.map +1 -1
  86. package/build/src/cli/scaffold/package/pfsense.d.ts.map +1 -1
  87. package/build/src/cli/scaffold/package/pfsense.js +5 -0
  88. package/build/src/cli/scaffold/package/pfsense.js.map +1 -1
  89. package/build/src/cli/scaffold/starter/base.d.ts.map +1 -1
  90. package/build/src/cli/scaffold/starter/base.js +2 -1
  91. package/build/src/cli/scaffold/starter/base.js.map +1 -1
  92. package/build/src/cli/scaffold/tool/serverless.d.ts.map +1 -1
  93. package/build/src/cli/scaffold/tool/serverless.js +9 -0
  94. package/build/src/cli/scaffold/tool/serverless.js.map +1 -1
  95. package/build/src/cli/utility/changelog.d.ts +2 -0
  96. package/build/src/cli/utility/changelog.d.ts.map +1 -1
  97. package/build/src/cli/utility/changelog.js +241 -129
  98. package/build/src/cli/utility/changelog.js.map +1 -1
  99. package/build/src/cli/utility/configure.d.ts +4 -1
  100. package/build/src/cli/utility/configure.d.ts.map +1 -1
  101. package/build/src/cli/utility/configure.js +414 -58
  102. package/build/src/cli/utility/configure.js.map +1 -1
  103. package/build/src/cli/utility/run-recipes.d.ts.map +1 -1
  104. package/build/src/cli/utility/run-recipes.js +7 -26
  105. package/build/src/cli/utility/run-recipes.js.map +1 -1
  106. package/build/src/lib/constants.d.ts +2 -1
  107. package/build/src/lib/constants.d.ts.map +1 -1
  108. package/build/src/lib/constants.js +1 -0
  109. package/build/src/lib/constants.js.map +1 -1
  110. package/build/src/lib/docker-packaging.d.ts +22 -1
  111. package/build/src/lib/docker-packaging.d.ts.map +1 -1
  112. package/build/src/lib/docker-packaging.js +1044 -76
  113. package/build/src/lib/docker-packaging.js.map +1 -1
  114. package/build/src/lib/file-discovery.js +1 -1
  115. package/build/src/lib/file-discovery.js.map +1 -1
  116. package/build/src/lib/ignore-files.d.ts.map +1 -1
  117. package/build/src/lib/ignore-files.js +4 -1
  118. package/build/src/lib/ignore-files.js.map +1 -1
  119. package/build/src/lib/integration.d.ts +14 -0
  120. package/build/src/lib/integration.d.ts.map +1 -0
  121. package/build/src/lib/integration.js +323 -0
  122. package/build/src/lib/integration.js.map +1 -0
  123. package/build/src/lib/item.d.ts.map +1 -1
  124. package/build/src/lib/item.js +5 -1
  125. package/build/src/lib/item.js.map +1 -1
  126. package/build/src/lib/nova-config-order.d.ts +3 -0
  127. package/build/src/lib/nova-config-order.d.ts.map +1 -0
  128. package/build/src/lib/nova-config-order.js +38 -0
  129. package/build/src/lib/nova-config-order.js.map +1 -0
  130. package/build/src/lib/nova-config.d.ts +2 -2
  131. package/build/src/lib/nova-config.d.ts.map +1 -1
  132. package/build/src/lib/nova-config.js +73 -8
  133. package/build/src/lib/nova-config.js.map +1 -1
  134. package/build/src/lib/package-scripts.d.ts.map +1 -1
  135. package/build/src/lib/package-scripts.js +2 -1
  136. package/build/src/lib/package-scripts.js.map +1 -1
  137. package/build/src/lib/regex.d.ts +8 -0
  138. package/build/src/lib/regex.d.ts.map +1 -1
  139. package/build/src/lib/regex.js +10 -2
  140. package/build/src/lib/regex.js.map +1 -1
  141. package/build/src/lib/release-history.d.ts +2 -1
  142. package/build/src/lib/release-history.d.ts.map +1 -1
  143. package/build/src/lib/release-history.js +18 -0
  144. package/build/src/lib/release-history.js.map +1 -1
  145. package/build/src/lib/run-workspaces.d.ts +3 -0
  146. package/build/src/lib/run-workspaces.d.ts.map +1 -1
  147. package/build/src/lib/run-workspaces.js +132 -2
  148. package/build/src/lib/run-workspaces.js.map +1 -1
  149. package/build/src/lib/scaffold-allow-scripts.d.ts +4 -0
  150. package/build/src/lib/scaffold-allow-scripts.d.ts.map +1 -0
  151. package/build/src/lib/scaffold-allow-scripts.js +76 -0
  152. package/build/src/lib/scaffold-allow-scripts.js.map +1 -0
  153. package/build/src/lib/scaffold.d.ts +4 -3
  154. package/build/src/lib/scaffold.d.ts.map +1 -1
  155. package/build/src/lib/scaffold.js +287 -44
  156. package/build/src/lib/scaffold.js.map +1 -1
  157. package/build/src/lib/transpile.d.ts.map +1 -1
  158. package/build/src/lib/transpile.js +6 -5
  159. package/build/src/lib/transpile.js.map +1 -1
  160. package/build/src/lib/type-check.d.ts +3 -1
  161. package/build/src/lib/type-check.d.ts.map +1 -1
  162. package/build/src/lib/type-check.js +22 -6
  163. package/build/src/lib/type-check.js.map +1 -1
  164. package/build/src/lib/utility.d.ts.map +1 -1
  165. package/build/src/lib/utility.js +0 -7
  166. package/build/src/lib/utility.js.map +1 -1
  167. package/build/src/lib/version-contract.d.ts +7 -0
  168. package/build/src/lib/version-contract.d.ts.map +1 -0
  169. package/build/src/lib/version-contract.js +80 -0
  170. package/build/src/lib/version-contract.js.map +1 -0
  171. package/build/src/lib/version-strategy-migration.d.ts +6 -0
  172. package/build/src/lib/version-strategy-migration.d.ts.map +1 -0
  173. package/build/src/lib/version-strategy-migration.js +208 -0
  174. package/build/src/lib/version-strategy-migration.js.map +1 -0
  175. package/build/src/lib/workflow-templates.d.ts.map +1 -1
  176. package/build/src/lib/workflow-templates.js +22 -1
  177. package/build/src/lib/workflow-templates.js.map +1 -1
  178. package/build/src/presets/eslint/dx-ignore.d.ts.map +1 -1
  179. package/build/src/presets/eslint/dx-ignore.js +7 -0
  180. package/build/src/presets/eslint/dx-ignore.js.map +1 -1
  181. package/build/src/types/api/app-store-connect.d.ts +427 -0
  182. package/build/src/types/api/google-play-console.d.ts +146 -0
  183. package/build/src/types/cli/generate/github/workflows-blueprint-validate.d.ts +65 -0
  184. package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +96 -12
  185. package/build/src/types/cli/index.d.ts +9 -32
  186. package/build/src/types/cli/integration/app-store-connect.d.ts +353 -0
  187. package/build/src/types/cli/integration/discord-developer-portal.d.ts +36 -0
  188. package/build/src/types/cli/integration/google-play-console.d.ts +145 -0
  189. package/build/src/types/cli/integration/index.d.ts +31 -0
  190. package/build/src/types/cli/recipe/index.d.ts +3 -1
  191. package/build/src/types/cli/recipe/miscellaneous/fix-markdown-tables.d.ts +26 -0
  192. package/build/src/types/cli/recipe/nova-config/normalize-order.d.ts +64 -0
  193. package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +19 -1
  194. package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +9 -0
  195. package/build/src/types/cli/utility/changelog.d.ts +149 -0
  196. package/build/src/types/cli/utility/configure.d.ts +219 -8
  197. package/build/src/types/cli/utility/run-recipes.d.ts +1 -8
  198. package/build/src/types/lib/constants.d.ts +7 -0
  199. package/build/src/types/lib/docker-packaging.d.ts +447 -47
  200. package/build/src/types/lib/integration.d.ts +264 -0
  201. package/build/src/types/lib/item.d.ts +4 -0
  202. package/build/src/types/lib/nova-config-order.d.ts +31 -0
  203. package/build/src/types/lib/nova-config.d.ts +40 -1
  204. package/build/src/types/lib/package-scripts.d.ts +2 -0
  205. package/build/src/types/lib/release-history.d.ts +15 -0
  206. package/build/src/types/lib/run-workspaces.d.ts +135 -0
  207. package/build/src/types/lib/scaffold-allow-scripts.d.ts +54 -0
  208. package/build/src/types/lib/scaffold.d.ts +157 -2
  209. package/build/src/types/lib/transpile.d.ts +2 -0
  210. package/build/src/types/lib/type-check.d.ts +28 -0
  211. package/build/src/types/lib/utility.d.ts +0 -13
  212. package/build/src/types/lib/version-contract.d.ts +84 -0
  213. package/build/src/types/lib/version-strategy-migration.d.ts +207 -0
  214. package/build/src/types/shared.d.ts +491 -3
  215. package/build/src/types/tests/cli/generate/github/workflows-blueprint-validate.test.d.ts +60 -0
  216. package/build/src/types/tests/cli/generate/github/workflows-blueprint.test.d.ts +11 -0
  217. package/build/src/types/tests/cli/generate/github/workflows-version-contract.test.d.ts +65 -0
  218. package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +4 -0
  219. package/build/src/types/tests/cli/integration.test.d.ts +97 -0
  220. package/build/src/types/tests/cli/recipe/nova-config/normalize-order.test.d.ts +31 -0
  221. package/build/src/types/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +46 -25
  222. package/build/src/types/tests/cli/recipe/package-json/sync-identity-version-contract.test.d.ts +57 -0
  223. package/build/src/types/tests/cli/scaffold/app/android.test.d.ts +8 -0
  224. package/build/src/types/tests/cli/scaffold/app/apple.test.d.ts +6 -0
  225. package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +4 -0
  226. package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +26 -0
  227. package/build/src/types/tests/cli/utility/changelog-android.test.d.ts +48 -0
  228. package/build/src/types/tests/cli/utility/changelog-apple.test.d.ts +72 -0
  229. package/build/src/types/tests/cli/utility/changelog.test.d.ts +20 -12
  230. package/build/src/types/tests/cli/utility/configure.test.d.ts +119 -0
  231. package/build/src/types/tests/cli/utility/run-recipes.test.d.ts +7 -56
  232. package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +2 -0
  233. package/build/src/types/tests/cli/utility/run-workspaces.test.d.ts +48 -0
  234. package/build/src/types/tests/lib/docker-packaging.test.d.ts +169 -27
  235. package/build/src/types/tests/lib/ignore-files.test.d.ts +2 -0
  236. package/build/src/types/tests/lib/integration.test.d.ts +60 -0
  237. package/build/src/types/tests/lib/nova-config-run-workspaces-cache.test.d.ts +2 -2
  238. package/build/src/types/tests/lib/nova-config.test.d.ts +17 -0
  239. package/build/src/types/tests/lib/scaffold-allow-scripts.test.d.ts +14 -0
  240. package/build/src/types/tests/lib/scaffold-version-contract.test.d.ts +59 -0
  241. package/build/src/types/tests/lib/scaffold.test.d.ts +33 -0
  242. package/build/src/types/tests/lib/type-check.test.d.ts +26 -0
  243. package/build/src/types/tests/lib/utility.test.d.ts +21 -0
  244. package/build/src/types/tests/lib/version-contract.test.d.ts +66 -0
  245. package/build/src/types/tests/lib/version-strategy-migration.test.d.ts +85 -0
  246. package/build/src/types/tests/lib/workflow-templates.test.d.ts +4 -0
  247. package/build/src/types/tests/presets/eslint/dx-ignore.test.d.ts +14 -0
  248. package/build/src/types/tests/scaffold-output-contract.test.d.ts +26 -0
  249. package/build/templates/generators/must-haves/agent-conventions/PROJECT_RULES.md +107 -196
  250. package/build/templates/generators/must-haves/agent-conventions/VISION.md +91 -22
  251. package/build/templates/generators/must-haves/agent-conventions/conventions/docker.md +4 -4
  252. package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +4 -2
  253. package/build/templates/scaffold/app/android/package.json +2 -2
  254. package/build/templates/scaffold/app/android/scripts/run-gradle.mjs +21 -4
  255. package/build/templates/scaffold/app/apple/eslint.config.mts +42 -0
  256. package/build/templates/scaffold/app/apple/package.json +11 -3
  257. package/build/templates/scaffold/app/apple/project.yml +1 -1
  258. package/build/templates/scaffold/app/apple/scripts/run-apple.mjs +2 -1
  259. package/build/templates/scaffold/app/apple/tsconfig.scripts.json +17 -0
  260. package/build/templates/scaffold/app/apple/tsconfig.tests.json +18 -0
  261. package/build/templates/scaffold/app/apple/vitest.config.mts +16 -0
  262. package/build/templates/scaffold/app/astro/package.json +2 -2
  263. package/build/templates/scaffold/app/discord-bot/package.json +2 -2
  264. package/build/templates/scaffold/app/express/package.json +2 -2
  265. package/build/templates/scaffold/app/nextjs/package.json +2 -2
  266. package/build/templates/scaffold/app/vite/package.json +2 -2
  267. package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +4 -3
  268. package/build/templates/scaffold/docs/docusaurus/eslint.config.mts +61 -3
  269. package/build/templates/scaffold/docs/docusaurus/package.json +6 -4
  270. package/build/templates/scaffold/docs/docusaurus/src/pages/index.tsx +2 -2
  271. package/build/templates/scaffold/docs/docusaurus/src/tests/dotenv.test.ts +27 -0
  272. package/build/templates/scaffold/docs/docusaurus/src/tests/frontmatter.test.ts +1 -1
  273. package/build/templates/scaffold/docs/docusaurus/src/tests/link.test.ts +1 -1
  274. package/build/templates/scaffold/docs/docusaurus/src/tests/markdown-table.test.ts +1 -1
  275. package/build/templates/scaffold/docs/docusaurus/src/tests/terminology.test.ts +1 -1
  276. package/build/templates/scaffold/docs/docusaurus/src/tests/type-declarations.test.ts +1 -1
  277. package/build/templates/scaffold/docs/docusaurus/src/types/pages/index.d.ts +2 -2
  278. package/build/templates/scaffold/docs/docusaurus/tsconfig.app.json +33 -0
  279. package/build/templates/scaffold/docs/docusaurus/tsconfig.config.json +21 -0
  280. package/build/templates/scaffold/docs/docusaurus/tsconfig.json +11 -17
  281. package/build/templates/scaffold/docs/docusaurus/tsconfig.tests.json +28 -0
  282. package/build/templates/scaffold/docs/docusaurus/vitest.config.mts +1 -14
  283. package/build/templates/scaffold/docs/docusaurus/vitest.setup.ts +3 -3
  284. package/build/templates/scaffold/package/github-action/package.json +2 -2
  285. package/build/templates/scaffold/package/homebridge/bin/repl.mjs +5 -2
  286. package/build/templates/scaffold/package/homebridge/bin/test-api.mjs +5 -2
  287. package/build/templates/scaffold/package/homebridge/package.json +2 -2
  288. package/build/templates/scaffold/package/pfsense/package.json +2 -2
  289. package/build/templates/scaffold/starter/base/assets/README.md +7 -0
  290. package/build/templates/scaffold-options/app/android-native/app/build.gradle.kts +1 -1
  291. package/build/templates/scaffold-options/app/android-native/gradlew.bat +84 -84
  292. package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/creative-assets/README.md +10 -0
  293. package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/metadata/ios/en-US.json +8 -0
  294. package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/metadata/macos/en-US.json +8 -0
  295. package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/screenshots/README.md +13 -0
  296. package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/graphic-assets/README.md +12 -0
  297. package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/metadata/android/en-US.json +6 -0
  298. package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/screenshots/README.md +13 -0
  299. package/build/templates/scaffold-options/docker-image/common/Dockerfile +81 -0
  300. package/build/templates/scaffold-options/docker-image/common/compose.yml +21 -0
  301. package/build/templates/scaffold-options/docker-image/common/dockerignore +38 -0
  302. package/build/templates/scaffold-options/package/node-cli-core/bin/cli.mjs +5 -2
  303. package/build/templates/scaffold-options/tool/serverless/cloudflare-workers/package.json +2 -2
  304. package/build/templates/scaffold-options/tool/serverless/vercel-functions/package.json +2 -2
  305. package/package.json +3 -2
  306. package/build/templates/scaffold-options/docker-image/astro-node/Dockerfile +0 -27
  307. package/build/templates/scaffold-options/docker-image/astro-node/compose.yml +0 -12
  308. package/build/templates/scaffold-options/docker-image/background-service/compose.yml +0 -10
  309. package/build/templates/scaffold-options/docker-image/container-native/Dockerfile +0 -10
  310. package/build/templates/scaffold-options/docker-image/container-native/compose.yml +0 -8
  311. package/build/templates/scaffold-options/docker-image/http-service/compose.yml +0 -11
  312. package/build/templates/scaffold-options/docker-image/nextjs-standalone/Dockerfile +0 -26
  313. package/build/templates/scaffold-options/docker-image/nextjs-standalone/compose.yml +0 -12
  314. package/build/templates/scaffold-options/docker-image/node/Dockerfile +0 -23
  315. package/build/templates/scaffold-options/docker-image/static-site/Dockerfile +0 -18
  316. package/build/templates/scaffold-options/docker-image/static-site/compose.yml +0 -8
@@ -13,6 +13,7 @@ import { Runner as LibNovaConfig } from '../../lib/nova-config.js';
13
13
  import { LIB_REGEX_LINEBREAK_CRLF_OR_LF, LIB_REGEX_PATTERN_EMAIL_SIMPLE, LIB_REGEX_PATTERN_ENV_VAR_KEY, LIB_REGEX_PATTERN_GITHUB_LABEL_COLOR, LIB_REGEX_PATTERN_SLUG_SCOPED, LIB_REGEX_PATTERN_SLUG_SIMPLE, LIB_REGEX_PATTERN_YML_EXTENSION, } from '../../lib/regex.js';
14
14
  import { Runner as LibReleaseHistory } from '../../lib/release-history.js';
15
15
  import { discoverPathsWithFile, isPlainObject, pathExists, resolveTemplatePath, } from '../../lib/utility.js';
16
+ import { Runner as LibVersionStrategyMigration } from '../../lib/version-strategy-migration.js';
16
17
  import { libWorkflowTemplatesMetadata } from '../../lib/workflow-templates.js';
17
18
  import { Logger } from '../../toolkit/index.js';
18
19
  export class Runner {
@@ -40,6 +41,7 @@ export class Runner {
40
41
  }
41
42
  const novaConfig = new LibNovaConfig();
42
43
  const workingFile = await novaConfig.load();
44
+ const currentStrategy = (workingFile['settings'] === undefined) ? 'semver' : workingFile['settings']['versionStrategy'] ?? 'semver';
43
45
  try {
44
46
  await LibReleaseHistory.validateStrategy(workingFile, currentDirectory);
45
47
  }
@@ -63,6 +65,19 @@ export class Runner {
63
65
  }).debug('Prompt flow exited without saving.');
64
66
  return;
65
67
  }
68
+ const nextStrategy = (workingFile['settings'] === undefined) ? 'semver' : workingFile['settings']['versionStrategy'] ?? 'semver';
69
+ let migrationPlan = undefined;
70
+ try {
71
+ migrationPlan = await LibVersionStrategyMigration.prepare(currentDirectory, workingFile, currentStrategy, nextStrategy);
72
+ }
73
+ catch (error) {
74
+ Logger.customize({
75
+ name: 'Runner.run',
76
+ purpose: 'versionStrategyMigration',
77
+ }).error((error instanceof Error) ? error.message : 'Unable to prepare the version strategy migration.');
78
+ process.exitCode = 1;
79
+ return;
80
+ }
66
81
  novaConfig.set(workingFile);
67
82
  if (isDryRun === true) {
68
83
  Logger.customize({
@@ -72,6 +87,13 @@ export class Runner {
72
87
  return;
73
88
  }
74
89
  await novaConfig.save(isReplaceFile);
90
+ await LibVersionStrategyMigration.apply(migrationPlan);
91
+ if (migrationPlan['writes'].length > 0) {
92
+ Logger.customize({
93
+ name: 'Runner.run',
94
+ purpose: 'versionStrategyMigration',
95
+ }).info(`Migrated ${migrationPlan['writes'].length} file(s) from ${migrationPlan['currentStrategy']} to ${migrationPlan['nextStrategy']}.`);
96
+ }
75
97
  return;
76
98
  }
77
99
  static getOptionalBooleanInitial(value) {
@@ -106,7 +128,7 @@ export class Runner {
106
128
  }
107
129
  const trimmed = value.trim();
108
130
  if (isSupportedIgnoreFileConfigPath(trimmed) === false) {
109
- return 'Use a project-relative path ending in .gitignore, .dockerignore, or .assetsignore.';
131
+ return 'Use a project-relative .gitignore or .assetsignore path, or the root path ./.dockerignore.';
110
132
  }
111
133
  return true;
112
134
  }
@@ -132,6 +154,54 @@ export class Runner {
132
154
  }
133
155
  return true;
134
156
  }
157
+ static isOptionalWorkflowTimeoutInput(value) {
158
+ if (typeof value !== 'string') {
159
+ return 'Enter a whole number from 1 through 360, or leave the field blank.';
160
+ }
161
+ const trimmed = value.trim();
162
+ if (trimmed === '') {
163
+ return true;
164
+ }
165
+ const parsed = Number.parseInt(trimmed, 10);
166
+ if (Number.isInteger(parsed) === false
167
+ || parsed < 1
168
+ || parsed > 360
169
+ || `${parsed}` !== trimmed) {
170
+ return 'Enter a whole number from 1 through 360, or leave the field blank.';
171
+ }
172
+ return true;
173
+ }
174
+ static isPositiveIntegerRecordInput(value) {
175
+ if (typeof value !== 'string') {
176
+ return 'Enter a JSON object with positive integer values.';
177
+ }
178
+ const trimmed = value.trim();
179
+ if (trimmed === '') {
180
+ return true;
181
+ }
182
+ try {
183
+ const parsed = JSON.parse(trimmed);
184
+ if (isPlainObject(parsed) === false) {
185
+ return 'Enter a JSON object with positive integer values.';
186
+ }
187
+ const entries = Object.entries(parsed);
188
+ if (entries.some((entry) => {
189
+ const typedEntry = entry;
190
+ const entryKey = typedEntry[0].trim();
191
+ const entryValue = typedEntry[1];
192
+ return (entryKey.length === 0
193
+ || typeof entryValue !== 'number'
194
+ || Number.isInteger(entryValue) === false
195
+ || entryValue < 1);
196
+ }) === true) {
197
+ return 'Enter non-empty script names with whole-number limits greater than zero.';
198
+ }
199
+ }
200
+ catch {
201
+ return 'Enter valid JSON, for example {"build":2,"check":2}.';
202
+ }
203
+ return true;
204
+ }
135
205
  static isStringArrayInput(value) {
136
206
  if (typeof value !== 'string') {
137
207
  return 'Enter a JSON array of strings.';
@@ -179,6 +249,13 @@ export class Runner {
179
249
  }
180
250
  return JSON.parse(trimmed);
181
251
  }
252
+ static parsePositiveIntegerRecordInput(value) {
253
+ const trimmed = value.trim();
254
+ if (trimmed === '') {
255
+ return {};
256
+ }
257
+ return JSON.parse(trimmed);
258
+ }
182
259
  static parseStringArrayInput(value) {
183
260
  const trimmed = value.trim();
184
261
  if (trimmed === '') {
@@ -470,6 +547,16 @@ export class Runner {
470
547
  value: 'swift',
471
548
  selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('swift') === true,
472
549
  },
550
+ {
551
+ title: 'iOS',
552
+ value: 'ios',
553
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('ios') === true,
554
+ },
555
+ {
556
+ title: 'visionOS',
557
+ value: 'visionos',
558
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('visionos') === true,
559
+ },
473
560
  {
474
561
  title: 'Android',
475
562
  value: 'android',
@@ -515,6 +602,11 @@ export class Runner {
515
602
  value: 'windows',
516
603
  selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('windows') === true,
517
604
  },
605
+ {
606
+ title: 'Discord',
607
+ value: 'discord',
608
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('discord') === true,
609
+ },
518
610
  {
519
611
  title: 'Homebridge',
520
612
  value: 'homebridge',
@@ -1548,8 +1640,13 @@ export class Runner {
1548
1640
  suggestedBugReportFields.push('nodejs');
1549
1641
  }
1550
1642
  const hasSwiftPlatform = configuredPlatforms !== undefined && configuredPlatforms.includes('swift') === true;
1643
+ const hasIosPlatform = configuredPlatforms !== undefined && configuredPlatforms.includes('ios') === true;
1551
1644
  const hasMacosPlatform = configuredPlatforms !== undefined && configuredPlatforms.includes('macos') === true;
1552
- if (hasSwiftPlatform === true || hasMacosPlatform === true) {
1645
+ const hasVisionosPlatform = configuredPlatforms !== undefined && configuredPlatforms.includes('visionos') === true;
1646
+ if (hasSwiftPlatform === true
1647
+ || hasIosPlatform === true
1648
+ || hasMacosPlatform === true
1649
+ || hasVisionosPlatform === true) {
1553
1650
  suggestedBugReportFields.push('apple');
1554
1651
  }
1555
1652
  const hasAndroidPlatform = configuredPlatforms !== undefined && configuredPlatforms.includes('android') === true;
@@ -2404,6 +2501,10 @@ export class Runner {
2404
2501
  const github = config['github'] ?? {};
2405
2502
  const existingRulesets = github['rulesets'] ?? {};
2406
2503
  const existing = existingRulesets['defaultBranch'] ?? {};
2504
+ let requiredStatusChecksModeInitial = 0;
2505
+ if (existing['requiredStatusChecks'] !== undefined) {
2506
+ requiredStatusChecksModeInitial = (existing['requiredStatusChecks'].length === 0) ? 1 : 2;
2507
+ }
2407
2508
  const output = await Runner.promptWithCancel([
2408
2509
  {
2409
2510
  type: 'select',
@@ -2544,10 +2645,24 @@ export class Runner {
2544
2645
  initial: Runner.getOptionalBooleanInitial(existing['requireConversationResolution']),
2545
2646
  },
2546
2647
  {
2547
- type: 'text',
2548
- name: 'requiredStatusChecks',
2549
- message: 'Required status checks (comma-separated; blank unsets)',
2550
- initial: (existing['requiredStatusChecks'] === undefined) ? '' : existing['requiredStatusChecks'].join(', '),
2648
+ type: 'select',
2649
+ name: 'requiredStatusChecksMode',
2650
+ message: 'Required status checks',
2651
+ choices: [
2652
+ {
2653
+ title: 'Unset',
2654
+ value: 'unset',
2655
+ },
2656
+ {
2657
+ title: 'No required status checks',
2658
+ value: 'none',
2659
+ },
2660
+ {
2661
+ title: 'Require specific status checks',
2662
+ value: 'list',
2663
+ },
2664
+ ],
2665
+ initial: requiredStatusChecksModeInitial,
2551
2666
  },
2552
2667
  {
2553
2668
  type: 'select',
@@ -2576,6 +2691,8 @@ export class Runner {
2576
2691
  const outputResult = output['result'];
2577
2692
  const allowedMergeMethods = [];
2578
2693
  const defaultBranch = {};
2694
+ const requiredStatusChecksMode = (outputResult.requiredStatusChecksMode === 'none'
2695
+ || outputResult.requiredStatusChecksMode === 'list') ? outputResult.requiredStatusChecksMode : 'unset';
2579
2696
  if (outputResult.enforcement === 'active'
2580
2697
  || outputResult.enforcement === 'disabled'
2581
2698
  || outputResult.enforcement === 'evaluate') {
@@ -2612,9 +2729,25 @@ export class Runner {
2612
2729
  const requiredApprovals = Number.parseInt(requiredApprovalsRaw, 10);
2613
2730
  defaultBranch.requiredApprovals = requiredApprovals;
2614
2731
  }
2615
- const requiredStatusChecks = (typeof outputResult.requiredStatusChecks === 'string') ? outputResult.requiredStatusChecks.split(',').map((statusCheck) => statusCheck.trim()).filter((statusCheck) => statusCheck !== '') : [];
2616
- if (requiredStatusChecks.length > 0) {
2617
- defaultBranch.requiredStatusChecks = requiredStatusChecks;
2732
+ if (requiredStatusChecksMode === 'none') {
2733
+ defaultBranch.requiredStatusChecks = [];
2734
+ }
2735
+ else if (requiredStatusChecksMode === 'list') {
2736
+ const requiredStatusChecksOutput = await Runner.promptWithCancel({
2737
+ type: 'text',
2738
+ name: 'requiredStatusChecks',
2739
+ message: 'Required status checks (comma-separated)',
2740
+ initial: (existing['requiredStatusChecks'] === undefined) ? '' : existing['requiredStatusChecks'].join(', '),
2741
+ validate: Runner['isNonEmptyLiteralInput'],
2742
+ });
2743
+ if (requiredStatusChecksOutput['cancelled'] === true) {
2744
+ return 'back';
2745
+ }
2746
+ const requiredStatusChecksOutputResult = requiredStatusChecksOutput['result'];
2747
+ const requiredStatusChecks = requiredStatusChecksOutputResult.requiredStatusChecks.split(',').map((statusCheck) => statusCheck.trim()).filter((statusCheck) => statusCheck !== '');
2748
+ if (requiredStatusChecks.length > 0) {
2749
+ defaultBranch.requiredStatusChecks = requiredStatusChecks;
2750
+ }
2618
2751
  }
2619
2752
  if (Object.keys(defaultBranch).length > 0) {
2620
2753
  const rulesets = { defaultBranch };
@@ -2785,20 +2918,24 @@ export class Runner {
2785
2918
  return 'back';
2786
2919
  }
2787
2920
  static async promptMiscellaneousRecipes(entries) {
2788
- const existingEntry = (entries !== undefined) ? entries['remove-operating-system-files'] : undefined;
2789
- const enabledOutput = await Runner.promptWithCancel({
2790
- type: 'confirm',
2791
- name: 'enabled',
2792
- message: 'Enable remove-operating-system-files?',
2793
- initial: existingEntry !== undefined && existingEntry['enabled'] === true,
2794
- });
2795
- if (enabledOutput['cancelled'] === true) {
2921
+ const existingFixMarkdownTables = (entries !== undefined) ? entries['fix-markdown-tables'] : undefined;
2922
+ const existingRemoveOperatingSystemFiles = (entries !== undefined) ? entries['remove-operating-system-files'] : undefined;
2923
+ const promptEntries = {
2924
+ 'fix-markdown-tables': existingFixMarkdownTables ?? { enabled: false },
2925
+ 'remove-operating-system-files': {
2926
+ enabled: (existingRemoveOperatingSystemFiles !== undefined) ? existingRemoveOperatingSystemFiles['enabled'] : false,
2927
+ },
2928
+ };
2929
+ const selectedEntries = await Runner.promptRecipeEntries(promptEntries, libItemRecipesByCategory['miscellaneous'], 'Miscellaneous', ['fix-markdown-tables']);
2930
+ if (selectedEntries === undefined) {
2796
2931
  return undefined;
2797
2932
  }
2933
+ const selectedFixMarkdownTables = selectedEntries['fix-markdown-tables'] ?? { enabled: false };
2934
+ const selectedRemoveOperatingSystemFiles = selectedEntries['remove-operating-system-files'] ?? { enabled: false };
2798
2935
  const settings = {};
2799
2936
  const platforms = Object.keys(libItemOperatingSystemFilesByPlatform);
2800
2937
  for (const platform of platforms) {
2801
- const existingPlatformSettings = (existingEntry !== undefined && existingEntry['settings'] !== undefined) ? existingEntry['settings'][platform] : undefined;
2938
+ const existingPlatformSettings = (existingRemoveOperatingSystemFiles !== undefined && existingRemoveOperatingSystemFiles['settings'] !== undefined) ? existingRemoveOperatingSystemFiles['settings'][platform] : undefined;
2802
2939
  const supportedFileNames = libItemOperatingSystemFilesByPlatform[platform];
2803
2940
  const fileSettings = {};
2804
2941
  if (supportedFileNames.length === 0) {
@@ -2826,16 +2963,21 @@ export class Runner {
2826
2963
  }
2827
2964
  Reflect.set(settings, platform, fileSettings);
2828
2965
  }
2829
- const entry = {
2830
- enabled: enabledOutput['result'].enabled,
2966
+ const fixMarkdownTables = {
2967
+ ...selectedFixMarkdownTables,
2968
+ };
2969
+ const removeOperatingSystemFiles = {
2970
+ enabled: selectedRemoveOperatingSystemFiles['enabled'],
2831
2971
  settings,
2832
2972
  };
2833
2973
  return {
2834
- 'remove-operating-system-files': entry,
2974
+ 'fix-markdown-tables': fixMarkdownTables,
2975
+ 'remove-operating-system-files': removeOperatingSystemFiles,
2835
2976
  };
2836
2977
  }
2837
- static async promptRecipeEntries(entries, allowedRecipeNames, label) {
2978
+ static async promptRecipeEntries(entries, allowedRecipeNames, label, settingsRecipeNames) {
2838
2979
  const existingEntries = entries ?? {};
2980
+ const allowedSettingsRecipeNames = settingsRecipeNames ?? allowedRecipeNames;
2839
2981
  const enabledRecipes = allowedRecipeNames.filter((recipeName) => existingEntries[recipeName] !== undefined && existingEntries[recipeName]['enabled'] === true);
2840
2982
  const enabledOutput = await Runner.promptWithCancel({
2841
2983
  type: 'multiselect',
@@ -2851,12 +2993,12 @@ export class Runner {
2851
2993
  if (enabledOutput['cancelled'] === true) {
2852
2994
  return undefined;
2853
2995
  }
2854
- const settingsRecipes = allowedRecipeNames.filter((recipeName) => existingEntries[recipeName] !== undefined && existingEntries[recipeName]['settings'] !== undefined);
2996
+ const settingsRecipes = allowedSettingsRecipeNames.filter((recipeName) => existingEntries[recipeName] !== undefined && existingEntries[recipeName]['settings'] !== undefined);
2855
2997
  const settingsOutput = await Runner.promptWithCancel({
2856
2998
  type: 'multiselect',
2857
2999
  name: 'settingsRecipes',
2858
3000
  message: `${label} recipes with custom settings (space to select)`,
2859
- choices: allowedRecipeNames.map((recipeName) => ({
3001
+ choices: allowedSettingsRecipeNames.map((recipeName) => ({
2860
3002
  title: recipeName,
2861
3003
  value: recipeName,
2862
3004
  selected: settingsRecipes.includes(recipeName),
@@ -2921,6 +3063,11 @@ export class Runner {
2921
3063
  description: 'Project cleanup recipes.',
2922
3064
  value: 'miscellaneous',
2923
3065
  },
3066
+ {
3067
+ title: 'Nova Config',
3068
+ description: 'Nova configuration-file recipes.',
3069
+ value: 'nova-config',
3070
+ },
2924
3071
  {
2925
3072
  title: 'README',
2926
3073
  description: 'README generation recipes.',
@@ -2982,6 +3129,11 @@ export class Runner {
2982
3129
  allowedRecipeNames = libItemRecipesByCategory['license'];
2983
3130
  label = 'License';
2984
3131
  }
3132
+ else if (target === 'nova-config') {
3133
+ entries = recipes['nova-config'];
3134
+ allowedRecipeNames = libItemRecipesByCategory['nova-config'];
3135
+ label = 'Nova Config';
3136
+ }
2985
3137
  const categoryEntries = await Runner.promptRecipeEntries(entries, allowedRecipeNames, label);
2986
3138
  if (categoryEntries !== undefined) {
2987
3139
  Reflect.set(recipes, target, categoryEntries);
@@ -3225,6 +3377,9 @@ export class Runner {
3225
3377
  return clonedTrigger;
3226
3378
  });
3227
3379
  }
3380
+ if (configWorkflow['containerPlatforms'] !== undefined) {
3381
+ clonedWorkflow.containerPlatforms = [...configWorkflow['containerPlatforms']];
3382
+ }
3228
3383
  if (configWorkflow['build'] !== undefined) {
3229
3384
  clonedWorkflow.build = [...configWorkflow['build']];
3230
3385
  }
@@ -3274,6 +3429,12 @@ export class Runner {
3274
3429
  return clonedTrigger;
3275
3430
  });
3276
3431
  }
3432
+ if (workflow['containerPlatforms'] !== undefined && workflow['containerPlatforms'].length > 0) {
3433
+ normalizedWorkflow.containerPlatforms = [...workflow['containerPlatforms']];
3434
+ }
3435
+ else {
3436
+ Reflect.deleteProperty(normalizedWorkflow, 'containerPlatforms');
3437
+ }
3277
3438
  if (workflow['build'] !== undefined && workflow['build'].length > 0) {
3278
3439
  normalizedWorkflow.build = [...workflow['build']];
3279
3440
  }
@@ -3459,6 +3620,13 @@ export class Runner {
3459
3620
  static async promptWorkflowsForm(workflow, mode, workflows, config) {
3460
3621
  const existingTemplate = (workflow !== undefined && typeof workflow['template'] === 'string') ? workflow['template'] : '';
3461
3622
  const existingSuffix = (workflow !== undefined && typeof workflow['name'] === 'string') ? workflow['name'] : '';
3623
+ const existingTimeoutMinutes = (workflow !== undefined && typeof workflow['timeoutMinutes'] === 'number') ? workflow['timeoutMinutes'] : undefined;
3624
+ const existingContainerPlatforms = (workflow !== undefined
3625
+ && Array.isArray(workflow['containerPlatforms']) === true
3626
+ && workflow['containerPlatforms'].length > 0) ? [...workflow['containerPlatforms']] : [
3627
+ 'linux/amd64',
3628
+ 'linux/arm64',
3629
+ ];
3462
3630
  const existingTriggers = (workflow !== undefined && Array.isArray(workflow['triggers']) === true) ? workflow['triggers'] : [];
3463
3631
  const existingTriggerNames = existingTriggers.map((trigger) => (typeof trigger === 'string') ? trigger : trigger['name']);
3464
3632
  const existingTargets = (workflow !== undefined && Array.isArray(workflow['deploy']) === true) ? workflow['deploy'] : [];
@@ -3528,6 +3696,34 @@ export class Runner {
3528
3696
  }
3529
3697
  const suffixOutputResultValue = suffixOutput['result'];
3530
3698
  const selectedSuffix = (typeof suffixOutputResultValue.suffix === 'string') ? suffixOutputResultValue.suffix.trim() : '';
3699
+ const executionOutput = await Runner.promptWithCancel([
3700
+ {
3701
+ type: 'select',
3702
+ name: 'runsOn',
3703
+ message: 'GitHub-hosted runner',
3704
+ choices: [{
3705
+ title: 'ubuntu-latest',
3706
+ value: 'ubuntu-latest',
3707
+ }],
3708
+ initial: 0,
3709
+ },
3710
+ {
3711
+ type: 'text',
3712
+ name: 'timeoutMinutes',
3713
+ message: 'Job timeout in minutes (1-360; blank keeps template defaults)',
3714
+ initial: (existingTimeoutMinutes === undefined) ? '' : `${existingTimeoutMinutes}`,
3715
+ validate: Runner['isOptionalWorkflowTimeoutInput'],
3716
+ },
3717
+ ]);
3718
+ if (executionOutput['cancelled'] === true) {
3719
+ return {
3720
+ action: 'back',
3721
+ };
3722
+ }
3723
+ const executionOutputResultValue = executionOutput['result'];
3724
+ const selectedRunsOn = (executionOutputResultValue.runsOn === 'ubuntu-latest') ? executionOutputResultValue.runsOn : 'ubuntu-latest';
3725
+ const timeoutMinutesRaw = (typeof executionOutputResultValue.timeoutMinutes === 'string') ? executionOutputResultValue.timeoutMinutes.trim() : '';
3726
+ const selectedTimeoutMinutes = (timeoutMinutesRaw === '') ? undefined : Number.parseInt(timeoutMinutesRaw, 10);
3531
3727
  const triggersDir = join(resolveTemplatePath(import.meta.url, 'generators/github/workflows'), selectedTemplate, 'triggers');
3532
3728
  const triggersDirExists = await pathExists(triggersDir);
3533
3729
  const triggerChoices = [];
@@ -3659,6 +3855,7 @@ export class Runner {
3659
3855
  }
3660
3856
  const matchedMetadata = libWorkflowTemplatesMetadata.find((entry) => entry['name'] === selectedTemplate);
3661
3857
  const workspaceKeys = Object.keys(config['workspaces'] ?? {});
3858
+ const buildWorkspaceKeys = workspaceKeys.filter((workspaceKey) => workspaceKey !== './');
3662
3859
  const selectedTargets = existingTargets.map((target) => ({
3663
3860
  ...target,
3664
3861
  ...((target['after'] !== undefined) ? { after: [...target['after']] } : {}),
@@ -3669,6 +3866,12 @@ export class Runner {
3669
3866
  || selectedTargets.length > 0) {
3670
3867
  const availableTargetTypes = (matchedMetadata !== undefined) ? Object.keys(matchedMetadata['targets'] ?? {}) : [];
3671
3868
  const existingTargetTypes = selectedTargets.map((target) => target['to']);
3869
+ const hasContainerTargetInAnotherWorkflow = workflows.some((candidate) => {
3870
+ if (candidate === workflow || Array.isArray(candidate['deploy']) === false) {
3871
+ return false;
3872
+ }
3873
+ return candidate['deploy'].some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
3874
+ });
3672
3875
  for (const existingTargetType of existingTargetTypes) {
3673
3876
  if (availableTargetTypes.includes(existingTargetType) === false) {
3674
3877
  availableTargetTypes.push(existingTargetType);
@@ -3683,13 +3886,16 @@ export class Runner {
3683
3886
  }
3684
3887
  const currentTargetType = currentTarget['to'];
3685
3888
  const currentTargetWorkingDir = currentTarget['path'];
3686
- targetMenuChoices.push({
3687
- title: `${chalk.yellow.bold('[EDIT]')} ${currentTargetType} → ${currentTargetWorkingDir}`,
3688
- value: {
3689
- kind: 'edit',
3690
- index: i,
3691
- },
3692
- });
3889
+ const currentTargetIsContainer = currentTargetType === 'docker-hub' || currentTargetType === 'ghcr';
3890
+ if (hasContainerTargetInAnotherWorkflow === false || currentTargetIsContainer === false) {
3891
+ targetMenuChoices.push({
3892
+ title: `${chalk.yellow.bold('[EDIT]')} ${currentTargetType} → ${currentTargetWorkingDir}`,
3893
+ value: {
3894
+ kind: 'edit',
3895
+ index: i,
3896
+ },
3897
+ });
3898
+ }
3693
3899
  targetMenuChoices.push({
3694
3900
  title: `${chalk.red.bold('[REMOVE]')} ${currentTargetType} → ${currentTargetWorkingDir}`,
3695
3901
  value: {
@@ -3724,6 +3930,22 @@ export class Runner {
3724
3930
  const targetMenuOutputResultValue = targetMenuOutput['result'];
3725
3931
  const targetMenuAction = targetMenuOutputResultValue.targetAction;
3726
3932
  if (targetMenuAction['kind'] === 'done') {
3933
+ const hasContainerTargetCollision = hasContainerTargetInAnotherWorkflow === true && selectedTargets.some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
3934
+ const hasDuplicateContainerTarget = selectedTargets.some((target, targetIndex) => {
3935
+ if (target['to'] !== 'docker-hub' && target['to'] !== 'ghcr') {
3936
+ return false;
3937
+ }
3938
+ return selectedTargets.findIndex((candidate) => candidate['to'] === target['to']) !== targetIndex;
3939
+ });
3940
+ if (hasContainerTargetCollision === true || hasDuplicateContainerTarget === true) {
3941
+ Logger.customize({
3942
+ name: 'Runner.promptWorkflowsForm',
3943
+ purpose: 'validation',
3944
+ padTop: 1,
3945
+ padBottom: 1,
3946
+ }).error((hasContainerTargetCollision === true) ? 'Another workflow already owns the repository container image. Remove this workflow\'s Docker Hub and GHCR targets before continuing.' : 'Each container registry can appear only once. Remove or change the duplicate Docker Hub or GHCR target before continuing.');
3947
+ continue;
3948
+ }
3727
3949
  break;
3728
3950
  }
3729
3951
  if (targetMenuAction['kind'] === 'remove') {
@@ -3736,8 +3958,18 @@ export class Runner {
3736
3958
  if (targetMenuAction['kind'] === 'add' || targetMenuAction['kind'] === 'edit') {
3737
3959
  const targetEditIndex = (targetMenuAction['kind'] === 'edit') ? targetMenuAction['index'] : -1;
3738
3960
  const targetToEdit = (targetEditIndex >= 0) ? selectedTargets[targetEditIndex] : undefined;
3739
- const targetTypeInitial = (targetToEdit !== undefined) ? availableTargetTypes.indexOf(targetToEdit['to']) : 0;
3740
- const targetTypeChoices = availableTargetTypes.map((availableTargetType) => ({
3961
+ const selectableTargetTypes = availableTargetTypes.filter((availableTargetType) => {
3962
+ const availableTargetIsContainer = availableTargetType === 'docker-hub' || availableTargetType === 'ghcr';
3963
+ if (availableTargetIsContainer === false) {
3964
+ return true;
3965
+ }
3966
+ if (hasContainerTargetInAnotherWorkflow === true) {
3967
+ return false;
3968
+ }
3969
+ return selectedTargets.some((candidate, candidateIndex) => candidateIndex !== targetEditIndex && candidate['to'] === availableTargetType) === false;
3970
+ });
3971
+ const targetTypeInitial = (targetToEdit !== undefined) ? selectableTargetTypes.indexOf(targetToEdit['to']) : 0;
3972
+ const targetTypeChoices = selectableTargetTypes.map((availableTargetType) => ({
3741
3973
  title: availableTargetType,
3742
3974
  value: availableTargetType,
3743
3975
  }));
@@ -3753,29 +3985,33 @@ export class Runner {
3753
3985
  }
3754
3986
  const targetTypeOutputResultValue = targetTypeOutput['result'];
3755
3987
  const selectedTargetType = targetTypeOutputResultValue.targetType;
3756
- const targetWorkingDirInitial = (targetToEdit !== undefined) ? workspaceKeys.indexOf(targetToEdit['path']) : 0;
3757
- const targetWorkingDirChoices = workspaceKeys.map((workspaceKey) => ({
3758
- title: workspaceKey,
3759
- value: workspaceKey,
3760
- }));
3761
- if (targetToEdit !== undefined && targetWorkingDirChoices.some((choice) => choice['value'] === targetToEdit['path']) === false) {
3762
- targetWorkingDirChoices.unshift({
3763
- title: targetToEdit['path'],
3764
- value: targetToEdit['path'],
3988
+ const isContainerTarget = selectedTargetType === 'docker-hub' || selectedTargetType === 'ghcr';
3989
+ let selectedTargetWorkingDir = './';
3990
+ if (isContainerTarget === false) {
3991
+ const targetWorkingDirInitial = (targetToEdit !== undefined) ? workspaceKeys.indexOf(targetToEdit['path']) : 0;
3992
+ const targetWorkingDirChoices = workspaceKeys.map((workspaceKey) => ({
3993
+ title: workspaceKey,
3994
+ value: workspaceKey,
3995
+ }));
3996
+ if (targetToEdit !== undefined && targetWorkingDirChoices.some((choice) => choice['value'] === targetToEdit['path']) === false) {
3997
+ targetWorkingDirChoices.unshift({
3998
+ title: targetToEdit['path'],
3999
+ value: targetToEdit['path'],
4000
+ });
4001
+ }
4002
+ const targetWorkingDirOutput = await Runner.promptWithCancel({
4003
+ type: 'select',
4004
+ name: 'targetWorkingDir',
4005
+ message: 'Select a working directory.',
4006
+ choices: targetWorkingDirChoices,
4007
+ initial: (targetWorkingDirInitial >= 0) ? targetWorkingDirInitial : 0,
3765
4008
  });
4009
+ if (targetWorkingDirOutput['cancelled'] === true) {
4010
+ continue;
4011
+ }
4012
+ const targetWorkingDirOutputResultValue = targetWorkingDirOutput['result'];
4013
+ selectedTargetWorkingDir = targetWorkingDirOutputResultValue.targetWorkingDir;
3766
4014
  }
3767
- const targetWorkingDirOutput = await Runner.promptWithCancel({
3768
- type: 'select',
3769
- name: 'targetWorkingDir',
3770
- message: 'Select a working directory.',
3771
- choices: targetWorkingDirChoices,
3772
- initial: (targetWorkingDirInitial >= 0) ? targetWorkingDirInitial : 0,
3773
- });
3774
- if (targetWorkingDirOutput['cancelled'] === true) {
3775
- continue;
3776
- }
3777
- const targetWorkingDirOutputResultValue = targetWorkingDirOutput['result'];
3778
- const selectedTargetWorkingDir = targetWorkingDirOutputResultValue.targetWorkingDir;
3779
4015
  const targetIsDuplicate = selectedTargets.some((selectedTarget, selectedTargetIndex) => {
3780
4016
  if (selectedTargetIndex === targetEditIndex) {
3781
4017
  return false;
@@ -3828,6 +4064,35 @@ export class Runner {
3828
4064
  continue;
3829
4065
  }
3830
4066
  const targetSettings = Runner.parseStringRecordInput(targetSettingsOutput['result'].targetSettings);
4067
+ const selectedTargetMetadata = (matchedMetadata === undefined || matchedMetadata['targets'] === undefined) ? undefined : matchedMetadata['targets'][selectedTargetType];
4068
+ const targetRequiredLiterals = (selectedTargetMetadata === undefined || selectedTargetMetadata['requiredLiterals'] === undefined) ? {} : selectedTargetMetadata['requiredLiterals'];
4069
+ const targetRequiredLiteralEntries = Object.entries(targetRequiredLiterals);
4070
+ let targetRequiredLiteralPromptCancelled = false;
4071
+ for (const targetRequiredLiteralEntry of targetRequiredLiteralEntries) {
4072
+ const targetRequiredLiteralKey = targetRequiredLiteralEntry[0];
4073
+ const targetRequiredLiteralMetadata = targetRequiredLiteralEntry[1];
4074
+ const targetRequiredLiteralInitial = (typeof targetSettings[targetRequiredLiteralKey] === 'string') ? targetSettings[targetRequiredLiteralKey] : '';
4075
+ let targetRequiredLiteralPromptMessage = `Target literal: ${targetRequiredLiteralKey} (${targetRequiredLiteralMetadata['description']})`;
4076
+ if (targetRequiredLiteralMetadata['example'] !== undefined) {
4077
+ targetRequiredLiteralPromptMessage = `Target literal: ${targetRequiredLiteralKey} (${targetRequiredLiteralMetadata['description']}, e.g. ${targetRequiredLiteralMetadata['example']})`;
4078
+ }
4079
+ const targetRequiredLiteralOutput = await Runner.promptWithCancel({
4080
+ type: 'text',
4081
+ name: 'targetRequiredLiteral',
4082
+ message: targetRequiredLiteralPromptMessage,
4083
+ initial: targetRequiredLiteralInitial,
4084
+ validate: Runner['isNonEmptyLiteralInput'],
4085
+ });
4086
+ if (targetRequiredLiteralOutput['cancelled'] === true) {
4087
+ targetRequiredLiteralPromptCancelled = true;
4088
+ break;
4089
+ }
4090
+ const targetRequiredLiteralValue = targetRequiredLiteralOutput['result'].targetRequiredLiteral.trim().replaceAll('\\n', '\n');
4091
+ Reflect.set(targetSettings, targetRequiredLiteralKey, targetRequiredLiteralValue);
4092
+ }
4093
+ if (targetRequiredLiteralPromptCancelled === true) {
4094
+ continue;
4095
+ }
3831
4096
  const newTarget = {
3832
4097
  to: selectedTargetType,
3833
4098
  path: selectedTargetWorkingDir,
@@ -3848,12 +4113,59 @@ export class Runner {
3848
4113
  }
3849
4114
  }
3850
4115
  }
4116
+ const hasContainerTarget = selectedTargets.some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
4117
+ let selectedContainerPlatforms = [];
4118
+ if (hasContainerTarget === true) {
4119
+ const containerPlatformChoices = [
4120
+ {
4121
+ title: 'Linux AMD64',
4122
+ value: 'linux/amd64',
4123
+ selected: existingContainerPlatforms.includes('linux/amd64'),
4124
+ },
4125
+ {
4126
+ title: 'Linux ARM64',
4127
+ value: 'linux/arm64',
4128
+ selected: existingContainerPlatforms.includes('linux/arm64'),
4129
+ },
4130
+ ];
4131
+ const containerPlatformsOutput = await Runner.promptWithCancel({
4132
+ type: 'multiselect',
4133
+ name: 'containerPlatforms',
4134
+ message: 'Select platforms for the repository container image.',
4135
+ choices: containerPlatformChoices,
4136
+ });
4137
+ if (containerPlatformsOutput['cancelled'] === true) {
4138
+ return {
4139
+ action: 'back',
4140
+ };
4141
+ }
4142
+ const containerPlatformsOutputResultValue = containerPlatformsOutput['result'];
4143
+ selectedContainerPlatforms = (Array.isArray(containerPlatformsOutputResultValue.containerPlatforms) === true) ? containerPlatformsOutputResultValue.containerPlatforms : [];
4144
+ if (selectedContainerPlatforms.length === 0) {
4145
+ Logger.customize({
4146
+ name: 'Runner.promptWorkflowsForm',
4147
+ purpose: 'validation',
4148
+ padTop: 1,
4149
+ padBottom: 1,
4150
+ }).error('Select at least one container platform.');
4151
+ return {
4152
+ action: 'back',
4153
+ };
4154
+ }
4155
+ }
3851
4156
  let selectedScopes = [...existingScopes];
3852
4157
  if (matchedMetadata !== undefined && matchedMetadata['supportsScopes'] === true) {
3853
- const lockedPaths = new Set(selectedTargets.map((selectedTarget) => selectedTarget['path']));
3854
- const scopeCandidates = [...workspaceKeys];
4158
+ const lockedPaths = new Set();
4159
+ const scopeCandidates = [...buildWorkspaceKeys];
4160
+ for (const selectedTarget of selectedTargets) {
4161
+ if (selectedTarget['path'] !== './'
4162
+ && selectedTarget['to'] !== 'docker-hub'
4163
+ && selectedTarget['to'] !== 'ghcr') {
4164
+ lockedPaths.add(selectedTarget['path']);
4165
+ }
4166
+ }
3855
4167
  for (const existingScope of existingScopes) {
3856
- if (scopeCandidates.includes(existingScope) === false) {
4168
+ if (existingScope !== './' && scopeCandidates.includes(existingScope) === false) {
3857
4169
  scopeCandidates.push(existingScope);
3858
4170
  }
3859
4171
  }
@@ -3995,7 +4307,14 @@ export class Runner {
3995
4307
  template: selectedTemplate,
3996
4308
  name: selectedSuffix,
3997
4309
  triggers: resolvedTriggers,
4310
+ runsOn: selectedRunsOn,
3998
4311
  };
4312
+ if (selectedTimeoutMinutes !== undefined) {
4313
+ Reflect.set(resolvedWorkflow, 'timeoutMinutes', selectedTimeoutMinutes);
4314
+ }
4315
+ if (selectedContainerPlatforms.length > 0) {
4316
+ Reflect.set(resolvedWorkflow, 'containerPlatforms', selectedContainerPlatforms);
4317
+ }
3999
4318
  if (selectedScopes.length > 0) {
4000
4319
  Reflect.set(resolvedWorkflow, 'build', selectedScopes);
4001
4320
  }
@@ -4249,7 +4568,7 @@ export class Runner {
4249
4568
  }
4250
4569
  choices.push({
4251
4570
  title: 'Add an ignore file',
4252
- description: 'Add a project-relative .gitignore, .dockerignore, or .assetsignore path.',
4571
+ description: 'Add a project-relative .gitignore or .assetsignore path, or the root .dockerignore.',
4253
4572
  value: 'add',
4254
4573
  });
4255
4574
  choices.push({
@@ -5055,6 +5374,20 @@ export class Runner {
5055
5374
  }
5056
5375
  const lockStepVersioningOutputResult = lockStepVersioningOutput['result'];
5057
5376
  const runWorkspacesSettings = settings['runWorkspaces'];
5377
+ const existingConcurrency = (runWorkspacesSettings === undefined || runWorkspacesSettings['concurrency'] === undefined) ? {} : runWorkspacesSettings['concurrency'];
5378
+ const concurrencyInitial = JSON.stringify(existingConcurrency);
5379
+ const concurrencyOutput = await Runner.promptWithCancel({
5380
+ type: 'text',
5381
+ name: 'concurrency',
5382
+ message: 'Workspace concurrency limits by script as JSON (blank unsets):',
5383
+ initial: concurrencyInitial,
5384
+ validate: Runner['isPositiveIntegerRecordInput'],
5385
+ });
5386
+ if (concurrencyOutput['cancelled'] === true) {
5387
+ return 'back';
5388
+ }
5389
+ const concurrencyOutputResult = concurrencyOutput['result'];
5390
+ const concurrency = Runner.parsePositiveIntegerRecordInput(concurrencyOutputResult.concurrency);
5058
5391
  const existingCache = (runWorkspacesSettings === undefined || runWorkspacesSettings['cache'] === undefined) ? {} : runWorkspacesSettings['cache'];
5059
5392
  const cacheEnabledInitial = existingCache['enabled'] ?? true;
5060
5393
  const cacheEnabledOutput = await Runner.promptWithCancel({
@@ -5107,6 +5440,17 @@ export class Runner {
5107
5440
  }
5108
5441
  const cacheScriptsOutputResult = cacheScriptsOutput['result'];
5109
5442
  const cacheScripts = [...new Set(cacheScriptsOutputResult.cacheScripts.split(',').map((script) => script.trim()).filter((script) => script.length > 0))].sort();
5443
+ const rootIncludedInitial = runWorkspacesSettings === undefined || runWorkspacesSettings['root'] !== 'skip';
5444
+ const rootIncludedOutput = await Runner.promptWithCancel({
5445
+ type: 'confirm',
5446
+ name: 'rootIncluded',
5447
+ message: 'Run the root project\'s own steps as part of the workspace tree?',
5448
+ initial: rootIncludedInitial,
5449
+ });
5450
+ if (rootIncludedOutput['cancelled'] === true) {
5451
+ return 'back';
5452
+ }
5453
+ const rootIncludedOutputResult = rootIncludedOutput['result'];
5110
5454
  const runWorkspaces = {
5111
5455
  ...settings['runWorkspaces'],
5112
5456
  cache: {
@@ -5116,6 +5460,18 @@ export class Runner {
5116
5460
  scripts: cacheScripts,
5117
5461
  },
5118
5462
  };
5463
+ if (Object.keys(concurrency).length > 0) {
5464
+ runWorkspaces.concurrency = concurrency;
5465
+ }
5466
+ else {
5467
+ Reflect.deleteProperty(runWorkspaces, 'concurrency');
5468
+ }
5469
+ if (rootIncludedOutputResult.rootIncluded === true) {
5470
+ Reflect.deleteProperty(runWorkspaces, 'root');
5471
+ }
5472
+ else {
5473
+ runWorkspaces.root = 'skip';
5474
+ }
5119
5475
  const updatedSettings = {
5120
5476
  ...settings,
5121
5477
  lockStepVersioning: lockStepVersioningOutputResult.lockStepVersioning,