@mastra/deployer-vercel 0.0.1-alpha.35 → 0.0.1-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -250
- package/dist/deployer-vercel.cjs.development.js +588 -0
- package/dist/deployer-vercel.cjs.development.js.map +1 -0
- package/dist/deployer-vercel.cjs.production.min.js +2 -0
- package/dist/deployer-vercel.cjs.production.min.js.map +1 -0
- package/dist/deployer-vercel.esm.js +565 -0
- package/dist/deployer-vercel.esm.js.map +1 -0
- package/dist/index.d.ts +21 -17
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -150
- package/package.json +19 -13
- package/src/index.ts +63 -75
- package/tsconfig.json +6 -1
- package/vitest.config.ts +1 -1
- package/README.md +0 -95
package/dist/index.js
CHANGED
|
@@ -1,152 +1,8 @@
|
|
|
1
|
-
import { Deployer } from '@mastra/deployer';
|
|
2
|
-
import { getBundler } from '@mastra/deployer/build';
|
|
3
|
-
import virtual from '@rollup/plugin-virtual';
|
|
4
|
-
import * as child_process from 'child_process';
|
|
5
|
-
import { writeFileSync, readFileSync } from 'fs';
|
|
6
|
-
import { join } from 'path';
|
|
7
|
-
import process from 'process';
|
|
8
1
|
|
|
9
|
-
|
|
10
|
-
var VercelDeployer = class extends Deployer {
|
|
11
|
-
teamId;
|
|
12
|
-
projectName;
|
|
13
|
-
token;
|
|
14
|
-
constructor({ teamId, projectName, token }) {
|
|
15
|
-
super({ name: "VERCEL" });
|
|
16
|
-
this.teamId = teamId;
|
|
17
|
-
this.projectName = projectName;
|
|
18
|
-
this.token = token;
|
|
19
|
-
}
|
|
20
|
-
writeFiles(outputDirectory) {
|
|
21
|
-
writeFileSync(
|
|
22
|
-
join(outputDirectory, "vercel.json"),
|
|
23
|
-
JSON.stringify(
|
|
24
|
-
{
|
|
25
|
-
version: 2,
|
|
26
|
-
installCommand: "npm install --omit=dev",
|
|
27
|
-
builds: [
|
|
28
|
-
{
|
|
29
|
-
src: "index.mjs",
|
|
30
|
-
use: "@vercel/node",
|
|
31
|
-
config: { includeFiles: ["**"] }
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
routes: [
|
|
35
|
-
{
|
|
36
|
-
src: "/(.*)",
|
|
37
|
-
dest: "index.mjs"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
null,
|
|
42
|
-
2
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
getProjectId({ dir }) {
|
|
47
|
-
const projectJsonPath = join(dir, ".vercel", "project.json");
|
|
48
|
-
try {
|
|
49
|
-
const projectJson = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
|
|
50
|
-
return projectJson.projectId;
|
|
51
|
-
} catch (error) {
|
|
52
|
-
throw new Error("Could not find project ID. Make sure the project has been deployed first.");
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
async syncEnv(envVars) {
|
|
56
|
-
console.log("Syncing environment variables...");
|
|
57
|
-
const vercelEnvVars = Array.from(envVars.entries()).map(([key, value]) => {
|
|
58
|
-
if (!key || !value) {
|
|
59
|
-
throw new Error(`Invalid environment variable format: ${key || value}`);
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
key,
|
|
63
|
-
value,
|
|
64
|
-
target: ["production", "preview", "development"],
|
|
65
|
-
type: "plain"
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
try {
|
|
69
|
-
const projectId = this.getProjectId({ dir: process.cwd() });
|
|
70
|
-
const response = await fetch(
|
|
71
|
-
`https://api.vercel.com/v10/projects/${projectId}/env?teamId=${this.teamId}&upsert=true`,
|
|
72
|
-
{
|
|
73
|
-
method: "POST",
|
|
74
|
-
headers: {
|
|
75
|
-
Authorization: `Bearer ${this.token}`,
|
|
76
|
-
"Content-Type": "application/json"
|
|
77
|
-
},
|
|
78
|
-
body: JSON.stringify(vercelEnvVars)
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
if (!response.ok) {
|
|
82
|
-
const error = await response.json();
|
|
83
|
-
throw new Error(`Failed to sync environment variables: ${error.message}`);
|
|
84
|
-
}
|
|
85
|
-
console.log("\u2713 Successfully synced environment variables");
|
|
86
|
-
} catch (error) {
|
|
87
|
-
if (error instanceof Error) {
|
|
88
|
-
console.error("Failed to sync environment variables:", error.message);
|
|
89
|
-
} else {
|
|
90
|
-
console.error("Failed to sync environment variables:", error);
|
|
91
|
-
}
|
|
92
|
-
throw error;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
async prepare(outputDirectory) {
|
|
96
|
-
await super.prepare(outputDirectory);
|
|
97
|
-
await this.writeFiles(outputDirectory);
|
|
98
|
-
}
|
|
99
|
-
getEntry() {
|
|
100
|
-
return `
|
|
101
|
-
import { handle } from 'hono/vercel'
|
|
102
|
-
import { mastra } from '#mastra';
|
|
103
|
-
import { createHonoServer } from '#server';
|
|
2
|
+
'use strict'
|
|
104
3
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
async bundle(mastraDir, outputDirectory) {
|
|
112
|
-
const bundler = await getBundler({
|
|
113
|
-
input: "#entry",
|
|
114
|
-
plugins: [virtual({ "#entry": this.getEntry() })]
|
|
115
|
-
});
|
|
116
|
-
await bundler.write({
|
|
117
|
-
inlineDynamicImports: true,
|
|
118
|
-
file: `${outputDirectory}/index.mjs`,
|
|
119
|
-
format: "es"
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
async deploy(outputDirectory) {
|
|
123
|
-
const envVars = await this.loadEnvVars();
|
|
124
|
-
const commandArgs = [
|
|
125
|
-
"--scope",
|
|
126
|
-
this.teamId,
|
|
127
|
-
"--cwd",
|
|
128
|
-
outputDirectory,
|
|
129
|
-
"--token",
|
|
130
|
-
this.token,
|
|
131
|
-
"deploy",
|
|
132
|
-
"--yes",
|
|
133
|
-
...this.projectName ? ["--name", this.projectName] : []
|
|
134
|
-
];
|
|
135
|
-
child_process.execSync(`npx vercel ${commandArgs.join(" ")}`, {
|
|
136
|
-
cwd: outputDirectory,
|
|
137
|
-
env: {
|
|
138
|
-
// ...this.env,
|
|
139
|
-
PATH: process.env.PATH
|
|
140
|
-
},
|
|
141
|
-
stdio: "inherit"
|
|
142
|
-
});
|
|
143
|
-
this.logger.info("Deployment started on Vercel. You can wait for it to finish or exit this command.");
|
|
144
|
-
if (envVars.size > 0) {
|
|
145
|
-
await this.syncEnv(envVars);
|
|
146
|
-
} else {
|
|
147
|
-
this.logger.info("\nAdd your ENV vars to .env or your vercel dashboard.\n");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export { VercelDeployer };
|
|
4
|
+
if (process.env.NODE_ENV === 'production') {
|
|
5
|
+
module.exports = require('./deployer-vercel.cjs.production.min.js')
|
|
6
|
+
} else {
|
|
7
|
+
module.exports = require('./deployer-vercel.cjs.development.js')
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer-vercel",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/deployer-vercel.esm.js",
|
|
7
8
|
"types": "dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
|
-
"
|
|
11
|
-
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/deployer-vercel.esm.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
12
19
|
},
|
|
13
20
|
"./package.json": "./package.json"
|
|
14
21
|
},
|
|
@@ -16,24 +23,23 @@
|
|
|
16
23
|
"author": "",
|
|
17
24
|
"license": "ISC",
|
|
18
25
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
21
|
-
"@mastra/core": "0.2.0-alpha.84",
|
|
22
|
-
"@mastra/deployer": "0.0.1-alpha.30"
|
|
26
|
+
"@mastra/core": "0.1.27-alpha.66",
|
|
27
|
+
"@mastra/deployer": "0.0.1-alpha.2"
|
|
23
28
|
},
|
|
24
29
|
"devDependencies": {
|
|
25
30
|
"@babel/preset-env": "^7.26.0",
|
|
26
31
|
"@babel/preset-typescript": "^7.26.0",
|
|
27
32
|
"@tsconfig/recommended": "^1.0.7",
|
|
33
|
+
"@types/jsdom": "^21.1.7",
|
|
28
34
|
"@types/node": "^22.9.0",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
35
|
+
"@types/pg": "^8.11.10",
|
|
36
|
+
"dts-cli": "^2.0.5",
|
|
37
|
+
"vitest": "^2.1.8",
|
|
38
|
+
"vercel": "^39.3.0"
|
|
33
39
|
},
|
|
34
40
|
"scripts": {
|
|
35
|
-
"build": "
|
|
36
|
-
"dev": "
|
|
41
|
+
"build": "dts build",
|
|
42
|
+
"build:dev": "dts watch",
|
|
37
43
|
"test": "vitest run"
|
|
38
44
|
}
|
|
39
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getBundler } from '@mastra/deployer/build';
|
|
3
|
-
import virtual from '@rollup/plugin-virtual';
|
|
1
|
+
import { MastraDeployer } from '@mastra/core';
|
|
4
2
|
import * as child_process from 'child_process';
|
|
5
3
|
import { readFileSync, writeFileSync } from 'fs';
|
|
6
4
|
import { join } from 'path';
|
|
7
|
-
import process from 'process';
|
|
8
5
|
|
|
9
6
|
interface EnvVar {
|
|
10
7
|
key: string;
|
|
@@ -18,22 +15,15 @@ interface VercelError {
|
|
|
18
15
|
code: string;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
|
-
export class VercelDeployer extends
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
private token: string;
|
|
25
|
-
|
|
26
|
-
constructor({ teamId, projectName, token }: { teamId: string; projectName: string; token: string }) {
|
|
27
|
-
super({ name: 'VERCEL' });
|
|
28
|
-
|
|
29
|
-
this.teamId = teamId;
|
|
30
|
-
this.projectName = projectName;
|
|
31
|
-
this.token = token;
|
|
18
|
+
export class VercelDeployer extends MastraDeployer {
|
|
19
|
+
constructor({ scope, env, projectName }: { env?: Record<string, any>; scope: string; projectName: string }) {
|
|
20
|
+
super({ scope, env, projectName });
|
|
32
21
|
}
|
|
22
|
+
writeFiles({ dir }: { dir: string }): void {
|
|
23
|
+
this.writeIndex({ dir });
|
|
33
24
|
|
|
34
|
-
writeFiles(outputDirectory: string): void {
|
|
35
25
|
writeFileSync(
|
|
36
|
-
join(
|
|
26
|
+
join(dir, 'vercel.json'),
|
|
37
27
|
JSON.stringify(
|
|
38
28
|
{
|
|
39
29
|
version: 2,
|
|
@@ -68,15 +58,23 @@ export class VercelDeployer extends Deployer {
|
|
|
68
58
|
}
|
|
69
59
|
}
|
|
70
60
|
|
|
71
|
-
|
|
61
|
+
async syncEnv({ scope, dir, token }: { token: string; dir: string; scope: string }) {
|
|
62
|
+
const envFiles = this.getEnvFiles();
|
|
63
|
+
const envVars: string[] = [];
|
|
64
|
+
|
|
65
|
+
for (const file of envFiles) {
|
|
66
|
+
const vars = this.parseEnvFile(file);
|
|
67
|
+
envVars.push(...vars);
|
|
68
|
+
}
|
|
69
|
+
|
|
72
70
|
console.log('Syncing environment variables...');
|
|
73
71
|
|
|
74
72
|
// Transform env vars into the format expected by Vercel API
|
|
75
|
-
const vercelEnvVars: EnvVar[] =
|
|
73
|
+
const vercelEnvVars: EnvVar[] = envVars.map(envVar => {
|
|
74
|
+
const [key, value] = envVar.split('=');
|
|
76
75
|
if (!key || !value) {
|
|
77
|
-
throw new Error(`Invalid environment variable format: ${
|
|
76
|
+
throw new Error(`Invalid environment variable format: ${envVar}`);
|
|
78
77
|
}
|
|
79
|
-
|
|
80
78
|
return {
|
|
81
79
|
key,
|
|
82
80
|
value,
|
|
@@ -86,19 +84,16 @@ export class VercelDeployer extends Deployer {
|
|
|
86
84
|
});
|
|
87
85
|
|
|
88
86
|
try {
|
|
89
|
-
const projectId = this.getProjectId({ dir
|
|
87
|
+
const projectId = this.getProjectId({ dir });
|
|
90
88
|
|
|
91
|
-
const response = await fetch(
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Authorization: `Bearer ${this.token}`,
|
|
97
|
-
'Content-Type': 'application/json',
|
|
98
|
-
},
|
|
99
|
-
body: JSON.stringify(vercelEnvVars),
|
|
89
|
+
const response = await fetch(`https://api.vercel.com/v10/projects/${projectId}/env?teamId=${scope}&upsert=true`, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
headers: {
|
|
92
|
+
Authorization: `Bearer ${token}`,
|
|
93
|
+
'Content-Type': 'application/json',
|
|
100
94
|
},
|
|
101
|
-
|
|
95
|
+
body: JSON.stringify(vercelEnvVars),
|
|
96
|
+
});
|
|
102
97
|
|
|
103
98
|
if (!response.ok) {
|
|
104
99
|
const error = (await response.json()) as VercelError;
|
|
@@ -116,70 +111,63 @@ export class VercelDeployer extends Deployer {
|
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
113
|
|
|
119
|
-
async
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
private getEntry(): string {
|
|
125
|
-
return `
|
|
126
|
-
import { handle } from 'hono/vercel'
|
|
127
|
-
import { mastra } from '#mastra';
|
|
128
|
-
import { createHonoServer } from '#server';
|
|
129
|
-
|
|
130
|
-
const app = await createHonoServer(mastra);
|
|
131
|
-
|
|
132
|
-
export const GET = handle(app);
|
|
133
|
-
export const POST = handle(app);
|
|
134
|
-
`;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
async bundle(mastraDir: string, outputDirectory: string): Promise<void> {
|
|
138
|
-
const bundler = await getBundler({
|
|
139
|
-
input: '#entry',
|
|
140
|
-
plugins: [virtual({ '#entry': this.getEntry() })],
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
await bundler.write({
|
|
144
|
-
inlineDynamicImports: true,
|
|
145
|
-
file: `${outputDirectory}/index.mjs`,
|
|
146
|
-
format: 'es',
|
|
147
|
-
});
|
|
148
|
-
}
|
|
114
|
+
async deploy({ dir, token }: { dir: string; token: string }): Promise<void> {
|
|
115
|
+
// Get env vars for initial deployment
|
|
116
|
+
const envFiles = this.getEnvFiles();
|
|
117
|
+
const envVars: string[] = [];
|
|
149
118
|
|
|
150
|
-
|
|
151
|
-
|
|
119
|
+
for (const file of envFiles) {
|
|
120
|
+
const vars = this.parseEnvFile(file);
|
|
121
|
+
envVars.push(...vars);
|
|
122
|
+
}
|
|
152
123
|
|
|
153
124
|
// Create the command array with base arguments
|
|
154
125
|
const commandArgs = [
|
|
155
126
|
'--scope',
|
|
156
|
-
this.
|
|
127
|
+
this.scope as string,
|
|
157
128
|
'--cwd',
|
|
158
|
-
|
|
159
|
-
'--token',
|
|
160
|
-
this.token,
|
|
129
|
+
dir,
|
|
161
130
|
'deploy',
|
|
131
|
+
'--token',
|
|
132
|
+
token,
|
|
162
133
|
'--yes',
|
|
163
134
|
...(this.projectName ? ['--name', this.projectName] : []),
|
|
164
135
|
];
|
|
165
136
|
|
|
137
|
+
// Add env vars to initial deployment
|
|
138
|
+
for (const envVar of envVars) {
|
|
139
|
+
commandArgs.push('--env', envVar);
|
|
140
|
+
}
|
|
141
|
+
|
|
166
142
|
// Run the Vercel deploy command
|
|
167
|
-
child_process.execSync(`
|
|
168
|
-
cwd:
|
|
143
|
+
child_process.execSync(`vercel ${commandArgs.join(' ')}`, {
|
|
144
|
+
cwd: dir,
|
|
169
145
|
env: {
|
|
170
|
-
|
|
146
|
+
...this.env,
|
|
171
147
|
PATH: process.env.PATH,
|
|
172
148
|
},
|
|
173
149
|
stdio: 'inherit',
|
|
174
150
|
});
|
|
175
151
|
|
|
176
|
-
|
|
152
|
+
console.log('Deployment started on Vercel. You can wait for it to finish or exit this command.');
|
|
177
153
|
|
|
178
|
-
if (envVars.
|
|
154
|
+
if (envVars.length > 0) {
|
|
179
155
|
// Sync environment variables for future deployments
|
|
180
|
-
await this.syncEnv(
|
|
156
|
+
await this.syncEnv({ scope: this.scope, dir, token });
|
|
181
157
|
} else {
|
|
182
|
-
|
|
158
|
+
console.log('\nAdd your ENV vars to .env or your vercel dashboard.\n');
|
|
183
159
|
}
|
|
184
160
|
}
|
|
161
|
+
|
|
162
|
+
writeIndex({ dir }: { dir: string }): void {
|
|
163
|
+
writeFileSync(
|
|
164
|
+
join(dir, 'index.mjs'),
|
|
165
|
+
`
|
|
166
|
+
import { handle } from 'hono/vercel'
|
|
167
|
+
import { app } from './hono.mjs';
|
|
168
|
+
export const GET = handle(app);
|
|
169
|
+
export const POST = handle(app);
|
|
170
|
+
`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
185
173
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../tsconfig.
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"moduleResolution": "bundler",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"rootDir": "./src"
|
|
7
|
+
},
|
|
3
8
|
"include": ["src/**/*"],
|
|
4
9
|
"exclude": ["node_modules", "**/*.test.ts"]
|
|
5
10
|
}
|
package/vitest.config.ts
CHANGED
package/README.md
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# @mastra/deployer-vercel
|
|
2
|
-
|
|
3
|
-
A Vercel deployer for Mastra applications.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- Deploy Mastra applications to Vercel
|
|
8
|
-
- Zero-configuration serverless deployments
|
|
9
|
-
- Automatic environment variable synchronization
|
|
10
|
-
- Support for production, preview, and development environments
|
|
11
|
-
- Instant global deployments with Edge Functions
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm add @mastra/deployer-vercel
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
The Vercel deployer is used as part of the Mastra framework:
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
import { Mastra } from '@mastra/core';
|
|
25
|
-
import { VercelDeployer } from '@mastra/deployer-vercel';
|
|
26
|
-
|
|
27
|
-
const deployer = new VercelDeployer({
|
|
28
|
-
scope: 'your-team-id',
|
|
29
|
-
projectName: 'your-project-name',
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const mastra = new Mastra({
|
|
33
|
-
deployer,
|
|
34
|
-
// ... other Mastra configuration options
|
|
35
|
-
});
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Configuration
|
|
39
|
-
|
|
40
|
-
### Constructor Options
|
|
41
|
-
|
|
42
|
-
- `scope` (required): Your Vercel team ID or username
|
|
43
|
-
- `projectName`: Name of your Vercel project (will be created if it doesn't exist)
|
|
44
|
-
|
|
45
|
-
## Project Structure
|
|
46
|
-
|
|
47
|
-
The deployer creates:
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
your-project/
|
|
51
|
-
├── vercel.json # Deployment configuration
|
|
52
|
-
└── index.mjs # Application entry point
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### vercel.json Configuration
|
|
56
|
-
|
|
57
|
-
Default configuration:
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"version": 2,
|
|
62
|
-
"installCommand": "npm install --omit=dev",
|
|
63
|
-
"builds": [
|
|
64
|
-
{
|
|
65
|
-
"src": "index.mjs",
|
|
66
|
-
"use": "@vercel/node",
|
|
67
|
-
"config": {
|
|
68
|
-
"includeFiles": ["**"]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"routes": [
|
|
73
|
-
{
|
|
74
|
-
"src": "/(.*)",
|
|
75
|
-
"dest": "index.mjs"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Environment Variables
|
|
82
|
-
|
|
83
|
-
Environment variables are handled automatically through:
|
|
84
|
-
|
|
85
|
-
- `.env` files in your project
|
|
86
|
-
- Environment variables passed through the Mastra configuration
|
|
87
|
-
- Vercel's environment variable UI
|
|
88
|
-
|
|
89
|
-
## Deployment Process
|
|
90
|
-
|
|
91
|
-
The deployer:
|
|
92
|
-
|
|
93
|
-
1. Configures your project with the necessary files
|
|
94
|
-
2. Deploys to Vercel using the CLI
|
|
95
|
-
3. Synchronizes environment variables for future deployments
|