@wirecat/zoom-cli 0.56.0 → 0.58.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.
Files changed (147) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/zm.js +35 -5
  3. package/dist/bundle/all-profiles-RS5IWIGR.js +25 -0
  4. package/dist/bundle/answer-policy-R7VZMCGE.js +96 -0
  5. package/dist/bundle/anthropic-5QHQR4WF.js +70 -0
  6. package/dist/bundle/app-server-7LANSZGE.js +232 -0
  7. package/dist/bundle/bun-O6RL6LRQ.js +169 -0
  8. package/dist/bundle/bun-sqlite-PEJM6CS4.js +69 -0
  9. package/dist/bundle/chunk-24DLFGES.js +97 -0
  10. package/dist/bundle/chunk-27P22POE.js +1109 -0
  11. package/dist/bundle/chunk-3SCTDFNO.js +3398 -0
  12. package/dist/bundle/chunk-3SERIWJD.js +36139 -0
  13. package/dist/bundle/chunk-4AURKUDZ.js +60 -0
  14. package/dist/bundle/chunk-4NGLRHWO.js +24 -0
  15. package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
  16. package/dist/bundle/chunk-5DVW77VC.js +789 -0
  17. package/dist/bundle/chunk-6CYLVFXM.js +9 -0
  18. package/dist/bundle/chunk-6FL25KC5.js +264 -0
  19. package/dist/bundle/chunk-7D2CD3E3.js +193 -0
  20. package/dist/bundle/chunk-7GVNQOV6.js +17 -0
  21. package/dist/bundle/chunk-7H3ZRDLW.js +630 -0
  22. package/dist/bundle/chunk-7Z4ANTAK.js +1095 -0
  23. package/dist/bundle/chunk-A6323R5P.js +22 -0
  24. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  25. package/dist/bundle/chunk-AIXLOMH4.js +63 -0
  26. package/dist/bundle/chunk-AQDWGJZT.js +188 -0
  27. package/dist/bundle/chunk-B32SF7J3.js +18 -0
  28. package/dist/bundle/chunk-BAQLQIMI.js +1938 -0
  29. package/dist/bundle/chunk-BGILD4CI.js +1109 -0
  30. package/dist/bundle/chunk-BXZ6WSVF.js +100 -0
  31. package/dist/bundle/chunk-CTGI4ES2.js +138 -0
  32. package/dist/bundle/chunk-CVIKKIGE.js +76 -0
  33. package/dist/bundle/chunk-DDYR6DYL.js +78 -0
  34. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  35. package/dist/bundle/chunk-DP5DX45H.js +151 -0
  36. package/dist/bundle/chunk-DXKVEOSS.js +53 -0
  37. package/dist/bundle/chunk-DXZTLB24.js +120 -0
  38. package/dist/bundle/chunk-G27MRA24.js +82 -0
  39. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  40. package/dist/bundle/chunk-IYAGQXED.js +433 -0
  41. package/dist/bundle/chunk-K76WFW4I.js +124 -0
  42. package/dist/bundle/chunk-KVHRHBLY.js +884 -0
  43. package/dist/bundle/chunk-L2UIJDWB.js +31 -0
  44. package/dist/bundle/chunk-L3VS3H34.js +482 -0
  45. package/dist/bundle/chunk-MBT7GP7K.js +1970 -0
  46. package/dist/bundle/chunk-MFS52LTZ.js +570 -0
  47. package/dist/bundle/chunk-MMT46EN4.js +29 -0
  48. package/dist/bundle/chunk-MNUTWGSA.js +6094 -0
  49. package/dist/bundle/chunk-N7GAQ27N.js +82 -0
  50. package/dist/bundle/chunk-NDXAZB5Z.js +409 -0
  51. package/dist/bundle/chunk-NOKFJJPA.js +1028 -0
  52. package/dist/bundle/chunk-NW7IMGRR.js +6848 -0
  53. package/dist/bundle/chunk-O5EHUB2V.js +2 -0
  54. package/dist/bundle/chunk-OBZWUNO4.js +160 -0
  55. package/dist/bundle/chunk-PACC5N6T.js +240 -0
  56. package/dist/bundle/chunk-PF25S7L4.js +422 -0
  57. package/dist/bundle/chunk-PKTFZAXG.js +48 -0
  58. package/dist/bundle/chunk-PNBEREOU.js +35626 -0
  59. package/dist/bundle/chunk-POOGFSRA.js +385 -0
  60. package/dist/bundle/chunk-PP3JGQQE.js +3517 -0
  61. package/dist/bundle/chunk-Q2Z3VCM4.js +2 -0
  62. package/dist/bundle/chunk-QCFHL4ES.js +45 -0
  63. package/dist/bundle/chunk-QFGBMS67.js +492 -0
  64. package/dist/bundle/chunk-RUP467ZX.js +948 -0
  65. package/dist/bundle/chunk-RXDIG23Z.js +166 -0
  66. package/dist/bundle/chunk-SIA7HJE2.js +8192 -0
  67. package/dist/bundle/chunk-SL3SXQZ5.js +100 -0
  68. package/dist/bundle/chunk-SV5L36WK.js +19 -0
  69. package/dist/bundle/chunk-T6AAM7UT.js +846 -0
  70. package/dist/bundle/chunk-U6QW67SU.js +18673 -0
  71. package/dist/bundle/chunk-UKR7KH3H.js +288 -0
  72. package/dist/bundle/chunk-UOFOMU3T.js +836 -0
  73. package/dist/bundle/chunk-URO44C5T.js +3570 -0
  74. package/dist/bundle/chunk-UXM7I35J.js +281 -0
  75. package/dist/bundle/chunk-UYJUTZTT.js +73 -0
  76. package/dist/bundle/chunk-VOAVOK4I.js +1146 -0
  77. package/dist/bundle/chunk-VSUY7PDW.js +192 -0
  78. package/dist/bundle/chunk-VYUSEJE4.js +98 -0
  79. package/dist/bundle/chunk-XFCSPOLZ.js +25 -0
  80. package/dist/bundle/chunk-XT7XVPEM.js +538 -0
  81. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  82. package/dist/bundle/chunk-YIFIY7ZE.js +58 -0
  83. package/dist/bundle/chunk-YIMI6O7R.js +5292 -0
  84. package/dist/bundle/chunk-YJRMMZI5.js +275 -0
  85. package/dist/bundle/chunk-YSHSCBPM.js +2315 -0
  86. package/dist/bundle/chunk-ZC5UXEIH.js +215 -0
  87. package/dist/bundle/chunk-ZHXIXDH5.js +161 -0
  88. package/dist/bundle/chunk-ZTOAAYFV.js +122 -0
  89. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  90. package/dist/bundle/cli-IQTASP44.js +831 -0
  91. package/dist/bundle/command-contract-WHZPF7NA.js +38 -0
  92. package/dist/bundle/config-IP5SGHKN.js +79 -0
  93. package/dist/bundle/dist-WT73DF46.js +136 -0
  94. package/dist/bundle/dist-XUFQCJXW.js +7577 -0
  95. package/dist/bundle/echarts-LD3AI55P.js +42501 -0
  96. package/dist/bundle/embed-XEMH4LNX.js +35 -0
  97. package/dist/bundle/embedder-ZCYKSKAE.js +108 -0
  98. package/dist/bundle/first-run-LGYDLIUM.js +23 -0
  99. package/dist/bundle/first-screen-LYQKPNF4.js +36 -0
  100. package/dist/bundle/folders-5ZBUQHAM.js +13 -0
  101. package/dist/bundle/instructions-RZMSW3OC.js +11 -0
  102. package/dist/bundle/main-NKY3JGXY.js +130 -0
  103. package/dist/bundle/mcp-7OXUHLTO.js +189 -0
  104. package/dist/bundle/mcp-OQBZXELQ.js +165 -0
  105. package/dist/bundle/mcp-VISEXTVC.js +92 -0
  106. package/dist/bundle/meetings-XPBHVZAU.js +215 -0
  107. package/dist/bundle/node-P4E63KXA.js +2340 -0
  108. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  109. package/dist/bundle/node-ZRLYQL7J.js +176 -0
  110. package/dist/bundle/node-sqlite-BBEDYBWO.js +45 -0
  111. package/dist/bundle/oauth-UHVRGKZU.js +17 -0
  112. package/dist/bundle/open-J4FCAUAJ.js +19 -0
  113. package/dist/bundle/output-file-SXV2ANW7.js +63 -0
  114. package/dist/bundle/process-LL77573L.js +91 -0
  115. package/dist/bundle/program-EPMIJCGA.js +5845 -0
  116. package/dist/bundle/prompt-LUUMQTMY.js +12 -0
  117. package/dist/bundle/recognize-EMHQX4XF.js +190 -0
  118. package/dist/bundle/remote-ZXS6D7VB.js +26 -0
  119. package/dist/bundle/rerank-WP7RKZNB.js +49 -0
  120. package/dist/bundle/run-log-GS2L66G6.js +111 -0
  121. package/dist/bundle/serve-L6KLLXK2.js +19 -0
  122. package/dist/bundle/server-NOFYENP5.js +53 -0
  123. package/dist/bundle/server-P5TXAPBY.js +66 -0
  124. package/dist/bundle/services-SPOEWVK3.js +330 -0
  125. package/dist/bundle/speech-6OBAKMND.js +44 -0
  126. package/dist/bundle/state-HN5EJKXQ.js +33 -0
  127. package/dist/bundle/store-LEU3M6IN.js +124 -0
  128. package/dist/bundle/store-ZP2URKET.js +141 -0
  129. package/dist/bundle/store-connection-I53XZ2TS.js +76 -0
  130. package/dist/bundle/store-maintenance-command-PSCHEHHY.js +54 -0
  131. package/dist/bundle/streaming-AK6Q2ZGQ.js +15 -0
  132. package/dist/bundle/tokens-CCM3D4ZT.js +17 -0
  133. package/dist/bundle/zm.js +8 -0
  134. package/dist/contract-overrides.d.ts.map +1 -1
  135. package/dist/contract-overrides.js +29 -17
  136. package/dist/contract-overrides.js.map +1 -1
  137. package/dist/mcp-command.d.ts +3 -2
  138. package/dist/mcp-command.d.ts.map +1 -1
  139. package/dist/mcp-command.js +62 -10
  140. package/dist/mcp-command.js.map +1 -1
  141. package/dist/program-bindings.d.ts.map +1 -1
  142. package/dist/program-bindings.js +1 -0
  143. package/dist/program-bindings.js.map +1 -1
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +7 -5
  147. package/skills/zoom-cli/SKILL.md +2 -0
