# @nest-boot/common

> Shared decorators and dynamic controller utilities for Nest Boot applications

Latest version **8.0.0** (published 2026-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nest-boot/common
pnpm add @nest-boot/common
yarn add @nest-boot/common
bun add @nest-boot/common
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.0.0 |
| Published | 2026-11-27 |
| First published | 2022-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.21.0 |
| Dependencies | 0 |
| Unpacked size | 35.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Xudong Huang |
| Maintainers | xudong |

## Links

- npm: https://www.npmjs.com/package/@nest-boot/common
- Repository: https://github.com/nest-boot/nest-boot
- Homepage: https://github.com/nest-boot/nest-boot#readme
- Issues: https://github.com/nest-boot/nest-boot/issues
- npm.io page: https://npm.io/package/@nest-boot/common

## Recent versions

- 8.0.0 (latest) — 2026-11-27
- 7.0.0-beta.0 (beta) — 2025-06-07
- 6.10.2 — 2024-12-25
- 6.10.1 — 2024-07-16
- 6.10.0 — 2024-02-20
- 6.0.0-beta.3 — 2024-02-19
- 6.0.0-beta.2 — 2024-01-26
- 4.0.0-beta.2 — 2022-12-16
- 4.0.0-beta.1 — 2022-12-14
- 3.2.1 — 2022-11-18
- 3.2.0 — 2022-10-21
- 3.1.0 — 2022-10-19
- 3.0.1 — 2022-07-19
- 3.0.0 — 2022-07-19
- 2.1.5 — 2022-05-18
- … 23 more at https://npm.io/package/@nest-boot/common/versions

## README

# @nest-boot/common

Shared NestJS decorators, metadata constants, and dynamic controller helpers used across Nest Boot packages.

## `@Public()`

```ts
import { IS_PUBLIC_KEY, Public } from "@nest-boot/common";
```

Apply `@Public()` to a controller or route handler to mark it as publicly accessible (`IS_PUBLIC_KEY` metadata set to `true`), or `@Public(false)` to override a class-level marker on a specific handler.

## Dynamic Controllers

Use `withDynamicController` (or the lower-level `createDynamicController`) when a module configures a controller's `enabled` state, `path`, or class `decorators` (including `@Public()`, `@UseGuards()`, `@UseInterceptors()`, `@UsePipes()`, and `@UseFilters()`) dynamically via synchronous or asynchronous module options. When binding Nest middleware to a dynamic controller, inject `provider.provide` to obtain the container-local controller class for `MiddlewareConsumer.forRoutes()`:

```ts
import { withDynamicController } from "@nest-boot/common";

return withDynamicController(super.forRootAsync(options), WebhookController, {
  inject: [MODULE_OPTIONS_TOKEN],
  useFactory: (moduleOptions: WebhookModuleOptions) => ({
    path: moduleOptions.path,
    decorators: moduleOptions.decorators,
  }),
});
```

---
_Source: https://npm.io/package/@nest-boot/common · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
