@cbnventures/nova 0.13.1 → 0.15.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 (902) hide show
  1. package/README.md +48 -0
  2. package/bin/nova.mjs +3 -0
  3. package/build/package.json +38 -32
  4. package/build/src/api/node-releases.d.ts +4 -4
  5. package/build/src/api/node-releases.d.ts.map +1 -1
  6. package/build/src/api/node-releases.js +31 -26
  7. package/build/src/api/node-releases.js.map +1 -1
  8. package/build/src/api/spdx-licenses.d.ts +4 -4
  9. package/build/src/api/spdx-licenses.d.ts.map +1 -1
  10. package/build/src/api/spdx-licenses.js +21 -18
  11. package/build/src/api/spdx-licenses.js.map +1 -1
  12. package/build/src/cli/generate/github/funding.d.ts +5 -0
  13. package/build/src/cli/generate/github/funding.d.ts.map +1 -0
  14. package/build/src/cli/generate/github/funding.js +68 -0
  15. package/build/src/cli/generate/github/funding.js.map +1 -0
  16. package/build/src/cli/generate/github/issue-template.d.ts +5 -0
  17. package/build/src/cli/generate/github/issue-template.d.ts.map +1 -0
  18. package/build/src/cli/generate/github/issue-template.js +267 -0
  19. package/build/src/cli/generate/github/issue-template.js.map +1 -0
  20. package/build/src/cli/generate/github/workflows.d.ts +10 -0
  21. package/build/src/cli/generate/github/workflows.d.ts.map +1 -0
  22. package/build/src/cli/generate/github/workflows.js +464 -0
  23. package/build/src/cli/generate/github/workflows.js.map +1 -0
  24. package/build/src/cli/generate/must-haves/agent-conventions.d.ts +5 -0
  25. package/build/src/cli/generate/must-haves/agent-conventions.d.ts.map +1 -0
  26. package/build/src/cli/generate/must-haves/agent-conventions.js +114 -0
  27. package/build/src/cli/generate/must-haves/agent-conventions.js.map +1 -0
  28. package/build/src/cli/generate/must-haves/dotenv.d.ts +12 -0
  29. package/build/src/cli/generate/must-haves/dotenv.d.ts.map +1 -0
  30. package/build/src/cli/generate/must-haves/dotenv.js +504 -0
  31. package/build/src/cli/generate/must-haves/dotenv.js.map +1 -0
  32. package/build/src/cli/generate/must-haves/editorconfig.d.ts +5 -0
  33. package/build/src/cli/generate/must-haves/editorconfig.d.ts.map +1 -0
  34. package/build/src/cli/generate/must-haves/editorconfig.js +37 -0
  35. package/build/src/cli/generate/must-haves/editorconfig.js.map +1 -0
  36. package/build/src/cli/generate/must-haves/gitignore.d.ts +13 -0
  37. package/build/src/cli/generate/must-haves/gitignore.d.ts.map +1 -0
  38. package/build/src/cli/generate/must-haves/gitignore.js +446 -0
  39. package/build/src/cli/generate/must-haves/gitignore.js.map +1 -0
  40. package/build/src/cli/generate/must-haves/license.d.ts +5 -0
  41. package/build/src/cli/generate/must-haves/license.d.ts.map +1 -0
  42. package/build/src/cli/generate/must-haves/license.js +131 -0
  43. package/build/src/cli/generate/must-haves/license.js.map +1 -0
  44. package/build/src/cli/generate/must-haves/read-me.d.ts +8 -0
  45. package/build/src/cli/generate/must-haves/read-me.d.ts.map +1 -0
  46. package/build/src/cli/generate/must-haves/read-me.js +255 -0
  47. package/build/src/cli/generate/must-haves/read-me.js.map +1 -0
  48. package/build/src/cli/index.js +421 -107
  49. package/build/src/cli/index.js.map +1 -1
  50. package/build/src/cli/recipe/index.d.ts +3 -0
  51. package/build/src/cli/recipe/index.d.ts.map +1 -0
  52. package/build/src/cli/recipe/index.js +57 -0
  53. package/build/src/cli/recipe/index.js.map +1 -0
  54. package/build/src/cli/recipe/package-json/cleanup.d.ts +8 -0
  55. package/build/src/cli/recipe/package-json/cleanup.d.ts.map +1 -0
  56. package/build/src/cli/recipe/package-json/cleanup.js +183 -0
  57. package/build/src/cli/recipe/package-json/cleanup.js.map +1 -0
  58. package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts +8 -0
  59. package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -0
  60. package/build/src/cli/recipe/package-json/normalize-artifacts.js +250 -0
  61. package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -0
  62. package/build/src/cli/recipe/package-json/normalize-bundler.d.ts +6 -0
  63. package/build/src/cli/recipe/package-json/normalize-bundler.d.ts.map +1 -0
  64. package/build/src/cli/recipe/package-json/normalize-bundler.js +146 -0
  65. package/build/src/cli/recipe/package-json/normalize-bundler.js.map +1 -0
  66. package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts +9 -0
  67. package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -0
  68. package/build/src/cli/recipe/package-json/normalize-dependencies.js +268 -0
  69. package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -0
  70. package/build/src/cli/recipe/package-json/normalize-modules.d.ts +6 -0
  71. package/build/src/cli/recipe/package-json/normalize-modules.d.ts.map +1 -0
  72. package/build/src/cli/recipe/package-json/normalize-modules.js +263 -0
  73. package/build/src/cli/recipe/package-json/normalize-modules.js.map +1 -0
  74. package/build/src/cli/recipe/package-json/normalize-tooling.d.ts +7 -0
  75. package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -0
  76. package/build/src/cli/recipe/package-json/normalize-tooling.js +163 -0
  77. package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -0
  78. package/build/src/cli/recipe/package-json/sync-environment.d.ts +9 -0
  79. package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -0
  80. package/build/src/cli/recipe/package-json/sync-environment.js +283 -0
  81. package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -0
  82. package/build/src/cli/recipe/package-json/sync-identity.d.ts +6 -0
  83. package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -0
  84. package/build/src/cli/recipe/package-json/sync-identity.js +224 -0
  85. package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -0
  86. package/build/src/cli/recipe/package-json/sync-ownership.d.ts +6 -0
  87. package/build/src/cli/recipe/package-json/sync-ownership.d.ts.map +1 -0
  88. package/build/src/cli/recipe/package-json/sync-ownership.js +349 -0
  89. package/build/src/cli/recipe/package-json/sync-ownership.js.map +1 -0
  90. package/build/src/cli/scaffold/app/expressjs.d.ts +5 -0
  91. package/build/src/cli/scaffold/app/expressjs.d.ts.map +1 -0
  92. package/build/src/cli/scaffold/app/expressjs.js +8 -0
  93. package/build/src/cli/scaffold/app/expressjs.js.map +1 -0
  94. package/build/src/cli/scaffold/app/nextjs.d.ts +5 -0
  95. package/build/src/cli/scaffold/app/nextjs.d.ts.map +1 -0
  96. package/build/src/cli/scaffold/app/nextjs.js +8 -0
  97. package/build/src/cli/scaffold/app/nextjs.js.map +1 -0
  98. package/build/src/cli/scaffold/app/vite.d.ts +5 -0
  99. package/build/src/cli/scaffold/app/vite.d.ts.map +1 -0
  100. package/build/src/cli/scaffold/app/vite.js +8 -0
  101. package/build/src/cli/scaffold/app/vite.js.map +1 -0
  102. package/build/src/cli/scaffold/app/workers.d.ts +5 -0
  103. package/build/src/cli/scaffold/app/workers.d.ts.map +1 -0
  104. package/build/src/cli/scaffold/app/workers.js +8 -0
  105. package/build/src/cli/scaffold/app/workers.js.map +1 -0
  106. package/build/src/cli/scaffold/docs/docusaurus.d.ts +5 -0
  107. package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -0
  108. package/build/src/cli/scaffold/docs/docusaurus.js +8 -0
  109. package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -0
  110. package/build/src/cli/scaffold/starter/base.d.ts +5 -0
  111. package/build/src/cli/scaffold/starter/base.d.ts.map +1 -0
  112. package/build/src/cli/scaffold/starter/base.js +132 -0
  113. package/build/src/cli/scaffold/starter/base.js.map +1 -0
  114. package/build/src/cli/utility/changelog.d.ts +3 -3
  115. package/build/src/cli/utility/changelog.d.ts.map +1 -1
  116. package/build/src/cli/utility/changelog.js +207 -173
  117. package/build/src/cli/utility/changelog.js.map +1 -1
  118. package/build/src/cli/utility/initialize.d.ts +6 -3
  119. package/build/src/cli/utility/initialize.d.ts.map +1 -1
  120. package/build/src/cli/utility/initialize.js +1194 -284
  121. package/build/src/cli/utility/initialize.js.map +1 -1
  122. package/build/src/cli/utility/run-recipes.d.ts +5 -0
  123. package/build/src/cli/utility/run-recipes.d.ts.map +1 -0
  124. package/build/src/cli/utility/run-recipes.js +43 -0
  125. package/build/src/cli/utility/run-recipes.js.map +1 -0
  126. package/build/src/cli/utility/run-scripts.d.ts +10 -0
  127. package/build/src/cli/utility/run-scripts.d.ts.map +1 -0
  128. package/build/src/cli/utility/run-scripts.js +257 -0
  129. package/build/src/cli/utility/run-scripts.js.map +1 -0
  130. package/build/src/cli/utility/transpile.d.ts +9 -0
  131. package/build/src/cli/utility/transpile.d.ts.map +1 -0
  132. package/build/src/cli/utility/transpile.js +64 -0
  133. package/build/src/cli/utility/transpile.js.map +1 -0
  134. package/build/src/cli/utility/type-check.d.ts +3 -3
  135. package/build/src/cli/utility/type-check.d.ts.map +1 -1
  136. package/build/src/cli/utility/type-check.js +26 -21
  137. package/build/src/cli/utility/type-check.js.map +1 -1
  138. package/build/src/cli/utility/version.d.ts +3 -3
  139. package/build/src/cli/utility/version.d.ts.map +1 -1
  140. package/build/src/cli/utility/version.js +126 -68
  141. package/build/src/cli/utility/version.js.map +1 -1
  142. package/build/src/lib/item.d.ts +31 -24
  143. package/build/src/lib/item.d.ts.map +1 -1
  144. package/build/src/lib/item.js +129 -39
  145. package/build/src/lib/item.js.map +1 -1
  146. package/build/src/lib/nova-config.d.ts +6 -5
  147. package/build/src/lib/nova-config.d.ts.map +1 -1
  148. package/build/src/lib/nova-config.js +252 -69
  149. package/build/src/lib/nova-config.js.map +1 -1
  150. package/build/src/lib/regex.d.ts +92 -26
  151. package/build/src/lib/regex.d.ts.map +1 -1
  152. package/build/src/lib/regex.js +92 -26
  153. package/build/src/lib/regex.js.map +1 -1
  154. package/build/src/lib/scaffold.d.ts +10 -0
  155. package/build/src/lib/scaffold.d.ts.map +1 -0
  156. package/build/src/lib/scaffold.js +535 -0
  157. package/build/src/lib/scaffold.js.map +1 -0
  158. package/build/src/lib/schema.d.ts +2 -9
  159. package/build/src/lib/schema.d.ts.map +1 -1
  160. package/build/src/lib/schema.js +6 -8
  161. package/build/src/lib/schema.js.map +1 -1
  162. package/build/src/lib/utility.d.ts +21 -18
  163. package/build/src/lib/utility.d.ts.map +1 -1
  164. package/build/src/lib/utility.js +176 -79
  165. package/build/src/lib/utility.js.map +1 -1
  166. package/build/src/lib/workflow-templates.d.ts +3 -0
  167. package/build/src/lib/workflow-templates.d.ts.map +1 -0
  168. package/build/src/lib/workflow-templates.js +187 -0
  169. package/build/src/lib/workflow-templates.js.map +1 -0
  170. package/build/src/presets/eslint/dx-code-style.d.ts +4 -0
  171. package/build/src/presets/eslint/dx-code-style.d.ts.map +1 -0
  172. package/build/src/presets/eslint/dx-code-style.js +523 -0
  173. package/build/src/presets/eslint/dx-code-style.js.map +1 -0
  174. package/build/src/presets/eslint/dx-ignore.d.ts +4 -0
  175. package/build/src/presets/eslint/dx-ignore.d.ts.map +1 -0
  176. package/build/src/presets/eslint/{dx-ignore.mjs → dx-ignore.js} +1 -1
  177. package/build/src/presets/eslint/dx-ignore.js.map +1 -0
  178. package/build/src/presets/eslint/fw-docusaurus.d.ts +4 -0
  179. package/build/src/presets/eslint/fw-docusaurus.d.ts.map +1 -0
  180. package/build/src/presets/eslint/fw-docusaurus.js +6 -0
  181. package/build/src/presets/eslint/fw-docusaurus.js.map +1 -0
  182. package/build/src/presets/eslint/fw-expressjs.d.ts +4 -0
  183. package/build/src/presets/eslint/fw-expressjs.d.ts.map +1 -0
  184. package/build/src/presets/eslint/{fw-expressjs.mjs → fw-expressjs.js} +3 -5
  185. package/build/src/presets/eslint/fw-expressjs.js.map +1 -0
  186. package/build/src/presets/eslint/fw-nextjs.d.ts +4 -0
  187. package/build/src/presets/eslint/fw-nextjs.d.ts.map +1 -0
  188. package/build/src/presets/eslint/{fw-nextjs.mjs → fw-nextjs.js} +3 -5
  189. package/build/src/presets/eslint/fw-nextjs.js.map +1 -0
  190. package/build/src/presets/eslint/index.d.ts +16 -0
  191. package/build/src/presets/eslint/index.d.ts.map +1 -0
  192. package/build/src/presets/eslint/index.js +16 -0
  193. package/build/src/presets/eslint/index.js.map +1 -0
  194. package/build/src/presets/eslint/lang-javascript.d.ts +4 -0
  195. package/build/src/presets/eslint/lang-javascript.d.ts.map +1 -0
  196. package/build/src/presets/eslint/lang-javascript.js +34 -0
  197. package/build/src/presets/eslint/lang-javascript.js.map +1 -0
  198. package/build/src/presets/eslint/lang-mdx.d.ts +4 -0
  199. package/build/src/presets/eslint/lang-mdx.d.ts.map +1 -0
  200. package/build/src/presets/eslint/{lang-mdx.mjs → lang-mdx.js} +4 -8
  201. package/build/src/presets/eslint/lang-mdx.js.map +1 -0
  202. package/build/src/presets/eslint/lang-typescript.d.ts +4 -0
  203. package/build/src/presets/eslint/lang-typescript.d.ts.map +1 -0
  204. package/build/src/presets/eslint/lang-typescript.js +148 -0
  205. package/build/src/presets/eslint/lang-typescript.js.map +1 -0
  206. package/build/src/presets/eslint/runtime-browser.d.ts +4 -0
  207. package/build/src/presets/eslint/runtime-browser.d.ts.map +1 -0
  208. package/build/src/presets/eslint/{env-web-worker.mjs → runtime-browser.js} +1 -1
  209. package/build/src/presets/eslint/runtime-browser.js.map +1 -0
  210. package/build/src/presets/eslint/runtime-cloudflare-workers.d.ts +4 -0
  211. package/build/src/presets/eslint/runtime-cloudflare-workers.d.ts.map +1 -0
  212. package/build/src/presets/eslint/runtime-cloudflare-workers.js +6 -0
  213. package/build/src/presets/eslint/runtime-cloudflare-workers.js.map +1 -0
  214. package/build/src/presets/eslint/runtime-edge.d.ts +4 -0
  215. package/build/src/presets/eslint/runtime-edge.d.ts.map +1 -0
  216. package/build/src/presets/eslint/{env-edge.mjs → runtime-edge.js} +1 -1
  217. package/build/src/presets/eslint/runtime-edge.js.map +1 -0
  218. package/build/src/presets/eslint/runtime-node.d.ts +4 -0
  219. package/build/src/presets/eslint/runtime-node.d.ts.map +1 -0
  220. package/build/src/presets/eslint/{env-node.mjs → runtime-node.js} +4 -4
  221. package/build/src/presets/eslint/runtime-node.js.map +1 -0
  222. package/build/src/presets/eslint/runtime-service-worker.d.ts +4 -0
  223. package/build/src/presets/eslint/runtime-service-worker.d.ts.map +1 -0
  224. package/build/src/presets/eslint/runtime-service-worker.js +3 -0
  225. package/build/src/presets/eslint/runtime-service-worker.js.map +1 -0
  226. package/build/src/presets/eslint/runtime-web-worker.d.ts +4 -0
  227. package/build/src/presets/eslint/runtime-web-worker.d.ts.map +1 -0
  228. package/build/src/presets/eslint/runtime-web-worker.js +3 -0
  229. package/build/src/presets/eslint/runtime-web-worker.js.map +1 -0
  230. package/build/src/presets/eslint/tool-vite.d.ts +4 -0
  231. package/build/src/presets/eslint/tool-vite.d.ts.map +1 -0
  232. package/build/src/presets/eslint/{tool-vite.mjs → tool-vite.js} +3 -5
  233. package/build/src/presets/eslint/tool-vite.js.map +1 -0
  234. package/build/src/presets/tsconfig/dx-strict.json +1 -0
  235. package/build/src/presets/tsconfig/runtime-cloudflare-workers.json +12 -0
  236. package/build/src/presets/tsconfig/{platform-cloudflare-workers.json → runtime-web-worker.json} +2 -2
  237. package/build/src/rules/eslint/conventions/no-default-export-declaration.d.ts +11 -0
  238. package/build/src/rules/eslint/conventions/no-default-export-declaration.d.ts.map +1 -0
  239. package/build/src/rules/eslint/conventions/no-default-export-declaration.js +73 -0
  240. package/build/src/rules/eslint/conventions/no-default-export-declaration.js.map +1 -0
  241. package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts +15 -0
  242. package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts.map +1 -0
  243. package/build/src/rules/eslint/conventions/no-implicit-boolean.js +140 -0
  244. package/build/src/rules/eslint/conventions/no-implicit-boolean.js.map +1 -0
  245. package/build/src/rules/eslint/conventions/require-explicit-return.d.ts +15 -0
  246. package/build/src/rules/eslint/conventions/require-explicit-return.d.ts.map +1 -0
  247. package/build/src/rules/eslint/conventions/require-explicit-return.js +184 -0
  248. package/build/src/rules/eslint/conventions/require-explicit-return.js.map +1 -0
  249. package/build/src/rules/eslint/conventions/require-hash-private.d.ts +12 -0
  250. package/build/src/rules/eslint/conventions/require-hash-private.d.ts.map +1 -0
  251. package/build/src/rules/eslint/conventions/require-hash-private.js +67 -0
  252. package/build/src/rules/eslint/conventions/require-hash-private.js.map +1 -0
  253. package/build/src/rules/eslint/conventions/require-kebab-case-filename.d.ts +14 -0
  254. package/build/src/rules/eslint/conventions/require-kebab-case-filename.d.ts.map +1 -0
  255. package/build/src/rules/eslint/conventions/require-kebab-case-filename.js +95 -0
  256. package/build/src/rules/eslint/conventions/require-kebab-case-filename.js.map +1 -0
  257. package/build/src/rules/eslint/conventions/require-naming-convention.d.ts +34 -0
  258. package/build/src/rules/eslint/conventions/require-naming-convention.d.ts.map +1 -0
  259. package/build/src/rules/eslint/conventions/require-naming-convention.js +382 -0
  260. package/build/src/rules/eslint/conventions/require-naming-convention.js.map +1 -0
  261. package/build/src/rules/eslint/conventions/require-undefined-init.d.ts +11 -0
  262. package/build/src/rules/eslint/conventions/require-undefined-init.d.ts.map +1 -0
  263. package/build/src/rules/eslint/conventions/require-undefined-init.js +71 -0
  264. package/build/src/rules/eslint/conventions/require-undefined-init.js.map +1 -0
  265. package/build/src/rules/eslint/conventions/switch-case-blocks.d.ts +13 -0
  266. package/build/src/rules/eslint/conventions/switch-case-blocks.d.ts.map +1 -0
  267. package/build/src/rules/eslint/conventions/switch-case-blocks.js +82 -0
  268. package/build/src/rules/eslint/conventions/switch-case-blocks.js.map +1 -0
  269. package/build/src/rules/eslint/formatting/no-complex-arrow-concise.d.ts +15 -0
  270. package/build/src/rules/eslint/formatting/no-complex-arrow-concise.d.ts.map +1 -0
  271. package/build/src/rules/eslint/formatting/no-complex-arrow-concise.js +166 -0
  272. package/build/src/rules/eslint/formatting/no-complex-arrow-concise.js.map +1 -0
  273. package/build/src/rules/eslint/formatting/no-multiline-strings.d.ts +15 -0
  274. package/build/src/rules/eslint/formatting/no-multiline-strings.d.ts.map +1 -0
  275. package/build/src/rules/eslint/formatting/no-multiline-strings.js +162 -0
  276. package/build/src/rules/eslint/formatting/no-multiline-strings.js.map +1 -0
  277. package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts +11 -0
  278. package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts.map +1 -0
  279. package/build/src/rules/eslint/formatting/no-raw-text-in-code.js +57 -0
  280. package/build/src/rules/eslint/formatting/no-raw-text-in-code.js.map +1 -0
  281. package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.d.ts +11 -0
  282. package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.d.ts.map +1 -0
  283. package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.js +55 -0
  284. package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.js.map +1 -0
  285. package/build/src/rules/eslint/formatting/require-import-order.d.ts +14 -0
  286. package/build/src/rules/eslint/formatting/require-import-order.d.ts.map +1 -0
  287. package/build/src/rules/eslint/formatting/require-import-order.js +187 -0
  288. package/build/src/rules/eslint/formatting/require-import-order.js.map +1 -0
  289. package/build/src/rules/eslint/formatting/require-multiline-condition-groups.d.ts +13 -0
  290. package/build/src/rules/eslint/formatting/require-multiline-condition-groups.d.ts.map +1 -0
  291. package/build/src/rules/eslint/formatting/require-multiline-condition-groups.js +138 -0
  292. package/build/src/rules/eslint/formatting/require-multiline-condition-groups.js.map +1 -0
  293. package/build/src/rules/eslint/formatting/require-multiline-conditions.d.ts +13 -0
  294. package/build/src/rules/eslint/formatting/require-multiline-conditions.d.ts.map +1 -0
  295. package/build/src/rules/eslint/formatting/require-multiline-conditions.js +94 -0
  296. package/build/src/rules/eslint/formatting/require-multiline-conditions.js.map +1 -0
  297. package/build/src/rules/eslint/formatting/require-padding-lines.d.ts +25 -0
  298. package/build/src/rules/eslint/formatting/require-padding-lines.d.ts.map +1 -0
  299. package/build/src/rules/eslint/formatting/require-padding-lines.js +309 -0
  300. package/build/src/rules/eslint/formatting/require-padding-lines.js.map +1 -0
  301. package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts +11 -0
  302. package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts.map +1 -0
  303. package/build/src/rules/eslint/formatting/require-ternary-parens.js +76 -0
  304. package/build/src/rules/eslint/formatting/require-ternary-parens.js.map +1 -0
  305. package/build/src/rules/eslint/index.d.ts +44 -5
  306. package/build/src/rules/eslint/index.d.ts.map +1 -1
  307. package/build/src/rules/eslint/index.js +44 -5
  308. package/build/src/rules/eslint/index.js.map +1 -1
  309. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts +15 -0
  310. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts.map +1 -0
  311. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js +176 -0
  312. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js.map +1 -0
  313. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +26 -0
  314. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts.map +1 -0
  315. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js +495 -0
  316. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js.map +1 -0
  317. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts +12 -0
  318. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts.map +1 -0
  319. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js +144 -0
  320. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js.map +1 -0
  321. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +12 -0
  322. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts.map +1 -0
  323. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js +97 -0
  324. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js.map +1 -0
  325. package/build/src/rules/eslint/jsdoc/require-jsdoc-private.d.ts +11 -0
  326. package/build/src/rules/eslint/jsdoc/require-jsdoc-private.d.ts.map +1 -0
  327. package/build/src/rules/eslint/jsdoc/require-jsdoc-private.js +90 -0
  328. package/build/src/rules/eslint/jsdoc/require-jsdoc-private.js.map +1 -0
  329. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts +11 -0
  330. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts.map +1 -0
  331. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js +88 -0
  332. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js.map +1 -0
  333. package/build/src/rules/eslint/nova/no-logger-dev.d.ts +13 -0
  334. package/build/src/rules/eslint/nova/no-logger-dev.d.ts.map +1 -0
  335. package/build/src/rules/eslint/nova/no-logger-dev.js +112 -0
  336. package/build/src/rules/eslint/nova/no-logger-dev.js.map +1 -0
  337. package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts +11 -0
  338. package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts.map +1 -0
  339. package/build/src/rules/eslint/patterns/no-assign-then-return.js +96 -0
  340. package/build/src/rules/eslint/patterns/no-assign-then-return.js.map +1 -0
  341. package/build/src/rules/eslint/patterns/no-await-in-loop.d.ts +17 -0
  342. package/build/src/rules/eslint/patterns/no-await-in-loop.d.ts.map +1 -0
  343. package/build/src/rules/eslint/patterns/no-await-in-loop.js +103 -0
  344. package/build/src/rules/eslint/patterns/no-await-in-loop.js.map +1 -0
  345. package/build/src/rules/eslint/patterns/no-boolean-var-for-if.d.ts +11 -0
  346. package/build/src/rules/eslint/patterns/no-boolean-var-for-if.d.ts.map +1 -0
  347. package/build/src/rules/eslint/patterns/no-boolean-var-for-if.js +100 -0
  348. package/build/src/rules/eslint/patterns/no-boolean-var-for-if.js.map +1 -0
  349. package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts +11 -0
  350. package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts.map +1 -0
  351. package/build/src/rules/eslint/patterns/no-bracket-assignment.js +69 -0
  352. package/build/src/rules/eslint/patterns/no-bracket-assignment.js.map +1 -0
  353. package/build/src/rules/eslint/patterns/no-bracket-method-call.d.ts +12 -0
  354. package/build/src/rules/eslint/patterns/no-bracket-method-call.d.ts.map +1 -0
  355. package/build/src/rules/eslint/patterns/no-bracket-method-call.js +86 -0
  356. package/build/src/rules/eslint/patterns/no-bracket-method-call.js.map +1 -0
  357. package/build/src/rules/eslint/patterns/no-template-curly-in-string.d.ts +11 -0
  358. package/build/src/rules/eslint/patterns/no-template-curly-in-string.d.ts.map +1 -0
  359. package/build/src/rules/eslint/patterns/no-template-curly-in-string.js +77 -0
  360. package/build/src/rules/eslint/patterns/no-template-curly-in-string.js.map +1 -0
  361. package/build/src/rules/eslint/patterns/no-use-before-define.d.ts +15 -0
  362. package/build/src/rules/eslint/patterns/no-use-before-define.d.ts.map +1 -0
  363. package/build/src/rules/eslint/patterns/no-use-before-define.js +148 -0
  364. package/build/src/rules/eslint/patterns/no-use-before-define.js.map +1 -0
  365. package/build/src/rules/eslint/regex/no-regex-literal-flags.d.ts +11 -0
  366. package/build/src/rules/eslint/regex/no-regex-literal-flags.d.ts.map +1 -0
  367. package/build/src/rules/eslint/regex/no-regex-literal-flags.js +55 -0
  368. package/build/src/rules/eslint/regex/no-regex-literal-flags.js.map +1 -0
  369. package/build/src/rules/eslint/regex/no-regex-literals.d.ts +12 -0
  370. package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -0
  371. package/build/src/rules/eslint/regex/no-regex-literals.js +72 -0
  372. package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -0
  373. package/build/src/rules/eslint/safety/no-script-url.d.ts +12 -0
  374. package/build/src/rules/eslint/safety/no-script-url.d.ts.map +1 -0
  375. package/build/src/rules/eslint/safety/no-script-url.js +71 -0
  376. package/build/src/rules/eslint/safety/no-script-url.js.map +1 -0
  377. package/build/src/rules/eslint/syntax/no-destructuring.d.ts +21 -0
  378. package/build/src/rules/eslint/syntax/no-destructuring.d.ts.map +1 -0
  379. package/build/src/rules/eslint/syntax/no-destructuring.js +219 -0
  380. package/build/src/rules/eslint/syntax/no-destructuring.js.map +1 -0
  381. package/build/src/rules/eslint/syntax/no-numeric-literals.d.ts +14 -0
  382. package/build/src/rules/eslint/syntax/no-numeric-literals.d.ts.map +1 -0
  383. package/build/src/rules/eslint/syntax/no-numeric-literals.js +108 -0
  384. package/build/src/rules/eslint/syntax/no-numeric-literals.js.map +1 -0
  385. package/build/src/rules/eslint/syntax/no-optional-chaining.d.ts +11 -0
  386. package/build/src/rules/eslint/syntax/no-optional-chaining.d.ts.map +1 -0
  387. package/build/src/rules/eslint/syntax/no-optional-chaining.js +51 -0
  388. package/build/src/rules/eslint/syntax/no-optional-chaining.js.map +1 -0
  389. package/build/src/rules/eslint/syntax/no-rest-params.d.ts +15 -0
  390. package/build/src/rules/eslint/syntax/no-rest-params.d.ts.map +1 -0
  391. package/build/src/rules/eslint/syntax/no-rest-params.js +158 -0
  392. package/build/src/rules/eslint/syntax/no-rest-params.js.map +1 -0
  393. package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts +11 -0
  394. package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts.map +1 -0
  395. package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js +65 -0
  396. package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js.map +1 -0
  397. package/build/src/rules/eslint/typescript/no-explicit-any.d.ts +11 -0
  398. package/build/src/rules/eslint/typescript/no-explicit-any.d.ts.map +1 -0
  399. package/build/src/rules/eslint/typescript/no-explicit-any.js +51 -0
  400. package/build/src/rules/eslint/typescript/no-explicit-any.js.map +1 -0
  401. package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts +16 -0
  402. package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts.map +1 -0
  403. package/build/src/rules/eslint/typescript/no-inline-type-annotation.js +186 -0
  404. package/build/src/rules/eslint/typescript/no-inline-type-annotation.js.map +1 -0
  405. package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts +12 -0
  406. package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts.map +1 -0
  407. package/build/src/rules/eslint/typescript/no-shared-type-import.js +71 -0
  408. package/build/src/rules/eslint/typescript/no-shared-type-import.js.map +1 -0
  409. package/build/src/rules/eslint/typescript/require-bracket-property-access.d.ts +12 -0
  410. package/build/src/rules/eslint/typescript/require-bracket-property-access.d.ts.map +1 -0
  411. package/build/src/rules/eslint/typescript/require-bracket-property-access.js +115 -0
  412. package/build/src/rules/eslint/typescript/require-bracket-property-access.js.map +1 -0
  413. package/build/src/rules/eslint/typescript/require-type-naming.d.ts +12 -0
  414. package/build/src/rules/eslint/typescript/require-type-naming.d.ts.map +1 -0
  415. package/build/src/rules/eslint/typescript/require-type-naming.js +98 -0
  416. package/build/src/rules/eslint/typescript/require-type-naming.js.map +1 -0
  417. package/build/src/toolkit/bootstrap.d.ts +13 -0
  418. package/build/src/toolkit/bootstrap.d.ts.map +1 -0
  419. package/build/src/toolkit/bootstrap.js +175 -0
  420. package/build/src/toolkit/bootstrap.js.map +1 -0
  421. package/build/src/toolkit/cli-header.d.ts +5 -4
  422. package/build/src/toolkit/cli-header.d.ts.map +1 -1
  423. package/build/src/toolkit/cli-header.js +77 -63
  424. package/build/src/toolkit/cli-header.js.map +1 -1
  425. package/build/src/toolkit/index.d.ts +1 -0
  426. package/build/src/toolkit/index.d.ts.map +1 -1
  427. package/build/src/toolkit/index.js +1 -0
  428. package/build/src/toolkit/index.js.map +1 -1
  429. package/build/src/toolkit/logger.d.ts +9 -8
  430. package/build/src/toolkit/logger.d.ts.map +1 -1
  431. package/build/src/toolkit/logger.js +51 -32
  432. package/build/src/toolkit/logger.js.map +1 -1
  433. package/build/src/toolkit/markdown-table.d.ts +6 -5
  434. package/build/src/toolkit/markdown-table.d.ts.map +1 -1
  435. package/build/src/toolkit/markdown-table.js +36 -20
  436. package/build/src/toolkit/markdown-table.js.map +1 -1
  437. package/build/src/types/api/node-releases.d.ts +51 -0
  438. package/build/src/types/api/spdx-licenses.d.ts +41 -0
  439. package/build/src/types/cli/generate/github/funding.d.ts +59 -0
  440. package/build/src/types/cli/generate/github/issue-template.d.ts +142 -0
  441. package/build/src/types/cli/generate/github/workflows.d.ts +336 -0
  442. package/build/src/types/cli/generate/must-haves/agent-conventions.d.ts +43 -0
  443. package/build/src/types/cli/generate/must-haves/dotenv.d.ts +414 -0
  444. package/build/src/types/cli/generate/must-haves/editorconfig.d.ts +33 -0
  445. package/build/src/types/cli/generate/must-haves/gitignore.d.ts +344 -0
  446. package/build/src/types/cli/generate/must-haves/license.d.ts +72 -0
  447. package/build/src/types/cli/generate/must-haves/read-me.d.ts +175 -0
  448. package/build/src/types/cli/index.d.ts +182 -0
  449. package/build/src/types/cli/recipe/index.d.ts +36 -0
  450. package/build/src/types/cli/recipe/package-json/cleanup.d.ts +125 -0
  451. package/build/src/types/cli/recipe/package-json/normalize-artifacts.d.ts +104 -0
  452. package/build/src/types/cli/recipe/package-json/normalize-bundler.d.ts +78 -0
  453. package/build/src/types/cli/recipe/package-json/normalize-dependencies.d.ts +150 -0
  454. package/build/src/types/cli/recipe/package-json/normalize-modules.d.ts +76 -0
  455. package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +89 -0
  456. package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +140 -0
  457. package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +107 -0
  458. package/build/src/types/cli/recipe/package-json/sync-ownership.d.ts +152 -0
  459. package/build/src/types/cli/scaffold/app/expressjs.d.ts +21 -0
  460. package/build/src/types/cli/scaffold/app/nextjs.d.ts +21 -0
  461. package/build/src/types/cli/scaffold/app/vite.d.ts +21 -0
  462. package/build/src/types/cli/scaffold/app/workers.d.ts +21 -0
  463. package/build/src/types/cli/scaffold/docs/docusaurus.d.ts +21 -0
  464. package/build/src/types/cli/scaffold/starter/base.d.ts +57 -0
  465. package/build/src/types/cli/utility/changelog.d.ts +381 -0
  466. package/build/src/types/cli/utility/initialize.d.ts +1185 -0
  467. package/build/src/types/cli/utility/run-recipes.d.ts +25 -0
  468. package/build/src/types/cli/utility/run-scripts.d.ts +133 -0
  469. package/build/src/types/cli/utility/transpile.d.ts +90 -0
  470. package/build/src/types/cli/utility/type-check.d.ts +88 -0
  471. package/build/src/types/cli/utility/version.d.ts +286 -0
  472. package/build/src/types/fetch-response.d.ts +12 -0
  473. package/build/src/types/lib/item.d.ts +536 -0
  474. package/build/src/types/lib/nova-config.d.ts +421 -0
  475. package/build/src/types/lib/scaffold.d.ts +342 -0
  476. package/build/src/types/lib/utility.d.ts +486 -0
  477. package/build/src/types/lib/workflow-templates.d.ts +48 -0
  478. package/build/src/types/presets/eslint/dx-code-style.d.ts +8 -0
  479. package/build/src/types/presets/eslint/dx-ignore.d.ts +8 -0
  480. package/build/src/types/presets/eslint/fw-docusaurus.d.ts +8 -0
  481. package/build/src/types/presets/eslint/fw-expressjs.d.ts +8 -0
  482. package/build/src/types/presets/eslint/fw-nextjs.d.ts +8 -0
  483. package/build/src/types/presets/eslint/lang-javascript.d.ts +8 -0
  484. package/build/src/types/presets/eslint/lang-mdx.d.ts +8 -0
  485. package/build/src/types/presets/eslint/lang-typescript.d.ts +8 -0
  486. package/build/src/types/presets/eslint/runtime-browser.d.ts +8 -0
  487. package/build/src/types/presets/eslint/runtime-cloudflare-workers.d.ts +8 -0
  488. package/build/src/types/presets/eslint/runtime-edge.d.ts +8 -0
  489. package/build/src/types/presets/eslint/runtime-node.d.ts +8 -0
  490. package/build/src/types/presets/eslint/runtime-service-worker.d.ts +8 -0
  491. package/build/src/types/presets/eslint/runtime-web-worker.d.ts +8 -0
  492. package/build/src/types/presets/eslint/tool-vite.d.ts +8 -0
  493. package/build/src/types/rules/eslint/conventions/no-default-export-declaration.d.ts +32 -0
  494. package/build/src/types/rules/eslint/conventions/no-implicit-boolean.d.ts +72 -0
  495. package/build/src/types/rules/eslint/conventions/require-explicit-return.d.ts +73 -0
  496. package/build/src/types/rules/eslint/conventions/require-hash-private.d.ts +31 -0
  497. package/build/src/types/rules/eslint/conventions/require-kebab-case-filename.d.ts +64 -0
  498. package/build/src/types/rules/eslint/conventions/require-naming-convention.d.ts +265 -0
  499. package/build/src/types/rules/eslint/conventions/require-undefined-init.d.ts +30 -0
  500. package/build/src/types/rules/eslint/conventions/switch-case-blocks.d.ts +48 -0
  501. package/build/src/types/rules/eslint/formatting/no-complex-arrow-concise.d.ts +74 -0
  502. package/build/src/types/rules/eslint/formatting/no-multiline-strings.d.ts +104 -0
  503. package/build/src/types/rules/eslint/formatting/no-raw-text-in-code.d.ts +28 -0
  504. package/build/src/types/rules/eslint/formatting/no-ternary-in-template-literal.d.ts +26 -0
  505. package/build/src/types/rules/eslint/formatting/require-import-order.d.ts +91 -0
  506. package/build/src/types/rules/eslint/formatting/require-multiline-condition-groups.d.ts +64 -0
  507. package/build/src/types/rules/eslint/formatting/require-multiline-conditions.d.ts +52 -0
  508. package/build/src/types/rules/eslint/formatting/require-padding-lines.d.ts +212 -0
  509. package/build/src/types/rules/eslint/formatting/require-ternary-parens.d.ts +32 -0
  510. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-body.d.ts +56 -0
  511. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +302 -0
  512. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts +108 -0
  513. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +61 -0
  514. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-private.d.ts +40 -0
  515. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-since.d.ts +30 -0
  516. package/build/src/types/rules/eslint/nova/no-logger-dev.d.ts +60 -0
  517. package/build/src/types/rules/eslint/patterns/no-assign-then-return.d.ts +42 -0
  518. package/build/src/types/rules/eslint/patterns/no-await-in-loop.d.ts +87 -0
  519. package/build/src/types/rules/eslint/patterns/no-boolean-var-for-if.d.ts +48 -0
  520. package/build/src/types/rules/eslint/patterns/no-bracket-assignment.d.ts +34 -0
  521. package/build/src/types/rules/eslint/patterns/no-bracket-method-call.d.ts +46 -0
  522. package/build/src/types/rules/eslint/patterns/no-template-curly-in-string.d.ts +32 -0
  523. package/build/src/types/rules/eslint/patterns/no-use-before-define.d.ts +84 -0
  524. package/build/src/types/rules/eslint/regex/no-regex-literal-flags.d.ts +26 -0
  525. package/build/src/types/rules/eslint/regex/no-regex-literals.d.ts +40 -0
  526. package/build/src/types/rules/eslint/safety/no-script-url.d.ts +37 -0
  527. package/build/src/types/rules/eslint/syntax/no-destructuring.d.ts +131 -0
  528. package/build/src/types/rules/eslint/syntax/no-numeric-literals.d.ts +57 -0
  529. package/build/src/types/rules/eslint/syntax/no-optional-chaining.d.ts +26 -0
  530. package/build/src/types/rules/eslint/syntax/no-rest-params.d.ts +78 -0
  531. package/build/src/types/rules/eslint/typescript/no-catch-unknown-annotation.d.ts +30 -0
  532. package/build/src/types/rules/eslint/typescript/no-explicit-any.d.ts +26 -0
  533. package/build/src/types/rules/eslint/typescript/no-inline-type-annotation.d.ts +94 -0
  534. package/build/src/types/rules/eslint/typescript/no-shared-type-import.d.ts +43 -0
  535. package/build/src/types/rules/eslint/typescript/require-bracket-property-access.d.ts +53 -0
  536. package/build/src/types/rules/eslint/typescript/require-type-naming.d.ts +51 -0
  537. package/build/src/types/shared.d.ts +724 -0
  538. package/build/src/types/tests/api/node-releases.test.d.ts +14 -0
  539. package/build/src/types/tests/api/spdx-licenses.test.d.ts +18 -0
  540. package/build/src/types/tests/cli/generate/github/funding.test.d.ts +26 -0
  541. package/build/src/types/tests/cli/generate/github/issue-template.test.d.ts +14 -0
  542. package/build/src/types/tests/cli/generate/github/workflows.test.d.ts +38 -0
  543. package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +32 -0
  544. package/build/src/types/tests/cli/generate/must-haves/dotenv.test.d.ts +14 -0
  545. package/build/src/types/tests/cli/generate/must-haves/editorconfig.test.d.ts +22 -0
  546. package/build/src/types/tests/cli/generate/must-haves/gitignore.test.d.ts +14 -0
  547. package/build/src/types/tests/cli/generate/must-haves/license.test.d.ts +26 -0
  548. package/build/src/types/tests/cli/generate/must-haves/read-me.test.d.ts +26 -0
  549. package/build/src/types/tests/cli/recipe/package-json/cleanup.test.d.ts +42 -0
  550. package/build/src/types/tests/cli/recipe/package-json/normalize-artifacts.test.d.ts +32 -0
  551. package/build/src/types/tests/cli/recipe/package-json/normalize-bundler.test.d.ts +32 -0
  552. package/build/src/types/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts +40 -0
  553. package/build/src/types/tests/cli/recipe/package-json/normalize-modules.test.d.ts +32 -0
  554. package/build/src/types/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +32 -0
  555. package/build/src/types/tests/cli/recipe/package-json/sync-environment.test.d.ts +32 -0
  556. package/build/src/types/tests/cli/recipe/package-json/sync-identity.test.d.ts +32 -0
  557. package/build/src/types/tests/cli/recipe/package-json/sync-ownership.test.d.ts +32 -0
  558. package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +40 -0
  559. package/build/src/types/tests/cli/scaffold/app/nextjs.test.d.ts +42 -0
  560. package/build/src/types/tests/cli/scaffold/app/vite.test.d.ts +42 -0
  561. package/build/src/types/tests/cli/scaffold/app/workers.test.d.ts +40 -0
  562. package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +40 -0
  563. package/build/src/types/tests/cli/scaffold/starter/base.test.d.ts +40 -0
  564. package/build/src/types/tests/cli/utility/changelog.test.d.ts +68 -0
  565. package/build/src/types/tests/cli/utility/initialize.test.d.ts +14 -0
  566. package/build/src/types/tests/cli/utility/run-recipes.test.d.ts +22 -0
  567. package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +52 -0
  568. package/build/src/types/tests/cli/utility/transpile.test.d.ts +26 -0
  569. package/build/src/types/tests/cli/utility/type-check.test.d.ts +22 -0
  570. package/build/src/types/tests/cli/utility/version.test.d.ts +12 -0
  571. package/build/src/types/tests/lib/item.test.d.ts +88 -0
  572. package/build/src/types/tests/lib/nova-config.test.d.ts +138 -0
  573. package/build/src/types/tests/lib/regex.test.d.ts +122 -0
  574. package/build/src/types/tests/lib/scaffold.test.d.ts +26 -0
  575. package/build/src/types/tests/lib/schema.test.d.ts +36 -0
  576. package/build/src/types/tests/lib/utility.test.d.ts +324 -0
  577. package/build/src/types/tests/lib/workflow-templates.test.d.ts +77 -0
  578. package/build/src/types/tests/rules/eslint/conventions/no-default-export-declaration.test.d.ts +8 -0
  579. package/build/src/types/tests/rules/eslint/conventions/no-implicit-boolean.test.d.ts +8 -0
  580. package/build/src/types/tests/rules/eslint/conventions/require-explicit-return.test.d.ts +8 -0
  581. package/build/src/types/tests/rules/eslint/conventions/require-hash-private.test.d.ts +8 -0
  582. package/build/src/types/tests/rules/eslint/conventions/require-kebab-case-filename.test.d.ts +8 -0
  583. package/build/src/types/tests/rules/eslint/conventions/require-naming-convention.test.d.ts +8 -0
  584. package/build/src/types/tests/rules/eslint/conventions/require-undefined-init.test.d.ts +8 -0
  585. package/build/src/types/tests/rules/eslint/conventions/switch-case-blocks.test.d.ts +8 -0
  586. package/build/src/types/tests/rules/eslint/formatting/no-complex-arrow-concise.test.d.ts +8 -0
  587. package/build/src/types/tests/rules/eslint/formatting/no-multiline-strings.test.d.ts +8 -0
  588. package/build/src/types/tests/rules/eslint/formatting/no-raw-text-in-code.test.d.ts +8 -0
  589. package/build/src/types/tests/rules/eslint/formatting/no-ternary-in-template-literal.test.d.ts +8 -0
  590. package/build/src/types/tests/rules/eslint/formatting/require-import-order.test.d.ts +8 -0
  591. package/build/src/types/tests/rules/eslint/formatting/require-multiline-condition-groups.test.d.ts +8 -0
  592. package/build/src/types/tests/rules/eslint/formatting/require-multiline-conditions.test.d.ts +8 -0
  593. package/build/src/types/tests/rules/eslint/formatting/require-padding-lines.test.d.ts +8 -0
  594. package/build/src/types/tests/rules/eslint/formatting/require-ternary-parens.test.d.ts +8 -0
  595. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-body.test.d.ts +8 -0
  596. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-hierarchy.test.d.ts +8 -0
  597. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-param-alignment.test.d.ts +8 -0
  598. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-param-name.test.d.ts +8 -0
  599. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-private.test.d.ts +8 -0
  600. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-since.test.d.ts +8 -0
  601. package/build/src/types/tests/rules/eslint/nova/no-logger-dev.test.d.ts +8 -0
  602. package/build/src/types/tests/rules/eslint/patterns/no-assign-then-return.test.d.ts +8 -0
  603. package/build/src/types/tests/rules/eslint/patterns/no-await-in-loop.test.d.ts +8 -0
  604. package/build/src/types/tests/rules/eslint/patterns/no-boolean-var-for-if.test.d.ts +8 -0
  605. package/build/src/types/tests/rules/eslint/patterns/no-bracket-assignment.test.d.ts +8 -0
  606. package/build/src/types/tests/rules/eslint/patterns/no-bracket-method-call.test.d.ts +8 -0
  607. package/build/src/types/tests/rules/eslint/patterns/no-template-curly-in-string.test.d.ts +8 -0
  608. package/build/src/types/tests/rules/eslint/patterns/no-use-before-define.test.d.ts +8 -0
  609. package/build/src/types/tests/rules/eslint/regex/no-regex-literal-flags.test.d.ts +8 -0
  610. package/build/src/types/tests/rules/eslint/regex/no-regex-literals.test.d.ts +8 -0
  611. package/build/src/types/tests/rules/eslint/safety/no-script-url.test.d.ts +8 -0
  612. package/build/src/types/tests/rules/eslint/syntax/no-destructuring.test.d.ts +8 -0
  613. package/build/src/types/tests/rules/eslint/syntax/no-numeric-literals.test.d.ts +8 -0
  614. package/build/src/types/tests/rules/eslint/syntax/no-optional-chaining.test.d.ts +8 -0
  615. package/build/src/types/tests/rules/eslint/syntax/no-rest-params.test.d.ts +8 -0
  616. package/build/src/types/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.d.ts +8 -0
  617. package/build/src/types/tests/rules/eslint/typescript/no-explicit-any.test.d.ts +8 -0
  618. package/build/src/types/tests/rules/eslint/typescript/no-inline-type-annotation.test.d.ts +8 -0
  619. package/build/src/types/tests/rules/eslint/typescript/no-shared-type-import.test.d.ts +8 -0
  620. package/build/src/types/tests/rules/eslint/typescript/require-bracket-property-access.test.d.ts +12 -0
  621. package/build/src/types/tests/rules/eslint/typescript/require-type-naming.test.d.ts +8 -0
  622. package/build/src/types/tests/toolkit/bootstrap.test.d.ts +108 -0
  623. package/build/src/types/tests/toolkit/cli-header.test.d.ts +46 -0
  624. package/build/src/types/tests/toolkit/logger.test.d.ts +20 -0
  625. package/build/src/types/tests/toolkit/markdown-table.test.d.ts +65 -0
  626. package/build/src/types/tests/type-declarations.test.d.ts +564 -0
  627. package/build/src/types/toolkit/bootstrap.d.ts +133 -0
  628. package/build/src/types/toolkit/cli-header.d.ts +203 -0
  629. package/build/src/types/toolkit/logger.d.ts +160 -0
  630. package/build/src/types/toolkit/markdown-table.d.ts +159 -0
  631. package/build/templates/.novaignore +0 -0
  632. package/build/templates/generators/github/funding/FUNDING.yml +12 -0
  633. package/build/templates/generators/github/issue-template/BUG-REPORT.yml +86 -0
  634. package/build/templates/generators/github/issue-template/FEATURE-REQUEST.yml +61 -0
  635. package/build/templates/generators/github/issue-template/SUPPORT-REQUEST.yml +50 -0
  636. package/build/templates/generators/github/issue-template/bug-report-fields/android.yml +16 -0
  637. package/build/templates/generators/github/issue-template/bug-report-fields/apple.yml +23 -0
  638. package/build/templates/generators/github/issue-template/bug-report-fields/csharp.yml +20 -0
  639. package/build/templates/generators/github/issue-template/bug-report-fields/docker.yml +33 -0
  640. package/build/templates/generators/github/issue-template/bug-report-fields/homebridge.yml +16 -0
  641. package/build/templates/generators/github/issue-template/bug-report-fields/nodejs.yml +8 -0
  642. package/build/templates/generators/github/issue-template/bug-report-fields/pfsense.yml +8 -0
  643. package/build/templates/generators/github/issue-template/bug-report-fields/php.yml +8 -0
  644. package/build/templates/generators/github/issue-template/bug-report-fields/python.yml +8 -0
  645. package/build/templates/generators/github/issue-template/bug-report-fields/screenshots.yml +7 -0
  646. package/build/templates/generators/github/issue-template/bug-report-fields/synology.yml +8 -0
  647. package/build/templates/generators/github/issue-template/bug-report-fields/web.yml +21 -0
  648. package/build/templates/generators/github/issue-template/config.yml +1 -0
  649. package/build/templates/generators/github/issue-template/legal-agreements/bug-report.yml +8 -0
  650. package/build/templates/generators/github/issue-template/legal-agreements/feature-request.yml +8 -0
  651. package/build/templates/generators/github/issue-template/legal-agreements/support-request.yml +8 -0
  652. package/build/templates/generators/github/workflows/check-sponsor-gated-issues/base.yml +57 -0
  653. package/build/templates/generators/github/workflows/lock-inactive-issues/base.yml +43 -0
  654. package/build/templates/generators/github/workflows/lock-inactive-issues/triggers/schedule.yml +5 -0
  655. package/build/templates/generators/github/workflows/publish-to-aws-amplify-nextjs/base.yml +53 -0
  656. package/build/templates/generators/github/workflows/publish-to-aws-amplify-nextjs/triggers/push.yml +5 -0
  657. package/build/templates/generators/github/workflows/publish-to-aws-amplify-nextjs/triggers/release.yml +5 -0
  658. package/build/templates/generators/github/workflows/publish-to-cloudflare-pages-docusaurus/base.yml +62 -0
  659. package/build/templates/generators/github/workflows/publish-to-cloudflare-pages-docusaurus/triggers/push.yml +5 -0
  660. package/build/templates/generators/github/workflows/publish-to-cloudflare-pages-docusaurus/triggers/release.yml +5 -0
  661. package/build/templates/generators/github/workflows/publish-to-docker-hub/base.yml +58 -0
  662. package/build/templates/generators/github/workflows/publish-to-docker-hub/triggers/release.yml +5 -0
  663. package/build/templates/generators/github/workflows/publish-to-docker-hub/triggers/workflow-run-any.yml +7 -0
  664. package/build/templates/generators/github/workflows/publish-to-docker-hub/triggers/workflow-run-failure.yml +8 -0
  665. package/build/templates/generators/github/workflows/publish-to-docker-hub/triggers/workflow-run-success.yml +8 -0
  666. package/build/templates/generators/github/workflows/publish-to-github-packages/base.yml +108 -0
  667. package/build/templates/generators/github/workflows/publish-to-github-packages/triggers/release.yml +5 -0
  668. package/build/templates/generators/github/workflows/publish-to-github-packages/triggers/workflow-run-any.yml +7 -0
  669. package/build/templates/generators/github/workflows/publish-to-github-packages/triggers/workflow-run-failure.yml +8 -0
  670. package/build/templates/generators/github/workflows/publish-to-github-packages/triggers/workflow-run-success.yml +8 -0
  671. package/build/templates/generators/github/workflows/publish-to-github-pages-docusaurus/base.yml +79 -0
  672. package/build/templates/generators/github/workflows/publish-to-github-pages-docusaurus/triggers/push.yml +5 -0
  673. package/build/templates/generators/github/workflows/publish-to-github-pages-docusaurus/triggers/release.yml +5 -0
  674. package/build/templates/generators/github/workflows/publish-to-npm/base.yml +91 -0
  675. package/build/templates/generators/github/workflows/publish-to-npm/triggers/release.yml +5 -0
  676. package/build/templates/generators/github/workflows/publish-to-npm/triggers/workflow-run-any.yml +7 -0
  677. package/build/templates/generators/github/workflows/publish-to-npm/triggers/workflow-run-failure.yml +8 -0
  678. package/build/templates/generators/github/workflows/publish-to-npm/triggers/workflow-run-success.yml +8 -0
  679. package/build/templates/generators/must-haves/agent-conventions/.cursorrules +54 -0
  680. package/build/templates/generators/must-haves/agent-conventions/AGENTS.md +54 -0
  681. package/build/templates/generators/must-haves/agent-conventions/CLAUDE.md +54 -0
  682. package/build/templates/generators/must-haves/agent-conventions/PROJECT_RULES.md +290 -0
  683. package/build/templates/generators/must-haves/agent-conventions/VISION.md +62 -0
  684. package/build/templates/generators/must-haves/agent-conventions/conventions/csharp.md +317 -0
  685. package/build/templates/generators/must-haves/agent-conventions/conventions/css.md +188 -0
  686. package/build/templates/generators/must-haves/agent-conventions/conventions/docker.md +131 -0
  687. package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +615 -0
  688. package/build/templates/generators/must-haves/agent-conventions/conventions/java.md +285 -0
  689. package/build/templates/generators/must-haves/agent-conventions/conventions/kotlin.md +297 -0
  690. package/build/templates/generators/must-haves/agent-conventions/conventions/php.md +257 -0
  691. package/build/templates/generators/must-haves/agent-conventions/conventions/python.md +260 -0
  692. package/build/templates/generators/must-haves/agent-conventions/conventions/shell.md +205 -0
  693. package/build/templates/generators/must-haves/agent-conventions/conventions/swift.md +312 -0
  694. package/build/templates/generators/must-haves/agent-conventions/conventions/typescript.md +1530 -0
  695. package/build/templates/generators/must-haves/agent-conventions/conventions/universal.md +202 -0
  696. package/build/templates/generators/must-haves/dotenv/.env.sample +14 -0
  697. package/build/templates/generators/must-haves/editorconfig/.editorconfig +212 -0
  698. package/build/templates/generators/must-haves/license/AGPL-3.0 +662 -0
  699. package/build/templates/generators/must-haves/license/Apache-2.0 +202 -0
  700. package/build/templates/generators/must-haves/license/BSD-2-Clause +25 -0
  701. package/build/templates/generators/must-haves/license/BSD-3-Clause +29 -0
  702. package/build/templates/generators/must-haves/license/BSL-1.0 +24 -0
  703. package/build/templates/generators/must-haves/license/CC0-1.0 +122 -0
  704. package/build/templates/generators/must-haves/license/EPL-2.0 +278 -0
  705. package/build/templates/generators/must-haves/license/GPL-2.0 +340 -0
  706. package/build/templates/generators/must-haves/license/GPL-3.0 +675 -0
  707. package/build/templates/generators/must-haves/license/LGPL-2.1 +505 -0
  708. package/build/templates/generators/must-haves/license/MIT +22 -0
  709. package/build/templates/generators/must-haves/license/MPL-2.0 +374 -0
  710. package/build/templates/generators/must-haves/license/Proprietary +22 -0
  711. package/build/templates/generators/must-haves/license/Unlicense +25 -0
  712. package/build/templates/generators/must-haves/read-me/README.md +17 -0
  713. package/build/templates/scaffold/app/express/package.json +20 -0
  714. package/build/templates/scaffold/app/express/src/index.ts +12 -0
  715. package/build/templates/scaffold/app/express/tsconfig.json +15 -0
  716. package/build/templates/scaffold/app/nextjs/next.config.mjs +4 -0
  717. package/build/templates/scaffold/app/nextjs/package.json +22 -0
  718. package/build/templates/scaffold/app/nextjs/src/app/globals.css +11 -0
  719. package/build/templates/scaffold/app/nextjs/src/app/layout.tsx +18 -0
  720. package/build/templates/scaffold/app/nextjs/src/app/page.tsx +8 -0
  721. package/build/templates/scaffold/app/nextjs/tsconfig.json +26 -0
  722. package/build/templates/scaffold/app/vite/index.html +12 -0
  723. package/build/templates/scaffold/app/vite/package.json +17 -0
  724. package/build/templates/scaffold/app/vite/src/main.ts +5 -0
  725. package/build/templates/scaffold/app/vite/tsconfig.json +16 -0
  726. package/build/templates/scaffold/app/vite/vite.config.mts +3 -0
  727. package/build/templates/scaffold/app/workers/package.json +16 -0
  728. package/build/templates/scaffold/app/workers/src/index.ts +13 -0
  729. package/build/templates/scaffold/app/workers/tsconfig.json +17 -0
  730. package/build/templates/scaffold/app/workers/wrangler.toml +3 -0
  731. package/build/templates/scaffold/docs/docusaurus/docs/intro.md +9 -0
  732. package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +33 -0
  733. package/build/templates/scaffold/docs/docusaurus/package.json +20 -0
  734. package/build/templates/scaffold/docs/docusaurus/sidebars.ts +9 -0
  735. package/build/templates/scaffold/docs/docusaurus/static/.gitkeep +0 -0
  736. package/build/templates/scaffold/docs/docusaurus/tsconfig.json +8 -0
  737. package/package.json +38 -32
  738. package/build/eslint.config.d.ts +0 -34
  739. package/build/eslint.config.d.ts.map +0 -1
  740. package/build/eslint.config.js +0 -40
  741. package/build/eslint.config.js.map +0 -1
  742. package/build/src/cli/recipe/pin-versions.d.ts +0 -7
  743. package/build/src/cli/recipe/pin-versions.d.ts.map +0 -1
  744. package/build/src/cli/recipe/pin-versions.js +0 -145
  745. package/build/src/cli/recipe/pin-versions.js.map +0 -1
  746. package/build/src/cli/recipe/sync-lts-engines.d.ts +0 -6
  747. package/build/src/cli/recipe/sync-lts-engines.d.ts.map +0 -1
  748. package/build/src/cli/recipe/sync-lts-engines.js +0 -118
  749. package/build/src/cli/recipe/sync-lts-engines.js.map +0 -1
  750. package/build/src/cli/recipe/sync-packages.d.ts +0 -18
  751. package/build/src/cli/recipe/sync-packages.d.ts.map +0 -1
  752. package/build/src/cli/recipe/sync-packages.js +0 -1212
  753. package/build/src/cli/recipe/sync-packages.js.map +0 -1
  754. package/build/src/presets/eslint/dx-code-style.d.mts +0 -4
  755. package/build/src/presets/eslint/dx-code-style.d.mts.map +0 -1
  756. package/build/src/presets/eslint/dx-code-style.mjs +0 -211
  757. package/build/src/presets/eslint/dx-code-style.mjs.map +0 -1
  758. package/build/src/presets/eslint/dx-ignore.d.mts +0 -4
  759. package/build/src/presets/eslint/dx-ignore.d.mts.map +0 -1
  760. package/build/src/presets/eslint/dx-ignore.mjs.map +0 -1
  761. package/build/src/presets/eslint/env-browser.d.mts +0 -4
  762. package/build/src/presets/eslint/env-browser.d.mts.map +0 -1
  763. package/build/src/presets/eslint/env-browser.mjs +0 -3
  764. package/build/src/presets/eslint/env-browser.mjs.map +0 -1
  765. package/build/src/presets/eslint/env-edge.d.mts +0 -4
  766. package/build/src/presets/eslint/env-edge.d.mts.map +0 -1
  767. package/build/src/presets/eslint/env-edge.mjs.map +0 -1
  768. package/build/src/presets/eslint/env-node.d.mts +0 -4
  769. package/build/src/presets/eslint/env-node.d.mts.map +0 -1
  770. package/build/src/presets/eslint/env-node.mjs.map +0 -1
  771. package/build/src/presets/eslint/env-service-worker.d.mts +0 -4
  772. package/build/src/presets/eslint/env-service-worker.d.mts.map +0 -1
  773. package/build/src/presets/eslint/env-service-worker.mjs +0 -3
  774. package/build/src/presets/eslint/env-service-worker.mjs.map +0 -1
  775. package/build/src/presets/eslint/env-web-worker.d.mts +0 -4
  776. package/build/src/presets/eslint/env-web-worker.d.mts.map +0 -1
  777. package/build/src/presets/eslint/env-web-worker.mjs.map +0 -1
  778. package/build/src/presets/eslint/fw-docusaurus.d.mts +0 -4
  779. package/build/src/presets/eslint/fw-docusaurus.d.mts.map +0 -1
  780. package/build/src/presets/eslint/fw-docusaurus.mjs +0 -10
  781. package/build/src/presets/eslint/fw-docusaurus.mjs.map +0 -1
  782. package/build/src/presets/eslint/fw-expressjs.d.mts +0 -4
  783. package/build/src/presets/eslint/fw-expressjs.d.mts.map +0 -1
  784. package/build/src/presets/eslint/fw-expressjs.mjs.map +0 -1
  785. package/build/src/presets/eslint/fw-nextjs.d.mts +0 -4
  786. package/build/src/presets/eslint/fw-nextjs.d.mts.map +0 -1
  787. package/build/src/presets/eslint/fw-nextjs.mjs.map +0 -1
  788. package/build/src/presets/eslint/index.d.mts +0 -16
  789. package/build/src/presets/eslint/index.d.mts.map +0 -1
  790. package/build/src/presets/eslint/index.mjs +0 -16
  791. package/build/src/presets/eslint/index.mjs.map +0 -1
  792. package/build/src/presets/eslint/lang-javascript.d.mts +0 -4
  793. package/build/src/presets/eslint/lang-javascript.d.mts.map +0 -1
  794. package/build/src/presets/eslint/lang-javascript.mjs +0 -3
  795. package/build/src/presets/eslint/lang-javascript.mjs.map +0 -1
  796. package/build/src/presets/eslint/lang-mdx.d.mts +0 -4
  797. package/build/src/presets/eslint/lang-mdx.d.mts.map +0 -1
  798. package/build/src/presets/eslint/lang-mdx.mjs.map +0 -1
  799. package/build/src/presets/eslint/lang-typescript.d.mts +0 -4
  800. package/build/src/presets/eslint/lang-typescript.d.mts.map +0 -1
  801. package/build/src/presets/eslint/lang-typescript.mjs +0 -88
  802. package/build/src/presets/eslint/lang-typescript.mjs.map +0 -1
  803. package/build/src/presets/eslint/platform-cloudflare-workers.d.mts +0 -4
  804. package/build/src/presets/eslint/platform-cloudflare-workers.d.mts.map +0 -1
  805. package/build/src/presets/eslint/platform-cloudflare-workers.mjs +0 -8
  806. package/build/src/presets/eslint/platform-cloudflare-workers.mjs.map +0 -1
  807. package/build/src/presets/eslint/tool-vite.d.mts +0 -4
  808. package/build/src/presets/eslint/tool-vite.d.mts.map +0 -1
  809. package/build/src/presets/eslint/tool-vite.mjs.map +0 -1
  810. package/build/src/presets/tsconfig/env-web-worker.json +0 -12
  811. package/build/src/rules/eslint/no-logger-dev.d.ts +0 -6
  812. package/build/src/rules/eslint/no-logger-dev.d.ts.map +0 -1
  813. package/build/src/rules/eslint/no-logger-dev.js +0 -88
  814. package/build/src/rules/eslint/no-logger-dev.js.map +0 -1
  815. package/build/src/rules/eslint/no-raw-text-in-code.d.ts +0 -6
  816. package/build/src/rules/eslint/no-raw-text-in-code.d.ts.map +0 -1
  817. package/build/src/rules/eslint/no-raw-text-in-code.js +0 -34
  818. package/build/src/rules/eslint/no-raw-text-in-code.js.map +0 -1
  819. package/build/src/rules/eslint/no-regex-literal-flags.d.ts +0 -6
  820. package/build/src/rules/eslint/no-regex-literal-flags.d.ts.map +0 -1
  821. package/build/src/rules/eslint/no-regex-literal-flags.js +0 -30
  822. package/build/src/rules/eslint/no-regex-literal-flags.js.map +0 -1
  823. package/build/src/rules/eslint/no-regex-literals.d.ts +0 -9
  824. package/build/src/rules/eslint/no-regex-literals.d.ts.map +0 -1
  825. package/build/src/rules/eslint/no-regex-literals.js +0 -55
  826. package/build/src/rules/eslint/no-regex-literals.js.map +0 -1
  827. package/build/src/rules/eslint/switch-case-blocks.d.ts +0 -6
  828. package/build/src/rules/eslint/switch-case-blocks.d.ts.map +0 -1
  829. package/build/src/rules/eslint/switch-case-blocks.js +0 -36
  830. package/build/src/rules/eslint/switch-case-blocks.js.map +0 -1
  831. package/build/src/tests/api/node-releases.test.d.ts +0 -2
  832. package/build/src/tests/api/node-releases.test.d.ts.map +0 -1
  833. package/build/src/tests/api/node-releases.test.js +0 -193
  834. package/build/src/tests/api/node-releases.test.js.map +0 -1
  835. package/build/src/tests/api/spdx-licenses.test.d.ts +0 -2
  836. package/build/src/tests/api/spdx-licenses.test.d.ts.map +0 -1
  837. package/build/src/tests/api/spdx-licenses.test.js +0 -91
  838. package/build/src/tests/api/spdx-licenses.test.js.map +0 -1
  839. package/build/src/tests/cli/recipe/pin-versions.test.d.ts +0 -2
  840. package/build/src/tests/cli/recipe/pin-versions.test.d.ts.map +0 -1
  841. package/build/src/tests/cli/recipe/pin-versions.test.js +0 -197
  842. package/build/src/tests/cli/recipe/pin-versions.test.js.map +0 -1
  843. package/build/src/tests/cli/recipe/sync-lts-engines.test.d.ts +0 -2
  844. package/build/src/tests/cli/recipe/sync-lts-engines.test.d.ts.map +0 -1
  845. package/build/src/tests/cli/recipe/sync-lts-engines.test.js +0 -131
  846. package/build/src/tests/cli/recipe/sync-lts-engines.test.js.map +0 -1
  847. package/build/src/tests/lib/item.test.d.ts +0 -2
  848. package/build/src/tests/lib/item.test.d.ts.map +0 -1
  849. package/build/src/tests/lib/item.test.js +0 -142
  850. package/build/src/tests/lib/item.test.js.map +0 -1
  851. package/build/src/tests/lib/nova-config.test.d.ts +0 -2
  852. package/build/src/tests/lib/nova-config.test.d.ts.map +0 -1
  853. package/build/src/tests/lib/nova-config.test.js +0 -489
  854. package/build/src/tests/lib/nova-config.test.js.map +0 -1
  855. package/build/src/tests/lib/regex.test.d.ts +0 -2
  856. package/build/src/tests/lib/regex.test.d.ts.map +0 -1
  857. package/build/src/tests/lib/regex.test.js +0 -342
  858. package/build/src/tests/lib/regex.test.js.map +0 -1
  859. package/build/src/tests/lib/schema.test.d.ts +0 -2
  860. package/build/src/tests/lib/schema.test.d.ts.map +0 -1
  861. package/build/src/tests/lib/schema.test.js +0 -260
  862. package/build/src/tests/lib/schema.test.js.map +0 -1
  863. package/build/src/tests/lib/utility.test.d.ts +0 -2
  864. package/build/src/tests/lib/utility.test.d.ts.map +0 -1
  865. package/build/src/tests/lib/utility.test.js +0 -744
  866. package/build/src/tests/lib/utility.test.js.map +0 -1
  867. package/build/src/tests/rules/eslint/no-logger-dev.test.d.ts +0 -2
  868. package/build/src/tests/rules/eslint/no-logger-dev.test.d.ts.map +0 -1
  869. package/build/src/tests/rules/eslint/no-logger-dev.test.js +0 -55
  870. package/build/src/tests/rules/eslint/no-logger-dev.test.js.map +0 -1
  871. package/build/src/tests/rules/eslint/no-raw-text-in-code.test.d.ts +0 -2
  872. package/build/src/tests/rules/eslint/no-raw-text-in-code.test.d.ts.map +0 -1
  873. package/build/src/tests/rules/eslint/no-raw-text-in-code.test.js +0 -47
  874. package/build/src/tests/rules/eslint/no-raw-text-in-code.test.js.map +0 -1
  875. package/build/src/tests/rules/eslint/no-regex-literal-flags.test.d.ts +0 -2
  876. package/build/src/tests/rules/eslint/no-regex-literal-flags.test.d.ts.map +0 -1
  877. package/build/src/tests/rules/eslint/no-regex-literal-flags.test.js +0 -47
  878. package/build/src/tests/rules/eslint/no-regex-literal-flags.test.js.map +0 -1
  879. package/build/src/tests/rules/eslint/no-regex-literals.test.d.ts +0 -2
  880. package/build/src/tests/rules/eslint/no-regex-literals.test.d.ts.map +0 -1
  881. package/build/src/tests/rules/eslint/no-regex-literals.test.js +0 -49
  882. package/build/src/tests/rules/eslint/no-regex-literals.test.js.map +0 -1
  883. package/build/src/tests/rules/eslint/switch-case-blocks.test.d.ts +0 -2
  884. package/build/src/tests/rules/eslint/switch-case-blocks.test.d.ts.map +0 -1
  885. package/build/src/tests/rules/eslint/switch-case-blocks.test.js +0 -43
  886. package/build/src/tests/rules/eslint/switch-case-blocks.test.js.map +0 -1
  887. package/build/src/tests/toolkit/cli-header.test.d.ts +0 -2
  888. package/build/src/tests/toolkit/cli-header.test.d.ts.map +0 -1
  889. package/build/src/tests/toolkit/cli-header.test.js +0 -143
  890. package/build/src/tests/toolkit/cli-header.test.js.map +0 -1
  891. package/build/src/tests/toolkit/logger.test.d.ts +0 -2
  892. package/build/src/tests/toolkit/logger.test.d.ts.map +0 -1
  893. package/build/src/tests/toolkit/logger.test.js +0 -96
  894. package/build/src/tests/toolkit/logger.test.js.map +0 -1
  895. package/build/src/tests/toolkit/markdown-table.test.d.ts +0 -2
  896. package/build/src/tests/toolkit/markdown-table.test.d.ts.map +0 -1
  897. package/build/src/tests/toolkit/markdown-table.test.js +0 -138
  898. package/build/src/tests/toolkit/markdown-table.test.js.map +0 -1
  899. /package/build/src/presets/tsconfig/{env-browser.json → runtime-browser.json} +0 -0
  900. /package/build/src/presets/tsconfig/{env-edge.json → runtime-edge.json} +0 -0
  901. /package/build/src/presets/tsconfig/{env-node.json → runtime-node.json} +0 -0
  902. /package/build/src/presets/tsconfig/{env-service-worker.json → runtime-service-worker.json} +0 -0
