@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,30 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* `codegraph upgrade`
|
|
4
|
-
*
|
|
5
|
-
* Self-update for the CLI, whatever way it was installed:
|
|
6
|
-
*
|
|
7
|
-
* - **bundle** — the self-contained runtime+app installed by `install.sh`
|
|
8
|
-
* (Linux/macOS) or `install.ps1` (Windows). Upgrading re-runs the SAME
|
|
9
|
-
* canonical installer script (single source of truth) so the download /
|
|
10
|
-
* version-resolution / PATH logic never drifts between first-install and
|
|
11
|
-
* upgrade.
|
|
12
|
-
* - **npm** — installed via `npm i -g @colbymchenry/codegraph`. Upgrading
|
|
13
|
-
* shells out to npm.
|
|
14
|
-
* - **npx** — ephemeral; nothing to upgrade (next `npx` fetches latest).
|
|
15
|
-
* - **source** — a git checkout running its own `dist/`; `git pull` + rebuild.
|
|
16
|
-
*
|
|
17
|
-
* Detection is structural (see `detectInstallMethod`): a bundle carries a
|
|
18
|
-
* vendored `node` binary and a `bin/codegraph` launcher next to its `lib/`, so
|
|
19
|
-
* we can recognize it from the running file's path without a marker file.
|
|
20
|
-
*
|
|
21
|
-
* Windows wrinkle: a running `node.exe` and a loaded `.node` addon are locked —
|
|
22
|
-
* they can't be overwritten or deleted, by this process or by the MCP servers
|
|
23
|
-
* of open agent sessions. They CAN be renamed, so the Windows upgrade unpacks
|
|
24
|
-
* the new bundle next to `current\` and swaps it in file by file, renaming each
|
|
25
|
-
* replaced file aside and rolling every step back on failure (see
|
|
26
|
-
* `WINDOWS_SWAP_FUNCTION`, shared verbatim with `install.ps1`).
|
|
27
|
-
*/
|
|
28
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
3
|
if (k2 === undefined) k2 = k;
|
|
30
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -91,19 +65,7 @@ exports.INSTALL_PS1_URL = `${RAW_BASE}/install.ps1`;
|
|
|
91
65
|
function toPosix(p) {
|
|
92
66
|
return p.replace(/\\/g, '/');
|
|
93
67
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Where the bundle installer keeps its install root, derived from the bundle
|
|
96
|
-
* dir so an upgrade reuses a custom `CODEGRAPH_INSTALL_DIR`. Returns null when
|
|
97
|
-
* the layout isn't the one the installer creates (then the installer falls
|
|
98
|
-
* back to its own default).
|
|
99
|
-
*
|
|
100
|
-
* unix: <installDir>/versions/<vX.Y.Z> (bundleRoot) → <installDir>
|
|
101
|
-
* windows: <installDir>\current (bundleRoot) → <installDir>
|
|
102
|
-
*/
|
|
103
68
|
function deriveInstallDir(bundleRoot, os, exists) {
|
|
104
|
-
// Use the TARGET platform's path semantics (not the host's), so this is
|
|
105
|
-
// deterministic when reasoning about a Windows layout from a POSIX host (CI)
|
|
106
|
-
// and vice-versa. In production `os` always matches the running platform.
|
|
107
69
|
const P = os === 'windows' ? path.win32 : path.posix;
|
|
108
70
|
if (os === 'windows') {
|
|
109
71
|
if (P.basename(bundleRoot).toLowerCase() === 'current') {
|
|
@@ -111,7 +73,6 @@ function deriveInstallDir(bundleRoot, os, exists) {
|
|
|
111
73
|
}
|
|
112
74
|
return null;
|
|
113
75
|
}
|
|
114
|
-
// unix: bundleRoot is <installDir>/versions/<version>
|
|
115
76
|
const parent = P.dirname(bundleRoot);
|
|
116
77
|
if (P.basename(parent) === 'versions') {
|
|
117
78
|
const installDir = P.dirname(parent);
|
|
@@ -122,32 +83,24 @@ function deriveInstallDir(bundleRoot, os, exists) {
|
|
|
122
83
|
function detectInstallMethod(input) {
|
|
123
84
|
const exists = input.exists ?? fs.existsSync;
|
|
124
85
|
const isWin = input.platform === 'win32';
|
|
125
|
-
// Path math keyed on the TARGET platform so detection is host-independent
|
|
126
|
-
// (a Windows layout resolves correctly even when unit-tested on macOS/Linux).
|
|
127
86
|
const P = isWin ? path.win32 : path.posix;
|
|
128
|
-
const binDir = P.dirname(input.filename);
|
|
87
|
+
const binDir = P.dirname(input.filename);
|
|
129
88
|
const norm = toPosix(input.filename);
|
|
130
|
-
// Path-based checks come FIRST. The npm thin-installer's per-platform
|
|
131
|
-
// package (@colbymchenry/codegraph-<platform>-<arch>) is itself a complete
|
|
132
|
-
// bundle — vendored node + bin/ launcher — living inside node_modules, so
|
|
133
|
-
// the layout sniff below would misread every npm install as a standalone
|
|
134
|
-
// bundle. `upgrade` would then curl install.sh into ~/.codegraph: a SECOND
|
|
135
|
-
// install that never wins the PATH race against npm's shim, leaving
|
|
136
|
-
// `codegraph -v` permanently on the old version (the #1071 shadow,
|
|
137
|
-
// self-inflicted). A path under node_modules is authoritative about HOW the
|
|
138
|
-
// user installed, whatever the artifact inside looks like.
|
|
139
|
-
// npx cache: <…>/_npx/<hash>/node_modules/@colbymchenry/codegraph/…
|
|
140
|
-
// (checked before npm — the npx cache path also contains /node_modules/).
|
|
141
89
|
if (norm.includes('/_npx/')) {
|
|
142
90
|
return { kind: 'npx' };
|
|
143
91
|
}
|
|
144
|
-
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
|
|
92
|
+
const nodeModulesAt = norm.indexOf('/node_modules/');
|
|
93
|
+
if (nodeModulesAt !== -1) {
|
|
94
|
+
let owner = input.filename.slice(0, nodeModulesAt);
|
|
95
|
+
if (owner === '' || /^[A-Za-z]:$/.test(owner))
|
|
96
|
+
owner += P.sep;
|
|
97
|
+
const manager = otherPackageManager(norm, owner, P, exists);
|
|
98
|
+
if (manager)
|
|
99
|
+
return manager;
|
|
100
|
+
if (isNpmGlobalTree(owner, P, isWin, exists))
|
|
101
|
+
return { kind: 'npm', scope: 'global' };
|
|
102
|
+
return { kind: 'npm', scope: 'local', root: P.resolve(owner) };
|
|
148
103
|
}
|
|
149
|
-
// Bundle: <root>/lib/dist/bin/codegraph.js → <root> is up 3 from bin/.
|
|
150
|
-
// A bundle has a vendored node + a launcher script as siblings of lib/.
|
|
151
104
|
const bundleRoot = P.resolve(binDir, '..', '..', '..');
|
|
152
105
|
const vendoredNode = P.join(bundleRoot, isWin ? 'node.exe' : 'node');
|
|
153
106
|
const launcher = P.join(bundleRoot, 'bin', isWin ? 'codegraph.cmd' : 'codegraph');
|
|
@@ -155,13 +108,36 @@ function detectInstallMethod(input) {
|
|
|
155
108
|
const os = isWin ? 'windows' : 'unix';
|
|
156
109
|
return { kind: 'bundle', os, bundleRoot, installDir: deriveInstallDir(bundleRoot, os, exists) };
|
|
157
110
|
}
|
|
158
|
-
// Source checkout: running <repo>/dist/bin/codegraph.js with a sibling .git.
|
|
159
111
|
const repoRoot = P.resolve(binDir, '..', '..');
|
|
160
112
|
if (exists(P.join(repoRoot, 'package.json')) && exists(P.join(repoRoot, '.git'))) {
|
|
161
113
|
return { kind: 'source', root: repoRoot };
|
|
162
114
|
}
|
|
163
115
|
return { kind: 'unknown', reason: `unrecognized install layout at ${input.filename}` };
|
|
164
116
|
}
|
|
117
|
+
function otherPackageManager(norm, owner, P, exists) {
|
|
118
|
+
const where = toPosix(owner).toLowerCase();
|
|
119
|
+
if (norm.includes('/node_modules/.pnpm/') || exists(P.join(owner, 'pnpm-lock.yaml'))) {
|
|
120
|
+
return { kind: 'package-manager', manager: 'pnpm', global: /\/pnpm\/global\//.test(where + '/') };
|
|
121
|
+
}
|
|
122
|
+
if (exists(P.join(owner, 'yarn.lock'))) {
|
|
123
|
+
return { kind: 'package-manager', manager: 'yarn', global: /\/yarn\/(?:data\/)?global$/.test(where) };
|
|
124
|
+
}
|
|
125
|
+
if (exists(P.join(owner, 'bun.lockb')) || exists(P.join(owner, 'bun.lock'))) {
|
|
126
|
+
return { kind: 'package-manager', manager: 'bun', global: /\/\.bun\/install\/global$/.test(where) };
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
function isNpmGlobalTree(owner, P, isWin, exists) {
|
|
131
|
+
const globalLauncher = isWin
|
|
132
|
+
? exists(P.join(owner, 'codegraph.cmd'))
|
|
133
|
+
: P.basename(owner) === 'lib' && exists(P.join(P.dirname(owner), 'bin', 'codegraph'));
|
|
134
|
+
if (globalLauncher)
|
|
135
|
+
return true;
|
|
136
|
+
const bin = P.join(owner, 'node_modules', '.bin');
|
|
137
|
+
const local = exists(P.join(bin, 'codegraph')) || exists(P.join(bin, 'codegraph.cmd'))
|
|
138
|
+
|| exists(P.join(owner, 'package.json'));
|
|
139
|
+
return !local;
|
|
140
|
+
}
|
|
165
141
|
function parseSemver(version) {
|
|
166
142
|
const m = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(version.trim());
|
|
167
143
|
if (!m)
|
|
@@ -173,7 +149,6 @@ function parseSemver(version) {
|
|
|
173
149
|
pre: m[4] ?? null,
|
|
174
150
|
};
|
|
175
151
|
}
|
|
176
|
-
/** Returns >0 if a>b, <0 if a<b, 0 if equal. Throws on unparseable input. */
|
|
177
152
|
function compareVersions(a, b) {
|
|
178
153
|
const sa = parseSemver(a);
|
|
179
154
|
const sb = parseSemver(b);
|
|
@@ -185,7 +160,6 @@ function compareVersions(a, b) {
|
|
|
185
160
|
return sa.minor - sb.minor;
|
|
186
161
|
if (sa.patch !== sb.patch)
|
|
187
162
|
return sa.patch - sb.patch;
|
|
188
|
-
// A prerelease is "less than" its release (1.0.0-rc < 1.0.0).
|
|
189
163
|
if (sa.pre && !sb.pre)
|
|
190
164
|
return -1;
|
|
191
165
|
if (!sa.pre && sb.pre)
|
|
@@ -199,34 +173,23 @@ function isUpdateAvailable(current, latest) {
|
|
|
199
173
|
return compareVersions(latest, current) > 0;
|
|
200
174
|
}
|
|
201
175
|
catch {
|
|
202
|
-
// If either is unparseable (e.g. a dev "0.0.0-unknown"), treat differing
|
|
203
|
-
// strings as "update available" so the user isn't stuck.
|
|
204
176
|
return normalizeVersion(current) !== normalizeVersion(latest);
|
|
205
177
|
}
|
|
206
178
|
}
|
|
207
|
-
/** `0.9.9` / `v0.9.9` → `v0.9.9` (release tags are v-prefixed). */
|
|
208
179
|
function normalizeVersion(v) {
|
|
209
180
|
const t = v.trim();
|
|
210
181
|
return t.startsWith('v') ? t : `v${t}`;
|
|
211
182
|
}
|
|
212
|
-
/** Strip a leading `v`: `v0.9.9` → `0.9.9`. */
|
|
213
183
|
function stripV(v) {
|
|
214
184
|
const t = v.trim();
|
|
215
185
|
return t.startsWith('v') ? t.slice(1) : t;
|
|
216
186
|
}
|
|
217
|
-
/**
|
|
218
|
-
* Parse the release tag out of the `Location` header GitHub returns for
|
|
219
|
-
* `/releases/latest` → `…/releases/tag/v0.9.9`. Pure so it's unit-tested.
|
|
220
|
-
*/
|
|
221
187
|
function parseLatestTagFromLocation(location) {
|
|
222
188
|
if (!location)
|
|
223
189
|
return null;
|
|
224
190
|
const m = /\/releases\/tag\/([^/?#]+)/.exec(location);
|
|
225
191
|
return m ? decodeURIComponent(m[1]) : null;
|
|
226
192
|
}
|
|
227
|
-
// ---------------------------------------------------------------------------
|
|
228
|
-
// Latest-version resolution (network)
|
|
229
|
-
// ---------------------------------------------------------------------------
|
|
230
193
|
function httpsGet(url, headers, timeoutMs) {
|
|
231
194
|
return new Promise((resolve, reject) => {
|
|
232
195
|
const req = https.get(url, { headers }, (res) => {
|
|
@@ -238,15 +201,6 @@ function httpsGet(url, headers, timeoutMs) {
|
|
|
238
201
|
req.setTimeout(timeoutMs, () => req.destroy(new Error(`request timed out after ${timeoutMs}ms`)));
|
|
239
202
|
});
|
|
240
203
|
}
|
|
241
|
-
/**
|
|
242
|
-
* Resolve the latest release tag (e.g. `v0.9.9`).
|
|
243
|
-
*
|
|
244
|
-
* Primary: read the redirect `Location` from `github.com/<repo>/releases/latest`
|
|
245
|
-
* — same trick install.sh uses, because the unauthenticated GitHub API is
|
|
246
|
-
* rate-limited to 60 req/h/IP and 403s on shared/cloud hosts (issue #325). The
|
|
247
|
-
* redirect has no such limit. Fall back to the API only if the redirect can't
|
|
248
|
-
* be read.
|
|
249
|
-
*/
|
|
250
204
|
async function resolveLatestVersion(repo = exports.REPO, timeoutMs = 12000) {
|
|
251
205
|
try {
|
|
252
206
|
const res = await httpsGet(`https://github.com/${repo}/releases/latest`, { 'User-Agent': 'codegraph-upgrade' }, timeoutMs);
|
|
@@ -256,7 +210,6 @@ async function resolveLatestVersion(repo = exports.REPO, timeoutMs = 12000) {
|
|
|
256
210
|
return normalizeVersion(tag);
|
|
257
211
|
}
|
|
258
212
|
catch {
|
|
259
|
-
/* fall through to API */
|
|
260
213
|
}
|
|
261
214
|
try {
|
|
262
215
|
const res = await httpsGet(`https://api.github.com/repos/${repo}/releases/latest`, { 'User-Agent': 'codegraph-upgrade', Accept: 'application/vnd.github+json' }, timeoutMs);
|
|
@@ -265,11 +218,9 @@ async function resolveLatestVersion(repo = exports.REPO, timeoutMs = 12000) {
|
|
|
265
218
|
return normalizeVersion(tag);
|
|
266
219
|
}
|
|
267
220
|
catch {
|
|
268
|
-
/* fall through to error */
|
|
269
221
|
}
|
|
270
222
|
throw new Error('could not resolve the latest version from GitHub. Check your network, or pin a version: `codegraph upgrade <version>`.');
|
|
271
223
|
}
|
|
272
|
-
// Colors off when piped / NO_COLOR / --no-color (#1281).
|
|
273
224
|
const useColor = (0, color_1.ansiColorsEnabled)();
|
|
274
225
|
const c = {
|
|
275
226
|
bold: (s) => (useColor ? `\x1b[1m${s}\x1b[0m` : s),
|
|
@@ -278,22 +229,16 @@ const c = {
|
|
|
278
229
|
yellow: (s) => (useColor ? `\x1b[33m${s}\x1b[0m` : s),
|
|
279
230
|
cyan: (s) => (useColor ? `\x1b[36m${s}\x1b[0m` : s),
|
|
280
231
|
};
|
|
281
|
-
/** The honest, additive re-index reminder shown after a successful upgrade. */
|
|
282
232
|
function reindexAdvisory() {
|
|
283
233
|
return [
|
|
284
234
|
c.dim('Your existing project indexes keep working, but were built by the previous version.'),
|
|
285
|
-
c.dim('To pick up this version’s extraction improvements,
|
|
286
|
-
` ${c.cyan('codegraph
|
|
287
|
-
` ${c.cyan('codegraph index -f')} ${c.dim('# full rebuild')}`,
|
|
235
|
+
c.dim('To pick up this version’s extraction improvements, rebuild each project:'),
|
|
236
|
+
` ${c.cyan('codegraph index')} ${c.dim('# full rebuild')}`,
|
|
288
237
|
c.dim('(`codegraph status` flags any index that predates the engine you’re running.)'),
|
|
289
238
|
].join('\n');
|
|
290
239
|
}
|
|
291
|
-
/**
|
|
292
|
-
* Returns the process exit code (0 = success / nothing to do, 1 = failure).
|
|
293
|
-
*/
|
|
294
240
|
async function runUpgrade(opts, deps) {
|
|
295
241
|
const { currentVersion, method } = deps;
|
|
296
|
-
// Resolve the target version (pinned or latest).
|
|
297
242
|
let latest;
|
|
298
243
|
try {
|
|
299
244
|
latest = normalizeVersion(opts.version || (await deps.resolveLatest()));
|
|
@@ -320,9 +265,6 @@ async function runUpgrade(opts, deps) {
|
|
|
320
265
|
deps.log(c.dim('Use `--force` to reinstall, or `codegraph upgrade <version>` to change versions.'));
|
|
321
266
|
return 0;
|
|
322
267
|
}
|
|
323
|
-
// Dispatch by install method. bundle/npm perform a real binary update, so
|
|
324
|
-
// after they succeed we self-heal the front-load hook (below); npx/source/
|
|
325
|
-
// unknown don't update anything here, so they return directly.
|
|
326
268
|
let code;
|
|
327
269
|
switch (method.kind) {
|
|
328
270
|
case 'bundle':
|
|
@@ -331,14 +273,23 @@ async function runUpgrade(opts, deps) {
|
|
|
331
273
|
: upgradeUnixBundle(method, opts.version ? latest : undefined, deps));
|
|
332
274
|
break;
|
|
333
275
|
case 'npm':
|
|
334
|
-
// npm version specs have no leading "v" (`@0.9.8`, not `@v0.9.8` — the
|
|
335
|
-
// latter resolves as a nonexistent dist-tag).
|
|
336
276
|
code = await upgradeNpm(method, opts.version ? stripV(latest) : 'latest', deps);
|
|
337
277
|
break;
|
|
338
278
|
case 'npx':
|
|
339
279
|
deps.log(c.green('npx always runs the latest version on demand — nothing to upgrade.'));
|
|
340
280
|
deps.log(c.dim(`Force a fresh fetch with: npx ${exports.NPM_PACKAGE}@latest`));
|
|
341
281
|
return 0;
|
|
282
|
+
case 'package-manager': {
|
|
283
|
+
const pkg = `${exports.NPM_PACKAGE}@${opts.version ? stripV(latest) : 'latest'}`;
|
|
284
|
+
const command = {
|
|
285
|
+
pnpm: method.global ? `pnpm add -g ${pkg}` : `pnpm add ${pkg}`,
|
|
286
|
+
yarn: method.global ? `yarn global add ${pkg}` : `yarn add ${pkg}`,
|
|
287
|
+
bun: method.global ? `bun add -g ${pkg}` : `bun add ${pkg}`,
|
|
288
|
+
}[method.manager];
|
|
289
|
+
deps.warn(`This CodeGraph was installed with ${method.manager}, so npm can't upgrade it.`);
|
|
290
|
+
deps.log(c.dim(`Upgrade it with: ${command}`));
|
|
291
|
+
return 1;
|
|
292
|
+
}
|
|
342
293
|
case 'source':
|
|
343
294
|
deps.warn(`Running from a source checkout at ${method.root}.`);
|
|
344
295
|
deps.log(c.dim('Upgrade it with: git pull && npm run build'));
|
|
@@ -348,95 +299,61 @@ async function runUpgrade(opts, deps) {
|
|
|
348
299
|
deps.log(c.dim(`Reinstall manually — see https://github.com/${exports.REPO}#install`));
|
|
349
300
|
return 1;
|
|
350
301
|
}
|
|
351
|
-
// After a successful update, ensure the front-load prompt hook is wired for an
|
|
352
|
-
// already-configured global Claude install — so existing users pick it up on
|
|
353
|
-
// upgrade, not only on a fresh `install` (the hook config is version-agnostic,
|
|
354
|
-
// so the still-running old binary can write it safely). Idempotent + gated on
|
|
355
|
-
// an existing Claude config, and skipped entirely by the kill-switch. Never
|
|
356
|
-
// fatal to the upgrade.
|
|
357
302
|
if (code === 0) {
|
|
358
303
|
let probe = 'inconclusive';
|
|
359
304
|
try {
|
|
360
305
|
probe = reportResolvedVersion(latest, deps);
|
|
361
306
|
}
|
|
362
307
|
catch {
|
|
363
|
-
/* an inconclusive probe must not fail the upgrade */
|
|
364
308
|
}
|
|
365
309
|
try {
|
|
366
310
|
await selfHealPromptHook(deps);
|
|
367
311
|
}
|
|
368
312
|
catch {
|
|
369
|
-
/* a hook-wiring hiccup must not fail the upgrade */
|
|
370
313
|
}
|
|
371
|
-
// The refresh executes whatever `codegraph` PATH resolves. If the probe
|
|
372
|
-
// just proved that's a stale shadowed install, spawning it would rewrite
|
|
373
|
-
// the agent surfaces with the very templates the refresh exists to heal —
|
|
374
|
-
// skip, and point at the manual command for after the PATH is fixed.
|
|
375
314
|
if (probe !== 'mismatch') {
|
|
376
315
|
try {
|
|
377
316
|
selfHealInstalledSurfaces(deps);
|
|
378
317
|
}
|
|
379
318
|
catch {
|
|
380
|
-
/* a refresh hiccup must not fail the upgrade */
|
|
381
319
|
}
|
|
382
320
|
}
|
|
383
321
|
else {
|
|
384
322
|
deps.log(c.dim('Skipped refreshing agent instructions/config — run `codegraph install --refresh` once the PATH is fixed.'));
|
|
385
323
|
}
|
|
386
|
-
// Reached only after a real binary update (check/up-to-date/npx/source
|
|
387
|
-
// all returned earlier) — the one place the upgrade path may offer the
|
|
388
|
-
// beta opt-in. The hook self-gates on TTY + the stored once-per-machine
|
|
389
|
-
// choice, so an already-answered user never sees it again.
|
|
390
324
|
try {
|
|
391
325
|
await deps.offerBetaSignup?.();
|
|
392
326
|
}
|
|
393
327
|
catch {
|
|
394
|
-
/* a marketing question must never fail the upgrade */
|
|
395
328
|
}
|
|
396
329
|
}
|
|
397
330
|
return code;
|
|
398
331
|
}
|
|
399
|
-
/**
|
|
400
|
-
* Prove the upgrade actually took: spawn the `codegraph` this terminal's PATH
|
|
401
|
-
* resolves and compare its reported version to the target. Catches the silent
|
|
402
|
-
* failure mode where ANOTHER install shadows the one we just upgraded (issue
|
|
403
|
-
* #1071 — e.g. a stale `npm i -g` copy earlier on PATH than the bundle
|
|
404
|
-
* launcher): the upgrade "succeeds" but `codegraph -v` — in this terminal and
|
|
405
|
-
* every future one — keeps serving the old version. Exported for unit tests.
|
|
406
|
-
*/
|
|
407
332
|
function verifyResolvedVersion(latest, deps) {
|
|
408
333
|
if (!deps.hasCommand('codegraph'))
|
|
409
334
|
return 'inconclusive';
|
|
410
|
-
// Windows installs expose codegraph through a .cmd launcher; Node can't
|
|
411
|
-
// spawn .cmd files without a shell, so route through cmd.exe there.
|
|
412
335
|
const probe = deps.platform === 'win32'
|
|
413
336
|
? deps.capture('cmd.exe', ['/d', '/s', '/c', 'codegraph --version'])
|
|
414
337
|
: deps.capture('codegraph', ['--version']);
|
|
415
338
|
if (!probe || probe.code !== 0)
|
|
416
339
|
return 'inconclusive';
|
|
417
|
-
// `codegraph --version` prints the bare version; take the last non-empty
|
|
418
|
-
// line so a stray runtime warning above it can't spoil the parse.
|
|
419
340
|
const reported = probe.stdout.trim().split(/\r?\n/).pop()?.trim() ?? '';
|
|
420
341
|
if (!parseSemver(reported))
|
|
421
342
|
return 'inconclusive';
|
|
422
343
|
return compareVersions(reported, latest) === 0 ? 'match' : 'mismatch';
|
|
423
344
|
}
|
|
424
|
-
/**
|
|
425
|
-
* Log the outcome of the post-upgrade version probe. On a match the user
|
|
426
|
-
* knows the current terminal is already serving the new version; on a
|
|
427
|
-
* mismatch they get told exactly which stale install is hijacking their PATH
|
|
428
|
-
* instead of discovering it via a mysteriously unchanged `codegraph -v`.
|
|
429
|
-
* Inconclusive probes fall back to the old soft hint — never a scare on
|
|
430
|
-
* setups we can't inspect (no `codegraph` on PATH yet, exotic wrappers).
|
|
431
|
-
* Returns the probe result so the caller can gate the post-upgrade refresh
|
|
432
|
-
* (which spawns the PATH-resolved binary) on it.
|
|
433
|
-
*/
|
|
434
345
|
function reportResolvedVersion(latest, deps) {
|
|
435
346
|
const { method } = deps;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
347
|
+
if (method.kind === 'npm' && method.scope === 'local') {
|
|
348
|
+
const installed = method.root ? readInstalledVersion(method.root) : null;
|
|
349
|
+
if (installed && parseSemver(installed) && compareVersions(installed, latest) === 0) {
|
|
350
|
+
deps.log(c.green(`✓ ${method.root} now has CodeGraph ${latest}.`));
|
|
351
|
+
}
|
|
352
|
+
else if (installed) {
|
|
353
|
+
deps.warn(`npm finished, but ${method.root} still has CodeGraph ${normalizeVersion(installed)}.`);
|
|
354
|
+
}
|
|
439
355
|
return 'inconclusive';
|
|
356
|
+
}
|
|
440
357
|
const probe = verifyResolvedVersion(latest, deps);
|
|
441
358
|
switch (probe) {
|
|
442
359
|
case 'match':
|
|
@@ -453,28 +370,12 @@ function reportResolvedVersion(latest, deps) {
|
|
|
453
370
|
}
|
|
454
371
|
return probe;
|
|
455
372
|
}
|
|
456
|
-
/**
|
|
457
|
-
* Refresh the agent surfaces previous installs wrote — the marker-fenced
|
|
458
|
-
* instructions sections (CLAUDE.md / AGENTS.md / GEMINI.md), MCP entries,
|
|
459
|
-
* legacy-hook cleanups — so they match the version that will serve them.
|
|
460
|
-
* Unlike the prompt hook above, this content is NOT version-agnostic: the
|
|
461
|
-
* templates are baked into the binary, so the still-running old process
|
|
462
|
-
* would only rewrite its own stale copy — the exact staleness this heals.
|
|
463
|
-
* We therefore spawn the freshly-installed binary (`codegraph install
|
|
464
|
-
* --refresh`), which is refresh-only: agents never configured stay
|
|
465
|
-
* untouched, and permission / prompt-hook choices are preserved. Gated on
|
|
466
|
-
* `codegraph` being resolvable on PATH (an npm-local install isn't) and on
|
|
467
|
-
* the kill-switch; never fatal to the upgrade.
|
|
468
|
-
*/
|
|
469
373
|
function selfHealInstalledSurfaces(deps) {
|
|
470
374
|
if (process.env.CODEGRAPH_NO_INSTALL_REFRESH === '1')
|
|
471
375
|
return;
|
|
472
376
|
if (!deps.hasCommand('codegraph'))
|
|
473
377
|
return;
|
|
474
378
|
deps.log(c.dim('Refreshing agent instruction sections and config written by previous versions…'));
|
|
475
|
-
// Windows installs expose codegraph through a .cmd launcher. Node cannot
|
|
476
|
-
// spawn .cmd files directly without a shell, so route the constant command
|
|
477
|
-
// through cmd.exe there (the same launcher a terminal would resolve).
|
|
478
379
|
const code = deps.platform === 'win32'
|
|
479
380
|
? deps.run('cmd.exe', ['/d', '/s', '/c', 'codegraph install --refresh'])
|
|
480
381
|
: deps.run('codegraph', ['install', '--refresh']);
|
|
@@ -482,11 +383,6 @@ function selfHealInstalledSurfaces(deps) {
|
|
|
482
383
|
deps.warn('Could not refresh the installed agent surfaces — run `codegraph install --refresh` manually.');
|
|
483
384
|
}
|
|
484
385
|
}
|
|
485
|
-
/**
|
|
486
|
-
* Wire the Claude `UserPromptSubmit` front-load hook on upgrade for an
|
|
487
|
-
* already-configured global Claude install. No-op when Claude isn't configured,
|
|
488
|
-
* when the hook is already present, or when the kill-switch is set.
|
|
489
|
-
*/
|
|
490
386
|
async function selfHealPromptHook(deps) {
|
|
491
387
|
if (process.env.CODEGRAPH_NO_PROMPT_HOOK === '1' || process.env.CODEGRAPH_PROMPT_HOOK === '0')
|
|
492
388
|
return;
|
|
@@ -517,30 +413,10 @@ function upgradeUnixBundle(method, pinned, deps) {
|
|
|
517
413
|
return 1;
|
|
518
414
|
}
|
|
519
415
|
deps.log('');
|
|
520
|
-
// No "open a new terminal" hedge here — after the swap, runUpgrade probes
|
|
521
|
-
// the PATH-resolved `codegraph --version` and reports the real outcome.
|
|
522
416
|
deps.log(c.green('✓ Upgrade complete.'));
|
|
523
417
|
deps.log(reindexAdvisory());
|
|
524
418
|
return 0;
|
|
525
419
|
}
|
|
526
|
-
/**
|
|
527
|
-
* The PowerShell function that moves an unpacked Windows bundle into the
|
|
528
|
-
* install's `current\` dir. Shared VERBATIM with `install.ps1` (a test pins the
|
|
529
|
-
* two copies equal), so a first install, a re-run of the installer, and
|
|
530
|
-
* `codegraph upgrade` all replace files the same way.
|
|
531
|
-
*
|
|
532
|
-
* Why file-by-file renames (#2185): every open agent session runs a CodeGraph
|
|
533
|
-
* MCP server from `current\`, which keeps `node.exe` and the native kernel
|
|
534
|
-
* (`lib\kernel\codegraph-kernel.node`) locked. Windows refuses to overwrite or
|
|
535
|
-
* delete a running exe or a loaded DLL but does let it be renamed. The old
|
|
536
|
-
* upgrade renamed only `node.exe` and then `Copy-Item`ed over the rest, so the
|
|
537
|
-
* locked kernel failed the copy halfway — leaving no `node.exe` and a mix of
|
|
538
|
-
* versions, which no `codegraph` command could repair. Now each file being
|
|
539
|
-
* replaced (or dropped by the new version) is renamed aside to
|
|
540
|
-
* `<name>.old-<token>` before the staged file is moved in; any failure undoes
|
|
541
|
-
* every step, and the renamed-aside files are deleted on the next successful
|
|
542
|
-
* run once nothing holds them.
|
|
543
|
-
*/
|
|
544
420
|
exports.WINDOWS_SWAP_FUNCTION = String.raw `function Install-CodeGraphFiles([string]$Stage, [string]$Dest) {
|
|
545
421
|
# Move an unpacked bundle into $Dest. Windows can't overwrite or delete a
|
|
546
422
|
# running node.exe or a loaded .node addon, but it can rename one, so every
|
|
@@ -613,23 +489,13 @@ exports.WINDOWS_SWAP_FUNCTION = String.raw `function Install-CodeGraphFiles([str
|
|
|
613
489
|
}
|
|
614
490
|
}
|
|
615
491
|
`;
|
|
616
|
-
/** Single-quote a value for PowerShell (a `'` inside is doubled). */
|
|
617
492
|
function psQuote(value) {
|
|
618
493
|
return `'${value.replace(/'/g, "''")}'`;
|
|
619
494
|
}
|
|
620
|
-
/** Exit code of the upgrade script when files could not all be put back. */
|
|
621
495
|
exports.WINDOWS_UPGRADE_DAMAGED = 2;
|
|
622
|
-
/** Build the in-place Windows upgrade script (exported for unit-testing). */
|
|
623
496
|
function buildWindowsUpgradeScript(bundleRoot, version, arch) {
|
|
624
497
|
const target = `win32-${arch}`;
|
|
625
498
|
const url = `https://github.com/${exports.REPO}/releases/download/${version}/codegraph-${target}.zip`;
|
|
626
|
-
// Synchronous, no detached helper (which dies under SSH/job objects and has
|
|
627
|
-
// worse UX). The bundle is unpacked into a sibling of current\ — the same
|
|
628
|
-
// volume, so the swap is renames, never a half-finished copy — and nothing
|
|
629
|
-
// in current\ changes until it is fully unpacked. The running process keeps
|
|
630
|
-
// its renamed node.exe mapped; the NEXT `codegraph` invocation uses the new
|
|
631
|
-
// one. Exit codes: 0 installed, 1 failed with the install unchanged,
|
|
632
|
-
// WINDOWS_UPGRADE_DAMAGED when the rollback could not restore every file.
|
|
633
499
|
return [
|
|
634
500
|
`$ErrorActionPreference='Stop'`,
|
|
635
501
|
exports.WINDOWS_SWAP_FUNCTION,
|
|
@@ -658,14 +524,10 @@ function buildWindowsUpgradeScript(bundleRoot, version, arch) {
|
|
|
658
524
|
function upgradeWindowsBundle(method, latest, deps) {
|
|
659
525
|
const arch = process.arch === 'arm64' ? 'arm64' : 'x64';
|
|
660
526
|
const script = buildWindowsUpgradeScript(method.bundleRoot, latest, arch);
|
|
661
|
-
// -EncodedCommand (base64 UTF-16LE), NOT -Command: Node's Windows argv→command
|
|
662
|
-
// -line quoting mangles a long multi-statement script, so PowerShell never
|
|
663
|
-
// parses it. Encoding sidesteps all shell quoting — the canonical approach.
|
|
664
527
|
const encoded = Buffer.from(script, 'utf16le').toString('base64');
|
|
665
528
|
deps.log(c.dim(`Downloading and installing ${latest}…`));
|
|
666
529
|
const code = deps.run('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-EncodedCommand', encoded]);
|
|
667
530
|
if (code !== 0) {
|
|
668
|
-
// The script has already printed what went wrong and what to do.
|
|
669
531
|
if (code === exports.WINDOWS_UPGRADE_DAMAGED) {
|
|
670
532
|
deps.error('The upgrade failed and some files could not be put back.');
|
|
671
533
|
deps.log(c.dim(`Close your agent sessions and any running codegraph commands, then reinstall: irm ${exports.INSTALL_PS1_URL} | iex`));
|
|
@@ -679,20 +541,10 @@ function upgradeWindowsBundle(method, latest, deps) {
|
|
|
679
541
|
return 1;
|
|
680
542
|
}
|
|
681
543
|
deps.log('');
|
|
682
|
-
// The running node.exe was renamed aside, so the version probe in
|
|
683
|
-
// runUpgrade already exercises the NEW binary — no terminal hedge needed.
|
|
684
544
|
deps.log(c.green('✓ Upgrade complete.'));
|
|
685
545
|
deps.log(reindexAdvisory());
|
|
686
546
|
return 0;
|
|
687
547
|
}
|
|
688
|
-
/**
|
|
689
|
-
* How to invoke npm. On Windows npm is a .cmd batch file, which Node refuses
|
|
690
|
-
* to spawn without a shell (EINVAL since the CVE-2024-27980 hardening) — a
|
|
691
|
-
* direct `npm.cmd` spawn fails on every current Node, so route it through
|
|
692
|
-
* cmd.exe, the same way the surface-refresh step invokes the .cmd launcher.
|
|
693
|
-
* (Verified live on the Windows VM: `spawnSync('npm.cmd')` → EINVAL;
|
|
694
|
-
* `cmd.exe /d /s /c npm …` → works.)
|
|
695
|
-
*/
|
|
696
548
|
function npmInvocation(platform, npmArgs) {
|
|
697
549
|
if (platform === 'win32') {
|
|
698
550
|
return { cmd: 'cmd.exe', args: ['/d', '/s', '/c', ['npm', ...npmArgs].join(' ')] };
|
|
@@ -703,9 +555,10 @@ function upgradeNpm(method, versionSpec, deps) {
|
|
|
703
555
|
const args = method.scope === 'global'
|
|
704
556
|
? ['install', '-g', `${exports.NPM_PACKAGE}@${versionSpec}`]
|
|
705
557
|
: ['install', `${exports.NPM_PACKAGE}@${versionSpec}`];
|
|
706
|
-
|
|
558
|
+
const where = method.scope === 'local' ? method.root : undefined;
|
|
559
|
+
deps.log(c.dim(`Running: npm ${args.join(' ')}${where ? ` (in ${where})` : ''}`));
|
|
707
560
|
const inv = npmInvocation(deps.platform, args);
|
|
708
|
-
const code = deps.run(inv.cmd, inv.args, process.env);
|
|
561
|
+
const code = deps.run(inv.cmd, inv.args, process.env, where);
|
|
709
562
|
if (code !== 0) {
|
|
710
563
|
deps.error(`npm exited with code ${code}.`);
|
|
711
564
|
if (method.scope === 'global') {
|
|
@@ -719,16 +572,6 @@ function upgradeNpm(method, versionSpec, deps) {
|
|
|
719
572
|
deps.log(reindexAdvisory());
|
|
720
573
|
return 0;
|
|
721
574
|
}
|
|
722
|
-
// ---------------------------------------------------------------------------
|
|
723
|
-
// Production deps wiring (used by the CLI)
|
|
724
|
-
// ---------------------------------------------------------------------------
|
|
725
|
-
/**
|
|
726
|
-
* True if `cmd` resolves to an executable on PATH. A pure-Node PATH scan — NOT
|
|
727
|
-
* a spawned `command -v`/`which`: `command` is a shell builtin (no standalone
|
|
728
|
-
* binary on Debian, though macOS ships one), and `which` isn't guaranteed
|
|
729
|
-
* present on minimal images, so spawning either is unreliable. Scanning PATH
|
|
730
|
-
* ourselves behaves identically on every platform.
|
|
731
|
-
*/
|
|
732
575
|
function hasCommand(cmd) {
|
|
733
576
|
const isWin = process.platform === 'win32';
|
|
734
577
|
const dirs = (process.env.PATH || process.env.Path || '').split(path.delimiter).filter(Boolean);
|
|
@@ -745,32 +588,33 @@ function hasCommand(cmd) {
|
|
|
745
588
|
return true;
|
|
746
589
|
}
|
|
747
590
|
catch {
|
|
748
|
-
/* not here / not executable — keep scanning */
|
|
749
591
|
}
|
|
750
592
|
}
|
|
751
593
|
}
|
|
752
594
|
return false;
|
|
753
595
|
}
|
|
754
|
-
function defaultRun(cmd, args, env) {
|
|
755
|
-
const r = (0, child_process_1.spawnSync)(cmd, args, { stdio: 'inherit', env: env ?? process.env, windowsHide: true });
|
|
596
|
+
function defaultRun(cmd, args, env, cwd) {
|
|
597
|
+
const r = (0, child_process_1.spawnSync)(cmd, args, { stdio: 'inherit', env: env ?? process.env, windowsHide: true, cwd });
|
|
756
598
|
if (r.error)
|
|
757
599
|
return -1;
|
|
758
600
|
return r.status ?? -1;
|
|
759
601
|
}
|
|
602
|
+
function readInstalledVersion(root) {
|
|
603
|
+
try {
|
|
604
|
+
const manifest = path.join(root, 'node_modules', ...exports.NPM_PACKAGE.split('/'), 'package.json');
|
|
605
|
+
const version = JSON.parse(fs.readFileSync(manifest, 'utf-8')).version;
|
|
606
|
+
return typeof version === 'string' ? version : null;
|
|
607
|
+
}
|
|
608
|
+
catch {
|
|
609
|
+
return null;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
760
612
|
function defaultCapture(cmd, args) {
|
|
761
|
-
// stdio is piped (the default with `encoding`), so nothing the probed
|
|
762
|
-
// command prints reaches the user's terminal. The timeout keeps a wedged
|
|
763
|
-
// probe from hanging the upgrade's last step.
|
|
764
613
|
const r = (0, child_process_1.spawnSync)(cmd, args, { encoding: 'utf-8', windowsHide: true, timeout: 30_000 });
|
|
765
614
|
if (r.error)
|
|
766
615
|
return null;
|
|
767
616
|
return { code: r.status ?? -1, stdout: r.stdout ?? '' };
|
|
768
617
|
}
|
|
769
|
-
/**
|
|
770
|
-
* The production `UpgradeDeps.wirePromptHook`: writes the hook only when the
|
|
771
|
-
* global Claude profile already carries CodeGraph's MCP entry, and leaves the
|
|
772
|
-
* file byte-for-byte alone once the hook is there.
|
|
773
|
-
*/
|
|
774
618
|
async function defaultWirePromptHook() {
|
|
775
619
|
const { claudeTarget, writePromptHookEntry } = await Promise.resolve().then(() => __importStar(require('../installer/targets/claude')));
|
|
776
620
|
if (!claudeTarget.detect('global').alreadyConfigured)
|