diff --git a/apps/frontend/src/components/launches/helpers/use.values.ts b/apps/frontend/src/components/launches/helpers/use.values.ts index 5e759162..99369e11 100644 --- a/apps/frontend/src/components/launches/helpers/use.values.ts +++ b/apps/frontend/src/components/launches/helpers/use.values.ts @@ -1,6 +1,9 @@ import { useEffect, useMemo } from 'react'; import { useForm, useFormContext } from 'react-hook-form'; import { classValidatorResolver } from '@hookform/resolvers/class-validator'; + +class Empty {} + const finalInformation = {} as { [key: string]: { posts: Array<{ @@ -42,15 +45,14 @@ export const useValues = ( ) => Promise, maximumCharacters?: number ) => { - const resolver = useMemo(() => { - return dto ? classValidatorResolver(dto) : undefined; - }, [integration]); + const form = useForm({ - ...(resolver ? resolver : {}), + resolver: classValidatorResolver(dto || Empty), values: initialValues, mode: 'onChange', criteriaMode: 'all', }); + const getValues = useMemo(() => { return () => ({ ...form.getValues(), diff --git a/apps/workers/src/app/stars.controller.ts b/apps/workers/src/app/stars.controller.ts index 7ba1e9a8..c9b4c8d2 100644 --- a/apps/workers/src/app/stars.controller.ts +++ b/apps/workers/src/app/stars.controller.ts @@ -13,7 +13,7 @@ export class StarsController { ) {} @EventPattern('check_stars', Transport.REDIS) async checkStars(data: { login: string }) { - // no to be effected by the limit, we scrape the HTML instead of using the API + // not to be affected by the limit, we scrape the HTML instead of using the API const loadedHtml = await ( await fetch(`https://github.com/${data.login}`) ).text(); diff --git a/build.plugins.js b/build.plugins.js index c7fcde93..cab0daa7 100644 --- a/build.plugins.js +++ b/build.plugins.js @@ -1,4 +1,4 @@ -const { readdirSync, statSync, writeFileSync } = require('fs'); +const { readdirSync, statSync, writeFileSync, existsSync } = require('fs'); const { join } = require('path'); function isNonEmptyFolder(folderPath) { @@ -18,6 +18,10 @@ function isNonEmptyFolder(folderPath) { // Function to get all non-empty folders function getNonEmptyFolders(rootFolder) { const result = []; + if (!existsSync(rootFolder)) { + return result; + } + const items = readdirSync(rootFolder); items.forEach((item) => { diff --git a/version.txt b/version.txt index f90a7b3c..16859c15 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.39.1 +v1.46.0 \ No newline at end of file