@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
@@ -9,6 +9,7 @@ import { getBuildType as getBuildType2 } from "@layr-labs/ecloud-sdk";
9
9
 
10
10
  // src/utils/prompts.ts
11
11
  import { input, select, password, confirm as inquirerConfirm } from "@inquirer/prompts";
12
+ import chalk from "chalk";
12
13
  import fs3 from "fs";
13
14
  import path3 from "path";
14
15
  import os3 from "os";
@@ -155,7 +156,7 @@ var APPS_DIR = path2.join(CONFIG_DIR, "apps");
155
156
 
156
157
  // src/utils/version.ts
157
158
  function getCliVersion() {
158
- return true ? "0.3.4" : "0.0.0";
159
+ return true ? "0.4.0-dev" : "0.0.0";
159
160
  }
160
161
  function getClientId() {
161
162
  return `ecloud-cli/v${getCliVersion()}`;
@@ -399,7 +400,7 @@ async function withTelemetry(command, action) {
399
400
 
400
401
  // src/utils/buildInfo.ts
401
402
  import { BUILD_STATUS } from "@layr-labs/ecloud-sdk";
402
- import chalk from "chalk";
403
+ import chalk2 from "chalk";
403
404
 
404
405
  // src/utils/build.ts
405
406
  function formatSourceLink(repoUrl, gitRef) {
@@ -428,9 +429,9 @@ function indentLines(lines, indent) {
428
429
  function formatBuildStatus(status) {
429
430
  const s = status;
430
431
  const color = {
431
- [BUILD_STATUS.BUILDING]: chalk.yellow,
432
- [BUILD_STATUS.SUCCESS]: chalk.green,
433
- [BUILD_STATUS.FAILED]: chalk.red
432
+ [BUILD_STATUS.BUILDING]: chalk2.yellow,
433
+ [BUILD_STATUS.SUCCESS]: chalk2.green,
434
+ [BUILD_STATUS.FAILED]: chalk2.red
434
435
  }[s];
435
436
  return color ? color(status) : status;
436
437
  }
@@ -438,17 +439,17 @@ function kv(label, value) {
438
439
  if (value === void 0 || value === null) return void 0;
439
440
  const str = String(value);
440
441
  if (!str) return void 0;
441
- return `${chalk.cyan(label)}: ${str}`;
442
+ return `${chalk2.cyan(label)}: ${str}`;
442
443
  }
443
444
  function formatBuildInfo(build, opts = {}) {
444
445
  const { indent = "", includeDependencies = true, maxProvenanceJsonChars = 200 } = opts;
445
446
  const lines = [];
446
- lines.push(`${indent}${chalk.cyan("build_id")}: ${build.buildId}`);
447
- lines.push(`${indent}${chalk.cyan("repo_url")}: ${build.repoUrl}`);
448
- lines.push(`${indent}${chalk.cyan("git_ref")}: ${build.gitRef}`);
449
- lines.push(`${indent}${chalk.cyan("source")}: ${formatSourceLink(build.repoUrl, build.gitRef)}`);
450
- lines.push(`${indent}${chalk.cyan("status")}: ${formatBuildStatus(build.status)}`);
451
- lines.push(`${indent}${chalk.cyan("build_type")}: ${build.buildType}`);
447
+ lines.push(`${indent}${chalk2.cyan("build_id")}: ${build.buildId}`);
448
+ lines.push(`${indent}${chalk2.cyan("repo_url")}: ${build.repoUrl}`);
449
+ lines.push(`${indent}${chalk2.cyan("git_ref")}: ${build.gitRef}`);
450
+ lines.push(`${indent}${chalk2.cyan("source")}: ${formatSourceLink(build.repoUrl, build.gitRef)}`);
451
+ lines.push(`${indent}${chalk2.cyan("status")}: ${formatBuildStatus(build.status)}`);
452
+ lines.push(`${indent}${chalk2.cyan("build_type")}: ${build.buildType}`);
452
453
  const optionalLines = [
453
454
  kv("image_name", build.imageName),
454
455
  kv("image_digest", build.imageDigest),
@@ -456,19 +457,19 @@ function formatBuildInfo(build, opts = {}) {
456
457
  build.provenanceJson !== void 0 ? (() => {
457
458
  const json = JSON.stringify(build.provenanceJson);
458
459
  const printable = json.length <= maxProvenanceJsonChars ? json : `${json.slice(0, maxProvenanceJsonChars)}\u2026 (use --json)`;
459
- return `${chalk.cyan("provenance_json")}: ${printable}`;
460
+ return `${chalk2.cyan("provenance_json")}: ${printable}`;
460
461
  })() : void 0,
461
462
  kv("provenance_signature", build.provenanceSignature),
462
463
  kv("created_at", build.createdAt),
463
464
  kv("updated_at", build.updatedAt),
464
- build.errorMessage ? `${chalk.cyan("error_message")}: ${chalk.red(build.errorMessage)}` : void 0
465
+ build.errorMessage ? `${chalk2.cyan("error_message")}: ${chalk2.red(build.errorMessage)}` : void 0
465
466
  ].filter(Boolean);
466
467
  for (const l of optionalLines) lines.push(`${indent}${l}`);
467
468
  if (!includeDependencies) return lines;
468
469
  const deps = build.dependencies;
469
470
  if (deps && Object.keys(deps).length > 0) {
470
471
  lines.push("");
471
- lines.push(`${indent}${chalk.cyan.bold("dependencies")}:`);
472
+ lines.push(`${indent}${chalk2.cyan.bold("dependencies")}:`);
472
473
  for (const [digest, dep] of sortedEntries(deps)) {
473
474
  lines.push(`${indent}- ${digest}`);
474
475
  lines.push(...indentLines(formatBuildInfo(dep, { ...opts, indent: "" }), `${indent} `));