snyk-go-plugin
Version:
Snyk CLI Golang plugin
88 lines (87 loc) • 1.87 kB
TypeScript
import type { DepGraph } from '@snyk/dep-graph';
export interface DepDict {
[name: string]: DepTree;
}
export interface DepTree {
name: string;
version?: string;
dependencies?: DepDict;
packageFormatVersion?: string;
_counts?: any;
_isProjSubpkg?: boolean;
}
export interface CountDict {
[k: string]: number;
}
export interface Options {
debug?: boolean;
file?: string;
args?: string[];
configuration?: {
includeGoStandardLibraryDeps?: boolean;
};
'print-graph'?: boolean;
}
export interface DepGraphResult {
plugin: PluginMetadata;
dependencyGraph: DepGraph;
}
export interface DepTreeResult {
plugin: PluginMetadata;
package: DepTree;
}
export interface PluginMetadata {
name: string;
runtime: string | undefined;
targetFile: any;
}
export interface GoPackage {
Dir: string;
ImportPath: string;
ImportComment?: string;
Name: string;
Doc?: string;
Target?: string;
Shlib?: string;
Goroot?: boolean;
Standard?: boolean;
Stale?: boolean;
StaleReason?: string;
Root?: string;
ConflictDir?: string;
BinaryOnly?: boolean;
ForTest?: string;
Export?: string;
Module?: GoModule;
Match?: string[];
DepOnly?: boolean;
Imports?: string[];
ImportMap: {
string: string;
};
Deps: string[];
TestImports: string[];
XTestImports: string[];
Incomplete: boolean;
Error: GoPackageError;
DepsErrors: GoPackageError[];
}
export interface GoModule {
Path: string;
Version: string;
Versions: string[];
Replace: GoModule;
Time: string;
Update: GoModule;
Main: boolean;
Indirect: boolean;
Dir: string;
GoMod: string;
Error: string;
}
interface GoPackageError {
ImportStack: string[];
Pos: string;
Err: string;
}
export {};