feat(dependencies): ⬆️ update dependencies, fix date display issue, add more profile icons

This commit is contained in:
Amruth Pillai
2023-01-03 17:06:30 +01:00
parent 3b4ea00db8
commit 63084eebb4
20 changed files with 2006 additions and 779 deletions

View File

@ -8,12 +8,12 @@
"start": "node dist/main"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.231.0",
"@nestjs/axios": "^1.0.0",
"@aws-sdk/client-s3": "^3.241.0",
"@nestjs/axios": "^1.0.1",
"@nestjs/common": "^9.2.1",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.2.1",
"@nestjs/jwt": "^9.0.0",
"@nestjs/jwt": "^10.0.1",
"@nestjs/mapped-types": "^1.2.0",
"@nestjs/passport": "^9.0.0",
"@nestjs/platform-express": "^9.2.1",
@ -33,15 +33,15 @@
"joi": "^17.7.0",
"lodash": "^4.17.21",
"multer": "^1.4.4",
"nanoid": "^3.3.4",
"nanoid": "3.3.4",
"node-stream-zip": "^1.15.0",
"nodemailer": "^6.8.0",
"passport": "^0.6.0",
"passport-jwt": "^4.0.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"pdf-lib": "^1.17.1",
"pg": "^8.8.0",
"playwright-chromium": "^1.28.1",
"playwright-chromium": "^1.29.1",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.8.0",
@ -49,23 +49,24 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@nestjs/cli": "^9.1.5",
"@nestjs/schematics": "^9.0.3",
"@nestjs/cli": "^9.1.8",
"@nestjs/schematics": "^9.0.4",
"@reactive-resume/schema": "workspace:*",
"@types/bcryptjs": "^2.4.2",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.15",
"@types/lodash": "^4.14.191",
"@types/multer": "^1.4.7",
"@types/node": "^18.11.15",
"@types/nodemailer": "^6.4.6",
"@types/node": "^18.11.18",
"@types/nodemailer": "^6.4.7",
"@types/passport-jwt": "^3.0.8",
"@types/passport-local": "^1.0.34",
"@types/uuid": "^9.0.0",
"prettier": "^2.8.1",
"source-map-support": "^0.5.21",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.1",
"tsconfig-paths": "^4.1.2",
"typescript": "^4.9.4",
"webpack": "^5.75.0"
}

View File

@ -15,7 +15,6 @@ import {
} from '@reactive-resume/schema';
import csv from 'csvtojson';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import { readFile, unlink } from 'fs/promises';
import { cloneDeep, get, isEmpty, merge } from 'lodash';
import StreamZip from 'node-stream-zip';
@ -29,9 +28,7 @@ import { ResumeService } from '@/resume/resume.service';
@Injectable()
export class IntegrationsService {
constructor(private resumeService: ResumeService) {
dayjs.extend(utc);
}
constructor(private resumeService: ResumeService) {}
async linkedIn(userId: number, path: string): Promise<ResumeEntity> {
let archive: StreamZip.StreamZipAsync;
@ -43,7 +40,7 @@ export class IntegrationsService {
const resume: Partial<Resume> = cloneDeep(defaultState);
// Basics
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
name: `Imported from LinkedIn (${timestamp})`,
slug: `imported-from-linkedin-${timestamp}`,
@ -276,7 +273,7 @@ export class IntegrationsService {
const resume: Partial<Resume> = cloneDeep(defaultState);
// Metadata
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
name: `Imported from JSON Resume (${timestamp})`,
slug: `imported-from-json-resume-${timestamp}`,
@ -611,7 +608,7 @@ export class IntegrationsService {
const resume: Partial<Resume> = cloneDeep(jsonResume);
// Metadata
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
name: `Imported from Reactive Resume (${timestamp})`,
slug: `imported-from-reactive-resume-${timestamp}`,
@ -632,7 +629,7 @@ export class IntegrationsService {
const resume: Partial<Resume> = cloneDeep(defaultState);
// Metadata
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
name: `Imported from Reactive Resume V2 (${timestamp})`,
slug: `imported-from-reactive-resume-v2-${timestamp}`,
@ -958,6 +955,6 @@ export class IntegrationsService {
}
private parseDate = (date: string): string => {
return isEmpty(date) ? '' : dayjs(date).utc().toISOString();
return isEmpty(date) ? '' : dayjs(date).toISOString();
};
}

View File

@ -31,10 +31,8 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
const publicUrl = `${serverUrl}/assets/exports/${filename}`;
try {
// check if file already exists
await access(join(directory, filename));
} catch {
// delete old files and scheduler jobs
const activeSchedulerTimeouts = this.schedulerRegistry.getTimeouts();
await readdir(directory).then(async (files) => {
await Promise.all(
@ -49,7 +47,6 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
);
});
// create file as it doesn't exist
const url = this.configService.get<string>('app.url');
const secretKey = this.configService.get<string>('app.secretKey');
const pdfDeletionTime = this.configService.get<number>('cache.pdfDeletionTime');
@ -57,8 +54,8 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
const page = await this.browser.newPage();
await page.goto(`${url}/${username}/${slug}/printer?secretKey=${secretKey}`);
await page.waitForLoadState('networkidle');
await page.waitForSelector('html.wf-active');
await page.waitForLoadState("networkidle")
const pageFormat: PageConfig['format'] = await page.$$eval(
'[data-page]',

View File

@ -5,9 +5,9 @@ const sampleData: Partial<Resume> = {
name: 'Alexis Jones',
email: 'alexis.jones@gmail.com',
phone: '+1 800 1200 3820',
birthdate: '1995-08-06T00:00:00.000Z',
birthdate: '1995-08-06',
photo: {
url: `/images/sample-photo.jpg`,
url: `https://i.imgur.com/40gTnCx.jpg`,
filters: {
size: 128,
shape: 'rounded-square',
@ -53,7 +53,7 @@ const sampleData: Partial<Resume> = {
url: 'https://www.espritcam.com',
date: {
end: '',
start: '2015-09-01T16:34:27.000Z',
start: '2015-09-01',
},
name: 'DP Technology Corp.',
summary:
@ -64,8 +64,8 @@ const sampleData: Partial<Resume> = {
id: '285d78f8-df56-4569-ba6b-cff5ebe5381e',
url: 'https://www.vokophone.com',
date: {
end: '2015-07-31T22:00:00.000Z',
start: '2011-05-31T22:00:00.000Z',
end: '2015-07-31',
start: '2011-05-31',
},
name: 'Voko Communications',
summary:
@ -84,7 +84,7 @@ const sampleData: Partial<Resume> = {
{
title: 'Blitz Hackathon',
awarder: '2nd Place',
date: '2018-03-31T22:00:00.000Z',
date: '2018-03-31',
url: '',
summary: '',
id: '657cadb0-c07d-4a35-8351-9079598c7ac0',
@ -92,7 +92,7 @@ const sampleData: Partial<Resume> = {
{
title: 'Carl-Zeiss Hackathon',
awarder: '2nd Place',
date: '2017-05-09T22:00:00.000Z',
date: '2017-05-09',
url: '',
summary: '',
id: 'db3bc5cb-483e-4221-9867-9c28ee5f2051',