fix: api interface error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2022-04-03 03:07:18 +08:00
parent 8056d3060d
commit 866d1dd62c
2 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export namespace plugin {
export abstract class PluginManager {
abstract scan(folder: string): void
abstract build(): void
abstract loadFromFile(file: string, ext: any): Plugin
abstract loadFromFile(file: string, ext?: any): Plugin
abstract load(...args: any[]): void
abstract enable(...args: any[]): void
abstract disable(...args: any[]): void

View File

@ -1,4 +1,14 @@
function upgradeModules(core) {
if (base.version && global.ScriptEngineVersion != core['dist-tags']['latest']) {
var Paths = Java.type('java.nio.file.Paths')
base.save(Paths.get(root, "upgrade"), core['dist-tags']['latest'])
console.info('@ccms/core found new version ' + core['dist-tags']['latest'] + ' will upgrade after reboot!')
}
}
function exit() {
var http = require('@ccms/common/dist/http').default
upgradeModules(http.get('https://registry.npmmirror.com/@ccms/core'))
console.debug('exit finish!')
}
exit()