"feat: 升级本地应用管理依赖,新增应用删除功能及强制覆盖下载选项"

This commit is contained in:
2025-05-17 15:53:06 +08:00
parent 035ddc248c
commit e9eedcd1bd
9 changed files with 99 additions and 18 deletions

View File

@@ -4,10 +4,11 @@ import { parseIfJson } from '@/module/assistant/index.ts';
import path from 'node:path';
import fs from 'node:fs';
import glob from 'fast-glob';
import type { App } from '@kevisual/router';
export class AssistantApp extends Manager {
config: AssistantConfig;
pagesPath: string;
constructor(config: AssistantConfig) {
constructor(config: AssistantConfig, mainApp?: App) {
config.checkMounted();
const appsPath = config?.configPath?.appsDir || path.join(process.cwd(), 'apps');
const pagesPath = config?.configPath?.pagesDir || path.join(process.cwd(), 'pages');
@@ -16,6 +17,7 @@ export class AssistantApp extends Manager {
super({
appsPath,
configFilename: configFimename,
mainApp: mainApp,
});
this.pagesPath = pagesPath;
this.config = config;