@aiquants/html-to-markdown 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -3
- package/dist/{core-CouDTni-.js → core-DJV8t_Qj.js} +8 -4
- package/dist/core-Dq4LfiYy.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/main.cjs +1 -1
- package/dist/main.js +30 -13
- package/dist/{mcp-server-Co1kuNGX.cjs → mcp-server-CMBUHOmc.cjs} +1 -1
- package/dist/{mcp-server-DzB_5cTs.js → mcp-server-DD8CqdNw.js} +2 -2
- package/dist/{mcp-server-streamable-CcZ7Lsel.js → mcp-server-streamable-DODolSbj.js} +3 -3
- package/dist/{mcp-server-streamable-BNn6Kd9b.cjs → mcp-server-streamable-IQlimU2H.cjs} +1 -1
- package/dist/mcp-streamable.cjs +1 -1
- package/dist/mcp-streamable.js +1 -1
- package/dist/mcp.cjs +1 -1
- package/dist/mcp.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/mcp-server.d.ts +1 -1
- package/dist/src/types.d.ts +6 -6
- package/dist/{version-dpS3SSul.cjs → version-BkgGdAYt.cjs} +1 -1
- package/dist/{version-BSh9aXhF.js → version-CTdrYd1G.js} +5 -5
- package/package.json +1 -1
- package/dist/core-D2dlEt1l.cjs +0 -1
|
@@ -5,7 +5,7 @@ Object.assign(global, {
|
|
|
5
5
|
window,
|
|
6
6
|
self: window
|
|
7
7
|
});
|
|
8
|
-
import { b as getDefaultExportFromCjs } from "./core-
|
|
8
|
+
import { b as getDefaultExportFromCjs } from "./core-DJV8t_Qj.js";
|
|
9
9
|
import { promises } from "fs";
|
|
10
10
|
import { resolve, dirname } from "path";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
@@ -11297,7 +11297,7 @@ function parseHtmlToMarkdownArgs(args) {
|
|
|
11297
11297
|
throw new Error("Arguments are required");
|
|
11298
11298
|
}
|
|
11299
11299
|
const { url, html_content, locale = "en-US" } = args;
|
|
11300
|
-
if (!url
|
|
11300
|
+
if (!(url || html_content)) {
|
|
11301
11301
|
throw new Error("Either 'url' or 'html_content' is required");
|
|
11302
11302
|
}
|
|
11303
11303
|
if (url && typeof url !== "string") {
|
|
@@ -11323,7 +11323,7 @@ function parseSaveContentArgs(args) {
|
|
|
11323
11323
|
if (!content || typeof content !== "string") {
|
|
11324
11324
|
throw new Error("'content' is required and must be a string");
|
|
11325
11325
|
}
|
|
11326
|
-
if (!save_path
|
|
11326
|
+
if (!(save_path || save_directory)) {
|
|
11327
11327
|
throw new Error("Either 'save_path' or 'save_directory' is required");
|
|
11328
11328
|
}
|
|
11329
11329
|
if (save_path && typeof save_path !== "string") {
|
|
@@ -11350,7 +11350,7 @@ function parseUrlToMarkdownFileArgs(args) {
|
|
|
11350
11350
|
throw new Error("Arguments are required");
|
|
11351
11351
|
}
|
|
11352
11352
|
const { url, html_content, locale = "en-US", save_path, save_directory, filename } = args;
|
|
11353
|
-
if (!url
|
|
11353
|
+
if (!(url || html_content)) {
|
|
11354
11354
|
throw new Error("Either 'url' or 'html_content' is required");
|
|
11355
11355
|
}
|
|
11356
11356
|
if (url && typeof url !== "string") {
|
|
@@ -11362,7 +11362,7 @@ function parseUrlToMarkdownFileArgs(args) {
|
|
|
11362
11362
|
if (locale && !["en-US", "ja-JP"].includes(locale)) {
|
|
11363
11363
|
throw new Error("'locale' must be 'en-US' or 'ja-JP'");
|
|
11364
11364
|
}
|
|
11365
|
-
if (!save_path
|
|
11365
|
+
if (!(save_path || save_directory)) {
|
|
11366
11366
|
throw new Error("Either 'save_path' or 'save_directory' is required");
|
|
11367
11367
|
}
|
|
11368
11368
|
if (save_path && typeof save_path !== "string") {
|