@sebspark/promise-cache 3.3.0 → 3.3.2

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
@@ -113,9 +113,14 @@ var Persistor = class {
113
113
  var _a;
114
114
  try {
115
115
  await new Promise((resolve, reject) => {
116
+ var _a2, _b, _c, _d, _e;
116
117
  this.client = CACHE_CLIENT({
117
- ...this.redis,
118
+ url: (_a2 = this.redis) == null ? void 0 : _a2.url,
119
+ username: (_b = this.redis) == null ? void 0 : _b.username,
120
+ password: (_c = this.redis) == null ? void 0 : _c.password,
121
+ pingInterval: ((_d = this.redis) == null ? void 0 : _d.pingInterval) || void 0,
118
122
  socket: {
123
+ ...(_e = this.redis) == null ? void 0 : _e.socket,
119
124
  reconnectStrategy: (retries, cause) => {
120
125
  console.error(cause);
121
126
  return 1e3 * 2 ** retries;
@@ -128,11 +133,11 @@ var Persistor = class {
128
133
  this.onSuccess();
129
134
  resolve(true);
130
135
  }).on("reconnecting", () => {
131
- var _a2;
132
- (_a2 = this.logger) == null ? void 0 : _a2.info("reconnecting...", this.clientId);
136
+ var _a3;
137
+ (_a3 = this.logger) == null ? void 0 : _a3.info("reconnecting...", this.clientId);
133
138
  }).on("end", () => {
134
- var _a2;
135
- (_a2 = this.logger) == null ? void 0 : _a2.info("end...", this.clientId);
139
+ var _a3;
140
+ (_a3 = this.logger) == null ? void 0 : _a3.info("end...", this.clientId);
136
141
  });
137
142
  this.client.connect();
138
143
  });
package/dist/index.mjs CHANGED
@@ -93,9 +93,14 @@ var Persistor = class {
93
93
  var _a;
94
94
  try {
95
95
  await new Promise((resolve, reject) => {
96
+ var _a2, _b, _c, _d, _e;
96
97
  this.client = CACHE_CLIENT({
97
- ...this.redis,
98
+ url: (_a2 = this.redis) == null ? void 0 : _a2.url,
99
+ username: (_b = this.redis) == null ? void 0 : _b.username,
100
+ password: (_c = this.redis) == null ? void 0 : _c.password,
101
+ pingInterval: ((_d = this.redis) == null ? void 0 : _d.pingInterval) || void 0,
98
102
  socket: {
103
+ ...(_e = this.redis) == null ? void 0 : _e.socket,
99
104
  reconnectStrategy: (retries, cause) => {
100
105
  console.error(cause);
101
106
  return 1e3 * 2 ** retries;
@@ -108,11 +113,11 @@ var Persistor = class {
108
113
  this.onSuccess();
109
114
  resolve(true);
110
115
  }).on("reconnecting", () => {
111
- var _a2;
112
- (_a2 = this.logger) == null ? void 0 : _a2.info("reconnecting...", this.clientId);
116
+ var _a3;
117
+ (_a3 = this.logger) == null ? void 0 : _a3.info("reconnecting...", this.clientId);
113
118
  }).on("end", () => {
114
- var _a2;
115
- (_a2 = this.logger) == null ? void 0 : _a2.info("end...", this.clientId);
119
+ var _a3;
120
+ (_a3 = this.logger) == null ? void 0 : _a3.info("end...", this.clientId);
116
121
  });
117
122
  this.client.connect();
118
123
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/promise-cache",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",