Skip to content

Commit

Permalink
correct log spacing
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
donavanbecker committed Jun 28, 2024
1 parent 1fc24f9 commit 7089876
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<a href="https://www.npmjs.com/package/hap-nodejs"><img title="npm version" src="https://badgen.net/npm/v/hap-nodejs" ></a>
<a href="https://www.npmjs.com/package/hap-nodejs/v/beta"><img title="npm version beta" src="https://badgen.net/npm/v/hap-nodejs/beta" ></a>
<a href="https://www.npmjs.com/package/hap-nodejs/v/alpha"><img title="npm version apha" src="https://badgen.net/npm/v/hap-nodejs/alpha" ></a><br>
<a href="https://www.npmjs.com/package/hap-nodejs"><img title="npm downloads" src="https://badgen.net/npm/dt/hap-nodejs" ></a>
<a href="https://github.com/homebridge/HAP-NodeJS/actions/workflows/build.yml"><img title="Node Build" src="https://github.com/homebridge/HAP-NodeJS/actions/workflows/build.yml/badge.svg" ></a>
<a href='https://coveralls.io/github/homebridge/HAP-NodeJS'><img src='https://coveralls.io/repos/github/homebridge/HAP-NodeJS/badge.svg' alt='Coverage Status' /></a>
Expand Down
12 changes: 6 additions & 6 deletions src/lib/Characteristic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2941,12 +2941,12 @@ export class Characteristic extends EventEmitter {

if (this.props.validValueRanges && this.props.validValueRanges.length === 2) {
if (value < this.props.validValueRanges[0]) {
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of \
${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of `
+ `${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
value = this.props.validValueRanges[0];
} else if (value > this.props.validValueRanges[1]) {
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of \
${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of `
+ `${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
value = this.props.validValueRanges[1];
}
}
Expand All @@ -2966,8 +2966,8 @@ export class Characteristic extends EventEmitter {

// mirrors the case value = null at the beginning
if (value.length <= 1 && (this.UUID === Characteristic.Model.UUID || this.UUID === Characteristic.SerialNumber.UUID)) {
this.characteristicWarning(`[${this.displayName}] characteristic must have a length of more than 1 character otherwise \
HomeKit will reject this accessory, ignoring new value`, warningType);
this.characteristicWarning(`[${this.displayName}] characteristic must have a length of more than 1 character otherwise`
+ ` HomeKit will reject this accessory, ignoring new value ${warningType}`);
return this.value; // just return the current value
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/util/eventedhttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,8 @@ export class HAPConnection extends EventEmitter {
}
}

console.log(`WARNING couldn't map socket coming from remote address ${socket.remoteAddress}:${socket.remotePort} \
at local address ${socket.localAddress} to a interface!`);
console.log(`WARNING couldn't map socket coming from remote address ${socket.remoteAddress}:${socket.remotePort} `
+ `at local address ${socket.localAddress} to a interface!`);

return Object.keys(interfaces)[1]; // just use the first interface after the loopback interface as fallback
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/util/tlv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ export function decodeWithLists(buffer: Buffer): Record<number, Buffer | Buffer[
result[type] = Buffer.concat([existing, data]);
}
} else {
throw new Error(`Found duplicated tlv entry with type ${type} and length ${length} \
(lastItemWasDelimiter: ${lastItemWasDelimiter}, lastType: ${lastType}, lastLength: ${lastLength})`);
throw new Error(`Found duplicated tlv entry with type ${type} and length ${length} `
+ `(lastItemWasDelimiter: ${lastItemWasDelimiter}, lastType: ${lastType}, lastLength: ${lastLength})`);
}
} else {
result[type] = data;
Expand Down

0 comments on commit 7089876

Please sign in to comment.