import { S3Location, RemoteType, CommitFilename, Callback, AbsoluteFilePath, AbsoluteDirectoryPath } from './Types'; import { CmdSpawner } from './CmdRunner'; import { MapFunc } from 'streamdash'; export interface MkdirP { (path: AbsoluteDirectoryPath, next: (e: Error | null) => void): void; } /** * The environment to pass when executing the command to segment, encrypt and * upload to S3 */ export interface Dependencies { unlink: (path: AbsoluteFilePath, next: Callback) => void; cmdSpawner: CmdSpawner; rename: (src: AbsoluteFilePath, dst: AbsoluteFilePath, next: Callback) => void; mkdirp: MkdirP; upload: (tmpDir: AbsoluteDirectoryPath, src: AbsoluteFilePath, loc: S3Location, next: Callback) => void; } export declare function getDependencies(rt: RemoteType): Dependencies; export interface R { (dependencies: Dependencies): MapFunc; getDependencies: (rt: RemoteType) => Dependencies; } declare let x: (({unlink, mkdirp, upload, rename, cmdSpawner}: Dependencies, configDir: string, s3Bucket: string, gpgKey: string, cmd: string) => (a: CommitFilename, mainNext: Callback) => void) & { getDependencies: (rt: RemoteType) => Dependencies; }; export default x;