/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ import { Command, ReferenceToCommand, ResolvedCommand } from './command.js'; import { LitConsole } from './console.js'; export type { Command, ResolvedCommand, ReferenceToCommand } from './command.js'; export interface Options { cwd: string; console?: LitConsole; stdin?: NodeJS.ReadableStream; } export declare class LitCli { readonly commands: Map; readonly args: readonly string[]; readonly console: LitConsole; /** The current working directory. */ readonly cwd: string; private readonly stdin; private skipPermissions; constructor(args: string[], options: Options); addCommand(command: Command): void; run(): Promise; getCommand(commands: Map, args: ReadonlyArray, parentCommandNames?: Array): Promise<{ commandName: string; command: ResolvedCommand; argv: string[]; } | { invalidCommand: string; } | { commandNotInstalled: boolean; }>; resolveImportForReference(reference: ReferenceToCommand): string | undefined; private loadCommandFromPath; resolveCommandAsMuchAsPossible(reference: Command): Promise; resolveCommandAndMaybeInstallNeededDeps(maybeReference: Command): Promise; private installDepWithPermission; private getPermissionToInstall; }