@socketsecurity/lib 5.4.0 → 5.4.1

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.
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  /**
3
- * Bundled from inquirer-pack
3
+ * Bundled from external-pack
4
4
  * This is a zero-dependency bundle created by esbuild.
5
5
  */
6
6
  "use strict";
7
+ var __create = Object.create;
7
8
  var __defProp = Object.defineProperty;
8
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
10
  var __getOwnPropNames = Object.getOwnPropertyNames;
11
+ var __getProtoOf = Object.getPrototypeOf;
10
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
13
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
14
  var __esm = (fn, res) => function __init() {
@@ -27,8 +29,537 @@ var __copyProps = (to, from, except, desc) => {
27
29
  }
28
30
  return to;
29
31
  };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
+ // If the importer is in node compatibility mode or this is not an ESM
34
+ // file that has been converted to a CommonJS file using a Babel-
35
+ // compatible transform (i.e. "__esModule" has not been set), then set
36
+ // "default" to the CommonJS "module.exports" for node compatibility.
37
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
+ mod
39
+ ));
30
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
41
 
42
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js
43
+ var require_signals = __commonJS({
44
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js"(exports2) {
45
+ "use strict";
46
+ Object.defineProperty(exports2, "__esModule", { value: true });
47
+ exports2.signals = void 0;
48
+ exports2.signals = [];
49
+ exports2.signals.push("SIGHUP", "SIGINT", "SIGTERM");
50
+ if (process.platform !== "win32") {
51
+ exports2.signals.push(
52
+ "SIGALRM",
53
+ "SIGABRT",
54
+ "SIGVTALRM",
55
+ "SIGXCPU",
56
+ "SIGXFSZ",
57
+ "SIGUSR2",
58
+ "SIGTRAP",
59
+ "SIGSYS",
60
+ "SIGQUIT",
61
+ "SIGIOT"
62
+ // should detect profiler and enable/disable accordingly.
63
+ // see #21
64
+ // 'SIGPROF'
65
+ );
66
+ }
67
+ if (process.platform === "linux") {
68
+ exports2.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
69
+ }
70
+ }
71
+ });
72
+
73
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js
74
+ var require_cjs = __commonJS({
75
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
76
+ "use strict";
77
+ var _a;
78
+ Object.defineProperty(exports2, "__esModule", { value: true });
79
+ exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
80
+ var signals_js_1 = require_signals();
81
+ Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
82
+ return signals_js_1.signals;
83
+ }, "get") });
84
+ var processOk = /* @__PURE__ */ __name((process5) => !!process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function", "processOk");
85
+ var kExitEmitter = Symbol.for("signal-exit emitter");
86
+ var global = globalThis;
87
+ var ObjectDefineProperty = Object.defineProperty.bind(Object);
88
+ var Emitter = class {
89
+ static {
90
+ __name(this, "Emitter");
91
+ }
92
+ emitted = {
93
+ afterExit: false,
94
+ exit: false
95
+ };
96
+ listeners = {
97
+ afterExit: [],
98
+ exit: []
99
+ };
100
+ count = 0;
101
+ id = Math.random();
102
+ constructor() {
103
+ if (global[kExitEmitter]) {
104
+ return global[kExitEmitter];
105
+ }
106
+ ObjectDefineProperty(global, kExitEmitter, {
107
+ value: this,
108
+ writable: false,
109
+ enumerable: false,
110
+ configurable: false
111
+ });
112
+ }
113
+ on(ev, fn) {
114
+ this.listeners[ev].push(fn);
115
+ }
116
+ removeListener(ev, fn) {
117
+ const list = this.listeners[ev];
118
+ const i = list.indexOf(fn);
119
+ if (i === -1) {
120
+ return;
121
+ }
122
+ if (i === 0 && list.length === 1) {
123
+ list.length = 0;
124
+ } else {
125
+ list.splice(i, 1);
126
+ }
127
+ }
128
+ emit(ev, code, signal) {
129
+ if (this.emitted[ev]) {
130
+ return false;
131
+ }
132
+ this.emitted[ev] = true;
133
+ let ret = false;
134
+ for (const fn of this.listeners[ev]) {
135
+ ret = fn(code, signal) === true || ret;
136
+ }
137
+ if (ev === "exit") {
138
+ ret = this.emit("afterExit", code, signal) || ret;
139
+ }
140
+ return ret;
141
+ }
142
+ };
143
+ var SignalExitBase = class {
144
+ static {
145
+ __name(this, "SignalExitBase");
146
+ }
147
+ };
148
+ var signalExitWrap = /* @__PURE__ */ __name((handler) => {
149
+ return {
150
+ onExit(cb, opts) {
151
+ return handler.onExit(cb, opts);
152
+ },
153
+ load() {
154
+ return handler.load();
155
+ },
156
+ unload() {
157
+ return handler.unload();
158
+ }
159
+ };
160
+ }, "signalExitWrap");
161
+ var SignalExitFallback = class extends SignalExitBase {
162
+ static {
163
+ __name(this, "SignalExitFallback");
164
+ }
165
+ onExit() {
166
+ return () => {
167
+ };
168
+ }
169
+ load() {
170
+ }
171
+ unload() {
172
+ }
173
+ };
174
+ var SignalExit = class extends SignalExitBase {
175
+ static {
176
+ __name(this, "SignalExit");
177
+ }
178
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
179
+ // so use a supported signal instead
180
+ /* c8 ignore start */
181
+ #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
182
+ /* c8 ignore stop */
183
+ #emitter = new Emitter();
184
+ #process;
185
+ #originalProcessEmit;
186
+ #originalProcessReallyExit;
187
+ #sigListeners = {};
188
+ #loaded = false;
189
+ constructor(process5) {
190
+ super();
191
+ this.#process = process5;
192
+ this.#sigListeners = {};
193
+ for (const sig of signals_js_1.signals) {
194
+ this.#sigListeners[sig] = () => {
195
+ const listeners = this.#process.listeners(sig);
196
+ let { count } = this.#emitter;
197
+ const p = process5;
198
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
199
+ count += p.__signal_exit_emitter__.count;
200
+ }
201
+ if (listeners.length === count) {
202
+ this.unload();
203
+ const ret = this.#emitter.emit("exit", null, sig);
204
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
205
+ if (!ret)
206
+ process5.kill(process5.pid, s);
207
+ }
208
+ };
209
+ }
210
+ this.#originalProcessReallyExit = process5.reallyExit;
211
+ this.#originalProcessEmit = process5.emit;
212
+ }
213
+ onExit(cb, opts) {
214
+ if (!processOk(this.#process)) {
215
+ return () => {
216
+ };
217
+ }
218
+ if (this.#loaded === false) {
219
+ this.load();
220
+ }
221
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
222
+ this.#emitter.on(ev, cb);
223
+ return () => {
224
+ this.#emitter.removeListener(ev, cb);
225
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
226
+ this.unload();
227
+ }
228
+ };
229
+ }
230
+ load() {
231
+ if (this.#loaded) {
232
+ return;
233
+ }
234
+ this.#loaded = true;
235
+ this.#emitter.count += 1;
236
+ for (const sig of signals_js_1.signals) {
237
+ try {
238
+ const fn = this.#sigListeners[sig];
239
+ if (fn)
240
+ this.#process.on(sig, fn);
241
+ } catch (_) {
242
+ }
243
+ }
244
+ this.#process.emit = (ev, ...a) => {
245
+ return this.#processEmit(ev, ...a);
246
+ };
247
+ this.#process.reallyExit = (code) => {
248
+ return this.#processReallyExit(code);
249
+ };
250
+ }
251
+ unload() {
252
+ if (!this.#loaded) {
253
+ return;
254
+ }
255
+ this.#loaded = false;
256
+ signals_js_1.signals.forEach((sig) => {
257
+ const listener = this.#sigListeners[sig];
258
+ if (!listener) {
259
+ throw new Error("Listener not defined for signal: " + sig);
260
+ }
261
+ try {
262
+ this.#process.removeListener(sig, listener);
263
+ } catch (_) {
264
+ }
265
+ });
266
+ this.#process.emit = this.#originalProcessEmit;
267
+ this.#process.reallyExit = this.#originalProcessReallyExit;
268
+ this.#emitter.count -= 1;
269
+ }
270
+ #processReallyExit(code) {
271
+ if (!processOk(this.#process)) {
272
+ return 0;
273
+ }
274
+ this.#process.exitCode = code || 0;
275
+ this.#emitter.emit("exit", this.#process.exitCode, null);
276
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
277
+ }
278
+ #processEmit(ev, ...args) {
279
+ const og = this.#originalProcessEmit;
280
+ if (ev === "exit" && processOk(this.#process)) {
281
+ if (typeof args[0] === "number") {
282
+ this.#process.exitCode = args[0];
283
+ }
284
+ const ret = og.call(this.#process, ev, ...args);
285
+ this.#emitter.emit("exit", this.#process.exitCode, null);
286
+ return ret;
287
+ } else {
288
+ return og.call(this.#process, ev, ...args);
289
+ }
290
+ }
291
+ };
292
+ var process4 = globalThis.process;
293
+ _a = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback()), /**
294
+ * Called when the process is exiting, whether via signal, explicit
295
+ * exit, or running out of stuff to do.
296
+ *
297
+ * If the global process object is not suitable for instrumentation,
298
+ * then this will be a no-op.
299
+ *
300
+ * Returns a function that may be used to unload signal-exit.
301
+ */
302
+ exports2.onExit = _a.onExit, /**
303
+ * Load the listeners. Likely you never need to call this, unless
304
+ * doing a rather deep integration with signal-exit functionality.
305
+ * Mostly exposed for the benefit of testing.
306
+ *
307
+ * @internal
308
+ */
309
+ exports2.load = _a.load, /**
310
+ * Unload the listeners. Likely you never need to call this, unless
311
+ * doing a rather deep integration with signal-exit functionality.
312
+ * Mostly exposed for the benefit of testing.
313
+ *
314
+ * @internal
315
+ */
316
+ exports2.unload = _a.unload;
317
+ }
318
+ });
319
+
320
+ // node_modules/.pnpm/supports-color@10.0.0/node_modules/supports-color/index.js
321
+ var supports_color_exports = {};
322
+ __export(supports_color_exports, {
323
+ createSupportsColor: () => createSupportsColor,
324
+ default: () => supports_color_default
325
+ });
326
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
327
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
328
+ const position = argv.indexOf(prefix + flag);
329
+ const terminatorPosition = argv.indexOf("--");
330
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
331
+ }
332
+ function envForceColor() {
333
+ if (!("FORCE_COLOR" in env)) {
334
+ return;
335
+ }
336
+ if (env.FORCE_COLOR === "true") {
337
+ return 1;
338
+ }
339
+ if (env.FORCE_COLOR === "false") {
340
+ return 0;
341
+ }
342
+ if (env.FORCE_COLOR.length === 0) {
343
+ return 1;
344
+ }
345
+ const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
346
+ if (![0, 1, 2, 3].includes(level)) {
347
+ return;
348
+ }
349
+ return level;
350
+ }
351
+ function translateLevel(level) {
352
+ if (level === 0) {
353
+ return false;
354
+ }
355
+ return {
356
+ level,
357
+ hasBasic: true,
358
+ has256: level >= 2,
359
+ has16m: level >= 3
360
+ };
361
+ }
362
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
363
+ const noFlagForceColor = envForceColor();
364
+ if (noFlagForceColor !== void 0) {
365
+ flagForceColor = noFlagForceColor;
366
+ }
367
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
368
+ if (forceColor === 0) {
369
+ return 0;
370
+ }
371
+ if (sniffFlags) {
372
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
373
+ return 3;
374
+ }
375
+ if (hasFlag("color=256")) {
376
+ return 2;
377
+ }
378
+ }
379
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
380
+ return 1;
381
+ }
382
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
383
+ return 0;
384
+ }
385
+ const min = forceColor || 0;
386
+ if (env.TERM === "dumb") {
387
+ return min;
388
+ }
389
+ if (import_node_process.default.platform === "win32") {
390
+ const osRelease = import_node_os.default.release().split(".");
391
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
392
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
393
+ }
394
+ return 1;
395
+ }
396
+ if ("CI" in env) {
397
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
398
+ return 3;
399
+ }
400
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
401
+ return 1;
402
+ }
403
+ return min;
404
+ }
405
+ if ("TEAMCITY_VERSION" in env) {
406
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
407
+ }
408
+ if (env.COLORTERM === "truecolor") {
409
+ return 3;
410
+ }
411
+ if (env.TERM === "xterm-kitty") {
412
+ return 3;
413
+ }
414
+ if ("TERM_PROGRAM" in env) {
415
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
416
+ switch (env.TERM_PROGRAM) {
417
+ case "iTerm.app": {
418
+ return version >= 3 ? 3 : 2;
419
+ }
420
+ case "Apple_Terminal": {
421
+ return 2;
422
+ }
423
+ }
424
+ }
425
+ if (/-256(color)?$/i.test(env.TERM)) {
426
+ return 2;
427
+ }
428
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
429
+ return 1;
430
+ }
431
+ if ("COLORTERM" in env) {
432
+ return 1;
433
+ }
434
+ return min;
435
+ }
436
+ function createSupportsColor(stream, options = {}) {
437
+ const level = _supportsColor(stream, {
438
+ streamIsTTY: stream && stream.isTTY,
439
+ ...options
440
+ });
441
+ return translateLevel(level);
442
+ }
443
+ var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
444
+ var init_supports_color = __esm({
445
+ "node_modules/.pnpm/supports-color@10.0.0/node_modules/supports-color/index.js"() {
446
+ import_node_process = __toESM(require("node:process"), 1);
447
+ import_node_os = __toESM(require("node:os"), 1);
448
+ import_node_tty = __toESM(require("node:tty"), 1);
449
+ __name(hasFlag, "hasFlag");
450
+ ({ env } = import_node_process.default);
451
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
452
+ flagForceColor = 0;
453
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
454
+ flagForceColor = 1;
455
+ }
456
+ __name(envForceColor, "envForceColor");
457
+ __name(translateLevel, "translateLevel");
458
+ __name(_supportsColor, "_supportsColor");
459
+ __name(createSupportsColor, "createSupportsColor");
460
+ supportsColor = {
461
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
462
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
463
+ };
464
+ supports_color_default = supportsColor;
465
+ }
466
+ });
467
+
468
+ // node_modules/.pnpm/has-flag@5.0.1/node_modules/has-flag/index.js
469
+ var has_flag_exports = {};
470
+ __export(has_flag_exports, {
471
+ default: () => hasFlag2
472
+ });
473
+ function hasFlag2(flag, argv = import_process.default.argv) {
474
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
475
+ const position = argv.indexOf(prefix + flag);
476
+ const terminatorPosition = argv.indexOf("--");
477
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
478
+ }
479
+ var import_process;
480
+ var init_has_flag = __esm({
481
+ "node_modules/.pnpm/has-flag@5.0.1/node_modules/has-flag/index.js"() {
482
+ import_process = __toESM(require("process"), 1);
483
+ __name(hasFlag2, "hasFlag");
484
+ }
485
+ });
486
+
487
+ // node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
488
+ var require_yoctocolors_cjs = __commonJS({
489
+ "node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports2, module2) {
490
+ var tty2 = require("node:tty");
491
+ var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
492
+ var format = /* @__PURE__ */ __name((open, close) => {
493
+ if (!hasColors) {
494
+ return (input2) => input2;
495
+ }
496
+ const openCode = `\x1B[${open}m`;
497
+ const closeCode = `\x1B[${close}m`;
498
+ return (input2) => {
499
+ const string = input2 + "";
500
+ let index = string.indexOf(closeCode);
501
+ if (index === -1) {
502
+ return openCode + string + closeCode;
503
+ }
504
+ let result = openCode;
505
+ let lastIndex = 0;
506
+ const reopenOnNestedClose = close === 22;
507
+ const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
508
+ while (index !== -1) {
509
+ result += string.slice(lastIndex, index) + replaceCode;
510
+ lastIndex = index + closeCode.length;
511
+ index = string.indexOf(closeCode, lastIndex);
512
+ }
513
+ result += string.slice(lastIndex) + closeCode;
514
+ return result;
515
+ };
516
+ }, "format");
517
+ var colors = {};
518
+ colors.reset = format(0, 0);
519
+ colors.bold = format(1, 22);
520
+ colors.dim = format(2, 22);
521
+ colors.italic = format(3, 23);
522
+ colors.underline = format(4, 24);
523
+ colors.overline = format(53, 55);
524
+ colors.inverse = format(7, 27);
525
+ colors.hidden = format(8, 28);
526
+ colors.strikethrough = format(9, 29);
527
+ colors.black = format(30, 39);
528
+ colors.red = format(31, 39);
529
+ colors.green = format(32, 39);
530
+ colors.yellow = format(33, 39);
531
+ colors.blue = format(34, 39);
532
+ colors.magenta = format(35, 39);
533
+ colors.cyan = format(36, 39);
534
+ colors.white = format(37, 39);
535
+ colors.gray = format(90, 39);
536
+ colors.bgBlack = format(40, 49);
537
+ colors.bgRed = format(41, 49);
538
+ colors.bgGreen = format(42, 49);
539
+ colors.bgYellow = format(43, 49);
540
+ colors.bgBlue = format(44, 49);
541
+ colors.bgMagenta = format(45, 49);
542
+ colors.bgCyan = format(46, 49);
543
+ colors.bgWhite = format(47, 49);
544
+ colors.bgGray = format(100, 49);
545
+ colors.redBright = format(91, 39);
546
+ colors.greenBright = format(92, 39);
547
+ colors.yellowBright = format(93, 39);
548
+ colors.blueBright = format(94, 39);
549
+ colors.magentaBright = format(95, 39);
550
+ colors.cyanBright = format(96, 39);
551
+ colors.whiteBright = format(97, 39);
552
+ colors.bgRedBright = format(101, 49);
553
+ colors.bgGreenBright = format(102, 49);
554
+ colors.bgYellowBright = format(103, 49);
555
+ colors.bgBlueBright = format(104, 49);
556
+ colors.bgMagentaBright = format(105, 49);
557
+ colors.bgCyanBright = format(106, 49);
558
+ colors.bgWhiteBright = format(107, 49);
559
+ module2.exports = colors;
560
+ }
561
+ });
562
+
32
563
  // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js
