backend-manager 2.5.61 → 2.5.62

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": "2.5.61",
3
+ "version": "2.5.62",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -62,4 +62,4 @@
62
62
  "wonderful-fetch": "^0.0.17",
63
63
  "yargs": "^17.7.1"
64
64
  }
65
- }
65
+ }
@@ -60,14 +60,29 @@ Module.prototype.signOutOfSession = function (uid, session) {
60
60
  .then(async (snap) => {
61
61
  const data = snap.val() || {};
62
62
  const keys = Object.keys(data);
63
+
63
64
  for (var i = 0; i < keys.length; i++) {
64
65
  const key = keys[i];
66
+
65
67
  self.assistant.log(`Signing out: ${key}`, {environment: 'production'});
66
- await self.libraries.admin.database().ref(`${session}/${key}/command`).set('signout').catch(e => self.assistant.error(`Failed to signout ${key}`, e))
68
+
69
+ // Send signout command
70
+ await self.libraries.admin.database().ref(`${session}/${key}/command`)
71
+ .set('signout')
72
+ .catch(e => self.assistant.error(`Failed to signout of session ${key}`, e))
73
+
67
74
  // await powertools.wait(3000);
68
- // await self.libraries.admin.database().ref(`${session}/${key}`).remove().catch(e => self.assistant.error(`Failed to delete ${key}`, e))
75
+
76
+ // Delete session
77
+ setTimeout(function () {
78
+ self.libraries.admin.database().ref(`${session}/${key}`)
79
+ .remove()
80
+ .catch(e => self.assistant.error(`Failed to delete session ${key}`, e))
81
+ }, 30000);
82
+
69
83
  count++;
70
84
  }
85
+
71
86
  return resolve(count);
72
87
  })
73
88
  .catch(e => {