UNPKG

histoire

Version:

A fast story book powered by Vite

15 lines • 1.03 kB
import type { JobState } from '@histoire/shared'; import type { RegistryOptions } from '../catalog/registry.js'; import type { CatalogContext } from '../catalog/service.js'; /** Parsed external package-manager failure and optional peer context. */ export interface ParsedFailure { /** Locked public failure category. */ code: NonNullable<JobState['failure']>['code']; /** Short sanitized user-facing error. */ message: string; /** Unmet peer package. */ peer?: string; /** Actual peer version in the project. */ found?: string; } /** Recognizes common pnpm/npm/yarn/bun codes without exposing raw stderr as UI copy. */ export declare function parseFailure(output: string): ParsedFailure; /** Selects the newest validated stable release accepting the actual unmet peer version. */ export declare function suggestVersion(context: CatalogContext | string, id: string, failure: ParsedFailure, options?: RegistryOptions): Promise<NonNullable<JobState['failure']>['suggestion']>; //# sourceMappingURL=failure.d.ts.map