{"_id":"@caleblawson/deployer-cloudflare","name":"@caleblawson/deployer-cloudflare","dist-tags":{"latest":"0.10.7-alpha.0"},"versions":{"0.10.7-alpha.0":{"name":"@caleblawson/deployer-cloudflare","version":"0.10.7-alpha.0","description":"A Cloudflare Workers deployer for Mastra applications.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./secrets-manager":{"import":{"types":"./dist/secrets-manager/index.d.ts","default":"./dist/secrets-manager/index.js"},"require":{"types":"./dist/secrets-manager/index.d.cts","default":"./dist/secrets-manager/index.cjs"}},"./package.json":"./package.json"},"keywords":[],"author":"","license":"Elastic-2.0","dependencies":{"@babel/core":"^7.27.4","@rollup/plugin-virtual":"^3.0.2","cloudflare":"^4.3.0","rollup":"^4.43.0","zod":"^3.25.57","@mastra/deployer":"npm:@caleblawson/deployer@^0.10.7-alpha.0"},"devDependencies":{"@microsoft/api-extractor":"^7.52.8","@types/node":"^20.19.0","eslint":"^9.28.0","tsup":"^8.5.0","typescript":"^5.8.3","vitest":"^3.2.3","@internal/lint":"0.0.13","@mastra/core":"npm:@caleblawson/core@0.10.7-alpha.0"},"peerDependencies":{"@mastra/core":"^0.10.1-alpha.0"},"scripts":{"build":"tsup src/index.ts src/secrets-manager/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting","build:watch":"pnpm build --watch","test":"vitest run","lint":"eslint ."},"gitHead":"c31e90130a5c9765c23f688ecea70adc6164543d","_id":"@caleblawson/deployer-cloudflare@0.10.7-alpha.0","_integrity":"sha512-VgWKwa9auTB+gecbsezfQBB9MpOMXrCbrxpEBnc4GeHRq3df7PACtlGp3rNDGto8lRLsYK14lnciP0ssxTebLw==","_resolved":"C:\\Users\\caleb\\AppData\\Local\\Temp\\807183ac208340ca891075bc0ca3ee57\\caleblawson-deployer-cloudflare-0.10.7-alpha.0.tgz","_from":"file:caleblawson-deployer-cloudflare-0.10.7-alpha.0.tgz","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-VgWKwa9auTB+gecbsezfQBB9MpOMXrCbrxpEBnc4GeHRq3df7PACtlGp3rNDGto8lRLsYK14lnciP0ssxTebLw==","shasum":"a5b0d90d1dbca9cb9d745fc758b55b1bce0003f2","tarball":"https://registry.npmjs.org/@caleblawson/deployer-cloudflare/-/deployer-cloudflare-0.10.7-alpha.0.tgz","fileCount":13,"unpackedSize":29399,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDMcNvo5BJ1Eer/NT3qDSeoUxQgfWFQNYvpABJ8rd7GQAiEAnCpTAVPGKIWyVXbxumFu69ldQXAg++acjf4LV11RigI="}]},"_npmUser":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","actor":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","type":"user"}},"directories":{},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/deployer-cloudflare_0.10.7-alpha.0_1750378182487_0.018037078200358714"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-20T00:09:42.390Z","0.10.7-alpha.0":"2025-06-20T00:09:42.662Z","modified":"2025-06-20T00:09:42.929Z"},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"description":"A Cloudflare Workers deployer for Mastra applications.","keywords":[],"license":"Elastic-2.0","readme":"# @mastra/deployer-cloudflare\r\n\r\nA Cloudflare Workers deployer for Mastra applications.\r\n\r\n## Features\r\n\r\n- Deploy Mastra applications to Cloudflare Workers\r\n- Configure custom domains and routes\r\n- Support for worker namespaces\r\n- Automatic environment variable configuration\r\n\r\n## Installation\r\n\r\n```bash\r\npnpm add @mastra/deployer-cloudflare\r\n```\r\n\r\n## Usage\r\n\r\nThe Cloudflare deployer is used as part of the Mastra framework:\r\n\r\n```typescript\r\nimport { Mastra } from '@mastra/core';\r\nimport { CloudflareDeployer } from '@mastra/deployer-cloudflare';\r\n\r\nconst deployer = new CloudflareDeployer({\r\n  scope: 'your-account-id',\r\n  projectName: 'your-project-name',\r\n  routes: [\r\n    {\r\n      pattern: 'example.com/*',\r\n      zone_name: 'example.com',\r\n      custom_domain: true,\r\n    },\r\n  ],\r\n  workerNamespace: 'your-namespace',\r\n  auth: {\r\n    apiToken: 'your-api-token',\r\n    apiEmail: 'your-email',\r\n  },\r\n});\r\n\r\nconst mastra = new Mastra({\r\n  deployer,\r\n  // ... other Mastra configuration options\r\n});\r\n```\r\n\r\n## Configuration\r\n\r\n### Constructor Options\r\n\r\n- `scope` (required): Your Cloudflare account ID\r\n- `projectName`: Name of your worker project\r\n- `routes`: Array of route configurations for your worker\r\n  - `pattern`: URL pattern to match\r\n  - `zone_name`: Domain zone name\r\n  - `custom_domain`: Whether to use a custom domain\r\n- `workerNamespace`: Namespace for your worker\r\n- `auth`: Cloudflare authentication details\r\n  - `apiToken`: Your Cloudflare API token\r\n  - `apiEmail`: Your Cloudflare account email\r\n\r\n## Environment Variables\r\n\r\nThe deployer will automatically load environment variables from:\r\n\r\n- `.env` files in your project\r\n- Environment variables passed through the Mastra configuration\r\n\r\n## Routes\r\n\r\nRoutes can be configured to direct traffic to your worker based on URL patterns and domains:\r\n\r\n```typescript\r\nconst routes = [\r\n  {\r\n    pattern: 'api.example.com/*',\r\n    zone_name: 'example.com',\r\n    custom_domain: true,\r\n  },\r\n  {\r\n    pattern: 'example.com/api/*',\r\n    zone_name: 'example.com',\r\n  },\r\n];\r\n```\r\n\r\nEach route requires:\r\n\r\n- `pattern`: URL pattern to match\r\n- `zone_name`: Domain zone name\r\n- `custom_domain`: (optional) Set to true to use a custom domain\r\n\r\n## Requirements\r\n\r\n- Cloudflare account with Workers enabled\r\n- API token with appropriate permissions\r\n- Domain(s) configured in Cloudflare (for custom domains)\r\n","readmeFilename":"README.md","_rev":"1-eeb14dbd3838a4405cce12f3772ba3ee"}