Skip to content

feat(stack): add -ojson and --quiet machine-readable output to stack deploy#1796

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-stack-deploy-output
Draft

feat(stack): add -ojson and --quiet machine-readable output to stack deploy#1796
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-stack-deploy-output

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

  • Add output flag (-o txt|json) to stack deploy command
  • Include stackId and stackDefinition (API response) in DeployResult
  • Modify exec() to use silent process renderer when -ojson, and return stackId/stackDefinition
  • Use JSONView component in render() for JSON output (no run() override needed)
  • Modify render() to return stack ID when --quiet is set
  • Run code formatter
  • Regenerate documentation
  • Validate with lint/build/tests

Agent-Logs-Url: https://github.com/mittwald/cli/sessions/30f15eeb-5504-4d58-a256-8355d012e3ef

Co-authored-by: martin-helmich <2538958+martin-helmich@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix stack deploy output to be machine readable feat(stack): add -ojson and --quiet machine-readable output to stack deploy Apr 29, 2026
Copilot AI requested a review from martin-helmich April 29, 2026 07:11
Comment thread src/commands/stack/deploy.tsx Outdated
};
}

public async run(): Promise<void> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Solve this without overriding the run method. This should be solvable within the render method itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3a4e265. Removed the run() override and use the JSONView component directly in render() instead.

Comment thread src/commands/stack/deploy.tsx Outdated
} = this.flags;
const r = makeProcessRenderer(this.flags, "Deploying container stack");
const r = makeProcessRenderer(
{ quiet: this.flags.quiet || this.flags.output === "json", json: undefined },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Don't forget to run the code formatting script after your edits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3a4e265 — ran yarn format and committed the reformatted output.

Agent-Logs-Url: https://github.com/mittwald/cli/sessions/c113929c-6dfd-4852-b7a7-154836ffb23c

Co-authored-by: martin-helmich <2538958+martin-helmich@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stack deploy-return not machine readable

2 participants