<commit_before>require "language/node"

class NetlifyCli < Formula
  desc "Netlify command-line tool"
  homepage "https://www.netlify.com/docs/cli"
  url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-8.0.20.tgz"
  sha256 "ce617de0f363c21ec447a365b0c12225db3812ac5fb0efba805cbdd0bb6a50b3"
  license "MIT"
  head "https://github.com/netlify/cli.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "97307959f5019b87b4f8a04803cbeca7a3d4358a9e0f5a1b8e967f9d19257372"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "97307959f5019b87b4f8a04803cbeca7a3d4358a9e0f5a1b8e967f9d19257372"
    sha256 cellar: :any_skip_relocation, monterey:       "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, big_sur:        "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, catalina:       "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "bde0994d27b6f5fba3e53352d46e35db6ea7d8da77d7db4833d2f51eaacba040"
  end

  depends_on "node"

  uses_from_macos "expect" => :test

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.exp").write <<~EOS
      spawn #{bin}/netlify login<commit_msg>netlify-cli 8.1.0<commit_after>require "language/node"

class NetlifyCli < Formula
  desc "Netlify command-line tool"
  homepage "https://www.netlify.com/docs/cli"
  url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-8.1.0.tgz"
  sha256 "88ba3a0d406361ea7c65fd9c114e860cdfe3cd0c2c5a4d2a81aabbebc2f89610"
  license "MIT"
  head "https://github.com/netlify/cli.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "97307959f5019b87b4f8a04803cbeca7a3d4358a9e0f5a1b8e967f9d19257372"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "97307959f5019b87b4f8a04803cbeca7a3d4358a9e0f5a1b8e967f9d19257372"
    sha256 cellar: :any_skip_relocation, monterey:       "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, big_sur:        "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, catalina:       "fec4696105de095b9b89348ebfb19236f1a2a39d960bb43ae5011a606bf321b1"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "bde0994d27b6f5fba3e53352d46e35db6ea7d8da77d7db4833d2f51eaacba040"
  end

  depends_on "node"

  uses_from_macos "expect" => :test

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.exp").write <<~EOS
      spawn #{bin}/netlify login
{'fraction_non_alphanumeric': 0.09389179755671902, 'fraction_numerical': 0.218848167539267, 'mean_word_length': 5.807600950118765, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '4854558', 'n_tokens_mistral': 1612, 'n_tokens_neox': 1274, 'n_words': 150}