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

gen-sdk-api

v0.4.0

Published

To scaffold the SDKs in your react / tsx app using `gen-sdk-api`, run any of the following four commands and answer the command prompt questions:

Downloads

10

Readme

gen-sdk-api

To scaffold the SDKs in your react / tsx app using gen-sdk-api, run any of the following four commands and answer the command prompt questions:

npm

npm gen-sdk-api@latest

yarn

yarn gen-sdk-api

pnpm

pnpm gen-sdk-api@latest

bun

bun gen-sdk-api@latest

Output

The script logs a message to the console when the OpenAPI document has been processed and saved.

Please note that this is a basic outline and you may need to add more details depending on the complexity of your project and the level of detail you want to provide in your documentation.

Determining workspace structure

Deciding which workspace information to collect

Gathering workspace info

Sure, here's a continuation of the README.md based on the information from index.ts:

Usage

The gen-sdk-api CLI tool is used to generate SDKs for your React/TypeScript application based on a Swagger/OpenAPI document. Here's a step-by-step guide on how it works:

  1. Selecting the lib / framework: The CLI prompts you to select the configuration you'd like to use. You can choose between React and Angular. This selection determines the lib / framework that will be connected to the kubb config.
? What lib / framework you are currently using? (Use arrow keys)
❯ React
  Angular
  1. Selecting the Configuration: The CLI prompts you to select the configuration you'd like to use. You can choose Tanstack-query. This selection determines the packages that will be installed and the files and folders that will be imported.
? What kubb config would you like to use? (Use arrow keys)
❯ Tanstack-query
  1. Installing Dependencies: If you haven't set the noInstall flag, the CLI will prompt you to confirm whether it should run the installation command for you. This step installs the necessary dependencies for the selected configuration.
? Should we run 'npm install' for you? (Y/n)
  1. Providing the Swagger File Path: You're then asked to provide the path to your Swagger file. This file will be used to generate the SDKs.
? Indicate the path to the swagger file (./api.yaml)
  1. Processing the Swagger File: The CLI runs a schema validation for the provided Swagger file. It logs a message to the console when the OpenAPI document has been processed and saved.

  2. Generating the SDKs: Finally, the CLI runs the kubbGenCommand to generate the code based on the provided Swagger file and the selected configuration.

If everything is successful, the process exits with code 0. If an error occurs during any of these steps, it's logged to the console and the process exits with code 1.

Contributing

Please see the CONTRIBUTING.md for details on how to contribute to this project.

License

This project is licensed under the terms of the license provided in LICENSE.md.