mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore(server): hoist deps (#12145)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated workflow to move the node_modules directory during the build process. - Adjusted Prisma client output directory for improved file organization. - Removed unused properties from backend server package configuration. - **Refactor** - Simplified type annotations for improved code clarity in test utilities. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -12,6 +12,7 @@ import { faker } from '@faker-js/faker';
|
||||
import { hash } from '@node-rs/argon2';
|
||||
import type { BrowserContext, Cookie, Page } from '@playwright/test';
|
||||
import { expect } from '@playwright/test';
|
||||
import { type PrismaClient } from '@prisma/client';
|
||||
import type { Assertions } from 'ava';
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -57,12 +58,7 @@ const server = new Package('@affine/server');
|
||||
const require = createRequire(server.srcPath.join('index.ts').toFileUrl());
|
||||
|
||||
export const runPrisma = async <T>(
|
||||
cb: (
|
||||
prisma: InstanceType<
|
||||
// oxlint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||
typeof import('../../../../packages/backend/server/node_modules/@prisma/client').PrismaClient
|
||||
>
|
||||
) => Promise<T>
|
||||
cb: (prisma: PrismaClient) => Promise<T>
|
||||
): Promise<T> => {
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const client = new PrismaClient({
|
||||
|
||||
Reference in New Issue
Block a user