@aiquants/html-to-markdown 0.1.4 → 0.1.6

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.
Files changed (60) hide show
  1. package/README.md +100 -18
  2. package/dist/{core-CVMYjtlI.cjs → core-D2dlEt1l.cjs} +1 -1
  3. package/dist/{core-DOzMLPij.js → core-DU_246Q7.js} +52 -14
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.js +8 -2
  6. package/dist/main.cjs +1 -1
  7. package/dist/main.js +1 -1
  8. package/dist/mcp-server-CpmnW1p8.js +283 -0
  9. package/dist/mcp-server-D4Mj1IQ9.cjs +1 -0
  10. package/dist/mcp-server-streamable-Bu7QAr3W.cjs +1 -0
  11. package/dist/mcp-server-streamable-CQD5zK30.js +7538 -0
  12. package/dist/mcp-streamable.cjs +2 -0
  13. package/dist/mcp-streamable.js +6 -0
  14. package/dist/mcp.cjs +2 -0
  15. package/dist/mcp.js +13 -0
  16. package/dist/src/core.d.ts +4 -4
  17. package/dist/src/index.d.ts +2 -0
  18. package/dist/src/mcp-server-streamable.d.ts +74 -0
  19. package/dist/src/mcp-server.d.ts +57 -0
  20. package/dist/src/mcp-streamable.d.ts +6 -0
  21. package/dist/src/mcp.d.ts +6 -0
  22. package/dist/src/types.d.ts +5 -0
  23. package/dist/src/version.d.ts +9 -0
  24. package/dist/tests/core-unified.test.d.ts +5 -0
  25. package/dist/tests/coverage-complete.test.d.ts +5 -0
  26. package/dist/tests/mcp-unified.test.d.ts +5 -0
  27. package/dist/tests/plugins-unified.test.d.ts +5 -0
  28. package/dist/tests/test-client.d.ts +4 -0
  29. package/dist/version-BRVBmpor.js +11318 -0
  30. package/dist/version-DTaUKNBS.cjs +1 -0
  31. package/mcp.json +14 -0
  32. package/package.json +27 -10
  33. package/dist/tests/100-percent-final.test.d.ts +0 -1
  34. package/dist/tests/absolute-final-coverage.test.d.ts +0 -1
  35. package/dist/tests/browser-100.test.d.ts +0 -1
  36. package/dist/tests/browser-coverage.test.d.ts +0 -1
  37. package/dist/tests/browser.test.d.ts +0 -1
  38. package/dist/tests/cli.test.d.ts +0 -1
  39. package/dist/tests/converter-coverage.test.d.ts +0 -1
  40. package/dist/tests/converter.test.d.ts +0 -1
  41. package/dist/tests/core.test.d.ts +0 -1
  42. package/dist/tests/coverage-edge-cases.test.d.ts +0 -1
  43. package/dist/tests/direct-coverage.test.d.ts +0 -1
  44. package/dist/tests/final-100-percent.test.d.ts +0 -1
  45. package/dist/tests/final-coverage.test.d.ts +0 -1
  46. package/dist/tests/i18n.test.d.ts +0 -1
  47. package/dist/tests/index.test.d.ts +0 -1
  48. package/dist/tests/line-70-coverage.test.d.ts +0 -1
  49. package/dist/tests/main.test.d.ts +0 -1
  50. package/dist/tests/plugins.test.d.ts +0 -1
  51. package/dist/tests/readme-usage.test.d.ts +0 -1
  52. package/dist/tests/rehype-absolute-links-coverage.test.d.ts +0 -1
  53. package/dist/tests/rehype-absolute-links.test.d.ts +0 -1
  54. package/dist/tests/rehype-named-anchors.test.d.ts +0 -1
  55. package/dist/tests/rehype-sanitize-html-coverage.test.d.ts +0 -1
  56. package/dist/tests/rehype-sanitize-html.test.d.ts +0 -1
  57. package/dist/tests/rehype-wikipedia-footnotes.test.d.ts +0 -1
  58. package/dist/tests/types.test.d.ts +0 -1
  59. package/dist/tests/ultimate-coverage.test.d.ts +0 -1
  60. /package/dist/tests/{100-percent-coverage.test.d.ts → entry-points-error.test.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/html-to-markdown",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "HTML to Markdown converter",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,29 +12,41 @@
12
12
  "require": "./dist/index.cjs"
13
13
  }
