backend-manager 3.2.1 → 3.2.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-manager",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Quick tools for developing Firebase functions",
|
|
5
5
|
"main": "src/manager/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"wonderful-log": "^1.0.5",
|
|
71
71
|
"yargs": "^17.7.2"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const powertools = require('node-powertools');
|
|
8
8
|
|
|
9
|
-
function Middleware(m) {
|
|
9
|
+
function Middleware(m, req, res) {
|
|
10
10
|
const self = this;
|
|
11
11
|
|
|
12
12
|
self.Manager = m;
|
|
13
|
+
self.req = req;
|
|
14
|
+
self.res = res;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
Middleware.prototype.run = function (library,
|
|
17
|
+
Middleware.prototype.run = function (library, options) {
|
|
16
18
|
const self = this;
|
|
17
19
|
const Manager = self.Manager;
|
|
20
|
+
const req = self.req;
|
|
21
|
+
const res = self.res;
|
|
18
22
|
const { cors } = Manager.libraries;
|
|
19
23
|
|
|
20
24
|
return cors(req, res, async () => {
|