@empline/preflight 1.0.20
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/README.md +540 -0
- package/dist/bin/approve.d.ts +24 -0
- package/dist/bin/approve.d.ts.map +1 -0
- package/dist/bin/approve.js +249 -0
- package/dist/bin/approve.js.map +1 -0
- package/dist/bin/audit.d.ts +64 -0
- package/dist/bin/audit.d.ts.map +1 -0
- package/dist/bin/audit.js +464 -0
- package/dist/bin/audit.js.map +1 -0
- package/dist/bin/install-hooks.d.ts +20 -0
- package/dist/bin/install-hooks.d.ts.map +1 -0
- package/dist/bin/install-hooks.js +204 -0
- package/dist/bin/install-hooks.js.map +1 -0
- package/dist/bin/preflight.d.ts +21 -0
- package/dist/bin/preflight.d.ts.map +1 -0
- package/dist/bin/preflight.js +218 -0
- package/dist/bin/preflight.js.map +1 -0
- package/dist/bin/preinstall.d.ts +15 -0
- package/dist/bin/preinstall.d.ts.map +1 -0
- package/dist/bin/preinstall.js +229 -0
- package/dist/bin/preinstall.js.map +1 -0
- package/dist/bin/review-drift.d.ts +17 -0
- package/dist/bin/review-drift.d.ts.map +1 -0
- package/dist/bin/review-drift.js +292 -0
- package/dist/bin/review-drift.js.map +1 -0
- package/dist/bin/review.d.ts +22 -0
- package/dist/bin/review.d.ts.map +1 -0
- package/dist/bin/review.js +179 -0
- package/dist/bin/review.js.map +1 -0
- package/dist/bin/submit-drift.d.ts +36 -0
- package/dist/bin/submit-drift.d.ts.map +1 -0
- package/dist/bin/submit-drift.js +534 -0
- package/dist/bin/submit-drift.js.map +1 -0
- package/dist/bin/submit.d.ts +23 -0
- package/dist/bin/submit.d.ts.map +1 -0
- package/dist/bin/submit.js +263 -0
- package/dist/bin/submit.js.map +1 -0
- package/dist/bin/watch.d.ts +27 -0
- package/dist/bin/watch.d.ts.map +1 -0
- package/dist/bin/watch.js +327 -0
- package/dist/bin/watch.js.map +1 -0
- package/dist/checks/ai/card-size-detection-validation.d.ts +22 -0
- package/dist/checks/ai/card-size-detection-validation.d.ts.map +1 -0
- package/dist/checks/ai/card-size-detection-validation.js +452 -0
- package/dist/checks/ai/card-size-detection-validation.js.map +1 -0
- package/dist/checks/ai/code-quality-ai.d.ts +17 -0
- package/dist/checks/ai/code-quality-ai.d.ts.map +1 -0
- package/dist/checks/ai/code-quality-ai.js +399 -0
- package/dist/checks/ai/code-quality-ai.js.map +1 -0
- package/dist/checks/ai/recognition-pipeline-validation.d.ts +27 -0
- package/dist/checks/ai/recognition-pipeline-validation.d.ts.map +1 -0
- package/dist/checks/ai/recognition-pipeline-validation.js +808 -0
- package/dist/checks/ai/recognition-pipeline-validation.js.map +1 -0
- package/dist/checks/ai/series-subset-hierarchy.d.ts +21 -0
- package/dist/checks/ai/series-subset-hierarchy.d.ts.map +1 -0
- package/dist/checks/ai/series-subset-hierarchy.js +373 -0
- package/dist/checks/ai/series-subset-hierarchy.js.map +1 -0
- package/dist/checks/api/api-completeness-check.d.ts +26 -0
- package/dist/checks/api/api-completeness-check.d.ts.map +1 -0
- package/dist/checks/api/api-completeness-check.js +311 -0
- package/dist/checks/api/api-completeness-check.js.map +1 -0
- package/dist/checks/api/api-contract-validation.d.ts +24 -0
- package/dist/checks/api/api-contract-validation.d.ts.map +1 -0
- package/dist/checks/api/api-contract-validation.js +219 -0
- package/dist/checks/api/api-contract-validation.js.map +1 -0
- package/dist/checks/api/pagination-validation.d.ts +21 -0
- package/dist/checks/api/pagination-validation.d.ts.map +1 -0
- package/dist/checks/api/pagination-validation.js +270 -0
- package/dist/checks/api/pagination-validation.js.map +1 -0
- package/dist/checks/api/response-consistency.d.ts +21 -0
- package/dist/checks/api/response-consistency.d.ts.map +1 -0
- package/dist/checks/api/response-consistency.js +238 -0
- package/dist/checks/api/response-consistency.js.map +1 -0
- package/dist/checks/api/response-schema-validation.d.ts +25 -0
- package/dist/checks/api/response-schema-validation.d.ts.map +1 -0
- package/dist/checks/api/response-schema-validation.js +288 -0
- package/dist/checks/api/response-schema-validation.js.map +1 -0
- package/dist/checks/api/response-time-budget.d.ts +17 -0
- package/dist/checks/api/response-time-budget.d.ts.map +1 -0
- package/dist/checks/api/response-time-budget.js +294 -0
- package/dist/checks/api/response-time-budget.js.map +1 -0
- package/dist/checks/api/variant-switching-integrity.d.ts +22 -0
- package/dist/checks/api/variant-switching-integrity.d.ts.map +1 -0
- package/dist/checks/api/variant-switching-integrity.js +306 -0
- package/dist/checks/api/variant-switching-integrity.js.map +1 -0
- package/dist/checks/architecture/admin-page-consistency.d.ts +27 -0
- package/dist/checks/architecture/admin-page-consistency.d.ts.map +1 -0
- package/dist/checks/architecture/admin-page-consistency.js +294 -0
- package/dist/checks/architecture/admin-page-consistency.js.map +1 -0
- package/dist/checks/architecture/backend-ui-coverage.d.ts +25 -0
- package/dist/checks/architecture/backend-ui-coverage.d.ts.map +1 -0
- package/dist/checks/architecture/backend-ui-coverage.js +562 -0
- package/dist/checks/architecture/backend-ui-coverage.js.map +1 -0
- package/dist/checks/architecture/component-architecture.d.ts +26 -0
- package/dist/checks/architecture/component-architecture.d.ts.map +1 -0
- package/dist/checks/architecture/component-architecture.js +513 -0
- package/dist/checks/architecture/component-architecture.js.map +1 -0
- package/dist/checks/architecture/component-consolidation-opportunities.d.ts +28 -0
- package/dist/checks/architecture/component-consolidation-opportunities.d.ts.map +1 -0
- package/dist/checks/architecture/component-consolidation-opportunities.js +338 -0
- package/dist/checks/architecture/component-consolidation-opportunities.js.map +1 -0
- package/dist/checks/architecture/orphaned-pages-detection.d.ts +34 -0
- package/dist/checks/architecture/orphaned-pages-detection.d.ts.map +1 -0
- package/dist/checks/architecture/orphaned-pages-detection.js +464 -0
- package/dist/checks/architecture/orphaned-pages-detection.js.map +1 -0
- package/dist/checks/architecture/primitive-component-enforcement.d.ts +25 -0
- package/dist/checks/architecture/primitive-component-enforcement.d.ts.map +1 -0
- package/dist/checks/architecture/primitive-component-enforcement.js +305 -0
- package/dist/checks/architecture/primitive-component-enforcement.js.map +1 -0
- package/dist/checks/architecture/shared-component-enforcement.d.ts +34 -0
- package/dist/checks/architecture/shared-component-enforcement.d.ts.map +1 -0
- package/dist/checks/architecture/shared-component-enforcement.js +725 -0
- package/dist/checks/architecture/shared-component-enforcement.js.map +1 -0
- package/dist/checks/async-cleanup-validation.d.ts +20 -0
- package/dist/checks/async-cleanup-validation.d.ts.map +1 -0
- package/dist/checks/async-cleanup-validation.js +179 -0
- package/dist/checks/async-cleanup-validation.js.map +1 -0
- package/dist/checks/auth/auth-page-consistency.d.ts +25 -0
- package/dist/checks/auth/auth-page-consistency.d.ts.map +1 -0
- package/dist/checks/auth/auth-page-consistency.js +581 -0
- package/dist/checks/auth/auth-page-consistency.js.map +1 -0
- package/dist/checks/auth/authenticated-redirect.d.ts +55 -0
- package/dist/checks/auth/authenticated-redirect.d.ts.map +1 -0
- package/dist/checks/auth/authenticated-redirect.js +389 -0
- package/dist/checks/auth/authenticated-redirect.js.map +1 -0
- package/dist/checks/auth/role-validation.d.ts +31 -0
- package/dist/checks/auth/role-validation.d.ts.map +1 -0
- package/dist/checks/auth/role-validation.js +252 -0
- package/dist/checks/auth/role-validation.js.map +1 -0
- package/dist/checks/auth/session-integrity-validation.d.ts +58 -0
- package/dist/checks/auth/session-integrity-validation.d.ts.map +1 -0
- package/dist/checks/auth/session-integrity-validation.js +402 -0
- package/dist/checks/auth/session-integrity-validation.js.map +1 -0
- package/dist/checks/auth/session-security.d.ts +67 -0
- package/dist/checks/auth/session-security.d.ts.map +1 -0
- package/dist/checks/auth/session-security.js +399 -0
- package/dist/checks/auth/session-security.js.map +1 -0
- package/dist/checks/auth/session-update-safety.d.ts +96 -0
- package/dist/checks/auth/session-update-safety.d.ts.map +1 -0
- package/dist/checks/auth/session-update-safety.js +697 -0
- package/dist/checks/auth/session-update-safety.js.map +1 -0
- package/dist/checks/auth/store-access-delegation.d.ts +33 -0
- package/dist/checks/auth/store-access-delegation.d.ts.map +1 -0
- package/dist/checks/auth/store-access-delegation.js +344 -0
- package/dist/checks/auth/store-access-delegation.js.map +1 -0
- package/dist/checks/business/business-invariants.d.ts +20 -0
- package/dist/checks/business/business-invariants.d.ts.map +1 -0
- package/dist/checks/business/business-invariants.js +174 -0
- package/dist/checks/business/business-invariants.js.map +1 -0
- package/dist/checks/business/currency-precision.d.ts +21 -0
- package/dist/checks/business/currency-precision.d.ts.map +1 -0
- package/dist/checks/business/currency-precision.js +433 -0
- package/dist/checks/business/currency-precision.js.map +1 -0
- package/dist/checks/business/idempotency-key-validation.d.ts +27 -0
- package/dist/checks/business/idempotency-key-validation.d.ts.map +1 -0
- package/dist/checks/business/idempotency-key-validation.js +275 -0
- package/dist/checks/business/idempotency-key-validation.js.map +1 -0
- package/dist/checks/business/image-metadata-injection.d.ts +19 -0
- package/dist/checks/business/image-metadata-injection.d.ts.map +1 -0
- package/dist/checks/business/image-metadata-injection.js +367 -0
- package/dist/checks/business/image-metadata-injection.js.map +1 -0
- package/dist/checks/business/image-upload-optimization.d.ts +20 -0
- package/dist/checks/business/image-upload-optimization.d.ts.map +1 -0
- package/dist/checks/business/image-upload-optimization.js +271 -0
- package/dist/checks/business/image-upload-optimization.js.map +1 -0
- package/dist/checks/business/inventory-atomicity-validation.d.ts +19 -0
- package/dist/checks/business/inventory-atomicity-validation.d.ts.map +1 -0
- package/dist/checks/business/inventory-atomicity-validation.js +257 -0
- package/dist/checks/business/inventory-atomicity-validation.js.map +1 -0
- package/dist/checks/business/order-state-machine-validation.d.ts +19 -0
- package/dist/checks/business/order-state-machine-validation.d.ts.map +1 -0
- package/dist/checks/business/order-state-machine-validation.js +289 -0
- package/dist/checks/business/order-state-machine-validation.js.map +1 -0
- package/dist/checks/business/price-calculation-validation.d.ts +20 -0
- package/dist/checks/business/price-calculation-validation.d.ts.map +1 -0
- package/dist/checks/business/price-calculation-validation.js +247 -0
- package/dist/checks/business/price-calculation-validation.js.map +1 -0
- package/dist/checks/business/price-display-validation.d.ts +22 -0
- package/dist/checks/business/price-display-validation.d.ts.map +1 -0
- package/dist/checks/business/price-display-validation.js +152 -0
- package/dist/checks/business/price-display-validation.js.map +1 -0
- package/dist/checks/business/resilient-recognition-validation.d.ts +26 -0
- package/dist/checks/business/resilient-recognition-validation.d.ts.map +1 -0
- package/dist/checks/business/resilient-recognition-validation.js +230 -0
- package/dist/checks/business/resilient-recognition-validation.js.map +1 -0
- package/dist/checks/business/store-approval-listing-filter.d.ts +19 -0
- package/dist/checks/business/store-approval-listing-filter.d.ts.map +1 -0
- package/dist/checks/business/store-approval-listing-filter.js +176 -0
- package/dist/checks/business/store-approval-listing-filter.js.map +1 -0
- package/dist/checks/business/timezone-handling.d.ts +28 -0
- package/dist/checks/business/timezone-handling.d.ts.map +1 -0
- package/dist/checks/business/timezone-handling.js +294 -0
- package/dist/checks/business/timezone-handling.js.map +1 -0
- package/dist/checks/code-hygiene/any-type-detection.d.ts +30 -0
- package/dist/checks/code-hygiene/any-type-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/any-type-detection.js +210 -0
- package/dist/checks/code-hygiene/any-type-detection.js.map +1 -0
- package/dist/checks/code-hygiene/api-error-handling.d.ts +29 -0
- package/dist/checks/code-hygiene/api-error-handling.d.ts.map +1 -0
- package/dist/checks/code-hygiene/api-error-handling.js +285 -0
- package/dist/checks/code-hygiene/api-error-handling.js.map +1 -0
- package/dist/checks/code-hygiene/broken-template-literals.d.ts +24 -0
- package/dist/checks/code-hygiene/broken-template-literals.d.ts.map +1 -0
- package/dist/checks/code-hygiene/broken-template-literals.js +209 -0
- package/dist/checks/code-hygiene/broken-template-literals.js.map +1 -0
- package/dist/checks/code-hygiene/comment-hygiene.d.ts +26 -0
- package/dist/checks/code-hygiene/comment-hygiene.d.ts.map +1 -0
- package/dist/checks/code-hygiene/comment-hygiene.js +421 -0
- package/dist/checks/code-hygiene/comment-hygiene.js.map +1 -0
- package/dist/checks/code-hygiene/console-chars-sync.d.ts +26 -0
- package/dist/checks/code-hygiene/console-chars-sync.d.ts.map +1 -0
- package/dist/checks/code-hygiene/console-chars-sync.js +417 -0
- package/dist/checks/code-hygiene/console-chars-sync.js.map +1 -0
- package/dist/checks/code-hygiene/console-log-detection.d.ts +27 -0
- package/dist/checks/code-hygiene/console-log-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/console-log-detection.js +204 -0
- package/dist/checks/code-hygiene/console-log-detection.js.map +1 -0
- package/dist/checks/code-hygiene/dead-code-detection.d.ts +28 -0
- package/dist/checks/code-hygiene/dead-code-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/dead-code-detection.js +217 -0
- package/dist/checks/code-hygiene/dead-code-detection.js.map +1 -0
- package/dist/checks/code-hygiene/decorative-separators.d.ts +32 -0
- package/dist/checks/code-hygiene/decorative-separators.d.ts.map +1 -0
- package/dist/checks/code-hygiene/decorative-separators.js +251 -0
- package/dist/checks/code-hygiene/decorative-separators.js.map +1 -0
- package/dist/checks/code-hygiene/empty-catch-detection.d.ts +25 -0
- package/dist/checks/code-hygiene/empty-catch-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/empty-catch-detection.js +184 -0
- package/dist/checks/code-hygiene/empty-catch-detection.js.map +1 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.d.ts +18 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.d.ts.map +1 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.js +332 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.js.map +1 -0
- package/dist/checks/code-hygiene/log-level-misuse.d.ts +25 -0
- package/dist/checks/code-hygiene/log-level-misuse.d.ts.map +1 -0
- package/dist/checks/code-hygiene/log-level-misuse.js +383 -0
- package/dist/checks/code-hygiene/log-level-misuse.js.map +1 -0
- package/dist/checks/code-hygiene/missing-logger-import.d.ts +16 -0
- package/dist/checks/code-hygiene/missing-logger-import.d.ts.map +1 -0
- package/dist/checks/code-hygiene/missing-logger-import.js +154 -0
- package/dist/checks/code-hygiene/missing-logger-import.js.map +1 -0
- package/dist/checks/code-hygiene/root-file-hygiene.d.ts +31 -0
- package/dist/checks/code-hygiene/root-file-hygiene.d.ts.map +1 -0
- package/dist/checks/code-hygiene/root-file-hygiene.js +285 -0
- package/dist/checks/code-hygiene/root-file-hygiene.js.map +1 -0
- package/dist/checks/code-hygiene/todo-tracking.d.ts +25 -0
- package/dist/checks/code-hygiene/todo-tracking.d.ts.map +1 -0
- package/dist/checks/code-hygiene/todo-tracking.js +205 -0
- package/dist/checks/code-hygiene/todo-tracking.js.map +1 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.d.ts +21 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.d.ts.map +1 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.js +229 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.js.map +1 -0
- package/dist/checks/code-quality/duplicate-logic-detection.d.ts +39 -0
- package/dist/checks/code-quality/duplicate-logic-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/duplicate-logic-detection.js +270 -0
- package/dist/checks/code-quality/duplicate-logic-detection.js.map +1 -0
- package/dist/checks/code-quality/feature-flag-hygiene.d.ts +26 -0
- package/dist/checks/code-quality/feature-flag-hygiene.d.ts.map +1 -0
- package/dist/checks/code-quality/feature-flag-hygiene.js +353 -0
- package/dist/checks/code-quality/feature-flag-hygiene.js.map +1 -0
- package/dist/checks/code-quality/grading-config-usage.d.ts +29 -0
- package/dist/checks/code-quality/grading-config-usage.d.ts.map +1 -0
- package/dist/checks/code-quality/grading-config-usage.js +210 -0
- package/dist/checks/code-quality/grading-config-usage.js.map +1 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.d.ts +36 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.js +450 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.js.map +1 -0
- package/dist/checks/code-quality/magic-number-detection.d.ts +30 -0
- package/dist/checks/code-quality/magic-number-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/magic-number-detection.js +405 -0
- package/dist/checks/code-quality/magic-number-detection.js.map +1 -0
- package/dist/checks/code-quality/mock-function-detection.d.ts +32 -0
- package/dist/checks/code-quality/mock-function-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/mock-function-detection.js +244 -0
- package/dist/checks/code-quality/mock-function-detection.js.map +1 -0
- package/dist/checks/code-quality/no-console-production.d.ts +26 -0
- package/dist/checks/code-quality/no-console-production.d.ts.map +1 -0
- package/dist/checks/code-quality/no-console-production.js +272 -0
- package/dist/checks/code-quality/no-console-production.js.map +1 -0
- package/dist/checks/code-quality/shared-utility-gaps.d.ts +27 -0
- package/dist/checks/code-quality/shared-utility-gaps.d.ts.map +1 -0
- package/dist/checks/code-quality/shared-utility-gaps.js +413 -0
- package/dist/checks/code-quality/shared-utility-gaps.js.map +1 -0
- package/dist/checks/code-quality/stub-script-detection.d.ts +32 -0
- package/dist/checks/code-quality/stub-script-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/stub-script-detection.js +211 -0
- package/dist/checks/code-quality/stub-script-detection.js.map +1 -0
- package/dist/checks/code-quality/typescript-type-safety.d.ts +31 -0
- package/dist/checks/code-quality/typescript-type-safety.d.ts.map +1 -0
- package/dist/checks/code-quality/typescript-type-safety.js +228 -0
- package/dist/checks/code-quality/typescript-type-safety.js.map +1 -0
- package/dist/checks/component-imports.d.ts +15 -0
- package/dist/checks/component-imports.d.ts.map +1 -0
- package/dist/checks/component-imports.js +227 -0
- package/dist/checks/component-imports.js.map +1 -0
- package/dist/checks/config/env-completeness.d.ts +20 -0
- package/dist/checks/config/env-completeness.d.ts.map +1 -0
- package/dist/checks/config/env-completeness.js +193 -0
- package/dist/checks/config/env-completeness.js.map +1 -0
- package/dist/checks/coverage-gap-analysis.d.ts +21 -0
- package/dist/checks/coverage-gap-analysis.d.ts.map +1 -0
- package/dist/checks/coverage-gap-analysis.js +779 -0
- package/dist/checks/coverage-gap-analysis.js.map +1 -0
- package/dist/checks/css/dead-css-detection.d.ts +14 -0
- package/dist/checks/css/dead-css-detection.d.ts.map +1 -0
- package/dist/checks/css/dead-css-detection.js +222 -0
- package/dist/checks/css/dead-css-detection.js.map +1 -0
- package/dist/checks/css/sticky-header-validation.d.ts +19 -0
- package/dist/checks/css/sticky-header-validation.d.ts.map +1 -0
- package/dist/checks/css/sticky-header-validation.js +256 -0
- package/dist/checks/css/sticky-header-validation.js.map +1 -0
- package/dist/checks/data-integrity/cart-data-integrity.d.ts +19 -0
- package/dist/checks/data-integrity/cart-data-integrity.d.ts.map +1 -0
- package/dist/checks/data-integrity/cart-data-integrity.js +235 -0
- package/dist/checks/data-integrity/cart-data-integrity.js.map +1 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.d.ts +26 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.d.ts.map +1 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.js +94 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.js.map +1 -0
- package/dist/checks/data-integrity/notification-template-alignment.d.ts +21 -0
- package/dist/checks/data-integrity/notification-template-alignment.d.ts.map +1 -0
- package/dist/checks/data-integrity/notification-template-alignment.js +372 -0
- package/dist/checks/data-integrity/notification-template-alignment.js.map +1 -0
- package/dist/checks/data-integrity/product-data-flow-validation.d.ts +21 -0
- package/dist/checks/data-integrity/product-data-flow-validation.d.ts.map +1 -0
- package/dist/checks/data-integrity/product-data-flow-validation.js +569 -0
- package/dist/checks/data-integrity/product-data-flow-validation.js.map +1 -0
- package/dist/checks/data-integrity/store-data-integrity.d.ts +18 -0
- package/dist/checks/data-integrity/store-data-integrity.d.ts.map +1 -0
- package/dist/checks/data-integrity/store-data-integrity.js +398 -0
- package/dist/checks/data-integrity/store-data-integrity.js.map +1 -0
- package/dist/checks/data-integrity/unwired-functionality.d.ts +22 -0
- package/dist/checks/data-integrity/unwired-functionality.d.ts.map +1 -0
- package/dist/checks/data-integrity/unwired-functionality.js +550 -0
- package/dist/checks/data-integrity/unwired-functionality.js.map +1 -0
- package/dist/checks/database/block-db-push.d.ts +29 -0
- package/dist/checks/database/block-db-push.d.ts.map +1 -0
- package/dist/checks/database/block-db-push.js +138 -0
- package/dist/checks/database/block-db-push.js.map +1 -0
- package/dist/checks/database/grade-integrity.d.ts +13 -0
- package/dist/checks/database/grade-integrity.d.ts.map +1 -0
- package/dist/checks/database/grade-integrity.js +131 -0
- package/dist/checks/database/grade-integrity.js.map +1 -0
- package/dist/checks/database/migration-integrity.d.ts +26 -0
- package/dist/checks/database/migration-integrity.d.ts.map +1 -0
- package/dist/checks/database/migration-integrity.js +239 -0
- package/dist/checks/database/migration-integrity.js.map +1 -0
- package/dist/checks/database/migration-reversibility.d.ts +25 -0
- package/dist/checks/database/migration-reversibility.d.ts.map +1 -0
- package/dist/checks/database/migration-reversibility.js +277 -0
- package/dist/checks/database/migration-reversibility.js.map +1 -0
- package/dist/checks/database/migration-safety.d.ts +27 -0
- package/dist/checks/database/migration-safety.d.ts.map +1 -0
- package/dist/checks/database/migration-safety.js +243 -0
- package/dist/checks/database/migration-safety.js.map +1 -0
- package/dist/checks/database/prisma-client-db-sync.d.ts +24 -0
- package/dist/checks/database/prisma-client-db-sync.d.ts.map +1 -0
- package/dist/checks/database/prisma-client-db-sync.js +226 -0
- package/dist/checks/database/prisma-client-db-sync.js.map +1 -0
- package/dist/checks/database/prisma-drift-prevention.d.ts +29 -0
- package/dist/checks/database/prisma-drift-prevention.d.ts.map +1 -0
- package/dist/checks/database/prisma-drift-prevention.js +614 -0
- package/dist/checks/database/prisma-drift-prevention.js.map +1 -0
- package/dist/checks/database/prisma-overfetch-detection.d.ts +26 -0
- package/dist/checks/database/prisma-overfetch-detection.d.ts.map +1 -0
- package/dist/checks/database/prisma-overfetch-detection.js +666 -0
- package/dist/checks/database/prisma-overfetch-detection.js.map +1 -0
- package/dist/checks/database/prisma-precommit-guard.d.ts +25 -0
- package/dist/checks/database/prisma-precommit-guard.d.ts.map +1 -0
- package/dist/checks/database/prisma-precommit-guard.js +188 -0
- package/dist/checks/database/prisma-precommit-guard.js.map +1 -0
- package/dist/checks/database/prisma-schema-syntax.d.ts +17 -0
- package/dist/checks/database/prisma-schema-syntax.d.ts.map +1 -0
- package/dist/checks/database/prisma-schema-syntax.js +50 -0
- package/dist/checks/database/prisma-schema-syntax.js.map +1 -0
- package/dist/checks/database/prod-db-guardrail.d.ts +20 -0
- package/dist/checks/database/prod-db-guardrail.d.ts.map +1 -0
- package/dist/checks/database/prod-db-guardrail.js +184 -0
- package/dist/checks/database/prod-db-guardrail.js.map +1 -0
- package/dist/checks/database/schema-best-practices.d.ts +24 -0
- package/dist/checks/database/schema-best-practices.d.ts.map +1 -0
- package/dist/checks/database/schema-best-practices.js +393 -0
- package/dist/checks/database/schema-best-practices.js.map +1 -0
- package/dist/checks/database/schema-migration-column-sync.d.ts +33 -0
- package/dist/checks/database/schema-migration-column-sync.d.ts.map +1 -0
- package/dist/checks/database/schema-migration-column-sync.js +561 -0
- package/dist/checks/database/schema-migration-column-sync.js.map +1 -0
- package/dist/checks/database/seed-coverage-validation.d.ts +29 -0
- package/dist/checks/database/seed-coverage-validation.d.ts.map +1 -0
- package/dist/checks/database/seed-coverage-validation.js +595 -0
- package/dist/checks/database/seed-coverage-validation.js.map +1 -0
- package/dist/checks/database/soft-delete-consistency.d.ts +24 -0
- package/dist/checks/database/soft-delete-consistency.d.ts.map +1 -0
- package/dist/checks/database/soft-delete-consistency.js +273 -0
- package/dist/checks/database/soft-delete-consistency.js.map +1 -0
- package/dist/checks/database/tcg-seed-validation.d.ts +29 -0
- package/dist/checks/database/tcg-seed-validation.d.ts.map +1 -0
- package/dist/checks/database/tcg-seed-validation.js +281 -0
- package/dist/checks/database/tcg-seed-validation.js.map +1 -0
- package/dist/checks/database/transaction-integrity.d.ts +25 -0
- package/dist/checks/database/transaction-integrity.d.ts.map +1 -0
- package/dist/checks/database/transaction-integrity.js +275 -0
- package/dist/checks/database/transaction-integrity.js.map +1 -0
- package/dist/checks/database/unused-schema-detection.d.ts +28 -0
- package/dist/checks/database/unused-schema-detection.d.ts.map +1 -0
- package/dist/checks/database/unused-schema-detection.js +624 -0
- package/dist/checks/database/unused-schema-detection.js.map +1 -0
- package/dist/checks/dependencies/deprecated-packages.d.ts +17 -0
- package/dist/checks/dependencies/deprecated-packages.d.ts.map +1 -0
- package/dist/checks/dependencies/deprecated-packages.js +220 -0
- package/dist/checks/dependencies/deprecated-packages.js.map +1 -0
- package/dist/checks/dependencies/weekly-stable-updates.d.ts +27 -0
- package/dist/checks/dependencies/weekly-stable-updates.d.ts.map +1 -0
- package/dist/checks/dependencies/weekly-stable-updates.js +490 -0
- package/dist/checks/dependencies/weekly-stable-updates.js.map +1 -0
- package/dist/checks/deployment/esm-import-extensions.d.ts +23 -0
- package/dist/checks/deployment/esm-import-extensions.d.ts.map +1 -0
- package/dist/checks/deployment/esm-import-extensions.js +183 -0
- package/dist/checks/deployment/esm-import-extensions.js.map +1 -0
- package/dist/checks/deployment/pre-production-checklist-quick.d.ts +15 -0
- package/dist/checks/deployment/pre-production-checklist-quick.d.ts.map +1 -0
- package/dist/checks/deployment/pre-production-checklist-quick.js +140 -0
- package/dist/checks/deployment/pre-production-checklist-quick.js.map +1 -0
- package/dist/checks/deployment/pre-production-checklist.d.ts +18 -0
- package/dist/checks/deployment/pre-production-checklist.d.ts.map +1 -0
- package/dist/checks/deployment/pre-production-checklist.js +219 -0
- package/dist/checks/deployment/pre-production-checklist.js.map +1 -0
- package/dist/checks/deployment/production-config.d.ts +36 -0
- package/dist/checks/deployment/production-config.d.ts.map +1 -0
- package/dist/checks/deployment/production-config.js +424 -0
- package/dist/checks/deployment/production-config.js.map +1 -0
- package/dist/checks/deployment/production-env-validation.d.ts +18 -0
- package/dist/checks/deployment/production-env-validation.d.ts.map +1 -0
- package/dist/checks/deployment/production-env-validation.js +162 -0
- package/dist/checks/deployment/production-env-validation.js.map +1 -0
- package/dist/checks/deployment/rollback-compatibility.d.ts +27 -0
- package/dist/checks/deployment/rollback-compatibility.d.ts.map +1 -0
- package/dist/checks/deployment/rollback-compatibility.js +327 -0
- package/dist/checks/deployment/rollback-compatibility.js.map +1 -0
- package/dist/checks/deprecated-api-usage.d.ts +86 -0
- package/dist/checks/deprecated-api-usage.d.ts.map +1 -0
- package/dist/checks/deprecated-api-usage.js +382 -0
- package/dist/checks/deprecated-api-usage.js.map +1 -0
- package/dist/checks/drift-prevention/api-contract-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/api-contract-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/api-contract-consistency.js +279 -0
- package/dist/checks/drift-prevention/api-contract-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/breaking-change-detection.d.ts +28 -0
- package/dist/checks/drift-prevention/breaking-change-detection.d.ts.map +1 -0
- package/dist/checks/drift-prevention/breaking-change-detection.js +364 -0
- package/dist/checks/drift-prevention/breaking-change-detection.js.map +1 -0
- package/dist/checks/drift-prevention/component-prop-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/component-prop-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/component-prop-consistency.js +289 -0
- package/dist/checks/drift-prevention/component-prop-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/database-query-patterns.d.ts +19 -0
- package/dist/checks/drift-prevention/database-query-patterns.d.ts.map +1 -0
- package/dist/checks/drift-prevention/database-query-patterns.js +340 -0
- package/dist/checks/drift-prevention/database-query-patterns.js.map +1 -0
- package/dist/checks/drift-prevention/design-system-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/design-system-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/design-system-consistency.js +419 -0
- package/dist/checks/drift-prevention/design-system-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/empty-state-consistency.d.ts +17 -0
- package/dist/checks/drift-prevention/empty-state-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/empty-state-consistency.js +257 -0
- package/dist/checks/drift-prevention/empty-state-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/performance-regression-detection.d.ts +18 -0
- package/dist/checks/drift-prevention/performance-regression-detection.d.ts.map +1 -0
- package/dist/checks/drift-prevention/performance-regression-detection.js +444 -0
- package/dist/checks/drift-prevention/performance-regression-detection.js.map +1 -0
- package/dist/checks/drift-prevention/size-convention-consistency.d.ts +40 -0
- package/dist/checks/drift-prevention/size-convention-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/size-convention-consistency.js +219 -0
- package/dist/checks/drift-prevention/size-convention-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/state-management-patterns.d.ts +18 -0
- package/dist/checks/drift-prevention/state-management-patterns.d.ts.map +1 -0
- package/dist/checks/drift-prevention/state-management-patterns.js +240 -0
- package/dist/checks/drift-prevention/state-management-patterns.js.map +1 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.d.ts +21 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.js +292 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.js.map +1 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.d.ts +21 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.js +1688 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.js.map +1 -0
- package/dist/checks/e2e/e2e-interaction-regression.d.ts +19 -0
- package/dist/checks/e2e/e2e-interaction-regression.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-interaction-regression.js +1039 -0
- package/dist/checks/e2e/e2e-interaction-regression.js.map +1 -0
- package/dist/checks/e2e/e2e-outcome-validation.d.ts +33 -0
- package/dist/checks/e2e/e2e-outcome-validation.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-outcome-validation.js +610 -0
- package/dist/checks/e2e/e2e-outcome-validation.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-baseline.d.ts +14 -0
- package/dist/checks/e2e/e2e-performance-baseline.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-baseline.js +289 -0
- package/dist/checks/e2e/e2e-performance-baseline.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-patterns.d.ts +19 -0
- package/dist/checks/e2e/e2e-performance-patterns.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-patterns.js +464 -0
- package/dist/checks/e2e/e2e-performance-patterns.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-regression.d.ts +18 -0
- package/dist/checks/e2e/e2e-performance-regression.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-regression.js +230 -0
- package/dist/checks/e2e/e2e-performance-regression.js.map +1 -0
- package/dist/checks/e2e/e2e-resource-monitoring.d.ts +17 -0
- package/dist/checks/e2e/e2e-resource-monitoring.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-resource-monitoring.js +368 -0
- package/dist/checks/e2e/e2e-resource-monitoring.js.map +1 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.d.ts +27 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.js +477 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.js.map +1 -0
- package/dist/checks/e2e/playwright-config-validator.d.ts +25 -0
- package/dist/checks/e2e/playwright-config-validator.d.ts.map +1 -0
- package/dist/checks/e2e/playwright-config-validator.js +558 -0
- package/dist/checks/e2e/playwright-config-validator.js.map +1 -0
- package/dist/checks/environment/env-duplicates.d.ts +16 -0
- package/dist/checks/environment/env-duplicates.d.ts.map +1 -0
- package/dist/checks/environment/env-duplicates.js +166 -0
- package/dist/checks/environment/env-duplicates.js.map +1 -0
- package/dist/checks/event-listener-cleanup.d.ts +18 -0
- package/dist/checks/event-listener-cleanup.d.ts.map +1 -0
- package/dist/checks/event-listener-cleanup.js +187 -0
- package/dist/checks/event-listener-cleanup.js.map +1 -0
- package/dist/checks/file-naming-conventions.d.ts +21 -0
- package/dist/checks/file-naming-conventions.d.ts.map +1 -0
- package/dist/checks/file-naming-conventions.js +1258 -0
- package/dist/checks/file-naming-conventions.js.map +1 -0
- package/dist/checks/framework/framework-compatibility.d.ts +35 -0
- package/dist/checks/framework/framework-compatibility.d.ts.map +1 -0
- package/dist/checks/framework/framework-compatibility.js +159 -0
- package/dist/checks/framework/framework-compatibility.js.map +1 -0
- package/dist/checks/framework/turbopack-enforcement.d.ts +22 -0
- package/dist/checks/framework/turbopack-enforcement.d.ts.map +1 -0
- package/dist/checks/framework/turbopack-enforcement.js +171 -0
- package/dist/checks/framework/turbopack-enforcement.js.map +1 -0
- package/dist/checks/governance/check-ui-uniformity.d.ts +18 -0
- package/dist/checks/governance/check-ui-uniformity.d.ts.map +1 -0
- package/dist/checks/governance/check-ui-uniformity.js +127 -0
- package/dist/checks/governance/check-ui-uniformity.js.map +1 -0
- package/dist/checks/governance/codeowners-coverage.d.ts +26 -0
- package/dist/checks/governance/codeowners-coverage.d.ts.map +1 -0
- package/dist/checks/governance/codeowners-coverage.js +290 -0
- package/dist/checks/governance/codeowners-coverage.js.map +1 -0
- package/dist/checks/governance/naming-conventions.d.ts +7 -0
- package/dist/checks/governance/naming-conventions.d.ts.map +1 -0
- package/dist/checks/governance/naming-conventions.js +115 -0
- package/dist/checks/governance/naming-conventions.js.map +1 -0
- package/dist/checks/governance/seller-store-naming-consistency.d.ts +32 -0
- package/dist/checks/governance/seller-store-naming-consistency.d.ts.map +1 -0
- package/dist/checks/governance/seller-store-naming-consistency.js +241 -0
- package/dist/checks/governance/seller-store-naming-consistency.js.map +1 -0
- package/dist/checks/governance/store-seller-route-names.d.ts +17 -0
- package/dist/checks/governance/store-seller-route-names.d.ts.map +1 -0
- package/dist/checks/governance/store-seller-route-names.js +170 -0
- package/dist/checks/governance/store-seller-route-names.js.map +1 -0
- package/dist/checks/grading-config-usage.d.ts +23 -0
- package/dist/checks/grading-config-usage.d.ts.map +1 -0
- package/dist/checks/grading-config-usage.js +197 -0
- package/dist/checks/grading-config-usage.js.map +1 -0
- package/dist/checks/help-center-features-validation.d.ts +21 -0
- package/dist/checks/help-center-features-validation.d.ts.map +1 -0
- package/dist/checks/help-center-features-validation.js +529 -0
- package/dist/checks/help-center-features-validation.js.map +1 -0
- package/dist/checks/help-center-validation.d.ts +21 -0
- package/dist/checks/help-center-validation.d.ts.map +1 -0
- package/dist/checks/help-center-validation.js +325 -0
- package/dist/checks/help-center-validation.js.map +1 -0
- package/dist/checks/image/card-edge-protection.d.ts +33 -0
- package/dist/checks/image/card-edge-protection.d.ts.map +1 -0
- package/dist/checks/image/card-edge-protection.js +230 -0
- package/dist/checks/image/card-edge-protection.js.map +1 -0
- package/dist/checks/image/card-orientation-validation.d.ts +34 -0
- package/dist/checks/image/card-orientation-validation.d.ts.map +1 -0
- package/dist/checks/image/card-orientation-validation.js +519 -0
- package/dist/checks/image/card-orientation-validation.js.map +1 -0
- package/dist/checks/integrations/integrations-consolidated.d.ts +76 -0
- package/dist/checks/integrations/integrations-consolidated.d.ts.map +1 -0
- package/dist/checks/integrations/integrations-consolidated.js +493 -0
- package/dist/checks/integrations/integrations-consolidated.js.map +1 -0
- package/dist/checks/integrations/platform-feed-integrity.d.ts +75 -0
- package/dist/checks/integrations/platform-feed-integrity.d.ts.map +1 -0
- package/dist/checks/integrations/platform-feed-integrity.js +487 -0
- package/dist/checks/integrations/platform-feed-integrity.js.map +1 -0
- package/dist/checks/master-preflight.d.ts +56 -0
- package/dist/checks/master-preflight.d.ts.map +1 -0
- package/dist/checks/master-preflight.js +254 -0
- package/dist/checks/master-preflight.js.map +1 -0
- package/dist/checks/nextjs/dynamic-route-exports.d.ts +28 -0
- package/dist/checks/nextjs/dynamic-route-exports.d.ts.map +1 -0
- package/dist/checks/nextjs/dynamic-route-exports.js +201 -0
- package/dist/checks/nextjs/dynamic-route-exports.js.map +1 -0
- package/dist/checks/nextjs/essential-files-validation.d.ts +23 -0
- package/dist/checks/nextjs/essential-files-validation.d.ts.map +1 -0
- package/dist/checks/nextjs/essential-files-validation.js +355 -0
- package/dist/checks/nextjs/essential-files-validation.js.map +1 -0
- package/dist/checks/nextjs/ignore-build-errors.d.ts +15 -0
- package/dist/checks/nextjs/ignore-build-errors.d.ts.map +1 -0
- package/dist/checks/nextjs/ignore-build-errors.js +120 -0
- package/dist/checks/nextjs/ignore-build-errors.js.map +1 -0
- package/dist/checks/nextjs/metadata-api-placement.d.ts +29 -0
- package/dist/checks/nextjs/metadata-api-placement.d.ts.map +1 -0
- package/dist/checks/nextjs/metadata-api-placement.js +274 -0
- package/dist/checks/nextjs/metadata-api-placement.js.map +1 -0
- package/dist/checks/nextjs/nextjs-image-validation.d.ts +52 -0
- package/dist/checks/nextjs/nextjs-image-validation.d.ts.map +1 -0
- package/dist/checks/nextjs/nextjs-image-validation.js +253 -0
- package/dist/checks/nextjs/nextjs-image-validation.js.map +1 -0
- package/dist/checks/nextjs/nextjs16-compatibility.d.ts +39 -0
- package/dist/checks/nextjs/nextjs16-compatibility.d.ts.map +1 -0
- package/dist/checks/nextjs/nextjs16-compatibility.js +1208 -0
- package/dist/checks/nextjs/nextjs16-compatibility.js.map +1 -0
- package/dist/checks/nextjs/static-generation-check.d.ts +25 -0
- package/dist/checks/nextjs/static-generation-check.d.ts.map +1 -0
- package/dist/checks/nextjs/static-generation-check.js +178 -0
- package/dist/checks/nextjs/static-generation-check.js.map +1 -0
- package/dist/checks/observability/centralized-logging-validation.d.ts +22 -0
- package/dist/checks/observability/centralized-logging-validation.d.ts.map +1 -0
- package/dist/checks/observability/centralized-logging-validation.js +285 -0
- package/dist/checks/observability/centralized-logging-validation.js.map +1 -0
- package/dist/checks/order-number-consistency.d.ts +23 -0
- package/dist/checks/order-number-consistency.d.ts.map +1 -0
- package/dist/checks/order-number-consistency.js +288 -0
- package/dist/checks/order-number-consistency.js.map +1 -0
- package/dist/checks/organization/agent-steering-validation.d.ts +16 -0
- package/dist/checks/organization/agent-steering-validation.d.ts.map +1 -0
- package/dist/checks/organization/agent-steering-validation.js +186 -0
- package/dist/checks/organization/agent-steering-validation.js.map +1 -0
- package/dist/checks/organization/api-route-consolidation.d.ts +23 -0
- package/dist/checks/organization/api-route-consolidation.d.ts.map +1 -0
- package/dist/checks/organization/api-route-consolidation.js +364 -0
- package/dist/checks/organization/api-route-consolidation.js.map +1 -0
- package/dist/checks/organization/api-route-naming-validation.d.ts +23 -0
- package/dist/checks/organization/api-route-naming-validation.d.ts.map +1 -0
- package/dist/checks/organization/api-route-naming-validation.js +491 -0
- package/dist/checks/organization/api-route-naming-validation.js.map +1 -0
- package/dist/checks/organization/file-organization-validation.d.ts +18 -0
- package/dist/checks/organization/file-organization-validation.d.ts.map +1 -0
- package/dist/checks/organization/file-organization-validation.js +562 -0
- package/dist/checks/organization/file-organization-validation.js.map +1 -0
- package/dist/checks/organization/npm-script-bloat-prevention.d.ts +40 -0
- package/dist/checks/organization/npm-script-bloat-prevention.d.ts.map +1 -0
- package/dist/checks/organization/npm-script-bloat-prevention.js +412 -0
- package/dist/checks/organization/npm-script-bloat-prevention.js.map +1 -0
- package/dist/checks/organization/preflight-env-check.d.ts +12 -0
- package/dist/checks/organization/preflight-env-check.d.ts.map +1 -0
- package/dist/checks/organization/preflight-env-check.js +157 -0
- package/dist/checks/organization/preflight-env-check.js.map +1 -0
- package/dist/checks/organization/preflight-progress-consistency.d.ts +25 -0
- package/dist/checks/organization/preflight-progress-consistency.d.ts.map +1 -0
- package/dist/checks/organization/preflight-progress-consistency.js +227 -0
- package/dist/checks/organization/preflight-progress-consistency.js.map +1 -0
- package/dist/checks/organization/preflight-system-validation.d.ts +19 -0
- package/dist/checks/organization/preflight-system-validation.d.ts.map +1 -0
- package/dist/checks/organization/preflight-system-validation.js +487 -0
- package/dist/checks/organization/preflight-system-validation.js.map +1 -0
- package/dist/checks/organization/preflight-typescript-validation.d.ts +14 -0
- package/dist/checks/organization/preflight-typescript-validation.d.ts.map +1 -0
- package/dist/checks/organization/preflight-typescript-validation.js +43 -0
- package/dist/checks/organization/preflight-typescript-validation.js.map +1 -0
- package/dist/checks/organization/route-structure-validation.d.ts +18 -0
- package/dist/checks/organization/route-structure-validation.d.ts.map +1 -0
- package/dist/checks/organization/route-structure-validation.js +235 -0
- package/dist/checks/organization/route-structure-validation.js.map +1 -0
- package/dist/checks/organization/steering-bloat-prevention.d.ts +88 -0
- package/dist/checks/organization/steering-bloat-prevention.d.ts.map +1 -0
- package/dist/checks/organization/steering-bloat-prevention.js +1197 -0
- package/dist/checks/organization/steering-bloat-prevention.js.map +1 -0
- package/dist/checks/performance/bundle-optimization-drift.d.ts +18 -0
- package/dist/checks/performance/bundle-optimization-drift.d.ts.map +1 -0
- package/dist/checks/performance/bundle-optimization-drift.js +260 -0
- package/dist/checks/performance/bundle-optimization-drift.js.map +1 -0
- package/dist/checks/performance/bundle-size-regression.d.ts +14 -0
- package/dist/checks/performance/bundle-size-regression.d.ts.map +1 -0
- package/dist/checks/performance/bundle-size-regression.js +236 -0
- package/dist/checks/performance/bundle-size-regression.js.map +1 -0
- package/dist/checks/performance/core-web-vitals.d.ts +39 -0
- package/dist/checks/performance/core-web-vitals.d.ts.map +1 -0
- package/dist/checks/performance/core-web-vitals.js +445 -0
- package/dist/checks/performance/core-web-vitals.js.map +1 -0
- package/dist/checks/performance/mobile-performance-budget.d.ts +29 -0
- package/dist/checks/performance/mobile-performance-budget.d.ts.map +1 -0
- package/dist/checks/performance/mobile-performance-budget.js +415 -0
- package/dist/checks/performance/mobile-performance-budget.js.map +1 -0
- package/dist/checks/performance/runtime-regression.d.ts +17 -0
- package/dist/checks/performance/runtime-regression.d.ts.map +1 -0
- package/dist/checks/performance/runtime-regression.js +425 -0
- package/dist/checks/performance/runtime-regression.js.map +1 -0
- package/dist/checks/performance/unused-preload-detection.d.ts +17 -0
- package/dist/checks/performance/unused-preload-detection.d.ts.map +1 -0
- package/dist/checks/performance/unused-preload-detection.js +185 -0
- package/dist/checks/performance/unused-preload-detection.js.map +1 -0
- package/dist/checks/prisma/prisma7-compatibility.d.ts +29 -0
- package/dist/checks/prisma/prisma7-compatibility.d.ts.map +1 -0
- package/dist/checks/prisma/prisma7-compatibility.js +440 -0
- package/dist/checks/prisma/prisma7-compatibility.js.map +1 -0
- package/dist/checks/quality/component-size.d.ts +13 -0
- package/dist/checks/quality/component-size.d.ts.map +1 -0
- package/dist/checks/quality/component-size.js +104 -0
- package/dist/checks/quality/component-size.js.map +1 -0
- package/dist/checks/quality/critical-type-imports.d.ts +23 -0
- package/dist/checks/quality/critical-type-imports.d.ts.map +1 -0
- package/dist/checks/quality/critical-type-imports.js +632 -0
- package/dist/checks/quality/critical-type-imports.js.map +1 -0
- package/dist/checks/quality/development.d.ts +13 -0
- package/dist/checks/quality/development.d.ts.map +1 -0
- package/dist/checks/quality/development.js +98 -0
- package/dist/checks/quality/development.js.map +1 -0
- package/dist/checks/quality/docs-code-sync.d.ts +27 -0
- package/dist/checks/quality/docs-code-sync.d.ts.map +1 -0
- package/dist/checks/quality/docs-code-sync.js +368 -0
- package/dist/checks/quality/docs-code-sync.js.map +1 -0
- package/dist/checks/quality/duplicate-jsx-attributes.d.ts +23 -0
- package/dist/checks/quality/duplicate-jsx-attributes.d.ts.map +1 -0
- package/dist/checks/quality/duplicate-jsx-attributes.js +201 -0
- package/dist/checks/quality/duplicate-jsx-attributes.js.map +1 -0
- package/dist/checks/quality/file-size.d.ts +13 -0
- package/dist/checks/quality/file-size.d.ts.map +1 -0
- package/dist/checks/quality/file-size.js +97 -0
- package/dist/checks/quality/file-size.js.map +1 -0
- package/dist/checks/quality/file-validation.d.ts +13 -0
- package/dist/checks/quality/file-validation.d.ts.map +1 -0
- package/dist/checks/quality/file-validation.js +103 -0
- package/dist/checks/quality/file-validation.js.map +1 -0
- package/dist/checks/quality/i18n-hardcoded-strings.d.ts +28 -0
- package/dist/checks/quality/i18n-hardcoded-strings.d.ts.map +1 -0
- package/dist/checks/quality/i18n-hardcoded-strings.js +336 -0
- package/dist/checks/quality/i18n-hardcoded-strings.js.map +1 -0
- package/dist/checks/quality/lint-preflight.d.ts +70 -0
- package/dist/checks/quality/lint-preflight.d.ts.map +1 -0
- package/dist/checks/quality/lint-preflight.js +477 -0
- package/dist/checks/quality/lint-preflight.js.map +1 -0
- package/dist/checks/quality/react-namespace-import.d.ts +27 -0
- package/dist/checks/quality/react-namespace-import.d.ts.map +1 -0
- package/dist/checks/quality/react-namespace-import.js +212 -0
- package/dist/checks/quality/react-namespace-import.js.map +1 -0
- package/dist/checks/quality/strict-lint.d.ts +13 -0
- package/dist/checks/quality/strict-lint.d.ts.map +1 -0
- package/dist/checks/quality/strict-lint.js +41 -0
- package/dist/checks/quality/strict-lint.js.map +1 -0
- package/dist/checks/quality/syntax.d.ts +13 -0
- package/dist/checks/quality/syntax.d.ts.map +1 -0
- package/dist/checks/quality/syntax.js +94 -0
- package/dist/checks/quality/syntax.js.map +1 -0
- package/dist/checks/quality/unused-imports.d.ts +14 -0
- package/dist/checks/quality/unused-imports.d.ts.map +1 -0
- package/dist/checks/quality/unused-imports.js +172 -0
- package/dist/checks/quality/unused-imports.js.map +1 -0
- package/dist/checks/react/component-best-practices.d.ts +23 -0
- package/dist/checks/react/component-best-practices.d.ts.map +1 -0
- package/dist/checks/react/component-best-practices.js +273 -0
- package/dist/checks/react/component-best-practices.js.map +1 -0
- package/dist/checks/react/error-boundary-coverage.d.ts +26 -0
- package/dist/checks/react/error-boundary-coverage.d.ts.map +1 -0
- package/dist/checks/react/error-boundary-coverage.js +304 -0
- package/dist/checks/react/error-boundary-coverage.js.map +1 -0
- package/dist/checks/react/memory-leak-detection.d.ts +22 -0
- package/dist/checks/react/memory-leak-detection.d.ts.map +1 -0
- package/dist/checks/react/memory-leak-detection.js +268 -0
- package/dist/checks/react/memory-leak-detection.js.map +1 -0
- package/dist/checks/react/memory-leak-patterns.d.ts +27 -0
- package/dist/checks/react/memory-leak-patterns.d.ts.map +1 -0
- package/dist/checks/react/memory-leak-patterns.js +324 -0
- package/dist/checks/react/memory-leak-patterns.js.map +1 -0
- package/dist/checks/react/react19-compatibility.d.ts +14 -0
- package/dist/checks/react/react19-compatibility.d.ts.map +1 -0
- package/dist/checks/react/react19-compatibility.js +433 -0
- package/dist/checks/react/react19-compatibility.js.map +1 -0
- package/dist/checks/react/useeffect-loop-detector.d.ts +25 -0
- package/dist/checks/react/useeffect-loop-detector.d.ts.map +1 -0
- package/dist/checks/react/useeffect-loop-detector.js +216 -0
- package/dist/checks/react/useeffect-loop-detector.js.map +1 -0
- package/dist/checks/runtime/client-process-env-usage.d.ts +28 -0
- package/dist/checks/runtime/client-process-env-usage.d.ts.map +1 -0
- package/dist/checks/runtime/client-process-env-usage.js +190 -0
- package/dist/checks/runtime/client-process-env-usage.js.map +1 -0
- package/dist/checks/runtime/client-runtime-errors.d.ts +34 -0
- package/dist/checks/runtime/client-runtime-errors.d.ts.map +1 -0
- package/dist/checks/runtime/client-runtime-errors.js +308 -0
- package/dist/checks/runtime/client-runtime-errors.js.map +1 -0
- package/dist/checks/runtime/dev-error-monitoring-system.d.ts +22 -0
- package/dist/checks/runtime/dev-error-monitoring-system.d.ts.map +1 -0
- package/dist/checks/runtime/dev-error-monitoring-system.js +209 -0
- package/dist/checks/runtime/dev-error-monitoring-system.js.map +1 -0
- package/dist/checks/runtime/gtm-installation.d.ts +21 -0
- package/dist/checks/runtime/gtm-installation.d.ts.map +1 -0
- package/dist/checks/runtime/gtm-installation.js +341 -0
- package/dist/checks/runtime/gtm-installation.js.map +1 -0
- package/dist/checks/runtime/json-parse-safety.d.ts +22 -0
- package/dist/checks/runtime/json-parse-safety.d.ts.map +1 -0
- package/dist/checks/runtime/json-parse-safety.js +179 -0
- package/dist/checks/runtime/json-parse-safety.js.map +1 -0
- package/dist/checks/runtime/missing-public-env-import.d.ts +26 -0
- package/dist/checks/runtime/missing-public-env-import.d.ts.map +1 -0
- package/dist/checks/runtime/missing-public-env-import.js +175 -0
- package/dist/checks/runtime/missing-public-env-import.js.map +1 -0
- package/dist/checks/runtime/node-deprecations.d.ts +22 -0
- package/dist/checks/runtime/node-deprecations.d.ts.map +1 -0
- package/dist/checks/runtime/node-deprecations.js +157 -0
- package/dist/checks/runtime/node-deprecations.js.map +1 -0
- package/dist/checks/runtime/node25-compatibility.d.ts +28 -0
- package/dist/checks/runtime/node25-compatibility.d.ts.map +1 -0
- package/dist/checks/runtime/node25-compatibility.js +200 -0
- package/dist/checks/runtime/node25-compatibility.js.map +1 -0
- package/dist/checks/runtime/process-stdio-usage.d.ts +26 -0
- package/dist/checks/runtime/process-stdio-usage.d.ts.map +1 -0
- package/dist/checks/runtime/process-stdio-usage.js +179 -0
- package/dist/checks/runtime/process-stdio-usage.js.map +1 -0
- package/dist/checks/runtime/server-client-decimal.d.ts +25 -0
- package/dist/checks/runtime/server-client-decimal.d.ts.map +1 -0
- package/dist/checks/runtime/server-client-decimal.js +243 -0
- package/dist/checks/runtime/server-client-decimal.js.map +1 -0
- package/dist/checks/security/csrf-protection.d.ts +20 -0
- package/dist/checks/security/csrf-protection.d.ts.map +1 -0
- package/dist/checks/security/csrf-protection.js +249 -0
- package/dist/checks/security/csrf-protection.js.map +1 -0
- package/dist/checks/security/dependency-audit.d.ts +25 -0
- package/dist/checks/security/dependency-audit.d.ts.map +1 -0
- package/dist/checks/security/dependency-audit.js +219 -0
- package/dist/checks/security/dependency-audit.js.map +1 -0
- package/dist/checks/security/env-value-leakage.d.ts +21 -0
- package/dist/checks/security/env-value-leakage.d.ts.map +1 -0
- package/dist/checks/security/env-value-leakage.js +285 -0
- package/dist/checks/security/env-value-leakage.js.map +1 -0
- package/dist/checks/security/no-tracked-env-files.d.ts +18 -0
- package/dist/checks/security/no-tracked-env-files.d.ts.map +1 -0
- package/dist/checks/security/no-tracked-env-files.js +247 -0
- package/dist/checks/security/no-tracked-env-files.js.map +1 -0
- package/dist/checks/security/open-redirect-prevention.d.ts +19 -0
- package/dist/checks/security/open-redirect-prevention.d.ts.map +1 -0
- package/dist/checks/security/open-redirect-prevention.js +238 -0
- package/dist/checks/security/open-redirect-prevention.js.map +1 -0
- package/dist/checks/security/path-traversal-prevention.d.ts +25 -0
- package/dist/checks/security/path-traversal-prevention.d.ts.map +1 -0
- package/dist/checks/security/path-traversal-prevention.js +246 -0
- package/dist/checks/security/path-traversal-prevention.js.map +1 -0
- package/dist/checks/security/permission-security-validation.d.ts +19 -0
- package/dist/checks/security/permission-security-validation.d.ts.map +1 -0
- package/dist/checks/security/permission-security-validation.js +319 -0
- package/dist/checks/security/permission-security-validation.js.map +1 -0
- package/dist/checks/security/prod-command-detection.d.ts +17 -0
- package/dist/checks/security/prod-command-detection.d.ts.map +1 -0
- package/dist/checks/security/prod-command-detection.js +222 -0
- package/dist/checks/security/prod-command-detection.js.map +1 -0
- package/dist/checks/security/rate-limiting-validation.d.ts +19 -0
- package/dist/checks/security/rate-limiting-validation.d.ts.map +1 -0
- package/dist/checks/security/rate-limiting-validation.js +260 -0
- package/dist/checks/security/rate-limiting-validation.js.map +1 -0
- package/dist/checks/security/security-sla-enforcement.d.ts +34 -0
- package/dist/checks/security/security-sla-enforcement.d.ts.map +1 -0
- package/dist/checks/security/security-sla-enforcement.js +349 -0
- package/dist/checks/security/security-sla-enforcement.js.map +1 -0
- package/dist/checks/security/sensitive-data-exposure.d.ts +36 -0
- package/dist/checks/security/sensitive-data-exposure.d.ts.map +1 -0
- package/dist/checks/security/sensitive-data-exposure.js +540 -0
- package/dist/checks/security/sensitive-data-exposure.js.map +1 -0
- package/dist/checks/security/sql-injection-prevention.d.ts +25 -0
- package/dist/checks/security/sql-injection-prevention.d.ts.map +1 -0
- package/dist/checks/security/sql-injection-prevention.js +216 -0
- package/dist/checks/security/sql-injection-prevention.js.map +1 -0
- package/dist/checks/security/turnstile-scope-validation.d.ts +21 -0
- package/dist/checks/security/turnstile-scope-validation.d.ts.map +1 -0
- package/dist/checks/security/turnstile-scope-validation.js +237 -0
- package/dist/checks/security/turnstile-scope-validation.js.map +1 -0
- package/dist/checks/security/unvalidated-route-params.d.ts +28 -0
- package/dist/checks/security/unvalidated-route-params.d.ts.map +1 -0
- package/dist/checks/security/unvalidated-route-params.js +246 -0
- package/dist/checks/security/unvalidated-route-params.js.map +1 -0
- package/dist/checks/security/webhook-security-validation.d.ts +19 -0
- package/dist/checks/security/webhook-security-validation.d.ts.map +1 -0
- package/dist/checks/security/webhook-security-validation.js +258 -0
- package/dist/checks/security/webhook-security-validation.js.map +1 -0
- package/dist/checks/seo/missing-metadata.d.ts +26 -0
- package/dist/checks/seo/missing-metadata.d.ts.map +1 -0
- package/dist/checks/seo/missing-metadata.js +189 -0
- package/dist/checks/seo/missing-metadata.js.map +1 -0
- package/dist/checks/storage-keys-validation.d.ts +25 -0
- package/dist/checks/storage-keys-validation.d.ts.map +1 -0
- package/dist/checks/storage-keys-validation.js +312 -0
- package/dist/checks/storage-keys-validation.js.map +1 -0
- package/dist/checks/store-order-numbers.d.ts +19 -0
- package/dist/checks/store-order-numbers.d.ts.map +1 -0
- package/dist/checks/store-order-numbers.js +238 -0
- package/dist/checks/store-order-numbers.js.map +1 -0
- package/dist/checks/system/analyze-consolidation-candidates.d.ts +17 -0
- package/dist/checks/system/analyze-consolidation-candidates.d.ts.map +1 -0
- package/dist/checks/system/analyze-consolidation-candidates.js +221 -0
- package/dist/checks/system/analyze-consolidation-candidates.js.map +1 -0
- package/dist/checks/system/apply-universal-progress.d.ts +15 -0
- package/dist/checks/system/apply-universal-progress.d.ts.map +1 -0
- package/dist/checks/system/apply-universal-progress.js +292 -0
- package/dist/checks/system/apply-universal-progress.js.map +1 -0
- package/dist/checks/system/broken-preflight-detection.d.ts +30 -0
- package/dist/checks/system/broken-preflight-detection.d.ts.map +1 -0
- package/dist/checks/system/broken-preflight-detection.js +565 -0
- package/dist/checks/system/broken-preflight-detection.js.map +1 -0
- package/dist/checks/system/find-orphaned-preflights.d.ts +19 -0
- package/dist/checks/system/find-orphaned-preflights.d.ts.map +1 -0
- package/dist/checks/system/find-orphaned-preflights.js +157 -0
- package/dist/checks/system/find-orphaned-preflights.js.map +1 -0
- package/dist/checks/system/lint-preflight-consistency.d.ts +25 -0
- package/dist/checks/system/lint-preflight-consistency.d.ts.map +1 -0
- package/dist/checks/system/lint-preflight-consistency.js +374 -0
- package/dist/checks/system/lint-preflight-consistency.js.map +1 -0
- package/dist/checks/system/orphaned-scripts-detection.d.ts +24 -0
- package/dist/checks/system/orphaned-scripts-detection.d.ts.map +1 -0
- package/dist/checks/system/orphaned-scripts-detection.js +335 -0
- package/dist/checks/system/orphaned-scripts-detection.js.map +1 -0
- package/dist/checks/system/preflight-command-validation.d.ts +32 -0
- package/dist/checks/system/preflight-command-validation.d.ts.map +1 -0
- package/dist/checks/system/preflight-command-validation.js +631 -0
- package/dist/checks/system/preflight-command-validation.js.map +1 -0
- package/dist/checks/system/preflight-concurrency-support.d.ts +18 -0
- package/dist/checks/system/preflight-concurrency-support.d.ts.map +1 -0
- package/dist/checks/system/preflight-concurrency-support.js +207 -0
- package/dist/checks/system/preflight-concurrency-support.js.map +1 -0
- package/dist/checks/system/preflight-consolidation-safety.d.ts +16 -0
- package/dist/checks/system/preflight-consolidation-safety.d.ts.map +1 -0
- package/dist/checks/system/preflight-consolidation-safety.js +250 -0
- package/dist/checks/system/preflight-consolidation-safety.js.map +1 -0
- package/dist/checks/system/preflight-coverage-map.d.ts +26 -0
- package/dist/checks/system/preflight-coverage-map.d.ts.map +1 -0
- package/dist/checks/system/preflight-coverage-map.js +295 -0
- package/dist/checks/system/preflight-coverage-map.js.map +1 -0
- package/dist/checks/system/preflight-drift-detector.d.ts +28 -0
- package/dist/checks/system/preflight-drift-detector.d.ts.map +1 -0
- package/dist/checks/system/preflight-drift-detector.js +380 -0
- package/dist/checks/system/preflight-drift-detector.js.map +1 -0
- package/dist/checks/system/preflight-env-var-documentation.d.ts +25 -0
- package/dist/checks/system/preflight-env-var-documentation.d.ts.map +1 -0
- package/dist/checks/system/preflight-env-var-documentation.js +333 -0
- package/dist/checks/system/preflight-env-var-documentation.js.map +1 -0
- package/dist/checks/system/preflight-exit-code-validator.d.ts +30 -0
- package/dist/checks/system/preflight-exit-code-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-exit-code-validator.js +298 -0
- package/dist/checks/system/preflight-exit-code-validator.js.map +1 -0
- package/dist/checks/system/preflight-false-positive-tracker.d.ts +25 -0
- package/dist/checks/system/preflight-false-positive-tracker.d.ts.map +1 -0
- package/dist/checks/system/preflight-false-positive-tracker.js +262 -0
- package/dist/checks/system/preflight-false-positive-tracker.js.map +1 -0
- package/dist/checks/system/preflight-metadata-validator.d.ts +28 -0
- package/dist/checks/system/preflight-metadata-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-metadata-validator.js +220 -0
- package/dist/checks/system/preflight-metadata-validator.js.map +1 -0
- package/dist/checks/system/preflight-organization.d.ts +15 -0
- package/dist/checks/system/preflight-organization.d.ts.map +1 -0
- package/dist/checks/system/preflight-organization.js +212 -0
- package/dist/checks/system/preflight-organization.js.map +1 -0
- package/dist/checks/system/preflight-performance-optimizer.d.ts +17 -0
- package/dist/checks/system/preflight-performance-optimizer.d.ts.map +1 -0
- package/dist/checks/system/preflight-performance-optimizer.js +375 -0
- package/dist/checks/system/preflight-performance-optimizer.js.map +1 -0
- package/dist/checks/system/preflight-redundancy-detection.d.ts +28 -0
- package/dist/checks/system/preflight-redundancy-detection.d.ts.map +1 -0
- package/dist/checks/system/preflight-redundancy-detection.js +1168 -0
- package/dist/checks/system/preflight-redundancy-detection.js.map +1 -0
- package/dist/checks/system/preflight-reporting-standards.d.ts +17 -0
- package/dist/checks/system/preflight-reporting-standards.d.ts.map +1 -0
- package/dist/checks/system/preflight-reporting-standards.js +315 -0
- package/dist/checks/system/preflight-reporting-standards.js.map +1 -0
- package/dist/checks/system/preflight-runtime-health.d.ts +29 -0
- package/dist/checks/system/preflight-runtime-health.d.ts.map +1 -0
- package/dist/checks/system/preflight-runtime-health.js +346 -0
- package/dist/checks/system/preflight-runtime-health.js.map +1 -0
- package/dist/checks/system/preflight-schema-validator.d.ts +23 -0
- package/dist/checks/system/preflight-schema-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-schema-validator.js +322 -0
- package/dist/checks/system/preflight-schema-validator.js.map +1 -0
- package/dist/checks/system/preflight-test-coverage.d.ts +24 -0
- package/dist/checks/system/preflight-test-coverage.d.ts.map +1 -0
- package/dist/checks/system/preflight-test-coverage.js +242 -0
- package/dist/checks/system/preflight-test-coverage.js.map +1 -0
- package/dist/checks/system/script-path-validation.d.ts +30 -0
- package/dist/checks/system/script-path-validation.d.ts.map +1 -0
- package/dist/checks/system/script-path-validation.js +351 -0
- package/dist/checks/system/script-path-validation.js.map +1 -0
- package/dist/checks/system/stale-preflight-detection.d.ts +15 -0
- package/dist/checks/system/stale-preflight-detection.d.ts.map +1 -0
- package/dist/checks/system/stale-preflight-detection.js +200 -0
- package/dist/checks/system/stale-preflight-detection.js.map +1 -0
- package/dist/checks/system/universal-progress-reporter.d.ts +92 -0
- package/dist/checks/system/universal-progress-reporter.d.ts.map +1 -0
- package/dist/checks/system/universal-progress-reporter.js +272 -0
- package/dist/checks/system/universal-progress-reporter.js.map +1 -0
- package/dist/checks/tailwind/tailwind4-compatibility.d.ts +31 -0
- package/dist/checks/tailwind/tailwind4-compatibility.d.ts.map +1 -0
- package/dist/checks/tailwind/tailwind4-compatibility.js +490 -0
- package/dist/checks/tailwind/tailwind4-compatibility.js.map +1 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.d.ts +31 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.d.ts.map +1 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.js +434 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.js.map +1 -0
- package/dist/checks/ui/accessibility-critical.d.ts +18 -0
- package/dist/checks/ui/accessibility-critical.d.ts.map +1 -0
- package/dist/checks/ui/accessibility-critical.js +357 -0
- package/dist/checks/ui/accessibility-critical.js.map +1 -0
- package/dist/checks/ui/alert-button-gap.d.ts +26 -0
- package/dist/checks/ui/alert-button-gap.d.ts.map +1 -0
- package/dist/checks/ui/alert-button-gap.js +215 -0
- package/dist/checks/ui/alert-button-gap.js.map +1 -0
- package/dist/checks/ui/breadcrumb-consistency.d.ts +18 -0
- package/dist/checks/ui/breadcrumb-consistency.d.ts.map +1 -0
- package/dist/checks/ui/breadcrumb-consistency.js +237 -0
- package/dist/checks/ui/breadcrumb-consistency.js.map +1 -0
- package/dist/checks/ui/button-group-gap.d.ts +22 -0
- package/dist/checks/ui/button-group-gap.d.ts.map +1 -0
- package/dist/checks/ui/button-group-gap.js +194 -0
- package/dist/checks/ui/button-group-gap.js.map +1 -0
- package/dist/checks/ui/button-icon-prop.d.ts +40 -0
- package/dist/checks/ui/button-icon-prop.d.ts.map +1 -0
- package/dist/checks/ui/button-icon-prop.js +248 -0
- package/dist/checks/ui/button-icon-prop.js.map +1 -0
- package/dist/checks/ui/card-section-content-spacing.d.ts +31 -0
- package/dist/checks/ui/card-section-content-spacing.d.ts.map +1 -0
- package/dist/checks/ui/card-section-content-spacing.js +260 -0
- package/dist/checks/ui/card-section-content-spacing.js.map +1 -0
- package/dist/checks/ui/color-check.d.ts +7 -0
- package/dist/checks/ui/color-check.d.ts.map +1 -0
- package/dist/checks/ui/color-check.js +105 -0
- package/dist/checks/ui/color-check.js.map +1 -0
- package/dist/checks/ui/component-library-quality.d.ts +19 -0
- package/dist/checks/ui/component-library-quality.d.ts.map +1 -0
- package/dist/checks/ui/component-library-quality.js +231 -0
- package/dist/checks/ui/component-library-quality.js.map +1 -0
- package/dist/checks/ui/component-prop-validation.d.ts +22 -0
- package/dist/checks/ui/component-prop-validation.d.ts.map +1 -0
- package/dist/checks/ui/component-prop-validation.js +271 -0
- package/dist/checks/ui/component-prop-validation.js.map +1 -0
- package/dist/checks/ui/console-log-check.d.ts +7 -0
- package/dist/checks/ui/console-log-check.d.ts.map +1 -0
- package/dist/checks/ui/console-log-check.js +126 -0
- package/dist/checks/ui/console-log-check.js.map +1 -0
- package/dist/checks/ui/css-grid-gap-check.d.ts +24 -0
- package/dist/checks/ui/css-grid-gap-check.d.ts.map +1 -0
- package/dist/checks/ui/css-grid-gap-check.js +314 -0
- package/dist/checks/ui/css-grid-gap-check.js.map +1 -0
- package/dist/checks/ui/css-token-syntax.d.ts +22 -0
- package/dist/checks/ui/css-token-syntax.d.ts.map +1 -0
- package/dist/checks/ui/css-token-syntax.js +386 -0
- package/dist/checks/ui/css-token-syntax.js.map +1 -0
- package/dist/checks/ui/dark-mode-support.d.ts +95 -0
- package/dist/checks/ui/dark-mode-support.d.ts.map +1 -0
- package/dist/checks/ui/dark-mode-support.js +702 -0
- package/dist/checks/ui/dark-mode-support.js.map +1 -0
- package/dist/checks/ui/dashboard-section-patterns.d.ts +85 -0
- package/dist/checks/ui/dashboard-section-patterns.d.ts.map +1 -0
- package/dist/checks/ui/dashboard-section-patterns.js +1751 -0
- package/dist/checks/ui/dashboard-section-patterns.js.map +1 -0
- package/dist/checks/ui/dashboard-ui.d.ts +28 -0
- package/dist/checks/ui/dashboard-ui.d.ts.map +1 -0
- package/dist/checks/ui/dashboard-ui.js +503 -0
- package/dist/checks/ui/dashboard-ui.js.map +1 -0
- package/dist/checks/ui/dead-action-detector.d.ts +24 -0
- package/dist/checks/ui/dead-action-detector.d.ts.map +1 -0
- package/dist/checks/ui/dead-action-detector.js +457 -0
- package/dist/checks/ui/dead-action-detector.js.map +1 -0
- package/dist/checks/ui/doubled-padding-check.d.ts +21 -0
- package/dist/checks/ui/doubled-padding-check.d.ts.map +1 -0
- package/dist/checks/ui/doubled-padding-check.js +233 -0
- package/dist/checks/ui/doubled-padding-check.js.map +1 -0
- package/dist/checks/ui/dropdown-positioning-check.d.ts +26 -0
- package/dist/checks/ui/dropdown-positioning-check.d.ts.map +1 -0
- package/dist/checks/ui/dropdown-positioning-check.js +283 -0
- package/dist/checks/ui/dropdown-positioning-check.js.map +1 -0
- package/dist/checks/ui/feature-page-hero-consistency.d.ts +29 -0
- package/dist/checks/ui/feature-page-hero-consistency.d.ts.map +1 -0
- package/dist/checks/ui/feature-page-hero-consistency.js +228 -0
- package/dist/checks/ui/feature-page-hero-consistency.js.map +1 -0
- package/dist/checks/ui/filter-loading-states.d.ts +19 -0
- package/dist/checks/ui/filter-loading-states.d.ts.map +1 -0
- package/dist/checks/ui/filter-loading-states.js +193 -0
- package/dist/checks/ui/filter-loading-states.js.map +1 -0
- package/dist/checks/ui/flex-icon-text-gap.d.ts +30 -0
- package/dist/checks/ui/flex-icon-text-gap.d.ts.map +1 -0
- package/dist/checks/ui/flex-icon-text-gap.js +371 -0
- package/dist/checks/ui/flex-icon-text-gap.js.map +1 -0
- package/dist/checks/ui/form-control-layout-check.d.ts +30 -0
- package/dist/checks/ui/form-control-layout-check.d.ts.map +1 -0
- package/dist/checks/ui/form-control-layout-check.js +287 -0
- package/dist/checks/ui/form-control-layout-check.js.map +1 -0
- package/dist/checks/ui/form-field-consistency.d.ts +29 -0
- package/dist/checks/ui/form-field-consistency.d.ts.map +1 -0
- package/dist/checks/ui/form-field-consistency.js +270 -0
- package/dist/checks/ui/form-field-consistency.js.map +1 -0
- package/dist/checks/ui/gap-spacing-consistency.d.ts +35 -0
- package/dist/checks/ui/gap-spacing-consistency.d.ts.map +1 -0
- package/dist/checks/ui/gap-spacing-consistency.js +316 -0
- package/dist/checks/ui/gap-spacing-consistency.js.map +1 -0
- package/dist/checks/ui/header-action-text-color.d.ts +19 -0
- package/dist/checks/ui/header-action-text-color.d.ts.map +1 -0
- package/dist/checks/ui/header-action-text-color.js +122 -0
- package/dist/checks/ui/header-action-text-color.js.map +1 -0
- package/dist/checks/ui/header-vertical-alignment.d.ts +33 -0
- package/dist/checks/ui/header-vertical-alignment.d.ts.map +1 -0
- package/dist/checks/ui/header-vertical-alignment.js +205 -0
- package/dist/checks/ui/header-vertical-alignment.js.map +1 -0
- package/dist/checks/ui/image-component-check.d.ts +7 -0
- package/dist/checks/ui/image-component-check.d.ts.map +1 -0
- package/dist/checks/ui/image-component-check.js +92 -0
- package/dist/checks/ui/image-component-check.js.map +1 -0
- package/dist/checks/ui/inline-flex-gap-check.d.ts +26 -0
- package/dist/checks/ui/inline-flex-gap-check.d.ts.map +1 -0
- package/dist/checks/ui/inline-flex-gap-check.js +196 -0
- package/dist/checks/ui/inline-flex-gap-check.js.map +1 -0
- package/dist/checks/ui/inline-to-tailwind-check.d.ts +47 -0
- package/dist/checks/ui/inline-to-tailwind-check.d.ts.map +1 -0
- package/dist/checks/ui/inline-to-tailwind-check.js +329 -0
- package/dist/checks/ui/inline-to-tailwind-check.js.map +1 -0
- package/dist/checks/ui/input-label-gap.d.ts +34 -0
- package/dist/checks/ui/input-label-gap.d.ts.map +1 -0
- package/dist/checks/ui/input-label-gap.js +347 -0
- package/dist/checks/ui/input-label-gap.js.map +1 -0
- package/dist/checks/ui/input-width-consistency.d.ts +53 -0
- package/dist/checks/ui/input-width-consistency.d.ts.map +1 -0
- package/dist/checks/ui/input-width-consistency.js +342 -0
- package/dist/checks/ui/input-width-consistency.js.map +1 -0
- package/dist/checks/ui/js-responsive-visibility.d.ts +31 -0
- package/dist/checks/ui/js-responsive-visibility.d.ts.map +1 -0
- package/dist/checks/ui/js-responsive-visibility.js +213 -0
- package/dist/checks/ui/js-responsive-visibility.js.map +1 -0
- package/dist/checks/ui/label-description-spacing.d.ts +30 -0
- package/dist/checks/ui/label-description-spacing.d.ts.map +1 -0
- package/dist/checks/ui/label-description-spacing.js +285 -0
- package/dist/checks/ui/label-description-spacing.js.map +1 -0
- package/dist/checks/ui/layout-shift-detection.d.ts +31 -0
- package/dist/checks/ui/layout-shift-detection.d.ts.map +1 -0
- package/dist/checks/ui/layout-shift-detection.js +398 -0
- package/dist/checks/ui/layout-shift-detection.js.map +1 -0
- package/dist/checks/ui/margin-in-gap-container.d.ts +25 -0
- package/dist/checks/ui/margin-in-gap-container.d.ts.map +1 -0
- package/dist/checks/ui/margin-in-gap-container.js +619 -0
- package/dist/checks/ui/margin-in-gap-container.js.map +1 -0
- package/dist/checks/ui/mega-menu-dropdown-position.d.ts +25 -0
- package/dist/checks/ui/mega-menu-dropdown-position.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-dropdown-position.js +230 -0
- package/dist/checks/ui/mega-menu-dropdown-position.js.map +1 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.d.ts +24 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.js +283 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.js.map +1 -0
- package/dist/checks/ui/mega-menu-spacing-check.d.ts +21 -0
- package/dist/checks/ui/mega-menu-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-spacing-check.js +244 -0
- package/dist/checks/ui/mega-menu-spacing-check.js.map +1 -0
- package/dist/checks/ui/notification-feedback-check.d.ts +37 -0
- package/dist/checks/ui/notification-feedback-check.d.ts.map +1 -0
- package/dist/checks/ui/notification-feedback-check.js +552 -0
- package/dist/checks/ui/notification-feedback-check.js.map +1 -0
- package/dist/checks/ui/overflow-clipping-detection.d.ts +17 -0
- package/dist/checks/ui/overflow-clipping-detection.d.ts.map +1 -0
- package/dist/checks/ui/overflow-clipping-detection.js +198 -0
- package/dist/checks/ui/overflow-clipping-detection.js.map +1 -0
- package/dist/checks/ui/page-layout-spacing.d.ts +29 -0
- package/dist/checks/ui/page-layout-spacing.d.ts.map +1 -0
- package/dist/checks/ui/page-layout-spacing.js +604 -0
- package/dist/checks/ui/page-layout-spacing.js.map +1 -0
- package/dist/checks/ui/path-alias-check.d.ts +7 -0
- package/dist/checks/ui/path-alias-check.d.ts.map +1 -0
- package/dist/checks/ui/path-alias-check.js +95 -0
- package/dist/checks/ui/path-alias-check.js.map +1 -0
- package/dist/checks/ui/product-image-animations.d.ts +70 -0
- package/dist/checks/ui/product-image-animations.d.ts.map +1 -0
- package/dist/checks/ui/product-image-animations.js +332 -0
- package/dist/checks/ui/product-image-animations.js.map +1 -0
- package/dist/checks/ui/search-width-consistency.d.ts +53 -0
- package/dist/checks/ui/search-width-consistency.d.ts.map +1 -0
- package/dist/checks/ui/search-width-consistency.js +276 -0
- package/dist/checks/ui/search-width-consistency.js.map +1 -0
- package/dist/checks/ui/section-spacing-check.d.ts +30 -0
- package/dist/checks/ui/section-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/section-spacing-check.js +248 -0
- package/dist/checks/ui/section-spacing-check.js.map +1 -0
- package/dist/checks/ui/sibling-spacing-check.d.ts +25 -0
- package/dist/checks/ui/sibling-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/sibling-spacing-check.js +329 -0
- package/dist/checks/ui/sibling-spacing-check.js.map +1 -0
- package/dist/checks/ui/sidebar-layout-gap.d.ts +34 -0
- package/dist/checks/ui/sidebar-layout-gap.d.ts.map +1 -0
- package/dist/checks/ui/sidebar-layout-gap.js +200 -0
- package/dist/checks/ui/sidebar-layout-gap.js.map +1 -0
- package/dist/checks/ui/skeleton-size-consistency.d.ts +50 -0
- package/dist/checks/ui/skeleton-size-consistency.d.ts.map +1 -0
- package/dist/checks/ui/skeleton-size-consistency.js +1239 -0
- package/dist/checks/ui/skeleton-size-consistency.js.map +1 -0
- package/dist/checks/ui/spacing-check.d.ts +7 -0
- package/dist/checks/ui/spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/spacing-check.js +100 -0
- package/dist/checks/ui/spacing-check.js.map +1 -0
- package/dist/checks/ui/styling-standards.d.ts +71 -0
- package/dist/checks/ui/styling-standards.d.ts.map +1 -0
- package/dist/checks/ui/styling-standards.js +567 -0
- package/dist/checks/ui/styling-standards.js.map +1 -0
- package/dist/checks/ui/tailwind-consistency.d.ts +26 -0
- package/dist/checks/ui/tailwind-consistency.d.ts.map +1 -0
- package/dist/checks/ui/tailwind-consistency.js +345 -0
- package/dist/checks/ui/tailwind-consistency.js.map +1 -0
- package/dist/checks/ui/tailwind-contrast-check.d.ts +44 -0
- package/dist/checks/ui/tailwind-contrast-check.d.ts.map +1 -0
- package/dist/checks/ui/tailwind-contrast-check.js +457 -0
- package/dist/checks/ui/tailwind-contrast-check.js.map +1 -0
- package/dist/checks/ui/text-button-group-gap.d.ts +29 -0
- package/dist/checks/ui/text-button-group-gap.d.ts.map +1 -0
- package/dist/checks/ui/text-button-group-gap.js +242 -0
- package/dist/checks/ui/text-button-group-gap.js.map +1 -0
- package/dist/checks/ui/typography-check.d.ts +7 -0
- package/dist/checks/ui/typography-check.d.ts.map +1 -0
- package/dist/checks/ui/typography-check.js +114 -0
- package/dist/checks/ui/typography-check.js.map +1 -0
- package/dist/checks/ui/z-index-check.d.ts +25 -0
- package/dist/checks/ui/z-index-check.d.ts.map +1 -0
- package/dist/checks/ui/z-index-check.js +663 -0
- package/dist/checks/ui/z-index-check.js.map +1 -0
- package/dist/checks/zod/zod4-compatibility.d.ts +31 -0
- package/dist/checks/zod/zod4-compatibility.d.ts.map +1 -0
- package/dist/checks/zod/zod4-compatibility.js +412 -0
- package/dist/checks/zod/zod4-compatibility.js.map +1 -0
- package/dist/core/categories.d.ts +40 -0
- package/dist/core/categories.d.ts.map +1 -0
- package/dist/core/categories.js +153 -0
- package/dist/core/categories.js.map +1 -0
- package/dist/core/config.d.ts +87 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +176 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/types.d.ts +194 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +24 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/runner.d.ts +33 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +457 -0
- package/dist/runner.js.map +1 -0
- package/dist/shared/concurrency-config.d.ts +57 -0
- package/dist/shared/concurrency-config.d.ts.map +1 -0
- package/dist/shared/concurrency-config.js +128 -0
- package/dist/shared/concurrency-config.js.map +1 -0
- package/dist/shared/design-tokens-config.d.ts +140 -0
- package/dist/shared/design-tokens-config.d.ts.map +1 -0
- package/dist/shared/design-tokens-config.js +290 -0
- package/dist/shared/design-tokens-config.js.map +1 -0
- package/dist/shared/design-tokens.d.ts +771 -0
- package/dist/shared/design-tokens.d.ts.map +1 -0
- package/dist/shared/design-tokens.js +873 -0
- package/dist/shared/design-tokens.js.map +1 -0
- package/dist/shared/file-cache.d.ts +379 -0
- package/dist/shared/file-cache.d.ts.map +1 -0
- package/dist/shared/file-cache.js +744 -0
- package/dist/shared/file-cache.js.map +1 -0
- package/dist/shared/glob-patterns.d.ts +200 -0
- package/dist/shared/glob-patterns.d.ts.map +1 -0
- package/dist/shared/glob-patterns.js +291 -0
- package/dist/shared/glob-patterns.js.map +1 -0
- package/dist/shared/layout-constants.d.ts +101 -0
- package/dist/shared/layout-constants.d.ts.map +1 -0
- package/dist/shared/layout-constants.js +172 -0
- package/dist/shared/layout-constants.js.map +1 -0
- package/dist/utils/config-loader.d.ts +34 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +169 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/console-chars.d.ts +388 -0
- package/dist/utils/console-chars.d.ts.map +1 -0
- package/dist/utils/console-chars.js +378 -0
- package/dist/utils/console-chars.js.map +1 -0
- package/dist/utils/file-scanner.d.ts +73 -0
- package/dist/utils/file-scanner.d.ts.map +1 -0
- package/dist/utils/file-scanner.js +203 -0
- package/dist/utils/file-scanner.js.map +1 -0
- package/dist/utils/findings-writer.d.ts +32 -0
- package/dist/utils/findings-writer.d.ts.map +1 -0
- package/dist/utils/findings-writer.js +69 -0
- package/dist/utils/findings-writer.js.map +1 -0
- package/dist/utils/plugin-loader.d.ts +76 -0
- package/dist/utils/plugin-loader.d.ts.map +1 -0
- package/dist/utils/plugin-loader.js +235 -0
- package/dist/utils/plugin-loader.js.map +1 -0
- package/dist/utils/preflight-runner.d.ts +29 -0
- package/dist/utils/preflight-runner.d.ts.map +1 -0
- package/dist/utils/preflight-runner.js +131 -0
- package/dist/utils/preflight-runner.js.map +1 -0
- package/dist/utils/progress-reporter.d.ts +92 -0
- package/dist/utils/progress-reporter.d.ts.map +1 -0
- package/dist/utils/progress-reporter.js +272 -0
- package/dist/utils/progress-reporter.js.map +1 -0
- package/package.json +78 -0
- package/templates/domain-specific/trading-card-system/tcg-seed-validation.ts +197 -0
- package/templates/new-check.ts.template +205 -0
- package/templates/preflight.config.ts.template +103 -0
|
@@ -0,0 +1,1168 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Preflight Redundancy Detection (BLOCKING)
|
|
5
|
+
*
|
|
6
|
+
* Detects redundant preflights by analyzing:
|
|
7
|
+
* 1. Regex patterns being checked (same pattern in multiple preflights)
|
|
8
|
+
* 2. File glob patterns being scanned (same files scanned multiple times)
|
|
9
|
+
* 3. Error codes emitted (duplicate error codes = duplicate checks)
|
|
10
|
+
* 4. Similar check names (semantic overlap)
|
|
11
|
+
* 5. Content hash duplicates (copy-pasted preflights)
|
|
12
|
+
* 6. Local exclude definitions (should use shared/glob-patterns.ts)
|
|
13
|
+
*
|
|
14
|
+
* This runs on every build to ensure efficiency - we don't want to waste
|
|
15
|
+
* CI time running the same checks multiple times.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* pnpm preflight:redundancy
|
|
19
|
+
* pnpm preflight:redundancy --verbose # Show info-level issues
|
|
20
|
+
* pnpm preflight:redundancy --json # Output JSON for trend tracking
|
|
21
|
+
* tsx scripts/active/preflights/system/preflight-redundancy-detection.ts
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}) : function(o, v) {
|
|
37
|
+
o["default"] = v;
|
|
38
|
+
});
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.tags = exports.description = exports.blocking = exports.category = exports.name = exports.id = void 0;
|
|
58
|
+
const crypto = __importStar(require("crypto"));
|
|
59
|
+
const fs = __importStar(require("fs"));
|
|
60
|
+
const path = __importStar(require("path"));
|
|
61
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
62
|
+
// Check metadata
|
|
63
|
+
exports.id = "system/preflight-redundancy-detection";
|
|
64
|
+
exports.name = "Preflight Redundancy Detection";
|
|
65
|
+
exports.category = "system";
|
|
66
|
+
exports.blocking = true;
|
|
67
|
+
exports.description = "Preflight Redundancy Detection (BLOCKING)";
|
|
68
|
+
exports.tags = ["system"];
|
|
69
|
+
// Import shared patterns to exclude from duplicate detection
|
|
70
|
+
// These are expected to appear in many files since they're the shared source
|
|
71
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
72
|
+
const glob_patterns_1 = require("../../shared/glob-patterns");
|
|
73
|
+
const issues = [];
|
|
74
|
+
// Patterns to ignore (too generic to be meaningful for redundancy detection)
|
|
75
|
+
const IGNORE_PATTERNS = new Set([
|
|
76
|
+
// Generic regex patterns
|
|
77
|
+
".*",
|
|
78
|
+
".+",
|
|
79
|
+
"\\s+",
|
|
80
|
+
"\\w+",
|
|
81
|
+
"\\d+",
|
|
82
|
+
'[^"]+',
|
|
83
|
+
"[^']+",
|
|
84
|
+
"\\n",
|
|
85
|
+
"\\r?\\n",
|
|
86
|
+
// Common words that appear in many preflights (not actual redundancy)
|
|
87
|
+
"system",
|
|
88
|
+
"shared",
|
|
89
|
+
"scripts",
|
|
90
|
+
"constants",
|
|
91
|
+
"components",
|
|
92
|
+
"utils",
|
|
93
|
+
"hooks",
|
|
94
|
+
"types",
|
|
95
|
+
"config",
|
|
96
|
+
"error",
|
|
97
|
+
"warning",
|
|
98
|
+
"success",
|
|
99
|
+
"failed",
|
|
100
|
+
"import",
|
|
101
|
+
"export",
|
|
102
|
+
"function",
|
|
103
|
+
"const",
|
|
104
|
+
"return",
|
|
105
|
+
"async",
|
|
106
|
+
"await",
|
|
107
|
+
"string",
|
|
108
|
+
"number",
|
|
109
|
+
"boolean",
|
|
110
|
+
"object",
|
|
111
|
+
"array",
|
|
112
|
+
"null",
|
|
113
|
+
"undefined",
|
|
114
|
+
"true",
|
|
115
|
+
"false",
|
|
116
|
+
]);
|
|
117
|
+
// File globs to ignore (too generic)
|
|
118
|
+
const IGNORE_GLOBS = new Set(["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "*.ts", "*.tsx"]);
|
|
119
|
+
// Shared pattern globs - these are expected to appear in many files
|
|
120
|
+
// Don't flag them as duplicates since they come from glob-patterns.ts or are common patterns
|
|
121
|
+
const SHARED_PATTERN_GLOBS = new Set([
|
|
122
|
+
// Exclusion patterns from glob-patterns.ts
|
|
123
|
+
...glob_patterns_1.CORE_EXCLUDES,
|
|
124
|
+
...glob_patterns_1.STANDARD_EXCLUDES,
|
|
125
|
+
...glob_patterns_1.FULL_EXCLUDES,
|
|
126
|
+
// Common test/story exclusion patterns
|
|
127
|
+
"**/*.test.ts",
|
|
128
|
+
"**/*.test.tsx",
|
|
129
|
+
"**/*.spec.ts",
|
|
130
|
+
"**/*.spec.tsx",
|
|
131
|
+
"**/tests/**",
|
|
132
|
+
"**/__tests__/**",
|
|
133
|
+
"**/__mocks__/**",
|
|
134
|
+
"**/*.stories.ts",
|
|
135
|
+
"**/*.stories.tsx",
|
|
136
|
+
"**/stories/**",
|
|
137
|
+
"**/.storybook/**",
|
|
138
|
+
// Common INCLUDE patterns - these are expected to be used by many preflights
|
|
139
|
+
"**/*.{ts,tsx}",
|
|
140
|
+
"**/*.{tsx,jsx}",
|
|
141
|
+
"**/*.{ts,tsx,js,jsx}",
|
|
142
|
+
"**/*.{tsx,ts}",
|
|
143
|
+
"**/*.test.*",
|
|
144
|
+
"**/*.spec.*",
|
|
145
|
+
"**/*.test.{ts,tsx}",
|
|
146
|
+
"**/*.spec.{ts,tsx}",
|
|
147
|
+
"**/*.stories.*",
|
|
148
|
+
"**/*.stories.{ts,tsx}",
|
|
149
|
+
"**/scripts/**",
|
|
150
|
+
"**/scripts/active/preflights/**",
|
|
151
|
+
"**/packages/ui/**",
|
|
152
|
+
"tests/e2e/**/*.spec.ts",
|
|
153
|
+
"tests/e2e/**/*.ts",
|
|
154
|
+
"app/**/page.tsx",
|
|
155
|
+
"app/**/page.{ts,tsx,js,jsx}",
|
|
156
|
+
"app/**/layout.tsx",
|
|
157
|
+
"app/**/*.tsx",
|
|
158
|
+
"app/api/**/*.ts",
|
|
159
|
+
"lib/**/*.ts",
|
|
160
|
+
"{app,components,lib,hooks}/**/*.{ts,tsx}",
|
|
161
|
+
"{app,components}/**/*.{tsx,jsx}",
|
|
162
|
+
"app/api/**/route.{ts,js}",
|
|
163
|
+
"app/api/**/route.ts",
|
|
164
|
+
"components/**/*.tsx",
|
|
165
|
+
"components/**/*.ts",
|
|
166
|
+
"components/**/*.{tsx,jsx}",
|
|
167
|
+
"**/ui/**",
|
|
168
|
+
"**/docs/**",
|
|
169
|
+
"**/components/ui/**",
|
|
170
|
+
"app/**/*Client.tsx",
|
|
171
|
+
"{app,components}/**/*.tsx",
|
|
172
|
+
"scripts/active/preflights/**/*.ts",
|
|
173
|
+
"**/utils/**",
|
|
174
|
+
"app/**/*.ts",
|
|
175
|
+
"{app,lib,components}/**/*.{ts,tsx}",
|
|
176
|
+
"app/**/*.{tsx,jsx}",
|
|
177
|
+
"packages/ui/src/**/*.tsx",
|
|
178
|
+
"**/test/**",
|
|
179
|
+
"**/*.d.ts",
|
|
180
|
+
]);
|
|
181
|
+
function extractRegexPatterns(content) {
|
|
182
|
+
const patterns = [];
|
|
183
|
+
// Match regex literals: /pattern/flags
|
|
184
|
+
const regexLiteralMatches = content.matchAll(/\/([^\/\n]{5,})\/[gimsuvy]*/g);
|
|
185
|
+
for (const match of regexLiteralMatches) {
|
|
186
|
+
const pattern = match[1];
|
|
187
|
+
if (pattern && !IGNORE_PATTERNS.has(pattern) && pattern.length > 5) {
|
|
188
|
+
patterns.push(pattern);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// Match new RegExp('pattern')
|
|
192
|
+
const regexpConstructorMatches = content.matchAll(/new RegExp\s*\(\s*['"`]([^'"`]{5,})['"`]/g);
|
|
193
|
+
for (const match of regexpConstructorMatches) {
|
|
194
|
+
const pattern = match[1];
|
|
195
|
+
if (pattern && !IGNORE_PATTERNS.has(pattern)) {
|
|
196
|
+
patterns.push(pattern);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// Match .match(/pattern/) and .test(/pattern/)
|
|
200
|
+
const methodMatches = content.matchAll(/\.(match|test|replace|search)\s*\(\s*\/([^\/\n]{5,})\/[gimsuvy]*/g);
|
|
201
|
+
for (const match of methodMatches) {
|
|
202
|
+
const pattern = match[2];
|
|
203
|
+
if (pattern && !IGNORE_PATTERNS.has(pattern)) {
|
|
204
|
+
patterns.push(pattern);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return [...new Set(patterns)];
|
|
208
|
+
}
|
|
209
|
+
function extractFileGlobs(content) {
|
|
210
|
+
const globs = [];
|
|
211
|
+
// Match glob patterns in strings
|
|
212
|
+
const globMatches = content.matchAll(/['"`](\*\*\/[^'"`]+|[^'"`]*\*\.[a-z]+)['"`]/g);
|
|
213
|
+
for (const match of globMatches) {
|
|
214
|
+
const pattern = match[1];
|
|
215
|
+
if (pattern && !IGNORE_GLOBS.has(pattern)) {
|
|
216
|
+
globs.push(pattern);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
// Match directory patterns
|
|
220
|
+
const dirMatches = content.matchAll(/glob\s*\(\s*['"`]([^'"`]+)['"`]/g);
|
|
221
|
+
for (const match of dirMatches) {
|
|
222
|
+
const pattern = match[1];
|
|
223
|
+
if (pattern && !IGNORE_GLOBS.has(pattern)) {
|
|
224
|
+
globs.push(pattern);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return [...new Set(globs)];
|
|
228
|
+
}
|
|
229
|
+
function extractErrorCodes(content) {
|
|
230
|
+
const codes = [];
|
|
231
|
+
// Match code: 'ERROR_CODE' patterns
|
|
232
|
+
const codeMatches = content.matchAll(/code:\s*['"]([A-Z][A-Z0-9_]+)['"]/g);
|
|
233
|
+
for (const match of codeMatches) {
|
|
234
|
+
if (match[1])
|
|
235
|
+
codes.push(match[1]);
|
|
236
|
+
}
|
|
237
|
+
// Match error code constants
|
|
238
|
+
const constMatches = content.matchAll(/const\s+([A-Z][A-Z0-9_]+)\s*=\s*['"]([A-Z][A-Z0-9_]+)['"]/g);
|
|
239
|
+
for (const match of constMatches) {
|
|
240
|
+
if (match[2])
|
|
241
|
+
codes.push(match[2]);
|
|
242
|
+
}
|
|
243
|
+
return [...new Set(codes)];
|
|
244
|
+
}
|
|
245
|
+
function extractCheckDescriptions(content) {
|
|
246
|
+
const descriptions = [];
|
|
247
|
+
// Match console.log with check descriptions
|
|
248
|
+
const logMatches = content.matchAll(/console\.log\s*\(\s*['"`]([^'"`]{20,})['"`]/g);
|
|
249
|
+
for (const match of logMatches) {
|
|
250
|
+
if (match[1] &&
|
|
251
|
+
!match[1].includes("${box.heavyHorizontal}") &&
|
|
252
|
+
!match[1].includes("${box.doubleHorizontal}")) {
|
|
253
|
+
descriptions.push(match[1]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// Match description fields
|
|
257
|
+
const descMatches = content.matchAll(/description:\s*['"`]([^'"`]{20,})['"`]/g);
|
|
258
|
+
for (const match of descMatches) {
|
|
259
|
+
if (match[1])
|
|
260
|
+
descriptions.push(match[1]);
|
|
261
|
+
}
|
|
262
|
+
return descriptions;
|
|
263
|
+
}
|
|
264
|
+
function calculateContentHash(content) {
|
|
265
|
+
// Normalize content for comparison (remove comments, whitespace)
|
|
266
|
+
const normalized = content
|
|
267
|
+
.replace(/\/\/.*$/gm, "")
|
|
268
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
269
|
+
.replace(/\s+/g, " ")
|
|
270
|
+
.trim();
|
|
271
|
+
return crypto.createHash("md5").update(normalized).digest("hex").slice(0, 12);
|
|
272
|
+
}
|
|
273
|
+
function calculateSimilarity(str1, str2) {
|
|
274
|
+
const words1 = new Set(str1
|
|
275
|
+
.toLowerCase()
|
|
276
|
+
.split(/\W+/)
|
|
277
|
+
.filter((w) => w.length > 2));
|
|
278
|
+
const words2 = new Set(str2
|
|
279
|
+
.toLowerCase()
|
|
280
|
+
.split(/\W+/)
|
|
281
|
+
.filter((w) => w.length > 2));
|
|
282
|
+
if (words1.size === 0 || words2.size === 0)
|
|
283
|
+
return 0;
|
|
284
|
+
const intersection = new Set([...words1].filter((w) => words2.has(w)));
|
|
285
|
+
const union = new Set([...words1, ...words2]);
|
|
286
|
+
return intersection.size / union.size;
|
|
287
|
+
}
|
|
288
|
+
// CACHED FILE LISTS - Scan once, use everywhere
|
|
289
|
+
let _cachedPreflightFiles = null;
|
|
290
|
+
async function getPreflightFiles() {
|
|
291
|
+
if (!_cachedPreflightFiles) {
|
|
292
|
+
_cachedPreflightFiles = await file_cache_1.fileCache.getPreflightFiles();
|
|
293
|
+
}
|
|
294
|
+
return _cachedPreflightFiles;
|
|
295
|
+
}
|
|
296
|
+
async function analyzePreflightFile(filePath) {
|
|
297
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
298
|
+
const relativePath = path.relative(process.cwd(), filePath);
|
|
299
|
+
// Extract preflight name from file or content
|
|
300
|
+
const nameMatch = content.match(/name:\s*['"]([^'"]+)['"]/);
|
|
301
|
+
const name = nameMatch?.[1] || path.basename(filePath, path.extname(filePath));
|
|
302
|
+
// Check if file imports from shared glob-patterns
|
|
303
|
+
const usesSharedPatterns = content.includes("from '../shared/glob-patterns'") ||
|
|
304
|
+
content.includes('from "../../shared/glob-patterns"') ||
|
|
305
|
+
content.includes("...STANDARD_EXCLUDES") ||
|
|
306
|
+
content.includes("...CORE_EXCLUDES") ||
|
|
307
|
+
content.includes("...FULL_EXCLUDES") ||
|
|
308
|
+
content.includes("...PRODUCTION_CODE_EXCLUDES");
|
|
309
|
+
return {
|
|
310
|
+
file: relativePath,
|
|
311
|
+
name,
|
|
312
|
+
regexPatterns: extractRegexPatterns(content),
|
|
313
|
+
fileGlobs: extractFileGlobs(content),
|
|
314
|
+
errorCodes: extractErrorCodes(content),
|
|
315
|
+
checkDescriptions: extractCheckDescriptions(content),
|
|
316
|
+
contentHash: calculateContentHash(content),
|
|
317
|
+
lineCount: content.split("\n").length,
|
|
318
|
+
usesSharedPatterns,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function findDuplicatePatterns(analyses) {
|
|
322
|
+
// Re-enabled with smarter filtering - only flag truly identical complex patterns
|
|
323
|
+
const patternToFiles = new Map();
|
|
324
|
+
for (const analysis of analyses) {
|
|
325
|
+
for (const pattern of analysis.regexPatterns) {
|
|
326
|
+
// Skip short/generic patterns
|
|
327
|
+
if (pattern.length < 20)
|
|
328
|
+
continue;
|
|
329
|
+
// Skip common patterns that are legitimately reused
|
|
330
|
+
if (/flex|grid|gap|margin|padding|className/i.test(pattern))
|
|
331
|
+
continue;
|
|
332
|
+
if (!patternToFiles.has(pattern)) {
|
|
333
|
+
patternToFiles.set(pattern, []);
|
|
334
|
+
}
|
|
335
|
+
patternToFiles.get(pattern).push(analysis.file);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
for (const [pattern, files] of patternToFiles) {
|
|
339
|
+
if (files.length >= 3) {
|
|
340
|
+
// Only flag if 3+ preflights use the exact same complex pattern
|
|
341
|
+
issues.push({
|
|
342
|
+
type: "duplicate-pattern",
|
|
343
|
+
severity: "info",
|
|
344
|
+
message: `Complex regex pattern used by ${files.length} preflights - consider extracting to shared module`,
|
|
345
|
+
files,
|
|
346
|
+
pattern: pattern.substring(0, 50) + (pattern.length > 50 ? "..." : ""),
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function findDuplicateGlobs(analyses) {
|
|
352
|
+
const globToFiles = new Map();
|
|
353
|
+
for (const analysis of analyses) {
|
|
354
|
+
for (const glob of analysis.fileGlobs) {
|
|
355
|
+
// Skip shared patterns - they're expected to be in many files
|
|
356
|
+
if (SHARED_PATTERN_GLOBS.has(glob))
|
|
357
|
+
continue;
|
|
358
|
+
if (!globToFiles.has(glob)) {
|
|
359
|
+
globToFiles.set(glob, []);
|
|
360
|
+
}
|
|
361
|
+
globToFiles.get(glob).push(analysis.file);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
for (const [globPattern, files] of globToFiles) {
|
|
365
|
+
if (files.length >= 6) {
|
|
366
|
+
// Only flag if 6+ preflights scan same glob (meaningful redundancy)
|
|
367
|
+
issues.push({
|
|
368
|
+
type: "duplicate-glob",
|
|
369
|
+
severity: files.length >= 10 ? "warning" : "info",
|
|
370
|
+
message: `File glob "${globPattern}" scanned by ${files.length} preflights - consider consolidating`,
|
|
371
|
+
files,
|
|
372
|
+
pattern: globPattern,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function findDuplicateErrorCodes(analyses) {
|
|
378
|
+
const codeToFiles = new Map();
|
|
379
|
+
for (const analysis of analyses) {
|
|
380
|
+
for (const code of analysis.errorCodes) {
|
|
381
|
+
if (!codeToFiles.has(code)) {
|
|
382
|
+
codeToFiles.set(code, []);
|
|
383
|
+
}
|
|
384
|
+
codeToFiles.get(code).push(analysis.file);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
for (const [code, files] of codeToFiles) {
|
|
388
|
+
if (files.length > 1) {
|
|
389
|
+
issues.push({
|
|
390
|
+
type: "duplicate-error-code",
|
|
391
|
+
severity: "error", // Duplicate error codes are a real problem
|
|
392
|
+
message: `Error code "${code}" emitted by ${files.length} preflights - indicates duplicate checks`,
|
|
393
|
+
files,
|
|
394
|
+
pattern: code,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// Generic names that shouldn't trigger similar-name warnings
|
|
400
|
+
const GENERIC_NAMES = new Set([
|
|
401
|
+
"delete",
|
|
402
|
+
"create",
|
|
403
|
+
"update",
|
|
404
|
+
"read",
|
|
405
|
+
"get",
|
|
406
|
+
"set",
|
|
407
|
+
"check",
|
|
408
|
+
"validate",
|
|
409
|
+
"test",
|
|
410
|
+
"run",
|
|
411
|
+
"execute",
|
|
412
|
+
"process",
|
|
413
|
+
"handle",
|
|
414
|
+
"main",
|
|
415
|
+
"init",
|
|
416
|
+
"setup",
|
|
417
|
+
"development",
|
|
418
|
+
"database",
|
|
419
|
+
"security",
|
|
420
|
+
"performance",
|
|
421
|
+
"quality",
|
|
422
|
+
// Workflow file names that call other preflights
|
|
423
|
+
"esm import extensions",
|
|
424
|
+
"image optimization",
|
|
425
|
+
"code quality",
|
|
426
|
+
"cost optimization",
|
|
427
|
+
"strict-lint",
|
|
428
|
+
"strict lint",
|
|
429
|
+
]);
|
|
430
|
+
function findSimilarNames(analyses) {
|
|
431
|
+
// Re-enabled with better heuristics - only flag very high similarity (>0.8)
|
|
432
|
+
const checked = new Set();
|
|
433
|
+
for (let i = 0; i < analyses.length; i++) {
|
|
434
|
+
for (let j = i + 1; j < analyses.length; j++) {
|
|
435
|
+
const a1 = analyses[i];
|
|
436
|
+
const a2 = analyses[j];
|
|
437
|
+
const key = `${a1.file}:${a2.file}`;
|
|
438
|
+
if (checked.has(key))
|
|
439
|
+
continue;
|
|
440
|
+
checked.add(key);
|
|
441
|
+
// Skip workflow files - they legitimately have similar names
|
|
442
|
+
if (a1.file.includes("/workflows/") || a2.file.includes("/workflows/"))
|
|
443
|
+
continue;
|
|
444
|
+
// Skip consolidated files - they're meant to replace others
|
|
445
|
+
if (a1.file.includes("/consolidated/") || a2.file.includes("/consolidated/"))
|
|
446
|
+
continue;
|
|
447
|
+
const similarity = calculateSimilarity(a1.name, a2.name);
|
|
448
|
+
// Only flag very high similarity (>0.8) and same directory
|
|
449
|
+
if (similarity > 0.8) {
|
|
450
|
+
const dir1 = path.dirname(a1.file);
|
|
451
|
+
const dir2 = path.dirname(a2.file);
|
|
452
|
+
if (dir1 === dir2) {
|
|
453
|
+
issues.push({
|
|
454
|
+
type: "similar-name",
|
|
455
|
+
severity: "info",
|
|
456
|
+
message: `Very similar names in same directory (${(similarity * 100).toFixed(0)}% match) - consider consolidating`,
|
|
457
|
+
files: [a1.file, a2.file],
|
|
458
|
+
similarity,
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
function findHighOverlap(analyses) {
|
|
466
|
+
const checked = new Set();
|
|
467
|
+
for (let i = 0; i < analyses.length; i++) {
|
|
468
|
+
for (let j = i + 1; j < analyses.length; j++) {
|
|
469
|
+
const a1 = analyses[i];
|
|
470
|
+
const a2 = analyses[j];
|
|
471
|
+
const key = `${a1.file}:${a2.file}`;
|
|
472
|
+
if (checked.has(key))
|
|
473
|
+
continue;
|
|
474
|
+
checked.add(key);
|
|
475
|
+
// Calculate overlap in regex patterns
|
|
476
|
+
const patterns1 = new Set(a1.regexPatterns);
|
|
477
|
+
const patterns2 = new Set(a2.regexPatterns);
|
|
478
|
+
const patternOverlap = [...patterns1].filter((p) => patterns2.has(p));
|
|
479
|
+
// Calculate overlap in error codes
|
|
480
|
+
const codes1 = new Set(a1.errorCodes);
|
|
481
|
+
const codes2 = new Set(a2.errorCodes);
|
|
482
|
+
const codeOverlap = [...codes1].filter((c) => codes2.has(c));
|
|
483
|
+
// High overlap = many shared patterns AND shared error codes
|
|
484
|
+
if (patternOverlap.length >= 3 && codeOverlap.length >= 1) {
|
|
485
|
+
issues.push({
|
|
486
|
+
type: "high-overlap",
|
|
487
|
+
severity: "error",
|
|
488
|
+
message: `High overlap between preflights: ${patternOverlap.length} shared patterns, ${codeOverlap.length} shared error codes. Consider merging.`,
|
|
489
|
+
files: [a1.file, a2.file],
|
|
490
|
+
similarity: patternOverlap.length / Math.max(patterns1.size, patterns2.size),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Find domain fragmentation - too many preflights in the same category
|
|
498
|
+
* that could be consolidated into fewer modules.
|
|
499
|
+
*
|
|
500
|
+
* Re-enabled with smarter thresholds - only flag categories with 10+ standalone files
|
|
501
|
+
* that are NOT already orchestrated by consolidated/*.ts files.
|
|
502
|
+
*/
|
|
503
|
+
function findDomainFragmentation(analyses) {
|
|
504
|
+
const categoryToFiles = new Map();
|
|
505
|
+
// Get list of already orchestrated preflights
|
|
506
|
+
const orchestratedPreflights = getOrchestratedPreflights();
|
|
507
|
+
for (const analysis of analyses) {
|
|
508
|
+
// Extract category from path (e.g., "ui" from "scripts/active/preflights/ui/button-consistency.ts")
|
|
509
|
+
// Normalize path separators for cross-platform compatibility
|
|
510
|
+
const normalizedPath = analysis.file.replace(/\\/g, "/");
|
|
511
|
+
const match = normalizedPath.match(/preflights\/([^\/]+)\//);
|
|
512
|
+
if (!match)
|
|
513
|
+
continue;
|
|
514
|
+
const category = match[1];
|
|
515
|
+
// Skip consolidated, workflows, system, shared, utils - these are organizational
|
|
516
|
+
if (["consolidated", "workflows", "system", "shared", "utils"].includes(category))
|
|
517
|
+
continue;
|
|
518
|
+
// Skip files that are orchestrators themselves
|
|
519
|
+
if (isOrchestratorFile(analysis.file))
|
|
520
|
+
continue;
|
|
521
|
+
// Skip files that are already orchestrated
|
|
522
|
+
const relativePath = normalizedPath.replace(/^scripts\/active\/preflights\//, "");
|
|
523
|
+
if (orchestratedPreflights.has(relativePath) || orchestratedPreflights.has(normalizedPath)) {
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
if (!categoryToFiles.has(category)) {
|
|
527
|
+
categoryToFiles.set(category, []);
|
|
528
|
+
}
|
|
529
|
+
categoryToFiles.get(category).push(analysis.file);
|
|
530
|
+
}
|
|
531
|
+
for (const [category, files] of categoryToFiles) {
|
|
532
|
+
// Only flag if 10+ NON-ORCHESTRATED files exist
|
|
533
|
+
if (files.length >= 10) {
|
|
534
|
+
// Check if this category already has a consolidated orchestrator
|
|
535
|
+
if (hasConsolidatedOrchestrator(category, analyses)) {
|
|
536
|
+
continue; // Already has orchestrator - not fragmentation
|
|
537
|
+
}
|
|
538
|
+
issues.push({
|
|
539
|
+
type: "similar-name", // Using existing type for domain fragmentation
|
|
540
|
+
severity: "info",
|
|
541
|
+
message: `Category "${category}" has ${files.length} non-orchestrated preflights - consider consolidating into fewer modules`,
|
|
542
|
+
files: files.slice(0, 5),
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Find preflights scanning the same test files that could share a single scan
|
|
549
|
+
*
|
|
550
|
+
* DISABLED: This check is advisory only. Many preflights legitimately scan
|
|
551
|
+
* test files for different purposes (patterns, coverage, performance, etc.)
|
|
552
|
+
*/
|
|
553
|
+
function findTestFileScanOverlap(_analyses) {
|
|
554
|
+
// Disabled - produces advisory findings that don't indicate actual problems
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* NEW: Find orphaned preflights - not referenced in package.json or workflows
|
|
559
|
+
* These may be dead code or forgotten preflights that should be removed or integrated.
|
|
560
|
+
*
|
|
561
|
+
* IMPORTANT: Files orchestrated by consolidated/*.ts are NOT orphaned - they're
|
|
562
|
+
* called via runCheck() which this function now recognizes.
|
|
563
|
+
*/
|
|
564
|
+
async function findOrphanedPreflights(analyses) {
|
|
565
|
+
try {
|
|
566
|
+
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
567
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
568
|
+
const scripts = packageJson.scripts || {};
|
|
569
|
+
const scriptValues = Object.values(scripts).join(" ");
|
|
570
|
+
// Get list of orchestrated preflights (called by consolidated/*.ts)
|
|
571
|
+
const orchestratedPreflights = getOrchestratedPreflights();
|
|
572
|
+
// Also check workflow files
|
|
573
|
+
const workflowDir = path.join(process.cwd(), "scripts/active/preflights/workflows");
|
|
574
|
+
let workflowContent = "";
|
|
575
|
+
if (fs.existsSync(workflowDir)) {
|
|
576
|
+
const workflowFiles = fs.readdirSync(workflowDir).filter((f) => f.endsWith(".ts"));
|
|
577
|
+
for (const wf of workflowFiles) {
|
|
578
|
+
workflowContent += fs.readFileSync(path.join(workflowDir, wf), "utf-8");
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
// Also check consolidated files for references
|
|
582
|
+
const consolidatedDir = path.join(process.cwd(), "scripts/active/preflights/consolidated");
|
|
583
|
+
let consolidatedContent = "";
|
|
584
|
+
if (fs.existsSync(consolidatedDir)) {
|
|
585
|
+
const consolidatedFiles = fs.readdirSync(consolidatedDir).filter((f) => f.endsWith(".ts"));
|
|
586
|
+
for (const cf of consolidatedFiles) {
|
|
587
|
+
consolidatedContent += fs.readFileSync(path.join(consolidatedDir, cf), "utf-8");
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
const orphaned = [];
|
|
591
|
+
for (const analysis of analyses) {
|
|
592
|
+
// Skip workflow files, system files, shared utilities, consolidated files
|
|
593
|
+
if (analysis.file.includes("/workflows/"))
|
|
594
|
+
continue;
|
|
595
|
+
if (analysis.file.includes("/system/"))
|
|
596
|
+
continue;
|
|
597
|
+
if (analysis.file.includes("/shared/"))
|
|
598
|
+
continue;
|
|
599
|
+
if (analysis.file.includes("/utils/"))
|
|
600
|
+
continue;
|
|
601
|
+
if (analysis.file.includes("/consolidated/"))
|
|
602
|
+
continue;
|
|
603
|
+
const fileName = path.basename(analysis.file, path.extname(analysis.file));
|
|
604
|
+
const relativePath = analysis.file.replace(/^scripts\/active\/preflights\//, "");
|
|
605
|
+
// Check if orchestrated by consolidated/*.ts
|
|
606
|
+
if (orchestratedPreflights.has(relativePath) || orchestratedPreflights.has(analysis.file)) {
|
|
607
|
+
continue; // Not orphaned - called by orchestrator
|
|
608
|
+
}
|
|
609
|
+
// Check if referenced in package.json scripts
|
|
610
|
+
const inPackageJson = scriptValues.includes(fileName) || scriptValues.includes(analysis.file);
|
|
611
|
+
// Check if imported in workflow files
|
|
612
|
+
const inWorkflows = workflowContent.includes(fileName) ||
|
|
613
|
+
workflowContent.includes(`from './${fileName}'`) ||
|
|
614
|
+
workflowContent.includes(`from "../${path.basename(path.dirname(analysis.file))}/${fileName}"`);
|
|
615
|
+
// Check if referenced in consolidated files
|
|
616
|
+
const inConsolidated = consolidatedContent.includes(fileName) ||
|
|
617
|
+
consolidatedContent.includes(analysis.file) ||
|
|
618
|
+
consolidatedContent.includes(relativePath);
|
|
619
|
+
if (!inPackageJson && !inWorkflows && !inConsolidated) {
|
|
620
|
+
orphaned.push(analysis.file);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
if (orphaned.length > 5) {
|
|
624
|
+
issues.push({
|
|
625
|
+
type: "local-excludes", // Reusing type for orphaned detection
|
|
626
|
+
severity: "info",
|
|
627
|
+
message: `${orphaned.length} preflights not referenced in package.json, workflows, or consolidated files - may be orphaned`,
|
|
628
|
+
files: orphaned.slice(0, 10),
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
catch {
|
|
633
|
+
// Skip if can't read package.json
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* NEW: Find build command redundancy - preflights called multiple times in build
|
|
638
|
+
*/
|
|
639
|
+
function findBuildCommandRedundancy() {
|
|
640
|
+
try {
|
|
641
|
+
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
642
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
643
|
+
const scripts = packageJson.scripts || {};
|
|
644
|
+
const buildCommand = scripts.build || "";
|
|
645
|
+
// Check if preflight:all is called AND individual preflights are also called
|
|
646
|
+
if (buildCommand.includes("preflight:all")) {
|
|
647
|
+
const redundantCalls = [];
|
|
648
|
+
// These are likely already included in preflight:all
|
|
649
|
+
const likelyIncluded = [
|
|
650
|
+
"preflight:ui:consistency",
|
|
651
|
+
"preflight:mobile-responsive",
|
|
652
|
+
"preflight:product-image-animations",
|
|
653
|
+
"preflight:ux-consistency",
|
|
654
|
+
];
|
|
655
|
+
for (const preflight of likelyIncluded) {
|
|
656
|
+
if (buildCommand.includes(preflight)) {
|
|
657
|
+
redundantCalls.push(preflight);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
if (redundantCalls.length > 0) {
|
|
661
|
+
issues.push({
|
|
662
|
+
type: "duplicate-glob", // Reusing type for build redundancy
|
|
663
|
+
severity: "warning",
|
|
664
|
+
message: `Build command calls preflight:all AND ${redundantCalls.length} individual preflights that may already be included. Check if these are redundant: ${redundantCalls.join(", ")}`,
|
|
665
|
+
files: ["package.json"],
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
catch {
|
|
671
|
+
// Skip if can't read package.json
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Detect if a file is an orchestrator (calls other preflights)
|
|
676
|
+
* Orchestrators use patterns like:
|
|
677
|
+
* - runCheck('name', 'path/to/preflight.ts')
|
|
678
|
+
* - exec('pnpm preflight:xxx')
|
|
679
|
+
* - import from other preflight files
|
|
680
|
+
*/
|
|
681
|
+
function isOrchestratorFile(filePath) {
|
|
682
|
+
// Consolidated and workflow files are always orchestrators
|
|
683
|
+
if (filePath.includes("/consolidated/") || filePath.includes("/workflows/")) {
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
try {
|
|
687
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
688
|
+
// Check for runCheck pattern (used in consolidated/*.ts)
|
|
689
|
+
if (/runCheck\s*\(\s*['"][^'"]+['"]\s*,\s*['"][^'"]+\.ts['"]/.test(content)) {
|
|
690
|
+
return true;
|
|
691
|
+
}
|
|
692
|
+
// Check for exec pattern calling other preflights
|
|
693
|
+
if (/exec\s*\(\s*['"`].*preflight.*\.ts/.test(content)) {
|
|
694
|
+
return true;
|
|
695
|
+
}
|
|
696
|
+
// Check for pnpm preflight commands
|
|
697
|
+
if (/pnpm\s+preflight:/.test(content)) {
|
|
698
|
+
return true;
|
|
699
|
+
}
|
|
700
|
+
// Check for importing and calling multiple preflight modules
|
|
701
|
+
const preflightImports = content.match(/from\s+['"][^'"]*preflights\/[^'"]+['"]/g);
|
|
702
|
+
if (preflightImports && preflightImports.length >= 3) {
|
|
703
|
+
return true;
|
|
704
|
+
}
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
catch {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Get list of preflights that are already orchestrated by consolidated/*.ts files
|
|
713
|
+
*/
|
|
714
|
+
function getOrchestratedPreflights() {
|
|
715
|
+
const orchestrated = new Set();
|
|
716
|
+
const consolidatedDir = path.join(process.cwd(), "scripts/active/preflights/consolidated");
|
|
717
|
+
const workflowsDir = path.join(process.cwd(), "scripts/active/preflights/workflows");
|
|
718
|
+
const scanDir = (dir) => {
|
|
719
|
+
if (!fs.existsSync(dir))
|
|
720
|
+
return;
|
|
721
|
+
const files = fs.readdirSync(dir).filter((f) => f.endsWith(".ts"));
|
|
722
|
+
for (const file of files) {
|
|
723
|
+
try {
|
|
724
|
+
const content = fs.readFileSync(path.join(dir, file), "utf-8");
|
|
725
|
+
// Extract preflight paths from runCheck calls
|
|
726
|
+
// Pattern: runCheck("name", "scripts/active/preflights/path.ts")
|
|
727
|
+
const runCheckMatches = content.matchAll(/runCheck\s*\(\s*['"][^'"]+['"]\s*,\s*['"]([^'"]+\.(?:ts|js|mjs))['"]/g);
|
|
728
|
+
for (const match of runCheckMatches) {
|
|
729
|
+
if (match[1]) {
|
|
730
|
+
// Normalize path
|
|
731
|
+
const preflightPath = match[1].replace(/^scripts\/active\/preflights\//, "");
|
|
732
|
+
orchestrated.add(preflightPath);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
// Extract from exec calls
|
|
736
|
+
const execMatches = content.matchAll(/exec\s*\(\s*['"`][^'"`]*scripts\/active\/preflights\/([^'"`\s]+\.(?:ts|js|mjs))/g);
|
|
737
|
+
for (const match of execMatches) {
|
|
738
|
+
if (match[1]) {
|
|
739
|
+
orchestrated.add(match[1]);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
// Extract from script arrays (used in quality.ts pattern)
|
|
743
|
+
// Pattern: { name: "...", script: "scripts/active/preflights/path.ts" }
|
|
744
|
+
const scriptArrayMatches = content.matchAll(/script:\s*['"]scripts\/active\/preflights\/([^'"]+\.(?:ts|js|mjs))['"]/g);
|
|
745
|
+
for (const match of scriptArrayMatches) {
|
|
746
|
+
if (match[1]) {
|
|
747
|
+
orchestrated.add(match[1]);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
// Extract from string literals containing preflight paths
|
|
751
|
+
// Pattern: "scripts/active/preflights/specialized/file.ts"
|
|
752
|
+
const stringLiteralMatches = content.matchAll(/['"]scripts\/active\/preflights\/(specialized\/[^'"]+\.(?:ts|js|mjs))['"]/g);
|
|
753
|
+
for (const match of stringLiteralMatches) {
|
|
754
|
+
if (match[1]) {
|
|
755
|
+
orchestrated.add(match[1]);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
catch {
|
|
760
|
+
// Skip files that can't be read
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
scanDir(consolidatedDir);
|
|
765
|
+
scanDir(workflowsDir);
|
|
766
|
+
return orchestrated;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Check if a category already has a consolidated orchestrator
|
|
770
|
+
*/
|
|
771
|
+
function hasConsolidatedOrchestrator(category, analyses) {
|
|
772
|
+
const categoryLower = category.toLowerCase().replace(/-/g, "");
|
|
773
|
+
// Check consolidated directory for matching orchestrator
|
|
774
|
+
return analyses.some((a) => {
|
|
775
|
+
if (!a.file.includes("/consolidated/"))
|
|
776
|
+
return false;
|
|
777
|
+
const fileName = path.basename(a.file, path.extname(a.file)).toLowerCase().replace(/-/g, "");
|
|
778
|
+
// Match category name or related names
|
|
779
|
+
return (fileName.includes(categoryLower) ||
|
|
780
|
+
categoryLower.includes(fileName) ||
|
|
781
|
+
// Special mappings
|
|
782
|
+
(category === "prisma" && fileName.includes("database")) ||
|
|
783
|
+
(category === "forms" && fileName.includes("uiforms")) ||
|
|
784
|
+
(category === "buttons" && fileName.includes("uibuttons")) ||
|
|
785
|
+
(category === "cards" && fileName.includes("uicards")) ||
|
|
786
|
+
(category === "responsive" &&
|
|
787
|
+
(fileName.includes("uiresponsive") || fileName.includes("uigrid"))) ||
|
|
788
|
+
(category === "spacing" && fileName.includes("uispacing")) ||
|
|
789
|
+
(category === "typography" && fileName.includes("uitypography")) ||
|
|
790
|
+
(category === "accessibility" && fileName.includes("uiaccessibility")) ||
|
|
791
|
+
(category === "dark-mode" && fileName.includes("darkmode")));
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
function findConsolidationOpportunities(analyses) {
|
|
795
|
+
const opportunities = [];
|
|
796
|
+
// Get list of already orchestrated preflights
|
|
797
|
+
const orchestratedPreflights = getOrchestratedPreflights();
|
|
798
|
+
// Group files by prefix patterns (e.g., "button-", "card-", "form-", "grid-")
|
|
799
|
+
const prefixGroups = new Map();
|
|
800
|
+
const prefixPatterns = [
|
|
801
|
+
{ prefix: "button-", category: "buttons", suggestedName: "ui-buttons" },
|
|
802
|
+
{ prefix: "card-", category: "cards", suggestedName: "ui-cards" },
|
|
803
|
+
{ prefix: "form-", category: "forms", suggestedName: "ui-forms" },
|
|
804
|
+
{ prefix: "formfield-", category: "forms", suggestedName: "ui-forms" },
|
|
805
|
+
{ prefix: "grid-", category: "grid", suggestedName: "ui-grid-responsive" },
|
|
806
|
+
{ prefix: "spacing-", category: "spacing", suggestedName: "ui-spacing" },
|
|
807
|
+
{ prefix: "deprecated-", category: "deprecated", suggestedName: "ui-deprecated" },
|
|
808
|
+
{ prefix: "prisma-", category: "prisma", suggestedName: "database-prisma" },
|
|
809
|
+
{ prefix: "select-", category: "forms", suggestedName: "ui-forms" },
|
|
810
|
+
{ prefix: "textfield-", category: "forms", suggestedName: "ui-forms" },
|
|
811
|
+
{ prefix: "mobile-", category: "responsive", suggestedName: "ui-grid-responsive" },
|
|
812
|
+
{ prefix: "table-", category: "tables", suggestedName: "ui-tables" },
|
|
813
|
+
{ prefix: "typography-", category: "typography", suggestedName: "ui-typography" },
|
|
814
|
+
{ prefix: "dark-mode-", category: "dark-mode", suggestedName: "ui-dark-mode" },
|
|
815
|
+
{ prefix: "accessibility-", category: "accessibility", suggestedName: "ui-accessibility" },
|
|
816
|
+
{ prefix: "css-", category: "css", suggestedName: "css-validation" },
|
|
817
|
+
];
|
|
818
|
+
for (const analysis of analyses) {
|
|
819
|
+
// Skip organizational directories
|
|
820
|
+
if (analysis.file.includes("/consolidated/"))
|
|
821
|
+
continue;
|
|
822
|
+
if (analysis.file.includes("/workflows/"))
|
|
823
|
+
continue;
|
|
824
|
+
if (analysis.file.includes("/system/"))
|
|
825
|
+
continue;
|
|
826
|
+
if (analysis.file.includes("/shared/"))
|
|
827
|
+
continue;
|
|
828
|
+
if (analysis.file.includes("/utils/"))
|
|
829
|
+
continue;
|
|
830
|
+
// Skip files that are orchestrators themselves
|
|
831
|
+
if (isOrchestratorFile(analysis.file))
|
|
832
|
+
continue;
|
|
833
|
+
// Skip files that are already orchestrated by consolidated/*.ts
|
|
834
|
+
// Normalize path separators for cross-platform compatibility
|
|
835
|
+
const relativePath = analysis.file
|
|
836
|
+
.replace(/\\/g, "/")
|
|
837
|
+
.replace(/^scripts\/active\/preflights\//, "");
|
|
838
|
+
if (orchestratedPreflights.has(relativePath) ||
|
|
839
|
+
orchestratedPreflights.has(analysis.file.replace(/\\/g, "/"))) {
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
const fileName = path.basename(analysis.file, path.extname(analysis.file));
|
|
843
|
+
for (const { prefix, category } of prefixPatterns) {
|
|
844
|
+
if (fileName.startsWith(prefix)) {
|
|
845
|
+
if (!prefixGroups.has(category)) {
|
|
846
|
+
prefixGroups.set(category, []);
|
|
847
|
+
}
|
|
848
|
+
prefixGroups.get(category).push(analysis);
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
// Check for groups with 3+ files that could be consolidated
|
|
854
|
+
for (const [category, files] of prefixGroups) {
|
|
855
|
+
if (files.length >= 3) {
|
|
856
|
+
// Check if a consolidated orchestrator already exists for this category
|
|
857
|
+
if (hasConsolidatedOrchestrator(category, analyses)) {
|
|
858
|
+
continue; // Already consolidated - not a real opportunity
|
|
859
|
+
}
|
|
860
|
+
const patternInfo = prefixPatterns.find((p) => p.category === category);
|
|
861
|
+
opportunities.push({
|
|
862
|
+
category,
|
|
863
|
+
files: files.map((f) => f.file),
|
|
864
|
+
reason: `${files.length} preflights with "${category}" prefix could be merged`,
|
|
865
|
+
suggestedName: patternInfo?.suggestedName || `consolidated-${category}`,
|
|
866
|
+
priority: files.length >= 5 ? "high" : files.length >= 3 ? "medium" : "low",
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
// Check for files in same directory with similar functionality
|
|
871
|
+
// BUT only if the directory doesn't already have a consolidated orchestrator
|
|
872
|
+
const dirGroups = new Map();
|
|
873
|
+
for (const analysis of analyses) {
|
|
874
|
+
// Skip organizational directories
|
|
875
|
+
if (analysis.file.includes("/consolidated/"))
|
|
876
|
+
continue;
|
|
877
|
+
if (analysis.file.includes("/workflows/"))
|
|
878
|
+
continue;
|
|
879
|
+
if (analysis.file.includes("/system/"))
|
|
880
|
+
continue;
|
|
881
|
+
if (analysis.file.includes("/shared/"))
|
|
882
|
+
continue;
|
|
883
|
+
if (analysis.file.includes("/utils/"))
|
|
884
|
+
continue;
|
|
885
|
+
// Skip orchestrators
|
|
886
|
+
if (isOrchestratorFile(analysis.file))
|
|
887
|
+
continue;
|
|
888
|
+
// Skip already orchestrated files
|
|
889
|
+
// Normalize path separators for cross-platform compatibility
|
|
890
|
+
const relativePath = analysis.file
|
|
891
|
+
.replace(/\\/g, "/")
|
|
892
|
+
.replace(/^scripts\/active\/preflights\//, "");
|
|
893
|
+
if (orchestratedPreflights.has(relativePath) ||
|
|
894
|
+
orchestratedPreflights.has(analysis.file.replace(/\\/g, "/"))) {
|
|
895
|
+
continue;
|
|
896
|
+
}
|
|
897
|
+
const dir = path.dirname(analysis.file);
|
|
898
|
+
if (!dirGroups.has(dir)) {
|
|
899
|
+
dirGroups.set(dir, []);
|
|
900
|
+
}
|
|
901
|
+
dirGroups.get(dir).push(analysis);
|
|
902
|
+
}
|
|
903
|
+
for (const [dir, files] of dirGroups) {
|
|
904
|
+
// Skip if directory has fewer than 8 NON-ORCHESTRATED standalone files
|
|
905
|
+
if (files.length < 8)
|
|
906
|
+
continue;
|
|
907
|
+
const dirName = path.basename(dir);
|
|
908
|
+
// Skip organizational directories that shouldn't be consolidated
|
|
909
|
+
if (["workflows", "utils", "system", "shared", "consolidated"].includes(dirName)) {
|
|
910
|
+
continue;
|
|
911
|
+
}
|
|
912
|
+
// Check if this directory already has a consolidated orchestrator
|
|
913
|
+
if (hasConsolidatedOrchestrator(dirName, analyses)) {
|
|
914
|
+
continue; // Already has orchestrator - not a real opportunity
|
|
915
|
+
}
|
|
916
|
+
opportunities.push({
|
|
917
|
+
category: dirName,
|
|
918
|
+
files: files.slice(0, 10).map((f) => f.file),
|
|
919
|
+
reason: `Directory "${dirName}" has ${files.length} non-orchestrated preflights - consider creating consolidated/${dirName}.ts`,
|
|
920
|
+
suggestedName: `${dirName}`,
|
|
921
|
+
priority: files.length >= 15 ? "high" : "medium",
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
return opportunities;
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Find preflights with identical or near-identical content (copy-pasted).
|
|
928
|
+
* Uses content hash to detect duplicates.
|
|
929
|
+
*/
|
|
930
|
+
function findDuplicateContent(analyses) {
|
|
931
|
+
const hashToFiles = new Map();
|
|
932
|
+
for (const analysis of analyses) {
|
|
933
|
+
if (!hashToFiles.has(analysis.contentHash)) {
|
|
934
|
+
hashToFiles.set(analysis.contentHash, []);
|
|
935
|
+
}
|
|
936
|
+
hashToFiles.get(analysis.contentHash).push(analysis);
|
|
937
|
+
}
|
|
938
|
+
for (const [hash, duplicates] of hashToFiles) {
|
|
939
|
+
if (duplicates.length > 1) {
|
|
940
|
+
issues.push({
|
|
941
|
+
type: "duplicate-content",
|
|
942
|
+
severity: "error",
|
|
943
|
+
message: `${duplicates.length} preflights have identical content (hash: ${hash}). These are likely copy-pasted and should be consolidated.`,
|
|
944
|
+
files: duplicates.map((d) => d.file),
|
|
945
|
+
pattern: hash,
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Find preflights not using shared patterns that should be migrated.
|
|
952
|
+
* Tracks adoption rate of shared glob-patterns.ts
|
|
953
|
+
*/
|
|
954
|
+
function findSharedPatternAdoption(analyses) {
|
|
955
|
+
const notUsingShared = analyses.filter((a) => !a.usesSharedPatterns);
|
|
956
|
+
const adoptionRate = (((analyses.length - notUsingShared.length) / analyses.length) *
|
|
957
|
+
100).toFixed(1);
|
|
958
|
+
// Only flag if adoption is below 20% (most preflights don't need shared patterns)
|
|
959
|
+
// This is just for tracking, not actionable
|
|
960
|
+
if (parseFloat(adoptionRate) < 20) {
|
|
961
|
+
issues.push({
|
|
962
|
+
type: "local-excludes",
|
|
963
|
+
severity: "info",
|
|
964
|
+
message: `Shared pattern adoption: ${adoptionRate}%. Consider migrating more preflights to use shared/glob-patterns.ts.`,
|
|
965
|
+
files: notUsingShared.slice(0, 5).map((a) => a.file),
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Find preflights with local EXCLUDED definitions that should use shared glob-patterns.ts
|
|
971
|
+
* This prevents the pattern duplication problem from recurring.
|
|
972
|
+
*
|
|
973
|
+
* Only flags const definitions with hardcoded glob strings (not regex patterns or spread operators).
|
|
974
|
+
*/
|
|
975
|
+
function findLocalExcludeDefinitions(analyses) {
|
|
976
|
+
const filesWithLocalExcludes = [];
|
|
977
|
+
for (const analysis of analyses) {
|
|
978
|
+
// Skip the shared glob-patterns file itself
|
|
979
|
+
if (analysis.file.includes("shared/glob-patterns"))
|
|
980
|
+
continue;
|
|
981
|
+
try {
|
|
982
|
+
const content = fs.readFileSync(analysis.file, "utf-8");
|
|
983
|
+
// Check if file has local EXCLUDED/EXCLUDED_PATHS/SKIP_PATTERNS const definition
|
|
984
|
+
// with hardcoded glob strings (not using spread from shared patterns)
|
|
985
|
+
const localExcludedMatch = content.match(/const\s+(?:EXCLUDED|EXCLUDED_PATHS|SKIP_PATTERNS)\s*=\s*\[([^\]]*)\]/s);
|
|
986
|
+
if (localExcludedMatch) {
|
|
987
|
+
const arrayContent = localExcludedMatch[1] || "";
|
|
988
|
+
// Skip if it uses spread operator from shared patterns (already migrated)
|
|
989
|
+
if (arrayContent.includes("...STANDARD_EXCLUDES") ||
|
|
990
|
+
arrayContent.includes("...CORE_EXCLUDES") ||
|
|
991
|
+
arrayContent.includes("...PRODUCTION_CODE_EXCLUDES") ||
|
|
992
|
+
arrayContent.includes("...FULL_EXCLUDES") ||
|
|
993
|
+
arrayContent.includes("extendExcludes")) {
|
|
994
|
+
continue;
|
|
995
|
+
}
|
|
996
|
+
// Skip if it's regex patterns (like /node_modules/) not glob strings
|
|
997
|
+
if (arrayContent.includes("/node_modules/") &&
|
|
998
|
+
!arrayContent.includes("'**/node_modules/**'") &&
|
|
999
|
+
!arrayContent.includes('"**/node_modules/**"')) {
|
|
1000
|
+
continue;
|
|
1001
|
+
}
|
|
1002
|
+
// Check if it has hardcoded glob strings like '**/node_modules/**'
|
|
1003
|
+
const hasHardcodedGlobs = /['"](\*\*\/[^'"]+|[^'"]*\*\.[a-z]+)['"]/.test(arrayContent);
|
|
1004
|
+
if (hasHardcodedGlobs) {
|
|
1005
|
+
filesWithLocalExcludes.push(analysis.file);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
catch {
|
|
1010
|
+
// Skip files that can't be read
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
if (filesWithLocalExcludes.length > 0) {
|
|
1014
|
+
issues.push({
|
|
1015
|
+
type: "duplicate-glob",
|
|
1016
|
+
severity: "error",
|
|
1017
|
+
message: `${filesWithLocalExcludes.length} preflight(s) define local EXCLUDED/SKIP_PATTERNS arrays with hardcoded globs instead of using shared/glob-patterns.ts. Run: pnpm tsx scripts/active/maintenance-tools/migrate-preflight-excludes.ts --apply`,
|
|
1018
|
+
files: filesWithLocalExcludes,
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
async function main() {
|
|
1023
|
+
const isVerbose = process.argv.includes("--verbose");
|
|
1024
|
+
const isJson = process.argv.includes("--json");
|
|
1025
|
+
if (!isJson) {
|
|
1026
|
+
console.log(`\n${console_chars_1.emoji.search} Preflight Redundancy Detection (blocking)\n`);
|
|
1027
|
+
console.log((0, console_chars_1.createDivider)(70, "heavy"));
|
|
1028
|
+
}
|
|
1029
|
+
// Find all preflight files
|
|
1030
|
+
const preflightFiles = await getPreflightFiles();
|
|
1031
|
+
if (!isJson) {
|
|
1032
|
+
console.log(`${console_chars_1.emoji.chart} Analyzing ${preflightFiles.length} preflight files...\n`);
|
|
1033
|
+
}
|
|
1034
|
+
// Analyze each preflight
|
|
1035
|
+
const analyses = [];
|
|
1036
|
+
for (const file of preflightFiles) {
|
|
1037
|
+
try {
|
|
1038
|
+
const analysis = await analyzePreflightFile(file);
|
|
1039
|
+
analyses.push(analysis);
|
|
1040
|
+
}
|
|
1041
|
+
catch (err) {
|
|
1042
|
+
if (!isJson) {
|
|
1043
|
+
console.warn(`${console_chars_1.emoji.warning} Could not analyze ${file}: ${err}`);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
// Find redundancies
|
|
1048
|
+
findDuplicatePatterns(analyses);
|
|
1049
|
+
findDuplicateGlobs(analyses);
|
|
1050
|
+
findDuplicateErrorCodes(analyses);
|
|
1051
|
+
findSimilarNames(analyses);
|
|
1052
|
+
findHighOverlap(analyses);
|
|
1053
|
+
findDomainFragmentation(analyses);
|
|
1054
|
+
findTestFileScanOverlap(analyses);
|
|
1055
|
+
findDuplicateContent(analyses);
|
|
1056
|
+
findSharedPatternAdoption(analyses);
|
|
1057
|
+
findLocalExcludeDefinitions(analyses);
|
|
1058
|
+
await findOrphanedPreflights(analyses);
|
|
1059
|
+
findBuildCommandRedundancy();
|
|
1060
|
+
// Find consolidation opportunities
|
|
1061
|
+
const consolidationOpportunities = findConsolidationOpportunities(analyses);
|
|
1062
|
+
// Report results
|
|
1063
|
+
const errors = issues.filter((i) => i.severity === "error");
|
|
1064
|
+
const warnings = issues.filter((i) => i.severity === "warning");
|
|
1065
|
+
const infos = issues.filter((i) => i.severity === "info");
|
|
1066
|
+
// JSON output for trend tracking
|
|
1067
|
+
if (isJson) {
|
|
1068
|
+
const report = {
|
|
1069
|
+
timestamp: new Date().toISOString(),
|
|
1070
|
+
totalPreflights: analyses.length,
|
|
1071
|
+
errors: errors.length,
|
|
1072
|
+
warnings: warnings.length,
|
|
1073
|
+
infos: infos.length,
|
|
1074
|
+
totalRegexPatterns: analyses.reduce((sum, a) => sum + a.regexPatterns.length, 0),
|
|
1075
|
+
totalErrorCodes: analyses.reduce((sum, a) => sum + a.errorCodes.length, 0),
|
|
1076
|
+
issues: issues,
|
|
1077
|
+
};
|
|
1078
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1079
|
+
process.exit(errors.length > 0 ? 1 : 0);
|
|
1080
|
+
}
|
|
1081
|
+
if (errors.length > 0) {
|
|
1082
|
+
console.log(`${console_chars_1.emoji.error} ERRORS (blocking - must fix):`);
|
|
1083
|
+
for (const issue of errors) {
|
|
1084
|
+
console.log(`\n [${issue.type}] ${issue.message}`);
|
|
1085
|
+
console.log(` Files: ${issue.files.map((f) => path.basename(f)).join(", ")}`);
|
|
1086
|
+
}
|
|
1087
|
+
console.log("");
|
|
1088
|
+
}
|
|
1089
|
+
if (warnings.length > 0) {
|
|
1090
|
+
console.log(`${console_chars_1.emoji.warning} WARNINGS (should fix):`);
|
|
1091
|
+
for (const issue of warnings.slice(0, 10)) {
|
|
1092
|
+
console.log(`\n [${issue.type}] ${issue.message}`);
|
|
1093
|
+
console.log(` Files: ${issue.files.map((f) => path.basename(f)).join(", ")}`);
|
|
1094
|
+
}
|
|
1095
|
+
if (warnings.length > 10) {
|
|
1096
|
+
console.log(`\n ... and ${warnings.length - 10} more warnings`);
|
|
1097
|
+
}
|
|
1098
|
+
console.log("");
|
|
1099
|
+
}
|
|
1100
|
+
if (infos.length > 0 && isVerbose) {
|
|
1101
|
+
console.log(`${console_chars_1.emoji.info} INFO (for awareness):`);
|
|
1102
|
+
for (const issue of infos.slice(0, 5)) {
|
|
1103
|
+
console.log(` [${issue.type}] ${issue.message}`);
|
|
1104
|
+
}
|
|
1105
|
+
if (infos.length > 5) {
|
|
1106
|
+
console.log(` ... and ${infos.length - 5} more info items`);
|
|
1107
|
+
}
|
|
1108
|
+
console.log("");
|
|
1109
|
+
}
|
|
1110
|
+
// Show consolidation opportunities
|
|
1111
|
+
if (consolidationOpportunities.length > 0) {
|
|
1112
|
+
console.log(`\n${console_chars_1.emoji.hint} CONSOLIDATION OPPORTUNITIES:`);
|
|
1113
|
+
console.log((0, console_chars_1.createDivider)(70, "light"));
|
|
1114
|
+
const highPriority = consolidationOpportunities.filter((o) => o.priority === "high");
|
|
1115
|
+
const mediumPriority = consolidationOpportunities.filter((o) => o.priority === "medium");
|
|
1116
|
+
if (highPriority.length > 0) {
|
|
1117
|
+
console.log(`\n ${console_chars_1.emoji.error} HIGH PRIORITY (5+ files):`);
|
|
1118
|
+
for (const opp of highPriority) {
|
|
1119
|
+
console.log(`\n Category: ${opp.category}`);
|
|
1120
|
+
console.log(` Reason: ${opp.reason}`);
|
|
1121
|
+
console.log(` Suggested: consolidated/${opp.suggestedName}.ts`);
|
|
1122
|
+
console.log(` Files: ${opp.files
|
|
1123
|
+
.slice(0, 5)
|
|
1124
|
+
.map((f) => path.basename(f))
|
|
1125
|
+
.join(", ")}${opp.files.length > 5 ? ` (+${opp.files.length - 5} more)` : ""}`);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
if (mediumPriority.length > 0 && isVerbose) {
|
|
1129
|
+
console.log(`\n ${console_chars_1.emoji.warning} MEDIUM PRIORITY (3-4 files):`);
|
|
1130
|
+
for (const opp of mediumPriority.slice(0, 5)) {
|
|
1131
|
+
console.log(`\n Category: ${opp.category}`);
|
|
1132
|
+
console.log(` Reason: ${opp.reason}`);
|
|
1133
|
+
console.log(` Suggested: consolidated/${opp.suggestedName}.ts`);
|
|
1134
|
+
}
|
|
1135
|
+
if (mediumPriority.length > 5) {
|
|
1136
|
+
console.log(`\n ... and ${mediumPriority.length - 5} more medium priority opportunities`);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
console.log(`\n Total opportunities: ${consolidationOpportunities.length} (${highPriority.length} high, ${mediumPriority.length} medium)`);
|
|
1140
|
+
}
|
|
1141
|
+
// Summary
|
|
1142
|
+
console.log((0, console_chars_1.createDivider)(70, "heavy"));
|
|
1143
|
+
console.log(`${console_chars_1.emoji.chart} Summary: ${errors.length} errors, ${warnings.length} warnings, ${infos.length} info`);
|
|
1144
|
+
console.log(` Analyzed: ${analyses.length} preflights`);
|
|
1145
|
+
console.log(` Total regex patterns: ${analyses.reduce((sum, a) => sum + a.regexPatterns.length, 0)}`);
|
|
1146
|
+
console.log(` Total error codes: ${analyses.reduce((sum, a) => sum + a.errorCodes.length, 0)}`);
|
|
1147
|
+
// Shared pattern adoption stats
|
|
1148
|
+
const usingShared = analyses.filter((a) => a.usesSharedPatterns).length;
|
|
1149
|
+
console.log(` Shared pattern adoption: ${usingShared}/${analyses.length} (${((usingShared / analyses.length) * 100).toFixed(0)}%)`);
|
|
1150
|
+
if (errors.length === 0) {
|
|
1151
|
+
console.log(`\n${console_chars_1.emoji.success} No critical redundancies detected\n`);
|
|
1152
|
+
process.exit(0);
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
console.log(`\n${console_chars_1.emoji.error} Fix redundancies before continuing\n`);
|
|
1156
|
+
console.log(`${console_chars_1.emoji.hint} Suggestions:`);
|
|
1157
|
+
console.log(` ${console_chars_1.chars.bullet} Merge preflights with high overlap into consolidated modules`);
|
|
1158
|
+
console.log(` ${console_chars_1.chars.bullet} Remove duplicate error codes (use unique codes per check)`);
|
|
1159
|
+
console.log(` ${console_chars_1.chars.bullet} Consider if similar-named preflights should be combined`);
|
|
1160
|
+
console.log(" ${chars.bullet} Run: pnpm preflight:migrate-excludes --apply to fix local excludes");
|
|
1161
|
+
process.exit(1);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
main().catch((err) => {
|
|
1165
|
+
console.error(`${console_chars_1.emoji.error} Preflight redundancy detection crashed:`, err);
|
|
1166
|
+
process.exit(1);
|
|
1167
|
+
});
|
|
1168
|
+
//# sourceMappingURL=preflight-redundancy-detection.js.map
|