@iobroker/db-base
Advanced tools
Comparing version 0.0.1 to 0.0.4
@@ -221,2 +221,5 @@ /** | ||
const file = files.shift(); | ||
if (!file) { | ||
continue; | ||
} | ||
// extract time | ||
@@ -223,0 +226,0 @@ const ms = new Date(file.substring(0, 10) + ' ' + file.substring(11, 16).replace('-', ':') + ':00').getTime(); |
@@ -21,4 +21,22 @@ const path = require('path'); | ||
if (!controllerPath) { | ||
controllerPath = path.join(__dirname, '..', '..', '..', '..', 'ioBroker.js-controller'); | ||
if (!fs.existsSync(controllerPath)) { | ||
const checkPath = path.normalize(path.join(__dirname, '../..')); | ||
const pathParts = checkPath.split(path.sep); | ||
while (pathParts.length) { | ||
const tryPath = path.join(path.sep, pathParts.join(path.sep)); | ||
if (fs.existsSync(path.join(tryPath, 'lib/tools.js'))) { | ||
controllerPath = tryPath; | ||
break; | ||
} | ||
// Mainly for local development cases | ||
if (fs.existsSync(path.join(tryPath, 'iobroker.js-controller/lib/tools.js'))) { | ||
controllerPath = path.join(tryPath, 'iobroker.js-controller'); | ||
break; | ||
} | ||
if (fs.existsSync(path.join(tryPath, 'ioBroker.js-controller/lib/tools.js'))) { | ||
controllerPath = path.join(tryPath, 'ioBroker.js-controller'); | ||
break; | ||
} | ||
pathParts.pop(); | ||
} | ||
if (controllerPath && !fs.existsSync(controllerPath)) { | ||
controllerPath = null; | ||
@@ -25,0 +43,0 @@ } |
{ | ||
"name": "@iobroker/db-base", | ||
"version": "0.0.1", | ||
"version": "0.0.4", | ||
"engines": { | ||
@@ -34,3 +34,3 @@ "node": ">=10.0.0" | ||
}, | ||
"gitHead": "e8a4ad540b8f8a63f46bfcacef7ca6c536d74942" | ||
"gitHead": "ffacbbe82d0239b1e4e20fa63ba52ec74719fc3c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26565
626