mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
feat(dependencies): ⬆️ update dependencies, fix date display issue, add more profile icons
This commit is contained in:
@ -51,7 +51,7 @@ const Settings = () => {
|
|||||||
const pageConfig: PageConfig | undefined = useMemo(() => get(resume, 'metadata.page'), [resume]);
|
const pageConfig: PageConfig | undefined = useMemo(() => get(resume, 'metadata.page'), [resume]);
|
||||||
|
|
||||||
const isDarkMode = useMemo(() => theme === 'dark', [theme]);
|
const isDarkMode = useMemo(() => theme === 'dark', [theme]);
|
||||||
const exampleDateString = useMemo(() => `Eg. ${dayjs().utc().format(dateConfig.format)}`, [dateConfig.format]);
|
const exampleDateString = useMemo(() => `Eg. ${dayjs().format(dateConfig.format)}`, [dateConfig.format]);
|
||||||
const themeString = useMemo(() => (isDarkMode ? 'Matte Black Everything' : 'As bright as your future'), [isDarkMode]);
|
const themeString = useMemo(() => (isDarkMode ? 'Matte Black Everything' : 'As bright as your future'), [isDarkMode]);
|
||||||
|
|
||||||
const { mutateAsync: loadSampleDataMutation } = useMutation<Resume, ServerError, LoadSampleDataParams>(
|
const { mutateAsync: loadSampleDataMutation } = useMutation<Resume, ServerError, LoadSampleDataParams>(
|
||||||
|
|||||||
@ -134,7 +134,7 @@ const AwardModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -134,7 +134,7 @@ const CertificateModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -151,7 +151,7 @@ const CustomModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
@ -175,7 +175,7 @@ const CustomModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -173,7 +173,7 @@ const EducationModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
@ -197,7 +197,7 @@ const EducationModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -143,7 +143,7 @@ const ProjectModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
@ -167,7 +167,7 @@ const ProjectModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -134,7 +134,7 @@ const PublicationModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -140,7 +140,7 @@ const VolunteerModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
@ -164,7 +164,7 @@ const VolunteerModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -140,7 +140,7 @@ const WorkModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
@ -164,7 +164,7 @@ const WorkModal: React.FC = () => {
|
|||||||
views={['year', 'month', 'day']}
|
views={['year', 'month', 'day']}
|
||||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||||
isEmpty(keyboardInputValue) && field.onChange('');
|
isEmpty(keyboardInputValue) && field.onChange('');
|
||||||
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
|
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
|
||||||
}}
|
}}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@ -17,14 +17,14 @@
|
|||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@monaco-editor/react": "^4.4.6",
|
"@monaco-editor/react": "^4.4.6",
|
||||||
"@mui/icons-material": "^5.11.0",
|
"@mui/icons-material": "^5.11.0",
|
||||||
"@mui/lab": "^5.0.0-alpha.112",
|
"@mui/lab": "^5.0.0-alpha.114",
|
||||||
"@mui/material": "^5.11.0",
|
"@mui/material": "^5.11.3",
|
||||||
"@mui/system": "^5.11.0",
|
"@mui/system": "^5.11.2",
|
||||||
"@mui/x-date-pickers": "5.0.11",
|
"@mui/x-date-pickers": "5.0.12",
|
||||||
"@next/env": "^13.0.7",
|
"@next/env": "^13.1.1",
|
||||||
"@react-oauth/google": "^0.5.1",
|
"@react-oauth/google": "^0.5.1",
|
||||||
"@reduxjs/toolkit": "^1.9.1",
|
"@reduxjs/toolkit": "^1.9.1",
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.2",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"downloadjs": "^1.4.7",
|
"downloadjs": "^1.4.7",
|
||||||
@ -32,15 +32,15 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"md5-hex": "^4.0.0",
|
"md5-hex": "^4.0.0",
|
||||||
"monaco-editor": "^0.34.1",
|
"monaco-editor": "^0.34.1",
|
||||||
"nanoid": "^3.3.4",
|
"nanoid": "3.3.4",
|
||||||
"next": "13.0.7",
|
"next": "13.1.1",
|
||||||
"next-i18next": "^13.0.2",
|
"next-i18next": "^13.0.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-colorful": "^5.6.1",
|
"react-colorful": "^5.6.1",
|
||||||
"react-dnd": "16.0.1",
|
"react-dnd": "16.0.1",
|
||||||
"react-dnd-html5-backend": "16.0.1",
|
"react-dnd-html5-backend": "16.0.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-hook-form": "^7.40.0",
|
"react-hook-form": "^7.41.3",
|
||||||
"react-hot-toast": "2.4.0",
|
"react-hot-toast": "2.4.0",
|
||||||
"react-icons": "^4.7.1",
|
"react-icons": "^4.7.1",
|
||||||
"react-markdown": "^8.0.4",
|
"react-markdown": "^8.0.4",
|
||||||
@ -54,31 +54,31 @@
|
|||||||
"rehype-katex": "^6.0.2",
|
"rehype-katex": "^6.0.2",
|
||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
"remark-math": "^5.1.1",
|
"remark-math": "^5.1.1",
|
||||||
"sharp": "^0.31.2",
|
"sharp": "^0.31.3",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"webfontloader": "^1.6.28"
|
"webfontloader": "^1.6.28"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.20.5",
|
"@babel/core": "^7.20.7",
|
||||||
"@reactive-resume/schema": "workspace:*",
|
"@reactive-resume/schema": "workspace:*",
|
||||||
"@tailwindcss/typography": "^0.5.8",
|
"@tailwindcss/typography": "^0.5.8",
|
||||||
"@types/downloadjs": "^1.4.3",
|
"@types/downloadjs": "^1.4.3",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/node": "^18.11.15",
|
"@types/node": "^18.11.18",
|
||||||
"@types/react": "^18.0.26",
|
"@types/react": "^18.0.26",
|
||||||
"@types/react-dom": "^18.0.9",
|
"@types/react-dom": "^18.0.10",
|
||||||
"@types/react-redux": "^7.1.24",
|
"@types/react-redux": "^7.1.25",
|
||||||
"@types/tailwindcss": "^3.0.11",
|
"@types/tailwindcss": "^3.0.11",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.0",
|
||||||
"@types/webfontloader": "^1.6.35",
|
"@types/webfontloader": "^1.6.35",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"csstype": "^3.1.1",
|
"csstype": "^3.1.1",
|
||||||
"eslint-config-next": "^13.0.7",
|
"eslint-config-next": "^13.1.1",
|
||||||
"eslint-plugin-tailwindcss": "^3.7.1",
|
"eslint-plugin-tailwindcss": "^3.8.0",
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
"next-sitemap": "^3.1.42",
|
"next-sitemap": "^3.1.44",
|
||||||
"postcss": "^8.4.20",
|
"postcss": "^8.4.20",
|
||||||
"sass": "^1.56.2",
|
"sass": "^1.57.1",
|
||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.2.4",
|
||||||
"typescript": "^4.9.4"
|
"typescript": "^4.9.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export const dateFormatOptions: string[] = [
|
|||||||
'DD.MM.YYYY',
|
'DD.MM.YYYY',
|
||||||
'DD/MM/YYYY',
|
'DD/MM/YYYY',
|
||||||
'MM.DD.YYYY',
|
'MM.DD.YYYY',
|
||||||
'M.D.YYYY',
|
'M.D.YYYY',
|
||||||
'MM/DD/YYYY',
|
'MM/DD/YYYY',
|
||||||
'YYYY.MM.DD',
|
'YYYY.MM.DD',
|
||||||
'YYYY/MM/DD',
|
'YYYY/MM/DD',
|
||||||
@ -20,7 +20,7 @@ export const dateFormatOptions: string[] = [
|
|||||||
'YYYY',
|
'YYYY',
|
||||||
];
|
];
|
||||||
|
|
||||||
export const getRelativeTime = (timestamp: dayjs.ConfigType): string => dayjs(timestamp).utc().toNow(true);
|
export const getRelativeTime = (timestamp: dayjs.ConfigType): string => dayjs(timestamp).toNow(true);
|
||||||
|
|
||||||
export const formatDateString = (date: string | DateRange, formatStr: string): string | null => {
|
export const formatDateString = (date: string | DateRange, formatStr: string): string | null => {
|
||||||
const presentString = i18n?.t<string>('common.date.present') ?? '';
|
const presentString = i18n?.t<string>('common.date.present') ?? '';
|
||||||
@ -31,7 +31,7 @@ export const formatDateString = (date: string | DateRange, formatStr: string): s
|
|||||||
if (isString(date)) {
|
if (isString(date)) {
|
||||||
if (!dayjs(date).isValid()) return null;
|
if (!dayjs(date).isValid()) return null;
|
||||||
|
|
||||||
return dayjs(date).format(formatStr);
|
return dayjs.utc(date).local().format(formatStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If `date` is a DateRange
|
// If `date` is a DateRange
|
||||||
@ -40,12 +40,12 @@ export const formatDateString = (date: string | DateRange, formatStr: string): s
|
|||||||
if (!dayjs(date.start).isValid()) return null;
|
if (!dayjs(date.start).isValid()) return null;
|
||||||
|
|
||||||
if (dayjs(date.start).isSame(date.end)) {
|
if (dayjs(date.start).isSame(date.end)) {
|
||||||
return dayjs(date.start).format(formatStr);
|
return dayjs.utc(date.start).local().format(formatStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty(date.end) && dayjs(date.end).isValid()) {
|
if (!isEmpty(date.end) && dayjs(date.end).isValid()) {
|
||||||
return `${dayjs(date.start).format(formatStr)} - ${dayjs(date.end).format(formatStr)}`;
|
return `${dayjs.utc(date.start).local().format(formatStr)} - ${dayjs.utc(date.end).local().format(formatStr)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${dayjs(date.start).format(formatStr)} - ${presentString}`;
|
return `${dayjs.utc(date.start).local().format(formatStr)} - ${presentString}`;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import {
|
|||||||
FaHackerrank,
|
FaHackerrank,
|
||||||
FaInstagram,
|
FaInstagram,
|
||||||
FaLinkedinIn,
|
FaLinkedinIn,
|
||||||
|
FaMastodon,
|
||||||
FaMedium,
|
FaMedium,
|
||||||
FaSkype,
|
FaSkype,
|
||||||
FaSoundcloud,
|
FaSoundcloud,
|
||||||
@ -18,10 +19,11 @@ import {
|
|||||||
FaXing,
|
FaXing,
|
||||||
FaYoutube,
|
FaYoutube,
|
||||||
} from 'react-icons/fa';
|
} from 'react-icons/fa';
|
||||||
import { SiCodechef, SiCodeforces } from 'react-icons/si';
|
import { SiCodeberg, SiCodechef, SiCodeforces } from 'react-icons/si';
|
||||||
|
|
||||||
const profileIconMap: Record<string, JSX.Element> = {
|
const profileIconMap: Record<string, JSX.Element> = {
|
||||||
behance: <FaBehance />,
|
behance: <FaBehance />,
|
||||||
|
codeberg: <SiCodeberg />,
|
||||||
codechef: <SiCodechef />,
|
codechef: <SiCodechef />,
|
||||||
codeforces: <SiCodeforces />,
|
codeforces: <SiCodeforces />,
|
||||||
dribbble: <FaDribbble />,
|
dribbble: <FaDribbble />,
|
||||||
@ -31,6 +33,7 @@ const profileIconMap: Record<string, JSX.Element> = {
|
|||||||
hackerrank: <FaHackerrank />,
|
hackerrank: <FaHackerrank />,
|
||||||
instagram: <FaInstagram />,
|
instagram: <FaInstagram />,
|
||||||
linkedin: <FaLinkedinIn />,
|
linkedin: <FaLinkedinIn />,
|
||||||
|
mastodon: <FaMastodon />,
|
||||||
medium: <FaMedium />,
|
medium: <FaMedium />,
|
||||||
skype: <FaSkype />,
|
skype: <FaSkype />,
|
||||||
soundcloud: <FaSoundcloud />,
|
soundcloud: <FaSoundcloud />,
|
||||||
|
|||||||
@ -13,9 +13,6 @@ const DateWrapper: React.FC<React.PropsWithChildren<unknown>> = ({ children }) =
|
|||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
|
|
||||||
// Set Default Timezone to UTC
|
|
||||||
dayjs.tz.setDefault('UTC');
|
|
||||||
|
|
||||||
// Locales
|
// Locales
|
||||||
require('dayjs/locale/am');
|
require('dayjs/locale/am');
|
||||||
require('dayjs/locale/ar');
|
require('dayjs/locale/ar');
|
||||||
|
|||||||
12
package.json
12
package.json
@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "reactive-resume",
|
"name": "reactive-resume",
|
||||||
"version": "3.6.16",
|
"version": "3.6.17",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run dev",
|
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run dev",
|
||||||
"build": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run build",
|
"build": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run build",
|
||||||
"start": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run start",
|
"start": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run start",
|
||||||
|
"update-deps": "ncu -x nanoid,class-validator --deep -u && pnpm install",
|
||||||
"generate-env": "ts-node ./scripts/generate-env.ts",
|
"generate-env": "ts-node ./scripts/generate-env.ts",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"lint": "turbo run lint"
|
"lint": "turbo run lint"
|
||||||
@ -23,12 +24,13 @@
|
|||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.11.15",
|
"@types/node": "^18.11.18",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
||||||
"@typescript-eslint/parser": "^5.46.1",
|
"@typescript-eslint/parser": "^5.48.0",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.31.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-simple-import-sort": "^8.0.0",
|
"eslint-plugin-simple-import-sort": "^8.0.0",
|
||||||
|
"npm-check-updates": "^16.6.2",
|
||||||
"prettier": "^2.8.1",
|
"prettier": "^2.8.1",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.9.4"
|
"typescript": "^4.9.4"
|
||||||
|
|||||||
2630
pnpm-lock.yaml
generated
2630
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
|||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.31.0",
|
||||||
"typescript": "^4.9.4"
|
"typescript": "^4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
"start": "node dist/main"
|
"start": "node dist/main"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.231.0",
|
"@aws-sdk/client-s3": "^3.241.0",
|
||||||
"@nestjs/axios": "^1.0.0",
|
"@nestjs/axios": "^1.0.1",
|
||||||
"@nestjs/common": "^9.2.1",
|
"@nestjs/common": "^9.2.1",
|
||||||
"@nestjs/config": "^2.2.0",
|
"@nestjs/config": "^2.2.0",
|
||||||
"@nestjs/core": "^9.2.1",
|
"@nestjs/core": "^9.2.1",
|
||||||
"@nestjs/jwt": "^9.0.0",
|
"@nestjs/jwt": "^10.0.1",
|
||||||
"@nestjs/mapped-types": "^1.2.0",
|
"@nestjs/mapped-types": "^1.2.0",
|
||||||
"@nestjs/passport": "^9.0.0",
|
"@nestjs/passport": "^9.0.0",
|
||||||
"@nestjs/platform-express": "^9.2.1",
|
"@nestjs/platform-express": "^9.2.1",
|
||||||
@ -33,15 +33,15 @@
|
|||||||
"joi": "^17.7.0",
|
"joi": "^17.7.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"multer": "^1.4.4",
|
"multer": "^1.4.4",
|
||||||
"nanoid": "^3.3.4",
|
"nanoid": "3.3.4",
|
||||||
"node-stream-zip": "^1.15.0",
|
"node-stream-zip": "^1.15.0",
|
||||||
"nodemailer": "^6.8.0",
|
"nodemailer": "^6.8.0",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-jwt": "^4.0.0",
|
"passport-jwt": "^4.0.1",
|
||||||
"passport-local": "^1.0.0",
|
"passport-local": "^1.0.0",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
"pg": "^8.8.0",
|
"pg": "^8.8.0",
|
||||||
"playwright-chromium": "^1.28.1",
|
"playwright-chromium": "^1.29.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rxjs": "^7.8.0",
|
"rxjs": "^7.8.0",
|
||||||
@ -49,23 +49,24 @@
|
|||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^9.1.5",
|
"@nestjs/cli": "^9.1.8",
|
||||||
"@nestjs/schematics": "^9.0.3",
|
"@nestjs/schematics": "^9.0.4",
|
||||||
"@reactive-resume/schema": "workspace:*",
|
"@reactive-resume/schema": "workspace:*",
|
||||||
"@types/bcryptjs": "^2.4.2",
|
"@types/bcryptjs": "^2.4.2",
|
||||||
"@types/cookie-parser": "^1.4.3",
|
"@types/cookie-parser": "^1.4.3",
|
||||||
"@types/express": "^4.17.15",
|
"@types/express": "^4.17.15",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/multer": "^1.4.7",
|
"@types/multer": "^1.4.7",
|
||||||
"@types/node": "^18.11.15",
|
"@types/node": "^18.11.18",
|
||||||
"@types/nodemailer": "^6.4.6",
|
"@types/nodemailer": "^6.4.7",
|
||||||
"@types/passport-jwt": "^3.0.8",
|
"@types/passport-jwt": "^3.0.8",
|
||||||
"@types/passport-local": "^1.0.34",
|
"@types/passport-local": "^1.0.34",
|
||||||
|
"@types/uuid": "^9.0.0",
|
||||||
"prettier": "^2.8.1",
|
"prettier": "^2.8.1",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"ts-loader": "^9.4.2",
|
"ts-loader": "^9.4.2",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"tsconfig-paths": "^4.1.1",
|
"tsconfig-paths": "^4.1.2",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.4",
|
||||||
"webpack": "^5.75.0"
|
"webpack": "^5.75.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import {
|
|||||||
} from '@reactive-resume/schema';
|
} from '@reactive-resume/schema';
|
||||||
import csv from 'csvtojson';
|
import csv from 'csvtojson';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import utc from 'dayjs/plugin/utc';
|
|
||||||
import { readFile, unlink } from 'fs/promises';
|
import { readFile, unlink } from 'fs/promises';
|
||||||
import { cloneDeep, get, isEmpty, merge } from 'lodash';
|
import { cloneDeep, get, isEmpty, merge } from 'lodash';
|
||||||
import StreamZip from 'node-stream-zip';
|
import StreamZip from 'node-stream-zip';
|
||||||
@ -29,9 +28,7 @@ import { ResumeService } from '@/resume/resume.service';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class IntegrationsService {
|
export class IntegrationsService {
|
||||||
constructor(private resumeService: ResumeService) {
|
constructor(private resumeService: ResumeService) {}
|
||||||
dayjs.extend(utc);
|
|
||||||
}
|
|
||||||
|
|
||||||
async linkedIn(userId: number, path: string): Promise<ResumeEntity> {
|
async linkedIn(userId: number, path: string): Promise<ResumeEntity> {
|
||||||
let archive: StreamZip.StreamZipAsync;
|
let archive: StreamZip.StreamZipAsync;
|
||||||
@ -43,7 +40,7 @@ export class IntegrationsService {
|
|||||||
const resume: Partial<Resume> = cloneDeep(defaultState);
|
const resume: Partial<Resume> = cloneDeep(defaultState);
|
||||||
|
|
||||||
// Basics
|
// Basics
|
||||||
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
|
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
|
||||||
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
||||||
name: `Imported from LinkedIn (${timestamp})`,
|
name: `Imported from LinkedIn (${timestamp})`,
|
||||||
slug: `imported-from-linkedin-${timestamp}`,
|
slug: `imported-from-linkedin-${timestamp}`,
|
||||||
@ -276,7 +273,7 @@ export class IntegrationsService {
|
|||||||
const resume: Partial<Resume> = cloneDeep(defaultState);
|
const resume: Partial<Resume> = cloneDeep(defaultState);
|
||||||
|
|
||||||
// Metadata
|
// Metadata
|
||||||
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
|
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
|
||||||
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
||||||
name: `Imported from JSON Resume (${timestamp})`,
|
name: `Imported from JSON Resume (${timestamp})`,
|
||||||
slug: `imported-from-json-resume-${timestamp}`,
|
slug: `imported-from-json-resume-${timestamp}`,
|
||||||
@ -611,7 +608,7 @@ export class IntegrationsService {
|
|||||||
const resume: Partial<Resume> = cloneDeep(jsonResume);
|
const resume: Partial<Resume> = cloneDeep(jsonResume);
|
||||||
|
|
||||||
// Metadata
|
// Metadata
|
||||||
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
|
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
|
||||||
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
||||||
name: `Imported from Reactive Resume (${timestamp})`,
|
name: `Imported from Reactive Resume (${timestamp})`,
|
||||||
slug: `imported-from-reactive-resume-${timestamp}`,
|
slug: `imported-from-reactive-resume-${timestamp}`,
|
||||||
@ -632,7 +629,7 @@ export class IntegrationsService {
|
|||||||
const resume: Partial<Resume> = cloneDeep(defaultState);
|
const resume: Partial<Resume> = cloneDeep(defaultState);
|
||||||
|
|
||||||
// Metadata
|
// Metadata
|
||||||
const timestamp = dayjs().utc().format(FILENAME_TIMESTAMP);
|
const timestamp = dayjs().format(FILENAME_TIMESTAMP);
|
||||||
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
merge<Partial<Resume>, DeepPartial<Resume>>(resume, {
|
||||||
name: `Imported from Reactive Resume V2 (${timestamp})`,
|
name: `Imported from Reactive Resume V2 (${timestamp})`,
|
||||||
slug: `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 => {
|
private parseDate = (date: string): string => {
|
||||||
return isEmpty(date) ? '' : dayjs(date).utc().toISOString();
|
return isEmpty(date) ? '' : dayjs(date).toISOString();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,10 +31,8 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
|||||||
const publicUrl = `${serverUrl}/assets/exports/${filename}`;
|
const publicUrl = `${serverUrl}/assets/exports/${filename}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// check if file already exists
|
|
||||||
await access(join(directory, filename));
|
await access(join(directory, filename));
|
||||||
} catch {
|
} catch {
|
||||||
// delete old files and scheduler jobs
|
|
||||||
const activeSchedulerTimeouts = this.schedulerRegistry.getTimeouts();
|
const activeSchedulerTimeouts = this.schedulerRegistry.getTimeouts();
|
||||||
await readdir(directory).then(async (files) => {
|
await readdir(directory).then(async (files) => {
|
||||||
await Promise.all(
|
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 url = this.configService.get<string>('app.url');
|
||||||
const secretKey = this.configService.get<string>('app.secretKey');
|
const secretKey = this.configService.get<string>('app.secretKey');
|
||||||
const pdfDeletionTime = this.configService.get<number>('cache.pdfDeletionTime');
|
const pdfDeletionTime = this.configService.get<number>('cache.pdfDeletionTime');
|
||||||
@ -57,8 +54,8 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
|||||||
const page = await this.browser.newPage();
|
const page = await this.browser.newPage();
|
||||||
|
|
||||||
await page.goto(`${url}/${username}/${slug}/printer?secretKey=${secretKey}`);
|
await page.goto(`${url}/${username}/${slug}/printer?secretKey=${secretKey}`);
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
await page.waitForSelector('html.wf-active');
|
await page.waitForSelector('html.wf-active');
|
||||||
await page.waitForLoadState("networkidle")
|
|
||||||
|
|
||||||
const pageFormat: PageConfig['format'] = await page.$$eval(
|
const pageFormat: PageConfig['format'] = await page.$$eval(
|
||||||
'[data-page]',
|
'[data-page]',
|
||||||
|
|||||||
@ -5,9 +5,9 @@ const sampleData: Partial<Resume> = {
|
|||||||
name: 'Alexis Jones',
|
name: 'Alexis Jones',
|
||||||
email: 'alexis.jones@gmail.com',
|
email: 'alexis.jones@gmail.com',
|
||||||
phone: '+1 800 1200 3820',
|
phone: '+1 800 1200 3820',
|
||||||
birthdate: '1995-08-06T00:00:00.000Z',
|
birthdate: '1995-08-06',
|
||||||
photo: {
|
photo: {
|
||||||
url: `/images/sample-photo.jpg`,
|
url: `https://i.imgur.com/40gTnCx.jpg`,
|
||||||
filters: {
|
filters: {
|
||||||
size: 128,
|
size: 128,
|
||||||
shape: 'rounded-square',
|
shape: 'rounded-square',
|
||||||
@ -53,7 +53,7 @@ const sampleData: Partial<Resume> = {
|
|||||||
url: 'https://www.espritcam.com',
|
url: 'https://www.espritcam.com',
|
||||||
date: {
|
date: {
|
||||||
end: '',
|
end: '',
|
||||||
start: '2015-09-01T16:34:27.000Z',
|
start: '2015-09-01',
|
||||||
},
|
},
|
||||||
name: 'DP Technology Corp.',
|
name: 'DP Technology Corp.',
|
||||||
summary:
|
summary:
|
||||||
@ -64,8 +64,8 @@ const sampleData: Partial<Resume> = {
|
|||||||
id: '285d78f8-df56-4569-ba6b-cff5ebe5381e',
|
id: '285d78f8-df56-4569-ba6b-cff5ebe5381e',
|
||||||
url: 'https://www.vokophone.com',
|
url: 'https://www.vokophone.com',
|
||||||
date: {
|
date: {
|
||||||
end: '2015-07-31T22:00:00.000Z',
|
end: '2015-07-31',
|
||||||
start: '2011-05-31T22:00:00.000Z',
|
start: '2011-05-31',
|
||||||
},
|
},
|
||||||
name: 'Voko Communications',
|
name: 'Voko Communications',
|
||||||
summary:
|
summary:
|
||||||
@ -84,7 +84,7 @@ const sampleData: Partial<Resume> = {
|
|||||||
{
|
{
|
||||||
title: 'Blitz Hackathon',
|
title: 'Blitz Hackathon',
|
||||||
awarder: '2nd Place',
|
awarder: '2nd Place',
|
||||||
date: '2018-03-31T22:00:00.000Z',
|
date: '2018-03-31',
|
||||||
url: '',
|
url: '',
|
||||||
summary: '',
|
summary: '',
|
||||||
id: '657cadb0-c07d-4a35-8351-9079598c7ac0',
|
id: '657cadb0-c07d-4a35-8351-9079598c7ac0',
|
||||||
@ -92,7 +92,7 @@ const sampleData: Partial<Resume> = {
|
|||||||
{
|
{
|
||||||
title: 'Carl-Zeiss Hackathon',
|
title: 'Carl-Zeiss Hackathon',
|
||||||
awarder: '2nd Place',
|
awarder: '2nd Place',
|
||||||
date: '2017-05-09T22:00:00.000Z',
|
date: '2017-05-09',
|
||||||
url: '',
|
url: '',
|
||||||
summary: '',
|
summary: '',
|
||||||
id: 'db3bc5cb-483e-4221-9867-9c28ee5f2051',
|
id: 'db3bc5cb-483e-4221-9867-9c28ee5f2051',
|
||||||
|
|||||||
Reference in New Issue
Block a user