UNPKG

@capgo/cli

Version:
62 lines (61 loc) 3.3 kB
import { getPMAndCommand } from '../utils'; export declare const OUTDATED_DEPENDENCIES_ERROR = "Some dependencies are not up to date"; export interface OutdatedDependency { name: string; installed: string; latest: string; } export type DoctorUpdateChoice = 'capgo-only' | 'all' | 'skip'; interface DoctorInfoOptions { packageJson?: string; } export declare function parseDoctorPackageJsonPaths(packageJson?: string): string[] | undefined; export declare function resolveDoctorProjectRoot(packageJson?: string): string; export declare function groupOutdatedPackagesByPackageJson(packageJsonPaths: string[], packages: OutdatedDependency[], readDeclaredNames?: (packageJsonPath: string) => Set<string>): { packageJsonPath: string; packages: OutdatedDependency[]; }[]; export declare function shellQuotePath(path: string, shellPlatform?: NodeJS.Platform): string; export declare function formatDoctorInstallHint(projectRoot: string, installCommand: string, shellPlatform?: NodeJS.Platform): string; export declare function buildOutdatedInstallCommandsForDoctor(packageJson: string | undefined, packages: OutdatedDependency[], readDeclaredNames?: (packageJsonPath: string) => Set<string>, shellPlatform?: NodeJS.Platform): string; export declare function runOutdatedDependencyUpdatesForDoctor(packageJson: string | undefined, packages: OutdatedDependency[], readDeclaredNames?: (packageJsonPath: string) => Set<string>): void; export declare function getPMAndCommandForDir(projectRoot: string): { pm: import("@capgo/find-package-manager").PackageManagerType; command: import("@capgo/find-package-manager").InstallCommand; installCommand: string; runner: any; }; export interface DoctorRecoveryResult { recovered: boolean; remainingOutdated: OutdatedDependency[]; } export declare function listOutdatedDependencies(installed: Record<string, string>, latest: Record<string, string>): OutdatedDependency[]; export declare function partitionOutdatedDependencies(outdated: OutdatedDependency[]): { capgo: OutdatedDependency[]; other: OutdatedDependency[]; }; export declare function packagesForDoctorUpdateChoice(choice: DoctorUpdateChoice, capgo: OutdatedDependency[], other: OutdatedDependency[]): OutdatedDependency[]; export declare function buildOutdatedInstallCommand(pm: ReturnType<typeof getPMAndCommand>, packages: OutdatedDependency[]): string; export declare function runOutdatedDependencyUpdates(pm: ReturnType<typeof getPMAndCommand>, packages: OutdatedDependency[], projectRoot: string): void; export declare function computeDoctorAnalyticsTags(installed: Record<string, string>, latest: Record<string, string>): { is_outdated: boolean; dependency_count: number; outdated_count: number; }; export declare function getInfoInternal(options: DoctorInfoOptions, silent?: boolean): Promise<{ appName: string; appId: any; appVersion: any; webDir: string; installedDependencies: Record<string, string>; latestDependencies: Record<string, string>; }>; export declare function getInfo(options: DoctorInfoOptions): Promise<{ appName: string; appId: any; appVersion: any; webDir: string; installedDependencies: Record<string, string>; latestDependencies: Record<string, string>; }>; export {};