UNPKG

@adpt/cli

Version:
100 lines 2.97 kB
import { Constructor, Message, MessageClient, MessageLogger, MessageSummary } from "@adpt/utils"; export interface AdaptModule { ProjectCompileError: Constructor<Error>; ProjectRunError: Constructor<ProjectRunError>; listDeployments(options: ListOptions): Promise<ListResponse>; createDeployment(options: CreateOptions): Promise<DeployState>; destroyDeployment(options: DestroyOptions): Promise<ApiResponse>; updateDeployment(options: UpdateOptions): Promise<DeployState>; fetchStatus(options: StatusOptions): Promise<DeployState>; } export declare function verifyAdaptModule(val: unknown): AdaptModule; export interface ProjectRunError extends Error { projectError: Error; projectStack: string; fullStack: string; } export interface ApiResponse { type: "success" | "error" | string; messages: ReadonlyArray<Message>; summary: MessageSummary; } export interface ApiSuccess { type: "success"; messages: ReadonlyArray<Message>; summary: MessageSummary; } export declare type DeployState = DeploySuccess | DeployError; export interface DeploySuccess extends ApiResponse { type: "success"; domXml: string; stateJson: string; needsData: ObserversThatNeedData; deployID: string; mountedOrigStatus: any; } export interface DeployError extends ApiResponse { type: "error"; deployID?: string; domXml?: string; stateJson?: string; } export declare function verifyDeployState(val: any): DeployState; export interface WithLogger { client?: MessageClient; logger?: MessageLogger; loggerId?: string; } export interface DeployCommonOptions extends WithLogger { adaptUrl: string; fileName: string; debug?: string; dryRun?: boolean; projectRoot?: string; } interface Variables { [n: string]: any; } interface PodExecutedQuery { query: string; variables?: Variables; } export interface ObserversThatNeedData { [name: string]: PodExecutedQuery[]; } export declare function verifyMessages(val: any): Message[]; export interface DeploymentInfo { deployID: string; } export interface ListOptions extends WithLogger { adaptUrl: string; } export interface ListResponse extends ApiResponse { type: "success"; deployments: DeploymentInfo[]; } export interface CreateOptions extends DeployCommonOptions { projectName: string; stackName: string; deployID?: string; initLocalServer?: boolean; initialStateJson?: string; initialObservationsJson?: string; } export interface UpdateOptions extends DeployCommonOptions { deployID: string; prevStateJson?: string; observationsJson?: string; stackName?: string; } export interface DestroyOptions extends WithLogger { adaptUrl: string; deployID: string; debug?: string; dryRun?: boolean; } export interface StatusOptions extends DeployCommonOptions { deployID: string; } export {}; //# sourceMappingURL=adapt_shared.d.ts.map