@wirecat/mail-cli 0.35.0 → 0.37.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 +55 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/agent-OU4K7TKQ.js +40 -0
- package/dist/bundle/{all-profiles-6BDSMVOO.js → all-profiles-ICGWDPUU.js} +11 -11
- package/dist/bundle/{anthropic-C3XUXUCJ.js → anthropic-TL4WFWGU.js} +5 -5
- package/dist/bundle/{app-server-GUHDK4OR.js → app-server-YAR5EFOO.js} +69 -67
- package/dist/bundle/{bun-FN7AM4AG.js → bun-OPDGMZZQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-56IVBF22.js → bun-sqlite-WI3ZPANS.js} +6 -6
- package/dist/bundle/{chunk-L4RCWRWS.js → chunk-2JHVQMVC.js} +1 -1
- package/dist/bundle/{chunk-RJNKM3CQ.js → chunk-2XBDILVW.js} +1 -1
- package/dist/bundle/{chunk-7FXZKQAC.js → chunk-2YO3PLOE.js} +19 -19
- package/dist/bundle/{chunk-YCIWSKOH.js → chunk-3DHJF57U.js} +9 -9
- package/dist/bundle/{chunk-5XQI7WCJ.js → chunk-3HC5F3P7.js} +1 -1
- package/dist/bundle/{chunk-6Q5THDNW.js → chunk-3SKTQ2HC.js} +2 -2
- package/dist/bundle/{chunk-ZMYRPMAJ.js → chunk-3YM4B2GT.js} +1 -1
- package/dist/bundle/{chunk-7YMLEWTX.js → chunk-3ZOOTTFW.js} +6 -6
- package/dist/bundle/{chunk-CMGZXBJW.js → chunk-4FTIHADB.js} +6 -6
- package/dist/bundle/{chunk-3EV2B7KZ.js → chunk-4IZ6R5FS.js} +19 -15
- package/dist/bundle/{chunk-W7ICCFG5.js → chunk-4N7PP76S.js} +1 -1
- package/dist/bundle/{chunk-PQDQCCGG.js → chunk-7HRKUKKY.js} +23 -23
- package/dist/bundle/{chunk-GG634DR3.js → chunk-7PDGZFXD.js} +5 -5
- package/dist/bundle/{chunk-OOQFBRNR.js → chunk-7YKWFERX.js} +6 -6
- package/dist/bundle/{chunk-E6HSSKRX.js → chunk-BNURKCQG.js} +2 -3
- package/dist/bundle/{chunk-I3QZCQJT.js → chunk-BNVISIHP.js} +6 -6
- package/dist/bundle/{chunk-4U5ODZO7.js → chunk-BQMJYSA4.js} +11 -11
- package/dist/bundle/{chunk-TARNPINT.js → chunk-BYITYTRL.js} +16 -3
- package/dist/bundle/{chunk-GU3PYIV2.js → chunk-CICUPYHT.js} +2 -2
- package/dist/bundle/{chunk-6B4WZVLN.js → chunk-CQHLWMKK.js} +33 -28
- package/dist/bundle/{chunk-HKWZG7CZ.js → chunk-CUW7Y2HJ.js} +6 -6
- package/dist/bundle/{chunk-WDEVKKAD.js → chunk-DJZIFZOT.js} +3 -3
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-DNCLQPOM.js} +1 -1
- package/dist/bundle/{chunk-7JVKQ6NM.js → chunk-DPV53EZC.js} +4 -4
- package/dist/bundle/{chunk-ILEKGH44.js → chunk-DTR7JO2M.js} +35 -35
- package/dist/bundle/{chunk-TP766H4O.js → chunk-ES2FF42M.js} +14 -14
- package/dist/bundle/{chunk-635AFLZO.js → chunk-EV72K4IU.js} +4 -4
- package/dist/bundle/{chunk-XQNKAM26.js → chunk-EZQ5BYNL.js} +6 -6
- package/dist/bundle/{chunk-AISQNKT7.js → chunk-F2D3J5DR.js} +8 -8
- package/dist/bundle/{chunk-OO4OKMNB.js → chunk-FTT7UDYV.js} +3 -3
- package/dist/bundle/{chunk-DD2P67NP.js → chunk-FXNCKPQ7.js} +3 -3
- package/dist/bundle/{chunk-6VARUB3J.js → chunk-G4VJN75G.js} +37 -18
- package/dist/bundle/{chunk-2UNQTKRH.js → chunk-GGMAIIVE.js} +1 -1
- package/dist/bundle/{chunk-3WAZKCDF.js → chunk-GPUC3FTU.js} +2 -2
- package/dist/bundle/{chunk-ZX7HZDD6.js → chunk-GQIMVR7C.js} +180 -38
- package/dist/bundle/{chunk-4IASS7NQ.js → chunk-HCRUGAIN.js} +252 -60
- package/dist/bundle/{chunk-YQTRKNZQ.js → chunk-HES6YMYN.js} +4 -4
- package/dist/bundle/{chunk-2B67TUIF.js → chunk-HFY7536N.js} +201 -111
- package/dist/bundle/{chunk-5WYBI35N.js → chunk-IA7LLLEI.js} +3 -3
- package/dist/bundle/{chunk-HF5QWKK2.js → chunk-IUJDWEGJ.js} +7 -7
- package/dist/bundle/{chunk-UHGKN5US.js → chunk-IWFWWO37.js} +8 -8
- package/dist/bundle/{chunk-7PXAUMK5.js → chunk-JG6LCSEX.js} +13 -13
- package/dist/bundle/{chunk-UWDRU3R6.js → chunk-JLXXUEAM.js} +2 -2
- package/dist/bundle/{chunk-G662S2M4.js → chunk-JNP3XGJI.js} +16 -16
- package/dist/bundle/{chunk-DREU6TN6.js → chunk-JZUYZ2XJ.js} +38 -24
- package/dist/bundle/chunk-K4DEQAEW.js +1291 -0
- package/dist/bundle/{chunk-7KMI47AP.js → chunk-KCM3WSER.js} +6 -6
- package/dist/bundle/{chunk-YA44BG3N.js → chunk-KP5JDYY6.js} +42 -10
- package/dist/bundle/{chunk-QFMKCU42.js → chunk-KUX54EGR.js} +1982 -802
- package/dist/bundle/chunk-KXJ3JEDH.js +2 -0
- package/dist/bundle/{chunk-HJDIMVFW.js → chunk-KZD3H5QA.js} +2 -2
- package/dist/bundle/{chunk-XKKYRMGG.js → chunk-LKH3UKLO.js} +4 -4
- package/dist/bundle/{chunk-QYCMB7JY.js → chunk-NAOLBEFX.js} +226 -164
- package/dist/bundle/{chunk-46SBNO67.js → chunk-NB52JKLR.js} +13 -9
- package/dist/bundle/{chunk-3KAJCOJP.js → chunk-NB7EOAUZ.js} +15 -1
- package/dist/bundle/{chunk-DFHUJTP5.js → chunk-NISH4UXM.js} +2 -2
- package/dist/bundle/{chunk-EU4J6GCJ.js → chunk-NQSKI7XK.js} +4 -4
- package/dist/bundle/{chunk-YRAJFTFU.js → chunk-OWPRJLHV.js} +8 -8
- package/dist/bundle/{chunk-V4O47JV6.js → chunk-OZKZT3ZI.js} +10 -3
- package/dist/bundle/{chunk-CDGVYQXG.js → chunk-Q7ICVP25.js} +1 -1
- package/dist/bundle/{chunk-Q5U2HIBJ.js → chunk-QLJGYDWG.js} +7 -7
- package/dist/bundle/{chunk-W4JYGMTU.js → chunk-R44KVISE.js} +12 -12
- package/dist/bundle/{chunk-MCJYJIH5.js → chunk-R73VWPNL.js} +8 -8
- package/dist/bundle/{chunk-YTI533XF.js → chunk-RRTMPSQR.js} +2 -2
- package/dist/bundle/{chunk-HM6AMYHR.js → chunk-S6JG4YUH.js} +2 -2
- package/dist/bundle/{chunk-AXKIXVQA.js → chunk-TMJLGR4A.js} +61 -61
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-TXDR6YSF.js} +1 -1
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-TY7NDMFY.js} +1 -1
- package/dist/bundle/{chunk-ODQCRZX5.js → chunk-UDSL3MUU.js} +8 -8
- package/dist/bundle/{chunk-ZYEU35MB.js → chunk-UTS5NMR3.js} +2 -2
- package/dist/bundle/{chunk-RBV2AM52.js → chunk-VB7FZOYX.js} +1 -1
- package/dist/bundle/{chunk-RQHWSNX4.js → chunk-VK24UQSD.js} +4 -4
- package/dist/bundle/{chunk-TP2BCK2Z.js → chunk-VYCB5EVI.js} +8 -8
- package/dist/bundle/{chunk-EHAXFDDP.js → chunk-VZ5PPYDG.js} +3 -4
- package/dist/bundle/chunk-WOPVBRPV.js +29 -0
- package/dist/bundle/{chunk-3ACF6TIV.js → chunk-XEQQJBBO.js} +1 -1
- package/dist/bundle/{chunk-J5ULUTWE.js → chunk-XWBTD2WP.js} +4 -4
- package/dist/bundle/chunk-XXPJF2VD.js +2 -0
- package/dist/bundle/{chunk-OTP2HJ67.js → chunk-YODGIMMM.js} +9 -9
- package/dist/bundle/{chunk-NEDS4ORI.js → chunk-YWDFYQOU.js} +2 -2
- package/dist/bundle/{chunk-EX4Z7CCO.js → chunk-Z4BLNAWI.js} +15062 -11852
- package/dist/bundle/{chunk-WZKM5I7B.js → chunk-ZSAPOC7B.js} +27 -176
- package/dist/bundle/{chunk-RQJGX7F7.js → chunk-ZTWTEXB2.js} +3 -3
- package/dist/bundle/command-contract-UC6IGCCM.js +39 -0
- package/dist/bundle/{command-server-entry-TPJ47FYS.js → command-server-entry-RA3ZX2KV.js} +28 -28
- package/dist/bundle/{decode-XHUASXQK.js → decode-QVKRSRVF.js} +5 -5
- package/dist/bundle/{dispatch-MQZHGGVP.js → dispatch-USKS7J74.js} +8 -8
- package/dist/bundle/{dist-BAE4IQ52.js → dist-ITIXJAXK.js} +20 -18
- package/dist/bundle/{echarts-U7Z2PKIG.js → echarts-O3TNDAXJ.js} +2 -2
- package/dist/bundle/{embed-W7GPB6EI.js → embed-2HOODFQT.js} +6 -6
- package/dist/bundle/{embedder-T72XLFQ5.js → embedder-22AJGCZX.js} +9 -9
- package/dist/bundle/{failure-MP6VKL5Y.js → failure-D4FGOIWF.js} +2 -2
- package/dist/bundle/{first-run-C44TJXRI.js → first-run-FU4MFXOA.js} +12 -12
- package/dist/bundle/first-screen-A7SEI2ON.js +40 -0
- package/dist/bundle/{instructions-WGMWQNPP.js → instructions-AMH5RWVJ.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-5HFPWC3W.js} +2 -2
- package/dist/bundle/meeting-combined-KC6YGWA7.js +24 -0
- package/dist/bundle/{meeting-model-QVHLD4WI.js → meeting-model-QWGAOQHL.js} +11 -11
- package/dist/bundle/{meeting-semantic-QKQHUHXX.js → meeting-semantic-7PVO6RNB.js} +6 -6
- package/dist/bundle/{node-WANDMJJQ.js → node-EGMCBAO7.js} +2 -2
- package/dist/bundle/{node-sqlite-NM5XA4DR.js → node-sqlite-JXUELLMP.js} +7 -7
- package/dist/bundle/{oauth-6E63ELEE.js → oauth-OYAYWH4K.js} +7 -7
- package/dist/bundle/{open-5542RTLE.js → open-GLEUJGNA.js} +5 -5
- package/dist/bundle/{openai-NOYNPFB5.js → openai-PYTVNB6L.js} +15 -15
- package/dist/bundle/{process-7AEXXSBX.js → process-SGHEN6MQ.js} +1 -1
- package/dist/bundle/{program-VMA5CGNR.js → program-7CFNZ2DF.js} +2227 -2291
- package/dist/bundle/{prompt-WYYO4AJL.js → prompt-CYTILD7N.js} +5 -5
- package/dist/bundle/public-XWMXEGEF.js +196 -0
- package/dist/bundle/{recognize-UGCCOMAS.js → recognize-26UNETSQ.js} +4 -4
- package/dist/bundle/{remote-VZS6BNQB.js → remote-PKXBQA5N.js} +9 -9
- package/dist/bundle/{rerank-O46D5GJ2.js → rerank-LLKP7M6Q.js} +7 -7
- package/dist/bundle/{serve-QAAF2LCW.js → serve-ZRJEAPJI.js} +9 -9
- package/dist/bundle/{server-Q3PUZLLX.js → server-4OQ4G5JY.js} +61 -59
- package/dist/bundle/server-VVRQ4A34.js +86 -0
- package/dist/bundle/{sqlite-runtime-EQBCDO2U.js → sqlite-runtime-667VV4VY.js} +6 -6
- package/dist/bundle/{state-XIOHYXCR.js → state-V3CAAJBE.js} +6 -6
- package/dist/bundle/{store-VJBL5XKR.js → store-BJCIMIAH.js} +31 -24
- package/dist/bundle/{store-OXJZZUR7.js → store-GLBBY4OZ.js} +22 -22
- package/dist/bundle/store-maintenance-command-N7L5OVUE.js +73 -0
- package/dist/bundle/surface-26EUQNDT.js +72 -0
- package/dist/commands/import.js +2 -2
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/messages.js +3 -3
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/read.js +2 -2
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +1 -0
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/session-start.js +1 -1
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +2 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/sync.js +1 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tags.d.ts.map +1 -1
- package/dist/commands/tags.js.map +1 -1
- package/dist/commands/words.js +1 -1
- package/dist/commands/words.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/mail/imap/account.d.ts.map +1 -1
- package/dist/mail/imap/account.js +2 -1
- package/dist/mail/imap/account.js.map +1 -1
- package/dist/mail/send.d.ts +2 -0
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +1 -1
- package/dist/mail/send.js.map +1 -1
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +2 -1
- package/dist/oauth.js.map +1 -1
- package/dist/profile.js +1 -1
- package/dist/profile.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +4 -4
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -1
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/agent-KWLCQCSC.js +0 -39
- package/dist/bundle/chunk-DZHEVVXA.js +0 -1264
- package/dist/bundle/command-contract-D5UXWHMS.js +0 -39
- package/dist/bundle/first-screen-IESI7DAU.js +0 -39
- package/dist/bundle/meeting-combined-XGZBSWIQ.js +0 -24
- package/dist/bundle/server-456MYK3X.js +0 -84
- package/dist/bundle/store-maintenance-command-D7XYIX52.js +0 -71
- package/dist/bundle/surface-N7LK7PKN.js +0 -70
|
@@ -3,16 +3,16 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
formatMeetingReference,
|
|
5
5
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TMJLGR4A.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError,
|
|
9
9
|
singleLine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S6JG4YUH.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
16
16
|
var SCHEME = "msg:";
|
|
17
17
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
18
18
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -33,7 +33,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
33
33
|
return { provider, account, chat, message };
|
|
34
34
|
}, "parseLocator");
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
37
37
|
var SIMPLE_REFERENCES = [
|
|
38
38
|
"note",
|
|
39
39
|
"document",
|
|
@@ -196,8 +196,8 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
196
196
|
return match !== null && byPrefix.has(match[1]);
|
|
197
197
|
}, "looksLikeReference");
|
|
198
198
|
|
|
199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
200
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
199
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
200
|
+
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm", "tracker"];
|
|
201
201
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
202
202
|
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
203
203
|
var PROVIDERS = [
|
|
@@ -216,6 +216,16 @@ var PROVIDERS = [
|
|
|
216
216
|
// Google Meet has no tool of its own: its meetings are gcal's, since every meeting is on the calendar.
|
|
217
217
|
{ name: "google-meet", kind: "meetings", aliases: [], command: "gcal" },
|
|
218
218
|
{ name: "google-drive", kind: "documents", aliases: [] },
|
|
219
|
+
// Seeded: linear-cli registers no entry, and without one its accounts would count as a messenger's. One sign-in holds
|
|
220
|
+
// the issues and the documents, so the account is a tracker's and a documents account at once.
|
|
221
|
+
{
|
|
222
|
+
name: "linear",
|
|
223
|
+
kind: "tracker",
|
|
224
|
+
kinds: ["tracker", "documents"],
|
|
225
|
+
aliases: [],
|
|
226
|
+
command: "linear",
|
|
227
|
+
globalItemIds: true
|
|
228
|
+
},
|
|
219
229
|
// Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
|
|
220
230
|
{ name: "telemost", kind: "meetings", aliases: [] },
|
|
221
231
|
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
@@ -234,14 +244,15 @@ var LABELS = {
|
|
|
234
244
|
"google-meet": "Google Meet",
|
|
235
245
|
added: "added by hand",
|
|
236
246
|
email: "mail",
|
|
237
|
-
telemost: "Telemost"
|
|
247
|
+
telemost: "Telemost",
|
|
248
|
+
linear: "Linear"
|
|
238
249
|
};
|
|
239
250
|
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
240
251
|
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
241
252
|
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
242
253
|
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
243
254
|
var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
|
|
244
|
-
var documentAccountProviders = /* @__PURE__ */ __name(() => registry.filter((entry) => entry.
|
|
255
|
+
var documentAccountProviders = /* @__PURE__ */ __name(() => registry.filter((entry) => kindsOfEntry(entry).includes("documents") && entry.imported !== true).map(({ name }) => name), "documentAccountProviders");
|
|
245
256
|
var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => typeof provider === "string" && documentAccountProviders().includes(provider), "isDocumentAccountProvider");
|
|
246
257
|
var documentAccountProvidersSql = /* @__PURE__ */ __name(() => documentAccountProviders().map((name) => `'${name}'`).join(", ") || "NULL", "documentAccountProvidersSql");
|
|
247
258
|
var ADDED_PROVIDER = "added";
|
|
@@ -269,7 +280,7 @@ var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
|
269
280
|
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
270
281
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
271
282
|
return invalid("a provider entry is an object");
|
|
272
|
-
const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
|
|
283
|
+
const { name, kind: kind2, kinds, aliases = [], command, opens, imported, globalItemIds } = value;
|
|
273
284
|
const named = wordOf(name, "a provider's name");
|
|
274
285
|
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
275
286
|
const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
@@ -283,6 +294,8 @@ var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
|
283
294
|
invalid(`provider ${named}'s aliases are a list`);
|
|
284
295
|
if (imported !== void 0 && typeof imported !== "boolean")
|
|
285
296
|
invalid(`provider ${named}'s imported is true or false`);
|
|
297
|
+
if (globalItemIds !== void 0 && typeof globalItemIds !== "boolean")
|
|
298
|
+
invalid(`provider ${named}'s globalItemIds is true or false`);
|
|
286
299
|
return {
|
|
287
300
|
name: named,
|
|
288
301
|
kind: list[0],
|
|
@@ -290,7 +303,8 @@ var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
|
290
303
|
...imported === true ? { imported: true } : {},
|
|
291
304
|
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
292
305
|
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
293
|
-
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
306
|
+
...opens === void 0 ? {} : { opens: opensOf(opens, named) },
|
|
307
|
+
...globalItemIds === true ? { globalItemIds: true } : {}
|
|
294
308
|
};
|
|
295
309
|
}, "providerEntryOf");
|
|
296
310
|
var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
|
|
@@ -311,7 +325,8 @@ var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
|
311
325
|
...kinds.length > 1 ? { kinds } : {},
|
|
312
326
|
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
313
327
|
...entry.command ? { command: entry.command } : {},
|
|
314
|
-
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
328
|
+
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {},
|
|
329
|
+
...entry.globalItemIds ? { globalItemIds: true } : {}
|
|
315
330
|
} : entry;
|
|
316
331
|
const others = known.filter((one) => one !== same);
|
|
317
332
|
for (const word of wordsOf(merged)) {
|
|
@@ -370,12 +385,14 @@ var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
|
370
385
|
invalid(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
|
|
371
386
|
return held.imported === true;
|
|
372
387
|
}, "importedOf");
|
|
388
|
+
var hasGlobalItemIds = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.globalItemIds === true, "hasGlobalItemIds");
|
|
373
389
|
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
390
|
+
var alsoListedByKey = /* @__PURE__ */ __name((provider) => isDocumentAccountProvider(provider) && kindsIn(provider).some((kind2) => kind2 !== "documents"), "alsoListedByKey");
|
|
374
391
|
var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
|
|
375
392
|
var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
|
|
376
393
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
377
394
|
|
|
378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
395
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
379
396
|
var CURRENCY_SCALES = {
|
|
380
397
|
AED: 2,
|
|
381
398
|
AMD: 2,
|
|
@@ -469,7 +486,7 @@ var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
|
469
486
|
}, "quantityOf");
|
|
470
487
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
471
488
|
|
|
472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
489
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
473
490
|
var DEAL_KINDS = ["deal", "lead"];
|
|
474
491
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
475
492
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -479,7 +496,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
479
496
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
480
497
|
}, "dealLine");
|
|
481
498
|
|
|
482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
499
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
483
500
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
484
501
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
485
502
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -508,7 +525,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
508
525
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
509
526
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
510
527
|
|
|
511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
528
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
512
529
|
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
513
530
|
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
514
531
|
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
@@ -519,7 +536,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
|
|
|
519
536
|
}, "orderLine");
|
|
520
537
|
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
521
538
|
|
|
522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
539
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
523
540
|
var ORGANIZATION_ROLES = [
|
|
524
541
|
"employee",
|
|
525
542
|
"contractor",
|
|
@@ -626,7 +643,7 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
|
|
|
626
643
|
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
627
644
|
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
628
645
|
|
|
629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
646
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
630
647
|
var CRM_KINDS = ["organization", "person", "deal", "lead"];
|
|
631
648
|
var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
|
|
632
649
|
var isCrmUserId = /* @__PURE__ */ __name((id) => /^\d{1,20}$/.test(id), "isCrmUserId");
|
|
@@ -636,7 +653,7 @@ var normalCrmUserId = /* @__PURE__ */ __name((id) => {
|
|
|
636
653
|
}, "normalCrmUserId");
|
|
637
654
|
var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
|
|
638
655
|
|
|
639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
656
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
640
657
|
var CATALOG_KINDS = ["product", "service"];
|
|
641
658
|
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
642
659
|
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
@@ -704,7 +721,9 @@ export {
|
|
|
704
721
|
kindIn,
|
|
705
722
|
kindsIn,
|
|
706
723
|
importedOf,
|
|
724
|
+
hasGlobalItemIds,
|
|
707
725
|
isImportedProvider,
|
|
726
|
+
alsoListedByKey,
|
|
708
727
|
holdsKind,
|
|
709
728
|
holdsKindOf,
|
|
710
729
|
kindOf,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
8
8
|
var TIME_LIMIT_FUNCTION = "wc_time_limit";
|
|
9
9
|
var TimeLimitReached = class extends Error {
|
|
10
10
|
static {
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
singleLine,
|
|
9
9
|
visibleControls
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S6JG4YUH.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
16
16
|
import { styleText } from "node:util";
|
|
17
17
|
var TIME_WIDTH = 8;
|
|
18
18
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|