@wocker/core
Version:
Core of the Wocker
54 lines (53 loc) • 1.32 kB
TypeScript
import { PickProperties, PresetSource } from "../../../types";
type TextOption = {
type: "text" | "string" | "number" | "int" | "password";
message?: string;
default?: string | number;
};
type ConfirmOption = {
type: "boolean";
message?: string;
required?: boolean;
default?: boolean;
};
type SelectOption = {
type: "select";
required?: boolean;
multiple?: boolean;
options: string[] | {
label?: string;
value: string;
}[] | {
[name: string]: string;
};
message?: string;
default?: string;
};
export type PresetVariableConfig = TextOption | ConfirmOption | SelectOption;
export type PresetProperties = PickProperties<Preset>;
export declare abstract class Preset {
name: string;
source?: PresetSource;
version: string;
type?: string;
image?: string;
dockerfile?: string;
buildArgsOptions?: {
[name: string]: PresetVariableConfig;
};
envOptions?: {
[name: string]: PresetVariableConfig;
};
path?: string;
volumes?: string[];
volumeOptions?: string[];
protected constructor(data: PresetProperties);
abstract save(): void;
abstract delete(): void;
/**
* @deprecated
*/
toJSON(): PresetProperties;
toObject(): PresetProperties;
}
export {};