New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nest-sdk

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nest-sdk

### Install Dependency ```sh npm i nest-sdk ```

1.0.3
latest
npm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Nest SDK

A Nest CLI Plugin to Generate SDK's

Install Dependency

  npm i nest-sdk

Getting Started

Add plugin to plugins option in the Nest CLI Config
  {
    "$schema": "https://json.schemastore.org/nest-cli",
    "collection": "@nestjs/schematics",
    "sourceRoot": "src",
    "compilerOptions": {
      "plugins": [ "nest-sdk" ]
    }
  }

Custom Options

OptionTypeDefaultDescription
appModulePathstring./src/app.module.jsRelative path to the compiled app module, i.e. - the module passed to NestFactory.create
appModuleClassNamestringAppModuleName of the class exported from app module being used by NestFactory.create
generatorstringtypescriptName of the generator to use. Possible options can be found here
openApiGeneratorBinPathstringnode_modules/.bin/openapi-generator-cliPath to the openapi-generator-cli binary
outputPathstring./sdkPath to generate the SDK
portnumber9525Very unlikely this needs to change, it is used in the background for generation, but nonetheless it is configurable in case of another process living on the port
silentbooleanfalseIf enabled the plugin will not log when the SDK is being generated in start/watch mode
generationDebounceTicksnumber500Measured in ticks, this is the minimum required time to pass between SDK generations
An example with modifying the options
  {
    "$schema": "https://json.schemastore.org/nest-cli",
    "collection": "@nestjs/schematics",
    "sourceRoot": "src",
    "compilerOptions": {
      "plugins": [
        {
          "name": "nest-sdk",
          "options": {
            "appModulePath": "./dist/server.module.js",
            "appModuleClassName": "ServerModule",
            "generator": "typescript-axios",
            "openApiGeneratorBinPath": "/usr/local/bin/openapi-generator-cli",
            "outputPath": "dist/sdk",
            "port": 8082,
            "silent": true,
            "generationDebounceTicks": 1000
          }
        }
      ]
    }
  }

Minimum Required Version

NodeJS >=20

NodeJS ES feature support docs: https://node.green/

FAQs

Package last updated on 11 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts