This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/factory@0.29.0-alpha.5 ## mastra@1.40.0-alpha.4 ## @mastra/core@1.84.0-alpha.4 ## @mastra/playground-ui@69.1.0-alpha.4 ## @mastra/libsql@1.31.0-alpha.2 ## @mastra/pg@1.37.0-alpha.2 ## @mastra/client-js@1.60.1-alpha.4 ## @mastra/react@1.15.1-alpha.4 ## @mastra/deployer-cloud@1.84.0-alpha.4 ## @mastra/longmemeval@1.1.43-alpha.4 ## @mastra/opencode@0.1.43-alpha.4 ## create-factory@0.4.4-alpha.4 ## @mastra/code-sdk@1.19.1-alpha.5 ## mastracode@0.50.1-alpha.5 ## @mastra/deployer@1.84.0-alpha.4 ## @mastra/mcp-apps-components@0.1.1-alpha.1 ## @mastra/mcp-docs-server@1.3.14-alpha.4 ## @mastra/server@1.84.0-alpha.4 ## @mastra/redis-streams@0.9.0-alpha.2 ## @mastra/elysia@0.1.24-alpha.4 ## @mastra/express@1.5.28-alpha.4 ## @mastra/fastify@1.5.28-alpha.4 ## @mastra/hono@1.7.26-alpha.4 ## @mastra/koa@1.7.28-alpha.4 ## @mastra/nestjs@0.3.1-alpha.4 ## @mastra/next@0.2.42-alpha.4 ## @mastra/tanstack-start@0.2.42-alpha.4 ## @mastra/convex@1.9.1-alpha.2 ## @mastra/turso@0.1.22-alpha.2 ## @mastra/inngest@1.11.3-alpha.0 ## @mastra/temporal@0.6.1-alpha.4 ## @mastra/platform-workspace@1.13.1-alpha.0 ## create-mastra@1.40.0-alpha.4 ## @internal/playground@1.40.0-alpha.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| package.json | ||
| README.md | ||
| TEST_DOCUMENTATION.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| turbo.json | ||
| vitest.config.ts | ||
@mastra/deployer-cloud
A cloud-optimized deployer for Mastra applications with built-in logging, storage, instrumentation, and server entry-point generation.
Installation
npm install @mastra/deployer-cloud
Usage
The cloud deployer is used as part of the Mastra build process:
import { CloudDeployer } from '@mastra/deployer-cloud';
const deployer = new CloudDeployer({ studio: false });
await deployer.bundle('./src/mastra', './.mastra/output');
Documentation
CloudDeployer creates the server bundle used by Mastra Cloud. It discovers the Mastra entry file and tools, generates a production server entry point, keeps npm dependencies external, writes the deployment package manifest, and installs the resulting dependencies into the output directory.
The generated server combines the application's logger with a cloud PinoLogger, sends logs to BUSINESS_API_RUNNER_LOGS_ENDPOINT when configured, and emits structured readiness events containing the deployment team, project, and build identifiers. When MASTRA_STORAGE_URL and MASTRA_STORAGE_AUTH_TOKEN are present, it initializes Mastra Cloud LibSQL storage; otherwise it initializes the storage configured by the application.
Studio is excluded by default. Pass new CloudDeployer({ studio: true }) to copy and serve the Studio assets with the deployed server. The generated server disables Swagger UI, exposes discovered tools, registers internal trace-scoring support when storage is available, and applies the cloud authentication entry point.
Common runtime variables include:
MASTRA_STORAGE_URLandMASTRA_STORAGE_AUTH_TOKENfor managed storage.BUSINESS_API_RUNNER_LOGS_ENDPOINTandBUSINESS_JWT_TOKENfor cloud log transport.RUNNER_START_TIME,TEAM_ID,PROJECT_ID, andBUILD_IDfor readiness and deployment metadata.CI=trueto disable the remote log transport during CI builds.
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.