@bifravst/http-api-mock 1.2.2 → 1.2.4
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.
|
@@ -71,7 +71,8 @@ export const handler = async (
|
|
|
71
71
|
console.debug(`Found response items: ${Items?.length}`)
|
|
72
72
|
|
|
73
73
|
let res: APIGatewayProxyResult | undefined
|
|
74
|
-
for (const Item of Items ?? []) {
|
|
74
|
+
for (const Item of (Items ?? []).reverse()) {
|
|
75
|
+
// use newest response first
|
|
75
76
|
const objItem = unmarshall(Item)
|
|
76
77
|
const hasExpectedQueryParams = 'queryParams' in objItem
|
|
77
78
|
const matchedQueryParams = hasExpectedQueryParams
|
|
@@ -42,7 +42,8 @@ export const handler = async (event, context) => {
|
|
|
42
42
|
}));
|
|
43
43
|
console.debug(`Found response items: ${Items?.length}`);
|
|
44
44
|
let res;
|
|
45
|
-
for (const Item of Items ?? []) {
|
|
45
|
+
for (const Item of (Items ?? []).reverse()) {
|
|
46
|
+
// use newest response first
|
|
46
47
|
const objItem = unmarshall(Item);
|
|
47
48
|
const hasExpectedQueryParams = 'queryParams' in objItem;
|
|
48
49
|
const matchedQueryParams = hasExpectedQueryParams
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifravst/http-api-mock",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Helper functions for AWS lambdas written in TypeScript.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@aws-sdk/client-dynamodb": "^3.554.0",
|
|
88
88
|
"@aws-sdk/client-sts": "^3.554.0",
|
|
89
89
|
"@aws-sdk/util-dynamodb": "^3.554.0",
|
|
90
|
-
"@bifravst/aws-cdk-lambda-helpers": "^1.4.
|
|
90
|
+
"@bifravst/aws-cdk-lambda-helpers": "^1.4.1",
|
|
91
91
|
"@bifravst/run": "^1.2.0",
|
|
92
92
|
"@nordicsemiconductor/cloudformation-helpers": "^9.0.3",
|
|
93
93
|
"@nordicsemiconductor/from-env": "^3.0.1",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@bifravst/eslint-config-typescript": "6.0.22",
|
|
101
101
|
"@bifravst/prettier-config": "1.0.0",
|
|
102
|
-
"@commitlint/config-conventional": "19.
|
|
102
|
+
"@commitlint/config-conventional": "19.2.2",
|
|
103
103
|
"@types/aws-lambda": "8.10.137",
|
|
104
104
|
"@types/node": "20.12.7",
|
|
105
105
|
"globstar": "1.0.0",
|