@sprucelabs/spruce-cli
Version:
Command line interface for building Spruce skills.
49 lines (48 loc) • 2.23 kB
TypeScript
export default class EsLint9Migrator implements Migrator {
static disk: {
writeFile(destination: string, contents: string | NodeJS.ArrayBufferView): void;
readDir(destination: string): string[];
readFile(source: string): string;
deleteFile(destination: string): void;
createDir(destination: string): void;
moveDir(source: string, destination: string): void;
moveFile(source: string, destination: string): void;
copyDir(source: string, destination: string): Promise<unknown>;
deleteDir(target: string): void;
doesFileExist(target: string): boolean;
isDir(target: string): boolean;
isDirPath(path: string): boolean;
isFile(target: string): boolean;
doesDirExist(target: string): boolean;
resolveHashSprucePath(cwd: string, ...filePath: string[]): string;
doesHashSprucePathExist(cwd: string, ...filePath: string[]): boolean;
resolveBuiltHashSprucePath(cwd: string, ...filePath: string[]): string;
doesBuiltHashSprucePathExist(cwd: string, ...filePath: string[]): boolean;
isFileDifferent(destination: string, contents: string): boolean;
deleteEmptyDirs(dir: string): void;
resolvePath(cwd: string, ...filePath: string[]): string;
resolveRelativePath(path1: string, path2: string): string;
resolveFile(...pathItems: string[]): string | false;
createTempDir(...files: string[]): string;
createRandomTempDir(): string;
hasFileChanged(...filePath: string[]): boolean;
markFileAsUnchanged(...filePath: string[]): void;
resolveCacheDirForDir(dir: string): string;
resolveFileInHashSpruceDir(cwd: string, ...filePath: string[]): string;
getFileChangedCacheFile(file: string): string;
};
static Class?: new (options: MigratorOptions) => Migrator;
private cwd;
private constructor();
static Migrator(options: MigratorOptions): Migrator;
migrate(): Promise<void>;
private updateVsCodeSettingsIfExists;
private deleteFileIfExists;
private get disk();
}
export interface Migrator {
migrate(): Promise<void>;
}
export interface MigratorOptions {
cwd: string;
}