This commit is contained in:
2025-11-28 03:36:38 +08:00
parent 727304009d
commit 39fab83b3d
4 changed files with 14 additions and 44 deletions

View File

@@ -23,18 +23,19 @@ export const installAppFromKey = async (key: string) => {
if (fileIsExist(readmeFile)) {
readmeDesc = fs.readFileSync(readmeFile, 'utf-8');
}
const { type = 'system-app', entry = '', engine = undefined, pm2Options = {}, ...rest } = app;
let showAppInfo = {
key,
status: 'inactive' as const,
type: app?.type || 'system-app',
type,
description: readmeDesc || '',
version,
//
entry: app?.entry || '',
entry,
path: directory,
engine: app?.engine,
pm2Options: app?.pm2Options || {},
engine,
pm2Options,
origin: app,
...rest,
};
app.key = key;
fs.writeFileSync(pkgs, JSON.stringify(pkg, null, 2));