@mastra/deployer-vercel 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251104230439

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/dist/index.js CHANGED
@@ -1,209 +1,99 @@
1
- import * as child_process from 'child_process';
2
- import { readFileSync, writeFileSync, readdirSync } from 'fs';
1
+ import { writeFileSync } from 'fs';
3
2
  import { join } from 'path';
4
3
  import process from 'process';
5
4
  import { Deployer } from '@mastra/deployer';
5
+ import { move } from 'fs-extra/esm';
6
6
 
7
7
  // src/index.ts
8
8
  var VercelDeployer = class extends Deployer {
9
- teamSlug;
10
- projectName;
11
- token;
12
- constructor({ teamSlug, projectName, token }) {
9
+ vcConfigOverrides = {};
10
+ constructor(options = {}) {
13
11
  super({ name: "VERCEL" });
14
- this.teamSlug = teamSlug;
15
- this.projectName = projectName;
16
- this.token = token;
17
- }
18
- getProjectId({ dir }) {
19
- const projectJsonPath = join(dir, "output", ".vercel", "project.json");
20
- try {
21
- const projectJson = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
22
- return projectJson.projectId;
23
- } catch {
24
- throw new Error("Could not find project ID. Make sure the project has been deployed first.");
25
- }
26
- }
27
- async getTeamId() {
28
- const response = await fetch(`https://api.vercel.com/v2/teams`, {
29
- headers: {
30
- Authorization: `Bearer ${this.token}`
31
- }
32
- });
33
- const res = await response.json();
34
- const teams = res.teams;
35
- return teams.find((team) => team.slug === this.teamSlug)?.id;
36
- }
37
- async syncEnv(envVars, { outputDirectory }) {
38
- console.log("Syncing environment variables...");
39
- const vercelEnvVars = Array.from(envVars.entries()).map(([key, value]) => {
40
- if (!key || !value) {
41
- throw new Error(`Invalid environment variable format: ${key || value}`);
42
- }
43
- return {
44
- key,
45
- value,
46
- target: ["production", "preview", "development"],
47
- type: "plain"
48
- };
49
- });
50
- try {
51
- const projectId = this.getProjectId({ dir: outputDirectory });
52
- const teamId = await this.getTeamId();
53
- const response = await fetch(
54
- `https://api.vercel.com/v10/projects/${projectId}/env?teamId=${teamId}&upsert=true`,
55
- {
56
- method: "POST",
57
- headers: {
58
- Authorization: `Bearer ${this.token}`,
59
- "Content-Type": "application/json"
60
- },
61
- body: JSON.stringify(vercelEnvVars)
62
- }
63
- );
64
- if (!response.ok) {
65
- const error = await response.json();
66
- throw new Error(`Failed to sync environment variables: ${error.message}`);
67
- }
68
- console.log("\u2713 Successfully synced environment variables");
69
- } catch (error) {
70
- if (error instanceof Error) {
71
- console.error("Failed to sync environment variables:", error.message);
72
- } else {
73
- console.error("Failed to sync environment variables:", error);
74
- }
75
- throw error;
76
- }
12
+ this.outputDir = join(".vercel", "output", "functions", "index.func");
13
+ this.vcConfigOverrides = { ...options };
77
14
  }
78
15
  async prepare(outputDirectory) {
79
16
  await super.prepare(outputDirectory);
17
+ this.writeVercelJSON(join(outputDirectory, this.outputDir, "..", ".."));
80
18
  }
81
19
  getEntry() {
82
20
  return `
83
21
  import { handle } from 'hono/vercel'
84
22
  import { mastra } from '#mastra';
85
- import { createHonoServer } from '#server';
86
- import { evaluate } from '@mastra/core/eval';
87
- import { AvailableHooks, registerHook } from '@mastra/core/hooks';
88
- import { TABLE_EVALS } from '@mastra/core/storage';
89
- import { checkEvalStorageFields } from '@mastra/core/utils';
90
-
91
- registerHook(AvailableHooks.ON_GENERATION, ({ input, output, metric, runId, agentName, instructions }) => {
92
- evaluate({
93
- agentName,
94
- input,
95
- metric,
96
- output,
97
- runId,
98
- globalRunId: runId,
99
- instructions,
100
- });
101
- });
23
+ import { createHonoServer, getToolExports } from '#server';
24
+ import { tools } from '#tools';
25
+ import { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';
102
26
 
103
27
  if (mastra.getStorage()) {
104
- // start storage init in the background
105
- mastra.getStorage().init();
28
+ mastra.__registerInternalWorkflow(scoreTracesWorkflow);
106
29
  }
107
30
 
108
- registerHook(AvailableHooks.ON_EVALUATION, async traceObject => {
109
- const storage = mastra.getStorage();
110
- if (storage) {
111
- // Check for required fields
112
- const logger = mastra?.getLogger();
113
- const areFieldsValid = checkEvalStorageFields(traceObject, logger);
114
- if (!areFieldsValid) return;
115
-
116
- await storage.insert({
117
- tableName: TABLE_EVALS,
118
- record: {
119
- input: traceObject.input,
120
- output: traceObject.output,
121
- result: JSON.stringify(traceObject.result || {}),
122
- agent_name: traceObject.agentName,
123
- metric_name: traceObject.metricName,
124
- instructions: traceObject.instructions,
125
- test_info: null,
126
- global_run_id: traceObject.globalRunId,
127
- run_id: traceObject.runId,
128
- created_at: new Date().toISOString(),
129
- },
130
- });
131
- }
132
- });
133
-
134
- const app = await createHonoServer(mastra);
31
+ const app = await createHonoServer(mastra, { tools: getToolExports(tools) });
135
32
 
136
33
  export const GET = handle(app);
137
34
  export const POST = handle(app);
35
+ export const PUT = handle(app);
36
+ export const DELETE = handle(app);
37
+ export const PATCH = handle(app);
38
+ export const OPTIONS = handle(app);
39
+ export const HEAD = handle(app);
138
40
  `;
139
41
  }
140
- writeVercelJSON(outputDirectory, files = ["./*"]) {
42
+ writeVercelJSON(outputDirectory) {
141
43
  writeFileSync(
142
- join(outputDirectory, this.outputDir, "vercel.json"),
143
- JSON.stringify(
144
- {
145
- version: 2,
146
- installCommand: "npm install --omit=dev",
147
- builds: [
148
- {
149
- src: "index.mjs",
150
- use: "@vercel/node",
151
- config: { includeFiles: files }
152
- }
153
- ],
154
- routes: [
155
- {
156
- src: "/(.*)",
157
- dest: "index.mjs"
158
- }
159
- ]
160
- },
161
- null,
162
- 2
163
- )
44
+ join(outputDirectory, "config.json"),
45
+ JSON.stringify({
46
+ version: 3,
47
+ routes: [
48
+ {
49
+ src: "/(.*)",
50
+ dest: "/"
51
+ }
52
+ ]
53
+ })
164
54
  );
165
55
  }
166
- async bundle(entryFile, outputDirectory, toolsPaths) {
167
- const result = await this._bundle(this.getEntry(), entryFile, outputDirectory, toolsPaths);
168
- const files = readdirSync(join(outputDirectory, this.outputDir), {
169
- recursive: true
170
- });
171
- const filesWithoutNodeModules = files.filter(
172
- (file) => typeof file === "string" && !file.startsWith("node_modules")
56
+ async bundle(entryFile, outputDirectory, { toolsPaths, projectRoot }) {
57
+ const result = await this._bundle(
58
+ this.getEntry(),
59
+ entryFile,
60
+ { outputDirectory, projectRoot },
61
+ toolsPaths,
62
+ join(outputDirectory, this.outputDir)
173
63
  );
174
- this.writeVercelJSON(outputDirectory, filesWithoutNodeModules);
64
+ const nodeVersion = process.version?.split(".")?.[0]?.replace("v", "") ?? "22";
65
+ const vcConfig = {
66
+ handler: "index.mjs",
67
+ launcherType: "Nodejs",
68
+ runtime: `nodejs${nodeVersion}.x`,
69
+ shouldAddHelpers: true
70
+ };
71
+ const { maxDuration, memory, regions } = this.vcConfigOverrides;
72
+ if (typeof maxDuration === "number") vcConfig.maxDuration = maxDuration;
73
+ if (typeof memory === "number") vcConfig.memory = memory;
74
+ if (Array.isArray(regions) && regions.length > 0) vcConfig.regions = regions;
75
+ writeFileSync(join(outputDirectory, this.outputDir, ".vc-config.json"), JSON.stringify(vcConfig, null, 2));
76
+ await move(join(outputDirectory, ".vercel", "output"), join(process.cwd(), ".vercel", "output"), {
77
+ overwrite: true
78
+ });
175
79
  return result;
176
80
  }
177
- async deploy(outputDirectory) {
178
- const envVars = await this.loadEnvVars();
179
- const commandArgs = [
180
- "--scope",
181
- this.teamSlug,
182
- "--cwd",
183
- join(outputDirectory, this.outputDir),
184
- "--token",
185
- this.token,
186
- "deploy",
187
- "--yes",
188
- ...this.projectName ? ["--name", this.projectName] : []
189
- ];
190
- child_process.execSync(`npx vercel ${commandArgs.join(" ")}`, {
191
- cwd: join(outputDirectory, this.outputDir),
192
- env: {
193
- PATH: process.env.PATH
194
- },
195
- stdio: "inherit"
196
- });
197
- this.logger.info("Deployment started on Vercel. You can wait for it to finish or exit this command.");
198
- if (envVars.size > 0) {
199
- await this.syncEnv(envVars, { outputDirectory });
200
- } else {
201
- this.logger.info("\nAdd your ENV vars to .env or your vercel dashboard.\n");
202
- }
81
+ async deploy() {
82
+ this.logger?.info("Deploying to Vercel is deprecated. Please use the Vercel dashboard to deploy.");
203
83
  }
204
84
  async lint(entryFile, outputDirectory, toolsPaths) {
205
85
  await super.lint(entryFile, outputDirectory, toolsPaths);
86
+ const hasLibsql = await this.deps.checkDependencies(["@mastra/libsql"]) === `ok`;
87
+ if (hasLibsql) {
88
+ this.logger.error(
89
+ `Vercel Deployer does not support @libsql/client(which may have been installed by @mastra/libsql) as a dependency.
90
+ Use other Mastra Storage options instead e.g @mastra/pg`
91
+ );
92
+ process.exit(1);
93
+ }
206
94
  }
207
95
  };
208
96
 
209
97
  export { VercelDeployer };
98
+ //# sourceMappingURL=index.js.map
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"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","file":"index.js","sourcesContent":["import { writeFileSync } from 'fs';\nimport { join } from 'path';\nimport process from 'process';\nimport { Deployer } from '@mastra/deployer';\nimport { move } from 'fs-extra/esm';\nimport type { VcConfig, VcConfigOverrides, VercelDeployerOptions } from './types';\n\nexport class VercelDeployer extends Deployer {\n private vcConfigOverrides: VcConfigOverrides = {};\n\n constructor(options: VercelDeployerOptions = {}) {\n super({ name: 'VERCEL' });\n this.outputDir = join('.vercel', 'output', 'functions', 'index.func');\n\n // Store all overrides centrally\n this.vcConfigOverrides = { ...options };\n }\n\n async prepare(outputDirectory: string): Promise<void> {\n await super.prepare(outputDirectory);\n\n this.writeVercelJSON(join(outputDirectory, this.outputDir, '..', '..'));\n }\n\n private getEntry(): string {\n return `\nimport { handle } from 'hono/vercel'\nimport { mastra } from '#mastra';\nimport { createHonoServer, getToolExports } from '#server';\nimport { tools } from '#tools';\nimport { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';\n\nif (mastra.getStorage()) {\n mastra.__registerInternalWorkflow(scoreTracesWorkflow);\n}\n\nconst app = await createHonoServer(mastra, { tools: getToolExports(tools) });\n\nexport const GET = handle(app);\nexport const POST = handle(app);\nexport const PUT = handle(app);\nexport const DELETE = handle(app);\nexport const PATCH = handle(app);\nexport const OPTIONS = handle(app);\nexport const HEAD = handle(app);\n`;\n }\n\n private writeVercelJSON(outputDirectory: string) {\n writeFileSync(\n join(outputDirectory, 'config.json'),\n JSON.stringify({\n version: 3,\n routes: [\n {\n src: '/(.*)',\n dest: '/',\n },\n ],\n }),\n );\n }\n\n async bundle(\n entryFile: string,\n outputDirectory: string,\n { toolsPaths, projectRoot }: { toolsPaths: (string | string[])[]; projectRoot: string },\n ): Promise<void> {\n const result = await this._bundle(\n this.getEntry(),\n entryFile,\n { outputDirectory, projectRoot },\n toolsPaths,\n join(outputDirectory, this.outputDir),\n );\n\n const nodeVersion = process.version?.split('.')?.[0]?.replace('v', '') ?? '22';\n\n const vcConfig: VcConfig = {\n handler: 'index.mjs',\n launcherType: 'Nodejs',\n runtime: `nodejs${nodeVersion}.x`,\n shouldAddHelpers: true,\n };\n\n // Merge supported overrides\n const { maxDuration, memory, regions } = this.vcConfigOverrides;\n if (typeof maxDuration === 'number') vcConfig.maxDuration = maxDuration;\n if (typeof memory === 'number') vcConfig.memory = memory;\n if (Array.isArray(regions) && regions.length > 0) vcConfig.regions = regions;\n\n writeFileSync(join(outputDirectory, this.outputDir, '.vc-config.json'), JSON.stringify(vcConfig, null, 2));\n\n await move(join(outputDirectory, '.vercel', 'output'), join(process.cwd(), '.vercel', 'output'), {\n overwrite: true,\n });\n\n return result;\n }\n\n async deploy(): Promise<void> {\n this.logger?.info('Deploying to Vercel is deprecated. Please use the Vercel dashboard to deploy.');\n }\n\n async lint(entryFile: string, outputDirectory: string, toolsPaths: (string | string[])[]): Promise<void> {\n await super.lint(entryFile, outputDirectory, toolsPaths);\n\n const hasLibsql = (await this.deps.checkDependencies(['@mastra/libsql'])) === `ok`;\n\n if (hasLibsql) {\n this.logger.error(\n `Vercel Deployer does not support @libsql/client(which may have been installed by @mastra/libsql) as a dependency. \n\t\t\t\tUse other Mastra Storage options instead e.g @mastra/pg`,\n );\n process.exit(1);\n }\n }\n}\n"]}
@@ -0,0 +1,13 @@
1
+ export type VcConfig = {
2
+ handler: string;
3
+ launcherType: 'Nodejs';
4
+ runtime: string;
5
+ shouldAddHelpers: boolean;
6
+ maxDuration?: number;
7
+ memory?: number;
8
+ regions?: string[];
9
+ };
10
+ export type VcConfigOverrides = Pick<VcConfig, 'maxDuration' | 'memory' | 'regions'>;
11
+ export interface VercelDeployerOptions extends VcConfigOverrides {
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,QAAQ,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,EAAE,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC;AAErF,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;CAAG"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@mastra/deployer-vercel",
3
- "version": "0.0.0-vnext-inngest-20250508131921",
3
+ "version": "0.0.0-vnext-20251104230439",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "CHANGELOG.md"
8
9
  ],
9
10
  "main": "dist/index.js",
10
11
  "types": "dist/index.d.ts",
@@ -15,7 +16,7 @@
15
16
  "default": "./dist/index.js"
16
17
  },
17
18
  "require": {
18
- "types": "./dist/index.d.cts",
19
+ "types": "./dist/index.d.ts",
19
20
  "default": "./dist/index.cjs"
20
21
  }
21
22
  },
@@ -23,26 +24,39 @@
23
24
  },
24
25
  "keywords": [],
25
26
  "author": "",
26
- "license": "Elastic-2.0",
27
+ "license": "Apache-2.0",
27
28
  "dependencies": {
28
- "@rollup/plugin-virtual": "^3.0.2",
29
- "fs-extra": "^11.3.0",
30
- "@mastra/core": "0.0.0-vnext-inngest-20250508131921",
31
- "@mastra/deployer": "0.0.0-vnext-inngest-20250508131921"
29
+ "@rollup/plugin-virtual": "3.0.2",
30
+ "fs-extra": "^11.3.2",
31
+ "@mastra/deployer": "0.0.0-vnext-20251104230439"
32
32
  },
33
33
  "devDependencies": {
34
- "@microsoft/api-extractor": "^7.52.5",
35
- "@types/node": "^20.17.27",
36
- "eslint": "^9.23.0",
37
- "tsup": "^8.4.0",
38
- "typescript": "^5.8.2",
39
- "vercel": "^39.4.2",
40
- "vitest": "^3.1.2",
41
- "@internal/lint": "0.0.0-vnext-inngest-20250508131921"
34
+ "@microsoft/api-extractor": "^7.52.8",
35
+ "@types/fs-extra": "^11.0.4",
36
+ "@types/node": "^20.19.0",
37
+ "eslint": "^9.37.0",
38
+ "tsup": "^8.5.0",
39
+ "typescript": "^5.8.3",
40
+ "vitest": "^3.2.4",
41
+ "@internal/lint": "0.0.0-vnext-20251104230439",
42
+ "@internal/types-builder": "0.0.0-vnext-20251104230439",
43
+ "@mastra/core": "0.0.0-vnext-20251104230439"
44
+ },
45
+ "homepage": "https://mastra.ai",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/mastra-ai/mastra.git",
49
+ "directory": "deployers/vercel"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/mastra-ai/mastra/issues"
53
+ },
54
+ "peerDependencies": {
55
+ "@mastra/core": "0.0.0-vnext-20251104230439"
42
56
  },
