Kenrick Tandrian 4 days ago
committed by GitHub
parent
commit
824491410c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      .config/prisma.ts
  2. 1
      CHANGELOG.md
  3. 6
      apps/api/src/services/prisma/prisma.service.ts
  4. 1
      libs/common/jest.config.ts
  5. 3
      libs/common/src/test-setup.ts
  6. 13368
      package-lock.json
  7. 5
      package.json
  8. 1
      prisma/schema.prisma
  9. 7
      prisma/seed.mts

3
.config/prisma.ts

@ -6,6 +6,9 @@ import { join } from 'node:path';
expand(config({ quiet: true })); expand(config({ quiet: true }));
export default defineConfig({ export default defineConfig({
datasource: {
url: process.env.DATABASE_URL ?? ''
},
migrations: { migrations: {
path: join(__dirname, '..', 'prisma', 'migrations'), path: join(__dirname, '..', 'prisma', 'migrations'),
seed: `node ${join(__dirname, '..', 'prisma', 'seed.mts')}` seed: `node ${join(__dirname, '..', 'prisma', 'seed.mts')}`

1
CHANGELOG.md

@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Increased the numerical precision for cryptocurrency quantities in the holding detail dialog - Increased the numerical precision for cryptocurrency quantities in the holding detail dialog
- Upgraded `envalid` from version `8.1.0` to `8.1.1` - Upgraded `envalid` from version `8.1.0` to `8.1.1`
- Upgraded `prettier` from version `3.7.3` to `3.7.4` - Upgraded `prettier` from version `3.7.3` to `3.7.4`
- Upgraded `prisma` from version `6.19.0` to `7.0.1`
## 2.221.0 - 2025-12-01 ## 2.221.0 - 2025-12-01

6
apps/api/src/services/prisma/prisma.service.ts

@ -6,6 +6,7 @@ import {
OnModuleInit OnModuleInit
} from '@nestjs/common'; } from '@nestjs/common';
import { ConfigService } from '@nestjs/config'; import { ConfigService } from '@nestjs/config';
import { PrismaPg } from '@prisma/adapter-pg';
import { Prisma, PrismaClient } from '@prisma/client'; import { Prisma, PrismaClient } from '@prisma/client';
@Injectable() @Injectable()
@ -14,6 +15,10 @@ export class PrismaService
implements OnModuleInit, OnModuleDestroy implements OnModuleInit, OnModuleDestroy
{ {
public constructor(configService: ConfigService) { public constructor(configService: ConfigService) {
const adapter = new PrismaPg({
connectionString: configService.get<string>('DATABASE_URL')
});
let customLogLevels: LogLevel[]; let customLogLevels: LogLevel[];
try { try {
@ -28,6 +33,7 @@ export class PrismaService
: []; : [];
super({ super({
adapter,
log, log,
errorFormat: 'colorless' errorFormat: 'colorless'
}); });

1
libs/common/jest.config.ts

@ -2,6 +2,7 @@
export default { export default {
displayName: 'common', displayName: 'common',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {}, globals: {},
transform: { transform: {
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }] '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }]

3
libs/common/src/test-setup.ts

@ -0,0 +1,3 @@
import { TextEncoder, TextDecoder } from 'node:util';
Object.assign(global, { TextDecoder, TextEncoder });

13368
package-lock.json

File diff suppressed because it is too large

5
package.json

@ -82,7 +82,8 @@
"@nestjs/schedule": "6.0.1", "@nestjs/schedule": "6.0.1",
"@nestjs/serve-static": "5.0.4", "@nestjs/serve-static": "5.0.4",
"@openrouter/ai-sdk-provider": "0.7.2", "@openrouter/ai-sdk-provider": "0.7.2",
"@prisma/client": "6.19.0", "@prisma/adapter-pg": "7.0.1",
"@prisma/client": "7.0.1",
"@simplewebauthn/browser": "13.1.0", "@simplewebauthn/browser": "13.1.0",
"@simplewebauthn/server": "13.1.1", "@simplewebauthn/server": "13.1.1",
"@stripe/stripe-js": "7.9.0", "@stripe/stripe-js": "7.9.0",
@ -186,7 +187,7 @@
"nx": "21.5.1", "nx": "21.5.1",
"prettier": "3.7.4", "prettier": "3.7.4",
"prettier-plugin-organize-attributes": "1.0.0", "prettier-plugin-organize-attributes": "1.0.0",
"prisma": "6.19.0", "prisma": "7.0.1",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"replace-in-file": "8.3.0", "replace-in-file": "8.3.0",

1
prisma/schema.prisma

@ -6,7 +6,6 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("DATABASE_URL")
} }
model Access { model Access {

7
prisma/seed.mts

@ -1,6 +1,11 @@
import { PrismaPg } from '@prisma/adapter-pg';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient(); const adapter = new PrismaPg({
connectionString: process.env.DATABASE_URL
});
const prisma = new PrismaClient({ adapter });
async function main() { async function main() {
await prisma.tag.createMany({ await prisma.tag.createMany({

Loading…
Cancel
Save