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", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
"warelay": "dist/index.js", "warelay": "bin/warelay.js",
"warely": "dist/index.js", "warely": "bin/warelay.js",
"wa": "dist/index.js" "wa": "bin/warelay.js"
}, },
"scripts": { "scripts": {
"dev": "tsx src/index.ts", "dev": "tsx src/index.ts",

View File

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

View File

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