Skip to content

Commit

Permalink
Merge pull request #105 from Grizzelbee/Dev_V1.6.0
Browse files Browse the repository at this point in the history
Dev v1.6.2
  • Loading branch information
Grizzelbee authored Mar 26, 2024
2 parents 3981656 + 498495e commit ab48c48
Show file tree
Hide file tree
Showing 7 changed files with 4,689 additions and 17,070 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v1
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
# Don't test Node.js 8 on Windows. npm is weird here
Expand Down
6 changes: 6 additions & 0 deletions .ncurc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"upgrade": true,
"reject": [
"chai"
]
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ Basically there are three ways to execute the command:
## Changelog
### **WORK IN PROGRESS**

### 1.6.2 (2024-03-26)
* (grizzelbee) Upd: Dependencies got updated
* (grizzelbee) Fix: fixed sentry issues WIREGUARD-2B & WIREGUARD-2C
* (grizzelbee) Upd: Adapter requires at least node 18.x

### 1.6.1 (2023-09-14)
* (mcm1957) Fix: [#90](https://github.com/Grizzelbee/ioBroker.wireguard/pull/90) adapter-core 3.x.x is known to fail during installation at node 14 as npm 6 fails to install peerDependencies. So this adapter requires node 16 or newer
* (grizzelbee) Upd: Dependencies got updated
Expand Down Expand Up @@ -265,4 +270,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Copyright
Copyright (c) 2023 grizzelbee <open.source@hingsen.de>
Copyright (c) 2024 grizzelbee <open.source@hingsen.de>
22 changes: 19 additions & 3 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "wireguard",
"version": "1.6.1",
"version": "1.6.2",
"news": {
"1.6.2": {
"en": "Dependencies got updated*fixed sentry issues WIREGUARD-2B & WIREGUARD-2C*Adapter requires at least node 18.x",
"de": "Abhängigkeiten wurden aktualisiert*Sentry-Probleme WIREGUARD-2B und WIREGUARD-2C behoben*Adapter erfordert mindestens Node 18.x",
"ru": "Зависимости обновлены*исправлены проблемы со стражей WIREGUARD-2B и WIREGUARD-2C*Для адаптера требуется как минимум узел 18.x",
"pt": "As dependências foram atualizadas*problemas de sentinela corrigidos WIREGUARD-2B e WIREGUARD-2C*O adaptador requer pelo menos o nó 18.x",
"nl": "Afhankelijkheden zijn bijgewerkt * Sentry-problemen opgelost WIREGUARD-2B & WIREGUARD-2C * Adapter vereist minimaal Node 18.x",
"fr": "Les dépendances ont été mises à jour * Problèmes de sentinelle résolus WIREGUARD-2B et WIREGUARD-2C * L'adaptateur nécessite au moins le nœud 18.x",
"it": "Le dipendenze sono state aggiornate*Risolti i problemi di sentinella WIREGUARD-2B e WIREGUARD-2C*L'adattatore richiede almeno il nodo 18.x",
"es": "Se actualizaron las dependencias*Se solucionaron problemas de centinela WIREGUARD-2B y WIREGUARD-2C*El adaptador requiere al menos el nodo 18.x",
"pl": "Zależności zostały zaktualizowane* naprawiono problemy ze strażnikami WIREGUARD-2B i WIREGUARD-2C*Adapter wymaga co najmniej węzła 18.x",
"uk": "Залежності оновлено*виправлено проблеми з дозорним WIREGUARD-2B & WIREGUARD-2C*Адаптер вимагає принаймні вузла 18.x",
"zh-cn": "依赖项已更新*修复了哨兵问题 WIREGUARD-2B 和 WIREGUARD-2C*适配器至少需要节点 18.x"
},
"1.6.1": {
"en": "(mcm1957) adapter-core 3 is known to fail during installation at node 14 as npm 6 fails to install peerDependencies - So this adapter requires node 16 or newer\n(grizzelbee) Dependencies got updated\nremoved some old news entries in io-package file",
"de": "(mcm1957) Adapter-Core 3 schlägt bekanntermaßen während der Installation auf Knoten 14 fehl, da npm 6 peerDependencies nicht installieren kann – dieser Adapter erfordert also Knoten 16 oder neuer\n(grizzelbee) Abhängigkeiten wurden aktualisiert\neinige alte News-Einträge in der io-package-Datei entfernt",
Expand Down Expand Up @@ -153,7 +166,6 @@
"keywords": [
"wireguard"
],
"license": "MIT",
"platform": "Javascript/Node.js",
"main": "main.js",
"icon": "wireguard.svg",
Expand Down Expand Up @@ -267,7 +279,11 @@
{
"js-controller": ">=3.3.22"
}
]
],
"licenseInformation": {
"type": "free",
"license": "MIT"
}
},
"native": {
"hosts": [
Expand Down
28 changes: 16 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,19 +500,23 @@ class Wireguard extends utils.Adapter {
* @param value {any} value of the datapoint
*/
createOrExtendObject(id, objData, value) {
adapter.getObject(id, function (err, oldObj) {
if (!err && oldObj) {
if ( objData.common.name === oldObj.common.name && objData.common.icon === oldObj.common.icon){
// adapter.log.debug(`Same object detected: ${objData.common.name} vs. old group name: ${oldObj.common.name}`);
adapter.setState(id, value, true);
} else{
// adapter.log.debug(`New group name detected: ${objData.common.name} vs. old group name: ${oldObj.common.name}`);
adapter.extendObject(id, objData, () => {adapter.setState(id, value, true);});
if (value && ('undefined' !== typeof value) ){
adapter.getObject(id, function (err, oldObj) {
if (!err && oldObj) {
if ( objData.common.name === oldObj.common.name && objData.common.icon === oldObj.common.icon){
// adapter.log.debug(`Same object detected: ${objData.common.name} vs. old group name: ${oldObj.common.name}`);
adapter.setState(id, value, true);
} else{
// adapter.log.debug(`New group name detected: ${objData.common.name} vs. old group name: ${oldObj.common.name}`);
adapter.extendObject(id, objData, () => {adapter.setState(id, value, true);});
}
} else {
adapter.setObjectNotExists(id, objData, () => {adapter.setState(id, value, true);});
}
} else {
adapter.setObjectNotExists(id, objData, () => {adapter.setState(id, value, true);});
}
});
});
} else {
adapter.log.warn(`Setting ${id} to ${value} is senseless. Please open an issue on github and provide a debug log sowing the occurrence of this issue.`);
}
}


Expand Down
Loading

0 comments on commit ab48c48

Please sign in to comment.