33
564
  var require_key = __commonJS({
34
565
  "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js"(exports2) {
@@ -263,104 +794,28 @@ var require_use_state = __commonJS({
263
794
  return [value, setState];
264
795
  });
265
796
  }
266
- __name(useState, "useState");
267
- }
268
- });
269
-
270
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js
271
- var require_use_effect = __commonJS({
272
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js"(exports2) {
273
- "use strict";
274
- Object.defineProperty(exports2, "__esModule", { value: true });
275
- exports2.useEffect = useEffect;
276
- var hook_engine_ts_1 = require_hook_engine();
277
- function useEffect(cb, depArray) {
278
- (0, hook_engine_ts_1.withPointer)((pointer) => {
279
- const oldDeps = pointer.get();
280
- const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
281
- if (hasChanged) {
282
- hook_engine_ts_1.effectScheduler.queue(cb);
283
- }
284
- pointer.set(depArray);
285
- });
286
- }
287
- __name(useEffect, "useEffect");
288
- }
289
- });
290
-
291
- // node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
292
- var require_yoctocolors_cjs = __commonJS({
293
- "node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports2, module2) {
294
- var tty = require("node:tty");
295
- var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
296
- var format = /* @__PURE__ */ __name((open, close) => {
297
- if (!hasColors) {
298
- return (input2) => input2;
299
- }
300
- const openCode = `\x1B[${open}m`;
301
- const closeCode = `\x1B[${close}m`;
302
- return (input2) => {
303
- const string = input2 + "";
304
- let index = string.indexOf(closeCode);
305
- if (index === -1) {
306
- return openCode + string + closeCode;
307
- }
308
- let result = openCode;
309
- let lastIndex = 0;
310
- const reopenOnNestedClose = close === 22;
311
- const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
312
- while (index !== -1) {
313
- result += string.slice(lastIndex, index) + replaceCode;
314
- lastIndex = index + closeCode.length;
315
- index = string.indexOf(closeCode, lastIndex);
797
+ __name(useState, "useState");
798
+ }
799
+ });
800
+
801
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js
802
+ var require_use_effect = __commonJS({
803
+ "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js"(exports2) {
804
+ "use strict";
805
+ Object.defineProperty(exports2, "__esModule", { value: true });
806
+ exports2.useEffect = useEffect;
807
+ var hook_engine_ts_1 = require_hook_engine();
808
+ function useEffect(cb, depArray) {
809
+ (0, hook_engine_ts_1.withPointer)((pointer) => {
810
+ const oldDeps = pointer.get();
811
+ const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
812
+ if (hasChanged) {
813
+ hook_engine_ts_1.effectScheduler.queue(cb);
316
814
  }
317
- result += string.slice(lastIndex) + closeCode;
318
- return result;
319
- };
320
- }, "format");
321
- var colors = {};
322
- colors.reset = format(0, 0);
323
- colors.bold = format(1, 22);
324
- colors.dim = format(2, 22);
325
- colors.italic = format(3, 23);
326
- colors.underline = format(4, 24);
327
- colors.overline = format(53, 55);
328
- colors.inverse = format(7, 27);
329
- colors.hidden = format(8, 28);
330
- colors.strikethrough = format(9, 29);
331
- colors.black = format(30, 39);
332
- colors.red = format(31, 39);
333
- colors.green = format(32, 39);
334
- colors.yellow = format(33, 39);
335
- colors.blue = format(34, 39);
336
- colors.magenta = format(35, 39);
337
- colors.cyan = format(36, 39);
338
- colors.white = format(37, 39);
339
- colors.gray = format(90, 39);
340
- colors.bgBlack = format(40, 49);
341
- colors.bgRed = format(41, 49);
342
- colors.bgGreen = format(42, 49);
343
- colors.bgYellow = format(43, 49);
344
- colors.bgBlue = format(44, 49);
345
- colors.bgMagenta = format(45, 49);
346
- colors.bgCyan = format(46, 49);
347
- colors.bgWhite = format(47, 49);
348
- colors.bgGray = format(100, 49);
349
- colors.redBright = format(91, 39);
350
- colors.greenBright = format(92, 39);
351
- colors.yellowBright = format(93, 39);
352
- colors.blueBright = format(94, 39);
353
- colors.magentaBright = format(95, 39);
354
- colors.cyanBright = format(96, 39);
355
- colors.whiteBright = format(97, 39);
356
- colors.bgRedBright = format(101, 49);
357
- colors.bgGreenBright = format(102, 49);
358
- colors.bgYellowBright = format(103, 49);
359
- colors.bgBlueBright = format(104, 49);
360
- colors.bgMagentaBright = format(105, 49);
361
- colors.bgCyanBright = format(106, 49);
362
- colors.bgWhiteBright = format(107, 49);
363
- module2.exports = colors;
815
+ pointer.set(depArray);
816
+ });
817
+ }
818
+ __name(useEffect, "useEffect");
364
819
  }
365
820
  });
