@layr-labs/ecloud-cli 0.3.4 → 0.4.0-dev

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 (48) hide show
  1. package/VERSION +2 -2
  2. package/dist/commands/auth/whoami.js +1 -0
  3. package/dist/commands/auth/whoami.js.map +1 -1
  4. package/dist/commands/billing/cancel.js +8 -7
  5. package/dist/commands/billing/cancel.js.map +1 -1
  6. package/dist/commands/billing/status.js +20 -19
  7. package/dist/commands/billing/status.js.map +1 -1
  8. package/dist/commands/billing/subscribe.js +13 -12
  9. package/dist/commands/billing/subscribe.js.map +1 -1
  10. package/dist/commands/compute/app/create.js +1 -0
  11. package/dist/commands/compute/app/create.js.map +1 -1
  12. package/dist/commands/compute/app/deploy.js +50 -21
  13. package/dist/commands/compute/app/deploy.js.map +1 -1
  14. package/dist/commands/compute/app/info.js +32 -31
  15. package/dist/commands/compute/app/info.js.map +1 -1
  16. package/dist/commands/compute/app/list.js +31 -30
  17. package/dist/commands/compute/app/list.js.map +1 -1
  18. package/dist/commands/compute/app/logs.js +2 -1
  19. package/dist/commands/compute/app/logs.js.map +1 -1
  20. package/dist/commands/compute/app/profile/set.js +6 -5
  21. package/dist/commands/compute/app/profile/set.js.map +1 -1
  22. package/dist/commands/compute/app/releases.js +18 -17
  23. package/dist/commands/compute/app/releases.js.map +1 -1
  24. package/dist/commands/compute/app/start.js +6 -5
  25. package/dist/commands/compute/app/start.js.map +1 -1
  26. package/dist/commands/compute/app/stop.js +6 -5
  27. package/dist/commands/compute/app/stop.js.map +1 -1
  28. package/dist/commands/compute/app/terminate.js +6 -5
  29. package/dist/commands/compute/app/terminate.js.map +1 -1
  30. package/dist/commands/compute/app/upgrade.js +51 -22
  31. package/dist/commands/compute/app/upgrade.js.map +1 -1
  32. package/dist/commands/compute/build/info.js +16 -15
  33. package/dist/commands/compute/build/info.js.map +1 -1
  34. package/dist/commands/compute/build/list.js +13 -12
  35. package/dist/commands/compute/build/list.js.map +1 -1
  36. package/dist/commands/compute/build/logs.js +4 -3
  37. package/dist/commands/compute/build/logs.js.map +1 -1
  38. package/dist/commands/compute/build/status.js +9 -8
  39. package/dist/commands/compute/build/status.js.map +1 -1
  40. package/dist/commands/compute/build/submit.js +16 -15
  41. package/dist/commands/compute/build/submit.js.map +1 -1
  42. package/dist/commands/compute/build/verify.js +10 -9
  43. package/dist/commands/compute/build/verify.js.map +1 -1
  44. package/dist/commands/compute/environment/set.js +1 -0
  45. package/dist/commands/compute/environment/set.js.map +1 -1
  46. package/dist/commands/compute/undelegate.js +6 -5
  47. package/dist/commands/compute/undelegate.js.map +1 -1
  48. package/package.json +2 -2
@@ -16,6 +16,7 @@ import { getBuildType as getBuildType2 } from "@layr-labs/ecloud-sdk";
16
16
 
17
17
  // src/utils/prompts.ts
18
18
  import { input, select, password, confirm as inquirerConfirm } from "@inquirer/prompts";
19
+ import chalk from "chalk";
19
20
  import fs3 from "fs";
20
21
  import path3 from "path";
21
22
  import os3 from "os";
