zippycli
Version:
An unofficial Zippyshare CLI
59 lines (58 loc) • 1.65 kB
TypeScript
import { Command as CommandBase } from '@oclif/command';
import { ProgressCallback } from './progress';
import { IRequestFactory } from './request';
/**
* Command constructor.
*/
export declare abstract class Command extends CommandBase {
/**
* Init function.
*
* @returns Returns the parent init.
*/
init(): Promise<any>;
/**
* Check if the shell is interactive.
*
* @returns True if interactive shell, else false.
*/
protected _isInteractive(): boolean;
/**
* Init a request factory with the specified timeout.
*
* @param timeout Timeout duraction in milliseconds.
* @returns Request factory.
*/
protected _initRequest(timeout?: number): IRequestFactory;
/**
* Read input file to list all URL's line by line.
*
* @param filepath Input file.
* @returns URL list.
*/
protected _readInputFile(filepath: string): Promise<string[]>;
/**
* Transfer seconds human readable.
*
* @param ms Milliseconds passed or null.
* @returns Formatted string.
*/
protected _transferSecondsHuman(ms: number | null): string;
/**
* Transfer bytes human readable.
*
* @param size Byte size.
* @returns Formatted string.
*/
protected _transferBytesHuman(size: number): string;
/**
* Init data transfer progress output function.
*
* @returns Progress update callback function.
*/
protected _transferProgressOutputInit(): ProgressCallback;
/**
* Clear data transfer progress output after.
*/
protected _transferProgressOutputAfter(): void;
}