@iobroker/db-objects-file
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -128,3 +128,3 @@ /** | ||
} catch (e) { | ||
this.log.error(this.namespace + ' Cannot parse ' + location + ': ' + e); | ||
this.log.error(this.namespace + ' Cannot parse ' + location + ': ' + e.message); | ||
this.fileOptions[id] = {}; | ||
@@ -406,6 +406,6 @@ } | ||
} catch (e) { | ||
this.log.warn(`Cannot read file ${id} / ${name}: ${JSON.stringify(e)}`); | ||
this.log.warn(`${this.namespace} Cannot read file ${id} / ${name}: ${e.message}`); | ||
throw e; | ||
} | ||
throw new Error (utils.ERRORS.ERROR_NOT_FOUND); | ||
throw new Error(utils.ERRORS.ERROR_NOT_FOUND); | ||
} | ||
@@ -430,4 +430,4 @@ | ||
} catch (e) { | ||
this.log.error(`Cannot check object existence of "${id}": ${e}`); | ||
throw new Error(`Cannot check object existence of "${id}": ${e}`); | ||
this.log.error(`${this.namespace} Cannot check object existence of "${id}": ${e.message}`); | ||
throw new Error(`Cannot check object existence of "${id}": ${e.message}`); | ||
} | ||
@@ -456,4 +456,4 @@ } | ||
if (e.code !== 'ENOENT') { | ||
this.log.error(`Cannot check file existence of "${location}": ${e}`); | ||
throw new Error(`Cannot check file existence of "${location}": ${e}`); | ||
this.log.error(`${this.namespace} Cannot check file existence of "${location}": ${e.message}`); | ||
throw new Error(`Cannot check file existence of "${location}": ${e.message}`); | ||
} | ||
@@ -484,4 +484,4 @@ return false; | ||
if (e.code !== 'ENOENT') { | ||
this.log.error(`Cannot check directory existence of "${location}": ${e}`); | ||
throw new Error(`Cannot check directory existence of "${location}": ${e}`); | ||
this.log.error(`${this.namespace} Cannot check directory existence of "${location}": ${e.message}`); | ||
throw new Error(`Cannot check directory existence of "${location}": ${e.message}`); | ||
} | ||
@@ -512,3 +512,3 @@ return false; | ||
} catch (e) { | ||
this.log.error('Cannot delete directory "' + path.join(id, name) + '": ' + e); | ||
this.log.error(this.namespace + ' Cannot delete directory "' + path.join(id, name) + '": ' + e.message); | ||
throw e; | ||
@@ -529,3 +529,3 @@ } | ||
} catch (e) { | ||
this.log.error('Cannot delete file "' + path.join(id, name) + '": ' + e); | ||
this.log.error(this.namespace + ' Cannot delete file "' + path.join(id, name) + '": ' + e.message); | ||
throw e; | ||
@@ -672,3 +672,3 @@ } | ||
} catch (e) { | ||
this.log.error(this.namespace + ' Cannot read permssions of ' + path.join(this.objectsDir, id, name, _files[j]) + ': ' + e); | ||
this.log.error(this.namespace + ' Cannot read permssions of ' + path.join(this.objectsDir, id, name, _files[j]) + ': ' + e.message); | ||
} | ||
@@ -825,3 +825,3 @@ } | ||
} catch (e) { | ||
this.log.warn('Cannot execute map: ' + e.message); | ||
this.log.warn(this.namespace + ' Cannot execute map: ' + e.message); | ||
} | ||
@@ -851,7 +851,7 @@ } | ||
if (!this.dataset['_design/' + design]) { | ||
this.log.error(`Cannot find view "${design}"`); | ||
this.log.error(`${this.namespace} Cannot find view "${design}"`); | ||
throw new Error(`Cannot find view "${design}"`); | ||
} | ||
if (!this.dataset[`_design/${design}`].views && this.dataset['_design/' + design].views[search]) { | ||
this.log.warn(`Cannot find search "${search}" in "${design}"`); | ||
this.log.warn(`${this.namespace} Cannot find search "${search}" in "${design}"`); | ||
throw new Error(`Cannot find search "${search}" in "${design}"`); | ||
@@ -858,0 +858,0 @@ } |
@@ -31,3 +31,3 @@ /** | ||
if (Array.isArray(this.storedSubscribes) && this.storedSubscribes.length) { | ||
this.log.warn(`Replay ${this.storedSubscribes.length} subscription calls for Objects Server that were done before the client was connected initially`); | ||
this.log.warn(`${this.namespace} Replay ${this.storedSubscribes.length} subscription calls for Objects Server that were done before the client was connected initially`); | ||
this.storedSubscribes.forEach((s => this.subscribe(s.pattern, s.options, s.callback))); | ||
@@ -34,0 +34,0 @@ this.storedSubscribes = []; |
@@ -289,3 +289,3 @@ /** | ||
} catch (err) { | ||
return void handler.sendError(responseId, new Error('_getObjectView Error for ' + scriptDesign + '/' + scriptSearch + ': ' + err)); | ||
return void handler.sendError(responseId, new Error('_getObjectView Error for ' + scriptDesign + '/' + scriptSearch + ': ' + err.message)); | ||
} | ||
@@ -372,3 +372,3 @@ const res = objs.rows.map(obj => JSON.stringify(this.dataset[obj.value._id || obj.id])); | ||
if (!name.endsWith('/_data.json')) { | ||
this.log.warn(`${namespaceLog} Got MGET request for non existing file ${dataId}, err: ${err}`); | ||
this.log.warn(`${namespaceLog} Got MGET request for non existing file ${dataId}, err: ${err.message}`); | ||
} | ||
@@ -468,3 +468,3 @@ response.push(null); | ||
} catch (err) { | ||
return void handler.sendError(responseId, new Error(`ERROR setObject id=${id}: ${err}`)); | ||
return void handler.sendError(responseId, new Error(`ERROR setObject id=${id}: ${err.message}`)); | ||
} | ||
@@ -471,0 +471,0 @@ handler.sendString(responseId, 'OK'); |
{ | ||
"name": "@iobroker/db-objects-file", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"engines": { | ||
@@ -8,4 +8,4 @@ "node": ">=10.0.0" | ||
"dependencies": { | ||
"@iobroker/db-base": "^1.0.8", | ||
"@iobroker/db-objects-redis": "^1.0.9", | ||
"@iobroker/db-base": "^1.0.10", | ||
"@iobroker/db-objects-redis": "^1.0.10", | ||
"deep-clone": "^3.0.3", | ||
@@ -36,3 +36,3 @@ "fs-extra": "^9.1.0", | ||
}, | ||
"gitHead": "aef073c0218e503c4fc87d999fff0f83e28569d0" | ||
"gitHead": "758fd93aae496663dff8b9d8dbe38d06fdb739be" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
83620
3
10
88