@homebridge/hap-client 2.0.3-beta.2 → 2.0.4-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.
- package/.eslintrc.json +15 -0
- package/.github/{npm-version-script-esm.js → npm-version-script.js} +8 -8
- package/.github/workflows/beta-release.yml +4 -4
- package/.github/workflows/codeql-analysis.yml +3 -3
- package/.github/workflows/release.yml +1 -1
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +3 -2
- package/README.md +1 -1
- package/dist/eventedHttpClient/httpParser.d.ts +15 -5
- package/dist/eventedHttpClient/httpParser.js +40 -39
- package/dist/eventedHttpClient/httpParser.js.map +1 -1
- package/dist/eventedHttpClient/index.d.ts +2 -10
- package/dist/eventedHttpClient/index.js +17 -12
- package/dist/eventedHttpClient/index.js.map +1 -1
- package/dist/hap-types.d.ts +18 -5
- package/dist/hap-types.js +62 -45
- package/dist/hap-types.js.map +1 -1
- package/dist/index.d.ts +12 -13
- package/dist/index.js +86 -72
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +13 -33
- package/dist/interfaces.js +2 -1
- package/dist/monitor.d.ts +6 -7
- package/dist/monitor.js +30 -30
- package/dist/monitor.js.map +1 -1
- package/dist/uuid.d.ts +0 -1
- package/dist/uuid.js +8 -4
- package/dist/uuid.js.map +1 -1
- package/package.json +30 -35
- package/scripts/gen-hap-types.ts +22 -26
- package/scripts/test.ts +9 -0
- package/dist/eventedHttpClient/httpParser.d.ts.map +0 -1
- package/dist/eventedHttpClient/index.d.ts.map +0 -1
- package/dist/hap-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interfaces.d.ts.map +0 -1
- package/dist/monitor.d.ts.map +0 -1
- package/dist/uuid.d.ts.map +0 -1
- package/eslint.config.js +0 -57
package/.eslintrc.json
ADDED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* This scripts queries the npm registry to pull out the latest version for a given tag.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const assert = require('node:assert')
|
|
8
|
+
const child_process = require('node:child_process')
|
|
9
|
+
const fs = require('node:fs')
|
|
10
|
+
const process = require('node:process')
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const semver = require('semver')
|
|
13
13
|
|
|
14
14
|
const BRANCH_VERSION_PATTERN = /^([A-Z]+)-(\d+\.\d+\.\d+)$/i
|
|
15
15
|
|
|
@@ -19,9 +19,9 @@ const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
|
|
19
19
|
const refArgument = process.argv[2]
|
|
20
20
|
const tagArgument = process.argv[3] || 'latest'
|
|
21
21
|
|
|
22
|
-
if (refArgument
|
|
22
|
+
if (refArgument == null) {
|
|
23
23
|
console.error('ref argument is missing')
|
|
24
|
-
console.error('Usage: npm-version-script
|
|
24
|
+
console.error('Usage: npm-version-script.js <ref> [tag]')
|
|
25
25
|
process.exit(1)
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -50,7 +50,7 @@ function desiredTargetVersion(ref) {
|
|
|
50
50
|
const branchName = ref.slice('refs/heads/'.length)
|
|
51
51
|
|
|
52
52
|
const results = branchName.match(BRANCH_VERSION_PATTERN)
|
|
53
|
-
if (results
|
|
53
|
+
if (results != null) {
|
|
54
54
|
if (results[1] !== tagArgument) {
|
|
55
55
|
console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`)
|
|
56
56
|
}
|
|
@@ -21,11 +21,11 @@ jobs:
|
|
|
21
21
|
|
|
22
22
|
if: ${{ github.repository == 'homebridge/hap-client' }}
|
|
23
23
|
|
|
24
|
-
uses: homebridge/.github/.github/workflows/npm-publish
|
|
24
|
+
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
|
|
25
25
|
with:
|
|
26
|
-
tag: beta
|
|
26
|
+
tag: 'beta'
|
|
27
27
|
dynamically_adjust_version: true
|
|
28
|
-
npm_version_command: pre
|
|
29
|
-
pre_id: beta
|
|
28
|
+
npm_version_command: 'pre'
|
|
29
|
+
pre_id: 'beta'
|
|
30
30
|
secrets:
|
|
31
31
|
npm_auth_token: ${{ secrets.npm_token }}
|
|
@@ -19,6 +19,6 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
if: ${{ github.repository == 'homebridge/hap-client' }}
|
|
21
21
|
|
|
22
|
-
uses: homebridge/.github/.github/workflows/npm-publish
|
|
22
|
+
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
|
|
23
23
|
secrets:
|
|
24
24
|
npm_auth_token: ${{ secrets.npm_token }}
|
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@homebridge/hap-client` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## v2.0.4 (2024-11-07)
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Added public method destroy, to be used for testing
|
|
10
|
+
- Update public method monitorCharacteristics to allow passing of a filtered services array.
|
|
10
11
|
|
|
11
12
|
## v2.0.2 (2024-08-31)
|
|
12
13
|
|
package/README.md
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function httpMessageParser(message: any): {
|
|
2
|
+
protocol: any;
|
|
3
|
+
httpVersion: any;
|
|
4
|
+
statusCode: any;
|
|
5
|
+
statusMessage: any;
|
|
6
|
+
method: any;
|
|
7
|
+
url: any;
|
|
8
|
+
headers: any;
|
|
9
|
+
body: any;
|
|
10
|
+
boundary: any;
|
|
11
|
+
multipart: any;
|
|
12
|
+
additional: any;
|
|
13
|
+
};
|
|
3
14
|
declare namespace httpMessageParser {
|
|
4
15
|
var _isTruthy: (v: any) => boolean;
|
|
5
16
|
var _isNumeric: (v: any) => boolean;
|
|
6
17
|
var _isBuffer: (item: any) => any;
|
|
7
18
|
var _isNodeBufferSupported: () => boolean;
|
|
8
|
-
var _parseHeaders: (body:
|
|
19
|
+
var _parseHeaders: (body: any) => {};
|
|
9
20
|
var _requestLineRegex: RegExp;
|
|
10
21
|
var _responseLineRegex: RegExp;
|
|
11
22
|
var _headerNewlineRegex: RegExp;
|
|
12
23
|
var _boundaryRegex: RegExp;
|
|
13
|
-
var _createBuffer: (data:
|
|
24
|
+
var _createBuffer: (data: any) => Buffer;
|
|
14
25
|
}
|
|
15
26
|
export default httpMessageParser;
|
|
16
|
-
//# sourceMappingURL=httpParser.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
function httpMessageParser(message) {
|
|
2
4
|
const result = {
|
|
3
5
|
protocol: null,
|
|
@@ -25,9 +27,9 @@ function httpMessageParser(message) {
|
|
|
25
27
|
else {
|
|
26
28
|
return result;
|
|
27
29
|
}
|
|
28
|
-
messageString = messageString.replace(/\r\n/
|
|
30
|
+
messageString = messageString.replace(/\r\n/gim, '\n');
|
|
29
31
|
(function () {
|
|
30
|
-
const firstNonWhitespaceRegex = /[\w-]+/
|
|
32
|
+
const firstNonWhitespaceRegex = /[\w-]+/gim;
|
|
31
33
|
const firstNonWhitespaceIndex = messageString.search(firstNonWhitespaceRegex);
|
|
32
34
|
if (firstNonWhitespaceIndex > 0) {
|
|
33
35
|
message = message.slice(firstNonWhitespaceIndex, message.length);
|
|
@@ -39,8 +41,8 @@ function httpMessageParser(message) {
|
|
|
39
41
|
const requestLineMatch = possibleRequestLine.match(httpMessageParser._requestLineRegex);
|
|
40
42
|
if (Array.isArray(requestLineMatch) && requestLineMatch.length > 1) {
|
|
41
43
|
result.protocol = requestLineMatch[1];
|
|
42
|
-
result.httpVersion =
|
|
43
|
-
result.statusCode =
|
|
44
|
+
result.httpVersion = parseFloat(requestLineMatch[2]);
|
|
45
|
+
result.statusCode = parseInt(requestLineMatch[3], 10);
|
|
44
46
|
result.statusMessage = requestLineMatch[4];
|
|
45
47
|
}
|
|
46
48
|
else {
|
|
@@ -48,7 +50,7 @@ function httpMessageParser(message) {
|
|
|
48
50
|
if (Array.isArray(responseLineMath) && responseLineMath.length > 1) {
|
|
49
51
|
result.method = responseLineMath[1];
|
|
50
52
|
result.url = responseLineMath[2];
|
|
51
|
-
result.httpVersion =
|
|
53
|
+
result.httpVersion = parseFloat(responseLineMath[3]);
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
})();
|
|
@@ -72,17 +74,16 @@ function httpMessageParser(message) {
|
|
|
72
74
|
if (!result.boundary) {
|
|
73
75
|
const boundaryMatch = messageString.match(httpMessageParser._boundaryRegex);
|
|
74
76
|
if (Array.isArray(boundaryMatch) && boundaryMatch.length) {
|
|
75
|
-
fullBoundary = boundaryMatch[0].replace(/[\r\n]+/
|
|
76
|
-
|
|
77
|
+
fullBoundary = boundaryMatch[0].replace(/[\r\n]+/gi, '');
|
|
78
|
+
const boundary = fullBoundary.replace(/^--/, '');
|
|
79
|
+
result.boundary = boundary;
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
})();
|
|
80
83
|
(function () {
|
|
81
84
|
let start = headerNewlineIndex;
|
|
82
|
-
let end = result.headers &&
|
|
83
|
-
|
|
84
|
-
: messageString.length;
|
|
85
|
-
const firstBoundaryIndex = fullBoundary === null ? -1 : messageString.indexOf(fullBoundary);
|
|
85
|
+
let end = (result.headers && result.headers['Content-Length'] ? result.headers['Content-Length'] + start : messageString.length);
|
|
86
|
+
const firstBoundaryIndex = messageString.indexOf(fullBoundary);
|
|
86
87
|
if (firstBoundaryIndex > -1 && result.boundary) {
|
|
87
88
|
start = headerNewlineIndex;
|
|
88
89
|
end = firstBoundaryIndex;
|
|
@@ -91,8 +92,8 @@ function httpMessageParser(message) {
|
|
|
91
92
|
const body = messageString.slice(start, end);
|
|
92
93
|
result.additional = messageString.slice(end);
|
|
93
94
|
if (body && body.length) {
|
|
94
|
-
if ((result.headers && result.headers['Content-Type'] === 'application/hap+json')
|
|
95
|
-
|
|
95
|
+
if ((result.headers && result.headers['Content-Type'] === 'application/hap+json') ||
|
|
96
|
+
(result.headers && result.headers['Content-Type'] === 'application/json')) {
|
|
96
97
|
try {
|
|
97
98
|
if (result.headers['Content-Length']) {
|
|
98
99
|
result.body = body;
|
|
@@ -111,16 +112,16 @@ function httpMessageParser(message) {
|
|
|
111
112
|
}
|
|
112
113
|
})();
|
|
113
114
|
(function () {
|
|
114
|
-
if (result.boundary
|
|
115
|
+
if (result.boundary) {
|
|
115
116
|
const multipartStart = messageString.indexOf(fullBoundary) + fullBoundary.length;
|
|
116
117
|
const multipartEnd = messageString.lastIndexOf(fullBoundary);
|
|
117
|
-
const multipartBody = messageString.
|
|
118
|
-
const splitRegex = new RegExp(
|
|
118
|
+
const multipartBody = messageString.substr(multipartStart, multipartEnd);
|
|
119
|
+
const splitRegex = new RegExp('^' + fullBoundary + '.*[\n\r]?$', 'gm');
|
|
119
120
|
const parts = multipartBody.split(splitRegex);
|
|
120
|
-
result.multipart = parts.filter(httpMessageParser._isTruthy).map((part, i)
|
|
121
|
+
result.multipart = parts.filter(httpMessageParser._isTruthy).map(function (part, i) {
|
|
121
122
|
const result = {
|
|
122
123
|
headers: null,
|
|
123
|
-
body:
|
|
124
|
+
body: null,
|
|
124
125
|
meta: {
|
|
125
126
|
body: {
|
|
126
127
|
byteOffset: {
|
|
@@ -130,7 +131,7 @@ function httpMessageParser(message) {
|
|
|
130
131
|
},
|
|
131
132
|
},
|
|
132
133
|
};
|
|
133
|
-
const newlineRegex = /\n\n|\r\n\r\n/
|
|
134
|
+
const newlineRegex = /\n\n|\r\n\r\n/gim;
|
|
134
135
|
let newlineIndex = 0;
|
|
135
136
|
let newlineMatch = newlineRegex.exec(part);
|
|
136
137
|
let body = null;
|
|
@@ -143,7 +144,7 @@ function httpMessageParser(message) {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
const possibleHeadersString = part.
|
|
147
|
+
const possibleHeadersString = part.substr(0, newlineIndex);
|
|
147
148
|
let startOffset = null;
|
|
148
149
|
let endOffset = null;
|
|
149
150
|
if (newlineIndex > -1) {
|
|
@@ -159,9 +160,9 @@ function httpMessageParser(message) {
|
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
const boundaryNewlineIndexes = [];
|
|
162
|
-
boundaryIndexes.slice(0, boundaryIndexes.length - 1).forEach((m, k)
|
|
163
|
+
boundaryIndexes.slice(0, boundaryIndexes.length - 1).forEach(function (m, k) {
|
|
163
164
|
const partBody = message.slice(boundaryIndexes[k], boundaryIndexes[k + 1]).toString();
|
|
164
|
-
let headerNewlineIndex = partBody.search(/\n\n|\r\n\r\n/
|
|
165
|
+
let headerNewlineIndex = partBody.search(/\n\n|\r\n\r\n/gim) + 2;
|
|
165
166
|
headerNewlineIndex = boundaryIndexes[k] + headerNewlineIndex;
|
|
166
167
|
boundaryNewlineIndexes.push(headerNewlineIndex);
|
|
167
168
|
});
|
|
@@ -189,34 +190,34 @@ httpMessageParser._isTruthy = function _isTruthy(v) {
|
|
|
189
190
|
return !!v;
|
|
190
191
|
};
|
|
191
192
|
httpMessageParser._isNumeric = function _isNumeric(v) {
|
|
192
|
-
if (typeof v === 'number' && !
|
|
193
|
+
if (typeof v === 'number' && !isNaN(v)) {
|
|
193
194
|
return true;
|
|
194
195
|
}
|
|
195
196
|
v = (v || '').toString().trim();
|
|
196
197
|
if (!v) {
|
|
197
198
|
return false;
|
|
198
199
|
}
|
|
199
|
-
return !
|
|
200
|
+
return !isNaN(v);
|
|
200
201
|
};
|
|
201
202
|
httpMessageParser._isBuffer = function (item) {
|
|
202
|
-
return ((httpMessageParser._isNodeBufferSupported()
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
return ((httpMessageParser._isNodeBufferSupported() &&
|
|
204
|
+
typeof global === 'object' &&
|
|
205
|
+
global.Buffer.isBuffer(item)) ||
|
|
206
|
+
(item instanceof Object &&
|
|
207
|
+
item._isBuffer));
|
|
207
208
|
};
|
|
208
209
|
httpMessageParser._isNodeBufferSupported = function () {
|
|
209
|
-
return (typeof
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
return (typeof global === 'object' &&
|
|
211
|
+
typeof global.Buffer === 'function' &&
|
|
212
|
+
typeof global.Buffer.isBuffer === 'function');
|
|
212
213
|
};
|
|
213
214
|
httpMessageParser._parseHeaders = function _parseHeaders(body) {
|
|
214
215
|
const headers = {};
|
|
215
216
|
if (typeof body !== 'string') {
|
|
216
217
|
return headers;
|
|
217
218
|
}
|
|
218
|
-
body.split(/[\r\n]/).forEach((string)
|
|
219
|
-
const match = string.match(/([\w-]+):\s*(.*)/);
|
|
219
|
+
body.split(/[\r\n]/).forEach(function (string) {
|
|
220
|
+
const match = string.match(/([\w-]+):\s*(.*)/i);
|
|
220
221
|
if (Array.isArray(match) && match.length === 3) {
|
|
221
222
|
const key = match[1];
|
|
222
223
|
const value = match[2];
|
|
@@ -225,12 +226,12 @@ httpMessageParser._parseHeaders = function _parseHeaders(body) {
|
|
|
225
226
|
});
|
|
226
227
|
return headers;
|
|
227
228
|
};
|
|
228
|
-
httpMessageParser._requestLineRegex = /(HTTP|EVENT)\/(1\.0|1\.1|2\.0)\s+(\d+)\s+([\w\s-]+)/i;
|
|
229
|
-
httpMessageParser._responseLineRegex = /(GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD|TRACE|CONNECT)\s+(
|
|
230
|
-
httpMessageParser._headerNewlineRegex = /^[\r\n]+/
|
|
229
|
+
httpMessageParser._requestLineRegex = /(HTTP|EVENT)\/(1\.0|1\.1|2\.0)\s+(\d+)\s+([\w\s-_]+)/i;
|
|
230
|
+
httpMessageParser._responseLineRegex = /(GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD|TRACE|CONNECT)\s+(.*)\s+HTTP\/(1\.0|1\.1|2\.0)/i;
|
|
231
|
+
httpMessageParser._headerNewlineRegex = /^[\r\n]+/gim;
|
|
231
232
|
httpMessageParser._boundaryRegex = /(\n|\r\n)+--[\w-]+(\n|\r\n)+/g;
|
|
232
233
|
httpMessageParser._createBuffer = function (data) {
|
|
233
|
-
return Buffer
|
|
234
|
+
return new Buffer(data);
|
|
234
235
|
};
|
|
235
|
-
|
|
236
|
+
exports.default = httpMessageParser;
|
|
236
237
|
//# sourceMappingURL=httpParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpParser.js","sourceRoot":"","sources":["../../src/eventedHttpClient/httpParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpParser.js","sourceRoot":"","sources":["../../src/eventedHttpClient/httpParser.ts"],"names":[],"mappings":";;AAOA,SAAS,iBAAiB,CAAC,OAAO;IAChC,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,IAAI;QACZ,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;KACjB,CAAC;IAEF,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,kBAAkB,GAAG,CAAC,CAAC;IAC3B,IAAI,YAAY,GAAG,IAAI,CAAC;IAExB,IAAI,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,aAAa,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QACvC,aAAa,GAAG,OAAO,CAAC;QACxB,OAAO,GAAG,iBAAiB,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3D,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC;IAChB,C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K,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACrB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAEvB,OAAO,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC7E,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,iBAAiB,CAAC,iBAAiB,GAAG,uDAAuD,CAAC;AAC9F,iBAAiB,CAAC,kBAAkB,GAAG,yFAAyF,CAAC;AAEjI,iBAAiB,CAAC,mBAAmB,GAAG,aAAa,CAAC;AACtD,iBAAiB,CAAC,cAAc,GAAG,+BAA+B,CAAC;AAEnE,iBAAiB,CAAC,aAAa,GAAG,UAAU,IAAI;IAE9C,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import httpMessageParser from './httpParser.js';
|
|
1
|
+
import httpMessageParser from './httpParser';
|
|
3
2
|
export declare const parseMessage: typeof httpMessageParser;
|
|
4
|
-
export declare function createConnection(instance:
|
|
5
|
-
characteristics: {
|
|
6
|
-
aid: number;
|
|
7
|
-
iid: number;
|
|
8
|
-
ev: boolean;
|
|
9
|
-
}[] | undefined;
|
|
10
|
-
}): import("net").Socket;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
3
|
+
export declare function createConnection(instance: any, pin: string, body: any): import("net").Socket;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseMessage = void 0;
|
|
4
|
+
exports.createConnection = createConnection;
|
|
5
|
+
const node_net_1 = require("node:net");
|
|
6
|
+
const node_url_1 = require("node:url");
|
|
7
|
+
const httpParser_1 = require("./httpParser");
|
|
8
|
+
exports.parseMessage = httpParser_1.default;
|
|
9
|
+
function createConnection(instance, pin, body) {
|
|
10
|
+
const client = (0, node_net_1.createConnection)({
|
|
6
11
|
host: instance.ipAddress,
|
|
7
12
|
port: instance.port,
|
|
8
13
|
});
|
|
9
14
|
client.write(_buildMessage({
|
|
10
15
|
method: 'PUT',
|
|
11
|
-
url:
|
|
16
|
+
url: 'http://' + instance.ipAddress + ':' + instance.port + '/characteristics',
|
|
12
17
|
maxAttempts: 1,
|
|
13
18
|
headers: {
|
|
14
19
|
'Content-Type': 'Application/json',
|
|
@@ -22,23 +27,23 @@ export function createConnection(instance, pin, body) {
|
|
|
22
27
|
function _headersToString(headers) {
|
|
23
28
|
let response = '';
|
|
24
29
|
for (const header of Object.keys(headers)) {
|
|
25
|
-
response =
|
|
30
|
+
response = response + header + ': ' + headers[header] + '\r\n';
|
|
26
31
|
}
|
|
27
32
|
return (response);
|
|
28
33
|
}
|
|
29
34
|
function _buildMessage(request) {
|
|
30
|
-
const context =
|
|
35
|
+
const context = (0, node_url_1.parse)(request.url);
|
|
31
36
|
let message;
|
|
32
|
-
message =
|
|
37
|
+
message = request.method + ' ' + context.pathname;
|
|
33
38
|
if (context.search) {
|
|
34
39
|
message = message + context.search;
|
|
35
40
|
}
|
|
36
|
-
message =
|
|
41
|
+
message = message + ' HTTP/1.1\r\nHost: ' + context.host + '\r\n' + _headersToString(request.headers);
|
|
37
42
|
if (request.body) {
|
|
38
|
-
message =
|
|
43
|
+
message = message + 'Content-Length: ' + request.body.length + '\r\n\r\n' + request.body + '\r\n\r\n';
|
|
39
44
|
}
|
|
40
45
|
else {
|
|
41
|
-
message =
|
|
46
|
+
message = message + '\r\n\r\n';
|
|
42
47
|
}
|
|
43
48
|
return (message);
|
|
44
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eventedHttpClient/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eventedHttpClient/index.ts"],"names":[],"mappings":";;;AAYA,4CAmBC;AA1BD,uCAAmE;AACnE,uCAAiC;AAEjC,6CAA6C;AAEhC,QAAA,YAAY,GAAG,oBAAiB,CAAC;AAE9C,SAAgB,gBAAgB,CAAC,QAAQ,EAAE,GAAW,EAAE,IAAI;IAC1D,MAAM,MAAM,GAAG,IAAA,2BAAmB,EAAC;QACjC,IAAI,EAAE,QAAQ,CAAC,SAAS;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;KACpB,CAAC,CAAC;IAEH,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC;QACzB,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,SAAS,GAAG,QAAQ,CAAC,SAAS,GAAG,GAAG,GAAG,QAAQ,CAAC,IAAI,GAAG,kBAAkB;QAC9E,WAAW,EAAE,CAAC;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,eAAe,EAAE,GAAG;YACpB,YAAY,EAAE,YAAY;SAC3B;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC,CAAC;IAEJ,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAO;IAC/B,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1C,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC;AAED,SAAS,aAAa,CAAC,OAAO;IAC5B,MAAM,OAAO,GAAG,IAAA,gBAAK,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,OAAO,CAAC;IAEZ,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,CAAC;IACD,OAAO,GAAG,OAAO,GAAG,qBAAqB,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,GAAG,OAAO,GAAG,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC;IACxG,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC"}
|
package/dist/hap-types.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export declare const Services: {
|
|
|
31
31
|
CarbonDioxideSensor: string;
|
|
32
32
|
'0000007F-0000-1000-8000-0026BB765291': string;
|
|
33
33
|
CarbonMonoxideSensor: string;
|
|
34
|
+
'0000005A-0000-1000-8000-0026BB765291': string;
|
|
35
|
+
CloudRelay: string;
|
|
34
36
|
'00000080-0000-1000-8000-0026BB765291': string;
|
|
35
37
|
ContactSensor: string;
|
|
36
38
|
'00000129-0000-1000-8000-0026BB765291': string;
|
|
@@ -128,6 +130,8 @@ export declare const Services: {
|
|
|
128
130
|
ThreadTransport: string;
|
|
129
131
|
'00000203-0000-1000-8000-0026BB765291': string;
|
|
130
132
|
TransferTransportManagement: string;
|
|
133
|
+
'00000056-0000-1000-8000-0026BB765291': string;
|
|
134
|
+
Tunnel: string;
|
|
131
135
|
'000000D0-0000-1000-8000-0026BB765291': string;
|
|
132
136
|
Valve: string;
|
|
133
137
|
'0000020A-0000-1000-8000-0026BB765291': string;
|
|
@@ -336,10 +340,6 @@ export declare const Characteristics: {
|
|
|
336
340
|
ManuallyDisabled: string;
|
|
337
341
|
'00000020-0000-1000-8000-0026BB765291': string;
|
|
338
342
|
Manufacturer: string;
|
|
339
|
-
'0000026D-0000-1000-8000-0026BB765291': string;
|
|
340
|
-
MatterFirmwareRevisionNumber: string;
|
|
341
|
-
'0000026E-0000-1000-8000-0026BB765291': string;
|
|
342
|
-
MatterFirmwareUpdateStatus: string;
|
|
343
343
|
'00000243-0000-1000-8000-0026BB765291': string;
|
|
344
344
|
MaximumTransmitPower: string;
|
|
345
345
|
'00000272-0000-1000-8000-0026BB765291': string;
|
|
@@ -422,6 +422,12 @@ export declare const Characteristics: {
|
|
|
422
422
|
RelativeHumidityDehumidifierThreshold: string;
|
|
423
423
|
'000000CA-0000-1000-8000-0026BB765291': string;
|
|
424
424
|
RelativeHumidityHumidifierThreshold: string;
|
|
425
|
+
'0000005E-0000-1000-8000-0026BB765291': string;
|
|
426
|
+
RelayControlPoint: string;
|
|
427
|
+
'0000005B-0000-1000-8000-0026BB765291': string;
|
|
428
|
+
RelayEnabled: string;
|
|
429
|
+
'0000005C-0000-1000-8000-0026BB765291': string;
|
|
430
|
+
RelayState: string;
|
|
425
431
|
'000000D4-0000-1000-8000-0026BB765291': string;
|
|
426
432
|
RemainingDuration: string;
|
|
427
433
|
'000000E1-0000-1000-8000-0026BB765291': string;
|
|
@@ -592,6 +598,14 @@ export declare const Characteristics: {
|
|
|
592
598
|
Token: string;
|
|
593
599
|
'00000242-0000-1000-8000-0026BB765291': string;
|
|
594
600
|
TransmitPower: string;
|
|
601
|
+
'00000061-0000-1000-8000-0026BB765291': string;
|
|
602
|
+
TunnelConnectionTimeout: string;
|
|
603
|
+
'00000060-0000-1000-8000-0026BB765291': string;
|
|
604
|
+
TunneledAccessoryAdvertising: string;
|
|
605
|
+
'00000059-0000-1000-8000-0026BB765291': string;
|
|
606
|
+
TunneledAccessoryConnected: string;
|
|
607
|
+
'00000058-0000-1000-8000-0026BB765291': string;
|
|
608
|
+
TunneledAccessoryStateNumber: string;
|
|
595
609
|
'000000D5-0000-1000-8000-0026BB765291': string;
|
|
596
610
|
ValveType: string;
|
|
597
611
|
'00000037-0000-1000-8000-0026BB765291': string;
|
|
@@ -661,4 +675,3 @@ export declare const Categories: {
|
|
|
661
675
|
TV_SET_TOP_BOX: number;
|
|
662
676
|
TV_STREAMING_STICK: number;
|
|
663
677
|
};
|
|
664
|
-
//# sourceMappingURL=hap-types.d.ts.map
|