node-switchbot 2.3.1-beta.3 → 2.4.0-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.
Files changed (83) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/advertising.d.ts +137 -6
  3. package/dist/advertising.d.ts.map +1 -1
  4. package/dist/advertising.js +19 -17
  5. package/dist/advertising.js.map +1 -1
  6. package/dist/device/woblindtilt.d.ts +3 -25
  7. package/dist/device/woblindtilt.d.ts.map +1 -1
  8. package/dist/device/woblindtilt.js +31 -135
  9. package/dist/device/woblindtilt.js.map +1 -1
  10. package/dist/device/wobulb.d.ts +1 -0
  11. package/dist/device/wobulb.d.ts.map +1 -1
  12. package/dist/device/wobulb.js +31 -37
  13. package/dist/device/wobulb.js.map +1 -1
  14. package/dist/device/woceilinglight.d.ts +1 -0
  15. package/dist/device/woceilinglight.d.ts.map +1 -1
  16. package/dist/device/woceilinglight.js +51 -57
  17. package/dist/device/woceilinglight.js.map +1 -1
  18. package/dist/device/wocontact.d.ts +1 -0
  19. package/dist/device/wocontact.d.ts.map +1 -1
  20. package/dist/device/wocontact.js +7 -11
  21. package/dist/device/wocontact.js.map +1 -1
  22. package/dist/device/wocurtain.d.ts +13 -1
  23. package/dist/device/wocurtain.d.ts.map +1 -1
  24. package/dist/device/wocurtain.js +31 -46
  25. package/dist/device/wocurtain.js.map +1 -1
  26. package/dist/device/wohand.d.ts +1 -0
  27. package/dist/device/wohand.d.ts.map +1 -1
  28. package/dist/device/wohand.js +7 -6
  29. package/dist/device/wohand.js.map +1 -1
  30. package/dist/device/wohub2.d.ts +1 -0
  31. package/dist/device/wohub2.d.ts.map +1 -1
  32. package/dist/device/wohub2.js +1 -5
  33. package/dist/device/wohub2.js.map +1 -1
  34. package/dist/device/wohumi.d.ts +1 -0
  35. package/dist/device/wohumi.d.ts.map +1 -1
  36. package/dist/device/wohumi.js +7 -6
  37. package/dist/device/wohumi.js.map +1 -1
  38. package/dist/device/woiosensorth.d.ts +4 -1
  39. package/dist/device/woiosensorth.d.ts.map +1 -1
  40. package/dist/device/woiosensorth.js +3 -5
  41. package/dist/device/woiosensorth.js.map +1 -1
  42. package/dist/device/woplugmini.d.ts +1 -0
  43. package/dist/device/woplugmini.d.ts.map +1 -1
  44. package/dist/device/woplugmini.js +19 -19
  45. package/dist/device/woplugmini.js.map +1 -1
  46. package/dist/device/wopresence.d.ts +1 -0
  47. package/dist/device/wopresence.d.ts.map +1 -1
  48. package/dist/device/wopresence.js +10 -14
  49. package/dist/device/wopresence.js.map +1 -1
  50. package/dist/device/wosensorth.d.ts +7 -2
  51. package/dist/device/wosensorth.d.ts.map +1 -1
  52. package/dist/device/wosensorth.js +6 -6
  53. package/dist/device/wosensorth.js.map +1 -1
  54. package/dist/device/wosmartlock.d.ts +2 -1
  55. package/dist/device/wosmartlock.d.ts.map +1 -1
  56. package/dist/device/wosmartlock.js +42 -41
  57. package/dist/device/wosmartlock.js.map +1 -1
  58. package/dist/device/wosmartlockpro.d.ts +3 -2
  59. package/dist/device/wosmartlockpro.d.ts.map +1 -1
  60. package/dist/device/wosmartlockpro.js +41 -40
  61. package/dist/device/wosmartlockpro.js.map +1 -1
  62. package/dist/device/wostrip.d.ts +3 -2
  63. package/dist/device/wostrip.d.ts.map +1 -1
  64. package/dist/device/wostrip.js +29 -35
  65. package/dist/device/wostrip.js.map +1 -1
  66. package/dist/device.d.ts +12 -9
  67. package/dist/device.d.ts.map +1 -1
  68. package/dist/device.js +17 -14
  69. package/dist/device.js.map +1 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js.map +1 -1
  72. package/dist/parameter-checker.d.ts +3 -3
  73. package/dist/parameter-checker.d.ts.map +1 -1
  74. package/dist/parameter-checker.js +25 -67
  75. package/dist/parameter-checker.js.map +1 -1
  76. package/dist/switchbot.d.ts +4 -4
  77. package/dist/switchbot.d.ts.map +1 -1
  78. package/dist/switchbot.js +16 -18
  79. package/dist/switchbot.js.map +1 -1
  80. package/dist/types.d.ts +2 -2
  81. package/dist/types.d.ts.map +1 -1
  82. package/eslint.config.js +41 -76
  83. package/package.json +38 -38
