homebridge-flume 3.0.2 → 3.0.3-beta.0

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,5 @@
1
1
  import axios from 'axios';
2
- import jwtDecode from 'jwt-decode';
2
+ import { jwtDecode } from 'jwt-decode';
3
3
  import platformConsts from '../utils/constants.js';
4
4
  import { sleep } from '../utils/functions.js';
5
5
  import platformLang from '../utils/lang-en.js';
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRequire } from 'module';
1
+ import { createRequire } from 'node:module';
2
2
  import flumePlatform from './platform.js';
3
3
 
4
4
  const require = createRequire(import.meta.url);
package/lib/platform.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRequire } from 'module';
1
+ import { createRequire } from 'node:module';
2
2
  import httpClient from './connection/http.js';
3
3
  import deviceLeakSensor from './device/leak-sensor.js';
4
4
  import platformConsts from './utils/constants.js';
@@ -1,4 +1,4 @@
1
- import { inherits } from 'util';
1
+ import { inherits } from 'node:util';
2
2
 
3
3
  export default class {
4
4
  constructor(api) {
@@ -13,8 +13,8 @@ export default class {
13
13
  this.TodayUsage = function TodayUsage() {
14
14
  self.hapChar.call(this, 'Today Usage', self.uuids.todayUsage);
15
15
  this.setProps({
16
- format: self.hapChar.Formats.UINT32,
17
- perms: [self.hapChar.Perms.READ, self.hapChar.Perms.NOTIFY],
16
+ format: api.hap.Formats.UINT32,
17
+ perms: [api.hap.Perms.READ, api.hap.Perms.NOTIFY],
18
18
  unit: 'Gallons',
19
19
  });
20
20
  this.value = this.getDefaultValue();
@@ -22,8 +22,8 @@ export default class {
22
22
  this.MonthUsage = function MonthUsage() {
23
23
  self.hapChar.call(this, 'Month Usage', self.uuids.monthUsage);
24
24
  this.setProps({
25
- format: self.hapChar.Formats.UINT32,
26
- perms: [self.hapChar.Perms.READ, self.hapChar.Perms.NOTIFY],
25
+ format: api.hap.Formats.UINT32,
26
+ perms: [api.hap.Perms.READ, api.hap.Perms.NOTIFY],
27
27
  unit: 'Gallons',
28
28
  });
29
29
  this.value = this.getDefaultValue();
@@ -31,8 +31,8 @@ export default class {
31
31
  this.PrevMonthUsage = function PrevMonthUsage() {
32
32
  self.hapChar.call(this, 'Previous Month', self.uuids.prevMonthUsage);
33
33
  this.setProps({
34
- format: self.hapChar.Formats.UINT32,
35
- perms: [self.hapChar.Perms.READ, self.hapChar.Perms.NOTIFY],
34
+ format: api.hap.Formats.UINT32,
35
+ perms: [api.hap.Perms.READ, api.hap.Perms.NOTIFY],
36
36
  unit: 'Gallons',
37
37
  });
38
38
  this.value = this.getDefaultValue();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-flume",
3
3
  "alias": "Flume",
4
- "version": "3.0.2",
4
+ "version": "3.0.3-beta.0",
5
5
  "author": {
6
6
  "name": "Ben Potter",
7
7
  "email": "bwp91@icloud.com"
@@ -28,12 +28,12 @@
28
28
  "rebuild": "rm -rf package-lock.json && rm -rf node_modules && npm install"
29
29
  },
30
30
  "engines": {
31
- "homebridge": "^1.6.0 || 2.0.0-beta.0",
32
- "node": "^16.19.1 || ^18.15.0"
31
+ "homebridge": "^1.6.0 || 2.0.0",
32
+ "node": "^18.20.4 || ^20.15.1 || ^22.5.1"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
36
- "url": "https://github.com/bwp91/homebridge-flume.git"
36
+ "url": "git+https://github.com/bwp91/homebridge-flume.git"
37
37
  },
38
38
  "bugs": {
39
39
  "url": "https://github.com/bwp91/homebridge-flume/issues"
@@ -57,15 +57,15 @@
57
57
  }
58
58
  ],
59
59
  "dependencies": {
60
- "@homebridge/plugin-ui-utils": "^0.0.19",
61
- "axios": "^1.3.4",
62
- "jwt-decode": "^3.1.2"
60
+ "@homebridge/plugin-ui-utils": "^1.0.3",
61
+ "axios": "^1.7.2",
62
+ "jwt-decode": "^4.0.0"
63
63
  },
64
64
  "devDependencies": {
65
+ "eslint": "^8.57.0",
65
66
  "eslint-config-airbnb-base": "^15.0.0",
66
- "eslint-plugin-import": "^2.27.5",
67
- "eslint-plugin-import-newlines": "^1.3.1",
68
- "eslint-plugin-sort-exports": "^0.8.0",
69
- "eslint": "^8.36.0"
67
+ "eslint-plugin-import": "^2.29.1",
68
+ "eslint-plugin-import-newlines": "^1.4.0",
69
+ "eslint-plugin-sort-exports": "^0.9.1"
70
70
  }
71
71
  }