homebridge-foxess 1.3.0 → 1.4.2

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.
@@ -22,7 +22,7 @@ jobs:
22
22
  - uses: actions/checkout@v6
23
23
  - uses: pnpm/action-setup@v4
24
24
  - name: Use Node.js ${{ matrix.node-version }}
25
- uses: actions/setup-node@v6.2.0
25
+ uses: actions/setup-node@v6.3.0
26
26
  with:
27
27
  node-version: ${{ matrix.node-version }}
28
28
  cache: pnpm
@@ -0,0 +1,30 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+
11
+ permissions:
12
+ contents: read
13
+ security-events: write
14
+
15
+ jobs:
16
+ analyze:
17
+ name: Analyze
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - name: Initialize CodeQL
23
+ uses: github/codeql-action/init@v4
24
+ with:
25
+ languages: javascript-typescript
26
+
27
+ - name: Perform CodeQL Analysis
28
+ uses: github/codeql-action/analyze@v4
29
+ with:
30
+ category: "/language:javascript-typescript"
@@ -0,0 +1,44 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: [Build]
6
+ types: [completed]
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: release
12
+ cancel-in-progress: false
13
+
14
+ jobs:
15
+ release:
16
+ name: Semantic Release
17
+ runs-on: ubuntu-latest
18
+ if: >-
19
+ github.event_name == 'workflow_dispatch' ||
20
+ github.event.workflow_run.conclusion == 'success'
21
+ permissions:
22
+ contents: write
23
+ id-token: write
24
+ steps:
25
+ - uses: actions/checkout@v6
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - uses: pnpm/action-setup@v4
30
+
31
+ - uses: actions/setup-node@v6
32
+ with:
33
+ node-version: 22.x
34
+ cache: pnpm
35
+ registry-url: https://registry.npmjs.org/
36
+
37
+ - run: pnpm install --frozen-lockfile
38
+ - run: npm install -g npm@latest
39
+ - run: pnpm build
40
+
41
+ - name: Semantic Release
42
+ run: pnpm semantic-release
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,23 @@
1
+ {
2
+ "branches": ["main"],
3
+ "plugins": [
4
+ ["@semantic-release/commit-analyzer", {
5
+ "releaseRules": [
6
+ { "type": "build", "scope": "deps", "release": "patch" },
7
+ { "type": "build", "scope": "deps-dev", "release": "patch" }
8
+ ]
9
+ }],
10
+ ["@semantic-release/release-notes-generator", {
11
+ "presetConfig": {
12
+ "types": [
13
+ { "type": "feat", "section": "Features" },
14
+ { "type": "fix", "section": "Bug Fixes" },
15
+ { "type": "build", "section": "Dependencies", "hidden": false },
16
+ { "type": "perf", "section": "Performance" }
17
+ ]
18
+ }
19
+ }],
20
+ ["@semantic-release/npm", { "provenance": true }],
21
+ "@semantic-release/github"
22
+ ]
23
+ }
@@ -37,7 +37,7 @@ const deviceListPath = '/op/v0/device/list';
37
37
  async function getDevices(apiKey) {
38
38
  const results = [];
39
39
  let page = 0;
40
- let total = 0;
40
+ let total;
41
41
  do {
42
42
  const result = await post(deviceListPath, apiKey, {
43
43
  currentPage: ++page,
@@ -1 +1 @@
1
- {"version":3,"file":"foxess-api.js","sourceRoot":"","sources":["../src/foxess-api.ts"],"names":[],"mappings":";;AAkDA,gDAEC;AAuCD,gCAkBC;AASD,0CAEC;AAlHD,6CAAwC;AAExC,MAAM,OAAO,GAAG,6BAA6B,CAAA;AA0C7C,SAAgB,kBAAkB,CAAC,IAAY,EAAE,MAAc,EAAE,SAAiB;IAChF,OAAO,IAAA,wBAAU,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,SAAS,MAAM,SAAS,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACtG,CAAC;AAED,SAAS,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CAAC,KAAK,CAAA;QACpB,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;QAC9B,CAAC;IACH,CAAC,QAAQ,OAAO,CAAC,MAAM,GAAG,KAAK,EAAC;IAEhC,OAAO,OAAO,CAAA;AAChB,CAAC;AAID,MAAM,YAAY,GAAG,0BAA0B,CAAA;AAKxC,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,OAA6B;IACjF,OAAO,IAAI,CAAiB,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA;AAClE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-foxess",
3
3
  "displayName": "Homebridge FoxESS",
4
- "version": "1.3.0",
4
+ "version": "1.4.2",
5
5
  "description": "Basic utility accessories for displaying solar FoxESS solar information in Homebridge: https://github.com/nfarina/homebridge",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -29,23 +29,29 @@
29
29
  "node": ">=18.0.0",
30
30
  "homebridge": ">=1.7.0 || ^2.0.0-beta.0"
31
31
  },
32
+ "scripts": {
33
+ "forceClean": "rimraf ./dist",
34
+ "build": "tsc",
35
+ "debugIde": "pnpm build && pnpm link .",
36
+ "lint": "pnpm eslint --max-warnings=0 src",
37
+ "lintAndFix": "eslint --fix --max-warnings=0 src",
38
+ "debug": "pnpm build && homebridge -I -D -P ."
39
+ },
32
40
  "devDependencies": {
33
41
  "@eslint/js": "^9.39.4",
42
+ "@semantic-release/commit-analyzer": "13.0.1",
43
+ "@semantic-release/github": "12.0.6",
44
+ "@semantic-release/npm": "13.1.5",
45
+ "@semantic-release/release-notes-generator": "14.1.0",
34
46
  "@stylistic/eslint-plugin": "^5.10.0",
35
47
  "@types/node": "^24.12.0",
36
48
  "eslint": "^9.39.4",
37
49
  "homebridge": "^1.11.3",
38
50
  "rimraf": "^6.1.3",
51
+ "semantic-release": "25.0.3",
39
52
  "ts-node": "^10.9.2",
40
53
  "typescript": "^5.9.3",
41
54
  "typescript-eslint": "^8.57.1"
42
55
  },
43
- "scripts": {
44
- "forceClean": "rimraf ./dist",
45
- "build": "tsc",
46
- "debugIde": "pnpm build && pnpm link .",
47
- "lint": "pnpm eslint --max-warnings=0 src",
48
- "lintAndFix": "eslint --fix --max-warnings=0 src",
49
- "debug": "pnpm build && homebridge -I -D -P ."
50
- }
51
- }
56
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
57
+ }
package/renovate.json CHANGED
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "packageRules": [
12
12
  {
13
- "matchUpdateTypes": ["minor", "patch"],
13
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
14
14
  "groupName": "non-major dependencies",
15
15
  "automerge": true
16
16
  }
package/src/foxess-api.ts CHANGED
@@ -92,7 +92,7 @@ const deviceListPath = '/op/v0/device/list'
92
92
  export async function getDevices(apiKey: string): Promise<Inverter[]> {
93
93
  const results: Inverter[] = []
94
94
  let page = 0
95
- let total = 0
95
+ let total: number
96
96
 
97
97
  do {
98
98
  const result = await post<PaginatedResult<Inverter>>(deviceListPath, apiKey, {
@@ -1,27 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
-
4
- name: Release
5
-
6
- on:
7
- release:
8
- types: [published]
9
-
10
- jobs:
11
- publish:
12
- runs-on: ubuntu-latest
13
- permissions:
14
- contents: read
15
- steps:
16
- - uses: actions/checkout@v6
17
- - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
18
- - uses: actions/setup-node@v6.2.0
19
- with:
20
- node-version: latest
21
- cache: pnpm
22
- registry-url: https://registry.npmjs.org/
23
- - run: pnpm install --frozen-lockfile
24
- - run: pnpm build
25
- - run: pnpm publish --no-git-checks
26
- env:
27
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/RELEASE.md DELETED
@@ -1,5 +0,0 @@
1
- # Releasing
2
-
3
- 1. `gh release create vx.x.x --generate-notes`
4
- 1. `git checkout -b bump-version; pnpm version patch --no-git-tag-version; git add -A; git commit -m "Bump version."`
5
- 1. Push and create PR.