@evumi/berth-config 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  > **不要放机密。** Config 对组织成员可读。密码、密钥放到服务变量里。
6
6
 
7
+ 此 SDK 用于服务端(包括服务端组件、API 路由和 edge Worker)。`BERTH_CONFIG_TOKEN` 是服务端凭据,同时用于环境的 KV 和队列等接口,不能下发到浏览器。前端需要配置或 KV 数据时,由应用后端校验权限并仅返回所需字段。不要把 Token 复制到 `NEXT_PUBLIC_*`、`VITE_*`、打包器环境变量映射或客户端 props;不要在客户端组件里使用此 SDK。
8
+
7
9
  ## 用法
8
10
 
9
11
  Berth 会给容器注入 `BERTH_CONFIG_URL` 和 `BERTH_CONFIG_TOKEN`,直接用默认导出:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evumi/berth-config",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Client for Berth project Config: cached reads with background long-poll refresh.",
5
5
  "license": "MIT",
6
6
  "repository": {