Fix TypeScript compilation errors and consolidate version handling

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
Dax Raad
2025-06-17 10:27:49 -04:00
parent 2d68814abc
commit 68e1b3c46c
15 changed files with 123 additions and 181 deletions

View File

@@ -1,6 +1,5 @@
import { App } from "../../app/app"
import { LSP } from "../../lsp"
import { VERSION } from "../version"
import { cmd } from "./cmd"
export const ScrapCommand = cmd({
@@ -8,9 +7,12 @@ export const ScrapCommand = cmd({
builder: (yargs) =>
yargs.positional("file", { type: "string", demandOption: true }),
async handler(args) {
await App.provide({ cwd: process.cwd(), version: VERSION }, async (app) => {
await LSP.touchFile(args.file, true)
console.log(await LSP.diagnostics())
})
await App.provide(
{ cwd: process.cwd() },
async () => {
await LSP.touchFile(args.file, true)
console.log(await LSP.diagnostics())
},
)
},
})