import type { Diagnostic, Graph, Manifest, OverrideConstraint } from '../graph.js'; import type { ObserveOptions, OperationSources } from './operation.js'; export type FormatId = 'yarn-berry-v4' | 'yarn-berry-v5' | 'yarn-berry-v6' | 'yarn-berry-v7' | 'yarn-berry-v8' | 'yarn-berry-v9' | 'yarn-berry-v10' | 'yarn-classic' | 'npm-1' | 'npm-2' | 'npm-3' | 'npm-4' | 'pnpm-v5' | 'pnpm-v6' | 'pnpm-v9' | 'bun-text' | 'bun-text-v2' | 'deno-v2' | 'deno-v3' | 'deno-v4' | 'deno-v5' | 'lockgraph'; export type DenoFormatId = Extract; export type YarnBerryFormatId = Extract; export type BunTextFormatId = Extract; export declare function isBunTextFormat(format: string): format is BunTextFormatId; export declare function isDenoFormat(format: string): format is DenoFormatId; export interface ParseOptions extends ObserveOptions { cwd?: string; registry?: string; sources?: Pick; workspaceRoot?: string; manifests?: Record; overrides?: OverrideConstraint[]; onDiagnostic?: (diagnostic: Diagnostic) => void; } export interface StringifyOptions extends ObserveOptions { strict?: boolean; lineEnding?: 'lf' | 'crlf'; sources?: Pick; cacheKey?: string; overrides?: OverrideConstraint[]; onDiagnostic?: (diagnostic: Diagnostic) => void; } export interface FormatAdapterContract { readonly check: (input: string) => boolean; readonly parse: (input: string, context: ParseContext) => Graph; readonly stringify: (graph: Graph, context: StringifyContext) => string; }