b2c-ecdn by salesforcecommercecloud/b2c-developer-tooling
npx skills add https://github.com/salesforcecommercecloud/b2c-developer-tooling --skill b2c-ecdn使用 b2c CLI 插件来管理 eCDN(嵌入式内容分发网络)区域、证书、安全设置等。
提示: 如果
b2c没有全局安装,请使用npx @salesforce/b2c-cli代替(例如npx @salesforce/b2c-cli ecdn zones list)。
sfcc.cdn-zones 范围的 OAuth 凭据(读取操作)sfcc.cdn-zones.rw 范围的 OAuth 凭据(写入操作)# 列出租户的所有 CDN 区域
b2c ecdn zones list --tenant-id zzxy_prd
# 以 JSON 格式输出列表
b2c ecdn zones list --tenant-id zzxy_prd --json
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 创建新的店面区域
b2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com
# 清除特定路径的缓存
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --path /products --path /categories
# 按缓存标签清除
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --tag product-123 --tag category-456
# 清除所有内容
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --purge-everything
# 列出区域的证书
b2c ecdn certificates list --tenant-id zzxy_prd --zone my-zone
# 添加新证书
b2c ecdn certificates add --tenant-id zzxy_prd --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
# 获取证书详情
b2c ecdn certificates get --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
# 验证自定义主机名
b2c ecdn certificates validate --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
# 获取安全设置
b2c ecdn security get --tenant-id zzxy_prd --zone my-zone
# 更新安全设置
b2c ecdn security update --tenant-id zzxy_prd --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https
# 获取速度优化设置
b2c ecdn speed get --tenant-id zzxy_prd --zone my-zone
# 更新速度设置
b2c ecdn speed update --tenant-id zzxy_prd --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css
关于较少使用的 eCDN 功能,请参阅参考文件:
租户 ID 可以通过环境变量设置:
SFCC_TENANT_ID:B2C Commerce 租户 ID--zone 标志接受以下任一参数:
| 操作 | 所需范围 |
|---|---|
| 读取操作 | sfcc.cdn-zones |
| 写入操作 | sfcc.cdn-zones.rw |
有关 ecdn 主题中可用命令和选项的完整列表,请参阅 b2c ecdn --help。
每周安装数
73
代码仓库
GitHub 星标数
34
首次出现
2026年2月11日
安全审计
安装于
github-copilot69
codex66
opencode65
cursor65
amp64
kimi-cli64
Use the b2c CLI plugin to manage eCDN (embedded Content Delivery Network) zones, certificates, security settings, and more.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli ecdn zones list).
sfcc.cdn-zones scope (read operations)sfcc.cdn-zones.rw scope (write operations)# list all CDN zones for a tenant
b2c ecdn zones list --tenant-id zzxy_prd
# list with JSON output
b2c ecdn zones list --tenant-id zzxy_prd --json
# create a new storefront zone
b2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com
# purge cache for specific paths
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --path /products --path /categories
# purge by cache tags
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --tag product-123 --tag category-456
# purge everything
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --purge-everything
# list certificates for a zone
b2c ecdn certificates list --tenant-id zzxy_prd --zone my-zone
# add a new certificate
b2c ecdn certificates add --tenant-id zzxy_prd --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
# get certificate details
b2c ecdn certificates get --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
# validate a custom hostname
b2c ecdn certificates validate --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
# get security settings
b2c ecdn security get --tenant-id zzxy_prd --zone my-zone
# update security settings
b2c ecdn security update --tenant-id zzxy_prd --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https
# get speed optimization settings
b2c ecdn speed get --tenant-id zzxy_prd --zone my-zone
# update speed settings
b2c ecdn speed update --tenant-id zzxy_prd --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css
For less commonly used eCDN features, see the reference files:
The tenant ID can be set via environment variable:
SFCC_TENANT_ID: B2C Commerce tenant IDThe --zone flag accepts either:
| Operation | Required Scope |
|---|---|
| Read operations | sfcc.cdn-zones |
| Write operations | sfcc.cdn-zones.rw |
See b2c ecdn --help for a full list of available commands and options in the ecdn topic.
Weekly Installs
73
Repository
GitHub Stars
34
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
github-copilot69
codex66
opencode65
cursor65
amp64
kimi-cli64
Supabase Postgres 最佳实践指南 - 8大类别性能优化规则与SQL示例
78,800 周安装