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

postman-collection-gen

v1.0.2

Published

Just a small command line tool that's takes advantage of the [Postman SDK](https://github.com/postmanlabs/postman-collection) and [postman-code-gen](https://github.com/postmanlabs/postman-code-generators#postman-code-generators-) to create code snippets f

Downloads

3

Readme

Postman Gen

Just a small command line tool that's takes advantage of the Postman SDK and postman-code-gen to create code snippets from Postman Collections (Exported from Postman).

For some reason this feature is missing in the actual client so I thought I would quickly make a tool that does what I want.

Usage

Help

> node main.js --help
Usage: generate [options]

Options:
  -V, --version                  output the version number
  -c, --collection <path>        Path to the Postman 2.1 Collection JSON
  -l,--language_variant <tuple>  Language,Variant pair to output (default: "cURL,cURL")
  -e,--envvars <path>            Path to environment variables exported from Postman. NOTE: Environment variables will not override variables provided in collection
  -d, --debug                    Output additional debugging info
  -h, --help                     output usage information

Generate cURL code

  • Export your Collection from Postman as JSON in the 2.1 format e.g. example_collection.json
  • To generate cURL snippets:
node main.js -c example_collection.json
# Output:
# curl --location --request GET 'https://v7rr12wbr7.execute-api.us-west-2.amazonaws.com/prod/courses?c0=PHYS153&c1=APSC160&c2=CHEM154&c3=MATH100&c4=APSC150&c5=MATH101&c6=MATH152&c7=PHYS170&c8=ENGL112&c9=MATH253&c10=MECH226&c11=MATH255&c12=MECH220&c13=MECH221&c14=MECH224&c15=MECH222&c16=MECH223&c17=MECH225&c18=MECH375&c19=MECH368&c20=MECH360&c21=MECH328&c22=MECH326&c23=MECH325&c24=CIVL200&c25=EOSC114&c26=PHIL120&c27=MECH380&c28=MECH358&c29=MECH305&c30=LING101&c31=MATH307&version_key=1.2'
# curl --location --request GET 'https://v7rr12wbr7.execute-api.us-west-2.amazonaws.com/prod/courses?c0=PHYS153'

Generate other languages

node main.js -c example_collection.json -d -l shell,httpie
node main.js -c example_collection.json -d -l Swift,URLSession

For a full list see: https://github.com/postmanlabs/postman-code-generators#postman-code-generators-

Import Environment Variables

You can also substitute variables from exported Evironment Variables from Postman (Note: That variables in the Collection JSON will take precedence)
node main.js -c example_collection.json --envvars environment.json