backend-manager 3.1.6 → 3.1.7

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.1.6",
3
+ "version": "3.1.7",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -34,11 +34,11 @@ Middleware.prototype.run = function (library, req, res, options) {
34
34
  // Log
35
35
  assistant.log(`Middleware.process(): Request (${geolocation.ip} @ ${geolocation.country}, ${geolocation.region}, ${geolocation.city})`, JSON.stringify(data));
36
36
 
37
- const basePath = path.resolve(process.cwd(), library.replace('.js', ''));
37
+ const basePath = path.resolve(process.cwd(), `methods/${library.replace('.js', '')}`);
38
38
 
39
39
  // Load library
40
40
  try {
41
- library = path.resolve(basePath, `methods/${basePath}/index.js`);
41
+ library = path.resolve(basePath, `index.js`);
42
42
  library = new (require(library))();
43
43
  } catch (e) {
44
44
  return assistant.errorify(`Unable to load library @ (${library}): ${e.message}`, {sentry: true, send: true, log: true});
@@ -70,7 +70,7 @@ Middleware.prototype.run = function (library, req, res, options) {
70
70
  if (options.setupSettings) {
71
71
  // try {
72
72
  // const planId = assistant.request.user.plan.id;
73
- // let settings = path.resolve(basePath, `methods/${basePath}/settings.js`);
73
+ // let settings = path.resolve(basePath, `settings.js`);
74
74
  // settings = require(settings)(assistant)[planId];
75
75
  // assistant.request.data = powertools.defaults(data, settings);
76
76
  // } catch (e) {