import type { SourceFile } from "@typespec/compiler"; export interface CliHost { logger: Logger; /** read a file at the given url. */ readUrl(url: string): Promise; /** * Write the file. * @param path Path to the file. * @param content Content of the file. */ writeFile(path: string, content: string): Promise; /** * Read directory. * @param path Path to the directory. * @returns list of file/directory in the given directory. Returns the name not the full path. */ readDir(path: string): Promise; /** * Deletes a directory or file. * @param path Path to the directory or file. */ rm(path: string, options?: RmOptions): Promise; /** * create directory recursively. * @param path Path to the directory. */ mkdirp(path: string): Promise; } export interface RmOptions { /** * If `true`, perform a recursive directory removal. In * recursive mode, errors are not reported if `path` does not exist, and * operations are retried on failure. * @default false */ recursive?: boolean; } export interface Logger { trace(message: string): void; warn(message: string): void; error(message: string): void; } export interface CliHostArgs {}