Class: BuildContext
Defined in: buildContext.d.ts:7
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
builderOptions | BuilderOptions | Common options that are used by the builder components. | buildContext.d.ts:11 |
customData | Record<string, any> | Custom data that can be used by the builder components. | buildContext.d.ts:17 |
kubernetesResourceInfo | KubernetesResourceInfo | Contains 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
| Parameter | Type |
|---|---|
additionalFile | AdditionalFile |
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
| Parameter | Type |
|---|---|
documentGroupPath | string |
additionalFile | AdditionalFile |
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
| Parameter | Type |
|---|---|
document | Document |
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
| Parameter | Type |
|---|---|
options | NewDocumentOptions |
Returns
void
addDocumentGroup()
addDocumentGroup(documentGroup): void;
Defined in: buildContext.d.ts:36
Adds given group to the document groups list.
Parameters
| Parameter | Type |
|---|---|
documentGroup | DocumentGroup |
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
| Parameter | Type |
|---|---|
predicate | (document) => boolean |
Returns
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
| Parameter | Type |
|---|---|
path | string |
Returns
getDocumentGroup()
getDocumentGroup(name): DocumentGroup;
Defined in: buildContext.d.ts:58
Returns the document group that matches the specified name.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
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
| Parameter | Type |
|---|---|
component? | Component |
Returns
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
| Parameter | Type |
|---|---|
documentGroup | DocumentGroup |
Returns
void