@emailthing/cli 0.0.0-alpha.4 → 0.0.0-alpha.5
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/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
} from "./index-3t2e65zf.js";
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
|
-
if (
|
|
8
|
+
if (!Bun.semver.satisfies(Bun.version, ">=1.3.9")) {
|
|
9
|
+
if (console.error(`EmailThing CLI requires Bun v1.3.9 or higher. You are running ${Bun.version}. Please update Bun to continue.`), process.stdin.isTTY && confirm("Upgrade bun?"))
|
|
10
|
+
Bun.spawnSync([process.execPath, "upgrade"], { stdout: "inherit", stderr: "inherit", stdin: "inherit" });
|
|
11
|
+
process.exit(1);
|
|
12
|
+
} else if (process.argv.includes("logout")) {
|
|
9
13
|
let { getDB, clearAuth, resetDB } = await import("./config-4f9b0snt.js"), db = getDB();
|
|
10
14
|
clearAuth(db), resetDB(db), console.log("Logged out successfully. Run again to login."), db.close();
|
|
11
15
|
} else if (process.argv.includes("agent") || (process.env.CLAUDECODE || process.env.OPENCODE || process.env.AGENT) === "1")
|