@dst-justin/relay 2.2.0 → 2.2.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/package.json +1 -1
  4. package/relay +2 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 darkstar1227
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -223,6 +223,13 @@ Sessions live in `~/.claude/projects/` and are shared across all accounts — af
223
223
 
224
224
  ## Changelog
225
225
 
226
+ ### v2.2.0 — 2026-06-28
227
+ - Silent OAuth auto-refresh: `relay list` and `relay status` now silently refresh expired tokens using the stored `refreshToken` — no browser login needed for routine expiry
228
+ - Pre-emptive refresh: tokens are refreshed 5 minutes before expiry, not just after
229
+ - Autoswitch daemon now refreshes tokens proactively every 30 minutes and on expiry detection, ensuring the daemon never switches to a dead account
230
+ - New `relay refresh-all` command: silently refreshes all accounts via OAuth in one go
231
+ - Windows (`relay.ps1`): token refresh wired into `Show-Table` usage loop
232
+
226
233
  ### v2.1.1 — 2026-06-24
227
234
  - Display current version and latest version at the end of `list`, `status`, `relay` (menu), `sessions`, and `help` commands
228
235
  - Background version check (24h cache) — non-blocking, never slows down output
@@ -243,3 +250,7 @@ Sessions live in `~/.claude/projects/` and are shared across all accounts — af
243
250
 
244
251
  ### v2.0.2 — 2026-06-23
245
252
  - Skip `npm install` during `relay update` when already on the latest version or when version check fails
253
+
254
+ ## License
255
+
256
+ MIT © [darkstar1227](https://github.com/darkstar1227)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dst-justin/relay",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Multi-account switcher for Claude Code — instant credential swap across macOS, Linux, and Windows",
5
5
  "bin": {
6
6
  "relay": "./relay.js"
package/relay CHANGED
@@ -615,9 +615,9 @@ cmd_refresh_all() {
615
615
  local names=()
616
616
  while IFS= read -r f; do
617
617
  names+=("$(basename "${f%.json}")")
618
- done < <(find "${CREDS_DIR}" -maxdepth 1 -name '*.json' 2>/dev/null | sort)
618
+ done < <(find "${CREDS_STORE}" -maxdepth 1 -name '*.json' 2>/dev/null | sort)
619
619
  [[ ${#names[@]} -eq 0 ]] && { warn "No accounts found"; return 0; }
620
- "${PY}" - "${CREDS_DIR}" "${#names[@]}" "${names[@]}" <<'EOF'
620
+ "${PY}" - "${CREDS_STORE}" "${#names[@]}" "${names[@]}" <<'EOF'
621
621
  import json, sys, datetime, urllib.request, urllib.parse, os
622
622
 
623
623
  creds_dir, n = sys.argv[1], int(sys.argv[2])