@allthings/cloud-toolkit 2.3.0-dev.1 → 2.3.0-dev.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/dist/lib.cjs.js +8 -1
- package/dist/lib.esm.js +8 -1
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/alagarr/index.d.ts +2 -2
- package/dist/src/alagarr/request/index.d.ts +2 -2
- package/dist/src/alagarr/request/middleware/normalizeHeaders.d.ts +2 -2
- package/dist/src/alagarr/request/middleware/normalizeProgrammingModel.d.ts +2 -2
- package/dist/src/alagarr/types.d.ts +18 -5
- package/dist/src/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -165,7 +165,12 @@ const normalizeHeaders = ({ headers = {}, ...request }) => ({
|
|
|
165
165
|
|
|
166
166
|
const normalizeProgrammingModel = (request) => ({
|
|
167
167
|
...request,
|
|
168
|
-
method: request.httpMethod
|
|
168
|
+
method: request.httpMethod ??
|
|
169
|
+
request.requestContext.http.method ??
|
|
170
|
+
'',
|
|
171
|
+
path: request.path ??
|
|
172
|
+
request.requestContext.http.path ??
|
|
173
|
+
'',
|
|
169
174
|
provider: 'aws',
|
|
170
175
|
query: request.queryStringParameters || {},
|
|
171
176
|
source: request.requestContext ? 'api-gateway' : request.source,
|
|
@@ -663,6 +668,8 @@ const alagarr = (handler = noopHandler, options = DEFAULT_OPTIONS) => async (eve
|
|
|
663
668
|
...DEFAULT_OPTIONS,
|
|
664
669
|
...options,
|
|
665
670
|
};
|
|
671
|
+
console.log(JSON.stringify(event));
|
|
672
|
+
console.log(JSON.stringify(context));
|
|
666
673
|
const request = await makeRequest(event, context, mergedOptions);
|
|
667
674
|
const response = await makeResponse(request, callback, mergedOptions);
|
|
668
675
|
try {
|
package/dist/lib.esm.js
CHANGED
|
@@ -142,7 +142,12 @@ const normalizeHeaders = ({ headers = {}, ...request }) => ({
|
|
|
142
142
|
|
|
143
143
|
const normalizeProgrammingModel = (request) => ({
|
|
144
144
|
...request,
|
|
145
|
-
method: request.httpMethod
|
|
145
|
+
method: request.httpMethod ??
|
|
146
|
+
request.requestContext.http.method ??
|
|
147
|
+
'',
|
|
148
|
+
path: request.path ??
|
|
149
|
+
request.requestContext.http.path ??
|
|
150
|
+
'',
|
|
146
151
|
provider: 'aws',
|
|
147
152
|
query: request.queryStringParameters || {},
|
|
148
153
|
source: request.requestContext ? 'api-gateway' : request.source,
|
|
@@ -640,6 +645,8 @@ const alagarr = (handler = noopHandler, options = DEFAULT_OPTIONS) => async (eve
|
|
|
640
645
|
...DEFAULT_OPTIONS,
|
|
641
646
|
...options,
|
|
642
647
|
};
|
|
648
|
+
console.log(JSON.stringify(event));
|
|
649
|
+
console.log(JSON.stringify(context));
|
|
643
650
|
const request = await makeRequest(event, context, mergedOptions);
|
|
644
651
|
const response = await makeResponse(request, callback, mergedOptions);
|
|
645
652
|
try {
|