mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
- Added `torch-lock` dependency to `torch/package.json` - Initialized TORCH structure using `cmdInit` (mocked interaction) - Updated `torch/package.json` with TORCH CLI scripts (`lock:check`, `lock:lock`, etc.) - Updated `torch/torch-config.json` with Nostr configuration - Added `type: module` to `torch/package.json` to support ES modules - Cleaned up extraneous directories (`test_logs`, `todo`, etc.) from initialization Co-authored-by: PR0M3TH3AN <[email protected]>
20 lines
620 B
JavaScript
20 lines
620 B
JavaScript
import { rollbackPrompt } from './services/governance/index.js';
|
|
import { ExitError } from './errors.mjs';
|
|
|
|
export async function cmdRollback(target, strategy) {
|
|
if (!target) {
|
|
console.error('Usage: torch-lock rollback --target <path> [--strategy <hash|latest>]');
|
|
throw new ExitError(1, 'Missing target');
|
|
}
|
|
|
|
const effectiveStrategy = strategy || 'latest';
|
|
|
|
try {
|
|
const result = await rollbackPrompt(target, effectiveStrategy);
|
|
console.log(JSON.stringify(result, null, 2));
|
|
} catch (e) {
|
|
console.error(`Rollback failed: ${e.message}`);
|
|
throw new ExitError(1, 'Rollback failed');
|
|
}
|
|
}
|