/** The npm package this CLI ships as. */ export declare const PACKAGE_NAME = "venice-video-harness"; /** * Where this copy of the CLI is running from. * * `npm-global` is the only kind `update` can replace on its own. A local * dependency is owned by a project's lockfile, and a source checkout would be * clobbered — both get instructions instead of an install. */ export type Install = { kind: 'npm-global'; packageDir: string; prefix: string; globalRoot: string; } | { kind: 'npm-local'; packageDir: string; projectDir: string; } | { kind: 'source'; packageDir: string; }; /** * Classify an install from its directory alone, so it stays testable across * platforms without touching the filesystem. * * npm's global tree is `/lib/node_modules` everywhere except Windows, * where it is `/node_modules` with the prefix being the `npm` * directory itself. Anything else under a `node_modules` is a project * dependency; anything not under one is a checkout. */ export declare function classifyInstall(packageDir: string, platform?: NodeJS.Platform): Install; /** * Walk up from `startDir` to the directory holding this package's own * `package.json`. Walking beats a fixed `../..` because it survives the file * being moved between `src/` and a deeper build layout. */ export declare function resolvePackageDir(startDir: string): string; /** Classify the install this process is running from. */ export declare function currentInstall(): Install; /** Version recorded in a package directory, or undefined if unreadable. */ export declare function readInstalledVersion(packageDir: string): string | undefined; /** * Semver ordering, enough of it for release comparison: numeric triplet first, * then prerelease rules (a release outranks its own prereleases, numeric * identifiers sort below alphanumeric ones). */ export declare function compareVersions(a: string, b: string): number; /** Registry to query. Overridable so tests can serve their own metadata. */ export declare function registryUrl(): string; /** Resolve a dist-tag (`latest`, `next`, …) to a published version. */ export declare function fetchPublishedVersion(tag?: string, options?: { packageName?: string; registry?: string; timeoutMs?: number; }): Promise; export interface NpmInvocation { command: string; args: string[]; usesShell: boolean; } /** * Build the install command for a global install. * * npm ships inside the same global tree, so it can usually be run as a script * under the current Node — no shell, no PATH lookup, no chance of picking a * different npm than the one that owns this prefix. */ export declare function npmInvocation(install: Extract, spec: string, options?: { platform?: NodeJS.Platform; exists?: (path: string) => boolean; nodePath?: string; }): NpmInvocation; /** * Declared by the interactive shell, which runs commands in-process and keeps * lazily importing from this package for the life of the session. Overwriting * those files underneath it would leave one process running two versions. */ export declare function markSessionActive(): void; export declare function isSessionActive(): boolean; /** Run the install, streaming npm's output straight through. */ export declare function runInstall(invocation: NpmInvocation): number; /** What to do when `update` cannot install for you. */ export declare function manualUpdateInstructions(install: Install): string[]; //# sourceMappingURL=update.d.ts.map