skillwatch 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/checker.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { a as R, c as Wt, d as __toESM, i as Nt, l as be, n as Gt, o as Rt, r as Me, t as require_picocolors, u as Ct } from "./picocolors-hRUfkPbe.js";
2
3
  import { execFileSync } from "node:child_process";
3
4
  import { createHash } from "node:crypto";
4
5
  import { existsSync } from "node:fs";
@@ -7,9 +8,9 @@ import { homedir } from "node:os";
7
8
  import { dirname, join, resolve } from "node:path";
8
9
  import { fileURLToPath } from "node:url";
9
10
  //#region src/checker.ts
11
+ var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
10
12
  const log = (message) => {
11
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
12
- console.log(`[${timestamp}] ${message}`);
13
+ console.log(message);
13
14
  };
14
15
  const readJson = async (path, fallback) => {
15
16
  try {
@@ -176,36 +177,74 @@ const findUpdates = async () => {
176
177
  updates
177
178
  };
178
179
  };
180
+ const promptAndUpdate = async (signature, grouped) => {
181
+ const shouldUpdate = await Rt({ message: "Update skills now?" });
182
+ if (Ct(shouldUpdate)) {
183
+ Nt("Cancelled");
184
+ await writeState(signature, grouped);
185
+ process.exitCode = 0;
186
+ return;
187
+ }
188
+ if (shouldUpdate) {
189
+ const updateSpinner = be();
190
+ updateSpinner.start("Updating skills...");
191
+ try {
192
+ execFileSync("npx", ["skills", "update"], { stdio: "pipe" });
193
+ updateSpinner.stop("Skills updated successfully");
194
+ } catch {
195
+ updateSpinner.stop("Update failed");
196
+ R.error(`Run manually: ${import_picocolors.default.bold("npx skills update")}`);
197
+ }
198
+ await writeState(null);
199
+ Gt("Done");
200
+ return;
201
+ }
202
+ sendNotification("Skill updates available", buildNotificationBody(grouped));
203
+ await writeState(signature, grouped);
204
+ Gt("Done");
205
+ };
179
206
  const main = async () => {
180
- log(`Using lock file: ${LOCK_PATH}`);
181
- log(`Using state file: ${STATE_PATH}`);
207
+ const tty = Me(process.stdout);
208
+ if (tty) Wt(import_picocolors.default.bold("skillwatch"));
209
+ const info = tty ? (m) => R.info(m) : log;
210
+ const warn = tty ? (m) => R.warn(m) : (m) => log(`Warning: ${m}`);
211
+ const success = tty ? (m) => R.success(m) : log;
212
+ info(`Lock file: ${import_picocolors.default.dim(LOCK_PATH)}`);
213
+ info(`State file: ${import_picocolors.default.dim(STATE_PATH)}`);
182
214
  if (!existsSync(LOCK_PATH)) {
183
- log("No skill lock file found. Nothing to check.");
215
+ warn("No skill lock file found. Nothing to check.");
216
+ if (tty) Gt("Done");
184
217
  process.exitCode = 0;
185
218
  return;
186
219
  }
220
+ const s = tty ? be() : null;
221
+ s?.start("Checking for skill updates...");
187
222
  const { trackedSkills, updates, errors } = await findUpdates();
188
223
  const grouped = groupUpdatesByRepo(updates);
189
- log(`Tracked ${trackedSkills.length} GitHub-backed skill(s).`);
190
- if (errors.length > 0) for (const error of errors) log(`Warning: ${error.repoId}/${error.skillName} - ${error.reason}`);
224
+ if (tty) s?.stop(`Tracked ${import_picocolors.default.bold(String(trackedSkills.length))} GitHub-backed skill(s)`);
225
+ else log(`Tracked ${trackedSkills.length} GitHub-backed skill(s).`);
226
+ if (errors.length > 0) for (const error of errors) warn(`${error.repoId}/${error.skillName} - ${error.reason}`);
191
227
  if (grouped.length === 0) {
192
- log("No updates available.");
228
+ success("No updates available.");
193
229
  await writeState(null);
230
+ if (tty) Gt("All skills are up to date");
194
231
  process.exitCode = 0;
195
232
  return;
196
233
  }
197
- for (const repo of grouped) log(`Update available: ${repo.repoId} -> ${repo.skillNames.join(", ")}`);
198
- const state = await readJson(STATE_PATH, {});
234
+ for (const repo of grouped) info(`Update available: ${import_picocolors.default.bold(repo.repoId)} ${import_picocolors.default.dim("->")} ${repo.skillNames.join(", ")}`);
199
235
  const signature = buildSignature(grouped);
200
- if (state.lastNotifiedSignature === signature) {
236
+ if (tty) {
237
+ await promptAndUpdate(signature, grouped);
238
+ return;
239
+ }
240
+ if ((await readJson(STATE_PATH, {})).lastNotifiedSignature === signature) {
201
241
  log("Updates already notified. Skipping duplicate notification.");
202
242
  await writeState(signature, grouped);
203
243
  process.exitCode = 0;
204
244
  return;
205
245
  }
206
- const title = "Skill updates available";
207
246
  const body = buildNotificationBody(grouped);
208
- sendNotification(title, body);
247
+ sendNotification("Skill updates available", body);
209
248
  log(`Notification sent: ${body}`);
210
249
  log("To update installed skills, run: npx skills update");
211
250
  await writeState(signature, grouped);
@@ -217,7 +256,11 @@ const isExecutedDirectly = () => {
217
256
  if (isExecutedDirectly()) try {
218
257
  await main();
219
258
  } catch (error) {
220
- log(`Fatal error: ${error instanceof Error ? error.stack || error.message : String(error)}`);
259
+ const message = error instanceof Error ? error.stack || error.message : String(error);
260
+ if (Me(process.stdout)) {
261
+ R.error(message);
262
+ Gt("Check failed");
263
+ } else log(`Fatal error: ${message}`);
221
264
  process.exitCode = 1;
222
265
  }
223
266
  //#endregion
package/dist/cli.js CHANGED
@@ -1,20 +1,23 @@
1
1
  #!/usr/bin/env node
2
+ import { c as Wt, d as __toESM, i as Nt, n as Gt, s as Vt, t as require_picocolors } from "./picocolors-hRUfkPbe.js";
2
3
  import { execFileSync } from "node:child_process";
3
4
  import { existsSync, realpathSync } from "node:fs";
4
- import { copyFile, mkdir, rm, writeFile } from "node:fs/promises";
5
+ import { copyFile, mkdir, readdir, rm, writeFile } from "node:fs/promises";
5
6
  import { homedir } from "node:os";
6
7
  import { dirname, join, resolve } from "node:path";
7
8
  import { fileURLToPath } from "node:url";
8
9
  //#region src/cli.ts
10
+ var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
9
11
  const PACKAGE_NAME = "skillwatch";
10
- const PACKAGE_VERSION = "0.1.3";
12
+ const PACKAGE_VERSION = "0.1.5";
11
13
  const ENTRYPOINT_PATH = fileURLToPath(import.meta.url);
12
- const CHECKER_SOURCE_PATH = join(dirname(ENTRYPOINT_PATH), "checker.js");
14
+ const PACKAGE_DIR = dirname(ENTRYPOINT_PATH);
15
+ const CHECKER_SOURCE_PATH = join(PACKAGE_DIR, "checker.js");
13
16
  const COMMAND_NAME = PACKAGE_NAME.split("/").at(-1) ?? "skillwatch";
14
17
  const APP_DIR_NAME = "skillwatch";
15
18
  const LEGACY_APP_DIR_NAME = "skills-update-notifier";
16
19
  const fail = (message) => {
17
- console.error(message);
20
+ Nt(message);
18
21
  process.exit(1);
19
22
  };
20
23
  const parseInteger = (value, flagName, min, max) => {
@@ -96,25 +99,24 @@ const bootstrapAgent = () => {
96
99
  ], { stdio: "inherit" });
97
100
  };
98
101
  const printUsage = () => {
99
- console.log(`
100
- ${PACKAGE_NAME} ${PACKAGE_VERSION}
101
-
102
- Usage:
103
- ${COMMAND_NAME} install [--hour 9] [--minute 0]
104
- ${COMMAND_NAME} uninstall
105
- ${COMMAND_NAME} check-now
106
- ${COMMAND_NAME} --help
107
- ${COMMAND_NAME} --version
108
-
109
- Commands:
110
- install Install the daily LaunchAgent and checker script
111
- uninstall Remove the LaunchAgent, checker script, and logs
112
- check-now Run the checker immediately
113
-
114
- Options for install:
115
- --hour <0-23> Daily check hour, default 9
116
- --minute <0-59> Daily check minute, default 0
117
- `.trim());
102
+ Wt(`${import_picocolors.default.bold(PACKAGE_NAME)} ${import_picocolors.default.dim(`v${PACKAGE_VERSION}`)}`);
103
+ Vt([
104
+ `${import_picocolors.default.bold("Usage")}`,
105
+ ` ${COMMAND_NAME} install [--hour 9] [--minute 0]`,
106
+ ` ${COMMAND_NAME} uninstall`,
107
+ ` ${COMMAND_NAME} check-now`,
108
+ ` ${COMMAND_NAME} --help`,
109
+ ` ${COMMAND_NAME} --version`,
110
+ "",
111
+ `${import_picocolors.default.bold("Commands")}`,
112
+ ` install Install the daily LaunchAgent and checker script`,
113
+ ` uninstall Remove the LaunchAgent, checker script, and logs`,
114
+ ` check-now Run the checker immediately`,
115
+ "",
116
+ `${import_picocolors.default.bold("Options for install")}`,
117
+ ` --hour <0-23> Daily check hour ${import_picocolors.default.dim("(default 9)")}`,
118
+ ` --minute <0-59> Daily check minute ${import_picocolors.default.dim("(default 0)")}`
119
+ ].join("\n"), "Help");
118
120
  };
119
121
  const parseInstallOptions = (args) => {
120
122
  const options = {
@@ -142,6 +144,7 @@ const parseInstallOptions = (args) => {
142
144
  return options;
143
145
  };
144
146
  const installCommand = async (args) => {
147
+ Wt(`${import_picocolors.default.bold(COMMAND_NAME)} ${import_picocolors.default.dim("install")}`);
145
148
  assertMacOS();
146
149
  requireCommand("launchctl");
147
150
  requireCommand("plutil");
@@ -151,7 +154,8 @@ const installCommand = async (args) => {
151
154
  const checkerTargetPath = join(appDir, "checker.js");
152
155
  await mkdir(appDir, { recursive: true });
153
156
  await mkdir(logDir, { recursive: true });
154
- await copyFile(CHECKER_SOURCE_PATH, checkerTargetPath);
157
+ const distFiles = await readdir(PACKAGE_DIR);
158
+ await Promise.all(distFiles.filter((f) => f.endsWith(".js")).map((f) => copyFile(join(PACKAGE_DIR, f), join(appDir, f))));
155
159
  await writePlist(options, {
156
160
  checkerTargetPath,
157
161
  stderrPath: join(logDir, "stderr.log"),
@@ -160,20 +164,15 @@ const installCommand = async (args) => {
160
164
  lintPlist();
161
165
  bootoutIfLoaded();
162
166
  bootstrapAgent();
163
- console.log(`
164
- Installed ${COMMAND_NAME}.
165
-
166
- Files:
167
- agent: ${getPlistTargetPath()}
168
- script: ${checkerTargetPath}
169
- logs: ${logDir}
170
-
171
- Check now:
172
- npx ${COMMAND_NAME} check-now
173
- launchctl kickstart -k gui/${getUid()}/${LABEL}
174
- `.trim());
167
+ Vt([
168
+ `${import_picocolors.default.dim("agent")} ${getPlistTargetPath()}`,
169
+ `${import_picocolors.default.dim("script")} ${checkerTargetPath}`,
170
+ `${import_picocolors.default.dim("logs")} ${logDir}`
171
+ ].join("\n"), "Installed files");
172
+ Gt(`Run ${import_picocolors.default.bold(`npx ${COMMAND_NAME} check-now`)} to check immediately`);
175
173
  };
176
174
  const uninstallCommand = async () => {
175
+ Wt(`${import_picocolors.default.bold(COMMAND_NAME)} ${import_picocolors.default.dim("uninstall")}`);
177
176
  assertMacOS();
178
177
  requireCommand("launchctl");
179
178
  bootoutIfLoaded();
@@ -196,7 +195,7 @@ const uninstallCommand = async () => {
196
195
  force: true,
197
196
  recursive: true
198
197
  });
199
- console.log(`Uninstalled ${COMMAND_NAME}.`);
198
+ Gt(`${COMMAND_NAME} has been uninstalled`);
200
199
  };
201
200
  const checkNowCommand = () => {
202
201
  assertMacOS();
@@ -0,0 +1,941 @@
1
+ #!/usr/bin/env node
2
+ import "node:fs";
3
+ import "node:path";
4
+ import { stripVTControlCharacters, styleText } from "node:util";
5
+ import N, { stdin, stdout } from "node:process";
6
+ import * as k from "node:readline";
7
+ import ot from "node:readline";
8
+ import { ReadStream } from "node:tty";
9
+ //#region \0rolldown/runtime.js
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
+ key = keys[i];
20
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
+ get: ((k) => from[k]).bind(null, key),
22
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
+ });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ //#endregion
32
+ //#region node_modules/@clack/core/dist/index.mjs
33
+ var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
34
+ const ESC = "\x1B";
35
+ const CSI = `${ESC}[`;
36
+ const beep = "\x07";
37
+ const cursor = {
38
+ to(x, y) {
39
+ if (!y) return `${CSI}${x + 1}G`;
40
+ return `${CSI}${y + 1};${x + 1}H`;
41
+ },
42
+ move(x, y) {
43
+ let ret = "";
44
+ if (x < 0) ret += `${CSI}${-x}D`;
45
+ else if (x > 0) ret += `${CSI}${x}C`;
46
+ if (y < 0) ret += `${CSI}${-y}A`;
47
+ else if (y > 0) ret += `${CSI}${y}B`;
48
+ return ret;
49
+ },
50
+ up: (count = 1) => `${CSI}${count}A`,
51
+ down: (count = 1) => `${CSI}${count}B`,
52
+ forward: (count = 1) => `${CSI}${count}C`,
53
+ backward: (count = 1) => `${CSI}${count}D`,
54
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
55
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
56
+ left: `${CSI}G`,
57
+ hide: `${CSI}?25l`,
58
+ show: `${CSI}?25h`,
59
+ save: `${ESC}7`,
60
+ restore: `${ESC}8`
61
+ };
62
+ module.exports = {
63
+ cursor,
64
+ scroll: {
65
+ up: (count = 1) => `${CSI}S`.repeat(count),
66
+ down: (count = 1) => `${CSI}T`.repeat(count)
67
+ },
68
+ erase: {
69
+ screen: `${CSI}2J`,
70
+ up: (count = 1) => `${CSI}1J`.repeat(count),
71
+ down: (count = 1) => `${CSI}J`.repeat(count),
72
+ line: `${CSI}2K`,
73
+ lineEnd: `${CSI}K`,
74
+ lineStart: `${CSI}1K`,
75
+ lines(count) {
76
+ let clear = "";
77
+ for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
78
+ if (count) clear += cursor.left;
79
+ return clear;
80
+ }
81
+ },
82
+ beep
83
+ };
84
+ })))();
85
+ function x$1(t, e, s) {
86
+ if (!s.some((u) => !u.disabled)) return t;
87
+ const i = t + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
88
+ return s[n].disabled ? x$1(n, e < 0 ? -1 : 1, s) : n;
89
+ }
90
+ const at = (t) => t === 161 || t === 164 || t === 167 || t === 168 || t === 170 || t === 173 || t === 174 || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || t === 198 || t === 208 || t === 215 || t === 216 || t >= 222 && t <= 225 || t === 230 || t >= 232 && t <= 234 || t === 236 || t === 237 || t === 240 || t === 242 || t === 243 || t >= 247 && t <= 250 || t === 252 || t === 254 || t === 257 || t === 273 || t === 275 || t === 283 || t === 294 || t === 295 || t === 299 || t >= 305 && t <= 307 || t === 312 || t >= 319 && t <= 322 || t === 324 || t >= 328 && t <= 331 || t === 333 || t === 338 || t === 339 || t === 358 || t === 359 || t === 363 || t === 462 || t === 464 || t === 466 || t === 468 || t === 470 || t === 472 || t === 474 || t === 476 || t === 593 || t === 609 || t === 708 || t === 711 || t >= 713 && t <= 715 || t === 717 || t === 720 || t >= 728 && t <= 731 || t === 733 || t === 735 || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || t === 1025 || t >= 1040 && t <= 1103 || t === 1105 || t === 8208 || t >= 8211 && t <= 8214 || t === 8216 || t === 8217 || t === 8220 || t === 8221 || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || t === 8240 || t === 8242 || t === 8243 || t === 8245 || t === 8251 || t === 8254 || t === 8308 || t === 8319 || t >= 8321 && t <= 8324 || t === 8364 || t === 8451 || t === 8453 || t === 8457 || t === 8467 || t === 8470 || t === 8481 || t === 8482 || t === 8486 || t === 8491 || t === 8531 || t === 8532 || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || t === 8585 || t >= 8592 && t <= 8601 || t === 8632 || t === 8633 || t === 8658 || t === 8660 || t === 8679 || t === 8704 || t === 8706 || t === 8707 || t === 8711 || t === 8712 || t === 8715 || t === 8719 || t === 8721 || t === 8725 || t === 8730 || t >= 8733 && t <= 8736 || t === 8739 || t === 8741 || t >= 8743 && t <= 8748 || t === 8750 || t >= 8756 && t <= 8759 || t === 8764 || t === 8765 || t === 8776 || t === 8780 || t === 8786 || t === 8800 || t === 8801 || t >= 8804 && t <= 8807 || t === 8810 || t === 8811 || t === 8814 || t === 8815 || t === 8834 || t === 8835 || t === 8838 || t === 8839 || t === 8853 || t === 8857 || t === 8869 || t === 8895 || t === 8978 || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || t === 9632 || t === 9633 || t >= 9635 && t <= 9641 || t === 9650 || t === 9651 || t === 9654 || t === 9655 || t === 9660 || t === 9661 || t === 9664 || t === 9665 || t >= 9670 && t <= 9672 || t === 9675 || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || t === 9711 || t === 9733 || t === 9734 || t === 9737 || t === 9742 || t === 9743 || t === 9756 || t === 9758 || t === 9792 || t === 9794 || t === 9824 || t === 9825 || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || t === 9836 || t === 9837 || t === 9839 || t === 9886 || t === 9887 || t === 9919 || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || t === 9955 || t === 9960 || t === 9961 || t >= 9963 && t <= 9969 || t === 9972 || t >= 9974 && t <= 9977 || t === 9979 || t === 9980 || t === 9982 || t === 9983 || t === 10045 || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || t === 65533 || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || t === 127375 || t === 127376 || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109, lt = (t) => t === 12288 || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510, ht = (t) => t >= 4352 && t <= 4447 || t === 8986 || t === 8987 || t === 9001 || t === 9002 || t >= 9193 && t <= 9196 || t === 9200 || t === 9203 || t === 9725 || t === 9726 || t === 9748 || t === 9749 || t >= 9800 && t <= 9811 || t === 9855 || t === 9875 || t === 9889 || t === 9898 || t === 9899 || t === 9917 || t === 9918 || t === 9924 || t === 9925 || t === 9934 || t === 9940 || t === 9962 || t === 9970 || t === 9971 || t === 9973 || t === 9978 || t === 9981 || t === 9989 || t === 9994 || t === 9995 || t === 10024 || t === 10060 || t === 10062 || t >= 10067 && t <= 10069 || t === 10071 || t >= 10133 && t <= 10135 || t === 10160 || t === 10175 || t === 11035 || t === 11036 || t === 11088 || t === 11093 || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || t === 94192 || t === 94193 || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || t === 110589 || t === 110590 || t >= 110592 && t <= 110882 || t === 110898 || t >= 110928 && t <= 110930 || t === 110933 || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || t === 126980 || t === 127183 || t === 127374 || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || t === 127568 || t === 127569 || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || t === 127988 || t >= 127992 && t <= 128062 || t === 128064 || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || t === 128378 || t === 128405 || t === 128406 || t === 128420 || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || t === 128716 || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || t === 128747 || t === 128748 || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || t === 129008 || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 262141, O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, L = /\t{1,1000}/y, P = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy, M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ct = /\p{M}+/gu, ft$1 = {
91
+ limit: Infinity,
92
+ ellipsis: ""
93
+ }, X$1 = (t, e = {}, s = {}) => {
94
+ const i = e.limit ?? Infinity, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X$1(r, ft$1, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V = s.wideWidth ?? 2;
95
+ let h = 0, o = 0, p = t.length, v = 0, F = !1, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
96
+ t: for (;;) {
97
+ if (w > C || o >= p && o > h) {
98
+ const ut = t.slice(C, w) || t.slice(h, o);
99
+ v = 0;
100
+ for (const Y of ut.replaceAll(ct, "")) {
101
+ const $ = Y.codePointAt(0) || 0;
102
+ if (lt($) ? f = m : ht($) ? f = V : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h) + v)), c + f > i) {
103
+ F = !0;
104
+ break t;
105
+ }
106
+ v += Y.length, c += f;
107
+ }
108
+ C = w = 0;
109
+ }
110
+ if (o >= p) break;
111
+ if (M.lastIndex = o, M.test(t)) {
112
+ if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
113
+ F = !0;
114
+ break;
115
+ }
116
+ c += f, C = h, w = o, o = h = M.lastIndex;
117
+ continue;
118
+ }
119
+ if (O.lastIndex = o, O.test(t)) {
120
+ if (c + u > b && (d = Math.min(d, o)), c + u > i) {
121
+ F = !0;
122
+ break;
123
+ }
124
+ c += u, C = h, w = o, o = h = O.lastIndex;
125
+ continue;
126
+ }
127
+ if (y.lastIndex = o, y.test(t)) {
128
+ if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
129
+ F = !0;
130
+ break;
131
+ }
132
+ c += f, C = h, w = o, o = h = y.lastIndex;
133
+ continue;
134
+ }
135
+ if (L.lastIndex = o, L.test(t)) {
136
+ if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
137
+ F = !0;
138
+ break;
139
+ }
140
+ c += f, C = h, w = o, o = h = L.lastIndex;
141
+ continue;
142
+ }
143
+ if (P.lastIndex = o, P.test(t)) {
144
+ if (c + g > b && (d = Math.min(d, o)), c + g > i) {
145
+ F = !0;
146
+ break;
147
+ }
148
+ c += g, C = h, w = o, o = h = P.lastIndex;
149
+ continue;
150
+ }
151
+ o += 1;
152
+ }
153
+ return {
154
+ width: F ? b : c,
155
+ index: F ? d : p,
156
+ truncated: F,
157
+ ellipsed: F && i >= n
158
+ };
159
+ }, pt$1 = {
160
+ limit: Infinity,
161
+ ellipsis: "",
162
+ ellipsisWidth: 0
163
+ }, S = (t, e = {}) => X$1(t, pt$1, e).width, T = "\x1B", Z = "›", Ft$1 = 39, j = "\x07", Q$1 = "[", dt = "]", tt = "m", U$1 = `${dt}8;;`, et = new RegExp(`(?:\\${Q$1}(?<code>\\d+)m|\\${U$1}(?<uri>.*)${j})`, "y"), mt$1 = (t) => {
164
+ if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
165
+ if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
166
+ if (t === 1 || t === 2) return 22;
167
+ if (t === 3) return 23;
168
+ if (t === 4) return 24;
169
+ if (t === 7) return 27;
170
+ if (t === 8) return 28;
171
+ if (t === 9) return 29;
172
+ if (t === 0) return 0;
173
+ }, st = (t) => `${T}${Q$1}${t}${tt}`, it = (t) => `${T}${U$1}${t}${j}`, gt$1 = (t) => t.map((e) => S(e)), G = (t, e, s) => {
174
+ const i = e[Symbol.iterator]();
175
+ let r = !1, n = !1, u = t.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
176
+ for (; !l.done;) {
177
+ const m = l.value, A = S(m);
178
+ a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === T || m === Z) && (r = !0, n = e.startsWith(U$1, g + 1)), r ? n ? m === j && (r = !1, n = !1) : m === tt && (r = !1) : (a += A, a === s && !E.done && (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
179
+ }
180
+ u = t.at(-1), !a && u !== void 0 && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
181
+ }, vt$1 = (t) => {
182
+ const e = t.split(" ");
183
+ let s = e.length;
184
+ for (; s > 0 && !(S(e[s - 1]) > 0);) s--;
185
+ return s === e.length ? t : e.slice(0, s).join(" ") + e.slice(s).join("");
186
+ }, Et$1 = (t, e, s = {}) => {
187
+ if (s.trim !== !1 && t.trim() === "") return "";
188
+ let i = "", r, n;
189
+ const u = t.split(" "), a = gt$1(u);
190
+ let l = [""];
191
+ for (const [h, o] of u.entries()) {
192
+ s.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
193
+ let p = S(l.at(-1) ?? "");
194
+ if (h !== 0 && (p >= e && (s.wordWrap === !1 || s.trim === !1) && (l.push(""), p = 0), (p > 0 || s.trim === !1) && (l[l.length - 1] += " ", p++)), s.hard && a[h] > e) {
195
+ const v = e - p, F = 1 + Math.floor((a[h] - v - 1) / e);
196
+ Math.floor((a[h] - 1) / e) < F && l.push(""), G(l, o, e);
197
+ continue;
198
+ }
199
+ if (p + a[h] > e && p > 0 && a[h] > 0) {
200
+ if (s.wordWrap === !1 && p < e) {
201
+ G(l, o, e);
202
+ continue;
203
+ }
204
+ l.push("");
205
+ }
206
+ if (p + a[h] > e && s.wordWrap === !1) {
207
+ G(l, o, e);
208
+ continue;
209
+ }
210
+ l[l.length - 1] += o;
211
+ }
212
+ s.trim !== !1 && (l = l.map((h) => vt$1(h)));
213
+ const E = l.join(`
214
+ `), g = E[Symbol.iterator]();
215
+ let m = g.next(), A = g.next(), V = 0;
216
+ for (; !m.done;) {
217
+ const h = m.value, o = A.value;
218
+ if (i += h, h === T || h === Z) {
219
+ et.lastIndex = V + 1;
220
+ const F = et.exec(E)?.groups;
221
+ if (F?.code !== void 0) {
222
+ const d = Number.parseFloat(F.code);
223
+ r = d === Ft$1 ? void 0 : d;
224
+ } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
225
+ }
226
+ const p = r ? mt$1(r) : void 0;
227
+ o === `
228
+ ` ? (n && (i += it("")), r && p && (i += st(p))) : h === `
229
+ ` && (r && p && (i += st(r)), n && (i += it(n))), V += h.length, m = A, A = g.next();
230
+ }
231
+ return i;
232
+ };
233
+ function K$1(t, e, s) {
234
+ return String(t).normalize().replaceAll(`\r
235
+ `, `
236
+ `).split(`
237
+ `).map((i) => Et$1(i, e, s)).join(`
238
+ `);
239
+ }
240
+ const _ = {
241
+ actions: new Set([
242
+ "up",
243
+ "down",
244
+ "left",
245
+ "right",
246
+ "space",
247
+ "enter",
248
+ "cancel"
249
+ ]),
250
+ aliases: new Map([
251
+ ["k", "up"],
252
+ ["j", "down"],
253
+ ["h", "left"],
254
+ ["l", "right"],
255
+ ["", "cancel"],
256
+ ["escape", "cancel"]
257
+ ]),
258
+ messages: {
259
+ cancel: "Canceled",
260
+ error: "Something went wrong"
261
+ },
262
+ withGuide: !0
263
+ };
264
+ function H$1(t, e) {
265
+ if (typeof t == "string") return _.aliases.get(t) === e;
266
+ for (const s of t) if (s !== void 0 && H$1(s, e)) return !0;
267
+ return !1;
268
+ }
269
+ function _t$1(t, e) {
270
+ if (t === e) return;
271
+ const s = t.split(`
272
+ `), i = e.split(`
273
+ `), r = Math.max(s.length, i.length), n = [];
274
+ for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
275
+ return {
276
+ lines: n,
277
+ numLinesBefore: s.length,
278
+ numLinesAfter: i.length,
279
+ numLines: r
280
+ };
281
+ }
282
+ const bt$1 = globalThis.process.platform.startsWith("win"), z$1 = Symbol("clack:cancel");
283
+ function Ct$1(t) {
284
+ return t === z$1;
285
+ }
286
+ function W$1(t, e) {
287
+ const s = t;
288
+ s.isTTY && s.setRawMode(e);
289
+ }
290
+ function xt$1({ input: t = stdin, output: e = stdout, overwrite: s = !0, hideCursor: i = !0 } = {}) {
291
+ const r = k.createInterface({
292
+ input: t,
293
+ output: e,
294
+ prompt: "",
295
+ tabSize: 1
296
+ });
297
+ k.emitKeypressEvents(t, r), t instanceof ReadStream && t.isTTY && t.setRawMode(!0);
298
+ const n = (u, { name: a, sequence: l }) => {
299
+ if (H$1([
300
+ String(u),
301
+ a,
302
+ l
303
+ ], "cancel")) {
304
+ i && e.write(import_src.cursor.show), process.exit(0);
305
+ return;
306
+ }
307
+ if (!s) return;
308
+ const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
309
+ k.moveCursor(e, g, m, () => {
310
+ k.clearLine(e, 1, () => {
311
+ t.once("keypress", n);
312
+ });
313
+ });
314
+ };
315
+ return i && e.write(import_src.cursor.hide), t.once("keypress", n), () => {
316
+ t.off("keypress", n), i && e.write(import_src.cursor.show), t instanceof ReadStream && t.isTTY && !bt$1 && t.setRawMode(!1), r.terminal = !1, r.close();
317
+ };
318
+ }
319
+ const rt = (t) => "columns" in t && typeof t.columns == "number" ? t.columns : 80, nt = (t) => "rows" in t && typeof t.rows == "number" ? t.rows : 20;
320
+ var B = class {
321
+ input;
322
+ output;
323
+ _abortSignal;
324
+ rl;
325
+ opts;
326
+ _render;
327
+ _track = !1;
328
+ _prevFrame = "";
329
+ _subscribers = /* @__PURE__ */ new Map();
330
+ _cursor = 0;
331
+ state = "initial";
332
+ error = "";
333
+ value;
334
+ userInput = "";
335
+ constructor(e, s = !0) {
336
+ const { input: i = stdin, output: r = stdout, render: n, signal: u, ...a } = e;
337
+ this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
338
+ }
339
+ unsubscribe() {
340
+ this._subscribers.clear();
341
+ }
342
+ setSubscriber(e, s) {
343
+ const i = this._subscribers.get(e) ?? [];
344
+ i.push(s), this._subscribers.set(e, i);
345
+ }
346
+ on(e, s) {
347
+ this.setSubscriber(e, { cb: s });
348
+ }
349
+ once(e, s) {
350
+ this.setSubscriber(e, {
351
+ cb: s,
352
+ once: !0
353
+ });
354
+ }
355
+ emit(e, ...s) {
356
+ const i = this._subscribers.get(e) ?? [], r = [];
357
+ for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
358
+ for (const n of r) n();
359
+ }
360
+ prompt() {
361
+ return new Promise((e) => {
362
+ if (this._abortSignal) {
363
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z$1);
364
+ this._abortSignal.addEventListener("abort", () => {
365
+ this.state = "cancel", this.close();
366
+ }, { once: !0 });
367
+ }
368
+ this.rl = ot.createInterface({
369
+ input: this.input,
370
+ tabSize: 2,
371
+ prompt: "",
372
+ escapeCodeTimeout: 50,
373
+ terminal: !0
374
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), W$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
375
+ this.output.write(import_src.cursor.show), this.output.off("resize", this.render), W$1(this.input, !1), e(this.value);
376
+ }), this.once("cancel", () => {
377
+ this.output.write(import_src.cursor.show), this.output.off("resize", this.render), W$1(this.input, !1), e(z$1);
378
+ });
379
+ });
380
+ }
381
+ _isActionKey(e, s) {
382
+ return e === " ";
383
+ }
384
+ _setValue(e) {
385
+ this.value = e, this.emit("value", this.value);
386
+ }
387
+ _setUserInput(e, s) {
388
+ this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
389
+ }
390
+ _clearUserInput() {
391
+ this.rl?.write(null, {
392
+ ctrl: !0,
393
+ name: "u"
394
+ }), this._setUserInput("");
395
+ }
396
+ onKeypress(e, s) {
397
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, {
398
+ ctrl: !0,
399
+ name: "h"
400
+ }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
401
+ if (this.opts.validate) {
402
+ const i = this.opts.validate(this.value);
403
+ i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
404
+ }
405
+ this.state !== "error" && (this.state = "submit");
406
+ }
407
+ H$1([
408
+ e,
409
+ s?.name,
410
+ s?.sequence
411
+ ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
412
+ }
413
+ close() {
414
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
415
+ `), W$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
416
+ }
417
+ restoreCursor() {
418
+ const e = K$1(this._prevFrame, process.stdout.columns, {
419
+ hard: !0,
420
+ trim: !1
421
+ }).split(`
422
+ `).length - 1;
423
+ this.output.write(import_src.cursor.move(-999, e * -1));
424
+ }
425
+ render() {
426
+ const e = K$1(this._render(this) ?? "", process.stdout.columns, {
427
+ hard: !0,
428
+ trim: !1
429
+ });
430
+ if (e !== this._prevFrame) {
431
+ if (this.state === "initial") this.output.write(import_src.cursor.hide);
432
+ else {
433
+ const s = _t$1(this._prevFrame, e), i = nt(this.output);
434
+ if (this.restoreCursor(), s) {
435
+ const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
436
+ let u = s.lines.find((a) => a >= r);
437
+ if (u === void 0) {
438
+ this._prevFrame = e;
439
+ return;
440
+ }
441
+ if (s.lines.length === 1) {
442
+ this.output.write(import_src.cursor.move(0, u - n)), this.output.write(import_src.erase.lines(1));
443
+ const a = e.split(`
444
+ `);
445
+ this.output.write(a[u]), this._prevFrame = e, this.output.write(import_src.cursor.move(0, a.length - u - 1));
446
+ return;
447
+ } else if (s.lines.length > 1) {
448
+ if (r < n) u = r;
449
+ else {
450
+ const l = u - n;
451
+ l > 0 && this.output.write(import_src.cursor.move(0, l));
452
+ }
453
+ this.output.write(import_src.erase.down());
454
+ const a = e.split(`
455
+ `).slice(u);
456
+ this.output.write(a.join(`
457
+ `)), this._prevFrame = e;
458
+ return;
459
+ }
460
+ }
461
+ this.output.write(import_src.erase.down());
462
+ }
463
+ this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
464
+ }
465
+ }
466
+ };
467
+ var kt$1 = class extends B {
468
+ get cursor() {
469
+ return this.value ? 0 : 1;
470
+ }
471
+ get _value() {
472
+ return this.cursor === 0;
473
+ }
474
+ constructor(e) {
475
+ super(e, !1), this.value = !!e.initialValue, this.on("userInput", () => {
476
+ this.value = this._value;
477
+ }), this.on("confirm", (s) => {
478
+ this.output.write(import_src.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
479
+ }), this.on("cursor", () => {
480
+ this.value = !this.value;
481
+ });
482
+ }
483
+ };
484
+ //#endregion
485
+ //#region node_modules/@clack/prompts/dist/index.mjs
486
+ function pt() {
487
+ return N.platform !== "win32" ? N.env.TERM !== "linux" : !!N.env.CI || !!N.env.WT_SESSION || !!N.env.TERMINUS_SUBLIME || N.env.ConEmuTask === "{cmd::Cmder}" || N.env.TERM_PROGRAM === "Terminus-Sublime" || N.env.TERM_PROGRAM === "vscode" || N.env.TERM === "xterm-256color" || N.env.TERM === "alacritty" || N.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
488
+ }
489
+ const ee = pt(), ce = () => process.env.CI === "true", Me = (e) => e.isTTY === !0, I = (e, r) => ee ? e : r, Re = I("◆", "*"), $e = I("■", "x"), de = I("▲", "x"), V = I("◇", "o"), he = I("┌", "T"), h = I("│", "|"), x = I("└", "—");
490
+ I("┐", "T");
491
+ I("┘", "—");
492
+ const z = I("●", ">"), H = I("○", " ");
493
+ I("◻", "[•]");
494
+ I("◼", "[+]");
495
+ I("◻", "[ ]");
496
+ I("▪", "•");
497
+ const se = I("─", "-"), pe = I("╮", "+"), We = I("├", "+"), me = I("╯", "+"), ge = I("╰", "+");
498
+ I("╭", "+");
499
+ const fe = I("●", "•"), Fe = I("◆", "*"), ye = I("▲", "!"), Ee = I("■", "x"), W = (e) => {
500
+ switch (e) {
501
+ case "initial":
502
+ case "active": return styleText("cyan", Re);
503
+ case "cancel": return styleText("red", $e);
504
+ case "error": return styleText("yellow", de);
505
+ case "submit": return styleText("green", V);
506
+ }
507
+ }, mt = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, gt = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, ft = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ie = /\t{1,1000}/y, Ae = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy, ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Ft = /\p{M}+/gu, yt = {
508
+ limit: Infinity,
509
+ ellipsis: ""
510
+ }, Le = (e, r = {}, s = {}) => {
511
+ const i = r.limit ?? Infinity, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
512
+ let $ = 0, m = 0, d = e.length, F = 0, y = !1, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S = 0;
513
+ e: for (;;) {
514
+ if (b > A || m >= d && m > $) {
515
+ const T = e.slice(A, b) || e.slice($, m);
516
+ F = 0;
517
+ for (const M of T.replaceAll(Ft, "")) {
518
+ const O = M.codePointAt(0) || 0;
519
+ if (gt(O) ? S = f : ft(O) ? S = E : c !== g && mt(O) ? S = c : S = g, w + S > C && (v = Math.min(v, Math.max(A, $) + F)), w + S > i) {
520
+ y = !0;
521
+ break e;
522
+ }
523
+ F += M.length, w += S;
524
+ }
525
+ A = b = 0;
526
+ }
527
+ if (m >= d) break;
528
+ if (ne.lastIndex = m, ne.test(e)) {
529
+ if (F = ne.lastIndex - m, S = F * g, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S > i) {
530
+ y = !0;
531
+ break;
532
+ }
533
+ w += S, A = $, b = m, m = $ = ne.lastIndex;
534
+ continue;
535
+ }
536
+ if (we.lastIndex = m, we.test(e)) {
537
+ if (w + u > C && (v = Math.min(v, m)), w + u > i) {
538
+ y = !0;
539
+ break;
540
+ }
541
+ w += u, A = $, b = m, m = $ = we.lastIndex;
542
+ continue;
543
+ }
544
+ if (re.lastIndex = m, re.test(e)) {
545
+ if (F = re.lastIndex - m, S = F * l, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S > i) {
546
+ y = !0;
547
+ break;
548
+ }
549
+ w += S, A = $, b = m, m = $ = re.lastIndex;
550
+ continue;
551
+ }
552
+ if (ie.lastIndex = m, ie.test(e)) {
553
+ if (F = ie.lastIndex - m, S = F * n, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S > i) {
554
+ y = !0;
555
+ break;
556
+ }
557
+ w += S, A = $, b = m, m = $ = ie.lastIndex;
558
+ continue;
559
+ }
560
+ if (Ae.lastIndex = m, Ae.test(e)) {
561
+ if (w + p > C && (v = Math.min(v, m)), w + p > i) {
562
+ y = !0;
563
+ break;
564
+ }
565
+ w += p, A = $, b = m, m = $ = Ae.lastIndex;
566
+ continue;
567
+ }
568
+ m += 1;
569
+ }
570
+ return {
571
+ width: y ? C : w,
572
+ index: y ? v : d,
573
+ truncated: y,
574
+ ellipsed: y && i >= o
575
+ };
576
+ }, Et = {
577
+ limit: Infinity,
578
+ ellipsis: "",
579
+ ellipsisWidth: 0
580
+ }, D = (e, r = {}) => Le(e, Et, r).width, ae = "\x1B", je = "›", vt = 39, Ce = "\x07", ke = "[", wt = "]", Ve = "m", Se = `${wt}8;;`, He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y"), At = (e) => {
581
+ if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
582
+ if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
583
+ if (e === 1 || e === 2) return 22;
584
+ if (e === 3) return 23;
585
+ if (e === 4) return 24;
586
+ if (e === 7) return 27;
587
+ if (e === 8) return 28;
588
+ if (e === 9) return 29;
589
+ if (e === 0) return 0;
590
+ }, Ue = (e) => `${ae}${ke}${e}${Ve}`, Ke = (e) => `${ae}${Se}${e}${Ce}`, Ct = (e) => e.map((r) => D(r)), Ie = (e, r, s) => {
591
+ const i = r[Symbol.iterator]();
592
+ let a = !1, o = !1, u = e.at(-1), l = u === void 0 ? 0 : D(u), n = i.next(), c = i.next(), p = 0;
593
+ for (; !n.done;) {
594
+ const f = n.value, g = D(f);
595
+ l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = !0, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = !1, o = !1) : f === Ve && (a = !1) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
596
+ }
597
+ u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
598
+ }, St = (e) => {
599
+ const r = e.split(" ");
600
+ let s = r.length;
601
+ for (; s > 0 && !(D(r[s - 1]) > 0);) s--;
602
+ return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
603
+ }, It = (e, r, s = {}) => {
604
+ if (s.trim !== !1 && e.trim() === "") return "";
605
+ let i = "", a, o;
606
+ const u = e.split(" "), l = Ct(u);
607
+ let n = [""];
608
+ for (const [$, m] of u.entries()) {
609
+ s.trim !== !1 && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
610
+ let d = D(n.at(-1) ?? "");
611
+ if ($ !== 0 && (d >= r && (s.wordWrap === !1 || s.trim === !1) && (n.push(""), d = 0), (d > 0 || s.trim === !1) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
612
+ const F = r - d, y = 1 + Math.floor((l[$] - F - 1) / r);
613
+ Math.floor((l[$] - 1) / r) < y && n.push(""), Ie(n, m, r);
614
+ continue;
615
+ }
616
+ if (d + l[$] > r && d > 0 && l[$] > 0) {
617
+ if (s.wordWrap === !1 && d < r) {
618
+ Ie(n, m, r);
619
+ continue;
620
+ }
621
+ n.push("");
622
+ }
623
+ if (d + l[$] > r && s.wordWrap === !1) {
624
+ Ie(n, m, r);
625
+ continue;
626
+ }
627
+ n[n.length - 1] += m;
628
+ }
629
+ s.trim !== !1 && (n = n.map(($) => St($)));
630
+ const c = n.join(`
631
+ `), p = c[Symbol.iterator]();
632
+ let f = p.next(), g = p.next(), E = 0;
633
+ for (; !f.done;) {
634
+ const $ = f.value, m = g.value;
635
+ if (i += $, $ === ae || $ === je) {
636
+ He.lastIndex = E + 1;
637
+ const y = He.exec(c)?.groups;
638
+ if (y?.code !== void 0) {
639
+ const v = Number.parseFloat(y.code);
640
+ a = v === vt ? void 0 : v;
641
+ } else y?.uri !== void 0 && (o = y.uri.length === 0 ? void 0 : y.uri);
642
+ }
643
+ const d = a ? At(a) : void 0;
644
+ m === `
645
+ ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
646
+ ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
647
+ }
648
+ return i;
649
+ };
650
+ function J(e, r, s) {
651
+ return String(e).normalize().replaceAll(`\r
652
+ `, `
653
+ `).split(`
654
+ `).map((i) => It(i, r, s)).join(`
655
+ `);
656
+ }
657
+ const Rt = (e) => {
658
+ const r = e.active ?? "Yes", s = e.inactive ?? "No";
659
+ return new kt$1({
660
+ active: r,
661
+ inactive: s,
662
+ signal: e.signal,
663
+ input: e.input,
664
+ output: e.output,
665
+ initialValue: e.initialValue ?? !0,
666
+ render() {
667
+ const i = e.withGuide ?? _.withGuide, a = `${i ? `${styleText("gray", h)}
668
+ ` : ""}${W(this.state)} ${e.message}
669
+ `, o = this.value ? r : s;
670
+ switch (this.state) {
671
+ case "submit": return `${a}${i ? `${styleText("gray", h)} ` : ""}${styleText("dim", o)}`;
672
+ case "cancel": return `${a}${i ? `${styleText("gray", h)} ` : ""}${styleText(["strikethrough", "dim"], o)}${i ? `
673
+ ${styleText("gray", h)}` : ""}`;
674
+ default: {
675
+ const u = i ? `${styleText("cyan", h)} ` : "", l = i ? styleText("cyan", x) : "";
676
+ return `${a}${u}${this.value ? `${styleText("green", z)} ${r}` : `${styleText("dim", H)} ${styleText("dim", r)}`}${e.vertical ? i ? `
677
+ ${styleText("cyan", h)} ` : `
678
+ ` : ` ${styleText("dim", "/")} `}${this.value ? `${styleText("dim", H)} ${styleText("dim", s)}` : `${styleText("green", z)} ${s}`}
679
+ ${l}
680
+ `;
681
+ }
682
+ }
683
+ }
684
+ }).prompt();
685
+ }, R = {
686
+ message: (e = [], { symbol: r = styleText("gray", h), secondarySymbol: s = styleText("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
687
+ const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
688
+ for (let g = 0; g < a; g++) u.push(n);
689
+ const f = Array.isArray(e) ? e : e.split(`
690
+ `);
691
+ if (f.length > 0) {
692
+ const [g, ...E] = f;
693
+ g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
694
+ for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
695
+ }
696
+ i.write(`${u.join(`
697
+ `)}
698
+ `);
699
+ },
700
+ info: (e, r) => {
701
+ R.message(e, {
702
+ ...r,
703
+ symbol: styleText("blue", fe)
704
+ });
705
+ },
706
+ success: (e, r) => {
707
+ R.message(e, {
708
+ ...r,
709
+ symbol: styleText("green", Fe)
710
+ });
711
+ },
712
+ step: (e, r) => {
713
+ R.message(e, {
714
+ ...r,
715
+ symbol: styleText("green", V)
716
+ });
717
+ },
718
+ warn: (e, r) => {
719
+ R.message(e, {
720
+ ...r,
721
+ symbol: styleText("yellow", ye)
722
+ });
723
+ },
724
+ warning: (e, r) => {
725
+ R.warn(e, r);
726
+ },
727
+ error: (e, r) => {
728
+ R.message(e, {
729
+ ...r,
730
+ symbol: styleText("red", Ee)
731
+ });
732
+ }
733
+ }, Nt = (e = "", r) => {
734
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${styleText("gray", x)} ` : "";
735
+ s.write(`${i}${styleText("red", e)}
736
+
737
+ `);
738
+ }, Wt = (e = "", r) => {
739
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${styleText("gray", he)} ` : "";
740
+ s.write(`${i}${e}
741
+ `);
742
+ }, Gt = (e = "", r) => {
743
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${styleText("gray", h)}
744
+ ${styleText("gray", x)} ` : "";
745
+ s.write(`${i}${e}
746
+
747
+ `);
748
+ }, jt = (e) => styleText("dim", e), kt = (e, r, s) => {
749
+ const i = {
750
+ hard: !0,
751
+ trim: !1
752
+ }, a = J(e, r, i).split(`
753
+ `), o = a.reduce((n, c) => Math.max(D(c), n), 0);
754
+ return J(e, r - (a.map(s).reduce((n, c) => Math.max(D(c), n), 0) - o), i);
755
+ }, Vt = (e = "", r = "", s) => {
756
+ const i = s?.output ?? N.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? jt, u = [
757
+ "",
758
+ ...kt(e, rt(i) - 6, o).split(`
759
+ `).map(o),
760
+ ""
761
+ ], l = D(r), n = Math.max(u.reduce((g, E) => {
762
+ const $ = D(E);
763
+ return $ > g ? $ : g;
764
+ }, 0), l) + 2, c = u.map((g) => `${styleText("gray", h)} ${g}${" ".repeat(n - D(g))}${styleText("gray", h)}`).join(`
765
+ `), p = a ? `${styleText("gray", h)}
766
+ ` : "", f = a ? We : ge;
767
+ i.write(`${p}${styleText("green", V)} ${styleText("reset", r)} ${styleText("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
768
+ ${c}
769
+ ${styleText("gray", f + se.repeat(n + 2) + me)}
770
+ `);
771
+ }, Kt = (e) => styleText("magenta", e), be = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: a, frames: o = ee ? [
772
+ "◒",
773
+ "◐",
774
+ "◓",
775
+ "◑"
776
+ ] : [
777
+ "•",
778
+ "o",
779
+ "O",
780
+ "0"
781
+ ], delay: u = ee ? 80 : 120, signal: l, ...n } = {}) => {
782
+ const c = ce();
783
+ let p, f, g = !1, E = !1, $ = "", m, d = performance.now();
784
+ const F = rt(s), y = n?.styleFrame ?? Kt, v = (B) => {
785
+ const P = B > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
786
+ E = B === 1, g && (k(P, B), E && typeof r == "function" && r());
787
+ }, C = () => v(2), A = () => v(1), b = () => {
788
+ process.on("uncaughtExceptionMonitor", C), process.on("unhandledRejection", C), process.on("SIGINT", A), process.on("SIGTERM", A), process.on("exit", v), l && l.addEventListener("abort", A);
789
+ }, w = () => {
790
+ process.removeListener("uncaughtExceptionMonitor", C), process.removeListener("unhandledRejection", C), process.removeListener("SIGINT", A), process.removeListener("SIGTERM", A), process.removeListener("exit", v), l && l.removeEventListener("abort", A);
791
+ }, S = () => {
792
+ if (m === void 0) return;
793
+ c && s.write(`
794
+ `);
795
+ const B = J(m, F, {
796
+ hard: !0,
797
+ trim: !1
798
+ }).split(`
799
+ `);
800
+ B.length > 1 && s.write(import_src.cursor.up(B.length - 1)), s.write(import_src.cursor.to(0)), s.write(import_src.erase.down());
801
+ }, T = (B) => B.replace(/\.+$/, ""), M = (B) => {
802
+ const P = (performance.now() - B) / 1e3, G = Math.floor(P / 60), L = Math.floor(P % 60);
803
+ return G > 0 ? `[${G}m ${L}s]` : `[${L}s]`;
804
+ }, O = n.withGuide ?? _.withGuide, le = (B = "") => {
805
+ g = !0, p = xt$1({ output: s }), $ = T(B), d = performance.now(), O && s.write(`${styleText("gray", h)}
806
+ `);
807
+ let P = 0, G = 0;
808
+ b(), f = setInterval(() => {
809
+ if (c && $ === m) return;
810
+ S(), m = $;
811
+ const L = y(o[P]);
812
+ let Z;
813
+ if (c) Z = `${L} ${$}...`;
814
+ else if (e === "timer") Z = `${L} ${$} ${M(d)}`;
815
+ else {
816
+ const et = ".".repeat(Math.floor(G)).slice(0, 3);
817
+ Z = `${L} ${$}${et}`;
818
+ }
819
+ const Ze = J(Z, F, {
820
+ hard: !0,
821
+ trim: !1
822
+ });
823
+ s.write(Ze), P = P + 1 < o.length ? P + 1 : 0, G = G < 4 ? G + .125 : 0;
824
+ }, u);
825
+ }, k = (B = "", P = 0, G = !1) => {
826
+ if (!g) return;
827
+ g = !1, clearInterval(f), S();
828
+ const L = P === 0 ? styleText("green", V) : P === 1 ? styleText("red", $e) : styleText("red", de);
829
+ $ = B ?? $, G || (e === "timer" ? s.write(`${L} ${$} ${M(d)}
830
+ `) : s.write(`${L} ${$}
831
+ `)), w(), p();
832
+ };
833
+ return {
834
+ start: le,
835
+ stop: (B = "") => k(B, 0),
836
+ message: (B = "") => {
837
+ $ = T(B ?? $);
838
+ },
839
+ cancel: (B = "") => k(B, 1),
840
+ error: (B = "") => k(B, 2),
841
+ clear: () => k("", 0, !0),
842
+ get isCancelled() {
843
+ return E;
844
+ }
845
+ };
846
+ };
847
+ I("─", "-"), I("━", "="), I("█", "#");
848
+ const Qe = `${styleText("gray", h)} `, K = {
849
+ message: async (e, { symbol: r = styleText("gray", h) } = {}) => {
850
+ process.stdout.write(`${styleText("gray", h)}
851
+ ${r} `);
852
+ let s = 3;
853
+ for await (let i of e) {
854
+ i = i.replace(/\n/g, `
855
+ ${Qe}`), i.includes(`
856
+ `) && (s = 3 + stripVTControlCharacters(i.slice(i.lastIndexOf(`
857
+ `))).length);
858
+ const a = stripVTControlCharacters(i).length;
859
+ s + a < process.stdout.columns ? (s += a, process.stdout.write(i)) : (process.stdout.write(`
860
+ ${Qe}${i.trimStart()}`), s = 3 + stripVTControlCharacters(i.trimStart()).length);
861
+ }
862
+ process.stdout.write(`
863
+ `);
864
+ },
865
+ info: (e) => K.message(e, { symbol: styleText("blue", fe) }),
866
+ success: (e) => K.message(e, { symbol: styleText("green", Fe) }),
867
+ step: (e) => K.message(e, { symbol: styleText("green", V) }),
868
+ warn: (e) => K.message(e, { symbol: styleText("yellow", ye) }),
869
+ warning: (e) => K.warn(e),
870
+ error: (e) => K.message(e, { symbol: styleText("red", Ee) })
871
+ };
872
+ //#endregion
873
+ //#region node_modules/picocolors/picocolors.js
874
+ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
875
+ let p = process || {}, argv = p.argv || [], env = p.env || {};
876
+ let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
877
+ let formatter = (open, close, replace = open) => (input) => {
878
+ let string = "" + input, index = string.indexOf(close, open.length);
879
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
880
+ };
881
+ let replaceClose = (string, close, replace, index) => {
882
+ let result = "", cursor = 0;
883
+ do {
884
+ result += string.substring(cursor, index) + replace;
885
+ cursor = index + close.length;
886
+ index = string.indexOf(close, cursor);
887
+ } while (~index);
888
+ return result + string.substring(cursor);
889
+ };
890
+ let createColors = (enabled = isColorSupported) => {
891
+ let f = enabled ? formatter : () => String;
892
+ return {
893
+ isColorSupported: enabled,
894
+ reset: f("\x1B[0m", "\x1B[0m"),
895
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
896
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
897
+ italic: f("\x1B[3m", "\x1B[23m"),
898
+ underline: f("\x1B[4m", "\x1B[24m"),
899
+ inverse: f("\x1B[7m", "\x1B[27m"),
900
+ hidden: f("\x1B[8m", "\x1B[28m"),
901
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
902
+ black: f("\x1B[30m", "\x1B[39m"),
903
+ red: f("\x1B[31m", "\x1B[39m"),
904
+ green: f("\x1B[32m", "\x1B[39m"),
905
+ yellow: f("\x1B[33m", "\x1B[39m"),
906
+ blue: f("\x1B[34m", "\x1B[39m"),
907
+ magenta: f("\x1B[35m", "\x1B[39m"),
908
+ cyan: f("\x1B[36m", "\x1B[39m"),
909
+ white: f("\x1B[37m", "\x1B[39m"),
910
+ gray: f("\x1B[90m", "\x1B[39m"),
911
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
912
+ bgRed: f("\x1B[41m", "\x1B[49m"),
913
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
914
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
915
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
916
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
917
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
918
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
919
+ blackBright: f("\x1B[90m", "\x1B[39m"),
920
+ redBright: f("\x1B[91m", "\x1B[39m"),
921
+ greenBright: f("\x1B[92m", "\x1B[39m"),
922
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
923
+ blueBright: f("\x1B[94m", "\x1B[39m"),
924
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
925
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
926
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
927
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
928
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
929
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
930
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
931
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
932
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
933
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
934
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
935
+ };
936
+ };
937
+ module.exports = createColors();
938
+ module.exports.createColors = createColors;
939
+ }));
940
+ //#endregion
941
+ export { R as a, Wt as c, __toESM as d, Nt as i, be as l, Gt as n, Rt as o, Me as r, Vt as s, require_picocolors as t, Ct$1 as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwatch",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Daily macOS notifications when installed GitHub-backed skills have updates.",
5
5
  "keywords": [
6
6
  "agent-skills",