chore(deps-dev): bump @types/node from 20.14.2 to 20.17.14 (#8261)

* chore(deps-dev): bump @types/node from 20.14.2 to 20.17.14

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.2 to 20.17.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* tsc

* tsc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
dependabot[bot]
2025-01-20 16:00:08 -08:00
committed by GitHub
parent fa70735585
commit 16084322ca
3 changed files with 17 additions and 17 deletions
+7 -7
View File
@@ -67,7 +67,7 @@ export class DocumentConverter {
}
public static async htmlToMarkdown(content: Buffer | string) {
if (content instanceof Buffer) {
if (typeof content !== "string") {
content = content.toString("utf8");
}
@@ -117,26 +117,26 @@ export class DocumentConverter {
}
public static fileToMarkdown(content: Buffer | string) {
if (content instanceof Buffer) {
if (typeof content !== "string") {
content = content.toString("utf8");
}
return content;
}
public static async confluenceToMarkdown(value: Buffer | string) {
if (value instanceof Buffer) {
value = value.toString("utf8");
public static async confluenceToMarkdown(content: Buffer | string) {
if (typeof content !== "string") {
content = content.toString("utf8");
}
// We're only supporting the output from Confluence here, regular Word documents should call
// into the docxToMarkdown importer. See: https://jira.atlassian.com/browse/CONFSERVER-38237
if (!value.includes("Content-Type: multipart/related")) {
if (!content.includes("Content-Type: multipart/related")) {
throw FileImportError("Unsupported Word file");
}
// Confluence "Word" documents are actually just multi-part email messages, so we can use
// mailparser to parse the content.
const parsed = await simpleParser(value);
const parsed = await simpleParser(content);
if (!parsed.html) {
throw FileImportError("Unsupported Word file (No content found)");
}