Nestia is a comprehensive CLI tool designed to enhance NestJS development by providing a suite of features including super-fast decorators, advanced WebSocket routes, and robust code generation capabilities. It currently stands at version 11.0.2 and receives active development, with frequent releases addressing features, bug fixes, and minor breaking changes. A key differentiator is its deep integration with `typia` for runtime validation and JSON serialization, which claims significantly higher performance (e.g., 20,000x faster than `class-validator` for validation, 200x faster than `class-transformer` for serialization). Nestia also generates a fully typed SDK for clients, complete with a mockup simulator and E2E test functions, akin to `tRPC` but with a focus on code generation rather than direct RPC, and offers advanced Swagger document generation features including AI chatbot integration. Its modular design includes sub-packages like `@nestia/core`, `@nestia/sdk`, and `@nestia/e2e` for specific functionalities.
npm install nestiaVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic initialization of a Nestia project and generation of its SDK and Swagger documentation using the `main` function and `ECommand` enum.
Review Nestia's documentation on Typia integration and update any custom validation setups or configurations (`nestia.config.ts`) accordingly. Look for changes related to `INestiaTransformOptions.typia`.
Regenerate your client SDKs and update any code that interacts with the generated symbols, replacing `$` with `_` as per the new escaping mechanism. Example: `Api$Users` becomes `Api_Users`.
Consult the Nestia documentation on 'AI Chatbot Development' and 'universal LLM schema' for v10 to understand the new configuration and schema generation process. Update `nestia.config.ts` if necessary.
Store custom logic outside of generated files. For instance, extend generated classes/interfaces or import generated types into manually maintained files. Use `.nestia` folder for outputs, and ensure it's in `.gitignore`.
Follow Nestia's official setup guides, especially regarding `typia` integration, to ensure the performance optimizations are correctly applied. Profile your application to confirm the expected performance improvements.
Ensure `nestia` is installed correctly via `npm install -D nestia` or `yarn add -D nestia`. Verify the command exists in your `package.json` scripts or is called directly via `npx nestia <command>`.
Create `nestia.config.ts` in your project root. You can generate a basic one with `npx nestia init --project tsconfig.json`.
Ensure `typia` is installed (`npm install typia`) and that your `nestia.config.ts` correctly configures Typia. Verify your `tsconfig.json` includes the necessary settings for transformer plugins if applicable.
Install `@nestia/core` as a dependency: `npm install @nestia/core` or `yarn add @nestia/core`. Ensure your `tsconfig.json` includes `node_modules/@nestia/core` in its `include` or `types` paths, though this is usually handled automatically.