dsh-read-url 1.2.0 → 1.3.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-read-url",
3
- "version": "1.2.0",
4
- "description": "DeepSeek Harness URL reader: fetch any webpage (HTML/JSON/RSS/Atom), auto-detect encoding (UTF-16 BOM/GBK/Big5/Shift-JIS), extract clean main content with auto-pagination, output compact text/Markdown to save tokens. Zero runtime dependencies, no API key, drop-in.",
3
+ "version": "1.3.1",
4
+ "description": "DeepSeek Harness URL reader: fetch any webpage (HTML/JSON/RSS/Atom), auto-detect encoding (UTF-16 BOM/GBK/Big5/Shift-JIS), extract clean main content with auto-pagination, output compact text/Markdown to save tokens. Zero runtime dependencies, no API key, drop-in. Follows meta-refresh shells, reads JSON-LD metadata, honors base href.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "files": [
package/proxy-fallback.js CHANGED
@@ -97,11 +97,10 @@ export async function fetchViaCurlProxy(url, cfg, externalSignal, proxyOverride)
97
97
  '--max-filesize', String(cfg.maxBytes), // unit is BYTES, not KB
98
98
  '-x', proxy,
99
99
  '-A', cfg.userAgent,
100
- // trailing metadata line: "<http_code> <content_type> <url_effective>"
100
+ // trailing metadata line: "<code> <content_type> <url_effective>"
101
101
  // (url_effective last: content_type may be empty, URLs never contain
102
- // unencoded spaces — parse from both ends). Without it a redirected
103
- // fetch kept the ORIGINAL url as finalUrl and same-host pagination /
104
- // link resolution ran against the wrong host.
102
+ // unencoded spaces — parse from both ends so the final URL of a redirect
103
+ // chain survives).
105
104
  '-w', '\n%{http_code} %{content_type} %{url_effective}',
106
105
  url,
107
106
  ]