import * as command from '@oclif/command'; import { Manager, IPackageInstalled } from '@shockpkg/core'; import { ProgressCallback } from './progress'; declare const CommandBase: typeof command.Command; export declare const flags: typeof command.flags; export declare const run: typeof command.run; /** * Command constructor. */ export declare abstract class Command extends CommandBase { /** * Init function. * * @returns Return data. */ init(): Promise; /** * Custom error handler function. * * @param err Error value. * @returns Return data if present. */ catch(err: any): Promise; /** * Get the update interval. * * @returns Update interval. */ protected _updateInterval(): number; /** * Check if the shell is interactive. * * @returns True if interactive shell, else false. */ protected _isInteractive(): boolean; /** * Transfer seconds human readable. * * @param ms Miliseconds 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; /** * Run an async function with a manager instance. * * @param handler Handler function. * @returns Return value of the handler function. */ protected _manager(handler: (manager: Manager) => Promise): Promise; /** * Install events for reporting install progress. * * @param manager Manager instance. * @param reason Install reason. */ protected _installEvents(manager: Manager, reason: string): void; /** * Count install report categories. * * @param report Report list. * @returns Report counts. */ protected _installReportCounts(report: IPackageInstalled[]): { installed: number; skipped: number; }; /** * Shared install command runner. * * @param packages Pacakges list. * @param method Install method. */ protected _commandInstall(packages: string[], method: string): Promise; /** * Shared upgrade command runner. * * @param method Install method. */ protected _commandUpgrade(method: string): Promise; } export {};