14
14
  },
15
- "bin": "./dist/main.js",
15
+ "bin": {
16
+ "aiq-html2md": "./dist/main.js",
17
+ "aiq-html2md-mcp": "./dist/mcp.js",
18
+ "aiq-html2md-mcp-stream": "./dist/mcp-streamable.js"
19
+ },
16
20
  "files": [
17
21
  "dist",
18
22
  "package.json",
19
23
  "README.md",
20
- "LICENSE"
24
+ "LICENSE",
25
+ "mcp.json"
21
26
  ],
22
27
  "scripts": {
23
- "dev": "NODE_OPTIONS='--enable-source-maps' vite-node --inspect=9229 --watch main.ts --",
28
+ "dev": "NODE_OPTIONS='--enable-source-maps' vite-node --inspect=9229 --watch src/mcp-streamable.ts --",
24
29
  "debug": "NODE_OPTIONS='--enable-source-maps' vite-node --inspect-brk=9229 main.ts --",
25
30
  "start": "vite-node main.ts",
26
31
  "build": "vite build",
32
+ "prepublishOnly": "npm run build",
27
33
  "lint": "biome lint app/",
28
34
  "format": "biome format --write",
29
35
  "check": "biome check --fix src/",
30
36
  "test": "vitest run",
31
- "test1": "pnpm -F @aiquants/html-to-markdown test --test-name-pattern 'rehypeNamedAnchors plugin'",
32
- "coverage": "vitest run --coverage"
37
+ "test:mcp": "vitest run tests/mcp-unified.test.ts",
38
+ "test:watch": "vitest",
39
+ "coverage": "vitest run --coverage",
40
+ "coverage:mcp": "vitest run --coverage tests/mcp-unified.test.ts",
41
+ "license-check": "pnpm dlx license-checker --production --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;Unlicense\"",
42
+ "license-check:json": "pnpm dlx license-checker --production --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;Unlicense\" --json"
33
43
  },
34
44
  "keywords": [
35
45
  "html",
36
46
  "markdown",
37
- "converter"
47
+ "converter",
48
+ "mcp",
49
+ "model-context-protocol"
38
50
  ],
39
51
  "author": {
40
52
  "name": "fehde-k",
@@ -42,7 +54,11 @@
42
54
  },
43
55
  "license": "MIT",
44
56
  "dependencies": {
57
+ "@modelcontextprotocol/sdk": "^1.17.1",
58
+ "cors": "^2.8.5",
59
+ "express": "^5.1.0",
45
60
  "github-slugger": "^2.0.0",
61
+ "happy-dom": "^18.0.1",
46
62
  "hast": "^1.0.0",
47
63
  "hast-util-to-html": "^9.0.5",
48
64
  "playwright": "^1.54.1",
@@ -54,12 +70,13 @@
54
70
  "remark-stringify": "^11.0.0",
55
71
  "unified": "^11.0.5",
56
72
  "unist-util-visit": "^5.0.0",
57
- "yargs-parser": "^22.0.0",
58
- "happy-dom": "^18.0.1"
73
+ "yargs-parser": "^22.0.0"
59
74
  },
60
75
  "devDependencies": {
61
76
  "@biomejs/biome": "^2.1.3",
62
- "@types/github-slugger": "^2.0.0",
77
+ "@playwright/test": "^1.54.2",
78
+ "@types/cors": "^2.8.19",
79
+ "@types/express": "^5.0.3",
63
80
  "@types/hast": "^3.0.4",
64
81
  "@types/mdast": "^4.0.4",
65
82
  "@types/node": "^22.16.5",
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};