* feat(utils): add structured markdown table renderer
Add renderMarkdownTable and renderOptionsMarkdownTable helpers that build GFM tables from validated data, with column alignment, cell escaping and a shorthand for parameter option tables. Include tests covering existing route descriptions and migration cases.
* feat(route/gov/shenzhen/zjj): expand sections and add table layout
Replace the single notification category with 19 public-information sections. Add a table layout for the policy section, generate the parameter table from the shared section config, switch to HTTPS, and tighten the handler typings.
* feat(route/gov/shenzhen/gkmlpt): add shared API helpers
Add zod-validated article types and shared helpers for the Guangdong disclosure platform: fetch article lists with a P-256 dispatcher to avoid bad ecpoint errors, map articles to feed items, build category links, and derive lookup maps and parameter options from category definitions.
* feat(route/gov/shenzhen/szft): add Futian housing bureau route
Add the Futian District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/szlh): add Luohu housing bureau route
Add the Luohu District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/szns): add Nanshan housing bureau route
Add the Nanshan District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/yantian): add Yantian housing bureau route
Add the Yantian District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/baoan): add Bao'an housing bureau route
Add the Bao'an District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/lg): add Longgang housing bureau route
Add the Longgang District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/szlhq): add Longhua housing bureau route
Add the Longhua District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/szpsq): add Pingshan housing center route
Add the Pingshan District Housing Security Center feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/szgm): add Guangming housing bureau route
Add the Guangming District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* feat(route/gov/shenzhen/dpxq): add Dapeng housing bureau route
Add the Dapeng New District Housing and Construction Bureau feed on top of the shared gkmlpt helpers. Derive category options from the platform directory tree, document them in the description, and expose a radar rule for the disclosure index.
* refactor(route/gov/shenzhen): scope markdown table helper to Shenzhen
Move render-markdown-table from the global lib/utils into the Shenzhen gov routes so the helper sits alongside its only consumers, and drop its test file. Update every Shenzhen route to import from the new location.
* feat(utils): support ecdhCurve in ofetch requests
Add an ecdhCurve option to ofetch so callers can pin the ECDHE curve in the TLS handshake, working around hosts whose exchange ends in a point OpenSSL rejects (bad ecpoint). Thread it through proxy dispatchers and direct agents, and include it in their cache keys so differently configured connections are not reused. Unlike an explicit dispatcher, proxied requests still honour the configured proxy.
* refactor(route/gov/shenzhen/gkmlpt): use ecdhCurve fetch option
Pass ecdhCurve: 'P-256' through ofetch instead of an explicit undici dispatcher, so the district requests work around bad ecpoint errors without bypassing the configured proxy.
* refactor(route/gov/shenzhen/gkmlpt): import parseDate from utils/time
Follow the consolidated time utilities by importing parseDate from @/utils/time instead of the standalone @/utils/parse-date module.
* fix(route/gov/shenzhen): use plain markdown tables in descriptions and test ecdhCurve
Drop the route-local markdown table renderer and write the caty tables by
hand like the neighbouring routes. Cover the ecdhCurve option on both the
direct agent and the proxy dispatcher in the request rewriter tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: DIYgod <i@diygod.me>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Since #22401 every socks* PROXY_URI is handed to undici's ProxyAgent,
which only accepts socks5: and socks:. A socks5h, socks4 or socks4a
URI fell through to its HTTP proxy path and threw "Invalid URL
protocol" while the proxy module loaded, so the server never started,
even though unify-proxy listed all of them as supported.
Pass socks5h to undici as socks5: its SOCKS5 client sends host names
to the proxy, so DNS still resolves there, as playwright.ts already
assumes. undici has no SOCKS4 support, so drop socks4 and socks4a from
the accepted protocols, which logs the supported list and disables the
proxy like any other unsupported protocol.
* chore: bump to msw v3
* refactor: anti-slop
* test: use vi.stubEnv for REDIS_URL in redis error test
* refactor: move remote debugging registration into a conditional block
* chore: add code coverage upload for github
* feat(tests): add comprehensive unit tests for various utility functions and views
- Implement tests for cache utility to ensure proper behavior with no cache and TTL keys.
- Add tests for common utilities including string manipulation and path handling.
- Introduce tests for directory import functionality to validate file imports and pattern matching.
- Create tests for git hash retrieval to handle fallback scenarios.
- Develop tests for deprecated got utility to verify response handling and retry logic.
- Enhance got utility tests to include request hooks and search parameter handling.
- Mock header generator tests to validate user agent handling.
- Expand helpers tests to cover current path retrieval and duration parsing.
- Implement tests for ofetch utility to ensure proper proxy handling and logging.
- Add OpenTelemetry metric tests to validate metric serialization.
- Create proxy tests to verify multi-proxy selection and failure handling.
- Introduce request rewriter tests to validate fetch and get wrapper functionality.
- Add timezone utility tests to handle various input types.
- Implement view tests for Atom and RSS rendering to ensure correct output.
- Create index view tests to validate debug information display based on configuration.
* refactor: remove deprecated got implementation and associated tests
* test: expand coverage for api, middleware, and utils