update dependencies, attempt to fix server restart issue

This commit is contained in:
Amruth Pillai
2023-04-20 22:33:11 +02:00
parent ed710f6fe5
commit 036b2917a6
12 changed files with 1588 additions and 1243 deletions

View File

@ -13,25 +13,25 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@hello-pangea/dnd": "^16.2.0",
"@hookform/resolvers": "3.0.1",
"@monaco-editor/react": "^4.4.6",
"@hookform/resolvers": "3.1.0",
"@monaco-editor/react": "^4.5.0",
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.125",
"@mui/material": "^5.11.16",
"@mui/system": "^5.11.16",
"@mui/x-date-pickers": "6.0.4",
"@react-oauth/google": "^0.9.0",
"@reduxjs/toolkit": "^1.9.3",
"axios": "^1.3.5",
"@mui/lab": "^5.0.0-alpha.127",
"@mui/material": "^5.12.1",
"@mui/system": "^5.12.1",
"@mui/x-date-pickers": "6.2.1",
"@react-oauth/google": "^0.10.0",
"@reduxjs/toolkit": "^1.9.5",
"axios": "^1.3.6",
"clsx": "^1.2.1",
"dayjs": "^1.11.7",
"downloadjs": "^1.4.7",
"joi": "^17.9.1",
"lodash": "^4.17.21",
"md5-hex": "^4.0.0",
"monaco-editor": "^0.37.0",
"monaco-editor": "^0.37.1",
"nanoid": "3.3.4",
"next": "13.2.4",
"next": "13.3.0",
"next-i18next": "^13.2.2",
"react": "^18.2.0",
"react-colorful": "^5.6.1",
@ -41,10 +41,10 @@
"react-hook-form": "^7.43.9",
"react-hot-toast": "2.4.0",
"react-icons": "^4.8.0",
"react-markdown": "^8.0.6",
"react-markdown": "^8.0.7",
"react-query": "^3.39.3",
"react-redux": "^8.0.5",
"react-zoom-pan-pinch": "^3.0.6",
"react-zoom-pan-pinch": "^3.0.7",
"redux": "^4.2.1",
"redux-persist": "^6.0.0",
"redux-saga": "^1.2.3",
@ -61,22 +61,22 @@
"@reactive-resume/schema": "workspace:*",
"@tailwindcss/typography": "^0.5.9",
"@types/downloadjs": "^1.4.3",
"@types/lodash": "^4.14.192",
"@types/node": "^18.15.11",
"@types/react": "^18.0.33",
"@types/lodash": "^4.14.194",
"@types/node": "^18.15.12",
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"@types/react-redux": "^7.1.25",
"@types/uuid": "^9.0.1",
"@types/webfontloader": "^1.6.35",
"autoprefixer": "^10.4.14",
"csstype": "^3.1.2",
"eslint-config-next": "^13.2.4",
"eslint-config-next": "^13.3.0",
"eslint-plugin-tailwindcss": "^3.11.0",
"eslint-plugin-unused-imports": "^2.0.0",
"next-sitemap": "^4.0.6",
"postcss": "^8.4.21",
"sass": "^1.60.0",
"next-sitemap": "^4.0.7",
"postcss": "^8.4.23",
"sass": "^1.62.0",
"tailwindcss": "^3.3.1",
"typescript": "^5.0.3"
"typescript": "^5.0.4"
}
}

View File

@ -6,7 +6,7 @@
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version pnpm run --recursive --parallel --stream dev",
"build": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version pnpm run --recursive --parallel build",
"start": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version pnpm run --recursive --parallel --stream start",
"update-deps": "ncu -x nanoid --deep -u && pnpm install",
"update": "ncu -x nanoid --deep -u && pnpm install",
"generate-env": "ts-node ./scripts/generate-env.ts",
"format": "prettier --write .",
"lint": "pnpm run --recursive --parallel lint"
@ -23,16 +23,16 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"eslint": "^8.37.0",
"@types/node": "^18.15.12",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"eslint": "^8.38.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-simple-import-sort": "^10.0.0",
"npm-check-updates": "^16.10.7",
"npm-check-updates": "^16.10.8",
"prettier": "^2.8.7",
"ts-node": "^10.9.1",
"typescript": "^5.0.3"
"typescript": "^5.0.4"
},
"resolutions": {
"@types/react": "17.0.2",

2714
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"build": "tsc"
},
"devDependencies": {
"eslint": "^8.37.0",
"typescript": "^5.0.3"
"eslint": "^8.38.0",
"typescript": "^5.0.4"
}
}

View File

@ -1,5 +1,19 @@
{
"extends": "../.eslintrc.json",
"plugins": ["unused-imports"],
"ignorePatterns": ["dist"],
"env": { "node": true }
"env": { "node": true },
"rules": {
// Unused Imports
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
]
}
}

