@allthings/cloud-toolkit 2.3.0-dev.12 → 2.3.0-dev.2

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 CHANGED
@@ -165,12 +165,7 @@ const normalizeHeaders = ({ headers = {}, ...request }) => ({
165
165
 
166
166
  const normalizeProgrammingModel = (request) => ({
167
167
  ...request,
168
- method: request.httpMethod ??
169
- request.requestContext.http.method ??
170
- '',
171
- path: request.path ??
172
- request.requestContext.http.path ??
173
- '',
168
+ method: request.httpMethod || '',
174
169
  provider: 'aws',
175
170
  query: request.queryStringParameters || {},
176
171
  source: request.requestContext ? 'api-gateway' : request.source,
@@ -512,8 +507,7 @@ const aws = (request) => {
512
507
  return {
513
508
  apig: {
514
509
  requestId: requestContext.requestId,
515
- resourcePath: requestContext.resourcePath ??
516
- '',
510
+ resourcePath: requestContext.resourcePath,
517
511
  },
518
512
  awsAccountId: requestContext.accountId,
519
513
  cloudfront: {
@@ -530,9 +524,7 @@ const aws = (request) => {
530
524
  remainingExecutionTime: context.getRemainingTimeInMillis && context.getRemainingTimeInMillis(),
531
525
  requestId: context.awsRequestId,
532
526
  },
533
- sourceIp: requestContext.identity
534
- ?.sourceIp ??
535
- requestContext.http?.sourceIp,
527
+ sourceIp: requestContext.identity.sourceIp,
536
528
  };
537
529
  };
538
530
  const logger$1 = (request, response) => {
@@ -671,8 +663,6 @@ const alagarr = (handler = noopHandler, options = DEFAULT_OPTIONS) => async (eve
671
663
  ...DEFAULT_OPTIONS,
672
664
  ...options,
673
665
  };
674
- console.log(JSON.stringify(event));
675
- console.log(JSON.stringify(context));
676
666
  const request = await makeRequest(event, context, mergedOptions);
677
667
  const response = await makeResponse(request, callback, mergedOptions);
678
668
  try {
package/dist/lib.esm.js CHANGED
@@ -142,12 +142,7 @@ const normalizeHeaders = ({ headers = {}, ...request }) => ({
142
142
 
143
143
  const normalizeProgrammingModel = (request) => ({
144
144
  ...request,
145
- method: request.httpMethod ??
146
- request.requestContext.http.method ??
147
- '',
148
- path: request.path ??
149
- request.requestContext.http.path ??
150
- '',
145
+ method: request.httpMethod || '',
151
146
  provider: 'aws',
152
147
  query: request.queryStringParameters || {},
153
148
  source: request.requestContext ? 'api-gateway' : request.source,
@@ -489,8 +484,7 @@ const aws = (request) => {
489
484
  return {
490
485
  apig: {
491
486
  requestId: requestContext.requestId,
492
- resourcePath: requestContext.resourcePath ??
493
- '',
487
+ resourcePath: requestContext.resourcePath,
494
488
  },
495
489
  awsAccountId: requestContext.accountId,
496
490
  cloudfront: {
@@ -507,9 +501,7 @@ const aws = (request) => {
507
501
  remainingExecutionTime: context.getRemainingTimeInMillis && context.getRemainingTimeInMillis(),
508
502
  requestId: context.awsRequestId,
509
503
  },
510
- sourceIp: requestContext.identity
511
- ?.sourceIp ??
512
- requestContext.http?.sourceIp,
504
+ sourceIp: requestContext.identity.sourceIp,
513
505
  };
514
506
  };
515
507
  const logger$1 = (request, response) => {
@@ -648,8 +640,6 @@ const alagarr = (handler = noopHandler, options = DEFAULT_OPTIONS) => async (eve
648
640
  ...DEFAULT_OPTIONS,
649
641
  ...options,
650
642
  };
651
- console.log(JSON.stringify(event));
652
- console.log(JSON.stringify(context));
653
643
  const request = await makeRequest(event, context, mergedOptions);
654
644
  const response = await makeResponse(request, callback, mergedOptions);
655
645
  try {