wip: snapshot

This commit is contained in:
Dax Raad
2025-07-28 13:00:09 -04:00
parent 99dfe65862
commit c24fbb4292
3 changed files with 25 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import { cmd } from "../cmd"
export const SnapshotCommand = cmd({
command: "snapshot",
builder: (yargs) => yargs.command(TrackCommand).command(PatchCommand).demandCommand(),
builder: (yargs) => yargs.command(TrackCommand).command(PatchCommand).command(DiffCommand).demandCommand(),
async handler() {},
})
@@ -31,3 +31,18 @@ const PatchCommand = cmd({
})
},
})
const DiffCommand = cmd({
command: "diff <hash>",
builder: (yargs) =>
yargs.positional("hash", {
type: "string",
description: "hash",
demandOption: true,
}),
async handler(args) {
await bootstrap({ cwd: process.cwd() }, async () => {
console.log(await Snapshot.diff(args.hash))
})
},
})