From 34b251ce7728398f499351c365851d38cee60deb Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Tue, 6 Aug 2024 13:43:45 -0300 Subject: [PATCH] feat(cli): enable json output of cartesi deploy build --- .changeset/tidy-trees-brake.md | 5 +++++ apps/cli/src/commands/deploy/build.ts | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/tidy-trees-brake.md diff --git a/.changeset/tidy-trees-brake.md b/.changeset/tidy-trees-brake.md new file mode 100644 index 00000000..389ae28f --- /dev/null +++ b/.changeset/tidy-trees-brake.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": patch +--- + +enable json output of cartesi deploy build diff --git a/apps/cli/src/commands/deploy/build.ts b/apps/cli/src/commands/deploy/build.ts index 34e65793..5812c04f 100644 --- a/apps/cli/src/commands/deploy/build.ts +++ b/apps/cli/src/commands/deploy/build.ts @@ -24,6 +24,8 @@ export default class DeployBuild extends BaseCommand { }), }; + public static enableJsonFlag = true; + private async buildRollupsImage(platform?: string) { const buildResult = tmpNameSync(); const imagePath = this.getContextPath("image"); @@ -53,7 +55,7 @@ export default class DeployBuild extends BaseCommand { return fs.readFileSync(buildResult, "utf8"); } - public async run(): Promise { + public async run() { const { flags } = await this.parse(DeployBuild); // print machine hash @@ -75,6 +77,6 @@ export default class DeployBuild extends BaseCommand { value: image, }); - return image; + return { image }; } }