@sprucelabs/spruce-cli
Version:
Command line interface for building Spruce skills.
49 lines (48 loc) • 1.95 kB
TypeScript
import FeatureInstaller from '../../features/FeatureInstaller';
import { InstallFeature } from '../../features/features.types';
import { GlobalEmitter } from '../../GlobalEmitter';
import ServiceFactory, { ServiceProvider, Service, ServiceMap } from '../../services/ServiceFactory';
import { ApiClientFactory } from '../../types/apiClient.types';
import { CliBootOptions, CliInterface, GraphicsInterface } from '../../types/cli.types';
export default class FeatureFixture implements ServiceProvider {
private cwd;
private installedSkills;
private serviceFactory;
private static linkedUtils;
private static dirsToDelete;
private ui;
private generateCacheIfMissing;
private apiClientFactory;
private emitter?;
private featureInstaller?;
constructor(options: FeatureFixtureOptions);
static deleteOldSkillDirs(): void;
Service<S extends Service>(type: S, cwd?: string | undefined): ServiceMap[S];
Cli(options?: CliBootOptions): Promise<CliInterface>;
private linkWorkspacePackages;
installCachedFeatures(cacheKey: string, bootOptions?: CliBootOptions): Promise<CliInterface>;
installFeatures(features: InstallFeature[], cacheKey?: string, bootOptions?: CliBootOptions): Promise<CliInterface>;
private isCached;
linkLocalPackages(): Promise<void>;
private copyCachedSkillToCwd;
private addCwdToCacheTracker;
private removeCwdFromCacheTracker;
private writeCacheSettings;
private doesCacheExist;
loadCacheTracker(): Record<string, any>;
getTestCacheTrackerFilePath(): string;
private cacheCli;
}
export interface CachedCli {
cli: CliInterface;
cwd: string;
}
export interface FeatureFixtureOptions {
cwd: string;
serviceFactory: ServiceFactory;
ui: GraphicsInterface;
shouldGenerateCacheIfMissing?: boolean;
apiClientFactory: ApiClientFactory;
emitter?: GlobalEmitter;
featureInstaller?: FeatureInstaller;
}