jumbo-cli 2.0.2 → 2.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/dist/application/context/architecture/update/ArchitectureUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/architecture/update/ArchitectureUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/architecture/update/ArchitectureUpdatedEventHandler.js +4 -1
- package/dist/application/context/architecture/update/ArchitectureUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.js +4 -1
- package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/audiences/remove/AudienceRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/audiences/remove/AudienceRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/audiences/remove/AudienceRemovedEventHandler.js +4 -1
- package/dist/application/context/audiences/remove/AudienceRemovedEventHandler.js.map +1 -1
- package/dist/application/context/audiences/update/AudienceUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/audiences/update/AudienceUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/audiences/update/AudienceUpdatedEventHandler.js +4 -1
- package/dist/application/context/audiences/update/AudienceUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.d.ts +3 -1
- package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.js +3 -1
- package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.js.map +1 -1
- package/dist/application/context/components/remove/ComponentRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/components/remove/ComponentRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/components/remove/ComponentRemovedEventHandler.js +3 -1
- package/dist/application/context/components/remove/ComponentRemovedEventHandler.js.map +1 -1
- package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.d.ts +3 -1
- package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.js +3 -1
- package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.js.map +1 -1
- package/dist/application/context/components/update/ComponentUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/components/update/ComponentUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/components/update/ComponentUpdatedEventHandler.js +4 -1
- package/dist/application/context/components/update/ComponentUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/decisions/restore/DecisionRestoredEventHandler.d.ts +3 -1
- package/dist/application/context/decisions/restore/DecisionRestoredEventHandler.d.ts.map +1 -1
- package/dist/application/context/decisions/restore/DecisionRestoredEventHandler.js +3 -1
- package/dist/application/context/decisions/restore/DecisionRestoredEventHandler.js.map +1 -1
- package/dist/application/context/decisions/supersede/DecisionSupersededEventHandler.d.ts +3 -1
- package/dist/application/context/decisions/supersede/DecisionSupersededEventHandler.d.ts.map +1 -1
- package/dist/application/context/decisions/supersede/DecisionSupersededEventHandler.js +3 -1
- package/dist/application/context/decisions/supersede/DecisionSupersededEventHandler.js.map +1 -1
- package/dist/application/context/decisions/update/DecisionUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/decisions/update/DecisionUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/decisions/update/DecisionUpdatedEventHandler.js +4 -1
- package/dist/application/context/decisions/update/DecisionUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/dependencies/remove/DependencyRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/dependencies/remove/DependencyRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/dependencies/remove/DependencyRemovedEventHandler.js +4 -1
- package/dist/application/context/dependencies/remove/DependencyRemovedEventHandler.js.map +1 -1
- package/dist/application/context/dependencies/update/DependencyUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/dependencies/update/DependencyUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/dependencies/update/DependencyUpdatedEventHandler.js +4 -1
- package/dist/application/context/dependencies/update/DependencyUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/goals/remove/GoalRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/goals/remove/GoalRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/goals/remove/GoalRemovedEventHandler.js +4 -1
- package/dist/application/context/goals/remove/GoalRemovedEventHandler.js.map +1 -1
- package/dist/application/context/goals/update/GoalUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/goals/update/GoalUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/goals/update/GoalUpdatedEventHandler.js +4 -1
- package/dist/application/context/goals/update/GoalUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/guidelines/remove/GuidelineRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/guidelines/remove/GuidelineRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/guidelines/remove/GuidelineRemovedEventHandler.js +4 -1
- package/dist/application/context/guidelines/remove/GuidelineRemovedEventHandler.js.map +1 -1
- package/dist/application/context/guidelines/update/GuidelineUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/guidelines/update/GuidelineUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/guidelines/update/GuidelineUpdatedEventHandler.js +4 -1
- package/dist/application/context/guidelines/update/GuidelineUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/invariants/remove/InvariantRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/invariants/remove/InvariantRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/invariants/remove/InvariantRemovedEventHandler.js +4 -1
- package/dist/application/context/invariants/remove/InvariantRemovedEventHandler.js.map +1 -1
- package/dist/application/context/invariants/update/InvariantUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/invariants/update/InvariantUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/invariants/update/InvariantUpdatedEventHandler.js +4 -1
- package/dist/application/context/invariants/update/InvariantUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/project/update/ProjectUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/project/update/ProjectUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/project/update/ProjectUpdatedEventHandler.js +4 -1
- package/dist/application/context/project/update/ProjectUpdatedEventHandler.js.map +1 -1
- package/dist/application/context/relations/maintain/IRelationMaintenanceGoalRegistrar.d.ts +10 -0
- package/dist/application/context/relations/maintain/IRelationMaintenanceGoalRegistrar.d.ts.map +1 -0
- package/dist/application/context/relations/maintain/IRelationMaintenanceGoalRegistrar.js +3 -0
- package/dist/application/context/relations/maintain/IRelationMaintenanceGoalRegistrar.js.map +1 -0
- package/dist/application/context/relations/maintain/NoOpRelationMaintenanceGoalRegistrar.d.ts +9 -0
- package/dist/application/context/relations/maintain/NoOpRelationMaintenanceGoalRegistrar.d.ts.map +1 -0
- package/dist/application/context/relations/maintain/NoOpRelationMaintenanceGoalRegistrar.js +14 -0
- package/dist/application/context/relations/maintain/NoOpRelationMaintenanceGoalRegistrar.js.map +1 -0
- package/dist/application/context/relations/maintain/RelationMaintenanceGoalRegistrar.d.ts +16 -0
- package/dist/application/context/relations/maintain/RelationMaintenanceGoalRegistrar.d.ts.map +1 -0
- package/dist/application/context/relations/maintain/RelationMaintenanceGoalRegistrar.js +43 -0
- package/dist/application/context/relations/maintain/RelationMaintenanceGoalRegistrar.js.map +1 -0
- package/dist/application/context/value-propositions/remove/ValuePropositionRemovedEventHandler.d.ts +3 -1
- package/dist/application/context/value-propositions/remove/ValuePropositionRemovedEventHandler.d.ts.map +1 -1
- package/dist/application/context/value-propositions/remove/ValuePropositionRemovedEventHandler.js +4 -1
- package/dist/application/context/value-propositions/remove/ValuePropositionRemovedEventHandler.js.map +1 -1
- package/dist/application/context/value-propositions/update/ValuePropositionUpdatedEventHandler.d.ts +3 -1
- package/dist/application/context/value-propositions/update/ValuePropositionUpdatedEventHandler.d.ts.map +1 -1
- package/dist/application/context/value-propositions/update/ValuePropositionUpdatedEventHandler.js +4 -1
- package/dist/application/context/value-propositions/update/ValuePropositionUpdatedEventHandler.js.map +1 -1
- package/dist/infrastructure/host/HostBuilder.d.ts.map +1 -1
- package/dist/infrastructure/host/HostBuilder.js +24 -22
- package/dist/infrastructure/host/HostBuilder.js.map +1 -1
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.d.ts.map +1 -1
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.js +24 -22
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.js.map +1 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryClient.d.ts +1 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryClient.d.ts.map +1 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryClient.js +7 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryClient.js.map +1 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryConstants.d.ts +2 -2
- package/dist/infrastructure/telemetry/PostHogTelemetryConstants.d.ts.map +1 -1
- package/dist/infrastructure/telemetry/PostHogTelemetryConstants.js +2 -2
- package/dist/infrastructure/telemetry/PostHogTelemetryConstants.js.map +1 -1
- package/dist/presentation/cli/commands/audience-pains/update/audiencePain.update.js +2 -2
- package/dist/presentation/cli/commands/audience-pains/update/audiencePain.update.js.map +1 -1
- package/dist/presentation/cli/commands/components/show/component.show.js +2 -2
- package/dist/presentation/cli/commands/components/show/component.show.js.map +1 -1
- package/dist/presentation/cli/commands/components/update/component.update.js +4 -4
- package/dist/presentation/cli/commands/components/update/component.update.js.map +1 -1
- package/dist/presentation/cli/commands/evolve/evolve.js +1 -1
- package/dist/presentation/cli/commands/evolve/evolve.js.map +1 -1
- package/dist/presentation/cli/commands/goals/add/goal.add.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/add/goal.add.js +14 -6
- package/dist/presentation/cli/commands/goals/add/goal.add.js.map +1 -1
- package/dist/presentation/cli/commands/goals/start/goal.start.js +1 -1
- package/dist/presentation/cli/commands/goals/start/goal.start.js.map +1 -1
- package/dist/presentation/cli/commands/heal/heal.js +1 -1
- package/dist/presentation/cli/commands/heal/heal.js.map +1 -1
- package/dist/presentation/cli/commands/project/update/project.update.d.ts +1 -1
- package/dist/presentation/cli/commands/project/update/project.update.d.ts.map +1 -1
- package/dist/presentation/cli/commands/project/update/project.update.js +1 -6
- package/dist/presentation/cli/commands/project/update/project.update.js.map +1 -1
- package/dist/presentation/cli/commands/value-propositions/update/value.update.js +5 -5
- package/dist/presentation/cli/commands/value-propositions/update/value.update.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IArchitectureUpdatedProjector } from "./IArchitectureUpdatedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for ArchitectureUpdatedEvent.
|
|
6
7
|
*
|
|
@@ -9,7 +10,8 @@ import { IArchitectureUpdatedProjector } from "./IArchitectureUpdatedProjector.j
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class ArchitectureUpdatedEventHandler implements IEventHandler {
|
|
11
12
|
private readonly projector;
|
|
12
|
-
|
|
13
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
14
|
+
constructor(projector: IArchitectureUpdatedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
13
15
|
handle(event: BaseEvent): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=ArchitectureUpdatedEventHandler.d.ts.map
|
package/dist/application/context/architecture/update/ArchitectureUpdatedEventHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchitectureUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/architecture/update/ArchitectureUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"ArchitectureUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/architecture/update/ArchitectureUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,aAAa;IAEjE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,6BAA6B,EACxC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ArchitectureUpdatedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for ArchitectureUpdatedEvent.
|
|
6
7
|
*
|
|
@@ -8,12 +9,14 @@ exports.ArchitectureUpdatedEventHandler = void 0;
|
|
|
8
9
|
* when architecture is updated. Subscribes to ArchitectureUpdatedEvent via event bus.
|
|
9
10
|
*/
|
|
10
11
|
class ArchitectureUpdatedEventHandler {
|
|
11
|
-
constructor(projector) {
|
|
12
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
12
13
|
this.projector = projector;
|
|
14
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
13
15
|
}
|
|
14
16
|
async handle(event) {
|
|
15
17
|
const architectureUpdatedEvent = event;
|
|
16
18
|
await this.projector.applyArchitectureUpdated(architectureUpdatedEvent);
|
|
19
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.ARCHITECTURE, architectureUpdatedEvent.aggregateId, "architecture was updated");
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.ArchitectureUpdatedEventHandler = ArchitectureUpdatedEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchitectureUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/architecture/update/ArchitectureUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACH,MAAa,+BAA+B;IAC1C,
|
|
1
|
+
{"version":3,"file":"ArchitectureUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/architecture/update/ArchitectureUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE;;;;;GAKG;AACH,MAAa,+BAA+B;IAC1C,YACmB,SAAwC,EACxC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA+B;QACxC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,wBAAwB,GAAG,KAAiC,CAAC;QACnE,MAAM,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;QACxE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,YAAY,EACvB,wBAAwB,CAAC,WAAW,EACpC,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF;AAfD,0EAeC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IAudiencePainUpdatedProjector } from "./IAudiencePainUpdatedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudiencePainUpdatedEvent event.
|
|
6
7
|
*
|
|
@@ -9,7 +10,8 @@ import { IAudiencePainUpdatedProjector } from "./IAudiencePainUpdatedProjector.j
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class AudiencePainUpdatedEventHandler implements IEventHandler {
|
|
11
12
|
private readonly projector;
|
|
12
|
-
|
|
13
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
14
|
+
constructor(projector: IAudiencePainUpdatedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
13
15
|
handle(event: BaseEvent): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=AudiencePainUpdatedEventHandler.d.ts.map
|
package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudiencePainUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"AudiencePainUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,aAAa;IAEjE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,6BAA6B,EACxC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AudiencePainUpdatedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudiencePainUpdatedEvent event.
|
|
6
7
|
*
|
|
@@ -8,12 +9,14 @@ exports.AudiencePainUpdatedEventHandler = void 0;
|
|
|
8
9
|
* when an audience pain is updated. Subscribes to AudiencePainUpdatedEvent via event bus.
|
|
9
10
|
*/
|
|
10
11
|
class AudiencePainUpdatedEventHandler {
|
|
11
|
-
constructor(projector) {
|
|
12
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
12
13
|
this.projector = projector;
|
|
14
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
13
15
|
}
|
|
14
16
|
async handle(event) {
|
|
15
17
|
const audiencePainUpdatedEvent = event;
|
|
16
18
|
await this.projector.applyAudiencePainUpdated(audiencePainUpdatedEvent);
|
|
19
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.PAIN, audiencePainUpdatedEvent.aggregateId, "audience pain was updated");
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.AudiencePainUpdatedEventHandler = AudiencePainUpdatedEventHandler;
|
package/dist/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudiencePainUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACH,MAAa,+BAA+B;IAC1C,
|
|
1
|
+
{"version":3,"file":"AudiencePainUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audience-pains/update/AudiencePainUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE;;;;;GAKG;AACH,MAAa,+BAA+B;IAC1C,YACmB,SAAwC,EACxC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA+B;QACxC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,wBAAwB,GAAG,KAAiC,CAAC;QACnE,MAAM,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;QACxE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,IAAI,EACf,wBAAwB,CAAC,WAAW,EACpC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;CACF;AAfD,0EAeC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IAudienceRemovedProjector } from "./IAudienceRemovedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudienceRemovedEvent event.
|
|
6
7
|
*
|
|
@@ -9,7 +10,8 @@ import { IAudienceRemovedProjector } from "./IAudienceRemovedProjector.js";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class AudienceRemovedEventHandler implements IEventHandler {
|
|
11
12
|
private readonly projector;
|
|
12
|
-
|
|
13
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
14
|
+
constructor(projector: IAudienceRemovedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
13
15
|
handle(event: BaseEvent): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=AudienceRemovedEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudienceRemovedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audiences/remove/AudienceRemovedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AudienceRemovedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audiences/remove/AudienceRemovedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;;;GAKG;AACH,qBAAa,2BAA4B,YAAW,aAAa;IAE7D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,yBAAyB,EACpC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AudienceRemovedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudienceRemovedEvent event.
|
|
6
7
|
*
|
|
@@ -8,11 +9,13 @@ exports.AudienceRemovedEventHandler = void 0;
|
|
|
8
9
|
* when an audience is removed. Subscribes to AudienceRemovedEvent via event bus.
|
|
9
10
|
*/
|
|
10
11
|
class AudienceRemovedEventHandler {
|
|
11
|
-
constructor(projector) {
|
|
12
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
12
13
|
this.projector = projector;
|
|
14
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
13
15
|
}
|
|
14
16
|
async handle(event) {
|
|
15
17
|
const audienceRemovedEvent = event;
|
|
18
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.AUDIENCE, audienceRemovedEvent.aggregateId, "audience was removed");
|
|
16
19
|
await this.projector.applyAudienceRemoved(audienceRemovedEvent);
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudienceRemovedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audiences/remove/AudienceRemovedEventHandler.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACH,MAAa,2BAA2B;IACtC,
|
|
1
|
+
{"version":3,"file":"AudienceRemovedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audiences/remove/AudienceRemovedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE;;;;;GAKG;AACH,MAAa,2BAA2B;IACtC,YACmB,SAAoC,EACpC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA2B;QACpC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,oBAAoB,GAAG,KAA6B,CAAC;QAC3D,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,QAAQ,EACnB,oBAAoB,CAAC,WAAW,EAChC,sBAAsB,CACvB,CAAC;QACF,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAClE,CAAC;CACF;AAfD,kEAeC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IAudienceUpdatedProjector } from "./IAudienceUpdatedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudienceUpdatedEvent event.
|
|
6
7
|
*
|
|
@@ -9,7 +10,8 @@ import { IAudienceUpdatedProjector } from "./IAudienceUpdatedProjector.js";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class AudienceUpdatedEventHandler implements IEventHandler {
|
|
11
12
|
private readonly projector;
|
|
12
|
-
|
|
13
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
14
|
+
constructor(projector: IAudienceUpdatedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
13
15
|
handle(event: BaseEvent): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=AudienceUpdatedEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudienceUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audiences/update/AudienceUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AudienceUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/audiences/update/AudienceUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;;;GAKG;AACH,qBAAa,2BAA4B,YAAW,aAAa;IAE7D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,yBAAyB,EACpC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AudienceUpdatedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
/**
|
|
5
6
|
* Event handler for AudienceUpdatedEvent event.
|
|
6
7
|
*
|
|
@@ -8,12 +9,14 @@ exports.AudienceUpdatedEventHandler = void 0;
|
|
|
8
9
|
* when an audience is updated. Subscribes to AudienceUpdatedEvent via event bus.
|
|
9
10
|
*/
|
|
10
11
|
class AudienceUpdatedEventHandler {
|
|
11
|
-
constructor(projector) {
|
|
12
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
12
13
|
this.projector = projector;
|
|
14
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
13
15
|
}
|
|
14
16
|
async handle(event) {
|
|
15
17
|
const audienceUpdatedEvent = event;
|
|
16
18
|
await this.projector.applyAudienceUpdated(audienceUpdatedEvent);
|
|
19
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.AUDIENCE, audienceUpdatedEvent.aggregateId, "audience was updated");
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.AudienceUpdatedEventHandler = AudienceUpdatedEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudienceUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audiences/update/AudienceUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACH,MAAa,2BAA2B;IACtC,
|
|
1
|
+
{"version":3,"file":"AudienceUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/audiences/update/AudienceUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE;;;;;GAKG;AACH,MAAa,2BAA2B;IACtC,YACmB,SAAoC,EACpC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA2B;QACpC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,oBAAoB,GAAG,KAA6B,CAAC;QAC3D,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;QAChE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,QAAQ,EACnB,oBAAoB,CAAC,WAAW,EAChC,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF;AAfD,kEAeC"}
|
|
@@ -2,10 +2,12 @@ import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IComponentDeprecatedProjector } from "./IComponentDeprecatedProjector.js";
|
|
4
4
|
import { RelationDeactivationCascade } from "../../relations/deactivate/RelationDeactivationCascade.js";
|
|
5
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
5
6
|
export declare class ComponentDeprecatedEventHandler implements IEventHandler {
|
|
6
7
|
private readonly projector;
|
|
7
8
|
private readonly relationDeactivationCascade;
|
|
8
|
-
|
|
9
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
10
|
+
constructor(projector: IComponentDeprecatedProjector, relationDeactivationCascade: RelationDeactivationCascade, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
9
11
|
handle(event: BaseEvent): Promise<void>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=ComponentDeprecatedEventHandler.d.ts.map
|
package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentDeprecatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/deprecate/ComponentDeprecatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentDeprecatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/deprecate/ComponentDeprecatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH,qBAAa,+BAAgC,YAAW,aAAa;IAEjE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBAFhC,SAAS,EAAE,6BAA6B,EACxC,2BAA2B,EAAE,2BAA2B,EACxD,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAe9C"}
|
|
@@ -3,14 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ComponentDeprecatedEventHandler = void 0;
|
|
4
4
|
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
5
5
|
class ComponentDeprecatedEventHandler {
|
|
6
|
-
constructor(projector, relationDeactivationCascade) {
|
|
6
|
+
constructor(projector, relationDeactivationCascade, relationMaintenanceGoalRegistrar) {
|
|
7
7
|
this.projector = projector;
|
|
8
8
|
this.relationDeactivationCascade = relationDeactivationCascade;
|
|
9
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
9
10
|
}
|
|
10
11
|
async handle(event) {
|
|
11
12
|
const componentDeprecatedEvent = event;
|
|
12
13
|
await this.projector.applyComponentDeprecated(componentDeprecatedEvent);
|
|
13
14
|
const deprecationReason = componentDeprecatedEvent.payload.reason ?? "no reason provided";
|
|
15
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.COMPONENT, componentDeprecatedEvent.aggregateId, `component was deprecated: ${deprecationReason}`);
|
|
14
16
|
await this.relationDeactivationCascade.execute(Constants_js_1.EntityType.COMPONENT, componentDeprecatedEvent.aggregateId, `Automatically deactivated because component ${componentDeprecatedEvent.aggregateId} was deprecated: ${deprecationReason}`);
|
|
15
17
|
}
|
|
16
18
|
}
|
package/dist/application/context/components/deprecate/ComponentDeprecatedEventHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentDeprecatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/deprecate/ComponentDeprecatedEventHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ComponentDeprecatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/deprecate/ComponentDeprecatedEventHandler.ts"],"names":[],"mappings":";;;AAMA,4EAAuE;AAEvE,MAAa,+BAA+B;IAC1C,YACmB,SAAwC,EACxC,2BAAwD,EACxD,gCAAmE;QAFnE,cAAS,GAAT,SAAS,CAA+B;QACxC,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,wBAAwB,GAAG,KAAiC,CAAC;QACnE,MAAM,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;QACxE,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,OAAO,CAAC,MAAM,IAAI,oBAAoB,CAAC;QAC1F,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,SAAS,EACpB,wBAAwB,CAAC,WAAW,EACpC,6BAA6B,iBAAiB,EAAE,CACjD,CAAC;QACF,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAC5C,yBAAU,CAAC,SAAS,EACpB,wBAAwB,CAAC,WAAW,EACpC,+CAA+C,wBAAwB,CAAC,WAAW,oBAAoB,iBAAiB,EAAE,CAC3H,CAAC;IACJ,CAAC;CACF;AAtBD,0EAsBC"}
|
|
@@ -2,10 +2,12 @@ import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IComponentRemovedProjector } from "./IComponentRemovedProjector.js";
|
|
4
4
|
import { RelationDeactivationCascade } from "../../relations/deactivate/RelationDeactivationCascade.js";
|
|
5
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
5
6
|
export declare class ComponentRemovedEventHandler implements IEventHandler {
|
|
6
7
|
private readonly projector;
|
|
7
8
|
private readonly relationDeactivationCascade;
|
|
8
|
-
|
|
9
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
10
|
+
constructor(projector: IComponentRemovedProjector, relationDeactivationCascade: RelationDeactivationCascade, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
9
11
|
handle(event: BaseEvent): Promise<void>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=ComponentRemovedEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRemovedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/remove/ComponentRemovedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentRemovedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/remove/ComponentRemovedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH,qBAAa,4BAA6B,YAAW,aAAa;IAE9D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBAFhC,SAAS,EAAE,0BAA0B,EACrC,2BAA2B,EAAE,2BAA2B,EACxD,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAc9C"}
|
|
@@ -3,13 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ComponentRemovedEventHandler = void 0;
|
|
4
4
|
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
5
5
|
class ComponentRemovedEventHandler {
|
|
6
|
-
constructor(projector, relationDeactivationCascade) {
|
|
6
|
+
constructor(projector, relationDeactivationCascade, relationMaintenanceGoalRegistrar) {
|
|
7
7
|
this.projector = projector;
|
|
8
8
|
this.relationDeactivationCascade = relationDeactivationCascade;
|
|
9
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
9
10
|
}
|
|
10
11
|
async handle(event) {
|
|
11
12
|
const componentRemovedEvent = event;
|
|
12
13
|
await this.projector.applyComponentRemoved(componentRemovedEvent);
|
|
14
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.COMPONENT, componentRemovedEvent.aggregateId, "component was removed");
|
|
13
15
|
await this.relationDeactivationCascade.execute(Constants_js_1.EntityType.COMPONENT, componentRemovedEvent.aggregateId, `Automatically deactivated because component ${componentRemovedEvent.aggregateId} was removed`);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRemovedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/remove/ComponentRemovedEventHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ComponentRemovedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/remove/ComponentRemovedEventHandler.ts"],"names":[],"mappings":";;;AAMA,4EAAuE;AAEvE,MAAa,4BAA4B;IACvC,YACmB,SAAqC,EACrC,2BAAwD,EACxD,gCAAmE;QAFnE,cAAS,GAAT,SAAS,CAA4B;QACrC,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,qBAAqB,GAAG,KAA8B,CAAC;QAC7D,MAAM,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;QAClE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,SAAS,EACpB,qBAAqB,CAAC,WAAW,EACjC,uBAAuB,CACxB,CAAC;QACF,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAC5C,yBAAU,CAAC,SAAS,EACpB,qBAAqB,CAAC,WAAW,EACjC,+CAA+C,qBAAqB,CAAC,WAAW,cAAc,CAC/F,CAAC;IACJ,CAAC;CACF;AArBD,oEAqBC"}
|
package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IComponentUndeprecatedProjector } from "./IComponentUndeprecatedProjector.js";
|
|
4
4
|
import { RelationReactivationCascade } from "../../relations/reactivate/RelationReactivationCascade.js";
|
|
5
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
5
6
|
export declare class ComponentUndeprecatedEventHandler implements IEventHandler {
|
|
6
7
|
private readonly projector;
|
|
7
8
|
private readonly relationReactivationCascade;
|
|
8
|
-
|
|
9
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
10
|
+
constructor(projector: IComponentUndeprecatedProjector, relationReactivationCascade: RelationReactivationCascade, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
9
11
|
handle(event: BaseEvent): Promise<void>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=ComponentUndeprecatedEventHandler.d.ts.map
|
package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentUndeprecatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentUndeprecatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH,qBAAa,iCAAkC,YAAW,aAAa;IAEnE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBAFhC,SAAS,EAAE,+BAA+B,EAC1C,2BAA2B,EAAE,2BAA2B,EACxD,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAc9C"}
|
package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.js
CHANGED
|
@@ -3,14 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ComponentUndeprecatedEventHandler = void 0;
|
|
4
4
|
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
5
5
|
class ComponentUndeprecatedEventHandler {
|
|
6
|
-
constructor(projector, relationReactivationCascade) {
|
|
6
|
+
constructor(projector, relationReactivationCascade, relationMaintenanceGoalRegistrar) {
|
|
7
7
|
this.projector = projector;
|
|
8
8
|
this.relationReactivationCascade = relationReactivationCascade;
|
|
9
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
9
10
|
}
|
|
10
11
|
async handle(event) {
|
|
11
12
|
const componentUndeprecatedEvent = event;
|
|
12
13
|
await this.projector.applyComponentUndeprecated(componentUndeprecatedEvent);
|
|
13
14
|
await this.relationReactivationCascade.execute(Constants_js_1.EntityType.COMPONENT, componentUndeprecatedEvent.aggregateId, `Automatically reactivated because component ${componentUndeprecatedEvent.aggregateId} was undeprecated: ${componentUndeprecatedEvent.payload.reason}`);
|
|
15
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.COMPONENT, componentUndeprecatedEvent.aggregateId, `component was undeprecated: ${componentUndeprecatedEvent.payload.reason}`);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
exports.ComponentUndeprecatedEventHandler = ComponentUndeprecatedEventHandler;
|
package/dist/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentUndeprecatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ComponentUndeprecatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/undeprecate/ComponentUndeprecatedEventHandler.ts"],"names":[],"mappings":";;;AAMA,4EAAuE;AAEvE,MAAa,iCAAiC;IAC5C,YACmB,SAA0C,EAC1C,2BAAwD,EACxD,gCAAmE;QAFnE,cAAS,GAAT,SAAS,CAAiC;QAC1C,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,0BAA0B,GAAG,KAAmC,CAAC;QACvE,MAAM,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,CAAC;QAC5E,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAC5C,yBAAU,CAAC,SAAS,EACpB,0BAA0B,CAAC,WAAW,EACtC,+CAA+C,0BAA0B,CAAC,WAAW,sBAAsB,0BAA0B,CAAC,OAAO,CAAC,MAAM,EAAE,CACvJ,CAAC;QACF,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,SAAS,EACpB,0BAA0B,CAAC,WAAW,EACtC,+BAA+B,0BAA0B,CAAC,OAAO,CAAC,MAAM,EAAE,CAC3E,CAAC;IACJ,CAAC;CACF;AArBD,8EAqBC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IComponentUpdatedProjector } from "./IComponentUpdatedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
export declare class ComponentUpdatedEventHandler implements IEventHandler {
|
|
5
6
|
private readonly projector;
|
|
6
|
-
|
|
7
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
8
|
+
constructor(projector: IComponentUpdatedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
7
9
|
handle(event: BaseEvent): Promise<void>;
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=ComponentUpdatedEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/update/ComponentUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/components/update/ComponentUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH,qBAAa,4BAA6B,YAAW,aAAa;IAE9D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,0BAA0B,EACrC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ComponentUpdatedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
class ComponentUpdatedEventHandler {
|
|
5
|
-
constructor(projector) {
|
|
6
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
6
7
|
this.projector = projector;
|
|
8
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
7
9
|
}
|
|
8
10
|
async handle(event) {
|
|
9
11
|
const componentUpdatedEvent = event;
|
|
10
12
|
await this.projector.applyComponentUpdated(componentUpdatedEvent);
|
|
13
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.COMPONENT, componentUpdatedEvent.aggregateId, "component was updated");
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
exports.ComponentUpdatedEventHandler = ComponentUpdatedEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/update/ComponentUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,MAAa,4BAA4B;IACvC,
|
|
1
|
+
{"version":3,"file":"ComponentUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/components/update/ComponentUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE,MAAa,4BAA4B;IACvC,YACmB,SAAqC,EACrC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA4B;QACrC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,qBAAqB,GAAG,KAA8B,CAAC;QAC7D,MAAM,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;QAClE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,SAAS,EACpB,qBAAqB,CAAC,WAAW,EACjC,uBAAuB,CACxB,CAAC;IACJ,CAAC;CACF;AAfD,oEAeC"}
|
|
@@ -2,10 +2,12 @@ import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IDecisionRestoredProjector } from "./IDecisionRestoredProjector.js";
|
|
4
4
|
import { RelationReactivationCascade } from "../../relations/reactivate/RelationReactivationCascade.js";
|
|
5
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
5
6
|
export declare class DecisionRestoredEventHandler implements IEventHandler {
|
|
6
7
|
private readonly projector;
|
|
7
8
|
private readonly relationReactivationCascade;
|
|
8
|
-
|
|
9
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
10
|
+
constructor(projector: IDecisionRestoredProjector, relationReactivationCascade: RelationReactivationCascade, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
9
11
|
handle(event: BaseEvent): Promise<void>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=DecisionRestoredEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionRestoredEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/restore/DecisionRestoredEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"DecisionRestoredEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/restore/DecisionRestoredEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH,qBAAa,4BAA6B,YAAW,aAAa;IAE9D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBAFhC,SAAS,EAAE,0BAA0B,EACrC,2BAA2B,EAAE,2BAA2B,EACxD,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAc9C"}
|
|
@@ -3,14 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DecisionRestoredEventHandler = void 0;
|
|
4
4
|
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
5
5
|
class DecisionRestoredEventHandler {
|
|
6
|
-
constructor(projector, relationReactivationCascade) {
|
|
6
|
+
constructor(projector, relationReactivationCascade, relationMaintenanceGoalRegistrar) {
|
|
7
7
|
this.projector = projector;
|
|
8
8
|
this.relationReactivationCascade = relationReactivationCascade;
|
|
9
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
9
10
|
}
|
|
10
11
|
async handle(event) {
|
|
11
12
|
const decisionRestoredEvent = event;
|
|
12
13
|
await this.projector.applyDecisionRestored(decisionRestoredEvent);
|
|
13
14
|
await this.relationReactivationCascade.execute(Constants_js_1.EntityType.DECISION, decisionRestoredEvent.aggregateId, `Automatically reactivated because decision ${decisionRestoredEvent.aggregateId} was restored: ${decisionRestoredEvent.payload.reason}`);
|
|
15
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.DECISION, decisionRestoredEvent.aggregateId, `decision was restored: ${decisionRestoredEvent.payload.reason}`);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
exports.DecisionRestoredEventHandler = DecisionRestoredEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionRestoredEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/restore/DecisionRestoredEventHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DecisionRestoredEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/restore/DecisionRestoredEventHandler.ts"],"names":[],"mappings":";;;AAMA,4EAAuE;AAEvE,MAAa,4BAA4B;IACvC,YACmB,SAAqC,EACrC,2BAAwD,EACxD,gCAAmE;QAFnE,cAAS,GAAT,SAAS,CAA4B;QACrC,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,qBAAqB,GAAG,KAA8B,CAAC;QAC7D,MAAM,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;QAClE,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAC5C,yBAAU,CAAC,QAAQ,EACnB,qBAAqB,CAAC,WAAW,EACjC,8CAA8C,qBAAqB,CAAC,WAAW,kBAAkB,qBAAqB,CAAC,OAAO,CAAC,MAAM,EAAE,CACxI,CAAC;QACF,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,QAAQ,EACnB,qBAAqB,CAAC,WAAW,EACjC,0BAA0B,qBAAqB,CAAC,OAAO,CAAC,MAAM,EAAE,CACjE,CAAC;IACJ,CAAC;CACF;AArBD,oEAqBC"}
|
|
@@ -2,6 +2,7 @@ import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IDecisionSupersededProjector } from "./IDecisionSupersededProjector.js";
|
|
4
4
|
import { RelationDeactivationCascade } from "../../relations/deactivate/RelationDeactivationCascade.js";
|
|
5
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
5
6
|
/**
|
|
6
7
|
* Application layer handler that orchestrates projection updates for DecisionSuperseded events.
|
|
7
8
|
* Subscribes to events via event bus.
|
|
@@ -9,7 +10,8 @@ import { RelationDeactivationCascade } from "../../relations/deactivate/Relation
|
|
|
9
10
|
export declare class DecisionSupersededEventHandler implements IEventHandler {
|
|
10
11
|
private readonly projector;
|
|
11
12
|
private readonly relationDeactivationCascade;
|
|
12
|
-
|
|
13
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
14
|
+
constructor(projector: IDecisionSupersededProjector, relationDeactivationCascade: RelationDeactivationCascade, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
13
15
|
handle(event: BaseEvent): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=DecisionSupersededEventHandler.d.ts.map
|
package/dist/application/context/decisions/supersede/DecisionSupersededEventHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionSupersededEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/supersede/DecisionSupersededEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"DecisionSupersededEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/supersede/DecisionSupersededEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;GAGG;AACH,qBAAa,8BAA+B,YAAW,aAAa;IAEhE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBAFhC,SAAS,EAAE,4BAA4B,EACvC,2BAA2B,EAAE,2BAA2B,EACxD,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAc9C"}
|
|
@@ -7,13 +7,15 @@ const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
|
7
7
|
* Subscribes to events via event bus.
|
|
8
8
|
*/
|
|
9
9
|
class DecisionSupersededEventHandler {
|
|
10
|
-
constructor(projector, relationDeactivationCascade) {
|
|
10
|
+
constructor(projector, relationDeactivationCascade, relationMaintenanceGoalRegistrar) {
|
|
11
11
|
this.projector = projector;
|
|
12
12
|
this.relationDeactivationCascade = relationDeactivationCascade;
|
|
13
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
13
14
|
}
|
|
14
15
|
async handle(event) {
|
|
15
16
|
const decisionSupersededEvent = event;
|
|
16
17
|
await this.projector.applyDecisionSuperseded(decisionSupersededEvent);
|
|
18
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.DECISION, decisionSupersededEvent.aggregateId, `decision was superseded by decision ${decisionSupersededEvent.payload.supersededBy}`);
|
|
17
19
|
await this.relationDeactivationCascade.execute(Constants_js_1.EntityType.DECISION, decisionSupersededEvent.aggregateId, `Automatically deactivated because decision ${decisionSupersededEvent.aggregateId} was superseded by decision ${decisionSupersededEvent.payload.supersededBy}`);
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionSupersededEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/supersede/DecisionSupersededEventHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DecisionSupersededEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/supersede/DecisionSupersededEventHandler.ts"],"names":[],"mappings":";;;AAMA,4EAAuE;AAEvE;;;GAGG;AACH,MAAa,8BAA8B;IACzC,YACmB,SAAuC,EACvC,2BAAwD,EACxD,gCAAmE;QAFnE,cAAS,GAAT,SAAS,CAA8B;QACvC,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,uBAAuB,GAAG,KAAgC,CAAC;QACjE,MAAM,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAC;QACtE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,QAAQ,EACnB,uBAAuB,CAAC,WAAW,EACnC,uCAAuC,uBAAuB,CAAC,OAAO,CAAC,YAAY,EAAE,CACtF,CAAC;QACF,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAC5C,yBAAU,CAAC,QAAQ,EACnB,uBAAuB,CAAC,WAAW,EACnC,8CAA8C,uBAAuB,CAAC,WAAW,+BAA+B,uBAAuB,CAAC,OAAO,CAAC,YAAY,EAAE,CAC/J,CAAC;IACJ,CAAC;CACF;AArBD,wEAqBC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { IEventHandler } from "../../../messaging/IEventHandler.js";
|
|
2
2
|
import { BaseEvent } from "../../../../domain/BaseEvent.js";
|
|
3
3
|
import { IDecisionUpdatedProjector } from "./IDecisionUpdatedProjector.js";
|
|
4
|
+
import { IRelationMaintenanceGoalRegistrar } from "../../relations/maintain/IRelationMaintenanceGoalRegistrar.js";
|
|
4
5
|
/**
|
|
5
6
|
* Application layer handler that orchestrates projection updates for DecisionUpdated events.
|
|
6
7
|
* Subscribes to events via event bus.
|
|
7
8
|
*/
|
|
8
9
|
export declare class DecisionUpdatedEventHandler implements IEventHandler {
|
|
9
10
|
private readonly projector;
|
|
10
|
-
|
|
11
|
+
private readonly relationMaintenanceGoalRegistrar;
|
|
12
|
+
constructor(projector: IDecisionUpdatedProjector, relationMaintenanceGoalRegistrar: IRelationMaintenanceGoalRegistrar);
|
|
11
13
|
handle(event: BaseEvent): Promise<void>;
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=DecisionUpdatedEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/update/DecisionUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"DecisionUpdatedEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/decisions/update/DecisionUpdatedEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAGlH;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,aAAa;IAE7D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gCAAgC;gBADhC,SAAS,EAAE,yBAAyB,EACpC,gCAAgC,EAAE,iCAAiC;IAGhF,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DecisionUpdatedEventHandler = void 0;
|
|
4
|
+
const Constants_js_1 = require("../../../../domain/relations/Constants.js");
|
|
4
5
|
/**
|
|
5
6
|
* Application layer handler that orchestrates projection updates for DecisionUpdated events.
|
|
6
7
|
* Subscribes to events via event bus.
|
|
7
8
|
*/
|
|
8
9
|
class DecisionUpdatedEventHandler {
|
|
9
|
-
constructor(projector) {
|
|
10
|
+
constructor(projector, relationMaintenanceGoalRegistrar) {
|
|
10
11
|
this.projector = projector;
|
|
12
|
+
this.relationMaintenanceGoalRegistrar = relationMaintenanceGoalRegistrar;
|
|
11
13
|
}
|
|
12
14
|
async handle(event) {
|
|
13
15
|
const decisionUpdatedEvent = event;
|
|
14
16
|
await this.projector.applyDecisionUpdated(decisionUpdatedEvent);
|
|
17
|
+
await this.relationMaintenanceGoalRegistrar.execute(Constants_js_1.EntityType.DECISION, decisionUpdatedEvent.aggregateId, "decision was updated");
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
exports.DecisionUpdatedEventHandler = DecisionUpdatedEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/update/DecisionUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA;;;GAGG;AACH,MAAa,2BAA2B;IACtC,
|
|
1
|
+
{"version":3,"file":"DecisionUpdatedEventHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/decisions/update/DecisionUpdatedEventHandler.ts"],"names":[],"mappings":";;;AAKA,4EAAuE;AAEvE;;;GAGG;AACH,MAAa,2BAA2B;IACtC,YACmB,SAAoC,EACpC,gCAAmE;QADnE,cAAS,GAAT,SAAS,CAA2B;QACpC,qCAAgC,GAAhC,gCAAgC,CAAmC;IACnF,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,oBAAoB,GAAG,KAA6B,CAAC;QAC3D,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;QAChE,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CACjD,yBAAU,CAAC,QAAQ,EACnB,oBAAoB,CAAC,WAAW,EAChC,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF;AAfD,kEAeC"}
|