@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.
- package/VERSION +2 -2
- package/dist/commands/auth/whoami.js +1 -0
- package/dist/commands/auth/whoami.js.map +1 -1
- package/dist/commands/billing/cancel.js +8 -7
- package/dist/commands/billing/cancel.js.map +1 -1
- package/dist/commands/billing/status.js +20 -19
- package/dist/commands/billing/status.js.map +1 -1
- package/dist/commands/billing/subscribe.js +13 -12
- package/dist/commands/billing/subscribe.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 +50 -21
- package/dist/commands/compute/app/deploy.js.map +1 -1
- package/dist/commands/compute/app/info.js +32 -31
- package/dist/commands/compute/app/info.js.map +1 -1
- package/dist/commands/compute/app/list.js +31 -30
- package/dist/commands/compute/app/list.js.map +1 -1
- package/dist/commands/compute/app/logs.js +2 -1
- package/dist/commands/compute/app/logs.js.map +1 -1
- package/dist/commands/compute/app/profile/set.js +6 -5
- package/dist/commands/compute/app/profile/set.js.map +1 -1
- package/dist/commands/compute/app/releases.js +18 -17
- package/dist/commands/compute/app/releases.js.map +1 -1
- package/dist/commands/compute/app/start.js +6 -5
- package/dist/commands/compute/app/start.js.map +1 -1
- package/dist/commands/compute/app/stop.js +6 -5
- package/dist/commands/compute/app/stop.js.map +1 -1
- package/dist/commands/compute/app/terminate.js +6 -5
- package/dist/commands/compute/app/terminate.js.map +1 -1
- package/dist/commands/compute/app/upgrade.js +51 -22
- package/dist/commands/compute/app/upgrade.js.map +1 -1
- package/dist/commands/compute/build/info.js +16 -15
- package/dist/commands/compute/build/info.js.map +1 -1
- package/dist/commands/compute/build/list.js +13 -12
- package/dist/commands/compute/build/list.js.map +1 -1
- package/dist/commands/compute/build/logs.js +4 -3
- package/dist/commands/compute/build/logs.js.map +1 -1
- package/dist/commands/compute/build/status.js +9 -8
- package/dist/commands/compute/build/status.js.map +1 -1
- package/dist/commands/compute/build/submit.js +16 -15
- package/dist/commands/compute/build/submit.js.map +1 -1
- package/dist/commands/compute/build/verify.js +10 -9
- 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 +6 -5
- package/dist/commands/compute/undelegate.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/commands/compute/build/submit.ts
|
|
4
4
|
import { Command, Flags as Flags2 } from "@oclif/core";
|
|
5
|
-
import
|
|
5
|
+
import chalk2 from "chalk";
|
|
6
6
|
|
|
7
7
|
// src/flags.ts
|
|
8
8
|
import { Flags } from "@oclif/core";
|
|
@@ -10,6 +10,7 @@ import { getBuildType as getBuildType2 } from "@layr-labs/ecloud-sdk";
|
|
|
10
10
|
|
|
11
11
|
// src/utils/prompts.ts
|
|
12
12
|
import { input, select, password, confirm as inquirerConfirm } from "@inquirer/prompts";
|
|
13
|
+
import chalk from "chalk";
|
|
13
14
|
import fs3 from "fs";
|
|
14
15
|
import path3 from "path";
|
|
15
16
|
import os3 from "os";
|
|
@@ -156,7 +157,7 @@ var APPS_DIR = path2.join(CONFIG_DIR, "apps");
|
|
|
156
157
|
|
|
157
158
|
// src/utils/version.ts
|
|
158
159
|
function getCliVersion() {
|
|
159
|
-
return true ? "0.
|
|
160
|
+
return true ? "0.4.0-dev" : "0.0.0";
|
|
160
161
|
}
|
|
161
162
|
function getClientId() {
|
|
162
163
|
return `ecloud-cli/v${getCliVersion()}`;
|
|
@@ -585,7 +586,7 @@ var BuildSubmit = class _BuildSubmit extends Command {
|
|
|
585
586
|
this.error(e?.message || String(e));
|
|
586
587
|
}
|
|
587
588
|
const client = await createBuildClient(validatedFlags);
|
|
588
|
-
this.log(
|
|
589
|
+
this.log(chalk2.gray("Submitting build..."));
|
|
589
590
|
try {
|
|
590
591
|
if (flags["no-follow"]) {
|
|
591
592
|
const { buildId } = await client.submit({
|
|
@@ -596,20 +597,20 @@ var BuildSubmit = class _BuildSubmit extends Command {
|
|
|
596
597
|
buildContextPath,
|
|
597
598
|
dependencies
|
|
598
599
|
});
|
|
599
|
-
this.log(
|
|
600
|
+
this.log(chalk2.green(`Build submitted: ${buildId}`));
|
|
600
601
|
if (flags.json) {
|
|
601
602
|
this.log(JSON.stringify({ buildId }, null, 2));
|
|
602
603
|
} else {
|
|
603
604
|
this.log(`
|
|
604
|
-
Build ID: ${
|
|
605
|
+
Build ID: ${chalk2.cyan(buildId)}`);
|
|
605
606
|
this.log(
|
|
606
607
|
`
|
|
607
|
-
Use ${
|
|
608
|
+
Use ${chalk2.yellow(`ecloud compute build logs ${buildId} --follow`)} to watch progress`
|
|
608
609
|
);
|
|
609
610
|
this.log("");
|
|
610
|
-
this.log(
|
|
611
|
-
this.log(
|
|
612
|
-
this.log(
|
|
611
|
+
this.log(chalk2.gray("After the build completes, deploy or upgrade your app with the digest:"));
|
|
612
|
+
this.log(chalk2.gray(" ecloud compute app deploy --verifiable --image-ref <digest>"));
|
|
613
|
+
this.log(chalk2.gray(" ecloud compute app upgrade <app-id> --verifiable --image-ref <digest>"));
|
|
613
614
|
}
|
|
614
615
|
return;
|
|
615
616
|
}
|
|
@@ -631,7 +632,7 @@ Use ${chalk.yellow(`ecloud compute build logs ${buildId} --follow`)} to watch pr
|
|
|
631
632
|
this.log("");
|
|
632
633
|
await this.printBuildResult(build, flags.json, verified);
|
|
633
634
|
} catch (error) {
|
|
634
|
-
this.log(
|
|
635
|
+
this.log(chalk2.red("Build submission failed"));
|
|
635
636
|
if (error?.name === "BuildFailedError") {
|
|
636
637
|
this.error(`Build failed: ${error.message}`);
|
|
637
638
|
}
|
|
@@ -657,20 +658,20 @@ Use ${chalk.yellow(`ecloud compute build logs ${buildId} --follow`)} to watch pr
|
|
|
657
658
|
this.log(line);
|
|
658
659
|
}
|
|
659
660
|
this.log("");
|
|
660
|
-
this.log(
|
|
661
|
+
this.log(chalk2.bold("Next Steps:"));
|
|
661
662
|
this.log(
|
|
662
|
-
|
|
663
|
+
chalk2.gray(
|
|
663
664
|
"Submitting a build alone doesn't update your app. Deploy or upgrade with the new digest:"
|
|
664
665
|
)
|
|
665
666
|
);
|
|
666
667
|
this.log("");
|
|
667
|
-
this.log(
|
|
668
|
+
this.log(chalk2.yellow(" Deploy a new app:"));
|
|
668
669
|
this.log(` ecloud compute app deploy --verifiable --image-ref ${build.imageDigest}`);
|
|
669
670
|
this.log("");
|
|
670
|
-
this.log(
|
|
671
|
+
this.log(chalk2.yellow(" Upgrade an existing app:"));
|
|
671
672
|
this.log(` ecloud compute app upgrade <app-id> --verifiable --image-ref ${build.imageDigest}`);
|
|
672
673
|
} else {
|
|
673
|
-
this.log(
|
|
674
|
+
this.log(chalk2.red(`Build failed: ${build.errorMessage ?? "Unknown error"}`));
|
|
674
675
|
}
|
|
675
676
|
}
|
|
676
677
|
};
|