mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
24 lines
504 B
JavaScript
24 lines
504 B
JavaScript
'use strict';
|
|
|
|
const fs = require('fs');
|
|
|
|
const { writeInstallState } = require('../install-state');
|
|
|
|
function applyInstallPlan(plan) {
|
|
for (const operation of plan.operations) {
|
|
fs.mkdirSync(require('path').dirname(operation.destinationPath), { recursive: true });
|
|
fs.copyFileSync(operation.sourcePath, operation.destinationPath);
|
|
}
|
|
|
|
writeInstallState(plan.installStatePath, plan.statePreview);
|
|
|
|
return {
|
|
...plan,
|
|
applied: true,
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
applyInstallPlan,
|
|
};
|