UNPKG

@emigrate/cli

Version:

Emigrate is a tool for managing database migrations. It is designed to be simple yet support advanced setups, modular and extensible.

66 lines 3.5 kB
import { type SerializedError, type MigrationMetadata, type FailedMigrationMetadata, type FailedMigrationHistoryEntry } from '@emigrate/types'; export declare const toError: (error: unknown) => Error; export declare const toSerializedError: (error: unknown) => SerializedError; export declare class EmigrateError extends Error { code?: string | undefined; constructor(message: string | undefined, options?: ErrorOptions, code?: string | undefined); } export declare class ShowUsageError extends EmigrateError { } export declare class MissingOptionError extends ShowUsageError { option: string | string[]; static fromOption(option: string | string[]): MissingOptionError; constructor(message: string | undefined, options?: ErrorOptions, option?: string | string[]); } export declare class MissingArgumentsError extends ShowUsageError { argument: string; static fromArgument(argument: string): MissingArgumentsError; constructor(message: string | undefined, options?: ErrorOptions, argument?: string); } export declare class OptionNeededError extends ShowUsageError { option: string; static fromOption(option: string, message: string): OptionNeededError; constructor(message: string | undefined, options?: ErrorOptions, option?: string); } export declare class BadOptionError extends ShowUsageError { option: string; static fromOption(option: string, message: string): BadOptionError; constructor(message: string | undefined, options?: ErrorOptions, option?: string); } export declare class UnexpectedError extends EmigrateError { constructor(message: string | undefined, options?: ErrorOptions); } export declare class MigrationHistoryError extends EmigrateError { static fromHistoryEntry(entry: FailedMigrationHistoryEntry): MigrationHistoryError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class MigrationLoadError extends EmigrateError { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationLoadError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class MigrationRunError extends EmigrateError { static fromMetadata(metadata: FailedMigrationMetadata): MigrationRunError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class MigrationNotRunError extends EmigrateError { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationNotRunError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class MigrationRemovalError extends EmigrateError { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationRemovalError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class StorageInitError extends EmigrateError { static fromError(error: Error): StorageInitError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class CommandAbortError extends EmigrateError { static fromSignal(signal: NodeJS.Signals): CommandAbortError; static fromReason(reason: string, cause?: unknown): CommandAbortError; constructor(message: string | undefined, options?: ErrorOptions); } export declare class ExecutionDesertedError extends EmigrateError { static fromReason(reason: string, cause?: Error): ExecutionDesertedError; constructor(message: string | undefined, options?: ErrorOptions); } //# sourceMappingURL=errors.d.ts.map