View File

@ -8,8 +8,9 @@
"start": "node dist/main"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.306.0",
"@aws-sdk/client-s3": "^3.317.0",
"@nestjs/axios": "^2.0.0",
"@nestjs/cache-manager": "^1.0.0",
"@nestjs/common": "^9.4.0",
"@nestjs/config": "^2.3.1",
"@nestjs/core": "^9.4.0",
@ -41,33 +42,34 @@
"passport-local": "^1.0.0",
"pdf-lib": "^1.17.1",
"pg": "^8.10.0",
"playwright-chromium": "^1.32.2",
"playwright-chromium": "^1.32.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.4.1",
"rimraf": "^5.0.0",
"rxjs": "^7.8.0",
"typeorm": "0.3.13",
"typeorm": "0.3.15",
"uuid": "^9.0.0"
},
"devDependencies": {
"@nestjs/cli": "^9.3.0",
"@nestjs/cli": "^9.4.0",
"@nestjs/schematics": "^9.1.0",
"@reactive-resume/schema": "workspace:*",
"@types/bcryptjs": "^2.4.2",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.17",
"@types/lodash": "^4.14.192",
"@types/lodash": "^4.14.194",
"@types/multer": "^1.4.7",
"@types/node": "^18.15.11",
"@types/node": "^18.15.12",
"@types/nodemailer": "^6.4.7",
"@types/passport-jwt": "^3.0.8",
"@types/passport-local": "^1.0.35",
"@types/uuid": "^9.0.1",
"eslint-plugin-unused-imports": "^2.0.0",
"prettier": "^2.8.7",
"source-map-support": "^0.5.21",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.0.3",
"webpack": "^5.78.0"
"typescript": "^5.0.4",
"webpack": "^5.80.0"
}
}

View File

@ -6,7 +6,6 @@ import { compareSync, hashSync } from 'bcryptjs';
import { OAuth2Client } from 'google-auth-library';
import { PostgresErrorCode } from '@/database/errorCodes.enum';
import { ResumeService } from '@/resume/resume.service';
import { CreateGoogleUserDto } from '@/users/dto/create-google-user.dto';
import { User } from '@/users/entities/user.entity';
import { UsersService } from '@/users/users.service';

View File

@ -1,4 +1,4 @@
import { IsNotEmpty, IsString, MinLength } from 'class-validator';
import { IsNotEmpty, IsString } from 'class-validator';
export class UpdateProfileDto {
@IsString()

View File

@ -1,5 +1,6 @@
import { HttpModule } from '@nestjs/axios';
import { CacheModule, Module } from '@nestjs/common';
import { CacheModule } from '@nestjs/cache-manager';
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { FontsController } from './fonts.controller';

View File

@ -1,5 +1,5 @@
import { Controller, Get } from '@nestjs/common';
import { HealthCheck, HealthCheckService, HttpHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
import { HealthCheck, HealthCheckService, TypeOrmHealthIndicator } from '@nestjs/terminus';
@Controller('health')
export class HealthController {

View File

@ -1,4 +1,4 @@
import { Controller, Get, InternalServerErrorException, Param, Query } from '@nestjs/common';
import { Controller, Get, Param, Query } from '@nestjs/common';
import { PrinterService } from './printer.service';

View File

@ -252,10 +252,10 @@ export class ResumeService {
const publicUrl = urlPrefix + key;
await this.s3Client.send(
new PutObjectCommand({
Bucket: this.configService.get<string>('storage.bucket'),
Key: key,
Body: file.buffer,
ACL: 'public-read',
Bucket: this.configService.get<string>('storage.bucket'),
})
);
updatedResume = set(resume, 'basics.photo.url', publicUrl);
@ -283,14 +283,15 @@ export class ResumeService {
const resume = await this.findOne(id, userId);
const publicUrl = resume.basics.photo.url;
if (!publicUrl || publicUrl === '') return;
if (this.s3Enabled) {
const urlPrefix = this.configService.get<string>('storage.urlPrefix');
const key = publicUrl.replace(urlPrefix, '');
await this.s3Client.send(
new DeleteObjectCommand({
Bucket: this.configService.get<string>('storage.bucket'),
Key: key,
Bucket: this.configService.get<string>('storage.bucket'),
})
);
} else {
@ -299,9 +300,7 @@ export class ResumeService {
const isValidFile = (await fs.stat(filePath)).isFile();
if (isValidFile) {
await fs.unlink(filePath);
}
if (isValidFile) await fs.unlink(filePath);
}
const updatedResume = set(resume, 'basics.photo.url', '');