quidproquo-actionprocessor-awslambda 0.0.244 → 0.0.246

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.
@@ -22,6 +22,7 @@ const getProcessExecuteStory = (qpqConfig) => {
22
22
  if (!story) {
23
23
  return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotFound, `Unable to dynamically load: [${payload.runtime}]`);
24
24
  }
25
+ const functionKey = (0, quidproquo_core_1.getUniqueKeyFromQpqFunctionRuntime)(payload.runtime);
25
26
  const resolveStory = (0, quidproquo_core_1.createRuntime)(qpqConfig, {
26
27
  context: ((_a = payload.storySession) === null || _a === void 0 ? void 0 : _a.context) || session.context,
27
28
  depth: (((_b = payload.storySession) === null || _b === void 0 ? void 0 : _b.depth) || session.depth || 0) + 1,
@@ -29,10 +30,10 @@ const getProcessExecuteStory = (qpqConfig) => {
29
30
  correlation: ((_d = payload.storySession) === null || _d === void 0 ? void 0 : _d.correlation) || session.correlation,
30
31
  }, () => __awaiter(void 0, void 0, void 0, function* () { return actionProcessors; }), exports.getDateNow, logger,
31
32
  // TODO: Share this logic.
32
- `${moduleName}::${(0, awsLambdaUtils_1.randomGuid)()}`, quidproquo_core_1.QpqRuntimeType.EXECUTE_STORY, dynamicModuleLoader, [payload.runtime]);
33
+ `${moduleName}::${(0, awsLambdaUtils_1.randomGuid)()}`, quidproquo_core_1.QpqRuntimeType.EXECUTE_STORY, dynamicModuleLoader, [functionKey]);
33
34
  const storyResult = yield resolveStory(story, payload.params);
34
35
  if (storyResult.error) {
35
- return (0, quidproquo_core_1.actionResultError)(storyResult.error.errorType, storyResult.error.errorText, storyResult.error.errorStack ? `${payload.runtime} -> [${storyResult.error.errorStack}]` : payload.runtime);
36
+ return (0, quidproquo_core_1.actionResultError)(storyResult.error.errorType, storyResult.error.errorText, storyResult.error.errorStack ? `${functionKey} -> [${storyResult.error.errorStack}]` : functionKey);
36
37
  }
37
38
  return (0, quidproquo_core_1.actionResult)(storyResult.result);
38
39
  });
@@ -1 +1,2 @@
1
- export declare const dynamicModuleLoader: <T = any>(modulePath: string) => Promise<T>;
1
+ import { QpqFunctionRuntime } from 'quidproquo-core';
2
+ export declare const dynamicModuleLoader: <T = any>(modulePath: QpqFunctionRuntime) => Promise<T>;
@@ -1,4 +1,4 @@
1
- import { actionResult, actionResultError, createRuntime, ErrorTypeEnum, qpqCoreUtils, QpqRuntimeType, SystemActionType, } from 'quidproquo-core';
1
+ import { actionResult, actionResultError, createRuntime, ErrorTypeEnum, getUniqueKeyFromQpqFunctionRuntime, qpqCoreUtils, QpqRuntimeType, SystemActionType, } from 'quidproquo-core';
2
2
  import { randomGuid } from '../../../awsLambdaUtils';
3
3
  export const getDateNow = () => new Date().toISOString();
