@layr-labs/ecloud-cli 0.4.0-dev.0 → 0.4.0-dev.2

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 (56) hide show
  1. package/VERSION +2 -0
  2. package/dist/commands/auth/whoami.js +1 -0
  3. package/dist/commands/auth/whoami.js.map +1 -1
  4. package/dist/commands/billing/__tests__/status.test.js +89 -22
  5. package/dist/commands/billing/__tests__/status.test.js.map +1 -1
  6. package/dist/commands/billing/__tests__/subscribe.test.js +88 -20
  7. package/dist/commands/billing/__tests__/subscribe.test.js.map +1 -1
  8. package/dist/commands/billing/__tests__/top-up.test.js +139 -201
  9. package/dist/commands/billing/__tests__/top-up.test.js.map +1 -1
  10. package/dist/commands/billing/cancel.js +88 -19
  11. package/dist/commands/billing/cancel.js.map +1 -1
  12. package/dist/commands/billing/status.js +89 -21
  13. package/dist/commands/billing/status.js.map +1 -1
  14. package/dist/commands/billing/subscribe.js +88 -19
  15. package/dist/commands/billing/subscribe.js.map +1 -1
  16. package/dist/commands/billing/top-up.js +102 -91
  17. package/dist/commands/billing/top-up.js.map +1 -1
  18. package/dist/commands/compute/app/create.js +1 -0
  19. package/dist/commands/compute/app/create.js.map +1 -1
  20. package/dist/commands/compute/app/deploy.js +38 -24
  21. package/dist/commands/compute/app/deploy.js.map +1 -1
  22. package/dist/commands/compute/app/info.js +2 -1
  23. package/dist/commands/compute/app/info.js.map +1 -1
  24. package/dist/commands/compute/app/list.js +2 -1
  25. package/dist/commands/compute/app/list.js.map +1 -1
  26. package/dist/commands/compute/app/logs.js +5 -8
  27. package/dist/commands/compute/app/logs.js.map +1 -1
  28. package/dist/commands/compute/app/profile/set.js +5 -8
  29. package/dist/commands/compute/app/profile/set.js.map +1 -1
  30. package/dist/commands/compute/app/releases.js +2 -1
  31. package/dist/commands/compute/app/releases.js.map +1 -1
  32. package/dist/commands/compute/app/start.js +5 -8
  33. package/dist/commands/compute/app/start.js.map +1 -1
  34. package/dist/commands/compute/app/stop.js +5 -8
  35. package/dist/commands/compute/app/stop.js.map +1 -1
  36. package/dist/commands/compute/app/terminate.js +5 -8
  37. package/dist/commands/compute/app/terminate.js.map +1 -1
  38. package/dist/commands/compute/app/upgrade.js +36 -14
  39. package/dist/commands/compute/app/upgrade.js.map +1 -1
  40. package/dist/commands/compute/build/info.js +9 -12
  41. package/dist/commands/compute/build/info.js.map +1 -1
  42. package/dist/commands/compute/build/list.js +9 -12
  43. package/dist/commands/compute/build/list.js.map +1 -1
  44. package/dist/commands/compute/build/logs.js +9 -12
  45. package/dist/commands/compute/build/logs.js.map +1 -1
  46. package/dist/commands/compute/build/status.js +9 -12
  47. package/dist/commands/compute/build/status.js.map +1 -1
  48. package/dist/commands/compute/build/submit.js +32 -10
  49. package/dist/commands/compute/build/submit.js.map +1 -1
  50. package/dist/commands/compute/build/verify.js +9 -12
  51. package/dist/commands/compute/build/verify.js.map +1 -1
  52. package/dist/commands/compute/environment/set.js +1 -0
  53. package/dist/commands/compute/environment/set.js.map +1 -1
  54. package/dist/commands/compute/undelegate.js +5 -8
  55. package/dist/commands/compute/undelegate.js.map +1 -1
  56. package/package.json +2 -2
@@ -157,13 +157,14 @@ var APPS_DIR = path2.join(CONFIG_DIR, "apps");
157
157
 
158
158
  // src/utils/version.ts
159
159
  function getCliVersion() {
160
- return true ? "0.4.0-dev.0" : "0.0.0";
160
+ return true ? "0.4.0-dev.2" : "0.0.0";
161
161
  }
162
162
  function getClientId() {
163
163
  return `ecloud-cli/v${getCliVersion()}`;
164
164
  }
165
165
 
166
166
  // src/utils/prompts.ts
167
+ import { execSync } from "child_process";
167
168
  function formatBuildChoice(build) {
168
169
  const repoUrl = String(build.repoUrl || "").replace(/\.git$/i, "").replace(/\/+$/, "");
169
170
  const repoName = (() => {
@@ -208,8 +209,8 @@ async function getPrivateKeyInteractive(privateKey) {
208
209
  }
209
210
  return privateKey;
210
211
  }
211
- const { getPrivateKeyWithSource: getPrivateKeyWithSource2 } = await import("@layr-labs/ecloud-sdk");
212
- const result = await getPrivateKeyWithSource2({ privateKey: void 0 });
212
+ const { getPrivateKeyWithSource } = await import("@layr-labs/ecloud-sdk");
213
+ const result = await getPrivateKeyWithSource({ privateKey: void 0 });
213
214
  if (result) {
214
215
  return result.key;
215
216
  }
@@ -312,12 +313,8 @@ import {
312
313
  createBillingModule,
313
314
  createBuildModule,
314
315
  getEnvironmentConfig as getEnvironmentConfig3,
315
- requirePrivateKey,
316
- getPrivateKeyWithSource,
317
- addHexPrefix as addHexPrefix2
316
+ requirePrivateKey
318
317
  } from "@layr-labs/ecloud-sdk";
319
- import { createWalletClient, custom } from "viem";
320
- import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
321
318
  async function createBuildClient(flags) {
322
319
  flags = await validateCommonFlags(flags, { requirePrivateKey: false });
323
320
  const environment = flags.environment;
@@ -430,8 +427,8 @@ function assertBuildId(buildId) {
430
427
  }
431
428
 
432
429
  // src/commands/compute/build/status.ts
433
- import { privateKeyToAccount as privateKeyToAccount5 } from "viem/accounts";
434
- import { addHexPrefix as addHexPrefix3 } from "@layr-labs/ecloud-sdk";
430
+ import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
431
+ import { addHexPrefix as addHexPrefix2 } from "@layr-labs/ecloud-sdk";
435
432
 
436
433
  // src/utils/buildInfo.ts
437
434
  import { BUILD_STATUS as BUILD_STATUS2 } from "@layr-labs/ecloud-sdk";
@@ -490,8 +487,8 @@ var BuildStatus = class _BuildStatus extends Command {
490
487
  const client = await createBuildClient(validatedFlags);
491
488
  let buildId = args.buildId;
492
489
  if (!buildId) {
493
- const billingAddress = privateKeyToAccount5(
494
- addHexPrefix3(validatedFlags["private-key"])
490
+ const billingAddress = privateKeyToAccount4(
491
+ addHexPrefix2(validatedFlags["private-key"])
495
492
  ).address;
496
493
  buildId = await promptBuildIdFromRecentBuilds({ client, billingAddress, limit: 20 });
497
494
  } else {