@songmu/mdhq 0.0.2

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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/assets/localize.d.ts +19 -0
  4. package/dist/assets/localize.js +364 -0
  5. package/dist/cli.d.ts +8 -0
  6. package/dist/cli.js +119 -0
  7. package/dist/config/config.d.ts +25 -0
  8. package/dist/config/config.js +170 -0
  9. package/dist/config/match.d.ts +7 -0
  10. package/dist/config/match.js +101 -0
  11. package/dist/convert/article-date.d.ts +20 -0
  12. package/dist/convert/article-date.js +255 -0
  13. package/dist/convert/convert-html.d.ts +2 -0
  14. package/dist/convert/convert-html.js +89 -0
  15. package/dist/convert/extract-published.d.ts +12 -0
  16. package/dist/convert/extract-published.js +24 -0
  17. package/dist/convert/extract-updated.d.ts +8 -0
  18. package/dist/convert/extract-updated.js +20 -0
  19. package/dist/date.d.ts +18 -0
  20. package/dist/date.js +448 -0
  21. package/dist/errors.d.ts +8 -0
  22. package/dist/errors.js +10 -0
  23. package/dist/frontmatter/frontmatter.d.ts +40 -0
  24. package/dist/frontmatter/frontmatter.js +114 -0
  25. package/dist/get-page.d.ts +2 -0
  26. package/dist/get-page.js +308 -0
  27. package/dist/http/fetch.d.ts +46 -0
  28. package/dist/http/fetch.js +195 -0
  29. package/dist/index.d.ts +6 -0
  30. package/dist/index.js +3 -0
  31. package/dist/list-files.d.ts +8 -0
  32. package/dist/list-files.js +35 -0
  33. package/dist/markdown/transform.d.ts +6 -0
  34. package/dist/markdown/transform.js +129 -0
  35. package/dist/path/storage-path.d.ts +7 -0
  36. package/dist/path/storage-path.js +110 -0
  37. package/dist/storage/atomic.d.ts +8 -0
  38. package/dist/storage/atomic.js +84 -0
  39. package/dist/storage/path-safety.d.ts +1 -0
  40. package/dist/storage/path-safety.js +55 -0
  41. package/dist/storage/save.d.ts +23 -0
  42. package/dist/storage/save.js +118 -0
  43. package/dist/types.d.ts +62 -0
  44. package/dist/types.js +1 -0
  45. package/dist/url/identity.d.ts +12 -0
  46. package/dist/url/identity.js +54 -0
  47. package/dist/url/pathname.d.ts +4 -0
  48. package/dist/url/pathname.js +46 -0
  49. package/dist/version.d.ts +3 -0
  50. package/dist/version.js +6 -0
  51. package/docs/README.md +14 -0
  52. package/docs/configuration.md +242 -0
  53. package/docs/library-api.md +275 -0
  54. package/docs/specification.md +730 -0
  55. package/package.json +73 -0
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@songmu/mdhq",
3
+ "version": "0.0.2",
4
+ "description": "Save web pages as Markdown in a ghq-inspired filesystem layout.",
5
+ "type": "module",
6
+ "bin": {
7
+ "mdhq": "dist/cli.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "docs",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "engines": {
24
+ "node": ">=22"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc -p tsconfig.json",
28
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json",
29
+ "test": "vitest run",
30
+ "test:package": "node scripts/package-smoke.mjs",
31
+ "test:watch": "vitest",
32
+ "prepublishOnly": "npm run typecheck && npm test && npm run test:package",
33
+ "prepack": "npm run build"
34
+ },
35
+ "keywords": [
36
+ "markdown",
37
+ "web-clipper",
38
+ "cli"
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/Songmu/mdhq.git"
43
+ },
44
+ "homepage": "https://github.com/Songmu/mdhq",
45
+ "license": "MIT",
46
+ "publishConfig": {
47
+ "access": "public",
48
+ "registry": "https://registry.npmjs.org"
49
+ },
50
+ "dependencies": {
51
+ "commander": "^15.0.0",
52
+ "defuddle": "0.19.3",
53
+ "linkedom": "^0.18.12",
54
+ "mathml-to-latex": "^1.8.0",
55
+ "mdast-util-from-markdown": "^2.0.2",
56
+ "mdast-util-gfm": "^3.1.0",
57
+ "mdast-util-to-markdown": "^2.1.2",
58
+ "micromark-extension-gfm": "^3.0.0",
59
+ "minimatch": "^10.0.3",
60
+ "proper-lockfile": "4.1.2",
61
+ "temml": "^0.13.5",
62
+ "turndown": "^7.2.0",
63
+ "undici": "^8.10.0",
64
+ "yaml": "^2.8.1",
65
+ "zod": "^4.5.2"
66
+ },
67
+ "devDependencies": {
68
+ "@types/node": "^26.4.0",
69
+ "@types/proper-lockfile": "4.1.4",
70
+ "typescript": "^7.0.2",
71
+ "vitest": "^4.1.11"
72
+ }
73
+ }