homebridge-securitysystem 8.0.1-beta.1 → 8.0.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/package.json +2 -1
- package/src/index.js +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-securitysystem",
|
|
3
3
|
"displayName": "Homebridge Security System",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.2",
|
|
5
5
|
"description": "Homebridge plugin that creates a security system accessory that can be triggered by HomeKit sensors.",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"express": "^4.17.1",
|
|
45
|
+
"node-fetch": "^2.6.7",
|
|
45
46
|
"node-persist": "^3.0.5"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@ const fs = require("fs");
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const storage = require("node-persist");
|
|
4
4
|
const { spawn } = require("child_process");
|
|
5
|
+
const fetch = require("node-fetch");
|
|
5
6
|
const express = require("express");
|
|
6
7
|
|
|
7
8
|
const packageJson = require("../package.json");
|
|
@@ -1838,7 +1839,7 @@ SecuritySystem.prototype.sendWebhookEvent = function (type, state, origin) {
|
|
|
1838
1839
|
path = path.replace("${currentMode}", this.state2Mode(this.currentState));
|
|
1839
1840
|
|
|
1840
1841
|
// Send GET request to server
|
|
1841
|
-
fetch(options.webhookUrl + path
|
|
1842
|
+
fetch(options.webhookUrl + path)
|
|
1842
1843
|
.then((response) => {
|
|
1843
1844
|
if (response.ok === false) {
|
|
1844
1845
|
throw new Error(`Status code (${response.status})`);
|