fix: make CLI bin invoke program parse

This commit is contained in:
Peter Steinberger
2025-11-25 13:22:54 +01:00
parent d62fedda32
commit cadd29e147
4 changed files with 11 additions and 5 deletions

6
bin/warelay.js Normal file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env node
import("../dist/index.js").then((mod) => {
if (mod?.program?.parseAsync) {
mod.program.parseAsync(process.argv);
}
});

View File

@@ -5,9 +5,9 @@
"type": "module",
"main": "dist/index.js",
"bin": {
"warelay": "dist/index.js",
"warely": "dist/index.js",
"wa": "dist/index.js"
"warelay": "bin/warelay.js",
"warely": "bin/warelay.js",
"wa": "bin/warelay.js"
},
"scripts": {
"dev": "tsx src/index.ts",

View File

@@ -21,7 +21,7 @@ export function buildProgram() {
program
.name("warelay")
.description("WhatsApp relay CLI (Twilio or WhatsApp Web session)")
.version("1.0.0");
.version("0.1.0");
program
.command("login")

View File

@@ -48,7 +48,7 @@ export async function createWaSocket(printQr: boolean, verbose: boolean) {
version,
logger,
printQRInTerminal: false,
browser: ["Warelay", "CLI", "1.0.0"],
browser: ["Warelay", "CLI", "0.1.0"],
syncFullHistory: false,
markOnlineOnConnect: false,
});