mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-07 17:53:32 +08:00
feat: strengthen install lifecycle and target adapters (#512)
* fix: strengthen install lifecycle adapters * fix: restore template content on uninstall
This commit is contained in:
@@ -34,15 +34,16 @@ function planInstallTargetScaffold(options = {}) {
|
||||
projectRoot: options.projectRoot || options.repoRoot,
|
||||
homeDir: options.homeDir,
|
||||
};
|
||||
const validationIssues = adapter.validate(planningInput);
|
||||
const blockingIssues = validationIssues.filter(issue => issue.severity === 'error');
|
||||
if (blockingIssues.length > 0) {
|
||||
throw new Error(blockingIssues.map(issue => issue.message).join('; '));
|
||||
}
|
||||
const targetRoot = adapter.resolveRoot(planningInput);
|
||||
const installStatePath = adapter.getInstallStatePath(planningInput);
|
||||
const operations = modules.flatMap(module => {
|
||||
const paths = Array.isArray(module.paths) ? module.paths : [];
|
||||
return paths.map(sourceRelativePath => adapter.createScaffoldOperation(
|
||||
module.id,
|
||||
sourceRelativePath,
|
||||
planningInput
|
||||
));
|
||||
const operations = adapter.planOperations({
|
||||
...planningInput,
|
||||
modules,
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -53,6 +54,7 @@ function planInstallTargetScaffold(options = {}) {
|
||||
},
|
||||
targetRoot,
|
||||
installStatePath,
|
||||
validationIssues,
|
||||
operations,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user