366
821
 
@@ -1529,400 +1984,122 @@ var require_lib = __commonJS({
1529
1984
  var Stream = require("stream");
1530
1985
  var MuteStream = class extends Stream {
1531
1986
  static {
1532
- __name(this, "MuteStream");
1533
- }
1534
- #isTTY = null;
1535
- constructor(opts = {}) {
1536
- super(opts);
1537
- this.writable = this.readable = true;
1538
- this.muted = false;
1539
- this.on("pipe", this._onpipe);
1540
- this.replace = opts.replace;
1541
- this._prompt = opts.prompt || null;
1542
- this._hadControl = false;
1543
- }
1544
- #destSrc(key, def) {
1545
- if (this._dest) {
1546
- return this._dest[key];
1547
- }
1548
- if (this._src) {
1549
- return this._src[key];
1550
- }
1551
- return def;
1552
- }
1553
- #proxy(method, ...args) {
1554
- if (typeof this._dest?.[method] === "function") {
1555
- this._dest[method](...args);
1556
- }
1557
- if (typeof this._src?.[method] === "function") {
1558
- this._src[method](...args);
1559
- }
1560
- }
1561
- get isTTY() {
1562
- if (this.#isTTY !== null) {
1563
- return this.#isTTY;
1564
- }
1565
- return this.#destSrc("isTTY", false);
1566
- }
1567
- // basically just get replace the getter/setter with a regular value
1568
- set isTTY(val) {
1569
- this.#isTTY = val;
1570
- }
1571
- get rows() {
1572
- return this.#destSrc("rows");
1573
- }
1574
- get columns() {
1575
- return this.#destSrc("columns");
1576
- }
1577
- mute() {
1578
- this.muted = true;
1579
- }
1580
- unmute() {
1581
- this.muted = false;
1582
- }
1583
- _onpipe(src) {
1584
- this._src = src;
1585
- }
1586
- pipe(dest, options) {
1587
- this._dest = dest;
1588
- return super.pipe(dest, options);
1589
- }
1590
- pause() {
1591
- if (this._src) {
1592
- return this._src.pause();
1593
- }
1594
- }
1595
- resume() {
1596
- if (this._src) {
1597
- return this._src.resume();
1598
- }
1599
- }
1600
- write(c) {
1601
- if (this.muted) {
1602
- if (!this.replace) {
1603
- return true;
1604
- }
1605
- if (c.match(/^\u001b/)) {
1606
- if (c.indexOf(this._prompt) === 0) {
1607
- c = c.slice(this._prompt.length);
1608
- c = c.replace(/./g, this.replace);
1609
- c = this._prompt + c;
1610
- }
1611
- this._hadControl = true;
1612
- return this.emit("data", c);
1613
- } else {
1614
- if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
1615
- this._hadControl = false;
1616
- this.emit("data", this._prompt);
1617
- c = c.slice(this._prompt.length);
1618
- }
1619
- c = c.toString().replace(/./g, this.replace);
1620
- }
1621
- }
1622
- this.emit("data", c);
1623
- }
1624
- end(c) {
1625
- if (this.muted) {
1626
- if (c && this.replace) {
1627
- c = c.toString().replace(/./g, this.replace);
1628
- } else {
1629
- c = null;
1630
- }
1631
- }
1632
- if (c) {
1633
- this.emit("data", c);
1634
- }
1635
- this.emit("end");
1636
- }
1637
- destroy(...args) {
1638
- return this.#proxy("destroy", ...args);
1639
- }
1640
- destroySoon(...args) {
1641
- return this.#proxy("destroySoon", ...args);
1642
- }
1643
- close(...args) {
1644
- return this.#proxy("close", ...args);
1645
- }
1646
- };
1647
- module2.exports = MuteStream;
1648
- }
1649
- });
1650
-
1651
- // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js
1652
- var require_signals = __commonJS({
1653
- "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js"(exports2) {
1654
- "use strict";
1655
- Object.defineProperty(exports2, "__esModule", { value: true });
1656
- exports2.signals = void 0;
1657
- exports2.signals = [];
1658
- exports2.signals.push("SIGHUP", "SIGINT", "SIGTERM");
1659
- if (process.platform !== "win32") {
1660
- exports2.signals.push(
1661
- "SIGALRM",
1662
- "SIGABRT",
1663
- "SIGVTALRM",
1664
- "SIGXCPU",
1665
- "SIGXFSZ",
1666
- "SIGUSR2",
1667
- "SIGTRAP",
1668
- "SIGSYS",
1669
- "SIGQUIT",
1670
- "SIGIOT"
1671
- // should detect profiler and enable/disable accordingly.
1672
- // see #21
1673
- // 'SIGPROF'
1674
- );
1675
- }
1676
- if (process.platform === "linux") {
1677
- exports2.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1678
- }
1679
- }
1680
- });
1681
-
1682
- // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js
1683
- var require_cjs = __commonJS({
1684
- "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
1685
- "use strict";
1686
- var _a;
1687
- Object.defineProperty(exports2, "__esModule", { value: true });
1688
- exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
1689
- var signals_js_1 = require_signals();
1690
- Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
1691
- return signals_js_1.signals;
1692
- }, "get") });
1693
- var processOk = /* @__PURE__ */ __name((process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function", "processOk");
1694
- var kExitEmitter = Symbol.for("signal-exit emitter");
1695
- var global = globalThis;
1696
- var ObjectDefineProperty = Object.defineProperty.bind(Object);
1697
- var Emitter = class {
1698
- static {
1699
- __name(this, "Emitter");
1700
- }
1701
- emitted = {
1702
- afterExit: false,
1703
- exit: false
1704
- };
1705
- listeners = {
1706
- afterExit: [],
1707
- exit: []
1708
- };
1709
- count = 0;
1710
- id = Math.random();
1711
- constructor() {
1712
- if (global[kExitEmitter]) {
1713
- return global[kExitEmitter];
1714
- }
1715
- ObjectDefineProperty(global, kExitEmitter, {
1716
- value: this,
1717
- writable: false,
1718
- enumerable: false,
1719
- configurable: false
1720
- });
1987
+ __name(this, "MuteStream");
1721
1988
  }
1722
- on(ev, fn) {
1723
- this.listeners[ev].push(fn);
1989
+ #isTTY = null;
1990
+ constructor(opts = {}) {
1991
+ super(opts);
1992
+ this.writable = this.readable = true;
1993
+ this.muted = false;
1994
+ this.on("pipe", this._onpipe);
1995
+ this.replace = opts.replace;
1996
+ this._prompt = opts.prompt || null;
1997
+ this._hadControl = false;
1724
1998
  }
1725
- removeListener(ev, fn) {
1726
- const list = this.listeners[ev];
1727
- const i = list.indexOf(fn);
1728
- if (i === -1) {
1729
- return;
1999
+ #destSrc(key, def) {
2000
+ if (this._dest) {
2001
+ return this._dest[key];
1730
2002
  }
1731
- if (i === 0 && list.length === 1) {
1732
- list.length = 0;
1733
- } else {
1734
- list.splice(i, 1);
2003
+ if (this._src) {
2004
+ return this._src[key];
1735
2005
  }
2006
+ return def;
1736
2007
  }
1737
- emit(ev, code, signal) {
1738
- if (this.emitted[ev]) {
1739
- return false;
2008
+ #proxy(method, ...args) {
2009
+ if (typeof this._dest?.[method] === "function") {
2010
+ this._dest[method](...args);
1740
2011
  }
1741
- this.emitted[ev] = true;
1742
- let ret = false;
1743
- for (const fn of this.listeners[ev]) {
1744
- ret = fn(code, signal) === true || ret;
2012
+ if (typeof this._src?.[method] === "function") {
2013
+ this._src[method](...args);
1745
2014
  }
1746
- if (ev === "exit") {
1747
- ret = this.emit("afterExit", code, signal) || ret;
2015
+ }
2016
+ get isTTY() {
2017
+ if (this.#isTTY !== null) {
2018
+ return this.#isTTY;
1748
2019
  }
1749
- return ret;
2020
+ return this.#destSrc("isTTY", false);
1750
2021
  }
1751
- };
1752
- var SignalExitBase = class {
1753
- static {
1754
- __name(this, "SignalExitBase");
2022
+ // basically just get replace the getter/setter with a regular value
2023
+ set isTTY(val) {
2024
+ this.#isTTY = val;
1755
2025
  }
1756
- };
1757
- var signalExitWrap = /* @__PURE__ */ __name((handler) => {
1758
- return {
1759
- onExit(cb, opts) {
1760
- return handler.onExit(cb, opts);
1761
- },
1762
- load() {
1763
- return handler.load();
1764
- },
1765
- unload() {
1766
- return handler.unload();
1767
- }
1768
- };
1769
- }, "signalExitWrap");
1770
- var SignalExitFallback = class extends SignalExitBase {
1771
- static {
1772
- __name(this, "SignalExitFallback");
2026
+ get rows() {
2027
+ return this.#destSrc("rows");
1773
2028
  }
1774
- onExit() {
1775
- return () => {
1776
- };
2029
+ get columns() {
2030
+ return this.#destSrc("columns");
1777
2031
  }
1778
- load() {
2032
+ mute() {
2033
+ this.muted = true;
1779
2034
  }
1780
- unload() {
2035
+ unmute() {
2036
+ this.muted = false;
1781
2037
  }
1782
- };
1783
- var SignalExit = class extends SignalExitBase {
1784
- static {
1785
- __name(this, "SignalExit");
2038
+ _onpipe(src) {
2039
+ this._src = src;
1786
2040
  }
1787
- // "SIGHUP" throws an `ENOSYS` error on Windows,
1788
- // so use a supported signal instead
1789
- /* c8 ignore start */
1790
- #hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
1791
- /* c8 ignore stop */
1792
- #emitter = new Emitter();
1793
- #process;
1794
- #originalProcessEmit;
1795
- #originalProcessReallyExit;
1796
- #sigListeners = {};
1797
- #loaded = false;
1798
- constructor(process3) {
1799
- super();
1800
- this.#process = process3;
1801
- this.#sigListeners = {};
1802
- for (const sig of signals_js_1.signals) {
1803
- this.#sigListeners[sig] = () => {
1804
- const listeners = this.#process.listeners(sig);
1805
- let { count } = this.#emitter;
1806
- const p = process3;
1807
- if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
1808
- count += p.__signal_exit_emitter__.count;
1809
- }
1810
- if (listeners.length === count) {
1811
- this.unload();
1812
- const ret = this.#emitter.emit("exit", null, sig);
1813
- const s = sig === "SIGHUP" ? this.#hupSig : sig;
1814
- if (!ret)
1815
- process3.kill(process3.pid, s);
1816
- }
1817
- };
1818
- }
1819
- this.#originalProcessReallyExit = process3.reallyExit;
1820
- this.#originalProcessEmit = process3.emit;
2041
+ pipe(dest, options) {
2042
+ this._dest = dest;
2043
+ return super.pipe(dest, options);
1821
2044
  }
1822
- onExit(cb, opts) {
1823
- if (!processOk(this.#process)) {
1824
- return () => {
1825
- };
1826
- }
1827
- if (this.#loaded === false) {
1828
- this.load();
2045
+ pause() {
2046
+ if (this._src) {
2047
+ return this._src.pause();
1829
2048
  }
1830
- const ev = opts?.alwaysLast ? "afterExit" : "exit";
1831
- this.#emitter.on(ev, cb);
1832
- return () => {
1833
- this.#emitter.removeListener(ev, cb);
1834
- if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
1835
- this.unload();
1836
- }
1837
- };
1838
2049
  }
1839
- load() {
1840
- if (this.#loaded) {
1841
- return;
1842
- }
1843
- this.#loaded = true;
1844
- this.#emitter.count += 1;
1845
- for (const sig of signals_js_1.signals) {
1846
- try {
1847
- const fn = this.#sigListeners[sig];
1848
- if (fn)
1849
- this.#process.on(sig, fn);
1850
- } catch (_) {
1851
- }
2050
+ resume() {
2051
+ if (this._src) {
2052
+ return this._src.resume();
1852
2053
  }
1853
- this.#process.emit = (ev, ...a) => {
1854
- return this.#processEmit(ev, ...a);
1855
- };
1856
- this.#process.reallyExit = (code) => {
1857
- return this.#processReallyExit(code);
1858
- };
1859
2054
  }
1860
- unload() {
1861
- if (!this.#loaded) {
1862
- return;
1863
- }
1864
- this.#loaded = false;
1865
- signals_js_1.signals.forEach((sig) => {
1866
- const listener = this.#sigListeners[sig];
1867
- if (!listener) {
1868
- throw new Error("Listener not defined for signal: " + sig);
2055
+ write(c) {
2056
+ if (this.muted) {
2057
+ if (!this.replace) {
2058
+ return true;
1869
2059
  }
1870
- try {
1871
- this.#process.removeListener(sig, listener);
1872
- } catch (_) {
2060
+ if (c.match(/^\u001b/)) {
2061
+ if (c.indexOf(this._prompt) === 0) {
2062
+ c = c.slice(this._prompt.length);
2063
+ c = c.replace(/./g, this.replace);
2064
+ c = this._prompt + c;
2065
+ }
2066
+ this._hadControl = true;
2067
+ return this.emit("data", c);
2068
+ } else {
2069
+ if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
2070
+ this._hadControl = false;
2071
+ this.emit("data", this._prompt);
2072
+ c = c.slice(this._prompt.length);
2073
+ }
2074
+ c = c.toString().replace(/./g, this.replace);
1873
2075
  }
1874
- });
1875
- this.#process.emit = this.#originalProcessEmit;
1876
- this.#process.reallyExit = this.#originalProcessReallyExit;
1877
- this.#emitter.count -= 1;
1878
- }
1879
- #processReallyExit(code) {
1880
- if (!processOk(this.#process)) {
1881
- return 0;
1882
2076
  }
1883
- this.#process.exitCode = code || 0;
1884
- this.#emitter.emit("exit", this.#process.exitCode, null);
1885
- return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
2077
+ this.emit("data", c);
1886
2078
  }
1887
- #processEmit(ev, ...args) {
1888
- const og = this.#originalProcessEmit;
1889
- if (ev === "exit" && processOk(this.#process)) {
1890
- if (typeof args[0] === "number") {
1891
- this.#process.exitCode = args[0];
2079
+ end(c) {
2080
+ if (this.muted) {
2081
+ if (c && this.replace) {
2082
+ c = c.toString().replace(/./g, this.replace);
2083
+ } else {
2084
+ c = null;
1892
2085
  }
1893
- const ret = og.call(this.#process, ev, ...args);
1894
- this.#emitter.emit("exit", this.#process.exitCode, null);
1895
- return ret;
1896
- } else {
1897
- return og.call(this.#process, ev, ...args);
1898
2086
  }
2087
+ if (c) {
2088
+ this.emit("data", c);
2089
+ }
2090
+ this.emit("end");
2091
+ }
2092
+ destroy(...args) {
2093
+ return this.#proxy("destroy", ...args);
2094
+ }
2095
+ destroySoon(...args) {
2096
+ return this.#proxy("destroySoon", ...args);
2097
+ }
2098
+ close(...args) {
2099
+ return this.#proxy("close", ...args);
1899
2100
  }
1900
2101
  };
1901
- var process2 = globalThis.process;
1902
- _a = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback()), /**
1903
- * Called when the process is exiting, whether via signal, explicit
1904
- * exit, or running out of stuff to do.
1905
- *
1906
- * If the global process object is not suitable for instrumentation,
1907
- * then this will be a no-op.
1908
- *
1909
- * Returns a function that may be used to unload signal-exit.
1910
- */
1911
- exports2.onExit = _a.onExit, /**
1912
- * Load the listeners. Likely you never need to call this, unless
1913
- * doing a rather deep integration with signal-exit functionality.
1914
- * Mostly exposed for the benefit of testing.
1915
- *
1916
- * @internal
1917
- */
1918
- exports2.load = _a.load, /**
1919
- * Unload the listeners. Likely you never need to call this, unless
1920
- * doing a rather deep integration with signal-exit functionality.
1921
- * Mostly exposed for the benefit of testing.
1922
- *
1923
- * @internal
1924
- */
1925
- exports2.unload = _a.unload;
2102
+ module2.exports = MuteStream;
1926
2103
  }
1927
2104
  });
1928
2105
 
@@ -4593,7 +4770,11 @@ ${page}${helpTipBottom}${choiceDescription}${ansi_escapes_1.default.cursorHide}`
4593
4770
  }
4594
4771
  });
4595
4772
 
4596
- // src/external/inquirer-pack.js
4773
+ // src/external/external-pack.js
4774
+ var signalExit = require_cjs();
4775
+ var supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
4776
+ var hasFlag3 = (init_has_flag(), __toCommonJS(has_flag_exports));
4777
+ var yoctocolorsCjs = require_yoctocolors_cjs();
4597
4778
  var checkbox = require_commonjs4();
4598
4779
  var confirm = require_commonjs8();
4599
4780
  var input = require_commonjs9();
@@ -4603,8 +4784,12 @@ var select = require_commonjs12();
4603
4784
  module.exports = {
4604
4785
  checkbox,
4605
4786
  confirm,
4787
+ hasFlag: hasFlag3,
4606
4788
  input,
4607
4789
  password,
4608
4790
  search,
4609
- select
4791
+ select,
4792
+ signalExit,
4793
+ supportsColor: supportsColor2,
4794
+ yoctocolorsCjs
4610
4795
  };