@agent-idle/cli 0.1.8 → 0.1.9
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 +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -204,11 +204,11 @@ var AUTH_URL = process.env.AGENT_IDLE_AUTH_URL ?? BUILD_AUTH_URL ?? "http://loca
|
|
|
204
204
|
function cliAuthUrl(userCode2) {
|
|
205
205
|
try {
|
|
206
206
|
const url = new URL("/device", AUTH_URL);
|
|
207
|
-
if (userCode2) url.searchParams.set("
|
|
207
|
+
if (userCode2) url.searchParams.set("user_code", userCode2);
|
|
208
208
|
return url.toString();
|
|
209
209
|
} catch {
|
|
210
210
|
const base = AUTH_URL.replace(/\/$/, "");
|
|
211
|
-
const code = userCode2 ? `?
|
|
211
|
+
const code = userCode2 ? `?user_code=${encodeURIComponent(userCode2)}` : "";
|
|
212
212
|
return `${base}/device${code}`;
|
|
213
213
|
}
|
|
214
214
|
}
|