@agent-idle/cli 0.1.5 → 0.1.7
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/index.js +4 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -179,14 +179,13 @@ var DEFAULT_CONVEX_URL = resolveConvexUrl();
|
|
|
179
179
|
var AUTH_URL = process.env.AGENT_IDLE_AUTH_URL ?? BUILD_AUTH_URL ?? "http://localhost:1420";
|
|
180
180
|
function cliAuthUrl(userCode2) {
|
|
181
181
|
try {
|
|
182
|
-
const url = new URL(AUTH_URL);
|
|
183
|
-
url.searchParams.set("login", "1");
|
|
182
|
+
const url = new URL("/cli", AUTH_URL);
|
|
184
183
|
if (userCode2) url.searchParams.set("code", userCode2);
|
|
185
184
|
return url.toString();
|
|
186
185
|
} catch {
|
|
187
|
-
const
|
|
188
|
-
const code = userCode2 ?
|
|
189
|
-
return `${
|
|
186
|
+
const base = AUTH_URL.replace(/\/$/, "");
|
|
187
|
+
const code = userCode2 ? `?code=${encodeURIComponent(userCode2)}` : "";
|
|
188
|
+
return `${base}/cli${code}`;
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
191
|
function ensureDir(path, mode) {
|