@jaypie/mcp 0.7.11 → 0.7.12
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/suites/docs/index.js +1 -1
- package/package.json +1 -1
- package/release-notes/express/1.2.11.md +14 -0
- package/release-notes/jaypie/1.2.9.md +9 -0
- package/release-notes/mcp/0.7.12.md +15 -0
- package/skills/cdk.md +13 -0
- package/skills/express.md +65 -0
- package/skills/lambda.md +30 -0
|
@@ -9,7 +9,7 @@ import { gt } from 'semver';
|
|
|
9
9
|
/**
|
|
10
10
|
* Docs Suite - Documentation services (skill, version, release_notes)
|
|
11
11
|
*/
|
|
12
|
-
const BUILD_VERSION_STRING = "@jaypie/mcp@0.7.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.7.12#296dcaf4"
|
|
13
13
|
;
|
|
14
14
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname$1 = path.dirname(__filename$1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.11
|
|
3
|
+
date: 2025-02-03
|
|
4
|
+
summary: Fix Lambda streaming for 204 No Content responses and remove deprecated CDK feature flag
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Fixes
|
|
8
|
+
|
|
9
|
+
- **Lambda Streaming**: Fixed 204 No Content responses not being properly handled in streaming mode
|
|
10
|
+
- **CDK Compatibility**: Removed deprecated CDKv1 `grantWriteWithoutAcl` feature flag
|
|
11
|
+
|
|
12
|
+
## Internal
|
|
13
|
+
|
|
14
|
+
- Diagnostic headers added during debugging have been removed
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.7.12
|
|
3
|
+
date: 2025-02-03
|
|
4
|
+
summary: Add ESM Lambda deployment documentation to express, lambda, and cdk skills
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
- **express skill**: Added "Lambda ESM Bundling" section with full esbuild config for `.mjs` output
|
|
10
|
+
- **lambda skill**: Added "ESM Deployment" section explaining `.mjs` vs `package.json` approaches
|
|
11
|
+
- **cdk skill**: Added "Pre-built Code" section for JaypieLambda with `code` prop
|
|
12
|
+
|
|
13
|
+
## Key Pattern
|
|
14
|
+
|
|
15
|
+
Use `.mjs` extension for ESM Lambda bundles - Node.js always treats `.mjs` as ESM regardless of `package.json`.
|
package/skills/cdk.md
CHANGED
|
@@ -34,6 +34,19 @@ const handler = new JaypieLambda(this, "ApiHandler", {
|
|
|
34
34
|
});
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
#### Pre-built Code
|
|
38
|
+
|
|
39
|
+
When using `code` instead of `entry` for pre-built bundles:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
new JaypieLambda(this, "Api", {
|
|
43
|
+
code: "../api/dist", // Pre-built bundle directory
|
|
44
|
+
handler: "index.handler", // Lambda finds index.mjs automatically
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For ESM bundles, use `.mjs` extension or include `package.json` with `"type": "module"` in dist. See `skill("express")` for full esbuild config.
|
|
49
|
+
|
|
37
50
|
### JaypieQueue
|
|
38
51
|
|
|
39
52
|
SQS queue with DLQ and Lambda trigger:
|
package/skills/express.md
CHANGED
|
@@ -153,6 +153,71 @@ new JaypieLambda(this, "Api", {
|
|
|
153
153
|
|
|
154
154
|
The package includes Docker/SAM CLI setups for local testing in `packages/express/docker/`. See that directory's documentation for details.
|
|
155
155
|
|
|
156
|
+
## Lambda ESM Bundling
|
|
157
|
+
|
|
158
|
+
When deploying Express to Lambda with ESM, use esbuild with `.mjs` output.
|
|
159
|
+
|
|
160
|
+
### Config File Approach
|
|
161
|
+
|
|
162
|
+
Create `esbuild.config.mjs`:
|
|
163
|
+
|
|
164
|
+
```javascript
|
|
165
|
+
import { build } from "esbuild";
|
|
166
|
+
import { builtinModules } from "module";
|
|
167
|
+
|
|
168
|
+
await build({
|
|
169
|
+
entryPoints: ["index.ts"],
|
|
170
|
+
bundle: true,
|
|
171
|
+
minify: true,
|
|
172
|
+
platform: "node",
|
|
173
|
+
target: "node24",
|
|
174
|
+
format: "esm",
|
|
175
|
+
outfile: "dist/index.mjs",
|
|
176
|
+
external: [
|
|
177
|
+
"@aws-sdk/*",
|
|
178
|
+
...builtinModules,
|
|
179
|
+
...builtinModules.map(m => `node:${m}`),
|
|
180
|
+
],
|
|
181
|
+
banner: {
|
|
182
|
+
js: `import { createRequire } from "module";
|
|
183
|
+
import { fileURLToPath } from "url";
|
|
184
|
+
import { dirname } from "path";
|
|
185
|
+
const require = createRequire(import.meta.url);
|
|
186
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
187
|
+
const __dirname = dirname(__filename);`,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Add to package.json:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"scripts": {
|
|
197
|
+
"build": "node esbuild.config.mjs"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Why .mjs?
|
|
203
|
+
|
|
204
|
+
Node.js always treats `.mjs` files as ESM, regardless of `package.json`. No need to emit extra files.
|
|
205
|
+
|
|
206
|
+
### Why createRequire banner?
|
|
207
|
+
|
|
208
|
+
Some dependencies use `require()` even when bundled. The banner provides CommonJS shims for `require`, `__filename`, and `__dirname`.
|
|
209
|
+
|
|
210
|
+
### CDK Integration
|
|
211
|
+
|
|
212
|
+
Reference the `.mjs` file in your CDK stack:
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
new JaypieLambda(this, "Api", {
|
|
216
|
+
code: "../api/dist", // Pre-built bundle
|
|
217
|
+
handler: "index.handler", // Lambda finds index.mjs automatically
|
|
218
|
+
});
|
|
219
|
+
```
|
|
220
|
+
|
|
156
221
|
## See Also
|
|
157
222
|
|
|
158
223
|
- **`skill("streaming")`** - Full guide to `expressStreamHandler` and `createLambdaStreamHandler`
|
package/skills/lambda.md
CHANGED
|
@@ -158,6 +158,36 @@ new JaypieLambda(this, "Handler", {
|
|
|
158
158
|
});
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
+
## ESM Deployment
|
|
162
|
+
|
|
163
|
+
Lambda handlers using ESM require Node.js to recognize the module format.
|
|
164
|
+
|
|
165
|
+
### Recommended: Use .mjs extension
|
|
166
|
+
|
|
167
|
+
Files with `.mjs` extension are always treated as ESM by Node.js. Bundle with esbuild:
|
|
168
|
+
|
|
169
|
+
```javascript
|
|
170
|
+
await build({
|
|
171
|
+
format: "esm",
|
|
172
|
+
outfile: "dist/index.mjs",
|
|
173
|
+
// ...
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
See `skill("express")` for the full esbuild config including the createRequire banner.
|
|
178
|
+
|
|
179
|
+
### Alternative: Emit package.json
|
|
180
|
+
|
|
181
|
+
If using `.js` extension, include `{"type":"module"}` in the dist folder.
|
|
182
|
+
|
|
183
|
+
### Why This Matters
|
|
184
|
+
|
|
185
|
+
Without the ESM signal, Lambda fails with:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Runtime.UserCodeSyntaxError: SyntaxError: Cannot use import statement outside a module
|
|
189
|
+
```
|
|
190
|
+
|
|
161
191
|
## See Also
|
|
162
192
|
|
|
163
193
|
- **`skill("streaming")`** - Full guide to `lambdaStreamHandler`, formats, and streaming utilities
|