diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 64a1db51..42b88ed5 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -46,6 +46,8 @@ jobs: # rm package-lock.json - name: Install dependencies run: npm install + - name: Typecheck + run: npm run typecheck - name: Build Application run: npm run build - name: Generate PWA Assets diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fd02c0a..31def6b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,8 @@ jobs: # rm package-lock.json - name: Install dependencies run: npm install + - name: Typecheck + run: npm run typecheck - name: Build Application run: npm run build - name: Generate PWA Assets diff --git a/.gitignore b/.gitignore index b9e22af5..3fbb0d17 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,7 @@ logs public/apple-touch-icon-*.png public/favicon.ico public/maskable-icon-*.png -public/pwa-*.png \ No newline at end of file +public/pwa-*.png + +# mikro-orm +temp \ No newline at end of file diff --git a/migrations/.snapshot-cathedral.json b/migrations/.snapshot-cathedral.json index bf160061..9fe41027 100644 --- a/migrations/.snapshot-cathedral.json +++ b/migrations/.snapshot-cathedral.json @@ -73,6 +73,1697 @@ "checks": [], "foreignKeys": {}, "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "product", + "schema": "public", + "indexes": [ + { + "keyName": "product_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "product_solution_id_foreign": { + "constraintName": "product_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.product", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "email": { + "name": "email", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + } + }, + "name": "person", + "schema": "public", + "indexes": [ + { + "keyName": "person_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "person_solution_id_foreign": { + "constraintName": "person_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.person", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "outcome", + "schema": "public", + "indexes": [ + { + "keyName": "outcome_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "outcome_solution_id_foreign": { + "constraintName": "outcome_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.outcome", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "obstacle", + "schema": "public", + "indexes": [ + { + "keyName": "obstacle_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "obstacle_solution_id_foreign": { + "constraintName": "obstacle_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.obstacle", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "priority": { + "name": "priority", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "MUST", + "SHOULD", + "COULD", + "WONT" + ], + "mappedType": "enum" + } + }, + "name": "non_functional_behavior", + "schema": "public", + "indexes": [ + { + "keyName": "non_functional_behavior_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "non_functional_behavior_solution_id_foreign": { + "constraintName": "non_functional_behavior_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.non_functional_behavior", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "limit", + "schema": "public", + "indexes": [ + { + "keyName": "limit_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "limit_solution_id_foreign": { + "constraintName": "limit_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.limit", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "justification", + "schema": "public", + "indexes": [ + { + "keyName": "justification_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "justification_solution_id_foreign": { + "constraintName": "justification_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.justification", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "invariant", + "schema": "public", + "indexes": [ + { + "keyName": "invariant_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "invariant_solution_id_foreign": { + "constraintName": "invariant_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.invariant", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "hint", + "schema": "public", + "indexes": [ + { + "keyName": "hint_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "hint_solution_id_foreign": { + "constraintName": "hint_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.hint", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "parent_component_id": { + "name": "parent_component_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": true, + "mappedType": "uuid" + } + }, + "name": "glossary_term", + "schema": "public", + "indexes": [ + { + "keyName": "glossary_term_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "glossary_term_solution_id_foreign": { + "constraintName": "glossary_term_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.glossary_term", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + }, + "glossary_term_parent_component_id_foreign": { + "constraintName": "glossary_term_parent_component_id_foreign", + "columnNames": [ + "parent_component_id" + ], + "localTableName": "public.glossary_term", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.glossary_term", + "deleteRule": "set null", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "priority": { + "name": "priority", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "MUST", + "SHOULD", + "COULD", + "WONT" + ], + "mappedType": "enum" + } + }, + "name": "functional_behavior", + "schema": "public", + "indexes": [ + { + "keyName": "functional_behavior_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "functional_behavior_solution_id_foreign": { + "constraintName": "functional_behavior_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.functional_behavior", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "parent_component_id": { + "name": "parent_component_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": true, + "mappedType": "uuid" + } + }, + "name": "environment_component", + "schema": "public", + "indexes": [ + { + "keyName": "environment_component_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "environment_component_solution_id_foreign": { + "constraintName": "environment_component_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.environment_component", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + }, + "environment_component_parent_component_id_foreign": { + "constraintName": "environment_component_parent_component_id_foreign", + "columnNames": [ + "parent_component_id" + ], + "localTableName": "public.environment_component", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.environment_component", + "deleteRule": "set null", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "effect", + "schema": "public", + "indexes": [ + { + "keyName": "effect_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "effect_solution_id_foreign": { + "constraintName": "effect_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.effect", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "category": { + "name": "category", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "Business Rule", + "Physical Law", + "Engineering Decision" + ], + "mappedType": "enum" + } + }, + "name": "constraint", + "schema": "public", + "indexes": [ + { + "keyName": "constraint_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "constraint_solution_id_foreign": { + "constraintName": "constraint_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.constraint", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "assumption", + "schema": "public", + "indexes": [ + { + "keyName": "assumption_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "assumption_solution_id_foreign": { + "constraintName": "assumption_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.assumption", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "parent_component_id": { + "name": "parent_component_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": true, + "mappedType": "uuid" + }, + "segmentation": { + "name": "segmentation", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "Client", + "Vendor" + ], + "mappedType": "enum" + }, + "category": { + "name": "category", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "Key Stakeholder", + "Shadow Influencer", + "Fellow Traveler", + "Observer" + ], + "mappedType": "enum" + }, + "availability": { + "name": "availability", + "type": "int", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "integer" + }, + "influence": { + "name": "influence", + "type": "int", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "integer" + } + }, + "name": "stakeholder", + "schema": "public", + "indexes": [ + { + "keyName": "stakeholder_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [ + { + "name": "stakeholder_availability_check", + "expression": "availability >= 0 AND availability <= 100", + "definition": "check ((availability >= 0 AND availability <= 100))", + "columnName": "availability" + }, + { + "name": "stakeholder_influence_check", + "expression": "influence >= 0 AND influence <= 100", + "definition": "check ((influence >= 0 AND influence <= 100))", + "columnName": "influence" + } + ], + "foreignKeys": { + "stakeholder_solution_id_foreign": { + "constraintName": "stakeholder_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.stakeholder", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + }, + "stakeholder_parent_component_id_foreign": { + "constraintName": "stakeholder_parent_component_id_foreign", + "columnNames": [ + "parent_component_id" + ], + "localTableName": "public.stakeholder", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.stakeholder", + "deleteRule": "set null", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "priority": { + "name": "priority", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "MUST", + "SHOULD", + "COULD", + "WONT" + ], + "mappedType": "enum" + }, + "primary_actor_id": { + "name": "primary_actor_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "scope": { + "name": "scope", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "level": { + "name": "level", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "goal_in_context": { + "name": "goal_in_context", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "precondition_id": { + "name": "precondition_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "trigger_id": { + "name": "trigger_id", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "main_success_scenario": { + "name": "main_success_scenario", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "success_guarantee_id": { + "name": "success_guarantee_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "extensions": { + "name": "extensions", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + } + }, + "name": "use_case", + "schema": "public", + "indexes": [ + { + "keyName": "use_case_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "use_case_solution_id_foreign": { + "constraintName": "use_case_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.use_case", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + }, + "use_case_primary_actor_id_foreign": { + "constraintName": "use_case_primary_actor_id_foreign", + "columnNames": [ + "primary_actor_id" + ], + "localTableName": "public.use_case", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.stakeholder", + "updateRule": "cascade" + }, + "use_case_precondition_id_foreign": { + "constraintName": "use_case_precondition_id_foreign", + "columnNames": [ + "precondition_id" + ], + "localTableName": "public.use_case", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.assumption", + "updateRule": "cascade" + }, + "use_case_success_guarantee_id_foreign": { + "constraintName": "use_case_success_guarantee_id_foreign", + "columnNames": [ + "success_guarantee_id" + ], + "localTableName": "public.use_case", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.effect", + "updateRule": "cascade" + } + }, + "nativeEnums": {} + }, + { + "columns": { + "id": { + "name": "id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "statement": { + "name": "statement", + "type": "varchar(255)", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "length": 255, + "mappedType": "string" + }, + "solution_id": { + "name": "solution_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "priority": { + "name": "priority", + "type": "text", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "enumItems": [ + "MUST", + "SHOULD", + "COULD", + "WONT" + ], + "mappedType": "enum" + }, + "primary_actor_id": { + "name": "primary_actor_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "functional_behavior_id": { + "name": "functional_behavior_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + }, + "outcome_id": { + "name": "outcome_id", + "type": "uuid", + "unsigned": false, + "autoincrement": false, + "primary": false, + "nullable": false, + "mappedType": "uuid" + } + }, + "name": "user_story", + "schema": "public", + "indexes": [ + { + "keyName": "user_story_pkey", + "columnNames": [ + "id" + ], + "composite": false, + "constraint": true, + "primary": true, + "unique": true + } + ], + "checks": [], + "foreignKeys": { + "user_story_solution_id_foreign": { + "constraintName": "user_story_solution_id_foreign", + "columnNames": [ + "solution_id" + ], + "localTableName": "public.user_story", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.solution", + "updateRule": "cascade" + }, + "user_story_primary_actor_id_foreign": { + "constraintName": "user_story_primary_actor_id_foreign", + "columnNames": [ + "primary_actor_id" + ], + "localTableName": "public.user_story", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.stakeholder", + "updateRule": "cascade" + }, + "user_story_functional_behavior_id_foreign": { + "constraintName": "user_story_functional_behavior_id_foreign", + "columnNames": [ + "functional_behavior_id" + ], + "localTableName": "public.user_story", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.functional_behavior", + "updateRule": "cascade" + }, + "user_story_outcome_id_foreign": { + "constraintName": "user_story_outcome_id_foreign", + "columnNames": [ + "outcome_id" + ], + "localTableName": "public.user_story", + "referencedColumnNames": [ + "id" + ], + "referencedTableName": "public.outcome", + "updateRule": "cascade" + } + }, + "nativeEnums": {} } ], "nativeEnums": {} diff --git a/migrations/Migration20240719152506.ts b/migrations/Migration20240719152506.ts deleted file mode 100644 index 75a28231..00000000 --- a/migrations/Migration20240719152506.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Migration } from '@mikro-orm/migrations'; - -export class Migration20240719152506 extends Migration { - - async up(): Promise { - this.addSql('create table "solution" ("id" uuid not null, "description" varchar(255) not null, "name" varchar(60) not null, "slug" varchar(255) not null, constraint "solution_pkey" primary key ("id"));'); - this.addSql('alter table "solution" add constraint "solution_slug_unique" unique ("slug");'); - } - -} diff --git a/migrations/Migration20240720212912.ts b/migrations/Migration20240720212912.ts new file mode 100644 index 00000000..80a14e41 --- /dev/null +++ b/migrations/Migration20240720212912.ts @@ -0,0 +1,144 @@ +import { Migration } from '@mikro-orm/migrations'; + +export class Migration20240720212912 extends Migration { + + async up(): Promise { + this.addSql('create table "product" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "product_pkey" primary key ("id"));'); + + this.addSql('create table "person" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "email" varchar(255) not null, constraint "person_pkey" primary key ("id"));'); + + this.addSql('create table "outcome" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "outcome_pkey" primary key ("id"));'); + + this.addSql('create table "obstacle" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "obstacle_pkey" primary key ("id"));'); + + this.addSql('create table "non_functional_behavior" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "priority" text check ("priority" in (\'MUST\', \'SHOULD\', \'COULD\', \'WONT\')) not null, constraint "non_functional_behavior_pkey" primary key ("id"));'); + + this.addSql('create table "limit" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "limit_pkey" primary key ("id"));'); + + this.addSql('create table "justification" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "justification_pkey" primary key ("id"));'); + + this.addSql('create table "invariant" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "invariant_pkey" primary key ("id"));'); + + this.addSql('create table "hint" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "hint_pkey" primary key ("id"));'); + + this.addSql('create table "glossary_term" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "parent_component_id" uuid null, constraint "glossary_term_pkey" primary key ("id"));'); + + this.addSql('create table "functional_behavior" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "priority" text check ("priority" in (\'MUST\', \'SHOULD\', \'COULD\', \'WONT\')) not null, constraint "functional_behavior_pkey" primary key ("id"));'); + + this.addSql('create table "environment_component" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "parent_component_id" uuid null, constraint "environment_component_pkey" primary key ("id"));'); + + this.addSql('create table "effect" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "effect_pkey" primary key ("id"));'); + + this.addSql('create table "constraint" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "category" text check ("category" in (\'Business Rule\', \'Physical Law\', \'Engineering Decision\')) not null, constraint "constraint_pkey" primary key ("id"));'); + + this.addSql('create table "assumption" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, constraint "assumption_pkey" primary key ("id"));'); + + this.addSql('create table "stakeholder" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "parent_component_id" uuid null, "segmentation" text check ("segmentation" in (\'Client\', \'Vendor\')) not null, "category" text check ("category" in (\'Key Stakeholder\', \'Shadow Influencer\', \'Fellow Traveler\', \'Observer\')) not null, "availability" int not null, "influence" int not null, constraint "stakeholder_pkey" primary key ("id"), constraint stakeholder_availability_check check (availability >= 0 AND availability <= 100), constraint stakeholder_influence_check check (influence >= 0 AND influence <= 100));'); + + this.addSql('create table "use_case" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "priority" text check ("priority" in (\'MUST\', \'SHOULD\', \'COULD\', \'WONT\')) not null, "primary_actor_id" uuid not null, "scope" varchar(255) not null, "level" varchar(255) not null, "goal_in_context" varchar(255) not null, "precondition_id" uuid not null, "trigger_id" varchar(255) not null, "main_success_scenario" varchar(255) not null, "success_guarantee_id" uuid not null, "extensions" varchar(255) not null, constraint "use_case_pkey" primary key ("id"));'); + + this.addSql('create table "user_story" ("id" uuid not null, "name" varchar(255) not null, "statement" varchar(255) not null, "solution_id" uuid not null, "priority" text check ("priority" in (\'MUST\', \'SHOULD\', \'COULD\', \'WONT\')) not null, "primary_actor_id" uuid not null, "functional_behavior_id" uuid not null, "outcome_id" uuid not null, constraint "user_story_pkey" primary key ("id"));'); + + this.addSql('alter table "product" add constraint "product_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "person" add constraint "person_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "outcome" add constraint "outcome_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "obstacle" add constraint "obstacle_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "non_functional_behavior" add constraint "non_functional_behavior_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "limit" add constraint "limit_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "justification" add constraint "justification_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "invariant" add constraint "invariant_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "hint" add constraint "hint_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "glossary_term" add constraint "glossary_term_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + this.addSql('alter table "glossary_term" add constraint "glossary_term_parent_component_id_foreign" foreign key ("parent_component_id") references "glossary_term" ("id") on update cascade on delete set null;'); + + this.addSql('alter table "functional_behavior" add constraint "functional_behavior_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "environment_component" add constraint "environment_component_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + this.addSql('alter table "environment_component" add constraint "environment_component_parent_component_id_foreign" foreign key ("parent_component_id") references "environment_component" ("id") on update cascade on delete set null;'); + + this.addSql('alter table "effect" add constraint "effect_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "constraint" add constraint "constraint_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "assumption" add constraint "assumption_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + + this.addSql('alter table "stakeholder" add constraint "stakeholder_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + this.addSql('alter table "stakeholder" add constraint "stakeholder_parent_component_id_foreign" foreign key ("parent_component_id") references "stakeholder" ("id") on update cascade on delete set null;'); + + this.addSql('alter table "use_case" add constraint "use_case_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + this.addSql('alter table "use_case" add constraint "use_case_primary_actor_id_foreign" foreign key ("primary_actor_id") references "stakeholder" ("id") on update cascade;'); + this.addSql('alter table "use_case" add constraint "use_case_precondition_id_foreign" foreign key ("precondition_id") references "assumption" ("id") on update cascade;'); + this.addSql('alter table "use_case" add constraint "use_case_success_guarantee_id_foreign" foreign key ("success_guarantee_id") references "effect" ("id") on update cascade;'); + + this.addSql('alter table "user_story" add constraint "user_story_solution_id_foreign" foreign key ("solution_id") references "solution" ("id") on update cascade;'); + this.addSql('alter table "user_story" add constraint "user_story_primary_actor_id_foreign" foreign key ("primary_actor_id") references "stakeholder" ("id") on update cascade;'); + this.addSql('alter table "user_story" add constraint "user_story_functional_behavior_id_foreign" foreign key ("functional_behavior_id") references "functional_behavior" ("id") on update cascade;'); + this.addSql('alter table "user_story" add constraint "user_story_outcome_id_foreign" foreign key ("outcome_id") references "outcome" ("id") on update cascade;'); + } + + async down(): Promise { + this.addSql('alter table "user_story" drop constraint "user_story_outcome_id_foreign";'); + + this.addSql('alter table "glossary_term" drop constraint "glossary_term_parent_component_id_foreign";'); + + this.addSql('alter table "user_story" drop constraint "user_story_functional_behavior_id_foreign";'); + + this.addSql('alter table "environment_component" drop constraint "environment_component_parent_component_id_foreign";'); + + this.addSql('alter table "use_case" drop constraint "use_case_success_guarantee_id_foreign";'); + + this.addSql('alter table "use_case" drop constraint "use_case_precondition_id_foreign";'); + + this.addSql('alter table "stakeholder" drop constraint "stakeholder_parent_component_id_foreign";'); + + this.addSql('alter table "use_case" drop constraint "use_case_primary_actor_id_foreign";'); + + this.addSql('alter table "user_story" drop constraint "user_story_primary_actor_id_foreign";'); + + this.addSql('drop table if exists "product" cascade;'); + + this.addSql('drop table if exists "person" cascade;'); + + this.addSql('drop table if exists "outcome" cascade;'); + + this.addSql('drop table if exists "obstacle" cascade;'); + + this.addSql('drop table if exists "non_functional_behavior" cascade;'); + + this.addSql('drop table if exists "limit" cascade;'); + + this.addSql('drop table if exists "justification" cascade;'); + + this.addSql('drop table if exists "invariant" cascade;'); + + this.addSql('drop table if exists "hint" cascade;'); + + this.addSql('drop table if exists "glossary_term" cascade;'); + + this.addSql('drop table if exists "functional_behavior" cascade;'); + + this.addSql('drop table if exists "environment_component" cascade;'); + + this.addSql('drop table if exists "effect" cascade;'); + + this.addSql('drop table if exists "constraint" cascade;'); + + this.addSql('drop table if exists "assumption" cascade;'); + + this.addSql('drop table if exists "stakeholder" cascade;'); + + this.addSql('drop table if exists "use_case" cascade;'); + + this.addSql('drop table if exists "user_story" cascade;'); + } + +} diff --git a/mikro-orm.config.ts b/mikro-orm.config.ts index ab5fb6fa..5cb6d6a4 100644 --- a/mikro-orm.config.ts +++ b/mikro-orm.config.ts @@ -1,21 +1,47 @@ +// This file is referenced by the application as well as the migration CLI +// The CLI use case requires the direct and indirect imports to have a .js extension. +// Additionally, the imports can not use '~' import dotenv from "dotenv"; import { type Options, PostgreSqlDriver } from '@mikro-orm/postgresql'; import { TsMorphMetadataProvider } from '@mikro-orm/reflection'; +import { Migrator } from '@mikro-orm/migrations'; import Solution from './server/domain/Solution.js'; +import Actor from "./server/domain/Actor.js"; +import Assumption from "./server/domain/Assumption.js"; +import Constraint from "./server/domain/Constraint.js"; +import Effect from "./server/domain/Effect.js"; +import EnvironmentComponent from "./server/domain/EnvironmentComponent.js"; +import FunctionalBehavior from "./server/domain/FunctionalBehavior.js"; +import GlossaryTerm from "./server/domain/GlossaryTerm.js"; +import Justification from "./server/domain/Justification.js"; +import Hint from "./server/domain/Hint.js"; +import Invariant from "./server/domain/Invariant.js"; +import Limit from "./server/domain/Limit.js"; +import NonFunctionalBehavior from "./server/domain/NonFunctionalBehavior.js"; +import Obstacle from "./server/domain/Obstacle.js"; +import Outcome from "./server/domain/Outcome.js"; +import Person from "./server/domain/Person.js"; +import Product from "./server/domain/Product.js"; +import Stakeholder from "./server/domain/Stakeholder.js"; +import UseCase from "./server/domain/UseCase.js"; +import UserStory from "./server/domain/UserStory.js"; dotenv.config(); -console.log('CONFIG') -console.log(process.env.POSTGRES_DB) - const config: Options = { + extensions: [Migrator], driver: PostgreSqlDriver, dbName: process.env.POSTGRES_DB!, user: process.env.POSTGRES_USER!, host: process.env.POSTGRES_HOST!, password: process.env.POSTGRES_PASSWORD!, port: parseInt(process.env.POSTGRES_PORT!), - entities: [Solution], + entities: [ + Solution, Actor, Assumption, Constraint, Effect, EnvironmentComponent, + FunctionalBehavior, GlossaryTerm, Justification, Hint, Invariant, Limit, + NonFunctionalBehavior, Obstacle, Outcome, Person, Product, Stakeholder, + UseCase, UserStory + ], forceUtcTimezone: true, // we will use the ts-morph reflection, an alternative to the default reflect-metadata provider // check the documentation for their differences: https://mikro-orm.io/docs/metadata-providers diff --git a/nuxt.config.ts b/nuxt.config.ts index 6431fec6..330b68ff 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -37,6 +37,12 @@ export default defineNuxtConfig({ modules: ["nuxt-primevue", "@vite-pwa/nuxt"], nitro: { preset: 'node-server', + // ref: https://github.com/nuxt/nuxt/issues/21756 + esbuild: { + options: { + target: 'esnext' + } + }, experimental: { // https://nitro.unjs.io/config#openapi openAPI: true @@ -67,6 +73,14 @@ export default defineNuxtConfig({ typeCheck: false }, vite: { - + esbuild: { + tsconfigRaw: { + compilerOptions: { + experimentalDecorators: true, + // @ts-ignore + emitDecoratorMetadata: true + } + } + } } }) \ No newline at end of file diff --git a/package.json b/package.json index 4baed503..6a881db3 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,13 @@ "dev": "nuxt dev --no-fork --inspect", "postinstall": "nuxt prepare", "typecheck": "nuxi typecheck", - "//migrate-up": "tsx server/npm-scripts.ts migrate-up", - "//migrate-down": "tsx server/npm-scripts.ts migrate-down", "orm-debug": "mikro-orm-esm debug", "orm-create-db": "mikro-orm-esm database:create", - "orm-create-initial-migration": "mikro-orm-esm migration:create --initial" + "orm-create-migration": "mikro-orm-esm migration:create", + "orm-list-pending-migrations": "mikro-orm-esm migration:pending", + "orm-list-executed-migrations": "mikro-orm-esm migration:list", + "orm-run-pending-migrations": "mikro-orm-esm migration:up", + "orm-rollback-migration": "mikro-orm-esm migration:down" }, "dependencies": { "@mikro-orm/core": "^6.3.0", @@ -57,4 +59,4 @@ "typescript": "^5.4.5", "vue-tsc": "^1.8.27" } -} +} \ No newline at end of file diff --git a/pages/solution/[slug]/edit-entry.client.vue b/pages/solution/[slug]/edit-entry.client.vue index c538ee9d..61d540c4 100644 --- a/pages/solution/[slug]/edit-entry.client.vue +++ b/pages/solution/[slug]/edit-entry.client.vue @@ -54,7 +54,7 @@ watch(() => solution.value.name, (newName) => {
+ class="w-23rem" v-model.trim="solution.description" />
diff --git a/pages/solution/[slug]/environment/constraints.client.vue b/pages/solution/[slug]/environment/constraints.client.vue index 6ecac01d..3aff3585 100644 --- a/pages/solution/[slug]/environment/constraints.client.vue +++ b/pages/solution/[slug]/environment/constraints.client.vue @@ -2,7 +2,7 @@ import { useFetch } from 'nuxt/app'; import { FilterMatchMode } from 'primevue/api'; import type Constraint from '~/server/domain/Constraint'; -import ConstraintCategory from '~/server/domain/ConstraintCategory'; +import ConstraintCategory from '~/server/domain/Constraint'; import { type Uuid, emptyUuid } from '~/server/domain/Uuid'; useHead({ title: 'Constraints' }) diff --git a/pages/solution/[slug]/goals/functionality.client.vue b/pages/solution/[slug]/goals/functionality.client.vue index 01833505..ae11dfcc 100644 --- a/pages/solution/[slug]/goals/functionality.client.vue +++ b/pages/solution/[slug]/goals/functionality.client.vue @@ -1,6 +1,7 @@