UNPKG

@enspirit/emb

Version:

A replacement for our Makefile-for-monorepos

140 lines (139 loc) 3.13 kB
/** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export type Identifier = string; export type TaskConfig = TaskConfig1 & { description?: string; script?: string; executor?: Identifier; options?: { [k: string]: unknown; }; pre?: Identifier[]; /** * Variables to pass onto the task */ vars?: { [k: string]: string; }; }; export type TaskConfig1 = { [k: string]: unknown; }; export type ResourceConfig = { [k: string]: unknown; } & { type: string; params?: unknown; dependencies?: QualifiedIdentifier[]; }; export type QualifiedIdentifier = string; export type JsonPatchOperation = JsonPatchAddOperation | JsonPatchRemoveOperation | JsonPatchReplaceOperation | JsonPatchMoveOperation | JsonPatchCopyOperation; export interface EMBConfig { project: { /** * The name of the project. */ name: string; /** * The root directory of the project. */ rootDir?: string; }; plugins?: { name: Identifier; config?: unknown; }[]; /** * Variables to install on the environment */ env?: { [k: string]: string; }; /** * Variables that will be accessible for string expansion */ vars?: { [k: string]: unknown; }; defaults?: DefaultsConfig; components?: { [k: string]: ComponentConfig; }; flavors?: { [k: string]: ProjectFlavorConfig; }; tasks?: { [k: string]: TaskConfig; }; } /** * Default settings for build aspects */ export interface DefaultsConfig { /** * Default docker build settings */ docker?: { tag?: string; target?: Identifier; buildArgs?: { [k: string]: string; }; labels?: { [k: string]: string; }; [k: string]: unknown; }; } export interface ComponentConfig { /** * Path to the component's root folder (relative to root of monorepo) */ rootDir?: string; /** * A description of the component. */ description?: string; tasks?: { [k: string]: TaskConfig; }; resources?: { [k: string]: ResourceConfig; }; flavors?: { [k: string]: ComponentFlavorConfig; }; } export interface ComponentFlavorConfig { patches?: JsonPatchOperation[]; } export interface JsonPatchAddOperation { op: "add"; path: string; value: unknown; } export interface JsonPatchRemoveOperation { op: "remove"; path: string; } export interface JsonPatchReplaceOperation { op: "replace"; path: string; value: unknown; } export interface JsonPatchMoveOperation { op: "move"; path: string; from: string; } export interface JsonPatchCopyOperation { op: "copy"; path: string; from: string; } export interface ProjectFlavorConfig { patches?: JsonPatchOperation[]; }