<commit_before>'use strict';

let cli     = require('heroku-cli-util');
let request = require('request');

module.exports = {
  topic: 'builds',
  command: 'output',
  needsAuth: true,
  needsApp: true,
  description: 'show build output',
  help: 'Show build output for a Heroku app',
  variableArgs: true,
  run: cli.command(showOutput)
};

function showOutput(context, heroku) {
  let id = context.args[0];

  if (!id) {
    cli.error("Usage: heroku builds:output <id> -a <app>")
    return
  }

  return heroku.request({
    path: `/apps/${context.app}/builds/${id}`,
    method: 'GET',<commit_msg>Leverage command line validation via @dickeyxxx<commit_after>'use strict';

let cli     = require('heroku-cli-util');
let request = require('request');

module.exports = {
  topic: 'builds',
  command: 'output',
  needsAuth: true,
  needsApp: true,
  description: 'show build output',
  help: 'Show build output for a Heroku app',
  args: [
    {
      name: 'id',
      optional: false,
      hidden: false
    }
  ],
  run: cli.command(showOutput)
};

function showOutput(context, heroku) {
  let id = context.args.id;

  return heroku.request({
    path: `/apps/${context.app}/builds/${id}`,
    method: 'GET',
{'fraction_non_alphanumeric': 0.15815485996705106, 'fraction_numerical': 0.0008237232289950577, 'mean_word_length': 3.5676691729323307, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '740247', 'n_tokens_mistral': 417, 'n_tokens_neox': 417, 'n_words': 108}