Documentation
¶
Index ¶
- Constants
- type Architecture
- type CrossRepoEdge
- type Dependencies
- type FrameworkPattern
- type GitInfo
- type Hints
- type HotFile
- type Index
- type LangStats
- type ModuleInfo
- type MultiIndex
- type PackageEdge
- type PackageInfo
- type Project
- type RepoFailure
- type RepoSummary
- type ScanInfo
- type Structure
- type Tech
Constants ¶
const CurrentSchemaVersion = 1
CurrentSchemaVersion is bumped on any breaking change to the index layout.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Architecture ¶
type CrossRepoEdge ¶ added in v0.5.0
type CrossRepoEdge struct {
From string `json:"from"`
To string `json:"to"`
Weight int `json:"weight"`
Via []string `json:"via,omitempty"` // importing modules in From, capped
}
CrossRepoEdge says that FromRepo imports something FromRepo does not own but ToRepo provides (matched through manifest names).
type Dependencies ¶
type FrameworkPattern ¶ added in v0.4.0
type FrameworkPattern struct {
Name string `json:"name"`
Config []string `json:"config_files,omitempty"`
Routes string `json:"routes,omitempty"`
API string `json:"api,omitempty"`
Middleware string `json:"middleware,omitempty"`
Models string `json:"models,omitempty"`
Entry string `json:"entry,omitempty"`
}
FrameworkPattern holds detected structural patterns for a framework.
type Index ¶
type Index struct {
Schema string `json:"$schema"`
Version string `json:"version"`
SchemaVersion int `json:"schema_version"`
GeneratedAt string `json:"generated_at,omitempty"`
StacklitVersion string `json:"stacklit_version"`
MerkleHash string `json:"merkle_hash,omitempty"`
Project Project `json:"project"`
Tech Tech `json:"tech"`
Structure Structure `json:"structure"`
Modules map[string]ModuleInfo `json:"modules"`
Dependencies Dependencies `json:"dependencies"`
Git GitInfo `json:"git,omitempty"`
Hints Hints `json:"hints,omitempty"`
Architecture Architecture `json:"architecture,omitempty"`
Scan *ScanInfo `json:"scan,omitempty"`
Packages []PackageInfo `json:"packages,omitempty"`
PackageEdges []PackageEdge `json:"package_edges,omitempty"`
}
type ModuleInfo ¶
type ModuleInfo struct {
Purpose string `json:"purpose"`
Language string `json:"language,omitempty"`
Files int `json:"files"`
Lines int `json:"lines"`
FileList []string `json:"file_list,omitempty"`
Exports []string `json:"exports,omitempty"`
TypeDefs map[string]string `json:"type_defs,omitempty"` // key type definitions
DependsOn []string `json:"depends_on,omitempty"`
DependedBy []string `json:"depended_by,omitempty"`
Activity string `json:"activity,omitempty"`
}
type MultiIndex ¶
type MultiIndex struct {
Schema string `json:"$schema"`
Version string `json:"version"`
SchemaVersion int `json:"schema_version"`
Type string `json:"type"` // "polyrepo"
GeneratedAt string `json:"generated_at,omitempty"`
TotalFiles int `json:"total_files"`
TotalLines int `json:"total_lines"`
TotalModules int `json:"total_modules"`
Repos []RepoSummary `json:"repos"`
CrossEdges []CrossRepoEdge `json:"cross_repo_edges,omitempty"`
Failed []RepoFailure `json:"failed,omitempty"`
}
type PackageEdge ¶ added in v0.5.0
type PackageEdge struct {
From string `json:"from"`
To string `json:"to"`
Weight int `json:"weight"` // number of import sites backing the edge
}
PackageEdge is a dependency from one package to another.
type PackageInfo ¶ added in v0.5.0
type PackageInfo struct {
Name string `json:"name"` // manifest name, or the path when none
Path string `json:"path"` // slash-separated, relative to the repo root
Kind string `json:"kind,omitempty"` // npm, go, cargo, python
Files int `json:"files"`
Lines int `json:"lines"`
Modules []string `json:"modules,omitempty"`
DependsOn []string `json:"depends_on,omitempty"` // other package names
DependedBy []string `json:"depended_by,omitempty"`
}
PackageInfo is one workspace package in a monorepo: a hard boundary that groups modules and owns its manifest identity.
type RepoFailure ¶ added in v0.5.0
RepoFailure records a repo that could not be scanned.
type RepoSummary ¶
type RepoSummary struct {
Name string `json:"name"`
Path string `json:"path"`
PrimaryLanguage string `json:"primary_language"`
TotalFiles int `json:"total_files"`
TotalLines int `json:"total_lines"`
MerkleHash string `json:"merkle_hash,omitempty"`
Provides []string `json:"provides,omitempty"` // manifest names this repo publishes
Modules map[string]ModuleInfo `json:"modules"`
Packages []PackageInfo `json:"packages,omitempty"`
PackageEdges []PackageEdge `json:"package_edges,omitempty"`
Frameworks []string `json:"frameworks,omitempty"`
Entrypoints []string `json:"entrypoints,omitempty"`
}
type ScanInfo ¶ added in v0.5.0
type ScanInfo struct {
SkippedLarge []string `json:"skipped_large,omitempty"`
SkippedSymlinks []string `json:"skipped_symlinks,omitempty"`
SkippedOther []string `json:"skipped_other,omitempty"`
ParseErrors []string `json:"parse_errors,omitempty"`
// Lightweight lists files indexed without tree-sitter ("path (reason)"):
// timeout, large, generated or minified. Their exports and imports are empty.
Lightweight []string `json:"lightweight,omitempty"`
}
ScanInfo records what a run deliberately left out, so readers can tell a partial index from a complete one. All lists are sorted for stable diffs.