Skip to content

Commit

Permalink
update dependencies, fix import sample resume issue, update pnpm version
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed May 21, 2024
1 parent 696f6f7 commit 748b509
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v3.0.0
with:
version: 9.1.1
version: 9.1.2

- name: Setup Node.js
uses: actions/setup-node@v4.0.2
Expand Down
5 changes: 2 additions & 3 deletions apps/client/src/pages/dashboard/resumes/_dialogs/resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,10 @@ export const ResumeDialog = () => {

const onCreateSample = async () => {
const randomName = generateRandomName();
const { title, slug } = form.getValues();

await duplicateResume({
title: title || randomName,
slug: slug ?? kebabCase(randomName),
title: randomName,
slug: kebabCase(randomName),
data: sampleResume,
});

Expand Down
12 changes: 9 additions & 3 deletions apps/server/src/resume/resume.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import {
import { ApiTags } from "@nestjs/swagger";
import { User as UserEntity } from "@prisma/client";
import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library";
import { CreateResumeDto, ImportResumeDto, ResumeDto, UpdateResumeDto } from "@reactive-resume/dto";
import {
CreateResumeDto,
importResumeSchema,
ResumeDto,
UpdateResumeDto,
} from "@reactive-resume/dto";
import { resumeDataSchema } from "@reactive-resume/schema";
import { ErrorMessage } from "@reactive-resume/utils";
import { zodToJsonSchema } from "zod-to-json-schema";
Expand Down Expand Up @@ -54,9 +59,10 @@ export class ResumeController {

@Post("import")
@UseGuards(TwoFactorGuard)
async import(@User() user: UserEntity, @Body() importResumeDto: ImportResumeDto) {
async import(@User() user: UserEntity, @Body() importResumeDto: unknown) {
try {
return await this.resumeService.import(user.id, importResumeDto);
const result = importResumeSchema.parse(importResumeDto);
return await this.resumeService.import(user.id, result);
} catch (error) {
if (error instanceof PrismaClientKnownRequestError && error.code === "P2002") {
throw new BadRequestException(ErrorMessage.ResumeSlugAlreadyExists);
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@reactive-resume/source",
"description": "A free and open-source resume builder that simplifies the process of creating, updating, and sharing your resume.",
"version": "4.1.4",
"version": "4.1.5",
"license": "MIT",
"private": true,
"author": {
Expand Down Expand Up @@ -79,8 +79,8 @@
"@types/react-is": "18.3.0",
"@types/retry": "^0.12.5",
"@types/webfontloader": "^1.6.38",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@vitejs/plugin-react": "~4.2.1",
"@vitejs/plugin-react-swc": "~3.6.0",
"@vitest/coverage-v8": "^1.6.0",
Expand Down Expand Up @@ -109,7 +109,7 @@
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3",
"tailwindcss-animate": "^1.0.7",
"ts-jest": "^29.1.2",
"ts-jest": "^29.1.3",
"ts-node": "10.9.2",
"typescript": "~5.4.5",
"vite": "~5.2.11",
Expand All @@ -122,7 +122,7 @@
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@fontsource/ibm-plex-sans": "^5.0.20",
"@hookform/resolvers": "^3.4.0",
"@hookform/resolvers": "^3.4.2",
"@lingui/core": "^4.11.0",
"@lingui/detect-locale": "^4.11.0",
"@lingui/macro": "^4.11.0",
Expand Down Expand Up @@ -251,9 +251,9 @@
"zundo": "^2.1.0",
"zustand": "^4.5.2"
},
"packageManager": "pnpm@9.1.1+sha512.14e915759c11f77eac07faba4d019c193ec8637229e62ec99eefb7cf3c3b75c64447882b7c485142451ee3a6b408059cdfb7b7fa0341b975f12d0f7629c71195",
"packageManager": "pnpm@9.1.2+sha512.127dc83b9ea10c32be65d22a8efb4a65fb952e8fefbdfded39bdc3c97efc32d31b48b00420df2c1187ace28c921c902f0cb5a134a4d032b8b5295cbfa2c681e2",
"engines": {
"node": ">=18.17.0"
"node": ">=20.13.1"
},
"prisma": {
"schema": "tools/prisma/schema.prisma"
Expand Down
Loading

0 comments on commit 748b509

Please sign in to comment.