部署
🌐 Deployment
CloudflareDeployer 配置已更新为使用标准的 wrangler.json 属性名称。
🌐 The CloudflareDeployer configuration has been updated to use standard wrangler.json property names.
已更改Direct link to 已更改
🌐 Changed
CloudflareDeployer 使用标准的 wrangler.json 属性名称Direct link to CloudflareDeployer 使用标准的 wrangler.json 属性名称
🌐 CloudflareDeployer uses standard wrangler.json property names
CloudflareDeployer 构造函数现在接受标准的 wrangler.json 属性名称,而不是自定义的驼峰式变体。此更改使部署工具与 Cloudflare 的官方配置格式保持一致,并能够访问所有 wrangler 配置选项。
🌐 The CloudflareDeployer constructor now accepts standard wrangler.json property names instead of custom camelCase variants. This change aligns the deployer with Cloudflare's official configuration format and provides access to all wrangler configuration options.
已弃用的字段会在运行时自动迁移,并显示控制台警告,但你应该更新代码以使用新的字段名称。
🌐 Deprecated fields are automatically migrated at runtime with console warnings, but you should update your code to use the new field names.
const deployer = new CloudflareDeployer({
- projectName: 'my-worker',
+ name: 'my-worker',
- d1Databases: [
+ d1_databases: [
{
binding: 'DB',
database_name: 'my-db',
database_id: 'xxx',
},
],
- kvNamespaces: [
+ kv_namespaces: [
{
binding: 'KV',
id: 'yyy',
},
],
});
workerNamespace 字段已被移除,因为它不再使用。
🌐 The workerNamespace field has been removed as it is no longer used.
有关所有可用的配置选项,请参阅Wrangler 配置文档。
🌐 For all available configuration options, see the Wrangler configuration documentation.