From a3f448648106160478161f1f3979eac8e2f3ec2e Mon Sep 17 00:00:00 2001 From: code4hari Date: Sun, 17 Nov 2024 05:29:38 -0500 Subject: [PATCH 1/3] fix logic --- backend/pinata/upload.js | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/backend/pinata/upload.js b/backend/pinata/upload.js index df3d031..ee8578b 100644 --- a/backend/pinata/upload.js +++ b/backend/pinata/upload.js @@ -38,41 +38,15 @@ async function uploadToPinata(sourcePath) { return filePaths; } - const stats = await fs.stat(sourcePath); - const files = stats.isDirectory() ? await getAllFiles(sourcePath) : [sourcePath]; + const files = await getAllFiles(sourcePath); const uploadResults = []; - const parentDir = path.dirname(sourcePath); - const rootFolderName = path.basename(sourcePath); - console.log(`Found ${files.length} files to upload`); for (const filePath of files) { const formData = new FormData(); - let relativePath; - if (stats.isDirectory()) { - // Get the relative path from the parent directory - relativePath = path.relative(parentDir, filePath); - - // Modify the path to ensure git folder is at the same level as work - // First, split the path into components - const pathComponents = relativePath.split(path.sep); - - // If the path contains '.git', replace it with 'git' and move it to root level - const gitIndex = pathComponents.findIndex(component => component === '.git'); - if (gitIndex !== -1) { - // Remove the .git component and its position - pathComponents.splice(gitIndex, 1); - // Add 'git' at the beginning, at the same level as 'work' - pathComponents.unshift('git'); - // Reconstruct the path - relativePath = pathComponents.join(path.sep); - } - } else { - relativePath = path.basename(filePath); - } - + const relativePath = path.relative(sourcePath, filePath); const content = await fs.readFile(filePath); formData.append('file', content, { @@ -167,7 +141,7 @@ if (require.main === module) { if (!sourcePath) { console.error('Please provide a source path as an argument'); - console.error('Usage: node script.js '); + console.error('Usage: node script.js '); process.exit(1); } From a114671b0a2b393365a16545c55ca50ca0ea3b8b Mon Sep 17 00:00:00 2001 From: code4hari Date: Sun, 17 Nov 2024 08:04:27 -0500 Subject: [PATCH 2/3] pinata --- website/components/landing/client-section.tsx | 10 +- website/components/landing/cta-section.tsx | 20 ++-- website/components/landing/hero-section.tsx | 6 +- .../components/landing/pricing-section.tsx | 12 +-- website/next-env.d.ts | 2 +- website/package-lock.json | 96 +++++++++---------- website/package.json | 6 +- website/yarn.lock | 57 +++++------ 8 files changed, 102 insertions(+), 107 deletions(-) diff --git a/website/components/landing/client-section.tsx b/website/components/landing/client-section.tsx index caef8cb..d0ce2d9 100644 --- a/website/components/landing/client-section.tsx +++ b/website/components/landing/client-section.tsx @@ -14,32 +14,32 @@ export default function ClientSection() {
  • diff --git a/website/components/landing/cta-section.tsx b/website/components/landing/cta-section.tsx index ba4d39c..e514aa9 100644 --- a/website/components/landing/cta-section.tsx +++ b/website/components/landing/cta-section.tsx @@ -20,37 +20,37 @@ const tiles = [ { icon: , bg: ( -
    +
    ), }, { icon: , bg: ( -
    +
    ), }, { icon: , bg: ( -
    +
    ), }, { icon: , bg: ( -
    +
    ), }, { icon: , bg: ( -
    +
    ), }, { icon: , bg: ( -
    +
    ), }, ]; @@ -171,8 +171,8 @@ export default function CallToActionSection() { ))}
    -
    - +
    +

    @@ -192,9 +192,9 @@ export default function CallToActionSection() {

    -
    +
    -
    +
    diff --git a/website/components/landing/hero-section.tsx b/website/components/landing/hero-section.tsx index 4324ec0..05a6fa4 100644 --- a/website/components/landing/hero-section.tsx +++ b/website/components/landing/hero-section.tsx @@ -28,7 +28,7 @@ export default function HeroSection() { -

    +

    a new way to
    track your files.

    @@ -52,8 +52,8 @@ export default function HeroSection() { size={400} duration={12} delay={11} - colorFrom="var(--color-one)" - colorTo="var(--color-two)" + colorFrom="#00CED1" + colorTo="#40E0D0" />
    diff --git a/website/components/landing/pricing-section.tsx b/website/components/landing/pricing-section.tsx index 5008010..f1165c7 100644 --- a/website/components/landing/pricing-section.tsx +++ b/website/components/landing/pricing-section.tsx @@ -129,7 +129,7 @@ export default function PricingSection() { className={cn( "relative flex max-w-[400px] flex-col gap-8 rounded-2xl border p-4 text-black dark:text-white overflow-hidden", { - "border-2 border-[var(--color-one)] dark:border-[var(--color-one)]": + "border-2 border-[#40E0D0]": price.isMostPopular, } )} @@ -176,10 +176,10 @@ export default function PricingSection() { -
    +
    {price.features && price.features.length > 0 && (
      {price.features.map((feature: any, idx: any) => ( diff --git a/website/next-env.d.ts b/website/next-env.d.ts index 4f11a03..40c3d68 100644 --- a/website/next-env.d.ts +++ b/website/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/website/package-lock.json b/website/package-lock.json index c25e0dd..126b7b7 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -23,11 +23,11 @@ "@radix-ui/react-tooltip": "^1.1.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", - "date-fns": "^4.0.0-beta.1", + "date-fns": "^3.6.0", "framer-motion": "^11.0.14", "jotai": "^2.9.3", "lucide-react": "^0.358.0", - "next": "14.2.0", + "next": "^14.2.18", "next-themes": "^0.3.0", "react": "^18", "react-day-picker": "8.10.1", @@ -280,9 +280,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.0.tgz", - "integrity": "sha512-4+70ELtSbRtYUuyRpAJmKC8NHBW2x1HMje9KO2Xd7IkoyucmV9SjgO+qeWMC0JWkRQXgydv1O7yKOK8nu/rITQ==" + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.18.tgz", + "integrity": "sha512-2vWLOUwIPgoqMJKG6dt35fVXVhgM09tw4tK3/Q34GFXDrfiHlG7iS33VA4ggnjWxjiz9KV5xzfsQzJX6vGAekA==" }, "node_modules/@next/eslint-plugin-next": { "version": "14.2.0", @@ -294,9 +294,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.0.tgz", - "integrity": "sha512-kHktLlw0AceuDnkVljJ/4lTJagLzDiO3klR1Fzl2APDFZ8r+aTxNaNcPmpp0xLMkgRwwk6sggYeqq0Rz9K4zzA==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.18.tgz", + "integrity": "sha512-tOBlDHCjGdyLf0ube/rDUs6VtwNOajaWV+5FV/ajPgrvHeisllEdymY/oDgv2cx561+gJksfMUtqf8crug7sbA==", "cpu": [ "arm64" ], @@ -309,9 +309,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.0.tgz", - "integrity": "sha512-HFSDu7lb1U3RDxXNeKH3NGRR5KyTPBSUTuIOr9jXoAso7i76gNYvnTjbuzGVWt2X5izpH908gmOYWtI7un+JrA==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.18.tgz", + "integrity": "sha512-uJCEjutt5VeJ30jjrHV1VIHCsbMYnEqytQgvREx+DjURd/fmKy15NaVK4aR/u98S1LGTnjq35lRTnRyygglxoA==", "cpu": [ "x64" ], @@ -324,9 +324,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.0.tgz", - "integrity": "sha512-iQsoWziO5ZMxDWZ4ZTCAc7hbJ1C9UDj/gATSqTaMjW2bJFwAsvf9UM79AKnljBl73uPZ+V0kH4rvnHTco4Ps2w==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.18.tgz", + "integrity": "sha512-IL6rU8vnBB+BAm6YSWZewc+qvdL1EaA+VhLQ6tlUc0xp+kkdxQrVqAnh8Zek1ccKHlTDFRyAft0e60gteYmQ4A==", "cpu": [ "arm64" ], @@ -339,9 +339,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.0.tgz", - "integrity": "sha512-0JOk2uzLUt8fJK5LpsKKZa74zAch7bJjjgJzR9aOMs231AlE4gPYzsSm430ckZitjPGKeH5bgDZjqwqJQKIS2w==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.18.tgz", + "integrity": "sha512-RCaENbIZqKKqTlL8KNd+AZV/yAdCsovblOpYFp0OJ7ZxgLNbV5w23CUU1G5On+0fgafrsGcW+GdMKdFjaRwyYA==", "cpu": [ "arm64" ], @@ -354,9 +354,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.0.tgz", - "integrity": "sha512-uYHkuTzX0NM6biKNp7hdKTf+BF0iMV254SxO0B8PgrQkxUBKGmk5ysHKB+FYBfdf9xei/t8OIKlXJs9ckD943A==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.18.tgz", + "integrity": "sha512-3kmv8DlyhPRCEBM1Vavn8NjyXtMeQ49ID0Olr/Sut7pgzaQTo4h01S7Z8YNE0VtbowyuAL26ibcz0ka6xCTH5g==", "cpu": [ "x64" ], @@ -369,9 +369,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.0.tgz", - "integrity": "sha512-paN89nLs2dTBDtfXWty1/NVPit+q6ldwdktixYSVwiiAz647QDCd+EIYqoiS+/rPG3oXs/A7rWcJK9HVqfnMVg==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.18.tgz", + "integrity": "sha512-mliTfa8seVSpTbVEcKEXGjC18+TDII8ykW4a36au97spm9XMPqQTpdGPNBJ9RySSFw9/hLuaCMByluQIAnkzlw==", "cpu": [ "x64" ], @@ -384,9 +384,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.0.tgz", - "integrity": "sha512-j1oiidZisnymYjawFqEfeGNcE22ZQ7lGUaa4pGOCVWrWeIDkPSj8zYgS9TzMNlg17Q3wSWCQC/F5uJAhSh7qcA==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.18.tgz", + "integrity": "sha512-J5g0UFPbAjKYmqS3Cy7l2fetFmWMY9Oao32eUsBPYohts26BdrMUyfCJnZFQkX9npYaHNDOWqZ6uV9hSDPw9NA==", "cpu": [ "arm64" ], @@ -399,9 +399,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.0.tgz", - "integrity": "sha512-6ff6F4xb+QGD1jhx/dOT9Ot7PQ/GAYekV9ykwEh2EFS/cLTyU4Y3cXkX5cNtNIhpctS5NvyjW9gIksRNErYE0A==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.18.tgz", + "integrity": "sha512-Ynxuk4ZgIpdcN7d16ivJdjsDG1+3hTvK24Pp8DiDmIa2+A4CfhJSEHHVndCHok6rnLUzAZD+/UOKESQgTsAZGg==", "cpu": [ "ia32" ], @@ -414,9 +414,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.0.tgz", - "integrity": "sha512-09DbG5vXAxz0eTFSf1uebWD36GF3D5toynRkgo2AlSrxwGZkWtJ1RhmrczRYQ17eD5bdo4FZ0ibiffdq5kc4vg==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.18.tgz", + "integrity": "sha512-dtRGMhiU9TN5nyhwzce+7c/4CCeykYS+ipY/4mIrGzJ71+7zNo55ZxCB7cAVuNqdwtYniFNR2c9OFQ6UdFIMcg==", "cpu": [ "x64" ], @@ -2159,9 +2159,9 @@ } }, "node_modules/date-fns": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.0.0-beta.1.tgz", - "integrity": "sha512-EjMXEgaR2r/Ff8aLwg8OtPnMq3caEANXuYVDz3F7UnL0f/sjeQW+mwQAS2iwziipMSi7kqc9tdfBmGAefhrY+A==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -4217,11 +4217,11 @@ "dev": true }, "node_modules/next": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.0.tgz", - "integrity": "sha512-2T41HqJdKPqheR27ll7MFZ3gtTYvGew7cUc0PwPSyK9Ao5vvwpf9bYfP4V5YBGLckHF2kEGvrLte5BqLSv0s8g==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.18.tgz", + "integrity": "sha512-H9qbjDuGivUDEnK6wa+p2XKO+iMzgVgyr9Zp/4Iv29lKa+DYaxJGjOeEA+5VOvJh/M7HLiskehInSa0cWxVXUw==", "dependencies": { - "@next/env": "14.2.0", + "@next/env": "14.2.18", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -4236,15 +4236,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.0", - "@next/swc-darwin-x64": "14.2.0", - "@next/swc-linux-arm64-gnu": "14.2.0", - "@next/swc-linux-arm64-musl": "14.2.0", - "@next/swc-linux-x64-gnu": "14.2.0", - "@next/swc-linux-x64-musl": "14.2.0", - "@next/swc-win32-arm64-msvc": "14.2.0", - "@next/swc-win32-ia32-msvc": "14.2.0", - "@next/swc-win32-x64-msvc": "14.2.0" + "@next/swc-darwin-arm64": "14.2.18", + "@next/swc-darwin-x64": "14.2.18", + "@next/swc-linux-arm64-gnu": "14.2.18", + "@next/swc-linux-arm64-musl": "14.2.18", + "@next/swc-linux-x64-gnu": "14.2.18", + "@next/swc-linux-x64-musl": "14.2.18", + "@next/swc-win32-arm64-msvc": "14.2.18", + "@next/swc-win32-ia32-msvc": "14.2.18", + "@next/swc-win32-x64-msvc": "14.2.18" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", diff --git a/website/package.json b/website/package.json index 2f5062c..53a7bda 100644 --- a/website/package.json +++ b/website/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev -H 0.0.0.0 -p 3000", + "dev": "next dev", "build": "next build", "start": "next start -H 0.0.0.0 -p 3000", "lint": "next lint" @@ -24,11 +24,11 @@ "@radix-ui/react-tooltip": "^1.1.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", - "date-fns": "^4.0.0-beta.1", + "date-fns": "^3.6.0", "framer-motion": "^11.0.14", "jotai": "^2.9.3", "lucide-react": "^0.358.0", - "next": "14.2.0", + "next": "^14.2.18", "next-themes": "^0.3.0", "react": "^18", "react-day-picker": "8.10.1", diff --git a/website/yarn.lock b/website/yarn.lock index 17cb8ef..df123ed 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -134,10 +134,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@next/env@14.2.0": - version "14.2.0" - resolved "https://registry.npmjs.org/@next/env/-/env-14.2.0.tgz" - integrity sha512-4+70ELtSbRtYUuyRpAJmKC8NHBW2x1HMje9KO2Xd7IkoyucmV9SjgO+qeWMC0JWkRQXgydv1O7yKOK8nu/rITQ== +"@next/env@14.2.18": + version "14.2.18" + resolved "https://registry.npmjs.org/@next/env/-/env-14.2.18.tgz" + integrity sha512-2vWLOUwIPgoqMJKG6dt35fVXVhgM09tw4tK3/Q34GFXDrfiHlG7iS33VA4ggnjWxjiz9KV5xzfsQzJX6vGAekA== "@next/eslint-plugin-next@14.2.0": version "14.2.0" @@ -146,15 +146,10 @@ dependencies: glob "10.3.10" -"@next/swc-linux-x64-gnu@14.2.0": - version "14.2.0" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.0.tgz" - integrity sha512-uYHkuTzX0NM6biKNp7hdKTf+BF0iMV254SxO0B8PgrQkxUBKGmk5ysHKB+FYBfdf9xei/t8OIKlXJs9ckD943A== - -"@next/swc-linux-x64-musl@14.2.0": - version "14.2.0" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.0.tgz" - integrity sha512-paN89nLs2dTBDtfXWty1/NVPit+q6ldwdktixYSVwiiAz647QDCd+EIYqoiS+/rPG3oXs/A7rWcJK9HVqfnMVg== +"@next/swc-win32-x64-msvc@14.2.18": + version "14.2.18" + resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.18.tgz" + integrity sha512-dtRGMhiU9TN5nyhwzce+7c/4CCeykYS+ipY/4mIrGzJ71+7zNo55ZxCB7cAVuNqdwtYniFNR2c9OFQ6UdFIMcg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1057,10 +1052,10 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -"date-fns@^2.28.0 || ^3.0.0", date-fns@^4.0.0-beta.1: - version "4.0.0-beta.1" - resolved "https://registry.npmjs.org/date-fns/-/date-fns-4.0.0-beta.1.tgz" - integrity sha512-EjMXEgaR2r/Ff8aLwg8OtPnMq3caEANXuYVDz3F7UnL0f/sjeQW+mwQAS2iwziipMSi7kqc9tdfBmGAefhrY+A== +"date-fns@^2.28.0 || ^3.0.0", date-fns@^3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz" + integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww== debug@^3.2.7: version "3.2.7" @@ -2292,12 +2287,12 @@ next-themes@^0.3.0: resolved "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz" integrity sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w== -next@14.2.0: - version "14.2.0" - resolved "https://registry.npmjs.org/next/-/next-14.2.0.tgz" - integrity sha512-2T41HqJdKPqheR27ll7MFZ3gtTYvGew7cUc0PwPSyK9Ao5vvwpf9bYfP4V5YBGLckHF2kEGvrLte5BqLSv0s8g== +next@^14.2.18: + version "14.2.18" + resolved "https://registry.npmjs.org/next/-/next-14.2.18.tgz" + integrity sha512-H9qbjDuGivUDEnK6wa+p2XKO+iMzgVgyr9Zp/4Iv29lKa+DYaxJGjOeEA+5VOvJh/M7HLiskehInSa0cWxVXUw== dependencies: - "@next/env" "14.2.0" + "@next/env" "14.2.18" "@swc/helpers" "0.5.5" busboy "1.6.0" caniuse-lite "^1.0.30001579" @@ -2305,15 +2300,15 @@ next@14.2.0: postcss "8.4.31" styled-jsx "5.1.1" optionalDependencies: - "@next/swc-darwin-arm64" "14.2.0" - "@next/swc-darwin-x64" "14.2.0" - "@next/swc-linux-arm64-gnu" "14.2.0" - "@next/swc-linux-arm64-musl" "14.2.0" - "@next/swc-linux-x64-gnu" "14.2.0" - "@next/swc-linux-x64-musl" "14.2.0" - "@next/swc-win32-arm64-msvc" "14.2.0" - "@next/swc-win32-ia32-msvc" "14.2.0" - "@next/swc-win32-x64-msvc" "14.2.0" + "@next/swc-darwin-arm64" "14.2.18" + "@next/swc-darwin-x64" "14.2.18" + "@next/swc-linux-arm64-gnu" "14.2.18" + "@next/swc-linux-arm64-musl" "14.2.18" + "@next/swc-linux-x64-gnu" "14.2.18" + "@next/swc-linux-x64-musl" "14.2.18" + "@next/swc-win32-arm64-msvc" "14.2.18" + "@next/swc-win32-ia32-msvc" "14.2.18" + "@next/swc-win32-x64-msvc" "14.2.18" node-releases@^2.0.18: version "2.0.18" From 33762295b6ec09aabe57b17e32f4699be8af5e20 Mon Sep 17 00:00:00 2001 From: code4hari Date: Sun, 17 Nov 2024 08:06:00 -0500 Subject: [PATCH 3/3] . --- backend/pinata/upload.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/pinata/upload.js b/backend/pinata/upload.js index ee8578b..f671523 100644 --- a/backend/pinata/upload.js +++ b/backend/pinata/upload.js @@ -29,7 +29,9 @@ async function uploadToPinata(sourcePath) { const stat = await fs.stat(filePath); if (stat.isDirectory()) { + if (file == '.git') { filePaths.push(...(await getAllFiles(filePath))); + } } else { filePaths.push(filePath); } @@ -46,7 +48,16 @@ async function uploadToPinata(sourcePath) { for (const filePath of files) { const formData = new FormData(); - const relativePath = path.relative(sourcePath, filePath); + let relativePath = path.relative(sourcePath, filePath); + + // Rename ".git" to "git" in every layer of the folder directory + relativePath = relativePath.split(path.sep).map(part => { + if (part === '.git') { + return 'git'; + } + return part; + }).join(path.sep); + const content = await fs.readFile(filePath); formData.append('file', content, {