diff --git a/core/application.mjs b/core/application.mjs index 0dd797c..4a45789 100644 --- a/core/application.mjs +++ b/core/application.mjs @@ -98,6 +98,7 @@ export default class Application extends EventEmitter { updateLog(message, level = 'info') { this.ctx.db.data.core[this.name].updater += message this.ctx.log[level](message) + this.emit('updatelog') return message } @@ -213,6 +214,8 @@ export default class Application extends EventEmitter { this.ctx.db.upsertFirst(this.ctx.db.data.core[this.name].versions, latest) } + this.emit('update', latest) + // The target file for the archive and the target folder for new our version let target = this.ctx.util.getPathFromRoot(`./${this.name}/${latest.version}/file${this.ctx.util.getExtension(latest.filename)}`) folder = this.ctx.util.getPathFromRoot(`./${this.name}/${latest.version}`) diff --git a/package.json b/package.json index dd208fa..7c08f23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "service-core", - "version": "3.0.0-beta.11", + "version": "3.0.0-beta.12", "description": "Core boiler plate code to install node server as windows service", "main": "index.mjs", "scripts": {