@mastra/deployer-netlify 0.0.1-alpha.9 → 0.1.0-alpha.34

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 CHANGED
@@ -1,5 +1,226 @@
1
1
  # @mastra/deployer-netlify
2
2
 
3
+ ## 0.1.0-alpha.34
4
+
5
+ ### Minor Changes
6
+
7
+ - 5916f9d: Update deps from fixed to ^
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [6fa4bd2]
12
+ - Updated dependencies [5916f9d]
13
+ - Updated dependencies [e2e76de]
14
+ - Updated dependencies [7f24c29]
15
+ - Updated dependencies [67637ba]
16
+ - Updated dependencies [04f3171]
17
+ - @mastra/core@0.2.0-alpha.86
18
+ - @mastra/deployer@0.1.0-alpha.32
19
+
20
+ ## 0.0.1-alpha.33
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [e9d1b47]
25
+ - Updated dependencies [c5f2d50]
26
+ - @mastra/core@0.2.0-alpha.85
27
+ - @mastra/deployer@0.0.1-alpha.31
28
+
29
+ ## 0.0.1-alpha.32
30
+
31
+ ### Patch Changes
32
+
33
+ - e27fe69: Add dir to deployer
34
+ - Updated dependencies [e27fe69]
35
+ - @mastra/deployer@0.0.1-alpha.30
36
+
37
+ ## 0.0.1-alpha.31
38
+
39
+ ### Patch Changes
40
+
41
+ - 38b7f66: Update deployer logic
42
+ - Updated dependencies [2f17a5f]
43
+ - Updated dependencies [0696eeb]
44
+ - Updated dependencies [cb290ee]
45
+ - Updated dependencies [b4d7416]
46
+ - Updated dependencies [38b7f66]
47
+ - @mastra/core@0.2.0-alpha.84
48
+ - @mastra/deployer@0.0.1-alpha.29
49
+
50
+ ## 0.0.1-alpha.30
51
+
52
+ ### Patch Changes
53
+
54
+ - 9625602: Use mastra core splitted bundles in other packages
55
+ - Updated dependencies [2ab57d6]
56
+ - Updated dependencies [30322ce]
57
+ - Updated dependencies [78eec7c]
58
+ - Updated dependencies [9625602]
59
+ - Updated dependencies [8769a62]
60
+ - @mastra/deployer@0.0.1-alpha.28
61
+ - @mastra/core@0.2.0-alpha.83
62
+
63
+ ## 0.0.1-alpha.29
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [73d112c]
68
+ - Updated dependencies [ac8c61a]
69
+ - @mastra/deployer@0.0.1-alpha.27
70
+ - @mastra/core@0.1.27-alpha.82
71
+
72
+ ## 0.0.1-alpha.28
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [9fb3039]
77
+ - @mastra/core@0.1.27-alpha.81
78
+ - @mastra/deployer@0.0.1-alpha.26
79
+
80
+ ## 0.0.1-alpha.27
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [327ece7]
85
+ - @mastra/core@0.1.27-alpha.80
86
+ - @mastra/deployer@0.0.1-alpha.25
87
+
88
+ ## 0.0.1-alpha.26
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [21fe536]
93
+ - @mastra/core@0.1.27-alpha.79
94
+ - @mastra/deployer@0.0.1-alpha.24
95
+
96
+ ## 0.0.1-alpha.25
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [88f18d7]
101
+ - @mastra/deployer@0.0.1-alpha.23
102
+
103
+ ## 0.0.1-alpha.24
104
+
105
+ ### Patch Changes
106
+
107
+ - 44c7c26: Rebuild
108
+
109
+ ## 0.0.1-alpha.23
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [685108a]
114
+ - Updated dependencies [685108a]
115
+ - @mastra/deployer@0.0.1-alpha.22
116
+ - @mastra/core@0.1.27-alpha.78
117
+
118
+ ## 0.0.1-alpha.22
119
+
120
+ ### Patch Changes
121
+
122
+ - 2b75edf: mastra deployers tsup bundling
123
+ - Updated dependencies [8105fae]
124
+ - Updated dependencies [cfb966f]
125
+ - @mastra/core@0.1.27-alpha.77
126
+ - @mastra/deployer@0.0.1-alpha.21
127
+
128
+ ## 0.0.1-alpha.21
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies [ae7bf94]
133
+ - Updated dependencies [ae7bf94]
134
+ - @mastra/deployer@0.0.1-alpha.20
135
+ - @mastra/core@0.1.27-alpha.76
136
+
137
+ ## 0.0.1-alpha.20
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [23dcb23]
142
+ - Updated dependencies [7064554]
143
+ - @mastra/core@0.1.27-alpha.75
144
+ - @mastra/deployer@0.0.1-alpha.19
145
+
146
+ ## 0.0.1-alpha.19
147
+
148
+ ### Patch Changes
149
+
150
+ - Updated dependencies [7b87567]
151
+ - @mastra/core@0.1.27-alpha.74
152
+ - @mastra/deployer@0.0.1-alpha.18
153
+
154
+ ## 0.0.1-alpha.18
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [3427b95]
159
+ - @mastra/core@0.1.27-alpha.73
160
+ - @mastra/deployer@0.0.1-alpha.17
161
+
162
+ ## 0.0.1-alpha.17
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [e4d4ede]
167
+ - Updated dependencies [06b2c0a]
168
+ - @mastra/core@0.1.27-alpha.72
169
+ - @mastra/deployer@0.0.1-alpha.16
170
+
171
+ ## 0.0.1-alpha.16
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [d9c8dd0]
176
+ - @mastra/deployer@0.0.1-alpha.15
177
+ - @mastra/core@0.1.27-alpha.71
178
+
179
+ ## 0.0.1-alpha.15
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies [ad2cd74]
184
+ - @mastra/deployer@0.0.1-alpha.14
185
+
186
+ ## 0.0.1-alpha.14
187
+
188
+ ### Patch Changes
189
+
190
+ - Updated dependencies [a1774e7]
191
+ - @mastra/deployer@0.0.1-alpha.13
192
+
193
+ ## 0.0.1-alpha.13
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [28dceab]
198
+ - @mastra/deployer@0.0.1-alpha.12
199
+
200
+ ## 0.0.1-alpha.12
201
+
202
+ ### Patch Changes
203
+
204
+ - bdaf834: publish packages
205
+ - Updated dependencies [bdaf834]
206
+ - @mastra/deployer@0.0.1-alpha.11
207
+
208
+ ## 0.0.1-alpha.11
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies [dd6d87f]
213
+ - Updated dependencies [04434b6]
214
+ - @mastra/core@0.1.27-alpha.70
215
+ - @mastra/deployer@0.0.1-alpha.10
216
+
217
+ ## 0.0.1-alpha.10
218
+
219
+ ### Patch Changes
220
+
221
+ - Updated dependencies [9066f95]
222
+ - @mastra/deployer@0.0.1-alpha.9
223
+
3
224
  ## 0.0.1-alpha.9
