Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NPMRCDetector ¶
type NPMRCDetector struct {
// contains filtered or unexported fields
}
NPMRCDetector audits npm configuration: discovers all .npmrc files, parses them, captures the merged effective view, and surfaces relevant env vars.
The detector intentionally keeps file metadata collection (owner, mode, hashes) and git-tracking checks pluggable so unit tests don't need real syscalls or a git binary.
func NewNPMRCDetector ¶
func NewNPMRCDetector(exec executor.Executor) *NPMRCDetector
NewNPMRCDetector returns a detector with default platform-specific metadata helpers wired in.
func (*NPMRCDetector) Detect ¶
func (d *NPMRCDetector) Detect(ctx context.Context, searchDirs []string, loggedInUser *user.User) model.NPMRCAudit
Detect runs the full audit. searchDirs are the dirs to walk for project- level .npmrc files (typically the user's $HOME plus any extra dirs configured by the operator). loggedInUser is the username whose ~/.npmrc we resolve for the user-scope file.
type PipConfigDetector ¶
type PipConfigDetector struct {
// contains filtered or unexported fields
}
PipConfigDetector performs the read-only pip config audit.
func NewPipConfigDetector ¶
func NewPipConfigDetector(exec executor.Executor) *PipConfigDetector
NewPipConfigDetector wires platform-specific hooks; tests override.