@ykdz/template 0.0.23 → 0.0.24

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 (451) hide show
  1. package/dist/cli.js +4 -575
  2. package/dist/main.d.ts +1 -0
  3. package/dist/main.js +370 -0
  4. package/node_modules/@typescript/old/LICENSE.txt +55 -0
  5. package/node_modules/@typescript/old/README.md +50 -0
  6. package/node_modules/@typescript/old/SECURITY.md +39 -0
  7. package/node_modules/@typescript/old/ThirdPartyNoticeText.txt +193 -0
  8. package/node_modules/@typescript/old/bin/tsc +2 -0
  9. package/node_modules/@typescript/old/bin/tsserver +2 -0
  10. package/node_modules/@typescript/old/lib/_tsc.js +134465 -0
  11. package/node_modules/@typescript/old/lib/_tsserver.js +659 -0
  12. package/node_modules/@typescript/old/lib/_typingsInstaller.js +222 -0
  13. package/node_modules/@typescript/old/lib/cs/diagnosticMessages.generated.json +2129 -0
  14. package/node_modules/@typescript/old/lib/de/diagnosticMessages.generated.json +2125 -0
  15. package/node_modules/@typescript/old/lib/es/diagnosticMessages.generated.json +2129 -0
  16. package/node_modules/@typescript/old/lib/fr/diagnosticMessages.generated.json +2129 -0
  17. package/node_modules/@typescript/old/lib/it/diagnosticMessages.generated.json +2125 -0
  18. package/node_modules/@typescript/old/lib/ja/diagnosticMessages.generated.json +2129 -0
  19. package/node_modules/@typescript/old/lib/ko/diagnosticMessages.generated.json +2129 -0
  20. package/node_modules/@typescript/old/lib/lib.d.ts +20 -0
  21. package/node_modules/@typescript/old/lib/lib.decorators.d.ts +382 -0
  22. package/node_modules/@typescript/old/lib/lib.decorators.legacy.d.ts +20 -0
  23. package/node_modules/@typescript/old/lib/lib.dom.asynciterable.d.ts +18 -0
  24. package/node_modules/@typescript/old/lib/lib.dom.d.ts +45125 -0
  25. package/node_modules/@typescript/old/lib/lib.dom.iterable.d.ts +18 -0
  26. package/node_modules/@typescript/old/lib/lib.es2015.collection.d.ts +150 -0
  27. package/node_modules/@typescript/old/lib/lib.es2015.core.d.ts +595 -0
  28. package/node_modules/@typescript/old/lib/lib.es2015.d.ts +26 -0
  29. package/node_modules/@typescript/old/lib/lib.es2015.generator.d.ts +75 -0
  30. package/node_modules/@typescript/old/lib/lib.es2015.iterable.d.ts +603 -0
  31. package/node_modules/@typescript/old/lib/lib.es2015.promise.d.ts +79 -0
  32. package/node_modules/@typescript/old/lib/lib.es2015.proxy.d.ts +126 -0
  33. package/node_modules/@typescript/old/lib/lib.es2015.reflect.d.ts +142 -0
  34. package/node_modules/@typescript/old/lib/lib.es2015.symbol.d.ts +44 -0
  35. package/node_modules/@typescript/old/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  36. package/node_modules/@typescript/old/lib/lib.es2016.array.include.d.ts +114 -0
  37. package/node_modules/@typescript/old/lib/lib.es2016.d.ts +19 -0
  38. package/node_modules/@typescript/old/lib/lib.es2016.full.d.ts +21 -0
  39. package/node_modules/@typescript/old/lib/lib.es2016.intl.d.ts +29 -0
  40. package/node_modules/@typescript/old/lib/lib.es2017.arraybuffer.d.ts +19 -0
  41. package/node_modules/@typescript/old/lib/lib.es2017.d.ts +24 -0
  42. package/node_modules/@typescript/old/lib/lib.es2017.date.d.ts +29 -0
  43. package/node_modules/@typescript/old/lib/lib.es2017.full.d.ts +21 -0
  44. package/node_modules/@typescript/old/lib/lib.es2017.intl.d.ts +42 -0
  45. package/node_modules/@typescript/old/lib/lib.es2017.object.d.ts +47 -0
  46. package/node_modules/@typescript/old/lib/lib.es2017.sharedmemory.d.ts +133 -0
  47. package/node_modules/@typescript/old/lib/lib.es2017.string.d.ts +43 -0
  48. package/node_modules/@typescript/old/lib/lib.es2017.typedarrays.d.ts +51 -0
  49. package/node_modules/@typescript/old/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  50. package/node_modules/@typescript/old/lib/lib.es2018.asynciterable.d.ts +51 -0
  51. package/node_modules/@typescript/old/lib/lib.es2018.d.ts +22 -0
  52. package/node_modules/@typescript/old/lib/lib.es2018.full.d.ts +22 -0
  53. package/node_modules/@typescript/old/lib/lib.es2018.intl.d.ts +81 -0
  54. package/node_modules/@typescript/old/lib/lib.es2018.promise.d.ts +28 -0
  55. package/node_modules/@typescript/old/lib/lib.es2018.regexp.d.ts +35 -0
  56. package/node_modules/@typescript/old/lib/lib.es2019.array.d.ts +77 -0
  57. package/node_modules/@typescript/old/lib/lib.es2019.d.ts +22 -0
  58. package/node_modules/@typescript/old/lib/lib.es2019.full.d.ts +22 -0
  59. package/node_modules/@typescript/old/lib/lib.es2019.intl.d.ts +21 -0
  60. package/node_modules/@typescript/old/lib/lib.es2019.object.d.ts +31 -0
  61. package/node_modules/@typescript/old/lib/lib.es2019.string.d.ts +35 -0
  62. package/node_modules/@typescript/old/lib/lib.es2019.symbol.d.ts +22 -0
  63. package/node_modules/@typescript/old/lib/lib.es2020.bigint.d.ts +763 -0
  64. package/node_modules/@typescript/old/lib/lib.es2020.d.ts +25 -0
  65. package/node_modules/@typescript/old/lib/lib.es2020.date.d.ts +40 -0
  66. package/node_modules/@typescript/old/lib/lib.es2020.full.d.ts +22 -0
  67. package/node_modules/@typescript/old/lib/lib.es2020.intl.d.ts +472 -0
  68. package/node_modules/@typescript/old/lib/lib.es2020.number.d.ts +26 -0
  69. package/node_modules/@typescript/old/lib/lib.es2020.promise.d.ts +45 -0
  70. package/node_modules/@typescript/old/lib/lib.es2020.sharedmemory.d.ts +97 -0
  71. package/node_modules/@typescript/old/lib/lib.es2020.string.d.ts +42 -0
  72. package/node_modules/@typescript/old/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  73. package/node_modules/@typescript/old/lib/lib.es2021.d.ts +21 -0
  74. package/node_modules/@typescript/old/lib/lib.es2021.full.d.ts +22 -0
  75. package/node_modules/@typescript/old/lib/lib.es2021.intl.d.ts +164 -0
  76. package/node_modules/@typescript/old/lib/lib.es2021.promise.d.ts +46 -0
  77. package/node_modules/@typescript/old/lib/lib.es2021.string.d.ts +31 -0
  78. package/node_modules/@typescript/old/lib/lib.es2021.weakref.d.ts +76 -0
  79. package/node_modules/@typescript/old/lib/lib.es2022.array.d.ts +119 -0
  80. package/node_modules/@typescript/old/lib/lib.es2022.d.ts +23 -0
  81. package/node_modules/@typescript/old/lib/lib.es2022.error.d.ts +73 -0
  82. package/node_modules/@typescript/old/lib/lib.es2022.full.d.ts +22 -0
  83. package/node_modules/@typescript/old/lib/lib.es2022.intl.d.ts +143 -0
  84. package/node_modules/@typescript/old/lib/lib.es2022.object.d.ts +24 -0
  85. package/node_modules/@typescript/old/lib/lib.es2022.regexp.d.ts +37 -0
  86. package/node_modules/@typescript/old/lib/lib.es2022.string.d.ts +23 -0
  87. package/node_modules/@typescript/old/lib/lib.es2023.array.d.ts +922 -0
  88. package/node_modules/@typescript/old/lib/lib.es2023.collection.d.ts +19 -0
  89. package/node_modules/@typescript/old/lib/lib.es2023.d.ts +20 -0
  90. package/node_modules/@typescript/old/lib/lib.es2023.full.d.ts +22 -0
  91. package/node_modules/@typescript/old/lib/lib.es2023.intl.d.ts +62 -0
  92. package/node_modules/@typescript/old/lib/lib.es2024.arraybuffer.d.ts +63 -0
  93. package/node_modules/@typescript/old/lib/lib.es2024.collection.d.ts +27 -0
  94. package/node_modules/@typescript/old/lib/lib.es2024.d.ts +24 -0
  95. package/node_modules/@typescript/old/lib/lib.es2024.full.d.ts +22 -0
  96. package/node_modules/@typescript/old/lib/lib.es2024.object.d.ts +27 -0
  97. package/node_modules/@typescript/old/lib/lib.es2024.promise.d.ts +33 -0
  98. package/node_modules/@typescript/old/lib/lib.es2024.regexp.d.ts +23 -0
  99. package/node_modules/@typescript/old/lib/lib.es2024.sharedmemory.d.ts +66 -0
  100. package/node_modules/@typescript/old/lib/lib.es2024.string.d.ts +27 -0
  101. package/node_modules/@typescript/old/lib/lib.es2025.collection.d.ts +94 -0
  102. package/node_modules/@typescript/old/lib/lib.es2025.d.ts +23 -0
  103. package/node_modules/@typescript/old/lib/lib.es2025.float16.d.ts +443 -0
  104. package/node_modules/@typescript/old/lib/lib.es2025.full.d.ts +22 -0
  105. package/node_modules/@typescript/old/lib/lib.es2025.intl.d.ts +200 -0
  106. package/node_modules/@typescript/old/lib/lib.es2025.iterator.d.ts +146 -0
  107. package/node_modules/@typescript/old/lib/lib.es2025.promise.d.ts +32 -0
  108. package/node_modules/@typescript/old/lib/lib.es2025.regexp.d.ts +30 -0
  109. package/node_modules/@typescript/old/lib/lib.es5.d.ts +4599 -0
  110. package/node_modules/@typescript/old/lib/lib.es6.d.ts +21 -0
  111. package/node_modules/@typescript/old/lib/lib.esnext.array.d.ts +33 -0
  112. package/node_modules/@typescript/old/lib/lib.esnext.collection.d.ts +47 -0
  113. package/node_modules/@typescript/old/lib/lib.esnext.d.ts +27 -0
  114. package/node_modules/@typescript/old/lib/lib.esnext.date.d.ts +21 -0
  115. package/node_modules/@typescript/old/lib/lib.esnext.decorators.d.ts +26 -0
  116. package/node_modules/@typescript/old/lib/lib.esnext.disposable.d.ts +191 -0
  117. package/node_modules/@typescript/old/lib/lib.esnext.error.d.ts +22 -0
  118. package/node_modules/@typescript/old/lib/lib.esnext.full.d.ts +22 -0
  119. package/node_modules/@typescript/old/lib/lib.esnext.intl.d.ts +107 -0
  120. package/node_modules/@typescript/old/lib/lib.esnext.sharedmemory.d.ts +23 -0
  121. package/node_modules/@typescript/old/lib/lib.esnext.temporal.d.ts +485 -0
  122. package/node_modules/@typescript/old/lib/lib.esnext.typedarrays.d.ts +90 -0
  123. package/node_modules/@typescript/old/lib/lib.scripthost.d.ts +320 -0
  124. package/node_modules/@typescript/old/lib/lib.webworker.asynciterable.d.ts +18 -0
  125. package/node_modules/@typescript/old/lib/lib.webworker.d.ts +15606 -0
  126. package/node_modules/@typescript/old/lib/lib.webworker.importscripts.d.ts +21 -0
  127. package/node_modules/@typescript/old/lib/lib.webworker.iterable.d.ts +18 -0
  128. package/node_modules/@typescript/old/lib/pl/diagnosticMessages.generated.json +2129 -0
  129. package/node_modules/@typescript/old/lib/pt-br/diagnosticMessages.generated.json +2129 -0
  130. package/node_modules/@typescript/old/lib/ru/diagnosticMessages.generated.json +2125 -0
  131. package/node_modules/@typescript/old/lib/tr/diagnosticMessages.generated.json +2129 -0
  132. package/node_modules/@typescript/old/lib/tsc.js +8 -0
  133. package/node_modules/@typescript/old/lib/tsserver.js +8 -0
  134. package/node_modules/@typescript/old/lib/tsserverlibrary.d.ts +17 -0
  135. package/node_modules/@typescript/old/lib/tsserverlibrary.js +21 -0
  136. package/node_modules/@typescript/old/lib/typesMap.json +497 -0
  137. package/node_modules/@typescript/old/lib/typescript.d.ts +11448 -0
  138. package/node_modules/@typescript/old/lib/typescript.js +201039 -0
  139. package/node_modules/@typescript/old/lib/typingsInstaller.js +8 -0
  140. package/node_modules/@typescript/old/lib/watchGuard.js +53 -0
  141. package/node_modules/@typescript/old/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
  142. package/node_modules/@typescript/old/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
  143. package/node_modules/@typescript/old/package.json +118 -0
  144. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +85 -0
  145. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +797 -0
  146. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +3 -0
  147. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +2 -0
  148. package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.d.ts +2 -0
  149. package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +134 -0
  150. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +36 -0
  151. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +106 -0
  152. package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.d.ts +14 -0
  153. package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.js +26 -0
  154. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.d.ts +2 -0
  155. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +138 -0
  156. package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.d.ts +2 -0
  157. package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +408 -0
  158. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.d.ts +2 -0
  159. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +94 -0
  160. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.d.ts +2 -0
  161. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +179 -0
  162. package/node_modules/@ykdz/template-builtin-presets/package.json +67 -0
  163. package/node_modules/@ykdz/{template-builtin-source/templates/vue-app/.github/dependabot.yml → template-builtin-presets/templates/foundation/.github/dependabot-rust.yml} +13 -0
  164. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.dynamic.template +4 -0
  165. package/node_modules/@ykdz/{template-builtin-source/templates/ts-lib → template-builtin-presets/templates/foundation}/.github/dependabot.yml +5 -0
  166. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.dynamic.template +19 -0
  167. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.cts +14 -0
  168. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/TODO.md.template +5 -0
  169. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +16 -0
  170. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/gitignore +8 -0
  171. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +23 -0
  172. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +29 -0
  173. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/extensions.json +3 -0
  174. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/settings.json +5 -0
  175. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/devcontainer/devcontainer.json +21 -0
  176. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.json +4 -0
  177. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +18 -0
  178. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/.github/dependabot.yml +5 -0
  179. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.github/workflows/check.yml +23 -0
  180. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/extensions.json +3 -0
  181. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/settings.json +5 -0
  182. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.lock +16 -0
  183. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.toml +27 -0
  184. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/devcontainer.json +21 -0
  185. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/rust.Dockerfile +16 -0
  186. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/rust-toolchain.toml +3 -0
  187. package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/node-pnpm.Dockerfile +12 -0
  188. package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/shellcheck.Dockerfile +3 -0
  189. package/node_modules/@ykdz/template-builtin-presets/templates/shared/editor-customization/capabilities.json +38 -0
  190. package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/node/oxlint.config.ts +6 -0
  191. package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/oxfmt.config.ts +3 -0
  192. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/shared/oxc/tsconfig.config.json +2 -2
  193. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +25 -0
  194. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.json +8 -0
  195. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +30 -0
  196. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.test.json +9 -0
  197. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/typescript/run-vue-tsc.ts +12 -0
  198. package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app → template-builtin-presets/templates/ts-lib}/.github/dependabot.yml +5 -0
  199. package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/.github/workflows/check.yml +19 -0
  200. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/src/index.ts +1 -3
  201. package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +13 -0
  202. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/readiness.ts +2 -2
  203. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/types.d.ts +1 -0
  204. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +26 -0
  205. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/drizzle.config.ts +17 -0
  206. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/scripts/prepare-database.ts +45 -0
  207. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +22 -0
  208. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/turbo.json +10 -0
  209. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/Dockerfile +21 -30
  210. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/index/+Page.telefunc.ts +0 -2
  211. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/index/+Page.vue +2 -1
  212. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/playwright.config.ts +1 -1
  213. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/scripts/check-standalone-deployment.ts +83 -21
  214. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/container-entrypoint.sh +33 -0
  215. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/test/e2e/app.spec.ts +3 -1
  216. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +34 -0
  217. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.json +9 -0
  218. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +31 -0
  219. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +11 -0
  220. package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/vike-app/web}/turbo.json +1 -0
  221. package/node_modules/@ykdz/{template-builtin-source/templates/vike-app → template-builtin-presets/templates/vue-app}/.github/dependabot.yml +5 -4
  222. package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app/web → template-builtin-presets/templates/vue-app}/turbo.json +2 -1
  223. package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/typescript/tsconfig.json +8 -0
  224. package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/src/index.ts +3 -0
  225. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/src/server.ts +1 -1
  226. package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/test/app.test.ts +1 -1
  227. package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.build.json +9 -0
  228. package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +25 -0
  229. package/node_modules/@ykdz/template-core/dist/Cargo.toml +1 -1
  230. package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +9 -0
  231. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +54 -12
  232. package/node_modules/@ykdz/template-core/dist/devcontainer.d.ts +11 -3
  233. package/node_modules/@ykdz/template-core/dist/devcontainer.js +17 -3
  234. package/node_modules/@ykdz/template-core/dist/editor-customization.d.ts +5 -9
  235. package/node_modules/@ykdz/template-core/dist/editor-customization.js +8 -46
  236. package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +31 -2
  237. package/node_modules/@ykdz/template-core/dist/module-graph.js +40 -0
  238. package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +43 -0
  239. package/node_modules/@ykdz/template-core/dist/package-contribution.js +24 -0
  240. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +24 -8
  241. package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +42 -0
  242. package/node_modules/@ykdz/template-core/dist/preset-definition.js +1 -0
  243. package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.d.ts +33 -0
  244. package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.js +161 -0
  245. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +8 -1
  246. package/node_modules/@ykdz/template-core/dist/project-github.js +86 -8
  247. package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +20 -0
  248. package/node_modules/@ykdz/template-core/dist/project-linking-v2.js +37 -0
  249. package/node_modules/@ykdz/template-core/dist/renderer.d.ts +40 -5
  250. package/node_modules/@ykdz/template-core/dist/renderer.js +115 -30
  251. package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +21 -15
  252. package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +100 -50
  253. package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.d.ts +45 -0
  254. package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.js +27 -0
  255. package/node_modules/@ykdz/template-core/dist/toolchain-resolution.d.ts +1 -0
  256. package/node_modules/@ykdz/template-core/dist/toolchain-resolution.js +50 -52
  257. package/node_modules/@ykdz/template-core/package.json +10 -8
  258. package/node_modules/semver/LICENSE +15 -0
  259. package/node_modules/semver/README.md +680 -0
  260. package/node_modules/semver/bin/semver.js +195 -0
  261. package/node_modules/semver/classes/comparator.js +143 -0
  262. package/node_modules/semver/classes/index.js +7 -0
  263. package/node_modules/semver/classes/range.js +577 -0
  264. package/node_modules/semver/classes/semver.js +350 -0
  265. package/node_modules/semver/functions/clean.js +8 -0
  266. package/node_modules/semver/functions/cmp.js +54 -0
  267. package/node_modules/semver/functions/coerce.js +62 -0
  268. package/node_modules/semver/functions/compare-build.js +9 -0
  269. package/node_modules/semver/functions/compare-loose.js +5 -0
  270. package/node_modules/semver/functions/compare.js +7 -0
  271. package/node_modules/semver/functions/diff.js +60 -0
  272. package/node_modules/semver/functions/eq.js +5 -0
  273. package/node_modules/semver/functions/gt.js +5 -0
  274. package/node_modules/semver/functions/gte.js +5 -0
  275. package/node_modules/semver/functions/inc.js +21 -0
  276. package/node_modules/semver/functions/lt.js +5 -0
  277. package/node_modules/semver/functions/lte.js +5 -0
  278. package/node_modules/semver/functions/major.js +5 -0
  279. package/node_modules/semver/functions/minor.js +5 -0
  280. package/node_modules/semver/functions/neq.js +5 -0
  281. package/node_modules/semver/functions/parse.js +18 -0
  282. package/node_modules/semver/functions/patch.js +5 -0
  283. package/node_modules/semver/functions/prerelease.js +8 -0
  284. package/node_modules/semver/functions/rcompare.js +5 -0
  285. package/node_modules/semver/functions/rsort.js +5 -0
  286. package/node_modules/semver/functions/satisfies.js +12 -0
  287. package/node_modules/semver/functions/sort.js +5 -0
  288. package/node_modules/semver/functions/truncate.js +48 -0
  289. package/node_modules/semver/functions/valid.js +8 -0
  290. package/node_modules/semver/index.js +93 -0
  291. package/node_modules/semver/internal/constants.js +37 -0
  292. package/node_modules/semver/internal/debug.js +11 -0
  293. package/node_modules/semver/internal/identifiers.js +29 -0
  294. package/node_modules/semver/internal/lrucache.js +42 -0
  295. package/node_modules/semver/internal/parse-options.js +17 -0
  296. package/node_modules/semver/internal/re.js +223 -0
  297. package/node_modules/semver/package.json +78 -0
  298. package/node_modules/semver/preload.js +4 -0
  299. package/node_modules/semver/range.bnf +17 -0
  300. package/node_modules/semver/ranges/gtr.js +6 -0
  301. package/node_modules/semver/ranges/intersects.js +9 -0
  302. package/node_modules/semver/ranges/ltr.js +6 -0
  303. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  304. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  305. package/node_modules/semver/ranges/min-version.js +63 -0
  306. package/node_modules/semver/ranges/outside.js +82 -0
  307. package/node_modules/semver/ranges/simplify.js +49 -0
  308. package/node_modules/semver/ranges/subset.js +249 -0
  309. package/node_modules/semver/ranges/to-comparators.js +10 -0
  310. package/node_modules/semver/ranges/valid.js +13 -0
  311. package/node_modules/typescript/LICENSE.txt +55 -0
  312. package/node_modules/typescript/README.md +9 -0
  313. package/node_modules/typescript/bin/tsc6 +2 -0
  314. package/node_modules/typescript/lib/tsc.js +1 -0
  315. package/node_modules/typescript/lib/tsserverlibrary.d.ts +2 -0
  316. package/node_modules/typescript/lib/tsserverlibrary.js +1 -0
  317. package/node_modules/typescript/lib/typescript.d.ts +2 -0
  318. package/node_modules/typescript/lib/typescript.js +1 -0
  319. package/node_modules/typescript/package.json +39 -0
  320. package/node_modules/valibot/LICENSE.md +9 -0
  321. package/node_modules/valibot/README.md +94 -0
  322. package/node_modules/valibot/dist/index.cjs +7974 -0
  323. package/node_modules/valibot/dist/index.d.cts +16184 -0
  324. package/node_modules/valibot/dist/index.d.mts +16184 -0
  325. package/node_modules/valibot/dist/index.min.cjs +2 -0
  326. package/node_modules/valibot/dist/index.min.mjs +2 -0
  327. package/node_modules/valibot/dist/index.mjs +7663 -0
  328. package/node_modules/valibot/package.json +79 -0
  329. package/package.json +18 -12
  330. package/LICENSE +0 -21
  331. package/node_modules/@ykdz/template-builtin-source/dist/src/index.d.ts +0 -22
  332. package/node_modules/@ykdz/template-builtin-source/dist/src/index.js +0 -103
  333. package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.d.ts +0 -7
  334. package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.js +0 -98
  335. package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.d.ts +0 -2
  336. package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.js +0 -15
  337. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.d.ts +0 -9
  338. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.js +0 -105
  339. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.d.ts +0 -6
  340. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +0 -197
  341. package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.d.ts +0 -5
  342. package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.js +0 -71
  343. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.d.ts +0 -6
  344. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +0 -281
  345. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.d.ts +0 -8
  346. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +0 -154
  347. package/node_modules/@ykdz/template-builtin-source/package.json +0 -93
  348. package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +0 -524
  349. package/node_modules/@ykdz/template-builtin-source/templates/shared/devcontainer/node-pnpm.Dockerfile +0 -6
  350. package/node_modules/@ykdz/template-builtin-source/templates/shared/editor-customization/capabilities.json +0 -56
  351. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/node/oxlint.config.ts +0 -34
  352. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/oxfmt.config.ts +0 -8
  353. package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/vue/oxlint.config.ts +0 -36
  354. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.github/workflows/check.yml +0 -22
  355. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/db/drizzle.config.ts +0 -10
  356. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/container-entrypoint.sh +0 -52
  357. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/prepare-database.sh +0 -6
  358. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/api/src/index.ts +0 -3
  359. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/main.ts +0 -8
  360. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/stores/counter.ts +0 -12
  361. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/style.css +0 -1
  362. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/test/app.test.ts +0 -14
  363. package/node_modules/@ykdz/template-core/dist/declarations.d.ts +0 -2
  364. package/node_modules/@ykdz/template-core/dist/declarations.js +0 -1
  365. package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +0 -76
  366. package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +0 -658
  367. package/node_modules/@ykdz/template-core/dist/generation-context.d.ts +0 -23
  368. package/node_modules/@ykdz/template-core/dist/generation-context.js +0 -20
  369. package/node_modules/@ykdz/template-core/dist/next-step-instructions.d.ts +0 -30
  370. package/node_modules/@ykdz/template-core/dist/next-step-instructions.js +0 -181
  371. package/node_modules/@ykdz/template-core/dist/package-addition-support.d.ts +0 -6
  372. package/node_modules/@ykdz/template-core/dist/package-addition-support.js +0 -2
  373. package/node_modules/@ykdz/template-core/dist/package-addition.d.ts +0 -12
  374. package/node_modules/@ykdz/template-core/dist/package-addition.js +0 -665
  375. package/node_modules/@ykdz/template-core/dist/package-linking.d.ts +0 -75
  376. package/node_modules/@ykdz/template-core/dist/package-linking.js +0 -157
  377. package/node_modules/@ykdz/template-core/dist/preset-projection.d.ts +0 -68
  378. package/node_modules/@ykdz/template-core/dist/preset-projection.js +0 -8
  379. package/node_modules/@ykdz/template-core/dist/preset-source.d.ts +0 -14
  380. package/node_modules/@ykdz/template-core/dist/preset-source.js +0 -294
  381. package/node_modules/@ykdz/template-core/dist/projection-capabilities.d.ts +0 -31
  382. package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +0 -2170
  383. package/node_modules/@ykdz/template-core/dist/runtime-paths.d.ts +0 -1
  384. package/node_modules/@ykdz/template-core/dist/runtime-paths.js +0 -13
  385. package/node_modules/@ykdz/template-shared/dist/index.d.ts +0 -645
  386. package/node_modules/@ykdz/template-shared/dist/index.js +0 -1408
  387. package/node_modules/@ykdz/template-shared/package.json +0 -37
  388. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app/.github/workflows/check.yml → template-builtin-presets/templates/foundation/.github/workflows/check-playwright.yml} +0 -0
  389. /package/node_modules/@ykdz/{template-builtin-source/templates/rust-bin/.github/workflows/check.yml → template-builtin-presets/templates/foundation/.github/workflows/check-rust.yml} +0 -0
  390. /package/node_modules/@ykdz/{template-builtin-source/templates/ts-lib → template-builtin-presets/templates/foundation}/.github/workflows/check.yml +0 -0
  391. /package/node_modules/@ykdz/{template-builtin-source/templates/shared → template-builtin-presets/templates/foundation/rust}/devcontainer/rust.Dockerfile +0 -0
  392. /package/node_modules/@ykdz/{template-builtin-source/templates/rust-bin → template-builtin-presets/templates/foundation/rust}/rust-toolchain.toml +0 -0
  393. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/rustfmt.toml +0 -0
  394. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/src/main.rs +0 -0
  395. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/turbo.json +0 -0
  396. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/shared/devcontainer/browser-test.Dockerfile +0 -0
  397. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/main.ts +0 -0
  398. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/stores/counter.ts +0 -0
  399. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/style.css +0 -0
  400. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/test/app.test.ts +0 -0
  401. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/src/name-schema.ts +0 -0
  402. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/turbo.json +0 -0
  403. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/scripts/seed-example.ts +0 -0
  404. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/db.ts +0 -0
  405. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/index.ts +0 -0
  406. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/queries/todos.ts +0 -0
  407. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/schema.ts +0 -0
  408. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/seed/example.ts +0 -0
  409. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/test/todos.test.ts +0 -0
  410. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/turbo.json +0 -0
  411. /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app/db → template-builtin-presets/templates/vike-app/db-migrations}/drizzle/migrations/20260709120325_old_captain_flint/migration.sql +0 -0
  412. /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app/db → template-builtin-presets/templates/vike-app/db-migrations}/drizzle/migrations/20260709120325_old_captain_flint/snapshot.json +0 -0
  413. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/+server.ts +0 -0
  414. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/.env.example +0 -0
  415. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/Dockerfile.dockerignore +0 -0
  416. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/assets/logo.svg +0 -0
  417. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/components/CounterButton.vue +0 -0
  418. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/components/PageShell.vue +0 -0
  419. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+Head.vue +0 -0
  420. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+Layout.vue +0 -0
  421. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+config.ts +0 -0
  422. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/tailwind.css +0 -0
  423. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/scripts/run-playwright.ts +0 -0
  424. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/server/api.ts +0 -0
  425. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/server/app.ts +0 -0
  426. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/types/env.d.ts +0 -0
  427. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/types/global.d.ts +0 -0
  428. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/vite.config.ts +0 -0
  429. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/vitest.config.ts +0 -0
  430. /package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app → template-builtin-presets/templates/vue-app}/.github/workflows/check.yml +0 -0
  431. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/env.d.ts +0 -0
  432. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/index.html +0 -0
  433. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/playwright.config.ts +0 -0
  434. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/scripts/run-playwright.ts +0 -0
  435. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/src/App.vue +0 -0
  436. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/test/e2e/app.spec.ts +0 -0
  437. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/vite.config.ts +0 -0
  438. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/vitest.config.ts +0 -0
  439. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/src/runtime.ts +0 -0
  440. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/turbo.json +0 -0
  441. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/vitest.config.ts +0 -0
  442. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/env.d.ts +0 -0
  443. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/index.html +0 -0
  444. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/playwright.config.ts +0 -0
  445. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/scripts/run-playwright.ts +0 -0
  446. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/src/App.vue +0 -0
  447. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/src/api.ts +0 -0
  448. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/test/e2e/app.spec.ts +0 -0
  449. /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app → template-builtin-presets/templates/vue-hono-app}/web/turbo.json +0 -0
  450. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/vite.config.ts +0 -0
  451. /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/vitest.config.ts +0 -0
