This commit is contained in:
polaris
2024-06-29 02:25:52 -04:00
parent f6c5710335
commit 60824969ec
59 changed files with 96 additions and 95 deletions

View File

@ -1,8 +1,8 @@
import { PrismaClient as daphnisClient } from "@/prisma/schemas/daphnis/generated/daphnis";
import { PrismaClient as lachesisClient } from "@/prisma/schemas/lachesis/generated/lachesis";
import { PrismaClient as artemisClient } from "@/prisma/schemas/artemis/generated/artemis";
const daphnisSingleton = () => {
return new daphnisClient();
const lachesisSingleton = () => {
return new lachesisClient();
};
const aremisSingleton = () => {
@ -10,11 +10,11 @@ const aremisSingleton = () => {
};
declare global {
var daphnis: undefined | ReturnType<typeof daphnisSingleton>;
var lachesis: undefined | ReturnType<typeof lachesisSingleton>;
var artemis: undefined | ReturnType<typeof aremisSingleton>;
}
export const daphnis = globalThis.daphnis ?? daphnisSingleton();
export const lachesis = globalThis.lachesis ?? lachesisSingleton();
export const artemis = globalThis.artemis ?? aremisSingleton();
if (process.env.NODE_ENV !== "production") globalThis.daphnis = daphnis;
if (process.env.NODE_ENV !== "production") globalThis.lachesis = lachesis;