@middy/util 7.3.4 → 7.5.0
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/index.js +3 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
// exclusiveMaximum?, multipleOf?, minLength?, maxLength?, pattern? }
|
|
16
16
|
// Numeric: `minimum`/`maximum` (inclusive), `exclusiveMinimum`/
|
|
17
17
|
// `exclusiveMaximum` (exclusive), `multipleOf` (number/integer).
|
|
18
|
-
// String: `minLength`/`maxLength` (string length), `pattern` (regex
|
|
18
|
+
// String: `minLength`/`maxLength` (string length), `pattern` (regex
|
|
19
|
+
// source string per JSON Schema).
|
|
19
20
|
// { type: 'object' | 'object?', properties?: {...}, additionalProperties?: <rule> }
|
|
20
21
|
// `properties` validates known keys with the flat-schema form.
|
|
21
22
|
// `additionalProperties` validates every other key's value against the
|
|
@@ -215,7 +216,7 @@ const checkRule = (rule, value, path, fail) => {
|
|
|
215
216
|
fail(`Option '${path}' must be a multiple of ${multipleOf}`);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
if (pattern !== undefined && !pattern.test(value)) {
|
|
219
|
+
if (pattern !== undefined && !new RegExp(pattern).test(value)) {
|
|
219
220
|
fail(`Option '${path}' must match pattern ${pattern}`);
|
|
220
221
|
}
|
|
221
222
|
if (minLength !== undefined && value.length < minLength) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/util",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@aws-sdk/client-ssm": "^3.0.0",
|
|
60
|
-
"@middy/core": "7.
|
|
60
|
+
"@middy/core": "7.5.0",
|
|
61
61
|
"@types/aws-lambda": "^8.0.0",
|
|
62
62
|
"@types/node": "^22.0.0",
|
|
63
63
|
"aws-xray-sdk": "^3.3.3"
|