@iobroker/legacy-testing 0.3.5 → 0.3.6
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/README.md +1 -1
- package/package.json +1 -1
- package/setup.js +16 -9
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Legacy test modules for ioBroker
|
|
|
11
11
|
|
|
12
12
|
## Changelog
|
|
13
13
|
<!-- ### **WORK IN PROGRESS** -->
|
|
14
|
-
### 0.3.
|
|
14
|
+
### 0.3.6 (2023-05-08)
|
|
15
15
|
* (bluefox) Added possibility to install additional adapters at start
|
|
16
16
|
* (bluefox) Added setOfflineState/getOfflineState
|
|
17
17
|
|
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -262,13 +262,9 @@ async function installAdapter(customAdapterName, cb) {
|
|
|
262
262
|
cb = customAdapterName;
|
|
263
263
|
customAdapterName = null;
|
|
264
264
|
}
|
|
265
|
-
console.log(`[${customAdapterName || pkg.name}] Install adapter...`);
|
|
266
265
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
installCustomAdapter(pkg.name); // force install from the current directory
|
|
270
|
-
customAdapterName = pkg.name;
|
|
271
|
-
}
|
|
266
|
+
customAdapterName = customAdapterName || pkg.name;
|
|
267
|
+
console.log(`[${customAdapterName}] Install adapter...`);
|
|
272
268
|
|
|
273
269
|
if (customAdapterName.includes('@')) {
|
|
274
270
|
installCustomAdapter(customAdapterName);
|
|
@@ -461,9 +457,20 @@ async function installJsController(preInstalledAdapters, cb) {
|
|
|
461
457
|
}
|
|
462
458
|
|
|
463
459
|
function copyAdapterToController() {
|
|
464
|
-
console.log('
|
|
465
|
-
|
|
466
|
-
|
|
460
|
+
console.log('Pack adapter...');
|
|
461
|
+
|
|
462
|
+
fs.existsSync(`${rootDir}${pkg.name}-${pkg.version}.tgz`) && fs.unlinkSync(`${rootDir}${pkg.name}-${pkg.version}.tgz`);
|
|
463
|
+
fs.existsSync(`${rootDir}tmp/${pkg.name}-${pkg.version}.tgz`) && fs.unlinkSync(`${rootDir}tmp/${pkg.name}-${pkg.version}.tgz`);
|
|
464
|
+
|
|
465
|
+
cp.execSync(`npm pack`, {
|
|
466
|
+
cwd: rootDir,
|
|
467
|
+
stdio: [0, 1, 2],
|
|
468
|
+
});
|
|
469
|
+
copyFileSync(`${rootDir}${pkg.name}-${pkg.version}.tgz`, `${rootDir}tmp/${pkg.name}-${pkg.version}.tgz`);
|
|
470
|
+
cp.execSync(`npm install ${pkg.name}-${pkg.version}.tgz --prefix ./ --production`, {
|
|
471
|
+
cwd: `${rootDir}tmp`,
|
|
472
|
+
stdio: [0, 1, 2],
|
|
473
|
+
});
|
|
467
474
|
console.log('Adapter copied.');
|
|
468
475
|
}
|
|
469
476
|
|