update: 更新light-code部分的代码模块

This commit is contained in:
2025-11-11 03:42:21 +08:00
parent dbd59e2fd9
commit 5df5a943ed
16 changed files with 761 additions and 1035 deletions

View File

@@ -71,14 +71,11 @@ export class AppDownload {
const command = 'ev';
const args = ['app', 'download'];
args.push('-i', id);
if (type) {
args.push('-t', type);
}
const appName = opts?.appName || id.split('/').pop();
if (type === 'web') {
args.push('-o', pagesDir);
} else if (type === 'app') {
args.push('-o', path.join(appsDir, appName));
args.push('-o', path.join(appsDir));
} else {
throw new Error('应用类型错误,只能是 web 或 app');
}
@@ -120,7 +117,7 @@ export class AppDownload {
const pagePath = path.join(pagesDir, id);
deletePath = pagePath;
} else if (type === 'app') {
const appPath = path.join(appsDir, appName);
const appPath = path.join(appsDir, id);
deletePath = appPath;
}
if (deletePath && checkFileExists(deletePath)) {