mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 07:36:42 +08: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:
@@ -253,6 +253,9 @@ jobs:
|
||||
- name: Generate Prisma client
|
||||
run: yarn workspace @affine/server prisma generate
|
||||
|
||||
- name: Mv node_modules
|
||||
run: mv ./node_modules ./packages/backend/server
|
||||
|
||||
- name: Setup Version
|
||||
id: version
|
||||
uses: ./.github/actions/setup-version
|
||||
|
||||
@@ -177,9 +177,5 @@
|
||||
"**/*.spec.ts",
|
||||
"**/*.e2e.ts"
|
||||
]
|
||||
},
|
||||
"stableVersion": "0.5.3",
|
||||
"installConfig": {
|
||||
"hoistingLimits": "workspaces"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
output = "./node_modules/.prisma/client"
|
||||
output = "../../../node_modules/.prisma/client"
|
||||
binaryTargets = ["native", "debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x"]
|
||||
previewFeatures = ["metrics", "relationJoins", "nativeDistinct", "postgresqlExtensions"]
|
||||
}
|
||||
|
||||
@@ -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