@como/como-client 0.7.5 → 0.7.51

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/lib/como.js CHANGED
@@ -218,7 +218,7 @@ var Como = function () {
218
218
  _context2.prev = 24;
219
219
  _context2.t0 = _context2['catch'](17);
220
220
 
221
- console.log('Failed to refresh token, installationId:' + installationId + ', refreshToken:' + this.comoData.refreshToken + ', locationId:' + locationId + ', source:' + source);
221
+ console.error('Failed to refresh token, installationId:' + installationId + ', refreshToken:' + this.comoData.refreshToken + ', locationId:' + locationId + ', source:' + source);
222
222
  //refresh failed - need to revoke and signOn again
223
223
  initService.logError({ method: 'refreshToken', installationId: installationId, locationId: locationId, source: source, refreshToken: refreshToken });
224
224
  refreshFailed = true;
@@ -253,7 +253,7 @@ var Como = function () {
253
253
  _context2.prev = 40;
254
254
  _context2.t1 = _context2['catch'](32);
255
255
 
256
- console.log('Failed to signOn, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',interval:' + interval + ', error:' + _context2.t1);
256
+ console.error('Failed to signOn, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',interval:' + interval + ', error:' + _context2.t1);
257
257
  interval += 1000;
258
258
  initService.logError({ method: 'signOn', installationId: installationId, locationId: locationId, source: source, refreshToken: refreshToken, interval: interval });
259
259
  _context2.next = 47;
@@ -291,7 +291,7 @@ var Como = function () {
291
291
  _context2.prev = 60;
292
292
  _context2.t2 = _context2['catch'](51);
293
293
 
294
- console.log('Failed signOn with accessToken, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',accessToken:' + accessToken + ', error:' + _context2.t2);
294
+ console.error('Failed signOn with accessToken, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',accessToken:' + accessToken + ', error:' + _context2.t2);
295
295
 
296
296
  case 63:
297
297
  if (!this.comoData.token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.5",
3
+ "version": "0.7.51",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -109,7 +109,7 @@ class Como {
109
109
  const data = await this.comoData.initApi.refreshToken(installationId, refreshToken? refreshToken: 'none', locationId, source);
110
110
  updateCredentials(data, true);
111
111
  }catch(e){
112
- console.log(`Failed to refresh token, installationId:${installationId}, refreshToken:${this.comoData.refreshToken}, locationId:${locationId}, source:${source}`);
112
+ console.error(`Failed to refresh token, installationId:${installationId}, refreshToken:${this.comoData.refreshToken}, locationId:${locationId}, source:${source}`);
113
113
  //refresh failed - need to revoke and signOn again
114
114
  initService.logError({method: 'refreshToken', installationId, locationId, source, refreshToken});
115
115
  refreshFailed = true;
@@ -123,7 +123,7 @@ class Como {
123
123
  updateCredentials(data, true);
124
124
  credExist = true;
125
125
  }catch(e){
126
- console.log(`Failed to signOn, installationId:${installationId}, locationId:${locationId}, source:${source},interval:${interval}, error:${e}`);
126
+ console.error(`Failed to signOn, installationId:${installationId}, locationId:${locationId}, source:${source},interval:${interval}, error:${e}`);
127
127
  interval += 1000;
128
128
  initService.logError({method: 'signOn', installationId, locationId, source, refreshToken, interval});
129
129
  await new Promise(r => setTimeout(r, interval));
@@ -140,7 +140,7 @@ class Como {
140
140
  updateCredentials(data, true);
141
141
  }
142
142
  }catch(e){
143
- console.log(`Failed signOn with accessToken, installationId:${installationId}, locationId:${locationId}, source:${source},accessToken:${accessToken}, error:${e}`);
143
+ console.error(`Failed signOn with accessToken, installationId:${installationId}, locationId:${locationId}, source:${source},accessToken:${accessToken}, error:${e}`);
144
144
  }
145
145
  }
146
146
  if(!this.comoData.token){