dsh-plugin-weapp-gateway 0.8.57 → 0.8.59
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 +5 -0
- package/lib/index.mjs +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
`dsh-plugin-weapp-gateway` · DeepSeek Harness 移动客户端连接插件
|
|
8
8
|
|
|
9
|
+
### v0.8.59 · 修复 Tailscale 状态形状测试(套件回归)
|
|
10
|
+
|
|
11
|
+
- v0.8.57 内嵌 `tailscale serve` 后,`GET /mgw/status` 的 `tailscale` 字段新增 `serveUrl` 与 `serve` 快照,但 `test/lan.test.mjs` 仍按旧的 `{addresses, urls}` 形状断言,导致全量测试变红(产品行为正确,测试过期)。
|
|
12
|
+
- 测试改为校验新形状,并补断言 `serveUrl` 为字符串、`serve` 为对象;`npm test` 恢复全绿(19 个 node:test 文件 + 15 个测试链)。
|
|
13
|
+
|
|
9
14
|
### v0.8.52 · 兼容 App 下拉与方案摘要之间留出间距
|
|
10
15
|
|
|
11
16
|
- 「兼容 App(备用)」的连接方式下拉与下方「配对入口」摘要卡片之间增加间距(16px),下拉不再紧贴提示卡片。
|
package/lib/index.mjs
CHANGED
|
@@ -3816,13 +3816,19 @@ const plugin = {
|
|
|
3816
3816
|
throw error
|
|
3817
3817
|
}
|
|
3818
3818
|
const lanEndpoints = clientRoute === 'tailscale'
|
|
3819
|
-
? [...new Set([
|
|
3819
|
+
? [...new Set([
|
|
3820
|
+
appUrl,
|
|
3821
|
+
...tailscaleUrls.map((url) => normalizePublicUrl(url, req, wsPath)),
|
|
3822
|
+
// 附带局域网候选:同网段启动时可直接秒连,不必等内嵌隧道就绪
|
|
3823
|
+
...(lanListening ? lanWebSocketUrls(options, wsPath, lanBoundPort) : []),
|
|
3824
|
+
])]
|
|
3820
3825
|
.filter((url) => {
|
|
3821
3826
|
try {
|
|
3822
3827
|
const parsed = new URL(url)
|
|
3823
3828
|
const host = parsed.hostname.replace(/^\[|\]$/g, '')
|
|
3824
3829
|
return (parsed.protocol === 'ws:' && isTailscaleIp(host)) ||
|
|
3825
|
-
(parsed.protocol === 'wss:' && /\.ts\.net$/i.test(host))
|
|
3830
|
+
(parsed.protocol === 'wss:' && /\.ts\.net$/i.test(host)) ||
|
|
3831
|
+
isRoutablePrivateEndpoint(url)
|
|
3826
3832
|
} catch { return false }
|
|
3827
3833
|
})
|
|
3828
3834
|
.slice(0, 16)
|