@vm0/cli 4.11.0 → 4.12.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.
Files changed (2) hide show
  1. package/index.js +20 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -163,6 +163,21 @@ async function checkAuthStatus() {
163
163
  console.log(chalk.blue("Using token from VM0_TOKEN environment variable"));
164
164
  }
165
165
  }
166
+ async function setupToken() {
167
+ const token = await getToken();
168
+ if (!token) {
169
+ console.error(chalk.red("Error: Not authenticated."));
170
+ console.error("");
171
+ console.error("To get a token for CI/CD:");
172
+ console.error(" 1. Run 'vm0 auth login' to authenticate");
173
+ console.error(" 2. Run 'vm0 auth setup-token' to get your token");
174
+ console.error(
175
+ " 3. Store the token in your CI/CD secrets (e.g., VM0_TOKEN)"
176
+ );
177
+ process.exit(1);
178
+ }
179
+ console.log(token);
180
+ }
166
181
 
167
182
  // src/commands/compose.ts
168
183
  import { Command } from "commander";
@@ -15946,7 +15961,7 @@ async function generateEnvPlaceholders(missingVars, envFilePath) {
15946
15961
  }
15947
15962
  }
15948
15963
  var cookCommand = new Command11().name("cook").description("One-click agent preparation and execution from vm0.yaml").argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
15949
- const shouldExit = await checkAndUpgrade("4.11.0", prompt);
15964
+ const shouldExit = await checkAndUpgrade("4.12.0", prompt);
15950
15965
  if (shouldExit) {
15951
15966
  process.exit(0);
15952
15967
  }
@@ -16583,7 +16598,7 @@ function handleError(error43, runId) {
16583
16598
 
16584
16599
  // src/index.ts
16585
16600
  var program = new Command17();
16586
- program.name("vm0").description("VM0 CLI - A modern build tool").version("4.11.0");
16601
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("4.12.0");
16587
16602
  program.command("info").description("Display environment information").action(async () => {
16588
16603
  console.log(chalk18.cyan("System Information:"));
16589
16604
  console.log(`Node Version: ${process.version}`);
@@ -16602,6 +16617,9 @@ authCommand.command("logout").description("Log out of VM0").action(async () => {
16602
16617
  authCommand.command("status").description("Show current authentication status").action(async () => {
16603
16618
  await checkAuthStatus();
16604
16619
  });
16620
+ authCommand.command("setup-token").description("Output auth token for CI/CD environments").action(async () => {
16621
+ await setupToken();
16622
+ });
16605
16623
  program.addCommand(composeCommand);
16606
16624
  program.addCommand(runCommand);
16607
16625
  program.addCommand(volumeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",