Skip to content

Commit 70315e3

Browse files
authored
Merge branch 'Koenkk:master' into master
2 parents a9487f9 + c115f9d commit 70315e3

File tree

9,631 files changed

+239256
-70056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,631 files changed

+239256
-70056
lines changed

.devcontainer/devcontainer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
3+
4+
"postCreateCommand": "pnpm i --frozen-lockfile",
5+
6+
"portsAttributes": {
7+
"8080": {
8+
"label": "client"
9+
}
10+
}
11+
}

.github/dependabot.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: "daily"
3+
- package-ecosystem: npm
4+
versioning-strategy: increase
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
ignore:
9+
# Updated with the monthly z2m release
10+
- dependency-name: zigbee-herdsman-converters
11+
# Don't upgrade zhc and sass (because of nasty deprecation warnings which can't be fixed due to Quasar)
12+
- dependency-name: sass
13+
groups:
14+
all:
15+
applies-to: version-updates
16+
patterns:
17+
- '*'
18+
commit-message:
19+
prefix: fix(ignore)

.github/workflows/build-deploy.yml

Lines changed: 51 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,57 @@
1-
name: Build and Deploy 🚀
1+
name: Build and deploy
22

33
on: [push, pull_request]
44

55
concurrency:
6-
group: ${{ github.ref }}
6+
group: ${{ github.ref }}
77

88
jobs:
9-
build_and_deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout 🚚
13-
uses: actions/checkout@v3
14-
15-
- name: Setup Node.js ⚗
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: '18'
19-
20-
- name: Determine node version №
21-
id: node-version
22-
run: |
23-
echo "::set-output name=version::$(node -v)"
24-
25-
- name: Restore Cache 📦
26-
uses: actions/cache@v3
27-
id: cache
28-
with:
29-
path: node_modules
30-
key: ${{ runner.os }}-node-${{ steps.node-version.outputs.version }}-${{ hashFiles('package-lock.json') }}
31-
32-
- name: Install dependencies 🌐
33-
if: steps.cache.outputs.cache-hit != 'true'
34-
run: npm ci
35-
36-
# - name: Set DEVELOP_BRANCH env var
37-
# if: github.ref == 'refs/heads/develop'
38-
# run: |
39-
# echo "DEVELOP_BRANCH=yes" >> $GITHUB_ENV
40-
41-
- name: Build 🛠
42-
run: npm run build
43-
44-
- name: Run tests 🩺
45-
run: npm run test
46-
47-
- name: Add build.txt 🗓
48-
run: |
49-
git log --pretty=format:'%h' -n 1 > dist/build.txt
50-
echo >> dist/build.txt
51-
date +%F_%T >> dist/build.txt
52-
53-
- name: Deploy 🚀
54-
if: github.ref == 'refs/heads/master'
55-
uses: JamesIves/github-pages-deploy-action@v4.4.3
56-
with:
57-
branch: gh-pages # The branch the action should deploy to.
58-
folder: dist # The folder the action should deploy.
59-
single-commit: true
60-
clean: true
61-
# clean-exclude: |
62-
# develop
63-
64-
# - name: Deploy to /develop 🚀
65-
# if: github.ref == 'refs/heads/develop'
66-
# uses: JamesIves/github-pages-deploy-action@v4.4.3
67-
# with:
68-
# branch: gh-pages
69-
# folder: dist
70-
# target-folder: develop
71-
# single-commit: true
72-
# clean: true
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 24
22+
cache: pnpm
23+
24+
- name: Install dependencies
25+
run: pnpm install --frozen-lockfile
26+
27+
- name: Lint
28+
run: pnpm run pretty:check
29+
30+
- name: Build
31+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
32+
run: pnpm run build
33+
34+
- name: Run tests
35+
run: pnpm run test
36+
37+
- name: Add build.txt
38+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
39+
run: |
40+
git log --pretty=format:'%h' -n 1 > dist/build.txt
41+
echo >> dist/build.txt
42+
date +%F_%T >> dist/build.txt
43+
44+
# Disable Jekyll to prevent files starting with _ not working properly.
45+
- name: Create .nojekyll
46+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
47+
run: |
48+
touch dist/.nojekyll
49+
50+
- name: Deploy
51+
if: github.ref == 'refs/heads/master'
52+
uses: JamesIves/github-pages-deploy-action@v4.7.3
53+
with:
54+
branch: gh-pages # The branch the action should deploy to.
55+
folder: dist # The folder the action should deploy.
56+
single-commit: true
57+
clean: true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Merge master to dev
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
merge-master-to-dev:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Merge master -> dev
14+
uses: devmasx/merge-branch@master
15+
with:
16+
type: now
17+
head_to_merge: master
18+
target_branch: dev
19+
github_token: ${{ github.token }}

.github/workflows/merge_master_to_dev.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: "Close stale issues/pull requests"
1+
name: Stale
22
on:
3-
schedule:
4-
- cron: "0 0 * * *"
3+
schedule:
4+
- cron: '0 0 * * *'
55

66
jobs:
7-
stale:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/stale@v8
11-
with:
12-
repo-token: ${{ secrets.GITHUB_TOKEN }}
13-
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
14-
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
15-
days-before-stale: 30
16-
days-before-close: 7
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
14+
stale-pr-message: 'This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
15+
days-before-stale: 60
16+
days-before-close: 7

.github/workflows/update-algolia-index.yml

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,71 @@ name: Update Algolia-Search index
22

