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

oas-typegen

v0.2.1

Published

Generate TS/JS/DTS type definitions from OpenAPI document (V2).

Downloads

7

Readme

oas-typegen CircleCI npm mit

Generate JSDoc/TS/DTS type definitions from OpenAPI document(V2).

Installation

npm install oas-typegen -g

Usage

typegen -i http://petstore.swagger.io/v2/swagger.json

Options

Generate TS/JS/DTS type definitions from OpenAPI document (V2).

Usage

$ typegen --input <input> --output <output>

Options:

  --input, -i    (required) Path to OpenAPI document in local file system or
                 url on lines.
  --output, -o   The output path and file for generated assets.
  --dir, -d      The output directory for generated assets. Use current dire-
                 tory by default.

  --name, -n     Specifies the name of your swagger document.
  --config, -c   Use this config file(if argument is used but value is unspe-
                 cified, defaults to typegen.json).
  --format, -f   Type of output assets (cjs, es).Use "es" by default.
  --language, -l Choice one output language in js ts and dts
                 > js: (default) create a .js file and comment with JSDoc
                 > ts: create a .ts file and declare types as interfaces
                 > dts: create a .js file and declare types in a .d.ts
  --plugin, -p   Load the plugin from local node_modules.

  --intro        Content to insert at top of generated type file.
  --outro        Content to insert at bottom of generated type file.

  --serial, -e   Force build multi-documents one by one.
  --silent, -s   Prevent output from being displayed in stdout.
  --version, -v  Print current version number.
  --help, -h     Print this message.

Examples:

$ typegen --input ./swagger.json --output gateway.js --language js
$ typegen --input http://petstore.swagger.io/v2/swagger.json --output petsto-
                  re.js

License

© differui