@wirecat/zoom-cli 0.68.0 → 0.70.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 +1 -1
- package/dist/account-removal.d.ts +6 -0
- package/dist/account-removal.d.ts.map +1 -0
- package/dist/account-removal.js +43 -0
- package/dist/account-removal.js.map +1 -0
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-R66UM3HM.js → all-profiles-GE2TFJJP.js} +9 -9
- package/dist/bundle/answer-policy-GOXSDYDD.js +104 -0
- package/dist/bundle/{anthropic-4ZI2BPLG.js → anthropic-FA6NHENI.js} +9 -7
- package/dist/bundle/{app-server-64O5IQI5.js → app-server-IRADMSNX.js} +50 -50
- package/dist/bundle/{bun-HUHQD76Z.js → bun-ZYZGGCX5.js} +2 -2
- package/dist/bundle/{bun-sqlite-VOVHPTIF.js → bun-sqlite-Y24TUIGS.js} +4 -4
- package/dist/bundle/{chunk-W42BJ65M.js → chunk-2JEM2YNV.js} +1 -1
- package/dist/bundle/{chunk-3BRV2YU2.js → chunk-2QFPVUM3.js} +2 -2
- package/dist/bundle/{chunk-KAPJQGHE.js → chunk-2U6SER67.js} +1 -1
- package/dist/bundle/{chunk-77I67HWF.js → chunk-3KC7C465.js} +7 -7
- package/dist/bundle/{chunk-YQRNFG2E.js → chunk-4DSIWYGO.js} +7661 -13544
- package/dist/bundle/{chunk-7DUYFITC.js → chunk-56OV5ASY.js} +11 -11
- package/dist/bundle/{chunk-AVEIQMHZ.js → chunk-5XWCBLUR.js} +1 -1
- package/dist/bundle/{chunk-HXOAPH47.js → chunk-6HJFIMT7.js} +1 -1
- package/dist/bundle/{chunk-SSPSNSC5.js → chunk-6IF5ZHDS.js} +1 -1
- package/dist/bundle/{chunk-BOAMDYLY.js → chunk-7QC4M4HS.js} +2 -2
- package/dist/bundle/{chunk-6T3P226D.js → chunk-AISJCF7A.js} +4 -4
- package/dist/bundle/chunk-AT2XKNFN.js +342 -0
- package/dist/bundle/{chunk-BSM43OMN.js → chunk-AUNW7N4I.js} +1 -1
- package/dist/bundle/{chunk-R7LFGEDE.js → chunk-BSS6HX4O.js} +2 -2
- package/dist/bundle/{chunk-FMQS7HCC.js → chunk-BVWF4B33.js} +251 -10
- package/dist/bundle/{chunk-DGNPJGD3.js → chunk-CEJJBZAE.js} +9 -15
- package/dist/bundle/{chunk-L4WVLRXM.js → chunk-CHGUNZ3L.js} +3 -3
- package/dist/bundle/{chunk-LBOSTBAY.js → chunk-CIZ25UPK.js} +3841 -2497
- package/dist/bundle/{chunk-TN3FH2GQ.js → chunk-CSEBB4OP.js} +8 -8
- package/dist/bundle/{chunk-JO4YADNV.js → chunk-D3PNCJD5.js} +5 -5
- package/dist/bundle/{chunk-US5C3WAY.js → chunk-DCUWJITQ.js} +30 -30
- package/dist/bundle/{chunk-QXTREL2M.js → chunk-DNR4B5YV.js} +2 -2
- package/dist/bundle/{chunk-PUTGTW6W.js → chunk-DXCTW3MV.js} +1 -1
- package/dist/bundle/{chunk-B6JMVB6R.js → chunk-EOSVN2ER.js} +1 -1
- package/dist/bundle/{chunk-ZRD3NDOX.js → chunk-GB5X3GBE.js} +23 -1
- package/dist/bundle/{chunk-32FPA7P2.js → chunk-GVT5363M.js} +2 -2
- package/dist/bundle/{chunk-EWIBLDQQ.js → chunk-IINZIP73.js} +7 -7
- package/dist/bundle/{chunk-5JAYUG3X.js → chunk-IS3ZTT2Z.js} +5 -5
- package/dist/bundle/{chunk-LYWUG43B.js → chunk-IWPXWGF7.js} +34 -34
- package/dist/bundle/{chunk-JRCYFCPL.js → chunk-J3SKXICS.js} +350 -136
- package/dist/bundle/{chunk-UDJTRFRV.js → chunk-JRO2FWO2.js} +1 -1
- package/dist/bundle/chunk-JULBAECW.js +126 -0
- package/dist/bundle/{chunk-FNQASORM.js → chunk-KM736RMJ.js} +1 -1
- package/dist/bundle/{chunk-4TLPOY22.js → chunk-KWRCP55G.js} +11 -11
- package/dist/bundle/{chunk-SRP6SFFD.js → chunk-L24UOUWG.js} +1 -1
- package/dist/bundle/{chunk-AJ7CMUGD.js → chunk-LAG5O2FV.js} +218 -231
- package/dist/bundle/{chunk-UU5PLDRA.js → chunk-LXXCLQCW.js} +2 -2
- package/dist/bundle/{chunk-65T3PU75.js → chunk-M6JIXMQZ.js} +5 -1
- package/dist/bundle/{chunk-LV7QRR5S.js → chunk-M7E44TMT.js} +5 -5
- package/dist/bundle/{chunk-6XO7RTJY.js → chunk-M7VUXXGS.js} +110 -8
- package/dist/bundle/{chunk-A63ZFOQJ.js → chunk-MVOMLJYQ.js} +3 -3
- package/dist/bundle/{chunk-DVA6MQWK.js → chunk-OA37BWE5.js} +1 -1
- package/dist/bundle/{chunk-77KFLU5F.js → chunk-OAQLVV6W.js} +2 -2
- package/dist/bundle/{chunk-KNE6VFHZ.js → chunk-OORMSM6O.js} +1 -1
- package/dist/bundle/{chunk-TZUKDM72.js → chunk-PV6OHXHN.js} +16 -16
- package/dist/bundle/{chunk-2OSBCYJT.js → chunk-QL7EMFIC.js} +18 -18
- package/dist/bundle/{chunk-4YFJYSSK.js → chunk-QO2KPU26.js} +45 -29
- package/dist/bundle/{chunk-GOXDBCDM.js → chunk-RB33VTUW.js} +297 -397
- package/dist/bundle/{chunk-TDGZMC6K.js → chunk-RIPAUCKJ.js} +59 -55
- package/dist/bundle/{chunk-6CJ7NHIP.js → chunk-RO3ZR4VP.js} +12 -12
- package/dist/bundle/{chunk-BL36NSV5.js → chunk-RQG5VOGH.js} +12 -2
- package/dist/bundle/{chunk-YTF2WPV4.js → chunk-RRRJCHUC.js} +2162 -1250
- package/dist/bundle/chunk-RWIILYKW.js +66 -0
- package/dist/bundle/{chunk-YJY3W2ZT.js → chunk-SNIY3JDN.js} +21 -18
- package/dist/bundle/{chunk-EH5QGQFR.js → chunk-SVF3NDAO.js} +3 -3
- package/dist/bundle/{chunk-VLD7Y4SY.js → chunk-UVPL7YAY.js} +5 -5
- package/dist/bundle/{chunk-2T6XHWDX.js → chunk-V2E7QFZ3.js} +1 -1
- package/dist/bundle/{chunk-K67V24AT.js → chunk-V5GRSOCZ.js} +4 -4
- package/dist/bundle/{chunk-DWSUSWAX.js → chunk-VE2VNECR.js} +131 -12
- package/dist/bundle/{chunk-RRYUD2EF.js → chunk-VJ5ZU4UF.js} +22 -4
- package/dist/bundle/{chunk-7QNJICKZ.js → chunk-VNU5L37V.js} +26 -26
- package/dist/bundle/{chunk-6TJ62LZQ.js → chunk-VSLDWT4E.js} +3 -3
- package/dist/bundle/{chunk-P2TISY3R.js → chunk-W7ZEEC4K.js} +1 -1
- package/dist/bundle/{chunk-NRRI37NJ.js → chunk-WOIHSQAL.js} +44 -0
- package/dist/bundle/{chunk-EJDV5IIF.js → chunk-X4ZF4XXI.js} +1 -1
- package/dist/bundle/{chunk-FBLUKCIR.js → chunk-XRFHQGOD.js} +1 -1
- package/dist/bundle/{chunk-KUB2U5NT.js → chunk-XWQNJKTP.js} +5 -5
- package/dist/bundle/chunk-Y6C3N7YG.js +12434 -0
- package/dist/bundle/{chunk-474WF55M.js → chunk-YJSPBUGB.js} +63 -32
- package/dist/bundle/{chunk-RP3U3J53.js → chunk-YTN2JN6N.js} +7 -7
- package/dist/bundle/{chunk-Y5LP5SHV.js → chunk-YUHM2OJM.js} +10 -10
- package/dist/bundle/{chunk-7AUP2WT3.js → chunk-ZBKWRYRS.js} +2 -2
- package/dist/bundle/{chunk-355PHJYX.js → chunk-ZS55EERO.js} +1 -1
- package/dist/bundle/{chunk-TUNQ6NE2.js → chunk-ZSKE7N2U.js} +3 -3
- package/dist/bundle/{chunk-PIHBD3YS.js → chunk-ZV3INEKM.js} +4 -4
- package/dist/bundle/{cli-VQJ7ZRYR.js → cli-VRSQ7HAE.js} +76 -60
- package/dist/bundle/command-contract-RPRKHVU6.js +41 -0
- package/dist/bundle/config-QU6A6VIO.js +90 -0
- package/dist/bundle/{decode-L3ENO2XH.js → decode-523PUQMR.js} +4 -4
- package/dist/bundle/{dispatch-5MGDLOK4.js → dispatch-IZCAK47P.js} +1 -1
- package/dist/bundle/{dist-WQLS7U23.js → dist-6WWKPEVW.js} +98 -22
- package/dist/bundle/{echarts-5LLJ6JXC.js → echarts-S5UMX2D3.js} +2 -2
- package/dist/bundle/{embed-37MYTCU7.js → embed-ODPDVHUK.js} +5 -5
- package/dist/bundle/{embedder-GNGHVJAO.js → embedder-PAXRBSZE.js} +8 -8
- package/dist/bundle/{failure-CR64C4XA.js → failure-R2OIHCE5.js} +1 -1
- package/dist/bundle/{first-run-NR5JKYP3.js → first-run-NVTDR5VO.js} +8 -8
- package/dist/bundle/first-screen-5RWZDWLK.js +39 -0
- package/dist/bundle/{folders-VU4IN35Y.js → folders-ZXTOFY4T.js} +3 -3
- package/dist/bundle/{instructions-P72XX4AK.js → instructions-DUB7E6C5.js} +1 -1
- package/dist/bundle/{main-QYFCYSTW.js → main-A7JSYQI6.js} +18 -18
- package/dist/bundle/{meetings-66UQINKI.js → meetings-BDZQV3HR.js} +4 -4
- package/dist/bundle/{node-ZB4RNICS.js → node-E25KP53H.js} +2 -2
- package/dist/bundle/{node-sqlite-XPRKBDF3.js → node-sqlite-PHWDFZCP.js} +5 -5
- package/dist/bundle/{oauth-WJRDUU5J.js → oauth-G2K46IYP.js} +6 -6
- package/dist/bundle/{open-S2YSIEOW.js → open-INWS5HIZ.js} +4 -4
- package/dist/bundle/{openai-CRNZFNZD.js → openai-T44ORVGQ.js} +10 -10
- package/dist/bundle/{output-file-6COFGPUL.js → output-file-YGQYZCBJ.js} +4 -4
- package/dist/bundle/{process-XNN4WG6N.js → process-UJ2JHMJN.js} +1 -1
- package/dist/bundle/{program-BRPJKRCX.js → program-LYTGFV6L.js} +115 -72
- package/dist/bundle/{prompt-7RQOL25I.js → prompt-VTUCRCE4.js} +6 -4
- package/dist/bundle/{recognize-N5WADGQB.js → recognize-3CEPOW2F.js} +3 -3
- package/dist/bundle/{remote-WHYV35IF.js → remote-DRQEXEZL.js} +6 -6
- package/dist/bundle/{rerank-FBMZVWSH.js → rerank-UL4KNNVN.js} +6 -6
- package/dist/bundle/{run-log-TOCHREH2.js → run-log-UZAB5CWF.js} +54 -54
- package/dist/bundle/{serve-4BABX4WS.js → serve-P5UWUOWQ.js} +8 -8
- package/dist/bundle/server-F3NPVMS2.js +72 -0
- package/dist/bundle/{server-CDVI6LOB.js → server-M6XK2Y3X.js} +42 -42
- package/dist/bundle/{services-PIY33I7R.js → services-4HRYNY62.js} +66 -30
- package/dist/bundle/{speech-LS5Q4FL2.js → speech-BBPBMFAO.js} +12 -12
- package/dist/bundle/{state-YUX5R2R7.js → state-GDSUNUSY.js} +5 -5
- package/dist/bundle/{store-BD7HAXAA.js → store-LBQ6FZP2.js} +41 -15
- package/dist/bundle/{store-ERMGBF2B.js → store-VWLABMLF.js} +57 -17
- package/dist/bundle/store-connection-XEBFP56U.js +83 -0
- package/dist/bundle/store-maintenance-command-G43JN57J.js +61 -0
- package/dist/bundle/{streaming-O53PIORL.js → streaming-EJ3NM2C2.js} +5 -5
- package/dist/bundle/{tokens-QKNEP2GJ.js → tokens-BE6CJMR5.js} +5 -5
- package/dist/bundle/zm.js +3 -3
- package/dist/bundle/{zoom-app-XJXZ4ZBX.js → zoom-app-YIEJLWCW.js} +6 -6
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +1 -0
- package/dist/first-screen.js.map +1 -1
- package/dist/permissions.js +1 -1
- package/dist/permissions.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +11 -0
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +11 -0
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/answer-policy-UCGUO53A.js +0 -104
- package/dist/bundle/chunk-AYEVBAGO.js +0 -178
- package/dist/bundle/chunk-EZRPSZJS.js +0 -33
- package/dist/bundle/chunk-NUJMJQXV.js +0 -787
- package/dist/bundle/chunk-YOAEZSDG.js +0 -22
- package/dist/bundle/command-contract-JPUWWYIV.js +0 -41
- package/dist/bundle/config-YGLLR77A.js +0 -90
- package/dist/bundle/first-screen-RCR7ATO2.js +0 -39
- package/dist/bundle/server-XOFQKFVO.js +0 -72
- package/dist/bundle/store-connection-JBR6CMTJ.js +0 -83
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +0 -62
|
@@ -2,17 +2,19 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
LEVELS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M6JIXMQZ.js";
|
|
6
6
|
import {
|
|
7
|
+
WORD_BODY,
|
|
7
8
|
looksLikeReference,
|
|
8
9
|
parseReference,
|
|
9
10
|
providerLabel,
|
|
10
|
-
providerNamed
|
|
11
|
-
|
|
11
|
+
providerNamed,
|
|
12
|
+
typedPhone
|
|
13
|
+
} from "./chunk-Y6C3N7YG.js";
|
|
12
14
|
import {
|
|
13
15
|
resolvePaths,
|
|
14
16
|
writeSecurely
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OORMSM6O.js";
|
|
16
18
|
import {
|
|
17
19
|
array,
|
|
18
20
|
getDotPath,
|
|
@@ -31,7 +33,7 @@ import {
|
|
|
31
33
|
string,
|
|
32
34
|
transform,
|
|
33
35
|
unknown
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WOIHSQAL.js";
|
|
35
37
|
import {
|
|
36
38
|
CliError
|
|
37
39
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
__name
|
|
44
46
|
} from "./chunk-ZVVMGPBJ.js";
|
|
45
47
|
|
|
46
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48
|
+
// 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/ref-arguments.js
|
|
47
49
|
var TAKES = {
|
|
48
50
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
49
51
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -103,7 +105,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
103
105
|
throw wrongAccount(reference, scope, profiles);
|
|
104
106
|
}, "ensureAccount");
|
|
105
107
|
|
|
106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
108
|
+
// 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/resolve.js
|
|
107
109
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
108
110
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
109
111
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -148,7 +150,244 @@ ${lines}`, { candidates });
|
|
|
148
150
|
}, "ambiguous");
|
|
149
151
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
150
152
|
|
|
151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// 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/vcard.js
|
|
154
|
+
import { createHash } from "node:crypto";
|
|
155
|
+
var MAX_ID = 512;
|
|
156
|
+
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
157
|
+
var isVcard = /* @__PURE__ */ __name((text) => /^?\s*BEGIN:VCARD\b/i.test(text), "isVcard");
|
|
158
|
+
var isQuotedPrintable = /* @__PURE__ */ __name((line) => {
|
|
159
|
+
const colon = line.indexOf(":");
|
|
160
|
+
return /;(ENCODING=)?QUOTED-PRINTABLE\b/i.test(colon < 0 ? line : line.slice(0, colon));
|
|
161
|
+
}, "isQuotedPrintable");
|
|
162
|
+
var PROPERTY_START = /^([A-Za-z0-9-]+\.)?[A-Za-z][A-Za-z0-9-]*(;[^:]*)?:/;
|
|
163
|
+
var isSoft = /* @__PURE__ */ __name((line) => line !== void 0 && isQuotedPrintable(line) && line.endsWith("="), "isSoft");
|
|
164
|
+
var unfolded = /* @__PURE__ */ __name((text) => {
|
|
165
|
+
const lines = [];
|
|
166
|
+
for (const raw of text.replace(/^\uFEFF/, "").split(/\r\n|\r|\n/)) {
|
|
167
|
+
const last2 = lines.length - 1;
|
|
168
|
+
const previous = lines[last2];
|
|
169
|
+
const bounds = /^(BEGIN|END):/i.test(raw);
|
|
170
|
+
if (isSoft(previous) && !bounds && !PROPERTY_START.test(raw))
|
|
171
|
+
lines[last2] = previous.slice(0, -1) + raw.replace(/^[ \t]/, "");
|
|
172
|
+
else if (previous !== void 0 && /^[ \t]/.test(raw) && !bounds)
|
|
173
|
+
lines[last2] = previous + raw.slice(1);
|
|
174
|
+
else {
|
|
175
|
+
if (isSoft(previous))
|
|
176
|
+
lines[last2] = previous.slice(0, -1);
|
|
177
|
+
lines.push(raw);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const last = lines.length - 1;
|
|
181
|
+
if (isSoft(lines[last]))
|
|
182
|
+
lines[last] = lines[last].slice(0, -1);
|
|
183
|
+
return lines.filter((line) => line.trim() !== "");
|
|
184
|
+
}, "unfolded");
|
|
185
|
+
var propertyOf = /* @__PURE__ */ __name((line) => {
|
|
186
|
+
let quoted = false;
|
|
187
|
+
let colon = -1;
|
|
188
|
+
for (let index = 0; index < line.length; index += 1) {
|
|
189
|
+
if (line[index] === '"')
|
|
190
|
+
quoted = !quoted;
|
|
191
|
+
else if (line[index] === ":" && !quoted) {
|
|
192
|
+
colon = index;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (colon < 0)
|
|
197
|
+
return void 0;
|
|
198
|
+
const [head = "", ...rest] = line.slice(0, colon).split(";");
|
|
199
|
+
const params = /* @__PURE__ */ new Map();
|
|
200
|
+
for (const part of rest) {
|
|
201
|
+
const equals = part.indexOf("=");
|
|
202
|
+
const key = equals < 0 ? /^(QUOTED-PRINTABLE|BASE64|8BIT|7BIT|B)$/i.test(part) ? "ENCODING" : "TYPE" : part.slice(0, equals);
|
|
203
|
+
const values = (equals < 0 ? part : part.slice(equals + 1)).replaceAll('"', "").split(",");
|
|
204
|
+
params.set(key.toUpperCase(), [...params.get(key.toUpperCase()) ?? [], ...values.map((one) => one.toUpperCase())]);
|
|
205
|
+
}
|
|
206
|
+
const name = head.replace(/^[^.]*\./, "").toUpperCase();
|
|
207
|
+
return { name, params, value: line.slice(colon + 1) };
|
|
208
|
+
}, "propertyOf");
|
|
209
|
+
var encoder = new TextEncoder();
|
|
210
|
+
var decoded = /* @__PURE__ */ __name((property, report) => {
|
|
211
|
+
const encoding = property.params.get("ENCODING")?.[0];
|
|
212
|
+
if (encoding !== "QUOTED-PRINTABLE")
|
|
213
|
+
return property.value;
|
|
214
|
+
const bytes = [];
|
|
215
|
+
const { value } = property;
|
|
216
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
217
|
+
const hex = value.slice(index + 1, index + 3);
|
|
218
|
+
if (value[index] === "=" && /^[0-9A-F]{2}$/i.test(hex)) {
|
|
219
|
+
bytes.push(Number.parseInt(hex, 16));
|
|
220
|
+
index += 2;
|
|
221
|
+
} else
|
|
222
|
+
for (const byte of encoder.encode(value[index]))
|
|
223
|
+
bytes.push(byte);
|
|
224
|
+
}
|
|
225
|
+
const charset = property.params.get("CHARSET")?.[0]?.toLowerCase() ?? "utf-8";
|
|
226
|
+
try {
|
|
227
|
+
return new TextDecoder(charset).decode(new Uint8Array(bytes));
|
|
228
|
+
} catch {
|
|
229
|
+
report(`${property.name} names the unknown charset ${charset}: read as UTF-8`);
|
|
230
|
+
return new TextDecoder("utf-8").decode(new Uint8Array(bytes));
|
|
231
|
+
}
|
|
232
|
+
}, "decoded");
|
|
233
|
+
var components = /* @__PURE__ */ __name((value) => {
|
|
234
|
+
const parts = [""];
|
|
235
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
236
|
+
const char = value[index];
|
|
237
|
+
if (char === "\\" && index + 1 < value.length) {
|
|
238
|
+
const next = value[index + 1];
|
|
239
|
+
parts[parts.length - 1] += next === "n" || next === "N" ? "\n" : next;
|
|
240
|
+
index += 1;
|
|
241
|
+
} else if (char === ";")
|
|
242
|
+
parts.push("");
|
|
243
|
+
else
|
|
244
|
+
parts[parts.length - 1] += char;
|
|
245
|
+
}
|
|
246
|
+
return parts.map((part) => part.trim());
|
|
247
|
+
}, "components");
|
|
248
|
+
var textOf = /* @__PURE__ */ __name((property, report) => components(decoded(property, report)).join(";").trim(), "textOf");
|
|
249
|
+
var e164 = /* @__PURE__ */ __name((typed, region) => {
|
|
250
|
+
const text = typed.replace(/^tel:/i, "").replace(/;.*$/, "").trim();
|
|
251
|
+
const international = /^(\+|00)/.test(text);
|
|
252
|
+
if (!international && region === void 0)
|
|
253
|
+
return void 0;
|
|
254
|
+
const value = typedPhone(text, region === void 0 ? {} : { phoneCountries: [region] })?.value;
|
|
255
|
+
return value?.startsWith("+") ? value : void 0;
|
|
256
|
+
}, "e164");
|
|
257
|
+
var foldedName = /* @__PURE__ */ __name((name) => name.normalize("NFKC").toLowerCase().replace(/\s+/g, " ").trim(), "foldedName");
|
|
258
|
+
var hashed = /* @__PURE__ */ __name((prefix, parts) => `${prefix}${createHash("sha256").update(parts.join("\n")).digest("hex").slice(0, 32)}`, "hashed");
|
|
259
|
+
var organizationId = /* @__PURE__ */ __name((name) => {
|
|
260
|
+
const id = `org:${foldedName(name)}`;
|
|
261
|
+
return id.length <= MAX_ID ? id : hashed("org:", [foldedName(name)]);
|
|
262
|
+
}, "organizationId");
|
|
263
|
+
var titleWord = /* @__PURE__ */ __name((title) => {
|
|
264
|
+
const word = title.toLowerCase().trim().replace(/\s+/g, "-");
|
|
265
|
+
return AS_WORD.test(word) ? word : void 0;
|
|
266
|
+
}, "titleWord");
|
|
267
|
+
var nameOf = /* @__PURE__ */ __name((properties, report) => {
|
|
268
|
+
const full = properties.find(({ name }) => name === "FN");
|
|
269
|
+
const text = full ? textOf(full, report) : "";
|
|
270
|
+
if (text)
|
|
271
|
+
return text;
|
|
272
|
+
const structured = properties.find(({ name }) => name === "N");
|
|
273
|
+
if (!structured)
|
|
274
|
+
return void 0;
|
|
275
|
+
const [family = "", given = "", additional = ""] = components(decoded(structured, report));
|
|
276
|
+
return [given, additional, family].filter(Boolean).join(" ") || void 0;
|
|
277
|
+
}, "nameOf");
|
|
278
|
+
var SKIPPED = /* @__PURE__ */ new Set(["PHOTO", "LOGO", "SOUND", "KEY"]);
|
|
279
|
+
var cardsOf = /* @__PURE__ */ __name((text) => {
|
|
280
|
+
const cards = [];
|
|
281
|
+
const issues = [];
|
|
282
|
+
let card;
|
|
283
|
+
const isBound = /* @__PURE__ */ __name((property, name) => property.name === name && property.value.trim().toUpperCase() === "VCARD", "isBound");
|
|
284
|
+
for (const line of unfolded(text)) {
|
|
285
|
+
const property = propertyOf(line);
|
|
286
|
+
if (!property)
|
|
287
|
+
continue;
|
|
288
|
+
if (isBound(property, "BEGIN")) {
|
|
289
|
+
if (card) {
|
|
290
|
+
issues.push({ card: cards.length, message: "BEGIN:VCARD inside a card: the card ends there, unfinished" });
|
|
291
|
+
cards.push(card);
|
|
292
|
+
}
|
|
293
|
+
card = [];
|
|
294
|
+
} else if (isBound(property, "END")) {
|
|
295
|
+
if (card)
|
|
296
|
+
cards.push(card);
|
|
297
|
+
card = void 0;
|
|
298
|
+
} else if (card && !SKIPPED.has(property.name))
|
|
299
|
+
card.push(property);
|
|
300
|
+
}
|
|
301
|
+
if (card) {
|
|
302
|
+
issues.push({ card: cards.length, message: "the file ends inside a card, with no END:VCARD" });
|
|
303
|
+
cards.push(card);
|
|
304
|
+
}
|
|
305
|
+
return { cards, issues };
|
|
306
|
+
}, "cardsOf");
|
|
307
|
+
var envelopeOfVcard = /* @__PURE__ */ __name((text, { provider, account, batchId, region }) => {
|
|
308
|
+
const { cards, issues } = cardsOf(text);
|
|
309
|
+
const people = [];
|
|
310
|
+
const organizations = /* @__PURE__ */ new Map();
|
|
311
|
+
const seen = /* @__PURE__ */ new Set();
|
|
312
|
+
for (const [index, properties] of cards.entries()) {
|
|
313
|
+
const report = /* @__PURE__ */ __name((message) => {
|
|
314
|
+
if (!issues.some((one) => one.card === index && one.message === message))
|
|
315
|
+
issues.push({ card: index, message });
|
|
316
|
+
}, "report");
|
|
317
|
+
const values = /* @__PURE__ */ __name((wanted) => properties.filter(({ name: name2 }) => name2 === wanted).map((one) => textOf(one, report)).filter(Boolean), "values");
|
|
318
|
+
const name = nameOf(properties, report);
|
|
319
|
+
const phones = [];
|
|
320
|
+
const unread = [];
|
|
321
|
+
for (const typed of values("TEL")) {
|
|
322
|
+
const value = e164(typed, region);
|
|
323
|
+
if (value !== void 0) {
|
|
324
|
+
if (!phones.includes(value))
|
|
325
|
+
phones.push(value);
|
|
326
|
+
} else {
|
|
327
|
+
unread.push(typed);
|
|
328
|
+
issues.push({
|
|
329
|
+
card: index,
|
|
330
|
+
message: `${typed} has no country code${region === void 0 ? " and no region was given" : ` in ${region}`}: kept, not matched`
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const emails = [...new Set(values("EMAIL").map((one) => one.replace(/^mailto:/i, "").toLowerCase()))];
|
|
335
|
+
if (name === void 0 && phones.length === 0 && unread.length === 0 && emails.length === 0) {
|
|
336
|
+
report("the card holds no name, number or address: left out");
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
const uid = values("UID")[0];
|
|
340
|
+
const externalId = uid === void 0 ? hashed("vcard:", [name ?? "", ...[...phones].sort(), ...emails.sort()]) : uid.length <= MAX_ID ? uid : hashed("vcard:", [uid]);
|
|
341
|
+
if (seen.has(externalId)) {
|
|
342
|
+
issues.push({ card: index, message: `another card of the file is ${externalId}: left out` });
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
seen.add(externalId);
|
|
346
|
+
const organization = properties.find(({ name: name2 }) => name2 === "ORG");
|
|
347
|
+
const organizationName = organization ? components(decoded(organization, report))[0] : void 0;
|
|
348
|
+
const title = values("TITLE")[0];
|
|
349
|
+
const relations = [];
|
|
350
|
+
if (organizationName) {
|
|
351
|
+
const id = organizationId(organizationName);
|
|
352
|
+
if (!organizations.has(id))
|
|
353
|
+
organizations.set(id, {
|
|
354
|
+
key: id,
|
|
355
|
+
type: "organization",
|
|
356
|
+
external_id: id,
|
|
357
|
+
operation: "upsert",
|
|
358
|
+
fields: { name: organizationName }
|
|
359
|
+
});
|
|
360
|
+
const as = title === void 0 ? void 0 : titleWord(title);
|
|
361
|
+
relations.push({ role: "member-of", type: "organization", external_id: id, ...as ? { as } : {} });
|
|
362
|
+
}
|
|
363
|
+
people.push({
|
|
364
|
+
key: `person:${externalId}`,
|
|
365
|
+
type: "person",
|
|
366
|
+
external_id: externalId,
|
|
367
|
+
operation: "upsert",
|
|
368
|
+
fields: {
|
|
369
|
+
...name === void 0 ? {} : { name },
|
|
370
|
+
...phones.length ? { phone: phones } : {},
|
|
371
|
+
...emails.length ? { email: emails } : {},
|
|
372
|
+
...unread.length ? { phone_unread: unread } : {},
|
|
373
|
+
...organizationName ? { organization: organizationName } : {},
|
|
374
|
+
...title === void 0 ? {} : { title }
|
|
375
|
+
},
|
|
376
|
+
...relations.length ? { relations } : {}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
envelope: {
|
|
381
|
+
schema_version: 1,
|
|
382
|
+
source: { provider, account, batch_id: batchId },
|
|
383
|
+
...region === void 0 ? {} : { options: { phone_region: region } },
|
|
384
|
+
records: [...organizations.values(), ...people]
|
|
385
|
+
},
|
|
386
|
+
issues
|
|
387
|
+
};
|
|
388
|
+
}, "envelopeOfVcard");
|
|
389
|
+
|
|
390
|
+
// 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/formatting.js
|
|
152
391
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
153
392
|
var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
154
393
|
const { text, spans } = formatted;
|
|
@@ -208,7 +447,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
|
208
447
|
};
|
|
209
448
|
}, "visibleFormattedText");
|
|
210
449
|
|
|
211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
450
|
+
// 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/moderation/check.js
|
|
212
451
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
213
452
|
var LINK = /https?:\/\/\S+/i;
|
|
214
453
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -396,7 +635,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
396
635
|
}, "nextPoint");
|
|
397
636
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
398
637
|
|
|
399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
638
|
+
// 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/moderation/rules.js
|
|
400
639
|
import { existsSync, readFileSync } from "node:fs";
|
|
401
640
|
import { join } from "node:path";
|
|
402
641
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -547,6 +786,8 @@ export {
|
|
|
547
786
|
foldName,
|
|
548
787
|
pickChat,
|
|
549
788
|
pickPerson,
|
|
789
|
+
isVcard,
|
|
790
|
+
envelopeOfVcard,
|
|
550
791
|
validateFormattedText,
|
|
551
792
|
visibleFormattedText,
|
|
552
793
|
judge,
|
|
@@ -2,13 +2,13 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
validateFormattedText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BVWF4B33.js";
|
|
6
6
|
import {
|
|
7
7
|
inputPolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V2E7QFZ3.js";
|
|
9
9
|
import {
|
|
10
10
|
indent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OORMSM6O.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError
|
|
14
14
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -16,16 +16,12 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// 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/checks.js
|
|
20
20
|
var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
|
|
21
21
|
var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
|
|
22
22
|
var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25
|
-
var CRM_KINDS = ["organization", "person", "deal", "lead"];
|
|
26
|
-
var isItemKind = /* @__PURE__ */ __name((kind) => kind === "deal" || kind === "lead", "isItemKind");
|
|
27
|
-
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/markdown.js
|
|
24
|
+
// 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/markdown.js
|
|
29
25
|
var MARKERS = [
|
|
30
26
|
["**", "bold"],
|
|
31
27
|
["~~", "strike"],
|
|
@@ -71,7 +67,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
|
|
|
71
67
|
return end;
|
|
72
68
|
}, "closing");
|
|
73
69
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// 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/markdown-spans.js
|
|
75
71
|
var STYLES = [
|
|
76
72
|
["**", "bold"],
|
|
77
73
|
["__", "underline"],
|
|
@@ -231,7 +227,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
|
|
|
231
227
|
return validateFormattedText(result);
|
|
232
228
|
}, "parseMarkdownSpans");
|
|
233
229
|
|
|
234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
230
|
+
// 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/polls.js
|
|
235
231
|
var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
|
|
236
232
|
const cast = votes.filter((vote) => vote.answers.length > 0);
|
|
237
233
|
const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
|
|
@@ -1880,7 +1876,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
|
|
|
1880
1876
|
var qrcode_default = qrcode;
|
|
1881
1877
|
var stringToBytes = qrcode.stringToBytes;
|
|
1882
1878
|
|
|
1883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1879
|
+
// 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/terminal/qr.js
|
|
1884
1880
|
var QUIET_ZONE = 4;
|
|
1885
1881
|
var BLACK_ON_WHITE = "\x1B[30;107m";
|
|
1886
1882
|
var RESET = "\x1B[0m";
|
|
@@ -1927,7 +1923,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
|
|
|
1927
1923
|
return lines.join("\n");
|
|
1928
1924
|
}, "plainQr");
|
|
1929
1925
|
|
|
1930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1926
|
+
// 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/terminal/login-qr.js
|
|
1931
1927
|
var MARGIN = 2;
|
|
1932
1928
|
var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
|
|
1933
1929
|
var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";
|
|
@@ -1965,8 +1961,6 @@ ${indent(drawn.text, pad + MARGIN)}`);
|
|
|
1965
1961
|
export {
|
|
1966
1962
|
bareCheck,
|
|
1967
1963
|
checkWords,
|
|
1968
|
-
CRM_KINDS,
|
|
1969
|
-
isItemKind,
|
|
1970
1964
|
parseMarkdown,
|
|
1971
1965
|
parseMarkdownSpans,
|
|
1972
1966
|
countedPoll,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readSharedSection,
|
|
5
5
|
sharedConfigPath,
|
|
6
6
|
writeSharedSection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UVPL7YAY.js";
|
|
8
8
|
import {
|
|
9
9
|
storePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GVT5363M.js";
|
|
11
11
|
import {
|
|
12
12
|
CliError
|
|
13
13
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// 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/cli/setup-answers.js
|
|
19
19
|
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
20
20
|
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
21
21
|
var SECTION = "setup";
|