@layr-labs/ecloud-cli 0.4.0-dev.1 → 0.4.0-dev.3
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
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// src/commands/compute/build/list.ts
|
|
4
4
|
import { Command, Flags as Flags2 } from "@oclif/core";
|
|
5
5
|
import chalk3 from "chalk";
|
|
6
|
-
import { privateKeyToAccount as
|
|
7
|
-
import { addHexPrefix as
|
|
6
|
+
import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
|
|
7
|
+
import { addHexPrefix as addHexPrefix2 } from "@layr-labs/ecloud-sdk";
|
|
8
8
|
|
|
9
9
|
// src/flags.ts
|
|
10
10
|
import { Flags } from "@oclif/core";
|
|
@@ -159,13 +159,14 @@ var APPS_DIR = path2.join(CONFIG_DIR, "apps");
|
|
|
159
159
|
|
|
160
160
|
// src/utils/version.ts
|
|
161
161
|
function getCliVersion() {
|
|
162
|
-
return true ? "0.4.0-dev.
|
|
162
|
+
return true ? "0.4.0-dev.3" : "0.0.0";
|
|
163
163
|
}
|
|
164
164
|
function getClientId() {
|
|
165
165
|
return `ecloud-cli/v${getCliVersion()}`;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// src/utils/prompts.ts
|
|
169
|
+
import { execSync } from "child_process";
|
|
169
170
|
async function getPrivateKeyInteractive(privateKey) {
|
|
170
171
|
if (privateKey) {
|
|
171
172
|
if (!validatePrivateKeyFormat(privateKey)) {
|
|
@@ -173,8 +174,8 @@ async function getPrivateKeyInteractive(privateKey) {
|
|
|
173
174
|
}
|
|
174
175
|
return privateKey;
|
|
175
176
|
}
|
|
176
|
-
const { getPrivateKeyWithSource
|
|
177
|
-
const result = await
|
|
177
|
+
const { getPrivateKeyWithSource } = await import("@layr-labs/ecloud-sdk");
|
|
178
|
+
const result = await getPrivateKeyWithSource({ privateKey: void 0 });
|
|
178
179
|
if (result) {
|
|
179
180
|
return result.key;
|
|
180
181
|
}
|
|
@@ -277,12 +278,8 @@ import {
|
|
|
277
278
|
createBillingModule,
|
|
278
279
|
createBuildModule,
|
|
279
280
|
getEnvironmentConfig as getEnvironmentConfig3,
|
|
280
|
-
requirePrivateKey
|
|
281
|
-
getPrivateKeyWithSource,
|
|
282
|
-
addHexPrefix as addHexPrefix2
|
|
281
|
+
requirePrivateKey
|
|
283
282
|
} from "@layr-labs/ecloud-sdk";
|
|
284
|
-
import { createWalletClient, custom } from "viem";
|
|
285
|
-
import { privateKeyToAccount as privateKeyToAccount4 } from "viem/accounts";
|
|
286
283
|
async function createBuildClient(flags) {
|
|
287
284
|
flags = await validateCommonFlags(flags, { requirePrivateKey: false });
|
|
288
285
|
const environment = flags.environment;
|
|
@@ -449,8 +446,8 @@ var BuildList = class _BuildList extends Command {
|
|
|
449
446
|
const { flags } = await this.parse(_BuildList);
|
|
450
447
|
const validatedFlags = await validateCommonFlags(flags);
|
|
451
448
|
const client = await createBuildClient(validatedFlags);
|
|
452
|
-
const billingAddress =
|
|
453
|
-
|
|
449
|
+
const billingAddress = privateKeyToAccount4(
|
|
450
|
+
addHexPrefix2(validatedFlags["private-key"])
|
|
454
451
|
).address;
|
|
455
452
|
const limit = Math.max(1, Math.min(100, flags.limit ?? 20));
|
|
456
453
|
const offset = Math.max(0, flags.offset ?? 0);
|