Skip to content

v0.2.2 — browser deep links fixed for dsh >= 0.1.1-rc.2

Choose a tag to compare

@PwnKY PwnKY released this 20 Sep 03:22
· 4 commits to master since this release

Fix

dsh 0.1.1-rc.2 removed the frontend SPA fallback: unknown paths (including
/s/<sessionId>) now answer 404, and only the index route boots the app.
The dsh:// protocol handler and every pasted /s/<id> link therefore stopped
opening a session.

  • dsh-open.cmd — opens /?session=<sessionId> instead of /s/<sessionId>,
    validates the input, and keeps redirection/grouping characters out of the
    header comments (batch parses them inside rem lines too)
  • lib/client.js — the deep-link opener now reads ?session=<id> plus the
    legacy /s/<id> path and the #/s/<id> / #session=<id> hashes
  • lib/index.js — ?session= web links pasted into a prompt are parsed as
    session references, and a best-effort /s/<id> → /?session=<id> 302
    route keeps old links, bookmarks and history entries working (skipped in
    compositions without webServer)
  • Tests: 47 PASS / 0 FAIL (four URL forms + the redirect route)
  • README (zh/en) and register-protocol.ps1 updated

修复说明(中文)

dsh 从 0.1.1-rc.2 起移除了前端 SPA fallback:未知路径(含 /s/<会话ID>)一律
404,只有 index 路由能启动应用,于是 dsh:// 链接和旧式 /s/<id> 链接都打不开会话。
现在浏览器地址改用 /?session=<会话ID>,旧链接由插件 302 重定向兜住;消息里粘贴
?session= 形式的地址也能作为会话引用解析。

Compatibility

  • requires dsh ≥ 0.1.0-rc.8 (the shipped web bundle provides session-reference)
  • the browser deep link needs the browser to hold this dsh web's login cookie
    (visit the token URL printed by dsh web once)

Full diff: v0.2.1...v0.2.2