iobroker.js-controller 4.0.4 → 4.0.5
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/conf/sources-dist.json +13 -7
- package/io-package.json +13 -13
- package/lib/setup/setupBackup.js +4 -0
- package/lib/setup/setupInstall.js +34 -6
- package/lib/setup/setupRepo.js +24 -10
- package/lib/setup/setupUpgrade.js +3 -2
- package/lib/setup/setupUpload.js +15 -11
- package/lib/setup/setupVisDebug.js +7 -6
- package/main.js +18 -5
- package/package.json +12 -12
package/conf/sources-dist.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"meta": "https://raw.githubusercontent.com/om2804/ioBroker.adb/master/io-package.json",
|
|
10
10
|
"icon": "https://raw.githubusercontent.com/om2804/ioBroker.adb/master/admin/adb.png",
|
|
11
11
|
"type": "hardware",
|
|
12
|
-
|
|
12
|
+
"version": "0.0.5"
|
|
13
13
|
},
|
|
14
14
|
"adguard": {
|
|
15
15
|
"meta": "https://raw.githubusercontent.com/o0shojo0o/ioBroker.adguard/master/io-package.json",
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
"meta": "https://raw.githubusercontent.com/crycode-de/ioBroker.ds18b20/master/io-package.json",
|
|
322
322
|
"icon": "https://raw.githubusercontent.com/crycode-de/ioBroker.ds18b20/master/admin/ds18b20.png",
|
|
323
323
|
"type": "hardware",
|
|
324
|
-
"version": "1.
|
|
324
|
+
"version": "1.6.0"
|
|
325
325
|
},
|
|
326
326
|
"dwd": {
|
|
327
327
|
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.dwd/master/io-package.json",
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
"meta": "https://raw.githubusercontent.com/mrbungle64/ioBroker.ecovacs-deebot/master/io-package.json",
|
|
364
364
|
"icon": "https://raw.githubusercontent.com/mrbungle64/ioBroker.ecovacs-deebot/master/admin/ecovacs-deebot.png",
|
|
365
365
|
"type": "household",
|
|
366
|
-
"version": "1.3.
|
|
366
|
+
"version": "1.3.3"
|
|
367
367
|
},
|
|
368
368
|
"egigeozone": {
|
|
369
369
|
"meta": "https://raw.githubusercontent.com/BasGo/ioBroker.egigeozone/master/io-package.json",
|
|
@@ -390,10 +390,10 @@
|
|
|
390
390
|
"version": "1.0.2"
|
|
391
391
|
},
|
|
392
392
|
"ems-esp": {
|
|
393
|
-
"meta": "https://raw.githubusercontent.com/tp1de/ioBroker.ems-esp/
|
|
394
|
-
"icon": "https://raw.githubusercontent.com/tp1de/ioBroker.ems-esp/
|
|
393
|
+
"meta": "https://raw.githubusercontent.com/tp1de/ioBroker.ems-esp/main/io-package.json",
|
|
394
|
+
"icon": "https://raw.githubusercontent.com/tp1de/ioBroker.ems-esp/main/admin/ems-esp.png",
|
|
395
395
|
"type": "climate-control",
|
|
396
|
-
"version": "1.0
|
|
396
|
+
"version": "1.1.0"
|
|
397
397
|
},
|
|
398
398
|
"energymanager": {
|
|
399
399
|
"meta": "https://raw.githubusercontent.com/unltdnetworx/ioBroker.energymanager/master/io-package.json",
|
|
@@ -425,6 +425,12 @@
|
|
|
425
425
|
"type": "infrastructure",
|
|
426
426
|
"version": "1.0.6"
|
|
427
427
|
},
|
|
428
|
+
"eusec": {
|
|
429
|
+
"meta": "https://raw.githubusercontent.com/bropat/ioBroker.eusec/master/io-package.json",
|
|
430
|
+
"icon": "https://raw.githubusercontent.com/bropat/ioBroker.eusec/master/admin/eusec.png",
|
|
431
|
+
"type": "alarm",
|
|
432
|
+
"version": "0.8.4"
|
|
433
|
+
},
|
|
428
434
|
"exchangerates": {
|
|
429
435
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.exchangerates/master/io-package.json",
|
|
430
436
|
"icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.exchangerates/master/admin/exchangerates.png",
|
|
@@ -2326,4 +2332,4 @@
|
|
|
2326
2332
|
"type": "hardware",
|
|
2327
2333
|
"version": "2.4.1"
|
|
2328
2334
|
}
|
|
2329
|
-
}
|
|
2335
|
+
}
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "js-controller",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.5",
|
|
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.5": {
|
|
23
|
+
"en": "stop the database before executing upgrade self; WIll be effective for all upgrades >4.0.5\nOptimize Set activation handling to prevent some error logged on upgrade\nFix Linux Capability updating for Docker and check Admin Flag\nDetect another Rebuild case and allo wautomatic rebuilding\nFix adapter installation with dependencies\nFix seq edge case \nPrevent several crash cases seen in Sentry",
|
|
24
|
+
"de": "stoppen Sie die Datenbank, bevor Sie upgrade self ausführen; Gilt für alle Upgrades >4.0.5\nOptimieren Sie die Handhabung der Set-Aktivierung, um einige beim Upgrade protokollierte Fehler zu vermeiden\nKorrigieren Sie die Aktualisierung der Linux-Funktion für Docker und überprüfen Sie das Admin-Flag\nErkennt einen weiteren Rebuild-Fall und erlaubt einen automatischen Rebuild\nAdapterinstallation mit Abhängigkeiten reparieren\nSeq-Edge-Fall behoben\nVerhindern Sie mehrere Absturzfälle, die in Sentry aufgetreten sind",
|
|
25
|
+
"ru": "остановить базу данных перед выполнением самообновления; Будет действовать для всех обновлений >4.0.5\nОптимизировать обработку активации Set, чтобы предотвратить некоторые ошибки, регистрируемые при обновлении.\nИсправьте обновление возможностей Linux для Docker и проверьте флаг администратора.\nОбнаружение другого случая Rebuild и разрешение автоматического восстановления\nИсправить установку адаптера с зависимостями\nИсправить пограничный случай seq\nПредотвратите несколько случаев сбоев, наблюдаемых в Sentry.",
|
|
26
|
+
"pt": "pare o banco de dados antes de executar o upgrade self; Será eficaz para todas as atualizações > 4.0.5\nOtimize o tratamento de ativação do conjunto para evitar alguns erros registrados na atualização\nCorrija a atualização de recursos do Linux para o Docker e verifique o sinalizador de administrador\nDetecte outro caso de reconstrução e permita a reconstrução automática\nCorrigir a instalação do adaptador com dependências\nCorrigir caso de borda seq\nPrevenir vários casos de acidente vistos no Sentinela",
|
|
27
|
+
"nl": "stop de database voordat u de upgrade zelf uitvoert; Zal effectief zijn voor alle upgrades >4.0.5\nOptimaliseren Activeringsafhandeling instellen om een fout te voorkomen die is aangemeld bij de upgrade\nFix Linux Capability-update voor Docker en controleer Admin Flag\nDetecteer een ander Rebuild-geval en sta automatische reconstructie toe\nInstallatie van adapter met afhankelijkheden repareren\nFix seq edge case\nVoorkom verschillende crashgevallen in Sentry",
|
|
28
|
+
"fr": "arrêtez la base de données avant d'exécuter la mise à jour automatique ; Sera efficace pour toutes les mises à jour > 4.0.5\nOptimiser Définir la gestion de l'activation pour éviter certaines erreurs enregistrées lors de la mise à niveau\nCorrection de la mise à jour des capacités Linux pour Docker et vérification de l'indicateur d'administration\nDétecter un autre cas de reconstruction et autoriser la reconstruction automatique\nCorrection de l'installation de l'adaptateur avec dépendances\nCorriger le cas de bord suivant\nEmpêcher plusieurs cas de crash vus dans Sentry",
|
|
29
|
+
"it": "fermare il database prima di eseguire l'aggiornamento automatico; Sarà efficace per tutti gli aggiornamenti >4.0.5\nOttimizza Impostare la gestione dell'attivazione per evitare errori durante l'aggiornamento\nCorreggi l'aggiornamento delle funzionalità Linux per Docker e controlla il flag amministratore\nRileva un altro caso Ricostruisci e consenti la ricostruzione automatica\nCorreggi l'installazione dell'adattatore con le dipendenze\nRisolto il problema con il seq edge case\nImpedisci diversi casi di crash visti in Sentry",
|
|
30
|
+
"es": "detenga la base de datos antes de ejecutar la actualización automática; Será efectivo para todas las actualizaciones > 4.0.5\nOptimizar Configurar el manejo de la activación para evitar algún error registrado en la actualización\nCorrija la actualización de la capacidad de Linux para Docker y verifique la bandera de administración\nDetectar otro caso de reconstrucción y permitir la reconstrucción automática\nArreglar la instalación del adaptador con dependencias\nArreglar caso de borde de secuencia\nEvitar varios casos de bloqueo vistos en Sentry",
|
|
31
|
+
"pl": "zatrzymaj bazę danych przed wykonaniem samodzielnej aktualizacji; Będzie obowiązywać dla wszystkich ulepszeń >4,0,5\nOptymalizuj Ustaw obsługę aktywacji, aby zapobiec błędom zalogowania się podczas aktualizacji\nNapraw aktualizację funkcji Linux dla platformy Docker i sprawdź flagę administratora\nWykryj inny przypadek Rebuild i zezwól na automatyczną odbudowę\nNapraw instalację adaptera z zależnościami\nNapraw przypadek krawędzi na sekwencjach\nZapobiegaj kilku przypadkom awarii w Sentry",
|
|
32
|
+
"zh-cn": "在执行升级自我之前停止数据库;将对>4.0.5的所有升级有效\n优化设置激活处理,防止一些错误登录升级\n修复 Docker 的 Linux 功能更新并检查 Admin Flag\n检测另一个重建案例并允许自动重建\n使用依赖项修复适配器安装\n修复 seq 边缘情况\n防止在 Sentry 中出现的几个崩溃案例"
|
|
33
|
+
},
|
|
22
34
|
"4.0.4": {
|
|
23
35
|
"en": "Optimize database initialization and destroys\nUpdate winston-syslog to prevent errors\nAllow proper setup first upgrade from 3.3.x",
|
|
24
36
|
"de": "Optimieren Sie die Initialisierung und Zerstörung von Datenbanken\nAktualisieren Sie winston-syslog, um Fehler zu vermeiden\nErst-Upgrade von 3.3.x auf ordnungsgemäße Einrichtung zulassen",
|
|
@@ -90,18 +102,6 @@
|
|
|
90
102
|
"es": "ver CHANGELOG.md",
|
|
91
103
|
"pl": "zobacz CHANGELOG.md",
|
|
92
104
|
"zh-cn": "看到CHANGELOG.md"
|
|
93
|
-
},
|
|
94
|
-
"2.2.9": {
|
|
95
|
-
"en": "see CHANGELOG.md",
|
|
96
|
-
"de": "Siehe CHANGELOG.md",
|
|
97
|
-
"ru": "см. CHANGELOG.md",
|
|
98
|
-
"pt": "veja CHANGELOG.md",
|
|
99
|
-
"nl": "zie CHANGELOG.md",
|
|
100
|
-
"fr": "voir CHANGELOG.md",
|
|
101
|
-
"it": "vedi CHANGELOG.md",
|
|
102
|
-
"es": "ver CHANGELOG.md",
|
|
103
|
-
"pl": "zobacz CHANGELOG.md",
|
|
104
|
-
"zh-cn": "看到CHANGELOG.md"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"desc": {
|
package/lib/setup/setupBackup.js
CHANGED
|
@@ -629,6 +629,10 @@ class BackupRestore {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
_copyBackupedFiles(backupDir) {
|
|
632
|
+
if (!fs.existsSync(backupDir)) {
|
|
633
|
+
console.log('No additional files to restore');
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
632
636
|
const dirs = fs.readdirSync(backupDir);
|
|
633
637
|
|
|
634
638
|
dirs.forEach(dir => {
|
|
@@ -90,7 +90,8 @@ function Install(options) {
|
|
|
90
90
|
*
|
|
91
91
|
* @param {string} repoUrl
|
|
92
92
|
* @param {string} packetName
|
|
93
|
-
* @param {
|
|
93
|
+
* @param {Record<string, any>?} options, { stopDb: true } - will stop the db before upgrade ONLY use it for controller upgrade -
|
|
94
|
+
* db is gone afterwards, does not work with stoppedList
|
|
94
95
|
* @param {object[]?} stoppedList
|
|
95
96
|
* @return {Promise<void>}
|
|
96
97
|
*/
|
|
@@ -108,6 +109,11 @@ function Install(options) {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
|
|
112
|
+
if (options.stopDb && stoppedList) {
|
|
113
|
+
console.warn('[downloadPacket] stoppedList cannot be used if stopping of databases is requested');
|
|
114
|
+
stoppedList = [];
|
|
115
|
+
}
|
|
116
|
+
|
|
111
117
|
let debug = false;
|
|
112
118
|
for (const arg of process.argv) {
|
|
113
119
|
if (arg === '--debug') {
|
|
@@ -181,15 +187,38 @@ function Install(options) {
|
|
|
181
187
|
}
|
|
182
188
|
|
|
183
189
|
if (!url && packetName !== 'example') {
|
|
190
|
+
if (options.stopDb) {
|
|
191
|
+
if (objects && objects.destroy) {
|
|
192
|
+
await objects.destroy();
|
|
193
|
+
console.log('Stopped Objects DB');
|
|
194
|
+
}
|
|
195
|
+
if (states && states.destroy) {
|
|
196
|
+
await states.destroy();
|
|
197
|
+
console.log('Stopped States DB');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
184
201
|
// Install node modules
|
|
185
202
|
await this._npmInstallWithCheck(
|
|
186
|
-
`${tools.appName.toLowerCase()}.${packetName}${version ?
|
|
203
|
+
`${tools.appName.toLowerCase()}.${packetName}${version ? `@${version}` : ''}`,
|
|
187
204
|
options,
|
|
188
205
|
debug
|
|
189
206
|
);
|
|
207
|
+
|
|
190
208
|
await enableAdapters(stoppedList, true);
|
|
191
209
|
return packetName;
|
|
192
210
|
} else if (url && url.match(tarballRegex)) {
|
|
211
|
+
if (options.stopDb) {
|
|
212
|
+
if (objects && objects.destroy) {
|
|
213
|
+
await objects.destroy();
|
|
214
|
+
console.log('Stopped Objects DB');
|
|
215
|
+
}
|
|
216
|
+
if (states && states.destroy) {
|
|
217
|
+
await states.destroy();
|
|
218
|
+
console.log('Stopped States DB');
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
193
222
|
// Install node modules
|
|
194
223
|
await this._npmInstallWithCheck(url, options, debug);
|
|
195
224
|
await enableAdapters(stoppedList, true);
|
|
@@ -446,9 +475,7 @@ function Install(options) {
|
|
|
446
475
|
|
|
447
476
|
// if required dependency not found => install it
|
|
448
477
|
if (!isFound) {
|
|
449
|
-
|
|
450
|
-
await upload.uploadAdapter(name, true, false);
|
|
451
|
-
await upload.uploadAdapter(name, false, false);
|
|
478
|
+
await this.createInstance(dName, _options);
|
|
452
479
|
}
|
|
453
480
|
}
|
|
454
481
|
}
|
|
@@ -638,7 +665,6 @@ function Install(options) {
|
|
|
638
665
|
* @return {Promise<void>}
|
|
639
666
|
*/
|
|
640
667
|
this.createInstance = async function (adapter, options) {
|
|
641
|
-
const adapterDir = tools.getAdapterDir(adapter);
|
|
642
668
|
let ignoreIfExists = false;
|
|
643
669
|
options = options || {};
|
|
644
670
|
options.host = options.host || tools.getHostName();
|
|
@@ -773,6 +799,8 @@ function Install(options) {
|
|
|
773
799
|
objs = [];
|
|
774
800
|
}
|
|
775
801
|
|
|
802
|
+
const adapterDir = tools.getAdapterDir(adapter);
|
|
803
|
+
|
|
776
804
|
if (fs.existsSync(path.join(adapterDir, 'www'))) {
|
|
777
805
|
objs.push({
|
|
778
806
|
_id: `system.adapter.${adapter}.upload`,
|
package/lib/setup/setupRepo.js
CHANGED
|
@@ -55,6 +55,7 @@ function Repo(options) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
const urlOrPath = oldRepos.native.repositories[repoName].link;
|
|
58
|
+
const hashUrl = urlOrPath.replace(/\.json$/, '-hash.json');
|
|
58
59
|
let hash;
|
|
59
60
|
|
|
60
61
|
if (
|
|
@@ -63,7 +64,11 @@ function Repo(options) {
|
|
|
63
64
|
oldRepos.native.repositories[repoName].json &&
|
|
64
65
|
(urlOrPath.startsWith('http://') || urlOrPath.startsWith('https://'))
|
|
65
66
|
) {
|
|
66
|
-
|
|
67
|
+
try {
|
|
68
|
+
hash = await axios({ url: hashUrl, timeout: 10000 });
|
|
69
|
+
} catch (e) {
|
|
70
|
+
console.error(`Cannot download repository hash file from "${hashUrl}": ${e.message}`);
|
|
71
|
+
}
|
|
67
72
|
if (hash && hash.data && oldRepos.native.repositories[repoName].hash === hash.data.hash) {
|
|
68
73
|
return oldRepos.native.repositories[repoName].json;
|
|
69
74
|
}
|
|
@@ -73,18 +78,27 @@ function Repo(options) {
|
|
|
73
78
|
|
|
74
79
|
if (urlOrPath.startsWith('http://') || urlOrPath.startsWith('https://')) {
|
|
75
80
|
if (!hash) {
|
|
76
|
-
|
|
81
|
+
try {
|
|
82
|
+
hash = await axios({ url: hashUrl, timeout: 10000 });
|
|
83
|
+
} catch (e) {
|
|
84
|
+
console.error(`Cannot download repository hash file from "${hashUrl}": ${e.message}`);
|
|
85
|
+
}
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
const agent = `${tools.appName}, RND: CLI, Node:${process.version}, V:${version}`;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
try {
|
|
90
|
+
data = await axios({
|
|
91
|
+
url: urlOrPath,
|
|
92
|
+
timeout: 10000,
|
|
93
|
+
headers: { 'User-Agent': agent }
|
|
94
|
+
});
|
|
95
|
+
if (data.data) {
|
|
96
|
+
data = data.data;
|
|
97
|
+
} else {
|
|
98
|
+
data = null;
|
|
99
|
+
}
|
|
100
|
+
} catch (e) {
|
|
101
|
+
console.error(`Cannot download repository file from "${urlOrPath}": ${e.message}`);
|
|
88
102
|
data = null;
|
|
89
103
|
}
|
|
90
104
|
} else {
|
|
@@ -632,7 +632,8 @@ function Upgrade(options) {
|
|
|
632
632
|
// Get the controller from web site
|
|
633
633
|
await install.downloadPacket(
|
|
634
634
|
repoUrl,
|
|
635
|
-
`${installed.common.name}@${repoUrl[installed.common.name].version}
|
|
635
|
+
`${installed.common.name}@${repoUrl[installed.common.name].version}`,
|
|
636
|
+
{ stopDb: true }
|
|
636
637
|
);
|
|
637
638
|
}
|
|
638
639
|
} else {
|
|
@@ -665,7 +666,7 @@ function Upgrade(options) {
|
|
|
665
666
|
const name = ioPack && ioPack.common && ioPack.common.name ? ioPack.common.name : installed.common.name;
|
|
666
667
|
console.log(`Update ${name} from @${installed.common.version} to ${version}`);
|
|
667
668
|
// Get the controller from web site
|
|
668
|
-
await install.downloadPacket(repoUrl, name + version);
|
|
669
|
+
await install.downloadPacket(repoUrl, name + version, { stopDb: true });
|
|
669
670
|
}
|
|
670
671
|
}
|
|
671
672
|
};
|
package/lib/setup/setupUpload.js
CHANGED
|
@@ -387,17 +387,21 @@ function Upload(options) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
390
|
+
try {
|
|
391
|
+
await new Promise(resolve =>
|
|
392
|
+
fs.createReadStream(file).pipe(
|
|
393
|
+
objects.insert(id, attName, null, mimeType, { rev: rev }, (err, res) => {
|
|
394
|
+
err && console.log(err);
|
|
395
|
+
if (res) {
|
|
396
|
+
rev = res.rev;
|
|
397
|
+
}
|
|
398
|
+
resolve();
|
|
399
|
+
})
|
|
400
|
+
)
|
|
401
|
+
);
|
|
402
|
+
} catch (e) {
|
|
403
|
+
console.error(`Error: Cannot upload ${file}: ${e.message}`);
|
|
404
|
+
}
|
|
401
405
|
}
|
|
402
406
|
|
|
403
407
|
// Set upload progress to 0;
|
|
@@ -88,7 +88,8 @@ function VisDebug(options) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (!adapterDir) {
|
|
91
|
-
|
|
91
|
+
console.error(`Adapter not found. Tried: ${adapterNames2Try.join(', ')}`);
|
|
92
|
+
return processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -96,15 +97,15 @@ function VisDebug(options) {
|
|
|
96
97
|
// copy edit.html.original to edit.html
|
|
97
98
|
// correct appName.json
|
|
98
99
|
// correct config.js
|
|
99
|
-
let visDir = __dirname
|
|
100
|
+
let visDir = `${__dirname}/../../node_modules/${tools.appName}.vis`;
|
|
100
101
|
if (!fs.existsSync(visDir)) {
|
|
101
|
-
visDir = __dirname
|
|
102
|
+
visDir = `${__dirname}/../../node_modules/${tools.appName.toLowerCase()}.vis`;
|
|
102
103
|
if (!fs.existsSync(visDir)) {
|
|
103
|
-
visDir = __dirname
|
|
104
|
+
visDir = `${__dirname}/../../../${tools.appName}.vis`;
|
|
104
105
|
if (!fs.existsSync(visDir)) {
|
|
105
|
-
visDir = __dirname
|
|
106
|
+
visDir = `${__dirname}/../../../${tools.appName.toLowerCase()}.vis`;
|
|
106
107
|
if (!fs.existsSync(visDir)) {
|
|
107
|
-
console.error(
|
|
108
|
+
console.error(`Cannot find ${tools.appName}.vis`);
|
|
108
109
|
return processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
|
|
109
110
|
}
|
|
110
111
|
}
|
package/main.js
CHANGED
|
@@ -95,8 +95,8 @@ let compactGroupController = false;
|
|
|
95
95
|
let compactGroup = null;
|
|
96
96
|
const compactProcs = {};
|
|
97
97
|
const scheduledInstances = {};
|
|
98
|
-
const VENDOR_BOOTSTRAP_FILE =
|
|
99
|
-
const VENDOR_FILE =
|
|
98
|
+
const VENDOR_BOOTSTRAP_FILE = '/opt/iobroker/iob-vendor-secret.json';
|
|
99
|
+
const VENDOR_FILE = '/etc/iob-vendor.json';
|
|
100
100
|
let updateIPsTimer = null;
|
|
101
101
|
let lastDiagSend = null;
|
|
102
102
|
|
|
@@ -4458,6 +4458,7 @@ async function startInstance(id, wakeUp) {
|
|
|
4458
4458
|
text.includes('NODE_MODULE_VERSION') ||
|
|
4459
4459
|
text.includes('npm rebuild') ||
|
|
4460
4460
|
text.includes("Error: The module '") ||
|
|
4461
|
+
text.includes('Could not locate the bindings file.') ||
|
|
4461
4462
|
text.includes('Cannot find module')
|
|
4462
4463
|
) {
|
|
4463
4464
|
// only try this at second rebuild
|
|
@@ -5766,15 +5767,27 @@ function init(compactGroupId) {
|
|
|
5766
5767
|
* @private
|
|
5767
5768
|
*/
|
|
5768
5769
|
function _determineRebuildArgsFromLog(text) {
|
|
5769
|
-
|
|
5770
|
-
|
|
5770
|
+
let matches;
|
|
5771
|
+
// Try to get path for this case after a →
|
|
5772
|
+
if (text.includes('Could not locate the bindings file.')) {
|
|
5773
|
+
matches = text.match(/→ (.+)$/gm);
|
|
5774
|
+
if (matches) {
|
|
5775
|
+
matches.shift(); // we need to remove the first element from match
|
|
5776
|
+
}
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
// else, extract rebuild path the standard way - it is always
|
|
5780
|
+
// between the only two single quotes
|
|
5781
|
+
if (!matches) {
|
|
5782
|
+
matches = text.match(/'.+'/g);
|
|
5783
|
+
}
|
|
5771
5784
|
|
|
5772
5785
|
if (matches) {
|
|
5773
5786
|
// We only check the first path like entry
|
|
5774
5787
|
// remove the quotes
|
|
5775
5788
|
let rebuildPath = matches[0].replace(/'/g, '');
|
|
5776
5789
|
if (path.isAbsolute(rebuildPath)) {
|
|
5777
|
-
// we have found a module which needs rebuild - we need to find deepest pack.json
|
|
5790
|
+
// we have found a module which needs rebuild - we need to find the deepest pack.json
|
|
5778
5791
|
rebuildPath = path.dirname(rebuildPath);
|
|
5779
5792
|
const rootDir = path.parse(process.cwd()).root;
|
|
5780
5793
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.js-controller",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
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.
|
|
21
|
-
"@iobroker/db-objects-jsonl": "4.0.
|
|
22
|
-
"@iobroker/db-objects-redis": "4.0.
|
|
23
|
-
"@iobroker/db-states-file": "4.0.
|
|
24
|
-
"@iobroker/db-states-jsonl": "4.0.
|
|
25
|
-
"@iobroker/db-states-redis": "4.0.
|
|
26
|
-
"@iobroker/js-controller-adapter": "4.0.
|
|
27
|
-
"@iobroker/js-controller-cli": "4.0.
|
|
28
|
-
"@iobroker/js-controller-common": "4.0.
|
|
29
|
-
"@iobroker/js-controller-common-db": "4.0.
|
|
20
|
+
"@iobroker/db-objects-file": "4.0.5",
|
|
21
|
+
"@iobroker/db-objects-jsonl": "4.0.5",
|
|
22
|
+
"@iobroker/db-objects-redis": "4.0.5",
|
|
23
|
+
"@iobroker/db-states-file": "4.0.5",
|
|
24
|
+
"@iobroker/db-states-jsonl": "4.0.5",
|
|
25
|
+
"@iobroker/db-states-redis": "4.0.5",
|
|
26
|
+
"@iobroker/js-controller-adapter": "4.0.5",
|
|
27
|
+
"@iobroker/js-controller-cli": "4.0.5",
|
|
28
|
+
"@iobroker/js-controller-common": "4.0.5",
|
|
29
|
+
"@iobroker/js-controller-common-db": "4.0.5",
|
|
30
30
|
"@iobroker/plugin-base": "~1.2.1",
|
|
31
31
|
"@iobroker/plugin-sentry": "~1.1.10",
|
|
32
32
|
"axios": "^0.24.0",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"iobroker.js",
|
|
114
114
|
"main.js"
|
|
115
115
|
],
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "ba55e7d15a1e68e18d03254d0fa8030d7f785651"
|
|
117
117
|
}
|