@h4ad/serverless-adapter 2.5.1 → 2.6.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.
@@ -0,0 +1,18 @@
1
+ /// <reference types="node" />
2
+ import { IncomingMessage, ServerResponse } from 'http';
3
+ import { FrameworkContract, HandlerContract } from '../../contracts';
4
+ /**
5
+ * The class that implements a handler for Firebase Https Events
6
+ *
7
+ * @remarks Read more about Https Events {@link https://firebase.google.com/docs/functions/http-events | here}
8
+ *
9
+ * @breadcrumb Handlers / HttpFirebaseHandler
10
+ * @public
11
+ */
12
+ export declare class HttpFirebaseHandler<TApp> implements HandlerContract<TApp, never, never, never, void, void | Promise<void>> {
13
+ /**
14
+ * {@inheritDoc}
15
+ */
16
+ getHandler(app: TApp, framework: FrameworkContract<TApp>): (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;
17
+ }
18
+ //# sourceMappingURL=http-firebase.handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-firebase.handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/firebase/http-firebase.handler.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIrE;;;;;;;GAOG;AACH,qBAAa,mBAAmB,CAAC,IAAI,CACnC,YACE,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAIxE;;OAEG;IACI,UAAU,CACf,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,iBAAiB,CAAC,IAAI,CAAC,GACjC,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CASvE"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ //#region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.HttpFirebaseHandler = void 0;
5
+ const firebase_functions_1 = require("firebase-functions");
6
+ //#endregion
7
+ /**
8
+ * The class that implements a handler for Firebase Https Events
9
+ *
10
+ * @remarks Read more about Https Events {@link https://firebase.google.com/docs/functions/http-events | here}
11
+ *
12
+ * @breadcrumb Handlers / HttpFirebaseHandler
13
+ * @public
14
+ */
15
+ class HttpFirebaseHandler {
16
+ //#region Public Methods
17
+ /**
18
+ * {@inheritDoc}
19
+ */
20
+ getHandler(app, framework) {
21
+ return firebase_functions_1.https.onRequest((request, response) => {
22
+ return framework.sendRequest(app, request, response);
23
+ });
24
+ }
25
+ }
26
+ exports.HttpFirebaseHandler = HttpFirebaseHandler;
27
+ //# sourceMappingURL=http-firebase.handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-firebase.handler.js","sourceRoot":"","sources":["../../../src/handlers/firebase/http-firebase.handler.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;AAGjB,2DAA2C;AAG3C,YAAY;AAEZ;;;;;;;GAOG;AACH,MAAa,mBAAmB;IAI9B,wBAAwB;IAExB;;OAEG;IACI,UAAU,CACf,GAAS,EACT,SAAkC;QAElC,OAAO,0BAAK,CAAC,SAAS,CACpB,CAAC,OAAwB,EAAE,QAAwB,EAAE,EAAE;YACrD,OAAO,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QACvD,CAAC,CACF,CAAC;IACJ,CAAC;CAGF;AArBD,kDAqBC"}
@@ -0,0 +1,2 @@
1
+ export * from './http-firebase.handler';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/firebase/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./http-firebase.handler"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/firebase/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h4ad/serverless-adapter",
3
- "version": "2.5.1",
3
+ "version": "2.6.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, Huawei and many other clouds.",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -57,7 +57,10 @@
57
57
  "trpc",
58
58
  "azure",
59
59
  "azure-functions",
60
- "http-trigger-v4"
60
+ "http-trigger-v4",
61
+ "firebase",
62
+ "firebase-functions",
63
+ "firebase-http-events"
61
64
  ],
62
65
  "bugs": {
63
66
  "url": "https://github.com/H4ad/serverless-adapter/issues"
@@ -110,6 +113,9 @@
110
113
  "express": ">= 4.15.4",
111
114
  "fastify": ">= 3.0.0",
112
115
  "fastify-3": "npm:fastify@3.29.0",
116
+ "firebase-admin": ">= 8.0.0",
117
+ "firebase-admin-8": "npm:firebase-admin@^8.0.0",
118
+ "firebase-functions": ">= 3.0.0",
113
119
  "koa": ">= 2.5.1"
114
120
  },
115
121
  "peerDependenciesMeta": {
@@ -125,25 +131,34 @@
125
131
  "@types/aws-lambda": {
126
132
  "optional": true
127
133
  },
134
+ "@types/express": {
135
+ "optional": true
136
+ },
137
+ "@types/hapi": {
138
+ "optional": true
139
+ },
140
+ "@types/koa": {
141
+ "optional": true
142
+ },
128
143
  "express": {
129
144
  "optional": true
130
145
  },
131
146
  "fastify": {
132
147
  "optional": true
133
148
  },
134
- "koa": {
149
+ "fastify-3": {
135
150
  "optional": true
136
151
  },
137
- "@types/express": {
152
+ "firebase-admin": {
138
153
  "optional": true
139
154
  },
140
- "@types/hapi": {
155
+ "firebase-admin-8": {
141
156
  "optional": true
142
157
  },
143
- "@types/koa": {
158
+ "firebase-functions": {
144
159
  "optional": true
145
160
  },
146
- "fastify-3": {
161
+ "koa": {
147
162
  "optional": true
148
163
  }
149
164
  },