driftdetect-detectors 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accessibility/alt-text.d.ts +63 -0
- package/dist/accessibility/alt-text.d.ts.map +1 -0
- package/dist/accessibility/alt-text.js +100 -0
- package/dist/accessibility/alt-text.js.map +1 -0
- package/dist/accessibility/aria-roles.d.ts +65 -0
- package/dist/accessibility/aria-roles.d.ts.map +1 -0
- package/dist/accessibility/aria-roles.js +87 -0
- package/dist/accessibility/aria-roles.js.map +1 -0
- package/dist/accessibility/focus-management.d.ts +62 -0
- package/dist/accessibility/focus-management.d.ts.map +1 -0
- package/dist/accessibility/focus-management.js +88 -0
- package/dist/accessibility/focus-management.js.map +1 -0
- package/dist/accessibility/heading-hierarchy.d.ts +66 -0
- package/dist/accessibility/heading-hierarchy.d.ts.map +1 -0
- package/dist/accessibility/heading-hierarchy.js +94 -0
- package/dist/accessibility/heading-hierarchy.js.map +1 -0
- package/dist/accessibility/index.d.ts +25 -0
- package/dist/accessibility/index.d.ts.map +1 -0
- package/dist/accessibility/index.js +21 -0
- package/dist/accessibility/index.js.map +1 -0
- package/dist/accessibility/keyboard-nav.d.ts +63 -0
- package/dist/accessibility/keyboard-nav.d.ts.map +1 -0
- package/dist/accessibility/keyboard-nav.js +86 -0
- package/dist/accessibility/keyboard-nav.js.map +1 -0
- package/dist/accessibility/semantic-html.d.ts +76 -0
- package/dist/accessibility/semantic-html.d.ts.map +1 -0
- package/dist/accessibility/semantic-html.js +204 -0
- package/dist/accessibility/semantic-html.js.map +1 -0
- package/dist/api/client-patterns.d.ts +121 -0
- package/dist/api/client-patterns.d.ts.map +1 -0
- package/dist/api/client-patterns.js +478 -0
- package/dist/api/client-patterns.js.map +1 -0
- package/dist/api/error-format.d.ts +140 -0
- package/dist/api/error-format.d.ts.map +1 -0
- package/dist/api/error-format.js +614 -0
- package/dist/api/error-format.js.map +1 -0
- package/dist/api/http-methods.d.ts +255 -0
- package/dist/api/http-methods.d.ts.map +1 -0
- package/dist/api/http-methods.js +890 -0
- package/dist/api/http-methods.js.map +1 -0
- package/dist/api/index.d.ts +16 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +37 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/pagination.d.ts +133 -0
- package/dist/api/pagination.d.ts.map +1 -0
- package/dist/api/pagination.js +521 -0
- package/dist/api/pagination.js.map +1 -0
- package/dist/api/response-envelope.d.ts +261 -0
- package/dist/api/response-envelope.d.ts.map +1 -0
- package/dist/api/response-envelope.js +1050 -0
- package/dist/api/response-envelope.js.map +1 -0
- package/dist/api/retry-patterns.d.ts +117 -0
- package/dist/api/retry-patterns.d.ts.map +1 -0
- package/dist/api/retry-patterns.js +480 -0
- package/dist/api/retry-patterns.js.map +1 -0
- package/dist/api/route-structure.d.ts +128 -0
- package/dist/api/route-structure.d.ts.map +1 -0
- package/dist/api/route-structure.js +738 -0
- package/dist/api/route-structure.js.map +1 -0
- package/dist/auth/audit-logging.d.ts +80 -0
- package/dist/auth/audit-logging.d.ts.map +1 -0
- package/dist/auth/audit-logging.js +370 -0
- package/dist/auth/audit-logging.js.map +1 -0
- package/dist/auth/index.d.ts +33 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +49 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/middleware-usage.d.ts +65 -0
- package/dist/auth/middleware-usage.d.ts.map +1 -0
- package/dist/auth/middleware-usage.js +192 -0
- package/dist/auth/middleware-usage.js.map +1 -0
- package/dist/auth/permission-checks.d.ts +60 -0
- package/dist/auth/permission-checks.d.ts.map +1 -0
- package/dist/auth/permission-checks.js +159 -0
- package/dist/auth/permission-checks.js.map +1 -0
- package/dist/auth/rbac-patterns.d.ts +68 -0
- package/dist/auth/rbac-patterns.d.ts.map +1 -0
- package/dist/auth/rbac-patterns.js +143 -0
- package/dist/auth/rbac-patterns.js.map +1 -0
- package/dist/auth/resource-ownership.d.ts +77 -0
- package/dist/auth/resource-ownership.d.ts.map +1 -0
- package/dist/auth/resource-ownership.js +324 -0
- package/dist/auth/resource-ownership.js.map +1 -0
- package/dist/auth/token-handling.d.ts +64 -0
- package/dist/auth/token-handling.d.ts.map +1 -0
- package/dist/auth/token-handling.js +151 -0
- package/dist/auth/token-handling.js.map +1 -0
- package/dist/base/ast-detector.d.ts +421 -0
- package/dist/base/ast-detector.d.ts.map +1 -0
- package/dist/base/ast-detector.js +699 -0
- package/dist/base/ast-detector.js.map +1 -0
- package/dist/base/base-detector.d.ts +366 -0
- package/dist/base/base-detector.d.ts.map +1 -0
- package/dist/base/base-detector.js +170 -0
- package/dist/base/base-detector.js.map +1 -0
- package/dist/base/index.d.ts +12 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +17 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/regex-detector.d.ts +421 -0
- package/dist/base/regex-detector.d.ts.map +1 -0
- package/dist/base/regex-detector.js +537 -0
- package/dist/base/regex-detector.js.map +1 -0
- package/dist/base/structural-detector.d.ts +424 -0
- package/dist/base/structural-detector.d.ts.map +1 -0
- package/dist/base/structural-detector.js +731 -0
- package/dist/base/structural-detector.js.map +1 -0
- package/dist/base/types.d.ts +53 -0
- package/dist/base/types.d.ts.map +1 -0
- package/dist/base/types.js +5 -0
- package/dist/base/types.js.map +1 -0
- package/dist/components/component-structure.d.ts +163 -0
- package/dist/components/component-structure.d.ts.map +1 -0
- package/dist/components/component-structure.js +500 -0
- package/dist/components/component-structure.js.map +1 -0
- package/dist/components/composition.d.ts +287 -0
- package/dist/components/composition.d.ts.map +1 -0
- package/dist/components/composition.js +1123 -0
- package/dist/components/composition.js.map +1 -0
- package/dist/components/duplicate-detection.d.ts +251 -0
- package/dist/components/duplicate-detection.d.ts.map +1 -0
- package/dist/components/duplicate-detection.js +804 -0
- package/dist/components/duplicate-detection.js.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +51 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/near-duplicate.d.ts +402 -0
- package/dist/components/near-duplicate.d.ts.map +1 -0
- package/dist/components/near-duplicate.js +1090 -0
- package/dist/components/near-duplicate.js.map +1 -0
- package/dist/components/props-patterns.d.ts +194 -0
- package/dist/components/props-patterns.d.ts.map +1 -0
- package/dist/components/props-patterns.js +795 -0
- package/dist/components/props-patterns.js.map +1 -0
- package/dist/components/ref-forwarding.d.ts +250 -0
- package/dist/components/ref-forwarding.d.ts.map +1 -0
- package/dist/components/ref-forwarding.js +832 -0
- package/dist/components/ref-forwarding.js.map +1 -0
- package/dist/components/state-patterns.d.ts +291 -0
- package/dist/components/state-patterns.d.ts.map +1 -0
- package/dist/components/state-patterns.js +970 -0
- package/dist/components/state-patterns.js.map +1 -0
- package/dist/config/config-validation.d.ts +74 -0
- package/dist/config/config-validation.d.ts.map +1 -0
- package/dist/config/config-validation.js +446 -0
- package/dist/config/config-validation.js.map +1 -0
- package/dist/config/default-values.d.ts +72 -0
- package/dist/config/default-values.d.ts.map +1 -0
- package/dist/config/default-values.js +386 -0
- package/dist/config/default-values.js.map +1 -0
- package/dist/config/env-naming.d.ts +73 -0
- package/dist/config/env-naming.d.ts.map +1 -0
- package/dist/config/env-naming.js +429 -0
- package/dist/config/env-naming.js.map +1 -0
- package/dist/config/environment-detection.d.ts +72 -0
- package/dist/config/environment-detection.d.ts.map +1 -0
- package/dist/config/environment-detection.js +400 -0
- package/dist/config/environment-detection.js.map +1 -0
- package/dist/config/feature-flags.d.ts +72 -0
- package/dist/config/feature-flags.d.ts.map +1 -0
- package/dist/config/feature-flags.js +384 -0
- package/dist/config/feature-flags.js.map +1 -0
- package/dist/config/index.d.ts +27 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +43 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/required-optional.d.ts +71 -0
- package/dist/config/required-optional.d.ts.map +1 -0
- package/dist/config/required-optional.js +344 -0
- package/dist/config/required-optional.js.map +1 -0
- package/dist/data-access/connection-pooling.d.ts +63 -0
- package/dist/data-access/connection-pooling.d.ts.map +1 -0
- package/dist/data-access/connection-pooling.js +297 -0
- package/dist/data-access/connection-pooling.js.map +1 -0
- package/dist/data-access/dto-patterns.d.ts +64 -0
- package/dist/data-access/dto-patterns.d.ts.map +1 -0
- package/dist/data-access/dto-patterns.js +291 -0
- package/dist/data-access/dto-patterns.js.map +1 -0
- package/dist/data-access/index.d.ts +31 -0
- package/dist/data-access/index.d.ts.map +1 -0
- package/dist/data-access/index.js +49 -0
- package/dist/data-access/index.js.map +1 -0
- package/dist/data-access/n-plus-one.d.ts +60 -0
- package/dist/data-access/n-plus-one.d.ts.map +1 -0
- package/dist/data-access/n-plus-one.js +264 -0
- package/dist/data-access/n-plus-one.js.map +1 -0
- package/dist/data-access/query-patterns.d.ts +64 -0
- package/dist/data-access/query-patterns.d.ts.map +1 -0
- package/dist/data-access/query-patterns.js +314 -0
- package/dist/data-access/query-patterns.js.map +1 -0
- package/dist/data-access/repository-pattern.d.ts +62 -0
- package/dist/data-access/repository-pattern.d.ts.map +1 -0
- package/dist/data-access/repository-pattern.js +257 -0
- package/dist/data-access/repository-pattern.js.map +1 -0
- package/dist/data-access/transaction-patterns.d.ts +61 -0
- package/dist/data-access/transaction-patterns.d.ts.map +1 -0
- package/dist/data-access/transaction-patterns.js +277 -0
- package/dist/data-access/transaction-patterns.js.map +1 -0
- package/dist/data-access/validation-patterns.d.ts +62 -0
- package/dist/data-access/validation-patterns.d.ts.map +1 -0
- package/dist/data-access/validation-patterns.js +301 -0
- package/dist/data-access/validation-patterns.js.map +1 -0
- package/dist/documentation/deprecation.d.ts +62 -0
- package/dist/documentation/deprecation.d.ts.map +1 -0
- package/dist/documentation/deprecation.js +83 -0
- package/dist/documentation/deprecation.js.map +1 -0
- package/dist/documentation/example-code.d.ts +64 -0
- package/dist/documentation/example-code.d.ts.map +1 -0
- package/dist/documentation/example-code.js +79 -0
- package/dist/documentation/example-code.js.map +1 -0
- package/dist/documentation/index.d.ts +22 -0
- package/dist/documentation/index.d.ts.map +1 -0
- package/dist/documentation/index.js +19 -0
- package/dist/documentation/index.js.map +1 -0
- package/dist/documentation/jsdoc-patterns.d.ts +72 -0
- package/dist/documentation/jsdoc-patterns.d.ts.map +1 -0
- package/dist/documentation/jsdoc-patterns.js +92 -0
- package/dist/documentation/jsdoc-patterns.js.map +1 -0
- package/dist/documentation/readme-structure.d.ts +67 -0
- package/dist/documentation/readme-structure.d.ts.map +1 -0
- package/dist/documentation/readme-structure.js +76 -0
- package/dist/documentation/readme-structure.js.map +1 -0
- package/dist/documentation/todo-patterns.d.ts +67 -0
- package/dist/documentation/todo-patterns.d.ts.map +1 -0
- package/dist/documentation/todo-patterns.js +73 -0
- package/dist/documentation/todo-patterns.js.map +1 -0
- package/dist/errors/async-errors.d.ts +72 -0
- package/dist/errors/async-errors.d.ts.map +1 -0
- package/dist/errors/async-errors.js +214 -0
- package/dist/errors/async-errors.js.map +1 -0
- package/dist/errors/circuit-breaker.d.ts +53 -0
- package/dist/errors/circuit-breaker.d.ts.map +1 -0
- package/dist/errors/circuit-breaker.js +241 -0
- package/dist/errors/circuit-breaker.js.map +1 -0
- package/dist/errors/error-codes.d.ts +73 -0
- package/dist/errors/error-codes.d.ts.map +1 -0
- package/dist/errors/error-codes.js +211 -0
- package/dist/errors/error-codes.js.map +1 -0
- package/dist/errors/error-logging.d.ts +73 -0
- package/dist/errors/error-logging.d.ts.map +1 -0
- package/dist/errors/error-logging.js +256 -0
- package/dist/errors/error-logging.js.map +1 -0
- package/dist/errors/error-propagation.d.ts +73 -0
- package/dist/errors/error-propagation.d.ts.map +1 -0
- package/dist/errors/error-propagation.js +244 -0
- package/dist/errors/error-propagation.js.map +1 -0
- package/dist/errors/exception-hierarchy.d.ts +75 -0
- package/dist/errors/exception-hierarchy.d.ts.map +1 -0
- package/dist/errors/exception-hierarchy.js +259 -0
- package/dist/errors/exception-hierarchy.js.map +1 -0
- package/dist/errors/index.d.ts +31 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +49 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/try-catch-placement.d.ts +73 -0
- package/dist/errors/try-catch-placement.d.ts.map +1 -0
- package/dist/errors/try-catch-placement.js +214 -0
- package/dist/errors/try-catch-placement.js.map +1 -0
- package/dist/index.d.ts +221 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +245 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/context-fields.d.ts +48 -0
- package/dist/logging/context-fields.d.ts.map +1 -0
- package/dist/logging/context-fields.js +160 -0
- package/dist/logging/context-fields.js.map +1 -0
- package/dist/logging/correlation-ids.d.ts +44 -0
- package/dist/logging/correlation-ids.d.ts.map +1 -0
- package/dist/logging/correlation-ids.js +144 -0
- package/dist/logging/correlation-ids.js.map +1 -0
- package/dist/logging/health-checks.d.ts +45 -0
- package/dist/logging/health-checks.d.ts.map +1 -0
- package/dist/logging/health-checks.js +165 -0
- package/dist/logging/health-checks.js.map +1 -0
- package/dist/logging/index.d.ts +31 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +49 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/log-levels.d.ts +46 -0
- package/dist/logging/log-levels.d.ts.map +1 -0
- package/dist/logging/log-levels.js +178 -0
- package/dist/logging/log-levels.js.map +1 -0
- package/dist/logging/metric-naming.d.ts +46 -0
- package/dist/logging/metric-naming.d.ts.map +1 -0
- package/dist/logging/metric-naming.js +157 -0
- package/dist/logging/metric-naming.js.map +1 -0
- package/dist/logging/pii-redaction.d.ts +44 -0
- package/dist/logging/pii-redaction.d.ts.map +1 -0
- package/dist/logging/pii-redaction.js +166 -0
- package/dist/logging/pii-redaction.js.map +1 -0
- package/dist/logging/structured-format.d.ts +53 -0
- package/dist/logging/structured-format.d.ts.map +1 -0
- package/dist/logging/structured-format.js +235 -0
- package/dist/logging/structured-format.js.map +1 -0
- package/dist/performance/bundle-size.d.ts +79 -0
- package/dist/performance/bundle-size.d.ts.map +1 -0
- package/dist/performance/bundle-size.js +276 -0
- package/dist/performance/bundle-size.js.map +1 -0
- package/dist/performance/caching-patterns.d.ts +78 -0
- package/dist/performance/caching-patterns.d.ts.map +1 -0
- package/dist/performance/caching-patterns.js +257 -0
- package/dist/performance/caching-patterns.js.map +1 -0
- package/dist/performance/code-splitting.d.ts +86 -0
- package/dist/performance/code-splitting.d.ts.map +1 -0
- package/dist/performance/code-splitting.js +447 -0
- package/dist/performance/code-splitting.js.map +1 -0
- package/dist/performance/debounce-throttle.d.ts +75 -0
- package/dist/performance/debounce-throttle.d.ts.map +1 -0
- package/dist/performance/debounce-throttle.js +232 -0
- package/dist/performance/debounce-throttle.js.map +1 -0
- package/dist/performance/index.d.ts +28 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +39 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/performance/lazy-loading.d.ts +75 -0
- package/dist/performance/lazy-loading.d.ts.map +1 -0
- package/dist/performance/lazy-loading.js +233 -0
- package/dist/performance/lazy-loading.js.map +1 -0
- package/dist/performance/memoization.d.ts +75 -0
- package/dist/performance/memoization.d.ts.map +1 -0
- package/dist/performance/memoization.js +251 -0
- package/dist/performance/memoization.js.map +1 -0
- package/dist/registry/detector-registry.d.ts +266 -0
- package/dist/registry/detector-registry.d.ts.map +1 -0
- package/dist/registry/detector-registry.js +526 -0
- package/dist/registry/detector-registry.js.map +1 -0
- package/dist/registry/index.d.ts +10 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +10 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/loader.d.ts +232 -0
- package/dist/registry/loader.d.ts.map +1 -0
- package/dist/registry/loader.js +419 -0
- package/dist/registry/loader.js.map +1 -0
- package/dist/registry/types.d.ts +111 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +19 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/security/csp-headers.d.ts +78 -0
- package/dist/security/csp-headers.d.ts.map +1 -0
- package/dist/security/csp-headers.js +401 -0
- package/dist/security/csp-headers.js.map +1 -0
- package/dist/security/csrf-protection.d.ts +72 -0
- package/dist/security/csrf-protection.d.ts.map +1 -0
- package/dist/security/csrf-protection.js +344 -0
- package/dist/security/csrf-protection.js.map +1 -0
- package/dist/security/index.d.ts +30 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +48 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/input-sanitization.d.ts +74 -0
- package/dist/security/input-sanitization.d.ts.map +1 -0
- package/dist/security/input-sanitization.js +373 -0
- package/dist/security/input-sanitization.js.map +1 -0
- package/dist/security/rate-limiting.d.ts +81 -0
- package/dist/security/rate-limiting.d.ts.map +1 -0
- package/dist/security/rate-limiting.js +535 -0
- package/dist/security/rate-limiting.js.map +1 -0
- package/dist/security/secret-management.d.ts +83 -0
- package/dist/security/secret-management.d.ts.map +1 -0
- package/dist/security/secret-management.js +547 -0
- package/dist/security/secret-management.js.map +1 -0
- package/dist/security/sql-injection.d.ts +76 -0
- package/dist/security/sql-injection.d.ts.map +1 -0
- package/dist/security/sql-injection.js +383 -0
- package/dist/security/sql-injection.js.map +1 -0
- package/dist/security/xss-prevention.d.ts +80 -0
- package/dist/security/xss-prevention.d.ts.map +1 -0
- package/dist/security/xss-prevention.js +416 -0
- package/dist/security/xss-prevention.js.map +1 -0
- package/dist/structural/barrel-exports.d.ts +178 -0
- package/dist/structural/barrel-exports.d.ts.map +1 -0
- package/dist/structural/barrel-exports.js +553 -0
- package/dist/structural/barrel-exports.js.map +1 -0
- package/dist/structural/circular-deps.d.ts +140 -0
- package/dist/structural/circular-deps.d.ts.map +1 -0
- package/dist/structural/circular-deps.js +422 -0
- package/dist/structural/circular-deps.js.map +1 -0
- package/dist/structural/co-location.d.ts +202 -0
- package/dist/structural/co-location.d.ts.map +1 -0
- package/dist/structural/co-location.js +640 -0
- package/dist/structural/co-location.js.map +1 -0
- package/dist/structural/directory-structure.d.ts +151 -0
- package/dist/structural/directory-structure.d.ts.map +1 -0
- package/dist/structural/directory-structure.js +457 -0
- package/dist/structural/directory-structure.js.map +1 -0
- package/dist/structural/file-naming.d.ts +61 -0
- package/dist/structural/file-naming.d.ts.map +1 -0
- package/dist/structural/file-naming.js +231 -0
- package/dist/structural/file-naming.js.map +1 -0
- package/dist/structural/import-ordering.d.ts +212 -0
- package/dist/structural/import-ordering.d.ts.map +1 -0
- package/dist/structural/import-ordering.js +821 -0
- package/dist/structural/import-ordering.js.map +1 -0
- package/dist/structural/index.d.ts +23 -0
- package/dist/structural/index.d.ts.map +1 -0
- package/dist/structural/index.js +26 -0
- package/dist/structural/index.js.map +1 -0
- package/dist/structural/module-boundaries.d.ts +164 -0
- package/dist/structural/module-boundaries.d.ts.map +1 -0
- package/dist/structural/module-boundaries.js +616 -0
- package/dist/structural/module-boundaries.js.map +1 -0
- package/dist/structural/package-boundaries.d.ts +182 -0
- package/dist/structural/package-boundaries.d.ts.map +1 -0
- package/dist/structural/package-boundaries.js +602 -0
- package/dist/structural/package-boundaries.js.map +1 -0
- package/dist/styling/class-naming.d.ts +263 -0
- package/dist/styling/class-naming.d.ts.map +1 -0
- package/dist/styling/class-naming.js +892 -0
- package/dist/styling/class-naming.js.map +1 -0
- package/dist/styling/color-usage.d.ts +213 -0
- package/dist/styling/color-usage.d.ts.map +1 -0
- package/dist/styling/color-usage.js +732 -0
- package/dist/styling/color-usage.js.map +1 -0
- package/dist/styling/design-tokens.d.ts +212 -0
- package/dist/styling/design-tokens.d.ts.map +1 -0
- package/dist/styling/design-tokens.js +748 -0
- package/dist/styling/design-tokens.js.map +1 -0
- package/dist/styling/index.d.ts +16 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/index.js +56 -0
- package/dist/styling/index.js.map +1 -0
- package/dist/styling/responsive.d.ts +304 -0
- package/dist/styling/responsive.d.ts.map +1 -0
- package/dist/styling/responsive.js +888 -0
- package/dist/styling/responsive.js.map +1 -0
- package/dist/styling/spacing-scale.d.ts +248 -0
- package/dist/styling/spacing-scale.d.ts.map +1 -0
- package/dist/styling/spacing-scale.js +865 -0
- package/dist/styling/spacing-scale.js.map +1 -0
- package/dist/styling/tailwind-patterns.d.ts +305 -0
- package/dist/styling/tailwind-patterns.d.ts.map +1 -0
- package/dist/styling/tailwind-patterns.js +1181 -0
- package/dist/styling/tailwind-patterns.js.map +1 -0
- package/dist/styling/typography.d.ts +281 -0
- package/dist/styling/typography.d.ts.map +1 -0
- package/dist/styling/typography.js +1004 -0
- package/dist/styling/typography.js.map +1 -0
- package/dist/styling/z-index-scale.d.ts +270 -0
- package/dist/styling/z-index-scale.d.ts.map +1 -0
- package/dist/styling/z-index-scale.js +714 -0
- package/dist/styling/z-index-scale.js.map +1 -0
- package/dist/testing/co-location.d.ts +42 -0
- package/dist/testing/co-location.d.ts.map +1 -0
- package/dist/testing/co-location.js +134 -0
- package/dist/testing/co-location.js.map +1 -0
- package/dist/testing/describe-naming.d.ts +47 -0
- package/dist/testing/describe-naming.d.ts.map +1 -0
- package/dist/testing/describe-naming.js +150 -0
- package/dist/testing/describe-naming.js.map +1 -0
- package/dist/testing/file-naming.d.ts +44 -0
- package/dist/testing/file-naming.d.ts.map +1 -0
- package/dist/testing/file-naming.js +131 -0
- package/dist/testing/file-naming.js.map +1 -0
- package/dist/testing/fixture-patterns.d.ts +52 -0
- package/dist/testing/fixture-patterns.d.ts.map +1 -0
- package/dist/testing/fixture-patterns.js +228 -0
- package/dist/testing/fixture-patterns.js.map +1 -0
- package/dist/testing/index.d.ts +31 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +49 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-patterns.d.ts +53 -0
- package/dist/testing/mock-patterns.d.ts.map +1 -0
- package/dist/testing/mock-patterns.js +264 -0
- package/dist/testing/mock-patterns.js.map +1 -0
- package/dist/testing/setup-teardown.d.ts +55 -0
- package/dist/testing/setup-teardown.d.ts.map +1 -0
- package/dist/testing/setup-teardown.js +262 -0
- package/dist/testing/setup-teardown.js.map +1 -0
- package/dist/testing/test-structure.d.ts +51 -0
- package/dist/testing/test-structure.d.ts.map +1 -0
- package/dist/testing/test-structure.js +225 -0
- package/dist/testing/test-structure.js.map +1 -0
- package/dist/types/any-usage.d.ts +99 -0
- package/dist/types/any-usage.d.ts.map +1 -0
- package/dist/types/any-usage.js +641 -0
- package/dist/types/any-usage.js.map +1 -0
- package/dist/types/file-location.d.ts +76 -0
- package/dist/types/file-location.d.ts.map +1 -0
- package/dist/types/file-location.js +395 -0
- package/dist/types/file-location.js.map +1 -0
- package/dist/types/generic-patterns.d.ts +97 -0
- package/dist/types/generic-patterns.d.ts.map +1 -0
- package/dist/types/generic-patterns.js +615 -0
- package/dist/types/generic-patterns.js.map +1 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +43 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/interface-vs-type.d.ts +81 -0
- package/dist/types/interface-vs-type.d.ts.map +1 -0
- package/dist/types/interface-vs-type.js +440 -0
- package/dist/types/interface-vs-type.js.map +1 -0
- package/dist/types/naming-conventions.d.ts +84 -0
- package/dist/types/naming-conventions.d.ts.map +1 -0
- package/dist/types/naming-conventions.js +455 -0
- package/dist/types/naming-conventions.js.map +1 -0
- package/dist/types/type-assertions.d.ts +98 -0
- package/dist/types/type-assertions.d.ts.map +1 -0
- package/dist/types/type-assertions.js +639 -0
- package/dist/types/type-assertions.js.map +1 -0
- package/dist/types/utility-types.d.ts +110 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/types/utility-types.js +547 -0
- package/dist/types/utility-types.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural Detector - File/directory structure detection base class
|
|
3
|
+
*
|
|
4
|
+
* Provides path pattern matching helpers and utilities for structural pattern detection.
|
|
5
|
+
* Extends BaseDetector with specialized methods for analyzing file and directory structures.
|
|
6
|
+
*
|
|
7
|
+
* @requirements 6.4 - THE Detector_System SHALL support detection methods: ast, regex, semantic, structural, and custom
|
|
8
|
+
*/
|
|
9
|
+
import type { Location } from 'driftdetect-core';
|
|
10
|
+
import { BaseDetector } from './base-detector.js';
|
|
11
|
+
/**
|
|
12
|
+
* Supported naming conventions for file and identifier names
|
|
13
|
+
*/
|
|
14
|
+
export type NamingConvention = 'PascalCase' | 'camelCase' | 'kebab-case' | 'snake_case' | 'SCREAMING_SNAKE_CASE' | 'flatcase';
|
|
15
|
+
/**
|
|
16
|
+
* Result of a naming convention check
|
|
17
|
+
*/
|
|
18
|
+
export interface NamingConventionResult {
|
|
19
|
+
/** Whether the name matches the convention */
|
|
20
|
+
matches: boolean;
|
|
21
|
+
/** The detected convention (if any) */
|
|
22
|
+
detectedConvention: NamingConvention | null;
|
|
23
|
+
/** Suggested name in the expected convention */
|
|
24
|
+
suggestedName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Result of a path pattern match
|
|
28
|
+
*/
|
|
29
|
+
export interface PathMatchResult {
|
|
30
|
+
/** Whether the path matches the pattern */
|
|
31
|
+
matches: boolean;
|
|
32
|
+
/** Captured groups from the pattern (if any) */
|
|
33
|
+
captures: Record<string, string>;
|
|
34
|
+
/** The matched portion of the path */
|
|
35
|
+
matchedPortion?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Information about a file path
|
|
39
|
+
*/
|
|
40
|
+
export interface PathInfo {
|
|
41
|
+
/** Full file path */
|
|
42
|
+
fullPath: string;
|
|
43
|
+
/** Directory path (without file name) */
|
|
44
|
+
directory: string;
|
|
45
|
+
/** File name with extension */
|
|
46
|
+
fileName: string;
|
|
47
|
+
/** File name without extension */
|
|
48
|
+
baseName: string;
|
|
49
|
+
/** File extension (including the dot) */
|
|
50
|
+
extension: string;
|
|
51
|
+
/** Path segments (directories and file) */
|
|
52
|
+
segments: string[];
|
|
53
|
+
/** Depth of the path (number of directory levels) */
|
|
54
|
+
depth: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Options for path matching operations
|
|
58
|
+
*/
|
|
59
|
+
export interface PathMatchOptions {
|
|
60
|
+
/** Whether to match case-insensitively */
|
|
61
|
+
caseInsensitive?: boolean;
|
|
62
|
+
/** Whether to use extended glob patterns */
|
|
63
|
+
extendedGlob?: boolean;
|
|
64
|
+
/** Base path for relative matching */
|
|
65
|
+
basePath?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Abstract base class for structural detectors
|
|
69
|
+
*
|
|
70
|
+
* Provides path pattern matching helpers and utilities for detection
|
|
71
|
+
* that operates on file and directory structures.
|
|
72
|
+
*
|
|
73
|
+
* @requirements 6.4 - THE Detector_System SHALL support detection methods: structural
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* class FileNamingDetector extends StructuralDetector {
|
|
78
|
+
* readonly id = 'structural/file-naming';
|
|
79
|
+
* readonly category = 'structural';
|
|
80
|
+
* readonly subcategory = 'naming-conventions';
|
|
81
|
+
* readonly name = 'File Naming Detector';
|
|
82
|
+
* readonly description = 'Detects file naming patterns';
|
|
83
|
+
* readonly supportedLanguages = ['typescript', 'javascript'];
|
|
84
|
+
*
|
|
85
|
+
* async detect(context: DetectionContext): Promise<DetectionResult> {
|
|
86
|
+
* const fileName = this.getFileName(context.file);
|
|
87
|
+
* const convention = this.matchNamingConvention(fileName, 'PascalCase');
|
|
88
|
+
* // Analyze file naming patterns...
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* generateQuickFix(violation: Violation): QuickFix | null {
|
|
92
|
+
* return null;
|
|
93
|
+
* }
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare abstract class StructuralDetector extends BaseDetector {
|
|
98
|
+
/**
|
|
99
|
+
* Detection method is always 'structural' for structural detectors
|
|
100
|
+
*
|
|
101
|
+
* @requirements 6.4 - Detector declares detection method as 'structural'
|
|
102
|
+
*/
|
|
103
|
+
readonly detectionMethod: "structural";
|
|
104
|
+
/**
|
|
105
|
+
* Match a file path against a glob pattern
|
|
106
|
+
*
|
|
107
|
+
* Supports common glob patterns:
|
|
108
|
+
* - `*` matches any characters except path separators
|
|
109
|
+
* - `**` matches any characters including path separators
|
|
110
|
+
* - `?` matches a single character
|
|
111
|
+
* - `[abc]` matches any character in the brackets
|
|
112
|
+
* - `[!abc]` matches any character not in the brackets
|
|
113
|
+
* - `{a,b,c}` matches any of the alternatives
|
|
114
|
+
*
|
|
115
|
+
* @param path - The file path to match
|
|
116
|
+
* @param pattern - The glob pattern to match against
|
|
117
|
+
* @param options - Optional matching options
|
|
118
|
+
* @returns PathMatchResult with match status and captures
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const result = this.matchPath('src/components/Button.tsx', 'src/components/*.tsx');
|
|
123
|
+
* // result.matches === true
|
|
124
|
+
*
|
|
125
|
+
* const result2 = this.matchPath('src/utils/helpers.ts', '**\/*.test.ts');
|
|
126
|
+
* // result2.matches === false
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
protected matchPath(path: string, pattern: string, options?: PathMatchOptions): PathMatchResult;
|
|
130
|
+
/**
|
|
131
|
+
* Match a file name against a pattern
|
|
132
|
+
*
|
|
133
|
+
* Matches only the file name portion (not the directory path).
|
|
134
|
+
*
|
|
135
|
+
* @param fileName - The file name to match (with or without extension)
|
|
136
|
+
* @param pattern - The pattern to match against (glob or regex string)
|
|
137
|
+
* @param options - Optional matching options
|
|
138
|
+
* @returns PathMatchResult with match status
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* const result = this.matchFileName('Button.tsx', '*.tsx');
|
|
143
|
+
* // result.matches === true
|
|
144
|
+
*
|
|
145
|
+
* const result2 = this.matchFileName('useAuth.ts', 'use*.ts');
|
|
146
|
+
* // result2.matches === true
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
protected matchFileName(fileName: string, pattern: string, options?: PathMatchOptions): PathMatchResult;
|
|
150
|
+
/**
|
|
151
|
+
* Get the file extension from a path
|
|
152
|
+
*
|
|
153
|
+
* Returns the extension including the leading dot.
|
|
154
|
+
* For files with multiple extensions (e.g., .test.ts), returns only the last extension.
|
|
155
|
+
*
|
|
156
|
+
* @param path - The file path
|
|
157
|
+
* @returns The file extension (e.g., '.ts', '.tsx') or empty string if none
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* this.getFileExtension('src/Button.tsx'); // '.tsx'
|
|
162
|
+
* this.getFileExtension('README'); // ''
|
|
163
|
+
* this.getFileExtension('file.test.ts'); // '.ts'
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
protected getFileExtension(path: string): string;
|
|
167
|
+
/**
|
|
168
|
+
* Get the file name without extension from a path
|
|
169
|
+
*
|
|
170
|
+
* @param path - The file path
|
|
171
|
+
* @returns The file name without extension
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* this.getFileName('src/components/Button.tsx'); // 'Button'
|
|
176
|
+
* this.getFileName('README.md'); // 'README'
|
|
177
|
+
* this.getFileName('file.test.ts'); // 'file.test'
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
protected getFileName(path: string): string;
|
|
181
|
+
/**
|
|
182
|
+
* Get the directory path from a file path
|
|
183
|
+
*
|
|
184
|
+
* Returns the path without the file name.
|
|
185
|
+
*
|
|
186
|
+
* @param path - The file path
|
|
187
|
+
* @returns The directory path (empty string if file is in root)
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```typescript
|
|
191
|
+
* this.getDirectoryPath('src/components/Button.tsx'); // 'src/components'
|
|
192
|
+
* this.getDirectoryPath('index.ts'); // ''
|
|
193
|
+
* this.getDirectoryPath('src/utils/'); // 'src/utils'
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
protected getDirectoryPath(path: string): string;
|
|
197
|
+
/**
|
|
198
|
+
* Get detailed information about a file path
|
|
199
|
+
*
|
|
200
|
+
* @param path - The file path to analyze
|
|
201
|
+
* @returns PathInfo object with all path components
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```typescript
|
|
205
|
+
* const info = this.getPathInfo('src/components/Button.tsx');
|
|
206
|
+
* // info.directory === 'src/components'
|
|
207
|
+
* // info.fileName === 'Button.tsx'
|
|
208
|
+
* // info.baseName === 'Button'
|
|
209
|
+
* // info.extension === '.tsx'
|
|
210
|
+
* // info.segments === ['src', 'components', 'Button.tsx']
|
|
211
|
+
* // info.depth === 2
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
protected getPathInfo(path: string): PathInfo;
|
|
215
|
+
/**
|
|
216
|
+
* Check if a file is in a specific directory (or its subdirectories)
|
|
217
|
+
*
|
|
218
|
+
* @param path - The file path to check
|
|
219
|
+
* @param directory - The directory to check against
|
|
220
|
+
* @param recursive - Whether to check subdirectories (default: true)
|
|
221
|
+
* @returns true if the file is in the directory
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* this.isInDirectory('src/components/Button.tsx', 'src/components'); // true
|
|
226
|
+
* this.isInDirectory('src/components/ui/Button.tsx', 'src/components'); // true (recursive)
|
|
227
|
+
* this.isInDirectory('src/components/ui/Button.tsx', 'src/components', false); // false
|
|
228
|
+
* this.isInDirectory('src/utils/helpers.ts', 'src/components'); // false
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
protected isInDirectory(path: string, directory: string, recursive?: boolean): boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Get the relative path from a base path
|
|
234
|
+
*
|
|
235
|
+
* @param path - The full file path
|
|
236
|
+
* @param basePath - The base path to make relative to
|
|
237
|
+
* @returns The relative path, or the original path if not under basePath
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* this.getRelativePath('src/components/Button.tsx', 'src'); // 'components/Button.tsx'
|
|
242
|
+
* this.getRelativePath('src/components/Button.tsx', 'src/components'); // 'Button.tsx'
|
|
243
|
+
* this.getRelativePath('other/file.ts', 'src'); // 'other/file.ts' (not under base)
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
protected getRelativePath(path: string, basePath: string): string;
|
|
247
|
+
/**
|
|
248
|
+
* Get the common base path of multiple paths
|
|
249
|
+
*
|
|
250
|
+
* @param paths - Array of file paths
|
|
251
|
+
* @returns The common base path, or empty string if none
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* this.getCommonBasePath(['src/a/file.ts', 'src/b/file.ts']); // 'src'
|
|
256
|
+
* this.getCommonBasePath(['src/components/Button.tsx', 'src/components/Input.tsx']); // 'src/components'
|
|
257
|
+
* this.getCommonBasePath(['a/file.ts', 'b/file.ts']); // ''
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
protected getCommonBasePath(paths: string[]): string;
|
|
261
|
+
/**
|
|
262
|
+
* Get sibling files (files in the same directory)
|
|
263
|
+
*
|
|
264
|
+
* @param path - The file path
|
|
265
|
+
* @param allFiles - Array of all file paths in the project
|
|
266
|
+
* @returns Array of sibling file paths (excluding the input file)
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const siblings = this.getSiblingFiles('src/Button.tsx', projectFiles);
|
|
271
|
+
* // Returns other files in 'src/' directory
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
protected getSiblingFiles(path: string, allFiles: string[]): string[];
|
|
275
|
+
/**
|
|
276
|
+
* Check if a name matches a specific naming convention
|
|
277
|
+
*
|
|
278
|
+
* @param name - The name to check (file name, identifier, etc.)
|
|
279
|
+
* @param convention - The naming convention to check against
|
|
280
|
+
* @returns NamingConventionResult with match status and suggestions
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```typescript
|
|
284
|
+
* this.matchNamingConvention('MyComponent', 'PascalCase'); // { matches: true, ... }
|
|
285
|
+
* this.matchNamingConvention('myFunction', 'camelCase'); // { matches: true, ... }
|
|
286
|
+
* this.matchNamingConvention('my-component', 'kebab-case'); // { matches: true, ... }
|
|
287
|
+
* this.matchNamingConvention('my_variable', 'snake_case'); // { matches: true, ... }
|
|
288
|
+
* this.matchNamingConvention('MAX_VALUE', 'SCREAMING_SNAKE_CASE'); // { matches: true, ... }
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
protected matchNamingConvention(name: string, convention: NamingConvention): NamingConventionResult;
|
|
292
|
+
/**
|
|
293
|
+
* Detect the naming convention of a name
|
|
294
|
+
*
|
|
295
|
+
* @param name - The name to analyze
|
|
296
|
+
* @returns The detected naming convention, or null if unknown
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```typescript
|
|
300
|
+
* this.detectNamingConvention('MyComponent'); // 'PascalCase'
|
|
301
|
+
* this.detectNamingConvention('myFunction'); // 'camelCase'
|
|
302
|
+
* this.detectNamingConvention('my-component'); // 'kebab-case'
|
|
303
|
+
* this.detectNamingConvention('my_variable'); // 'snake_case'
|
|
304
|
+
* this.detectNamingConvention('MAX_VALUE'); // 'SCREAMING_SNAKE_CASE'
|
|
305
|
+
* this.detectNamingConvention('mycomponent'); // 'flatcase'
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
protected detectNamingConvention(name: string): NamingConvention | null;
|
|
309
|
+
/**
|
|
310
|
+
* Convert a name to a specific naming convention
|
|
311
|
+
*
|
|
312
|
+
* @param name - The name to convert
|
|
313
|
+
* @param convention - The target naming convention
|
|
314
|
+
* @returns The converted name
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```typescript
|
|
318
|
+
* this.convertToConvention('myComponent', 'PascalCase'); // 'MyComponent'
|
|
319
|
+
* this.convertToConvention('MyComponent', 'camelCase'); // 'myComponent'
|
|
320
|
+
* this.convertToConvention('MyComponent', 'kebab-case'); // 'my-component'
|
|
321
|
+
* this.convertToConvention('myComponent', 'snake_case'); // 'my_component'
|
|
322
|
+
* this.convertToConvention('myComponent', 'SCREAMING_SNAKE_CASE'); // 'MY_COMPONENT'
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
protected convertToConvention(name: string, convention: NamingConvention): string;
|
|
326
|
+
/**
|
|
327
|
+
* Split a name into words based on common conventions
|
|
328
|
+
*
|
|
329
|
+
* @param name - The name to split
|
|
330
|
+
* @returns Array of words
|
|
331
|
+
*/
|
|
332
|
+
private splitIntoWords;
|
|
333
|
+
/**
|
|
334
|
+
* Capitalize the first letter of a word
|
|
335
|
+
*/
|
|
336
|
+
private capitalize;
|
|
337
|
+
/**
|
|
338
|
+
* Check if a file is a test file based on common patterns
|
|
339
|
+
*
|
|
340
|
+
* @param path - The file path to check
|
|
341
|
+
* @returns true if the file appears to be a test file
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* ```typescript
|
|
345
|
+
* this.isTestFile('Button.test.ts'); // true
|
|
346
|
+
* this.isTestFile('Button.spec.tsx'); // true
|
|
347
|
+
* this.isTestFile('__tests__/Button.ts'); // true
|
|
348
|
+
* this.isTestFile('Button.tsx'); // false
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
protected isTestFile(path: string): boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Check if a file is a type definition file
|
|
354
|
+
*
|
|
355
|
+
* @param path - The file path to check
|
|
356
|
+
* @returns true if the file is a type definition
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```typescript
|
|
360
|
+
* this.isTypeDefinitionFile('types.d.ts'); // true
|
|
361
|
+
* this.isTypeDefinitionFile('index.d.ts'); // true
|
|
362
|
+
* this.isTypeDefinitionFile('Button.tsx'); // false
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
protected isTypeDefinitionFile(path: string): boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Check if a file is an index/barrel file
|
|
368
|
+
*
|
|
369
|
+
* @param path - The file path to check
|
|
370
|
+
* @returns true if the file is an index file
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* this.isIndexFile('index.ts'); // true
|
|
375
|
+
* this.isIndexFile('src/index.tsx'); // true
|
|
376
|
+
* this.isIndexFile('Button.tsx'); // false
|
|
377
|
+
* ```
|
|
378
|
+
*/
|
|
379
|
+
protected isIndexFile(path: string): boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Check if a file is a configuration file
|
|
382
|
+
*
|
|
383
|
+
* @param path - The file path to check
|
|
384
|
+
* @returns true if the file appears to be a config file
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* ```typescript
|
|
388
|
+
* this.isConfigFile('tsconfig.json'); // true
|
|
389
|
+
* this.isConfigFile('.eslintrc.js'); // true
|
|
390
|
+
* this.isConfigFile('vite.config.ts'); // true
|
|
391
|
+
* this.isConfigFile('Button.tsx'); // false
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
protected isConfigFile(path: string): boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Create a Location object for a file
|
|
397
|
+
*
|
|
398
|
+
* @param file - The file path
|
|
399
|
+
* @param line - Line number (1-indexed, default: 1)
|
|
400
|
+
* @param column - Column number (1-indexed, default: 1)
|
|
401
|
+
* @returns A Location object
|
|
402
|
+
*/
|
|
403
|
+
protected createFileLocation(file: string, line?: number, column?: number): Location;
|
|
404
|
+
/**
|
|
405
|
+
* Normalize a file path to use forward slashes
|
|
406
|
+
*/
|
|
407
|
+
private normalizePath;
|
|
408
|
+
/**
|
|
409
|
+
* Convert a glob pattern to a regular expression
|
|
410
|
+
*/
|
|
411
|
+
private globToRegex;
|
|
412
|
+
/**
|
|
413
|
+
* Escape special regex characters in a string
|
|
414
|
+
*/
|
|
415
|
+
private escapeRegex;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Type guard to check if a detector is a structural detector
|
|
419
|
+
*
|
|
420
|
+
* @param detector - The detector to check
|
|
421
|
+
* @returns true if the detector is a StructuralDetector
|
|
422
|
+
*/
|
|
423
|
+
export declare function isStructuralDetector(detector: BaseDetector): detector is StructuralDetector;
|
|
424
|
+
//# sourceMappingURL=structural-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-detector.d.ts","sourceRoot":"","sources":["../../src/base/structural-detector.ts"],"names":[],"mappings":"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"}
|