# @bueno-systems/next-actuator 中文文档

规范地址：https://npmcn.com/package/%40bueno-systems/next-actuator/

版本：1\.0\.7
npm 元数据更新时间：2025-11-18T00:38:40.669Z
中文译文更新时间：2026-11-09T18:45:40.529Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40bueno-systems/next-actuator
原文对照：https://npmcn.com/package/%40bueno-systems/next-actuator/?lang=original
项目主页：https://github.com/bueno-systems/next-actuator#readme
源码仓库：https://github.com/bueno-systems/next-actuator

弃用说明：Package no longer supported\. Contact Support at https://www\.npmjs\.com/support for more info\.

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：11.7 kB，9 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=16\.0\.0
- 运行依赖：0 个
- peer 依赖：next \>=12\.0\.0
- 首次发布：2022-02-06T23:34:23.095Z
- 最新版本发布：2022-05-10T00:18:44.826Z
- 近 30 天下载量：1867（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：7（近 12 个月 0 个）

## 中文简介

请提供Next.js的路径,用于监测和管理您在生产中的应用.

## 安装

```sh
npm install @bueno-systems/next-actuator
```

也可以使用：`pnpm add @bueno-systems/next-actuator`、`yarn add @bueno-systems/next-actuator`、`bun add @bueno-systems/next-actuator`

## README

# ưμ㼯a

[![Npm package version](https://img.shields.io/npm/v/@bueno-systems/next-actuator)](https://www.npmjs.com/package/@bueno-systems/next-actuator) [![Release workflow](https://img.shields.io/github/workflow/status/bueno-systems/next-actuator/Build/main)](https://github.com/bueno-systems/next-actuator/actions/workflows/release.yml)

请提供Next.js的路径,用于监测和管理您在生产中的应用.

灵感来自 [rcruzper / 快动器](https://github.com/rcruzper/express-actuator) 但适合Next.js的应用程序.

## 终点

| 身份证 | 说明 |
| --- | --- |
| 资讯 | 显示应用程序信息. |
| 计量 | 显示当前应用程序的计量信息. |
| 卫生 | 显示应用健康信息. |

## 安装

```shell
npm install --save @bueno-systems/next-actuator
# or
yarn add @bueno-systems/next-actuator
```

包含类型Script

## 使用量

创建文件于 `./pages/api/actuator/[...actuator].ts` (或类似)和 返回一个呼叫 `nextActuator()`。有命名或默认的出口.

```ts
// ./pages/api/actuator/[...actuator].ts
import { nextActuator } from '@bueno-systems/next-actuator'

// Export the handler function with some options
export default nextActuator()
```

## 配置

```ts
nextActuator({
  enableHealth: true, // enable/disable /health endpoint (default true)
  enableMetrics: true, // enable/disable /metrics endpoint (default true)
  enableInfo: true, // enable/disable /info endpoint (default true)
  healthEndpoint: '/health', // change the /health endpoint to something else
  metricsEndpoint: '/metrics', // change the /metrics endpoint to something else
  infoEndpoint: '/info' // change the /info endpoint to something else
})
```

## 结束点示例

`GET http://localhost:3000/api/actuator/health`

```json
{
  "status": "UP"
}
```

`GET http://localhost:3000/api/actuator/info`

```json
{
  "build": {
    "name": "My Cool Project",
    "description": "Description from package.json",
    "version": "1.2.3"
  }
}
```

`GET http://localhost:3000/api/actuator/metrics`

```json
{
  "mem": {
    "rss": 550682624,
    "heapTotal": 244232192,
    "heapUsed": 213942064,
    "external": 191258086,
    "arrayBuffers": 188265357
  },
  "uptime": 2642.679833583
}
```

## 常见问题

### @bueno-systems/next-actuator 是什么？

请提供Next\.js的路径,用于监测和管理您在生产中的应用\.注意：该包已被作者标记为弃用——Package no longer supported\. Contact Support at https://www\.npmjs\.com/support for more info\.

### 如何安装 @bueno-systems/next-actuator？

在项目目录运行 npm install @bueno-systems/next-actuator，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：next（\>=12\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @bueno-systems/next-actuator 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @bueno-systems/next-actuator 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @bueno-systems/next-actuator 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=16\.0\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @bueno-systems/next-actuator 可以商用吗？

@bueno-systems/next-actuator 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @bueno-systems/next-actuator 的下载量有多少？

根据 npm 官方下载统计，@bueno-systems/next-actuator 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,867 次，日均约 62 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @bueno-systems/next-actuator 还在维护吗？

最新版本 1\.0\.7 发布于 2022/05/10（4 年前）；至今共发布 7 个版本，其中过去 12 个月发布了 0 个；首次发布于 2022/02/07。作者已将其标记为弃用，新项目建议寻找替代方案。

