npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hoppscotch/cli

v0.20.0

Published

A CLI to run Hoppscotch test scripts in CI environments.

Downloads

1,159

Readme

Hoppscotch CLI ALPHA

A CLI to run Hoppscotch Test Scripts in CI environments.

Commands:

  • hopp test [options] [file]: testing hoppscotch collection.json file

Usage:

hopp [options or commands] arguments

Options:

  • -v, --ver: see the current version of the CLI
  • -h, --help: display help for command

Command Descriptions:

  1. hopp -v / hopp --ver

    • Prints out the current version of the Hoppscotch CLI
  2. hopp -h / hopp --help

    • Displays the help text
  3. hopp test [options] <file_path>

    • Interactive CLI to accept Hoppscotch collection JSON path
    • Parses the collection JSON and executes each requests
    • Executes pre-request script.
    • Outputs the response of each request.
    • Executes and outputs test-script response.

    Options:

    -e <file_path> / --env <file_path>
    • Accepts path to env.json with contents in below format:

      {
        "ENV1": "value1",
        "ENV2": "value2"
      }
    • You can now access those variables using pw.env.get('<var_name>')

      Taking the above example, pw.env.get("ENV1") will return "value1"

    --iteration-count <no_of_iterations>
    • Accepts the number of iterations to run the collection
    --iteration-data <file_path>
    • Accepts the path to a CSV file with contents in the below format:

      key1,key2,key3
      value1,value2,value3
      value4,value5,value6

      For every iteration the values will be replaced with the respective keys in the environment. For iteration 1 the value1,value2,value3 will be replaced and for iteration 2 value4,value5,value6 will be replaced and so on.

Install

  • Before you install Hoppscotch CLI you need to make sure you have the dependencies it requires to run.

    • Windows & macOS: You will need node-gyp installed. Find instructions here: https://github.com/nodejs/node-gyp
    • Debian/Ubuntu derivatives:
      sudo apt-get install python g++ build-essential
    • Alpine Linux:
      sudo apk add python3 make g++
    • Amazon Linux (AMI)
      sudo yum install gcc72 gcc72-c++
    • Arch Linux
      sudo pacman -S make gcc python
    • RHEL/Fedora derivatives:
      sudo dnf install python3 make gcc gcc-c++ zlib-devel brotli-devel openssl-devel libuv-devel
  • Once the dependencies are installed, install @hoppscotch/cli from npm by running:

    npm i -g @hoppscotch/cli

Developing:

  1. Clone the repository, make sure you've installed latest pnpm.
  2. pnpm install
  3. cd packages/hoppscotch-cli
  4. pnpm run build
  5. sudo pnpm link --global
  6. Test the installation by executing hopp

Contributing:

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
  2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
  3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.
  4. You may merge the Pull Request once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer merge it for you.

Set Up The Development Environment

  1. After cloning the repository, execute the following commands:

    pnpm install
    pnpm run build
  2. In order to test locally, you can use two types of package linking:

    1. The 'pnpm exec' way (preferred since it does not hamper your original installation of the CLI):

      pnpm link @hoppscotch/cli
      
      // Then to use or test the CLI:
      pnpm exec hopp
      
      // After testing, to remove the package linking:
      pnpm rm @hoppscotch/cli
    2. The 'global' way (warning: this might override the globally installed CLI, if exists):

      sudo pnpm link --global
      
      // Then to use or test the CLI:
      hopp
      
      // After testing, to remove the package linking:
      sudo pnpm rm --global @hoppscotch/cli
  3. To use the Typescript watch scripts:

    pnpm run dev