@wirecat/zoom-cli 0.70.0 → 0.72.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/dist/answer-entities.d.ts +2 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answers.d.ts +56 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-GE2TFJJP.js → all-profiles-XFIPF4GF.js} +12 -12
- package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
- package/dist/bundle/{anthropic-FA6NHENI.js → anthropic-SSUBR3BC.js} +29 -13
- package/dist/bundle/{app-server-IRADMSNX.js → app-server-7DJHHF2F.js} +68 -56
- package/dist/bundle/{bun-ZYZGGCX5.js → bun-6HBYWQIX.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y24TUIGS.js → bun-sqlite-4L3Q55NB.js} +10 -6
- package/dist/bundle/{chunk-JULBAECW.js → chunk-23J2ANZ7.js} +16 -6
- package/dist/bundle/{chunk-4DSIWYGO.js → chunk-24OFZNRC.js} +39296 -24139
- package/dist/bundle/{chunk-LXXCLQCW.js → chunk-2MIBRVSV.js} +2 -2
- package/dist/bundle/{chunk-CHGUNZ3L.js → chunk-37NF5CBJ.js} +4 -4
- package/dist/bundle/chunk-3KRTEX5M.js +53 -0
- package/dist/bundle/{chunk-VNU5L37V.js → chunk-4SY67IUA.js} +34 -42
- package/dist/bundle/{chunk-XWQNJKTP.js → chunk-4XQWF3U2.js} +6 -6
- package/dist/bundle/{chunk-OAQLVV6W.js → chunk-4YIGXTBP.js} +3 -3
- package/dist/bundle/{chunk-RB33VTUW.js → chunk-5AELTC52.js} +810 -210
- package/dist/bundle/chunk-5MGICK47.js +1243 -0
- package/dist/bundle/{chunk-RRRJCHUC.js → chunk-5X4IY5JH.js} +4504 -1622
- package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
- package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
- package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
- package/dist/bundle/{chunk-KM736RMJ.js → chunk-7IFO43Q5.js} +2 -2
- package/dist/bundle/{chunk-IWPXWGF7.js → chunk-7JYMGXLI.js} +44 -42
- package/dist/bundle/{chunk-LAG5O2FV.js → chunk-7OD3522V.js} +4162 -3769
- package/dist/bundle/{chunk-DCUWJITQ.js → chunk-7S4D5SM2.js} +60 -608
- package/dist/bundle/{chunk-3KC7C465.js → chunk-7SUWPMZG.js} +10 -15
- package/dist/bundle/{chunk-6IF5ZHDS.js → chunk-ADKMBXY4.js} +1 -1
- package/dist/bundle/{chunk-56OV5ASY.js → chunk-B3SILJBU.js} +18 -18
- package/dist/bundle/{chunk-CIZ25UPK.js → chunk-CANRIRNZ.js} +8241 -5553
- package/dist/bundle/{chunk-YUHM2OJM.js → chunk-CW46FWKW.js} +38 -123
- package/dist/bundle/{chunk-VSLDWT4E.js → chunk-D24OQAHM.js} +4 -4
- package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
- package/dist/bundle/{chunk-CSEBB4OP.js → chunk-DEPXZJ2V.js} +21 -150
- package/dist/bundle/{chunk-YJSPBUGB.js → chunk-DOCVEKP2.js} +51 -67
- package/dist/bundle/{chunk-V2E7QFZ3.js → chunk-EFF2XBHP.js} +2 -2
- package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
- package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
- package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
- package/dist/bundle/chunk-FSCPQQS5.js +244 -0
- package/dist/bundle/{chunk-BVWF4B33.js → chunk-H53WFZBN.js} +16 -139
- package/dist/bundle/{chunk-VJ5ZU4UF.js → chunk-I7CUMZD6.js} +3 -3
- package/dist/bundle/{chunk-OA37BWE5.js → chunk-IACWKZWS.js} +1 -1
- package/dist/bundle/{chunk-BSS6HX4O.js → chunk-IFBIXU6C.js} +2 -2
- package/dist/bundle/{chunk-UVPL7YAY.js → chunk-IU4DUUB3.js} +7 -7
- package/dist/bundle/{chunk-W7ZEEC4K.js → chunk-IXO4SCKE.js} +1 -1
- package/dist/bundle/{chunk-J3SKXICS.js → chunk-JAEPK457.js} +359 -765
- package/dist/bundle/{chunk-ZV3INEKM.js → chunk-JFPUYQSP.js} +5 -5
- package/dist/bundle/{chunk-ZS55EERO.js → chunk-JG4MNYG2.js} +1 -1
- package/dist/bundle/{chunk-IINZIP73.js → chunk-JRCH4YZP.js} +17 -10
- package/dist/bundle/{chunk-2JEM2YNV.js → chunk-JZ4XNNL7.js} +1 -1
- package/dist/bundle/chunk-K6HR6HCO.js +32 -0
- package/dist/bundle/{chunk-SNIY3JDN.js → chunk-KFZL67JP.js} +328 -60
- package/dist/bundle/{chunk-CEJJBZAE.js → chunk-KPIQXFNB.js} +375 -10
- package/dist/bundle/{chunk-M7VUXXGS.js → chunk-KWURWGGB.js} +137 -7
- package/dist/bundle/{chunk-M6JIXMQZ.js → chunk-LA6QUVGQ.js} +3 -2
- package/dist/bundle/{chunk-AISJCF7A.js → chunk-LLUNHAZ7.js} +4 -4
- package/dist/bundle/{chunk-KWRCP55G.js → chunk-LTWJM3ED.js} +17 -17
- package/dist/bundle/{chunk-IS3ZTT2Z.js → chunk-M3DMXDX6.js} +6 -6
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-L24UOUWG.js → chunk-MSQHSW4C.js} +2 -2
- package/dist/bundle/chunk-N4QNYWWG.js +71 -0
- package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
- package/dist/bundle/{chunk-DNR4B5YV.js → chunk-OHCLQJOV.js} +3 -3
- package/dist/bundle/{chunk-MVOMLJYQ.js → chunk-OP5PGE2N.js} +4 -4
- package/dist/bundle/{chunk-QL7EMFIC.js → chunk-OY6N2ABP.js} +29 -23
- package/dist/bundle/chunk-PJWSGXOB.js +185 -0
- package/dist/bundle/{chunk-YTN2JN6N.js → chunk-QA6KIL7Q.js} +12 -8
- package/dist/bundle/{chunk-6HJFIMT7.js → chunk-QQUY4MZY.js} +1 -1
- package/dist/bundle/{chunk-ZSKE7N2U.js → chunk-QW7YTRV2.js} +3 -3
- package/dist/bundle/chunk-RJTGENHZ.js +109 -0
- package/dist/bundle/{chunk-RIPAUCKJ.js → chunk-RLCVPECY.js} +74 -67
- package/dist/bundle/{chunk-M7E44TMT.js → chunk-RN5SU2RN.js} +6 -6
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
- package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
- package/dist/bundle/{chunk-SVF3NDAO.js → chunk-SXZGCD6E.js} +3 -3
- package/dist/bundle/{chunk-DXCTW3MV.js → chunk-T27IMG6X.js} +3 -1
- package/dist/bundle/{chunk-PV6OHXHN.js → chunk-TF2WKPNW.js} +18 -18
- package/dist/bundle/{chunk-X4ZF4XXI.js → chunk-U32VL3MA.js} +1 -1
- package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
- package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
- package/dist/bundle/chunk-VIV64MQM.js +779 -0
- package/dist/bundle/{chunk-2QFPVUM3.js → chunk-W3YTVEWV.js} +69 -6
- package/dist/bundle/{chunk-AUNW7N4I.js → chunk-WLVG4RBZ.js} +1 -1
- package/dist/bundle/{chunk-JRO2FWO2.js → chunk-WOAYHCM2.js} +1 -1
- package/dist/bundle/{chunk-RO3ZR4VP.js → chunk-WXTYYWZI.js} +13 -13
- package/dist/bundle/{chunk-RWIILYKW.js → chunk-WZGKHTA4.js} +2 -2
- package/dist/bundle/{chunk-GB5X3GBE.js → chunk-X2MP634F.js} +14 -5
- package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
- package/dist/bundle/{chunk-D3PNCJD5.js → chunk-YVVJ6Y5C.js} +7 -7
- package/dist/bundle/chunk-ZHA56THL.js +2355 -0
- package/dist/bundle/{chunk-QO2KPU26.js → chunk-ZVFYGTGJ.js} +101 -44
- package/dist/bundle/{chunk-V5GRSOCZ.js → chunk-ZW5KHKMA.js} +5 -5
- package/dist/bundle/{cli-VRSQ7HAE.js → cli-IYYI7GAM.js} +215 -100
- package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
- package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
- package/dist/bundle/config-YKNM33J7.js +96 -0
- package/dist/bundle/{decode-523PUQMR.js → decode-SRGOOGBW.js} +6 -6
- package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
- package/dist/bundle/{dist-6WWKPEVW.js → dist-UZLNLAIO.js} +97 -56
- package/dist/bundle/{echarts-S5UMX2D3.js → echarts-7CM2MCMW.js} +2 -2
- package/dist/bundle/{embed-ODPDVHUK.js → embed-VEE56BOB.js} +7 -7
- package/dist/bundle/{embedder-PAXRBSZE.js → embedder-SZFYR543.js} +10 -10
- package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
- package/dist/bundle/first-run-KWC7RKF2.js +29 -0
- package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
- package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
- package/dist/bundle/{instructions-DUB7E6C5.js → instructions-R7OHVAWH.js} +1 -1
- package/dist/bundle/{main-A7JSYQI6.js → main-EFUN2O3K.js} +21 -20
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{meetings-BDZQV3HR.js → meetings-5I2BDNTA.js} +9 -7
- package/dist/bundle/{node-E25KP53H.js → node-3N2JGZ7V.js} +2 -2
- package/dist/bundle/{node-sqlite-PHWDFZCP.js → node-sqlite-2UVEE2WM.js} +11 -7
- package/dist/bundle/{oauth-G2K46IYP.js → oauth-AYGD7UU3.js} +8 -8
- package/dist/bundle/{open-INWS5HIZ.js → open-3GUVDLGD.js} +6 -6
- package/dist/bundle/openai-NHCDLWWY.js +28 -0
- package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
- package/dist/bundle/{process-UJ2JHMJN.js → process-YAHHUFR5.js} +1 -1
- package/dist/bundle/{program-LYTGFV6L.js → program-OSZROCTK.js} +113 -118
- package/dist/bundle/{prompt-VTUCRCE4.js → prompt-HMCW4XQJ.js} +6 -6
- package/dist/bundle/{recognize-3CEPOW2F.js → recognize-VF5CA7EM.js} +5 -5
- package/dist/bundle/{remote-DRQEXEZL.js → remote-5C6VTPR2.js} +10 -8
- package/dist/bundle/{rerank-UL4KNNVN.js → rerank-ER7NEDOI.js} +8 -8
- package/dist/bundle/run-log-JKTLKXSK.js +124 -0
- package/dist/bundle/{serve-P5UWUOWQ.js → serve-QJWXJOM7.js} +10 -10
- package/dist/bundle/{server-M6XK2Y3X.js → server-KCIK3Y2P.js} +50 -48
- package/dist/bundle/server-LLGFDLLJ.js +75 -0
- package/dist/bundle/{services-4HRYNY62.js → services-LQMYJQG3.js} +121 -52
- package/dist/bundle/{speech-BBPBMFAO.js → speech-74GJQNQH.js} +20 -17
- package/dist/bundle/{state-GDSUNUSY.js → state-4XDGCHDF.js} +7 -7
- package/dist/bundle/{store-LBQ6FZP2.js → store-5Y5HK2L2.js} +28 -19
- package/dist/bundle/{store-VWLABMLF.js → store-Y56AHJ2Y.js} +64 -31
- package/dist/bundle/store-connection-4WI32AYU.js +89 -0
- package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
- package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
- package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
- package/dist/bundle/zm.js +34 -10
- package/dist/bundle/{zoom-app-YIEJLWCW.js → zoom-app-NVL7HEAX.js} +8 -8
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -6
- package/dist/contract-overrides.js.map +1 -1
- package/dist/ingestion-search-commands.d.ts.map +1 -1
- package/dist/ingestion-search-commands.js +0 -10
- package/dist/ingestion-search-commands.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +8 -6
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-integration.d.ts +3 -1
- package/dist/meeting-integration.d.ts.map +1 -1
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +4 -3
- package/dist/store-connection.js.map +1 -1
- package/dist/unified-search.d.ts +4 -4
- package/dist/unified-search.d.ts.map +1 -1
- package/dist/unified-search.js +1 -24
- package/dist/unified-search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/zoom-cli/SKILL.md +2 -2
- package/dist/bundle/answer-policy-GOXSDYDD.js +0 -104
- package/dist/bundle/chunk-5XWCBLUR.js +0 -27
- package/dist/bundle/chunk-AT2XKNFN.js +0 -342
- package/dist/bundle/chunk-GVT5363M.js +0 -35
- package/dist/bundle/chunk-VE2VNECR.js +0 -380
- package/dist/bundle/chunk-Y6C3N7YG.js +0 -12434
- package/dist/bundle/command-contract-RPRKHVU6.js +0 -41
- package/dist/bundle/config-QU6A6VIO.js +0 -90
- package/dist/bundle/first-run-NVTDR5VO.js +0 -28
- package/dist/bundle/first-screen-5RWZDWLK.js +0 -39
- package/dist/bundle/openai-T44ORVGQ.js +0 -25
- package/dist/bundle/run-log-UZAB5CWF.js +0 -118
- package/dist/bundle/server-F3NPVMS2.js +0 -72
- package/dist/bundle/store-connection-XEBFP56U.js +0 -83
- package/dist/bundle/store-maintenance-command-G43JN57J.js +0 -61
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CliError
|
|
5
|
-
} from "./chunk-FEM2JQN2.js";
|
|
6
|
-
import {
|
|
7
|
-
singleLine
|
|
8
|
-
} from "./chunk-OE7EIP5L.js";
|
|
9
|
-
import {
|
|
10
|
-
__name
|
|
11
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
12
|
-
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
14
|
-
var CURRENCY_SCALES = {
|
|
15
|
-
AED: 2,
|
|
16
|
-
AMD: 2,
|
|
17
|
-
AUD: 2,
|
|
18
|
-
BHD: 3,
|
|
19
|
-
BYN: 2,
|
|
20
|
-
CAD: 2,
|
|
21
|
-
CHF: 2,
|
|
22
|
-
CLP: 0,
|
|
23
|
-
CNY: 2,
|
|
24
|
-
CZK: 2,
|
|
25
|
-
DKK: 2,
|
|
26
|
-
EUR: 2,
|
|
27
|
-
GBP: 2,
|
|
28
|
-
GEL: 2,
|
|
29
|
-
HUF: 2,
|
|
30
|
-
ILS: 2,
|
|
31
|
-
INR: 2,
|
|
32
|
-
ISK: 0,
|
|
33
|
-
JPY: 0,
|
|
34
|
-
KGS: 2,
|
|
35
|
-
KRW: 0,
|
|
36
|
-
KWD: 3,
|
|
37
|
-
KZT: 2,
|
|
38
|
-
NOK: 2,
|
|
39
|
-
PLN: 2,
|
|
40
|
-
RSD: 2,
|
|
41
|
-
RUB: 2,
|
|
42
|
-
SEK: 2,
|
|
43
|
-
THB: 2,
|
|
44
|
-
TRY: 2,
|
|
45
|
-
UAH: 2,
|
|
46
|
-
USD: 2,
|
|
47
|
-
UZS: 2,
|
|
48
|
-
VND: 0
|
|
49
|
-
};
|
|
50
|
-
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
51
|
-
throw new CliError("validation_error", message, { reason });
|
|
52
|
-
}, "refuse");
|
|
53
|
-
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
54
|
-
var parseDecimal = /* @__PURE__ */ __name((text, scale) => {
|
|
55
|
-
const match = DECIMAL.exec(text.trim());
|
|
56
|
-
if (!match || (match[2] ?? "").length > scale)
|
|
57
|
-
return void 0;
|
|
58
|
-
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
59
|
-
}, "parseDecimal");
|
|
60
|
-
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
61
|
-
const value = BigInt(units);
|
|
62
|
-
if (value < 0n)
|
|
63
|
-
return `-${formatDecimal(-value, scale)}`;
|
|
64
|
-
const digits = value.toString().padStart(scale + 1, "0");
|
|
65
|
-
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
66
|
-
}, "formatDecimal");
|
|
67
|
-
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
68
|
-
const [whole = "0", fraction] = decimal.split(".");
|
|
69
|
-
const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
70
|
-
return fraction === void 0 ? grouped : `${grouped}.${fraction}`;
|
|
71
|
-
}, "groupDigits");
|
|
72
|
-
var currencyOf = /* @__PURE__ */ __name((text) => {
|
|
73
|
-
const code = typeof text === "string" ? text.trim().toUpperCase() : "";
|
|
74
|
-
if (CURRENCY_SCALES[code] === void 0)
|
|
75
|
-
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");
|
|
76
|
-
return code;
|
|
77
|
-
}, "currencyOf");
|
|
78
|
-
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
79
|
-
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
80
|
-
const scale = scaleOf(currency);
|
|
81
|
-
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
82
|
-
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
83
|
-
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");
|
|
84
|
-
return Number(units);
|
|
85
|
-
}, "minorUnits");
|
|
86
|
-
var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
87
|
-
if (typeof amount !== "string" || !amount.trim().startsWith("-"))
|
|
88
|
-
return minorUnits(amount, currency, what);
|
|
89
|
-
const units = minorUnits(amount.trim().slice(1), currency, what);
|
|
90
|
-
return units === 0 ? 0 : -units;
|
|
91
|
-
}, "signedMinorUnits");
|
|
92
|
-
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
93
|
-
amount: formatDecimal(units, scaleOf(currency)),
|
|
94
|
-
currency
|
|
95
|
-
}), "moneyOf");
|
|
96
|
-
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
97
|
-
var QUANTITY_SCALE = 3;
|
|
98
|
-
var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
99
|
-
const thousandths = typeof text === "string" ? parseDecimal(text, QUANTITY_SCALE) : void 0;
|
|
100
|
-
if (thousandths === void 0 || thousandths === 0n)
|
|
101
|
-
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
102
|
-
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
103
|
-
return { text: plain, thousandths };
|
|
104
|
-
}, "quantityOf");
|
|
105
|
-
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
106
|
-
|
|
107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
108
|
-
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
109
|
-
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
110
|
-
var MONEY_DIRECTIONS = ["in", "out"];
|
|
111
|
-
var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
|
|
112
|
-
var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
|
|
113
|
-
if (current === "draft" || current === "void")
|
|
114
|
-
return current;
|
|
115
|
-
if (paid <= 0)
|
|
116
|
-
return "issued";
|
|
117
|
-
return paid < total ? "partly_paid" : "paid";
|
|
118
|
-
}, "settledStatus");
|
|
119
|
-
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
120
|
-
var notes = /* @__PURE__ */ __name((...words) => {
|
|
121
|
-
const kept = words.filter((word) => word !== null);
|
|
122
|
-
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
123
|
-
}, "notes");
|
|
124
|
-
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
125
|
-
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
126
|
-
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
127
|
-
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
128
|
-
}, "invoiceLine");
|
|
129
|
-
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
130
|
-
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
131
|
-
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
132
|
-
}, "paymentLine");
|
|
133
|
-
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
134
|
-
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
135
|
-
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
137
|
-
var CATALOG_KINDS = ["product", "service"];
|
|
138
|
-
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
139
|
-
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
140
|
-
var CONTRACT_STATUSES = ["draft", "active", "ended", "terminated"];
|
|
141
|
-
var PERIOD_UNITS = ["day", "week", "month", "year"];
|
|
142
|
-
var SUBSCRIPTION_STATUSES = ["trial", "active", "paused", "cancelled", "ended"];
|
|
143
|
-
var WALLET_KINDS = ["bank", "card", "cash", "wallet", "other"];
|
|
144
|
-
var TRANSACTION_STATUSES = ["pending", "booked"];
|
|
145
|
-
var ORDER_DIRECTIONS = ["purchase", "sale"];
|
|
146
|
-
var intervalOf = /* @__PURE__ */ __name((text, reason = "subscription.interval") => {
|
|
147
|
-
const match = typeof text === "string" ? /^(?:([1-9]\d{0,2})-)?(day|week|month|year)$/.exec(text.trim()) : null;
|
|
148
|
-
if (!match)
|
|
149
|
-
throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
|
|
150
|
-
return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
|
|
151
|
-
}, "intervalOf");
|
|
152
|
-
var intervalText = /* @__PURE__ */ __name(({ count, unit }) => `${count}-${unit}`, "intervalText");
|
|
153
|
-
var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
|
|
154
|
-
var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
|
|
155
|
-
var productLine = /* @__PURE__ */ __name((product) => {
|
|
156
|
-
const price = product.unitPrice === null || product.currency === null ? "" : moneyLabel(product.unitPrice, product.currency);
|
|
157
|
-
const per = price && product.unit !== null ? ` per ${product.unit}` : "";
|
|
158
|
-
return `${product.name}${price ? ` \xB7 ${price}${per}` : ""}${notes(product.kind, product.archived ? "archived" : null)}`;
|
|
159
|
-
}, "productLine");
|
|
160
|
-
var contractLine = /* @__PURE__ */ __name((contract) => `${contract.number ?? `#${contract.id}`} \xB7 ${contract.name}${priced(contract.value, contract.currency)}` + notes(contract.status, pending(contract.review)), "contractLine");
|
|
161
|
-
var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.name}${priced(subscription.price, subscription.currency)} every ${intervalText(subscription.interval)}` + notes(subscription.status, pending(subscription.review)), "subscriptionLine");
|
|
162
|
-
var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
|
|
163
|
-
var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
|
|
164
|
-
|
|
165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
166
|
-
var DEAL_KINDS = ["deal", "lead"];
|
|
167
|
-
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
168
|
-
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
169
|
-
var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
|
|
170
|
-
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
171
|
-
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
172
|
-
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
173
|
-
}, "dealLine");
|
|
174
|
-
|
|
175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
176
|
-
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
177
|
-
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
178
|
-
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
179
|
-
const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
|
|
180
|
-
const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
|
|
181
|
-
return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
|
|
182
|
-
}, "orderLine");
|
|
183
|
-
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
184
|
-
|
|
185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
186
|
-
var ORGANIZATION_ROLES = [
|
|
187
|
-
"employee",
|
|
188
|
-
"contractor",
|
|
189
|
-
"founder",
|
|
190
|
-
"owner",
|
|
191
|
-
"manager",
|
|
192
|
-
"adviser",
|
|
193
|
-
"contact"
|
|
194
|
-
];
|
|
195
|
-
var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
|
|
196
|
-
var RELATIONS = {
|
|
197
|
-
"member-of": {
|
|
198
|
-
from: ["person", "organization", "project", "chat", "email_thread"],
|
|
199
|
-
to: ["organization", "project"],
|
|
200
|
-
roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
|
|
201
|
-
},
|
|
202
|
-
"reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
|
|
203
|
-
"customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
|
|
204
|
-
"partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
|
|
205
|
-
"related-to": {
|
|
206
|
-
from: ["person", "organization", "project", "task", "deal", "lead"],
|
|
207
|
-
to: ["person", "organization", "project", "task"],
|
|
208
|
-
roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
var RELATION_KINDS = Object.keys(RELATIONS);
|
|
212
|
-
var specOf = /* @__PURE__ */ __name((kind) => Object.hasOwn(RELATIONS, kind) ? RELATIONS[kind] : void 0, "specOf");
|
|
213
|
-
var isRelationKind = /* @__PURE__ */ __name((kind) => specOf(kind) !== void 0, "isRelationKind");
|
|
214
|
-
var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
|
|
215
|
-
var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
|
|
216
|
-
const spec = specOf(kind);
|
|
217
|
-
if (!spec)
|
|
218
|
-
throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
|
|
219
|
-
if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
|
|
220
|
-
throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
|
|
221
|
-
if (!spec.from.includes(from) || !spec.to.includes(to))
|
|
222
|
-
throw new CliError("validation_error", `${kind} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
|
|
223
|
-
return spec;
|
|
224
|
-
}, "checkEnds");
|
|
225
|
-
var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
|
|
226
|
-
const spec = specOf(kind);
|
|
227
|
-
if (kind === "member-of" && from !== "person")
|
|
228
|
-
return void 0;
|
|
229
|
-
return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
|
|
230
|
-
}, "rolesOf");
|
|
231
|
-
var ROLE_LISTS = { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES, deal: DEAL_ROLES };
|
|
232
|
-
var roleListOf = /* @__PURE__ */ __name((kind, from, to) => {
|
|
233
|
-
const roles = rolesOf(kind, from, to);
|
|
234
|
-
return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
|
|
235
|
-
}, "roleListOf");
|
|
236
|
-
var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
|
|
237
|
-
const roles = rolesOf(kind, from, to)?.concat(extra);
|
|
238
|
-
if (roles && !roles.includes(role))
|
|
239
|
-
throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
|
|
240
|
-
reason: "relationship.role-unknown"
|
|
241
|
-
});
|
|
242
|
-
return role;
|
|
243
|
-
}, "checkRole");
|
|
244
|
-
var isSymmetric = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric === true, "isSymmetric");
|
|
245
|
-
var inverseOf = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric ? kind : specOf(kind)?.inverse ?? null, "inverseOf");
|
|
246
|
-
var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
|
|
247
|
-
var standingOf = /* @__PURE__ */ __name((link, now) => {
|
|
248
|
-
if (link.endsAt != null && link.endsAt <= now)
|
|
249
|
-
return "ended";
|
|
250
|
-
if (link.confirmed)
|
|
251
|
-
return "confirmed";
|
|
252
|
-
if (link.deletedAt != null)
|
|
253
|
-
return "ended";
|
|
254
|
-
return link.accountId != null ? "reported" : "proposed";
|
|
255
|
-
}, "standingOf");
|
|
256
|
-
var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
|
|
257
|
-
var usableLink = /* @__PURE__ */ __name((link, now) => isUsable(standingOf(link, now)), "usableLink");
|
|
258
|
-
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE 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");
|
|
259
|
-
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");
|
|
260
|
-
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
262
|
-
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
263
|
-
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
264
|
-
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
265
|
-
const tag = value.trim().toLowerCase();
|
|
266
|
-
return TAG.test(tag) ? tag : void 0;
|
|
267
|
-
}, "tagOf");
|
|
268
|
-
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
269
|
-
const tag = tagOf(value);
|
|
270
|
-
if (tag === void 0)
|
|
271
|
-
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
272
|
-
return tag;
|
|
273
|
-
}, "normalizeTag");
|
|
274
|
-
|
|
275
|
-
export {
|
|
276
|
-
CURRENCY_SCALES,
|
|
277
|
-
parseDecimal,
|
|
278
|
-
formatDecimal,
|
|
279
|
-
currencyOf,
|
|
280
|
-
scaleOf,
|
|
281
|
-
minorUnits,
|
|
282
|
-
signedMinorUnits,
|
|
283
|
-
moneyOf,
|
|
284
|
-
moneyLabel,
|
|
285
|
-
quantityOf,
|
|
286
|
-
lineUnits,
|
|
287
|
-
INVOICE_DIRECTIONS,
|
|
288
|
-
INVOICE_STATUSES,
|
|
289
|
-
MONEY_DIRECTIONS,
|
|
290
|
-
FINANCE_REVIEWS,
|
|
291
|
-
settledStatus,
|
|
292
|
-
invoiceLine,
|
|
293
|
-
paymentLine,
|
|
294
|
-
invoiceTitle,
|
|
295
|
-
paymentEntryTitle,
|
|
296
|
-
CATALOG_KINDS,
|
|
297
|
-
BUSINESS_KINDS,
|
|
298
|
-
CONTRACT_KINDS,
|
|
299
|
-
CONTRACT_STATUSES,
|
|
300
|
-
PERIOD_UNITS,
|
|
301
|
-
SUBSCRIPTION_STATUSES,
|
|
302
|
-
WALLET_KINDS,
|
|
303
|
-
TRANSACTION_STATUSES,
|
|
304
|
-
ORDER_DIRECTIONS,
|
|
305
|
-
intervalOf,
|
|
306
|
-
intervalText,
|
|
307
|
-
productLine,
|
|
308
|
-
contractLine,
|
|
309
|
-
subscriptionLine,
|
|
310
|
-
walletLine,
|
|
311
|
-
transactionLine,
|
|
312
|
-
DEAL_KINDS,
|
|
313
|
-
DEAL_STATUSES,
|
|
314
|
-
STAGE_OUTCOMES,
|
|
315
|
-
DEAL_ROLES,
|
|
316
|
-
dealLine,
|
|
317
|
-
ORDER_STATUSES,
|
|
318
|
-
ORDER_PURPOSES,
|
|
319
|
-
orderLine,
|
|
320
|
-
orderTitle,
|
|
321
|
-
ORGANIZATION_ROLES,
|
|
322
|
-
PROJECT_ROLES,
|
|
323
|
-
RELATIONS,
|
|
324
|
-
RELATION_KINDS,
|
|
325
|
-
isRelationKind,
|
|
326
|
-
checkEnds,
|
|
327
|
-
rolesOf,
|
|
328
|
-
ROLE_LISTS,
|
|
329
|
-
roleListOf,
|
|
330
|
-
checkRole,
|
|
331
|
-
isSymmetric,
|
|
332
|
-
inverseOf,
|
|
333
|
-
STANDINGS,
|
|
334
|
-
standingOf,
|
|
335
|
-
isUsable,
|
|
336
|
-
usableLink,
|
|
337
|
-
notOverriddenSql,
|
|
338
|
-
usableLinkSql,
|
|
339
|
-
TAG_TYPES,
|
|
340
|
-
tagOf,
|
|
341
|
-
normalizeTag
|
|
342
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
resolvePaths
|
|
5
|
-
} from "./chunk-OORMSM6O.js";
|
|
6
|
-
import {
|
|
7
|
-
__name
|
|
8
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
-
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
|
-
import { userInfo } from "node:os";
|
|
12
|
-
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
13
|
-
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
14
|
-
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
15
|
-
var accountHome = /* @__PURE__ */ __name(() => {
|
|
16
|
-
try {
|
|
17
|
-
return userInfo().homedir;
|
|
18
|
-
} catch {
|
|
19
|
-
return void 0;
|
|
20
|
-
}
|
|
21
|
-
}, "accountHome");
|
|
22
|
-
var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
|
|
23
|
-
if (!env.VITEST || !home || file === ":memory:")
|
|
24
|
-
return;
|
|
25
|
-
const inside = relative(wirecatDirectory({ HOME: home, USERPROFILE: home }), resolve(file));
|
|
26
|
-
if (inside.startsWith("..") || isAbsolute(inside))
|
|
27
|
-
return;
|
|
28
|
-
throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
|
|
29
|
-
}, "refuseOwnerStoreInTests");
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
wirecatDirectory,
|
|
33
|
-
storePath,
|
|
34
|
-
refuseOwnerStoreInTests
|
|
35
|
-
};
|