@adpt/cli
Version:
AdaptJS command line interface
41 lines • 1.75 kB
TypeScript
import * as pacote from "pacote";
import { yarn } from "@adpt/utils";
import { ExecaChildProcess } from "execa";
import { AdaptModule, CreateOptions, DeployState, StatusOptions, UpdateOptions } from "../types/adapt_shared";
import { VersionString } from "./gen";
export interface Session {
cacheDir: string;
projectDir: string;
remove?: () => void;
}
export interface ProjectOptionsComplete {
loglevel: yarn.LogLevel;
progress: boolean;
registry?: string;
session: Session;
}
export declare type ProjectOptions = Partial<ProjectOptionsComplete>;
export declare function load(projectSpec: string, projectOpts?: ProjectOptions): Promise<Project>;
export declare function projectAdaptModule(projectRoot: string): Promise<AdaptModule>;
export declare class Project {
readonly manifest: pacote.Manifest;
readonly projectDir: string;
readonly options: ProjectOptionsComplete;
readonly name: string;
private installed;
constructor(manifest: pacote.Manifest, projectDir: string, options: ProjectOptionsComplete);
getLockedVersion(pkgName: string): VersionString | null;
create(options: CreateOptions): Promise<DeployState>;
update(options: UpdateOptions): Promise<DeployState>;
status(options: StatusOptions): Promise<DeployState>;
/**
* NOTE: This function is purposely NOT async and returns the promise-like
* execa ChildProcess object, NOT a promise to that object. That gives
* the caller access to the output streams without having to wait for
* completion of the yarn process.
*/
installModules(): ExecaChildProcess<string> | undefined;
private deploy;
}
export declare function tempSession(): Promise<Session>;
//# sourceMappingURL=project.d.ts.map