@enspirit/emb
Version:
A replacement for our Makefile-for-monorepos
140 lines (139 loc) • 3.13 kB
TypeScript
/**
* 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?: {
[]: unknown;
};
pre?: Identifier[];
/**
* Variables to pass onto the task
*/
vars?: {
[]: string;
};
};
export type TaskConfig1 = {
[]: unknown;
};
export type ResourceConfig = {
[]: 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?: {
[]: string;
};
/**
* Variables that will be accessible for string expansion
*/
vars?: {
[]: unknown;
};
defaults?: DefaultsConfig;
components?: {
[]: ComponentConfig;
};
flavors?: {
[]: ProjectFlavorConfig;
};
tasks?: {
[]: TaskConfig;
};
}
/**
* Default settings for build aspects
*/
export interface DefaultsConfig {
/**
* Default docker build settings
*/
docker?: {
tag?: string;
target?: Identifier;
buildArgs?: {
[]: string;
};
labels?: {
[]: 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?: {
[]: TaskConfig;
};
resources?: {
[]: ResourceConfig;
};
flavors?: {
[]: 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[];
}