jumbo-cli 2.0.1 → 2.0.3
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.txt +661 -661
- package/README.md +239 -239
- package/assets/claude-logo.svg +7 -7
- package/assets/codex-logo.svg +3 -3
- package/assets/cursor-logo.svg +31 -31
- package/assets/mistral-logo.svg +19 -19
- package/assets/skills/codify-jumbo-goal/SKILL.md +116 -116
- package/assets/skills/define-jumbo-goals/SKILL.md +193 -193
- package/assets/skills/refine-jumbo-goals/SKILL.md +156 -156
- package/assets/skills/reject-jumbo-goal/SKILL.md +58 -58
- package/assets/skills/review-jumbo-goal/SKILL.md +94 -94
- package/assets/skills/start-jumbo-goal/SKILL.md +86 -86
- package/assets/vscode-logo.svg +41 -41
- package/dist/domain/project/AgentFileReferenceContent.js +7 -7
- package/dist/domain/project/AgentsMdContent.js +74 -74
- package/dist/domain/project/CopilotInstructionsContent.js +38 -38
- package/dist/infrastructure/context/architecture/define/SqliteArchitectureDefinedProjector.js +5 -5
- package/dist/infrastructure/context/architecture/migrations/001-create-architecture-views.sql +16 -16
- package/dist/infrastructure/context/architecture/migrations/002-drop-dataflow-column.sql +4 -4
- package/dist/infrastructure/context/architecture/update/SqliteArchitectureUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/audience-pains/add/SqliteAudiencePainAddedProjector.js +4 -4
- package/dist/infrastructure/context/audience-pains/migrations/001-create-audience-pain-views.sql +17 -17
- package/dist/infrastructure/context/audience-pains/update/SqliteAudiencePainUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/audiences/add/SqliteAudienceAddedProjector.js +5 -5
- package/dist/infrastructure/context/audiences/migrations/001-create-audience-views.sql +17 -17
- package/dist/infrastructure/context/audiences/remove/SqliteAudienceRemovedProjector.js +6 -6
- package/dist/infrastructure/context/audiences/update/SqliteAudienceUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/components/add/SqliteComponentAddedProjector.js +5 -5
- package/dist/infrastructure/context/components/deprecate/SqliteComponentDeprecatedProjector.js +7 -7
- package/dist/infrastructure/context/components/migrations/001-create-component-views.sql +21 -21
- package/dist/infrastructure/context/components/remove/SqliteComponentRemovedProjector.js +6 -6
- package/dist/infrastructure/context/components/rename/SqliteComponentRenamedProjector.js +4 -4
- package/dist/infrastructure/context/components/undeprecate/SqliteComponentUndeprecatedProjector.js +7 -7
- package/dist/infrastructure/context/components/update/SqliteComponentUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/decisions/add/SqliteDecisionAddedProjector.js +6 -6
- package/dist/infrastructure/context/decisions/migrations/001-create-decision-views.sql +22 -22
- package/dist/infrastructure/context/decisions/restore/SqliteDecisionRestoredProjector.js +9 -9
- package/dist/infrastructure/context/decisions/reverse/SqliteDecisionReversedProjector.js +8 -8
- package/dist/infrastructure/context/decisions/supersede/SqliteDecisionSupersededProjector.js +7 -7
- package/dist/infrastructure/context/decisions/update/SqliteDecisionUpdatedProjector.js +10 -10
- package/dist/infrastructure/context/dependencies/add/SqliteDependencyAddedProjector.js +5 -5
- package/dist/infrastructure/context/dependencies/get/SqliteLegacyDependencyReader.js +5 -5
- package/dist/infrastructure/context/dependencies/migrations/001-create-dependency-views.sql +21 -21
- package/dist/infrastructure/context/dependencies/migrations/002-add-external-dependency-columns.sql +11 -11
- package/dist/infrastructure/context/dependencies/remove/SqliteDependencyRemovedProjector.js +8 -8
- package/dist/infrastructure/context/dependencies/update/SqliteDependencyUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/goals/add/SqliteGoalAddedProjector.js +7 -7
- package/dist/infrastructure/context/goals/approve/SqliteGoalApprovedProjector.js +9 -9
- package/dist/infrastructure/context/goals/block/SqliteGoalBlockedProjector.js +7 -7
- package/dist/infrastructure/context/goals/close/SqliteGoalClosedProjector.js +9 -9
- package/dist/infrastructure/context/goals/codify/SqliteGoalCodifyingStartedProjector.js +9 -9
- package/dist/infrastructure/context/goals/commit/SqliteGoalCommittedProjector.js +9 -9
- package/dist/infrastructure/context/goals/complete/SqliteGoalCompletedProjector.js +9 -9
- package/dist/infrastructure/context/goals/migrate/SqliteGoalStatusMigratedProjector.js +7 -7
- package/dist/infrastructure/context/goals/migrations/001-create-goal-views.sql +20 -20
- package/dist/infrastructure/context/goals/migrations/002-add-embedded-context-columns.sql +11 -11
- package/dist/infrastructure/context/goals/migrations/003-add-next-goal-column.sql +4 -4
- package/dist/infrastructure/context/goals/migrations/004-add-claim-columns.sql +7 -7
- package/dist/infrastructure/context/goals/migrations/005-add-progress-column.sql +4 -4
- package/dist/infrastructure/context/goals/migrations/006-drop-boundaries-and-embedded-context-columns.sql +11 -11
- package/dist/infrastructure/context/goals/migrations/007-add-title-column.sql +2 -2
- package/dist/infrastructure/context/goals/migrations/008-add-prerequisite-goals-column.sql +1 -1
- package/dist/infrastructure/context/goals/migrations/009-add-review-issues-column.sql +1 -1
- package/dist/infrastructure/context/goals/pause/SqliteGoalPausedProjector.js +7 -7
- package/dist/infrastructure/context/goals/qualify/SqliteGoalQualifiedProjector.js +9 -9
- package/dist/infrastructure/context/goals/refine/SqliteGoalRefinedProjector.js +15 -15
- package/dist/infrastructure/context/goals/reject/SqliteGoalRejectedProjector.js +10 -10
- package/dist/infrastructure/context/goals/remove/SqliteGoalRemovedProjector.js +3 -3
- package/dist/infrastructure/context/goals/reset/SqliteGoalResetProjector.js +11 -11
- package/dist/infrastructure/context/goals/resume/SqliteGoalResumedProjector.js +10 -10
- package/dist/infrastructure/context/goals/review/SqliteGoalSubmittedForReviewProjector.js +9 -9
- package/dist/infrastructure/context/goals/start/SqliteGoalStartedProjector.js +9 -9
- package/dist/infrastructure/context/goals/submit/SqliteGoalSubmittedProjector.js +9 -9
- package/dist/infrastructure/context/goals/unblock/SqliteGoalUnblockedProjector.js +7 -7
- package/dist/infrastructure/context/goals/update/SqliteGoalUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/goals/update-progress/SqliteGoalProgressUpdatedProjector.js +8 -8
- package/dist/infrastructure/context/guidelines/add/SqliteGuidelineAddedProjector.js +5 -5
- package/dist/infrastructure/context/guidelines/migrations/001-create-guideline-views.sql +22 -22
- package/dist/infrastructure/context/guidelines/remove/SqliteGuidelineRemovedProjector.js +8 -8
- package/dist/infrastructure/context/guidelines/update/SqliteGuidelineUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/invariants/add/SqliteInvariantAddedProjector.js +5 -5
- package/dist/infrastructure/context/invariants/migrations/001-create-invariant-views.sql +16 -16
- package/dist/infrastructure/context/invariants/remove/SqliteInvariantRemovedProjector.js +2 -2
- package/dist/infrastructure/context/invariants/update/SqliteInvariantUpdatedProjector.js +9 -9
- package/dist/infrastructure/context/project/init/SqliteProjectInitializedProjector.js +5 -5
- package/dist/infrastructure/context/project/migrations/001-create-project-views.sql +13 -13
- package/dist/infrastructure/context/project/migrations/002-drop-boundaries-column.sql +4 -4
- package/dist/infrastructure/context/project/update/SqliteProjectUpdatedProjector.js +4 -4
- package/dist/infrastructure/context/relations/add/SqliteRelationAddedProjector.js +12 -12
- package/dist/infrastructure/context/relations/deactivate/SqliteRelationDeactivatedProjector.js +14 -14
- package/dist/infrastructure/context/relations/migrations/001-create-relation-views.sql +28 -28
- package/dist/infrastructure/context/relations/reactivate/SqliteRelationReactivatedProjector.js +14 -14
- package/dist/infrastructure/context/relations/remove/SqliteRelationRemovedProjector.js +14 -14
- package/dist/infrastructure/context/sessions/end/SqliteSessionEndedProjector.js +8 -8
- package/dist/infrastructure/context/sessions/migrations/001-create-session-views.sql +43 -43
- package/dist/infrastructure/context/sessions/migrations/002-add-goal-lifecycle-columns.sql +7 -7
- package/dist/infrastructure/context/sessions/migrations/003-remove-session-pause-status.sql +8 -8
- package/dist/infrastructure/context/sessions/migrations/004-drop-session-summary-views.sql +5 -5
- package/dist/infrastructure/context/sessions/start/SqliteSessionStartedProjector.js +5 -5
- package/dist/infrastructure/context/value-propositions/add/SqliteValuePropositionAddedProjector.js +5 -5
- package/dist/infrastructure/context/value-propositions/migrations/001-create-value-proposition-views.sql +19 -19
- package/dist/infrastructure/context/value-propositions/remove/SqliteValuePropositionRemovedProjector.js +2 -2
- package/dist/infrastructure/context/value-propositions/update/SqliteValuePropositionUpdatedProjector.js +4 -4
- package/dist/infrastructure/host/workers/migrations/001-create-workers.sql +12 -12
- package/dist/infrastructure/persistence/MigrationRunner.js +10 -10
- package/dist/infrastructure/settings/FsSettingsInitializer.js +25 -25
- package/dist/infrastructure/settings/FsSettingsReader.js +25 -25
- 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/project/init/project.init.d.ts.map +1 -1
- package/dist/presentation/cli/commands/project/init/project.init.js +4 -1
- package/dist/presentation/cli/commands/project/init/project.init.js.map +1 -1
- package/package.json +90 -89
- package/dist/application/context/goals/complete/CompleteGoalCommand.d.ts +0 -8
- package/dist/application/context/goals/complete/CompleteGoalCommand.d.ts.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalCommand.js +0 -3
- package/dist/application/context/goals/complete/CompleteGoalCommand.js.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalCommandHandler.d.ts +0 -27
- package/dist/application/context/goals/complete/CompleteGoalCommandHandler.d.ts.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalCommandHandler.js +0 -52
- package/dist/application/context/goals/complete/CompleteGoalCommandHandler.js.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalController.d.ts +0 -9
- package/dist/application/context/goals/complete/CompleteGoalController.d.ts.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalController.js +0 -13
- package/dist/application/context/goals/complete/CompleteGoalController.js.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalRequest.d.ts +0 -10
- package/dist/application/context/goals/complete/CompleteGoalRequest.d.ts.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalRequest.js +0 -3
- package/dist/application/context/goals/complete/CompleteGoalRequest.js.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalResponse.d.ts +0 -17
- package/dist/application/context/goals/complete/CompleteGoalResponse.d.ts.map +0 -1
- package/dist/application/context/goals/complete/CompleteGoalResponse.js +0 -3
- package/dist/application/context/goals/complete/CompleteGoalResponse.js.map +0 -1
- package/dist/application/context/goals/complete/ICompleteGoalGateway.d.ts +0 -6
- package/dist/application/context/goals/complete/ICompleteGoalGateway.d.ts.map +0 -1
- package/dist/application/context/goals/complete/ICompleteGoalGateway.js +0 -3
- package/dist/application/context/goals/complete/ICompleteGoalGateway.js.map +0 -1
- package/dist/application/context/goals/complete/LocalCompleteGoalGateway.d.ts +0 -16
- package/dist/application/context/goals/complete/LocalCompleteGoalGateway.d.ts.map +0 -1
- package/dist/application/context/goals/complete/LocalCompleteGoalGateway.js +0 -49
- package/dist/application/context/goals/complete/LocalCompleteGoalGateway.js.map +0 -1
- package/dist/application/context/project/init/IInitializationProtocol.d.ts +0 -44
- package/dist/application/context/project/init/IInitializationProtocol.d.ts.map +0 -1
- package/dist/application/context/project/init/IInitializationProtocol.js +0 -14
- package/dist/application/context/project/init/IInitializationProtocol.js.map +0 -1
- package/dist/application/context/project/init/InitializationProtocol.d.ts +0 -32
- package/dist/application/context/project/init/InitializationProtocol.d.ts.map +0 -1
- package/dist/application/context/project/init/InitializationProtocol.js +0 -51
- package/dist/application/context/project/init/InitializationProtocol.js.map +0 -1
- package/dist/application/context/relations/get/GetRelationsQueryHandler.d.ts +0 -14
- package/dist/application/context/relations/get/GetRelationsQueryHandler.d.ts.map +0 -1
- package/dist/application/context/relations/get/GetRelationsQueryHandler.js +0 -19
- package/dist/application/context/relations/get/GetRelationsQueryHandler.js.map +0 -1
- package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.d.ts +0 -27
- package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.d.ts.map +0 -1
- package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.js +0 -32
- package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.js.map +0 -1
- package/dist/application/maintenance/repair/IRepairMaintenanceGateway.d.ts +0 -6
- package/dist/application/maintenance/repair/IRepairMaintenanceGateway.d.ts.map +0 -1
- package/dist/application/maintenance/repair/IRepairMaintenanceGateway.js +0 -3
- package/dist/application/maintenance/repair/IRepairMaintenanceGateway.js.map +0 -1
- package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.d.ts +0 -16
- package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.d.ts.map +0 -1
- package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.js +0 -90
- package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.js.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceController.d.ts +0 -9
- package/dist/application/maintenance/repair/RepairMaintenanceController.d.ts.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceController.js +0 -13
- package/dist/application/maintenance/repair/RepairMaintenanceController.js.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceRequest.d.ts +0 -6
- package/dist/application/maintenance/repair/RepairMaintenanceRequest.d.ts.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceRequest.js +0 -3
- package/dist/application/maintenance/repair/RepairMaintenanceRequest.js.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceResponse.d.ts +0 -9
- package/dist/application/maintenance/repair/RepairMaintenanceResponse.d.ts.map +0 -1
- package/dist/application/maintenance/repair/RepairMaintenanceResponse.js +0 -3
- package/dist/application/maintenance/repair/RepairMaintenanceResponse.js.map +0 -1
- package/dist/application/repair/IRepairGateway.d.ts +0 -6
- package/dist/application/repair/IRepairGateway.d.ts.map +0 -1
- package/dist/application/repair/IRepairGateway.js +0 -3
- package/dist/application/repair/IRepairGateway.js.map +0 -1
- package/dist/application/repair/LocalRepairGateway.d.ts +0 -16
- package/dist/application/repair/LocalRepairGateway.d.ts.map +0 -1
- package/dist/application/repair/LocalRepairGateway.js +0 -90
- package/dist/application/repair/LocalRepairGateway.js.map +0 -1
- package/dist/application/repair/RepairController.d.ts +0 -9
- package/dist/application/repair/RepairController.d.ts.map +0 -1
- package/dist/application/repair/RepairController.js +0 -13
- package/dist/application/repair/RepairController.js.map +0 -1
- package/dist/application/repair/RepairRequest.d.ts +0 -6
- package/dist/application/repair/RepairRequest.d.ts.map +0 -1
- package/dist/application/repair/RepairRequest.js +0 -3
- package/dist/application/repair/RepairRequest.js.map +0 -1
- package/dist/application/repair/RepairResponse.d.ts +0 -9
- package/dist/application/repair/RepairResponse.d.ts.map +0 -1
- package/dist/application/repair/RepairResponse.js +0 -3
- package/dist/application/repair/RepairResponse.js.map +0 -1
- package/dist/domain/project/AgentInstructions.d.ts +0 -67
- package/dist/domain/project/AgentInstructions.d.ts.map +0 -1
- package/dist/domain/project/AgentInstructions.js +0 -261
- package/dist/domain/project/AgentInstructions.js.map +0 -1
- package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.d.ts +0 -33
- package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.d.ts.map +0 -1
- package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.js +0 -66
- package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.js.map +0 -1
- package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.d.ts +0 -10
- package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.d.ts.map +0 -1
- package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.js +0 -36
- package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.js.map +0 -1
- package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.d.ts +0 -10
- package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.d.ts.map +0 -1
- package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.js +0 -14
- package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.js.map +0 -1
- package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.d.ts +0 -10
- package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.d.ts.map +0 -1
- package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.js +0 -18
- package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.js.map +0 -1
- package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.d.ts +0 -10
- package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.d.ts.map +0 -1
- package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.js +0 -14
- package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.js.map +0 -1
- package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.d.ts +0 -29
- package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.d.ts.map +0 -1
- package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.js +0 -105
- package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.js.map +0 -1
- package/dist/presentation/cli/commands/goals/complete/goal.complete.d.ts +0 -20
- package/dist/presentation/cli/commands/goals/complete/goal.complete.d.ts.map +0 -1
- package/dist/presentation/cli/commands/goals/complete/goal.complete.js +0 -58
- package/dist/presentation/cli/commands/goals/complete/goal.complete.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.d.ts +0 -26
- package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.js +0 -68
- package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.d.ts +0 -14
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.js +0 -61
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.d.ts +0 -23
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.js +0 -59
- package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.d.ts +0 -24
- package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.js +0 -49
- package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.d.ts +0 -27
- package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.js +0 -85
- package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.d.ts +0 -16
- package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.js +0 -40
- package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.js.map +0 -1
- package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.d.ts +0 -26
- package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.d.ts.map +0 -1
- package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.js +0 -64
- package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.js.map +0 -1
- package/dist/presentation/cli/commands/repair/RepairOutputBuilder.d.ts +0 -24
- package/dist/presentation/cli/commands/repair/RepairOutputBuilder.d.ts.map +0 -1
- package/dist/presentation/cli/commands/repair/RepairOutputBuilder.js +0 -50
- package/dist/presentation/cli/commands/repair/RepairOutputBuilder.js.map +0 -1
- package/dist/presentation/cli/commands/repair/repair.d.ts +0 -31
- package/dist/presentation/cli/commands/repair/repair.d.ts.map +0 -1
- package/dist/presentation/cli/commands/repair/repair.js +0 -88
- package/dist/presentation/cli/commands/repair/repair.js.map +0 -1
package/dist/infrastructure/context/audience-pains/migrations/001-create-audience-pain-views.sql
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
-- Audience pain views table for materialized projections
|
|
2
|
-
-- Namespace: project-knowledge/audience-pains
|
|
3
|
-
|
|
4
|
-
CREATE TABLE IF NOT EXISTS audience_pain_views (
|
|
5
|
-
painId TEXT PRIMARY KEY,
|
|
6
|
-
title TEXT NOT NULL,
|
|
7
|
-
description TEXT NOT NULL,
|
|
8
|
-
status TEXT NOT NULL DEFAULT 'active',
|
|
9
|
-
resolvedAt TEXT,
|
|
10
|
-
version INTEGER NOT NULL,
|
|
11
|
-
createdAt TEXT NOT NULL,
|
|
12
|
-
updatedAt TEXT NOT NULL
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
-- Indexes for common queries
|
|
16
|
-
CREATE INDEX IF NOT EXISTS idx_audience_pain_status ON audience_pain_views(status);
|
|
17
|
-
CREATE INDEX IF NOT EXISTS idx_audience_pain_created ON audience_pain_views(createdAt);
|
|
1
|
+
-- Audience pain views table for materialized projections
|
|
2
|
+
-- Namespace: project-knowledge/audience-pains
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS audience_pain_views (
|
|
5
|
+
painId TEXT PRIMARY KEY,
|
|
6
|
+
title TEXT NOT NULL,
|
|
7
|
+
description TEXT NOT NULL,
|
|
8
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
9
|
+
resolvedAt TEXT,
|
|
10
|
+
version INTEGER NOT NULL,
|
|
11
|
+
createdAt TEXT NOT NULL,
|
|
12
|
+
updatedAt TEXT NOT NULL
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
-- Indexes for common queries
|
|
16
|
+
CREATE INDEX IF NOT EXISTS idx_audience_pain_status ON audience_pain_views(status);
|
|
17
|
+
CREATE INDEX IF NOT EXISTS idx_audience_pain_created ON audience_pain_views(createdAt);
|
package/dist/infrastructure/context/audience-pains/update/SqliteAudiencePainUpdatedProjector.js
CHANGED
|
@@ -27,10 +27,10 @@ class SqliteAudiencePainUpdatedProjector {
|
|
|
27
27
|
updates.push("version = ?");
|
|
28
28
|
updates.push("updatedAt = ?");
|
|
29
29
|
values.push(event.version, event.timestamp, event.aggregateId);
|
|
30
|
-
const stmt = this.db.prepare(`
|
|
31
|
-
UPDATE audience_pain_views
|
|
32
|
-
SET ${updates.join(", ")}
|
|
33
|
-
WHERE painId = ?
|
|
30
|
+
const stmt = this.db.prepare(`
|
|
31
|
+
UPDATE audience_pain_views
|
|
32
|
+
SET ${updates.join(", ")}
|
|
33
|
+
WHERE painId = ?
|
|
34
34
|
`);
|
|
35
35
|
stmt.run(...values);
|
|
36
36
|
}
|
|
@@ -12,11 +12,11 @@ class SqliteAudienceAddedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyAudienceAdded(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
INSERT OR REPLACE INTO audience_views (
|
|
17
|
-
audienceId, name, description, priority, isRemoved,
|
|
18
|
-
version, createdAt, updatedAt
|
|
19
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
INSERT OR REPLACE INTO audience_views (
|
|
17
|
+
audienceId, name, description, priority, isRemoved,
|
|
18
|
+
version, createdAt, updatedAt
|
|
19
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
20
20
|
`);
|
|
21
21
|
stmt.run(event.aggregateId, event.payload.name, event.payload.description, event.payload.priority, 0, // isRemoved = false
|
|
22
22
|
event.version, event.timestamp, event.timestamp);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
-- Audience views table for materialized projections
|
|
2
|
-
-- Namespace: project-knowledge/audiences
|
|
3
|
-
|
|
4
|
-
CREATE TABLE IF NOT EXISTS audience_views (
|
|
5
|
-
audienceId TEXT PRIMARY KEY,
|
|
6
|
-
name TEXT NOT NULL,
|
|
7
|
-
description TEXT NOT NULL,
|
|
8
|
-
priority TEXT,
|
|
9
|
-
isRemoved INTEGER NOT NULL DEFAULT 0,
|
|
10
|
-
version INTEGER NOT NULL,
|
|
11
|
-
createdAt TEXT NOT NULL,
|
|
12
|
-
updatedAt TEXT NOT NULL
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
-- Indexes for common queries
|
|
16
|
-
CREATE INDEX IF NOT EXISTS idx_audience_name ON audience_views(name);
|
|
17
|
-
CREATE INDEX IF NOT EXISTS idx_audience_removed ON audience_views(isRemoved);
|
|
1
|
+
-- Audience views table for materialized projections
|
|
2
|
+
-- Namespace: project-knowledge/audiences
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS audience_views (
|
|
5
|
+
audienceId TEXT PRIMARY KEY,
|
|
6
|
+
name TEXT NOT NULL,
|
|
7
|
+
description TEXT NOT NULL,
|
|
8
|
+
priority TEXT,
|
|
9
|
+
isRemoved INTEGER NOT NULL DEFAULT 0,
|
|
10
|
+
version INTEGER NOT NULL,
|
|
11
|
+
createdAt TEXT NOT NULL,
|
|
12
|
+
updatedAt TEXT NOT NULL
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
-- Indexes for common queries
|
|
16
|
+
CREATE INDEX IF NOT EXISTS idx_audience_name ON audience_views(name);
|
|
17
|
+
CREATE INDEX IF NOT EXISTS idx_audience_removed ON audience_views(isRemoved);
|
|
@@ -13,12 +13,12 @@ class SqliteAudienceRemovedProjector {
|
|
|
13
13
|
}
|
|
14
14
|
async applyAudienceRemoved(event) {
|
|
15
15
|
// Soft-delete: mark as removed instead of deleting
|
|
16
|
-
const stmt = this.db.prepare(`
|
|
17
|
-
UPDATE audience_views
|
|
18
|
-
SET isRemoved = 1,
|
|
19
|
-
version = ?,
|
|
20
|
-
updatedAt = ?
|
|
21
|
-
WHERE audienceId = ?
|
|
16
|
+
const stmt = this.db.prepare(`
|
|
17
|
+
UPDATE audience_views
|
|
18
|
+
SET isRemoved = 1,
|
|
19
|
+
version = ?,
|
|
20
|
+
updatedAt = ?
|
|
21
|
+
WHERE audienceId = ?
|
|
22
22
|
`);
|
|
23
23
|
stmt.run(event.version, event.timestamp, event.aggregateId);
|
|
24
24
|
}
|
|
@@ -32,10 +32,10 @@ class SqliteAudienceUpdatedProjector {
|
|
|
32
32
|
params.push(event.version, event.timestamp);
|
|
33
33
|
// WHERE clause
|
|
34
34
|
params.push(event.aggregateId);
|
|
35
|
-
const stmt = this.db.prepare(`
|
|
36
|
-
UPDATE audience_views
|
|
37
|
-
SET ${updates.join(", ")}
|
|
38
|
-
WHERE audienceId = ?
|
|
35
|
+
const stmt = this.db.prepare(`
|
|
36
|
+
UPDATE audience_views
|
|
37
|
+
SET ${updates.join(", ")}
|
|
38
|
+
WHERE audienceId = ?
|
|
39
39
|
`);
|
|
40
40
|
stmt.run(...params);
|
|
41
41
|
}
|
|
@@ -12,11 +12,11 @@ class SqliteComponentAddedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyComponentAdded(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
INSERT OR REPLACE INTO component_views (
|
|
17
|
-
componentId, name, type, description, responsibility,
|
|
18
|
-
path, status, deprecationReason, version, createdAt, updatedAt
|
|
19
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
INSERT OR REPLACE INTO component_views (
|
|
17
|
+
componentId, name, type, description, responsibility,
|
|
18
|
+
path, status, deprecationReason, version, createdAt, updatedAt
|
|
19
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
20
20
|
`);
|
|
21
21
|
stmt.run(event.aggregateId, event.payload.name, event.payload.type, event.payload.description, event.payload.responsibility, event.payload.path, event.payload.status, null, event.version, event.timestamp, event.timestamp);
|
|
22
22
|
}
|
package/dist/infrastructure/context/components/deprecate/SqliteComponentDeprecatedProjector.js
CHANGED
|
@@ -12,13 +12,13 @@ class SqliteComponentDeprecatedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyComponentDeprecated(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
UPDATE component_views
|
|
17
|
-
SET status = ?,
|
|
18
|
-
deprecationReason = ?,
|
|
19
|
-
updatedAt = ?,
|
|
20
|
-
version = ?
|
|
21
|
-
WHERE componentId = ?
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
UPDATE component_views
|
|
17
|
+
SET status = ?,
|
|
18
|
+
deprecationReason = ?,
|
|
19
|
+
updatedAt = ?,
|
|
20
|
+
version = ?
|
|
21
|
+
WHERE componentId = ?
|
|
22
22
|
`);
|
|
23
23
|
stmt.run(event.payload.status, event.payload.reason, event.timestamp, event.version, event.aggregateId);
|
|
24
24
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
-- Component views table for materialized projections
|
|
2
|
-
-- Namespace: solution/components
|
|
3
|
-
|
|
4
|
-
CREATE TABLE IF NOT EXISTS component_views (
|
|
5
|
-
componentId TEXT PRIMARY KEY,
|
|
6
|
-
name TEXT NOT NULL,
|
|
7
|
-
type TEXT NOT NULL,
|
|
8
|
-
description TEXT NOT NULL,
|
|
9
|
-
responsibility TEXT NOT NULL,
|
|
10
|
-
path TEXT NOT NULL,
|
|
11
|
-
status TEXT NOT NULL,
|
|
12
|
-
deprecationReason TEXT,
|
|
13
|
-
version INTEGER NOT NULL,
|
|
14
|
-
createdAt TEXT NOT NULL,
|
|
15
|
-
updatedAt TEXT NOT NULL
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
-- Indexes for common queries
|
|
19
|
-
CREATE INDEX IF NOT EXISTS idx_component_name ON component_views(name);
|
|
20
|
-
CREATE INDEX IF NOT EXISTS idx_component_type ON component_views(type);
|
|
21
|
-
CREATE INDEX IF NOT EXISTS idx_component_status ON component_views(status);
|
|
1
|
+
-- Component views table for materialized projections
|
|
2
|
+
-- Namespace: solution/components
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS component_views (
|
|
5
|
+
componentId TEXT PRIMARY KEY,
|
|
6
|
+
name TEXT NOT NULL,
|
|
7
|
+
type TEXT NOT NULL,
|
|
8
|
+
description TEXT NOT NULL,
|
|
9
|
+
responsibility TEXT NOT NULL,
|
|
10
|
+
path TEXT NOT NULL,
|
|
11
|
+
status TEXT NOT NULL,
|
|
12
|
+
deprecationReason TEXT,
|
|
13
|
+
version INTEGER NOT NULL,
|
|
14
|
+
createdAt TEXT NOT NULL,
|
|
15
|
+
updatedAt TEXT NOT NULL
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
-- Indexes for common queries
|
|
19
|
+
CREATE INDEX IF NOT EXISTS idx_component_name ON component_views(name);
|
|
20
|
+
CREATE INDEX IF NOT EXISTS idx_component_type ON component_views(type);
|
|
21
|
+
CREATE INDEX IF NOT EXISTS idx_component_status ON component_views(status);
|
|
@@ -12,12 +12,12 @@ class SqliteComponentRemovedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyComponentRemoved(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
UPDATE component_views
|
|
17
|
-
SET status = ?,
|
|
18
|
-
updatedAt = ?,
|
|
19
|
-
version = ?
|
|
20
|
-
WHERE componentId = ?
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
UPDATE component_views
|
|
17
|
+
SET status = ?,
|
|
18
|
+
updatedAt = ?,
|
|
19
|
+
version = ?
|
|
20
|
+
WHERE componentId = ?
|
|
21
21
|
`);
|
|
22
22
|
stmt.run(event.payload.status, event.timestamp, event.version, event.aggregateId);
|
|
23
23
|
}
|
|
@@ -12,10 +12,10 @@ class SqliteComponentRenamedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyComponentRenamed(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
UPDATE component_views
|
|
17
|
-
SET name = ?, version = ?, updatedAt = ?
|
|
18
|
-
WHERE componentId = ?
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
UPDATE component_views
|
|
17
|
+
SET name = ?, version = ?, updatedAt = ?
|
|
18
|
+
WHERE componentId = ?
|
|
19
19
|
`);
|
|
20
20
|
stmt.run(event.payload.name, event.version, event.timestamp, event.aggregateId);
|
|
21
21
|
}
|
package/dist/infrastructure/context/components/undeprecate/SqliteComponentUndeprecatedProjector.js
CHANGED
|
@@ -6,13 +6,13 @@ class SqliteComponentUndeprecatedProjector {
|
|
|
6
6
|
this.db = db;
|
|
7
7
|
}
|
|
8
8
|
async applyComponentUndeprecated(event) {
|
|
9
|
-
const stmt = this.db.prepare(`
|
|
10
|
-
UPDATE component_views
|
|
11
|
-
SET status = 'active',
|
|
12
|
-
deprecationReason = NULL,
|
|
13
|
-
updatedAt = ?,
|
|
14
|
-
version = ?
|
|
15
|
-
WHERE componentId = ?
|
|
9
|
+
const stmt = this.db.prepare(`
|
|
10
|
+
UPDATE component_views
|
|
11
|
+
SET status = 'active',
|
|
12
|
+
deprecationReason = NULL,
|
|
13
|
+
updatedAt = ?,
|
|
14
|
+
version = ?
|
|
15
|
+
WHERE componentId = ?
|
|
16
16
|
`);
|
|
17
17
|
stmt.run(event.timestamp, event.version, event.aggregateId);
|
|
18
18
|
}
|
|
@@ -35,10 +35,10 @@ class SqliteComponentUpdatedProjector {
|
|
|
35
35
|
updates.push('updatedAt = ?');
|
|
36
36
|
params.push(event.timestamp);
|
|
37
37
|
params.push(event.aggregateId);
|
|
38
|
-
const stmt = this.db.prepare(`
|
|
39
|
-
UPDATE component_views
|
|
40
|
-
SET ${updates.join(', ')}
|
|
41
|
-
WHERE componentId = ?
|
|
38
|
+
const stmt = this.db.prepare(`
|
|
39
|
+
UPDATE component_views
|
|
40
|
+
SET ${updates.join(', ')}
|
|
41
|
+
WHERE componentId = ?
|
|
42
42
|
`);
|
|
43
43
|
stmt.run(...params);
|
|
44
44
|
}
|
|
@@ -12,12 +12,12 @@ class SqliteDecisionAddedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyDecisionAdded(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
INSERT OR REPLACE INTO decision_views (
|
|
17
|
-
decisionId, title, context, rationale, alternatives,
|
|
18
|
-
consequences, status, supersededBy, reversalReason, reversedAt,
|
|
19
|
-
version, createdAt, updatedAt
|
|
20
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
INSERT OR REPLACE INTO decision_views (
|
|
17
|
+
decisionId, title, context, rationale, alternatives,
|
|
18
|
+
consequences, status, supersededBy, reversalReason, reversedAt,
|
|
19
|
+
version, createdAt, updatedAt
|
|
20
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
21
21
|
`);
|
|
22
22
|
stmt.run(event.aggregateId, event.payload.title, event.payload.context, event.payload.rationale, JSON.stringify(event.payload.alternatives), event.payload.consequences, 'active', null, null, null, event.version, event.timestamp, event.timestamp);
|
|
23
23
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
-- Decision views table for materialized projections
|
|
2
|
-
-- Namespace: solution/decisions
|
|
3
|
-
|
|
4
|
-
CREATE TABLE IF NOT EXISTS decision_views (
|
|
5
|
-
decisionId TEXT PRIMARY KEY,
|
|
6
|
-
title TEXT NOT NULL,
|
|
7
|
-
context TEXT NOT NULL,
|
|
8
|
-
rationale TEXT,
|
|
9
|
-
alternatives TEXT, -- JSON array
|
|
10
|
-
consequences TEXT,
|
|
11
|
-
status TEXT NOT NULL, -- 'active', 'reversed', 'superseded'
|
|
12
|
-
supersededBy TEXT, -- FK to another decision
|
|
13
|
-
reversalReason TEXT,
|
|
14
|
-
reversedAt TEXT, -- Timestamp when decision was reversed
|
|
15
|
-
version INTEGER NOT NULL,
|
|
16
|
-
createdAt TEXT NOT NULL,
|
|
17
|
-
updatedAt TEXT NOT NULL
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
-- Indexes for common queries
|
|
21
|
-
CREATE INDEX IF NOT EXISTS idx_decision_status ON decision_views(status);
|
|
22
|
-
CREATE INDEX IF NOT EXISTS idx_decision_created ON decision_views(createdAt DESC);
|
|
1
|
+
-- Decision views table for materialized projections
|
|
2
|
+
-- Namespace: solution/decisions
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS decision_views (
|
|
5
|
+
decisionId TEXT PRIMARY KEY,
|
|
6
|
+
title TEXT NOT NULL,
|
|
7
|
+
context TEXT NOT NULL,
|
|
8
|
+
rationale TEXT,
|
|
9
|
+
alternatives TEXT, -- JSON array
|
|
10
|
+
consequences TEXT,
|
|
11
|
+
status TEXT NOT NULL, -- 'active', 'reversed', 'superseded'
|
|
12
|
+
supersededBy TEXT, -- FK to another decision
|
|
13
|
+
reversalReason TEXT,
|
|
14
|
+
reversedAt TEXT, -- Timestamp when decision was reversed
|
|
15
|
+
version INTEGER NOT NULL,
|
|
16
|
+
createdAt TEXT NOT NULL,
|
|
17
|
+
updatedAt TEXT NOT NULL
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
-- Indexes for common queries
|
|
21
|
+
CREATE INDEX IF NOT EXISTS idx_decision_status ON decision_views(status);
|
|
22
|
+
CREATE INDEX IF NOT EXISTS idx_decision_created ON decision_views(createdAt DESC);
|
|
@@ -6,15 +6,15 @@ class SqliteDecisionRestoredProjector {
|
|
|
6
6
|
this.db = db;
|
|
7
7
|
}
|
|
8
8
|
async applyDecisionRestored(event) {
|
|
9
|
-
const stmt = this.db.prepare(`
|
|
10
|
-
UPDATE decision_views
|
|
11
|
-
SET status = 'active',
|
|
12
|
-
supersededBy = NULL,
|
|
13
|
-
reversalReason = NULL,
|
|
14
|
-
reversedAt = NULL,
|
|
15
|
-
version = ?,
|
|
16
|
-
updatedAt = ?
|
|
17
|
-
WHERE decisionId = ?
|
|
9
|
+
const stmt = this.db.prepare(`
|
|
10
|
+
UPDATE decision_views
|
|
11
|
+
SET status = 'active',
|
|
12
|
+
supersededBy = NULL,
|
|
13
|
+
reversalReason = NULL,
|
|
14
|
+
reversedAt = NULL,
|
|
15
|
+
version = ?,
|
|
16
|
+
updatedAt = ?
|
|
17
|
+
WHERE decisionId = ?
|
|
18
18
|
`);
|
|
19
19
|
stmt.run(event.version, event.timestamp, event.aggregateId);
|
|
20
20
|
}
|
|
@@ -12,14 +12,14 @@ class SqliteDecisionReversedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyDecisionReversed(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
UPDATE decision_views
|
|
17
|
-
SET status = 'reversed',
|
|
18
|
-
reversalReason = ?,
|
|
19
|
-
reversedAt = ?,
|
|
20
|
-
version = ?,
|
|
21
|
-
updatedAt = ?
|
|
22
|
-
WHERE decisionId = ?
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
UPDATE decision_views
|
|
17
|
+
SET status = 'reversed',
|
|
18
|
+
reversalReason = ?,
|
|
19
|
+
reversedAt = ?,
|
|
20
|
+
version = ?,
|
|
21
|
+
updatedAt = ?
|
|
22
|
+
WHERE decisionId = ?
|
|
23
23
|
`);
|
|
24
24
|
stmt.run(event.payload.reason, event.payload.reversedAt, event.version, event.timestamp, event.aggregateId);
|
|
25
25
|
}
|
package/dist/infrastructure/context/decisions/supersede/SqliteDecisionSupersededProjector.js
CHANGED
|
@@ -12,13 +12,13 @@ class SqliteDecisionSupersededProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyDecisionSuperseded(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
UPDATE decision_views
|
|
17
|
-
SET status = 'superseded',
|
|
18
|
-
supersededBy = ?,
|
|
19
|
-
version = ?,
|
|
20
|
-
updatedAt = ?
|
|
21
|
-
WHERE decisionId = ?
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
UPDATE decision_views
|
|
17
|
+
SET status = 'superseded',
|
|
18
|
+
supersededBy = ?,
|
|
19
|
+
version = ?,
|
|
20
|
+
updatedAt = ?
|
|
21
|
+
WHERE decisionId = ?
|
|
22
22
|
`);
|
|
23
23
|
stmt.run(event.payload.supersededBy, event.version, event.timestamp, event.aggregateId);
|
|
24
24
|
}
|
|
@@ -13,16 +13,16 @@ class SqliteDecisionUpdatedProjector {
|
|
|
13
13
|
}
|
|
14
14
|
async applyDecisionUpdated(event) {
|
|
15
15
|
const current = this.db.prepare('SELECT * FROM decision_views WHERE decisionId = ?').get(event.aggregateId);
|
|
16
|
-
const stmt = this.db.prepare(`
|
|
17
|
-
UPDATE decision_views
|
|
18
|
-
SET title = ?,
|
|
19
|
-
context = ?,
|
|
20
|
-
rationale = ?,
|
|
21
|
-
alternatives = ?,
|
|
22
|
-
consequences = ?,
|
|
23
|
-
version = ?,
|
|
24
|
-
updatedAt = ?
|
|
25
|
-
WHERE decisionId = ?
|
|
16
|
+
const stmt = this.db.prepare(`
|
|
17
|
+
UPDATE decision_views
|
|
18
|
+
SET title = ?,
|
|
19
|
+
context = ?,
|
|
20
|
+
rationale = ?,
|
|
21
|
+
alternatives = ?,
|
|
22
|
+
consequences = ?,
|
|
23
|
+
version = ?,
|
|
24
|
+
updatedAt = ?
|
|
25
|
+
WHERE decisionId = ?
|
|
26
26
|
`);
|
|
27
27
|
stmt.run(event.payload.title ?? current.title, event.payload.context ?? current.context, event.payload.rationale !== undefined ? event.payload.rationale : current.rationale, event.payload.alternatives ? JSON.stringify(event.payload.alternatives) : current.alternatives, event.payload.consequences !== undefined ? event.payload.consequences : current.consequences, event.version, event.timestamp, event.aggregateId);
|
|
28
28
|
}
|
|
@@ -16,11 +16,11 @@ class SqliteDependencyAddedProjector {
|
|
|
16
16
|
async applyDependencyAdded(event) {
|
|
17
17
|
const externalPayload = this.upcastPayload(event.payload);
|
|
18
18
|
const legacyPayload = this.asLegacyPayload(event.payload);
|
|
19
|
-
const stmt = this.db.prepare(`
|
|
20
|
-
INSERT OR REPLACE INTO dependency_views (
|
|
21
|
-
dependencyId, consumerId, providerId, name, ecosystem, packageName, versionConstraint, endpoint, contract,
|
|
22
|
-
status, version, createdAt, updatedAt
|
|
23
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
19
|
+
const stmt = this.db.prepare(`
|
|
20
|
+
INSERT OR REPLACE INTO dependency_views (
|
|
21
|
+
dependencyId, consumerId, providerId, name, ecosystem, packageName, versionConstraint, endpoint, contract,
|
|
22
|
+
status, version, createdAt, updatedAt
|
|
23
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
24
24
|
`);
|
|
25
25
|
stmt.run(event.aggregateId, legacyPayload?.consumerId ?? "", legacyPayload?.providerId ?? "", externalPayload.name, externalPayload.ecosystem, externalPayload.packageName, externalPayload.versionConstraint, externalPayload.endpoint, externalPayload.contract, 'active', event.version, event.timestamp, event.timestamp);
|
|
26
26
|
}
|
|
@@ -11,11 +11,11 @@ class SqliteLegacyDependencyReader {
|
|
|
11
11
|
this.db = db;
|
|
12
12
|
}
|
|
13
13
|
async findLegacyCouplings() {
|
|
14
|
-
const query = `
|
|
15
|
-
SELECT dependencyId, consumerId, providerId, endpoint, contract, status
|
|
16
|
-
FROM dependency_views
|
|
17
|
-
WHERE consumerId IS NOT NULL AND providerId IS NOT NULL
|
|
18
|
-
ORDER BY createdAt ASC
|
|
14
|
+
const query = `
|
|
15
|
+
SELECT dependencyId, consumerId, providerId, endpoint, contract, status
|
|
16
|
+
FROM dependency_views
|
|
17
|
+
WHERE consumerId IS NOT NULL AND providerId IS NOT NULL
|
|
18
|
+
ORDER BY createdAt ASC
|
|
19
19
|
`;
|
|
20
20
|
const rows = this.db.prepare(query).all();
|
|
21
21
|
return rows.map((row) => ({
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
-- Dependency views table for materialized projections
|
|
2
|
-
-- Namespace: solution/dependencies
|
|
3
|
-
|
|
4
|
-
CREATE TABLE IF NOT EXISTS dependency_views (
|
|
5
|
-
dependencyId TEXT PRIMARY KEY,
|
|
6
|
-
consumerId TEXT NOT NULL,
|
|
7
|
-
providerId TEXT NOT NULL,
|
|
8
|
-
endpoint TEXT,
|
|
9
|
-
contract TEXT,
|
|
10
|
-
status TEXT NOT NULL DEFAULT 'active',
|
|
11
|
-
removedAt TEXT,
|
|
12
|
-
removalReason TEXT,
|
|
13
|
-
version INTEGER NOT NULL,
|
|
14
|
-
createdAt TEXT NOT NULL,
|
|
15
|
-
updatedAt TEXT NOT NULL
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
-- Indexes for common queries
|
|
19
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_consumer ON dependency_views(consumerId);
|
|
20
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_provider ON dependency_views(providerId);
|
|
21
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_status ON dependency_views(status);
|
|
1
|
+
-- Dependency views table for materialized projections
|
|
2
|
+
-- Namespace: solution/dependencies
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS dependency_views (
|
|
5
|
+
dependencyId TEXT PRIMARY KEY,
|
|
6
|
+
consumerId TEXT NOT NULL,
|
|
7
|
+
providerId TEXT NOT NULL,
|
|
8
|
+
endpoint TEXT,
|
|
9
|
+
contract TEXT,
|
|
10
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
11
|
+
removedAt TEXT,
|
|
12
|
+
removalReason TEXT,
|
|
13
|
+
version INTEGER NOT NULL,
|
|
14
|
+
createdAt TEXT NOT NULL,
|
|
15
|
+
updatedAt TEXT NOT NULL
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
-- Indexes for common queries
|
|
19
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_consumer ON dependency_views(consumerId);
|
|
20
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_provider ON dependency_views(providerId);
|
|
21
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_status ON dependency_views(status);
|
package/dist/infrastructure/context/dependencies/migrations/002-add-external-dependency-columns.sql
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
-- Add external dependency identity columns while preserving legacy consumer/provider columns
|
|
2
|
-
-- Namespace: solution/dependencies
|
|
3
|
-
|
|
4
|
-
ALTER TABLE dependency_views ADD COLUMN name TEXT;
|
|
5
|
-
ALTER TABLE dependency_views ADD COLUMN ecosystem TEXT;
|
|
6
|
-
ALTER TABLE dependency_views ADD COLUMN packageName TEXT;
|
|
7
|
-
ALTER TABLE dependency_views ADD COLUMN versionConstraint TEXT;
|
|
8
|
-
|
|
9
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_name ON dependency_views(name);
|
|
10
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_ecosystem ON dependency_views(ecosystem);
|
|
11
|
-
CREATE INDEX IF NOT EXISTS idx_dependency_package_name ON dependency_views(packageName);
|
|
1
|
+
-- Add external dependency identity columns while preserving legacy consumer/provider columns
|
|
2
|
+
-- Namespace: solution/dependencies
|
|
3
|
+
|
|
4
|
+
ALTER TABLE dependency_views ADD COLUMN name TEXT;
|
|
5
|
+
ALTER TABLE dependency_views ADD COLUMN ecosystem TEXT;
|
|
6
|
+
ALTER TABLE dependency_views ADD COLUMN packageName TEXT;
|
|
7
|
+
ALTER TABLE dependency_views ADD COLUMN versionConstraint TEXT;
|
|
8
|
+
|
|
9
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_name ON dependency_views(name);
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_ecosystem ON dependency_views(ecosystem);
|
|
11
|
+
CREATE INDEX IF NOT EXISTS idx_dependency_package_name ON dependency_views(packageName);
|
|
@@ -14,14 +14,14 @@ class SqliteDependencyRemovedProjector {
|
|
|
14
14
|
this.mapper = new DependencyRecordMapper_js_1.DependencyRecordMapper();
|
|
15
15
|
}
|
|
16
16
|
async applyDependencyRemoved(event) {
|
|
17
|
-
const stmt = this.db.prepare(`
|
|
18
|
-
UPDATE dependency_views
|
|
19
|
-
SET status = 'removed',
|
|
20
|
-
removedAt = ?,
|
|
21
|
-
removalReason = ?,
|
|
22
|
-
updatedAt = ?,
|
|
23
|
-
version = ?
|
|
24
|
-
WHERE dependencyId = ?
|
|
17
|
+
const stmt = this.db.prepare(`
|
|
18
|
+
UPDATE dependency_views
|
|
19
|
+
SET status = 'removed',
|
|
20
|
+
removedAt = ?,
|
|
21
|
+
removalReason = ?,
|
|
22
|
+
updatedAt = ?,
|
|
23
|
+
version = ?
|
|
24
|
+
WHERE dependencyId = ?
|
|
25
25
|
`);
|
|
26
26
|
stmt.run(event.timestamp, event.payload.reason, event.timestamp, event.version, event.aggregateId);
|
|
27
27
|
}
|
|
@@ -33,10 +33,10 @@ class SqliteDependencyUpdatedProjector {
|
|
|
33
33
|
updates.push('updatedAt = ?');
|
|
34
34
|
params.push(event.timestamp);
|
|
35
35
|
params.push(event.aggregateId);
|
|
36
|
-
const stmt = this.db.prepare(`
|
|
37
|
-
UPDATE dependency_views
|
|
38
|
-
SET ${updates.join(', ')}
|
|
39
|
-
WHERE dependencyId = ?
|
|
36
|
+
const stmt = this.db.prepare(`
|
|
37
|
+
UPDATE dependency_views
|
|
38
|
+
SET ${updates.join(', ')}
|
|
39
|
+
WHERE dependencyId = ?
|
|
40
40
|
`);
|
|
41
41
|
stmt.run(...params);
|
|
42
42
|
}
|
|
@@ -12,13 +12,13 @@ class SqliteGoalAddedProjector {
|
|
|
12
12
|
this.db = db;
|
|
13
13
|
}
|
|
14
14
|
async applyGoalAdded(event) {
|
|
15
|
-
const stmt = this.db.prepare(`
|
|
16
|
-
INSERT OR REPLACE INTO goal_views (
|
|
17
|
-
goalId, title, objective, successCriteria, scopeIn, scopeOut,
|
|
18
|
-
status, version, createdAt, updatedAt,
|
|
19
|
-
claimedBy, claimedAt, claimExpiresAt,
|
|
20
|
-
nextGoalId, progress, prerequisiteGoals
|
|
21
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
15
|
+
const stmt = this.db.prepare(`
|
|
16
|
+
INSERT OR REPLACE INTO goal_views (
|
|
17
|
+
goalId, title, objective, successCriteria, scopeIn, scopeOut,
|
|
18
|
+
status, version, createdAt, updatedAt,
|
|
19
|
+
claimedBy, claimedAt, claimExpiresAt,
|
|
20
|
+
nextGoalId, progress, prerequisiteGoals
|
|
21
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
22
22
|
`);
|
|
23
23
|
stmt.run(event.aggregateId, event.payload.title, event.payload.objective, JSON.stringify(event.payload.successCriteria), JSON.stringify(event.payload.scopeIn), JSON.stringify(event.payload.scopeOut), event.payload.status, event.version, event.timestamp, event.timestamp, null, // claimedBy - goals are not claimed when added
|
|
24
24
|
null, // claimedAt
|