@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,863 +0,0 @@
1
- /**
2
- * Run TypeScript type checking Repository
3
- * Handles run typescript type checking operations
4
- *
5
- * This repository supports both tsc and tsgo type checkers.
6
- * The choice is controlled by the `useTsgo` config option.
7
- */
8
-
9
- import { exec } from "node:child_process";
10
- import { readFileSync, writeFileSync } from "node:fs";
11
- import { promisify } from "node:util";
12
-
13
- import { z } from "zod";
14
-
15
- import type { EndpointLogger } from "@/app/api/[locale]/system/unified-interface/shared/logger/endpoint";
16
-
17
- import type { ResponseType as ApiResponseType } from "../../../shared/types/response.schema";
18
- import { ErrorResponseTypes, fail, success } from "../../../shared/types/response.schema";
19
- import { parseError } from "../../../shared/utils/parse-error";
20
- import { parseJsonWithComments } from "../../../shared/utils/parse-json";
21
- import { ensureConfigReady } from "../config/repository";
22
- import type { CheckConfig } from "../config/types";
23
- import type { TypecheckIssue, TypecheckRequestOutput, TypecheckResponseOutput } from "./definition";
24
- import {
25
- createTypecheckConfig,
26
- getDisplayPath,
27
- PathType,
28
- shouldIncludeFile,
29
- type TypecheckConfig,
30
- } from "./utils";
31
-
32
- // ============================================================
33
- // Constants
34
- // ============================================================
35
-
36
- /** Wildcard include patterns to remove (we specify explicit files instead) */
37
- const WILDCARD_INCLUDE_PATTERNS: readonly string[] = ["**/*.ts", "**/*.tsx"];
38
-
39
- // ============================================================
40
- // TypeScript Configuration Schema
41
- // ============================================================
42
-
43
- // TypeScript configuration Zod schema for runtime validation
44
- const TsConfigSchema = z.object({
45
- compilerOptions: z
46
- .object({
47
- rootDir: z.string().optional(),
48
- paths: z.record(z.string(), z.array(z.string())).optional(),
49
- baseUrl: z.string().optional(),
50
- typeRoots: z.array(z.string()).optional(),
51
- })
52
- .passthrough()
53
- .optional(),
54
- include: z.array(z.string()).optional(),
55
- exclude: z.array(z.string()).optional(),
56
- });
57
-
58
- // TypeScript configuration type inferred from Zod schema
59
- type TsConfig = z.infer<typeof TsConfigSchema>;
60
-
61
- // ============================================================
62
- // Internal Types
63
- // ============================================================
64
-
65
- /** Parsed issue from typecheck output */
66
- interface ParsedIssue {
67
- file: string;
68
- line?: number;
69
- column?: number;
70
- code?: string;
71
- severity: "error" | "warning" | "info";
72
- message: string;
73
- }
74
-
75
- // ============================================================
76
- // Repository Interface
77
- // ============================================================
78
-
79
- const execAsync = promisify(exec);
80
-
81
- /**
82
- * Run TypeScript type checking Repository Interface
83
- */
84
- export interface TypecheckRepositoryInterface {
85
- execute(
86
- data: TypecheckRequestOutput,
87
- logger: EndpointLogger,
88
- providedConfig?: CheckConfig,
89
- ): Promise<ApiResponseType<TypecheckResponseOutput>>;
90
- }
91
-
92
- // ============================================================
93
- // Repository Implementation
94
- // ============================================================
95
-
96
- /**
97
- * Run TypeScript type checking Repository Implementation
98
- */
99
- export class TypecheckRepositoryImpl implements TypecheckRepositoryInterface {
100
- // --------------------------------------------------------
101
- // Static Private Helpers - Command Configuration
102
- // --------------------------------------------------------
103
-
104
- /**
105
- * Get the base command for type checking.
106
- * @param useTsgo - Whether to use tsgo instead of tsc
107
- * @returns The base command string
108
- */
109
- private static getBaseCommand(useTsgo: boolean): string {
110
- if (useTsgo) {
111
- return "bunx tsgo";
112
- }
113
- // tsc needs increased memory for large projects
114
-
115
- return 'NODE_OPTIONS="--max-old-space-size=32768" bunx tsc';
116
- }
117
-
118
- /**
119
- * Build the full typecheck command with all flags.
120
- */
121
- private static buildTypecheckCommand(
122
- baseCommand: string,
123
- buildInfoFile: string,
124
- projectConfig: string,
125
- ): string {
126
- return `${baseCommand} --noEmit --incremental --tsBuildInfoFile ${buildInfoFile} --skipLibCheck --project ${projectConfig}`;
127
- }
128
-
129
- // --------------------------------------------------------
130
- // Static Private Helpers - Error Patterns
131
- // --------------------------------------------------------
132
-
133
- /**
134
- * Get the error pattern regex for tsc output.
135
- * Format: file.ts(line,column): error TS1234: message
136
- */
137
- private static getTscErrorPattern(): RegExp {
138
- return /^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+(TS\d+):\s*(.+)$/;
139
- }
140
-
141
- /**
142
- * Get the error pattern regex for tsgo output.
143
- * Format: file.ts:line:column - error TS1234: message
144
- */
145
- private static getTsgoErrorPattern(): RegExp {
146
- return /^(.+?):(\d+):(\d+)\s+-\s+(error|warning)\s+(TS\d+):\s*(.+)$/;
147
- }
148
-
149
- // --------------------------------------------------------
150
- // Static Private Helpers - Output Parsing
151
- // --------------------------------------------------------
152
-
153
- /**
154
- * Strip ANSI color codes from output.
155
- * tsgo adds color codes to its output which need to be removed for parsing.
156
- */
157
- private static stripAnsiCodes(text: string): string {
158
- const ESC = String.fromCodePoint(0x1b);
159
- const ansiPattern = new RegExp(`${ESC}\\[[0-9;]*m`, "g");
160
- return text.replaceAll(ansiPattern, "");
161
- }
162
-
163
- /**
164
- * Parse a single output line for TypeScript errors/warnings.
165
- * Tries both tsc and tsgo patterns.
166
- */
167
- private static parseOutputLine(line: string, useTsgo: boolean): ParsedIssue | null {
168
- // Try patterns in order based on which tool is being used
169
- const primaryPattern = useTsgo
170
- ? TypecheckRepositoryImpl.getTsgoErrorPattern()
171
- : TypecheckRepositoryImpl.getTscErrorPattern();
172
- const fallbackPattern = useTsgo
173
- ? TypecheckRepositoryImpl.getTscErrorPattern()
174
- : TypecheckRepositoryImpl.getTsgoErrorPattern();
175
-
176
- let match = line.match(primaryPattern);
177
- if (!match) {
178
- match = line.match(fallbackPattern);
179
- }
180
-
181
- if (!match) {
182
- return null;
183
- }
184
-
185
- const [, file, lineNum, colNum, severity, code, message] = match;
186
-
187
- return {
188
- file: file.trim(),
189
- line: parseInt(lineNum, 10),
190
- column: parseInt(colNum, 10),
191
- code: code.trim(),
192
- severity: severity === "error" ? "error" : "warning",
193
- message: message.trim(),
194
- };
195
- }
196
-
197
- /**
198
- * Parse typecheck output into structured issues.
199
- */
200
- private static parseTypecheckOutput(
201
- output: string,
202
- useTsgo: boolean,
203
- targetPath: string | undefined,
204
- disableFilter: boolean,
205
- ): { errors: ParsedIssue[]; warnings: ParsedIssue[] } {
206
- const errors: ParsedIssue[] = [];
207
- const warnings: ParsedIssue[] = [];
208
-
209
- const cleanOutput = TypecheckRepositoryImpl.stripAnsiCodes(output);
210
- const lines = cleanOutput.split("\n");
211
-
212
- for (const line of lines) {
213
- const issue = TypecheckRepositoryImpl.parseOutputLine(line, useTsgo);
214
-
215
- if (issue) {
216
- // Apply filtering based on target path and disableFilter setting
217
- if (!shouldIncludeFile(issue.file, targetPath, disableFilter)) {
218
- continue;
219
- }
220
-
221
- // Convert file path to display format
222
- issue.file = getDisplayPath(issue.file);
223
-
224
- if (issue.severity === "error") {
225
- errors.push(issue);
226
- } else {
227
- warnings.push(issue);
228
- }
229
- } else if (line.includes("error TS") && line.trim()) {
230
- // Fallback for simpler error formats - only when filtering is disabled
231
- if (targetPath && !disableFilter) {
232
- continue;
233
- }
234
- errors.push({
235
- file: "unknown",
236
- severity: "error",
237
- message: line.trim(),
238
- });
239
- } else if (
240
- line.includes("warning") &&
241
- [".ts", ".tsx"].some((ext) => line.includes(ext)) &&
242
- line.trim()
243
- ) {
244
- // Fallback warning format - only when filtering is disabled
245
- if (targetPath && !disableFilter) {
246
- continue;
247
- }
248
- warnings.push({
249
- file: "unknown",
250
- severity: "warning",
251
- message: line.trim(),
252
- });
253
- }
254
- }
255
-
256
- return { errors, warnings };
257
- }
258
-
259
- // --------------------------------------------------------
260
- // Static Private Helpers - Temp TSConfig Management
261
- // --------------------------------------------------------
262
-
263
- /**
264
- * Adjust a single path to be relative to temp config location.
265
- * @param path - The path to adjust
266
- * @param prefix - The relative prefix (e.g., "../../")
267
- */
268
- private static adjustPath(path: string, prefix: string): string {
269
- if (path.startsWith("/")) {
270
- return path; // Absolute paths don't need adjustment
271
- }
272
- if (path.startsWith("./")) {
273
- return `${prefix}${path.slice(2)}`;
274
- }
275
- if (path.startsWith("../")) {
276
- return path; // Already relative, don't double-adjust
277
- }
278
- return `${prefix}${path}`;
279
- }
280
-
281
- /**
282
- * Adjust file paths to be relative to temp config location.
283
- */
284
- private static adjustFilePaths(files: string[], prefix: string): string[] {
285
- return files.map((file) => TypecheckRepositoryImpl.adjustPath(file, prefix));
286
- }
287
-
288
- /**
289
- * Adjust path mappings to account for temp config location.
290
- */
291
- private static adjustPathMappings(
292
- paths: Record<string, string[]> | undefined,
293
- prefix: string,
294
- ): Record<string, string[]> {
295
- const adjustedPaths: Record<string, string[]> = {};
296
- if (!paths) {
297
- return adjustedPaths;
298
- }
299
-
300
- for (const [key, pathArray] of Object.entries(paths)) {
301
- adjustedPaths[key] = pathArray.map((path) =>
302
- TypecheckRepositoryImpl.adjustPath(path, prefix),
303
- );
304
- }
305
-
306
- return adjustedPaths;
307
- }
308
-
309
- /**
310
- * Adjust typeRoots to account for temp config location.
311
- */
312
- private static adjustTypeRoots(
313
- typeRoots: string[] | undefined,
314
- prefix: string,
315
- ): string[] | undefined {
316
- if (!typeRoots) {
317
- return undefined;
318
- }
319
-
320
- return typeRoots.map((root) => TypecheckRepositoryImpl.adjustPath(root, prefix));
321
- }
322
-
323
- /**
324
- * Adjust general include patterns to account for temp config location.
325
- */
326
- private static adjustIncludePatterns(patterns: string[], prefix: string): string[] {
327
- return patterns.map((pattern) => TypecheckRepositoryImpl.adjustPath(pattern, prefix));
328
- }
329
-
330
- /**
331
- * Calculate the relative path prefix needed to reach project root from the cache directory.
332
- * e.g., ".tmp/typecheck-cache" -> "../../"
333
- */
334
- private static getRelativePrefix(cachePath: string): string {
335
- // Count directory depth by splitting on path separator
336
- const depth = cachePath.split("/").filter((p) => p && p !== ".").length;
337
-
338
- return "../".repeat(depth);
339
- }
340
-
341
- /**
342
- * Adjust exclude patterns to account for temp config location.
343
- */
344
- private static adjustExcludePatterns(excludes: string[] | undefined, prefix: string): string[] {
345
- if (!excludes) {
346
- return [];
347
- }
348
-
349
- return excludes.map((excludePattern) =>
350
- TypecheckRepositoryImpl.adjustPath(excludePattern, prefix),
351
- );
352
- }
353
-
354
- /**
355
- * Create a temporary tsconfig.json for specific files.
356
- * Preserves compiler options and path mappings from main tsconfig
357
- * but limits files to improve performance.
358
- */
359
- private static createTempTsConfig(
360
- filesToCheck: string[],
361
- tempConfigPath: string,
362
- cachePath: string,
363
- ): void {
364
- // Calculate the relative prefix based on cache directory depth
365
- const prefix = TypecheckRepositoryImpl.getRelativePrefix(cachePath);
366
-
367
- // Read and validate the main tsconfig.json
368
- let mainTsConfig: TsConfig;
369
- try {
370
- const tsConfigContent = readFileSync("tsconfig.json", "utf8");
371
- const parsedJsonResult = parseJsonWithComments(tsConfigContent);
372
- if (!parsedJsonResult.success) {
373
- // eslint-disable-next-line oxlint-plugin-restricted/restricted-syntax, i18next/no-literal-string -- Build infrastructure needs to throw for configuration errors
374
- throw new Error("Failed to parse tsconfig.json");
375
- }
376
- mainTsConfig = TsConfigSchema.parse(parsedJsonResult.data);
377
- } catch (error) {
378
- /* eslint-disable oxlint-plugin-restricted/restricted-syntax, i18next/no-literal-string -- Build infrastructure needs to throw for configuration errors */
379
- throw new Error(
380
- `Failed to read or parse tsconfig.json: ${error instanceof Error ? error.message : String(error)}`,
381
- { cause: error },
382
- );
383
- /* eslint-enable oxlint-plugin-restricted/restricted-syntax, i18next/no-literal-string */
384
- }
385
-
386
- // Filter out wildcard patterns and adjust paths for temp config location
387
- const generalFilesToInclude = (mainTsConfig.include || []).filter((includePattern) =>
388
- WILDCARD_INCLUDE_PATTERNS.includes(includePattern) ? undefined : includePattern,
389
- );
390
- const adjustedGeneralIncludes = TypecheckRepositoryImpl.adjustIncludePatterns(
391
- generalFilesToInclude,
392
- prefix,
393
- );
394
-
395
- // Adjust paths for temp config location
396
- const adjustedFiles = TypecheckRepositoryImpl.adjustFilePaths(filesToCheck, prefix);
397
- const adjustedPaths = TypecheckRepositoryImpl.adjustPathMappings(
398
- mainTsConfig.compilerOptions?.paths,
399
- prefix,
400
- );
401
- const adjustedExcludes = TypecheckRepositoryImpl.adjustExcludePatterns(
402
- mainTsConfig.exclude,
403
- prefix,
404
- );
405
- const adjustedTypeRoots = TypecheckRepositoryImpl.adjustTypeRoots(
406
- mainTsConfig.compilerOptions?.typeRoots,
407
- prefix,
408
- );
409
-
410
- // Create temporary tsconfig
411
- const tempTsConfig: TsConfig = {
412
- ...mainTsConfig,
413
- compilerOptions: {
414
- ...mainTsConfig.compilerOptions,
415
- rootDir: prefix.slice(0, -1), // Remove trailing slash for rootDir (e.g., "../..")
416
- baseUrl: undefined, // Remove baseUrl as tsgo doesn't support it
417
- typeRoots: adjustedTypeRoots,
418
- paths: {
419
- ...adjustedPaths,
420
-
421
- "*": [`${prefix}*`], // Replace baseUrl functionality for tsgo compatibility (resolve from project root)
422
- },
423
- },
424
- include: [...adjustedGeneralIncludes, ...adjustedFiles],
425
- exclude: adjustedExcludes,
426
- };
427
-
428
- writeFileSync(tempConfigPath, JSON.stringify(tempTsConfig, null, 2));
429
- }
430
-
431
- // --------------------------------------------------------
432
- // Public Methods
433
- // --------------------------------------------------------
434
-
435
- /**
436
- * Execute TypeScript type checking.
437
- */
438
- async execute(
439
- data: TypecheckRequestOutput,
440
- logger: EndpointLogger,
441
- providedConfig?: CheckConfig,
442
- ): Promise<ApiResponseType<TypecheckResponseOutput>> {
443
- const startTime = Date.now();
444
- let output = "";
445
- let config: TypecheckConfig | undefined;
446
-
447
- try {
448
- // Use provided config or load it
449
- let checkConfig: CheckConfig;
450
- if (providedConfig) {
451
- checkConfig = providedConfig;
452
- } else {
453
- const configResult = await ensureConfigReady(logger, false);
454
-
455
- if (!configResult.ready) {
456
- return success({
457
- issues: {
458
- items: [
459
- {
460
- file: configResult.configPath,
461
- severity: "error" as const,
462
- message: configResult.message,
463
- type: "type" as const,
464
- },
465
- ],
466
- files: [
467
- {
468
- file: configResult.configPath,
469
- errors: 1,
470
- warnings: 0,
471
- total: 1,
472
- },
473
- ],
474
- summary: {
475
- totalIssues: 1,
476
- totalFiles: 1,
477
- totalErrors: 1,
478
- displayedIssues: 1,
479
- displayedFiles: 1,
480
- currentPage: 1,
481
- totalPages: 1,
482
- },
483
- },
484
- });
485
- }
486
- checkConfig = configResult.config;
487
- }
488
-
489
- // Check if typecheck is enabled
490
- if (!checkConfig.typecheck.enabled) {
491
- logger.info("Typecheck is disabled in check.config.ts");
492
- return success({
493
- issues: {
494
- items: [],
495
- files: [],
496
- summary: {
497
- totalIssues: 0,
498
- totalFiles: 0,
499
- totalErrors: 0,
500
- displayedIssues: 0,
501
- displayedFiles: 0,
502
- currentPage: 1,
503
- totalPages: 1,
504
- },
505
- },
506
- });
507
- }
508
-
509
- const typecheckConfig = checkConfig.typecheck;
510
- const useTsgo = typecheckConfig.useTsgo ?? false;
511
-
512
- // Get the appropriate base command
513
- const baseCommand = TypecheckRepositoryImpl.getBaseCommand(useTsgo);
514
-
515
- logger.debug(`[TYPESCRIPT] Using ${useTsgo ? "tsgo" : "tsc"} for type checking`);
516
-
517
- // Create TypeScript checking configuration
518
- config = createTypecheckConfig(data.path, typecheckConfig.cachePath);
519
-
520
- // Build the command based on path type
521
- const command = this.buildCommand(baseCommand, config, typecheckConfig.cachePath, logger);
522
-
523
- if (!command) {
524
- return fail({
525
- message: "app.api.system.check.typecheck.errors.noTsFiles.title",
526
- errorType: ErrorResponseTypes.NOT_FOUND,
527
- messageParams: {
528
- message: "app.api.system.check.typecheck.errors.noTsFiles.message",
529
- },
530
- });
531
- }
532
-
533
- logger.debug(`[TYPESCRIPT] Executing command: ${command}`);
534
-
535
- // Execute the typecheck command
536
- const execResult = await this.executeCommand(command, data.timeout, logger);
537
-
538
- if (!execResult.success && !execResult.output) {
539
- return fail({
540
- message: "app.api.system.check.typecheck.errors.internal.title",
541
- errorType: ErrorResponseTypes.INTERNAL_ERROR,
542
- messageParams: {
543
- error: execResult.error || "Unknown error",
544
- },
545
- });
546
- }
547
-
548
- output = execResult.output;
549
-
550
- // Parse the output into structured issues
551
- const { errors, warnings } = TypecheckRepositoryImpl.parseTypecheckOutput(
552
- output,
553
- useTsgo,
554
- config.targetPath,
555
- data.disableFilter,
556
- );
557
-
558
- // Build response with optional sorting
559
- const allIssues = [
560
- ...errors.map((e) => ({ ...e, type: "type" as const })),
561
- ...warnings.map((w) => ({ ...w, type: "type" as const })),
562
- ];
563
-
564
- // Skip sorting if requested (when vibe-check already sorted)
565
- const issues = data.skipSorting
566
- ? allIssues
567
- : allIssues.toSorted((a, b) => {
568
- const fileCompare = a.file.localeCompare(b.file);
569
- if (fileCompare !== 0) {
570
- return fileCompare;
571
- }
572
- const lineA = a.line || 0;
573
- const lineB = b.line || 0;
574
- return lineA - lineB;
575
- });
576
-
577
- return success(this.buildResponse(issues, data));
578
- } catch (error) {
579
- return this.handleError(error as Error, output, config, data, startTime, logger);
580
- }
581
- }
582
-
583
- // --------------------------------------------------------
584
- // Private Methods
585
- // --------------------------------------------------------
586
-
587
- /**
588
- * Build file statistics from issues
589
- */
590
- private static buildFileStats(
591
- issues: TypecheckIssue[],
592
- ): Map<string, { errors: number; warnings: number; total: number }> {
593
- const fileStats = new Map<string, { errors: number; warnings: number; total: number }>();
594
-
595
- for (const issue of issues) {
596
- const stats = fileStats.get(issue.file) || {
597
- errors: 0,
598
- warnings: 0,
599
- total: 0,
600
- };
601
- stats.total++;
602
- if (issue.severity === "error") {
603
- stats.errors++;
604
- }
605
- if (issue.severity === "warning") {
606
- stats.warnings++;
607
- }
608
- fileStats.set(issue.file, stats);
609
- }
610
-
611
- return fileStats;
612
- }
613
-
614
- /**
615
- * Format file statistics for response
616
- */
617
- private static formatFileStats(
618
- fileStats: Map<string, { errors: number; warnings: number; total: number }>,
619
- ): Array<{ file: string; errors: number; warnings: number; total: number }> {
620
- return [...fileStats.entries()]
621
- .map(([file, stats]) => ({
622
- file,
623
- errors: stats.errors,
624
- warnings: stats.warnings,
625
- total: stats.total,
626
- }))
627
- .toSorted((a, b) => a.file.localeCompare(b.file));
628
- }
629
-
630
- /**
631
- * Build response with pagination and statistics
632
- */
633
- private buildResponse(
634
- allIssues: TypecheckIssue[],
635
- data: TypecheckRequestOutput,
636
- ): TypecheckResponseOutput {
637
- const totalIssues = allIssues.length;
638
- const totalFiles = new Set(allIssues.map((issue) => issue.file)).size;
639
- const totalErrors = allIssues.filter((issue) => issue.severity === "error").length;
640
-
641
- const fileStats = TypecheckRepositoryImpl.buildFileStats(allIssues);
642
- const allFiles = TypecheckRepositoryImpl.formatFileStats(fileStats);
643
-
644
- const limit = data.limit;
645
- const currentPage = data.page;
646
- const totalPages = Math.ceil(totalIssues / limit);
647
- const startIndex = (currentPage - 1) * limit;
648
- const endIndex = startIndex + limit;
649
- const limitedIssues = allIssues.slice(startIndex, endIndex);
650
-
651
- const displayedIssues = limitedIssues.length;
652
- const displayedFiles = new Set(limitedIssues.map((issue) => issue.file)).size;
653
-
654
- return {
655
- issues: {
656
- items: limitedIssues,
657
- files: allFiles,
658
- summary: {
659
- totalIssues,
660
- totalFiles,
661
- totalErrors,
662
- displayedIssues,
663
- displayedFiles,
664
- truncatedMessage:
665
- displayedIssues < totalIssues || displayedFiles < totalFiles
666
- ? `Showing ${displayedIssues} of ${totalIssues} issues from ${displayedFiles} of ${totalFiles} files`
667
- : "",
668
- currentPage,
669
- totalPages,
670
- },
671
- },
672
- };
673
- }
674
-
675
- /**
676
- * Build the typecheck command based on path type.
677
- */
678
- private buildCommand(
679
- baseCommand: string,
680
- config: TypecheckConfig,
681
- cachePath: string,
682
- logger: EndpointLogger,
683
- ): string | null {
684
- if (config.pathType === PathType.NO_PATH) {
685
- // No specific path provided, check entire project
686
-
687
- logger.debug("[TYPESCRIPT] Running check on entire project");
688
- return TypecheckRepositoryImpl.buildTypecheckCommand(
689
- baseCommand,
690
- config.buildInfoFile,
691
- "tsconfig.json",
692
- );
693
- }
694
-
695
- if (!config.tempConfigFile) {
696
- return null;
697
- }
698
-
699
- if (config.pathType === PathType.SINGLE_FILE) {
700
- // Single file - create temporary tsconfig for this file
701
- TypecheckRepositoryImpl.createTempTsConfig(
702
- [config.targetPath!],
703
- config.tempConfigFile,
704
- cachePath,
705
- );
706
- } else {
707
- // Folder - create temporary tsconfig with folder glob pattern
708
- const folderPath = config.targetPath || ".";
709
-
710
- TypecheckRepositoryImpl.createTempTsConfig(
711
- [`${folderPath}/**/*`],
712
- config.tempConfigFile,
713
- cachePath,
714
- );
715
- }
716
-
717
- return TypecheckRepositoryImpl.buildTypecheckCommand(
718
- baseCommand,
719
- config.buildInfoFile,
720
- config.tempConfigFile,
721
- );
722
- }
723
-
724
- /**
725
- * Execute the typecheck command.
726
- */
727
- private async executeCommand(
728
- command: string,
729
- timeout: number | undefined,
730
- logger: EndpointLogger,
731
- ): Promise<{ success: boolean; output: string; error?: string }> {
732
- try {
733
- const result = await execAsync(command, {
734
- cwd: process.cwd(),
735
- timeout: (timeout ?? 900) * 1000,
736
- maxBuffer: 1024 * 1024 * 10, // 10MB buffer
737
- });
738
-
739
- logger.debug("[TYPESCRIPT] Command executed successfully");
740
- return {
741
- success: true,
742
- output: [result.stdout, result.stderr].filter(Boolean).join("\n"),
743
- };
744
- } catch (execError) {
745
- // TSC exit codes 1 and 2 mean TypeScript errors were found
746
- const hasTypeErrors =
747
- execError &&
748
- typeof execError === "object" &&
749
- "code" in execError &&
750
- (execError.code === 1 || execError.code === 2);
751
-
752
- if (hasTypeErrors && "stdout" in execError && "stderr" in execError) {
753
- const stdout = typeof execError.stdout === "string" ? execError.stdout : "";
754
- const stderr = typeof execError.stderr === "string" ? execError.stderr : "";
755
- return {
756
- success: false,
757
- output: [stdout, stderr].filter(Boolean).join("\n"),
758
- };
759
- }
760
-
761
- // Other errors are unexpected
762
- const parsedError = parseError(execError);
763
-
764
- logger.error(`[TYPESCRIPT] Unexpected error executing command: ${parsedError.message}`);
765
- return {
766
- success: false,
767
- output: "",
768
- error: parsedError.message,
769
- };
770
- }
771
- }
772
-
773
- /**
774
- * Handle errors during execution.
775
- */
776
- private handleError(
777
- error: Error,
778
- output: string,
779
- config: TypecheckConfig | undefined,
780
- data: TypecheckRequestOutput,
781
- startTime: number,
782
- logger: EndpointLogger,
783
- ): ApiResponseType<TypecheckResponseOutput> {
784
- const duration = Date.now() - startTime;
785
- const parsedError = parseError(error);
786
- const targetPath = config?.targetPath ?? data.path;
787
-
788
- logger.warn(`[TYPESCRIPT] Execution error: ${parsedError.message} (duration: ${duration}ms)`);
789
-
790
- // Try to extract issues from error output
791
- const hasStderr = error && typeof error === "object" && "stderr" in error;
792
- const hasStdout = error && typeof error === "object" && "stdout" in error;
793
- const hasCode = error && typeof error === "object" && "code" in error;
794
-
795
- const issues: Array<{
796
- file: string;
797
- line?: number;
798
- column?: number;
799
- code?: string;
800
- severity: "error" | "warning" | "info";
801
- message: string;
802
- type: "type";
803
- }> = [];
804
-
805
- if (hasStderr && typeof error.stderr === "string") {
806
- output += error.stderr;
807
- issues.push({
808
- file: "unknown",
809
- severity: "error",
810
- message: error.stderr.trim(),
811
- type: "type",
812
- });
813
- }
814
-
815
- if (hasStdout && typeof error.stdout === "string") {
816
- output += error.stdout;
817
-
818
- // Parse TypeScript errors from stdout
819
- const { errors } = TypecheckRepositoryImpl.parseTypecheckOutput(
820
- error.stdout,
821
- false, // Try both patterns
822
- targetPath,
823
- data.disableFilter,
824
- );
825
-
826
- for (const err of errors) {
827
- issues.push({ ...err, type: "type" });
828
- }
829
- }
830
-
831
- // If no specific errors found, add the general error message
832
- if (issues.length === 0) {
833
- issues.push({
834
- file: "unknown",
835
- severity: "error",
836
- message: parsedError.message,
837
- type: "type",
838
- });
839
- }
840
-
841
- // For TypeScript errors (exit code 2) or when we have parsed errors,
842
- // return success with error details for UI display
843
- const errorCode = hasCode && typeof error.code === "number" ? error.code : 0;
844
- if (errorCode === 2 || issues.length > 0) {
845
- return success(this.buildResponse(issues, data));
846
- }
847
-
848
- return fail({
849
- message: "app.api.system.check.typecheck.errors.internal.title",
850
- errorType: ErrorResponseTypes.INTERNAL_ERROR,
851
- messageParams: {
852
- error: parsedError.message,
853
- output: output.trim(),
854
- duration: duration.toString(),
855
- },
856
- });
857
- }
858
- }
859
-
860
- // ============================================================
861
- // Default Repository Instance
862
- // ============================================================
863
- export const typecheckRepository = new TypecheckRepositoryImpl();