@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,1208 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Next.js 16+ Compatibility Preflight (BLOCKING)
|
|
5
|
+
*
|
|
6
|
+
* Ensures codebase is ready for Next.js 16 and future versions.
|
|
7
|
+
* Detects deprecated patterns and enforces new APIs.
|
|
8
|
+
*
|
|
9
|
+
* Key Next.js 16 Changes:
|
|
10
|
+
* 1. Turbopack is default (no --turbopack flag needed)
|
|
11
|
+
* 2. Async Request APIs are REQUIRED (no sync fallback)
|
|
12
|
+
* 3. middleware.ts renamed to proxy.ts (edge runtime deprecated)
|
|
13
|
+
* 4. React 19.2 with React Compiler support
|
|
14
|
+
* 5. cacheLife/cacheTag stable (no unstable_ prefix)
|
|
15
|
+
* 6. PPR via cacheComponents (not experimental_ppr)
|
|
16
|
+
* 7. next/legacy/image deprecated
|
|
17
|
+
* 8. images.domains deprecated (use remotePatterns)
|
|
18
|
+
* 9. Parallel routes require default.js
|
|
19
|
+
* 10. ESLint flat config default
|
|
20
|
+
* 11. SSR/Client boundary validation (Turbopack module instantiation)
|
|
21
|
+
* 12. Date.now()/new Date() in Client Components require Suspense boundary
|
|
22
|
+
* 13. generateStaticParams must be async
|
|
23
|
+
* 14. next/router removed (use next/navigation)
|
|
24
|
+
* 15. next/font optimization changes
|
|
25
|
+
* 16. instrumentation.ts for monitoring setup
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* pnpm preflight:nextjs16 # All checks
|
|
29
|
+
* pnpm preflight:nextjs16:verbose # Detailed output
|
|
30
|
+
* pnpm preflight:nextjs16:warn # Warning mode (non-blocking)
|
|
31
|
+
* pnpm preflight:nextjs16:json # JSON output for CI
|
|
32
|
+
* pnpm preflight:nextjs16:fix # Auto-fix simple issues
|
|
33
|
+
*/
|
|
34
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
35
|
+
if (k2 === undefined) k2 = k;
|
|
36
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
37
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
38
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(o, k2, desc);
|
|
41
|
+
}) : (function(o, m, k, k2) {
|
|
42
|
+
if (k2 === undefined) k2 = k;
|
|
43
|
+
o[k2] = m[k];
|
|
44
|
+
}));
|
|
45
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
46
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
47
|
+
}) : function(o, v) {
|
|
48
|
+
o["default"] = v;
|
|
49
|
+
});
|
|
50
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
51
|
+
var ownKeys = function(o) {
|
|
52
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
53
|
+
var ar = [];
|
|
54
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
55
|
+
return ar;
|
|
56
|
+
};
|
|
57
|
+
return ownKeys(o);
|
|
58
|
+
};
|
|
59
|
+
return function (mod) {
|
|
60
|
+
if (mod && mod.__esModule) return mod;
|
|
61
|
+
var result = {};
|
|
62
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
63
|
+
__setModuleDefault(result, mod);
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
})();
|
|
67
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68
|
+
exports.tags = exports.description = exports.blocking = exports.category = exports.name = exports.id = void 0;
|
|
69
|
+
const crypto_1 = require("crypto");
|
|
70
|
+
const fs = __importStar(require("fs"));
|
|
71
|
+
const glob_1 = require("glob");
|
|
72
|
+
const path = __importStar(require("path"));
|
|
73
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
74
|
+
const file_cache_1 = require("../../shared/file-cache");
|
|
75
|
+
const glob_patterns_1 = require("../../shared/glob-patterns");
|
|
76
|
+
// Check metadata
|
|
77
|
+
exports.id = "nextjs/nextjs16-compatibility";
|
|
78
|
+
exports.name = "Nextjs16 Compatibility";
|
|
79
|
+
exports.category = "nextjs";
|
|
80
|
+
exports.blocking = true;
|
|
81
|
+
exports.description = "Next.js 16+ Compatibility Preflight (BLOCKING)";
|
|
82
|
+
exports.tags = ["nextjs"];
|
|
83
|
+
// Cache file for incremental scanning
|
|
84
|
+
const CACHE_FILE = ".next/preflight-nextjs16-cache.json";
|
|
85
|
+
const EXCLUDED = (0, glob_patterns_1.extendExcludes)(glob_patterns_1.STANDARD_EXCLUDES_WITH_TESTS, [
|
|
86
|
+
"**/test-results/**",
|
|
87
|
+
"**/scripts/active/preflights/**",
|
|
88
|
+
]);
|
|
89
|
+
// CHECK 1: Async Request APIs (cookies, headers, params, searchParams)
|
|
90
|
+
function checkAsyncRequestAPIs(filePath, content) {
|
|
91
|
+
const issues = [];
|
|
92
|
+
const lines = content.split("\n");
|
|
93
|
+
// Only check app directory files for params/searchParams
|
|
94
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
95
|
+
const isAppDir = normalizedPath.includes("/app/");
|
|
96
|
+
// Patterns for synchronous access that should be async
|
|
97
|
+
const syncPatterns = [
|
|
98
|
+
// Direct destructuring without await
|
|
99
|
+
{ pattern: /const\s*\{\s*(cookies|headers)\s*\}\s*=\s*(?!await)/, api: "cookies/headers" },
|
|
100
|
+
// Synchronous cookies() call
|
|
101
|
+
{ pattern: /(?<!await\s+)cookies\(\)\.get\(/, api: "cookies" },
|
|
102
|
+
{ pattern: /(?<!await\s+)cookies\(\)\.set\(/, api: "cookies" },
|
|
103
|
+
{ pattern: /(?<!await\s+)cookies\(\)\.delete\(/, api: "cookies" },
|
|
104
|
+
// Synchronous headers() call
|
|
105
|
+
{ pattern: /(?<!await\s+)headers\(\)\.get\(/, api: "headers" },
|
|
106
|
+
];
|
|
107
|
+
// Only check params/searchParams in app directory page/layout files
|
|
108
|
+
if (isAppDir && normalizedPath.match(/\/(page|layout)\.(ts|tsx|js|jsx)$/)) {
|
|
109
|
+
// params without Promise type in function signature (not type definitions)
|
|
110
|
+
syncPatterns.push({
|
|
111
|
+
pattern: /(?:async\s+)?function\s+\w+\s*\(\s*\{\s*params\s*\}\s*:\s*\{\s*params:\s*\{/,
|
|
112
|
+
api: "params",
|
|
113
|
+
}, {
|
|
114
|
+
pattern: /(?:async\s+)?function\s+\w+\s*\(\s*\{\s*searchParams\s*\}\s*:\s*\{\s*searchParams:\s*\{/,
|
|
115
|
+
api: "searchParams",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
lines.forEach((line, idx) => {
|
|
119
|
+
for (const { pattern, api } of syncPatterns) {
|
|
120
|
+
if (pattern.test(line)) {
|
|
121
|
+
// Skip if it's a type definition or interface
|
|
122
|
+
if (line.includes("interface") || line.includes("type ") || line.includes("Promise<")) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
issues.push({
|
|
126
|
+
file: filePath,
|
|
127
|
+
line: idx + 1,
|
|
128
|
+
type: "sync-request-api",
|
|
129
|
+
severity: "error",
|
|
130
|
+
message: `Synchronous ${api} access is removed in Next.js 16`,
|
|
131
|
+
suggestion: `Use async/await: const ${api} = await ${api}()`,
|
|
132
|
+
snippet: line.trim(),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
return issues;
|
|
138
|
+
}
|
|
139
|
+
// CHECK 2: Deprecated unstable_ prefixes
|
|
140
|
+
function checkUnstablePrefixes(filePath, content) {
|
|
141
|
+
const issues = [];
|
|
142
|
+
const lines = content.split("\n");
|
|
143
|
+
const deprecatedPrefixes = [
|
|
144
|
+
// unstable_cache still works in Next.js 16, just deprecated - mark as info
|
|
145
|
+
// Migration to "use cache" directive requires experimental dynamicIO flag
|
|
146
|
+
{
|
|
147
|
+
pattern: /unstable_cache/,
|
|
148
|
+
replacement: '"use cache" directive (requires dynamicIO)',
|
|
149
|
+
api: "unstable_cache",
|
|
150
|
+
severity: "info",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
pattern: /unstable_noStore/,
|
|
154
|
+
replacement: "noStore",
|
|
155
|
+
api: "unstable_noStore",
|
|
156
|
+
severity: "warning",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
pattern: /unstable_cacheLife/,
|
|
160
|
+
replacement: "cacheLife",
|
|
161
|
+
api: "unstable_cacheLife",
|
|
162
|
+
severity: "warning",
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pattern: /unstable_cacheTag/,
|
|
166
|
+
replacement: "cacheTag",
|
|
167
|
+
api: "unstable_cacheTag",
|
|
168
|
+
severity: "warning",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
pattern: /experimental_ppr/,
|
|
172
|
+
replacement: "cacheComponents",
|
|
173
|
+
api: "experimental_ppr",
|
|
174
|
+
severity: "warning",
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
lines.forEach((line, idx) => {
|
|
178
|
+
for (const { pattern, replacement, api, severity } of deprecatedPrefixes) {
|
|
179
|
+
if (pattern.test(line)) {
|
|
180
|
+
issues.push({
|
|
181
|
+
file: filePath,
|
|
182
|
+
line: idx + 1,
|
|
183
|
+
type: "deprecated-unstable-prefix",
|
|
184
|
+
severity,
|
|
185
|
+
message: `${api} is deprecated in Next.js 16`,
|
|
186
|
+
suggestion: `Use ${replacement} instead`,
|
|
187
|
+
snippet: line.trim(),
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return issues;
|
|
193
|
+
}
|
|
194
|
+
// CHECK 3: Legacy Image Component
|
|
195
|
+
function checkLegacyImage(filePath, content) {
|
|
196
|
+
const issues = [];
|
|
197
|
+
// Skip preflight files (they contain the pattern in check logic)
|
|
198
|
+
if (filePath.includes("preflights"))
|
|
199
|
+
return issues;
|
|
200
|
+
const lines = content.split("\n");
|
|
201
|
+
lines.forEach((line, idx) => {
|
|
202
|
+
if (line.includes("next/legacy/image") || line.includes("from 'next/legacy/image'")) {
|
|
203
|
+
issues.push({
|
|
204
|
+
file: filePath,
|
|
205
|
+
line: idx + 1,
|
|
206
|
+
type: "legacy-image",
|
|
207
|
+
severity: "error",
|
|
208
|
+
message: "next/legacy/image is deprecated in Next.js 16",
|
|
209
|
+
suggestion: "Migrate to next/image with updated props",
|
|
210
|
+
snippet: line.trim(),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
return issues;
|
|
215
|
+
}
|
|
216
|
+
// CHECK 4: useFormState (deprecated, use useActionState)
|
|
217
|
+
function checkUseFormState(filePath, content) {
|
|
218
|
+
const issues = [];
|
|
219
|
+
const lines = content.split("\n");
|
|
220
|
+
lines.forEach((line, idx) => {
|
|
221
|
+
if (line.includes("useFormState") && !line.includes("useActionState")) {
|
|
222
|
+
issues.push({
|
|
223
|
+
file: filePath,
|
|
224
|
+
line: idx + 1,
|
|
225
|
+
type: "deprecated-useFormState",
|
|
226
|
+
severity: "warning",
|
|
227
|
+
message: "useFormState is deprecated in React 19",
|
|
228
|
+
suggestion: "Use useActionState instead (includes pending state)",
|
|
229
|
+
snippet: line.trim(),
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
return issues;
|
|
234
|
+
}
|
|
235
|
+
// CHECK 5: Middleware to Proxy migration
|
|
236
|
+
// CACHED FILE LISTS - Scan once, use everywhere
|
|
237
|
+
let _cachedAllCodeFiles = null;
|
|
238
|
+
async function getAllCodeFiles() {
|
|
239
|
+
if (!_cachedAllCodeFiles) {
|
|
240
|
+
_cachedAllCodeFiles = await file_cache_1.fileCache.getAllCodeFiles();
|
|
241
|
+
}
|
|
242
|
+
return _cachedAllCodeFiles;
|
|
243
|
+
}
|
|
244
|
+
async function checkMiddlewareFile() {
|
|
245
|
+
const issues = [];
|
|
246
|
+
// Check if middleware.ts exists (should be renamed to proxy.ts in Next.js 16)
|
|
247
|
+
const middlewarePaths = [
|
|
248
|
+
"middleware.ts",
|
|
249
|
+
"middleware.js",
|
|
250
|
+
"src/middleware.ts",
|
|
251
|
+
"src/middleware.js",
|
|
252
|
+
];
|
|
253
|
+
for (const middlewarePath of middlewarePaths) {
|
|
254
|
+
if (fs.existsSync(middlewarePath)) {
|
|
255
|
+
const content = fs.readFileSync(middlewarePath, "utf-8");
|
|
256
|
+
// Check if using edge runtime (deprecated in proxy)
|
|
257
|
+
if (content.includes("runtime = 'edge'") || content.includes('runtime: "edge"')) {
|
|
258
|
+
issues.push({
|
|
259
|
+
file: middlewarePath,
|
|
260
|
+
line: 1,
|
|
261
|
+
type: "middleware-edge-runtime",
|
|
262
|
+
severity: "info",
|
|
263
|
+
message: "Edge runtime in middleware is deprecated in Next.js 16",
|
|
264
|
+
suggestion: "Rename to proxy.ts and use nodejs runtime, or keep middleware.ts for edge",
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
// Check for deprecated export name
|
|
268
|
+
if (content.includes("export function middleware") ||
|
|
269
|
+
content.includes("export const middleware")) {
|
|
270
|
+
issues.push({
|
|
271
|
+
file: middlewarePath,
|
|
272
|
+
line: 1,
|
|
273
|
+
type: "middleware-export-name",
|
|
274
|
+
severity: "info",
|
|
275
|
+
message: "Consider renaming middleware to proxy for Next.js 16",
|
|
276
|
+
suggestion: "Rename file to proxy.ts and export function proxy()",
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return issues;
|
|
282
|
+
}
|
|
283
|
+
// CHECK 5b: generateStaticParams must be async
|
|
284
|
+
function checkGenerateStaticParams(filePath, content) {
|
|
285
|
+
const issues = [];
|
|
286
|
+
const lines = content.split("\n");
|
|
287
|
+
// Only check page files in app directory
|
|
288
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
289
|
+
if (!normalizedPath.includes("/app/") || !normalizedPath.match(/\/page\.(ts|tsx|js|jsx)$/)) {
|
|
290
|
+
return issues;
|
|
291
|
+
}
|
|
292
|
+
lines.forEach((line, idx) => {
|
|
293
|
+
// Check for non-async generateStaticParams
|
|
294
|
+
if (/export\s+function\s+generateStaticParams\s*\(/.test(line) &&
|
|
295
|
+
!/export\s+async\s+function\s+generateStaticParams/.test(line)) {
|
|
296
|
+
issues.push({
|
|
297
|
+
file: filePath,
|
|
298
|
+
line: idx + 1,
|
|
299
|
+
type: "sync-generateStaticParams",
|
|
300
|
+
severity: "error",
|
|
301
|
+
message: "generateStaticParams must be async in Next.js 16",
|
|
302
|
+
suggestion: "Change to: export async function generateStaticParams()",
|
|
303
|
+
snippet: line.trim(),
|
|
304
|
+
fixable: true,
|
|
305
|
+
fixType: "rename-api",
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// Also check const arrow function syntax
|
|
309
|
+
if (/export\s+const\s+generateStaticParams\s*=\s*\(/.test(line) &&
|
|
310
|
+
!/export\s+const\s+generateStaticParams\s*=\s*async/.test(line)) {
|
|
311
|
+
issues.push({
|
|
312
|
+
file: filePath,
|
|
313
|
+
line: idx + 1,
|
|
314
|
+
type: "sync-generateStaticParams",
|
|
315
|
+
severity: "error",
|
|
316
|
+
message: "generateStaticParams must be async in Next.js 16",
|
|
317
|
+
suggestion: "Change to: export const generateStaticParams = async () =>",
|
|
318
|
+
snippet: line.trim(),
|
|
319
|
+
fixable: true,
|
|
320
|
+
fixType: "rename-api",
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
return issues;
|
|
325
|
+
}
|
|
326
|
+
// CHECK 5c: next/router is removed (use next/navigation)
|
|
327
|
+
function checkNextRouter(filePath, content) {
|
|
328
|
+
const issues = [];
|
|
329
|
+
const lines = content.split("\n");
|
|
330
|
+
// Only check app directory files
|
|
331
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
332
|
+
if (!normalizedPath.includes("/app/") && !normalizedPath.includes("/components/")) {
|
|
333
|
+
return issues;
|
|
334
|
+
}
|
|
335
|
+
lines.forEach((line, idx) => {
|
|
336
|
+
// Check for next/router imports
|
|
337
|
+
if (/from\s+['"]next\/router['"]/.test(line) ||
|
|
338
|
+
/require\s*\(\s*['"]next\/router['"]\s*\)/.test(line)) {
|
|
339
|
+
issues.push({
|
|
340
|
+
file: filePath,
|
|
341
|
+
line: idx + 1,
|
|
342
|
+
type: "deprecated-next-router",
|
|
343
|
+
severity: "error",
|
|
344
|
+
message: "next/router is removed in App Router - use next/navigation",
|
|
345
|
+
suggestion: "Replace with: import { useRouter, usePathname, useSearchParams } from 'next/navigation'",
|
|
346
|
+
snippet: line.trim(),
|
|
347
|
+
fixable: true,
|
|
348
|
+
fixType: "replace-import",
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
// Check for useRouter from next/router specifically
|
|
352
|
+
if (/useRouter\s*\(\s*\)/.test(line) && content.includes("from 'next/router'")) {
|
|
353
|
+
// Additional check - router.query is not available in next/navigation
|
|
354
|
+
if (content.includes("router.query") || content.includes(".query")) {
|
|
355
|
+
issues.push({
|
|
356
|
+
file: filePath,
|
|
357
|
+
line: idx + 1,
|
|
358
|
+
type: "router-query-deprecated",
|
|
359
|
+
severity: "error",
|
|
360
|
+
message: "router.query is not available in next/navigation",
|
|
361
|
+
suggestion: "Use useSearchParams() or useParams() instead",
|
|
362
|
+
snippet: line.trim(),
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
return issues;
|
|
368
|
+
}
|
|
369
|
+
// CHECK 5d: next/font changes
|
|
370
|
+
function checkNextFont(filePath, content) {
|
|
371
|
+
const issues = [];
|
|
372
|
+
const lines = content.split("\n");
|
|
373
|
+
lines.forEach((line, idx) => {
|
|
374
|
+
// Check for deprecated font loading patterns
|
|
375
|
+
if (/from\s+['"]@next\/font\//.test(line)) {
|
|
376
|
+
issues.push({
|
|
377
|
+
file: filePath,
|
|
378
|
+
line: idx + 1,
|
|
379
|
+
type: "deprecated-next-font-import",
|
|
380
|
+
severity: "warning",
|
|
381
|
+
message: "@next/font is deprecated - use next/font",
|
|
382
|
+
suggestion: "Replace @next/font/google with next/font/google",
|
|
383
|
+
snippet: line.trim(),
|
|
384
|
+
fixable: true,
|
|
385
|
+
fixType: "replace-import",
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
// Check for font display swap (now default, explicit setting may conflict)
|
|
389
|
+
// Skip comments
|
|
390
|
+
const trimmedLine = line.trim();
|
|
391
|
+
if (!trimmedLine.startsWith("//") &&
|
|
392
|
+
/display:\s*['"]swap['"]/.test(line) &&
|
|
393
|
+
content.includes("next/font")) {
|
|
394
|
+
issues.push({
|
|
395
|
+
file: filePath,
|
|
396
|
+
line: idx + 1,
|
|
397
|
+
type: "font-display-default",
|
|
398
|
+
severity: "info",
|
|
399
|
+
message: "display: 'swap' is now the default in Next.js 16",
|
|
400
|
+
suggestion: 'You can remove explicit display: "swap" as it\'s the default',
|
|
401
|
+
snippet: line.trim(),
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
return issues;
|
|
406
|
+
}
|
|
407
|
+
// CHECK 5e: Pages Router APIs in App Directory
|
|
408
|
+
function checkPagesRouterAPIs(filePath, content) {
|
|
409
|
+
const issues = [];
|
|
410
|
+
const lines = content.split("\n");
|
|
411
|
+
// Only check app directory files
|
|
412
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
413
|
+
if (!normalizedPath.includes("/app/")) {
|
|
414
|
+
return issues;
|
|
415
|
+
}
|
|
416
|
+
const pagesRouterAPIs = [
|
|
417
|
+
{ pattern: /export\s+(async\s+)?function\s+getServerSideProps/, api: "getServerSideProps" },
|
|
418
|
+
{ pattern: /export\s+(async\s+)?function\s+getStaticProps/, api: "getStaticProps" },
|
|
419
|
+
{ pattern: /export\s+(async\s+)?function\s+getInitialProps/, api: "getInitialProps" },
|
|
420
|
+
{ pattern: /export\s+const\s+getServerSideProps/, api: "getServerSideProps" },
|
|
421
|
+
{ pattern: /export\s+const\s+getStaticProps/, api: "getStaticProps" },
|
|
422
|
+
];
|
|
423
|
+
lines.forEach((line, idx) => {
|
|
424
|
+
for (const { pattern, api } of pagesRouterAPIs) {
|
|
425
|
+
if (pattern.test(line)) {
|
|
426
|
+
issues.push({
|
|
427
|
+
file: filePath,
|
|
428
|
+
line: idx + 1,
|
|
429
|
+
type: "pages-router-api-in-app",
|
|
430
|
+
severity: "error",
|
|
431
|
+
message: `${api} is a Pages Router API - not supported in App Router`,
|
|
432
|
+
suggestion: "Use Server Components with async/await, or generateStaticParams for static generation",
|
|
433
|
+
snippet: line.trim(),
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
return issues;
|
|
439
|
+
}
|
|
440
|
+
// CHECK 5f: instrumentation.ts location
|
|
441
|
+
async function checkInstrumentationFile() {
|
|
442
|
+
const issues = [];
|
|
443
|
+
// Check for instrumentation file in wrong locations
|
|
444
|
+
const wrongLocations = [
|
|
445
|
+
"src/instrumentation.ts",
|
|
446
|
+
"src/instrumentation.js",
|
|
447
|
+
"app/instrumentation.ts",
|
|
448
|
+
"app/instrumentation.js",
|
|
449
|
+
];
|
|
450
|
+
const correctLocations = ["instrumentation.ts", "instrumentation.js"];
|
|
451
|
+
const hasCorrectLocation = correctLocations.some((f) => fs.existsSync(f));
|
|
452
|
+
for (const wrongPath of wrongLocations) {
|
|
453
|
+
if (fs.existsSync(wrongPath)) {
|
|
454
|
+
issues.push({
|
|
455
|
+
file: wrongPath,
|
|
456
|
+
line: 1,
|
|
457
|
+
type: "instrumentation-wrong-location",
|
|
458
|
+
severity: "warning",
|
|
459
|
+
message: "instrumentation.ts should be in project root in Next.js 16",
|
|
460
|
+
suggestion: "Move to project root: instrumentation.ts",
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
// Info if no instrumentation file exists (optional feature)
|
|
465
|
+
if (!hasCorrectLocation && wrongLocations.every((f) => !fs.existsSync(f))) {
|
|
466
|
+
// This is optional, don't report
|
|
467
|
+
}
|
|
468
|
+
return issues;
|
|
469
|
+
}
|
|
470
|
+
// CHECK 5g: Metadata file conventions
|
|
471
|
+
async function checkMetadataFiles() {
|
|
472
|
+
const issues = [];
|
|
473
|
+
// Find opengraph and twitter image files with old naming
|
|
474
|
+
const oldPatterns = await (0, glob_1.glob)("app/**/og.{png,jpg,jpeg,gif}", { ignore: EXCLUDED });
|
|
475
|
+
const oldTwitterPatterns = await (0, glob_1.glob)("app/**/twitter.{png,jpg,jpeg,gif}", { ignore: EXCLUDED });
|
|
476
|
+
for (const file of oldPatterns) {
|
|
477
|
+
issues.push({
|
|
478
|
+
file,
|
|
479
|
+
line: 1,
|
|
480
|
+
type: "deprecated-og-image-name",
|
|
481
|
+
severity: "info",
|
|
482
|
+
message: "og.png naming convention - consider using opengraph-image.png",
|
|
483
|
+
suggestion: "Rename to opengraph-image.png for Next.js 16 convention",
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
for (const file of oldTwitterPatterns) {
|
|
487
|
+
issues.push({
|
|
488
|
+
file,
|
|
489
|
+
line: 1,
|
|
490
|
+
type: "deprecated-twitter-image-name",
|
|
491
|
+
severity: "info",
|
|
492
|
+
message: "twitter.png naming convention - consider using twitter-image.png",
|
|
493
|
+
suggestion: "Rename to twitter-image.png for Next.js 16 convention",
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
return issues;
|
|
497
|
+
}
|
|
498
|
+
// CHECK 6: Parallel Routes default.js requirement
|
|
499
|
+
async function checkParallelRoutes() {
|
|
500
|
+
const issues = [];
|
|
501
|
+
// Find all parallel route slots (directories starting with @)
|
|
502
|
+
const parallelRoutes = await (0, glob_1.glob)("app/**/@*/", { ignore: EXCLUDED });
|
|
503
|
+
for (const routeDir of parallelRoutes) {
|
|
504
|
+
const defaultFile = ["default.tsx", "default.ts", "default.js", "default.jsx"]
|
|
505
|
+
.map((f) => path.join(routeDir, f))
|
|
506
|
+
.find((f) => fs.existsSync(f));
|
|
507
|
+
if (!defaultFile) {
|
|
508
|
+
issues.push({
|
|
509
|
+
file: routeDir,
|
|
510
|
+
line: 1,
|
|
511
|
+
type: "missing-parallel-route-default",
|
|
512
|
+
severity: "error",
|
|
513
|
+
message: "Parallel route slot missing default.js file",
|
|
514
|
+
suggestion: "Create default.tsx that returns null or calls notFound()",
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return issues;
|
|
519
|
+
}
|
|
520
|
+
// CHECK 7: Config deprecations
|
|
521
|
+
function checkNextConfig() {
|
|
522
|
+
const issues = [];
|
|
523
|
+
const configPaths = ["next.config.js", "next.config.mjs", "next.config.ts"];
|
|
524
|
+
for (const configPath of configPaths) {
|
|
525
|
+
if (!fs.existsSync(configPath))
|
|
526
|
+
continue;
|
|
527
|
+
const content = fs.readFileSync(configPath, "utf-8");
|
|
528
|
+
const lines = content.split("\n");
|
|
529
|
+
lines.forEach((line, idx) => {
|
|
530
|
+
// Check for deprecated images.domains
|
|
531
|
+
if (line.includes("domains:") && !line.includes("remotePatterns")) {
|
|
532
|
+
issues.push({
|
|
533
|
+
file: configPath,
|
|
534
|
+
line: idx + 1,
|
|
535
|
+
type: "deprecated-images-domains",
|
|
536
|
+
severity: "warning",
|
|
537
|
+
message: "images.domains is deprecated in Next.js 16",
|
|
538
|
+
suggestion: "Use images.remotePatterns instead for better security",
|
|
539
|
+
snippet: line.trim(),
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
// Check for experimental.turbopack (now top-level)
|
|
543
|
+
if (line.includes("experimental") && line.includes("turbopack")) {
|
|
544
|
+
issues.push({
|
|
545
|
+
file: configPath,
|
|
546
|
+
line: idx + 1,
|
|
547
|
+
type: "experimental-turbopack",
|
|
548
|
+
severity: "info",
|
|
549
|
+
message: "experimental.turbopack is now a top-level config",
|
|
550
|
+
suggestion: "Move turbopack config to top level: turbopack: { ... }",
|
|
551
|
+
snippet: line.trim(),
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
// Check for skipMiddlewareUrlNormalize (renamed)
|
|
555
|
+
if (line.includes("skipMiddlewareUrlNormalize")) {
|
|
556
|
+
issues.push({
|
|
557
|
+
file: configPath,
|
|
558
|
+
line: idx + 1,
|
|
559
|
+
type: "renamed-config-option",
|
|
560
|
+
severity: "warning",
|
|
561
|
+
message: "skipMiddlewareUrlNormalize renamed to skipProxyUrlNormalize",
|
|
562
|
+
suggestion: "Rename to skipProxyUrlNormalize",
|
|
563
|
+
snippet: line.trim(),
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
// Check for serverRuntimeConfig/publicRuntimeConfig (removed)
|
|
567
|
+
if (line.includes("serverRuntimeConfig") || line.includes("publicRuntimeConfig")) {
|
|
568
|
+
issues.push({
|
|
569
|
+
file: configPath,
|
|
570
|
+
line: idx + 1,
|
|
571
|
+
type: "removed-runtime-config",
|
|
572
|
+
severity: "error",
|
|
573
|
+
message: "serverRuntimeConfig and publicRuntimeConfig are removed in Next.js 16",
|
|
574
|
+
suggestion: "Use environment variables instead (NEXT_PUBLIC_ for client)",
|
|
575
|
+
snippet: line.trim(),
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
return issues;
|
|
581
|
+
}
|
|
582
|
+
// CHECK 8: SSR/Client Component Boundary Validation (Turbopack)
|
|
583
|
+
function checkSSRClientBoundary(filePath, content) {
|
|
584
|
+
const issues = [];
|
|
585
|
+
const lines = content.split("\n");
|
|
586
|
+
// Skip test files, scripts, and pure utility files
|
|
587
|
+
if (filePath.includes(".test.") ||
|
|
588
|
+
filePath.includes(".spec.") ||
|
|
589
|
+
filePath.includes("scripts/") ||
|
|
590
|
+
filePath.includes("__mocks__/") ||
|
|
591
|
+
filePath.includes("prisma/")) {
|
|
592
|
+
return issues;
|
|
593
|
+
}
|
|
594
|
+
const hasUseClient = content.includes('"use client"') || content.includes("'use client'");
|
|
595
|
+
// Client-only APIs that require "use client" directive
|
|
596
|
+
const clientOnlyPatterns = [
|
|
597
|
+
{ pattern: /\buseEffect\s*\(/, api: "useEffect", type: "hook" },
|
|
598
|
+
{ pattern: /\buseState\s*[<(]/, api: "useState", type: "hook" },
|
|
599
|
+
{ pattern: /\buseRef\s*[<(]/, api: "useRef", type: "hook" },
|
|
600
|
+
{ pattern: /\buseCallback\s*[<(]/, api: "useCallback", type: "hook" },
|
|
601
|
+
{ pattern: /\buseMemo\s*[<(]/, api: "useMemo", type: "hook" },
|
|
602
|
+
{ pattern: /\buseContext\s*\(/, api: "useContext", type: "hook" },
|
|
603
|
+
{ pattern: /\buseReducer\s*[<(]/, api: "useReducer", type: "hook" },
|
|
604
|
+
{ pattern: /\buseLayoutEffect\s*\(/, api: "useLayoutEffect", type: "hook" },
|
|
605
|
+
{ pattern: /\bdocument\.(?!cookie)/, api: "document", type: "browser-api" },
|
|
606
|
+
{ pattern: /\bwindow\.(?!location\.origin)/, api: "window", type: "browser-api" },
|
|
607
|
+
{ pattern: /\blocalStorage\./, api: "localStorage", type: "browser-api" },
|
|
608
|
+
{ pattern: /\bsessionStorage\./, api: "sessionStorage", type: "browser-api" },
|
|
609
|
+
];
|
|
610
|
+
// Check if file uses client-only APIs without "use client"
|
|
611
|
+
if (!hasUseClient) {
|
|
612
|
+
const detectedAPIs = [];
|
|
613
|
+
lines.forEach((line, idx) => {
|
|
614
|
+
// Skip imports, comments, and type definitions
|
|
615
|
+
const trimmed = line.trim();
|
|
616
|
+
if (trimmed.startsWith("import ") ||
|
|
617
|
+
trimmed.startsWith("//") ||
|
|
618
|
+
trimmed.startsWith("*") ||
|
|
619
|
+
trimmed.startsWith("/*") ||
|
|
620
|
+
trimmed.startsWith("type ") ||
|
|
621
|
+
trimmed.startsWith("interface ") ||
|
|
622
|
+
trimmed.includes("typeof ")) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
for (const { pattern, api, type } of clientOnlyPatterns) {
|
|
626
|
+
if (pattern.test(line)) {
|
|
627
|
+
detectedAPIs.push({ api, line: idx + 1, type });
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
// Only report if we found React hooks or browser APIs
|
|
632
|
+
const criticalAPIs = detectedAPIs.filter((a) => a.type === "hook" || a.type === "browser-api");
|
|
633
|
+
if (criticalAPIs.length > 0) {
|
|
634
|
+
const firstAPI = criticalAPIs[0];
|
|
635
|
+
const allAPIs = [...new Set(criticalAPIs.map((a) => a.api))].join(", ");
|
|
636
|
+
// Determine if this is a hooks file or component file
|
|
637
|
+
const isHooksFile = filePath.includes("/hooks/") ||
|
|
638
|
+
filePath.includes("\\hooks\\") ||
|
|
639
|
+
filePath.match(/use[A-Z].*\.(ts|tsx)$/);
|
|
640
|
+
const isComponentFile = filePath.includes("/components/") ||
|
|
641
|
+
filePath.includes("\\components\\") ||
|
|
642
|
+
filePath.includes("/app/") ||
|
|
643
|
+
filePath.includes("\\app\\");
|
|
644
|
+
// Only flag as error if it's clearly a client module (hooks or components)
|
|
645
|
+
if (isHooksFile || isComponentFile) {
|
|
646
|
+
issues.push({
|
|
647
|
+
file: filePath,
|
|
648
|
+
line: firstAPI.line,
|
|
649
|
+
type: "missing-use-client-directive",
|
|
650
|
+
severity: "error",
|
|
651
|
+
message: `${isHooksFile ? "Hook" : "Component"} uses client-only APIs (${allAPIs}) without "use client" directive`,
|
|
652
|
+
suggestion: 'Add "use client" at the top of the file, or refactor to be SSR-compatible',
|
|
653
|
+
snippet: lines[firstAPI.line - 1]?.trim(),
|
|
654
|
+
fixable: true,
|
|
655
|
+
fixType: "add-use-client",
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
// Check for "use client" components that could be Server Components
|
|
661
|
+
// (no client-only APIs detected - informational only)
|
|
662
|
+
if (hasUseClient) {
|
|
663
|
+
let hasClientAPI = false;
|
|
664
|
+
for (const line of lines) {
|
|
665
|
+
if (line.trim().startsWith("import ") || line.trim().startsWith("//"))
|
|
666
|
+
continue;
|
|
667
|
+
for (const { pattern } of clientOnlyPatterns) {
|
|
668
|
+
if (pattern.test(line)) {
|
|
669
|
+
hasClientAPI = true;
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
if (hasClientAPI)
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
if (!hasClientAPI && filePath.includes("components/")) {
|
|
677
|
+
issues.push({
|
|
678
|
+
file: filePath,
|
|
679
|
+
line: 1,
|
|
680
|
+
type: "unnecessary-use-client",
|
|
681
|
+
severity: "info",
|
|
682
|
+
message: 'Component has "use client" but no client-only APIs detected',
|
|
683
|
+
suggestion: 'Consider removing "use client" to enable Server Component rendering',
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
return issues;
|
|
688
|
+
}
|
|
689
|
+
// CHECK 9: Runtime export conflicts with cacheComponents
|
|
690
|
+
function checkRuntimeExportConflict(filePath, content) {
|
|
691
|
+
const issues = [];
|
|
692
|
+
const lines = content.split("\n");
|
|
693
|
+
// Only check route files (route.ts, route.js) and page files
|
|
694
|
+
// Normalize path separators for cross-platform compatibility
|
|
695
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
696
|
+
if (!normalizedPath.match(/\/(route|page)\.(ts|tsx|js|jsx)$/)) {
|
|
697
|
+
return issues;
|
|
698
|
+
}
|
|
699
|
+
lines.forEach((line, idx) => {
|
|
700
|
+
// Check for export const runtime = "nodejs" or "edge"
|
|
701
|
+
if (/export\s+const\s+runtime\s*=/.test(line)) {
|
|
702
|
+
issues.push({
|
|
703
|
+
file: filePath,
|
|
704
|
+
line: idx + 1,
|
|
705
|
+
type: "runtime-export-cacheComponents-conflict",
|
|
706
|
+
severity: "error",
|
|
707
|
+
message: 'Route segment config "runtime" is incompatible with nextConfig.cacheComponents',
|
|
708
|
+
suggestion: 'Remove "export const runtime" - Next.js will auto-detect runtime based on APIs used',
|
|
709
|
+
snippet: line.trim(),
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
// Check for export const revalidate (incompatible with cacheComponents)
|
|
713
|
+
if (/export\s+const\s+revalidate\s*=/.test(line)) {
|
|
714
|
+
issues.push({
|
|
715
|
+
file: filePath,
|
|
716
|
+
line: idx + 1,
|
|
717
|
+
type: "revalidate-export-cacheComponents-conflict",
|
|
718
|
+
severity: "error",
|
|
719
|
+
message: 'Route segment config "revalidate" is incompatible with nextConfig.cacheComponents',
|
|
720
|
+
suggestion: 'Remove "export const revalidate" - use "use cache" directive with cacheLife() instead',
|
|
721
|
+
snippet: line.trim(),
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
return issues;
|
|
726
|
+
}
|
|
727
|
+
// CHECK 10: Date.now() / new Date() in Client Components without Suspense
|
|
728
|
+
// NOTE: This check is DISABLED because accurate detection requires AST parsing.
|
|
729
|
+
// Without AST, we can't reliably distinguish render-time calls from callback calls.
|
|
730
|
+
// All Date.now() usages in this codebase are in callbacks/handlers, not render.
|
|
731
|
+
// Re-enable when AST-based analysis is implemented.
|
|
732
|
+
function checkDateInClientComponents(_filePath, _content) {
|
|
733
|
+
// Disabled - too many false positives without AST parsing
|
|
734
|
+
return [];
|
|
735
|
+
}
|
|
736
|
+
// CHECK 11: React Compiler readiness
|
|
737
|
+
function checkReactCompilerReadiness(filePath, content) {
|
|
738
|
+
const issues = [];
|
|
739
|
+
// Skip non-React files - scripts, lib utilities, prisma, etc.
|
|
740
|
+
// React Compiler only applies to React components
|
|
741
|
+
if (filePath.includes("scripts/") ||
|
|
742
|
+
filePath.includes("prisma/") ||
|
|
743
|
+
filePath.includes("__mocks__/") ||
|
|
744
|
+
filePath.includes(".test.") ||
|
|
745
|
+
filePath.includes(".spec.") ||
|
|
746
|
+
filePath.includes("lib/logger") ||
|
|
747
|
+
!filePath.match(/\.(tsx|jsx)$/)) {
|
|
748
|
+
return issues;
|
|
749
|
+
}
|
|
750
|
+
const lines = content.split("\n");
|
|
751
|
+
// Patterns that may cause issues with React Compiler
|
|
752
|
+
// Note: Only match actual mutations (assignment), not property access
|
|
753
|
+
const problematicPatterns = [
|
|
754
|
+
// Mutating props directly - must be assignment TO props, not reading FROM props
|
|
755
|
+
// e.g., props.foo = bar (bad) vs const x = props.foo (ok)
|
|
756
|
+
{
|
|
757
|
+
pattern: /^\s*props\.\w+\s*=\s*[^=]/,
|
|
758
|
+
message: "Direct prop mutation may break React Compiler",
|
|
759
|
+
},
|
|
760
|
+
// Mutating state directly
|
|
761
|
+
{
|
|
762
|
+
pattern: /this\.state\.\w+\s*=\s*[^=]/,
|
|
763
|
+
message: "Direct state mutation may break React Compiler",
|
|
764
|
+
},
|
|
765
|
+
];
|
|
766
|
+
lines.forEach((line, idx) => {
|
|
767
|
+
// Skip comments
|
|
768
|
+
if (line.trim().startsWith("//") || line.trim().startsWith("*")) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
for (const { pattern, message } of problematicPatterns) {
|
|
772
|
+
if (pattern.test(line)) {
|
|
773
|
+
issues.push({
|
|
774
|
+
file: filePath,
|
|
775
|
+
line: idx + 1,
|
|
776
|
+
type: "react-compiler-incompatible",
|
|
777
|
+
severity: "info",
|
|
778
|
+
message,
|
|
779
|
+
suggestion: "Refactor to use immutable patterns for React Compiler compatibility",
|
|
780
|
+
snippet: line.trim(),
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
return issues;
|
|
786
|
+
}
|
|
787
|
+
// CHECK 12: Prisma Decimal in "use cache" functions
|
|
788
|
+
function checkDecimalInCachedFunctions(filePath, content) {
|
|
789
|
+
const issues = [];
|
|
790
|
+
const lines = content.split("\n");
|
|
791
|
+
// Only check files that use "use cache"
|
|
792
|
+
if (!content.includes('"use cache"') && !content.includes("'use cache'")) {
|
|
793
|
+
return issues;
|
|
794
|
+
}
|
|
795
|
+
// Skip test files
|
|
796
|
+
if (filePath.includes(".test.") || filePath.includes(".spec.")) {
|
|
797
|
+
return issues;
|
|
798
|
+
}
|
|
799
|
+
// Find functions with "use cache" that return Prisma queries with price/Decimal fields
|
|
800
|
+
// without serialization
|
|
801
|
+
let inCachedFunction = false;
|
|
802
|
+
let cachedFunctionStart = 0;
|
|
803
|
+
let braceCount = 0;
|
|
804
|
+
let hasPrismaQuery = false;
|
|
805
|
+
let hasDecimalField = false;
|
|
806
|
+
let hasNumberConversion = false;
|
|
807
|
+
let functionName = "";
|
|
808
|
+
const decimalFields = [
|
|
809
|
+
"price",
|
|
810
|
+
"amount",
|
|
811
|
+
"total",
|
|
812
|
+
"subtotal",
|
|
813
|
+
"fee",
|
|
814
|
+
"cost",
|
|
815
|
+
"balance",
|
|
816
|
+
"tax",
|
|
817
|
+
"discount",
|
|
818
|
+
"shipping",
|
|
819
|
+
"rate",
|
|
820
|
+
"commission",
|
|
821
|
+
"payout",
|
|
822
|
+
"refund",
|
|
823
|
+
"marketPrice",
|
|
824
|
+
"shippingCost",
|
|
825
|
+
];
|
|
826
|
+
for (let idx = 0; idx < lines.length; idx++) {
|
|
827
|
+
const line = lines[idx];
|
|
828
|
+
const trimmed = line.trim();
|
|
829
|
+
// Detect start of cached function
|
|
830
|
+
if (trimmed === '"use cache";' || trimmed === "'use cache';") {
|
|
831
|
+
inCachedFunction = true;
|
|
832
|
+
cachedFunctionStart = idx + 1;
|
|
833
|
+
braceCount = 0;
|
|
834
|
+
hasPrismaQuery = false;
|
|
835
|
+
hasDecimalField = false;
|
|
836
|
+
hasNumberConversion = false;
|
|
837
|
+
// Look back to find function name
|
|
838
|
+
for (let j = idx - 1; j >= Math.max(0, idx - 5); j--) {
|
|
839
|
+
const prevLine = lines[j];
|
|
840
|
+
const funcMatch = prevLine.match(/(?:async\s+)?function\s+(\w+)|const\s+(\w+)\s*=/);
|
|
841
|
+
if (funcMatch) {
|
|
842
|
+
functionName = funcMatch[1] || funcMatch[2] || "anonymous";
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
if (inCachedFunction) {
|
|
849
|
+
// Track brace depth
|
|
850
|
+
braceCount += (line.match(/{/g) || []).length;
|
|
851
|
+
braceCount -= (line.match(/}/g) || []).length;
|
|
852
|
+
// Check for Prisma query
|
|
853
|
+
if (/prisma\.\w+\.(findMany|findFirst|findUnique|aggregate|groupBy)/.test(line)) {
|
|
854
|
+
hasPrismaQuery = true;
|
|
855
|
+
}
|
|
856
|
+
// Check for Decimal field selection
|
|
857
|
+
for (const field of decimalFields) {
|
|
858
|
+
if (new RegExp(`\\b${field}:\\s*true`).test(line) ||
|
|
859
|
+
new RegExp(`select:\\s*{[^}]*${field}`).test(content.slice(lines.slice(0, idx).join("\n").length))) {
|
|
860
|
+
hasDecimalField = true;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
// Check for Number() conversion before return
|
|
865
|
+
if (/Number\s*\(.*(?:price|amount|total|fee|cost|marketPrice|shippingCost)/.test(line) ||
|
|
866
|
+
/\.map\s*\([^)]*Number\s*\(/.test(line) ||
|
|
867
|
+
/price:\s*Number\(/.test(line)) {
|
|
868
|
+
hasNumberConversion = true;
|
|
869
|
+
}
|
|
870
|
+
// Check for direct return of Prisma query (without serialization)
|
|
871
|
+
if (/return\s+await\s+prisma\./.test(line) && hasDecimalField) {
|
|
872
|
+
issues.push({
|
|
873
|
+
file: filePath,
|
|
874
|
+
line: idx + 1,
|
|
875
|
+
type: "decimal-in-cached-function",
|
|
876
|
+
severity: "error",
|
|
877
|
+
message: `Cached function "${functionName}" returns Prisma Decimal without serialization`,
|
|
878
|
+
suggestion: "Serialize Decimal fields to Number before returning: .map(item => ({ ...item, price: Number(item.price) }))",
|
|
879
|
+
snippet: line.trim(),
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
// End of cached function
|
|
883
|
+
if (braceCount <= 0 && idx > cachedFunctionStart) {
|
|
884
|
+
// Check if function has Prisma query with Decimal but no conversion
|
|
885
|
+
if (hasPrismaQuery && hasDecimalField && !hasNumberConversion) {
|
|
886
|
+
// Only report if we haven't already reported a direct return issue
|
|
887
|
+
const alreadyReported = issues.some((i) => i.file === filePath &&
|
|
888
|
+
i.type === "decimal-in-cached-function" &&
|
|
889
|
+
i.line > cachedFunctionStart &&
|
|
890
|
+
i.line <= idx);
|
|
891
|
+
if (!alreadyReported) {
|
|
892
|
+
issues.push({
|
|
893
|
+
file: filePath,
|
|
894
|
+
line: cachedFunctionStart,
|
|
895
|
+
type: "decimal-in-cached-function",
|
|
896
|
+
severity: "warning",
|
|
897
|
+
message: `Cached function "${functionName}" may return Prisma Decimal without serialization`,
|
|
898
|
+
suggestion: "Ensure Decimal fields (price, amount, etc.) are converted to Number before caching",
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
inCachedFunction = false;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
return issues;
|
|
907
|
+
}
|
|
908
|
+
// CACHING UTILITIES
|
|
909
|
+
function getFileHash(content) {
|
|
910
|
+
return (0, crypto_1.createHash)("md5").update(content).digest("hex");
|
|
911
|
+
}
|
|
912
|
+
function loadCache() {
|
|
913
|
+
try {
|
|
914
|
+
if (fs.existsSync(CACHE_FILE)) {
|
|
915
|
+
return JSON.parse(fs.readFileSync(CACHE_FILE, "utf-8"));
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
catch {
|
|
919
|
+
// Cache corrupted, start fresh
|
|
920
|
+
}
|
|
921
|
+
return {};
|
|
922
|
+
}
|
|
923
|
+
function saveCache(cache) {
|
|
924
|
+
try {
|
|
925
|
+
const cacheDir = path.dirname(CACHE_FILE);
|
|
926
|
+
if (!fs.existsSync(cacheDir)) {
|
|
927
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
928
|
+
}
|
|
929
|
+
fs.writeFileSync(CACHE_FILE, JSON.stringify(cache, null, 2));
|
|
930
|
+
}
|
|
931
|
+
catch {
|
|
932
|
+
// Cache write failed, non-critical
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
// AUTO-FIX UTILITIES
|
|
936
|
+
function applyFixes(issues) {
|
|
937
|
+
const results = [];
|
|
938
|
+
const fixableIssues = issues.filter((i) => i.fixable);
|
|
939
|
+
// Group by file to batch fixes
|
|
940
|
+
const byFile = new Map();
|
|
941
|
+
for (const issue of fixableIssues) {
|
|
942
|
+
const existing = byFile.get(issue.file) || [];
|
|
943
|
+
existing.push(issue);
|
|
944
|
+
byFile.set(issue.file, existing);
|
|
945
|
+
}
|
|
946
|
+
for (const [filePath, fileIssues] of byFile) {
|
|
947
|
+
try {
|
|
948
|
+
let content = fs.readFileSync(filePath, "utf-8");
|
|
949
|
+
let modified = false;
|
|
950
|
+
for (const issue of fileIssues) {
|
|
951
|
+
switch (issue.fixType) {
|
|
952
|
+
case "add-use-client": {
|
|
953
|
+
// Add "use client" at the top of the file
|
|
954
|
+
if (!content.includes('"use client"') && !content.includes("'use client'")) {
|
|
955
|
+
content = '"use client";\n\n' + content;
|
|
956
|
+
modified = true;
|
|
957
|
+
results.push({
|
|
958
|
+
file: filePath,
|
|
959
|
+
type: issue.type,
|
|
960
|
+
success: true,
|
|
961
|
+
message: 'Added "use client" directive',
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
case "replace-import": {
|
|
967
|
+
// Replace next/router with next/navigation
|
|
968
|
+
if (content.includes("from 'next/router'") || content.includes('from "next/router"')) {
|
|
969
|
+
content = content.replace(/from ['"]next\/router['"]/g, "from 'next/navigation'");
|
|
970
|
+
modified = true;
|
|
971
|
+
results.push({
|
|
972
|
+
file: filePath,
|
|
973
|
+
type: issue.type,
|
|
974
|
+
success: true,
|
|
975
|
+
message: "Replaced next/router with next/navigation",
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
// Replace @next/font with next/font
|
|
979
|
+
if (content.includes("@next/font/")) {
|
|
980
|
+
content = content.replace(/@next\/font\//g, "next/font/");
|
|
981
|
+
modified = true;
|
|
982
|
+
results.push({
|
|
983
|
+
file: filePath,
|
|
984
|
+
type: issue.type,
|
|
985
|
+
success: true,
|
|
986
|
+
message: "Replaced @next/font with next/font",
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
break;
|
|
990
|
+
}
|
|
991
|
+
case "rename-api": {
|
|
992
|
+
// Fix generateStaticParams to be async
|
|
993
|
+
if (issue.type === "sync-generateStaticParams") {
|
|
994
|
+
content = content.replace(/export\s+function\s+generateStaticParams/g, "export async function generateStaticParams");
|
|
995
|
+
content = content.replace(/export\s+const\s+generateStaticParams\s*=\s*\(/g, "export const generateStaticParams = async (");
|
|
996
|
+
modified = true;
|
|
997
|
+
results.push({
|
|
998
|
+
file: filePath,
|
|
999
|
+
type: issue.type,
|
|
1000
|
+
success: true,
|
|
1001
|
+
message: "Made generateStaticParams async",
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
break;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
if (modified) {
|
|
1009
|
+
fs.writeFileSync(filePath, content);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
catch (error) {
|
|
1013
|
+
results.push({
|
|
1014
|
+
file: filePath,
|
|
1015
|
+
type: "fix-error",
|
|
1016
|
+
success: false,
|
|
1017
|
+
message: `Failed to apply fix: ${error.message}`,
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
return results;
|
|
1022
|
+
}
|
|
1023
|
+
// MAIN RUNNER
|
|
1024
|
+
async function run() {
|
|
1025
|
+
const args = process.argv.slice(2);
|
|
1026
|
+
const verbose = args.includes("--verbose") || args.includes("-v");
|
|
1027
|
+
const warnOnly = args.includes("--warn") || args.includes("-w");
|
|
1028
|
+
const jsonOutput = args.includes("--json") || args.includes("-j");
|
|
1029
|
+
const autoFix = args.includes("--fix") || args.includes("-f");
|
|
1030
|
+
const noCache = args.includes("--no-cache");
|
|
1031
|
+
if (!jsonOutput) {
|
|
1032
|
+
console.log(`\n${console_chars_1.emoji.lightning} Next.js 16+ Compatibility Preflight`);
|
|
1033
|
+
console.log((0, console_chars_1.createDivider)(80, "heavy"));
|
|
1034
|
+
}
|
|
1035
|
+
const startTime = Date.now();
|
|
1036
|
+
const allIssues = [];
|
|
1037
|
+
const cache = noCache ? {} : loadCache();
|
|
1038
|
+
const newCache = {};
|
|
1039
|
+
// Find all relevant files
|
|
1040
|
+
const files = await getAllCodeFiles();
|
|
1041
|
+
let filesScanned = 0;
|
|
1042
|
+
let cacheHits = 0;
|
|
1043
|
+
for (const file of files) {
|
|
1044
|
+
try {
|
|
1045
|
+
const content = fs.readFileSync(file, "utf-8");
|
|
1046
|
+
const hash = getFileHash(content);
|
|
1047
|
+
filesScanned++;
|
|
1048
|
+
// Check cache
|
|
1049
|
+
if (cache[file] && cache[file].hash === hash) {
|
|
1050
|
+
allIssues.push(...cache[file].issues);
|
|
1051
|
+
newCache[file] = cache[file];
|
|
1052
|
+
cacheHits++;
|
|
1053
|
+
continue;
|
|
1054
|
+
}
|
|
1055
|
+
// Run all checks
|
|
1056
|
+
const fileIssues = [];
|
|
1057
|
+
fileIssues.push(...checkAsyncRequestAPIs(file, content));
|
|
1058
|
+
fileIssues.push(...checkUnstablePrefixes(file, content));
|
|
1059
|
+
fileIssues.push(...checkLegacyImage(file, content));
|
|
1060
|
+
fileIssues.push(...checkUseFormState(file, content));
|
|
1061
|
+
fileIssues.push(...checkSSRClientBoundary(file, content));
|
|
1062
|
+
fileIssues.push(...checkRuntimeExportConflict(file, content));
|
|
1063
|
+
fileIssues.push(...checkDateInClientComponents(file, content));
|
|
1064
|
+
fileIssues.push(...checkReactCompilerReadiness(file, content));
|
|
1065
|
+
fileIssues.push(...checkDecimalInCachedFunctions(file, content));
|
|
1066
|
+
fileIssues.push(...checkGenerateStaticParams(file, content));
|
|
1067
|
+
fileIssues.push(...checkNextRouter(file, content));
|
|
1068
|
+
fileIssues.push(...checkNextFont(file, content));
|
|
1069
|
+
fileIssues.push(...checkPagesRouterAPIs(file, content));
|
|
1070
|
+
allIssues.push(...fileIssues);
|
|
1071
|
+
newCache[file] = { hash, issues: fileIssues };
|
|
1072
|
+
}
|
|
1073
|
+
catch (error) {
|
|
1074
|
+
if (verbose && !jsonOutput) {
|
|
1075
|
+
console.error(`${console_chars_1.emoji.warning} Error reading ${file}: ${error.message}`);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
// Run file-level checks (not cached)
|
|
1080
|
+
allIssues.push(...(await checkMiddlewareFile()));
|
|
1081
|
+
allIssues.push(...(await checkParallelRoutes()));
|
|
1082
|
+
allIssues.push(...checkNextConfig());
|
|
1083
|
+
allIssues.push(...(await checkInstrumentationFile()));
|
|
1084
|
+
allIssues.push(...(await checkMetadataFiles()));
|
|
1085
|
+
// Save cache
|
|
1086
|
+
if (!noCache) {
|
|
1087
|
+
saveCache(newCache);
|
|
1088
|
+
}
|
|
1089
|
+
const duration = Date.now() - startTime;
|
|
1090
|
+
// Apply fixes if requested
|
|
1091
|
+
let fixResults = [];
|
|
1092
|
+
if (autoFix) {
|
|
1093
|
+
fixResults = applyFixes(allIssues);
|
|
1094
|
+
// Remove fixed issues from the list
|
|
1095
|
+
const fixedTypes = new Set(fixResults.filter((r) => r.success).map((r) => `${r.file}:${r.type}`));
|
|
1096
|
+
const remainingIssues = allIssues.filter((i) => !fixedTypes.has(`${i.file}:${i.type}`));
|
|
1097
|
+
allIssues.length = 0;
|
|
1098
|
+
allIssues.push(...remainingIssues);
|
|
1099
|
+
}
|
|
1100
|
+
const errors = allIssues.filter((i) => i.severity === "error");
|
|
1101
|
+
const warnings = allIssues.filter((i) => i.severity === "warning");
|
|
1102
|
+
const infos = allIssues.filter((i) => i.severity === "info");
|
|
1103
|
+
// JSON output mode
|
|
1104
|
+
if (jsonOutput) {
|
|
1105
|
+
const output = {
|
|
1106
|
+
summary: {
|
|
1107
|
+
filesScanned,
|
|
1108
|
+
cacheHits,
|
|
1109
|
+
duration,
|
|
1110
|
+
errors: errors.length,
|
|
1111
|
+
warnings: warnings.length,
|
|
1112
|
+
infos: infos.length,
|
|
1113
|
+
fixesApplied: fixResults.filter((r) => r.success).length,
|
|
1114
|
+
},
|
|
1115
|
+
issues: allIssues,
|
|
1116
|
+
fixes: fixResults,
|
|
1117
|
+
exitCode: warnOnly ? 0 : errors.length > 0 ? 1 : 0,
|
|
1118
|
+
};
|
|
1119
|
+
console.log(JSON.stringify(output, null, 2));
|
|
1120
|
+
process.exit(output.exitCode);
|
|
1121
|
+
}
|
|
1122
|
+
// Report results
|
|
1123
|
+
console.log(`\n${console_chars_1.emoji.chart} Scan Summary:`);
|
|
1124
|
+
console.log(` Files scanned: ${filesScanned}`);
|
|
1125
|
+
console.log(` Cache hits: ${cacheHits} (${Math.round((cacheHits / filesScanned) * 100)}%)`);
|
|
1126
|
+
console.log(` Duration: ${duration}ms`);
|
|
1127
|
+
// Report fixes
|
|
1128
|
+
if (autoFix && fixResults.length > 0) {
|
|
1129
|
+
const successfulFixes = fixResults.filter((r) => r.success);
|
|
1130
|
+
const failedFixes = fixResults.filter((r) => !r.success);
|
|
1131
|
+
console.log(`\n${console_chars_1.emoji.wrench} Auto-Fix Results:`);
|
|
1132
|
+
console.log(` ${console_chars_1.emoji.success} Fixed: ${successfulFixes.length}`);
|
|
1133
|
+
if (failedFixes.length > 0) {
|
|
1134
|
+
console.log(` ${console_chars_1.emoji.error} Failed: ${failedFixes.length}`);
|
|
1135
|
+
}
|
|
1136
|
+
if (verbose) {
|
|
1137
|
+
for (const fix of successfulFixes) {
|
|
1138
|
+
console.log(` ${console_chars_1.emoji.success} ${fix.file}: ${fix.message}`);
|
|
1139
|
+
}
|
|
1140
|
+
for (const fix of failedFixes) {
|
|
1141
|
+
console.log(` ${console_chars_1.emoji.error} ${fix.file}: ${fix.message}`);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
if (allIssues.length === 0) {
|
|
1146
|
+
console.log(`\n${console_chars_1.emoji.success} No Next.js 16 compatibility issues found`);
|
|
1147
|
+
process.exit(0);
|
|
1148
|
+
}
|
|
1149
|
+
// Group by type
|
|
1150
|
+
const byType = new Map();
|
|
1151
|
+
for (const issue of allIssues) {
|
|
1152
|
+
const existing = byType.get(issue.type) || [];
|
|
1153
|
+
existing.push(issue);
|
|
1154
|
+
byType.set(issue.type, existing);
|
|
1155
|
+
}
|
|
1156
|
+
console.log(`\n${console_chars_1.emoji.clipboard} Issues Found:`);
|
|
1157
|
+
console.log(` ${console_chars_1.emoji.error} Errors: ${errors.length}`);
|
|
1158
|
+
console.log(` ${console_chars_1.emoji.warning} Warnings: ${warnings.length}`);
|
|
1159
|
+
console.log(` ${console_chars_1.emoji.info} Info: ${infos.length}`);
|
|
1160
|
+
const fixableCount = allIssues.filter((i) => i.fixable).length;
|
|
1161
|
+
if (fixableCount > 0 && !autoFix) {
|
|
1162
|
+
console.log(` ${console_chars_1.emoji.wrench} Fixable: ${fixableCount} (run with --fix)`);
|
|
1163
|
+
}
|
|
1164
|
+
// Print issues by type
|
|
1165
|
+
for (const [type, issues] of byType) {
|
|
1166
|
+
const icon = issues[0].severity === "error"
|
|
1167
|
+
? `${console_chars_1.emoji.error}`
|
|
1168
|
+
: issues[0].severity === "warning"
|
|
1169
|
+
? `${console_chars_1.emoji.warning}`
|
|
1170
|
+
: `${console_chars_1.emoji.info}`;
|
|
1171
|
+
const fixableTag = issues[0].fixable ? ` ${console_chars_1.emoji.wrench}` : "";
|
|
1172
|
+
console.log(`\n${icon} ${type}${fixableTag} (${issues.length} occurrences)`);
|
|
1173
|
+
if (verbose) {
|
|
1174
|
+
for (const issue of issues.slice(0, 5)) {
|
|
1175
|
+
console.log(` ${issue.file}:${issue.line}`);
|
|
1176
|
+
console.log(` ${issue.message}`);
|
|
1177
|
+
console.log(` ${console_chars_1.emoji.hint} ${issue.suggestion}`);
|
|
1178
|
+
if (issue.snippet) {
|
|
1179
|
+
console.log(` ${console_chars_1.emoji.memo} ${issue.snippet.substring(0, 80)}`);
|
|
1180
|
+
}
|
|
1181
|
+
console.log("");
|
|
1182
|
+
}
|
|
1183
|
+
if (issues.length > 5) {
|
|
1184
|
+
console.log(` ... and ${issues.length - 5} more`);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
console.log(` ${issues[0].message}`);
|
|
1189
|
+
console.log(` ${console_chars_1.emoji.hint} ${issues[0].suggestion}`);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
// Exit code
|
|
1193
|
+
if (warnOnly) {
|
|
1194
|
+
console.log(`\n${console_chars_1.emoji.warning} Running in warning mode - not blocking`);
|
|
1195
|
+
process.exit(0);
|
|
1196
|
+
}
|
|
1197
|
+
if (errors.length > 0) {
|
|
1198
|
+
console.log(`\n⛔ ${errors.length} blocking issue(s) found. Fix before deploying.`);
|
|
1199
|
+
process.exit(1);
|
|
1200
|
+
}
|
|
1201
|
+
console.log(`\n${console_chars_1.emoji.success} No blocking issues (warnings/info only)`);
|
|
1202
|
+
process.exit(0);
|
|
1203
|
+
}
|
|
1204
|
+
run().catch((error) => {
|
|
1205
|
+
console.error(`${console_chars_1.emoji.error} Next.js 16 compatibility check failed:`, error);
|
|
1206
|
+
process.exit(1);
|
|
1207
|
+
});
|
|
1208
|
+
//# sourceMappingURL=nextjs16-compatibility.js.map
|