@wirecat/mail-cli 0.16.3 → 0.17.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 +86 -0
- package/README.md +7 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-TUDREUUW.js → all-profiles-55AU2Q2N.js} +10 -10
- package/dist/bundle/{anthropic-KQOVSP6C.js → anthropic-I7RI7YPK.js} +6 -6
- package/dist/bundle/{app-server-QK7PKVT7.js → app-server-NY72GTQA.js} +47 -47
- package/dist/bundle/{bun-2NMWL5YB.js → bun-C2R7UPM2.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y4FP6SDX.js → bun-sqlite-RNPHH3KC.js} +5 -5
- package/dist/bundle/{chunk-KJV3BI7S.js → chunk-22IKW3TY.js} +23 -21
- package/dist/bundle/{chunk-B2NDDA2W.js → chunk-22WVQJW3.js} +10 -10
- package/dist/bundle/{chunk-4IIH5PXR.js → chunk-24H2KUGW.js} +28 -28
- package/dist/bundle/{chunk-VP5FL5JQ.js → chunk-2CY44MKY.js} +8 -8
- package/dist/bundle/{chunk-CGH6UH3T.js → chunk-2EVM7GV5.js} +8 -8
- package/dist/bundle/{chunk-GAYW2JRW.js → chunk-2ON2PDHC.js} +10 -10
- package/dist/bundle/{chunk-EBEYU7RW.js → chunk-45JQ72CH.js} +36 -142
- package/dist/bundle/{chunk-QCNK3YUZ.js → chunk-4HTTN4NO.js} +19 -19
- package/dist/bundle/{chunk-6DVPPLAN.js → chunk-6NN5ZX5T.js} +5 -5
- package/dist/bundle/{chunk-CRYWPLJP.js → chunk-A3PKKY24.js} +1 -1
- package/dist/bundle/{chunk-I3K6JG4I.js → chunk-B73I6KLW.js} +14 -60
- package/dist/bundle/{chunk-HVAXTTOT.js → chunk-BD7OK4P5.js} +3 -3
- package/dist/bundle/{chunk-Q4T2HBZP.js → chunk-BPDUVWL2.js} +2 -2
- package/dist/bundle/{chunk-XBIPSSKI.js → chunk-BWCYUXF7.js} +4 -4
- package/dist/bundle/{chunk-3ZJE5TIG.js → chunk-CHC2LWKY.js} +2 -2
- package/dist/bundle/{chunk-VTJ5TMGN.js → chunk-CHVHIDNK.js} +3 -3
- package/dist/bundle/{chunk-XEIGKPYU.js → chunk-DG43I7MC.js} +32 -3
- package/dist/bundle/{chunk-R6SBRHVG.js → chunk-F4P3VDJZ.js} +6 -6
- package/dist/bundle/{chunk-ZS6YKNYS.js → chunk-GBM7FFFI.js} +4 -4
- package/dist/bundle/{chunk-K2OQCQ2N.js → chunk-GYCJQGFO.js} +6 -6
- package/dist/bundle/{chunk-PYX6K527.js → chunk-H32SKDF2.js} +55 -54
- package/dist/bundle/{chunk-KMZRXGTF.js → chunk-HZL42476.js} +1 -1
- package/dist/bundle/{chunk-IJYYD2JU.js → chunk-IPFFPD3M.js} +325 -212
- package/dist/bundle/{chunk-M6O4DH5F.js → chunk-ITMGJX7I.js} +1 -1
- package/dist/bundle/{chunk-OYB3FUYQ.js → chunk-J7XH6CJC.js} +1 -1
- package/dist/bundle/{chunk-ANFIIXBL.js → chunk-JI225TBX.js} +2 -2
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-JSB6BTPT.js} +1 -1
- package/dist/bundle/{chunk-7LMTWOTP.js → chunk-KJKRLI2S.js} +2 -2
- package/dist/bundle/{chunk-FHY664YS.js → chunk-LNC7XMEQ.js} +4 -4
- package/dist/bundle/chunk-M6GLFDWV.js +64 -0
- package/dist/bundle/{chunk-PWTEWT4M.js → chunk-MG4NWXWI.js} +4 -4
- package/dist/bundle/{chunk-X7EBOXBY.js → chunk-MRTSDBTN.js} +12178 -1120
- package/dist/bundle/{chunk-N7DLDEFU.js → chunk-MTFTMPB6.js} +2 -2
- package/dist/bundle/{chunk-DDQXDX4U.js → chunk-OFZDCUUJ.js} +7 -7
- package/dist/bundle/{chunk-4IEDXIUN.js → chunk-OHS5CYZI.js} +240 -64
- package/dist/bundle/{chunk-ZNW4E3SG.js → chunk-QDX2O5BN.js} +3 -3
- package/dist/bundle/{chunk-VD6GZ3W2.js → chunk-QEO7MI3E.js} +2 -2
- package/dist/bundle/{chunk-EZIJPXDZ.js → chunk-QRNL5DIS.js} +6 -6
- package/dist/bundle/{chunk-XAANQN4R.js → chunk-QU5TWVG5.js} +108 -83
- package/dist/bundle/{chunk-HN3EDDVX.js → chunk-R3G33QIV.js} +13 -13
- package/dist/bundle/{chunk-TTOKDZQX.js → chunk-RFFE5ACS.js} +2 -2
- package/dist/bundle/{chunk-5FPQGUJA.js → chunk-RIAHISWA.js} +1 -1
- package/dist/bundle/{chunk-CT2MIWXY.js → chunk-RQGTRB73.js} +3 -3
- package/dist/bundle/{chunk-WKHHCCJE.js → chunk-S4NIDBLI.js} +23 -23
- package/dist/bundle/{chunk-YGJO5VNR.js → chunk-SHEVFBZT.js} +24 -24
- package/dist/bundle/{chunk-DKIAHQRN.js → chunk-SQAAOEGI.js} +9 -9
- package/dist/bundle/{chunk-5KPPP3QN.js → chunk-T4RRZILQ.js} +14 -2
- package/dist/bundle/{chunk-KV4267S4.js → chunk-TCYLDGRA.js} +1 -1
- package/dist/bundle/{chunk-POS35G6D.js → chunk-VMXMHC6E.js} +3 -3
- package/dist/bundle/{chunk-FROWEHK7.js → chunk-VXBUDZV3.js} +2 -2
- package/dist/bundle/{chunk-3CVDHJER.js → chunk-WHI3LTAW.js} +1 -1
- package/dist/bundle/{chunk-ARDUJR5Z.js → chunk-WOFGEJ6W.js} +1 -1
- package/dist/bundle/{chunk-G6RG2AZV.js → chunk-XJQJ3ZIY.js} +55 -8
- package/dist/bundle/{chunk-EDJQDR5X.js → chunk-XOJ5E777.js} +4 -4
- package/dist/bundle/{chunk-UBLFUQ7O.js → chunk-YB47AQWE.js} +97 -12
- package/dist/bundle/{chunk-RPEW7E3S.js → chunk-YCOBSDZY.js} +12 -12
- package/dist/bundle/{chunk-EB2IULWB.js → chunk-YHUCNI2W.js} +2 -2
- package/dist/bundle/{chunk-LMN7SYX4.js → chunk-YIJRPPF5.js} +1 -1
- package/dist/bundle/{chunk-MLWN27HF.js → chunk-YO7BLBVE.js} +243 -247
- package/dist/bundle/command-contract-AUPKK5Y4.js +34 -0
- package/dist/bundle/{decode-WCS4KOHV.js → decode-5AYG6LLW.js} +5 -5
- package/dist/bundle/{dispatch-3ILCYZ4Q.js → dispatch-EVLWT6N3.js} +8 -8
- package/dist/bundle/{dist-FL422DTA.js → dist-JRTLLLLG.js} +31 -23
- package/dist/bundle/{echarts-45D6USAX.js → echarts-EFAEE4D2.js} +2 -2
- package/dist/bundle/{embed-4B4ATLCN.js → embed-6SSOYGZQ.js} +6 -6
- package/dist/bundle/{embedder-ASWGJXNV.js → embedder-VFSLGHBO.js} +9 -9
- package/dist/bundle/{failure-UDL5QZRZ.js → failure-RBBZ7F3L.js} +2 -2
- package/dist/bundle/{first-run-5K3UD4BU.js → first-run-PVEHOQOD.js} +11 -11
- package/dist/bundle/first-screen-7ONKJ7QW.js +32 -0
- package/dist/bundle/{instructions-6EFSPC7C.js → instructions-EOLC3GYB.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-JYLZR5LQ.js} +2 -2
- package/dist/bundle/{node-OXC26QXO.js → node-2ZRMQAYF.js} +2 -2
- package/dist/bundle/{node-sqlite-PXHZAG7Y.js → node-sqlite-UKWOBONA.js} +6 -6
- package/dist/bundle/{oauth-YK2QLC7U.js → oauth-HFD46WAY.js} +7 -7
- package/dist/bundle/{open-SABDXZ4B.js → open-2DLCQUC4.js} +5 -5
- package/dist/bundle/{openai-DPURPXEU.js → openai-A7YLLQEE.js} +14 -14
- package/dist/bundle/{process-YWPAOI6G.js → process-I3INVLFQ.js} +1 -1
- package/dist/bundle/{program-4ILOQHLO.js → program-4ZCATQND.js} +3380 -12407
- package/dist/bundle/{prompt-GKVNFGFE.js → prompt-R636OFYK.js} +5 -5
- package/dist/bundle/{recognize-344YDSLX.js → recognize-G4WUSU5I.js} +4 -4
- package/dist/bundle/{remote-53UZUJJU.js → remote-BMXVVYTN.js} +7 -7
- package/dist/bundle/{rerank-PAIRND6R.js → rerank-7W3QEZ3Q.js} +7 -7
- package/dist/bundle/{serve-DZSO7LJK.js → serve-JQCPQYOJ.js} +9 -9
- package/dist/bundle/server-GYVOIGF5.js +64 -0
- package/dist/bundle/{server-EGG3V67I.js → server-IMOCOYXH.js} +39 -39
- package/dist/bundle/{sqlite-runtime-ZQ6F3VYZ.js → sqlite-runtime-H2IEHDRZ.js} +6 -6
- package/dist/bundle/{state-LXPOWLZ5.js → state-J5N3Y4LX.js} +6 -6
- package/dist/bundle/{store-PHT75I6S.js → store-C4TIYTGI.js} +25 -25
- package/dist/bundle/{store-4ZMSK5R5.js → store-U5WIT3P4.js} +15 -15
- package/dist/bundle/store-maintenance-command-WRRZ7Q7B.js +54 -0
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +56 -64
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/attachments.d.ts.map +1 -1
- package/dist/commands/attachments.js +15 -12
- package/dist/commands/attachments.js.map +1 -1
- package/dist/commands/context.d.ts +4 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +12 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/{mail → commands}/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/drafts-send.d.ts.map +1 -1
- package/dist/commands/drafts-send.js +12 -10
- package/dist/commands/drafts-send.js.map +1 -1
- package/dist/commands/drafts.d.ts.map +1 -1
- package/dist/commands/drafts.js +28 -14
- package/dist/commands/drafts.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +194 -195
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +19 -32
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +10 -5
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/messages.d.ts +0 -21
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +10 -278
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/organising.d.ts +98 -0
- package/dist/commands/organising.d.ts.map +1 -0
- package/dist/commands/organising.js +231 -0
- package/dist/commands/organising.js.map +1 -0
- package/dist/commands/restore.d.ts +3 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +93 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +3 -2
- package/dist/commands/rules.js.map +1 -1
- package/dist/commands/send.d.ts +14 -3
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +18 -11
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +14 -4
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +10 -4
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +136 -141
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tags.d.ts.map +1 -1
- package/dist/commands/tags.js +11 -7
- package/dist/commands/tags.js.map +1 -1
- package/dist/commands/words.d.ts +8 -0
- package/dist/commands/words.d.ts.map +1 -0
- package/dist/commands/words.js +52 -0
- package/dist/commands/words.js.map +1 -0
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +2 -1
- package/dist/discovery.js.map +1 -1
- package/dist/export/journal.d.ts +8 -6
- package/dist/export/journal.d.ts.map +1 -1
- package/dist/export/journal.js +39 -14
- package/dist/export/journal.js.map +1 -1
- package/dist/mail/changes.d.ts +9 -2
- package/dist/mail/changes.d.ts.map +1 -1
- package/dist/mail/changes.js +45 -17
- package/dist/mail/changes.js.map +1 -1
- package/dist/mail/cleanup.d.ts.map +1 -1
- package/dist/mail/cleanup.js +5 -1
- package/dist/mail/cleanup.js.map +1 -1
- package/dist/mail/domain-age.d.ts.map +1 -1
- package/dist/mail/domain-age.js +24 -6
- package/dist/mail/domain-age.js.map +1 -1
- package/dist/mail/drafts.d.ts.map +1 -1
- package/dist/mail/drafts.js +9 -7
- package/dist/mail/drafts.js.map +1 -1
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +8 -9
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/errors.d.ts.map +1 -1
- package/dist/mail/imap/errors.js +2 -2
- package/dist/mail/imap/errors.js.map +1 -1
- package/dist/mail/imap/read.d.ts.map +1 -1
- package/dist/mail/imap/read.js +8 -5
- package/dist/mail/imap/read.js.map +1 -1
- package/dist/mail/imap/write.d.ts.map +1 -1
- package/dist/mail/imap/write.js +2 -1
- package/dist/mail/imap/write.js.map +1 -1
- package/dist/mail/locate.d.ts +32 -0
- package/dist/mail/locate.d.ts.map +1 -0
- package/dist/mail/locate.js +99 -0
- package/dist/mail/locate.js.map +1 -0
- package/dist/mail/mbox.d.ts.map +1 -1
- package/dist/mail/mbox.js +7 -5
- package/dist/mail/mbox.js.map +1 -1
- package/dist/mail/organise.d.ts +35 -50
- package/dist/mail/organise.d.ts.map +1 -1
- package/dist/mail/organise.js +44 -279
- package/dist/mail/organise.js.map +1 -1
- package/dist/mail/restore.d.ts +22 -0
- package/dist/mail/restore.d.ts.map +1 -0
- package/dist/mail/restore.js +193 -0
- package/dist/mail/restore.js.map +1 -0
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +5 -4
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/mail/rules/file.d.ts.map +1 -1
- package/dist/mail/rules/file.js +37 -8
- package/dist/mail/rules/file.js.map +1 -1
- package/dist/mail/rules/filters.d.ts.map +1 -1
- package/dist/mail/rules/filters.js +13 -7
- package/dist/mail/rules/filters.js.map +1 -1
- package/dist/mail/rules/query.d.ts.map +1 -1
- package/dist/mail/rules/query.js +7 -7
- package/dist/mail/rules/query.js.map +1 -1
- package/dist/mail/save.js +1 -1
- package/dist/mail/save.js.map +1 -1
- package/dist/mail/send.d.ts +4 -3
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +8 -8
- package/dist/mail/send.js.map +1 -1
- package/dist/mail/smtp.js +1 -1
- package/dist/mail/smtp.js.map +1 -1
- package/dist/oauth.d.ts +3 -2
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +16 -7
- package/dist/oauth.js.map +1 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +3 -2
- package/dist/profile.js.map +1 -1
- package/dist/program.js +1 -1
- package/dist/program.js.map +1 -1
- package/dist/providers.js +3 -3
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +12 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/skills/mail-cli/SKILL.md +3 -3
- package/dist/bundle/chunk-GIKNAOER.js +0 -132
- package/dist/bundle/command-contract-GVNLRXWS.js +0 -34
- package/dist/bundle/first-screen-NNX54MYC.js +0 -32
- package/dist/bundle/server-SGGMRV2K.js +0 -64
- package/dist/bundle/store-maintenance-command-C6ONZNRX.js +0 -54
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/mail/doctor.d.ts.map +0 -1
- package/dist/mail/doctor.js.map +0 -1
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-CNMSF5QU.js} +0 -0
- /package/dist/{mail → commands}/doctor.d.ts +0 -0
|
@@ -2,17 +2,18 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
formatMeetingReference,
|
|
5
|
+
moneyLabel,
|
|
5
6
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OHS5CYZI.js";
|
|
7
8
|
import {
|
|
8
9
|
CliError,
|
|
9
10
|
singleLine
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YHUCNI2W.js";
|
|
11
12
|
import {
|
|
12
13
|
__name
|
|
13
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
15
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
16
17
|
var SCHEME = "msg:";
|
|
17
18
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
18
19
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -26,7 +27,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
26
27
|
return { provider, account, chat, message };
|
|
27
28
|
}, "parseLocator");
|
|
28
29
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
30
31
|
var SIMPLE_REFERENCES = [
|
|
31
32
|
"note",
|
|
32
33
|
"document",
|
|
@@ -40,6 +41,8 @@ var SIMPLE_REFERENCES = [
|
|
|
40
41
|
"event",
|
|
41
42
|
"invoice",
|
|
42
43
|
"payment",
|
|
44
|
+
"order",
|
|
45
|
+
"deal",
|
|
43
46
|
"entity"
|
|
44
47
|
];
|
|
45
48
|
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
@@ -173,7 +176,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
173
176
|
return match !== null && byPrefix.has(match[1]);
|
|
174
177
|
}, "looksLikeReference");
|
|
175
178
|
|
|
176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
177
180
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
178
181
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
179
182
|
var PROVIDERS = [
|
|
@@ -292,7 +295,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
292
295
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
293
296
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
294
297
|
|
|
295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
296
299
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
297
300
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
298
301
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -329,121 +332,16 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
329
332
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
330
333
|
}, "counterFreshness");
|
|
331
334
|
|
|
332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
333
|
-
var
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
CHF: 2,
|
|
341
|
-
CLP: 0,
|
|
342
|
-
CNY: 2,
|
|
343
|
-
CZK: 2,
|
|
344
|
-
DKK: 2,
|
|
345
|
-
EUR: 2,
|
|
346
|
-
GBP: 2,
|
|
347
|
-
GEL: 2,
|
|
348
|
-
HUF: 2,
|
|
349
|
-
ILS: 2,
|
|
350
|
-
INR: 2,
|
|
351
|
-
ISK: 0,
|
|
352
|
-
JPY: 0,
|
|
353
|
-
KGS: 2,
|
|
354
|
-
KRW: 0,
|
|
355
|
-
KWD: 3,
|
|
356
|
-
KZT: 2,
|
|
357
|
-
NOK: 2,
|
|
358
|
-
PLN: 2,
|
|
359
|
-
RSD: 2,
|
|
360
|
-
RUB: 2,
|
|
361
|
-
SEK: 2,
|
|
362
|
-
THB: 2,
|
|
363
|
-
TRY: 2,
|
|
364
|
-
UAH: 2,
|
|
365
|
-
USD: 2,
|
|
366
|
-
UZS: 2,
|
|
367
|
-
VND: 0
|
|
368
|
-
};
|
|
369
|
-
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
370
|
-
throw new CliError("validation_error", message, { reason });
|
|
371
|
-
}, "refuse");
|
|
372
|
-
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
373
|
-
var parseDecimal = /* @__PURE__ */ __name((text, scale) => {
|
|
374
|
-
const match = DECIMAL.exec(text.trim());
|
|
375
|
-
if (!match || (match[2] ?? "").length > scale)
|
|
376
|
-
return void 0;
|
|
377
|
-
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
378
|
-
}, "parseDecimal");
|
|
379
|
-
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
380
|
-
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
381
|
-
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
382
|
-
}, "formatDecimal");
|
|
383
|
-
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
384
|
-
const [whole = "0", fraction] = decimal.split(".");
|
|
385
|
-
const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
386
|
-
return fraction === void 0 ? grouped : `${grouped}.${fraction}`;
|
|
387
|
-
}, "groupDigits");
|
|
388
|
-
var currencyOf = /* @__PURE__ */ __name((text) => {
|
|
389
|
-
const code = typeof text === "string" ? text.trim().toUpperCase() : "";
|
|
390
|
-
if (CURRENCY_SCALES[code] === void 0)
|
|
391
|
-
return refuse(`${typeof text === "string" && text.trim() ? text.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
392
|
-
return code;
|
|
393
|
-
}, "currencyOf");
|
|
394
|
-
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
395
|
-
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
396
|
-
const scale = scaleOf(currency);
|
|
397
|
-
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
398
|
-
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
399
|
-
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
400
|
-
return Number(units);
|
|
401
|
-
}, "minorUnits");
|
|
402
|
-
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
403
|
-
amount: formatDecimal(units, scaleOf(currency)),
|
|
404
|
-
currency
|
|
405
|
-
}), "moneyOf");
|
|
406
|
-
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
407
|
-
var QUANTITY_SCALE = 3;
|
|
408
|
-
var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
409
|
-
const thousandths = typeof text === "string" ? parseDecimal(text, QUANTITY_SCALE) : void 0;
|
|
410
|
-
if (thousandths === void 0 || thousandths === 0n)
|
|
411
|
-
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
412
|
-
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
413
|
-
return { text: plain, thousandths };
|
|
414
|
-
}, "quantityOf");
|
|
415
|
-
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
416
|
-
|
|
417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
418
|
-
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
419
|
-
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
420
|
-
var MONEY_DIRECTIONS = ["in", "out"];
|
|
421
|
-
var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
|
|
422
|
-
var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
|
|
423
|
-
if (current === "draft" || current === "void")
|
|
424
|
-
return current;
|
|
425
|
-
if (paid <= 0)
|
|
426
|
-
return "issued";
|
|
427
|
-
return paid < total ? "partly_paid" : "paid";
|
|
428
|
-
}, "settledStatus");
|
|
429
|
-
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
430
|
-
var notes = /* @__PURE__ */ __name((...words) => {
|
|
431
|
-
const kept = words.filter((word) => word !== null);
|
|
432
|
-
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
433
|
-
}, "notes");
|
|
434
|
-
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
435
|
-
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
436
|
-
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
437
|
-
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
438
|
-
}, "invoiceLine");
|
|
439
|
-
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
440
|
-
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
441
|
-
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
442
|
-
}, "paymentLine");
|
|
443
|
-
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
444
|
-
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
336
|
+
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
337
|
+
var DEAL_ROLES = ["owner", "contact", "decision-maker"];
|
|
338
|
+
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
339
|
+
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
340
|
+
const notes = [deal.status === "open" ? null : deal.status, deal.review === "confirmed" ? null : deal.review].filter(Boolean).join(", ");
|
|
341
|
+
return `${deal.title} \xB7 ${deal.stage}${money}${notes ? ` (${notes})` : ""}`;
|
|
342
|
+
}, "dealLine");
|
|
445
343
|
|
|
446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
447
345
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
448
346
|
var AUTHOR_MEASURES = [
|
|
449
347
|
"messages",
|
|
@@ -583,7 +481,7 @@ var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token)
|
|
|
583
481
|
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
584
482
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
585
483
|
|
|
586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
587
485
|
import { createHash } from "node:crypto";
|
|
588
486
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
589
487
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -592,6 +490,7 @@ var WORD2 = "^[a-z0-9][a-z0-9_-]{0,62}$";
|
|
|
592
490
|
var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9_-]{0,62})$";
|
|
593
491
|
var MAX_ID = 512;
|
|
594
492
|
var MAX_RELATIONS = 100;
|
|
493
|
+
var DECIMAL = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
595
494
|
var RECORDS_ENVELOPE_SCHEMA = {
|
|
596
495
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
597
496
|
title: "WireCat records envelope, version 1",
|
|
@@ -639,13 +538,19 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
639
538
|
properties: {
|
|
640
539
|
role: { type: "string", pattern: WORD2 },
|
|
641
540
|
type: { type: "string", pattern: TYPE },
|
|
642
|
-
external_id: { type: "string", minLength: 1, maxLength: MAX_ID }
|
|
541
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
542
|
+
amount: {
|
|
543
|
+
type: "string",
|
|
544
|
+
pattern: DECIMAL,
|
|
545
|
+
description: "A settles relation's share of the payment, a decimal in its currency"
|
|
546
|
+
}
|
|
643
547
|
}
|
|
644
548
|
}
|
|
645
549
|
}
|
|
646
550
|
};
|
|
647
551
|
var wordPattern = new RegExp(WORD2);
|
|
648
552
|
var typePattern = new RegExp(TYPE);
|
|
553
|
+
var decimalPattern = new RegExp(DECIMAL);
|
|
649
554
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
650
555
|
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
651
556
|
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
@@ -658,7 +563,12 @@ var canonical = /* @__PURE__ */ __name((value) => {
|
|
|
658
563
|
}, "canonical");
|
|
659
564
|
var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
|
|
660
565
|
fields,
|
|
661
|
-
relations: relations.map((relation) => [
|
|
566
|
+
relations: relations.map((relation) => [
|
|
567
|
+
relation.role,
|
|
568
|
+
relation.type,
|
|
569
|
+
relation.external_id,
|
|
570
|
+
...relation.amount === void 0 ? [] : [relation.amount]
|
|
571
|
+
]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
662
572
|
}))).digest("hex"), "recordFingerprint");
|
|
663
573
|
var envelopeOfJsonl = /* @__PURE__ */ __name((text) => {
|
|
664
574
|
const lines = text.split(/\r?\n/);
|
|
@@ -718,25 +628,9 @@ export {
|
|
|
718
628
|
counterObservationTime,
|
|
719
629
|
observedCounters,
|
|
720
630
|
counterFreshness,
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
currencyOf,
|
|
725
|
-
scaleOf,
|
|
726
|
-
minorUnits,
|
|
727
|
-
moneyOf,
|
|
728
|
-
moneyLabel,
|
|
729
|
-
quantityOf,
|
|
730
|
-
lineUnits,
|
|
731
|
-
INVOICE_DIRECTIONS,
|
|
732
|
-
INVOICE_STATUSES,
|
|
733
|
-
MONEY_DIRECTIONS,
|
|
734
|
-
FINANCE_REVIEWS,
|
|
735
|
-
settledStatus,
|
|
736
|
-
invoiceLine,
|
|
737
|
-
paymentLine,
|
|
738
|
-
invoiceTitle,
|
|
739
|
-
paymentEntryTitle,
|
|
631
|
+
DEAL_STATUSES,
|
|
632
|
+
DEAL_ROLES,
|
|
633
|
+
dealLine,
|
|
740
634
|
MESSAGE_MEASURES,
|
|
741
635
|
AUTHOR_MEASURES,
|
|
742
636
|
needsRankingContext,
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
string,
|
|
20
20
|
text,
|
|
21
21
|
unknown
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XJQJ3ZIY.js";
|
|
23
23
|
import {
|
|
24
24
|
CliError,
|
|
25
25
|
visibleControls
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YHUCNI2W.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__name,
|
|
@@ -1896,7 +1896,7 @@ var require_cli_table3 = __commonJS({
|
|
|
1896
1896
|
}
|
|
1897
1897
|
});
|
|
1898
1898
|
|
|
1899
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1899
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
|
|
1900
1900
|
import { homedir, userInfo } from "node:os";
|
|
1901
1901
|
import { join, posix, win32 } from "node:path";
|
|
1902
1902
|
var PATH_KINDS = ["config", "state", "cache"];
|
|
@@ -1948,7 +1948,7 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
|
|
|
1948
1948
|
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
1949
1949
|
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
|
|
1950
1950
|
|
|
1951
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1951
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
|
|
1952
1952
|
var DEFAULT_RETRY = {
|
|
1953
1953
|
retries: 1,
|
|
1954
1954
|
baseDelayMs: 250,
|
|
@@ -1960,7 +1960,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
|
|
|
1960
1960
|
return Math.round(random() * ceiling);
|
|
1961
1961
|
}, "backoffMs");
|
|
1962
1962
|
|
|
1963
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1963
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
|
|
1964
1964
|
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
1965
1965
|
var validate = /* @__PURE__ */ __name((paths) => {
|
|
1966
1966
|
if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
|
|
@@ -2025,7 +2025,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
|
|
|
2025
2025
|
return project(value, fields);
|
|
2026
2026
|
}, "projectFields");
|
|
2027
2027
|
|
|
2028
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2028
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
|
|
2029
2029
|
var BATCH_LIMITS = Object.freeze({
|
|
2030
2030
|
requests: 32,
|
|
2031
2031
|
input_bytes: 262144,
|
|
@@ -2152,7 +2152,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2152
2152
|
};
|
|
2153
2153
|
}, "runBatch");
|
|
2154
2154
|
|
|
2155
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2155
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
|
|
2156
2156
|
import { randomBytes } from "node:crypto";
|
|
2157
2157
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2158
2158
|
import { dirname, join as join2 } from "node:path";
|
|
@@ -2196,7 +2196,7 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
|
|
|
2196
2196
|
`, 384);
|
|
2197
2197
|
}, "saveConfigFile");
|
|
2198
2198
|
|
|
2199
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2199
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
|
|
2200
2200
|
import { fileURLToPath } from "node:url";
|
|
2201
2201
|
var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
2202
2202
|
var baseConstantsSchema = object({});
|
|
@@ -2251,11 +2251,11 @@ var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
|
|
|
2251
2251
|
return deepFreeze(result.output);
|
|
2252
2252
|
}, "loadConstants");
|
|
2253
2253
|
|
|
2254
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2254
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2255
2255
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2256
2256
|
import { join as join3, resolve } from "node:path";
|
|
2257
2257
|
|
|
2258
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2258
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
|
|
2259
2259
|
import { createRequire } from "node:module";
|
|
2260
2260
|
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
2261
2261
|
var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
@@ -2275,7 +2275,7 @@ var systemKeyring = {
|
|
|
2275
2275
|
delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
|
|
2276
2276
|
};
|
|
2277
2277
|
|
|
2278
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2278
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2279
2279
|
var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
|
|
2280
2280
|
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2281
2281
|
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
@@ -2411,7 +2411,7 @@ var Credentials = class {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
};
|
|
2413
2413
|
|
|
2414
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2414
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
|
|
2415
2415
|
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2416
2416
|
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
2417
2417
|
if (signal?.aborted) {
|
|
@@ -2425,10 +2425,10 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
|
|
|
2425
2425
|
}, { once: true });
|
|
2426
2426
|
}), "realSleep");
|
|
2427
2427
|
|
|
2428
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2428
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2429
2429
|
import { appendFileSync } from "node:fs";
|
|
2430
2430
|
|
|
2431
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2431
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
|
|
2432
2432
|
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
2433
2433
|
var logRecordSchema = strictObject({
|
|
2434
2434
|
time: isoTime,
|
|
@@ -2506,7 +2506,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
|
|
|
2506
2506
|
return traceId;
|
|
2507
2507
|
}, "traceIdOf");
|
|
2508
2508
|
|
|
2509
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2509
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2510
2510
|
var REDACTED_FIELDS = [
|
|
2511
2511
|
"authorization",
|
|
2512
2512
|
"Authorization",
|
|
@@ -2600,7 +2600,7 @@ var silent = {
|
|
|
2600
2600
|
}, "error")
|
|
2601
2601
|
};
|
|
2602
2602
|
|
|
2603
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2603
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
|
|
2604
2604
|
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
2605
2605
|
import { styleText } from "node:util";
|
|
2606
2606
|
var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
@@ -2675,7 +2675,7 @@ var BORDERLESS = {
|
|
|
2675
2675
|
middle: ""
|
|
2676
2676
|
};
|
|
2677
2677
|
|
|
2678
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2678
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
|
|
2679
2679
|
var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
2680
2680
|
if (signal?.aborted)
|
|
2681
2681
|
return Promise.reject(signal.reason);
|
|
@@ -2703,7 +2703,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
|
2703
2703
|
});
|
|
2704
2704
|
}, "waitForDrain");
|
|
2705
2705
|
|
|
2706
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2706
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
|
|
2707
2707
|
var processStreams = {
|
|
2708
2708
|
drain: /* @__PURE__ */ __name(async (signal) => {
|
|
2709
2709
|
await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
|
|
@@ -2732,7 +2732,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
|
|
|
2732
2732
|
};
|
|
2733
2733
|
}, "captureStreams");
|
|
2734
2734
|
|
|
2735
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2735
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
|
|
2736
2736
|
var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
|
|
2737
2737
|
const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
|
|
2738
2738
|
const say = /* @__PURE__ */ __name((symbol) => (message) => {
|
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
answerSchema,
|
|
7
7
|
describeOptions,
|
|
8
8
|
metaOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IPFFPD3M.js";
|
|
10
10
|
import {
|
|
11
11
|
keyForCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OFZDCUUJ.js";
|
|
13
13
|
import {
|
|
14
14
|
jsonSchemaOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XJQJ3ZIY.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YHUCNI2W.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
24
24
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
25
25
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
26
26
|
const entity = answerEntitySchema(command);
|
|
@@ -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@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
8
8
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
9
9
|
"authorization",
|
|
10
10
|
"cookie",
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
organization,
|
|
5
|
-
project,
|
|
6
|
-
reminder
|
|
7
|
-
} from "./chunk-GIKNAOER.js";
|
|
8
3
|
import {
|
|
9
4
|
MIGRATIONS,
|
|
10
5
|
SnapshotBudget,
|
|
@@ -28,31 +23,28 @@ import {
|
|
|
28
23
|
tagMemberIds,
|
|
29
24
|
thingOf,
|
|
30
25
|
write
|
|
31
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MRTSDBTN.js";
|
|
32
27
|
import {
|
|
33
28
|
filesAccountSql,
|
|
34
29
|
folderProviderOf,
|
|
35
30
|
folderProviderSql,
|
|
36
31
|
isDocumentAccountProvider
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
queryFieldsOf
|
|
40
|
-
} from "./chunk-4IEDXIUN.js";
|
|
32
|
+
} from "./chunk-45JQ72CH.js";
|
|
41
33
|
import {
|
|
42
34
|
fold
|
|
43
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-2EVM7GV5.js";
|
|
44
36
|
import {
|
|
45
37
|
CliError
|
|
46
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YHUCNI2W.js";
|
|
47
39
|
import {
|
|
48
40
|
__name
|
|
49
41
|
} from "./chunk-ZVVMGPBJ.js";
|
|
50
42
|
|
|
51
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
52
44
|
import { realpathSync, statSync } from "node:fs";
|
|
53
45
|
import { resolve } from "node:path";
|
|
54
46
|
|
|
55
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
|
|
56
48
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
57
49
|
const creatable = /* @__PURE__ */ new Set();
|
|
58
50
|
let people = 0, identities = 0;
|
|
@@ -115,11 +107,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
115
107
|
}
|
|
116
108
|
}, "copyPeople");
|
|
117
109
|
|
|
118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
|
|
119
111
|
import { createHash } from "node:crypto";
|
|
120
112
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
121
113
|
|
|
122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
|
|
123
115
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
124
116
|
const colon = collection.indexOf(":");
|
|
125
117
|
const provider = collection.slice(0, colon);
|
|
@@ -163,7 +155,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
163
155
|
};
|
|
164
156
|
}, "currentCollection");
|
|
165
157
|
|
|
166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
|
|
167
159
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
168
160
|
const mappings = /* @__PURE__ */ new Map();
|
|
169
161
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -330,7 +322,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
330
322
|
};
|
|
331
323
|
}, "planTransfer");
|
|
332
324
|
|
|
333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
334
326
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
335
327
|
var MAX_ENTITIES = 1e3;
|
|
336
328
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -492,7 +484,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
492
484
|
};
|
|
493
485
|
}), "transferSnapshot");
|
|
494
486
|
|
|
495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
|
|
496
488
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
497
489
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
498
490
|
return provider ?? null;
|
|
@@ -664,7 +656,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
664
656
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
665
657
|
}, "remapEntity");
|
|
666
658
|
|
|
667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
668
660
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
669
661
|
for (const value of [options.source, options.destination, options.collection])
|
|
670
662
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -760,42 +752,7 @@ var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
760
752
|
}
|
|
761
753
|
}, "applyDocumentTransfer");
|
|
762
754
|
|
|
763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
764
|
-
var ORGANIZATIONS_QUERY = {
|
|
765
|
-
entity: "organization",
|
|
766
|
-
backend: "sql",
|
|
767
|
-
fields: queryFieldsOf(organization, {
|
|
768
|
-
native: ["id", "kind", "scope", "created_at"],
|
|
769
|
-
examples: { id: "id:1", kind: "kind:company", scope: "scope:work", created_at: "created_at>=2026-01-01" }
|
|
770
|
-
})
|
|
771
|
-
};
|
|
772
|
-
var PROJECTS_QUERY = {
|
|
773
|
-
entity: "project",
|
|
774
|
-
backend: "sql",
|
|
775
|
-
fields: queryFieldsOf(project, {
|
|
776
|
-
native: ["id", "key", "name", "kind", "type", "organization_id", "scope", "created_at"],
|
|
777
|
-
examples: {
|
|
778
|
-
id: "id:1",
|
|
779
|
-
key: "key:SMP",
|
|
780
|
-
name: "name:*tart*",
|
|
781
|
-
kind: "kind:inbox",
|
|
782
|
-
type: "type:work",
|
|
783
|
-
organization_id: "organization_id:1",
|
|
784
|
-
scope: "scope:work",
|
|
785
|
-
created_at: "created_at>=2026-01-01"
|
|
786
|
-
}
|
|
787
|
-
})
|
|
788
|
-
};
|
|
789
|
-
var REMINDERS_QUERY = {
|
|
790
|
-
entity: "reminder",
|
|
791
|
-
backend: "sql",
|
|
792
|
-
fields: queryFieldsOf(reminder, {
|
|
793
|
-
native: ["id", "state", "due_at", "revision"],
|
|
794
|
-
examples: { id: "id:1", state: "state:pending", due_at: "due_at>=2026-01-01", revision: "revision>1" }
|
|
795
|
-
})
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
799
756
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
800
757
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
801
758
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -817,7 +774,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
817
774
|
}
|
|
818
775
|
}, "previewProjectAnnotationSnapshot");
|
|
819
776
|
|
|
820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.587.0_@wirecat+cli-base@0.80.0_commander@15.0.0_esbuild@0.28.2_type_0f4056d0db575ed69cb7c50d6a509493/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
821
778
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
822
779
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
823
780
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -841,9 +798,6 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
841
798
|
export {
|
|
842
799
|
previewDocumentTransfer,
|
|
843
800
|
applyDocumentTransfer,
|
|
844
|
-
ORGANIZATIONS_QUERY,
|
|
845
|
-
PROJECTS_QUERY,
|
|
846
|
-
REMINDERS_QUERY,
|
|
847
801
|
previewProjectAnnotationSnapshot,
|
|
848
802
|
snapshotProjectAnnotations
|
|
849
803
|
};
|