@agentis-hq/cli 0.3.0 → 0.3.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 (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -165,8 +165,12 @@ async function login() {
165
165
  `);
166
166
  openBrowser(authorizeUrl.toString());
167
167
  console.log("Waiting for authorization...");
168
+ let timeoutId;
168
169
  const timeout = new Promise((_, reject) => {
169
- setTimeout(() => reject(new Error("Login timed out. Run `agentis login` again.")), 10 * 60 * 1e3);
170
+ timeoutId = setTimeout(
171
+ () => reject(new Error("Login timed out. Run `agentis login` again.")),
172
+ 10 * 60 * 1e3
173
+ );
170
174
  });
171
175
  try {
172
176
  const result = await Promise.race([callback, timeout]);
@@ -201,6 +205,7 @@ async function login() {
201
205
  ${error instanceof Error ? error.message : "Login failed"}`);
202
206
  process.exitCode = 1;
203
207
  } finally {
208
+ if (timeoutId) clearTimeout(timeoutId);
204
209
  server.stop(true);
205
210
  }
206
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentis-hq/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "agentis": "dist/index.js"