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

nest-canddy

v0.2.14

Published

A NestJS auxiliary tool that allows you to view the code module structure through a web UI and quickly generate frontend TypeScript SDK code.

Downloads

85

Readme

English Document

nest-canddy

nest-canddy 是一个无侵入代码的CLI工具,它可以快速生成前端可用的TypeScript SDK代码,用于发起http请求。同时,它还提供一个可视化的web ui界面,用于简单的展示项目模块结构。

功能

  • 快速生成前端用于发起RESTful请求的TypeScript SDK代码
  • 提供Web UI可视化界面

安装

你可以通过npm或yarn安装nest-canddy

yarn add -g nest-canddy
//or
npm install -g nest-canddy

作为服务端

如果你当前的角色是使用nestjs框架的服务器开发人员:

  1. 在nestjs的项目根目录下新增nestcanddy.config.js
module.exports = {
    server:{
		port: 13270,//作为提供SDK拉取服务的端口号
		outputPath:'./output',//生成SDK的保存目录
	},
}

2.接下来,你可以生成前端Typescript SDK代码。

nests generate
//or
nests g

nest-canddy-demo-3 3.你也可以使用Web UI来查看和生成生成前端Typescript SDK代码。

nests server
//or
nests s

nest-canddy-demo-3

作为客户端

如果你当前的角色是使用Typescript开发任何项目的前端开发人员:

  1. 在nestjs的项目根目录下新增nestcanddy.config.cjs
module.exports = {
	client:{
		host: 'localhost:13270',//后端提供的SDK服务地址
		outputPath:'./output',//SDK输出到当前项目的相对路径
		httpAdapterPath:'axios',//发起http请求的适配器引用路径
		httpAdapterName:'axios',//发起http请求的适配器引用名称
		responseWrapperType:'{AxiosResponse}',//返回类型包裹类型
		responseWrapperTypePath:'axios',//返回类型包裹类型路径
	}
}

2.接下来,你可以拉取前端Typescript SDK代码。

nestc get
//or
nestc g

nest-canddy-demo-3