@wirecat/mail-cli 0.0.0-stage → 0.1.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/CHANGELOG.md +50 -0
- package/LICENSE +204 -0
- package/README.md +141 -2
- package/dist/bin/mail.d.ts +3 -0
- package/dist/bin/mail.d.ts.map +1 -0
- package/dist/bin/mail.js +36 -0
- package/dist/bin/mail.js.map +1 -0
- package/dist/bundle/all-profiles-TKMBELRZ.js +286 -0
- package/dist/bundle/anthropic-7LMUAEIZ.js +72 -0
- package/dist/bundle/app-server-JGMIJDD4.js +229 -0
- package/dist/bundle/bun-XRO6XJHQ.js +169 -0
- package/dist/bundle/bun-sqlite-Z54LEHVM.js +71 -0
- package/dist/bundle/chunk-2LLNPNMB.js +24 -0
- package/dist/bundle/chunk-3E3WA2L6.js +1932 -0
- package/dist/bundle/chunk-3KEVLSNN.js +138 -0
- package/dist/bundle/chunk-3KOA73LS.js +3416 -0
- package/dist/bundle/chunk-4E7BN3TC.js +122 -0
- package/dist/bundle/chunk-4FEMINO2.js +409 -0
- package/dist/bundle/chunk-5BVIWP3S.js +71 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5NYMNSSO.js +264 -0
- package/dist/bundle/chunk-5WGEUDE4.js +27 -0
- package/dist/bundle/chunk-6MAZWSC3.js +132 -0
- package/dist/bundle/chunk-75CWWETH.js +379 -0
- package/dist/bundle/chunk-7SXGLT6T.js +444 -0
- package/dist/bundle/chunk-BTQX2ZSZ.js +288 -0
- package/dist/bundle/chunk-CEW6KIFA.js +1193 -0
- package/dist/bundle/chunk-CH6RXYAX.js +82 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EOEDICIE.js +6848 -0
- package/dist/bundle/chunk-F6D6PJ34.js +100 -0
- package/dist/bundle/chunk-FDCGTODC.js +78 -0
- package/dist/bundle/chunk-FZ5FXIG6.js +18 -0
- package/dist/bundle/chunk-GAH7N7HO.js +8181 -0
- package/dist/bundle/chunk-GK4M2SUP.js +195 -0
- package/dist/bundle/chunk-GN62YOT5.js +161 -0
- package/dist/bundle/chunk-GQQJOH7A.js +7050 -0
- package/dist/bundle/chunk-GWDCKUBI.js +781 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-IK5TH3O7.js +217 -0
- package/dist/bundle/chunk-J3QXTBD2.js +2742 -0
- package/dist/bundle/chunk-J6MSJLIW.js +45 -0
- package/dist/bundle/chunk-JBBZCTTF.js +76 -0
- package/dist/bundle/chunk-JVMVLITS.js +260 -0
- package/dist/bundle/chunk-K4FVKPDQ.js +525 -0
- package/dist/bundle/chunk-KHTO2Q6E.js +886 -0
- package/dist/bundle/chunk-KM7Q67Z3.js +63 -0
- package/dist/bundle/chunk-LQ37ALDJ.js +2416 -0
- package/dist/bundle/chunk-MNOIRJEO.js +2315 -0
- package/dist/bundle/chunk-MS53RALV.js +168 -0
- package/dist/bundle/chunk-NK7EB63L.js +36225 -0
- package/dist/bundle/chunk-NPGVOZVK.js +2 -0
- package/dist/bundle/chunk-OTUOZ33L.js +82 -0
- package/dist/bundle/chunk-P7P5MNAU.js +46 -0
- package/dist/bundle/chunk-QLEUNU6G.js +537 -0
- package/dist/bundle/chunk-QQB7WT7R.js +216 -0
- package/dist/bundle/chunk-QX7RCLRS.js +23 -0
- package/dist/bundle/chunk-T6464KYA.js +35130 -0
- package/dist/bundle/chunk-TE5U5OAM.js +73 -0
- package/dist/bundle/chunk-TI6VBZKJ.js +166 -0
- package/dist/bundle/chunk-TQFCPUIM.js +53 -0
- package/dist/bundle/chunk-TVREDYX4.js +3574 -0
- package/dist/bundle/chunk-TWPDVUBR.js +106 -0
- package/dist/bundle/chunk-TWTATDM7.js +461 -0
- package/dist/bundle/chunk-UH4DDRHA.js +2989 -0
- package/dist/bundle/chunk-VEIZZRQ5.js +630 -0
- package/dist/bundle/chunk-WLFLBWNH.js +54 -0
- package/dist/bundle/chunk-WXAXYJJ7.js +486 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YO4CUH5E.js +33 -0
- package/dist/bundle/chunk-YPQQ5J4X.js +849 -0
- package/dist/bundle/chunk-Z34ICZA3.js +1028 -0
- package/dist/bundle/chunk-ZANYM66S.js +58 -0
- package/dist/bundle/chunk-ZD3WUGR2.js +142 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-WU434ZUL.js +34 -0
- package/dist/bundle/decode-YB3ZDTES.js +162 -0
- package/dist/bundle/dispatch-EUKKT3PD.js +411 -0
- package/dist/bundle/dist-A6GKSKFC.js +2072 -0
- package/dist/bundle/dist-X36THCOF.js +7577 -0
- package/dist/bundle/echarts-YNGCOYHW.js +42501 -0
- package/dist/bundle/embed-LWNHIRBQ.js +37 -0
- package/dist/bundle/embedder-2LYD3U37.js +110 -0
- package/dist/bundle/failure-OAIC5VAP.js +24 -0
- package/dist/bundle/first-run-N3HJKGU7.js +27 -0
- package/dist/bundle/first-screen-4U2DMV3G.js +32 -0
- package/dist/bundle/instructions-GJHHFV64.js +11 -0
- package/dist/bundle/mail.js +166 -0
- package/dist/bundle/mcp-L7SRVDRN.js +167 -0
- package/dist/bundle/node-GFOH6FKP.js +176 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-NBXQXBIU.js +63 -0
- package/dist/bundle/oauth-56EFO5AQ.js +19 -0
- package/dist/bundle/open-2V7QZQJP.js +21 -0
- package/dist/bundle/openai-V3SVACVL.js +251 -0
- package/dist/bundle/process-XVDX4SPD.js +91 -0
- package/dist/bundle/program-ILID6EAT.js +35542 -0
- package/dist/bundle/prompt-YKWAI222.js +14 -0
- package/dist/bundle/recognize-PAR66KVM.js +25 -0
- package/dist/bundle/remote-CE43TKXC.js +28 -0
- package/dist/bundle/rerank-M7S7P2TW.js +51 -0
- package/dist/bundle/serve-ENPMIV6J.js +197 -0
- package/dist/bundle/server-JRTHUCVY.js +63 -0
- package/dist/bundle/server-MBEZLVKZ.js +189 -0
- package/dist/bundle/sqlite-runtime-HVGDHBJJ.js +18 -0
- package/dist/bundle/state-QZSOSKBD.js +35 -0
- package/dist/bundle/store-2BUX6LVX.js +124 -0
- package/dist/bundle/store-UJ7SNKXI.js +141 -0
- package/dist/bundle/store-maintenance-command-I7V5C44K.js +52 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +47 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/context.d.ts +41 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +52 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/doctor.d.ts +77 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +74 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/folders.d.ts +3 -0
- package/dist/commands/folders.d.ts.map +1 -0
- package/dist/commands/folders.js +36 -0
- package/dist/commands/folders.js.map +1 -0
- package/dist/commands/login.d.ts +5 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +21 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/mailbox.d.ts +16 -0
- package/dist/commands/mailbox.d.ts.map +1 -0
- package/dist/commands/mailbox.js +54 -0
- package/dist/commands/mailbox.js.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +97 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +211 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/setup.d.ts +3 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +156 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +89 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +3 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +190 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/config.d.ts +190 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +46 -0
- package/dist/config.js.map +1 -0
- package/dist/discovery.d.ts +42 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +179 -0
- package/dist/discovery.js.map +1 -0
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +16 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/mail/imap-errors.d.ts +4 -0
- package/dist/mail/imap-errors.d.ts.map +1 -0
- package/dist/mail/imap-errors.js +41 -0
- package/dist/mail/imap-errors.js.map +1 -0
- package/dist/mail/imap-messages.d.ts +18 -0
- package/dist/mail/imap-messages.d.ts.map +1 -0
- package/dist/mail/imap-messages.js +66 -0
- package/dist/mail/imap-messages.js.map +1 -0
- package/dist/mail/imap.d.ts +67 -0
- package/dist/mail/imap.d.ts.map +1 -0
- package/dist/mail/imap.js +348 -0
- package/dist/mail/imap.js.map +1 -0
- package/dist/mail/parse.d.ts +18 -0
- package/dist/mail/parse.d.ts.map +1 -0
- package/dist/mail/parse.js +31 -0
- package/dist/mail/parse.js.map +1 -0
- package/dist/mail/port.d.ts +50 -0
- package/dist/mail/port.d.ts.map +1 -0
- package/dist/mail/port.js +4 -0
- package/dist/mail/port.js.map +1 -0
- package/dist/mcp.d.ts +29 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +98 -0
- package/dist/mcp.js.map +1 -0
- package/dist/profile.d.ts +16 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +31 -0
- package/dist/profile.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +52 -0
- package/dist/program.js.map +1 -0
- package/dist/providers.d.ts +53 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +106 -0
- package/dist/providers.js.map +1 -0
- package/dist/secret.d.ts +30 -0
- package/dist/secret.d.ts.map +1 -0
- package/dist/secret.js +68 -0
- package/dist/secret.js.map +1 -0
- package/dist/store.d.ts +12 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +25 -0
- package/dist/store.js.map +1 -0
- package/dist/sync.d.ts +26 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +75 -0
- package/dist/sync.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +83 -4
- package/skills/mail-cli/SKILL.md +27 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CliError
|
|
5
|
+
} from "./chunk-5BVIWP3S.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
11
|
+
var PRAGMAS = `
|
|
12
|
+
PRAGMA busy_timeout = 5000;
|
|
13
|
+
PRAGMA journal_mode = WAL;
|
|
14
|
+
PRAGMA foreign_keys = ON;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
18
|
+
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
19
|
+
var quieted = /* @__PURE__ */ new WeakSet();
|
|
20
|
+
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
21
|
+
if (quieted.has(host))
|
|
22
|
+
return;
|
|
23
|
+
quieted.add(host);
|
|
24
|
+
const emit = host.emitWarning;
|
|
25
|
+
host.emitWarning = function(warning, ...rest) {
|
|
26
|
+
if (isSqliteWarning(warning, rest[0]))
|
|
27
|
+
return;
|
|
28
|
+
return Reflect.apply(emit, this, [warning, ...rest]);
|
|
29
|
+
};
|
|
30
|
+
}, "quietSqliteWarning");
|
|
31
|
+
var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
32
|
+
const type = typeof options === "string" ? options : options?.type;
|
|
33
|
+
const name = typeof warning === "string" ? type : warning.name;
|
|
34
|
+
const message = typeof warning === "string" ? warning : warning.message;
|
|
35
|
+
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
36
|
+
}, "isSqliteWarning");
|
|
37
|
+
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
39
|
+
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
40
|
+
const database = await openFile(path);
|
|
41
|
+
try {
|
|
42
|
+
database.exec(PRAGMAS);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
database.close();
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
return database;
|
|
48
|
+
}, "openCache");
|
|
49
|
+
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
50
|
+
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
51
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-Z54LEHVM.js");
|
|
52
|
+
return await openWithBunSqlite(path);
|
|
53
|
+
}, "openUnderBun");
|
|
54
|
+
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
55
|
+
quietSqliteWarning();
|
|
56
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-NBXQXBIU.js");
|
|
57
|
+
return openWithNodeSqlite(path);
|
|
58
|
+
}, "openUnderNode");
|
|
59
|
+
var runtime = /* @__PURE__ */ __name(() => {
|
|
60
|
+
const bun = globalThis.Bun;
|
|
61
|
+
return bun ? `Bun ${bun.version}` : `Node ${process.versions.node}`;
|
|
62
|
+
}, "runtime");
|
|
63
|
+
var CAPABILITY_STATEMENTS = [
|
|
64
|
+
`CREATE VIRTUAL TABLE temp.capability_words USING fts5(a, content = '', contentless_delete = 1,
|
|
65
|
+
tokenize = 'unicode61 remove_diacritics 2')`,
|
|
66
|
+
"CREATE VIRTUAL TABLE temp.capability_text USING fts5(a, tokenize = 'trigram')",
|
|
67
|
+
"DROP TABLE temp.capability_words",
|
|
68
|
+
"DROP TABLE temp.capability_text"
|
|
69
|
+
];
|
|
70
|
+
var assertStoreCapable = /* @__PURE__ */ __name((database, on = runtime()) => {
|
|
71
|
+
try {
|
|
72
|
+
for (const statement of CAPABILITY_STATEMENTS)
|
|
73
|
+
database.exec(statement);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
const version = String(database.prepare("SELECT sqlite_version() AS version").get()?.version);
|
|
76
|
+
const remedy = on.startsWith("Bun") ? "Run it under Node 22.16 or newer instead" : "Update Node to 22.16 or newer, or run it under Bun";
|
|
77
|
+
throw new CliError("configuration_error", `the message store needs full-text search that this SQLite (${version}, ${on}) does not have. ${remedy}.`, { sqlite: version, runtime: on, cause: error instanceof Error ? error.message : String(error) });
|
|
78
|
+
}
|
|
79
|
+
}, "assertStoreCapable");
|
|
80
|
+
var capable;
|
|
81
|
+
var storeCapable = /* @__PURE__ */ __name(() => {
|
|
82
|
+
capable ??= openCache(":memory:").then((database) => {
|
|
83
|
+
try {
|
|
84
|
+
assertStoreCapable(database);
|
|
85
|
+
} finally {
|
|
86
|
+
database.close();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return capable;
|
|
90
|
+
}, "storeCapable");
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
PRAGMAS,
|
|
94
|
+
quietSqliteWarning,
|
|
95
|
+
openCache,
|
|
96
|
+
openFile,
|
|
97
|
+
CAPABILITY_STATEMENTS,
|
|
98
|
+
assertStoreCapable,
|
|
99
|
+
storeCapable
|
|
100
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
|
+
import { createServer } from "node:http";
|
|
9
|
+
import { Readable } from "node:stream";
|
|
10
|
+
var MAX_BODY = 4 * 1024 * 1024;
|
|
11
|
+
var TooLarge = class extends Error {
|
|
12
|
+
static {
|
|
13
|
+
__name(this, "TooLarge");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var readBody = /* @__PURE__ */ __name((incoming, limit) => new Promise((resolve, reject) => {
|
|
17
|
+
if (Number(incoming.headers["content-length"] ?? 0) > limit)
|
|
18
|
+
return reject(new TooLarge());
|
|
19
|
+
const chunks = [];
|
|
20
|
+
let size = 0;
|
|
21
|
+
incoming.on("data", (chunk) => {
|
|
22
|
+
size += chunk.length;
|
|
23
|
+
if (size > limit) {
|
|
24
|
+
incoming.destroy();
|
|
25
|
+
reject(new TooLarge());
|
|
26
|
+
} else
|
|
27
|
+
chunks.push(chunk);
|
|
28
|
+
});
|
|
29
|
+
incoming.once("end", () => resolve(Buffer.concat(chunks)));
|
|
30
|
+
incoming.once("error", reject);
|
|
31
|
+
}), "readBody");
|
|
32
|
+
var toRequest = /* @__PURE__ */ __name(async (incoming, origin, maxBody) => {
|
|
33
|
+
const headers = new Headers();
|
|
34
|
+
for (const [name, value] of Object.entries(incoming.headers)) {
|
|
35
|
+
if (Array.isArray(value))
|
|
36
|
+
for (const one of value)
|
|
37
|
+
headers.append(name, one);
|
|
38
|
+
else if (value !== void 0)
|
|
39
|
+
headers.set(name, value);
|
|
40
|
+
}
|
|
41
|
+
const method = incoming.method ?? "GET";
|
|
42
|
+
const body = method === "GET" || method === "HEAD" ? void 0 : await readBody(incoming, maxBody);
|
|
43
|
+
if (body)
|
|
44
|
+
headers.set("content-length", String(body.length));
|
|
45
|
+
return new Request(new URL(incoming.url ?? "/", origin), { method, headers, ...body ? { body } : {} });
|
|
46
|
+
}, "toRequest");
|
|
47
|
+
var send = /* @__PURE__ */ __name(async (response, outgoing) => {
|
|
48
|
+
outgoing.writeHead(response.status, Object.fromEntries(response.headers));
|
|
49
|
+
if (!response.body)
|
|
50
|
+
return void outgoing.end();
|
|
51
|
+
const body = Readable.fromWeb(response.body);
|
|
52
|
+
outgoing.once("close", () => body.destroy());
|
|
53
|
+
body.pipe(outgoing);
|
|
54
|
+
}, "send");
|
|
55
|
+
var listen = /* @__PURE__ */ __name((handle, { host, port, maxBody = MAX_BODY }) => new Promise((resolve, reject) => {
|
|
56
|
+
const server = createServer((incoming, outgoing) => {
|
|
57
|
+
toRequest(incoming, `http://${host}`, maxBody).then(handle).then((response) => send(response, outgoing)).catch((error) => {
|
|
58
|
+
if (!outgoing.headersSent)
|
|
59
|
+
outgoing.writeHead(error instanceof TooLarge ? 413 : 500, { connection: "close" });
|
|
60
|
+
outgoing.end();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
server.once("error", reject);
|
|
64
|
+
server.listen(port, host, () => {
|
|
65
|
+
const { port: bound } = server.address();
|
|
66
|
+
resolve({
|
|
67
|
+
url: new URL(`http://${host}:${bound}`),
|
|
68
|
+
close: /* @__PURE__ */ __name(() => new Promise((done) => {
|
|
69
|
+
server.close(() => done());
|
|
70
|
+
server.closeAllConnections();
|
|
71
|
+
}), "close")
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}), "listen");
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
listen
|
|
78
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
resolvePaths
|
|
5
|
+
} from "./chunk-J3QXTBD2.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
13
|
+
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
wirecatDirectory,
|
|
17
|
+
storePath
|
|
18
|
+
};
|