@aesop-fables/triginta 0.3.3 → 0.3.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.
@@ -70,10 +70,7 @@ exports.parsePathParameters = parsePathParameters;
70
70
  function createApiGatewayEvent(context) {
71
71
  const { configuredRoute, path, body } = context;
72
72
  const routeKey = `${configuredRoute.method} ${configuredRoute.route}`;
73
- const event = {
74
- version: '2.0',
75
- routeKey,
76
- headers: {
73
+ const event = Object.assign({ version: '2.0', routeKey, headers: {
77
74
  accept: '*/*',
78
75
  'accept-encoding': 'gzip, deflate, br',
79
76
  // 'content-length': '0',
@@ -84,8 +81,7 @@ function createApiGatewayEvent(context) {
84
81
  'x-forwarded-for': '127.0.0.1',
85
82
  'x-forwarded-port': '80',
86
83
  'x-forwarded-proto': 'http',
87
- },
88
- requestContext: {
84
+ }, requestContext: {
89
85
  accountId: '888888888888',
90
86
  apiId: 'trigintaLocal',
91
87
  domainName: '',
@@ -102,9 +98,7 @@ function createApiGatewayEvent(context) {
102
98
  stage: '$default',
103
99
  time: '',
104
100
  timeEpoch: Date.now(),
105
- },
106
- body: body ? JSON.stringify(body) : undefined,
107
- };
101
+ }, body: body ? JSON.stringify(body) : undefined }, parsePathParameters(context));
108
102
  return event;
109
103
  }
110
104
  exports.createApiGatewayEvent = createApiGatewayEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aesop-fables/triginta",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "A lightweight framework that wraps the basic infrastructure usages of AWS Lambda (SQS, Kinesis, etc.).",
5
5
  "type": "commonjs",
6
6
  "exports": {