Skip to content

Commit 2f0b84e

Browse files
committed
fix: correct entry point and set version to 0.1.0
- index.ts: Call run() directly instead of non-existent parseArgs() - cli.ts: Change version from 1.0.0 to 0.1.0 Signed-off-by: leocavalcante <[email protected]>
1 parent 20f1816 commit 2f0b84e

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { loadConfig } from "./config.ts"
77
import { runLoop } from "./loop.ts"
88
import type { CliOptions } from "./types.ts"
99

10-
const VERSION = "1.0.0"
10+
const VERSION = "0.1.0"
1111

1212
/**
1313
* Parse CLI arguments and run the application

src/index.ts

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,7 @@
55
* Entry point for the CLI application.
66
*/
77

8-
import { parseArgs } from "./cli.ts"
9-
import { loadConfig } from "./config.ts"
10-
import { runLoop } from "./loop.ts"
8+
import { run } from "./cli.ts"
119

12-
async function main(): Promise<void> {
13-
try {
14-
// Parse CLI arguments
15-
const { options, hint } = parseArgs()
16-
17-
// Load configuration (merges file, env, and CLI)
18-
const config = await loadConfig(options, hint)
19-
20-
// Run the main loop
21-
await runLoop(config)
22-
} catch (err) {
23-
if (err instanceof Error) {
24-
console.error(`Error: ${err.message}`)
25-
26-
// Show stack trace in verbose mode
27-
if (process.env.OPENCODER_VERBOSE === "true") {
28-
console.error(err.stack)
29-
}
30-
} else {
31-
console.error(`Error: ${err}`)
32-
}
33-
34-
process.exit(1)
35-
}
36-
}
37-
38-
// Run main
39-
main()
10+
// Run the CLI
11+
run()

0 commit comments

Comments
 (0)