33
# Only trigger, when the build workflow succeeded on branch master
44
on:
5-
workflow_run:
6-
workflows: [ "Build and Deploy 🚀" ]
7-
branches: [ master ]
8-
types: [ completed ]
5+
workflow_run:
6+
workflows: ['Build and Deploy']
7+
branches: [master]
8+
types: [completed]
99

1010
concurrency:
11-
group: algolia-update
12-
cancel-in-progress: true
11+
group: algolia-update
12+
cancel-in-progress: true
1313

1414
jobs:
15-
update-algolia-index:
16-
runs-on: ubuntu-latest
17-
steps:
18-
# Try to workaround time gap between newly gh-pages deployment is available (cache cleared?)
19-
- name: Wait for deployment is published
20-
run: |
21-
CNT=1
22-
echo Waiting for deployment ${GITHUB_SHA:0:7} is published
23-
sleep 60
24-
while ! curl -sS https://www.zigbee2mqtt.io/build.txt | grep -qF ${GITHUB_SHA:0:7} ; do
25-
CNT=$((CNT+1))
26-
sleep 1
27-
if [ $CNT -gt 300 ]; then
28-
>&2 echo "build.txt does not match current commit"
29-
>&2 curl -sS https://www.zigbee2mqtt.io/build.txt
30-
exit 1
31-
fi
32-
done
15+
update-algolia-index:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Try to workaround time gap between newly gh-pages deployment is available (cache cleared?)
19+
- name: Wait for deployment is published
20+
run: |
21+
CNT=1
22+
echo Waiting for deployment ${GITHUB_SHA:0:7} is published
23+
sleep 60
24+
while ! curl -sS https://www.zigbee2mqtt.io/build.txt | grep -qF ${GITHUB_SHA:0:7} ; do
25+
CNT=$((CNT+1))
26+
sleep 1
27+
if [ $CNT -gt 300 ]; then
28+
>&2 echo "build.txt does not match current commit"
29+
>&2 curl -sS https://www.zigbee2mqtt.io/build.txt
30+
exit 1
31+
fi
32+
done
3333
34-
- name: Create algolia scraper config
35-
run: |
36-
cat << EOF > algolia.json
37-
{
38-
"index_name": "zigbee2mqtt.io",
39-
"sitemap_urls": ["https://www.zigbee2mqtt.io/sitemap.xml"],
40-
"stop_urls": [],
41-
"selectors": {
42-
"lvl0": {
43-
"selector": "header .router-link-active",
44-
"global": true,
45-
"default_value": "Miscellaneous"
46-
},
47-
"lvl1": ".content-page h1, .device-page h1",
48-
"lvl2": ".content-page h2, .device-page h1 + table tbody tr:nth-child(3) td:nth-child(2)",
49-
"lvl3": ".content-page h3",
50-
"lvl4": ".content-page h4",
51-
"lvl5": ".content-page h5",
52-
"text": ".content-page p, .content-page li, .content-page code, .content-page td",
53-
"lang": {
54-
"selector": "/html/@lang",
55-
"type": "xpath",
56-
"global": true
57-
}
58-
},
59-
"custom_settings": {
60-
"attributesForFaceting": ["lang"]
61-
}
62-
}
63-
EOF
34+
- name: Create algolia scraper config
35+
run: |
36+
cat << EOF > algolia.json
37+
{
38+
"index_name": "zigbee2mqtt.io",
39+
"sitemap_urls": ["https://www.zigbee2mqtt.io/sitemap.xml"],
40+
"stop_urls": [],
41+
"selectors": {
42+
"lvl0": {
43+
"selector": "header .router-link-active",
44+
"global": true,
45+
"default_value": "Miscellaneous"
46+
},
47+
"lvl1": ".content-page h1, .device-page h1",
48+
"lvl2": ".content-page h2, .device-page h1 + table tbody tr:nth-child(3) td:nth-child(2)",
49+
"lvl3": ".content-page h3",
50+
"lvl4": ".content-page h4",
51+
"lvl5": ".content-page h5",
52+
"text": ".content-page p, .content-page li, .content-page code, .content-page td",
53+
"lang": {
54+
"selector": "/html/@lang",
55+
"type": "xpath",
56+
"global": true
57+
}
58+
},
59+
"custom_settings": {
60+
"attributesForFaceting": ["lang"]
61+
}
62+
}
63+
EOF
6464
65-
- run: curl -sSL https://www.zigbee2mqtt.io/build.txt
65+
- run: curl -sSL https://www.zigbee2mqtt.io/build.txt
6666

67-
- name: Update algolia docsearch
68-
uses: psi-4ward/algolia-docsearch-action@master
69-
with:
70-
algolia_application_id: K1BM3QYQ34
71-
algolia_api_key: ${{ secrets.ALGOLIA_INDEX_APIKEY }}
72-
file: 'algolia.json'
67+
- name: Update algolia docsearch
68+
uses: psi-4ward/algolia-docsearch-action@master
69+
with:
70+
algolia_application_id: K1BM3QYQ34
71+
algolia_api_key: ${{ secrets.ALGOLIA_INDEX_APIKEY }}
72+
file: 'algolia.json'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ node_modules
44
dist
55
.idea
66
.DS_Store
7+
docgen/missing-device-images/
8+
venv/

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm run pretty:check

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
24

0 commit comments

Comments
 (0)