@aroman22/codegraph-vba-darwin-arm64 1.3.4 → 1.4.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.
- package/lib/dist/bin/codegraph.js +1 -1
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/node-version-check.d.ts +9 -6
- package/lib/dist/bin/node-version-check.d.ts.map +1 -1
- package/lib/dist/bin/node-version-check.js +25 -10
- package/lib/dist/bin/node-version-check.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 +10 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +5 -17
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +11 -19
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +1 -0
- package/lib/dist/extraction/vba-extractor.d.ts +22 -2
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-extractor.js +209 -37
- package/lib/dist/extraction/vba-extractor.js.map +1 -1
- package/lib/dist/types.d.ts +2 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +4 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/utils/backtrace-helpers.d.ts +35 -0
- package/lib/dist/utils/backtrace-helpers.d.ts.map +1 -0
- package/lib/dist/utils/backtrace-helpers.js +129 -0
- package/lib/dist/utils/backtrace-helpers.js.map +1 -0
- package/lib/dist/utils/sql-impact-helpers.d.ts +38 -0
- package/lib/dist/utils/sql-impact-helpers.d.ts.map +1 -0
- package/lib/dist/utils/sql-impact-helpers.js +329 -0
- package/lib/dist/utils/sql-impact-helpers.js.map +1 -0
- package/lib/node_modules/.modules.yaml +2 -2
- package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
- package/lib/package.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SqliteDatabase } from '../db';
|
|
2
|
+
/**
|
|
3
|
+
* VBA Handler Backtrace Helper Functions
|
|
4
|
+
*/
|
|
5
|
+
export interface VariableInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Parses parameters from a VBA subroutine/function signature,
|
|
11
|
+
* extracting parameters of custom types (filtering out primitive types).
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseSignatureParams(signature: string): VariableInfo[];
|
|
14
|
+
/**
|
|
15
|
+
* Reconstructs a multiline SQL query string concatenated using VBA line continuation
|
|
16
|
+
* and string concatenation operators. Accumulates up to a limit of 200 characters.
|
|
17
|
+
*/
|
|
18
|
+
export declare function reconstructSQL(lines: string[]): string;
|
|
19
|
+
export interface TraversalNode {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
kind: string;
|
|
23
|
+
children: TraversalNode[];
|
|
24
|
+
}
|
|
25
|
+
export interface TraversalResult {
|
|
26
|
+
tree: TraversalNode | null;
|
|
27
|
+
cycle_detected: boolean;
|
|
28
|
+
warnings: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Traverses VBA call/relationship graphs starting from a specific node ID,
|
|
32
|
+
* tracking cycles and capping search depth.
|
|
33
|
+
*/
|
|
34
|
+
export declare function traverseGraph(db: SqliteDatabase, startNodeId: string, maxDepth?: number): TraversalResult;
|
|
35
|
+
//# sourceMappingURL=backtrace-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backtrace-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/backtrace-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CAqBtE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CA2BtD;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,cAAc,EAClB,WAAW,EAAE,MAAM,EACnB,QAAQ,SAAK,GACZ,eAAe,CA4EjB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseSignatureParams = parseSignatureParams;
|
|
4
|
+
exports.reconstructSQL = reconstructSQL;
|
|
5
|
+
exports.traverseGraph = traverseGraph;
|
|
6
|
+
/**
|
|
7
|
+
* Parses parameters from a VBA subroutine/function signature,
|
|
8
|
+
* extracting parameters of custom types (filtering out primitive types).
|
|
9
|
+
*/
|
|
10
|
+
function parseSignatureParams(signature) {
|
|
11
|
+
const primitiveTypes = new Set([
|
|
12
|
+
'long', 'integer', 'string', 'boolean', 'double', 'single',
|
|
13
|
+
'byte', 'currency', 'date', 'variant', 'object',
|
|
14
|
+
'longlong', 'longptr', 'decimal'
|
|
15
|
+
]);
|
|
16
|
+
const regex = /(?:ByVal|ByRef)?\s*(\w+)\s+As\s+(\w+)/gi;
|
|
17
|
+
const result = [];
|
|
18
|
+
const matches = signature.matchAll(regex);
|
|
19
|
+
for (const m of matches) {
|
|
20
|
+
const name = m[1];
|
|
21
|
+
const type = m[2];
|
|
22
|
+
if (name !== undefined && type !== undefined) {
|
|
23
|
+
if (!primitiveTypes.has(type.toLowerCase())) {
|
|
24
|
+
result.push({ name, type });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reconstructs a multiline SQL query string concatenated using VBA line continuation
|
|
32
|
+
* and string concatenation operators. Accumulates up to a limit of 200 characters.
|
|
33
|
+
*/
|
|
34
|
+
function reconstructSQL(lines) {
|
|
35
|
+
let accumulated = "";
|
|
36
|
+
const stringRegex = /"((?:[^"\\]|\\.)*)"/g;
|
|
37
|
+
for (const line of lines) {
|
|
38
|
+
let match;
|
|
39
|
+
stringRegex.lastIndex = 0;
|
|
40
|
+
while ((match = stringRegex.exec(line)) !== null) {
|
|
41
|
+
let content = match[1];
|
|
42
|
+
if (content !== undefined) {
|
|
43
|
+
content = content.replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
|
44
|
+
accumulated += content;
|
|
45
|
+
if (accumulated.length >= 200) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (accumulated.length >= 200) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (accumulated.length > 200) {
|
|
55
|
+
accumulated = accumulated.slice(0, 200);
|
|
56
|
+
}
|
|
57
|
+
return accumulated;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Traverses VBA call/relationship graphs starting from a specific node ID,
|
|
61
|
+
* tracking cycles and capping search depth.
|
|
62
|
+
*/
|
|
63
|
+
function traverseGraph(db, startNodeId, maxDepth = 10) {
|
|
64
|
+
if (!db) {
|
|
65
|
+
return {
|
|
66
|
+
tree: null,
|
|
67
|
+
cycle_detected: false,
|
|
68
|
+
warnings: ['DATABASE_NOT_PROVIDED']
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const warnings = [];
|
|
72
|
+
let cycleDetected = false;
|
|
73
|
+
try {
|
|
74
|
+
// Optimization: Prepare statements once to avoid parsing cost inside the recursion
|
|
75
|
+
const stmtNode = db.prepare('SELECT name, kind FROM nodes WHERE id = ?');
|
|
76
|
+
const stmtEdges = db.prepare('SELECT target FROM edges WHERE source = ?');
|
|
77
|
+
function helper(nodeId, depth, visited) {
|
|
78
|
+
const nodeRow = stmtNode.get(nodeId);
|
|
79
|
+
if (!nodeRow) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const node = {
|
|
83
|
+
id: nodeId,
|
|
84
|
+
name: nodeRow.name,
|
|
85
|
+
kind: nodeRow.kind,
|
|
86
|
+
children: []
|
|
87
|
+
};
|
|
88
|
+
// Cycle detection
|
|
89
|
+
if (visited.has(nodeId)) {
|
|
90
|
+
cycleDetected = true;
|
|
91
|
+
return node;
|
|
92
|
+
}
|
|
93
|
+
// Depth capping
|
|
94
|
+
if (depth >= maxDepth) {
|
|
95
|
+
if (!warnings.includes('MAX_DEPTH_EXCEEDED')) {
|
|
96
|
+
warnings.push('MAX_DEPTH_EXCEEDED');
|
|
97
|
+
}
|
|
98
|
+
return node;
|
|
99
|
+
}
|
|
100
|
+
// Fetch outgoing target nodes
|
|
101
|
+
const edges = stmtEdges.all(nodeId);
|
|
102
|
+
// Traverse children with updated path history
|
|
103
|
+
const newVisited = new Set(visited);
|
|
104
|
+
newVisited.add(nodeId);
|
|
105
|
+
for (const edge of edges) {
|
|
106
|
+
const child = helper(edge.target, depth + 1, newVisited);
|
|
107
|
+
if (child) {
|
|
108
|
+
node.children.push(child);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return node;
|
|
112
|
+
}
|
|
113
|
+
const tree = helper(startNodeId, 0, new Set());
|
|
114
|
+
return {
|
|
115
|
+
tree,
|
|
116
|
+
cycle_detected: cycleDetected,
|
|
117
|
+
warnings
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
122
|
+
return {
|
|
123
|
+
tree: null,
|
|
124
|
+
cycle_detected: false,
|
|
125
|
+
warnings: [`TRAVERSAL_ERROR: ${errorMsg}`]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=backtrace-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backtrace-helpers.js","sourceRoot":"","sources":["../../src/utils/backtrace-helpers.ts"],"names":[],"mappings":";;AAeA,oDAqBC;AAMD,wCA2BC;AAmBD,sCAgFC;AA7JD;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,SAAiB;IACpD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC7B,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ;QAC1D,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ;QAC/C,UAAU,EAAE,SAAS,EAAE,SAAS;KACjC,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,yCAAyC,CAAC;IACxD,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;gBAC5C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC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,CAAC,CAAC;YAEvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;gBACzD,IAAI,KAAK,EAAE,CAAC;oBACV,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAAC;QAEvD,OAAO;YACL,IAAI;YACJ,cAAc,EAAE,aAAa;YAC7B,QAAQ;SACT,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,QAAQ,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxE,OAAO;YACL,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,KAAK;YACrB,QAAQ,EAAE,CAAC,oBAAoB,QAAQ,EAAE,CAAC;SAC3C,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing the extracted bindings of a VBA form or report layout.
|
|
3
|
+
*/
|
|
4
|
+
export interface FormBindings {
|
|
5
|
+
recordSource?: string;
|
|
6
|
+
rowSources: Array<{
|
|
7
|
+
control: string;
|
|
8
|
+
target: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Interface representing the SQL lineage analysis result.
|
|
13
|
+
*/
|
|
14
|
+
export interface SqlLineage {
|
|
15
|
+
tables: string[];
|
|
16
|
+
lineage: Array<{
|
|
17
|
+
source: string;
|
|
18
|
+
resolved: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Traces references to the target query name inside a VBA module's content.
|
|
23
|
+
* Returns 1-based line numbers where references are found.
|
|
24
|
+
*/
|
|
25
|
+
export declare function traceVbaCallers(content: string, queryName: string): number[];
|
|
26
|
+
/**
|
|
27
|
+
* Parses a VBA form definition (.form.txt/.report.txt) and extracts RecordSource and RowSource bindings.
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractFormBindings(content: string): FormBindings;
|
|
30
|
+
/**
|
|
31
|
+
* Resolves table and column aliases from a SQL string to build a column-level lineage.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveSqlLineage(sql: string): SqlLineage;
|
|
34
|
+
/**
|
|
35
|
+
* Runs a combined database and file-level downstream impact analysis.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runImpactAnalysis(db: any, workspaceDir: string, queryName: string): any;
|
|
38
|
+
//# sourceMappingURL=sql-impact-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-impact-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/sql-impact-helpers.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAoB5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAiEjE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAqDzD;AA6CD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,GAAG,EACP,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,GAAG,CAgIL"}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.traceVbaCallers = traceVbaCallers;
|
|
37
|
+
exports.extractFormBindings = extractFormBindings;
|
|
38
|
+
exports.resolveSqlLineage = resolveSqlLineage;
|
|
39
|
+
exports.runImpactAnalysis = runImpactAnalysis;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
/**
|
|
43
|
+
* Traces references to the target query name inside a VBA module's content.
|
|
44
|
+
* Returns 1-based line numbers where references are found.
|
|
45
|
+
*/
|
|
46
|
+
function traceVbaCallers(content, queryName) {
|
|
47
|
+
const lines = content.split(/\r?\n/);
|
|
48
|
+
const matchedLines = [];
|
|
49
|
+
// Escape query name for regex literal construction
|
|
50
|
+
const escapedQuery = queryName.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
51
|
+
// Match OpenRecordset("queryName") or OpenRecordset "queryName"
|
|
52
|
+
const openRecordsetRegex = new RegExp(`OpenRecordset\\s*(?:\\(\\s*["']${escapedQuery}["']|\\s+["']${escapedQuery}["'])`, 'i');
|
|
53
|
+
// Match QueryDefs("queryName")
|
|
54
|
+
const queryDefsRegex = new RegExp(`QueryDefs\\s*\\(\\s*["']${escapedQuery}["']`, 'i');
|
|
55
|
+
for (let i = 0; i < lines.length; i++) {
|
|
56
|
+
const line = lines[i];
|
|
57
|
+
if (line !== undefined && (openRecordsetRegex.test(line) || queryDefsRegex.test(line))) {
|
|
58
|
+
matchedLines.push(i + 1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return matchedLines;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Parses a VBA form definition (.form.txt/.report.txt) and extracts RecordSource and RowSource bindings.
|
|
65
|
+
*/
|
|
66
|
+
function extractFormBindings(content) {
|
|
67
|
+
const lines = content.split(/\r?\n/);
|
|
68
|
+
let recordSource;
|
|
69
|
+
const rowSources = [];
|
|
70
|
+
const stack = [];
|
|
71
|
+
for (const line of lines) {
|
|
72
|
+
const trimmed = line.trim();
|
|
73
|
+
// Check for start of form controls (e.g., Begin ComboBox, Begin Form)
|
|
74
|
+
const beginMatch = trimmed.match(/^Begin\s+(\w+)/i);
|
|
75
|
+
if (beginMatch && beginMatch[1] !== undefined) {
|
|
76
|
+
stack.push({ type: beginMatch[1] });
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
// Check for end of block
|
|
80
|
+
if (trimmed === 'End') {
|
|
81
|
+
stack.pop();
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
// Keep track of current control Name property
|
|
85
|
+
const nameMatch = trimmed.match(/Name\s*=\s*"([^"]+)"/i);
|
|
86
|
+
if (nameMatch && nameMatch[1] !== undefined && stack.length > 0) {
|
|
87
|
+
const current = stack[stack.length - 1];
|
|
88
|
+
if (current !== undefined) {
|
|
89
|
+
current.name = nameMatch[1];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Extract RecordSource at Form level
|
|
93
|
+
const recordSourceMatch = trimmed.match(/RecordSource\s*=\s*"([^"]+)"/i);
|
|
94
|
+
if (recordSourceMatch && recordSourceMatch[1] !== undefined) {
|
|
95
|
+
recordSource = recordSourceMatch[1];
|
|
96
|
+
}
|
|
97
|
+
// Extract RowSource inside ComboBox/ListBox
|
|
98
|
+
const rowSourceMatch = trimmed.match(/RowSource\s*=\s*"([^"]+)"/i);
|
|
99
|
+
if (rowSourceMatch && rowSourceMatch[1] !== undefined && stack.length > 0) {
|
|
100
|
+
const rawVal = rowSourceMatch[1];
|
|
101
|
+
let target = rawVal;
|
|
102
|
+
// If it is a query (starts with SELECT), extract table/query name from the FROM clause
|
|
103
|
+
if (/select\s+/i.test(rawVal)) {
|
|
104
|
+
const fromMatch = rawVal.match(/from\s+([a-zA-Z0-9_]+)/i);
|
|
105
|
+
if (fromMatch && fromMatch[1] !== undefined) {
|
|
106
|
+
target = fromMatch[1];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const currentControl = stack[stack.length - 1];
|
|
110
|
+
if (currentControl !== undefined) {
|
|
111
|
+
const controlName = currentControl.name || currentControl.type;
|
|
112
|
+
rowSources.push({ control: controlName, target });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return { recordSource, rowSources };
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolves table and column aliases from a SQL string to build a column-level lineage.
|
|
120
|
+
*/
|
|
121
|
+
function resolveSqlLineage(sql) {
|
|
122
|
+
const normalized = sql.replace(/\s+/g, ' ');
|
|
123
|
+
const SQL_KEYWORDS = new Set([
|
|
124
|
+
'as', 'on', 'inner', 'left', 'right', 'join', 'where', 'order', 'group', 'by',
|
|
125
|
+
'and', 'or', 'select', 'from', 'using', 'cross', 'outer'
|
|
126
|
+
]);
|
|
127
|
+
const aliasMap = new Map(); // alias lowercased -> table
|
|
128
|
+
const tables = new Set();
|
|
129
|
+
// Extract tables and aliases from FROM and JOIN clauses
|
|
130
|
+
const fromJoinPattern = /(?:from|join)\s+([a-zA-Z0-9_]+)(?:\s+as\s+([a-zA-Z0-9_]+)|\s+([a-zA-Z0-9_]+))?/gi;
|
|
131
|
+
let match;
|
|
132
|
+
while ((match = fromJoinPattern.exec(normalized)) !== null) {
|
|
133
|
+
const table = match[1];
|
|
134
|
+
if (table !== undefined) {
|
|
135
|
+
tables.add(table);
|
|
136
|
+
const alias = match[2] || match[3];
|
|
137
|
+
if (alias && !SQL_KEYWORDS.has(alias.toLowerCase())) {
|
|
138
|
+
aliasMap.set(alias.toLowerCase(), table);
|
|
139
|
+
}
|
|
140
|
+
// A table name can also qualify itself, e.g., tblTable.col
|
|
141
|
+
aliasMap.set(table.toLowerCase(), table);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// Extract column references (e.g., alias.col) and map to resolved tables
|
|
145
|
+
const colPattern = /\b([a-zA-Z0-9_]+)\.([a-zA-Z0-9_*]+)\b/g;
|
|
146
|
+
const lineageMap = new Map();
|
|
147
|
+
while ((match = colPattern.exec(normalized)) !== null) {
|
|
148
|
+
const prefix = match[1];
|
|
149
|
+
const col = match[2];
|
|
150
|
+
if (prefix !== undefined && col !== undefined) {
|
|
151
|
+
const source = `${prefix}.${col}`;
|
|
152
|
+
const resolvedTable = aliasMap.get(prefix.toLowerCase());
|
|
153
|
+
if (resolvedTable) {
|
|
154
|
+
lineageMap.set(source, `${resolvedTable}.${col}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const lineage = Array.from(lineageMap.entries()).map(([source, resolved]) => ({
|
|
159
|
+
source,
|
|
160
|
+
resolved
|
|
161
|
+
}));
|
|
162
|
+
return {
|
|
163
|
+
tables: Array.from(tables),
|
|
164
|
+
lineage
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Internal recursive file finder.
|
|
169
|
+
*/
|
|
170
|
+
function getAllFiles(dir) {
|
|
171
|
+
let results = [];
|
|
172
|
+
if (!fs.existsSync(dir))
|
|
173
|
+
return [];
|
|
174
|
+
const list = fs.readdirSync(dir);
|
|
175
|
+
for (const file of list) {
|
|
176
|
+
const filePath = path.join(dir, file);
|
|
177
|
+
const stat = fs.statSync(filePath);
|
|
178
|
+
if (stat && stat.isDirectory()) {
|
|
179
|
+
results = results.concat(getAllFiles(filePath));
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
results.push(filePath);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return results;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Recursively queries the SQLite graph database backwards to find caller chain ancestors.
|
|
189
|
+
*/
|
|
190
|
+
function findGraphAncestors(db, startNodeId) {
|
|
191
|
+
const visited = new Set();
|
|
192
|
+
const ancestors = [];
|
|
193
|
+
function traverse(nodeId) {
|
|
194
|
+
if (visited.has(nodeId))
|
|
195
|
+
return;
|
|
196
|
+
visited.add(nodeId);
|
|
197
|
+
const rows = db.prepare('SELECT source FROM edges WHERE target = ?').all(nodeId);
|
|
198
|
+
for (const row of rows) {
|
|
199
|
+
if (row.source !== undefined) {
|
|
200
|
+
ancestors.push(row.source);
|
|
201
|
+
traverse(row.source);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
traverse(startNodeId);
|
|
206
|
+
return ancestors;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Runs a combined database and file-level downstream impact analysis.
|
|
210
|
+
*/
|
|
211
|
+
function runImpactAnalysis(db, workspaceDir, queryName) {
|
|
212
|
+
const output = {
|
|
213
|
+
query_name: queryName,
|
|
214
|
+
callers: [],
|
|
215
|
+
form_bindings: [],
|
|
216
|
+
tables_touched: [],
|
|
217
|
+
lineage: [],
|
|
218
|
+
downstream_impact: {
|
|
219
|
+
queries: [queryName],
|
|
220
|
+
forms: [],
|
|
221
|
+
vba_callers: []
|
|
222
|
+
},
|
|
223
|
+
warnings: []
|
|
224
|
+
};
|
|
225
|
+
// 1. Resolve SQL lineage
|
|
226
|
+
const sqlPath = path.join(workspaceDir, 'queries', `${queryName}.sql`);
|
|
227
|
+
if (fs.existsSync(sqlPath)) {
|
|
228
|
+
const sql = fs.readFileSync(sqlPath, 'utf-8');
|
|
229
|
+
const sqlLin = resolveSqlLineage(sql);
|
|
230
|
+
output.tables_touched = sqlLin.tables;
|
|
231
|
+
output.lineage = sqlLin.lineage;
|
|
232
|
+
}
|
|
233
|
+
// 2. Scan and parse files
|
|
234
|
+
const allFiles = getAllFiles(workspaceDir);
|
|
235
|
+
const matchedForms = new Set();
|
|
236
|
+
for (const file of allFiles) {
|
|
237
|
+
const relativePath = path.relative(workspaceDir, file).replace(/\\/g, '/');
|
|
238
|
+
const ext = path.extname(file).toLowerCase();
|
|
239
|
+
// VBA files
|
|
240
|
+
if (['.bas', '.cls', '.frm'].includes(ext)) {
|
|
241
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
242
|
+
const lines = traceVbaCallers(content, queryName);
|
|
243
|
+
if (lines.length > 0) {
|
|
244
|
+
const baseName = path.basename(file);
|
|
245
|
+
if (!output.downstream_impact.vba_callers.includes(baseName)) {
|
|
246
|
+
output.downstream_impact.vba_callers.push(baseName);
|
|
247
|
+
}
|
|
248
|
+
const linesSplit = content.split(/\r?\n/);
|
|
249
|
+
for (const lineNum of lines) {
|
|
250
|
+
const contextLine = linesSplit[lineNum - 1];
|
|
251
|
+
output.callers.push({
|
|
252
|
+
file: relativePath,
|
|
253
|
+
line: lineNum,
|
|
254
|
+
context: contextLine !== undefined ? contextLine : ''
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Form/Report layout files
|
|
260
|
+
const lowerFile = file.toLowerCase();
|
|
261
|
+
const isFormOrReport = lowerFile.endsWith('.form.txt') || lowerFile.endsWith('.report.txt');
|
|
262
|
+
if (isFormOrReport) {
|
|
263
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
264
|
+
const bindings = extractFormBindings(content);
|
|
265
|
+
const formName = path.basename(file).replace(/\.(form|report)\.txt$/i, '');
|
|
266
|
+
let isFormBound = false;
|
|
267
|
+
if (bindings.recordSource && (bindings.recordSource === queryName || output.tables_touched.includes(bindings.recordSource))) {
|
|
268
|
+
output.form_bindings.push({
|
|
269
|
+
file: relativePath,
|
|
270
|
+
control: 'Form',
|
|
271
|
+
property: 'RecordSource',
|
|
272
|
+
target: bindings.recordSource
|
|
273
|
+
});
|
|
274
|
+
isFormBound = true;
|
|
275
|
+
}
|
|
276
|
+
for (const rowSrc of bindings.rowSources) {
|
|
277
|
+
if (rowSrc.target === queryName || output.tables_touched.includes(rowSrc.target)) {
|
|
278
|
+
output.form_bindings.push({
|
|
279
|
+
file: relativePath,
|
|
280
|
+
control: rowSrc.control,
|
|
281
|
+
property: 'RowSource',
|
|
282
|
+
target: rowSrc.target
|
|
283
|
+
});
|
|
284
|
+
isFormBound = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (isFormBound) {
|
|
288
|
+
matchedForms.add(formName);
|
|
289
|
+
if (!output.downstream_impact.forms.includes(formName)) {
|
|
290
|
+
output.downstream_impact.forms.push(formName);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
// 3. Database traversal for event handlers & controls
|
|
296
|
+
for (const caller of output.callers) {
|
|
297
|
+
// Find matching function node containing caller.line in caller.file
|
|
298
|
+
const matchingNodes = db.prepare(`
|
|
299
|
+
SELECT id, name, kind, file_path
|
|
300
|
+
FROM nodes
|
|
301
|
+
WHERE (file_path = ? OR file_path LIKE ?)
|
|
302
|
+
AND start_line <= ?
|
|
303
|
+
AND end_line >= ?
|
|
304
|
+
AND kind IN ('function', 'event', 'sub')
|
|
305
|
+
`).all(caller.file, `%/${path.basename(caller.file)}`, caller.line, caller.line);
|
|
306
|
+
for (const node of matchingNodes) {
|
|
307
|
+
const ancestors = findGraphAncestors(db, node.id);
|
|
308
|
+
for (const ancestorId of ancestors) {
|
|
309
|
+
const ancestorNode = db.prepare('SELECT name, kind, file_path FROM nodes WHERE id = ?').get(ancestorId);
|
|
310
|
+
if (ancestorNode) {
|
|
311
|
+
const fileBase = path.basename(ancestorNode.file_path);
|
|
312
|
+
if (['.bas', '.cls', '.frm'].includes(path.extname(fileBase).toLowerCase())) {
|
|
313
|
+
if (!output.downstream_impact.vba_callers.includes(fileBase)) {
|
|
314
|
+
output.downstream_impact.vba_callers.push(fileBase);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if (ancestorNode.kind === 'control' || ancestorNode.kind === 'form') {
|
|
318
|
+
const formBase = path.basename(ancestorNode.file_path).split('.')[0] || '';
|
|
319
|
+
if (formBase && !output.downstream_impact.forms.includes(formBase)) {
|
|
320
|
+
output.downstream_impact.forms.push(formBase);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return output;
|
|
328
|
+
}
|
|
329
|
+
//# sourceMappingURL=sql-impact-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-impact-helpers.js","sourceRoot":"","sources":["../../src/utils/sql-impact-helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,0CAoBC;AAKD,kDAiEC;AAKD,8CAqDC;AAgDD,8CAoIC;AA/VD,uCAAyB;AACzB,2CAA6B;AAkB7B;;;GAGG;AACH,SAAgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAChE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,YAAY,GAAa,EAAE,CAAC;IAElC,mDAAmD;IACnD,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAEzE,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,kCAAkC,YAAY,gBAAgB,YAAY,OAAO,EAAE,GAAG,CAAC,CAAC;IAC9H,+BAA+B;IAC/B,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,2BAA2B,YAAY,MAAM,EAAE,GAAG,CAAC,CAAC;IAEtF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACv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AAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;4BACnE,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBAChD,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -34,12 +34,12 @@ layoutVersion: 5
|
|
|
34
34
|
nodeLinker: hoisted
|
|
35
35
|
packageManager: pnpm@10.16.1
|
|
36
36
|
pendingBuilds: []
|
|
37
|
-
prunedAt: Thu, 02 Jul 2026
|
|
37
|
+
prunedAt: Thu, 02 Jul 2026 16:47:27 GMT
|
|
38
38
|
publicHoistPattern: []
|
|
39
39
|
registries:
|
|
40
40
|
'@jsr': https://npm.jsr.io/
|
|
41
41
|
default: https://registry.npmjs.org/
|
|
42
42
|
skipped: []
|
|
43
|
-
storeDir: /home/runner/
|
|
43
|
+
storeDir: /home/runner/.local/share/pnpm/store/v10
|
|
44
44
|
virtualStoreDir: .pnpm
|
|
45
45
|
virtualStoreDirMaxLength: 120
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aroman22/codegraph-vba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Supercharge AI coding agents with semantic code intelligence — surgical context, fewer tool calls, faster answers. 100% local.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"vitest": "^2.1.9"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
54
|
+
"node": ">=22.5.0 <25.0.0"
|
|
55
55
|
},
|
|
56
56
|
"packageManager": "pnpm@10.16.1"
|
|
57
57
|
}
|