@spytecgps/lambda-utils 3.0.3 → 3.0.5

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/dist/index.js +4 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -182,7 +182,10 @@ const normalizerMiddleware = () => {
182
182
  };
183
183
  };
184
184
 
185
- const offlineAuth = ({ authFunctionName = 'spytec-web-api-auth-prod-AuthorizerFunctionV4', enabled = isOffline(), logger, }) => {
185
+ const defaultAuthFunctionName = process.env.STAGE === 'dev'
186
+ ? 'spytec-web-api-auth-dev-AuthorizerFunctionV4'
187
+ : 'spytec-web-api-auth-prod-AuthorizerFunctionV4';
188
+ const offlineAuth = ({ authFunctionName = defaultAuthFunctionName, enabled = isOffline(), logger, }) => {
186
189
  const lambdaClient = new clientLambda.LambdaClient({ region: process.env.AWS_REGION });
187
190
  return {
188
191
  before: async (request) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/lambda-utils",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "Lambda Utils",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "@middy/sqs-json-body-parser": "^2.5.7",
36
36
  "dayjs": "^1.11.13",
37
37
  "deepmerge": "^4.3.1",
38
- "joi": "^17.13.3",
38
+ "joi": "^18.0.1",
39
39
  "qs": "^6.10.1"
40
40
  },
41
41
  "peerDependencies": {