@homebridge/hap-client 4.0.4-beta.1 → 4.0.4-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge/hap-client",
3
- "version": "4.0.4-beta.1",
3
+ "version": "4.0.4-beta.3",
4
4
  "description": "A client for HAP-NodeJS.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,20 +50,20 @@
50
50
  },
51
51
  "homepage": "https://github.com/homebridge/hap-client/blob/latest#readme",
52
52
  "dependencies": {
53
- "axios": "^1.15.0",
53
+ "axios": "1.15.2",
54
54
  "bonjour-service": "1.3.0",
55
55
  "decamelize": "6.0.1",
56
56
  "inflection": "3.0.2"
57
57
  },
58
58
  "devDependencies": {
59
- "@antfu/eslint-config": "^8.1.1",
60
- "@homebridge/hap-nodejs": "^2.1.2",
59
+ "@antfu/eslint-config": "^8.2.0",
60
+ "@homebridge/hap-nodejs": "^2.1.3",
61
61
  "@types/node": "^25.6.0",
62
- "@vitest/coverage-v8": "^4.1.4",
62
+ "@vitest/coverage-v8": "^4.1.5",
63
63
  "eslint-plugin-format": "^2.0.1",
64
64
  "ts-node": "^10.9.2",
65
- "typescript": "^5.9.3",
66
- "vitest": "^4.1.4",
65
+ "typescript": "^6.0.3",
66
+ "vitest": "^4.1.5",
67
67
  "rimraf": "^6.1.3"
68
68
  }
69
69
  }
package/eslint.config.mjs DELETED
@@ -1,43 +0,0 @@
1
- import antfu from '@antfu/eslint-config'
2
-
3
- export default antfu(
4
- {
5
- ignores: ['dist', 'info', 'ui/.angular'],
6
- rules: {
7
- 'curly': ['error', 'all'],
8
- 'no-undef': 'error',
9
- 'perfectionist/sort-exports': 'error',
10
- 'perfectionist/sort-imports': [
11
- 'error',
12
- {
13
- groups: [
14
- ['type-builtin', 'type-external', 'type-internal'],
15
- ['type-parent', 'type-sibling', 'type-index'],
16
- 'builtin',
17
- 'external',
18
- 'internal',
19
- ['parent', 'sibling', 'index'],
20
- 'side-effect',
21
- 'unknown',
22
- ],
23
- internalPattern: ['^@/.*'],
24
- order: 'asc',
25
- type: 'natural',
26
- newlinesBetween: 1,
27
- },
28
- ],
29
- 'perfectionist/sort-named-exports': 'error',
30
- 'perfectionist/sort-named-imports': 'error',
31
- 'style/brace-style': ['error', '1tbs'],
32
- 'style/quote-props': ['error', 'consistent-as-needed'],
33
- 'test/no-only-tests': 'error',
34
- 'ts/consistent-type-imports': 'off',
35
- 'unicorn/no-useless-spread': 'error',
36
- 'unused-imports/no-unused-vars': ['error', { caughtErrors: 'none' }],
37
- },
38
- typescript: true,
39
- formatters: {
40
- markdown: true,
41
- },
42
- },
43
- )
@@ -1,92 +0,0 @@
1
- import { writeFileSync } from 'node:fs';
2
- import { dirname, resolve } from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
-
5
- import { Characteristic, Service, Categories } from '@homebridge/hap-nodejs';
6
-
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
-
9
- /** Generate Service Types */
10
-
11
- let Services = [
12
- 'export const Services = {',
13
- ] as any;
14
-
15
- const uuidMap = new Map();
16
-
17
- for (const [name, value] of Object.entries(Service)) {
18
- if (value.UUID) {
19
- if (!uuidMap.has(value.UUID)) {
20
- // If the UUID does not exist, add a new entry
21
- Services.push(` '${value.UUID}': '${name}',`);
22
- uuidMap.set(value.UUID, Services.length - 1);
23
- }
24
- Services.push(` '${name}': '${value.UUID}',`);
25
- }
26
- }
27
-
28
- Services.push(`}\n\n`);
29
- Services = Services.join('\n');
30
-
31
- /** Generate Characteristic Types */
32
-
33
- let Characteristics = [
34
- 'export const Characteristics = {',
35
- ] as any;
36
-
37
- for (const [name, value] of Object.entries(Characteristic)) {
38
- if (value.UUID) {
39
- Characteristics.push(` '${value.UUID}': '${name}',`);
40
- Characteristics.push(` '${name}': '${value.UUID}',`);
41
- }
42
- }
43
-
44
- Characteristics.push(`}\n\n`);
45
- Characteristics = Characteristics.join('\n');
46
-
47
- /** Generate Category Types */
48
-
49
- let Category = [
50
- 'export const Categories = {',
51
- ] as any;
52
-
53
- // @ts-ignore
54
- for (const [name, value] of Object.entries(Categories)) {
55
- if (typeof value === 'number') {
56
- Category.push(` ${name}: ${value},`);
57
- }
58
- }
59
-
60
- Category.push(`}\n\n`);
61
- Category = Category.join('\n');
62
-
63
- let Enums = [
64
- 'export const Enums = {',
65
- ] as any;
66
-
67
- for (const [name, value] of Object.entries(Characteristic)) {
68
- if (typeof value === 'function' && value.prototype) {
69
- const staticKeys = Object.getOwnPropertyNames(value)
70
- .filter(
71
- key =>
72
- key !== 'length' &&
73
- key !== 'name' &&
74
- key !== 'prototype' &&
75
- key !== 'UUID' &&
76
- typeof (value as any)[key] !== 'function'
77
- );
78
- if (staticKeys.length > 0) {
79
- Enums.push(` ${name}: {`);
80
- staticKeys.forEach(k => {
81
- Enums.push(` ${(value as any)[k]}: '${k}',`);
82
- });
83
- Enums.push(' },');
84
- }
85
- }
86
- }
87
- Enums.push(`}\n`);
88
- Enums = Enums.join('\n');
89
-
90
- const out = `/* This file is automatically generated */\n\n` + Services + Characteristics + Category + Enums
91
-
92
- writeFileSync(resolve(__dirname, '../src/hap-types.ts'), out, 'utf8');
package/scripts/notest.ts DELETED
@@ -1,9 +0,0 @@
1
- import { HapClient } from '../src/index.js';
2
-
3
- const client = new HapClient({
4
- pin: '000-00-000',
5
- logger: console,
6
- config: {
7
- debug: true
8
- }
9
- });
package/vitest.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'vitest/config'
2
-
3
- export default defineConfig({
4
- test: {
5
- coverage: {
6
- reporter: ['lcov'],
7
- include: ['src/**'],
8
- },
9
- },
10
- })