backend-manager 4.2.18 → 4.2.19

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": "4.2.18",
3
+ "version": "4.2.19",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@firebase/rules-unit-testing": "^2.0.7",
45
- "@google-cloud/storage": "^7.15.1",
45
+ "@google-cloud/storage": "^7.16.0",
46
46
  "@octokit/rest": "^19.0.13",
47
47
  "@sendgrid/mail": "^7.7.0",
48
48
  "@sentry/node": "^6.19.7",
@@ -50,9 +50,9 @@
50
50
  "busboy": "^1.6.0",
51
51
  "chalk": "^4.1.2",
52
52
  "cors": "^2.8.5",
53
- "dotenv": "^16.4.7",
53
+ "dotenv": "^16.5.0",
54
54
  "express": "^4.21.2",
55
- "firebase-admin": "^13.1.0",
55
+ "firebase-admin": "^13.2.0",
56
56
  "firebase-functions": "^6.3.2",
57
57
  "fs-jetpack": "^5.1.0",
58
58
  "glob": "^11.0.1",
@@ -67,9 +67,9 @@
67
67
  "mime-types": "^2.1.35",
68
68
  "mocha": "^8.4.0",
69
69
  "moment": "^2.30.1",
70
- "nanoid": "^3.3.8",
70
+ "nanoid": "^3.3.11",
71
71
  "node-fetch": "^2.7.0",
72
- "node-powertools": "^2.1.5",
72
+ "node-powertools": "^2.2.0",
73
73
  "npm-api": "^1.0.1",
74
74
  "paypal-server-api": "^2.0.14",
75
75
  "pushid": "^1.0.0",
@@ -82,7 +82,7 @@
82
82
  "wonderful-fetch": "^1.3.3",
83
83
  "wonderful-log": "^1.0.7",
84
84
  "wonderful-version": "^1.3.2",
85
- "yaml": "^2.7.0",
85
+ "yaml": "^2.7.1",
86
86
  "yargs": "^17.7.2"
87
87
  },
88
88
  "devDependencies": {
@@ -480,6 +480,13 @@ BackendAssistant.prototype.respond = function(response, options) {
480
480
  const self = this;
481
481
  const res = self.ref.res;
482
482
 
483
+ // If response is a promise, wait for it to resolve and then call respond again with the resolved value
484
+ if (response && typeof response.then === 'function') {
485
+ return response
486
+ .then(resolved => self.respond(resolved, options))
487
+ .catch(error => self.respond(error, options));
488
+ }
489
+
483
490
  // Set options
484
491
  options = options || {};
485
492
  options.code = typeof options.code === 'undefined'