agentwork-cli 0.1.2 → 0.1.3
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/dist/aw.js +3 -3
- package/package.json +1 -1
package/dist/aw.js
CHANGED
|
@@ -205,14 +205,14 @@ authCommand.command("login").description("Request a verification code").option("
|
|
|
205
205
|
await client.post("/auth/login", { email });
|
|
206
206
|
process.stderr.write(`Code sent to ${email}
|
|
207
207
|
`);
|
|
208
|
-
if (
|
|
208
|
+
if (opts.email) {
|
|
209
|
+
output({ data: { message: "Code sent", email } });
|
|
210
|
+
} else {
|
|
209
211
|
const code = await prompt("Enter the 6-digit code: ");
|
|
210
212
|
if (!code) outputError("bad_input", "Code is required");
|
|
211
213
|
const result = await client.post("/auth/verify", { email, code });
|
|
212
214
|
writeConfig({ api_key: result.api_key, server });
|
|
213
215
|
output({ data: { api_key: result.api_key, email: result.email, server } });
|
|
214
|
-
} else {
|
|
215
|
-
output({ data: { message: "Code sent", email } });
|
|
216
216
|
}
|
|
217
217
|
} catch (e) {
|
|
218
218
|
handleError(e, "login_failed");
|