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:
forehalo
2025-05-06 11:36:30 +00:00
parent 8940151ffe
commit 0ffa6fbe89
4 changed files with 6 additions and 11 deletions

View File

@@ -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({