@h4ad/serverless-adapter 4.1.0 → 4.2.0
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/lib/frameworks/polka/index.cjs +2 -0
- package/lib/frameworks/polka/index.cjs.map +1 -0
- package/lib/frameworks/polka/index.d.cts +18 -0
- package/lib/frameworks/polka/index.d.ts +18 -0
- package/lib/frameworks/polka/index.mjs +2 -0
- package/lib/frameworks/polka/index.mjs.map +1 -0
- package/package.json +34 -9
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(o,e)=>a(o,"name",{value:e,configurable:!0});var l=(o,e)=>{for(var r in e)a(o,r,{get:e[r],enumerable:!0})},g=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of c(e))!i.call(o,t)&&t!==r&&a(o,t,{get:()=>e[t],enumerable:!(s=m(e,t))||s.enumerable});return o};var k=o=>g(a({},"__esModule",{value:!0}),o);var f={};l(f,{PolkaFramework:()=>n});module.exports=k(f);var d=require("polka");var n=class{static{p(this,"PolkaFramework")}sendRequest(e,r,s){e.handler(r,s)}};0&&(module.exports={PolkaFramework});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/frameworks/polka/index.ts","../../../src/frameworks/polka/polka.framework.ts"],"sourcesContent":["export * from './polka.framework';\n","//#region Imports\n\nimport type { IncomingMessage, ServerResponse } from 'http';\nimport polka, { type Polka } from 'polka';\nimport type { FrameworkContract } from '../../contracts';\n\n//#endregion\n\n/**\n * The framework that forwards requests to polka handler\n *\n * @breadcrumb Frameworks / PolkaFramework\n * @public\n */\nexport class PolkaFramework implements FrameworkContract<Polka> {\n /**\n * {@inheritDoc}\n */\n sendRequest(\n app: Polka,\n request: IncomingMessage,\n response: ServerResponse<IncomingMessage>,\n ): void {\n app.handler(request as polka.Request, response);\n }\n}\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GCGA,IAAAI,EAAkC,iBAW3B,IAAMC,EAAN,KAAyD,CAdhE,MAcgE,CAAAC,EAAA,uBAI9D,YACEC,EACAC,EACAC,EACM,CACNF,EAAI,QAAQC,EAA0BC,CAAQ,CAChD,CACF","names":["polka_exports","__export","PolkaFramework","__toCommonJS","import_polka","PolkaFramework","__name","app","request","response"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import { Polka } from 'polka';
|
|
3
|
+
import { F as FrameworkContract } from '../../framework.contract-YnJ-fl1w.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The framework that forwards requests to polka handler
|
|
7
|
+
*
|
|
8
|
+
* @breadcrumb Frameworks / PolkaFramework
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare class PolkaFramework implements FrameworkContract<Polka> {
|
|
12
|
+
/**
|
|
13
|
+
* {@inheritDoc}
|
|
14
|
+
*/
|
|
15
|
+
sendRequest(app: Polka, request: IncomingMessage, response: ServerResponse<IncomingMessage>): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { PolkaFramework };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import { Polka } from 'polka';
|
|
3
|
+
import { F as FrameworkContract } from '../../framework.contract-YnJ-fl1w.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The framework that forwards requests to polka handler
|
|
7
|
+
*
|
|
8
|
+
* @breadcrumb Frameworks / PolkaFramework
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare class PolkaFramework implements FrameworkContract<Polka> {
|
|
12
|
+
/**
|
|
13
|
+
* {@inheritDoc}
|
|
14
|
+
*/
|
|
15
|
+
sendRequest(app: Polka, request: IncomingMessage, response: ServerResponse<IncomingMessage>): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { PolkaFramework };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/frameworks/polka/polka.framework.ts"],"sourcesContent":["//#region Imports\n\nimport type { IncomingMessage, ServerResponse } from 'http';\nimport polka, { type Polka } from 'polka';\nimport type { FrameworkContract } from '../../contracts';\n\n//#endregion\n\n/**\n * The framework that forwards requests to polka handler\n *\n * @breadcrumb Frameworks / PolkaFramework\n * @public\n */\nexport class PolkaFramework implements FrameworkContract<Polka> {\n /**\n * {@inheritDoc}\n */\n sendRequest(\n app: Polka,\n request: IncomingMessage,\n response: ServerResponse<IncomingMessage>,\n ): void {\n app.handler(request as polka.Request, response);\n }\n}\n"],"mappings":"6CAGA,MAAkC,QAW3B,IAAMA,EAAN,KAAyD,CAdhE,MAcgE,CAAAC,EAAA,uBAI9D,YACEC,EACAC,EACAC,EACM,CACNF,EAAI,QAAQC,EAA0BC,CAAQ,CAChD,CACF","names":["PolkaFramework","__name","app","request","response"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h4ad/serverless-adapter",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Run REST APIs and other web applications using your existing Node.js application framework (NestJS, Express, Koa, Hapi, Fastify and many others), on top of AWS, Azure, Digital Ocean and many other clouds.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.cjs",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"lambda edge",
|
|
48
48
|
"alb",
|
|
49
49
|
"lambda",
|
|
50
|
+
"lambda streaming",
|
|
51
|
+
"response streaming",
|
|
50
52
|
"apollo server",
|
|
51
53
|
"express",
|
|
52
54
|
"koa",
|
|
@@ -69,14 +71,15 @@
|
|
|
69
71
|
"digital ocean functions",
|
|
70
72
|
"digital ocean serverless",
|
|
71
73
|
"gcp",
|
|
72
|
-
"google cloud functions"
|
|
74
|
+
"google cloud functions",
|
|
75
|
+
"polka"
|
|
73
76
|
],
|
|
74
77
|
"bugs": {
|
|
75
78
|
"url": "https://github.com/H4ad/serverless-adapter/issues"
|
|
76
79
|
},
|
|
77
80
|
"homepage": "https://github.com/H4ad/serverless-adapter#readme",
|
|
78
81
|
"devDependencies": {
|
|
79
|
-
"@apollo/server": "4.
|
|
82
|
+
"@apollo/server": "4.10.0",
|
|
80
83
|
"@azure/functions": "3.5.1",
|
|
81
84
|
"@deepkit/app": "1.0.1-alpha.98",
|
|
82
85
|
"@deepkit/framework": "1.0.1-alpha.99",
|
|
@@ -89,7 +92,7 @@
|
|
|
89
92
|
"@microsoft/api-extractor-model": "7.28.3",
|
|
90
93
|
"@microsoft/tsdoc": "0.14.2",
|
|
91
94
|
"@npmcli/package-json": "5.0.0",
|
|
92
|
-
"@rushstack/node-core-library": "3.
|
|
95
|
+
"@rushstack/node-core-library": "3.63.0",
|
|
93
96
|
"@trpc/server": "10.44.1",
|
|
94
97
|
"@types/aws-lambda": "8.10.130",
|
|
95
98
|
"@types/body-parser": "1.19.5",
|
|
@@ -97,10 +100,11 @@
|
|
|
97
100
|
"@types/express": "4.17.21",
|
|
98
101
|
"@types/koa": "2.13.12",
|
|
99
102
|
"@types/node": "18.16.5",
|
|
103
|
+
"@types/polka": "0.5.7",
|
|
100
104
|
"@types/supertest": "6.0.1",
|
|
101
105
|
"@typescript-eslint/eslint-plugin": "6.15.0",
|
|
102
106
|
"@typescript-eslint/parser": "6.15.0",
|
|
103
|
-
"@vitest/coverage-v8": "1.1.
|
|
107
|
+
"@vitest/coverage-v8": "1.1.3",
|
|
104
108
|
"body-parser": "1.20.2",
|
|
105
109
|
"codecov": "3.8.3",
|
|
106
110
|
"commitizen": "4.3.0",
|
|
@@ -111,15 +115,16 @@
|
|
|
111
115
|
"eslint-config-prettier": "9.1.0",
|
|
112
116
|
"eslint-plugin-import": "2.29.1",
|
|
113
117
|
"eslint-plugin-node": "11.1.0",
|
|
114
|
-
"eslint-plugin-prettier": "5.1.
|
|
118
|
+
"eslint-plugin-prettier": "5.1.2",
|
|
115
119
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
116
120
|
"express": "4.18.2",
|
|
117
|
-
"fastify": "4.25.
|
|
121
|
+
"fastify": "4.25.2",
|
|
118
122
|
"firebase-admin": "11.11.1",
|
|
119
123
|
"firebase-functions": "4.5.0",
|
|
120
124
|
"glob": "10.3.10",
|
|
121
125
|
"husky": "8.0.3",
|
|
122
|
-
"koa": "2.
|
|
126
|
+
"koa": "2.15.0",
|
|
127
|
+
"polka": "0.5.2",
|
|
123
128
|
"prettier": "3.1.1",
|
|
124
129
|
"stream-mock": "2.0.5",
|
|
125
130
|
"supertest": "6.3.3",
|
|
@@ -127,7 +132,7 @@
|
|
|
127
132
|
"tsup": "8.0.1",
|
|
128
133
|
"typedoc": "0.25.4",
|
|
129
134
|
"typescript": "~5.3.3",
|
|
130
|
-
"vite": "5.0.
|
|
135
|
+
"vite": "5.0.11",
|
|
131
136
|
"vitest": "1.1.0"
|
|
132
137
|
},
|
|
133
138
|
"peerDependencies": {
|
|
@@ -530,6 +535,26 @@
|
|
|
530
535
|
"default": "./lib/frameworks/lazy/index.cjs"
|
|
531
536
|
}
|
|
532
537
|
},
|
|
538
|
+
"./frameworks/polka": {
|
|
539
|
+
"import": {
|
|
540
|
+
"types": "./lib/frameworks/polka/index.d.ts",
|
|
541
|
+
"default": "./lib/frameworks/polka/index.mjs"
|
|
542
|
+
},
|
|
543
|
+
"require": {
|
|
544
|
+
"types": "./lib/frameworks/polka/index.d.cts",
|
|
545
|
+
"default": "./lib/frameworks/polka/index.cjs"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"./lib/frameworks/polka": {
|
|
549
|
+
"import": {
|
|
550
|
+
"types": "./lib/frameworks/polka/index.d.ts",
|
|
551
|
+
"default": "./lib/frameworks/polka/index.mjs"
|
|
552
|
+
},
|
|
553
|
+
"require": {
|
|
554
|
+
"types": "./lib/frameworks/polka/index.d.cts",
|
|
555
|
+
"default": "./lib/frameworks/polka/index.cjs"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
533
558
|
"./frameworks/trpc": {
|
|
534
559
|
"import": {
|
|
535
560
|
"types": "./lib/frameworks/trpc/index.d.ts",
|