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
|
@@ -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 {
|
package/src/manager/index.js
CHANGED
|
@@ -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'
|
|
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,
|