@colbymchenry/codegraph-darwin-arm64 1.2.0 → 1.3.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 +232 -61
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +4 -1
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/db/index.d.ts +17 -5
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +68 -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 +19 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +76 -1
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +180 -0
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +19 -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 +9 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +115 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +46 -1
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +338 -34
- 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 +42 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +369 -4
- 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/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 +3 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +38 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +753 -10
- package/lib/dist/extraction/tree-sitter.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/index.d.ts +63 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +327 -5
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +3 -1
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +25 -3
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +62 -8
- 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 +21 -4
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +29 -3
- 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.map +1 -1
- package/lib/dist/mcp/session.js +6 -0
- 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 +88 -18
- 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 +38 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +101 -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.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +982 -81
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- 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 +49 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +342 -65
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +0 -3
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +225 -33
- 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.map +1 -1
- package/lib/dist/sync/worktree.js +5 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/types.d.ts +19 -1
- 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/node_modules/.package-lock.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
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CfmlExtractor = void 0;
|
|
4
|
+
exports.isBareScriptCfml = isBareScriptCfml;
|
|
5
|
+
const tree_sitter_helpers_1 = require("./tree-sitter-helpers");
|
|
6
|
+
const tree_sitter_1 = require("./tree-sitter");
|
|
7
|
+
const grammars_1 = require("./grammars");
|
|
8
|
+
/**
|
|
9
|
+
* CfmlExtractor - Extracts code relationships from CFML source (.cfc/.cfm).
|
|
10
|
+
*
|
|
11
|
+
* tree-sitter-cfml splits CFML into two related grammars: `cfml` (tag-based —
|
|
12
|
+
* `<cfcomponent>`/`<cffunction>`/HTML) and `cfscript` (modern bare-script
|
|
13
|
+
* `component { ... }` syntax). The `cfml` grammar's own injections.scm treats
|
|
14
|
+
* bare-script content as an opaque blob meant to be re-parsed by `cfscript` —
|
|
15
|
+
* that re-parsing only happens at the editor/highlighting layer, not in the
|
|
16
|
+
* raw AST, so this extractor replicates it: a file whose first real token
|
|
17
|
+
* isn't `<` is delegated wholesale to the cfscript grammar (the dominant
|
|
18
|
+
* modern style); otherwise the file is walked tag-by-tag with the cfml
|
|
19
|
+
* grammar, delegating any `<cfscript>` tag bodies the same way.
|
|
20
|
+
*/
|
|
21
|
+
class CfmlExtractor {
|
|
22
|
+
filePath;
|
|
23
|
+
source;
|
|
24
|
+
language;
|
|
25
|
+
nodes = [];
|
|
26
|
+
edges = [];
|
|
27
|
+
unresolvedReferences = [];
|
|
28
|
+
errors = [];
|
|
29
|
+
/** `language` is the file's detected language — `'cfml'` for `.cfc`/`.cfm`, `'cfscript'` for `.cfs`. Both dialect-switch internally; this only controls the language tag stamped onto emitted nodes/refs. */
|
|
30
|
+
constructor(filePath, source, language = 'cfml') {
|
|
31
|
+
this.filePath = filePath;
|
|
32
|
+
this.source = source;
|
|
33
|
+
this.language = language;
|
|
34
|
+
}
|
|
35
|
+
extract() {
|
|
36
|
+
const startTime = Date.now();
|
|
37
|
+
try {
|
|
38
|
+
if (isBareScriptCfml(this.source)) {
|
|
39
|
+
this.extractBareScript();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.extractTagBased();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
this.errors.push({
|
|
47
|
+
message: `CFML extraction error: ${error instanceof Error ? error.message : String(error)}`,
|
|
48
|
+
severity: 'error',
|
|
49
|
+
code: 'parse_error',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
nodes: this.nodes,
|
|
54
|
+
edges: this.edges,
|
|
55
|
+
unresolvedReferences: this.unresolvedReferences,
|
|
56
|
+
errors: this.errors,
|
|
57
|
+
durationMs: Date.now() - startTime,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** Modern bare-script `.cfc`/`.cfm`: delegate the whole file to the cfscript grammar. */
|
|
61
|
+
extractBareScript() {
|
|
62
|
+
const extractor = new tree_sitter_1.TreeSitterExtractor(this.filePath, this.source, 'cfscript');
|
|
63
|
+
const result = extractor.extract();
|
|
64
|
+
// cfscript's `component`/`interface` node has no `name` field — a CFC's
|
|
65
|
+
// component name is always implicit from its file name, never declared
|
|
66
|
+
// in source — so the generic extractor names it '<anonymous>'.
|
|
67
|
+
const componentName = this.componentNameFromPath();
|
|
68
|
+
for (const node of result.nodes) {
|
|
69
|
+
node.language = this.language;
|
|
70
|
+
if (node.name === '<anonymous>' && (node.kind === 'class' || node.kind === 'interface')) {
|
|
71
|
+
node.name = componentName;
|
|
72
|
+
node.qualifiedName = `${this.filePath}::${componentName}`;
|
|
73
|
+
}
|
|
74
|
+
else if (node.qualifiedName === '<anonymous>' || node.qualifiedName.startsWith('<anonymous>::')) {
|
|
75
|
+
// Members were scoped under the anonymous component (`<anonymous>::save`)
|
|
76
|
+
// — carry the rename into their scope chains so type-validated method
|
|
77
|
+
// resolution (which wants `UserService::save`, see resolveMethodOnType)
|
|
78
|
+
// can match them. Inner genuinely-anonymous segments are untouched.
|
|
79
|
+
node.qualifiedName = componentName + node.qualifiedName.slice('<anonymous>'.length);
|
|
80
|
+
}
|
|
81
|
+
this.nodes.push(node);
|
|
82
|
+
}
|
|
83
|
+
this.edges.push(...result.edges);
|
|
84
|
+
for (const ref of result.unresolvedReferences) {
|
|
85
|
+
ref.language = this.language;
|
|
86
|
+
this.unresolvedReferences.push(ref);
|
|
87
|
+
}
|
|
88
|
+
this.errors.push(...result.errors);
|
|
89
|
+
}
|
|
90
|
+
/** Legacy tag-based CFML: walk `<cfcomponent>`/`<cffunction>`, delegating `<cfscript>` bodies. */
|
|
91
|
+
extractTagBased() {
|
|
92
|
+
const parser = (0, grammars_1.getParser)('cfml');
|
|
93
|
+
if (!parser) {
|
|
94
|
+
this.errors.push({
|
|
95
|
+
message: 'cfml grammar not loaded',
|
|
96
|
+
severity: 'error',
|
|
97
|
+
code: 'unsupported_language',
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const tree = parser.parse(this.source);
|
|
102
|
+
if (!tree) {
|
|
103
|
+
this.errors.push({
|
|
104
|
+
message: 'Failed to parse CFML source',
|
|
105
|
+
severity: 'error',
|
|
106
|
+
code: 'parse_error',
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const fileNode = this.createFileNode();
|
|
111
|
+
this.walkProgram(tree.rootNode, fileNode.id);
|
|
112
|
+
}
|
|
113
|
+
/** Build the file's own `kind:'file'` node, spanning the whole source. Tag-based files need this explicitly — unlike `extractBareScript` (which delegates the whole file to `TreeSitterExtractor` and inherits its file node), `extractTagBased` walks the tree itself and has no other source of one. */
|
|
114
|
+
createFileNode() {
|
|
115
|
+
const lines = this.source.split('\n');
|
|
116
|
+
const id = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'file', this.filePath, 1);
|
|
117
|
+
const fileNode = {
|
|
118
|
+
id,
|
|
119
|
+
kind: 'file',
|
|
120
|
+
name: this.filePath.split(/[/\\]/).pop() || this.filePath,
|
|
121
|
+
qualifiedName: this.filePath,
|
|
122
|
+
filePath: this.filePath,
|
|
123
|
+
language: this.language,
|
|
124
|
+
startLine: 1,
|
|
125
|
+
endLine: lines.length,
|
|
126
|
+
startColumn: 0,
|
|
127
|
+
endColumn: lines[lines.length - 1]?.length || 0,
|
|
128
|
+
updatedAt: Date.now(),
|
|
129
|
+
};
|
|
130
|
+
this.nodes.push(fileNode);
|
|
131
|
+
return fileNode;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Walks `program`'s named children with a single forward cursor (not an
|
|
135
|
+
* index loop) — `extractComponent` consumes a variable run of FOLLOWING
|
|
136
|
+
* siblings as the component body (see its doc comment), so this must
|
|
137
|
+
* resume from whatever it last consumed rather than revisiting those same
|
|
138
|
+
* cffunction/cfscript siblings a second time as bogus top-level symbols.
|
|
139
|
+
*/
|
|
140
|
+
walkProgram(root, fileNodeId) {
|
|
141
|
+
let child = root.namedChild(0);
|
|
142
|
+
while (child) {
|
|
143
|
+
if (child.type === 'cf_component_open_tag') {
|
|
144
|
+
child = this.extractComponent(child, fileNodeId).nextSibling;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
else if (child.type === 'cf_function_tag') {
|
|
148
|
+
// A cffunction outside any cfcomponent wrapper (rare, but legal in a
|
|
149
|
+
// .cfm template) — extract as a top-level function, contained by the file.
|
|
150
|
+
this.extractFunctionTag(child, undefined, fileNodeId);
|
|
151
|
+
}
|
|
152
|
+
else if (child.type === 'cf_script_tag') {
|
|
153
|
+
this.delegateScriptTag(child, fileNodeId);
|
|
154
|
+
}
|
|
155
|
+
else if (child.type === 'cf_query_tag') {
|
|
156
|
+
this.delegateQueryTag(child, fileNodeId);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.delegateNestedTags(child, fileNodeId);
|
|
160
|
+
}
|
|
161
|
+
child = child.nextSibling;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* `<cfcomponent extends="Base" implements="IFoo,IBar">...</cfcomponent>`.
|
|
166
|
+
* The grammar's implicit-end-tag scanner means component body content
|
|
167
|
+
* (cffunction tags, cfscript tags, etc.) appears as the open tag's FOLLOWING
|
|
168
|
+
* siblings in `program`, not nested children — walk forward to the matching
|
|
169
|
+
* cf_component_close_tag.
|
|
170
|
+
*/
|
|
171
|
+
extractComponent(openTag, containerId) {
|
|
172
|
+
const name = this.tagAttr(openTag, 'name') ?? this.componentNameFromPath();
|
|
173
|
+
const id = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'class', name, openTag.startPosition.row + 1);
|
|
174
|
+
const classNode = {
|
|
175
|
+
id,
|
|
176
|
+
kind: 'class',
|
|
177
|
+
name,
|
|
178
|
+
qualifiedName: `${this.filePath}::${name}`,
|
|
179
|
+
filePath: this.filePath,
|
|
180
|
+
language: this.language,
|
|
181
|
+
startLine: openTag.startPosition.row + 1,
|
|
182
|
+
endLine: openTag.startPosition.row + 1, // extended below once the close tag is found
|
|
183
|
+
startColumn: openTag.startPosition.column,
|
|
184
|
+
endColumn: openTag.endPosition.column,
|
|
185
|
+
isExported: true,
|
|
186
|
+
updatedAt: Date.now(),
|
|
187
|
+
};
|
|
188
|
+
this.nodes.push(classNode);
|
|
189
|
+
if (containerId) {
|
|
190
|
+
this.edges.push({ source: containerId, target: classNode.id, kind: 'contains' });
|
|
191
|
+
}
|
|
192
|
+
const extendsName = this.tagAttr(openTag, 'extends');
|
|
193
|
+
if (extendsName) {
|
|
194
|
+
this.unresolvedReferences.push({
|
|
195
|
+
fromNodeId: classNode.id,
|
|
196
|
+
referenceName: extendsName,
|
|
197
|
+
referenceKind: 'extends',
|
|
198
|
+
filePath: this.filePath,
|
|
199
|
+
line: openTag.startPosition.row + 1,
|
|
200
|
+
column: openTag.startPosition.column,
|
|
201
|
+
language: this.language,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const implementsAttr = this.tagAttr(openTag, 'implements');
|
|
205
|
+
if (implementsAttr) {
|
|
206
|
+
for (const iface of implementsAttr.split(',').map((s) => s.trim()).filter(Boolean)) {
|
|
207
|
+
this.unresolvedReferences.push({
|
|
208
|
+
fromNodeId: classNode.id,
|
|
209
|
+
referenceName: iface,
|
|
210
|
+
referenceKind: 'implements',
|
|
211
|
+
filePath: this.filePath,
|
|
212
|
+
line: openTag.startPosition.row + 1,
|
|
213
|
+
column: openTag.startPosition.column,
|
|
214
|
+
language: this.language,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Walk siblings between the open tag and its close tag.
|
|
219
|
+
let sibling = openTag.nextSibling;
|
|
220
|
+
let lastNode = openTag;
|
|
221
|
+
while (sibling) {
|
|
222
|
+
if (sibling.type === 'cf_component_close_tag') {
|
|
223
|
+
lastNode = sibling;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
if (sibling.type === 'cf_function_tag') {
|
|
227
|
+
this.extractFunctionTag(sibling, classNode.id, classNode.id, classNode.name);
|
|
228
|
+
}
|
|
229
|
+
else if (sibling.type === 'cf_script_tag') {
|
|
230
|
+
this.delegateScriptTag(sibling, classNode.id, classNode.name);
|
|
231
|
+
}
|
|
232
|
+
else if (sibling.type === 'cf_query_tag') {
|
|
233
|
+
this.delegateQueryTag(sibling, classNode.id);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
this.delegateNestedTags(sibling, classNode.id, classNode.name);
|
|
237
|
+
}
|
|
238
|
+
lastNode = sibling;
|
|
239
|
+
sibling = sibling.nextSibling;
|
|
240
|
+
}
|
|
241
|
+
classNode.endLine = lastNode.endPosition.row + 1;
|
|
242
|
+
return lastNode;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* `<cffunction name="..." access="..." returntype="...">...</cffunction>`.
|
|
246
|
+
* `parentClassId` decides `method` vs top-level `function`; `containerId` is
|
|
247
|
+
* the `contains`-edge target (the class when inside one, otherwise the file
|
|
248
|
+
* node for a bare top-level cffunction) — kept separate so a top-level
|
|
249
|
+
* function still gets a containment edge without being misclassified as a
|
|
250
|
+
* method of the file. A method's qualifiedName is scoped under
|
|
251
|
+
* `parentClassName` (`TagService::save`, the same `Class::member` shape the
|
|
252
|
+
* generic extractor produces) so type-validated method resolution can match.
|
|
253
|
+
*/
|
|
254
|
+
extractFunctionTag(tag, parentClassId, containerId, parentClassName) {
|
|
255
|
+
const name = this.tagAttr(tag, 'name');
|
|
256
|
+
if (!name)
|
|
257
|
+
return;
|
|
258
|
+
const kind = parentClassId ? 'method' : 'function';
|
|
259
|
+
const id = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, kind, name, tag.startPosition.row + 1);
|
|
260
|
+
const access = this.tagAttr(tag, 'access');
|
|
261
|
+
const visibility = access === 'private' ? 'private'
|
|
262
|
+
: access === 'package' ? 'internal'
|
|
263
|
+
: access ? 'public'
|
|
264
|
+
: undefined;
|
|
265
|
+
const fnNode = {
|
|
266
|
+
id,
|
|
267
|
+
kind,
|
|
268
|
+
name,
|
|
269
|
+
qualifiedName: parentClassName ? `${parentClassName}::${name}` : `${this.filePath}::${name}`,
|
|
270
|
+
filePath: this.filePath,
|
|
271
|
+
language: this.language,
|
|
272
|
+
startLine: tag.startPosition.row + 1,
|
|
273
|
+
endLine: tag.endPosition.row + 1,
|
|
274
|
+
startColumn: tag.startPosition.column,
|
|
275
|
+
endColumn: tag.endPosition.column,
|
|
276
|
+
visibility,
|
|
277
|
+
returnType: this.tagAttr(tag, 'returntype'),
|
|
278
|
+
updatedAt: Date.now(),
|
|
279
|
+
};
|
|
280
|
+
this.nodes.push(fnNode);
|
|
281
|
+
if (containerId) {
|
|
282
|
+
this.edges.push({ source: containerId, target: fnNode.id, kind: 'contains' });
|
|
283
|
+
}
|
|
284
|
+
// Delegate any <cfscript>/<cfquery> bodies nested inside this function, at
|
|
285
|
+
// any depth (e.g. inside <cfif>/<cfloop>/<cftry> control-flow tags).
|
|
286
|
+
this.delegateNestedTags(tag, fnNode.id);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Recursively delegates any `cf_script_tag`/`cf_query_tag` found within
|
|
290
|
+
* `node`'s subtree — e.g. a `<cfscript>`/`<cfquery>` nested inside
|
|
291
|
+
* `<cfif>`/`<cfloop>`/`<cftry>` control-flow tags, which (unlike
|
|
292
|
+
* `<cfcomponent>`'s body — see the implicit-end-tag note on `extractComponent`)
|
|
293
|
+
* ARE normal children, just possibly several levels deep, so a direct-children
|
|
294
|
+
* check misses them. Does not descend into a nested `cf_function_tag` — that
|
|
295
|
+
* has its own scope and is walked separately. `parentClassName` rides along
|
|
296
|
+
* so a `<cfscript>` at component scope classifies its functions as methods
|
|
297
|
+
* scoped under the component.
|
|
298
|
+
*/
|
|
299
|
+
delegateNestedTags(node, containerId, parentClassName) {
|
|
300
|
+
for (let i = 0; i < node.namedChildCount; i++) {
|
|
301
|
+
const child = node.namedChild(i);
|
|
302
|
+
if (!child)
|
|
303
|
+
continue;
|
|
304
|
+
if (child.type === 'cf_script_tag') {
|
|
305
|
+
this.delegateScriptTag(child, containerId, parentClassName);
|
|
306
|
+
}
|
|
307
|
+
else if (child.type === 'cf_query_tag') {
|
|
308
|
+
this.delegateQueryTag(child, containerId);
|
|
309
|
+
}
|
|
310
|
+
else if (child.type === 'cf_function_tag') {
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
this.delegateNestedTags(child, containerId, parentClassName);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Delegate a `<cfscript>...</cfscript>` tag body to the cfscript grammar.
|
|
320
|
+
* With `parentClassName` set (the block sits at component scope), functions
|
|
321
|
+
* declared at the script's top level are the component's methods
|
|
322
|
+
* (`<cfcomponent><cfscript>function configure(){}` — the standard ColdBox
|
|
323
|
+
* ModuleConfig shape): they're re-kinded `function` → `method`, and every
|
|
324
|
+
* merged symbol's qualifiedName is prefixed with the component scope
|
|
325
|
+
* (`configure` → `ModuleConfig::configure`) so type-validated method
|
|
326
|
+
* resolution can match them. Functions nested inside another function
|
|
327
|
+
* (closures) keep kind `function`.
|
|
328
|
+
*/
|
|
329
|
+
delegateScriptTag(scriptTag, parentId, parentClassName) {
|
|
330
|
+
const content = scriptTag.namedChildren.find((c) => c.type === 'cf_script_content');
|
|
331
|
+
if (!content)
|
|
332
|
+
return;
|
|
333
|
+
const inner = this.source.substring(content.startIndex, content.endIndex);
|
|
334
|
+
const startLine = content.startPosition.row;
|
|
335
|
+
const extractor = new tree_sitter_1.TreeSitterExtractor(this.filePath, inner, 'cfscript');
|
|
336
|
+
const result = extractor.extract();
|
|
337
|
+
// The inner TreeSitterExtractor always synthesizes its own `file`-kind
|
|
338
|
+
// node scoped to just this snippet — drop it (and any edges touching it)
|
|
339
|
+
// since this tag-based file already owns one correctly-ranged file node
|
|
340
|
+
// (see createFileNode); the per-node `parentId` contains-edge below
|
|
341
|
+
// already links every emitted symbol into the real tree.
|
|
342
|
+
const innerFileNodeId = result.nodes.find((n) => n.kind === 'file')?.id;
|
|
343
|
+
// Snippet-top-level symbols are the ones the inner extractor attached
|
|
344
|
+
// directly to its (dropped) snippet file node — as opposed to closures
|
|
345
|
+
// nested inside another function.
|
|
346
|
+
const topLevelIds = new Set(result.edges
|
|
347
|
+
.filter((e) => e.kind === 'contains' && e.source === innerFileNodeId)
|
|
348
|
+
.map((e) => e.target));
|
|
349
|
+
for (const node of result.nodes) {
|
|
350
|
+
if (node.kind === 'file')
|
|
351
|
+
continue;
|
|
352
|
+
node.startLine += startLine;
|
|
353
|
+
node.endLine += startLine;
|
|
354
|
+
node.language = this.language;
|
|
355
|
+
if (parentClassName) {
|
|
356
|
+
if (node.kind === 'function' && topLevelIds.has(node.id)) {
|
|
357
|
+
node.kind = 'method';
|
|
358
|
+
}
|
|
359
|
+
node.qualifiedName = `${parentClassName}::${node.qualifiedName}`;
|
|
360
|
+
}
|
|
361
|
+
this.nodes.push(node);
|
|
362
|
+
if (parentId) {
|
|
363
|
+
this.edges.push({ source: parentId, target: node.id, kind: 'contains' });
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
for (const edge of result.edges) {
|
|
367
|
+
if (edge.source === innerFileNodeId || edge.target === innerFileNodeId)
|
|
368
|
+
continue;
|
|
369
|
+
if (edge.line)
|
|
370
|
+
edge.line += startLine;
|
|
371
|
+
this.edges.push(edge);
|
|
372
|
+
}
|
|
373
|
+
for (const ref of result.unresolvedReferences) {
|
|
374
|
+
ref.line += startLine;
|
|
375
|
+
ref.filePath = this.filePath;
|
|
376
|
+
ref.language = this.language;
|
|
377
|
+
// Calls inside a <cfscript> body with no enclosing function (rare — a
|
|
378
|
+
// top-level script in a .cfm template, or any statement directly in
|
|
379
|
+
// the snippet body) attribute to the filtered-out snippet file node by
|
|
380
|
+
// default — redirect those (and any genuinely unset ones) to parentId.
|
|
381
|
+
if ((!ref.fromNodeId || ref.fromNodeId === innerFileNodeId) && parentId)
|
|
382
|
+
ref.fromNodeId = parentId;
|
|
383
|
+
this.unresolvedReferences.push(ref);
|
|
384
|
+
}
|
|
385
|
+
for (const error of result.errors) {
|
|
386
|
+
if (error.line)
|
|
387
|
+
error.line += startLine;
|
|
388
|
+
this.errors.push(error);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Delegate a `<cfquery>...</cfquery>` tag's SQL body to the `cfquery` grammar.
|
|
393
|
+
* `#hash#` expressions inside the SQL (e.g. `#getCurrentUser().getId()#` in a
|
|
394
|
+
* WHERE clause) are real CFML calls/references — tree-sitter-cfml's `cfquery`
|
|
395
|
+
* grammar parses them structurally (same `call_expression`/`member_expression`
|
|
396
|
+
* shape as cfscript), so without this delegation they're silently dropped as
|
|
397
|
+
* opaque SQL text. The grammar models no other symbols, so only call/reference
|
|
398
|
+
* extraction is relevant here — unlike `delegateScriptTag`, there are no nodes
|
|
399
|
+
* or contains-edges to merge.
|
|
400
|
+
*/
|
|
401
|
+
delegateQueryTag(queryTag, parentId) {
|
|
402
|
+
const content = queryTag.namedChildren.find((c) => c.type === 'cf_query_content');
|
|
403
|
+
if (!content)
|
|
404
|
+
return;
|
|
405
|
+
const sql = this.source.substring(content.startIndex, content.endIndex);
|
|
406
|
+
const startLine = content.startPosition.row;
|
|
407
|
+
const extractor = new tree_sitter_1.TreeSitterExtractor(this.filePath, sql, 'cfquery');
|
|
408
|
+
const result = extractor.extract();
|
|
409
|
+
const innerFileNodeId = result.nodes.find((n) => n.kind === 'file')?.id;
|
|
410
|
+
for (const ref of result.unresolvedReferences) {
|
|
411
|
+
ref.line += startLine;
|
|
412
|
+
ref.filePath = this.filePath;
|
|
413
|
+
ref.language = this.language;
|
|
414
|
+
if ((!ref.fromNodeId || ref.fromNodeId === innerFileNodeId) && parentId)
|
|
415
|
+
ref.fromNodeId = parentId;
|
|
416
|
+
this.unresolvedReferences.push(ref);
|
|
417
|
+
}
|
|
418
|
+
for (const error of result.errors) {
|
|
419
|
+
if (error.line)
|
|
420
|
+
error.line += startLine;
|
|
421
|
+
this.errors.push(error);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
/** Read a `cf_attribute`'s value by name from a tag node's direct `cf_attribute`/`cf_tag_attributes` children. */
|
|
425
|
+
tagAttr(tag, attrName) {
|
|
426
|
+
const attrs = [];
|
|
427
|
+
for (let i = 0; i < tag.namedChildCount; i++) {
|
|
428
|
+
const child = tag.namedChild(i);
|
|
429
|
+
if (!child)
|
|
430
|
+
continue;
|
|
431
|
+
if (child.type === 'cf_attribute')
|
|
432
|
+
attrs.push(child);
|
|
433
|
+
else if (child.type === 'cf_tag_attributes') {
|
|
434
|
+
for (let j = 0; j < child.namedChildCount; j++) {
|
|
435
|
+
const inner = child.namedChild(j);
|
|
436
|
+
if (inner?.type === 'cf_attribute')
|
|
437
|
+
attrs.push(inner);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
for (const attr of attrs) {
|
|
442
|
+
const nameNode = attr.namedChildren.find((c) => c.type === 'cf_attribute_name');
|
|
443
|
+
if (!nameNode)
|
|
444
|
+
continue;
|
|
445
|
+
const text = this.source.substring(nameNode.startIndex, nameNode.endIndex);
|
|
446
|
+
if (text.toLowerCase() !== attrName.toLowerCase())
|
|
447
|
+
continue;
|
|
448
|
+
// Values come wrapped as `quoted_cf_attribute_value` (name="init") or bare
|
|
449
|
+
// `cf_attribute_value` (name=init — legal and common in older CFML).
|
|
450
|
+
const valueWrapper = attr.namedChildren.find((c) => c.type === 'quoted_cf_attribute_value' || c.type === 'cf_attribute_value');
|
|
451
|
+
const valueNode = valueWrapper?.namedChildren.find((c) => c.type === 'attribute_value');
|
|
452
|
+
if (!valueNode)
|
|
453
|
+
return '';
|
|
454
|
+
return this.source.substring(valueNode.startIndex, valueNode.endIndex);
|
|
455
|
+
}
|
|
456
|
+
return undefined;
|
|
457
|
+
}
|
|
458
|
+
componentNameFromPath() {
|
|
459
|
+
const fileName = this.filePath.split(/[/\\]/).pop() || this.filePath;
|
|
460
|
+
return fileName.replace(/\.(cfc|cfm|cfs)$/i, '');
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
exports.CfmlExtractor = CfmlExtractor;
|
|
464
|
+
/**
|
|
465
|
+
* Sniff whether CFML source is bare-script (`component { ... }`, modern style)
|
|
466
|
+
* vs tag-based (`<cfcomponent>`, `<cfif>`, HTML). Skips a leading UTF-8 BOM
|
|
467
|
+
* (endemic in CFML's Windows-editor history — 17% of ColdBox's files carry
|
|
468
|
+
* one; both grammars parse fine with it once routed correctly), whitespace,
|
|
469
|
+
* and `//`/`/* *\/` comments to find the first real token; tag-based files
|
|
470
|
+
* start with `<`, script-based files don't.
|
|
471
|
+
*/
|
|
472
|
+
function isBareScriptCfml(source) {
|
|
473
|
+
let i = 0;
|
|
474
|
+
const len = source.length;
|
|
475
|
+
while (i < len) {
|
|
476
|
+
const ch = source[i];
|
|
477
|
+
if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r' || ch === '\uFEFF') {
|
|
478
|
+
i++;
|
|
479
|
+
}
|
|
480
|
+
else if (ch === '/' && source[i + 1] === '/') {
|
|
481
|
+
const nl = source.indexOf('\n', i);
|
|
482
|
+
i = nl === -1 ? len : nl + 1;
|
|
483
|
+
}
|
|
484
|
+
else if (ch === '/' && source[i + 1] === '*') {
|
|
485
|
+
const end = source.indexOf('*/', i + 2);
|
|
486
|
+
i = end === -1 ? len : end + 2;
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
return ch !== '<';
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return true; // empty/whitespace-only file — treat as script (no-op extraction either way)
|
|
493
|
+
}
|
|
494
|
+
//# sourceMappingURL=cfml-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cfml-extractor.js","sourceRoot":"","sources":["../../src/extraction/cfml-extractor.ts"],"names":[],"mappings":";;;AA2dA,4CAkBC;AA3eD,+DAAuD;AACvD,+CAAoD;AACpD,yCAAuC;AAEvC;;;;;;;;;;;;GAYG;AACH,MAAa,aAAa;IAChB,QAAQ,CAA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AC,CAAC,CAAC;QACrB,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,QAAQ,EAAE,CAAC;YAC/E,CAAC,EAAE,CAAC;QACN,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YAC/C,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACnC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YAC/C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACxC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,KAAK,GAAG,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,CAAC,6EAA6E;AAC5F,CAAC"}
|
|
@@ -28,6 +28,15 @@ export declare function isSourceFile(filePath: string, overrides?: Record<string
|
|
|
28
28
|
* extractor links them. (config/ + locales/ JSON have no section refs.)
|
|
29
29
|
*/
|
|
30
30
|
export declare function isShopifyLiquidJson(filePath: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* OTP application resource file: `<app>.app.src` (checked into every rebar3/
|
|
33
|
+
* erlang.mk app) or its compiled `<app>.app`. Erlang TERMS, not forms — the
|
|
34
|
+
* grammar parses them as top-level expressions, and the Erlang extractor's
|
|
35
|
+
* application-tuple handler turns `{mod, {Mod, _}}` and `{applications, […]}`
|
|
36
|
+
* into entry-module and dependency edges. Routed by full suffix because the
|
|
37
|
+
* last-dot extension (`.src`) is far too generic for EXTENSION_MAP.
|
|
38
|
+
*/
|
|
39
|
+
export declare function isErlangAppFile(filePath: string): boolean;
|
|
31
40
|
/**
|
|
32
41
|
* Play Framework routes file: the extensionless `conf/routes` (and included
|
|
33
42
|
* `conf/*.routes`). No grammar — route extraction is done by the Play framework
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../src/extraction/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAA4B,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../src/extraction/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAA4B,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;AAyCtJ;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAmHlD,CAAC;AAEF;;;;;;;;GAQG;AAC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