From 3cae26dcb32f1891342520280cc4163589d34a0b Mon Sep 17 00:00:00 2001
From: Michael L Haufe
Date: Sun, 23 Jun 2024 22:15:56 +0000
Subject: [PATCH] - Migrated data layer from localStorage to PGLite -
Implemented data migrations - refactored Use Case classes to Interactor
Classes - Swapped inheritence model of Actor <-> Component - Added database
debuggin page
---
.devcontainer/devcontainer.json | 13 +-
app.config.ts | 1 -
app.vue | 6 +
application/ComponentInteractor.ts | 4 +
application/Interactor.ts | 21 +-
application/Mapper.ts | 3 -
application/Repository.ts | 56 +-
application/SlugRepository.ts | 6 -
application/UserStoryInteractor.ts | 4 +
data/ComponentRepository.ts | 6 +
data/Migration.ts | 14 +
data/MigrationManager.ts | 79 +
data/PGLiteRepository.ts | 84 +-
data/StorageRepository.ts | 82 -
data/UserStoryRepository.ts | 8 +
data/migrations/00001-InitDatabase.ts | 211 +++
domain/Actor.ts | 4 +-
domain/Component.ts | 14 +-
domain/Requirement.ts | 8 +-
{modules/system/domain => domain}/Scenario.ts | 2 +-
.../system/domain => domain}/UserStory.ts | 17 +-
index.d.ts | 3 -
mappers/EntityToJsonMapper.ts | 34 -
mappers/PEGSToJsonMapper.ts | 28 -
mappers/RequirementToJsonMapper.ts | 30 -
.../application/AssumptionInteractor.ts | 4 +
.../ConstraintCategoryInteractor.ts | 4 +
.../application/ConstraintInteractor.ts | 4 +
.../application/CreateAssumptionUseCase.ts | 35 -
.../application/CreateConstraintUseCase.ts | 36 -
.../application/CreateEffectUseCase.ts | 35 -
.../CreateEnvironmentComponentUseCase.ts | 35 -
.../application/CreateEnvironmentUseCase.ts | 24 -
.../application/CreateGlossaryTermUseCase.ts | 35 -
.../application/CreateInvariantUseCase.ts | 35 -
.../application/DeleteAssumptionUseCase.ts | 29 -
.../application/DeleteConstraintUseCase.ts | 29 -
.../application/DeleteEffectUseCase.ts | 29 -
.../DeleteEnvironmentComponentUseCase.ts | 29 -
.../application/DeleteGlossaryTermUseCase.ts | 29 -
.../application/DeleteInvariantUseCase.ts | 29 -
.../application/EffectInteractor.ts | 4 +
.../application/GetAssumptionsUseCase.ts | 16 -
.../application/GetConstraintsUseCase.ts | 16 -
.../application/GetEffectsUseCase.ts | 16 -
.../GetEnvironmentBySolutionIdUseCase.ts | 16 -
.../GetEnvironmentComponentsUseCase.ts | 16 -
.../application/GetGlossaryTermsUseCase.ts | 16 -
.../application/GetInvariantsUseCase.ts | 16 -
.../application/GlossaryTermInteractor.ts | 4 +
.../application/InvariantInteractor.ts | 4 +
.../application/UpdateAssumptionUseCase.ts | 22 -
.../application/UpdateConstraintUseCase.ts | 22 -
.../application/UpdateEffectUseCase.ts | 22 -
.../UpdateEnvironmentComponentUseCase.ts | 22 -
.../application/UpdateGlossaryTermUseCase.ts | 22 -
.../application/UpdateInvariantUseCase.ts | 22 -
.../environment/data/AssumptionRepository.ts | 18 +-
.../data/ConstraintCategoryRepository.ts | 6 +
.../environment/data/ConstraintRepository.ts | 18 +-
modules/environment/data/EffectRepository.ts | 18 +-
.../data/EnvironmentComponentRepository.ts | 16 -
.../environment/data/EnvironmentRepository.ts | 16 -
.../data/GlossaryTermRepository.ts | 18 +-
.../environment/data/InvariantRepository.ts | 18 +-
modules/environment/domain/Constraint.ts | 16 +-
.../environment/domain/ConstraintCategory.ts | 15 +
modules/environment/domain/Environment.ts | 25 -
.../domain/EnvironmentComponent.ts | 3 -
.../mappers/AssumptionToJsonMapper.ts | 14 -
.../mappers/ConstraintToJsonMapper.ts | 19 -
.../environment/mappers/EffectToJsonMapper.ts | 14 -
.../EnvironmentComponentToJsonMapper.ts | 14 -
.../mappers/EnvironmentToJsonMapper.ts | 39 -
.../mappers/GlossaryTermToJsonMapper.ts | 16 -
.../mappers/InvariantToJsonMapper.ts | 14 -
modules/environment/ui/pages/Assumptions.vue | 59 +-
modules/environment/ui/pages/Components.vue | 62 +-
modules/environment/ui/pages/Constraints.vue | 80 +-
modules/environment/ui/pages/Effects.vue | 57 +-
modules/environment/ui/pages/Glossary.vue | 58 +-
modules/environment/ui/pages/Index.vue | 37 +-
modules/environment/ui/pages/Invariants.vue | 57 +-
.../goals/application/CreateGoalsUseCase.ts | 23 -
.../goals/application/CreateLimitUseCase.ts | 38 -
.../goals/application/CreateMissionUseCase.ts | 33 -
.../application/CreateObstacleUseCase.ts | 38 -
.../goals/application/CreateOutcomeUseCase.ts | 38 -
.../application/CreateStakeholderUseCase.ts | 41 -
.../goals/application/DeleteLimitUseCase.ts | 25 -
.../application/DeleteObstacleUseCase.ts | 25 -
.../goals/application/DeleteOutcomeUseCase.ts | 25 -
.../application/DeleteStakeholderUseCase.ts | 25 -
modules/goals/application/EpicInteractor.ts | 47 -
.../GetGoalsBySolutionIdUseCase.ts | 16 -
modules/goals/application/GetGoalsUseCase.ts | 14 -
modules/goals/application/GetLimitsUseCase.ts | 14 -
.../goals/application/GetObstaclesUseCase.ts | 14 -
.../goals/application/GetOutcomesUseCase.ts | 14 -
.../goals/application/GetRationaleUseCase.ts | 35 -
.../application/GetStakeHolderByIdUseCase.ts | 14 -
.../application/GetStakeHoldersUseCase.ts | 14 -
modules/goals/application/GoalInteractor.ts | 4 +
modules/goals/application/LimitInteractor.ts | 4 +
.../goals/application/ObstacleInteractor.ts | 4 +
.../goals/application/OutcomeInteractor.ts | 4 +
.../StakeholderCategoryInteractor.ts | 4 +
.../application/StakeholderInteractor.ts | 4 +
.../StakeholderSegmentationInteractor.ts | 4 +
.../goals/application/UpdateLimitUseCase.ts | 22 -
.../application/UpdateObstacleUseCase.ts | 22 -
.../goals/application/UpdateOutcomeUseCase.ts | 24 -
.../application/UpdateRationaleUseCase.ts | 100 -
.../application/UpdateStakeHolderUseCase.ts | 23 -
modules/goals/data/EpicRepository.ts | 16 -
modules/goals/data/GoalRepository.ts | 18 +-
modules/goals/data/GoalsRepository.ts | 16 -
modules/goals/data/LimitRepository.ts | 19 +-
modules/goals/data/ObstacleRepository.ts | 18 +-
modules/goals/data/OutcomeRepository.ts | 18 +-
.../data/StakeholderCategoryRepository.ts | 6 +
modules/goals/data/StakeholderRepository.ts | 18 +-
.../data/StakeholderSegmentationRepository.ts | 6 +
modules/goals/domain/Epic.ts | 6 -
{domain => modules/goals/domain}/Limit.ts | 2 +-
modules/goals/domain/Stakeholder.ts | 40 +-
modules/goals/domain/StakeholderCategory.ts | 14 +
.../goals/domain/StakeholderSegmentation.ts | 14 +
modules/goals/index.ts | 6 +-
modules/goals/mappers/EpicToJsonMapper.ts | 16 -
modules/goals/mappers/GoalToJsonMapper.ts | 16 -
modules/goals/mappers/GoalsToJsonMapper.ts | 37 -
modules/goals/mappers/LimitToJsonMapper.ts | 15 -
modules/goals/mappers/ObstacleToJsonMapper.ts | 16 -
modules/goals/mappers/OutcomeToJsonMapper.ts | 17 -
.../goals/mappers/StakeholderToJsonMapper.ts | 28 -
modules/goals/ui/pages/Epics.vue | 147 --
modules/goals/ui/pages/Index.vue | 40 +-
modules/goals/ui/pages/Limitations.vue | 54 +-
modules/goals/ui/pages/Obstacles.vue | 55 +-
modules/goals/ui/pages/Outcomes.vue | 55 +-
modules/goals/ui/pages/Rationale.vue | 93 +-
modules/goals/ui/pages/Scenarios.vue | 161 ++
modules/goals/ui/pages/Stakeholders.vue | 152 +-
.../application/CreatePersonUseCase.ts | 26 -
.../application/CreateProjectUseCase.ts | 19 -
.../application/DeletePersonUseCase.ts | 14 -
.../application/GetPersonnelUseCase.ts | 14 -
.../GetProjectBySolutionIdUseCase.ts | 16 -
.../project/application/PersonInteractor.ts | 4 +
.../application/UpdatePersonUseCase.ts | 26 -
modules/project/data/PersonRepository.ts | 18 +-
modules/project/data/ProjectRepository.ts | 16 -
modules/project/domain/Person.ts | 5 +-
modules/project/domain/Project.ts | 7 -
modules/project/mappers/PersonToJsonMapper.ts | 31 -
.../project/mappers/ProjectToJsonMapper.ts | 23 -
modules/project/ui/pages/Index.vue | 38 +-
modules/project/ui/pages/RolesPersonnel.vue | 76 +-
.../application/CreateSolutionUseCase.ts | 26 -
.../application/DeleteSolutionUseCase.ts | 19 -
.../application/GetAllSolutionsUseCase.ts | 11 -
.../application/GetSolutionByIdUseCase.ts | 12 -
.../application/GetSolutionBySlugUseCase.ts | 11 -
.../application/SolutionInteractor.ts | 4 +
.../application/UpdateSolutionUseCase.ts | 20 -
modules/solution/data/SolutionRepository.ts | 41 +-
modules/solution/domain/Solution.ts | 20 +-
.../solution/mappers/SolutionToJsonMapper.ts | 33 -
.../ui/pages/solution/[solutionSlug].vue | 10 +-
.../solution/ui/pages/solution/edit-entry.vue | 19 +-
modules/solution/ui/pages/solution/index.vue | 18 +-
.../solution/ui/pages/solution/new-entry.vue | 19 +-
.../CreateSystemComponentUseCase.ts | 24 -
.../system/application/CreateSystemUseCase.ts | 19 -
.../DeleteSystemComponentUseCase.ts | 19 -
.../FunctionalBehaviorInteractor.ts | 4 +
.../FunctionalRequirementInteractor.ts | 45 -
.../GetSystemBySolutionIdUseCase.ts | 16 -
.../application/GetSystemComponentsUseCase.ts | 16 -
.../NonFunctionalBehaviorInteractor.ts | 4 +
.../NonFunctionalRequirementInteractor.ts | 45 -
.../UpdateSystemComponentUseCase.ts | 22 -
.../system/application/UseCaseInteractor.ts | 63 +-
.../system/application/UserStoryInteractor.ts | 47 -
.../data/FunctionalBehaviorRepository.ts | 8 +
.../data/FunctionalRequirementRepository.ts | 16 -
.../data/NonFunctionalBehaviorRepository.ts | 8 +
.../NonFunctionalRequirementRepository.ts | 16 -
.../system/data/SystemComponentRepository.ts | 16 -
modules/system/data/SystemRepository.ts | 16 -
modules/system/data/UseCaseRepository.ts | 18 +-
modules/system/data/UserStoryRepository.ts | 16 -
modules/system/domain/Behavior.ts | 11 +-
...alRequirement.ts => FunctionalBehavior.ts} | 2 +-
.../system/domain/NonFunctionalBehavior.ts | 3 +
.../system/domain/NonFunctionalRequirement.ts | 4 -
modules/system/domain/System.ts | 9 -
modules/system/domain/SystemComponent.ts | 13 -
modules/system/domain/UseCase.ts | 11 +-
.../FunctionalRequirementToJsonMapper.ts | 30 -
.../NonFunctionalRequirementToJsonMapper.ts | 30 -
.../system/mappers/ScenarioToJsonMapper.ts | 20 -
.../mappers/SystemComponentToJsonMapper.ts | 23 -
modules/system/mappers/SystemToJsonMapper.ts | 25 -
modules/system/mappers/UseCaseToJsonMapper.ts | 36 -
.../system/mappers/UserStoryToJsonMapper.ts | 22 -
modules/system/ui/pages/Components.vue | 72 +-
modules/system/ui/pages/Functionality.vue | 124 +-
modules/system/ui/pages/Index.vue | 34 +-
modules/system/ui/pages/Scenarios.vue | 179 +-
nuxt.config.ts | 2 +-
package-lock.json | 1643 +++++++++--------
package.json | 11 +-
pages/db-debug.vue | 83 +
pages/settings.vue | 8 +-
216 files changed, 2442 insertions(+), 4960 deletions(-)
create mode 100644 application/ComponentInteractor.ts
delete mode 100644 application/SlugRepository.ts
create mode 100644 application/UserStoryInteractor.ts
create mode 100644 data/ComponentRepository.ts
create mode 100644 data/Migration.ts
create mode 100644 data/MigrationManager.ts
delete mode 100644 data/StorageRepository.ts
create mode 100644 data/UserStoryRepository.ts
create mode 100644 data/migrations/00001-InitDatabase.ts
rename {modules/system/domain => domain}/Scenario.ts (88%)
rename {modules/system/domain => domain}/UserStory.ts (53%)
delete mode 100644 mappers/EntityToJsonMapper.ts
delete mode 100644 mappers/PEGSToJsonMapper.ts
delete mode 100644 mappers/RequirementToJsonMapper.ts
create mode 100644 modules/environment/application/AssumptionInteractor.ts
create mode 100644 modules/environment/application/ConstraintCategoryInteractor.ts
create mode 100644 modules/environment/application/ConstraintInteractor.ts
delete mode 100644 modules/environment/application/CreateAssumptionUseCase.ts
delete mode 100644 modules/environment/application/CreateConstraintUseCase.ts
delete mode 100644 modules/environment/application/CreateEffectUseCase.ts
delete mode 100644 modules/environment/application/CreateEnvironmentComponentUseCase.ts
delete mode 100644 modules/environment/application/CreateEnvironmentUseCase.ts
delete mode 100644 modules/environment/application/CreateGlossaryTermUseCase.ts
delete mode 100644 modules/environment/application/CreateInvariantUseCase.ts
delete mode 100644 modules/environment/application/DeleteAssumptionUseCase.ts
delete mode 100644 modules/environment/application/DeleteConstraintUseCase.ts
delete mode 100644 modules/environment/application/DeleteEffectUseCase.ts
delete mode 100644 modules/environment/application/DeleteEnvironmentComponentUseCase.ts
delete mode 100644 modules/environment/application/DeleteGlossaryTermUseCase.ts
delete mode 100644 modules/environment/application/DeleteInvariantUseCase.ts
create mode 100644 modules/environment/application/EffectInteractor.ts
delete mode 100644 modules/environment/application/GetAssumptionsUseCase.ts
delete mode 100644 modules/environment/application/GetConstraintsUseCase.ts
delete mode 100644 modules/environment/application/GetEffectsUseCase.ts
delete mode 100644 modules/environment/application/GetEnvironmentBySolutionIdUseCase.ts
delete mode 100644 modules/environment/application/GetEnvironmentComponentsUseCase.ts
delete mode 100644 modules/environment/application/GetGlossaryTermsUseCase.ts
delete mode 100644 modules/environment/application/GetInvariantsUseCase.ts
create mode 100644 modules/environment/application/GlossaryTermInteractor.ts
create mode 100644 modules/environment/application/InvariantInteractor.ts
delete mode 100644 modules/environment/application/UpdateAssumptionUseCase.ts
delete mode 100644 modules/environment/application/UpdateConstraintUseCase.ts
delete mode 100644 modules/environment/application/UpdateEffectUseCase.ts
delete mode 100644 modules/environment/application/UpdateEnvironmentComponentUseCase.ts
delete mode 100644 modules/environment/application/UpdateGlossaryTermUseCase.ts
delete mode 100644 modules/environment/application/UpdateInvariantUseCase.ts
create mode 100644 modules/environment/data/ConstraintCategoryRepository.ts
delete mode 100644 modules/environment/data/EnvironmentComponentRepository.ts
delete mode 100644 modules/environment/data/EnvironmentRepository.ts
create mode 100644 modules/environment/domain/ConstraintCategory.ts
delete mode 100644 modules/environment/domain/Environment.ts
delete mode 100644 modules/environment/domain/EnvironmentComponent.ts
delete mode 100644 modules/environment/mappers/AssumptionToJsonMapper.ts
delete mode 100644 modules/environment/mappers/ConstraintToJsonMapper.ts
delete mode 100644 modules/environment/mappers/EffectToJsonMapper.ts
delete mode 100644 modules/environment/mappers/EnvironmentComponentToJsonMapper.ts
delete mode 100644 modules/environment/mappers/EnvironmentToJsonMapper.ts
delete mode 100644 modules/environment/mappers/GlossaryTermToJsonMapper.ts
delete mode 100644 modules/environment/mappers/InvariantToJsonMapper.ts
delete mode 100644 modules/goals/application/CreateGoalsUseCase.ts
delete mode 100644 modules/goals/application/CreateLimitUseCase.ts
delete mode 100644 modules/goals/application/CreateMissionUseCase.ts
delete mode 100644 modules/goals/application/CreateObstacleUseCase.ts
delete mode 100644 modules/goals/application/CreateOutcomeUseCase.ts
delete mode 100644 modules/goals/application/CreateStakeholderUseCase.ts
delete mode 100644 modules/goals/application/DeleteLimitUseCase.ts
delete mode 100644 modules/goals/application/DeleteObstacleUseCase.ts
delete mode 100644 modules/goals/application/DeleteOutcomeUseCase.ts
delete mode 100644 modules/goals/application/DeleteStakeholderUseCase.ts
delete mode 100644 modules/goals/application/EpicInteractor.ts
delete mode 100644 modules/goals/application/GetGoalsBySolutionIdUseCase.ts
delete mode 100644 modules/goals/application/GetGoalsUseCase.ts
delete mode 100644 modules/goals/application/GetLimitsUseCase.ts
delete mode 100644 modules/goals/application/GetObstaclesUseCase.ts
delete mode 100644 modules/goals/application/GetOutcomesUseCase.ts
delete mode 100644 modules/goals/application/GetRationaleUseCase.ts
delete mode 100644 modules/goals/application/GetStakeHolderByIdUseCase.ts
delete mode 100644 modules/goals/application/GetStakeHoldersUseCase.ts
create mode 100644 modules/goals/application/GoalInteractor.ts
create mode 100644 modules/goals/application/LimitInteractor.ts
create mode 100644 modules/goals/application/ObstacleInteractor.ts
create mode 100644 modules/goals/application/OutcomeInteractor.ts
create mode 100644 modules/goals/application/StakeholderCategoryInteractor.ts
create mode 100644 modules/goals/application/StakeholderInteractor.ts
create mode 100644 modules/goals/application/StakeholderSegmentationInteractor.ts
delete mode 100644 modules/goals/application/UpdateLimitUseCase.ts
delete mode 100644 modules/goals/application/UpdateObstacleUseCase.ts
delete mode 100644 modules/goals/application/UpdateOutcomeUseCase.ts
delete mode 100644 modules/goals/application/UpdateRationaleUseCase.ts
delete mode 100644 modules/goals/application/UpdateStakeHolderUseCase.ts
delete mode 100644 modules/goals/data/EpicRepository.ts
delete mode 100644 modules/goals/data/GoalsRepository.ts
create mode 100644 modules/goals/data/StakeholderCategoryRepository.ts
create mode 100644 modules/goals/data/StakeholderSegmentationRepository.ts
delete mode 100644 modules/goals/domain/Epic.ts
rename {domain => modules/goals/domain}/Limit.ts (64%)
create mode 100644 modules/goals/domain/StakeholderCategory.ts
create mode 100644 modules/goals/domain/StakeholderSegmentation.ts
delete mode 100644 modules/goals/mappers/EpicToJsonMapper.ts
delete mode 100644 modules/goals/mappers/GoalToJsonMapper.ts
delete mode 100644 modules/goals/mappers/GoalsToJsonMapper.ts
delete mode 100644 modules/goals/mappers/LimitToJsonMapper.ts
delete mode 100644 modules/goals/mappers/ObstacleToJsonMapper.ts
delete mode 100644 modules/goals/mappers/OutcomeToJsonMapper.ts
delete mode 100644 modules/goals/mappers/StakeholderToJsonMapper.ts
delete mode 100644 modules/goals/ui/pages/Epics.vue
create mode 100644 modules/goals/ui/pages/Scenarios.vue
delete mode 100644 modules/project/application/CreatePersonUseCase.ts
delete mode 100644 modules/project/application/CreateProjectUseCase.ts
delete mode 100644 modules/project/application/DeletePersonUseCase.ts
delete mode 100644 modules/project/application/GetPersonnelUseCase.ts
delete mode 100644 modules/project/application/GetProjectBySolutionIdUseCase.ts
create mode 100644 modules/project/application/PersonInteractor.ts
delete mode 100644 modules/project/application/UpdatePersonUseCase.ts
delete mode 100644 modules/project/data/ProjectRepository.ts
delete mode 100644 modules/project/domain/Project.ts
delete mode 100644 modules/project/mappers/PersonToJsonMapper.ts
delete mode 100644 modules/project/mappers/ProjectToJsonMapper.ts
delete mode 100644 modules/solution/application/CreateSolutionUseCase.ts
delete mode 100644 modules/solution/application/DeleteSolutionUseCase.ts
delete mode 100644 modules/solution/application/GetAllSolutionsUseCase.ts
delete mode 100644 modules/solution/application/GetSolutionByIdUseCase.ts
delete mode 100644 modules/solution/application/GetSolutionBySlugUseCase.ts
create mode 100644 modules/solution/application/SolutionInteractor.ts
delete mode 100644 modules/solution/application/UpdateSolutionUseCase.ts
delete mode 100644 modules/solution/mappers/SolutionToJsonMapper.ts
delete mode 100644 modules/system/application/CreateSystemComponentUseCase.ts
delete mode 100644 modules/system/application/CreateSystemUseCase.ts
delete mode 100644 modules/system/application/DeleteSystemComponentUseCase.ts
create mode 100644 modules/system/application/FunctionalBehaviorInteractor.ts
delete mode 100644 modules/system/application/FunctionalRequirementInteractor.ts
delete mode 100644 modules/system/application/GetSystemBySolutionIdUseCase.ts
delete mode 100644 modules/system/application/GetSystemComponentsUseCase.ts
create mode 100644 modules/system/application/NonFunctionalBehaviorInteractor.ts
delete mode 100644 modules/system/application/NonFunctionalRequirementInteractor.ts
delete mode 100644 modules/system/application/UpdateSystemComponentUseCase.ts
delete mode 100644 modules/system/application/UserStoryInteractor.ts
create mode 100644 modules/system/data/FunctionalBehaviorRepository.ts
delete mode 100644 modules/system/data/FunctionalRequirementRepository.ts
create mode 100644 modules/system/data/NonFunctionalBehaviorRepository.ts
delete mode 100644 modules/system/data/NonFunctionalRequirementRepository.ts
delete mode 100644 modules/system/data/SystemComponentRepository.ts
delete mode 100644 modules/system/data/SystemRepository.ts
delete mode 100644 modules/system/data/UserStoryRepository.ts
rename modules/system/domain/{FunctionalRequirement.ts => FunctionalBehavior.ts} (61%)
create mode 100644 modules/system/domain/NonFunctionalBehavior.ts
delete mode 100644 modules/system/domain/NonFunctionalRequirement.ts
delete mode 100644 modules/system/domain/System.ts
delete mode 100644 modules/system/domain/SystemComponent.ts
delete mode 100644 modules/system/mappers/FunctionalRequirementToJsonMapper.ts
delete mode 100644 modules/system/mappers/NonFunctionalRequirementToJsonMapper.ts
delete mode 100644 modules/system/mappers/ScenarioToJsonMapper.ts
delete mode 100644 modules/system/mappers/SystemComponentToJsonMapper.ts
delete mode 100644 modules/system/mappers/SystemToJsonMapper.ts
delete mode 100644 modules/system/mappers/UseCaseToJsonMapper.ts
delete mode 100644 modules/system/mappers/UserStoryToJsonMapper.ts
create mode 100644 pages/db-debug.vue
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 30566964..fbfd8a4e 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,17 +1,16 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
- "name": "Node.js & Python",
+ "name": "Node.js",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
- "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
- "features": {
- "ghcr.io/devcontainers/features/python:1": {}
- },
+ "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": "npm install && npm install -g editorconfig",
+ "postCreateCommand": "npm install",
+ // Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
@@ -22,8 +21,6 @@
]
}
}
- // Configure tool-specific properties.
- // "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
\ No newline at end of file
diff --git a/app.config.ts b/app.config.ts
index f192bbb5..d6968049 100644
--- a/app.config.ts
+++ b/app.config.ts
@@ -1,5 +1,4 @@
export default defineAppConfig({
darkMode: 'light',
- serializationVersion: '0.5.0',
connString: 'idb://cathedral'
})
diff --git a/app.vue b/app.vue
index a96702d9..5a6c7458 100644
--- a/app.vue
+++ b/app.vue
@@ -1,4 +1,6 @@
diff --git a/application/ComponentInteractor.ts b/application/ComponentInteractor.ts
new file mode 100644
index 00000000..4b92d21b
--- /dev/null
+++ b/application/ComponentInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Component from "~/domain/Component";
+
+export default class ComponentInteractor extends Interactor { }
\ No newline at end of file
diff --git a/application/Interactor.ts b/application/Interactor.ts
index 52dcc32c..797c3165 100644
--- a/application/Interactor.ts
+++ b/application/Interactor.ts
@@ -1,17 +1,30 @@
import type Entity from "~/domain/Entity";
import type Repository from "./Repository";
import type { Uuid } from "~/domain/Uuid";
+import type { Properties } from "~/domain/Properties";
export default abstract class Interactor {
constructor(
readonly repository: Repository
) { }
- abstract create(item: Omit): Promise
+ create(item: Omit, 'id'>): Promise {
+ return this.repository.create(item)
+ }
- abstract delete(id: Uuid): Promise
+ delete(id: Uuid): Promise {
+ return this.repository.delete(id)
+ }
- abstract getAll(parentId: Uuid): Promise
+ get(id: Uuid): Promise {
+ return this.repository.get(id)
+ }
- abstract update(item: Pick): Promise
+ getAll(criteria?: Partial>): Promise {
+ return this.repository.getAll(criteria)
+ }
+
+ update(item: Properties): Promise {
+ return this.repository.update(item)
+ }
}
\ No newline at end of file
diff --git a/application/Mapper.ts b/application/Mapper.ts
index a5bc3033..f3e4f34b 100644
--- a/application/Mapper.ts
+++ b/application/Mapper.ts
@@ -1,7 +1,4 @@
-import type { SemVerString } from "~/domain/SemVer";
-
export default abstract class Mapper {
- constructor(readonly serializationVersion: SemVerString) { }
abstract mapTo(source: Source): Target;
abstract mapFrom(target: Target): Source;
}
\ No newline at end of file
diff --git a/application/Repository.ts b/application/Repository.ts
index c9050249..d74f55c0 100644
--- a/application/Repository.ts
+++ b/application/Repository.ts
@@ -1,26 +1,48 @@
import type Entity from '~/domain/Entity';
-import type Mapper from './Mapper.js';
import type { Properties } from '~/domain/Properties.js';
import type { Uuid } from '~/domain/Uuid.js';
+import { useAppConfig } from '#app'
+import { PGlite } from "@electric-sql/pglite";
+/**
+ * A repository for entities.
+ */
export default abstract class Repository {
- private _mapper: Mapper;
-
- constructor({ mapper }: Properties>) {
- this._mapper = mapper;
- }
-
- get mapper(): Mapper { return this._mapper; }
-
- abstract getAll(filter?: (entity: E) => boolean): Promise;
+ /**
+ * The connection to the database.
+ */
+ static conn = new PGlite(useAppConfig().connString)
+
+ /**
+ * Creates an item to the repository.
+ * @param item The properties of the item to create.
+ * @returns The id of the added item.
+ */
+ abstract create(item: Omit, 'id'>): Promise
+
+ /**
+ * Deletes an item from the repository.
+ * @param id The id of the item to delete.
+ */
+ abstract delete(id: E['id']): Promise;
+ /**
+ * Gets an item from the repository.
+ * @param id The id of the item to get.
+ * @returns The item with the given id, or undefined if it does not exist.
+ */
abstract get(id: E['id']): Promise;
- abstract add(item: E): Promise
-
- abstract update(item: E): Promise;
-
- abstract delete(id: E['id']): Promise;
-
- abstract clear(): Promise;
+ /**
+ * Gets all items in the repository.
+ * @param criteria The criteria to filter the items by.
+ * @returns All items in the repository.
+ */
+ abstract getAll(criteria?: Partial>): Promise;
+
+ /**
+ * Updates an item in the repository.
+ * @param item The item to update.
+ */
+ abstract update(item: Properties): Promise;
}
\ No newline at end of file
diff --git a/application/SlugRepository.ts b/application/SlugRepository.ts
deleted file mode 100644
index a06d9930..00000000
--- a/application/SlugRepository.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import type Entity from "~/domain/Entity";
-import Repository from "./Repository";
-
-export default abstract class SlugRepository extends Repository {
- abstract getSolutionBySlug(slug: string): Promise;
-}
\ No newline at end of file
diff --git a/application/UserStoryInteractor.ts b/application/UserStoryInteractor.ts
new file mode 100644
index 00000000..4f693f06
--- /dev/null
+++ b/application/UserStoryInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import UserStory from "../domain/UserStory";
+
+export default class UserStoryInteractor extends Interactor { }
\ No newline at end of file
diff --git a/data/ComponentRepository.ts b/data/ComponentRepository.ts
new file mode 100644
index 00000000..d2db6f52
--- /dev/null
+++ b/data/ComponentRepository.ts
@@ -0,0 +1,6 @@
+import Component from "~/domain/Component";
+import PGLiteRepository from "./PGLiteRepository";
+
+export default class ComponentRepository extends PGLiteRepository {
+ constructor() { super('cathedral.component', Component) }
+}
\ No newline at end of file
diff --git a/data/Migration.ts b/data/Migration.ts
new file mode 100644
index 00000000..4fe5783c
--- /dev/null
+++ b/data/Migration.ts
@@ -0,0 +1,14 @@
+import { type PGliteInterface } from "@electric-sql/pglite";
+/**
+ * Represents a migration that can be run on the database.
+ */
+export default abstract class Migration {
+ /**
+ * Applies the migration to the database.
+ */
+ abstract up(db: PGliteInterface): Promise
+ /**
+ * Reverts the migration from the database.
+ */
+ abstract down(db: PGliteInterface): Promise
+}
\ No newline at end of file
diff --git a/data/MigrationManager.ts b/data/MigrationManager.ts
new file mode 100644
index 00000000..40737419
--- /dev/null
+++ b/data/MigrationManager.ts
@@ -0,0 +1,79 @@
+import { PGlite } from "@electric-sql/pglite";
+import Migration from "./Migration";
+import InitDatabase_00001 from "./migrations/00001-InitDatabase";
+
+type MigrationName = `${number}-${string}`
+
+/**
+ * Manages the migration of a database
+ */
+export default class MigrationManager {
+ private _migrations = new Map([
+ ["00001-InitDatabase", InitDatabase_00001]
+ ])
+
+ constructor(
+ /**
+ * The connection string for the database
+ */
+ private _connString: string
+ ) { }
+
+ /**
+ * Gets the names of the migrations that have been executed
+ * @param db The database to get the executed migration names from
+ * @returns The names of the executed migrations
+ */
+ private async _getExecutedMigrationNames(db: PGlite): Promise {
+ let results;
+ try {
+ results = await db.query(
+ `SELECT name FROM cathedral.__migration_history`
+ );
+ } catch (error) {
+ results = { rows: [] };
+ }
+
+ return results.rows.map((row: any) => row.name);
+ }
+
+ /**
+ * Returns the migrations that have not been executed
+ * @param executedMigrationNames The names of the migrations that have been executed
+ * @returns The names of the pending migrations
+ */
+ private async _getPendingMigrations(executedMigrationNames: MigrationName[]): Promise> {
+ const pendingMigrations = new Map()
+
+ for (const [migrationName, MigrationCons] of this._migrations) {
+ if (!executedMigrationNames.includes(migrationName))
+ pendingMigrations.set(migrationName, new (MigrationCons as any)())
+ }
+
+ return pendingMigrations
+ }
+
+ private async _addMigrationNameToDb(db: PGlite, migrationName: MigrationName) {
+ return db.query(
+ `INSERT INTO cathedral.__migration_history (Name) VALUES ($1)`,
+ [migrationName]
+ )
+ }
+
+ /**
+ * Migrates the database to the latest version
+ */
+ async migrateToLatest() {
+ console.log(`Migrating database to latest version...`)
+ const db = new PGlite(this._connString)
+
+ const executedMigrationNames = await this._getExecutedMigrationNames(db),
+ pendingMigrations = await this._getPendingMigrations(executedMigrationNames)
+
+ for (const [migrationName, migration] of pendingMigrations) {
+ await migration.up(db)
+ await this._addMigrationNameToDb(db, migrationName)
+ }
+ console.log(`Database migrated to latest version`)
+ }
+}
\ No newline at end of file
diff --git a/data/PGLiteRepository.ts b/data/PGLiteRepository.ts
index adb38dff..31996e4a 100644
--- a/data/PGLiteRepository.ts
+++ b/data/PGLiteRepository.ts
@@ -1,7 +1,87 @@
import Repository from '~/application/Repository';
import type Entity from '~/domain/Entity';
-import { PGliteWorker } from "@electric-sql/pglite/worker";
+import type { Properties } from '~/domain/Properties';
+import type { Uuid } from '~/domain/Uuid';
+
+const reCamelCaseToSnakeCase = (str: string) => str.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`)
+
+const reSnakeCaseToCamelCase = (str: string) => str.replace(/_./g, match => match[1].toUpperCase())
+
+type Constructor = { new(...args: any[]): T }
export default abstract class PGLiteRepository extends Repository {
- private static _db = new PGliteWorker('idb://cathedral');
+ constructor(
+ private readonly _tableName: string,
+ private readonly _Constructor: Constructor
+ ) { super() }
+
+ async create(item: Omit, 'id'>): Promise {
+ const conn = PGLiteRepository.conn
+
+ const sql = `
+ INSERT INTO ${this._tableName} (${Object.keys(item).map(reCamelCaseToSnakeCase).join(', ')})
+ VALUES (${Object.keys(item).map((_, index) => `$${index + 1}`).join(', ')})
+ RETURNING id
+ `
+
+ const result = (await conn.query<{ id: Uuid }>(
+ sql, Object.values(item)
+ )).rows[0]
+
+ return result.id
+ }
+
+ async get(id: Uuid): Promise {
+ return (await this.getAll({ id } as Record))[0]
+ }
+
+ async getAll(criteria: Partial> = {}): Promise {
+ const conn = PGLiteRepository.conn
+
+ const sql = `
+ SELECT * FROM ${this._tableName}
+ ${this._criteriaToSql(criteria)}
+ `
+
+ const results = (await conn.query(
+ sql, Object.values(criteria ?? {})
+ )).rows
+
+ return results.map(result => new this._Constructor(
+ Object.fromEntries(
+ Object.entries(result).map(([key, value]) => [reSnakeCaseToCamelCase(key), value])
+ )
+ ))
+ }
+
+ async delete(id: Uuid): Promise {
+ const conn = PGLiteRepository.conn
+
+ const sql = `
+ DELETE FROM ${this._tableName}
+ WHERE id = $1
+ `
+
+ await conn.query(sql, [id])
+ }
+
+ async update(item: Properties): Promise {
+ const conn = PGLiteRepository.conn
+
+ const sql = `
+ UPDATE ${this._tableName}
+ SET ${Object.keys(item).map((key, index) => `${reCamelCaseToSnakeCase(key)} = $${index + 1}`).join(', ')}
+ WHERE id = $${Object.keys(item).length + 1}
+ `
+
+ await conn.query(sql, [...Object.values(item), (item as any).id])
+ }
+
+ protected _criteriaToSql(criteria: Record): string {
+ const conditions = Object.entries(criteria).map(([key], index) => {
+ return `${reCamelCaseToSnakeCase(key)} = $${index + 1}`
+ })
+
+ return conditions.length > 0 ? ` WHERE ${conditions.join(' AND ')}` : ''
+ }
}
\ No newline at end of file
diff --git a/data/StorageRepository.ts b/data/StorageRepository.ts
deleted file mode 100644
index 1ba648aa..00000000
--- a/data/StorageRepository.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import type { EntityJson } from '~/mappers/EntityToJsonMapper';
-import Repository from '~/application/Repository';
-import type Entity from '~/domain/Entity';
-import type Mapper from '~/application/Mapper';
-import type { Properties } from '~/domain/Properties';
-import type { Uuid } from '~/domain/Uuid';
-
-export default class StorageRepository extends Repository {
- readonly storageKey: string
- private readonly _storage: Storage = localStorage
-
- constructor({ storageKey, ...rest }: Properties>) {
- super(rest);
-
- this.storageKey = storageKey;
- }
-
- override get mapper(): Mapper {
- return super.mapper;
- }
-
- get(id: E['id']): Promise {
- const data = this._storage.getItem(this.storageKey),
- json: EntityJson[] = data ? JSON.parse(data) : [],
- result = json.find(item => item.id === id);
-
- return Promise.resolve(
- result ? this.mapper.mapFrom(result) : undefined
- );
- }
-
- getAll(filter: (entity: E) => boolean = _ => true): Promise {
- const data = this._storage.getItem(this.storageKey),
- json: EntityJson[] = data ? JSON.parse(data) : [],
- result = json.map(this.mapper.mapFrom).filter(filter);
-
- return Promise.resolve(result);
- }
-
- async add(item: E): Promise {
- const data = this._storage.getItem(this.storageKey),
- json: EntityJson[] = data ? JSON.parse(data) : [];
- json.push(this.mapper.mapTo(item));
- this._storage.setItem(this.storageKey, JSON.stringify(json));
-
- return item.id;
- }
-
- clear(): Promise {
- this._storage.removeItem(this.storageKey);
-
- return Promise.resolve();
- }
-
- update(item: E): Promise {
- const data = this._storage.getItem(this.storageKey),
- json: EntityJson[] = data ? JSON.parse(data) : [],
- index = json.findIndex(e => e.id === item.id);
-
- if (index === -1)
- throw new Error('Not found');
-
- json[index] = this.mapper.mapTo(item);
- this._storage.setItem(this.storageKey, JSON.stringify(json));
-
- return Promise.resolve();
- }
-
- delete(id: E['id']): Promise {
- const data = this._storage.getItem(this.storageKey),
- json: EntityJson[] = data ? JSON.parse(data) : [],
- index = json.findIndex(item => item.id === id);
-
- if (index === -1)
- throw new Error('Not found');
-
- json.splice(index, 1);
- this._storage.setItem(this.storageKey, JSON.stringify(json));
-
- return Promise.resolve();
- }
-}
\ No newline at end of file
diff --git a/data/UserStoryRepository.ts b/data/UserStoryRepository.ts
new file mode 100644
index 00000000..ae1e278c
--- /dev/null
+++ b/data/UserStoryRepository.ts
@@ -0,0 +1,8 @@
+import UserStory from "~/domain/UserStory";
+import PGLiteRepository from "./PGLiteRepository";
+
+export default class UserStoryRepository extends PGLiteRepository {
+ constructor() {
+ super('cathedral.user_story', UserStory)
+ }
+}
\ No newline at end of file
diff --git a/data/migrations/00001-InitDatabase.ts b/data/migrations/00001-InitDatabase.ts
new file mode 100644
index 00000000..5836baa9
--- /dev/null
+++ b/data/migrations/00001-InitDatabase.ts
@@ -0,0 +1,211 @@
+import type { PGliteInterface } from "@electric-sql/pglite";
+import Migration from "../Migration";
+
+export default class InitDatabase_00001 extends Migration {
+ async up(db: PGliteInterface): Promise {
+ const sql = `
+ CREATE SCHEMA cathedral;
+ SET search_path TO cathedral;
+
+ -- ref: https://gist.github.com/kjmph/5bd772b2c2df145aa645b837da7eca74
+ -- Awaiting the following native function to be added:
+ -- https://commitfest.postgresql.org/43/4388/
+ create or replace function xuuid7()
+ returns uuid
+ as $$
+ begin
+ -- use random v4 uuid as starting point (which has the same variant we need)
+ -- then overlay timestamp
+ -- then set version 7 by flipping the 2 and 1 bit in the version 4 string
+ return encode(
+ set_bit(
+ set_bit(
+ overlay(uuid_send(gen_random_uuid())
+ placing substring(int8send(floor(extract(epoch from clock_timestamp()) * 1000)::bigint) from 3)
+ from 1 for 6
+ ),
+ 52, 1
+ ),
+ 53, 1
+ ),
+ 'hex')::uuid;
+ end
+ $$
+ language plpgsql
+ volatile;
+
+ CREATE TABLE __migration_history (Name TEXT PRIMARY KEY);
+
+ CREATE TABLE solution (
+ id UUID PRIMARY KEY DEFAULT xuuid7(),
+ name VARCHAR(60) NOT NULL,
+ description VARCHAR(200) NOT NULL,
+ slug VARCHAR(60) NOT NULL
+ );
+
+ CREATE TABLE requirement (
+ id UUID PRIMARY KEY DEFAULT xuuid7(),
+ solution_id UUID NOT NULL REFERENCES solution(id) ON DELETE CASCADE,
+ name VARCHAR(60) NOT NULL,
+ statement VARCHAR(200) NOT NULL,
+ property VARCHAR(200) NOT NULL
+ );
+
+ CREATE TABLE goal (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE "limit" (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE outcome (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (goal);
+
+ CREATE TABLE obstacle (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE assumption (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE constraint_category (
+ id UUID PRIMARY KEY DEFAULT xuuid7(),
+ name VARCHAR(60) NOT NULL
+ );
+
+ INSERT INTO constraint_category (id, name) VALUES (xuuid7(), 'Business Rule');
+ INSERT INTO constraint_category (id, name) VALUES (xuuid7(), 'Physical Law');
+ INSERT INTO constraint_category (id, name) VALUES (xuuid7(), 'Engineering Decision');
+
+ CREATE TABLE "constraint" (
+ category_id UUID REFERENCES constraint_category(id)
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE effect (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE invariant (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE actor (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE component (
+ parent_component_id UUID NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
+ )
+ INHERITS (actor);
+
+ CREATE TABLE glossary_term (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (component);
+
+ CREATE TABLE stakeholder_segmentation (
+ id UUID PRIMARY KEY DEFAULT xuuid7(),
+ name VARCHAR(60) NOT NULL
+ );
+
+ INSERT INTO stakeholder_segmentation (id, name) VALUES (xuuid7(), 'Client');
+ INSERT INTO stakeholder_segmentation (id, name) VALUES (xuuid7(), 'Vendor');
+
+ CREATE TABLE stakeholder_category (
+ id UUID PRIMARY KEY DEFAULT xuuid7(),
+ name VARCHAR(60) NOT NULL
+ );
+
+ INSERT INTO stakeholder_category (id, name) VALUES (xuuid7(), 'Key Stakeholder');
+ INSERT INTO stakeholder_category (id, name) VALUES (xuuid7(), 'Shadow Influencer');
+ INSERT INTO stakeholder_category (id, name) VALUES (xuuid7(), 'Fellow Traveler');
+ INSERT INTO stakeholder_category (id, name) VALUES (xuuid7(), 'Observer');
+
+ CREATE TABLE stakeholder (
+ -- id UUID PRIMARY KEY DEFAULT xuuid7(), -- causes when explicitly defined
+ influence smallint NOT NULL,
+ availability smallint NOT NULL,
+ segmentation_id UUID REFERENCES stakeholder_segmentation(id),
+ category_id UUID REFERENCES stakeholder_category(id)
+ ) INHERITS (component);
+
+ CREATE TABLE person (
+ email VARCHAR(60) NOT NULL,
+ role_id UUID NOT NULL
+ -- role_id UUID NOT NULL REFERENCES stakeholder(id) -- throws error stakeholder does not redefine id
+ )
+ INHERITS (actor);
+
+ CREATE TABLE behavior (
+ component_id UUID NOT NULL
+ -- component_id UUID NOT NULL REFERENCES component(id) ON DELETE CASCADE
+ )
+ INHERITS (requirement);
+
+ CREATE TABLE functional_behavior (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (behavior);
+
+ CREATE TABLE non_functional_behavior (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (behavior);
+
+ CREATE table example (
+ -- Additional columns can be added here if needed
+ )
+ INHERITS (behavior);
+
+ CREATE table scenario (
+ -- primary_actor_id UUID NOT NULL REFERENCES actor(id)
+ primary_actor_id UUID NOT NULL
+ )
+ INHERITS (example);
+
+ CREATE TABLE user_story (
+ -- outcome_id UUID NOT NULL REFERENCES outcome(id),
+ -- functional_behavior_id UUID NOT NULL REFERENCES functional_behavior(id)
+ outcome_id UUID NOT NULL,
+ functional_behavior_id UUID NOT NULL
+ )
+ INHERITS (scenario);
+
+ CREATE TABLE use_case (
+ scope VARCHAR(60) NOT NULL,
+ level VARCHAR(60) NOT NULL,
+ goal_in_context VARCHAR(200) NOT NULL,
+ -- pre_condition_id UUID NOT NULL REFERENCES assumption(id),
+ pre_condition_id UUID NOT NULL,
+ trigger_id UUID NOT NULL,
+ main_success_scenario VARCHAR(200) NOT NULL,
+ -- success_guarantee_id UUID NOT NULL REFERENCES effect(id),
+ success_guarantee_id UUID NOT NULL,
+ extensions VARCHAR(200) NOT NULL
+ )
+ INHERITS (scenario);
+`
+
+ await db.exec(sql)
+ }
+
+ async down(db: PGliteInterface): Promise {
+ const sql = `
+ DROP SCHEMA cathedral CASCADE;
+ `;
+
+ await db.exec(sql);
+ }
+}
\ No newline at end of file
diff --git a/domain/Actor.ts b/domain/Actor.ts
index 383a226e..90aae79b 100644
--- a/domain/Actor.ts
+++ b/domain/Actor.ts
@@ -1,6 +1,6 @@
-import Component from "./Component";
+import Requirement from "./Requirement";
/**
* A part of a Project, Environment, System, or Goals that may affect or be affected by the associated entities
*/
-export default class Actor extends Component { }
+export default class Actor extends Requirement { }
diff --git a/domain/Component.ts b/domain/Component.ts
index 93d7a2c2..5dcd1441 100644
--- a/domain/Component.ts
+++ b/domain/Component.ts
@@ -1,6 +1,16 @@
-import Requirement from "./Requirement";
+import type { Properties } from "./Properties";
+import type { Uuid } from "./Uuid";
+import Actor from "./Actor";
/**
* Idenfitication of a part (of the Project, Environment, Goals, or System)
*/
-export default class Component extends Requirement { }
+export default class Component extends Actor {
+ constructor({ parentComponentId, ...rest }: Properties) {
+ super(rest)
+
+ this.parentComponentId = parentComponentId
+ }
+
+ parentComponentId: Uuid
+}
diff --git a/domain/Requirement.ts b/domain/Requirement.ts
index 3847c46b..af583391 100644
--- a/domain/Requirement.ts
+++ b/domain/Requirement.ts
@@ -6,21 +6,15 @@ import type { Uuid } from "./Uuid";
* A Requirement is a statement that specifies a property.
*/
export default class Requirement extends Entity {
-
constructor({ id, ...rest }: Properties) {
super({ id })
Object.assign(this, rest)
}
- /**
- * The parent of a requirement is an aggregate of requirements.
- */
- parentId!: Uuid
-
/**
* A property is a Predicate formalizing its associated statement.
- * Currently, this is represented as a datalog string.
+ * TODO: represented as a datalog string?
*/
property!: string
diff --git a/modules/system/domain/Scenario.ts b/domain/Scenario.ts
similarity index 88%
rename from modules/system/domain/Scenario.ts
rename to domain/Scenario.ts
index 0ecfea1f..a9cf6223 100644
--- a/modules/system/domain/Scenario.ts
+++ b/domain/Scenario.ts
@@ -1,4 +1,4 @@
-import Example from "./Example";
+import Example from "../modules/system/domain/Example";
import type { Properties } from "~/domain/Properties";
import type { Uuid } from "~/domain/Uuid";
diff --git a/modules/system/domain/UserStory.ts b/domain/UserStory.ts
similarity index 53%
rename from modules/system/domain/UserStory.ts
rename to domain/UserStory.ts
index e3079f3d..3e9979d0 100644
--- a/modules/system/domain/UserStory.ts
+++ b/domain/UserStory.ts
@@ -9,19 +9,22 @@ import type { Properties } from "~/domain/Properties";
*
* [role] - primaryActorId
* [behavior] - behaviorId (Functional Behavior)
- * [goal] - epicId
+ * [goal] - outcomeId
*/
export default class UserStory extends Scenario {
- constructor({ epicId, behaviorId, ...rest }: Properties) {
+ constructor({ outcomeId, functionalBehaviorId, ...rest }: Properties) {
super(rest);
- this.epicId = epicId;
- this.behaviorId = behaviorId;
+ this.outcomeId = outcomeId;
+ this.functionalBehaviorId = functionalBehaviorId;
}
- behaviorId: Uuid
+ /**
+ * The action that the user wants to perform.
+ */
+ functionalBehaviorId: Uuid
/**
- * The epic (goal / purpose) that the story is aiming to achieve.
+ * The outcome that the story is aiming to achieve.
*/
- epicId: Uuid
+ outcomeId: Uuid
}
\ No newline at end of file
diff --git a/index.d.ts b/index.d.ts
index 016492fd..26bd7d09 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -1,10 +1,7 @@
-import type { SemVerString } from "./domain/SemVer"
-
type DarkModeOptions = 'light' | 'dark'
declare module 'nuxt/schema' {
interface AppConfigInput {
- serializationVersion: SemVerString
darkMode: DarkModeOptions
connString: string
}
diff --git a/mappers/EntityToJsonMapper.ts b/mappers/EntityToJsonMapper.ts
deleted file mode 100644
index c42291e5..00000000
--- a/mappers/EntityToJsonMapper.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import Mapper from '~/application/Mapper';
-import Entity from '~/domain/Entity';
-import SemVer, { type SemVerString } from '~/domain/SemVer';
-import type { Uuid } from '~/domain/Uuid';
-
-export interface EntityJson {
- id: Uuid;
- serializationVersion: SemVerString;
-}
-
-export default class EntityToJsonMapper extends Mapper {
- /**
- * Converts the JSON representation of an entity to an entity.
- * @param target The JSON representation of the entity.
- * @returns The entity.
- */
- mapFrom(target: EntityJson): Entity {
- const version = new SemVer(target.serializationVersion);
-
- return new Entity({ id: target.id });
- }
-
- /**
- * Converts the entity to a JSON representation.
- * @param source The entity to convert.
- * @returns The JSON representation of the entity.
- */
- mapTo({ id }: Entity): EntityJson {
- return {
- serializationVersion: this.serializationVersion,
- id
- };
- }
-}
\ No newline at end of file
diff --git a/mappers/PEGSToJsonMapper.ts b/mappers/PEGSToJsonMapper.ts
deleted file mode 100644
index bf34cef9..00000000
--- a/mappers/PEGSToJsonMapper.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import type { Uuid } from "~/domain/Uuid";
-import PEGS from "~/domain/PEGS";
-import EntityToJsonMapper, { type EntityJson } from "./EntityToJsonMapper";
-import SemVer from "~/domain/SemVer";
-
-export interface PEGSJson extends EntityJson {
- componentIds: Uuid[]
- limitationIds: Uuid[]
- solutionId: Uuid
-}
-
-export default class PEGSToJsonMapper extends EntityToJsonMapper {
- mapFrom(target: PEGSJson): PEGS {
- const version = new SemVer(target.serializationVersion);
-
- return new PEGS(target);
- }
-
- mapTo(source: PEGS): PEGSJson {
- return {
- serializationVersion: this.serializationVersion,
- id: source.id,
- solutionId: source.solutionId,
- componentIds: source.componentIds,
- limitationIds: source.limitationIds
- };
- }
-}
\ No newline at end of file
diff --git a/mappers/RequirementToJsonMapper.ts b/mappers/RequirementToJsonMapper.ts
deleted file mode 100644
index e3b36ad4..00000000
--- a/mappers/RequirementToJsonMapper.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import SemVer from "~/domain/SemVer";
-import type { EntityJson } from "./EntityToJsonMapper";
-import Requirement from "~/domain/Requirement";
-import EntityToJsonMapper from "./EntityToJsonMapper";
-import type { Uuid } from "~/domain/Uuid";
-
-export interface RequirementJson extends EntityJson {
- name: string
- statement: string
- property: string
- parentId: Uuid
- solutionId: Uuid
-}
-
-export default class RequirementToJsonMapper extends EntityToJsonMapper {
- override mapFrom(target: RequirementJson): Requirement {
- return new Requirement(target);
- }
-
- override mapTo(source: Requirement): RequirementJson {
- return {
- ...super.mapTo(source as any),
- parentId: source.parentId,
- name: source.name,
- statement: source.statement,
- property: source.property,
- solutionId: source.solutionId
- };
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/AssumptionInteractor.ts b/modules/environment/application/AssumptionInteractor.ts
new file mode 100644
index 00000000..e56c0860
--- /dev/null
+++ b/modules/environment/application/AssumptionInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Assumption from "../domain/Assumption";
+
+export default class AssumptionInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/ConstraintCategoryInteractor.ts b/modules/environment/application/ConstraintCategoryInteractor.ts
new file mode 100644
index 00000000..383bc9b3
--- /dev/null
+++ b/modules/environment/application/ConstraintCategoryInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type ConstraintCategory from "../domain/ConstraintCategory";
+
+export default class ConstraintCategoryInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/ConstraintInteractor.ts b/modules/environment/application/ConstraintInteractor.ts
new file mode 100644
index 00000000..879ae01f
--- /dev/null
+++ b/modules/environment/application/ConstraintInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Constraint from "../domain/Constraint";
+
+export default class ConstraintInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/CreateAssumptionUseCase.ts b/modules/environment/application/CreateAssumptionUseCase.ts
deleted file mode 100644
index 6c90e2c1..00000000
--- a/modules/environment/application/CreateAssumptionUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-import Assumption from "../domain/Assumption";
-
-type In = Pick
-
-export default class CreateAssumptionUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly assumptionRepository: Repository
- ) { super() }
-
- async execute({ parentId, name, statement, solutionId }: In): Promise {
- const environment = await this.environmentRepository.get(parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- const assumptionId = await this.assumptionRepository.add(new Assumption({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement
- }))
-
- environment.assumptionIds.push(assumptionId)
- await this.environmentRepository.update(environment)
-
- return assumptionId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateConstraintUseCase.ts b/modules/environment/application/CreateConstraintUseCase.ts
deleted file mode 100644
index 829b612d..00000000
--- a/modules/environment/application/CreateConstraintUseCase.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-import Constraint from "../domain/Constraint";
-
-type In = Pick
-
-export default class CreateConstraintUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly constraintRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, name, statement, category }: In): Promise {
- const environment = await this.environmentRepository.get(parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- const constraintId = await this.constraintRepository.add(new Constraint({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement,
- category
- }))
-
- environment.constraintIds.push(constraintId)
- await this.environmentRepository.update(environment)
-
- return constraintId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateEffectUseCase.ts b/modules/environment/application/CreateEffectUseCase.ts
deleted file mode 100644
index 21dcabf1..00000000
--- a/modules/environment/application/CreateEffectUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-import Effect from "../domain/Effect";
-
-type In = Pick
-
-export default class CreateEffectUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly effectRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, name, statement }: In): Promise {
- const environment = await this.environmentRepository.get(parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- const effectId = await this.effectRepository.add(new Effect({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement
- }))
-
- environment.effectIds.push(effectId)
- await this.environmentRepository.update(environment)
-
- return effectId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateEnvironmentComponentUseCase.ts b/modules/environment/application/CreateEnvironmentComponentUseCase.ts
deleted file mode 100644
index dfb658b8..00000000
--- a/modules/environment/application/CreateEnvironmentComponentUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type PEGS from "~/domain/PEGS";
-import EnvironmentComponent from "../domain/EnvironmentComponent";
-
-type In = Pick
-
-export default class CreateEnvironmentComponentUseCase extends UseCase {
- constructor(
- readonly pegsRepository: Repository,
- readonly componentRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, name, statement }: In): Promise {
- const pegs = await this.pegsRepository.get(parentId)
-
- if (!pegs)
- throw new Error('Parent not found')
-
- const componentId = await this.componentRepository.add(new EnvironmentComponent({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement
- }))
-
- pegs.componentIds.push(componentId)
- await this.pegsRepository.update(pegs)
-
- return componentId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateEnvironmentUseCase.ts b/modules/environment/application/CreateEnvironmentUseCase.ts
deleted file mode 100644
index 95ff57d1..00000000
--- a/modules/environment/application/CreateEnvironmentUseCase.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import Environment from "../domain/Environment";
-
-export default class CreateEnvironmentUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- return await this.repository.add(new Environment({
- id: crypto.randomUUID(),
- solutionId,
- assumptionIds: [],
- constraintIds: [],
- effectIds: [],
- componentIds: [],
- invariantIds: [],
- limitationIds: [],
- glossaryTermIds: []
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateGlossaryTermUseCase.ts b/modules/environment/application/CreateGlossaryTermUseCase.ts
deleted file mode 100644
index 80e3dcbc..00000000
--- a/modules/environment/application/CreateGlossaryTermUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import GlossaryTerm from "../domain/GlossaryTerm";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-
-type In = Pick
-
-export default class CreateGlossaryTermUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly glossaryTermRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, name, statement }: In): Promise {
- const environment = await this.environmentRepository.get(parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- const glossaryTermId = await this.glossaryTermRepository.add(new GlossaryTerm({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement
- }))
-
- environment.glossaryTermIds.push(glossaryTermId)
- await this.environmentRepository.update(environment)
-
- return glossaryTermId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/CreateInvariantUseCase.ts b/modules/environment/application/CreateInvariantUseCase.ts
deleted file mode 100644
index d5c6860a..00000000
--- a/modules/environment/application/CreateInvariantUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-import Invariant from "../domain/Invariant";
-
-type In = Pick
-
-export default class CreateInvariantUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly invariantRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, name, statement }: In): Promise {
- const environment = await this.environmentRepository.get(parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- const invariantId = await this.invariantRepository.add(new Invariant({
- id: crypto.randomUUID(),
- property: '',
- parentId,
- solutionId,
- name,
- statement
- }))
-
- environment.invariantIds.push(invariantId)
- await this.environmentRepository.update(environment)
-
- return invariantId
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteAssumptionUseCase.ts b/modules/environment/application/DeleteAssumptionUseCase.ts
deleted file mode 100644
index a554f07b..00000000
--- a/modules/environment/application/DeleteAssumptionUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Environment from "../domain/Environment"
-import type Assumption from "../domain/Assumption"
-
-export default class DeleteAssumptionUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly assumptionRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const assumption = await this.assumptionRepository.get(id)
-
- if (!assumption)
- throw new Error('Assumption not found')
-
- const environment = await this.environmentRepository.get(assumption.parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- environment.assumptionIds = environment.assumptionIds.filter(assumptionId => assumptionId !== id)
- await this.environmentRepository.update(environment)
-
- await this.assumptionRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteConstraintUseCase.ts b/modules/environment/application/DeleteConstraintUseCase.ts
deleted file mode 100644
index f80c14f7..00000000
--- a/modules/environment/application/DeleteConstraintUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Environment from "../domain/Environment"
-import type Constraint from "../domain/Constraint"
-
-export default class DeleteConstraintUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly constraintRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const constraint = await this.constraintRepository.get(id)
-
- if (!constraint)
- throw new Error('Constraint not found')
-
- const environment = await this.environmentRepository.get(constraint.parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- environment.constraintIds = environment.constraintIds.filter(constraintId => constraintId !== id)
- await this.environmentRepository.update(environment)
-
- await this.constraintRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteEffectUseCase.ts b/modules/environment/application/DeleteEffectUseCase.ts
deleted file mode 100644
index 59fe4ddc..00000000
--- a/modules/environment/application/DeleteEffectUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Environment from "../domain/Environment"
-import type Effect from "../domain/Effect"
-
-export default class DeleteEffectUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly effectRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const effect = await this.effectRepository.get(id)
-
- if (!effect)
- throw new Error('Effect not found')
-
- const environment = await this.environmentRepository.get(effect.parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- environment.effectIds = environment.effectIds.filter(effectId => effectId !== id)
- await this.environmentRepository.update(environment)
-
- await this.effectRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteEnvironmentComponentUseCase.ts b/modules/environment/application/DeleteEnvironmentComponentUseCase.ts
deleted file mode 100644
index bf155db0..00000000
--- a/modules/environment/application/DeleteEnvironmentComponentUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type PEGS from "~/domain/PEGS"
-import type EnvironmentComponent from "../domain/EnvironmentComponent"
-
-export default class DeleteEnvironmentComponentUseCase extends UseCase {
- constructor(
- readonly pegsRepository: Repository,
- readonly environmentComponentRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const environmentComponent = await this.environmentComponentRepository.get(id)
-
- if (!environmentComponent)
- throw new Error('Component not found')
-
- const pegs = await this.pegsRepository.get(environmentComponent.parentId)
-
- if (!pegs)
- throw new Error('Parent not found')
-
- pegs.componentIds = pegs.componentIds.filter(componentId => componentId !== id)
- await this.pegsRepository.update(pegs)
-
- await this.environmentComponentRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteGlossaryTermUseCase.ts b/modules/environment/application/DeleteGlossaryTermUseCase.ts
deleted file mode 100644
index 1c90859f..00000000
--- a/modules/environment/application/DeleteGlossaryTermUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Environment from "../domain/Environment"
-import type GlossaryTerm from "../domain/GlossaryTerm"
-
-export default class DeleteGlossaryTermUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly glossaryTermRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const glossaryTerm = await this.glossaryTermRepository.get(id)
-
- if (!glossaryTerm)
- throw new Error('Glossary term not found')
-
- const environment = await this.environmentRepository.get(glossaryTerm.parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- environment.glossaryTermIds = environment.glossaryTermIds.filter(glossaryTermId => glossaryTermId !== id)
- await this.environmentRepository.update(environment)
-
- await this.glossaryTermRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/DeleteInvariantUseCase.ts b/modules/environment/application/DeleteInvariantUseCase.ts
deleted file mode 100644
index c156d42b..00000000
--- a/modules/environment/application/DeleteInvariantUseCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Environment from "../domain/Environment"
-import type Invariant from "../domain/Invariant"
-
-export default class DeleteInvariantUseCase extends UseCase {
- constructor(
- readonly environmentRepository: Repository,
- readonly invariantRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const invariant = await this.invariantRepository.get(id)
-
- if (!invariant)
- throw new Error('Invariant not found')
-
- const environment = await this.environmentRepository.get(invariant.parentId)
-
- if (!environment)
- throw new Error('Environment not found')
-
- environment.invariantIds = environment.invariantIds.filter(invariantId => invariantId !== id)
- await this.environmentRepository.update(environment)
-
- await this.invariantRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/EffectInteractor.ts b/modules/environment/application/EffectInteractor.ts
new file mode 100644
index 00000000..3fe6cf29
--- /dev/null
+++ b/modules/environment/application/EffectInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Effect from "../domain/Effect";
+
+export default class EffectInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/GetAssumptionsUseCase.ts b/modules/environment/application/GetAssumptionsUseCase.ts
deleted file mode 100644
index efa508c4..00000000
--- a/modules/environment/application/GetAssumptionsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type Assumption from "../domain/Assumption"
-
-export default class GetAssumptionsUseCase extends UseCase {
- constructor(
- readonly assumptionRepository: Repository
- ) { super() }
-
- async execute(environmentId: Uuid): Promise {
- return await this.assumptionRepository.getAll(
- assumption => assumption.parentId === environmentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetConstraintsUseCase.ts b/modules/environment/application/GetConstraintsUseCase.ts
deleted file mode 100644
index aa47e318..00000000
--- a/modules/environment/application/GetConstraintsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type Constraint from "../domain/Constraint"
-
-export default class GetConstraintsUseCase extends UseCase {
- constructor(
- readonly constraintRepository: Repository
- ) { super() }
-
- async execute(environmentId: Uuid): Promise {
- return await this.constraintRepository.getAll(
- constraint => constraint.parentId === environmentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetEffectsUseCase.ts b/modules/environment/application/GetEffectsUseCase.ts
deleted file mode 100644
index a69ea6b8..00000000
--- a/modules/environment/application/GetEffectsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type Effect from "../domain/Effect"
-
-export default class GetEffectsUseCase extends UseCase {
- constructor(
- readonly effectRepository: Repository
- ) { super() }
-
- async execute(environmentId: Uuid): Promise {
- return await this.effectRepository.getAll(
- effect => effect.parentId === environmentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetEnvironmentBySolutionIdUseCase.ts b/modules/environment/application/GetEnvironmentBySolutionIdUseCase.ts
deleted file mode 100644
index f1905ad6..00000000
--- a/modules/environment/application/GetEnvironmentBySolutionIdUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Repository from "~/application/Repository";
-import type Environment from "../domain/Environment";
-import type { Uuid } from "~/domain/Uuid";
-
-export default class GetEnvironmentBySolutionIdUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- const environments = await this.repository.getAll(e => e.solutionId === solutionId)
-
- return environments[0]
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetEnvironmentComponentsUseCase.ts b/modules/environment/application/GetEnvironmentComponentsUseCase.ts
deleted file mode 100644
index 8509843a..00000000
--- a/modules/environment/application/GetEnvironmentComponentsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type EnvironmentComponent from "../domain/EnvironmentComponent"
-
-export default class GetEnvironmentComponentsUseCase extends UseCase {
- constructor(
- readonly componentRepository: Repository
- ) { super() }
-
- async execute(parentId: Uuid): Promise {
- return await this.componentRepository.getAll(
- component => component.parentId === parentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetGlossaryTermsUseCase.ts b/modules/environment/application/GetGlossaryTermsUseCase.ts
deleted file mode 100644
index 4b09f665..00000000
--- a/modules/environment/application/GetGlossaryTermsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type GlossaryTerm from "../domain/GlossaryTerm"
-
-export default class GetGlossaryTermsUseCase extends UseCase {
- constructor(
- readonly glossaryTermRepository: Repository
- ) { super() }
-
- async execute(environmentId: Uuid): Promise {
- return await this.glossaryTermRepository.getAll(
- glossaryTerm => glossaryTerm.parentId === environmentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GetInvariantsUseCase.ts b/modules/environment/application/GetInvariantsUseCase.ts
deleted file mode 100644
index 24f1885f..00000000
--- a/modules/environment/application/GetInvariantsUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import type Invariant from "../domain/Invariant"
-
-export default class GetInvariantsUseCase extends UseCase {
- constructor(
- readonly invariantRepository: Repository
- ) { super() }
-
- async execute(environmentId: Uuid): Promise {
- return await this.invariantRepository.getAll(
- invariant => invariant.parentId === environmentId
- )
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/GlossaryTermInteractor.ts b/modules/environment/application/GlossaryTermInteractor.ts
new file mode 100644
index 00000000..bef8f168
--- /dev/null
+++ b/modules/environment/application/GlossaryTermInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type GlossaryTerm from "../domain/GlossaryTerm";
+
+export default class GlossaryTermInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/InvariantInteractor.ts b/modules/environment/application/InvariantInteractor.ts
new file mode 100644
index 00000000..f6062076
--- /dev/null
+++ b/modules/environment/application/InvariantInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Invariant from "../domain/Invariant";
+
+export default class InvariantInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/environment/application/UpdateAssumptionUseCase.ts b/modules/environment/application/UpdateAssumptionUseCase.ts
deleted file mode 100644
index 46bbfaf9..00000000
--- a/modules/environment/application/UpdateAssumptionUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type Repository from "~/application/Repository"
-import type Assumption from "../domain/Assumption"
-
-type In = Pick
-
-export default class UpdateAssumptionUseCase extends UseCase {
- constructor(
- readonly assumptionRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement }: In): Promise {
- const assumption = await this.assumptionRepository.get(id)
-
- if (!assumption)
- throw new Error('Assumption term not found')
-
- Object.assign(assumption, { name, statement })
-
- await this.assumptionRepository.update(assumption)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/UpdateConstraintUseCase.ts b/modules/environment/application/UpdateConstraintUseCase.ts
deleted file mode 100644
index 08d6f20c..00000000
--- a/modules/environment/application/UpdateConstraintUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type Repository from "~/application/Repository"
-import type Constraint from "../domain/Constraint"
-
-type In = Pick
-
-export default class UpdateConstraintUseCase extends UseCase {
- constructor(
- readonly constraintRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement, category }: In): Promise {
- const constraint = await this.constraintRepository.get(id)
-
- if (!constraint)
- throw new Error('Constraint not found')
-
- Object.assign(constraint, { name, statement })
-
- await this.constraintRepository.update(constraint)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/UpdateEffectUseCase.ts b/modules/environment/application/UpdateEffectUseCase.ts
deleted file mode 100644
index ab3a5d7e..00000000
--- a/modules/environment/application/UpdateEffectUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type Repository from "~/application/Repository"
-import type Effect from "../domain/Effect"
-
-type In = Pick
-
-export default class UpdateEffectUseCase extends UseCase {
- constructor(
- readonly effectRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement }: In): Promise {
- const effect = await this.effectRepository.get(id)
-
- if (!effect)
- throw new Error('Effect term not found')
-
- Object.assign(effect, { name, statement })
-
- await this.effectRepository.update(effect)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/UpdateEnvironmentComponentUseCase.ts b/modules/environment/application/UpdateEnvironmentComponentUseCase.ts
deleted file mode 100644
index 9b335ad2..00000000
--- a/modules/environment/application/UpdateEnvironmentComponentUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type Repository from "~/application/Repository"
-import type EnvironmentComponent from "../domain/EnvironmentComponent"
-
-type In = Pick
-
-export default class UpdateEnvironmentComponentUseCase extends UseCase {
- constructor(
- readonly componentRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement }: In): Promise {
- const environmentComponent = await this.componentRepository.get(id)
-
- if (!environmentComponent)
- throw new Error('Component term not found')
-
- Object.assign(environmentComponent, { name, statement })
-
- await this.componentRepository.update(environmentComponent)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/UpdateGlossaryTermUseCase.ts b/modules/environment/application/UpdateGlossaryTermUseCase.ts
deleted file mode 100644
index b075fd70..00000000
--- a/modules/environment/application/UpdateGlossaryTermUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type GlossaryTerm from "../domain/GlossaryTerm"
-import type Repository from "~/application/Repository"
-
-type In = Pick
-
-export default class UpdateGlossaryTermUseCase extends UseCase {
- constructor(
- readonly glossaryTermRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement }: In): Promise {
- const glossaryTerm = await this.glossaryTermRepository.get(id)
-
- if (!glossaryTerm)
- throw new Error('Glossary term not found')
-
- Object.assign(glossaryTerm, { name, statement })
-
- await this.glossaryTermRepository.update(glossaryTerm)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/application/UpdateInvariantUseCase.ts b/modules/environment/application/UpdateInvariantUseCase.ts
deleted file mode 100644
index 29c855be..00000000
--- a/modules/environment/application/UpdateInvariantUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type Repository from "~/application/Repository"
-import type Invariant from "../domain/Invariant"
-
-type In = Pick
-
-export default class UpdateInvariantUseCase extends UseCase {
- constructor(
- readonly invariantRepository: Repository
- ) { super() }
-
- async execute({ id, name, statement }: In): Promise {
- const invariant = await this.invariantRepository.get(id)
-
- if (!invariant)
- throw new Error('Invariant term not found')
-
- Object.assign(invariant, { name, statement })
-
- await this.invariantRepository.update(invariant)
- }
-}
\ No newline at end of file
diff --git a/modules/environment/data/AssumptionRepository.ts b/modules/environment/data/AssumptionRepository.ts
index 0f8c5e60..d140e9c0 100644
--- a/modules/environment/data/AssumptionRepository.ts
+++ b/modules/environment/data/AssumptionRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type Assumption from "../domain/Assumption";
-import AssumptionToJsonMapper from "../mappers/AssumptionToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Assumption from "../domain/Assumption";
-const { serializationVersion } = useAppConfig()
-
-export default class AssumptionRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'assumption',
- mapper: new AssumptionToJsonMapper(serializationVersion)
- })
- }
+export default class AssumptionRepository extends PGLiteRepository {
+ constructor() { super('cathedral.assumption', Assumption) }
}
\ No newline at end of file
diff --git a/modules/environment/data/ConstraintCategoryRepository.ts b/modules/environment/data/ConstraintCategoryRepository.ts
new file mode 100644
index 00000000..747f1c3e
--- /dev/null
+++ b/modules/environment/data/ConstraintCategoryRepository.ts
@@ -0,0 +1,6 @@
+import PGLiteRepository from "~/data/PGLiteRepository";
+import ConstraintCategory from "../domain/ConstraintCategory";
+
+export default class ConstraintCategoryRepository extends PGLiteRepository {
+ constructor() { super('cathedral.constraint_category', ConstraintCategory) }
+}
\ No newline at end of file
diff --git a/modules/environment/data/ConstraintRepository.ts b/modules/environment/data/ConstraintRepository.ts
index 6cf63633..5a54b8b8 100644
--- a/modules/environment/data/ConstraintRepository.ts
+++ b/modules/environment/data/ConstraintRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type Constraint from "../domain/Constraint";
-import ConstraintToJsonMapper from "../mappers/ConstraintToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Constraint from "../domain/Constraint";
-const { serializationVersion } = useAppConfig()
-
-export default class ConstraintRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'constraint',
- mapper: new ConstraintToJsonMapper(serializationVersion)
- })
- }
+export default class ConstraintRepository extends PGLiteRepository {
+ constructor() { super(`cathedral."constraint"`, Constraint) }
}
\ No newline at end of file
diff --git a/modules/environment/data/EffectRepository.ts b/modules/environment/data/EffectRepository.ts
index e1727d32..0c8393dd 100644
--- a/modules/environment/data/EffectRepository.ts
+++ b/modules/environment/data/EffectRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type Effect from "../domain/Effect";
-import EffectToJsonMapper from "../mappers/EffectToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Effect from "../domain/Effect";
-const { serializationVersion } = useAppConfig()
-
-export default class EffectRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'effect',
- mapper: new EffectToJsonMapper(serializationVersion)
- })
- }
+export default class EffectRepository extends PGLiteRepository {
+ constructor() { super('cathedral.effect', Effect) }
}
\ No newline at end of file
diff --git a/modules/environment/data/EnvironmentComponentRepository.ts b/modules/environment/data/EnvironmentComponentRepository.ts
deleted file mode 100644
index 970414c8..00000000
--- a/modules/environment/data/EnvironmentComponentRepository.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type EnvironmentComponent from "../domain/EnvironmentComponent";
-import EnvironmentComponentToJsonMapper from "../mappers/EnvironmentComponentToJsonMapper";
-
-const { serializationVersion } = useAppConfig()
-
-export default class EnvironmentComponentRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'environmentComponent',
- mapper: new EnvironmentComponentToJsonMapper(serializationVersion)
- })
- }
-}
\ No newline at end of file
diff --git a/modules/environment/data/EnvironmentRepository.ts b/modules/environment/data/EnvironmentRepository.ts
deleted file mode 100644
index 05d3cd1e..00000000
--- a/modules/environment/data/EnvironmentRepository.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Properties } from "~/domain/Properties";
-import EnvironmentToJsonMapper from "../mappers/EnvironmentToJsonMapper";
-import StorageRepository from "~/data/StorageRepository";
-import type Environment from "../domain/Environment";
-
-const { serializationVersion } = useAppConfig()
-
-export default class EnvironmentRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'environment',
- mapper: new EnvironmentToJsonMapper(serializationVersion)
- })
- }
-}
\ No newline at end of file
diff --git a/modules/environment/data/GlossaryTermRepository.ts b/modules/environment/data/GlossaryTermRepository.ts
index 80d60576..a2c5867c 100644
--- a/modules/environment/data/GlossaryTermRepository.ts
+++ b/modules/environment/data/GlossaryTermRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type GlossaryTerm from "../domain/GlossaryTerm";
-import GlossaryTermToJsonMapper from "../mappers/GlossaryTermToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import GlossaryTerm from "../domain/GlossaryTerm";
-const { serializationVersion } = useAppConfig()
-
-export default class GlossaryTermRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'glossaryTerm',
- mapper: new GlossaryTermToJsonMapper(serializationVersion)
- })
- }
+export default class GlossaryTermRepository extends PGLiteRepository {
+ constructor() { super('cathedral.glossary_term', GlossaryTerm) }
}
\ No newline at end of file
diff --git a/modules/environment/data/InvariantRepository.ts b/modules/environment/data/InvariantRepository.ts
index ce6f3603..dc087f5d 100644
--- a/modules/environment/data/InvariantRepository.ts
+++ b/modules/environment/data/InvariantRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type Invariant from "../domain/Invariant";
-import InvariantToJsonMapper from "../mappers/InvariantToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Invariant from "../domain/Invariant";
-const { serializationVersion } = useAppConfig()
-
-export default class InvariantRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'invariant',
- mapper: new InvariantToJsonMapper(serializationVersion)
- })
- }
+export default class InvariantRepository extends PGLiteRepository {
+ constructor() { super('cathedral.invariant', Invariant) }
}
\ No newline at end of file
diff --git a/modules/environment/domain/Constraint.ts b/modules/environment/domain/Constraint.ts
index 48a8b629..492e3cd0 100644
--- a/modules/environment/domain/Constraint.ts
+++ b/modules/environment/domain/Constraint.ts
@@ -1,21 +1,13 @@
import type { Properties } from "~/domain/Properties";
import Requirement from "~/domain/Requirement";
-
-/**
- * Property imposed by the environment
- */
-export enum ConstraintCategory {
- BusinessRule = 'Business Rule',
- PhysicalLaw = 'Physical Law',
- EngineeringDecision = 'Engineering Decision'
-}
+import type { Uuid } from "~/domain/Uuid";
export default class Constraint extends Requirement {
- category: ConstraintCategory;
+ categoryId: Uuid;
- constructor({ category, ...rest }: Properties) {
+ constructor({ categoryId, ...rest }: Properties) {
super(rest);
- this.category = category;
+ this.categoryId = categoryId;
}
}
\ No newline at end of file
diff --git a/modules/environment/domain/ConstraintCategory.ts b/modules/environment/domain/ConstraintCategory.ts
new file mode 100644
index 00000000..267699a7
--- /dev/null
+++ b/modules/environment/domain/ConstraintCategory.ts
@@ -0,0 +1,15 @@
+import Entity from "~/domain/Entity";
+import type { Properties } from "~/domain/Properties";
+
+/**
+ * Property imposed by the environment
+ */
+export default class ConstraintCategory extends Entity {
+ constructor({ name, ...rest }: Properties) {
+ super({ ...rest });
+
+ this.name = name;
+ }
+
+ name: string;
+}
\ No newline at end of file
diff --git a/modules/environment/domain/Environment.ts b/modules/environment/domain/Environment.ts
deleted file mode 100644
index d0f013c8..00000000
--- a/modules/environment/domain/Environment.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import PEGS from "~/domain/PEGS";
-import type { Properties } from "~/domain/Properties";
-import type { Uuid } from "~/domain/Uuid";
-
-/**
- * The set of entities (human and non-human) external to the project
- * or system with the potential to affect it or be affected by it
- */
-export default class Environment extends PEGS {
- constructor(properties: Properties) {
- super(properties)
-
- this.assumptionIds = properties.assumptionIds
- this.constraintIds = properties.constraintIds
- this.effectIds = properties.effectIds
- this.invariantIds = properties.invariantIds
- this.glossaryTermIds = properties.glossaryTermIds
- }
-
- assumptionIds: Uuid[]
- constraintIds: Uuid[]
- effectIds: Uuid[]
- invariantIds: Uuid[]
- glossaryTermIds: Uuid[]
-}
diff --git a/modules/environment/domain/EnvironmentComponent.ts b/modules/environment/domain/EnvironmentComponent.ts
deleted file mode 100644
index e3af74c5..00000000
--- a/modules/environment/domain/EnvironmentComponent.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import Component from "~/domain/Component";
-
-export default class EnvironmentComponent extends Component { }
\ No newline at end of file
diff --git a/modules/environment/mappers/AssumptionToJsonMapper.ts b/modules/environment/mappers/AssumptionToJsonMapper.ts
deleted file mode 100644
index 180f55f2..00000000
--- a/modules/environment/mappers/AssumptionToJsonMapper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Assumption from "../domain/Assumption";
-
-export interface AssumptionJson extends RequirementJson { }
-
-export default class AssumptionToJsonMapper extends RequirementToJsonMapper {
- override mapTo(source: Assumption): AssumptionJson {
- return { ...super.mapTo(source) };
- }
-
- override mapFrom(target: AssumptionJson): Assumption {
- return new Assumption({ ...target });
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/ConstraintToJsonMapper.ts b/modules/environment/mappers/ConstraintToJsonMapper.ts
deleted file mode 100644
index dc898725..00000000
--- a/modules/environment/mappers/ConstraintToJsonMapper.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Constraint, { type ConstraintCategory } from "../domain/Constraint";
-
-export interface ConstraintJson extends RequirementJson {
- category: ConstraintCategory;
-}
-
-export default class ConstraintToJsonMapper extends RequirementToJsonMapper {
- override mapFrom(target: ConstraintJson): Constraint {
- return new Constraint({ ...target });
- }
-
- override mapTo(source: Constraint): ConstraintJson {
- return {
- ...super.mapTo(source),
- category: source.category
- };
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/EffectToJsonMapper.ts b/modules/environment/mappers/EffectToJsonMapper.ts
deleted file mode 100644
index 275c95be..00000000
--- a/modules/environment/mappers/EffectToJsonMapper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Effect from "../domain/Effect";
-
-export interface EffectJson extends RequirementJson { }
-
-export default class EffectToJsonMapper extends RequirementToJsonMapper {
- override mapTo(source: Effect): EffectJson {
- return { ...super.mapTo(source) };
- }
-
- override mapFrom(target: EffectJson): Effect {
- return new Effect({ ...target });
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/EnvironmentComponentToJsonMapper.ts b/modules/environment/mappers/EnvironmentComponentToJsonMapper.ts
deleted file mode 100644
index fe4f90d5..00000000
--- a/modules/environment/mappers/EnvironmentComponentToJsonMapper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import Component from "~/domain/Component";
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-
-export interface EnvironmentComponentJson extends RequirementJson { }
-
-export default class EnvironmentComponentToJsonMapper extends RequirementToJsonMapper {
- override mapTo(source: Component): EnvironmentComponentJson {
- return { ...super.mapTo(source) };
- }
-
- override mapFrom(target: EnvironmentComponentJson): Component {
- return new Component({ ...target });
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/EnvironmentToJsonMapper.ts b/modules/environment/mappers/EnvironmentToJsonMapper.ts
deleted file mode 100644
index a88e1c06..00000000
--- a/modules/environment/mappers/EnvironmentToJsonMapper.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import PEGSToJsonMapper, { type PEGSJson } from "~/mappers/PEGSToJsonMapper";
-import Environment from "../domain/Environment";
-import type { Uuid } from "~/domain/Uuid";
-
-export interface EnvironmentJson extends PEGSJson {
- assumptionIds: Uuid[]
- constraintIds: Uuid[]
- effectIds: Uuid[]
- invariantIds: Uuid[]
- glossaryTermIds: Uuid[]
-}
-
-export default class EnvironmentToJsonMapper extends PEGSToJsonMapper {
- override mapFrom(target: EnvironmentJson): Environment {
-
- return new Environment({
- assumptionIds: target.assumptionIds,
- constraintIds: target.constraintIds,
- effectIds: target.effectIds,
- invariantIds: target.invariantIds,
- componentIds: target.componentIds,
- id: target.id,
- limitationIds: target.limitationIds,
- solutionId: target.solutionId,
- glossaryTermIds: target.glossaryTermIds
- });
- }
-
- override mapTo(source: Environment): EnvironmentJson {
- return {
- ...super.mapTo(source as any),
- assumptionIds: source.assumptionIds,
- constraintIds: source.constraintIds,
- effectIds: source.effectIds,
- invariantIds: source.invariantIds,
- glossaryTermIds: source.glossaryTermIds
- };
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/GlossaryTermToJsonMapper.ts b/modules/environment/mappers/GlossaryTermToJsonMapper.ts
deleted file mode 100644
index 423c7fd4..00000000
--- a/modules/environment/mappers/GlossaryTermToJsonMapper.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import GlossaryTerm from "../domain/GlossaryTerm";
-
-export interface GlossaryTermJson extends RequirementJson {
-
-}
-
-export default class GlossaryTermToJsonMapper extends RequirementToJsonMapper {
- override mapTo(source: GlossaryTerm): GlossaryTermJson {
- return { ...super.mapTo(source) };
- }
-
- override mapFrom(target: GlossaryTermJson): GlossaryTerm {
- return new GlossaryTerm({ ...target });
- }
-}
\ No newline at end of file
diff --git a/modules/environment/mappers/InvariantToJsonMapper.ts b/modules/environment/mappers/InvariantToJsonMapper.ts
deleted file mode 100644
index ebddc754..00000000
--- a/modules/environment/mappers/InvariantToJsonMapper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Invariant from "../domain/Invariant";
-
-export interface InvariantJson extends RequirementJson { }
-
-export default class InvariantToJsonMapper extends RequirementToJsonMapper {
- override mapTo(source: Invariant): InvariantJson {
- return { ...super.mapTo(source) };
- }
-
- override mapFrom(target: InvariantJson): Invariant {
- return new Invariant({ ...target });
- }
-}
\ No newline at end of file
diff --git a/modules/environment/ui/pages/Assumptions.vue b/modules/environment/ui/pages/Assumptions.vue
index 06ed07b1..30ce254c 100644
--- a/modules/environment/ui/pages/Assumptions.vue
+++ b/modules/environment/ui/pages/Assumptions.vue
@@ -1,42 +1,23 @@
diff --git a/modules/environment/ui/pages/Components.vue b/modules/environment/ui/pages/Components.vue
index 48750717..cf5ca169 100644
--- a/modules/environment/ui/pages/Components.vue
+++ b/modules/environment/ui/pages/Components.vue
@@ -2,41 +2,22 @@
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
-import EnvironmentRepository from '../../data/EnvironmentRepository';
-import EnvironmentComponentRepository from '../../data/EnvironmentComponentRepository';
-import GetSolutionBySlugUseCase from '~/modules/solution/application/GetSolutionBySlugUseCase';
-import GetEnvironmentBySolutionIdUseCase from '../../application/GetEnvironmentBySolutionIdUseCase';
-import GetEnvironmentComponentsUseCase from '../../application/GetEnvironmentComponentsUseCase';
-import CreateEnvironmentComponentUseCase from '../../application/CreateEnvironmentComponentUseCase';
-import UpdateEnvironmentComponentUseCase from '../../application/UpdateEnvironmentComponentUseCase';
-import DeleteEnvironmentComponentUseCase from '../../application/DeleteEnvironmentComponentUseCase';
import type Component from '~/domain/Component';
+import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
+import ComponentRepository from '~/data/ComponentRepository';
+import ComponentInteractor from '~/application/ComponentInteractor';
-useHead({
- title: 'Components'
-})
+useHead({ title: 'Components' })
const router = useRouter(),
route = useRoute(),
slug = route.params.solutionSlug as string,
- solutionRepository = new SolutionRepository(),
- environmentRepository = new EnvironmentRepository(),
- componentRepository = new EnvironmentComponentRepository(),
- getSolutionBySlugUseCase = new GetSolutionBySlugUseCase(solutionRepository),
- solution = await getSolutionBySlugUseCase.execute(slug),
- getEnvironmentBySolutionIdUseCase = new GetEnvironmentBySolutionIdUseCase(environmentRepository),
- environment = solution?.id && await getEnvironmentBySolutionIdUseCase.execute(solution.id),
- getComponentsUseCase = new GetEnvironmentComponentsUseCase(componentRepository),
- createComponentUseCase = new CreateEnvironmentComponentUseCase(environmentRepository, componentRepository),
- updateComponentUseCase = new UpdateEnvironmentComponentUseCase(componentRepository),
- deleteComponentUseCase = new DeleteEnvironmentComponentUseCase(environmentRepository, componentRepository);
+ solutionInteractor = new SolutionInteractor(new SolutionRepository()),
+ componentInteractor = new ComponentInteractor(new ComponentRepository()),
+ solution = (await solutionInteractor.getAll({ slug }))[0]
-if (!solution) {
+if (!solution)
router.push({ name: 'Solutions' });
-} else {
- if (!environment)
- router.push({ name: 'Environment', params: { solutionSlug: slug } });
-}
type ComponentViewModel = Pick;
@@ -44,7 +25,7 @@ const components = ref([]),
emptyComponent = { id: emptyUuid, name: '', statement: '' };
onMounted(async () => {
- components.value = await getComponentsUseCase.execute(environment!.id) ?? []
+ components.value = await componentInteractor.getAll({ solutionId: solution.id })
})
const filters = ref({
@@ -53,24 +34,29 @@ const filters = ref({
});
const onCreate = async (data: ComponentViewModel) => {
- const newId = await createComponentUseCase.execute({
- parentId: environment!.id,
- solutionId: solution!.id,
- name: data.name,
- statement: data.statement
+ const newId = await componentInteractor.create({
+ ...data,
+ solutionId: solution.id,
+ parentComponentId: emptyUuid,
+ property: ''
})
- components.value = await getComponentsUseCase.execute(environment!.id) ?? []
+ components.value = await componentInteractor.getAll({ solutionId: solution.id })
}
const onDelete = async (id: Uuid) => {
- await deleteComponentUseCase.execute(id)
- components.value = await getComponentsUseCase.execute(environment!.id) ?? []
+ await componentInteractor.delete(id)
+ components.value = await componentInteractor.getAll({ solutionId: solution.id })
}
const onUpdate = async (data: ComponentViewModel) => {
- await updateComponentUseCase.execute(data)
- components.value = await getComponentsUseCase.execute(environment!.id) ?? []
+ await componentInteractor.update({
+ ...data,
+ solutionId: solution.id,
+ parentComponentId: emptyUuid,
+ property: ''
+ })
+ components.value = await componentInteractor.getAll({ solutionId: solution.id })
}
diff --git a/modules/environment/ui/pages/Constraints.vue b/modules/environment/ui/pages/Constraints.vue
index d3f41995..a42cb17e 100644
--- a/modules/environment/ui/pages/Constraints.vue
+++ b/modules/environment/ui/pages/Constraints.vue
@@ -1,80 +1,68 @@
@@ -96,15 +84,17 @@ const onUpdate = async (data: ConstraintViewModel) => {
-
+
-
+
- {{ data[field] }}
+ {{ constraintCategories.find(o => o.id === data[field])?.name }}
-
+
diff --git a/modules/environment/ui/pages/Effects.vue b/modules/environment/ui/pages/Effects.vue
index 3e4462f5..4e757bb4 100644
--- a/modules/environment/ui/pages/Effects.vue
+++ b/modules/environment/ui/pages/Effects.vue
@@ -2,41 +2,22 @@
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
-import EnvironmentRepository from '../../data/EnvironmentRepository';
import EffectRepository from '../../data/EffectRepository';
-import GetSolutionBySlugUseCase from '~/modules/solution/application/GetSolutionBySlugUseCase';
-import GetEnvironmentBySolutionIdUseCase from '../../application/GetEnvironmentBySolutionIdUseCase';
-import GetEffectsUseCase from '../../application/GetEffectsUseCase';
-import CreateEffectUseCase from '../../application/CreateEffectUseCase';
-import UpdateEffectUseCase from '../../application/UpdateEffectUseCase';
-import DeleteEffectUseCase from '../../application/DeleteEffectUseCase';
import type Effect from '../../domain/Effect';
+import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
+import EffectInteractor from '../../application/EffectInteractor';
-useHead({
- title: 'Effects'
-})
+useHead({ title: 'Effects' })
const router = useRouter(),
route = useRoute(),
slug = route.params.solutionSlug as string,
- solutionRepository = new SolutionRepository(),
- environmentRepository = new EnvironmentRepository(),
- effectRepository = new EffectRepository(),
- getSolutionBySlugUseCase = new GetSolutionBySlugUseCase(solutionRepository),
- solution = await getSolutionBySlugUseCase.execute(slug),
- getEnvironmentBySolutionIdUseCase = new GetEnvironmentBySolutionIdUseCase(environmentRepository),
- environment = solution?.id && await getEnvironmentBySolutionIdUseCase.execute(solution.id),
- getEffectsUseCase = new GetEffectsUseCase(effectRepository),
- createEffectUseCase = new CreateEffectUseCase(environmentRepository, effectRepository),
- updateEffectUseCase = new UpdateEffectUseCase(effectRepository),
- deleteEffectUseCase = new DeleteEffectUseCase(environmentRepository, effectRepository);
+ solutionInteractor = new SolutionInteractor(new SolutionRepository()),
+ solution = (await solutionInteractor.getAll({ slug }))[0],
+ effectInteractor = new EffectInteractor(new EffectRepository())
-if (!solution) {
+if (!solution)
router.push({ name: 'Solutions' });
-} else {
- if (!environment)
- router.push({ name: 'Environment', params: { solutionSlug: slug } });
-}
type EffectViewModel = Pick;
@@ -44,7 +25,7 @@ const effects = ref([]),
emptyEffect = { id: emptyUuid, name: '', statement: '' }
onMounted(async () => {
- effects.value = await getEffectsUseCase.execute(environment!.id) ?? []
+ effects.value = await effectInteractor.getAll({ solutionId: solution!.id })
})
const filters = ref({
@@ -53,29 +34,31 @@ const filters = ref({
});
const onCreate = async (data: EffectViewModel) => {
- const newId = await createEffectUseCase.execute({
- parentId: environment!.id,
- solutionId: solution!.id,
+ const newId = await effectInteractor.create({
name: data.name,
- statement: data.statement
+ statement: data.statement,
+ solutionId: solution!.id,
+ property: ''
})
- effects.value = await getEffectsUseCase.execute(environment!.id) ?? []
+ effects.value = await effectInteractor.getAll({ solutionId: solution!.id })
}
const onUpdate = async (data: EffectViewModel) => {
- await updateEffectUseCase.execute({
+ await effectInteractor.update({
id: data.id,
name: data.name,
- statement: data.statement
+ statement: data.statement,
+ solutionId: solution!.id,
+ property: ''
})
- effects.value = await getEffectsUseCase.execute(environment!.id) ?? []
+ effects.value = await effectInteractor.getAll({ solutionId: solution!.id })
}
const onDelete = async (id: Uuid) => {
- effects.value = effects.value.filter(o => o.id !== id)
- await deleteEffectUseCase.execute(id)
+ await effectInteractor.delete(id)
+ effects.value = await effectInteractor.getAll({ solutionId: solution!.id })
}
diff --git a/modules/environment/ui/pages/Glossary.vue b/modules/environment/ui/pages/Glossary.vue
index 013e5b7a..63828a9e 100644
--- a/modules/environment/ui/pages/Glossary.vue
+++ b/modules/environment/ui/pages/Glossary.vue
@@ -1,42 +1,24 @@
diff --git a/modules/environment/ui/pages/Index.vue b/modules/environment/ui/pages/Index.vue
index 4e13abbf..a9e65ff5 100644
--- a/modules/environment/ui/pages/Index.vue
+++ b/modules/environment/ui/pages/Index.vue
@@ -1,44 +1,17 @@
diff --git a/modules/goals/application/CreateGoalsUseCase.ts b/modules/goals/application/CreateGoalsUseCase.ts
deleted file mode 100644
index 5c6ad43f..00000000
--- a/modules/goals/application/CreateGoalsUseCase.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import Goals from "../domain/Goals";
-
-export default class CreateGoalsUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- return await this.repository.add(new Goals({
- id: crypto.randomUUID(),
- solutionId,
- goals: [],
- componentIds: [],
- limitationIds: [],
- obstacles: [],
- outcomes: [],
- stakeholders: []
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/CreateLimitUseCase.ts b/modules/goals/application/CreateLimitUseCase.ts
deleted file mode 100644
index 2ee7733d..00000000
--- a/modules/goals/application/CreateLimitUseCase.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Goals from "../domain/Goals";
-import Limit from "~/domain/Limit";
-
-type In = Pick
-
-export default class CreateLimitUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly limitRepository: Repository
- ) { super() }
-
- async execute(
- { parentId, solutionId, name, statement }: In
- ): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- const limitId = await this.limitRepository.add(new Limit({
- id: crypto.randomUUID(),
- parentId,
- solutionId,
- name,
- statement,
- property: ''
- }))
-
- goals.limitationIds.push(limitId)
-
- await this.goalsRepository.update(goals)
-
- return limitId
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/CreateMissionUseCase.ts b/modules/goals/application/CreateMissionUseCase.ts
deleted file mode 100644
index 85f0ee79..00000000
--- a/modules/goals/application/CreateMissionUseCase.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type Goals from "../domain/Goals";
-import Goal from "../domain/Goal";
-
-type In = Pick
-
-export default class CreateMissionUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly goalRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, statement }: In): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- const missionId = await this.goalRepository.add(new Goal({
- id: crypto.randomUUID(),
- parentId: parentId,
- solutionId,
- name: 'Mission',
- statement,
- property: ''
- }))
-
- goals.goals.push(missionId)
-
- await this.goalsRepository.update(goals)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/CreateObstacleUseCase.ts b/modules/goals/application/CreateObstacleUseCase.ts
deleted file mode 100644
index 965a3ae6..00000000
--- a/modules/goals/application/CreateObstacleUseCase.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Goals from "../domain/Goals";
-import Obstacle from "../domain/Obstacle";
-
-type In = Pick
-
-export default class CreateObstacleUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly obstacleRepository: Repository
- ) { super() }
-
- async execute(
- { parentId, solutionId, name, statement }: In
- ): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- const obstacleId = await this.obstacleRepository.add(new Obstacle({
- id: crypto.randomUUID(),
- parentId,
- solutionId,
- name,
- statement,
- property: ''
- }))
-
- goals.obstacles.push(obstacleId)
-
- await this.goalsRepository.update(goals)
-
- return obstacleId
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/CreateOutcomeUseCase.ts b/modules/goals/application/CreateOutcomeUseCase.ts
deleted file mode 100644
index 402f8f4f..00000000
--- a/modules/goals/application/CreateOutcomeUseCase.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Goals from "../domain/Goals";
-import Outcome from "../domain/Outcome";
-
-type In = Pick
-
-export default class CreateOutcomeUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly outcomeRepository: Repository,
- ) { super() }
-
- async execute(
- { parentId, solutionId, name, statement }: In
- ): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- const outcomeId = await this.outcomeRepository.add(new Outcome({
- id: crypto.randomUUID(),
- parentId,
- solutionId,
- name,
- statement,
- property: ''
- }))
-
- goals.outcomes.push(outcomeId)
-
- await this.goalsRepository.update(goals)
-
- return outcomeId
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/CreateStakeholderUseCase.ts b/modules/goals/application/CreateStakeholderUseCase.ts
deleted file mode 100644
index 3358c25f..00000000
--- a/modules/goals/application/CreateStakeholderUseCase.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import Stakeholder from "../domain/Stakeholder";
-import type Repository from "~/application/Repository";
-import type Goals from "../domain/Goals";
-
-type In = Pick
-
-export default class CreateStakeholderUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly stakeholderRepository: Repository
- ) { super() }
-
- async execute({ parentId, solutionId, ...props }: In): Promise {
- let goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- const stakeholderId = await this.stakeholderRepository.add(
- new Stakeholder({
- id: crypto.randomUUID(),
- parentId,
- solutionId,
- name: props.name,
- statement: props.statement,
- availability: props.availability,
- influence: props.influence,
- segmentation: props.segmentation,
- property: ''
- })
- )
-
- goals.stakeholders.push(stakeholderId)
-
- await this.goalsRepository.update(goals)
-
- return stakeholderId
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/DeleteLimitUseCase.ts b/modules/goals/application/DeleteLimitUseCase.ts
deleted file mode 100644
index 6e720522..00000000
--- a/modules/goals/application/DeleteLimitUseCase.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type Goals from "../domain/Goals";
-import type Limit from "~/domain/Limit";
-
-type In = Pick
-
-export default class DeleteLimitUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly limitRepository: Repository
- ) { super() }
-
- async execute({ parentId, id }: In): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- goals.limitationIds = goals.limitationIds.filter(lid => lid !== id)
-
- await this.goalsRepository.update(goals)
- await this.limitRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/DeleteObstacleUseCase.ts b/modules/goals/application/DeleteObstacleUseCase.ts
deleted file mode 100644
index 3e011d06..00000000
--- a/modules/goals/application/DeleteObstacleUseCase.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type Goals from "../domain/Goals";
-import type Obstacle from "../domain/Obstacle";
-
-type In = Pick
-
-export default class DeleteObstacleUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly obstacleRepository: Repository
- ) { super() }
-
- async execute({ parentId, id }: In): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- goals.obstacles = goals.obstacles.filter(uid => uid !== id)
-
- await this.goalsRepository.update(goals)
- await this.obstacleRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/DeleteOutcomeUseCase.ts b/modules/goals/application/DeleteOutcomeUseCase.ts
deleted file mode 100644
index ac40cf7e..00000000
--- a/modules/goals/application/DeleteOutcomeUseCase.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Outcome from "../domain/Outcome";
-import type Repository from "~/application/Repository";
-import type Goals from "../domain/Goals";
-
-type In = Pick
-
-export default class DeleteOutcomeUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly outcomeRepository: Repository
- ) { super() }
-
- async execute({ parentId, id }: In): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- goals.outcomes = goals.outcomes.filter(oid => oid !== id)
-
- await this.goalsRepository.update(goals)
- await this.outcomeRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/DeleteStakeholderUseCase.ts b/modules/goals/application/DeleteStakeholderUseCase.ts
deleted file mode 100644
index deaff2ba..00000000
--- a/modules/goals/application/DeleteStakeholderUseCase.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Goals from "../domain/Goals";
-import type Repository from "~/application/Repository";
-import type Stakeholder from "../domain/Stakeholder";
-
-type In = Pick
-
-export default class DeleteStakeholderUseCase extends UseCase {
- constructor(
- readonly goalsRepository: Repository,
- readonly stakeholderRepository: Repository
- ) { super() }
-
- async execute({ parentId, id }: In): Promise {
- const goals = await this.goalsRepository.get(parentId)
-
- if (!goals)
- throw new Error('Goals not found')
-
- goals.stakeholders = goals.stakeholders.filter(sid => sid !== id)
-
- await this.goalsRepository.update(goals)
- await this.stakeholderRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/EpicInteractor.ts b/modules/goals/application/EpicInteractor.ts
deleted file mode 100644
index c43eb74e..00000000
--- a/modules/goals/application/EpicInteractor.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import Interactor from "~/application/Interactor"
-import Epic from "../domain/Epic"
-import type { Uuid } from "~/domain/Uuid"
-
-type In = Pick;
-
-export default class EpicInteractor extends Interactor {
- async create({ parentId, solutionId, name, statement, primaryActorId }: Omit): Promise {
- return await this.repository.add(new Epic({
- id: crypto.randomUUID(),
- primaryActorId,
- solutionId,
- parentId,
- name,
- statement,
- property: ''
- }))
- }
-
- async delete(id: Uuid): Promise {
- await this.repository.delete(id)
- }
-
- async getAll(solutionId: Uuid): Promise {
- return await this.repository.getAll(
- behavior => behavior.solutionId === solutionId
- )
- }
-
- async getByParentId(parentId: Uuid): Promise {
- return await this.repository.getAll(
- behavior => behavior.parentId === parentId
- )
- }
-
- async update({ id, name, statement, solutionId, parentId, primaryActorId }: In): Promise {
- await this.repository.update(new Epic({
- id,
- name,
- statement,
- solutionId,
- parentId,
- primaryActorId,
- property: ''
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetGoalsBySolutionIdUseCase.ts b/modules/goals/application/GetGoalsBySolutionIdUseCase.ts
deleted file mode 100644
index f26525a6..00000000
--- a/modules/goals/application/GetGoalsBySolutionIdUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Repository from "~/application/Repository";
-import type Goals from "../domain/Goals";
-import type { Uuid } from "~/domain/Uuid";
-
-export default class GetGoalsBySolutionIdUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- const goals = await this.repository.getAll(g => g.solutionId === solutionId)
-
- return goals[0]
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetGoalsUseCase.ts b/modules/goals/application/GetGoalsUseCase.ts
deleted file mode 100644
index e4126bd9..00000000
--- a/modules/goals/application/GetGoalsUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Goals from "../domain/Goals";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-
-export default class GetGoalsUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(goalsId: Uuid): Promise {
- return await this.repository.get(goalsId)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetLimitsUseCase.ts b/modules/goals/application/GetLimitsUseCase.ts
deleted file mode 100644
index f076aa3b..00000000
--- a/modules/goals/application/GetLimitsUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-import type Limit from "~/domain/Limit";
-
-export default class GetLimitsUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(goalsId: Uuid): Promise {
- return await this.repository.getAll(o => o.parentId === goalsId)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetObstaclesUseCase.ts b/modules/goals/application/GetObstaclesUseCase.ts
deleted file mode 100644
index b01ddf5b..00000000
--- a/modules/goals/application/GetObstaclesUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Obstacle from "../domain/Obstacle";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-
-export default class GetObstaclesUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(goalsId: Uuid): Promise {
- return await this.repository.getAll(o => o.parentId === goalsId)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetOutcomesUseCase.ts b/modules/goals/application/GetOutcomesUseCase.ts
deleted file mode 100644
index 281c733b..00000000
--- a/modules/goals/application/GetOutcomesUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Repository from "~/application/Repository"
-import type Outcome from "../domain/Outcome"
-
-export default class GetOutcomesUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(goalsId: Uuid): Promise {
- return await this.repository.getAll((outcome: Outcome) => outcome.parentId === goalsId)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetRationaleUseCase.ts b/modules/goals/application/GetRationaleUseCase.ts
deleted file mode 100644
index 5d1da66c..00000000
--- a/modules/goals/application/GetRationaleUseCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import type Repository from "~/application/Repository"
-import type { Uuid } from "~/domain/Uuid"
-import UseCase from "~/application/UseCase"
-import type Goal from "../domain/Goal"
-
-type Out = {
- vision: string,
- mission: string,
- situation: string,
- objective: string
-}
-
-export default class GetRationaleUseCase extends UseCase {
- constructor(
- readonly goalRepository: Repository
- ) { super() }
-
- async execute(goalsId: Uuid): Promise {
- const gr = this.goalRepository
-
- const [vision, mission, situation, objective] = await Promise.all([
- gr.getAll(g => g.parentId === goalsId && g.name === 'Vision'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Mission'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Situation'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Objective')
- ])
-
- return {
- vision: vision[0]?.statement || '',
- mission: mission[0]?.statement || '',
- situation: situation[0]?.statement || '',
- objective: objective[0]?.statement || ''
- }
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetStakeHolderByIdUseCase.ts b/modules/goals/application/GetStakeHolderByIdUseCase.ts
deleted file mode 100644
index e569c9e1..00000000
--- a/modules/goals/application/GetStakeHolderByIdUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Stakeholder from "../domain/Stakeholder"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-
-export default class GetStakeHolderByIdUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(id: Uuid): Promise {
- return await this.repository.get(id)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GetStakeHoldersUseCase.ts b/modules/goals/application/GetStakeHoldersUseCase.ts
deleted file mode 100644
index b410bd0a..00000000
--- a/modules/goals/application/GetStakeHoldersUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Uuid } from "~/domain/Uuid"
-import type Stakeholder from "../domain/Stakeholder"
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-
-export default class GetStakeHoldersUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(goalsId: Uuid): Promise {
- return await this.repository.getAll(s => s.parentId === goalsId)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/GoalInteractor.ts b/modules/goals/application/GoalInteractor.ts
new file mode 100644
index 00000000..1ca989c8
--- /dev/null
+++ b/modules/goals/application/GoalInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Goal from "../domain/Goal";
+
+export default class GoalInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/LimitInteractor.ts b/modules/goals/application/LimitInteractor.ts
new file mode 100644
index 00000000..159b238f
--- /dev/null
+++ b/modules/goals/application/LimitInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Limit from "../domain/Limit";
+
+export default class LimitInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/ObstacleInteractor.ts b/modules/goals/application/ObstacleInteractor.ts
new file mode 100644
index 00000000..453c80c1
--- /dev/null
+++ b/modules/goals/application/ObstacleInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Obstacle from "../domain/Obstacle";
+
+export default class ObstacleInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/OutcomeInteractor.ts b/modules/goals/application/OutcomeInteractor.ts
new file mode 100644
index 00000000..71ca40c1
--- /dev/null
+++ b/modules/goals/application/OutcomeInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Outcome from "../domain/Outcome";
+
+export default class OutcomeInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/StakeholderCategoryInteractor.ts b/modules/goals/application/StakeholderCategoryInteractor.ts
new file mode 100644
index 00000000..8f1744b1
--- /dev/null
+++ b/modules/goals/application/StakeholderCategoryInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type StakeholderCategory from "../domain/StakeholderCategory";
+
+export default class StakeholderCategoryInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/StakeholderInteractor.ts b/modules/goals/application/StakeholderInteractor.ts
new file mode 100644
index 00000000..f98eeb21
--- /dev/null
+++ b/modules/goals/application/StakeholderInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Stakeholder from "../domain/Stakeholder";
+
+export default class StakeholderInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/StakeholderSegmentationInteractor.ts b/modules/goals/application/StakeholderSegmentationInteractor.ts
new file mode 100644
index 00000000..3ab8242d
--- /dev/null
+++ b/modules/goals/application/StakeholderSegmentationInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type StakeholderSegmentation from "../domain/StakeholderSegmentation";
+
+export default class StakeholderSegmentationInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/goals/application/UpdateLimitUseCase.ts b/modules/goals/application/UpdateLimitUseCase.ts
deleted file mode 100644
index 124633e2..00000000
--- a/modules/goals/application/UpdateLimitUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Repository from "~/application/Repository";
-import type Limit from "~/domain/Limit";
-
-type In = Pick
-
-export default class UpdateLimitUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super();
- }
-
- async execute({ id, name, statement }: In): Promise {
- const goalsLimit = await this.repository.get(id)
-
- if (!goalsLimit)
- throw new Error('GoalsLimit not found')
-
- Object.assign(goalsLimit, { name, statement })
-
- await this.repository.update(goalsLimit)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/UpdateObstacleUseCase.ts b/modules/goals/application/UpdateObstacleUseCase.ts
deleted file mode 100644
index f3b1d45e..00000000
--- a/modules/goals/application/UpdateObstacleUseCase.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Repository from "~/application/Repository";
-import type Obstacle from "../domain/Obstacle";
-
-type In = Pick
-
-export default class UpdateObstacleUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super();
- }
-
- async execute({ id, name, statement }: In): Promise {
- const obstacle = await this.repository.get(id)
-
- if (!obstacle)
- throw new Error('Obstacle not found')
-
- Object.assign(obstacle, { name, statement })
-
- await this.repository.update(obstacle)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/UpdateOutcomeUseCase.ts b/modules/goals/application/UpdateOutcomeUseCase.ts
deleted file mode 100644
index 6760271c..00000000
--- a/modules/goals/application/UpdateOutcomeUseCase.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Outcome from "../domain/Outcome";
-import type Repository from "~/application/Repository";
-
-type In = Pick
-
-export default class UpdateOutcomeUseCase extends UseCase {
- constructor(
- readonly repository: Repository
- ) { super() }
-
- async execute(
- { id, name, statement }: In
- ): Promise {
- const outcome = await this.repository.get(id)
-
- if (!outcome)
- throw new Error('Outcome not found')
-
- Object.assign(outcome, { name, statement })
-
- await this.repository.update(outcome)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/UpdateRationaleUseCase.ts b/modules/goals/application/UpdateRationaleUseCase.ts
deleted file mode 100644
index 8a406f65..00000000
--- a/modules/goals/application/UpdateRationaleUseCase.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import Goal from "../domain/Goal";
-
-type In = {
- solutionId: Uuid,
- goalsId: Uuid,
- visionStatement: string,
- missionStatement: string,
- situationStatement: string,
- objectiveStatement: string
-}
-
-export default class UpdateRationaleUseCase extends UseCase {
- constructor(readonly goalRepository: Repository) {
- super()
- }
-
- async execute(
- { solutionId, goalsId, missionStatement, objectiveStatement, situationStatement, visionStatement }: In
- ): Promise {
- const gr = this.goalRepository
-
- const [vision, mission, situation, objective, outcomes] = await Promise.all([
- gr.getAll(g => g.parentId === goalsId && g.name === 'Vision'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Mission'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Situation'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Objective'),
- gr.getAll(g => g.parentId === goalsId && g.name === 'Outcomes')
- ])
-
- if (vision.length === 0) {
- await gr.add(new Goal({
- id: crypto.randomUUID(),
- parentId: goalsId,
- solutionId,
- name: 'Vision',
- statement: visionStatement,
- property: ''
- }))
- } else {
- vision[0].statement = visionStatement
- await gr.update(vision[0])
- }
-
- if (mission.length === 0) {
- await gr.add(new Goal({
- id: crypto.randomUUID(),
- parentId: goalsId,
- solutionId,
- name: 'Mission',
- statement: missionStatement,
- property: ''
- }))
- } else {
- mission[0].statement = missionStatement
- await gr.update(mission[0])
- }
-
- if (situation.length === 0) {
- await gr.add(new Goal({
- id: crypto.randomUUID(),
- parentId: goalsId,
- solutionId,
- name: 'Situation',
- statement: situationStatement,
- property: ''
- }))
- } else {
- situation[0].statement = situationStatement
- await gr.update(situation[0])
- }
-
- if (objective.length === 0) {
- await gr.add(new Goal({
- id: crypto.randomUUID(),
- parentId: goalsId,
- solutionId,
- name: 'Objective',
- statement: objectiveStatement,
- property: ''
- }))
- } else {
- objective[0].statement = objectiveStatement
- await gr.update(objective[0])
- }
-
- if (outcomes.length === 0) {
- await gr.add(new Goal({
- id: crypto.randomUUID(),
- parentId: goalsId,
- solutionId,
- name: 'Outcomes',
- statement: '',
- property: ''
- }))
- }
- }
-}
\ No newline at end of file
diff --git a/modules/goals/application/UpdateStakeHolderUseCase.ts b/modules/goals/application/UpdateStakeHolderUseCase.ts
deleted file mode 100644
index a106c3e1..00000000
--- a/modules/goals/application/UpdateStakeHolderUseCase.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type { Properties } from "~/domain/Properties";
-import type Stakeholder from "../domain/Stakeholder";
-import type Repository from "~/application/Repository";
-
-type In = Properties>
-
-export default class UpdateStakeHolderUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super();
- }
-
- async execute({ id, ...props }: In): Promise {
- const stakeholder = await this.repository.get(id)
-
- if (!stakeholder)
- throw new Error('Stakeholder not found')
-
- Object.assign(stakeholder, props)
-
- await this.repository.update(stakeholder)
- }
-}
\ No newline at end of file
diff --git a/modules/goals/data/EpicRepository.ts b/modules/goals/data/EpicRepository.ts
deleted file mode 100644
index 44cf39ce..00000000
--- a/modules/goals/data/EpicRepository.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import type Epic from "../domain/Epic";
-import EpicToJsonMapper from "../mappers/EpicToJsonMapper";
-
-const { serializationVersion } = useAppConfig()
-
-export default class EpicRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'epic',
- mapper: new EpicToJsonMapper(serializationVersion)
- })
- }
-}
\ No newline at end of file
diff --git a/modules/goals/data/GoalRepository.ts b/modules/goals/data/GoalRepository.ts
index 664fe240..13e37923 100644
--- a/modules/goals/data/GoalRepository.ts
+++ b/modules/goals/data/GoalRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import GoalToJsonMapper from "../mappers/GoalToJsonMapper";
-import StorageRepository from "~/data/StorageRepository";
-import type Goal from "../domain/Goal";
+import Goal from "../domain/Goal";
+import PGLiteRepository from "~/data/PGLiteRepository";
-const { serializationVersion } = useAppConfig()
-
-export default class GoalRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'goal',
- mapper: new GoalToJsonMapper(serializationVersion)
- })
- }
+export default class GoalRepository extends PGLiteRepository {
+ constructor() { super('cathedral.goal', Goal) }
}
\ No newline at end of file
diff --git a/modules/goals/data/GoalsRepository.ts b/modules/goals/data/GoalsRepository.ts
deleted file mode 100644
index 5cf849d1..00000000
--- a/modules/goals/data/GoalsRepository.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type Goals from "../domain/Goals";
-import type { Properties } from "~/domain/Properties";
-import GoalsToJsonMapper from "../mappers/GoalsToJsonMapper";
-import StorageRepository from "~/data/StorageRepository.js";
-
-const { serializationVersion } = useAppConfig()
-
-export default class GoalsRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'goals',
- mapper: new GoalsToJsonMapper(serializationVersion)
- })
- }
-}
\ No newline at end of file
diff --git a/modules/goals/data/LimitRepository.ts b/modules/goals/data/LimitRepository.ts
index 19b76184..01bef26e 100644
--- a/modules/goals/data/LimitRepository.ts
+++ b/modules/goals/data/LimitRepository.ts
@@ -1,16 +1,7 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository";
-import type Goal from "../domain/Goal";
-import LimitToJsonMapper from "../mappers/LimitToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Limit from "../domain/Limit";
-const { serializationVersion } = useAppConfig()
-
-export default class LimitRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'limit',
- mapper: new LimitToJsonMapper(serializationVersion)
- })
- }
+export default class LimitRepository extends PGLiteRepository {
+ // "limit" is a reserved word in SQL, so we need to use quotes to escape it
+ constructor() { super(`cathedral."limit"`, Limit) }
}
\ No newline at end of file
diff --git a/modules/goals/data/ObstacleRepository.ts b/modules/goals/data/ObstacleRepository.ts
index 8afc87a3..09c34394 100644
--- a/modules/goals/data/ObstacleRepository.ts
+++ b/modules/goals/data/ObstacleRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import type Obstacle from "../domain/Obstacle";
-import ObstacleToJsonMapper from "../mappers/ObstacleToJsonMapper";
+import Obstacle from "../domain/Obstacle";
+import PGLiteRepository from "~/data/PGLiteRepository";
-const { serializationVersion } = useAppConfig()
-
-export default class ObstacleRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'obstacle',
- mapper: new ObstacleToJsonMapper(serializationVersion)
- })
- }
+export default class ObstacleRepository extends PGLiteRepository {
+ constructor() { super('cathedral.obstacle', Obstacle) }
}
\ No newline at end of file
diff --git a/modules/goals/data/OutcomeRepository.ts b/modules/goals/data/OutcomeRepository.ts
index c569c26a..ed0d31aa 100644
--- a/modules/goals/data/OutcomeRepository.ts
+++ b/modules/goals/data/OutcomeRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import type Outcome from "../domain/Outcome";
-import OutcomeToJsonMapper from "../mappers/OutcomeToJsonMapper";
+import Outcome from "../domain/Outcome";
+import PGLiteRepository from "~/data/PGLiteRepository";
-const { serializationVersion } = useAppConfig()
-
-export default class OutcomeRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'outcome',
- mapper: new OutcomeToJsonMapper(serializationVersion)
- })
- }
+export default class OutcomeRepository extends PGLiteRepository {
+ constructor() { super('cathedral.outcome', Outcome) }
}
\ No newline at end of file
diff --git a/modules/goals/data/StakeholderCategoryRepository.ts b/modules/goals/data/StakeholderCategoryRepository.ts
new file mode 100644
index 00000000..3aa076b4
--- /dev/null
+++ b/modules/goals/data/StakeholderCategoryRepository.ts
@@ -0,0 +1,6 @@
+import PGLiteRepository from "~/data/PGLiteRepository";
+import StakeholderCategory from "../domain/StakeholderCategory";
+
+export default class StakeholderCategoryRepository extends PGLiteRepository {
+ constructor() { super('cathedral.stakeholder_category', StakeholderCategory) }
+}
\ No newline at end of file
diff --git a/modules/goals/data/StakeholderRepository.ts b/modules/goals/data/StakeholderRepository.ts
index eac661a6..6ba6756f 100644
--- a/modules/goals/data/StakeholderRepository.ts
+++ b/modules/goals/data/StakeholderRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import type Stakeholder from "../domain/Stakeholder";
-import StakeholderToJsonMapper from "../mappers/StakeholderToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Stakeholder from "../domain/Stakeholder";
-const { serializationVersion } = useAppConfig()
-
-export default class StakeholderRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'stakeholder',
- mapper: new StakeholderToJsonMapper(serializationVersion)
- })
- }
+export default class StakeholderRepository extends PGLiteRepository {
+ constructor() { super('cathedral.stakeholder', Stakeholder) }
}
\ No newline at end of file
diff --git a/modules/goals/data/StakeholderSegmentationRepository.ts b/modules/goals/data/StakeholderSegmentationRepository.ts
new file mode 100644
index 00000000..eec37e72
--- /dev/null
+++ b/modules/goals/data/StakeholderSegmentationRepository.ts
@@ -0,0 +1,6 @@
+import PGLiteRepository from "~/data/PGLiteRepository";
+import StakeholderSegmentation from "../domain/StakeholderSegmentation";
+
+export default class StakeholderSegmentationRepository extends PGLiteRepository {
+ constructor() { super('cathedral.stakeholder_segmentation', StakeholderSegmentation) }
+}
\ No newline at end of file
diff --git a/modules/goals/domain/Epic.ts b/modules/goals/domain/Epic.ts
deleted file mode 100644
index e12154f7..00000000
--- a/modules/goals/domain/Epic.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import Scenario from "../../system/domain/Scenario";
-
-/**
- * An Epic is a collection of User Stories directed towards a common goal.
- */
-export default class Epic extends Scenario { }
\ No newline at end of file
diff --git a/domain/Limit.ts b/modules/goals/domain/Limit.ts
similarity index 64%
rename from domain/Limit.ts
rename to modules/goals/domain/Limit.ts
index 0239ce71..3c2d1d19 100644
--- a/domain/Limit.ts
+++ b/modules/goals/domain/Limit.ts
@@ -1,4 +1,4 @@
-import Requirement from "./Requirement";
+import Requirement from "../../../domain/Requirement";
/**
* Exclusion from scope of requirements
diff --git a/modules/goals/domain/Stakeholder.ts b/modules/goals/domain/Stakeholder.ts
index 17bc2577..33f1e75e 100644
--- a/modules/goals/domain/Stakeholder.ts
+++ b/modules/goals/domain/Stakeholder.ts
@@ -1,28 +1,11 @@
-import Actor from "~/domain/Actor";
+import Component from "~/domain/Component";
import type { Properties } from "~/domain/Properties";
-
-/**
- * The segmentation of a stakeholder according to their relationship with the organization
- */
-export enum StakeholderSegmentation {
- Client = 'Client',
- Vendor = 'Vendor'
-}
-
-/**
- * The category of a stakeholder according to their level of influence and availability
- */
-export enum StakeholderCategory {
- KeyStakeholder = 'Key Stakeholder',
- ShadowInfluencer = 'Shadow Influencer',
- FellowTraveler = 'Fellow Traveler',
- Observer = 'Observer'
-}
+import type { Uuid } from "~/domain/Uuid";
/**
* A human actor who may affect or be affected by a project or its associated system
*/
-export default class Stakeholder extends Actor {
+export default class Stakeholder extends Component {
static readonly INFLUENCE_MIN = 0
static readonly INFLUENCE_MAX = 100
static readonly AVAILABILITY_MIN = 0
@@ -31,12 +14,13 @@ export default class Stakeholder extends Actor {
private _influence!: number
private _availability!: number
- segmentation!: StakeholderSegmentation
+ segmentationId!: Uuid
+ categoryId!: Uuid
- constructor({ influence, availability, segmentation, ...rest }: Properties>) {
+ constructor({ influence, availability, segmentationId, categoryId, ...rest }: Properties) {
super(rest)
- Object.assign(this, { influence, availability, segmentation })
+ Object.assign(this, { influence, availability, segmentationId, categoryId })
}
get availability(): number {
@@ -48,16 +32,6 @@ export default class Stakeholder extends Actor {
this._availability = value
}
- get category(): StakeholderCategory {
- const { KeyStakeholder, ShadowInfluencer, FellowTraveler, Observer } = StakeholderCategory,
- { influence, availability } = this;
-
- return influence >= 75 && availability >= 75 ? KeyStakeholder
- : influence >= 75 && availability < 75 ? ShadowInfluencer
- : influence < 75 && availability >= 75 ? FellowTraveler
- : Observer;
- }
-
get influence(): number {
return this._influence
}
diff --git a/modules/goals/domain/StakeholderCategory.ts b/modules/goals/domain/StakeholderCategory.ts
new file mode 100644
index 00000000..782eeeed
--- /dev/null
+++ b/modules/goals/domain/StakeholderCategory.ts
@@ -0,0 +1,14 @@
+import Entity from "~/domain/Entity"
+import type { Properties } from "~/domain/Properties"
+
+/**
+ * The category of a stakeholder according to their level of influence and availability
+ */
+export default class StakeholderCategory extends Entity {
+ name: string
+
+ constructor({ name, ...rest }: Properties) {
+ super(rest)
+ this.name = name
+ }
+}
diff --git a/modules/goals/domain/StakeholderSegmentation.ts b/modules/goals/domain/StakeholderSegmentation.ts
new file mode 100644
index 00000000..02602b79
--- /dev/null
+++ b/modules/goals/domain/StakeholderSegmentation.ts
@@ -0,0 +1,14 @@
+import type { Properties } from "~/domain/Properties"
+import Entity from "~/domain/Entity"
+
+/**
+ * The segmentation of a stakeholder according to their relationship with the organization
+ */
+export default class StakeholderSegmentation extends Entity {
+ name: string
+
+ constructor({ name, ...rest }: Properties) {
+ super(rest)
+ this.name = name
+ }
+}
diff --git a/modules/goals/index.ts b/modules/goals/index.ts
index 855cf2f4..bbd01d6a 100644
--- a/modules/goals/index.ts
+++ b/modules/goals/index.ts
@@ -21,9 +21,9 @@ export default defineNuxtModule({
path: '/solution/:solutionSlug/goals/stakeholders',
file: resolve('./ui/pages/Stakeholders.vue')
}, {
- name: 'Epics',
- path: '/solution/:solutionSlug/goals/epics',
- file: resolve('./ui/pages/Epics.vue')
+ name: 'Goal Scenarios',
+ path: '/solution/:solutionSlug/goals/scenarios',
+ file: resolve('./ui/pages/Scenarios.vue')
}, {
name: 'Obstacles',
path: '/solution/:solutionSlug/goals/obstacles',
diff --git a/modules/goals/mappers/EpicToJsonMapper.ts b/modules/goals/mappers/EpicToJsonMapper.ts
deleted file mode 100644
index efd0a328..00000000
--- a/modules/goals/mappers/EpicToJsonMapper.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import ScenarioToJsonMapper, { type ScenarioJson } from "~/modules/system/mappers/ScenarioToJsonMapper";
-import Epic from "../domain/Epic";
-
-export interface EpicJson extends ScenarioJson { }
-
-export default class EpicToJsonMapper extends ScenarioToJsonMapper {
- mapFrom(target: EpicJson): Epic {
- return new Epic({ ...target })
- }
-
- mapTo(source: Epic): EpicJson {
- return {
- ...super.mapTo(source as any),
- }
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/GoalToJsonMapper.ts b/modules/goals/mappers/GoalToJsonMapper.ts
deleted file mode 100644
index 67855aa1..00000000
--- a/modules/goals/mappers/GoalToJsonMapper.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import Goal from "../domain/Goal";
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-
-export interface GoalJson extends RequirementJson { }
-
-export default class GoalToJsonMapper extends RequirementToJsonMapper {
- override mapFrom(target: GoalJson): Goal {
- return new Goal(target);
- }
-
- override mapTo(source: Goal): GoalJson {
- return {
- ...super.mapTo(source),
- };
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/GoalsToJsonMapper.ts b/modules/goals/mappers/GoalsToJsonMapper.ts
deleted file mode 100644
index e8405b64..00000000
--- a/modules/goals/mappers/GoalsToJsonMapper.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import PEGSToJsonMapper, { type PEGSJson } from "~/mappers/PEGSToJsonMapper";
-import Goals from "../domain/Goals";
-import type { Uuid } from "~/domain/Uuid";
-
-export interface GoalsJson extends PEGSJson {
- goals: Uuid[]
- obstacles: Uuid[]
- outcomes: Uuid[]
- stakeholders: Uuid[]
-}
-
-export default class GoalsToJsonMapper extends PEGSToJsonMapper {
- override mapFrom(target: GoalsJson): Goals {
- const pegs = super.mapFrom(target)
-
- return new Goals({
- id: pegs.id,
- limitationIds: pegs.limitationIds,
- outcomes: target.outcomes,
- solutionId: pegs.solutionId,
- componentIds: pegs.componentIds,
- goals: target.goals,
- obstacles: target.obstacles,
- stakeholders: target.stakeholders
- });
- }
-
- override mapTo(source: Goals): GoalsJson {
- return {
- ...super.mapTo(source as any),
- goals: source.goals,
- obstacles: source.obstacles,
- outcomes: source.outcomes,
- stakeholders: source.stakeholders
- };
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/LimitToJsonMapper.ts b/modules/goals/mappers/LimitToJsonMapper.ts
deleted file mode 100644
index f9c1121d..00000000
--- a/modules/goals/mappers/LimitToJsonMapper.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import SemVer from "~/domain/SemVer";
-import Limit from "~/domain/Limit";
-
-export interface LimitJson extends RequirementJson { }
-
-export default class LimitToJsonMapper extends RequirementToJsonMapper {
- mapFrom(target: LimitJson): Limit {
- return new Limit(target)
- }
-
- mapTo(source: Limit): LimitJson {
- return { ...super.mapTo(source as any) }
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/ObstacleToJsonMapper.ts b/modules/goals/mappers/ObstacleToJsonMapper.ts
deleted file mode 100644
index 386c7c50..00000000
--- a/modules/goals/mappers/ObstacleToJsonMapper.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import GoalToJsonMapper, { type GoalJson } from "./GoalToJsonMapper";
-import Obstacle from "../domain/Obstacle";
-
-export interface ObstacleJson extends GoalJson { }
-
-export default class ObstacleToJsonMapper extends GoalToJsonMapper {
- override mapFrom(target: ObstacleJson): Obstacle {
- return new Obstacle(target);
- }
-
- override mapTo(source: Obstacle): ObstacleJson {
- return {
- ...super.mapTo(source as any)
- };
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/OutcomeToJsonMapper.ts b/modules/goals/mappers/OutcomeToJsonMapper.ts
deleted file mode 100644
index 19bcaade..00000000
--- a/modules/goals/mappers/OutcomeToJsonMapper.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import Outcome from "../domain/Outcome";
-import SemVer from "~/domain/SemVer";
-import GoalToJsonMapper, { type GoalJson } from "./GoalToJsonMapper";
-
-export interface OutcomeJson extends GoalJson { }
-
-export default class OutcomeToJsonMapper extends GoalToJsonMapper {
- override mapFrom(target: OutcomeJson): Outcome {
- return new Outcome(target);
- }
-
- override mapTo(source: Outcome): OutcomeJson {
- return {
- ...super.mapTo(source as any)
- };
- }
-}
\ No newline at end of file
diff --git a/modules/goals/mappers/StakeholderToJsonMapper.ts b/modules/goals/mappers/StakeholderToJsonMapper.ts
deleted file mode 100644
index 7248de5b..00000000
--- a/modules/goals/mappers/StakeholderToJsonMapper.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Stakeholder, { StakeholderSegmentation } from "../domain/Stakeholder";
-
-export interface StakeholderJson extends RequirementJson {
- availability: number
- influence: number
- segmentation: string
-}
-
-export default class StakeholderToJsonMapper extends RequirementToJsonMapper {
- override mapFrom(target: StakeholderJson): Stakeholder {
- return new Stakeholder({
- ...target,
- segmentation: target.segmentation as StakeholderSegmentation,
- })
- }
-
- override mapTo(source: Stakeholder): StakeholderJson {
- const requirement = super.mapTo(source)
-
- return {
- ...requirement,
- availability: source.availability,
- influence: source.influence,
- segmentation: source.segmentation
- }
- }
-}
\ No newline at end of file
diff --git a/modules/goals/ui/pages/Epics.vue b/modules/goals/ui/pages/Epics.vue
deleted file mode 100644
index d64093f4..00000000
--- a/modules/goals/ui/pages/Epics.vue
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
- This section defines the main scenarios that the system must support to achieve the goals of the solution.
-
-
- Before you can define an Epic, you must define one or more
- Actors .
-
-
-
-
-
-
-
-
-
-
- {{ data.name }}
-
-
-
-
-
-
-
-
-
-
- {{ stakeHolders.find(s => s.id === data.primaryActorId)?.name }}
-
-
-
-
-
-
-
-
-
-
- {{ data.statement }}
-
-
-
-
-
-
-
-
- TODO: Use Case Diagram
-
-
-
\ No newline at end of file
diff --git a/modules/goals/ui/pages/Index.vue b/modules/goals/ui/pages/Index.vue
index 335a7a82..f744c646 100644
--- a/modules/goals/ui/pages/Index.vue
+++ b/modules/goals/ui/pages/Index.vue
@@ -1,51 +1,23 @@
diff --git a/modules/goals/ui/pages/Obstacles.vue b/modules/goals/ui/pages/Obstacles.vue
index f1139152..c26895f4 100644
--- a/modules/goals/ui/pages/Obstacles.vue
+++ b/modules/goals/ui/pages/Obstacles.vue
@@ -1,42 +1,23 @@
diff --git a/modules/goals/ui/pages/Outcomes.vue b/modules/goals/ui/pages/Outcomes.vue
index bf1e8d3a..3c19fea8 100644
--- a/modules/goals/ui/pages/Outcomes.vue
+++ b/modules/goals/ui/pages/Outcomes.vue
@@ -1,42 +1,23 @@
diff --git a/modules/goals/ui/pages/Rationale.vue b/modules/goals/ui/pages/Rationale.vue
index ba4a49c0..ff83f3a8 100644
--- a/modules/goals/ui/pages/Rationale.vue
+++ b/modules/goals/ui/pages/Rationale.vue
@@ -1,55 +1,66 @@
@@ -60,7 +71,7 @@ watch([vision, mission, situation, objective], async (newValues, _oldValues) =>
A vision is a view of how the world should be and what your place
is in it. It is not a wish, but a goal.
-
+
Mission
@@ -68,7 +79,7 @@ watch([vision, mission, situation, objective], async (newValues, _oldValues) =>
The mission is informed by the vision and is a statement of what you
are doing to achieve the vision.
-
+
Situation
@@ -76,7 +87,7 @@ watch([vision, mission, situation, objective], async (newValues, _oldValues) =>
The situation is the current state of affairs that need to be
addressed by the system created by a project.
-
+
Objective
@@ -84,7 +95,7 @@ watch([vision, mission, situation, objective], async (newValues, _oldValues) =>
The objective is the reason for building a system and the organization
context in which it will be used.
-
+
\ No newline at end of file
diff --git a/modules/goals/ui/pages/Scenarios.vue b/modules/goals/ui/pages/Scenarios.vue
new file mode 100644
index 00000000..dd617e0d
--- /dev/null
+++ b/modules/goals/ui/pages/Scenarios.vue
@@ -0,0 +1,161 @@
+
+
+
+ Scenarios
+
+
+ This section defines the main scenarios that the system must support to achieve the goals of the solution.
+
+
+ Before you can begin, you must define one or more
+ Actors ,
+ Behaviors ,
+ and Outcomes
+ for the solution.
+
+
+
+
+
+
+
+
+ {{ data[field] }}
+
+
+
+
+
+
+
+
+
+
+ {{ roles.find(r => r.id === data[field])?.name }}
+
+
+
+
+
+
+
+
+
+
+ {{ behaviors.find(b => b.id === data[field])?.name }}
+
+
+
+
+
+
+
+
+
+
+ {{ outcomes.find(o => o.id === data[field])?.name }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/goals/ui/pages/Stakeholders.vue b/modules/goals/ui/pages/Stakeholders.vue
index 156898ff..863ca190 100644
--- a/modules/goals/ui/pages/Stakeholders.vue
+++ b/modules/goals/ui/pages/Stakeholders.vue
@@ -1,64 +1,69 @@
@@ -200,26 +190,30 @@ const onDelete = async (id: Uuid) => {
:max="Stakeholder.INFLUENCE_MAX" placeholder="(0-100)" />
-
+
-
+
- {{ data[field] }}
+ {{ categories.find(({ id }) => id === data[field])?.name }}
- - Computed -
+
-
+
-
+
- {{ data[field] }}
+ {{ segmentations.find(({ id }) => id === data[field])?.name }}
-
+
diff --git a/modules/project/application/CreatePersonUseCase.ts b/modules/project/application/CreatePersonUseCase.ts
deleted file mode 100644
index ff1d788f..00000000
--- a/modules/project/application/CreatePersonUseCase.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import type Repository from "~/application/Repository"
-import UseCase from "~/application/UseCase"
-import Person from "../domain/Person"
-import { emptyUuid, type Uuid } from "~/domain/Uuid"
-
-type In = Pick
-
-export default class CreatePersonUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute({ name, projectId, solutionId, email, roleId }: In): Promise {
- return await this.repository.add(new Person({
- id: crypto.randomUUID(),
- projectId,
- solutionId,
- email,
- roleId,
- name,
- parentId: emptyUuid,
- property: '',
- statement: ''
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/project/application/CreateProjectUseCase.ts b/modules/project/application/CreateProjectUseCase.ts
deleted file mode 100644
index 31835561..00000000
--- a/modules/project/application/CreateProjectUseCase.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import Project from "../domain/Project";
-
-export default class CreateProjectUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- return await this.repository.add(new Project({
- id: crypto.randomUUID(),
- solutionId,
- componentIds: [],
- limitationIds: []
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/project/application/DeletePersonUseCase.ts b/modules/project/application/DeletePersonUseCase.ts
deleted file mode 100644
index 4eb312b9..00000000
--- a/modules/project/application/DeletePersonUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase"
-import type { Uuid } from "~/domain/Uuid"
-import type Person from "../domain/Person"
-import type Repository from "~/application/Repository"
-
-export default class DeletePersonUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(id: Uuid): Promise {
- return await this.repository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/project/application/GetPersonnelUseCase.ts b/modules/project/application/GetPersonnelUseCase.ts
deleted file mode 100644
index fd9afd5e..00000000
--- a/modules/project/application/GetPersonnelUseCase.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Person from "../domain/Person";
-import type { Uuid } from "~/domain/Uuid";
-import type Repository from "~/application/Repository";
-
-export default class GetPersonnelUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(projectId: Uuid): Promise {
- return this.repository.getAll(p => p.projectId === projectId)
- }
-}
\ No newline at end of file
diff --git a/modules/project/application/GetProjectBySolutionIdUseCase.ts b/modules/project/application/GetProjectBySolutionIdUseCase.ts
deleted file mode 100644
index d33a7134..00000000
--- a/modules/project/application/GetProjectBySolutionIdUseCase.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Repository from "~/application/Repository";
-import type Project from "../domain/Project";
-import type { Uuid } from "~/domain/Uuid";
-
-export default class GetProjectBySolutionIdUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute(solutionId: Uuid): Promise {
- const projects = await this.repository.getAll(g => g.solutionId === solutionId)
-
- return projects[0]
- }
-}
\ No newline at end of file
diff --git a/modules/project/application/PersonInteractor.ts b/modules/project/application/PersonInteractor.ts
new file mode 100644
index 00000000..c936b6cd
--- /dev/null
+++ b/modules/project/application/PersonInteractor.ts
@@ -0,0 +1,4 @@
+import Interactor from "~/application/Interactor";
+import type Person from "../domain/Person";
+
+export default class PersonInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/project/application/UpdatePersonUseCase.ts b/modules/project/application/UpdatePersonUseCase.ts
deleted file mode 100644
index a6a58474..00000000
--- a/modules/project/application/UpdatePersonUseCase.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import UseCase from "~/application/UseCase";
-import Person from "../domain/Person";
-import type Repository from "~/application/Repository";
-import { emptyUuid } from "~/domain/Uuid";
-
-type In = Pick
-
-export default class UpdatePersonUseCase extends UseCase {
- constructor(readonly repository: Repository) {
- super()
- }
-
- async execute({ id, name, projectId, solutionId, email, roleId }: In): Promise {
- return await this.repository.update(new Person({
- id,
- projectId,
- solutionId,
- email,
- roleId,
- name,
- parentId: emptyUuid,
- property: '',
- statement: ''
- }))
- }
-}
\ No newline at end of file
diff --git a/modules/project/data/PersonRepository.ts b/modules/project/data/PersonRepository.ts
index 3736c503..f929d879 100644
--- a/modules/project/data/PersonRepository.ts
+++ b/modules/project/data/PersonRepository.ts
@@ -1,16 +1,6 @@
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import type Person from "../domain/Person";
-import PersonToJsonMapper from "../mappers/PersonToJsonMapper";
+import PGLiteRepository from "~/data/PGLiteRepository";
+import Person from "../domain/Person";
-const { serializationVersion } = useAppConfig()
-
-export default class PersonRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'person',
- mapper: new PersonToJsonMapper(serializationVersion)
- })
- }
+export default class PersonRepository extends PGLiteRepository {
+ constructor() { super('cathedral.person', Person) }
}
\ No newline at end of file
diff --git a/modules/project/data/ProjectRepository.ts b/modules/project/data/ProjectRepository.ts
deleted file mode 100644
index d290e7dc..00000000
--- a/modules/project/data/ProjectRepository.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type Project from "../domain/Project";
-import type { Properties } from "~/domain/Properties";
-import StorageRepository from "~/data/StorageRepository.js";
-import ProjectToJsonMapper from "../mappers/ProjectToJsonMapper";
-
-const { serializationVersion } = useAppConfig()
-
-export default class ProjectRepository extends StorageRepository {
- constructor(properties: Properties> = {}) {
- super({
- ...properties,
- storageKey: 'project',
- mapper: new ProjectToJsonMapper(serializationVersion)
- })
- }
-}
\ No newline at end of file
diff --git a/modules/project/domain/Person.ts b/modules/project/domain/Person.ts
index 96c51cd8..eecaf945 100644
--- a/modules/project/domain/Person.ts
+++ b/modules/project/domain/Person.ts
@@ -3,13 +3,12 @@ import type { Properties } from "~/domain/Properties";
import type { Uuid } from "~/domain/Uuid";
export default class Person extends Actor {
- constructor({ email, roleId, projectId, ...rest }: Properties) {
+ constructor({ email, roleId, ...rest }: Properties) {
super(rest);
- Object.assign(this, { email, roleId, projectId });
+ Object.assign(this, { email, roleId });
}
email!: string;
roleId!: Uuid;
- projectId!: Uuid;
}
\ No newline at end of file
diff --git a/modules/project/domain/Project.ts b/modules/project/domain/Project.ts
deleted file mode 100644
index b5d9ca30..00000000
--- a/modules/project/domain/Project.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import PEGS from "../../../domain/PEGS";
-
-/**
- * The set of human processes involved in the plannimg, construction,
- * revision, and operation of a system
- */
-export default class Project extends PEGS { }
diff --git a/modules/project/mappers/PersonToJsonMapper.ts b/modules/project/mappers/PersonToJsonMapper.ts
deleted file mode 100644
index 5be88246..00000000
--- a/modules/project/mappers/PersonToJsonMapper.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import RequirementToJsonMapper, { type RequirementJson } from "~/mappers/RequirementToJsonMapper";
-import Person from "../domain/Person";
-import type { Uuid } from "~/domain/Uuid";
-
-export interface PersonJson extends RequirementJson {
- email: string;
- roleId: Uuid;
- projectId: Uuid;
-}
-
-export default class PersonToJsonMapper extends RequirementToJsonMapper {
- override mapFrom(target: PersonJson): Person {
- return new Person({
- ...super.mapFrom(target),
- email: target.email,
- roleId: target.roleId,
- projectId: target.projectId
- })
- }
-
- override mapTo(source: Person): PersonJson {
- const requirement = super.mapTo(source)
-
- return {
- ...requirement,
- email: source.email,
- roleId: source.roleId,
- projectId: source.projectId
- }
- }
-}
\ No newline at end of file
diff --git a/modules/project/mappers/ProjectToJsonMapper.ts b/modules/project/mappers/ProjectToJsonMapper.ts
deleted file mode 100644
index 585af18e..00000000
--- a/modules/project/mappers/ProjectToJsonMapper.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import PEGSToJsonMapper, { type PEGSJson } from "~/mappers/PEGSToJsonMapper";
-import Project from "../domain/Project";
-
-export interface ProjectJson extends PEGSJson { }
-
-export default class ProjectToJsonMapper extends PEGSToJsonMapper {
- override mapFrom(target: ProjectJson): Project {
- const pegs = super.mapFrom(target)
-
- return new Project({
- id: pegs.id,
- limitationIds: pegs.limitationIds,
- solutionId: pegs.solutionId,
- componentIds: pegs.componentIds
- });
- }
-
- override mapTo(source: Project): ProjectJson {
- return {
- ...super.mapTo(source as any)
- };
- }
-}
\ No newline at end of file
diff --git a/modules/project/ui/pages/Index.vue b/modules/project/ui/pages/Index.vue
index f6a3f87c..0ff0354e 100644
--- a/modules/project/ui/pages/Index.vue
+++ b/modules/project/ui/pages/Index.vue
@@ -1,45 +1,17 @@
diff --git a/modules/solution/application/CreateSolutionUseCase.ts b/modules/solution/application/CreateSolutionUseCase.ts
deleted file mode 100644
index d9616dd6..00000000
--- a/modules/solution/application/CreateSolutionUseCase.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import { type Uuid, emptyUuid } from "~/domain/Uuid";
-import Solution from "../domain/Solution";
-
-type In = { name: string, description: string }
-
-export default class CreateSolutionUseCase extends UseCase {
- constructor(readonly repository: Repository) { super() }
-
- async execute({ name, description }: In): Promise {
- const solution = new Solution({
- id: crypto.randomUUID(),
- name,
- description,
- environmentId: emptyUuid,
- goalsId: emptyUuid,
- projectId: emptyUuid,
- systemId: emptyUuid
- })
-
- await this.repository.add(solution)
-
- return solution.id
- }
-}
\ No newline at end of file
diff --git a/modules/solution/application/DeleteSolutionUseCase.ts b/modules/solution/application/DeleteSolutionUseCase.ts
deleted file mode 100644
index f56a1748..00000000
--- a/modules/solution/application/DeleteSolutionUseCase.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type Repository from "~/application/Repository";
-import UseCase from "~/application/UseCase";
-import type { Uuid } from "~/domain/Uuid";
-import type Solution from "../domain/Solution";
-
-export default class DeleteSolutionUseCase extends UseCase {
- constructor(
- readonly solutionRepository: Repository
- ) { super() }
-
- async execute(id: Uuid): Promise {
- const solution = await this.solutionRepository.get(id)
-
- if (!solution)
- throw new Error('Solution not found')
-
- await this.solutionRepository.delete(id)
- }
-}
\ No newline at end of file
diff --git a/modules/solution/application/GetAllSolutionsUseCase.ts b/modules/solution/application/GetAllSolutionsUseCase.ts
deleted file mode 100644
index db6a4e39..00000000
--- a/modules/solution/application/GetAllSolutionsUseCase.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type Repository from "~/application/Repository"
-import type Solution from "../domain/Solution"
-import UseCase from "~/application/UseCase"
-
-export default class GetAllSolutionsUseCase extends UseCase<{}, Solution[]> {
- constructor(readonly repository: Repository) { super() }
-
- async execute(): Promise {
- return this.repository.getAll()
- }
-}
\ No newline at end of file
diff --git a/modules/solution/application/GetSolutionByIdUseCase.ts b/modules/solution/application/GetSolutionByIdUseCase.ts
deleted file mode 100644
index 99791507..00000000
--- a/modules/solution/application/GetSolutionByIdUseCase.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Solution from "../domain/Solution";
-import type Repository from "~/application/Repository";
-import type { Uuid } from "~/domain/Uuid";
-
-export default class GetSolutionByIdUseCase extends UseCase {
- constructor(readonly repository: Repository) { super() }
-
- async execute(id: Uuid): Promise {
- return this.repository.get(id)
- }
-}
\ No newline at end of file
diff --git a/modules/solution/application/GetSolutionBySlugUseCase.ts b/modules/solution/application/GetSolutionBySlugUseCase.ts
deleted file mode 100644
index 88bf7e8b..00000000
--- a/modules/solution/application/GetSolutionBySlugUseCase.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import UseCase from "~/application/UseCase";
-import type Solution from "../domain/Solution";
-import type SlugRepository from "~/application/SlugRepository";
-
-export default class GetSolutionBySlugUseCase extends UseCase {
- constructor(readonly repository: SlugRepository) { super() }
-
- async execute(slug: string): Promise {
- return this.repository.getSolutionBySlug(slug)
- }
-}
\ No newline at end of file
diff --git a/modules/solution/application/SolutionInteractor.ts b/modules/solution/application/SolutionInteractor.ts
new file mode 100644
index 00000000..0c506d2d
--- /dev/null
+++ b/modules/solution/application/SolutionInteractor.ts
@@ -0,0 +1,4 @@
+import type Solution from "../domain/Solution";
+import Interactor from "~/application/Interactor";
+
+export default class SolutionInteractor extends Interactor { }
\ No newline at end of file
diff --git a/modules/solution/application/UpdateSolutionUseCase.ts b/modules/solution/application/UpdateSolutionUseCase.ts
deleted file mode 100644
index bc0c8c41..00000000
--- a/modules/solution/application/UpdateSolutionUseCase.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import type Repository from "~/application/Repository";
-import type Solution from "../domain/Solution";
-import UseCase from "~/application/UseCase";
-
-type In = Omit
-
-export default class UpdateSolutionUseCase extends UseCase {
- constructor(readonly repository: Repository) { super() }
-
- async execute(props: In): Promise {
- const solution = await this.repository.get(props.id)
-
- if (!solution)
- throw new Error(`Solution with id ${props.id} not found`)
-
- Object.assign(solution, props)
-
- await this.repository.update(solution)
- }
-}
\ No newline at end of file
diff --git a/modules/solution/data/SolutionRepository.ts b/modules/solution/data/SolutionRepository.ts
index eab09e5b..36e61060 100644
--- a/modules/solution/data/SolutionRepository.ts
+++ b/modules/solution/data/SolutionRepository.ts
@@ -1,39 +1,6 @@
-// import type Solution from "../domain/Solution";
-// import type { Properties } from "~/domain/Properties";
-// import StorageRepository from "~/data/StorageRepository.js";
-// import type SlugRepository from "~/application/SlugRepository";
-// import SolutionToJsonMapper from "../mappers/SolutionToJsonMapper";
+import Solution from "../domain/Solution";
+import PGLiteRepository from "~/data/PGLiteRepository";
-import Repository from "~/application/Repository";
-import type Solution from "../domain/Solution";
-import type Mapper from "~/application/Mapper";
-import { PGliteWorker } from "@electric-sql/pglite/worker";
-
-// export default class SolutionRepository extends StorageRepository implements SlugRepository {
-// constructor(properties: Properties> = {}) {
-// super({
-// ...properties,
-// storageKey: 'solutions',
-// mapper: new SolutionToJsonMapper(serializationVersion)
-// })
-// }
-
-// async getSolutionBySlug(slug: string): Promise {
-// const solutions = await this.getAll(s => s.slug === slug)
-// return solutions[0]
-// }
-// }
-
-export default class SolutionRepository extends Repository {
- private _connString: string
-
- constructor({ connString, mapper }: { connString: string, mapper: Mapper }) {
- super({ mapper })
- this._connString = connString
- }
-
- async getSolutionBySlug(slug: string): Promise {
- const pgLiteClient = new PGliteWorker(this._connString)
- await pgLiteClient.waitReady
- }
+export default class SolutionRepository extends PGLiteRepository {
+ constructor() { super('cathedral.solution', Solution) }
}
\ No newline at end of file
diff --git a/modules/solution/domain/Solution.ts b/modules/solution/domain/Solution.ts
index 5ea4728d..011cd214 100644
--- a/modules/solution/domain/Solution.ts
+++ b/modules/solution/domain/Solution.ts
@@ -12,13 +12,9 @@ export default class Solution extends Entity {
private _description!: string;
private _name!: string;
+ private _slug!: string;
- projectId!: Uuid;
- environmentId!: Uuid;
- goalsId!: Uuid;
- systemId!: Uuid;
-
- constructor({ id, ...rest }: Properties>) {
+ constructor({ id, ...rest }: Properties) {
super({ id });
Object.assign(this, rest);
}
@@ -32,7 +28,9 @@ export default class Solution extends Entity {
set description(value: string) {
const trimmed = value.trim();
if (trimmed.length >= Solution.maxDescriptionLength)
- throw new Error('Project description cannot be longer than 200 characters');
+ throw new Error(
+ `Project description cannot be longer than ${Solution.maxDescriptionLength} characters`
+ );
this._description = trimmed;
}
@@ -45,11 +43,15 @@ export default class Solution extends Entity {
set name(value: string) {
const trimmed = value.trim();
if (trimmed.length >= Solution.maxNameLength)
- throw new Error('Entity name cannot be longer than 60 characters');
+ throw new Error(`Entity name cannot be longer than ${Solution.maxNameLength} characters`);
this._name = trimmed;
}
get slug(): string {
- return slugify(this.name);
+ return this._slug
+ }
+
+ set slug(value: string) {
+ this._slug = value
}
}
\ No newline at end of file
diff --git a/modules/solution/mappers/SolutionToJsonMapper.ts b/modules/solution/mappers/SolutionToJsonMapper.ts
deleted file mode 100644
index 54dd294a..00000000
--- a/modules/solution/mappers/SolutionToJsonMapper.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import type { Uuid } from "~/domain/Uuid";
-import Solution from "../domain/Solution";
-import SemVer from "~/domain/SemVer";
-import EntityToJsonMapper, { type EntityJson } from "~/mappers/EntityToJsonMapper";
-
-export interface SolutionJson extends EntityJson {
- name: string;
- description: string;
- projectId: Uuid;
- environmentId: Uuid;
- goalsId: Uuid;
- systemId: Uuid;
-}
-
-export default class SolutionToJsonMapper extends EntityToJsonMapper {
- override mapFrom(target: SolutionJson): Solution {
- const version = new SemVer(target.serializationVersion);
-
- return new Solution(target);
- }
-
- override mapTo(source: Solution): SolutionJson {
- return {
- ...super.mapTo(source),
- name: source.name,
- description: source.description,
- projectId: source.projectId,
- environmentId: source.environmentId,
- goalsId: source.goalsId,
- systemId: source.systemId
- };
- }
-}
\ No newline at end of file
diff --git a/modules/solution/ui/pages/solution/[solutionSlug].vue b/modules/solution/ui/pages/solution/[solutionSlug].vue
index 39a5b878..7a111c91 100644
--- a/modules/solution/ui/pages/solution/[solutionSlug].vue
+++ b/modules/solution/ui/pages/solution/[solutionSlug].vue
@@ -1,17 +1,15 @@
diff --git a/modules/system/ui/pages/Functionality.vue b/modules/system/ui/pages/Functionality.vue
index e5efde1c..25f67eec 100644
--- a/modules/system/ui/pages/Functionality.vue
+++ b/modules/system/ui/pages/Functionality.vue
@@ -1,76 +1,64 @@
diff --git a/modules/system/ui/pages/Index.vue b/modules/system/ui/pages/Index.vue
index 0954f79f..7405ae63 100644
--- a/modules/system/ui/pages/Index.vue
+++ b/modules/system/ui/pages/Index.vue
@@ -1,41 +1,15 @@
@@ -213,26 +209,26 @@ const onUseCaseDelete = async (id: Uuid) => {
+ optionValue="id" :options="functionalBehaviors" placeholder="Search by Behavior" />
- {{ behaviors.find(b => b.id === data[field])?.name }}
+ {{ functionalBehaviors.find(b => b.id === data[field])?.name }}
-
+
-
+
+ optionValue="id" :options="outcomes" placeholder="Search by Goal" />
- {{ epics.find(e => e.id === data[field])?.name }}
+ {{ outcomes.find(o => o.id === data[field])?.name }}
-
@@ -306,32 +302,19 @@ const onUseCaseDelete = async (id: Uuid) => {
-
+
+ optionValue="id" :options="assumptions" placeholder="Search by pre-condition" />
- {{ behaviors.find(b => b.id === data[field])?.name }}
+ {{ assumptions.find(a => a.id === data[field])?.name }}
-
-
-
-
-
-
- {{ behaviors.find(b => b.id === data[field])?.name }}
-
-
-
-
-
{{ data[field] }}
@@ -344,13 +327,13 @@ const onUseCaseDelete = async (id: Uuid) => {
+ optionValue="id" :options="effects" placeholder="Search by success guarantee" />
- {{ behaviors.find(b => b.id === data[field])?.name }}
+ {{ effects.find(e => e.id === data[field])?.name }}
-
@@ -363,7 +346,7 @@ const onUseCaseDelete = async (id: Uuid) => {
cols="30" />
-
+
diff --git a/nuxt.config.ts b/nuxt.config.ts
index fa396af8..88fc3517 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -42,4 +42,4 @@ export default defineNuxtConfig({
typescript: {
typeCheck: true
}
-})
\ No newline at end of file
+})
diff --git a/package-lock.json b/package-lock.json
index 010a53de..a5248400 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -21,7 +21,9 @@
"vue-router": "^4.3.2"
},
"devDependencies": {
+ "@types/node": "^20.14.5",
"@vite-pwa/assets-generator": "^0.2.4",
+ "serve": "^14.2.3",
"typescript": "^5.4.5",
"vue-tsc": "^1.8.27"
}
@@ -1915,141 +1917,6 @@
"resolved": "https://registry.npmjs.org/@electric-sql/pglite/-/pglite-0.1.5.tgz",
"integrity": "sha512-eymv4ONNvoPZQTvOQIi5dbpR+J5HzEv0qQH9o/y3gvNheJV/P/NFcrbsfJZYTsDKoq7DKrTiFNexsRkJKy8x9Q=="
},
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz",
- "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==",
- "cpu": [
- "ppc64"
- ],
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz",
- "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz",
- "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz",
- "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz",
- "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz",
- "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz",
- "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz",
- "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz",
- "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@esbuild/linux-arm64": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz",
@@ -2065,201 +1932,6 @@
"node": ">=12"
}
},
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz",
- "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz",
- "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==",
- "cpu": [
- "loong64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz",
- "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==",
- "cpu": [
- "mips64el"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz",
- "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==",
- "cpu": [
- "ppc64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz",
- "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==",
- "cpu": [
- "riscv64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz",
- "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==",
- "cpu": [
- "s390x"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz",
- "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz",
- "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz",
- "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz",
- "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz",
- "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz",
- "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz",
- "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@fastify/busboy": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
@@ -3319,101 +2991,6 @@
"@parcel/watcher-win32-x64": "2.4.1"
}
},
- "node_modules/@parcel/watcher-android-arm64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz",
- "integrity": "sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-darwin-arm64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz",
- "integrity": "sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-darwin-x64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz",
- "integrity": "sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-freebsd-x64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz",
- "integrity": "sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-arm-glibc": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz",
- "integrity": "sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
"node_modules/@parcel/watcher-linux-arm64-glibc": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz",
@@ -3452,44 +3029,6 @@
"url": "https://opencollective.com/parcel"
}
},
- "node_modules/@parcel/watcher-linux-x64-glibc": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz",
- "integrity": "sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-x64-musl": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz",
- "integrity": "sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
"node_modules/@parcel/watcher-wasm": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz",
@@ -3515,63 +3054,6 @@
"inBundle": true,
"license": "MIT"
},
- "node_modules/@parcel/watcher-win32-arm64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz",
- "integrity": "sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-win32-ia32": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz",
- "integrity": "sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-win32-x64": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz",
- "integrity": "sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
"node_modules/@parcel/watcher/node_modules/detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
@@ -3761,108 +3243,36 @@
"rollup": "^2.0.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
- "rollup": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/pluginutils": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
- "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==",
- "dependencies": {
- "@types/estree": "^1.0.0",
- "estree-walker": "^2.0.2",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "peerDependencies": {
- "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
- },
- "peerDependenciesMeta": {
- "rollup": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/pluginutils/node_modules/estree-walker": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
- },
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz",
- "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz",
- "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz",
- "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz",
- "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz",
- "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
+ "rollup": {
+ "optional": true
+ }
+ }
},
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz",
- "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
+ "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/pluginutils/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.18.0",
@@ -3888,102 +3298,6 @@
"linux"
]
},
- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz",
- "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==",
- "cpu": [
- "ppc64"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz",
- "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==",
- "cpu": [
- "riscv64"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz",
- "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==",
- "cpu": [
- "s390x"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz",
- "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz",
- "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz",
- "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz",
- "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz",
- "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "win32"
- ]
- },
"node_modules/@shikijs/core": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.5.2.tgz",
@@ -4182,9 +3496,9 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
},
"node_modules/@types/node": {
- "version": "20.12.12",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
- "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
+ "version": "20.14.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.5.tgz",
+ "integrity": "sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==",
"dependencies": {
"undici-types": "~5.26.4"
}
@@ -5357,6 +4671,12 @@
}
}
},
+ "node_modules/@zeit/schemas": {
+ "version": "2.36.0",
+ "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.36.0.tgz",
+ "integrity": "sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==",
+ "dev": true
+ },
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -5373,6 +4693,19 @@
"node": ">=6.5"
}
},
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/acorn": {
"version": "8.11.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
@@ -5430,6 +4763,15 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
+ "node_modules/ansi-align": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
+ "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.1.0"
+ }
+ },
"node_modules/ansi-colors": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
@@ -5499,6 +4841,26 @@
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
},
+ "node_modules/arch": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
+ "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
"node_modules/archiver": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",
@@ -5605,6 +4967,12 @@
"node": ">= 6"
}
},
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "dev": true
+ },
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -5905,63 +5273,200 @@
"resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz",
"integrity": "sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==",
"funding": {
- "url": "https://github.com/sponsors/antfu"
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "devOptional": true,
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/bl/node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "devOptional": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/bl/node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "devOptional": true,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
+ },
+ "node_modules/boxen": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz",
+ "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==",
+ "dev": true,
+ "dependencies": {
+ "ansi-align": "^3.0.1",
+ "camelcase": "^7.0.0",
+ "chalk": "^5.0.1",
+ "cli-boxes": "^3.0.0",
+ "string-width": "^5.1.2",
+ "type-fest": "^2.13.0",
+ "widest-line": "^4.0.1",
+ "wrap-ansi": "^8.0.1"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/boxen/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/boxen/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/boxen/node_modules/camelcase": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
+ "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/boxen/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true,
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/boxen/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "node_modules/boxen/node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/bl": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
- "devOptional": true,
+ "node_modules/boxen/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
"dependencies": {
- "buffer": "^5.5.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.4.0"
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/bl/node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "devOptional": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
+ "node_modules/boxen/node_modules/type-fest": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/bl/node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "devOptional": true,
+ "node_modules/boxen/node_modules/wrap-ansi": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+ "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
+ "dev": true,
"dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
+ "ansi-styles": "^6.1.0",
+ "string-width": "^5.0.1",
+ "strip-ansi": "^7.0.1"
},
"engines": {
- "node": ">= 6"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/boolbase": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
- "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
- },
"node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
@@ -6073,6 +5578,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/c12": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/c12/-/c12-1.10.0.tgz",
@@ -6237,6 +5751,91 @@
"node": ">=4"
}
},
+ "node_modules/chalk-template": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz",
+ "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk-template?sponsor=1"
+ }
+ },
+ "node_modules/chalk-template/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/chalk-template/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chalk-template/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/chalk-template/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/chalk-template/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chalk-template/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/chalk/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -6323,6 +5922,18 @@
"node": "*"
}
},
+ "node_modules/cli-boxes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
+ "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/clipboardy": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz",
@@ -6531,6 +6142,57 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": ">= 1.43.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/compression/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/compression/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/compression/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
"node_modules/computeds": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/computeds/-/computeds-0.0.1.tgz",
@@ -6560,6 +6222,15 @@
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
},
+ "node_modules/content-disposition": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -8188,6 +7859,21 @@
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
+ "node_modules/fast-url-parser": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
+ "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^1.3.2"
+ }
+ },
+ "node_modules/fast-url-parser/node_modules/punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
+ "dev": true
+ },
"node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
@@ -8357,19 +8043,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -9320,6 +8993,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/is-port-reachable": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz",
+ "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/is-primitive": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz",
@@ -10534,6 +10219,27 @@
"node": ">=16"
}
},
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/mimic-fn": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
@@ -11544,6 +11250,15 @@
"node": ">= 0.8"
}
},
+ "node_modules/on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -11772,6 +11487,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/path-is-inside": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==",
+ "dev": true
+ },
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
@@ -11808,6 +11529,12 @@
"node": "14 || >=16.14"
}
},
+ "node_modules/path-to-regexp": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz",
+ "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==",
+ "dev": true
+ },
"node_modules/path-type": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz",
@@ -12670,6 +12397,28 @@
"node": ">=4"
}
},
+ "node_modules/registry-auth-token": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz",
+ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==",
+ "dev": true,
+ "dependencies": {
+ "rc": "^1.1.6",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/registry-url": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz",
+ "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==",
+ "dev": true,
+ "dependencies": {
+ "rc": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/regjsparser": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
@@ -13057,6 +12806,99 @@
"randombytes": "^2.1.0"
}
},
+ "node_modules/serve": {
+ "version": "14.2.3",
+ "resolved": "https://registry.npmjs.org/serve/-/serve-14.2.3.tgz",
+ "integrity": "sha512-VqUFMC7K3LDGeGnJM9h56D3XGKb6KGgOw0cVNtA26yYXHCcpxf3xwCTUaQoWlVS7i8Jdh3GjQkOB23qsXyjoyQ==",
+ "dev": true,
+ "dependencies": {
+ "@zeit/schemas": "2.36.0",
+ "ajv": "8.12.0",
+ "arg": "5.0.2",
+ "boxen": "7.0.0",
+ "chalk": "5.0.1",
+ "chalk-template": "0.4.0",
+ "clipboardy": "3.0.0",
+ "compression": "1.7.4",
+ "is-port-reachable": "4.0.0",
+ "serve-handler": "6.1.5",
+ "update-check": "1.5.4"
+ },
+ "bin": {
+ "serve": "build/main.js"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/serve-handler": {
+ "version": "6.1.5",
+ "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz",
+ "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==",
+ "dev": true,
+ "dependencies": {
+ "bytes": "3.0.0",
+ "content-disposition": "0.5.2",
+ "fast-url-parser": "1.1.3",
+ "mime-types": "2.1.18",
+ "minimatch": "3.1.2",
+ "path-is-inside": "1.0.2",
+ "path-to-regexp": "2.2.1",
+ "range-parser": "1.2.0"
+ }
+ },
+ "node_modules/serve-handler/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/serve-handler/node_modules/mime-db": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
+ "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-handler/node_modules/mime-types": {
+ "version": "2.1.18",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
+ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": "~1.33.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-handler/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/serve-handler/node_modules/range-parser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+ "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/serve-placeholder": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/serve-placeholder/-/serve-placeholder-2.0.1.tgz",
@@ -13079,6 +12921,167 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/serve/node_modules/ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/serve/node_modules/chalk": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz",
+ "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==",
+ "dev": true,
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/serve/node_modules/clipboardy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz",
+ "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==",
+ "dev": true,
+ "dependencies": {
+ "arch": "^2.2.0",
+ "execa": "^5.1.1",
+ "is-wsl": "^2.2.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serve/node_modules/execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/serve/node_modules/human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.17.0"
+ }
+ },
+ "node_modules/serve/node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true,
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serve/node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serve/node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/serve/node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/serve/node_modules/npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/serve/node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serve/node_modules/strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -14607,6 +14610,16 @@
"browserslist": ">= 4.21.0"
}
},
+ "node_modules/update-check": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz",
+ "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==",
+ "dev": true,
+ "dependencies": {
+ "registry-auth-token": "3.3.2",
+ "registry-url": "3.1.0"
+ }
+ },
"node_modules/uqr": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz",
@@ -14684,6 +14697,15 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/vite": {
"version": "5.2.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz",
@@ -15292,6 +15314,71 @@
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
+ "node_modules/widest-line": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
+ "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/widest-line/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/widest-line/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "node_modules/widest-line/node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/widest-line/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
"node_modules/workbox-background-sync": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-7.1.0.tgz",
diff --git a/package.json b/package.json
index 3695aded..5913c3c1 100644
--- a/package.json
+++ b/package.json
@@ -16,11 +16,12 @@
"license": "AGPL-3.0-only",
"type": "module",
"scripts": {
+ "//build": "nuxt build",
+ "//dev": "nuxt dev --no-fork",
+ "//preview": "nuxt preview",
"generate-pwa-assets": "pwa-assets-generator",
- "build": "nuxt build",
- "dev": "nuxt dev --no-fork",
"generate": "nuxt generate",
- "preview": "nuxt preview",
+ "serve": "npx serve .output/public",
"postinstall": "nuxt prepare",
"typecheck": "nuxi typecheck"
},
@@ -36,8 +37,10 @@
"vue-router": "^4.3.2"
},
"devDependencies": {
+ "@types/node": "^20.14.5",
"@vite-pwa/assets-generator": "^0.2.4",
+ "serve": "^14.2.3",
"typescript": "^5.4.5",
"vue-tsc": "^1.8.27"
}
-}
+}
\ No newline at end of file
diff --git a/pages/db-debug.vue b/pages/db-debug.vue
new file mode 100644
index 00000000..2a5da396
--- /dev/null
+++ b/pages/db-debug.vue
@@ -0,0 +1,83 @@
+
+
+
+ SQL Debugger
+
+
+
+
+ Tables
+
+
+
+ Sample Queries
+
+ Sample Queries
+ {{ query.label }}
+
+
+
+
+ Run
+ Clear
+
+
+
+
+
+ Result
+
+
+ {{ JSON.stringify(results, null, 2) }}
+
+ {{ error }}
+ No results
+
diff --git a/pages/settings.vue b/pages/settings.vue
index 9232f2b4..8d1792d6 100644
--- a/pages/settings.vue
+++ b/pages/settings.vue
@@ -1,8 +1,10 @@
Settings
+
+ Database
+
+ Database Debugging
\ No newline at end of file