@lzehrung/codegraph 3.0.0 → 3.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/README.md +19 -17
- package/codegraph-skill/codegraph/SKILL.md +3 -0
- 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 +12 -11
- 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 +218 -26
- package/dist/agent/rename-preview.js.map +1 -1
- package/dist/agent/search.d.ts.map +1 -1
- package/dist/agent/search.js +7 -22
- 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 +36572 -22925
- package/dist/bin/query-index-worker.js +440 -261
- 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 +3 -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/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 +7 -5
- 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 +1 -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 +2 -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/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 +7 -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/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/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/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 +2 -1
- package/dist/duplicates/units.d.ts.map +1 -1
- package/dist/duplicates/units.js +23 -22
- package/dist/duplicates/units.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/graphs/symbol-graph.d.ts +1 -1
- package/dist/graphs/symbol-graph.d.ts.map +1 -1
- package/dist/graphs/symbol-graph.js +8 -0
- package/dist/graphs/symbol-graph.js.map +1 -1
- package/dist/impact/analyzer.d.ts.map +1 -1
- package/dist/impact/analyzer.js +116 -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/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/impact/transitive.d.ts +6 -2
- package/dist/impact/transitive.d.ts.map +1 -1
- package/dist/impact/transitive.js +23 -11
- package/dist/impact/transitive.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 +40 -1
- package/dist/indexer/build-cache/options.d.ts.map +1 -1
- package/dist/indexer/build-cache/options.js +40 -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 +52 -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/declarations.d.ts.map +1 -1
- package/dist/indexer/declarations.js +32 -7
- package/dist/indexer/declarations.js.map +1 -1
- package/dist/indexer/import-resolution-tables.d.ts.map +1 -1
- package/dist/indexer/import-resolution-tables.js +10 -0
- package/dist/indexer/import-resolution-tables.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 +182 -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/locals-and-exports.d.ts.map +1 -1
- package/dist/indexer/locals-and-exports.js +8 -0
- package/dist/indexer/locals-and-exports.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 +429 -109
- 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/reference-context.d.ts.map +1 -1
- package/dist/indexer/reference-context.js +4 -1
- package/dist/indexer/reference-context.js.map +1 -1
- package/dist/indexer/scope-nodes.d.ts.map +1 -1
- package/dist/indexer/scope-nodes.js +5 -0
- package/dist/indexer/scope-nodes.js.map +1 -1
- 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 +54 -2
- package/dist/indexer/types.d.ts.map +1 -1
- package/dist/indexer/types.js +4 -0
- 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/all.d.ts +1 -0
- package/dist/languages/all.d.ts.map +1 -1
- package/dist/languages/all.js +1 -0
- package/dist/languages/all.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/definitions/terraform.d.ts +9 -0
- package/dist/languages/definitions/terraform.d.ts.map +1 -0
- package/dist/languages/definitions/terraform.js +84 -0
- package/dist/languages/definitions/terraform.js.map +1 -0
- 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/languages.d.ts +1 -0
- package/dist/languages.d.ts.map +1 -1
- package/dist/languages.js +1 -0
- package/dist/languages.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/handlers.d.ts +21 -0
- package/dist/mcp/handlers.d.ts.map +1 -1
- package/dist/mcp/handlers.js +66 -20
- package/dist/mcp/handlers.js.map +1 -1
- package/dist/mcp/http-transport.d.ts.map +1 -1
- package/dist/mcp/http-transport.js +5 -1
- package/dist/mcp/http-transport.js.map +1 -1
- 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/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -1
- package/dist/mcp/server.js.map +1 -1
- 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/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.map +1 -1
- package/dist/review.js +4 -5
- 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 +20 -0
- package/dist/terraform/navigation.d.ts.map +1 -0
- package/dist/terraform/navigation.js +140 -0
- package/dist/terraform/navigation.js.map +1 -0
- package/dist/terraform/resolution.d.ts +82 -0
- package/dist/terraform/resolution.d.ts.map +1 -0
- package/dist/terraform/resolution.js +324 -0
- package/dist/terraform/resolution.js.map +1 -0
- package/dist/terraform/syntax.d.ts +109 -0
- package/dist/terraform/syntax.d.ts.map +1 -0
- package/dist/terraform/syntax.js +438 -0
- package/dist/terraform/syntax.js.map +1 -0
- 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 +1 -0
- package/dist/util/concurrency.d.ts.map +1 -1
- package/dist/util/concurrency.js +5 -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/member-access-tables.d.ts.map +1 -1
- package/dist/util/member-access-tables.js +3 -0
- package/dist/util/member-access-tables.js.map +1 -1
- 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/project-files.d.ts.map +1 -1
- package/dist/util/project-files.js +3 -1
- package/dist/util/project-files.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 +16 -3
- package/dist/util/resolution/specifier-targets.js.map +1 -1
- package/dist/util/resolution/terraform.d.ts +18 -0
- package/dist/util/resolution/terraform.d.ts.map +1 -0
- package/dist/util/resolution/terraform.js +64 -0
- package/dist/util/resolution/terraform.js.map +1 -0
- 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 -63
- 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 +27 -2
- package/package.json +8 -8
|
@@ -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,23 +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
223
|
var TRIVIA_ROWS = {
|
|
267
224
|
js: JS_LIKE_ROW,
|
|
268
225
|
ts: JS_LIKE_ROW,
|
|
@@ -271,30 +228,49 @@ var TRIVIA_ROWS = {
|
|
|
271
228
|
typescript: JS_LIKE_ROW,
|
|
272
229
|
jsx: JS_LIKE_ROW,
|
|
273
230
|
python: PYTHON_ROW,
|
|
274
|
-
csharp: CSHARP_ROW,
|
|
275
231
|
go: GO_ROW,
|
|
276
232
|
rust: RUST_ROW,
|
|
277
233
|
php: PHP_ROW,
|
|
278
234
|
ruby: RUBY_ROW,
|
|
279
235
|
swift: SWIFT_ROW,
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
css: CSS_FAMILY_ROW,
|
|
283
|
-
less: CSS_FAMILY_ROW,
|
|
284
|
-
scss: CSS_FAMILY_ROW,
|
|
285
|
-
c: C_FAMILY_ROW,
|
|
286
|
-
cpp: C_FAMILY_ROW,
|
|
287
|
-
java: JAVA_ROW,
|
|
288
|
-
sql: SQL_ROW
|
|
236
|
+
scss: SCSS_ROW,
|
|
237
|
+
cpp: C_FAMILY_ROW
|
|
289
238
|
};
|
|
290
239
|
function triviaRowFor(languageId) {
|
|
291
240
|
return TRIVIA_ROWS[languageId] ?? JS_LIKE_ROW;
|
|
292
241
|
}
|
|
293
242
|
|
|
294
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
|
+
}
|
|
295
270
|
function maskTrivia(source, languageId, options) {
|
|
296
271
|
const mask = buildMarkedMask(source, languageId, {
|
|
297
272
|
maskStrings: options?.maskStrings ?? true,
|
|
273
|
+
maskCssUrls: options?.maskCssUrls ?? false,
|
|
298
274
|
mode: "render"
|
|
299
275
|
});
|
|
300
276
|
let out = "";
|
|
@@ -324,14 +300,32 @@ function buildMarkedMask(source, languageId, options) {
|
|
|
324
300
|
const length = source.length;
|
|
325
301
|
let index = 0;
|
|
326
302
|
while (index < length) {
|
|
303
|
+
if (row.unquotedEscapes && source.charCodeAt(index) === 92) {
|
|
304
|
+
index = skipScssEscape(source, index);
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
327
307
|
if (!starters[source.charCodeAt(index)]) {
|
|
328
308
|
index += 1;
|
|
329
309
|
continue;
|
|
330
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
|
+
}
|
|
331
322
|
const commentEnd = commentSpanEnd(source, row, index);
|
|
332
323
|
if (commentEnd !== null) {
|
|
333
|
-
|
|
334
|
-
|
|
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
|
+
}
|
|
335
329
|
index = commentEnd;
|
|
336
330
|
continue;
|
|
337
331
|
}
|
|
@@ -364,6 +358,81 @@ function constructSpans(construct, mode) {
|
|
|
364
358
|
return construct.renderSpans;
|
|
365
359
|
return construct.maskSpans;
|
|
366
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
|
+
}
|
|
367
436
|
var starterCache = /* @__PURE__ */ new WeakMap();
|
|
368
437
|
var prefixRegexCache = /* @__PURE__ */ new WeakMap();
|
|
369
438
|
var openerRegexCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -395,8 +464,10 @@ function rowStarterCodes(row) {
|
|
|
395
464
|
}
|
|
396
465
|
if (row.percentLiterals)
|
|
397
466
|
add("%");
|
|
398
|
-
if (row.
|
|
399
|
-
add("
|
|
467
|
+
if (row.unquotedCssUrl) {
|
|
468
|
+
add("u");
|
|
469
|
+
add("U");
|
|
470
|
+
}
|
|
400
471
|
starterCache.set(row, starters);
|
|
401
472
|
return starters;
|
|
402
473
|
}
|
|
@@ -444,11 +515,45 @@ function nextTriviaConstruct(source, row, index) {
|
|
|
444
515
|
if (percentConstruct !== null)
|
|
445
516
|
return percentConstruct;
|
|
446
517
|
}
|
|
447
|
-
if (row.zigMultiline && source.startsWith("\\\\", index)) {
|
|
448
|
-
return zigMultilineConstruct(source, index);
|
|
449
|
-
}
|
|
450
518
|
return null;
|
|
451
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
|
+
}
|
|
452
557
|
function commentSpanEnd(source, row, index) {
|
|
453
558
|
for (const prefix of row.lineComments) {
|
|
454
559
|
if (source.startsWith(prefix, index))
|
|
@@ -552,22 +657,6 @@ function quotedStringConstruct(source, row, form, index) {
|
|
|
552
657
|
maskSpans: [[index, charEnd]],
|
|
553
658
|
delimitersAreTrivia: false
|
|
554
659
|
};
|
|
555
|
-
} else if (form.quoteRun) {
|
|
556
|
-
let run = 0;
|
|
557
|
-
while (source[cursor + run] === form.open[0])
|
|
558
|
-
run += 1;
|
|
559
|
-
if (run < form.open.length)
|
|
560
|
-
return null;
|
|
561
|
-
const scanned = quoteRunStringEnd(source, cursor + run, form.open[0] ?? '"', run);
|
|
562
|
-
const bodyStart2 = cursor + run;
|
|
563
|
-
const body2 = [bodyStart2, scanned.closeStart];
|
|
564
|
-
return {
|
|
565
|
-
start: index,
|
|
566
|
-
end: scanned.end,
|
|
567
|
-
renderSpans: body2[0] < body2[1] ? [body2] : [],
|
|
568
|
-
maskSpans: [[index, scanned.end]],
|
|
569
|
-
delimitersAreTrivia: false
|
|
570
|
-
};
|
|
571
660
|
} else {
|
|
572
661
|
if (!source.startsWith(form.open, cursor))
|
|
573
662
|
return null;
|
|
@@ -603,6 +692,8 @@ function collectQuotedBody(source, row, form, start, close, hashCount) {
|
|
|
603
692
|
if (interpolation.excludeFromMask) {
|
|
604
693
|
pushSegment(cursor);
|
|
605
694
|
const inner = collectInterpolationSpans(source, row, cursor, interpolation);
|
|
695
|
+
for (const span of inner.spans)
|
|
696
|
+
segments.push(span);
|
|
606
697
|
cursor = inner.end;
|
|
607
698
|
segmentStart = cursor;
|
|
608
699
|
continue;
|
|
@@ -657,22 +748,6 @@ function charLiteralEnd(source, quoteIndex, form) {
|
|
|
657
748
|
return cursor + 2;
|
|
658
749
|
return null;
|
|
659
750
|
}
|
|
660
|
-
function quoteRunStringEnd(source, index, quote, runLength) {
|
|
661
|
-
let cursor = index;
|
|
662
|
-
while (cursor < source.length) {
|
|
663
|
-
if (source[cursor] !== quote) {
|
|
664
|
-
cursor += 1;
|
|
665
|
-
continue;
|
|
666
|
-
}
|
|
667
|
-
let run = 0;
|
|
668
|
-
while (source[cursor + run] === quote)
|
|
669
|
-
run += 1;
|
|
670
|
-
if (run >= runLength)
|
|
671
|
-
return { end: cursor + run, closeStart: cursor };
|
|
672
|
-
cursor += run;
|
|
673
|
-
}
|
|
674
|
-
return { end: source.length, closeStart: source.length };
|
|
675
|
-
}
|
|
676
751
|
function closeAloneOnItsLine(source, closeIndex) {
|
|
677
752
|
const lineStart = source.lastIndexOf("\n", closeIndex - 1) + 1;
|
|
678
753
|
for (let i = lineStart; i < closeIndex; i += 1) {
|
|
@@ -691,7 +766,19 @@ function collectInterpolationSpans(source, row, start, interpolation) {
|
|
|
691
766
|
let depth = 1;
|
|
692
767
|
let cursor = start + interpolation.start.length;
|
|
693
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
|
+
}
|
|
694
777
|
const ch = source[cursor];
|
|
778
|
+
if (row.unquotedEscapes && ch === "\\") {
|
|
779
|
+
cursor = skipScssEscape(source, cursor);
|
|
780
|
+
continue;
|
|
781
|
+
}
|
|
695
782
|
if (source.startsWith(interpolation.end, cursor)) {
|
|
696
783
|
depth -= 1;
|
|
697
784
|
if (!depth)
|
|
@@ -831,39 +918,6 @@ function percentLiteralConstructAt(source, index) {
|
|
|
831
918
|
delimitersAreTrivia: false
|
|
832
919
|
};
|
|
833
920
|
}
|
|
834
|
-
function zigMultilineConstruct(source, start) {
|
|
835
|
-
const renderSpans = [];
|
|
836
|
-
let cursor = start;
|
|
837
|
-
let end = source.length;
|
|
838
|
-
while (cursor < source.length) {
|
|
839
|
-
let lineEnd = cursor;
|
|
840
|
-
while (lineEnd < source.length && source[lineEnd] !== "\n")
|
|
841
|
-
lineEnd += 1;
|
|
842
|
-
if (cursor + 2 < lineEnd)
|
|
843
|
-
renderSpans.push([cursor + 2, lineEnd]);
|
|
844
|
-
if (lineEnd >= source.length) {
|
|
845
|
-
end = source.length;
|
|
846
|
-
break;
|
|
847
|
-
}
|
|
848
|
-
let probe = lineEnd + 1;
|
|
849
|
-
while (probe < source.length && (source[probe] === " " || source[probe] === " " || source[probe] === "\r")) {
|
|
850
|
-
probe += 1;
|
|
851
|
-
}
|
|
852
|
-
if (source[probe] === "\\" && source[probe + 1] === "\\") {
|
|
853
|
-
cursor = probe;
|
|
854
|
-
continue;
|
|
855
|
-
}
|
|
856
|
-
end = lineEnd;
|
|
857
|
-
break;
|
|
858
|
-
}
|
|
859
|
-
return {
|
|
860
|
-
start,
|
|
861
|
-
end,
|
|
862
|
-
renderSpans,
|
|
863
|
-
maskSpans: [[start, end]],
|
|
864
|
-
delimitersAreTrivia: false
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
921
|
|
|
868
922
|
// dist/util/comments.js
|
|
869
923
|
function stripJsLikeComments(src) {
|
|
@@ -1424,10 +1478,7 @@ function normalizeCsharpIdentifier(name) {
|
|
|
1424
1478
|
const withoutVerbatimPrefix = name.startsWith("@") ? name.slice(1) : name;
|
|
1425
1479
|
return hasNonAsciiCodePoint(withoutVerbatimPrefix) ? withoutVerbatimPrefix.replace(CSHARP_IDENTIFIER_FORMAT_PATTERN, "") : withoutVerbatimPrefix;
|
|
1426
1480
|
}
|
|
1427
|
-
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}]*`;
|
|
1428
|
-
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}]*`;
|
|
1429
1481
|
var GO_IDENTIFIER_SOURCE = String.raw`[\p{L}_][\p{L}\p{Nd}_]*`;
|
|
1430
|
-
var KOTLIN_IDENTIFIER_SOURCE = String.raw`[\p{L}_][\p{L}\p{Nd}_]*`;
|
|
1431
1482
|
|
|
1432
1483
|
// dist/languages/definitions/python.js
|
|
1433
1484
|
function isTypeAliasLeftName(node) {
|
|
@@ -1460,7 +1511,7 @@ function isPythonReceiverAttributeAssignmentName(node) {
|
|
|
1460
1511
|
const assignment = attr.parent;
|
|
1461
1512
|
if (assignment?.type !== "assignment")
|
|
1462
1513
|
return false;
|
|
1463
|
-
return assignment.childForFieldName("left")?.id === attr.id;
|
|
1514
|
+
return assignment.childForFieldName("left")?.id === attr.id && !!assignment.childForFieldName("right");
|
|
1464
1515
|
}
|
|
1465
1516
|
var PYTHON_GRAPH_IMPORT_QUERY = `
|
|
1466
1517
|
(import_statement name: (dotted_name) @from) @stmt
|
|
@@ -1571,10 +1622,12 @@ var PYTHON_DEF = {
|
|
|
1571
1622
|
(assignment left: [(pattern_list (identifier) @name) (tuple_pattern (identifier) @name)])
|
|
1572
1623
|
;; Instance / class attributes declared as \`self.x = ...\` or \`cls.x = ...\`.
|
|
1573
1624
|
((assignment
|
|
1574
|
-
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1625
|
+
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1626
|
+
right: (_))
|
|
1575
1627
|
(#eq? @receiver "self"))
|
|
1576
1628
|
((assignment
|
|
1577
|
-
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1629
|
+
left: (attribute object: (identifier) @receiver attribute: (identifier) @name)
|
|
1630
|
+
right: (_))
|
|
1578
1631
|
(#eq? @receiver "cls"))
|
|
1579
1632
|
(named_expression name: (identifier) @name)
|
|
1580
1633
|
(type_alias_statement left: (type [(identifier) @name (generic_type (identifier) @name)]))
|
|
@@ -2248,10 +2301,6 @@ registerLanguage(GO_DEF);
|
|
|
2248
2301
|
|
|
2249
2302
|
// dist/languages/definitions/java.js
|
|
2250
2303
|
var JAVA_IDENTIFIER_IGNORABLE_PATTERN = new RegExp(`[${JAVA_IDENTIFIER_IGNORABLE_SOURCE}]`, "gu");
|
|
2251
|
-
var JAVA_IMPORT_QUERY = `
|
|
2252
|
-
(import_declaration (scoped_identifier) @from (asterisk)? @wild) @stmt
|
|
2253
|
-
(import_declaration (identifier) @from (asterisk)? @wild) @stmt
|
|
2254
|
-
`;
|
|
2255
2304
|
var JAVA_DEF = {
|
|
2256
2305
|
id: "java",
|
|
2257
2306
|
extensions: [".java"],
|
|
@@ -2298,7 +2347,8 @@ var JAVA_DEF = {
|
|
|
2298
2347
|
comments: ["line_comment", "block_comment"]
|
|
2299
2348
|
},
|
|
2300
2349
|
graph: {
|
|
2301
|
-
imports
|
|
2350
|
+
// Java imports are read from the syntax tree (src/util/jvm-tree.ts), so no imports query runs.
|
|
2351
|
+
imports: "",
|
|
2302
2352
|
exports: `
|
|
2303
2353
|
(class_declaration name: (identifier) @name)
|
|
2304
2354
|
(record_declaration name: (identifier) @name)
|
|
@@ -2322,7 +2372,8 @@ var JAVA_DEF = {
|
|
|
2322
2372
|
(spread_parameter (variable_declarator name: (identifier) @name))
|
|
2323
2373
|
(receiver_parameter (identifier) @name)
|
|
2324
2374
|
`,
|
|
2325
|
-
|
|
2375
|
+
// Java imports are read from the syntax tree (src/util/jvm-tree.ts), so no import-binding query runs.
|
|
2376
|
+
importBindings: ""
|
|
2326
2377
|
},
|
|
2327
2378
|
nodeTypes: {
|
|
2328
2379
|
identifier: ["identifier", "type_identifier"],
|
|
@@ -2419,12 +2470,8 @@ var CSHARP_DEF = {
|
|
|
2419
2470
|
comments: ["comment"]
|
|
2420
2471
|
},
|
|
2421
2472
|
graph: {
|
|
2422
|
-
//
|
|
2423
|
-
|
|
2424
|
-
imports: `
|
|
2425
|
-
(using_directive !name (_) @from) @stmt
|
|
2426
|
-
(using_directive name: (identifier) (_) @from) @stmt
|
|
2427
|
-
`,
|
|
2473
|
+
// C# using directives are read from the syntax tree (src/util/csharp-tree.ts), so no imports query runs.
|
|
2474
|
+
imports: "",
|
|
2428
2475
|
exports: `
|
|
2429
2476
|
(class_declaration name: (identifier) @name)
|
|
2430
2477
|
(record_declaration name: (identifier) @name)
|
|
@@ -2455,13 +2502,9 @@ var CSHARP_DEF = {
|
|
|
2455
2502
|
(variable_declarator name: (identifier) @name)
|
|
2456
2503
|
(declaration_pattern name: (identifier) @name)
|
|
2457
2504
|
`,
|
|
2458
|
-
// extern
|
|
2459
|
-
//
|
|
2460
|
-
importBindings:
|
|
2461
|
-
(using_directive name: (identifier) @alias (_) @from) @stmt
|
|
2462
|
-
(using_directive !name (_) @from) @stmt
|
|
2463
|
-
(extern_alias_directive name: (identifier) @alias) @stmt
|
|
2464
|
-
`
|
|
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: ""
|
|
2465
2508
|
},
|
|
2466
2509
|
nodeTypes: {
|
|
2467
2510
|
identifier: ["identifier"],
|
|
@@ -3089,9 +3132,8 @@ var KOTLIN_DEF = {
|
|
|
3089
3132
|
comments: ["line_comment", "block_comment"]
|
|
3090
3133
|
},
|
|
3091
3134
|
graph: {
|
|
3092
|
-
imports
|
|
3093
|
-
|
|
3094
|
-
`,
|
|
3135
|
+
// Kotlin imports are read from the syntax tree (src/util/jvm-tree.ts), so no imports query runs.
|
|
3136
|
+
imports: "",
|
|
3095
3137
|
exports: `
|
|
3096
3138
|
(source_file
|
|
3097
3139
|
[
|
|
@@ -3122,11 +3164,8 @@ var KOTLIN_DEF = {
|
|
|
3122
3164
|
(class_parameter (identifier) @name)
|
|
3123
3165
|
(type_parameter (identifier) @name)
|
|
3124
3166
|
`,
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
(import (qualified_identifier) @from ("*") @wild) @stmt
|
|
3128
|
-
(import (qualified_identifier) @from) @stmt
|
|
3129
|
-
`
|
|
3167
|
+
// Kotlin imports are read from the syntax tree (src/util/jvm-tree.ts), so no import-binding query runs.
|
|
3168
|
+
importBindings: ""
|
|
3130
3169
|
},
|
|
3131
3170
|
nodeTypes: {
|
|
3132
3171
|
identifier: ["identifier"],
|
|
@@ -3410,6 +3449,177 @@ var SQL_DEF = {
|
|
|
3410
3449
|
};
|
|
3411
3450
|
registerLanguage(SQL_DEF);
|
|
3412
3451
|
|
|
3452
|
+
// dist/util/ast.js
|
|
3453
|
+
function stringifyUnknown(value) {
|
|
3454
|
+
if (value instanceof Error)
|
|
3455
|
+
return value.message;
|
|
3456
|
+
if (typeof value === "string")
|
|
3457
|
+
return value;
|
|
3458
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
3459
|
+
return String(value);
|
|
3460
|
+
}
|
|
3461
|
+
if (value === null || value === void 0) {
|
|
3462
|
+
return String(value);
|
|
3463
|
+
}
|
|
3464
|
+
if (typeof value === "object") {
|
|
3465
|
+
try {
|
|
3466
|
+
return JSON.stringify(value);
|
|
3467
|
+
} catch {
|
|
3468
|
+
return "[Object]";
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
if (typeof value === "symbol")
|
|
3472
|
+
return value.toString();
|
|
3473
|
+
if (typeof value === "function") {
|
|
3474
|
+
return `[Function: ${value.name || "anonymous"}]`;
|
|
3475
|
+
}
|
|
3476
|
+
return "unknown";
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
// dist/terraform/syntax.js
|
|
3480
|
+
function isSyntaxNode(node) {
|
|
3481
|
+
return node.type !== "comment";
|
|
3482
|
+
}
|
|
3483
|
+
function sameNode(left, right) {
|
|
3484
|
+
return !!left && !!right && left.type === right.type && left.startIndex === right.startIndex && left.endIndex === right.endIndex;
|
|
3485
|
+
}
|
|
3486
|
+
function blockTypeName(block) {
|
|
3487
|
+
const first = block.namedChildren.filter(isSyntaxNode)[0];
|
|
3488
|
+
return first?.type === "identifier" ? first.text : void 0;
|
|
3489
|
+
}
|
|
3490
|
+
function blockLabels(block) {
|
|
3491
|
+
const labels = [];
|
|
3492
|
+
for (const child of block.namedChildren.filter(isSyntaxNode).slice(1)) {
|
|
3493
|
+
if (child.type === "block_start")
|
|
3494
|
+
break;
|
|
3495
|
+
labels.push(child);
|
|
3496
|
+
}
|
|
3497
|
+
return labels;
|
|
3498
|
+
}
|
|
3499
|
+
function isTopLevelBlock(block) {
|
|
3500
|
+
return block.parent?.type === "body" && block.parent.parent?.type === "config_file";
|
|
3501
|
+
}
|
|
3502
|
+
function literalStringText(stringLit) {
|
|
3503
|
+
if (stringLit?.type !== "string_lit")
|
|
3504
|
+
return null;
|
|
3505
|
+
const parts = stringLit.namedChildren.filter(isSyntaxNode).filter((child) => child.type !== "quoted_template_start" && child.type !== "quoted_template_end");
|
|
3506
|
+
const text = parts.length === 1 ? parts[0] : void 0;
|
|
3507
|
+
return text?.type === "template_literal" ? text : null;
|
|
3508
|
+
}
|
|
3509
|
+
function attributeNameNode(attribute) {
|
|
3510
|
+
const name = attribute.namedChildren.filter(isSyntaxNode)[0];
|
|
3511
|
+
return name?.type === "identifier" ? name : void 0;
|
|
3512
|
+
}
|
|
3513
|
+
function terraformDeclarationForNameNode(node) {
|
|
3514
|
+
if (node.type === "identifier") {
|
|
3515
|
+
const attribute = node.parent;
|
|
3516
|
+
if (attribute?.type !== "attribute" || !sameNode(attributeNameNode(attribute), node))
|
|
3517
|
+
return null;
|
|
3518
|
+
const block2 = attribute.parent?.parent;
|
|
3519
|
+
if (block2?.type !== "block" || !isTopLevelBlock(block2))
|
|
3520
|
+
return null;
|
|
3521
|
+
if (blockTypeName(block2) !== "locals" || blockLabels(block2).length)
|
|
3522
|
+
return null;
|
|
3523
|
+
return { kind: "local" };
|
|
3524
|
+
}
|
|
3525
|
+
if (node.type !== "template_literal")
|
|
3526
|
+
return null;
|
|
3527
|
+
const label = node.parent;
|
|
3528
|
+
const block = label?.parent;
|
|
3529
|
+
if (!label || block?.type !== "block" || !isTopLevelBlock(block))
|
|
3530
|
+
return null;
|
|
3531
|
+
if (!sameNode(literalStringText(label), node))
|
|
3532
|
+
return null;
|
|
3533
|
+
const labels = blockLabels(block);
|
|
3534
|
+
const kind = blockTypeName(block);
|
|
3535
|
+
if ((kind === "variable" || kind === "output" || kind === "module") && labels.length === 1)
|
|
3536
|
+
return { kind };
|
|
3537
|
+
if ((kind === "resource" || kind === "data") && labels.length === 2 && sameNode(labels[1], label)) {
|
|
3538
|
+
const type = literalStringText(labels[0]);
|
|
3539
|
+
return type ? { kind, type: type.text } : null;
|
|
3540
|
+
}
|
|
3541
|
+
return null;
|
|
3542
|
+
}
|
|
3543
|
+
function classifyTerraformDefinition(node) {
|
|
3544
|
+
const declaration = terraformDeclarationForNameNode(node);
|
|
3545
|
+
if (!declaration || declaration.kind === "local")
|
|
3546
|
+
return "variable";
|
|
3547
|
+
return declaration.kind;
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3550
|
+
// dist/languages/definitions/terraform.js
|
|
3551
|
+
function literalLabel(capture) {
|
|
3552
|
+
const name = capture ? ` @${capture}` : "";
|
|
3553
|
+
return `(string_lit . (quoted_template_start) . (template_literal)${name} . (quoted_template_end) .)`;
|
|
3554
|
+
}
|
|
3555
|
+
var COMMENT_GAP = ". (comment)* .";
|
|
3556
|
+
function labeledChunkBlock(keywords, labels, captureId) {
|
|
3557
|
+
const keywordList = keywords.map((keyword) => `"${keyword}"`).join(" ");
|
|
3558
|
+
const leading = labels === 2 ? ` ${COMMENT_GAP} (string_lit)` : "";
|
|
3559
|
+
return {
|
|
3560
|
+
type: "block",
|
|
3561
|
+
nameQuery: `. (identifier) @kw (#any-of? @kw ${keywordList})${leading} ${COMMENT_GAP} (string_lit (template_literal) @chunk.name) ${COMMENT_GAP} (block_start)`,
|
|
3562
|
+
captureId
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
function unlabeledChunkBlock(keywords, captureId) {
|
|
3566
|
+
const keywordList = keywords.map((keyword) => `"${keyword}"`).join(" ");
|
|
3567
|
+
return {
|
|
3568
|
+
type: "block",
|
|
3569
|
+
nameQuery: `. (identifier) @chunk.name (#any-of? @chunk.name ${keywordList}) ${COMMENT_GAP} (block_start)`,
|
|
3570
|
+
captureId
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
var ONE_LABEL_DECLARATION = `(config_file (body (block . (identifier) @kind (#any-of? @kind "variable" "output" "module") ${COMMENT_GAP} ${literalLabel("name")} ${COMMENT_GAP} (block_start))))`;
|
|
3574
|
+
var TWO_LABEL_DECLARATION = `(config_file (body (block . (identifier) @kind (#any-of? @kind "resource" "data") ${COMMENT_GAP} ${literalLabel()} ${COMMENT_GAP} ${literalLabel("name")} ${COMMENT_GAP} (block_start))))`;
|
|
3575
|
+
var LOCALS_DECLARATION = `(config_file (body (block . (identifier) @kind (#eq? @kind "locals") ${COMMENT_GAP} (block_start) (body (attribute . (identifier) @name)))))`;
|
|
3576
|
+
var TERRAFORM_DEF = {
|
|
3577
|
+
id: "terraform",
|
|
3578
|
+
extensions: [".tf"],
|
|
3579
|
+
usesQueryDrivenLocals: true,
|
|
3580
|
+
structure: {
|
|
3581
|
+
blocks: [
|
|
3582
|
+
labeledChunkBlock(["resource"], 2, "resource"),
|
|
3583
|
+
labeledChunkBlock(["data"], 2, "data"),
|
|
3584
|
+
labeledChunkBlock(["module"], 1, "module"),
|
|
3585
|
+
labeledChunkBlock(["variable"], 1, "variable"),
|
|
3586
|
+
labeledChunkBlock(["output"], 1, "output"),
|
|
3587
|
+
unlabeledChunkBlock(["locals"], "locals"),
|
|
3588
|
+
labeledChunkBlock(["provider", "check"], 1, "block"),
|
|
3589
|
+
labeledChunkBlock(["ephemeral"], 2, "block"),
|
|
3590
|
+
unlabeledChunkBlock(["terraform", "moved", "import", "removed"], "block")
|
|
3591
|
+
],
|
|
3592
|
+
splitPoints: [],
|
|
3593
|
+
comments: ["comment"]
|
|
3594
|
+
},
|
|
3595
|
+
graph: {
|
|
3596
|
+
// A module call depends on its local `source` directory; remote sources stay external.
|
|
3597
|
+
imports: `
|
|
3598
|
+
(config_file (body (block . (identifier) @kw (#eq? @kw "module")
|
|
3599
|
+
(body (attribute . (identifier) @attr (#eq? @attr "source")
|
|
3600
|
+
${COMMENT_GAP} (expression . (literal_value . ${literalLabel("from")} .) .)))) @stmt))
|
|
3601
|
+
`,
|
|
3602
|
+
exports: `
|
|
3603
|
+
(config_file (body (block . (identifier) @kind (#any-of? @kind "variable" "output") ${COMMENT_GAP} ${literalLabel("name")} ${COMMENT_GAP} (block_start))))
|
|
3604
|
+
`,
|
|
3605
|
+
locals: `
|
|
3606
|
+
${ONE_LABEL_DECLARATION}
|
|
3607
|
+
${TWO_LABEL_DECLARATION}
|
|
3608
|
+
${LOCALS_DECLARATION}
|
|
3609
|
+
`,
|
|
3610
|
+
// Module calls bind no local names; `module.<name>` resolves in src/terraform/.
|
|
3611
|
+
importBindings: ""
|
|
3612
|
+
},
|
|
3613
|
+
nodeTypes: {
|
|
3614
|
+
identifier: ["identifier"]
|
|
3615
|
+
},
|
|
3616
|
+
// Terraform references resolve in src/terraform/, so generic cross-module and member passes skip it.
|
|
3617
|
+
supportsCrossModuleSymbols: false,
|
|
3618
|
+
classifyDefinition: classifyTerraformDefinition,
|
|
3619
|
+
isDeclarationName: (node) => terraformDeclarationForNameNode(node) !== null
|
|
3620
|
+
};
|
|
3621
|
+
registerLanguage(TERRAFORM_DEF);
|
|
3622
|
+
|
|
3413
3623
|
// dist/languages/definitions/zig.js
|
|
3414
3624
|
var ZIG_TYPE_INITIALIZER_TYPES = /* @__PURE__ */ new Set([
|
|
3415
3625
|
"builtin_type",
|
|
@@ -3511,30 +3721,16 @@ var ZIG_DEF = {
|
|
|
3511
3721
|
registerLanguage(ZIG_DEF);
|
|
3512
3722
|
|
|
3513
3723
|
// dist/bootstrap/tree-sitter-languages.js
|
|
3514
|
-
var
|
|
3724
|
+
var CHUNK_LANGUAGE_ALIASES = {
|
|
3515
3725
|
js: "javascript",
|
|
3516
|
-
ts: "typescript"
|
|
3517
|
-
tsx: "tsx",
|
|
3518
|
-
python: "python",
|
|
3519
|
-
php: "php",
|
|
3520
|
-
html: "html",
|
|
3521
|
-
css: "css",
|
|
3522
|
-
scss: "scss",
|
|
3523
|
-
less: "less",
|
|
3524
|
-
ruby: "ruby",
|
|
3525
|
-
go: "go",
|
|
3526
|
-
java: "java",
|
|
3527
|
-
csharp: "csharp",
|
|
3528
|
-
rust: "rust",
|
|
3529
|
-
c: "c",
|
|
3530
|
-
cpp: "cpp",
|
|
3531
|
-
kotlin: "kotlin",
|
|
3532
|
-
swift: "swift",
|
|
3533
|
-
zig: "zig"
|
|
3726
|
+
ts: "typescript"
|
|
3534
3727
|
};
|
|
3728
|
+
function chunkLanguageKey(id) {
|
|
3729
|
+
return CHUNK_LANGUAGE_ALIASES[id] ?? id;
|
|
3730
|
+
}
|
|
3535
3731
|
var LANG_CONFIGS = {};
|
|
3536
3732
|
for (const lang of getAllLanguages()) {
|
|
3537
|
-
const key =
|
|
3733
|
+
const key = chunkLanguageKey(lang.id);
|
|
3538
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") {
|
|
3539
3735
|
continue;
|
|
3540
3736
|
}
|
|
@@ -3602,9 +3798,6 @@ function collectChunkBlockGroups(language, matches) {
|
|
|
3602
3798
|
return { mainBlocks, innerBlocks, comments };
|
|
3603
3799
|
}
|
|
3604
3800
|
|
|
3605
|
-
// dist/chunking/chunk-matches.js
|
|
3606
|
-
import { Buffer as Buffer2 } from "node:buffer";
|
|
3607
|
-
|
|
3608
3801
|
// dist/languages.js
|
|
3609
3802
|
import fs from "node:fs";
|
|
3610
3803
|
import path from "node:path";
|
|
@@ -3651,6 +3844,7 @@ var KOTLIN_SUPPORT = adaptDefinition(getLanguageById("kotlin"));
|
|
|
3651
3844
|
var SWIFT_SUPPORT = adaptDefinition(getLanguageById("swift"));
|
|
3652
3845
|
var ZIG_SUPPORT = adaptDefinition(getLanguageById("zig"));
|
|
3653
3846
|
var SQL_SUPPORT = adaptDefinition(getLanguageById("sql"));
|
|
3847
|
+
var TERRAFORM_SUPPORT = adaptDefinition(getLanguageById("terraform"));
|
|
3654
3848
|
var LANGUAGE_SUPPORTS = getAllLanguages().map(adaptDefinition);
|
|
3655
3849
|
var LANGUAGE_EXTENSION_KEY_PATTERN = /^\.[a-z0-9][a-z0-9._+-]*$/;
|
|
3656
3850
|
var NON_REMAPPABLE_EXTENSIONS = /* @__PURE__ */ new Set([".vue", ".svelte"]);
|
|
@@ -3727,39 +3921,64 @@ function isLikelyCppHeader(sample) {
|
|
|
3727
3921
|
return CPP_HEADER_HINT.test(masked) || CPP_MODULE_IMPORT_HINT.test(masked);
|
|
3728
3922
|
}
|
|
3729
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
|
+
|
|
3730
3976
|
// dist/native/runtime.js
|
|
3731
3977
|
import fs5 from "node:fs";
|
|
3732
3978
|
import path5 from "node:path";
|
|
3733
3979
|
import { createRequire } from "node:module";
|
|
3734
3980
|
import { fileURLToPath } from "node:url";
|
|
3735
3981
|
|
|
3736
|
-
// dist/util/ast.js
|
|
3737
|
-
function stringifyUnknown(value) {
|
|
3738
|
-
if (value instanceof Error)
|
|
3739
|
-
return value.message;
|
|
3740
|
-
if (typeof value === "string")
|
|
3741
|
-
return value;
|
|
3742
|
-
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
3743
|
-
return String(value);
|
|
3744
|
-
}
|
|
3745
|
-
if (value === null || value === void 0) {
|
|
3746
|
-
return String(value);
|
|
3747
|
-
}
|
|
3748
|
-
if (typeof value === "object") {
|
|
3749
|
-
try {
|
|
3750
|
-
return JSON.stringify(value);
|
|
3751
|
-
} catch {
|
|
3752
|
-
return "[Object]";
|
|
3753
|
-
}
|
|
3754
|
-
}
|
|
3755
|
-
if (typeof value === "symbol")
|
|
3756
|
-
return value.toString();
|
|
3757
|
-
if (typeof value === "function") {
|
|
3758
|
-
return `[Function: ${value.name || "anonymous"}]`;
|
|
3759
|
-
}
|
|
3760
|
-
return "unknown";
|
|
3761
|
-
}
|
|
3762
|
-
|
|
3763
3982
|
// dist/native/binding-loader.js
|
|
3764
3983
|
import fs4 from "node:fs";
|
|
3765
3984
|
import path4 from "node:path";
|
|
@@ -4795,61 +5014,25 @@ function getChunkMatches(language, source, _filePath) {
|
|
|
4795
5014
|
if (support) {
|
|
4796
5015
|
const nativeExecution = getNativeSingleQueryExecution(source, support, language.queryText);
|
|
4797
5016
|
if (nativeExecution.matches) {
|
|
4798
|
-
const
|
|
4799
|
-
return nativeExecution.matches.map((match) => toChunkMatchFromNative(match,
|
|
5017
|
+
const byteMap = buildByteMap(source);
|
|
5018
|
+
return nativeExecution.matches.map((match) => toChunkMatchFromNative(match, byteMap));
|
|
4800
5019
|
}
|
|
4801
5020
|
}
|
|
4802
5021
|
return [];
|
|
4803
5022
|
}
|
|
4804
|
-
function toChunkMatchFromNative(match,
|
|
5023
|
+
function toChunkMatchFromNative(match, byteMap) {
|
|
4805
5024
|
return {
|
|
4806
5025
|
captures: match.captures.map((capture) => ({
|
|
4807
5026
|
name: capture.name,
|
|
4808
5027
|
text: capture.text,
|
|
4809
|
-
startByte:
|
|
4810
|
-
endByte:
|
|
5028
|
+
startByte: stringIndexForByte(byteMap, capture.start.index),
|
|
5029
|
+
endByte: stringIndexForByte(byteMap, capture.end.index),
|
|
4811
5030
|
startLine: capture.start.row + 1,
|
|
4812
5031
|
endLine: capture.end.row + 1,
|
|
4813
5032
|
nodeType: capture.nodeType
|
|
4814
5033
|
}))
|
|
4815
5034
|
};
|
|
4816
5035
|
}
|
|
4817
|
-
function createUtf8ByteToStringIndex(source) {
|
|
4818
|
-
const utf8Length = Buffer2.byteLength(source, "utf8");
|
|
4819
|
-
if (utf8Length === source.length) {
|
|
4820
|
-
return (byteOffset2) => Math.max(0, Math.min(byteOffset2, source.length));
|
|
4821
|
-
}
|
|
4822
|
-
const byteToStringIndex = new Uint32Array(utf8Length + 1);
|
|
4823
|
-
let byteOffset = 0;
|
|
4824
|
-
let stringIndex = 0;
|
|
4825
|
-
while (stringIndex < source.length) {
|
|
4826
|
-
const codePoint = source.codePointAt(stringIndex);
|
|
4827
|
-
if (codePoint === void 0)
|
|
4828
|
-
break;
|
|
4829
|
-
const charStringLength = codePoint > 65535 ? 2 : 1;
|
|
4830
|
-
const charByteLength = utf8ByteLengthForCodePoint(codePoint);
|
|
4831
|
-
for (let offset = 1; offset < charByteLength; offset += 1) {
|
|
4832
|
-
byteToStringIndex[byteOffset + offset] = stringIndex;
|
|
4833
|
-
}
|
|
4834
|
-
byteOffset += charByteLength;
|
|
4835
|
-
stringIndex += charStringLength;
|
|
4836
|
-
byteToStringIndex[byteOffset] = stringIndex;
|
|
4837
|
-
}
|
|
4838
|
-
byteToStringIndex[byteOffset] = source.length;
|
|
4839
|
-
return (index) => {
|
|
4840
|
-
const bounded = Math.max(0, Math.min(index, byteToStringIndex.length - 1));
|
|
4841
|
-
return byteToStringIndex[bounded] ?? source.length;
|
|
4842
|
-
};
|
|
4843
|
-
}
|
|
4844
|
-
function utf8ByteLengthForCodePoint(codePoint) {
|
|
4845
|
-
if (codePoint <= 127)
|
|
4846
|
-
return 1;
|
|
4847
|
-
if (codePoint <= 2047)
|
|
4848
|
-
return 2;
|
|
4849
|
-
if (codePoint <= 65535)
|
|
4850
|
-
return 3;
|
|
4851
|
-
return 4;
|
|
4852
|
-
}
|
|
4853
5036
|
|
|
4854
5037
|
// dist/chunking/chunk-id.js
|
|
4855
5038
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -5308,10 +5491,6 @@ function collectNewlineOffsets(source) {
|
|
|
5308
5491
|
|
|
5309
5492
|
// dist/agent/query-index/content.js
|
|
5310
5493
|
var MAX_QUERY_INDEX_TEXT_BYTES = 3e5;
|
|
5311
|
-
var CHUNK_LANGUAGE_ALIASES = {
|
|
5312
|
-
js: "javascript",
|
|
5313
|
-
ts: "typescript"
|
|
5314
|
-
};
|
|
5315
5494
|
function compressQueryText(text) {
|
|
5316
5495
|
const compressed = brotliCompressSync(text, {
|
|
5317
5496
|
params: { [zlibConstants.BROTLI_PARAM_QUALITY]: 4 }
|
|
@@ -5332,7 +5511,7 @@ function detectQueryIndexSurface(relativePath) {
|
|
|
5332
5511
|
return "code";
|
|
5333
5512
|
}
|
|
5334
5513
|
function chunkQueryText(file, text, support) {
|
|
5335
|
-
const languageId = support ?
|
|
5514
|
+
const languageId = support ? chunkLanguageKey(support.id) : void 0;
|
|
5336
5515
|
const language = languageId ? LANG_CONFIGS[languageId] : void 0;
|
|
5337
5516
|
if (language) {
|
|
5338
5517
|
try {
|