patchcord 0.5.108 → 0.5.109
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/bin/patchcord.mjs +2 -2
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -855,11 +855,11 @@ if (cmd === "login" || cmd === "teamlead" || cmd === "provision" || cmd === "tea
|
|
|
855
855
|
// Browser login → saves + returns the account token. Authenticates the CLI;
|
|
856
856
|
// not related to any agent.
|
|
857
857
|
const doLogin = async () => {
|
|
858
|
-
const create = run(`curl -sf --max-time 10 -X POST "${DEFAULT_API}/api/
|
|
858
|
+
const create = run(`curl -sf --max-time 10 -X POST "${DEFAULT_API}/api/login/session" -H "Content-Type: application/json" -d '{}'`);
|
|
859
859
|
let sessionId = "";
|
|
860
860
|
try { sessionId = (JSON.parse(create).session_id) || ""; } catch {}
|
|
861
861
|
if (!sessionId) { console.error("Could not start login session."); process.exit(1); }
|
|
862
|
-
const url = `https://patchcord.dev/
|
|
862
|
+
const url = `https://patchcord.dev/connect/cli?session=${sessionId}`;
|
|
863
863
|
console.log(`\n Log in to patchcord in your browser:\n ${M.cyan}${url}${M.rst}\n`);
|
|
864
864
|
console.log(` ${M.dim}Waiting...${M.rst}`);
|
|
865
865
|
const http = await import("http");
|