vmlive 1.0.4 → 1.0.6

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/package.json +1 -1
  2. package/src/cli.js +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vmlive",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Local development VM for custom Serverless PaaS",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -470,11 +470,12 @@ const runDev = async () => {
470
470
  console.log('\nLocal endpoints available:');
471
471
 
472
472
  const dashboardUrl = `http://dashboard.localhost:${mfPort}`;
473
- console.log(` \x1b]8;;${dashboardUrl}\x1b\\${dashboardUrl}\x1b]8;;\x1b\\ \x1b[32m[Dashboard]\x1b[0m`);
473
+ console.log(` \x1b]8;;${dashboardUrl}\x1b\\\x1b[32m[dashboard]\x1b[0m\x1b]8;;\x1b\\ ${dashboardUrl}`);
474
474
 
475
475
  config.functions.forEach(fn => {
476
476
  const endpointUrl = `http://${workspaceId}-${projectId}-${fn.name}.localhost:${mfPort}`;
477
- console.log(` \x1b]8;;${endpointUrl}\x1b\\${endpointUrl}\x1b]8;;\x1b\\`);
477
+ const padName = `[${fn.name}]`.padEnd(13, ' ');
478
+ console.log(` \x1b]8;;${endpointUrl}\x1b\\\x1b[36m${padName}\x1b[0m\x1b]8;;\x1b\\ ${endpointUrl}`);
478
479
  });
479
480
 
480
481
  setInterval(() => {
@@ -783,9 +784,12 @@ const main = async () => {
783
784
  await runLogin();
784
785
  } else if (command === 'deploy') {
785
786
  await runDeploy();
787
+ } else if (command === 'which' || command === '-v' || command === '--version' || command === 'v') {
788
+ const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8'));
789
+ console.log(`vmlive CLI v${pkg.version}`);
786
790
  } else {
787
791
  console.error(`\x1b[31m❌ Unknown command: ${command || 'missing'}\x1b[0m`);
788
- console.log('Usage: vm init | vm add | vm dev | vm test | vm login | vm deploy');
792
+ console.log('Usage: vm init | vm add | vm dev | vm test | vm login | vm deploy | vm which');
789
793
  process.exit(1);
790
794
  }
791
795
  };