/** * @param {import('#types').TransportConfig} host * @returns {string} */ export function sshDestination(host: import("#types").TransportConfig): string; /** * @param {import('#types').TransportConfig} host * @param {string} command * @param {string} [identityAgent] * @returns {string[]} */ export function sshArgs(host: import("#types").TransportConfig, command: string, identityAgent?: string): string[]; /** * Builds the Rampway-owned verification profile shared by direct deployment * SSH and Git's SSH child process. * * @param {import('#types').TransportConfig} host * @returns {string[]} */ export function sshHostVerificationArgs(host: import("#types").TransportConfig): string[]; /** * @param {import('#types').TransportConfig} host * @param {string} [identityAgent] * @returns {string} */ export function gitSshCommand(host: import("#types").TransportConfig, identityAgent?: string): string; /** * @param {unknown} value * @returns {string} */ export function shellQuote(value: unknown): string; /** * @param {unknown} key * @returns {string} */ export function shellEnvKey(key: unknown): string; /** * @param {unknown} key * @returns {string} */ export function shellEnvName(key: unknown): string; /** * @param {unknown} value * @returns {string} */ export function remotePath(value: unknown): string; export class SshTransport { /** * @param {import('#types').StageConfig} stage * @param {import('../core/reporter.js').Reporter} [reporter] * @returns {SshTransport} */ static fromStage(stage: import("#types").StageConfig, reporter?: import("../core/reporter.js").Reporter): SshTransport; /** * @param {{host: import('#types').TransportConfig, reporter?: import('../core/reporter.js').Reporter, env?: Record, spawnProcess?: typeof spawnOwnedProcess}} opts */ constructor({ host, reporter, env, spawnProcess }: { host: import("#types").TransportConfig; reporter?: import("../core/reporter.js").Reporter; env?: Record; spawnProcess?: typeof spawnOwnedProcess; }); /** @type {import('#types').TransportConfig} */ host: import("#types").TransportConfig; /** @type {import('../core/reporter.js').Reporter} */ reporter: import("../core/reporter.js").Reporter; env: Record | undefined; spawnProcess: typeof import("node:child_process").spawn; /** * @param {string} targetPath * @returns {Promise} */ mkdirp(targetPath: string): Promise; /** * @param {string} targetPath * @returns {Promise} */ exists(targetPath: string): Promise; /** * @param {string} target * @param {string} linkPath * @returns {Promise} */ symlink(target: string, linkPath: string): Promise; /** * @param {string} linkPath * @returns {Promise} */ readlink(linkPath: string): Promise; /** * @param {string} targetPath * @returns {Promise} */ realpath(targetPath: string): Promise; /** * @param {string} targetPath * @returns {Promise} */ isDirectory(targetPath: string): Promise; /** * Returns non-following filesystem metadata for integrity-sensitive walks. * * @param {string} targetPath * @returns {Promise<{isDirectory: () => boolean, isFile: () => boolean, isSymbolicLink: () => boolean}|undefined>} */ stat(targetPath: string): Promise<{ isDirectory: () => boolean; isFile: () => boolean; isSymbolicLink: () => boolean; } | undefined>; /** * @param {string} targetPath * @returns {Promise} */ rm(targetPath: string): Promise; /** * @param {string} from * @param {string} to * @returns {Promise} */ rename(from: string, to: string): Promise; /** * @param {string} filePath * @param {string} content * @returns {Promise} */ writeFile(filePath: string, content: string): Promise; /** * @param {string} filePath * @param {string} content * @returns {Promise} */ writeFileExclusive(filePath: string, content: string): Promise; /** * @param {string} filePath * @param {string} expectedContent * @returns {Promise} */ removeFileIfContent(filePath: string, expectedContent: string): Promise; /** * @param {string} filePath * @returns {Promise} */ readFile(filePath: string): Promise; /** * @param {string} filePath * @returns {Promise} */ readFileBuffer(filePath: string): Promise; /** * @param {string} targetPath * @returns {Promise} */ list(targetPath: string): Promise; /** * Lists exact entry names for integrity-sensitive directory walks. * * @param {string} targetPath * @returns {Promise} */ listDirectory(targetPath: string): Promise; /** * @param {string} from * @param {string} to * @param {{exclude?: string[]}} [opts] * @returns {Promise} */ copyDir(from: string, to: string, opts?: { exclude?: string[]; }): Promise; /** * @param {string} command * @param {{cwd?: string, env?: Record, secretEnv?: Record}} [opts] * @returns {Promise} */ run(command: string, { cwd, env, secretEnv }?: { cwd?: string; env?: Record; secretEnv?: Record; }): Promise; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForMkdirp(targetPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForExists(targetPath: string): import("#types").CommandPlan; /** * @param {string} target * @param {string} linkPath * @returns {import('#types').CommandPlan} */ commandPlanForSymlink(target: string, linkPath: string): import("#types").CommandPlan; /** * @param {string} linkPath * @returns {import('#types').CommandPlan} */ commandPlanForReadlink(linkPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForRealpath(targetPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForIsDirectory(targetPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForStat(targetPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForRm(targetPath: string): import("#types").CommandPlan; /** * @param {string} from * @param {string} to * @returns {import('#types').CommandPlan} */ commandPlanForRename(from: string, to: string): import("#types").CommandPlan; /** * @param {string} filePath * @returns {import('#types').CommandPlan} */ commandPlanForWriteFile(filePath: string): import("#types").CommandPlan; /** * @param {string} filePath * @returns {import('#types').CommandPlan} */ commandPlanForWriteFileExclusive(filePath: string): import("#types").CommandPlan; /** * @param {string} filePath * @returns {import('#types').CommandPlan} */ commandPlanForRemoveFileIfContent(filePath: string): import("#types").CommandPlan; /** * @param {string} filePath * @returns {import('#types').CommandPlan} */ commandPlanForReadFile(filePath: string): import("#types").CommandPlan; /** * @param {string} filePath * @returns {import('#types').CommandPlan} */ commandPlanForReadFileBuffer(filePath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForList(targetPath: string): import("#types").CommandPlan; /** * @param {string} targetPath * @returns {import('#types').CommandPlan} */ commandPlanForListDirectory(targetPath: string): import("#types").CommandPlan; /** * @param {string} from * @param {string} to * @param {{exclude?: string[]}} [opts] * @returns {import('#types').CommandPlan} */ commandPlanForCopyDir(from: string, to: string, { exclude }?: { exclude?: string[]; }): import("#types").CommandPlan; /** * @param {string} command * @param {{cwd?: string, env?: Record}} [opts] * @returns {import('#types').CommandPlan} */ commandPlanForRun(command: string, { cwd, env }?: { cwd?: string; env?: Record; }): import("#types").CommandPlan; /** * @param {string} command * @param {{cwd?: string, env?: Record, secretEnv: Record}} opts * @returns {string} */ scriptForSecretRun(command: string, { cwd, env, secretEnv }: { cwd?: string; env?: Record; secretEnv: Record; }): string; /** * @param {string} command * @returns {import('#types').CommandPlan} */ remoteCommandPlan(command: string): import("#types").CommandPlan; /** * @param {import('#types').CommandPlan} plan * @param {{input?: string, stream?: boolean, knownSecrets?: string[]}} [opts] * @returns {Promise} */ runCommandPlan(plan: import("#types").CommandPlan, { input, stream, knownSecrets }?: { input?: string; stream?: boolean; knownSecrets?: string[]; }): Promise; /** * @param {import('#types').CommandPlan} plan * @param {{stream?: boolean}} [opts] * @returns {Promise} */ runPipedCommandPlan(plan: import("#types").CommandPlan, { stream }?: { stream?: boolean; }): Promise; } import { spawnOwnedProcess } from "../core/owned-process-tree.js"; //# sourceMappingURL=ssh-transport.d.ts.map