@askalf/dario 4.8.125 → 4.8.126

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 (2) hide show
  1. package/dist/oauth.js +7 -4
  2. package/package.json +1 -1
package/dist/oauth.js CHANGED
@@ -454,8 +454,8 @@ export async function startAutoOAuthFlow() {
454
454
  // Exchange the code for tokens
455
455
  server.close();
456
456
  exchangeCodeWithRedirect(code, codeVerifier, state, port)
457
- .then(resolve)
458
- .catch(reject);
457
+ .then((tokens) => { clearTimeout(loginTimeout); resolve(tokens); })
458
+ .catch((e) => { clearTimeout(loginTimeout); reject(e); });
459
459
  });
460
460
  let port = 0;
461
461
  server.listen(0, 'localhost', async () => {
@@ -490,11 +490,14 @@ export async function startAutoOAuthFlow() {
490
490
  server.on('error', (err) => {
491
491
  reject(new Error(`Failed to start OAuth callback server: ${err.message}`));
492
492
  });
493
- // Timeout after 5 minutes
494
- setTimeout(() => {
493
+ // Timeout after 5 minutes. unref so a completed login (server already
494
+ // closed, promise resolved on the success path) does not pin the process
495
+ // for 5 min — the #642-audit CLI hang. Also cleared on success below.
496
+ const loginTimeout = setTimeout(() => {
495
497
  server.close();
496
498
  reject(new Error('OAuth flow timed out. Try again with `dario login`.'));
497
499
  }, 300_000);
500
+ loginTimeout.unref();
498
501
  });
499
502
  }
500
503
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.125",
3
+ "version": "4.8.126",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {