diff --git a/components/Alert.tsx b/components/Alert.tsx index f83593e..3dac430 100644 --- a/components/Alert.tsx +++ b/components/Alert.tsx @@ -1,5 +1,5 @@ import { Trans } from "@lingui/macro"; -import { Alert as DBAlert } from "@prisma/client"; +import { Alert as DBAlert } from "../src/generated/client"; import GlobalIcon from "@rsuite/icons/Global"; import Image from "next/image"; import Link from "next/link"; diff --git a/components/editor/EditorSinglePage.tsx b/components/editor/EditorSinglePage.tsx index b3fec5f..68a315a 100644 --- a/components/editor/EditorSinglePage.tsx +++ b/components/editor/EditorSinglePage.tsx @@ -1,5 +1,5 @@ import { t, Trans } from "@lingui/macro"; -import { AlertStatus, Role } from "@prisma/client"; +import { AlertStatus, Role } from "../../src/generated/client"; import { ShareOutline } from "@rsuite/icons"; import "ol/ol.css"; import { useState } from "react"; diff --git a/components/editor/fields/References.tsx b/components/editor/fields/References.tsx index ebaacd9..a7e4278 100644 --- a/components/editor/fields/References.tsx +++ b/components/editor/fields/References.tsx @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { Alert } from "@prisma/client"; +import { Alert } from "../../../src/generated/client"; import { DropdownField, FieldProps } from "./common"; import { useToasterI18n } from "../../../lib/useToasterI18n"; import { useState } from "react"; diff --git a/lib/helpers.server.ts b/lib/helpers.server.ts index 70aac02..2a59af7 100644 --- a/lib/helpers.server.ts +++ b/lib/helpers.server.ts @@ -1,4 +1,4 @@ -import { AlertingAuthority } from "@prisma/client"; +import { AlertingAuthority } from "../src/generated/client"; import { XMLParser } from "fast-xml-parser"; import { createHash } from "node:crypto"; diff --git a/lib/prisma.ts b/lib/prisma.ts index 54afb94..f363a77 100644 --- a/lib/prisma.ts +++ b/lib/prisma.ts @@ -1,4 +1,4 @@ -import { PrismaClient } from "@prisma/client"; +import { PrismaClient } from "../src/generated/client"; declare global { var prisma: PrismaClient | undefined; diff --git a/lib/types/types.ts b/lib/types/types.ts index 7b67839..7b72986 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -1,4 +1,4 @@ -import { Role } from "@prisma/client"; +import { Role } from "../../src/generated/client"; import { DefaultSession } from "next-auth"; export type Resource = { diff --git a/lib/xml/helpers.ts b/lib/xml/helpers.ts index 6e42f21..9b60210 100644 --- a/lib/xml/helpers.ts +++ b/lib/xml/helpers.ts @@ -1,4 +1,4 @@ -import { Alert } from "@prisma/client"; +import { Alert } from "../../src/generated/client"; import { Capgen } from "capgen"; import { XMLBuilder } from "fast-xml-parser"; diff --git a/lib/xml/sign.ts b/lib/xml/sign.ts index c596824..6a6a9ab 100644 --- a/lib/xml/sign.ts +++ b/lib/xml/sign.ts @@ -1,7 +1,7 @@ import { webcrypto } from "node:crypto"; import { Application, Parse, SignedXml } from "xmldsigjs"; -import { Alert } from "@prisma/client"; +import { Alert } from "../../src/generated/client"; import { getPrivateKey } from "../crypto"; import { formatAlertAsXML } from "./helpers"; import { CAPV12JSONSchema } from "../types/cap.schema"; diff --git a/pages/api/alerts/[alertId]/index.ts b/pages/api/alerts/[alertId]/index.ts index 7216940..2fe7018 100644 --- a/pages/api/alerts/[alertId]/index.ts +++ b/pages/api/alerts/[alertId]/index.ts @@ -1,4 +1,4 @@ -import { Prisma } from "@prisma/client"; +import { Prisma } from "../../../../src/generated/client"; import type { NextApiRequest, NextApiResponse } from "next"; import { getServerSession } from "next-auth"; import { ApiError } from "next/dist/server/api-utils"; diff --git a/pages/api/alerts/alertingAuthorities/[alertingAuthorityId]/index.ts b/pages/api/alerts/alertingAuthorities/[alertingAuthorityId]/index.ts index d7ca82e..1865688 100644 --- a/pages/api/alerts/alertingAuthorities/[alertingAuthorityId]/index.ts +++ b/pages/api/alerts/alertingAuthorities/[alertingAuthorityId]/index.ts @@ -1,4 +1,4 @@ -import { Prisma } from "@prisma/client"; +import { Prisma } from "../../../../../src/generated/client"; import { randomUUID } from "crypto"; import type { NextApiRequest, NextApiResponse } from "next"; import { getServerSession } from "next-auth"; diff --git a/pages/api/user/alertingAuthorities.ts b/pages/api/user/alertingAuthorities.ts index 7741aad..af08d27 100644 --- a/pages/api/user/alertingAuthorities.ts +++ b/pages/api/user/alertingAuthorities.ts @@ -1,4 +1,4 @@ -import { AlertingAuthority } from "@prisma/client"; +import { AlertingAuthority } from "../../../src/generated/client"; import { randomBytes, randomUUID } from "crypto"; import type { NextApiRequest, NextApiResponse } from "next"; import { getServerSession } from "next-auth"; diff --git a/pages/editor/[[...alertId]].tsx b/pages/editor/[[...alertId]].tsx index 0d22a17..7a3e571 100644 --- a/pages/editor/[[...alertId]].tsx +++ b/pages/editor/[[...alertId]].tsx @@ -1,5 +1,5 @@ import { t, Trans } from "@lingui/macro"; -import { Alert, AlertStatus } from "@prisma/client"; +import { AlertStatus } from "../../src/generated/client"; import { GetServerSideProps } from "next"; import { getServerSession, Session } from "next-auth"; import { useSession } from "next-auth/react"; diff --git a/pages/index.tsx b/pages/index.tsx index 669c3fa..68f64e2 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,5 @@ import { t, Trans } from "@lingui/macro"; -import { Alert as DBAlert } from "@prisma/client"; +import { Alert as DBAlert } from "../src/generated/client"; import { useSession } from "next-auth/react"; import Head from "next/head"; import Link from "next/link"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a0c3bb1..98ae38d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,6 +1,6 @@ generator client { provider = "prisma-client-js" - output = "../node_modules/.prisma/client" + output = "../src/generated/client" } generator erd { diff --git a/tests/api/setup.ts b/tests/api/setup.ts index d11f187..017303b 100644 --- a/tests/api/setup.ts +++ b/tests/api/setup.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, jest } from "@jest/globals"; -import { Prisma, PrismaClient } from "@prisma/client"; +import { Prisma, PrismaClient } from "../../src/generated/client"; import { spawnSync } from "child_process"; import { randomUUID } from "crypto"; import path from "path"; diff --git a/tests/e2e/editor-admin.test.ts b/tests/e2e/editor-admin.test.ts index 704c5f3..7d59c69 100644 --- a/tests/e2e/editor-admin.test.ts +++ b/tests/e2e/editor-admin.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, test } from "@jest/globals"; -import { Prisma } from "@prisma/client"; +import { Prisma } from "../../src/generated/client"; import { randomUUID } from "crypto"; import { DateTime } from "luxon"; import { getDocument, queries } from "pptr-testing-library"; diff --git a/tests/e2e/editor-approver.test.ts b/tests/e2e/editor-approver.test.ts index 1072bbb..2005b62 100644 --- a/tests/e2e/editor-approver.test.ts +++ b/tests/e2e/editor-approver.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, test } from "@jest/globals"; -import { Prisma } from "@prisma/client"; +import { Prisma } from "../../src/generated/client"; import { randomUUID } from "crypto"; import { DateTime } from "luxon"; import { getDocument, queries } from "pptr-testing-library"; diff --git a/tests/e2e/editor-composer.test.ts b/tests/e2e/editor-composer.test.ts index 8fdc1f7..942f467 100644 --- a/tests/e2e/editor-composer.test.ts +++ b/tests/e2e/editor-composer.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, test } from "@jest/globals"; -import { Prisma } from "@prisma/client"; +import { Prisma } from "../../src/generated/client"; import { randomUUID } from "crypto"; import { DateTime } from "luxon"; import { getDocument, queries } from "pptr-testing-library"; diff --git a/tests/e2e/editor.test.ts b/tests/e2e/editor.test.ts index c9534dd..a35020a 100644 --- a/tests/e2e/editor.test.ts +++ b/tests/e2e/editor.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, test } from "@jest/globals"; -import { Alert } from "@prisma/client"; +import { Alert } from "../../src/generated/client"; import { randomUUID } from "crypto"; import { getDocument, queries } from "pptr-testing-library"; import { ElementHandle } from "puppeteer"; diff --git a/tests/e2e/helpers.ts b/tests/e2e/helpers.ts index 4256a88..da227a0 100644 --- a/tests/e2e/helpers.ts +++ b/tests/e2e/helpers.ts @@ -1,5 +1,5 @@ import { expect } from "@jest/globals"; -import { Role } from "@prisma/client"; +import { Role } from "../../src/generated/client"; import { getDocument, queries } from "pptr-testing-library"; import { ElementHandle } from "puppeteer"; import quotedPrintable from "quoted-printable"; diff --git a/tests/e2e/index.test.ts b/tests/e2e/index.test.ts index 543fb11..176b481 100644 --- a/tests/e2e/index.test.ts +++ b/tests/e2e/index.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, test } from "@jest/globals"; -import { User } from "@prisma/client"; +import { User } from "../../src/generated/client"; import { randomUUID } from "crypto"; import { getDocument, queries } from "pptr-testing-library"; import { ElementHandle } from "puppeteer"; diff --git a/tests/e2e/setup.ts b/tests/e2e/setup.ts index a8f4a0f..fc99c64 100644 --- a/tests/e2e/setup.ts +++ b/tests/e2e/setup.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, jest } from "@jest/globals"; -import { Prisma, PrismaClient } from "@prisma/client"; +import { Prisma, PrismaClient } from "../../src/generated/client"; import { spawnSync } from "child_process"; import path from "path"; diff --git a/tests/frontend/Alert.test.tsx b/tests/frontend/Alert.test.tsx index 2ccb4d6..cb95c49 100644 --- a/tests/frontend/Alert.test.tsx +++ b/tests/frontend/Alert.test.tsx @@ -1,7 +1,7 @@ import { describe, expect, test } from "@jest/globals"; import { i18n } from "@lingui/core"; import { I18nProvider } from "@lingui/react"; -import { Alert as DBAlert } from "@prisma/client"; +import { Alert as DBAlert } from "../../src/generated/client"; import "@testing-library/jest-dom"; import { render, screen } from "@testing-library/react"; import { randomUUID } from "crypto"; @@ -17,7 +17,10 @@ i18n.load({ en: messages }); i18n.activate("en"); const TestingProvider = ({ children }: any) => { return ( - + {children} );