@colbymchenry/codegraph-win32-x64 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/lib/dist/bin/codegraph.d.ts +1 -1
  2. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  3. package/lib/dist/bin/codegraph.js +232 -61
  4. package/lib/dist/bin/codegraph.js.map +1 -1
  5. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  6. package/lib/dist/bin/command-supervision.js +4 -1
  7. package/lib/dist/bin/command-supervision.js.map +1 -1
  8. package/lib/dist/db/migrations.d.ts +1 -1
  9. package/lib/dist/db/migrations.d.ts.map +1 -1
  10. package/lib/dist/db/migrations.js +19 -1
  11. package/lib/dist/db/migrations.js.map +1 -1
  12. package/lib/dist/db/queries.d.ts +51 -0
  13. package/lib/dist/db/queries.d.ts.map +1 -1
  14. package/lib/dist/db/queries.js +141 -0
  15. package/lib/dist/db/queries.js.map +1 -1
  16. package/lib/dist/db/schema.sql +19 -0
  17. package/lib/dist/directory.d.ts +9 -5
  18. package/lib/dist/directory.d.ts.map +1 -1
  19. package/lib/dist/directory.js +210 -19
  20. package/lib/dist/directory.js.map +1 -1
  21. package/lib/dist/extraction/cfml-extractor.d.ts +107 -0
  22. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -0
  23. package/lib/dist/extraction/cfml-extractor.js +494 -0
  24. package/lib/dist/extraction/cfml-extractor.js.map +1 -0
  25. package/lib/dist/extraction/grammars.d.ts +9 -0
  26. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  27. package/lib/dist/extraction/grammars.js +115 -3
  28. package/lib/dist/extraction/grammars.js.map +1 -1
  29. package/lib/dist/extraction/index.d.ts +46 -1
  30. package/lib/dist/extraction/index.d.ts.map +1 -1
  31. package/lib/dist/extraction/index.js +254 -3
  32. package/lib/dist/extraction/index.js.map +1 -1
  33. package/lib/dist/extraction/languages/arkts.d.ts +3 -0
  34. package/lib/dist/extraction/languages/arkts.d.ts.map +1 -0
  35. package/lib/dist/extraction/languages/arkts.js +127 -0
  36. package/lib/dist/extraction/languages/arkts.js.map +1 -0
  37. package/lib/dist/extraction/languages/c-cpp.d.ts +42 -0
  38. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  39. package/lib/dist/extraction/languages/c-cpp.js +369 -4
  40. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  41. package/lib/dist/extraction/languages/cfquery.d.ts +12 -0
  42. package/lib/dist/extraction/languages/cfquery.d.ts.map +1 -0
  43. package/lib/dist/extraction/languages/cfquery.js +28 -0
  44. package/lib/dist/extraction/languages/cfquery.js.map +1 -0
  45. package/lib/dist/extraction/languages/cfscript.d.ts +3 -0
  46. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -0
  47. package/lib/dist/extraction/languages/cfscript.js +73 -0
  48. package/lib/dist/extraction/languages/cfscript.js.map +1 -0
  49. package/lib/dist/extraction/languages/cobol.d.ts +33 -0
  50. package/lib/dist/extraction/languages/cobol.d.ts.map +1 -0
  51. package/lib/dist/extraction/languages/cobol.js +499 -0
  52. package/lib/dist/extraction/languages/cobol.js.map +1 -0
  53. package/lib/dist/extraction/languages/erlang.d.ts +3 -0
  54. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -0
  55. package/lib/dist/extraction/languages/erlang.js +350 -0
  56. package/lib/dist/extraction/languages/erlang.js.map +1 -0
  57. package/lib/dist/extraction/languages/index.d.ts.map +1 -1
  58. package/lib/dist/extraction/languages/index.js +18 -0
  59. package/lib/dist/extraction/languages/index.js.map +1 -1
  60. package/lib/dist/extraction/languages/nix.d.ts +3 -0
  61. package/lib/dist/extraction/languages/nix.d.ts.map +1 -0
  62. package/lib/dist/extraction/languages/nix.js +294 -0
  63. package/lib/dist/extraction/languages/nix.js.map +1 -0
  64. package/lib/dist/extraction/languages/solidity.d.ts +3 -0
  65. package/lib/dist/extraction/languages/solidity.d.ts.map +1 -0
  66. package/lib/dist/extraction/languages/solidity.js +293 -0
  67. package/lib/dist/extraction/languages/solidity.js.map +1 -0
  68. package/lib/dist/extraction/languages/terraform.d.ts +3 -0
  69. package/lib/dist/extraction/languages/terraform.d.ts.map +1 -0
  70. package/lib/dist/extraction/languages/terraform.js +641 -0
  71. package/lib/dist/extraction/languages/terraform.js.map +1 -0
  72. package/lib/dist/extraction/languages/vbnet.d.ts +11 -0
  73. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -0
  74. package/lib/dist/extraction/languages/vbnet.js +141 -0
  75. package/lib/dist/extraction/languages/vbnet.js.map +1 -0
  76. package/lib/dist/extraction/mybatis-extractor.d.ts +30 -10
  77. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  78. package/lib/dist/extraction/mybatis-extractor.js +140 -38
  79. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  80. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  81. package/lib/dist/extraction/tree-sitter-helpers.js +1 -0
  82. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  83. package/lib/dist/extraction/tree-sitter-types.d.ts +3 -1
  84. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  85. package/lib/dist/extraction/tree-sitter.d.ts +38 -0
  86. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  87. package/lib/dist/extraction/tree-sitter.js +753 -10
  88. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  89. package/lib/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
  90. package/lib/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  91. package/lib/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  92. package/lib/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  93. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  94. package/lib/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  95. package/lib/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  96. package/lib/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
  97. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  98. package/lib/dist/index.d.ts +63 -1
  99. package/lib/dist/index.d.ts.map +1 -1
  100. package/lib/dist/index.js +306 -2
  101. package/lib/dist/index.js.map +1 -1
  102. package/lib/dist/installer/index.d.ts.map +1 -1
  103. package/lib/dist/installer/index.js +3 -1
  104. package/lib/dist/installer/index.js.map +1 -1
  105. package/lib/dist/mcp/daemon.d.ts +25 -3
  106. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  107. package/lib/dist/mcp/daemon.js +39 -7
  108. package/lib/dist/mcp/daemon.js.map +1 -1
  109. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  110. package/lib/dist/mcp/dynamic-boundaries.js +2 -1
  111. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  112. package/lib/dist/mcp/early-ppid.d.ts +26 -0
  113. package/lib/dist/mcp/early-ppid.d.ts.map +1 -0
  114. package/lib/dist/mcp/early-ppid.js +29 -0
  115. package/lib/dist/mcp/early-ppid.js.map +1 -0
  116. package/lib/dist/mcp/index.d.ts.map +1 -1
  117. package/lib/dist/mcp/index.js +21 -4
  118. package/lib/dist/mcp/index.js.map +1 -1
  119. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  120. package/lib/dist/mcp/proxy.js +21 -3
  121. package/lib/dist/mcp/proxy.js.map +1 -1
  122. package/lib/dist/mcp/startup-handshake.d.ts +44 -0
  123. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -0
  124. package/lib/dist/mcp/startup-handshake.js +73 -0
  125. package/lib/dist/mcp/startup-handshake.js.map +1 -0
  126. package/lib/dist/mcp/tools.d.ts +22 -0
  127. package/lib/dist/mcp/tools.d.ts.map +1 -1
  128. package/lib/dist/mcp/tools.js +74 -9
  129. package/lib/dist/mcp/tools.js.map +1 -1
  130. package/lib/dist/project-config.d.ts +38 -0
  131. package/lib/dist/project-config.d.ts.map +1 -1
  132. package/lib/dist/project-config.js +101 -2
  133. package/lib/dist/project-config.js.map +1 -1
  134. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  135. package/lib/dist/resolution/callback-synthesizer.js +672 -0
  136. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  137. package/lib/dist/resolution/frameworks/cics.d.ts +20 -0
  138. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -0
  139. package/lib/dist/resolution/frameworks/cics.js +90 -0
  140. package/lib/dist/resolution/frameworks/cics.js.map +1 -0
  141. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  142. package/lib/dist/resolution/frameworks/index.js +6 -0
  143. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  144. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  145. package/lib/dist/resolution/frameworks/java.js +14 -6
  146. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  147. package/lib/dist/resolution/frameworks/terraform.d.ts +38 -0
  148. package/lib/dist/resolution/frameworks/terraform.d.ts.map +1 -0
  149. package/lib/dist/resolution/frameworks/terraform.js +277 -0
  150. package/lib/dist/resolution/frameworks/terraform.js.map +1 -0
  151. package/lib/dist/resolution/import-resolver.d.ts +7 -0
  152. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  153. package/lib/dist/resolution/import-resolver.js +129 -4
  154. package/lib/dist/resolution/import-resolver.js.map +1 -1
  155. package/lib/dist/resolution/index.d.ts +39 -6
  156. package/lib/dist/resolution/index.d.ts.map +1 -1
  157. package/lib/dist/resolution/index.js +287 -50
  158. package/lib/dist/resolution/index.js.map +1 -1
  159. package/lib/dist/resolution/name-matcher.d.ts +0 -3
  160. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  161. package/lib/dist/resolution/name-matcher.js +225 -33
  162. package/lib/dist/resolution/name-matcher.js.map +1 -1
  163. package/lib/dist/resolution/strip-comments.d.ts +1 -1
  164. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  165. package/lib/dist/resolution/strip-comments.js +49 -0
  166. package/lib/dist/resolution/strip-comments.js.map +1 -1
  167. package/lib/dist/resolution/types.d.ts +20 -0
  168. package/lib/dist/resolution/types.d.ts.map +1 -1
  169. package/lib/dist/resolution/workspace-packages.d.ts +10 -0
  170. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  171. package/lib/dist/resolution/workspace-packages.js +142 -4
  172. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  173. package/lib/dist/search/identifier-segments.d.ts +60 -0
  174. package/lib/dist/search/identifier-segments.d.ts.map +1 -0
  175. package/lib/dist/search/identifier-segments.js +176 -0
  176. package/lib/dist/search/identifier-segments.js.map +1 -0
  177. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  178. package/lib/dist/sync/git-hooks.js +2 -0
  179. package/lib/dist/sync/git-hooks.js.map +1 -1
  180. package/lib/dist/sync/watcher.d.ts +10 -5
  181. package/lib/dist/sync/watcher.d.ts.map +1 -1
  182. package/lib/dist/sync/watcher.js +51 -14
  183. package/lib/dist/sync/watcher.js.map +1 -1
  184. package/lib/dist/sync/worktree.d.ts.map +1 -1
  185. package/lib/dist/sync/worktree.js +5 -0
  186. package/lib/dist/sync/worktree.js.map +1 -1
  187. package/lib/dist/types.d.ts +19 -1
  188. package/lib/dist/types.d.ts.map +1 -1
  189. package/lib/dist/types.js +10 -0
  190. package/lib/dist/types.js.map +1 -1
  191. package/lib/node_modules/.package-lock.json +1 -1
  192. package/lib/package.json +1 -1
  193. package/package.json +1 -1
  194. package/lib/dist/reasoning/config.d.ts +0 -45
  195. package/lib/dist/reasoning/config.d.ts.map +0 -1
  196. package/lib/dist/reasoning/config.js +0 -171
  197. package/lib/dist/reasoning/config.js.map +0 -1
  198. package/lib/dist/reasoning/credentials.d.ts +0 -5
  199. package/lib/dist/reasoning/credentials.d.ts.map +0 -1
  200. package/lib/dist/reasoning/credentials.js +0 -83
  201. package/lib/dist/reasoning/credentials.js.map +0 -1
  202. package/lib/dist/reasoning/login.d.ts +0 -21
  203. package/lib/dist/reasoning/login.d.ts.map +0 -1
  204. package/lib/dist/reasoning/login.js +0 -85
  205. package/lib/dist/reasoning/login.js.map +0 -1
  206. package/lib/dist/reasoning/reasoner.d.ts +0 -43
  207. package/lib/dist/reasoning/reasoner.d.ts.map +0 -1
  208. package/lib/dist/reasoning/reasoner.js +0 -308
  209. package/lib/dist/reasoning/reasoner.js.map +0 -1