@@ -1,40 +1,42 @@
1
- import { relative, sep } from 'path';
1
+ import { promises as fs } from 'fs';
2
+ import { join, relative, sep } from 'path';
2
3
  import chalk from 'chalk';
3
4
  import prompts from 'prompts';
4
- import { itemAllowedPoliciesByRole, itemAllowedSyncProperties } from '../../lib/item.js';
5
- import { NovaConfig } from '../../lib/nova-config.js';
6
- import { PATTERN_EMAIL_SIMPLE, PATTERN_SLUG_SCOPED, PATTERN_SLUG_SIMPLE } from '../../lib/regex.js';
7
- import { discoverPathsWithFile } from '../../lib/utility.js';
5
+ import { libItemAllowedPoliciesByRole, libItemAllowedRecipes, libItemSyncRoles, libItemValidEntityRoles, } from '../../lib/item.js';
6
+ import { LibNovaConfig } from '../../lib/nova-config.js';
7
+ import { LIB_REGEX_PATTERN_EMAIL_SIMPLE, LIB_REGEX_PATTERN_SLUG_SCOPED, LIB_REGEX_PATTERN_SLUG_SIMPLE, LIB_REGEX_PATTERN_YML_EXTENSION, } from '../../lib/regex.js';
8
+ import { discoverPathsWithFile, pathExists, resolveTemplatePath } from '../../lib/utility.js';
9
+ import { libWorkflowTemplatesMetadata } from '../../lib/workflow-templates.js';
8
10
  import { Logger } from '../../toolkit/index.js';
