@wirecat/zoom-cli 0.60.1 → 0.61.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/README.md +3 -3
- package/dist/answers.d.ts +16 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{chunk-3R437ICM.js → all-profiles-HZLIU6RZ.js} +11 -7
- package/dist/bundle/answer-policy-GRODO2DY.js +96 -0
- package/dist/bundle/{anthropic-CSLAACWX.js → anthropic-O2YYPCVK.js} +4 -4
- package/dist/bundle/{app-server-RYYXX6QV.js → app-server-YYCANTUE.js} +50 -50
- package/dist/bundle/{bun-JVDJVDHL.js → bun-UEFRULAT.js} +2 -2
- package/dist/bundle/{bun-sqlite-B5CZHAV4.js → bun-sqlite-VVYKOY7S.js} +3 -3
- package/dist/bundle/{chunk-KNAS4VEA.js → chunk-2M2U43IF.js} +2 -2
- package/dist/bundle/{chunk-QKSCDALS.js → chunk-35X6G276.js} +1 -1
- package/dist/bundle/{chunk-PPHUBORC.js → chunk-3TGR4RDD.js} +32 -34
- package/dist/bundle/{chunk-WEUXLXOZ.js → chunk-4XI4PDEH.js} +31 -21
- package/dist/bundle/{chunk-W5EUHV3J.js → chunk-4XPIOW5L.js} +1 -1
- package/dist/bundle/{chunk-XS72YFPV.js → chunk-5NRBNGR3.js} +2 -2
- package/dist/bundle/{chunk-VVKHF6VJ.js → chunk-67WW33JB.js} +49 -24
- package/dist/bundle/{chunk-KYUIU5UR.js → chunk-6LHTWR3X.js} +2 -2
- package/dist/bundle/{chunk-K6NPOZUP.js → chunk-6RV7KXDF.js} +7 -7
- package/dist/bundle/{chunk-46R2JTGO.js → chunk-6SLGIPLT.js} +2 -2
- package/dist/bundle/{chunk-IQENQXUJ.js → chunk-77GJITSU.js} +2 -2
- package/dist/bundle/{chunk-BO7J5Z3T.js → chunk-7ATLKYBN.js} +17 -17
- package/dist/bundle/{chunk-VJBVNDFR.js → chunk-7DMMNCY2.js} +3 -3
- package/dist/bundle/chunk-ABCHE4YP.js +217 -0
- package/dist/bundle/{chunk-Y3YURIZF.js → chunk-AOSIU5T6.js} +51 -38
- package/dist/bundle/{chunk-HYZ545ON.js → chunk-B3PTSX5D.js} +2 -2
- package/dist/bundle/{chunk-GEVHI226.js → chunk-B45MFBBF.js} +6 -6
- package/dist/bundle/{chunk-6BJQBVMN.js → chunk-BNUNZTOU.js} +25 -25
- package/dist/bundle/{chunk-ZDRDCANC.js → chunk-BPQNTYLN.js} +388 -299
- package/dist/bundle/{chunk-VLE3FWE3.js → chunk-CMG54Q4X.js} +120 -32
- package/dist/bundle/{chunk-RACSKYNX.js → chunk-COU66X3X.js} +7 -5
- package/dist/bundle/{chunk-AOZGGGUK.js → chunk-CUSGSXSR.js} +2 -2
- package/dist/bundle/{chunk-MFS52LTZ.js → chunk-DLAFGSTN.js} +1 -1
- package/dist/bundle/{chunk-V53IB5AU.js → chunk-E4QPLXZT.js} +47 -47
- package/dist/bundle/{chunk-EUHQ5D4K.js → chunk-E4T7IJJO.js} +26 -26
- package/dist/bundle/{chunk-3LBA63D5.js → chunk-F32GKBMF.js} +22 -5
- package/dist/bundle/{chunk-YEZQ7SD7.js → chunk-FAOVUALC.js} +13 -13
- package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-FBJC7OCI.js} +1 -1
- package/dist/bundle/{chunk-HIAO4MPA.js → chunk-FQ54A7GI.js} +1 -1
- package/dist/bundle/{chunk-ES6UWVTM.js → chunk-FXY45HU7.js} +6 -6
- package/dist/bundle/{chunk-REC3AZP6.js → chunk-GNHPYQMM.js} +2 -2
- package/dist/bundle/{chunk-TY5PBEH2.js → chunk-H5EAHMQN.js} +11 -11
- package/dist/bundle/chunk-HF233RN4.js +335 -0
- package/dist/bundle/{chunk-RUEPZTNA.js → chunk-HTGBUE2U.js} +2 -2
- package/dist/bundle/{chunk-HAUAEGGI.js → chunk-IKZFR645.js} +10 -10
- package/dist/bundle/chunk-JKWYXBGK.js +380 -0
- package/dist/bundle/{chunk-EN5DBDKW.js → chunk-KGZHRJ7H.js} +4 -4
- package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-KPZIQKOF.js} +1 -1
- package/dist/bundle/{chunk-PAEBFJUC.js → chunk-KXYURHVE.js} +118 -95
- package/dist/bundle/{chunk-IRX2YVAH.js → chunk-KZGHGU2M.js} +4 -4
- package/dist/bundle/{chunk-ZXQCA3ZW.js → chunk-KZV5GU7G.js} +8 -8
- package/dist/bundle/{chunk-R4SRXI7M.js → chunk-L7VIPVHL.js} +166 -102
- package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-LPJ3S6GE.js} +1 -1
- package/dist/bundle/{chunk-HBYE4EP2.js → chunk-LX6DO44O.js} +1 -1
- package/dist/bundle/{chunk-N27LOY3D.js → chunk-LXOSBFWW.js} +7 -7
- package/dist/bundle/{chunk-KXEC5FVT.js → chunk-M3EVVGR6.js} +2 -2
- package/dist/bundle/{chunk-YLATWUE7.js → chunk-MBMDF5EL.js} +6 -6
- package/dist/bundle/{chunk-AZZPMHP2.js → chunk-MTAVA2LS.js} +2 -2
- package/dist/bundle/{chunk-7IDNHVJS.js → chunk-MVRCLMQL.js} +2 -2
- package/dist/bundle/{chunk-LVHZQCP4.js → chunk-NVN4O5IC.js} +14 -10
- package/dist/bundle/{chunk-4TCQT57W.js → chunk-O3WVOAT7.js} +408 -420
- package/dist/bundle/{chunk-UWVNY5CA.js → chunk-OLZE27RS.js} +2 -2
- package/dist/bundle/{chunk-XX7KVQIG.js → chunk-OMUX4LSS.js} +4 -4
- package/dist/bundle/{chunk-IQSBMAYB.js → chunk-OU46OTTE.js} +3 -3
- package/dist/bundle/{chunk-Z4D6M62I.js → chunk-OVVDOVLN.js} +2 -2
- package/dist/bundle/{chunk-WB7MQHUI.js → chunk-P2NRA7E5.js} +2 -2
- package/dist/bundle/{chunk-PEMLI3T7.js → chunk-PCUPOGKR.js} +6 -4
- package/dist/bundle/{chunk-OEEMCNAO.js → chunk-QHT2LZRW.js} +6 -6
- package/dist/bundle/{decode-CTQJQYNU.js → chunk-RGOBGHWE.js} +21 -18
- package/dist/bundle/{chunk-Q7U627RY.js → chunk-RSXLI5GP.js} +79 -59
- package/dist/bundle/{chunk-LPY2ISJK.js → chunk-S726LZCH.js} +6 -6
- package/dist/bundle/{chunk-PATM7JGR.js → chunk-SVBM6F4Z.js} +1 -1
- package/dist/bundle/{chunk-X7YPTYM4.js → chunk-T7IQMYPW.js} +15 -3
- package/dist/bundle/{chunk-WFT2GGFH.js → chunk-TD4Y5LXG.js} +25 -22
- package/dist/bundle/{chunk-FZMRHNOP.js → chunk-U4Y2QQ2D.js} +3 -3
- package/dist/bundle/{chunk-CGCJ6P3A.js → chunk-UPWHCUVA.js} +617 -380
- package/dist/bundle/{chunk-FWJ3Q7NO.js → chunk-UYAKSUT5.js} +5 -5
- package/dist/bundle/{chunk-LPDYI5GR.js → chunk-VARX3SBT.js} +1 -1
- package/dist/bundle/{chunk-WWNZS7ZY.js → chunk-WVYSOV3C.js} +16 -4
- package/dist/bundle/{chunk-VKUS2V4L.js → chunk-XOJGXWTK.js} +8 -8
- package/dist/bundle/{chunk-OBUKZ2ZM.js → chunk-XX2PDQ54.js} +31 -211
- package/dist/bundle/{chunk-43BX56ZI.js → chunk-XZ4OVTA5.js} +9 -9
- package/dist/bundle/{chunk-Z5H47R4G.js → chunk-YESOQEOB.js} +735 -826
- package/dist/bundle/{cli-CYKEKT5P.js → cli-O4LAGYXI.js} +60 -54
- package/dist/bundle/command-contract-67QKBY6M.js +38 -0
- package/dist/bundle/config-ABURZDD2.js +78 -0
- package/dist/bundle/decode-WRMZJJCR.js +20 -0
- package/dist/bundle/{dist-YLSQKPPY.js → dist-SQK4GIJT.js} +14 -14
- package/dist/bundle/{echarts-4OQHS575.js → echarts-3DOOJSQR.js} +2 -2
- package/dist/bundle/{embed-P2BKRRJD.js → embed-OYRHTMFI.js} +4 -4
- package/dist/bundle/{embedder-HC6ZARP5.js → embedder-ZAYCL22W.js} +7 -7
- package/dist/bundle/{first-run-UERFFXBV.js → first-run-QXSPIXOQ.js} +8 -8
- package/dist/bundle/first-screen-MD6HWIJW.js +36 -0
- package/dist/bundle/{folders-RSLPTZLJ.js → folders-EXQLKXVK.js} +2 -2
- package/dist/bundle/{instructions-3QZBKKPF.js → instructions-GFEOB7XJ.js} +1 -1
- package/dist/bundle/{main-2T6D77JC.js → main-RADF3CRI.js} +16 -16
- package/dist/bundle/{mcp-OQBZXELQ.js → mcp-WSGVVZWI.js} +2 -2
- package/dist/bundle/{meetings-ZIDSQZBJ.js → meetings-6BIIT42H.js} +4 -4
- package/dist/bundle/{node-R2BLYUSB.js → node-A3B2YRQI.js} +2 -2
- package/dist/bundle/{node-sqlite-7CGHAHIS.js → node-sqlite-XRP5FUDY.js} +3 -3
- package/dist/bundle/{oauth-UBCYXTWV.js → oauth-YICY4AN4.js} +5 -5
- package/dist/bundle/{open-AWUB4Q7Z.js → open-4CNKSQRB.js} +2 -2
- package/dist/bundle/openai-YYRO3X7I.js +22 -0
- package/dist/bundle/{output-file-SN22HAVL.js → output-file-7BXYV6OL.js} +3 -3
- package/dist/bundle/{process-IX5YWGDP.js → process-A45QXKID.js} +1 -1
- package/dist/bundle/{program-STYPTNT3.js → program-DTP7BRTW.js} +415 -428
- package/dist/bundle/{prompt-MAYUHEGN.js → prompt-5LMKO7SE.js} +3 -3
- package/dist/bundle/{recognize-FVTNXRTF.js → recognize-MB6WRGUD.js} +4 -2
- package/dist/bundle/{remote-WCPRU73L.js → remote-PD7WMTTS.js} +5 -5
- package/dist/bundle/{rerank-6CBLZBCV.js → rerank-7E6GQ5Y6.js} +5 -5
- package/dist/bundle/{run-log-G4WZTOBW.js → run-log-TCFK4LEC.js} +53 -53
- package/dist/bundle/{chunk-XNUFDYR6.js → serve-JBT2BWHK.js} +8 -6
- package/dist/bundle/server-CFIKEPLG.js +66 -0
- package/dist/bundle/{chunk-INARC5O7.js → server-H2UPGGBI.js} +43 -10
- package/dist/bundle/{services-326Z3TNE.js → services-SJOTKL5V.js} +33 -26
- package/dist/bundle/{speech-KSZ7RKM3.js → speech-4SL25GSC.js} +28 -5
- package/dist/bundle/{state-EPB3L2JM.js → state-FVMTDZ6B.js} +4 -4
- package/dist/bundle/{store-KO242JBK.js → store-DNPKBUVO.js} +13 -13
- package/dist/bundle/{store-7WX7SW2R.js → store-TI77SCNL.js} +15 -15
- package/dist/bundle/store-connection-GIFWWMNO.js +76 -0
- package/dist/bundle/store-maintenance-command-WBKGF2CZ.js +55 -0
- package/dist/bundle/{streaming-M6VDKBBH.js → streaming-UHAHGPH5.js} +4 -4
- package/dist/bundle/{tokens-BTNXHR7T.js → tokens-Y2MX6JBL.js} +4 -4
- package/dist/bundle/zm.js +1 -1
- package/dist/commands.d.ts +1 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -16
- package/dist/commands.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -158
- package/dist/contract-overrides.js.map +1 -1
- package/dist/program-bindings.d.ts +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +16 -18
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +2 -4
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js.map +1 -1
- package/dist/read-only.d.ts.map +1 -1
- package/dist/read-only.js +3 -0
- package/dist/read-only.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +82 -32
- package/dist/run.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +8 -46
- package/dist/setup-commands.js.map +1 -1
- package/dist/store-commands.d.ts.map +1 -1
- package/dist/store-commands.js +4 -1
- package/dist/store-commands.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/all-profiles-E6KXASLY.js +0 -25
- package/dist/bundle/answer-policy-YWCC55NB.js +0 -96
- package/dist/bundle/chunk-DBSWVZES.js +0 -48
- package/dist/bundle/chunk-WYRYLBST.js +0 -390
- package/dist/bundle/chunk-YLBNPI7H.js +0 -2
- package/dist/bundle/command-contract-P45QCCXM.js +0 -38
- package/dist/bundle/config-JYKTLEA3.js +0 -79
- package/dist/bundle/first-screen-VFIS7FX3.js +0 -36
- package/dist/bundle/mcp-4VHVUMCR.js +0 -92
- package/dist/bundle/mcp-6CLW2IZM.js +0 -189
- package/dist/bundle/serve-3IDUVTZL.js +0 -19
- package/dist/bundle/server-7GU36TER.js +0 -66
- package/dist/bundle/server-VHRS5UAL.js +0 -53
- package/dist/bundle/store-connection-K3MNDCQQ.js +0 -76
- package/dist/bundle/store-maintenance-command-GJDJYI2U.js +0 -54
- package/dist/mcp-command.d.ts +0 -33
- package/dist/mcp-command.d.ts.map +0 -1
- package/dist/mcp-command.js +0 -143
- package/dist/mcp-command.js.map +0 -1
- package/dist/mcp.d.ts +0 -30
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -110
- package/dist/mcp.js.map +0 -1
- /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-62EDJKGP.js} +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
VERSION
|
|
5
|
-
} from "./chunk-PATM7JGR.js";
|
|
6
|
-
import "./chunk-ZDRDCANC.js";
|
|
7
|
-
import "./chunk-HAUAEGGI.js";
|
|
8
|
-
import "./chunk-HBYE4EP2.js";
|
|
9
|
-
import "./chunk-ZK7Y5K63.js";
|
|
10
|
-
import "./chunk-VLE3FWE3.js";
|
|
11
|
-
import "./chunk-DBSWVZES.js";
|
|
12
|
-
import "./chunk-YEZQ7SD7.js";
|
|
13
|
-
import "./chunk-XX7KVQIG.js";
|
|
14
|
-
import "./chunk-V53IB5AU.js";
|
|
15
|
-
import "./chunk-EUHQ5D4K.js";
|
|
16
|
-
import "./chunk-WFT2GGFH.js";
|
|
17
|
-
import "./chunk-IQSBMAYB.js";
|
|
18
|
-
import "./chunk-Z5H47R4G.js";
|
|
19
|
-
import "./chunk-BO7J5Z3T.js";
|
|
20
|
-
import "./chunk-N27LOY3D.js";
|
|
21
|
-
import "./chunk-OEEMCNAO.js";
|
|
22
|
-
import "./chunk-PAEBFJUC.js";
|
|
23
|
-
import {
|
|
24
|
-
judgedEffects,
|
|
25
|
-
judgedTargets
|
|
26
|
-
} from "./chunk-Y3YURIZF.js";
|
|
27
|
-
import "./chunk-KYUIU5UR.js";
|
|
28
|
-
import "./chunk-W5EUHV3J.js";
|
|
29
|
-
import "./chunk-VKUS2V4L.js";
|
|
30
|
-
import "./chunk-WEUXLXOZ.js";
|
|
31
|
-
import "./chunk-IQENQXUJ.js";
|
|
32
|
-
import "./chunk-WWNZS7ZY.js";
|
|
33
|
-
import "./chunk-TY5PBEH2.js";
|
|
34
|
-
import "./chunk-RACSKYNX.js";
|
|
35
|
-
import "./chunk-MFS52LTZ.js";
|
|
36
|
-
import "./chunk-IRX2YVAH.js";
|
|
37
|
-
import "./chunk-43BX56ZI.js";
|
|
38
|
-
import {
|
|
39
|
-
failureContext
|
|
40
|
-
} from "./chunk-X7YPTYM4.js";
|
|
41
|
-
import "./chunk-HYZ545ON.js";
|
|
42
|
-
import "./chunk-LPY2ISJK.js";
|
|
43
|
-
import "./chunk-HTQTIKWP.js";
|
|
44
|
-
import "./chunk-EN5DBDKW.js";
|
|
45
|
-
import "./chunk-AOZGGGUK.js";
|
|
46
|
-
import "./chunk-VJBVNDFR.js";
|
|
47
|
-
import "./chunk-AZZPMHP2.js";
|
|
48
|
-
import "./chunk-REC3AZP6.js";
|
|
49
|
-
import "./chunk-WB7MQHUI.js";
|
|
50
|
-
import "./chunk-FZMRHNOP.js";
|
|
51
|
-
import "./chunk-GEVHI226.js";
|
|
52
|
-
import "./chunk-PEMLI3T7.js";
|
|
53
|
-
import "./chunk-CGCJ6P3A.js";
|
|
54
|
-
import "./chunk-K6NPOZUP.js";
|
|
55
|
-
import "./chunk-ZXQCA3ZW.js";
|
|
56
|
-
import "./chunk-FWJ3Q7NO.js";
|
|
57
|
-
import "./chunk-ES6UWVTM.js";
|
|
58
|
-
import "./chunk-Z4D6M62I.js";
|
|
59
|
-
import "./chunk-KXEC5FVT.js";
|
|
60
|
-
import "./chunk-YLATWUE7.js";
|
|
61
|
-
import "./chunk-Q7U627RY.js";
|
|
62
|
-
import "./chunk-LVHZQCP4.js";
|
|
63
|
-
import "./chunk-O5EHUB2V.js";
|
|
64
|
-
import {
|
|
65
|
-
errorObjectOf,
|
|
66
|
-
errorRecordOf,
|
|
67
|
-
exitCodeOfError,
|
|
68
|
-
renderError
|
|
69
|
-
} from "./chunk-R4SRXI7M.js";
|
|
70
|
-
import "./chunk-Y5E2WNWB.js";
|
|
71
|
-
import "./chunk-HIAO4MPA.js";
|
|
72
|
-
import {
|
|
73
|
-
__name
|
|
74
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
75
|
-
|
|
76
|
-
// dist/answer-policy.js
|
|
77
|
-
var hostFailureContext = /* @__PURE__ */ __name((registry, effects) => ({
|
|
78
|
-
...failureContext(),
|
|
79
|
-
...effects ? { effects: judgedEffects(effects) } : {},
|
|
80
|
-
...registry ? { targets: judgedTargets(registry) } : {}
|
|
81
|
-
}), "hostFailureContext");
|
|
82
|
-
var reportFailure = /* @__PURE__ */ __name((failure, args, deps, command = "zm", context = hostFailureContext()) => {
|
|
83
|
-
const end = args.indexOf("--");
|
|
84
|
-
const flags = args.slice(0, end < 0 ? void 0 : end);
|
|
85
|
-
const machine = flags.some((word) => word === "--json" || word === "--jsonl");
|
|
86
|
-
const object = errorObjectOf(failure, context);
|
|
87
|
-
const record = flags.includes("--debug") ? errorRecordOf(failure, object, { command, service: "zm", version: VERSION }) : void 0;
|
|
88
|
-
const interactive = deps.outputIsTTY === true && !machine;
|
|
89
|
-
deps.diagnostic(`${renderError(object, { cli: "zm", interactive, ...record ? { record } : {} })}
|
|
90
|
-
`);
|
|
91
|
-
return exitCodeOfError(object);
|
|
92
|
-
}, "reportFailure");
|
|
93
|
-
export {
|
|
94
|
-
hostFailureContext,
|
|
95
|
-
reportFailure
|
|
96
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CliError
|
|
5
|
-
} from "./chunk-R4SRXI7M.js";
|
|
6
|
-
import {
|
|
7
|
-
__name
|
|
8
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
-
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/http/public-url.js
|
|
11
|
-
var EXAMPLE = "--public-url https://<name>.ts.net";
|
|
12
|
-
var publicUrlOf = /* @__PURE__ */ __name((given, { missing, reaches, path = false }) => {
|
|
13
|
-
if (!given)
|
|
14
|
-
throw new CliError("configuration_error", `${missing} needs the tunnel's address: ${EXAMPLE}`);
|
|
15
|
-
let url;
|
|
16
|
-
try {
|
|
17
|
-
url = new URL(given);
|
|
18
|
-
} catch {
|
|
19
|
-
throw new CliError("validation_error", `--public-url is not an address: ${EXAMPLE}`);
|
|
20
|
-
}
|
|
21
|
-
if (url.username || url.password)
|
|
22
|
-
throw new CliError("validation_error", "--public-url must not contain login credentials");
|
|
23
|
-
const local = url.protocol === "http:" && ["localhost", "127.0.0.1"].includes(url.hostname);
|
|
24
|
-
if (url.protocol !== "https:" && !local)
|
|
25
|
-
throw new CliError("validation_error", `--public-url must be https \u2014 ${reaches} through it`);
|
|
26
|
-
if (url.search || url.hash || !path && url.pathname !== "/")
|
|
27
|
-
throw new CliError("validation_error", path ? `--public-url is the tunnel's address, or a path of it, without a query: ${EXAMPLE}/tg` : `--public-url is the tunnel's address only, without a path: ${EXAMPLE}`);
|
|
28
|
-
if (path && !/^(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\/?$/.test(url.pathname))
|
|
29
|
-
throw new CliError("validation_error", "--public-url's path takes letters, digits, dot, dash and underscore: /tg");
|
|
30
|
-
if (path)
|
|
31
|
-
url.pathname = url.pathname.replace(/\/+$/, "") || "/";
|
|
32
|
-
return url;
|
|
33
|
-
}, "publicUrlOf");
|
|
34
|
-
var portOf = /* @__PURE__ */ __name((given, fallback) => {
|
|
35
|
-
if (given === void 0)
|
|
36
|
-
return fallback;
|
|
37
|
-
const port = Number(given);
|
|
38
|
-
if (!Number.isInteger(port) || port < 1 || port > 65535)
|
|
39
|
-
throw new CliError("validation_error", "--port takes 1\u201365535");
|
|
40
|
-
return port;
|
|
41
|
-
}, "portOf");
|
|
42
|
-
var mcpUrlOf = /* @__PURE__ */ __name((publicUrl) => new URL(`${publicUrl.pathname.replace(/\/+$/, "")}/mcp`, publicUrl.origin), "mcpUrlOf");
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
publicUrlOf,
|
|
46
|
-
portOf,
|
|
47
|
-
mcpUrlOf
|
|
48
|
-
};
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
parsePermissions
|
|
5
|
-
} from "./chunk-4TCQT57W.js";
|
|
6
|
-
import {
|
|
7
|
-
checkConfigText,
|
|
8
|
-
issueMessage,
|
|
9
|
-
usableProfileName
|
|
10
|
-
} from "./chunk-Y3YURIZF.js";
|
|
11
|
-
import {
|
|
12
|
-
LEVELS
|
|
13
|
-
} from "./chunk-AOZGGGUK.js";
|
|
14
|
-
import {
|
|
15
|
-
CliError,
|
|
16
|
-
array,
|
|
17
|
-
boolean,
|
|
18
|
-
check,
|
|
19
|
-
custom,
|
|
20
|
-
integer,
|
|
21
|
-
literal,
|
|
22
|
-
maxLength,
|
|
23
|
-
minValue,
|
|
24
|
-
nullable,
|
|
25
|
-
number,
|
|
26
|
-
optional,
|
|
27
|
-
parse,
|
|
28
|
-
picklist,
|
|
29
|
-
pipe,
|
|
30
|
-
record,
|
|
31
|
-
regex,
|
|
32
|
-
safeParse,
|
|
33
|
-
saveConfigFile,
|
|
34
|
-
strictObject,
|
|
35
|
-
string,
|
|
36
|
-
union
|
|
37
|
-
} from "./chunk-R4SRXI7M.js";
|
|
38
|
-
import {
|
|
39
|
-
__name
|
|
40
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
41
|
-
|
|
42
|
-
// dist/config.js
|
|
43
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
44
|
-
|
|
45
|
-
// dist/config-issues.js
|
|
46
|
-
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
47
|
-
var SETTING_NAMES = {
|
|
48
|
-
client_id: "zoom.client_id",
|
|
49
|
-
source: "source",
|
|
50
|
-
files_folder: "files.folder",
|
|
51
|
-
files_timezone: "files.timezone",
|
|
52
|
-
context_sources: "context.sources",
|
|
53
|
-
record: "record",
|
|
54
|
-
keep_runs_for_days: "keep_runs_for_days",
|
|
55
|
-
keep_successful_runs_for_days: "keep_successful_runs_for_days",
|
|
56
|
-
runs_size_limit_mb: "runs_size_limit_mb",
|
|
57
|
-
record_input: "record_input"
|
|
58
|
-
};
|
|
59
|
-
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
60
|
-
var fileIssue = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what, at: [] }), "fileIssue");
|
|
61
|
-
var pathOf = /* @__PURE__ */ __name((raw, { profile, key }) => {
|
|
62
|
-
if (key === void 0)
|
|
63
|
-
return [];
|
|
64
|
-
if (profile !== void 0) {
|
|
65
|
-
const entry = isNode(raw.profiles) ? raw.profiles[profile] : void 0;
|
|
66
|
-
const permission = key.startsWith("permissions.") && !(isNode(entry) && Object.hasOwn(entry, key));
|
|
67
|
-
return permission ? ["profiles", profile, "permissions", key.slice("permissions.".length)] : ["profiles", profile, key];
|
|
68
|
-
}
|
|
69
|
-
if (Object.hasOwn(raw, key))
|
|
70
|
-
return [key];
|
|
71
|
-
if (key.startsWith("profiles."))
|
|
72
|
-
return ["profiles", key.slice("profiles.".length)];
|
|
73
|
-
return [key.split(".")[0]];
|
|
74
|
-
}, "pathOf");
|
|
75
|
-
var inZmTerms = /* @__PURE__ */ __name((raw, issue) => {
|
|
76
|
-
const { fix: _, key: shared, ...rest } = issue;
|
|
77
|
-
const at = pathOf(raw, issue);
|
|
78
|
-
const [first] = at;
|
|
79
|
-
if (shared === void 0 || first === void 0)
|
|
80
|
-
return { ...rest, at };
|
|
81
|
-
const key = first === "profiles" ? shared : SETTING_NAMES[first] ?? first;
|
|
82
|
-
const named = key + shared.slice(first === "profiles" ? shared.length : first.length);
|
|
83
|
-
const fixable = [key, issue.profile ?? ""].every((word) => SHELL_SAFE.test(word));
|
|
84
|
-
return {
|
|
85
|
-
...rest,
|
|
86
|
-
kind: issue.kind === "missing_setting" ? "invalid_value" : issue.kind,
|
|
87
|
-
key,
|
|
88
|
-
what: issue.what.replace(`setting ${shared}`, `setting ${named}`),
|
|
89
|
-
...fixable ? { fix: `zm${issue.profile === void 0 ? "" : ` ${issue.profile}`} config unset ${key}` } : {},
|
|
90
|
-
at
|
|
91
|
-
};
|
|
92
|
-
}, "inZmTerms");
|
|
93
|
-
var configIssues = /* @__PURE__ */ __name((text, file, schema, permissionKeys) => {
|
|
94
|
-
const checked = checkConfigText(text, { file, tool: "zm", schema });
|
|
95
|
-
const broken = checked.issues.find((issue) => issue.kind === "invalid_json");
|
|
96
|
-
if (broken)
|
|
97
|
-
return { issues: [{ ...broken, at: [] }], raw: null };
|
|
98
|
-
const raw = JSON.parse(text);
|
|
99
|
-
if (!isNode(raw))
|
|
100
|
-
return { issues: [fileIssue(file, "the file has to be an object, in braces")], raw: null };
|
|
101
|
-
const found = /* @__PURE__ */ new Map();
|
|
102
|
-
const add = /* @__PURE__ */ __name((issue) => {
|
|
103
|
-
const id = issue.at.join("\0");
|
|
104
|
-
if (!found.has(id))
|
|
105
|
-
found.set(id, issue);
|
|
106
|
-
}, "add");
|
|
107
|
-
for (const issue of checked.issues)
|
|
108
|
-
add(inZmTerms(raw, issue));
|
|
109
|
-
if (permissionKeys) {
|
|
110
|
-
const rest = JSON.stringify(withoutIssues(raw, [...found.values()]));
|
|
111
|
-
for (const issue of checkConfigText(rest, { file, tool: "zm", schema, knownPermissions: permissionKeys }).issues)
|
|
112
|
-
if (issue.kind === "unknown_permission")
|
|
113
|
-
add(inZmTerms(raw, issue));
|
|
114
|
-
}
|
|
115
|
-
return { issues: [...found.values()], raw };
|
|
116
|
-
}, "configIssues");
|
|
117
|
-
var withoutIssues = /* @__PURE__ */ __name((raw, issues) => {
|
|
118
|
-
const copy = structuredClone(raw);
|
|
119
|
-
for (const { at } of issues)
|
|
120
|
-
removeAt(copy, at);
|
|
121
|
-
return copy;
|
|
122
|
-
}, "withoutIssues");
|
|
123
|
-
var removeAt = /* @__PURE__ */ __name((raw, at) => {
|
|
124
|
-
const parent = at.slice(0, -1).reduce((node, key) => isNode(node) ? node[key] : void 0, raw);
|
|
125
|
-
if (isNode(parent))
|
|
126
|
-
delete parent[at.at(-1)];
|
|
127
|
-
}, "removeAt");
|
|
128
|
-
var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
|
|
129
|
-
|
|
130
|
-
// dist/profile.js
|
|
131
|
-
var profilePattern = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
132
|
-
var profileAccountKey = /* @__PURE__ */ __name((profile) => `zm-profile:${profile}`, "profileAccountKey");
|
|
133
|
-
var given = /* @__PURE__ */ __name((value) => value?.trim() ? value.trim() : void 0, "given");
|
|
134
|
-
var usable = /* @__PURE__ */ __name((profile) => {
|
|
135
|
-
usableProfileName(profile);
|
|
136
|
-
if (!profilePattern.test(profile))
|
|
137
|
-
throw new CliError("validation_error", `"${profile}" cannot be a profile name \u2014 64 characters at most`);
|
|
138
|
-
return profile;
|
|
139
|
-
}, "usable");
|
|
140
|
-
var chooseProfile = /* @__PURE__ */ __name(({ word, env, profiles }) => {
|
|
141
|
-
const lock = given(env.ZM_PROFILE_LOCK);
|
|
142
|
-
const named = word !== void 0 ? word : given(env.ZM_PROFILE);
|
|
143
|
-
if (lock !== void 0)
|
|
144
|
-
usable(lock);
|
|
145
|
-
if (named !== void 0 && lock !== void 0 && named !== lock)
|
|
146
|
-
throw new CliError("permission_error", `this process is locked to profile ${lock} (ZM_PROFILE_LOCK) \u2014 profile ${named} is refused`);
|
|
147
|
-
const profile = named ?? lock;
|
|
148
|
-
if (profile === void 0) {
|
|
149
|
-
const here = profiles();
|
|
150
|
-
throw new CliError("validation_error", here.length === 0 ? "name a profile: there is none on this computer yet \u2014 create one with `zm personal session start` (any name in place of personal)" : `name a profile: \`zm <profile> \u2026\` \u2014 profiles here: ${here.join(", ")} (or set ZM_PROFILE)`, { profiles: [...here] });
|
|
151
|
-
}
|
|
152
|
-
return usable(profile);
|
|
153
|
-
}, "chooseProfile");
|
|
154
|
-
|
|
155
|
-
// dist/context-sources.js
|
|
156
|
-
var fields = {
|
|
157
|
-
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
158
|
-
kind: picklist(["message", "mail", "document"]),
|
|
159
|
-
provider: pipe(string(), check((s) => !!s.trim() && Buffer.byteLength(s) <= 128)),
|
|
160
|
-
account: pipe(string(), check((s) => !!s.trim() && Buffer.byteLength(s) <= 1024))
|
|
161
|
-
};
|
|
162
|
-
var selected = pipe(array(strictObject(fields)), maxLength(8));
|
|
163
|
-
var contextSourcesSchema = pipe(array(strictObject({ ...fields, profile: pipe(string(), regex(profilePattern)) })), maxLength(64), check((entries) => {
|
|
164
|
-
const ids = /* @__PURE__ */ new Set(), identities = /* @__PURE__ */ new Set(), counts = /* @__PURE__ */ new Map();
|
|
165
|
-
for (const entry of entries) {
|
|
166
|
-
const id = JSON.stringify([entry.profile, entry.id]), key = JSON.stringify([entry.profile, entry.kind, entry.provider, entry.account]);
|
|
167
|
-
const count = (counts.get(entry.profile) ?? 0) + 1;
|
|
168
|
-
if (ids.has(id) || identities.has(key) || count > 8)
|
|
169
|
-
return false;
|
|
170
|
-
ids.add(id);
|
|
171
|
-
identities.add(key);
|
|
172
|
-
counts.set(entry.profile, count);
|
|
173
|
-
}
|
|
174
|
-
return true;
|
|
175
|
-
}));
|
|
176
|
-
var replaceContextSources = /* @__PURE__ */ __name((value, profile, existing = []) => {
|
|
177
|
-
if (!profile)
|
|
178
|
-
throw new CliError("configuration_error", "name a profile: `zm <profile> config set context.sources \u2026`");
|
|
179
|
-
let input;
|
|
180
|
-
try {
|
|
181
|
-
input = JSON.parse(value);
|
|
182
|
-
} catch {
|
|
183
|
-
throw new CliError("validation_error", "context.sources must be a JSON array");
|
|
184
|
-
}
|
|
185
|
-
const parsed = safeParse(selected, input);
|
|
186
|
-
if (!parsed.success)
|
|
187
|
-
throw new CliError("validation_error", "context.sources needs at most eight unique source IDs with kind/provider/account; unknown fields are refused");
|
|
188
|
-
const combined = [...existing.filter((s) => s.profile !== profile), ...parsed.output.map((s) => ({ ...s, profile }))];
|
|
189
|
-
const all = safeParse(contextSourcesSchema, combined);
|
|
190
|
-
if (!all.success)
|
|
191
|
-
throw new CliError("validation_error", "context.sources contains duplicate IDs/identities or exceeds its profile limits");
|
|
192
|
-
return all.output;
|
|
193
|
-
}, "replaceContextSources");
|
|
194
|
-
|
|
195
|
-
// dist/config.js
|
|
196
|
-
var ProfileEntry = strictObject({
|
|
197
|
-
permissions: optional(record(pipe(string(), regex(/^[a-z][a-z.-]*$/)), picklist(LEVELS)))
|
|
198
|
-
});
|
|
199
|
-
var ConfigFile = strictObject({
|
|
200
|
-
client_id: optional(nullable(pipe(string(), check((id) => id.trim() !== "" && !/\s/.test(id), "has to be a Zoom client ID, without spaces")))),
|
|
201
|
-
source: optional(picklist(["api", "files"])),
|
|
202
|
-
files_folder: optional(nullable(string())),
|
|
203
|
-
files_timezone: optional(nullable(pipe(string(), check((zone) => {
|
|
204
|
-
try {
|
|
205
|
-
new Intl.DateTimeFormat("en", { timeZone: zone });
|
|
206
|
-
return true;
|
|
207
|
-
} catch {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
}, "has to be an IANA time zone, such as Europe/Madrid")))),
|
|
211
|
-
profiles: optional(pipe(
|
|
212
|
-
// valibot's record takes a list too, reading its items as profiles named "0", "1"…
|
|
213
|
-
custom((value) => !Array.isArray(value), "has to be an object keyed by profile name, not a list"),
|
|
214
|
-
record(pipe(string(), regex(profilePattern, "has to be a profile name of 64 characters at most")), ProfileEntry)
|
|
215
|
-
)),
|
|
216
|
-
context_sources: optional(contextSourcesSchema),
|
|
217
|
-
record: optional(boolean()),
|
|
218
|
-
keep_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
|
|
219
|
-
keep_successful_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
|
|
220
|
-
runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
|
|
221
|
-
record_input: optional(union([boolean(), literal("failed")]))
|
|
222
|
-
});
|
|
223
|
-
var DOCTOR = "zm doctor";
|
|
224
|
-
var configOf = /* @__PURE__ */ __name((file) => ({
|
|
225
|
-
clientId: file.client_id ?? null,
|
|
226
|
-
source: file.source ?? "api",
|
|
227
|
-
filesFolder: file.files_folder ?? null,
|
|
228
|
-
filesTimezone: file.files_timezone ?? null,
|
|
229
|
-
profiles: Object.keys(file.profiles ?? {}).sort(),
|
|
230
|
-
permissions: Object.fromEntries(Object.entries(file.profiles ?? {}).flatMap(([name, entry]) => entry.permissions ? [[name, entry.permissions]] : [])),
|
|
231
|
-
...file.context_sources === void 0 ? {} : { contextSources: file.context_sources },
|
|
232
|
-
...file.record === void 0 ? {} : { record: file.record },
|
|
233
|
-
...file.keep_runs_for_days === void 0 ? {} : { keepRunsForDays: file.keep_runs_for_days },
|
|
234
|
-
...file.keep_successful_runs_for_days === void 0 ? {} : { keepSuccessfulRunsForDays: file.keep_successful_runs_for_days },
|
|
235
|
-
...file.runs_size_limit_mb === void 0 ? {} : { runsSizeLimitMb: file.runs_size_limit_mb },
|
|
236
|
-
...file.record_input === void 0 ? {} : { recordInput: file.record_input }
|
|
237
|
-
}), "configOf");
|
|
238
|
-
var inspectConfig = /* @__PURE__ */ __name((path, permissionKeys) => {
|
|
239
|
-
let text;
|
|
240
|
-
try {
|
|
241
|
-
text = readFileSync(path, "utf8");
|
|
242
|
-
} catch {
|
|
243
|
-
if (!existsSync(path))
|
|
244
|
-
return { found: false, issues: [], raw: {}, config: configOf({}) };
|
|
245
|
-
const what = statSync(path, { throwIfNoEntry: false })?.isDirectory() ? "the path is a folder, not a file" : "the file could not be read";
|
|
246
|
-
return { found: true, issues: [fileIssue(path, what)], raw: null, config: configOf({}) };
|
|
247
|
-
}
|
|
248
|
-
const { issues, raw } = configIssues(text, path, ConfigFile, permissionKeys);
|
|
249
|
-
return {
|
|
250
|
-
found: true,
|
|
251
|
-
issues,
|
|
252
|
-
raw,
|
|
253
|
-
config: configOf(raw ? parse(ConfigFile, withoutIssues(raw, issues)) : {})
|
|
254
|
-
};
|
|
255
|
-
}, "inspectConfig");
|
|
256
|
-
var readConfig = /* @__PURE__ */ __name((path, permissionKeys) => {
|
|
257
|
-
const { issues, config } = inspectConfig(path, permissionKeys);
|
|
258
|
-
if (issues.length > 0)
|
|
259
|
-
throw new CliError("configuration_error", issueMessage(issues.map(publicIssue), DOCTOR));
|
|
260
|
-
return config;
|
|
261
|
-
}, "readConfig");
|
|
262
|
-
var changeFile = /* @__PURE__ */ __name((path, permissionKeys, change) => {
|
|
263
|
-
const inspection = inspectConfig(path, permissionKeys);
|
|
264
|
-
if (!inspection.raw)
|
|
265
|
-
throw new CliError("configuration_error", issueMessage(inspection.issues.map(publicIssue), DOCTOR));
|
|
266
|
-
const raw = structuredClone(inspection.raw);
|
|
267
|
-
change(raw, inspection);
|
|
268
|
-
saveConfigFile(path, raw);
|
|
269
|
-
return inspectConfig(path, permissionKeys).config;
|
|
270
|
-
}, "changeFile");
|
|
271
|
-
var profileEntry = /* @__PURE__ */ __name((raw, profile) => {
|
|
272
|
-
if (!isNode(raw.profiles))
|
|
273
|
-
raw.profiles = {};
|
|
274
|
-
const profiles = raw.profiles;
|
|
275
|
-
if (!isNode(profiles[profile]))
|
|
276
|
-
profiles[profile] = {};
|
|
277
|
-
return profiles[profile];
|
|
278
|
-
}, "profileEntry");
|
|
279
|
-
var FILE_KEYS = Object.fromEntries(Object.entries(SETTING_NAMES).map(([file, name]) => [name, file]));
|
|
280
|
-
var setConfig = /* @__PURE__ */ __name((path, key, value, profile, permissionKeys) => changeFile(path, permissionKeys, (raw, { config, issues }) => {
|
|
281
|
-
switch (key) {
|
|
282
|
-
case "permissions": {
|
|
283
|
-
const name = profile?.();
|
|
284
|
-
if (!name)
|
|
285
|
-
throw new CliError("validation_error", "name a profile: `zm <profile> config set permissions \u2026`");
|
|
286
|
-
profileEntry(raw, name).permissions = parsePermissions(value, permissionKeys ?? /* @__PURE__ */ new Set());
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
case "context.sources": {
|
|
290
|
-
const broken = issues.find((issue) => issue.at[0] === "context_sources");
|
|
291
|
-
if (broken)
|
|
292
|
-
throw new CliError("configuration_error", issueMessage([publicIssue(broken)], DOCTOR));
|
|
293
|
-
raw.context_sources = replaceContextSources(value, profile?.() ?? null, config.contextSources);
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
case "zoom.client_id":
|
|
297
|
-
if (!value.trim() || /\s/.test(value))
|
|
298
|
-
throw new CliError("validation_error", "client id must not contain whitespace");
|
|
299
|
-
raw.client_id = value;
|
|
300
|
-
return;
|
|
301
|
-
case "source":
|
|
302
|
-
if (value !== "api" && value !== "files")
|
|
303
|
-
throw new CliError("validation_error", "source must be api or files");
|
|
304
|
-
raw.source = value;
|
|
305
|
-
return;
|
|
306
|
-
case "files.folder":
|
|
307
|
-
if (!value.trim())
|
|
308
|
-
throw new CliError("validation_error", "folder must not be empty");
|
|
309
|
-
raw.files_folder = value;
|
|
310
|
-
return;
|
|
311
|
-
case "files.timezone":
|
|
312
|
-
try {
|
|
313
|
-
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
314
|
-
} catch {
|
|
315
|
-
throw new CliError("validation_error", "expected an IANA time zone");
|
|
316
|
-
}
|
|
317
|
-
raw.files_timezone = value;
|
|
318
|
-
return;
|
|
319
|
-
case "record":
|
|
320
|
-
if (value !== "true" && value !== "false")
|
|
321
|
-
throw new CliError("validation_error", "record must be true or false");
|
|
322
|
-
raw.record = value === "true";
|
|
323
|
-
return;
|
|
324
|
-
case "keep_runs_for_days":
|
|
325
|
-
if (!/^[1-9]\d{0,4}$/.test(value))
|
|
326
|
-
throw new CliError("validation_error", "keep_runs_for_days must be a whole number of days, 1 or more");
|
|
327
|
-
raw.keep_runs_for_days = Number(value);
|
|
328
|
-
return;
|
|
329
|
-
case "record_input":
|
|
330
|
-
if (value !== "true" && value !== "false" && value !== "failed")
|
|
331
|
-
throw new CliError("validation_error", "record_input must be true, false or failed");
|
|
332
|
-
raw.record_input = value === "failed" ? value : value === "true";
|
|
333
|
-
return;
|
|
334
|
-
case "keep_successful_runs_for_days":
|
|
335
|
-
if (!/^[1-9]\d{0,4}$/.test(value))
|
|
336
|
-
throw new CliError("validation_error", "keep_successful_runs_for_days must be a whole number of days, 1 or more");
|
|
337
|
-
raw.keep_successful_runs_for_days = Number(value);
|
|
338
|
-
return;
|
|
339
|
-
case "runs_size_limit_mb":
|
|
340
|
-
if (!/^[1-9]\d{0,5}$/.test(value))
|
|
341
|
-
throw new CliError("validation_error", "runs_size_limit_mb must be a whole number of megabytes, 1 or more");
|
|
342
|
-
raw.runs_size_limit_mb = Number(value);
|
|
343
|
-
return;
|
|
344
|
-
default:
|
|
345
|
-
throw new CliError("validation_error", "unknown config key");
|
|
346
|
-
}
|
|
347
|
-
}), "setConfig");
|
|
348
|
-
var unsetConfig = /* @__PURE__ */ __name((path, key, profile, permissionKeys) => changeFile(path, permissionKeys, (raw, { issues }) => {
|
|
349
|
-
const reported = issues.find((issue) => issue.key === key && (issue.profile === void 0 || issue.profile === profile));
|
|
350
|
-
if (key === "context.sources" && !reported && profile !== void 0 && Array.isArray(raw.context_sources)) {
|
|
351
|
-
raw.context_sources = raw.context_sources.filter((source) => !isNode(source) || source.profile !== profile);
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
const at = reported?.at ?? (FILE_KEYS[key] ? [FILE_KEYS[key]] : profileSettingAt(key, profile));
|
|
355
|
-
removeAt(raw, at);
|
|
356
|
-
const entry = isNode(raw.profiles) ? raw.profiles[at[1] ?? ""] : void 0;
|
|
357
|
-
if (at[2] === "permissions" && isNode(entry) && isNode(entry.permissions)) {
|
|
358
|
-
if (Object.keys(entry.permissions).length === 0)
|
|
359
|
-
delete entry.permissions;
|
|
360
|
-
}
|
|
361
|
-
}), "unsetConfig");
|
|
362
|
-
var profileSettingAt = /* @__PURE__ */ __name((key, profile) => {
|
|
363
|
-
if (key !== "permissions" && !key.startsWith("permissions."))
|
|
364
|
-
throw new CliError("validation_error", "unknown config key");
|
|
365
|
-
if (!profile)
|
|
366
|
-
throw new CliError("validation_error", `name a profile: \`zm <profile> config unset ${key}\``);
|
|
367
|
-
return key === "permissions" ? ["profiles", profile, "permissions"] : ["profiles", profile, "permissions", key.slice("permissions.".length)];
|
|
368
|
-
}, "profileSettingAt");
|
|
369
|
-
var addProfile = /* @__PURE__ */ __name((path, profile) => {
|
|
370
|
-
if (readConfig(path).profiles.includes(profile))
|
|
371
|
-
return;
|
|
372
|
-
changeFile(path, void 0, (raw) => {
|
|
373
|
-
profileEntry(raw, profile);
|
|
374
|
-
});
|
|
375
|
-
}, "addProfile");
|
|
376
|
-
var filesZone = /* @__PURE__ */ __name((config) => config.filesTimezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone, "filesZone");
|
|
377
|
-
|
|
378
|
-
export {
|
|
379
|
-
publicIssue,
|
|
380
|
-
profilePattern,
|
|
381
|
-
profileAccountKey,
|
|
382
|
-
chooseProfile,
|
|
383
|
-
contextSourcesSchema,
|
|
384
|
-
inspectConfig,
|
|
385
|
-
readConfig,
|
|
386
|
-
setConfig,
|
|
387
|
-
unsetConfig,
|
|
388
|
-
addProfile,
|
|
389
|
-
filesZone
|
|
390
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
SCHEMA_DIALECT,
|
|
5
|
-
commandContract,
|
|
6
|
-
commandPathOf,
|
|
7
|
-
findCommand,
|
|
8
|
-
outputOf
|
|
9
|
-
} from "./chunk-OEEMCNAO.js";
|
|
10
|
-
import "./chunk-PAEBFJUC.js";
|
|
11
|
-
import "./chunk-Y3YURIZF.js";
|
|
12
|
-
import "./chunk-KYUIU5UR.js";
|
|
13
|
-
import "./chunk-W5EUHV3J.js";
|
|
14
|
-
import "./chunk-VKUS2V4L.js";
|
|
15
|
-
import "./chunk-WEUXLXOZ.js";
|
|
16
|
-
import "./chunk-IQENQXUJ.js";
|
|
17
|
-
import "./chunk-WWNZS7ZY.js";
|
|
18
|
-
import "./chunk-IRX2YVAH.js";
|
|
19
|
-
import "./chunk-EN5DBDKW.js";
|
|
20
|
-
import "./chunk-AOZGGGUK.js";
|
|
21
|
-
import "./chunk-PEMLI3T7.js";
|
|
22
|
-
import "./chunk-K6NPOZUP.js";
|
|
23
|
-
import "./chunk-FWJ3Q7NO.js";
|
|
24
|
-
import "./chunk-Z4D6M62I.js";
|
|
25
|
-
import "./chunk-KXEC5FVT.js";
|
|
26
|
-
import "./chunk-Q7U627RY.js";
|
|
27
|
-
import "./chunk-LVHZQCP4.js";
|
|
28
|
-
import "./chunk-O5EHUB2V.js";
|
|
29
|
-
import "./chunk-R4SRXI7M.js";
|
|
30
|
-
import "./chunk-Y5E2WNWB.js";
|
|
31
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
32
|
-
export {
|
|
33
|
-
SCHEMA_DIALECT,
|
|
34
|
-
commandContract,
|
|
35
|
-
commandPathOf,
|
|
36
|
-
findCommand,
|
|
37
|
-
outputOf
|
|
38
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
addProfile,
|
|
5
|
-
filesZone,
|
|
6
|
-
inspectConfig,
|
|
7
|
-
profileAccountKey,
|
|
8
|
-
readConfig,
|
|
9
|
-
setConfig,
|
|
10
|
-
unsetConfig
|
|
11
|
-
} from "./chunk-WYRYLBST.js";
|
|
12
|
-
import "./chunk-4TCQT57W.js";
|
|
13
|
-
import "./chunk-LPDYI5GR.js";
|
|
14
|
-
import "./chunk-PATM7JGR.js";
|
|
15
|
-
import "./chunk-ZDRDCANC.js";
|
|
16
|
-
import "./chunk-HAUAEGGI.js";
|
|
17
|
-
import "./chunk-HBYE4EP2.js";
|
|
18
|
-
import "./chunk-ZK7Y5K63.js";
|
|
19
|
-
import "./chunk-VLE3FWE3.js";
|
|
20
|
-
import "./chunk-DBSWVZES.js";
|
|
21
|
-
import "./chunk-YEZQ7SD7.js";
|
|
22
|
-
import "./chunk-XX7KVQIG.js";
|
|
23
|
-
import "./chunk-V53IB5AU.js";
|
|
24
|
-
import "./chunk-EUHQ5D4K.js";
|
|
25
|
-
import "./chunk-WFT2GGFH.js";
|
|
26
|
-
import "./chunk-IQSBMAYB.js";
|
|
27
|
-
import "./chunk-Z5H47R4G.js";
|
|
28
|
-
import "./chunk-BO7J5Z3T.js";
|
|
29
|
-
import "./chunk-N27LOY3D.js";
|
|
30
|
-
import "./chunk-OEEMCNAO.js";
|
|
31
|
-
import "./chunk-PAEBFJUC.js";
|
|
32
|
-
import "./chunk-Y3YURIZF.js";
|
|
33
|
-
import "./chunk-KYUIU5UR.js";
|
|
34
|
-
import "./chunk-W5EUHV3J.js";
|
|
35
|
-
import "./chunk-VKUS2V4L.js";
|
|
36
|
-
import "./chunk-WEUXLXOZ.js";
|
|
37
|
-
import "./chunk-IQENQXUJ.js";
|
|
38
|
-
import "./chunk-WWNZS7ZY.js";
|
|
39
|
-
import "./chunk-TY5PBEH2.js";
|
|
40
|
-
import "./chunk-RACSKYNX.js";
|
|
41
|
-
import "./chunk-MFS52LTZ.js";
|
|
42
|
-
import "./chunk-IRX2YVAH.js";
|
|
43
|
-
import "./chunk-X7YPTYM4.js";
|
|
44
|
-
import "./chunk-HYZ545ON.js";
|
|
45
|
-
import "./chunk-LPY2ISJK.js";
|
|
46
|
-
import "./chunk-HTQTIKWP.js";
|
|
47
|
-
import "./chunk-EN5DBDKW.js";
|
|
48
|
-
import "./chunk-AOZGGGUK.js";
|
|
49
|
-
import "./chunk-VJBVNDFR.js";
|
|
50
|
-
import "./chunk-AZZPMHP2.js";
|
|
51
|
-
import "./chunk-REC3AZP6.js";
|
|
52
|
-
import "./chunk-WB7MQHUI.js";
|
|
53
|
-
import "./chunk-FZMRHNOP.js";
|
|
54
|
-
import "./chunk-GEVHI226.js";
|
|
55
|
-
import "./chunk-PEMLI3T7.js";
|
|
56
|
-
import "./chunk-CGCJ6P3A.js";
|
|
57
|
-
import "./chunk-K6NPOZUP.js";
|
|
58
|
-
import "./chunk-ZXQCA3ZW.js";
|
|
59
|
-
import "./chunk-FWJ3Q7NO.js";
|
|
60
|
-
import "./chunk-ES6UWVTM.js";
|
|
61
|
-
import "./chunk-Z4D6M62I.js";
|
|
62
|
-
import "./chunk-KXEC5FVT.js";
|
|
63
|
-
import "./chunk-YLATWUE7.js";
|
|
64
|
-
import "./chunk-Q7U627RY.js";
|
|
65
|
-
import "./chunk-LVHZQCP4.js";
|
|
66
|
-
import "./chunk-O5EHUB2V.js";
|
|
67
|
-
import "./chunk-R4SRXI7M.js";
|
|
68
|
-
import "./chunk-Y5E2WNWB.js";
|
|
69
|
-
import "./chunk-HIAO4MPA.js";
|
|
70
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
71
|
-
export {
|
|
72
|
-
addProfile,
|
|
73
|
-
filesZone,
|
|
74
|
-
inspectConfig,
|
|
75
|
-
profileAccountKey,
|
|
76
|
-
readConfig,
|
|
77
|
-
setConfig,
|
|
78
|
-
unsetConfig
|
|
79
|
-
};
|