@mastra/deployer-netlify 0.0.0-error-handler-fix-20251020202607 → 0.0.0-esbuild-bundle-worker-20260807182016

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/LICENSE.md CHANGED
@@ -1,3 +1,18 @@
1
+ Portions of this software are licensed as follows:
2
+
3
+ - All content that resides under any directory named "ee/" within this
4
+ repository, including but not limited to:
5
+ - `packages/core/src/auth/ee/`
6
+ - `packages/server/src/server/auth/ee/`
7
+ is licensed under the license defined in `ee/LICENSE`.
8
+
9
+ - All third-party components incorporated into the Mastra Software are
10
+ licensed under the original license provided by the owner of the
11
+ applicable component.
12
+
13
+ - Content outside of the above-mentioned directories or restrictions is
14
+ available under the "Apache License 2.0" as defined below.
15
+
1
16
  # Apache License 2.0
2
17
 
3
18
  Copyright (c) 2025 Kepler Software, Inc.
package/README.md CHANGED
@@ -5,14 +5,14 @@ A Netlify deployer for Mastra applications.
5
5
  ## Features
6
6
 
7
7
  - Deploy Mastra applications to Netlify Functions
8
- - Automatic site creation and configuration
9
- - Serverless function support with Edge Functions
10
- - Zero-configuration deployments
8
+ - Generates Netlify Frameworks API configuration during build
9
+ - Bundles functions with optimized settings for serverless environments
10
+ - Routes all requests through a single API endpoint
11
11
 
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- pnpm add @mastra/deployer-netlify
15
+ npm install @mastra/deployer-netlify
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -20,69 +20,83 @@ pnpm add @mastra/deployer-netlify
20
20
  The Netlify deployer is used as part of the Mastra framework:
21
21
 
22
22
  ```typescript
23
- import { Mastra } from '@mastra/core';
23
+ import { Mastra } from '@mastra/core/mastra';
24
24
  import { NetlifyDeployer } from '@mastra/deployer-netlify';
25
25
 
26
- const deployer = new NetlifyDeployer({
27
- scope: 'your-team-id',
28
- projectName: 'your-project-name',
29
- token: 'your-netlify-token',
30
- });
31
-
32
26
  const mastra = new Mastra({
33
- deployer,
34
- // ... other Mastra configuration options
27
+ deployer: new NetlifyDeployer(),
35
28
  });
36
29
  ```
37
30
 
38
- ## Configuration
39
-
40
- ### Constructor Options
41
-
42
- - `scope` (required): Your Netlify team slug or ID
43
- - `projectName`: Name of your Netlify site (will be created if it doesn't exist)
44
- - `token`: Your Netlify authentication token
45
-
46
31
  ## Project Structure
47
32
 
48
33
  The deployer automatically creates the following structure:
49
34
 
50
- ```
35
+ ```bash
51
36
  your-project/
52
- ├── netlify/
53
- │ └── functions/
54
- │ └── api/
55
- └── netlify.toml
37
+ └── .netlify/
38
+ └── v1/
39
+ ├── config.json
40
+ └── functions/
41
+ └── api/
42
+ ├── index.js
43
+ ├── package.json
44
+ └── node_modules/
56
45
  ```
57
46
 
58
- ### netlify.toml Configuration
47
+ ### Netlify Frameworks API Configuration
48
+
49
+ The deployer uses Netlify's [Frameworks API](https://docs.netlify.com/build/frameworks/frameworks-api/) and generates a `.netlify/v1/config.json` file to configure functions and routing for Netlify.
50
+
51
+ Generated configuration:
52
+
53
+ ```json
54
+ {
55
+ "functions": {
56
+ "directory": ".netlify/v1/functions",
57
+ "node_bundler": "none",
58
+ "included_files": [".netlify/v1/functions/**"]
59
+ },
60
+ "redirects": [
61
+ {
62
+ "force": true,
63
+ "from": "/*",
64
+ "to": "/.netlify/functions/api/:splat",
65
+ "status": 200
66
+ }
67
+ ]
68
+ }
69
+ ```
59
70
 
60
- The deployer creates a `netlify.toml` with the following defaults:
71
+ This configuration:
61
72
 
62
- ```toml
63
- [functions]
64
- node_bundler = "esbuild"
65
- directory = "/netlify/functions"
73
+ - Tells Netlify where to find your functions
74
+ - Disables Netlify's bundling (Mastra pre-bundles for optimization)
75
+ - Routes all requests to your Mastra API function
66
76
 
67
- [[redirects]]
68
- force = true
69
- from = "/*"
70
- status = 200
71
- to = "/.netlify/functions/api/:splat"
72
- ```
77
+ ## How It Works
78
+
79
+ The Netlify deployer:
80
+
81
+ 1. **Bundles your Mastra application** into optimized serverless functions
82
+ 2. **Creates the Frameworks API configuration** automatically
83
+ 3. **Handles all routing** through a single API endpoint
84
+ 4. **Pre-optimizes dependencies** for serverless environments
73
85
 
74
86
  ## Environment Variables
75
87
 
76
- Environment variables are handled automatically through:
88
+ Environment variables are handled through:
77
89
 
78
90
  - `.env` files in your project
79
- - Environment variables passed through the Mastra configuration
80
- - Netlify's environment variable UI
91
+ - Netlify's environment variable dashboard
92
+ - Runtime environment variable access in your Mastra app
93
+
94
+ ## Deployment
81
95
 
82
- ## Deployment Process
96
+ Deploy your Mastra application to Netlify by:
83
97
 
84
- The deployer will:
98
+ 1. **Building locally**: Run your build command (the deployer handles bundling)
99
+ 2. **Using Netlify CLI**: `netlify deploy --prod`
100
+ 3. **Via Git integration**: Connect your repository to Netlify for automatic deployments
85
101
 
86
- 1. Create a new site if it doesn't exist
87
- 2. Configure the site with your environment variables
88
- 3. Deploy your application to Netlify Functions
102
+ The deployer automatically configures everything needed for Netlify Functions.