@opencodehub/ingestion 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/LICENSE +202 -0
- package/README.md +69 -0
- package/dist/extract/index.d.ts +8 -0
- package/dist/extract/index.d.ts.map +1 -0
- package/dist/extract/index.js +6 -0
- package/dist/extract/index.js.map +1 -0
- package/dist/extract/orm-detector.d.ts +19 -0
- package/dist/extract/orm-detector.d.ts.map +1 -0
- package/dist/extract/orm-detector.js +209 -0
- package/dist/extract/orm-detector.js.map +1 -0
- package/dist/extract/property-access.d.ts +76 -0
- package/dist/extract/property-access.d.ts.map +1 -0
- package/dist/extract/property-access.js +260 -0
- package/dist/extract/property-access.js.map +1 -0
- package/dist/extract/receiver-resolver.d.ts +86 -0
- package/dist/extract/receiver-resolver.d.ts.map +1 -0
- package/dist/extract/receiver-resolver.js +77 -0
- package/dist/extract/receiver-resolver.js.map +1 -0
- package/dist/extract/route-detector-java.d.ts +29 -0
- package/dist/extract/route-detector-java.d.ts.map +1 -0
- package/dist/extract/route-detector-java.js +190 -0
- package/dist/extract/route-detector-java.js.map +1 -0
- package/dist/extract/route-detector-nestjs.d.ts +30 -0
- package/dist/extract/route-detector-nestjs.d.ts.map +1 -0
- package/dist/extract/route-detector-nestjs.js +134 -0
- package/dist/extract/route-detector-nestjs.js.map +1 -0
- package/dist/extract/route-detector-python.d.ts +28 -0
- package/dist/extract/route-detector-python.d.ts.map +1 -0
- package/dist/extract/route-detector-python.js +100 -0
- package/dist/extract/route-detector-python.js.map +1 -0
- package/dist/extract/route-detector-rails.d.ts +28 -0
- package/dist/extract/route-detector-rails.d.ts.map +1 -0
- package/dist/extract/route-detector-rails.js +162 -0
- package/dist/extract/route-detector-rails.js.map +1 -0
- package/dist/extract/route-detector.d.ts +45 -0
- package/dist/extract/route-detector.d.ts.map +1 -0
- package/dist/extract/route-detector.js +467 -0
- package/dist/extract/route-detector.js.map +1 -0
- package/dist/extract/tool-detector.d.ts +26 -0
- package/dist/extract/tool-detector.d.ts.map +1 -0
- package/dist/extract/tool-detector.js +364 -0
- package/dist/extract/tool-detector.js.map +1 -0
- package/dist/extract/types.d.ts +89 -0
- package/dist/extract/types.d.ts.map +1 -0
- package/dist/extract/types.js +11 -0
- package/dist/extract/types.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/parse/cobol-regex.d.ts +85 -0
- package/dist/parse/cobol-regex.d.ts.map +1 -0
- package/dist/parse/cobol-regex.js +355 -0
- package/dist/parse/cobol-regex.js.map +1 -0
- package/dist/parse/grammar-registry.d.ts +115 -0
- package/dist/parse/grammar-registry.d.ts.map +1 -0
- package/dist/parse/grammar-registry.js +278 -0
- package/dist/parse/grammar-registry.js.map +1 -0
- package/dist/parse/index.d.ts +14 -0
- package/dist/parse/index.d.ts.map +1 -0
- package/dist/parse/index.js +10 -0
- package/dist/parse/index.js.map +1 -0
- package/dist/parse/language-detector.d.ts +17 -0
- package/dist/parse/language-detector.d.ts.map +1 -0
- package/dist/parse/language-detector.js +104 -0
- package/dist/parse/language-detector.js.map +1 -0
- package/dist/parse/parse-worker.d.ts +24 -0
- package/dist/parse/parse-worker.d.ts.map +1 -0
- package/dist/parse/parse-worker.js +230 -0
- package/dist/parse/parse-worker.js.map +1 -0
- package/dist/parse/types.d.ts +49 -0
- package/dist/parse/types.d.ts.map +1 -0
- package/dist/parse/types.js +11 -0
- package/dist/parse/types.js.map +1 -0
- package/dist/parse/unified-queries.d.ts +37 -0
- package/dist/parse/unified-queries.d.ts.map +1 -0
- package/dist/parse/unified-queries.js +623 -0
- package/dist/parse/unified-queries.js.map +1 -0
- package/dist/parse/wasm-fallback.d.ts +88 -0
- package/dist/parse/wasm-fallback.d.ts.map +1 -0
- package/dist/parse/wasm-fallback.js +258 -0
- package/dist/parse/wasm-fallback.js.map +1 -0
- package/dist/parse/worker-pool.d.ts +48 -0
- package/dist/parse/worker-pool.d.ts.map +1 -0
- package/dist/parse/worker-pool.js +97 -0
- package/dist/parse/worker-pool.js.map +1 -0
- package/dist/pipeline/dep-parsers/go.d.ts +25 -0
- package/dist/pipeline/dep-parsers/go.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/go.js +146 -0
- package/dist/pipeline/dep-parsers/go.js.map +1 -0
- package/dist/pipeline/dep-parsers/index.d.ts +17 -0
- package/dist/pipeline/dep-parsers/index.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/index.js +16 -0
- package/dist/pipeline/dep-parsers/index.js.map +1 -0
- package/dist/pipeline/dep-parsers/maven.d.ts +24 -0
- package/dist/pipeline/dep-parsers/maven.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/maven.js +131 -0
- package/dist/pipeline/dep-parsers/maven.js.map +1 -0
- package/dist/pipeline/dep-parsers/npm.d.ts +30 -0
- package/dist/pipeline/dep-parsers/npm.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/npm.js +309 -0
- package/dist/pipeline/dep-parsers/npm.js.map +1 -0
- package/dist/pipeline/dep-parsers/nuget.d.ts +24 -0
- package/dist/pipeline/dep-parsers/nuget.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/nuget.js +178 -0
- package/dist/pipeline/dep-parsers/nuget.js.map +1 -0
- package/dist/pipeline/dep-parsers/python.d.ts +21 -0
- package/dist/pipeline/dep-parsers/python.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/python.js +369 -0
- package/dist/pipeline/dep-parsers/python.js.map +1 -0
- package/dist/pipeline/dep-parsers/rust.d.ts +18 -0
- package/dist/pipeline/dep-parsers/rust.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/rust.js +134 -0
- package/dist/pipeline/dep-parsers/rust.js.map +1 -0
- package/dist/pipeline/dep-parsers/spdx-normalize.d.ts +15 -0
- package/dist/pipeline/dep-parsers/spdx-normalize.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/spdx-normalize.js +31 -0
- package/dist/pipeline/dep-parsers/spdx-normalize.js.map +1 -0
- package/dist/pipeline/dep-parsers/types.d.ts +63 -0
- package/dist/pipeline/dep-parsers/types.d.ts.map +1 -0
- package/dist/pipeline/dep-parsers/types.js +56 -0
- package/dist/pipeline/dep-parsers/types.js.map +1 -0
- package/dist/pipeline/gitignore-stack.d.ts +44 -0
- package/dist/pipeline/gitignore-stack.d.ts.map +1 -0
- package/dist/pipeline/gitignore-stack.js +69 -0
- package/dist/pipeline/gitignore-stack.js.map +1 -0
- package/dist/pipeline/gitignore.d.ts +67 -0
- package/dist/pipeline/gitignore.d.ts.map +1 -0
- package/dist/pipeline/gitignore.js +210 -0
- package/dist/pipeline/gitignore.js.map +1 -0
- package/dist/pipeline/index.d.ts +53 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +29 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +105 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +175 -0
- package/dist/pipeline/orchestrator.js.map +1 -0
- package/dist/pipeline/ownership-helpers/drift.d.ts +41 -0
- package/dist/pipeline/ownership-helpers/drift.d.ts.map +1 -0
- package/dist/pipeline/ownership-helpers/drift.js +122 -0
- package/dist/pipeline/ownership-helpers/drift.js.map +1 -0
- package/dist/pipeline/ownership-helpers/gini-community.d.ts +24 -0
- package/dist/pipeline/ownership-helpers/gini-community.d.ts.map +1 -0
- package/dist/pipeline/ownership-helpers/gini-community.js +32 -0
- package/dist/pipeline/ownership-helpers/gini-community.js.map +1 -0
- package/dist/pipeline/ownership-helpers/git-blame-batcher.d.ts +71 -0
- package/dist/pipeline/ownership-helpers/git-blame-batcher.d.ts.map +1 -0
- package/dist/pipeline/ownership-helpers/git-blame-batcher.js +178 -0
- package/dist/pipeline/ownership-helpers/git-blame-batcher.js.map +1 -0
- package/dist/pipeline/ownership-helpers/line-overlap.d.ts +35 -0
- package/dist/pipeline/ownership-helpers/line-overlap.d.ts.map +1 -0
- package/dist/pipeline/ownership-helpers/line-overlap.js +62 -0
- package/dist/pipeline/ownership-helpers/line-overlap.js.map +1 -0
- package/dist/pipeline/ownership-helpers/orphan.d.ts +73 -0
- package/dist/pipeline/ownership-helpers/orphan.d.ts.map +1 -0
- package/dist/pipeline/ownership-helpers/orphan.js +117 -0
- package/dist/pipeline/ownership-helpers/orphan.js.map +1 -0
- package/dist/pipeline/phases/accesses.d.ts +44 -0
- package/dist/pipeline/phases/accesses.d.ts.map +1 -0
- package/dist/pipeline/phases/accesses.js +194 -0
- package/dist/pipeline/phases/accesses.js.map +1 -0
- package/dist/pipeline/phases/annotate.d.ts +28 -0
- package/dist/pipeline/phases/annotate.d.ts.map +1 -0
- package/dist/pipeline/phases/annotate.js +60 -0
- package/dist/pipeline/phases/annotate.js.map +1 -0
- package/dist/pipeline/phases/cochange.d.ts +42 -0
- package/dist/pipeline/phases/cochange.d.ts.map +1 -0
- package/dist/pipeline/phases/cochange.js +0 -0
- package/dist/pipeline/phases/cochange.js.map +1 -0
- package/dist/pipeline/phases/communities.d.ts +34 -0
- package/dist/pipeline/phases/communities.d.ts.map +1 -0
- package/dist/pipeline/phases/communities.js +412 -0
- package/dist/pipeline/phases/communities.js.map +1 -0
- package/dist/pipeline/phases/complexity.d.ts +50 -0
- package/dist/pipeline/phases/complexity.d.ts.map +1 -0
- package/dist/pipeline/phases/complexity.js +794 -0
- package/dist/pipeline/phases/complexity.js.map +1 -0
- package/dist/pipeline/phases/confidence-demote.d.ts +23 -0
- package/dist/pipeline/phases/confidence-demote.d.ts.map +1 -0
- package/dist/pipeline/phases/confidence-demote.js +113 -0
- package/dist/pipeline/phases/confidence-demote.js.map +1 -0
- package/dist/pipeline/phases/content-cache.d.ts +166 -0
- package/dist/pipeline/phases/content-cache.d.ts.map +1 -0
- package/dist/pipeline/phases/content-cache.js +323 -0
- package/dist/pipeline/phases/content-cache.js.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/cobertura.d.ts +25 -0
- package/dist/pipeline/phases/coverage-parsers/cobertura.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/cobertura.js +139 -0
- package/dist/pipeline/phases/coverage-parsers/cobertura.js.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/coverage-py.d.ts +25 -0
- package/dist/pipeline/phases/coverage-parsers/coverage-py.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/coverage-py.js +51 -0
- package/dist/pipeline/phases/coverage-parsers/coverage-py.js.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/jacoco.d.ts +32 -0
- package/dist/pipeline/phases/coverage-parsers/jacoco.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/jacoco.js +98 -0
- package/dist/pipeline/phases/coverage-parsers/jacoco.js.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/lcov.d.ts +21 -0
- package/dist/pipeline/phases/coverage-parsers/lcov.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/lcov.js +104 -0
- package/dist/pipeline/phases/coverage-parsers/lcov.js.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/types.d.ts +27 -0
- package/dist/pipeline/phases/coverage-parsers/types.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage-parsers/types.js +39 -0
- package/dist/pipeline/phases/coverage-parsers/types.js.map +1 -0
- package/dist/pipeline/phases/coverage.d.ts +39 -0
- package/dist/pipeline/phases/coverage.d.ts.map +1 -0
- package/dist/pipeline/phases/coverage.js +154 -0
- package/dist/pipeline/phases/coverage.js.map +1 -0
- package/dist/pipeline/phases/cross-file.d.ts +40 -0
- package/dist/pipeline/phases/cross-file.d.ts.map +1 -0
- package/dist/pipeline/phases/cross-file.js +411 -0
- package/dist/pipeline/phases/cross-file.js.map +1 -0
- package/dist/pipeline/phases/dead-code.d.ts +28 -0
- package/dist/pipeline/phases/dead-code.d.ts.map +1 -0
- package/dist/pipeline/phases/dead-code.js +157 -0
- package/dist/pipeline/phases/dead-code.js.map +1 -0
- package/dist/pipeline/phases/default-set.d.ts +24 -0
- package/dist/pipeline/phases/default-set.d.ts.map +1 -0
- package/dist/pipeline/phases/default-set.js +133 -0
- package/dist/pipeline/phases/default-set.js.map +1 -0
- package/dist/pipeline/phases/dependencies.d.ts +59 -0
- package/dist/pipeline/phases/dependencies.d.ts.map +1 -0
- package/dist/pipeline/phases/dependencies.js +281 -0
- package/dist/pipeline/phases/dependencies.js.map +1 -0
- package/dist/pipeline/phases/embedder-pool.d.ts +31 -0
- package/dist/pipeline/phases/embedder-pool.d.ts.map +1 -0
- package/dist/pipeline/phases/embedder-pool.js +79 -0
- package/dist/pipeline/phases/embedder-pool.js.map +1 -0
- package/dist/pipeline/phases/embedder-worker.d.ts +28 -0
- package/dist/pipeline/phases/embedder-worker.d.ts.map +1 -0
- package/dist/pipeline/phases/embedder-worker.js +43 -0
- package/dist/pipeline/phases/embedder-worker.js.map +1 -0
- package/dist/pipeline/phases/embeddings.d.ts +117 -0
- package/dist/pipeline/phases/embeddings.d.ts.map +1 -0
- package/dist/pipeline/phases/embeddings.js +697 -0
- package/dist/pipeline/phases/embeddings.js.map +1 -0
- package/dist/pipeline/phases/fetches.d.ts +47 -0
- package/dist/pipeline/phases/fetches.d.ts.map +1 -0
- package/dist/pipeline/phases/fetches.js +207 -0
- package/dist/pipeline/phases/fetches.js.map +1 -0
- package/dist/pipeline/phases/incremental-helper.d.ts +96 -0
- package/dist/pipeline/phases/incremental-helper.d.ts.map +1 -0
- package/dist/pipeline/phases/incremental-helper.js +125 -0
- package/dist/pipeline/phases/incremental-helper.js.map +1 -0
- package/dist/pipeline/phases/incremental-scope.d.ts +67 -0
- package/dist/pipeline/phases/incremental-scope.d.ts.map +1 -0
- package/dist/pipeline/phases/incremental-scope.js +225 -0
- package/dist/pipeline/phases/incremental-scope.js.map +1 -0
- package/dist/pipeline/phases/markdown.d.ts +29 -0
- package/dist/pipeline/phases/markdown.d.ts.map +1 -0
- package/dist/pipeline/phases/markdown.js +298 -0
- package/dist/pipeline/phases/markdown.js.map +1 -0
- package/dist/pipeline/phases/mro.d.ts +24 -0
- package/dist/pipeline/phases/mro.d.ts.map +1 -0
- package/dist/pipeline/phases/mro.js +303 -0
- package/dist/pipeline/phases/mro.js.map +1 -0
- package/dist/pipeline/phases/openapi.d.ts +52 -0
- package/dist/pipeline/phases/openapi.d.ts.map +1 -0
- package/dist/pipeline/phases/openapi.js +285 -0
- package/dist/pipeline/phases/openapi.js.map +1 -0
- package/dist/pipeline/phases/orm.d.ts +26 -0
- package/dist/pipeline/phases/orm.d.ts.map +1 -0
- package/dist/pipeline/phases/orm.js +183 -0
- package/dist/pipeline/phases/orm.js.map +1 -0
- package/dist/pipeline/phases/ownership.d.ts +88 -0
- package/dist/pipeline/phases/ownership.d.ts.map +1 -0
- package/dist/pipeline/phases/ownership.js +479 -0
- package/dist/pipeline/phases/ownership.js.map +1 -0
- package/dist/pipeline/phases/parse.d.ts +63 -0
- package/dist/pipeline/phases/parse.d.ts.map +1 -0
- package/dist/pipeline/phases/parse.js +994 -0
- package/dist/pipeline/phases/parse.js.map +1 -0
- package/dist/pipeline/phases/processes.d.ts +47 -0
- package/dist/pipeline/phases/processes.d.ts.map +1 -0
- package/dist/pipeline/phases/processes.js +620 -0
- package/dist/pipeline/phases/processes.js.map +1 -0
- package/dist/pipeline/phases/profile.d.ts +33 -0
- package/dist/pipeline/phases/profile.d.ts.map +1 -0
- package/dist/pipeline/phases/profile.js +91 -0
- package/dist/pipeline/phases/profile.js.map +1 -0
- package/dist/pipeline/phases/repo-node.d.ts +112 -0
- package/dist/pipeline/phases/repo-node.d.ts.map +1 -0
- package/dist/pipeline/phases/repo-node.js +272 -0
- package/dist/pipeline/phases/repo-node.js.map +1 -0
- package/dist/pipeline/phases/risk-snapshot.d.ts +34 -0
- package/dist/pipeline/phases/risk-snapshot.d.ts.map +1 -0
- package/dist/pipeline/phases/risk-snapshot.js +63 -0
- package/dist/pipeline/phases/risk-snapshot.js.map +1 -0
- package/dist/pipeline/phases/routes.d.ts +31 -0
- package/dist/pipeline/phases/routes.d.ts.map +1 -0
- package/dist/pipeline/phases/routes.js +262 -0
- package/dist/pipeline/phases/routes.js.map +1 -0
- package/dist/pipeline/phases/sbom.d.ts +45 -0
- package/dist/pipeline/phases/sbom.d.ts.map +1 -0
- package/dist/pipeline/phases/sbom.js +289 -0
- package/dist/pipeline/phases/sbom.js.map +1 -0
- package/dist/pipeline/phases/scan.d.ts +54 -0
- package/dist/pipeline/phases/scan.d.ts.map +1 -0
- package/dist/pipeline/phases/scan.js +340 -0
- package/dist/pipeline/phases/scan.js.map +1 -0
- package/dist/pipeline/phases/scip-index.d.ts +54 -0
- package/dist/pipeline/phases/scip-index.d.ts.map +1 -0
- package/dist/pipeline/phases/scip-index.js +469 -0
- package/dist/pipeline/phases/scip-index.js.map +1 -0
- package/dist/pipeline/phases/structure.d.ts +21 -0
- package/dist/pipeline/phases/structure.d.ts.map +1 -0
- package/dist/pipeline/phases/structure.js +115 -0
- package/dist/pipeline/phases/structure.js.map +1 -0
- package/dist/pipeline/phases/summarize.d.ts +126 -0
- package/dist/pipeline/phases/summarize.d.ts.map +1 -0
- package/dist/pipeline/phases/summarize.js +401 -0
- package/dist/pipeline/phases/summarize.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/branch-divergence.d.ts +42 -0
- package/dist/pipeline/phases/temporal-helpers/branch-divergence.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/branch-divergence.js +96 -0
- package/dist/pipeline/phases/temporal-helpers/branch-divergence.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/churn-decay.d.ts +22 -0
- package/dist/pipeline/phases/temporal-helpers/churn-decay.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/churn-decay.js +32 -0
- package/dist/pipeline/phases/temporal-helpers/churn-decay.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/conventional-commits.d.ts +21 -0
- package/dist/pipeline/phases/temporal-helpers/conventional-commits.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/conventional-commits.js +37 -0
- package/dist/pipeline/phases/temporal-helpers/conventional-commits.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/gini.d.ts +32 -0
- package/dist/pipeline/phases/temporal-helpers/gini.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/gini.js +78 -0
- package/dist/pipeline/phases/temporal-helpers/gini.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/revert-detect.d.ts +14 -0
- package/dist/pipeline/phases/temporal-helpers/revert-detect.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/revert-detect.js +25 -0
- package/dist/pipeline/phases/temporal-helpers/revert-detect.js.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/test-pair.d.ts +18 -0
- package/dist/pipeline/phases/temporal-helpers/test-pair.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal-helpers/test-pair.js +119 -0
- package/dist/pipeline/phases/temporal-helpers/test-pair.js.map +1 -0
- package/dist/pipeline/phases/temporal.d.ts +65 -0
- package/dist/pipeline/phases/temporal.d.ts.map +1 -0
- package/dist/pipeline/phases/temporal.js +621 -0
- package/dist/pipeline/phases/temporal.js.map +1 -0
- package/dist/pipeline/phases/tools.d.ts +21 -0
- package/dist/pipeline/phases/tools.d.ts.map +1 -0
- package/dist/pipeline/phases/tools.js +118 -0
- package/dist/pipeline/phases/tools.js.map +1 -0
- package/dist/pipeline/profile-detectors/api-contracts.d.ts +18 -0
- package/dist/pipeline/profile-detectors/api-contracts.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/api-contracts.js +78 -0
- package/dist/pipeline/profile-detectors/api-contracts.js.map +1 -0
- package/dist/pipeline/profile-detectors/framework-detector.d.ts +11 -0
- package/dist/pipeline/profile-detectors/framework-detector.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/framework-detector.js +11 -0
- package/dist/pipeline/profile-detectors/framework-detector.js.map +1 -0
- package/dist/pipeline/profile-detectors/frameworks-catalog.d.ts +7 -0
- package/dist/pipeline/profile-detectors/frameworks-catalog.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/frameworks-catalog.js +7 -0
- package/dist/pipeline/profile-detectors/frameworks-catalog.js.map +1 -0
- package/dist/pipeline/profile-detectors/frameworks.d.ts +7 -0
- package/dist/pipeline/profile-detectors/frameworks.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/frameworks.js +7 -0
- package/dist/pipeline/profile-detectors/frameworks.js.map +1 -0
- package/dist/pipeline/profile-detectors/iac.d.ts +22 -0
- package/dist/pipeline/profile-detectors/iac.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/iac.js +97 -0
- package/dist/pipeline/profile-detectors/iac.js.map +1 -0
- package/dist/pipeline/profile-detectors/languages.d.ts +18 -0
- package/dist/pipeline/profile-detectors/languages.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/languages.js +60 -0
- package/dist/pipeline/profile-detectors/languages.js.map +1 -0
- package/dist/pipeline/profile-detectors/manifests.d.ts +7 -0
- package/dist/pipeline/profile-detectors/manifests.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/manifests.js +7 -0
- package/dist/pipeline/profile-detectors/manifests.js.map +1 -0
- package/dist/pipeline/profile-detectors/src-dirs.d.ts +17 -0
- package/dist/pipeline/profile-detectors/src-dirs.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/src-dirs.js +89 -0
- package/dist/pipeline/profile-detectors/src-dirs.js.map +1 -0
- package/dist/pipeline/profile-detectors/variant-detectors.d.ts +7 -0
- package/dist/pipeline/profile-detectors/variant-detectors.d.ts.map +1 -0
- package/dist/pipeline/profile-detectors/variant-detectors.js +7 -0
- package/dist/pipeline/profile-detectors/variant-detectors.js.map +1 -0
- package/dist/pipeline/runner.d.ts +54 -0
- package/dist/pipeline/runner.d.ts.map +1 -0
- package/dist/pipeline/runner.js +247 -0
- package/dist/pipeline/runner.js.map +1 -0
- package/dist/pipeline/types.d.ts +235 -0
- package/dist/pipeline/types.d.ts.map +1 -0
- package/dist/pipeline/types.js +15 -0
- package/dist/pipeline/types.js.map +1 -0
- package/dist/providers/c.d.ts +3 -0
- package/dist/providers/c.d.ts.map +1 -0
- package/dist/providers/c.js +162 -0
- package/dist/providers/c.js.map +1 -0
- package/dist/providers/cobol.d.ts +19 -0
- package/dist/providers/cobol.d.ts.map +1 -0
- package/dist/providers/cobol.js +44 -0
- package/dist/providers/cobol.js.map +1 -0
- package/dist/providers/cpp.d.ts +3 -0
- package/dist/providers/cpp.d.ts.map +1 -0
- package/dist/providers/cpp.js +200 -0
- package/dist/providers/cpp.js.map +1 -0
- package/dist/providers/csharp.d.ts +3 -0
- package/dist/providers/csharp.d.ts.map +1 -0
- package/dist/providers/csharp.js +292 -0
- package/dist/providers/csharp.js.map +1 -0
- package/dist/providers/dart.d.ts +3 -0
- package/dist/providers/dart.d.ts.map +1 -0
- package/dist/providers/dart.js +214 -0
- package/dist/providers/dart.js.map +1 -0
- package/dist/providers/definition-ids.d.ts +18 -0
- package/dist/providers/definition-ids.d.ts.map +1 -0
- package/dist/providers/definition-ids.js +23 -0
- package/dist/providers/definition-ids.js.map +1 -0
- package/dist/providers/extract-helpers.d.ts +60 -0
- package/dist/providers/extract-helpers.d.ts.map +1 -0
- package/dist/providers/extract-helpers.js +296 -0
- package/dist/providers/extract-helpers.js.map +1 -0
- package/dist/providers/extraction-types.d.ts +85 -0
- package/dist/providers/extraction-types.d.ts.map +1 -0
- package/dist/providers/extraction-types.js +13 -0
- package/dist/providers/extraction-types.js.map +1 -0
- package/dist/providers/go.d.ts +3 -0
- package/dist/providers/go.d.ts.map +1 -0
- package/dist/providers/go.js +359 -0
- package/dist/providers/go.js.map +1 -0
- package/dist/providers/http-detect.d.ts +44 -0
- package/dist/providers/http-detect.d.ts.map +1 -0
- package/dist/providers/http-detect.js +307 -0
- package/dist/providers/http-detect.js.map +1 -0
- package/dist/providers/index.d.ts +38 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +33 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/java.d.ts +3 -0
- package/dist/providers/java.d.ts.map +1 -0
- package/dist/providers/java.js +259 -0
- package/dist/providers/java.js.map +1 -0
- package/dist/providers/javascript.d.ts +3 -0
- package/dist/providers/javascript.d.ts.map +1 -0
- package/dist/providers/javascript.js +139 -0
- package/dist/providers/javascript.js.map +1 -0
- package/dist/providers/kotlin.d.ts +3 -0
- package/dist/providers/kotlin.d.ts.map +1 -0
- package/dist/providers/kotlin.js +175 -0
- package/dist/providers/kotlin.js.map +1 -0
- package/dist/providers/php.d.ts +3 -0
- package/dist/providers/php.d.ts.map +1 -0
- package/dist/providers/php.js +218 -0
- package/dist/providers/php.js.map +1 -0
- package/dist/providers/python-accesses.d.ts +9 -0
- package/dist/providers/python-accesses.d.ts.map +1 -0
- package/dist/providers/python-accesses.js +22 -0
- package/dist/providers/python-accesses.js.map +1 -0
- package/dist/providers/python.d.ts +3 -0
- package/dist/providers/python.d.ts.map +1 -0
- package/dist/providers/python.js +323 -0
- package/dist/providers/python.js.map +1 -0
- package/dist/providers/registry.d.ts +4 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +46 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/resolution/c3.d.ts +6 -0
- package/dist/providers/resolution/c3.d.ts.map +1 -0
- package/dist/providers/resolution/c3.js +76 -0
- package/dist/providers/resolution/c3.js.map +1 -0
- package/dist/providers/resolution/context.d.ts +38 -0
- package/dist/providers/resolution/context.d.ts.map +1 -0
- package/dist/providers/resolution/context.js +45 -0
- package/dist/providers/resolution/context.js.map +1 -0
- package/dist/providers/resolution/first-wins.d.ts +3 -0
- package/dist/providers/resolution/first-wins.d.ts.map +1 -0
- package/dist/providers/resolution/first-wins.js +27 -0
- package/dist/providers/resolution/first-wins.js.map +1 -0
- package/dist/providers/resolution/mro.d.ts +16 -0
- package/dist/providers/resolution/mro.d.ts.map +1 -0
- package/dist/providers/resolution/mro.js +14 -0
- package/dist/providers/resolution/mro.js.map +1 -0
- package/dist/providers/resolution/none.d.ts +3 -0
- package/dist/providers/resolution/none.d.ts.map +1 -0
- package/dist/providers/resolution/none.js +11 -0
- package/dist/providers/resolution/none.js.map +1 -0
- package/dist/providers/resolution/python-all-filter.d.ts +25 -0
- package/dist/providers/resolution/python-all-filter.d.ts.map +1 -0
- package/dist/providers/resolution/python-all-filter.js +64 -0
- package/dist/providers/resolution/python-all-filter.js.map +1 -0
- package/dist/providers/resolution/resolver-strategy.d.ts +42 -0
- package/dist/providers/resolution/resolver-strategy.d.ts.map +1 -0
- package/dist/providers/resolution/resolver-strategy.js +50 -0
- package/dist/providers/resolution/resolver-strategy.js.map +1 -0
- package/dist/providers/resolution/single-inheritance.d.ts +3 -0
- package/dist/providers/resolution/single-inheritance.d.ts.map +1 -0
- package/dist/providers/resolution/single-inheritance.js +21 -0
- package/dist/providers/resolution/single-inheritance.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/__fixtures__/mock-tree.d.ts +16 -0
- package/dist/providers/resolution/stack-graphs/__fixtures__/mock-tree.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/__fixtures__/mock-tree.js +50 -0
- package/dist/providers/resolution/stack-graphs/__fixtures__/mock-tree.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/glue.d.ts +15 -0
- package/dist/providers/resolution/stack-graphs/glue.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/glue.js +44 -0
- package/dist/providers/resolution/stack-graphs/glue.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/node-edge-builder.d.ts +30 -0
- package/dist/providers/resolution/stack-graphs/node-edge-builder.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/node-edge-builder.js +366 -0
- package/dist/providers/resolution/stack-graphs/node-edge-builder.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/partial-path-engine.d.ts +9 -0
- package/dist/providers/resolution/stack-graphs/partial-path-engine.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/partial-path-engine.js +152 -0
- package/dist/providers/resolution/stack-graphs/partial-path-engine.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/rule-parser.d.ts +11 -0
- package/dist/providers/resolution/stack-graphs/rule-parser.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/rule-parser.js +247 -0
- package/dist/providers/resolution/stack-graphs/rule-parser.js.map +1 -0
- package/dist/providers/resolution/stack-graphs/types.d.ts +93 -0
- package/dist/providers/resolution/stack-graphs/types.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs/types.js +11 -0
- package/dist/providers/resolution/stack-graphs/types.js.map +1 -0
- package/dist/providers/resolution/stack-graphs-python.d.ts +27 -0
- package/dist/providers/resolution/stack-graphs-python.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs-python.js +104 -0
- package/dist/providers/resolution/stack-graphs-python.js.map +1 -0
- package/dist/providers/resolution/stack-graphs-ts.d.ts +134 -0
- package/dist/providers/resolution/stack-graphs-ts.d.ts.map +1 -0
- package/dist/providers/resolution/stack-graphs-ts.js +372 -0
- package/dist/providers/resolution/stack-graphs-ts.js.map +1 -0
- package/dist/providers/ruby.d.ts +3 -0
- package/dist/providers/ruby.d.ts.map +1 -0
- package/dist/providers/ruby.js +259 -0
- package/dist/providers/ruby.js.map +1 -0
- package/dist/providers/rust.d.ts +3 -0
- package/dist/providers/rust.d.ts.map +1 -0
- package/dist/providers/rust.js +318 -0
- package/dist/providers/rust.js.map +1 -0
- package/dist/providers/swift.d.ts +3 -0
- package/dist/providers/swift.d.ts.map +1 -0
- package/dist/providers/swift.js +177 -0
- package/dist/providers/swift.js.map +1 -0
- package/dist/providers/test-helpers.d.ts +24 -0
- package/dist/providers/test-helpers.d.ts.map +1 -0
- package/dist/providers/test-helpers.js +33 -0
- package/dist/providers/test-helpers.js.map +1 -0
- package/dist/providers/ts-shared.d.ts +30 -0
- package/dist/providers/ts-shared.d.ts.map +1 -0
- package/dist/providers/ts-shared.js +328 -0
- package/dist/providers/ts-shared.js.map +1 -0
- package/dist/providers/tsx.d.ts +7 -0
- package/dist/providers/tsx.d.ts.map +1 -0
- package/dist/providers/tsx.js +79 -0
- package/dist/providers/tsx.js.map +1 -0
- package/dist/providers/types.d.ts +166 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +7 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/typescript-family-accesses.d.ts +14 -0
- package/dist/providers/typescript-family-accesses.d.ts.map +1 -0
- package/dist/providers/typescript-family-accesses.js +27 -0
- package/dist/providers/typescript-family-accesses.js.map +1 -0
- package/dist/providers/typescript.d.ts +9 -0
- package/dist/providers/typescript.d.ts.map +1 -0
- package/dist/providers/typescript.js +84 -0
- package/dist/providers/typescript.js.map +1 -0
- package/package.json +108 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @opencodehub/ingestion
|
|
2
|
+
|
|
3
|
+
The indexing pipeline. Walks a repo, extracts symbols and edges via
|
|
4
|
+
tree-sitter (WASM by default, native opt-in), then runs a 30-phase DAG
|
|
5
|
+
that emits the graph and supporting artifacts under `<repo>/.codehub/`.
|
|
6
|
+
|
|
7
|
+
## Surface
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { runIngestion, DEFAULT_PHASES } from "@opencodehub/ingestion/pipeline";
|
|
11
|
+
|
|
12
|
+
await runIngestion({
|
|
13
|
+
repoRoot: "/path/to/repo",
|
|
14
|
+
phases: DEFAULT_PHASES,
|
|
15
|
+
// ...embeddings, summaries, scan, sbom toggles
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- The pipeline runs serially in topological order — determinism is
|
|
20
|
+
worth more than the parallelism win at MVP scale
|
|
21
|
+
(`packages/ingestion/src/pipeline/phases/default-set.ts:14-17`).
|
|
22
|
+
- The runner validates the DAG (missing dependencies, cycles) on every
|
|
23
|
+
invocation (`packages/ingestion/src/pipeline/runner.ts`).
|
|
24
|
+
- Parse runtime defaults to `web-tree-sitter` (WASM); set
|
|
25
|
+
`OCH_NATIVE_PARSER=1` to opt into native on Node 22 (root `CLAUDE.md`,
|
|
26
|
+
Parse runtime section).
|
|
27
|
+
|
|
28
|
+
## Phases
|
|
29
|
+
|
|
30
|
+
The 30-phase ordering, sourced from
|
|
31
|
+
`packages/ingestion/src/pipeline/phases/default-set.ts:55-135`. Phases
|
|
32
|
+
group by what they read from the repo or graph.
|
|
33
|
+
|
|
34
|
+
| Group | Phases |
|
|
35
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------- |
|
|
36
|
+
| Discovery | `scan`, `profile`, `repo-node`, `structure`, `markdown` |
|
|
37
|
+
| Parse + scope | `parse`, `incremental-scope`, `complexity` |
|
|
38
|
+
| Heuristic graph | `routes`, `openapi`, `tools`, `orm`, `cross-file`, `accesses` |
|
|
39
|
+
| SCIP overlay | `scip-index`, `confidence-demote`, `mro` |
|
|
40
|
+
| Clustering | `communities`, `dead-code`, `processes`, `fetches` |
|
|
41
|
+
| Temporal | `temporal`, `cochange`, `ownership` |
|
|
42
|
+
| Supply chain | `dependencies`, `sbom` |
|
|
43
|
+
| Annotation | `annotate`, `risk-snapshot` |
|
|
44
|
+
| Optional emitters | `summarize`, `embeddings` |
|
|
45
|
+
|
|
46
|
+
## Design
|
|
47
|
+
|
|
48
|
+
- **Single canonical ordering** — the runner consumes `DEFAULT_PHASES`
|
|
49
|
+
as the source of truth. Adding a phase is one import + one array
|
|
50
|
+
entry; the DAG validator does the rest.
|
|
51
|
+
- **Heuristic first, SCIP overlay second** — `parse` and friends emit
|
|
52
|
+
confidence-0.5 edges; `scip-index` upgrades them to 1.0 and
|
|
53
|
+
`confidence-demote` drops the unconfirmed survivors to 0.2 with a
|
|
54
|
+
`+scip-unconfirmed` reason suffix
|
|
55
|
+
(`packages/ingestion/src/pipeline/phases/default-set.ts:90-95`).
|
|
56
|
+
- **Dual parser runtime** — WASM is the default for cross-platform
|
|
57
|
+
determinism; the native N-API addon is opt-in for Node 22 dev boxes.
|
|
58
|
+
The `complexity` phase still requires native and degrades with a
|
|
59
|
+
one-shot stderr warning otherwise (root `CLAUDE.md`).
|
|
60
|
+
- **Silent toggles** — `summarize`, `embeddings`, `sbom`, and the
|
|
61
|
+
scanner phase are no-ops unless their option is on, so a default
|
|
62
|
+
`analyze` writes only the deterministic graph.
|
|
63
|
+
- **Phase outputs are typed** — each phase declares an output type
|
|
64
|
+
consumed by `ctx.phaseOutputs[<name>]`, surfacing dependency drift at
|
|
65
|
+
compile time (`packages/ingestion/src/pipeline/types.ts`).
|
|
66
|
+
|
|
67
|
+
See ADR 0013 for the storage backend the pipeline writes into and the
|
|
68
|
+
root README's "Embedding backends" section for the optional
|
|
69
|
+
`embeddings` phase.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Barrel exports for the extraction scaffolds used by the routes / tools / orm pipeline phases. */
|
|
2
|
+
export { detectPrismaCalls, detectSupabaseCalls } from "./orm-detector.js";
|
|
3
|
+
export type { ImportedSymbol, ReceiverOrigin, ResolvedTypeInfo, TsMorphProject, } from "./receiver-resolver.js";
|
|
4
|
+
export { importsMapFromExtracted, resolveReceiver } from "./receiver-resolver.js";
|
|
5
|
+
export { detectExpressRoutes, detectNextJsRoutes } from "./route-detector.js";
|
|
6
|
+
export { detectMcpTools } from "./tool-detector.js";
|
|
7
|
+
export type { ExtractedOrmEdge, ExtractedRoute, ExtractedTool, ExtractInput } from "./types.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extract/index.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Barrel exports for the extraction scaffolds used by the routes / tools / orm pipeline phases. */
|
|
2
|
+
export { detectPrismaCalls, detectSupabaseCalls } from "./orm-detector.js";
|
|
3
|
+
export { importsMapFromExtracted, resolveReceiver } from "./receiver-resolver.js";
|
|
4
|
+
export { detectExpressRoutes, detectNextJsRoutes } from "./route-detector.js";
|
|
5
|
+
export { detectMcpTools } from "./tool-detector.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extract/index.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAO3E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORM call detectors for Prisma and Supabase.
|
|
3
|
+
*
|
|
4
|
+
* Regexes authored fresh from:
|
|
5
|
+
* - Prisma Client API: https://www.prisma.io/docs/orm/reference/prisma-client-reference
|
|
6
|
+
* - Supabase JS reference: https://supabase.com/docs/reference/javascript/select
|
|
7
|
+
*
|
|
8
|
+
* Receiver precision (P06): each candidate call site's receiver identifier
|
|
9
|
+
* is confirmed against the file's import graph before an edge is emitted.
|
|
10
|
+
* Prisma edges require a `@prisma/client` import; Supabase edges require a
|
|
11
|
+
* `@supabase/supabase-js` import. When no import map is supplied AND
|
|
12
|
+
* {@link ExtractInput.strictDetectors} is `false`, the detector falls back
|
|
13
|
+
* to the pre-P06 regex-only heuristic (tagged `reason: "heuristic"` so
|
|
14
|
+
* downstream can filter).
|
|
15
|
+
*/
|
|
16
|
+
import type { ExtractedOrmEdge, ExtractInput } from "./types.js";
|
|
17
|
+
export declare function detectPrismaCalls(input: ExtractInput): readonly ExtractedOrmEdge[];
|
|
18
|
+
export declare function detectSupabaseCalls(input: ExtractInput): readonly ExtractedOrmEdge[];
|
|
19
|
+
//# sourceMappingURL=orm-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orm-detector.d.ts","sourceRoot":"","sources":["../../src/extract/orm-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsCjE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,gBAAgB,EAAE,CAsClF;AAmBD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,gBAAgB,EAAE,CA+CpF"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORM call detectors for Prisma and Supabase.
|
|
3
|
+
*
|
|
4
|
+
* Regexes authored fresh from:
|
|
5
|
+
* - Prisma Client API: https://www.prisma.io/docs/orm/reference/prisma-client-reference
|
|
6
|
+
* - Supabase JS reference: https://supabase.com/docs/reference/javascript/select
|
|
7
|
+
*
|
|
8
|
+
* Receiver precision (P06): each candidate call site's receiver identifier
|
|
9
|
+
* is confirmed against the file's import graph before an edge is emitted.
|
|
10
|
+
* Prisma edges require a `@prisma/client` import; Supabase edges require a
|
|
11
|
+
* `@supabase/supabase-js` import. When no import map is supplied AND
|
|
12
|
+
* {@link ExtractInput.strictDetectors} is `false`, the detector falls back
|
|
13
|
+
* to the pre-P06 regex-only heuristic (tagged `reason: "heuristic"` so
|
|
14
|
+
* downstream can filter).
|
|
15
|
+
*/
|
|
16
|
+
import { resolveReceiver } from "./receiver-resolver.js";
|
|
17
|
+
const PRISMA_MODULE = "@prisma/client";
|
|
18
|
+
const SUPABASE_MODULE = "@supabase/supabase-js";
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Prisma
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
/** Prisma Client operation names — the public model-delegate surface. */
|
|
23
|
+
const PRISMA_OPS = new Set([
|
|
24
|
+
"findUnique",
|
|
25
|
+
"findUniqueOrThrow",
|
|
26
|
+
"findMany",
|
|
27
|
+
"findFirst",
|
|
28
|
+
"findFirstOrThrow",
|
|
29
|
+
"create",
|
|
30
|
+
"createMany",
|
|
31
|
+
"createManyAndReturn",
|
|
32
|
+
"update",
|
|
33
|
+
"updateMany",
|
|
34
|
+
"updateManyAndReturn",
|
|
35
|
+
"upsert",
|
|
36
|
+
"delete",
|
|
37
|
+
"deleteMany",
|
|
38
|
+
"count",
|
|
39
|
+
"aggregate",
|
|
40
|
+
"groupBy",
|
|
41
|
+
]);
|
|
42
|
+
/**
|
|
43
|
+
* Match `<ident>.<model>.<op>(` where the identifier contains `prisma`
|
|
44
|
+
* (case-insensitive). Model name must be a valid JS identifier; op must be
|
|
45
|
+
* one of `PRISMA_OPS`.
|
|
46
|
+
*/
|
|
47
|
+
const PRISMA_CALL_RE = /\b([A-Za-z_$][\w$]*)\s*\.\s*([A-Za-z_$][\w$]*)\s*\.\s*([A-Za-z_$][\w$]*)\s*\(/g;
|
|
48
|
+
export function detectPrismaCalls(input) {
|
|
49
|
+
const { filePath, content, importsByFile, tsMorphProject, strictDetectors } = input;
|
|
50
|
+
if (!/prisma/i.test(content))
|
|
51
|
+
return [];
|
|
52
|
+
const out = [];
|
|
53
|
+
PRISMA_CALL_RE.lastIndex = 0;
|
|
54
|
+
let match = PRISMA_CALL_RE.exec(content);
|
|
55
|
+
while (match !== null) {
|
|
56
|
+
const receiver = match[1] ?? "";
|
|
57
|
+
const model = match[2];
|
|
58
|
+
const op = match[3];
|
|
59
|
+
match = PRISMA_CALL_RE.exec(content);
|
|
60
|
+
if (model === undefined || op === undefined)
|
|
61
|
+
continue;
|
|
62
|
+
if (!/prisma/i.test(receiver))
|
|
63
|
+
continue;
|
|
64
|
+
if (!PRISMA_OPS.has(op))
|
|
65
|
+
continue;
|
|
66
|
+
// `prisma.$transaction(...)` etc. use `$` prefix — already excluded
|
|
67
|
+
// because `$transaction` isn't in `PRISMA_OPS` and a `$`-prefixed token
|
|
68
|
+
// wouldn't be treated as a model anyway.
|
|
69
|
+
if (model.startsWith("$"))
|
|
70
|
+
continue;
|
|
71
|
+
const emitReason = verifyReceiver({
|
|
72
|
+
receiver,
|
|
73
|
+
filePath,
|
|
74
|
+
expectedModule: PRISMA_MODULE,
|
|
75
|
+
importsByFile,
|
|
76
|
+
tsMorphProject,
|
|
77
|
+
strictDetectors: strictDetectors === true,
|
|
78
|
+
});
|
|
79
|
+
if (emitReason === null)
|
|
80
|
+
continue;
|
|
81
|
+
out.push({
|
|
82
|
+
callerFile: filePath,
|
|
83
|
+
modelName: model,
|
|
84
|
+
operation: op,
|
|
85
|
+
orm: "prisma",
|
|
86
|
+
confidence: 0.9,
|
|
87
|
+
reason: emitReason,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return out;
|
|
91
|
+
}
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// Supabase
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
/** Supabase query-builder leaf operations we treat as "writes/reads". */
|
|
96
|
+
const SUPABASE_OPS = ["select", "insert", "upsert", "update", "delete"];
|
|
97
|
+
/**
|
|
98
|
+
* Match `<ident>.from('table')` / `.from("table")` / \`.from(\`table\`)\`.
|
|
99
|
+
* The `from()` call is what binds a table name in supabase-js.
|
|
100
|
+
*/
|
|
101
|
+
const SUPABASE_FROM_RE = /\b([A-Za-z_$][\w$]*)\s*\.\s*from\s*\(\s*(?:'([^']+)'|"([^"]+)"|`([^`$]+)`)\s*\)/g;
|
|
102
|
+
/** Window (in characters) after `.from(...)` to look for the leaf op. */
|
|
103
|
+
const SUPABASE_OP_WINDOW = 10;
|
|
104
|
+
export function detectSupabaseCalls(input) {
|
|
105
|
+
const { filePath, content, importsByFile, tsMorphProject, strictDetectors } = input;
|
|
106
|
+
if (!/supabase/i.test(content))
|
|
107
|
+
return [];
|
|
108
|
+
const out = [];
|
|
109
|
+
SUPABASE_FROM_RE.lastIndex = 0;
|
|
110
|
+
let match = SUPABASE_FROM_RE.exec(content);
|
|
111
|
+
while (match !== null) {
|
|
112
|
+
const receiver = match[1] ?? "";
|
|
113
|
+
const table = match[2] ?? match[3] ?? match[4];
|
|
114
|
+
const end = SUPABASE_FROM_RE.lastIndex;
|
|
115
|
+
match = SUPABASE_FROM_RE.exec(content);
|
|
116
|
+
if (table === undefined)
|
|
117
|
+
continue;
|
|
118
|
+
if (!/supabase/i.test(receiver))
|
|
119
|
+
continue;
|
|
120
|
+
// Look ahead up to SUPABASE_OP_WINDOW characters for `.<op>(`.
|
|
121
|
+
const tail = content.slice(end, end + SUPABASE_OP_WINDOW + 8);
|
|
122
|
+
let matchedOp;
|
|
123
|
+
for (const op of SUPABASE_OPS) {
|
|
124
|
+
// Permit whitespace but require the dot to land within the window.
|
|
125
|
+
const probe = new RegExp(`^\\s*\\.\\s*${op}\\s*\\(`);
|
|
126
|
+
if (probe.test(tail)) {
|
|
127
|
+
matchedOp = op;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (matchedOp === undefined)
|
|
132
|
+
continue;
|
|
133
|
+
const emitReason = verifyReceiver({
|
|
134
|
+
receiver,
|
|
135
|
+
filePath,
|
|
136
|
+
expectedModule: SUPABASE_MODULE,
|
|
137
|
+
importsByFile,
|
|
138
|
+
tsMorphProject,
|
|
139
|
+
strictDetectors: strictDetectors === true,
|
|
140
|
+
});
|
|
141
|
+
if (emitReason === null)
|
|
142
|
+
continue;
|
|
143
|
+
out.push({
|
|
144
|
+
callerFile: filePath,
|
|
145
|
+
modelName: table,
|
|
146
|
+
operation: matchedOp,
|
|
147
|
+
orm: "supabase",
|
|
148
|
+
confidence: 0.85,
|
|
149
|
+
reason: emitReason,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Confirm the receiver identifier resolves back to `expectedModule` via the
|
|
156
|
+
* import graph (and, optionally, ts-morph). Returns the provenance tag to
|
|
157
|
+
* attach to the emitted edge, or `null` when the detector should drop the
|
|
158
|
+
* candidate.
|
|
159
|
+
*
|
|
160
|
+
* - `"receiver-confirmed"` — the resolver matched `expectedModule`.
|
|
161
|
+
* - `"heuristic"` — resolver could not pinpoint the receiver, but
|
|
162
|
+
* the expected module is imported elsewhere in
|
|
163
|
+
* the file (common for ORM clients wrapped by
|
|
164
|
+
* a local factory), OR no import map was
|
|
165
|
+
* supplied at all and strict-mode is off.
|
|
166
|
+
* - `null` — resolver returned a DIFFERENT module, OR
|
|
167
|
+
* strict-mode is on and no positive match found.
|
|
168
|
+
*/
|
|
169
|
+
function verifyReceiver(args) {
|
|
170
|
+
const { receiver, filePath, expectedModule, importsByFile, tsMorphProject, strictDetectors } = args;
|
|
171
|
+
const origin = resolveReceiver(receiver, filePath, importsByFile, tsMorphProject);
|
|
172
|
+
if (origin !== null) {
|
|
173
|
+
if (origin.moduleName === expectedModule)
|
|
174
|
+
return "receiver-confirmed";
|
|
175
|
+
// Resolved to a DIFFERENT module — this is a real false positive the
|
|
176
|
+
// heuristic would have otherwise emitted. Always drop.
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
// Resolver could not pinpoint the receiver's origin. If the expected
|
|
180
|
+
// module is imported anywhere in the file we treat this as a weaker
|
|
181
|
+
// "same-module" heuristic — typical for Prisma clients constructed from
|
|
182
|
+
// `new PrismaClient()` or wrapped by a `createClient()` factory where
|
|
183
|
+
// the receiver identifier isn't itself imported. `strictDetectors`
|
|
184
|
+
// disables this fallback.
|
|
185
|
+
if (importsByFile !== undefined) {
|
|
186
|
+
if (strictDetectors)
|
|
187
|
+
return null;
|
|
188
|
+
if (fileImportsModule(filePath, expectedModule, importsByFile))
|
|
189
|
+
return "heuristic";
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
// No import map plumbed at all — fall back to the pre-P06 regex emit
|
|
193
|
+
// unless strict mode is on.
|
|
194
|
+
if (strictDetectors)
|
|
195
|
+
return null;
|
|
196
|
+
return "heuristic";
|
|
197
|
+
}
|
|
198
|
+
/** `true` when `filePath` imports from `moduleName` (exact specifier match). */
|
|
199
|
+
function fileImportsModule(filePath, moduleName, importsByFile) {
|
|
200
|
+
const imports = importsByFile.get(filePath);
|
|
201
|
+
if (imports === undefined)
|
|
202
|
+
return false;
|
|
203
|
+
for (const imp of imports) {
|
|
204
|
+
if (imp.source === moduleName)
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=orm-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orm-detector.js","sourceRoot":"","sources":["../../src/extract/orm-detector.ts"],"names":[],"mappings":"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CAAC;IACxC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,IAAI,GAAG,CAAC,MAAM,KAAK,UAAU;YAAE,OAAO,IAAI,CAAC;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared property-access walker powering the ACCESSES-edge emitter.
|
|
3
|
+
*
|
|
4
|
+
* Per-function/method body, we scan the source text between `startLine` and
|
|
5
|
+
* `endLine` (inclusive, 1-indexed) and look for:
|
|
6
|
+
* - Member expressions (`a.b`) → read
|
|
7
|
+
* - Assignment targets (`a.b = ...`) → write
|
|
8
|
+
* - Subscript accesses (`a["b"]`) → read (also "b" when LHS)
|
|
9
|
+
*
|
|
10
|
+
* We deliberately do not consume the tree-sitter parse tree: the unified
|
|
11
|
+
* query does not surface member/attribute/assignment/subscript nodes. A
|
|
12
|
+
* source-text walker that first strips comments + string literals via
|
|
13
|
+
* {@link stripComments} is deterministic, language-agnostic, and avoids a
|
|
14
|
+
* round-trip through the worker pool.
|
|
15
|
+
*
|
|
16
|
+
* Per-language providers pass a {@link PropertyAccessConfig} selecting which
|
|
17
|
+
* flavour of assignment operators to treat as writes (Python augments include
|
|
18
|
+
* `:=`; some languages use `=` only). The walker is careful to:
|
|
19
|
+
* - Skip property names that collide with keywords (`this`, `self`, `if`...).
|
|
20
|
+
* - Skip chained receivers (`a.b.c` → only the last segment is treated as
|
|
21
|
+
* a property read anchored to the *most recent* identifier).
|
|
22
|
+
* - Skip function-call members (`a.foo()` is a call, not a property read).
|
|
23
|
+
* - Skip optional chaining (`a?.b`) is kept (TS/JS-only; detected).
|
|
24
|
+
*
|
|
25
|
+
* Flat property names only (v2 scope): `user.address.street` yields reads
|
|
26
|
+
* on `address` (for `user`) and `street` (for `address`). Qualified paths
|
|
27
|
+
* are a future extension.
|
|
28
|
+
*/
|
|
29
|
+
import type { ExtractedDefinition, PropertyAccess } from "../providers/extraction-types.js";
|
|
30
|
+
/**
|
|
31
|
+
* Per-language tuning for the walker.
|
|
32
|
+
*
|
|
33
|
+
* `commentStripped`: passes the stripped string through verbatim when `true`
|
|
34
|
+
* (TS/JS/Python share the same stripping rules via
|
|
35
|
+
* {@link stripComments}; more exotic comment grammars can pre-process
|
|
36
|
+
* their source before calling the walker).
|
|
37
|
+
*
|
|
38
|
+
* `memberSeparator`: `.` for every language supported by v2. Kept as a
|
|
39
|
+
* parameter so a future Ruby / Kotlin / Swift addition can swap in `::`
|
|
40
|
+
* or `->` without forking the walker.
|
|
41
|
+
*
|
|
42
|
+
* `assignmentOperators`: regex alternation snippet matching the write
|
|
43
|
+
* operators the language recognises. TS/JS use `=`, `+=`, `-=`, etc.;
|
|
44
|
+
* Python additionally accepts `:=`.
|
|
45
|
+
*/
|
|
46
|
+
export interface PropertyAccessConfig {
|
|
47
|
+
readonly commentStripped?: boolean;
|
|
48
|
+
readonly memberSeparator: "." | "::" | "->";
|
|
49
|
+
readonly assignmentOperators: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
export declare const TS_ACCESS_CONFIG: PropertyAccessConfig;
|
|
52
|
+
export declare const PYTHON_ACCESS_CONFIG: PropertyAccessConfig;
|
|
53
|
+
interface EnclosingDef {
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly startLine: number;
|
|
56
|
+
readonly endLine: number;
|
|
57
|
+
readonly qualifiedName: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Extract every property access inside the given function/method bodies.
|
|
61
|
+
*
|
|
62
|
+
* `enclosingDefs` is a filtered view of `definitions` (Function / Method /
|
|
63
|
+
* Constructor kinds only) with pre-resolved `NodeId`s so the walker doesn't
|
|
64
|
+
* re-derive them.
|
|
65
|
+
*/
|
|
66
|
+
export declare function extractPropertyAccesses(filePath: string, sourceText: string, enclosingDefs: readonly EnclosingDef[], config: PropertyAccessConfig): readonly PropertyAccess[];
|
|
67
|
+
/** Stable ordering: (enclosingSymbolId, propertyName, startLine, reason). */
|
|
68
|
+
export declare function sortAccesses(accesses: readonly PropertyAccess[]): readonly PropertyAccess[];
|
|
69
|
+
/**
|
|
70
|
+
* Convenience filter — providers call this to narrow the `ExtractedDefinition`
|
|
71
|
+
* list down to callable owners, then hand each through `idForDefinition` from
|
|
72
|
+
* the parse phase before invoking {@link extractPropertyAccesses}.
|
|
73
|
+
*/
|
|
74
|
+
export declare function callableDefs(defs: readonly ExtractedDefinition[]): readonly ExtractedDefinition[];
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=property-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-access.d.ts","sourceRoot":"","sources":["../../src/extract/property-access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAE5F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,oBAuB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,oBAoBlC,CAAC;AA0CF,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,SAAS,YAAY,EAAE,EACtC,MAAM,EAAE,oBAAoB,GAC3B,SAAS,cAAc,EAAE,CAiG3B;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,cAAc,EAAE,CAY3F;AAiCD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,mBAAmB,EAAE,GAAG,SAAS,mBAAmB,EAAE,CAIjG"}
|