@nattyjs/firebase-functions 0.0.1-beta.10
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/README.md +11 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +14 -0
- package/package.json +29 -0
package/README.md
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const express = require('@nattyjs/express');
|
|
4
|
+
const firebaseFunctions = require('firebase-functions');
|
|
5
|
+
const common = require('@nattyjs/common');
|
|
6
|
+
|
|
7
|
+
const FirebaseFunctionModule = {
|
|
8
|
+
init(config) {
|
|
9
|
+
config.autoGeneratePort = false;
|
|
10
|
+
config.framework = common.FrameworkType.Firebase;
|
|
11
|
+
const app = express.ExpressModule.init(config);
|
|
12
|
+
return firebaseFunctions.https.onRequest(app);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.FirebaseFunctionModule = FirebaseFunctionModule;
|
package/dist/index.d.ts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExpressModule } from '@nattyjs/express';
|
|
2
|
+
import { https } from 'firebase-functions';
|
|
3
|
+
import { FrameworkType } from '@nattyjs/common';
|
|
4
|
+
|
|
5
|
+
const FirebaseFunctionModule = {
|
|
6
|
+
init(config) {
|
|
7
|
+
config.autoGeneratePort = false;
|
|
8
|
+
config.framework = FrameworkType.Firebase;
|
|
9
|
+
const app = ExpressModule.init(config);
|
|
10
|
+
return https.onRequest(app);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { FirebaseFunctionModule };
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nattyjs/firebase-functions",
|
|
3
|
+
"version": "0.0.1-beta.10",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "ajayojha <ojhaajay@outlook.com>",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "unbuild"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"firebase-functions": "4.4.1",
|
|
19
|
+
"firebase-admin": "11.10.1",
|
|
20
|
+
"@nattyjs/express": "0.0.1-beta.11",
|
|
21
|
+
"@nattyjs/core": "0.0.1-beta.11",
|
|
22
|
+
"@nattyjs/common": "0.0.1-beta.11",
|
|
23
|
+
"@nattyjs/types": "0.0.1-beta.11"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "20.3.1",
|
|
27
|
+
"unbuild": "1.2.1"
|
|
28
|
+
}
|
|
29
|
+
}
|