initial commit
Some checks failed
CI / Go — node-agent tests (push) Has been cancelled
CI / Go — edge-gateway build (push) Has been cancelled
CI / Node — lint, typecheck, test, build (push) Has been cancelled

This commit is contained in:
smueller
2026-06-26 10:45:08 +02:00
commit e37ea87b35
118 changed files with 7726 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
export { PrismaClient, Prisma } from '@prisma/client';
export type {
User,
UserCredential,
UserSession,
PlatformRole,
UserPlatformRole,
GameServer,
GameServerStateTransition,
GameNode,
GameNodeHeartbeat,
Plan,
FeatureFlag,
SystemSetting,
AuditEvent,
JobRecord,
} from '@prisma/client';
import { PrismaClient } from '@prisma/client';
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};
export const prisma =
globalForPrisma.prisma ??
new PrismaClient({
log:
process.env['LOG_LEVEL'] === 'debug'
? ['query', 'info', 'warn', 'error']
: ['warn', 'error'],
});
if (process.env['NODE_ENV'] !== 'production') {
globalForPrisma.prisma = prisma;
}
export function createPrismaClient(): PrismaClient {
return new PrismaClient();
}