HAP-NodeJS
HAP-NodeJS copied to clipboard
dependencies
$ npm run build
👇
> [email protected] build
> rimraf dist && tsc && node .github/node-persist-ignore.js
src/lib/Accessory.ts:626:101 - error TS2339: Property 'UUID' does not exist on type 'never'.
626 } else if (typeof name === "function" && ((service instanceof name) || (name.UUID === service.UUID))) {
~~~~
src/lib/Accessory.ts:638:101 - error TS2339: Property 'UUID' does not exist on type 'never'.
638 } else if (typeof uuid === "function" && ((service instanceof uuid) || (uuid.UUID === service.UUID)) && service.subtype === subType) {
~~~~
src/lib/datastream/DataStreamParser.ts:812:45 - error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.
812 this.data.write(utf8, this.writerIndex, undefined, "utf8");
~~~~~~~~~
src/lib/Service.ts:680:115 - error TS2339: Property 'UUID' does not exist on type 'never'.
680 } else if (typeof name === "function" && ((characteristic instanceof name) || (name.UUID === characteristic.UUID))) {
~~~~
src/lib/Service.ts:686:79 - error TS2339: Property 'UUID' does not exist on type 'never'.
686 if ((characteristic instanceof name) || (name.UUID === characteristic.UUID)) {
~~~~
src/lib/Service.ts:707:115 - error TS2339: Property 'UUID' does not exist on type 'never'.
707 } else if (typeof name === "function" && ((characteristic instanceof name) || (name.UUID === characteristic.UUID))) {
~~~~
src/lib/util/eventedhttp.ts:387:5 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
387 this.localAddress = clientSocket.localAddress;
~~~~~~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:809:26 - error TS18048: 'infos' is possibly 'undefined'.
809 for (const info of infos) {
~~~~~
src/lib/util/eventedhttp.ts:820:26 - error TS18048: 'infos' is possibly 'undefined'.
820 for (const info of infos) {
~~~~~
src/lib/util/eventedhttp.ts:841:9 - error TS18048: 'localAddress' is possibly 'undefined'.
841 if (localAddress.startsWith("::ffff:")) { // IPv4-Mapped IPv6 Address https://tools.ietf.org/html/rfc4291#section-2.5.5.2
~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:842:22 - error TS18048: 'localAddress' is possibly 'undefined'.
842 localAddress = localAddress.substring(7);
~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:844:21 - error TS18048: 'localAddress' is possibly 'undefined'.
844 const index = localAddress.indexOf("%");
~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:846:24 - error TS18048: 'localAddress' is possibly 'undefined'.
846 localAddress = localAddress.substring(0, index);
~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:852:26 - error TS18048: 'infos' is possibly 'undefined'.
852 for (const info of infos) {
~~~~~
src/lib/util/eventedhttp.ts:860:31 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
860 const family = net.isIPv4(localAddress)? "IPv4": "IPv6";
~~~~~~~~~~~~
src/lib/util/eventedhttp.ts:862:26 - error TS18048: 'infos' is possibly 'undefined'.
862 for (const info of infos) {
~~~~~
src/lib/util/eventedhttp.ts:868:27 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
868 if (getNetAddress(localAddress, info.netmask) === getNetAddress(info.address, info.netmask)) {
~~~~~~~~~~~~
src/lib/util/hapCrypto.ts:71:3 - error TS2578: Unused '@ts-expect-error' directive.
71 // @ts-expect-error: types for this are really broken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/util/hapCrypto.ts:74:14 - error TS2554: Expected 2 arguments, but got 1.
74 decipher.setAAD(aad);
~~~~~~~~~~~
node_modules/@types/node/crypto.d.ts:1205:13
1205 options: {
~~~~~~~~~~
1206 plaintextLength: number;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1207 },
~~~~~~~~~~~~~
An argument for 'options' was not provided.
src/lib/util/hapCrypto.ts:102:3 - error TS2578: Unused '@ts-expect-error' directive.
102 // @ts-expect-error: types for this are really broken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/util/hapCrypto.ts:106:12 - error TS2554: Expected 2 arguments, but got 1.
106 cipher.setAAD(aad);
~~~~~~~~~~~
node_modules/@types/node/crypto.d.ts:946:13
946 options: {
~~~~~~~~~~
947 plaintextLength: number;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
948 },
~~~~~~~~~~~~~
An argument for 'options' was not provided.
src/lib/util/net-utils.ts:13:24 - error TS18048: 'infos' is possibly 'undefined'.
13 for (const info of infos) {
~~~~~
Found 22 errors in 6 files.
Errors Files
2 src/lib/Accessory.ts:626
1 src/lib/datastream/DataStreamParser.ts:812
3 src/lib/Service.ts:680
11 src/lib/util/eventedhttp.ts:387
4 src/lib/util/hapCrypto.ts:71
1 src/lib/util/net-utils.ts:13
Process finished with exit code 2