@wocker/core
Version:
Core of the Wocker
58 lines (57 loc) • 1.6 kB
TypeScript
import { PickProperties } from "../types/PickProperties";
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 declare const PRESET_SOURCE_INTERNAL: "internal";
export declare const PRESET_SOURCE_EXTERNAL: "external";
export declare const PRESET_SOURCE_GITHUB: "github";
export type PresetSource = typeof PRESET_SOURCE_INTERNAL | typeof PRESET_SOURCE_EXTERNAL | typeof PRESET_SOURCE_GITHUB;
export {};