|
|
@@ -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))
|
|
|
+ })
|
|
|
+ },
|
|
|
+})
|