4
225
 
5
226
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @mastra/deployer-netlify
2
+
3
+ A Netlify deployer for Mastra applications.
4
+
5
+ ## Features
6
+
7
+ - Deploy Mastra applications to Netlify Functions
8
+ - Automatic site creation and configuration
9
+ - Serverless function support with Edge Functions
10
+ - Zero-configuration deployments
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ pnpm add @mastra/deployer-netlify
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ The Netlify deployer is used as part of the Mastra framework:
21
+
22
+ ```typescript
23
+ import { Mastra } from '@mastra/core';
24
+ import { NetlifyDeployer } from '@mastra/deployer-netlify';
25
+
26
+ const deployer = new NetlifyDeployer({
27
+ scope: 'your-team-id',
28
+ projectName: 'your-project-name',
29
+ });
30
+
31
+ const mastra = new Mastra({
32
+ deployer,
33
+ // ... other Mastra configuration options
34
+ });
35
+ ```
36
+
37
+ ## Configuration
38
+
39
+ ### Constructor Options
40
+
41
+ - `scope` (required): Your Netlify team ID
42
+ - `projectName`: Name of your Netlify site (will be created if it doesn't exist)
43
+
44
+ ## Project Structure
45
+
46
+ The deployer automatically creates the following structure:
47
+
48
+ ```
49
+ your-project/
50
+ ├── netlify/
51
+ │ └── functions/
52
+ │ └── api/
53
+ └── netlify.toml
54
+ ```
55
+
56
+ ### netlify.toml Configuration
57
+
58
+ The deployer creates a `netlify.toml` with the following defaults:
59
+
60
+ ```toml
61
+ [functions]
62
+ node_bundler = "esbuild"
63
+ directory = "/netlify/functions"
64
+
65
+ [[redirects]]
66
+ force = true
67
+ from = "/*"
68
+ status = 200
69
+ to = "/.netlify/functions/api/:splat"
70
+ ```
71
+
72
+ ## Environment Variables
73
+
74
+ Environment variables are handled automatically through:
75
+
76
+ - `.env` files in your project
77
+ - Environment variables passed through the Mastra configuration
78
+ - Netlify's environment variable UI
79
+
80
+ ## Deployment Process
81
+
82
+ The deployer will:
83
+
84
+ 1. Create a new site if it doesn't exist
85
+ 2. Configure the site with your environment variables
86
+ 3. Deploy your application to Netlify Functions
package/dist/index.d.ts CHANGED
@@ -1,19 +1,21 @@
1
- import { MastraDeployer } from '@mastra/core';
2
- export declare class NetlifyDeployer extends MastraDeployer {
3
- constructor({ scope, env, projectName }: {
4
- projectName: string;
5
- env?: Record<string, any>;
1
+ import { Deployer } from '@mastra/deployer';
2
+
3
+ declare class NetlifyDeployer extends Deployer {
4
+ protected scope: string;
5
+ protected projectName: string;
6
+ protected token: string;
7
+ constructor({ scope, projectName, token }: {
6
8
  scope: string;
9
+ projectName: string;
10
+ token: string;
7
11
  });
8
12
  writeFiles({ dir }: {
9
13
  dir: string;
10
14
  }): void;
11
- deploy({ dir, token }: {
12
- dir: string;
13
- token: string;
14
- }): Promise<void>;
15
- writeIndex({ dir }: {
16
- dir: string;
17
- }): void;
15
+ deploy(outputDirectory: string): Promise<void>;
16
+ prepare(outputDirectory: string): Promise<void>;
17
+ bundle(mastraDir: string, outputDirectory: string): Promise<void>;
18
+ private getEntry;
18
19
  }
19
- //# sourceMappingURL=index.d.ts.map
20
+
21
+ export { NetlifyDeployer };
package/dist/index.js CHANGED
@@ -1,8 +1,148 @@
1
+ import { Deployer } from '@mastra/deployer';
2
+ import { getBundler } from '@mastra/deployer/build';
3
+ import virtual from '@rollup/plugin-virtual';
4
+ import { execa } from 'execa';
5
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
6
+ import { join } from 'path';
1
7
 
2
- 'use strict'
8
+ // src/index.ts
3
9
 
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./deployer-netlify.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./deployer-netlify.cjs.development.js')
10
+ // src/helpers.ts
11
+ async function createNetlifySite({ token, name, scope }) {
12
+ console.log(token, name, scope);
13
+ const response = await fetch("https://api.netlify.com/api/v1/sites", {
14
+ method: "POST",
15
+ headers: {
16
+ Authorization: `Bearer ${token}`,
17
+ "Content-Type": "application/json"
18
+ },
19
+ body: JSON.stringify({
20
+ name,
21
+ account_slug: scope,
22
+ // Optional - if not provided, creates in user's default account
23
+ force_ssl: true
24
+ // Enable HTTPS
25
+ })
26
+ });
27
+ const data = await response.json();
28
+ if (!response.ok) {
29
+ console.error(JSON.stringify(data));
30
+ throw new Error(`Failed to create site: ${data.message || "Unknown error"}`);
31
+ }
32
+ return {
33
+ id: data.id,
34
+ name: data.name,
35
+ url: data.ssl_url || data.url,
36
+ adminUrl: data.admin_url
37
+ };
8
38
  }
39
+ async function findNetlifySite({ token, name, scope }) {
40
+ const response = await fetch(`https://api.netlify.com/api/v1/${scope}/sites?filter=all&name=${name}`, {
41
+ headers: {
42
+ Authorization: `Bearer ${token}`,
43
+ "Content-Type": "application/json"
44
+ }
45
+ });
46
+ const data = await response.json();
47
+ if (!response.ok) {
48
+ throw new Error(`Failed to search sites: ${data.message || "Unknown error"}`);
49
+ }
50
+ return data.find((site) => site.name === name);
51
+ }
52
+ async function getOrCreateSite({ token, name, scope }) {
53
+ let existingSite;
54
+ try {
55
+ existingSite = await findNetlifySite({ token, name, scope });
56
+ } catch (e) {
57
+ }
58
+ if (existingSite) {
59
+ return existingSite;
60
+ }
61
+ return createNetlifySite({ token, name, scope });
62
+ }
63
+
64
+ // src/index.ts
65
+ var NetlifyDeployer = class extends Deployer {
66
+ scope;
67
+ projectName;
68
+ token;
69
+ constructor({ scope, projectName, token }) {
70
+ super({ name: "NETLIFY" });
71
+ this.scope = scope;
72
+ this.projectName = projectName;
73
+ this.token = token;
74
+ }
75
+ writeFiles({ dir }) {
76
+ if (!existsSync(join(dir, "netlify/functions/api"))) {
77
+ mkdirSync(join(dir, "netlify/functions/api"), { recursive: true });
78
+ }
79
+ writeFileSync(
80
+ join(dir, "netlify.toml"),
81
+ `[functions]
82
+ node_bundler = "esbuild"
83
+ directory = "netlify/functions"
84
+
85
+ [[redirects]]
86
+ force = true
87
+ from = "/*"
88
+ status = 200
89
+ to = "/.netlify/functions/api/:splat"
90
+ `
91
+ );
92
+ }
93
+ async deploy(outputDirectory) {
94
+ const site = await getOrCreateSite({ token: this.token, name: this.projectName || `mastra`, scope: this.scope });
95
+ const p2 = execa(
96
+ "npx",
97
+ [
98
+ "netlify-cli",
99
+ "deploy",
100
+ "--site",
101
+ site.id,
102
+ "--auth",
103
+ this.token,
104
+ "--dir",
105
+ ".",
106
+ "--functions",
107
+ "./netlify/functions"
108
+ ],
109
+ {
110
+ cwd: outputDirectory
111
+ }
112
+ );
113
+ p2.stdout.pipe(process.stdout);
114
+ await p2;
115
+ }
116
+ async prepare(outputDirectory) {
117
+ await super.prepare(outputDirectory);
118
+ if (!existsSync(join(outputDirectory, "netlify/functions/api"))) {
119
+ mkdirSync(join(outputDirectory, "netlify/functions/api"), { recursive: true });
120
+ }
121
+ this.writeFiles({ dir: outputDirectory });
122
+ }
123
+ async bundle(mastraDir, outputDirectory) {
124
+ const bundler = await getBundler({
125
+ input: "#entry",
126
+ external: [/^@opentelemetry\//],
127
+ plugins: [virtual({ "#entry": this.getEntry() })]
128
+ });
129
+ await bundler.write({
130
+ inlineDynamicImports: true,
131
+ file: join(outputDirectory, "netlify", "functions", "api", "index.mjs"),
132
+ format: "es"
133
+ });
134
+ }
135
+ getEntry() {
136
+ return `
137
+ import { handle } from 'hono/netlify'
138
+ import { mastra } from '#mastra';
139
+ import { createHonoServer } from '#server';
140
+
141
+ const app = await createHonoServer(mastra);
142
+
143
+ export default handle(app)
144
+ `;
145
+ }
146
+ };
147
+
148
+ export { NetlifyDeployer };
package/package.json CHANGED
@@ -1,21 +1,14 @@
1
1
  {
2
2
  "name": "@mastra/deployer-netlify",
3
- "version": "0.0.1-alpha.9",
3
+ "version": "0.1.0-alpha.34",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
- "module": "dist/deployer-netlify.esm.js",
8
7
  "types": "dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
- "import": {
12
- "types": "./dist/index.d.ts",
13
- "default": "./dist/deployer-netlify.esm.js"
14
- },
15
- "require": {
16
- "types": "./dist/index.d.ts",
17
- "default": "./dist/index.js"
18
- }
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
19
12
  },
20
13
  "./package.json": "./package.json"
21
14
  },
@@ -23,26 +16,26 @@
23
16
  "author": "",
24
17
  "license": "ISC",
25
18
  "dependencies": {
19
+ "@rollup/plugin-virtual": "^3.0.2",
26
20
  "date-fns": "^4.1.0",
27
21
  "dotenv": "^16.3.1",
28
22
  "execa": "^9.3.1",
29
23
  "netlify-cli": "^18.0.1",
30
24
  "zod": "^3.24.1",
31
- "@mastra/core": "0.1.27-alpha.69",
32
- "@mastra/deployer": "0.0.1-alpha.8"
25
+ "@mastra/core": "^0.2.0-alpha.86",
26
+ "@mastra/deployer": "^0.1.0-alpha.32"
33
27
  },
34
28
  "devDependencies": {
35
29
  "@babel/preset-env": "^7.26.0",
36
30
  "@babel/preset-typescript": "^7.26.0",
37
31
  "@tsconfig/recommended": "^1.0.7",
38
- "@types/jsdom": "^21.1.7",
39
32
  "@types/node": "^22.9.0",
40
- "dts-cli": "^2.0.5",
41
- "vitest": "^2.1.8"
33
+ "tsup": "^8.0.1",
34
+ "vitest": "^3.0.4"
42
35
  },
43
36
  "scripts": {
44
- "build": "dts build",
45
- "build:dev": "dts watch",
37
+ "build": "tsup-node src/index.ts --format esm --dts --clean --treeshake",
38
+ "dev": "tsup-node src/index.ts --format esm --dts --clean --treeshake --watch",
46
39
  "test": "vitest run"
47
40
  }
48
41
  }
package/src/index.ts CHANGED
@@ -1,13 +1,23 @@
1
- import { MastraDeployer } from '@mastra/core';
1
+ import { Deployer } from '@mastra/deployer';
2
+ import { getBundler } from '@mastra/deployer/build';
3
+ import virtual from '@rollup/plugin-virtual';
2
4
  import { execa } from 'execa';
3
- import { existsSync, mkdirSync, renameSync, writeFileSync } from 'fs';
5
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
4
6
  import { join } from 'path';
5
7
 
6
8
  import { getOrCreateSite } from './helpers.js';
7
9
 
8
- export class NetlifyDeployer extends MastraDeployer {
9
- constructor({ scope, env, projectName }: { projectName: string; env?: Record<string, any>; scope: string }) {
10
- super({ scope, env, projectName });
10
+ export class NetlifyDeployer extends Deployer {
11
+ protected scope: string;
12
+ protected projectName: string;
13
+ protected token: string;
14
+
15
+ constructor({ scope, projectName, token }: { scope: string; projectName: string; token: string }) {
16
+ super({ name: 'NETLIFY' });
17
+
18
+ this.scope = scope;
19
+ this.projectName = projectName;
20
+ this.token = token;
11
21
  }
12
22
 
13
23
  writeFiles({ dir }: { dir: string }): void {
@@ -18,30 +28,38 @@ export class NetlifyDeployer extends MastraDeployer {
18
28
  // TODO ENV KEYS
19
29
  writeFileSync(
20
30
  join(dir, 'netlify.toml'),
21
- `
22
- [functions]
23
- node_bundler = "esbuild"
24
- directory = "/netlify/functions"
25
-
26
- [[redirects]]
27
- force = true
28
- from = "/*"
29
- status = 200
30
- to = "/.netlify/functions/api/:splat"
31
- `,
32
- );
31
+ `[functions]
32
+ node_bundler = "esbuild"
33
+ directory = "netlify/functions"
33
34
 
34
- this.writeIndex({ dir });
35
+ [[redirects]]
36
+ force = true
37
+ from = "/*"
38
+ status = 200
39
+ to = "/.netlify/functions/api/:splat"
40
+ `,
41
+ );
35
42
  }
36
43
 
37
- async deploy({ dir, token }: { dir: string; token: string }): Promise<void> {
38
- const site = await getOrCreateSite({ token, name: this.projectName || `mastra`, scope: this.scope });
44
+ async deploy(outputDirectory: string): Promise<void> {
45
+ const site = await getOrCreateSite({ token: this.token, name: this.projectName || `mastra`, scope: this.scope });
39
46
 
40
47
  const p2 = execa(
41
- 'netlify',
42
- ['deploy', '--site', site.id, '--auth', token, '--dir', '.', '--functions', './netlify/functions'],
48
+ 'npx',
49
+ [
50
+ 'netlify-cli',
51
+ 'deploy',
52
+ '--site',
53
+ site.id,
54
+ '--auth',
55
+ this.token,
56
+ '--dir',
57
+ '.',
58
+ '--functions',
59
+ './netlify/functions',
60
+ ],
43
61
  {
44
- cwd: dir,
62
+ cwd: outputDirectory,
45
63
  },
46
64
  );
47
65
 
@@ -49,23 +67,39 @@ export class NetlifyDeployer extends MastraDeployer {
49
67
  await p2;
50
68
  }
51
69
 
52
- writeIndex({ dir }: { dir: string }): void {
53
- ['mastra.mjs', 'hono.mjs', 'server.mjs'].forEach(file => {
54
- renameSync(join(dir, file), join(dir, `netlify/functions/api/${file}`));
70
+ async prepare(outputDirectory: string): Promise<void> {
71
+ await super.prepare(outputDirectory);
72
+
73
+ // Prepare the deployment directory
74
+ if (!existsSync(join(outputDirectory, 'netlify/functions/api'))) {
75
+ mkdirSync(join(outputDirectory, 'netlify/functions/api'), { recursive: true });
76
+ }
77
+ this.writeFiles({ dir: outputDirectory });
78
+ }
79
+
80
+ async bundle(mastraDir: string, outputDirectory: string): Promise<void> {
81
+ const bundler = await getBundler({
82
+ input: '#entry',
83
+ external: [/^@opentelemetry\//],
84
+ plugins: [virtual({ '#entry': this.getEntry() })],
55
85
  });
56
86
 
57
- writeFileSync(
58
- join(dir, 'netlify/functions/api/api.mts'),
59
- `
60
- export default async (req, context) => {
61
- const { app } = await import('./hono.mjs');
62
- // Pass the request directly to Hono
63
- return app.fetch(req, {
64
- // Optional context passing if needed
65
- env: { context }
66
- })
67
- }
68
- `,
69
- );
87
+ await bundler.write({
88
+ inlineDynamicImports: true,
89
+ file: join(outputDirectory, 'netlify', 'functions', 'api', 'index.mjs'),
90
+ format: 'es',
91
+ });
92
+ }
93
+
94
+ private getEntry(): string {
95
+ return `
96
+ import { handle } from 'hono/netlify'
97
+ import { mastra } from '#mastra';
98
+ import { createHonoServer } from '#server';
99
+
100
+ const app = await createHonoServer(mastra);
101
+
102
+ export default handle(app)
103
+ `;
70
104
  }
71
105
  }