@next-vibe/checker 1.0.11 → 1.0.12
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.
- package/.dist/bin/vibe-runtime.js +10 -19
- package/.dist/bin/vibe-runtime.js.map +3 -3
- package/check.config.ts +4 -4
- package/package.json +2 -9
- package/src/app/api/[locale]/LICENSE +674 -0
- package/src/app/api/[locale]/i18n/de/index.ts +13 -0
- package/src/app/api/[locale]/i18n/en/index.ts +12 -0
- package/src/app/api/[locale]/i18n/pl/index.ts +11 -0
- package/src/app/api/[locale]/shared/i18n/de/index.ts +85 -0
- package/src/app/api/[locale]/shared/i18n/en/index.ts +83 -0
- package/src/app/api/[locale]/shared/i18n/pl/index.ts +85 -0
- package/src/app/api/[locale]/shared/stats-filtering.ts +202 -0
- package/src/app/api/[locale]/shared/types/common.schema.ts +55 -0
- package/src/app/api/[locale]/shared/types/response.schema.ts +372 -0
- package/src/app/api/[locale]/shared/types/stats-filtering.schema.ts +375 -0
- package/src/app/api/[locale]/shared/types/utils.ts +190 -0
- package/src/app/api/[locale]/shared/utils/base64.ts +49 -0
- package/src/app/api/[locale]/shared/utils/env-util.ts +40 -0
- package/src/app/api/[locale]/shared/utils/i18n/de/index.ts +21 -0
- package/src/app/api/[locale]/shared/utils/i18n/en/index.ts +19 -0
- package/src/app/api/[locale]/shared/utils/i18n/pl/index.ts +21 -0
- package/src/app/api/[locale]/shared/utils/index.ts +11 -0
- package/src/app/api/[locale]/shared/utils/object-path.ts +41 -0
- package/src/app/api/[locale]/shared/utils/object.test.ts +82 -0
- package/src/app/api/[locale]/shared/utils/object.ts +75 -0
- package/src/app/api/[locale]/shared/utils/parse-error.ts +134 -0
- package/src/app/api/[locale]/shared/utils/parse-json.ts +70 -0
- package/src/app/api/[locale]/shared/utils/time.ts +53 -0
- package/src/app/api/[locale]/shared/utils/validation.ts +127 -0
- package/src/app/api/[locale]/shared/utils/zod-required-fields.ts +116 -0
- package/src/app/api/[locale]/system/builder/definition.ts +1942 -0
- package/src/app/api/[locale]/system/builder/enum.ts +77 -0
- package/src/app/api/[locale]/system/builder/i18n/de/index.ts +677 -0
- package/src/app/api/[locale]/system/builder/i18n/en/index.ts +665 -0
- package/src/app/api/[locale]/system/builder/i18n/pl/index.ts +668 -0
- package/src/app/api/[locale]/system/builder/repository/build-executor.test.ts +182 -0
- package/src/app/api/[locale]/system/builder/repository/build-executor.ts +583 -0
- package/src/app/api/[locale]/system/builder/repository/bun-compiler.ts +261 -0
- package/src/app/api/[locale]/system/builder/repository/bundle-analyzer.ts +197 -0
- package/src/app/api/[locale]/system/builder/repository/config-loader.ts +159 -0
- package/src/app/api/[locale]/system/builder/repository/config-validator.ts +97 -0
- package/src/app/api/[locale]/system/builder/repository/constants.ts +125 -0
- package/src/app/api/[locale]/system/builder/repository/error-suggester.ts +75 -0
- package/src/app/api/[locale]/system/builder/repository/file-copier.ts +98 -0
- package/src/app/api/[locale]/system/builder/repository/folder-cleaner.ts +80 -0
- package/src/app/api/[locale]/system/builder/repository/index.ts +2 -0
- package/src/app/api/[locale]/system/builder/repository/npm-package-generator.ts +146 -0
- package/src/app/api/[locale]/system/builder/repository/output-formatter.ts +104 -0
- package/src/app/api/[locale]/system/builder/repository/profile-service.ts +79 -0
- package/src/app/api/[locale]/system/builder/repository/report-generator.ts +125 -0
- package/src/app/api/[locale]/system/builder/repository/vite-compiler.ts +291 -0
- package/src/app/api/[locale]/system/builder/route.ts +21 -0
- package/src/app/api/[locale]/system/builder/test-files/file1.ts +2 -0
- package/src/app/api/[locale]/system/builder/test-files/file2.tsx +10 -0
- package/src/app/api/[locale]/system/builder/test-files/file3.tsx +16 -0
- package/src/app/api/[locale]/system/builder/test-files/folderToCopy/fileInFolder.ts +2 -0
- package/src/app/api/[locale]/system/builder/test-files/test-config.ts +38 -0
- package/src/app/api/[locale]/system/builder/test-files/test-delete-config.ts +8 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/package.json +24 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/src/constants.ts +6 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/src/greet.ts +18 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/src/index.ts +7 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/src/utils/calculate.ts +27 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.json +19 -0
- package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.tsbuildinfo +1 -0
- package/src/app/api/[locale]/system/builder/test-files/test3.css +1 -0
- package/src/app/api/[locale]/system/check/config/repository.ts +819 -0
- package/src/app/api/[locale]/system/check/config/shared.ts +396 -0
- package/src/app/api/[locale]/system/check/config/types.ts +616 -0
- package/src/app/api/[locale]/system/check/config/utils.ts +171 -0
- package/src/app/api/[locale]/system/check/i18n/de/index.ts +15 -0
- package/src/app/api/[locale]/system/check/i18n/en/index.ts +14 -0
- package/src/app/api/[locale]/system/check/i18n/pl/index.ts +15 -0
- package/src/app/api/[locale]/system/check/lint/definition.ts +414 -0
- package/src/app/api/[locale]/system/check/lint/enum.ts +37 -0
- package/src/app/api/[locale]/system/check/lint/i18n/de/index.ts +164 -0
- package/src/app/api/[locale]/system/check/lint/i18n/en/index.ts +162 -0
- package/src/app/api/[locale]/system/check/lint/i18n/pl/index.ts +164 -0
- package/src/app/api/[locale]/system/check/lint/repository.ts +753 -0
- package/src/app/api/[locale]/system/check/lint/route.ts +21 -0
- package/src/app/api/[locale]/system/check/oxlint/README.md +190 -0
- package/src/app/api/[locale]/system/check/oxlint/definition.ts +414 -0
- package/src/app/api/[locale]/system/check/oxlint/enum.ts +37 -0
- package/src/app/api/[locale]/system/check/oxlint/i18n/de/index.ts +171 -0
- package/src/app/api/[locale]/system/check/oxlint/i18n/en/index.ts +168 -0
- package/src/app/api/[locale]/system/check/oxlint/i18n/pl/index.ts +172 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/i18n/src/index.ts +372 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/README.md +246 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/src/index.ts +583 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/src/index.ts +500 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/test.tsx +74 -0
- package/src/app/api/[locale]/system/check/oxlint/plugins/shared/config-loader.ts +305 -0
- package/src/app/api/[locale]/system/check/oxlint/repository.ts +959 -0
- package/src/app/api/[locale]/system/check/oxlint/route.ts +21 -0
- package/src/app/api/[locale]/system/check/oxlint/types.ts +193 -0
- package/src/app/api/[locale]/system/check/test-project/bun.lock +449 -0
- package/src/app/api/[locale]/system/check/test-project/check.config.ts +989 -0
- package/src/app/api/[locale]/system/check/test-project/package.json +20 -0
- package/src/app/api/[locale]/system/check/test-project/src/constants.ts +6 -0
- package/src/app/api/[locale]/system/check/test-project/src/greet.ts +18 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/a11y-issues.tsx +107 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/eslint-issues.tsx +37 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/general-issues.ts +137 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/i18n-issues.tsx +129 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/jsx-capitalization-issues.tsx +131 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/nextjs-issues.tsx +95 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/promise-issues.ts +76 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/react-issues.tsx +95 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/restricted-syntax-issues.tsx +61 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/typescript-issues.ts +80 -0
- package/src/app/api/[locale]/system/check/test-project/src/utils/calculate.ts +27 -0
- package/src/app/api/[locale]/system/check/test-project/tsconfig.json +38 -0
- package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +1 -0
- package/src/app/api/[locale]/system/check/typecheck/definition.ts +369 -0
- package/src/app/api/[locale]/system/check/typecheck/enum.ts +37 -0
- package/src/app/api/[locale]/system/check/typecheck/i18n/de/index.ts +159 -0
- package/src/app/api/[locale]/system/check/typecheck/i18n/en/index.ts +150 -0
- package/src/app/api/[locale]/system/check/typecheck/i18n/pl/index.ts +155 -0
- package/src/app/api/[locale]/system/check/typecheck/repository.ts +919 -0
- package/src/app/api/[locale]/system/check/typecheck/route.ts +22 -0
- package/src/app/api/[locale]/system/check/typecheck/utils.ts +168 -0
- package/src/app/api/[locale]/system/check/vibe-check/definition.ts +568 -0
- package/src/app/api/[locale]/system/check/vibe-check/enum.ts +69 -0
- package/src/app/api/[locale]/system/check/vibe-check/i18n/de/index.ts +192 -0
- package/src/app/api/[locale]/system/check/vibe-check/i18n/en/index.ts +189 -0
- package/src/app/api/[locale]/system/check/vibe-check/i18n/pl/index.ts +192 -0
- package/src/app/api/[locale]/system/check/vibe-check/repository.ts +545 -0
- package/src/app/api/[locale]/system/check/vibe-check/route.test.ts +1142 -0
- package/src/app/api/[locale]/system/check/vibe-check/route.ts +21 -0
- package/src/app/api/[locale]/system/generated/endpoint.ts +313 -0
- package/src/app/api/[locale]/system/generated/endpoints.ts +156 -0
- package/src/app/api/[locale]/system/generated/route-handlers.ts +224 -0
- package/src/app/api/[locale]/system/generators/endpoint/definition.ts +193 -0
- package/src/app/api/[locale]/system/generators/endpoint/i18n/de/index.ts +48 -0
- package/src/app/api/[locale]/system/generators/endpoint/i18n/en/index.ts +48 -0
- package/src/app/api/[locale]/system/generators/endpoint/i18n/pl/index.ts +50 -0
- package/src/app/api/[locale]/system/generators/endpoint/repository.ts +291 -0
- package/src/app/api/[locale]/system/generators/endpoint/route.ts +21 -0
- package/src/app/api/[locale]/system/generators/endpoints/definition.ts +246 -0
- package/src/app/api/[locale]/system/generators/endpoints/i18n/de/index.ts +54 -0
- package/src/app/api/[locale]/system/generators/endpoints/i18n/en/index.ts +52 -0
- package/src/app/api/[locale]/system/generators/endpoints/i18n/pl/index.ts +54 -0
- package/src/app/api/[locale]/system/generators/endpoints/options-repository.ts +463 -0
- package/src/app/api/[locale]/system/generators/endpoints/repository.ts +383 -0
- package/src/app/api/[locale]/system/generators/endpoints/route.ts +18 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/definition.ts +194 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/i18n/de/index.ts +71 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/i18n/en/index.ts +69 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/i18n/pl/index.ts +71 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/repository.ts +294 -0
- package/src/app/api/[locale]/system/generators/endpoints-index/route.ts +18 -0
- package/src/app/api/[locale]/system/generators/generate-all/definition.ts +355 -0
- package/src/app/api/[locale]/system/generators/generate-all/i18n/de/index.ts +96 -0
- package/src/app/api/[locale]/system/generators/generate-all/i18n/en/index.ts +94 -0
- package/src/app/api/[locale]/system/generators/generate-all/i18n/pl/index.ts +96 -0
- package/src/app/api/[locale]/system/generators/generate-all/repository.ts +257 -0
- package/src/app/api/[locale]/system/generators/generate-all/route.ts +20 -0
- package/src/app/api/[locale]/system/generators/i18n/de/index.ts +15 -0
- package/src/app/api/[locale]/system/generators/i18n/en/index.ts +14 -0
- package/src/app/api/[locale]/system/generators/i18n/pl/index.ts +15 -0
- package/src/app/api/[locale]/system/generators/route-handlers/definition.ts +198 -0
- package/src/app/api/[locale]/system/generators/route-handlers/i18n/de/index.ts +48 -0
- package/src/app/api/[locale]/system/generators/route-handlers/i18n/en/index.ts +48 -0
- package/src/app/api/[locale]/system/generators/route-handlers/i18n/pl/index.ts +50 -0
- package/src/app/api/[locale]/system/generators/route-handlers/repository.ts +277 -0
- package/src/app/api/[locale]/system/generators/route-handlers/route.ts +17 -0
- package/src/app/api/[locale]/system/generators/shared/utils.ts +233 -0
- package/src/app/api/[locale]/system/help/definition.ts +445 -0
- package/src/app/api/[locale]/system/help/i18n/de/index.ts +267 -0
- package/src/app/api/[locale]/system/help/i18n/en/index.ts +262 -0
- package/src/app/api/[locale]/system/help/i18n/pl/index.ts +265 -0
- package/src/app/api/[locale]/system/help/interactive/definition.ts +125 -0
- package/src/app/api/[locale]/system/help/interactive/i18n/de/index.ts +22 -0
- package/src/app/api/[locale]/system/help/interactive/i18n/en/index.ts +19 -0
- package/src/app/api/[locale]/system/help/interactive/i18n/pl/index.ts +22 -0
- package/src/app/api/[locale]/system/help/interactive/repository.ts +1025 -0
- package/src/app/api/[locale]/system/help/interactive/route.ts +53 -0
- package/src/app/api/[locale]/system/help/list/definition.ts +372 -0
- package/src/app/api/[locale]/system/help/list/repository.ts +110 -0
- package/src/app/api/[locale]/system/help/list/route.ts +21 -0
- package/src/app/api/[locale]/system/help/repository.ts +212 -0
- package/src/app/api/[locale]/system/help/route.ts +16 -0
- package/src/app/api/[locale]/system/i18n/de/index.ts +68 -0
- package/src/app/api/[locale]/system/i18n/en/index.ts +65 -0
- package/src/app/api/[locale]/system/i18n/pl/index.ts +66 -0
- package/src/app/api/[locale]/system/release-tool/definition.ts +3104 -0
- package/src/app/api/[locale]/system/release-tool/i18n/de/index.ts +813 -0
- package/src/app/api/[locale]/system/release-tool/i18n/en/index.ts +797 -0
- package/src/app/api/[locale]/system/release-tool/i18n/pl/index.ts +810 -0
- package/src/app/api/[locale]/system/release-tool/repository/asset-zipper.ts +128 -0
- package/src/app/api/[locale]/system/release-tool/repository/changelog-generator.ts +212 -0
- package/src/app/api/[locale]/system/release-tool/repository/ci-detector.ts +566 -0
- package/src/app/api/[locale]/system/release-tool/repository/config.ts +113 -0
- package/src/app/api/[locale]/system/release-tool/repository/constants.ts +407 -0
- package/src/app/api/[locale]/system/release-tool/repository/dependency-manager.ts +527 -0
- package/src/app/api/[locale]/system/release-tool/repository/git-service.ts +403 -0
- package/src/app/api/[locale]/system/release-tool/repository/hook-runner.ts +100 -0
- package/src/app/api/[locale]/system/release-tool/repository/index.ts +1 -0
- package/src/app/api/[locale]/system/release-tool/repository/notification-service.ts +638 -0
- package/src/app/api/[locale]/system/release-tool/repository/package-service.ts +169 -0
- package/src/app/api/[locale]/system/release-tool/repository/publisher.ts +253 -0
- package/src/app/api/[locale]/system/release-tool/repository/quality-runner.ts +428 -0
- package/src/app/api/[locale]/system/release-tool/repository/release-creator.ts +293 -0
- package/src/app/api/[locale]/system/release-tool/repository/release-executor.ts +1198 -0
- package/src/app/api/[locale]/system/release-tool/repository/snyk-service.ts +136 -0
- package/src/app/api/[locale]/system/release-tool/repository/utils.ts +642 -0
- package/src/app/api/[locale]/system/release-tool/repository/validation.ts +288 -0
- package/src/app/api/[locale]/system/release-tool/repository/version-service.ts +297 -0
- package/src/app/api/[locale]/system/release-tool/route.ts +21 -0
- package/src/app/api/[locale]/system/unified-interface/README.md +328 -0
- package/src/app/api/[locale]/system/unified-interface/cli/README.md +349 -0
- package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-handler.ts +95 -0
- package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-user.ts +146 -0
- package/src/app/api/[locale]/system/unified-interface/cli/auth/session-file.ts +266 -0
- package/src/app/api/[locale]/system/unified-interface/cli/env.ts +26 -0
- package/src/app/api/[locale]/system/unified-interface/cli/i18n/de/index.ts +157 -0
- package/src/app/api/[locale]/system/unified-interface/cli/i18n/en/index.ts +155 -0
- package/src/app/api/[locale]/system/unified-interface/cli/i18n/pl/index.ts +158 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/debug.ts +595 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/entry-point.ts +129 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/environment.ts +155 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/execution-errors.ts +452 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/parsing.ts +297 -0
- package/src/app/api/[locale]/system/unified-interface/cli/runtime/route-executor.ts +859 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/de/index.ts +12 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/en/index.ts +11 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/pl/index.ts +12 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/definition.ts +262 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/de/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/en/index.ts +52 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/pl/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/repository.ts +421 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/install/route.ts +25 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/definition.ts +181 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/de/index.ts +61 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/en/index.ts +59 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/pl/index.ts +61 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/repository.ts +195 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/status/route.ts +22 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/definition.ts +188 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/de/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/en/index.ts +52 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/pl/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/repository.ts +209 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/route.ts +24 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/definition.ts +200 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/de/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/en/index.ts +52 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/pl/index.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/repository.ts +113 -0
- package/src/app/api/[locale]/system/unified-interface/cli/setup/update/route.ts +22 -0
- package/src/app/api/[locale]/system/unified-interface/cli/vibe-runtime.ts +304 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/base-renderer.ts +270 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/registry.ts +309 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/types.ts +126 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/de/index.ts +67 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/en/index.ts +65 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/pl/index.ts +67 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/accordion.ts +74 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/avatar.ts +39 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/badge.ts +54 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-output.ts +298 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-files.ts +89 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-list.ts +298 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-summary.ts +96 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/container.ts +186 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-card.ts +65 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-cards.ts +570 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-list.ts +80 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-table.ts +385 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/editable-text.ts +99 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/empty-state.ts +55 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/errors.ts +67 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/grouped-list.ts +729 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-card.ts +87 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-list.ts +112 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link.ts +59 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/loading.ts +50 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/markdown.ts +131 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/metric.ts +291 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/section.ts +120 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/stats-grid.ts +149 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/tabs.ts +61 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/text.ts +78 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/title.ts +42 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/response-renderer.ts +418 -0
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/schema-handler.ts +534 -0
- package/src/app/api/[locale]/system/unified-interface/i18n/de/index.ts +42 -0
- package/src/app/api/[locale]/system/unified-interface/i18n/en/index.ts +40 -0
- package/src/app/api/[locale]/system/unified-interface/i18n/pl/index.ts +43 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/README.md +114 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/converter.ts +146 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/i18n/de/index.ts +182 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/i18n/en/index.ts +179 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/i18n/pl/index.ts +181 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/registry.ts +343 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/serve/definition.ts +147 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/serve/repository.ts +38 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/serve/route.ts +14 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/server/protocol-handler.ts +309 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/server/server.ts +154 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/server/stdio-transport.ts +193 -0
- package/src/app/api/[locale]/system/unified-interface/mcp/types.ts +246 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create-form.ts +1510 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create.ts +581 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/endpoint-to-metadata.ts +52 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/loader.ts +152 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definitions/registry.ts +265 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/permissions/registry.ts +680 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/executor.ts +220 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/handler.ts +325 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/multi.ts +184 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/request-validator.ts +201 -0
- package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/single.ts +58 -0
- package/src/app/api/[locale]/system/unified-interface/shared/env/define-env-client.ts +49 -0
- package/src/app/api/[locale]/system/unified-interface/shared/env/define-env.ts +47 -0
- package/src/app/api/[locale]/system/unified-interface/shared/env/validation-logger.ts +58 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field/enum.ts +110 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field/specialized.ts +339 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field/utils.test.ts +408 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field/utils.ts +1349 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field-config/endpoint-field-types.ts +107 -0
- package/src/app/api/[locale]/system/unified-interface/shared/field-config/field-config-types.ts +268 -0
- package/src/app/api/[locale]/system/unified-interface/shared/logger/colors.ts +114 -0
- package/src/app/api/[locale]/system/unified-interface/shared/logger/endpoint.ts +169 -0
- package/src/app/api/[locale]/system/unified-interface/shared/logger/file-logger.ts +88 -0
- package/src/app/api/[locale]/system/unified-interface/shared/logger/formatters.ts +177 -0
- package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/base-auth-handler.ts +82 -0
- package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/factory.ts +33 -0
- package/src/app/api/[locale]/system/unified-interface/shared/server-only/server-only.ts +4 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/actions.ts +289 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/endpoint.ts +1167 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/enums.ts +382 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/platform.ts +34 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/types.ts +80 -0
- package/src/app/api/[locale]/system/unified-interface/shared/types/ui-config.ts +76 -0
- package/src/app/api/[locale]/system/unified-interface/shared/utils/error-types.ts +27 -0
- package/src/app/api/[locale]/system/unified-interface/shared/utils/path.ts +63 -0
- package/src/app/api/[locale]/system/unified-interface/shared/utils/scanner.ts +241 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/actions.ts +256 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/configs.ts +1158 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/helpers.ts +80 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/accordion.ts +82 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/avatar.ts +75 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/badge.ts +89 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-output.ts +302 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-quality-list.ts +202 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/container.ts +129 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-card.ts +81 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-cards.ts +258 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-list.ts +123 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-table.ts +387 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/editable-text.ts +89 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/empty-state.ts +78 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/errors.ts +93 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/grouped-list.ts +448 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/index.ts +38 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-card.ts +130 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-list.ts +127 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link.ts +68 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/loading.ts +81 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/markdown.ts +176 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/metric-card.ts +241 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/section.ts +90 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/stats-grid.ts +71 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/tabs.ts +80 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/text.ts +105 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/title.ts +72 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/types.ts +240 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/field-helpers.ts +137 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/formatting.ts +437 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/url.ts +40 -0
- package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/widget-helpers.ts +465 -0
- package/src/app/api/[locale]/user/auth/enum.ts +16 -0
- package/src/app/api/[locale]/user/auth/i18n/de/index.ts +227 -0
- package/src/app/api/[locale]/user/auth/i18n/en/index.ts +205 -0
- package/src/app/api/[locale]/user/auth/i18n/pl/index.ts +219 -0
- package/src/app/api/[locale]/user/auth/types.ts +110 -0
- package/src/app/api/[locale]/user/enum.ts +64 -0
- package/src/app/api/[locale]/user/private/i18n/de/index.ts +3 -0
- package/src/app/api/[locale]/user/private/i18n/en/index.ts +1 -0
- package/src/app/api/[locale]/user/private/i18n/pl/index.ts +3 -0
- package/src/app/api/[locale]/user/types.ts +118 -0
- package/src/app/api/[locale]/user/user-roles/enum.ts +112 -0
- package/src/app/api/[locale]/user/user-roles/i18n/de/index.ts +85 -0
- package/src/app/api/[locale]/user/user-roles/i18n/en/index.ts +83 -0
- package/src/app/api/[locale]/user/user-roles/i18n/pl/index.ts +86 -0
- package/src/app/api/[locale]/user/user-roles/types.ts +34 -0
- package/src/app/api/i18n/de/index.ts +6 -0
- package/src/app/api/i18n/en/index.ts +5 -0
- package/src/app/api/i18n/pl/index.ts +5 -0
- package/src/app/i18n/de/index.ts +6 -0
- package/src/app/i18n/en/index.ts +5 -0
- package/src/app/i18n/pl/index.ts +5 -0
package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/grouped-list.ts
ADDED
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grouped List Widget Renderer
|
|
3
|
+
* Specialized renderer for grouped lists with beautiful CLI output
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { WidgetType } from "@/app/api/[locale]/system/unified-interface/shared/types/enums";
|
|
7
|
+
|
|
8
|
+
import { BaseWidgetRenderer } from "../core/base-renderer";
|
|
9
|
+
import type { CLIWidgetProps, WidgetRenderContext } from "../core/types";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for grouped list rendering
|
|
13
|
+
*/
|
|
14
|
+
interface GroupedListConfig {
|
|
15
|
+
groupBy: string;
|
|
16
|
+
sortBy: string;
|
|
17
|
+
showGroupSummary: boolean;
|
|
18
|
+
maxItemsPerGroup: number;
|
|
19
|
+
summaryTitle?: string;
|
|
20
|
+
summaryStats?: StatConfig[];
|
|
21
|
+
renderMode?: "code-quality" | "simple"; // Data-driven mode selection
|
|
22
|
+
hierarchical?: boolean; // Enable hierarchical/tree rendering for nested paths
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Individual item in a grouped list
|
|
27
|
+
*/
|
|
28
|
+
interface GroupedListItem {
|
|
29
|
+
[key: string]:
|
|
30
|
+
| string
|
|
31
|
+
| number
|
|
32
|
+
| boolean
|
|
33
|
+
| null
|
|
34
|
+
| undefined
|
|
35
|
+
| GroupedListItem
|
|
36
|
+
| GroupedListItem[];
|
|
37
|
+
line?: number;
|
|
38
|
+
column?: number;
|
|
39
|
+
severity?: string;
|
|
40
|
+
message?: string;
|
|
41
|
+
rule?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Configuration for summary statistics
|
|
46
|
+
*/
|
|
47
|
+
interface StatConfig {
|
|
48
|
+
field: string;
|
|
49
|
+
value: string;
|
|
50
|
+
label?: string;
|
|
51
|
+
icon?: string;
|
|
52
|
+
color?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Tree node for hierarchical rendering
|
|
57
|
+
*/
|
|
58
|
+
interface TreeNode {
|
|
59
|
+
name: string;
|
|
60
|
+
fullPath: string;
|
|
61
|
+
items: GroupedListItem[];
|
|
62
|
+
children: Map<string, TreeNode>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export class GroupedListWidgetRenderer extends BaseWidgetRenderer<
|
|
66
|
+
typeof WidgetType.GROUPED_LIST
|
|
67
|
+
> {
|
|
68
|
+
readonly widgetType = WidgetType.GROUPED_LIST;
|
|
69
|
+
|
|
70
|
+
render(
|
|
71
|
+
props: CLIWidgetProps<typeof WidgetType.GROUPED_LIST, string>,
|
|
72
|
+
): string {
|
|
73
|
+
const { value: data, context } = props;
|
|
74
|
+
const t = context.t;
|
|
75
|
+
|
|
76
|
+
if (!Array.isArray(data) || data.length === 0) {
|
|
77
|
+
return context.renderEmptyState(
|
|
78
|
+
t(
|
|
79
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.noDataAvailable",
|
|
80
|
+
),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Type narrow the array items to GroupedListItem
|
|
85
|
+
const typedData: GroupedListItem[] = data.filter(
|
|
86
|
+
(item): item is GroupedListItem =>
|
|
87
|
+
typeof item === "object" && item !== null && !Array.isArray(item),
|
|
88
|
+
) as GroupedListItem[];
|
|
89
|
+
const config = this.getGroupedListConfig();
|
|
90
|
+
|
|
91
|
+
let output = "";
|
|
92
|
+
|
|
93
|
+
// Use hierarchical rendering if configured
|
|
94
|
+
if (config.hierarchical) {
|
|
95
|
+
output = this.renderHierarchical(typedData, config, context);
|
|
96
|
+
} else {
|
|
97
|
+
// Group data by the specified field
|
|
98
|
+
const groups = this.groupData(typedData, config.groupBy, context);
|
|
99
|
+
|
|
100
|
+
// Render each group
|
|
101
|
+
for (const [groupKey, items] of groups) {
|
|
102
|
+
output += this.renderGroup(groupKey, items, config, context);
|
|
103
|
+
output += "\n";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Add summary if requested
|
|
107
|
+
if (config.showGroupSummary) {
|
|
108
|
+
output += this.renderSummary(typedData, groups, config, context);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return output.trim();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private getGroupedListConfig(): GroupedListConfig {
|
|
116
|
+
return {
|
|
117
|
+
groupBy: "file",
|
|
118
|
+
sortBy: "severity",
|
|
119
|
+
showGroupSummary: true,
|
|
120
|
+
maxItemsPerGroup: 50,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Group data by specified field
|
|
126
|
+
*/
|
|
127
|
+
private groupData(
|
|
128
|
+
data: GroupedListItem[],
|
|
129
|
+
groupBy: string,
|
|
130
|
+
context: WidgetRenderContext,
|
|
131
|
+
): Map<string, GroupedListItem[]> {
|
|
132
|
+
const t = context.t;
|
|
133
|
+
const groups = new Map<string, GroupedListItem[]>();
|
|
134
|
+
const otherLabel = t(
|
|
135
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.other",
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
for (const item of data) {
|
|
139
|
+
const groupValue = item[groupBy];
|
|
140
|
+
let groupKey = otherLabel;
|
|
141
|
+
if (typeof groupValue === "string") {
|
|
142
|
+
groupKey = groupValue;
|
|
143
|
+
} else if (typeof groupValue === "number") {
|
|
144
|
+
groupKey = String(groupValue);
|
|
145
|
+
} else if (typeof groupValue === "boolean") {
|
|
146
|
+
groupKey = groupValue ? "true" : "false";
|
|
147
|
+
} else if (groupValue !== null && groupValue !== undefined) {
|
|
148
|
+
groupKey = otherLabel;
|
|
149
|
+
}
|
|
150
|
+
if (!groups.has(groupKey)) {
|
|
151
|
+
groups.set(groupKey, []);
|
|
152
|
+
}
|
|
153
|
+
groups.get(groupKey)!.push(item);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Sort groups by filename (alphabetically)
|
|
157
|
+
return new Map(
|
|
158
|
+
[...groups.entries()].toSorted((a, b) => a[0].localeCompare(b[0])),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Render a single group
|
|
164
|
+
*/
|
|
165
|
+
private renderGroup(
|
|
166
|
+
groupKey: string,
|
|
167
|
+
items: GroupedListItem[],
|
|
168
|
+
config: GroupedListConfig,
|
|
169
|
+
context: WidgetRenderContext,
|
|
170
|
+
): string {
|
|
171
|
+
let output = "";
|
|
172
|
+
|
|
173
|
+
// Group header with file path and count
|
|
174
|
+
const groupHeader = this.renderGroupHeader(groupKey, items.length, context);
|
|
175
|
+
output += `${groupHeader}${String.fromCodePoint(10)}`;
|
|
176
|
+
|
|
177
|
+
// Sort items within group
|
|
178
|
+
const sortedItems = this.sortItems(items, config.sortBy);
|
|
179
|
+
|
|
180
|
+
// Render each item
|
|
181
|
+
for (const item of sortedItems.slice(0, config.maxItemsPerGroup)) {
|
|
182
|
+
const itemLine = this.renderGroupItem(item, context, config);
|
|
183
|
+
output += ` ${itemLine}${String.fromCodePoint(10)}`;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Show truncation message if needed
|
|
187
|
+
if (items.length > config.maxItemsPerGroup) {
|
|
188
|
+
const t = context.t;
|
|
189
|
+
const remaining = items.length - config.maxItemsPerGroup;
|
|
190
|
+
const truncationMsg = this.styleText(
|
|
191
|
+
t(
|
|
192
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.andMoreItems",
|
|
193
|
+
{ count: remaining.toString() },
|
|
194
|
+
),
|
|
195
|
+
"dim",
|
|
196
|
+
context,
|
|
197
|
+
);
|
|
198
|
+
output += ` ${truncationMsg}${String.fromCodePoint(10)}`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return output;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Render group header
|
|
206
|
+
*/
|
|
207
|
+
private renderGroupHeader(
|
|
208
|
+
groupKey: string,
|
|
209
|
+
itemCount: number,
|
|
210
|
+
context: WidgetRenderContext,
|
|
211
|
+
): string {
|
|
212
|
+
// Clean up file path for display
|
|
213
|
+
const displayPath = this.formatFilePath(groupKey);
|
|
214
|
+
const countText = `${itemCount} item${itemCount !== 1 ? "s" : ""}`;
|
|
215
|
+
|
|
216
|
+
const pathText = this.styleText(displayPath, "underline", context);
|
|
217
|
+
const countTextStyled = this.styleText(
|
|
218
|
+
String.fromCodePoint(40) + countText + String.fromCodePoint(41),
|
|
219
|
+
"dim",
|
|
220
|
+
context,
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
const fileIcon = context.options.useEmojis
|
|
224
|
+
? `${String.fromCodePoint(128196)} `
|
|
225
|
+
: "";
|
|
226
|
+
return `${fileIcon}${pathText} ${countTextStyled}`;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Render individual group item (lint issue or command)
|
|
231
|
+
*/
|
|
232
|
+
private renderGroupItem(
|
|
233
|
+
item: GroupedListItem,
|
|
234
|
+
context: WidgetRenderContext,
|
|
235
|
+
config: GroupedListConfig,
|
|
236
|
+
): string {
|
|
237
|
+
const parts: string[] = [];
|
|
238
|
+
|
|
239
|
+
// Use renderMode from config to determine rendering style
|
|
240
|
+
const isCodeQualityMode = config.renderMode === "code-quality";
|
|
241
|
+
|
|
242
|
+
if (isCodeQualityMode) {
|
|
243
|
+
// Render as lint issue with line/column/severity
|
|
244
|
+
// Location (line:column)
|
|
245
|
+
if (item.line || item.column) {
|
|
246
|
+
const location = this.formatLocation(item.line, item.column);
|
|
247
|
+
parts.push(this.styleText(location.padEnd(8), "blue", context));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Severity with icon and color
|
|
251
|
+
if (item.severity) {
|
|
252
|
+
const severity = this.formatSeverity(item.severity, context);
|
|
253
|
+
parts.push(severity.padEnd(12));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Message
|
|
257
|
+
if (item.message) {
|
|
258
|
+
parts.push(item.message);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Rule (if available)
|
|
262
|
+
if (
|
|
263
|
+
item.rule &&
|
|
264
|
+
typeof item.rule === "string" &&
|
|
265
|
+
item.rule !== "unknown"
|
|
266
|
+
) {
|
|
267
|
+
const ruleText = this.styleText(`[${item.rule}]`, "dim", context);
|
|
268
|
+
parts.push(ruleText);
|
|
269
|
+
}
|
|
270
|
+
} else {
|
|
271
|
+
// Render as command or general item (simple mode)
|
|
272
|
+
// Message (description)
|
|
273
|
+
if (item.message) {
|
|
274
|
+
parts.push(item.message);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Rule (command alias) in square brackets
|
|
278
|
+
if (
|
|
279
|
+
item.rule &&
|
|
280
|
+
typeof item.rule === "string" &&
|
|
281
|
+
item.rule !== "unknown"
|
|
282
|
+
) {
|
|
283
|
+
const ruleText = this.styleText(`[${item.rule}]`, "dim", context);
|
|
284
|
+
parts.push(ruleText);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return parts.join(" ");
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Sort items within a group
|
|
293
|
+
*/
|
|
294
|
+
private sortItems(
|
|
295
|
+
items: GroupedListItem[],
|
|
296
|
+
sortBy: string,
|
|
297
|
+
): GroupedListItem[] {
|
|
298
|
+
return items.toSorted((a, b) => {
|
|
299
|
+
if (sortBy === "severity") {
|
|
300
|
+
const severityOrder = { error: 0, warning: 1, info: 2 };
|
|
301
|
+
const aOrder =
|
|
302
|
+
severityOrder[a.severity as keyof typeof severityOrder] ?? 3;
|
|
303
|
+
const bOrder =
|
|
304
|
+
severityOrder[b.severity as keyof typeof severityOrder] ?? 3;
|
|
305
|
+
if (aOrder !== bOrder) {
|
|
306
|
+
return aOrder - bOrder;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Secondary sort by line number
|
|
311
|
+
if (typeof a.line === "number" && typeof b.line === "number") {
|
|
312
|
+
return a.line - b.line;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return 0;
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Format file path for display
|
|
321
|
+
*/
|
|
322
|
+
private formatFilePath(filePath: string): string {
|
|
323
|
+
// Return file path as-is - CWD stripping not available without process
|
|
324
|
+
return filePath;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Format location (line:column)
|
|
329
|
+
*/
|
|
330
|
+
private formatLocation(line?: number, column?: number): string {
|
|
331
|
+
if (typeof line === "number" && typeof column === "number") {
|
|
332
|
+
return `${line}:${column}`;
|
|
333
|
+
} else if (typeof line === "number") {
|
|
334
|
+
return `${line}:${0}`;
|
|
335
|
+
}
|
|
336
|
+
return `${0}:${0}`;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Format severity with icon and color
|
|
341
|
+
*/
|
|
342
|
+
private formatSeverity(
|
|
343
|
+
severity: string,
|
|
344
|
+
context: WidgetRenderContext,
|
|
345
|
+
): string {
|
|
346
|
+
const icons = context.options.useEmojis;
|
|
347
|
+
|
|
348
|
+
switch (severity) {
|
|
349
|
+
case "error": {
|
|
350
|
+
const errorIcon = icons
|
|
351
|
+
? `${String.fromCodePoint(10060)} `
|
|
352
|
+
: `${String.fromCodePoint(10007)} `;
|
|
353
|
+
const errorText = this.styleText("error", "red", context);
|
|
354
|
+
return `${errorIcon}${errorText}`;
|
|
355
|
+
}
|
|
356
|
+
case "warning": {
|
|
357
|
+
const warnIcon = icons
|
|
358
|
+
? `${String.fromCodePoint(9888)}${String.fromCodePoint(65039)} `
|
|
359
|
+
: `${String.fromCodePoint(33)} `;
|
|
360
|
+
const warnText = this.styleText("warn", "yellow", context);
|
|
361
|
+
return `${warnIcon}${warnText}`;
|
|
362
|
+
}
|
|
363
|
+
case "info": {
|
|
364
|
+
const infoIcon = icons
|
|
365
|
+
? `${String.fromCodePoint(8505)}${String.fromCodePoint(65039)} `
|
|
366
|
+
: `${String.fromCodePoint(105)} `;
|
|
367
|
+
const infoText = this.styleText("info", "blue", context);
|
|
368
|
+
return `${infoIcon}${infoText}`;
|
|
369
|
+
}
|
|
370
|
+
default:
|
|
371
|
+
return severity;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Render summary statistics with beautiful formatting
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
private renderSummary(
|
|
380
|
+
data: GroupedListItem[],
|
|
381
|
+
groups: Map<string, GroupedListItem[]>,
|
|
382
|
+
config: GroupedListConfig,
|
|
383
|
+
context: WidgetRenderContext,
|
|
384
|
+
): string {
|
|
385
|
+
const t = context.t;
|
|
386
|
+
// Skip summary if not configured
|
|
387
|
+
if (!config.showGroupSummary) {
|
|
388
|
+
return "";
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Only show affected files list and detailed summary for code quality mode
|
|
392
|
+
if (config.renderMode !== "code-quality") {
|
|
393
|
+
return "";
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
let output = "";
|
|
397
|
+
|
|
398
|
+
// Add affected files list first
|
|
399
|
+
output += this.renderAffectedFilesList(groups, context);
|
|
400
|
+
|
|
401
|
+
// Then add summary section
|
|
402
|
+
output += String.fromCodePoint(10) + String.fromCodePoint(10);
|
|
403
|
+
|
|
404
|
+
// Beautiful header with separator
|
|
405
|
+
const headerIcon = context.options.useEmojis
|
|
406
|
+
? `${String.fromCodePoint(128202)} `
|
|
407
|
+
: "";
|
|
408
|
+
const summaryTitle =
|
|
409
|
+
config.summaryTitle ||
|
|
410
|
+
t(
|
|
411
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.summary",
|
|
412
|
+
);
|
|
413
|
+
const headerText = this.styleText(
|
|
414
|
+
`${headerIcon}${summaryTitle}`,
|
|
415
|
+
"bold",
|
|
416
|
+
context,
|
|
417
|
+
);
|
|
418
|
+
output += `${headerText}${String.fromCodePoint(10)}`;
|
|
419
|
+
|
|
420
|
+
// Add subtle separator line
|
|
421
|
+
const separatorLength = 50;
|
|
422
|
+
const separator = String.fromCodePoint(9472).repeat(separatorLength);
|
|
423
|
+
output += `${this.styleText(separator, "dim", context)}${String.fromCodePoint(10)}`;
|
|
424
|
+
|
|
425
|
+
// Meaningful summary stats for code quality tools
|
|
426
|
+
const totalIssues = data.length;
|
|
427
|
+
const totalFiles = groups.size;
|
|
428
|
+
const errors = data.filter((item) => item.severity === "error").length;
|
|
429
|
+
const warnings = data.filter((item) => item.severity === "warning").length;
|
|
430
|
+
|
|
431
|
+
// Show meaningful metrics
|
|
432
|
+
const filesLabel = t(
|
|
433
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.files",
|
|
434
|
+
);
|
|
435
|
+
const issuesLabel = t(
|
|
436
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.issues",
|
|
437
|
+
);
|
|
438
|
+
output += ` ${this.styleText(`${filesLabel}:`, "dim", context).padEnd(12)} ${totalFiles}${String.fromCodePoint(10)}`;
|
|
439
|
+
output += ` ${this.styleText(`${issuesLabel}:`, "dim", context).padEnd(12)} ${totalIssues}${String.fromCodePoint(10)}`;
|
|
440
|
+
|
|
441
|
+
if (errors > 0) {
|
|
442
|
+
const errorIcon = context.options.useEmojis
|
|
443
|
+
? `${String.fromCodePoint(10060)} `
|
|
444
|
+
: "";
|
|
445
|
+
const errorText = this.styleText(
|
|
446
|
+
`${errors} error${errors !== 1 ? "s" : ""}`,
|
|
447
|
+
"red",
|
|
448
|
+
context,
|
|
449
|
+
);
|
|
450
|
+
output += ` ${errorIcon}${errorText}${String.fromCodePoint(10)}`;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
if (warnings > 0) {
|
|
454
|
+
const warnIcon = context.options.useEmojis
|
|
455
|
+
? `${String.fromCodePoint(9888)}${String.fromCodePoint(65039)} `
|
|
456
|
+
: "";
|
|
457
|
+
const warnText = this.styleText(
|
|
458
|
+
`${warnings} warning${warnings !== 1 ? "s" : ""}`,
|
|
459
|
+
"yellow",
|
|
460
|
+
context,
|
|
461
|
+
);
|
|
462
|
+
output += ` ${warnIcon}${warnText}${String.fromCodePoint(10)}`;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// Custom summary stats if configured
|
|
466
|
+
if (config.summaryStats && Array.isArray(config.summaryStats)) {
|
|
467
|
+
for (const stat of config.summaryStats) {
|
|
468
|
+
const count = this.calculateStatCount(data, stat);
|
|
469
|
+
if (count > 0) {
|
|
470
|
+
const icon =
|
|
471
|
+
context.options.useEmojis && stat.icon ? `${stat.icon} ` : "";
|
|
472
|
+
const label = stat.label || stat.field;
|
|
473
|
+
const color = stat.color || "dim";
|
|
474
|
+
const validColor =
|
|
475
|
+
color === "red" ||
|
|
476
|
+
color === "yellow" ||
|
|
477
|
+
color === "blue" ||
|
|
478
|
+
color === "green" ||
|
|
479
|
+
color === "dim" ||
|
|
480
|
+
color === "bold" ||
|
|
481
|
+
color === "underline"
|
|
482
|
+
? color
|
|
483
|
+
: "dim";
|
|
484
|
+
const statText = this.styleText(
|
|
485
|
+
`${count} ${label}`,
|
|
486
|
+
validColor,
|
|
487
|
+
context,
|
|
488
|
+
);
|
|
489
|
+
output += ` ${icon}${statText}${String.fromCodePoint(10)}`;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return output;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Render a clean list of affected files with error counts
|
|
499
|
+
*/
|
|
500
|
+
private renderAffectedFilesList(
|
|
501
|
+
groups: Map<string, GroupedListItem[]>,
|
|
502
|
+
context: WidgetRenderContext,
|
|
503
|
+
): string {
|
|
504
|
+
const t = context.t;
|
|
505
|
+
if (groups.size === 0) {
|
|
506
|
+
return "";
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let output = `${String.fromCodePoint(10)}${String.fromCodePoint(10)}`;
|
|
510
|
+
|
|
511
|
+
// Header
|
|
512
|
+
const headerIcon = context.options.useEmojis
|
|
513
|
+
? `${String.fromCodePoint(128203)} `
|
|
514
|
+
: "";
|
|
515
|
+
const headerText = this.styleText(
|
|
516
|
+
`${headerIcon}${t("app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.affectedFiles")}`,
|
|
517
|
+
"bold",
|
|
518
|
+
context,
|
|
519
|
+
);
|
|
520
|
+
output += `${headerText}${String.fromCodePoint(10)}`;
|
|
521
|
+
|
|
522
|
+
// Separator
|
|
523
|
+
const separator = String.fromCodePoint(9472).repeat(50);
|
|
524
|
+
output += `${this.styleText(separator, "dim", context)}${String.fromCodePoint(10)}`;
|
|
525
|
+
|
|
526
|
+
// Sort files by filename (alphabetically)
|
|
527
|
+
const sortedFiles = [...groups.entries()].toSorted(([aKey], [bKey]) =>
|
|
528
|
+
aKey.localeCompare(bKey),
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
// List each file with its error count
|
|
532
|
+
for (const [fileName, issues] of sortedFiles) {
|
|
533
|
+
const errorCount = issues.filter(
|
|
534
|
+
(item) => item.severity === "error",
|
|
535
|
+
).length;
|
|
536
|
+
const warningCount = issues.filter(
|
|
537
|
+
(item) => item.severity === "warning",
|
|
538
|
+
).length;
|
|
539
|
+
|
|
540
|
+
let countText = "";
|
|
541
|
+
if (errorCount > 0 && warningCount > 0) {
|
|
542
|
+
const errorText = `${errorCount} ${t(`app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.${errorCount === 1 ? "error" : "errors"}`)}`;
|
|
543
|
+
const warningText = `${warningCount} ${t(`app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.${warningCount === 1 ? "warning" : "warnings"}`)}`;
|
|
544
|
+
countText = this.styleText(
|
|
545
|
+
`${errorText}, ${warningText}`,
|
|
546
|
+
"red",
|
|
547
|
+
context,
|
|
548
|
+
);
|
|
549
|
+
} else if (errorCount > 0) {
|
|
550
|
+
countText = this.styleText(
|
|
551
|
+
`${errorCount} error${errorCount !== 1 ? "s" : ""}`,
|
|
552
|
+
"red",
|
|
553
|
+
context,
|
|
554
|
+
);
|
|
555
|
+
} else if (warningCount > 0) {
|
|
556
|
+
countText = this.styleText(
|
|
557
|
+
`${warningCount} warning${warningCount !== 1 ? "s" : ""}`,
|
|
558
|
+
"yellow",
|
|
559
|
+
context,
|
|
560
|
+
);
|
|
561
|
+
} else {
|
|
562
|
+
countText = this.styleText(
|
|
563
|
+
`${issues.length} item${issues.length !== 1 ? "s" : ""}`,
|
|
564
|
+
"dim",
|
|
565
|
+
context,
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const fileIcon = context.options.useEmojis
|
|
570
|
+
? `${String.fromCodePoint(128196)} `
|
|
571
|
+
: "";
|
|
572
|
+
const fileText = fileName; // No styling for file names
|
|
573
|
+
|
|
574
|
+
const fileEntry = ` ${fileIcon}${fileText} ${String.fromCodePoint(40)}${countText}${String.fromCodePoint(41)}`;
|
|
575
|
+
output += `${fileEntry}${String.fromCodePoint(10)}`;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return output;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Calculate count for a specific stat configuration
|
|
583
|
+
*/
|
|
584
|
+
private calculateStatCount(
|
|
585
|
+
data: GroupedListItem[],
|
|
586
|
+
stat: StatConfig,
|
|
587
|
+
): number {
|
|
588
|
+
if (!stat.field || !stat.value) {
|
|
589
|
+
return 0;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
return data.filter((item) => {
|
|
593
|
+
const fieldValue = item[stat.field];
|
|
594
|
+
return fieldValue === stat.value;
|
|
595
|
+
}).length;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Render hierarchical tree structure for nested paths
|
|
600
|
+
*/
|
|
601
|
+
private renderHierarchical(
|
|
602
|
+
data: GroupedListItem[],
|
|
603
|
+
config: GroupedListConfig,
|
|
604
|
+
context: WidgetRenderContext,
|
|
605
|
+
): string {
|
|
606
|
+
// Build tree structure from flat data
|
|
607
|
+
const root: TreeNode = {
|
|
608
|
+
name: "",
|
|
609
|
+
fullPath: "",
|
|
610
|
+
items: [],
|
|
611
|
+
children: new Map(),
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
// Group items by category path
|
|
615
|
+
for (const item of data) {
|
|
616
|
+
const categoryPath = item[config.groupBy];
|
|
617
|
+
if (typeof categoryPath !== "string") {
|
|
618
|
+
continue;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const parts = categoryPath.split("/").filter((p) => p.length);
|
|
622
|
+
let currentNode = root;
|
|
623
|
+
|
|
624
|
+
// Build/traverse tree
|
|
625
|
+
for (let i = 0; i < parts.length; i++) {
|
|
626
|
+
const part = parts[i];
|
|
627
|
+
const fullPath = parts.slice(0, i + 1).join("/");
|
|
628
|
+
|
|
629
|
+
if (!currentNode.children.has(part)) {
|
|
630
|
+
currentNode.children.set(part, {
|
|
631
|
+
name: part,
|
|
632
|
+
fullPath,
|
|
633
|
+
items: [],
|
|
634
|
+
children: new Map(),
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
currentNode = currentNode.children.get(part)!;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// Add item to leaf node
|
|
641
|
+
currentNode.items.push(item);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// Render tree recursively
|
|
645
|
+
return this.renderTreeNode(root, 0, config, context);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Render a single tree node and its children
|
|
650
|
+
*/
|
|
651
|
+
private renderTreeNode(
|
|
652
|
+
node: TreeNode,
|
|
653
|
+
depth: number,
|
|
654
|
+
config: GroupedListConfig,
|
|
655
|
+
context: WidgetRenderContext,
|
|
656
|
+
): string {
|
|
657
|
+
const result: string[] = [];
|
|
658
|
+
const indent = " ".repeat(depth);
|
|
659
|
+
|
|
660
|
+
// Sort children alphabetically
|
|
661
|
+
const sortedChildren = [...node.children.entries()].toSorted((a, b) =>
|
|
662
|
+
a[0].localeCompare(b[0]),
|
|
663
|
+
);
|
|
664
|
+
|
|
665
|
+
// Render this node's items first if any
|
|
666
|
+
if (node.items.length > 0 && depth > 0) {
|
|
667
|
+
// Calculate total count including children
|
|
668
|
+
const totalCount = this.countItemsRecursive(node);
|
|
669
|
+
const itemText = `${totalCount} item${totalCount !== 1 ? "s" : ""}`;
|
|
670
|
+
|
|
671
|
+
const pathText = node.fullPath;
|
|
672
|
+
const styledPath = this.styleText(pathText, "underline", context);
|
|
673
|
+
const countStyled = this.styleText(`(${itemText})`, "dim", context);
|
|
674
|
+
|
|
675
|
+
result.push(`${indent}${styledPath} ${countStyled}`);
|
|
676
|
+
|
|
677
|
+
// Render items
|
|
678
|
+
const sortedItems = this.sortItems(node.items, config.sortBy);
|
|
679
|
+
for (const item of sortedItems.slice(0, config.maxItemsPerGroup)) {
|
|
680
|
+
const itemLine = this.renderGroupItem(item, context, config);
|
|
681
|
+
result.push(`${indent} ${itemLine}`);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (node.items.length > config.maxItemsPerGroup) {
|
|
685
|
+
const remaining = node.items.length - config.maxItemsPerGroup;
|
|
686
|
+
const t = context.t;
|
|
687
|
+
const truncationMsg = this.styleText(
|
|
688
|
+
t(
|
|
689
|
+
"app.api.system.unifiedInterface.cli.vibe.endpoints.renderers.cliUi.widgets.common.andMoreItems",
|
|
690
|
+
{ count: remaining.toString() },
|
|
691
|
+
),
|
|
692
|
+
"dim",
|
|
693
|
+
context,
|
|
694
|
+
);
|
|
695
|
+
result.push(`${indent} ${truncationMsg}`);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
result.push("");
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
// Render children
|
|
702
|
+
for (const childEntry of sortedChildren) {
|
|
703
|
+
const childNode = childEntry[1];
|
|
704
|
+
const childOutput = this.renderTreeNode(
|
|
705
|
+
childNode,
|
|
706
|
+
depth + (node.items.length > 0 ? 1 : 0),
|
|
707
|
+
config,
|
|
708
|
+
context,
|
|
709
|
+
);
|
|
710
|
+
if (childOutput) {
|
|
711
|
+
result.push(childOutput);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
return result.join("\n");
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Count items recursively including all children
|
|
720
|
+
*/
|
|
721
|
+
private countItemsRecursive(node: TreeNode): number {
|
|
722
|
+
let count = node.items.length;
|
|
723
|
+
for (const childEntry of node.children) {
|
|
724
|
+
const child = childEntry[1];
|
|
725
|
+
count += this.countItemsRecursive(child);
|
|
726
|
+
}
|
|
727
|
+
return count;
|
|
728
|
+
}
|
|
729
|
+
}
|