@agent-wechat/cli 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7904,7 +7904,7 @@ import qrTerminal from "qrcode-terminal";
|
|
|
7904
7904
|
import os from "os";
|
|
7905
7905
|
import path from "path";
|
|
7906
7906
|
import { fileURLToPath } from "url";
|
|
7907
|
-
var VERSION = "0.
|
|
7907
|
+
var VERSION = "0.3.0";
|
|
7908
7908
|
var CONTAINER_NAME = "agent-wechat";
|
|
7909
7909
|
var GHCR_IMAGE = "ghcr.io/thisnick/agent-wechat";
|
|
7910
7910
|
var DEFAULT_PORT = 6174;
|
|
@@ -8000,11 +8000,11 @@ authCmd.command("logout").description("Log out of WeChat").action(async () => {
|
|
|
8000
8000
|
});
|
|
8001
8001
|
authCmd.command("status").description("Check login status").action(async () => {
|
|
8002
8002
|
const client = getClient();
|
|
8003
|
-
const
|
|
8004
|
-
if (
|
|
8005
|
-
console.log(`Logged in${loggedInUser ? ` as ${loggedInUser}` : ""}`);
|
|
8003
|
+
const auth = await client.authStatus();
|
|
8004
|
+
if (auth.status === "logged_in") {
|
|
8005
|
+
console.log(`Logged in${auth.loggedInUser ? ` as ${auth.loggedInUser}` : ""}`);
|
|
8006
8006
|
} else {
|
|
8007
|
-
console.log(
|
|
8007
|
+
console.log(`Status: ${auth.status.replace(/_/g, " ")}`);
|
|
8008
8008
|
}
|
|
8009
8009
|
});
|
|
8010
8010
|
authCmd.command("token").description("Show or regenerate the auth token").option("--regenerate", "Generate a new token").action(async (opts) => {
|