Skip to main content

Class: BuildContext

Defined in: buildContext.d.ts:7

Properties

PropertyTypeDescriptionDefined in
builderOptionsBuilderOptionsCommon options that are used by the builder components.buildContext.d.ts:11
customDataRecord<string, any>Custom data that can be used by the builder components.buildContext.d.ts:17
kubernetesResourceInfoKubernetesResourceInfoContains information about the API resources defined in the target cluster.buildContext.d.ts:14

Methods

addAdditionalFile()

Call Signature

addAdditionalFile(additionalFile): void;

Defined in: buildContext.d.ts:44

Adds given additional file to a DocumentGroup named "".

Checks for an existing DocumentGroup with name "" and adds the document to it if it exists. Creates a new DocumentGroup if it doesn't exist.

Parameters
ParameterType
additionalFileAdditionalFile
Returns

void

Call Signature

addAdditionalFile(documentGroupPath, additionalFile): void;

Defined in: buildContext.d.ts:52

Adds the given additional file to a DocumentGroup with the given name during the steps.generateResources step.

Checks for an existing DocumentGroup with the same name and adds the document to it if it exists. Creates a new DocumentGroup if it doesn't exist.

Parameters
ParameterType
documentGroupPathstring
additionalFileAdditionalFile
Returns

void


addDocument()

Call Signature

addDocument(document): void;

Defined in: buildContext.d.ts:25

Adds the given document to a DocumentGroup named "".

Checks for an existing DocumentGroup with name "" and adds the document to it if it exists. Creates a new DocumentGroup if it doesn't exist.

Parameters
ParameterType
documentDocument
Returns

void

Call Signature

addDocument(options): void;

Defined in: buildContext.d.ts:33

Adds a new document using the provided options during the steps.generateResources step.

Checks for an existing DocumentGroup with the same name as options.documentGroup and adds the document to it if it exists. Creates a new DocumentGroup if it doesn't exist.

Parameters
ParameterType
optionsNewDocumentOptions
Returns

void


addDocumentGroup()

addDocumentGroup(documentGroup): void;

Defined in: buildContext.d.ts:36

Adds given group to the document groups list.

Parameters

ParameterType
documentGroupDocumentGroup

Returns

void


getAllDocuments()

getAllDocuments(): Document[];

Defined in: buildContext.d.ts:64

Returns all documents inside all document groups.

Returns

Document[]


getAllDocumentsSorted()

getAllDocumentsSorted(): Document[];

Defined in: buildContext.d.ts:67

Returns all documents inside all document groups sorted by their file path.

Returns

Document[]


getDocument()

Call Signature

getDocument(predicate): Document;

Defined in: buildContext.d.ts:70

Returns the first document that satisfies the given predicate. Returns null if no document is found.

Parameters
ParameterType
predicate(document) => boolean
Returns

Document

Call Signature

getDocument(path): Document;

Defined in: buildContext.d.ts:73

Returns the first document that has the given path. Returns null if no document is found.

Parameters
ParameterType
pathstring
Returns

Document


getDocumentGroup()

getDocumentGroup(name): DocumentGroup;

Defined in: buildContext.d.ts:58

Returns the document group that matches the specified name.

Parameters

ParameterType
namestring

Returns

DocumentGroup


getDocumentGroups()

getDocumentGroups(component?): DocumentGroup[];

Defined in: buildContext.d.ts:61

Returns all document groups. If component is provided, only returns groups added by that component.

Parameters

ParameterType
component?Component

Returns

DocumentGroup[]


isDevelopment()

isDevelopment(): boolean;

Defined in: buildContext.d.ts:76

Returns true if the target environment is development.

Returns

boolean


isProduction()

isProduction(): boolean;

Defined in: buildContext.d.ts:79

Returns true if the target environment is production.

Returns

boolean


removeDocumentGroup()

removeDocumentGroup(documentGroup): void;

Defined in: buildContext.d.ts:55

Removes given group from the document groups list.

Parameters

ParameterType
documentGroupDocumentGroup

Returns

void