application: Add more event emits on specific events
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
99d7a0655d
commit
46386a13b3
2 changed files with 4 additions and 1 deletions
|
@ -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}`)
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue