@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
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Thrown when a {@link Dependency} is given a second relationship, or asked to drop a behavior it does not have.
|
|
3
|
+
*
|
|
2
4
|
* @group Errors/Node
|
|
3
5
|
*/
|
|
4
6
|
export class DependencyError extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* @param message The error message.
|
|
9
|
+
* @param dependency The dependency that was being changed.
|
|
10
|
+
*/
|
|
5
11
|
constructor(message, dependency) {
|
|
6
12
|
super(message);
|
|
7
13
|
this.dependency = dependency.synth();
|
|
@@ -9,9 +15,15 @@ export class DependencyError extends Error {
|
|
|
9
15
|
}
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
18
|
+
* Thrown when state cannot be deserialized back into a node, e.g. because it references something no longer in the graph.
|
|
19
|
+
*
|
|
12
20
|
* @group Errors/Node
|
|
13
21
|
*/
|
|
14
22
|
export class NodeUnsynthError extends Error {
|
|
23
|
+
/**
|
|
24
|
+
* @param message The error message.
|
|
25
|
+
* @param subject The node, named by its ID, that could not be deserialized.
|
|
26
|
+
*/
|
|
15
27
|
constructor(message, subject) {
|
|
16
28
|
super(message);
|
|
17
29
|
this.subject = subject;
|
|
@@ -19,9 +31,15 @@ export class NodeUnsynthError extends Error {
|
|
|
19
31
|
}
|
|
20
32
|
}
|
|
21
33
|
/**
|
|
34
|
+
* Parent error class for all node errors.
|
|
35
|
+
*
|
|
22
36
|
* @group Errors/Node
|
|
23
37
|
*/
|
|
24
38
|
export class NodeError extends Error {
|
|
39
|
+
/**
|
|
40
|
+
* @param message The error message.
|
|
41
|
+
* @param node The node the error is about.
|
|
42
|
+
*/
|
|
25
43
|
constructor(message, node) {
|
|
26
44
|
super(message);
|
|
27
45
|
this.node = node.NODE_NAME || node.constructor.NODE_NAME;
|
|
@@ -29,45 +47,76 @@ export class NodeError extends Error {
|
|
|
29
47
|
}
|
|
30
48
|
}
|
|
31
49
|
/**
|
|
50
|
+
* Thrown when a node's context cannot be derived, which usually means it was never attached to a parent.
|
|
51
|
+
*
|
|
32
52
|
* @group Errors/Node
|
|
33
53
|
*/
|
|
34
54
|
export class ContextNodeError extends NodeError {
|
|
55
|
+
/**
|
|
56
|
+
* @param message The error message.
|
|
57
|
+
* @param node The node whose context could not be derived.
|
|
58
|
+
*/
|
|
35
59
|
constructor(message, node) {
|
|
36
60
|
super(message, node);
|
|
37
61
|
Object.setPrototypeOf(this, ContextNodeError.prototype);
|
|
38
62
|
}
|
|
39
63
|
}
|
|
40
64
|
/**
|
|
65
|
+
* Thrown when a model is used in a way its own rules forbid, e.g. adding a child that already exists.
|
|
66
|
+
*
|
|
41
67
|
* @group Errors/Node
|
|
42
68
|
*/
|
|
43
69
|
export class ModelError extends NodeError {
|
|
70
|
+
/**
|
|
71
|
+
* @param message The error message.
|
|
72
|
+
* @param model The model the error is about.
|
|
73
|
+
*/
|
|
44
74
|
constructor(message, model) {
|
|
45
75
|
super(message, model);
|
|
46
76
|
Object.setPrototypeOf(this, ModelError.prototype);
|
|
47
77
|
}
|
|
48
78
|
}
|
|
49
79
|
/**
|
|
80
|
+
* Thrown when an overlay is used in a way its own rules forbid.
|
|
81
|
+
*
|
|
50
82
|
* @group Errors/Node
|
|
51
83
|
*/
|
|
52
84
|
export class OverlayError extends NodeError {
|
|
85
|
+
/**
|
|
86
|
+
* @param message The error message.
|
|
87
|
+
* @param overlay The overlay the error is about.
|
|
88
|
+
*/
|
|
53
89
|
constructor(message, overlay) {
|
|
54
90
|
super(message, overlay);
|
|
55
91
|
Object.setPrototypeOf(this, OverlayError.prototype);
|
|
56
92
|
}
|
|
57
93
|
}
|
|
58
94
|
/**
|
|
95
|
+
* Thrown when a resource is used in a way its own rules forbid, e.g. an invalid resource ID.
|
|
96
|
+
*
|
|
59
97
|
* @group Errors/Node
|
|
60
98
|
*/
|
|
61
99
|
export class ResourceError extends NodeError {
|
|
100
|
+
/**
|
|
101
|
+
* @param message The error message.
|
|
102
|
+
* @param resource The resource the error is about.
|
|
103
|
+
*/
|
|
62
104
|
constructor(message, resource) {
|
|
63
105
|
super(message, resource);
|
|
64
106
|
Object.setPrototypeOf(this, ResourceError.prototype);
|
|
65
107
|
}
|
|
66
108
|
}
|
|
67
109
|
/**
|
|
110
|
+
* Thrown when a diff cannot be applied back onto a resource, because its field or action is not one the resource knows how to handle.
|
|
111
|
+
*
|
|
68
112
|
* @group Errors/Node
|
|
69
113
|
*/
|
|
70
114
|
export class DiffInverseResourceError extends ResourceError {
|
|
115
|
+
/**
|
|
116
|
+
* @param message The error message.
|
|
117
|
+
* @param resource The resource the diff was being applied to.
|
|
118
|
+
* @param diff The diff that could not be applied.
|
|
119
|
+
*/
|
|
71
120
|
constructor(message, resource, diff) {
|
|
72
121
|
super(message, resource);
|
|
73
122
|
this.diff = diff.toJSON();
|
|
@@ -75,9 +124,16 @@ export class DiffInverseResourceError extends ResourceError {
|
|
|
75
124
|
}
|
|
76
125
|
}
|
|
77
126
|
/**
|
|
127
|
+
* Thrown when a resource is removed while other resources still depend on it. Carries the children that blocked it.
|
|
128
|
+
*
|
|
78
129
|
* @group Errors/Node
|
|
79
130
|
*/
|
|
80
131
|
export class RemoveResourceError extends ResourceError {
|
|
132
|
+
/**
|
|
133
|
+
* @param message The error message.
|
|
134
|
+
* @param resource The resource that could not be removed.
|
|
135
|
+
* @param childrenResources The resources still depending on it.
|
|
136
|
+
*/
|
|
81
137
|
constructor(message, resource, childrenResources) {
|
|
82
138
|
super(message, resource);
|
|
83
139
|
this.childrenResources = childrenResources.map((r) => r.constructor.NODE_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.error.js","sourceRoot":"","sources":["../../src/errors/node.error.ts"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"node.error.js","sourceRoot":"","sources":["../../src/errors/node.error.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGxC;;;OAGG;IACH,YAAY,OAAe,EAAE,UAAsB;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;QAErC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAGzC;;;OAGG;IACH,YAAY,OAAe,EAAE,OAAe;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAGlC;;;OAGG;IACH,YAAY,OAAe,EAAE,IAAoC;QAC/D,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IA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C,OAAO,EAAE,QAAQ,CAAC,CAAC;QAEzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAE1B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAGpD;;;;OAIG;IACH,YAAY,OAAe,EAAE,QAAyB,EAAE,iBAAoC;QAC1F,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAEzB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAE,CAAC,CAAC,WAA4B,CAAC,SAAS,CAAC,CAAC;QAEjG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Thrown when a value does not satisfy the schema it is being read as - a property missing, or one that cannot be resolved.
|
|
3
|
+
*
|
|
2
4
|
* @group Errors/Schema
|
|
3
5
|
*/
|
|
4
6
|
export declare class SchemaError extends Error {
|
|
5
7
|
readonly schemaClassName: string;
|
|
6
|
-
|
|
8
|
+
/**
|
|
9
|
+
* What a validator threw underneath, where this error is wrapping one. Carried as a property of
|
|
10
|
+
* its own rather than as the `Error` cause: without it a nested property's failure reads only as
|
|
11
|
+
* the name of the top-level input it arrived under, and which value failed is the whole question.
|
|
12
|
+
*/
|
|
13
|
+
readonly validationError?: unknown;
|
|
14
|
+
/**
|
|
15
|
+
* @param message The error message.
|
|
16
|
+
* @param schemaClassName The schema the value was being read as.
|
|
17
|
+
* @param validationError What a validator threw underneath, where there is one.
|
|
18
|
+
*/
|
|
19
|
+
constructor(message: string, schemaClassName: string, validationError?: unknown);
|
|
7
20
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Thrown when a value does not satisfy the schema it is being read as - a property missing, or one that cannot be resolved.
|
|
3
|
+
*
|
|
2
4
|
* @group Errors/Schema
|
|
3
5
|
*/
|
|
4
6
|
export class SchemaError extends Error {
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @param message The error message.
|
|
9
|
+
* @param schemaClassName The schema the value was being read as.
|
|
10
|
+
* @param validationError What a validator threw underneath, where there is one.
|
|
11
|
+
*/
|
|
12
|
+
constructor(message, schemaClassName, validationError) {
|
|
6
13
|
super(message);
|
|
7
14
|
this.schemaClassName = schemaClassName;
|
|
15
|
+
if (validationError !== undefined) {
|
|
16
|
+
this.validationError = validationError;
|
|
17
|
+
}
|
|
8
18
|
Object.setPrototypeOf(this, SchemaError.prototype);
|
|
9
19
|
}
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.error.js","sourceRoot":"","sources":["../../src/errors/schema.error.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schema.error.js","sourceRoot":"","sources":["../../src/errors/schema.error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IAUpC;;;;OAIG;IACH,YAAY,OAAe,EAAE,eAAuB,EAAE,eAAyB;QAC7E,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACzC,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when a terraform or terragrunt command exits non-zero. Carries the command's arguments, exit code,
|
|
3
|
+
* the stdout of a command asked for JSON, and the end of its stderr.
|
|
4
|
+
*
|
|
5
|
+
* @group Errors/Terraform
|
|
6
|
+
*/
|
|
7
|
+
export declare class TerraformCommandError extends Error {
|
|
8
|
+
readonly args: string[];
|
|
9
|
+
readonly exitCode: number;
|
|
10
|
+
readonly stderr: string;
|
|
11
|
+
readonly stdout: string;
|
|
12
|
+
/**
|
|
13
|
+
* @param message The error message.
|
|
14
|
+
* @param args The arguments the command was invoked with.
|
|
15
|
+
* @param exitCode The command's exit code.
|
|
16
|
+
* @param stdout The command's standard output, kept only for a command asked for JSON.
|
|
17
|
+
* @param stderr The last 64 KB the command wrote to standard error.
|
|
18
|
+
*/
|
|
19
|
+
constructor(message: string, args: string[], exitCode: number, stdout: string, stderr: string);
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when a terraform or terragrunt command exits non-zero. Carries the command's arguments, exit code,
|
|
3
|
+
* the stdout of a command asked for JSON, and the end of its stderr.
|
|
4
|
+
*
|
|
5
|
+
* @group Errors/Terraform
|
|
6
|
+
*/
|
|
7
|
+
export class TerraformCommandError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* @param message The error message.
|
|
10
|
+
* @param args The arguments the command was invoked with.
|
|
11
|
+
* @param exitCode The command's exit code.
|
|
12
|
+
* @param stdout The command's standard output, kept only for a command asked for JSON.
|
|
13
|
+
* @param stderr The last 64 KB the command wrote to standard error.
|
|
14
|
+
*/
|
|
15
|
+
constructor(message, args, exitCode, stdout, stderr) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.args = args;
|
|
18
|
+
this.exitCode = exitCode;
|
|
19
|
+
this.stdout = stdout;
|
|
20
|
+
this.stderr = stderr;
|
|
21
|
+
Object.setPrototypeOf(this, TerraformCommandError.prototype);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=terraform.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terraform.error.js","sourceRoot":"","sources":["../../src/errors/terraform.error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAM9C;;;;;;OAMG;IACH,YAAY,OAAe,EAAE,IAAc,EAAE,QAAgB,EAAE,MAAc,EAAE,MAAc;QAC3F,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -1,72 +1,163 @@
|
|
|
1
|
-
import type { IUnknownModelAction, UnknownResource } from '../app.type.js';
|
|
1
|
+
import type { IUnknownModelAction, ResourceSerializedSchema, UnknownResource } from '../app.type.js';
|
|
2
2
|
import type { Diff } from '../functions/diff/diff.js';
|
|
3
3
|
import type { ValidationService } from '../services/validation/validation.service.js';
|
|
4
4
|
/**
|
|
5
|
+
* Parent error class for all transaction errors.
|
|
6
|
+
*
|
|
5
7
|
* @group Errors/Transaction
|
|
6
8
|
*/
|
|
7
9
|
export declare class TransactionError extends Error {
|
|
10
|
+
/**
|
|
11
|
+
* @param message The error message.
|
|
12
|
+
*/
|
|
8
13
|
constructor(message: string);
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
16
|
+
* Thrown when the app lock is refused: another run holds it (`held`), the lock to resume is not the
|
|
17
|
+
* one held (`not-held`), the state moved since it was last refreshed (`state-moved`), or the state
|
|
18
|
+
* holds journal files of a run that was never archived (`unfinished`), named in `stateFileNames`.
|
|
19
|
+
*
|
|
20
|
+
* @group Errors/Transaction
|
|
21
|
+
*/
|
|
22
|
+
export declare class AppLockError extends TransactionError {
|
|
23
|
+
readonly holder?: {
|
|
24
|
+
commitId?: string;
|
|
25
|
+
context?: string;
|
|
26
|
+
lockId: string;
|
|
27
|
+
takenAt?: number;
|
|
28
|
+
};
|
|
29
|
+
readonly newestCommitId?: string;
|
|
30
|
+
readonly reason: 'held' | 'not-held' | 'state-moved' | 'unfinished';
|
|
31
|
+
readonly refreshedCommitId?: string;
|
|
32
|
+
readonly stateFileNames?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* @param message The error message.
|
|
35
|
+
* @param details Why the lock was refused, and what the state provider knows about it.
|
|
36
|
+
*/
|
|
37
|
+
constructor(message: string, details: {
|
|
38
|
+
holder?: AppLockError['holder'];
|
|
39
|
+
newestCommitId?: string;
|
|
40
|
+
reason: AppLockError['reason'];
|
|
41
|
+
refreshedCommitId?: string;
|
|
42
|
+
stateFileNames?: string[];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Thrown when a run tries to change resources that a previous run left in an unsettled state. Commit or resolve those first.
|
|
47
|
+
*
|
|
11
48
|
* @group Errors/Transaction
|
|
12
49
|
*/
|
|
13
50
|
export declare class DiffsOnDirtyResourcesTransactionError extends TransactionError {
|
|
14
51
|
readonly diffs: ReturnType<Diff['toJSON']>[];
|
|
15
|
-
readonly dirtyResources:
|
|
52
|
+
readonly dirtyResources: ResourceSerializedSchema[];
|
|
53
|
+
/**
|
|
54
|
+
* @param message The error message.
|
|
55
|
+
* @param diffs The diffs the run was trying to apply.
|
|
56
|
+
* @param dirtyResources The resources left unsettled by an earlier run.
|
|
57
|
+
*/
|
|
16
58
|
constructor(message: string, diffs: Diff[], dirtyResources: UnknownResource[]);
|
|
17
59
|
}
|
|
18
60
|
/**
|
|
61
|
+
* Thrown when an action asks for an input its module never received.
|
|
62
|
+
*
|
|
19
63
|
* @group Errors/Transaction
|
|
20
64
|
*/
|
|
21
65
|
export declare class InputNotFoundTransactionError extends TransactionError {
|
|
22
66
|
readonly action: string;
|
|
23
67
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
24
68
|
readonly key: string;
|
|
69
|
+
/**
|
|
70
|
+
* @param message The error message.
|
|
71
|
+
* @param action The action asking for the input.
|
|
72
|
+
* @param diff The diff it was handling.
|
|
73
|
+
* @param key The input key that was not found.
|
|
74
|
+
*/
|
|
25
75
|
constructor(message: string, action: IUnknownModelAction, diff: Diff, key: string);
|
|
26
76
|
}
|
|
27
77
|
/**
|
|
78
|
+
* Thrown when a model action itself throws. Carries the action and the diff it was handling.
|
|
79
|
+
*
|
|
28
80
|
* @group Errors/Transaction
|
|
29
81
|
*/
|
|
30
82
|
export declare class ModelActionExceptionTransactionError extends TransactionError {
|
|
31
83
|
readonly actionClassName: string;
|
|
32
84
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
85
|
+
/**
|
|
86
|
+
* @param message The error message.
|
|
87
|
+
* @param diff The diff the action was handling.
|
|
88
|
+
* @param actionClassName The action that failed.
|
|
89
|
+
*/
|
|
33
90
|
constructor(message: string, diff: Diff, actionClassName: string);
|
|
34
91
|
}
|
|
35
92
|
/**
|
|
93
|
+
* Thrown when a diff is produced that no registered action accepts - usually a missing `@Action`, or a `filter()` that is too narrow.
|
|
94
|
+
*
|
|
36
95
|
* @group Errors/Transaction
|
|
37
96
|
*/
|
|
38
97
|
export declare class NoMatchingActionFoundTransactionError extends TransactionError {
|
|
39
98
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
99
|
+
/**
|
|
100
|
+
* @param message The error message.
|
|
101
|
+
* @param diff The diff no action accepted.
|
|
102
|
+
*/
|
|
40
103
|
constructor(message: string, diff: Diff);
|
|
41
104
|
}
|
|
42
105
|
/**
|
|
106
|
+
* Thrown when an overlay action itself throws. Carries the action and the diff it was handling.
|
|
107
|
+
*
|
|
43
108
|
* @group Errors/Transaction
|
|
44
109
|
*/
|
|
45
110
|
export declare class OverlayActionExceptionTransactionError extends TransactionError {
|
|
46
111
|
readonly actionClassName: string;
|
|
47
112
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
113
|
+
/**
|
|
114
|
+
* @param message The error message.
|
|
115
|
+
* @param diff The diff the action was handling.
|
|
116
|
+
* @param actionClassName The action that failed.
|
|
117
|
+
*/
|
|
48
118
|
constructor(message: string, diff: Diff, actionClassName: string);
|
|
49
119
|
}
|
|
50
120
|
/**
|
|
121
|
+
* Thrown when a resource action itself throws. Carries the action and the diff it was handling, and chains the original error's stack.
|
|
122
|
+
*
|
|
51
123
|
* @group Errors/Transaction
|
|
52
124
|
*/
|
|
53
125
|
export declare class ResourceActionExceptionTransactionError extends TransactionError {
|
|
54
126
|
readonly actionClassName: string;
|
|
55
127
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
128
|
+
/**
|
|
129
|
+
* @param message The error message.
|
|
130
|
+
* @param originalError The error the action threw, whose stack is chained onto this one.
|
|
131
|
+
* @param diff The diff it was handling.
|
|
132
|
+
* @param actionClassName The action that threw.
|
|
133
|
+
*/
|
|
56
134
|
constructor(message: string, originalError: Error, diff: Diff, actionClassName: string);
|
|
57
135
|
}
|
|
58
136
|
/**
|
|
137
|
+
* Thrown when a resource action outruns its {@link IResourceAction.actionTimeoutInMs}.
|
|
138
|
+
*
|
|
59
139
|
* @group Errors/Transaction
|
|
60
140
|
*/
|
|
61
141
|
export declare class ResourceActionTimeoutTransactionError extends TransactionError {
|
|
62
142
|
readonly actionClassName: string;
|
|
63
143
|
readonly diff: ReturnType<Diff['toJSON']>;
|
|
144
|
+
/**
|
|
145
|
+
* @param message The error message.
|
|
146
|
+
* @param diff The diff the action was handling.
|
|
147
|
+
* @param actionClassName The action that failed.
|
|
148
|
+
*/
|
|
64
149
|
constructor(message: string, diff: Diff, actionClassName: string);
|
|
65
150
|
}
|
|
66
151
|
/**
|
|
152
|
+
* Thrown when a value fails a {@link Validate} constraint. Carries every constraint that failed.
|
|
153
|
+
*
|
|
67
154
|
* @group Errors/Transaction
|
|
68
155
|
*/
|
|
69
156
|
export declare class ValidationTransactionError extends TransactionError {
|
|
70
157
|
errors: ReturnType<ValidationService['validate']>;
|
|
158
|
+
/**
|
|
159
|
+
* @param message The error message.
|
|
160
|
+
* @param errors Every constraint that failed.
|
|
161
|
+
*/
|
|
71
162
|
constructor(message: string, errors: ReturnType<ValidationService['validate']>);
|
|
72
163
|
}
|
|
@@ -1,16 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Parent error class for all transaction errors.
|
|
3
|
+
*
|
|
2
4
|
* @group Errors/Transaction
|
|
3
5
|
*/
|
|
4
6
|
export class TransactionError extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* @param message The error message.
|
|
9
|
+
*/
|
|
5
10
|
constructor(message) {
|
|
6
11
|
super(message);
|
|
7
12
|
Object.setPrototypeOf(this, TransactionError.prototype);
|
|
8
13
|
}
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
16
|
+
* Thrown when the app lock is refused: another run holds it (`held`), the lock to resume is not the
|
|
17
|
+
* one held (`not-held`), the state moved since it was last refreshed (`state-moved`), or the state
|
|
18
|
+
* holds journal files of a run that was never archived (`unfinished`), named in `stateFileNames`.
|
|
19
|
+
*
|
|
20
|
+
* @group Errors/Transaction
|
|
21
|
+
*/
|
|
22
|
+
export class AppLockError extends TransactionError {
|
|
23
|
+
/**
|
|
24
|
+
* @param message The error message.
|
|
25
|
+
* @param details Why the lock was refused, and what the state provider knows about it.
|
|
26
|
+
*/
|
|
27
|
+
constructor(message, details) {
|
|
28
|
+
super(message);
|
|
29
|
+
this.holder = details.holder;
|
|
30
|
+
this.newestCommitId = details.newestCommitId;
|
|
31
|
+
this.reason = details.reason;
|
|
32
|
+
this.refreshedCommitId = details.refreshedCommitId;
|
|
33
|
+
this.stateFileNames = details.stateFileNames;
|
|
34
|
+
Object.setPrototypeOf(this, AppLockError.prototype);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Thrown when a run tries to change resources that a previous run left in an unsettled state. Commit or resolve those first.
|
|
39
|
+
*
|
|
11
40
|
* @group Errors/Transaction
|
|
12
41
|
*/
|
|
13
42
|
export class DiffsOnDirtyResourcesTransactionError extends TransactionError {
|
|
43
|
+
/**
|
|
44
|
+
* @param message The error message.
|
|
45
|
+
* @param diffs The diffs the run was trying to apply.
|
|
46
|
+
* @param dirtyResources The resources left unsettled by an earlier run.
|
|
47
|
+
*/
|
|
14
48
|
constructor(message, diffs, dirtyResources) {
|
|
15
49
|
super(message);
|
|
16
50
|
this.diffs = diffs.map((d) => d.toJSON());
|
|
@@ -19,9 +53,17 @@ export class DiffsOnDirtyResourcesTransactionError extends TransactionError {
|
|
|
19
53
|
}
|
|
20
54
|
}
|
|
21
55
|
/**
|
|
56
|
+
* Thrown when an action asks for an input its module never received.
|
|
57
|
+
*
|
|
22
58
|
* @group Errors/Transaction
|
|
23
59
|
*/
|
|
24
60
|
export class InputNotFoundTransactionError extends TransactionError {
|
|
61
|
+
/**
|
|
62
|
+
* @param message The error message.
|
|
63
|
+
* @param action The action asking for the input.
|
|
64
|
+
* @param diff The diff it was handling.
|
|
65
|
+
* @param key The input key that was not found.
|
|
66
|
+
*/
|
|
25
67
|
constructor(message, action, diff, key) {
|
|
26
68
|
super(message);
|
|
27
69
|
this.action = action.constructor.name;
|
|
@@ -31,9 +73,16 @@ export class InputNotFoundTransactionError extends TransactionError {
|
|
|
31
73
|
}
|
|
32
74
|
}
|
|
33
75
|
/**
|
|
76
|
+
* Thrown when a model action itself throws. Carries the action and the diff it was handling.
|
|
77
|
+
*
|
|
34
78
|
* @group Errors/Transaction
|
|
35
79
|
*/
|
|
36
80
|
export class ModelActionExceptionTransactionError extends TransactionError {
|
|
81
|
+
/**
|
|
82
|
+
* @param message The error message.
|
|
83
|
+
* @param diff The diff the action was handling.
|
|
84
|
+
* @param actionClassName The action that failed.
|
|
85
|
+
*/
|
|
37
86
|
constructor(message, diff, actionClassName) {
|
|
38
87
|
super(message);
|
|
39
88
|
this.actionClassName = actionClassName;
|
|
@@ -42,9 +91,15 @@ export class ModelActionExceptionTransactionError extends TransactionError {
|
|
|
42
91
|
}
|
|
43
92
|
}
|
|
44
93
|
/**
|
|
94
|
+
* Thrown when a diff is produced that no registered action accepts - usually a missing `@Action`, or a `filter()` that is too narrow.
|
|
95
|
+
*
|
|
45
96
|
* @group Errors/Transaction
|
|
46
97
|
*/
|
|
47
98
|
export class NoMatchingActionFoundTransactionError extends TransactionError {
|
|
99
|
+
/**
|
|
100
|
+
* @param message The error message.
|
|
101
|
+
* @param diff The diff no action accepted.
|
|
102
|
+
*/
|
|
48
103
|
constructor(message, diff) {
|
|
49
104
|
super(message);
|
|
50
105
|
this.diff = diff.toJSON();
|
|
@@ -52,9 +107,16 @@ export class NoMatchingActionFoundTransactionError extends TransactionError {
|
|
|
52
107
|
}
|
|
53
108
|
}
|
|
54
109
|
/**
|
|
110
|
+
* Thrown when an overlay action itself throws. Carries the action and the diff it was handling.
|
|
111
|
+
*
|
|
55
112
|
* @group Errors/Transaction
|
|
56
113
|
*/
|
|
57
114
|
export class OverlayActionExceptionTransactionError extends TransactionError {
|
|
115
|
+
/**
|
|
116
|
+
* @param message The error message.
|
|
117
|
+
* @param diff The diff the action was handling.
|
|
118
|
+
* @param actionClassName The action that failed.
|
|
119
|
+
*/
|
|
58
120
|
constructor(message, diff, actionClassName) {
|
|
59
121
|
super(message);
|
|
60
122
|
this.actionClassName = actionClassName;
|
|
@@ -63,9 +125,17 @@ export class OverlayActionExceptionTransactionError extends TransactionError {
|
|
|
63
125
|
}
|
|
64
126
|
}
|
|
65
127
|
/**
|
|
128
|
+
* Thrown when a resource action itself throws. Carries the action and the diff it was handling, and chains the original error's stack.
|
|
129
|
+
*
|
|
66
130
|
* @group Errors/Transaction
|
|
67
131
|
*/
|
|
68
132
|
export class ResourceActionExceptionTransactionError extends TransactionError {
|
|
133
|
+
/**
|
|
134
|
+
* @param message The error message.
|
|
135
|
+
* @param originalError The error the action threw, whose stack is chained onto this one.
|
|
136
|
+
* @param diff The diff it was handling.
|
|
137
|
+
* @param actionClassName The action that threw.
|
|
138
|
+
*/
|
|
69
139
|
constructor(message, originalError, diff, actionClassName) {
|
|
70
140
|
super(message);
|
|
71
141
|
this.actionClassName = actionClassName;
|
|
@@ -77,9 +147,16 @@ export class ResourceActionExceptionTransactionError extends TransactionError {
|
|
|
77
147
|
}
|
|
78
148
|
}
|
|
79
149
|
/**
|
|
150
|
+
* Thrown when a resource action outruns its {@link IResourceAction.actionTimeoutInMs}.
|
|
151
|
+
*
|
|
80
152
|
* @group Errors/Transaction
|
|
81
153
|
*/
|
|
82
154
|
export class ResourceActionTimeoutTransactionError extends TransactionError {
|
|
155
|
+
/**
|
|
156
|
+
* @param message The error message.
|
|
157
|
+
* @param diff The diff the action was handling.
|
|
158
|
+
* @param actionClassName The action that failed.
|
|
159
|
+
*/
|
|
83
160
|
constructor(message, diff, actionClassName) {
|
|
84
161
|
super(message);
|
|
85
162
|
this.actionClassName = actionClassName;
|
|
@@ -88,9 +165,15 @@ export class ResourceActionTimeoutTransactionError extends TransactionError {
|
|
|
88
165
|
}
|
|
89
166
|
}
|
|
90
167
|
/**
|
|
168
|
+
* Thrown when a value fails a {@link Validate} constraint. Carries every constraint that failed.
|
|
169
|
+
*
|
|
91
170
|
* @group Errors/Transaction
|
|
92
171
|
*/
|
|
93
172
|
export class ValidationTransactionError extends TransactionError {
|
|
173
|
+
/**
|
|
174
|
+
* @param message The error message.
|
|
175
|
+
* @param errors Every constraint that failed.
|
|
176
|
+
*/
|
|
94
177
|
constructor(message, errors) {
|
|
95
178
|
super(message);
|
|
96
179
|
this.errors = errors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.error.js","sourceRoot":"","sources":["../../src/errors/transaction.error.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"transaction.error.js","sourceRoot":"","sources":["../../src/errors/transaction.error.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC;;OAEG;IACH,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,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';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* This event is emitted for each `log()` an action makes. `diff` names what the action was running
|
|
5
|
+
* for: the context of its model, overlay or resource, and the diff's action and field.
|
|
5
6
|
*
|
|
6
7
|
* @group Events/Action
|
|
7
|
-
*
|
|
8
|
-
* @returns The Event instance.
|
|
9
8
|
*/
|
|
10
9
|
export declare class ActionEvent extends Event<{
|
|
10
|
+
diff: {
|
|
11
|
+
action: DiffAction;
|
|
12
|
+
field: string;
|
|
13
|
+
node: string;
|
|
14
|
+
};
|
|
11
15
|
message: string;
|
|
12
16
|
metadata: Record<string, unknown>;
|
|
13
17
|
}> {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Event } from './event.model.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* This event is emitted for each `log()` an action makes. `diff` names what the action was running
|
|
4
|
+
* for: the context of its model, overlay or resource, and the diff's action and field.
|
|
5
5
|
*
|
|
6
6
|
* @group Events/Action
|
|
7
|
-
*
|
|
8
|
-
* @returns The Event instance.
|
|
9
7
|
*/
|
|
10
8
|
export class ActionEvent extends Event {
|
|
11
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.event.js","sourceRoot":"","sources":["../../src/events/action.event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action.event.js","sourceRoot":"","sources":["../../src/events/action.event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,KAI/B;CAAG"}
|