quidproquo-actionprocessor-awslambda 0.0.240 → 0.0.241

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.
@@ -9,8 +9,8 @@ const randomGuid = () => {
9
9
  };
10
10
  exports.randomGuid = randomGuid;
11
11
  const matchUrl = (path, url) => {
12
- console.log('Matching (path): ', path);
13
- console.log('Matching (url): ', url);
12
+ // console.log('Matching (path): ', path);
13
+ // console.log('Matching (url): ', url);
14
14
  // /attempt/{attemptUuid}/result/{test} => /attempt/:attemptUuid/result/:test
15
15
  const modifiedPath = path.replaceAll(/{(.+?)}/g, (m, g) => `:${g}`);
16
16
  const matchResult = (0, node_match_path_1.match)(modifiedPath, url);
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getEventGetRecordsActionProcessor = void 0;
13
13
  const quidproquo_core_1 = require("quidproquo-core");
14
14
  const quidproquo_webserver_1 = require("quidproquo-webserver");
15
+ const types_1 = require("./types");
15
16
  const awsToQoqEventTypeMap = {
16
17
  MESSAGE: quidproquo_webserver_1.WebSocketEventType.Message,
17
18
  CONNECT: quidproquo_webserver_1.WebSocketEventType.Connect,
@@ -28,6 +29,7 @@ const getProcessGetRecords = (qpqConfig) => {
28
29
  userAgent: websocketEvent.requestContext.identity.userAgent,
29
30
  requestTime: new Date(websocketEvent.requestContext.requestTimeEpoch).toISOString(),
30
31
  body: websocketEvent.body,
32
+ apiName: types_1.GLOBAL_WEBSOCKET_API_NAME,
31
33
  };
32
34
  return (0, quidproquo_core_1.actionResult)([internalEventRecord]);
33
35
  });
@@ -32,7 +32,6 @@ const cognitoChallengeNameTypeToQpqAuthenticateUserChallenge = (cognitoChallenge
32
32
  };
33
33
  exports.cognitoChallengeNameTypeToQpqAuthenticateUserChallenge = cognitoChallengeNameTypeToQpqAuthenticateUserChallenge;
34
34
  const cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo = (authResponse, issueDateTime) => {
35
- console.log('authResponse XYZ', authResponse);
36
35
  const res = {
37
36
  session: authResponse.Session,
38
37
  challenge: (0, exports.cognitoChallengeNameTypeToQpqAuthenticateUserChallenge)(authResponse.ChallengeName),
@@ -5,8 +5,8 @@ export const randomGuid = () => {
5
5
  return randomUUID();
6
6
  };
7
7
  export const matchUrl = (path, url) => {
8
- console.log('Matching (path): ', path);
9
- console.log('Matching (url): ', url);
8
+ // console.log('Matching (path): ', path);
9
+ // console.log('Matching (url): ', url);
10
10
  // /attempt/{attemptUuid}/result/{test} => /attempt/:attemptUuid/result/:test
11
11
  const modifiedPath = path.replaceAll(/{(.+?)}/g, (m, g) => `:${g}`);
12
12
  const matchResult = match(modifiedPath, url);
@@ -1,5 +1,6 @@
1
1
  import { actionResult, EventActionType, } from 'quidproquo-core';
2
2
  import { WebSocketEventType } from 'quidproquo-webserver';
3
+ import { GLOBAL_WEBSOCKET_API_NAME } from './types';
3
4
  const awsToQoqEventTypeMap = {
4
5
  MESSAGE: WebSocketEventType.Message,
5
6
  CONNECT: WebSocketEventType.Connect,
@@ -16,6 +17,7 @@ const getProcessGetRecords = (qpqConfig) => {
16
17
  userAgent: websocketEvent.requestContext.identity.userAgent,
17
18
  requestTime: new Date(websocketEvent.requestContext.requestTimeEpoch).toISOString(),
18
19
  body: websocketEvent.body,
20
+ apiName: GLOBAL_WEBSOCKET_API_NAME,
19
21
  };
20
22
  return actionResult([internalEventRecord]);
21
23
  };
@@ -27,7 +27,6 @@ export const cognitoChallengeNameTypeToQpqAuthenticateUserChallenge = (cognitoCh
27
27
  return challenge;
28
28
  };
29
29
  export const cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo = (authResponse, issueDateTime) => {
30
- console.log('authResponse XYZ', authResponse);
31
30
  const res = {
32
31
  session: authResponse.Session,
33
32
  challenge: cognitoChallengeNameTypeToQpqAuthenticateUserChallenge(authResponse.ChallengeName),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-actionprocessor-awslambda",
3
- "version": "0.0.240",
3
+ "version": "0.0.241",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -55,9 +55,9 @@
55
55
  "lodash": "^4.17.21",
56
56
  "node-cache": "^5.1.2",
57
57
  "node-match-path": "^0.6.3",
58
- "quidproquo-config-aws": "0.0.240",
59
- "quidproquo-core": "0.0.240",
60
- "quidproquo-webserver": "0.0.240"
58
+ "quidproquo-config-aws": "0.0.241",
59
+ "quidproquo-core": "0.0.241",
60
+ "quidproquo-webserver": "0.0.241"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/aws-lambda": "^8.10.109",
@@ -65,7 +65,7 @@
65
65
  "@types/jsonwebtoken": "^9.0.2",
66
66
  "@types/lodash": "^4.14.194",
67
67
  "@types/node": "^18.11.9",
68
- "quidproquo-tsconfig": "0.0.240",
68
+ "quidproquo-tsconfig": "0.0.241",
69
69
  "typescript": "^4.9.3"
70
70
  }
71
71
  }