84 lines
1.5 KiB
TypeScript
84 lines
1.5 KiB
TypeScript
export type TDapMountBackend = 'sshfs' | 'rclone';
|
|
|
|
export interface ISshConfigOptions {
|
|
homeDir?: string;
|
|
mainConfigPath?: string;
|
|
}
|
|
|
|
export interface ISshConfigFile {
|
|
filePath: string;
|
|
lines: string[];
|
|
}
|
|
|
|
export interface ISshConfigHost {
|
|
patterns: string[];
|
|
filePath: string;
|
|
startLine: number;
|
|
endLine: number;
|
|
options: Record<string, string[]>;
|
|
rawLines: string[];
|
|
dapManaged: boolean;
|
|
dapManagedName?: string;
|
|
}
|
|
|
|
export interface ISshConfigReadResult {
|
|
mainConfigPath: string;
|
|
files: ISshConfigFile[];
|
|
hosts: ISshConfigHost[];
|
|
}
|
|
|
|
export interface IHostDefinition {
|
|
alias: string;
|
|
hostName?: string;
|
|
user?: string;
|
|
port?: string;
|
|
identityFile?: string;
|
|
proxyJump?: string;
|
|
localForwards?: string[];
|
|
remoteForwards?: string[];
|
|
}
|
|
|
|
export interface IHostWriteResult {
|
|
changed: boolean;
|
|
backupPath?: string;
|
|
filePath: string;
|
|
}
|
|
|
|
export interface IHostUpdatePreview {
|
|
filePath: string;
|
|
before: string;
|
|
after: string;
|
|
diff: string;
|
|
dapManaged: boolean;
|
|
}
|
|
|
|
export interface ICommandResult {
|
|
exitCode: number;
|
|
stdout: string;
|
|
stderr: string;
|
|
}
|
|
|
|
export interface IMountRequest {
|
|
host: string;
|
|
remotePath: string;
|
|
localPath: string;
|
|
backend?: TDapMountBackend;
|
|
}
|
|
|
|
export interface IProxyRequest {
|
|
host: string;
|
|
localForward: string;
|
|
}
|
|
|
|
export interface IDoctorCheck {
|
|
name: string;
|
|
ok: boolean;
|
|
detail: string;
|
|
}
|
|
|
|
export interface IParsedArgs {
|
|
positional: string[];
|
|
flags: Record<string, string | boolean | Array<string | boolean>>;
|
|
passthrough: string[];
|
|
}
|