homebridge-xbox-tv 3.0.3 → 3.0.4

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,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "3.0.3",
4
+ "version": "3.0.4",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/restful.js CHANGED
@@ -37,7 +37,7 @@ class RestFul extends EventEmitter {
37
37
  });
38
38
 
39
39
  } catch (error) {
40
- this.emit('error', `RESTful error: ${error}`)
40
+ this.emit('error', `RESTful Connect error: ${error}`)
41
41
  }
42
42
  };
43
43
 
@@ -65,7 +65,7 @@ class RestFul extends EventEmitter {
65
65
  this.restFulData.status = data;
66
66
  break;
67
67
  default:
68
- this.emit('debug', `RESTFul update unknown path: ${path}, data: ${data}`)
68
+ this.emit('error', `RESTFul update unknown path: ${path}, data: ${data}`)
69
69
  break;
70
70
  };
71
71
  const emitDebug = this.restFulDebug ? this.emit('debug', `RESTFul update path: ${path}, data: ${JSON.stringify(data, null, 2)}`) : false;
package/src/xboxdevice.js CHANGED
@@ -187,7 +187,7 @@ class XboxDevice extends EventEmitter {
187
187
  this.emit('debug', debug);
188
188
  })
189
189
  .on('warn', (warn) => {
190
- this.emit('waen', warn);
190
+ this.emit('warn', warn);
191
191
  })
192
192
  .on('error', (error) => {
193
193
  this.emit('error', error);
@@ -334,11 +334,11 @@ class XboxDevice extends EventEmitter {
334
334
  this.restFulConnected = true;
335
335
  this.emit('message', message);
336
336
  })
337
- .on('error', (error) => {
338
- this.emit('error', error);
339
- })
340
337
  .on('debug', (debug) => {
341
338
  this.emit('debug', debug);
339
+ })
340
+ .on('error', (error) => {
341
+ this.emit('warn', error);
342
342
  });
343
343
  }
344
344
 
@@ -426,7 +426,7 @@ class XboxDevice extends EventEmitter {
426
426
  this.emit('debug', debug);
427
427
  })
428
428
  .on('error', (error) => {
429
- this.emit('error', error);
429
+ this.emit('warn', error);
430
430
  });
431
431
  };
432
432
 
@@ -469,7 +469,7 @@ class XboxDevice extends EventEmitter {
469
469
  this.emit('debug', debug);
470
470
  })
471
471
  .on('warn', (warn) => {
472
- this.emit('waen', warn);
472
+ this.emit('warn', warn);
473
473
  })
474
474
  .on('error', (error) => {
475
475
  this.emit('error', error);