iobroker.foobar2000 2.2.0 → 2.3.0
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/.github/copilot-instructions.md +809 -0
- package/.github/dependabot.yml +11 -9
- package/.github/workflows/automerge-dependabot.yml +35 -0
- package/.github/workflows/check-copilot-template.yml +195 -0
- package/.github/workflows/test-and-release.yml +6 -4
- package/CHANGELOG_OLD.md +26 -0
- package/LICENSE +1 -1
- package/README.md +7 -27
- package/foobar2000.js +291 -261
- package/io-package.json +22 -7
- package/package.json +17 -41
- package/.eslintignore +0 -2
- package/.prettierrc.js +0 -9
- package/lib/tools.js +0 -99
- /package/.github/workflows/{dependabot-auto-merge.yml → dependabot-auto-merge.yml.OLD} +0 -0
package/.github/dependabot.yml
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
# Dependabot will run on day 6 of each month at 02:08 (Europe/Berlin timezone)
|
|
1
2
|
version: 2
|
|
2
3
|
updates:
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
- package-ecosystem: "npm"
|
|
4
6
|
directory: "/"
|
|
5
7
|
schedule:
|
|
6
|
-
interval:
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
interval: "cron"
|
|
9
|
+
timezone: "Europe/Berlin"
|
|
10
|
+
cronjob: "8 2 6 * *"
|
|
9
11
|
open-pull-requests-limit: 15
|
|
10
|
-
versioning-strategy: increase
|
|
12
|
+
versioning-strategy: "increase"
|
|
11
13
|
|
|
12
|
-
- package-ecosystem: github-actions
|
|
14
|
+
- package-ecosystem: "github-actions"
|
|
13
15
|
directory: "/"
|
|
14
16
|
schedule:
|
|
15
|
-
interval:
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
interval: "cron"
|
|
18
|
+
timezone: "Europe/Berlin"
|
|
19
|
+
cronjob: "8 2 6 * *"
|
|
18
20
|
open-pull-requests-limit: 15
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Workflow for auto-merging Dependabot PRs
|
|
2
|
+
# This workflow uses the action-automerge-dependabot action to automatically merge
|
|
3
|
+
# Dependabot PRs based on the rules defined in .github/auto-merge.yml
|
|
4
|
+
|
|
5
|
+
name: Auto-Merge Dependabot PRs
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
# Trigger when a PR is opened or updated
|
|
9
|
+
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
|
|
10
|
+
pull_request_target:
|
|
11
|
+
types: [opened, synchronize, reopened]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
auto-merge:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
# Only run if actor is dependabot
|
|
17
|
+
if: github.actor == 'dependabot[bot]'
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
pull-requests: write
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Auto-merge Dependabot PRs
|
|
25
|
+
uses: iobroker-bot-orga/action-automerge-dependabot@v1
|
|
26
|
+
with:
|
|
27
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
# Optional: Path to your auto-merge configuration file
|
|
29
|
+
# config-file-path: '.github/auto-merge.yml'
|
|
30
|
+
# Optional: Merge method (merge, squash, or rebase)
|
|
31
|
+
# merge-method: 'squash'
|
|
32
|
+
# Optional: Wait for other checks to complete
|
|
33
|
+
# wait-for-checks: 'true'
|
|
34
|
+
# Optional: Maximum time to wait for checks in seconds (default: 3600)
|
|
35
|
+
# max-wait-time: '3600'
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# GitHub Action Template: Automated Version Check and Update for ioBroker Copilot Instructions
|
|
2
|
+
# Version: 0.4.0
|
|
3
|
+
#
|
|
4
|
+
# This action automatically checks for template updates and creates issues when updates are available
|
|
5
|
+
# Copy this to your repository as .github/workflows/check-copilot-template.yml
|
|
6
|
+
|
|
7
|
+
name: Check ioBroker Copilot Template Version
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: '23 3 * * 0' # Weekly check optimized for off-peak hours (3:23 AM UTC Sunday)
|
|
12
|
+
workflow_dispatch: # Allow manual triggering
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
check-template:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
issues: write
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Dynamic template version check
|
|
26
|
+
id: version-check
|
|
27
|
+
run: |
|
|
28
|
+
echo "🔍 Starting dynamic ioBroker Copilot template version check..."
|
|
29
|
+
|
|
30
|
+
# Get current version from local copilot instructions
|
|
31
|
+
if [ -f ".github/copilot-instructions.md" ]; then
|
|
32
|
+
CURRENT_VERSION=$(awk '/Version:|Template Version:/ {match($0, /([0-9]+(\.[0-9]+)*)/, arr); if (arr[1] != "") print arr[1]}' .github/copilot-instructions.md | head -1)
|
|
33
|
+
if [ -z "$CURRENT_VERSION" ]; then CURRENT_VERSION="unknown"; fi
|
|
34
|
+
echo "📋 Current local version: $CURRENT_VERSION"
|
|
35
|
+
else
|
|
36
|
+
CURRENT_VERSION="none"
|
|
37
|
+
echo "❌ No .github/copilot-instructions.md file found"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Get latest version from centralized metadata
|
|
41
|
+
echo "🌐 Fetching latest template version from centralized config..."
|
|
42
|
+
LATEST_VERSION=$(curl -s https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/config/metadata.json | jq -r '.version' 2>/dev/null || echo "unknown")
|
|
43
|
+
if [ -z "$LATEST_VERSION" ] || [ "$LATEST_VERSION" = "null" ]; then
|
|
44
|
+
LATEST_VERSION="unknown"
|
|
45
|
+
fi
|
|
46
|
+
echo "📋 Latest available version: $LATEST_VERSION"
|
|
47
|
+
|
|
48
|
+
# Determine repository status
|
|
49
|
+
COPILOT_INITIALIZED="false"
|
|
50
|
+
UPDATE_NEEDED="false"
|
|
51
|
+
SETUP_NEEDED="false"
|
|
52
|
+
|
|
53
|
+
if [ "$CURRENT_VERSION" = "none" ]; then
|
|
54
|
+
SETUP_NEEDED="true"
|
|
55
|
+
echo "🆕 Status: Setup needed - no copilot instructions found"
|
|
56
|
+
elif [ "$CURRENT_VERSION" = "unknown" ] || [ "$LATEST_VERSION" = "unknown" ]; then
|
|
57
|
+
echo "❓ Status: Cannot determine versions - manual check required"
|
|
58
|
+
else
|
|
59
|
+
# Compare versions (simple string comparison for now)
|
|
60
|
+
if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
|
|
61
|
+
UPDATE_NEEDED="true"
|
|
62
|
+
COPILOT_INITIALIZED="true"
|
|
63
|
+
echo "📈 Status: Update needed - $CURRENT_VERSION → $LATEST_VERSION"
|
|
64
|
+
else
|
|
65
|
+
COPILOT_INITIALIZED="true"
|
|
66
|
+
echo "✅ Status: Up to date - version $CURRENT_VERSION"
|
|
67
|
+
fi
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Set outputs for later steps
|
|
71
|
+
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
|
72
|
+
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
|
|
73
|
+
echo "copilot_initialized=$COPILOT_INITIALIZED" >> $GITHUB_OUTPUT
|
|
74
|
+
echo "update_needed=$UPDATE_NEEDED" >> $GITHUB_OUTPUT
|
|
75
|
+
echo "setup_needed=$SETUP_NEEDED" >> $GITHUB_OUTPUT
|
|
76
|
+
|
|
77
|
+
- name: Check for existing issues
|
|
78
|
+
id: issue-check
|
|
79
|
+
uses: actions/github-script@v8
|
|
80
|
+
with:
|
|
81
|
+
script: |
|
|
82
|
+
const { data: issues } = await github.rest.issues.listForRepo({
|
|
83
|
+
owner: context.repo.owner,
|
|
84
|
+
repo: context.repo.repo,
|
|
85
|
+
state: 'open',
|
|
86
|
+
labels: 'copilot-setup,automation'
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const setupIssues = issues.filter(issue =>
|
|
90
|
+
issue.title.includes('Setup ioBroker') ||
|
|
91
|
+
issue.title.includes('Update ioBroker') ||
|
|
92
|
+
issue.title.includes('Copilot')
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
core.setOutput('has_existing_issue', setupIssues.length > 0);
|
|
96
|
+
core.setOutput('existing_count', setupIssues.length);
|
|
97
|
+
|
|
98
|
+
if (setupIssues.length > 0) {
|
|
99
|
+
console.log(`Found ${setupIssues.length} existing copilot setup/update issue(s)`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
- name: Create initial setup issue
|
|
103
|
+
if: steps.version-check.outputs.setup_needed == 'true' && steps.issue-check.outputs.has_existing_issue == 'false'
|
|
104
|
+
uses: actions/github-script@v8
|
|
105
|
+
with:
|
|
106
|
+
script: |
|
|
107
|
+
const title = '🤖 Setup ioBroker GitHub Copilot Instructions';
|
|
108
|
+
const body = `# Automated ioBroker Copilot Instructions Setup
|
|
109
|
+
|
|
110
|
+
**GitHub Copilot**: Please help me set up GitHub Copilot instructions for my ioBroker adapter repository with full automation and validation.
|
|
111
|
+
|
|
112
|
+
## 🚨 Important Notice - Ignore GitHub Copilot's Own Setup Suggestions
|
|
113
|
+
|
|
114
|
+
**GitHub Copilot**: If you see suggestions from GitHub Copilot about setting up copilot instructions (like creating \`.github/copilot-instructions.md\` through GitHub's interface), **IGNORE THEM**. This issue handles the complete setup process with ioBroker-specific optimizations.
|
|
115
|
+
|
|
116
|
+
## Setup Process
|
|
117
|
+
|
|
118
|
+
This repository needs initial setup of GitHub Copilot instructions. Please:
|
|
119
|
+
|
|
120
|
+
1. **Initialize with Adapter-Specific Context**: Create \`.github/copilot-instructions.md\` with basic ioBroker adapter context
|
|
121
|
+
2. **Enhance with Full Template**: Merge with comprehensive template from https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md
|
|
122
|
+
3. **Customize Sections**: Populate [CUSTOMIZE] sections with adapter-specific content only
|
|
123
|
+
|
|
124
|
+
**Template Version**: ${{ steps.version-check.outputs.latest_version }}
|
|
125
|
+
**Detected Status**: No copilot instructions found
|
|
126
|
+
|
|
127
|
+
## Reference Templates
|
|
128
|
+
|
|
129
|
+
- **Initial Setup Action**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/templates/ghAction-InitialSetup.yml
|
|
130
|
+
- **Full Template**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md
|
|
131
|
+
- **Version Check Action**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/templates/ghAction-AutomatedVersionCheckAndUpdate.yml`;
|
|
132
|
+
|
|
133
|
+
await github.rest.issues.create({
|
|
134
|
+
owner: context.repo.owner,
|
|
135
|
+
repo: context.repo.repo,
|
|
136
|
+
title: title,
|
|
137
|
+
body: body,
|
|
138
|
+
labels: ['copilot-setup', 'automation']
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
- name: Create update issue
|
|
142
|
+
if: steps.version-check.outputs.update_needed == 'true' && steps.issue-check.outputs.has_existing_issue == 'false'
|
|
143
|
+
uses: actions/github-script@v8
|
|
144
|
+
with:
|
|
145
|
+
script: |
|
|
146
|
+
const title = '🤖 Update ioBroker Copilot Instructions Template';
|
|
147
|
+
const body = `# Automated ioBroker Copilot Template Update Request
|
|
148
|
+
|
|
149
|
+
**GitHub Copilot**: Please help me validate and update my ioBroker adapter's Copilot instructions template while preserving all custom sections.
|
|
150
|
+
|
|
151
|
+
## Update Required
|
|
152
|
+
|
|
153
|
+
- **Current Version**: ${{ steps.version-check.outputs.current_version }}
|
|
154
|
+
- **Latest Version**: ${{ steps.version-check.outputs.latest_version }}
|
|
155
|
+
- **Status**: Update needed
|
|
156
|
+
|
|
157
|
+
## Update Process
|
|
158
|
+
|
|
159
|
+
Please merge the latest ioBroker template while preserving all customizations:
|
|
160
|
+
|
|
161
|
+
\`\`\`
|
|
162
|
+
Merge the ioBroker template from https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md with my existing .github/copilot-instructions.md.
|
|
163
|
+
|
|
164
|
+
CRITICAL REQUIREMENTS:
|
|
165
|
+
1. Preserve ALL [CUSTOMIZE] sections and their content exactly as they are
|
|
166
|
+
2. Maintain any project-specific context not already covered in the template
|
|
167
|
+
3. Add the latest ioBroker best practices from the new template
|
|
168
|
+
4. Update the version number to ${{ steps.version-check.outputs.latest_version }}
|
|
169
|
+
5. Keep the Template Source reference up-to-date
|
|
170
|
+
6. Ensure no custom content is lost during the merge
|
|
171
|
+
7. REMOVE any duplicate content from [CUSTOMIZE] sections that already exists in the standard template
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
## Reference Templates
|
|
175
|
+
|
|
176
|
+
- **Latest Template**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md
|
|
177
|
+
- **Update Template**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/templates/automated-template-update.md
|
|
178
|
+
- **Version Check Action**: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/templates/ghAction-AutomatedVersionCheckAndUpdate.yml`;
|
|
179
|
+
|
|
180
|
+
await github.rest.issues.create({
|
|
181
|
+
owner: context.repo.owner,
|
|
182
|
+
repo: context.repo.repo,
|
|
183
|
+
title: title,
|
|
184
|
+
body: body,
|
|
185
|
+
labels: ['template-update', 'automation']
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
- name: Summary
|
|
189
|
+
run: |
|
|
190
|
+
echo "🎯 Template Version Check Complete"
|
|
191
|
+
echo " Current: ${{ steps.version-check.outputs.current_version }}"
|
|
192
|
+
echo " Latest: ${{ steps.version-check.outputs.latest_version }}"
|
|
193
|
+
echo " Setup needed: ${{ steps.version-check.outputs.setup_needed }}"
|
|
194
|
+
echo " Update needed: ${{ steps.version-check.outputs.update_needed }}"
|
|
195
|
+
echo " Existing issues: ${{ steps.issue-check.outputs.existing_count }}"
|
|
@@ -28,19 +28,20 @@ jobs:
|
|
|
28
28
|
steps:
|
|
29
29
|
- uses: ioBroker/testing-action-check@v1
|
|
30
30
|
with:
|
|
31
|
-
node-version: '
|
|
31
|
+
node-version: '22.x'
|
|
32
32
|
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
33
33
|
# install-command: 'npm install'
|
|
34
34
|
lint: true
|
|
35
35
|
|
|
36
36
|
# Runs adapter tests on all supported node versions and OSes
|
|
37
37
|
adapter-tests:
|
|
38
|
+
needs: [check-and-lint]
|
|
38
39
|
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
39
40
|
|
|
40
41
|
runs-on: ${{ matrix.os }}
|
|
41
42
|
strategy:
|
|
42
43
|
matrix:
|
|
43
|
-
node-version: [
|
|
44
|
+
node-version: [20.x, 22.x, 24.x]
|
|
44
45
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
45
46
|
|
|
46
47
|
steps:
|
|
@@ -70,14 +71,15 @@ jobs:
|
|
|
70
71
|
# Write permissions are required to create Github releases
|
|
71
72
|
permissions:
|
|
72
73
|
contents: write
|
|
74
|
+
id-token: write
|
|
73
75
|
|
|
74
76
|
steps:
|
|
75
77
|
- uses: ioBroker/testing-action-deploy@v1
|
|
76
78
|
with:
|
|
77
|
-
node-version: '
|
|
79
|
+
node-version: '22.x'
|
|
78
80
|
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
79
81
|
# install-command: 'npm install'
|
|
80
|
-
npm-token: ${{ secrets.NPM_TOKEN }}
|
|
82
|
+
# npm-token: ${{ secrets.NPM_TOKEN }} # Commented out for migration to Trusted Publishing
|
|
81
83
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
82
84
|
|
|
83
85
|
# When using Sentry for error reporting, Sentry can be informed about new releases
|
package/CHANGELOG_OLD.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Older changes
|
|
2
|
+
## 2.0.2
|
|
3
|
+
* (instalator) fixed error
|
|
4
|
+
|
|
5
|
+
## 2.0.0
|
|
6
|
+
* (instalator) Completely rewritten
|
|
7
|
+
|
|
8
|
+
## 1.0.0
|
|
9
|
+
* (instalator) Up to stable
|
|
10
|
+
|
|
11
|
+
## 0.2.0
|
|
12
|
+
* (instalator) Change for widgets vis-players
|
|
13
|
+
|
|
14
|
+
## 0.1.2
|
|
15
|
+
* (instalator) del widgets folders
|
|
16
|
+
* (instalator) change log level
|
|
17
|
+
* (instalator) add news object
|
|
18
|
+
|
|
19
|
+
## 0.1.1
|
|
20
|
+
* (instalator) fix start, exit for local
|
|
21
|
+
|
|
22
|
+
## 0.1.0
|
|
23
|
+
* (instalator) beta (20.10.2016)
|
|
24
|
+
|
|
25
|
+
## 0.0.1
|
|
26
|
+
* (instalator) initial (12.10.2016)
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2023-
|
|
3
|
+
Copyright (c) 2023-2026 iobroker-community-adapters <iobroker-community-adapters@gmx.de>
|
|
4
4
|
Copyright (c) 2021 instalator <vvvalt@mail.ru>
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
package/README.md
CHANGED
|
@@ -41,6 +41,12 @@ To display the cover as a link to a file, in the file ```c:\Users\{USER}\AppData
|
|
|
41
41
|
Placeholder for the next version (at the beginning of the line):
|
|
42
42
|
### **WORK IN PROGRESS**
|
|
43
43
|
-->
|
|
44
|
+
### 2.3.0 (2026-03-07)
|
|
45
|
+
- (iobroker-bot) Adapter requires node.js >= 20 now.
|
|
46
|
+
- (copilot) Adapter requires admin >= 7.7.22 now
|
|
47
|
+
- (copilot) Adapter requires js-controller >= 6.0.11 now
|
|
48
|
+
- (mcm1957) Dependencies have been updated.
|
|
49
|
+
|
|
44
50
|
### 2.2.0 (2024-04-17)
|
|
45
51
|
* (mcm1957) Adapter requires node.js 18 and js-controller >= 5 now
|
|
46
52
|
* (mcm1957) Dependencies have been updated
|
|
@@ -56,36 +62,10 @@ To display the cover as a link to a file, in the file ```c:\Users\{USER}\AppData
|
|
|
56
62
|
### 2.0.3
|
|
57
63
|
* (instalator) fixed admin error
|
|
58
64
|
|
|
59
|
-
### 2.0.2
|
|
60
|
-
* (instalator) fixed error
|
|
61
|
-
|
|
62
|
-
### 2.0.0
|
|
63
|
-
* (instalator) Completely rewritten
|
|
64
|
-
|
|
65
|
-
### 1.0.0
|
|
66
|
-
* (instalator) Up to stable
|
|
67
|
-
|
|
68
|
-
### 0.2.0
|
|
69
|
-
* (instalator) Change for widgets vis-players
|
|
70
|
-
|
|
71
|
-
### 0.1.2
|
|
72
|
-
* (instalator) del widgets folders
|
|
73
|
-
* (instalator) change log level
|
|
74
|
-
* (instalator) add news object
|
|
75
|
-
|
|
76
|
-
### 0.1.1
|
|
77
|
-
* (instalator) fix start, exit for local
|
|
78
|
-
|
|
79
|
-
### 0.1.0
|
|
80
|
-
* (instalator) beta (20.10.2016)
|
|
81
|
-
|
|
82
|
-
### 0.0.1
|
|
83
|
-
* (instalator) initial (12.10.2016)
|
|
84
|
-
|
|
85
65
|
## License
|
|
86
66
|
The MIT License (MIT)
|
|
87
67
|
|
|
88
|
-
Copyright (c) 2023-
|
|
68
|
+
Copyright (c) 2023-2026 iobroker-community-adapters <iobroker-community-adapters@gmx.de>
|
|
89
69
|
Copyright (c) 2021 instalator <vvvalt@mail.ru>
|
|
90
70
|
|
|
91
71
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|