@@ -0,0 +1,350 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.erlangExtractor = void 0;
4
+ const tree_sitter_helpers_1 = require("../tree-sitter-helpers");
5
+ // Node names follow the vendored WhatsApp/tree-sitter-erlang grammar (0.19,
6
+ // ABI 14) — the grammar behind the Erlang Language Platform (ELP).
7
+ //
8
+ // Erlang is form-based, and three of its shapes don't fit the generic
9
+ // extractor, so every symbol-bearing top-level form is dispatched through the
10
+ // visitNode hook below instead:
11
+ // - a function's name lives on its CLAUSE, not the fun_decl, and the grammar
12
+ // emits one fun_decl PER CLAUSE — consecutive same-name fun_decl forms are
13
+ // merged into a single function node here;
14
+ // - type-position expressions (-spec/-type/-callback bodies, record field
15
+ // types) parse as `call` nodes, so descending into them would mint bogus
16
+ // call refs to type names (`pid()`, `term()`); the hook consumes those
17
+ // subtrees;
18
+ // - record_decl carries its fields as direct children (no body field), which
19
+ // the generic extractStruct would skip as a forward declaration.
20
+ // Calls (local `f(X)`, remote `mod:f(X)`, `fun f/1` references, and record
21
+ // usages) are handled by the erlang branch in extractCall — remote calls are
22
+ // emitted as `mod::f`, which matches the qualifiedName the module namespace
23
+ // produces (see packageTypes below), so cross-module resolution rides the
24
+ // standard qualified-name matcher.
25
+ /** Text of an atom with quoted-atom quotes stripped (`'EXIT'` → `EXIT`). */
26
+ function atomText(node, source) {
27
+ return (0, tree_sitter_helpers_1.getNodeText)(node, source).replace(/^'([\s\S]*)'$/, '$1');
28
+ }
29
+ function collapseWs(text) {
30
+ return text.replace(/\s+/g, ' ').trim();
31
+ }
32
+ // --- Per-file memos. Extraction is file-sequential within a worker, so a
33
+ // single-entry memo keyed by filePath is safe (and resets naturally). ---
34
+ /** Exported function names for the current file ('all' for -compile(export_all)). */
35
+ let exportsFile = '';
36
+ let exportsMemo = new Set();
37
+ /**
38
+ * Clause-merge state: the previous fun_decl's name and node id. A fun_decl
39
+ * whose clause repeats that name is a continuation clause (or a same-name
40
+ * different-arity definition — deliberately grouped under one node, the way
41
+ * overloads are elsewhere) and attaches to the existing node instead of
42
+ * creating a duplicate.
43
+ */
44
+ let lastFnFile = '';
45
+ let lastFnName = '';
46
+ let lastFnId = '';
47
+ function moduleExports(node, source, filePath) {
48
+ if (filePath === exportsFile)
49
+ return exportsMemo;
50
+ let root = node;
51
+ while (root.parent)
52
+ root = root.parent;
53
+ let result = new Set();
54
+ for (let i = 0; i < root.namedChildCount; i++) {
55
+ const form = root.namedChild(i);
56
+ if (!form)
57
+ continue;
58
+ if (form.type === 'compile_options_attribute' &&
59
+ (0, tree_sitter_helpers_1.getNodeText)(form, source).includes('export_all')) {
60
+ result = 'all';
61
+ break;
62
+ }
63
+ if (form.type === 'export_attribute') {
64
+ for (const fa of form.namedChildren) {
65
+ if (fa.type !== 'fa')
66
+ continue;
67
+ const fun = (0, tree_sitter_helpers_1.getChildByField)(fa, 'fun');
68
+ if (fun)
69
+ result.add(atomText(fun, source));
70
+ }
71
+ }
72
+ }
73
+ exportsFile = filePath;
74
+ exportsMemo = result;
75
+ return result;
76
+ }
77
+ /** The -spec directly above a function (comments may sit between), if it names it. */
78
+ function precedingSpec(node, name, source) {
79
+ let prev = node.previousNamedSibling;
80
+ while (prev && prev.type === 'comment')
81
+ prev = prev.previousNamedSibling;
82
+ if (prev?.type === 'spec') {
83
+ const specFun = (0, tree_sitter_helpers_1.getChildByField)(prev, 'fun');
84
+ if (specFun && atomText(specFun, source) === name)
85
+ return prev;
86
+ }
87
+ return null;
88
+ }
89
+ /** `name(Args) when Guard` — the clause text up to the `->`. */
90
+ function clauseHeader(clause, source) {
91
+ const body = (0, tree_sitter_helpers_1.getChildByField)(clause, 'body');
92
+ const end = body ? body.startIndex : clause.endIndex;
93
+ return collapseWs(source.substring(clause.startIndex, end)) || undefined;
94
+ }
95
+ function handleFunDecl(node, ctx) {
96
+ const clauses = node.namedChildren.filter((c) => c.type === 'function_clause');
97
+ const first = clauses[0];
98
+ if (!first)
99
+ return true; // macro-templated clause (`?M(...) -> ...`) — no static name
100
+ const nameNode = (0, tree_sitter_helpers_1.getChildByField)(first, 'name');
101
+ if (!nameNode)
102
+ return true;
103
+ const name = atomText(nameNode, ctx.source);
104
+ if (!name)
105
+ return true;
106
+ // Continuation clause: extend the existing node's span and attribute this
107
+ // clause's calls to it.
108
+ if (ctx.filePath === lastFnFile && name === lastFnName && lastFnId) {
109
+ for (let i = ctx.nodes.length - 1; i >= 0; i--) {
110
+ const n = ctx.nodes[i];
111
+ if (n && n.id === lastFnId) {
112
+ if (node.endPosition.row + 1 > n.endLine)
113
+ n.endLine = node.endPosition.row + 1;
114
+ break;
115
+ }
116
+ }
117
+ ctx.pushScope(lastFnId);
118
+ for (const clause of clauses)
119
+ ctx.visitFunctionBody(clause, lastFnId);
120
+ ctx.popScope();
121
+ return true;
122
+ }
123
+ const spec = precedingSpec(node, name, ctx.source);
124
+ const exports = moduleExports(node, ctx.source, ctx.filePath);
125
+ const fn = ctx.createNode('function', name, node, {
126
+ docstring: (0, tree_sitter_helpers_1.getPrecedingDocstring)(spec ?? node, ctx.source),
127
+ signature: spec
128
+ ? collapseWs((0, tree_sitter_helpers_1.getNodeText)(spec, ctx.source)).slice(0, 300)
129
+ : clauseHeader(first, ctx.source),
130
+ isExported: exports === 'all' || exports.has(name),
131
+ });
132
+ if (!fn)
133
+ return true;
134
+ ctx.pushScope(fn.id);
135
+ // The whole clause is walked (not just the body) so record patterns in the
136
+ // arguments and guard calls contribute references too.
137
+ for (const clause of clauses)
138
+ ctx.visitFunctionBody(clause, fn.id);
139
+ ctx.popScope();
140
+ lastFnFile = ctx.filePath;
141
+ lastFnName = name;
142
+ lastFnId = fn.id;
143
+ return true;
144
+ }
145
+ function handleRecordDecl(node, ctx) {
146
+ const nameNode = (0, tree_sitter_helpers_1.getChildByField)(node, 'name');
147
+ if (!nameNode)
148
+ return true;
149
+ const rec = ctx.createNode('struct', atomText(nameNode, ctx.source), node, {
150
+ docstring: (0, tree_sitter_helpers_1.getPrecedingDocstring)(node, ctx.source),
151
+ signature: collapseWs((0, tree_sitter_helpers_1.getNodeText)(node, ctx.source)).slice(0, 300),
152
+ });
153
+ if (rec) {
154
+ ctx.pushScope(rec.id);
155
+ for (const field of node.namedChildren) {
156
+ if (field.type !== 'record_field')
157
+ continue;
158
+ const fieldName = (0, tree_sitter_helpers_1.getChildByField)(field, 'name');
159
+ if (fieldName)
160
+ ctx.createNode('field', atomText(fieldName, ctx.source), field);
161
+ }
162
+ ctx.popScope();
163
+ }
164
+ return true; // field types/defaults are type-position exprs — don't descend
165
+ }
166
+ function handleTypeAlias(node, ctx) {
167
+ const typeName = (0, tree_sitter_helpers_1.getChildByField)(node, 'name'); // type_name wrapper
168
+ const nameNode = typeName ? (0, tree_sitter_helpers_1.getChildByField)(typeName, 'name') : null;
169
+ if (nameNode) {
170
+ ctx.createNode('type_alias', atomText(nameNode, ctx.source), node, {
171
+ signature: collapseWs((0, tree_sitter_helpers_1.getNodeText)(node, ctx.source)).slice(0, 200),
172
+ });
173
+ }
174
+ return true;
175
+ }
176
+ function handlePpDefine(node, ctx) {
177
+ const lhs = (0, tree_sitter_helpers_1.getChildByField)(node, 'lhs');
178
+ const nameNode = lhs ? (0, tree_sitter_helpers_1.getChildByField)(lhs, 'name') : null;
179
+ if (!nameNode)
180
+ return true;
181
+ const macro = ctx.createNode('constant', (0, tree_sitter_helpers_1.getNodeText)(nameNode, ctx.source), node, {
182
+ signature: collapseWs((0, tree_sitter_helpers_1.getNodeText)(node, ctx.source)).slice(0, 200),
183
+ });
184
+ // The replacement's calls execute at expansion sites, but attributing them
185
+ // to the MACRO node keeps them true exactly once: `-define(LOG_AUDIT(E),
186
+ // audit_logger:log(E))` gives the LOG_AUDIT constant a `calls` edge to the
187
+ // logger, and each `?LOG_AUDIT(...)` use site links to the constant (see the
188
+ // macro_call_expr case in extractCall) — so the chain
189
+ // `caller → LOG_AUDIT → audit_logger:log` traverses without minting a
190
+ // per-use duplicate of the body's calls.
191
+ const replacement = (0, tree_sitter_helpers_1.getChildByField)(node, 'replacement');
192
+ if (macro && replacement) {
193
+ ctx.pushScope(macro.id);
194
+ ctx.visitFunctionBody(replacement, macro.id);
195
+ ctx.popScope();
196
+ }
197
+ return true;
198
+ }
199
+ function handleBehaviour(node, ctx) {
200
+ const nameNode = (0, tree_sitter_helpers_1.getChildByField)(node, 'name');
201
+ const parentId = ctx.nodeStack[ctx.nodeStack.length - 1];
202
+ if (nameNode && parentId) {
203
+ // `-behaviour(x)` implements x's callback contract. Resolves when the
204
+ // behaviour module is in the repo; OTP behaviours (gen_server, …) simply
205
+ // stay unresolved.
206
+ ctx.addUnresolvedReference({
207
+ fromNodeId: parentId,
208
+ referenceName: atomText(nameNode, ctx.source),
209
+ referenceKind: 'implements',
210
+ line: node.startPosition.row + 1,
211
+ column: node.startPosition.column,
212
+ });
213
+ }
214
+ return true;
215
+ }
216
+ /**
217
+ * OTP application resource file (`<app>.app.src` / `<app>.app`): a single
218
+ * `{application, Name, Props}.` term the grammar parses as a top-level
219
+ * expression. Two properties carry graph structure — `{mod, {Mod, _Args}}`
220
+ * names the application-callback module (the app's entry point), and
221
+ * `{applications, [...]}` / `{included_applications, [...]}` declare the apps
222
+ * this one depends on. In an umbrella repo those resolve to the sibling app's
223
+ * module of the same name (the OTP convention); kernel/stdlib and other
224
+ * out-of-repo apps stay unresolved.
225
+ */
226
+ function handleAppResourceTuple(node, ctx) {
227
+ const parentId = ctx.nodeStack[ctx.nodeStack.length - 1];
228
+ const props = node.namedChildren[2];
229
+ if (!parentId || props?.type !== 'list')
230
+ return true;
231
+ const ref = (nameNode, kind) => {
232
+ const name = atomText(nameNode, ctx.source);
233
+ if (!name)
234
+ return;
235
+ ctx.addUnresolvedReference({
236
+ fromNodeId: parentId,
237
+ referenceName: name,
238
+ referenceKind: kind,
239
+ line: nameNode.startPosition.row + 1,
240
+ column: nameNode.startPosition.column,
241
+ });
242
+ };
243
+ for (const prop of props.namedChildren) {
244
+ if (prop.type !== 'tuple' || prop.namedChildren.length < 2)
245
+ continue;
246
+ const key = prop.namedChildren[0];
247
+ const value = prop.namedChildren[1];
248
+ if (!key || key.type !== 'atom' || !value)
249
+ continue;
250
+ const keyName = atomText(key, ctx.source);
251
+ if (keyName === 'mod' && value.type === 'tuple') {
252
+ const mod = value.namedChildren[0];
253
+ if (mod?.type === 'atom')
254
+ ref(mod, 'references');
255
+ }
256
+ else if ((keyName === 'applications' || keyName === 'included_applications') &&
257
+ value.type === 'list') {
258
+ for (const app of value.namedChildren) {
259
+ if (app.type === 'atom')
260
+ ref(app, 'imports');
261
+ }
262
+ }
263
+ }
264
+ return true; // nothing else in an app term carries graph structure
265
+ }
266
+ exports.erlangExtractor = {
267
+ functionTypes: ['fun_decl'], // dispatched via visitNode (name lives on the clause)
268
+ classTypes: [],
269
+ methodTypes: [],
270
+ interfaceTypes: [],
271
+ structTypes: ['record_decl'], // dispatched via visitNode (fields are direct children)
272
+ enumTypes: [],
273
+ typeAliasTypes: ['type_alias', 'opaque'], // dispatched via visitNode
274
+ importTypes: ['import_attribute', 'pp_include', 'pp_include_lib'],
275
+ callTypes: [
276
+ 'call',
277
+ 'internal_fun', // fun f/1
278
+ 'external_fun', // fun mod:f/1
279
+ 'record_expr', // #rec{...} construction
280
+ 'record_update_expr', // X#rec{...}
281
+ 'record_index_expr', // #rec.field
282
+ 'record_field_expr', // X#rec.field
283
+ 'macro_call_expr', // ?MACRO / ?MACRO(...) — links use sites to the -define constant
284
+ ],
285
+ variableTypes: [],
286
+ nameField: 'name',
287
+ bodyField: 'body',
288
+ paramsField: 'args',
289
+ // `-module(m)` wraps the file's declarations in a namespace so every
290
+ // function's qualifiedName is `m::f` — which is exactly the reference shape
291
+ // the extractCall erlang branch emits for remote calls, so `mod:f(...)`
292
+ // resolves through matchByQualifiedName with no resolver changes.
293
+ packageTypes: ['module_attribute'],
294
+ extractPackage: (node, source) => {
295
+ const name = (0, tree_sitter_helpers_1.getChildByField)(node, 'name');
296
+ return name ? atomText(name, source) : null;
297
+ },
298
+ extractImport: (node, source) => {
299
+ if (node.type === 'import_attribute') {
300
+ const mod = (0, tree_sitter_helpers_1.getChildByField)(node, 'module');
301
+ if (!mod)
302
+ return null;
303
+ return {
304
+ moduleName: atomText(mod, source),
305
+ signature: collapseWs((0, tree_sitter_helpers_1.getNodeText)(node, source)).slice(0, 200),
306
+ };
307
+ }
308
+ // pp_include / pp_include_lib — a C-include-style file dependency on a .hrl.
309
+ const file = (0, tree_sitter_helpers_1.getChildByField)(node, 'file');
310
+ if (!file)
311
+ return null;
312
+ const headerPath = (0, tree_sitter_helpers_1.getNodeText)(file, source).replace(/^"/, '').replace(/"$/, '');
313
+ if (!headerPath)
314
+ return null;
315
+ return { moduleName: headerPath, signature: (0, tree_sitter_helpers_1.getNodeText)(node, source).trim() };
316
+ },
317
+ visitNode: (node, ctx) => {
318
+ switch (node.type) {
319
+ case 'fun_decl':
320
+ return handleFunDecl(node, ctx);
321
+ case 'record_decl':
322
+ return handleRecordDecl(node, ctx);
323
+ case 'type_alias':
324
+ case 'opaque':
325
+ return handleTypeAlias(node, ctx);
326
+ case 'pp_define':
327
+ return handlePpDefine(node, ctx);
328
+ case 'behaviour_attribute':
329
+ return handleBehaviour(node, ctx);
330
+ // -spec / -callback: their type expressions parse as `call` nodes;
331
+ // consume the subtree so the walker doesn't mint bogus call refs.
332
+ case 'spec':
333
+ case 'callback':
334
+ return true;
335
+ // `{application, Name, Props}.` at the top of an .app/.app.src resource
336
+ // file (never a valid form in a module, so the gate is file + position).
337
+ case 'tuple':
338
+ if (node.parent?.type === 'source_file' &&
339
+ /\.app(?:\.src)?$/i.test(ctx.filePath) &&
340
+ node.namedChildren[0]?.type === 'atom' &&
341
+ atomText(node.namedChildren[0], ctx.source) === 'application') {
342
+ return handleAppResourceTuple(node, ctx);
343
+ }
344
+ return false;
345
+ default:
346
+ return false;
347
+ }
348
+ },
349
+ };
350
+ //# sourceMappingURL=erlang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erlang.js","sourceRoot":"","sources":["../../../src/extraction/languages/erlang.ts"],"names":[],"mappings":";;;AACA,gEAA6F;AAG7F,4EAA4E;AAC5E,mEAAmE;AACnE,EAAE;AACF,sEAAsE;AACtE,8EAA8E;AAC9E,gCAAgC;AAChC,+EAA+E;AAC/E,+EAA+E;AAC/E,+CAA+C;AAC/C,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,gBAAgB;AAChB,+EAA+E;AAC/E,qEAAqE;AACrE,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,mCAAmC;AAEnC,4EAA4E;AAC5E,SAAS,QAAQ,CAAC,IAAgB,EAAE,MAAc;IAChD,OAAO,IAAA,iCAAW,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED,0EAA0E;AAC1E,0EAA0E;AAE1E,qFAAqF;AACrF,IAAI,WAAW,GAAG,EAAE,CAAC;AACrB,IAAI,WAAW,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEjD;;;;;;GAMG;AACH,IAAI,UAAU,GAAG,EAAE,CAAC;AACpB,IAAI,UAAU,GAAG,EAAE,CAAC;AACpB,IAAI,QAAQ,GAAG,EAAE,CAAC;AAElB,SAAS,aAAa,CAAC,IAAgB,EAAE,MAAc,EA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AC,aAAa,CAAC,CAAC,CAAE,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,aAAa,EAC9D,CAAC;oBACD,OAAO,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;gBAC3C,CAAC;gBACD,OAAO,KAAK,CAAC;YACf;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extraction/languages/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAsB9D,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAuBnE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extraction/languages/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA+B9D,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAgCnE,CAAC"}
@@ -26,6 +26,15 @@ const lua_1 = require("./lua");
26
26
  const r_1 = require("./r");
