@aroman22/codegraph-vba-darwin-arm64 1.5.2 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +5 -0
- package/lib/dist/bin/codegraph.d.ts +1 -1
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +307 -81
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +38 -1
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +22 -3
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/db/index.d.ts +84 -5
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +209 -12
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +80 -3
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +116 -4
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +294 -7
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +43 -1
- package/lib/dist/db/wal-valve.d.ts +106 -0
- package/lib/dist/db/wal-valve.d.ts.map +1 -0
- package/lib/dist/db/wal-valve.js +208 -0
- package/lib/dist/db/wal-valve.js.map +1 -0
- package/lib/dist/directory.d.ts +9 -5
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +210 -19
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +107 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/cfml-extractor.js +494 -0
- package/lib/dist/extraction/cfml-extractor.js.map +1 -0
- package/lib/dist/extraction/grammars.d.ts +25 -1
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +177 -23
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +47 -2
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +568 -51
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.d.ts +3 -0
- package/lib/dist/extraction/languages/arkts.d.ts.map +1 -0
- package/lib/dist/extraction/languages/arkts.js +127 -0
- package/lib/dist/extraction/languages/arkts.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +98 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +563 -1
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.d.ts +12 -0
- package/lib/dist/extraction/languages/cfquery.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfquery.js +28 -0
- package/lib/dist/extraction/languages/cfquery.js.map +1 -0
- package/lib/dist/extraction/languages/cfscript.d.ts +3 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfscript.js +73 -0
- package/lib/dist/extraction/languages/cfscript.js.map +1 -0
- package/lib/dist/extraction/languages/cobol.d.ts +33 -0
- package/lib/dist/extraction/languages/cobol.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cobol.js +499 -0
- package/lib/dist/extraction/languages/cobol.js.map +1 -0
- package/lib/dist/extraction/languages/erlang.d.ts +3 -0
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -0
- package/lib/dist/extraction/languages/erlang.js +350 -0
- package/lib/dist/extraction/languages/erlang.js.map +1 -0
- package/lib/dist/extraction/languages/index.d.ts.map +1 -1
- package/lib/dist/extraction/languages/index.js +18 -0
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/nix.d.ts +3 -0
- package/lib/dist/extraction/languages/nix.d.ts.map +1 -0
- package/lib/dist/extraction/languages/nix.js +294 -0
- package/lib/dist/extraction/languages/nix.js.map +1 -0
- package/lib/dist/extraction/languages/solidity.d.ts +3 -0
- package/lib/dist/extraction/languages/solidity.d.ts.map +1 -0
- package/lib/dist/extraction/languages/solidity.js +293 -0
- package/lib/dist/extraction/languages/solidity.js.map +1 -0
- package/lib/dist/extraction/languages/terraform.d.ts +3 -0
- package/lib/dist/extraction/languages/terraform.d.ts.map +1 -0
- package/lib/dist/extraction/languages/terraform.js +641 -0
- package/lib/dist/extraction/languages/terraform.js.map +1 -0
- package/lib/dist/extraction/languages/vbnet.d.ts +11 -0
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -0
- package/lib/dist/extraction/languages/vbnet.js +141 -0
- package/lib/dist/extraction/languages/vbnet.js.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts +30 -10
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +140 -38
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +28 -1
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +76 -7
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +11 -4
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +20 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +60 -1
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +905 -20
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.d.ts +3 -0
- package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -0
- package/lib/dist/extraction/vba/call-sweep.js +206 -0
- package/lib/dist/extraction/vba/call-sweep.js.map +1 -0
- package/lib/dist/extraction/vba/calls.d.ts +55 -0
- package/lib/dist/extraction/vba/calls.d.ts.map +1 -0
- package/lib/dist/extraction/vba/calls.js +439 -0
- package/lib/dist/extraction/vba/calls.js.map +1 -0
- package/lib/dist/extraction/vba/constants.d.ts +42 -0
- package/lib/dist/extraction/vba/constants.d.ts.map +1 -0
- package/lib/dist/extraction/vba/constants.js +112 -0
- package/lib/dist/extraction/vba/constants.js.map +1 -0
- package/lib/dist/extraction/vba/context.d.ts +175 -0
- package/lib/dist/extraction/vba/context.d.ts.map +1 -0
- package/lib/dist/extraction/vba/context.js +268 -0
- package/lib/dist/extraction/vba/context.js.map +1 -0
- package/lib/dist/extraction/vba/controls.d.ts +24 -0
- package/lib/dist/extraction/vba/controls.d.ts.map +1 -0
- package/lib/dist/extraction/vba/controls.js +89 -0
- package/lib/dist/extraction/vba/controls.js.map +1 -0
- package/lib/dist/extraction/vba/declarations.d.ts +3 -0
- package/lib/dist/extraction/vba/declarations.d.ts.map +1 -0
- package/lib/dist/extraction/vba/declarations.js +154 -0
- package/lib/dist/extraction/vba/declarations.js.map +1 -0
- package/lib/dist/extraction/vba/dims.d.ts +3 -0
- package/lib/dist/extraction/vba/dims.d.ts.map +1 -0
- package/lib/dist/extraction/vba/dims.js +186 -0
- package/lib/dist/extraction/vba/dims.js.map +1 -0
- package/lib/dist/extraction/vba/docmd.d.ts +16 -0
- package/lib/dist/extraction/vba/docmd.d.ts.map +1 -0
- package/lib/dist/extraction/vba/docmd.js +179 -0
- package/lib/dist/extraction/vba/docmd.js.map +1 -0
- package/lib/dist/extraction/vba/enums-consts.d.ts +15 -0
- package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -0
- package/lib/dist/extraction/vba/enums-consts.js +178 -0
- package/lib/dist/extraction/vba/enums-consts.js.map +1 -0
- package/lib/dist/extraction/vba/implements.d.ts +3 -0
- package/lib/dist/extraction/vba/implements.d.ts.map +1 -0
- package/lib/dist/extraction/vba/implements.js +52 -0
- package/lib/dist/extraction/vba/implements.js.map +1 -0
- package/lib/dist/extraction/vba/procedures.d.ts +3 -0
- package/lib/dist/extraction/vba/procedures.d.ts.map +1 -0
- package/lib/dist/extraction/vba/procedures.js +239 -0
- package/lib/dist/extraction/vba/procedures.js.map +1 -0
- package/lib/dist/extraction/vba/sql-wrapper.d.ts +17 -0
- package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -0
- package/lib/dist/extraction/vba/sql-wrapper.js +212 -0
- package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -0
- package/lib/dist/extraction/vba/tempvars.d.ts +10 -0
- package/lib/dist/extraction/vba/tempvars.d.ts.map +1 -0
- package/lib/dist/extraction/vba/tempvars.js +138 -0
- package/lib/dist/extraction/vba/tempvars.js.map +1 -0
- package/lib/dist/extraction/vba/text-utils.d.ts +73 -0
- package/lib/dist/extraction/vba/text-utils.d.ts.map +1 -0
- package/lib/dist/extraction/vba/text-utils.js +195 -0
- package/lib/dist/extraction/vba/text-utils.js.map +1 -0
- package/lib/dist/extraction/vba-extractor.d.ts +3 -951
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-extractor.js +46 -2934
- package/lib/dist/extraction/vba-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
- package/lib/dist/extraction/vba-preprocess.js +300 -88
- package/lib/dist/extraction/vba-preprocess.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +76 -17
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/index.d.ts +81 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +460 -10
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +42 -0
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +97 -2
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +35 -3
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +101 -9
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +2 -1
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.d.ts +26 -0
- package/lib/dist/mcp/early-ppid.d.ts.map +1 -0
- package/lib/dist/mcp/early-ppid.js +29 -0
- package/lib/dist/mcp/early-ppid.js.map +1 -0
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +29 -4
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +18 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +73 -13
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +30 -4
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +14 -0
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +18 -0
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +14 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +28 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +44 -0
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -0
- package/lib/dist/mcp/startup-handshake.js +73 -0
- package/lib/dist/mcp/startup-handshake.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +22 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +289 -23
- 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 +18 -0
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/project-config.d.ts +44 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +151 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +2 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +170 -146
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1109 -97
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cooperative-yield.d.ts +32 -0
- package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +42 -0
- package/lib/dist/resolution/cooperative-yield.js.map +1 -0
- package/lib/dist/resolution/frameworks/cics.d.ts +20 -0
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/cics.js +90 -0
- package/lib/dist/resolution/frameworks/cics.js.map +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +6 -0
- 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 +14 -6
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/lib/dist/resolution/frameworks/terraform.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/terraform.js +277 -0
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts +2 -1
- package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/goframe-synthesizer.js +8 -3
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +7 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +129 -4
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +64 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +476 -58
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +22 -3
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +613 -39
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +1 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +49 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +29 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +10 -0
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +142 -4
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.d.ts +60 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -0
- package/lib/dist/search/identifier-segments.js +176 -0
- package/lib/dist/search/identifier-segments.js.map +1 -0
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +2 -0
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +10 -5
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +51 -14
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +9 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +45 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/types.d.ts +25 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +10 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +34 -2
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +164 -15
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.d.ts +87 -0
- package/lib/dist/upgrade/remove-binary.d.ts.map +1 -0
- package/lib/dist/upgrade/remove-binary.js +289 -0
- package/lib/dist/upgrade/remove-binary.js.map +1 -0
- package/lib/dist/upgrade/update-check.d.ts +92 -0
- package/lib/dist/upgrade/update-check.d.ts.map +1 -0
- package/lib/dist/upgrade/update-check.js +258 -0
- package/lib/dist/upgrade/update-check.js.map +1 -0
- package/lib/node_modules/.modules.yaml +1 -1
- package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/lib/dist/reasoning/config.d.ts +0 -45
- package/lib/dist/reasoning/config.d.ts.map +0 -1
- package/lib/dist/reasoning/config.js +0 -171
- package/lib/dist/reasoning/config.js.map +0 -1
- package/lib/dist/reasoning/credentials.d.ts +0 -5
- package/lib/dist/reasoning/credentials.d.ts.map +0 -1
- package/lib/dist/reasoning/credentials.js +0 -83
- package/lib/dist/reasoning/credentials.js.map +0 -1
- package/lib/dist/reasoning/login.d.ts +0 -21
- package/lib/dist/reasoning/login.d.ts.map +0 -1
- package/lib/dist/reasoning/login.js +0 -85
- package/lib/dist/reasoning/login.js.map +0 -1
- package/lib/dist/reasoning/reasoner.d.ts +0 -43
- package/lib/dist/reasoning/reasoner.d.ts.map +0 -1
- package/lib/dist/reasoning/reasoner.js +0 -308
- package/lib/dist/reasoning/reasoner.js.map +0 -1
|
@@ -25,6 +25,15 @@
|
|
|
25
25
|
* is exactly the distinction this module relies on.
|
|
26
26
|
*/
|
|
27
27
|
export declare function gitWorktreeRoot(dir: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Absolute, symlink-resolved git **common** directory for `dir` — the shared
|
|
30
|
+
* `.git` that all worktrees of one repository point at. Linked worktrees of the
|
|
31
|
+
* same repo report the SAME common dir; a submodule or an embedded clone is a
|
|
32
|
+
* DIFFERENT repository and reports its own (`…/.git/modules/<name>` or its own
|
|
33
|
+
* `.git`). That distinction is what separates a genuine "borrowed worktree"
|
|
34
|
+
* from a nested repo the parent index already covers. Null when not a repo.
|
|
35
|
+
*/
|
|
36
|
+
export declare function gitCommonDir(dir: string): string | null;
|
|
28
37
|
export interface WorktreeIndexMismatch {
|
|
29
38
|
/** The git working tree the command was run from. */
|
|
30
39
|
worktreeRoot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/sync/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/sync/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB1D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAevD;AAED,MAAM,WAAW,qBAAqB;IACpC,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,qBAAqB,GAAG,IAAI,CA2B9B;AAED,gEAAgE;AAChE,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,qBAAqB,GAAG,MAAM,CASxE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAOvE"}
|
|
@@ -52,6 +52,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
52
52
|
})();
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
exports.gitWorktreeRoot = gitWorktreeRoot;
|
|
55
|
+
exports.gitCommonDir = gitCommonDir;
|
|
55
56
|
exports.detectWorktreeIndexMismatch = detectWorktreeIndexMismatch;
|
|
56
57
|
exports.worktreeMismatchWarning = worktreeMismatchWarning;
|
|
57
58
|
exports.worktreeMismatchNotice = worktreeMismatchNotice;
|
|
@@ -73,6 +74,10 @@ function gitWorktreeRoot(dir) {
|
|
|
73
74
|
encoding: 'utf8',
|
|
74
75
|
stdio: ['ignore', 'pipe', 'ignore'],
|
|
75
76
|
windowsHide: true,
|
|
77
|
+
// Bounded like every git call in extraction/: this runs (memoized) on
|
|
78
|
+
// the daemon's main event loop, where an unbounded hang would trip the
|
|
79
|
+
// 60s liveness watchdog and SIGKILL a healthy daemon (#1139).
|
|
80
|
+
timeout: 5000,
|
|
76
81
|
}).trim();
|
|
77
82
|
return out ? realpath(out) : null;
|
|
78
83
|
}
|
|
@@ -80,6 +85,32 @@ function gitWorktreeRoot(dir) {
|
|
|
80
85
|
return null;
|
|
81
86
|
}
|
|
82
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Absolute, symlink-resolved git **common** directory for `dir` — the shared
|
|
90
|
+
* `.git` that all worktrees of one repository point at. Linked worktrees of the
|
|
91
|
+
* same repo report the SAME common dir; a submodule or an embedded clone is a
|
|
92
|
+
* DIFFERENT repository and reports its own (`…/.git/modules/<name>` or its own
|
|
93
|
+
* `.git`). That distinction is what separates a genuine "borrowed worktree"
|
|
94
|
+
* from a nested repo the parent index already covers. Null when not a repo.
|
|
95
|
+
*/
|
|
96
|
+
function gitCommonDir(dir) {
|
|
97
|
+
try {
|
|
98
|
+
const out = (0, child_process_1.execFileSync)('git', ['rev-parse', '--git-common-dir'], {
|
|
99
|
+
cwd: dir,
|
|
100
|
+
encoding: 'utf8',
|
|
101
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
102
|
+
windowsHide: true,
|
|
103
|
+
timeout: 5000, // same rationale as gitWorktreeRoot
|
|
104
|
+
}).trim();
|
|
105
|
+
if (!out)
|
|
106
|
+
return null;
|
|
107
|
+
// `--git-common-dir` is relative to cwd unless already absolute.
|
|
108
|
+
return realpath(path.isAbsolute(out) ? out : path.resolve(dir, out));
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
83
114
|
/**
|
|
84
115
|
* Detect when `startPath` lives in one git working tree but the resolved
|
|
85
116
|
* CodeGraph index (`indexRoot`) belongs to a *different* working tree.
|
|
@@ -103,6 +134,20 @@ function detectWorktreeIndexMismatch(startPath, indexRoot) {
|
|
|
103
134
|
// plain ancestor directory", and avoids warning outside git entirely.
|
|
104
135
|
if (gitWorktreeRoot(resolvedIndexRoot) !== resolvedIndexRoot)
|
|
105
136
|
return null;
|
|
137
|
+
// Don't flag a nested repo (submodule / embedded clone) that `indexRoot`'s
|
|
138
|
+
// index ALREADY covers: indexing a super-repo descends into its submodules
|
|
139
|
+
// and gitlinked clones, so a query run from inside one resolves up to the
|
|
140
|
+
// parent index — whose graph *does* contain that nested repo's files. The
|
|
141
|
+
// warning's premise ("results are a different branch; symbols changed only
|
|
142
|
+
// here are missing") is false there, and its "run codegraph init -i" advice
|
|
143
|
+
// would needlessly fragment the unified workspace index. A genuine borrowed
|
|
144
|
+
// worktree and the index root are the SAME repository (they share a git
|
|
145
|
+
// common dir); a submodule/embedded clone is a DIFFERENT repository and does
|
|
146
|
+
// not — so suppress only when the two clearly differ. (#1031, #1033)
|
|
147
|
+
const worktreeCommon = gitCommonDir(worktreeRoot);
|
|
148
|
+
const indexCommon = gitCommonDir(resolvedIndexRoot);
|
|
149
|
+
if (worktreeCommon && indexCommon && worktreeCommon !== indexCommon)
|
|
150
|
+
return null;
|
|
106
151
|
return { worktreeRoot, indexRoot: resolvedIndexRoot };
|
|
107
152
|
}
|
|
108
153
|
/** One-line-per-fact warning describing a detected mismatch. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/sync/worktree.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcH,
|
|
1
|
+
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/sync/worktree.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcH,0CAgBC;AAUD,oCAeC;AAoBD,kEA8BC;AAGD,0DASC;AAOD,wDAOC;AAjID,uCAAyB;AACzB,2CAA6B;AAC7B,iDAA6C;AAE7C;;;;;;;GAOG;AACH,SAAgB,eA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H,SAAS,QAAQ,CAAC,CAAS;IACzB,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;AACH,CAAC"}
|
package/lib/dist/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type EdgeKind = 'contains' | 'calls' | 'imports' | 'exports' | 'extends'
|
|
|
20
20
|
* Supported programming languages. See NODE_KINDS for why this is a
|
|
21
21
|
* runtime-iterable const array.
|
|
22
22
|
*/
|
|
23
|
-
export declare const LANGUAGES: readonly ["typescript", "javascript", "tsx", "jsx", "python", "go", "rust", "java", "c", "cpp", "csharp", "razor", "php", "ruby", "swift", "kotlin", "dart", "svelte", "vue", "astro", "liquid", "pascal", "scala", "lua", "luau", "objc", "r", "vba", "sql", "yaml", "twig", "xml", "properties", "unknown"];
|
|
23
|
+
export declare const LANGUAGES: readonly ["typescript", "javascript", "tsx", "jsx", "arkts", "python", "go", "rust", "java", "c", "cpp", "csharp", "razor", "php", "ruby", "swift", "kotlin", "dart", "svelte", "vue", "astro", "liquid", "pascal", "scala", "lua", "luau", "objc", "r", "vba", "sql", "solidity", "nix", "yaml", "twig", "xml", "properties", "cfml", "cfscript", "cfquery", "cobol", "vbnet", "erlang", "terraform", "unknown"];
|
|
24
24
|
export type Language = (typeof LANGUAGES)[number];
|
|
25
25
|
/**
|
|
26
26
|
* A node in the knowledge graph representing a code symbol
|
|
@@ -261,11 +261,34 @@ export interface SearchOptions {
|
|
|
261
261
|
export interface SearchResult {
|
|
262
262
|
/** Matching node */
|
|
263
263
|
node: Node;
|
|
264
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Relevance score for relative ranking only — higher is more relevant.
|
|
266
|
+
* NOT normalized and NOT a 0-1 fraction: the FTS path returns an unbounded
|
|
267
|
+
* BM25 magnitude (often in the tens or hundreds), while the fuzzy/exact
|
|
268
|
+
* paths return ~0-1. Use it to order results, not as an absolute percentage.
|
|
269
|
+
*/
|
|
265
270
|
score: number;
|
|
266
271
|
/** Matched text snippets for highlighting */
|
|
267
272
|
highlights?: string[];
|
|
268
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* A symbol whose name-segments match prose words from a prompt — the
|
|
276
|
+
* graph-derived signal behind the front-load hook's medium tier
|
|
277
|
+
* (CodeGraph.getSegmentMatches). Always verified to exist in `nodes` at the
|
|
278
|
+
* time it is returned.
|
|
279
|
+
*/
|
|
280
|
+
export interface SegmentMatch {
|
|
281
|
+
/** Symbol name as indexed (e.g. `OrderStateMachine`). */
|
|
282
|
+
name: string;
|
|
283
|
+
/** Kind of the representative definition. */
|
|
284
|
+
kind: NodeKind;
|
|
285
|
+
/** File of the representative definition. */
|
|
286
|
+
filePath: string;
|
|
287
|
+
/** 1-based start line of the representative definition. */
|
|
288
|
+
startLine: number;
|
|
289
|
+
/** The prompt words (normalized) that matched this name's segments. */
|
|
290
|
+
matchedWords: string[];
|
|
291
|
+
}
|
|
269
292
|
/**
|
|
270
293
|
* Context information for code understanding
|
|
271
294
|
*/
|
package/lib/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,2WA+Cb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,cAAc,GACd,WAAW,GACX,WAAW,GAeX,eAAe,GACf,YAAY,GACZ,cAAc,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CAAC,EAAE,MAAM,CAAC;IAElB,wCAAwC;IACxC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEvB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB"}
|
package/lib/dist/types.js
CHANGED
|
@@ -73,6 +73,7 @@ exports.LANGUAGES = [
|
|
|
73
73
|
'javascript',
|
|
74
74
|
'tsx',
|
|
75
75
|
'jsx',
|
|
76
|
+
'arkts',
|
|
76
77
|
'python',
|
|
77
78
|
'go',
|
|
78
79
|
'rust',
|
|
@@ -102,10 +103,19 @@ exports.LANGUAGES = [
|
|
|
102
103
|
// `references` edges to the tables it names. Only treated as a query when a
|
|
103
104
|
// sibling `queries.json` manifest is present (see directory discovery).
|
|
104
105
|
'sql',
|
|
106
|
+
'solidity',
|
|
107
|
+
'nix',
|
|
105
108
|
'yaml',
|
|
106
109
|
'twig',
|
|
107
110
|
'xml',
|
|
108
111
|
'properties',
|
|
112
|
+
'cfml',
|
|
113
|
+
'cfscript',
|
|
114
|
+
'cfquery',
|
|
115
|
+
'cobol',
|
|
116
|
+
'vbnet',
|
|
117
|
+
'erlang',
|
|
118
|
+
'terraform',
|
|
109
119
|
'unknown',
|
|
110
120
|
];
|
|
111
121
|
//# sourceMappingURL=types.js.map
|
package/lib/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;;;GAMG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,WAAW;IACX,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,WAAW;IACX,yEAAyE;IACzE,2EAA2E;IAC3E,OAAO;IACP,iEAAiE;IACjE,+DAA+D;IAC/D,kEAAkE;IAClE,sEAAsE;IACtE,wEAAwE;IACxE,sEAAsE;IACtE,oEAAoE;IACpE,iEAAiE;IACjE,kBAAkB;IAClB,sEAAsE;IACtE,sEAAsE;IACtE,mEAAmE;IACnE,sEAAsE;IACtE,oCAAoC;IACpC,aAAa;IACb,uBAAuB;IACvB,eAAe;CACP,CAAC;AAyCX;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,KAAK;IACL,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,6EAA6E;IAC7E,8EAA8E;IAC9E,4EAA4E;IAC5E,wEAAwE;IACxE,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,YAAY;IACZ,SAAS;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;;;GAMG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,WAAW;IACX,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,WAAW;IACX,yEAAyE;IACzE,2EAA2E;IAC3E,OAAO;IACP,iEAAiE;IACjE,+DAA+D;IAC/D,kEAAkE;IAClE,sEAAsE;IACtE,wEAAwE;IACxE,sEAAsE;IACtE,oEAAoE;IACpE,iEAAiE;IACjE,kBAAkB;IAClB,sEAAsE;IACtE,sEAAsE;IACtE,mEAAmE;IACnE,sEAAsE;IACtE,oCAAoC;IACpC,aAAa;IACb,uBAAuB;IACvB,eAAe;CACP,CAAC;AAyCX;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,KAAK;IACL,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,KAAK;IACL,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,6EAA6E;IAC7E,8EAA8E;IAC9E,4EAA4E;IAC5E,wEAAwE;IACxE,KAAK;IACL,UAAU;IACV,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,YAAY;IACZ,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,OAAO;IACP,QAAQ;IACR,WAAW;IACX,SAAS;CACD,CAAC"}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
* process to exit (releasing the lock), then runs `install.ps1`. This is the
|
|
24
24
|
* conventional Windows self-update dance (rustup/nvm-windows do the same).
|
|
25
25
|
*/
|
|
26
|
-
export declare const REPO = "ardelperal/codegraph";
|
|
26
|
+
export declare const REPO = "ardelperal/codegraph-vba";
|
|
27
27
|
export declare const NPM_PACKAGE = "codegraph-vba";
|
|
28
|
-
export declare const INSTALL_SH_URL = "https://raw.githubusercontent.com/ardelperal/codegraph/main/install.sh";
|
|
28
|
+
export declare const INSTALL_SH_URL = "https://raw.githubusercontent.com/ardelperal/codegraph-vba/main/install.sh";
|
|
29
29
|
export type InstallMethod = {
|
|
30
30
|
kind: 'bundle';
|
|
31
31
|
os: 'unix' | 'windows';
|
|
@@ -106,6 +106,11 @@ export interface UpgradeDeps {
|
|
|
106
106
|
resolveLatest: (pin?: string) => Promise<string>;
|
|
107
107
|
/** Run a command inheriting stdio; returns its exit code (-1 = spawn failed). */
|
|
108
108
|
run: (cmd: string, args: string[], env?: NodeJS.ProcessEnv) => number;
|
|
109
|
+
/** Run a command capturing stdout (nothing reaches the terminal); null = spawn failed. */
|
|
110
|
+
capture: (cmd: string, args: string[]) => {
|
|
111
|
+
code: number;
|
|
112
|
+
stdout: string;
|
|
113
|
+
} | null;
|
|
109
114
|
hasCommand: (cmd: string) => boolean;
|
|
110
115
|
log: (msg: string) => void;
|
|
111
116
|
warn: (msg: string) => void;
|
|
@@ -118,8 +123,30 @@ export declare function reindexAdvisory(): string;
|
|
|
118
123
|
* Returns the process exit code (0 = success / nothing to do, 1 = failure).
|
|
119
124
|
*/
|
|
120
125
|
export declare function runUpgrade(opts: UpgradeOptions, deps: UpgradeDeps): Promise<number>;
|
|
126
|
+
type VersionProbe = 'match' | 'mismatch' | 'inconclusive';
|
|
127
|
+
/**
|
|
128
|
+
* Prove the upgrade actually took: spawn the `codegraph` this terminal's PATH
|
|
129
|
+
* resolves and compare its reported version to the target. Catches the silent
|
|
130
|
+
* failure mode where ANOTHER install shadows the one we just upgraded (issue
|
|
131
|
+
* #1071 — e.g. a stale `npm i -g` copy earlier on PATH than the bundle
|
|
132
|
+
* launcher): the upgrade "succeeds" but `codegraph -v` — in this terminal and
|
|
133
|
+
* every future one — keeps serving the old version. Exported for unit tests.
|
|
134
|
+
*/
|
|
135
|
+
export declare function verifyResolvedVersion(latest: string, deps: UpgradeDeps): VersionProbe;
|
|
121
136
|
/** Build the in-place Windows upgrade script (exported for unit-testing). */
|
|
122
137
|
export declare function buildWindowsUpgradeScript(bundleRoot: string, version: string, arch: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* How to invoke npm. On Windows npm is a .cmd batch file, which Node refuses
|
|
140
|
+
* to spawn without a shell (EINVAL since the CVE-2024-27980 hardening) — a
|
|
141
|
+
* direct `npm.cmd` spawn fails on every current Node, so route it through
|
|
142
|
+
* cmd.exe, the same way the surface-refresh step invokes the .cmd launcher.
|
|
143
|
+
* (Verified live on the Windows VM: `spawnSync('npm.cmd')` → EINVAL;
|
|
144
|
+
* `cmd.exe /d /s /c npm …` → works.)
|
|
145
|
+
*/
|
|
146
|
+
export declare function npmInvocation(platform: NodeJS.Platform, npmArgs: string[]): {
|
|
147
|
+
cmd: string;
|
|
148
|
+
args: string[];
|
|
149
|
+
};
|
|
123
150
|
/**
|
|
124
151
|
* True if `cmd` resolves to an executable on PATH. A pure-Node PATH scan — NOT
|
|
125
152
|
* a spawned `command -v`/`which`: `command` is a shell builtin (no standalone
|
|
@@ -129,4 +156,9 @@ export declare function buildWindowsUpgradeScript(bundleRoot: string, version: s
|
|
|
129
156
|
*/
|
|
130
157
|
export declare function hasCommand(cmd: string): boolean;
|
|
131
158
|
export declare function defaultRun(cmd: string, args: string[], env?: NodeJS.ProcessEnv): number;
|
|
159
|
+
export declare function defaultCapture(cmd: string, args: string[]): {
|
|
160
|
+
code: number;
|
|
161
|
+
stdout: string;
|
|
162
|
+
} | null;
|
|
163
|
+
export {};
|
|
132
164
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upgrade/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upgrade/index.ts"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AG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CASvF;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOnG"}
|
|
@@ -70,14 +70,17 @@ exports.parseLatestTagFromLocation = parseLatestTagFromLocation;
|
|
|
70
70
|
exports.resolveLatestVersion = resolveLatestVersion;
|
|
71
71
|
exports.reindexAdvisory = reindexAdvisory;
|
|
72
72
|
exports.runUpgrade = runUpgrade;
|
|
73
|
+
exports.verifyResolvedVersion = verifyResolvedVersion;
|
|
73
74
|
exports.buildWindowsUpgradeScript = buildWindowsUpgradeScript;
|
|
75
|
+
exports.npmInvocation = npmInvocation;
|
|
74
76
|
exports.hasCommand = hasCommand;
|
|
75
77
|
exports.defaultRun = defaultRun;
|
|
78
|
+
exports.defaultCapture = defaultCapture;
|
|
76
79
|
const fs = __importStar(require("fs"));
|
|
77
80
|
const path = __importStar(require("path"));
|
|
78
81
|
const https = __importStar(require("https"));
|
|
79
82
|
const child_process_1 = require("child_process");
|
|
80
|
-
exports.REPO = 'ardelperal/codegraph';
|
|
83
|
+
exports.REPO = 'ardelperal/codegraph-vba';
|
|
81
84
|
exports.NPM_PACKAGE = 'codegraph-vba';
|
|
82
85
|
const RAW_BASE = `https://raw.githubusercontent.com/${exports.REPO}/main`;
|
|
83
86
|
exports.INSTALL_SH_URL = `${RAW_BASE}/install.sh`;
|
|
@@ -119,17 +122,18 @@ function detectInstallMethod(input) {
|
|
|
119
122
|
// (a Windows layout resolves correctly even when unit-tested on macOS/Linux).
|
|
120
123
|
const P = isWin ? path.win32 : path.posix;
|
|
121
124
|
const binDir = P.dirname(input.filename); // <…>/bin
|
|
122
|
-
// Bundle: <root>/lib/dist/bin/codegraph.js → <root> is up 3 from bin/.
|
|
123
|
-
// A bundle has a vendored node + a launcher script as siblings of lib/.
|
|
124
|
-
const bundleRoot = P.resolve(binDir, '..', '..', '..');
|
|
125
|
-
const vendoredNode = P.join(bundleRoot, isWin ? 'node.exe' : 'node');
|
|
126
|
-
const launcher = P.join(bundleRoot, 'bin', isWin ? 'codegraph.cmd' : 'codegraph');
|
|
127
|
-
if (exists(vendoredNode) && exists(launcher)) {
|
|
128
|
-
const os = isWin ? 'windows' : 'unix';
|
|
129
|
-
return { kind: 'bundle', os, bundleRoot, installDir: deriveInstallDir(bundleRoot, os, exists) };
|
|
130
|
-
}
|
|
131
125
|
const norm = toPosix(input.filename);
|
|
126
|
+
// Path-based checks come FIRST. The npm thin-installer's per-platform
|
|
127
|
+
// package (@colbymchenry/codegraph-<platform>-<arch>) is itself a complete
|
|
128
|
+
// bundle — vendored node + bin/ launcher — living inside node_modules, so
|
|
129
|
+
// the layout sniff below would misread every npm install as a standalone
|
|
130
|
+
// bundle. `upgrade` would then curl install.sh into ~/.codegraph: a SECOND
|
|
131
|
+
// install that never wins the PATH race against npm's shim, leaving
|
|
132
|
+
// `codegraph -v` permanently on the old version (the #1071 shadow,
|
|
133
|
+
// self-inflicted). A path under node_modules is authoritative about HOW the
|
|
134
|
+
// user installed, whatever the artifact inside looks like.
|
|
132
135
|
// npx cache: <…>/_npx/<hash>/node_modules/@colbymchenry/codegraph/…
|
|
136
|
+
// (checked before npm — the npx cache path also contains /node_modules/).
|
|
133
137
|
if (norm.includes('/_npx/')) {
|
|
134
138
|
return { kind: 'npx' };
|
|
135
139
|
}
|
|
@@ -138,6 +142,15 @@ function detectInstallMethod(input) {
|
|
|
138
142
|
const underCwd = norm.startsWith(toPosix(P.resolve(input.cwd)) + '/');
|
|
139
143
|
return { kind: 'npm', scope: underCwd ? 'local' : 'global' };
|
|
140
144
|
}
|
|
145
|
+
// Bundle: <root>/lib/dist/bin/codegraph.js → <root> is up 3 from bin/.
|
|
146
|
+
// A bundle has a vendored node + a launcher script as siblings of lib/.
|
|
147
|
+
const bundleRoot = P.resolve(binDir, '..', '..', '..');
|
|
148
|
+
const vendoredNode = P.join(bundleRoot, isWin ? 'node.exe' : 'node');
|
|
149
|
+
const launcher = P.join(bundleRoot, 'bin', isWin ? 'codegraph.cmd' : 'codegraph');
|
|
150
|
+
if (exists(vendoredNode) && exists(launcher)) {
|
|
151
|
+
const os = isWin ? 'windows' : 'unix';
|
|
152
|
+
return { kind: 'bundle', os, bundleRoot, installDir: deriveInstallDir(bundleRoot, os, exists) };
|
|
153
|
+
}
|
|
141
154
|
// Source checkout: running <repo>/dist/bin/codegraph.js with a sibling .git.
|
|
142
155
|
const repoRoot = P.resolve(binDir, '..', '..');
|
|
143
156
|
if (exists(P.join(repoRoot, 'package.json')) && exists(P.join(repoRoot, '.git'))) {
|
|
@@ -406,15 +419,123 @@ async function runUpgrade(opts, deps) {
|
|
|
406
419
|
// an existing Claude config, and skipped entirely by the kill-switch. Never
|
|
407
420
|
// fatal to the upgrade.
|
|
408
421
|
if (code === 0) {
|
|
422
|
+
let probe = 'inconclusive';
|
|
423
|
+
try {
|
|
424
|
+
probe = reportResolvedVersion(latest, deps);
|
|
425
|
+
}
|
|
426
|
+
catch {
|
|
427
|
+
/* an inconclusive probe must not fail the upgrade */
|
|
428
|
+
}
|
|
409
429
|
try {
|
|
410
430
|
await selfHealPromptHook(deps);
|
|
411
431
|
}
|
|
412
432
|
catch {
|
|
413
433
|
/* a hook-wiring hiccup must not fail the upgrade */
|
|
414
434
|
}
|
|
435
|
+
// The refresh executes whatever `codegraph` PATH resolves. If the probe
|
|
436
|
+
// just proved that's a stale shadowed install, spawning it would rewrite
|
|
437
|
+
// the agent surfaces with the very templates the refresh exists to heal —
|
|
438
|
+
// skip, and point at the manual command for after the PATH is fixed.
|
|
439
|
+
if (probe !== 'mismatch') {
|
|
440
|
+
try {
|
|
441
|
+
selfHealInstalledSurfaces(deps);
|
|
442
|
+
}
|
|
443
|
+
catch {
|
|
444
|
+
/* a refresh hiccup must not fail the upgrade */
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
deps.log(c.dim('Skipped refreshing agent instructions/config — run `codegraph install --refresh` once the PATH is fixed.'));
|
|
449
|
+
}
|
|
415
450
|
}
|
|
416
451
|
return code;
|
|
417
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* Prove the upgrade actually took: spawn the `codegraph` this terminal's PATH
|
|
455
|
+
* resolves and compare its reported version to the target. Catches the silent
|
|
456
|
+
* failure mode where ANOTHER install shadows the one we just upgraded (issue
|
|
457
|
+
* #1071 — e.g. a stale `npm i -g` copy earlier on PATH than the bundle
|
|
458
|
+
* launcher): the upgrade "succeeds" but `codegraph -v` — in this terminal and
|
|
459
|
+
* every future one — keeps serving the old version. Exported for unit tests.
|
|
460
|
+
*/
|
|
461
|
+
function verifyResolvedVersion(latest, deps) {
|
|
462
|
+
if (!deps.hasCommand('codegraph'))
|
|
463
|
+
return 'inconclusive';
|
|
464
|
+
// Windows installs expose codegraph through a .cmd launcher; Node can't
|
|
465
|
+
// spawn .cmd files without a shell, so route through cmd.exe there.
|
|
466
|
+
const probe = deps.platform === 'win32'
|
|
467
|
+
? deps.capture('cmd.exe', ['/d', '/s', '/c', 'codegraph --version'])
|
|
468
|
+
: deps.capture('codegraph', ['--version']);
|
|
469
|
+
if (!probe || probe.code !== 0)
|
|
470
|
+
return 'inconclusive';
|
|
471
|
+
// `codegraph --version` prints the bare version; take the last non-empty
|
|
472
|
+
// line so a stray runtime warning above it can't spoil the parse.
|
|
473
|
+
const reported = probe.stdout.trim().split(/\r?\n/).pop()?.trim() ?? '';
|
|
474
|
+
if (!parseSemver(reported))
|
|
475
|
+
return 'inconclusive';
|
|
476
|
+
return compareVersions(reported, latest) === 0 ? 'match' : 'mismatch';
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Log the outcome of the post-upgrade version probe. On a match the user
|
|
480
|
+
* knows the current terminal is already serving the new version; on a
|
|
481
|
+
* mismatch they get told exactly which stale install is hijacking their PATH
|
|
482
|
+
* instead of discovering it via a mysteriously unchanged `codegraph -v`.
|
|
483
|
+
* Inconclusive probes fall back to the old soft hint — never a scare on
|
|
484
|
+
* setups we can't inspect (no `codegraph` on PATH yet, exotic wrappers).
|
|
485
|
+
* Returns the probe result so the caller can gate the post-upgrade refresh
|
|
486
|
+
* (which spawns the PATH-resolved binary) on it.
|
|
487
|
+
*/
|
|
488
|
+
function reportResolvedVersion(latest, deps) {
|
|
489
|
+
const { method } = deps;
|
|
490
|
+
// A project-local npm install isn't served by PATH's `codegraph` (that
|
|
491
|
+
// would be some other install) — a probe could only false-alarm.
|
|
492
|
+
if (method.kind === 'npm' && method.scope === 'local')
|
|
493
|
+
return 'inconclusive';
|
|
494
|
+
const probe = verifyResolvedVersion(latest, deps);
|
|
495
|
+
switch (probe) {
|
|
496
|
+
case 'match':
|
|
497
|
+
deps.log(c.green(`✓ \`codegraph\` on your PATH now reports ${latest} — this terminal is already using it.`));
|
|
498
|
+
break;
|
|
499
|
+
case 'mismatch':
|
|
500
|
+
deps.warn(`Installed ${latest}, but the \`codegraph\` this terminal resolves still reports an older version.`);
|
|
501
|
+
deps.log(c.dim('Another CodeGraph install earlier on your PATH is shadowing the one just upgraded.'));
|
|
502
|
+
deps.log(c.dim('Find every copy with `which -a codegraph` (Windows: `where codegraph`) and remove or upgrade the stale one.'));
|
|
503
|
+
break;
|
|
504
|
+
case 'inconclusive':
|
|
505
|
+
deps.log(c.dim('Open a new terminal if `codegraph --version` looks unchanged (PATH cache).'));
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
return probe;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Refresh the agent surfaces previous installs wrote — the marker-fenced
|
|
512
|
+
* instructions sections (CLAUDE.md / AGENTS.md / GEMINI.md), MCP entries,
|
|
513
|
+
* legacy-hook cleanups — so they match the version that will serve them.
|
|
514
|
+
* Unlike the prompt hook above, this content is NOT version-agnostic: the
|
|
515
|
+
* templates are baked into the binary, so the still-running old process
|
|
516
|
+
* would only rewrite its own stale copy — the exact staleness this heals.
|
|
517
|
+
* We therefore spawn the freshly-installed binary (`codegraph install
|
|
518
|
+
* --refresh`), which is refresh-only: agents never configured stay
|
|
519
|
+
* untouched, and permission / prompt-hook choices are preserved. Gated on
|
|
520
|
+
* `codegraph` being resolvable on PATH (an npm-local install isn't) and on
|
|
521
|
+
* the kill-switch; never fatal to the upgrade.
|
|
522
|
+
*/
|
|
523
|
+
function selfHealInstalledSurfaces(deps) {
|
|
524
|
+
if (process.env.CODEGRAPH_NO_INSTALL_REFRESH === '1')
|
|
525
|
+
return;
|
|
526
|
+
if (!deps.hasCommand('codegraph'))
|
|
527
|
+
return;
|
|
528
|
+
deps.log(c.dim('Refreshing agent instruction sections and config written by previous versions…'));
|
|
529
|
+
// Windows installs expose codegraph through a .cmd launcher. Node cannot
|
|
530
|
+
// spawn .cmd files directly without a shell, so route the constant command
|
|
531
|
+
// through cmd.exe there (the same launcher a terminal would resolve).
|
|
532
|
+
const code = deps.platform === 'win32'
|
|
533
|
+
? deps.run('cmd.exe', ['/d', '/s', '/c', 'codegraph install --refresh'])
|
|
534
|
+
: deps.run('codegraph', ['install', '--refresh']);
|
|
535
|
+
if (code !== 0) {
|
|
536
|
+
deps.warn('Could not refresh the installed agent surfaces — run `codegraph install --refresh` manually.');
|
|
537
|
+
}
|
|
538
|
+
}
|
|
418
539
|
/**
|
|
419
540
|
* Wire the Claude `UserPromptSubmit` front-load hook on upgrade for an
|
|
420
541
|
* already-configured global Claude install. No-op when Claude isn't configured,
|
|
@@ -454,7 +575,9 @@ function upgradeUnixBundle(method, pinned, deps) {
|
|
|
454
575
|
return 1;
|
|
455
576
|
}
|
|
456
577
|
deps.log('');
|
|
457
|
-
|
|
578
|
+
// No "open a new terminal" hedge here — after the swap, runUpgrade probes
|
|
579
|
+
// the PATH-resolved `codegraph --version` and reports the real outcome.
|
|
580
|
+
deps.log(c.green('✓ Upgrade complete.'));
|
|
458
581
|
deps.log(reindexAdvisory());
|
|
459
582
|
return 0;
|
|
460
583
|
}
|
|
@@ -507,17 +630,33 @@ function upgradeWindowsBundle(method, latest, deps) {
|
|
|
507
630
|
return 1;
|
|
508
631
|
}
|
|
509
632
|
deps.log('');
|
|
510
|
-
|
|
633
|
+
// The running node.exe was renamed aside, so the version probe in
|
|
634
|
+
// runUpgrade already exercises the NEW binary — no terminal hedge needed.
|
|
635
|
+
deps.log(c.green('✓ Upgrade complete.'));
|
|
511
636
|
deps.log(reindexAdvisory());
|
|
512
637
|
return 0;
|
|
513
638
|
}
|
|
639
|
+
/**
|
|
640
|
+
* How to invoke npm. On Windows npm is a .cmd batch file, which Node refuses
|
|
641
|
+
* to spawn without a shell (EINVAL since the CVE-2024-27980 hardening) — a
|
|
642
|
+
* direct `npm.cmd` spawn fails on every current Node, so route it through
|
|
643
|
+
* cmd.exe, the same way the surface-refresh step invokes the .cmd launcher.
|
|
644
|
+
* (Verified live on the Windows VM: `spawnSync('npm.cmd')` → EINVAL;
|
|
645
|
+
* `cmd.exe /d /s /c npm …` → works.)
|
|
646
|
+
*/
|
|
647
|
+
function npmInvocation(platform, npmArgs) {
|
|
648
|
+
if (platform === 'win32') {
|
|
649
|
+
return { cmd: 'cmd.exe', args: ['/d', '/s', '/c', ['npm', ...npmArgs].join(' ')] };
|
|
650
|
+
}
|
|
651
|
+
return { cmd: 'npm', args: npmArgs };
|
|
652
|
+
}
|
|
514
653
|
function upgradeNpm(method, versionSpec, deps) {
|
|
515
|
-
const npm = deps.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
516
654
|
const args = method.scope === 'global'
|
|
517
655
|
? ['install', '-g', `${exports.NPM_PACKAGE}@${versionSpec}`]
|
|
518
656
|
: ['install', `${exports.NPM_PACKAGE}@${versionSpec}`];
|
|
519
|
-
deps.log(c.dim(`Running:
|
|
520
|
-
const
|
|
657
|
+
deps.log(c.dim(`Running: npm ${args.join(' ')}`));
|
|
658
|
+
const inv = npmInvocation(deps.platform, args);
|
|
659
|
+
const code = deps.run(inv.cmd, inv.args, process.env);
|
|
521
660
|
if (code !== 0) {
|
|
522
661
|
deps.error(`npm exited with code ${code}.`);
|
|
523
662
|
if (method.scope === 'global') {
|
|
@@ -568,9 +707,19 @@ function defaultRun(cmd, args, env) {
|
|
|
568
707
|
stdio: 'inherit',
|
|
569
708
|
env: env ?? process.env,
|
|
570
709
|
shell: process.platform === 'win32',
|
|
710
|
+
windowsHide: true,
|
|
571
711
|
});
|
|
572
712
|
if (r.error)
|
|
573
713
|
return -1;
|
|
574
714
|
return r.status ?? -1;
|
|
575
715
|
}
|
|
716
|
+
function defaultCapture(cmd, args) {
|
|
717
|
+
// stdio is piped (the default with `encoding`), so nothing the probed
|
|
718
|
+
// command prints reaches the user's terminal. The timeout keeps a wedged
|
|
719
|
+
// probe from hanging the upgrade's last step.
|
|
720
|
+
const r = (0, child_process_1.spawnSync)(cmd, args, { encoding: 'utf-8', windowsHide: true, timeout: 30_000 });
|
|
721
|
+
if (r.error)
|
|
722
|
+
return null;
|
|
723
|
+
return { code: r.status ?? -1, stdout: r.stdout ?? '' };
|
|
724
|
+
}
|
|
576
725
|
//# sourceMappingURL=index.js.map
|