@jaypie/mcp 0.8.13 → 0.8.15
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.40.md +11 -0
- package/release-notes/dynamodb/0.4.3.md +11 -0
- package/release-notes/jaypie/1.2.30.md +9 -0
- package/release-notes/logger/1.2.11.md +14 -0
- package/release-notes/mcp/0.8.14.md +12 -0
- package/skills/cdk.md +12 -0
- package/skills/dynamodb.md +4 -0
- package/skills/force.md +115 -0
- package/skills/logs.md +19 -0
- package/skills/variables.md +1 -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.8.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.15#cf726c0a"
|
|
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,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.40
|
|
3
|
+
date: 2026-04-05
|
|
4
|
+
summary: Add managedRuleOverrides to JaypieWafConfig for overriding specific WAF rule actions
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Add `managedRuleOverrides` prop to `JaypieWafConfig` for overriding actions on specific rules within AWS managed rule groups
|
|
10
|
+
- Enables downgrading rules like `SizeRestrictions_BODY` to count mode so large webhook payloads (e.g., GitHub) are not blocked
|
|
11
|
+
- Closes #272
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.4.3
|
|
3
|
+
date: 2026-04-04
|
|
4
|
+
summary: Widen StorableEntity type to accept state and extra properties
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Added `state?: Record<string, unknown>` to `StorableEntity` for application-specific state flags
|
|
10
|
+
- Added index signature `[key: string]: unknown` so downstream entity extensions type-check without casts
|
|
11
|
+
- Fixes #270: TS2353 when passing `state` to `putEntity`, TS2739 when spreading partial updates to `updateEntity`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.11
|
|
3
|
+
date: 2026-04-04
|
|
4
|
+
summary: Add LOG_LEVEL_FIELD env var for optional level key in JSON output
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Added `LOG_LEVEL_FIELD` environment variable to optionally include log level in JSON output
|
|
10
|
+
- `true` or `1`: adds `"level": "debug"` (etc.) to JSON
|
|
11
|
+
- Custom string (e.g., `"status"`): adds that key with the level value
|
|
12
|
+
- `false`, `0`, or unset: omit level from output (default, no breaking change)
|
|
13
|
+
- Added `levelField` option to `Logger` constructor for programmatic control
|
|
14
|
+
- Applies to both regular log output and `.var()` output
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.14
|
|
3
|
+
date: 2026-04-04
|
|
4
|
+
summary: Add force skill, update logs/dynamodb/variables skills
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Added `force` skill documenting type coercion utilities
|
|
10
|
+
- Updated `logs` skill with LOG_LEVEL_FIELD documentation
|
|
11
|
+
- Updated `dynamodb` skill with StorableEntity extensibility (state, index signature)
|
|
12
|
+
- Updated `variables` skill with LOG_LEVEL_FIELD
|
package/skills/cdk.md
CHANGED
|
@@ -341,6 +341,18 @@ new JaypieDistribution(this, "Dist", {
|
|
|
341
341
|
handler,
|
|
342
342
|
waf: { logBucket: myWafBucket },
|
|
343
343
|
});
|
|
344
|
+
|
|
345
|
+
// Override specific managed rule actions (e.g., allow large request bodies)
|
|
346
|
+
new JaypieDistribution(this, "Dist", {
|
|
347
|
+
handler,
|
|
348
|
+
waf: {
|
|
349
|
+
managedRuleOverrides: {
|
|
350
|
+
AWSManagedRulesCommonRuleSet: [
|
|
351
|
+
{ name: "SizeRestrictions_BODY", actionToUse: { count: {} } },
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
});
|
|
344
356
|
```
|
|
345
357
|
|
|
346
358
|
Cost: $5/month per WebACL + $1/month per rule + $0.60 per million requests. Use `waf: false` to opt out.
|
package/skills/dynamodb.md
CHANGED
|
@@ -125,6 +125,10 @@ interface StorableEntity {
|
|
|
125
125
|
updatedAt: string;
|
|
126
126
|
archivedAt?: string;
|
|
127
127
|
deletedAt?: string;
|
|
128
|
+
|
|
129
|
+
// Extensible
|
|
130
|
+
state?: Record<string, unknown>; // Application-specific state flags
|
|
131
|
+
[key: string]: unknown; // Additional properties allowed
|
|
128
132
|
}
|
|
129
133
|
```
|
|
130
134
|
|
package/skills/force.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Type coercion utilities for safe value conversion
|
|
3
|
+
related: style, errors, variables
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Force
|
|
7
|
+
|
|
8
|
+
Coerce values to expected types without throwing. Returns sensible defaults for invalid input.
|
|
9
|
+
|
|
10
|
+
## Import
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { force } from "@jaypie/kit";
|
|
14
|
+
// or
|
|
15
|
+
import { force } from "jaypie";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Convenience Methods
|
|
19
|
+
|
|
20
|
+
### force.array(value)
|
|
21
|
+
|
|
22
|
+
Wraps non-array values in an array. Arrays pass through.
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
force.array("hello"); // ["hello"]
|
|
26
|
+
force.array([1, 2]); // [1, 2]
|
|
27
|
+
force.array(undefined); // [undefined]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### force.boolean(value)
|
|
31
|
+
|
|
32
|
+
Parses boolean with string awareness. Falsy strings: `""`, `"0"`, `"f"`, `"false"`, `"n"`, `"no"` (case-insensitive).
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
force.boolean("false"); // false
|
|
36
|
+
force.boolean("no"); // false
|
|
37
|
+
force.boolean("0"); // false
|
|
38
|
+
force.boolean(""); // false
|
|
39
|
+
force.boolean("yes"); // true
|
|
40
|
+
force.boolean("anything"); // true
|
|
41
|
+
force.boolean(0); // false
|
|
42
|
+
force.boolean(1); // true
|
|
43
|
+
force.boolean(null); // false
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### force.number(value)
|
|
47
|
+
|
|
48
|
+
Converts to number. Returns `0` for non-numeric input.
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
force.number("42"); // 42
|
|
52
|
+
force.number("abc"); // 0
|
|
53
|
+
force.number(null); // 0
|
|
54
|
+
force.number(undefined); // 0
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### force.positive(value)
|
|
58
|
+
|
|
59
|
+
Like `force.number` but clamps to minimum `0`.
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
force.positive(-5); // 0
|
|
63
|
+
force.positive("10"); // 10
|
|
64
|
+
force.positive("abc"); // 0
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### force.string(value, default?)
|
|
68
|
+
|
|
69
|
+
Converts to string. Second argument is default for `undefined`.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
force.string(42); // "42"
|
|
73
|
+
force.string(null); // "null"
|
|
74
|
+
force.string(undefined); // ""
|
|
75
|
+
force.string(undefined, "fallback"); // "fallback"
|
|
76
|
+
force.string({ a: 1 }); // '{"a":1}'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### force.object(value, key?)
|
|
80
|
+
|
|
81
|
+
Ensures object. Wraps scalars as `{ [key]: value }` (default key: `"value"`). Parses JSON strings.
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
force.object({ a: 1 }); // { a: 1 }
|
|
85
|
+
force.object(42); // { value: 42 }
|
|
86
|
+
force.object(42, "count"); // { count: 42 }
|
|
87
|
+
force.object('{"a":1}'); // { a: 1 }
|
|
88
|
+
force.object("hello"); // { value: "hello" }
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Advanced: force(value, type, options?)
|
|
92
|
+
|
|
93
|
+
The base function accepts a type constructor and options:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
force(value, Number, { minimum: 0, maximum: 100 });
|
|
97
|
+
force(value, Number, { nan: true }); // allow NaN instead of returning 0
|
|
98
|
+
force(value, String, "default"); // default for undefined
|
|
99
|
+
force(value, Object, "keyName"); // wrap key name
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Options
|
|
103
|
+
|
|
104
|
+
| Option | Type | Description |
|
|
105
|
+
|--------|------|-------------|
|
|
106
|
+
| `minimum` | `number` | Clamp number to minimum |
|
|
107
|
+
| `maximum` | `number` | Clamp number to maximum |
|
|
108
|
+
| `nan` | `boolean` | If `true`, return `NaN` instead of `0` for non-numeric input |
|
|
109
|
+
| `key` | `string` | Key name when wrapping scalar in object (default: `"value"`) |
|
|
110
|
+
|
|
111
|
+
If `minimum > maximum`, clamping is skipped.
|
|
112
|
+
|
|
113
|
+
## Testing
|
|
114
|
+
|
|
115
|
+
Mocked automatically via `@jaypie/testkit/mock` when mocking `jaypie` or `@jaypie/kit`.
|
package/skills/logs.md
CHANGED
|
@@ -72,6 +72,25 @@ LOG_LEVEL=debug npm run dev
|
|
|
72
72
|
LOG_LEVEL=trace MODULE_LOG_LEVEL=warn npm test
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
## Including Level in JSON Output
|
|
76
|
+
|
|
77
|
+
By default, the log level is not included in JSON output (Lambda determines level from the console method). To include it:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
LOG_LEVEL_FIELD=true # Adds "level": "debug" (etc.)
|
|
81
|
+
LOG_LEVEL_FIELD=status # Adds "status": "debug" (etc.)
|
|
82
|
+
LOG_LEVEL_FIELD=false # Omit (default)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Or via constructor option:
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import { Logger } from "@jaypie/logger";
|
|
89
|
+
|
|
90
|
+
const logger = new Logger({ format: "json", level: "debug", levelField: "status" });
|
|
91
|
+
logger.info("test"); // { "message": "test", "status": "info" }
|
|
92
|
+
```
|
|
93
|
+
|
|
75
94
|
## Lambda Logging
|
|
76
95
|
|
|
77
96
|
Lambda handlers automatically add context:
|
package/skills/variables.md
CHANGED
|
@@ -37,6 +37,7 @@ log.info("Starting", { env, project: key });
|
|
|
37
37
|
|----------|-------------|--------|
|
|
38
38
|
| `NODE_ENV` | Node.js environment | development, production, test |
|
|
39
39
|
| `LOG_LEVEL` | Logging verbosity | trace, debug, info, warn, error |
|
|
40
|
+
| `LOG_LEVEL_FIELD` | Include level in JSON output | `true` (adds `level` key), custom string, or `false` (default) |
|
|
40
41
|
|
|
41
42
|
### Log Level in Development
|
|
42
43
|
|