iobroker.js-controller 4.0.20 → 4.0.21

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/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "js-controller",
4
- "version": "4.0.20",
4
+ "version": "4.0.21",
5
5
  "platform": "Javascript/Node.js",
6
6
  "controller": true,
7
7
  "mode": "daemon",
@@ -19,6 +19,18 @@
19
19
  "zh-cn": "JS控制器"
20
20
  },
21
21
  "news": {
22
+ "4.0.21": {
23
+ "en": "Fix Backup Restore crash case",
24
+ "de": "Beheben Sie den Absturzfall der Sicherungswiederherstellung",
25
+ "ru": "Исправить случай сбоя восстановления резервной копии",
26
+ "pt": "Corrigir caso de falha de restauração de backup",
27
+ "nl": "Fix Backup Herstel crashgeval",
28
+ "fr": "Correction du cas de plantage de restauration de sauvegarde",
29
+ "it": "Risolto il caso di arresto anomalo del ripristino del backup",
30
+ "es": "Solucionar caso de bloqueo de restauración de copia de seguridad",
31
+ "pl": "Napraw przypadek awarii przywracania kopii zapasowej",
32
+ "zh-cn": "修复备份还原崩溃案例"
33
+ },
22
34
  "4.0.20": {
23
35
  "en": "Add missing axios dependency\nOnly log an error if an error is happening when activating/deactivating adapter via .alive states\nFix edge case in redis simulator MULTI/EXEC logic\nPrevent some crash cases reported by Sentry",
24
36
  "de": "Fehlende Axios-Abhängigkeit hinzugefügt\nProtokollieren Sie nur dann einen Fehler, wenn beim Aktivieren/Deaktivieren des Adapters über .alive-Zustände ein Fehler auftritt\nGrenzfall in der MULTI/EXEC-Logik des Redis-Simulators behoben\nVerhindern Sie einige von Sentry gemeldete Absturzfälle",
@@ -14,7 +14,6 @@ const pathLib = require('path');
14
14
  const hostname = tools.getHostName();
15
15
  const Upload = require('./setupUpload');
16
16
  const { EXIT_CODES } = require('@iobroker/js-controller-common');
17
- const path = require('path');
18
17
  const cpPromise = require('promisify-child-process');
19
18
 
20
19
  // We cannot use relative paths for the backup locations, as they used by both
@@ -607,7 +606,7 @@ class BackupRestore {
607
606
  }
608
607
  const files = fs.readdirSync(root + path);
609
608
  for (const file of files) {
610
- const fName = path.join(root, path, file);
609
+ const fName = pathLib.join(root, path, file);
611
610
  if (!fs.existsSync(fName)) {
612
611
  continue;
613
612
  }
@@ -734,7 +733,7 @@ class BackupRestore {
734
733
  console.log('Forced restore - executing setup ...');
735
734
  try {
736
735
  await cpPromise.exec(
737
- `"${process.execPath}" "${path.join(controllerDir, `${tools.appName.toLowerCase()}.js`)}" setup`
736
+ `"${process.execPath}" "${pathLib.join(controllerDir, `${tools.appName.toLowerCase()}.js`)}" setup`
738
737
  );
739
738
  } catch (e) {
740
739
  console.error(
@@ -757,7 +756,7 @@ class BackupRestore {
757
756
  * @private
758
757
  */
759
758
  async _removeAllAdapters(controllerDir) {
760
- const nodeModulePath = path.join(controllerDir, '..');
759
+ const nodeModulePath = pathLib.join(controllerDir, '..');
761
760
  const nodeModuleDirs = fs.readdirSync(nodeModulePath, { withFileTypes: true });
762
761
  // we need to uninstall current adapters to get exact the same system as before backup
763
762
  for (const dir of nodeModuleDirs) {
@@ -767,7 +766,7 @@ class BackupRestore {
767
766
  dir.name !== `${tools.appName.toLowerCase()}.js-controller`
768
767
  ) {
769
768
  try {
770
- const packJson = fs.readJsonSync(path.join(nodeModulePath, dir.name, 'package.json'));
769
+ const packJson = fs.readJsonSync(pathLib.join(nodeModulePath, dir.name, 'package.json'));
771
770
  console.log(`Removing current installation of ${packJson.name}`);
772
771
  await tools.uninstallNodeModule(packJson.name);
773
772
  } catch {
@@ -789,7 +788,7 @@ class BackupRestore {
789
788
  */
790
789
  _ensureCompatibility(controllerDir, backupHostname, backupObjects, force) {
791
790
  try {
792
- const ioPackJson = fs.readJsonSync(path.join(controllerDir, 'io-package.json'));
791
+ const ioPackJson = fs.readJsonSync(pathLib.join(controllerDir, 'io-package.json'));
793
792
  const hostObj = backupObjects.find(obj => obj.id === `system.host.${backupHostname}`);
794
793
  if (hostObj.value.common.installedVersion !== ioPackJson.common.version) {
795
794
  if (!force) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.js-controller",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
@@ -17,16 +17,16 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@alcalzone/esbuild-register": "^2.5.1-1",
20
- "@iobroker/db-objects-file": "4.0.20",
21
- "@iobroker/db-objects-jsonl": "4.0.20",
22
- "@iobroker/db-objects-redis": "4.0.20",
23
- "@iobroker/db-states-file": "4.0.20",
24
- "@iobroker/db-states-jsonl": "4.0.20",
25
- "@iobroker/db-states-redis": "4.0.20",
26
- "@iobroker/js-controller-adapter": "4.0.20",
27
- "@iobroker/js-controller-cli": "4.0.20",
28
- "@iobroker/js-controller-common": "4.0.20",
29
- "@iobroker/js-controller-common-db": "4.0.20",
20
+ "@iobroker/db-objects-file": "4.0.21",
21
+ "@iobroker/db-objects-jsonl": "4.0.21",
22
+ "@iobroker/db-objects-redis": "4.0.21",
23
+ "@iobroker/db-states-file": "4.0.21",
24
+ "@iobroker/db-states-jsonl": "4.0.21",
25
+ "@iobroker/db-states-redis": "4.0.21",
26
+ "@iobroker/js-controller-adapter": "4.0.21",
27
+ "@iobroker/js-controller-cli": "4.0.21",
28
+ "@iobroker/js-controller-common": "4.0.21",
29
+ "@iobroker/js-controller-common-db": "4.0.21",
30
30
  "@iobroker/plugin-base": "~1.2.1",
31
31
  "@iobroker/plugin-sentry": "~1.2.0",
32
32
  "axios": "^0.24.0",
@@ -112,5 +112,5 @@
112
112
  "iobroker.js",
113
113
  "main.js"
114
114
  ],
115
- "gitHead": "0606f3e50755e0e963678dbeecfa11084538b009"
115
+ "gitHead": "4749d256d312623ae7621e7ae47d44580b3aa8c1"
116
116
  }