@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.3
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/bin/codegraph +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +425 -688
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.js +1 -57
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +610 -33
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1345 -1419
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +51 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +76 -530
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +34 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +11 -101
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +66 -204
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.js +0 -31
- package/lib/dist/extraction/commonjs-requires.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +145 -206
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.js +0 -165
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +45 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +53 -430
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +197 -7
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +554 -1382
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +25 -133
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +789 -856
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +3 -55
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +329 -161
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +35 -184
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.js +5 -42
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.js +3 -47
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +64 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +73 -49
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.js +0 -13
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +29 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +42 -174
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +5 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +42 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
- package/lib/dist/extraction/sfc-script.js +32 -31
- package/lib/dist/extraction/sfc-script.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +1 -38
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.js +2 -34
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +11 -87
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +4 -152
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +447 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1908 -2544
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +13 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +52 -92
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.js +0 -32
- package/lib/dist/extraction/vue-options-api.js.map +1 -1
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +4 -251
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +82 -223
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +98 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +190 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +694 -1109
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.js +0 -102
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -85
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +40 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +174 -137
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +8 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +33 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +1 -6
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.js +0 -15
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +50 -17
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +17 -6
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +74 -248
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +43 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +109 -123
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +127 -18
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +661 -3590
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.js +1 -138
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +7 -56
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1355 -1270
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.js +41 -208
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +4 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +5 -68
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +9 -190
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +182 -199
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +1 -104
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +14 -43
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +13 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +12 -50
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +203 -129
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +2 -125
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +2 -199
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +10 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.js +0 -14
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +26 -34
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +5 -102
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +10 -82
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +57 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1449 -191
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +1 -61
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +35 -56
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +7 -75
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +0 -97
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +11 -134
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +42 -114
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +276 -29
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1670 -1380
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +415 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1323 -1037
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +14 -14
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +858 -7
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +21030 -5110
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +3 -55
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +23 -2
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +43 -111
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +8 -37
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +2 -101
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +4 -170
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +23 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
- package/lib/dist/resolution/type-parameters.js +52 -54
- package/lib/dist/resolution/type-parameters.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +183 -11
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +570 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +7 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +24 -97
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +15 -135
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.js +0 -111
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +0 -142
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +4 -317
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.js +0 -111
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +2 -44
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +4 -60
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +4 -174
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +5 -381
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +19 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.js +0 -36
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +1 -132
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +18 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +73 -229
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/worker-teardown.js +0 -47
- package/lib/dist/worker-teardown.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -1,43 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Syntax classification from the engine's own tree-sitter parse (CG-57).
|
|
4
|
-
*
|
|
5
|
-
* The viewer used to run a second highlighter (Shiki + 56 pruned TextMate
|
|
6
|
-
* grammars) over source the engine had already parsed with a real grammar. This
|
|
7
|
-
* takes the classification off the tree instead, which removes the second
|
|
8
|
-
* dependency, the second grammar set, and — the part that actually mattered —
|
|
9
|
-
* the second opinion: a `.ts` file is now read by exactly the grammar that
|
|
10
|
-
* decided what its symbols are.
|
|
11
|
-
*
|
|
12
|
-
* ## What comes out
|
|
13
|
-
*
|
|
14
|
-
* A flat, ordered, non-overlapping list of {@link SyntaxSpan}s over the source
|
|
15
|
-
* string. Gaps between spans are whitespace and are the caller's to fill. The
|
|
16
|
-
* classes are deliberately few, because the design's code colouring is
|
|
17
|
-
* near-monochrome: comments recede, strings and numbers recede one step less,
|
|
18
|
-
* keywords carry weight rather than hue, and the only colour in the body is a
|
|
19
|
-
* call site the graph resolved.
|
|
20
|
-
*
|
|
21
|
-
* ## How a node becomes a class
|
|
22
|
-
*
|
|
23
|
-
* The rules are language-agnostic on purpose — the engine indexes 40-odd
|
|
24
|
-
* languages and a per-grammar scope table would be 40 tables to keep true:
|
|
25
|
-
*
|
|
26
|
-
* * a node whose type mentions `comment` is a comment, whole, undescended;
|
|
27
|
-
* * inside a string node every leaf is string, *except* below an interpolation,
|
|
28
|
-
* where the code starts again (so `${user.name()}` still links);
|
|
29
|
-
* * a numeric literal node is a number;
|
|
30
|
-
* * an **anonymous** leaf is a keyword when its text is a bare word and
|
|
31
|
-
* punctuation otherwise — this is what makes `func`, `fn`, `def`, `END-IF`
|
|
32
|
-
* and `Sub` all land as keywords without naming any of them;
|
|
33
|
-
* * a **named** leaf whose text is identifier-shaped is an identifier, unless
|
|
34
|
-
* the grammar called it a type name, or the extractor's own definition tables
|
|
35
|
-
* say it is the name of a definition.
|
|
36
|
-
*
|
|
37
|
-
* The last of those is the one place per-language knowledge is used, and it is
|
|
38
|
-
* reused rather than restated: {@link EXTRACTORS} already names every node type
|
|
39
|
-
* that declares something in each language, plus the field its name hangs on.
|
|
40
|
-
*/
|
|
41
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
3
|
exports.SYNTAX_TOKEN_CLASSES = void 0;
|
|
43
4
|
exports.classifyTree = classifyTree;
|
|
@@ -46,15 +7,7 @@ exports.tokenizeSource = tokenizeSource;
|
|
|
46
7
|
const languages_1 = require("./languages");
|
|
47
8
|
const grammars_1 = require("./grammars");
|
|
48
9
|
const parse_budget_1 = require("./parse-budget");
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Every class a token can carry, in wire order.
|
|
52
|
-
*
|
|
53
|
-
* `other` is punctuation and whitespace both. The design spec lists them apart
|
|
54
|
-
* (`punct` vs the gaps) but they paint identically — plain ink — and splitting
|
|
55
|
-
* them would roughly double the token count on a dense line to express a
|
|
56
|
-
* difference nothing draws.
|
|
57
|
-
*/
|
|
10
|
+
const sfc_script_1 = require("./sfc-script");
|
|
58
11
|
exports.SYNTAX_TOKEN_CLASSES = [
|
|
59
12
|
'other',
|
|
60
13
|
'ident',
|
|
@@ -65,26 +18,9 @@ exports.SYNTAX_TOKEN_CLASSES = [
|
|
|
65
18
|
'type',
|
|
66
19
|
'def',
|
|
67
20
|
];
|
|
68
|
-
/* ---------------------------------------------------------- node-type tests -- */
|
|
69
|
-
/**
|
|
70
|
-
* Anything a grammar calls a comment.
|
|
71
|
-
*
|
|
72
|
-
* Substring rather than equality because the spelling is per-grammar:
|
|
73
|
-
* `comment`, `line_comment`, `block_comment`, `doc_comment`, `html_comment`,
|
|
74
|
-
* `comment_directive`, `preproc_comment`.
|
|
75
|
-
*/
|
|
76
21
|
function isCommentType(type) {
|
|
77
22
|
return type.includes('comment');
|
|
78
23
|
}
|
|
79
|
-
/**
|
|
80
|
-
* A node whose leaves are string content unless an interpolation interrupts.
|
|
81
|
-
*
|
|
82
|
-
* `string` covers the bulk (`string_literal`, `interpreted_string_literal`,
|
|
83
|
-
* `raw_string_literal`, `encapsed_string`, `string_content`); the rest are the
|
|
84
|
-
* spellings that avoid the word — Rust/Go/C character literals, shell and PHP
|
|
85
|
-
* heredocs, and regular expressions, which recede for the same reason a string
|
|
86
|
-
* does.
|
|
87
|
-
*/
|
|
88
24
|
function isStringType(type) {
|
|
89
25
|
return (type.includes('string') ||
|
|
90
26
|
type.includes('heredoc') ||
|
|
@@ -95,15 +31,6 @@ function isStringType(type) {
|
|
|
95
31
|
type === 'rune_literal' ||
|
|
96
32
|
type === 'quoted_attribute_value');
|
|
97
33
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Where code resumes inside a string.
|
|
100
|
-
*
|
|
101
|
-
* A template literal's `${…}` and an f-string's `{…}` hold real expressions,
|
|
102
|
-
* and the graph records call sites inside them. Swallowing the whole literal as
|
|
103
|
-
* one string token would drop those links — the overlay refuses to claim a
|
|
104
|
-
* token classed `string`, deliberately, so that a word inside a message never
|
|
105
|
-
* gets underlined.
|
|
106
|
-
*/
|
|
107
34
|
function isInterpolationType(type) {
|
|
108
35
|
return (type.includes('interpolation') ||
|
|
109
36
|
type.includes('substitution') ||
|
|
@@ -111,7 +38,6 @@ function isInterpolationType(type) {
|
|
|
111
38
|
type === 'string_interpolation' ||
|
|
112
39
|
type === 'format_expression');
|
|
113
40
|
}
|
|
114
|
-
/** A numeric literal, plus the language constants a theme groups with them. */
|
|
115
41
|
function isNumberType(type) {
|
|
116
42
|
return (type === 'number' ||
|
|
117
43
|
type === 'integer' ||
|
|
@@ -127,29 +53,15 @@ function isNumberType(type) {
|
|
|
127
53
|
type === 'int_literal' ||
|
|
128
54
|
type === 'imaginary_literal');
|
|
129
55
|
}
|
|
130
|
-
/** A named type reference — `type_identifier` and the equivalents. */
|
|
131
56
|
function isTypeNameType(type) {
|
|
132
57
|
return type.includes('type_identifier') || type === 'type_name' || type === 'class_type';
|
|
133
58
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Built-in type words — `string`, `int`, `u32`, `void`.
|
|
136
|
-
*
|
|
137
|
-
* These are emitted WHOLE and undescended, and they carry the same `type` class
|
|
138
|
-
* a user-defined type name gets. Both halves of that matter, because the
|
|
139
|
-
* grammars disagree with each other about what a built-in type even is:
|
|
140
|
-
* tree-sitter-go calls `string` a `type_identifier` (so it would be a type),
|
|
141
|
-
* tree-sitter-typescript wraps it in a `predefined_type` whose child is an
|
|
142
|
-
* anonymous token spelled `string` (so it would be a keyword). Reading the
|
|
143
|
-
* wrapper rather than its children is what stops the same word from painting
|
|
144
|
-
* two different ways in two languages on the same screen.
|
|
145
|
-
*/
|
|
146
59
|
const BUILTIN_TYPE_TYPES = new Set([
|
|
147
60
|
'primitive_type',
|
|
148
61
|
'predefined_type',
|
|
149
62
|
'builtin_type',
|
|
150
63
|
'sized_type_specifier',
|
|
151
64
|
]);
|
|
152
|
-
/** Literal constants a theme groups with numbers (`constant.language`). */
|
|
153
65
|
const CONSTANT_TYPES = new Set([
|
|
154
66
|
'true',
|
|
155
67
|
'false',
|
|
@@ -163,26 +75,8 @@ const CONSTANT_TYPES = new Set([
|
|
|
163
75
|
'true_literal',
|
|
164
76
|
'false_literal',
|
|
165
77
|
]);
|
|
166
|
-
/**
|
|
167
|
-
* Identifier-shaped text, in the loosest sense every indexed language agrees on.
|
|
168
|
-
*
|
|
169
|
-
* The high range is there because `\w` is ASCII-only in JavaScript and a symbol
|
|
170
|
-
* name can be Chinese, Japanese or Cyrillic; a call site in those repositories
|
|
171
|
-
* has to be linkable too. Hyphens are in because COBOL and Erlang spell words
|
|
172
|
-
* with them (`END-IF`, `is_record`).
|
|
173
|
-
*/
|
|
174
78
|
const IDENT_SHAPE = /^[A-Za-z_$À-][\w$À--]*$/;
|
|
175
|
-
/** A bare word — what separates a keyword from punctuation among anonymous nodes. */
|
|
176
79
|
const WORD_SHAPE = /^[A-Za-z_][A-Za-z_0-9-]*$/;
|
|
177
|
-
/* ------------------------------------------------------- definition names -- */
|
|
178
|
-
/**
|
|
179
|
-
* Every node type that declares something, per language, from the extractors.
|
|
180
|
-
*
|
|
181
|
-
* This is the single piece of per-language knowledge the classifier uses, and
|
|
182
|
-
* it is borrowed rather than restated: the same lists drive extraction, so a
|
|
183
|
-
* language that learns a new declaration form gets its name bolded here for
|
|
184
|
-
* free — and cannot drift, because there is only one list.
|
|
185
|
-
*/
|
|
186
80
|
function definitionTypesFor(extractor) {
|
|
187
81
|
return new Set([
|
|
188
82
|
...extractor.functionTypes,
|
|
@@ -196,12 +90,6 @@ function definitionTypesFor(extractor) {
|
|
|
196
90
|
...(extractor.extraClassNodeTypes ?? []),
|
|
197
91
|
]);
|
|
198
92
|
}
|
|
199
|
-
/**
|
|
200
|
-
* Classify one parsed tree into spans.
|
|
201
|
-
*
|
|
202
|
-
* Exported for tests and for anything that already holds a tree; the usual
|
|
203
|
-
* entry point is {@link tokenizeSource}, which parses first.
|
|
204
|
-
*/
|
|
205
93
|
function classifyTree(root, source, language, offset = 0) {
|
|
206
94
|
const extractor = languages_1.EXTRACTORS[language];
|
|
207
95
|
const ctx = {
|
|
@@ -225,8 +113,6 @@ function visit(node, ctx, inString) {
|
|
|
225
113
|
emit(ctx, node.startIndex, node.endIndex, 'type');
|
|
226
114
|
return;
|
|
227
115
|
}
|
|
228
|
-
// Record the definition's own name BEFORE descending — the name node is a
|
|
229
|
-
// descendant, so the mark has to be in place by the time the walk reaches it.
|
|
230
116
|
if (ctx.defTypes.has(type)) {
|
|
231
117
|
const name = node.childForFieldName(ctx.nameField);
|
|
232
118
|
if (name)
|
|
@@ -246,12 +132,6 @@ function visit(node, ctx, inString) {
|
|
|
246
132
|
}
|
|
247
133
|
function leafClass(node, ctx, inString) {
|
|
248
134
|
const type = node.type;
|
|
249
|
-
// An ANONYMOUS node's `type` is its own literal text, so none of the
|
|
250
|
-
// type-name tests below may be applied to one: `key: string` in TypeScript or
|
|
251
|
-
// PHP is a token whose type is the word `string`, and reading that as a
|
|
252
|
-
// string literal greys out half of every signature. Anonymous means keyword
|
|
253
|
-
// or punctuation, decided on shape alone — which is also what makes `func`,
|
|
254
|
-
// `fn`, `def`, `Sub` and `END-IF` all land right without naming any of them.
|
|
255
135
|
if (!node.isNamed) {
|
|
256
136
|
if (inString)
|
|
257
137
|
return 'string';
|
|
@@ -264,22 +144,12 @@ function leafClass(node, ctx, inString) {
|
|
|
264
144
|
if (isNumberType(type) || CONSTANT_TYPES.has(type))
|
|
265
145
|
return 'number';
|
|
266
146
|
const text = ctx.source.slice(node.startIndex, node.endIndex);
|
|
267
|
-
// Ahead of the type tests: a class name is a `type_identifier` in half these
|
|
268
|
-
// grammars and a plain `identifier` in the other half, and the design bolds
|
|
269
|
-
// the thing being DECLARED either way.
|
|
270
147
|
if (ctx.defStarts.has(node.startIndex) && IDENT_SHAPE.test(text))
|
|
271
148
|
return 'def';
|
|
272
149
|
if (isTypeNameType(type))
|
|
273
150
|
return 'type';
|
|
274
151
|
return IDENT_SHAPE.test(text) ? 'ident' : 'other';
|
|
275
152
|
}
|
|
276
|
-
/**
|
|
277
|
-
* Append a span, skipping empties and merging a run of the same class.
|
|
278
|
-
*
|
|
279
|
-
* Zero-width nodes are real: every grammar with a layout-sensitive scanner
|
|
280
|
-
* (Python's `_newline`, Erlang's, Swift's) emits them, and a zero-width span
|
|
281
|
-
* would put an empty token on the wire for nothing.
|
|
282
|
-
*/
|
|
283
153
|
function emit(ctx, start, end, cls) {
|
|
284
154
|
if (end <= start)
|
|
285
155
|
return;
|
|
@@ -291,16 +161,8 @@ function emit(ctx, start, end, cls) {
|
|
|
291
161
|
}
|
|
292
162
|
ctx.out.push({ start: from, end: end + ctx.offset, cls });
|
|
293
163
|
}
|
|
294
|
-
const SCRIPT_BLOCK =
|
|
295
|
-
const TS_LANG_ATTR = /lang\s*=\s*["'](ts|typescript)["']/i;
|
|
296
|
-
/** Astro's frontmatter: a `---` fence at the very top of the file. */
|
|
164
|
+
const SCRIPT_BLOCK = new RegExp(sfc_script_1.SFC_SCRIPT_ELEMENT.source, 'gi');
|
|
297
165
|
const ASTRO_FRONTMATTER = /^(---\r?\n)([\s\S]*?)\r?\n---/;
|
|
298
|
-
/**
|
|
299
|
-
* The sub-language regions of a file, or null when the file is one language.
|
|
300
|
-
*
|
|
301
|
-
* Null and an empty array mean different things: null is "parse the whole file
|
|
302
|
-
* as `language`", empty is "this file has a grammar for none of it".
|
|
303
|
-
*/
|
|
304
166
|
function syntaxRegionsFor(source, language) {
|
|
305
167
|
if (language !== 'svelte' && language !== 'vue' && language !== 'astro')
|
|
306
168
|
return null;
|
|
@@ -318,23 +180,15 @@ function syntaxRegionsFor(source, language) {
|
|
|
318
180
|
const body = match[2] ?? '';
|
|
319
181
|
if (body.trim() === '')
|
|
320
182
|
continue;
|
|
321
|
-
const start = match.index + match[0].
|
|
183
|
+
const start = match.index + match[0].indexOf('>') + 1;
|
|
322
184
|
regions.push({
|
|
323
185
|
start,
|
|
324
186
|
end: start + body.length,
|
|
325
|
-
language:
|
|
187
|
+
language: (0, sfc_script_1.sfcScriptLanguage)(match[1] ?? '', language),
|
|
326
188
|
});
|
|
327
189
|
}
|
|
328
190
|
return regions;
|
|
329
191
|
}
|
|
330
|
-
/**
|
|
331
|
-
* Parse `source` and classify it.
|
|
332
|
-
*
|
|
333
|
-
* Returns null when nothing in the file has a grammar — a plain answer, which
|
|
334
|
-
* every caller here already knows how to serve. Never throws: a grammar that
|
|
335
|
-
* fails to load or a parse that comes back empty is the same outcome as not
|
|
336
|
-
* having one.
|
|
337
|
-
*/
|
|
338
192
|
async function tokenizeSource(source, language) {
|
|
339
193
|
const regions = syntaxRegionsFor(source, language);
|
|
340
194
|
if (regions === null) {
|
|
@@ -374,8 +228,6 @@ async function tokenizeRegion(source, language, offset) {
|
|
|
374
228
|
}
|
|
375
229
|
}
|
|
376
230
|
catch {
|
|
377
|
-
// A grammar that will not load, or a parse that threw: the caller serves
|
|
378
|
-
// the source unclassified, which is the whole point of the plain path.
|
|
379
231
|
return null;
|
|
380
232
|
}
|
|
381
233
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syntax-tokens.js","sourceRoot":"","sources":["../../src/extraction/syntax-tokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"syntax-tokens.js","sourceRoot":"","sources":["../../src/extraction/syntax-tokens.ts"],"names":[],"mappings":";;;AAqPA,oCAiBC;AAkHD,4CA2BC;AAkBD,wCA0BC;AArZD,2CAAyC;AACzC,yCAAiE;AACjE,iDAAmD;AACnD,6CAAqE;AAaxD,QAAA,oBAAoB,GAAG;IAClC,OAAO;IACP,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,KAAK;CACG,CAAC;AAoBX,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAWD,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACvB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtB,IAAI,KAAK,cAAc;QACvB,IAAI,KAAK,WAAW;QACpB,IAAI,KAAK,mBAAmB;QAC5B,IAAI,KAAK,cAAc;QACvB,IAAI,KAAK,wBAAwB,CAClC,CAAC;AACJ,CAAC;AAWD,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC7B,IAAI,KAAK,uBAAuB;QAChC,IAAI,KAAK,sBAAsB;QAC/B,IAAI,KAAK,mBAAmB,CAC7B,CAAC;AACJ,CAAC;AAGD,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,CACL,IAAI,KAAK,QAAQ;QACjB,IAAI,KAAK,SAAS;QAClB,IAAI,KAAK,OAAO;QAChB,IAAI,KAAK,gBAAgB;QACzB,IAAI,KAAK,iBAAiB;QAC1B,IAAI,KAAK,eAAe;QACxB,IAAI,KAAK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mCAAwB,EAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,IAAI,GAAG,IAAA,gCAAiB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,EAAE,QAAQ;YAAE,OAAO,IAAI,CAAC;QACjC,IAAI,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QAGP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -26,8 +26,44 @@ export declare function getNodeText(node: SyntaxNode, source: string): string;
|
|
|
26
26
|
* Find a child node by field name
|
|
27
27
|
*/
|
|
28
28
|
export declare function getChildByField(node: SyntaxNode, fieldName: string): SyntaxNode | null;
|
|
29
|
+
/**
|
|
30
|
+
* Built-in/primitive type names that shouldn't create references. Shared by the
|
|
31
|
+
* core type-annotation walker and the per-language ones (Dart's), so every type
|
|
32
|
+
* position skips the same names.
|
|
33
|
+
*/
|
|
34
|
+
export declare const BUILTIN_TYPE_NAMES: ReadonlySet<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Number of ARGUMENTS in an `args` node — its named children minus comments.
|
|
37
|
+
*
|
|
38
|
+
* tree-sitter reports `comment` as a NAMED child, so a comment written at the
|
|
39
|
+
* top level of a parameter or argument list (`f(A, % why\n B)`) inflates a
|
|
40
|
+
* plain `namedChildCount`. Anywhere that count is an arity — and arity is part
|
|
41
|
+
* of an Erlang function's identity (#1610) — the comment must not be counted.
|
|
42
|
+
*/
|
|
43
|
+
export declare function namedArgCount(argsNode: SyntaxNode | null | undefined): number;
|
|
29
44
|
/**
|
|
30
45
|
* Get the docstring/comment preceding a node
|
|
46
|
+
*
|
|
47
|
+
* `stepOver` lists node types that may stand between the comments and the
|
|
48
|
+
* declaration without ending the run: Dart's annotations, in `/// Builds it.`
|
|
49
|
+
* `@override` `Widget build(…)`. They are not part of the docstring, and the
|
|
50
|
+
* comments on either side of one join as if it weren't there. Default: none.
|
|
51
|
+
*
|
|
52
|
+
* `skipTrailing` leaves out the comments the run opens with that belong to
|
|
53
|
+
* the line above: one written after code on its line (`const n = 4 // four.`),
|
|
54
|
+
* and any that begins on the line such a comment ends. Go reads them as that
|
|
55
|
+
* line's comment, never the next declaration's doc. Default: off.
|
|
56
|
+
*
|
|
57
|
+
* `skipDetached` keeps only the comments that end on the line right above the
|
|
58
|
+
* declaration, together with the ones written on the lines just before them:
|
|
59
|
+
* a blank line ends the docstring, and a comment that ends on the
|
|
60
|
+
* declaration's own line documents nothing. That is Go's doc comment, the one
|
|
61
|
+
* go doc shows. Default: off.
|
|
62
|
+
*
|
|
63
|
+
* `skipDirectives` leaves the comment directives Go tools read, like
|
|
64
|
+
* `//go:embed static` or `//nolint:errcheck`, out of the docstring's text, as
|
|
65
|
+
* go doc does. They still count as comments when the other options decide
|
|
66
|
+
* where the docstring starts. Default: off.
|
|
31
67
|
*/
|
|
32
|
-
export declare function getPrecedingDocstring(node: SyntaxNode, source: string): string | undefined;
|
|
68
|
+
export declare function getPrecedingDocstring(node: SyntaxNode, source: string, stepOver?: readonly string[], skipTrailing?: boolean, skipDetached?: boolean, skipDirectives?: boolean): string | undefined;
|
|
33
69
|
//# sourceMappingURL=tree-sitter-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-sitter-helpers.d.ts","sourceRoot":"","sources":["../../src/extraction/tree-sitter-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO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;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAEtF;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAcjD,CAAC;AAmDH;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAG7E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,YAAY,UAAQ,EACpB,YAAY,UAAQ,EACpB,cAAc,UAAQ,GACrB,MAAM,GAAG,SAAS,CAgEpB"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Tree-sitter Shared Helpers
|
|
4
|
-
*
|
|
5
|
-
* Utility functions used by the core TreeSitterExtractor and per-language extractors.
|
|
6
|
-
* Extracted to a leaf module to avoid circular imports between tree-sitter.ts and languages/.
|
|
7
|
-
*/
|
|
8
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
3
|
if (k2 === undefined) k2 = k;
|
|
10
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -39,18 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
39
33
|
};
|
|
40
34
|
})();
|
|
41
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.NodeIdAllocator = void 0;
|
|
36
|
+
exports.BUILTIN_TYPE_NAMES = exports.NodeIdAllocator = void 0;
|
|
43
37
|
exports.generateNodeId = generateNodeId;
|
|
44
38
|
exports.getNodeText = getNodeText;
|
|
45
39
|
exports.getChildByField = getChildByField;
|
|
40
|
+
exports.namedArgCount = namedArgCount;
|
|
46
41
|
exports.getPrecedingDocstring = getPrecedingDocstring;
|
|
47
42
|
const crypto = __importStar(require("crypto"));
|
|
48
|
-
/**
|
|
49
|
-
* Generate a unique node ID
|
|
50
|
-
*
|
|
51
|
-
* Uses a 32-character (128-bit) hash to avoid collisions when indexing
|
|
52
|
-
* large codebases with many files containing similar symbols.
|
|
53
|
-
*/
|
|
54
43
|
function generateNodeId(filePath, kind, name, line) {
|
|
55
44
|
const hash = crypto
|
|
56
45
|
.createHash('sha256')
|
|
@@ -59,7 +48,6 @@ function generateNodeId(filePath, kind, name, line) {
|
|
|
59
48
|
.substring(0, 32);
|
|
60
49
|
return `${kind}:${hash}`;
|
|
61
50
|
}
|
|
62
|
-
/** Per-extraction identities: preserve legacy IDs unless distinct source positions collide. */
|
|
63
51
|
class NodeIdAllocator {
|
|
64
52
|
firstColumns = new Map();
|
|
65
53
|
generate(filePath, kind, name, line, column) {
|
|
@@ -69,54 +57,36 @@ class NodeIdAllocator {
|
|
|
69
57
|
this.firstColumns.set(id, column);
|
|
70
58
|
return id;
|
|
71
59
|
}
|
|
72
|
-
// Columns are zero-based UTF-16 code units in both wasm and the kernel.
|
|
73
|
-
// Revisiting the same declaration must still produce the same identity.
|
|
74
60
|
return firstColumn === column ? id : `${id}:${column}`;
|
|
75
61
|
}
|
|
76
62
|
}
|
|
77
63
|
exports.NodeIdAllocator = NodeIdAllocator;
|
|
78
|
-
/**
|
|
79
|
-
* Extract text from a syntax node
|
|
80
|
-
*/
|
|
81
64
|
function getNodeText(node, source) {
|
|
82
65
|
return source.substring(node.startIndex, node.endIndex);
|
|
83
66
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Find a child node by field name
|
|
86
|
-
*/
|
|
87
67
|
function getChildByField(node, fieldName) {
|
|
88
68
|
return node.childForFieldName(fieldName);
|
|
89
69
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
70
|
+
exports.BUILTIN_TYPE_NAMES = new Set([
|
|
71
|
+
'string', 'number', 'boolean', 'void', 'null', 'undefined', 'never', 'any', 'unknown',
|
|
72
|
+
'object', 'symbol', 'bigint', 'true', 'false',
|
|
73
|
+
'str', 'bool', 'i8', 'i16', 'i32', 'i64', 'i128', 'isize',
|
|
74
|
+
'u8', 'u16', 'u32', 'u64', 'u128', 'usize', 'f32', 'f64', 'char',
|
|
75
|
+
'int', 'long', 'short', 'byte', 'float', 'double', 'char',
|
|
76
|
+
'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64',
|
|
77
|
+
'float32', 'float64', 'complex64', 'complex128', 'rune', 'error',
|
|
78
|
+
'Int', 'Long', 'Short', 'Byte', 'Float', 'Double', 'Boolean', 'Char', 'Unit',
|
|
79
|
+
'String', 'Any', 'AnyRef', 'AnyVal', 'Nothing', 'Null',
|
|
80
|
+
]);
|
|
99
81
|
const DOCSTRING_WRAPPER_TYPES = new Set([
|
|
100
|
-
'export_statement',
|
|
101
|
-
'decorated_definition',
|
|
102
|
-
'lexical_declaration',
|
|
103
|
-
'variable_declaration',
|
|
104
|
-
'variable_declarator',
|
|
105
|
-
'ambient_declaration',
|
|
82
|
+
'export_statement',
|
|
83
|
+
'decorated_definition',
|
|
84
|
+
'lexical_declaration',
|
|
85
|
+
'variable_declaration',
|
|
86
|
+
'variable_declarator',
|
|
87
|
+
'ambient_declaration',
|
|
88
|
+
'implementation_definition',
|
|
106
89
|
]);
|
|
107
|
-
/**
|
|
108
|
-
* Strip comment-syntax markers from a raw comment so the stored docstring is
|
|
109
|
-
* just the prose. Covers the marker styles across every supported language:
|
|
110
|
-
* C-family line and block comments and their doc variants, Rust/Swift/Kotlin
|
|
111
|
-
* triple-slash and bang doc lines, hash lines (Python/Ruby/shell), Lua/Luau
|
|
112
|
-
* line and long-bracket comments, and Pascal brace and paren-star comments.
|
|
113
|
-
* (#780)
|
|
114
|
-
*
|
|
115
|
-
* Paired block delimiters are stripped only when the comment OPENS with one,
|
|
116
|
-
* so a line comment that merely happens to END with a closing delimiter is
|
|
117
|
-
* never truncated. The per-line markers are anchored at line start, so
|
|
118
|
-
* they're safe to apply to any comment.
|
|
119
|
-
*/
|
|
120
90
|
function cleanCommentMarkers(comment) {
|
|
121
91
|
let c = comment.trim();
|
|
122
92
|
if (c.startsWith('/*'))
|
|
@@ -128,22 +98,19 @@ function cleanCommentMarkers(comment) {
|
|
|
128
98
|
else if (c.startsWith('{'))
|
|
129
99
|
c = c.replace(/^\{/, '').replace(/\}$/, '');
|
|
130
100
|
return c
|
|
131
|
-
.replace(/^\/\/[/!]?\s?/gm, '')
|
|
132
|
-
.replace(/^--\s?/gm, '')
|
|
133
|
-
.replace(/^#\s?/gm, '')
|
|
134
|
-
.replace(/^%+\s?/gm, '')
|
|
135
|
-
.replace(/^\s*\*\s?/gm, '')
|
|
101
|
+
.replace(/^\/\/[/!]?\s?/gm, '')
|
|
102
|
+
.replace(/^--\s?/gm, '')
|
|
103
|
+
.replace(/^#\s?/gm, '')
|
|
104
|
+
.replace(/^%+\s?/gm, '')
|
|
105
|
+
.replace(/^\s*\*\s?/gm, '')
|
|
136
106
|
.trim();
|
|
137
107
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
// The emitted node's own `previousNamedSibling` is empty (export/const) or a
|
|
145
|
-
// decorator (Python) in those cases, so without this the docstring was
|
|
146
|
-
// dropped. (#780)
|
|
108
|
+
function namedArgCount(argsNode) {
|
|
109
|
+
if (!argsNode)
|
|
110
|
+
return 0;
|
|
111
|
+
return argsNode.namedChildren.filter((c) => c.type !== 'comment').length;
|
|
112
|
+
}
|
|
113
|
+
function getPrecedingDocstring(node, source, stepOver = [], skipTrailing = false, skipDetached = false, skipDirectives = false) {
|
|
147
114
|
let anchor = node;
|
|
148
115
|
while (anchor.parent && DOCSTRING_WRAPPER_TYPES.has(anchor.parent.type)) {
|
|
149
116
|
anchor = anchor.parent;
|
|
@@ -155,16 +122,57 @@ function getPrecedingDocstring(node, source) {
|
|
|
155
122
|
sibling.type === 'line_comment' ||
|
|
156
123
|
sibling.type === 'block_comment' ||
|
|
157
124
|
sibling.type === 'documentation_comment') {
|
|
158
|
-
comments.unshift(
|
|
125
|
+
comments.unshift(sibling);
|
|
126
|
+
sibling = sibling.previousNamedSibling;
|
|
127
|
+
}
|
|
128
|
+
else if (stepOver.includes(sibling.type)) {
|
|
159
129
|
sibling = sibling.previousNamedSibling;
|
|
160
130
|
}
|
|
161
131
|
else {
|
|
162
132
|
break;
|
|
163
133
|
}
|
|
164
134
|
}
|
|
165
|
-
|
|
135
|
+
let first = 0;
|
|
136
|
+
if (skipTrailing) {
|
|
137
|
+
let endRow = -1;
|
|
138
|
+
for (const comment of comments) {
|
|
139
|
+
const trails = first === 0 ? followsCodeOnItsLine(comment, source) : comment.startPosition.row === endRow;
|
|
140
|
+
if (!trails)
|
|
141
|
+
break;
|
|
142
|
+
endRow = comment.endPosition.row;
|
|
143
|
+
first++;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (skipDetached) {
|
|
147
|
+
let start = comments.length;
|
|
148
|
+
if (start > first && comments[start - 1].endPosition.row + 1 === anchor.startPosition.row) {
|
|
149
|
+
start--;
|
|
150
|
+
while (start > first && comments[start - 1].endPosition.row + 1 >= comments[start].startPosition.row) {
|
|
151
|
+
start--;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
first = start;
|
|
155
|
+
}
|
|
156
|
+
const docComments = comments
|
|
157
|
+
.slice(first)
|
|
158
|
+
.filter((c) => !skipDirectives || !isDirective(getNodeText(c, source)));
|
|
159
|
+
if (docComments.length === 0)
|
|
166
160
|
return undefined;
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
return docComments
|
|
162
|
+
.map((c) => cleanCommentMarkers(getNodeText(c, source)))
|
|
163
|
+
.join('\n')
|
|
164
|
+
.trim();
|
|
165
|
+
}
|
|
166
|
+
function isDirective(comment) {
|
|
167
|
+
if (!comment.startsWith('//'))
|
|
168
|
+
return false;
|
|
169
|
+
const text = comment.slice(2);
|
|
170
|
+
return /^(?:line|extern|export) /.test(text) || /^[a-z0-9]+:[a-z0-9]/.test(text);
|
|
171
|
+
}
|
|
172
|
+
function followsCodeOnItsLine(node, source) {
|
|
173
|
+
let i = node.startIndex;
|
|
174
|
+
while (i > 0 && (source[i - 1] === ' ' || source[i - 1] === '\t'))
|
|
175
|
+
i--;
|
|
176
|
+
return i > 0 && source[i - 1] !== '\n' && source[i - 1] !== '\r';
|
|
169
177
|
}
|
|
170
178
|
//# sourceMappingURL=tree-sitter-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-sitter-helpers.js","sourceRoot":"","sources":["../../src/extraction/tree-sitter-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tree-sitter-helpers.js","sourceRoot":"","sources":["../../src/extraction/tree-sitter-helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,wCAYC;AAsBD,kCAEC;AAKD,0CAEC;AAgFD,sCAGC;AA0BD,sDAuEC;AAxOD,+CAAiC;AASjC,SAAgB,cAAc,CAC5B,QAAgB,EAChB,IAAc,EACd,IAAY,EACZ,IAAY;IAEZ,MAAM,IAAI,GAAG,MAAM;SAChB,UAAU,CAAC,QAAQ,CAAC;SACpB,MAAM,CAAC,GAAG,QAAQ,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;SAC7C,MAAM,CAAC,KAAK,CAAC;SACb,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AAC3B,CAAC;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