backend-manager 3.2.115 → 3.2.116

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.115",
3
+ "version": "3.2.116",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -50,6 +50,11 @@ Middleware.prototype.run = function (libPath, options) {
50
50
  const routesDir = path.resolve(options.routesDir, libPath.replace('.js', ''));
51
51
  const schemasDir = path.resolve(options.schemasDir);
52
52
 
53
+ // Wakeup trigger (quit immediately if wakeup is true to avoid cold start on a future request)
54
+ if (data.wakeup) {
55
+ return assistant.respond({wakeup: true});
56
+ }
57
+
53
58
  // Load library
54
59
  let library;
55
60
  try {
@@ -68,7 +68,9 @@ Manager.prototype.init = function (exporter, options) {
68
68
  // Load libraries
69
69
  self.libraries = {
70
70
  // Third-party
71
- functions: options.projectType === 'firebase' ? require('firebase-functions') : null,
71
+ functions: options.projectType === 'firebase'
72
+ ? require('firebase-functions')
73
+ : null,
72
74
  admin: require('firebase-admin'),
73
75
  cors: require('cors')({ origin: true }),
74
76
  sentry: null,