🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@caleblawson/deployer-vercel

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@caleblawson/deployer-vercel

A Vercel deployer for Mastra applications.

latest
npmnpm
Version
0.10.7-alpha.0
Version published
Maintainers
1
Created
Source

@mastra/deployer-vercel

A Vercel deployer for Mastra applications.

Features

  • Deploy Mastra applications to Vercel
  • Zero-configuration serverless deployments
  • Automatic environment variable synchronization
  • Support for production, preview, and development environments
  • Instant global deployments with Edge Functions

Installation

pnpm add @mastra/deployer-vercel

Usage

The Vercel deployer is used as part of the Mastra framework:

import { Mastra } from '@mastra/core';
import { VercelDeployer } from '@mastra/deployer-vercel';

const deployer = new VercelDeployer({
  teamSlug: 'your-team-slug',
  projectName: 'your-project-name',
  token: 'your-vercel-token',
});

const mastra = new Mastra({
  deployer,
  // ... other Mastra configuration options
});

Configuration

Constructor Options

  • teamSlug (required): Your Vercel team slug
  • projectName: Name of your Vercel project (will be created if it doesn't exist)
  • token: Your Vercel API token (required for authentication)

Project Structure

The deployer creates:

your-project/
├── vercel.json     # Deployment configuration
└── index.mjs       # Application entry point

vercel.json Configuration

Default configuration:

{
  "version": 2,
  "installCommand": "npm install --omit=dev",
  "builds": [
    {
      "src": "index.mjs",
      "use": "@vercel/node",
      "config": {
        "includeFiles": ["**"]
      }
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "index.mjs"
    }
  ]
}

Environment Variables

Environment variables are handled automatically through:

  • .env files in your project
  • Environment variables passed through the Mastra configuration
  • Vercel's environment variable UI

Deployment Process

The deployer:

  • Configures your project with the necessary files
  • Deploys to Vercel using the CLI
  • Synchronizes environment variables for future deployments

FAQs

Package last updated on 20 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts