From ae919ad89648cc292f592b55a16bc94af3da3105 Mon Sep 17 00:00:00 2001 From: Thomas Kosmas Date: Thu, 31 Oct 2024 17:36:32 +0200 Subject: [PATCH] Fix go parser --- apps/api/{src/lib => sharedLibs}/go-html-to-md/README.md | 0 apps/api/{src/lib => sharedLibs}/go-html-to-md/go.mod | 0 apps/api/{src/lib => sharedLibs}/go-html-to-md/go.sum | 0 .../{src/lib => sharedLibs}/go-html-to-md/html-to-markdown.go | 0 apps/api/src/lib/html-to-markdown.ts | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) rename apps/api/{src/lib => sharedLibs}/go-html-to-md/README.md (100%) rename apps/api/{src/lib => sharedLibs}/go-html-to-md/go.mod (100%) rename apps/api/{src/lib => sharedLibs}/go-html-to-md/go.sum (100%) rename apps/api/{src/lib => sharedLibs}/go-html-to-md/html-to-markdown.go (100%) diff --git a/apps/api/src/lib/go-html-to-md/README.md b/apps/api/sharedLibs/go-html-to-md/README.md similarity index 100% rename from apps/api/src/lib/go-html-to-md/README.md rename to apps/api/sharedLibs/go-html-to-md/README.md diff --git a/apps/api/src/lib/go-html-to-md/go.mod b/apps/api/sharedLibs/go-html-to-md/go.mod similarity index 100% rename from apps/api/src/lib/go-html-to-md/go.mod rename to apps/api/sharedLibs/go-html-to-md/go.mod diff --git a/apps/api/src/lib/go-html-to-md/go.sum b/apps/api/sharedLibs/go-html-to-md/go.sum similarity index 100% rename from apps/api/src/lib/go-html-to-md/go.sum rename to apps/api/sharedLibs/go-html-to-md/go.sum diff --git a/apps/api/src/lib/go-html-to-md/html-to-markdown.go b/apps/api/sharedLibs/go-html-to-md/html-to-markdown.go similarity index 100% rename from apps/api/src/lib/go-html-to-md/html-to-markdown.go rename to apps/api/sharedLibs/go-html-to-md/html-to-markdown.go diff --git a/apps/api/src/lib/html-to-markdown.ts b/apps/api/src/lib/html-to-markdown.ts index a542a434..396b7fe7 100644 --- a/apps/api/src/lib/html-to-markdown.ts +++ b/apps/api/src/lib/html-to-markdown.ts @@ -15,7 +15,7 @@ class GoMarkdownConverter { private convert: any; private constructor() { - const goExecutablePath = join(__dirname, 'go-html-to-md/html-to-markdown.so'); + const goExecutablePath = join(process.cwd(), 'sharedLibs', 'go-html-to-md', 'html-to-markdown.so'); const lib = koffi.load(goExecutablePath); this.convert = lib.func('ConvertHTMLToMarkdown', 'string', ['string']); }