@swydo/byol 2.1.8 → 2.1.11
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/CHANGELOG.md +27 -0
- package/package.json +2 -2
- package/src/assets/callHandlerProcess.js +3 -1
- package/src/cloudformation/resolveValue.js +1 -1
- package/src/getSqsMapping.js +1 -1
- package/src/getWebSocketMapping.js +1 -1
- package/src/handlerWorkerPool.js +1 -1
- package/src/resources/getFunctionResources.js +2 -1
- package/src/resources/getResources.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 2.1.11 (2022-05-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swydo/byol
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 2.1.10 (2022-05-01)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **deps:** update dependency ws to v8.6.0 ([#391](https://github.com/Swydo/byol/issues/391)) ([e533dc8](https://github.com/Swydo/byol/commit/e533dc82dffff401424f807dd9c39892179a2b05))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 2.1.9 (2022-04-28)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @swydo/byol
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## 2.1.8 (2022-04-26)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @swydo/byol
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swydo/byol",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "Bring Your Own Lambda",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"aws-xray-sdk-core": "^3.0.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "0173348f43f283755f57b99f6b1b52e2b1a82c10"
|
|
31
31
|
}
|
|
@@ -40,7 +40,9 @@ async function execute(handler, event, awsContext) {
|
|
|
40
40
|
|
|
41
41
|
// Timeout delay is required in order to print console logs
|
|
42
42
|
// that are omitted otherwise
|
|
43
|
-
await new Promise((resolve) =>
|
|
43
|
+
await new Promise((resolve) => {
|
|
44
|
+
setTimeout(resolve, 10);
|
|
45
|
+
});
|
|
44
46
|
|
|
45
47
|
return handlerResult;
|
|
46
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const objectPath = require('object-path');
|
|
2
2
|
|
|
3
|
-
function resolveAttribute(template, templateOverrides
|
|
3
|
+
function resolveAttribute(template, templateOverrides, resolvableValue) {
|
|
4
4
|
const dotKey = resolvableValue.join('.');
|
|
5
5
|
|
|
6
6
|
return objectPath.get(template.Resources, dotKey)
|
package/src/getSqsMapping.js
CHANGED
|
@@ -25,7 +25,7 @@ async function resolveQueueUrl(queueArn, { sqsEndpointUrl }) {
|
|
|
25
25
|
return QueueUrl;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
async function getSqsMapping(templatePath, { sqsEndpointUrl, templateOverrides }) {
|
|
28
|
+
async function getSqsMapping(templatePath, { sqsEndpointUrl, templateOverrides = {} }) {
|
|
29
29
|
const template = getTemplate(templatePath);
|
|
30
30
|
const functionResources = getFunctionResources(templatePath);
|
|
31
31
|
const functionNames = Object.keys(functionResources);
|
|
@@ -19,7 +19,7 @@ function getYamlVariables(target) {
|
|
|
19
19
|
|
|
20
20
|
switch (key) {
|
|
21
21
|
case 'Fn::Sub': {
|
|
22
|
-
const regx =
|
|
22
|
+
const regx = /\$\{([\D]+?)\}/g;
|
|
23
23
|
const references = Array.from(target[key].matchAll(regx));
|
|
24
24
|
return references.map((item) => item[1]);
|
|
25
25
|
}
|
package/src/handlerWorkerPool.js
CHANGED
|
@@ -38,7 +38,7 @@ function terminateWorkerPools() {
|
|
|
38
38
|
return Promise.all(terminationPromises);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
async function getWorkerPool(indexPath, handlerName, environment
|
|
41
|
+
async function getWorkerPool(indexPath, handlerName, environment, requestId, poolOptions = {}) {
|
|
42
42
|
const poolKey = getWorkerPoolKey(indexPath, handlerName, requestId, poolOptions);
|
|
43
43
|
|
|
44
44
|
if (!workerPoolMap.has(poolKey)) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const { getResources } = require('./getResources');
|
|
2
|
+
const { DEFAULT_TEMPLATE_PATH } = require('../getTemplate');
|
|
2
3
|
|
|
3
4
|
const FUNCTION_RESOURCE_TYPE = 'AWS::Serverless::Function';
|
|
4
5
|
|
|
5
|
-
function getFunctionResources(templatePath) {
|
|
6
|
+
function getFunctionResources(templatePath = DEFAULT_TEMPLATE_PATH) {
|
|
6
7
|
return getResources(templatePath, FUNCTION_RESOURCE_TYPE);
|
|
7
8
|
}
|
|
8
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
-
const {
|
|
2
|
+
const { getTemplate } = require('../getTemplate');
|
|
3
3
|
|
|
4
4
|
const STACK_RESOURCE_TYPE = 'AWS::CloudFormation::Stack';
|
|
5
5
|
|
|
6
|
-
function getResources(templatePath
|
|
6
|
+
function getResources(templatePath, resourceType) {
|
|
7
7
|
const template = getTemplate(templatePath);
|
|
8
8
|
|
|
9
9
|
if (!template.Resources) {
|