@jaypie/mcp 0.8.74 → 0.8.76
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/constructs/1.2.65.md +14 -0
- package/release-notes/constructs/1.2.66.md +18 -0
- package/release-notes/llm/1.3.1.md +13 -0
- package/release-notes/mcp/0.8.75.md +13 -0
- package/release-notes/mcp/0.8.76.md +15 -0
- package/release-notes/testkit/1.2.45.md +17 -0
- package/skills/cdk.md +22 -0
- package/skills/mocks.md +23 -30
|
@@ -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.8.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.76#d4ee8b15"
|
|
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.65
|
|
3
|
+
date: 2026-06-18
|
|
4
|
+
summary: Stabilize JaypieEnvSecret cross-stack export name across both call forms
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- `JaypieEnvSecret` now always derives its CloudFormation cross-stack export name from the construct id, for both the shorthand and explicit `(id, { envKey })` call forms.
|
|
10
|
+
- Previously the explicit form derived the export name from `envKey`, silently renaming the export across a version bump and breaking existing `Fn::ImportValue` consumers (e.g. `env-sandbox-agents-AgentsInternalKey` became `env-sandbox-agents-AGENTSINTERNALKEY`).
|
|
11
|
+
|
|
12
|
+
## Migration
|
|
13
|
+
|
|
14
|
+
No changes required. Unchanged explicit-form call sites now keep their original id-based export name, restoring compatibility with previously published exports (issues #347, #365).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.66
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Forward DD_VERSION to the Lambda environment for Datadog version tagging
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- `jaypieLambdaEnv` now passes `DD_VERSION` through to the Lambda environment
|
|
10
|
+
when present in `process.env`, alongside the other allowlisted vars. This lets
|
|
11
|
+
projects tag telemetry with a version derived independently of
|
|
12
|
+
`PROJECT_VERSION` (e.g. from the latest git tag), which `dd-trace` reads at
|
|
13
|
+
runtime.
|
|
14
|
+
- `addDatadogLayers` now falls back the `DatadogLambda` `version` to
|
|
15
|
+
`process.env.DD_VERSION || process.env.PROJECT_VERSION`, keeping the version
|
|
16
|
+
tag consistent with the env var.
|
|
17
|
+
|
|
18
|
+
Issue: [#384](https://github.com/finlaysonstudio/jaypie/issues/384)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.3.1
|
|
3
|
+
date: 2026-06-18
|
|
4
|
+
summary: Version step to 1.3.1 to avoid conflict with an accidental 1.3.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- No functional changes. Version advances directly from `1.2.41` to `1.3.1` to step over an accidental `1.3.0` and prevent ongoing version conflicts.
|
|
10
|
+
|
|
11
|
+
## Migration
|
|
12
|
+
|
|
13
|
+
No changes required.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.75
|
|
3
|
+
date: 2026-06-18
|
|
4
|
+
summary: Document JaypieMigration in the cdk skill
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- `cdk` skill: add a Database Migrations section covering `JaypieMigration` and link to `skill("migrations")`.
|
|
10
|
+
|
|
11
|
+
## Migration
|
|
12
|
+
|
|
13
|
+
No changes required.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.76
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Correct the mocks skill to document the real @jaypie/testkit/mock pattern
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Rewrote the `mocks` skill, which documented a non-existent
|
|
10
|
+
`mockJaypie(vi)` / `mockLogger(vi)` / `mockAws(vi)` API. The working pattern
|
|
11
|
+
is `vi.mock("jaypie", async () => await import("@jaypie/testkit/mock"))`,
|
|
12
|
+
returning the flat mock namespace directly. Sub-package and export-verification
|
|
13
|
+
examples updated to match.
|
|
14
|
+
|
|
15
|
+
Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.45
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Drop the deprecated mongoose mock that broke @jaypie/testkit/mock at load time
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Removed
|
|
8
|
+
|
|
9
|
+
- **Mongoose mock dropped from the `./mock` umbrella.** `@jaypie/testkit/mock`
|
|
10
|
+
statically imported `@jaypie/mongoose` (a deprecated, undeclared phantom
|
|
11
|
+
dependency), which threw `Cannot find package '@jaypie/mongoose'` at module
|
|
12
|
+
load in any project without mongoose installed. The mock is removed entirely;
|
|
13
|
+
`jaypie` never re-exported mongoose. The `connect`, `connectFromSecretEnv`,
|
|
14
|
+
`disconnect`, and `mongoose` exports are no longer available from
|
|
15
|
+
`@jaypie/testkit/mock`.
|
|
16
|
+
|
|
17
|
+
Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
|
package/skills/cdk.md
CHANGED
|
@@ -237,6 +237,27 @@ new JaypieLambda(this, "Handler", {
|
|
|
237
237
|
|
|
238
238
|
See `skill("dynamodb")` for table key conventions and query patterns.
|
|
239
239
|
|
|
240
|
+
## Database Migrations
|
|
241
|
+
|
|
242
|
+
`JaypieMigration` runs DynamoDB migrations as a CloudFormation custom resource on every `cdk deploy`. It wraps a `JaypieLambda` in a `cr.Provider` and re-fires on the deploy nonce, so newly added migrations run on code-only deploys instead of being skipped:
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
import { JaypieDynamoDb, JaypieMigration } from "@jaypie/constructs";
|
|
246
|
+
|
|
247
|
+
const table = new JaypieDynamoDb(this, "myApp");
|
|
248
|
+
|
|
249
|
+
new JaypieMigration(this, "SeedData", {
|
|
250
|
+
code: "dist/migrations/seed",
|
|
251
|
+
handler: "index.handler",
|
|
252
|
+
tables: [table],
|
|
253
|
+
dependencies: [table], // Ensures the table exists first
|
|
254
|
+
});
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Use `migrationHandler` from `jaypie` in the migration Lambda so errors propagate as CloudFormation failures. Prefer this construct over a hand-rolled `cr.Provider` + `cdk.CustomResource`, which is easy to key on the table name alone and thereby skip the deploy-nonce re-fire.
|
|
258
|
+
|
|
259
|
+
See `skill("migrations")` for the full props table, behavior, and handler pattern.
|
|
260
|
+
|
|
240
261
|
## Lambda with Secrets
|
|
241
262
|
|
|
242
263
|
Pass secrets as strings (auto-creates `JaypieEnvSecret`) or as construct instances:
|
|
@@ -390,6 +411,7 @@ new JaypieOrganizationTrail(this, "OrgTrail", {
|
|
|
390
411
|
- **`skill("dynamodb")`** - DynamoDB key design and query patterns
|
|
391
412
|
- **`skill("express")`** - Express handler and Lambda adapter
|
|
392
413
|
- **`skill("lambda")`** - Lambda handler wrappers and lifecycle
|
|
414
|
+
- **`skill("migrations")`** - JaypieMigration DynamoDB migration custom resources
|
|
393
415
|
- **`skill("secrets")`** - Secret management with JaypieEnvSecret
|
|
394
416
|
- **`skill("streaming")`** - JaypieDistribution and JaypieNextJs streaming configuration
|
|
395
417
|
- **`skill("variables")`** - Environment variables reference
|
package/skills/mocks.md
CHANGED
|
@@ -22,11 +22,14 @@ In your test setup file:
|
|
|
22
22
|
import { vi } from "vitest";
|
|
23
23
|
|
|
24
24
|
vi.mock("jaypie", async () => {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
26
|
+
return testkit;
|
|
27
27
|
});
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
`@jaypie/testkit/mock` re-exports a vitest mock for every `jaypie` export as a
|
|
31
|
+
flat namespace, so returning it directly mocks the whole package.
|
|
32
|
+
|
|
30
33
|
Configure in vitest.config.ts:
|
|
31
34
|
|
|
32
35
|
```typescript
|
|
@@ -43,35 +46,25 @@ export default defineConfig({
|
|
|
43
46
|
|
|
44
47
|
```typescript
|
|
45
48
|
vi.mock("jaypie", async () => {
|
|
46
|
-
const
|
|
47
|
-
return
|
|
49
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
50
|
+
return testkit;
|
|
48
51
|
});
|
|
49
52
|
|
|
50
53
|
// Mocked: log, getSecret, sendMessage, etc.
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
###
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
vi.mock("@jaypie/logger", async () => {
|
|
57
|
-
const { mockLogger } = await import("@jaypie/testkit");
|
|
58
|
-
return mockLogger(vi);
|
|
59
|
-
});
|
|
60
|
-
```
|
|
56
|
+
### Sub-Packages
|
|
61
57
|
|
|
62
|
-
|
|
58
|
+
To mock an individual `@jaypie/*` package, return the relevant mocks from the
|
|
59
|
+
same flat `@jaypie/testkit/mock` namespace:
|
|
63
60
|
|
|
64
61
|
```typescript
|
|
65
|
-
vi.mock("@jaypie/
|
|
66
|
-
const
|
|
67
|
-
return
|
|
62
|
+
vi.mock("@jaypie/express", async () => {
|
|
63
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
64
|
+
return { expressHandler: testkit.expressHandler };
|
|
68
65
|
});
|
|
69
66
|
```
|
|
70
67
|
|
|
71
|
-
### Legacy Mocks
|
|
72
|
-
|
|
73
|
-
For legacy packages, see `skill("legacy")`.
|
|
74
|
-
|
|
75
68
|
## Using Mocks in Tests
|
|
76
69
|
|
|
77
70
|
### Verify Logging
|
|
@@ -158,20 +151,20 @@ afterEach(() => {
|
|
|
158
151
|
|
|
159
152
|
## Export Verification
|
|
160
153
|
|
|
161
|
-
When adding exports to
|
|
154
|
+
When adding exports to a Jaypie package, add a matching mock to testkit so the
|
|
155
|
+
auto-mock stays complete:
|
|
162
156
|
|
|
163
157
|
```typescript
|
|
164
|
-
// packages/testkit/src/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
getSecret: vi.fn().mockResolvedValue("mock"),
|
|
169
|
-
// Add new exports here
|
|
170
|
-
newFunction: vi.fn(),
|
|
171
|
-
};
|
|
172
|
-
}
|
|
158
|
+
// packages/testkit/src/mock/<package>.ts
|
|
159
|
+
import { createMockFunction } from "./utils";
|
|
160
|
+
|
|
161
|
+
export const newFunction = createMockFunction((x) => x);
|
|
173
162
|
```
|
|
174
163
|
|
|
164
|
+
Then re-export it from `src/mock/index.ts` (named export and default object) and
|
|
165
|
+
bump the testkit patch version. Missing mocks surface as failures in testkit's
|
|
166
|
+
`mock/__tests__/index.spec.ts` "all exports from original" check.
|
|
167
|
+
|
|
175
168
|
## See Also
|
|
176
169
|
|
|
177
170
|
- **`skill("errors")`** - Error types used in mock assertions
|