Skip to content

Commit

Permalink
Merge branch 'beta-4.52.3' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mkz212 authored Nov 12, 2023
2 parents 73a3b3a + 0707937 commit 6f56896
Show file tree
Hide file tree
Showing 255 changed files with 2,070 additions and 1,381 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/Attach Artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Manually Attach Artifacts ( If the automation fails )
run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }}

on:
repository_dispatch:
types: [attach-artifacts]
workflow_dispatch:
inputs:
tag:
Expand All @@ -18,6 +20,10 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 20.x

- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"

# Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format
- name: Check for Tag name Format
Expand All @@ -30,7 +36,7 @@ jobs:
- name: Install package
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }}
npm install -g homebridge-config-ui-x@$${{ needs.analyze-tags.outputs.previous-tag }}
- name: Remove invalid node-pty node-gyp run
run: |
Expand All @@ -39,11 +45,11 @@ jobs:
- name: Create Bundle
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz > SHASUMS256.txt
shasum -a 256 homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz > SHASUMS256.txt
- name: Attach Bundle
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt'
files: 'homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.inputs.tag }}
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ jobs:
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt
- name: Attach Bundle
uses: AButler/upload-release-assets@v2.0
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.release.tag_name }}
event-type: attach-artifacts
2 changes: 1 addition & 1 deletion extract-plugin-alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* This script "mocks" homebridge and is used to extract the plugin alias and type.
*/

const path = require('path');
const EventEmitter = require('events').EventEmitter;
const path = require('path');

let pluginAlias;
let pluginType;
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"reflect-metadata": "0.1.13",
"rxjs": "7.8.1",
"semver": "7.5.4",
"systeminformation": "5.21.16",
"systeminformation": "5.21.17",
"tail": "2.2.6",
"tar": "6.2.0",
"tcp-port-used": "1.0.2",
Expand Down
14 changes: 12 additions & 2 deletions scripts/lang-sync.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

/**
* Script to copy new english translation strings to the other language files
* Script to:
* - copy new english translation strings to the other language files
* - remove old translation strings from the other language files
*/

import * as fs from 'fs-extra';
import * as path from 'path';
import * as fs from 'fs-extra';

const basePath = path.dirname(__dirname);

Expand All @@ -18,11 +20,19 @@ for (const lang of langFiles) {
const translationStrings = fs.readJsonSync(langPath);

if (lang !== 'en.json') {
// find any keys in the main file that are not in the translation file, and add
for (const [key, value] of Object.entries(main)) {
if (!translationStrings.hasOwnProperty(key)) {
translationStrings[key] = value;
}
}

// find any keys in the translation file that are not in the main file, and remove
for (const key of Object.keys(translationStrings)) {
if (!main.hasOwnProperty(key)) {
delete translationStrings[key];
}
}
}

// sort keys
Expand Down
7 changes: 1 addition & 6 deletions src/bin/hb-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,7 @@ export class HomebridgeServiceHelper {
return;
}

// allow the --strict-plugin-resolution flag on Homebridge v1.4.1 or later only
if (
this.homebridgePackage &&
process.env.UIX_STRICT_PLUGIN_RESOLUTION === '1' &&
semver.gte(this.homebridgePackage.version, '1.4.1-beta.1')
) {
if (this.homebridgePackage && process.env.UIX_STRICT_PLUGIN_RESOLUTION === '1') {
if (!this.homebridgeOpts.includes('--strict-plugin-resolution')) {
this.homebridgeOpts.push('--strict-plugin-resolution');
}
Expand Down
8 changes: 4 additions & 4 deletions src/modules/status/status.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ export class StatusService {

client.emit('homebridge-status', await this.getHomebridgeStats());

// ipc status events are only available in Homebridge 1.3.3 or later - and when running in service mode
if (this.configService.serviceMode && this.configService.homebridgeVersion && semver.gt(this.configService.homebridgeVersion, '1.3.3-beta.5')) {
// ipc status events are only available when running in service mode
if (this.configService.serviceMode) {
homebridgeStatusChangeSub = this.homebridgeStatusChange.subscribe(async () => {
client.emit('homebridge-status', await this.getHomebridgeStats());
});
Expand Down Expand Up @@ -330,7 +330,7 @@ export class StatusService {
* Check if homebridge is running on the local system
*/
public async checkHomebridgeStatus() {
if (this.configService.serviceMode && this.configService.homebridgeVersion && semver.gt(this.configService.homebridgeVersion, '1.3.3-beta.5')) {
if (this.configService.serviceMode) {
return this.homebridgeStatus;
}

Expand Down Expand Up @@ -451,7 +451,7 @@ export class StatusService {

try {
const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data;
const currentLts = versionList.filter(x => x.lts)[0];
const currentLts = versionList.filter((x: any) => x.lts)[0];

// See why this is set to 2.29 at https://homebridge.io/w/JJSun
const glibcVersion = this.getGlibcVersion();
Expand Down
7 changes: 7 additions & 0 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": [
"import", "import-newlines", "sort-exports"],
"rules": {
"@angular-eslint/component-selector": [
"error",
Expand Down Expand Up @@ -77,7 +79,12 @@
],
"id-blacklist": "off",
"id-match": "off",
"import-newlines/enforce": ["error", 3],
"import/no-extraneous-dependencies": "off",
"import/order": ["warn", { "alphabetize": { "order": "asc" }, "newlines-between": "never" }],
"no-underscore-dangle": "off",
"sort-exports/sort-exports": ["warn", { "sortDir": "asc" }],
"sort-imports": ["warn", { "ignoreDeclarationSort": true }],
"space-before-function-paren": "error"
}
},
Expand Down
77 changes: 63 additions & 14 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build --configuration production --output-path=../public --source-map=false --aot=true",
"lint": "ng lint"
"lint": "ng lint --fix"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -51,9 +51,9 @@
"semver": "7.5.4",
"socket.io-client": "2.5.0",
"tslib": "2.6.2",
"xterm": "5.3.0",
"xterm-addon-fit": "0.8.0",
"xterm-addon-web-links": "0.9.0",
"xterm": "4.19.0",
"xterm-addon-fit": "0.5.0",
"xterm-addon-web-links": "0.6.0",
"zone.js": "0.12.0"
},
"devDependencies": {
Expand All @@ -68,6 +68,8 @@
"@angular/language-service": "^14.3.0",
"@fortawesome/fontawesome-free": "^6.4.2",
"@types/emoji-js": "^3.5.2",
"@types/file-saver": "^2.0.7",
"@types/lodash-es": "^4.17.11",
"@types/node": "^18.18.9",
"@types/qrcode": "^1.5.5",
"@types/semver": "^7.5.5",
Expand All @@ -78,8 +80,10 @@
"codelyzer": "^6.0.2",
"eslint": "^8.53.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import-newlines": "^1.3.4",
"eslint-plugin-jsdoc": "^41.1.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-sort-exports": "^0.8.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
},
Expand Down
Loading

0 comments on commit 6f56896

Please sign in to comment.