UNPKG

@wocker/core

Version:
59 lines (58 loc) 2.18 kB
import { EnvConfig } from "../../../types"; import { ServiceProperties, ProjectType, ProjectV1 } from "../types"; export declare class Project { /** @deprecated */ id?: string; name: string; type: ProjectType; path: string; cmd?: string[]; imageName?: string; dockerfile?: string; composefile?: string; preset?: string; presetMode?: "global" | "project"; scripts?: { [script: string]: string; }; services: { [name: string]: ServiceProperties; }; buildArgs: EnvConfig; env: EnvConfig; metadata: EnvConfig; ports: string[]; extraHosts: EnvConfig; volumes: string[]; constructor(data: ProjectV1); get containerName(): string; get domains(): string[]; hasDomain(domain: string): boolean; addDomain(addDomain: string): void; removeDomain(removeDomain: string): void; clearDomains(): void; linkPort(hostPort: number, containerPort: number): void; unlinkPort(hostPort: number, containerPort: number): void; setBuildArg(name: string, value: string, service?: string): void; unsetBuildArg(name: string, service?: string): void; hasEnv(name: string): boolean; getEnv(name: string, defaultValue?: string): string | undefined; setEnv(name: string, value: string | boolean, service?: string): void; unsetEnv(name: string, service?: string): void; hasMeta(name: string): boolean; getMeta<D = string | undefined>(name: string, defaultValue?: D): D; setMeta(name: string, value: string | boolean): void; unsetMeta(name: string): void; getVolumeBySource(source: string): string | undefined; getVolumeByDestination(destination: string): string | undefined; volumeMount(...volumes: string[]): void; volumeUnmount(...volumes: string[]): void; addExtraHost(host: string, domain: string): void; removeExtraHost(host: string): void; getSecret(key: string): Promise<string | undefined>; getSecret(key: string, byDefault: string): Promise<string>; setSecret(key: string, value: string): Promise<void>; unsetSecret(key: string): Promise<void>; save(): void; toObject(): ProjectV1; }