From 804fe3c440f4f580806567cfeb5449b4cfbf8fe2 Mon Sep 17 00:00:00 2001 From: Axel Rindle Date: Sat, 7 Sep 2024 15:53:21 +0200 Subject: [PATCH 1/2] split prisma schema into multiple files --- api/package.json | 6 +- api/prisma/schema.prisma | 360 ------------------- api/prisma/schema/Account.prisma | 26 ++ api/prisma/schema/Activity.prisma | 19 + api/prisma/schema/Address.prisma | 17 + api/prisma/schema/Anmeldung.prisma | 22 ++ api/prisma/schema/CustomField.prisma | 41 +++ api/prisma/schema/Gliederung.prisma | 8 + api/prisma/schema/GliederungToAccount.prisma | 16 + api/prisma/schema/Hostname.prisma | 5 + api/prisma/schema/Mahlzeit.prisma | 14 + api/prisma/schema/Person.prisma | 129 +++++++ api/prisma/schema/Unterveranstaltung.prisma | 21 ++ api/prisma/schema/Veranstaltung.prisma | 22 ++ api/prisma/schema/_main.prisma | 9 + package-lock.json | 322 ++++++++++------- 16 files changed, 551 insertions(+), 486 deletions(-) delete mode 100644 api/prisma/schema.prisma create mode 100644 api/prisma/schema/Account.prisma create mode 100644 api/prisma/schema/Activity.prisma create mode 100644 api/prisma/schema/Address.prisma create mode 100644 api/prisma/schema/Anmeldung.prisma create mode 100644 api/prisma/schema/CustomField.prisma create mode 100644 api/prisma/schema/Gliederung.prisma create mode 100644 api/prisma/schema/GliederungToAccount.prisma create mode 100644 api/prisma/schema/Hostname.prisma create mode 100644 api/prisma/schema/Mahlzeit.prisma create mode 100644 api/prisma/schema/Person.prisma create mode 100644 api/prisma/schema/Unterveranstaltung.prisma create mode 100644 api/prisma/schema/Veranstaltung.prisma create mode 100644 api/prisma/schema/_main.prisma diff --git a/api/package.json b/api/package.json index f9cbbea7..b2dee567 100644 --- a/api/package.json +++ b/api/package.json @@ -26,8 +26,8 @@ "@faker-js/faker": "^8.4.1", "@koa/cors": "^5.0.0", "@koa/router": "^12.0.1", - "@prisma/client": "^5.6.0", - "@prisma/extension-accelerate": "^0.6.3", + "@prisma/client": "^5.19.1", + "@prisma/extension-accelerate": "^1.1.0", "@sendgrid/mail": "^8.1.0", "@trpc/server": "^10.28.1", "config": "^3.3.9", @@ -60,7 +60,7 @@ "@types/koa-router": "^7.4.8", "@types/node": "^20.11.1", "edge-runtime": "^2.5.8", - "prisma": "^5.6.0", + "prisma": "^5.19.1", "tsx": "^4.2.0", "typescript": "^5.3.2" } diff --git a/api/prisma/schema.prisma b/api/prisma/schema.prisma deleted file mode 100644 index 9f405b99..00000000 --- a/api/prisma/schema.prisma +++ /dev/null @@ -1,360 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" - previewFeatures = ["fullTextSearch"] -} - -datasource db { - provider = "postgres" - url = env("DATABASE_URL") -} - -enum AccountStatus { - OFFEN - AKTIV - DEAKTIVIERT -} - -enum Role { - GLIEDERUNG_ADMIN - ADMIN -} - -enum Gender { - MALE - FEMALE - UNSPECIFIED -} - -enum Essgewohnheit { - OMNIVOR - VEGETARISCH - VEGAN -} - -enum NahrungsmittelIntoleranz { - SCHWEIN - GLUTEN - LAKTOSE - FRUCTOSE -} - -enum QualificationFahrerlaubnis { - B - BE - C - CE - D1 - D - D1E - DE - T - L -} - -enum QualificationSchwimmer { - BRONZE - SILBER - GOLD - JUNIORRETTER - RETTUNGSSCHWIMMER_BRONZE - RETTUNGSSCHWIMMER_SILBER - RETTUNGSSCHWIMMER_GOLD -} - -enum QualificationErsteHilfe { - EINWEISER_EHSH - AUSBILDER_EHSH_MODUL_1_2 - AUSBILDER_EHSH_MODUL_3 - MODULE_1 - MODULE_2 - MODULE_3 - AUSBILDUNG - KINDERNOTFAELLE - BILDUNGS_UND_BETREUUNGSEINRICHTUNGEN_KINDER - AUSBILDER -} - -enum QualificationSanitaeter { - SAN_A - SAN_B - FORTBILDUNG - AUSBILDER -} - -enum QualificationFunk { - DLRG_SPRECHFUNKER - BOS_SPRECHFUNKER_ANALOG - BOS_SPRECHFUNKER_DIGITAL - AUSBILDER_SPRECHFUNK - AUSBILDER_BOS_SPRECHFUNK - MULTIPLIKATOR_SPRECHFUNK - MULTIPLIKATOR_BOS_SPRECHFUNK - EINSATZFAEHIGKEIT -} - -enum Konfektionsgroesse { - JUNIOR_98_104 - JUNIOR_110_116 - JUNIOR_122_128 - JUNIOR_134_140 - JUNIOR_146_152 - JUNIOR_158_164 - XS - S - M - L - XL - XXL - XXXL -} - -model Hostname { - id Int @id @default(autoincrement()) - hostname String - veranstaltung Veranstaltung[] -} - -model Notfallkontakt { - id Int @id @default(autoincrement()) - firstname String - lastname String - telefon String - istErziehungsberechtigt Boolean @default(false) - personId Int - person Person @relation(fields: [personId], references: [id], onDelete: Cascade) -} - -model Person { - id Int @id @default(autoincrement()) - firstname String - lastname String - birthday DateTime? @db.Date - gender Gender? - email String - telefon String - anmeldungen Anmeldung[] - gliederungId Int? - gliederung Gliederung? @relation(fields: [gliederungId], references: [id], onDelete: SetNull) - account Account? - essgewohnheit Essgewohnheit? - nahrungsmittelIntoleranzen NahrungsmittelIntoleranz[] - weitereIntoleranzen String[] - qualifikationenFahrerlaubnis QualificationFahrerlaubnis[] - qualifikationenSchwimmer QualificationSchwimmer[] - qualifikationenErsteHilfe QualificationErsteHilfe[] - qualifikationenSanitaeter QualificationSanitaeter[] - qualifikationenFunk QualificationFunk[] - konfektionsgroesse Konfektionsgroesse? - notfallkontaktIds Int[] - notfallkontakte Notfallkontakt[] - addressId Int? - address Address? @relation(fields: [addressId], references: [id], onDelete: Cascade) -} - -model Account { - id Int @id @default(autoincrement()) - email String @unique - dlrgOauthId String? @unique - password String? - role Role - personId Int @unique - person Person @relation(fields: [personId], references: [id], onDelete: Cascade) - activatedAt DateTime? - GliederungToAccount GliederungToAccount[] - activationToken String? @unique - status AccountStatus @default(OFFEN) - passwordResetToken String? @unique - activities Activity[] -} - -model Gliederung { - id Int @id @default(autoincrement()) - name String - edv String @unique - unterveranstaltungen Unterveranstaltung[] - personen Person[] - GliederungToAccount GliederungToAccount[] -} - -enum GliederungAccountRole { - DELEGATIONSLEITER - BETREUER - TEILNEHMER -} - -model GliederungToAccount { - id Int @id @default(autoincrement()) - gliederungId Int - gliederung Gliederung @relation(fields: [gliederungId], references: [id], onDelete: Cascade) - accountId Int - account Account @relation(fields: [accountId], references: [id], onDelete: Cascade) - role GliederungAccountRole - - @@unique([gliederungId, accountId]) -} - -enum AnmeldungStatus { - OFFEN - BESTAETIGT - STORNIERT - ABGELEHNT -} - -model Anmeldung { - id Int @id @default(autoincrement()) - unterveranstaltungId Int - unterveranstaltung Unterveranstaltung @relation(fields: [unterveranstaltungId], references: [id], onDelete: Cascade) - personId Int - person Person @relation(fields: [personId], references: [id], onDelete: Cascade) - status AnmeldungStatus @default(OFFEN) - mahlzeitenIds Int[] - mahlzeiten Mahlzeit[] - uebernachtungsTage DateTime[] @db.Date - tshirtBestellt Boolean @default(false) - comment String? - createdAt DateTime @default(now()) - customFieldValues CustomFieldValue[] -} - -model Address { - id Int @id @default(autoincrement()) - street String - number String - zip String - city String - Ort Ort[] - Person Person[] -} - -model Ort { - id Int @id @default(autoincrement()) - name String - addressId Int? - address Address? @relation(fields: [addressId], references: [id], onDelete: SetNull) - Veranstaltung Veranstaltung[] -} - -model Veranstaltung { - id Int @id @default(autoincrement()) - name String - beginn DateTime @db.Date - ende DateTime @db.Date - meldebeginn DateTime - meldeschluss DateTime - ortId Int? - ort Ort? @relation(fields: [ortId], references: [id], onDelete: SetNull) - maxTeilnehmende Int - teilnahmegebuehr Int - unterveranstaltungen Unterveranstaltung[] - mahlzeiten Mahlzeit[] - beschreibung String? - datenschutz String? - teilnahmeBedingungen String? - teilnahmeBedingungenPublic String? - zielgruppe String? - hostnameId Int? - hostname Hostname? @relation(fields: [hostnameId], references: [id]) - customFields CustomField[] -} - -enum MahlzeitType { - FRUEHSTUECK - MITTAGESSEN - ABENDESSEN -} - -model Mahlzeit { - id Int @id @default(autoincrement()) - type MahlzeitType - date DateTime @db.Date - veranstaltungId Int - veranstaltung Veranstaltung @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) - anmeldung Anmeldung[] -} - -enum UnterveranstaltungType { - CREW - GLIEDERUNG -} - -model Unterveranstaltung { - id Int @id @default(autoincrement()) - maxTeilnehmende Int - teilnahmegebuehr Int - meldebeginn DateTime - meldeschluss DateTime - veranstaltungId Int - veranstaltung Veranstaltung @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) - gliederungId Int - gliederung Gliederung @relation(fields: [gliederungId], references: [id], onDelete: Cascade) - Anmeldung Anmeldung[] - beschreibung String? - bedingungen String? - type UnterveranstaltungType @default(GLIEDERUNG) - customFields CustomField[] -} - -enum ActivityType { - CREATE - UPDATE - DELETE - EMAIL - OTHER -} - -model Activity { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - type ActivityType - description String? - subjectType String - subjectId Int? - causerId Int? - causer Account? @relation(fields: [causerId], references: [id], onDelete: SetNull) - metadata Json @default("{}") -} - -enum CustomFieldType { - BASIC_INPUT - BASIC_TEXT_AREA - BASIC_EDITOR - BASIC_SWITCH - BASIC_CHECKBOX - BASIC_INPUT_NUMBER - BASIC_RADIO - BASIC_SELECT - BASIC_DROPDOWN -} - -enum CustomFieldPosition { - PUBLIC_ANMELDUNG - INTERN_ANMELDUNG -} - -model CustomField { - id Int @id @default(autoincrement()) - name String - description String? - type CustomFieldType - required Boolean @default(false) - options String[] - role Role[] - values CustomFieldValue[] - positions CustomFieldPosition[] - veranstaltungId Int? - unterveranstaltungId Int? - veranstaltung Veranstaltung? @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) - unterveranstaltung Unterveranstaltung? @relation(fields: [unterveranstaltungId], references: [id], onDelete: Cascade) -} - -model CustomFieldValue { - id Int @id @default(autoincrement()) - value Json @default("{}") - fieldId Int - field CustomField @relation(fields: [fieldId], references: [id], onDelete: Cascade) - anmeldungId Int? - anmeldung Anmeldung? @relation(fields: [anmeldungId], references: [id], onDelete: Cascade) -} diff --git a/api/prisma/schema/Account.prisma b/api/prisma/schema/Account.prisma new file mode 100644 index 00000000..003164b2 --- /dev/null +++ b/api/prisma/schema/Account.prisma @@ -0,0 +1,26 @@ +enum Role { + GLIEDERUNG_ADMIN + ADMIN +} + +enum AccountStatus { + OFFEN + AKTIV + DEAKTIVIERT +} + +model Account { + id Int @id @default(autoincrement()) + email String @unique + dlrgOauthId String? @unique + password String? + role Role + personId Int @unique + person Person @relation(fields: [personId], references: [id], onDelete: Cascade) + activatedAt DateTime? + GliederungToAccount GliederungToAccount[] + activationToken String? @unique + status AccountStatus @default(OFFEN) + passwordResetToken String? @unique + activities Activity[] +} diff --git a/api/prisma/schema/Activity.prisma b/api/prisma/schema/Activity.prisma new file mode 100644 index 00000000..a345d84b --- /dev/null +++ b/api/prisma/schema/Activity.prisma @@ -0,0 +1,19 @@ +enum ActivityType { + CREATE + UPDATE + DELETE + EMAIL + OTHER +} + +model Activity { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + type ActivityType + description String? + subjectType String + subjectId Int? + causerId Int? + causer Account? @relation(fields: [causerId], references: [id], onDelete: SetNull) + metadata Json @default("{}") +} diff --git a/api/prisma/schema/Address.prisma b/api/prisma/schema/Address.prisma new file mode 100644 index 00000000..512f8dea --- /dev/null +++ b/api/prisma/schema/Address.prisma @@ -0,0 +1,17 @@ +model Address { + id Int @id @default(autoincrement()) + street String + number String + zip String + city String + Ort Ort[] + Person Person[] +} + +model Ort { + id Int @id @default(autoincrement()) + name String + addressId Int? + address Address? @relation(fields: [addressId], references: [id], onDelete: SetNull) + Veranstaltung Veranstaltung[] +} diff --git a/api/prisma/schema/Anmeldung.prisma b/api/prisma/schema/Anmeldung.prisma new file mode 100644 index 00000000..3377c388 --- /dev/null +++ b/api/prisma/schema/Anmeldung.prisma @@ -0,0 +1,22 @@ +enum AnmeldungStatus { + OFFEN + BESTAETIGT + STORNIERT + ABGELEHNT +} + +model Anmeldung { + id Int @id @default(autoincrement()) + unterveranstaltungId Int + unterveranstaltung Unterveranstaltung @relation(fields: [unterveranstaltungId], references: [id], onDelete: Cascade) + personId Int + person Person @relation(fields: [personId], references: [id], onDelete: Cascade) + status AnmeldungStatus @default(OFFEN) + mahlzeitenIds Int[] + mahlzeiten Mahlzeit[] + uebernachtungsTage DateTime[] @db.Date + tshirtBestellt Boolean @default(false) + comment String? + createdAt DateTime @default(now()) + customFieldValues CustomFieldValue[] +} diff --git a/api/prisma/schema/CustomField.prisma b/api/prisma/schema/CustomField.prisma new file mode 100644 index 00000000..a06b4cd2 --- /dev/null +++ b/api/prisma/schema/CustomField.prisma @@ -0,0 +1,41 @@ +enum CustomFieldType { + BASIC_INPUT + BASIC_TEXT_AREA + BASIC_EDITOR + BASIC_SWITCH + BASIC_CHECKBOX + BASIC_INPUT_NUMBER + BASIC_RADIO + BASIC_SELECT + BASIC_DROPDOWN +} + +enum CustomFieldPosition { + PUBLIC_ANMELDUNG + INTERN_ANMELDUNG +} + +model CustomField { + id Int @id @default(autoincrement()) + name String + description String? + type CustomFieldType + required Boolean @default(false) + options String[] + role Role[] + values CustomFieldValue[] + positions CustomFieldPosition[] + veranstaltungId Int? + unterveranstaltungId Int? + veranstaltung Veranstaltung? @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) + unterveranstaltung Unterveranstaltung? @relation(fields: [unterveranstaltungId], references: [id], onDelete: Cascade) +} + +model CustomFieldValue { + id Int @id @default(autoincrement()) + value Json @default("{}") + fieldId Int + field CustomField @relation(fields: [fieldId], references: [id], onDelete: Cascade) + anmeldungId Int? + anmeldung Anmeldung? @relation(fields: [anmeldungId], references: [id], onDelete: Cascade) +} diff --git a/api/prisma/schema/Gliederung.prisma b/api/prisma/schema/Gliederung.prisma new file mode 100644 index 00000000..7478a2c5 --- /dev/null +++ b/api/prisma/schema/Gliederung.prisma @@ -0,0 +1,8 @@ +model Gliederung { + id Int @id @default(autoincrement()) + name String + edv String @unique + unterveranstaltungen Unterveranstaltung[] + personen Person[] + GliederungToAccount GliederungToAccount[] +} diff --git a/api/prisma/schema/GliederungToAccount.prisma b/api/prisma/schema/GliederungToAccount.prisma new file mode 100644 index 00000000..f91d51a9 --- /dev/null +++ b/api/prisma/schema/GliederungToAccount.prisma @@ -0,0 +1,16 @@ +enum GliederungAccountRole { + DELEGATIONSLEITER + BETREUER + TEILNEHMER +} + +model GliederungToAccount { + id Int @id @default(autoincrement()) + gliederungId Int + gliederung Gliederung @relation(fields: [gliederungId], references: [id], onDelete: Cascade) + accountId Int + account Account @relation(fields: [accountId], references: [id], onDelete: Cascade) + role GliederungAccountRole + + @@unique([gliederungId, accountId]) +} diff --git a/api/prisma/schema/Hostname.prisma b/api/prisma/schema/Hostname.prisma new file mode 100644 index 00000000..1ec2d477 --- /dev/null +++ b/api/prisma/schema/Hostname.prisma @@ -0,0 +1,5 @@ +model Hostname { + id Int @id @default(autoincrement()) + hostname String + veranstaltung Veranstaltung[] +} diff --git a/api/prisma/schema/Mahlzeit.prisma b/api/prisma/schema/Mahlzeit.prisma new file mode 100644 index 00000000..31f56189 --- /dev/null +++ b/api/prisma/schema/Mahlzeit.prisma @@ -0,0 +1,14 @@ +enum MahlzeitType { + FRUEHSTUECK + MITTAGESSEN + ABENDESSEN +} + +model Mahlzeit { + id Int @id @default(autoincrement()) + type MahlzeitType + date DateTime @db.Date + veranstaltungId Int + veranstaltung Veranstaltung @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) + anmeldung Anmeldung[] +} diff --git a/api/prisma/schema/Person.prisma b/api/prisma/schema/Person.prisma new file mode 100644 index 00000000..3139dcda --- /dev/null +++ b/api/prisma/schema/Person.prisma @@ -0,0 +1,129 @@ +//region Enums + +enum Gender { + MALE + FEMALE + UNSPECIFIED +} + +enum Essgewohnheit { + OMNIVOR + VEGETARISCH + VEGAN +} + +enum NahrungsmittelIntoleranz { + SCHWEIN + GLUTEN + LAKTOSE + FRUCTOSE +} + +enum QualificationFahrerlaubnis { + B + BE + C + CE + D1 + D + D1E + DE + T + L +} + +enum QualificationSchwimmer { + BRONZE + SILBER + GOLD + JUNIORRETTER + RETTUNGSSCHWIMMER_BRONZE + RETTUNGSSCHWIMMER_SILBER + RETTUNGSSCHWIMMER_GOLD +} + +enum QualificationErsteHilfe { + EINWEISER_EHSH + AUSBILDER_EHSH_MODUL_1_2 + AUSBILDER_EHSH_MODUL_3 + MODULE_1 + MODULE_2 + MODULE_3 + AUSBILDUNG + KINDERNOTFAELLE + BILDUNGS_UND_BETREUUNGSEINRICHTUNGEN_KINDER + AUSBILDER +} + +enum QualificationSanitaeter { + SAN_A + SAN_B + FORTBILDUNG + AUSBILDER +} + +enum QualificationFunk { + DLRG_SPRECHFUNKER + BOS_SPRECHFUNKER_ANALOG + BOS_SPRECHFUNKER_DIGITAL + AUSBILDER_SPRECHFUNK + AUSBILDER_BOS_SPRECHFUNK + MULTIPLIKATOR_SPRECHFUNK + MULTIPLIKATOR_BOS_SPRECHFUNK + EINSATZFAEHIGKEIT +} + +enum Konfektionsgroesse { + JUNIOR_98_104 + JUNIOR_110_116 + JUNIOR_122_128 + JUNIOR_134_140 + JUNIOR_146_152 + JUNIOR_158_164 + XS + S + M + L + XL + XXL + XXXL +} + +//endregion + +model Person { + id Int @id @default(autoincrement()) + firstname String + lastname String + birthday DateTime? @db.Date + gender Gender? + email String + telefon String + anmeldungen Anmeldung[] + gliederungId Int? + gliederung Gliederung? @relation(fields: [gliederungId], references: [id], onDelete: SetNull) + account Account? + essgewohnheit Essgewohnheit? + nahrungsmittelIntoleranzen NahrungsmittelIntoleranz[] + weitereIntoleranzen String[] + qualifikationenFahrerlaubnis QualificationFahrerlaubnis[] + qualifikationenSchwimmer QualificationSchwimmer[] + qualifikationenErsteHilfe QualificationErsteHilfe[] + qualifikationenSanitaeter QualificationSanitaeter[] + qualifikationenFunk QualificationFunk[] + konfektionsgroesse Konfektionsgroesse? + notfallkontaktIds Int[] + notfallkontakte Notfallkontakt[] + addressId Int? + address Address? @relation(fields: [addressId], references: [id], onDelete: Cascade) +} + +model Notfallkontakt { + id Int @id @default(autoincrement()) + firstname String + lastname String + telefon String + istErziehungsberechtigt Boolean @default(false) + personId Int + person Person @relation(fields: [personId], references: [id], onDelete: Cascade) +} diff --git a/api/prisma/schema/Unterveranstaltung.prisma b/api/prisma/schema/Unterveranstaltung.prisma new file mode 100644 index 00000000..a828e671 --- /dev/null +++ b/api/prisma/schema/Unterveranstaltung.prisma @@ -0,0 +1,21 @@ +enum UnterveranstaltungType { + CREW + GLIEDERUNG +} + +model Unterveranstaltung { + id Int @id @default(autoincrement()) + maxTeilnehmende Int + teilnahmegebuehr Int + meldebeginn DateTime + meldeschluss DateTime + veranstaltungId Int + veranstaltung Veranstaltung @relation(fields: [veranstaltungId], references: [id], onDelete: Cascade) + gliederungId Int + gliederung Gliederung @relation(fields: [gliederungId], references: [id], onDelete: Cascade) + Anmeldung Anmeldung[] + beschreibung String? + bedingungen String? + type UnterveranstaltungType @default(GLIEDERUNG) + customFields CustomField[] +} diff --git a/api/prisma/schema/Veranstaltung.prisma b/api/prisma/schema/Veranstaltung.prisma new file mode 100644 index 00000000..6df0d30e --- /dev/null +++ b/api/prisma/schema/Veranstaltung.prisma @@ -0,0 +1,22 @@ +model Veranstaltung { + id Int @id @default(autoincrement()) + name String + beginn DateTime @db.Date + ende DateTime @db.Date + meldebeginn DateTime + meldeschluss DateTime + ortId Int? + ort Ort? @relation(fields: [ortId], references: [id], onDelete: SetNull) + maxTeilnehmende Int + teilnahmegebuehr Int + unterveranstaltungen Unterveranstaltung[] + mahlzeiten Mahlzeit[] + beschreibung String? + datenschutz String? + teilnahmeBedingungen String? + teilnahmeBedingungenPublic String? + zielgruppe String? + hostnameId Int? + hostname Hostname? @relation(fields: [hostnameId], references: [id]) + customFields CustomField[] +} diff --git a/api/prisma/schema/_main.prisma b/api/prisma/schema/_main.prisma new file mode 100644 index 00000000..8ed44ec5 --- /dev/null +++ b/api/prisma/schema/_main.prisma @@ -0,0 +1,9 @@ +generator client { + provider = "prisma-client-js" + previewFeatures = ["fullTextSearch", "prismaSchemaFolder"] +} + +datasource db { + provider = "postgres" + url = env("DATABASE_URL") +} diff --git a/package-lock.json b/package-lock.json index d60f9faa..7fd1bf9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,8 +49,8 @@ "@faker-js/faker": "^8.4.1", "@koa/cors": "^5.0.0", "@koa/router": "^12.0.1", - "@prisma/client": "^5.6.0", - "@prisma/extension-accelerate": "^0.6.3", + "@prisma/client": "^5.19.1", + "@prisma/extension-accelerate": "^1.1.0", "@sendgrid/mail": "^8.1.0", "@trpc/server": "^10.28.1", "config": "^3.3.9", @@ -83,7 +83,7 @@ "@types/koa-router": "^7.4.8", "@types/node": "^20.11.1", "edge-runtime": "^2.5.8", - "prisma": "^5.6.0", + "prisma": "^5.19.1", "tsx": "^4.2.0", "typescript": "^5.3.2" } @@ -324,10 +324,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -346,6 +368,20 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/types": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@codeanker/api": { "resolved": "api", "link": true @@ -1613,9 +1649,10 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -1749,10 +1786,11 @@ } }, "node_modules/@prisma/client": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.11.0.tgz", - "integrity": "sha512-SWshvS5FDXvgJKM/a0y9nDC1rqd7KG0Q6ZVzd+U7ZXK5soe73DJxJJgbNBt2GNXOa+ysWB4suTpdK5zfFPhwiw==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.19.1.tgz", + "integrity": "sha512-x30GFguInsgt+4z5I4WbkZP2CGpotJMUXy+Gl/aaUjHn2o1DnLYNTA+q9XdYmAQZM8fIIkvUiA2NpgosM3fneg==", "hasInstallScript": true, + "license": "Apache-2.0", "engines": { "node": ">=16.13" }, @@ -1766,34 +1804,37 @@ } }, "node_modules/@prisma/debug": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.11.0.tgz", - "integrity": "sha512-N6yYr3AbQqaiUg+OgjkdPp3KPW1vMTAgtKX6+BiB/qB2i1TjLYCrweKcUjzOoRM5BriA4idrkTej9A9QqTfl3A==", - "devOptional": true + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.19.1.tgz", + "integrity": "sha512-lAG6A6QnG2AskAukIEucYJZxxcSqKsMK74ZFVfCTOM/7UiyJQi48v6TQ47d6qKG3LbMslqOvnTX25dj/qvclGg==", + "devOptional": true, + "license": "Apache-2.0" }, "node_modules/@prisma/engines": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.11.0.tgz", - "integrity": "sha512-gbrpQoBTYWXDRqD+iTYMirDlF9MMlQdxskQXbhARhG6A/uFQjB7DZMYocMQLoiZXO/IskfDOZpPoZE8TBQKtEw==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.19.1.tgz", + "integrity": "sha512-kR/PoxZDrfUmbbXqqb8SlBBgCjvGaJYMCOe189PEYzq9rKqitQ2fvT/VJ8PDSe8tTNxhc2KzsCfCAL+Iwm/7Cg==", "devOptional": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "5.11.0", - "@prisma/engines-version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102", - "@prisma/fetch-engine": "5.11.0", - "@prisma/get-platform": "5.11.0" + "@prisma/debug": "5.19.1", + "@prisma/engines-version": "5.19.1-2.69d742ee20b815d88e17e54db4a2a7a3b30324e3", + "@prisma/fetch-engine": "5.19.1", + "@prisma/get-platform": "5.19.1" } }, "node_modules/@prisma/engines-version": { - "version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102.tgz", - "integrity": "sha512-WXCuyoymvrS4zLz4wQagSsc3/nE6CHy8znyiMv8RKazKymOMd5o9FP5RGwGHAtgoxd+aB/BWqxuP/Ckfu7/3MA==", - "devOptional": true + "version": "5.19.1-2.69d742ee20b815d88e17e54db4a2a7a3b30324e3", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.19.1-2.69d742ee20b815d88e17e54db4a2a7a3b30324e3.tgz", + "integrity": "sha512-xR6rt+z5LnNqTP5BBc+8+ySgf4WNMimOKXRn6xfNRDSpHvbOEmd7+qAOmzCrddEc4Cp8nFC0txU14dstjH7FXA==", + "devOptional": true, + "license": "Apache-2.0" }, "node_modules/@prisma/extension-accelerate": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@prisma/extension-accelerate/-/extension-accelerate-0.6.3.tgz", - "integrity": "sha512-KnIfqbwCNMP3t1jgw76IVCE4HspRmWxagR0L4wJS+/74BgkRHrt/9ic8ONo7dir4AGGoHyg/Ej8yN+uGXNrXeg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@prisma/extension-accelerate/-/extension-accelerate-1.1.0.tgz", + "integrity": "sha512-sESjhBZ4ywQjAVpKzsfhxyNu+9txIM5I6M1MPBaJBq/xDlqmniIAhlwIEt9KLtO80zqPxqbZYes18zrkgYqNiQ==", "engines": { "node": ">=16" }, @@ -1802,23 +1843,25 @@ } }, "node_modules/@prisma/fetch-engine": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.11.0.tgz", - "integrity": "sha512-994viazmHTJ1ymzvWugXod7dZ42T2ROeFuH6zHPcUfp/69+6cl5r9u3NFb6bW8lLdNjwLYEVPeu3hWzxpZeC0w==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.19.1.tgz", + "integrity": "sha512-pCq74rtlOVJfn4pLmdJj+eI4P7w2dugOnnTXpRilP/6n5b2aZiA4ulJlE0ddCbTPkfHmOL9BfaRgA8o+1rfdHw==", "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "5.11.0", - "@prisma/engines-version": "5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102", - "@prisma/get-platform": "5.11.0" + "@prisma/debug": "5.19.1", + "@prisma/engines-version": "5.19.1-2.69d742ee20b815d88e17e54db4a2a7a3b30324e3", + "@prisma/get-platform": "5.19.1" } }, "node_modules/@prisma/get-platform": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.11.0.tgz", - "integrity": "sha512-rxtHpMLxNTHxqWuGOLzR2QOyQi79rK1u1XYAVLZxDGTLz/A+uoDnjz9veBFlicrpWjwuieM4N6jcnjj/DDoidw==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.19.1.tgz", + "integrity": "sha512-sCeoJ+7yt0UjnR+AXZL7vXlg5eNxaFOwC23h0KvW1YIXUoa7+W2ZcAUhoEQBmJTW4GrFqCuZ8YSP0mkDa4k3Zg==", "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "5.11.0" + "@prisma/debug": "5.19.1" } }, "node_modules/@remirror/core-constants": { @@ -3148,55 +3191,60 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.21.tgz", - "integrity": "sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.3.tgz", + "integrity": "sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==", + "license": "MIT", "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/shared": "3.4.21", + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.3", "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.21.tgz", - "integrity": "sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.3.tgz", + "integrity": "sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==", + "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-core": "3.5.3", + "@vue/shared": "3.5.3" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.21.tgz", - "integrity": "sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==", - "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/compiler-core": "3.4.21", - "@vue/compiler-dom": "3.4.21", - "@vue/compiler-ssr": "3.4.21", - "@vue/shared": "3.4.21", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.3.tgz", + "integrity": "sha512-P3uATLny2tfyvMB04OQFe7Sczteno7SLFxwrOA/dw01pBWQHB5HL15a8PosoNX2aG/EAMGqnXTu+1LnmzFhpTQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.3", + "@vue/compiler-dom": "3.5.3", + "@vue/compiler-ssr": "3.5.3", + "@vue/shared": "3.5.3", "estree-walker": "^2.0.2", - "magic-string": "^0.30.7", - "postcss": "^8.4.35", - "source-map-js": "^1.0.2" + "magic-string": "^0.30.11", + "postcss": "^8.4.44", + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.21.tgz", - "integrity": "sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.3.tgz", + "integrity": "sha512-F/5f+r2WzL/2YAPl7UlKcJWHrvoZN8XwEBLnT7S4BXwncH25iDOabhO2M2DWioyTguJAGavDOawejkFXj8EM1w==", + "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-dom": "3.5.3", + "@vue/shared": "3.5.3" } }, "node_modules/@vue/devtools-api": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.1.tgz", - "integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==" + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.3.tgz", + "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==", + "license": "MIT" }, "node_modules/@vue/devtools-kit": { "version": "7.0.20", @@ -3247,48 +3295,54 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.21.tgz", - "integrity": "sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.3.tgz", + "integrity": "sha512-2w61UnRWTP7+rj1H/j6FH706gRBHdFVpIqEkSDAyIpafBXYH8xt4gttstbbCWdU3OlcSWO8/3mbKl/93/HSMpw==", + "license": "MIT", "dependencies": { - "@vue/shared": "3.4.21" + "@vue/shared": "3.5.3" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.21.tgz", - "integrity": "sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.3.tgz", + "integrity": "sha512-5b2AQw5OZlmCzSsSBWYoZOsy75N4UdMWenTfDdI5bAzXnuVR7iR8Q4AOzQm2OGoA41xjk53VQKrqQhOz2ktWaw==", + "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/reactivity": "3.5.3", + "@vue/shared": "3.5.3" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.21.tgz", - "integrity": "sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.3.tgz", + "integrity": "sha512-wPR1DEGc3XnQ7yHbmkTt3GoY0cEnVGQnARRdAkDzZ8MbUKEs26gogCQo6AOvvgahfjIcnvWJzkZArQ1fmWjcSg==", + "license": "MIT", "dependencies": { - "@vue/runtime-core": "3.4.21", - "@vue/shared": "3.4.21", + "@vue/reactivity": "3.5.3", + "@vue/runtime-core": "3.5.3", + "@vue/shared": "3.5.3", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.21.tgz", - "integrity": "sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.3.tgz", + "integrity": "sha512-28volmaZVG2PGO3V3+gBPKoSHvLlE8FGfG/GKXKkjjfxLuj/50B/0OQGakM/g6ehQeqCrZYM4eHC4Ks48eig1Q==", + "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-ssr": "3.5.3", + "@vue/shared": "3.5.3" }, "peerDependencies": { - "vue": "3.4.21" + "vue": "3.5.3" } }, "node_modules/@vue/shared": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.21.tgz", - "integrity": "sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==" + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.3.tgz", + "integrity": "sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==", + "license": "MIT" }, "node_modules/@vuepic/vue-datepicker": { "version": "4.5.1", @@ -4658,7 +4712,8 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" }, "node_modules/data-view-buffer": { "version": "1.0.1", @@ -5637,7 +5692,8 @@ "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==" + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" }, "node_modules/esutils": { "version": "2.0.3", @@ -7884,14 +7940,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.8", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/mark.js": { @@ -8714,9 +8768,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.45", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz", + "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==", "funding": [ { "type": "opencollective", @@ -8731,9 +8785,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { @@ -8843,6 +8898,12 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "node_modules/postcss/node_modules/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "license": "ISC" + }, "node_modules/preact": { "version": "10.20.1", "resolved": "https://registry.npmjs.org/preact/-/preact-10.20.1.tgz", @@ -9003,19 +9064,23 @@ } }, "node_modules/prisma": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.11.0.tgz", - "integrity": "sha512-KCLiug2cs0Je7kGkQBN9jDWoZ90ogE/kvZTUTgz2h94FEo8pczCkPH7fPNXkD1sGU7Yh65risGGD1HQ5DF3r3g==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.19.1.tgz", + "integrity": "sha512-c5K9MiDaa+VAAyh1OiYk76PXOme9s3E992D7kvvIOhCrNsBQfy2mP2QAQtX0WNj140IgG++12kwZpYB9iIydNQ==", "devOptional": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/engines": "5.11.0" + "@prisma/engines": "5.19.1" }, "bin": { "prisma": "build/index.js" }, "engines": { "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" } }, "node_modules/process": { @@ -10383,6 +10448,15 @@ "node": ">=0.6.0" } }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -11861,15 +11935,16 @@ } }, "node_modules/vue": { - "version": "3.4.21", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.21.tgz", - "integrity": "sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.3.tgz", + "integrity": "sha512-xvRbd0HpuLovYbOHXRHlSBsSvmUJbo0pzbkKTApWnQGf3/cu5Z39mQeA5cZdLRVIoNf3zI6MSoOgHUT5i2jO+Q==", + "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.21", - "@vue/compiler-sfc": "3.4.21", - "@vue/runtime-dom": "3.4.21", - "@vue/server-renderer": "3.4.21", - "@vue/shared": "3.4.21" + "@vue/compiler-dom": "3.5.3", + "@vue/compiler-sfc": "3.5.3", + "@vue/runtime-dom": "3.5.3", + "@vue/server-renderer": "3.5.3", + "@vue/shared": "3.5.3" }, "peerDependencies": { "typescript": "*" @@ -11905,11 +11980,12 @@ } }, "node_modules/vue-router": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.3.0.tgz", - "integrity": "sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.3.tgz", + "integrity": "sha512-sv6wmNKx2j3aqJQDMxLFzs/u/mjA9Z5LCgy6BE0f7yFWMjrPLnS/sPNn8ARY/FXw6byV18EFutn5lTO6+UsV5A==", + "license": "MIT", "dependencies": { - "@vue/devtools-api": "^6.5.1" + "@vue/devtools-api": "^6.6.3" }, "funding": { "url": "https://github.com/sponsors/posva" From 4b5d8054c164c3adbbf434b00ff69c9a2cd6f429 Mon Sep 17 00:00:00 2001 From: Axel Rindle Date: Sun, 8 Sep 2024 09:10:32 +0200 Subject: [PATCH 2/2] fix Dockerfile --- Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f9294b4..4f41149d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM node:20-alpine3.17 AS workspace-base + ENV CI=true ENV HUSKY=0 @@ -14,28 +15,28 @@ COPY vendor/ ./vendor/ COPY package*.json ./ -RUN npm ci COPY . ./ +RUN npm ci RUN npm run postinstall --workspace ./api ENV TZ=Europe/Berlin RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ARG commitHash -ENV COMMIT_HASH $commitHash +ENV COMMIT_HASH=$commitHash ARG version -ENV VERSION $version +ENV VERSION=$version -FROM api-build-stage as api-production-stage +FROM api-build-stage AS api-production-stage CMD [ "npm", "start", "-w", "./api"] -FROM workspace-base as frontend-build-stage -ARG tenant -ENV VITE_APP_COMMIT_HASH $commitHash -ENV VITE_APP_VERSION $version +FROM workspace-base AS frontend-build-stage + +ENV VITE_APP_COMMIT_HASH=$commitHash +ENV VITE_APP_VERSION=$version RUN npm run build --workspace ./frontend -FROM workspace-base as api-build-stage +FROM workspace-base AS api-build-stage # todo packing # RUN npm run build --workspace ./api