mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-26 18:13:33 +00:00
refactor: dedupe cli config cron and install flows
This commit is contained in:
@@ -147,3 +147,20 @@ export async function installPackageDir(params: {
|
||||
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
export async function installPackageDirWithManifestDeps(params: {
|
||||
sourceDir: string;
|
||||
targetDir: string;
|
||||
mode: "install" | "update";
|
||||
timeoutMs: number;
|
||||
logger?: { info?: (message: string) => void };
|
||||
copyErrorPrefix: string;
|
||||
depsLogMessage: string;
|
||||
manifestDependencies?: Record<string, unknown>;
|
||||
afterCopy?: () => void | Promise<void>;
|
||||
}): Promise<{ ok: true } | { ok: false; error: string }> {
|
||||
return installPackageDir({
|
||||
...params,
|
||||
hasDeps: Object.keys(params.manifestDependencies ?? {}).length > 0,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user