@cloudflare/pages-shared

中文文档
0.13.210发布于 2026/11/09构建来源已验证近 30 天下载 5030

This is a package that is used internally to power Wrangler and Cloudflare Pages. It contains all the code that is shared between these clients (and possibly any other in the future e.g. the dashboard).

原始使用文档

@cloudflare/pages-shared

This is a package that is used internally to power Wrangler and Cloudflare Pages. It contains all the code that is shared between these clients (and possibly any other in the future e.g. the dashboard).

Code should be written so that it can be run in almost any environment (e.g. Deno, Node, browser, Workers), but note that there's currently a bit of weirdness here for asset-server, hence the environment-polyfills piece.

[!NOTE] Since code in this package is used by the Pages infrastructure, it is important that PRs are given careful review with regards to how they could cause a failure in production. Ideally, there should be comprehensive tests for changes being made to give extra confidence about the behavior.

版本与发布记录

@cloudflare/pages-shared 共发布 324 个版本,首次发布于 2022/09/01;过去 12 个月发布了 127 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.13.210latest2026/11/09今天
0.13.2092026/11/054 天前
0.13.2082026/11/036 天前
0.13.2072026/11/027 天前
0.13.2062026/11/028 天前
0.13.2052026/10/3011 天前

关于 @cloudflare/pages-shared 的常见问题

@cloudflare/pages-shared 是什么?

This is a package that is used internally to power Wrangler and Cloudflare Pages. It contains all the code that is shared between these clients (and possibly any other in the future e.g. the dashboard).

如何安装 @cloudflare/pages-shared?

在项目目录运行 npm install @cloudflare/pages-shared,或使用 pnpm add / yarn add / bun add。

@cloudflare/pages-shared 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cloudflare__pages-shared 是否存在。

@cloudflare/pages-shared 可以商用吗?

@cloudflare/pages-shared 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@cloudflare/pages-shared 的下载量有多少?

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

@cloudflare/pages-shared 还在维护吗?

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