@vm0/cli 0.3.0 → 1.0.0
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 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12182,9 +12182,9 @@ async function getToken() {
|
|
|
12182
12182
|
}
|
|
12183
12183
|
async function getApiUrl() {
|
|
12184
12184
|
const config2 = await loadConfig();
|
|
12185
|
-
const
|
|
12186
|
-
if (
|
|
12187
|
-
return
|
|
12185
|
+
const apiUrl = process.env.VM0_API_URL;
|
|
12186
|
+
if (apiUrl) {
|
|
12187
|
+
return apiUrl.startsWith("http") ? apiUrl : `https://${apiUrl}`;
|
|
12188
12188
|
}
|
|
12189
12189
|
return config2.apiUrl ?? "https://www.vm0.ai";
|
|
12190
12190
|
}
|
|
@@ -12811,7 +12811,7 @@ program.command("info").description("Display environment information").action(as
|
|
|
12811
12811
|
console.log(`API Host: ${apiUrl}`);
|
|
12812
12812
|
});
|
|
12813
12813
|
var authCommand = program.command("auth").description("Authentication commands");
|
|
12814
|
-
authCommand.command("login").description("Log in to VM0 (use
|
|
12814
|
+
authCommand.command("login").description("Log in to VM0 (use VM0_API_URL env var to set API URL)").action(async () => {
|
|
12815
12815
|
await authenticate();
|
|
12816
12816
|
});
|
|
12817
12817
|
authCommand.command("logout").description("Log out of VM0").action(async () => {
|