@cbnventures/nova 0.19.0 → 0.21.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 (536) hide show
  1. package/README.md +10 -0
  2. package/bin/nova.mjs +3 -3
  3. package/build/package.json +14 -10
  4. package/build/src/cli/generate/github/funding.js +2 -2
  5. package/build/src/cli/generate/github/funding.js.map +1 -1
  6. package/build/src/cli/generate/github/issue-template.d.ts.map +1 -1
  7. package/build/src/cli/generate/github/issue-template.js +6 -95
  8. package/build/src/cli/generate/github/issue-template.js.map +1 -1
  9. package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts +12 -0
  10. package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts.map +1 -0
  11. package/build/src/cli/generate/github/workflows-blueprint-validate.js +535 -0
  12. package/build/src/cli/generate/github/workflows-blueprint-validate.js.map +1 -0
  13. package/build/src/cli/generate/github/workflows-blueprint-variables.d.ts +9 -0
  14. package/build/src/cli/generate/github/workflows-blueprint-variables.d.ts.map +1 -0
  15. package/build/src/cli/generate/github/workflows-blueprint-variables.js +117 -0
  16. package/build/src/cli/generate/github/workflows-blueprint-variables.js.map +1 -0
  17. package/build/src/cli/generate/github/workflows-blueprint.d.ts +60 -0
  18. package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -0
  19. package/build/src/cli/generate/github/workflows-blueprint.js +2251 -0
  20. package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -0
  21. package/build/src/cli/generate/must-haves/agent-conventions.d.ts.map +1 -1
  22. package/build/src/cli/generate/must-haves/agent-conventions.js +14 -5
  23. package/build/src/cli/generate/must-haves/agent-conventions.js.map +1 -1
  24. package/build/src/cli/generate/must-haves/dotenv.d.ts +5 -7
  25. package/build/src/cli/generate/must-haves/dotenv.d.ts.map +1 -1
  26. package/build/src/cli/generate/must-haves/dotenv.js +146 -417
  27. package/build/src/cli/generate/must-haves/dotenv.js.map +1 -1
  28. package/build/src/cli/generate/must-haves/editorconfig.js +2 -2
  29. package/build/src/cli/generate/must-haves/editorconfig.js.map +1 -1
  30. package/build/src/cli/generate/must-haves/gitignore.d.ts +0 -8
  31. package/build/src/cli/generate/must-haves/gitignore.d.ts.map +1 -1
  32. package/build/src/cli/generate/must-haves/gitignore.js +9 -397
  33. package/build/src/cli/generate/must-haves/gitignore.js.map +1 -1
  34. package/build/src/cli/generate/must-haves/license.d.ts.map +1 -1
  35. package/build/src/cli/generate/must-haves/license.js +4 -4
  36. package/build/src/cli/generate/must-haves/license.js.map +1 -1
  37. package/build/src/cli/generate/must-haves/read-me.d.ts +6 -2
  38. package/build/src/cli/generate/must-haves/read-me.d.ts.map +1 -1
  39. package/build/src/cli/generate/must-haves/read-me.js +103 -63
  40. package/build/src/cli/generate/must-haves/read-me.js.map +1 -1
  41. package/build/src/cli/index.js +108 -2
  42. package/build/src/cli/index.js.map +1 -1
  43. package/build/src/cli/recipe/github/sync-features.d.ts.map +1 -1
  44. package/build/src/cli/recipe/github/sync-features.js +5 -3
  45. package/build/src/cli/recipe/github/sync-features.js.map +1 -1
  46. package/build/src/cli/recipe/github/sync-identity.d.ts.map +1 -1
  47. package/build/src/cli/recipe/github/sync-identity.js +6 -4
  48. package/build/src/cli/recipe/github/sync-identity.js.map +1 -1
  49. package/build/src/cli/recipe/github/sync-policies.d.ts.map +1 -1
  50. package/build/src/cli/recipe/github/sync-policies.js +13 -4
  51. package/build/src/cli/recipe/github/sync-policies.js.map +1 -1
  52. package/build/src/cli/recipe/index.d.ts.map +1 -1
  53. package/build/src/cli/recipe/index.js +32 -0
  54. package/build/src/cli/recipe/index.js.map +1 -1
  55. package/build/src/cli/recipe/license/update-copyright.d.ts +7 -0
  56. package/build/src/cli/recipe/license/update-copyright.d.ts.map +1 -0
  57. package/build/src/cli/recipe/license/update-copyright.js +191 -0
  58. package/build/src/cli/recipe/license/update-copyright.js.map +1 -0
  59. package/build/src/cli/recipe/package-json/cleanup.d.ts.map +1 -1
  60. package/build/src/cli/recipe/package-json/cleanup.js +14 -13
  61. package/build/src/cli/recipe/package-json/cleanup.js.map +1 -1
  62. package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -1
  63. package/build/src/cli/recipe/package-json/normalize-artifacts.js +11 -6
  64. package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -1
  65. package/build/src/cli/recipe/package-json/normalize-bundler.d.ts.map +1 -1
  66. package/build/src/cli/recipe/package-json/normalize-bundler.js +11 -6
  67. package/build/src/cli/recipe/package-json/normalize-bundler.js.map +1 -1
  68. package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -1
  69. package/build/src/cli/recipe/package-json/normalize-dependencies.js +18 -10
  70. package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -1
  71. package/build/src/cli/recipe/package-json/normalize-modules.d.ts.map +1 -1
  72. package/build/src/cli/recipe/package-json/normalize-modules.js +11 -6
  73. package/build/src/cli/recipe/package-json/normalize-modules.js.map +1 -1
  74. package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
  75. package/build/src/cli/recipe/package-json/normalize-tooling.js +12 -7
  76. package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
  77. package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -1
  78. package/build/src/cli/recipe/package-json/sync-environment.js +46 -14
  79. package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -1
  80. package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -1
  81. package/build/src/cli/recipe/package-json/sync-identity.js +29 -16
  82. package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -1
  83. package/build/src/cli/recipe/package-json/sync-ownership.d.ts.map +1 -1
  84. package/build/src/cli/recipe/package-json/sync-ownership.js +18 -11
  85. package/build/src/cli/recipe/package-json/sync-ownership.js.map +1 -1
  86. package/build/src/cli/recipe/read-me/update-badges.d.ts +6 -0
  87. package/build/src/cli/recipe/read-me/update-badges.d.ts.map +1 -0
  88. package/build/src/cli/recipe/read-me/update-badges.js +115 -0
  89. package/build/src/cli/recipe/read-me/update-badges.js.map +1 -0
  90. package/build/src/cli/recipe/read-me/update-credits.d.ts +6 -0
  91. package/build/src/cli/recipe/read-me/update-credits.d.ts.map +1 -0
  92. package/build/src/cli/recipe/read-me/update-credits.js +115 -0
  93. package/build/src/cli/recipe/read-me/update-credits.js.map +1 -0
  94. package/build/src/cli/recipe/read-me/update-documentation.d.ts +6 -0
  95. package/build/src/cli/recipe/read-me/update-documentation.d.ts.map +1 -0
  96. package/build/src/cli/recipe/read-me/update-documentation.js +115 -0
  97. package/build/src/cli/recipe/read-me/update-documentation.js.map +1 -0
  98. package/build/src/cli/recipe/read-me/update-header.d.ts +6 -0
  99. package/build/src/cli/recipe/read-me/update-header.d.ts.map +1 -0
  100. package/build/src/cli/recipe/read-me/update-header.js +115 -0
  101. package/build/src/cli/recipe/read-me/update-header.js.map +1 -0
  102. package/build/src/cli/recipe/read-me/update-introduction.d.ts +6 -0
  103. package/build/src/cli/recipe/read-me/update-introduction.d.ts.map +1 -0
  104. package/build/src/cli/recipe/read-me/update-introduction.js +115 -0
  105. package/build/src/cli/recipe/read-me/update-introduction.js.map +1 -0
  106. package/build/src/cli/scaffold/starter/base.js +1 -1
  107. package/build/src/cli/scaffold/starter/base.js.map +1 -1
  108. package/build/src/cli/utility/changelog.d.ts +2 -0
  109. package/build/src/cli/utility/changelog.d.ts.map +1 -1
  110. package/build/src/cli/utility/changelog.js +159 -3
  111. package/build/src/cli/utility/changelog.js.map +1 -1
  112. package/build/src/cli/utility/initialize.d.ts +9 -0
  113. package/build/src/cli/utility/initialize.d.ts.map +1 -1
  114. package/build/src/cli/utility/initialize.js +978 -111
  115. package/build/src/cli/utility/initialize.js.map +1 -1
  116. package/build/src/cli/utility/run-scripts.d.ts.map +1 -1
  117. package/build/src/cli/utility/run-scripts.js +4 -4
  118. package/build/src/cli/utility/run-scripts.js.map +1 -1
  119. package/build/src/cli/utility/transpile.js +1 -1
  120. package/build/src/cli/utility/transpile.js.map +1 -1
  121. package/build/src/cli/utility/type-check.js +1 -1
  122. package/build/src/cli/utility/type-check.js.map +1 -1
  123. package/build/src/cli/utility/version.js +1 -1
  124. package/build/src/cli/utility/version.js.map +1 -1
  125. package/build/src/lib/dotenv.d.ts +3 -0
  126. package/build/src/lib/dotenv.d.ts.map +1 -0
  127. package/build/src/lib/dotenv.js +66 -0
  128. package/build/src/lib/dotenv.js.map +1 -0
  129. package/build/src/lib/env-github.d.ts +4 -0
  130. package/build/src/lib/env-github.d.ts.map +1 -0
  131. package/build/src/lib/env-github.js +57 -0
  132. package/build/src/lib/env-github.js.map +1 -0
  133. package/build/src/lib/env-managed-set.d.ts +3 -0
  134. package/build/src/lib/env-managed-set.d.ts.map +1 -0
  135. package/build/src/lib/env-managed-set.js +102 -0
  136. package/build/src/lib/env-managed-set.js.map +1 -0
  137. package/build/src/lib/env-namespace.d.ts +3 -0
  138. package/build/src/lib/env-namespace.d.ts.map +1 -0
  139. package/build/src/lib/env-namespace.js +11 -0
  140. package/build/src/lib/env-namespace.js.map +1 -0
  141. package/build/src/lib/env-reconcile.d.ts +3 -0
  142. package/build/src/lib/env-reconcile.d.ts.map +1 -0
  143. package/build/src/lib/env-reconcile.js +109 -0
  144. package/build/src/lib/env-reconcile.js.map +1 -0
  145. package/build/src/lib/env-status.d.ts +3 -0
  146. package/build/src/lib/env-status.d.ts.map +1 -0
  147. package/build/src/lib/env-status.js +113 -0
  148. package/build/src/lib/env-status.js.map +1 -0
  149. package/build/src/lib/file-discovery.d.ts +3 -0
  150. package/build/src/lib/file-discovery.d.ts.map +1 -0
  151. package/build/src/lib/file-discovery.js +32 -0
  152. package/build/src/lib/file-discovery.js.map +1 -0
  153. package/build/src/lib/item.d.ts +4 -1
  154. package/build/src/lib/item.d.ts.map +1 -1
  155. package/build/src/lib/item.js +35 -0
  156. package/build/src/lib/item.js.map +1 -1
  157. package/build/src/lib/markdown-slug.d.ts +4 -0
  158. package/build/src/lib/markdown-slug.d.ts.map +1 -0
  159. package/build/src/lib/markdown-slug.js +25 -0
  160. package/build/src/lib/markdown-slug.js.map +1 -0
  161. package/build/src/lib/nova-config.d.ts +14 -2
  162. package/build/src/lib/nova-config.d.ts.map +1 -1
  163. package/build/src/lib/nova-config.js +507 -78
  164. package/build/src/lib/nova-config.js.map +1 -1
  165. package/build/src/lib/read-me-regions.d.ts +4 -0
  166. package/build/src/lib/read-me-regions.d.ts.map +1 -0
  167. package/build/src/lib/read-me-regions.js +33 -0
  168. package/build/src/lib/read-me-regions.js.map +1 -0
  169. package/build/src/lib/regex.d.ts +73 -0
  170. package/build/src/lib/regex.d.ts.map +1 -1
  171. package/build/src/lib/regex.js +75 -2
  172. package/build/src/lib/regex.js.map +1 -1
  173. package/build/src/lib/scaffold.d.ts.map +1 -1
  174. package/build/src/lib/scaffold.js +33 -14
  175. package/build/src/lib/scaffold.js.map +1 -1
  176. package/build/src/lib/type-declaration-engine.d.ts +32 -0
  177. package/build/src/lib/type-declaration-engine.d.ts.map +1 -0
  178. package/build/src/lib/type-declaration-engine.js +796 -0
  179. package/build/src/lib/type-declaration-engine.js.map +1 -0
  180. package/build/src/lib/utility.d.ts +2 -1
  181. package/build/src/lib/utility.d.ts.map +1 -1
  182. package/build/src/lib/utility.js +47 -15
  183. package/build/src/lib/utility.js.map +1 -1
  184. package/build/src/lib/workflow-templates.d.ts.map +1 -1
  185. package/build/src/lib/workflow-templates.js +86 -60
  186. package/build/src/lib/workflow-templates.js.map +1 -1
  187. package/build/src/presets/eslint/dx-code-style.d.ts.map +1 -1
  188. package/build/src/presets/eslint/dx-code-style.js +6 -0
  189. package/build/src/presets/eslint/dx-code-style.js.map +1 -1
  190. package/build/src/presets/eslint/fw-astro.d.ts +4 -0
  191. package/build/src/presets/eslint/fw-astro.d.ts.map +1 -0
  192. package/build/src/presets/eslint/fw-astro.js +13 -0
  193. package/build/src/presets/eslint/fw-astro.js.map +1 -0
  194. package/build/src/presets/eslint/index.d.ts +1 -0
  195. package/build/src/presets/eslint/index.d.ts.map +1 -1
  196. package/build/src/presets/eslint/index.js +1 -0
  197. package/build/src/presets/eslint/index.js.map +1 -1
  198. package/build/src/presets/tsconfig/fw-astro.json +15 -0
  199. package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts.map +1 -1
  200. package/build/src/rules/eslint/conventions/no-implicit-boolean.js +3 -2
  201. package/build/src/rules/eslint/conventions/no-implicit-boolean.js.map +1 -1
  202. package/build/src/rules/eslint/conventions/require-hash-private.js +1 -1
  203. package/build/src/rules/eslint/conventions/require-hash-private.js.map +1 -1
  204. package/build/src/rules/eslint/conventions/require-kebab-case-filename.d.ts.map +1 -1
  205. package/build/src/rules/eslint/conventions/require-kebab-case-filename.js +4 -1
  206. package/build/src/rules/eslint/conventions/require-kebab-case-filename.js.map +1 -1
  207. package/build/src/rules/eslint/conventions/require-node-protocol.d.ts +11 -0
  208. package/build/src/rules/eslint/conventions/require-node-protocol.d.ts.map +1 -0
  209. package/build/src/rules/eslint/conventions/require-node-protocol.js +76 -0
  210. package/build/src/rules/eslint/conventions/require-node-protocol.js.map +1 -0
  211. package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts.map +1 -1
  212. package/build/src/rules/eslint/formatting/no-raw-text-in-code.js +2 -1
  213. package/build/src/rules/eslint/formatting/no-raw-text-in-code.js.map +1 -1
  214. package/build/src/rules/eslint/formatting/require-padding-lines.d.ts.map +1 -1
  215. package/build/src/rules/eslint/formatting/require-padding-lines.js +7 -3
  216. package/build/src/rules/eslint/formatting/require-padding-lines.js.map +1 -1
  217. package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts.map +1 -1
  218. package/build/src/rules/eslint/formatting/require-ternary-parens.js +7 -17
  219. package/build/src/rules/eslint/formatting/require-ternary-parens.js.map +1 -1
  220. package/build/src/rules/eslint/index.d.ts +4 -0
  221. package/build/src/rules/eslint/index.d.ts.map +1 -1
  222. package/build/src/rules/eslint/index.js +4 -0
  223. package/build/src/rules/eslint/index.js.map +1 -1
  224. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts +3 -2
  225. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts.map +1 -1
  226. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js +22 -0
  227. package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js.map +1 -1
  228. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +2 -1
  229. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts.map +1 -1
  230. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js +19 -4
  231. package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js.map +1 -1
  232. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts.map +1 -1
  233. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js +3 -2
  234. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js.map +1 -1
  235. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts.map +1 -1
  236. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js +10 -6
  237. package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js.map +1 -1
  238. package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.d.ts +12 -0
  239. package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.d.ts.map +1 -0
  240. package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.js +169 -0
  241. package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.js.map +1 -0
  242. package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.d.ts +11 -0
  243. package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.d.ts.map +1 -0
  244. package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.js +80 -0
  245. package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.js.map +1 -0
  246. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts +1 -1
  247. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts.map +1 -1
  248. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js +102 -6
  249. package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js.map +1 -1
  250. package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts +15 -0
  251. package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts.map +1 -0
  252. package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.js +290 -0
  253. package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.js.map +1 -0
  254. package/build/src/rules/eslint/patterns/no-await-in-loop.js +1 -1
  255. package/build/src/rules/eslint/patterns/no-await-in-loop.js.map +1 -1
  256. package/build/src/rules/eslint/patterns/no-bracket-method-call.d.ts.map +1 -1
  257. package/build/src/rules/eslint/patterns/no-bracket-method-call.js +4 -0
  258. package/build/src/rules/eslint/patterns/no-bracket-method-call.js.map +1 -1
  259. package/build/src/rules/eslint/regex/no-regex-literals.d.ts +1 -0
  260. package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -1
  261. package/build/src/rules/eslint/regex/no-regex-literals.js +39 -1
  262. package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -1
  263. package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts.map +1 -1
  264. package/build/src/rules/eslint/typescript/no-inline-type-annotation.js +4 -1
  265. package/build/src/rules/eslint/typescript/no-inline-type-annotation.js.map +1 -1
  266. package/build/src/rules/eslint/typescript/require-bracket-property-access.d.ts.map +1 -1
  267. package/build/src/rules/eslint/typescript/require-bracket-property-access.js +8 -1
  268. package/build/src/rules/eslint/typescript/require-bracket-property-access.js.map +1 -1
  269. package/build/src/rules/eslint/typescript/require-type-naming.js +2 -2
  270. package/build/src/rules/eslint/typescript/require-type-naming.js.map +1 -1
  271. package/build/src/rules/vitest/active-vitest.d.ts +5 -0
  272. package/build/src/rules/vitest/active-vitest.d.ts.map +1 -0
  273. package/build/src/rules/vitest/active-vitest.js +19 -0
  274. package/build/src/rules/vitest/active-vitest.js.map +1 -0
  275. package/build/src/rules/vitest/dotenv/register.d.ts +3 -0
  276. package/build/src/rules/vitest/dotenv/register.d.ts.map +1 -0
  277. package/build/src/rules/vitest/dotenv/register.js +22 -0
  278. package/build/src/rules/vitest/dotenv/register.js.map +1 -0
  279. package/build/src/rules/vitest/dotenv/rules.d.ts +3 -0
  280. package/build/src/rules/vitest/dotenv/rules.d.ts.map +1 -0
  281. package/build/src/rules/vitest/dotenv/rules.js +32 -0
  282. package/build/src/rules/vitest/dotenv/rules.js.map +1 -0
  283. package/build/src/rules/vitest/enable.d.ts +3 -0
  284. package/build/src/rules/vitest/enable.d.ts.map +1 -0
  285. package/build/src/rules/vitest/enable.js +7 -0
  286. package/build/src/rules/vitest/enable.js.map +1 -0
  287. package/build/src/rules/vitest/frontmatter/register.d.ts +3 -0
  288. package/build/src/rules/vitest/frontmatter/register.d.ts.map +1 -0
  289. package/build/src/rules/vitest/frontmatter/register.js +52 -0
  290. package/build/src/rules/vitest/frontmatter/register.js.map +1 -0
  291. package/build/src/rules/vitest/frontmatter/rules.d.ts +15 -0
  292. package/build/src/rules/vitest/frontmatter/rules.d.ts.map +1 -0
  293. package/build/src/rules/vitest/frontmatter/rules.js +498 -0
  294. package/build/src/rules/vitest/frontmatter/rules.js.map +1 -0
  295. package/build/src/rules/vitest/index.d.ts +8 -0
  296. package/build/src/rules/vitest/index.d.ts.map +1 -0
  297. package/build/src/rules/vitest/index.js +7 -0
  298. package/build/src/rules/vitest/index.js.map +1 -0
  299. package/build/src/rules/vitest/link/register.d.ts +3 -0
  300. package/build/src/rules/vitest/link/register.d.ts.map +1 -0
  301. package/build/src/rules/vitest/link/register.js +44 -0
  302. package/build/src/rules/vitest/link/register.js.map +1 -0
  303. package/build/src/rules/vitest/link/rules.d.ts +12 -0
  304. package/build/src/rules/vitest/link/rules.d.ts.map +1 -0
  305. package/build/src/rules/vitest/link/rules.js +313 -0
  306. package/build/src/rules/vitest/link/rules.js.map +1 -0
  307. package/build/src/rules/vitest/markdown-table/register.d.ts +3 -0
  308. package/build/src/rules/vitest/markdown-table/register.d.ts.map +1 -0
  309. package/build/src/rules/vitest/markdown-table/register.js +26 -0
  310. package/build/src/rules/vitest/markdown-table/register.js.map +1 -0
  311. package/build/src/rules/vitest/markdown-table/rules.d.ts +3 -0
  312. package/build/src/rules/vitest/markdown-table/rules.d.ts.map +1 -0
  313. package/build/src/rules/vitest/markdown-table/rules.js +99 -0
  314. package/build/src/rules/vitest/markdown-table/rules.js.map +1 -0
  315. package/build/src/rules/vitest/terminology/register.d.ts +3 -0
  316. package/build/src/rules/vitest/terminology/register.d.ts.map +1 -0
  317. package/build/src/rules/vitest/terminology/register.js +39 -0
  318. package/build/src/rules/vitest/terminology/register.js.map +1 -0
  319. package/build/src/rules/vitest/terminology/rules.d.ts +10 -0
  320. package/build/src/rules/vitest/terminology/rules.d.ts.map +1 -0
  321. package/build/src/rules/vitest/terminology/rules.js +202 -0
  322. package/build/src/rules/vitest/terminology/rules.js.map +1 -0
  323. package/build/src/rules/vitest/type-declarations/register.d.ts +3 -0
  324. package/build/src/rules/vitest/type-declarations/register.d.ts.map +1 -0
  325. package/build/src/rules/vitest/type-declarations/register.js +33 -0
  326. package/build/src/rules/vitest/type-declarations/register.js.map +1 -0
  327. package/build/src/rules/vitest/type-declarations/rules.d.ts +13 -0
  328. package/build/src/rules/vitest/type-declarations/rules.d.ts.map +1 -0
  329. package/build/src/rules/vitest/type-declarations/rules.js +736 -0
  330. package/build/src/rules/vitest/type-declarations/rules.js.map +1 -0
  331. package/build/src/toolkit/index.d.ts +1 -0
  332. package/build/src/toolkit/index.d.ts.map +1 -1
  333. package/build/src/toolkit/index.js +1 -0
  334. package/build/src/toolkit/index.js.map +1 -1
  335. package/build/src/toolkit/logger.d.ts.map +1 -1
  336. package/build/src/toolkit/logger.js +3 -1
  337. package/build/src/toolkit/logger.js.map +1 -1
  338. package/build/src/toolkit/markdown-table.js +1 -1
  339. package/build/src/toolkit/markdown-table.js.map +1 -1
  340. package/build/src/toolkit/nova-identity.d.ts +19 -0
  341. package/build/src/toolkit/nova-identity.d.ts.map +1 -0
  342. package/build/src/toolkit/nova-identity.js +141 -0
  343. package/build/src/toolkit/nova-identity.js.map +1 -0
  344. package/build/src/types/cli/generate/github/funding.d.ts +4 -4
  345. package/build/src/types/cli/generate/github/issue-template.d.ts +15 -35
  346. package/build/src/types/cli/generate/github/workflows-blueprint-validate.d.ts +351 -0
  347. package/build/src/types/cli/generate/github/workflows-blueprint-variables.d.ts +131 -0
  348. package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +1180 -0
  349. package/build/src/types/cli/generate/must-haves/agent-conventions.d.ts +9 -2
  350. package/build/src/types/cli/generate/must-haves/dotenv.d.ts +101 -314
  351. package/build/src/types/cli/generate/must-haves/editorconfig.d.ts +2 -2
  352. package/build/src/types/cli/generate/must-haves/gitignore.d.ts +13 -343
  353. package/build/src/types/cli/generate/must-haves/license.d.ts +5 -5
  354. package/build/src/types/cli/generate/must-haves/read-me.d.ts +136 -88
  355. package/build/src/types/cli/index.d.ts +14 -0
  356. package/build/src/types/cli/recipe/github/handle-gh-failure.d.ts +2 -2
  357. package/build/src/types/cli/recipe/github/sync-features.d.ts +20 -13
  358. package/build/src/types/cli/recipe/github/sync-identity.d.ts +20 -13
  359. package/build/src/types/cli/recipe/github/sync-policies.d.ts +24 -15
  360. package/build/src/types/cli/recipe/index.d.ts +7 -3
  361. package/build/src/types/cli/recipe/license/update-copyright.d.ts +142 -0
  362. package/build/src/types/cli/recipe/package-json/cleanup.d.ts +26 -22
  363. package/build/src/types/cli/recipe/package-json/normalize-artifacts.d.ts +22 -16
  364. package/build/src/types/cli/recipe/package-json/normalize-bundler.d.ts +20 -14
  365. package/build/src/types/cli/recipe/package-json/normalize-dependencies.d.ts +31 -19
  366. package/build/src/types/cli/recipe/package-json/normalize-modules.d.ts +20 -14
  367. package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +20 -14
  368. package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +46 -22
  369. package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +36 -19
  370. package/build/src/types/cli/recipe/package-json/sync-ownership.d.ts +33 -23
  371. package/build/src/types/cli/recipe/read-me/update-badges.d.ts +77 -0
  372. package/build/src/types/cli/recipe/read-me/update-credits.d.ts +77 -0
  373. package/build/src/types/cli/recipe/read-me/update-documentation.d.ts +77 -0
  374. package/build/src/types/cli/recipe/read-me/update-header.d.ts +77 -0
  375. package/build/src/types/cli/recipe/read-me/update-introduction.d.ts +77 -0
  376. package/build/src/types/cli/scaffold/starter/base.d.ts +2 -2
  377. package/build/src/types/cli/utility/changelog.d.ts +165 -73
  378. package/build/src/types/cli/utility/initialize.d.ts +1007 -350
  379. package/build/src/types/cli/utility/run-scripts.d.ts +1 -1
  380. package/build/src/types/cli/utility/transpile.d.ts +8 -3
  381. package/build/src/types/cli/utility/type-check.d.ts +9 -3
  382. package/build/src/types/cli/utility/version.d.ts +32 -32
  383. package/build/src/types/lib/constants.d.ts +1 -1
  384. package/build/src/types/lib/dotenv.d.ts +67 -0
  385. package/build/src/types/lib/env-github.d.ts +67 -0
  386. package/build/src/types/lib/env-managed-set.d.ts +90 -0
  387. package/build/src/types/lib/env-namespace.d.ts +22 -0
  388. package/build/src/types/lib/env-reconcile.d.ts +71 -0
  389. package/build/src/types/lib/env-status.d.ts +102 -0
  390. package/build/src/types/lib/file-discovery.d.ts +40 -0
  391. package/build/src/types/lib/item.d.ts +42 -0
  392. package/build/src/types/lib/markdown-slug.d.ts +25 -0
  393. package/build/src/types/lib/nova-config.d.ts +455 -68
  394. package/build/src/types/lib/read-me-regions.d.ts +51 -0
  395. package/build/src/types/lib/regex.d.ts +193 -18
  396. package/build/src/types/lib/scaffold.d.ts +43 -23
  397. package/build/src/types/lib/type-declaration-engine.d.ts +1052 -0
  398. package/build/src/types/lib/utility.d.ts +40 -6
  399. package/build/src/types/lib/workflow-templates.d.ts +11 -75
  400. package/build/src/types/presets/eslint/fw-astro.d.ts +8 -0
  401. package/build/src/types/rules/eslint/conventions/no-implicit-boolean.d.ts +7 -0
  402. package/build/src/types/rules/eslint/conventions/require-naming-convention.d.ts +8 -4
  403. package/build/src/types/rules/eslint/conventions/require-node-protocol.d.ts +56 -0
  404. package/build/src/types/rules/eslint/formatting/require-padding-lines.d.ts +2 -0
  405. package/build/src/types/rules/eslint/formatting/require-ternary-parens.d.ts +8 -3
  406. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-body.d.ts +16 -0
  407. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +19 -15
  408. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +3 -1
  409. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-presence.d.ts +125 -0
  410. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-returns.d.ts +48 -0
  411. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-since.d.ts +71 -1
  412. package/build/src/types/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts +204 -0
  413. package/build/src/types/rules/eslint/patterns/no-await-in-loop.d.ts +1 -1
  414. package/build/src/types/rules/eslint/patterns/no-bracket-method-call.d.ts +1 -1
  415. package/build/src/types/rules/eslint/regex/no-regex-literals.d.ts +44 -0
  416. package/build/src/types/rules/eslint/typescript/require-bracket-property-access.d.ts +19 -7
  417. package/build/src/types/rules/eslint/typescript/require-type-naming.d.ts +3 -3
  418. package/build/src/types/rules/vitest/active-vitest.d.ts +31 -0
  419. package/build/src/types/rules/vitest/dotenv/register.d.ts +31 -0
  420. package/build/src/types/rules/vitest/dotenv/rules.d.ts +29 -0
  421. package/build/src/types/rules/vitest/enable.d.ts +12 -0
  422. package/build/src/types/rules/vitest/frontmatter/register.d.ts +63 -0
  423. package/build/src/types/rules/vitest/frontmatter/rules.d.ts +430 -0
  424. package/build/src/types/rules/vitest/index.d.ts +419 -0
  425. package/build/src/types/rules/vitest/link/register.d.ts +79 -0
  426. package/build/src/types/rules/vitest/link/rules.d.ts +368 -0
  427. package/build/src/types/rules/vitest/markdown-table/register.d.ts +33 -0
  428. package/build/src/types/rules/vitest/markdown-table/rules.d.ts +55 -0
  429. package/build/src/types/rules/vitest/terminology/register.d.ts +48 -0
  430. package/build/src/types/rules/vitest/terminology/rules.d.ts +190 -0
  431. package/build/src/types/rules/vitest/type-declarations/register.d.ts +46 -0
  432. package/build/src/types/rules/vitest/type-declarations/rules.d.ts +894 -0
  433. package/build/src/types/shared.d.ts +727 -26
  434. package/build/src/types/tests/cli/generate/github/funding.test.d.ts +14 -10
  435. package/build/src/types/tests/cli/generate/github/issue-template.test.d.ts +38 -17
  436. package/build/src/types/tests/cli/generate/github/workflows-blueprint-generate.test.d.ts +199 -0
  437. package/build/src/types/tests/cli/generate/github/workflows-blueprint-parity.test.d.ts +75 -0
  438. package/build/src/types/tests/cli/generate/github/workflows-blueprint-publish-parity.test.d.ts +295 -0
  439. package/build/src/types/tests/cli/generate/github/workflows-blueprint-validate.test.d.ts +901 -0
  440. package/build/src/types/tests/cli/generate/github/workflows-blueprint-variables.test.d.ts +144 -0
  441. package/build/src/types/tests/cli/generate/github/workflows-blueprint.test.d.ts +332 -0
  442. package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +83 -11
  443. package/build/src/types/tests/cli/generate/must-haves/dotenv.test.d.ts +142 -12
  444. package/build/src/types/tests/cli/generate/must-haves/editorconfig.test.d.ts +12 -8
  445. package/build/src/types/tests/cli/generate/must-haves/gitignore.test.d.ts +14 -19
  446. package/build/src/types/tests/cli/generate/must-haves/read-me.test.d.ts +33 -10
  447. package/build/src/types/tests/cli/recipe/github/handle-gh-failure.test.d.ts +28 -24
  448. package/build/src/types/tests/cli/recipe/github/sync-features.test.d.ts +115 -111
  449. package/build/src/types/tests/cli/recipe/github/sync-identity.test.d.ts +192 -142
  450. package/build/src/types/tests/cli/recipe/github/sync-policies.test.d.ts +199 -126
  451. package/build/src/types/tests/cli/recipe/license/update-copyright.test.d.ts +617 -0
  452. package/build/src/types/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts +27 -0
  453. package/build/src/types/tests/cli/recipe/package-json/sync-environment.test.d.ts +21 -0
  454. package/build/src/types/tests/cli/recipe/package-json/sync-identity.test.d.ts +52 -0
  455. package/build/src/types/tests/cli/recipe/read-me/update-badges.test.d.ts +258 -0
  456. package/build/src/types/tests/cli/recipe/read-me/update-credits.test.d.ts +258 -0
  457. package/build/src/types/tests/cli/recipe/read-me/update-documentation.test.d.ts +258 -0
  458. package/build/src/types/tests/cli/recipe/read-me/update-header.test.d.ts +258 -0
  459. package/build/src/types/tests/cli/recipe/read-me/update-introduction.test.d.ts +258 -0
  460. package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +4 -0
  461. package/build/src/types/tests/cli/utility/changelog.test.d.ts +293 -0
  462. package/build/src/types/tests/cli/utility/initialize.test.d.ts +148 -1
  463. package/build/src/types/tests/lib/dotenv.test.d.ts +95 -0
  464. package/build/src/types/tests/lib/file-discovery.test.d.ts +37 -0
  465. package/build/src/types/tests/lib/item.test.d.ts +21 -0
  466. package/build/src/types/tests/lib/markdown-slug.test.d.ts +24 -0
  467. package/build/src/types/tests/lib/nova-config.test.d.ts +503 -83
  468. package/build/src/types/tests/lib/read-me-regions.test.d.ts +43 -0
  469. package/build/src/types/tests/lib/regex.test.d.ts +252 -0
  470. package/build/src/types/tests/lib/utility.test.d.ts +35 -0
  471. package/build/src/types/tests/lib/workflow-templates.test.d.ts +18 -2
  472. package/build/src/types/tests/rules/eslint/conventions/require-node-protocol.test.d.ts +8 -0
  473. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-presence.test.d.ts +8 -0
  474. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-returns.test.d.ts +8 -0
  475. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-since.test.d.ts +18 -0
  476. package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-tag-order.test.d.ts +8 -0
  477. package/build/src/types/tests/rules/vitest/active-vitest.test.d.ts +56 -0
  478. package/build/src/types/tests/rules/vitest/dotenv.test.d.ts +19 -0
  479. package/build/src/types/tests/rules/vitest/enable.test.d.ts +27 -0
  480. package/build/src/types/tests/rules/vitest/frontmatter.test.d.ts +22 -0
  481. package/build/src/types/tests/rules/vitest/link.test.d.ts +74 -0
  482. package/build/src/types/tests/rules/vitest/markdown-table.test.d.ts +28 -0
  483. package/build/src/types/tests/rules/vitest/terminology.test.d.ts +43 -0
  484. package/build/src/types/tests/rules/vitest/type-declarations.test.d.ts +10 -0
  485. package/build/src/types/tests/scaffold-version-drift.test.d.ts +42 -0
  486. package/build/src/types/tests/since-version.test.d.ts +137 -0
  487. package/build/src/types/tests/toolkit/logger.test.d.ts +70 -5
  488. package/build/src/types/tests/toolkit/nova-identity.test.d.ts +118 -0
  489. package/build/src/types/tests/type-declarations.test.d.ts +40 -1813
  490. package/build/src/types/toolkit/logger.d.ts +4 -0
  491. package/build/src/types/toolkit/nova-identity.d.ts +313 -0
  492. package/build/templates/generators/github/workflows/check-sponsor-gated-issues/base.yml +1 -1
  493. package/build/templates/generators/github/workflows/publish/base.yml +3 -1
  494. package/build/templates/generators/github/workflows/publish/targets/cloudflare-pages-docusaurus.yml +1 -1
  495. package/build/templates/generators/github/workflows/publish/targets/cloudflare-workers.yml +36 -0
  496. package/build/templates/generators/github/workflows/publish/targets/docker-hub.yml +1 -1
  497. package/build/templates/generators/github/workflows/publish/targets/ghcr.yml +1 -1
  498. package/build/templates/generators/github/workflows/publish/targets/github-action.yml +1 -1
  499. package/build/templates/generators/github/workflows/publish/targets/github-packages.yml +1 -1
  500. package/build/templates/generators/github/workflows/publish/targets/github-pages-docusaurus.yml +4 -4
  501. package/build/templates/generators/github/workflows/publish/targets/npm.yml +1 -1
  502. package/build/templates/generators/github/workflows/publish/targets/vercel-nextjs.yml +1 -1
  503. package/build/templates/generators/must-haves/agent-conventions/AGENTS.md +1 -2
  504. package/build/templates/generators/must-haves/agent-conventions/CLAUDE.md +1 -2
  505. package/build/templates/generators/must-haves/agent-conventions/conventions/java.md +5 -5
  506. package/build/templates/generators/must-haves/agent-conventions/conventions/kotlin.md +4 -4
  507. package/build/templates/generators/must-haves/agent-conventions/conventions/php.md +2 -2
  508. package/build/templates/generators/must-haves/agent-conventions/conventions/typescript.md +6 -6
  509. package/build/templates/generators/must-haves/agent-conventions/conventions/universal.md +2 -0
  510. package/build/templates/generators/must-haves/dotenv/env +5 -2
  511. package/build/templates/generators/must-haves/dotenv/env.sample +6 -3
  512. package/build/templates/generators/must-haves/gitignore/gitignore +6 -0
  513. package/build/templates/scaffold/app/express/package.json +5 -5
  514. package/build/templates/scaffold/app/nextjs/package.json +7 -7
  515. package/build/templates/scaffold/app/vite/package.json +3 -3
  516. package/build/templates/scaffold/app/workers/package.json +3 -3
  517. package/build/templates/scaffold/docs/docusaurus/docs/intro.md +6 -0
  518. package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +9 -3
  519. package/build/templates/scaffold/docs/docusaurus/package.json +14 -7
  520. package/build/templates/scaffold/docs/docusaurus/src/tests/frontmatter.test.ts +25 -0
  521. package/build/templates/scaffold/docs/docusaurus/src/tests/link.test.ts +16 -0
  522. package/build/templates/scaffold/docs/docusaurus/src/tests/markdown-table.test.ts +16 -0
  523. package/build/templates/scaffold/docs/docusaurus/src/tests/terminology.test.ts +16 -0
  524. package/build/templates/scaffold/docs/docusaurus/src/tests/type-declarations.test.ts +17 -0
  525. package/build/templates/scaffold/docs/docusaurus/vitest.config.ts +22 -0
  526. package/build/templates/scaffold/docs/docusaurus/vitest.setup.ts +26 -0
  527. package/package.json +14 -10
  528. package/build/src/cli/generate/github/workflows.d.ts +0 -17
  529. package/build/src/cli/generate/github/workflows.d.ts.map +0 -1
  530. package/build/src/cli/generate/github/workflows.js +0 -856
  531. package/build/src/cli/generate/github/workflows.js.map +0 -1
  532. package/build/src/types/cli/generate/github/workflows.d.ts +0 -596
  533. package/build/src/types/tests/cli/generate/github/workflows-helpers.test.d.ts +0 -239
  534. package/build/src/types/tests/cli/generate/github/workflows.test.d.ts +0 -587
  535. package/build/templates/generators/github/workflows/publish/targets/aws-amplify-nextjs.yml +0 -32
  536. package/build/templates/generators/must-haves/agent-conventions/cursorrules +0 -55