9
- export class CLIUtilityInitialize {
11
+ export class CliUtilityInitialize {
10
12
  static async run(options) {
11
13
  const currentDirectory = process.cwd();
12
- const isProjectRoot = await CLIUtilityInitialize.checkPath(currentDirectory);
14
+ const isProjectRoot = await CliUtilityInitialize.checkPath(currentDirectory);
13
15
  if (isProjectRoot !== true) {
14
16
  process.exitCode = 1;
15
17
  return;
16
18
  }
17
- const isDryRun = options.dryRun === true;
18
- const isReplaceFile = options.replaceFile === true;
19
+ const isDryRun = options['dryRun'] === true;
20
+ const isReplaceFile = options['replaceFile'] === true;
19
21
  if (isDryRun === true) {
20
22
  Logger.customize({
21
- name: 'CLIUtilityInitialize.run',
23
+ name: 'CliUtilityInitialize.run',
22
24
  purpose: 'options',
23
25
  }).warn('Dry run enabled. File changes will not be made in this session.');
24
26
  }
25
27
  if (isReplaceFile === true) {
26
- const replaceFileNotice = (isDryRun) ? 'This option has no effect during a dry run session.' : 'Backup file will not be created.';
28
+ const replaceFileNotice = (isDryRun === true) ? 'This option has no effect during a dry run session.' : 'Backup file will not be created.';
27
29
  Logger.customize({
28
- name: 'CLIUtilityInitialize.run',
30
+ name: 'CliUtilityInitialize.run',
29
31
  purpose: 'options',
30
32
  }).warn(`Replace file enabled. ${replaceFileNotice}`);
31
33
  }
32
- const novaConfig = new NovaConfig();
34
+ const novaConfig = new LibNovaConfig();
33
35
  const workingFile = await novaConfig.load();
34
- const promptFlowResult = await CLIUtilityInitialize.promptFlow(workingFile);
36
+ const promptFlowResult = await CliUtilityInitialize.promptFlow(workingFile);
35
37
  if (promptFlowResult === 'cancel') {
36
38
  Logger.customize({
37
- name: 'CLIUtilityInitialize.run',
39
+ name: 'CliUtilityInitialize.run',
38
40
  purpose: 'promptFlow',
39
41
  }).debug('Prompt flow exited without saving.');
40
42
  return;
@@ -42,46 +44,52 @@ export class CLIUtilityInitialize {
42
44
  novaConfig.set(workingFile);
43
45
  if (isDryRun === true) {
44
46
  Logger.customize({
45
- name: 'CLIUtilityInitialize.run',
47
+ name: 'CliUtilityInitialize.run',
46
48
  purpose: 'promptFlow',
47
49
  }).debug('Dry run enabled. Skipping save operation.');
48
50
  return;
49
51
  }
50
52
  await novaConfig.save(isReplaceFile);
53
+ return;
51
54
  }
52
55
  static async promptFlow(config) {
53
56
  const category = {
54
57
  project: {
55
58
  label: 'Project',
56
59
  description: 'Configure project metadata (name, description, keywords).',
57
- handler: CLIUtilityInitialize.promptProject,
60
+ handler: CliUtilityInitialize['promptProject'],
58
61
  },
59
62
  entities: {
60
63
  label: 'Entities',
61
64
  description: 'Manage entities, their roles, and contact information.',
62
- handler: CLIUtilityInitialize.promptEntities,
65
+ handler: CliUtilityInitialize['promptEntities'],
63
66
  },
64
67
  emails: {
65
68
  label: 'Emails',
66
69
  description: 'Configure project emails (bugs, etc.).',
67
- handler: CLIUtilityInitialize.promptEmails,
70
+ handler: CliUtilityInitialize['promptEmails'],
71
+ },
72
+ workflows: {
73
+ label: 'Workflows',
74
+ description: 'Configure workflow templates and settings.',
75
+ handler: CliUtilityInitialize['promptWorkflows'],
68
76
  },
69
77
  urls: {
70
78
  label: 'URLs',
71
79
  description: 'Configure project URLs (homepage, repository, fund sources, etc.).',
72
- handler: CLIUtilityInitialize.promptUrls,
80
+ handler: CliUtilityInitialize['promptUrls'],
73
81
  },
74
82
  workspaces: {
75
83
  label: 'Workspaces',
76
84
  description: 'Review workspace packages, assigning roles and policies.',
77
- handler: CLIUtilityInitialize.promptWorkspaces,
85
+ handler: CliUtilityInitialize['promptWorkspaces'],
78
86
  },
79
87
  };
80
88
  while (true) {
81
89
  const categoryKeys = Object.keys(category);
82
90
  const choices = categoryKeys.map((categoryKey) => ({
83
- title: category[categoryKey].label,
84
- description: category[categoryKey].description,
91
+ title: category[categoryKey]['label'],
92
+ description: category[categoryKey]['description'],
85
93
  value: categoryKey,
86
94
  }));
87
95
  choices.push({
@@ -94,16 +102,16 @@ export class CLIUtilityInitialize {
94
102
  description: 'Exit without persisting any changes.',
95
103
  value: 'cancel',
96
104
  });
97
- const menuOutput = await CLIUtilityInitialize.promptWithCancel({
105
+ const menuOutput = await CliUtilityInitialize.promptWithCancel({
98
106
  type: 'select',
99
107
  name: 'action',
100
108
  message: 'Select a Nova configuration category to edit.',
101
109
  choices,
102
110
  });
103
- if (menuOutput.cancelled) {
111
+ if (menuOutput['cancelled'] === true) {
104
112
  return 'cancel';
105
113
  }
106
- const menuOutputResult = menuOutput.result;
114
+ const menuOutputResult = menuOutput['result'];
107
115
  if (menuOutputResult.action === undefined
108
116
  || menuOutputResult.action === 'cancel') {
109
117
  return 'cancel';
@@ -112,65 +120,70 @@ export class CLIUtilityInitialize {
112
120
  return 'save';
113
121
  }
114
122
  const categoryKey = menuOutputResult.action;
115
- const categoryHandler = category[categoryKey].handler;
123
+ const categoryHandler = category[categoryKey]['handler'];
116
124
  await categoryHandler(config);
117
125
  }
118
126
  }
119
127
  static async promptProject(config) {
120
- const existingProject = config.project;
121
- const existingProjectName = (existingProject !== undefined) ? existingProject.name : undefined;
122
- const existingProjectDescription = (existingProject !== undefined) ? existingProject.description : undefined;
123
- const existingProjectKeywords = (existingProject !== undefined) ? existingProject.keywords : undefined;
128
+ const existingProject = config['project'];
129
+ const existingProjectName = (existingProject !== undefined) ? existingProject['name'] : undefined;
130
+ const existingProjectDescription = (existingProject !== undefined) ? existingProject['description'] : undefined;
131
+ const existingProjectKeywords = (existingProject !== undefined) ? existingProject['keywords'] : undefined;
132
+ const existingProjectLegalName = (existingProject !== undefined) ? existingProject['legalName'] : undefined;
133
+ const existingProjectPronouns = (existingProject !== undefined) ? existingProject['pronouns'] : undefined;
134
+ const existingProjectPlatforms = (existingProject !== undefined) ? existingProject['platforms'] : undefined;
135
+ const existingProjectStartingYear = (existingProject !== undefined) ? existingProject['startingYear'] : undefined;
136
+ const existingProjectLicense = (existingProject !== undefined) ? existingProject['license'] : undefined;
124
137
  const project = (existingProject !== undefined) ? { ...existingProject } : {};
125
138
  const projectName = (existingProjectName !== undefined) ? { ...existingProjectName } : {};
126
139
  const projectDescription = (existingProjectDescription !== undefined) ? { ...existingProjectDescription } : {};
127
140
  const projectKeywords = (existingProjectKeywords !== undefined) ? [...existingProjectKeywords] : [];
128
- const questionsOutput = await CLIUtilityInitialize.promptWithCancel([
141
+ const questionsOutput = await CliUtilityInitialize.promptWithCancel([
129
142
  {
130
143
  type: 'text',
131
144
  name: 'projectNameTitle',
132
145
  message: 'Project title (display name)',
133
- initial: projectName.title ?? '',
134
- validate: (value) => CLIUtilityInitialize.normalizeText(value, Infinity).result,
146
+ initial: projectName['title'] ?? '',
147
+ validate: (value) => CliUtilityInitialize.normalizeText(value, Infinity)['result'],
135
148
  },
136
149
  {
137
150
  type: 'text',
138
151
  name: 'projectNameSlug',
139
152
  message: 'Project slug (package name)',
140
- initial: projectName.slug ?? '',
141
- validate: (value) => CLIUtilityInitialize.normalizeProjectSlug(value).result,
153
+ initial: projectName['slug'] ?? '',
154
+ validate: (value) => CliUtilityInitialize.normalizeProjectSlug(value)['result'],
142
155
  },
143
156
  {
144
157
  type: 'text',
145
158
  name: 'projectDescriptionShort',
146
159
  message: 'Short description',
147
- initial: projectDescription.short ?? '',
148
- validate: (value) => CLIUtilityInitialize.normalizeText(value, Infinity).result,
160
+ initial: projectDescription['short'] ?? '',
161
+ validate: (value) => CliUtilityInitialize.normalizeText(value, Infinity)['result'],
149
162
  },
150
163
  {
151
164
  type: 'text',
152
165
  name: 'projectDescriptionLong',
153
166
  message: 'Long description',
154
- initial: projectDescription.long ?? '',
155
- validate: (value) => CLIUtilityInitialize.normalizeText(value, Infinity).result,
167
+ initial: projectDescription['long'] ?? '',
168
+ validate: (value) => CliUtilityInitialize.normalizeText(value, Infinity)['result'],
156
169
  },
157
170
  {
158
171
  type: 'text',
159
172
  name: 'projectKeywords',
160
173
  message: 'Keywords (comma separated)',
161
174
  initial: (projectKeywords.length > 0) ? projectKeywords.join(', ') : '',
162
- validate: (value) => CLIUtilityInitialize.normalizeTextArray(value, 50).result,
175
+ validate: (value) => CliUtilityInitialize.normalizeTextArray(value, 50)['result'],
163
176
  },
164
177
  ]);
165
- if (questionsOutput.cancelled) {
178
+ if (questionsOutput['cancelled'] === true) {
166
179
  return 'back';
167
180
  }
168
- const questionsOutputResult = questionsOutput.result;
169
- const projectNameTitleInput = CLIUtilityInitialize.normalizeText(questionsOutputResult.projectNameTitle, Infinity).sanitized;
170
- const projectNameSlugInput = CLIUtilityInitialize.normalizeProjectSlug(questionsOutputResult.projectNameSlug).sanitized;
171
- const projectDescriptionShortInput = CLIUtilityInitialize.normalizeText(questionsOutputResult.projectDescriptionShort, Infinity).sanitized;
172
- const projectDescriptionLongInput = CLIUtilityInitialize.normalizeText(questionsOutputResult.projectDescriptionLong, Infinity).sanitized;
173
- const projectKeywordsInput = CLIUtilityInitialize.normalizeTextArray(questionsOutputResult.projectKeywords, 50).sanitized;
181
+ const questionsOutputResult = questionsOutput['result'];
182
+ const projectNameTitleInput = CliUtilityInitialize.normalizeText(questionsOutputResult.projectNameTitle, Infinity)['sanitized'];
183
+ const projectNameSlugInput = CliUtilityInitialize.normalizeProjectSlug(questionsOutputResult.projectNameSlug)['sanitized'];
184
+ const projectDescriptionShortInput = CliUtilityInitialize.normalizeText(questionsOutputResult.projectDescriptionShort, Infinity)['sanitized'];
185
+ const projectDescriptionLongInput = CliUtilityInitialize.normalizeText(questionsOutputResult.projectDescriptionLong, Infinity)['sanitized'];
186
+ const projectKeywordsInput = CliUtilityInitialize.normalizeTextArray(questionsOutputResult.projectKeywords, 50)['sanitized'];
174
187
  if (projectNameTitleInput !== undefined) {
175
188
  projectName.title = projectNameTitleInput;
176
189
  }
@@ -213,28 +226,253 @@ export class CLIUtilityInitialize {
213
226
  else {
214
227
  Reflect.deleteProperty(project, 'keywords');
215
228
  }
229
+ const legalNameOutput = await CliUtilityInitialize.promptWithCancel({
230
+ type: 'text',
231
+ name: 'projectLegalName',
232
+ message: 'Legal name (for licenses and copyright notices)',
233
+ initial: (typeof existingProjectLegalName === 'string') ? existingProjectLegalName : '',
234
+ });
235
+ if (legalNameOutput['cancelled'] === true) {
236
+ return 'back';
237
+ }
238
+ const projectLegalNameInput = CliUtilityInitialize.normalizeText(legalNameOutput['result'].projectLegalName, Infinity)['sanitized'];
239
+ if (projectLegalNameInput !== undefined) {
240
+ project.legalName = projectLegalNameInput;
241
+ }
242
+ else {
243
+ Reflect.deleteProperty(project, 'legalName');
244
+ }
245
+ const pronounsOutput = await CliUtilityInitialize.promptWithCancel({
246
+ type: 'select',
247
+ name: 'projectPronouns',
248
+ message: 'Pronouns',
249
+ choices: [
250
+ {
251
+ title: 'Business (we/us/our)',
252
+ value: 'business',
253
+ },
254
+ {
255
+ title: 'Personal (I/me/my)',
256
+ value: 'personal',
257
+ },
258
+ ],
259
+ initial: (existingProjectPronouns === 'personal') ? 1 : 0,
260
+ });
261
+ if (pronounsOutput['cancelled'] === true) {
262
+ return 'back';
263
+ }
264
+ const projectPronounsInput = pronounsOutput['result'].projectPronouns;
265
+ if (projectPronounsInput !== undefined) {
266
+ project.pronouns = projectPronounsInput;
267
+ }
268
+ else {
269
+ Reflect.deleteProperty(project, 'pronouns');
270
+ }
271
+ const platformChoices = [
272
+ {
273
+ title: 'Node.js',
274
+ value: 'nodejs',
275
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('nodejs') === true,
276
+ },
277
+ {
278
+ title: 'Swift',
279
+ value: 'swift',
280
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('swift') === true,
281
+ },
282
+ {
283
+ title: 'Android',
284
+ value: 'android',
285
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('android') === true,
286
+ },
287
+ {
288
+ title: 'Java',
289
+ value: 'java',
290
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('java') === true,
291
+ },
292
+ {
293
+ title: 'Kotlin',
294
+ value: 'kotlin',
295
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('kotlin') === true,
296
+ },
297
+ {
298
+ title: 'C#',
299
+ value: 'csharp',
300
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('csharp') === true,
301
+ },
302
+ {
303
+ title: 'PHP',
304
+ value: 'php',
305
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('php') === true,
306
+ },
307
+ {
308
+ title: 'Python',
309
+ value: 'python',
310
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('python') === true,
311
+ },
312
+ {
313
+ title: 'macOS',
314
+ value: 'macos',
315
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('macos') === true,
316
+ },
317
+ {
318
+ title: 'Linux',
319
+ value: 'linux',
320
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('linux') === true,
321
+ },
322
+ {
323
+ title: 'Windows',
324
+ value: 'windows',
325
+ selected: existingProjectPlatforms !== undefined && existingProjectPlatforms.includes('windows') === true,
326
+ },
327
+ ];
328
+ const platformsOutput = await CliUtilityInitialize.promptWithCancel({
329
+ type: 'multiselect',
330
+ name: 'projectPlatforms',
331
+ message: 'Supported platforms',
332
+ choices: platformChoices,
333
+ });
334
+ if (platformsOutput['cancelled'] === true) {
335
+ return 'back';
336
+ }
337
+ const projectPlatformsInput = platformsOutput['result'].projectPlatforms;
338
+ if (Array.isArray(projectPlatformsInput) === true && projectPlatformsInput.length > 0) {
339
+ project.platforms = projectPlatformsInput;
340
+ }
341
+ else {
342
+ Reflect.deleteProperty(project, 'platforms');
343
+ }
344
+ const startingYearOutput = await CliUtilityInitialize.promptWithCancel({
345
+ type: 'text',
346
+ name: 'projectStartingYear',
347
+ message: 'Starting year (e.g. 2025)',
348
+ initial: (existingProjectStartingYear !== undefined) ? String(existingProjectStartingYear) : '',
349
+ validate: (value) => {
350
+ const trimmed = String(value ?? '').trim();
351
+ if (trimmed === '') {
352
+ return true;
353
+ }
354
+ const parsed = Number(trimmed);
355
+ if (Number.isNaN(parsed) === true
356
+ || Number.isInteger(parsed) === false
357
+ || parsed < 1970) {
358
+ return 'Must be an integer >= 1970';
359
+ }
360
+ return true;
361
+ },
362
+ });
363
+ if (startingYearOutput['cancelled'] === true) {
364
+ return 'back';
365
+ }
366
+ const startingYearRaw = String(startingYearOutput['result'].projectStartingYear ?? '').trim();
367
+ const startingYearParsed = (startingYearRaw !== '') ? Number(startingYearRaw) : undefined;
368
+ if (startingYearParsed !== undefined
369
+ && Number.isInteger(startingYearParsed) === true
370
+ && startingYearParsed >= 1970) {
371
+ project.startingYear = startingYearParsed;
372
+ }
373
+ else {
374
+ Reflect.deleteProperty(project, 'startingYear');
375
+ }
376
+ const licenseChoices = [
377
+ {
378
+ title: 'MIT License',
379
+ value: 'MIT',
380
+ },
381
+ {
382
+ title: 'Apache License 2.0',
383
+ value: 'Apache-2.0',
384
+ },
385
+ {
386
+ title: 'GNU General Public License v3.0',
387
+ value: 'GPL-3.0',
388
+ },
389
+ {
390
+ title: 'GNU General Public License v2.0',
391
+ value: 'GPL-2.0',
392
+ },
393
+ {
394
+ title: 'GNU Affero General Public License v3.0',
395
+ value: 'AGPL-3.0',
396
+ },
397
+ {
398
+ title: 'GNU Lesser General Public License v2.1',
399
+ value: 'LGPL-2.1',
400
+ },
401
+ {
402
+ title: 'BSD 2-Clause "Simplified" License',
403
+ value: 'BSD-2-Clause',
404
+ },
405
+ {
406
+ title: 'BSD 3-Clause "New" or "Revised" License',
407
+ value: 'BSD-3-Clause',
408
+ },
409
+ {
410
+ title: 'Boost Software License 1.0',
411
+ value: 'BSL-1.0',
412
+ },
413
+ {
414
+ title: 'Creative Commons Zero v1.0 Universal',
415
+ value: 'CC0-1.0',
416
+ },
417
+ {
418
+ title: 'Eclipse Public License 2.0',
419
+ value: 'EPL-2.0',
420
+ },
421
+ {
422
+ title: 'Mozilla Public License 2.0',
423
+ value: 'MPL-2.0',
424
+ },
425
+ {
426
+ title: 'Proprietary (All Rights Reserved)',
427
+ value: 'Proprietary',
428
+ },
429
+ {
430
+ title: 'The Unlicense',
431
+ value: 'Unlicense',
432
+ },
433
+ ];
434
+ const licenseInitialIndex = licenseChoices.findIndex((choice) => choice['value'] === existingProjectLicense);
435
+ const licenseOutput = await CliUtilityInitialize.promptWithCancel({
436
+ type: 'select',
437
+ name: 'projectLicense',
438
+ message: 'License',
439
+ choices: licenseChoices,
440
+ initial: (licenseInitialIndex !== -1) ? licenseInitialIndex : 0,
441
+ });
442
+ if (licenseOutput['cancelled'] === true) {
443
+ return 'back';
444
+ }
445
+ const projectLicenseInput = licenseOutput['result'].projectLicense;
446
+ if (projectLicenseInput !== undefined) {
447
+ project.license = projectLicenseInput;
448
+ }
449
+ else {
450
+ Reflect.deleteProperty(project, 'license');
451
+ }
216
452
  if (Object.keys(project).length > 0) {
217
453
  Object.assign(config, { project });
218
454
  }
219
455
  else {
220
456
  Reflect.deleteProperty(config, 'project');
221
457
  }
222
- const previousSlug = (existingProjectName !== undefined) ? existingProjectName.slug ?? '' : '';
223
- const currentSlug = (config.project !== undefined && config.project.name !== undefined) ? config.project.name.slug ?? '' : '';
458
+ const previousSlug = (existingProjectName !== undefined) ? existingProjectName['slug'] ?? '' : '';
459
+ const currentSlug = (config['project'] !== undefined && config['project']['name'] !== undefined) ? config['project']['name']['slug'] ?? '' : '';
224
460
  const slugChanged = previousSlug !== currentSlug;
225
- if (slugChanged && config.workspaces !== undefined) {
226
- const rolesToSync = ['project', 'docs', 'config', 'app', 'tool'];
461
+ if (slugChanged === true && config['workspaces'] !== undefined) {
462
+ const rolesToSync = [...libItemSyncRoles];
227
463
  const slugPrefix = new RegExp(`^${previousSlug}-`);
464
+ const previousLabel = (previousSlug !== '') ? previousSlug : '(unset)';
465
+ const currentLabel = (currentSlug !== '') ? currentSlug : '(unset)';
228
466
  Logger.customize({
229
- name: 'CLIUtilityInitialize.promptProject',
467
+ name: 'CliUtilityInitialize.promptProject',
230
468
  purpose: 'updated',
231
469
  padTop: 1,
232
- }).info(`Project slug updated from "${previousSlug || '(unset)'}" to "${currentSlug || '(unset)'}".`);
233
- for (const workspace of Object.values(config.workspaces)) {
234
- if (!rolesToSync.includes(workspace.role)) {
470
+ }).info(`Project slug updated from "${previousLabel}" to "${currentLabel}".`);
471
+ for (const workspace of Object.values(config['workspaces'])) {
472
+ if (rolesToSync.includes(workspace['role']) === false) {
235
473
  continue;
236
474
  }
237
- const { name } = workspace;
475
+ const name = workspace['name'];
238
476
  if (previousSlug === '' && currentSlug !== '') {
239
477
  workspace.name = `${currentSlug}-${name}`;
240
478
  }
@@ -245,26 +483,26 @@ export class CLIUtilityInitialize {
245
483
  workspace.name = name.replace(slugPrefix, `${currentSlug}-`);
246
484
  }
247
485
  Logger.customize({
248
- name: 'CLIUtilityInitialize.promptProject',
486
+ name: 'CliUtilityInitialize.promptProject',
249
487
  purpose: 'updated',
250
- }).info(`Workspace name updated from "${name}" to "${workspace.name}".`);
488
+ }).info(`Workspace name updated from "${name}" to "${workspace['name']}".`);
251
489
  }
252
490
  }
253
491
  Logger.customize({
254
- name: 'CLIUtilityInitialize.promptProject',
492
+ name: 'CliUtilityInitialize.promptProject',
255
493
  purpose: 'updated',
256
- padTop: (slugChanged && config.workspaces !== undefined) ? 0 : 1,
494
+ padTop: (slugChanged === true && config['workspaces'] !== undefined) ? 0 : 1,
257
495
  padBottom: 1,
258
496
  }).info('Project details updated.');
259
497
  return 'back';
260
498
  }
261
499
  static async promptEntities(config) {
262
500
  const entities = [];
263
- if (Array.isArray(config.entities)) {
264
- for (const configEntity of config.entities) {
501
+ if (Array.isArray(config['entities']) === true) {
502
+ for (const configEntity of config['entities']) {
265
503
  const clonedEntity = { ...configEntity };
266
- if (Array.isArray(configEntity.roles)) {
267
- clonedEntity.roles = [...configEntity.roles];
504
+ if (Array.isArray(configEntity['roles']) === true) {
505
+ clonedEntity.roles = [...configEntity['roles']];
268
506
  }
269
507
  else {
270
508
  Reflect.deleteProperty(clonedEntity, 'roles');
@@ -276,8 +514,8 @@ export class CLIUtilityInitialize {
276
514
  if (entities.length > 0) {
277
515
  const normalizedEntities = entities.map((entity) => {
278
516
  const normalizedEntity = { ...entity };
279
- if (Array.isArray(entity.roles) && entity.roles.length > 0) {
280
- normalizedEntity.roles = [...entity.roles];
517
+ if (Array.isArray(entity['roles']) === true && entity['roles'].length > 0) {
518
+ normalizedEntity.roles = [...entity['roles']];
281
519
  }
282
520
  else {
283
521
  Reflect.deleteProperty(normalizedEntity, 'roles');
@@ -289,14 +527,30 @@ export class CLIUtilityInitialize {
289
527
  else {
290
528
  Reflect.deleteProperty(config, 'entities');
291
529
  }
530
+ return;
292
531
  };
293
532
  while (true) {
533
+ entities.sort((a, b) => {
534
+ const nameA = (a !== undefined && a['name'] !== undefined) ? a['name'] : '';
535
+ const nameB = (b !== undefined && b['name'] !== undefined) ? b['name'] : '';
536
+ return nameA.localeCompare(nameB);
537
+ });
294
538
  const choices = [];
295
- entities.forEach((entity, index) => {
296
- const entityName = (entity.name !== undefined) ? entity.name.trim() : '';
297
- const entityEmail = (entity.email !== undefined) ? entity.email.trim() : '';
298
- const entityRoles = (Array.isArray(entity.roles)) ? entity.roles.filter((role) => role.trim() !== '') : [];
299
- const label = entityName || entityEmail || `Entity ${index + 1}`;
539
+ for (let i = 0; i < entities.length; i += 1) {
540
+ const entity = entities[i];
541
+ if (entity === undefined) {
542
+ continue;
543
+ }
544
+ const entityName = (entity['name'] !== undefined) ? entity['name'].trim() : '';
545
+ const entityEmail = (entity['email'] !== undefined) ? entity['email'].trim() : '';
546
+ const entityRoles = (Array.isArray(entity['roles']) === true) ? entity['roles'].filter((role) => role.trim() !== '') : [];
547
+ let label = `Entity ${i + 1}`;
548
+ if (entityName !== '') {
549
+ label = entityName;
550
+ }
551
+ else if (entityEmail !== '') {
552
+ label = entityEmail;
553
+ }
300
554
  const descriptionParts = [];
301
555
  if (entityEmail !== '') {
302
556
  descriptionParts.push(entityEmail);
@@ -306,13 +560,14 @@ export class CLIUtilityInitialize {
306
560
  .map((entityRole) => entityRole.trim())
307
561
  .filter((entityRole) => entityRole.length > 0)
308
562
  .reduce((unique, entityRole) => {
309
- if (!unique.includes(entityRole)) {
563
+ if (unique.includes(entityRole) === false) {
310
564
  unique.push(entityRole);
311
565
  }
312
566
  return unique;
313
567
  }, []);
314
568
  if (normalizedRoles.length > 0) {
315
- descriptionParts.push(normalizedRoles.join(', '));
569
+ const joinedRoles = normalizedRoles.join(', ');
570
+ descriptionParts.push(joinedRoles);
316
571
  }
317
572
  }
318
573
  const description = descriptionParts.join(' · ');
@@ -321,7 +576,7 @@ export class CLIUtilityInitialize {
321
576
  description: (description !== '') ? description : 'Update this entity.',
322
577
  value: {
323
578
  kind: 'edit',
324
- index,
579
+ index: i,
325
580
  },
326
581
  });
327
582
  choices.push({
@@ -329,10 +584,10 @@ export class CLIUtilityInitialize {
329
584
  description: 'Delete this entity.',
330
585
  value: {
331
586
  kind: 'remove',
332
- index,
587
+ index: i,
333
588
  },
334
589
  });
335
- });
590
+ }
336
591
  choices.push({
337
592
  title: 'Add new entity',
338
593
  description: 'Create a new entity.',
@@ -347,58 +602,58 @@ export class CLIUtilityInitialize {
347
602
  kind: 'back',
348
603
  },
349
604
  });
350
- const menuOutput = await CLIUtilityInitialize.promptWithCancel({
605
+ const menuOutput = await CliUtilityInitialize.promptWithCancel({
351
606
  type: 'select',
352
607
  name: 'action',
353
608
  message: (entities.length > 0) ? 'Select an entity to manage.' : 'No entities found. Choose an option.',
354
609
  choices,
355
610
  });
356
- if (menuOutput.cancelled) {
611
+ if (menuOutput['cancelled'] === true) {
357
612
  return 'back';
358
613
  }
359
- const menuOutputResult = menuOutput.result;
614
+ const menuOutputResult = menuOutput['result'];
360
615
  if (menuOutputResult.action === undefined
361
- || menuOutputResult.action.kind === 'back') {
616
+ || menuOutputResult.action['kind'] === 'back') {
362
617
  sync();
363
618
  return 'back';
364
619
  }
365
- if (menuOutputResult.action.kind === 'add') {
366
- const result = await CLIUtilityInitialize.promptEntitiesForm(undefined, 'create');
367
- if (result.action === 'back') {
620
+ if (menuOutputResult.action['kind'] === 'add') {
621
+ const result = await CliUtilityInitialize.promptEntitiesForm(undefined, 'create');
622
+ if (result['action'] === 'back') {
368
623
  continue;
369
624
  }
370
- entities.push(result.entity);
625
+ entities.push(result['entity']);
371
626
  sync();
372
627
  Logger.customize({
373
- name: 'CLIUtilityInitialize.promptEntities',
628
+ name: 'CliUtilityInitialize.promptEntities',
374
629
  purpose: 'add',
375
630
  padTop: 1,
376
631
  padBottom: 1,
377
632
  }).info('Added new entity.');
378
633
  continue;
379
634
  }
380
- if (menuOutputResult.action.kind === 'edit') {
381
- const entityIndex = menuOutputResult.action.index;
635
+ if (menuOutputResult.action['kind'] === 'edit') {
636
+ const entityIndex = menuOutputResult.action['index'];
382
637
  if (entityIndex < 0 || entityIndex >= entities.length) {
383
638
  continue;
384
639
  }
385
640
  const entityToEdit = entities[entityIndex];
386
- const entityResult = await CLIUtilityInitialize.promptEntitiesForm(entityToEdit, 'update');
387
- if (entityResult.action === 'back') {
641
+ const entityResult = await CliUtilityInitialize.promptEntitiesForm(entityToEdit, 'update');
642
+ if (entityResult['action'] === 'back') {
388
643
  continue;
389
644
  }
390
- entities[entityIndex] = entityResult.entity;
645
+ Reflect.set(entities, entityIndex, entityResult['entity']);
391
646
  sync();
392
647
  Logger.customize({
393
- name: 'CLIUtilityInitialize.promptEntities',
648
+ name: 'CliUtilityInitialize.promptEntities',
394
649
  purpose: 'edit',
395
650
  padTop: 1,
396
651
  padBottom: 1,
397
652
  }).info('Updated entity.');
398
653
  continue;
399
654
  }
400
- if (menuOutputResult.action.kind === 'remove') {
401
- const entityIndex = menuOutputResult.action.index;
655
+ if (menuOutputResult.action['kind'] === 'remove') {
656
+ const entityIndex = menuOutputResult.action['index'];
402
657
  if (entityIndex < 0 || entityIndex >= entities.length) {
403
658
  continue;
404
659
  }
@@ -406,17 +661,23 @@ export class CLIUtilityInitialize {
406
661
  if (entityToRemove === undefined) {
407
662
  continue;
408
663
  }
409
- const entityName = (typeof entityToRemove.name === 'string') ? entityToRemove.name.trim() : '';
410
- const entityEmail = (typeof entityToRemove.email === 'string') ? entityToRemove.email.trim() : '';
411
- const entityLabel = entityName || entityEmail || `Entity ${entityIndex + 1}`;
412
- const shouldRemove = await CLIUtilityInitialize.promptEntitiesDeleteForm(entityLabel);
664
+ const entityName = (typeof entityToRemove['name'] === 'string') ? entityToRemove['name'].trim() : '';
665
+ const entityEmail = (typeof entityToRemove['email'] === 'string') ? entityToRemove['email'].trim() : '';
666
+ let entityLabel = `Entity ${entityIndex + 1}`;
667
+ if (entityName !== '') {
668
+ entityLabel = entityName;
669
+ }
670
+ else if (entityEmail !== '') {
671
+ entityLabel = entityEmail;
672
+ }
673
+ const shouldRemove = await CliUtilityInitialize.promptEntitiesDeleteForm(entityLabel);
413
674
  if (shouldRemove !== true) {
414
675
  continue;
415
676
  }
416
677
  entities.splice(entityIndex, 1);
417
678
  sync();
418
679
  Logger.customize({
419
- name: 'CLIUtilityInitialize.promptEntities',
680
+ name: 'CliUtilityInitialize.promptEntities',
420
681
  purpose: 'remove',
421
682
  padTop: 1,
422
683
  padBottom: 1,
@@ -425,35 +686,35 @@ export class CLIUtilityInitialize {
425
686
  }
426
687
  }
427
688
  static async promptEntitiesForm(entity, mode) {
428
- const validRoles = ['author', 'contributor', 'supporter'];
429
- const existingName = (entity !== undefined && typeof entity.name === 'string') ? entity.name : '';
430
- const existingEmail = (entity !== undefined && typeof entity.email === 'string') ? entity.email : '';
431
- const existingUrl = (entity !== undefined && typeof entity.url === 'string') ? entity.url : '';
689
+ const validRoles = [...libItemValidEntityRoles];
690
+ const existingName = (entity !== undefined && typeof entity['name'] === 'string') ? entity['name'] : '';
691
+ const existingEmail = (entity !== undefined && typeof entity['email'] === 'string') ? entity['email'] : '';
692
+ const existingUrl = (entity !== undefined && typeof entity['url'] === 'string') ? entity['url'] : '';
432
693
  let existingRoles = [];
433
- if (entity !== undefined && Array.isArray(entity.roles)) {
434
- existingRoles = entity.roles.filter((role) => validRoles.includes(role));
694
+ if (entity !== undefined && Array.isArray(entity['roles']) === true) {
695
+ existingRoles = entity['roles'].filter((role) => validRoles.includes(role));
435
696
  }
436
- const questionsOutput = await CLIUtilityInitialize.promptWithCancel([
697
+ const questionsOutput = await CliUtilityInitialize.promptWithCancel([
437
698
  {
438
699
  type: 'text',
439
700
  name: 'entityName',
440
701
  message: 'Entity name',
441
702
  initial: existingName,
442
- validate: (value) => CLIUtilityInitialize.normalizeText(value, Infinity).result,
703
+ validate: (value) => CliUtilityInitialize.normalizeText(value, Infinity)['result'],
443
704
  },
444
705
  {
445
706
  type: 'text',
446
707
  name: 'entityEmail',
447
708
  message: 'Entity email address',
448
709
  initial: existingEmail,
449
- validate: (value) => CLIUtilityInitialize.normalizeEmail(value).result,
710
+ validate: (value) => CliUtilityInitialize.normalizeEmail(value)['result'],
450
711
  },
451
712
  {
452
713
  type: 'text',
453
714
  name: 'entityUrl',
454
715
  message: 'Entity website',
455
716
  initial: existingUrl,
456
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
717
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
457
718
  },
458
719
  {
459
720
  type: 'multiselect',
@@ -466,16 +727,16 @@ export class CLIUtilityInitialize {
466
727
  })),
467
728
  },
468
729
  ]);
469
- if (questionsOutput.cancelled) {
730
+ if (questionsOutput['cancelled'] === true) {
470
731
  return {
471
732
  action: 'back',
472
733
  };
473
734
  }
474
- const questionsOutputResult = questionsOutput.result;
475
- const entityNameInput = CLIUtilityInitialize.normalizeText(questionsOutputResult.entityName, Infinity).sanitized;
476
- const entityEmailInput = CLIUtilityInitialize.normalizeEmail(questionsOutputResult.entityEmail).sanitized;
477
- const entityUrlInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.entityUrl, 'generic').sanitized;
478
- const entityRolesInput = Array.isArray(questionsOutputResult.entityRoles) ? [...questionsOutputResult.entityRoles] : [];
735
+ const questionsOutputResult = questionsOutput['result'];
736
+ const entityNameInput = CliUtilityInitialize.normalizeText(questionsOutputResult.entityName, Infinity)['sanitized'];
737
+ const entityEmailInput = CliUtilityInitialize.normalizeEmail(questionsOutputResult.entityEmail)['sanitized'];
738
+ const entityUrlInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.entityUrl, 'generic')['sanitized'];
739
+ const entityRolesInput = (Array.isArray(questionsOutputResult.entityRoles) === true) ? [...questionsOutputResult.entityRoles] : [];
479
740
  const resolvedEntity = {};
480
741
  if (entityNameInput !== undefined) {
481
742
  resolvedEntity.name = entityNameInput;
@@ -500,35 +761,33 @@ export class CLIUtilityInitialize {
500
761
  };
501
762
  }
502
763
  static async promptEntitiesDeleteForm(label) {
503
- const confirmOutput = await CLIUtilityInitialize.promptWithCancel({
764
+ const confirmOutput = await CliUtilityInitialize.promptWithCancel({
504
765
  type: 'confirm',
505
766
  name: 'confirm',
506
767
  message: `Remove entity "${label}"?`,
507
768
  initial: false,
508
769
  });
509
- if (confirmOutput.cancelled) {
770
+ if (confirmOutput['cancelled'] === true) {
510
771
  return false;
511
772
  }
512
- const confirmOutputResult = confirmOutput.result;
773
+ const confirmOutputResult = confirmOutput['result'];
513
774
  return confirmOutputResult.confirm;
514
775
  }
515
776
  static async promptEmails(config) {
516
- const existingEmails = config.emails;
777
+ const existingEmails = config['emails'];
517
778
  const emails = (existingEmails !== undefined) ? { ...existingEmails } : {};
518
- const questionsOutput = await CLIUtilityInitialize.promptWithCancel([
519
- {
779
+ const questionsOutput = await CliUtilityInitialize.promptWithCancel([{
520
780
  type: 'text',
521
781
  name: 'emailsBugs',
522
782
  message: 'Issue tracker email',
523
- initial: emails.bugs ?? '',
524
- validate: (value) => CLIUtilityInitialize.normalizeEmail(value).result,
525
- },
526
- ]);
527
- if (questionsOutput.cancelled) {
783
+ initial: emails['bugs'] ?? '',
784
+ validate: (value) => CliUtilityInitialize.normalizeEmail(value)['result'],
785
+ }]);
786
+ if (questionsOutput['cancelled'] === true) {
528
787
  return 'back';
529
788
  }
530
- const questionsOutputResult = questionsOutput.result;
531
- const emailsBugsInput = CLIUtilityInitialize.normalizeEmail(questionsOutputResult.emailsBugs).sanitized;
789
+ const questionsOutputResult = questionsOutput['result'];
790
+ const emailsBugsInput = CliUtilityInitialize.normalizeEmail(questionsOutputResult.emailsBugs)['sanitized'];
532
791
  if (emailsBugsInput !== undefined) {
533
792
  emails.bugs = emailsBugsInput;
534
793
  }
@@ -542,7 +801,7 @@ export class CLIUtilityInitialize {
542
801
  Reflect.deleteProperty(config, 'emails');
543
802
  }
544
803
  Logger.customize({
545
- name: 'CLIUtilityInitialize.promptEmails',
804
+ name: 'CliUtilityInitialize.promptEmails',
546
805
  purpose: 'updated',
547
806
  padTop: 1,
548
807
  padBottom: 1,
@@ -550,86 +809,110 @@ export class CLIUtilityInitialize {
550
809
  return 'back';
551
810
  }
552
811
  static async promptUrls(config) {
553
- const existingUrls = config.urls;
812
+ const existingUrls = config['urls'];
554
813
  const urls = (existingUrls !== undefined) ? { ...existingUrls } : {};
555
- const questionsOutput = await CLIUtilityInitialize.promptWithCancel([
814
+ const questionsOutput = await CliUtilityInitialize.promptWithCancel([
556
815
  {
557
816
  type: 'text',
558
817
  name: 'urlsHomepage',
559
818
  message: 'Homepage URL',
560
- initial: urls.homepage ?? '',
561
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
819
+ initial: urls['homepage'] ?? '',
820
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
562
821
  },
563
822
  {
564
823
  type: 'text',
565
824
  name: 'urlsRepository',
566
825
  message: 'Repository URL',
567
- initial: urls.repository ?? '',
568
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'repository').result,
826
+ initial: urls['repository'] ?? '',
827
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'repository')['result'],
569
828
  },
570
829
  {
571
830
  type: 'text',
572
831
  name: 'urlsBugs',
573
832
  message: 'Issue tracker URL',
574
- initial: urls.bugs ?? '',
575
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
833
+ initial: urls['bugs'] ?? '',
834
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
576
835
  },
577
836
  {
578
837
  type: 'text',
579
838
  name: 'urlsLicense',
580
839
  message: 'License URL',
581
- initial: urls.license ?? '',
582
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
840
+ initial: urls['license'] ?? '',
841
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
583
842
  },
584
843
  {
585
844
  type: 'text',
586
845
  name: 'urlsLogo',
587
846
  message: 'Logo URL',
588
- initial: urls.logo ?? '',
589
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
847
+ initial: urls['logo'] ?? '',
848
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
590
849
  },
591
850
  {
592
851
  type: 'text',
593
852
  name: 'urlsDocumentation',
594
853
  message: 'Documentation URL',
595
- initial: urls.documentation ?? '',
596
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
854
+ initial: urls['documentation'] ?? '',
855
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
597
856
  },
598
857
  {
599
858
  type: 'text',
600
859
  name: 'urlsGithub',
601
860
  message: 'GitHub URL',
602
- initial: urls.github ?? '',
603
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
861
+ initial: urls['github'] ?? '',
862
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
604
863
  },
605
864
  {
606
865
  type: 'text',
607
866
  name: 'urlsNpm',
608
867
  message: 'npm package URL',
609
- initial: urls.npm ?? '',
610
- validate: (value) => CLIUtilityInitialize.normalizeUrl(value, 'generic').result,
868
+ initial: urls['npm'] ?? '',
869
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
870
+ },
871
+ {
872
+ type: 'text',
873
+ name: 'urlsDocker',
874
+ message: 'Docker Hub URL',
875
+ initial: urls['docker'] ?? '',
876
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
611
877
  },
612
878
  {
613
879
  type: 'text',
614
880
  name: 'urlsFundSources',
615
881
  message: 'Funding URLs (comma separated)',
616
- initial: (Array.isArray(urls.fundSources)) ? urls.fundSources.join(', ') : '',
617
- validate: (value) => CLIUtilityInitialize.normalizeUrlArray(value, 'generic').result,
882
+ initial: (Array.isArray(urls['fundSources']) === true) ? urls['fundSources'].join(', ') : '',
883
+ validate: (value) => CliUtilityInitialize.normalizeUrlArray(value, 'generic')['result'],
884
+ },
885
+ {
886
+ type: 'text',
887
+ name: 'urlsPrivacyPolicy',
888
+ message: 'Privacy policy URL',
889
+ initial: urls['privacyPolicy'] ?? '',
890
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
891
+ },
892
+ {
893
+ type: 'text',
894
+ name: 'urlsTermsOfUse',
895
+ message: 'Terms of use URL',
896
+ initial: urls['termsOfUse'] ?? '',
897
+ validate: (value) => CliUtilityInitialize.normalizeUrl(value, 'generic')['result'],
618
898
  },
619
899
  ]);
620
- if (questionsOutput.cancelled) {
900
+ if (questionsOutput['cancelled'] === true) {
621
901
  return 'back';
622
902
  }
623
- const questionsOutputResult = questionsOutput.result;
624
- const urlsHomepageInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsHomepage, 'generic').sanitized;
625
- const urlsRepositoryInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsRepository, 'repository').sanitized;
626
- const urlsBugsInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsBugs, 'generic').sanitized;
627
- const urlsLicenseInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsLicense, 'generic').sanitized;
628
- const urlsLogoInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsLogo, 'generic').sanitized;
629
- const urlsDocumentationInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsDocumentation, 'generic').sanitized;
630
- const urlsGithubInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsGithub, 'generic').sanitized;
631
- const urlsNpmInput = CLIUtilityInitialize.normalizeUrl(questionsOutputResult.urlsNpm, 'generic').sanitized;
632
- const urlsFundSourcesInput = CLIUtilityInitialize.normalizeUrlArray(questionsOutputResult.urlsFundSources, 'generic').sanitized;
903
+ const questionsOutputResult = questionsOutput['result'];
904
+ const urlsHomepageInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsHomepage, 'generic')['sanitized'];
905
+ const urlsRepositoryInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsRepository, 'repository')['sanitized'];
906
+ const urlsBugsInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsBugs, 'generic')['sanitized'];
907
+ const urlsLicenseInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsLicense, 'generic')['sanitized'];
908
+ const urlsLogoInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsLogo, 'generic')['sanitized'];
909
+ const urlsDocumentationInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsDocumentation, 'generic')['sanitized'];
910
+ const urlsGithubInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsGithub, 'generic')['sanitized'];
911
+ const urlsNpmInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsNpm, 'generic')['sanitized'];
912
+ const urlsDockerInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsDocker, 'generic')['sanitized'];
913
+ const urlsFundSourcesInput = CliUtilityInitialize.normalizeUrlArray(questionsOutputResult.urlsFundSources, 'generic')['sanitized'];
914
+ const urlsPrivacyPolicyInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsPrivacyPolicy, 'generic')['sanitized'];
915
+ const urlsTermsOfUseInput = CliUtilityInitialize.normalizeUrl(questionsOutputResult.urlsTermsOfUse, 'generic')['sanitized'];
633
916
  if (urlsHomepageInput !== undefined) {
634
917
  urls.homepage = urlsHomepageInput;
635
918
  }
@@ -678,12 +961,30 @@ export class CLIUtilityInitialize {
678
961
  else {
679
962
  Reflect.deleteProperty(urls, 'npm');
680
963
  }
964
+ if (urlsDockerInput !== undefined) {
965
+ urls.docker = urlsDockerInput;
966
+ }
967
+ else {
968
+ Reflect.deleteProperty(urls, 'docker');
969
+ }
681
970
  if (urlsFundSourcesInput !== undefined) {
682
971
  urls.fundSources = urlsFundSourcesInput;
683
972
  }
684
973
  else {
685
974
  Reflect.deleteProperty(urls, 'fundSources');
686
975
  }
976
+ if (urlsPrivacyPolicyInput !== undefined) {
977
+ urls.privacyPolicy = urlsPrivacyPolicyInput;
978
+ }
979
+ else {
980
+ Reflect.deleteProperty(urls, 'privacyPolicy');
981
+ }
982
+ if (urlsTermsOfUseInput !== undefined) {
983
+ urls.termsOfUse = urlsTermsOfUseInput;
984
+ }
985
+ else {
986
+ Reflect.deleteProperty(urls, 'termsOfUse');
987
+ }
687
988
  if (Object.keys(urls).length > 0) {
688
989
  Object.assign(config, { urls });
689
990
  }
@@ -691,39 +992,437 @@ export class CLIUtilityInitialize {
691
992
  Reflect.deleteProperty(config, 'urls');
692
993
  }
693
994
  Logger.customize({
694
- name: 'CLIUtilityInitialize.promptUrls',
995
+ name: 'CliUtilityInitialize.promptUrls',
695
996
  purpose: 'updated',
696
997
  padTop: 1,
697
998
  padBottom: 1,
698
999
  }).info('URL references updated.');
699
1000
  return 'back';
700
1001
  }
1002
+ static async promptWorkflows(config) {
1003
+ const workflows = [];
1004
+ if (Array.isArray(config['workflows']) === true) {
1005
+ for (const configWorkflow of config['workflows']) {
1006
+ const clonedWorkflow = { ...configWorkflow };
1007
+ if (Array.isArray(configWorkflow['triggers']) === true) {
1008
+ clonedWorkflow.triggers = [...configWorkflow['triggers']];
1009
+ }
1010
+ if (configWorkflow['settings'] !== undefined) {
1011
+ clonedWorkflow.settings = { ...configWorkflow['settings'] };
1012
+ }
1013
+ else {
1014
+ Reflect.deleteProperty(clonedWorkflow, 'settings');
1015
+ }
1016
+ workflows.push(clonedWorkflow);
1017
+ }
1018
+ }
1019
+ const sync = () => {
1020
+ if (workflows.length > 0) {
1021
+ const normalizedWorkflows = workflows.map((workflow) => {
1022
+ const normalizedWorkflow = { ...workflow };
1023
+ if (Array.isArray(workflow['triggers']) === true && workflow['triggers'].length > 0) {
1024
+ normalizedWorkflow.triggers = [...workflow['triggers']];
1025
+ }
1026
+ if (Array.isArray(workflow['depends-on']) === true && workflow['depends-on'].length > 0) {
1027
+ Reflect.set(normalizedWorkflow, 'depends-on', [...workflow['depends-on']]);
1028
+ }
1029
+ else {
1030
+ Reflect.deleteProperty(normalizedWorkflow, 'depends-on');
1031
+ }
1032
+ if (workflow['settings'] !== undefined && Object.keys(workflow['settings']).length > 0) {
1033
+ normalizedWorkflow.settings = { ...workflow['settings'] };
1034
+ }
1035
+ else {
1036
+ Reflect.deleteProperty(normalizedWorkflow, 'settings');
1037
+ }
1038
+ return normalizedWorkflow;
1039
+ });
1040
+ Object.assign(config, { workflows: normalizedWorkflows });
1041
+ }
1042
+ else {
1043
+ Reflect.deleteProperty(config, 'workflows');
1044
+ }
1045
+ return;
1046
+ };
1047
+ while (true) {
1048
+ workflows.sort((a, b) => {
1049
+ const templateA = (a !== undefined && typeof a['template'] === 'string') ? a['template'] : '';
1050
+ const templateB = (b !== undefined && typeof b['template'] === 'string') ? b['template'] : '';
1051
+ const templateCompare = templateA.localeCompare(templateB);
1052
+ if (templateCompare !== 0) {
1053
+ return templateCompare;
1054
+ }
1055
+ const suffixA = (a !== undefined && typeof a['suffix'] === 'string') ? a['suffix'] : '';
1056
+ const suffixB = (b !== undefined && typeof b['suffix'] === 'string') ? b['suffix'] : '';
1057
+ return suffixA.localeCompare(suffixB);
1058
+ });
1059
+ const choices = [];
1060
+ for (let i = 0; i < workflows.length; i += 1) {
1061
+ const workflow = workflows[i];
1062
+ if (workflow === undefined) {
1063
+ continue;
1064
+ }
1065
+ const template = (typeof workflow['template'] === 'string') ? workflow['template'].trim() : '';
1066
+ const suffix = (typeof workflow['suffix'] === 'string') ? workflow['suffix'].trim() : '';
1067
+ const triggers = (Array.isArray(workflow['triggers']) === true) ? workflow['triggers'] : [];
1068
+ let label = `Workflow ${i + 1}`;
1069
+ if (template !== '' && suffix !== '') {
1070
+ label = `${template}-${suffix}`;
1071
+ }
1072
+ else if (template !== '') {
1073
+ label = template;
1074
+ }
1075
+ const triggersLabel = (triggers.length > 0) ? ` [${triggers.join(', ')}]` : '';
1076
+ const outputFileName = (suffix !== '') ? `nova-${template}-${suffix}.yml` : `nova-${template}.yml`;
1077
+ const description = (template !== '') ? `${outputFileName}${triggersLabel}` : 'Update this workflow.';
1078
+ choices.push({
1079
+ title: `${chalk.yellow.bold('[EDIT]')} ${label}`,
1080
+ description,
1081
+ value: {
1082
+ kind: 'edit',
1083
+ index: i,
1084
+ },
1085
+ });
1086
+ choices.push({
1087
+ title: `${chalk.red.bold('[REMOVE]')} ${label}`,
1088
+ description: 'Delete this workflow.',
1089
+ value: {
1090
+ kind: 'remove',
1091
+ index: i,
1092
+ },
1093
+ });
1094
+ }
1095
+ choices.push({
1096
+ title: 'Add new workflow',
1097
+ description: 'Create a new workflow.',
1098
+ value: {
1099
+ kind: 'add',
1100
+ },
1101
+ });
1102
+ choices.push({
1103
+ title: 'Back',
1104
+ description: 'Return to the category selection.',
1105
+ value: {
1106
+ kind: 'back',
1107
+ },
1108
+ });
1109
+ const menuOutput = await CliUtilityInitialize.promptWithCancel({
1110
+ type: 'select',
1111
+ name: 'action',
1112
+ message: (workflows.length > 0) ? 'Select a workflow to manage.' : 'No workflows found. Choose an option.',
1113
+ choices,
1114
+ });
1115
+ if (menuOutput['cancelled'] === true) {
1116
+ return 'back';
1117
+ }
1118
+ const menuOutputResult = menuOutput['result'];
1119
+ if (menuOutputResult.action === undefined
1120
+ || menuOutputResult.action['kind'] === 'back') {
1121
+ sync();
1122
+ return 'back';
1123
+ }
1124
+ if (menuOutputResult.action['kind'] === 'add') {
1125
+ const result = await CliUtilityInitialize.promptWorkflowsForm(undefined, 'create', workflows);
1126
+ if (result['action'] === 'back') {
1127
+ continue;
1128
+ }
1129
+ workflows.push(result['workflow']);
1130
+ sync();
1131
+ Logger.customize({
1132
+ name: 'CliUtilityInitialize.promptWorkflows',
1133
+ purpose: 'add',
1134
+ padTop: 1,
1135
+ padBottom: 1,
1136
+ }).info('Added new workflow.');
1137
+ continue;
1138
+ }
1139
+ if (menuOutputResult.action['kind'] === 'edit') {
1140
+ const workflowIndex = menuOutputResult.action['index'];
1141
+ if (workflowIndex < 0 || workflowIndex >= workflows.length) {
1142
+ continue;
1143
+ }
1144
+ const workflowToEdit = workflows[workflowIndex];
1145
+ const workflowResult = await CliUtilityInitialize.promptWorkflowsForm(workflowToEdit, 'update', workflows);
1146
+ if (workflowResult['action'] === 'back') {
1147
+ continue;
1148
+ }
1149
+ Reflect.set(workflows, workflowIndex, workflowResult['workflow']);
1150
+ sync();
1151
+ Logger.customize({
1152
+ name: 'CliUtilityInitialize.promptWorkflows',
1153
+ purpose: 'edit',
1154
+ padTop: 1,
1155
+ padBottom: 1,
1156
+ }).info('Updated workflow.');
1157
+ continue;
1158
+ }
1159
+ if (menuOutputResult.action['kind'] === 'remove') {
1160
+ const workflowIndex = menuOutputResult.action['index'];
1161
+ if (workflowIndex < 0 || workflowIndex >= workflows.length) {
1162
+ continue;
1163
+ }
1164
+ const workflowToRemove = workflows[workflowIndex];
1165
+ if (workflowToRemove === undefined) {
1166
+ continue;
1167
+ }
1168
+ const template = (typeof workflowToRemove['template'] === 'string') ? workflowToRemove['template'].trim() : '';
1169
+ const suffix = (typeof workflowToRemove['suffix'] === 'string') ? workflowToRemove['suffix'].trim() : '';
1170
+ let workflowLabel = `Workflow ${workflowIndex + 1}`;
1171
+ if (template !== '' && suffix !== '') {
1172
+ workflowLabel = `${template}-${suffix}`;
1173
+ }
1174
+ else if (template !== '') {
1175
+ workflowLabel = template;
1176
+ }
1177
+ const shouldRemove = await CliUtilityInitialize.promptWorkflowsDeleteForm(workflowLabel);
1178
+ if (shouldRemove !== true) {
1179
+ continue;
1180
+ }
1181
+ workflows.splice(workflowIndex, 1);
1182
+ sync();
1183
+ Logger.customize({
1184
+ name: 'CliUtilityInitialize.promptWorkflows',
1185
+ purpose: 'remove',
1186
+ padTop: 1,
1187
+ padBottom: 1,
1188
+ }).info('Removed workflow.');
1189
+ }
1190
+ }
1191
+ }
1192
+ static async promptWorkflowsForm(workflow, mode, workflows) {
1193
+ const existingTemplate = (workflow !== undefined && typeof workflow['template'] === 'string') ? workflow['template'] : '';
1194
+ const existingSuffix = (workflow !== undefined && typeof workflow['suffix'] === 'string') ? workflow['suffix'] : '';
1195
+ const existingTriggers = (workflow !== undefined && Array.isArray(workflow['triggers']) === true) ? workflow['triggers'] : [];
1196
+ const existingDependsOn = (workflow !== undefined && Array.isArray(workflow['depends-on']) === true) ? workflow['depends-on'] : [];
1197
+ const templateChoices = libWorkflowTemplatesMetadata.map((entry) => ({
1198
+ title: entry['name'],
1199
+ description: entry['description'],
1200
+ value: entry['name'],
1201
+ }));
1202
+ let templateInitialIndex = 0;
1203
+ if (existingTemplate !== '') {
1204
+ const foundIndex = templateChoices.findIndex((choice) => choice['value'] === existingTemplate);
1205
+ if (foundIndex >= 0) {
1206
+ templateInitialIndex = foundIndex;
1207
+ }
1208
+ }
1209
+ const templateOutput = await CliUtilityInitialize.promptWithCancel({
1210
+ type: 'select',
1211
+ name: 'template',
1212
+ message: 'Select a workflow template.',
1213
+ choices: templateChoices,
1214
+ initial: templateInitialIndex,
1215
+ });
1216
+ if (templateOutput['cancelled'] === true) {
1217
+ return {
1218
+ action: 'back',
1219
+ };
1220
+ }
1221
+ const templateOutputResult = templateOutput['result'];
1222
+ const selectedTemplate = templateOutputResult.template;
1223
+ const suffixOutput = await CliUtilityInitialize.promptWithCancel({
1224
+ type: 'text',
1225
+ name: 'suffix',
1226
+ message: 'Workflow suffix (used in filename and workflow name)',
1227
+ initial: existingSuffix,
1228
+ validate: (value) => {
1229
+ const trimmed = (typeof value === 'string') ? value.trim() : '';
1230
+ if (trimmed === '') {
1231
+ return 'Suffix is required.';
1232
+ }
1233
+ const compositeKey = `${selectedTemplate}-${trimmed}`;
1234
+ const editIndex = (workflow !== undefined) ? workflows.indexOf(workflow) : -1;
1235
+ const isDuplicate = workflows.some((w, i) => {
1236
+ if (i === editIndex) {
1237
+ return false;
1238
+ }
1239
+ const existingKey = `${w['template']}-${w['suffix'] ?? ''}`;
1240
+ return existingKey === compositeKey;
1241
+ });
1242
+ if (isDuplicate === true) {
1243
+ return 'A workflow with this template and suffix already exists.';
1244
+ }
1245
+ return true;
1246
+ },
1247
+ });
1248
+ if (suffixOutput['cancelled'] === true) {
1249
+ return {
1250
+ action: 'back',
1251
+ };
1252
+ }
1253
+ const suffixOutputResult = suffixOutput['result'];
1254
+ const selectedSuffix = (typeof suffixOutputResult.suffix === 'string') ? suffixOutputResult.suffix.trim() : '';
1255
+ const triggersDir = join(resolveTemplatePath(import.meta.url, 'generators/github/workflows'), selectedTemplate, 'triggers');
1256
+ const triggersDirExists = await pathExists(triggersDir);
1257
+ let selectedTriggers = [];
1258
+ if (triggersDirExists === true) {
1259
+ const triggersFiles = (await fs.readdir(triggersDir)).filter((file) => file.endsWith('.yml'));
1260
+ const triggerChoices = triggersFiles.map((file) => {
1261
+ const triggerName = file.replace(LIB_REGEX_PATTERN_YML_EXTENSION, '');
1262
+ return {
1263
+ title: triggerName,
1264
+ value: triggerName,
1265
+ selected: existingTriggers.includes(triggerName),
1266
+ };
1267
+ });
1268
+ const triggersOutput = await CliUtilityInitialize.promptWithCancel({
1269
+ type: 'multiselect',
1270
+ name: 'triggers',
1271
+ message: 'Select triggers for this workflow.',
1272
+ choices: triggerChoices,
1273
+ });
1274
+ if (triggersOutput['cancelled'] === true) {
1275
+ return {
1276
+ action: 'back',
1277
+ };
1278
+ }
1279
+ const triggersOutputResult = triggersOutput['result'];
1280
+ selectedTriggers = (Array.isArray(triggersOutputResult.triggers) === true) ? triggersOutputResult.triggers : [];
1281
+ }
1282
+ let selectedDependsOn = undefined;
1283
+ if (selectedTriggers.some((trigger) => trigger.startsWith('workflow-run')) === true) {
1284
+ const dependsOnChoices = workflows
1285
+ .filter((w) => w !== workflow
1286
+ && typeof w['template'] === 'string'
1287
+ && w['template'].trim() !== '')
1288
+ .map((w) => {
1289
+ const compositeKey = (typeof w['suffix'] === 'string' && w['suffix'].trim() !== '') ? `${w['template']}-${w['suffix']}` : w['template'];
1290
+ return {
1291
+ title: compositeKey,
1292
+ value: compositeKey,
1293
+ selected: existingDependsOn.includes(compositeKey),
1294
+ };
1295
+ });
1296
+ if (dependsOnChoices.length > 0) {
1297
+ const dependsOnOutput = await CliUtilityInitialize.promptWithCancel({
1298
+ type: 'multiselect',
1299
+ name: 'dependsOn',
1300
+ message: 'Select the workflows this depends on.',
1301
+ choices: dependsOnChoices,
1302
+ });
1303
+ if (dependsOnOutput['cancelled'] === true) {
1304
+ return {
1305
+ action: 'back',
1306
+ };
1307
+ }
1308
+ const dependsOnOutputResult = dependsOnOutput['result'];
1309
+ selectedDependsOn = (Array.isArray(dependsOnOutputResult.dependsOn) === true && dependsOnOutputResult.dependsOn.length > 0) ? dependsOnOutputResult.dependsOn : undefined;
1310
+ }
1311
+ }
1312
+ const matchedMetadata = libWorkflowTemplatesMetadata.find((entry) => entry['name'] === selectedTemplate);
1313
+ const settings = {};
1314
+ if (matchedMetadata !== undefined) {
1315
+ const variableEntries = Object.entries(matchedMetadata['variables']);
1316
+ for (const variableEntry of variableEntries) {
1317
+ const variableName = variableEntry[0];
1318
+ const variableConfig = variableEntry[1];
1319
+ if (variableConfig['auto'] === true) {
1320
+ continue;
1321
+ }
1322
+ let promptMessage = `Literal: ${variableName}`;
1323
+ let initialValue = '';
1324
+ if (variableConfig['format'] === 'secret') {
1325
+ promptMessage = `Secret: ${variableName}`;
1326
+ initialValue = (typeof variableConfig['default'] === 'string') ? variableConfig['default'] : '';
1327
+ }
1328
+ else if (variableConfig['format'] === 'var') {
1329
+ promptMessage = `Variable: ${variableName}`;
1330
+ initialValue = (typeof variableConfig['default'] === 'string') ? variableConfig['default'] : '';
1331
+ }
1332
+ const parts = [];
1333
+ if (typeof variableConfig['description'] === 'string') {
1334
+ parts.push(variableConfig['description']);
1335
+ }
1336
+ if (typeof variableConfig['example'] === 'string') {
1337
+ parts.push(`e.g. ${variableConfig['example']}`);
1338
+ }
1339
+ if (parts.length > 0) {
1340
+ promptMessage = `${promptMessage} (${parts.join(', ')})`;
1341
+ }
1342
+ if (workflow !== undefined
1343
+ && workflow['settings'] !== undefined
1344
+ && typeof workflow['settings'][variableName] === 'string') {
1345
+ initialValue = workflow['settings'][variableName];
1346
+ }
1347
+ const settingsOutput = await CliUtilityInitialize.promptWithCancel({
1348
+ type: 'text',
1349
+ name: 'settingValue',
1350
+ message: promptMessage,
1351
+ initial: initialValue,
1352
+ });
1353
+ if (settingsOutput['cancelled'] === true) {
1354
+ return {
1355
+ action: 'back',
1356
+ };
1357
+ }
1358
+ const settingsOutputResult = settingsOutput['result'];
1359
+ const settingValue = (typeof settingsOutputResult.settingValue === 'string') ? settingsOutputResult.settingValue.trim().replaceAll('\\n', '\n') : '';
1360
+ if (settingValue !== '') {
1361
+ Reflect.set(settings, variableName, settingValue);
1362
+ }
1363
+ }
1364
+ }
1365
+ const resolvedWorkflow = {
1366
+ template: selectedTemplate,
1367
+ suffix: selectedSuffix,
1368
+ triggers: selectedTriggers,
1369
+ };
1370
+ if (selectedDependsOn !== undefined) {
1371
+ Reflect.set(resolvedWorkflow, 'depends-on', selectedDependsOn);
1372
+ }
1373
+ if (Object.keys(settings).length > 0) {
1374
+ resolvedWorkflow.settings = settings;
1375
+ }
1376
+ if (mode === 'create' && selectedTemplate.trim() === '') {
1377
+ return {
1378
+ action: 'back',
1379
+ };
1380
+ }
1381
+ return {
1382
+ action: 'apply',
1383
+ workflow: resolvedWorkflow,
1384
+ };
1385
+ }
1386
+ static async promptWorkflowsDeleteForm(label) {
1387
+ const confirmOutput = await CliUtilityInitialize.promptWithCancel({
1388
+ type: 'confirm',
1389
+ name: 'confirm',
1390
+ message: `Remove workflow "${label}"?`,
1391
+ initial: false,
1392
+ });
1393
+ if (confirmOutput['cancelled'] === true) {
1394
+ return false;
1395
+ }
1396
+ const confirmOutputResult = confirmOutput['result'];
1397
+ return confirmOutputResult.confirm;
1398
+ }
701
1399
  static async promptWorkspaces(config) {
702
- const workspaces = (config.workspaces) ? { ...(config.workspaces) } : {};
1400
+ const workspaces = (config['workspaces'] !== undefined) ? { ...(config['workspaces']) } : {};
703
1401
  const rawWorkspacePaths = await discoverPathsWithFile('package.json', 'forward');
704
1402
  const workspacePaths = rawWorkspacePaths.map((rawWorkspacePath) => {
705
- const relativePath = relative(process.cwd(), rawWorkspacePath);
1403
+ const currentWorkingDirectory = process.cwd();
1404
+ const relativePath = relative(currentWorkingDirectory, rawWorkspacePath);
706
1405
  if (relativePath === '') {
707
1406
  return './';
708
1407
  }
709
1408
  return `./${relativePath.split(sep).join('/')}`;
710
1409
  });
711
1410
  Logger.customize({
712
- name: 'CLIUtilityInitialize.promptWorkspaces',
1411
+ name: 'CliUtilityInitialize.promptWorkspaces',
713
1412
  purpose: 'paths',
714
1413
  }).debug(workspacePaths);
715
1414
  while (true) {
716
1415
  const choices = workspacePaths.map((workspacePath) => {
717
1416
  const workspace = workspaces[workspacePath];
718
1417
  const summaryParts = [];
719
- if (workspace !== undefined && workspace.name !== undefined) {
720
- summaryParts.push(workspace.name);
1418
+ if (workspace !== undefined && workspace['name'] !== undefined) {
1419
+ summaryParts.push(workspace['name']);
721
1420
  }
722
- if (workspace !== undefined && workspace.role !== undefined) {
723
- summaryParts.push(workspace.role);
1421
+ if (workspace !== undefined && workspace['role'] !== undefined) {
1422
+ summaryParts.push(workspace['role']);
724
1423
  }
725
- if (workspace !== undefined && workspace.policy !== undefined) {
726
- summaryParts.push(workspace.policy);
1424
+ if (workspace !== undefined && workspace['policy'] !== undefined) {
1425
+ summaryParts.push(workspace['policy']);
727
1426
  }
728
1427
  return {
729
1428
  title: workspacePath,
@@ -736,37 +1435,37 @@ export class CLIUtilityInitialize {
736
1435
  description: 'Return to the category selection.',
737
1436
  value: 'back',
738
1437
  });
739
- const menuOutput = await CLIUtilityInitialize.promptWithCancel({
1438
+ const menuOutput = await CliUtilityInitialize.promptWithCancel({
740
1439
  type: 'select',
741
1440
  name: 'workspacePath',
742
1441
  message: 'Select a workspace to configure.',
743
1442
  choices,
744
1443
  });
745
- if (menuOutput.cancelled) {
1444
+ if (menuOutput['cancelled'] === true) {
746
1445
  return 'back';
747
1446
  }
748
- const menuOutputResult = menuOutput.result;
1447
+ const menuOutputResult = menuOutput['result'];
749
1448
  if (menuOutputResult.workspacePath === undefined
750
1449
  || menuOutputResult.workspacePath === 'back') {
751
1450
  return 'back';
752
1451
  }
753
1452
  const workspacePath = menuOutputResult.workspacePath;
754
- const formResult = await CLIUtilityInitialize.promptWorkspacesForm({
1453
+ const formResult = await CliUtilityInitialize.promptWorkspacesForm({
755
1454
  workspacePath,
756
1455
  existingWorkspace: workspaces[workspacePath],
757
- projectSlug: (config.project !== undefined && config.project.name !== undefined) ? config.project.name.slug : undefined,
1456
+ projectSlug: (config['project'] !== undefined && config['project']['name'] !== undefined) ? config['project']['name']['slug'] : undefined,
758
1457
  });
759
- if (formResult.action === 'back') {
1458
+ if (formResult['action'] === 'back') {
760
1459
  continue;
761
1460
  }
762
- Reflect.set(workspaces, workspacePath, formResult.workspace);
1461
+ Reflect.set(workspaces, workspacePath, formResult['workspace']);
763
1462
  Object.assign(config, { workspaces });
764
1463
  Logger.customize({
765
- name: 'CLIUtilityInitialize.promptWorkspaces',
1464
+ name: 'CliUtilityInitialize.promptWorkspaces',
766
1465
  purpose: 'updated',
767
1466
  padTop: 1,
768
1467
  padBottom: 1,
769
- }).info(`Updated workspace "${workspacePath}" → ${formResult.workspace.name} · ${formResult.workspace.role} · ${formResult.workspace.policy}`);
1468
+ }).info(`Updated workspace "${workspacePath}" → ${formResult['workspace']['name']} · ${formResult['workspace']['role']} · ${formResult['workspace']['policy']}`);
770
1469
  }
771
1470
  }
772
1471
  static async promptWorkspacesForm(options) {
@@ -823,132 +1522,326 @@ export class CLIUtilityInitialize {
823
1522
  };
824
1523
  const resolveName = async (role) => {
825
1524
  if (role === 'project' || role === 'docs') {
826
- if (options.projectSlug === undefined) {
1525
+ if (options['projectSlug'] === undefined) {
827
1526
  return (role === 'project') ? 'project' : 'docs';
828
1527
  }
829
- return `${options.projectSlug}-${role}`;
1528
+ return `${options['projectSlug']}-${role}`;
830
1529
  }
831
- const base = (options.projectSlug !== undefined) ? `${options.projectSlug}-${role}` : role;
832
- const namePrompt = await CLIUtilityInitialize.promptWithCancel({
1530
+ const base = (options['projectSlug'] !== undefined) ? `${options['projectSlug']}-${role}` : role;
1531
+ const namePrompt = await CliUtilityInitialize.promptWithCancel({
833
1532
  type: 'text',
834
1533
  name: 'workspaceName',
835
1534
  message: 'Workspace package name',
836
- initial: (options.existingWorkspace !== undefined) ? options.existingWorkspace.name ?? '' : '',
837
- validate: (value) => CLIUtilityInitialize.normalizeWorkspaceName(value, role, base).result,
1535
+ initial: (options['existingWorkspace'] !== undefined) ? options['existingWorkspace']['name'] ?? '' : '',
1536
+ validate: (value) => CliUtilityInitialize.normalizeWorkspaceName(value, role, base)['result'],
838
1537
  });
839
- if (namePrompt.cancelled) {
1538
+ if (namePrompt['cancelled'] === true) {
840
1539
  return undefined;
841
1540
  }
842
- return CLIUtilityInitialize.normalizeWorkspaceName(namePrompt.result.workspaceName, role, base).sanitized;
1541
+ return CliUtilityInitialize.normalizeWorkspaceName(namePrompt['result'].workspaceName, role, base)['sanitized'];
843
1542
  };
844
- const rolePrompt = await CLIUtilityInitialize.promptWithCancel({
1543
+ const existingRoleIndex = allowedRoles.findIndex((allowedRole) => options['existingWorkspace'] !== undefined && allowedRole['value'] === options['existingWorkspace']['role']);
1544
+ const rolePrompt = await CliUtilityInitialize.promptWithCancel({
845
1545
  type: 'select',
846
1546
  name: 'workspaceRole',
847
- message: `Select a role for "${options.workspacePath}"`,
848
- choices: allowedRoles.map((role) => ({
849
- title: role.title,
850
- description: role.description,
851
- value: role.value,
852
- })),
853
- initial: Math.max(0, allowedRoles.findIndex((role) => options.existingWorkspace !== undefined && role.value === options.existingWorkspace.role)),
1547
+ message: `Select a role for "${options['workspacePath']}"`,
1548
+ choices: allowedRoles.map((allowedRole) => {
1549
+ return {
1550
+ title: allowedRole['title'],
1551
+ description: allowedRole['description'],
1552
+ value: allowedRole['value'],
1553
+ };
1554
+ }),
1555
+ initial: Math.max(0, existingRoleIndex),
854
1556
  });
855
- if (rolePrompt.cancelled) {
1557
+ if (rolePrompt['cancelled'] === true) {
856
1558
  return {
857
1559
  action: 'back',
858
1560
  };
859
1561
  }
860
- const selectedRole = rolePrompt.result.workspaceRole;
861
- const allowedPolicies = itemAllowedPoliciesByRole[selectedRole];
862
- const policyPrompt = await CLIUtilityInitialize.promptWithCancel({
1562
+ const selectedRole = rolePrompt['result'].workspaceRole;
1563
+ const allowedPolicies = libItemAllowedPoliciesByRole[selectedRole];
1564
+ const existingPolicyIndex = allowedPolicies.findIndex((allowedPolicy) => options['existingWorkspace'] !== undefined && allowedPolicy === options['existingWorkspace']['policy']);
1565
+ const policyPrompt = await CliUtilityInitialize.promptWithCancel({
863
1566
  type: 'select',
864
1567
  name: 'workspacePolicy',
865
1568
  message: 'Select a policy',
866
- choices: allowedPolicies.map((allowedPolicy) => ({
867
- title: policy[allowedPolicy].label,
868
- description: policy[allowedPolicy].description,
869
- value: allowedPolicy,
870
- })),
871
- initial: Math.max(0, allowedPolicies.findIndex((policy) => options.existingWorkspace !== undefined && policy === options.existingWorkspace.policy)),
1569
+ choices: allowedPolicies.map((allowedPolicy) => {
1570
+ const policyEntry = Reflect.get(policy, allowedPolicy);
1571
+ return {
1572
+ title: policyEntry['label'],
1573
+ description: policyEntry['description'],
1574
+ value: allowedPolicy,
1575
+ };
1576
+ }),
1577
+ initial: Math.max(0, existingPolicyIndex),
872
1578
  });
873
- if (policyPrompt.cancelled) {
1579
+ if (policyPrompt['cancelled'] === true) {
874
1580
  return {
875
1581
  action: 'back',
876
1582
  };
877
1583
  }
878
- const selectedPolicy = policyPrompt.result.workspacePolicy;
1584
+ const selectedPolicy = policyPrompt['result'].workspacePolicy;
879
1585
  const resolvedName = await resolveName(selectedRole);
880
1586
  if (resolvedName === undefined) {
881
1587
  return {
882
1588
  action: 'back',
883
1589
  };
884
1590
  }
885
- let syncProperties;
886
- if (selectedPolicy === 'distributable') {
887
- const syncPropertiesPrompt = await CLIUtilityInitialize.promptWithCancel({
888
- type: 'multiselect',
889
- name: 'workspaceSyncProperties',
890
- message: 'Select metadata properties to sync',
891
- choices: itemAllowedSyncProperties.map((property) => ({
892
- title: property,
893
- value: property,
894
- selected: (options.existingWorkspace !== undefined && options.existingWorkspace.syncProperties !== undefined) ? options.existingWorkspace.syncProperties.includes(property) : false,
895
- })),
896
- });
897
- if (syncPropertiesPrompt.cancelled) {
1591
+ const existingRecipes = (options['existingWorkspace'] !== undefined && options['existingWorkspace']['recipes'] !== undefined) ? options['existingWorkspace']['recipes'] : undefined;
1592
+ const recipesPrompt = await CliUtilityInitialize.promptWithCancel({
1593
+ type: 'multiselect',
1594
+ name: 'workspaceRecipes',
1595
+ message: 'Select recipes to enable',
1596
+ choices: libItemAllowedRecipes.map((recipe) => {
1597
+ const recipeTuple = (existingRecipes !== undefined) ? Reflect.get(existingRecipes, recipe) : undefined;
1598
+ const recipeSelected = (Array.isArray(recipeTuple)
1599
+ && recipeTuple.length > 0
1600
+ && recipeTuple[0] === true);
898
1601
  return {
899
- action: 'back',
1602
+ title: recipe,
1603
+ value: recipe,
1604
+ selected: recipeSelected,
900
1605
  };
901
- }
902
- const selectedSyncProperties = syncPropertiesPrompt.result.workspaceSyncProperties;
903
- if (selectedSyncProperties.length > 0) {
904
- syncProperties = selectedSyncProperties;
905
- }
906
- }
907
- const pinVersionsPrompt = await CLIUtilityInitialize.promptWithCancel({
908
- type: 'confirm',
909
- name: 'workspacePinVersions',
910
- message: 'Pin dependency versions?',
911
- initial: options.existingWorkspace !== undefined && options.existingWorkspace.pinVersions === true,
1606
+ }),
912
1607
  });
913
- if (pinVersionsPrompt.cancelled) {
1608
+ if (recipesPrompt['cancelled'] === true) {
914
1609
  return {
915
1610
  action: 'back',
916
1611
  };
917
1612
  }
918
- const selectedPinVersions = pinVersionsPrompt.result.workspacePinVersions;
919
- const syncLtsEnginesPrompt = await CLIUtilityInitialize.promptWithCancel({
920
- type: 'confirm',
921
- name: 'workspaceSyncLtsEngines',
922
- message: 'Sync Node.js LTS engine constraint?',
923
- initial: options.existingWorkspace !== undefined && options.existingWorkspace.syncLtsEngines === true,
924
- });
925
- if (syncLtsEnginesPrompt.cancelled) {
926
- return {
927
- action: 'back',
928
- };
1613
+ const selectedRecipes = recipesPrompt['result'].workspaceRecipes;
1614
+ const recipes = {};
1615
+ for (const recipe of selectedRecipes) {
1616
+ const existingTupleRaw = (existingRecipes !== undefined) ? Reflect.get(existingRecipes, recipe) : undefined;
1617
+ const existingTuple = (Array.isArray(existingTupleRaw) === true) ? existingTupleRaw : undefined;
1618
+ const existingSettings = (existingTuple !== undefined && existingTuple.length > 1) ? existingTuple[1] : undefined;
1619
+ if (recipe === 'sync-identity' && selectedPolicy === 'distributable') {
1620
+ const settingsPrompt = await CliUtilityInitialize.promptWithCancel({
1621
+ type: 'multiselect',
1622
+ name: 'workspaceRecipeSettings',
1623
+ message: 'sync-identity: Select properties to sync',
1624
+ choices: [
1625
+ {
1626
+ title: 'description',
1627
+ value: 'description',
1628
+ selected: existingSettings !== undefined && existingSettings['description'] === true,
1629
+ },
1630
+ {
1631
+ title: 'keywords',
1632
+ value: 'keywords',
1633
+ selected: existingSettings !== undefined && existingSettings['keywords'] === true,
1634
+ },
1635
+ ],
1636
+ });
1637
+ if (settingsPrompt['cancelled'] === true) {
1638
+ return {
1639
+ action: 'back',
1640
+ };
1641
+ }
1642
+ const selectedSettings = settingsPrompt['result'].workspaceRecipeSettings;
1643
+ if (selectedSettings.length > 0) {
1644
+ const settings = {};
1645
+ for (const setting of selectedSettings) {
1646
+ Reflect.set(settings, setting, true);
1647
+ }
1648
+ Reflect.set(recipes, recipe, [
1649
+ true,
1650
+ settings,
1651
+ ]);
1652
+ }
1653
+ else {
1654
+ Reflect.set(recipes, recipe, [true]);
1655
+ }
1656
+ }
1657
+ else if (recipe === 'sync-ownership' && selectedPolicy === 'distributable') {
1658
+ const settingsPrompt = await CliUtilityInitialize.promptWithCancel({
1659
+ type: 'multiselect',
1660
+ name: 'workspaceRecipeSettings',
1661
+ message: 'sync-ownership: Select properties to sync',
1662
+ choices: [
1663
+ {
1664
+ title: 'homepage',
1665
+ value: 'homepage',
1666
+ selected: existingSettings !== undefined && existingSettings['homepage'] === true,
1667
+ },
1668
+ {
1669
+ title: 'bugs',
1670
+ value: 'bugs',
1671
+ selected: existingSettings !== undefined && existingSettings['bugs'] === true,
1672
+ },
1673
+ {
1674
+ title: 'author',
1675
+ value: 'author',
1676
+ selected: existingSettings !== undefined && existingSettings['author'] === true,
1677
+ },
1678
+ {
1679
+ title: 'contributors',
1680
+ value: 'contributors',
1681
+ selected: existingSettings !== undefined && existingSettings['contributors'] === true,
1682
+ },
1683
+ {
1684
+ title: 'funding',
1685
+ value: 'funding',
1686
+ selected: existingSettings !== undefined && existingSettings['funding'] === true,
1687
+ },
1688
+ {
1689
+ title: 'repository',
1690
+ value: 'repository',
1691
+ selected: existingSettings !== undefined && existingSettings['repository'] === true,
1692
+ },
1693
+ ],
1694
+ });
1695
+ if (settingsPrompt['cancelled'] === true) {
1696
+ return {
1697
+ action: 'back',
1698
+ };
1699
+ }
1700
+ const selectedSettings = settingsPrompt['result'].workspaceRecipeSettings;
1701
+ if (selectedSettings.length > 0) {
1702
+ const settings = {};
1703
+ for (const setting of selectedSettings) {
1704
+ Reflect.set(settings, setting, true);
1705
+ }
1706
+ Reflect.set(recipes, recipe, [
1707
+ true,
1708
+ settings,
1709
+ ]);
1710
+ }
1711
+ else {
1712
+ Reflect.set(recipes, recipe, [true]);
1713
+ }
1714
+ }
1715
+ else if (recipe === 'sync-environment') {
1716
+ const settingsPrompt = await CliUtilityInitialize.promptWithCancel({
1717
+ type: 'multiselect',
1718
+ name: 'workspaceRecipeSettings',
1719
+ message: 'sync-environment: Select settings',
1720
+ choices: [{
1721
+ title: 'trackNodeLtsVersions',
1722
+ value: 'trackNodeLtsVersions',
1723
+ selected: existingSettings !== undefined && existingSettings['trackNodeLtsVersions'] === true,
1724
+ }],
1725
+ });
1726
+ if (settingsPrompt['cancelled'] === true) {
1727
+ return {
1728
+ action: 'back',
1729
+ };
1730
+ }
1731
+ const selectedSettings = settingsPrompt['result'].workspaceRecipeSettings;
1732
+ if (selectedSettings.length > 0) {
1733
+ const settings = {};
1734
+ for (const setting of selectedSettings) {
1735
+ Reflect.set(settings, setting, true);
1736
+ }
1737
+ Reflect.set(recipes, recipe, [
1738
+ true,
1739
+ settings,
1740
+ ]);
1741
+ }
1742
+ else {
1743
+ Reflect.set(recipes, recipe, [true]);
1744
+ }
1745
+ }
1746
+ else if (recipe === 'cleanup') {
1747
+ const settingsPrompt = await CliUtilityInitialize.promptWithCancel({
1748
+ type: 'multiselect',
1749
+ name: 'workspaceRecipeSettings',
1750
+ message: 'cleanup: Select settings',
1751
+ choices: [
1752
+ {
1753
+ title: 'removeUnknownKeys',
1754
+ value: 'removeUnknownKeys',
1755
+ selected: existingSettings !== undefined && existingSettings['removeUnknownKeys'] === true,
1756
+ },
1757
+ {
1758
+ title: 'reorderKeys',
1759
+ value: 'reorderKeys',
1760
+ selected: existingSettings !== undefined && existingSettings['reorderKeys'] === true,
1761
+ },
1762
+ ],
1763
+ });
1764
+ if (settingsPrompt['cancelled'] === true) {
1765
+ return {
1766
+ action: 'back',
1767
+ };
1768
+ }
1769
+ const selectedSettings = settingsPrompt['result'].workspaceRecipeSettings;
1770
+ if (selectedSettings.length > 0) {
1771
+ const settings = {};
1772
+ for (const setting of selectedSettings) {
1773
+ Reflect.set(settings, setting, true);
1774
+ }
1775
+ Reflect.set(recipes, recipe, [
1776
+ true,
1777
+ settings,
1778
+ ]);
1779
+ }
1780
+ else {
1781
+ Reflect.set(recipes, recipe, [true]);
1782
+ }
1783
+ }
1784
+ else if (recipe === 'normalize-dependencies') {
1785
+ const settingsPrompt = await CliUtilityInitialize.promptWithCancel({
1786
+ type: 'multiselect',
1787
+ name: 'workspaceRecipeSettings',
1788
+ message: 'normalize-dependencies: Select settings',
1789
+ choices: [
1790
+ {
1791
+ title: 'pinDependencyVersions',
1792
+ value: 'pinDependencyVersions',
1793
+ selected: existingSettings !== undefined && existingSettings['pinDependencyVersions'] === true,
1794
+ },
1795
+ {
1796
+ title: 'pinDevDependencyVersions',
1797
+ value: 'pinDevDependencyVersions',
1798
+ selected: existingSettings !== undefined && existingSettings['pinDevDependencyVersions'] === true,
1799
+ },
1800
+ ],
1801
+ });
1802
+ if (settingsPrompt['cancelled'] === true) {
1803
+ return {
1804
+ action: 'back',
1805
+ };
1806
+ }
1807
+ const selectedSettings = settingsPrompt['result'].workspaceRecipeSettings;
1808
+ if (selectedSettings.length > 0) {
1809
+ const settings = {};
1810
+ for (const setting of selectedSettings) {
1811
+ Reflect.set(settings, setting, true);
1812
+ }
1813
+ Reflect.set(recipes, recipe, [
1814
+ true,
1815
+ settings,
1816
+ ]);
1817
+ }
1818
+ else {
1819
+ Reflect.set(recipes, recipe, [true]);
1820
+ }
1821
+ }
1822
+ else {
1823
+ Reflect.set(recipes, recipe, [true]);
1824
+ }
929
1825
  }
930
- const selectedSyncLtsEngines = syncLtsEnginesPrompt.result.workspaceSyncLtsEngines;
931
1826
  return {
932
1827
  action: 'apply',
933
1828
  workspace: {
934
1829
  name: resolvedName,
935
1830
  role: selectedRole,
936
1831
  policy: selectedPolicy,
937
- ...(syncProperties !== undefined) ? { syncProperties } : {},
938
- ...(selectedPinVersions === true) ? { pinVersions: selectedPinVersions } : {},
939
- ...(selectedSyncLtsEngines === true) ? { syncLtsEngines: selectedSyncLtsEngines } : {},
1832
+ ...(Object.keys(recipes).length > 0) ? { recipes } : {},
940
1833
  },
941
1834
  };
942
1835
  }
943
1836
  static async promptWithCancel(questions) {
944
1837
  let cancelled = false;
945
1838
  const result = await prompts(questions, {
946
- onCancel: () => {
947
- cancelled = true;
948
- return false;
949
- },
1839
+ onCancel: () => false,
950
1840
  });
951
- if (cancelled) {
1841
+ if (Object.keys(result).length === 0) {
1842
+ cancelled = true;
1843
+ }
1844
+ if (cancelled === true) {
952
1845
  return {
953
1846
  cancelled: true,
954
1847
  };
@@ -961,37 +1854,40 @@ export class CLIUtilityInitialize {
961
1854
  static async checkPath(currentDirectory) {
962
1855
  const locations = await discoverPathsWithFile('package.json', 'backward');
963
1856
  Logger.customize({
964
- name: 'CLIUtilityInitialize.checkPath',
1857
+ name: 'CliUtilityInitialize.checkPath',
965
1858
  purpose: 'detectedLocations',
966
1859
  }).debug(locations);
967
1860
  if (locations.length < 1) {
968
- Logger.customize({
969
- name: 'CLIUtilityInitialize.checkPath',
970
- purpose: 'lessThanOne',
971
- }).error([
1861
+ const lessThanOneMessage = [
972
1862
  'No "package.json" files were found. Re-run this command inside the project root directory.',
973
1863
  `Current directory is "${currentDirectory}"`,
974
- ].join('\n'));
1864
+ ].join('\n');
1865
+ Logger.customize({
1866
+ name: 'CliUtilityInitialize.checkPath',
1867
+ purpose: 'lessThanOne',
1868
+ }).error(lessThanOneMessage);
975
1869
  return false;
976
1870
  }
977
1871
  if (locations.length > 1) {
978
- Logger.customize({
979
- name: 'CLIUtilityInitialize.checkPath',
980
- purpose: 'greaterThanOne',
981
- }).error([
1872
+ const greaterThanOneMessage = [
982
1873
  'Multiple "package.json" files were found. Re-run this command inside the project root directory.',
983
1874
  `Current directory is "${currentDirectory}"`,
984
- ].join('\n'));
1875
+ ].join('\n');
1876
+ Logger.customize({
1877
+ name: 'CliUtilityInitialize.checkPath',
1878
+ purpose: 'greaterThanOne',
1879
+ }).error(greaterThanOneMessage);
985
1880
  return false;
986
1881
  }
987
1882
  if (locations.length === 1 && locations[0] !== currentDirectory) {
988
- Logger.customize({
989
- name: 'CLIUtilityInitialize.checkPath',
990
- purpose: 'notProjectRootDir',
991
- }).error([
1883
+ const notProjectRootDirectoryMessage = [
992
1884
  'Must be run inside the project root directory.',
993
1885
  `Current directory is "${currentDirectory}"`,
994
- ].join('\n'));
1886
+ ].join('\n');
1887
+ Logger.customize({
1888
+ name: 'CliUtilityInitialize.checkPath',
1889
+ purpose: 'notProjectRootDirectory',
1890
+ }).error(notProjectRootDirectoryMessage);
995
1891
  return false;
996
1892
  }
997
1893
  return true;
@@ -1010,7 +1906,7 @@ export class CLIUtilityInitialize {
1010
1906
  sanitized: undefined,
1011
1907
  };
1012
1908
  }
1013
- if (!PATTERN_EMAIL_SIMPLE.test(trimmedValue)) {
1909
+ if (LIB_REGEX_PATTERN_EMAIL_SIMPLE.test(trimmedValue) === false) {
1014
1910
  return {
1015
1911
  result: 'Enter a valid email address or leave blank.',
1016
1912
  sanitized: undefined,
@@ -1036,7 +1932,7 @@ export class CLIUtilityInitialize {
1036
1932
  };
1037
1933
  }
1038
1934
  if (trimmedValue.length > 214
1039
- || !new RegExp(PATTERN_SLUG_SIMPLE, 'i').test(trimmedValue)) {
1935
+ || new RegExp(LIB_REGEX_PATTERN_SLUG_SIMPLE, 'i').test(trimmedValue) === false) {
1040
1936
  return {
1041
1937
  result: 'Use only letters, numbers, hyphens, or underscores, and keep it at 214 characters or fewer.',
1042
1938
  sanitized: undefined,
@@ -1091,7 +1987,9 @@ export class CLIUtilityInitialize {
1091
1987
  .map((item) => item.trim())
1092
1988
  .filter((item) => item !== '');
1093
1989
  for (let i = 0; i < items.length; i += 1) {
1094
- const { result, sanitized } = CLIUtilityInitialize.normalizeText(items[i], maxLengthPerItem);
1990
+ const normalizedText = CliUtilityInitialize.normalizeText(items[i], maxLengthPerItem);
1991
+ const result = normalizedText['result'];
1992
+ const sanitized = normalizedText['sanitized'];
1095
1993
  if (result !== true) {
1096
1994
  return {
1097
1995
  result: `Invalid entry "${items[i]}": Input a value under ${maxLengthPerItem} character(s) or remove entry.`,
@@ -1099,7 +1997,7 @@ export class CLIUtilityInitialize {
1099
1997
  };
1100
1998
  }
1101
1999
  if (sanitized !== undefined) {
1102
- items[i] = sanitized;
2000
+ Reflect.set(items, i, sanitized);
1103
2001
  }
1104
2002
  }
1105
2003
  return {
@@ -1123,19 +2021,29 @@ export class CLIUtilityInitialize {
1123
2021
  }
1124
2022
  const rules = {
1125
2023
  generic: {
1126
- allowed: ['http:', 'https:'],
2024
+ allowed: [
2025
+ 'http:',
2026
+ 'https:',
2027
+ ],
1127
2028
  message: 'Enter a valid generic URL (e.g., https://) or leave blank.',
1128
2029
  },
1129
2030
  repository: {
1130
- allowed: ['git:', 'git+https:', 'git+ssh:', 'git+http:', 'http:', 'https:'],
2031
+ allowed: [
2032
+ 'git:',
2033
+ 'git+https:',
2034
+ 'git+ssh:',
2035
+ 'git+http:',
2036
+ 'http:',
2037
+ 'https:',
2038
+ ],
1131
2039
  message: 'Enter a valid repository URL (e.g., git+https://) or leave blank.',
1132
2040
  },
1133
2041
  };
1134
- const allowed = (protocol === 'repository') ? rules.repository.allowed : rules.generic.allowed;
1135
- const errorMessage = (protocol === 'repository') ? rules.repository.message : rules.generic.message;
2042
+ const allowed = (protocol === 'repository') ? rules['repository']['allowed'] : rules['generic']['allowed'];
2043
+ const errorMessage = (protocol === 'repository') ? rules['repository']['message'] : rules['generic']['message'];
1136
2044
  try {
1137
2045
  const url = new URL(trimmedValue);
1138
- if (allowed.includes(url.protocol)) {
2046
+ if (allowed.includes(url.protocol) === true) {
1139
2047
  return {
1140
2048
  result: true,
1141
2049
  sanitized: url.toString(),
@@ -1168,20 +2076,22 @@ export class CLIUtilityInitialize {
1168
2076
  .map((item) => item.trim())
1169
2077
  .filter((item) => item !== '');
1170
2078
  for (let i = 0; i < items.length; i += 1) {
1171
- const { result, sanitized } = CLIUtilityInitialize.normalizeUrl(items[i], protocol);
2079
+ const normalizedUrl = CliUtilityInitialize.normalizeUrl(items[i], protocol);
2080
+ const result = normalizedUrl['result'];
2081
+ const sanitized = normalizedUrl['sanitized'];
1172
2082
  if (result !== true) {
1173
2083
  const errorMessages = {
1174
2084
  generic: 'Enter a valid generic URL (e.g., https://) or remove entry.',
1175
2085
  repository: 'Enter a valid repository URL (e.g., git+https://) or remove entry.',
1176
2086
  };
1177
- const errorMessage = (protocol === 'repository') ? errorMessages.repository : errorMessages.generic;
2087
+ const errorMessage = (protocol === 'repository') ? errorMessages['repository'] : errorMessages['generic'];
1178
2088
  return {
1179
2089
  result: `Invalid URL "${items[i]}": ${errorMessage}`,
1180
2090
  sanitized: undefined,
1181
2091
  };
1182
2092
  }
1183
2093
  if (sanitized !== undefined) {
1184
- items[i] = sanitized;
2094
+ Reflect.set(items, i, sanitized);
1185
2095
  }
1186
2096
  }
1187
2097
  return {
@@ -1208,7 +2118,7 @@ export class CLIUtilityInitialize {
1208
2118
  case 'app':
1209
2119
  case 'tool': {
1210
2120
  const expectedPrefix = `${base}-`;
1211
- if (!trimmedValue.startsWith(expectedPrefix)) {
2121
+ if (trimmedValue.startsWith(expectedPrefix) === false) {
1212
2122
  return {
1213
2123
  result: `Begin with "${expectedPrefix}" and add a descriptor slug.`,
1214
2124
  sanitized: undefined,
@@ -1221,7 +2131,7 @@ export class CLIUtilityInitialize {
1221
2131
  sanitized: undefined,
1222
2132
  };
1223
2133
  }
1224
- if (!PATTERN_SLUG_SIMPLE.test(descriptor)) {
2134
+ if (LIB_REGEX_PATTERN_SLUG_SIMPLE.test(descriptor) === false) {
1225
2135
  return {
1226
2136
  result: 'Descriptor must match the slug pattern (lowercase letters, numbers, hyphens, underscores).',
1227
2137
  sanitized: undefined,
@@ -1235,7 +2145,7 @@ export class CLIUtilityInitialize {
1235
2145
  case 'template':
1236
2146
  case 'package':
1237
2147
  default: {
1238
- if (PATTERN_SLUG_SIMPLE.test(trimmedValue) || PATTERN_SLUG_SCOPED.test(trimmedValue)) {
2148
+ if (LIB_REGEX_PATTERN_SLUG_SIMPLE.test(trimmedValue) === true || LIB_REGEX_PATTERN_SLUG_SCOPED.test(trimmedValue) === true) {
1239
2149
  return {
1240
2150
  result: true,
1241
2151
  sanitized: trimmedValue,