@orchagent/cli 0.3.82 → 0.3.83
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/commands/login.js
CHANGED
|
@@ -62,6 +62,8 @@ async function keyBasedLogin(apiKey) {
|
|
|
62
62
|
api_url: resolved.apiUrl,
|
|
63
63
|
default_org: existing.default_org ?? org.slug,
|
|
64
64
|
};
|
|
65
|
+
// Clear workspace from previous account — workspaces are account-specific
|
|
66
|
+
delete nextConfig.workspace;
|
|
65
67
|
await (0, config_1.saveConfig)(nextConfig);
|
|
66
68
|
await (0, analytics_1.track)('cli_login', { method: 'key' });
|
|
67
69
|
process.stdout.write(`✓ Logged in to ${org.slug}\n`);
|
|
@@ -81,6 +83,8 @@ async function browserBasedLogin(port) {
|
|
|
81
83
|
api_url: resolved.apiUrl,
|
|
82
84
|
default_org: existing.default_org ?? result.orgSlug,
|
|
83
85
|
};
|
|
86
|
+
// Clear workspace from previous account — workspaces are account-specific
|
|
87
|
+
delete nextConfig.workspace;
|
|
84
88
|
await (0, config_1.saveConfig)(nextConfig);
|
|
85
89
|
await (0, analytics_1.track)('cli_login', { method: 'browser' });
|
|
86
90
|
process.stdout.write(`\n✓ Logged in to ${result.orgSlug}\n`);
|
package/dist/commands/whoami.js
CHANGED
|
@@ -31,13 +31,5 @@ function registerWhoamiCommand(program) {
|
|
|
31
31
|
process.stdout.write(`Active workspace: ${configFile.workspace}\n`);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
// Show balance after org info
|
|
35
|
-
try {
|
|
36
|
-
const balance = await (0, api_1.getCreditsBalance)(config);
|
|
37
|
-
process.stdout.write(`Credits: $${(balance.balance_cents / 100).toFixed(2)} USD\n`);
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
// Ignore errors - don't let balance check break whoami
|
|
41
|
-
}
|
|
42
34
|
});
|
|
43
35
|
}
|
package/package.json
CHANGED