@@ -1,10 +1,14 @@
1
- import { promises as fs } from 'fs';
2
- import { join } from 'path';
3
- import { libItemAllowedPoliciesByRole, libItemAllowedRecipes, libItemAllowedRoles, libItemEmailFields, libItemGenericProtocols, libItemRepositoryProtocols, libItemUrlFields, } from './item.js';
1
+ import { promises as fs } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { Logger } from '../toolkit/index.js';
4
+ import { libEnvNamespace } from './env-namespace.js';
5
+ import { libItemAllowedAgents, libItemAllowedPoliciesByRole, libItemAllowedRoles, libItemEmailFields, libItemGenericProtocols, libItemRecipesByCategory, libItemRepositoryProtocols, libItemUrlFields, } from './item.js';
4
6
  import { LIB_REGEX_PATTERN_EMAIL_SIMPLE, LIB_REGEX_PATTERN_GITHUB_OWNER, LIB_REGEX_PATTERN_GITHUB_REPO, LIB_REGEX_PATTERN_SLUG_SCOPED, LIB_REGEX_PATTERN_SLUG_SIMPLE, } from './regex.js';
5
- import { isFileIdentical, isPlainObject, renameFileWithDate } from './utility.js';
7
+ import { isFileIdentical, isPlainObject, pathExists, renameFileWithDate, } from './utility.js';
8
+ import { libWorkflowTemplatesMetadata } from './workflow-templates.js';
6
9
  export class Runner {
7
10
  #config;
11
+ #diagnostics = [];
8
12
  constructor() {
9
13
  const config = {};
10
14
  this.#config = config;
@@ -31,17 +35,24 @@ export class Runner {
31
35
  this.#config = this.parse(this.#config);
32
36
  const currentDirectory = process.cwd();
33
37
  const configPath = join(currentDirectory, 'nova.config.json');
34
- if (await isFileIdentical(configPath, this.#config) === true) {
38
+ const configExists = await pathExists(configPath);
39
+ if (configExists === true
40
+ && await isFileIdentical(configPath, this.#config) === true) {
35
41
  return;
36
42
  }
37
- if (replaceFile === false) {
43
+ if (configExists === true
44
+ && replaceFile === false) {
38
45
  await renameFileWithDate(configPath);
39
46
  }
40
47
  await fs.writeFile(configPath, `${JSON.stringify(this.#config, null, 2)}\n`, 'utf-8');
41
48
  return;
42
49
  }
50
+ diagnostics() {
51
+ return [...this.#diagnostics];
52
+ }
43
53
  parse(value) {
44
54
  const result = {};
55
+ this.#diagnostics = [];
45
56
  if (isPlainObject(value) === false) {
46
57
  return result;
47
58
  }
@@ -52,6 +63,11 @@ export class Runner {
52
63
  const workflows = this.parseWorkflows(value['workflows']);
53
64
  const urls = this.parseUrls(value['urls']);
54
65
  const workspaces = this.parseWorkspaces(value['workspaces'], (project !== undefined && project['name'] !== undefined) ? project['name']['slug'] : undefined);
66
+ const gitignore = this.parseGitignore(value['gitignore']);
67
+ const agents = this.parseAgents(value['agents']);
68
+ const recipes = this.parseRecipes(value['recipes']);
69
+ const environment = this.parseEnvironment(value['environment'], workspaces, workflows);
70
+ this.validateCredContributors(value['workflows'], environment);
55
71
  if (project !== undefined) {
56
72
  result.project = project;
57
73
  }
@@ -73,8 +89,42 @@ export class Runner {
73
89
  if (workspaces !== undefined) {
74
90
  result.workspaces = workspaces;
75
91
  }
92
+ if (gitignore !== undefined) {
93
+ result.gitignore = gitignore;
94
+ }
95
+ if (agents !== undefined) {
96
+ result.agents = agents;
97
+ }
98
+ if (recipes !== undefined) {
99
+ result.recipes = recipes;
100
+ }
101
+ if (environment !== undefined) {
102
+ result.environment = environment;
103
+ }
76
104
  return result;
77
105
  }
106
+ pushError(name, purpose, message) {
107
+ this.#diagnostics.push({
108
+ severity: 'error',
109
+ message,
110
+ });
111
+ Logger.customize({
112
+ name,
113
+ purpose,
114
+ }).error(message);
115
+ return;
116
+ }
117
+ pushWarning(name, purpose, message) {
118
+ this.#diagnostics.push({
119
+ severity: 'warning',
120
+ message,
121
+ });
122
+ Logger.customize({
123
+ name,
124
+ purpose,
125
+ }).warn(message);
126
+ return;
127
+ }
78
128
  parseProject(value) {
79
129
  if (isPlainObject(value) === false) {
80
130
  return undefined;
@@ -289,6 +339,10 @@ export class Runner {
289
339
  const path = valueEntry[0];
290
340
  const options = valueEntry[1];
291
341
  if (isPlainObject(options) === false) {
342
+ Logger.customize({
343
+ name: 'Runner.parseWorkspaces',
344
+ purpose: 'workspaces',
345
+ }).warn(`Workspace "${path}" is not an object. Skipping ...`);
292
346
  continue;
293
347
  }
294
348
  const nameCandidate = this.getNonEmptyString(options['name']);
@@ -296,73 +350,55 @@ export class Runner {
296
350
  const roleCandidate = this.getNonEmptyString(options['role']);
297
351
  const policyCandidate = this.getNonEmptyString(options['policy']);
298
352
  if (nameCandidate === undefined) {
353
+ Logger.customize({
354
+ name: 'Runner.parseWorkspaces',
355
+ purpose: 'workspaces',
356
+ }).warn(`Workspace "${path}" has no valid name. Skipping ...`);
357
+ continue;
358
+ }
359
+ if (roleCandidate === undefined) {
360
+ Logger.customize({
361
+ name: 'Runner.parseWorkspaces',
362
+ purpose: 'workspaces',
363
+ }).warn(`Workspace "${path}" has no role. Skipping ...`);
299
364
  continue;
300
365
  }
301
366
  const matchedRole = libItemAllowedRoles.find((itemAllowedRole) => itemAllowedRole === roleCandidate);
302
367
  if (matchedRole === undefined) {
368
+ Logger.customize({
369
+ name: 'Runner.parseWorkspaces',
370
+ purpose: 'workspaces',
371
+ }).warn(`Workspace "${path}" has an unrecognized role "${roleCandidate}". Skipping ...`);
372
+ continue;
373
+ }
374
+ if (policyCandidate === undefined) {
375
+ Logger.customize({
376
+ name: 'Runner.parseWorkspaces',
377
+ purpose: 'workspaces',
378
+ }).warn(`Workspace "${path}" has no policy. Skipping ...`);
303
379
  continue;
304
380
  }
305
381
  const allowedPolicies = libItemAllowedPoliciesByRole[matchedRole];
306
382
  const policy = allowedPolicies.find((allowedPolicy) => allowedPolicy === policyCandidate);
307
383
  if (policy === undefined) {
384
+ Logger.customize({
385
+ name: 'Runner.parseWorkspaces',
386
+ purpose: 'workspaces',
387
+ }).warn(`Workspace "${path}" policy "${policyCandidate}" is not allowed for role "${matchedRole}". Skipping ...`);
308
388
  continue;
309
389
  }
310
390
  if (isNameAllowed(matchedRole, nameCandidate) === false) {
391
+ Logger.customize({
392
+ name: 'Runner.parseWorkspaces',
393
+ purpose: 'workspaces',
394
+ }).warn(`Workspace "${path}" name "${nameCandidate}" does not match the required pattern for role "${matchedRole}". Skipping ...`);
311
395
  continue;
312
396
  }
313
- let recipes = undefined;
314
- const recipesCandidate = options['recipes'];
315
- if (isPlainObject(recipesCandidate) === true) {
316
- const allowedRecipes = new Set(libItemAllowedRecipes);
317
- const parsedRecipes = {};
318
- for (const recipesCandidateEntry of Object.entries(recipesCandidate)) {
319
- const recipeName = recipesCandidateEntry[0];
320
- const recipeTuple = recipesCandidateEntry[1];
321
- const matchedRecipe = [...allowedRecipes].find((allowedRecipe) => allowedRecipe === recipeName);
322
- if (matchedRecipe === undefined) {
323
- continue;
324
- }
325
- if (Array.isArray(recipeTuple) === false || recipeTuple.length === 0) {
326
- continue;
327
- }
328
- const enabled = recipeTuple[0];
329
- if (typeof enabled !== 'boolean') {
330
- continue;
331
- }
332
- const settings = recipeTuple[1];
333
- if (settings !== undefined && isPlainObject(settings) === true) {
334
- const parsedSettings = {};
335
- for (const settingsEntry of Object.entries(settings)) {
336
- const settingKey = settingsEntry[0];
337
- const settingValue = settingsEntry[1];
338
- if (typeof settingValue === 'boolean') {
339
- Reflect.set(parsedSettings, settingKey, settingValue);
340
- }
341
- }
342
- if (Object.keys(parsedSettings).length > 0) {
343
- Reflect.set(parsedRecipes, matchedRecipe, [
344
- enabled,
345
- parsedSettings,
346
- ]);
347
- }
348
- else {
349
- Reflect.set(parsedRecipes, matchedRecipe, [enabled]);
350
- }
351
- }
352
- else {
353
- Reflect.set(parsedRecipes, matchedRecipe, [enabled]);
354
- }
355
- }
356
- if (Object.keys(parsedRecipes).length > 0) {
357
- recipes = parsedRecipes;
358
- }
359
- }
360
397
  Reflect.set(workspaces, path, {
361
398
  role: matchedRole,
362
399
  policy,
363
400
  name: nameCandidate,
364
401
  ...(displayNameCandidate !== undefined) ? { displayName: displayNameCandidate } : {},
365
- ...(recipes !== undefined) ? { recipes } : {},
366
402
  });
367
403
  }
368
404
  const workspaceKeys = Object.keys(workspaces);
@@ -376,6 +412,306 @@ export class Runner {
376
412
  }
377
413
  return sortedWorkspaces;
378
414
  }
415
+ parseEnvironment(value, workspaces, workflows) {
416
+ if (isPlainObject(value) === false) {
417
+ return undefined;
418
+ }
419
+ const result = {};
420
+ const workspacePaths = (workspaces !== undefined) ? Object.keys(workspaces) : [];
421
+ const workflowNames = (workflows !== undefined) ? workflows.map((workflow) => workflow['suffix']) : [];
422
+ const collectedPrefixes = [];
423
+ const globalValue = value['global'];
424
+ if (isPlainObject(globalValue) === true) {
425
+ const globalPrefix = this.getNonEmptyString(globalValue['prefix']);
426
+ if (globalPrefix === undefined) {
427
+ this.pushError('Runner.parseEnvironment', 'environment', 'Environment "global" has no prefix. Skipping ...');
428
+ }
429
+ else if (libEnvNamespace.isReservedPrefix(globalPrefix) === true) {
430
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment "global" prefix "${globalPrefix}" is reserved and cannot be used. Skipping ...`);
431
+ }
432
+ else {
433
+ collectedPrefixes.push(globalPrefix);
434
+ const globalVariables = this.parseEnvironmentValues(globalValue['variables'], globalPrefix, 'global', false);
435
+ const globalResult = { prefix: globalPrefix };
436
+ if (globalVariables !== undefined) {
437
+ globalResult.variables = globalVariables;
438
+ }
439
+ result.global = globalResult;
440
+ }
441
+ }
442
+ const appsValue = value['apps'];
443
+ if (isPlainObject(appsValue) === true) {
444
+ const apps = {};
445
+ for (const appEntry of Object.entries(appsValue)) {
446
+ const appPath = appEntry[0];
447
+ const appOptions = appEntry[1];
448
+ if (isPlainObject(appOptions) === false) {
449
+ continue;
450
+ }
451
+ if (workspacePaths.includes(appPath) === false) {
452
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment app "${appPath}" does not match a configured workspace. Skipping ...`);
453
+ continue;
454
+ }
455
+ const appPrefix = this.getNonEmptyString(appOptions['prefix']);
456
+ if (appPrefix === undefined) {
457
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment app "${appPath}" has no prefix. Skipping ...`);
458
+ continue;
459
+ }
460
+ if (libEnvNamespace.isReservedPrefix(appPrefix) === true) {
461
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment app "${appPath}" prefix "${appPrefix}" is reserved and cannot be used. Skipping ...`);
462
+ continue;
463
+ }
464
+ collectedPrefixes.push(appPrefix);
465
+ const appVariables = this.parseEnvironmentValues(appOptions['variables'], appPrefix, `app "${appPath}"`, true);
466
+ const appResult = { prefix: appPrefix };
467
+ if (appVariables !== undefined) {
468
+ appResult.variables = appVariables;
469
+ }
470
+ Reflect.set(apps, appPath, appResult);
471
+ }
472
+ if (Object.keys(apps).length > 0) {
473
+ result.apps = apps;
474
+ }
475
+ }
476
+ const workflowsValue = value['workflows'];
477
+ if (isPlainObject(workflowsValue) === true) {
478
+ const workflowsResult = {};
479
+ for (const workflowEntry of Object.entries(workflowsValue)) {
480
+ const workflowName = workflowEntry[0];
481
+ const workflowOptions = workflowEntry[1];
482
+ if (isPlainObject(workflowOptions) === false) {
483
+ continue;
484
+ }
485
+ const matchCount = workflowNames.filter((name) => name === workflowName).length;
486
+ if (matchCount === 0) {
487
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment workflow "${workflowName}" does not match a configured workflow. Skipping ...`);
488
+ continue;
489
+ }
490
+ if (matchCount > 1) {
491
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment workflow "${workflowName}" matches more than one configured workflow. Skipping ...`);
492
+ continue;
493
+ }
494
+ const workflowPrefix = this.getNonEmptyString(workflowOptions['prefix']);
495
+ if (workflowPrefix === undefined) {
496
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment workflow "${workflowName}" has no prefix. Skipping ...`);
497
+ continue;
498
+ }
499
+ if (libEnvNamespace.isReservedPrefix(workflowPrefix) === true) {
500
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment workflow "${workflowName}" prefix "${workflowPrefix}" is reserved and cannot be used. Skipping ...`);
501
+ continue;
502
+ }
503
+ collectedPrefixes.push(workflowPrefix);
504
+ Reflect.set(workflowsResult, workflowName, { prefix: workflowPrefix });
505
+ }
506
+ if (Object.keys(workflowsResult).length > 0) {
507
+ result.workflows = workflowsResult;
508
+ }
509
+ }
510
+ for (let i = 0; i < collectedPrefixes.length; i += 1) {
511
+ for (let j = i + 1; j < collectedPrefixes.length; j += 1) {
512
+ const prefixA = collectedPrefixes[i];
513
+ const prefixB = collectedPrefixes[j];
514
+ if (libEnvNamespace.prefixesOverlap(prefixA, prefixB) === true) {
515
+ this.pushError('Runner.parseEnvironment', 'environment', `Environment prefixes "${prefixA}" and "${prefixB}" overlap. Skipping ...`);
516
+ }
517
+ }
518
+ }
519
+ if (Object.keys(result).length === 0) {
520
+ return undefined;
521
+ }
522
+ return result;
523
+ }
524
+ parseEnvironmentValues(rawVariables, prefix, context, requireBuildOnly) {
525
+ if (Array.isArray(rawVariables) === false) {
526
+ return undefined;
527
+ }
528
+ const values = [];
529
+ const seenNames = new Set();
530
+ for (const rawItem of rawVariables) {
531
+ const raw = rawItem;
532
+ if (isPlainObject(raw) === false) {
533
+ continue;
534
+ }
535
+ const key = this.getNonEmptyString(raw['key']);
536
+ if (key === undefined) {
537
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} has a value with no valid key. Skipping ...`);
538
+ continue;
539
+ }
540
+ const secretCandidate = (typeof raw['secret'] === 'boolean') ? raw['secret'] : undefined;
541
+ if (secretCandidate === undefined) {
542
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" has no boolean "secret" flag. Skipping ...`);
543
+ continue;
544
+ }
545
+ if (secretCandidate === true
546
+ && (key.startsWith('PUBLIC_') === true
547
+ || key.startsWith('NEXT_PUBLIC_') === true)) {
548
+ this.pushWarning('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" is a browser-exposed key marked secret and would leak if inlined into client output.`);
549
+ }
550
+ let hasError = false;
551
+ const buildOnlyCandidate = (typeof raw['buildOnly'] === 'boolean') ? raw['buildOnly'] : undefined;
552
+ if (requireBuildOnly === true && buildOnlyCandidate === undefined) {
553
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" has no boolean "buildOnly" flag. Skipping ...`);
554
+ hasError = true;
555
+ }
556
+ const defaultValueCandidate = (typeof raw['defaultValue'] === 'string') ? raw['defaultValue'] : undefined;
557
+ if (secretCandidate === true && defaultValueCandidate !== undefined) {
558
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" is a secret and cannot declare a "defaultValue". Skipping ...`);
559
+ hasError = true;
560
+ }
561
+ if (libEnvNamespace.startsWithPrefix(key, prefix) === true) {
562
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" starts with its own prefix "${prefix}". Skipping ...`);
563
+ hasError = true;
564
+ }
565
+ const name = libEnvNamespace.githubName(prefix, key);
566
+ if (libEnvNamespace.isGithubLegalName(name) === false) {
567
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" resolves to GitHub name "${name}" which is not a valid GitHub variable or secret name. Skipping ...`);
568
+ hasError = true;
569
+ }
570
+ const foldedName = name.toUpperCase();
571
+ if (seenNames.has(foldedName) === true) {
572
+ this.pushError('Runner.parseEnvironmentValues', 'environment', `Environment ${context} value "${key}" resolves to GitHub name "${name}" which duplicates another value in the same namespace. Skipping ...`);
573
+ hasError = true;
574
+ }
575
+ if (hasError === true) {
576
+ continue;
577
+ }
578
+ seenNames.add(foldedName);
579
+ const value = {
580
+ key,
581
+ secret: secretCandidate,
582
+ };
583
+ if (buildOnlyCandidate !== undefined) {
584
+ value.buildOnly = buildOnlyCandidate;
585
+ }
586
+ if (defaultValueCandidate !== undefined) {
587
+ value.defaultValue = defaultValueCandidate;
588
+ }
589
+ values.push(value);
590
+ }
591
+ return (values.length > 0) ? values : undefined;
592
+ }
593
+ validateCredContributors(rawWorkflows, environment) {
594
+ if (Array.isArray(rawWorkflows) === false) {
595
+ return;
596
+ }
597
+ if (environment === undefined) {
598
+ return;
599
+ }
600
+ const globalGroup = (environment !== undefined) ? environment['global'] : undefined;
601
+ const hasGlobalPrefix = globalGroup !== undefined;
602
+ const appsGroup = (environment !== undefined) ? environment['apps'] : undefined;
603
+ const workflowsGroup = (environment !== undefined) ? environment['workflows'] : undefined;
604
+ const reported = new Set();
605
+ const serverBearingApps = new Set();
606
+ for (const rawWorkflowItem of rawWorkflows) {
607
+ const rawWorkflow = rawWorkflowItem;
608
+ if (isPlainObject(rawWorkflow) === false) {
609
+ continue;
610
+ }
611
+ const template = this.getNonEmptyString(rawWorkflow['template']);
612
+ if (template === undefined) {
613
+ continue;
614
+ }
615
+ const templateMeta = libWorkflowTemplatesMetadata.find((entry) => entry['name'] === template);
616
+ if (templateMeta === undefined) {
617
+ continue;
618
+ }
619
+ const workflowName = this.getNonEmptyString(rawWorkflow['name']);
620
+ const ownsConfigKeys = Object.values(templateMeta['variables']).some((variableMeta) => variableMeta['auto'] !== true && variableMeta['format'] !== 'literal');
621
+ const workflowGroup = (workflowsGroup !== undefined && workflowName !== undefined) ? workflowsGroup[workflowName] : undefined;
622
+ if (ownsConfigKeys === true
623
+ && workflowName !== undefined
624
+ && workflowGroup === undefined) {
625
+ const workflowMessage = `Environment workflow "${workflowName}" contributes config keys, but has no "workflows" entry with a prefix. Skipping ...`;
626
+ if (reported.has(workflowMessage) === false) {
627
+ reported.add(workflowMessage);
628
+ this.pushError('Runner.validateCredContributors', 'environment', workflowMessage);
629
+ }
630
+ }
631
+ const templateTargets = templateMeta['targets'];
632
+ if (templateTargets === undefined) {
633
+ continue;
634
+ }
635
+ const deployTargets = [];
636
+ const deployList = rawWorkflow['deploy'];
637
+ if (Array.isArray(deployList) === true) {
638
+ for (const deployItem of deployList) {
639
+ const deployEntry = deployItem;
640
+ if (isPlainObject(deployEntry) === false) {
641
+ continue;
642
+ }
643
+ const to = this.getNonEmptyString(deployEntry['to']);
644
+ const path = this.getNonEmptyString(deployEntry['path']);
645
+ if (to !== undefined && path !== undefined) {
646
+ deployTargets.push({
647
+ targetType: to,
648
+ appPath: path,
649
+ });
650
+ }
651
+ }
652
+ }
653
+ const targetList = rawWorkflow['targets'];
654
+ if (Array.isArray(targetList) === true) {
655
+ for (const targetItem of targetList) {
656
+ const targetEntry = targetItem;
657
+ if (isPlainObject(targetEntry) === false) {
658
+ continue;
659
+ }
660
+ const type = this.getNonEmptyString(targetEntry['type']);
661
+ const workingDir = this.getNonEmptyString(targetEntry['workingDir']);
662
+ if (type !== undefined && workingDir !== undefined) {
663
+ deployTargets.push({
664
+ targetType: type,
665
+ appPath: workingDir,
666
+ });
667
+ }
668
+ }
669
+ }
670
+ for (const deployTarget of deployTargets) {
671
+ const targetMeta = templateTargets[deployTarget['targetType']];
672
+ if (targetMeta === undefined) {
673
+ continue;
674
+ }
675
+ if (targetMeta['supportsRuntimeSecretSync'] === true) {
676
+ serverBearingApps.add(deployTarget['appPath']);
677
+ }
678
+ const targetVariables = targetMeta['variables'];
679
+ for (const variableEntry of Object.entries(targetVariables)) {
680
+ const variableName = variableEntry[0];
681
+ const variableMeta = variableEntry[1];
682
+ const scope = variableMeta['scope'];
683
+ if (scope === 'account' && hasGlobalPrefix === false) {
684
+ const message = `Environment deploy target "${deployTarget['targetType']}" needs the account credential "${variableName}", but "global" has no prefix. Skipping ...`;
685
+ if (reported.has(message) === false) {
686
+ reported.add(message);
687
+ this.pushError('Runner.validateCredContributors', 'environment', message);
688
+ }
689
+ }
690
+ else if (scope === 'app') {
691
+ const app = (appsGroup !== undefined) ? appsGroup[deployTarget['appPath']] : undefined;
692
+ if (app === undefined) {
693
+ const appMessage = `Environment deploy target "${deployTarget['targetType']}" needs the app credential "${variableName}" for "${deployTarget['appPath']}", but that app has no prefix. Skipping ...`;
694
+ if (reported.has(appMessage) === false) {
695
+ reported.add(appMessage);
696
+ this.pushError('Runner.validateCredContributors', 'environment', appMessage);
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }
702
+ }
703
+ if (appsGroup !== undefined) {
704
+ for (const appEntry of Object.entries(appsGroup)) {
705
+ const runtimeAppPath = appEntry[0];
706
+ const runtimeApp = appEntry[1];
707
+ const hasRuntimeValue = (runtimeApp['variables'] ?? []).some((variable) => variable['buildOnly'] === false);
708
+ if (hasRuntimeValue === true && serverBearingApps.has(runtimeAppPath) === false) {
709
+ this.pushError('Runner.validateCredContributors', 'environment', `Environment app "${runtimeAppPath}" declares a runtime value (buildOnly false), but deploys to no server-bearing target. Skipping ...`);
710
+ }
711
+ }
712
+ }
713
+ return;
714
+ }
379
715
  parseWorkflows(value) {
380
716
  if (Array.isArray(value) === false) {
381
717
  return undefined;
@@ -390,7 +726,7 @@ export class Runner {
390
726
  if (template === undefined) {
391
727
  continue;
392
728
  }
393
- const suffix = this.getNonEmptyString(castItem['suffix']);
729
+ const suffix = this.getNonEmptyString(castItem['name']);
394
730
  if (suffix === undefined) {
395
731
  continue;
396
732
  }
@@ -494,10 +830,6 @@ export class Runner {
494
830
  if (repo !== undefined) {
495
831
  result.repo = repo;
496
832
  }
497
- const recipes = this.getGithubRecipes(value['recipes']);
498
- if (recipes !== undefined) {
499
- result.recipes = recipes;
500
- }
501
833
  const topics = this.getGithubTopics(value['topics']);
502
834
  if (topics !== undefined) {
503
835
  result.topics = topics;
@@ -510,8 +842,113 @@ export class Runner {
510
842
  if (policies !== undefined) {
511
843
  result.policies = policies;
512
844
  }
845
+ const issueTemplate = this.getGithubIssueTemplate(value['issueTemplate']);
846
+ if (issueTemplate !== undefined) {
847
+ result.issueTemplate = issueTemplate;
848
+ }
513
849
  return (Object.keys(result).length > 0) ? result : undefined;
514
850
  }
851
+ parseRecipes(value) {
852
+ if (isPlainObject(value) === false) {
853
+ return undefined;
854
+ }
855
+ const result = {};
856
+ const github = this.getRecipeEntries(value['github'], libItemRecipesByCategory['github']);
857
+ if (github !== undefined) {
858
+ result.github = github;
859
+ }
860
+ const license = this.getRecipeEntries(value['license'], libItemRecipesByCategory['license']);
861
+ if (license !== undefined) {
862
+ result.license = license;
863
+ }
864
+ const readMe = this.getRecipeEntries(value['read-me'], libItemRecipesByCategory['read-me']);
865
+ if (readMe !== undefined) {
866
+ Reflect.set(result, 'read-me', readMe);
867
+ }
868
+ const packageJson = this.getPackageJsonRecipes(value['package-json']);
869
+ if (packageJson !== undefined) {
870
+ Reflect.set(result, 'package-json', packageJson);
871
+ }
872
+ return (Object.keys(result).length > 0) ? result : undefined;
873
+ }
874
+ getRecipeEntries(value, allowedNames) {
875
+ if (isPlainObject(value) === false) {
876
+ return undefined;
877
+ }
878
+ const result = {};
879
+ for (const name of allowedNames) {
880
+ const entry = this.getRecipeEntry(Reflect.get(value, name));
881
+ if (entry !== undefined) {
882
+ Reflect.set(result, name, entry);
883
+ }
884
+ }
885
+ return (Object.keys(result).length > 0) ? result : undefined;
886
+ }
887
+ getPackageJsonRecipes(value) {
888
+ if (isPlainObject(value) === false) {
889
+ return undefined;
890
+ }
891
+ const result = {};
892
+ for (const valueEntry of Object.entries(value)) {
893
+ const workspacePath = valueEntry[0];
894
+ const workspaceValue = valueEntry[1];
895
+ const entries = this.getRecipeEntries(workspaceValue, libItemRecipesByCategory['package-json']);
896
+ if (entries !== undefined) {
897
+ Reflect.set(result, workspacePath, entries);
898
+ }
899
+ }
900
+ return (Object.keys(result).length > 0) ? result : undefined;
901
+ }
902
+ getRecipeEntry(value) {
903
+ if (isPlainObject(value) === false) {
904
+ return undefined;
905
+ }
906
+ const enabled = value['enabled'];
907
+ if (typeof enabled !== 'boolean') {
908
+ return undefined;
909
+ }
910
+ const result = {
911
+ enabled,
912
+ };
913
+ const settingsCandidate = value['settings'];
914
+ if (isPlainObject(settingsCandidate) === true) {
915
+ const settings = {};
916
+ for (const settingsEntry of Object.entries(settingsCandidate)) {
917
+ const settingKey = settingsEntry[0];
918
+ const settingValue = settingsEntry[1];
919
+ if (typeof settingValue === 'boolean') {
920
+ Reflect.set(settings, settingKey, settingValue);
921
+ }
922
+ }
923
+ if (Object.keys(settings).length > 0) {
924
+ result.settings = settings;
925
+ }
926
+ }
927
+ return result;
928
+ }
929
+ parseGitignore(value) {
930
+ if (isPlainObject(value) === false) {
931
+ return undefined;
932
+ }
933
+ const result = {};
934
+ const projectExcludes = this.getArrayOfNonEmptyStrings(value['projectExcludes']);
935
+ if (projectExcludes !== undefined) {
936
+ result.projectExcludes = projectExcludes;
937
+ }
938
+ return (Object.keys(result).length > 0) ? result : undefined;
939
+ }
940
+ parseAgents(value) {
941
+ if (Array.isArray(value) === false) {
942
+ return undefined;
943
+ }
944
+ const agents = [];
945
+ for (const allowedAgent of libItemAllowedAgents) {
946
+ if (value.some((item) => item === allowedAgent) === true) {
947
+ agents.push(allowedAgent);
948
+ }
949
+ }
950
+ return (agents.length > 0) ? agents : undefined;
951
+ }
515
952
  getGithubFeatures(value) {
516
953
  if (isPlainObject(value) === false) {
517
954
  return undefined;
@@ -535,6 +972,17 @@ export class Runner {
535
972
  }
536
973
  return (Object.keys(result).length > 0) ? result : undefined;
537
974
  }
975
+ getGithubIssueTemplate(value) {
976
+ if (isPlainObject(value) === false) {
977
+ return undefined;
978
+ }
979
+ const result = {};
980
+ const bugReportFields = this.getArrayOfNonEmptyStrings(value['bugReportFields']);
981
+ if (bugReportFields !== undefined) {
982
+ result.bugReportFields = bugReportFields;
983
+ }
984
+ return (Object.keys(result).length > 0) ? result : undefined;
985
+ }
538
986
  getGithubPolicies(value) {
539
987
  if (isPlainObject(value) === false) {
540
988
  return undefined;
@@ -582,25 +1030,6 @@ export class Runner {
582
1030
  }
583
1031
  return (Object.keys(result).length > 0) ? result : undefined;
584
1032
  }
585
- getGithubRecipes(value) {
586
- if (isPlainObject(value) === false) {
587
- return undefined;
588
- }
589
- const result = {};
590
- const syncIdentity = (typeof value['sync-identity'] === 'boolean') ? value['sync-identity'] : undefined;
591
- if (syncIdentity !== undefined) {
592
- Reflect.set(result, 'sync-identity', syncIdentity);
593
- }
594
- const syncFeatures = (typeof value['sync-features'] === 'boolean') ? value['sync-features'] : undefined;
595
- if (syncFeatures !== undefined) {
596
- Reflect.set(result, 'sync-features', syncFeatures);
597
- }
598
- const syncPolicies = (typeof value['sync-policies'] === 'boolean') ? value['sync-policies'] : undefined;
599
- if (syncPolicies !== undefined) {
600
- Reflect.set(result, 'sync-policies', syncPolicies);
601
- }
602
- return (Object.keys(result).length > 0) ? result : undefined;
603
- }
604
1033
  getGithubTopics(value) {
605
1034
  if (Array.isArray(value) === false) {
606
1035
  return undefined;