@middy/cloudwatch-metrics 7.3.2 → 7.3.4

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +4 -1
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  import type middy from "@middy/core";
4
4
  import type { MetricsLogger } from "aws-embedded-metrics";
5
5
  import type { Context as LambdaContext } from "aws-lambda";
6
+
6
7
  export { MetricsLogger } from "aws-embedded-metrics";
7
8
 
8
9
  export interface Options {
package/index.js CHANGED
@@ -4,6 +4,9 @@
4
4
  import { validateOptions } from "@middy/util";
5
5
  import awsEmbeddedMetrics from "aws-embedded-metrics";
6
6
 
7
+ const name = "cloudwatch-metrics";
8
+ const pkg = `@middy/${name}`;
9
+
7
10
  const defaults = {
8
11
  onFlushError: undefined,
9
12
  };
@@ -29,7 +32,7 @@ const optionSchema = {
29
32
  };
30
33
 
31
34
  export const cloudwatchMetricsValidateOptions = (options) =>
32
- validateOptions("@middy/cloudwatch-metrics", optionSchema, options);
35
+ validateOptions(pkg, optionSchema, options);
33
36
 
34
37
  const cloudwatchMetricsMiddleware = (opts = {}) => {
35
38
  const { namespace, dimensions, onFlushError } = { ...defaults, ...opts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/cloudwatch-metrics",
3
- "version": "7.3.2",
3
+ "version": "7.3.4",
4
4
  "description": "Embedded CloudWatch metrics middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -68,7 +68,7 @@
68
68
  "aws-embedded-metrics": "4.2.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@middy/core": "7.3.2",
71
+ "@middy/core": "7.3.4",
72
72
  "@types/aws-lambda": "^8.0.0",
73
73
  "@types/node": "^22.0.0"
74
74
  }