homebridge-xbox-tv 3.2.0 → 3.2.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.
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  import { HomebridgePluginUiServer } from '@homebridge/plugin-ui-utils';
4
2
  import Authentication from '../src/webApi/authentication.js';
5
3
 
package/index.js CHANGED
@@ -1,7 +1,5 @@
1
- 'use strict';
2
- import fs from 'fs';
3
1
  import { join } from 'path';
4
- import { mkdirSync } from 'fs';
2
+ import { mkdirSync, existsSync, writeFileSync } from 'fs';
5
3
  import XboxDevice from './src/xboxdevice.js';
6
4
  import ImpulseGenerator from './src/impulsegenerator.js';
7
5
  import { PluginName, PlatformName } from './src/constants.js';
@@ -69,8 +67,8 @@ class XboxPlatform {
69
67
  ];
70
68
 
71
69
  files.forEach((file) => {
72
- if (!fs.existsSync(file)) {
73
- fs.writeFileSync(file, '');
70
+ if (!existsSync(file)) {
71
+ writeFileSync(file, '');
74
72
  }
75
73
  });
76
74
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "3.2.0",
4
+ "version": "3.2.1",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -17,7 +17,9 @@
17
17
  "url": "https://github.com/grzegorz914/homebridge-xbox-tv/issues"
18
18
  },
19
19
  "type": "module",
20
- "main": "index.js",
20
+ "exports": {
21
+ ".": "./index.js"
22
+ },
21
23
  "files": [
22
24
  "src",
23
25
  "homebridge-ui",
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import EventEmitter from 'events';
3
2
 
4
3
  class ImpulseGenerator extends EventEmitter {
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import HexToBin from 'hex-to-binary';
3
2
  import Packets from './packets.js';
4
3
  import Structure from './structure.js';
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import { LocalApi } from '../constants.js';
3
2
 
4
3
  class Packets {
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import JsRsaSign from 'jsrsasign';
3
2
  import Crypto from 'crypto';
4
3
  import { EOL } from 'os';
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import Packets from './packets.js';
3
2
  import Structure from './structure.js';
4
3
 
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  class Structure {
4
2
  constructor(packet) {
5
3
  packet = packet === undefined ? Buffer.from('') : packet;
@@ -1,6 +1,4 @@
1
- "use strict";
2
- import { promises } from 'fs';
3
- const fsPromises = promises;
1
+ import { promises as fsPromises } from 'fs';
4
2
  import Dgram from 'dgram';
5
3
  import Net from 'net';
6
4
  import { parse as UuIdParse, v4 as UuIdv4 } from 'uuid';
package/src/mqtt.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import asyncMqtt from 'async-mqtt';
3
2
  const { connectAsync } = asyncMqtt;
4
3
  import EventEmitter from 'events';
package/src/restful.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  import express, { json } from 'express';
3
2
  import EventEmitter from 'events';
4
3
 
@@ -1,6 +1,4 @@
1
- 'use strict';
2
- import { promises } from 'fs';
3
- const fsPromises = promises;
1
+ import { promises as fsPromises } from 'fs';
4
2
  import QueryString from 'querystring';
5
3
  import axios from 'axios';
6
4
  import { WebApi } from '../constants.js';
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class Archivements {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import QueryString from 'querystring';
3
2
  import axios from 'axios';
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import QueryString from 'querystring';
3
2
  import axios from 'axios';
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class Messages {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class People {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class Pins {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import QueryString from 'querystring';
3
2
  import axios from 'axios';
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class Social {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class TitleHub {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class UserPresence {
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
  import axios from 'axios';
3
2
 
4
3
  class UserStats {
@@ -1,6 +1,4 @@
1
- 'use strict';
2
- import { promises } from 'fs';
3
- const fsPromises = promises;
1
+ import { promises as fsPromises } from 'fs';
4
2
  import EventEmitter from 'events';
5
3
  import { v4 as UuIdv4 } from 'uuid';
6
4
  import axios from 'axios';
package/src/xboxdevice.js CHANGED
@@ -1,6 +1,4 @@
1
- "use strict";
2
- import { promises } from 'fs';
3
- const fsPromises = promises;
1
+ import { promises as fsPromises } from 'fs';
4
2
  import EventEmitter from 'events';
5
3
  import RestFul from './restful.js';
6
4
  import Mqtt from './mqtt.js';