diff --git a/packages/imap-mail-watcher/package.json b/packages/imap-mail-watcher/package.json index 9ae8c0d3e..b1145a192 100644 --- a/packages/imap-mail-watcher/package.json +++ b/packages/imap-mail-watcher/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@omnivore/utils": "1.0.0", - "axios": "^1.7.7", + "axios": "1.12.0", "imapflow": "^1.0.181", "mailparser": "^3.7.1" }, @@ -23,7 +23,7 @@ "@types/html-to-text": "^9.0.2", "@types/jsdom": "^21.1.3", "@types/mailparser": "^3.4.5", - "@types/node": "^22.10.7", + "@types/node": "24.1.0", "@types/pg": "^8.10.5", "@types/pg-format": "^1.0.3", "@types/urlsafe-base64": "^1.0.28", diff --git a/packages/imap-mail-watcher/src/watcher.ts b/packages/imap-mail-watcher/src/watcher.ts index e2728e236..31eb69067 100644 --- a/packages/imap-mail-watcher/src/watcher.ts +++ b/packages/imap-mail-watcher/src/watcher.ts @@ -8,7 +8,7 @@ void (() => { emailObserver$ .pipe( mergeMap((email: FetchMessageObject) => - simpleParser(email.source.toString()) + simpleParser(email.source?.toString() ?? '') ), map(convertToMailObject), mergeMap(sendToEmailApi) diff --git a/packages/imap-mail-watcher/tsconfig.json b/packages/imap-mail-watcher/tsconfig.json index 8d6ee874e..4f25ab27c 100644 --- a/packages/imap-mail-watcher/tsconfig.json +++ b/packages/imap-mail-watcher/tsconfig.json @@ -4,6 +4,5 @@ "include": ["./src/**/*"], "compilerOptions": { "outDir": "dist", - "typeRoots": ["./../../node_modules/pgvector/types"] } } diff --git a/yarn.lock b/yarn.lock index 75550bbb9..d529e5537 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10941,6 +10941,15 @@ axios@*, axios@^1.0.0, axios@^1.2.0, axios@^1.2.2, axios@^1.4.0, axios@^1.5.1, a form-data "^4.0.4" proxy-from-env "^1.1.0" +axios@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.12.0.tgz#11248459be05a5ee493485628fa0e4323d0abfc3" + integrity sha512-oXTDccv8PcfjZmPGlWsPSwtOJCZ/b6W5jAMCNcfwJbCzDckwG0jrYJFaWH1yvivfCXjVzV/SPDEhMB3Q+DSurg== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.4" + proxy-from-env "^1.1.0" + axios@^0.26.0: version "0.26.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"