package/package.json CHANGED
@@ -1,27 +1,36 @@
1
1
  {
2
- "version": "2.3.1-beta.3",
3
2
  "name": "node-switchbot",
3
+ "type": "module",
4
+ "version": "2.4.0-beta.0",
4
5
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
5
- "homepage": "https://github.com/OpenWonderLabs/node-switchbot",
6
6
  "author": "OpenWonderLabs (https://github.com/OpenWonderLabs)",
7
7
  "license": "MIT",
8
+ "homepage": "https://github.com/OpenWonderLabs/node-switchbot",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "https://github.com/OpenWonderLabs/node-switchbot.git"
11
12
  },
12
- "bugs": {
13
- "url": "https://github.com/OpenWonderLabs/node-switchbot/issues"
14
- },
15
- "engines": {
16
- "node": "^18 || ^20 || ^22"
17
- },
13
+ "keywords": [
14
+ "switchbot",
15
+ "bot",
16
+ "meter",
17
+ "temperature",
18
+ "humidity",
19
+ "curtain",
20
+ "blind",
21
+ "BLE",
22
+ "Bluetooth Low Energy",
23
+ "Bluetooth smart",
24
+ "Bluetooth"
25
+ ],
18
26
  "main": "dist/index.js",
19
- "type": "module",
20
27
  "scripts": {
21
28
  "check": "npm install && npm outdated",
22
29
  "update": "ncu -u && npm update && npm install",
23
30
  "lint": "eslint src/**/*.ts",
31
+ "fix": "eslint src/**/*.ts --fix",
24
32
  "watch": "npm run build && npm link && nodemon",
33
+ "plugin-ui": "rsync ./src/homebridge-ui/public/index.html ./dist/homebridge-ui/public/",
25
34
  "build": "npm run clean && tsc",
26
35
  "prepublishOnly": "npm run lint && npm run build",
27
36
  "postpublish": "npm run clean",
@@ -30,43 +39,34 @@
30
39
  "docs": "typedoc",
31
40
  "lint-docs": "typedoc --emit none --treatWarningsAsErrors"
32
41
  },
33
- "keywords": [
34
- "switchbot",
35
- "bot",
36
- "meter",
37
- "temperature",
38
- "humidity",
39
- "curtain",
40
- "blind",
41
- "BLE",
42
- "Bluetooth Low Energy",
43
- "Bluetooth smart",
44
- "Bluetooth"
45
- ],
46
42
  "readmeFilename": "README.md",
47
- "dependencies": {
48
- "@stoprocent/noble": "^1.14.1",
49
- "async-mutex": "^0.5.0"
50
- },
51
43
  "optionalDependencies": {
52
- "@stoprocent/bluetooth-hci-socket": "^1.2.1"
44
+ "@stoprocent/bluetooth-hci-socket": "^1.2.1",
45
+ "@stoprocent/noble": "^1.14.1"
53
46
  },
54
47
  "devDependencies": {
55
- "@eslint/js": "^9.8.0",
56
- "@stylistic/eslint-plugin": "^2.6.1",
57
- "@types/eslint__js": "^8.42.3",
48
+ "@antfu/eslint-config": "^3.5.1",
49
+ "@types/aes-js": "^3.1.4",
50
+ "@types/debug": "^4.1.12",
51
+ "@types/fs-extra": "^11.0.4",
58
52
  "@types/jest": "^29.5.12",
59
- "@types/node": "^22.1.0",
60
- "eslint": "^9.8.0",
61
- "globals": "^15.9.0",
53
+ "@types/mdast": "^4.0.4",
54
+ "@types/node": "^22.5.4",
55
+ "@types/semver": "^7.5.8",
56
+ "@types/source-map-support": "^0.5.10",
57
+ "@vitest/coverage-v8": "^2.0.5",
58
+ "eslint": "^9.10.0",
59
+ "eslint-plugin-format": "^0.1.2",
60
+ "homebridge": "^1.8.4",
61
+ "homebridge-config-ui-x": "4.58.0",
62
62
  "jest": "^29.7.0",
63
63
  "nodemon": "^3.1.4",
64
- "npm-check-updates": "^17.0.3",
64
+ "npm-check-updates": "^17.1.1",
65
65
  "shx": "^0.3.4",
66
- "ts-jest": "^29.2.4",
67
66
  "ts-node": "^10.9.2",
68
- "typedoc": "^0.26.5",
69
- "typescript": "^5.5.4",
70
- "typescript-eslint": "^8.0.1"
67
+ "typedoc": "^0.26.7",
68
+ "typescript": "^5.6.2",
69
+ "typescript-axios-wb": "^1.0.3",
70
+ "vitest": "^2.0.5"
71
71
  }
72
72
  }