@layr-labs/ecloud-cli 0.4.0-dev.1 → 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/bin/dev.js +0 -0
- package/dist/commands/auth/generate.js +0 -0
- package/dist/commands/auth/login.js +0 -0
- package/dist/commands/auth/logout.js +0 -0
- package/dist/commands/auth/migrate.js +0 -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/configure/tls.js +0 -0
- 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/list.js +0 -0
- package/dist/commands/compute/environment/set.js +1 -0
- package/dist/commands/compute/environment/set.js.map +1 -1
- package/dist/commands/compute/environment/show.js +0 -0
- package/dist/commands/compute/undelegate.js +5 -8
- package/dist/commands/compute/undelegate.js.map +1 -1
- package/dist/commands/telemetry/disable.js +0 -0
- package/dist/commands/telemetry/enable.js +0 -0
- package/dist/commands/telemetry/status.js +0 -0
- package/dist/commands/upgrade.js +0 -0
- package/dist/commands/version.js +0 -0
- package/package.json +15 -14
- package/LICENSE +0 -7
|
@@ -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.
|
|
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
|
|
212
|
-
const result = await
|
|
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
|
|
434
|
-
import { addHexPrefix as
|
|
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 =
|
|
494
|
-
|
|
490
|
+
const billingAddress = privateKeyToAccount4(
|
|
491
|
+
addHexPrefix2(validatedFlags["private-key"])
|
|
495
492
|
).address;
|
|
496
493
|
buildId = await promptBuildIdFromRecentBuilds({ client, billingAddress, limit: 20 });
|
|
497
494
|
} else {
|