quidproquo-actionprocessor-awslambda 0.0.172 → 0.0.174

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.
package/README.md CHANGED
@@ -1,7 +1,118 @@
1
1
  # quidproquo-actionprocessor-awslambda
2
2
 
3
- generic action processors for awslambda
3
+ The `quidproquo-actionprocessor-awslambda` library is a key component of the quidproquo framework,
4
+ providing a set of generic action processors for AWS Lambda. This library serves as the bridge
5
+ between the core quidproquo functionality and the AWS Lambda runtime, enabling the execution of
6
+ quidproquo-based applications on the AWS Lambda platform.
4
7
 
5
- ### Note
8
+ ## WARNING: NOT FOR PRODUCTION
6
9
 
7
- Currently under development ~ Not for production
10
+ **This project is currently under active development and should not be used in production
11
+ environments. The APIs and functionality are subject to change without notice.**
12
+
13
+ ## Key Features
14
+
15
+ 1. **Action-Oriented Architecture**: The `quidproquo-actionprocessor-awslambda` library aligns with
16
+ the action-oriented architecture of the quidproquo framework, allowing for the seamless execution
17
+ of quidproquo actions within the AWS Lambda environment.
18
+
19
+ 2. **Event Handling**: The library provides specialized action processors for handling various event
20
+ types, such as API Gateway events, CloudFront events, SQS events, and more. This enables the
21
+ integration of quidproquo-based applications with a wide range of AWS services.
22
+
23
+ 3. **Configuration Management**: The library includes action processors for managing quidproquo
24
+ configuration, including the retrieval of secrets, parameters, and global values from AWS
25
+ services like Secrets Manager and Systems Manager Parameter Store.
26
+
27
+ 4. **File Management**: The library offers action processors for interacting with Amazon S3,
28
+ allowing for the reading, writing, and management of files and directories within the quidproquo
29
+ application.
30
+
31
+ 5. **User Directory Integration**: The library includes action processors for integrating with
32
+ Amazon Cognito, enabling user authentication, user management, and access control within
33
+ quidproquo-based applications.
34
+
35
+ 6. **Event Bus Integration**: The library provides action processors for publishing and subscribing
36
+ to events using Amazon EventBridge, facilitating cross-service communication and event-driven
37
+ architectures.
38
+
39
+ 7. **Key-Value Store Integration**: The library includes action processors for interacting with
40
+ Amazon DynamoDB, enabling the use of key-value stores within quidproquo applications.
41
+
42
+ 8. **Logging and Observability**: The library integrates with the quidproquo logging and
43
+ observability features, ensuring that application logs and metrics are captured and made
44
+ available for monitoring and troubleshooting.
45
+
46
+ 9. **Extensibility**: The library is designed to be highly extensible, allowing developers to create
47
+ custom action processors to meet their specific requirements.
48
+
49
+ ## Key Concepts
50
+
51
+ 1. **Action Processors**: Action processors are the core components of the
52
+ `quidproquo-actionprocessor-awslambda` library, responsible for executing quidproquo actions
53
+ within the AWS Lambda environment. These processors handle the integration with various AWS
54
+ services and ensure the correct execution of quidproquo actions.
55
+
56
+ 2. **Event Handling**: The library provides specialized action processors for handling different
57
+ event types, such as API Gateway events, CloudFront events, SQS events, and more. These
58
+ processors transform the event data into a format that can be consumed by the quidproquo runtime
59
+ and execute the appropriate quidproquo actions.
60
+
61
+ 3. **Configuration Management**: The library includes action processors for retrieving and managing
62
+ quidproquo configuration data, such as secrets, parameters, and global values, from AWS services
63
+ like Secrets Manager and Systems Manager Parameter Store.
64
+
65
+ 4. **File Management**: The file management action processors enable the reading, writing, and
66
+ management of files and directories within the quidproquo application, using Amazon S3 as the
67
+ underlying storage service.
68
+
69
+ 5. **User Directory Integration**: The user directory integration action processors handle the
70
+ integration with Amazon Cognito, allowing for user authentication, user management, and access
71
+ control within quidproquo-based applications.
72
+
73
+ 6. **Event Bus Integration**: The event bus integration action processors facilitate the publishing
74
+ and subscribing of events using Amazon EventBridge, enabling cross-service communication and
75
+ event-driven architectures within quidproquo applications.
76
+
77
+ 7. **Key-Value Store Integration**: The key-value store integration action processors provide the
78
+ ability to interact with Amazon DynamoDB, allowing quidproquo applications to leverage key-value
79
+ stores for data storage and retrieval.
80
+
81
+ 8. **Logging and Observability**: The library integrates with the quidproquo logging and
82
+ observability features, ensuring that application logs and metrics are captured and made
83
+ available for monitoring and troubleshooting.
84
+
85
+ 9. **Extensibility**: The `quidproquo-actionprocessor-awslambda` library is designed to be highly
86
+ extensible, allowing developers to create custom action processors to meet their specific
87
+ requirements. This enables the integration of quidproquo-based applications with a wide range of
88
+ AWS services and third-party tools.
89
+
90
+ ## Getting Started
91
+
92
+ To use the `quidproquo-actionprocessor-awslambda` library, you'll need to install the package and
93
+ its dependencies. You can do this using your preferred package manager, such as npm or yarn:
94
+
95
+ ```
96
+ npm install quidproquo-actionprocessor-awslambda
97
+ ```
98
+
99
+ Once you have the package installed, you can start building your quidproquo-based applications on
100
+ the AWS Lambda platform, leveraging the action processors provided by this library.
101
+
102
+ ## Documentation
103
+
104
+ For more detailed information on using the `quidproquo-actionprocessor-awslambda` library, please
105
+ refer to the
106
+ [quidproquo-actionprocessor-awslambda documentation](https://github.com/joe-coady/quidproquo/tree/main/packages/quidproquo-actionprocessor-awslambda).
107
+
108
+ ## Contributing
109
+
110
+ If you'd like to contribute to the development of `quidproquo-actionprocessor-awslambda`, please
111
+ refer to the
112
+ [contributing guidelines](https://github.com/joe-coady/quidproquo/blob/main/CONTRIBUTING.md) for
113
+ more information.
114
+
115
+ ## License
116
+
117
+ `quidproquo-actionprocessor-awslambda` is licensed under the
118
+ [MIT License](https://github.com/joe-coady/quidproquo/blob/main/LICENSE).
@@ -2,7 +2,9 @@ import { QPQConfig, ResourceName } from 'quidproquo-core';
2
2
  export declare const getGlobalConfigRuntimeResourceName: (resourceName: string, application: string, environment: string, feature?: string) => string;
3
3
  export declare const getGlobalQpqRuntimeResourceName: (resourceName: string, application: string, environment: string, feature?: string, resourceType?: string) => string;
4
4
  export declare const getConfigRuntimeResourceName: (resourceName: string, application: string, service: string, environment: string, feature?: string) => string;
5
+ export declare const getConfigRuntimeBootstrapResourceName: (resourceName: string, application: string, environment: string, feature?: string) => string;
5
6
  export declare const getConfigRuntimeResourceNameFromConfig: (resourceName: string, qpqConfig: QPQConfig) => string;
7
+ export declare const getConfigRuntimeBootstrapResourceNameFromConfig: (resourceName: string, qpqConfig: QPQConfig) => string;
6
8
  export declare const getConfigRuntimeResourceNameFromConfigWithServiceOverride: (resourceName: string, qpqConfig: QPQConfig, serviceOverride?: string) => string;
7
9
  export declare const getQpqRuntimeResourceName: (resourceName: string, application: string, service: string, environment: string, feature?: string, resourceType?: string) => string;
8
10
  export declare const getQpqRuntimeResourceNameFromConfig: (resourceName: ResourceName, qpqConfig: QPQConfig, resourceType?: string) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBootstrapStackName = exports.getApiStackName = exports.getWebStackName = exports.getInfStackName = exports.getBaseStackName = exports.getEventBusSnsTopicArn = exports.getCFExportNameWebsocketApiIdFromConfig = exports.getCFExportNameDistributionIdArnFromConfig = exports.getCFExportNameSnsTopicArnFromConfig = exports.getCFExportNameApiKeyIdFromConfig = exports.getCFExportNameUserPoolClientIdFromConfig = exports.getCFExportNameCachePolicyIdFromConfig = exports.getCFExportNameUserPoolIdFromConfig = exports.getKvsDynamoTableNameFromConfig = exports.getQpqRuntimeResourceNameFromConfig = exports.getQpqRuntimeResourceName = exports.getConfigRuntimeResourceNameFromConfigWithServiceOverride = exports.getConfigRuntimeResourceNameFromConfig = exports.getConfigRuntimeResourceName = exports.getGlobalQpqRuntimeResourceName = exports.getGlobalConfigRuntimeResourceName = void 0;
3
+ exports.getBootstrapStackName = exports.getApiStackName = exports.getWebStackName = exports.getInfStackName = exports.getBaseStackName = exports.getEventBusSnsTopicArn = exports.getCFExportNameWebsocketApiIdFromConfig = exports.getCFExportNameDistributionIdArnFromConfig = exports.getCFExportNameSnsTopicArnFromConfig = exports.getCFExportNameApiKeyIdFromConfig = exports.getCFExportNameUserPoolClientIdFromConfig = exports.getCFExportNameCachePolicyIdFromConfig = exports.getCFExportNameUserPoolIdFromConfig = exports.getKvsDynamoTableNameFromConfig = exports.getQpqRuntimeResourceNameFromConfig = exports.getQpqRuntimeResourceName = exports.getConfigRuntimeResourceNameFromConfigWithServiceOverride = exports.getConfigRuntimeBootstrapResourceNameFromConfig = exports.getConfigRuntimeResourceNameFromConfig = exports.getConfigRuntimeBootstrapResourceName = exports.getConfigRuntimeResourceName = exports.getGlobalQpqRuntimeResourceName = exports.getGlobalConfigRuntimeResourceName = void 0;
4
4
  const quidproquo_core_1 = require("quidproquo-core");
5
5
  const quidproquo_config_aws_1 = require("quidproquo-config-aws");
6
6
  const getGlobalConfigRuntimeResourceName = (resourceName, application, environment, feature) => {
@@ -24,6 +24,14 @@ const getConfigRuntimeResourceName = (resourceName, application, service, enviro
24
24
  return baseName;
25
25
  };
26
26
  exports.getConfigRuntimeResourceName = getConfigRuntimeResourceName;
27
+ const getConfigRuntimeBootstrapResourceName = (resourceName, application, environment, feature) => {
28
+ const baseName = `${resourceName}-${application}-${environment}`;
29
+ if (feature) {
30
+ return `${baseName}-${feature}`;
31
+ }
32
+ return baseName;
33
+ };
34
+ exports.getConfigRuntimeBootstrapResourceName = getConfigRuntimeBootstrapResourceName;
27
35
  const getConfigRuntimeResourceNameFromConfig = (resourceName, qpqConfig) => {
28
36
  const application = quidproquo_core_1.qpqCoreUtils.getApplicationName(qpqConfig);
29
37
  const service = quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig);
@@ -32,6 +40,13 @@ const getConfigRuntimeResourceNameFromConfig = (resourceName, qpqConfig) => {
32
40
  return (0, exports.getConfigRuntimeResourceName)(resourceName, application, service, environment, feature);
33
41
  };
34
42
  exports.getConfigRuntimeResourceNameFromConfig = getConfigRuntimeResourceNameFromConfig;
43
+ const getConfigRuntimeBootstrapResourceNameFromConfig = (resourceName, qpqConfig) => {
44
+ const application = quidproquo_core_1.qpqCoreUtils.getApplicationName(qpqConfig);
45
+ const environment = quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig);
46
+ const feature = quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig);
47
+ return (0, exports.getConfigRuntimeBootstrapResourceName)(resourceName, application, environment, feature);
48
+ };
49
+ exports.getConfigRuntimeBootstrapResourceNameFromConfig = getConfigRuntimeBootstrapResourceNameFromConfig;
35
50
  const getConfigRuntimeResourceNameFromConfigWithServiceOverride = (resourceName, qpqConfig, serviceOverride) => {
36
51
  const application = quidproquo_core_1.qpqCoreUtils.getApplicationName(qpqConfig);
37
52
  const service = serviceOverride || quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-actionprocessor-awslambda",
3
- "version": "0.0.172",
3
+ "version": "0.0.174",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "types": "./lib/commonjs/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
- "clean": "npx rimraf lib",
12
+ "clean": "npx rimraf lib && npx rimraf node_modules",
13
13
  "build": "npm run clean && tsc -p tsconfig.commonjs.json",
14
14
  "watch": "tsc -p tsconfig.commonjs.json -w"
15
15
  },
@@ -47,9 +47,9 @@
47
47
  "lodash": "^4.17.21",
48
48
  "node-cache": "^5.1.2",
49
49
  "node-match-path": "^0.6.3",
50
- "quidproquo-config-aws": "0.0.172",
51
- "quidproquo-core": "0.0.172",
52
- "quidproquo-webserver": "0.0.172"
50
+ "quidproquo-config-aws": "0.0.174",
51
+ "quidproquo-core": "0.0.174",
52
+ "quidproquo-webserver": "0.0.174"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/aws-lambda": "^8.10.109",
@@ -57,7 +57,7 @@
57
57
  "@types/jsonwebtoken": "^9.0.2",
58
58
  "@types/lodash": "^4.14.194",
59
59
  "@types/node": "^18.11.9",
60
- "quidproquo-tsconfig": "0.0.172",
60
+ "quidproquo-tsconfig": "0.0.174",
61
61
  "typescript": "^4.9.3"
62
62
  }
63
63
  }