@emailthing/cli 0.0.0-alpha.1 → 0.0.0-alpha.2
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/agent.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CONFIG_DIR,
|
|
4
|
+
DB_PATH,
|
|
5
|
+
clearAuth,
|
|
6
|
+
ensureConfigDir,
|
|
7
|
+
getDB,
|
|
8
|
+
loadAuth,
|
|
9
|
+
resetDB,
|
|
10
|
+
saveAuth
|
|
11
|
+
} from "./index-9968g90t.js";
|
|
12
|
+
import"./index-3t2e65zf.js";
|
|
13
|
+
export {
|
|
14
|
+
saveAuth,
|
|
15
|
+
resetDB,
|
|
16
|
+
loadAuth,
|
|
17
|
+
getDB,
|
|
18
|
+
ensureConfigDir,
|
|
19
|
+
clearAuth,
|
|
20
|
+
DB_PATH,
|
|
21
|
+
CONFIG_DIR
|
|
22
|
+
};
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var { getPrototypeOf: __getProtoOf, defineProperty: __defProp, getOwnPropertyNames: __getOwnPropNames } = Object;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
6
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
7
|
-
let to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target;
|
|
8
|
-
for (let key of __getOwnPropNames(mod))
|
|
9
|
-
if (!__hasOwnProp.call(to, key))
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => mod[key],
|
|
12
|
-
enumerable: !0
|
|
13
|
-
});
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
2
|
var __require = import.meta.require, __using = (stack, value, async) => {
|
|
17
3
|
if (value != null) {
|
|
18
4
|
if (typeof value !== "object" && typeof value !== "function")
|
|
@@ -44,4 +30,4 @@ var __require = import.meta.require, __using = (stack, value, async) => {
|
|
|
44
30
|
return next();
|
|
45
31
|
};
|
|
46
32
|
|
|
47
|
-
export {
|
|
33
|
+
export { __require, __using, __callDispose };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./index-afyvwmt5.js";
|
|
3
|
-
|
|
4
2
|
// src/utils/config.ts
|
|
5
3
|
import { join } from "path";
|
|
6
4
|
import { homedir } from "os";
|
|
@@ -140,15 +138,5 @@ function clearAuth(db) {
|
|
|
140
138
|
function resetDB(db) {
|
|
141
139
|
db.run("DELETE FROM auth"), db.run("DELETE FROM emails"), db.run("DELETE FROM mailboxes"), db.run("DELETE FROM categories"), db.run("DELETE FROM drafts"), db.run("DELETE FROM mailbox_aliases"), db.run("DELETE FROM sync_state");
|
|
142
140
|
}
|
|
143
|
-
export {
|
|
144
|
-
saveAuth,
|
|
145
|
-
resetDB,
|
|
146
|
-
loadAuth,
|
|
147
|
-
getDB,
|
|
148
|
-
ensureConfigDir,
|
|
149
|
-
clearAuth,
|
|
150
|
-
DB_PATH,
|
|
151
|
-
CONFIG_DIR
|
|
152
|
-
};
|
|
153
141
|
|
|
154
|
-
export { getDB, loadAuth, saveAuth };
|
|
142
|
+
export { CONFIG_DIR, DB_PATH, ensureConfigDir, getDB, loadAuth, saveAuth, clearAuth, resetDB };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
3
|
import {
|
|
4
|
-
__require
|
|
5
|
-
|
|
6
|
-
} from "./index-afyvwmt5.js";
|
|
4
|
+
__require
|
|
5
|
+
} from "./index-3t2e65zf.js";
|
|
7
6
|
|
|
8
7
|
// src/index.ts
|
|
9
8
|
if (process.argv.includes("logout")) {
|
|
10
|
-
let { getDB, clearAuth, resetDB } = await import("./config-
|
|
9
|
+
let { getDB, clearAuth, resetDB } = await import("./config-te78n8sf.js"), db = getDB();
|
|
11
10
|
clearAuth(db), resetDB(db), console.log("Logged out successfully. Run again to login."), db.close();
|
|
12
11
|
} else if (process.argv.includes("agent") || (process.env.CLAUDECODE || process.env.OPENCODE || process.env.AGENT) === "1")
|
|
13
12
|
await import("./agent.js");
|
package/dist/main.js
CHANGED
|
@@ -8,13 +8,12 @@ import {
|
|
|
8
8
|
getDB,
|
|
9
9
|
loadAuth,
|
|
10
10
|
saveAuth
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./index-9968g90t.js";
|
|
12
12
|
import {
|
|
13
13
|
__callDispose,
|
|
14
14
|
__require,
|
|
15
|
-
__toESM,
|
|
16
15
|
__using
|
|
17
|
-
} from "./index-
|
|
16
|
+
} from "./index-3t2e65zf.js";
|
|
18
17
|
|
|
19
18
|
// src/utils/colors.ts
|
|
20
19
|
var colors = {
|
|
@@ -1018,7 +1017,7 @@ async function main() {
|
|
|
1018
1017
|
case "switch": {
|
|
1019
1018
|
let newMailboxId = await mailboxSwitcher(db, route.mailboxId);
|
|
1020
1019
|
if (newMailboxId === "switch-user") {
|
|
1021
|
-
let { clearAuth, resetDB } = await import("./config-
|
|
1020
|
+
let { clearAuth, resetDB } = await import("./config-te78n8sf.js");
|
|
1022
1021
|
return clearAuth(db), resetDB(db), main();
|
|
1023
1022
|
} else if (newMailboxId)
|
|
1024
1023
|
route = { route: "list", mailboxId: newMailboxId };
|