@mastra/deployer-vercel 1.2.10 → 1.2.11
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 +16 -0
- package/dist/index.cjs +156 -136
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +131 -128
- package/dist/index.js.map +1 -1
- package/dist/studio/assets/{core-CWmLb1rY.js → core-CZ7lrnPw.js} +1 -1
- package/dist/studio/assets/{index-CbYta8Tj.js → index-sToavS1V.js} +2 -2
- package/dist/studio/assets/{main-CdyP_WdO.js → main-n0iDoxTR.js} +243 -243
- package/dist/studio/index.html +1 -1
- package/dist/studio/routes-manifest.json +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @mastra/deployer-vercel
|
|
2
2
|
|
|
3
|
+
## 1.2.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`ce93a3c`](https://github.com/mastra-ai/mastra/commit/ce93a3c114ea1cbfbd576f3db41d7c26c9844f5b), [`5718a22`](https://github.com/mastra-ai/mastra/commit/5718a229281dcfd36bcd1f42a242e3717e510a33), [`a211d09`](https://github.com/mastra-ai/mastra/commit/a211d09185dc65a746534914cf38b67f21ee9bac), [`0dca9d0`](https://github.com/mastra-ai/mastra/commit/0dca9d0b1356024a53b72ea6f040db528b126caa), [`6218217`](https://github.com/mastra-ai/mastra/commit/62182171b6cfca0b099f1c6a77a2e65e7639ab86), [`5807d3a`](https://github.com/mastra-ai/mastra/commit/5807d3ae1d259b8b7d6df7e5bf2b485c694af9c8), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`05db566`](https://github.com/mastra-ai/mastra/commit/05db566fcbdcbf33d0bffca0c72ec30129e2e3ca), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`5718a22`](https://github.com/mastra-ai/mastra/commit/5718a229281dcfd36bcd1f42a242e3717e510a33), [`57661af`](https://github.com/mastra-ai/mastra/commit/57661afeca52ff9af4e72675ede2134fa503d5a5), [`d1b7e3a`](https://github.com/mastra-ai/mastra/commit/d1b7e3a978a309a5653eeaa490d2d6c7c53bd093), [`29c584a`](https://github.com/mastra-ai/mastra/commit/29c584a13a88831e5ed1fdeb0ff8e82eae180433), [`c093146`](https://github.com/mastra-ai/mastra/commit/c0931466404d3c521308ea119cb165bb7e695155), [`8124754`](https://github.com/mastra-ai/mastra/commit/8124754ae89fbc69f8136d1df4a91904d0f84c4e), [`d12b2e4`](https://github.com/mastra-ai/mastra/commit/d12b2e4023fd9e3d3e93a9169f5088bcee2a849c)]:
|
|
8
|
+
- @mastra/core@1.54.0
|
|
9
|
+
- @mastra/deployer@1.54.0
|
|
10
|
+
|
|
11
|
+
## 1.2.11-alpha.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`0dca9d0`](https://github.com/mastra-ai/mastra/commit/0dca9d0b1356024a53b72ea6f040db528b126caa)]:
|
|
16
|
+
- @mastra/core@1.54.0-alpha.0
|
|
17
|
+
- @mastra/deployer@1.54.0-alpha.0
|
|
18
|
+
|
|
3
19
|
## 1.2.10
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1,69 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let fs = require("fs");
|
|
25
|
+
let path = require("path");
|
|
26
|
+
let process = require("process");
|
|
27
|
+
process = __toESM(process, 1);
|
|
28
|
+
let url = require("url");
|
|
29
|
+
let _mastra_deployer = require("@mastra/deployer");
|
|
30
|
+
let _mastra_deployer_build = require("@mastra/deployer/build");
|
|
31
|
+
let fs_extra_esm = require("fs-extra/esm");
|
|
32
|
+
//#region src/routes.ts
|
|
19
33
|
function getVercelRoutes({ studio }) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
return studio ? [
|
|
35
|
+
{
|
|
36
|
+
src: "^/$",
|
|
37
|
+
dest: "/index.html"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
src: "/api/(.*)",
|
|
41
|
+
dest: "/"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
src: "/health",
|
|
45
|
+
dest: "/"
|
|
46
|
+
},
|
|
47
|
+
{ handle: "filesystem" },
|
|
48
|
+
{
|
|
49
|
+
src: "/(.*)",
|
|
50
|
+
dest: "/index.html",
|
|
51
|
+
check: true
|
|
52
|
+
}
|
|
53
|
+
] : [{
|
|
54
|
+
src: "/(.*)",
|
|
55
|
+
dest: "/"
|
|
56
|
+
}];
|
|
27
57
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var VercelDeployer = class extends
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.injectStudioConfig(staticDir);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
getEntry() {
|
|
66
|
-
return `
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/index.ts
|
|
60
|
+
var VercelDeployer = class extends _mastra_deployer.Deployer {
|
|
61
|
+
vcConfigOverrides = {};
|
|
62
|
+
studio;
|
|
63
|
+
constructor(options = {}) {
|
|
64
|
+
super({ name: "VERCEL" });
|
|
65
|
+
this.outputDir = (0, path.join)(".vercel", "output", "functions", "index.func");
|
|
66
|
+
this.studio = options.studio ?? false;
|
|
67
|
+
const { studio, ...overrides } = options;
|
|
68
|
+
this.vcConfigOverrides = { ...overrides };
|
|
69
|
+
}
|
|
70
|
+
async getUserBundlerOptions(mastraEntryFile, outputDirectory) {
|
|
71
|
+
return {
|
|
72
|
+
...await super.getUserBundlerOptions(mastraEntryFile, outputDirectory),
|
|
73
|
+
externals: true
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async prepare(outputDirectory) {
|
|
77
|
+
await super.prepare(outputDirectory);
|
|
78
|
+
this.writeVercelJSON((0, path.join)(outputDirectory, this.outputDir, "..", ".."));
|
|
79
|
+
if (this.studio) {
|
|
80
|
+
const studioSource = (0, path.join)((0, path.dirname)((0, path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href))), "dist", "studio");
|
|
81
|
+
const staticDir = (0, path.join)(outputDirectory, ".vercel", "output", "static");
|
|
82
|
+
try {
|
|
83
|
+
await (0, fs_extra_esm.copy)(studioSource, staticDir, { overwrite: true });
|
|
84
|
+
} catch (err) {
|
|
85
|
+
throw new Error(`Failed to copy studio assets from "${studioSource}" to "${staticDir}": ${err instanceof Error ? err.message : err}`);
|
|
86
|
+
}
|
|
87
|
+
this.injectStudioConfig(staticDir);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
getEntry() {
|
|
91
|
+
return `
|
|
67
92
|
import { handle } from 'hono/vercel'
|
|
68
93
|
import { mastra } from '#mastra';
|
|
69
94
|
import { createHonoServer, getToolExports } from '#server';
|
|
@@ -84,78 +109,73 @@ export const PATCH = handle(app);
|
|
|
84
109
|
export const OPTIONS = handle(app);
|
|
85
110
|
export const HEAD = handle(app);
|
|
86
111
|
`;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Use other Mastra Storage options instead e.g @mastra/pg`
|
|
153
|
-
);
|
|
154
|
-
process__default.default.exit(1);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
112
|
+
}
|
|
113
|
+
injectStudioConfig(staticDir) {
|
|
114
|
+
const indexPath = (0, path.join)(staticDir, "index.html");
|
|
115
|
+
let html = (0, fs.readFileSync)(indexPath, "utf-8");
|
|
116
|
+
/**
|
|
117
|
+
* Use window.location expressions so the SPA constructs the correct same-origin endpoint.
|
|
118
|
+
* Port uses a ternary: window.location.port is '' for default ports (80/443), and the SPA falls back to 4111 for empty strings, so we return the default port explicitly instead.
|
|
119
|
+
*/
|
|
120
|
+
html = (0, _mastra_deployer_build.injectStudioHtmlConfig)(html, {
|
|
121
|
+
host: `window.location.hostname`,
|
|
122
|
+
port: `(window.location.port || (window.location.protocol === 'https:' ? '443' : '80'))`,
|
|
123
|
+
protocol: `window.location.protocol.replace(':', '')`,
|
|
124
|
+
apiPrefix: `'/api'`,
|
|
125
|
+
basePath: "",
|
|
126
|
+
hideCloudCta: `'true'`,
|
|
127
|
+
templates: `'false'`,
|
|
128
|
+
cloudApiEndpoint: `''`,
|
|
129
|
+
experimentalFeatures: `'false'`,
|
|
130
|
+
telemetryDisabled: `''`,
|
|
131
|
+
requestContextPresets: `''`,
|
|
132
|
+
experimentalUI: `'false'`,
|
|
133
|
+
agentSignals: process.default.env.MASTRA_AGENT_SIGNALS === "false" ? `'false'` : `'true'`,
|
|
134
|
+
signalsUI: process.default.env.MASTRA_SIGNALS_UI === "true" ? `'true'` : `'false'`,
|
|
135
|
+
organizationId: `'${(0, _mastra_deployer_build.escapeStudioHtmlValue)(process.default.env.MASTRA_ORGANIZATION_ID || "")}'`,
|
|
136
|
+
platformProjectId: `'${(0, _mastra_deployer_build.escapeStudioHtmlValue)(process.default.env.MASTRA_PLATFORM_PROJECT_ID || "")}'`,
|
|
137
|
+
platformObservabilityEndpoint: `'${(0, _mastra_deployer_build.escapeStudioHtmlValue)(process.default.env.MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT || "")}'`
|
|
138
|
+
});
|
|
139
|
+
(0, fs.writeFileSync)(indexPath, html);
|
|
140
|
+
}
|
|
141
|
+
writeVercelJSON(outputDirectory) {
|
|
142
|
+
(0, fs.writeFileSync)((0, path.join)(outputDirectory, "config.json"), JSON.stringify({
|
|
143
|
+
version: 3,
|
|
144
|
+
routes: getVercelRoutes({ studio: this.studio })
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
async bundle(entryFile, outputDirectory, { toolsPaths, projectRoot }) {
|
|
148
|
+
const result = await this._bundle(this.getEntry(), entryFile, {
|
|
149
|
+
outputDirectory,
|
|
150
|
+
projectRoot
|
|
151
|
+
}, toolsPaths, (0, path.join)(outputDirectory, this.outputDir));
|
|
152
|
+
const vcConfig = {
|
|
153
|
+
handler: "index.mjs",
|
|
154
|
+
launcherType: "Nodejs",
|
|
155
|
+
runtime: `nodejs${process.default.version?.split(".")?.[0]?.replace("v", "") ?? "22"}.x`,
|
|
156
|
+
shouldAddHelpers: true
|
|
157
|
+
};
|
|
158
|
+
const { maxDuration, memory, regions } = this.vcConfigOverrides;
|
|
159
|
+
if (typeof maxDuration === "number") vcConfig.maxDuration = maxDuration;
|
|
160
|
+
if (typeof memory === "number") vcConfig.memory = memory;
|
|
161
|
+
if (Array.isArray(regions) && regions.length > 0) vcConfig.regions = regions;
|
|
162
|
+
(0, fs.writeFileSync)((0, path.join)(outputDirectory, this.outputDir, ".vc-config.json"), JSON.stringify(vcConfig, null, 2));
|
|
163
|
+
await (0, fs_extra_esm.move)((0, path.join)(outputDirectory, ".vercel", "output"), (0, path.join)(process.default.cwd(), ".vercel", "output"), { overwrite: true });
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
async deploy() {
|
|
167
|
+
this.logger?.info("Deploying to Vercel is deprecated. Please use the Vercel dashboard to deploy.");
|
|
168
|
+
}
|
|
169
|
+
async lint(entryFile, outputDirectory, toolsPaths) {
|
|
170
|
+
await super.lint(entryFile, outputDirectory, toolsPaths);
|
|
171
|
+
if (await this.deps.checkDependencies(["@mastra/libsql"]) === `ok`) {
|
|
172
|
+
this.logger.error(`Vercel Deployer does not support @libsql/client(which may have been installed by @mastra/libsql) as a dependency.
|
|
173
|
+
Use other Mastra Storage options instead e.g @mastra/pg`);
|
|
174
|
+
process.default.exit(1);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
157
177
|
};
|
|
158
|
-
|
|
178
|
+
//#endregion
|
|
159
179
|
exports.VercelDeployer = VercelDeployer;
|
|
160
|
-
|
|
180
|
+
|
|
161
181
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes.ts","../src/index.ts"],"names":["Deployer","join","fileURLToPath","dirname","copy","readFileSync","injectStudioHtmlConfig","process","escapeStudioHtmlValue","writeFileSync","move"],"mappings":";;;;;;;;;;;;;;;;;;AAIO,SAAS,eAAA,CAAgB,EAAE,MAAA,EAAO,EAAwB;AAC/D,EAA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A,CAAK,SAAA,CAAU,QAAA,EAAU,IAAA,EAAM,CAAC,CAAC,CAAA;AAEzG,IAAA,MAAMS,QAAA,CAAKT,SAAA,CAAK,eAAA,EAAiB,SAAA,EAAW,QAAQ,CAAA,EAAGA,SAAA,CAAKM,wBAAA,CAAQ,GAAA,EAAI,EAAG,SAAA,EAAW,QAAQ,CAAA,EAAG;AAAA,MAC/F,SAAA,EAAW;AAAA,KACZ,CAAA;AAED,IAAA,OAAO,MAAA;AAAA,EACT;AAAA,EAEA,MAAM,MAAA,GAAwB;AAC5B,IAAA,IAAA,CAAK,MAAA,EAAQ,KAAK,+EAA+E,CAAA;AAAA,EACnG;AAAA,EAEA,MAAM,IAAA,CAAK,SAAA,EAAmB,eAAA,EAAyB,UAAA,EAAkD;AACvG,IAAA,MAAM,KAAA,CAAM,IAAA,CAAK,SAAA,EAAW,eAAA,EAAiB,UAAU,CAAA;AAEvD,IAAA,MAAM,SAAA,GAAa,MAAM,IAAA,CAAK,IAAA,CAAK,kBAAkB,CAAC,gBAAgB,CAAC,CAAA,KAAO,CAAA,EAAA,CAAA;AAE9E,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,IAAA,CAAK,MAAA,CAAO,KAAA;AAAA,QACV,CAAA;AAAA,2DAAA;AAAA,OAEF;AACA,MAAAA,wBAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,IAChB;AAAA,EACF;AACF","file":"index.cjs","sourcesContent":["type VercelRoutesOptions = {\n studio: boolean;\n};\n\nexport function getVercelRoutes({ studio }: VercelRoutesOptions) {\n return studio\n ? [\n { src: '^/$', dest: '/index.html' },\n { src: '/api/(.*)', dest: '/' },\n { src: '/health', dest: '/' },\n { handle: 'filesystem' as const },\n { src: '/(.*)', dest: '/index.html', check: true },\n ]\n : [{ src: '/(.*)', dest: '/' }];\n}\n","import { readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\nimport type { Config } from '@mastra/core/mastra';\nimport { Deployer } from '@mastra/deployer';\nimport { escapeStudioHtmlValue, injectStudioHtmlConfig } from '@mastra/deployer/build';\nimport { copy, move } from 'fs-extra/esm';\nimport { getVercelRoutes } from './routes';\nimport type { VcConfig, VcConfigOverrides, VercelDeployerOptions } from './types';\n\nexport class VercelDeployer extends Deployer {\n private vcConfigOverrides: VcConfigOverrides = {};\n private studio: boolean;\n\n constructor(options: VercelDeployerOptions = {}) {\n super({ name: 'VERCEL' });\n this.outputDir = join('.vercel', 'output', 'functions', 'index.func');\n this.studio = options.studio ?? false;\n\n const { studio, ...overrides } = options;\n this.vcConfigOverrides = { ...overrides };\n }\n\n protected async getUserBundlerOptions(\n mastraEntryFile: string,\n outputDirectory: string,\n ): Promise<NonNullable<Config['bundler']>> {\n const bundlerOptions = await super.getUserBundlerOptions(mastraEntryFile, outputDirectory);\n\n // Always force externals: true for Vercel deployments.\n // Vercel serverless functions resolve dependencies from node_modules,\n // so bundling them inline serves no purpose. Bundling inline can also cause\n // circular module evaluation deadlocks when dynamic imports produce chunks\n // that depend back on the entry module via static imports, resulting in\n // \"Detected unsettled top-level await\" errors (Node.js exit code 13).\n // See: https://github.com/mastra-ai/mastra/issues/14860\n return {\n ...bundlerOptions,\n externals: true,\n };\n }\n\n async prepare(outputDirectory: string): Promise<void> {\n await super.prepare(outputDirectory);\n\n this.writeVercelJSON(join(outputDirectory, this.outputDir, '..', '..'));\n\n if (this.studio) {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = dirname(__filename);\n\n const studioSource = join(dirname(__dirname), 'dist', 'studio');\n const staticDir = join(outputDirectory, '.vercel', 'output', 'static');\n\n try {\n await copy(studioSource, staticDir, { overwrite: true });\n } catch (err) {\n throw new Error(\n `Failed to copy studio assets from \"${studioSource}\" to \"${staticDir}\": ${err instanceof Error ? err.message : err}`,\n );\n }\n\n this.injectStudioConfig(staticDir);\n }\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 injectStudioConfig(staticDir: string) {\n const indexPath = join(staticDir, 'index.html');\n let html = readFileSync(indexPath, 'utf-8');\n\n /**\n * Use window.location expressions so the SPA constructs the correct same-origin endpoint.\n * Port uses a ternary: window.location.port is '' for default ports (80/443), and the SPA falls back to 4111 for empty strings, so we return the default port explicitly instead.\n */\n html = injectStudioHtmlConfig(html, {\n host: `window.location.hostname`,\n port: `(window.location.port || (window.location.protocol === 'https:' ? '443' : '80'))`,\n protocol: `window.location.protocol.replace(':', '')`,\n apiPrefix: `'/api'`,\n basePath: '',\n hideCloudCta: `'true'`,\n templates: `'false'`,\n cloudApiEndpoint: `''`,\n experimentalFeatures: `'false'`,\n telemetryDisabled: `''`,\n requestContextPresets: `''`,\n experimentalUI: `'false'`,\n agentSignals: process.env.MASTRA_AGENT_SIGNALS === 'false' ? `'false'` : `'true'`,\n signalsUI: process.env.MASTRA_SIGNALS_UI === 'true' ? `'true'` : `'false'`,\n organizationId: `'${escapeStudioHtmlValue(process.env.MASTRA_ORGANIZATION_ID || '')}'`,\n platformProjectId: `'${escapeStudioHtmlValue(process.env.MASTRA_PLATFORM_PROJECT_ID || '')}'`,\n platformObservabilityEndpoint: `'${escapeStudioHtmlValue(process.env.MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT || '')}'`,\n });\n\n writeFileSync(indexPath, html);\n }\n\n private writeVercelJSON(outputDirectory: string) {\n writeFileSync(\n join(outputDirectory, 'config.json'),\n JSON.stringify({ version: 3, routes: getVercelRoutes({ studio: this.studio }) }),\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"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Deployer"],"sources":["../src/routes.ts","../src/index.ts"],"sourcesContent":["type VercelRoutesOptions = {\n studio: boolean;\n};\n\nexport function getVercelRoutes({ studio }: VercelRoutesOptions) {\n return studio\n ? [\n { src: '^/$', dest: '/index.html' },\n { src: '/api/(.*)', dest: '/' },\n { src: '/health', dest: '/' },\n { handle: 'filesystem' as const },\n { src: '/(.*)', dest: '/index.html', check: true },\n ]\n : [{ src: '/(.*)', dest: '/' }];\n}\n","import { readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\nimport type { Config } from '@mastra/core/mastra';\nimport { Deployer } from '@mastra/deployer';\nimport { escapeStudioHtmlValue, injectStudioHtmlConfig } from '@mastra/deployer/build';\nimport { copy, move } from 'fs-extra/esm';\nimport { getVercelRoutes } from './routes';\nimport type { VcConfig, VcConfigOverrides, VercelDeployerOptions } from './types';\n\nexport class VercelDeployer extends Deployer {\n private vcConfigOverrides: VcConfigOverrides = {};\n private studio: boolean;\n\n constructor(options: VercelDeployerOptions = {}) {\n super({ name: 'VERCEL' });\n this.outputDir = join('.vercel', 'output', 'functions', 'index.func');\n this.studio = options.studio ?? false;\n\n const { studio, ...overrides } = options;\n this.vcConfigOverrides = { ...overrides };\n }\n\n protected async getUserBundlerOptions(\n mastraEntryFile: string,\n outputDirectory: string,\n ): Promise<NonNullable<Config['bundler']>> {\n const bundlerOptions = await super.getUserBundlerOptions(mastraEntryFile, outputDirectory);\n\n // Always force externals: true for Vercel deployments.\n // Vercel serverless functions resolve dependencies from node_modules,\n // so bundling them inline serves no purpose. Bundling inline can also cause\n // circular module evaluation deadlocks when dynamic imports produce chunks\n // that depend back on the entry module via static imports, resulting in\n // \"Detected unsettled top-level await\" errors (Node.js exit code 13).\n // See: https://github.com/mastra-ai/mastra/issues/14860\n return {\n ...bundlerOptions,\n externals: true,\n };\n }\n\n async prepare(outputDirectory: string): Promise<void> {\n await super.prepare(outputDirectory);\n\n this.writeVercelJSON(join(outputDirectory, this.outputDir, '..', '..'));\n\n if (this.studio) {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = dirname(__filename);\n\n const studioSource = join(dirname(__dirname), 'dist', 'studio');\n const staticDir = join(outputDirectory, '.vercel', 'output', 'static');\n\n try {\n await copy(studioSource, staticDir, { overwrite: true });\n } catch (err) {\n throw new Error(\n `Failed to copy studio assets from \"${studioSource}\" to \"${staticDir}\": ${err instanceof Error ? err.message : err}`,\n );\n }\n\n this.injectStudioConfig(staticDir);\n }\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 injectStudioConfig(staticDir: string) {\n const indexPath = join(staticDir, 'index.html');\n let html = readFileSync(indexPath, 'utf-8');\n\n /**\n * Use window.location expressions so the SPA constructs the correct same-origin endpoint.\n * Port uses a ternary: window.location.port is '' for default ports (80/443), and the SPA falls back to 4111 for empty strings, so we return the default port explicitly instead.\n */\n html = injectStudioHtmlConfig(html, {\n host: `window.location.hostname`,\n port: `(window.location.port || (window.location.protocol === 'https:' ? '443' : '80'))`,\n protocol: `window.location.protocol.replace(':', '')`,\n apiPrefix: `'/api'`,\n basePath: '',\n hideCloudCta: `'true'`,\n templates: `'false'`,\n cloudApiEndpoint: `''`,\n experimentalFeatures: `'false'`,\n telemetryDisabled: `''`,\n requestContextPresets: `''`,\n experimentalUI: `'false'`,\n agentSignals: process.env.MASTRA_AGENT_SIGNALS === 'false' ? `'false'` : `'true'`,\n signalsUI: process.env.MASTRA_SIGNALS_UI === 'true' ? `'true'` : `'false'`,\n organizationId: `'${escapeStudioHtmlValue(process.env.MASTRA_ORGANIZATION_ID || '')}'`,\n platformProjectId: `'${escapeStudioHtmlValue(process.env.MASTRA_PLATFORM_PROJECT_ID || '')}'`,\n platformObservabilityEndpoint: `'${escapeStudioHtmlValue(process.env.MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT || '')}'`,\n });\n\n writeFileSync(indexPath, html);\n }\n\n private writeVercelJSON(outputDirectory: string) {\n writeFileSync(\n join(outputDirectory, 'config.json'),\n JSON.stringify({ version: 3, routes: getVercelRoutes({ studio: this.studio }) }),\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAgB,gBAAgB,EAAE,UAA+B;CAC/D,OAAO,SACH;EACE;GAAE,KAAK;GAAO,MAAM;EAAc;EAClC;GAAE,KAAK;GAAa,MAAM;EAAI;EAC9B;GAAE,KAAK;GAAW,MAAM;EAAI;EAC5B,EAAE,QAAQ,aAAsB;EAChC;GAAE,KAAK;GAAS,MAAM;GAAe,OAAO;EAAK;CACnD,IACA,CAAC;EAAE,KAAK;EAAS,MAAM;CAAI,CAAC;AAClC;;;ACHA,IAAa,iBAAb,cAAoCA,iBAAAA,SAAS;CAC3C,oBAA+C,CAAC;CAChD;CAEA,YAAY,UAAiC,CAAC,GAAG;EAC/C,MAAM,EAAE,MAAM,SAAS,CAAC;EACxB,KAAK,aAAA,GAAA,KAAA,KAAA,CAAiB,WAAW,UAAU,aAAa,YAAY;EACpE,KAAK,SAAS,QAAQ,UAAU;EAEhC,MAAM,EAAE,QAAQ,GAAG,cAAc;EACjC,KAAK,oBAAoB,EAAE,GAAG,UAAU;CAC1C;CAEA,MAAgB,sBACd,iBACA,iBACyC;EAUzC,OAAO;GACL,GAAG,MAVwB,MAAM,sBAAsB,iBAAiB,eAAe;GAWvF,WAAW;EACb;CACF;CAEA,MAAM,QAAQ,iBAAwC;EACpD,MAAM,MAAM,QAAQ,eAAe;EAEnC,KAAK,iBAAA,GAAA,KAAA,KAAA,CAAqB,iBAAiB,KAAK,WAAW,MAAM,IAAI,CAAC;EAEtE,IAAI,KAAK,QAAQ;GAIf,MAAM,gBAAA,GAAA,KAAA,KAAA,EAAA,GAAA,KAAA,QAAA,EAAA,GAAA,KAAA,QAAA,EAAA,GAAA,IAAA,cAAA,CAAA,QAAA,KAAA,CAAA,CAAA,cAAA,UAAA,CAAA,CAAA,IAF6B,CAEO,CAAC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