From 77aeed397dcb4ab1336058d3d60ec504396f085d Mon Sep 17 00:00:00 2001
From: Marcus Schiesser <mail@marcusschiesser.de>
Date: Wed, 20 Dec 2023 16:13:26 +0700
Subject: [PATCH] Feat: Removed pdf-parse, and directly use latest pdf.js
 (#288)

---
 templates/index.ts | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/templates/index.ts b/templates/index.ts
index 880af908..8392a7b0 100644
--- a/templates/index.ts
+++ b/templates/index.ts
@@ -53,14 +53,6 @@ const copyTestData = async (
   openAiKey?: string,
   vectorDb?: TemplateVectorDB,
 ) => {
-  if (framework === "nextjs") {
-    // XXX: This is a hack to make the build for nextjs work with pdf-parse
-    // pdf-parse needs './test/data/05-versions-space.pdf' to exist - can be removed when pdf-parse is removed
-    const srcFile = path.join(__dirname, "components", "data", "101.pdf");
-    const destPath = path.join(root, "test", "data");
-    await fs.mkdir(destPath, { recursive: true });
-    await fs.copyFile(srcFile, path.join(destPath, "05-versions-space.pdf"));
-  }
   if (engine === "context" || framework === "fastapi") {
     const srcPath = path.join(__dirname, "components", "data");
     const destPath = path.join(root, "data");
-- 
GitLab