Compare commits

...

272 commits

Author SHA1 Message Date
dependabot[bot]
1a35138ed2
Bump eslint from 8.50.0 to 8.51.0 (#408) 2023-10-09 01:05:12 +00:00
dependabot[bot]
898adfbdc9
Bump zod from 3.22.3 to 3.22.4 (#406) 2023-10-05 01:01:33 +00:00
dependabot[bot]
c1cbbc07ab
Bump zod from 3.22.2 to 3.22.3 (#405) 2023-10-04 01:01:21 +00:00
dependabot[bot]
709f74baf8
Bump @types/supertest from 2.0.13 to 2.0.14 (#403) 2023-10-03 00:56:46 +00:00
dependabot[bot]
c09be24f0f
Bump rimraf from 5.0.4 to 5.0.5 (#400) 2023-09-28 01:02:24 +00:00
dependabot[bot]
50fd37ef54
Bump release-it from 16.2.0 to 16.2.1 (#398) 2023-09-28 01:01:16 +00:00
dependabot[bot]
3b582ea7b8
Bump @types/supertest from 2.0.12 to 2.0.13 (#396) 2023-09-26 00:58:47 +00:00
dependabot[bot]
3fed2ecf7d
Bump rimraf from 5.0.1 to 5.0.4 (#394) 2023-09-26 00:57:58 +00:00
dependabot[bot]
58e71351ab
Bump actions/checkout from 4.0.0 to 4.1.0 (#393) 2023-09-25 00:51:20 +00:00
dependabot[bot]
a0a8f7301f
Bump eslint from 8.49.0 to 8.50.0 (#391) 2023-09-25 00:50:51 +00:00
dependabot[bot]
9e789fc347
Bump eslint-import-resolver-typescript from 3.6.0 to 3.6.1 (#390) 2023-09-25 00:27:51 +00:00
dependabot[bot]
5925fedb53
Bump release-it from 16.1.5 to 16.2.0 (#389) 2023-09-25 00:27:21 +00:00
dependabot[bot]
f382e4e9a8
Bump jest from 29.6.4 to 29.7.0 (#382) 2023-09-13 00:33:33 +00:00
dependabot[bot]
11f69ceb55
Bump eslint from 8.48.0 to 8.49.0 (#379) 2023-09-11 00:26:34 +00:00
dependabot[bot]
2849cd732c
Bump array.prototype.flatmap from 1.3.1 to 1.3.2 (#377) 2023-09-08 00:55:55 +00:00
dependabot[bot]
92f92e81fd
Bump actions/cache from 3.3.1 to 3.3.2 (#376) 2023-09-08 00:47:34 +00:00
dependabot[bot]
99e03d73d0
Bump actions/upload-artifact from 3.1.2 to 3.1.3 (#375) 2023-09-07 01:06:29 +00:00
dependabot[bot]
ef35642f10
Bump actions/checkout from 3.6.0 to 4.0.0 (#373) 2023-09-05 00:13:36 +00:00
dependabot[bot]
c37fad86f6
Bump eslint from 8.47.0 to 8.48.0 (#365) 2023-08-28 00:47:37 +00:00
dependabot[bot]
1349b4da25
Bump actions/checkout from 3.5.3 to 3.6.0 (#364) 2023-08-25 00:32:44 +00:00
dependabot[bot]
c5c1434c77
Bump jest from 29.6.3 to 29.6.4 (#362) 2023-08-25 00:22:49 +00:00
dependabot[bot]
26188855bb
Bump typescript from 5.1.6 to 5.2.2 (#363) 2023-08-25 00:22:06 +00:00
dependabot[bot]
4f80e744b2
Bump @jest/globals from 29.6.3 to 29.6.4 (#360) 2023-08-25 00:18:13 +00:00
dependabot[bot]
dac42d5ead
Bump @jest/globals from 29.6.2 to 29.6.3 (#357) 2023-08-22 00:12:57 +00:00
dependabot[bot]
3589832ad6
Bump jest from 29.6.2 to 29.6.3 (#356) 2023-08-22 00:12:18 +00:00
dependabot[bot]
54cf7f5f24
Bump zod from 3.22.1 to 3.22.2 (#354) 2023-08-21 01:13:03 +00:00
dependabot[bot]
b73f025548
Bump eslint-plugin-import from 2.28.0 to 2.28.1 (#353) 2023-08-21 01:11:51 +00:00
dependabot[bot]
fce96663db
Bump actions/setup-node from 3.8.0 to 3.8.1 (#351) 2023-08-18 01:06:54 +00:00
dependabot[bot]
064d09ff70
Bump bcrypt from 5.1.0 to 5.1.1 (#350) 2023-08-17 00:35:30 +00:00
dependabot[bot]
af0296b7b3
Bump zod from 3.22.0 to 3.22.1 (#348) 2023-08-16 00:22:43 +00:00
dependabot[bot]
3079103d03
Bump zod from 3.21.4 to 3.22.0 (#347) 2023-08-15 00:55:52 +00:00
dependabot[bot]
3f15bae6a8
Bump actions/setup-node from 3.7.0 to 3.8.0 (#345) 2023-08-15 00:54:11 +00:00
dependabot[bot]
f72862b955
Bump release-it from 16.1.4 to 16.1.5 (#343) 2023-08-14 01:13:09 +00:00
dependabot[bot]
3bd5d1da4d
Bump eslint from 8.46.0 to 8.47.0 (#342) 2023-08-14 01:12:17 +00:00
dependabot[bot]
9f94d50f1e
Bump eslint-import-resolver-typescript from 3.5.5 to 3.6.0 (#341) 2023-08-10 00:54:44 +00:00
dependabot[bot]
cedf9b7af7
Bump release-it from 16.1.3 to 16.1.4 (#340) 2023-08-10 00:53:16 +00:00
dependabot[bot]
2b093b0fa2
Bump @types/node from 20.4.8 to 20.4.9 (#339) 2023-08-09 00:38:05 +00:00
dependabot[bot]
ac5eb866d8
Bump @types/node from 20.4.7 to 20.4.8 (#337) 2023-08-07 00:56:59 +00:00
dependabot[bot]
c0654ce76f
Bump @types/node from 20.4.6 to 20.4.7 (#335) 2023-08-04 00:58:20 +00:00
dependabot[bot]
52857f987c
Bump @types/node from 20.4.5 to 20.4.6 (#334) 2023-08-03 01:01:08 +00:00
dependabot[bot]
37246fa512
Bump eslint from 8.45.0 to 8.46.0 (#332) 2023-07-31 01:03:24 +00:00
dependabot[bot]
06222b4846
Bump eslint-plugin-import from 2.27.5 to 2.28.0 (#331) 2023-07-31 00:26:00 +00:00
dependabot[bot]
73d4b44522
Bump jest from 29.6.1 to 29.6.2 (#330) 2023-07-28 00:25:31 +00:00
dependabot[bot]
9df9d347ad
Bump @jest/globals from 29.6.1 to 29.6.2 (#329) 2023-07-28 00:21:50 +00:00
dependabot[bot]
9379ec63fa
Bump fastify from 4.20.0 to 4.21.0 (#328) 2023-07-28 00:20:58 +00:00
dependabot[bot]
0e29b88c32
Bump @types/node from 20.4.4 to 20.4.5 (#327) 2023-07-26 00:48:09 +00:00
dependabot[bot]
2363bf25c4
Bump @types/node from 20.4.2 to 20.4.4 (#325) 2023-07-24 00:56:40 +00:00
dependabot[bot]
d5b3fbdbb1
Bump release-it from 16.1.2 to 16.1.3 (#324) 2023-07-21 00:58:15 +00:00
dependabot[bot]
c36a5af463
Bump word-wrap from 1.2.3 to 1.2.4 (#323) 2023-07-20 01:12:40 +00:00
dependabot[bot]
2b859d8322
Bump fastify from 4.19.2 to 4.20.0 (#321) 2023-07-18 00:27:45 +00:00
dependabot[bot]
06c48fb317
Bump eslint from 8.44.0 to 8.45.0 (#320) 2023-07-17 00:49:10 +00:00
dependabot[bot]
a72d5948ab
Bump release-it from 16.1.0 to 16.1.2 (#319) 2023-07-17 00:48:06 +00:00
dependabot[bot]
440b8455d3
Bump @types/node from 20.4.1 to 20.4.2 (#317) 2023-07-13 00:37:18 +00:00
dependabot[bot]
fcb3767093
Bump semver from 6.3.0 to 6.3.1 (#316) 2023-07-11 00:31:05 +00:00
dependabot[bot]
40c0a61ba6
Bump @typescript-eslint/parser from 5.61.0 to 5.62.0 (#315) 2023-07-11 00:28:20 +00:00
dependabot[bot]
9d9fbfb6b7
Bump @types/node from 20.4.0 to 20.4.1 (#312) 2023-07-10 00:33:23 +00:00
dependabot[bot]
96084208bf
Bump nodemon from 2.0.22 to 3.0.1 (#311) 2023-07-10 00:33:01 +00:00
dependabot[bot]
60373593bf
Bump release-it from 16.0.0 to 16.1.0 (#310) 2023-07-10 00:32:52 +00:00
dependabot[bot]
84b75d8c24
Bump jest from 29.6.0 to 29.6.1 (#309) 2023-07-07 01:08:39 +00:00
dependabot[bot]
f7a753a86d
Bump @jest/globals from 29.6.0 to 29.6.1 (#308) 2023-07-07 01:05:14 +00:00
dependabot[bot]
cc162d9a56
Bump actions/setup-node from 3.6.0 to 3.7.0 (#307) 2023-07-06 00:51:21 +00:00
dependabot[bot]
704a353667
Bump release-it from 15.11.0 to 16.0.0 (#306) 2023-07-06 00:31:36 +00:00
dependabot[bot]
fc838ad93e
Bump @types/node from 20.3.3 to 20.4.0 (#304) 2023-07-06 00:30:10 +00:00
dependabot[bot]
303f397c83
Bump jest from 29.5.0 to 29.6.0 (#303) 2023-07-05 00:32:43 +00:00
dependabot[bot]
72e7d6310d
Bump @jest/globals from 29.5.0 to 29.6.0 (#302) 2023-07-05 00:29:27 +00:00
dependabot[bot]
8425ab99db
Bump @typescript-eslint/parser from 5.60.1 to 5.61.0 (#300) 2023-07-04 00:33:37 +00:00
dependabot[bot]
455844a4ed
Bump fastify from 4.19.1 to 4.19.2 (#301) 2023-07-04 00:32:05 +00:00
dependabot[bot]
e5d9b7bfb9
Bump @typescript-eslint/eslint-plugin from 5.60.1 to 5.61.0 (#299) 2023-07-04 00:30:08 +00:00
dependabot[bot]
fdbcfc27cf
Bump eslint from 8.43.0 to 8.44.0 (#298) 2023-07-03 00:24:19 +00:00
dependabot[bot]
2641d455c1
Bump @types/node from 20.3.2 to 20.3.3 (#297) 2023-07-03 00:23:21 +00:00
dependabot[bot]
d15fcfe557
Bump fastify from 4.18.0 to 4.19.1 (#296) 2023-07-03 00:22:40 +00:00
dependabot[bot]
2466225145
Bump ts-jest from 29.1.0 to 29.1.1 (#295) 2023-07-03 00:22:25 +00:00
dependabot[bot]
91592d5e21
Bump typescript from 5.1.5 to 5.1.6 (#294) 2023-06-29 00:51:55 +00:00
dependabot[bot]
77169d3f06
Bump typescript from 5.1.3 to 5.1.5 (#293) 2023-06-28 01:08:22 +00:00
dependabot[bot]
366e31ce17
Bump @typescript-eslint/eslint-plugin from 5.60.0 to 5.60.1 (#292) 2023-06-27 01:08:01 +00:00
dependabot[bot]
543c130543
Bump @types/node from 20.3.1 to 20.3.2 (#291) 2023-06-27 01:07:31 +00:00
dependabot[bot]
b7e0eae52f
Bump @typescript-eslint/parser from 5.60.0 to 5.60.1 (#290) 2023-06-27 01:06:12 +00:00
dependabot[bot]
3d78d1cbc3
Bump @typescript-eslint/parser from 5.59.11 to 5.60.0 (#289) 2023-06-20 01:10:08 +00:00
dependabot[bot]
bba1ceb04a
Bump @typescript-eslint/eslint-plugin from 5.59.11 to 5.60.0 (#288) 2023-06-20 01:06:48 +00:00
dependabot[bot]
27d9c954ba
Bump eslint from 8.42.0 to 8.43.0 (#287) 2023-06-19 01:36:57 +00:00
dependabot[bot]
3d31ca39ea
Bump @types/node from 20.3.0 to 20.3.1 (#286) 2023-06-14 01:10:12 +00:00
dependabot[bot]
995cec0974
Bump @typescript-eslint/eslint-plugin from 5.59.9 to 5.59.11 (#285) 2023-06-13 01:07:19 +00:00
dependabot[bot]
9fae4246d0
Bump @typescript-eslint/parser from 5.59.9 to 5.59.11 (#284) 2023-06-13 01:06:14 +00:00
dependabot[bot]
7db8afc51c
Bump @types/node from 20.2.5 to 20.3.0 (#283) 2023-06-12 01:38:27 +00:00
dependabot[bot]
e0f3d4ca87
Bump fastify from 4.17.0 to 4.18.0 (#282) 2023-06-12 01:37:32 +00:00
dependabot[bot]
3a6fe1390d
Bump actions/checkout from 3.5.2 to 3.5.3 (#281) 2023-06-12 01:37:07 +00:00
dependabot[bot]
eca3bff6c3
Bump @typescript-eslint/parser from 5.59.8 to 5.59.9 (#280) 2023-06-06 01:10:28 +00:00
dependabot[bot]
7b110d609b
Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.59.9 (#279) 2023-06-06 01:07:35 +00:00
dependabot[bot]
486587fc86
Bump release-it from 15.10.5 to 15.11.0 (#278) 2023-06-06 01:06:03 +00:00
dependabot[bot]
c54cd9b871
Bump release-it from 15.10.3 to 15.10.5 (#277) 2023-06-05 01:40:09 +00:00
dependabot[bot]
b4210ec85d
Bump eslint from 8.41.0 to 8.42.0 (#276) 2023-06-05 01:38:48 +00:00
dependabot[bot]
252fab726a
Bump typescript from 5.0.4 to 5.1.3 (#275) 2023-06-02 01:06:49 +00:00
dependabot[bot]
e7343bd194
Bump @typescript-eslint/eslint-plugin from 5.59.7 to 5.59.8 (#274) 2023-05-30 01:06:36 +00:00
dependabot[bot]
c4626d0186
Bump @typescript-eslint/parser from 5.59.7 to 5.59.8 (#273) 2023-05-30 01:05:09 +00:00
dependabot[bot]
03843eacf2
Bump @types/node from 20.2.4 to 20.2.5 (#271) 2023-05-27 11:26:29 +00:00
Lars Strojny
7b0be18923
Setup dependabot automerge 2023-05-27 13:23:21 +02:00
dependabot[bot]
9ce1163bc0
Bump @types/node from 20.2.3 to 20.2.4 (#269) 2023-05-26 09:37:06 +02:00
dependabot[bot]
717b27c4e2
Bump @typescript-eslint/eslint-plugin from 5.59.6 to 5.59.7 (#267) 2023-05-25 18:08:52 +02:00
dependabot[bot]
945568d91c
Bump @typescript-eslint/parser from 5.59.6 to 5.59.7 (#268) 2023-05-25 18:08:43 +02:00
dependabot[bot]
ae9dc17e0f
Bump hap-nodejs from 0.11.0 to 0.11.1 (#239) 2023-05-22 16:03:50 +02:00
dependabot[bot]
c18d79e662
Bump homebridge from 1.6.0 to 1.6.1 (#241) 2023-05-22 16:03:42 +02:00
dependabot[bot]
17bcf3d4cf
Bump @typescript-eslint/eslint-plugin from 5.59.1 to 5.59.6 (#258) 2023-05-22 15:54:01 +02:00
dependabot[bot]
c8b70eeb27
Bump @typescript-eslint/parser from 5.59.1 to 5.59.6 (#256) 2023-05-22 15:53:51 +02:00
dependabot[bot]
a8c4a19808
Bump release-it from 15.10.1 to 15.10.3 (#245) 2023-05-22 15:45:50 +02:00
dependabot[bot]
05ad26f999
Bump xml2js and @homebridge/dbus-native (#255) 2023-05-22 15:45:40 +02:00
dependabot[bot]
d1cf71869e
Bump vm2 from 3.9.17 to 3.9.19 (#260) 2023-05-22 15:45:06 +02:00
dependabot[bot]
d2cfdef13a
Bump rimraf from 5.0.0 to 5.0.1 (#261) 2023-05-22 15:44:57 +02:00
dependabot[bot]
539c202a83
Bump @fastify/auth from 4.2.0 to 4.3.0 (#264) 2023-05-22 15:44:19 +02:00
dependabot[bot]
d63f3fb465
Bump @types/node from 18.16.1 to 20.2.3 (#265) 2023-05-22 15:44:03 +02:00
dependabot[bot]
6d217c3e95
Bump eslint from 8.39.0 to 8.41.0 (#266) 2023-05-22 15:43:51 +02:00
dependabot[bot]
d3f77a7180
Bump fastify from 4.15.0 to 4.17.0 (#238) 2023-05-22 15:43:40 +02:00
dependabot[bot]
be61660ab7
Bump @typescript-eslint/parser from 5.58.0 to 5.59.1 (#232) 2023-04-26 13:19:16 +02:00
dependabot[bot]
9126d38fea
Bump @typescript-eslint/eslint-plugin from 5.58.0 to 5.59.1 (#233) 2023-04-26 09:25:38 +02:00
dependabot[bot]
5515aaf590
Bump @types/node from 18.16.0 to 18.16.1 (#235) 2023-04-26 09:22:54 +02:00
dependabot[bot]
2d5ba1d8f1
Bump actions/checkout from 3.5.0 to 3.5.2 (#224) 2023-04-25 14:59:59 +02:00
dependabot[bot]
92155ae9b2
Bump vm2 from 3.9.15 to 3.9.17 (#228) 2023-04-25 14:59:50 +02:00
dependabot[bot]
e216174dce
Bump eslint from 8.38.0 to 8.39.0 (#229) 2023-04-25 14:59:24 +02:00
dependabot[bot]
dd983f9926
Bump prettier from 2.8.7 to 2.8.8 (#230) 2023-04-25 14:59:16 +02:00
dependabot[bot]
dc4c8d8d39
Bump @types/node from 18.15.11 to 18.16.0 (#231) 2023-04-25 14:59:05 +02:00
dependabot[bot]
ec2025b768
Bump vm2 from 3.9.14 to 3.9.15 (#216) 2023-04-11 13:31:53 +02:00
dependabot[bot]
c3f519ae4a
Bump typescript from 5.0.3 to 5.0.4 (#217) 2023-04-11 13:31:46 +02:00
dependabot[bot]
acfb6e689e
Bump rimraf from 4.4.1 to 5.0.0 (#218) 2023-04-11 13:31:38 +02:00
dependabot[bot]
ccb89a9889
Bump eslint from 8.37.0 to 8.38.0 (#219) 2023-04-11 13:31:30 +02:00
dependabot[bot]
cb77478841
Bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.58.0 (#220) 2023-04-11 13:31:20 +02:00
dependabot[bot]
20b362a90c
Bump @typescript-eslint/parser from 5.57.1 to 5.58.0 (#221) 2023-04-11 13:31:11 +02:00
dependabot[bot]
c392a82084
Bump eslint-import-resolver-typescript from 3.5.4 to 3.5.5 (#215) 2023-04-06 15:45:58 +02:00
dependabot[bot]
cbc6d971ac
Bump @typescript-eslint/parser from 5.57.0 to 5.57.1 (#212) 2023-04-04 12:44:43 +02:00
dependabot[bot]
409c477d63
Bump @typescript-eslint/eslint-plugin from 5.57.0 to 5.57.1 (#213) 2023-04-04 12:22:04 +02:00
dependabot[bot]
ea238c97f6
Bump release-it from 15.10.0 to 15.10.1 (#214) 2023-04-04 12:21:58 +02:00
dependabot[bot]
5ed6ee7d1e
Bump release-it from 15.9.3 to 15.10.0 (#211) 2023-04-03 14:56:17 +02:00
dependabot[bot]
1c57adc4a0
Bump ts-jest from 29.0.5 to 29.1.0 (#210) 2023-04-03 14:56:11 +02:00
dependabot[bot]
890d1ef780
Bump typescript from 5.0.2 to 5.0.3 (#209) 2023-03-31 11:12:36 +02:00
dependabot[bot]
92f88d1fe9
Bump eslint-import-resolver-typescript from 3.5.3 to 3.5.4 (#208) 2023-03-30 08:14:37 +02:00
dependabot[bot]
bad4fa08b5
Bump release-it from 15.9.1 to 15.9.3 (#203) 2023-03-30 01:10:39 +02:00
dependabot[bot]
8646f816fc
Bump prettier from 2.8.6 to 2.8.7 (#200) 2023-03-29 22:45:22 +02:00
dependabot[bot]
47eb77c6fd
Bump actions/checkout from 3.4.0 to 3.5.0 (#202) 2023-03-29 08:19:36 +02:00
dependabot[bot]
796eec97c2
Bump @typescript-eslint/eslint-plugin from 5.56.0 to 5.57.0 (#204) 2023-03-29 08:17:05 +02:00
dependabot[bot]
b4512f25cc
Bump @typescript-eslint/parser from 5.56.0 to 5.57.0 (#205) 2023-03-29 08:15:02 +02:00
dependabot[bot]
c2997d04d5
Bump @types/node from 18.15.6 to 18.15.11 (#206) 2023-03-29 08:13:30 +02:00
dependabot[bot]
9c4964c1ae
Bump eslint from 8.36.0 to 8.37.0 (#207) 2023-03-29 08:13:19 +02:00
dependabot[bot]
1ead5e54ef
Bump @types/node from 18.15.5 to 18.15.6 (#199) 2023-03-24 08:16:44 +01:00
dependabot[bot]
c73299f7b1
Bump rimraf from 4.4.0 to 4.4.1 (#197) 2023-03-23 13:52:34 +01:00
dependabot[bot]
5d8dee811a
Bump nodemon from 2.0.21 to 2.0.22 (#198) 2023-03-23 13:52:15 +01:00
dependabot[bot]
d176ad2c9d
Bump release-it from 15.9.0 to 15.9.1 (#196) 2023-03-22 05:31:35 +01:00
dependabot[bot]
d1a39d9838
Bump prettier from 2.8.5 to 2.8.6 (#195) 2023-03-22 05:31:01 +01:00
dependabot[bot]
a85bf04d0e
Bump @typescript-eslint/eslint-plugin from 5.55.0 to 5.56.0 (#191) 2023-03-21 22:32:46 +01:00
dependabot[bot]
0ccc4a8579
Bump @types/node from 18.15.3 to 18.15.5 (#194) 2023-03-21 21:25:31 +01:00
dependabot[bot]
719ff9edd1
Bump prettier from 2.8.4 to 2.8.5 (#193) 2023-03-21 21:25:23 +01:00
dependabot[bot]
106daf044b
Bump @typescript-eslint/parser from 5.55.0 to 5.56.0 (#192) 2023-03-21 21:25:12 +01:00
dependabot[bot]
f97a52b0a7
Bump fastify from 4.14.1 to 4.15.0 (#190) 2023-03-21 21:25:03 +01:00
dependabot[bot]
c07b8fdff8
Bump typescript from 4.9.5 to 5.0.2 (#188) 2023-03-19 23:54:57 +01:00
dependabot[bot]
84b23d6b14
Bump release-it from 15.8.0 to 15.9.0 (#189) 2023-03-17 07:29:23 +01:00
dependabot[bot]
9446ff2a16
Bump actions/checkout from 3.3.0 to 3.4.0 (#187) 2023-03-16 07:23:02 +01:00
dependabot[bot]
92594538fa
Bump @typescript-eslint/eslint-plugin from 5.54.1 to 5.55.0 (#182) 2023-03-15 19:55:33 +01:00
dependabot[bot]
37a8545c5e
Bump @typescript-eslint/parser from 5.54.1 to 5.55.0 (#183) 2023-03-15 19:55:17 +01:00
dependabot[bot]
47a097cc4d
Bump actions/cache from 3.3.0 to 3.3.1 (#184) 2023-03-15 19:55:08 +01:00
dependabot[bot]
b5f8df30d8
Bump @types/node from 18.15.0 to 18.15.3 (#186) 2023-03-15 19:55:00 +01:00
dependabot[bot]
df991fe5e5
Bump eslint from 8.35.0 to 8.36.0 (#181) 2023-03-13 07:32:19 +01:00
dependabot[bot]
eba5c42871
Bump rimraf from 4.3.1 to 4.4.0 (#177) 2023-03-12 10:34:04 +01:00
dependabot[bot]
87721ec82a
Bump release-it from 15.7.0 to 15.8.0 (#178) 2023-03-12 10:33:03 +01:00
dependabot[bot]
d76faf9197
Bump actions/cache from 3.2.6 to 3.3.0 (#179) 2023-03-12 10:30:55 +01:00
dependabot[bot]
dc71ce5ca4
Bump @types/node from 18.14.6 to 18.15.0 (#180) 2023-03-12 10:30:11 +01:00
dependabot[bot]
579e973c66
Bump fastify from 4.13.0 to 4.14.1 (#176) 2023-03-07 21:46:29 +01:00
dependabot[bot]
9ea9576aa2
Bump @types/node from 18.14.4 to 18.14.6 (#169) 2023-03-07 18:56:03 +01:00
dependabot[bot]
b88630e1ea
Bump rimraf from 4.2.0 to 4.3.1 (#170) 2023-03-07 18:50:45 +01:00
dependabot[bot]
82983a2827
Bump jest from 29.4.3 to 29.5.0 (#174) 2023-03-07 18:50:32 +01:00
dependabot[bot]
0a58df5386
Bump @jest/globals from 29.4.3 to 29.5.0 (#175) 2023-03-07 18:50:24 +01:00
dependabot[bot]
789f0ffea8
Bump @typescript-eslint/eslint-plugin from 5.54.0 to 5.54.1 (#173) 2023-03-07 18:50:16 +01:00
dependabot[bot]
3063ea575c
Bump @typescript-eslint/parser from 5.54.0 to 5.54.1 (#172) 2023-03-07 18:50:09 +01:00
dependabot[bot]
ddac01aea3
Bump zod from 3.20.6 to 3.21.3 (#171) 2023-03-07 18:49:51 +01:00
dependabot[bot]
d4d0f412e4
Bump rimraf from 4.1.3 to 4.2.0 (#164) 2023-03-03 06:08:29 +01:00
dependabot[bot]
5e0472c1f6
Bump nodemon from 2.0.20 to 2.0.21 (#163) 2023-03-03 05:41:18 +01:00
dependabot[bot]
b254a33d47
Bump @types/node from 18.14.2 to 18.14.4 (#165) 2023-03-03 05:40:59 +01:00
dependabot[bot]
b3eea21ecb
Bump eslint from 8.34.0 to 8.35.0 (#157) 2023-03-02 22:32:39 +01:00
dependabot[bot]
454e3d1e89
Bump @typescript-eslint/eslint-plugin from 5.53.0 to 5.54.0 (#158) 2023-03-02 20:14:13 +01:00
dependabot[bot]
2a578c5d1b
Bump release-it from 15.6.1 to 15.7.0 (#161) 2023-03-02 20:14:05 +01:00
dependabot[bot]
0131f8a3f7
Bump rimraf from 4.1.2 to 4.1.3 (#162) 2023-03-02 20:13:56 +01:00
dependabot[bot]
9bce041750
Bump @typescript-eslint/parser from 5.53.0 to 5.54.0 (#159) 2023-03-01 16:25:05 +01:00
dependabot[bot]
6f20f49855
Bump @types/node from 18.14.0 to 18.14.2 (#156) 2023-03-01 07:56:23 +01:00
dependabot[bot]
fe6804d1e9
Bump release-it from 15.6.0 to 15.6.1 (#160) 2023-03-01 07:51:13 +01:00
dependabot[bot]
4008da12a8
Bump @types/node from 18.13.0 to 18.14.0 (#152) 2023-02-23 23:19:59 +01:00
dependabot[bot]
49291172ac
Bump @typescript-eslint/eslint-plugin from 5.52.0 to 5.53.0 (#153) 2023-02-23 23:19:03 +01:00
dependabot[bot]
daf064caee
Bump @typescript-eslint/parser from 5.52.0 to 5.53.0 (#154) 2023-02-23 23:18:26 +01:00
dependabot[bot]
ad5fe8b853
Bump actions/cache from 3.2.5 to 3.2.6 (#155) 2023-02-23 23:17:50 +01:00
Lars Strojny
970b7129c0
PayPal sponsorship 2023-02-18 15:04:40 +01:00
Lars Strojny
520725ecd9
Setup direnv 2023-02-18 15:04:40 +01:00
dependabot[bot]
bcd798a057
Bump @typescript-eslint/eslint-plugin from 5.51.0 to 5.52.0 (#147) 2023-02-17 18:13:07 +01:00
dependabot[bot]
9faea4df2c
Bump eslint from 8.33.0 to 8.34.0 (#145) 2023-02-17 18:01:33 +01:00
dependabot[bot]
d6ca56b6e5
Bump actions/cache from 3.2.4 to 3.2.5 (#146) 2023-02-17 18:01:25 +01:00
dependabot[bot]
ab9c4fb17d
Bump @typescript-eslint/parser from 5.51.0 to 5.52.0 (#148) 2023-02-17 18:01:11 +01:00
dependabot[bot]
00ccd46018
Bump jest from 29.4.2 to 29.4.3 (#150) 2023-02-17 18:01:00 +01:00
dependabot[bot]
705c7f4f4f
Bump @jest/globals from 29.4.2 to 29.4.3 (#149) 2023-02-17 18:00:52 +01:00
dependabot[bot]
29801d3f81
Bump json-schema-to-zod from 0.6.2 to 0.6.3 (#151) 2023-02-17 18:00:40 +01:00
dependabot[bot]
8e71014357
Bump cacheable-request from 10.2.2 to 10.2.7 (#144) 2023-02-11 09:28:07 +01:00
dependabot[bot]
e086844f3f
Bump fastify from 4.12.0 to 4.13.0 (#143) 2023-02-10 07:38:46 +01:00
dependabot[bot]
80c64cf0e3
Bump zod from 3.20.5 to 3.20.6 (#142) 2023-02-10 07:38:31 +01:00
dependabot[bot]
3b15f7f37a
Bump zod from 3.20.2 to 3.20.5 (#141) 2023-02-09 09:34:42 +01:00
dependabot[bot]
ac8caabcda
Bump prettier from 2.8.3 to 2.8.4 (#140) 2023-02-09 09:34:28 +01:00
dependabot[bot]
cb415fa855
Bump @types/node from 18.11.19 to 18.13.0 (#139) 2023-02-08 09:13:22 +01:00
dependabot[bot]
001aaf069a
Bump jest from 29.4.1 to 29.4.2 (#138) 2023-02-08 09:13:15 +01:00
dependabot[bot]
1ff3300a85
Bump @jest/globals from 29.4.1 to 29.4.2 (#137) 2023-02-08 09:13:05 +01:00
dependabot[bot]
55b67bc1dd
Bump @types/node from 18.11.18 to 18.11.19 (#134) 2023-02-07 16:14:37 +01:00
dependabot[bot]
736cc88149
Bump @typescript-eslint/parser from 5.50.0 to 5.51.0 (#136) 2023-02-07 08:01:59 +01:00
dependabot[bot]
2f6f6c816c
Bump @typescript-eslint/eslint-plugin from 5.50.0 to 5.51.0 (#135) 2023-02-07 08:01:49 +01:00
dependabot[bot]
c85023b9d6
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#133) 2023-02-02 13:19:57 +01:00
dependabot[bot]
0322126616
Bump @typescript-eslint/eslint-plugin from 5.49.0 to 5.50.0 (#132) 2023-02-02 13:19:47 +01:00
dependabot[bot]
6fe53182aa
Bump @typescript-eslint/parser from 5.49.0 to 5.50.0 (#131) 2023-02-02 09:22:44 +01:00
dependabot[bot]
a7a39a4a1c
Bump actions/cache from 3.2.3 to 3.2.4 (#129) 2023-01-31 09:34:40 +01:00
dependabot[bot]
9ab7f7f442
Bump typescript from 4.9.4 to 4.9.5 (#130) 2023-01-31 09:32:59 +01:00
dependabot[bot]
9e34c098cc
Bump eslint from 8.32.0 to 8.33.0 (#128) 2023-01-30 10:31:46 +01:00
dependabot[bot]
5f25da655a
Bump jest from 29.4.0 to 29.4.1 (#127) 2023-01-27 01:40:33 +01:00
dependabot[bot]
710f2b07e7
Bump @jest/globals from 29.4.0 to 29.4.1 (#126) 2023-01-27 01:40:23 +01:00
dependabot[bot]
93cf430c19
Bump jest from 29.3.1 to 29.4.0 (#124) 2023-01-25 10:54:29 +01:00
dependabot[bot]
41ae48102c
Bump rimraf from 4.1.1 to 4.1.2 (#125) 2023-01-25 10:54:15 +01:00
dependabot[bot]
e08596d098
Bump @jest/globals from 29.3.1 to 29.4.0 (#123) 2023-01-25 10:54:01 +01:00
dependabot[bot]
5166af0d25
Bump cookiejar from 2.1.3 to 2.1.4 (#122) 2023-01-24 10:28:58 +01:00
dependabot[bot]
e9c4c8fb29
Bump @typescript-eslint/parser from 5.48.2 to 5.49.0 (#121) 2023-01-24 09:59:02 +01:00
dependabot[bot]
540fad5757
Bump @typescript-eslint/eslint-plugin from 5.48.2 to 5.49.0 (#120) 2023-01-24 09:58:40 +01:00
dependabot[bot]
891ae81a2c
Bump fastify from 4.11.0 to 4.12.0 (#119) 2023-01-23 11:01:36 +01:00
dependabot[bot]
4af4035ce9
Bump rimraf from 4.0.7 to 4.1.1 (#118) 2023-01-18 08:29:39 +01:00
dependabot[bot]
9213eb707b
Bump @typescript-eslint/eslint-plugin from 5.48.1 to 5.48.2 (#117) 2023-01-17 10:17:26 +01:00
dependabot[bot]
a794d7bf39
Bump eslint-plugin-import from 2.27.4 to 2.27.5 (#116) 2023-01-17 09:31:36 +01:00
dependabot[bot]
0df74d8ff0
Bump @typescript-eslint/parser from 5.48.1 to 5.48.2 (#115) 2023-01-17 09:31:04 +01:00
dependabot[bot]
e480235537
Bump eslint from 8.31.0 to 8.32.0 (#111) 2023-01-16 04:16:57 +01:00
dependabot[bot]
484280f497
Bump prettier from 2.8.2 to 2.8.3 (#113) 2023-01-16 04:16:34 +01:00
dependabot[bot]
5707c03cd4
Bump ts-jest from 29.0.4 to 29.0.5 (#114) 2023-01-16 04:16:04 +01:00
dependabot[bot]
4b7d9ee94e
Bump rimraf from 4.0.1 to 4.0.7 (#112) 2023-01-16 04:15:03 +01:00
dependabot[bot]
eddc283983
Bump eslint-plugin-import from 2.27.0 to 2.27.4 (#110) 2023-01-13 10:49:41 +01:00
dependabot[bot]
438ec423c4
Bump rimraf from 3.0.2 to 4.0.1 (#109) 2023-01-13 10:49:05 +01:00
Lars Strojny
a8cc8290e2
Fix build 2023-01-12 16:15:30 +01:00
dependabot[bot]
d70eb9064a
Bump eslint-plugin-import from 2.26.0 to 2.27.0 (#108) 2023-01-12 13:00:58 +01:00
dependabot[bot]
06d74c57ce
Bump hap-node-client from 0.2.2 to 0.2.4 (#105) 2023-01-12 13:00:42 +01:00
dependabot[bot]
e99c4c57a2
Bump eslint-import-resolver-typescript from 3.5.2 to 3.5.3 (#106) 2023-01-12 12:56:54 +01:00
dependabot[bot]
744cd7ed4c
Bump ts-jest from 29.0.3 to 29.0.4 (#107) 2023-01-12 12:56:24 +01:00
dependabot[bot]
cb8d04a2b2
Bump @typescript-eslint/eslint-plugin from 5.48.0 to 5.48.1 (#104) 2023-01-10 11:46:44 +01:00
dependabot[bot]
317b8b598b
Bump @typescript-eslint/parser from 5.48.0 to 5.48.1 (#103) 2023-01-10 10:49:10 +01:00
dependabot[bot]
c9c9ba45eb
Bump actions/cache from 3.2.2 to 3.2.3 (#102) 2023-01-10 10:48:58 +01:00
dependabot[bot]
fe524c1f0a
Bump prettier from 2.8.1 to 2.8.2 (#100) 2023-01-09 02:36:49 +01:00
dependabot[bot]
bbc21f4c6e
Bump hap-node-client from 0.2.1 to 0.2.2 (#98) 2023-01-09 02:36:39 +01:00
dependabot[bot]
bd17d79c0d
Bump json-schema-to-zod from 0.6.1 to 0.6.2 (#99) 2023-01-09 02:36:29 +01:00
dependabot[bot]
de6ff2decd
Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#101) 2023-01-09 02:36:03 +01:00
Lars Strojny
76a3ad9c7f
Release 1.0.5 2023-01-08 17:22:39 +01:00
Lars Strojny
33a7c9d0cf
Terminate output with a linefeed 2023-01-08 17:21:41 +01:00
Lars Strojny
8935a2402c
Release 1.0.4 2023-01-08 15:13:32 +01:00
Lars Strojny
c5f289946c
Fix missing metrics grouping (#97)
Closes #96
2023-01-08 15:12:01 +01:00
dependabot[bot]
be7210d375
Bump actions/checkout from 3.2.0 to 3.3.0 (#95) 2023-01-06 10:54:05 +01:00
dependabot[bot]
70468821ea
Bump actions/setup-node from 3.5.1 to 3.6.0 (#94) 2023-01-06 10:53:34 +01:00
dependabot[bot]
cc19c0fe40
Bump hap-node-client from 0.1.29 to 0.2.1 (#93) 2023-01-04 11:59:40 +01:00
dependabot[bot]
b4a263e4e4
Bump json5 from 1.0.1 to 1.0.2 (#92) 2023-01-03 22:22:57 +01:00
Lars Strojny
f1746e47b3
Release 1.0.3 2023-01-03 22:04:58 +01:00
Lars Strojny
3c9ecc1f65
Skip to 1.0.2 2023-01-03 22:03:48 +01:00
Lars Strojny
67824f6a37
Document configuration default values (#91) 2023-01-03 22:00:31 +01:00
dependabot[bot]
626ff1951b
Bump @typescript-eslint/parser from 5.47.1 to 5.48.0 (#90) 2023-01-03 11:52:44 +01:00
dependabot[bot]
3f405e1a70
Bump @typescript-eslint/eslint-plugin from 5.47.1 to 5.48.0 (#89) 2023-01-03 11:52:08 +01:00
dependabot[bot]
0b98217d3b
Bump json-schema-to-zod from 0.6.0 to 0.6.1 (#86) 2023-01-02 13:45:18 +01:00
dependabot[bot]
8d16187a0a
Bump eslint from 8.30.0 to 8.31.0 (#87) 2023-01-02 13:45:09 +01:00
dependabot[bot]
a850d1cbdf
Bump fastify from 4.10.2 to 4.11.0 (#88) 2023-01-02 13:44:59 +01:00
dependabot[bot]
13d3867522
Bump release-it from 15.5.1 to 15.6.0 (#84) 2022-12-31 19:18:53 +01:00
dependabot[bot]
23a891be36
Bump actions/cache from 3.2.1 to 3.2.2 (#85) 2022-12-31 19:18:44 +01:00
dependabot[bot]
2acb8da732
Bump @typescript-eslint/parser from 5.47.0 to 5.47.1 (#82) 2022-12-27 14:07:35 +01:00
dependabot[bot]
92070192d8
Bump actions/cache from 3.2.0 to 3.2.1 (#80) 2022-12-27 14:07:21 +01:00
dependabot[bot]
3e9803c106
Bump @types/node from 18.11.17 to 18.11.18 (#81) 2022-12-27 14:03:43 +01:00
dependabot[bot]
e780b319c7
Bump @typescript-eslint/eslint-plugin from 5.47.0 to 5.47.1 (#83) 2022-12-27 14:03:31 +01:00
dependabot[bot]
f971f044b6
Bump actions/cache from 3.0.11 to 3.2.0 (#78) 2022-12-22 09:37:12 +01:00
dependabot[bot]
abba84e44b
Bump hap-node-client from 0.1.28 to 0.1.29 (#77) 2022-12-21 14:01:25 +01:00
Lars Strojny
ed69818d61
Update package.lock 2022-12-20 13:57:41 +01:00
Lars Strojny
64b180c059
Replace npx with portable npx exec (#76)
`npx` will also consider global installations potentially leading to
build issues.
2022-12-20 13:57:00 +01:00
dependabot[bot]
482aa769a1
Bump @typescript-eslint/parser from 5.46.1 to 5.47.0 (#75) 2022-12-20 10:58:08 +01:00
dependabot[bot]
f8d4e43aef
Bump @typescript-eslint/eslint-plugin from 5.46.1 to 5.47.0 (#74) 2022-12-20 10:57:35 +01:00
dependabot[bot]
82506f8b45
Bump @types/node from 18.11.15 to 18.11.17 (#73) 2022-12-19 09:23:55 +01:00
dependabot[bot]
b31833ad61
Bump eslint from 8.29.0 to 8.30.0 (#72) 2022-12-19 09:23:46 +01:00
dependabot[bot]
62f3bea6cb
Bump hap-node-client from 0.1.25 to 0.1.28 (#71) 2022-12-19 09:23:28 +01:00
14 changed files with 5772 additions and 4235 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

1
.github/FUNDING.yml vendored
View file

@ -1 +1,2 @@
github: lstrojny
custom: ["https://paypal.me/larsstrojny"]

View file

@ -20,16 +20,16 @@ jobs:
name: nodejs ${{ matrix.node-version }} (${{ matrix.lint && 'lint → ' || '' }}${{ matrix.tests && 'test → ' || '' }}build)
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/checkout@v4.1.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3.0.11
uses: actions/cache@v3.3.2
env:
cache-name: cache-node-modules
with:
@ -38,7 +38,7 @@ jobs:
- name: Cache eslint
id: cache-eslint
uses: actions/cache@v3.0.11
uses: actions/cache@v3.3.2
env:
cache-name: cache-eslint
with:
@ -47,7 +47,7 @@ jobs:
- name: Cache TypeScript
id: cache-typescript
uses: actions/cache@v3.0.11
uses: actions/cache@v3.3.2
env:
cache-name: cache-typescript
with:
@ -56,7 +56,7 @@ jobs:
- name: Cache prettier
id: cache-prettier
uses: actions/cache@v3.0.11
uses: actions/cache@v3.3.2
env:
cache-name: cache-prettier
with:
@ -76,7 +76,7 @@ jobs:
if: ${{ matrix.tests }}
- name: Upload code coverage
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v3.1.3
with:
name: code-coverage
path: coverage/lcov.info

View file

@ -0,0 +1,28 @@
name: Dependabot auto merge
on:
workflow_run:
workflows: [CI]
types:
- completed
jobs:
automerge:
name: Auto merge "${{ github.event.workflow_run.head_branch }}"
runs-on: ubuntu-22.04
if: >
github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.conclusion == 'success'
&& github.actor == 'dependabot[bot]'
&& startsWith(github.event.workflow_run.head_branch, 'dependabot/')
steps:
- name: Checkout source
uses: actions/checkout@v4.1.0
with:
ref: ${{ github.event.workflow_run.head_commit.id }}
- name: Instruct @dependabot to merge
run: "gh issue comment $ISSUE_ID --body \"(This is an automated comment from workflow $WORKFLOW_URL)\n\n@dependabot squash and merge\""
env:
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_COMMENT_TOKEN }}
ISSUE_ID: ${{ github.event.workflow_run.pull_requests[0].number }}
WORKFLOW_URL: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}

View file

@ -1,4 +1,4 @@
name: Sonar
name: Sonar scan
on:
workflow_run:
@ -7,12 +7,12 @@ on:
jobs:
sonar:
name: Sonar
name: Sonar scan on "${{ github.event.workflow_run.head_branch }}"
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.0
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}

View file

@ -133,16 +133,22 @@ Once *Prometheus* is restarted, metrics with the `homebridge_` prefix should sta
// Debug
//
// Default: false
"debug": "<boolean>",
// Metrics prefix
//
// Default: "homebridge"
"prefix": "<string>",
// Metrics server port
//
// TCP port where the Prometheus metrics server listens
//
// Default: 36123
"port": "<integer>",
@ -151,24 +157,32 @@ Once *Prometheus* is restarted, metrics with the `homebridge_` prefix should sta
// Interface where the Prometheus metrics server listens. Can be an IP, a
// hostname, "0.0.0.0" for all IPv4 interfaces, "::1" for all IPv6 interfaces.
// Default is "::" which means "any interface"
//
// Default: "::"
"interface": "<string>",
// Service refresh interval
//
// Discover new services every <interval> seconds
//
// Default: 60
"refresh_interval": "<integer>",
// Request timeout
//
// Request timeout when interacting with homebridge instances
//
// Default: 10
"request_timeout": "<integer>",
// Service discovery timeout
//
// Discovery timeout after which the current discovery is considered failed
//
// Default: 20
"discovery_timeout": "<integer>",

View file

@ -56,6 +56,9 @@ function generateDocs(schema) {
if (definition.description) {
lines.push(`//\n// ${wordwrap(definition.description, 80, '\n// ')}`)
}
if (definition.default !== undefined) {
lines.push(`//\n// Default: ${JSON.stringify(definition.default)}`)
}
lines.push(`${JSON.stringify(property)}: ${JSON.stringify('<' + definition.type + '>')}`)

9810
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "homebridge-prometheus-exporter",
"version": "1.0.1",
"version": "1.0.5",
"description": "Prometheus exporter for homebridge accessories.",
"license": "Apache-2.0",
"repository": {
@ -16,9 +16,10 @@
},
"main": "dist/src/index.js",
"scripts": {
"lint": "ifNotCi() { test \"$CI\" && echo \"$2\" || echo \"$1\"; }; npx tsc --noEmit && npx prettier --ignore-path=.gitignore `ifNotCi --write \"--check --cache --cache-strategy content\"` '**/**.{ts,js,json}' && npx eslint `ifNotCi --fix \"--cache --cache-strategy content\"` --ignore-path=.gitignore '**/**.{ts,js,json}'",
"_portable_exec": "npmPortableExec() { `npm root`/.bin/$@; }; npmPortableExec",
"lint": "ifNotCi() { test \"$CI\" && echo \"$2\" || echo \"$1\"; }; npm run _portable_exec -- tsc --noEmit && npm run _portable_exec -- prettier --ignore-path=.gitignore `ifNotCi --write \"--check --cache --cache-strategy content\"` '**/**.{ts,js,json}' && npm run _portable_exec -- eslint `ifNotCi --fix \"--cache --cache-strategy content\"` --ignore-path=.gitignore '**/**.{ts,js,json}'",
"start": "npm run build && npm run link && nodemon",
"test": "ifNotCi() { test \"$CI\" && echo \"$2\" || echo \"$1\"; }; npm run code-generation && npx jest `ifNotCi --watchAll --collect-coverage`",
"test": "ifNotCi() { test \"$CI\" && echo \"$2\" || echo \"$1\"; }; npm run code-generation && npm run _portable_exec -- jest `ifNotCi --watchAll --collect-coverage`",
"link": "npm install --no-save file:///$PWD/",
"build": "rimraf ./dist .tsbuildinfo && npm run code-generation && tsc",
"code-generation": "./code-generation/hap-gen.js && ./code-generation/config-scheme-gen.js",
@ -34,10 +35,11 @@
"devDependencies": {
"@jest/globals": "^29.3.0",
"@types/bcrypt": "^5.0.0",
"@types/node": "^18.11.9",
"@types/node": "^20.2.3",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"array.prototype.flatmap": "^1.3.1",
"eslint": "^8.0.1",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
@ -47,21 +49,22 @@
"homebridge-cmdswitch2": "^0.2.10",
"jest": "^29.3.0",
"json-schema-to-zod": "^0.6.0",
"nodemon": "^2.0.13",
"nodemon": "^3.0.1",
"prettier": "^2.7.1",
"release-it": "^15.5.0",
"rimraf": "^3.0.2",
"release-it": "^16.0.0",
"rimraf": "^5.0.0",
"supertest": "^6.3.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.3.0",
"typescript": "^4.4.4"
"typescript": "^5.0.2"
},
"dependencies": {
"@fastify/auth": "^4.1.0",
"@fastify/basic-auth": "^5.0.0",
"array.prototype.group": "^1.1.2",
"bcrypt": "^5.1.0",
"fastify": "^4.9.2",
"hap-node-client": "^0.1.25",
"hap-node-client": "^0.2.1",
"zod": "^3.19.1"
}
}

10
src/ambient.d.ts vendored
View file

@ -14,7 +14,11 @@ declare module 'hap-node-client' {
}
}
// Workaround for "node_modules/hap-nodejs/dist/lib/Advertiser.d.ts:5:29 - error TS7016: Could not find a declaration file for module '@homebridge/dbus-native'. '…/node_modules/@homebridge/dbus-native/index.js' implicitly has an 'any' type."
declare module '@homebridge/dbus-native' {
type InvokeError = unknown
declare module 'array.prototype.group' {
function shim(): void
}
interface Array<T> {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
group<U>(fn: (value: T, index: number, array: T[]) => U, thisArg?: any): { U: T[] }
}

View file

@ -2,6 +2,8 @@ import type { Logger } from 'homebridge'
import type { HttpConfig, HttpResponse, HttpServer } from './adapters/http'
import type { Metric } from './metrics'
import { strTrimRight } from './std'
import { shim } from 'array.prototype.group'
shim()
export class MetricsRenderer {
private readonly prefix: string
@ -10,17 +12,26 @@ export class MetricsRenderer {
this.prefix = strTrimRight(prefix, '_')
}
render(metric: Metric): string {
const name = this.metricName(metric.name)
return [
`# TYPE ${name} ${name.endsWith('_total') ? 'counter' : 'gauge'}`,
`${name}${this.renderLabels(metric.labels)} ${metric.value}${
metric.timestamp !== null ? ' ' + String(metric.timestamp.getTime()) : ''
}`,
].join('\n')
render(metrics: Metric[]): string {
return (
Object.entries(metrics.sort().group((metric) => this.metricName(metric.name)))
.map(([name, metrics]) => {
return [
`# TYPE ${name} ${name.endsWith('_total') ? 'counter' : 'gauge'}`,
metrics.map((metric) => this.formatMetric(metric)).join('\n'),
].join('\n')
})
.join('\n\n') + '\n'
)
}
private renderLabels(labels: Metric['labels']): string {
private formatMetric(metric: Metric): string {
return `${this.metricName(metric.name)}${MetricsRenderer.renderLabels(metric.labels)} ${metric.value}${
metric.timestamp !== null ? ' ' + String(metric.timestamp.getTime()) : ''
}`
}
private static renderLabels(labels: Metric['labels']): string {
const rendered = Object.entries(labels)
.map(([label, val]) => `${sanitizePrometheusMetricName(label)}="${escapeAttributeValue(val)}"`)
.join(',')
@ -91,7 +102,7 @@ export class PrometheusServer implements HttpServer {
}
onMetricsDiscovery(metrics: Metric[]): void {
this.metricsResponse = metrics.map((metric) => this.renderer.render(metric)).join('\n')
this.metricsResponse = this.renderer.render(metrics)
this.metricsDiscovered = true
}
}

View file

@ -71,8 +71,10 @@ describe('Fastify HTTP adapter', () => {
[
'# TYPE homebridge_metric gauge',
'homebridge_metric{name="metric"} 0.1 1577836800000',
'',
'# TYPE homebridge_something_total counter',
'homebridge_something_total{name="counter"} 100 1577836800000',
'',
].join('\n'),
)
})
@ -117,8 +119,10 @@ describe('Fastify HTTP adapter', () => {
[
'# TYPE homebridge_metric gauge',
'homebridge_metric{name="metric"} 0.1 1577836800000',
'',
'# TYPE homebridge_something_total counter',
'homebridge_something_total{name="counter"} 100 1577836800000',
'',
].join('\n'),
)
})

View file

@ -6,68 +6,94 @@ describe('Render prometheus metrics', () => {
const renderer = new MetricsRenderer('prefix')
test('Renders simple metric', () => {
expect(renderer.render(new Metric('metric', 0.000001))).toEqual(
expect(renderer.render([new Metric('metric', 0.000001)])).toEqual(
`# TYPE prefix_metric gauge
prefix_metric 0.000001`,
prefix_metric 0.000001
`,
)
})
test('Renders simple metric with timestamp', () => {
expect(renderer.render(new Metric('metric', 0.000001, new Date('2000-01-01 00:00:00 UTC')))).toEqual(
expect(renderer.render([new Metric('metric', 0.000001, new Date('2000-01-01 00:00:00 UTC'))])).toEqual(
`# TYPE prefix_metric gauge
prefix_metric 0.000001 946684800000`,
prefix_metric 0.000001 946684800000
`,
)
})
test('Renders simple metric with labels', () => {
expect(
renderer.render(
renderer.render([
new Metric('metric', 0.000001, new Date('2000-01-01 00:00:00 UTC'), { label: 'Some Label' }),
),
]),
).toEqual(
`# TYPE prefix_metric gauge
prefix_metric{label="Some Label"} 0.000001 946684800000`,
prefix_metric{label="Some Label"} 0.000001 946684800000
`,
)
})
test('Renders total as counter', () => {
for (const metricName of ['some_total_metric', 'some_metric_total', 'total_some_metric']) {
expect(
renderer.render(
renderer.render([
new Metric(metricName, 42, new Date('2000-01-01 00:00:00 UTC'), { label: 'Some Label' }),
),
]),
).toEqual(
`# TYPE prefix_some_metric_total counter
prefix_some_metric_total{label="Some Label"} 42 946684800000`,
prefix_some_metric_total{label="Some Label"} 42 946684800000
`,
)
}
})
test('Renders multiple metrics correctly', () => {
expect(
renderer.render([
new Metric('some_gauge', 10, new Date('2000-01-01 00:00:00 UTC')),
new Metric('another_gauge', 30, new Date('2000-01-01 00:00:00 UTC')),
new Metric('some_gauge', 20, new Date('2000-01-01 00:00:00 UTC')),
]),
).toEqual(
`# TYPE prefix_some_gauge gauge
prefix_some_gauge 10 946684800000
prefix_some_gauge 20 946684800000
# TYPE prefix_another_gauge gauge
prefix_another_gauge 30 946684800000
`,
)
})
test('Sanitizes metric names', () => {
expect(renderer.render(new Metric('mätric name', 0))).toEqual(
expect(renderer.render([new Metric('mätric name', 0)])).toEqual(
`# TYPE prefix_m_tric_name gauge
prefix_m_tric_name 0`,
prefix_m_tric_name 0
`,
)
})
test('Sanitizes label names', () => {
expect(renderer.render(new Metric('metric', 0, null, { 'yet another label': 'foo' }))).toEqual(
expect(renderer.render([new Metric('metric', 0, null, { 'yet another label': 'foo' })])).toEqual(
`# TYPE prefix_metric gauge
prefix_metric{yet_another_label="foo"} 0`,
prefix_metric{yet_another_label="foo"} 0
`,
)
})
test('Escapes newlines in attribute value', () => {
expect(renderer.render(new Metric('metric', 0, null, { label: 'foo\nbar' }))).toEqual(
expect(renderer.render([new Metric('metric', 0, null, { label: 'foo\nbar' })])).toEqual(
`# TYPE prefix_metric gauge
prefix_metric{label="foo\\nbar"} 0`,
prefix_metric{label="foo\\nbar"} 0
`,
)
})
test('Escapes quotes in attribute value', () => {
expect(renderer.render(new Metric('metric', 0, null, { label: 'foo"bar' }))).toEqual(
expect(renderer.render([new Metric('metric', 0, null, { label: 'foo"bar' })])).toEqual(
`# TYPE prefix_metric gauge
prefix_metric{label="foo\\"bar"} 0`,
prefix_metric{label="foo\\"bar"} 0
`,
)
})
})

View file

@ -10,7 +10,7 @@
"rootDir": "./",
"strict": true,
"esModuleInterop": true,
"importsNotUsedAsValues": "error",
"verbatimModuleSyntax": false,
"noImplicitAny": true,
"resolveJsonModule": true,
"tsBuildInfoFile": ".tsbuildinfo",