@aroman22/codegraph-vba 1.3.3 → 1.3.5
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/README.md +19 -1
- package/dist/bin/node-version-check.d.ts +9 -6
- package/dist/db/migrations.d.ts +1 -1
- package/dist/db/queries.d.ts +33 -0
- package/dist/extraction/vba-extractor.d.ts +60 -20
- package/dist/extraction/vba-preprocess.d.ts +17 -1
- package/dist/resolution/index.d.ts +38 -0
- package/dist/types.d.ts +11 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -386,13 +386,31 @@ The two are **sibling tools**: Dysflow owns the Access binary round-trip (sync,
|
|
|
386
386
|
| **`Implements IFoo`** | `.cls` declares `Implements IFoo` | — | Emits an `implements` edge from the class to `IFoo` |
|
|
387
387
|
| **`Dim x As Foo.Bar`** | `.bas`/`.cls` qualified type reference | — | `references` edge to `Foo` with `synthesizedBy: 'vba-name-resolution'`; silent when unresolvable |
|
|
388
388
|
| **`WithEvents m_X As Form_Foo`** | `.cls` listener declaration | — | `references` edge to `Form_Foo` with `synthesizedBy: 'vba-withevents'` — closes the event-driven form flow |
|
|
389
|
+
| **`Event Foo(...)` / `RaiseEvent Foo(...)`** | `.cls` custom event declaration + raise site | — | `event` node plus `raises-event` edges from the raising procedure; `WithEvents` also emits `subscribes-event` edges with the listener variable name |
|
|
390
|
+
| **`Type T ... End Type`** | `.bas`/`.cls` user-defined type declaration | — | `type` node plus `type_member` child nodes linked by `type-member` edges and member type metadata |
|
|
391
|
+
| **`Declare PtrSafe Function X Lib "dll"`** | `.bas`/`.cls` Win32/API declaration | — | `declare` node with DLL, alias, kind, and PtrSafe metadata; VBA call sites still emit `calls` edges to it |
|
|
392
|
+
| **`Enum` / `Const` domain dictionaries** | `.bas`/`.cls` enum blocks and module constants | — | `enum`, `enum_member`, and `constant` nodes linked to their module/class; constant string values are preserved in metadata for local resolution |
|
|
393
|
+
| **Saved Access QueryDefs** | `queries/<Name>.sql` | — | `query` node per Dysflow-exported `.sql` file with `references` edges to tables named by `FROM` / `JOIN` / `INTO` / `UPDATE` |
|
|
389
394
|
| **`New Clase(...)`** | `.bas`/`.cls` instantiation | — | `references` edge with `synthesizedBy: 'vba-new-binding'` |
|
|
390
395
|
| **SQL in VBA strings** | `.bas`/`.cls` SQL inside `DoCmd.RunSQL` / `CurrentDb.OpenRecordset` / `CurrentDb.Execute` / `db.Execute` | — | Table names extracted from `FROM`/`INTO`/`UPDATE <table>` → `references` edges with `synthesizedBy: 'vba-sql-table'` |
|
|
391
396
|
|
|
392
397
|
**Hard invariants** enforced by the extractor and verified by tests:
|
|
393
398
|
|
|
394
399
|
- **`.cls` is the canonical source for form code.** `.form.txt` emits **zero** `function` / `sub` / `class` nodes — only the form-level `module` node and `property` nodes per control. Dysflow overwrites `.form.txt`'s embedded code on the next import, so emitting code from there would be both wrong and ephemeral.
|
|
395
|
-
- **A `.bas`
|
|
400
|
+
- **Option-only files stay silent.** A `.bas` containing only `Option ...` directives emits zero symbol nodes; a `.bas` with only `Enum`, `Const`, `Event`, `Type`, or `Declare` declarations DOES emit its module node because those declarations are real graph symbols.
|
|
401
|
+
|
|
402
|
+
**VBA / Access node kinds added by the fork:**
|
|
403
|
+
|
|
404
|
+
| Node kind | Meaning |
|
|
405
|
+
|---|---|
|
|
406
|
+
| `enum` / `enum_member` | VBA `Enum` block and its members |
|
|
407
|
+
| `constant` | VBA `Const` declaration; string values are kept in metadata when available |
|
|
408
|
+
| `query` | Dysflow-exported saved Access query (`queries/<Name>.sql`) |
|
|
409
|
+
| `event` | VBA custom `Event` declaration |
|
|
410
|
+
| `type` / `type_member` | VBA user-defined `Type ... End Type` and each declared member |
|
|
411
|
+
| `declare` | Win32/API `Declare` / `Declare PtrSafe` statement |
|
|
412
|
+
| `form-layout` | `.form.txt` / `.report.txt` form/report container |
|
|
413
|
+
| `form-instance-control` | Access control instance from form/report UI text |
|
|
396
414
|
|
|
397
415
|
**Scope:** Dysflow-managed projects only (Dysflow's `.form.txt` / `.report.txt` SaveAsText format). Legacy `.frm` / `.dsr` Access binary formats are not in scope.
|
|
398
416
|
|
|
@@ -18,13 +18,16 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function buildNode25BlockBanner(nodeVersion: string): string;
|
|
20
20
|
/**
|
|
21
|
-
* Lowest supported Node.js
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
21
|
+
* Lowest supported Node.js version. Matches the `engines` floor in package.json.
|
|
22
|
+
* Node.js 22.5.0 is the first version with the built-in `node:sqlite` API used
|
|
23
|
+
* by CodeGraph. `engines` alone only *warns* on install (unless the user set
|
|
24
|
+
* `engine-strict`), so the CLI bootstrap also hard-blocks here to actually
|
|
25
|
+
* enforce the floor.
|
|
26
26
|
*/
|
|
27
|
-
export declare const MIN_NODE_MAJOR =
|
|
27
|
+
export declare const MIN_NODE_MAJOR = 22;
|
|
28
|
+
export declare const MIN_NODE_MINOR = 5;
|
|
29
|
+
export declare const MIN_NODE_VERSION = "22.5";
|
|
30
|
+
export declare function isBelowMinimumNodeVersion(nodeVersion: string): boolean;
|
|
28
31
|
/**
|
|
29
32
|
* Build the bordered banner shown when CodeGraph detects a Node.js major below
|
|
30
33
|
* {@link MIN_NODE_MAJOR}. Pinned via unit test so the recovery commands and the
|
package/dist/db/migrations.d.ts
CHANGED
package/dist/db/queries.d.ts
CHANGED
|
@@ -240,6 +240,39 @@ export declare class QueryBuilder {
|
|
|
240
240
|
* Get incoming edges to a node
|
|
241
241
|
*/
|
|
242
242
|
getIncomingEdges(targetId: string, kinds?: EdgeKind[]): Edge[];
|
|
243
|
+
/**
|
|
244
|
+
* Find VBA call-stub candidate nodes for `resolveVbaCallStubs` (vba-graph-
|
|
245
|
+
* connectivity-fixes, #12).
|
|
246
|
+
*
|
|
247
|
+
* A VBA call-stub node is, BY DEFINITION, a node targeted by a `calls`
|
|
248
|
+
* edge whose OWN metadata carries `stub: true`. Keep this anchored on
|
|
249
|
+
* `edges.metadata` even though `nodes.metadata` now exists: the stub flag
|
|
250
|
+
* is a relationship fact about an unresolved call, not an intrinsic fact
|
|
251
|
+
* about the target symbol.
|
|
252
|
+
*/
|
|
253
|
+
getVbaCallStubs(): Node[];
|
|
254
|
+
/**
|
|
255
|
+
* Repoint an edge's `target` + `metadata` in place, leaving all other
|
|
256
|
+
* columns (source, kind, line, col, provenance) untouched. Used by
|
|
257
|
+
* `resolveVbaCallStubs` to redirect a stub `calls` edge to its resolved
|
|
258
|
+
* real node (#12). `metadataJson` is the caller's already-serialized JSON
|
|
259
|
+
* text (or null to clear it) — mirrors `insertEdge`'s convention of
|
|
260
|
+
* storing edge metadata as TEXT.
|
|
261
|
+
*/
|
|
262
|
+
repointEdgeTarget(edgeId: number, newTargetId: string, metadataJson: string | null): void;
|
|
263
|
+
/**
|
|
264
|
+
* Delete a single edge row by its AUTOINCREMENT id. Used by
|
|
265
|
+
* `resolveVbaCallStubs` to collapse a duplicate `(source,target,kind)`
|
|
266
|
+
* edge onto an already-repointed one (F1) instead of leaving two
|
|
267
|
+
* identical rows.
|
|
268
|
+
*/
|
|
269
|
+
deleteEdgeById(id: number): void;
|
|
270
|
+
/**
|
|
271
|
+
* True iff a `(source, target, kind)` edge row already exists. Used by
|
|
272
|
+
* `resolveVbaCallStubs` to detect a would-be duplicate before repointing
|
|
273
|
+
* a second stub edge onto the same real target (F1 duplicate-collapse).
|
|
274
|
+
*/
|
|
275
|
+
edgeExists(source: string, target: string, kind: EdgeKind): boolean;
|
|
243
276
|
/**
|
|
244
277
|
* Find all edges where both source and target are in the given node set.
|
|
245
278
|
* Useful for recovering inter-node connectivity after BFS.
|
|
@@ -64,6 +64,24 @@ export declare class VbaExtractor {
|
|
|
64
64
|
* cross-module calls.
|
|
65
65
|
*/
|
|
66
66
|
private sweepProcedures;
|
|
67
|
+
/** `[visibility] Event <Name>(...)` custom event declaration. */
|
|
68
|
+
private static readonly EVENT_DECL_RE;
|
|
69
|
+
/** `[visibility] Type <Name>` user-defined type block start. */
|
|
70
|
+
private static readonly TYPE_START_RE;
|
|
71
|
+
/** `End Type` user-defined type block end. */
|
|
72
|
+
private static readonly TYPE_END_RE;
|
|
73
|
+
/** `<MemberName> As <Type>` inside a user-defined type block. */
|
|
74
|
+
private static readonly TYPE_MEMBER_RE;
|
|
75
|
+
/** `[visibility] Declare [PtrSafe] Sub|Function <Name> Lib "dll" [Alias "x"] ...` */
|
|
76
|
+
private static readonly DLL_DECLARE_RE;
|
|
77
|
+
/**
|
|
78
|
+
* Roadmap #26 declaration sweep:
|
|
79
|
+
* - Event declarations become `event` nodes and `RaiseEvent` can point to them.
|
|
80
|
+
* - Type...End Type blocks become `type` + `type_member` nodes.
|
|
81
|
+
* - Win32 API Declare statements become `declare` nodes, while still being
|
|
82
|
+
* cached by name so normal call-site scanning can emit `calls` edges.
|
|
83
|
+
*/
|
|
84
|
+
private sweepEventsTypesAndDeclares;
|
|
67
85
|
/** Implements regex. */
|
|
68
86
|
private static readonly IMPLEMENTS_RE;
|
|
69
87
|
/** Edges whose source needs to be set to the module/class id once it exists. */
|
|
@@ -112,13 +130,6 @@ export declare class VbaExtractor {
|
|
|
112
130
|
private static readonly ENUM_MEMBER_RE;
|
|
113
131
|
/** `[visibility] Const <decls>` — captures visibility (1) and the rest (2). */
|
|
114
132
|
private static readonly CONST_DECL_RE;
|
|
115
|
-
/**
|
|
116
|
-
* One declared name inside a `Const` body. A name sits at a declaration
|
|
117
|
-
* boundary (start-of-body or after a comma), optionally followed by
|
|
118
|
-
* `As <Type>`, then `=`. Run with /g over the CONST_DECL_RE group 2 so
|
|
119
|
-
* multi-name lines (`Const A = 1, B = 2`) emit one node per name.
|
|
120
|
-
*/
|
|
121
|
-
private static readonly CONST_NAME_RE;
|
|
122
133
|
/**
|
|
123
134
|
* Fold a VBA visibility keyword to the canonical lowercase enum, matching
|
|
124
135
|
* the procedure convention: `Private` → 'private'; `Public`, `Global`,
|
|
@@ -164,16 +175,15 @@ export declare class VbaExtractor {
|
|
|
164
175
|
/**
|
|
165
176
|
* `DoCmd.OpenForm "<FormName>"` modelling regex — B4 (hueco 6).
|
|
166
177
|
*
|
|
167
|
-
* Real VBA idiom (matches
|
|
178
|
+
* Real VBA idiom (matches literal and bare-identifier forms):
|
|
168
179
|
* `DoCmd.OpenForm "MyForm"`
|
|
180
|
+
* `DoCmd.OpenForm FORM_MY_FORM`
|
|
169
181
|
* `DoCmd.OpenForm "MyForm", acNormal, , , acFormEdit`
|
|
170
182
|
*
|
|
171
|
-
* Captures the
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* etc.) are intentionally NOT captured
|
|
175
|
-
* was to cover ONLY `OpenForm` for this commit; `OpenReport`, `OpenQuery`,
|
|
176
|
-
* `OpenTable`, … are flagged in the commit body as follow-up work.
|
|
183
|
+
* Captures the first argument (group 1). String literals are unwrapped;
|
|
184
|
+
* bare identifiers resolve against local Const declarations, falling back
|
|
185
|
+
* to the identifier name when unknown. The trailing positional args
|
|
186
|
+
* (`acNormal`, `acFormEdit`, etc.) are intentionally NOT captured.
|
|
177
187
|
*
|
|
178
188
|
* Why a separate dispatch: `DoCmd` is in `RUNTIME_RECEIVER_BLACKLIST`
|
|
179
189
|
* (R4 invariant), so `DoCmd.OpenForm` is intentionally SKIPPED by the
|
|
@@ -182,7 +192,7 @@ export declare class VbaExtractor {
|
|
|
182
192
|
* matches BEFORE the call-site scan and uses its own dispatch to emit
|
|
183
193
|
* the `opens-form` edge instead — sharing no logic with CALL_RE.
|
|
184
194
|
*/
|
|
185
|
-
private static readonly
|
|
195
|
+
private static readonly OPEN_FORM_ARG_RE;
|
|
186
196
|
/** SQL assigned to a local variable, e.g. `m_SQL = "SELECT ..." & ...`. */
|
|
187
197
|
private static readonly SQL_VAR_ASSIGN_RE;
|
|
188
198
|
/** SQL wrapper called with a variable, e.g. `getdb().Execute m_SQL`. */
|
|
@@ -245,7 +255,22 @@ export declare class VbaExtractor {
|
|
|
245
255
|
* return false so runtime/DAO calls are suppressed.
|
|
246
256
|
*/
|
|
247
257
|
private isLocalProjectClassVar;
|
|
258
|
+
/**
|
|
259
|
+
* #12a: resolve the "receiver type" used to build a qualified call-stub's
|
|
260
|
+
* name/qualifiedName. When `receiverName` is a file-local variable typed
|
|
261
|
+
* as a candidate project class (`isLocalProjectClassVar`), returns the
|
|
262
|
+
* RESOLVED CLASS NAME from `localVarTypeMap` (e.g. `m_NCOp` typed
|
|
263
|
+
* `As NCOperaciones` → `'NCOperaciones'`) so the stub's qualifiedName
|
|
264
|
+
* matches the real `.cls` method's `${className}.${proc}` shape and the
|
|
265
|
+
* post-extraction resolver (#12b) can find it via an exact qualifiedName
|
|
266
|
+
* match. Otherwise returns `receiverName` unchanged — this is the case
|
|
267
|
+
* for `.bas`-qualified module calls (`modUtils.Foo`), where the receiver
|
|
268
|
+
* IS already the target module's name and no resolution is needed.
|
|
269
|
+
*/
|
|
270
|
+
private resolveReceiverType;
|
|
248
271
|
private sweepCallsAndSql;
|
|
272
|
+
private static readonly RAISE_EVENT_RE;
|
|
273
|
+
private scanRaiseEvents;
|
|
249
274
|
private scanCallSites;
|
|
250
275
|
/** Cache so we don't re-emit the same proc function node per call site. */
|
|
251
276
|
private procNodeIdCache;
|
|
@@ -348,11 +373,9 @@ export declare class VbaExtractor {
|
|
|
348
373
|
* flagged this as acceptable for B4 — only `OpenForm` is in scope.
|
|
349
374
|
* `OpenReport`, `OpenQuery`, `OpenTable`, … are follow-up work.
|
|
350
375
|
*
|
|
351
|
-
* Scope note: this regex matches
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* because resolving the variable to a concrete form name would
|
|
355
|
-
* require data-flow analysis that is out of scope.
|
|
376
|
+
* Scope note: this regex matches literal-string and bare-identifier forms.
|
|
377
|
+
* Bare identifiers are resolved only through local `Const` declarations;
|
|
378
|
+
* arbitrary variable data-flow remains intentionally out of scope.
|
|
356
379
|
*/
|
|
357
380
|
private scanOpenFormCalls;
|
|
358
381
|
/**
|
|
@@ -374,6 +397,19 @@ export declare class VbaExtractor {
|
|
|
374
397
|
*/
|
|
375
398
|
private emitOpensFormEdge;
|
|
376
399
|
private scanSqlInLine;
|
|
400
|
+
/**
|
|
401
|
+
* #13 fix: `sql = sql & "..."` (self-referential concatenation) must
|
|
402
|
+
* ACCUMULATE the new fragment onto whatever was already tracked for
|
|
403
|
+
* `varName`, not overwrite it. Overwriting silently dropped earlier
|
|
404
|
+
* fragments' tables — typically the initial `FROM <table>` in
|
|
405
|
+
* `sql = "SELECT * FROM tblA"` followed by `sql = sql & " WHERE x=1"`.
|
|
406
|
+
*
|
|
407
|
+
* Detection: the RHS (`m[2]`, trimmed) starts with `<varName> &`,
|
|
408
|
+
* case-insensitively — matching VBA's case-insensitive identifiers (`Sql`
|
|
409
|
+
* and `sql` are the same variable). A genuine fresh assignment (RHS does
|
|
410
|
+
* NOT start with the self-reference) still RESETS tracking — that
|
|
411
|
+
* behavior is unchanged.
|
|
412
|
+
*/
|
|
377
413
|
private trackSqlVariableAssignment;
|
|
378
414
|
private collectStringLiteralText;
|
|
379
415
|
private emitSqlTableReferences;
|
|
@@ -390,5 +426,9 @@ export declare class VbaExtractor {
|
|
|
390
426
|
* typed as a SIMPLE (non-qualified, non-primitive) identifier emit edges.
|
|
391
427
|
*/
|
|
392
428
|
private localVarTypeMap;
|
|
429
|
+
/** Local constant name (lowercase) → simple literal value for OpenForm resolution. */
|
|
430
|
+
private localConstants;
|
|
431
|
+
/** Local event name (lowercase) → event node for `RaiseEvent` edge emission. */
|
|
432
|
+
private localEvents;
|
|
393
433
|
}
|
|
394
434
|
//# sourceMappingURL=vba-extractor.d.ts.map
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* Both are STRIPPED only when outside double-quoted strings. We walk
|
|
17
17
|
* character-by-character so a `'` inside `"..."` is preserved.
|
|
18
18
|
*
|
|
19
|
-
* 3.
|
|
19
|
+
* 3. preprocessConditionalCompilation(src)
|
|
20
|
+
* Blanks inactive VBA conditional-compilation branches (`#If`, `#ElseIf`,
|
|
21
|
+
* `#Else`, `#End If`) while preserving line count.
|
|
22
|
+
*
|
|
23
|
+
* 4. extractStringLiterals(src)
|
|
20
24
|
* Used by SQL-variable tracking to read literal fragments from assignments
|
|
21
25
|
* such as `m_SQL = "SELECT ..." & ...`. It returns every `"..."` span
|
|
22
26
|
* with its 1-based line and 0-based column. VBA doubles `"` inside literals
|
|
@@ -62,6 +66,18 @@ export declare function joinLineContinuations(src: string): string;
|
|
|
62
66
|
* Source is treated as read-only.
|
|
63
67
|
*/
|
|
64
68
|
export declare function stripVbaComments(src: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Evaluate VBA conditional-compilation directives for the modern Windows
|
|
71
|
+
* Access/VBA target this extractor is designed around:
|
|
72
|
+
* - VBA7 = true
|
|
73
|
+
* - Win64 = true
|
|
74
|
+
* - Mac = false
|
|
75
|
+
*
|
|
76
|
+
* Directives and inactive branch lines are replaced with empty strings so
|
|
77
|
+
* downstream extraction keeps source-line parity. Unsupported/unsafe
|
|
78
|
+
* expressions evaluate to false rather than throwing.
|
|
79
|
+
*/
|
|
80
|
+
export declare function preprocessConditionalCompilation(src: string): string;
|
|
65
81
|
export interface StringLiteralSpan {
|
|
66
82
|
/** The literal content (no surrounding quotes; `""` collapsed to `"`). */
|
|
67
83
|
text: string;
|
|
@@ -173,6 +173,44 @@ export declare class ReferenceResolver {
|
|
|
173
173
|
* of newly-created edges.
|
|
174
174
|
*/
|
|
175
175
|
resolveDeferredThisMemberRefs(): number;
|
|
176
|
+
/**
|
|
177
|
+
* VBA #12b — post-extraction resolver pass (vba-graph-connectivity-fixes,
|
|
178
|
+
* issue #12). Repoints qualified call-stub `calls` edges (tagged
|
|
179
|
+
* `metadata.stub === true` by the extractor's #12a stub-tagging) to their
|
|
180
|
+
* REAL cross-file target node when uniquely resolvable:
|
|
181
|
+
* - **Class-typed**: exact `qualifiedName` match. #12a already renamed
|
|
182
|
+
* the stub's name/qualifiedName to `${resolvedClassType}.${member}`
|
|
183
|
+
* (via `localVarTypeMap`), matching a real `.cls` method's own
|
|
184
|
+
* `${className}.${proc}` qualifiedName shape exactly.
|
|
185
|
+
* - **`.bas`-qualified fallback**: when the exact match finds nothing
|
|
186
|
+
* (the common case for `modUtils.Foo` — real `.bas` function
|
|
187
|
+
* qualifiedNames are bare, no module prefix), narrow bare-member
|
|
188
|
+
* candidates in `.bas` files to the ones whose containing module's
|
|
189
|
+
* identity equals the stub's receiver text (case-insensitive).
|
|
190
|
+
* Zero or ambiguous (2+) candidates at either step DECLINE — the stub
|
|
191
|
+
* (and its edges, whose `metadata.stub` stays `true`) is left untouched;
|
|
192
|
+
* never a crash.
|
|
193
|
+
*
|
|
194
|
+
* Duplicate `(source,target,'calls')` rows — e.g. two call sites in one
|
|
195
|
+
* Sub targeting the same real method — are collapsed to ONE surviving
|
|
196
|
+
* edge (F1): `edges` has an AUTOINCREMENT PK and no unique constraint, so
|
|
197
|
+
* blindly repointing every incoming edge would leave duplicate rows that
|
|
198
|
+
* make `codegraph_node`/explore double-count the caller.
|
|
199
|
+
*
|
|
200
|
+
* Invoked at the `resolveChainedCallsViaConformance()` lifecycle slot in
|
|
201
|
+
* both `indexAll()` and `sync()` (src/index.ts). Idempotent: a stub that
|
|
202
|
+
* was already resolved in a prior pass no longer exists (its node was
|
|
203
|
+
* deleted), so `getVbaCallStubs()` won't return it again; re-running with
|
|
204
|
+
* no new stubs is a no-op.
|
|
205
|
+
*/
|
|
206
|
+
resolveVbaCallStubs(): number;
|
|
207
|
+
/**
|
|
208
|
+
* Resolve a single VBA call-stub node to its real target, or `null` when
|
|
209
|
+
* unresolvable/ambiguous. See `resolveVbaCallStubs` for the two-step
|
|
210
|
+
* strategy (exact qualifiedName match, then `.bas` module-scoped
|
|
211
|
+
* fallback).
|
|
212
|
+
*/
|
|
213
|
+
private resolveVbaCallStubTarget;
|
|
176
214
|
private gateLanguage;
|
|
177
215
|
/**
|
|
178
216
|
* Drop a FRAMEWORK-strategy resolution that crosses two *known* language
|
package/dist/types.d.ts
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* of truth backs both the TS type and any runtime validation
|
|
11
11
|
* (e.g. the search query parser).
|
|
12
12
|
*/
|
|
13
|
-
export declare const NODE_KINDS: readonly ["file", "module", "class", "struct", "interface", "trait", "protocol", "function", "method", "property", "field", "variable", "constant", "enum", "enum_member", "type_alias", "namespace", "parameter", "import", "export", "route", "component", "query", "form-layout", "form-instance-control"];
|
|
13
|
+
export declare const NODE_KINDS: readonly ["file", "module", "class", "struct", "interface", "trait", "protocol", "function", "method", "property", "field", "variable", "constant", "enum", "enum_member", "event", "type", "type_member", "declare", "type_alias", "namespace", "parameter", "import", "export", "route", "component", "query", "form-layout", "form-instance-control"];
|
|
14
14
|
export type NodeKind = (typeof NODE_KINDS)[number];
|
|
15
15
|
/**
|
|
16
16
|
* Types of edges (relationships) between nodes
|
|
17
17
|
*/
|
|
18
|
-
export type EdgeKind = 'contains' | 'calls' | 'imports' | 'exports' | 'extends' | 'implements' | 'references' | 'type_of' | 'returns' | 'instantiates' | 'overrides' | 'decorates' | 'event-handler' | 'opens-form';
|
|
18
|
+
export type EdgeKind = 'contains' | 'calls' | 'imports' | 'exports' | 'extends' | 'implements' | 'references' | 'type_of' | 'returns' | 'instantiates' | 'overrides' | 'decorates' | 'event-handler' | 'opens-form' | 'raises-event' | 'subscribes-event' | 'type-member';
|
|
19
19
|
/**
|
|
20
20
|
* Supported programming languages. See NODE_KINDS for why this is a
|
|
21
21
|
* runtime-iterable const array.
|
|
@@ -87,6 +87,15 @@ export interface Node {
|
|
|
87
87
|
* An edge representing a relationship between two nodes
|
|
88
88
|
*/
|
|
89
89
|
export interface Edge {
|
|
90
|
+
/**
|
|
91
|
+
* Database row id (AUTOINCREMENT PK on the `edges` table). Only populated
|
|
92
|
+
* when the edge was read back from the DB (e.g. via `getIncomingEdges`);
|
|
93
|
+
* undefined for edges constructed in-memory by an extractor/resolver
|
|
94
|
+
* before insertion. Needed by `resolveVbaCallStubs` to target a specific
|
|
95
|
+
* row for `repointEdgeTarget`/`deleteEdgeById` (vba-graph-connectivity-
|
|
96
|
+
* fixes, #12) since `edges` has no natural unique key.
|
|
97
|
+
*/
|
|
98
|
+
id?: number;
|
|
90
99
|
/** Source node ID */
|
|
91
100
|
source: string;
|
|
92
101
|
/** Target node ID */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aroman22/codegraph-vba",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codegraph-vba": "npm-shim.js"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@aroman22/codegraph-vba-darwin-arm64": "1.3.
|
|
19
|
-
"@aroman22/codegraph-vba-darwin-x64": "1.3.
|
|
20
|
-
"@aroman22/codegraph-vba-linux-arm64": "1.3.
|
|
21
|
-
"@aroman22/codegraph-vba-linux-x64": "1.3.
|
|
22
|
-
"@aroman22/codegraph-vba-win32-arm64": "1.3.
|
|
23
|
-
"@aroman22/codegraph-vba-win32-x64": "1.3.
|
|
18
|
+
"@aroman22/codegraph-vba-darwin-arm64": "1.3.5",
|
|
19
|
+
"@aroman22/codegraph-vba-darwin-x64": "1.3.5",
|
|
20
|
+
"@aroman22/codegraph-vba-linux-arm64": "1.3.5",
|
|
21
|
+
"@aroman22/codegraph-vba-linux-x64": "1.3.5",
|
|
22
|
+
"@aroman22/codegraph-vba-win32-arm64": "1.3.5",
|
|
23
|
+
"@aroman22/codegraph-vba-win32-x64": "1.3.5"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"npm-shim.js",
|