From 90d4e7ab8143f032491408956c3450d114fe0c98 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Mon, 28 Mar 2022 15:15:30 +0000 Subject: [PATCH] application: Emit event when updating changes --- core/application.mjs | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/application.mjs b/core/application.mjs index 4a45789..29f4990 100644 --- a/core/application.mjs +++ b/core/application.mjs @@ -119,11 +119,15 @@ export default class Application extends EventEmitter { } if (this.updating) return null + this.updating = true + this.emit('updating', this.updating) return this._update() .then((result) => { this.updating = false + this.emit('updating', this.updating) + return this.ctx.db.write() .then(function() { return result }) }) diff --git a/package.json b/package.json index 7c08f23..ed8432c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "service-core", - "version": "3.0.0-beta.12", + "version": "3.0.0-beta.13", "description": "Core boiler plate code to install node server as windows service", "main": "index.mjs", "scripts": {