Skip to main content

@quadnix/octo/types

Index

References

DiffAction

Re-exports DiffAction

ServiceType

Re-exports ServiceType

Rules

RuleResult

RuleResult:

What one rule found over the graph.

@group

Rules

name

name: string

The rule's name.

reason

reason: string

Why the rule exists.

selected

selected: number

How many things select chose. A rule choosing nothing holds trivially, and is reported.

staleExceptions

staleExceptions: { node: string; reason: string }[]

Each exception on a selected thing the rule now holds for, which the rule's author can remove.

subject

subject: module | node

What select returns: module for a list of modules, node for a list of models, overlays or resources.

unmatchedExceptions

unmatchedExceptions: { node: string; reason: string }[]

Each exception naming nothing select returned, such as a misspelled context or a module id where select returns nodes, which the rule's author must correct or remove.

violations

violations: { exception?: string; moduleId: string; node: string }[]

Each selected thing the rule does not hold for: by its module id or node context, the module that built it, and the exception letting it through if one does.

Services/State Management

ExternalResourceStateFile

ExternalResourceStateFile:

resource-state-<resourceId>.json, with each / of the id written as .: what an external resource's action made of it — the inputs it was given, the properties it was asked for, and the response it produced. It exists only between the action succeeding and the commit that folds it into the resource graph, and while it exists it is the truth about that resource.

@group

Services/State Management

inputs

inputs: {}

The inputs the action was given.


Type declaration

  • [key string]: unknown

properties

properties: {}

The properties the resource was asked to have.


Type declaration

  • [key string]: unknown

response

response: {}

What the action returned, which becomes the resource's response.


Type declaration

  • [key string]: string

ImportStateFile

ImportStateFile: {}

imports.json: the sealed state of each app this one extends (extends:<index>) and each store it reads (stores:<name>), as the last generate read them, so every later command of the run reads the same.

@group

Services/State Management


Type declaration

ModelStateFile

ModelStateFile:

models.json: the model graph as it stands after the last commit.

@group

Services/State Management

data

The model graph.

userData

userData: ModelStateUserData

What octo records beside the graph: the state's version, the package versions that wrote it, and the terraform folders it generated.

ResourceStateFile

ResourceStateFile:

resources-actual.json, the resource graph as it stands after the last commit, and resources-old.json, the resource graph as intent described it on the last commit.

@group

Services/State Management

data

The resource graph.

userData

userData: ResourceStateUserData

What octo records beside the graph: the state's version, and the terraform folders and blocks it generated.

Types

ModelSerializedOutput

ModelSerializedOutput:

The model graph as written to models.json.

  • nodeName names the base model an entry extends, and types its model as that base model's schema. A model's own fields beyond it are not typed.
  • modules record inputs before references resolve.
@group

Types

anchors

anchors: (AnchorSerializedOutput & { className: string; location: { context: string; type: `${NodeType}` } })[]

Every anchor, with its class and the node it sits on.

dependencies

dependencies: IDependency[]

Every edge between two models or overlays.

models

models: {}

Every model, by its context.


Type declaration

  • [context string]: { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N } | { className: string; model: BaseModelSchemas[N]; moduleId: string; nodeName: N }

modules

modules: {}

Every module that ran, by its id: its class and the inputs it was given.


Type declaration

  • [moduleId string]: { className: string; inputs: {} }

overlays

overlays: { className: string; context: string; moduleId: string; overlay: { anchors: AnchorSerializedOutput[]; overlayId: string; properties: {} } }[]

Every overlay.

ResourceSerializedOutput

ResourceSerializedOutput:

The resource graph as written to resources-actual.json and resources-old.json.

  • createdBy is the context of the model or overlay whose action created the resource.
  • models record the context of every model and overlay whose action produced the resource.
  • copiedResources holds a copy of every resource of another app that this app's resources stand on, such as a store's, and of their parents in turn, as this app last saw them. They rebuild this app's resources, and are never this app's own.
@group

Types

optionalcopiedResources

copiedResources?: ResourceSerializedOutput[resources]

Copies of the resources of other apps this app's resources stand on.

dependencies

dependencies: IDependency[]

Every edge between two resources.

resources

resources: {}

Every resource, by its context.


Type declaration

  • [context string]: { className: string; createdBy?: string; kind: external | terraform; models: string[]; moduleId: string; resource: ResourceSerializedSchema }