UNPKG

@graphql-hive/cli

Version:

A CLI util to manage and control your GraphQL Hive

131 lines • 4.78 kB
import { GraphQLError } from 'graphql'; import { InvalidDocument } from '@graphql-inspector/core'; import { CLIError } from '@oclif/core/lib/errors'; import { CompositionFailure } from '@theguild/federation-composition'; import { SchemaErrorConnection } from '../gql/graphql'; export declare enum ExitCode { SUCCESS = 0, ERROR = 1, TIMED_OUT = 2, BAD_INIT = 3 } export declare class HiveCLIError extends CLIError { readonly exitCode: ExitCode; constructor(exitCode: ExitCode, code: number, message: string); } export declare class InvalidConfigError extends HiveCLIError { constructor(configName?: string); } export declare class InvalidCommandError extends HiveCLIError { constructor(command: string); } export declare class MissingArgumentsError extends HiveCLIError { constructor(...requiredArgs: Array<[string, string]>); } export declare class MissingRegistryTokenError extends HiveCLIError { constructor(); } export declare class MissingCdnKeyError extends HiveCLIError { constructor(); } export declare class MissingEndpointError extends HiveCLIError { constructor(); } export declare class InvalidRegistryTokenError extends HiveCLIError { constructor(); } export declare class InvalidCdnKeyError extends HiveCLIError { constructor(); } export declare class MissingCdnEndpointError extends HiveCLIError { constructor(); } export declare class MissingEnvironmentError extends HiveCLIError { constructor(...requiredVars: Array<[string, string]>); } export declare class SchemaFileNotFoundError extends HiveCLIError { constructor(fileName: string, reason?: string | Error); } export declare class SchemaFileEmptyError extends HiveCLIError { constructor(fileName: string); } export declare class GithubCommitRequiredError extends HiveCLIError { constructor(); } export declare class GithubRepositoryRequiredError extends HiveCLIError { constructor(); } export declare class GithubAuthorRequiredError extends HiveCLIError { constructor(); } export declare class SchemaPublishFailedError extends HiveCLIError { constructor(); } export declare class HTTPError extends HiveCLIError { constructor(endpoint: string, status: number, message: string); } export declare class NetworkError extends HiveCLIError { constructor(cause: Error | string); } /** GraphQL Errors returned from an operation. Note that some GraphQL Errors that require specific steps to correct are handled through other error types. */ export declare class APIError extends HiveCLIError { ref?: string; constructor(cause: Error | string, requestId?: string); } export declare class IntrospectionError extends HiveCLIError { constructor(); } export declare class InvalidSDLError extends HiveCLIError { constructor(err: GraphQLError); } export declare class SchemaPublishMissingServiceError extends HiveCLIError { constructor(message: string); } export declare class SchemaPublishMissingUrlError extends HiveCLIError { constructor(message: string); } export declare class InvalidDocumentsError extends HiveCLIError { constructor(invalidDocuments: InvalidDocument[]); } export declare class ServiceAndUrlLengthMismatch extends HiveCLIError { constructor(services: string[], urls: string[]); } export declare class LocalCompositionError extends HiveCLIError { constructor(compositionResult: CompositionFailure); } export declare class RemoteCompositionError extends HiveCLIError { constructor(errors: SchemaErrorConnection); } export declare class InvalidCompositionResultError extends HiveCLIError { /** Compose API spits out the error message */ constructor(supergraph?: string | undefined | null); } export declare class PersistedOperationsMalformedError extends HiveCLIError { constructor(file: string); } export declare class UnsupportedFileExtensionError extends HiveCLIError { constructor(filename: string, supported?: string[]); } export declare class FileMissingError extends HiveCLIError { constructor(fileName: string, additionalContext?: string); } export declare class InvalidFileContentsError extends HiveCLIError { constructor(fileName: string, expectedFormat: string); } export declare class InvalidTargetError extends HiveCLIError { constructor(); } export declare class SchemaNotFoundError extends HiveCLIError { constructor(actionId?: string); } export declare class InvalidSchemaError extends HiveCLIError { constructor(actionId?: string); } export declare class UnexpectedError extends HiveCLIError { constructor(cause: unknown); } export interface AggregateError extends Error { errors: Error[]; } export declare function isAggregateError(error: unknown): error is AggregateError; //# sourceMappingURL=errors.d.ts.map