@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,43 @@
|
|
|
1
|
+
import { Event } from './event.model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The superclass of the events marking one command a driver runs, such as one `octo` CLI command.
|
|
4
|
+
* A command may run several modes, or none.
|
|
5
|
+
*
|
|
6
|
+
* @group Events/Command
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class CommandEvent<T extends {
|
|
9
|
+
command: string;
|
|
10
|
+
} = {
|
|
11
|
+
command: string;
|
|
12
|
+
}> extends Event<T> {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This event is emitted when a command begins.
|
|
16
|
+
*
|
|
17
|
+
* @group Events/Command
|
|
18
|
+
*/
|
|
19
|
+
export declare class CommandStartedEvent extends CommandEvent {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This event is emitted when a command completes successfully. A listener that returns a promise is
|
|
23
|
+
* awaited, so it can finish writing before the process exits.
|
|
24
|
+
*
|
|
25
|
+
* @group Events/Command
|
|
26
|
+
*/
|
|
27
|
+
export declare class CommandFinishedEvent extends CommandEvent<{
|
|
28
|
+
command: string;
|
|
29
|
+
durationInMs: number;
|
|
30
|
+
}> {
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* This event is emitted when a command fails. A listener that returns a promise is awaited, so it
|
|
34
|
+
* can finish writing before the process exits.
|
|
35
|
+
*
|
|
36
|
+
* @group Events/Command
|
|
37
|
+
*/
|
|
38
|
+
export declare class CommandFailedEvent extends CommandEvent<{
|
|
39
|
+
command: string;
|
|
40
|
+
durationInMs: number;
|
|
41
|
+
error: Error;
|
|
42
|
+
}> {
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Event } from './event.model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The superclass of the events marking one command a driver runs, such as one `octo` CLI command.
|
|
4
|
+
* A command may run several modes, or none.
|
|
5
|
+
*
|
|
6
|
+
* @group Events/Command
|
|
7
|
+
*/
|
|
8
|
+
export class CommandEvent extends Event {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This event is emitted when a command begins.
|
|
12
|
+
*
|
|
13
|
+
* @group Events/Command
|
|
14
|
+
*/
|
|
15
|
+
export class CommandStartedEvent extends CommandEvent {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This event is emitted when a command completes successfully. A listener that returns a promise is
|
|
19
|
+
* awaited, so it can finish writing before the process exits.
|
|
20
|
+
*
|
|
21
|
+
* @group Events/Command
|
|
22
|
+
*/
|
|
23
|
+
export class CommandFinishedEvent extends CommandEvent {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* This event is emitted when a command fails. A listener that returns a promise is awaited, so it
|
|
27
|
+
* can finish writing before the process exits.
|
|
28
|
+
*
|
|
29
|
+
* @group Events/Command
|
|
30
|
+
*/
|
|
31
|
+
export class CommandFailedEvent extends CommandEvent {
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=command.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.event.js","sourceRoot":"","sources":["../../src/events/command.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,OAAgB,YAAkE,SAAQ,KAAQ;CAAG;AAE3G;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,YAAY;CAAG;AAExD;;;;;GAKG;AACH,MAAM,OAAO,oBAAqB,SAAQ,YAAuD;CAAG;AAEpG;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,YAAqE;CAAG"}
|
|
@@ -1,33 +1,51 @@
|
|
|
1
1
|
import type { EventService } from '../services/event/event.service.js';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* The superclass of every event Octo emits.
|
|
4
|
+
*
|
|
5
|
+
* Octo narrates its whole run as events - what registered, what changed, what terraform did, what
|
|
6
|
+
* each mode concluded. Subscribe with {@link OnEvent} to build logging, reporting, or notifications
|
|
7
|
+
* on top of a run without touching the framework. Emit your own by extending it.
|
|
6
8
|
*
|
|
7
9
|
* @example
|
|
8
10
|
* ```ts
|
|
9
|
-
*
|
|
10
|
-
* EventService.getInstance().emit(
|
|
11
|
+
* class DeployApprovedEvent extends Event<{ reviewer: string }> {}
|
|
12
|
+
* EventService.getInstance().emit(new DeployApprovedEvent('deploy approved', { reviewer: 'ops-lead' }));
|
|
11
13
|
* ```
|
|
12
14
|
*
|
|
13
15
|
* @group Events
|
|
14
|
-
*
|
|
15
|
-
* @returns The Event instance.
|
|
16
16
|
*/
|
|
17
|
-
export declare class Event<T = undefined> {
|
|
17
|
+
export declare abstract class Event<T = undefined> {
|
|
18
|
+
/**
|
|
19
|
+
* When the event was created. `sequence` counts every event this process created, so it orders
|
|
20
|
+
* two events created in the same millisecond, and events a late listener receives replayed.
|
|
21
|
+
*/
|
|
18
22
|
readonly header: {
|
|
23
|
+
sequence: number;
|
|
19
24
|
timestamp: number;
|
|
20
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* The subject of the event, when the event type alone does not identify it - e.g. the class name
|
|
28
|
+
* on a registration event. Empty otherwise.
|
|
29
|
+
*/
|
|
21
30
|
readonly name: string;
|
|
31
|
+
/**
|
|
32
|
+
* The event's data. Its shape is fixed by the event type.
|
|
33
|
+
*/
|
|
22
34
|
readonly payload: T;
|
|
35
|
+
/**
|
|
36
|
+
* @param name The subject of the event, when the event type alone does not identify it.
|
|
37
|
+
* @param payload The event's data.
|
|
38
|
+
*/
|
|
23
39
|
constructor(name?: string, payload?: T);
|
|
24
40
|
/**
|
|
25
41
|
* The `registrar()` method is explicitly called by the {@link EventSource} decorator for a method
|
|
26
42
|
* to enhance that method to auto-emit events.
|
|
27
43
|
*
|
|
44
|
+
* @internal
|
|
28
45
|
* @param args Arguments are spread out using the array spread operator.
|
|
29
46
|
* - args[0] - Instance of {@link EventService}.
|
|
30
47
|
* - args[1] - [PropertyDescriptor](https://www.typescriptlang.org/docs/handbook/decorators.html).
|
|
48
|
+
*
|
|
31
49
|
*/
|
|
32
50
|
static registrar(...args: [EventService, PropertyDescriptor]): void;
|
|
33
51
|
}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
+
let nextSequence = 0;
|
|
1
2
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* The superclass of every event Octo emits.
|
|
4
|
+
*
|
|
5
|
+
* Octo narrates its whole run as events - what registered, what changed, what terraform did, what
|
|
6
|
+
* each mode concluded. Subscribe with {@link OnEvent} to build logging, reporting, or notifications
|
|
7
|
+
* on top of a run without touching the framework. Emit your own by extending it.
|
|
5
8
|
*
|
|
6
9
|
* @example
|
|
7
10
|
* ```ts
|
|
8
|
-
*
|
|
9
|
-
* EventService.getInstance().emit(
|
|
11
|
+
* class DeployApprovedEvent extends Event<{ reviewer: string }> {}
|
|
12
|
+
* EventService.getInstance().emit(new DeployApprovedEvent('deploy approved', { reviewer: 'ops-lead' }));
|
|
10
13
|
* ```
|
|
11
14
|
*
|
|
12
15
|
* @group Events
|
|
13
|
-
*
|
|
14
|
-
* @returns The Event instance.
|
|
15
16
|
*/
|
|
16
17
|
export class Event {
|
|
18
|
+
/**
|
|
19
|
+
* @param name The subject of the event, when the event type alone does not identify it.
|
|
20
|
+
* @param payload The event's data.
|
|
21
|
+
*/
|
|
17
22
|
constructor(name, payload) {
|
|
18
23
|
this.header = {
|
|
24
|
+
sequence: nextSequence++,
|
|
19
25
|
timestamp: Date.now(),
|
|
20
26
|
};
|
|
21
27
|
this.name = name || '';
|
|
@@ -25,9 +31,11 @@ export class Event {
|
|
|
25
31
|
* The `registrar()` method is explicitly called by the {@link EventSource} decorator for a method
|
|
26
32
|
* to enhance that method to auto-emit events.
|
|
27
33
|
*
|
|
34
|
+
* @internal
|
|
28
35
|
* @param args Arguments are spread out using the array spread operator.
|
|
29
36
|
* - args[0] - Instance of {@link EventService}.
|
|
30
37
|
* - args[1] - [PropertyDescriptor](https://www.typescriptlang.org/docs/handbook/decorators.html).
|
|
38
|
+
*
|
|
31
39
|
*/
|
|
32
40
|
static registrar(...args) {
|
|
33
41
|
if (args.length !== 2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.model.js","sourceRoot":"","sources":["../../src/events/event.model.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"event.model.js","sourceRoot":"","sources":["../../src/events/event.model.ts"],"names":[],"mappings":"AAEA,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAgB,KAAK;IAqBzB;;;OAGG;IACH,YAAY,IAAa,EAAE,OAAW;QACpC,IAAI,CAAC,MAAM,GAAG;YACZ,QAAQ,EAAE,YAAY,EAAE;YACxB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAY,CAAC;IAC9B,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,IAAwC;QAC1D,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAChE,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -3,17 +3,13 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The CommitHookEvent class is the superclass for all events emitting in relation to commit hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Commit
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
|
-
export declare class CommitHookEvent extends HookEvent {
|
|
7
|
+
export declare abstract class CommitHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
10
|
* This hook event is emitted when a post-commit hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Commit
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export declare class PostCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export declare class PostCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
|
21
17
|
* This hook event is emitted when a pre-commit hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Commit
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export declare class PreCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
28
22
|
}
|
|
@@ -3,8 +3,6 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The CommitHookEvent class is the superclass for all events emitting in relation to commit hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Commit
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
7
|
export class CommitHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
@@ -12,8 +10,6 @@ export class CommitHookEvent extends HookEvent {
|
|
|
12
10
|
* This hook event is emitted when a post-commit hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Commit
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export class PostCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export class PostCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
|
21
17
|
* This hook event is emitted when a pre-commit hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Commit
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export class PreCommitHookCallbackDoneEvent extends CommitHookEvent {
|
|
28
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/commit.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"commit.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/commit.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,OAAgB,eAAgB,SAAQ,SAAS;CAAG;AAE1D;;;;GAIG;AACH,MAAM,OAAO,+BAAgC,SAAQ,eAAe;CAAG;AAEvE;;;;GAIG;AACH,MAAM,OAAO,8BAA+B,SAAQ,eAAe;CAAG"}
|
|
@@ -3,8 +3,6 @@ import { Event } from '../event.model.js';
|
|
|
3
3
|
* The HookEvent class is the superclass for all events emitting in relation to hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
|
-
export declare class HookEvent extends Event<
|
|
7
|
+
export declare abstract class HookEvent extends Event<undefined> {
|
|
10
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;;;GAIG;AACH,MAAM,OAAgB,SAAU,SAAQ,KAAgB;CAAG"}
|
|
@@ -3,17 +3,13 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The ModelActionHookEvent class is the superclass for all events emitting in relation to model action hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Model
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
|
-
export declare class ModelActionHookEvent extends HookEvent {
|
|
7
|
+
export declare abstract class ModelActionHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
10
|
* This hook event is emitted when a post-model action hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Model
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export declare class PostModelActionHookCallbackDoneEvent extends ModelActionHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export declare class PostModelActionHookCallbackDoneEvent extends ModelActionHoo
|
|
|
21
17
|
* This hook event is emitted when a pre-model action hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Model
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export declare class PreModelActionHookCallbackDoneEvent extends ModelActionHookEvent {
|
|
28
22
|
}
|
|
@@ -3,8 +3,6 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The ModelActionHookEvent class is the superclass for all events emitting in relation to model action hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Model
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
7
|
export class ModelActionHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
@@ -12,8 +10,6 @@ export class ModelActionHookEvent extends HookEvent {
|
|
|
12
10
|
* This hook event is emitted when a post-model action hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Model
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export class PostModelActionHookCallbackDoneEvent extends ModelActionHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export class PostModelActionHookCallbackDoneEvent extends ModelActionHookEvent {
|
|
|
21
17
|
* This hook event is emitted when a pre-model action hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Model
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export class PreModelActionHookCallbackDoneEvent extends ModelActionHookEvent {
|
|
28
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/model.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"model.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/model.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,SAAS;CAAG;AAE/D;;;;GAIG;AACH,MAAM,OAAO,oCAAqC,SAAQ,oBAAoB;CAAG;AAEjF;;;;GAIG;AACH,MAAM,OAAO,mCAAoC,SAAQ,oBAAoB;CAAG"}
|
|
@@ -3,17 +3,13 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The ResourceActionHookEvent class is the superclass for all events emitting in relation to resource action hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Resource
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
|
-
export declare class ResourceActionHookEvent extends HookEvent {
|
|
7
|
+
export declare abstract class ResourceActionHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
10
|
* This hook event is emitted when a post-resource action hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Resource
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export declare class PostResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export declare class PostResourceActionHookCallbackDoneEvent extends ResourceAct
|
|
|
21
17
|
* This hook event is emitted when a pre-resource action hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Resource
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export declare class PreResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
28
22
|
}
|
|
@@ -3,8 +3,6 @@ import { HookEvent } from './hook.event.js';
|
|
|
3
3
|
* The ResourceActionHookEvent class is the superclass for all events emitting in relation to resource action hooks.
|
|
4
4
|
*
|
|
5
5
|
* @group Events/Hooks/Resource
|
|
6
|
-
*
|
|
7
|
-
* @returns The Event instance.
|
|
8
6
|
*/
|
|
9
7
|
export class ResourceActionHookEvent extends HookEvent {
|
|
10
8
|
}
|
|
@@ -12,8 +10,6 @@ export class ResourceActionHookEvent extends HookEvent {
|
|
|
12
10
|
* This hook event is emitted when a post-resource action hook callback is done executing.
|
|
13
11
|
*
|
|
14
12
|
* @group Events/Hooks/Resource
|
|
15
|
-
*
|
|
16
|
-
* @returns The Event instance.
|
|
17
13
|
*/
|
|
18
14
|
export class PostResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
19
15
|
}
|
|
@@ -21,8 +17,6 @@ export class PostResourceActionHookCallbackDoneEvent extends ResourceActionHookE
|
|
|
21
17
|
* This hook event is emitted when a pre-resource action hook callback is done executing.
|
|
22
18
|
*
|
|
23
19
|
* @group Events/Hooks/Resource
|
|
24
|
-
*
|
|
25
|
-
* @returns The Event instance.
|
|
26
20
|
*/
|
|
27
21
|
export class PreResourceActionHookCallbackDoneEvent extends ResourceActionHookEvent {
|
|
28
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/resource.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"resource.hook.event.js","sourceRoot":"","sources":["../../../src/events/hook/resource.hook.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,OAAgB,uBAAwB,SAAQ,SAAS;CAAG;AAElE;;;;GAIG;AACH,MAAM,OAAO,uCAAwC,SAAQ,uBAAuB;CAAG;AAEvF;;;;GAIG;AACH,MAAM,OAAO,sCAAuC,SAAQ,uBAAuB;CAAG"}
|
package/dist/events/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export * from './action.event.js';
|
|
2
|
+
export * from './command.event.js';
|
|
2
3
|
export * from './event.model.js';
|
|
3
4
|
export * from './hook/index.js';
|
|
5
|
+
export * from './mode.event.js';
|
|
6
|
+
export * from './mode-result.event.js';
|
|
4
7
|
export * from './module.event.js';
|
|
5
8
|
export * from './registration.event.js';
|
|
6
9
|
export * from './serialization.event.js';
|
|
10
|
+
export * from './state.event.js';
|
|
11
|
+
export * from './terraform.event.js';
|
|
7
12
|
export * from './transaction.event.js';
|
package/dist/events/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export * from './action.event.js';
|
|
2
|
+
export * from './command.event.js';
|
|
2
3
|
export * from './event.model.js';
|
|
3
4
|
export * from './hook/index.js';
|
|
5
|
+
export * from './mode.event.js';
|
|
6
|
+
export * from './mode-result.event.js';
|
|
4
7
|
export * from './module.event.js';
|
|
5
8
|
export * from './registration.event.js';
|
|
6
9
|
export * from './serialization.event.js';
|
|
10
|
+
export * from './state.event.js';
|
|
11
|
+
export * from './terraform.event.js';
|
|
7
12
|
export * from './transaction.event.js';
|
|
8
13
|
//# sourceMappingURL=index.js.map
|
package/dist/events/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AggregatedResourceAction } from '../functions/diff/aggregate-resource-actions.js';
|
|
2
|
+
import type { ValidateReport } from '../modes/validate.mode.js';
|
|
3
|
+
import { Event } from './event.model.js';
|
|
4
|
+
/**
|
|
5
|
+
* The ModeResultEvent class is the superclass for all events carrying what a mode concluded.
|
|
6
|
+
*
|
|
7
|
+
* @group Events/ModeResult
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class ModeResultEvent<T> extends Event<T> {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* This event is emitted when `validate` has correlated terraform's plans with octo's intent.
|
|
13
|
+
* The payload is the {@link ValidateReport} that `validate` returns to its caller.
|
|
14
|
+
*
|
|
15
|
+
* @group Events/ModeResult
|
|
16
|
+
*/
|
|
17
|
+
export declare class ValidateModeCompletedEvent extends ModeResultEvent<{
|
|
18
|
+
report: ValidateReport;
|
|
19
|
+
}> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This event is emitted when `commit` has recorded a terraform apply back into octo state.
|
|
23
|
+
*
|
|
24
|
+
* @group Events/ModeResult
|
|
25
|
+
*/
|
|
26
|
+
export declare class CommitModeCompletedEvent extends ModeResultEvent<{
|
|
27
|
+
/**
|
|
28
|
+
* Modules whose folders were written without resources, because they left intent.
|
|
29
|
+
*/
|
|
30
|
+
emptiedModuleIds: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Each octo resource this commit applied, with the terraform addresses it renders.
|
|
33
|
+
* Carries no terraform actions - `commit` runs after the apply, so it has no plan to read.
|
|
34
|
+
*/
|
|
35
|
+
resources: {
|
|
36
|
+
action: AggregatedResourceAction['action'];
|
|
37
|
+
moduleId?: string;
|
|
38
|
+
reason?: string;
|
|
39
|
+
resourceContext: string;
|
|
40
|
+
resourceId: string;
|
|
41
|
+
terraformAddresses: string[];
|
|
42
|
+
}[];
|
|
43
|
+
/**
|
|
44
|
+
* Every response key written onto a resource from a terraform output, with the value it replaced.
|
|
45
|
+
*/
|
|
46
|
+
responses: {
|
|
47
|
+
key: string;
|
|
48
|
+
previousValue?: string;
|
|
49
|
+
resourceContext: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}[];
|
|
52
|
+
warnings: {
|
|
53
|
+
message: string;
|
|
54
|
+
moduleId?: string;
|
|
55
|
+
}[];
|
|
56
|
+
}> {
|
|
57
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Event } from './event.model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The ModeResultEvent class is the superclass for all events carrying what a mode concluded.
|
|
4
|
+
*
|
|
5
|
+
* @group Events/ModeResult
|
|
6
|
+
*/
|
|
7
|
+
export class ModeResultEvent extends Event {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This event is emitted when `validate` has correlated terraform's plans with octo's intent.
|
|
11
|
+
* The payload is the {@link ValidateReport} that `validate` returns to its caller.
|
|
12
|
+
*
|
|
13
|
+
* @group Events/ModeResult
|
|
14
|
+
*/
|
|
15
|
+
export class ValidateModeCompletedEvent extends ModeResultEvent {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This event is emitted when `commit` has recorded a terraform apply back into octo state.
|
|
19
|
+
*
|
|
20
|
+
* @group Events/ModeResult
|
|
21
|
+
*/
|
|
22
|
+
export class CommitModeCompletedEvent extends ModeResultEvent {
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=mode-result.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode-result.event.js","sourceRoot":"","sources":["../../src/events/mode-result.event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;GAIG;AACH,MAAM,OAAgB,eAAmB,SAAQ,KAAQ;CAAG;AAE5D;;;;;GAKG;AACH,MAAM,OAAO,0BAA2B,SAAQ,eAA2C;CAAG;AAE9F;;;;GAIG;AACH,MAAM,OAAO,wBAAyB,SAAQ,eAyB5C;CAAG"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Event } from './event.model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The steps of the octo lifecycle.
|
|
4
|
+
*
|
|
5
|
+
* @group Events/Mode
|
|
6
|
+
*/
|
|
7
|
+
export type OctoMode = 'commit' | 'generate' | 'run-action' | 'validate';
|
|
8
|
+
/**
|
|
9
|
+
* What every {@link ModeEvent} carries.
|
|
10
|
+
*
|
|
11
|
+
* @group Events/Mode
|
|
12
|
+
*/
|
|
13
|
+
export interface ModeEventPayload {
|
|
14
|
+
/**
|
|
15
|
+
* The name of the app the mode runs on.
|
|
16
|
+
*/
|
|
17
|
+
appName: string;
|
|
18
|
+
/**
|
|
19
|
+
* The mode this event is about.
|
|
20
|
+
*/
|
|
21
|
+
mode: OctoMode;
|
|
22
|
+
/**
|
|
23
|
+
* The resource a `run-action` runs the action of. Absent in every other mode.
|
|
24
|
+
*/
|
|
25
|
+
resourceId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The ModeEvent class is the superclass for all events marking the boundaries of an octo lifecycle mode.
|
|
29
|
+
*
|
|
30
|
+
* @group Events/Mode
|
|
31
|
+
*/
|
|
32
|
+
export declare abstract class ModeEvent<T extends ModeEventPayload = ModeEventPayload> extends Event<T> {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* This event is emitted when a mode begins, before any work is done.
|
|
36
|
+
*
|
|
37
|
+
* @group Events/Mode
|
|
38
|
+
*/
|
|
39
|
+
export declare class ModeStartedEvent extends ModeEvent {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This event is emitted when a mode completes successfully.
|
|
43
|
+
* A listener that returns a promise is awaited, so it can finish writing before the process exits.
|
|
44
|
+
*
|
|
45
|
+
* @group Events/Mode
|
|
46
|
+
*/
|
|
47
|
+
export declare class ModeFinishedEvent extends ModeEvent<ModeEventPayload & {
|
|
48
|
+
durationInMs: number;
|
|
49
|
+
}> {
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* This event is emitted when a mode throws. The error is also re-thrown to the caller.
|
|
53
|
+
* A listener that returns a promise is awaited, so it can finish writing before the process exits.
|
|
54
|
+
*
|
|
55
|
+
* @group Events/Mode
|
|
56
|
+
*/
|
|
57
|
+
export declare class ModeFailedEvent extends ModeEvent<ModeEventPayload & {
|
|
58
|
+
durationInMs: number;
|
|
59
|
+
error: Error;
|
|
60
|
+
}> {
|
|
61
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Event } from './event.model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The ModeEvent class is the superclass for all events marking the boundaries of an octo lifecycle mode.
|
|
4
|
+
*
|
|
5
|
+
* @group Events/Mode
|
|
6
|
+
*/
|
|
7
|
+
export class ModeEvent extends Event {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This event is emitted when a mode begins, before any work is done.
|
|
11
|
+
*
|
|
12
|
+
* @group Events/Mode
|
|
13
|
+
*/
|
|
14
|
+
export class ModeStartedEvent extends ModeEvent {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This event is emitted when a mode completes successfully.
|
|
18
|
+
* A listener that returns a promise is awaited, so it can finish writing before the process exits.
|
|
19
|
+
*
|
|
20
|
+
* @group Events/Mode
|
|
21
|
+
*/
|
|
22
|
+
export class ModeFinishedEvent extends ModeEvent {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* This event is emitted when a mode throws. The error is also re-thrown to the caller.
|
|
26
|
+
* A listener that returns a promise is awaited, so it can finish writing before the process exits.
|
|
27
|
+
*
|
|
28
|
+
* @group Events/Mode
|
|
29
|
+
*/
|
|
30
|
+
export class ModeFailedEvent extends ModeEvent {
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=mode.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode.event.js","sourceRoot":"","sources":["../../src/events/mode.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AA+BzC;;;;GAIG;AACH,MAAM,OAAgB,SAAyD,SAAQ,KAAQ;CAAG;AAElG;;;;GAIG;AACH,MAAM,OAAO,gBAAiB,SAAQ,SAAS;CAAG;AAElD;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,SAAsD;CAAG;AAEhG;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,SAAoE;CAAG"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Event } from './event.model.js';
|
|
2
2
|
/**
|
|
3
|
-
* This event is emitted when a module's `onInit()` method is run
|
|
4
|
-
*
|
|
3
|
+
* This event is emitted when a module's `onInit()` method is run, once for every module id, with the
|
|
4
|
+
* inputs it ran with: the definition's values, references resolved, and schema defaults filled in.
|
|
5
|
+
* Its name is the module's class name.
|
|
5
6
|
*
|
|
6
7
|
* @group Events/Module
|
|
7
|
-
*
|
|
8
|
-
* @returns The Event instance.
|
|
9
8
|
*/
|
|
10
|
-
export declare class ModuleEvent extends Event<
|
|
9
|
+
export declare class ModuleEvent extends Event<{
|
|
10
|
+
inputs: Record<string, unknown>;
|
|
11
|
+
moduleId: string;
|
|
12
|
+
}> {
|
|
11
13
|
}
|