27
27
  const luau_1 = require("./luau");
28
28
  const objc_1 = require("./objc");
29
+ const cfscript_1 = require("./cfscript");
30
+ const cfquery_1 = require("./cfquery");
31
+ const cobol_1 = require("./cobol");
32
+ const vbnet_1 = require("./vbnet");
33
+ const erlang_1 = require("./erlang");
34
+ const solidity_1 = require("./solidity");
35
+ const terraform_1 = require("./terraform");
36
+ const arkts_1 = require("./arkts");
37
+ const nix_1 = require("./nix");
29
38
  exports.EXTRACTORS = {
30
39
  typescript: typescript_1.typescriptExtractor,
31
40
  tsx: typescript_1.typescriptExtractor,
@@ -49,5 +58,14 @@ exports.EXTRACTORS = {
49
58
  r: r_1.rExtractor,
50
59
  luau: luau_1.luauExtractor,
51
60
  objc: objc_1.objcExtractor,
61
+ cfscript: cfscript_1.cfscriptExtractor,
62
+ cfquery: cfquery_1.cfqueryExtractor,
63
+ cobol: cobol_1.cobolExtractor,
64
+ vbnet: vbnet_1.vbnetExtractor,
65
+ erlang: erlang_1.erlangExtractor,
66
+ solidity: solidity_1.solidityExtractor,
67
+ terraform: terraform_1.terraformExtractor,
68
+ arkts: arkts_1.arktsExtractor,
69
+ nix: nix_1.nixExtractor,
52
70
  };
53
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extraction/languages/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,6CAAmD;AACnD,6CAAmD;AACnD,qCAA2C;AAC3C,6BAAmC;AACnC,iCAAuC;AACvC,iCAAuC;AACvC,mCAAmD;AACnD,qCAA2C;AAC3C,+BAAqC;AACrC,iCAAuC;AACvC,mCAAyC;AACzC,qCAA2C;AAC3C,iCAAuC;AACvC,qCAA2C;AAC3C,mCAAyC;AACzC,+BAAqC;AACrC,2BAAiC;AACjC,iCAAuC;AACvC,iCAAuC;AAE1B,QAAA,UAAU,GAAiD;IACtE,UAAU,EAAE,gCAAmB;IAC/B,GAAG,EAAE,gCAAmB;IACxB,UAAU,EAAE,gCAAmB;IAC/B,GAAG,EAAE,gCAAmB;IACxB,MAAM,EAAE,wBAAe;IACvB,EAAE,EAAE,gBAAW;IACf,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAa;IACnB,CAAC,EAAE,kBAAU;IACb,GAAG,EAAE,oBAAY;IACjB,MAAM,EAAE,wBAAe;IACvB,GAAG,EAAE,kBAAY;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,sBAAc;IACrB,MAAM,EAAE,wBAAe;IACvB,IAAI,EAAE,oBAAa;IACnB,MAAM,EAAE,wBAAe;IACvB,KAAK,EAAE,sBAAc;IACrB,GAAG,EAAE,kBAAY;IACjB,CAAC,EAAE,cAAU;IACb,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAa;CACpB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extraction/languages/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,6CAAmD;AACnD,6CAAmD;AACnD,qCAA2C;AAC3C,6BAAmC;AACnC,iCAAuC;AACvC,iCAAuC;AACvC,mCAAmD;AACnD,qCAA2C;AAC3C,+BAAqC;AACrC,iCAAuC;AACvC,mCAAyC;AACzC,qCAA2C;AAC3C,iCAAuC;AACvC,qCAA2C;AAC3C,mCAAyC;AACzC,+BAAqC;AACrC,2BAAiC;AACjC,iCAAuC;AACvC,iCAAuC;AACvC,yCAA+C;AAC/C,uCAA6C;AAC7C,mCAAyC;AACzC,mCAAyC;AACzC,qCAA2C;AAC3C,yCAA+C;AAC/C,2CAAiD;AACjD,mCAAyC;AACzC,+BAAqC;AAExB,QAAA,UAAU,GAAiD;IACtE,UAAU,EAAE,gCAAmB;IAC/B,GAAG,EAAE,gCAAmB;IACxB,UAAU,EAAE,gCAAmB;IAC/B,GAAG,EAAE,gCAAmB;IACxB,MAAM,EAAE,wBAAe;IACvB,EAAE,EAAE,gBAAW;IACf,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAa;IACnB,CAAC,EAAE,kBAAU;IACb,GAAG,EAAE,oBAAY;IACjB,MAAM,EAAE,wBAAe;IACvB,GAAG,EAAE,kBAAY;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,sBAAc;IACrB,MAAM,EAAE,wBAAe;IACvB,IAAI,EAAE,oBAAa;IACnB,MAAM,EAAE,wBAAe;IACvB,KAAK,EAAE,sBAAc;IACrB,GAAG,EAAE,kBAAY;IACjB,CAAC,EAAE,cAAU;IACb,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAa;IACnB,QAAQ,EAAE,4BAAiB;IAC3B,OAAO,EAAE,0BAAgB;IACzB,KAAK,EAAE,sBAAc;IACrB,KAAK,EAAE,sBAAc;IACrB,MAAM,EAAE,wBAAe;IACvB,QAAQ,EAAE,4BAAiB;IAC3B,SAAS,EAAE,8BAAkB;IAC7B,KAAK,EAAE,sBAAc;IACrB,GAAG,EAAE,kBAAY;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { LanguageExtractor } from '../tree-sitter-types';
2
+ export declare const nixExtractor: LanguageExtractor;
3
+ //# sourceMappingURL=nix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nix.d.ts","sourceRoot":"","sources":["../../../src/extraction/languages/nix.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA2KhF,eAAO,MAAM,YAAY,EAAE,iBAsJ1B,CAAC"}