@@ -0,0 +1,192 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ stringWidth,
5
+ wrapAnsi
6
+ } from "./chunk-HTQTIKWP.js";
7
+ import {
8
+ singleLine,
9
+ visibleControls
10
+ } from "./chunk-YIMI6O7R.js";
11
+ import {
12
+ __name
13
+ } from "./chunk-ZVVMGPBJ.js";
14
+
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.473.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_39633e3162553a2c86dde989a9811fcb/node_modules/@wirecat/cli-core/dist/render/messages.js
16
+ import { styleText } from "node:util";
17
+ var TIME_WIDTH = 8;
18
+ var INDENT = " ".repeat(TIME_WIDTH + 2);
19
+ var MIN_WIDTH = 40;
20
+ var SENDER_COLOURS = ["green", "yellow", "magenta", "blue", "red"];
21
+ var renderMessages = /* @__PURE__ */ __name((messages, options = {}) => {
22
+ if (messages.length === 0)
23
+ return "(nothing)";
24
+ const day = dayFormatter(options);
25
+ const paint = painter(options);
26
+ let previous;
27
+ const blocks = [];
28
+ for (const message of messages) {
29
+ const date = day(message.timestamp);
30
+ if (date !== previous)
31
+ blocks.push(paint("dim", `\u2500\u2500 ${date} \u2500\u2500`));
32
+ previous = date;
33
+ blocks.push(renderMessage(message, options));
34
+ }
35
+ return blocks.join("\n\n");
36
+ }, "renderMessages");
37
+ var renderMessage = /* @__PURE__ */ __name((message, options = {}) => {
38
+ const paint = painter(options);
39
+ const width = Math.max(MIN_WIDTH, options.width ?? 80);
40
+ const room = width - INDENT.length;
41
+ const time = timeFormatter(options);
42
+ const verbosity = options.verbosity ?? 0;
43
+ const chat = "chatTitle" in message ? paint("dim", ` \xB7 ${singleLine(message.chatTitle ?? message.chatId)}`) : "";
44
+ const mark = "anchor" in message && message.anchor ? paint("bold", " \u25C0") : "";
45
+ const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options)}${chat}${mark}`];
46
+ const body = /* @__PURE__ */ __name((text) => wrapAnsi(visibleControls(text), room, { hard: true }).split("\n"), "body");
47
+ const email = message.email;
48
+ if (email)
49
+ lines.push(paint("dim", mailLine(email)));
50
+ if (message.replyTo)
51
+ lines.push(paint("dim", preview("\u21B3", message.replyTo, room, options)));
52
+ if (message.forwardedFrom) {
53
+ lines.push(paint("dim", `\u21AA ${nameOf(message.forwardedFrom, options)}`));
54
+ if (message.forwardedFrom.text)
55
+ for (const line of body(message.forwardedFrom.text))
56
+ lines.push(line);
57
+ lines.push(...attachmentLines(message.forwardedFrom.attachments, paint, options));
58
+ }
59
+ if (message.text)
60
+ for (const line of body(message.text))
61
+ lines.push(line);
62
+ lines.push(...attachmentLines(message.attachments, paint, options));
63
+ if (message.reactions && message.reactions.total > 0)
64
+ lines.push(paint("dim", reactionLine(message.reactions)));
65
+ if (message.editedAt)
66
+ lines.push(paint("dim", `edited ${editedAt(message, options)}`));
67
+ if (verbosity >= 1) {
68
+ const fields = [
69
+ ["message", message.id],
70
+ ["sender", message.senderId],
71
+ ["chat", message.chatId],
72
+ ["reply to", message.replyTo?.id ?? message.replyToId],
73
+ ["thread", message.threadId],
74
+ ["forward of", message.forwardedFrom?.id],
75
+ ...message.attachments.map((a) => ["link", a.url])
76
+ ];
77
+ if (verbosity >= 2) {
78
+ fields.push(["provider", options.provider], ["profile", options.profile], ["sent", message.timestamp], ["edited", message.editedAt], ["outgoing", message.outgoing === null ? "unknown" : String(message.outgoing)], ...message.attachments.map((a) => ["attachment", JSON.stringify(a)]), ["metadata", message.providerMetadata && JSON.stringify(message.providerMetadata)]);
79
+ }
80
+ const shown = fields.filter((field) => typeof field[1] === "string");
81
+ const label = Math.max(...shown.map(([key]) => key.length));
82
+ lines.push("", ...shown.map(([key, value]) => paint("dim", `${key.padEnd(label)} ${singleLine(value)}`)));
83
+ }
84
+ return lines.map((line, index) => index === 0 || line === "" ? line : `${INDENT}${line}`).join("\n");
85
+ }, "renderMessage");
86
+ var mailLine = /* @__PURE__ */ __name(({ to, cc, labels }) => {
87
+ const names = /* @__PURE__ */ __name((people) => people.map(({ name, address }) => singleLine(name ?? address)).join(", "), "names");
88
+ return [to.length ? `to ${names(to)}` : "", cc.length ? `cc ${names(cc)}` : "", labels.join(", ")].filter(Boolean).join(" \xB7 ");
89
+ }, "mailLine");
90
+ var painter = /* @__PURE__ */ __name(({ color = false }) => (style, text) => color ? styleText(style, text, { validateStream: false }) : text, "painter");
91
+ var senderOf = /* @__PURE__ */ __name((message, options) => {
92
+ const paint = painter(options);
93
+ if (message.outgoing === true)
94
+ return paint(["bold", "cyan"], you(options));
95
+ const name = nameOf(message, options);
96
+ if (!options.senderColors)
97
+ return paint("bold", name);
98
+ const colour = SENDER_COLOURS[hash(message.senderId ?? name) % SENDER_COLOURS.length] ?? "green";
99
+ return paint(["bold", colour], name);
100
+ }, "senderOf");
101
+ var nameOf = /* @__PURE__ */ __name(({ senderName, senderId, outgoing }, options) => outgoing === true ? you(options) : singleLine(senderName ?? senderId ?? "unknown"), "nameOf");
102
+ var DEFAULT_LOCALE = "ru-RU";
103
+ var you = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE }) => locale.startsWith("ru") ? "\u0432\u044B" : "you", "you");
104
+ var hash = /* @__PURE__ */ __name((value) => [...value].reduce((sum, char) => sum * 31 + char.charCodeAt(0) >>> 0, 7), "hash");
105
+ var preview = /* @__PURE__ */ __name((mark, quoted, room, options) => {
106
+ const text = singleLine(quoted.text.split("\n")[0] ?? "") || (quoted.attachments[0] ? `\u{1F4CE} ${quoted.attachments[0].kind}` : "");
107
+ const line = text ? `${mark} ${nameOf(quoted, options)}: ${text}` : `${mark} message ${quoted.id}`;
108
+ if (stringWidth(line) <= room)
109
+ return line;
110
+ return `${wrapAnsi(line, room - 1, { hard: true }).split("\n")[0]}\u2026`;
111
+ }, "preview");
112
+ var attachmentLines = /* @__PURE__ */ __name((attachments, paint, options) => {
113
+ const link = /* @__PURE__ */ __name((label, raw) => {
114
+ if (raw === void 0)
115
+ return label;
116
+ const url = singleLine(raw);
117
+ return options.color ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : `${label} ${url}`;
118
+ }, "link");
119
+ let number = 0;
120
+ const keyboard = attachments.flatMap((attachment) => attachment.buttons ?? []).map((row) => paint("dim", row.map((button) => link(`[${++number} ${singleLine(button.text)}]`, button.url)).join(" ")));
121
+ const polls = attachments.flatMap((attachment) => attachment.poll ? pollLines(attachment.poll) : []);
122
+ const groups = /* @__PURE__ */ new Map();
123
+ for (const attachment of attachments) {
124
+ if (attachment.buttons || attachment.poll)
125
+ continue;
126
+ const key = singleLine(attachment.name ?? attachment.title ?? attachment.kind);
127
+ groups.set(key, [...groups.get(key) ?? [], attachment]);
128
+ }
129
+ const files = [...groups].map(([label, same]) => {
130
+ const first = same[0];
131
+ const size = first?.size === void 0 ? "" : ` \xB7 ${megabytes(first.size)}`;
132
+ if (same.length === 1)
133
+ return paint("dim", `\u{1F4CE} ${link(`${label}${size}`, first?.url)}`);
134
+ const each = same.map((attachment, index) => link(String(index + 1), attachment.url)).join(" ");
135
+ return paint("dim", `\u{1F4CE} ${label} \xD7${same.length} ${each}`);
136
+ });
137
+ return [...polls, ...files, ...keyboard];
138
+ }, "attachmentLines");
139
+ var pollLines = /* @__PURE__ */ __name((poll) => {
140
+ const kind = [
141
+ poll.closed ? "closed" : "",
142
+ poll.multiple ? "several answers" : "",
143
+ poll.anonymous ? "anonymous" : "",
144
+ poll.quiz ? "quiz" : ""
145
+ ].filter(Boolean);
146
+ const count = /* @__PURE__ */ __name((voters) => voters === null ? "?" : String(voters), "count");
147
+ return [
148
+ `\u{1F4CA} ${visibleControls(poll.question)}`,
149
+ ...poll.answers.map((answer) => ` [${answer.id}] ${visibleControls(answer.text)} \u2014 ${count(answer.voters)}${answer.chosen ? " \u2713" : ""}`),
150
+ ` ${[`${count(poll.voters)} voted`, ...kind].join(" \xB7 ")}`
151
+ ];
152
+ }, "pollLines");
153
+ var megabytes = /* @__PURE__ */ __name((bytes) => bytes >= 1e6 ? `${Math.round(bytes / 1e6)} MB` : `${Math.max(1, Math.round(bytes / 1e3))} KB`, "megabytes");
154
+ var parts = /* @__PURE__ */ __name((format, iso) => Object.fromEntries(format.formatToParts(new Date(iso)).map(({ type, value }) => [type, value])), "parts");
155
+ var timeFormatter = /* @__PURE__ */ __name(({ timeZone }) => {
156
+ const format = new Intl.DateTimeFormat("en-GB", {
157
+ hour: "2-digit",
158
+ minute: "2-digit",
159
+ second: "2-digit",
160
+ hourCycle: "h23",
161
+ ...timeZone ? { timeZone } : {}
162
+ });
163
+ return (iso) => {
164
+ const { hour, minute, second } = parts(format, iso);
165
+ return `${hour}:${minute}:${second}`;
166
+ };
167
+ }, "timeFormatter");
168
+ var dayFormatter = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE, timeZone }) => {
169
+ const format = new Intl.DateTimeFormat(locale, {
170
+ day: "numeric",
171
+ month: "long",
172
+ year: "numeric",
173
+ ...timeZone ? { timeZone } : {}
174
+ });
175
+ return (iso) => format.format(new Date(iso)).replace(/\s*г\.$/, "");
176
+ }, "dayFormatter");
177
+ var reactionLine = /* @__PURE__ */ __name(({ counts, mine }) => {
178
+ const shown = counts.map(({ reaction, count }) => `${singleLine(reaction)} ${count}`).join(" ");
179
+ return mine ? `${shown} (you: ${singleLine(mine)})` : shown;
180
+ }, "reactionLine");
181
+ var editedAt = /* @__PURE__ */ __name((message, options) => {
182
+ const edited = message.editedAt ?? message.timestamp;
183
+ const time = timeFormatter(options)(edited);
184
+ const day = dayFormatter(options);
185
+ return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
186
+ }, "editedAt");
187
+
188
+ export {
189
+ renderMessages,
190
+ renderMessage,
191
+ pollLines
192
+ };
@@ -0,0 +1,98 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ timezoneOf,
5
+ wallTime
6
+ } from "./chunk-UOFOMU3T.js";
7
+ import {
8
+ CliError,
9
+ isCliError
10
+ } from "./chunk-YIMI6O7R.js";
11
+ import {
12
+ __name
13
+ } from "./chunk-ZVVMGPBJ.js";
14
+
15
+ // dist/errors.js
16
+ var checkCancelled = /* @__PURE__ */ __name((signal) => {
17
+ if (!signal?.aborted)
18
+ return;
19
+ if (isCliError(signal.reason))
20
+ throw signal.reason;
21
+ const timedOut = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
22
+ throw new CliError(timedOut ? "timeout" : "cancelled", timedOut ? "command timed out" : "command cancelled");
23
+ }, "checkCancelled");
24
+ var cancellableStore = /* @__PURE__ */ __name((store, signal) => new Proxy(store, {
25
+ get(target, key, receiver) {
26
+ const method = Reflect.get(target, key, receiver);
27
+ return typeof method === "function" ? async (...args) => {
28
+ checkCancelled(signal());
29
+ const result = await method.apply(target, args);
30
+ checkCancelled(signal());
31
+ return result;
32
+ } : method;
33
+ }
34
+ }), "cancellableStore");
35
+ var object = /* @__PURE__ */ __name((value) => {
36
+ if (typeof value !== "object" || value === null || Array.isArray(value))
37
+ throw new CliError("invalid_response", "Zoom returned an invalid response");
38
+ return value;
39
+ }, "object");
40
+ var string = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() ? value : null, "string");
41
+ var number = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) ? value : null, "number");
42
+ var zoomInstant = /* @__PURE__ */ __name((text, message) => {
43
+ const invalid = /* @__PURE__ */ __name(() => new CliError("invalid_response", message), "invalid");
44
+ if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(text))
45
+ throw invalid();
46
+ const local = text.replace(/(?:Z|[+-]\d{2}:\d{2})$/, "Z");
47
+ const date = new Date(local);
48
+ if (!Number.isFinite(date.getTime()) || date.toISOString().slice(0, 19) !== local.slice(0, 19))
49
+ throw invalid();
50
+ const stamp = Date.parse(text);
51
+ if (!Number.isSafeInteger(stamp))
52
+ throw invalid();
53
+ return stamp;
54
+ }, "zoomInstant");
55
+ var TIME_WITHOUT_ZONE = "time_without_zone";
56
+ var ZoneAssumptions = class {
57
+ static {
58
+ __name(this, "ZoneAssumptions");
59
+ }
60
+ count = 0;
61
+ zones = /* @__PURE__ */ new Set();
62
+ add(zone) {
63
+ this.count++;
64
+ this.zones.add(zone);
65
+ }
66
+ take() {
67
+ if (this.count === 0)
68
+ return [];
69
+ const notice = `${this.count} Zoom ${this.count === 1 ? "time had" : "times had"} no zone; read in ${[...this.zones].join(" or ")} and marked ${TIME_WITHOUT_ZONE}`;
70
+ this.count = 0;
71
+ this.zones.clear();
72
+ return [notice];
73
+ }
74
+ };
75
+ var zoomTime = /* @__PURE__ */ __name((text, message) => {
76
+ if (/(?:Z|[+-]\d{2}:\d{2})$/.test(text))
77
+ return { time: zoomInstant(text, message), zone: null };
78
+ const utc = zoomInstant(`${text}Z`, message);
79
+ const zone = timezoneOf();
80
+ try {
81
+ return { time: wallTime(text.replace(/(\.\d{3})\d+$/, "$1"), zone, { start: 0, end: text.length }), zone };
82
+ } catch {
83
+ return { time: utc, zone: "UTC" };
84
+ }
85
+ }, "zoomTime");
86
+ var withIssue = /* @__PURE__ */ __name((metadata, doubtful) => doubtful ? { ...metadata, issues: [TIME_WITHOUT_ZONE] } : metadata, "withIssue");
87
+
88
+ export {
89
+ checkCancelled,
90
+ cancellableStore,
91
+ object,
92
+ string,
93
+ number,
94
+ zoomInstant,
95
+ ZoneAssumptions,
96
+ zoomTime,
97
+ withIssue
98
+ };
@@ -0,0 +1,25 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-YIMI6O7R.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.473.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_39633e3162553a2c86dde989a9811fcb/node_modules/@wirecat/cli-core/dist/ports/app.js
11
+ var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
12
+ var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
13
+ const name = envName(app, "READ_ONLY");
14
+ const value = env[name];
15
+ return value === void 0 || value.trim() === "" || value === "0" ? void 0 : name;
16
+ }, "readOnlyLockOf");
17
+ var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
18
+ var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
19
+
20
+ export {
21
+ envName,
22
+ readOnlyLockOf,
23
+ MESSENGER_CHANGE_REFUSAL,
24
+ readOnlyRefusal
25
+ };