scip-query 0.6.9 → 0.7.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/README.md +3 -1
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-23YIGCYF.js +25 -0
- package/dist/{chunk-V4WRHJU3.js → chunk-2IYEIFPP.js} +6 -6
- package/dist/chunk-2JEFS2YJ.js +2 -0
- package/dist/chunk-33SSUPCB.js +7 -0
- package/dist/chunk-3GNFUVFA.js +2 -0
- package/dist/chunk-3OUC276S.js +2 -0
- package/dist/{chunk-JLFAQ2E2.js → chunk-4STLJYHI.js} +4 -4
- package/dist/chunk-563HLCDW.js +35 -0
- package/dist/chunk-5TT47UMX.js +44 -0
- package/dist/chunk-6H2XIIPY.js +71 -0
- package/dist/{chunk-I5BB33E6.js → chunk-72JOIFXL.js} +3 -3
- package/dist/chunk-7H4RJ4MC.js +2 -0
- package/dist/chunk-7O4MJYIW.js +63 -0
- package/dist/chunk-7OX2O53H.js +62 -0
- package/dist/chunk-A2AVLALL.js +2 -0
- package/dist/chunk-AQYBOORI.js +2 -0
- package/dist/chunk-ARBZM2NF.js +34 -0
- package/dist/{chunk-GRAEZYYU.js → chunk-BI4F6GXI.js} +2 -2
- package/dist/chunk-BOVNTAKQ.js +3 -0
- package/dist/chunk-CKIO6SVS.js +2 -0
- package/dist/chunk-D6Z67MZL.js +2 -0
- package/dist/chunk-DFK54IRN.js +2 -0
- package/dist/chunk-FD37DBTD.js +2 -0
- package/dist/chunk-FOQQDXE7.js +2 -0
- package/dist/chunk-GAQGJ52J.js +11 -0
- package/dist/chunk-IODTPF5H.js +20 -0
- package/dist/chunk-J6Z5YKGQ.js +4 -0
- package/dist/chunk-JB4PUN5S.js +40 -0
- package/dist/chunk-JTXKS5GK.js +3 -0
- package/dist/chunk-KJ3ZJIE5.js +2 -0
- package/dist/chunk-KJ6CW6EK.js +2 -0
- package/dist/{chunk-AXHDRSRI.js → chunk-KNA6Z7JB.js} +3 -3
- package/dist/{chunk-U3GYMGBX.js → chunk-LDV2B7ET.js} +8 -8
- package/dist/chunk-LWYIGRHR.js +5 -0
- package/dist/chunk-MDAYGS6T.js +2 -0
- package/dist/chunk-MX6F756F.js +2 -0
- package/dist/chunk-NHDPYW7O.js +2 -0
- package/dist/{chunk-IIKNAXAE.js → chunk-NKJKI6SE.js} +2 -2
- package/dist/chunk-NN3O7TPH.js +8 -0
- package/dist/chunk-NSTZMBAB.js +18 -0
- package/dist/chunk-NYEMZHUC.js +6 -0
- package/dist/chunk-OHEIZWIA.js +4 -0
- package/dist/chunk-PG3ZI5IH.js +2 -0
- package/dist/chunk-QAEDNTY7.js +2 -0
- package/dist/chunk-QE6MGGUY.js +2 -0
- package/dist/chunk-QPRIYXH4.js +2 -0
- package/dist/chunk-QWJBIBE6.js +3 -0
- package/dist/chunk-RCJEFQOK.js +4 -0
- package/dist/chunk-ROOHENEP.js +61 -0
- package/dist/{chunk-3JGBAAP7.js → chunk-ROZNBWIF.js} +2 -2
- package/dist/chunk-TGK5DFBJ.js +2 -0
- package/dist/chunk-TKDJQ2WD.js +59 -0
- package/dist/chunk-TRNAQABL.js +7 -0
- package/dist/chunk-U75WH4XG.js +2 -0
- package/dist/chunk-V53J46BX.js +2 -0
- package/dist/chunk-V76FCF5F.js +2 -0
- package/dist/chunk-VUBQBW7H.js +16 -0
- package/dist/chunk-WJQY2LGT.js +2 -0
- package/dist/{chunk-ZO5IFJRM.js → chunk-WODJHE6Z.js} +3 -3
- package/dist/{chunk-IX45SWX5.js → chunk-WPLKHAH7.js} +4 -4
- package/dist/chunk-XO6R3X5J.js +2 -0
- package/dist/chunk-YSZNAG4G.js +2 -0
- package/dist/chunk-ZNUPGRPR.js +3 -0
- package/dist/{chunk-UIM4WALN.js → chunk-ZXFTC5ET.js} +4 -4
- package/dist/cli.js +364 -527
- package/dist/config-types-CGIeLEpY.d.ts +108 -0
- package/dist/db-DdTPetj5.d.ts +69 -0
- package/dist/health-x7B4Xu_6.d.ts +119 -0
- package/dist/index.d.ts +100 -334
- package/dist/index.js +3 -131
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +9 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.d.ts +12 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +12 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +19 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +16 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/code.d.ts +12 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +15 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +19 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +22 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +8 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +16 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +32 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +34 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +8 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +6 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +22 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/drift.d.ts +18 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/extract-candidates.d.ts +19 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +7 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +6 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +4 -81
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +8 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +10 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +13 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/index.d.ts +45 -44
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +11 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/members.d.ts +10 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +8 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/outline.d.ts +10 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +14 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +13 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +7 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/similar-chains.d.ts +21 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +12 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +16 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +21 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +16 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +36 -3
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +11 -2
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.d.ts +8 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +10 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +10 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/trace.d.ts +18 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +14 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +10 -10
- package/dist/reindex.d.ts +153 -0
- package/dist/reindex.js +69 -0
- package/dist/runtime.d.ts +108 -0
- package/dist/runtime.js +3 -0
- package/dist/scip-cli-a-xOztiK.d.ts +20 -0
- package/package.json +184 -4
- package/dist/chunk-2OP63JQQ.js +0 -2
- package/dist/chunk-33Z6HQBX.js +0 -5
- package/dist/chunk-3F453KPT.js +0 -2
- package/dist/chunk-3PKPUCIJ.js +0 -11
- package/dist/chunk-42BWO2NN.js +0 -2
- package/dist/chunk-4MDCFY3E.js +0 -2
- package/dist/chunk-4QWTQ6YV.js +0 -2
- package/dist/chunk-5IRX5I64.js +0 -5
- package/dist/chunk-5MPZ2A7J.js +0 -2
- package/dist/chunk-67OMD56K.js +0 -90
- package/dist/chunk-6UVVA5I4.js +0 -7
- package/dist/chunk-BAA4EJRX.js +0 -2
- package/dist/chunk-BT36WY5B.js +0 -114
- package/dist/chunk-CLKFDBS6.js +0 -39
- package/dist/chunk-CWMWTHV3.js +0 -2
- package/dist/chunk-DXO2ECRF.js +0 -7
- package/dist/chunk-EHEZLULQ.js +0 -85
- package/dist/chunk-FVH3Y44U.js +0 -1
- package/dist/chunk-GWBRU65E.js +0 -2
- package/dist/chunk-H4DXD2FB.js +0 -5
- package/dist/chunk-I2KUHGMX.js +0 -16
- package/dist/chunk-JMASYYSW.js +0 -2
- package/dist/chunk-KAM4C6ZD.js +0 -4
- package/dist/chunk-LBWLO7NA.js +0 -70
- package/dist/chunk-LJ2YWNQF.js +0 -2
- package/dist/chunk-LLDPR3DG.js +0 -6
- package/dist/chunk-LNUZWWWL.js +0 -2
- package/dist/chunk-NLJCXHFU.js +0 -84
- package/dist/chunk-NRAJIFQA.js +0 -2
- package/dist/chunk-OYRGWW6Z.js +0 -2
- package/dist/chunk-PVMRIOM6.js +0 -33
- package/dist/chunk-QRYEOK3M.js +0 -2
- package/dist/chunk-SF2HYG53.js +0 -4
- package/dist/chunk-SHGPRVWH.js +0 -2
- package/dist/chunk-SMOUOKAO.js +0 -2
- package/dist/chunk-TBJDUS4E.js +0 -71
- package/dist/chunk-TPXWXKL6.js +0 -2
- package/dist/chunk-TTCUMJ43.js +0 -19
- package/dist/chunk-TYR7QY5G.js +0 -2
- package/dist/chunk-UZG3QXTG.js +0 -2
- package/dist/chunk-VDMRAGBK.js +0 -6
- package/dist/chunk-W6SRVK2Y.js +0 -5
- package/dist/chunk-WGYJDGBI.js +0 -25
- package/dist/chunk-WYX3RU2K.js +0 -2
- package/dist/chunk-WZYA234B.js +0 -2
- package/dist/chunk-Y6ZFXZ7B.js +0 -2
- package/dist/chunk-YCN5XEST.js +0 -7
- package/dist/db-Rx8Ho_JF.d.ts +0 -838
- package/dist/queries/drift-policy.d.ts +0 -6
- package/dist/queries/drift-policy.js +0 -2
- package/dist/queries/health-cache-control.d.ts +0 -15
- package/dist/queries/health-cache-control.js +0 -2
package/dist/db-Rx8Ho_JF.d.ts
DELETED
|
@@ -1,838 +0,0 @@
|
|
|
1
|
-
import Database from 'better-sqlite3';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Builds a gitignore-based path filter from .gitignore files found
|
|
5
|
-
* in the project directory tree. This replaces hardcoded path exclusions
|
|
6
|
-
* like "node_modules/", "dist/", "target/", "__pycache__/" — instead,
|
|
7
|
-
* we respect whatever the project already ignores.
|
|
8
|
-
*
|
|
9
|
-
* Falls back to sensible defaults if no .gitignore is found.
|
|
10
|
-
*/
|
|
11
|
-
declare function createGitignoreFilter(projectRoot: string): PathFilter;
|
|
12
|
-
interface PathFilter {
|
|
13
|
-
/** Returns true if this path should be excluded from results */
|
|
14
|
-
isIgnored: (relativePath: string) => boolean;
|
|
15
|
-
/** Filter an array of paths, keeping only non-ignored ones */
|
|
16
|
-
filter: (paths: string[]) => string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* A symbol's location in the SCIP index. The minimum data needed to
|
|
21
|
-
* identify a definition: which document it lives in, which lines it
|
|
22
|
-
* spans, and the global symbol id. Used as a lightweight handle when
|
|
23
|
-
* the caller doesn't need the symbol's textual name or path.
|
|
24
|
-
*/
|
|
25
|
-
interface SymbolLocation {
|
|
26
|
-
documentId: number;
|
|
27
|
-
startLine: number;
|
|
28
|
-
endLine: number;
|
|
29
|
-
symbolId: number;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* A SymbolLocation plus the human-readable bits: the SCIP symbol string
|
|
33
|
-
* and the document's relative path. Returned by lookup helpers like
|
|
34
|
-
* `findFirstSymbolMatch` so callers don't have to round-trip through the
|
|
35
|
-
* documents table to get a path or symbol name.
|
|
36
|
-
*/
|
|
37
|
-
interface SymbolMatch extends SymbolLocation {
|
|
38
|
-
symbol: string;
|
|
39
|
-
relativePath: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Reference-site of a symbol — where (file + line) the symbol is used,
|
|
43
|
-
* and the smallest enclosing definition at that line (for credit
|
|
44
|
-
* attribution in reverse-index views).
|
|
45
|
-
*/
|
|
46
|
-
interface ReferenceSite {
|
|
47
|
-
file: string;
|
|
48
|
-
line: number;
|
|
49
|
-
enclosingSymbol: string | null;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* A full definition record: SymbolMatch plus per-symbol metadata
|
|
53
|
-
* (leaf name, parent type, kind, documentation, enclosing symbol).
|
|
54
|
-
* Used by the catalog APIs (`getDefinitionsForFile`, `getAllDefinitions`,
|
|
55
|
-
* `getScopedDefinitions`) so consumers don't have to re-derive any of
|
|
56
|
-
* these per-record.
|
|
57
|
-
*/
|
|
58
|
-
interface IndexedDefinition extends SymbolMatch {
|
|
59
|
-
leaf: string;
|
|
60
|
-
parentTypeName: string | null;
|
|
61
|
-
isFunctionLike: boolean;
|
|
62
|
-
isTypeLike: boolean;
|
|
63
|
-
kind: number | null;
|
|
64
|
-
documentation: string | null;
|
|
65
|
-
enclosingSymbol: string | null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Internal scoring shape used by `path-resolver` to rank document path
|
|
69
|
-
* candidates against a user-supplied file pattern. Not part of any
|
|
70
|
-
* public CLI interface.
|
|
71
|
-
*/
|
|
72
|
-
interface DocumentPathCandidate {
|
|
73
|
-
relativePath: string;
|
|
74
|
-
score: number;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* A single import binding parsed out of a source file. Captures both the
|
|
78
|
-
* lexical shape (kind, names, source path) and a usage flag computed from
|
|
79
|
-
* the source's body — `used` is `true` when the imported binding's local
|
|
80
|
-
* name appears anywhere in the file outside the import statement itself.
|
|
81
|
-
*
|
|
82
|
-
* Producers: each per-language parser in `src/language-parsers/*.ts`.
|
|
83
|
-
* Consumers: import-graph queries (`imports`, `drift`, `redundant-reexports`),
|
|
84
|
-
* unused-imports queries, and the import-attribution path inside
|
|
85
|
-
* `identifier-attribution.ts`.
|
|
86
|
-
*/
|
|
87
|
-
interface ParsedSourceImport {
|
|
88
|
-
importedName: string;
|
|
89
|
-
localName: string | null;
|
|
90
|
-
sourcePath: string | null;
|
|
91
|
-
kind: 'named' | 'default' | 'namespace' | 'side-effect';
|
|
92
|
-
used: boolean;
|
|
93
|
-
usedMembers: string[];
|
|
94
|
-
isTypeOnly?: boolean;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* A single export-from binding parsed out of a source file. Used by the
|
|
98
|
-
* languages that have an explicit re-export construct (Rust `pub use`,
|
|
99
|
-
* Dart `export`) to surface what a barrel module re-shapes.
|
|
100
|
-
*/
|
|
101
|
-
interface ParsedSourceExport {
|
|
102
|
-
sourcePath: string | null;
|
|
103
|
-
specifier: string;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* A re-export statement in a JavaScript/TypeScript source file — one of:
|
|
107
|
-
* export { X [as Y] } from './path'
|
|
108
|
-
* export type { X } from './path'
|
|
109
|
-
* export * from './path'
|
|
110
|
-
* export * as Ns from './path'
|
|
111
|
-
*
|
|
112
|
-
* The `sourcePath` is the resolved, project-relative path to the re-exported
|
|
113
|
-
* module (same convention as ParsedSourceImport.sourcePath).
|
|
114
|
-
*/
|
|
115
|
-
interface ParsedReExport {
|
|
116
|
-
kind: 'named' | 'star' | 'star-as';
|
|
117
|
-
sourcePath: string | null;
|
|
118
|
-
/** For 'named': the list of re-exported identifiers as they appear in THIS file. */
|
|
119
|
-
names: string[];
|
|
120
|
-
/** Start line in the source (0-indexed) — inclusive. */
|
|
121
|
-
startLine: number;
|
|
122
|
-
/** End line in the source (0-indexed) — inclusive. */
|
|
123
|
-
endLine: number;
|
|
124
|
-
}
|
|
125
|
-
/** Parsed components of a SCIP symbol string */
|
|
126
|
-
interface ScipSymbol {
|
|
127
|
-
/** The indexer scheme (e.g. "scip-typescript", "scip-java", "rust-analyzer") */
|
|
128
|
-
scheme: string;
|
|
129
|
-
/** Package manager (e.g. "npm", "maven", "cargo") */
|
|
130
|
-
manager: string;
|
|
131
|
-
/** Package name (e.g. "@vega/api", "com.example/mylib") */
|
|
132
|
-
packageName: string;
|
|
133
|
-
/** Package version */
|
|
134
|
-
version: string;
|
|
135
|
-
/** Descriptor chain — the path to the symbol within the file */
|
|
136
|
-
descriptors: ScipDescriptor[];
|
|
137
|
-
/** The raw, unparsed symbol string */
|
|
138
|
-
raw: string;
|
|
139
|
-
}
|
|
140
|
-
interface ScipDescriptor {
|
|
141
|
-
name: string;
|
|
142
|
-
suffix: DescriptorSuffix;
|
|
143
|
-
}
|
|
144
|
-
type DescriptorSuffix = 'namespace' | 'type' | 'term' | 'method' | 'type-param' | 'parameter' | 'meta' | 'macro';
|
|
145
|
-
/** A local symbol (file-scoped, no cross-file identity) */
|
|
146
|
-
interface ScipLocalSymbol {
|
|
147
|
-
kind: 'local';
|
|
148
|
-
id: string;
|
|
149
|
-
raw: string;
|
|
150
|
-
}
|
|
151
|
-
interface StatsResult {
|
|
152
|
-
documents: number;
|
|
153
|
-
symbols: number;
|
|
154
|
-
definitions: number;
|
|
155
|
-
references: number;
|
|
156
|
-
indexSizeBytes: number;
|
|
157
|
-
lastBuilt: Date | null;
|
|
158
|
-
}
|
|
159
|
-
interface FileResult {
|
|
160
|
-
relativePath: string;
|
|
161
|
-
}
|
|
162
|
-
interface SymbolResult {
|
|
163
|
-
startLine: number;
|
|
164
|
-
endLine: number;
|
|
165
|
-
symbol: string;
|
|
166
|
-
shortName: string;
|
|
167
|
-
signature: string | null;
|
|
168
|
-
}
|
|
169
|
-
interface MethodResult {
|
|
170
|
-
startLine: number;
|
|
171
|
-
endLine: number;
|
|
172
|
-
name: string;
|
|
173
|
-
}
|
|
174
|
-
interface RefResult {
|
|
175
|
-
relativePath: string;
|
|
176
|
-
line: number;
|
|
177
|
-
}
|
|
178
|
-
interface DepResult {
|
|
179
|
-
relativePath: string;
|
|
180
|
-
}
|
|
181
|
-
interface TraceResult {
|
|
182
|
-
definitions: Array<{
|
|
183
|
-
relativePath: string;
|
|
184
|
-
startLine: number;
|
|
185
|
-
endLine: number;
|
|
186
|
-
signature: string | null;
|
|
187
|
-
source: string | null;
|
|
188
|
-
}>;
|
|
189
|
-
referencedBy: Array<{
|
|
190
|
-
relativePath: string;
|
|
191
|
-
line: number;
|
|
192
|
-
enclosingSymbol: string | null;
|
|
193
|
-
enclosingShort: string;
|
|
194
|
-
}>;
|
|
195
|
-
}
|
|
196
|
-
interface SystemResult {
|
|
197
|
-
files: string[];
|
|
198
|
-
symbols: SymbolResult[];
|
|
199
|
-
dependsOn: string[];
|
|
200
|
-
dependedOnBy: string[];
|
|
201
|
-
}
|
|
202
|
-
interface SurfaceResult {
|
|
203
|
-
consumer: string;
|
|
204
|
-
symbol: string;
|
|
205
|
-
shortName: string;
|
|
206
|
-
}
|
|
207
|
-
interface DeadSymbolResult {
|
|
208
|
-
relativePath: string;
|
|
209
|
-
startLine: number;
|
|
210
|
-
endLine: number;
|
|
211
|
-
loc: number;
|
|
212
|
-
symbol: string;
|
|
213
|
-
shortName: string;
|
|
214
|
-
sameFileRefs: number;
|
|
215
|
-
kind: 'dead-code' | 'file-internal';
|
|
216
|
-
}
|
|
217
|
-
interface DeadSummary {
|
|
218
|
-
symbols: DeadSymbolResult[];
|
|
219
|
-
totalCount: number;
|
|
220
|
-
/** Symbols with zero references anywhere — safe to delete */
|
|
221
|
-
deadCodeCount: number;
|
|
222
|
-
/** Symbols referenced only within their own file — no cross-file consumers.
|
|
223
|
-
* May be private helpers (fine) or forgotten exports (needs review). */
|
|
224
|
-
fileInternalCount: number;
|
|
225
|
-
totalLoc: number;
|
|
226
|
-
}
|
|
227
|
-
interface HotspotResult {
|
|
228
|
-
symbol: string;
|
|
229
|
-
shortName: string;
|
|
230
|
-
refCount: number;
|
|
231
|
-
fileCount: number;
|
|
232
|
-
definedIn: string;
|
|
233
|
-
}
|
|
234
|
-
interface ImportResult {
|
|
235
|
-
symbol: string;
|
|
236
|
-
shortName: string;
|
|
237
|
-
fromFile: string;
|
|
238
|
-
}
|
|
239
|
-
interface UnusedImportResult {
|
|
240
|
-
symbol: string;
|
|
241
|
-
shortName: string;
|
|
242
|
-
importedIn: string;
|
|
243
|
-
}
|
|
244
|
-
interface OutlineNode {
|
|
245
|
-
symbol: string;
|
|
246
|
-
shortName: string;
|
|
247
|
-
startLine: number;
|
|
248
|
-
endLine: number;
|
|
249
|
-
children: OutlineNode[];
|
|
250
|
-
}
|
|
251
|
-
interface MemberResult {
|
|
252
|
-
symbol: string;
|
|
253
|
-
shortName: string;
|
|
254
|
-
startLine: number;
|
|
255
|
-
endLine: number;
|
|
256
|
-
kind: string;
|
|
257
|
-
}
|
|
258
|
-
interface FanResult {
|
|
259
|
-
name: string;
|
|
260
|
-
count: number;
|
|
261
|
-
}
|
|
262
|
-
interface CouplingResult {
|
|
263
|
-
file1: string;
|
|
264
|
-
file2: string;
|
|
265
|
-
sharedSymbols: number;
|
|
266
|
-
}
|
|
267
|
-
interface CycleResult {
|
|
268
|
-
/** Files forming a cycle, in order */
|
|
269
|
-
path: string[];
|
|
270
|
-
/**
|
|
271
|
-
* Classification of the cycle:
|
|
272
|
-
* - 'real': architectural cycle worth fixing
|
|
273
|
-
* - 'module-hierarchy': barrel-file pattern (mod.rs / index.ts /
|
|
274
|
-
* __init__.py declaring children that re-import
|
|
275
|
-
* parent re-exports). Standard module structure,
|
|
276
|
-
* not actionable.
|
|
277
|
-
*/
|
|
278
|
-
kind: 'real' | 'module-hierarchy';
|
|
279
|
-
}
|
|
280
|
-
interface BottleneckResult {
|
|
281
|
-
symbol: string;
|
|
282
|
-
shortName: string;
|
|
283
|
-
fanIn: number;
|
|
284
|
-
fanOut: number;
|
|
285
|
-
/** fanIn * fanOut — higher = more central coupling hub */
|
|
286
|
-
score: number;
|
|
287
|
-
definedIn: string;
|
|
288
|
-
}
|
|
289
|
-
interface IsolatedResult {
|
|
290
|
-
symbol: string;
|
|
291
|
-
shortName: string;
|
|
292
|
-
relativePath: string;
|
|
293
|
-
startLine: number;
|
|
294
|
-
endLine: number;
|
|
295
|
-
loc: number;
|
|
296
|
-
}
|
|
297
|
-
interface ByKindResult {
|
|
298
|
-
symbol: string;
|
|
299
|
-
shortName: string;
|
|
300
|
-
kind: number;
|
|
301
|
-
kindName: string;
|
|
302
|
-
relativePath: string;
|
|
303
|
-
startLine: number;
|
|
304
|
-
endLine: number;
|
|
305
|
-
}
|
|
306
|
-
interface DeepChainResult {
|
|
307
|
-
/** Files in the chain, from leaf to root */
|
|
308
|
-
chain: string[];
|
|
309
|
-
depth: number;
|
|
310
|
-
}
|
|
311
|
-
interface HierarchyNode {
|
|
312
|
-
symbol: string;
|
|
313
|
-
shortName: string;
|
|
314
|
-
depth: number;
|
|
315
|
-
}
|
|
316
|
-
interface CallGraphResult {
|
|
317
|
-
symbol: string;
|
|
318
|
-
shortName: string;
|
|
319
|
-
/** Symbols that call this one (incoming) */
|
|
320
|
-
callers: Array<{
|
|
321
|
-
symbol: string;
|
|
322
|
-
shortName: string;
|
|
323
|
-
file: string;
|
|
324
|
-
}>;
|
|
325
|
-
/** Symbols called by this one (outgoing) */
|
|
326
|
-
callees: Array<{
|
|
327
|
-
symbol: string;
|
|
328
|
-
shortName: string;
|
|
329
|
-
file: string;
|
|
330
|
-
}>;
|
|
331
|
-
}
|
|
332
|
-
interface DriftResult {
|
|
333
|
-
file: string;
|
|
334
|
-
kind: 'unused-import' | 'layer-violation' | 'pattern-deviation';
|
|
335
|
-
description: string;
|
|
336
|
-
/** The dependency involved */
|
|
337
|
-
dep: string;
|
|
338
|
-
/** For layer violations: the expected layer boundary */
|
|
339
|
-
detail?: string;
|
|
340
|
-
}
|
|
341
|
-
interface DriftSummary {
|
|
342
|
-
results: DriftResult[];
|
|
343
|
-
unusedImports: number;
|
|
344
|
-
layerViolations: number;
|
|
345
|
-
patternDeviations: number;
|
|
346
|
-
}
|
|
347
|
-
interface WrapperCandidate {
|
|
348
|
-
symbol: string;
|
|
349
|
-
shortName: string;
|
|
350
|
-
file: string;
|
|
351
|
-
startLine: number;
|
|
352
|
-
endLine: number;
|
|
353
|
-
loc: number;
|
|
354
|
-
singleCaller: string;
|
|
355
|
-
singleCallerShort: string;
|
|
356
|
-
callerFanIn: number;
|
|
357
|
-
}
|
|
358
|
-
interface PassthroughCandidate {
|
|
359
|
-
symbol: string;
|
|
360
|
-
shortName: string;
|
|
361
|
-
file: string;
|
|
362
|
-
startLine: number;
|
|
363
|
-
endLine: number;
|
|
364
|
-
loc: number;
|
|
365
|
-
forwardsTo: string;
|
|
366
|
-
forwardsToShort: string;
|
|
367
|
-
forwardsToFile: string;
|
|
368
|
-
}
|
|
369
|
-
interface StaleAbstraction {
|
|
370
|
-
symbol: string;
|
|
371
|
-
shortName: string;
|
|
372
|
-
file: string;
|
|
373
|
-
startLine: number;
|
|
374
|
-
endLine: number;
|
|
375
|
-
loc: number;
|
|
376
|
-
/**
|
|
377
|
-
* Cross-file consumers NOT counting files that only re-export the symbol
|
|
378
|
-
* through a barrel (`export { X } from '...'`). Barrel files expand the
|
|
379
|
-
* public surface; they aren't real consumers.
|
|
380
|
-
*/
|
|
381
|
-
consumers: number;
|
|
382
|
-
/** Number of files whose only reference is a passthrough re-export. */
|
|
383
|
-
barrelConsumers: number;
|
|
384
|
-
/** What the definition is syntactically — detected from source at the definition line. */
|
|
385
|
-
kind: 'class' | 'interface' | 'type' | 'enum' | 'other';
|
|
386
|
-
/**
|
|
387
|
-
* Does the defining file itself reference the type outside its own declaration?
|
|
388
|
-
* `false` is the strongest stale signal — the type lives in a file that never
|
|
389
|
-
* uses it (misplaced types file), while another file is its only consumer.
|
|
390
|
-
*/
|
|
391
|
-
definerUsesType: boolean;
|
|
392
|
-
/**
|
|
393
|
-
* Ranked confidence in the "stale" verdict:
|
|
394
|
-
* 'high' — consumers === 0, OR consumers === 1 && !definerUsesType && kind !== 'class'.
|
|
395
|
-
* 'medium' — consumers <= 1 with one of the signals pointing weakly stale.
|
|
396
|
-
* 'low' — consumers === 1 but kind === 'class' (likely encapsulation, not over-abstraction).
|
|
397
|
-
*/
|
|
398
|
-
confidence: 'high' | 'medium' | 'low';
|
|
399
|
-
/** Short human-readable explanation of why this was flagged. */
|
|
400
|
-
reason: string;
|
|
401
|
-
}
|
|
402
|
-
interface ComplexityHotspot {
|
|
403
|
-
symbol: string;
|
|
404
|
-
shortName: string;
|
|
405
|
-
file: string;
|
|
406
|
-
startLine: number;
|
|
407
|
-
endLine: number;
|
|
408
|
-
loc: number;
|
|
409
|
-
fanIn: number;
|
|
410
|
-
fanOut: number;
|
|
411
|
-
calleeCount: number;
|
|
412
|
-
score: number;
|
|
413
|
-
}
|
|
414
|
-
interface SimilarSymbolResult {
|
|
415
|
-
symbolA: string;
|
|
416
|
-
shortNameA: string;
|
|
417
|
-
fileA: string;
|
|
418
|
-
symbolB: string;
|
|
419
|
-
shortNameB: string;
|
|
420
|
-
fileB: string;
|
|
421
|
-
/** Similarity score (0-1). Basis says what evidence was compared. */
|
|
422
|
-
similarity: number;
|
|
423
|
-
/** Evidence used for similarity: call graph callees or lexical source tokens. */
|
|
424
|
-
similarityBasis?: 'callees' | 'source-tokens';
|
|
425
|
-
/** Shared callees or source tokens, depending on similarityBasis. */
|
|
426
|
-
sharedCallees: string[];
|
|
427
|
-
/** Callees or source tokens unique to A, depending on similarityBasis. */
|
|
428
|
-
uniqueToA: string[];
|
|
429
|
-
/** Callees or source tokens unique to B, depending on similarityBasis. */
|
|
430
|
-
uniqueToB: string[];
|
|
431
|
-
}
|
|
432
|
-
interface SimilarFileResult {
|
|
433
|
-
fileA: string;
|
|
434
|
-
fileB: string;
|
|
435
|
-
/** Jaccard similarity of dependency sets (0-1) */
|
|
436
|
-
similarity: number;
|
|
437
|
-
sharedDeps: string[];
|
|
438
|
-
uniqueToA: string[];
|
|
439
|
-
uniqueToB: string[];
|
|
440
|
-
}
|
|
441
|
-
interface SimilarChainResult {
|
|
442
|
-
chainA: string[];
|
|
443
|
-
chainB: string[];
|
|
444
|
-
/** Fraction of nodes shared (0-1) */
|
|
445
|
-
similarity: number;
|
|
446
|
-
/** Edit distance between the two chains */
|
|
447
|
-
editDistance: number;
|
|
448
|
-
/** Indices where the chains diverge — the consolidation targets */
|
|
449
|
-
divergencePoints: Array<{
|
|
450
|
-
index: number;
|
|
451
|
-
nodeA: string;
|
|
452
|
-
nodeB: string;
|
|
453
|
-
}>;
|
|
454
|
-
/** Shared prefix */
|
|
455
|
-
commonPrefix: string[];
|
|
456
|
-
/** Shared suffix */
|
|
457
|
-
commonSuffix: string[];
|
|
458
|
-
}
|
|
459
|
-
interface ExtractCandidate {
|
|
460
|
-
symbol: string;
|
|
461
|
-
shortName: string;
|
|
462
|
-
relativePath: string;
|
|
463
|
-
startLine: number;
|
|
464
|
-
endLine: number;
|
|
465
|
-
loc: number;
|
|
466
|
-
/** Total callees */
|
|
467
|
-
totalCallees: number;
|
|
468
|
-
/** Distinct clusters of callees (natural extraction seams) */
|
|
469
|
-
clusters: Array<{
|
|
470
|
-
callees: string[];
|
|
471
|
-
/** How isolated this cluster is from the rest (0-1, higher = more extractable) */
|
|
472
|
-
isolation: number;
|
|
473
|
-
}>;
|
|
474
|
-
}
|
|
475
|
-
interface HealthAction {
|
|
476
|
-
category: string;
|
|
477
|
-
description: string;
|
|
478
|
-
effort: 'low' | 'medium' | 'high';
|
|
479
|
-
impact: 'low' | 'medium' | 'high';
|
|
480
|
-
count: number;
|
|
481
|
-
locRecoverable: number;
|
|
482
|
-
}
|
|
483
|
-
interface HealthReport {
|
|
484
|
-
score: number;
|
|
485
|
-
overview: {
|
|
486
|
-
documents: number;
|
|
487
|
-
symbols: number;
|
|
488
|
-
indexSizeBytes: number;
|
|
489
|
-
};
|
|
490
|
-
findings: {
|
|
491
|
-
deadSymbols: number;
|
|
492
|
-
deadLoc: number;
|
|
493
|
-
isolatedSymbols: number;
|
|
494
|
-
isolatedLoc: number;
|
|
495
|
-
cycles: number;
|
|
496
|
-
similarPairs: number;
|
|
497
|
-
extractionCandidates: number;
|
|
498
|
-
wrappers: number;
|
|
499
|
-
passthroughs: number;
|
|
500
|
-
staleTypes: number;
|
|
501
|
-
driftedFiles: number;
|
|
502
|
-
complexityHotspotCount: number;
|
|
503
|
-
};
|
|
504
|
-
actions: HealthAction[];
|
|
505
|
-
topComplexity: Array<{
|
|
506
|
-
symbol: string;
|
|
507
|
-
score: number;
|
|
508
|
-
}>;
|
|
509
|
-
warnings?: string[];
|
|
510
|
-
}
|
|
511
|
-
interface ConvergenceResult {
|
|
512
|
-
symbolA: {
|
|
513
|
-
symbol: string;
|
|
514
|
-
shortName: string;
|
|
515
|
-
file: string;
|
|
516
|
-
loc: number;
|
|
517
|
-
};
|
|
518
|
-
symbolB: {
|
|
519
|
-
symbol: string;
|
|
520
|
-
shortName: string;
|
|
521
|
-
file: string;
|
|
522
|
-
loc: number;
|
|
523
|
-
};
|
|
524
|
-
similarity: number;
|
|
525
|
-
sharedCallees: string[];
|
|
526
|
-
uniqueToA: string[];
|
|
527
|
-
uniqueToB: string[];
|
|
528
|
-
consolidationStrategy: string;
|
|
529
|
-
}
|
|
530
|
-
interface CodeResult {
|
|
531
|
-
symbol: string;
|
|
532
|
-
shortName: string;
|
|
533
|
-
relativePath: string;
|
|
534
|
-
startLine: number;
|
|
535
|
-
endLine: number;
|
|
536
|
-
language: string | null;
|
|
537
|
-
source: string;
|
|
538
|
-
}
|
|
539
|
-
interface ComplexityResult {
|
|
540
|
-
symbol: string;
|
|
541
|
-
shortName: string;
|
|
542
|
-
relativePath: string;
|
|
543
|
-
startLine: number;
|
|
544
|
-
endLine: number;
|
|
545
|
-
loc: number;
|
|
546
|
-
/** Branch count from source-level regex (if, else, for, while, switch, catch, ternary, &&, ||) */
|
|
547
|
-
branches: number;
|
|
548
|
-
/** Cyclomatic complexity estimate: branches + 1 */
|
|
549
|
-
cyclomaticEstimate: number;
|
|
550
|
-
/** Number of distinct callees within the definition */
|
|
551
|
-
calleeCount: number;
|
|
552
|
-
fanIn: number;
|
|
553
|
-
fanOut: number;
|
|
554
|
-
}
|
|
555
|
-
interface DataflowResult {
|
|
556
|
-
symbol: string;
|
|
557
|
-
shortName: string;
|
|
558
|
-
relativePath: string;
|
|
559
|
-
/** Where the symbol is defined (role=1) */
|
|
560
|
-
definitionSites: Array<{
|
|
561
|
-
file: string;
|
|
562
|
-
line: number;
|
|
563
|
-
}>;
|
|
564
|
-
/** Where the symbol is referenced (role!=1) */
|
|
565
|
-
usageSites: Array<{
|
|
566
|
-
file: string;
|
|
567
|
-
line: number;
|
|
568
|
-
enclosingSymbol: string;
|
|
569
|
-
enclosingShort: string;
|
|
570
|
-
}>;
|
|
571
|
-
/** Symbols that appear in the same function that defines this symbol (producers/inputs) */
|
|
572
|
-
producers: Array<{
|
|
573
|
-
symbol: string;
|
|
574
|
-
shortName: string;
|
|
575
|
-
file: string;
|
|
576
|
-
}>;
|
|
577
|
-
/** Symbols defined by functions that reference this symbol (consumers/outputs) */
|
|
578
|
-
consumers: Array<{
|
|
579
|
-
symbol: string;
|
|
580
|
-
shortName: string;
|
|
581
|
-
file: string;
|
|
582
|
-
}>;
|
|
583
|
-
}
|
|
584
|
-
interface SliceResult {
|
|
585
|
-
symbol: string;
|
|
586
|
-
shortName: string;
|
|
587
|
-
direction: 'backward' | 'forward';
|
|
588
|
-
/** Backward: symbols referenced in the same function as the target's definition (inputs) */
|
|
589
|
-
/** Forward: symbols defined by functions that reference the target (outputs) */
|
|
590
|
-
connectedSymbols: Array<{
|
|
591
|
-
symbol: string;
|
|
592
|
-
shortName: string;
|
|
593
|
-
file: string;
|
|
594
|
-
relationship: string;
|
|
595
|
-
}>;
|
|
596
|
-
}
|
|
597
|
-
interface AffectedResult {
|
|
598
|
-
symbol: string;
|
|
599
|
-
shortName: string;
|
|
600
|
-
file: string;
|
|
601
|
-
depth: number;
|
|
602
|
-
}
|
|
603
|
-
interface ChangeSurfaceEntry {
|
|
604
|
-
symbol: string;
|
|
605
|
-
shortName: string;
|
|
606
|
-
startLine: number;
|
|
607
|
-
endLine: number;
|
|
608
|
-
externalConsumers: number;
|
|
609
|
-
riskLevel: 'low' | 'medium' | 'high';
|
|
610
|
-
}
|
|
611
|
-
interface ChangeSurfaceResult {
|
|
612
|
-
file: string;
|
|
613
|
-
symbols: ChangeSurfaceEntry[];
|
|
614
|
-
totalExternalConsumers: number;
|
|
615
|
-
}
|
|
616
|
-
interface DiffImpactResult {
|
|
617
|
-
changedFiles: string[];
|
|
618
|
-
changedSymbols: Array<{
|
|
619
|
-
symbol: string;
|
|
620
|
-
shortName: string;
|
|
621
|
-
file: string;
|
|
622
|
-
fanIn: number;
|
|
623
|
-
}>;
|
|
624
|
-
affectedConsumers: Array<{
|
|
625
|
-
file: string;
|
|
626
|
-
consumedSymbols: number;
|
|
627
|
-
}>;
|
|
628
|
-
summary: {
|
|
629
|
-
totalChangedFiles: number;
|
|
630
|
-
totalChangedSymbols: number;
|
|
631
|
-
totalAffectedFiles: number;
|
|
632
|
-
note?: string;
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
interface DeadOptions {
|
|
636
|
-
scope?: string;
|
|
637
|
-
minLoc?: number;
|
|
638
|
-
includeTests?: boolean;
|
|
639
|
-
skipBarrels?: boolean;
|
|
640
|
-
includeMembers?: boolean;
|
|
641
|
-
deadCodeOnly?: boolean;
|
|
642
|
-
scanLimit?: number;
|
|
643
|
-
semantic?: boolean;
|
|
644
|
-
}
|
|
645
|
-
interface InstallMethod {
|
|
646
|
-
/** Human-readable label (e.g., "npm", "pip", "go install") */
|
|
647
|
-
label: string;
|
|
648
|
-
/** Binary that must exist for this install method to work (e.g., "npm", "pip3", "go") */
|
|
649
|
-
prerequisite: string;
|
|
650
|
-
/** Command to execute */
|
|
651
|
-
binary: string;
|
|
652
|
-
/** Arguments for the command */
|
|
653
|
-
args: string[];
|
|
654
|
-
}
|
|
655
|
-
type SupportedLanguage = 'typescript' | 'javascript' | 'java' | 'scala' | 'kotlin' | 'rust' | 'python' | 'ruby' | 'go' | 'cpp' | 'c' | 'csharp' | 'vb' | 'dart' | 'php';
|
|
656
|
-
interface IndexerConfig {
|
|
657
|
-
language: SupportedLanguage;
|
|
658
|
-
/** Preferred executable name for the indexer */
|
|
659
|
-
indexerBinary: string;
|
|
660
|
-
/** Additional executable names accepted on PATH for the same indexer */
|
|
661
|
-
binaryAliases?: string[];
|
|
662
|
-
/** Project-local executable paths to prefer when they exist */
|
|
663
|
-
projectLocalBinaries?: string[];
|
|
664
|
-
/** Command to check if the indexer is installed */
|
|
665
|
-
checkCommand: string;
|
|
666
|
-
/** Returns the binary + args array for execFileSync (no shell injection) */
|
|
667
|
-
indexArgs: (opts: {
|
|
668
|
-
projectRoot: string;
|
|
669
|
-
outputPath: string;
|
|
670
|
-
pnpmWorkspaces?: boolean;
|
|
671
|
-
indexerBinary: string;
|
|
672
|
-
}) => {
|
|
673
|
-
binary: string;
|
|
674
|
-
args: string[];
|
|
675
|
-
};
|
|
676
|
-
/** Relative output path written by the indexer when it ignores outputPath */
|
|
677
|
-
defaultOutputPath?: string;
|
|
678
|
-
/** Marker files that indicate this language is present */
|
|
679
|
-
markerFiles: string[];
|
|
680
|
-
/** Installation methods to try in order of preference */
|
|
681
|
-
installMethods?: InstallMethod[];
|
|
682
|
-
/** URL for manual installation if auto-install fails */
|
|
683
|
-
installUrl?: string;
|
|
684
|
-
/**
|
|
685
|
-
* npm package bundled with scip-query as an optionalDependency. When this
|
|
686
|
-
* package resolves locally (i.e. it installed successfully), the indexer is
|
|
687
|
-
* considered available even if its binary isn't on PATH — `npx <binary>`
|
|
688
|
-
* will pick up the local install.
|
|
689
|
-
*/
|
|
690
|
-
bundledNpmPackage?: string;
|
|
691
|
-
}
|
|
692
|
-
interface ScipQueryConfig {
|
|
693
|
-
/** Path to the SQLite database (index.db) */
|
|
694
|
-
dbPath: string;
|
|
695
|
-
/** Path to the SCIP protobuf index (index.scip) */
|
|
696
|
-
indexPath: string;
|
|
697
|
-
/** Project root directory */
|
|
698
|
-
projectRoot: string;
|
|
699
|
-
/** Project-specific externally-live roots for dead-code filtering */
|
|
700
|
-
entryRoots?: EntryRootsConfig;
|
|
701
|
-
/** Paths to .gitignore files to load for filtering */
|
|
702
|
-
gitignorePaths?: string[];
|
|
703
|
-
/** Optional semantic-provider configuration */
|
|
704
|
-
semantic?: SemanticConfig;
|
|
705
|
-
}
|
|
706
|
-
interface ProjectConfig {
|
|
707
|
-
/** Override which languages to index (default: auto-detect) */
|
|
708
|
-
languages?: SupportedLanguage[];
|
|
709
|
-
/** Watch mode settings */
|
|
710
|
-
watch?: WatchConfig;
|
|
711
|
-
/** Per-language indexer overrides */
|
|
712
|
-
indexer?: Partial<Record<SupportedLanguage, IndexerOverrides>>;
|
|
713
|
-
/** Override the database storage path (default: ~/.cache/scip-query/<hash>/) */
|
|
714
|
-
dbPath?: string;
|
|
715
|
-
/** Project-specific externally-live roots for dead-code filtering */
|
|
716
|
-
entryRoots?: EntryRootsConfig;
|
|
717
|
-
/** Optional semantic-provider configuration */
|
|
718
|
-
semantic?: SemanticConfig;
|
|
719
|
-
}
|
|
720
|
-
interface SemanticConfig {
|
|
721
|
-
typescript?: TypeScriptSemanticConfig;
|
|
722
|
-
}
|
|
723
|
-
interface TypeScriptSemanticConfig {
|
|
724
|
-
/** Explicit tsconfig paths, relative to project root unless absolute */
|
|
725
|
-
tsconfigs?: string[];
|
|
726
|
-
}
|
|
727
|
-
interface EntryRootsConfig {
|
|
728
|
-
/** Any symbol defined in these path prefixes is externally live */
|
|
729
|
-
pathPrefixes?: string[];
|
|
730
|
-
/** Any symbol defined in these exact files is externally live */
|
|
731
|
-
files?: string[];
|
|
732
|
-
/** Symbols matching these regular expressions are externally live */
|
|
733
|
-
symbolPatterns?: string[];
|
|
734
|
-
/** Qualified var names like my.ns/my-fn that are externally live */
|
|
735
|
-
qualifiedVars?: string[];
|
|
736
|
-
}
|
|
737
|
-
interface WatchConfig {
|
|
738
|
-
/** Enable file watching (default: false, must opt in) */
|
|
739
|
-
enabled?: boolean;
|
|
740
|
-
/** Ms to wait after the last file change before triggering reindex (default: 30000) */
|
|
741
|
-
debounceMs?: number;
|
|
742
|
-
/** Minimum ms between reindex completions (default: 60000) */
|
|
743
|
-
cooldownMs?: number;
|
|
744
|
-
/** Extra glob patterns to ignore beyond .gitignore */
|
|
745
|
-
ignore?: string[];
|
|
746
|
-
}
|
|
747
|
-
interface IndexerOverrides {
|
|
748
|
-
/** Enable pnpm workspace support (TypeScript) */
|
|
749
|
-
pnpmWorkspaces?: boolean;
|
|
750
|
-
}
|
|
751
|
-
interface RedundantReexport {
|
|
752
|
-
barrelFile: string;
|
|
753
|
-
symbol: string;
|
|
754
|
-
shortName: string;
|
|
755
|
-
originalFile: string;
|
|
756
|
-
/** How many consumers import through the barrel */
|
|
757
|
-
barrelConsumers: number;
|
|
758
|
-
/** How many consumers import directly from the source */
|
|
759
|
-
directConsumers: number;
|
|
760
|
-
}
|
|
761
|
-
interface SimilarSignatureGroup {
|
|
762
|
-
/** The normalized signature shared by all functions in the group */
|
|
763
|
-
signature: string;
|
|
764
|
-
/** Functions that share this signature */
|
|
765
|
-
functions: Array<{
|
|
766
|
-
symbol: string;
|
|
767
|
-
shortName: string;
|
|
768
|
-
file: string;
|
|
769
|
-
startLine: number;
|
|
770
|
-
endLine: number;
|
|
771
|
-
loc: number;
|
|
772
|
-
}>;
|
|
773
|
-
}
|
|
774
|
-
type WatcherStatus = {
|
|
775
|
-
state: 'idle';
|
|
776
|
-
} | {
|
|
777
|
-
state: 'waiting';
|
|
778
|
-
changedFiles: number;
|
|
779
|
-
reindexAt: number;
|
|
780
|
-
} | {
|
|
781
|
-
state: 'indexing';
|
|
782
|
-
startedAt: number;
|
|
783
|
-
} | {
|
|
784
|
-
state: 'cooldown';
|
|
785
|
-
until: number;
|
|
786
|
-
dirty: boolean;
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* Thin wrapper around better-sqlite3 with a pre-configured connection
|
|
791
|
-
* and helper methods for the SCIP SQLite schema.
|
|
792
|
-
*
|
|
793
|
-
* The schema is produced by `scip expt-convert` and is identical
|
|
794
|
-
* regardless of source language (TypeScript, Rust, Python, etc.).
|
|
795
|
-
*
|
|
796
|
-
* Tables:
|
|
797
|
-
* documents — indexed files (id, language, relative_path)
|
|
798
|
-
* global_symbols — all symbols (id, symbol, display_name, kind, documentation)
|
|
799
|
-
* defn_enclosing_ranges — definition locations (document_id, symbol_id, start/end line/char)
|
|
800
|
-
* mentions — references & definitions (chunk_id, symbol_id, role)
|
|
801
|
-
* chunks — code segments (document_id, chunk_index, start/end line, occurrences)
|
|
802
|
-
*/
|
|
803
|
-
declare class ScipDatabase {
|
|
804
|
-
readonly db: Database.Database;
|
|
805
|
-
readonly config: ScipQueryConfig;
|
|
806
|
-
private pathFilter;
|
|
807
|
-
constructor(config: ScipQueryConfig, pathFilter?: PathFilter);
|
|
808
|
-
/** Check if a path should be excluded based on .gitignore rules */
|
|
809
|
-
isIgnored(relativePath: string): boolean;
|
|
810
|
-
/**
|
|
811
|
-
* The local-symbol predicate: only match symbols that are defined
|
|
812
|
-
* in files NOT excluded by gitignore. This replaces the old hardcoded
|
|
813
|
-
* `NOT LIKE 'node_modules/%'` check.
|
|
814
|
-
*
|
|
815
|
-
* Since SQLite can't evaluate JS gitignore rules inline, we use a
|
|
816
|
-
* simpler approach: query broadly, then filter in JS. For queries
|
|
817
|
-
* that need SQL-level filtering, use excludedPathPatterns().
|
|
818
|
-
*/
|
|
819
|
-
get localSymbolPredicate(): string;
|
|
820
|
-
/**
|
|
821
|
-
* SQL WHERE clause fragments to exclude common build/dependency paths.
|
|
822
|
-
* Complements the JS-level gitignore filtering for performance.
|
|
823
|
-
*/
|
|
824
|
-
get pathExclusions(): string;
|
|
825
|
-
/** Reusable SQL fragment: filter out synthetic/internal symbol noise */
|
|
826
|
-
get symbolNoise(): string;
|
|
827
|
-
/** Build SQL path exclusions for one or more document table aliases */
|
|
828
|
-
pathExclusionsFor(...aliases: string[]): string;
|
|
829
|
-
/** Build SQL symbol exclusions for the given global_symbols alias */
|
|
830
|
-
symbolNoiseFor(alias: string): string;
|
|
831
|
-
/** Run a raw SQL query and return all rows */
|
|
832
|
-
all<T = Record<string, unknown>>(sql: string, ...params: unknown[]): T[];
|
|
833
|
-
/** Run a raw SQL query and return the first row */
|
|
834
|
-
get<T = Record<string, unknown>>(sql: string, ...params: unknown[]): T | undefined;
|
|
835
|
-
close(): void;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
export { type ProjectConfig as $, type AffectedResult as A, type BottleneckResult as B, type CallGraphResult as C, type DataflowResult as D, type ExtractCandidate as E, type FanResult as F, type StaleAbstraction as G, type HealthReport as H, type ImportResult as I, type SliceResult as J, type RedundantReexport as K, type SimilarSignatureGroup as L, type MemberResult as M, type SymbolMatch as N, type OutlineNode as O, type PassthroughCandidate as P, type SymbolLocation as Q, type RefResult as R, ScipDatabase as S, type TraceResult as T, type UnusedImportResult as U, type IndexedDefinition as V, type WrapperCandidate as W, type ScipSymbol as X, type ScipLocalSymbol as Y, type SupportedLanguage as Z, type IndexerConfig as _, type ByKindResult as a, type WatcherStatus as a0, type ChangeSurfaceEntry as a1, type DeadSymbolResult as a2, type DescriptorSuffix as a3, type DocumentPathCandidate as a4, type DriftResult as a5, type EntryRootsConfig as a6, type HealthAction as a7, type IndexerOverrides as a8, type InstallMethod as a9, type ParsedReExport as aa, type ParsedSourceExport as ab, type ParsedSourceImport as ac, type ReferenceSite as ad, type ScipDescriptor as ae, type ScipQueryConfig as af, type SemanticConfig as ag, type TypeScriptSemanticConfig as ah, type WatchConfig as ai, createGitignoreFilter as aj, type ChangeSurfaceResult as b, type CodeResult as c, type ComplexityHotspot as d, type ComplexityResult as e, type ConvergenceResult as f, type CouplingResult as g, type CycleResult as h, type DeadOptions as i, type DeadSummary as j, type DeepChainResult as k, type DepResult as l, type DiffImpactResult as m, type DriftSummary as n, type FileResult as o, type HierarchyNode as p, type HotspotResult as q, type IsolatedResult as r, type MethodResult as s, type StatsResult as t, type SymbolResult as u, type SystemResult as v, type SurfaceResult as w, type SimilarSymbolResult as x, type SimilarFileResult as y, type SimilarChainResult as z };
|