4
4
  const getProcessExecuteStory = (qpqConfig) => {
@@ -8,6 +8,7 @@ const getProcessExecuteStory = (qpqConfig) => {
8
8
  if (!story) {
9
9
  return actionResultError(ErrorTypeEnum.NotFound, `Unable to dynamically load: [${payload.runtime}]`);
10
10
  }
11
+ const functionKey = getUniqueKeyFromQpqFunctionRuntime(payload.runtime);
11
12
  const resolveStory = createRuntime(qpqConfig, {
12
13
  context: payload.storySession?.context || session.context,
13
14
  depth: (payload.storySession?.depth || session.depth || 0) + 1,
@@ -15,10 +16,10 @@ const getProcessExecuteStory = (qpqConfig) => {
15
16
  correlation: payload.storySession?.correlation || session.correlation,
16
17
  }, async () => actionProcessors, getDateNow, logger,
17
18
  // TODO: Share this logic.
18
- `${moduleName}::${randomGuid()}`, QpqRuntimeType.EXECUTE_STORY, dynamicModuleLoader, [payload.runtime]);
19
+ `${moduleName}::${randomGuid()}`, QpqRuntimeType.EXECUTE_STORY, dynamicModuleLoader, [functionKey]);
19
20
  const storyResult = await resolveStory(story, payload.params);
20
21
  if (storyResult.error) {
21
- return actionResultError(storyResult.error.errorType, storyResult.error.errorText, storyResult.error.errorStack ? `${payload.runtime} -> [${storyResult.error.errorStack}]` : payload.runtime);
22
+ return actionResultError(storyResult.error.errorType, storyResult.error.errorText, storyResult.error.errorStack ? `${functionKey} -> [${storyResult.error.errorStack}]` : functionKey);
22
23
  }
23
24
  return actionResult(storyResult.result);
24
25
  };
@@ -1 +1,2 @@
1
- export declare const dynamicModuleLoader: <T = any>(modulePath: string) => Promise<T>;
1
+ import { QpqFunctionRuntime } from 'quidproquo-core';
2
+ export declare const dynamicModuleLoader: <T = any>(modulePath: QpqFunctionRuntime) => Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-actionprocessor-awslambda",
3
- "version": "0.0.244",
3
+ "version": "0.0.246",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -32,21 +32,21 @@
32
32
  },
33
33
  "homepage": "https://github.com/joe-coady/quidproquo#readme",
34
34
  "dependencies": {
35
- "@aws-sdk/client-acm": "^3.621.0",
36
- "@aws-sdk/client-api-gateway": "^3.621.0",
37
- "@aws-sdk/client-apigatewaymanagementapi": "^3.621.0",
38
- "@aws-sdk/client-cloudformation": "^3.621.0",
39
- "@aws-sdk/client-cloudfront": "^3.621.0",
40
- "@aws-sdk/client-cognito-identity-provider": "^3.621.0",
41
- "@aws-sdk/client-dynamodb": "^3.621.0",
42
- "@aws-sdk/client-lambda": "^3.621.0",
43
- "@aws-sdk/client-neptune": "^3.658.1",
44
- "@aws-sdk/client-s3": "^3.621.0",
45
- "@aws-sdk/client-secrets-manager": "^3.621.0",
46
- "@aws-sdk/client-sns": "^3.621.0",
47
- "@aws-sdk/client-sqs": "^3.621.0",
48
- "@aws-sdk/client-ssm": "^3.621.0",
49
- "@aws-sdk/s3-request-presigner": "^3.621.0",
35
+ "@aws-sdk/client-acm": "^3.744.0",
36
+ "@aws-sdk/client-api-gateway": "^3.744.0",
37
+ "@aws-sdk/client-apigatewaymanagementapi": "^3.744.0",
38
+ "@aws-sdk/client-cloudformation": "^3.744.0",
39
+ "@aws-sdk/client-cloudfront": "^3.744.0",
40
+ "@aws-sdk/client-cognito-identity-provider": "^3.744.0",
41
+ "@aws-sdk/client-dynamodb": "^3.744.0",
42
+ "@aws-sdk/client-lambda": "^3.744.0",
43
+ "@aws-sdk/client-neptune": "^3.744.0",
44
+ "@aws-sdk/client-s3": "^3.744.0",
45
+ "@aws-sdk/client-secrets-manager": "^3.744.0",
46
+ "@aws-sdk/client-sns": "^3.744.0",
47
+ "@aws-sdk/client-sqs": "^3.744.0",
48
+ "@aws-sdk/client-ssm": "^3.744.0",
49
+ "@aws-sdk/s3-request-presigner": "^3.744.0",
50
50
  "aws-jwt-verify": "^3.4.0",
51
51
  "aws-sdk": "^2.1322.0",
52
52
  "busboy": "^1.6.0",
@@ -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.244",
59
- "quidproquo-core": "0.0.244",
60
- "quidproquo-webserver": "0.0.244"
58
+ "quidproquo-config-aws": "0.0.246",
59
+ "quidproquo-core": "0.0.246",
60
+ "quidproquo-webserver": "0.0.246"
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.244",
68
+ "quidproquo-tsconfig": "0.0.246",
69
69
  "typescript": "^4.9.3"
70
70
  }
71
71
  }