@next-vibe/checker 1.0.52 → 3.0.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 (430) hide show
  1. package/LICENSE +669 -5
  2. package/README.md +179 -200
  3. package/check.config.ts +85 -16
  4. package/generated/alias-map.ts +30 -0
  5. package/generated/endpoint.ts +75 -0
  6. package/{src/app/api/[locale]/system/check/oxlint/plugins/i18n/src/index.ts → oxlint-plugins/i18n.ts} +45 -9
  7. package/{src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/src/index.ts → oxlint-plugins/jsx-capitalization.ts} +84 -17
  8. package/{src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/src/index.ts → oxlint-plugins/restricted-syntax.ts} +40 -14
  9. package/package.json +28 -132
  10. package/.dist/LICENSE +0 -674
  11. package/.dist/README.md +0 -257
  12. package/.dist/bin/vibe-runtime.js +0 -58166
  13. package/.dist/bin/vibe-runtime.js.map +0 -451
  14. package/.dist/oxlint-plugins/i18n.js +0 -381
  15. package/.dist/oxlint-plugins/jsx-capitalization.js +0 -436
  16. package/.dist/oxlint-plugins/restricted-syntax.js +0 -409
  17. package/src/app/api/[locale]/LICENSE +0 -674
  18. package/src/app/api/[locale]/i18n/de/index.ts +0 -15
  19. package/src/app/api/[locale]/i18n/en/index.ts +0 -14
  20. package/src/app/api/[locale]/i18n/pl/index.ts +0 -13
  21. package/src/app/api/[locale]/shared/i18n/de/index.ts +0 -85
  22. package/src/app/api/[locale]/shared/i18n/en/index.ts +0 -83
  23. package/src/app/api/[locale]/shared/i18n/pl/index.ts +0 -85
  24. package/src/app/api/[locale]/shared/stats-filtering.ts +0 -174
  25. package/src/app/api/[locale]/shared/types/common.schema.ts +0 -55
  26. package/src/app/api/[locale]/shared/types/response.schema.ts +0 -411
  27. package/src/app/api/[locale]/shared/types/stats-filtering.schema.ts +0 -315
  28. package/src/app/api/[locale]/shared/types/utils.ts +0 -187
  29. package/src/app/api/[locale]/shared/utils/base64.ts +0 -46
  30. package/src/app/api/[locale]/shared/utils/env-util.ts +0 -36
  31. package/src/app/api/[locale]/shared/utils/i18n/de/index.ts +0 -21
  32. package/src/app/api/[locale]/shared/utils/i18n/en/index.ts +0 -19
  33. package/src/app/api/[locale]/shared/utils/i18n/pl/index.ts +0 -21
  34. package/src/app/api/[locale]/shared/utils/index.ts +0 -11
  35. package/src/app/api/[locale]/shared/utils/object-path.ts +0 -41
  36. package/src/app/api/[locale]/shared/utils/object.test.ts +0 -82
  37. package/src/app/api/[locale]/shared/utils/object.ts +0 -73
  38. package/src/app/api/[locale]/shared/utils/parse-error.ts +0 -134
  39. package/src/app/api/[locale]/shared/utils/parse-json.ts +0 -62
  40. package/src/app/api/[locale]/shared/utils/time.ts +0 -46
  41. package/src/app/api/[locale]/shared/utils/validation.ts +0 -117
  42. package/src/app/api/[locale]/shared/utils/zod-required-fields.ts +0 -115
  43. package/src/app/api/[locale]/system/builder/definition.ts +0 -1750
  44. package/src/app/api/[locale]/system/builder/enum.ts +0 -78
  45. package/src/app/api/[locale]/system/builder/i18n/de/index.ts +0 -645
  46. package/src/app/api/[locale]/system/builder/i18n/en/index.ts +0 -653
  47. package/src/app/api/[locale]/system/builder/i18n/pl/index.ts +0 -643
  48. package/src/app/api/[locale]/system/builder/repository/build-executor.test.ts +0 -178
  49. package/src/app/api/[locale]/system/builder/repository/build-executor.ts +0 -538
  50. package/src/app/api/[locale]/system/builder/repository/bun-compiler.ts +0 -250
  51. package/src/app/api/[locale]/system/builder/repository/bundle-analyzer.ts +0 -170
  52. package/src/app/api/[locale]/system/builder/repository/config-loader.ts +0 -146
  53. package/src/app/api/[locale]/system/builder/repository/config-validator.ts +0 -97
  54. package/src/app/api/[locale]/system/builder/repository/constants.ts +0 -125
  55. package/src/app/api/[locale]/system/builder/repository/error-suggester.ts +0 -67
  56. package/src/app/api/[locale]/system/builder/repository/file-copier.ts +0 -90
  57. package/src/app/api/[locale]/system/builder/repository/folder-cleaner.ts +0 -75
  58. package/src/app/api/[locale]/system/builder/repository/index.ts +0 -2
  59. package/src/app/api/[locale]/system/builder/repository/npm-package-generator.ts +0 -143
  60. package/src/app/api/[locale]/system/builder/repository/output-formatter.ts +0 -104
  61. package/src/app/api/[locale]/system/builder/repository/profile-service.ts +0 -79
  62. package/src/app/api/[locale]/system/builder/repository/report-generator.ts +0 -109
  63. package/src/app/api/[locale]/system/builder/repository/vite-compiler.ts +0 -277
  64. package/src/app/api/[locale]/system/builder/route.ts +0 -21
  65. package/src/app/api/[locale]/system/builder/test-files/file1.ts +0 -2
  66. package/src/app/api/[locale]/system/builder/test-files/file2.tsx +0 -10
  67. package/src/app/api/[locale]/system/builder/test-files/file3.tsx +0 -16
  68. package/src/app/api/[locale]/system/builder/test-files/folderToCopy/fileInFolder.ts +0 -2
  69. package/src/app/api/[locale]/system/builder/test-files/test-config.ts +0 -38
  70. package/src/app/api/[locale]/system/builder/test-files/test-delete-config.ts +0 -8
  71. package/src/app/api/[locale]/system/builder/test-files/test-project/package.json +0 -24
  72. package/src/app/api/[locale]/system/builder/test-files/test-project/src/constants.ts +0 -6
  73. package/src/app/api/[locale]/system/builder/test-files/test-project/src/greet.ts +0 -18
  74. package/src/app/api/[locale]/system/builder/test-files/test-project/src/index.ts +0 -7
  75. package/src/app/api/[locale]/system/builder/test-files/test-project/src/utils/calculate.ts +0 -27
  76. package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.json +0 -19
  77. package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.tsbuildinfo +0 -1
  78. package/src/app/api/[locale]/system/builder/test-files/test3.css +0 -1
  79. package/src/app/api/[locale]/system/check/config/create/definition.ts +0 -266
  80. package/src/app/api/[locale]/system/check/config/create/i18n/de/index.ts +0 -151
  81. package/src/app/api/[locale]/system/check/config/create/i18n/en/index.ts +0 -146
  82. package/src/app/api/[locale]/system/check/config/create/i18n/pl/index.ts +0 -148
  83. package/src/app/api/[locale]/system/check/config/create/repository.ts +0 -269
  84. package/src/app/api/[locale]/system/check/config/create/route.ts +0 -21
  85. package/src/app/api/[locale]/system/check/config/repository.ts +0 -846
  86. package/src/app/api/[locale]/system/check/config/shared.ts +0 -364
  87. package/src/app/api/[locale]/system/check/config/types.ts +0 -610
  88. package/src/app/api/[locale]/system/check/config/utils.ts +0 -155
  89. package/src/app/api/[locale]/system/check/i18n/de/index.ts +0 -19
  90. package/src/app/api/[locale]/system/check/i18n/en/index.ts +0 -18
  91. package/src/app/api/[locale]/system/check/i18n/pl/index.ts +0 -19
  92. package/src/app/api/[locale]/system/check/lint/definition.ts +0 -383
  93. package/src/app/api/[locale]/system/check/lint/enum.ts +0 -34
  94. package/src/app/api/[locale]/system/check/lint/i18n/de/index.ts +0 -160
  95. package/src/app/api/[locale]/system/check/lint/i18n/en/index.ts +0 -158
  96. package/src/app/api/[locale]/system/check/lint/i18n/pl/index.ts +0 -160
  97. package/src/app/api/[locale]/system/check/lint/repository.ts +0 -844
  98. package/src/app/api/[locale]/system/check/lint/route.ts +0 -21
  99. package/src/app/api/[locale]/system/check/oxlint/README.md +0 -190
  100. package/src/app/api/[locale]/system/check/oxlint/definition.ts +0 -375
  101. package/src/app/api/[locale]/system/check/oxlint/enum.ts +0 -34
  102. package/src/app/api/[locale]/system/check/oxlint/i18n/de/index.ts +0 -166
  103. package/src/app/api/[locale]/system/check/oxlint/i18n/en/index.ts +0 -164
  104. package/src/app/api/[locale]/system/check/oxlint/i18n/pl/index.ts +0 -166
  105. package/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/README.md +0 -269
  106. package/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/test.tsx +0 -74
  107. package/src/app/api/[locale]/system/check/oxlint/plugins/shared/config-loader.ts +0 -283
  108. package/src/app/api/[locale]/system/check/oxlint/repository.ts +0 -553
  109. package/src/app/api/[locale]/system/check/oxlint/route.ts +0 -21
  110. package/src/app/api/[locale]/system/check/oxlint/types.ts +0 -191
  111. package/src/app/api/[locale]/system/check/test-project/.vscode/settings.json +0 -48
  112. package/src/app/api/[locale]/system/check/test-project/bun.lock +0 -640
  113. package/src/app/api/[locale]/system/check/test-project/check.config.ts +0 -955
  114. package/src/app/api/[locale]/system/check/test-project/package.json +0 -17
  115. package/src/app/api/[locale]/system/check/test-project/src/constants.ts +0 -6
  116. package/src/app/api/[locale]/system/check/test-project/src/greet.ts +0 -18
  117. package/src/app/api/[locale]/system/check/test-project/src/test-issues/a11y-issues.tsx +0 -107
  118. package/src/app/api/[locale]/system/check/test-project/src/test-issues/eslint-issues.tsx +0 -37
  119. package/src/app/api/[locale]/system/check/test-project/src/test-issues/general-issues.ts +0 -135
  120. package/src/app/api/[locale]/system/check/test-project/src/test-issues/i18n-issues.tsx +0 -113
  121. package/src/app/api/[locale]/system/check/test-project/src/test-issues/jsx-capitalization-issues.tsx +0 -127
  122. package/src/app/api/[locale]/system/check/test-project/src/test-issues/nextjs-issues.tsx +0 -92
  123. package/src/app/api/[locale]/system/check/test-project/src/test-issues/promise-issues.ts +0 -73
  124. package/src/app/api/[locale]/system/check/test-project/src/test-issues/react-issues.tsx +0 -95
  125. package/src/app/api/[locale]/system/check/test-project/src/test-issues/restricted-syntax-issues.tsx +0 -61
  126. package/src/app/api/[locale]/system/check/test-project/src/test-issues/typescript-issues.ts +0 -78
  127. package/src/app/api/[locale]/system/check/test-project/src/utils/calculate.ts +0 -27
  128. package/src/app/api/[locale]/system/check/test-project/tsconfig.json +0 -22
  129. package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +0 -1
  130. package/src/app/api/[locale]/system/check/typecheck/definition.ts +0 -328
  131. package/src/app/api/[locale]/system/check/typecheck/enum.ts +0 -34
  132. package/src/app/api/[locale]/system/check/typecheck/i18n/de/index.ts +0 -148
  133. package/src/app/api/[locale]/system/check/typecheck/i18n/en/index.ts +0 -145
  134. package/src/app/api/[locale]/system/check/typecheck/i18n/pl/index.ts +0 -148
  135. package/src/app/api/[locale]/system/check/typecheck/repository.ts +0 -863
  136. package/src/app/api/[locale]/system/check/typecheck/route.ts +0 -21
  137. package/src/app/api/[locale]/system/check/typecheck/utils.ts +0 -160
  138. package/src/app/api/[locale]/system/check/vibe-check/definition.ts +0 -448
  139. package/src/app/api/[locale]/system/check/vibe-check/enum.ts +0 -63
  140. package/src/app/api/[locale]/system/check/vibe-check/i18n/de/index.ts +0 -164
  141. package/src/app/api/[locale]/system/check/vibe-check/i18n/en/index.ts +0 -161
  142. package/src/app/api/[locale]/system/check/vibe-check/i18n/pl/index.ts +0 -163
  143. package/src/app/api/[locale]/system/check/vibe-check/repository.ts +0 -516
  144. package/src/app/api/[locale]/system/check/vibe-check/route.test.ts +0 -1010
  145. package/src/app/api/[locale]/system/check/vibe-check/route.ts +0 -21
  146. package/src/app/api/[locale]/system/generated/endpoint.ts +0 -274
  147. package/src/app/api/[locale]/system/generated/endpoints.ts +0 -138
  148. package/src/app/api/[locale]/system/generated/route-handlers.ts +0 -213
  149. package/src/app/api/[locale]/system/generators/endpoint/definition.ts +0 -167
  150. package/src/app/api/[locale]/system/generators/endpoint/i18n/de/index.ts +0 -48
  151. package/src/app/api/[locale]/system/generators/endpoint/i18n/en/index.ts +0 -48
  152. package/src/app/api/[locale]/system/generators/endpoint/i18n/pl/index.ts +0 -50
  153. package/src/app/api/[locale]/system/generators/endpoint/repository.ts +0 -286
  154. package/src/app/api/[locale]/system/generators/endpoint/route.ts +0 -18
  155. package/src/app/api/[locale]/system/generators/endpoints/definition.ts +0 -246
  156. package/src/app/api/[locale]/system/generators/endpoints/i18n/de/index.ts +0 -54
  157. package/src/app/api/[locale]/system/generators/endpoints/i18n/en/index.ts +0 -52
  158. package/src/app/api/[locale]/system/generators/endpoints/i18n/pl/index.ts +0 -54
  159. package/src/app/api/[locale]/system/generators/endpoints/options-repository.ts +0 -425
  160. package/src/app/api/[locale]/system/generators/endpoints/repository.ts +0 -368
  161. package/src/app/api/[locale]/system/generators/endpoints/route.ts +0 -17
  162. package/src/app/api/[locale]/system/generators/endpoints-index/definition.ts +0 -166
  163. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/de/index.ts +0 -71
  164. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/en/index.ts +0 -69
  165. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/pl/index.ts +0 -71
  166. package/src/app/api/[locale]/system/generators/endpoints-index/repository.ts +0 -279
  167. package/src/app/api/[locale]/system/generators/endpoints-index/route.ts +0 -18
  168. package/src/app/api/[locale]/system/generators/generate-all/definition.ts +0 -327
  169. package/src/app/api/[locale]/system/generators/generate-all/i18n/de/index.ts +0 -96
  170. package/src/app/api/[locale]/system/generators/generate-all/i18n/en/index.ts +0 -94
  171. package/src/app/api/[locale]/system/generators/generate-all/i18n/pl/index.ts +0 -96
  172. package/src/app/api/[locale]/system/generators/generate-all/repository.ts +0 -240
  173. package/src/app/api/[locale]/system/generators/generate-all/route.ts +0 -19
  174. package/src/app/api/[locale]/system/generators/i18n/de/index.ts +0 -15
  175. package/src/app/api/[locale]/system/generators/i18n/en/index.ts +0 -14
  176. package/src/app/api/[locale]/system/generators/i18n/pl/index.ts +0 -15
  177. package/src/app/api/[locale]/system/generators/route-handlers/definition.ts +0 -178
  178. package/src/app/api/[locale]/system/generators/route-handlers/i18n/de/index.ts +0 -48
  179. package/src/app/api/[locale]/system/generators/route-handlers/i18n/en/index.ts +0 -48
  180. package/src/app/api/[locale]/system/generators/route-handlers/i18n/pl/index.ts +0 -50
  181. package/src/app/api/[locale]/system/generators/route-handlers/repository.ts +0 -267
  182. package/src/app/api/[locale]/system/generators/route-handlers/route.ts +0 -14
  183. package/src/app/api/[locale]/system/generators/shared/utils.ts +0 -215
  184. package/src/app/api/[locale]/system/help/definition.ts +0 -433
  185. package/src/app/api/[locale]/system/help/i18n/de/index.ts +0 -263
  186. package/src/app/api/[locale]/system/help/i18n/en/index.ts +0 -259
  187. package/src/app/api/[locale]/system/help/i18n/pl/index.ts +0 -262
  188. package/src/app/api/[locale]/system/help/interactive/definition.ts +0 -122
  189. package/src/app/api/[locale]/system/help/interactive/i18n/de/index.ts +0 -21
  190. package/src/app/api/[locale]/system/help/interactive/i18n/en/index.ts +0 -19
  191. package/src/app/api/[locale]/system/help/interactive/i18n/pl/index.ts +0 -21
  192. package/src/app/api/[locale]/system/help/interactive/repository.ts +0 -1131
  193. package/src/app/api/[locale]/system/help/interactive/route.ts +0 -43
  194. package/src/app/api/[locale]/system/help/list/definition.ts +0 -362
  195. package/src/app/api/[locale]/system/help/list/repository.ts +0 -99
  196. package/src/app/api/[locale]/system/help/list/route.ts +0 -21
  197. package/src/app/api/[locale]/system/help/repository.ts +0 -238
  198. package/src/app/api/[locale]/system/help/route.ts +0 -16
  199. package/src/app/api/[locale]/system/i18n/de/index.ts +0 -67
  200. package/src/app/api/[locale]/system/i18n/en/index.ts +0 -66
  201. package/src/app/api/[locale]/system/i18n/pl/index.ts +0 -67
  202. package/src/app/api/[locale]/system/release-tool/definition.ts +0 -2925
  203. package/src/app/api/[locale]/system/release-tool/i18n/de/index.ts +0 -782
  204. package/src/app/api/[locale]/system/release-tool/i18n/en/index.ts +0 -779
  205. package/src/app/api/[locale]/system/release-tool/i18n/pl/index.ts +0 -781
  206. package/src/app/api/[locale]/system/release-tool/repository/asset-zipper.ts +0 -122
  207. package/src/app/api/[locale]/system/release-tool/repository/changelog-generator.ts +0 -205
  208. package/src/app/api/[locale]/system/release-tool/repository/ci-detector.ts +0 -540
  209. package/src/app/api/[locale]/system/release-tool/repository/config.ts +0 -106
  210. package/src/app/api/[locale]/system/release-tool/repository/constants.ts +0 -406
  211. package/src/app/api/[locale]/system/release-tool/repository/dependency-manager.ts +0 -496
  212. package/src/app/api/[locale]/system/release-tool/repository/git-service.ts +0 -378
  213. package/src/app/api/[locale]/system/release-tool/repository/hook-runner.ts +0 -96
  214. package/src/app/api/[locale]/system/release-tool/repository/index.ts +0 -1
  215. package/src/app/api/[locale]/system/release-tool/repository/notification-service.ts +0 -575
  216. package/src/app/api/[locale]/system/release-tool/repository/package-service.ts +0 -150
  217. package/src/app/api/[locale]/system/release-tool/repository/publisher.ts +0 -241
  218. package/src/app/api/[locale]/system/release-tool/repository/quality-runner.ts +0 -413
  219. package/src/app/api/[locale]/system/release-tool/repository/release-creator.ts +0 -283
  220. package/src/app/api/[locale]/system/release-tool/repository/release-executor.ts +0 -1084
  221. package/src/app/api/[locale]/system/release-tool/repository/snyk-service.ts +0 -132
  222. package/src/app/api/[locale]/system/release-tool/repository/utils.ts +0 -603
  223. package/src/app/api/[locale]/system/release-tool/repository/validation.ts +0 -265
  224. package/src/app/api/[locale]/system/release-tool/repository/version-service.ts +0 -275
  225. package/src/app/api/[locale]/system/release-tool/route.ts +0 -21
  226. package/src/app/api/[locale]/system/unified-interface/README.md +0 -328
  227. package/src/app/api/[locale]/system/unified-interface/cli/README.md +0 -349
  228. package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-handler.ts +0 -82
  229. package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-user.ts +0 -120
  230. package/src/app/api/[locale]/system/unified-interface/cli/auth/session-file.ts +0 -244
  231. package/src/app/api/[locale]/system/unified-interface/cli/env.ts +0 -24
  232. package/src/app/api/[locale]/system/unified-interface/cli/i18n/de/index.ts +0 -159
  233. package/src/app/api/[locale]/system/unified-interface/cli/i18n/en/index.ts +0 -158
  234. package/src/app/api/[locale]/system/unified-interface/cli/i18n/pl/index.ts +0 -159
  235. package/src/app/api/[locale]/system/unified-interface/cli/runtime/debug.ts +0 -573
  236. package/src/app/api/[locale]/system/unified-interface/cli/runtime/entry-point.ts +0 -128
  237. package/src/app/api/[locale]/system/unified-interface/cli/runtime/environment.ts +0 -155
  238. package/src/app/api/[locale]/system/unified-interface/cli/runtime/execution-errors.ts +0 -423
  239. package/src/app/api/[locale]/system/unified-interface/cli/runtime/parsing.ts +0 -252
  240. package/src/app/api/[locale]/system/unified-interface/cli/runtime/route-executor.ts +0 -901
  241. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/de/index.ts +0 -12
  242. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/en/index.ts +0 -11
  243. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/pl/index.ts +0 -12
  244. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/definition.ts +0 -235
  245. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/de/index.ts +0 -54
  246. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/en/index.ts +0 -52
  247. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/pl/index.ts +0 -54
  248. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/repository.ts +0 -444
  249. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/route.ts +0 -25
  250. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/definition.ts +0 -159
  251. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/de/index.ts +0 -61
  252. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/en/index.ts +0 -59
  253. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/pl/index.ts +0 -61
  254. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/repository.ts +0 -181
  255. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/route.ts +0 -22
  256. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/definition.ts +0 -164
  257. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/de/index.ts +0 -54
  258. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/en/index.ts +0 -52
  259. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/pl/index.ts +0 -54
  260. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/repository.ts +0 -195
  261. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/route.ts +0 -24
  262. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/definition.ts +0 -180
  263. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/de/index.ts +0 -54
  264. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/en/index.ts +0 -52
  265. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/pl/index.ts +0 -54
  266. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/repository.ts +0 -105
  267. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/route.ts +0 -22
  268. package/src/app/api/[locale]/system/unified-interface/cli/vibe-runtime.ts +0 -264
  269. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/base-renderer.ts +0 -246
  270. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/registry.ts +0 -305
  271. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/types.ts +0 -116
  272. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/de/index.ts +0 -67
  273. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/en/index.ts +0 -65
  274. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/pl/index.ts +0 -67
  275. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/accordion.ts +0 -70
  276. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/avatar.ts +0 -37
  277. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/badge.ts +0 -52
  278. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-output.ts +0 -285
  279. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-files.ts +0 -71
  280. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-list.ts +0 -281
  281. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-summary.ts +0 -83
  282. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/container.ts +0 -175
  283. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-card.ts +0 -61
  284. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-cards.ts +0 -518
  285. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-list.ts +0 -75
  286. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-table.ts +0 -357
  287. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/editable-text.ts +0 -93
  288. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/empty-state.ts +0 -49
  289. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/errors.ts +0 -63
  290. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/grouped-list.ts +0 -667
  291. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-card.ts +0 -78
  292. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-list.ts +0 -99
  293. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link.ts +0 -54
  294. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/loading.ts +0 -46
  295. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/markdown.ts +0 -123
  296. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/metric.ts +0 -269
  297. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/section.ts +0 -114
  298. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/stats-grid.ts +0 -138
  299. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/tabs.ts +0 -59
  300. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/text.ts +0 -76
  301. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/title.ts +0 -37
  302. package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/response-renderer.ts +0 -403
  303. package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/schema-handler.ts +0 -504
  304. package/src/app/api/[locale]/system/unified-interface/i18n/de/index.ts +0 -39
  305. package/src/app/api/[locale]/system/unified-interface/i18n/en/index.ts +0 -37
  306. package/src/app/api/[locale]/system/unified-interface/i18n/pl/index.ts +0 -39
  307. package/src/app/api/[locale]/system/unified-interface/mcp/README.md +0 -114
  308. package/src/app/api/[locale]/system/unified-interface/mcp/converter.ts +0 -136
  309. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/de/index.ts +0 -180
  310. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/en/index.ts +0 -178
  311. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/pl/index.ts +0 -180
  312. package/src/app/api/[locale]/system/unified-interface/mcp/registry.ts +0 -305
  313. package/src/app/api/[locale]/system/unified-interface/mcp/serve/definition.ts +0 -124
  314. package/src/app/api/[locale]/system/unified-interface/mcp/serve/repository.ts +0 -44
  315. package/src/app/api/[locale]/system/unified-interface/mcp/serve/route.ts +0 -14
  316. package/src/app/api/[locale]/system/unified-interface/mcp/server/protocol-handler.ts +0 -291
  317. package/src/app/api/[locale]/system/unified-interface/mcp/server/server.ts +0 -155
  318. package/src/app/api/[locale]/system/unified-interface/mcp/server/stdio-transport.ts +0 -191
  319. package/src/app/api/[locale]/system/unified-interface/mcp/types.ts +0 -247
  320. package/src/app/api/[locale]/system/unified-interface/react/icons.tsx +0 -346
  321. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create-form.ts +0 -1413
  322. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create.ts +0 -525
  323. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/endpoint-to-metadata.ts +0 -52
  324. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/loader.ts +0 -144
  325. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definitions/registry.ts +0 -262
  326. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/permissions/registry.ts +0 -656
  327. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/executor.ts +0 -220
  328. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/handler.ts +0 -313
  329. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/multi.ts +0 -182
  330. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/request-validator.ts +0 -173
  331. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/single.ts +0 -58
  332. package/src/app/api/[locale]/system/unified-interface/shared/env/define-env-client.ts +0 -45
  333. package/src/app/api/[locale]/system/unified-interface/shared/env/define-env.ts +0 -43
  334. package/src/app/api/[locale]/system/unified-interface/shared/env/validation-logger.ts +0 -58
  335. package/src/app/api/[locale]/system/unified-interface/shared/field/enum.ts +0 -107
  336. package/src/app/api/[locale]/system/unified-interface/shared/field/specialized.ts +0 -336
  337. package/src/app/api/[locale]/system/unified-interface/shared/field/utils.test.ts +0 -385
  338. package/src/app/api/[locale]/system/unified-interface/shared/field/utils.ts +0 -1827
  339. package/src/app/api/[locale]/system/unified-interface/shared/field-config/endpoint-field-types.ts +0 -108
  340. package/src/app/api/[locale]/system/unified-interface/shared/field-config/field-config-types.ts +0 -288
  341. package/src/app/api/[locale]/system/unified-interface/shared/logger/colors.ts +0 -114
  342. package/src/app/api/[locale]/system/unified-interface/shared/logger/endpoint.ts +0 -155
  343. package/src/app/api/[locale]/system/unified-interface/shared/logger/file-logger.ts +0 -85
  344. package/src/app/api/[locale]/system/unified-interface/shared/logger/formatters.ts +0 -167
  345. package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/base-auth-handler.ts +0 -82
  346. package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/factory.ts +0 -34
  347. package/src/app/api/[locale]/system/unified-interface/shared/server-only/server-only.ts +0 -1
  348. package/src/app/api/[locale]/system/unified-interface/shared/types/actions.ts +0 -284
  349. package/src/app/api/[locale]/system/unified-interface/shared/types/endpoint.ts +0 -1101
  350. package/src/app/api/[locale]/system/unified-interface/shared/types/enums.ts +0 -383
  351. package/src/app/api/[locale]/system/unified-interface/shared/types/platform.ts +0 -34
  352. package/src/app/api/[locale]/system/unified-interface/shared/types/types.ts +0 -76
  353. package/src/app/api/[locale]/system/unified-interface/shared/types/ui-config.ts +0 -72
  354. package/src/app/api/[locale]/system/unified-interface/shared/utils/error-types.ts +0 -27
  355. package/src/app/api/[locale]/system/unified-interface/shared/utils/path.ts +0 -80
  356. package/src/app/api/[locale]/system/unified-interface/shared/utils/scanner.ts +0 -225
  357. package/src/app/api/[locale]/system/unified-interface/shared/widgets/actions.ts +0 -251
  358. package/src/app/api/[locale]/system/unified-interface/shared/widgets/configs.ts +0 -1060
  359. package/src/app/api/[locale]/system/unified-interface/shared/widgets/helpers.ts +0 -70
  360. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/accordion.ts +0 -75
  361. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/avatar.ts +0 -69
  362. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/badge.ts +0 -86
  363. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-output.ts +0 -283
  364. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-quality-list.ts +0 -190
  365. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/container.ts +0 -114
  366. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-card.ts +0 -71
  367. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-cards.ts +0 -228
  368. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-list.ts +0 -119
  369. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-table.ts +0 -367
  370. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/editable-text.ts +0 -81
  371. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/empty-state.ts +0 -71
  372. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/errors.ts +0 -79
  373. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/grouped-list.ts +0 -426
  374. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/index.ts +0 -38
  375. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-card.ts +0 -112
  376. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-list.ts +0 -110
  377. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link.ts +0 -66
  378. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/loading.ts +0 -79
  379. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/markdown.ts +0 -159
  380. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/metric-card.ts +0 -225
  381. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/section.ts +0 -85
  382. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/stats-grid.ts +0 -63
  383. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/tabs.ts +0 -73
  384. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/text.ts +0 -96
  385. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/title.ts +0 -57
  386. package/src/app/api/[locale]/system/unified-interface/shared/widgets/types.ts +0 -236
  387. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/field-helpers.ts +0 -120
  388. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/formatting.ts +0 -414
  389. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/url.ts +0 -37
  390. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/widget-helpers.ts +0 -427
  391. package/src/app/api/[locale]/user/auth/i18n/de/index.ts +0 -204
  392. package/src/app/api/[locale]/user/auth/i18n/en/index.ts +0 -199
  393. package/src/app/api/[locale]/user/auth/i18n/pl/index.ts +0 -203
  394. package/src/app/api/[locale]/user/auth/types.ts +0 -45
  395. package/src/app/api/[locale]/user/enum.ts +0 -64
  396. package/src/app/api/[locale]/user/i18n/de/index.ts +0 -75
  397. package/src/app/api/[locale]/user/i18n/en/index.ts +0 -74
  398. package/src/app/api/[locale]/user/i18n/pl/index.ts +0 -75
  399. package/src/app/api/[locale]/user/types.ts +0 -111
  400. package/src/app/api/[locale]/user/user-roles/enum.ts +0 -103
  401. package/src/app/api/[locale]/user/user-roles/i18n/de/index.ts +0 -85
  402. package/src/app/api/[locale]/user/user-roles/i18n/en/index.ts +0 -83
  403. package/src/app/api/[locale]/user/user-roles/i18n/pl/index.ts +0 -85
  404. package/src/app/api/[locale]/user/user-roles/types.ts +0 -32
  405. package/src/app/api/i18n/de/index.ts +0 -6
  406. package/src/app/api/i18n/en/index.ts +0 -5
  407. package/src/app/api/i18n/pl/index.ts +0 -5
  408. package/src/app/i18n/de/index.ts +0 -18
  409. package/src/app/i18n/en/index.ts +0 -18
  410. package/src/app/i18n/pl/index.ts +0 -17
  411. package/src/config/constants.ts +0 -8
  412. package/src/config/debug.ts +0 -30
  413. package/src/config/env-client.ts +0 -57
  414. package/src/config/env.ts +0 -56
  415. package/src/config/i18n/de/index.ts +0 -3
  416. package/src/config/i18n/en/index.ts +0 -51
  417. package/src/config/i18n/pl/index.ts +0 -3
  418. package/src/i18n/core/config.ts +0 -225
  419. package/src/i18n/core/language-utils.ts +0 -226
  420. package/src/i18n/core/localization-utils.ts +0 -394
  421. package/src/i18n/core/scoped-translation.ts +0 -104
  422. package/src/i18n/core/shared-component.tsx +0 -28
  423. package/src/i18n/core/shared-translation-utils.ts +0 -97
  424. package/src/i18n/core/shared.ts +0 -44
  425. package/src/i18n/core/static-types.ts +0 -64
  426. package/src/i18n/core/translation-utils.ts +0 -186
  427. package/src/i18n/de/index.ts +0 -8
  428. package/src/i18n/en/index.ts +0 -7
  429. package/src/i18n/index.ts +0 -100
  430. package/src/i18n/pl/index.ts +0 -7
