@middy/util 4.5.1 → 4.5.2

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.cjs +3 -3
  2. package/index.js +3 -3
  3. package/package.json +3 -3
package/index.cjs CHANGED
@@ -53,7 +53,7 @@ _export(exports, {
53
53
  }
54
54
  });
55
55
  const createPrefetchClient = (options)=>{
56
- const { awsClientOptions } = options;
56
+ const { awsClientOptions } = options;
57
57
  const client = new options.AwsClient(awsClientOptions);
58
58
  if (options.awsClientCapture && options.disablePrefetch) {
59
59
  return options.awsClientCapture(client);
@@ -130,7 +130,7 @@ const sanitizeKey = (key)=>{
130
130
  };
131
131
  const cache = {};
132
132
  const processCache = (options, fetch = ()=>undefined, request)=>{
133
- const { cacheExpiry , cacheKey } = options;
133
+ const { cacheExpiry, cacheKey } = options;
134
134
  if (cacheExpiry) {
135
135
  const cached = getCache(cacheKey);
136
136
  const unexpired = cached.expiry && (cacheExpiry < 0 || cached.expiry > Date.now());
@@ -206,7 +206,7 @@ const jsonSafeStringify = (value, replacer, space)=>{
206
206
  return value;
207
207
  };
208
208
  const normalizeHttpResponse = (request)=>{
209
- let { response } = request;
209
+ let { response } = request;
210
210
  if (typeof response === 'undefined') {
211
211
  response = {};
212
212
  } else if (typeof response?.statusCode === 'undefined' && typeof response?.body === 'undefined' && typeof response?.headers === 'undefined') {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const createPrefetchClient = (options)=>{
2
- const { awsClientOptions } = options;
2
+ const { awsClientOptions } = options;
3
3
  const client = new options.AwsClient(awsClientOptions);
4
4
  if (options.awsClientCapture && options.disablePrefetch) {
5
5
  return options.awsClientCapture(client);
@@ -76,7 +76,7 @@ export const sanitizeKey = (key)=>{
76
76
  };
77
77
  const cache = {};
78
78
  export const processCache = (options, fetch = ()=>undefined, request)=>{
79
- const { cacheExpiry , cacheKey } = options;
79
+ const { cacheExpiry, cacheKey } = options;
80
80
  if (cacheExpiry) {
81
81
  const cached = getCache(cacheKey);
82
82
  const unexpired = cached.expiry && (cacheExpiry < 0 || cached.expiry > Date.now());
@@ -152,7 +152,7 @@ export const jsonSafeStringify = (value, replacer, space)=>{
152
152
  return value;
153
153
  };
154
154
  export const normalizeHttpResponse = (request)=>{
155
- let { response } = request;
155
+ let { response } = request;
156
156
  if (typeof response === 'undefined') {
157
157
  response = {};
158
158
  } else if (typeof response?.statusCode === 'undefined' && typeof response?.body === 'undefined' && typeof response?.headers === 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/util",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",
5
5
  "type": "module",
6
6
  "engines": {
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-ssm": "^3.0.0",
64
- "@middy/core": "4.5.1",
64
+ "@middy/core": "4.5.2",
65
65
  "@types/aws-lambda": "^8.10.76",
66
66
  "@types/node": "^20.0.0",
67
67
  "aws-xray-sdk": "^3.3.3"
@@ -71,5 +71,5 @@
71
71
  "type": "github",
72
72
  "url": "https://github.com/sponsors/willfarrell"
73
73
  },
74
- "gitHead": "f6b1c999a7e716b19535ee38070bb3839395c52a"
74
+ "gitHead": "ab0fe0f6a6c27b8f2b7b0e6fbde5a7de3b3b00d6"
75
75
  }