UNPKG

@sprucelabs/spruce-cli

Version:

Command line interface for building Spruce skills.

63 lines (62 loc) 3.05 kB
import LintService from '../../services/LintService'; import StaticTestFinder from './StaticTestFinder'; import { StaticToInstanceTestFileMigrator } from './StaticToInstanceTestFileMigrator'; export default class StaticToInstanceMigratorImpl implements StaticToInstanceMigrator { static diskUtil: { 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; detectProjectLanguage(cwd: string): import("@sprucelabs/spruce-skill-utils").ProjectLanguage; 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: StaticToInstanceMigratorOptions) => StaticToInstanceMigrator; private testFinder; private testFileMigrator; private lintService; protected constructor(options: StaticToInstanceMigratorOptions); static Migrator(options: StaticToInstanceMigratorOptions): StaticToInstanceMigrator; run(lookupDir: string): Promise<{ totalTestsUpdated: number; totalTestsSkipped: number; }>; private readFile; private writeFile; } export interface StaticToInstanceMigratorOptions { testFinder: StaticTestFinder; testFileMigrator: StaticToInstanceTestFileMigrator; lintService: LintService; } export interface StaticToInstanceMigratorResults { totalTestsUpdated: number; totalTestsSkipped: number; } export interface StaticToInstanceMigrator { run(lookupDir: string): Promise<StaticToInstanceMigratorResults>; }