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') {
|
updateLog(message, level = 'info') {
|
||||||
this.ctx.db.data.core[this.name].updater += message
|
this.ctx.db.data.core[this.name].updater += message
|
||||||
this.ctx.log[level](message)
|
this.ctx.log[level](message)
|
||||||
|
this.emit('updatelog')
|
||||||
return message
|
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.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
|
// 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)}`)
|
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}`)
|
folder = this.ctx.util.getPathFromRoot(`./${this.name}/${latest.version}`)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "service-core",
|
"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",
|
"description": "Core boiler plate code to install node server as windows service",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue