@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.
- package/VERSION +2 -0
- package/dist/commands/auth/whoami.js +1 -0
- package/dist/commands/auth/whoami.js.map +1 -1
- package/dist/commands/billing/__tests__/status.test.js +89 -22
- package/dist/commands/billing/__tests__/status.test.js.map +1 -1
- package/dist/commands/billing/__tests__/subscribe.test.js +88 -20
- package/dist/commands/billing/__tests__/subscribe.test.js.map +1 -1
- package/dist/commands/billing/__tests__/top-up.test.js +139 -201
- package/dist/commands/billing/__tests__/top-up.test.js.map +1 -1
- package/dist/commands/billing/cancel.js +88 -19
- package/dist/commands/billing/cancel.js.map +1 -1
- package/dist/commands/billing/status.js +89 -21
- package/dist/commands/billing/status.js.map +1 -1
- package/dist/commands/billing/subscribe.js +88 -19
- package/dist/commands/billing/subscribe.js.map +1 -1
- package/dist/commands/billing/top-up.js +102 -91
- package/dist/commands/billing/top-up.js.map +1 -1
- package/dist/commands/compute/app/create.js +1 -0
- package/dist/commands/compute/app/create.js.map +1 -1
- package/dist/commands/compute/app/deploy.js +38 -24
- package/dist/commands/compute/app/deploy.js.map +1 -1
- package/dist/commands/compute/app/info.js +2 -1
- package/dist/commands/compute/app/info.js.map +1 -1
- package/dist/commands/compute/app/list.js +2 -1
- package/dist/commands/compute/app/list.js.map +1 -1
- package/dist/commands/compute/app/logs.js +5 -8
- package/dist/commands/compute/app/logs.js.map +1 -1
- package/dist/commands/compute/app/profile/set.js +5 -8
- package/dist/commands/compute/app/profile/set.js.map +1 -1
- package/dist/commands/compute/app/releases.js +2 -1
- package/dist/commands/compute/app/releases.js.map +1 -1
- package/dist/commands/compute/app/start.js +5 -8
- package/dist/commands/compute/app/start.js.map +1 -1
- package/dist/commands/compute/app/stop.js +5 -8
- package/dist/commands/compute/app/stop.js.map +1 -1
- package/dist/commands/compute/app/terminate.js +5 -8
- package/dist/commands/compute/app/terminate.js.map +1 -1
- package/dist/commands/compute/app/upgrade.js +36 -14
- package/dist/commands/compute/app/upgrade.js.map +1 -1
- package/dist/commands/compute/build/info.js +9 -12
- package/dist/commands/compute/build/info.js.map +1 -1
- package/dist/commands/compute/build/list.js +9 -12
- package/dist/commands/compute/build/list.js.map +1 -1
- package/dist/commands/compute/build/logs.js +9 -12
- package/dist/commands/compute/build/logs.js.map +1 -1
- package/dist/commands/compute/build/status.js +9 -12
- package/dist/commands/compute/build/status.js.map +1 -1
- package/dist/commands/compute/build/submit.js +32 -10
- package/dist/commands/compute/build/submit.js.map +1 -1
- package/dist/commands/compute/build/verify.js +9 -12
- package/dist/commands/compute/build/verify.js.map +1 -1
- package/dist/commands/compute/environment/set.js +1 -0
- package/dist/commands/compute/environment/set.js.map +1 -1
- package/dist/commands/compute/undelegate.js +5 -8
- package/dist/commands/compute/undelegate.js.map +1 -1
- package/package.json +2 -2
|
@@ -156,13 +156,14 @@ var APPS_DIR = path2.join(CONFIG_DIR, "apps");
|
|
|
156
156
|
|
|
157
157
|
// src/utils/version.ts
|
|
158
158
|
function getCliVersion() {
|
|
159
|
-
return true ? "0.4.0-dev.
|
|
159
|
+
return true ? "0.4.0-dev.2" : "0.0.0";
|
|
160
160
|
}
|
|
161
161
|
function getClientId() {
|
|
162
162
|
return `ecloud-cli/v${getCliVersion()}`;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// src/utils/prompts.ts
|
|
166
|
+
import { execSync } from "child_process";
|
|
166
167
|
function formatBuildChoice(build) {
|
|
167
168
|
const repoUrl = String(build.repoUrl || "").replace(/\.git$/i, "").replace(/\/+$/, "");
|
|
168
169
|
const repoName = (() => {
|
|
@@ -207,8 +208,8 @@ async function getPrivateKeyInteractive(privateKey) {
|
|
|
207
208
|
}
|
|
208
209
|
return privateKey;
|
|
209
210
|
}
|
|
210
|
-
const { getPrivateKeyWithSource
|
|
211
|
-
const result = await
|
|
211
|
+
const { getPrivateKeyWithSource } = await import("@layr-labs/ecloud-sdk");
|
|
212
|
+
const result = await getPrivateKeyWithSource({ privateKey: void 0 });
|
|
212
213
|
if (result) {
|
|
213
214
|
return result.key;
|
|
214
215
|
}
|
|
@@ -311,12 +312,8 @@ import {
|
|
|
311
312
|
createBillingModule,
|
|
312
313
|
createBuildModule,
|
|
313
314
|
getEnvironmentConfig as getEnvironmentConfig3,
|
|
314
|
-
requirePrivateKey
|
|
315
|
-
getPrivateKeyWithSource,
|
|
316
|
-
addHexPrefix as addHexPrefix2
|
|
315
|
+
requirePrivateKey
|
|
317
316
|
} from "@layr-labs/ecloud-sdk";
|
|
318
|
-
import { createWalletClient, custom } from "viem";
|
|
319
|
-
import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
|
|
320
317
|
async function createBuildClient(flags) {
|
|
321
318
|
flags = await validateCommonFlags(flags, { requirePrivateKey: false });
|
|
322
319
|
const environment = flags.environment;
|
|
@@ -491,8 +488,8 @@ function assertBuildId(buildId) {
|
|
|
491
488
|
}
|
|
492
489
|
|
|
493
490
|
// src/commands/compute/build/info.ts
|
|
494
|
-
import { privateKeyToAccount as
|
|
495
|
-
import { addHexPrefix as
|
|
491
|
+
import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
|
|
492
|
+
import { addHexPrefix as addHexPrefix2 } from "@layr-labs/ecloud-sdk";
|
|
496
493
|
var BuildInfo = class _BuildInfo extends Command {
|
|
497
494
|
static description = "Show full build details (including dependency builds)";
|
|
498
495
|
static examples = [`$ ecloud compute build info 92d28b52-5f26-43ff-8c0b-3340f129e631`];
|
|
@@ -516,8 +513,8 @@ var BuildInfo = class _BuildInfo extends Command {
|
|
|
516
513
|
const client = await createBuildClient(validatedFlags);
|
|
517
514
|
let buildId = args.buildId;
|
|
518
515
|
if (!buildId) {
|
|
519
|
-
const billingAddress =
|
|
520
|
-
|
|
516
|
+
const billingAddress = privateKeyToAccount4(
|
|
517
|
+
addHexPrefix2(validatedFlags["private-key"])
|
|
521
518
|
).address;
|
|
522
519
|
buildId = await promptBuildIdFromRecentBuilds({ client, billingAddress, limit: 20 });
|
|
523
520
|
} else {
|