@@ -198,7 +199,7 @@ function getAppName(environment, appID) {
198
199
 
199
200
  // src/utils/version.ts
200
201
  function getCliVersion() {
201
- return true ? "0.3.4" : "0.0.0";
202
+ return true ? "0.4.0-dev" : "0.0.0";
202
203
  }
203
204
  function getClientId() {
204
205
  return `ecloud-cli/v${getCliVersion()}`;
@@ -376,7 +377,7 @@ async function validateCommonFlags(flags, options) {
376
377
  import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
377
378
 
378
379
  // src/utils/format.ts
379
- import chalk from "chalk";
380
+ import chalk2 from "chalk";
380
381
  function formatBytes(bytes) {
381
382
  if (bytes === 0) return "0 B";
382
383
  const k = 1024;
@@ -388,38 +389,38 @@ function formatStatus(status) {
388
389
  switch (status.toLowerCase()) {
389
390
  case "running":
390
391
  case "started":
391
- return chalk.green(status);
392
+ return chalk2.green(status);
392
393
  case "stopped":
393
- return chalk.yellow(status);
394
+ return chalk2.yellow(status);
394
395
  case "terminated":
395
- return chalk.red(status);
396
+ return chalk2.red(status);
396
397
  case "suspended":
397
- return chalk.red(status);
398
+ return chalk2.red(status);
398
399
  case "deploying":
399
400
  case "upgrading":
400
401
  case "resuming":
401
402
  case "stopping":
402
- return chalk.cyan(status);
403
+ return chalk2.cyan(status);
403
404
  case "failed":
404
- return chalk.red(status);
405
+ return chalk2.red(status);
405
406
  default:
406
- return chalk.gray(status);
407
+ return chalk2.gray(status);
407
408
  }
408
409
  }
409
410
  function formatAppDisplay(options) {
410
411
  const { appInfo, appName, status, releaseTimestamp, showProfileDetails = false } = options;
411
412
  const displayName = appName || appInfo.profile?.name;
412
- const name = displayName ? chalk.cyan(displayName) : chalk.gray("(unnamed)");
413
- const id = chalk.gray(appInfo.address);
414
- const releaseTime = releaseTimestamp ? chalk.gray(new Date(releaseTimestamp * 1e3).toISOString().replace("T", " ").slice(0, 19)) : chalk.gray("-");
413
+ const name = displayName ? chalk2.cyan(displayName) : chalk2.gray("(unnamed)");
414
+ const id = chalk2.gray(appInfo.address);
415
+ const releaseTime = releaseTimestamp ? chalk2.gray(new Date(releaseTimestamp * 1e3).toISOString().replace("T", " ").slice(0, 19)) : chalk2.gray("-");
415
416
  const statusStr = status || appInfo.status;
416
417
  const formattedStatus = formatStatus(statusStr);
417
- const instance = appInfo.machineType && appInfo.machineType !== "No instance assigned" ? chalk.gray(appInfo.machineType) : chalk.gray("-");
418
- const ip = appInfo.ip && appInfo.ip !== "No IP assigned" ? chalk.white(appInfo.ip) : chalk.gray("No IP assigned");
418
+ const instance = appInfo.machineType && appInfo.machineType !== "No instance assigned" ? chalk2.gray(appInfo.machineType) : chalk2.gray("-");
419
+ const ip = appInfo.ip && appInfo.ip !== "No IP assigned" ? chalk2.white(appInfo.ip) : chalk2.gray("No IP assigned");
419
420
  const metrics = appInfo.metrics;
420
- const cpu = metrics?.cpu_utilization_percent !== void 0 ? chalk.white(`${metrics.cpu_utilization_percent.toFixed(1)}%`) : chalk.gray("-");
421
- const memory = metrics?.memory_utilization_percent !== void 0 ? chalk.white(`${metrics.memory_utilization_percent.toFixed(1)}%`) : chalk.gray("-");
422
- const memoryUsage = metrics?.memory_used_bytes !== void 0 && metrics?.memory_total_bytes !== void 0 ? chalk.gray(
421
+ const cpu = metrics?.cpu_utilization_percent !== void 0 ? chalk2.white(`${metrics.cpu_utilization_percent.toFixed(1)}%`) : chalk2.gray("-");
422
+ const memory = metrics?.memory_utilization_percent !== void 0 ? chalk2.white(`${metrics.memory_utilization_percent.toFixed(1)}%`) : chalk2.gray("-");
423
+ const memoryUsage = metrics?.memory_used_bytes !== void 0 && metrics?.memory_total_bytes !== void 0 ? chalk2.gray(
423
424
  `(${formatBytes(metrics.memory_used_bytes)} / ${formatBytes(metrics.memory_total_bytes)})`
424
425
  ) : "";
425
426
  const evmAddresses = (appInfo.evmAddresses || []).map((addr) => ({
@@ -470,33 +471,33 @@ function printAppDisplay(display, log, indent = " ", options = {}) {
470
471
  for (let i = 0; i < addrs.length; i++) {
471
472
  const addr = addrs[i];
472
473
  const label = i === 0 ? "EVM Address:" : " ";
473
- log(`${indent}${label} ${chalk.gray(`${addr.address} (path: ${addr.path})`)}`);
474
+ log(`${indent}${label} ${chalk2.gray(`${addr.address} (path: ${addr.path})`)}`);
474
475
  }
475
476
  } else {
476
- log(`${indent}EVM Address: ${chalk.gray("-")}`);
477
+ log(`${indent}EVM Address: ${chalk2.gray("-")}`);
477
478
  }
478
479
  if (display.solanaAddresses.length > 0) {
479
480
  const addrs = singleAddress ? display.solanaAddresses.slice(0, 1) : display.solanaAddresses;
480
481
  for (let i = 0; i < addrs.length; i++) {
481
482
  const addr = addrs[i];
482
483
  const label = i === 0 ? "Solana Address:" : " ";
483
- log(`${indent}${label} ${chalk.gray(`${addr.address} (path: ${addr.path})`)}`);
484
+ log(`${indent}${label} ${chalk2.gray(`${addr.address} (path: ${addr.path})`)}`);
484
485
  }
485
486
  } else {
486
- log(`${indent}Solana Address: ${chalk.gray("-")}`);
487
+ log(`${indent}Solana Address: ${chalk2.gray("-")}`);
487
488
  }
488
489
  if (showProfile && display.profile) {
489
490
  log(
490
- chalk.gray(`${indent}\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`)
491
+ chalk2.gray(`${indent}\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`)
491
492
  );
492
493
  if (display.profile.website) {
493
- log(`${indent}Website: ${chalk.gray(display.profile.website)}`);
494
+ log(`${indent}Website: ${chalk2.gray(display.profile.website)}`);
494
495
  }
495
496
  if (display.profile.description) {
496
- log(`${indent}Description: ${chalk.gray(display.profile.description)}`);
497
+ log(`${indent}Description: ${chalk2.gray(display.profile.description)}`);
497
498
  }
498
499
  if (display.profile.xURL) {
499
- log(`${indent}X (Twitter): ${chalk.gray(display.profile.xURL)}`);
500
+ log(`${indent}X (Twitter): ${chalk2.gray(display.profile.xURL)}`);
500
501
  }
501
502
  }
502
503
  }
@@ -513,7 +514,7 @@ function getDashboardUrl(environment, appAddress) {
513
514
  }
514
515
 
515
516
  // src/commands/compute/app/list.ts
516
- import chalk2 from "chalk";
517
+ import chalk3 from "chalk";
517
518
 
518
519
  // src/telemetry.ts
519
520
  import {
@@ -686,7 +687,7 @@ No active apps found for developer ${developerAddr} (use --all to show terminate
686
687
  return bTime - aTime;
687
688
  });
688
689
  console.log();
689
- this.log(chalk2.bold(`Apps for ${developerAddr} (${environment}):`));
690
+ this.log(chalk3.bold(`Apps for ${developerAddr} (${environment}):`));
690
691
  console.log();
691
692
  for (let i = 0; i < appItems.length; i++) {
692
693
  const { apiInfo, appName, status, releaseTimestamp } = appItems[i];
@@ -705,15 +706,15 @@ No active apps found for developer ${developerAddr} (use --all to show terminate
705
706
  showProfile: false
706
707
  });
707
708
  const dashboardUrl = getDashboardUrl(environment, appItems[i].appAddr);
708
- this.log(` Dashboard: ${chalk2.blue.underline(dashboardUrl)}`);
709
+ this.log(` Dashboard: ${chalk3.blue.underline(dashboardUrl)}`);
709
710
  if (i < appItems.length - 1) {
710
711
  this.log(
711
- chalk2.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")
712
+ chalk3.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")
712
713
  );
713
714
  }
714
715
  }
715
716
  console.log();
716
- this.log(chalk2.gray(`Total: ${appItems.length} app(s)`));
717
+ this.log(chalk3.gray(`Total: ${appItems.length} app(s)`));
717
718
  });
718
719
  }
719
720
  };