@cedarjs/api-server 4.0.0-canary.13833 → 4.0.0-canary.13837
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/bin.js +11 -7
- package/dist/cjs/bin.js +11 -7
- package/dist/cjs/plugins/lambdaLoader.d.ts.map +1 -1
- package/dist/cjs/plugins/lambdaLoader.js +5 -5
- package/dist/cjs/requestHandlers/awsLambdaFastify.d.ts.map +1 -1
- package/dist/cjs/requestHandlers/awsLambdaFastify.js +6 -2
- package/dist/plugins/lambdaLoader.d.ts.map +1 -1
- package/dist/plugins/lambdaLoader.js +5 -5
- package/dist/requestHandlers/awsLambdaFastify.d.ts.map +1 -1
- package/dist/requestHandlers/awsLambdaFastify.js +6 -2
- package/package.json +9 -9
package/dist/bin.js
CHANGED
|
@@ -240,14 +240,18 @@ var init_awsLambdaFastify = __esm({
|
|
|
240
240
|
);
|
|
241
241
|
return {
|
|
242
242
|
httpMethod: request.method,
|
|
243
|
-
headers:
|
|
243
|
+
headers: {
|
|
244
|
+
"x-forwarded-proto": request.protocol,
|
|
245
|
+
...request.headers
|
|
246
|
+
},
|
|
244
247
|
path: request.urlData("path"),
|
|
245
248
|
queryStringParameters: qsParams,
|
|
246
249
|
requestContext: {
|
|
247
250
|
requestId: request.id,
|
|
248
251
|
identity: {
|
|
249
252
|
sourceIp: request.ip
|
|
250
|
-
}
|
|
253
|
+
},
|
|
254
|
+
domainName: request.hostname
|
|
251
255
|
},
|
|
252
256
|
...parseBody(request.rawBody || "")
|
|
253
257
|
// adds `body` and `isBase64Encoded`
|
|
@@ -357,11 +361,11 @@ var init_lambdaLoader = __esm({
|
|
|
357
361
|
return void 0;
|
|
358
362
|
})();
|
|
359
363
|
const cedarHandler = (() => {
|
|
360
|
-
if ("
|
|
361
|
-
return fnImport.
|
|
364
|
+
if ("handleRequest" in fnImport && typeof fnImport.handleRequest === "function") {
|
|
365
|
+
return fnImport.handleRequest;
|
|
362
366
|
}
|
|
363
|
-
if ("default" in fnImport && fnImport.default && "
|
|
364
|
-
return fnImport.default.
|
|
367
|
+
if ("default" in fnImport && fnImport.default && "handleRequest" in fnImport.default && typeof fnImport.default.handleRequest === "function") {
|
|
368
|
+
return fnImport.default.handleRequest;
|
|
365
369
|
}
|
|
366
370
|
return void 0;
|
|
367
371
|
})();
|
|
@@ -376,7 +380,7 @@ var init_lambdaLoader = __esm({
|
|
|
376
380
|
routeName,
|
|
377
381
|
"at",
|
|
378
382
|
fnPath,
|
|
379
|
-
"does not have a function called handler or
|
|
383
|
+
"does not have a function called handler or handleRequest defined."
|
|
380
384
|
);
|
|
381
385
|
}
|
|
382
386
|
cedarRouteManifest.push({
|
package/dist/cjs/bin.js
CHANGED
|
@@ -262,14 +262,18 @@ var init_awsLambdaFastify = __esm({
|
|
|
262
262
|
);
|
|
263
263
|
return {
|
|
264
264
|
httpMethod: request.method,
|
|
265
|
-
headers:
|
|
265
|
+
headers: {
|
|
266
|
+
"x-forwarded-proto": request.protocol,
|
|
267
|
+
...request.headers
|
|
268
|
+
},
|
|
266
269
|
path: request.urlData("path"),
|
|
267
270
|
queryStringParameters: qsParams,
|
|
268
271
|
requestContext: {
|
|
269
272
|
requestId: request.id,
|
|
270
273
|
identity: {
|
|
271
274
|
sourceIp: request.ip
|
|
272
|
-
}
|
|
275
|
+
},
|
|
276
|
+
domainName: request.hostname
|
|
273
277
|
},
|
|
274
278
|
...parseBody(request.rawBody || "")
|
|
275
279
|
// adds `body` and `isBase64Encoded`
|
|
@@ -379,11 +383,11 @@ var init_lambdaLoader = __esm({
|
|
|
379
383
|
return void 0;
|
|
380
384
|
})();
|
|
381
385
|
const cedarHandler = (() => {
|
|
382
|
-
if ("
|
|
383
|
-
return fnImport.
|
|
386
|
+
if ("handleRequest" in fnImport && typeof fnImport.handleRequest === "function") {
|
|
387
|
+
return fnImport.handleRequest;
|
|
384
388
|
}
|
|
385
|
-
if ("default" in fnImport && fnImport.default && "
|
|
386
|
-
return fnImport.default.
|
|
389
|
+
if ("default" in fnImport && fnImport.default && "handleRequest" in fnImport.default && typeof fnImport.default.handleRequest === "function") {
|
|
390
|
+
return fnImport.default.handleRequest;
|
|
387
391
|
}
|
|
388
392
|
return void 0;
|
|
389
393
|
})();
|
|
@@ -398,7 +402,7 @@ var init_lambdaLoader = __esm({
|
|
|
398
402
|
routeName,
|
|
399
403
|
"at",
|
|
400
404
|
fnPath,
|
|
401
|
-
"does not have a function called handler or
|
|
405
|
+
"does not have a function called handler or handleRequest defined."
|
|
402
406
|
);
|
|
403
407
|
}
|
|
404
408
|
cedarRouteManifest.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lambdaLoader.d.ts","sourceRoot":"","sources":["../../../src/plugins/lambdaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAEjB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC7C,eAAO,MAAM,gBAAgB,EAAE,OAAY,CAAA;AAC3C,eAAO,MAAM,cAAc,2BAAkC,CAAA;AAG7D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,0BAAgC,CAAA;AAIlE,eAAO,MAAM,kBAAkB,GAAU,gBAAgB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"lambdaLoader.d.ts","sourceRoot":"","sources":["../../../src/plugins/lambdaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAEjB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC7C,eAAO,MAAM,gBAAgB,EAAE,OAAY,CAAA;AAC3C,eAAO,MAAM,cAAc,2BAAkC,CAAA;AAG7D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,0BAAgC,CAAA;AAIlE,eAAO,MAAM,kBAAkB,GAAU,gBAAgB,MAAM,EAAE,kBAqGhE,CAAA;AAED,KAAK,4BAA4B,GAAG;IAClC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC1C,CAAA;AAGD,eAAO,MAAM,qBAAqB,GAChC,UAAS,4BAAiC,kBAe3C,CAAA;AA0BD,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED;;;;IAII;AACJ,eAAO,MAAM,oBAAoB,GAC/B,KAAK,cAAc,CAAC,oBAAoB,CAAC,EACzC,OAAO,YAAY,kBAsEpB,CAAA"}
|
|
@@ -70,11 +70,11 @@ const setLambdaFunctions = async (foundFunctions) => {
|
|
|
70
70
|
return void 0;
|
|
71
71
|
})();
|
|
72
72
|
const cedarHandler = (() => {
|
|
73
|
-
if ("
|
|
74
|
-
return fnImport.
|
|
73
|
+
if ("handleRequest" in fnImport && typeof fnImport.handleRequest === "function") {
|
|
74
|
+
return fnImport.handleRequest;
|
|
75
75
|
}
|
|
76
|
-
if ("default" in fnImport && fnImport.default && "
|
|
77
|
-
return fnImport.default.
|
|
76
|
+
if ("default" in fnImport && fnImport.default && "handleRequest" in fnImport.default && typeof fnImport.default.handleRequest === "function") {
|
|
77
|
+
return fnImport.default.handleRequest;
|
|
78
78
|
}
|
|
79
79
|
return void 0;
|
|
80
80
|
})();
|
|
@@ -89,7 +89,7 @@ const setLambdaFunctions = async (foundFunctions) => {
|
|
|
89
89
|
routeName,
|
|
90
90
|
"at",
|
|
91
91
|
fnPath,
|
|
92
|
-
"does not have a function called handler or
|
|
92
|
+
"does not have a function called handler or handleRequest defined."
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
cedarRouteManifest.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awsLambdaFastify.d.ts","sourceRoot":"","sources":["../../../src/requestHandlers/awsLambdaFastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"awsLambdaFastify.d.ts","sourceRoot":"","sources":["../../../src/requestHandlers/awsLambdaFastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,OAAO,EAGR,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3D,eAAO,MAAM,4BAA4B,GACvC,SAAS,cAAc,KACtB,oBA6BF,CAAA;AAoCD,eAAO,MAAM,cAAc,GACzB,KAAK,cAAc,EACnB,OAAO,YAAY,EACnB,SAAS,OAAO,kBAmCjB,CAAA"}
|
|
@@ -35,14 +35,18 @@ const lambdaEventForFastifyRequest = (request) => {
|
|
|
35
35
|
);
|
|
36
36
|
return {
|
|
37
37
|
httpMethod: request.method,
|
|
38
|
-
headers:
|
|
38
|
+
headers: {
|
|
39
|
+
"x-forwarded-proto": request.protocol,
|
|
40
|
+
...request.headers
|
|
41
|
+
},
|
|
39
42
|
path: request.urlData("path"),
|
|
40
43
|
queryStringParameters: qsParams,
|
|
41
44
|
requestContext: {
|
|
42
45
|
requestId: request.id,
|
|
43
46
|
identity: {
|
|
44
47
|
sourceIp: request.ip
|
|
45
|
-
}
|
|
48
|
+
},
|
|
49
|
+
domainName: request.hostname
|
|
46
50
|
},
|
|
47
51
|
...(0, import_utils.parseBody)(request.rawBody || "")
|
|
48
52
|
// adds `body` and `isBase64Encoded`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lambdaLoader.d.ts","sourceRoot":"","sources":["../../src/plugins/lambdaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAEjB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC7C,eAAO,MAAM,gBAAgB,EAAE,OAAY,CAAA;AAC3C,eAAO,MAAM,cAAc,2BAAkC,CAAA;AAG7D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,0BAAgC,CAAA;AAIlE,eAAO,MAAM,kBAAkB,GAAU,gBAAgB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"lambdaLoader.d.ts","sourceRoot":"","sources":["../../src/plugins/lambdaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAEjB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC7C,eAAO,MAAM,gBAAgB,EAAE,OAAY,CAAA;AAC3C,eAAO,MAAM,cAAc,2BAAkC,CAAA;AAG7D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,0BAAgC,CAAA;AAIlE,eAAO,MAAM,kBAAkB,GAAU,gBAAgB,MAAM,EAAE,kBAqGhE,CAAA;AAED,KAAK,4BAA4B,GAAG;IAClC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC1C,CAAA;AAGD,eAAO,MAAM,qBAAqB,GAChC,UAAS,4BAAiC,kBAe3C,CAAA;AA0BD,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED;;;;IAII;AACJ,eAAO,MAAM,oBAAoB,GAC/B,KAAK,cAAc,CAAC,oBAAoB,CAAC,EACzC,OAAO,YAAY,kBAsEpB,CAAA"}
|
|
@@ -32,11 +32,11 @@ const setLambdaFunctions = async (foundFunctions) => {
|
|
|
32
32
|
return void 0;
|
|
33
33
|
})();
|
|
34
34
|
const cedarHandler = (() => {
|
|
35
|
-
if ("
|
|
36
|
-
return fnImport.
|
|
35
|
+
if ("handleRequest" in fnImport && typeof fnImport.handleRequest === "function") {
|
|
36
|
+
return fnImport.handleRequest;
|
|
37
37
|
}
|
|
38
|
-
if ("default" in fnImport && fnImport.default && "
|
|
39
|
-
return fnImport.default.
|
|
38
|
+
if ("default" in fnImport && fnImport.default && "handleRequest" in fnImport.default && typeof fnImport.default.handleRequest === "function") {
|
|
39
|
+
return fnImport.default.handleRequest;
|
|
40
40
|
}
|
|
41
41
|
return void 0;
|
|
42
42
|
})();
|
|
@@ -51,7 +51,7 @@ const setLambdaFunctions = async (foundFunctions) => {
|
|
|
51
51
|
routeName,
|
|
52
52
|
"at",
|
|
53
53
|
fnPath,
|
|
54
|
-
"does not have a function called handler or
|
|
54
|
+
"does not have a function called handler or handleRequest defined."
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
cedarRouteManifest.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awsLambdaFastify.d.ts","sourceRoot":"","sources":["../../src/requestHandlers/awsLambdaFastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"awsLambdaFastify.d.ts","sourceRoot":"","sources":["../../src/requestHandlers/awsLambdaFastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,OAAO,EAGR,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3D,eAAO,MAAM,4BAA4B,GACvC,SAAS,cAAc,KACtB,oBA6BF,CAAA;AAoCD,eAAO,MAAM,cAAc,GACzB,KAAK,cAAc,EACnB,OAAO,YAAY,EACnB,SAAS,OAAO,kBAmCjB,CAAA"}
|
|
@@ -11,14 +11,18 @@ const lambdaEventForFastifyRequest = (request) => {
|
|
|
11
11
|
);
|
|
12
12
|
return {
|
|
13
13
|
httpMethod: request.method,
|
|
14
|
-
headers:
|
|
14
|
+
headers: {
|
|
15
|
+
"x-forwarded-proto": request.protocol,
|
|
16
|
+
...request.headers
|
|
17
|
+
},
|
|
15
18
|
path: request.urlData("path"),
|
|
16
19
|
queryStringParameters: qsParams,
|
|
17
20
|
requestContext: {
|
|
18
21
|
requestId: request.id,
|
|
19
22
|
identity: {
|
|
20
23
|
sourceIp: request.ip
|
|
21
|
-
}
|
|
24
|
+
},
|
|
25
|
+
domainName: request.hostname
|
|
22
26
|
},
|
|
23
27
|
...parseBody(request.rawBody || "")
|
|
24
28
|
// adds `body` and `isBase64Encoded`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/api-server",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.13837+81a27a64fc",
|
|
4
4
|
"description": "CedarJS's HTTP server for Serverless Functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
"test:watch": "vitest watch"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@cedarjs/context": "4.0.0-canary.
|
|
115
|
-
"@cedarjs/fastify-web": "4.0.0-canary.
|
|
116
|
-
"@cedarjs/internal": "4.0.0-canary.
|
|
117
|
-
"@cedarjs/project-config": "4.0.0-canary.
|
|
118
|
-
"@cedarjs/web-server": "4.0.0-canary.
|
|
114
|
+
"@cedarjs/context": "4.0.0-canary.13837",
|
|
115
|
+
"@cedarjs/fastify-web": "4.0.0-canary.13837",
|
|
116
|
+
"@cedarjs/internal": "4.0.0-canary.13837",
|
|
117
|
+
"@cedarjs/project-config": "4.0.0-canary.13837",
|
|
118
|
+
"@cedarjs/web-server": "4.0.0-canary.13837",
|
|
119
119
|
"@fastify/multipart": "9.4.0",
|
|
120
120
|
"@fastify/url-data": "6.0.3",
|
|
121
121
|
"ansis": "4.2.0",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"yargs": "17.7.2"
|
|
133
133
|
},
|
|
134
134
|
"devDependencies": {
|
|
135
|
-
"@cedarjs/framework-tools": "4.0.0-canary.
|
|
135
|
+
"@cedarjs/framework-tools": "4.0.0-canary.13837",
|
|
136
136
|
"@types/aws-lambda": "8.10.161",
|
|
137
137
|
"@types/dotenv-defaults": "^5.0.0",
|
|
138
138
|
"@types/split2": "4.2.3",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"vitest": "3.2.4"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
|
-
"@cedarjs/graphql-server": "4.0.0-canary.
|
|
148
|
+
"@cedarjs/graphql-server": "4.0.0-canary.13837"
|
|
149
149
|
},
|
|
150
150
|
"peerDependenciesMeta": {
|
|
151
151
|
"@cedarjs/graphql-server": {
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"publishConfig": {
|
|
156
156
|
"access": "public"
|
|
157
157
|
},
|
|
158
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "81a27a64fc574555674522b7e683e6b96ab87741"
|
|
159
159
|
}
|