driftdetect-core 0.4.5 → 0.5.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/LICENSE +21 -0
- package/dist/boundaries/boundary-scanner.d.ts.map +1 -1
- package/dist/boundaries/boundary-scanner.js +184 -18
- package/dist/boundaries/boundary-scanner.js.map +1 -1
- package/dist/boundaries/types.d.ts +34 -2
- package/dist/boundaries/types.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.d.ts +3 -0
- package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.js +81 -18
- package/dist/call-graph/analysis/graph-builder.js.map +1 -1
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/csharp-data-access-extractor.js +18 -5
- package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
- package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/csharp-extractor.js +362 -4
- package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
- package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
- package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/data-access-extractor.d.ts +16 -2
- package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/data-access-extractor.js +114 -5
- package/dist/call-graph/extractors/data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
- package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
- package/dist/call-graph/extractors/index.d.ts +17 -13
- package/dist/call-graph/extractors/index.d.ts.map +1 -1
- package/dist/call-graph/extractors/index.js +24 -23
- package/dist/call-graph/extractors/index.js.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.js +20 -6
- package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
- package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/java-extractor.js +120 -4
- package/dist/call-graph/extractors/java-extractor.js.map +1 -1
- package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
- package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/php-data-access-extractor.js +20 -6
- package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
- package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/php-extractor.js +460 -6
- package/dist/call-graph/extractors/php-extractor.js.map +1 -1
- package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
- package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/python-data-access-extractor.js +20 -6
- package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
- package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
- package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
- package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
- package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/index.d.ts +25 -0
- package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/index.js +66 -0
- package/dist/call-graph/extractors/regex/index.js.map +1 -0
- package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
- package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/java-regex.js +327 -0
- package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
- package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/php-regex.js +333 -0
- package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
- package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/python-regex.js +380 -0
- package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
- package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
- package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +11 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
- package/dist/call-graph/extractors/semantic-data-access-scanner.js +53 -2
- package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
- package/dist/call-graph/extractors/types.d.ts +111 -0
- package/dist/call-graph/extractors/types.d.ts.map +1 -0
- package/dist/call-graph/extractors/types.js +68 -0
- package/dist/call-graph/extractors/types.js.map +1 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/typescript-data-access-extractor.js +31 -10
- package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
- package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/index.d.ts +2 -4
- package/dist/call-graph/index.d.ts.map +1 -1
- package/dist/call-graph/index.js +5 -6
- package/dist/call-graph/index.js.map +1 -1
- package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
- package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
- package/dist/error-handling/error-handling-analyzer.js +706 -0
- package/dist/error-handling/error-handling-analyzer.js.map +1 -0
- package/dist/error-handling/index.d.ts +8 -0
- package/dist/error-handling/index.d.ts.map +1 -0
- package/dist/error-handling/index.js +8 -0
- package/dist/error-handling/index.js.map +1 -0
- package/dist/error-handling/types.d.ts +307 -0
- package/dist/error-handling/types.d.ts.map +1 -0
- package/dist/error-handling/types.js +7 -0
- package/dist/error-handling/types.js.map +1 -0
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -5
- package/dist/index.js.map +1 -1
- package/dist/lake/pattern-shard-store.d.ts +6 -0
- package/dist/lake/pattern-shard-store.d.ts.map +1 -1
- package/dist/lake/pattern-shard-store.js +6 -0
- package/dist/lake/pattern-shard-store.js.map +1 -1
- package/dist/language-intelligence/base-normalizer.d.ts +68 -0
- package/dist/language-intelligence/base-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/base-normalizer.js +210 -0
- package/dist/language-intelligence/base-normalizer.js.map +1 -0
- package/dist/language-intelligence/framework-registry.d.ts +89 -0
- package/dist/language-intelligence/framework-registry.d.ts.map +1 -0
- package/dist/language-intelligence/framework-registry.js +165 -0
- package/dist/language-intelligence/framework-registry.js.map +1 -0
- package/dist/language-intelligence/frameworks/aspnet.d.ts +11 -0
- package/dist/language-intelligence/frameworks/aspnet.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/aspnet.js +325 -0
- package/dist/language-intelligence/frameworks/aspnet.js.map +1 -0
- package/dist/language-intelligence/frameworks/fastapi.d.ts +11 -0
- package/dist/language-intelligence/frameworks/fastapi.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/fastapi.js +188 -0
- package/dist/language-intelligence/frameworks/fastapi.js.map +1 -0
- package/dist/language-intelligence/frameworks/index.d.ts +32 -0
- package/dist/language-intelligence/frameworks/index.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/index.js +51 -0
- package/dist/language-intelligence/frameworks/index.js.map +1 -0
- package/dist/language-intelligence/frameworks/laravel.d.ts +12 -0
- package/dist/language-intelligence/frameworks/laravel.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/laravel.js +194 -0
- package/dist/language-intelligence/frameworks/laravel.js.map +1 -0
- package/dist/language-intelligence/frameworks/nestjs.d.ts +11 -0
- package/dist/language-intelligence/frameworks/nestjs.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/nestjs.js +307 -0
- package/dist/language-intelligence/frameworks/nestjs.js.map +1 -0
- package/dist/language-intelligence/frameworks/spring.d.ts +11 -0
- package/dist/language-intelligence/frameworks/spring.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/spring.js +369 -0
- package/dist/language-intelligence/frameworks/spring.js.map +1 -0
- package/dist/language-intelligence/index.d.ts +33 -0
- package/dist/language-intelligence/index.d.ts.map +1 -0
- package/dist/language-intelligence/index.js +37 -0
- package/dist/language-intelligence/index.js.map +1 -0
- package/dist/language-intelligence/language-intelligence.d.ts +99 -0
- package/dist/language-intelligence/language-intelligence.d.ts.map +1 -0
- package/dist/language-intelligence/language-intelligence.js +239 -0
- package/dist/language-intelligence/language-intelligence.js.map +1 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.js +86 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/index.d.ts +25 -0
- package/dist/language-intelligence/normalizers/index.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/index.js +60 -0
- package/dist/language-intelligence/normalizers/index.js.map +1 -0
- package/dist/language-intelligence/normalizers/java-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/java-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/java-normalizer.js +96 -0
- package/dist/language-intelligence/normalizers/java-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/php-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/php-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/php-normalizer.js +86 -0
- package/dist/language-intelligence/normalizers/php-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/python-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/python-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/python-normalizer.js +95 -0
- package/dist/language-intelligence/normalizers/python-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.js +84 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.js.map +1 -0
- package/dist/language-intelligence/types.d.ts +270 -0
- package/dist/language-intelligence/types.d.ts.map +1 -0
- package/dist/language-intelligence/types.js +9 -0
- package/dist/language-intelligence/types.js.map +1 -0
- package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
- package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
- package/dist/module-coupling/coupling-analyzer.js +668 -0
- package/dist/module-coupling/coupling-analyzer.js.map +1 -0
- package/dist/module-coupling/index.d.ts +9 -0
- package/dist/module-coupling/index.d.ts.map +1 -0
- package/dist/module-coupling/index.js +9 -0
- package/dist/module-coupling/index.js.map +1 -0
- package/dist/module-coupling/types.d.ts +273 -0
- package/dist/module-coupling/types.d.ts.map +1 -0
- package/dist/module-coupling/types.js +8 -0
- package/dist/module-coupling/types.js.map +1 -0
- package/dist/patterns/adapters/index.d.ts +11 -0
- package/dist/patterns/adapters/index.d.ts.map +1 -0
- package/dist/patterns/adapters/index.js +11 -0
- package/dist/patterns/adapters/index.js.map +1 -0
- package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
- package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
- package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
- package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
- package/dist/patterns/adapters/service-factory.d.ts +40 -0
- package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
- package/dist/patterns/adapters/service-factory.js +144 -0
- package/dist/patterns/adapters/service-factory.js.map +1 -0
- package/dist/patterns/errors.d.ts +32 -0
- package/dist/patterns/errors.d.ts.map +1 -0
- package/dist/patterns/errors.js +45 -0
- package/dist/patterns/errors.js.map +1 -0
- package/dist/patterns/impl/cached-repository.d.ts +79 -0
- package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
- package/dist/patterns/impl/cached-repository.js +296 -0
- package/dist/patterns/impl/cached-repository.js.map +1 -0
- package/dist/patterns/impl/file-repository.d.ts +75 -0
- package/dist/patterns/impl/file-repository.d.ts.map +1 -0
- package/dist/patterns/impl/file-repository.js +507 -0
- package/dist/patterns/impl/file-repository.js.map +1 -0
- package/dist/patterns/impl/index.d.ts +16 -0
- package/dist/patterns/impl/index.d.ts.map +1 -0
- package/dist/patterns/impl/index.js +21 -0
- package/dist/patterns/impl/index.js.map +1 -0
- package/dist/patterns/impl/memory-repository.d.ts +56 -0
- package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
- package/dist/patterns/impl/memory-repository.js +323 -0
- package/dist/patterns/impl/memory-repository.js.map +1 -0
- package/dist/patterns/impl/pattern-service.d.ts +52 -0
- package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
- package/dist/patterns/impl/pattern-service.js +382 -0
- package/dist/patterns/impl/pattern-service.js.map +1 -0
- package/dist/patterns/impl/repository-factory.d.ts +44 -0
- package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
- package/dist/patterns/impl/repository-factory.js +140 -0
- package/dist/patterns/impl/repository-factory.js.map +1 -0
- package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
- package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
- package/dist/patterns/impl/unified-file-repository.js +677 -0
- package/dist/patterns/impl/unified-file-repository.js.map +1 -0
- package/dist/patterns/index.d.ts +23 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +41 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/repository.d.ts +241 -0
- package/dist/patterns/repository.d.ts.map +1 -0
- package/dist/patterns/repository.js +23 -0
- package/dist/patterns/repository.js.map +1 -0
- package/dist/patterns/service.d.ts +245 -0
- package/dist/patterns/service.d.ts.map +1 -0
- package/dist/patterns/service.js +25 -0
- package/dist/patterns/service.js.map +1 -0
- package/dist/patterns/types.d.ts +227 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +117 -0
- package/dist/patterns/types.js.map +1 -0
- package/dist/scanner/file-processor-worker.d.ts +66 -0
- package/dist/scanner/file-processor-worker.d.ts.map +1 -0
- package/dist/scanner/file-processor-worker.js +189 -0
- package/dist/scanner/file-processor-worker.js.map +1 -0
- package/dist/scanner/index.d.ts +2 -0
- package/dist/scanner/index.d.ts.map +1 -1
- package/dist/scanner/index.js +2 -0
- package/dist/scanner/index.js.map +1 -1
- package/dist/scanner/threaded-worker-pool.d.ts +182 -0
- package/dist/scanner/threaded-worker-pool.d.ts.map +1 -0
- package/dist/scanner/threaded-worker-pool.js +243 -0
- package/dist/scanner/threaded-worker-pool.js.map +1 -0
- package/dist/store/pattern-store.d.ts +6 -0
- package/dist/store/pattern-store.d.ts.map +1 -1
- package/dist/store/pattern-store.js +6 -0
- package/dist/store/pattern-store.js.map +1 -1
- package/dist/store/types.d.ts +6 -3
- package/dist/store/types.d.ts.map +1 -1
- package/dist/store/types.js.map +1 -1
- package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
- package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/base-test-extractor.js +187 -0
- package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
- package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
- package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/index.d.ts +12 -0
- package/dist/test-topology/extractors/index.d.ts.map +1 -0
- package/dist/test-topology/extractors/index.js +12 -0
- package/dist/test-topology/extractors/index.js.map +1 -0
- package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
- package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/java-test-extractor.js +275 -0
- package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
- package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/php-test-extractor.js +409 -0
- package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
- package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/python-test-extractor.js +342 -0
- package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
- package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/index.d.ts +18 -0
- package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/index.js +43 -0
- package/dist/test-topology/extractors/regex/index.js.map +1 -0
- package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
- package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
- package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
- package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
- package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
- package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
- package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
- package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
- package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
- package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js +555 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
- package/dist/test-topology/index.d.ts +16 -0
- package/dist/test-topology/index.d.ts.map +1 -0
- package/dist/test-topology/index.js +19 -0
- package/dist/test-topology/index.js.map +1 -0
- package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
- package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
- package/dist/test-topology/test-topology-analyzer.js +538 -0
- package/dist/test-topology/test-topology-analyzer.js.map +1 -0
- package/dist/test-topology/types.d.ts +300 -0
- package/dist/test-topology/types.d.ts.map +1 -0
- package/dist/test-topology/types.js +7 -0
- package/dist/test-topology/types.js.map +1 -0
- package/dist/unified-provider/compat/index.d.ts +11 -0
- package/dist/unified-provider/compat/index.d.ts.map +1 -0
- package/dist/unified-provider/compat/index.js +13 -0
- package/dist/unified-provider/compat/index.js.map +1 -0
- package/dist/unified-provider/compat/legacy-extractors.d.ts +63 -0
- package/dist/unified-provider/compat/legacy-extractors.d.ts.map +1 -0
- package/dist/unified-provider/compat/legacy-extractors.js +80 -0
- package/dist/unified-provider/compat/legacy-extractors.js.map +1 -0
- package/dist/unified-provider/compat/legacy-scanner.d.ts +28 -0
- package/dist/unified-provider/compat/legacy-scanner.d.ts.map +1 -0
- package/dist/unified-provider/compat/legacy-scanner.js +31 -0
- package/dist/unified-provider/compat/legacy-scanner.js.map +1 -0
- package/dist/unified-provider/index.d.ts +28 -0
- package/dist/unified-provider/index.d.ts.map +1 -0
- package/dist/unified-provider/index.js +47 -0
- package/dist/unified-provider/index.js.map +1 -0
- package/dist/unified-provider/integration/index.d.ts +9 -0
- package/dist/unified-provider/integration/index.d.ts.map +1 -0
- package/dist/unified-provider/integration/index.js +11 -0
- package/dist/unified-provider/integration/index.js.map +1 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.d.ts +75 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.d.ts.map +1 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.js +210 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.js.map +1 -0
- package/dist/unified-provider/integration/unified-scanner.d.ts +90 -0
- package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -0
- package/dist/unified-provider/integration/unified-scanner.js +369 -0
- package/dist/unified-provider/integration/unified-scanner.js.map +1 -0
- package/dist/unified-provider/matching/base-matcher.d.ts +80 -0
- package/dist/unified-provider/matching/base-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/base-matcher.js +196 -0
- package/dist/unified-provider/matching/base-matcher.js.map +1 -0
- package/dist/unified-provider/matching/django-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/django-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/django-matcher.js +107 -0
- package/dist/unified-provider/matching/django-matcher.js.map +1 -0
- package/dist/unified-provider/matching/drizzle-matcher.d.ts +25 -0
- package/dist/unified-provider/matching/drizzle-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/drizzle-matcher.js +123 -0
- package/dist/unified-provider/matching/drizzle-matcher.js.map +1 -0
- package/dist/unified-provider/matching/efcore-matcher.d.ts +27 -0
- package/dist/unified-provider/matching/efcore-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/efcore-matcher.js +88 -0
- package/dist/unified-provider/matching/efcore-matcher.js.map +1 -0
- package/dist/unified-provider/matching/eloquent-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/eloquent-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/eloquent-matcher.js +162 -0
- package/dist/unified-provider/matching/eloquent-matcher.js.map +1 -0
- package/dist/unified-provider/matching/index.d.ts +19 -0
- package/dist/unified-provider/matching/index.d.ts.map +1 -0
- package/dist/unified-provider/matching/index.js +24 -0
- package/dist/unified-provider/matching/index.js.map +1 -0
- package/dist/unified-provider/matching/knex-matcher.d.ts +26 -0
- package/dist/unified-provider/matching/knex-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/knex-matcher.js +109 -0
- package/dist/unified-provider/matching/knex-matcher.js.map +1 -0
- package/dist/unified-provider/matching/matcher-registry.d.ts +55 -0
- package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -0
- package/dist/unified-provider/matching/matcher-registry.js +130 -0
- package/dist/unified-provider/matching/matcher-registry.js.map +1 -0
- package/dist/unified-provider/matching/mongoose-matcher.d.ts +30 -0
- package/dist/unified-provider/matching/mongoose-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/mongoose-matcher.js +132 -0
- package/dist/unified-provider/matching/mongoose-matcher.js.map +1 -0
- package/dist/unified-provider/matching/prisma-matcher.d.ts +31 -0
- package/dist/unified-provider/matching/prisma-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/prisma-matcher.js +123 -0
- package/dist/unified-provider/matching/prisma-matcher.js.map +1 -0
- package/dist/unified-provider/matching/raw-sql-matcher.d.ts +31 -0
- package/dist/unified-provider/matching/raw-sql-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/raw-sql-matcher.js +173 -0
- package/dist/unified-provider/matching/raw-sql-matcher.js.map +1 -0
- package/dist/unified-provider/matching/sequelize-matcher.d.ts +28 -0
- package/dist/unified-provider/matching/sequelize-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sequelize-matcher.js +132 -0
- package/dist/unified-provider/matching/sequelize-matcher.js.map +1 -0
- package/dist/unified-provider/matching/spring-data-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/spring-data-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/spring-data-matcher.js +112 -0
- package/dist/unified-provider/matching/spring-data-matcher.js.map +1 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.js +201 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.js.map +1 -0
- package/dist/unified-provider/matching/supabase-matcher.d.ts +27 -0
- package/dist/unified-provider/matching/supabase-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/supabase-matcher.js +122 -0
- package/dist/unified-provider/matching/supabase-matcher.js.map +1 -0
- package/dist/unified-provider/matching/typeorm-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/typeorm-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/typeorm-matcher.js +169 -0
- package/dist/unified-provider/matching/typeorm-matcher.js.map +1 -0
- package/dist/unified-provider/migration/deprecated-extractors.d.ts +104 -0
- package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +1 -0
- package/dist/unified-provider/migration/deprecated-extractors.js +129 -0
- package/dist/unified-provider/migration/deprecated-extractors.js.map +1 -0
- package/dist/unified-provider/migration/deprecated-scanner.d.ts +40 -0
- package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +1 -0
- package/dist/unified-provider/migration/deprecated-scanner.js +49 -0
- package/dist/unified-provider/migration/deprecated-scanner.js.map +1 -0
- package/dist/unified-provider/migration/index.d.ts +41 -0
- package/dist/unified-provider/migration/index.d.ts.map +1 -0
- package/dist/unified-provider/migration/index.js +43 -0
- package/dist/unified-provider/migration/index.js.map +1 -0
- package/dist/unified-provider/normalization/base-normalizer.d.ts +188 -0
- package/dist/unified-provider/normalization/base-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/base-normalizer.js +339 -0
- package/dist/unified-provider/normalization/base-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/csharp-normalizer.d.ts +58 -0
- package/dist/unified-provider/normalization/csharp-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/csharp-normalizer.js +467 -0
- package/dist/unified-provider/normalization/csharp-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/index.d.ts +23 -0
- package/dist/unified-provider/normalization/index.d.ts.map +1 -0
- package/dist/unified-provider/normalization/index.js +62 -0
- package/dist/unified-provider/normalization/index.js.map +1 -0
- package/dist/unified-provider/normalization/java-normalizer.d.ts +54 -0
- package/dist/unified-provider/normalization/java-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/java-normalizer.js +453 -0
- package/dist/unified-provider/normalization/java-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/php-normalizer.d.ts +54 -0
- package/dist/unified-provider/normalization/php-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/php-normalizer.js +489 -0
- package/dist/unified-provider/normalization/php-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/python-normalizer.d.ts +61 -0
- package/dist/unified-provider/normalization/python-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/python-normalizer.js +548 -0
- package/dist/unified-provider/normalization/python-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/typescript-normalizer.d.ts +60 -0
- package/dist/unified-provider/normalization/typescript-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/typescript-normalizer.js +608 -0
- package/dist/unified-provider/normalization/typescript-normalizer.js.map +1 -0
- package/dist/unified-provider/parsing/index.d.ts +5 -0
- package/dist/unified-provider/parsing/index.d.ts.map +1 -0
- package/dist/unified-provider/parsing/index.js +5 -0
- package/dist/unified-provider/parsing/index.js.map +1 -0
- package/dist/unified-provider/parsing/parser-registry.d.ts +70 -0
- package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -0
- package/dist/unified-provider/parsing/parser-registry.js +260 -0
- package/dist/unified-provider/parsing/parser-registry.js.map +1 -0
- package/dist/unified-provider/provider/index.d.ts +5 -0
- package/dist/unified-provider/provider/index.d.ts.map +1 -0
- package/dist/unified-provider/provider/index.js +5 -0
- package/dist/unified-provider/provider/index.js.map +1 -0
- package/dist/unified-provider/provider/unified-language-provider.d.ts +56 -0
- package/dist/unified-provider/provider/unified-language-provider.d.ts.map +1 -0
- package/dist/unified-provider/provider/unified-language-provider.js +212 -0
- package/dist/unified-provider/provider/unified-language-provider.js.map +1 -0
- package/dist/unified-provider/types.d.ts +389 -0
- package/dist/unified-provider/types.d.ts.map +1 -0
- package/dist/unified-provider/types.js +9 -0
- package/dist/unified-provider/types.js.map +1 -0
- package/dist/wrappers/clustering/clusterer.d.ts +43 -0
- package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
- package/dist/wrappers/clustering/clusterer.js +374 -0
- package/dist/wrappers/clustering/clusterer.js.map +1 -0
- package/dist/wrappers/clustering/exclusions.d.ts +47 -0
- package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
- package/dist/wrappers/clustering/exclusions.js +318 -0
- package/dist/wrappers/clustering/exclusions.js.map +1 -0
- package/dist/wrappers/clustering/index.d.ts +6 -0
- package/dist/wrappers/clustering/index.d.ts.map +1 -0
- package/dist/wrappers/clustering/index.js +6 -0
- package/dist/wrappers/clustering/index.js.map +1 -0
- package/dist/wrappers/detection/detector.d.ts +69 -0
- package/dist/wrappers/detection/detector.d.ts.map +1 -0
- package/dist/wrappers/detection/detector.js +279 -0
- package/dist/wrappers/detection/detector.js.map +1 -0
- package/dist/wrappers/detection/index.d.ts +5 -0
- package/dist/wrappers/detection/index.d.ts.map +1 -0
- package/dist/wrappers/detection/index.js +5 -0
- package/dist/wrappers/detection/index.js.map +1 -0
- package/dist/wrappers/export/index.d.ts +5 -0
- package/dist/wrappers/export/index.d.ts.map +1 -0
- package/dist/wrappers/export/index.js +5 -0
- package/dist/wrappers/export/index.js.map +1 -0
- package/dist/wrappers/export/json.d.ts +127 -0
- package/dist/wrappers/export/json.d.ts.map +1 -0
- package/dist/wrappers/export/json.js +160 -0
- package/dist/wrappers/export/json.js.map +1 -0
- package/dist/wrappers/index.d.ts +56 -0
- package/dist/wrappers/index.d.ts.map +1 -0
- package/dist/wrappers/index.js +159 -0
- package/dist/wrappers/index.js.map +1 -0
- package/dist/wrappers/integration/adapter.d.ts +52 -0
- package/dist/wrappers/integration/adapter.d.ts.map +1 -0
- package/dist/wrappers/integration/adapter.js +209 -0
- package/dist/wrappers/integration/adapter.js.map +1 -0
- package/dist/wrappers/integration/index.d.ts +9 -0
- package/dist/wrappers/integration/index.d.ts.map +1 -0
- package/dist/wrappers/integration/index.js +12 -0
- package/dist/wrappers/integration/index.js.map +1 -0
- package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
- package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
- package/dist/wrappers/integration/pattern-adapter.js +192 -0
- package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
- package/dist/wrappers/integration/scanner.d.ts +85 -0
- package/dist/wrappers/integration/scanner.d.ts.map +1 -0
- package/dist/wrappers/integration/scanner.js +367 -0
- package/dist/wrappers/integration/scanner.js.map +1 -0
- package/dist/wrappers/primitives/discovery.d.ts +57 -0
- package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
- package/dist/wrappers/primitives/discovery.js +389 -0
- package/dist/wrappers/primitives/discovery.js.map +1 -0
- package/dist/wrappers/primitives/index.d.ts +6 -0
- package/dist/wrappers/primitives/index.d.ts.map +1 -0
- package/dist/wrappers/primitives/index.js +6 -0
- package/dist/wrappers/primitives/index.js.map +1 -0
- package/dist/wrappers/primitives/registry.d.ts +63 -0
- package/dist/wrappers/primitives/registry.d.ts.map +1 -0
- package/dist/wrappers/primitives/registry.js +447 -0
- package/dist/wrappers/primitives/registry.js.map +1 -0
- package/dist/wrappers/types.d.ts +137 -0
- package/dist/wrappers/types.d.ts.map +1 -0
- package/dist/wrappers/types.js +7 -0
- package/dist/wrappers/types.js.map +1 -0
- package/package.json +23 -18
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern System Integration
|
|
3
|
+
*
|
|
4
|
+
* Converts wrapper clusters to Drift patterns for integration with
|
|
5
|
+
* the existing pattern detection and management system.
|
|
6
|
+
*/
|
|
7
|
+
import { createPattern } from '../../patterns/types.js';
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// Category Mapping
|
|
10
|
+
// =============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Map wrapper categories to pattern categories
|
|
13
|
+
*/
|
|
14
|
+
const WRAPPER_TO_PATTERN_CATEGORY = {
|
|
15
|
+
'state-management': 'components',
|
|
16
|
+
'data-fetching': 'api',
|
|
17
|
+
'side-effects': 'components',
|
|
18
|
+
'authentication': 'auth',
|
|
19
|
+
'authorization': 'auth',
|
|
20
|
+
'validation': 'api',
|
|
21
|
+
'dependency-injection': 'config',
|
|
22
|
+
'middleware': 'api',
|
|
23
|
+
'testing': 'testing',
|
|
24
|
+
'logging': 'logging',
|
|
25
|
+
'caching': 'performance',
|
|
26
|
+
'error-handling': 'errors',
|
|
27
|
+
'async-utilities': 'api',
|
|
28
|
+
'form-handling': 'components',
|
|
29
|
+
'routing': 'api',
|
|
30
|
+
'factory': 'structural',
|
|
31
|
+
'decorator': 'structural',
|
|
32
|
+
'utility': 'structural',
|
|
33
|
+
'other': 'structural',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Map wrapper categories to subcategories
|
|
37
|
+
*/
|
|
38
|
+
const WRAPPER_TO_SUBCATEGORY = {
|
|
39
|
+
'state-management': 'state-wrapper',
|
|
40
|
+
'data-fetching': 'data-wrapper',
|
|
41
|
+
'side-effects': 'effect-wrapper',
|
|
42
|
+
'authentication': 'auth-wrapper',
|
|
43
|
+
'authorization': 'authz-wrapper',
|
|
44
|
+
'validation': 'validation-wrapper',
|
|
45
|
+
'dependency-injection': 'di-wrapper',
|
|
46
|
+
'middleware': 'middleware-wrapper',
|
|
47
|
+
'testing': 'test-wrapper',
|
|
48
|
+
'logging': 'logging-wrapper',
|
|
49
|
+
'caching': 'cache-wrapper',
|
|
50
|
+
'error-handling': 'error-wrapper',
|
|
51
|
+
'async-utilities': 'async-wrapper',
|
|
52
|
+
'form-handling': 'form-wrapper',
|
|
53
|
+
'routing': 'routing-wrapper',
|
|
54
|
+
'factory': 'factory-pattern',
|
|
55
|
+
'decorator': 'decorator-pattern',
|
|
56
|
+
'utility': 'utility-wrapper',
|
|
57
|
+
'other': 'wrapper',
|
|
58
|
+
};
|
|
59
|
+
// =============================================================================
|
|
60
|
+
// Conversion Functions
|
|
61
|
+
// =============================================================================
|
|
62
|
+
/**
|
|
63
|
+
* Convert a wrapper cluster to a Drift pattern
|
|
64
|
+
*/
|
|
65
|
+
export function clusterToPattern(cluster, options = {}) {
|
|
66
|
+
const { defaultSeverity = 'info', idPrefix = 'wrapper-', includeDetails = true, } = options;
|
|
67
|
+
const category = WRAPPER_TO_PATTERN_CATEGORY[cluster.category];
|
|
68
|
+
const subcategory = WRAPPER_TO_SUBCATEGORY[cluster.category];
|
|
69
|
+
// Build description
|
|
70
|
+
let description = cluster.description;
|
|
71
|
+
if (includeDetails) {
|
|
72
|
+
const primitiveList = cluster.primitiveSignature.join(', ');
|
|
73
|
+
description += `\n\nWraps: ${primitiveList}`;
|
|
74
|
+
description += `\nWrappers: ${cluster.wrappers.length}`;
|
|
75
|
+
description += `\nAvg depth: ${cluster.avgDepth.toFixed(1)}`;
|
|
76
|
+
}
|
|
77
|
+
// Convert wrapper locations to pattern locations
|
|
78
|
+
const locations = cluster.wrappers.map(wrapperToLocation);
|
|
79
|
+
const input = {
|
|
80
|
+
id: `${idPrefix}${cluster.id}`,
|
|
81
|
+
category,
|
|
82
|
+
subcategory,
|
|
83
|
+
name: cluster.name,
|
|
84
|
+
description,
|
|
85
|
+
detectorId: 'wrapper-detector',
|
|
86
|
+
detectorName: 'Framework Wrapper Detector',
|
|
87
|
+
detectionMethod: 'semantic',
|
|
88
|
+
confidence: cluster.confidence,
|
|
89
|
+
locations,
|
|
90
|
+
severity: defaultSeverity,
|
|
91
|
+
tags: [
|
|
92
|
+
'wrapper',
|
|
93
|
+
`wrapper-${cluster.category}`,
|
|
94
|
+
...cluster.primitiveSignature.map((p) => `wraps-${p}`),
|
|
95
|
+
],
|
|
96
|
+
autoFixable: false,
|
|
97
|
+
detector: {
|
|
98
|
+
type: 'semantic',
|
|
99
|
+
config: {
|
|
100
|
+
primitiveSignature: cluster.primitiveSignature,
|
|
101
|
+
avgDepth: cluster.avgDepth,
|
|
102
|
+
maxDepth: cluster.maxDepth,
|
|
103
|
+
totalUsages: cluster.totalUsages,
|
|
104
|
+
fileSpread: cluster.fileSpread,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
return createPattern(input);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Convert a wrapper function to a pattern location
|
|
112
|
+
*/
|
|
113
|
+
export function wrapperToLocation(wrapper) {
|
|
114
|
+
// Build snippet showing wrapper signature
|
|
115
|
+
const primitives = wrapper.primitiveSignature.join(', ');
|
|
116
|
+
const snippet = `${wrapper.name} wraps [${primitives}] at depth ${wrapper.depth}`;
|
|
117
|
+
return {
|
|
118
|
+
file: wrapper.file,
|
|
119
|
+
line: wrapper.line,
|
|
120
|
+
column: 1,
|
|
121
|
+
snippet,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Convert multiple clusters to patterns
|
|
126
|
+
*/
|
|
127
|
+
export function clustersToPatterns(clusters, options = {}) {
|
|
128
|
+
const { minConfidence = 0.5 } = options;
|
|
129
|
+
return clusters
|
|
130
|
+
.filter((c) => c.confidence >= minConfidence)
|
|
131
|
+
.map((c) => clusterToPattern(c, options));
|
|
132
|
+
}
|
|
133
|
+
// =============================================================================
|
|
134
|
+
// Pattern ID Generation
|
|
135
|
+
// =============================================================================
|
|
136
|
+
/**
|
|
137
|
+
* Generate a unique pattern ID for a wrapper cluster
|
|
138
|
+
*/
|
|
139
|
+
export function generatePatternId(cluster) {
|
|
140
|
+
// Use signature hash for uniqueness
|
|
141
|
+
const signatureHash = cluster.primitiveSignature
|
|
142
|
+
.sort()
|
|
143
|
+
.join('-')
|
|
144
|
+
.toLowerCase()
|
|
145
|
+
.replace(/[^a-z0-9-]/g, '');
|
|
146
|
+
return `wrapper-${cluster.category}-${signatureHash}`.slice(0, 64);
|
|
147
|
+
}
|
|
148
|
+
// =============================================================================
|
|
149
|
+
// Pattern Metadata Extraction
|
|
150
|
+
// =============================================================================
|
|
151
|
+
/**
|
|
152
|
+
* Extract pattern metadata from a wrapper cluster
|
|
153
|
+
*/
|
|
154
|
+
export function extractPatternMetadata(cluster) {
|
|
155
|
+
return {
|
|
156
|
+
wrapperCategory: cluster.category,
|
|
157
|
+
primitiveSignature: cluster.primitiveSignature,
|
|
158
|
+
wrapperCount: cluster.wrappers.length,
|
|
159
|
+
avgDepth: cluster.avgDepth,
|
|
160
|
+
maxDepth: cluster.maxDepth,
|
|
161
|
+
totalUsages: cluster.totalUsages,
|
|
162
|
+
fileSpread: cluster.fileSpread,
|
|
163
|
+
suggestedNames: cluster.suggestedNames,
|
|
164
|
+
wrapperNames: cluster.wrappers.map((w) => w.name),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
// =============================================================================
|
|
168
|
+
// Reverse Conversion (Pattern to Cluster info)
|
|
169
|
+
// =============================================================================
|
|
170
|
+
/**
|
|
171
|
+
* Check if a pattern was created from a wrapper cluster
|
|
172
|
+
*/
|
|
173
|
+
export function isWrapperPattern(pattern) {
|
|
174
|
+
return (pattern.detectorId === 'wrapper-detector' ||
|
|
175
|
+
pattern.id.startsWith('wrapper-') ||
|
|
176
|
+
pattern.tags.includes('wrapper'));
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Extract wrapper info from a pattern (if it's a wrapper pattern)
|
|
180
|
+
*/
|
|
181
|
+
export function extractWrapperInfo(pattern) {
|
|
182
|
+
if (!isWrapperPattern(pattern))
|
|
183
|
+
return null;
|
|
184
|
+
const config = pattern.detector.config;
|
|
185
|
+
return {
|
|
186
|
+
primitiveSignature: config['primitiveSignature'] ?? [],
|
|
187
|
+
wrapperCategory: config['wrapperCategory'] ?? pattern.subcategory,
|
|
188
|
+
avgDepth: config['avgDepth'] ?? 1,
|
|
189
|
+
maxDepth: config['maxDepth'] ?? 1,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=pattern-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-adapter.js","sourceRoot":"","sources":["../../../src/wrappers/integration/pattern-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,2BAA2B,GAA6C;IAC5E,kBAAkB,EAAE,YAAY;IAChC,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,YAAY;IAC5B,gBAAgB,EAAE,MAAM;IACxB,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,KAAK;IACnB,sBAAsB,EAAE,QAAQ;IAChC,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,QAAQ;IAC1B,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,YAAY;IAC7B,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAoC;IAC9D,kBAAkB,EAAE,eAAe;IACnC,eAAe,EAAE,cAAc;IAC/B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE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AC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAClD,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,+CAA+C;AAC/C,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,CACL,OAAO,CAAC,UAAU,KAAK,kBAAkB;QACzC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CACjC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IAMjD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAE5C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAiC,CAAC;IAElE,OAAO;QACL,kBAAkB,EAAG,MAAM,CAAC,oBAAoB,CAAc,IAAI,EAAE;QACpE,eAAe,EAAG,MAAM,CAAC,iBAAiB,CAAY,IAAI,OAAO,CAAC,WAAW;QAC7E,QAAQ,EAAG,MAAM,CAAC,UAAU,CAAY,IAAI,CAAC;QAC7C,QAAQ,EAAG,MAAM,CAAC,UAAU,CAAY,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper Scanner
|
|
3
|
+
*
|
|
4
|
+
* High-level scanner that integrates with the call graph infrastructure
|
|
5
|
+
* to perform wrapper detection across a codebase.
|
|
6
|
+
*/
|
|
7
|
+
import type { WrapperAnalysisResult, WrapperFunction, WrapperCluster } from '../types.js';
|
|
8
|
+
import { type AnalysisOptions } from '../index.js';
|
|
9
|
+
import { type ExtractionStats } from './adapter.js';
|
|
10
|
+
export interface WrapperScannerConfig {
|
|
11
|
+
/** Project root directory */
|
|
12
|
+
rootDir: string;
|
|
13
|
+
/** File patterns to scan (glob) */
|
|
14
|
+
patterns?: string[];
|
|
15
|
+
/** Include test files */
|
|
16
|
+
includeTestFiles?: boolean;
|
|
17
|
+
/** Verbose logging */
|
|
18
|
+
verbose?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface WrapperScanResult {
|
|
21
|
+
/** Full analysis result */
|
|
22
|
+
analysis: WrapperAnalysisResult;
|
|
23
|
+
/** Extraction statistics */
|
|
24
|
+
stats: ExtractionStats;
|
|
25
|
+
/** Scan duration in ms */
|
|
26
|
+
duration: number;
|
|
27
|
+
/** Any errors encountered */
|
|
28
|
+
errors: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Wrapper Scanner
|
|
32
|
+
*
|
|
33
|
+
* Scans a codebase for framework wrapper patterns using the call graph
|
|
34
|
+
* infrastructure for extraction.
|
|
35
|
+
*/
|
|
36
|
+
export declare class WrapperScanner {
|
|
37
|
+
private readonly config;
|
|
38
|
+
private readonly extractors;
|
|
39
|
+
constructor(config: WrapperScannerConfig);
|
|
40
|
+
/**
|
|
41
|
+
* Scan the codebase for wrapper patterns
|
|
42
|
+
*/
|
|
43
|
+
scan(options?: AnalysisOptions): Promise<WrapperScanResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Scan specific files (for incremental analysis)
|
|
46
|
+
*/
|
|
47
|
+
scanFiles(files: string[], options?: AnalysisOptions): Promise<WrapperScanResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Get wrappers for a specific file
|
|
50
|
+
*/
|
|
51
|
+
getFileWrappers(file: string): Promise<WrapperFunction[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Get clusters containing wrappers from a specific file
|
|
54
|
+
*/
|
|
55
|
+
getFileClusters(file: string): Promise<WrapperCluster[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Find files matching patterns
|
|
58
|
+
*/
|
|
59
|
+
private findFiles;
|
|
60
|
+
/**
|
|
61
|
+
* Get extractor for a file
|
|
62
|
+
*/
|
|
63
|
+
private getExtractor;
|
|
64
|
+
/**
|
|
65
|
+
* Group extractions by language
|
|
66
|
+
*/
|
|
67
|
+
private groupByLanguage;
|
|
68
|
+
/**
|
|
69
|
+
* Create empty analysis result
|
|
70
|
+
*/
|
|
71
|
+
private createEmptyResult;
|
|
72
|
+
/**
|
|
73
|
+
* Merge analysis results
|
|
74
|
+
*/
|
|
75
|
+
private mergeResults;
|
|
76
|
+
/**
|
|
77
|
+
* Recalculate summary after merging
|
|
78
|
+
*/
|
|
79
|
+
private recalculateSummary;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create a new WrapperScanner instance
|
|
83
|
+
*/
|
|
84
|
+
export declare function createWrapperScanner(config: WrapperScannerConfig): WrapperScanner;
|
|
85
|
+
//# sourceMappingURL=scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../../src/wrappers/integration/scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,OAAO,KAAK,EACV,qBAAqB,EAErB,eAAe,EACf,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,4BAA4B;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAmCD;;;;;GAKG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;gBAE1C,MAAM,EAAE,oBAAoB;IAkBxC;;OAEG;IACG,IAAI,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgFrE;;OAEG;IACG,SAAS,CACb,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,iBAAiB,CAAC;IA+C7B;;OAEG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAK/D;;OAEG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAW9D;;OAEG;YACW,SAAS;IAoCvB;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAgBvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgDzB;;OAEG;IACH,OAAO,CAAC,YAAY;IAcpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAgD3B;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAEjF"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper Scanner
|
|
3
|
+
*
|
|
4
|
+
* High-level scanner that integrates with the call graph infrastructure
|
|
5
|
+
* to perform wrapper detection across a codebase.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'node:fs/promises';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { minimatch } from 'minimatch';
|
|
10
|
+
import { TypeScriptCallGraphExtractor } from '../../call-graph/extractors/typescript-extractor.js';
|
|
11
|
+
import { PythonCallGraphExtractor } from '../../call-graph/extractors/python-extractor.js';
|
|
12
|
+
import { JavaCallGraphExtractor } from '../../call-graph/extractors/java-extractor.js';
|
|
13
|
+
import { CSharpCallGraphExtractor } from '../../call-graph/extractors/csharp-extractor.js';
|
|
14
|
+
import { PhpCallGraphExtractor } from '../../call-graph/extractors/php-extractor.js';
|
|
15
|
+
import { analyzeWrappers } from '../index.js';
|
|
16
|
+
import { mapLanguage, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats, } from './adapter.js';
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// Default Patterns
|
|
19
|
+
// =============================================================================
|
|
20
|
+
const DEFAULT_PATTERNS = [
|
|
21
|
+
'**/*.ts',
|
|
22
|
+
'**/*.tsx',
|
|
23
|
+
'**/*.js',
|
|
24
|
+
'**/*.jsx',
|
|
25
|
+
'**/*.py',
|
|
26
|
+
'**/*.java',
|
|
27
|
+
'**/*.cs',
|
|
28
|
+
'**/*.php',
|
|
29
|
+
];
|
|
30
|
+
const IGNORE_PATTERNS = [
|
|
31
|
+
'node_modules',
|
|
32
|
+
'.git',
|
|
33
|
+
'dist',
|
|
34
|
+
'build',
|
|
35
|
+
'__pycache__',
|
|
36
|
+
'.next',
|
|
37
|
+
'.nuxt',
|
|
38
|
+
'vendor',
|
|
39
|
+
'target',
|
|
40
|
+
'bin',
|
|
41
|
+
'obj',
|
|
42
|
+
];
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// Wrapper Scanner
|
|
45
|
+
// =============================================================================
|
|
46
|
+
/**
|
|
47
|
+
* Wrapper Scanner
|
|
48
|
+
*
|
|
49
|
+
* Scans a codebase for framework wrapper patterns using the call graph
|
|
50
|
+
* infrastructure for extraction.
|
|
51
|
+
*/
|
|
52
|
+
export class WrapperScanner {
|
|
53
|
+
config;
|
|
54
|
+
extractors;
|
|
55
|
+
constructor(config) {
|
|
56
|
+
this.config = {
|
|
57
|
+
patterns: DEFAULT_PATTERNS,
|
|
58
|
+
includeTestFiles: false,
|
|
59
|
+
verbose: false,
|
|
60
|
+
...config,
|
|
61
|
+
};
|
|
62
|
+
// Initialize extractors
|
|
63
|
+
this.extractors = [
|
|
64
|
+
new TypeScriptCallGraphExtractor(),
|
|
65
|
+
new PythonCallGraphExtractor(),
|
|
66
|
+
new JavaCallGraphExtractor(),
|
|
67
|
+
new CSharpCallGraphExtractor(),
|
|
68
|
+
new PhpCallGraphExtractor(),
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Scan the codebase for wrapper patterns
|
|
73
|
+
*/
|
|
74
|
+
async scan(options = {}) {
|
|
75
|
+
const startTime = Date.now();
|
|
76
|
+
const errors = [];
|
|
77
|
+
// Find files to scan
|
|
78
|
+
const files = await this.findFiles();
|
|
79
|
+
if (this.config.verbose) {
|
|
80
|
+
console.log(`Found ${files.length} files to scan`);
|
|
81
|
+
}
|
|
82
|
+
// Extract from all files
|
|
83
|
+
const extractions = [];
|
|
84
|
+
for (const file of files) {
|
|
85
|
+
const extractor = this.getExtractor(file);
|
|
86
|
+
if (!extractor)
|
|
87
|
+
continue;
|
|
88
|
+
try {
|
|
89
|
+
const filePath = path.join(this.config.rootDir, file);
|
|
90
|
+
const source = await fs.readFile(filePath, 'utf-8');
|
|
91
|
+
const extraction = extractor.extract(source, file);
|
|
92
|
+
extractions.push(extraction);
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
const msg = `Error extracting ${file}: ${error instanceof Error ? error.message : error}`;
|
|
96
|
+
errors.push(msg);
|
|
97
|
+
if (this.config.verbose) {
|
|
98
|
+
console.error(msg);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Filter extractions
|
|
103
|
+
const adapterOptions = {
|
|
104
|
+
includeTestFiles: this.config.includeTestFiles,
|
|
105
|
+
};
|
|
106
|
+
const filtered = filterExtractions(extractions, adapterOptions);
|
|
107
|
+
// Calculate stats
|
|
108
|
+
const stats = calculateExtractionStats(filtered);
|
|
109
|
+
if (this.config.verbose) {
|
|
110
|
+
console.log(`Extracted ${stats.totalFunctions} functions from ${stats.totalFiles} files`);
|
|
111
|
+
}
|
|
112
|
+
// Group by language and analyze
|
|
113
|
+
const byLanguage = this.groupByLanguage(filtered);
|
|
114
|
+
const combinedResult = this.createEmptyResult();
|
|
115
|
+
for (const [language, langExtractions] of byLanguage) {
|
|
116
|
+
if (this.config.verbose) {
|
|
117
|
+
console.log(`Analyzing ${langExtractions.length} ${language} files...`);
|
|
118
|
+
}
|
|
119
|
+
// Build contexts
|
|
120
|
+
const discoveryContext = buildDiscoveryContext(langExtractions, language);
|
|
121
|
+
const detectionContext = buildDetectionContext(langExtractions, [], language);
|
|
122
|
+
// Run analysis
|
|
123
|
+
const result = analyzeWrappers(discoveryContext, { functions: detectionContext.functions, language }, options);
|
|
124
|
+
// Merge results
|
|
125
|
+
this.mergeResults(combinedResult, result);
|
|
126
|
+
}
|
|
127
|
+
// Recalculate summary
|
|
128
|
+
this.recalculateSummary(combinedResult);
|
|
129
|
+
return {
|
|
130
|
+
analysis: combinedResult,
|
|
131
|
+
stats,
|
|
132
|
+
duration: Date.now() - startTime,
|
|
133
|
+
errors,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Scan specific files (for incremental analysis)
|
|
138
|
+
*/
|
|
139
|
+
async scanFiles(files, options = {}) {
|
|
140
|
+
const startTime = Date.now();
|
|
141
|
+
const errors = [];
|
|
142
|
+
const extractions = [];
|
|
143
|
+
for (const file of files) {
|
|
144
|
+
const extractor = this.getExtractor(file);
|
|
145
|
+
if (!extractor)
|
|
146
|
+
continue;
|
|
147
|
+
try {
|
|
148
|
+
const filePath = path.join(this.config.rootDir, file);
|
|
149
|
+
const source = await fs.readFile(filePath, 'utf-8');
|
|
150
|
+
const extraction = extractor.extract(source, file);
|
|
151
|
+
extractions.push(extraction);
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
errors.push(`Error extracting ${file}: ${error instanceof Error ? error.message : error}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const stats = calculateExtractionStats(extractions);
|
|
158
|
+
const byLanguage = this.groupByLanguage(extractions);
|
|
159
|
+
const combinedResult = this.createEmptyResult();
|
|
160
|
+
for (const [language, langExtractions] of byLanguage) {
|
|
161
|
+
const discoveryContext = buildDiscoveryContext(langExtractions, language);
|
|
162
|
+
const detectionContext = buildDetectionContext(langExtractions, [], language);
|
|
163
|
+
const result = analyzeWrappers(discoveryContext, { functions: detectionContext.functions, language }, options);
|
|
164
|
+
this.mergeResults(combinedResult, result);
|
|
165
|
+
}
|
|
166
|
+
this.recalculateSummary(combinedResult);
|
|
167
|
+
return {
|
|
168
|
+
analysis: combinedResult,
|
|
169
|
+
stats,
|
|
170
|
+
duration: Date.now() - startTime,
|
|
171
|
+
errors,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Get wrappers for a specific file
|
|
176
|
+
*/
|
|
177
|
+
async getFileWrappers(file) {
|
|
178
|
+
const result = await this.scanFiles([file]);
|
|
179
|
+
return result.analysis.wrappers.filter((w) => w.file === file);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get clusters containing wrappers from a specific file
|
|
183
|
+
*/
|
|
184
|
+
async getFileClusters(file) {
|
|
185
|
+
const result = await this.scanFiles([file]);
|
|
186
|
+
return result.analysis.clusters.filter((c) => c.wrappers.some((w) => w.file === file));
|
|
187
|
+
}
|
|
188
|
+
// ===========================================================================
|
|
189
|
+
// Private Methods
|
|
190
|
+
// ===========================================================================
|
|
191
|
+
/**
|
|
192
|
+
* Find files matching patterns
|
|
193
|
+
*/
|
|
194
|
+
async findFiles() {
|
|
195
|
+
const files = [];
|
|
196
|
+
const patterns = this.config.patterns || DEFAULT_PATTERNS;
|
|
197
|
+
const walk = async (dir, relativePath = '') => {
|
|
198
|
+
let entries;
|
|
199
|
+
try {
|
|
200
|
+
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
return; // Skip inaccessible directories
|
|
204
|
+
}
|
|
205
|
+
for (const entry of entries) {
|
|
206
|
+
const entryName = entry.name;
|
|
207
|
+
const fullPath = path.join(dir, entryName);
|
|
208
|
+
const relPath = relativePath ? `${relativePath}/${entryName}` : entryName;
|
|
209
|
+
if (entry.isDirectory()) {
|
|
210
|
+
if (!IGNORE_PATTERNS.includes(entryName) && !entryName.startsWith('.')) {
|
|
211
|
+
await walk(fullPath, relPath);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
else if (entry.isFile()) {
|
|
215
|
+
for (const pattern of patterns) {
|
|
216
|
+
if (minimatch(relPath, pattern)) {
|
|
217
|
+
files.push(relPath);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
await walk(this.config.rootDir);
|
|
225
|
+
return files;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Get extractor for a file
|
|
229
|
+
*/
|
|
230
|
+
getExtractor(file) {
|
|
231
|
+
for (const extractor of this.extractors) {
|
|
232
|
+
if (extractor.canHandle(file)) {
|
|
233
|
+
return extractor;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Group extractions by language
|
|
240
|
+
*/
|
|
241
|
+
groupByLanguage(extractions) {
|
|
242
|
+
const byLanguage = new Map();
|
|
243
|
+
for (const extraction of extractions) {
|
|
244
|
+
const lang = mapLanguage(extraction.language);
|
|
245
|
+
if (!lang)
|
|
246
|
+
continue;
|
|
247
|
+
const existing = byLanguage.get(lang) || [];
|
|
248
|
+
byLanguage.set(lang, [...existing, extraction]);
|
|
249
|
+
}
|
|
250
|
+
return byLanguage;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Create empty analysis result
|
|
254
|
+
*/
|
|
255
|
+
createEmptyResult() {
|
|
256
|
+
return {
|
|
257
|
+
frameworks: [],
|
|
258
|
+
primitives: [],
|
|
259
|
+
wrappers: [],
|
|
260
|
+
clusters: [],
|
|
261
|
+
factories: [],
|
|
262
|
+
decoratorWrappers: [],
|
|
263
|
+
asyncWrappers: [],
|
|
264
|
+
summary: {
|
|
265
|
+
totalWrappers: 0,
|
|
266
|
+
totalClusters: 0,
|
|
267
|
+
avgDepth: 0,
|
|
268
|
+
maxDepth: 0,
|
|
269
|
+
mostWrappedPrimitive: 'N/A',
|
|
270
|
+
mostUsedWrapper: 'N/A',
|
|
271
|
+
wrappersByLanguage: {
|
|
272
|
+
typescript: 0,
|
|
273
|
+
python: 0,
|
|
274
|
+
java: 0,
|
|
275
|
+
csharp: 0,
|
|
276
|
+
php: 0,
|
|
277
|
+
},
|
|
278
|
+
wrappersByCategory: {
|
|
279
|
+
'state-management': 0,
|
|
280
|
+
'data-fetching': 0,
|
|
281
|
+
'side-effects': 0,
|
|
282
|
+
'authentication': 0,
|
|
283
|
+
'authorization': 0,
|
|
284
|
+
'validation': 0,
|
|
285
|
+
'dependency-injection': 0,
|
|
286
|
+
'middleware': 0,
|
|
287
|
+
'testing': 0,
|
|
288
|
+
'logging': 0,
|
|
289
|
+
'caching': 0,
|
|
290
|
+
'error-handling': 0,
|
|
291
|
+
'async-utilities': 0,
|
|
292
|
+
'form-handling': 0,
|
|
293
|
+
'routing': 0,
|
|
294
|
+
'factory': 0,
|
|
295
|
+
'decorator': 0,
|
|
296
|
+
'utility': 0,
|
|
297
|
+
'other': 0,
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Merge analysis results
|
|
304
|
+
*/
|
|
305
|
+
mergeResults(target, source) {
|
|
306
|
+
// Merge arrays (dedupe by name/id where applicable)
|
|
307
|
+
target.frameworks.push(...source.frameworks);
|
|
308
|
+
target.primitives.push(...source.primitives);
|
|
309
|
+
target.wrappers.push(...source.wrappers);
|
|
310
|
+
target.clusters.push(...source.clusters);
|
|
311
|
+
target.factories.push(...source.factories);
|
|
312
|
+
target.decoratorWrappers.push(...source.decoratorWrappers);
|
|
313
|
+
target.asyncWrappers.push(...source.asyncWrappers);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Recalculate summary after merging
|
|
317
|
+
*/
|
|
318
|
+
recalculateSummary(result) {
|
|
319
|
+
const { wrappers, clusters } = result;
|
|
320
|
+
// Calculate depths
|
|
321
|
+
const depths = wrappers.map((w) => w.depth);
|
|
322
|
+
const avgDepth = depths.length > 0
|
|
323
|
+
? depths.reduce((a, b) => a + b, 0) / depths.length
|
|
324
|
+
: 0;
|
|
325
|
+
const maxDepth = depths.length > 0 ? Math.max(...depths) : 0;
|
|
326
|
+
// Count by language
|
|
327
|
+
const byLanguage = result.summary.wrappersByLanguage;
|
|
328
|
+
for (const wrapper of wrappers) {
|
|
329
|
+
byLanguage[wrapper.language]++;
|
|
330
|
+
}
|
|
331
|
+
// Count by category
|
|
332
|
+
const byCategory = result.summary.wrappersByCategory;
|
|
333
|
+
for (const cluster of clusters) {
|
|
334
|
+
byCategory[cluster.category] += cluster.wrappers.length;
|
|
335
|
+
}
|
|
336
|
+
// Find most wrapped primitive
|
|
337
|
+
const primitiveCounts = new Map();
|
|
338
|
+
for (const wrapper of wrappers) {
|
|
339
|
+
for (const prim of wrapper.primitiveSignature) {
|
|
340
|
+
primitiveCounts.set(prim, (primitiveCounts.get(prim) || 0) + 1);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
const mostWrapped = [...primitiveCounts.entries()].sort((a, b) => b[1] - a[1])[0];
|
|
344
|
+
// Find most used wrapper
|
|
345
|
+
const mostUsed = wrappers.reduce((max, w) => (w.calledBy.length > (max?.calledBy.length || 0) ? w : max), wrappers[0]);
|
|
346
|
+
result.summary = {
|
|
347
|
+
totalWrappers: wrappers.length,
|
|
348
|
+
totalClusters: clusters.length,
|
|
349
|
+
avgDepth,
|
|
350
|
+
maxDepth,
|
|
351
|
+
mostWrappedPrimitive: mostWrapped?.[0] || 'N/A',
|
|
352
|
+
mostUsedWrapper: mostUsed?.name || 'N/A',
|
|
353
|
+
wrappersByLanguage: byLanguage,
|
|
354
|
+
wrappersByCategory: byCategory,
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
// =============================================================================
|
|
359
|
+
// Factory Function
|
|
360
|
+
// =============================================================================
|
|
361
|
+
/**
|
|
362
|
+
* Create a new WrapperScanner instance
|
|
363
|
+
*/
|
|
364
|
+
export function createWrapperScanner(config) {
|
|
365
|
+
return new WrapperScanner(config);
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../src/wrappers/integration/scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAUrF,OAAO,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,GAGzB,MAAM,cAAc,CAAC;AA4BtB,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF,MAAM,gBAAgB,GAAG;IACvB,SAAS;IACT,UAAU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