@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
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { type ModelSerializedOutput, NodeType, type ResourceSerializedOutput, type TerraformFolderOutput, type TerraformResourceOutput, type UnknownResource } from '../../app.type.js';
|
|
2
|
+
import { Diff } from '../../functions/diff/diff.js';
|
|
3
|
+
import type { Octo } from '../../main.js';
|
|
4
|
+
import type { App } from '../../models/app/app.model.js';
|
|
5
|
+
import type { TerraformPlan } from '../../modes/validate.mode.js';
|
|
6
|
+
import { ResourceDataRepository } from '../../resources/resource-data.repository.js';
|
|
7
|
+
import { AResource } from '../../resources/resource.abstract.js';
|
|
8
|
+
import type { BaseResourceSchema } from '../../resources/resource.schema.js';
|
|
9
|
+
import { ATerraformResource } from '../../resources/terraform-resource.abstract.js';
|
|
10
|
+
import { StateManagementService } from '../../services/state-management/state-management.service.js';
|
|
11
|
+
import { type TerraformModuleScope } from '../../services/terraform/terraform.service.js';
|
|
12
|
+
/**
|
|
13
|
+
* An external resource: lifecycle runs outside terraform via a resource action.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare class ExternalIgwResource extends AResource<BaseResourceSchema, ExternalIgwResource> {
|
|
18
|
+
static readonly NODE_NAME: string;
|
|
19
|
+
static readonly NODE_PACKAGE: string;
|
|
20
|
+
static readonly NODE_SCHEMA: {};
|
|
21
|
+
static readonly NODE_TYPE: NodeType;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
constructor(resourceId: string, properties?: BaseResourceSchema['properties'], parents?: UnknownResource[]);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A native terraform resource that references an (external) parent via `getRef`.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare class TfSgResource extends ATerraformResource<BaseResourceSchema, TfSgResource> {
|
|
33
|
+
static readonly NODE_NAME: string;
|
|
34
|
+
static readonly NODE_PACKAGE: string;
|
|
35
|
+
static readonly NODE_SCHEMA: {};
|
|
36
|
+
static readonly NODE_TYPE: NodeType;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
constructor(resourceId: string, properties?: BaseResourceSchema['properties'], parents?: UnknownResource[]);
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
toHCL(terraform: TerraformModuleScope): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A native terraform resource that contributes an `aws_vpc` block and publishes its id.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare class TfVpcResource extends ATerraformResource<BaseResourceSchema, TfVpcResource> {
|
|
52
|
+
static readonly NODE_NAME: string;
|
|
53
|
+
static readonly NODE_PACKAGE: string;
|
|
54
|
+
static readonly NODE_SCHEMA: {};
|
|
55
|
+
static readonly NODE_TYPE: NodeType;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
constructor(resourceId: string, properties?: BaseResourceSchema['properties'], parents?: UnknownResource[]);
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
toHCL(terraform: TerraformModuleScope): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A native terraform resource whose author declares that any property change recreates it: its
|
|
67
|
+
* `diffProperties` emits a single `REPLACE` instead of a granular update. Used to exercise the
|
|
68
|
+
* first-class REPLACE action and the validate replacement cascade.
|
|
69
|
+
*
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare class ReplacingTfVpcResource extends ATerraformResource<BaseResourceSchema, ReplacingTfVpcResource> {
|
|
73
|
+
static readonly NODE_NAME: string;
|
|
74
|
+
static readonly NODE_PACKAGE: string;
|
|
75
|
+
static readonly NODE_SCHEMA: {};
|
|
76
|
+
static readonly NODE_TYPE: NodeType;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
constructor(resourceId: string, properties?: BaseResourceSchema['properties'], parents?: UnknownResource[]);
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
diffProperties(previous: ReplacingTfVpcResource): Promise<Diff[]>;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
toHCL(terraform: TerraformModuleScope): Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A native terraform resource whose author refuses any property update by throwing in
|
|
92
|
+
* `diffProperties`. Used to prove that an author refusal in a `diff*` method aborts generation
|
|
93
|
+
* before any HCL is built. Its `toHCL` records every invocation in {@link toHCLInvocations}, so a
|
|
94
|
+
* test can assert it was never reached when the diff threw.
|
|
95
|
+
*
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export declare class RefusingTfResource extends ATerraformResource<BaseResourceSchema, RefusingTfResource> {
|
|
99
|
+
static readonly NODE_NAME: string;
|
|
100
|
+
static readonly NODE_PACKAGE: string;
|
|
101
|
+
static readonly NODE_SCHEMA: {};
|
|
102
|
+
static readonly NODE_TYPE: NodeType;
|
|
103
|
+
static readonly toHCLInvocations: string[];
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
constructor(resourceId: string, properties?: BaseResourceSchema['properties'], parents?: UnknownResource[]);
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
diffProperties(previous: RefusingTfResource): Promise<Diff[]>;
|
|
112
|
+
/**
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
toHCL(terraform: TerraformModuleScope): Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Test harness for the `Octo` mode functions. {@link create} bootstraps an isolated container (via
|
|
119
|
+
* {@link TestContainer}) with real test terraform + transaction services and an external igw
|
|
120
|
+
* resource action, mirroring the wiring an `Octo` boot performs; the mode functions under test
|
|
121
|
+
* resolve those services from the container themselves. The instance exposes the standard
|
|
122
|
+
* vpc → igw → sg graph across two module folders plus helpers to fabricate terraform plan/state
|
|
123
|
+
* fixtures.
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
export declare class TestModes {
|
|
128
|
+
private readonly octo;
|
|
129
|
+
readonly outputDir: string;
|
|
130
|
+
readonly resourceDataRepository: ResourceDataRepository;
|
|
131
|
+
readonly stateManagementService: StateManagementService;
|
|
132
|
+
private readonly terraformService;
|
|
133
|
+
private readonly testModuleContainer;
|
|
134
|
+
readonly igwActionHandledDiffs: Diff[];
|
|
135
|
+
/**
|
|
136
|
+
* Replaces what the igw resource action does. Set it to throw, and a spec can exercise how a
|
|
137
|
+
* caller behaves when a resource action fails - the delete that commit drives, in particular.
|
|
138
|
+
*/
|
|
139
|
+
igwActionHandler?: (diff: Diff) => Promise<BaseResourceSchema['response']>;
|
|
140
|
+
/**
|
|
141
|
+
* The response the igw resource action returns. Mutable, and deliberately looser than
|
|
142
|
+
* `BaseResourceSchema['response']`, so a spec can hand back what a real SDK action can return at
|
|
143
|
+
* runtime but the schema type forbids - a number, a boolean, a null.
|
|
144
|
+
*/
|
|
145
|
+
igwResponse: Record<string, unknown>;
|
|
146
|
+
readonly outputs: Map<string, Record<string, {
|
|
147
|
+
value: unknown;
|
|
148
|
+
}>>;
|
|
149
|
+
readonly plans: Map<string, TerraformPlan>;
|
|
150
|
+
private readonly terraformConfigs;
|
|
151
|
+
private readonly terraformProviders;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
private constructor();
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
static create(): Promise<TestModes>;
|
|
160
|
+
/**
|
|
161
|
+
* Registers an additional resource into an existing module folder, the way a model action would
|
|
162
|
+
* contribute a new resource on a re-run. Use after {@link createResourceGraph} to exercise an add
|
|
163
|
+
* of a brand-new resource (module-attributed, so it lands in the named folder rather than the
|
|
164
|
+
* provider-less `default` folder).
|
|
165
|
+
*/
|
|
166
|
+
addResource(moduleId: string, resource: UnknownResource): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Simulates deleting every terraform config/provider declaration from `octo.yml`: the next
|
|
169
|
+
* simulated fresh process boots without them, the way a real process would after the edit.
|
|
170
|
+
*/
|
|
171
|
+
clearTerraformRegistrations(): void;
|
|
172
|
+
/**
|
|
173
|
+
* Takes the app lock the CLI would have taken, unless the caller supplied one, and releases it
|
|
174
|
+
* afterwards however the commit turned out, so a test never leaves one behind.
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
commit(app: Parameters<Octo['commit']>[0], options: Omit<Parameters<Octo['commit']>[1], 'lockId'> & {
|
|
179
|
+
lockId?: string;
|
|
180
|
+
}, transaction?: Parameters<Octo['commit']>[2]): ReturnType<Octo['commit']>;
|
|
181
|
+
/**
|
|
182
|
+
* The same two folders as {@link createResourceGraph}, with the security group reading
|
|
183
|
+
* the vpc across the folder boundary instead of the (external) internet gateway. That is the one
|
|
184
|
+
* shape the standard graph cannot make: a terraform resource whose dependency output terragrunt
|
|
185
|
+
* can mock.
|
|
186
|
+
*
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
createCrossModuleResourceGraph(options?: {
|
|
190
|
+
save?: boolean;
|
|
191
|
+
}): Promise<{
|
|
192
|
+
app: App;
|
|
193
|
+
sg: TfSgResource;
|
|
194
|
+
vpc: TfVpcResource;
|
|
195
|
+
}>;
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
*/
|
|
199
|
+
createProviderBoundResourceGraph(provider: {
|
|
200
|
+
accountId: string;
|
|
201
|
+
regionId?: string;
|
|
202
|
+
}): Promise<{
|
|
203
|
+
app: App;
|
|
204
|
+
vpc: TfVpcResource;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Stages a single {@link RefusingTfResource} in `region-module`. With `save: true`, commits it so a
|
|
208
|
+
* later re-stage with changed properties drives an update that the resource refuses. Used to prove
|
|
209
|
+
* that an author refusal in `diff*` aborts generation before HCL is built.
|
|
210
|
+
*/
|
|
211
|
+
createRefusingResourceGraph(options?: {
|
|
212
|
+
save?: boolean;
|
|
213
|
+
}): Promise<{
|
|
214
|
+
app: App;
|
|
215
|
+
refusing: RefusingTfResource;
|
|
216
|
+
}>;
|
|
217
|
+
/**
|
|
218
|
+
* Same `vpc → igw → sg` shape as {@link createResourceGraph}, but the vpc is a
|
|
219
|
+
* {@link ReplacingTfVpcResource}, so changing its properties later yields a REPLACE that cascades
|
|
220
|
+
* (in terraform) onto igw and sg. Used to exercise the validate replacement cascade.
|
|
221
|
+
*/
|
|
222
|
+
createReplaceableResourceGraph(options?: {
|
|
223
|
+
save?: boolean;
|
|
224
|
+
}): Promise<{
|
|
225
|
+
app: App;
|
|
226
|
+
igw: ExternalIgwResource;
|
|
227
|
+
sg: TfSgResource;
|
|
228
|
+
vpc: ReplacingTfVpcResource;
|
|
229
|
+
}>;
|
|
230
|
+
/**
|
|
231
|
+
* @internal
|
|
232
|
+
*/
|
|
233
|
+
createResourceGraph(options?: {
|
|
234
|
+
save?: boolean;
|
|
235
|
+
}): Promise<{
|
|
236
|
+
app: App;
|
|
237
|
+
igw: ExternalIgwResource;
|
|
238
|
+
sg: TfSgResource;
|
|
239
|
+
vpc: TfVpcResource;
|
|
240
|
+
}>;
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
244
|
+
generate(...args: Parameters<Octo['generate']>): ReturnType<Octo['generate']>;
|
|
245
|
+
/**
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
248
|
+
getCommittedTerraformState(): Promise<{
|
|
249
|
+
terraformFolders: TerraformFolderOutput[];
|
|
250
|
+
terraformResources: TerraformResourceOutput[];
|
|
251
|
+
}>;
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
getModelState(): Promise<ModelSerializedOutput>;
|
|
256
|
+
/**
|
|
257
|
+
* @internal
|
|
258
|
+
*/
|
|
259
|
+
getResourceState(fileName?: string): Promise<ResourceSerializedOutput>;
|
|
260
|
+
/**
|
|
261
|
+
* @internal
|
|
262
|
+
*/
|
|
263
|
+
getTerraformFolderRecords(): Promise<TerraformFolderOutput[]>;
|
|
264
|
+
/**
|
|
265
|
+
* What the igw resource action matches. Mutable so a spec can narrow it and exercise a diff that
|
|
266
|
+
* no registered action handles.
|
|
267
|
+
*/
|
|
268
|
+
igwActionFilter: (diff: Diff) => boolean;
|
|
269
|
+
/**
|
|
270
|
+
* @internal
|
|
271
|
+
*/
|
|
272
|
+
registerTerraformConfig(...args: Parameters<Octo['registerTerraformConfig']>): void;
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
*/
|
|
276
|
+
registerTerraformProvider(...args: Parameters<Octo['registerTerraformProvider']>): void;
|
|
277
|
+
/**
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
runAction(...args: Parameters<Octo['runAction']>): ReturnType<Octo['runAction']>;
|
|
281
|
+
/**
|
|
282
|
+
* Plants a terraform folder record into `models.json`, as if a past generate had written those
|
|
283
|
+
* folders.
|
|
284
|
+
*/
|
|
285
|
+
seedModelTerraformFolders(records: TerraformFolderOutput[]): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Simulates the boot of a fresh octo process: fully reset the terraform service, then replay the
|
|
288
|
+
* recorded config/provider registrations (config before providers, as boot order requires).
|
|
289
|
+
*/
|
|
290
|
+
simulateFreshProcess(): Promise<void>;
|
|
291
|
+
/**
|
|
292
|
+
* @internal
|
|
293
|
+
*/
|
|
294
|
+
teardown(): Promise<void>;
|
|
295
|
+
/**
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
validate(...args: Parameters<Octo['validate']>): ReturnType<Octo['validate']>;
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
writePlan(moduleId: string, resourceChanges: {
|
|
303
|
+
actions: string[];
|
|
304
|
+
address: string;
|
|
305
|
+
after?: Record<string, unknown>;
|
|
306
|
+
afterSensitive?: unknown;
|
|
307
|
+
afterUnknown?: unknown;
|
|
308
|
+
before?: Record<string, unknown>;
|
|
309
|
+
beforeSensitive?: unknown;
|
|
310
|
+
}[]): void;
|
|
311
|
+
/**
|
|
312
|
+
* @internal
|
|
313
|
+
*/
|
|
314
|
+
writeTfState(moduleId: string, outputs: Record<string, unknown>): void;
|
|
315
|
+
}
|