feat: auto updater demo

This commit is contained in:
gaoshuaixing
2025-01-04 20:34:12 +08:00
parent 06e62858ea
commit 361c040c2d
4 changed files with 106 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ const { logger } = require('ee-core/log');
const { getConfig } = require('ee-core/config');
const { frameworkService } = require('../service/framework');
const { sqlitedbService } = require('../service/database/sqlitedb');
const { autoUpdater } = require('../service/os/auto_updater');
/**
* framework - demo
@@ -241,6 +242,22 @@ class FrameworkController {
return data;
}
/**
* 检查是否有新版本
*/
checkForUpdater() {
autoUpdater.checkUpdate();
return;
}
/**
* 下载新版本
*/
downloadApp() {
autoUpdater.download();
return;
}
/**
* 测试接口
*/