@como/como-client 0.7.1 → 0.7.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/lib/como.js CHANGED
@@ -262,36 +262,38 @@ var Como = function () {
262
262
  break;
263
263
 
264
264
  case 49:
265
- _context2.next = 59;
265
+ _context2.next = 60;
266
266
  break;
267
267
 
268
268
  case 51:
269
269
  _context2.prev = 51;
270
- _context2.next = 54;
270
+
271
+ console.error('signOn with, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',accessToken:' + accessToken);
272
+ _context2.next = 55;
271
273
  return this.comoData.initApi.signOn(installationId, locationId, source, accessToken);
272
274
 
273
- case 54:
274
- _context2.next = 59;
275
+ case 55:
276
+ _context2.next = 60;
275
277
  break;
276
278
 
277
- case 56:
278
- _context2.prev = 56;
279
+ case 57:
280
+ _context2.prev = 57;
279
281
  _context2.t2 = _context2['catch'](51);
280
282
 
281
283
  console.log('Failed signOn with accessToken, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',accessToken:' + accessToken + ', error:' + _context2.t2);
282
284
 
283
- case 59:
285
+ case 60:
284
286
  if (!this.comoData.token) {
285
287
  this.comoData.token = this.comoData.accessToken;
286
288
  }
287
289
  return _context2.abrupt('return', this.getCredentials());
288
290
 
289
- case 61:
291
+ case 62:
290
292
  case 'end':
291
293
  return _context2.stop();
292
294
  }
293
295
  }
294
- }, _callee2, this, [[17, 24], [32, 40], [51, 56]]);
296
+ }, _callee2, this, [[17, 24], [32, 40], [51, 57]]);
295
297
  }));
296
298
 
297
299
  function init(_x, _x2, _x3) {
@@ -40,15 +40,18 @@ exports.signOn = function (service) {
40
40
  if (accessToken) {
41
41
  headers['Authorization'] = "Bearer " + token;
42
42
  }
43
- _context.next = 5;
43
+ console.error("signOn(auth) with deviceId:" + deviceId + ", locationId:" + locationId + ", source:" + source + ",accessToken:" + accessToken + ", headers: " + headers);
44
+ _context.next = 6;
44
45
  return service.post('/auth/v2/auth/signOn', params, { headers: headers });
45
46
 
46
- case 5:
47
+ case 6:
47
48
  _ref2 = _context.sent;
48
49
  data = _ref2.data;
50
+
51
+ console.error("signOn(auth) result with data:" + data);
49
52
  return _context.abrupt("return", data);
50
53
 
51
- case 8:
54
+ case 10:
52
55
  case "end":
53
56
  return _context.stop();
54
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -132,10 +132,10 @@ class Como {
132
132
  }
133
133
  else{
134
134
  try{
135
+ console.error(`signOn with, installationId:${installationId}, locationId:${locationId}, source:${source},accessToken:${accessToken}`);
135
136
  await this.comoData.initApi.signOn(installationId, locationId, source, accessToken);
136
137
  }catch(e){
137
138
  console.log(`Failed signOn with accessToken, installationId:${installationId}, locationId:${locationId}, source:${source},accessToken:${accessToken}, error:${e}`);
138
-
139
139
  }
140
140
 
141
141
  }