@sebspark/promise-cache 2.0.0 → 2.0.1

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/dist/index.js CHANGED
@@ -100,7 +100,8 @@ var Persistor = class {
100
100
  },
101
101
  maxRetries: 5,
102
102
  retryCondition: () => {
103
- console.log("Trying to connect!");
103
+ var _a;
104
+ console.log(`Trying to connect: ${this.clientId}, ${(_a = this.redis) == null ? void 0 : _a.name}`);
104
105
  return true;
105
106
  }
106
107
  };
@@ -118,11 +119,15 @@ var Persistor = class {
118
119
  throw new Error(`\u274C REDIS | Client Error | ${(_b2 = this.redis) == null ? void 0 : _b2.url} ${err}`);
119
120
  });
120
121
  this.client.on("connect", () => {
121
- var _a2, _b2;
122
+ var _a2, _b2, _c, _d;
122
123
  if (this.onSuccess) {
123
- this.onSuccess(`\u{1F4E6} REDIS | Connection Ready | ${(_a2 = this.redis) == null ? void 0 : _a2.url}`);
124
+ this.onSuccess(
125
+ `\u{1F4E6} REDIS | Connection Ready | ${(_a2 = this.redis) == null ? void 0 : _a2.name} | ${this.clientId} | ${(_b2 = this.redis) == null ? void 0 : _b2.url}`
126
+ );
124
127
  }
125
- console.log(`\u{1F4E6} REDIS | Connection Ready | ${(_b2 = this.redis) == null ? void 0 : _b2.url}`);
128
+ console.log(
129
+ `\u{1F4E6} REDIS | Connection Ready | ${(_c = this.redis) == null ? void 0 : _c.name}\xA0| ${this.clientId} | ${(_d = this.redis) == null ? void 0 : _d.url}`
130
+ );
126
131
  });
127
132
  return await this.client.connect();
128
133
  } catch (err) {
package/dist/index.mjs CHANGED
@@ -69,7 +69,8 @@ var Persistor = class {
69
69
  },
70
70
  maxRetries: 5,
71
71
  retryCondition: () => {
72
- console.log("Trying to connect!");
72
+ var _a;
73
+ console.log(`Trying to connect: ${this.clientId}, ${(_a = this.redis) == null ? void 0 : _a.name}`);
73
74
  return true;
74
75
  }
75
76
  };
@@ -87,11 +88,15 @@ var Persistor = class {
87
88
  throw new Error(`\u274C REDIS | Client Error | ${(_b2 = this.redis) == null ? void 0 : _b2.url} ${err}`);
88
89
  });
89
90
  this.client.on("connect", () => {
90
- var _a2, _b2;
91
+ var _a2, _b2, _c, _d;
91
92
  if (this.onSuccess) {
92
- this.onSuccess(`\u{1F4E6} REDIS | Connection Ready | ${(_a2 = this.redis) == null ? void 0 : _a2.url}`);
93
+ this.onSuccess(
94
+ `\u{1F4E6} REDIS | Connection Ready | ${(_a2 = this.redis) == null ? void 0 : _a2.name} | ${this.clientId} | ${(_b2 = this.redis) == null ? void 0 : _b2.url}`
95
+ );
93
96
  }
94
- console.log(`\u{1F4E6} REDIS | Connection Ready | ${(_b2 = this.redis) == null ? void 0 : _b2.url}`);
97
+ console.log(
98
+ `\u{1F4E6} REDIS | Connection Ready | ${(_c = this.redis) == null ? void 0 : _c.name}\xA0| ${this.clientId} | ${(_d = this.redis) == null ? void 0 : _d.url}`
99
+ );
95
100
  });
96
101
  return await this.client.connect();
97
102
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/promise-cache",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",