跳到主要内容
非官方简体中文翻译,内容版权归 Mastra 所有,遵循 Apache-2.0 许可。

Deployment

The OpenAPI spec endpoint has moved to /api/openapi.json, and the CloudflareDeployer configuration has been updated to use standard wrangler.json property names.

Changed
Changed的直接链接

OpenAPI spec endpoint moved to /api/openapi.json
openapi-spec-endpoint-moved-to-apiopenapijson的直接链接

The OpenAPI specification endpoint has moved from /openapi.json to /api/openapi.json to align with the /api prefix used by all built-in Mastra routes.

If you have scripts or tools that consume the OpenAPI spec, update the URL:

- GET /openapi.json
+ GET /api/openapi.json

CloudflareDeployer uses standard wrangler.json property names
cloudflaredeployer-uses-standard-wranglerjson-property-names的直接链接

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',
},
],
});

The workerNamespace field has been removed as it's no longer used.

For all available configuration options, see the Wrangler configuration documentation.