Skip to content

Commit

Permalink
Fix #184 fix db entities (#188)
Browse files Browse the repository at this point in the history
* fix: primary key를 uuid로 변경

* fix: cascading 에러 수정

* fix: tag lotus 사이 다대다 관계 분리

* fix: 미사용 tag 자동 삭제 추가, 동일 태그 추가되는 버그 수정

* fix: synchronize 주석 처리

* fix: history page over 에러처리 추가

* fix: 불필요한 console.log 삭제

* fix: queue config 패스워드 추가
  • Loading branch information
kimhji authored and ATeals committed Dec 3, 2024
1 parent 5e84d2f commit fc9f487
Show file tree
Hide file tree
Showing 36 changed files with 1,699 additions and 1,571 deletions.
182 changes: 91 additions & 91 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
{
"name": "backend",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"lint-staged": {
"*.ts": [
"eslint --fix",
"prettier --write"
]
},
"dependencies": {
"@nestjs/bull": "^10.2.2",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^8.0.7",
"@nestjs/typeorm": "^10.0.2",
"bull": "^4.16.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"dockerode": "^4.0.2",
"dotenv": "^16.4.5",
"mysql2": "^3.11.4",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"swagger-ui-express": "^5.0.1",
"tar-stream": "^3.1.7",
"typeorm": "^0.3.20"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/config": "^3.3.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-no-relative-import-paths": "^1.5.5",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
{
"name": "backend",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"lint-staged": {
"*.ts": [
"eslint --fix",
"prettier --write"
]
},
"dependencies": {
"@nestjs/bull": "^10.2.2",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^8.0.7",
"@nestjs/typeorm": "^10.0.2",
"bull": "^4.16.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"dockerode": "^4.0.2",
"dotenv": "^16.4.5",
"mysql2": "^3.11.4",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"swagger-ui-express": "^5.0.1",
"tar-stream": "^3.1.7",
"typeorm": "^0.3.20"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/config": "^3.3.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-no-relative-import-paths": "^1.5.5",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
84 changes: 42 additions & 42 deletions apps/backend/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import { BullModule } from '@nestjs/bull';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AuthModule } from './auth/auth.module';
import { queueConfig } from './config/queue.config';
import { typeORMConfig } from './config/typeorm.config';
import { DockerModule } from './docker/docker.module';
import { GistModule } from './gist/gist.module';
import { HistoryModule } from './history/history.module';
import { LotusModule } from './lotus/lotus.module';
import { TagModule } from './tag/tag.module';
import { UserModule } from './user/user.module';

@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
envFilePath: '.env'
}),
TypeOrmModule.forRootAsync({
inject: [ConfigService],
useFactory: typeORMConfig
}),
BullModule.forRootAsync({
inject: [ConfigService],
useFactory: queueConfig
}),
DockerModule,
GistModule,
HistoryModule,
UserModule,
AuthModule,
LotusModule,
TagModule
],
controllers: [AppController],
providers: [AppService]
})
export class AppModule {}
import { BullModule } from '@nestjs/bull';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AuthModule } from './auth/auth.module';
import { queueConfig } from './config/queue.config';
import { typeORMConfig } from './config/typeorm.config';
import { DockerModule } from './docker/docker.module';
import { GistModule } from './gist/gist.module';
import { HistoryModule } from './history/history.module';
import { LotusModule } from './lotus/lotus.module';
import { TagModule } from './tag/tag.module';
import { UserModule } from './user/user.module';

@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
envFilePath: '.env'
}),
TypeOrmModule.forRootAsync({
inject: [ConfigService],
useFactory: typeORMConfig
}),
BullModule.forRootAsync({
inject: [ConfigService],
useFactory: queueConfig
}),
DockerModule,
GistModule,
HistoryModule,
UserModule,
AuthModule,
LotusModule,
TagModule
],
controllers: [AppController],
providers: [AppService]
})
export class AppModule {}
40 changes: 20 additions & 20 deletions apps/backend/src/auth/auth.module.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { Global, Module, forwardRef } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { AuthService } from './auth.service';
import { UserModule } from '@/user/user.module';

@Global()
@Module({
imports: [
JwtModule.register({
signOptions: {
algorithm: 'HS256',
expiresIn: '1h'
}
}),
forwardRef(() => UserModule)
],
providers: [AuthService],
exports: [AuthService]
})
export class AuthModule {}
import { Global, Module, forwardRef } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { AuthService } from './auth.service';
import { UserModule } from '@/user/user.module';

@Global()
@Module({
imports: [
JwtModule.register({
signOptions: {
algorithm: 'HS256',
expiresIn: '1h'
}
}),
forwardRef(() => UserModule)
],
providers: [AuthService],
exports: [AuthService]
})
export class AuthModule {}
Loading

0 comments on commit fc9f487

Please sign in to comment.