@lzehrung/codegraph 3.0.1 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/codegraph-skill/codegraph/SKILL.md +6 -2
- package/dist/agent/artifact.d.ts.map +1 -1
- package/dist/agent/artifact.js +4 -9
- package/dist/agent/artifact.js.map +1 -1
- package/dist/agent/call-hierarchy.d.ts +4 -2
- package/dist/agent/call-hierarchy.d.ts.map +1 -1
- package/dist/agent/call-hierarchy.js +20 -29
- package/dist/agent/call-hierarchy.js.map +1 -1
- package/dist/agent/explain.d.ts.map +1 -1
- package/dist/agent/explain.js +24 -18
- package/dist/agent/explain.js.map +1 -1
- package/dist/agent/explore.d.ts.map +1 -1
- package/dist/agent/explore.js +2 -11
- package/dist/agent/explore.js.map +1 -1
- package/dist/agent/file-view.d.ts.map +1 -1
- package/dist/agent/file-view.js +4 -12
- package/dist/agent/file-view.js.map +1 -1
- package/dist/agent/normalize.d.ts +0 -3
- package/dist/agent/normalize.d.ts.map +1 -1
- package/dist/agent/normalize.js +1 -7
- package/dist/agent/normalize.js.map +1 -1
- package/dist/agent/orient.d.ts.map +1 -1
- package/dist/agent/orient.js +2 -6
- package/dist/agent/orient.js.map +1 -1
- package/dist/agent/packet.d.ts.map +1 -1
- package/dist/agent/packet.js +2 -5
- package/dist/agent/packet.js.map +1 -1
- package/dist/agent/query-index/content.d.ts.map +1 -1
- package/dist/agent/query-index/content.js +2 -6
- package/dist/agent/query-index/content.js.map +1 -1
- package/dist/agent/query-index/update.d.ts.map +1 -1
- package/dist/agent/query-index/update.js +8 -45
- package/dist/agent/query-index/update.js.map +1 -1
- package/dist/agent/query-index/worker-pool.d.ts.map +1 -1
- package/dist/agent/query-index/worker-pool.js +2 -1
- package/dist/agent/query-index/worker-pool.js.map +1 -1
- package/dist/agent/refactor-plan.d.ts +2 -2
- package/dist/agent/refactor-plan.d.ts.map +1 -1
- package/dist/agent/refactor-plan.js +11 -57
- package/dist/agent/refactor-plan.js.map +1 -1
- package/dist/agent/rename-preview.d.ts.map +1 -1
- package/dist/agent/rename-preview.js +166 -23
- package/dist/agent/rename-preview.js.map +1 -1
- package/dist/agent/search.d.ts +13 -0
- package/dist/agent/search.d.ts.map +1 -1
- package/dist/agent/search.js +17 -26
- package/dist/agent/search.js.map +1 -1
- package/dist/agent/semantic-symbols.d.ts +1 -1
- package/dist/agent/semantic-symbols.d.ts.map +1 -1
- package/dist/agent/semantic-symbols.js +2 -5
- package/dist/agent/semantic-symbols.js.map +1 -1
- package/dist/agent/semantic.d.ts +5 -0
- package/dist/agent/semantic.d.ts.map +1 -1
- package/dist/agent/semantic.js +12 -1
- package/dist/agent/semantic.js.map +1 -1
- package/dist/agent/session.d.ts +9 -0
- package/dist/agent/session.d.ts.map +1 -1
- package/dist/agent/session.js +59 -41
- package/dist/agent/session.js.map +1 -1
- package/dist/agent/type-hierarchy.d.ts +4 -2
- package/dist/agent/type-hierarchy.d.ts.map +1 -1
- package/dist/agent/type-hierarchy.js +19 -31
- package/dist/agent/type-hierarchy.js.map +1 -1
- package/dist/agent/workspace-symbols.d.ts +1 -1
- package/dist/agent/workspace-symbols.d.ts.map +1 -1
- package/dist/agent/workspace-symbols.js +7 -15
- package/dist/agent/workspace-symbols.js.map +1 -1
- package/dist/analysis-summary.d.ts +1 -4
- package/dist/analysis-summary.d.ts.map +1 -1
- package/dist/analysis-summary.js +58 -19
- package/dist/analysis-summary.js.map +1 -1
- package/dist/bin/cli.js +41060 -27641
- package/dist/bin/query-index-worker.js +268 -241
- package/dist/bootstrap/tree-sitter-languages.d.ts +2 -0
- package/dist/bootstrap/tree-sitter-languages.d.ts.map +1 -1
- package/dist/bootstrap/tree-sitter-languages.js +6 -19
- package/dist/bootstrap/tree-sitter-languages.js.map +1 -1
- package/dist/chunking/chunk-matches.d.ts.map +1 -1
- package/dist/chunking/chunk-matches.js +6 -42
- package/dist/chunking/chunk-matches.js.map +1 -1
- package/dist/chunking/chunk-split.d.ts +7 -0
- package/dist/chunking/chunk-split.d.ts.map +1 -1
- package/dist/chunking/chunk-split.js +3 -3
- package/dist/chunking/chunk-split.js.map +1 -1
- package/dist/chunking/chunk-text-file.js +2 -30
- package/dist/chunking/chunk-text-file.js.map +1 -1
- package/dist/cli/affected.d.ts.map +1 -1
- package/dist/cli/affected.js +1 -9
- package/dist/cli/affected.js.map +1 -1
- package/dist/cli/call-hierarchy.js +3 -6
- package/dist/cli/call-hierarchy.js.map +1 -1
- package/dist/cli/chunk.d.ts.map +1 -1
- package/dist/cli/chunk.js +4 -11
- package/dist/cli/chunk.js.map +1 -1
- package/dist/cli/command-table.d.ts.map +1 -1
- package/dist/cli/command-table.js +7 -0
- package/dist/cli/command-table.js.map +1 -1
- package/dist/cli/context.d.ts +1 -0
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +1 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +1 -11
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/duplicates.d.ts +5 -0
- package/dist/cli/duplicates.d.ts.map +1 -1
- package/dist/cli/duplicates.js +15 -2
- package/dist/cli/duplicates.js.map +1 -1
- package/dist/cli/graph.d.ts +4 -12
- package/dist/cli/graph.d.ts.map +1 -1
- package/dist/cli/graph.js +17 -8
- package/dist/cli/graph.js.map +1 -1
- package/dist/cli/help.d.ts +4 -4
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +17 -9
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts +2 -12
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/links.d.ts.map +1 -1
- package/dist/cli/links.js +4 -10
- package/dist/cli/links.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +5 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/module-locals.d.ts +8 -0
- package/dist/cli/module-locals.d.ts.map +1 -0
- package/dist/cli/module-locals.js +9 -0
- package/dist/cli/module-locals.js.map +1 -0
- package/dist/cli/navigation.d.ts +2 -0
- package/dist/cli/navigation.d.ts.map +1 -1
- package/dist/cli/navigation.js +3 -5
- package/dist/cli/navigation.js.map +1 -1
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +6 -1
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/pretty.d.ts +1 -0
- package/dist/cli/pretty.d.ts.map +1 -1
- package/dist/cli/pretty.js +6 -8
- package/dist/cli/pretty.js.map +1 -1
- package/dist/cli/progress.d.ts.map +1 -1
- package/dist/cli/progress.js +42 -16
- package/dist/cli/progress.js.map +1 -1
- package/dist/cli/refactor-plan.js +2 -5
- package/dist/cli/refactor-plan.js.map +1 -1
- package/dist/cli/rename-preview.js +2 -5
- package/dist/cli/rename-preview.js.map +1 -1
- package/dist/cli/review.d.ts +6 -16
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +2 -0
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/server.d.ts.map +1 -1
- package/dist/cli/server.js +9 -10
- package/dist/cli/server.js.map +1 -1
- package/dist/cli/type-hierarchy.js +8 -8
- package/dist/cli/type-hierarchy.js.map +1 -1
- package/dist/cli/viewer.js +1 -1
- package/dist/cli/viewer.js.map +1 -1
- package/dist/document-links/asciidoc.d.ts.map +1 -1
- package/dist/document-links/asciidoc.js +4 -16
- package/dist/document-links/asciidoc.js.map +1 -1
- package/dist/document-links/check.d.ts.map +1 -1
- package/dist/document-links/check.js +1 -3
- package/dist/document-links/check.js.map +1 -1
- package/dist/document-links/html.d.ts.map +1 -1
- package/dist/document-links/html.js +6 -44
- package/dist/document-links/html.js.map +1 -1
- package/dist/document-links/markdown.d.ts.map +1 -1
- package/dist/document-links/markdown.js +4 -13
- package/dist/document-links/markdown.js.map +1 -1
- package/dist/document-links/rst.d.ts.map +1 -1
- package/dist/document-links/rst.js +7 -31
- package/dist/document-links/rst.js.map +1 -1
- package/dist/document-links/sfc.d.ts.map +1 -1
- package/dist/document-links/sfc.js +2 -5
- package/dist/document-links/sfc.js.map +1 -1
- package/dist/document-links/shared.d.ts +2 -0
- package/dist/document-links/shared.d.ts.map +1 -1
- package/dist/document-links/shared.js +13 -0
- package/dist/document-links/shared.js.map +1 -1
- package/dist/drift/artifact.d.ts.map +1 -1
- package/dist/drift/artifact.js +4 -27
- package/dist/drift/artifact.js.map +1 -1
- package/dist/drift/git.d.ts.map +1 -1
- package/dist/drift/git.js +10 -2
- package/dist/drift/git.js.map +1 -1
- package/dist/drift/graph-edges.d.ts +4 -0
- package/dist/drift/graph-edges.d.ts.map +1 -0
- package/dist/drift/graph-edges.js +15 -0
- package/dist/drift/graph-edges.js.map +1 -0
- package/dist/drift/snapshot.d.ts.map +1 -1
- package/dist/drift/snapshot.js +2 -17
- package/dist/drift/snapshot.js.map +1 -1
- package/dist/duplicates/candidates.d.ts +61 -0
- package/dist/duplicates/candidates.d.ts.map +1 -0
- package/dist/duplicates/candidates.js +873 -0
- package/dist/duplicates/candidates.js.map +1 -0
- package/dist/duplicates/progress.d.ts +17 -0
- package/dist/duplicates/progress.d.ts.map +1 -0
- package/dist/duplicates/progress.js +57 -0
- package/dist/duplicates/progress.js.map +1 -0
- package/dist/duplicates/scoring.d.ts +9 -40
- package/dist/duplicates/scoring.d.ts.map +1 -1
- package/dist/duplicates/scoring.js +34 -414
- package/dist/duplicates/scoring.js.map +1 -1
- package/dist/duplicates/types.d.ts +30 -1
- package/dist/duplicates/types.d.ts.map +1 -1
- package/dist/duplicates/unit-cache.d.ts +11 -1
- package/dist/duplicates/unit-cache.d.ts.map +1 -1
- package/dist/duplicates/unit-cache.js +20 -2
- package/dist/duplicates/unit-cache.js.map +1 -1
- package/dist/duplicates/units.d.ts +4 -2
- package/dist/duplicates/units.d.ts.map +1 -1
- package/dist/duplicates/units.js +47 -25
- package/dist/duplicates/units.js.map +1 -1
- package/dist/duplicates.d.ts +1 -0
- package/dist/duplicates.d.ts.map +1 -1
- package/dist/duplicates.js +116 -62
- package/dist/duplicates.js.map +1 -1
- package/dist/graph-builder.d.ts +1 -1
- package/dist/graph-builder.d.ts.map +1 -1
- package/dist/graph-builder.js +3 -2
- package/dist/graph-builder.js.map +1 -1
- package/dist/graph-edge-collector.d.ts +3 -1
- package/dist/graph-edge-collector.d.ts.map +1 -1
- package/dist/graph-edge-collector.js +38 -6
- package/dist/graph-edge-collector.js.map +1 -1
- package/dist/graphs/angularjs.d.ts.map +1 -1
- package/dist/graphs/angularjs.js +2 -9
- package/dist/graphs/angularjs.js.map +1 -1
- package/dist/graphs/edge-resolution.d.ts +4 -0
- package/dist/graphs/edge-resolution.d.ts.map +1 -1
- package/dist/graphs/edge-resolution.js +2 -0
- package/dist/graphs/edge-resolution.js.map +1 -1
- package/dist/graphs/external/manifests.d.ts.map +1 -1
- package/dist/graphs/external/manifests.js +1 -6
- package/dist/graphs/external/manifests.js.map +1 -1
- package/dist/graphs/specifiers.d.ts.map +1 -1
- package/dist/graphs/specifiers.js +47 -26
- package/dist/graphs/specifiers.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts +2 -0
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.js +9 -3
- package/dist/graphs/symbol-graph-detailed/edge-passes.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts +3 -3
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js +2 -26
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed.js +38 -1
- package/dist/graphs/symbol-graph-detailed.js.map +1 -1
- package/dist/impact/analyzer.d.ts.map +1 -1
- package/dist/impact/analyzer.js +23 -17
- package/dist/impact/analyzer.js.map +1 -1
- package/dist/impact/budgets.d.ts.map +1 -1
- package/dist/impact/budgets.js +3 -9
- package/dist/impact/budgets.js.map +1 -1
- package/dist/impact/call-compatibility.d.ts.map +1 -1
- package/dist/impact/call-compatibility.js +3 -12
- package/dist/impact/call-compatibility.js.map +1 -1
- package/dist/impact/context.d.ts +6 -0
- package/dist/impact/context.d.ts.map +1 -1
- package/dist/impact/context.js +2 -2
- package/dist/impact/context.js.map +1 -1
- package/dist/impact/direct.d.ts.map +1 -1
- package/dist/impact/direct.js +2 -6
- package/dist/impact/direct.js.map +1 -1
- package/dist/impact/map.d.ts +3 -1
- package/dist/impact/map.d.ts.map +1 -1
- package/dist/impact/map.js +12 -5
- package/dist/impact/map.js.map +1 -1
- package/dist/impact/providers/base.js +1 -1
- package/dist/impact/providers/base.js.map +1 -1
- package/dist/impact/reference-cache.d.ts.map +1 -1
- package/dist/impact/reference-cache.js +1 -24
- package/dist/impact/reference-cache.js.map +1 -1
- package/dist/impact/report-shared.d.ts +2 -1
- package/dist/impact/report-shared.d.ts.map +1 -1
- package/dist/impact/report-shared.js +10 -0
- package/dist/impact/report-shared.js.map +1 -1
- package/dist/impact/report-suggestions.d.ts.map +1 -1
- package/dist/impact/report-suggestions.js +2 -8
- package/dist/impact/report-suggestions.js.map +1 -1
- package/dist/impact/report.d.ts.map +1 -1
- package/dist/impact/report.js +2 -8
- package/dist/impact/report.js.map +1 -1
- package/dist/impact/streaming.d.ts.map +1 -1
- package/dist/impact/streaming.js +3 -8
- package/dist/impact/streaming.js.map +1 -1
- package/dist/indexer/build-cache/manifest.d.ts.map +1 -1
- package/dist/indexer/build-cache/manifest.js +10 -108
- package/dist/indexer/build-cache/manifest.js.map +1 -1
- package/dist/indexer/build-cache/module-cache.d.ts +6 -1
- package/dist/indexer/build-cache/module-cache.d.ts.map +1 -1
- package/dist/indexer/build-cache/module-cache.js +25 -2
- package/dist/indexer/build-cache/module-cache.js.map +1 -1
- package/dist/indexer/build-cache/options.d.ts +38 -1
- package/dist/indexer/build-cache/options.d.ts.map +1 -1
- package/dist/indexer/build-cache/options.js +38 -1
- package/dist/indexer/build-cache/options.js.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.d.ts.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.js +48 -99
- package/dist/indexer/build-cache/project-snapshot.js.map +1 -1
- package/dist/indexer/build-cache/reports.d.ts +1 -0
- package/dist/indexer/build-cache/reports.d.ts.map +1 -1
- package/dist/indexer/build-cache/reports.js +10 -0
- package/dist/indexer/build-cache/reports.js.map +1 -1
- package/dist/indexer/build-index.d.ts +2 -0
- package/dist/indexer/build-index.d.ts.map +1 -1
- package/dist/indexer/build-index.js +187 -57
- package/dist/indexer/build-index.js.map +1 -1
- package/dist/indexer/build-workers.d.ts +7 -1
- package/dist/indexer/build-workers.d.ts.map +1 -1
- package/dist/indexer/build-workers.js +12 -0
- package/dist/indexer/build-workers.js.map +1 -1
- package/dist/indexer/call-hierarchy.d.ts.map +1 -1
- package/dist/indexer/call-hierarchy.js +5 -17
- package/dist/indexer/call-hierarchy.js.map +1 -1
- package/dist/indexer/compilation-units.d.ts +32 -20
- package/dist/indexer/compilation-units.d.ts.map +1 -1
- package/dist/indexer/compilation-units.js +139 -145
- package/dist/indexer/compilation-units.js.map +1 -1
- package/dist/indexer/cpp-callables.d.ts.map +1 -1
- package/dist/indexer/cpp-callables.js +2 -7
- package/dist/indexer/cpp-callables.js.map +1 -1
- package/dist/indexer/import-types.d.ts +5 -0
- package/dist/indexer/import-types.d.ts.map +1 -1
- package/dist/indexer/import-types.js.map +1 -1
- package/dist/indexer/imports/binding-ranges.d.ts +5 -12
- package/dist/indexer/imports/binding-ranges.d.ts.map +1 -1
- package/dist/indexer/imports/binding-ranges.js +13 -19
- package/dist/indexer/imports/binding-ranges.js.map +1 -1
- package/dist/indexer/imports/context.d.ts +6 -0
- package/dist/indexer/imports/context.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.d.ts +28 -13
- package/dist/indexer/imports/import-binding-tables.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.js +179 -178
- package/dist/indexer/imports/import-binding-tables.js.map +1 -1
- package/dist/indexer/imports/js-text-imports.d.ts +0 -1
- package/dist/indexer/imports/js-text-imports.d.ts.map +1 -1
- package/dist/indexer/imports/js-text-imports.js +0 -176
- package/dist/indexer/imports/js-text-imports.js.map +1 -1
- package/dist/indexer/imports/language-specific.d.ts.map +1 -1
- package/dist/indexer/imports/language-specific.js +4 -8
- package/dist/indexer/imports/language-specific.js.map +1 -1
- package/dist/indexer/imports/python.d.ts +0 -1
- package/dist/indexer/imports/python.d.ts.map +1 -1
- package/dist/indexer/imports/python.js +1 -29
- package/dist/indexer/imports/python.js.map +1 -1
- package/dist/indexer/imports/text-import-extractors.d.ts +2 -9
- package/dist/indexer/imports/text-import-extractors.d.ts.map +1 -1
- package/dist/indexer/imports/text-import-extractors.js +0 -284
- package/dist/indexer/imports/text-import-extractors.js.map +1 -1
- package/dist/indexer/imports.d.ts +15 -0
- package/dist/indexer/imports.d.ts.map +1 -1
- package/dist/indexer/imports.js +82 -44
- package/dist/indexer/imports.js.map +1 -1
- package/dist/indexer/incremental-plan.d.ts +0 -1
- package/dist/indexer/incremental-plan.d.ts.map +1 -1
- package/dist/indexer/incremental-plan.js +6 -12
- package/dist/indexer/incremental-plan.js.map +1 -1
- package/dist/indexer/name-lookup-policies/implicit-self.d.ts.map +1 -1
- package/dist/indexer/name-lookup-policies/implicit-self.js +25 -4
- package/dist/indexer/name-lookup-policies/implicit-self.js.map +1 -1
- package/dist/indexer/name-resolution-types.d.ts +5 -0
- package/dist/indexer/name-resolution-types.d.ts.map +1 -1
- package/dist/indexer/name-resolution.d.ts.map +1 -1
- package/dist/indexer/name-resolution.js +2 -0
- package/dist/indexer/name-resolution.js.map +1 -1
- package/dist/indexer/navigation-cpp.d.ts.map +1 -1
- package/dist/indexer/navigation-cpp.js +3 -5
- package/dist/indexer/navigation-cpp.js.map +1 -1
- package/dist/indexer/navigation-goto.d.ts +49 -3
- package/dist/indexer/navigation-goto.d.ts.map +1 -1
- package/dist/indexer/navigation-goto.js +500 -106
- package/dist/indexer/navigation-goto.js.map +1 -1
- package/dist/indexer/navigation-local.d.ts +7 -0
- package/dist/indexer/navigation-local.d.ts.map +1 -1
- package/dist/indexer/navigation-local.js +22 -2
- package/dist/indexer/navigation-local.js.map +1 -1
- package/dist/indexer/navigation-php.d.ts +0 -1
- package/dist/indexer/navigation-php.d.ts.map +1 -1
- package/dist/indexer/navigation-php.js +1 -7
- package/dist/indexer/navigation-php.js.map +1 -1
- package/dist/indexer/navigation-references.d.ts +1 -0
- package/dist/indexer/navigation-references.d.ts.map +1 -1
- package/dist/indexer/navigation-references.js +134 -23
- package/dist/indexer/navigation-references.js.map +1 -1
- package/dist/indexer/navigation-resolve.d.ts +22 -0
- package/dist/indexer/navigation-resolve.d.ts.map +1 -1
- package/dist/indexer/navigation-resolve.js +73 -8
- package/dist/indexer/navigation-resolve.js.map +1 -1
- package/dist/indexer/navigation.d.ts +4 -1
- package/dist/indexer/navigation.d.ts.map +1 -1
- package/dist/indexer/navigation.js +398 -95
- package/dist/indexer/navigation.js.map +1 -1
- package/dist/indexer/python-property-decorator.d.ts +11 -0
- package/dist/indexer/python-property-decorator.d.ts.map +1 -0
- package/dist/indexer/python-property-decorator.js +30 -0
- package/dist/indexer/python-property-decorator.js.map +1 -0
- package/dist/indexer/shared-owner-identity.d.ts +3 -1
- package/dist/indexer/shared-owner-identity.d.ts.map +1 -1
- package/dist/indexer/shared-owner-identity.js +40 -12
- package/dist/indexer/shared-owner-identity.js.map +1 -1
- package/dist/indexer/shared.d.ts +10 -0
- package/dist/indexer/shared.d.ts.map +1 -1
- package/dist/indexer/shared.js +8 -0
- package/dist/indexer/shared.js.map +1 -1
- package/dist/indexer/star-import-precedence.d.ts +5 -1
- package/dist/indexer/star-import-precedence.d.ts.map +1 -1
- package/dist/indexer/star-import-precedence.js +12 -19
- package/dist/indexer/star-import-precedence.js.map +1 -1
- package/dist/indexer/type-hierarchy.d.ts.map +1 -1
- package/dist/indexer/type-hierarchy.js +8 -9
- package/dist/indexer/type-hierarchy.js.map +1 -1
- package/dist/indexer/types.d.ts +49 -1
- package/dist/indexer/types.d.ts.map +1 -1
- package/dist/indexer/types.js.map +1 -1
- package/dist/indexer/workspace-symbols.d.ts.map +1 -1
- package/dist/indexer/workspace-symbols.js +3 -13
- package/dist/indexer/workspace-symbols.js.map +1 -1
- package/dist/installer/locks.d.ts +1 -0
- package/dist/installer/locks.d.ts.map +1 -1
- package/dist/installer/locks.js +4 -8
- package/dist/installer/locks.js.map +1 -1
- package/dist/installer/registry.d.ts.map +1 -1
- package/dist/installer/registry.js +9 -15
- package/dist/installer/registry.js.map +1 -1
- package/dist/languages/callable-arity.d.ts.map +1 -1
- package/dist/languages/callable-arity.js +1 -38
- package/dist/languages/callable-arity.js.map +1 -1
- package/dist/languages/definitions/csharp.d.ts.map +1 -1
- package/dist/languages/definitions/csharp.js +5 -13
- package/dist/languages/definitions/csharp.js.map +1 -1
- package/dist/languages/definitions/java.d.ts.map +1 -1
- package/dist/languages/definitions/java.js +4 -13
- package/dist/languages/definitions/java.js.map +1 -1
- package/dist/languages/definitions/kotlin.d.ts.map +1 -1
- package/dist/languages/definitions/kotlin.js +4 -8
- package/dist/languages/definitions/kotlin.js.map +1 -1
- package/dist/languages/definitions/python.d.ts.map +1 -1
- package/dist/languages/definitions/python.js +5 -3
- package/dist/languages/definitions/python.js.map +1 -1
- package/dist/languages/import-statement-parsers.d.ts +0 -30
- package/dist/languages/import-statement-parsers.d.ts.map +1 -1
- package/dist/languages/import-statement-parsers.js +1 -81
- package/dist/languages/import-statement-parsers.js.map +1 -1
- package/dist/languages/sfc.d.ts.map +1 -1
- package/dist/languages/sfc.js +8 -43
- package/dist/languages/sfc.js.map +1 -1
- package/dist/lifecycle/manifest.d.ts.map +1 -1
- package/dist/lifecycle/manifest.js +11 -29
- package/dist/lifecycle/manifest.js.map +1 -1
- package/dist/mcp/cancellation.d.ts +6 -0
- package/dist/mcp/cancellation.d.ts.map +1 -0
- package/dist/mcp/cancellation.js +11 -0
- package/dist/mcp/cancellation.js.map +1 -0
- package/dist/mcp/handlers.d.ts +54 -3
- package/dist/mcp/handlers.d.ts.map +1 -1
- package/dist/mcp/handlers.js +186 -42
- package/dist/mcp/handlers.js.map +1 -1
- package/dist/mcp/http-transport.d.ts.map +1 -1
- package/dist/mcp/http-transport.js +9 -2
- package/dist/mcp/http-transport.js.map +1 -1
- package/dist/mcp/index-readiness.d.ts +114 -0
- package/dist/mcp/index-readiness.d.ts.map +1 -0
- package/dist/mcp/index-readiness.js +264 -0
- package/dist/mcp/index-readiness.js.map +1 -0
- package/dist/mcp/project-watcher.d.ts +125 -0
- package/dist/mcp/project-watcher.d.ts.map +1 -0
- package/dist/mcp/project-watcher.js +643 -0
- package/dist/mcp/project-watcher.js.map +1 -0
- package/dist/mcp/protocol.d.ts.map +1 -1
- package/dist/mcp/protocol.js +23 -10
- package/dist/mcp/protocol.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +11 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stale-install.d.ts +13 -0
- package/dist/mcp/stale-install.d.ts.map +1 -0
- package/dist/mcp/stale-install.js +30 -0
- package/dist/mcp/stale-install.js.map +1 -0
- package/dist/native/byte-index.d.ts +1 -0
- package/dist/native/byte-index.d.ts.map +1 -1
- package/dist/native/byte-index.js +1 -1
- package/dist/native/byte-index.js.map +1 -1
- package/dist/native/contracts.d.ts +1 -0
- package/dist/native/contracts.d.ts.map +1 -1
- package/dist/native/native-backend-report.d.ts +2 -1
- package/dist/native/native-backend-report.d.ts.map +1 -1
- package/dist/native/native-backend-report.js +23 -0
- package/dist/native/native-backend-report.js.map +1 -1
- package/dist/native/tree-shape.d.ts +5 -7
- package/dist/native/tree-shape.d.ts.map +1 -1
- package/dist/native/tree-shape.js +11 -10
- package/dist/native/tree-shape.js.map +1 -1
- package/dist/presentation/bounds.d.ts +2 -0
- package/dist/presentation/bounds.d.ts.map +1 -1
- package/dist/presentation/bounds.js +8 -0
- package/dist/presentation/bounds.js.map +1 -1
- package/dist/review/candidates.d.ts.map +1 -1
- package/dist/review/candidates.js +4 -25
- package/dist/review/candidates.js.map +1 -1
- package/dist/review/deleted.js +1 -1
- package/dist/review/deleted.js.map +1 -1
- package/dist/review/report.d.ts.map +1 -1
- package/dist/review/report.js +4 -2
- package/dist/review/report.js.map +1 -1
- package/dist/review/summaries.d.ts.map +1 -1
- package/dist/review/summaries.js +14 -35
- package/dist/review/summaries.js.map +1 -1
- package/dist/review.d.ts +6 -0
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +5 -6
- package/dist/review.js.map +1 -1
- package/dist/scss/navigation.d.ts +13 -0
- package/dist/scss/navigation.d.ts.map +1 -0
- package/dist/scss/navigation.js +150 -0
- package/dist/scss/navigation.js.map +1 -0
- package/dist/scss/resolution.d.ts +190 -0
- package/dist/scss/resolution.d.ts.map +1 -0
- package/dist/scss/resolution.js +1802 -0
- package/dist/scss/resolution.js.map +1 -0
- package/dist/scss/syntax.d.ts +181 -0
- package/dist/scss/syntax.d.ts.map +1 -0
- package/dist/scss/syntax.js +1436 -0
- package/dist/scss/syntax.js.map +1 -0
- package/dist/sql/classify-sql-file.d.ts +7 -0
- package/dist/sql/classify-sql-file.d.ts.map +1 -1
- package/dist/sql/classify-sql-file.js +9 -0
- package/dist/sql/classify-sql-file.js.map +1 -1
- package/dist/sql/extract-facts.d.ts.map +1 -1
- package/dist/sql/extract-facts.js +517 -77
- package/dist/sql/extract-facts.js.map +1 -1
- package/dist/sql/lex.d.ts +100 -1
- package/dist/sql/lex.d.ts.map +1 -1
- package/dist/sql/lex.js +473 -11
- package/dist/sql/lex.js.map +1 -1
- package/dist/sql/lookup.d.ts +17 -0
- package/dist/sql/lookup.d.ts.map +1 -1
- package/dist/sql/lookup.js +21 -0
- package/dist/sql/lookup.js.map +1 -1
- package/dist/sql/navigation.d.ts +28 -1
- package/dist/sql/navigation.d.ts.map +1 -1
- package/dist/sql/navigation.js +474 -84
- package/dist/sql/navigation.js.map +1 -1
- package/dist/sql/object-mentions.d.ts +24 -0
- package/dist/sql/object-mentions.d.ts.map +1 -0
- package/dist/sql/object-mentions.js +233 -0
- package/dist/sql/object-mentions.js.map +1 -0
- package/dist/sql/review.d.ts +3 -0
- package/dist/sql/review.d.ts.map +1 -1
- package/dist/sql/review.js +15 -14
- package/dist/sql/review.js.map +1 -1
- package/dist/sql/routine-mentions.d.ts +61 -0
- package/dist/sql/routine-mentions.d.ts.map +1 -0
- package/dist/sql/routine-mentions.js +868 -0
- package/dist/sql/routine-mentions.js.map +1 -0
- package/dist/sql/source-graph.d.ts +18 -3
- package/dist/sql/source-graph.d.ts.map +1 -1
- package/dist/sql/source-graph.js +109 -32
- package/dist/sql/source-graph.js.map +1 -1
- package/dist/sqlite/raw-query-worker-pool.d.ts.map +1 -1
- package/dist/sqlite/raw-query-worker-pool.js +2 -0
- package/dist/sqlite/raw-query-worker-pool.js.map +1 -1
- package/dist/sqlite/types.d.ts +6 -5
- package/dist/sqlite/types.d.ts.map +1 -1
- package/dist/sqlite/write.d.ts.map +1 -1
- package/dist/sqlite/write.js.map +1 -1
- package/dist/sqlite-driver.d.ts +0 -1
- package/dist/sqlite-driver.d.ts.map +1 -1
- package/dist/sqlite-driver.js +0 -11
- package/dist/sqlite-driver.js.map +1 -1
- package/dist/terraform/navigation.d.ts.map +1 -1
- package/dist/terraform/navigation.js +1 -3
- package/dist/terraform/navigation.js.map +1 -1
- package/dist/terraform/syntax.d.ts.map +1 -1
- package/dist/terraform/syntax.js +1 -4
- package/dist/terraform/syntax.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/util/ast.d.ts +5 -0
- package/dist/util/ast.d.ts.map +1 -1
- package/dist/util/ast.js +10 -0
- package/dist/util/ast.js.map +1 -1
- package/dist/util/atomic-file.d.ts +22 -0
- package/dist/util/atomic-file.d.ts.map +1 -0
- package/dist/util/atomic-file.js +106 -0
- package/dist/util/atomic-file.js.map +1 -0
- package/dist/util/collections.d.ts +5 -0
- package/dist/util/collections.d.ts.map +1 -1
- package/dist/util/collections.js +26 -0
- package/dist/util/collections.js.map +1 -1
- package/dist/util/concurrency.d.ts +8 -0
- package/dist/util/concurrency.d.ts.map +1 -1
- package/dist/util/concurrency.js +16 -0
- package/dist/util/concurrency.js.map +1 -1
- package/dist/util/confined-file.d.ts.map +1 -1
- package/dist/util/confined-file.js +1 -3
- package/dist/util/confined-file.js.map +1 -1
- package/dist/util/csharp-tree.d.ts +65 -0
- package/dist/util/csharp-tree.d.ts.map +1 -0
- package/dist/util/csharp-tree.js +266 -0
- package/dist/util/csharp-tree.js.map +1 -0
- package/dist/util/errors.d.ts +1 -0
- package/dist/util/errors.d.ts.map +1 -1
- package/dist/util/errors.js +3 -0
- package/dist/util/errors.js.map +1 -1
- package/dist/util/graph-edges.d.ts +2 -0
- package/dist/util/graph-edges.d.ts.map +1 -1
- package/dist/util/graph-edges.js +11 -0
- package/dist/util/graph-edges.js.map +1 -1
- package/dist/util/guards.d.ts +1 -0
- package/dist/util/guards.d.ts.map +1 -1
- package/dist/util/guards.js +6 -0
- package/dist/util/guards.js.map +1 -1
- package/dist/util/identifiers.d.ts +0 -24
- package/dist/util/identifiers.d.ts.map +1 -1
- package/dist/util/identifiers.js +0 -24
- package/dist/util/identifiers.js.map +1 -1
- package/dist/util/jvm-tree.d.ts +58 -0
- package/dist/util/jvm-tree.d.ts.map +1 -0
- package/dist/util/jvm-tree.js +153 -0
- package/dist/util/jvm-tree.js.map +1 -0
- package/dist/util/package-exports.d.ts +0 -22
- package/dist/util/package-exports.d.ts.map +1 -1
- package/dist/util/package-exports.js +25 -5
- package/dist/util/package-exports.js.map +1 -1
- package/dist/util/paths.d.ts +1 -0
- package/dist/util/paths.d.ts.map +1 -1
- package/dist/util/paths.js +10 -4
- package/dist/util/paths.js.map +1 -1
- package/dist/util/resolution/csharp.d.ts +20 -8
- package/dist/util/resolution/csharp.d.ts.map +1 -1
- package/dist/util/resolution/csharp.js +126 -127
- package/dist/util/resolution/csharp.js.map +1 -1
- package/dist/util/resolution/files.d.ts +6 -0
- package/dist/util/resolution/files.d.ts.map +1 -1
- package/dist/util/resolution/files.js +74 -21
- package/dist/util/resolution/files.js.map +1 -1
- package/dist/util/resolution/jvm.d.ts +21 -1
- package/dist/util/resolution/jvm.d.ts.map +1 -1
- package/dist/util/resolution/jvm.js +168 -100
- package/dist/util/resolution/jvm.js.map +1 -1
- package/dist/util/resolution/project-symbols.d.ts +1 -1
- package/dist/util/resolution/project-symbols.d.ts.map +1 -1
- package/dist/util/resolution/project-symbols.js.map +1 -1
- package/dist/util/resolution/specifier-targets.d.ts +4 -0
- package/dist/util/resolution/specifier-targets.d.ts.map +1 -1
- package/dist/util/resolution/specifier-targets.js +11 -3
- package/dist/util/resolution/specifier-targets.js.map +1 -1
- package/dist/util/resolution.d.ts.map +1 -1
- package/dist/util/resolution.js +21 -7
- package/dist/util/resolution.js.map +1 -1
- package/dist/util/syntax-tree.d.ts +16 -0
- package/dist/util/syntax-tree.d.ts.map +1 -0
- package/dist/util/syntax-tree.js +34 -0
- package/dist/util/syntax-tree.js.map +1 -0
- package/dist/util/text-scanning.d.ts +6 -0
- package/dist/util/text-scanning.d.ts.map +1 -0
- package/dist/util/text-scanning.js +35 -0
- package/dist/util/text-scanning.js.map +1 -0
- package/dist/util/trivia-tables.d.ts +13 -8
- package/dist/util/trivia-tables.d.ts.map +1 -1
- package/dist/util/trivia-tables.js +13 -72
- package/dist/util/trivia-tables.js.map +1 -1
- package/dist/util/trivia.d.ts +10 -3
- package/dist/util/trivia.d.ts.map +1 -1
- package/dist/util/trivia.js +209 -79
- package/dist/util/trivia.js.map +1 -1
- package/dist/util/windows-process-drain.d.ts.map +1 -1
- package/dist/util/windows-process-drain.js.map +1 -1
- package/dist/util/worker-threads.d.ts +16 -0
- package/dist/util/worker-threads.d.ts.map +1 -1
- package/dist/util/worker-threads.js +118 -0
- package/dist/util/worker-threads.js.map +1 -1
- package/dist/worker/native-worker-pool.d.ts.map +1 -1
- package/dist/worker/native-worker-pool.js +2 -1
- package/dist/worker/native-worker-pool.js.map +1 -1
- package/docs/mcp.md +82 -8
- package/package.json +7 -7
|
@@ -148,17 +148,6 @@ var PYTHON_ROW = {
|
|
|
148
148
|
{ prefix: PYTHON_PLAIN_PREFIX, open: "'", close: "'", escape: "\\" }
|
|
149
149
|
]
|
|
150
150
|
};
|
|
151
|
-
var CSHARP_ROW = {
|
|
152
|
-
lineComments: ["//"],
|
|
153
|
-
blockComments: [SLASH_STAR_COMMENT],
|
|
154
|
-
strings: [
|
|
155
|
-
// A verbatim (or interpolated verbatim) string doubles its closing quote; the backslash is data.
|
|
156
|
-
{ prefix: "(?:[$][@]|[@][$]|[@])", open: '"', close: '"', doubled: true },
|
|
157
|
-
{ open: '"""', close: '"""', quoteRun: true },
|
|
158
|
-
{ open: '"', close: '"', escape: "\\" },
|
|
159
|
-
{ open: "'", close: "'", escape: "\\" }
|
|
160
|
-
]
|
|
161
|
-
};
|
|
162
151
|
var GO_ROW = {
|
|
163
152
|
lineComments: ["//"],
|
|
164
153
|
blockComments: [SLASH_STAR_COMMENT],
|
|
@@ -212,31 +201,16 @@ var SWIFT_ROW = {
|
|
|
212
201
|
{ hashes: true, open: '"', close: '"' }
|
|
213
202
|
]
|
|
214
203
|
};
|
|
215
|
-
var
|
|
216
|
-
lineComments: ["//"],
|
|
217
|
-
blockComments: [NESTED_SLASH_STAR_COMMENT],
|
|
218
|
-
strings: [
|
|
219
|
-
{ open: '"""', close: '"""', interpolation: { start: "${", end: "}" } },
|
|
220
|
-
{ open: '"', close: '"', escape: "\\", interpolation: { start: "${", end: "}" } },
|
|
221
|
-
{ open: "'", close: "'", escape: "\\" }
|
|
222
|
-
]
|
|
223
|
-
};
|
|
224
|
-
var ZIG_ROW = {
|
|
204
|
+
var SCSS_ROW = {
|
|
225
205
|
lineComments: ["//"],
|
|
226
|
-
blockComments: [],
|
|
227
|
-
strings: [
|
|
228
|
-
{ open: '"', close: '"', escape: "\\" },
|
|
229
|
-
{ open: "'", close: "'", escape: "\\" }
|
|
230
|
-
],
|
|
231
|
-
zigMultiline: true
|
|
232
|
-
};
|
|
233
|
-
var CSS_FAMILY_ROW = {
|
|
234
|
-
lineComments: [],
|
|
235
206
|
blockComments: [SLASH_STAR_COMMENT],
|
|
236
207
|
strings: [
|
|
237
|
-
{ open: "'", close: "'", escape: "\\" },
|
|
238
|
-
{ open: '"', close: '"', escape: "\\" }
|
|
239
|
-
]
|
|
208
|
+
{ open: "'", close: "'", escape: "\\", interpolation: { start: "#{", end: "}", excludeFromMask: true } },
|
|
209
|
+
{ open: '"', close: '"', escape: "\\", interpolation: { start: "#{", end: "}", excludeFromMask: true } }
|
|
210
|
+
],
|
|
211
|
+
unquotedCssUrl: true,
|
|
212
|
+
commentInterpolation: { start: "#{", end: "}", excludeFromMask: true },
|
|
213
|
+
unquotedEscapes: true
|
|
240
214
|
};
|
|
241
215
|
var C_FAMILY_ROW = {
|
|
242
216
|
lineComments: ["//"],
|
|
@@ -246,29 +220,6 @@ var C_FAMILY_ROW = {
|
|
|
246
220
|
{ open: "'", close: "'", escape: "\\" }
|
|
247
221
|
]
|
|
248
222
|
};
|
|
249
|
-
var JAVA_ROW = {
|
|
250
|
-
lineComments: ["//"],
|
|
251
|
-
blockComments: [SLASH_STAR_COMMENT],
|
|
252
|
-
strings: [
|
|
253
|
-
{ open: '"""', close: '"""', escape: "\\" },
|
|
254
|
-
{ open: '"', close: '"', escape: "\\" },
|
|
255
|
-
{ open: "'", close: "'", escape: "\\" }
|
|
256
|
-
]
|
|
257
|
-
};
|
|
258
|
-
var SQL_ROW = {
|
|
259
|
-
lineComments: ["--"],
|
|
260
|
-
blockComments: [SLASH_STAR_COMMENT],
|
|
261
|
-
strings: [
|
|
262
|
-
{ open: "'", close: "'", doubled: true },
|
|
263
|
-
{ open: '"', close: '"', doubled: true }
|
|
264
|
-
]
|
|
265
|
-
};
|
|
266
|
-
var TERRAFORM_ROW = {
|
|
267
|
-
lineComments: ["#", "//"],
|
|
268
|
-
blockComments: [SLASH_STAR_COMMENT],
|
|
269
|
-
strings: [{ open: '"', close: '"', escape: "\\", interpolation: { start: "${", end: "}" } }],
|
|
270
|
-
heredocs: [{ opener: "<<-?([A-Za-z_][A-Za-z0-9_-]*)", indentedTerminator: true }]
|
|
271
|
-
};
|
|
272
223
|
var TRIVIA_ROWS = {
|
|
273
224
|
js: JS_LIKE_ROW,
|
|
274
225
|
ts: JS_LIKE_ROW,
|
|
@@ -277,31 +228,49 @@ var TRIVIA_ROWS = {
|
|
|
277
228
|
typescript: JS_LIKE_ROW,
|
|
278
229
|
jsx: JS_LIKE_ROW,
|
|
279
230
|
python: PYTHON_ROW,
|
|
280
|
-
csharp: CSHARP_ROW,
|
|
281
231
|
go: GO_ROW,
|
|
282
232
|
rust: RUST_ROW,
|
|
283
233
|
php: PHP_ROW,
|
|
284
234
|
ruby: RUBY_ROW,
|
|
285
235
|
swift: SWIFT_ROW,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
css: CSS_FAMILY_ROW,
|
|
289
|
-
less: CSS_FAMILY_ROW,
|
|
290
|
-
scss: CSS_FAMILY_ROW,
|
|
291
|
-
c: C_FAMILY_ROW,
|
|
292
|
-
cpp: C_FAMILY_ROW,
|
|
293
|
-
java: JAVA_ROW,
|
|
294
|
-
sql: SQL_ROW,
|
|
295
|
-
terraform: TERRAFORM_ROW
|
|
236
|
+
scss: SCSS_ROW,
|
|
237
|
+
cpp: C_FAMILY_ROW
|
|
296
238
|
};
|
|
297
239
|
function triviaRowFor(languageId) {
|
|
298
240
|
return TRIVIA_ROWS[languageId] ?? JS_LIKE_ROW;
|
|
299
241
|
}
|
|
300
242
|
|
|
301
243
|
// dist/util/trivia.js
|
|
244
|
+
function isHexUnit(unit) {
|
|
245
|
+
return unit >= 48 && unit <= 57 || unit >= 65 && unit <= 70 || unit >= 97 && unit <= 102;
|
|
246
|
+
}
|
|
247
|
+
function skipScssEscape(source, index) {
|
|
248
|
+
const next = index + 1;
|
|
249
|
+
if (next >= source.length)
|
|
250
|
+
return source.length;
|
|
251
|
+
const unit = source.charCodeAt(next);
|
|
252
|
+
if (unit === 10 || unit === 12)
|
|
253
|
+
return next + 1;
|
|
254
|
+
if (unit === 13)
|
|
255
|
+
return source.charCodeAt(next + 1) === 10 ? next + 2 : next + 1;
|
|
256
|
+
if (isHexUnit(unit)) {
|
|
257
|
+
let cursor = next + 1;
|
|
258
|
+
const limit = Math.min(source.length, next + 6);
|
|
259
|
+
while (cursor < limit && isHexUnit(source.charCodeAt(cursor)))
|
|
260
|
+
cursor += 1;
|
|
261
|
+
const space = source.charCodeAt(cursor);
|
|
262
|
+
if (space === 32 || space === 9 || space === 10 || space === 12)
|
|
263
|
+
return cursor + 1;
|
|
264
|
+
if (space === 13)
|
|
265
|
+
return source.charCodeAt(cursor + 1) === 10 ? cursor + 2 : cursor + 1;
|
|
266
|
+
return cursor;
|
|
267
|
+
}
|
|
268
|
+
return next + 1;
|
|
269
|
+
}
|
|
302
270
|
function maskTrivia(source, languageId, options) {
|
|
303
271
|
const mask = buildMarkedMask(source, languageId, {
|
|
304
272
|
maskStrings: options?.maskStrings ?? true,
|
|
273
|
+
maskCssUrls: options?.maskCssUrls ?? false,
|
|
305
274
|
mode: "render"
|
|
306
275
|
});
|
|
307
276
|
let out = "";
|
|
@@ -331,14 +300,32 @@ function buildMarkedMask(source, languageId, options) {
|
|
|
331
300
|
const length = source.length;
|
|
332
301
|
let index = 0;
|
|
333
302
|
while (index < length) {
|
|
303
|
+
if (row.unquotedEscapes && source.charCodeAt(index) === 92) {
|
|
304
|
+
index = skipScssEscape(source, index);
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
334
307
|
if (!starters[source.charCodeAt(index)]) {
|
|
335
308
|
index += 1;
|
|
336
309
|
continue;
|
|
337
310
|
}
|
|
311
|
+
const cssUrl = row.unquotedCssUrl ? unquotedCssUrlConstruct(source, row, index) : null;
|
|
312
|
+
if (cssUrl !== null) {
|
|
313
|
+
if (options.maskCssUrls && options.maskStrings) {
|
|
314
|
+
for (const [start, end] of constructSpans(cssUrl, options.mode)) {
|
|
315
|
+
for (let i = start; i < end; i += 1)
|
|
316
|
+
mask[i] = 1;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
index = cssUrl.end;
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
338
322
|
const commentEnd = commentSpanEnd(source, row, index);
|
|
339
323
|
if (commentEnd !== null) {
|
|
340
|
-
|
|
341
|
-
|
|
324
|
+
const spans = options.mode === "holes" && row.commentInterpolation ? loudCommentMaskSpans(source, row, index, commentEnd) : [[index, commentEnd]];
|
|
325
|
+
for (const [start, end] of spans) {
|
|
326
|
+
for (let i = start; i < end; i += 1)
|
|
327
|
+
mask[i] = 1;
|
|
328
|
+
}
|
|
342
329
|
index = commentEnd;
|
|
343
330
|
continue;
|
|
344
331
|
}
|
|
@@ -371,6 +358,81 @@ function constructSpans(construct, mode) {
|
|
|
371
358
|
return construct.renderSpans;
|
|
372
359
|
return construct.maskSpans;
|
|
373
360
|
}
|
|
361
|
+
function isCssIdentifierUnit(unit) {
|
|
362
|
+
const isLetterOrDigit = unit >= 48 && unit <= 57 || unit >= 65 && unit <= 90 || unit >= 97 && unit <= 122;
|
|
363
|
+
return isLetterOrDigit || unit === 95 || unit === 45 || unit === 92 || unit >= 128;
|
|
364
|
+
}
|
|
365
|
+
function isCssSpaceUnit(unit) {
|
|
366
|
+
return unit === 32 || unit === 9 || unit === 10 || unit === 13 || unit === 12;
|
|
367
|
+
}
|
|
368
|
+
var CSS_URL_INTERPOLATION = {
|
|
369
|
+
start: "#{",
|
|
370
|
+
end: "}",
|
|
371
|
+
excludeFromMask: true
|
|
372
|
+
};
|
|
373
|
+
function unquotedCssUrlConstruct(source, row, index) {
|
|
374
|
+
if (source.charCodeAt(index + 3) !== 40 || (source.charCodeAt(index) | 32) !== 117 || (source.charCodeAt(index + 1) | 32) !== 114 || (source.charCodeAt(index + 2) | 32) !== 108) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
if (index > 0 && source.charCodeAt(index - 1) === 46)
|
|
378
|
+
return null;
|
|
379
|
+
if (index > 0 && isCssIdentifierUnit(source.charCodeAt(index - 1)))
|
|
380
|
+
return null;
|
|
381
|
+
const bodyStart = index + 4;
|
|
382
|
+
const holes = [];
|
|
383
|
+
const holeTrivia = [];
|
|
384
|
+
let cursor = bodyStart;
|
|
385
|
+
while (cursor < source.length && isCssSpaceUnit(source.charCodeAt(cursor)))
|
|
386
|
+
cursor += 1;
|
|
387
|
+
while (cursor < source.length) {
|
|
388
|
+
const unit = source.charCodeAt(cursor);
|
|
389
|
+
if (unit === 41) {
|
|
390
|
+
const maskSpans = [[index, bodyStart]];
|
|
391
|
+
let segmentStart = bodyStart;
|
|
392
|
+
for (const [holeStart, holeEnd] of holes) {
|
|
393
|
+
if (segmentStart < holeStart)
|
|
394
|
+
maskSpans.push([segmentStart, holeStart]);
|
|
395
|
+
segmentStart = holeEnd;
|
|
396
|
+
}
|
|
397
|
+
if (segmentStart < cursor)
|
|
398
|
+
maskSpans.push([segmentStart, cursor]);
|
|
399
|
+
for (const span of holeTrivia)
|
|
400
|
+
maskSpans.push(span);
|
|
401
|
+
maskSpans.push([cursor, cursor + 1]);
|
|
402
|
+
return {
|
|
403
|
+
start: index,
|
|
404
|
+
end: cursor + 1,
|
|
405
|
+
renderSpans: bodyStart < cursor ? [[bodyStart, cursor]] : [],
|
|
406
|
+
maskSpans,
|
|
407
|
+
delimitersAreTrivia: false
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if (isCssSpaceUnit(unit)) {
|
|
411
|
+
while (cursor < source.length && isCssSpaceUnit(source.charCodeAt(cursor)))
|
|
412
|
+
cursor += 1;
|
|
413
|
+
if (source.charCodeAt(cursor) !== 41)
|
|
414
|
+
return null;
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
if (unit === 92) {
|
|
418
|
+
cursor = skipScssEscape(source, cursor);
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (unit === 35 && source.charCodeAt(cursor + 1) === 123) {
|
|
422
|
+
const hole = collectInterpolationSpans(source, row, cursor, CSS_URL_INTERPOLATION);
|
|
423
|
+
holes.push([cursor, hole.end]);
|
|
424
|
+
for (const span of hole.spans)
|
|
425
|
+
holeTrivia.push(span);
|
|
426
|
+
cursor = hole.end;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
const isUrlUnit = unit === 33 || unit === 37 || unit === 38 || unit === 35 || unit >= 42 && unit <= 126 || unit >= 128;
|
|
430
|
+
if (!isUrlUnit)
|
|
431
|
+
return null;
|
|
432
|
+
cursor += 1;
|
|
433
|
+
}
|
|
434
|
+
return null;
|
|
435
|
+
}
|
|
374
436
|
var starterCache = /* @__PURE__ */ new WeakMap();
|
|
375
437
|
var prefixRegexCache = /* @__PURE__ */ new WeakMap();
|
|
376
438
|
var openerRegexCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -402,8 +464,10 @@ function rowStarterCodes(row) {
|
|
|
402
464
|
}
|
|
403
465
|
if (row.percentLiterals)
|
|
404
466
|
add("%");
|
|
405
|
-
if (row.
|
|
406
|
-
add("
|
|
467
|
+
if (row.unquotedCssUrl) {
|
|
468
|
+
add("u");
|
|
469
|
+
add("U");
|
|
470
|
+
}
|
|
407
471
|
starterCache.set(row, starters);
|
|
408
472
|
return starters;
|
|
409
473
|
}
|
|
@@ -451,11 +515,45 @@ function nextTriviaConstruct(source, row, index) {
|
|
|
451
515
|
if (percentConstruct !== null)
|
|
452
516
|
return percentConstruct;
|
|
453
517
|
}
|
|
454
|
-
if (row.zigMultiline && source.startsWith("\\\\", index)) {
|
|
455
|
-
return zigMultilineConstruct(source, index);
|
|
456
|
-
}
|
|
457
518
|
return null;
|
|
458
519
|
}
|
|
520
|
+
function loudCommentMaskSpans(source, row, index, commentEnd) {
|
|
521
|
+
const interpolation = row.commentInterpolation;
|
|
522
|
+
if (!interpolation || !source.startsWith("/*", index))
|
|
523
|
+
return [[index, commentEnd]];
|
|
524
|
+
const spans = [];
|
|
525
|
+
let cursor = index;
|
|
526
|
+
let segmentStart = index;
|
|
527
|
+
while (cursor < commentEnd) {
|
|
528
|
+
if (source.startsWith(interpolation.start, cursor)) {
|
|
529
|
+
if (segmentStart < cursor)
|
|
530
|
+
spans.push([segmentStart, cursor]);
|
|
531
|
+
const inner = collectInterpolationSpans(source, row, cursor, interpolation);
|
|
532
|
+
const end = Math.min(inner.end, commentEnd);
|
|
533
|
+
if (end <= cursor) {
|
|
534
|
+
cursor += 1;
|
|
535
|
+
segmentStart = cursor;
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
spans.push([cursor, Math.min(cursor + interpolation.start.length, end)]);
|
|
539
|
+
for (const span of inner.spans) {
|
|
540
|
+
const start = Math.max(span[0], cursor);
|
|
541
|
+
const stop = Math.min(span[1], end);
|
|
542
|
+
if (start < stop)
|
|
543
|
+
spans.push([start, stop]);
|
|
544
|
+
}
|
|
545
|
+
if (end > cursor && end <= commentEnd && source.charCodeAt(end - 1) === 125)
|
|
546
|
+
spans.push([end - 1, end]);
|
|
547
|
+
cursor = end;
|
|
548
|
+
segmentStart = cursor;
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
cursor += 1;
|
|
552
|
+
}
|
|
553
|
+
if (segmentStart < commentEnd)
|
|
554
|
+
spans.push([segmentStart, commentEnd]);
|
|
555
|
+
return spans;
|
|
556
|
+
}
|
|
459
557
|
function commentSpanEnd(source, row, index) {
|
|
460
558
|
for (const prefix of row.lineComments) {
|
|
461
559
|
if (source.startsWith(prefix, index))
|
|
@@ -559,22 +657,6 @@ function quotedStringConstruct(source, row, form, index) {
|
|
|
559
657
|
maskSpans: [[index, charEnd]],
|
|
560
658
|
delimitersAreTrivia: false
|
|
561
659
|
};
|
|
562
|
-
} else if (form.quoteRun) {
|
|
563
|
-
let run = 0;
|
|
564
|
-
while (source[cursor + run] === form.open[0])
|
|
565
|
-
run += 1;
|
|
566
|
-
if (run < form.open.length)
|
|
567
|
-
return null;
|
|
568
|
-
const scanned = quoteRunStringEnd(source, cursor + run, form.open[0] ?? '"', run);
|
|
569
|
-
const bodyStart2 = cursor + run;
|
|
570
|
-
const body2 = [bodyStart2, scanned.closeStart];
|
|
571
|
-
return {
|
|
572
|
-
start: index,
|
|
573
|
-
end: scanned.end,
|
|
574
|
-
renderSpans: body2[0] < body2[1] ? [body2] : [],
|
|
575
|
-
maskSpans: [[index, scanned.end]],
|
|
576
|
-
delimitersAreTrivia: false
|
|
577
|
-
};
|
|
578
660
|
} else {
|
|
579
661
|
if (!source.startsWith(form.open, cursor))
|
|
580
662
|
return null;
|
|
@@ -610,6 +692,8 @@ function collectQuotedBody(source, row, form, start, close, hashCount) {
|
|
|
610
692
|
if (interpolation.excludeFromMask) {
|
|
611
693
|
pushSegment(cursor);
|
|
612
694
|
const inner = collectInterpolationSpans(source, row, cursor, interpolation);
|
|
695
|
+
for (const span of inner.spans)
|
|
696
|
+
segments.push(span);
|
|
613
697
|
cursor = inner.end;
|
|
614
698
|
segmentStart = cursor;
|
|
615
699
|
continue;
|
|
@@ -664,22 +748,6 @@ function charLiteralEnd(source, quoteIndex, form) {
|
|
|
664
748
|
return cursor + 2;
|
|
665
749
|
return null;
|
|
666
750
|
}
|
|
667
|
-
function quoteRunStringEnd(source, index, quote, runLength) {
|
|
668
|
-
let cursor = index;
|
|
669
|
-
while (cursor < source.length) {
|
|
670
|
-
if (source[cursor] !== quote) {
|
|
671
|
-
cursor += 1;
|
|
672
|
-
continue;
|
|
673
|
-
}
|
|
674
|
-
let run = 0;
|
|
675
|
-
while (source[cursor + run] === quote)
|
|
676
|
-
run += 1;
|
|
677
|
-
if (run >= runLength)
|
|
678
|
-
return { end: cursor + run, closeStart: cursor };
|
|
679
|
-
cursor += run;
|
|
680
|
-
}
|
|
681
|
-
return { end: source.length, closeStart: source.length };
|
|
682
|
-
}
|
|
683
751
|
function closeAloneOnItsLine(source, closeIndex) {
|
|
684
752
|
const lineStart = source.lastIndexOf("\n", closeIndex - 1) + 1;
|
|
685
753
|
for (let i = lineStart; i < closeIndex; i += 1) {
|
|
@@ -698,7 +766,19 @@ function collectInterpolationSpans(source, row, start, interpolation) {
|
|
|
698
766
|
let depth = 1;
|
|
699
767
|
let cursor = start + interpolation.start.length;
|
|
700
768
|
while (cursor < source.length) {
|
|
769
|
+
if (row.unquotedCssUrl) {
|
|
770
|
+
const cssUrl = unquotedCssUrlConstruct(source, row, cursor);
|
|
771
|
+
if (cssUrl !== null) {
|
|
772
|
+
spans.push(...cssUrl.maskSpans);
|
|
773
|
+
cursor = cssUrl.end;
|
|
774
|
+
continue;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
701
777
|
const ch = source[cursor];
|
|
778
|
+
if (row.unquotedEscapes && ch === "\\") {
|
|
779
|
+
cursor = skipScssEscape(source, cursor);
|
|
780
|
+
continue;
|
|
781
|
+
}
|
|
702
782
|
if (source.startsWith(interpolation.end, cursor)) {
|
|
703
783
|
depth -= 1;
|
|
704
784
|
if (!depth)
|
|
@@ -838,39 +918,6 @@ function percentLiteralConstructAt(source, index) {
|
|
|
838
918
|
delimitersAreTrivia: false
|
|
839
919
|
};
|
|
840
920
|
}
|
|
841
|
-
function zigMultilineConstruct(source, start) {
|
|
842
|
-
const renderSpans = [];
|
|
843
|
-
let cursor = start;
|
|
844
|
-
let end = source.length;
|
|
845
|
-
while (cursor < source.length) {
|
|
846
|
-
let lineEnd = cursor;
|
|
847
|
-
while (lineEnd < source.length && source[lineEnd] !== "\n")
|
|
848
|
-
lineEnd += 1;
|
|
849
|
-
if (cursor + 2 < lineEnd)
|
|
850
|
-
renderSpans.push([cursor + 2, lineEnd]);
|
|
851
|
-
if (lineEnd >= source.length) {
|
|
852
|
-
end = source.length;
|
|
853
|
-
break;
|
|
854
|
-
}
|
|
855
|
-
let probe = lineEnd + 1;
|
|
856
|
-
while (probe < source.length && (source[probe] === " " || source[probe] === " " || source[probe] === "\r")) {
|
|
857
|
-
probe += 1;
|
|
858
|
-
}
|
|
859
|
-
if (source[probe] === "\\" && source[probe + 1] === "\\") {
|
|
860
|
-
cursor = probe;
|
|
861
|
-
continue;
|
|
862
|
-
}
|
|
863
|
-
end = lineEnd;
|
|
864
|
-
break;
|
|
865
|
-
}
|
|
866
|
-
return {
|
|
867
|
-
start,
|
|
868
|
-
end,
|
|
869
|
-
renderSpans,
|
|
870
|
-
maskSpans: [[start, end]],
|
|
871
|
-
delimitersAreTrivia: false
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
921
|
|
|
875
922
|
// dist/util/comments.js
|
|
876
923
|
function stripJsLikeComments(src) {
|
|
@@ -1431,10 +1478,7 @@ function normalizeCsharpIdentifier(name) {
|
|
|
1431
1478
|
const withoutVerbatimPrefix = name.startsWith("@") ? name.slice(1) : name;
|
|
1432
1479
|
return hasNonAsciiCodePoint(withoutVerbatimPrefix) ? withoutVerbatimPrefix.replace(CSHARP_IDENTIFIER_FORMAT_PATTERN, "") : withoutVerbatimPrefix;
|
|
1433
1480
|
}
|
|
1434
|
-
var JAVA_IDENTIFIER_SOURCE = String.raw`[\p{L}\p{Nl}\p{Sc}\p{Pc}][\p{L}\p{Nl}\p{Sc}\p{Pc}\p{Nd}\p{Mn}\p{Mc}${JAVA_IDENTIFIER_IGNORABLE_SOURCE}]*`;
|
|
1435
|
-
var CSHARP_IDENTIFIER_SOURCE = String.raw`@?[\p{L}\p{Nl}_][\p{L}\p{Nl}_\p{Nd}\p{Pc}\p{Mn}\p{Mc}${CSHARP_IDENTIFIER_FORMAT_SOURCE}]*`;
|
|
1436
1481
|
var GO_IDENTIFIER_SOURCE = String.raw`[\p{L}_][\p{L}\p{Nd}_]*`;
|
|
1437
|
-
var KOTLIN_IDENTIFIER_SOURCE = String.raw`[\p{L}_][\p{L}\p{Nd}_]*`;
|
|
1438
1482
|
|
|
1439
1483
|
// dist/languages/definitions/python.js
|
|
1440
1484
|
function isTypeAliasLeftName(node) {
|
|
@@ -1467,7 +1511,7 @@ function isPythonReceiverAttributeAssignmentName(node) {
|
|
|
1467
1511
|
const assignment = attr.parent;
|
|
1468
1512
|
if (assignment?.type !== "assignment")
|
|
1469
1513
|
return false;
|
|
1470
|
-
return assignment.childForFieldName("left")?.id === attr.id;
|
|
1514
|
+
return assignment.childForFieldName("left")?.id === attr.id && !!assignment.childForFieldName("right");
|
|
1471
1515
|
}
|
|
1472
1516
|
var PYTHON_GRAPH_IMPORT_QUERY = `
|
|
1473
1517
|
(import_statement name: (dotted_name) @from) @stmt
|
|
@@ -1578,10 +1622,12 @@ var PYTHON_DEF = {
|
|
|
1578
1622
|
(assignment left: [(pattern_list (identifier) @name) (tuple_pattern (identifier) @name)])
|
|
1579
1623
|
;; Instance / class attributes declared as \`self.x = ...\` or \`cls.x = ...\`.
|
|
1580
1624
|
((assignment
|
|
1581
|
-
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1625
|
+
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1626
|
+
right: (_))
|
|
1582
1627
|
(#eq? @receiver "self"))
|
|
1583
1628
|
((assignment
|
|
1584
|
-
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1629
|
+
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1630
|
+
right: (_))
|
|
1585
1631
|
(#eq? @receiver "cls"))
|
|
1586
1632
|
(named_expression name: (identifier) @name)
|
|
1587
1633
|
(type_alias_statement left: (type [(identifier) @name (generic_type (identifier) @name)]))
|
|
@@ -2255,10 +2301,6 @@ registerLanguage(GO_DEF);
|
|
|
2255
2301
|
|
|
2256
2302
|
// dist/languages/definitions/java.js
|
|
2257
2303
|
var JAVA_IDENTIFIER_IGNORABLE_PATTERN = new RegExp(`[${JAVA_IDENTIFIER_IGNORABLE_SOURCE}]`, "gu");
|
|
2258
|
-
var JAVA_IMPORT_QUERY = `
|
|
2259
|
-
(import_declaration (scoped_identifier) @from (asterisk)? @wild) @stmt
|
|
2260
|
-
(import_declaration (identifier) @from (asterisk)? @wild) @stmt
|
|
2261
|
-
`;
|
|
2262
2304
|
var JAVA_DEF = {
|
|
2263
2305
|
id: "java",
|
|
2264
2306
|
extensions: [".java"],
|
|
@@ -2305,7 +2347,8 @@ var JAVA_DEF = {
|
|
|
2305
2347
|
comments: ["line_comment", "block_comment"]
|
|
2306
2348
|
},
|
|
2307
2349
|
graph: {
|
|
2308
|
-
imports
|
|
2350
|
+
// Java imports are read from the syntax tree (src/util/jvm-tree.ts), so no imports query runs.
|
|
2351
|
+
imports: "",
|
|
2309
2352
|
exports: `
|
|
2310
2353
|
(class_declaration name: (identifier) @name)
|
|
2311
2354
|
(record_declaration name: (identifier) @name)
|
|
@@ -2329,7 +2372,8 @@ var JAVA_DEF = {
|
|
|
2329
2372
|
(spread_parameter (variable_declarator name: (identifier) @name))
|
|
2330
2373
|
(receiver_parameter (identifier) @name)
|
|
2331
2374
|
`,
|
|
2332
|
-
|
|
2375
|
+
// Java imports are read from the syntax tree (src/util/jvm-tree.ts), so no import-binding query runs.
|
|
2376
|
+
importBindings: ""
|
|
2333
2377
|
},
|
|
2334
2378
|
nodeTypes: {
|
|
2335
2379
|
identifier: ["identifier", "type_identifier"],
|
|
@@ -2426,12 +2470,8 @@ var CSHARP_DEF = {
|
|
|
2426
2470
|
comments: ["comment"]
|
|
2427
2471
|
},
|
|
2428
2472
|
graph: {
|
|
2429
|
-
//
|
|
2430
|
-
|
|
2431
|
-
imports: `
|
|
2432
|
-
(using_directive !name (_) @from) @stmt
|
|
2433
|
-
(using_directive name: (identifier) (_) @from) @stmt
|
|
2434
|
-
`,
|
|
2473
|
+
// C# using directives are read from the syntax tree (src/util/csharp-tree.ts), so no imports query runs.
|
|
2474
|
+
imports: "",
|
|
2435
2475
|
exports: `
|
|
2436
2476
|
(class_declaration name: (identifier) @name)
|
|
2437
2477
|
(record_declaration name: (identifier) @name)
|
|
@@ -2462,13 +2502,9 @@ var CSHARP_DEF = {
|
|
|
2462
2502
|
(variable_declarator name: (identifier) @name)
|
|
2463
2503
|
(declaration_pattern name: (identifier) @name)
|
|
2464
2504
|
`,
|
|
2465
|
-
// extern
|
|
2466
|
-
//
|
|
2467
|
-
importBindings:
|
|
2468
|
-
(using_directive name: (identifier) @alias (_) @from) @stmt
|
|
2469
|
-
(using_directive !name (_) @from) @stmt
|
|
2470
|
-
(extern_alias_directive name: (identifier) @alias) @stmt
|
|
2471
|
-
`
|
|
2505
|
+
// C# using and extern-alias directives are read from the syntax tree (src/util/csharp-tree.ts), so no
|
|
2506
|
+
// import-binding query runs.
|
|
2507
|
+
importBindings: ""
|
|
2472
2508
|
},
|
|
2473
2509
|
nodeTypes: {
|
|
2474
2510
|
identifier: ["identifier"],
|
|
@@ -3096,9 +3132,8 @@ var KOTLIN_DEF = {
|
|
|
3096
3132
|
comments: ["line_comment", "block_comment"]
|
|
3097
3133
|
},
|
|
3098
3134
|
graph: {
|
|
3099
|
-
imports
|
|
3100
|
-
|
|
3101
|
-
`,
|
|
3135
|
+
// Kotlin imports are read from the syntax tree (src/util/jvm-tree.ts), so no imports query runs.
|
|
3136
|
+
imports: "",
|
|
3102
3137
|
exports: `
|
|
3103
3138
|
(source_file
|
|
3104
3139
|
[
|
|
@@ -3129,11 +3164,8 @@ var KOTLIN_DEF = {
|
|
|
3129
3164
|
(class_parameter (identifier) @name)
|
|
3130
3165
|
(type_parameter (identifier) @name)
|
|
3131
3166
|
`,
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
(import (qualified_identifier) @from ("*") @wild) @stmt
|
|
3135
|
-
(import (qualified_identifier) @from) @stmt
|
|
3136
|
-
`
|
|
3167
|
+
// Kotlin imports are read from the syntax tree (src/util/jvm-tree.ts), so no import-binding query runs.
|
|
3168
|
+
importBindings: ""
|
|
3137
3169
|
},
|
|
3138
3170
|
nodeTypes: {
|
|
3139
3171
|
identifier: ["identifier"],
|
|
@@ -3689,30 +3721,16 @@ var ZIG_DEF = {
|
|
|
3689
3721
|
registerLanguage(ZIG_DEF);
|
|
3690
3722
|
|
|
3691
3723
|
// dist/bootstrap/tree-sitter-languages.js
|
|
3692
|
-
var
|
|
3724
|
+
var CHUNK_LANGUAGE_ALIASES = {
|
|
3693
3725
|
js: "javascript",
|
|
3694
|
-
ts: "typescript"
|
|
3695
|
-
tsx: "tsx",
|
|
3696
|
-
python: "python",
|
|
3697
|
-
php: "php",
|
|
3698
|
-
html: "html",
|
|
3699
|
-
css: "css",
|
|
3700
|
-
scss: "scss",
|
|
3701
|
-
less: "less",
|
|
3702
|
-
ruby: "ruby",
|
|
3703
|
-
go: "go",
|
|
3704
|
-
java: "java",
|
|
3705
|
-
csharp: "csharp",
|
|
3706
|
-
rust: "rust",
|
|
3707
|
-
c: "c",
|
|
3708
|
-
cpp: "cpp",
|
|
3709
|
-
kotlin: "kotlin",
|
|
3710
|
-
swift: "swift",
|
|
3711
|
-
zig: "zig"
|
|
3726
|
+
ts: "typescript"
|
|
3712
3727
|
};
|
|
3728
|
+
function chunkLanguageKey(id) {
|
|
3729
|
+
return CHUNK_LANGUAGE_ALIASES[id] ?? id;
|
|
3730
|
+
}
|
|
3713
3731
|
var LANG_CONFIGS = {};
|
|
3714
3732
|
for (const lang of getAllLanguages()) {
|
|
3715
|
-
const key =
|
|
3733
|
+
const key = chunkLanguageKey(lang.id);
|
|
3716
3734
|
if (lang.id === "vue" || lang.id === "svelte" || lang.id === "markdown" || lang.id === "mdx" || lang.id === "astro" || lang.id === "hbs" || lang.id === "rst" || lang.id === "adoc") {
|
|
3717
3735
|
continue;
|
|
3718
3736
|
}
|
|
@@ -3780,9 +3798,6 @@ function collectChunkBlockGroups(language, matches) {
|
|
|
3780
3798
|
return { mainBlocks, innerBlocks, comments };
|
|
3781
3799
|
}
|
|
3782
3800
|
|
|
3783
|
-
// dist/chunking/chunk-matches.js
|
|
3784
|
-
import { Buffer as Buffer2 } from "node:buffer";
|
|
3785
|
-
|
|
3786
3801
|
// dist/languages.js
|
|
3787
3802
|
import fs from "node:fs";
|
|
3788
3803
|
import path from "node:path";
|
|
@@ -3906,6 +3921,58 @@ function isLikelyCppHeader(sample) {
|
|
|
3906
3921
|
return CPP_HEADER_HINT.test(masked) || CPP_MODULE_IMPORT_HINT.test(masked);
|
|
3907
3922
|
}
|
|
3908
3923
|
|
|
3924
|
+
// dist/native/byte-index.js
|
|
3925
|
+
var EMPTY_BYTE_TO_STRING_INDEX = new Uint32Array(0);
|
|
3926
|
+
var EMPTY_LINE_START_BYTES = [];
|
|
3927
|
+
function buildByteMap(source) {
|
|
3928
|
+
const byteLength = Buffer.byteLength(source, "utf8");
|
|
3929
|
+
if (byteLength === source.length) {
|
|
3930
|
+
return {
|
|
3931
|
+
isAscii: true,
|
|
3932
|
+
sourceLength: source.length,
|
|
3933
|
+
byteToStringIndex: EMPTY_BYTE_TO_STRING_INDEX,
|
|
3934
|
+
lineStartBytes: EMPTY_LINE_START_BYTES
|
|
3935
|
+
};
|
|
3936
|
+
}
|
|
3937
|
+
const byteToStringIndex = new Uint32Array(byteLength + 1);
|
|
3938
|
+
const lineStartBytes = [0];
|
|
3939
|
+
let byteOffset = 0;
|
|
3940
|
+
let stringIndex = 0;
|
|
3941
|
+
while (stringIndex < source.length) {
|
|
3942
|
+
const codePoint = source.codePointAt(stringIndex);
|
|
3943
|
+
if (codePoint === void 0)
|
|
3944
|
+
break;
|
|
3945
|
+
const charStringLength = codePoint > 65535 ? 2 : 1;
|
|
3946
|
+
const charByteLength = utf8ByteLengthForCodePoint(codePoint);
|
|
3947
|
+
for (let offset = 1; offset < charByteLength; offset += 1) {
|
|
3948
|
+
byteToStringIndex[byteOffset + offset] = stringIndex;
|
|
3949
|
+
}
|
|
3950
|
+
byteOffset += charByteLength;
|
|
3951
|
+
stringIndex += charStringLength;
|
|
3952
|
+
byteToStringIndex[byteOffset] = stringIndex;
|
|
3953
|
+
if (codePoint === 10) {
|
|
3954
|
+
lineStartBytes.push(byteOffset);
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
byteToStringIndex[byteOffset] = source.length;
|
|
3958
|
+
return { isAscii: false, sourceLength: source.length, byteToStringIndex, lineStartBytes };
|
|
3959
|
+
}
|
|
3960
|
+
function stringIndexForByte(map, byteIndex) {
|
|
3961
|
+
if (map.isAscii)
|
|
3962
|
+
return Math.max(0, Math.min(byteIndex, map.sourceLength));
|
|
3963
|
+
const bounded = Math.max(0, Math.min(byteIndex, map.byteToStringIndex.length - 1));
|
|
3964
|
+
return map.byteToStringIndex[bounded] ?? map.sourceLength;
|
|
3965
|
+
}
|
|
3966
|
+
function utf8ByteLengthForCodePoint(codePoint) {
|
|
3967
|
+
if (codePoint <= 127)
|
|
3968
|
+
return 1;
|
|
3969
|
+
if (codePoint <= 2047)
|
|
3970
|
+
return 2;
|
|
3971
|
+
if (codePoint <= 65535)
|
|
3972
|
+
return 3;
|
|
3973
|
+
return 4;
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3909
3976
|
// dist/native/runtime.js
|
|
3910
3977
|
import fs5 from "node:fs";
|
|
3911
3978
|
import path5 from "node:path";
|
|
@@ -4947,61 +5014,25 @@ function getChunkMatches(language, source, _filePath) {
|
|
|
4947
5014
|
if (support) {
|
|
4948
5015
|
const nativeExecution = getNativeSingleQueryExecution(source, support, language.queryText);
|
|
4949
5016
|
if (nativeExecution.matches) {
|
|
4950
|
-
const
|
|
4951
|
-
return nativeExecution.matches.map((match) => toChunkMatchFromNative(match,
|
|
5017
|
+
const byteMap = buildByteMap(source);
|
|
5018
|
+
return nativeExecution.matches.map((match) => toChunkMatchFromNative(match, byteMap));
|
|
4952
5019
|
}
|
|
4953
5020
|
}
|
|
4954
5021
|
return [];
|
|
4955
5022
|
}
|
|
4956
|
-
function toChunkMatchFromNative(match,
|
|
5023
|
+
function toChunkMatchFromNative(match, byteMap) {
|
|
4957
5024
|
return {
|
|
4958
5025
|
captures: match.captures.map((capture) => ({
|
|
4959
5026
|
name: capture.name,
|
|
4960
5027
|
text: capture.text,
|
|
4961
|
-
startByte:
|
|
4962
|
-
endByte:
|
|
5028
|
+
startByte: stringIndexForByte(byteMap, capture.start.index),
|
|
5029
|
+
endByte: stringIndexForByte(byteMap, capture.end.index),
|
|
4963
5030
|
startLine: capture.start.row + 1,
|
|
4964
5031
|
endLine: capture.end.row + 1,
|
|
4965
5032
|
nodeType: capture.nodeType
|
|
4966
5033
|
}))
|
|
4967
5034
|
};
|
|
4968
5035
|
}
|
|
4969
|
-
function createUtf8ByteToStringIndex(source) {
|
|
4970
|
-
const utf8Length = Buffer2.byteLength(source, "utf8");
|
|
4971
|
-
if (utf8Length === source.length) {
|
|
4972
|
-
return (byteOffset2) => Math.max(0, Math.min(byteOffset2, source.length));
|
|
4973
|
-
}
|
|
4974
|
-
const byteToStringIndex = new Uint32Array(utf8Length + 1);
|
|
4975
|
-
let byteOffset = 0;
|
|
4976
|
-
let stringIndex = 0;
|
|
4977
|
-
while (stringIndex < source.length) {
|
|
4978
|
-
const codePoint = source.codePointAt(stringIndex);
|
|
4979
|
-
if (codePoint === void 0)
|
|
4980
|
-
break;
|
|
4981
|
-
const charStringLength = codePoint > 65535 ? 2 : 1;
|
|
4982
|
-
const charByteLength = utf8ByteLengthForCodePoint(codePoint);
|
|
4983
|
-
for (let offset = 1; offset < charByteLength; offset += 1) {
|
|
4984
|
-
byteToStringIndex[byteOffset + offset] = stringIndex;
|
|
4985
|
-
}
|
|
4986
|
-
byteOffset += charByteLength;
|
|
4987
|
-
stringIndex += charStringLength;
|
|
4988
|
-
byteToStringIndex[byteOffset] = stringIndex;
|
|
4989
|
-
}
|
|
4990
|
-
byteToStringIndex[byteOffset] = source.length;
|
|
4991
|
-
return (index) => {
|
|
4992
|
-
const bounded = Math.max(0, Math.min(index, byteToStringIndex.length - 1));
|
|
4993
|
-
return byteToStringIndex[bounded] ?? source.length;
|
|
4994
|
-
};
|
|
4995
|
-
}
|
|
4996
|
-
function utf8ByteLengthForCodePoint(codePoint) {
|
|
4997
|
-
if (codePoint <= 127)
|
|
4998
|
-
return 1;
|
|
4999
|
-
if (codePoint <= 2047)
|
|
5000
|
-
return 2;
|
|
5001
|
-
if (codePoint <= 65535)
|
|
5002
|
-
return 3;
|
|
5003
|
-
return 4;
|
|
5004
|
-
}
|
|
5005
5036
|
|
|
5006
5037
|
// dist/chunking/chunk-id.js
|
|
5007
5038
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -5460,10 +5491,6 @@ function collectNewlineOffsets(source) {
|
|
|
5460
5491
|
|
|
5461
5492
|
// dist/agent/query-index/content.js
|
|
5462
5493
|
var MAX_QUERY_INDEX_TEXT_BYTES = 3e5;
|
|
5463
|
-
var CHUNK_LANGUAGE_ALIASES = {
|
|
5464
|
-
js: "javascript",
|
|
5465
|
-
ts: "typescript"
|
|
5466
|
-
};
|
|
5467
5494
|
function compressQueryText(text) {
|
|
5468
5495
|
const compressed = brotliCompressSync(text, {
|
|
5469
5496
|
params: { [zlibConstants.BROTLI_PARAM_QUALITY]: 4 }
|
|
@@ -5484,7 +5511,7 @@ function detectQueryIndexSurface(relativePath) {
|
|
|
5484
5511
|
return "code";
|
|
5485
5512
|
}
|
|
5486
5513
|
function chunkQueryText(file, text, support) {
|
|
5487
|
-
const languageId = support ?
|
|
5514
|
+
const languageId = support ? chunkLanguageKey(support.id) : void 0;
|
|
5488
5515
|
const language = languageId ? LANG_CONFIGS[languageId] : void 0;
|
|
5489
5516
|
if (language) {
|
|
5490
5517
|
try {
|