fix: make CLI bin invoke program parse
This commit is contained in:
6
bin/warelay.js
Normal file
6
bin/warelay.js
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
import("../dist/index.js").then((mod) => {
|
||||
if (mod?.program?.parseAsync) {
|
||||
mod.program.parseAsync(process.argv);
|
||||
}
|
||||
});
|
||||
@@ -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",
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user