@choonkeat/md-serve 0.2.1 → 0.4.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 +6 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -51,6 +51,12 @@ md-serve -version
|
|
|
51
51
|
URLs / `curl` / `<script src>` get the raw bytes. Files larger than
|
|
52
52
|
1 MiB, files that look binary, or files chroma can't lex stay raw
|
|
53
53
|
even with `?pretty=1`.
|
|
54
|
+
- Pretty rendering also gates on the `Accept` header: a client whose
|
|
55
|
+
Accept doesn't include `text/html` (e.g. `curl -H 'Accept:
|
|
56
|
+
application/json'`, `fetch()` with an explicit Accept) gets raw
|
|
57
|
+
bytes regardless of `?pretty=1` or the extension's default. So an
|
|
58
|
+
API consumer asking for `/README.md` with `Accept: application/json`
|
|
59
|
+
gets the source, not an HTML wrapper.
|
|
54
60
|
- Dotfiles are hidden from listings.
|
|
55
61
|
- Path traversal is blocked: requests are rejected if they resolve
|
|
56
62
|
outside the served root.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@choonkeat/md-serve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Tiny static file server that renders Markdown as GitHub-styled HTML",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"@choonkeat/md-serve-darwin-arm64": "0.
|
|
23
|
-
"@choonkeat/md-serve-darwin-x64": "0.
|
|
24
|
-
"@choonkeat/md-serve-linux-arm64": "0.
|
|
25
|
-
"@choonkeat/md-serve-linux-x64": "0.
|
|
26
|
-
"@choonkeat/md-serve-win32-arm64": "0.
|
|
27
|
-
"@choonkeat/md-serve-win32-x64": "0.
|
|
22
|
+
"@choonkeat/md-serve-darwin-arm64": "0.4.0",
|
|
23
|
+
"@choonkeat/md-serve-darwin-x64": "0.4.0",
|
|
24
|
+
"@choonkeat/md-serve-linux-arm64": "0.4.0",
|
|
25
|
+
"@choonkeat/md-serve-linux-x64": "0.4.0",
|
|
26
|
+
"@choonkeat/md-serve-win32-arm64": "0.4.0",
|
|
27
|
+
"@choonkeat/md-serve-win32-x64": "0.4.0"
|
|
28
28
|
}
|
|
29
29
|
}
|