@entur-partner/bff

中文文档
2.0.0发布于 2026/11/05EUPL-1.2TypeScriptESM + CJS近 30 天下载 3273

This package contains helpers for the backend-for-frontend (BFF) servers of micro-frontends.

原始使用文档

Entur partner backend for frontend

This package contains helpers for the backend-for-frontend (BFF) servers of micro-frontends.

Installation

npm install @entur-partner/bff

# or if you are using Yarn:
yarn add @entur-partner/bff

Proxy defaults

forwardingProxy and proxyConfig use these defaults:

  • The request body can be at most 1 MB. Set the environment variable UPLOAD_LIMIT_MB to allow larger bodies, for example UPLOAD_LIMIT_MB=20. Larger requests get the response 413 Payload Too Large.
  • The Cookie header is not sent to the API. If an API needs a cookie, add it in your proxyReqOptDecorator. Your decorator runs after the cookie is removed.

版本与发布记录

@entur-partner/bff 共发布 22 个版本,首次发布于 2022/07/05;过去 12 个月发布了 13 个版本。

版本发布日期距今
2.0.0latest2026/11/058 天前
1.3.12026/10/2816 天前
1.3.02026/05/056 个月前
1.3.0-alpha.22026/04/156 个月前
1.3.0-alpha.12026/04/146 个月前
1.3.0-alpha.02026/04/107 个月前

关于 @entur-partner/bff 的常见问题

@entur-partner/bff 是什么?

This package contains helpers for the backend-for-frontend (BFF) servers of micro-frontends.

如何安装 @entur-partner/bff?

在项目目录运行 npm install @entur-partner/bff,或使用 pnpm add / yarn add / bun add。

@entur-partner/bff 支持 TypeScript 吗?

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

@entur-partner/bff 支持 ESM 还是 CommonJS?

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

@entur-partner/bff 可以商用吗?

@entur-partner/bff 使用 EUPL-1.2 许可。声明的许可为 EUPL-1.2,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@entur-partner/bff 的下载量有多少?

根据 npm 官方下载统计,@entur-partner/bff 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,273 次,日均约 109 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@entur-partner/bff 还在维护吗?

最新版本 2.0.0 发布于 2026/11/05(8 天前);至今共发布 22 个版本,其中过去 12 个月发布了 13 个;首次发布于 2022/07/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。