@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,1212 +0,0 @@
1
- import { dirname, join, relative, sep, } from 'path';
2
- import chalk from 'chalk';
3
- import { NodeReleases } from '../../api/node-releases.js';
4
- import { SpdxLicenses } from '../../api/spdx-licenses.js';
5
- import { itemPackageJsonKeysBundler, itemPackageJsonKeysCorepack, itemPackageJsonKeysNodeJs, itemPackageJsonKeysNpm, itemPackageJsonSortOrder, } from '../../lib/item.js';
6
- import { NovaConfig } from '../../lib/nova-config.js';
7
- import { PATTERN_DIGITS, PATTERN_NAME_AT_VERSION, PATTERN_RANGE_CAPTURE_REMAINDER, PATTERN_RANGE_GREATER_EQUAL_MAJOR, PATTERN_RANGE_MAJOR, PATTERN_SEMVER_STRICT, } from '../../lib/regex.js';
8
- import { isPlainObject, isProjectRoot, loadWorkspaceManifests, pathExists, saveWorkspaceManifest, } from '../../lib/utility.js';
9
- import { Logger } from '../../toolkit/index.js';
10
- export class CLIRecipeSyncPackages {
11
- static async run(options) {
12
- const currentDirectory = process.cwd();
13
- const isAtProjectRoot = await isProjectRoot(currentDirectory);
14
- if (isAtProjectRoot !== true) {
15
- process.exitCode = 1;
16
- return;
17
- }
18
- const isDryRun = options.dryRun === true;
19
- const isIgnoreUnknown = options.ignoreUnknown === true;
20
- const isReplaceFile = options.replaceFile === true;
21
- if (isDryRun === true) {
22
- Logger.customize({
23
- name: 'CLIRecipeSyncPackages.run',
24
- purpose: 'options',
25
- }).warn('Dry run enabled. File changes will not be made in this session.');
26
- }
27
- if (isIgnoreUnknown === true) {
28
- Logger.customize({
29
- name: 'CLIRecipeSyncPackages.run',
30
- purpose: 'options',
31
- }).warn('Ignore unknown enabled. Unknown keys from the "package.json" file will ignored.');
32
- }
33
- if (isReplaceFile === true) {
34
- const replaceFileNotice = (isDryRun) ? 'This option has no effect during a dry run session.' : 'Backup file will not be created.';
35
- Logger.customize({
36
- name: 'CLIRecipeSyncPackages.run',
37
- purpose: 'options',
38
- }).warn(`Replace file enabled. ${replaceFileNotice}`);
39
- }
40
- const novaConfig = new NovaConfig();
41
- const workingFile = await novaConfig.load();
42
- const workingFileWorkspaces = Object.entries(workingFile.workspaces ?? {});
43
- if (workingFileWorkspaces.length === 0) {
44
- Logger.customize({
45
- name: 'CLIRecipeSyncPackages.run',
46
- purpose: 'workspaces',
47
- }).warn('Skipping package sync. No workspaces detected in the "nova.config.json" file.');
48
- return;
49
- }
50
- const workspaces = await loadWorkspaceManifests({
51
- projectRoot: currentDirectory,
52
- workspaces: workingFileWorkspaces,
53
- });
54
- if (workspaces.length === 0) {
55
- Logger.customize({
56
- name: 'CLIRecipeSyncPackages.run',
57
- purpose: 'workspaces',
58
- }).warn('Skipping package sync. No accessible "package.json" files were found for the configured workspaces.');
59
- return;
60
- }
61
- Logger.customize({
62
- name: 'CLIRecipeSyncPackages.run',
63
- purpose: 'summary',
64
- }).info(`Prepared ${workspaces.length} workspace "package.json" file(s) for syncing.`);
65
- for (const workspace of workspaces) {
66
- Logger.customize({
67
- name: 'CLIRecipeSyncPackages.run',
68
- purpose: 'iteration',
69
- }).info(`Syncing the "${workspace.manifest.name}" workspace ...`);
70
- if (isIgnoreUnknown !== true) {
71
- CLIRecipeSyncPackages.handleUnknown(workspace);
72
- }
73
- await CLIRecipeSyncPackages.handleIdentity(workspace, workingFile);
74
- CLIRecipeSyncPackages.handleOwnership(workspace, workingFile);
75
- CLIRecipeSyncPackages.handleRuntime(workspace);
76
- await CLIRecipeSyncPackages.handleArtifacts(workspace);
77
- await CLIRecipeSyncPackages.handlePublish(workspace);
78
- await CLIRecipeSyncPackages.handleTooling(workspace);
79
- CLIRecipeSyncPackages.handleCorepack(workspace);
80
- await CLIRecipeSyncPackages.handleEnvironment(workspace);
81
- await CLIRecipeSyncPackages.handleDependencies(workspace);
82
- CLIRecipeSyncPackages.handleBundler(workspace);
83
- CLIRecipeSyncPackages.handleReorder(workspace);
84
- if (isDryRun === true) {
85
- continue;
86
- }
87
- await saveWorkspaceManifest(workspace, isReplaceFile);
88
- }
89
- }
90
- static async handleIdentity(workspace, workingFile) {
91
- const { fileContents, filePath, manifest } = workspace;
92
- const packageName = fileContents['name'];
93
- const packageVersion = fileContents['version'];
94
- const packageDescription = fileContents['description'];
95
- const packageKeywords = fileContents['keywords'];
96
- const packageLicense = fileContents['license'];
97
- if (typeof packageName !== 'string'
98
- || packageName !== manifest.name) {
99
- Logger.customize({
100
- name: 'CLIRecipeSyncPackages.handleIdentity',
101
- purpose: 'name',
102
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "name" from workspace manifest ...`);
103
- Reflect.set(fileContents, 'name', manifest.name);
104
- }
105
- if (typeof packageVersion !== 'string'
106
- || !PATTERN_SEMVER_STRICT.test(packageVersion)
107
- || (['freezable'].includes(manifest.policy)
108
- && packageVersion !== '0.0.0') || (['trackable', 'distributable'].includes(manifest.policy)
109
- && packageVersion === '0.0.0')) {
110
- const validVersion = (manifest.policy === 'freezable') ? '0.0.0' : '0.0.1';
111
- Logger.customize({
112
- name: 'CLIRecipeSyncPackages.handleIdentity',
113
- purpose: 'version',
114
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Invalid version detected. Setting it to "${validVersion}" ...`);
115
- Reflect.set(fileContents, 'version', validVersion);
116
- }
117
- if (packageDescription !== undefined
118
- && manifest.policy !== 'distributable') {
119
- Logger.customize({
120
- name: 'CLIRecipeSyncPackages.handleIdentity',
121
- purpose: 'description',
122
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "description". Workspace policy "${manifest.policy}" does not allow it.`);
123
- Reflect.deleteProperty(fileContents, 'description');
124
- }
125
- else {
126
- const validDescription = (workingFile.project !== undefined && workingFile.project.description !== undefined) ? workingFile.project.description.short : undefined;
127
- if ((manifest.policy === 'distributable'
128
- && manifest.syncProperties !== undefined
129
- && manifest.syncProperties.includes('description')
130
- && validDescription !== undefined)
131
- && (typeof packageDescription !== 'string'
132
- || packageDescription !== validDescription)) {
133
- Logger.customize({
134
- name: 'CLIRecipeSyncPackages.handleIdentity',
135
- purpose: 'description',
136
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "description" from workspace manifest ...`);
137
- Reflect.set(fileContents, 'description', validDescription);
138
- }
139
- if (manifest.policy === 'distributable'
140
- && manifest.syncProperties !== undefined
141
- && manifest.syncProperties.includes('description')
142
- && validDescription === undefined) {
143
- Logger.customize({
144
- name: 'CLIRecipeSyncPackages.handleIdentity',
145
- purpose: 'description',
146
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "description". No description is defined.`);
147
- Reflect.deleteProperty(fileContents, 'description');
148
- }
149
- }
150
- if (packageKeywords !== undefined
151
- && manifest.policy !== 'distributable') {
152
- Logger.customize({
153
- name: 'CLIRecipeSyncPackages.handleIdentity',
154
- purpose: 'keywords',
155
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "keywords". Workspace policy "${manifest.policy}" does not allow it.`);
156
- Reflect.deleteProperty(fileContents, 'keywords');
157
- }
158
- else {
159
- const validKeywords = (workingFile.project !== undefined) ? workingFile.project.keywords : undefined;
160
- if ((manifest.policy === 'distributable'
161
- && manifest.syncProperties !== undefined
162
- && manifest.syncProperties.includes('keywords')
163
- && validKeywords !== undefined)
164
- && (JSON.stringify(packageKeywords) !== JSON.stringify(validKeywords))) {
165
- Logger.customize({
166
- name: 'CLIRecipeSyncPackages.handleIdentity',
167
- purpose: 'keywords',
168
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "keywords" from workspace manifest ...`);
169
- Reflect.set(fileContents, 'keywords', validKeywords);
170
- }
171
- if (manifest.policy === 'distributable'
172
- && manifest.syncProperties !== undefined
173
- && manifest.syncProperties.includes('keywords')
174
- && validKeywords === undefined) {
175
- Logger.customize({
176
- name: 'CLIRecipeSyncPackages.handleIdentity',
177
- purpose: 'keywords',
178
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "keywords". No keywords are defined.`);
179
- Reflect.deleteProperty(fileContents, 'keywords');
180
- }
181
- }
182
- const spdxLicenses = await SpdxLicenses.fetchLicenses();
183
- if (typeof packageLicense !== 'string'
184
- || (spdxLicenses !== undefined && !spdxLicenses.has(packageLicense))) {
185
- const packageDirectory = dirname(filePath);
186
- const projectRoot = process.cwd();
187
- const licenseCandidates = [
188
- join(packageDirectory, 'LICENSE'),
189
- join(packageDirectory, 'LICENSE.md'),
190
- join(projectRoot, 'LICENSE'),
191
- join(projectRoot, 'LICENSE.md'),
192
- ];
193
- let resolvedLicensePath;
194
- for (const candidate of licenseCandidates) {
195
- if (await pathExists(candidate)) {
196
- resolvedLicensePath = candidate;
197
- break;
198
- }
199
- }
200
- const relativeLicensePath = (resolvedLicensePath !== undefined) ? relative(packageDirectory, resolvedLicensePath) : undefined;
201
- let normalizedLicenseReference;
202
- if (relativeLicensePath !== undefined) {
203
- normalizedLicenseReference = (relativeLicensePath.startsWith('.')) ? relativeLicensePath : `./${relativeLicensePath}`;
204
- }
205
- const fallbackLicense = (normalizedLicenseReference !== undefined) ? `SEE LICENSE IN ${normalizedLicenseReference}` : 'UNLICENSED';
206
- if (packageLicense === fallbackLicense) {
207
- return;
208
- }
209
- Logger.customize({
210
- name: 'CLIRecipeSyncPackages.handleIdentity',
211
- purpose: 'license',
212
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "license" to "${fallbackLicense}" ...`);
213
- Reflect.set(fileContents, 'license', fallbackLicense);
214
- }
215
- }
216
- static async handleArtifacts(workspace) {
217
- const { fileContents, manifest } = workspace;
218
- const packageFiles = fileContents['files'];
219
- const packageBin = fileContents['bin'];
220
- const packageMan = fileContents['man'];
221
- const packageDirectories = fileContents['directories'];
222
- if (packageFiles !== undefined
223
- && !['package', 'tool'].includes(manifest.role)) {
224
- Logger.customize({
225
- name: 'CLIRecipeSyncPackages.handleArtifacts',
226
- purpose: 'files',
227
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "files". Workspace role "${manifest.role}" does not allow it.`);
228
- Reflect.deleteProperty(fileContents, 'files');
229
- }
230
- else {
231
- if ((manifest.role === 'package' || manifest.role === 'tool')
232
- && packageFiles !== undefined
233
- && CLIRecipeSyncPackages.isEmpty(packageFiles)) {
234
- Logger.customize({
235
- name: 'CLIRecipeSyncPackages.handleArtifacts',
236
- purpose: 'files',
237
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "files" ...`);
238
- Reflect.deleteProperty(fileContents, 'files');
239
- }
240
- }
241
- if (packageBin !== undefined
242
- && !['package', 'tool'].includes(manifest.role)) {
243
- Logger.customize({
244
- name: 'CLIRecipeSyncPackages.handleArtifacts',
245
- purpose: 'bin',
246
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "bin". Workspace role "${manifest.role}" does not allow it.`);
247
- Reflect.deleteProperty(fileContents, 'bin');
248
- }
249
- else {
250
- if ((manifest.role === 'package' || manifest.role === 'tool')
251
- && packageBin !== undefined) {
252
- if (typeof packageBin === 'string') {
253
- const packageName = manifest.name;
254
- const binName = (packageName.includes('/')) ? packageName.split('/').pop() : packageName;
255
- Logger.customize({
256
- name: 'CLIRecipeSyncPackages.handleArtifacts',
257
- purpose: 'bin',
258
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Normalizing "bin" from string to object ...`);
259
- Reflect.set(fileContents, 'bin', {
260
- [binName ?? packageName]: packageBin,
261
- });
262
- }
263
- else if (CLIRecipeSyncPackages.isEmpty(packageBin)) {
264
- Logger.customize({
265
- name: 'CLIRecipeSyncPackages.handleArtifacts',
266
- purpose: 'bin',
267
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "bin" ...`);
268
- Reflect.deleteProperty(fileContents, 'bin');
269
- }
270
- }
271
- }
272
- if (packageMan !== undefined
273
- && !['package', 'tool'].includes(manifest.role)) {
274
- Logger.customize({
275
- name: 'CLIRecipeSyncPackages.handleArtifacts',
276
- purpose: 'man',
277
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "man". Workspace role "${manifest.role}" does not allow it.`);
278
- Reflect.deleteProperty(fileContents, 'man');
279
- }
280
- else {
281
- if ((manifest.role === 'package' || manifest.role === 'tool')
282
- && packageMan !== undefined) {
283
- if (typeof packageMan === 'string') {
284
- Logger.customize({
285
- name: 'CLIRecipeSyncPackages.handleArtifacts',
286
- purpose: 'man',
287
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Normalizing "man" from string to array ...`);
288
- Reflect.set(fileContents, 'man', [packageMan]);
289
- }
290
- else if (CLIRecipeSyncPackages.isEmpty(packageMan)) {
291
- Logger.customize({
292
- name: 'CLIRecipeSyncPackages.handleArtifacts',
293
- purpose: 'man',
294
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "man" ...`);
295
- Reflect.deleteProperty(fileContents, 'man');
296
- }
297
- }
298
- }
299
- if (packageDirectories !== undefined
300
- && !['package', 'tool'].includes(manifest.role)) {
301
- Logger.customize({
302
- name: 'CLIRecipeSyncPackages.handleArtifacts',
303
- purpose: 'directories',
304
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "directories". Workspace role "${manifest.role}" does not allow it.`);
305
- Reflect.deleteProperty(fileContents, 'directories');
306
- }
307
- else {
308
- if ((manifest.role === 'package' || manifest.role === 'tool')
309
- && packageDirectories !== undefined
310
- && CLIRecipeSyncPackages.isEmpty(packageDirectories)) {
311
- Logger.customize({
312
- name: 'CLIRecipeSyncPackages.handleArtifacts',
313
- purpose: 'directories',
314
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "directories" ...`);
315
- Reflect.deleteProperty(fileContents, 'directories');
316
- }
317
- }
318
- }
319
- static async handlePublish(workspace) {
320
- const { fileContents, manifest } = workspace;
321
- const packagePrivate = fileContents['private'];
322
- const packagePublishConfig = fileContents['publishConfig'];
323
- if (typeof packagePrivate !== 'boolean'
324
- || (manifest.policy === 'distributable'
325
- && packagePrivate)
326
- || (manifest.policy !== 'distributable'
327
- && !packagePrivate)) {
328
- const privateValue = (manifest.policy !== 'distributable');
329
- Logger.customize({
330
- name: 'CLIRecipeSyncPackages.handlePublish',
331
- purpose: 'private',
332
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "private" to "${privateValue}" ...`);
333
- Reflect.set(fileContents, 'private', privateValue);
334
- }
335
- if (packagePublishConfig !== undefined
336
- && manifest.policy !== 'distributable') {
337
- Logger.customize({
338
- name: 'CLIRecipeSyncPackages.handlePublish',
339
- purpose: 'publishConfig',
340
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "publishConfig". Workspace policy "${manifest.policy}" does not allow it.`);
341
- Reflect.deleteProperty(fileContents, 'publishConfig');
342
- }
343
- else {
344
- if (manifest.policy === 'distributable'
345
- && packagePublishConfig !== undefined
346
- && CLIRecipeSyncPackages.isEmpty(packagePublishConfig)) {
347
- Logger.customize({
348
- name: 'CLIRecipeSyncPackages.handlePublish',
349
- purpose: 'publishConfig',
350
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "publishConfig" ...`);
351
- Reflect.deleteProperty(fileContents, 'publishConfig');
352
- }
353
- }
354
- }
355
- static async handleTooling(workspace) {
356
- const { fileContents, filePath, manifest } = workspace;
357
- const packageScripts = fileContents['scripts'];
358
- const packageGypfile = fileContents['gypfile'];
359
- const packageConfig = fileContents['config'];
360
- const packageWorkspaces = fileContents['workspaces'];
361
- const hasBindingGyp = await pathExists(join(dirname(filePath), 'binding.gyp'));
362
- if (packageScripts === undefined) {
363
- Logger.customize({
364
- name: 'CLIRecipeSyncPackages.handleTooling',
365
- purpose: 'scripts',
366
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "scripts" as an empty object ...`);
367
- Reflect.set(fileContents, 'scripts', {});
368
- }
369
- if (packageGypfile !== undefined
370
- && !hasBindingGyp) {
371
- Logger.customize({
372
- name: 'CLIRecipeSyncPackages.handleTooling',
373
- purpose: 'gypfile',
374
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "gypfile". No "binding.gyp" file is found.`);
375
- Reflect.deleteProperty(fileContents, 'gypfile');
376
- }
377
- else {
378
- if (packageGypfile === undefined
379
- && hasBindingGyp
380
- && (!isPlainObject(packageScripts)
381
- || (isPlainObject(packageScripts)
382
- && packageScripts['preinstall'] === undefined
383
- && packageScripts['install'] === undefined))) {
384
- Logger.customize({
385
- name: 'CLIRecipeSyncPackages.handleTooling',
386
- purpose: 'gypfile',
387
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "gypfile" as the npm default ...`);
388
- Reflect.set(fileContents, 'gypfile', true);
389
- }
390
- }
391
- if (packageConfig !== undefined
392
- && CLIRecipeSyncPackages.isEmpty(packageConfig)) {
393
- Logger.customize({
394
- name: 'CLIRecipeSyncPackages.handleTooling',
395
- purpose: 'config',
396
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "config" ...`);
397
- Reflect.deleteProperty(fileContents, 'config');
398
- }
399
- if (packageWorkspaces !== undefined
400
- && manifest.role !== 'project') {
401
- Logger.customize({
402
- name: 'CLIRecipeSyncPackages.handleTooling',
403
- purpose: 'workspaces',
404
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "workspaces". Workspace role "${manifest.role}" does not allow it.`);
405
- Reflect.deleteProperty(fileContents, 'workspaces');
406
- }
407
- else {
408
- if (manifest.role === 'project'
409
- && packageWorkspaces === undefined) {
410
- Logger.customize({
411
- name: 'CLIRecipeSyncPackages.handleTooling',
412
- purpose: 'workspaces',
413
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "workspaces" as an empty array ...`);
414
- Reflect.set(fileContents, 'workspaces', []);
415
- }
416
- }
417
- }
418
- static async handleEnvironment(workspace) {
419
- const { fileContents, manifest } = workspace;
420
- const packageEngines = fileContents['engines'];
421
- const packageOs = fileContents['os'];
422
- const packageCpu = fileContents['cpu'];
423
- const packageLibc = fileContents['libc'];
424
- const packageDevEngines = fileContents['devEngines'];
425
- const ltsConstraint = await NodeReleases.fetchLtsVersions();
426
- if (packageEngines === undefined) {
427
- if (ltsConstraint !== undefined) {
428
- Logger.customize({
429
- name: 'CLIRecipeSyncPackages.handleEnvironment',
430
- purpose: 'engines',
431
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "engines" with "node" set to "${ltsConstraint}" ...`);
432
- Reflect.set(fileContents, 'engines', {
433
- node: ltsConstraint,
434
- });
435
- }
436
- else {
437
- Logger.customize({
438
- name: 'CLIRecipeSyncPackages.handleEnvironment',
439
- purpose: 'engines',
440
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "engines" as an empty object ...`);
441
- Reflect.set(fileContents, 'engines', {});
442
- }
443
- }
444
- else {
445
- if (isPlainObject(packageEngines)
446
- && packageEngines['node'] === undefined
447
- && ltsConstraint !== undefined) {
448
- Logger.customize({
449
- name: 'CLIRecipeSyncPackages.handleEnvironment',
450
- purpose: 'engines',
451
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "engines.node" set to "${ltsConstraint}" ...`);
452
- Reflect.set(packageEngines, 'node', ltsConstraint);
453
- }
454
- }
455
- if (manifest.syncLtsEngines === true
456
- && isPlainObject(fileContents['engines'])
457
- && typeof fileContents['engines']['node'] === 'string'
458
- && ltsConstraint !== undefined) {
459
- const existingNode = fileContents['engines']['node'];
460
- const ltsMatches = [...ltsConstraint.matchAll(new RegExp(PATTERN_DIGITS.source, 'g'))];
461
- if (ltsMatches.length > 0) {
462
- const ltsMajors = ltsMatches.map((match) => parseInt(match[0], 10));
463
- const branches = existingNode.split('||').map((branch) => branch.trim());
464
- const coversAll = ltsMajors.every((major) => {
465
- return branches.some((branch) => {
466
- if (branch === '*') {
467
- return true;
468
- }
469
- const geMatch = branch.match(PATTERN_RANGE_GREATER_EQUAL_MAJOR);
470
- if (geMatch !== null) {
471
- return parseInt(geMatch[1] ?? '', 10) <= major;
472
- }
473
- const majorMatch = branch.match(PATTERN_RANGE_MAJOR);
474
- if (majorMatch !== null) {
475
- return parseInt(majorMatch[1] ?? '', 10) === major;
476
- }
477
- return false;
478
- });
479
- });
480
- if (coversAll !== true) {
481
- Logger.customize({
482
- name: 'CLIRecipeSyncPackages.handleEnvironment',
483
- purpose: 'engines',
484
- }).warn(`${chalk.magenta(`"${manifest.name}" workspace`)} → "engines.node" is "${existingNode}" but must cover all active LTS versions (${ltsMajors.join(', ')}). Run "nova recipe sync-lts-engines" to update.`);
485
- }
486
- }
487
- }
488
- if (packageOs !== undefined
489
- && CLIRecipeSyncPackages.isEmpty(packageOs)) {
490
- Logger.customize({
491
- name: 'CLIRecipeSyncPackages.handleEnvironment',
492
- purpose: 'os',
493
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "os" ...`);
494
- Reflect.deleteProperty(fileContents, 'os');
495
- }
496
- if (packageCpu !== undefined
497
- && CLIRecipeSyncPackages.isEmpty(packageCpu)) {
498
- Logger.customize({
499
- name: 'CLIRecipeSyncPackages.handleEnvironment',
500
- purpose: 'cpu',
501
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "cpu" ...`);
502
- Reflect.deleteProperty(fileContents, 'cpu');
503
- }
504
- if (packageLibc !== undefined
505
- && !(Array.isArray(fileContents['os'])
506
- && fileContents['os'].includes('linux'))) {
507
- Logger.customize({
508
- name: 'CLIRecipeSyncPackages.handleEnvironment',
509
- purpose: 'libc',
510
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "libc". Package "os" does not include "linux".`);
511
- Reflect.deleteProperty(fileContents, 'libc');
512
- }
513
- else {
514
- if (packageLibc === undefined
515
- && (Array.isArray(fileContents['os'])
516
- && fileContents['os'].includes('linux'))) {
517
- Logger.customize({
518
- name: 'CLIRecipeSyncPackages.handleEnvironment',
519
- purpose: 'libc',
520
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Adding "libc" as "glibc" ...`);
521
- Reflect.set(fileContents, 'libc', ['glibc']);
522
- }
523
- }
524
- if (packageDevEngines !== undefined
525
- && CLIRecipeSyncPackages.isEmpty(packageDevEngines)) {
526
- Logger.customize({
527
- name: 'CLIRecipeSyncPackages.handleEnvironment',
528
- purpose: 'devEngines',
529
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "devEngines" ...`);
530
- Reflect.deleteProperty(fileContents, 'devEngines');
531
- }
532
- }
533
- static async handleDependencies(workspace) {
534
- const { fileContents, manifest } = workspace;
535
- const packageDependencies = fileContents['dependencies'];
536
- const packageDevDependencies = fileContents['devDependencies'];
537
- const packagePeerDependencies = fileContents['peerDependencies'];
538
- const packagePeerDependenciesMeta = fileContents['peerDependenciesMeta'];
539
- const packageBundleDependencies = fileContents['bundleDependencies'];
540
- const packageBundledDependencies = fileContents['bundledDependencies'];
541
- const packageOptionalDependencies = fileContents['optionalDependencies'];
542
- const packageOverrides = fileContents['overrides'];
543
- if (packageDependencies !== undefined
544
- && CLIRecipeSyncPackages.isEmpty(packageDependencies)) {
545
- Logger.customize({
546
- name: 'CLIRecipeSyncPackages.handleDependencies',
547
- purpose: 'dependencies',
548
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "dependencies" ...`);
549
- Reflect.deleteProperty(fileContents, 'dependencies');
550
- }
551
- if (packageDevDependencies !== undefined
552
- && CLIRecipeSyncPackages.isEmpty(packageDevDependencies)) {
553
- Logger.customize({
554
- name: 'CLIRecipeSyncPackages.handleDependencies',
555
- purpose: 'devDependencies',
556
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "devDependencies" ...`);
557
- Reflect.deleteProperty(fileContents, 'devDependencies');
558
- }
559
- if (packagePeerDependencies !== undefined
560
- && CLIRecipeSyncPackages.isEmpty(packagePeerDependencies)) {
561
- Logger.customize({
562
- name: 'CLIRecipeSyncPackages.handleDependencies',
563
- purpose: 'peerDependencies',
564
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "peerDependencies" ...`);
565
- Reflect.deleteProperty(fileContents, 'peerDependencies');
566
- }
567
- if (packagePeerDependenciesMeta !== undefined
568
- && CLIRecipeSyncPackages.isEmpty(packagePeerDependenciesMeta)) {
569
- Logger.customize({
570
- name: 'CLIRecipeSyncPackages.handleDependencies',
571
- purpose: 'peerDependenciesMeta',
572
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "peerDependenciesMeta" ...`);
573
- Reflect.deleteProperty(fileContents, 'peerDependenciesMeta');
574
- }
575
- if (packageBundledDependencies !== undefined) {
576
- const bundleDependencies = Array.isArray(packageBundleDependencies) ? packageBundleDependencies : [];
577
- const bundledDependencies = Array.isArray(packageBundledDependencies) ? packageBundledDependencies : [];
578
- const mergedBundleDependencies = [...new Set([...bundleDependencies, ...bundledDependencies])];
579
- Logger.customize({
580
- name: 'CLIRecipeSyncPackages.handleDependencies',
581
- purpose: 'bundleDependencies',
582
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Merging "bundledDependencies" into "bundleDependencies" ...`);
583
- Reflect.set(fileContents, 'bundleDependencies', mergedBundleDependencies);
584
- Logger.customize({
585
- name: 'CLIRecipeSyncPackages.handleDependencies',
586
- purpose: 'bundledDependencies',
587
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "bundledDependencies". "bundledDependencies" is an alias of "bundleDependencies".`);
588
- Reflect.deleteProperty(fileContents, 'bundledDependencies');
589
- }
590
- if (fileContents['bundleDependencies'] !== undefined
591
- && CLIRecipeSyncPackages.isEmpty(fileContents['bundleDependencies'])) {
592
- Logger.customize({
593
- name: 'CLIRecipeSyncPackages.handleDependencies',
594
- purpose: 'bundleDependencies',
595
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "bundleDependencies" ...`);
596
- Reflect.deleteProperty(fileContents, 'bundleDependencies');
597
- }
598
- if (packageOptionalDependencies !== undefined
599
- && CLIRecipeSyncPackages.isEmpty(packageOptionalDependencies)) {
600
- Logger.customize({
601
- name: 'CLIRecipeSyncPackages.handleDependencies',
602
- purpose: 'optionalDependencies',
603
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "optionalDependencies" ...`);
604
- Reflect.deleteProperty(fileContents, 'optionalDependencies');
605
- }
606
- if (packageOverrides !== undefined
607
- && CLIRecipeSyncPackages.isEmpty(packageOverrides)) {
608
- Logger.customize({
609
- name: 'CLIRecipeSyncPackages.handleDependencies',
610
- purpose: 'overrides',
611
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing empty "overrides" ...`);
612
- Reflect.deleteProperty(fileContents, 'overrides');
613
- }
614
- if (manifest.pinVersions === true) {
615
- const depGroups = [
616
- 'dependencies',
617
- 'devDependencies',
618
- ];
619
- for (const depGroup of depGroups) {
620
- const deps = fileContents[depGroup];
621
- if (!isPlainObject(deps)) {
622
- continue;
623
- }
624
- for (const [depName, depVersion] of Object.entries(deps)) {
625
- if (typeof depVersion !== 'string') {
626
- continue;
627
- }
628
- if (PATTERN_RANGE_CAPTURE_REMAINDER.test(depVersion)) {
629
- Logger.customize({
630
- name: 'CLIRecipeSyncPackages.handleDependencies',
631
- purpose: depGroup,
632
- }).warn(`${chalk.magenta(`"${manifest.name}" workspace`)} → "${depName}" has unpinned version "${depVersion}". Run "nova recipe pin-versions" to fix.`);
633
- }
634
- }
635
- }
636
- }
637
- }
638
- static handleUnknown(workspace) {
639
- const allowedKeys = new Set([
640
- ...itemPackageJsonKeysBundler,
641
- ...itemPackageJsonKeysCorepack,
642
- ...itemPackageJsonKeysNodeJs,
643
- ...itemPackageJsonKeysNpm,
644
- ]);
645
- const manifestContents = workspace.fileContents ?? {};
646
- const manifestKeys = Object.keys(manifestContents);
647
- const unknownKeys = manifestKeys.filter((key) => !allowedKeys.has(key));
648
- if (unknownKeys.length === 0) {
649
- return;
650
- }
651
- Logger.customize({
652
- name: 'CLIRecipeSyncPackages.handleUnknown',
653
- purpose: 'unsupported',
654
- }).warn([
655
- `Workspace "${workspace.manifest.name}" contains unsupported "package.json" key(s).`,
656
- 'The unsupported keys are:',
657
- `- "${unknownKeys.join('"\n- "')}"`,
658
- 'Review the references below:',
659
- '- https://cbnventures.github.io/nova/docs/cli/recipes/sync-packages#unsupported-keys',
660
- ].join('\n'));
661
- for (const unknownKey of unknownKeys) {
662
- Logger.customize({
663
- name: 'CLIRecipeSyncPackages.handleUnknown',
664
- purpose: 'removal',
665
- }).info(`Removing unsupported key "${unknownKey}" from workspace "${workspace.manifest.name}".`);
666
- Reflect.deleteProperty(manifestContents, unknownKey);
667
- }
668
- }
669
- static handleOwnership(workspace, workingFile) {
670
- const { fileContents, manifest } = workspace;
671
- const packageHomepage = fileContents['homepage'];
672
- const packageBugs = fileContents['bugs'];
673
- const packageAuthor = fileContents['author'];
674
- const packageContributors = fileContents['contributors'];
675
- const packageFundingSources = fileContents['funding'];
676
- const packageRepository = fileContents['repository'];
677
- if (packageHomepage !== undefined
678
- && manifest.policy !== 'distributable') {
679
- Logger.customize({
680
- name: 'CLIRecipeSyncPackages.handleOwnership',
681
- purpose: 'homepage',
682
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "homepage". Workspace policy "${manifest.policy}" does not allow it.`);
683
- Reflect.deleteProperty(fileContents, 'homepage');
684
- }
685
- else {
686
- const validHomepage = (workingFile.urls !== undefined) ? workingFile.urls.homepage : undefined;
687
- if ((manifest.policy === 'distributable'
688
- && manifest.syncProperties !== undefined
689
- && manifest.syncProperties.includes('homepage')
690
- && validHomepage !== undefined)
691
- && (typeof packageHomepage !== 'string'
692
- || packageHomepage !== validHomepage)) {
693
- Logger.customize({
694
- name: 'CLIRecipeSyncPackages.handleOwnership',
695
- purpose: 'homepage',
696
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "homepage" from workspace manifest ...`);
697
- Reflect.set(fileContents, 'homepage', validHomepage);
698
- }
699
- if (manifest.policy === 'distributable'
700
- && manifest.syncProperties !== undefined
701
- && manifest.syncProperties.includes('homepage')
702
- && validHomepage === undefined) {
703
- Logger.customize({
704
- name: 'CLIRecipeSyncPackages.handleOwnership',
705
- purpose: 'homepage',
706
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "homepage". No homepage is defined.`);
707
- Reflect.deleteProperty(fileContents, 'homepage');
708
- }
709
- }
710
- if (packageBugs !== undefined
711
- && manifest.policy !== 'distributable') {
712
- Logger.customize({
713
- name: 'CLIRecipeSyncPackages.handleOwnership',
714
- purpose: 'bugs',
715
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "bugs". Workspace policy "${manifest.policy}" does not allow it.`);
716
- Reflect.deleteProperty(fileContents, 'bugs');
717
- }
718
- else {
719
- const validBugs = {
720
- email: (workingFile.emails !== undefined) ? workingFile.emails.bugs : undefined,
721
- url: (workingFile.urls !== undefined) ? workingFile.urls.bugs : undefined,
722
- };
723
- if ((manifest.policy === 'distributable'
724
- && manifest.syncProperties !== undefined
725
- && manifest.syncProperties.includes('bugs')
726
- && (validBugs.email !== undefined
727
- || validBugs.url !== undefined))
728
- && (JSON.stringify(packageBugs) !== JSON.stringify(validBugs))) {
729
- Logger.customize({
730
- name: 'CLIRecipeSyncPackages.handleOwnership',
731
- purpose: 'bugs',
732
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "bugs" from workspace manifest ...`);
733
- Reflect.set(fileContents, 'bugs', validBugs);
734
- }
735
- if (manifest.policy === 'distributable'
736
- && manifest.syncProperties !== undefined
737
- && manifest.syncProperties.includes('bugs')
738
- && (validBugs.email === undefined
739
- && validBugs.url === undefined)) {
740
- Logger.customize({
741
- name: 'CLIRecipeSyncPackages.handleOwnership',
742
- purpose: 'bugs',
743
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "bugs". No bug contacts are defined.`);
744
- Reflect.deleteProperty(fileContents, 'bugs');
745
- }
746
- }
747
- if (packageAuthor !== undefined
748
- && manifest.policy !== 'distributable') {
749
- Logger.customize({
750
- name: 'CLIRecipeSyncPackages.handleOwnership',
751
- purpose: 'author',
752
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "author". Workspace policy "${manifest.policy}" does not allow it.`);
753
- Reflect.deleteProperty(fileContents, 'author');
754
- }
755
- else {
756
- const validAuthor = (() => {
757
- const entity = (workingFile.entities !== undefined) ? workingFile.entities.find((entity) => {
758
- return Array.isArray(entity.roles) && entity.roles.includes('author');
759
- }) : undefined;
760
- if (entity === undefined) {
761
- return {
762
- name: undefined,
763
- email: undefined,
764
- url: undefined,
765
- };
766
- }
767
- return {
768
- name: entity.name,
769
- email: entity.email,
770
- url: entity.url,
771
- };
772
- })();
773
- if ((manifest.policy === 'distributable'
774
- && manifest.syncProperties !== undefined
775
- && manifest.syncProperties.includes('author')
776
- && (validAuthor.name !== undefined
777
- || validAuthor.email !== undefined
778
- || validAuthor.url !== undefined))
779
- && (JSON.stringify(packageAuthor) !== JSON.stringify(validAuthor))) {
780
- Logger.customize({
781
- name: 'CLIRecipeSyncPackages.handleOwnership',
782
- purpose: 'author',
783
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "author" from workspace manifest ...`);
784
- Reflect.set(fileContents, 'author', validAuthor);
785
- }
786
- if (manifest.policy === 'distributable'
787
- && manifest.syncProperties !== undefined
788
- && manifest.syncProperties.includes('author')
789
- && (validAuthor.name === undefined
790
- && validAuthor.email === undefined
791
- && validAuthor.url === undefined)) {
792
- Logger.customize({
793
- name: 'CLIRecipeSyncPackages.handleOwnership',
794
- purpose: 'author',
795
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "author". No author is defined.`);
796
- Reflect.deleteProperty(fileContents, 'author');
797
- }
798
- }
799
- if (packageContributors !== undefined
800
- && manifest.policy !== 'distributable') {
801
- Logger.customize({
802
- name: 'CLIRecipeSyncPackages.handleOwnership',
803
- purpose: 'contributors',
804
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "contributors". Workspace policy "${manifest.policy}" does not allow it.`);
805
- Reflect.deleteProperty(fileContents, 'contributors');
806
- }
807
- else {
808
- const validContributors = (() => {
809
- const entities = workingFile.entities ?? [];
810
- return entities
811
- .filter((entity) => Array.isArray(entity.roles) && entity.roles.includes('contributor'))
812
- .map((entity) => ({
813
- name: entity.name,
814
- email: entity.email,
815
- url: entity.url,
816
- }))
817
- .filter((entity) => entity.name !== undefined || entity.email !== undefined || entity.url !== undefined);
818
- })();
819
- if ((manifest.policy === 'distributable'
820
- && manifest.syncProperties !== undefined
821
- && manifest.syncProperties.includes('contributors')
822
- && (validContributors.length > 0))
823
- && (JSON.stringify(packageContributors) !== JSON.stringify(validContributors))) {
824
- Logger.customize({
825
- name: 'CLIRecipeSyncPackages.handleOwnership',
826
- purpose: 'contributors',
827
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "contributors" from workspace manifest ...`);
828
- Reflect.set(fileContents, 'contributors', validContributors);
829
- }
830
- if (manifest.policy === 'distributable'
831
- && manifest.syncProperties !== undefined
832
- && manifest.syncProperties.includes('contributors')
833
- && (validContributors.length === 0)) {
834
- Logger.customize({
835
- name: 'CLIRecipeSyncPackages.handleOwnership',
836
- purpose: 'contributors',
837
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "contributors". No contributors are defined.`);
838
- Reflect.deleteProperty(fileContents, 'contributors');
839
- }
840
- }
841
- if (packageFundingSources !== undefined
842
- && manifest.policy !== 'distributable') {
843
- Logger.customize({
844
- name: 'CLIRecipeSyncPackages.handleOwnership',
845
- purpose: 'funding',
846
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "funding". Workspace policy "${manifest.policy}" does not allow it.`);
847
- Reflect.deleteProperty(fileContents, 'funding');
848
- }
849
- else {
850
- const validFundingSources = (workingFile.urls !== undefined) ? workingFile.urls.fundSources : undefined;
851
- if ((manifest.policy === 'distributable'
852
- && manifest.syncProperties !== undefined
853
- && manifest.syncProperties.includes('funding')
854
- && validFundingSources !== undefined)
855
- && (JSON.stringify(packageFundingSources) !== JSON.stringify(validFundingSources))) {
856
- Logger.customize({
857
- name: 'CLIRecipeSyncPackages.handleOwnership',
858
- purpose: 'funding',
859
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "funding" from workspace manifest ...`);
860
- Reflect.set(fileContents, 'funding', validFundingSources);
861
- }
862
- if (manifest.policy === 'distributable'
863
- && manifest.syncProperties !== undefined
864
- && manifest.syncProperties.includes('funding')
865
- && validFundingSources === undefined) {
866
- Logger.customize({
867
- name: 'CLIRecipeSyncPackages.handleOwnership',
868
- purpose: 'funding',
869
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "funding". No funding sources are defined.`);
870
- Reflect.deleteProperty(fileContents, 'funding');
871
- }
872
- }
873
- if (packageRepository !== undefined
874
- && manifest.policy !== 'distributable') {
875
- Logger.customize({
876
- name: 'CLIRecipeSyncPackages.handleOwnership',
877
- purpose: 'repository',
878
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "repository". Workspace policy "${manifest.policy}" does not allow it.`);
879
- Reflect.deleteProperty(fileContents, 'repository');
880
- }
881
- else {
882
- const validRepository = (() => {
883
- const repositoryUrl = (workingFile.urls !== undefined) ? workingFile.urls.repository : undefined;
884
- if (repositoryUrl === undefined) {
885
- return undefined;
886
- }
887
- const projectRoot = process.cwd();
888
- const packageDirectory = dirname(workspace.filePath);
889
- const repositoryDirectory = relative(projectRoot, packageDirectory).replaceAll(sep, '/');
890
- return {
891
- type: 'git',
892
- url: repositoryUrl,
893
- ...(repositoryDirectory !== '' && repositoryDirectory !== '.' ? {
894
- directory: repositoryDirectory,
895
- } : {}),
896
- };
897
- })();
898
- if ((manifest.policy === 'distributable'
899
- && manifest.syncProperties !== undefined
900
- && manifest.syncProperties.includes('repository')
901
- && validRepository !== undefined)
902
- && (JSON.stringify(packageRepository) !== JSON.stringify(validRepository))) {
903
- Logger.customize({
904
- name: 'CLIRecipeSyncPackages.handleOwnership',
905
- purpose: 'repository',
906
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "repository" from workspace manifest ...`);
907
- Reflect.set(fileContents, 'repository', validRepository);
908
- }
909
- if (manifest.policy === 'distributable'
910
- && manifest.syncProperties !== undefined
911
- && manifest.syncProperties.includes('repository')
912
- && validRepository === undefined) {
913
- Logger.customize({
914
- name: 'CLIRecipeSyncPackages.handleOwnership',
915
- purpose: 'repository',
916
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "repository". No repository url is defined.`);
917
- Reflect.deleteProperty(fileContents, 'repository');
918
- }
919
- }
920
- }
921
- static handleRuntime(workspace) {
922
- const { fileContents, manifest } = workspace;
923
- const packageExports = fileContents['exports'];
924
- const packageMain = fileContents['main'];
925
- const packageType = fileContents['type'];
926
- const packageBrowser = fileContents['browser'];
927
- const packageImports = fileContents['imports'];
928
- if (packageExports !== undefined
929
- && !['config', 'package', 'tool'].includes(manifest.role)) {
930
- Logger.customize({
931
- name: 'CLIRecipeSyncPackages.handleRuntime',
932
- purpose: 'exports',
933
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "exports". Workspace role "${manifest.role}" does not allow it.`);
934
- Reflect.deleteProperty(fileContents, 'exports');
935
- }
936
- else {
937
- if (manifest.role === 'config'
938
- || manifest.role === 'package'
939
- || manifest.role === 'tool') {
940
- if (typeof packageExports === 'string') {
941
- Logger.customize({
942
- name: 'CLIRecipeSyncPackages.handleRuntime',
943
- purpose: 'exports',
944
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Normalizing "exports" from string to object ...`);
945
- Reflect.set(fileContents, 'exports', {
946
- '.': {
947
- default: packageExports,
948
- },
949
- });
950
- }
951
- }
952
- }
953
- if (packageMain !== undefined
954
- && !['config', 'app', 'package', 'tool'].includes(manifest.role)) {
955
- Logger.customize({
956
- name: 'CLIRecipeSyncPackages.handleRuntime',
957
- purpose: 'main',
958
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "main". Workspace role "${manifest.role}" does not allow it.`);
959
- Reflect.deleteProperty(fileContents, 'main');
960
- }
961
- else {
962
- if (manifest.role === 'config'
963
- || manifest.role === 'app'
964
- || manifest.role === 'package'
965
- || manifest.role === 'tool') {
966
- const currentPackageExports = fileContents['exports'];
967
- if (typeof packageMain === 'string'
968
- && (isPlainObject(currentPackageExports)
969
- && isPlainObject(currentPackageExports['.'])
970
- && typeof currentPackageExports['.']['require'] === 'string')
971
- && packageMain !== currentPackageExports['.']['require']) {
972
- Logger.customize({
973
- name: 'CLIRecipeSyncPackages.handleRuntime',
974
- purpose: 'main',
975
- }).warn(`${chalk.magenta(`"${manifest.name}" workspace`)} → "main" differs from "exports['.'].require". No changes applied.`);
976
- }
977
- else if (typeof packageMain === 'string'
978
- && (isPlainObject(currentPackageExports)
979
- && isPlainObject(currentPackageExports['.']))
980
- && typeof currentPackageExports['.']['require'] !== 'string') {
981
- Logger.customize({
982
- name: 'CLIRecipeSyncPackages.handleRuntime',
983
- purpose: 'main',
984
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "exports['.'].require" from "main" ...`);
985
- Reflect.set(currentPackageExports['.'], 'require', packageMain);
986
- }
987
- else if ((isPlainObject(currentPackageExports)
988
- && isPlainObject(currentPackageExports['.'])
989
- && typeof currentPackageExports['.']['require'] === 'string')
990
- && typeof packageMain !== 'string') {
991
- Logger.customize({
992
- name: 'CLIRecipeSyncPackages.handleRuntime',
993
- purpose: 'main',
994
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "main" from "exports['.'].require" ...`);
995
- Reflect.set(fileContents, 'main', currentPackageExports['.']['require']);
996
- }
997
- else if (typeof packageMain === 'string'
998
- && isPlainObject(currentPackageExports)
999
- && typeof currentPackageExports['.'] === 'string') {
1000
- Logger.customize({
1001
- name: 'CLIRecipeSyncPackages.handleRuntime',
1002
- purpose: 'main',
1003
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Normalizing "exports['.']" from string to object ...`);
1004
- Reflect.set(currentPackageExports, '.', {
1005
- default: currentPackageExports['.'],
1006
- require: packageMain,
1007
- });
1008
- }
1009
- }
1010
- }
1011
- if (packageType !== undefined
1012
- && !['config', 'app', 'package', 'tool'].includes(manifest.role)) {
1013
- Logger.customize({
1014
- name: 'CLIRecipeSyncPackages.handleRuntime',
1015
- purpose: 'type',
1016
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "type". Workspace role "${manifest.role}" does not allow it.`);
1017
- Reflect.deleteProperty(fileContents, 'type');
1018
- }
1019
- if (packageBrowser !== undefined
1020
- && !['package'].includes(manifest.role)) {
1021
- Logger.customize({
1022
- name: 'CLIRecipeSyncPackages.handleRuntime',
1023
- purpose: 'browser',
1024
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "browser". Workspace role "${manifest.role}" does not allow it.`);
1025
- Reflect.deleteProperty(fileContents, 'browser');
1026
- }
1027
- else {
1028
- if (manifest.role === 'package') {
1029
- const currentPackageExports = fileContents['exports'];
1030
- if (typeof packageBrowser === 'string'
1031
- && (isPlainObject(currentPackageExports)
1032
- && isPlainObject(currentPackageExports['.'])
1033
- && typeof currentPackageExports['.']['browser'] === 'string')
1034
- && packageBrowser !== currentPackageExports['.']['browser']) {
1035
- Logger.customize({
1036
- name: 'CLIRecipeSyncPackages.handleRuntime',
1037
- purpose: 'browser',
1038
- }).warn(`${chalk.magenta(`"${manifest.name}" workspace`)} → "browser" differs from "exports['.'].browser". No changes applied.`);
1039
- }
1040
- else if (typeof packageBrowser === 'string'
1041
- && (isPlainObject(currentPackageExports)
1042
- && isPlainObject(currentPackageExports['.']))
1043
- && typeof currentPackageExports['.']['browser'] !== 'string') {
1044
- Logger.customize({
1045
- name: 'CLIRecipeSyncPackages.handleRuntime',
1046
- purpose: 'browser',
1047
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "exports['.'].browser" from "browser" ...`);
1048
- Reflect.set(currentPackageExports['.'], 'browser', packageBrowser);
1049
- }
1050
- else if ((isPlainObject(currentPackageExports)
1051
- && isPlainObject(currentPackageExports['.'])
1052
- && typeof currentPackageExports['.']['browser'] === 'string')
1053
- && typeof packageBrowser !== 'string'
1054
- && !isPlainObject(packageBrowser)) {
1055
- Logger.customize({
1056
- name: 'CLIRecipeSyncPackages.handleRuntime',
1057
- purpose: 'browser',
1058
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Syncing "browser" from "exports['.'].browser" ...`);
1059
- Reflect.set(fileContents, 'browser', currentPackageExports['.']['browser']);
1060
- }
1061
- else if (typeof packageBrowser === 'string'
1062
- && isPlainObject(currentPackageExports)
1063
- && typeof currentPackageExports['.'] === 'string') {
1064
- Logger.customize({
1065
- name: 'CLIRecipeSyncPackages.handleRuntime',
1066
- purpose: 'browser',
1067
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Normalizing "exports['.']" from string to object ...`);
1068
- Reflect.set(currentPackageExports, '.', {
1069
- default: currentPackageExports['.'],
1070
- browser: packageBrowser,
1071
- });
1072
- }
1073
- }
1074
- }
1075
- if (packageImports !== undefined
1076
- && !['config', 'app', 'package', 'tool'].includes(manifest.role)) {
1077
- Logger.customize({
1078
- name: 'CLIRecipeSyncPackages.handleRuntime',
1079
- purpose: 'imports',
1080
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "imports". Workspace role "${manifest.role}" does not allow it.`);
1081
- Reflect.deleteProperty(fileContents, 'imports');
1082
- }
1083
- }
1084
- static handleCorepack(workspace) {
1085
- const { fileContents, manifest } = workspace;
1086
- const packageManager = fileContents['packageManager'];
1087
- if (packageManager !== undefined
1088
- && manifest.role !== 'project') {
1089
- Logger.customize({
1090
- name: 'CLIRecipeSyncPackages.handleCorepack',
1091
- purpose: 'packageManager',
1092
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "packageManager". Workspace role "${manifest.role}" does not allow it.`);
1093
- Reflect.deleteProperty(fileContents, 'packageManager');
1094
- }
1095
- else {
1096
- if (manifest.role === 'project'
1097
- && packageManager !== undefined
1098
- && (typeof packageManager !== 'string'
1099
- || !PATTERN_NAME_AT_VERSION.test(packageManager))) {
1100
- Logger.customize({
1101
- name: 'CLIRecipeSyncPackages.handleCorepack',
1102
- purpose: 'packageManager',
1103
- }).warn(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "packageManager". Invalid format detected.`);
1104
- Reflect.deleteProperty(fileContents, 'packageManager');
1105
- }
1106
- }
1107
- }
1108
- static handleBundler(workspace) {
1109
- const { fileContents, manifest } = workspace;
1110
- const packageTypes = fileContents['types'];
1111
- const packageTypings = fileContents['typings'];
1112
- const packageModule = fileContents['module'];
1113
- const packageSideEffects = fileContents['sideEffects'];
1114
- const packageEsnext = fileContents['esnext'];
1115
- if (packageTypings !== undefined) {
1116
- if (packageTypes !== undefined) {
1117
- Logger.customize({
1118
- name: 'CLIRecipeSyncPackages.handleBundler',
1119
- purpose: 'typings',
1120
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Merging "typings" into "types". Keeping existing "types" value.`);
1121
- }
1122
- else {
1123
- Logger.customize({
1124
- name: 'CLIRecipeSyncPackages.handleBundler',
1125
- purpose: 'typings',
1126
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Renaming "typings" to "types" ...`);
1127
- Reflect.set(fileContents, 'types', packageTypings);
1128
- }
1129
- Reflect.deleteProperty(fileContents, 'typings');
1130
- }
1131
- const allowsTypesModule = ['config', 'package', 'tool'].includes(manifest.role);
1132
- const allowsSideEffectsEsnext = ['package'].includes(manifest.role);
1133
- if (fileContents['types'] !== undefined
1134
- && !allowsTypesModule) {
1135
- Logger.customize({
1136
- name: 'CLIRecipeSyncPackages.handleBundler',
1137
- purpose: 'types',
1138
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "types". Workspace role "${manifest.role}" does not allow it.`);
1139
- Reflect.deleteProperty(fileContents, 'types');
1140
- }
1141
- if (packageModule !== undefined
1142
- && !allowsTypesModule) {
1143
- Logger.customize({
1144
- name: 'CLIRecipeSyncPackages.handleBundler',
1145
- purpose: 'module',
1146
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "module". Workspace role "${manifest.role}" does not allow it.`);
1147
- Reflect.deleteProperty(fileContents, 'module');
1148
- }
1149
- if (packageSideEffects !== undefined
1150
- && !allowsSideEffectsEsnext) {
1151
- Logger.customize({
1152
- name: 'CLIRecipeSyncPackages.handleBundler',
1153
- purpose: 'sideEffects',
1154
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "sideEffects". Workspace role "${manifest.role}" does not allow it.`);
1155
- Reflect.deleteProperty(fileContents, 'sideEffects');
1156
- }
1157
- if (packageEsnext !== undefined
1158
- && !allowsSideEffectsEsnext) {
1159
- Logger.customize({
1160
- name: 'CLIRecipeSyncPackages.handleBundler',
1161
- purpose: 'esnext',
1162
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Removing "esnext". Workspace role "${manifest.role}" does not allow it.`);
1163
- Reflect.deleteProperty(fileContents, 'esnext');
1164
- }
1165
- }
1166
- static handleReorder(workspace) {
1167
- const { fileContents, manifest } = workspace;
1168
- const sortedKeys = new Set(itemPackageJsonSortOrder);
1169
- const currentKeys = Object.keys(fileContents);
1170
- const reordered = {};
1171
- for (const key of itemPackageJsonSortOrder) {
1172
- if (key in fileContents) {
1173
- reordered[key] = fileContents[key];
1174
- }
1175
- }
1176
- for (const key of currentKeys) {
1177
- if (!sortedKeys.has(key)) {
1178
- reordered[key] = fileContents[key];
1179
- }
1180
- }
1181
- const reorderedKeys = Object.keys(reordered);
1182
- if (currentKeys.every((key, index) => key === reorderedKeys[index])) {
1183
- return;
1184
- }
1185
- Logger.customize({
1186
- name: 'CLIRecipeSyncPackages.handleReorder',
1187
- purpose: 'reorder',
1188
- }).info(`${chalk.magenta(`"${manifest.name}" workspace`)} → Reordering "package.json" keys ...`);
1189
- for (const key of currentKeys) {
1190
- Reflect.deleteProperty(fileContents, key);
1191
- }
1192
- for (const [key, value] of Object.entries(reordered)) {
1193
- Reflect.set(fileContents, key, value);
1194
- }
1195
- }
1196
- static isEmpty(value) {
1197
- if (value === null || value === undefined) {
1198
- return true;
1199
- }
1200
- if (typeof value === 'string') {
1201
- return value.trim() === '';
1202
- }
1203
- if (Array.isArray(value)) {
1204
- return value.length === 0;
1205
- }
1206
- if (typeof value === 'object') {
1207
- return Object.keys(value).length === 0;
1208
- }
1209
- return false;
1210
- }
1211
- }
1212
- //# sourceMappingURL=sync-packages.js.map