@quadnix/octo 0.0.30 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +117 -8
- package/dist/app.type.d.ts +277 -19
- package/dist/app.type.js +80 -9
- package/dist/app.type.js.map +1 -1
- package/dist/decorators/action.decorator.d.ts +10 -6
- package/dist/decorators/action.decorator.js +19 -6
- package/dist/decorators/action.decorator.js.map +1 -1
- package/dist/decorators/anchor.decorator.d.ts +12 -5
- package/dist/decorators/anchor.decorator.js +12 -5
- package/dist/decorators/anchor.decorator.js.map +1 -1
- package/dist/decorators/enable-hook.decorator.d.ts +1 -1
- package/dist/decorators/enable-hook.decorator.js +1 -1
- package/dist/decorators/factory.decorator.d.ts +18 -34
- package/dist/decorators/factory.decorator.js +18 -34
- package/dist/decorators/factory.decorator.js.map +1 -1
- package/dist/decorators/model.decorator.d.ts +4 -6
- package/dist/decorators/model.decorator.js +2 -7
- package/dist/decorators/model.decorator.js.map +1 -1
- package/dist/decorators/module.decorator.d.ts +16 -10
- package/dist/decorators/module.decorator.js +16 -10
- package/dist/decorators/module.decorator.js.map +1 -1
- package/dist/decorators/on-event.decorator.d.ts +7 -2
- package/dist/decorators/on-event.decorator.js +5 -0
- package/dist/decorators/on-event.decorator.js.map +1 -1
- package/dist/decorators/resource.decorator.d.ts +50 -1
- package/dist/decorators/resource.decorator.js +38 -1
- package/dist/decorators/resource.decorator.js.map +1 -1
- package/dist/decorators/validate.decorator.d.ts +15 -1
- package/dist/decorators/validate.decorator.js +15 -1
- package/dist/decorators/validate.decorator.js.map +1 -1
- package/dist/errors/container.error.d.ts +18 -0
- package/dist/errors/container.error.js +18 -0
- package/dist/errors/container.error.js.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/module.error.d.ts +6 -0
- package/dist/errors/module.error.js +6 -0
- package/dist/errors/module.error.js.map +1 -1
- package/dist/errors/node.error.d.ts +56 -0
- package/dist/errors/node.error.js +56 -0
- package/dist/errors/node.error.js.map +1 -1
- package/dist/errors/schema.error.d.ts +14 -1
- package/dist/errors/schema.error.js +11 -1
- package/dist/errors/schema.error.js.map +1 -1
- package/dist/errors/terraform.error.d.ts +20 -0
- package/dist/errors/terraform.error.js +24 -0
- package/dist/errors/terraform.error.js.map +1 -0
- package/dist/errors/transaction.error.d.ts +93 -2
- package/dist/errors/transaction.error.js +83 -0
- package/dist/errors/transaction.error.js.map +1 -1
- package/dist/events/action.event.d.ts +8 -4
- package/dist/events/action.event.js +2 -4
- package/dist/events/action.event.js.map +1 -1
- package/dist/events/command.event.d.ts +43 -0
- package/dist/events/command.event.js +33 -0
- package/dist/events/command.event.js.map +1 -0
- package/dist/events/event.model.d.ts +26 -8
- package/dist/events/event.model.js +15 -7
- package/dist/events/event.model.js.map +1 -1
- package/dist/events/hook/commit.hook.event.d.ts +1 -7
- package/dist/events/hook/commit.hook.event.js +0 -6
- package/dist/events/hook/commit.hook.event.js.map +1 -1
- package/dist/events/hook/hook.event.d.ts +1 -3
- package/dist/events/hook/hook.event.js +0 -2
- package/dist/events/hook/hook.event.js.map +1 -1
- package/dist/events/hook/model.hook.event.d.ts +1 -7
- package/dist/events/hook/model.hook.event.js +0 -6
- package/dist/events/hook/model.hook.event.js.map +1 -1
- package/dist/events/hook/resource.hook.event.d.ts +1 -7
- package/dist/events/hook/resource.hook.event.js +0 -6
- package/dist/events/hook/resource.hook.event.js.map +1 -1
- package/dist/events/index.d.ts +5 -0
- package/dist/events/index.js +5 -0
- package/dist/events/index.js.map +1 -1
- package/dist/events/mode-result.event.d.ts +57 -0
- package/dist/events/mode-result.event.js +24 -0
- package/dist/events/mode-result.event.js.map +1 -0
- package/dist/events/mode.event.d.ts +61 -0
- package/dist/events/mode.event.js +32 -0
- package/dist/events/mode.event.js.map +1 -0
- package/dist/events/module.event.d.ts +7 -5
- package/dist/events/module.event.js +3 -4
- package/dist/events/module.event.js.map +1 -1
- package/dist/events/registration.event.d.ts +19 -15
- package/dist/events/registration.event.js +18 -14
- package/dist/events/registration.event.js.map +1 -1
- package/dist/events/serialization.event.d.ts +16 -13
- package/dist/events/serialization.event.js +15 -12
- package/dist/events/serialization.event.js.map +1 -1
- package/dist/events/state.event.d.ts +102 -0
- package/dist/events/state.event.js +69 -0
- package/dist/events/state.event.js.map +1 -0
- package/dist/events/terraform.event.d.ts +78 -0
- package/dist/events/terraform.event.js +55 -0
- package/dist/events/terraform.event.js.map +1 -0
- package/dist/events/transaction.event.d.ts +3 -40
- package/dist/events/transaction.event.js +1 -29
- package/dist/events/transaction.event.js.map +1 -1
- package/dist/functions/container/container.d.ts +54 -13
- package/dist/functions/container/container.js +64 -19
- package/dist/functions/container/container.js.map +1 -1
- package/dist/functions/container/test-container.d.ts +43 -29
- package/dist/functions/container/test-container.js +71 -43
- package/dist/functions/container/test-container.js.map +1 -1
- package/dist/functions/dependency/dependency.d.ts +84 -23
- package/dist/functions/dependency/dependency.js +84 -14
- package/dist/functions/dependency/dependency.js.map +1 -1
- package/dist/functions/diff/aggregate-resource-actions.d.ts +19 -0
- package/dist/functions/diff/aggregate-resource-actions.js +41 -0
- package/dist/functions/diff/aggregate-resource-actions.js.map +1 -0
- package/dist/functions/diff/diff-metadata.d.ts +21 -3
- package/dist/functions/diff/diff-metadata.js +18 -0
- package/dist/functions/diff/diff-metadata.js.map +1 -1
- package/dist/functions/diff/diff.d.ts +68 -7
- package/dist/functions/diff/diff.js +44 -3
- package/dist/functions/diff/diff.js.map +1 -1
- package/dist/functions/hook/commit.hook.d.ts +16 -1
- package/dist/functions/hook/commit.hook.js +21 -6
- package/dist/functions/hook/commit.hook.js.map +1 -1
- package/dist/functions/hook/model-action.hook.d.ts +16 -1
- package/dist/functions/hook/model-action.hook.js +21 -6
- package/dist/functions/hook/model-action.hook.js.map +1 -1
- package/dist/functions/hook/resource-action.hook.d.ts +16 -1
- package/dist/functions/hook/resource-action.hook.js +21 -6
- package/dist/functions/hook/resource-action.hook.js.map +1 -1
- package/dist/functions/node/node-action.abstract.d.ts +23 -2
- package/dist/functions/node/node-action.abstract.js +22 -8
- package/dist/functions/node/node-action.abstract.js.map +1 -1
- package/dist/functions/node/node.abstract.d.ts +56 -5
- package/dist/functions/node/node.abstract.js +106 -22
- package/dist/functions/node/node.abstract.js.map +1 -1
- package/dist/functions/node/node.interface.d.ts +3 -1
- package/dist/functions/schema/schema.d.ts +7 -0
- package/dist/functions/schema/schema.js +10 -1
- package/dist/functions/schema/schema.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.type.d.ts +5 -0
- package/dist/index.type.js +2 -0
- package/dist/index.type.js.map +1 -0
- package/dist/main.d.ts +245 -14
- package/dist/main.js +377 -72
- package/dist/main.js.map +1 -1
- package/dist/models/account/account.model.d.ts +43 -7
- package/dist/models/account/account.model.js +56 -8
- package/dist/models/account/account.model.js.map +1 -1
- package/dist/models/account/account.schema.d.ts +13 -1
- package/dist/models/account/account.schema.js +12 -0
- package/dist/models/account/account.schema.js.map +1 -1
- package/dist/models/app/app.model.d.ts +13 -8
- package/dist/models/app/app.model.js +17 -32
- package/dist/models/app/app.model.js.map +1 -1
- package/dist/models/app/app.schema.d.ts +6 -0
- package/dist/models/app/app.schema.js +6 -0
- package/dist/models/app/app.schema.js.map +1 -1
- package/dist/models/deployment/deployment.model.d.ts +13 -1
- package/dist/models/deployment/deployment.model.js +16 -4
- package/dist/models/deployment/deployment.model.js.map +1 -1
- package/dist/models/deployment/deployment.schema.d.ts +6 -0
- package/dist/models/deployment/deployment.schema.js +6 -0
- package/dist/models/deployment/deployment.schema.js.map +1 -1
- package/dist/models/environment/environment.model.d.ts +15 -3
- package/dist/models/environment/environment.model.js +22 -10
- package/dist/models/environment/environment.model.js.map +1 -1
- package/dist/models/environment/environment.schema.d.ts +2 -0
- package/dist/models/environment/environment.schema.js +2 -0
- package/dist/models/environment/environment.schema.js.map +1 -1
- package/dist/models/execution/execution.model.d.ts +21 -3
- package/dist/models/execution/execution.model.js +47 -29
- package/dist/models/execution/execution.model.js.map +1 -1
- package/dist/models/execution/execution.schema.d.ts +11 -0
- package/dist/models/execution/execution.schema.js +11 -0
- package/dist/models/execution/execution.schema.js.map +1 -1
- package/dist/models/filesystem/filesystem.model.d.ts +27 -1
- package/dist/models/filesystem/filesystem.model.js +30 -4
- package/dist/models/filesystem/filesystem.model.js.map +1 -1
- package/dist/models/filesystem/filesystem.schema.d.ts +5 -0
- package/dist/models/filesystem/filesystem.schema.js +5 -0
- package/dist/models/filesystem/filesystem.schema.js.map +1 -1
- package/dist/models/image/image.model.d.ts +19 -5
- package/dist/models/image/image.model.js +25 -11
- package/dist/models/image/image.model.js.map +1 -1
- package/dist/models/image/image.schema.d.ts +8 -0
- package/dist/models/image/image.schema.js +8 -0
- package/dist/models/image/image.schema.js.map +1 -1
- package/dist/models/model-action.interface.d.ts +17 -4
- package/dist/models/model.abstract.d.ts +96 -1
- package/dist/models/model.abstract.js +107 -8
- package/dist/models/model.abstract.js.map +1 -1
- package/dist/models/model.interface.d.ts +3 -0
- package/dist/models/pipeline/pipeline.model.d.ts +14 -2
- package/dist/models/pipeline/pipeline.model.js +19 -7
- package/dist/models/pipeline/pipeline.model.js.map +1 -1
- package/dist/models/pipeline/pipeline.schema.d.ts +8 -0
- package/dist/models/pipeline/pipeline.schema.js +8 -0
- package/dist/models/pipeline/pipeline.schema.js.map +1 -1
- package/dist/models/region/region.model.d.ts +16 -1
- package/dist/models/region/region.model.js +19 -4
- package/dist/models/region/region.model.js.map +1 -1
- package/dist/models/region/region.schema.d.ts +6 -0
- package/dist/models/region/region.schema.js +6 -0
- package/dist/models/region/region.schema.js.map +1 -1
- package/dist/models/server/server.model.d.ts +15 -3
- package/dist/models/server/server.model.js +18 -6
- package/dist/models/server/server.model.js.map +1 -1
- package/dist/models/server/server.schema.d.ts +3 -1
- package/dist/models/server/server.schema.js +3 -1
- package/dist/models/server/server.schema.js.map +1 -1
- package/dist/models/service/service.model.d.ts +37 -6
- package/dist/models/service/service.model.js +65 -11
- package/dist/models/service/service.model.js.map +1 -1
- package/dist/models/service/service.schema.d.ts +48 -1
- package/dist/models/service/service.schema.js +56 -1
- package/dist/models/service/service.schema.js.map +1 -1
- package/dist/models/subnet/subnet.model.d.ts +27 -3
- package/dist/models/subnet/subnet.model.js +40 -16
- package/dist/models/subnet/subnet.model.js.map +1 -1
- package/dist/models/subnet/subnet.schema.d.ts +9 -0
- package/dist/models/subnet/subnet.schema.js +9 -0
- package/dist/models/subnet/subnet.schema.js.map +1 -1
- package/dist/modes/apply-transaction.d.ts +23 -0
- package/dist/modes/apply-transaction.js +25 -0
- package/dist/modes/apply-transaction.js.map +1 -0
- package/dist/modes/commit.mode.d.ts +54 -0
- package/dist/modes/commit.mode.js +235 -0
- package/dist/modes/commit.mode.js.map +1 -0
- package/dist/modes/generate.mode.d.ts +30 -0
- package/dist/modes/generate.mode.js +50 -0
- package/dist/modes/generate.mode.js.map +1 -0
- package/dist/modes/run-action.mode.d.ts +30 -0
- package/dist/modes/run-action.mode.js +140 -0
- package/dist/modes/run-action.mode.js.map +1 -0
- package/dist/modes/validate.mode.d.ts +186 -0
- package/dist/modes/validate.mode.js +558 -0
- package/dist/modes/validate.mode.js.map +1 -0
- package/dist/modules/module.abstract.d.ts +51 -0
- package/dist/modules/module.abstract.js +36 -0
- package/dist/modules/module.abstract.js.map +1 -1
- package/dist/modules/module.container.d.ts +43 -1
- package/dist/modules/module.container.js +77 -5
- package/dist/modules/module.container.js.map +1 -1
- package/dist/modules/test-module.container.d.ts +139 -25
- package/dist/modules/test-module.container.js +383 -199
- package/dist/modules/test-module.container.js.map +1 -1
- package/dist/overlays/anchor.abstract.d.ts +32 -1
- package/dist/overlays/anchor.abstract.js +42 -11
- package/dist/overlays/anchor.abstract.js.map +1 -1
- package/dist/overlays/anchor.schema.d.ts +21 -0
- package/dist/overlays/anchor.schema.js +21 -0
- package/dist/overlays/anchor.schema.js.map +1 -1
- package/dist/overlays/overlay-data.repository.d.ts +18 -0
- package/dist/overlays/overlay-data.repository.js +18 -0
- package/dist/overlays/overlay-data.repository.js.map +1 -1
- package/dist/overlays/overlay.abstract.d.ts +56 -1
- package/dist/overlays/overlay.abstract.js +79 -20
- package/dist/overlays/overlay.abstract.js.map +1 -1
- package/dist/overlays/overlay.schema.d.ts +20 -0
- package/dist/overlays/overlay.schema.js +20 -0
- package/dist/overlays/overlay.schema.js.map +1 -1
- package/dist/resources/resource-action.interface.d.ts +29 -3
- package/dist/resources/resource-data.repository.d.ts +63 -1
- package/dist/resources/resource-data.repository.js +94 -4
- package/dist/resources/resource-data.repository.js.map +1 -1
- package/dist/resources/resource.abstract.d.ts +163 -6
- package/dist/resources/resource.abstract.js +223 -59
- package/dist/resources/resource.abstract.js.map +1 -1
- package/dist/resources/resource.interface.d.ts +0 -2
- package/dist/resources/resource.schema.d.ts +39 -1
- package/dist/resources/resource.schema.js +38 -0
- package/dist/resources/resource.schema.js.map +1 -1
- package/dist/resources/terraform-resource.abstract.d.ts +44 -0
- package/dist/resources/terraform-resource.abstract.js +45 -0
- package/dist/resources/terraform-resource.abstract.js.map +1 -0
- package/dist/services/event/event.service.d.ts +32 -5
- package/dist/services/event/event.service.js +58 -16
- package/dist/services/event/event.service.js.map +1 -1
- package/dist/services/input/input.service.d.ts +82 -5
- package/dist/services/input/input.service.js +143 -12
- package/dist/services/input/input.service.js.map +1 -1
- package/dist/services/schema-translation/schema-translation.service.d.ts +9 -0
- package/dist/services/schema-translation/schema-translation.service.js +9 -0
- package/dist/services/schema-translation/schema-translation.service.js.map +1 -1
- package/dist/services/serialization/model/model-serialization.service.d.ts +25 -3
- package/dist/services/serialization/model/model-serialization.service.js +113 -62
- package/dist/services/serialization/model/model-serialization.service.js.map +1 -1
- package/dist/services/serialization/resource/resource-serialization.service.d.ts +36 -6
- package/dist/services/serialization/resource/resource-serialization.service.js +77 -28
- package/dist/services/serialization/resource/resource-serialization.service.js.map +1 -1
- package/dist/services/state-management/local.state-provider.d.ts +67 -4
- package/dist/services/state-management/local.state-provider.js +168 -41
- package/dist/services/state-management/local.state-provider.js.map +1 -1
- package/dist/services/state-management/remote.state-provider.d.ts +216 -0
- package/dist/services/state-management/remote.state-provider.js +645 -0
- package/dist/services/state-management/remote.state-provider.js.map +1 -0
- package/dist/services/state-management/state-management.service.d.ts +195 -17
- package/dist/services/state-management/state-management.service.js +259 -10
- package/dist/services/state-management/state-management.service.js.map +1 -1
- package/dist/services/state-management/state-provider.interface.d.ts +98 -3
- package/dist/services/state-management/state-provider.interface.js +14 -1
- package/dist/services/state-management/state-provider.interface.js.map +1 -1
- package/dist/services/state-management/terraform-state.service.d.ts +99 -0
- package/dist/services/state-management/terraform-state.service.js +197 -0
- package/dist/services/state-management/terraform-state.service.js.map +1 -0
- package/dist/services/state-management/test.state-provider.d.ts +42 -4
- package/dist/services/state-management/test.state-provider.js +77 -25
- package/dist/services/state-management/test.state-provider.js.map +1 -1
- package/dist/services/terraform/terraform.service.d.ts +480 -0
- package/dist/services/terraform/terraform.service.js +1082 -0
- package/dist/services/terraform/terraform.service.js.map +1 -0
- package/dist/services/terraform/terraform.type.d.ts +387 -0
- package/dist/services/terraform/terraform.type.js +579 -0
- package/dist/services/terraform/terraform.type.js.map +1 -0
- package/dist/services/transaction/transaction.service.d.ts +110 -10
- package/dist/services/transaction/transaction.service.js +570 -251
- package/dist/services/transaction/transaction.service.js.map +1 -1
- package/dist/services/validation/validation.service.d.ts +15 -3
- package/dist/services/validation/validation.service.js +12 -0
- package/dist/services/validation/validation.service.js.map +1 -1
- package/dist/utilities/array/array.utility.d.ts +3 -0
- package/dist/utilities/array/array.utility.js +3 -0
- package/dist/utilities/array/array.utility.js.map +1 -1
- package/dist/{functions → utilities}/diff/diff.utility.d.ts +19 -3
- package/dist/{functions → utilities}/diff/diff.utility.js +57 -41
- package/dist/utilities/diff/diff.utility.js.map +1 -0
- package/dist/utilities/file/file.utility.d.ts +16 -2
- package/dist/utilities/file/file.utility.js +23 -61
- package/dist/utilities/file/file.utility.js.map +1 -1
- package/dist/utilities/hcl/hcl.utility.d.ts +128 -0
- package/dist/utilities/hcl/hcl.utility.js +402 -0
- package/dist/utilities/hcl/hcl.utility.js.map +1 -0
- package/dist/utilities/http/http.utility.d.ts +57 -0
- package/dist/utilities/http/http.utility.js +98 -0
- package/dist/utilities/http/http.utility.js.map +1 -0
- package/dist/utilities/node/node.utility.d.ts +3 -0
- package/dist/utilities/node/node.utility.js +3 -0
- package/dist/utilities/node/node.utility.js.map +1 -1
- package/dist/utilities/object/object.utility.d.ts +12 -0
- package/dist/utilities/object/object.utility.js +12 -0
- package/dist/utilities/object/object.utility.js.map +1 -1
- package/dist/utilities/project/project.utility.d.ts +28 -0
- package/dist/utilities/project/project.utility.js +35 -0
- package/dist/utilities/project/project.utility.js.map +1 -0
- package/dist/utilities/string/string.utility.d.ts +41 -0
- package/dist/utilities/string/string.utility.js +65 -0
- package/dist/utilities/string/string.utility.js.map +1 -0
- package/dist/utilities/terraform/terraform.utility.d.ts +276 -0
- package/dist/utilities/terraform/terraform.utility.js +623 -0
- package/dist/utilities/terraform/terraform.utility.js.map +1 -0
- package/dist/utilities/test-helpers/test-classes.d.ts +36 -30
- package/dist/utilities/test-helpers/test-classes.js +38 -39
- package/dist/utilities/test-helpers/test-classes.js.map +1 -1
- package/dist/utilities/test-helpers/test-models.d.ts +8 -1
- package/dist/utilities/test-helpers/test-models.js +37 -12
- package/dist/utilities/test-helpers/test-models.js.map +1 -1
- package/dist/utilities/test-helpers/test-modes.d.ts +315 -0
- package/dist/utilities/test-helpers/test-modes.js +486 -0
- package/dist/utilities/test-helpers/test-modes.js.map +1 -0
- package/dist/utilities/test-helpers/test-modules.d.ts +47 -0
- package/dist/utilities/test-helpers/test-modules.js +85 -0
- package/dist/utilities/test-helpers/test-modules.js.map +1 -0
- package/dist/utilities/test-helpers/test-overlays.d.ts +20 -2
- package/dist/utilities/test-helpers/test-overlays.js +56 -6
- package/dist/utilities/test-helpers/test-overlays.js.map +1 -1
- package/dist/utilities/test-helpers/test-resources.d.ts +23 -3
- package/dist/utilities/test-helpers/test-resources.js +83 -23
- package/dist/utilities/test-helpers/test-resources.js.map +1 -1
- package/dist/utilities/validation/validation.utility.d.ts +24 -0
- package/dist/utilities/validation/validation.utility.js +24 -0
- package/dist/utilities/validation/validation.utility.js.map +1 -1
- package/package.json +12 -6
- package/dist/functions/diff/diff.utility.js.map +0 -1
- package/dist/services/capture/capture.service.d.ts +0 -19
- package/dist/services/capture/capture.service.js +0 -43
- package/dist/services/capture/capture.service.js.map +0 -1
- package/dist/services/state-management/local-encryption.state-provider.d.ts +0 -20
- package/dist/services/state-management/local-encryption.state-provider.js +0 -90
- package/dist/services/state-management/local-encryption.state-provider.js.map +0 -1
- package/dist/utilities/cidr/cidr.utility.d.ts +0 -10
- package/dist/utilities/cidr/cidr.utility.js +0 -51
- package/dist/utilities/cidr/cidr.utility.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,122 @@
|
|
|
1
1
|
# Octo
|
|
2
|
-
http://octo.quadnix.com/
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Infrastructure as code written as intent: you describe an app and what it needs, modules turn that
|
|
4
|
+
into Terraform, and your own Terragrunt applies it. Users start at
|
|
5
|
+
[octo.quadnix.com](https://octo.quadnix.com/).
|
|
5
6
|
|
|
6
|
-
>
|
|
7
|
-
> This library is still under development and is currently in version `0.x.x`.
|
|
8
|
-
> We plan to release version `1.x.x` when it is deemed ready for production use.
|
|
7
|
+
> Octo is in `0.x`. Version `1.x` will mark it ready for production.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
**This README is a set of procedures for working on the repository.** `docs/ARCHITECTURE.md`
|
|
10
|
+
explains what exists, and `docs/CODING-STANDARDS.md` how to add to it.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Requires Node 20 or newer, Terraform or OpenTofu 1.6 or newer, and Terragrunt 0.78 or newer. The
|
|
13
|
+
integration suites also need Docker, and the e2e suites AWS credentials.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## A — Set up this machine
|
|
18
|
+
|
|
19
|
+
Once.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
corepack enable
|
|
23
|
+
pnpm install
|
|
24
|
+
pnpm run prepare
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`prepare` installs the pre-commit hook, which runs the format check, lint, the build with its type
|
|
28
|
+
check, the circular-dependency check, the secrets spec and the docs code-block check.
|
|
29
|
+
|
|
30
|
+
## B — Build, lint and test
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pnpm run build
|
|
34
|
+
pnpm run lint
|
|
35
|
+
pnpm test
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`octo-aws-cdk`, `octo-event-listeners`, `octo-build` and `octo-templates` import `octo` from its
|
|
39
|
+
`dist`, and `octo-templates` imports `octo-aws-cdk` the same way. **Rebuild what you changed before
|
|
40
|
+
testing what depends on it**, or the suite runs against the old code and still passes.
|
|
41
|
+
|
|
42
|
+
`pnpm run build` also type-checks every package, tests included, through each package's
|
|
43
|
+
`check:types`.
|
|
44
|
+
|
|
45
|
+
`pnpm run format` writes what `pnpm run format:check` checks. Lint does not check formatting.
|
|
46
|
+
|
|
47
|
+
`pnpm run lint:fix` sorts imports, members and keys. A flag passed through `pnpm run` is written
|
|
48
|
+
without `--`: pnpm forwards the separator, and the script then drops the flag.
|
|
49
|
+
|
|
50
|
+
## C — Run integration tests
|
|
51
|
+
|
|
52
|
+
Integration specs run real Terraform; `octo-templates`' start LocalStack in Docker.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
pnpm run test:integration
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## D — Run an e2e suite
|
|
59
|
+
|
|
60
|
+
**Every e2e suite reaches a live AWS account.** `octo-aws-cdk`'s plan and apply nothing;
|
|
61
|
+
`octo-templates`' create real resources and tear them down.
|
|
62
|
+
|
|
63
|
+
1. Copy the `.env.defaults` beside the suite to `.env` and fill in real values. `.env` is ignored.
|
|
64
|
+
2. Build the packages the suite imports:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
npx nx run-many -t build --projects=octo,octo-event-listeners,octo-aws-cdk
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. Run one spec, by path, from its package:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
cd packages/octo-templates
|
|
74
|
+
NODE_OPTIONS=--experimental-vm-modules npx jest --runTestsByPath src/<template>/main.e2e-spec.ts
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Never `pnpm run test:e2e` — it runs every suite live at once. Never combine `-u` with `-t`: jest then
|
|
78
|
+
deletes the snapshots of every test it skipped. A template's own `README.md`, where it has one,
|
|
79
|
+
holds what is particular to it.
|
|
80
|
+
|
|
81
|
+
## E — Work in a worktree
|
|
82
|
+
|
|
83
|
+
For a large change or a hands-free agent run:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
git worktree add ../ai-worktrees/octo-worktree-<branch> -b ai/<branch>
|
|
87
|
+
WORKTREE=../ai-worktrees/octo-worktree-<branch>
|
|
88
|
+
find . -maxdepth 4 -name node_modules -type d ! -path "*/node_modules/*/node_modules" | \
|
|
89
|
+
while read src; do
|
|
90
|
+
mkdir -p "$WORKTREE/$(dirname $src)"
|
|
91
|
+
ln -s "$(pwd)/$src" "$WORKTREE/$src"
|
|
92
|
+
done
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The symlinks let Nx and Jest resolve packages. Run lint and tests from inside the worktree.
|
|
96
|
+
|
|
97
|
+
## F — Release
|
|
98
|
+
|
|
99
|
+
1. Merge to `main` with PR titles per `.github/jobs/validate-pr-title.job.sh`. The commit type sets
|
|
100
|
+
the bump: `chore` releases nothing.
|
|
101
|
+
2. Run the **Manual Release** workflow on `main`. It versions every changed package, tags, writes
|
|
102
|
+
the changelog, and publishes to npm.
|
|
103
|
+
|
|
104
|
+
## Environment variables
|
|
105
|
+
|
|
106
|
+
Everything outside the code that governs how this repository behaves. A suite's `.env` is read
|
|
107
|
+
through `env-smart`, falling back to the `.env.defaults` beside it.
|
|
108
|
+
|
|
109
|
+
| Variable | Set by | What it does |
|
|
110
|
+
|-----------------------------------------------------------------------------------------------------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
111
|
+
| `AWS_ACCOUNT_ID` | a suite's `.env` | The account every e2e suite plans or applies into. |
|
|
112
|
+
| `AWS_REGION_ID` | `packages/octo-aws-cdk/test/.env` | The region the module e2es plan into. Template suites hardcode `us-east-1`. |
|
|
113
|
+
| `OCTO_DEFINITION_FILE_PATH` | the user, or a `create-app` project's scripts | The `octo.yaml` every lifecycle command boots from. `OctoCliUtility` sets it for the CLI-driven template suites. A relative path is resolved once against the working directory, so `run-action` callbacks find it. |
|
|
114
|
+
| `OCTO_JOURNAL_COMMAND_ID` | `JournalEventListener` | The running command's id, set for every process it starts, so a `run-action` that Terraform starts mid-apply names that apply as `parentCommandId` in its journal. |
|
|
115
|
+
| `TF_VAR_OCTO_PROJECT_ROOT` | `TerraformUtility`, unless already set | The working directory, so `terraform.localPath()` paths resolve inside Terragrunt's cache copy of a folder. |
|
|
116
|
+
| `TG_LOG_CUSTOM_FORMAT` | `TerraformUtility`, always | Terragrunt's log line layout, its default without the time, since the journal records when each line arrived. |
|
|
117
|
+
| `TG_LOG_FORMAT` | `TerraformUtility`, always unset | Unset for every Terragrunt process, so it cannot override `TG_LOG_CUSTOM_FORMAT`. |
|
|
118
|
+
| `TG_PROVIDER_CACHE` | `TerraformUtility`, unless already set | `1`, so Terragrunt shares one provider cache across folders. |
|
|
119
|
+
| `TG_TF_PATH` | `TerraformUtility`, from `--terraformBinary` | Which Terraform or OpenTofu binary Terragrunt runs. |
|
|
120
|
+
| `NODE_OPTIONS` | every package's test scripts | `--experimental-vm-modules`, which Jest needs to run ESM. Set it yourself when running `jest` directly. |
|
|
121
|
+
| `OCTO_STAGE`, `OCTO_PHASE`, `OCTO_NAT`, `OCTO_TARGET`, `OCTO_WORK`, `OCTO_CASE`, `OCTO_PROBE_STATE` | you, by hand | Drive the `aws-ecs-server` debugging harnesses; that template's `README.md` describes each. |
|
|
122
|
+
| `GH_TOKEN` | a repository secret | Checkout and push in **Manual Release**, and the tags and GitHub releases `nx release` creates. |
|
package/dist/app.type.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import type { IDependency } from './functions/dependency/dependency.js';
|
|
2
2
|
import type { ANode } from './functions/node/node.abstract.js';
|
|
3
|
+
import type { AccountSchema } from './models/account/account.schema.js';
|
|
4
|
+
import type { AppSchema } from './models/app/app.schema.js';
|
|
5
|
+
import type { DeploymentSchema } from './models/deployment/deployment.schema.js';
|
|
6
|
+
import type { EnvironmentSchema } from './models/environment/environment.schema.js';
|
|
7
|
+
import type { ExecutionSchema } from './models/execution/execution.schema.js';
|
|
8
|
+
import type { FilesystemSchema } from './models/filesystem/filesystem.schema.js';
|
|
9
|
+
import type { ImageSchema } from './models/image/image.schema.js';
|
|
3
10
|
import type { IModelAction } from './models/model-action.interface.js';
|
|
4
11
|
import type { AModel } from './models/model.abstract.js';
|
|
5
|
-
import type { IModel
|
|
12
|
+
import type { IModel } from './models/model.interface.js';
|
|
13
|
+
import type { PipelineSchema } from './models/pipeline/pipeline.schema.js';
|
|
14
|
+
import type { RegionSchema } from './models/region/region.schema.js';
|
|
15
|
+
import type { ServerSchema } from './models/server/server.schema.js';
|
|
16
|
+
import type { ServiceSchema } from './models/service/service.schema.js';
|
|
17
|
+
import type { SubnetSchema } from './models/subnet/subnet.schema.js';
|
|
6
18
|
import type { AModule } from './modules/module.abstract.js';
|
|
7
19
|
import type { AAnchor } from './overlays/anchor.abstract.js';
|
|
8
20
|
import type { BaseAnchorSchema } from './overlays/anchor.schema.js';
|
|
@@ -13,38 +25,89 @@ import type { AResource } from './resources/resource.abstract.js';
|
|
|
13
25
|
import type { BaseResourceSchema } from './resources/resource.schema.js';
|
|
14
26
|
import type { ValidationUtility } from './utilities/validation/validation.utility.js';
|
|
15
27
|
/**
|
|
28
|
+
* An anchor found by schema, paired with the translation needed to read it as that schema.
|
|
29
|
+
*
|
|
30
|
+
* {@link AModel.getAnchorsMatchingSchema} returns these rather than raw anchors: the anchor you
|
|
31
|
+
* matched may have been declared against a different version of the schema, and this is what keeps
|
|
32
|
+
* that difference out of your module. Read it with `getSchemaInstance()`.
|
|
33
|
+
*
|
|
16
34
|
* @group Types
|
|
17
35
|
*/
|
|
18
36
|
export declare class MatchingAnchor<S extends BaseAnchorSchema> {
|
|
19
37
|
private readonly actual;
|
|
20
38
|
private readonly schemaTranslator?;
|
|
39
|
+
/**
|
|
40
|
+
* @param actual The anchor that was matched.
|
|
41
|
+
* @param schemaTranslator Reads `actual` as the matched schema, when the two differ.
|
|
42
|
+
*/
|
|
21
43
|
constructor(actual: AAnchor<S, any>, schemaTranslator?: ((synth: any) => S) | undefined);
|
|
22
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The anchor itself, with its properties hidden - read those through
|
|
46
|
+
* {@link MatchingAnchor.getSchemaInstance}.
|
|
47
|
+
*/
|
|
23
48
|
getActual(): AAnchor<Omit<S, 'properties'> & {
|
|
24
49
|
properties: Record<never, never>;
|
|
25
50
|
}, any>;
|
|
51
|
+
/**
|
|
52
|
+
* The anchor read as the schema you matched on.
|
|
53
|
+
*/
|
|
26
54
|
getSchemaInstance(): S;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the match went through a schema translation.
|
|
57
|
+
*/
|
|
58
|
+
hasSchemaTranslator(): boolean;
|
|
27
59
|
}
|
|
28
60
|
/**
|
|
61
|
+
* A model found by schema. See {@link MatchingAnchor}.
|
|
62
|
+
*
|
|
29
63
|
* @group Types
|
|
30
64
|
*/
|
|
31
65
|
export declare class MatchingModel<S extends object> {
|
|
32
66
|
private readonly actual;
|
|
33
67
|
private readonly schemaTranslator?;
|
|
68
|
+
/**
|
|
69
|
+
* @param actual The model that was matched.
|
|
70
|
+
* @param schemaTranslator Reads `actual` as the matched schema, when the two differ.
|
|
71
|
+
*/
|
|
34
72
|
constructor(actual: AModel<S, any>, schemaTranslator?: ((synth: any) => S) | undefined);
|
|
35
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The model itself, with its schema hidden - read it through
|
|
75
|
+
* {@link MatchingModel.getSchemaInstance}.
|
|
76
|
+
*/
|
|
36
77
|
getActual(): AModel<Record<never, never>, any>;
|
|
78
|
+
/**
|
|
79
|
+
* The model read as the schema you matched on.
|
|
80
|
+
*/
|
|
37
81
|
getSchemaInstance(): S;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the match went through a schema translation.
|
|
84
|
+
*/
|
|
85
|
+
hasSchemaTranslator(): boolean;
|
|
38
86
|
}
|
|
39
87
|
/**
|
|
88
|
+
* A resource found by schema. See {@link MatchingAnchor}.
|
|
89
|
+
*
|
|
90
|
+
* Pass one wherever a resource parent is expected, and the translation is carried into the graph, so
|
|
91
|
+
* the child keeps reading its parent through the schema it was written against.
|
|
92
|
+
*
|
|
40
93
|
* @group Types
|
|
41
94
|
*/
|
|
42
95
|
export declare class MatchingResource<S extends BaseResourceSchema> {
|
|
43
96
|
private readonly actual;
|
|
44
97
|
readonly schemaTranslator?: ((synth: BaseResourceSchema) => S) | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* @param actual The resource that was matched.
|
|
100
|
+
* @param schemaTranslator Reads `actual` as the matched schema, when the two differ.
|
|
101
|
+
*/
|
|
45
102
|
constructor(actual: AResource<S, any>, schemaTranslator?: ((synth: BaseResourceSchema) => S) | undefined);
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
46
106
|
addChild(...args: Parameters<AResource<BaseResourceSchema, any>['addChild']>): ReturnType<AResource<BaseResourceSchema, any>['addChild']>;
|
|
47
|
-
|
|
107
|
+
/**
|
|
108
|
+
* The resource itself, with its schema hidden - read it through
|
|
109
|
+
* {@link MatchingResource.getSchemaInstance}.
|
|
110
|
+
*/
|
|
48
111
|
getActual(): AResource<Omit<S, 'properties' | 'response' | 'tags'> & {
|
|
49
112
|
properties: Record<never, never>;
|
|
50
113
|
} & {
|
|
@@ -52,10 +115,21 @@ export declare class MatchingResource<S extends BaseResourceSchema> {
|
|
|
52
115
|
} & {
|
|
53
116
|
tags: Record<never, never>;
|
|
54
117
|
}, any>;
|
|
118
|
+
/**
|
|
119
|
+
* The resource read as the schema you matched on.
|
|
120
|
+
*/
|
|
55
121
|
getSchemaInstance(): S;
|
|
122
|
+
/**
|
|
123
|
+
* The resource read as the schema you matched on, with its `response` typed as fully populated.
|
|
124
|
+
* Only call it from a resource action, where the parent is guaranteed to already exist.
|
|
125
|
+
*/
|
|
56
126
|
getSchemaInstanceInResourceAction(): Omit<S, 'response'> & {
|
|
57
127
|
response: Required<S['response']>;
|
|
58
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* Whether the match went through a schema translation.
|
|
131
|
+
*/
|
|
132
|
+
hasSchemaTranslator(): boolean;
|
|
59
133
|
}
|
|
60
134
|
/**
|
|
61
135
|
* @internal
|
|
@@ -92,10 +166,19 @@ export type ValidationTypeOptions = {
|
|
|
92
166
|
[ValidationType.REGEX]: Parameters<typeof ValidationUtility.validateRegex>[1];
|
|
93
167
|
};
|
|
94
168
|
/**
|
|
169
|
+
* Whether a node was registered under the given name, e.g. `region`.
|
|
170
|
+
*
|
|
171
|
+
* Use it to identify a base model without importing the subclass that implements it.
|
|
172
|
+
*
|
|
95
173
|
* @group Types
|
|
96
174
|
*/
|
|
97
175
|
export declare function hasNodeName(node: UnknownNode, nodeName: string): boolean;
|
|
98
176
|
/**
|
|
177
|
+
* Marks a placeholder value that a later step fills in - typically a resource property whose real
|
|
178
|
+
* value is only known once the infrastructure exists.
|
|
179
|
+
*
|
|
180
|
+
* It is a type assertion and nothing more; it emits the string you give it.
|
|
181
|
+
*
|
|
99
182
|
* @group Types
|
|
100
183
|
*/
|
|
101
184
|
export declare function stub<T>(value: string): T;
|
|
@@ -104,6 +187,8 @@ export declare function stub<T>(value: string): T;
|
|
|
104
187
|
*/
|
|
105
188
|
export type ActionInputs = EnhancedModuleSchema<UnknownModule>;
|
|
106
189
|
/**
|
|
190
|
+
* The resources an action declared, keyed by an ID of your choosing.
|
|
191
|
+
*
|
|
107
192
|
* @group Types
|
|
108
193
|
*/
|
|
109
194
|
export type ActionOutputs = {
|
|
@@ -119,6 +204,8 @@ export type ClassOptionalProperties<T> = {
|
|
|
119
204
|
[K in keyof T]: undefined extends T[K] ? K : never;
|
|
120
205
|
}[keyof T];
|
|
121
206
|
/**
|
|
207
|
+
* The `value` of a {@link Diff} on a `properties` field: which property changed, and to what.
|
|
208
|
+
*
|
|
122
209
|
* @group Types
|
|
123
210
|
*/
|
|
124
211
|
export type DiffValueTypePropertyUpdate = {
|
|
@@ -126,6 +213,8 @@ export type DiffValueTypePropertyUpdate = {
|
|
|
126
213
|
value: unknown;
|
|
127
214
|
};
|
|
128
215
|
/**
|
|
216
|
+
* The `value` of a {@link Diff} on a `tags` field, split by what happened to each tag.
|
|
217
|
+
*
|
|
129
218
|
* @group Types
|
|
130
219
|
*/
|
|
131
220
|
export type DiffValueTypeTagUpdate = {
|
|
@@ -147,63 +236,222 @@ export type ObjectKeyValue<T> = {
|
|
|
147
236
|
};
|
|
148
237
|
}[keyof T];
|
|
149
238
|
/**
|
|
239
|
+
* The class of `T`, i.e. what you pass when an API wants a type rather than an instance.
|
|
240
|
+
*
|
|
150
241
|
* @group Types
|
|
151
242
|
*/
|
|
152
243
|
export type Constructable<T> = new (...args: any[]) => T;
|
|
153
244
|
/**
|
|
245
|
+
* A class of `T`, abstract or not, i.e. what you pass to name a family of classes.
|
|
246
|
+
*
|
|
247
|
+
* @group Types
|
|
248
|
+
*/
|
|
249
|
+
export type AbstractConstructable<T> = abstract new (...args: any[]) => T;
|
|
250
|
+
/**
|
|
251
|
+
* An anchor as written to state.
|
|
252
|
+
*
|
|
253
|
+
* @group Types
|
|
254
|
+
*/
|
|
255
|
+
export type AnchorSerializedOutput = {
|
|
256
|
+
anchorId: string;
|
|
257
|
+
parent: {
|
|
258
|
+
context: string;
|
|
259
|
+
type: `${NodeType}`;
|
|
260
|
+
};
|
|
261
|
+
properties: {
|
|
262
|
+
[key: string]: unknown;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* The schema of each base model, by the name it registers with `@Model`.
|
|
267
|
+
*/
|
|
268
|
+
type BaseModelSchemas = {
|
|
269
|
+
account: AccountSchema;
|
|
270
|
+
app: AppSchema;
|
|
271
|
+
deployment: DeploymentSchema;
|
|
272
|
+
environment: EnvironmentSchema;
|
|
273
|
+
execution: ExecutionSchema;
|
|
274
|
+
filesystem: FilesystemSchema;
|
|
275
|
+
image: ImageSchema;
|
|
276
|
+
pipeline: PipelineSchema;
|
|
277
|
+
region: RegionSchema;
|
|
278
|
+
server: ServerSchema;
|
|
279
|
+
service: ServiceSchema;
|
|
280
|
+
subnet: SubnetSchema;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* @internal
|
|
284
|
+
*/
|
|
285
|
+
export type ModelName = keyof BaseModelSchemas;
|
|
286
|
+
/**
|
|
287
|
+
* The model graph as written to `models.json`.
|
|
288
|
+
* * `nodeName` names the base model an entry extends, and types its `model` as that base model's
|
|
289
|
+
* schema. A model's own fields beyond it are not typed.
|
|
290
|
+
* * `modules` record inputs before references resolve.
|
|
291
|
+
*
|
|
154
292
|
* @group Types
|
|
155
293
|
*/
|
|
156
294
|
export type ModelSerializedOutput = {
|
|
157
|
-
anchors: (
|
|
295
|
+
anchors: (AnchorSerializedOutput & {
|
|
158
296
|
className: string;
|
|
159
|
-
location:
|
|
160
|
-
|
|
297
|
+
location: {
|
|
298
|
+
context: string;
|
|
299
|
+
type: `${NodeType}`;
|
|
161
300
|
};
|
|
162
301
|
})[];
|
|
163
302
|
dependencies: IDependency[];
|
|
164
303
|
models: {
|
|
165
|
-
[
|
|
304
|
+
[context: string]: {
|
|
305
|
+
[N in ModelName]: {
|
|
306
|
+
className: string;
|
|
307
|
+
model: BaseModelSchemas[N];
|
|
308
|
+
moduleId: string;
|
|
309
|
+
nodeName: N;
|
|
310
|
+
};
|
|
311
|
+
}[ModelName];
|
|
312
|
+
};
|
|
313
|
+
modules: {
|
|
314
|
+
[moduleId: string]: {
|
|
166
315
|
className: string;
|
|
167
|
-
|
|
316
|
+
inputs: {
|
|
317
|
+
[key: string]: unknown;
|
|
318
|
+
};
|
|
168
319
|
};
|
|
169
320
|
};
|
|
170
321
|
overlays: {
|
|
171
322
|
className: string;
|
|
172
|
-
|
|
323
|
+
context: string;
|
|
324
|
+
moduleId: string;
|
|
325
|
+
overlay: {
|
|
326
|
+
anchors: AnchorSerializedOutput[];
|
|
327
|
+
overlayId: string;
|
|
328
|
+
properties: {
|
|
329
|
+
[key: string]: unknown;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
}[];
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* A resource as written to state.
|
|
336
|
+
* * `parentSchemaTranslator` is the source of the function a child reads that parent through.
|
|
337
|
+
*
|
|
338
|
+
* @group Types
|
|
339
|
+
*/
|
|
340
|
+
export type ResourceSerializedSchema = {
|
|
341
|
+
localResourceId: string;
|
|
342
|
+
parents: {
|
|
343
|
+
context: string;
|
|
344
|
+
parentSchemaTranslator?: string;
|
|
173
345
|
}[];
|
|
346
|
+
properties: {
|
|
347
|
+
[key: string]: unknown;
|
|
348
|
+
};
|
|
349
|
+
resourceId: string;
|
|
350
|
+
response: {
|
|
351
|
+
[key: string]: string;
|
|
352
|
+
};
|
|
353
|
+
scope: string[];
|
|
354
|
+
tags: {
|
|
355
|
+
[key: string]: string;
|
|
356
|
+
};
|
|
174
357
|
};
|
|
175
358
|
/**
|
|
359
|
+
* The resource graph as written to `resources-actual.json` and `resources-old.json`.
|
|
360
|
+
* * `createdBy` is the context of the model or overlay whose action created the resource.
|
|
361
|
+
* * `models` record the context of every model and overlay whose action produced the resource.
|
|
362
|
+
*
|
|
176
363
|
* @group Types
|
|
177
364
|
*/
|
|
178
365
|
export type ResourceSerializedOutput = {
|
|
179
366
|
dependencies: IDependency[];
|
|
180
367
|
resources: {
|
|
181
|
-
[
|
|
368
|
+
[context: string]: {
|
|
182
369
|
className: string;
|
|
183
|
-
|
|
370
|
+
createdBy?: string;
|
|
371
|
+
kind: 'external' | 'terraform';
|
|
372
|
+
models: string[];
|
|
373
|
+
moduleId: string;
|
|
374
|
+
resource: ResourceSerializedSchema;
|
|
184
375
|
};
|
|
185
376
|
};
|
|
186
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* A record of one generated terraform module folder, kept in state so that a later run can tell
|
|
380
|
+
* which folders it owns.
|
|
381
|
+
*
|
|
382
|
+
* @group Types
|
|
383
|
+
*/
|
|
384
|
+
export type TerraformFolderOutput = {
|
|
385
|
+
hasExternalResources: boolean;
|
|
386
|
+
moduleId: string;
|
|
387
|
+
/**
|
|
388
|
+
* The resources whose terraform state moves into this folder from another before terraform runs,
|
|
389
|
+
* each with the addresses and output names it moves from and to.
|
|
390
|
+
*/
|
|
391
|
+
moves?: {
|
|
392
|
+
addresses: {
|
|
393
|
+
from: string;
|
|
394
|
+
to: string;
|
|
395
|
+
}[];
|
|
396
|
+
fromModuleId: string;
|
|
397
|
+
outputs: {
|
|
398
|
+
from: string;
|
|
399
|
+
to: string;
|
|
400
|
+
}[];
|
|
401
|
+
resourceId: string;
|
|
402
|
+
}[];
|
|
403
|
+
providers: {
|
|
404
|
+
accountId: string;
|
|
405
|
+
blockHcl: string;
|
|
406
|
+
providerType: string;
|
|
407
|
+
regionId: string;
|
|
408
|
+
requiredProvider: {
|
|
409
|
+
minVersion?: string;
|
|
410
|
+
source: string;
|
|
411
|
+
};
|
|
412
|
+
}[];
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* A record of where one octo resource ended up in terraform, kept in state so that a plan entry can
|
|
416
|
+
* be traced back to the resource that produced it.
|
|
417
|
+
*
|
|
418
|
+
* @group Types
|
|
419
|
+
*/
|
|
420
|
+
export type TerraformResourceOutput = {
|
|
421
|
+
/**
|
|
422
|
+
* Set when destroying the resource loses data, as its class declares.
|
|
423
|
+
*/
|
|
424
|
+
destroyLosesData?: true;
|
|
425
|
+
moduleId: string;
|
|
426
|
+
resourceContext: string;
|
|
427
|
+
resourceId: string;
|
|
428
|
+
terraformAddresses: string[];
|
|
429
|
+
};
|
|
187
430
|
/**
|
|
188
431
|
* @internal
|
|
189
432
|
*/
|
|
190
433
|
export type TransactionOptions = {
|
|
191
|
-
enableResourceCapture?: boolean;
|
|
192
434
|
enableResourceValidation?: boolean;
|
|
435
|
+
filterResourceDiffsByResourceId?: string;
|
|
436
|
+
generateTerraform?: boolean;
|
|
437
|
+
skipActualResourceUpdate?: boolean;
|
|
193
438
|
yieldModelDiffs?: boolean;
|
|
194
439
|
yieldModelTransaction?: boolean;
|
|
195
440
|
yieldResourceDiffs?: boolean;
|
|
196
441
|
yieldResourceTransaction?: boolean;
|
|
197
442
|
};
|
|
198
443
|
/**
|
|
199
|
-
*
|
|
200
|
-
|
|
201
|
-
export type ModifyInterface<T, R> = Omit<T, keyof R> & R;
|
|
202
|
-
/**
|
|
444
|
+
* The schema of an anchor class.
|
|
445
|
+
*
|
|
203
446
|
* @group Types
|
|
204
447
|
*/
|
|
205
448
|
export type AnchorSchema<T> = T extends AAnchor<infer S, any> ? S : never;
|
|
206
449
|
/**
|
|
450
|
+
* Everything an action knows about the module it belongs to: the inputs it was loaded with, whatever
|
|
451
|
+
* {@link AModule.registerMetadata} derived, and the nodes the module produced.
|
|
452
|
+
*
|
|
453
|
+
* This is the second argument of {@link IModelAction.handle}.
|
|
454
|
+
*
|
|
207
455
|
* @group Types
|
|
208
456
|
*/
|
|
209
457
|
export type EnhancedModuleSchema<T extends UnknownModule> = {
|
|
@@ -218,16 +466,21 @@ export type EnhancedModuleSchema<T extends UnknownModule> = {
|
|
|
218
466
|
/**
|
|
219
467
|
* @internal
|
|
220
468
|
*/
|
|
221
|
-
export type
|
|
469
|
+
export type GeneratorYieldType<T extends (...args: any) => AsyncGenerator<any>> = ReturnType<T> extends AsyncGenerator<infer Y> ? Y : never;
|
|
222
470
|
/**
|
|
223
471
|
* @internal
|
|
224
472
|
*/
|
|
225
|
-
export type
|
|
473
|
+
export type ModelSchema<T> = T extends AModel<infer S, any> ? S : never;
|
|
226
474
|
/**
|
|
475
|
+
* The schema of a module class.
|
|
476
|
+
*
|
|
227
477
|
* @group Types
|
|
228
478
|
*/
|
|
229
479
|
export type ModuleSchema<T> = T extends AModule<infer S, any> ? S : never;
|
|
230
480
|
/**
|
|
481
|
+
* A module's schema as the caller supplies it - properties with a default become optional.
|
|
482
|
+
* This is the shape {@link Octo.loadModule} accepts.
|
|
483
|
+
*
|
|
231
484
|
* @group Types
|
|
232
485
|
*/
|
|
233
486
|
export type ModuleSchemaInputs<T> = {
|
|
@@ -240,10 +493,14 @@ export type ModuleSchemaInputs<T> = {
|
|
|
240
493
|
*/
|
|
241
494
|
export type NodeSchema<T> = T extends ANode<infer S, any> ? S : never;
|
|
242
495
|
/**
|
|
496
|
+
* The schema of an overlay class.
|
|
497
|
+
*
|
|
243
498
|
* @group Types
|
|
244
499
|
*/
|
|
245
500
|
export type OverlaySchema<T> = T extends AOverlay<infer S, any> ? S : never;
|
|
246
501
|
/**
|
|
502
|
+
* The schema of a resource class.
|
|
503
|
+
*
|
|
247
504
|
* @group Types
|
|
248
505
|
*/
|
|
249
506
|
export type ResourceSchema<T> = T extends AResource<infer S, any> ? S : never;
|
|
@@ -283,3 +540,4 @@ export type UnknownOverlay = AOverlay<BaseOverlaySchema, any>;
|
|
|
283
540
|
* @internal
|
|
284
541
|
*/
|
|
285
542
|
export type UnknownResource = AResource<any, any>;
|
|
543
|
+
export {};
|