2025-07-23 16:14:54 +00:00
|
|
|
import { Global } from "../../../global"
|
2025-07-01 17:44:52 +00:00
|
|
|
import { bootstrap } from "../../bootstrap"
|
2025-07-01 16:06:38 +00:00
|
|
|
import { cmd } from "../cmd"
|
2025-10-04 04:07:58 +00:00
|
|
|
import { ConfigCommand } from "./config"
|
2025-07-01 16:06:38 +00:00
|
|
|
import { FileCommand } from "./file"
|
|
|
|
|
import { LSPCommand } from "./lsp"
|
|
|
|
|
import { RipgrepCommand } from "./ripgrep"
|
2025-07-10 15:25:31 +00:00
|
|
|
import { ScrapCommand } from "./scrap"
|
2025-12-22 23:24:06 +00:00
|
|
|
import { SkillCommand } from "./skill"
|
2025-07-01 16:06:38 +00:00
|
|
|
import { SnapshotCommand } from "./snapshot"
|
|
|
|
|
|
|
|
|
|
export const DebugCommand = cmd({
|
|
|
|
|
command: "debug",
|
|
|
|
|
builder: (yargs) =>
|
|
|
|
|
yargs
|
2025-10-04 04:07:58 +00:00
|
|
|
.command(ConfigCommand)
|
2025-07-01 16:06:38 +00:00
|
|
|
.command(LSPCommand)
|
|
|
|
|
.command(RipgrepCommand)
|
|
|
|
|
.command(FileCommand)
|
2025-07-10 15:25:31 +00:00
|
|
|
.command(ScrapCommand)
|
2025-12-22 23:24:06 +00:00
|
|
|
.command(SkillCommand)
|
2025-07-01 16:06:38 +00:00
|
|
|
.command(SnapshotCommand)
|
2025-07-23 16:14:54 +00:00
|
|
|
.command(PathsCommand)
|
2025-07-01 17:44:52 +00:00
|
|
|
.command({
|
|
|
|
|
command: "wait",
|
|
|
|
|
async handler() {
|
2025-09-01 21:15:49 +00:00
|
|
|
await bootstrap(process.cwd(), async () => {
|
2025-07-07 19:53:43 +00:00
|
|
|
await new Promise((resolve) => setTimeout(resolve, 1_000 * 60 * 60 * 24))
|
2025-07-01 17:44:52 +00:00
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
})
|
2025-07-01 16:06:38 +00:00
|
|
|
.demandCommand(),
|
|
|
|
|
async handler() {},
|
|
|
|
|
})
|
2025-07-23 16:14:54 +00:00
|
|
|
|
|
|
|
|
const PathsCommand = cmd({
|
|
|
|
|
command: "paths",
|
|
|
|
|
handler() {
|
|
|
|
|
for (const [key, value] of Object.entries(Global.Path)) {
|
|
|
|
|
console.log(key.padEnd(10), value)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|