@quadnix/octo 0.0.30 → 0.1.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 +25 -3
- package/dist/app.type.d.ts +143 -4
- 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 +1 -1
- package/dist/decorators/model.decorator.js +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 +5 -0
- package/dist/decorators/on-event.decorator.js +5 -0
- package/dist/decorators/on-event.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 +6 -0
- package/dist/errors/schema.error.js +6 -0
- package/dist/errors/schema.error.js.map +1 -1
- package/dist/errors/terraform.error.d.ts +19 -0
- package/dist/errors/terraform.error.js +23 -0
- package/dist/errors/terraform.error.js.map +1 -0
- package/dist/errors/transaction.error.d.ts +61 -0
- package/dist/errors/transaction.error.js +61 -0
- package/dist/errors/transaction.error.js.map +1 -1
- package/dist/events/action.event.d.ts +0 -2
- package/dist/events/action.event.js +0 -2
- package/dist/events/action.event.js.map +1 -1
- package/dist/events/event.model.d.ts +21 -5
- package/dist/events/event.model.js +11 -5
- package/dist/events/event.model.js.map +1 -1
- package/dist/events/hook/commit.hook.event.d.ts +0 -6
- 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 +0 -2
- 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 +0 -6
- 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 +0 -6
- 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 +3 -0
- package/dist/events/index.js +3 -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 +57 -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 +0 -2
- package/dist/events/module.event.js +0 -2
- package/dist/events/module.event.js.map +1 -1
- package/dist/events/registration.event.d.ts +18 -14
- package/dist/events/registration.event.js +18 -14
- package/dist/events/registration.event.js.map +1 -1
- package/dist/events/serialization.event.d.ts +15 -12
- package/dist/events/serialization.event.js +15 -12
- package/dist/events/serialization.event.js.map +1 -1
- package/dist/events/terraform.event.d.ts +42 -0
- package/dist/events/terraform.event.js +31 -0
- package/dist/events/terraform.event.js.map +1 -0
- package/dist/events/transaction.event.d.ts +0 -37
- package/dist/events/transaction.event.js +0 -28
- package/dist/events/transaction.event.js.map +1 -1
- package/dist/functions/container/container.d.ts +54 -13
- package/dist/functions/container/container.js +63 -18
- 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 +82 -8
- package/dist/functions/dependency/dependency.js +80 -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 +55 -1
- package/dist/functions/diff/diff.js +44 -3
- package/dist/functions/diff/diff.js.map +1 -1
- package/dist/functions/diff/diff.utility.d.ts +17 -2
- package/dist/functions/diff/diff.utility.js +53 -38
- package/dist/functions/diff/diff.utility.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 -0
- package/dist/functions/node/node-action.abstract.js +20 -0
- 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 +85 -12
- package/dist/functions/node/node.abstract.js.map +1 -1
- package/dist/functions/node/node.interface.d.ts +1 -0
- package/dist/functions/schema/schema.d.ts +7 -0
- package/dist/functions/schema/schema.js +9 -0
- package/dist/functions/schema/schema.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +244 -14
- package/dist/main.js +361 -72
- package/dist/main.js.map +1 -1
- package/dist/models/account/account.model.d.ts +37 -7
- package/dist/models/account/account.model.js +40 -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 +16 -1
- package/dist/models/app/app.model.js +19 -4
- 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 +2 -0
- package/dist/models/deployment/deployment.schema.js +2 -0
- package/dist/models/deployment/deployment.schema.js.map +1 -1
- package/dist/models/environment/environment.model.d.ts +13 -1
- package/dist/models/environment/environment.model.js +20 -8
- 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 +20 -2
- package/dist/models/execution/execution.model.js +46 -28
- 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 +17 -4
- package/dist/models/image/image.model.js +20 -7
- 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 +106 -7
- 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 +13 -1
- package/dist/models/pipeline/pipeline.model.js +18 -6
- 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 +13 -1
- package/dist/models/server/server.model.js +16 -4
- 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 +15 -1
- package/dist/models/service/service.model.js +15 -1
- package/dist/models/service/service.model.js.map +1 -1
- package/dist/models/service/service.schema.d.ts +4 -1
- package/dist/models/service/service.schema.js +4 -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 +29 -0
- package/dist/modes/generate.mode.js +49 -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 +162 -0
- package/dist/modes/validate.mode.js +480 -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 +36 -0
- package/dist/modules/module.container.js +36 -0
- 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 +410 -178
- 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 +26 -2
- 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 +118 -3
- package/dist/resources/resource.abstract.js +166 -33
- package/dist/resources/resource.abstract.js.map +1 -1
- package/dist/resources/resource.schema.d.ts +29 -1
- package/dist/resources/resource.schema.js +28 -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 +30 -3
- 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 +52 -3
- package/dist/services/input/input.service.js +72 -8
- 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 +26 -2
- package/dist/services/serialization/model/model-serialization.service.js +110 -62
- package/dist/services/serialization/model/model-serialization.service.js.map +1 -1
- package/dist/services/serialization/resource/resource-serialization.service.d.ts +33 -4
- package/dist/services/serialization/resource/resource-serialization.service.js +64 -28
- package/dist/services/serialization/resource/resource-serialization.service.js.map +1 -1
- package/dist/services/state-management/file-app-lock.utility.d.ts +43 -0
- package/dist/services/state-management/file-app-lock.utility.js +124 -0
- package/dist/services/state-management/file-app-lock.utility.js.map +1 -0
- package/dist/services/state-management/local-encryption.state-provider.d.ts +53 -2
- package/dist/services/state-management/local-encryption.state-provider.js +75 -49
- package/dist/services/state-management/local-encryption.state-provider.js.map +1 -1
- package/dist/services/state-management/local.state-provider.d.ts +49 -2
- package/dist/services/state-management/local.state-provider.js +70 -49
- package/dist/services/state-management/local.state-provider.js.map +1 -1
- package/dist/services/state-management/state-management.service.d.ts +141 -6
- package/dist/services/state-management/state-management.service.js +149 -4
- package/dist/services/state-management/state-management.service.js.map +1 -1
- package/dist/services/state-management/state-provider.interface.d.ts +55 -1
- package/dist/services/state-management/terraform-state.service.d.ts +76 -0
- package/dist/services/state-management/terraform-state.service.js +154 -0
- package/dist/services/state-management/terraform-state.service.js.map +1 -0
- package/dist/services/state-management/test.state-provider.d.ts +38 -1
- package/dist/services/state-management/test.state-provider.js +52 -21
- package/dist/services/state-management/test.state-provider.js.map +1 -1
- package/dist/services/terraform/terraform.service.d.ts +426 -0
- package/dist/services/terraform/terraform.service.js +995 -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 +86 -10
- package/dist/services/transaction/transaction.service.js +387 -232
- package/dist/services/transaction/transaction.service.js.map +1 -1
- package/dist/services/validation/validation.service.d.ts +13 -1
- 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/utilities/file/file.utility.d.ts +15 -0
- package/dist/utilities/file/file.utility.js +18 -1
- package/dist/utilities/file/file.utility.js.map +1 -1
- package/dist/utilities/hcl/hcl.utility.d.ts +61 -0
- package/dist/utilities/hcl/hcl.utility.js +229 -0
- package/dist/utilities/hcl/hcl.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 +21 -0
- package/dist/utilities/string/string.utility.js +39 -0
- package/dist/utilities/string/string.utility.js.map +1 -0
- package/dist/utilities/terraform/terraform.utility.d.ts +227 -0
- package/dist/utilities/terraform/terraform.utility.js +434 -0
- package/dist/utilities/terraform/terraform.utility.js.map +1 -0
- package/dist/utilities/test-helpers/test-classes.d.ts +18 -31
- package/dist/utilities/test-helpers/test-classes.js +18 -41
- package/dist/utilities/test-helpers/test-classes.js.map +1 -1
- package/dist/utilities/test-helpers/test-models.js +12 -0
- 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 +463 -0
- package/dist/utilities/test-helpers/test-modes.js.map +1 -0
- package/dist/utilities/test-helpers/test-modules.d.ts +41 -0
- package/dist/utilities/test-helpers/test-modules.js +79 -0
- package/dist/utilities/test-helpers/test-modules.js.map +1 -0
- package/dist/utilities/test-helpers/test-overlays.d.ts +17 -1
- package/dist/utilities/test-helpers/test-overlays.js +49 -5
- package/dist/utilities/test-helpers/test-overlays.js.map +1 -1
- package/dist/utilities/test-helpers/test-resources.d.ts +19 -1
- package/dist/utilities/test-helpers/test-resources.js +61 -3
- 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 +6 -5
- 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/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
|
@@ -10,12 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { Validate } from '../../decorators/validate.decorator.js';
|
|
11
11
|
import { Schema } from '../../functions/schema/schema.js';
|
|
12
12
|
/**
|
|
13
|
+
* Schema of the {@link Server} model.
|
|
14
|
+
*
|
|
13
15
|
* @group Models/Server
|
|
14
16
|
*/
|
|
15
17
|
export class ServerSchema {
|
|
16
18
|
constructor() {
|
|
17
19
|
/**
|
|
18
|
-
* The name of the server.
|
|
20
|
+
* The name of the server, unique within the {@link App}.
|
|
19
21
|
*/
|
|
20
22
|
this.serverKey = Schema();
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.schema.js","sourceRoot":"","sources":["../../../src/models/server/server.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"server.schema.js","sourceRoot":"","sources":["../../../src/models/server/server.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,OAAO,YAAY;IAAzB;QACE;;WAEG;QAEH,cAAS,GAAG,MAAM,EAAU,CAAC;IAC/B,CAAC;CAAA;AADC;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,6BAA6B,EAAE,EAAE,CAAC;;+CAChE"}
|
|
@@ -5,9 +5,14 @@ import { ServiceSchema } from './service.schema.js';
|
|
|
5
5
|
* What separates them from Server is that Services are hosted and managed outside of your infrastructure.
|
|
6
6
|
* An external Redis server on the cloud, or a managed Kafka queue from AWS, are a few examples.
|
|
7
7
|
*
|
|
8
|
+
* `Service` carries nothing but an ID, so it is only useful when extended - a subclass adds the fields
|
|
9
|
+
* the third-party service actually needs, and overrides `synth()`. Calling `synth()` on `Service`
|
|
10
|
+
* itself throws.
|
|
11
|
+
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
|
10
|
-
*
|
|
14
|
+
* @Model<MyService>('@example', 'service', MyServiceSchema)
|
|
15
|
+
* export class MyService extends Service { ... }
|
|
11
16
|
* ```
|
|
12
17
|
*
|
|
13
18
|
* @group Models/Service
|
|
@@ -16,7 +21,16 @@ import { ServiceSchema } from './service.schema.js';
|
|
|
16
21
|
*/
|
|
17
22
|
export declare class Service extends AModel<ServiceSchema, Service> {
|
|
18
23
|
readonly serviceId: string;
|
|
24
|
+
/**
|
|
25
|
+
* @param serviceId The ID of the service, unique within the app.
|
|
26
|
+
*/
|
|
19
27
|
constructor(serviceId: string);
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
20
31
|
setContext(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
21
35
|
synth(): ServiceSchema;
|
|
22
36
|
}
|
|
@@ -17,9 +17,14 @@ import { ServiceSchema } from './service.schema.js';
|
|
|
17
17
|
* What separates them from Server is that Services are hosted and managed outside of your infrastructure.
|
|
18
18
|
* An external Redis server on the cloud, or a managed Kafka queue from AWS, are a few examples.
|
|
19
19
|
*
|
|
20
|
+
* `Service` carries nothing but an ID, so it is only useful when extended - a subclass adds the fields
|
|
21
|
+
* the third-party service actually needs, and overrides `synth()`. Calling `synth()` on `Service`
|
|
22
|
+
* itself throws.
|
|
23
|
+
*
|
|
20
24
|
* @example
|
|
21
25
|
* ```ts
|
|
22
|
-
*
|
|
26
|
+
* @Model<MyService>('@example', 'service', MyServiceSchema)
|
|
27
|
+
* export class MyService extends Service { ... }
|
|
23
28
|
* ```
|
|
24
29
|
*
|
|
25
30
|
* @group Models/Service
|
|
@@ -27,10 +32,16 @@ import { ServiceSchema } from './service.schema.js';
|
|
|
27
32
|
* @see Definition of [Default Models](/docs/fundamentals/models#default-models).
|
|
28
33
|
*/
|
|
29
34
|
let Service = Service_1 = class Service extends AModel {
|
|
35
|
+
/**
|
|
36
|
+
* @param serviceId The ID of the service, unique within the app.
|
|
37
|
+
*/
|
|
30
38
|
constructor(serviceId) {
|
|
31
39
|
super();
|
|
32
40
|
this.serviceId = serviceId;
|
|
33
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
34
45
|
setContext() {
|
|
35
46
|
const parents = this.getParents();
|
|
36
47
|
const app = parents['app']?.[0]?.to;
|
|
@@ -39,6 +50,9 @@ let Service = Service_1 = class Service extends AModel {
|
|
|
39
50
|
}
|
|
40
51
|
return [`${this.constructor.NODE_NAME}=${this.serviceId}`, app.getContext()].join(',');
|
|
41
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
42
56
|
synth() {
|
|
43
57
|
throw new ModelError('Method not implemented! Use subclass', this);
|
|
44
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.model.js","sourceRoot":"","sources":["../../../src/models/service/service.model.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"service.model.js","sourceRoot":"","sources":["../../../src/models/service/service.model.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,OAAO,eAAb,MAAM,OAAQ,SAAQ,MAA8B;IAGzD;;OAEG;IACH,YAAY,SAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACM,UAAU;QACjB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,CAAC,GAAI,IAAI,CAAC,WAA8B,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7G,CAAC;IAED;;OAEG;IACM,KAAK;QACZ,MAAM,IAAI,UAAU,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;CACF,CAAA;AA7BY,OAAO;IADnB,KAAK,CAAU,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC;;GACrC,OAAO,CA6BnB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Schema of the {@link Service} model.
|
|
3
|
+
* Subclasses extend this schema to declare whatever the third-party service needs.
|
|
4
|
+
*
|
|
2
5
|
* @group Models/Service
|
|
3
6
|
*/
|
|
4
7
|
export declare class ServiceSchema {
|
|
5
8
|
/**
|
|
6
|
-
* The ID of the service.
|
|
9
|
+
* The ID of the service, unique within the {@link App}.
|
|
7
10
|
*/
|
|
8
11
|
serviceId: string;
|
|
9
12
|
}
|
|
@@ -10,12 +10,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { Validate } from '../../decorators/validate.decorator.js';
|
|
11
11
|
import { Schema } from '../../functions/schema/schema.js';
|
|
12
12
|
/**
|
|
13
|
+
* Schema of the {@link Service} model.
|
|
14
|
+
* Subclasses extend this schema to declare whatever the third-party service needs.
|
|
15
|
+
*
|
|
13
16
|
* @group Models/Service
|
|
14
17
|
*/
|
|
15
18
|
export class ServiceSchema {
|
|
16
19
|
constructor() {
|
|
17
20
|
/**
|
|
18
|
-
* The ID of the service.
|
|
21
|
+
* The ID of the service, unique within the {@link App}.
|
|
19
22
|
*/
|
|
20
23
|
this.serviceId = Schema();
|
|
21
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.schema.js","sourceRoot":"","sources":["../../../src/models/service/service.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"service.schema.js","sourceRoot":"","sources":["../../../src/models/service/service.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IAA1B;QACE;;WAEG;QAEH,cAAS,GAAG,MAAM,EAAU,CAAC;IAC/B,CAAC;CAAA;AADC;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,iCAAiC,EAAE,EAAE,CAAC;;gDACrE"}
|
|
@@ -18,10 +18,8 @@ import { SubnetSchema, SubnetType } from './subnet.schema.js';
|
|
|
18
18
|
* @see Definition of [Default Models](/docs/fundamentals/models#default-models).
|
|
19
19
|
*/
|
|
20
20
|
export declare class Subnet extends AModel<SubnetSchema, Subnet> {
|
|
21
|
-
private options;
|
|
22
21
|
readonly subnetId: string;
|
|
23
22
|
readonly subnetName: string;
|
|
24
|
-
constructor(region: Region, name: string);
|
|
25
23
|
/**
|
|
26
24
|
* To block/disable intra-network communication within self.
|
|
27
25
|
* When this is set to `true`,
|
|
@@ -31,12 +29,38 @@ export declare class Subnet extends AModel<SubnetSchema, Subnet> {
|
|
|
31
29
|
* @experimental
|
|
32
30
|
*/
|
|
33
31
|
get disableSubnetIntraNetwork(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
34
35
|
set disableSubnetIntraNetwork(disableSubnetIntraNetwork: boolean);
|
|
36
|
+
/**
|
|
37
|
+
* Whether this subnet is reachable from the internet.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue {@link SubnetType.PRIVATE}
|
|
40
|
+
*/
|
|
35
41
|
get subnetType(): SubnetType;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
36
45
|
set subnetType(subnetType: SubnetType);
|
|
46
|
+
private options;
|
|
47
|
+
/**
|
|
48
|
+
* @param region The region this subnet belongs to.
|
|
49
|
+
* @param name The name of the subnet. The subnet's ID is derived from the region and this name.
|
|
50
|
+
*/
|
|
51
|
+
constructor(region: Region, name: string);
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
static unSynth(subnet: SubnetSchema, deReferenceContext: (context: string) => Promise<UnknownModel>): Promise<Subnet>;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
37
59
|
setContext(): string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
38
63
|
synth(): SubnetSchema;
|
|
39
|
-
static unSynth(subnet: SubnetSchema, deReferenceContext: (context: string) => Promise<UnknownModel>): Promise<Subnet>;
|
|
40
64
|
/**
|
|
41
65
|
* To update the networking rules of this subnet to allow or deny connectivity from another subnet.
|
|
42
66
|
* The networking rules are uni-directional,
|
|
@@ -28,15 +28,6 @@ import { SubnetSchema, SubnetType } from './subnet.schema.js';
|
|
|
28
28
|
* @see Definition of [Default Models](/docs/fundamentals/models#default-models).
|
|
29
29
|
*/
|
|
30
30
|
let Subnet = Subnet_1 = class Subnet extends AModel {
|
|
31
|
-
constructor(region, name) {
|
|
32
|
-
super();
|
|
33
|
-
this.options = {
|
|
34
|
-
disableSubnetIntraNetwork: false,
|
|
35
|
-
subnetType: SubnetType.PRIVATE,
|
|
36
|
-
};
|
|
37
|
-
this.subnetId = region.regionId + '-' + name;
|
|
38
|
-
this.subnetName = name;
|
|
39
|
-
}
|
|
40
31
|
/**
|
|
41
32
|
* To block/disable intra-network communication within self.
|
|
42
33
|
* When this is set to `true`,
|
|
@@ -48,15 +39,52 @@ let Subnet = Subnet_1 = class Subnet extends AModel {
|
|
|
48
39
|
get disableSubnetIntraNetwork() {
|
|
49
40
|
return this.options.disableSubnetIntraNetwork;
|
|
50
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
51
45
|
set disableSubnetIntraNetwork(disableSubnetIntraNetwork) {
|
|
52
46
|
this.options.disableSubnetIntraNetwork = disableSubnetIntraNetwork;
|
|
53
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Whether this subnet is reachable from the internet.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue {@link SubnetType.PRIVATE}
|
|
52
|
+
*/
|
|
54
53
|
get subnetType() {
|
|
55
54
|
return this.options.subnetType;
|
|
56
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
57
59
|
set subnetType(subnetType) {
|
|
58
60
|
this.options.subnetType = subnetType || SubnetType.PRIVATE;
|
|
59
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* @param region The region this subnet belongs to.
|
|
64
|
+
* @param name The name of the subnet. The subnet's ID is derived from the region and this name.
|
|
65
|
+
*/
|
|
66
|
+
constructor(region, name) {
|
|
67
|
+
super();
|
|
68
|
+
this.options = {
|
|
69
|
+
disableSubnetIntraNetwork: false,
|
|
70
|
+
subnetType: SubnetType.PRIVATE,
|
|
71
|
+
};
|
|
72
|
+
this.subnetId = region.regionId + '-' + name;
|
|
73
|
+
this.subnetName = name;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
static async unSynth(subnet, deReferenceContext) {
|
|
79
|
+
const region = (await deReferenceContext(subnet.region.context));
|
|
80
|
+
const newSubnet = new Subnet_1(region, subnet.subnetName);
|
|
81
|
+
newSubnet.disableSubnetIntraNetwork = subnet.options.disableSubnetIntraNetwork;
|
|
82
|
+
newSubnet.subnetType = subnet.options.subnetType;
|
|
83
|
+
return newSubnet;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
60
88
|
setContext() {
|
|
61
89
|
const parents = this.getParents();
|
|
62
90
|
const region = parents['region']?.[0]?.to;
|
|
@@ -65,6 +93,9 @@ let Subnet = Subnet_1 = class Subnet extends AModel {
|
|
|
65
93
|
}
|
|
66
94
|
return [`${this.constructor.NODE_NAME}=${this.subnetId}`, region.getContext()].join(',');
|
|
67
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
68
99
|
synth() {
|
|
69
100
|
const parents = this.getParents();
|
|
70
101
|
const region = parents['region'][0].to;
|
|
@@ -75,13 +106,6 @@ let Subnet = Subnet_1 = class Subnet extends AModel {
|
|
|
75
106
|
subnetName: this.subnetName,
|
|
76
107
|
};
|
|
77
108
|
}
|
|
78
|
-
static async unSynth(subnet, deReferenceContext) {
|
|
79
|
-
const region = (await deReferenceContext(subnet.region.context));
|
|
80
|
-
const newSubnet = new Subnet_1(region, subnet.subnetName);
|
|
81
|
-
newSubnet.disableSubnetIntraNetwork = subnet.options.disableSubnetIntraNetwork;
|
|
82
|
-
newSubnet.subnetType = subnet.options.subnetType;
|
|
83
|
-
return newSubnet;
|
|
84
|
-
}
|
|
85
109
|
/**
|
|
86
110
|
* To update the networking rules of this subnet to allow or deny connectivity from another subnet.
|
|
87
111
|
* The networking rules are uni-directional,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subnet.model.js","sourceRoot":"","sources":["../../../src/models/subnet/subnet.model.ts"],"names":[],"mappings":";;;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AAEI,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,MAA4B;
|
|
1
|
+
{"version":3,"file":"subnet.model.js","sourceRoot":"","sources":["../../../src/models/subnet/subnet.model.ts"],"names":[],"mappings":"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"}
|
|
@@ -18,13 +18,22 @@ export declare enum SubnetType {
|
|
|
18
18
|
PRIVATE = "private"
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
+
* Schema of the {@link Subnet} model.
|
|
22
|
+
*
|
|
21
23
|
* @group Models/Subnet
|
|
22
24
|
*/
|
|
23
25
|
export declare class SubnetSchema {
|
|
26
|
+
/**
|
|
27
|
+
* The behavior options of the subnet.
|
|
28
|
+
* - See {@link Subnet.disableSubnetIntraNetwork} and {@link SubnetType}.
|
|
29
|
+
*/
|
|
24
30
|
options: {
|
|
25
31
|
disableSubnetIntraNetwork: boolean;
|
|
26
32
|
subnetType: SubnetType;
|
|
27
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* The region this subnet belongs to.
|
|
36
|
+
*/
|
|
28
37
|
region: IModelReference;
|
|
29
38
|
/**
|
|
30
39
|
* The ID of the subnet.
|
|
@@ -29,11 +29,20 @@ export var SubnetType;
|
|
|
29
29
|
SubnetType["PRIVATE"] = "private";
|
|
30
30
|
})(SubnetType || (SubnetType = {}));
|
|
31
31
|
/**
|
|
32
|
+
* Schema of the {@link Subnet} model.
|
|
33
|
+
*
|
|
32
34
|
* @group Models/Subnet
|
|
33
35
|
*/
|
|
34
36
|
export class SubnetSchema {
|
|
35
37
|
constructor() {
|
|
38
|
+
/**
|
|
39
|
+
* The behavior options of the subnet.
|
|
40
|
+
* - See {@link Subnet.disableSubnetIntraNetwork} and {@link SubnetType}.
|
|
41
|
+
*/
|
|
36
42
|
this.options = Schema();
|
|
43
|
+
/**
|
|
44
|
+
* The region this subnet belongs to.
|
|
45
|
+
*/
|
|
37
46
|
this.region = Schema();
|
|
38
47
|
/**
|
|
39
48
|
* The ID of the subnet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subnet.schema.js","sourceRoot":"","sources":["../../../src/models/subnet/subnet.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAG1D;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;;;OAIG;IACH,+BAAiB,CAAA;IAEjB;;;OAGG;IACH,iCAAmB,CAAA;AACrB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED
|
|
1
|
+
{"version":3,"file":"subnet.schema.js","sourceRoot":"","sources":["../../../src/models/subnet/subnet.schema.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAG1D;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;;;OAIG;IACH,+BAAiB,CAAA;IAEjB;;;OAGG;IACH,iCAAmB,CAAA;AACrB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED;;;;GAIG;AACH,MAAM,OAAO,YAAY;IAAzB;QACE;;;WAGG;QACH,YAAO,GAAG,MAAM,EAAkE,CAAC;QAEnF;;WAEG;QACH,WAAM,GAAG,MAAM,EAAmB,CAAC;QAEnC;;;WAGG;QACH,aAAQ,GAAG,MAAM,EAAU,CAAC;QAE5B;;WAEG;QAEH,eAAU,GAAG,MAAM,EAAU,CAAC;IAChC,CAAC;CAAA;AADC;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,6BAA6B,EAAE,EAAE,CAAC;;gDAC/D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DiffMetadata } from '../functions/diff/diff-metadata.js';
|
|
2
|
+
import type { App } from '../models/app/app.model.js';
|
|
3
|
+
/**
|
|
4
|
+
* The result of applying the model transaction once: the model transaction and the resource diffs,
|
|
5
|
+
* with the resource graph built and swept into terraform as a side effect. `commit` consumes the
|
|
6
|
+
* model transaction; `generate` and `validate` consume the resource diffs.
|
|
7
|
+
*/
|
|
8
|
+
export interface ModelTransactionResult {
|
|
9
|
+
modelTransaction: DiffMetadata[][];
|
|
10
|
+
resourceDiffs: DiffMetadata[][];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Applies the model transaction: derives the full resource graph from intent (running every model
|
|
14
|
+
* action once) and sweeps it into terraform, returning the model transaction and resource diffs.
|
|
15
|
+
*
|
|
16
|
+
* This is the single "build" step of a lifecycle. In production each of generate/validate/commit is
|
|
17
|
+
* a separate process and builds its own; a single-process driver (e.g. the test harness) can build
|
|
18
|
+
* once and hand the same {@link ModelTransactionResult} to all three modes, so the graph is derived
|
|
19
|
+
* once rather than three times. No resource actions run here — that is `generateTerraform`'s path.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyModelTransaction(app: App): Promise<ModelTransactionResult>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Container } from '../functions/container/container.js';
|
|
2
|
+
import { TransactionService } from '../services/transaction/transaction.service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Applies the model transaction: derives the full resource graph from intent (running every model
|
|
5
|
+
* action once) and sweeps it into terraform, returning the model transaction and resource diffs.
|
|
6
|
+
*
|
|
7
|
+
* This is the single "build" step of a lifecycle. In production each of generate/validate/commit is
|
|
8
|
+
* a separate process and builds its own; a single-process driver (e.g. the test harness) can build
|
|
9
|
+
* once and hand the same {@link ModelTransactionResult} to all three modes, so the graph is derived
|
|
10
|
+
* once rather than three times. No resource actions run here — that is `generateTerraform`'s path.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export async function applyModelTransaction(app) {
|
|
15
|
+
const transactionService = await Container.getInstance().get(TransactionService);
|
|
16
|
+
const transaction = transactionService.beginTransaction(await app.diff(), {
|
|
17
|
+
generateTerraform: true,
|
|
18
|
+
yieldModelTransaction: true,
|
|
19
|
+
yieldResourceDiffs: true,
|
|
20
|
+
});
|
|
21
|
+
const modelTransaction = (await transaction.next()).value;
|
|
22
|
+
const resourceDiffs = (await transaction.next()).value;
|
|
23
|
+
return { modelTransaction, resourceDiffs };
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=apply-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-transaction.js","sourceRoot":"","sources":["../../src/modes/apply-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAGhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAYpF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,GAAQ;IAClD,MAAM,kBAAkB,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAEjF,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE;QACxE,iBAAiB,EAAE,IAAI;QACvB,qBAAqB,EAAE,IAAI;QAC3B,kBAAkB,EAAE,IAAI;KACzB,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,CAAC,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,KAAyB,CAAC;IAC9E,MAAM,aAAa,GAAG,CAAC,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,KAAyB,CAAC;IAE3E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { TerraformFolderOutput, TerraformResourceOutput } from '../app.type.js';
|
|
2
|
+
import type { CommitModeCompletedEvent } from '../events/index.js';
|
|
3
|
+
import type { DiffMetadata } from '../functions/diff/diff-metadata.js';
|
|
4
|
+
import type { ModelTransactionResult } from './apply-transaction.js';
|
|
5
|
+
export type TerraformOutputs = Record<string, {
|
|
6
|
+
value: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Records a terraform apply back into octo's state: Committed ← Cloud. The catch-up step of the
|
|
10
|
+
* cycle, not a drift resolver.
|
|
11
|
+
*
|
|
12
|
+
* Operates on the resource graph the `transaction` already built: reads every module folder's outputs
|
|
13
|
+
* from the caller-supplied `outputs` map (keyed by module id), populates resource responses by the
|
|
14
|
+
* `${resourceId}-${key}` convention, and syncs the actual graph to the new graph.
|
|
15
|
+
*
|
|
16
|
+
* Rejects — all-or-nothing, throwing before any mutation: a declared output that is missing
|
|
17
|
+
* (partial apply) or carries a null value (broken apply). `partial` turns those rejections into
|
|
18
|
+
* warnings and keeps every resource whose outputs did not all resolve out of the committed graph,
|
|
19
|
+
* which is what lets a failed apply still record the half that worked. Outputs are demanded only for the
|
|
20
|
+
* modules the sweep filled — never for an emptied (deleted) folder, whose destroy simply drops its
|
|
21
|
+
* resources from the committed state. Warns: outputs supplied for a folder that is neither in
|
|
22
|
+
* intent nor in the committed folder record (`previousFolders`) are ignored — octo never fails on,
|
|
23
|
+
* or touches, a folder it does not recognize; re-declaring the module in intent re-adopts it.
|
|
24
|
+
*
|
|
25
|
+
* Returns the model transaction so {@link Octo} can run the persistence + commit hooks it owns,
|
|
26
|
+
* plus a description of what was committed for the caller to emit and surface.
|
|
27
|
+
*
|
|
28
|
+
* `previousMappings` is the octo→terraform mapping persisted by the last commit. It supplies the
|
|
29
|
+
* module and addresses of resources being deleted, which this run's sweep no longer renders.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function commit({ outputs, partial, previousFolders, previousMappings, transaction, }: {
|
|
34
|
+
outputs: Map<string, TerraformOutputs>;
|
|
35
|
+
partial?: boolean;
|
|
36
|
+
previousFolders?: TerraformFolderOutput[];
|
|
37
|
+
previousMappings?: TerraformResourceOutput[];
|
|
38
|
+
transaction: ModelTransactionResult;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
emptiedModuleIds: string[];
|
|
41
|
+
externalResourceIds: string[];
|
|
42
|
+
modelTransaction: DiffMetadata[][];
|
|
43
|
+
resources: CommitModeCompletedEvent['payload']['resources'];
|
|
44
|
+
responses: {
|
|
45
|
+
key: string;
|
|
46
|
+
previousValue?: string;
|
|
47
|
+
resourceContext: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}[];
|
|
50
|
+
warnings: {
|
|
51
|
+
message: string;
|
|
52
|
+
moduleId?: string;
|
|
53
|
+
}[];
|
|
54
|
+
}>;
|