@middy/cloudformation-router 7.3.3 → 7.4.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.
Files changed (2) hide show
  1. package/index.js +6 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2,12 +2,15 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { validateOptions } from "@middy/util";
4
4
 
5
+ const name = "cloudformation-router";
6
+ const pkg = `@middy/${name}`;
7
+
5
8
  const defaults = {
6
9
  routes: [],
7
10
  notFoundResponse: ({ requestType }) => {
8
11
  const err = new Error("Route does not exist", {
9
12
  cause: {
10
- package: "@middy/cloudformation-router",
13
+ package: pkg,
11
14
  data: { requestType },
12
15
  },
13
16
  });
@@ -39,7 +42,7 @@ const optionSchema = {
39
42
  };
40
43
 
41
44
  export const cloudformationRouterValidateOptions = (options) =>
42
- validateOptions("@middy/cloudformation-router", optionSchema, options);
45
+ validateOptions(pkg, optionSchema, options);
43
46
  const cloudformationCustomResourceRouteHandler = (opts = {}) => {
44
47
  let options;
45
48
  if (Array.isArray(opts)) {
@@ -65,7 +68,7 @@ const cloudformationCustomResourceRouteHandler = (opts = {}) => {
65
68
  `Unknown CloudFormation Custom Resource event format: 'RequestType' must be one of Create, Update, Delete. Received: ${requestType ?? "undefined"}`,
66
69
  {
67
70
  cause: {
68
- package: "@middy/cloudformation-router",
71
+ package: pkg,
69
72
  data: { requestType },
70
73
  },
71
74
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/cloudformation-router",
3
- "version": "7.3.3",
3
+ "version": "7.4.0",
4
4
  "description": "CloudFormation Custom Response event router for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -62,7 +62,7 @@
62
62
  "url": "https://github.com/sponsors/willfarrell"
63
63
  },
64
64
  "devDependencies": {
65
- "@middy/core": "7.3.3",
65
+ "@middy/core": "7.4.0",
66
66
  "@types/aws-lambda": "^8.0.0",
67
67
  "@types/node": "^22.0.0"
68
68
  }