@@ -1,1750 +0,0 @@
1
- /**
2
- * Builder Endpoint Definition
3
- * Single source of truth for all builder types and configuration
4
- *
5
- * This definition supports:
6
- * - Vite builds: react-tailwind, react, vanilla
7
- * - Bun builds: executable
8
- */
9
-
10
- import { z } from "zod";
11
-
12
- import { createEndpoint } from "@/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create";
13
- import { createEnumOptions } from "@/app/api/[locale]/system/unified-interface/shared/field/enum";
14
- import {
15
- objectField,
16
- objectOptionalField,
17
- requestDataArrayOptionalField,
18
- requestDataField,
19
- responseArrayOptionalField,
20
- responseField,
21
- } from "@/app/api/[locale]/system/unified-interface/shared/field/utils";
22
- import {
23
- EndpointErrorTypes,
24
- FieldDataType,
25
- LayoutType,
26
- Methods,
27
- WidgetType,
28
- } from "@/app/api/[locale]/system/unified-interface/shared/types/enums";
29
- import { UserRole } from "@/app/api/[locale]/user/user-roles/enum";
30
-
31
- import {
32
- BuildProfileEnum,
33
- BunBuildTypeEnum,
34
- BunTargetEnum,
35
- OutputFormatEnum,
36
- SourcemapModeEnum,
37
- StepStatusEnum,
38
- ViteBuildTypeEnum,
39
- ViteLibFormatEnum,
40
- } from "./enum";
41
-
42
- // ============================================================================
43
- // Enum Options for UI - Created with createEnumOptions
44
- // ============================================================================
45
-
46
- export const { options: BuildProfileOptions } = createEnumOptions({
47
- DEVELOPMENT: "app.api.system.builder.enums.profile.development",
48
- PRODUCTION: "app.api.system.builder.enums.profile.production",
49
- } as const);
50
-
51
- export const { options: BuildTypeOptions } = createEnumOptions({
52
- REACT_TAILWIND: "app.api.system.builder.enums.buildType.reactTailwind",
53
- REACT: "app.api.system.builder.enums.buildType.react",
54
- VANILLA: "app.api.system.builder.enums.buildType.vanilla",
55
- EXECUTABLE: "app.api.system.builder.enums.buildType.executable",
56
- } as const);
57
-
58
- export const { options: BunTargetOptions } = createEnumOptions({
59
- BUN: "app.api.system.builder.enums.bunTarget.bun",
60
- NODE: "app.api.system.builder.enums.bunTarget.node",
61
- BROWSER: "app.api.system.builder.enums.bunTarget.browser",
62
- } as const);
63
-
64
- export const { options: SourcemapModeOptions } = createEnumOptions({
65
- EXTERNAL: "app.api.system.builder.enums.sourcemap.external",
66
- INLINE: "app.api.system.builder.enums.sourcemap.inline",
67
- NONE: "app.api.system.builder.enums.sourcemap.none",
68
- } as const);
69
-
70
- export const { options: OutputFormatOptions } = createEnumOptions({
71
- ESM: "app.api.system.builder.enums.format.esm",
72
- CJS: "app.api.system.builder.enums.format.cjs",
73
- IIFE: "app.api.system.builder.enums.format.iife",
74
- } as const);
75
-
76
- export const { options: ViteMinifyOptions } = createEnumOptions({
77
- ESBUILD: "app.api.system.builder.enums.viteMinify.esbuild",
78
- TERSER: "app.api.system.builder.enums.viteMinify.terser",
79
- FALSE: "app.api.system.builder.enums.viteMinify.false",
80
- } as const);
81
-
82
- export const { options: ViteLibFormatOptions } = createEnumOptions({
83
- ES: "app.api.system.builder.enums.viteLibFormat.es",
84
- CJS: "app.api.system.builder.enums.viteLibFormat.cjs",
85
- UMD: "app.api.system.builder.enums.viteLibFormat.umd",
86
- IIFE: "app.api.system.builder.enums.viteLibFormat.iife",
87
- } as const);
88
-
89
- // ============================================================================
90
- // Complex Type Schemas
91
- // ============================================================================
92
-
93
- /**
94
- * Package.json exports field schema
95
- * Supports: string path, conditional exports, or nested export maps
96
- * @example { ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }
97
- */
98
- export type PackageExportCondition = string | { [key: string]: string | PackageExportCondition };
99
- const PackageExportConditionSchema: z.ZodType<PackageExportCondition> = z.lazy(() =>
100
- z.union([z.string(), z.record(z.string(), z.union([z.string(), PackageExportConditionSchema]))]),
101
- );
102
-
103
- // ============================================================================
104
- // Endpoint Definition
105
- // ============================================================================
106
-
107
- const { POST } = createEndpoint({
108
- method: Methods.POST,
109
- path: ["system", "builder"],
110
- title: "app.api.system.builder.post.title",
111
- description: "app.api.system.builder.post.description",
112
- category: "app.api.system.builder.category",
113
- tags: [
114
- "app.api.system.builder.tags.build",
115
- "app.api.system.builder.tags.npm",
116
- "app.api.system.builder.tags.vite",
117
- ],
118
- icon: "package",
119
- allowedRoles: [
120
- UserRole.ADMIN,
121
- UserRole.AI_TOOL_OFF,
122
- UserRole.WEB_OFF,
123
- UserRole.CLI_AUTH_BYPASS,
124
- UserRole.MCP_OFF,
125
- ],
126
- aliases: ["builder", "package", "bundle", "build"],
127
-
128
- fields: objectField(
129
- {
130
- type: WidgetType.CONTAINER,
131
- title: "app.api.system.builder.post.form.title",
132
- description: "app.api.system.builder.post.form.description",
133
- layoutType: LayoutType.GRID,
134
- columns: 12,
135
- },
136
- { request: "data", response: true },
137
- {
138
- // ========================================================================
139
- // CONFIG FILE PATH
140
- // ========================================================================
141
- configPath: requestDataField(
142
- {
143
- type: WidgetType.FORM_FIELD,
144
- fieldType: FieldDataType.TEXT,
145
- label: "app.api.system.builder.post.fields.configPath.title",
146
- description: "app.api.system.builder.post.fields.configPath.description",
147
- placeholder: "app.api.system.builder.post.fields.configPath.placeholder",
148
- icon: "file-code",
149
- colSpan: 12,
150
- },
151
- z.string().optional().default("build.config.ts"),
152
- ),
153
-
154
- // ========================================================================
155
- // CONFIG OBJECT - Full inline build configuration
156
- // ========================================================================
157
- configObject: objectOptionalField(
158
- {
159
- type: WidgetType.ACCORDION,
160
- title: "app.api.system.builder.post.fields.configObject.title",
161
- description: "app.api.system.builder.post.fields.configObject.description",
162
- layoutType: LayoutType.GRID,
163
- columns: 12,
164
- optional: true,
165
- icon: "settings",
166
- defaultExpanded: true,
167
- },
168
- { request: "data" },
169
- {
170
- // ==================================================================
171
- // RUNTIME OPTIONS SECTION
172
- // ==================================================================
173
- profile: requestDataField(
174
- {
175
- type: WidgetType.FORM_FIELD,
176
- fieldType: FieldDataType.SELECT,
177
- label: "app.api.system.builder.post.fields.profile.title",
178
- description: "app.api.system.builder.post.fields.profile.description",
179
- options: BuildProfileOptions,
180
- optional: true,
181
- icon: "layers",
182
- colSpan: 4,
183
- },
184
- z.enum(BuildProfileEnum).optional(),
185
- ),
186
-
187
- dryRun: requestDataField(
188
- {
189
- type: WidgetType.FORM_FIELD,
190
- fieldType: FieldDataType.BOOLEAN,
191
- label: "app.api.system.builder.post.fields.dryRun.title",
192
- description: "app.api.system.builder.post.fields.dryRun.description",
193
- optional: true,
194
- icon: "eye",
195
- colSpan: 4,
196
- },
197
- z.boolean().optional(),
198
- ),
199
-
200
- verbose: requestDataField(
201
- {
202
- type: WidgetType.FORM_FIELD,
203
- fieldType: FieldDataType.BOOLEAN,
204
- label: "app.api.system.builder.post.fields.verbose.title",
205
- description: "app.api.system.builder.post.fields.verbose.description",
206
- optional: true,
207
- icon: "terminal",
208
- colSpan: 4,
209
- },
210
- z.boolean().optional(),
211
- ),
212
-
213
- analyze: requestDataField(
214
- {
215
- type: WidgetType.FORM_FIELD,
216
- fieldType: FieldDataType.BOOLEAN,
217
- label: "app.api.system.builder.post.fields.analyze.title",
218
- description: "app.api.system.builder.post.fields.analyze.description",
219
- optional: true,
220
- icon: "bar-chart-2",
221
- colSpan: 3,
222
- },
223
- z.boolean().optional(),
224
- ),
225
-
226
- watch: requestDataField(
227
- {
228
- type: WidgetType.FORM_FIELD,
229
- fieldType: FieldDataType.BOOLEAN,
230
- label: "app.api.system.builder.post.fields.watch.title",
231
- description: "app.api.system.builder.post.fields.watch.description",
232
- optional: true,
233
- icon: "refresh-cw",
234
- colSpan: 3,
235
- },
236
- z.boolean().optional(),
237
- ),
238
-
239
- parallel: requestDataField(
240
- {
241
- type: WidgetType.FORM_FIELD,
242
- fieldType: FieldDataType.BOOLEAN,
243
- label: "app.api.system.builder.post.fields.parallel.title",
244
- description: "app.api.system.builder.post.fields.parallel.description",
245
- optional: true,
246
- icon: "git-branch",
247
- colSpan: 3,
248
- },
249
- z.boolean().optional(),
250
- ),
251
-
252
- report: requestDataField(
253
- {
254
- type: WidgetType.FORM_FIELD,
255
- fieldType: FieldDataType.BOOLEAN,
256
- label: "app.api.system.builder.post.fields.report.title",
257
- description: "app.api.system.builder.post.fields.report.description",
258
- optional: true,
259
- icon: "file-text",
260
- colSpan: 3,
261
- },
262
- z.boolean().optional(),
263
- ),
264
-
265
- minify: requestDataField(
266
- {
267
- type: WidgetType.FORM_FIELD,
268
- fieldType: FieldDataType.BOOLEAN,
269
- label: "app.api.system.builder.post.fields.minify.title",
270
- description: "app.api.system.builder.post.fields.minify.description",
271
- optional: true,
272
- icon: "minimize-2",
273
- colSpan: 3,
274
- },
275
- z.boolean().optional(),
276
- ),
277
-
278
- // ==================================================================
279
- // FOLDERS TO CLEAN
280
- // ==================================================================
281
- foldersToClean: requestDataField(
282
- {
283
- type: WidgetType.FORM_FIELD,
284
- fieldType: FieldDataType.TAGS,
285
- label: "app.api.system.builder.post.fields.foldersToClean.title",
286
- description: "app.api.system.builder.post.fields.foldersToClean.description",
287
- placeholder: "app.api.system.builder.post.fields.foldersToClean.placeholder",
288
- optional: true,
289
- icon: "trash-2",
290
- colSpan: 12,
291
- },
292
- z.array(z.string()).optional(),
293
- ),
294
-
295
- // ==================================================================
296
- // FILES TO COMPILE
297
- // ==================================================================
298
- filesToCompile: requestDataArrayOptionalField(
299
- {
300
- type: WidgetType.CONTAINER,
301
- title: "app.api.system.builder.post.fields.filesToCompile.title",
302
- description: "app.api.system.builder.post.fields.filesToCompile.description",
303
- layoutType: LayoutType.GRID,
304
- columns: 12,
305
- optional: true,
306
- icon: "code",
307
- },
308
- objectField(
309
- {
310
- type: WidgetType.DATA_CARD,
311
- title: "app.api.system.builder.post.fields.fileToCompile.title",
312
- layoutType: LayoutType.GRID,
313
- columns: 12,
314
- icon: "file",
315
- },
316
- { request: "data" },
317
- {
318
- input: requestDataField(
319
- {
320
- type: WidgetType.FORM_FIELD,
321
- fieldType: FieldDataType.TEXT,
322
- label: "app.api.system.builder.post.fields.input.title",
323
- description: "app.api.system.builder.post.fields.input.description",
324
- placeholder: "app.api.system.builder.post.fields.input.placeholder",
325
- icon: "file-input",
326
- colSpan: 6,
327
- },
328
- z.string(),
329
- ),
330
-
331
- output: requestDataField(
332
- {
333
- type: WidgetType.FORM_FIELD,
334
- fieldType: FieldDataType.TEXT,
335
- label: "app.api.system.builder.post.fields.output.title",
336
- description: "app.api.system.builder.post.fields.output.description",
337
- placeholder: "app.api.system.builder.post.fields.output.placeholder",
338
- icon: "file-output",
339
- colSpan: 6,
340
- },
341
- z.string(),
342
- ),
343
-
344
- type: requestDataField(
345
- {
346
- type: WidgetType.FORM_FIELD,
347
- fieldType: FieldDataType.SELECT,
348
- label: "app.api.system.builder.post.fields.type.title",
349
- description: "app.api.system.builder.post.fields.type.description",
350
- options: BuildTypeOptions,
351
- icon: "box",
352
- colSpan: 6,
353
- },
354
- z.union([z.enum(ViteBuildTypeEnum), z.enum(BunBuildTypeEnum)]),
355
- ),
356
-
357
- modulesToExternalize: requestDataField(
358
- {
359
- type: WidgetType.FORM_FIELD,
360
- fieldType: FieldDataType.TAGS,
361
- label: "app.api.system.builder.post.fields.modulesToExternalize.title",
362
- description:
363
- "app.api.system.builder.post.fields.modulesToExternalize.description",
364
- placeholder:
365
- "app.api.system.builder.post.fields.modulesToExternalize.placeholder",
366
- optional: true,
367
- icon: "package",
368
- colSpan: 6,
369
- },
370
- z.array(z.string()).optional(),
371
- ),
372
-
373
- // Vite-specific options
374
- inlineCss: requestDataField(
375
- {
376
- type: WidgetType.FORM_FIELD,
377
- fieldType: FieldDataType.BOOLEAN,
378
- label: "app.api.system.builder.post.fields.inlineCss.title",
379
- description: "app.api.system.builder.post.fields.inlineCss.description",
380
- optional: true,
381
- icon: "paintbrush",
382
- colSpan: 4,
383
- },
384
- z.boolean().optional(),
385
- ),
386
-
387
- bundleReact: requestDataField(
388
- {
389
- type: WidgetType.FORM_FIELD,
390
- fieldType: FieldDataType.BOOLEAN,
391
- label: "app.api.system.builder.post.fields.bundleReact.title",
392
- description: "app.api.system.builder.post.fields.bundleReact.description",
393
- optional: true,
394
- icon: "atom",
395
- colSpan: 4,
396
- },
397
- z.boolean().optional(),
398
- ),
399
-
400
- // Package config for library builds
401
- packageConfig: objectOptionalField(
402
- {
403
- type: WidgetType.CONTAINER,
404
- title: "app.api.system.builder.post.fields.packageConfig.title",
405
- description: "app.api.system.builder.post.fields.packageConfig.description",
406
- layoutType: LayoutType.GRID,
407
- columns: 12,
408
- optional: true,
409
- icon: "package",
410
- },
411
- { request: "data" },
412
- {
413
- isPackage: requestDataField(
414
- {
415
- type: WidgetType.FORM_FIELD,
416
- fieldType: FieldDataType.BOOLEAN,
417
- label: "app.api.system.builder.post.fields.isPackage.title",
418
- description: "app.api.system.builder.post.fields.isPackage.description",
419
- colSpan: 4,
420
- },
421
- z.literal(true),
422
- ),
423
-
424
- dtsInclude: requestDataField(
425
- {
426
- type: WidgetType.FORM_FIELD,
427
- fieldType: FieldDataType.TAGS,
428
- label: "app.api.system.builder.post.fields.dtsInclude.title",
429
- description: "app.api.system.builder.post.fields.dtsInclude.description",
430
- placeholder: "app.api.system.builder.post.fields.dtsInclude.placeholder",
431
- icon: "file-type",
432
- colSpan: 8,
433
- },
434
- z.array(z.string()),
435
- ),
436
-
437
- dtsEntryRoot: requestDataField(
438
- {
439
- type: WidgetType.FORM_FIELD,
440
- fieldType: FieldDataType.TEXT,
441
- label: "app.api.system.builder.post.fields.dtsEntryRoot.title",
442
- description: "app.api.system.builder.post.fields.dtsEntryRoot.description",
443
- placeholder: "app.api.system.builder.post.fields.dtsEntryRoot.placeholder",
444
- icon: "folder",
445
- colSpan: 12,
446
- },
447
- z.string(),
448
- ),
449
- },
450
- ),
451
-
452
- // Bun-specific options
453
- bunOptions: objectOptionalField(
454
- {
455
- type: WidgetType.CONTAINER,
456
- title: "app.api.system.builder.post.fields.bunOptions.title",
457
- description: "app.api.system.builder.post.fields.bunOptions.description",
458
- layoutType: LayoutType.GRID,
459
- columns: 12,
460
- optional: true,
461
- icon: "zap",
462
- },
463
- { request: "data" },
464
- {
465
- target: requestDataField(
466
- {
467
- type: WidgetType.FORM_FIELD,
468
- fieldType: FieldDataType.SELECT,
469
- label: "app.api.system.builder.post.fields.bunTarget.title",
470
- description: "app.api.system.builder.post.fields.bunTarget.description",
471
- options: BunTargetOptions,
472
- optional: true,
473
- icon: "target",
474
- colSpan: 4,
475
- },
476
- z.enum(BunTargetEnum).optional(),
477
- ),
478
-
479
- minify: requestDataField(
480
- {
481
- type: WidgetType.FORM_FIELD,
482
- fieldType: FieldDataType.BOOLEAN,
483
- label: "app.api.system.builder.post.fields.bunMinify.title",
484
- description: "app.api.system.builder.post.fields.bunMinify.description",
485
- optional: true,
486
- icon: "minimize-2",
487
- colSpan: 4,
488
- },
489
- z.boolean().optional(),
490
- ),
491
-
492
- sourcemap: requestDataField(
493
- {
494
- type: WidgetType.FORM_FIELD,
495
- fieldType: FieldDataType.SELECT,
496
- label: "app.api.system.builder.post.fields.sourcemap.title",
497
- description: "app.api.system.builder.post.fields.sourcemap.description",
498
- options: SourcemapModeOptions,
499
- optional: true,
500
- icon: "map",
501
- colSpan: 4,
502
- },
503
- z.enum(SourcemapModeEnum).optional(),
504
- ),
505
-
506
- external: requestDataField(
507
- {
508
- type: WidgetType.FORM_FIELD,
509
- fieldType: FieldDataType.TAGS,
510
- label: "app.api.system.builder.post.fields.external.title",
511
- description: "app.api.system.builder.post.fields.external.description",
512
- placeholder: "app.api.system.builder.post.fields.external.placeholder",
513
- optional: true,
514
- icon: "external-link",
515
- colSpan: 12,
516
- },
517
- z.array(z.string()).optional(),
518
- ),
519
-
520
- define: requestDataField(
521
- {
522
- type: WidgetType.FORM_FIELD,
523
- fieldType: FieldDataType.JSON,
524
- label: "app.api.system.builder.post.fields.define.title",
525
- description: "app.api.system.builder.post.fields.define.description",
526
- placeholder: "app.api.system.builder.post.fields.define.placeholder",
527
- optional: true,
528
- icon: "code",
529
- colSpan: 12,
530
- },
531
- z.record(z.string(), z.string()).optional(),
532
- ),
533
-
534
- splitting: requestDataField(
535
- {
536
- type: WidgetType.FORM_FIELD,
537
- fieldType: FieldDataType.BOOLEAN,
538
- label: "app.api.system.builder.post.fields.splitting.title",
539
- description: "app.api.system.builder.post.fields.splitting.description",
540
- optional: true,
541
- icon: "git-branch",
542
- colSpan: 4,
543
- },
544
- z.boolean().optional(),
545
- ),
546
-
547
- format: requestDataField(
548
- {
549
- type: WidgetType.FORM_FIELD,
550
- fieldType: FieldDataType.SELECT,
551
- label: "app.api.system.builder.post.fields.format.title",
552
- description: "app.api.system.builder.post.fields.format.description",
553
- options: OutputFormatOptions,
554
- optional: true,
555
- icon: "file-code",
556
- colSpan: 4,
557
- },
558
- z.enum(OutputFormatEnum).optional(),
559
- ),
560
-
561
- bytecode: requestDataField(
562
- {
563
- type: WidgetType.FORM_FIELD,
564
- fieldType: FieldDataType.BOOLEAN,
565
- label: "app.api.system.builder.post.fields.bytecode.title",
566
- description: "app.api.system.builder.post.fields.bytecode.description",
567
- optional: true,
568
- icon: "binary",
569
- colSpan: 4,
570
- },
571
- z.boolean().optional(),
572
- ),
573
-
574
- banner: requestDataField(
575
- {
576
- type: WidgetType.FORM_FIELD,
577
- fieldType: FieldDataType.TEXTAREA,
578
- label: "app.api.system.builder.post.fields.banner.title",
579
- description: "app.api.system.builder.post.fields.banner.description",
580
- placeholder: "app.api.system.builder.post.fields.banner.placeholder",
581
- optional: true,
582
- icon: "chevron-up",
583
- colSpan: 6,
584
- },
585
- z.string().optional(),
586
- ),
587
-
588
- footer: requestDataField(
589
- {
590
- type: WidgetType.FORM_FIELD,
591
- fieldType: FieldDataType.TEXTAREA,
592
- label: "app.api.system.builder.post.fields.footer.title",
593
- description: "app.api.system.builder.post.fields.footer.description",
594
- placeholder: "app.api.system.builder.post.fields.footer.placeholder",
595
- optional: true,
596
- icon: "chevron-down",
597
- colSpan: 6,
598
- },
599
- z.string().optional(),
600
- ),
601
-
602
- // Advanced Bun options (passthrough to Bun.build)
603
- publicPath: requestDataField(
604
- {
605
- type: WidgetType.FORM_FIELD,
606
- fieldType: FieldDataType.TEXT,
607
- label: "app.api.system.builder.post.fields.publicPath.label",
608
- description: "app.api.system.builder.post.fields.publicPath.description",
609
- optional: true,
610
- colSpan: 6,
611
- },
612
- z.string().optional(),
613
- ),
614
-
615
- naming: requestDataField(
616
- {
617
- type: WidgetType.FORM_FIELD,
618
- fieldType: FieldDataType.JSON,
619
- label: "app.api.system.builder.post.fields.naming.label",
620
- description: "app.api.system.builder.post.fields.naming.description",
621
- optional: true,
622
- colSpan: 6,
623
- },
624
- z
625
- .union([
626
- z.string(),
627
- z.object({
628
- entry: z.string().optional(),
629
- chunk: z.string().optional(),
630
- asset: z.string().optional(),
631
- }),
632
- ])
633
- .optional(),
634
- ),
635
-
636
- root: requestDataField(
637
- {
638
- type: WidgetType.FORM_FIELD,
639
- fieldType: FieldDataType.TEXT,
640
- label: "app.api.system.builder.post.fields.root.label",
641
- description: "app.api.system.builder.post.fields.root.description",
642
- optional: true,
643
- colSpan: 6,
644
- },
645
- z.string().optional(),
646
- ),
647
-
648
- conditions: requestDataField(
649
- {
650
- type: WidgetType.FORM_FIELD,
651
- fieldType: FieldDataType.JSON,
652
- label: "app.api.system.builder.post.fields.conditions.label",
653
- description: "app.api.system.builder.post.fields.conditions.description",
654
- optional: true,
655
- colSpan: 6,
656
- },
657
- z.array(z.string()).optional(),
658
- ),
659
-
660
- loader: requestDataField(
661
- {
662
- type: WidgetType.FORM_FIELD,
663
- fieldType: FieldDataType.JSON,
664
- label: "app.api.system.builder.post.fields.loader.label",
665
- description: "app.api.system.builder.post.fields.loader.description",
666
- optional: true,
667
- colSpan: 6,
668
- },
669
- z
670
- .record(
671
- z.string(),
672
- z.enum([
673
- "js",
674
- "jsx",
675
- "ts",
676
- "tsx",
677
- "json",
678
- "toml",
679
- "text",
680
- "file",
681
- "napi",
682
- "wasm",
683
- ]),
684
- )
685
- .optional(),
686
- ),
687
-
688
- drop: requestDataField(
689
- {
690
- type: WidgetType.FORM_FIELD,
691
- fieldType: FieldDataType.JSON,
692
- label: "app.api.system.builder.post.fields.drop.label",
693
- description: "app.api.system.builder.post.fields.drop.description",
694
- optional: true,
695
- colSpan: 6,
696
- },
697
- z.array(z.string()).optional(),
698
- ),
699
- },
700
- ),
701
-
702
- // Vite advanced options
703
- viteOptions: objectOptionalField(
704
- {
705
- type: WidgetType.CONTAINER,
706
- title: "app.api.system.builder.post.fields.viteOptions.title",
707
- description: "app.api.system.builder.post.fields.viteOptions.description",
708
- layoutType: LayoutType.GRID,
709
- columns: 12,
710
- optional: true,
711
- icon: "bot",
712
- },
713
- { request: "data" },
714
- {
715
- target: requestDataField(
716
- {
717
- type: WidgetType.FORM_FIELD,
718
- fieldType: FieldDataType.TAGS,
719
- label: "app.api.system.builder.post.fields.viteTarget.title",
720
- description: "app.api.system.builder.post.fields.viteTarget.description",
721
- placeholder: "app.api.system.builder.post.fields.viteTarget.placeholder",
722
- optional: true,
723
- icon: "target",
724
- colSpan: 6,
725
- },
726
- z.union([z.string(), z.array(z.string())]).optional(),
727
- ),
728
-
729
- outDir: requestDataField(
730
- {
731
- type: WidgetType.FORM_FIELD,
732
- fieldType: FieldDataType.TEXT,
733
- label: "app.api.system.builder.post.fields.viteOutDir.title",
734
- description: "app.api.system.builder.post.fields.viteOutDir.description",
735
- placeholder: "app.api.system.builder.post.fields.viteOutDir.placeholder",
736
- optional: true,
737
- icon: "folder-output",
738
- colSpan: 6,
739
- },
740
- z.string().optional(),
741
- ),
742
-
743
- assetsDir: requestDataField(
744
- {
745
- type: WidgetType.FORM_FIELD,
746
- fieldType: FieldDataType.TEXT,
747
- label: "app.api.system.builder.post.fields.viteAssetsDir.title",
748
- description: "app.api.system.builder.post.fields.viteAssetsDir.description",
749
- placeholder: "app.api.system.builder.post.fields.viteAssetsDir.placeholder",
750
- optional: true,
751
- icon: "folder",
752
- colSpan: 4,
753
- },
754
- z.string().optional(),
755
- ),
756
-
757
- assetsInlineLimit: requestDataField(
758
- {
759
- type: WidgetType.FORM_FIELD,
760
- fieldType: FieldDataType.NUMBER,
761
- label: "app.api.system.builder.post.fields.viteAssetsInlineLimit.title",
762
- description:
763
- "app.api.system.builder.post.fields.viteAssetsInlineLimit.description",
764
- placeholder:
765
- "app.api.system.builder.post.fields.viteAssetsInlineLimit.placeholder",
766
- optional: true,
767
- icon: "file-image",
768
- colSpan: 4,
769
- },
770
- z.number().optional(),
771
- ),
772
-
773
- chunkSizeWarningLimit: requestDataField(
774
- {
775
- type: WidgetType.FORM_FIELD,
776
- fieldType: FieldDataType.NUMBER,
777
- label: "app.api.system.builder.post.fields.viteChunkSizeWarningLimit.title",
778
- description:
779
- "app.api.system.builder.post.fields.viteChunkSizeWarningLimit.description",
780
- placeholder:
781
- "app.api.system.builder.post.fields.viteChunkSizeWarningLimit.placeholder",
782
- optional: true,
783
- icon: "alert-triangle",
784
- colSpan: 4,
785
- },
786
- z.number().optional(),
787
- ),
788
-
789
- cssCodeSplit: requestDataField(
790
- {
791
- type: WidgetType.FORM_FIELD,
792
- fieldType: FieldDataType.BOOLEAN,
793
- label: "app.api.system.builder.post.fields.viteCssCodeSplit.title",
794
- description:
795
- "app.api.system.builder.post.fields.viteCssCodeSplit.description",
796
- optional: true,
797
- icon: "scissors",
798
- colSpan: 4,
799
- },
800
- z.boolean().optional(),
801
- ),
802
-
803
- sourcemap: requestDataField(
804
- {
805
- type: WidgetType.FORM_FIELD,
806
- fieldType: FieldDataType.SELECT,
807
- label: "app.api.system.builder.post.fields.viteSourcemap.title",
808
- description: "app.api.system.builder.post.fields.viteSourcemap.description",
809
- options: [
810
- {
811
- value: "true",
812
- label: "app.api.system.builder.enums.viteSourcemap.true",
813
- },
814
- {
815
- value: "false",
816
- label: "app.api.system.builder.enums.viteSourcemap.false",
817
- },
818
- {
819
- value: "inline",
820
- label: "app.api.system.builder.enums.viteSourcemap.inline",
821
- },
822
- {
823
- value: "hidden",
824
- label: "app.api.system.builder.enums.viteSourcemap.hidden",
825
- },
826
- ],
827
- optional: true,
828
- icon: "map",
829
- colSpan: 4,
830
- },
831
- z.union([z.boolean(), z.literal("inline"), z.literal("hidden")]).optional(),
832
- ),
833
-
834
- minify: requestDataField(
835
- {
836
- type: WidgetType.FORM_FIELD,
837
- fieldType: FieldDataType.SELECT,
838
- label: "app.api.system.builder.post.fields.viteMinify.title",
839
- description: "app.api.system.builder.post.fields.viteMinify.description",
840
- options: ViteMinifyOptions,
841
- optional: true,
842
- icon: "minimize-2",
843
- colSpan: 4,
844
- },
845
- z.union([z.boolean(), z.literal("terser"), z.literal("esbuild")]).optional(),
846
- ),
847
-
848
- emptyOutDir: requestDataField(
849
- {
850
- type: WidgetType.FORM_FIELD,
851
- fieldType: FieldDataType.BOOLEAN,
852
- label: "app.api.system.builder.post.fields.viteEmptyOutDir.title",
853
- description:
854
- "app.api.system.builder.post.fields.viteEmptyOutDir.description",
855
- optional: true,
856
- icon: "trash",
857
- colSpan: 4,
858
- },
859
- z.boolean().optional(),
860
- ),
861
-
862
- reportCompressedSize: requestDataField(
863
- {
864
- type: WidgetType.FORM_FIELD,
865
- fieldType: FieldDataType.BOOLEAN,
866
- label: "app.api.system.builder.post.fields.viteReportCompressedSize.title",
867
- description:
868
- "app.api.system.builder.post.fields.viteReportCompressedSize.description",
869
- optional: true,
870
- icon: "archive",
871
- colSpan: 4,
872
- },
873
- z.boolean().optional(),
874
- ),
875
-
876
- manifest: requestDataField(
877
- {
878
- type: WidgetType.FORM_FIELD,
879
- fieldType: FieldDataType.BOOLEAN,
880
- label: "app.api.system.builder.post.fields.viteManifest.title",
881
- description: "app.api.system.builder.post.fields.viteManifest.description",
882
- optional: true,
883
- icon: "list",
884
- colSpan: 4,
885
- },
886
- z.union([z.boolean(), z.string()]).optional(),
887
- ),
888
-
889
- // Library mode options
890
- lib: objectOptionalField(
891
- {
892
- type: WidgetType.CONTAINER,
893
- title: "app.api.system.builder.post.fields.viteLib.title",
894
- description: "app.api.system.builder.post.fields.viteLib.description",
895
- layoutType: LayoutType.GRID,
896
- columns: 12,
897
- optional: true,
898
- icon: "library",
899
- },
900
- { request: "data" },
901
- {
902
- entry: requestDataField(
903
- {
904
- type: WidgetType.FORM_FIELD,
905
- fieldType: FieldDataType.TEXT,
906
- label: "app.api.system.builder.post.fields.viteLibEntry.title",
907
- description:
908
- "app.api.system.builder.post.fields.viteLibEntry.description",
909
- placeholder:
910
- "app.api.system.builder.post.fields.viteLibEntry.placeholder",
911
- icon: "file-input",
912
- colSpan: 6,
913
- },
914
- z.union([
915
- z.string(),
916
- z.array(z.string()),
917
- z.record(z.string(), z.string()),
918
- ]),
919
- ),
920
-
921
- name: requestDataField(
922
- {
923
- type: WidgetType.FORM_FIELD,
924
- fieldType: FieldDataType.TEXT,
925
- label: "app.api.system.builder.post.fields.viteLibName.title",
926
- description:
927
- "app.api.system.builder.post.fields.viteLibName.description",
928
- placeholder:
929
- "app.api.system.builder.post.fields.viteLibName.placeholder",
930
- optional: true,
931
- icon: "tag",
932
- colSpan: 6,
933
- },
934
- z.string().optional(),
935
- ),
936
-
937
- formats: requestDataField(
938
- {
939
- type: WidgetType.FORM_FIELD,
940
- fieldType: FieldDataType.MULTISELECT,
941
- label: "app.api.system.builder.post.fields.viteLibFormats.title",
942
- description:
943
- "app.api.system.builder.post.fields.viteLibFormats.description",
944
- options: ViteLibFormatOptions,
945
- optional: true,
946
- icon: "file-code",
947
- colSpan: 6,
948
- },
949
- z.array(z.enum(ViteLibFormatEnum)).optional(),
950
- ),
951
-
952
- fileName: requestDataField(
953
- {
954
- type: WidgetType.FORM_FIELD,
955
- fieldType: FieldDataType.TEXT,
956
- label: "app.api.system.builder.post.fields.viteLibFileName.title",
957
- description:
958
- "app.api.system.builder.post.fields.viteLibFileName.description",
959
- placeholder:
960
- "app.api.system.builder.post.fields.viteLibFileName.placeholder",
961
- optional: true,
962
- icon: "file",
963
- colSpan: 6,
964
- },
965
- z.string().optional(),
966
- ),
967
- },
968
- ),
969
-
970
- // Rollup options subset
971
- rollupOptions: objectOptionalField(
972
- {
973
- type: WidgetType.CONTAINER,
974
- title: "app.api.system.builder.post.fields.viteRollupOptions.title",
975
- description:
976
- "app.api.system.builder.post.fields.viteRollupOptions.description",
977
- layoutType: LayoutType.GRID,
978
- columns: 12,
979
- optional: true,
980
- icon: "package",
981
- },
982
- { request: "data" },
983
- {
984
- external: requestDataField(
985
- {
986
- type: WidgetType.FORM_FIELD,
987
- fieldType: FieldDataType.TAGS,
988
- label: "app.api.system.builder.post.fields.rollupExternal.title",
989
- description:
990
- "app.api.system.builder.post.fields.rollupExternal.description",
991
- placeholder:
992
- "app.api.system.builder.post.fields.rollupExternal.placeholder",
993
- optional: true,
994
- icon: "external-link",
995
- colSpan: 12,
996
- },
997
- z.union([z.string(), z.array(z.string())]).optional(),
998
- ),
999
-
1000
- treeshake: requestDataField(
1001
- {
1002
- type: WidgetType.FORM_FIELD,
1003
- fieldType: FieldDataType.BOOLEAN,
1004
- label: "app.api.system.builder.post.fields.rollupTreeshake.title",
1005
- description:
1006
- "app.api.system.builder.post.fields.rollupTreeshake.description",
1007
- optional: true,
1008
- icon: "tree",
1009
- colSpan: 6,
1010
- },
1011
- z
1012
- .union([
1013
- z.boolean(),
1014
- z.object({
1015
- moduleSideEffects: z.boolean().optional(),
1016
- }),
1017
- ])
1018
- .optional(),
1019
- ),
1020
-
1021
- output: requestDataField(
1022
- {
1023
- type: WidgetType.FORM_FIELD,
1024
- fieldType: FieldDataType.JSON,
1025
- label: "app.api.system.builder.post.fields.rollupOutput.label",
1026
- description:
1027
- "app.api.system.builder.post.fields.rollupOutput.description",
1028
- optional: true,
1029
- icon: "file-output",
1030
- colSpan: 12,
1031
- },
1032
- z.record(z.string(), z.unknown()).optional(),
1033
- ),
1034
- },
1035
- ),
1036
-
1037
- // Raw plugins passthrough (for programmatic config files)
1038
- plugins: requestDataField(
1039
- {
1040
- type: WidgetType.FORM_FIELD,
1041
- fieldType: FieldDataType.JSON,
1042
- label: "app.api.system.builder.post.fields.vitePlugins.label",
1043
- description: "app.api.system.builder.post.fields.vitePlugins.description",
1044
- optional: true,
1045
- icon: "plug",
1046
- colSpan: 12,
1047
- },
1048
- z.array(z.unknown()).optional(),
1049
- ),
1050
-
1051
- // Raw build options passthrough
1052
- build: requestDataField(
1053
- {
1054
- type: WidgetType.FORM_FIELD,
1055
- fieldType: FieldDataType.JSON,
1056
- label: "app.api.system.builder.post.fields.viteBuild.label",
1057
- description: "app.api.system.builder.post.fields.viteBuild.description",
1058
- optional: true,
1059
- icon: "settings",
1060
- colSpan: 12,
1061
- },
1062
- z.record(z.string(), z.unknown()).optional(),
1063
- ),
1064
- },
1065
- ),
1066
- },
1067
- ),
1068
- ),
1069
-
1070
- // ==================================================================
1071
- // FILES/FOLDERS TO COPY
1072
- // ==================================================================
1073
- filesOrFoldersToCopy: requestDataArrayOptionalField(
1074
- {
1075
- type: WidgetType.CONTAINER,
1076
- title: "app.api.system.builder.post.fields.filesOrFoldersToCopy.title",
1077
- description: "app.api.system.builder.post.fields.filesOrFoldersToCopy.description",
1078
- layoutType: LayoutType.GRID,
1079
- columns: 12,
1080
- optional: true,
1081
- icon: "copy",
1082
- },
1083
- objectField(
1084
- {
1085
- type: WidgetType.DATA_CARD,
1086
- title: "app.api.system.builder.post.fields.copyConfig.title",
1087
- layoutType: LayoutType.GRID,
1088
- columns: 12,
1089
- icon: "file-copy",
1090
- },
1091
- { request: "data" },
1092
- {
1093
- input: requestDataField(
1094
- {
1095
- type: WidgetType.FORM_FIELD,
1096
- fieldType: FieldDataType.TEXT,
1097
- label: "app.api.system.builder.post.fields.copyInput.title",
1098
- description: "app.api.system.builder.post.fields.copyInput.description",
1099
- placeholder: "app.api.system.builder.post.fields.copyInput.placeholder",
1100
- icon: "file-input",
1101
- colSpan: 5,
1102
- },
1103
- z.string(),
1104
- ),
1105
-
1106
- output: requestDataField(
1107
- {
1108
- type: WidgetType.FORM_FIELD,
1109
- fieldType: FieldDataType.TEXT,
1110
- label: "app.api.system.builder.post.fields.copyOutput.title",
1111
- description: "app.api.system.builder.post.fields.copyOutput.description",
1112
- placeholder: "app.api.system.builder.post.fields.copyOutput.placeholder",
1113
- icon: "file-output",
1114
- colSpan: 5,
1115
- },
1116
- z.string(),
1117
- ),
1118
-
1119
- pattern: requestDataField(
1120
- {
1121
- type: WidgetType.FORM_FIELD,
1122
- fieldType: FieldDataType.TEXT,
1123
- label: "app.api.system.builder.post.fields.copyPattern.title",
1124
- description: "app.api.system.builder.post.fields.copyPattern.description",
1125
- placeholder: "app.api.system.builder.post.fields.copyPattern.placeholder",
1126
- optional: true,
1127
- icon: "filter",
1128
- colSpan: 2,
1129
- },
1130
- z.string().optional(),
1131
- ),
1132
- },
1133
- ),
1134
- ),
1135
-
1136
- // ==================================================================
1137
- // NPM PACKAGE CONFIGURATION
1138
- // ==================================================================
1139
- npmPackage: objectOptionalField(
1140
- {
1141
- type: WidgetType.ACCORDION,
1142
- title: "app.api.system.builder.post.fields.npmPackage.title",
1143
- description: "app.api.system.builder.post.fields.npmPackage.description",
1144
- layoutType: LayoutType.GRID,
1145
- columns: 12,
1146
- optional: true,
1147
- icon: "npm",
1148
- defaultExpanded: false,
1149
- },
1150
- { request: "data" },
1151
- {
1152
- name: requestDataField(
1153
- {
1154
- type: WidgetType.FORM_FIELD,
1155
- fieldType: FieldDataType.TEXT,
1156
- label: "app.api.system.builder.post.fields.packageName.title",
1157
- description: "app.api.system.builder.post.fields.packageName.description",
1158
- placeholder: "app.api.system.builder.post.fields.packageName.placeholder",
1159
- icon: "package",
1160
- colSpan: 6,
1161
- },
1162
- z.string(),
1163
- ),
1164
-
1165
- version: requestDataField(
1166
- {
1167
- type: WidgetType.FORM_FIELD,
1168
- fieldType: FieldDataType.TEXT,
1169
- label: "app.api.system.builder.post.fields.packageVersion.title",
1170
- description: "app.api.system.builder.post.fields.packageVersion.description",
1171
- placeholder: "app.api.system.builder.post.fields.packageVersion.placeholder",
1172
- optional: true,
1173
- icon: "tag",
1174
- colSpan: 6,
1175
- },
1176
- z.string().optional(),
1177
- ),
1178
-
1179
- description: requestDataField(
1180
- {
1181
- type: WidgetType.FORM_FIELD,
1182
- fieldType: FieldDataType.TEXTAREA,
1183
- label: "app.api.system.builder.post.fields.packageDescription.title",
1184
- description: "app.api.system.builder.post.fields.packageDescription.description",
1185
- placeholder: "app.api.system.builder.post.fields.packageDescription.placeholder",
1186
- optional: true,
1187
- icon: "text",
1188
- colSpan: 12,
1189
- },
1190
- z.string().optional(),
1191
- ),
1192
-
1193
- main: requestDataField(
1194
- {
1195
- type: WidgetType.FORM_FIELD,
1196
- fieldType: FieldDataType.TEXT,
1197
- label: "app.api.system.builder.post.fields.packageMain.title",
1198
- description: "app.api.system.builder.post.fields.packageMain.description",
1199
- placeholder: "app.api.system.builder.post.fields.packageMain.placeholder",
1200
- optional: true,
1201
- icon: "file-code",
1202
- colSpan: 4,
1203
- },
1204
- z.string().optional(),
1205
- ),
1206
-
1207
- module: requestDataField(
1208
- {
1209
- type: WidgetType.FORM_FIELD,
1210
- fieldType: FieldDataType.TEXT,
1211
- label: "app.api.system.builder.post.fields.packageModule.title",
1212
- description: "app.api.system.builder.post.fields.packageModule.description",
1213
- placeholder: "app.api.system.builder.post.fields.packageModule.placeholder",
1214
- optional: true,
1215
- icon: "file-code-2",
1216
- colSpan: 4,
1217
- },
1218
- z.string().optional(),
1219
- ),
1220
-
1221
- types: requestDataField(
1222
- {
1223
- type: WidgetType.FORM_FIELD,
1224
- fieldType: FieldDataType.TEXT,
1225
- label: "app.api.system.builder.post.fields.packageTypes.title",
1226
- description: "app.api.system.builder.post.fields.packageTypes.description",
1227
- placeholder: "app.api.system.builder.post.fields.packageTypes.placeholder",
1228
- optional: true,
1229
- icon: "file-type",
1230
- colSpan: 4,
1231
- },
1232
- z.string().optional(),
1233
- ),
1234
-
1235
- bin: requestDataField(
1236
- {
1237
- type: WidgetType.FORM_FIELD,
1238
- fieldType: FieldDataType.JSON,
1239
- label: "app.api.system.builder.post.fields.packageBin.title",
1240
- description: "app.api.system.builder.post.fields.packageBin.description",
1241
- placeholder: "app.api.system.builder.post.fields.packageBin.placeholder",
1242
- optional: true,
1243
- icon: "terminal",
1244
- colSpan: 12,
1245
- },
1246
- z.record(z.string(), z.string()).optional(),
1247
- ),
1248
-
1249
- exports: requestDataField(
1250
- {
1251
- type: WidgetType.FORM_FIELD,
1252
- fieldType: FieldDataType.JSON,
1253
- label: "app.api.system.builder.post.fields.packageExports.title",
1254
- description: "app.api.system.builder.post.fields.packageExports.description",
1255
- placeholder: "app.api.system.builder.post.fields.packageExports.placeholder",
1256
- optional: true,
1257
- icon: "share-2",
1258
- colSpan: 12,
1259
- },
1260
- z.record(z.string(), PackageExportConditionSchema).optional(),
1261
- ),
1262
-
1263
- dependencies: requestDataField(
1264
- {
1265
- type: WidgetType.FORM_FIELD,
1266
- fieldType: FieldDataType.JSON,
1267
- label: "app.api.system.builder.post.fields.packageDependencies.title",
1268
- description: "app.api.system.builder.post.fields.packageDependencies.description",
1269
- placeholder: "app.api.system.builder.post.fields.packageDependencies.placeholder",
1270
- optional: true,
1271
- icon: "package",
1272
- colSpan: 6,
1273
- },
1274
- z.record(z.string(), z.string()).optional(),
1275
- ),
1276
-
1277
- peerDependencies: requestDataField(
1278
- {
1279
- type: WidgetType.FORM_FIELD,
1280
- fieldType: FieldDataType.JSON,
1281
- label: "app.api.system.builder.post.fields.packagePeerDependencies.title",
1282
- description:
1283
- "app.api.system.builder.post.fields.packagePeerDependencies.description",
1284
- placeholder:
1285
- "app.api.system.builder.post.fields.packagePeerDependencies.placeholder",
1286
- optional: true,
1287
- icon: "users",
1288
- colSpan: 6,
1289
- },
1290
- z.record(z.string(), z.string()).optional(),
1291
- ),
1292
-
1293
- files: requestDataField(
1294
- {
1295
- type: WidgetType.FORM_FIELD,
1296
- fieldType: FieldDataType.TAGS,
1297
- label: "app.api.system.builder.post.fields.packageFiles.title",
1298
- description: "app.api.system.builder.post.fields.packageFiles.description",
1299
- placeholder: "app.api.system.builder.post.fields.packageFiles.placeholder",
1300
- optional: true,
1301
- icon: "folder",
1302
- colSpan: 6,
1303
- },
1304
- z.array(z.string()).optional(),
1305
- ),
1306
-
1307
- keywords: requestDataField(
1308
- {
1309
- type: WidgetType.FORM_FIELD,
1310
- fieldType: FieldDataType.TAGS,
1311
- label: "app.api.system.builder.post.fields.packageKeywords.title",
1312
- description: "app.api.system.builder.post.fields.packageKeywords.description",
1313
- placeholder: "app.api.system.builder.post.fields.packageKeywords.placeholder",
1314
- optional: true,
1315
- icon: "hash",
1316
- colSpan: 6,
1317
- },
1318
- z.array(z.string()).optional(),
1319
- ),
1320
-
1321
- license: requestDataField(
1322
- {
1323
- type: WidgetType.FORM_FIELD,
1324
- fieldType: FieldDataType.TEXT,
1325
- label: "app.api.system.builder.post.fields.packageLicense.title",
1326
- description: "app.api.system.builder.post.fields.packageLicense.description",
1327
- placeholder: "app.api.system.builder.post.fields.packageLicense.placeholder",
1328
- optional: true,
1329
- icon: "scale",
1330
- colSpan: 6,
1331
- },
1332
- z.string().optional(),
1333
- ),
1334
-
1335
- repository: requestDataField(
1336
- {
1337
- type: WidgetType.FORM_FIELD,
1338
- fieldType: FieldDataType.TEXT,
1339
- label: "app.api.system.builder.post.fields.packageRepository.title",
1340
- description: "app.api.system.builder.post.fields.packageRepository.description",
1341
- placeholder: "app.api.system.builder.post.fields.packageRepository.placeholder",
1342
- optional: true,
1343
- icon: "github",
1344
- colSpan: 6,
1345
- },
1346
- z.union([z.string(), z.object({ type: z.string(), url: z.string() })]).optional(),
1347
- ),
1348
- },
1349
- ),
1350
- },
1351
- ),
1352
-
1353
- // ========================================================================
1354
- // RESPONSE FIELDS
1355
- // ========================================================================
1356
- success: responseField(
1357
- {
1358
- type: WidgetType.STATUS_INDICATOR,
1359
- status: "success",
1360
- label: "app.api.system.builder.post.fields.success.title",
1361
- icon: "check-circle",
1362
- },
1363
- z.boolean(),
1364
- ),
1365
-
1366
- output: responseField(
1367
- {
1368
- type: WidgetType.CODE_OUTPUT,
1369
- content: "app.api.system.builder.post.fields.buildOutput.title",
1370
- language: "plaintext",
1371
- icon: "terminal",
1372
- },
1373
- z.string(),
1374
- ),
1375
-
1376
- duration: responseField(
1377
- {
1378
- type: WidgetType.STAT,
1379
- content: "app.api.system.builder.post.fields.duration.title",
1380
- icon: "clock",
1381
- suffix: "ms",
1382
- },
1383
- z.coerce.number(),
1384
- ),
1385
-
1386
- filesBuilt: responseArrayOptionalField(
1387
- {
1388
- type: WidgetType.DATA_LIST,
1389
- items: [],
1390
- optional: true,
1391
- icon: "file-check",
1392
- },
1393
- z.string(),
1394
- ),
1395
-
1396
- filesCopied: responseArrayOptionalField(
1397
- {
1398
- type: WidgetType.DATA_LIST,
1399
- items: [],
1400
- optional: true,
1401
- icon: "file-copy",
1402
- },
1403
- z.string(),
1404
- ),
1405
-
1406
- packageJson: responseField(
1407
- {
1408
- type: WidgetType.CODE_OUTPUT,
1409
- content: "app.api.system.builder.post.fields.packageJson.title",
1410
- language: "json",
1411
- optional: true,
1412
- icon: "file-json",
1413
- },
1414
- z.string().optional(),
1415
- ),
1416
-
1417
- profileUsed: responseField(
1418
- {
1419
- type: WidgetType.BADGE,
1420
- content: "app.api.system.builder.post.fields.profileUsed.title",
1421
- optional: true,
1422
- icon: "layers",
1423
- },
1424
- z.enum(BuildProfileEnum).optional(),
1425
- ),
1426
-
1427
- reportPath: responseField(
1428
- {
1429
- type: WidgetType.TEXT,
1430
- content: "app.api.system.builder.post.fields.reportPath.title",
1431
- },
1432
- z.string().optional(),
1433
- ),
1434
-
1435
- stepTimings: responseArrayOptionalField(
1436
- {
1437
- type: WidgetType.DATA_TABLE,
1438
- columns: [
1439
- {
1440
- key: "step",
1441
- label: "app.api.system.builder.post.fields.stepTimings.step",
1442
- },
1443
- {
1444
- key: "duration",
1445
- label: "app.api.system.builder.post.fields.stepTimings.duration",
1446
- },
1447
- {
1448
- key: "status",
1449
- label: "app.api.system.builder.post.fields.stepTimings.status",
1450
- },
1451
- {
1452
- key: "filesAffected",
1453
- label: "app.api.system.builder.post.fields.stepTimings.filesAffected",
1454
- },
1455
- ],
1456
- optional: true,
1457
- icon: "list-checks",
1458
- },
1459
- objectField(
1460
- {
1461
- type: WidgetType.CONTAINER,
1462
- layoutType: LayoutType.GRID,
1463
- columns: 12,
1464
- },
1465
- { response: true },
1466
- {
1467
- step: responseField(
1468
- {
1469
- type: WidgetType.TEXT,
1470
- content: "app.api.system.builder.post.fields.stepTimings.step",
1471
- icon: "chevron-right",
1472
- },
1473
- z.string(),
1474
- ),
1475
- duration: responseField(
1476
- {
1477
- type: WidgetType.STAT,
1478
- label: "app.api.system.builder.post.fields.stepTimings.duration",
1479
- icon: "clock",
1480
- suffix: "ms",
1481
- },
1482
- z.coerce.number(),
1483
- ),
1484
- status: responseField(
1485
- {
1486
- type: WidgetType.BADGE,
1487
- label: "app.api.system.builder.post.fields.stepTimings.status",
1488
- icon: "activity",
1489
- },
1490
- z.enum(StepStatusEnum),
1491
- ),
1492
- filesAffected: responseField(
1493
- {
1494
- type: WidgetType.STAT,
1495
- label: "app.api.system.builder.post.fields.stepTimings.filesAffected",
1496
- optional: true,
1497
- icon: "folder",
1498
- },
1499
- z.coerce.number().optional(),
1500
- ),
1501
- },
1502
- ),
1503
- ),
1504
- },
1505
- ),
1506
-
1507
- // === ERROR HANDLING ===
1508
- errorTypes: {
1509
- [EndpointErrorTypes.VALIDATION_FAILED]: {
1510
- title: "app.api.system.builder.post.errors.validation.title",
1511
- description: "app.api.system.builder.post.errors.validation.description",
1512
- },
1513
- [EndpointErrorTypes.NETWORK_ERROR]: {
1514
- title: "app.api.system.builder.post.errors.network.title",
1515
- description: "app.api.system.builder.post.errors.network.description",
1516
- },
1517
- [EndpointErrorTypes.UNAUTHORIZED]: {
1518
- title: "app.api.system.builder.post.errors.unauthorized.title",
1519
- description: "app.api.system.builder.post.errors.unauthorized.description",
1520
- },
1521
- [EndpointErrorTypes.FORBIDDEN]: {
1522
- title: "app.api.system.builder.post.errors.forbidden.title",
1523
- description: "app.api.system.builder.post.errors.forbidden.description",
1524
- },
1525
- [EndpointErrorTypes.NOT_FOUND]: {
1526
- title: "app.api.system.builder.post.errors.notFound.title",
1527
- description: "app.api.system.builder.post.errors.notFound.description",
1528
- },
1529
- [EndpointErrorTypes.SERVER_ERROR]: {
1530
- title: "app.api.system.builder.post.errors.server.title",
1531
- description: "app.api.system.builder.post.errors.server.description",
1532
- },
1533
- [EndpointErrorTypes.UNKNOWN_ERROR]: {
1534
- title: "app.api.system.builder.post.errors.unknown.title",
1535
- description: "app.api.system.builder.post.errors.unknown.description",
1536
- },
1537
- [EndpointErrorTypes.CONFLICT]: {
1538
- title: "app.api.system.builder.post.errors.conflict.title",
1539
- description: "app.api.system.builder.post.errors.conflict.description",
1540
- },
1541
- [EndpointErrorTypes.UNSAVED_CHANGES]: {
1542
- title: "app.api.system.builder.post.errors.unsavedChanges.title",
1543
- description: "app.api.system.builder.post.errors.unsavedChanges.description",
1544
- },
1545
- },
1546
-
1547
- // === SUCCESS HANDLING ===
1548
- successTypes: {
1549
- title: "app.api.system.builder.post.success.title",
1550
- description: "app.api.system.builder.post.success.description",
1551
- },
1552
-
1553
- // === EXAMPLES ===
1554
- examples: {
1555
- requests: {
1556
- defaultConfig: {},
1557
- productionBuild: {
1558
- configObject: {
1559
- profile: BuildProfileEnum.PRODUCTION,
1560
- analyze: true,
1561
- filesToCompile: [],
1562
- filesOrFoldersToCopy: [],
1563
- },
1564
- },
1565
- dryRun: {
1566
- configObject: {
1567
- dryRun: true,
1568
- verbose: true,
1569
- filesToCompile: [],
1570
- filesOrFoldersToCopy: [],
1571
- },
1572
- },
1573
- },
1574
- responses: {
1575
- defaultConfig: {
1576
- success: true,
1577
- output: "Build completed successfully",
1578
- duration: 1500,
1579
- filesBuilt: ["dist/bin/vibe-runtime.js"],
1580
- filesCopied: ["dist/README.md", "dist/LICENSE"],
1581
- profileUsed: BuildProfileEnum.DEVELOPMENT,
1582
- stepTimings: [],
1583
- },
1584
- productionBuild: {
1585
- success: true,
1586
- output: "Build completed successfully",
1587
- duration: 2500,
1588
- filesBuilt: ["dist/bin/vibe-runtime.js"],
1589
- filesCopied: [],
1590
- profileUsed: BuildProfileEnum.PRODUCTION,
1591
- stepTimings: [],
1592
- },
1593
- dryRun: {
1594
- success: true,
1595
- output: "[DRY RUN] Build preview completed",
1596
- duration: 50,
1597
- filesBuilt: ["dist/bin/vibe-runtime.js"],
1598
- filesCopied: [],
1599
- profileUsed: BuildProfileEnum.DEVELOPMENT,
1600
- stepTimings: [],
1601
- },
1602
- },
1603
- },
1604
- });
1605
-
1606
- // Export the definition
1607
- const builderDefinition = { POST };
1608
- export default builderDefinition;
1609
-
1610
- // ============================================================================
1611
- // Type Exports - Derived from Enums
1612
- // ============================================================================
1613
-
1614
- /** Build profile type (derived from enum) */
1615
- export type BuildProfile = `${BuildProfileEnum}`;
1616
-
1617
- /** Vite build types (derived from enum) */
1618
- export type ViteBuildType = `${ViteBuildTypeEnum}`;
1619
-
1620
- /** Bun build types (derived from enum) */
1621
- export type BunBuildType = `${BunBuildTypeEnum}`;
1622
-
1623
- /** All build types */
1624
- export type BuildType = ViteBuildType | BunBuildType;
1625
-
1626
- /** Bun target runtime (derived from enum) */
1627
- export type BunTarget = `${BunTargetEnum}`;
1628
-
1629
- /** Sourcemap mode (derived from enum) */
1630
- export type SourcemapMode = `${SourcemapModeEnum}`;
1631
-
1632
- /** Output format (derived from enum) */
1633
- export type OutputFormat = `${OutputFormatEnum}`;
1634
-
1635
- /** Step status (derived from enum) */
1636
- export type StepStatus = `${StepStatusEnum}`;
1637
-
1638
- // ============================================================================
1639
- // Type Guards
1640
- // ============================================================================
1641
-
1642
- /** Type guard for Vite builds */
1643
- export function isViteBuildType(type: BuildType): type is ViteBuildType {
1644
- return Object.values(ViteBuildTypeEnum).includes(type as ViteBuildTypeEnum);
1645
- }
1646
-
1647
- /** Type guard for Bun builds */
1648
- export function isBunBuildType(type: BuildType): type is BunBuildType {
1649
- return Object.values(BunBuildTypeEnum).includes(type as BunBuildTypeEnum);
1650
- }
1651
-
1652
- // ============================================================================
1653
- // Inferred Types from Definition Fields
1654
- // ============================================================================
1655
-
1656
- /** Request type inferred from POST definition */
1657
- export type BuilderRequest = typeof POST.types.RequestOutput;
1658
-
1659
- /** Response type inferred from POST definition */
1660
- export type BuilderResponse = typeof POST.types.ResponseOutput;
1661
-
1662
- /** API config object type inferred from POST definition fields */
1663
- export type ApiConfigObject = NonNullable<BuilderRequest["configObject"]>;
1664
-
1665
- /** File to compile type inferred from API definition */
1666
- export type FileToCompile = NonNullable<ApiConfigObject["filesToCompile"]>[number];
1667
-
1668
- /** Copy config type inferred from API definition */
1669
- export type CopyConfig = NonNullable<ApiConfigObject["filesOrFoldersToCopy"]>[number];
1670
-
1671
- /** NPM package config type inferred from API definition */
1672
- export type NpmPackageConfig = NonNullable<ApiConfigObject["npmPackage"]>;
1673
-
1674
- /** Bun build options type inferred from API definition */
1675
- export type BunBuildOptions = NonNullable<FileToCompile["bunOptions"]>;
1676
-
1677
- /** Vite options type inferred from API definition */
1678
- export type ViteOptions = NonNullable<FileToCompile["viteOptions"]>;
1679
-
1680
- /** Package config type inferred from API definition */
1681
- export type PackageConfig = NonNullable<FileToCompile["packageConfig"]>;
1682
-
1683
- /** Step timing type inferred from response */
1684
- export type StepTiming = NonNullable<BuilderResponse["stepTimings"]>[number];
1685
-
1686
- /** Build step result - internal type for tracking build steps */
1687
- export interface BuildStepResult {
1688
- step: string;
1689
- success: boolean;
1690
- duration: number;
1691
- filesAffected?: string[];
1692
- size?: number;
1693
- warnings?: string[];
1694
- }
1695
-
1696
- /** Bundle analysis result */
1697
- export interface BundleAnalysis {
1698
- totalSize: number;
1699
- files: Array<{ name: string; size: number; percentage: number }>;
1700
- suggestions: string[];
1701
- warnings: string[];
1702
- }
1703
-
1704
- /** Full build report */
1705
- export interface BuildReport {
1706
- timestamp: string;
1707
- duration: number;
1708
- profile: BuildProfile;
1709
- success: boolean;
1710
- steps: BuildStepResult[];
1711
- files: { built: string[]; copied: string[] };
1712
- bundleAnalysis?: BundleAnalysis;
1713
- environment: { nodeVersion: string; platform: string; cwd: string };
1714
- }
1715
-
1716
- /** Build hook context */
1717
- export interface BuildHookContext {
1718
- config: BuildConfig;
1719
- profile: BuildProfile;
1720
- outputDir: string;
1721
- /** Logger instance (EndpointLogger) */
1722
- logger: {
1723
- info: (message: string) => void;
1724
- warn: (message: string) => void;
1725
- error: (message: string) => void;
1726
- debug: (message: string) => void;
1727
- };
1728
- addOutput: (message: string) => void;
1729
- }
1730
-
1731
- /** Build hook function */
1732
- export type BuildHook = (context: BuildHookContext) => Promise<void> | void;
1733
-
1734
- /** Full BuildConfig type - API config + runtime-only fields (hooks, env, profiles) */
1735
- export interface BuildConfig extends Omit<
1736
- ApiConfigObject,
1737
- "filesToCompile" | "filesOrFoldersToCopy" | "npmPackage"
1738
- > {
1739
- foldersToClean?: string[];
1740
- filesToCompile?: FileToCompile[];
1741
- filesOrFoldersToCopy?: CopyConfig[];
1742
- npmPackage?: NpmPackageConfig | null;
1743
- hooks?: {
1744
- preBuild?: BuildHook;
1745
- postBuild?: BuildHook;
1746
- onFileCompiled?: (filePath: string, size: number) => void;
1747
- };
1748
- env?: Record<string, string>;
1749
- profiles?: Partial<Record<BuildProfile, Partial<BuildConfig>>>;
1750
- }