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,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regex Detector - Regex-based detection base class
|
|
3
|
+
*
|
|
4
|
+
* Provides pattern matching helpers and utilities for regex-based pattern detection.
|
|
5
|
+
* Extends BaseDetector with specialized methods for matching patterns in source code.
|
|
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
|
+
* Result of a regex match with position information
|
|
13
|
+
*/
|
|
14
|
+
export interface RegexMatch {
|
|
15
|
+
/** The full matched text */
|
|
16
|
+
match: string;
|
|
17
|
+
/** Index of the match in the source string */
|
|
18
|
+
index: number;
|
|
19
|
+
/** Named capture groups (if any) */
|
|
20
|
+
groups: Record<string, string>;
|
|
21
|
+
/** Numbered capture groups (index 0 is full match) */
|
|
22
|
+
captures: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Result of a regex match with line information
|
|
26
|
+
*/
|
|
27
|
+
export interface LineMatch {
|
|
28
|
+
/** The full matched text */
|
|
29
|
+
match: string;
|
|
30
|
+
/** Line number (1-indexed) */
|
|
31
|
+
line: number;
|
|
32
|
+
/** Column number (1-indexed) */
|
|
33
|
+
column: number;
|
|
34
|
+
/** End line number (1-indexed) */
|
|
35
|
+
endLine: number;
|
|
36
|
+
/** End column number (1-indexed) */
|
|
37
|
+
endColumn: number;
|
|
38
|
+
/** Index of the match in the source string */
|
|
39
|
+
index: number;
|
|
40
|
+
/** Named capture groups (if any) */
|
|
41
|
+
groups: Record<string, string>;
|
|
42
|
+
/** Numbered capture groups (index 0 is full match) */
|
|
43
|
+
captures: string[];
|
|
44
|
+
/** The full line(s) containing the match */
|
|
45
|
+
lineContent: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of extracting named capture groups
|
|
49
|
+
*/
|
|
50
|
+
export interface CaptureResult {
|
|
51
|
+
/** The full matched text */
|
|
52
|
+
match: string;
|
|
53
|
+
/** Named capture groups */
|
|
54
|
+
groups: Record<string, string>;
|
|
55
|
+
/** Line number (1-indexed) */
|
|
56
|
+
line: number;
|
|
57
|
+
/** Column number (1-indexed) */
|
|
58
|
+
column: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Location of a pattern match in source code
|
|
62
|
+
*/
|
|
63
|
+
export interface PatternLocation {
|
|
64
|
+
/** File path (relative to project root) */
|
|
65
|
+
file: string;
|
|
66
|
+
/** Line number (1-indexed) */
|
|
67
|
+
line: number;
|
|
68
|
+
/** Column number (1-indexed) */
|
|
69
|
+
column: number;
|
|
70
|
+
/** End line number (1-indexed) */
|
|
71
|
+
endLine: number;
|
|
72
|
+
/** End column number (1-indexed) */
|
|
73
|
+
endColumn: number;
|
|
74
|
+
/** The matched text */
|
|
75
|
+
matchedText: string;
|
|
76
|
+
/** Named capture groups (if any) */
|
|
77
|
+
groups: Record<string, string>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Options for regex matching operations
|
|
81
|
+
*/
|
|
82
|
+
export interface RegexMatchOptions {
|
|
83
|
+
/** Whether to match case-insensitively */
|
|
84
|
+
caseInsensitive?: boolean;
|
|
85
|
+
/** Whether to match across multiple lines */
|
|
86
|
+
multiline?: boolean;
|
|
87
|
+
/** Whether to use dotAll mode (. matches newlines) */
|
|
88
|
+
dotAll?: boolean;
|
|
89
|
+
/** Maximum number of matches to return (undefined = all) */
|
|
90
|
+
maxMatches?: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Abstract base class for regex-based detectors
|
|
94
|
+
*
|
|
95
|
+
* Provides pattern matching helpers and utilities for detection
|
|
96
|
+
* that operates on source code using regular expressions.
|
|
97
|
+
*
|
|
98
|
+
* @requirements 6.4 - THE Detector_System SHALL support detection methods: regex
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* class TodoCommentDetector extends RegexDetector {
|
|
103
|
+
* readonly id = 'documentation/todo-patterns';
|
|
104
|
+
* readonly category = 'documentation';
|
|
105
|
+
* readonly subcategory = 'comments';
|
|
106
|
+
* readonly name = 'TODO Comment Detector';
|
|
107
|
+
* readonly description = 'Detects TODO/FIXME comment patterns';
|
|
108
|
+
* readonly supportedLanguages = ['typescript', 'javascript'];
|
|
109
|
+
*
|
|
110
|
+
* async detect(context: DetectionContext): Promise<DetectionResult> {
|
|
111
|
+
* const todoPattern = /\/\/\s*(TODO|FIXME):\s*(.+)/gi;
|
|
112
|
+
* const matches = this.matchLines(context.content, todoPattern);
|
|
113
|
+
* // Analyze TODO patterns...
|
|
114
|
+
* }
|
|
115
|
+
*
|
|
116
|
+
* generateQuickFix(violation: Violation): QuickFix | null {
|
|
117
|
+
* return null;
|
|
118
|
+
* }
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare abstract class RegexDetector extends BaseDetector {
|
|
123
|
+
/**
|
|
124
|
+
* Detection method is always 'regex' for regex-based detectors
|
|
125
|
+
*
|
|
126
|
+
* @requirements 6.4 - Detector declares detection method as 'regex'
|
|
127
|
+
*/
|
|
128
|
+
readonly detectionMethod: "regex";
|
|
129
|
+
/**
|
|
130
|
+
* Find all matches of a regex pattern in content
|
|
131
|
+
*
|
|
132
|
+
* Returns all matches with their positions and capture groups.
|
|
133
|
+
*
|
|
134
|
+
* @param content - The source content to search
|
|
135
|
+
* @param pattern - The regex pattern to match (will be made global if not already)
|
|
136
|
+
* @param options - Optional matching options
|
|
137
|
+
* @returns Array of match results
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```typescript
|
|
141
|
+
* const matches = this.matchAll(content, /function\s+(\w+)/g);
|
|
142
|
+
* for (const match of matches) {
|
|
143
|
+
* console.log(`Found function: ${match.captures[1]}`);
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
protected matchAll(content: string, pattern: RegExp, options?: RegexMatchOptions): RegexMatch[];
|
|
148
|
+
/**
|
|
149
|
+
* Find all matches with line and column information
|
|
150
|
+
*
|
|
151
|
+
* Returns matches with their line numbers, columns, and the full line content.
|
|
152
|
+
*
|
|
153
|
+
* @param content - The source content to search
|
|
154
|
+
* @param pattern - The regex pattern to match
|
|
155
|
+
* @param options - Optional matching options
|
|
156
|
+
* @returns Array of line match results
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* const matches = this.matchLines(content, /console\.log\(/g);
|
|
161
|
+
* for (const match of matches) {
|
|
162
|
+
* console.log(`Found console.log at line ${match.line}, column ${match.column}`);
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
protected matchLines(content: string, pattern: RegExp, options?: RegexMatchOptions): LineMatch[];
|
|
167
|
+
/**
|
|
168
|
+
* Extract named capture groups from all matches
|
|
169
|
+
*
|
|
170
|
+
* Useful for patterns with named groups like /(?<name>\w+)/
|
|
171
|
+
*
|
|
172
|
+
* @param content - The source content to search
|
|
173
|
+
* @param pattern - The regex pattern with named capture groups
|
|
174
|
+
* @param options - Optional matching options
|
|
175
|
+
* @returns Array of capture results with groups
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* const captures = this.extractCaptures(
|
|
180
|
+
* content,
|
|
181
|
+
* /function\s+(?<name>\w+)\s*\((?<params>[^)]*)\)/g
|
|
182
|
+
* );
|
|
183
|
+
* for (const capture of captures) {
|
|
184
|
+
* console.log(`Function ${capture.groups.name} with params: ${capture.groups.params}`);
|
|
185
|
+
* }
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
protected extractCaptures(content: string, pattern: RegExp, options?: RegexMatchOptions): CaptureResult[];
|
|
189
|
+
/**
|
|
190
|
+
* Find locations of all pattern matches
|
|
191
|
+
*
|
|
192
|
+
* Returns Location objects compatible with the drift core types.
|
|
193
|
+
*
|
|
194
|
+
* @param content - The source content to search
|
|
195
|
+
* @param pattern - The regex pattern to match
|
|
196
|
+
* @param file - The file path for the locations
|
|
197
|
+
* @param options - Optional matching options
|
|
198
|
+
* @returns Array of pattern locations
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* const locations = this.findPatternLocations(
|
|
203
|
+
* context.content,
|
|
204
|
+
* /import\s+.*\s+from\s+['"]([^'"]+)['"]/g,
|
|
205
|
+
* context.file
|
|
206
|
+
* );
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
protected findPatternLocations(content: string, pattern: RegExp, file: string, options?: RegexMatchOptions): PatternLocation[];
|
|
210
|
+
/**
|
|
211
|
+
* Test if a pattern matches anywhere in the content
|
|
212
|
+
*
|
|
213
|
+
* @param content - The source content to test
|
|
214
|
+
* @param pattern - The regex pattern to test
|
|
215
|
+
* @returns true if the pattern matches
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```typescript
|
|
219
|
+
* if (this.hasMatch(content, /export\s+default/)) {
|
|
220
|
+
* // File has a default export
|
|
221
|
+
* }
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
protected hasMatch(content: string, pattern: RegExp): boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Count the number of matches in content
|
|
227
|
+
*
|
|
228
|
+
* @param content - The source content to search
|
|
229
|
+
* @param pattern - The regex pattern to count
|
|
230
|
+
* @returns Number of matches found
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* const importCount = this.countMatches(content, /^import\s+/gm);
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
protected countMatches(content: string, pattern: RegExp): number;
|
|
238
|
+
/**
|
|
239
|
+
* Find the first match of a pattern
|
|
240
|
+
*
|
|
241
|
+
* @param content - The source content to search
|
|
242
|
+
* @param pattern - The regex pattern to match
|
|
243
|
+
* @returns The first match, or null if not found
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* const firstFunction = this.findFirst(content, /function\s+(\w+)/);
|
|
248
|
+
* if (firstFunction) {
|
|
249
|
+
* console.log(`First function: ${firstFunction.captures[1]}`);
|
|
250
|
+
* }
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
protected findFirst(content: string, pattern: RegExp): LineMatch | null;
|
|
254
|
+
/**
|
|
255
|
+
* Find the last match of a pattern
|
|
256
|
+
*
|
|
257
|
+
* @param content - The source content to search
|
|
258
|
+
* @param pattern - The regex pattern to match
|
|
259
|
+
* @returns The last match, or null if not found
|
|
260
|
+
*/
|
|
261
|
+
protected findLast(content: string, pattern: RegExp): LineMatch | null;
|
|
262
|
+
/**
|
|
263
|
+
* Find matches within a specific line range
|
|
264
|
+
*
|
|
265
|
+
* @param content - The source content to search
|
|
266
|
+
* @param pattern - The regex pattern to match
|
|
267
|
+
* @param startLine - Start line (1-indexed, inclusive)
|
|
268
|
+
* @param endLine - End line (1-indexed, inclusive)
|
|
269
|
+
* @returns Array of matches within the line range
|
|
270
|
+
*/
|
|
271
|
+
protected matchInRange(content: string, pattern: RegExp, startLine: number, endLine: number): LineMatch[];
|
|
272
|
+
/**
|
|
273
|
+
* Replace all matches of a pattern
|
|
274
|
+
*
|
|
275
|
+
* @param content - The source content
|
|
276
|
+
* @param pattern - The regex pattern to replace
|
|
277
|
+
* @param replacement - The replacement string or function
|
|
278
|
+
* @returns The content with replacements applied
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const fixed = this.replaceAll(content, /var\s+/g, 'const ');
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
protected replaceAll(content: string, pattern: RegExp, replacement: string | ((match: string, ...args: unknown[]) => string)): string;
|
|
286
|
+
/**
|
|
287
|
+
* Split content by a pattern
|
|
288
|
+
*
|
|
289
|
+
* @param content - The source content to split
|
|
290
|
+
* @param pattern - The regex pattern to split by
|
|
291
|
+
* @param limit - Maximum number of splits
|
|
292
|
+
* @returns Array of split parts
|
|
293
|
+
*/
|
|
294
|
+
protected splitByPattern(content: string, pattern: RegExp, limit?: number): string[];
|
|
295
|
+
/**
|
|
296
|
+
* Get all lines matching a pattern
|
|
297
|
+
*
|
|
298
|
+
* Returns complete lines that contain a match.
|
|
299
|
+
*
|
|
300
|
+
* @param content - The source content to search
|
|
301
|
+
* @param pattern - The regex pattern to match
|
|
302
|
+
* @returns Array of objects with line number and content
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```typescript
|
|
306
|
+
* const importLines = this.getMatchingLines(content, /^import\s+/);
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
protected getMatchingLines(content: string, pattern: RegExp): Array<{
|
|
310
|
+
line: number;
|
|
311
|
+
content: string;
|
|
312
|
+
}>;
|
|
313
|
+
/**
|
|
314
|
+
* Get lines NOT matching a pattern
|
|
315
|
+
*
|
|
316
|
+
* @param content - The source content to search
|
|
317
|
+
* @param pattern - The regex pattern to exclude
|
|
318
|
+
* @returns Array of objects with line number and content
|
|
319
|
+
*/
|
|
320
|
+
protected getNonMatchingLines(content: string, pattern: RegExp): Array<{
|
|
321
|
+
line: number;
|
|
322
|
+
content: string;
|
|
323
|
+
}>;
|
|
324
|
+
/**
|
|
325
|
+
* Create a pattern that matches any of the given strings
|
|
326
|
+
*
|
|
327
|
+
* @param strings - Strings to match (will be escaped)
|
|
328
|
+
* @param flags - Optional regex flags
|
|
329
|
+
* @returns A regex that matches any of the strings
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* const keywords = this.createAlternationPattern(['var', 'let', 'const'], 'g');
|
|
334
|
+
* // Creates: /var|let|const/g
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
protected createAlternationPattern(strings: string[], flags?: string): RegExp;
|
|
338
|
+
/**
|
|
339
|
+
* Create a pattern that matches a word boundary version of strings
|
|
340
|
+
*
|
|
341
|
+
* @param strings - Strings to match as whole words
|
|
342
|
+
* @param flags - Optional regex flags
|
|
343
|
+
* @returns A regex that matches whole words only
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```typescript
|
|
347
|
+
* const keywords = this.createWordBoundaryPattern(['var', 'let', 'const'], 'g');
|
|
348
|
+
* // Creates: /\b(?:var|let|const)\b/g
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
protected createWordBoundaryPattern(strings: string[], flags?: string): RegExp;
|
|
352
|
+
/**
|
|
353
|
+
* Escape special regex characters in a string
|
|
354
|
+
*
|
|
355
|
+
* @param str - String to escape
|
|
356
|
+
* @returns Escaped string safe for use in regex
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```typescript
|
|
360
|
+
* const escaped = this.escapeRegex('file.ts'); // 'file\\.ts'
|
|
361
|
+
* ```
|
|
362
|
+
*/
|
|
363
|
+
protected escapeRegex(str: string): string;
|
|
364
|
+
/**
|
|
365
|
+
* Create a pattern from a template with placeholders
|
|
366
|
+
*
|
|
367
|
+
* @param template - Template string with {name} placeholders
|
|
368
|
+
* @param values - Values to substitute for placeholders
|
|
369
|
+
* @param flags - Optional regex flags
|
|
370
|
+
* @returns A regex with placeholders replaced
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* const pattern = this.createPatternFromTemplate(
|
|
375
|
+
* 'import\\s+{name}\\s+from\\s+[\'\"]{module}[\'\"]',
|
|
376
|
+
* { name: '\\w+', module: '[^\'\"]+' },
|
|
377
|
+
* 'g'
|
|
378
|
+
* );
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
protected createPatternFromTemplate(template: string, values: Record<string, string>, flags?: string): RegExp;
|
|
382
|
+
/**
|
|
383
|
+
* Convert a LineMatch to a Location object
|
|
384
|
+
*
|
|
385
|
+
* @param match - The line match to convert
|
|
386
|
+
* @param file - The file path
|
|
387
|
+
* @returns A Location object
|
|
388
|
+
*/
|
|
389
|
+
protected lineMatchToLocation(match: LineMatch, file: string): Location;
|
|
390
|
+
/**
|
|
391
|
+
* Convert a PatternLocation to a Location object
|
|
392
|
+
*
|
|
393
|
+
* @param patternLocation - The pattern location to convert
|
|
394
|
+
* @returns A Location object
|
|
395
|
+
*/
|
|
396
|
+
protected patternLocationToLocation(patternLocation: PatternLocation): Location;
|
|
397
|
+
/**
|
|
398
|
+
* Line index information for position calculations
|
|
399
|
+
*/
|
|
400
|
+
private buildLineIndex;
|
|
401
|
+
/**
|
|
402
|
+
* Convert a string index to line/column position
|
|
403
|
+
*/
|
|
404
|
+
private indexToPosition;
|
|
405
|
+
/**
|
|
406
|
+
* Get the content of one or more lines
|
|
407
|
+
*/
|
|
408
|
+
private getLineContent;
|
|
409
|
+
/**
|
|
410
|
+
* Normalize a regex pattern with options
|
|
411
|
+
*/
|
|
412
|
+
private normalizePattern;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Type guard to check if a detector is a regex detector
|
|
416
|
+
*
|
|
417
|
+
* @param detector - The detector to check
|
|
418
|
+
* @returns true if the detector is a RegexDetector
|
|
419
|
+
*/
|
|
420
|
+
export declare function isRegexDetector(detector: BaseDetector): detector is RegexDetector;
|
|
421
|
+
//# sourceMappingURL=regex-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex-detector.d.ts","sourceRoot":"","sources":["../../src/base/regex-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/B,sDAAsD;IACtD,QAAQ,EAAE,MAAM,EAA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