43
57
  "scripts": {
44
- "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
45
- "build:watch": "pnpm build --watch",
58
+ "build": "tsup --silent --config tsup.config.ts",
59
+ "build:watch": "tsup --watch --silent --config tsup.config.ts",
46
60
  "test": "vitest run",
47
61
  "lint": "eslint ."
48
62
  }
@@ -1,23 +0,0 @@
1
- import { Deployer } from '@mastra/deployer';
2
-
3
- export declare class VercelDeployer extends Deployer {
4
- private teamSlug;
5
- private projectName;
6
- private token;
7
- constructor({ teamSlug, projectName, token }: {
8
- teamSlug: string;
9
- projectName: string;
10
- token: string;
11
- });
12
- private getProjectId;
13
- private getTeamId;
14
- private syncEnv;
15
- prepare(outputDirectory: string): Promise<void>;
16
- private getEntry;
17
- private writeVercelJSON;
18
- bundle(entryFile: string, outputDirectory: string, toolsPaths: string[]): Promise<void>;
19
- deploy(outputDirectory: string): Promise<void>;
20
- lint(entryFile: string, outputDirectory: string, toolsPaths: string[]): Promise<void>;
21
- }
22
-
23
- export { }
@@ -1,23 +0,0 @@
1
- import { Deployer } from '@mastra/deployer';
2
-
3
- export declare class VercelDeployer extends Deployer {
4
- private teamSlug;
5
- private projectName;
6
- private token;
7
- constructor({ teamSlug, projectName, token }: {
8
- teamSlug: string;
9
- projectName: string;
10
- token: string;
11
- });
12
- private getProjectId;
13
- private getTeamId;
14
- private syncEnv;
15
- prepare(outputDirectory: string): Promise<void>;
16
- private getEntry;
17
- private writeVercelJSON;
18
- bundle(entryFile: string, outputDirectory: string, toolsPaths: string[]): Promise<void>;
19
- deploy(outputDirectory: string): Promise<void>;
20
- lint(entryFile: string, outputDirectory: string, toolsPaths: string[]): Promise<void>;
21
- }
22
-
23
- export { }
package/dist/index.d.cts DELETED
@@ -1 +0,0 @@
1
- export { VercelDeployer } from './_tsup-dts-rollup.cjs';