backend-manager 3.0.53 → 3.0.54

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.0.53",
3
+ "version": "3.0.54",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -49,9 +49,6 @@ Usage.prototype.init = function (assistant, options) {
49
49
  return reject(new Error('Missing required {assistant} parameter'));
50
50
  }
51
51
 
52
- const localKey = (options.localKey || self.assistant.request.geolocation.ip || '')
53
- .replace(/[\.:]/g, '_');
54
-
55
52
  // Set options
56
53
  self.options = options;
57
54
 
@@ -61,6 +58,11 @@ Usage.prototype.init = function (assistant, options) {
61
58
  // Setup storage
62
59
  self.storage = Manager.storage({name: 'usage', temporary: true, clear: options.clear, log: options.log});
63
60
 
61
+ // Set local key
62
+ const localKey = (options.localKey || self.assistant.request.geolocation.ip || '')
63
+ .replace(/[\.:]/g, '_');
64
+
65
+ // Set paths
64
66
  self.paths.user = `users.${localKey}`;
65
67
  self.paths.app = `apps.${options.app}`;
66
68