@@ -1,1408 +0,0 @@
1
- import * as v from "valibot";
2
- export const PackageAdditionSupport = {
3
- Supported: "supported",
4
- Unsupported: "unsupported",
5
- };
6
- export const packageAdditionSupportValues = [
7
- PackageAdditionSupport.Supported,
8
- PackageAdditionSupport.Unsupported,
9
- ];
10
- export const packageManagerValues = [
11
- "pnpm",
12
- ];
13
- export const presetGenerationValues = [
14
- "supported",
15
- "future",
16
- ];
17
- export const projectKindValues = [
18
- "single-package",
19
- "multi-package",
20
- ];
21
- export const projectKindJsonSchemaEnum = [
22
- "multi-package",
23
- ];
24
- export const featureNameValues = [
25
- "pnpm-catalog",
26
- "oxc-format-lint",
27
- "strict-typescript",
28
- "root-check",
29
- "fix-command",
30
- "devcontainer",
31
- "github-actions",
32
- "dependabot",
33
- "rustfmt-clippy",
34
- "cargo-test",
35
- "native-binary-release",
36
- ];
37
- export const packageManagerJsonSchemaEnum = packageManagerValues;
38
- export const presetGenerationJsonSchemaEnum = presetGenerationValues;
39
- export const featureNameJsonSchemaEnum = featureNameValues;
40
- export const projectionCapabilityKinds = [
41
- "workspace-library-package",
42
- "workspace-node-packages",
43
- "rust-binary-workspace",
44
- "strict-typescript-root",
45
- "oxc-format-lint",
46
- "node-pnpm-devcontainer",
47
- "github-maintenance",
48
- ];
49
- export const packageLeafNamePattern = "^[a-z0-9][a-z0-9-]*$";
50
- export const presetSourceManifestJsonSchema = {
51
- $schema: "https://json-schema.org/draft/2020-12/schema",
52
- $id: "https://ykdz.dev/schemas/template/preset-source-manifest.schema.json",
53
- title: "Preset Source Manifest",
54
- type: "object",
55
- additionalProperties: false,
56
- required: ["schemaVersion", "name", "presets"],
57
- properties: {
58
- schemaVersion: { const: 1 },
59
- name: { type: "string", minLength: 1 },
60
- sharedResources: {
61
- type: "array",
62
- items: {
63
- type: "object",
64
- additionalProperties: false,
65
- required: ["id", "path"],
66
- properties: {
67
- id: { type: "string", minLength: 1 },
68
- path: { type: "string", minLength: 1 },
69
- },
70
- },
71
- },
72
- presets: {
73
- type: "array",
74
- minItems: 1,
75
- items: {
76
- type: "object",
77
- additionalProperties: false,
78
- required: [
79
- "name",
80
- "title",
81
- "description",
82
- "generation",
83
- "supportedPackageManagers",
84
- "supportedProjectKinds",
85
- "packageAdditionSupport",
86
- "features",
87
- ],
88
- properties: {
89
- name: { type: "string", minLength: 1 },
90
- title: { type: "string", minLength: 1 },
91
- description: { type: "string", minLength: 1 },
92
- generation: { enum: presetGenerationJsonSchemaEnum },
93
- supportedPackageManagers: {
94
- type: "array",
95
- items: { enum: packageManagerJsonSchemaEnum },
96
- uniqueItems: true,
97
- },
98
- supportedProjectKinds: {
99
- type: "array",
100
- minItems: 1,
101
- items: { enum: projectKindJsonSchemaEnum },
102
- uniqueItems: true,
103
- },
104
- packageAdditionSupport: { enum: packageAdditionSupportValues },
105
- features: {
106
- type: "array",
107
- items: { enum: featureNameJsonSchemaEnum },
108
- uniqueItems: true,
109
- },
110
- dependencyCatalog: {
111
- type: "array",
112
- items: { type: "string", minLength: 1 },
113
- uniqueItems: true,
114
- },
115
- projection: {
116
- type: "object",
117
- additionalProperties: false,
118
- required: ["capabilities"],
119
- properties: {
120
- capabilities: {
121
- type: "array",
122
- items: {
123
- oneOf: [
124
- {
125
- type: "object",
126
- additionalProperties: false,
127
- required: [
128
- "kind",
129
- "workspacePackageGlob",
130
- "packageRole",
131
- "packageSourcePreset",
132
- "sourceFiles",
133
- ],
134
- properties: {
135
- kind: { const: "workspace-library-package" },
136
- workspacePackageGlob: { const: "packages/*" },
137
- packageRole: { const: "shared-library" },
138
- packageSourcePreset: { const: "ts-lib" },
139
- sourceFiles: {
140
- type: "array",
141
- minItems: 1,
142
- items: { type: "string", minLength: 1 },
143
- },
144
- },
145
- },
146
- {
147
- type: "object",
148
- additionalProperties: false,
149
- required: ["kind", "workspacePackageGlob", "packages"],
150
- properties: {
151
- kind: { const: "workspace-node-packages" },
152
- workspacePackageGlob: { const: "apps/*" },
153
- packages: {
154
- type: "array",
155
- minItems: 1,
156
- items: {
157
- type: "object",
158
- additionalProperties: false,
159
- required: ["kind", "path", "sourceFiles"],
160
- properties: {
161
- kind: {
162
- enum: ["hono-api", "vike-app", "vue-app"],
163
- },
164
- path: { enum: ["apps/api", "apps/web"] },
165
- sourceFiles: {
166
- type: "array",
167
- minItems: 1,
168
- items: { type: "string", minLength: 1 },
169
- },
170
- },
171
- },
172
- },
173
- packageLinks: {
174
- type: "array",
175
- items: {
176
- type: "object",
177
- additionalProperties: false,
178
- required: [
179
- "consumerPackagePath",
180
- "providerPackagePath",
181
- ],
182
- properties: {
183
- consumerPackagePath: { const: "apps/web" },
184
- providerPackagePath: {
185
- enum: ["apps/api", "packages/db"],
186
- },
187
- },
188
- },
189
- },
190
- },
191
- },
192
- {
193
- type: "object",
194
- additionalProperties: false,
195
- required: [
196
- "kind",
197
- "workspacePackageGlob",
198
- "sourceFiles",
199
- "devcontainerResourceId",
200
- "editorCustomizationResourceId",
201
- ],
202
- properties: {
203
- kind: { const: "rust-binary-workspace" },
204
- workspacePackageGlob: { const: "packages/*" },
205
- sourceFiles: {
206
- type: "array",
207
- minItems: 1,
208
- items: { type: "string", minLength: 1 },
209
- },
210
- devcontainerResourceId: {
211
- type: "string",
212
- minLength: 1,
213
- },
214
- editorCustomizationResourceId: {
215
- type: "string",
216
- minLength: 1,
217
- },
218
- },
219
- },
220
- {
221
- type: "object",
222
- additionalProperties: false,
223
- required: ["kind"],
224
- properties: { kind: { const: "strict-typescript-root" } },
225
- },
226
- {
227
- type: "object",
228
- additionalProperties: false,
229
- required: ["kind", "editorCustomizationResourceId"],
230
- properties: {
231
- kind: { const: "oxc-format-lint" },
232
- editorCustomizationResourceId: {
233
- type: "string",
234
- minLength: 1,
235
- },
236
- },
237
- },
238
- {
239
- type: "object",
240
- additionalProperties: false,
241
- required: ["kind", "devcontainerResourceId"],
242
- properties: {
243
- kind: { const: "node-pnpm-devcontainer" },
244
- devcontainerResourceId: {
245
- type: "string",
246
- minLength: 1,
247
- },
248
- },
249
- },
250
- {
251
- type: "object",
252
- additionalProperties: false,
253
- required: ["kind"],
254
- properties: { kind: { const: "github-maintenance" } },
255
- },
256
- ],
257
- },
258
- },
259
- },
260
- },
261
- source: {
262
- type: "object",
263
- additionalProperties: false,
264
- properties: {
265
- roots: {
266
- type: "array",
267
- items: { type: "string", minLength: 1 },
268
- },
269
- files: {
270
- type: "array",
271
- items: { type: "string", minLength: 1 },
272
- },
273
- sharedResources: {
274
- type: "array",
275
- items: { type: "string", minLength: 1 },
276
- },
277
- },
278
- },
279
- },
280
- },
281
- },
282
- },
283
- };
284
- const nonEmptyString = v.pipe(v.string(), v.minLength(1));
285
- export const presetGenerationSchema = v.picklist(presetGenerationValues);
286
- export const packageManagerSchema = v.picklist(packageManagerValues);
287
- export const projectKindSchema = v.picklist(projectKindValues);
288
- export const featureNameSchema = v.picklist(featureNameValues);
289
- const packageRoleSchema = v.picklist([
290
- "runtime-service",
291
- "shared-library",
292
- ]);
293
- const packageSourcePresetSchema = v.picklist([
294
- "hono-api",
295
- "ts-lib",
296
- "vike-app",
297
- "vue-app",
298
- ]);
299
- const presetSourceManifestPresetSourceSchema = v.strictObject({
300
- roots: v.optional(v.array(nonEmptyString), []),
301
- files: v.optional(v.array(nonEmptyString), []),
302
- sharedResources: v.optional(v.array(nonEmptyString), []),
303
- });
304
- export const presetProjectionDeclarationSchema = v.strictObject({
305
- capabilities: v.array(v.looseObject({
306
- kind: v.string(),
307
- })),
308
- });
309
- export const presetSourceManifestSchema = v.strictObject({
310
- schemaVersion: v.literal(1),
311
- name: nonEmptyString,
312
- sharedResources: v.optional(v.array(v.strictObject({
313
- id: nonEmptyString,
314
- path: nonEmptyString,
315
- })), []),
316
- presets: v.pipe(v.array(v.strictObject({
317
- name: nonEmptyString,
318
- title: nonEmptyString,
319
- description: nonEmptyString,
320
- generation: presetGenerationSchema,
321
- supportedPackageManagers: v.array(packageManagerSchema),
322
- supportedProjectKinds: v.pipe(v.array(projectKindSchema), v.minLength(1)),
323
- packageAdditionSupport: v.picklist(packageAdditionSupportValues),
324
- features: v.array(featureNameSchema),
325
- dependencyCatalog: v.optional(v.array(nonEmptyString), []),
326
- projection: v.optional(presetProjectionDeclarationSchema),
327
- source: v.optional(presetSourceManifestPresetSourceSchema),
328
- })), v.minLength(1)),
329
- });
330
- export const presetFileJsonSchema = {
331
- $schema: "https://json-schema.org/draft/2020-12/schema",
332
- $id: "https://ykdz.dev/schemas/project-kit/preset-file.schema.json",
333
- title: "Project Kit Preset File",
334
- type: "object",
335
- additionalProperties: false,
336
- required: [
337
- "schemaVersion",
338
- "name",
339
- "title",
340
- "description",
341
- "supportedPackageManagers",
342
- "supportedProjectKinds",
343
- "features",
344
- ],
345
- properties: {
346
- schemaVersion: { const: 1 },
347
- name: { type: "string", minLength: 1 },
348
- title: { type: "string", minLength: 1 },
349
- description: { type: "string", minLength: 1 },
350
- supportedPackageManagers: {
351
- type: "array",
352
- items: { enum: packageManagerJsonSchemaEnum },
353
- uniqueItems: true,
354
- },
355
- supportedProjectKinds: {
356
- type: "array",
357
- minItems: 1,
358
- items: { enum: projectKindJsonSchemaEnum },
359
- uniqueItems: true,
360
- },
361
- features: {
362
- type: "array",
363
- items: { enum: featureNameJsonSchemaEnum },
364
- uniqueItems: true,
365
- },
366
- },
367
- };
368
- export const blueprintJsonSchema = {
369
- $schema: "https://json-schema.org/draft/2020-12/schema",
370
- $id: "https://ykdz.dev/schemas/project-kit/blueprint.schema.json",
371
- title: "Project Kit Blueprint",
372
- type: "object",
373
- additionalProperties: false,
374
- required: ["schemaVersion", "preset", "projectKind", "features"],
375
- properties: {
376
- schemaVersion: { const: 1 },
377
- preset: { type: "string", minLength: 1 },
378
- packageManager: { enum: packageManagerJsonSchemaEnum },
379
- projectKind: { enum: projectKindJsonSchemaEnum },
380
- features: {
381
- type: "array",
382
- items: { enum: featureNameJsonSchemaEnum },
383
- uniqueItems: true,
384
- },
385
- packages: {
386
- type: "array",
387
- items: {
388
- type: "object",
389
- additionalProperties: false,
390
- required: ["name", "path"],
391
- properties: {
392
- name: { type: "string", minLength: 1 },
393
- path: { type: "string", minLength: 1 },
394
- role: { enum: ["runtime-service", "shared-library"] },
395
- sourcePreset: { enum: ["hono-api", "ts-lib", "vike-app", "vue-app"] },
396
- },
397
- },
398
- },
399
- packageLinkIntents: {
400
- type: "array",
401
- items: {
402
- type: "object",
403
- additionalProperties: false,
404
- required: ["consumerPackagePath", "providerPackagePath"],
405
- properties: {
406
- consumerPackagePath: { type: "string", minLength: 1 },
407
- providerPackagePath: { type: "string", minLength: 1 },
408
- },
409
- },
410
- },
411
- },
412
- };
413
- export const presetFileSchema = v.strictObject({
414
- schemaVersion: v.literal(1),
415
- name: nonEmptyString,
416
- title: nonEmptyString,
417
- description: nonEmptyString,
418
- supportedPackageManagers: v.array(packageManagerSchema),
419
- supportedProjectKinds: v.pipe(v.array(projectKindSchema), v.minLength(1)),
420
- features: v.array(featureNameSchema),
421
- });
422
- export const projectBlueprintSchema = v.strictObject({
423
- schemaVersion: v.literal(1),
424
- preset: nonEmptyString,
425
- packageManager: v.optional(packageManagerSchema),
426
- projectKind: projectKindSchema,
427
- features: v.array(featureNameSchema),
428
- packages: v.optional(v.array(v.strictObject({
429
- name: nonEmptyString,
430
- path: nonEmptyString,
431
- role: v.optional(packageRoleSchema),
432
- sourcePreset: v.optional(packageSourcePresetSchema),
433
- }))),
434
- packageLinkIntents: v.optional(v.array(v.strictObject({
435
- consumerPackagePath: nonEmptyString,
436
- providerPackagePath: nonEmptyString,
437
- }))),
438
- });
439
- function formatIssuePath(issue) {
440
- if (!issue.path || issue.path.length === 0) {
441
- return "$";
442
- }
443
- return issue.path.reduce((path, item) => `${path}.${String(item.key)}`, "$");
444
- }
445
- function shapeIssues(issues) {
446
- return issues.map((issue) => ({
447
- path: formatIssuePath(issue),
448
- message: issue.message,
449
- }));
450
- }
451
- function duplicateIssues(values, path) {
452
- const seen = new Set();
453
- const duplicates = new Set();
454
- for (const value of values) {
455
- if (seen.has(value)) {
456
- duplicates.add(value);
457
- }
458
- seen.add(value);
459
- }
460
- return [...duplicates].map((value) => ({
461
- path,
462
- message: `Duplicate value: ${value}`,
463
- }));
464
- }
465
- function generationSupportIssue(preset, path) {
466
- if (preset.generation === "supported") {
467
- return undefined;
468
- }
469
- return {
470
- path,
471
- message: `Preset ${preset.name} is not supported for generation in this version`,
472
- };
473
- }
474
- function unsupportedSinglePackageProjectShapeIssue(path) {
475
- return {
476
- path,
477
- message: "single-package Project Shape is unsupported in V1; use the workspace monorepo Project Shape",
478
- };
479
- }
480
- function formatBracketIssuePath(issue) {
481
- if (!issue.path || issue.path.length === 0) {
482
- return "$";
483
- }
484
- return issue.path.reduce((issuePath, item) => {
485
- if (typeof item.key === "number") {
486
- return `${issuePath}[${item.key}]`;
487
- }
488
- return `${issuePath}.${String(item.key)}`;
489
- }, "$");
490
- }
491
- function presetSourceShapeIssues(issues) {
492
- return issues.map((issue) => {
493
- const validationPath = formatBracketIssuePath(issue);
494
- const missingPresetMetadata = validationPath.match(/^\$\.presets\[\d+\]\.(.+)$/);
495
- if (missingPresetMetadata && issue.message.includes("received undefined")) {
496
- return {
497
- path: validationPath,
498
- message: `Preset metadata is missing required field: ${missingPresetMetadata[1]}`,
499
- };
500
- }
501
- if (issue.message.startsWith("Invalid key:") &&
502
- validationPath === "$.fixtureMatrix") {
503
- return {
504
- path: validationPath,
505
- message: "Preset Source Manifests must contain production facts only; remove fixtureMatrix",
506
- };
507
- }
508
- if (issue.message.startsWith("Invalid key:") &&
509
- /\.(body|content|text)$/.test(validationPath)) {
510
- const key = validationPath.split(".").at(-1);
511
- return {
512
- path: validationPath,
513
- message: `Preset Source Manifests must reference Generated Repository file bodies by path, not inline ${key}`,
514
- };
515
- }
516
- return {
517
- path: validationPath,
518
- message: validationPath.match(/^\$\.presets\[\d+\]\.packageAdditionSupport$/)
519
- ? "Package Addition Support must be one of: supported, unsupported"
520
- : issue.message,
521
- };
522
- });
523
- }
524
- function duplicatePresetNameIssues(presets) {
525
- const seen = new Set();
526
- const duplicates = new Set();
527
- for (const preset of presets) {
528
- if (seen.has(preset.name)) {
529
- duplicates.add(preset.name);
530
- }
531
- seen.add(preset.name);
532
- }
533
- return [...duplicates].map((name) => ({
534
- path: "$.presets.name",
535
- message: `Duplicate Preset name: ${name}`,
536
- }));
537
- }
538
- function duplicateValueIssues(values, validationPath) {
539
- const seen = new Set();
540
- const duplicates = new Set();
541
- for (const value of values) {
542
- if (seen.has(value)) {
543
- duplicates.add(value);
544
- }
545
- seen.add(value);
546
- }
547
- return [...duplicates].map((value) => ({
548
- path: validationPath,
549
- message: `Duplicate value: ${value}`,
550
- }));
551
- }
552
- function duplicatePresetMetadataArrayIssues(presets) {
553
- return presets.flatMap((preset, index) => [
554
- ...duplicateValueIssues(preset.supportedPackageManagers, `$.presets[${index}].supportedPackageManagers`),
555
- ...duplicateValueIssues(preset.supportedProjectKinds, `$.presets[${index}].supportedProjectKinds`),
556
- ...duplicateValueIssues(preset.features, `$.presets[${index}].features`),
557
- ...duplicateValueIssues(preset.dependencyCatalog ?? [], `$.presets[${index}].dependencyCatalog`),
558
- ]);
559
- }
560
- function unsupportedProjectShapeIssues(presets) {
561
- return presets.flatMap((preset, index) => preset.supportedProjectKinds.includes("single-package")
562
- ? [
563
- {
564
- path: `$.presets[${index}].supportedProjectKinds`,
565
- message: "single-package Project Shape is unsupported in V1; use the workspace monorepo Project Shape",
566
- },
567
- ]
568
- : []);
569
- }
570
- function isRecord(value) {
571
- return typeof value === "object" && value !== null && !Array.isArray(value);
572
- }
573
- function nonEmptyStringArray(value) {
574
- const strings = [];
575
- for (const entry of value) {
576
- if (typeof entry !== "string" || entry.length === 0) {
577
- return undefined;
578
- }
579
- strings.push(entry);
580
- }
581
- return strings.length === 0 ? undefined : strings;
582
- }
583
- const projectionCapabilityKindSet = new Set(projectionCapabilityKinds);
584
- const workspaceNodePackageKindSet = new Set([
585
- "hono-api",
586
- "vike-app",
587
- "vue-app",
588
- ]);
589
- const workspaceNodePackagePathSet = new Set(["apps/api", "apps/web"]);
590
- function isProjectionCapabilityKind(value) {
591
- return projectionCapabilityKindSet.has(value);
592
- }
593
- function isWorkspaceNodePackageKind(value) {
594
- return typeof value === "string" && workspaceNodePackageKindSet.has(value);
595
- }
596
- function isWorkspaceNodePackagePath(value) {
597
- return typeof value === "string" && workspaceNodePackagePathSet.has(value);
598
- }
599
- const exactCapabilityKeys = {
600
- "workspace-library-package": [
601
- "kind",
602
- "workspacePackageGlob",
603
- "packageRole",
604
- "packageSourcePreset",
605
- "sourceFiles",
606
- ],
607
- "workspace-node-packages": [
608
- "kind",
609
- "workspacePackageGlob",
610
- "packages",
611
- "packageLinks",
612
- ],
613
- "rust-binary-workspace": [
614
- "kind",
615
- "workspacePackageGlob",
616
- "sourceFiles",
617
- "cargoDependencies",
618
- "devcontainerResourceId",
619
- "editorCustomizationResourceId",
620
- ],
621
- "strict-typescript-root": ["kind"],
622
- "oxc-format-lint": ["kind", "editorCustomizationResourceId"],
623
- "node-pnpm-devcontainer": ["kind", "devcontainerResourceId"],
624
- "github-maintenance": ["kind"],
625
- };
626
- const requiredPlanCapabilityProviders = [
627
- { kind: "strict-typescript-root", label: "root check command" },
628
- { kind: "oxc-format-lint", label: "fix command" },
629
- { kind: "github-maintenance", label: "GitHub Actions maintenance" },
630
- { kind: "github-maintenance", label: "Dependabot maintenance" },
631
- { kind: "node-pnpm-devcontainer", label: "development container support" },
632
- ];
633
- function unknownCapabilityPropertyIssues(kind, capability, pathPrefix) {
634
- const allowedKeys = new Set(exactCapabilityKeys[kind]);
635
- return Object.keys(capability)
636
- .filter((key) => !allowedKeys.has(key))
637
- .map((key) => ({
638
- path: `${pathPrefix}.${key}`,
639
- message: `Projection Capability ${kind} does not support property: ${key}`,
640
- }));
641
- }
642
- function parseWorkspaceLibraryPackageCapability(capability, pathPrefix) {
643
- const issues = [];
644
- let sourceFiles = [];
645
- if (capability.workspacePackageGlob !== "packages/*") {
646
- issues.push({
647
- path: `${pathPrefix}.workspacePackageGlob`,
648
- message: "workspace-library-package currently supports workspacePackageGlob: packages/*",
649
- });
650
- }
651
- if (capability.packageRole !== "shared-library") {
652
- issues.push({
653
- path: `${pathPrefix}.packageRole`,
654
- message: "workspace-library-package currently supports packageRole: shared-library",
655
- });
656
- }
657
- if (capability.packageSourcePreset !== "ts-lib") {
658
- issues.push({
659
- path: `${pathPrefix}.packageSourcePreset`,
660
- message: "workspace-library-package currently supports packageSourcePreset: ts-lib",
661
- });
662
- }
663
- if (!Array.isArray(capability.sourceFiles)) {
664
- issues.push({
665
- path: `${pathPrefix}.sourceFiles`,
666
- message: "workspace-library-package sourceFiles must be a non-empty array",
667
- });
668
- }
669
- else {
670
- const parsedSourceFiles = nonEmptyStringArray(capability.sourceFiles);
671
- if (parsedSourceFiles === undefined) {
672
- issues.push({
673
- path: `${pathPrefix}.sourceFiles`,
674
- message: "workspace-library-package sourceFiles must be a non-empty array of paths",
675
- });
676
- }
677
- else {
678
- sourceFiles = parsedSourceFiles;
679
- }
680
- }
681
- if (issues.length > 0) {
682
- return issues;
683
- }
684
- return {
685
- kind: "workspace-library-package",
686
- workspacePackageGlob: "packages/*",
687
- packageRole: "shared-library",
688
- packageSourcePreset: "ts-lib",
689
- sourceFiles,
690
- };
691
- }
692
- function parseWorkspaceNodePackage(value, pathPrefix) {
693
- const issues = [];
694
- if (!isRecord(value)) {
695
- return [
696
- {
697
- path: pathPrefix,
698
- message: "workspace-node-packages package must be an object",
699
- },
700
- ];
701
- }
702
- const kind = isWorkspaceNodePackageKind(value.kind) ? value.kind : undefined;
703
- const packagePath = isWorkspaceNodePackagePath(value.path)
704
- ? value.path
705
- : undefined;
706
- let sourceFiles = [];
707
- if (kind === undefined) {
708
- issues.push({
709
- path: `${pathPrefix}.kind`,
710
- message: "workspace-node-packages package kind must be hono-api, vike-app, or vue-app",
711
- });
712
- }
713
- if (packagePath === undefined) {
714
- issues.push({
715
- path: `${pathPrefix}.path`,
716
- message: "workspace-node-packages package path must be apps/api or apps/web",
717
- });
718
- }
719
- if (!Array.isArray(value.sourceFiles)) {
720
- issues.push({
721
- path: `${pathPrefix}.sourceFiles`,
722
- message: "workspace-node-packages package sourceFiles must be a non-empty array",
723
- });
724
- }
725
- else {
726
- const parsedSourceFiles = nonEmptyStringArray(value.sourceFiles);
727
- if (parsedSourceFiles === undefined) {
728
- issues.push({
729
- path: `${pathPrefix}.sourceFiles`,
730
- message: "workspace-node-packages package sourceFiles must be a non-empty array of paths",
731
- });
732
- }
733
- else {
734
- sourceFiles = parsedSourceFiles;
735
- }
736
- }
737
- const allowedKeys = new Set(["kind", "path", "sourceFiles"]);
738
- for (const key of Object.keys(value)) {
739
- if (!allowedKeys.has(key)) {
740
- issues.push({
741
- path: `${pathPrefix}.${key}`,
742
- message: `workspace-node-packages package does not support property: ${key}`,
743
- });
744
- }
745
- }
746
- if (issues.length > 0) {
747
- return issues;
748
- }
749
- if (kind === undefined || packagePath === undefined) {
750
- throw new Error(`workspace-node-packages package validation failed without diagnostics at ${pathPrefix}`);
751
- }
752
- return {
753
- kind,
754
- path: packagePath,
755
- sourceFiles,
756
- };
757
- }
758
- function parseWorkspaceNodePackageLinks(value, pathPrefix, declaredPackagePaths, issues) {
759
- if (!Array.isArray(value)) {
760
- issues.push({
761
- path: pathPrefix,
762
- message: "workspace-node-packages packageLinks must be an array",
763
- });
764
- return undefined;
765
- }
766
- return value.flatMap((link, linkIndex) => {
767
- const linkPath = `${pathPrefix}[${linkIndex}]`;
768
- const linkIssues = [];
769
- if (!isRecord(link)) {
770
- issues.push({
771
- path: linkPath,
772
- message: "workspace-node-packages packageLink must be an object",
773
- });
774
- return [];
775
- }
776
- const allowedKeys = new Set(["consumerPackagePath", "providerPackagePath"]);
777
- for (const key of Object.keys(link)) {
778
- if (!allowedKeys.has(key)) {
779
- linkIssues.push({
780
- path: `${linkPath}.${key}`,
781
- message: `workspace-node-packages packageLink does not support property: ${key}`,
782
- });
783
- }
784
- }
785
- const consumerPackagePath = typeof link.consumerPackagePath === "string"
786
- ? link.consumerPackagePath
787
- : undefined;
788
- const providerPackagePath = typeof link.providerPackagePath === "string"
789
- ? link.providerPackagePath
790
- : undefined;
791
- const isSupportedLink = consumerPackagePath === "apps/web" &&
792
- (providerPackagePath === "apps/api" ||
793
- providerPackagePath === "packages/db");
794
- if (!isSupportedLink) {
795
- linkIssues.push({
796
- path: linkPath,
797
- message: "workspace-node-packages currently supports links from apps/web to apps/api or packages/db",
798
- });
799
- }
800
- else {
801
- if (!declaredPackagePaths.has(consumerPackagePath)) {
802
- linkIssues.push({
803
- path: `${linkPath}.consumerPackagePath`,
804
- message: "workspace-node-packages packageLink consumerPackagePath must reference a package declared in the same packages array: apps/web",
805
- });
806
- }
807
- if (providerPackagePath !== "packages/db" &&
808
- !declaredPackagePaths.has(providerPackagePath)) {
809
- linkIssues.push({
810
- path: `${linkPath}.providerPackagePath`,
811
- message: "workspace-node-packages packageLink providerPackagePath must reference a package declared in the same packages array or the vike db package: apps/api, packages/db",
812
- });
813
- }
814
- }
815
- if (linkIssues.length > 0) {
816
- issues.push(...linkIssues);
817
- return [];
818
- }
819
- return [
820
- {
821
- consumerPackagePath: "apps/web",
822
- providerPackagePath: providerPackagePath,
823
- },
824
- ];
825
- });
826
- }
827
- function parseWorkspaceNodePackagesCapability(capability, pathPrefix) {
828
- const issues = [];
829
- const workspacePackageGlob = capability.workspacePackageGlob === "apps/*"
830
- ? capability.workspacePackageGlob
831
- : undefined;
832
- if (workspacePackageGlob === undefined) {
833
- issues.push({
834
- path: `${pathPrefix}.workspacePackageGlob`,
835
- message: "workspace-node-packages currently supports workspacePackageGlob: apps/*",
836
- });
837
- }
838
- if (!Array.isArray(capability.packages) || capability.packages.length === 0) {
839
- issues.push({
840
- path: `${pathPrefix}.packages`,
841
- message: "workspace-node-packages packages must be a non-empty array",
842
- });
843
- }
844
- const packages = Array.isArray(capability.packages)
845
- ? capability.packages.flatMap((nodePackage, packageIndex) => {
846
- const packagePath = `${pathPrefix}.packages[${packageIndex}]`;
847
- const parsed = parseWorkspaceNodePackage(nodePackage, packagePath);
848
- if (Array.isArray(parsed)) {
849
- issues.push(...parsed);
850
- return [];
851
- }
852
- return [parsed];
853
- })
854
- : [];
855
- const packageLinks = capability.packageLinks === undefined
856
- ? undefined
857
- : parseWorkspaceNodePackageLinks(capability.packageLinks, `${pathPrefix}.packageLinks`, new Set(packages.map((nodePackage) => nodePackage.path)), issues);
858
- if (issues.length > 0) {
859
- return issues;
860
- }
861
- if (workspacePackageGlob === undefined) {
862
- throw new Error(`workspace-node-packages validation failed without workspacePackageGlob diagnostic at ${pathPrefix}`);
863
- }
864
- return {
865
- kind: "workspace-node-packages",
866
- workspacePackageGlob,
867
- packages,
868
- ...(packageLinks === undefined ? {} : { packageLinks }),
869
- };
870
- }
871
- function parseRustBinaryWorkspaceCapability(capability, pathPrefix) {
872
- const issues = [];
873
- let sourceFiles = [];
874
- let cargoDependencies = [];
875
- let devcontainerResourceId = "";
876
- let editorCustomizationResourceId = "";
877
- if (capability.workspacePackageGlob !== "packages/*") {
878
- issues.push({
879
- path: `${pathPrefix}.workspacePackageGlob`,
880
- message: "rust-binary-workspace currently supports workspacePackageGlob: packages/*",
881
- });
882
- }
883
- if (!Array.isArray(capability.sourceFiles)) {
884
- issues.push({
885
- path: `${pathPrefix}.sourceFiles`,
886
- message: "rust-binary-workspace sourceFiles must be a non-empty array",
887
- });
888
- }
889
- else {
890
- const parsedSourceFiles = nonEmptyStringArray(capability.sourceFiles);
891
- if (parsedSourceFiles === undefined) {
892
- issues.push({
893
- path: `${pathPrefix}.sourceFiles`,
894
- message: "rust-binary-workspace sourceFiles must be a non-empty array of paths",
895
- });
896
- }
897
- else {
898
- sourceFiles = parsedSourceFiles;
899
- }
900
- }
901
- if (capability.cargoDependencies !== undefined) {
902
- if (!Array.isArray(capability.cargoDependencies)) {
903
- issues.push({
904
- path: `${pathPrefix}.cargoDependencies`,
905
- message: "rust-binary-workspace cargoDependencies must be an array",
906
- });
907
- }
908
- else {
909
- const parsedCargoDependencies = nonEmptyStringArray(capability.cargoDependencies);
910
- if (parsedCargoDependencies === undefined) {
911
- issues.push({
912
- path: `${pathPrefix}.cargoDependencies`,
913
- message: "rust-binary-workspace cargoDependencies must be an array of dependency names",
914
- });
915
- }
916
- else {
917
- cargoDependencies = parsedCargoDependencies;
918
- }
919
- }
920
- }
921
- if (typeof capability.devcontainerResourceId !== "string" ||
922
- capability.devcontainerResourceId.length === 0) {
923
- issues.push({
924
- path: `${pathPrefix}.devcontainerResourceId`,
925
- message: "rust-binary-workspace must declare a devcontainerResourceId Shared Resource id",
926
- });
927
- }
928
- else {
929
- devcontainerResourceId = capability.devcontainerResourceId;
930
- }
931
- if (typeof capability.editorCustomizationResourceId !== "string" ||
932
- capability.editorCustomizationResourceId.length === 0) {
933
- issues.push({
934
- path: `${pathPrefix}.editorCustomizationResourceId`,
935
- message: "rust-binary-workspace must declare an editorCustomizationResourceId Shared Resource id",
936
- });
937
- }
938
- else {
939
- editorCustomizationResourceId = capability.editorCustomizationResourceId;
940
- }
941
- if (issues.length > 0) {
942
- return issues;
943
- }
944
- return {
945
- kind: "rust-binary-workspace",
946
- workspacePackageGlob: "packages/*",
947
- sourceFiles,
948
- ...(cargoDependencies.length === 0 ? {} : { cargoDependencies }),
949
- devcontainerResourceId,
950
- editorCustomizationResourceId,
951
- };
952
- }
953
- function parseOxcFormatLintCapability(capability, pathPrefix) {
954
- if (typeof capability.editorCustomizationResourceId !== "string" ||
955
- capability.editorCustomizationResourceId.length === 0) {
956
- return [
957
- {
958
- path: `${pathPrefix}.editorCustomizationResourceId`,
959
- message: "oxc-format-lint must declare an editorCustomizationResourceId Shared Resource id",
960
- },
961
- ];
962
- }
963
- return {
964
- kind: "oxc-format-lint",
965
- editorCustomizationResourceId: capability.editorCustomizationResourceId,
966
- };
967
- }
968
- function parseNodePnpmDevcontainerCapability(capability, pathPrefix) {
969
- if (typeof capability.devcontainerResourceId !== "string" ||
970
- capability.devcontainerResourceId.length === 0) {
971
- return [
972
- {
973
- path: `${pathPrefix}.devcontainerResourceId`,
974
- message: "node-pnpm-devcontainer must declare a devcontainerResourceId Shared Resource id",
975
- },
976
- ];
977
- }
978
- return {
979
- kind: "node-pnpm-devcontainer",
980
- devcontainerResourceId: capability.devcontainerResourceId,
981
- };
982
- }
983
- function duplicateCapabilityIssues(capabilities) {
984
- const firstSeen = new Map();
985
- const issues = [];
986
- capabilities.forEach((capability, index) => {
987
- const firstIndex = firstSeen.get(capability.kind);
988
- if (firstIndex === undefined) {
989
- firstSeen.set(capability.kind, index);
990
- return;
991
- }
992
- issues.push({
993
- path: `$.capabilities[${index}].kind`,
994
- message: `Duplicate Projection Capability kind: ${capability.kind}`,
995
- });
996
- });
997
- return issues;
998
- }
999
- function uniqueValues(values) {
1000
- return [...new Set(values)];
1001
- }
1002
- function capabilityCompositionIssues(capabilities) {
1003
- const kinds = new Set(capabilities.map((capability) => capability.kind));
1004
- const issues = [];
1005
- const companionKinds = uniqueValues(capabilities
1006
- .map((capability) => capability.kind)
1007
- .filter((kind) => kind !== "rust-binary-workspace"));
1008
- if (kinds.has("rust-binary-workspace") && companionKinds.length > 0) {
1009
- issues.push({
1010
- path: "$.capabilities",
1011
- message: "rust-binary-workspace is a complete domain capability and must be selected by itself; remove companion Projection Capabilities: " +
1012
- companionKinds.join(", "),
1013
- });
1014
- return issues;
1015
- }
1016
- if (!kinds.has("workspace-library-package") &&
1017
- !kinds.has("workspace-node-packages") &&
1018
- !kinds.has("rust-binary-workspace")) {
1019
- issues.push({
1020
- path: "$.capabilities",
1021
- message: "Projection Capability composition must include a workspace package layout capability",
1022
- });
1023
- }
1024
- if (kinds.has("strict-typescript-root") &&
1025
- !kinds.has("workspace-library-package") &&
1026
- !kinds.has("workspace-node-packages")) {
1027
- issues.push({
1028
- path: "$.capabilities",
1029
- message: "strict-typescript-root requires a workspace package layout so package typecheck tasks have a workspace target",
1030
- });
1031
- }
1032
- if (kinds.has("node-pnpm-devcontainer") && !kinds.has("oxc-format-lint")) {
1033
- issues.push({
1034
- path: "$.capabilities",
1035
- message: "node-pnpm-devcontainer requires oxc-format-lint so editor customization is derived from declared tooling",
1036
- });
1037
- }
1038
- for (const requirement of requiredPlanCapabilityProviders) {
1039
- if (!kinds.has(requirement.kind) && !kinds.has("rust-binary-workspace")) {
1040
- issues.push({
1041
- path: "$.capabilities",
1042
- message: `Projection Capability composition must include ${requirement.kind} to provide ${requirement.label}`,
1043
- });
1044
- }
1045
- }
1046
- return issues;
1047
- }
1048
- export function validatePresetProjectionDeclaration(input) {
1049
- if (!isRecord(input) || !Array.isArray(input.capabilities)) {
1050
- return {
1051
- ok: false,
1052
- issues: [
1053
- {
1054
- path: "$.capabilities",
1055
- message: "Projection Declaration must select Projection Capabilities",
1056
- },
1057
- ],
1058
- };
1059
- }
1060
- const issues = [];
1061
- const capabilities = [];
1062
- input.capabilities.forEach((capability, index) => {
1063
- const pathPrefix = `$.capabilities[${index}]`;
1064
- if (!isRecord(capability)) {
1065
- issues.push({
1066
- path: pathPrefix,
1067
- message: "Projection Capability must be an object",
1068
- });
1069
- return;
1070
- }
1071
- if (typeof capability.kind !== "string") {
1072
- issues.push({
1073
- path: `${pathPrefix}.kind`,
1074
- message: "Projection Capability kind is required",
1075
- });
1076
- return;
1077
- }
1078
- if (!isProjectionCapabilityKind(capability.kind)) {
1079
- issues.push({
1080
- path: `${pathPrefix}.kind`,
1081
- message: `Unknown Projection Capability kind: ${capability.kind}`,
1082
- });
1083
- return;
1084
- }
1085
- const kind = capability.kind;
1086
- issues.push(...unknownCapabilityPropertyIssues(kind, capability, pathPrefix));
1087
- if (kind === "workspace-library-package") {
1088
- const workspaceCapability = parseWorkspaceLibraryPackageCapability(capability, pathPrefix);
1089
- if (Array.isArray(workspaceCapability)) {
1090
- issues.push(...workspaceCapability);
1091
- return;
1092
- }
1093
- capabilities.push(workspaceCapability);
1094
- return;
1095
- }
1096
- if (kind === "workspace-node-packages") {
1097
- const workspaceCapability = parseWorkspaceNodePackagesCapability(capability, pathPrefix);
1098
- if (Array.isArray(workspaceCapability)) {
1099
- issues.push(...workspaceCapability);
1100
- return;
1101
- }
1102
- capabilities.push(workspaceCapability);
1103
- return;
1104
- }
1105
- if (kind === "rust-binary-workspace") {
1106
- const workspaceCapability = parseRustBinaryWorkspaceCapability(capability, pathPrefix);
1107
- if (Array.isArray(workspaceCapability)) {
1108
- issues.push(...workspaceCapability);
1109
- return;
1110
- }
1111
- capabilities.push(workspaceCapability);
1112
- return;
1113
- }
1114
- if (kind === "oxc-format-lint") {
1115
- const oxcFormatLintCapability = parseOxcFormatLintCapability(capability, pathPrefix);
1116
- if (Array.isArray(oxcFormatLintCapability)) {
1117
- issues.push(...oxcFormatLintCapability);
1118
- return;
1119
- }
1120
- capabilities.push(oxcFormatLintCapability);
1121
- return;
1122
- }
1123
- if (kind === "node-pnpm-devcontainer") {
1124
- const nodePnpmDevcontainerCapability = parseNodePnpmDevcontainerCapability(capability, pathPrefix);
1125
- if (Array.isArray(nodePnpmDevcontainerCapability)) {
1126
- issues.push(...nodePnpmDevcontainerCapability);
1127
- return;
1128
- }
1129
- capabilities.push(nodePnpmDevcontainerCapability);
1130
- return;
1131
- }
1132
- capabilities.push({ kind });
1133
- });
1134
- if (issues.length === 0) {
1135
- issues.push(...duplicateCapabilityIssues(capabilities));
1136
- issues.push(...capabilityCompositionIssues(capabilities));
1137
- }
1138
- if (issues.length > 0) {
1139
- return { ok: false, issues };
1140
- }
1141
- return { ok: true, value: { capabilities } };
1142
- }
1143
- export function projectionCapabilityIssues(presets) {
1144
- return presets.flatMap((preset, presetIndex) => {
1145
- if (preset.projection === undefined) {
1146
- return [];
1147
- }
1148
- const result = validatePresetProjectionDeclaration(preset.projection);
1149
- return result.ok
1150
- ? []
1151
- : result.issues.map((issue) => ({
1152
- path: `$.presets[${presetIndex}].projection${issue.path.slice(1)}`,
1153
- message: issue.message,
1154
- }));
1155
- });
1156
- }
1157
- function projectionCapabilitySharedResourceIssues(manifest) {
1158
- const sharedResourceIds = new Set(manifest.sharedResources.map((resource) => resource.id));
1159
- const issues = [];
1160
- manifest.presets.forEach((preset, presetIndex) => {
1161
- if (preset.projection === undefined) {
1162
- return;
1163
- }
1164
- const result = validatePresetProjectionDeclaration(preset.projection);
1165
- if (!result.ok) {
1166
- return;
1167
- }
1168
- result.value.capabilities.forEach((capability, capabilityIndex) => {
1169
- if (capability.kind === "oxc-format-lint") {
1170
- const resourceId = capability.editorCustomizationResourceId;
1171
- if (!sharedResourceIds.has(resourceId)) {
1172
- issues.push({
1173
- path: `$.presets[${presetIndex}].projection.capabilities[${capabilityIndex}].editorCustomizationResourceId`,
1174
- message: `Projection Capability oxc-format-lint references undeclared Shared Resource: ${resourceId}`,
1175
- });
1176
- }
1177
- }
1178
- if (capability.kind === "node-pnpm-devcontainer") {
1179
- const resourceId = capability.devcontainerResourceId;
1180
- if (!sharedResourceIds.has(resourceId)) {
1181
- issues.push({
1182
- path: `$.presets[${presetIndex}].projection.capabilities[${capabilityIndex}].devcontainerResourceId`,
1183
- message: `Projection Capability node-pnpm-devcontainer references undeclared Shared Resource: ${resourceId}`,
1184
- });
1185
- }
1186
- }
1187
- if (capability.kind === "rust-binary-workspace") {
1188
- const devcontainerResourceId = capability.devcontainerResourceId;
1189
- if (!sharedResourceIds.has(devcontainerResourceId)) {
1190
- issues.push({
1191
- path: `$.presets[${presetIndex}].projection.capabilities[${capabilityIndex}].devcontainerResourceId`,
1192
- message: `Projection Capability rust-binary-workspace references undeclared Shared Resource: ${devcontainerResourceId}`,
1193
- });
1194
- }
1195
- const editorCustomizationResourceId = capability.editorCustomizationResourceId;
1196
- if (!sharedResourceIds.has(editorCustomizationResourceId)) {
1197
- issues.push({
1198
- path: `$.presets[${presetIndex}].projection.capabilities[${capabilityIndex}].editorCustomizationResourceId`,
1199
- message: `Projection Capability rust-binary-workspace references undeclared Shared Resource: ${editorCustomizationResourceId}`,
1200
- });
1201
- }
1202
- }
1203
- });
1204
- });
1205
- return issues;
1206
- }
1207
- export function normalizePresetProjectionDeclaration(declaration) {
1208
- const result = validatePresetProjectionDeclaration(declaration);
1209
- if (!result.ok) {
1210
- throw new Error(`Projection Declaration is invalid:\n${result.issues
1211
- .map((issue) => ` - ${issue.path}: ${issue.message}`)
1212
- .join("\n")}`);
1213
- }
1214
- return result.value;
1215
- }
1216
- function normalizePresetSourceManifestOutput(manifest) {
1217
- return {
1218
- schemaVersion: manifest.schemaVersion,
1219
- name: manifest.name,
1220
- sharedResources: manifest.sharedResources.map((resource) => ({
1221
- ...resource,
1222
- })),
1223
- presets: manifest.presets.map((preset) => ({
1224
- name: preset.name,
1225
- title: preset.title,
1226
- description: preset.description,
1227
- generation: preset.generation,
1228
- packageAdditionSupport: preset.packageAdditionSupport,
1229
- supportedPackageManagers: [...preset.supportedPackageManagers],
1230
- supportedProjectKinds: [...preset.supportedProjectKinds],
1231
- features: [...preset.features],
1232
- dependencyCatalog: [...preset.dependencyCatalog],
1233
- ...(preset.projection
1234
- ? {
1235
- projection: normalizePresetProjectionDeclaration(preset.projection),
1236
- }
1237
- : {}),
1238
- ...(preset.source
1239
- ? {
1240
- source: {
1241
- roots: [...preset.source.roots],
1242
- files: [...preset.source.files],
1243
- sharedResources: [...preset.source.sharedResources],
1244
- },
1245
- }
1246
- : {}),
1247
- })),
1248
- };
1249
- }
1250
- export function validatePresetSourceManifestDeclaration(input) {
1251
- const result = v.safeParse(presetSourceManifestSchema, input);
1252
- if (!result.success) {
1253
- return { ok: false, issues: presetSourceShapeIssues(result.issues) };
1254
- }
1255
- const parsedManifest = result.output;
1256
- const semanticIssues = [
1257
- ...duplicateValueIssues(parsedManifest.sharedResources.map((resource) => resource.id), "$.sharedResources.id"),
1258
- ...duplicatePresetNameIssues(parsedManifest.presets),
1259
- ...duplicatePresetMetadataArrayIssues(parsedManifest.presets),
1260
- ...unsupportedProjectShapeIssues(parsedManifest.presets),
1261
- ...projectionCapabilityIssues(parsedManifest.presets),
1262
- ...projectionCapabilitySharedResourceIssues(parsedManifest),
1263
- ];
1264
- if (semanticIssues.length > 0) {
1265
- return { ok: false, issues: semanticIssues };
1266
- }
1267
- return {
1268
- ok: true,
1269
- value: normalizePresetSourceManifestOutput(parsedManifest),
1270
- };
1271
- }
1272
- export function findPreset(presets, name) {
1273
- return presets.find((preset) => preset.name === name);
1274
- }
1275
- export function validatePresetFile(input, options = {}) {
1276
- const result = v.safeParse(presetFileSchema, input);
1277
- if (!result.success) {
1278
- return { ok: false, issues: shapeIssues(result.issues) };
1279
- }
1280
- const semanticIssues = [
1281
- ...duplicateIssues(result.output.supportedPackageManagers, "$.supportedPackageManagers"),
1282
- ...duplicateIssues(result.output.supportedProjectKinds, "$.supportedProjectKinds"),
1283
- ...duplicateIssues(result.output.features, "$.features"),
1284
- ];
1285
- if (result.output.supportedProjectKinds.includes("single-package")) {
1286
- semanticIssues.push(unsupportedSinglePackageProjectShapeIssue("$.supportedProjectKinds"));
1287
- }
1288
- const catalogPreset = findPreset(options.presets ?? [], result.output.name);
1289
- const unsupportedGeneration = catalogPreset
1290
- ? generationSupportIssue(catalogPreset, "$.name")
1291
- : undefined;
1292
- if (unsupportedGeneration) {
1293
- semanticIssues.push(unsupportedGeneration);
1294
- }
1295
- if (semanticIssues.length > 0) {
1296
- return { ok: false, issues: semanticIssues };
1297
- }
1298
- return { ok: true, value: result.output };
1299
- }
1300
- function normalizeProjectBlueprint(blueprint) {
1301
- return {
1302
- schemaVersion: blueprint.schemaVersion,
1303
- preset: blueprint.preset,
1304
- ...(blueprint.packageManager === undefined
1305
- ? {}
1306
- : { packageManager: blueprint.packageManager }),
1307
- projectKind: blueprint.projectKind,
1308
- features: [...blueprint.features],
1309
- ...(blueprint.packages === undefined
1310
- ? {}
1311
- : {
1312
- packages: blueprint.packages.map((projectPackage) => ({
1313
- name: projectPackage.name,
1314
- path: projectPackage.path,
1315
- ...(projectPackage.role === undefined
1316
- ? {}
1317
- : { role: projectPackage.role }),
1318
- ...(projectPackage.sourcePreset === undefined
1319
- ? {}
1320
- : { sourcePreset: projectPackage.sourcePreset }),
1321
- })),
1322
- }),
1323
- ...(blueprint.packageLinkIntents === undefined
1324
- ? {}
1325
- : {
1326
- packageLinkIntents: blueprint.packageLinkIntents.map((intent) => ({
1327
- consumerPackagePath: intent.consumerPackagePath,
1328
- providerPackagePath: intent.providerPackagePath,
1329
- })),
1330
- }),
1331
- };
1332
- }
1333
- function packagePathIssue(packagePath, path) {
1334
- const segments = packagePath.split("/");
1335
- if (segments.length !== 2 ||
1336
- segments.some((segment) => segment.length === 0 || segment === ".")) {
1337
- return {
1338
- path,
1339
- message: "Package Path must be exactly two non-root path segments, such as apps/web or packages/ui",
1340
- };
1341
- }
1342
- return undefined;
1343
- }
1344
- export function validateProjectBlueprint(input, options = {}) {
1345
- const result = v.safeParse(projectBlueprintSchema, input);
1346
- if (!result.success) {
1347
- return { ok: false, issues: shapeIssues(result.issues) };
1348
- }
1349
- const blueprint = normalizeProjectBlueprint(result.output);
1350
- const preset = findPreset(options.presets ?? [], blueprint.preset);
1351
- const semanticIssues = [
1352
- ...duplicateIssues(blueprint.features, "$.features"),
1353
- ];
1354
- if (blueprint.projectKind === "single-package") {
1355
- semanticIssues.push(unsupportedSinglePackageProjectShapeIssue("$.projectKind"));
1356
- }
1357
- if (options.presets && !preset) {
1358
- semanticIssues.push({
1359
- path: "$.preset",
1360
- message: `Unknown ${options.presetLabel ?? "built-in"} preset: ${blueprint.preset}`,
1361
- });
1362
- }
1363
- else if (preset) {
1364
- const unsupportedGeneration = generationSupportIssue(preset, "$.preset");
1365
- if (unsupportedGeneration) {
1366
- semanticIssues.push(unsupportedGeneration);
1367
- }
1368
- if (blueprint.packageManager &&
1369
- !preset.supportedPackageManagers.includes(blueprint.packageManager)) {
1370
- semanticIssues.push({
1371
- path: "$.packageManager",
1372
- message: `${blueprint.packageManager} is not supported by preset ${preset.name}`,
1373
- });
1374
- }
1375
- if (!blueprint.packageManager &&
1376
- preset.supportedPackageManagers.length > 0) {
1377
- semanticIssues.push({
1378
- path: "$.packageManager",
1379
- message: `packageManager is required by preset ${preset.name}`,
1380
- });
1381
- }
1382
- if (!preset.supportedProjectKinds.includes(blueprint.projectKind)) {
1383
- semanticIssues.push({
1384
- path: "$.projectKind",
1385
- message: `${blueprint.projectKind} is not supported by preset ${preset.name}`,
1386
- });
1387
- }
1388
- const supportedFeatures = new Set(preset.features);
1389
- for (const feature of blueprint.features) {
1390
- if (!supportedFeatures.has(feature)) {
1391
- semanticIssues.push({
1392
- path: "$.features",
1393
- message: `${feature} is not supported by preset ${preset.name}`,
1394
- });
1395
- }
1396
- }
1397
- }
1398
- if (blueprint.packages) {
1399
- semanticIssues.push(...duplicateIssues(blueprint.packages.map((projectPackage) => projectPackage.name), "$.packages.name"), ...duplicateIssues(blueprint.packages.map((projectPackage) => projectPackage.path), "$.packages.path"), ...blueprint.packages.flatMap((projectPackage, index) => {
1400
- const issue = packagePathIssue(projectPackage.path, `$.packages[${index}].path`);
1401
- return issue === undefined ? [] : [issue];
1402
- }));
1403
- }
1404
- if (semanticIssues.length > 0) {
1405
- return { ok: false, issues: semanticIssues };
1406
- }
1407
- return { ok: true, value: blueprint };
1408
- }