add install base

This commit is contained in:
2025-05-17 03:32:38 +08:00
parent 717e434ce0
commit 035ddc248c
28 changed files with 667 additions and 260 deletions

View File

@@ -57,7 +57,7 @@ export class AppDownload {
const configDir = this.config.configDir;
this.config?.checkMounted();
const appsDir = this.config.configPath?.appsDir;
const pageDir = this.config.configPath?.pageDir;
const pagesDir = this.config.configPath?.pagesDir;
if (!id) {
throw new Error('应用名称不能为空');
}
@@ -69,7 +69,7 @@ export class AppDownload {
}
const appName = opts?.appName || id.split('/').pop();
if (type === 'web') {
args.push('-o', pageDir);
args.push('-o', pagesDir);
} else if (type === 'app') {
args.push('-o', path.join(appsDir, appName));
} else {
@@ -96,7 +96,7 @@ export class AppDownload {
const appName = opts?.appName || id.split('/').pop();
this.config?.checkMounted();
const appsDir = this.config.configPath?.appsDir;
const pageDir = this.config.configPath?.pageDir;
const pagesDir = this.config.configPath?.pagesDir;
if (!id) {
throw new Error('应用名称不能为空');
}
@@ -104,7 +104,7 @@ export class AppDownload {
let isDelete = false;
if (type === 'web') {
// 直接删除路径就行
const pagePath = path.join(pageDir, id);
const pagePath = path.join(pagesDir, id);
deletePath = pagePath;
} else if (type === 'app') {
const appPath = path.join(appsDir, appName);