@mono-labs/dev 0.1.282 → 0.1.284
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-synthesizer.d.ts","sourceRoot":"","sources":["../../src/local-server/event-synthesizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAUlE,iEAAiE;AACjE,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"event-synthesizer.d.ts","sourceRoot":"","sources":["../../src/local-server/event-synthesizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAUlE,iEAAiE;AACjE,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,CAwC9E;AAED,sDAAsD;AACtD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,QAAQ,CAoBzD"}
|
|
@@ -12,12 +12,15 @@ function synthesizeApiGatewayEvent(req) {
|
|
|
12
12
|
const { path, queryString } = (0, aws_event_synthesis_1.splitUrl)(req.url);
|
|
13
13
|
const requestId = (0, aws_event_synthesis_1.generateRequestId)();
|
|
14
14
|
const now = Date.now();
|
|
15
|
+
const cookieHeader = req.headers['cookie'];
|
|
16
|
+
const cookies = cookieHeader ? cookieHeader.split('; ') : undefined;
|
|
15
17
|
return {
|
|
16
18
|
version: '2.0',
|
|
17
19
|
routeKey: `$default`,
|
|
18
20
|
rawPath: path,
|
|
19
21
|
rawQueryString: queryString,
|
|
20
22
|
headers,
|
|
23
|
+
cookies,
|
|
21
24
|
queryStringParameters: Object.keys(queryParams).length > 0 ? queryParams : undefined,
|
|
22
25
|
requestContext: {
|
|
23
26
|
accountId: 'local',
|
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@ export function synthesizeApiGatewayEvent(req: Request): APIGatewayProxyEventV2
|
|
|
18
18
|
const { path, queryString } = splitUrl(req.url)
|
|
19
19
|
const requestId = generateRequestId()
|
|
20
20
|
const now = Date.now()
|
|
21
|
+
const cookieHeader = req.headers['cookie']
|
|
22
|
+
const cookies = cookieHeader ? cookieHeader.split('; ') : undefined
|
|
21
23
|
|
|
22
24
|
return {
|
|
23
25
|
version: '2.0',
|
|
@@ -25,6 +27,7 @@ export function synthesizeApiGatewayEvent(req: Request): APIGatewayProxyEventV2
|
|
|
25
27
|
rawPath: path,
|
|
26
28
|
rawQueryString: queryString,
|
|
27
29
|
headers,
|
|
30
|
+
cookies,
|
|
28
31
|
queryStringParameters: Object.keys(queryParams).length > 0 ? queryParams as Record<string, string> : undefined,
|
|
29
32
|
requestContext: {
|
|
30
33
|
accountId: 'local',
|