db: Don't warn about clearing db when using in-memory db
continuous-integration/appveyor/branch AppVeyor build succeeded Details

master v3.0.0-beta.17
Jonatan Nilsson 2022-04-19 16:37:45 +00:00
parent 33b3d98a37
commit cb5de72e13
2 changed files with 4 additions and 2 deletions

View File

@ -122,7 +122,9 @@ export default function GetDB(config, log, orgFilename = 'db.json') {
return db.read()
.then(function() {
if (!isObject(db.data)) {
db.log.warn(`File ${fullpath} was empty or not a json object, clearing it.`)
if (fullpath !== 'in-memory') {
db.log.warn(`File ${fullpath} was empty or not a json object, clearing it.`)
}
db.data = {}
}
defaults(db.data, { core: { version: 1 } })

View File

@ -1,6 +1,6 @@
{
"name": "service-core",
"version": "3.0.0-beta.16",
"version": "3.0.0-beta.17",
"description": "Core boiler plate code to install node server as windows service",
"main": "index.mjs",
"scripts": {