@socketsecurity/lib 5.3.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.
- package/CHANGELOG.md +22 -0
- package/dist/cover/code.js +12 -4
- package/dist/dlx/cache.js +10 -2
- package/dist/dlx/manifest.js +45 -41
- package/dist/env/rewire.js +10 -2
- package/dist/external/@inquirer/checkbox.js +4 -2528
- package/dist/external/@inquirer/confirm.js +4 -2371
- package/dist/external/@inquirer/input.js +4 -2395
- package/dist/external/@inquirer/password.js +4 -2503
- package/dist/external/@inquirer/search.js +4 -2500
- package/dist/external/@inquirer/select.js +4 -2617
- package/dist/external/@npmcli/package-json.js +11 -7
- package/dist/external/debug.js +670 -15
- package/dist/external/del.js +4 -7139
- package/dist/external/external-pack.js +4795 -0
- package/dist/external/fast-glob.js +4 -5776
- package/dist/external/has-flag.js +6 -0
- package/dist/external/libnpmexec.js +2 -2
- package/dist/external/normalize-package-data.js +2 -2
- package/dist/external/npm-pack.js +1698 -3337
- package/dist/external/npm-package-arg.js +2 -2
- package/dist/external/pico-pack.js +7162 -0
- package/dist/external/picomatch.js +4 -1523
- package/dist/external/semver.js +2 -2
- package/dist/external/signal-exit.js +5 -0
- package/dist/external/spdx-correct.js +4 -1384
- package/dist/external/spdx-expression-parse.js +4 -1047
- package/dist/external/spdx-pack.js +1640 -0
- package/dist/external/supports-color.js +8 -0
- package/dist/external/validate-npm-package-name.js +4 -104
- package/dist/external/yoctocolors-cjs.js +5 -92
- package/dist/http-request.js +10 -2
- package/dist/ipc.js +53 -29
- package/dist/packages/isolation.js +45 -23
- package/dist/packages/licenses.js +10 -2
- package/dist/paths/socket.d.ts +2 -2
- package/dist/paths/socket.js +27 -21
- package/dist/process-lock.js +23 -14
- package/dist/releases/github.d.ts +67 -41
- package/dist/releases/github.js +142 -100
- package/dist/releases/socket-btm.d.ts +40 -33
- package/dist/releases/socket-btm.js +45 -5
- package/dist/spawn.js +10 -3
- package/dist/stdio/mask.d.ts +6 -21
- package/dist/stdio/mask.js +18 -14
- package/dist/themes/context.js +10 -2
- package/package.json +16 -3
- package/dist/external/npm-core.js +0 -6588
|
@@ -1,2396 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Bundled from @inquirer/input
|
|
4
|
-
* This is a zero-dependency bundle created by esbuild.
|
|
5
|
-
*/
|
|
6
|
-
"use strict";
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
12
|
-
var __esm = (fn, res) => function __init() {
|
|
13
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
14
|
-
};
|
|
15
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
16
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
-
};
|
|
18
|
-
var __export = (target, all) => {
|
|
19
|
-
for (var name in all)
|
|
20
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
21
|
-
};
|
|
22
|
-
var __copyProps = (to, from, except, desc) => {
|
|
23
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
24
|
-
for (let key of __getOwnPropNames(from))
|
|
25
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
26
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
27
|
-
}
|
|
28
|
-
return to;
|
|
29
|
-
};
|
|
30
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict'
|
|
31
2
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"use strict";
|
|
36
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
37
|
-
exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
|
|
38
|
-
var isUpKey = /* @__PURE__ */ __name((key, keybindings = []) => (
|
|
39
|
-
// The up key
|
|
40
|
-
key.name === "up" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
41
|
-
keybindings.includes("vim") && key.name === "k" || // Emacs keybinding: Ctrl+P means "previous" in Emacs navigation conventions
|
|
42
|
-
keybindings.includes("emacs") && key.ctrl && key.name === "p"
|
|
43
|
-
), "isUpKey");
|
|
44
|
-
exports2.isUpKey = isUpKey;
|
|
45
|
-
var isDownKey = /* @__PURE__ */ __name((key, keybindings = []) => (
|
|
46
|
-
// The down key
|
|
47
|
-
key.name === "down" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
48
|
-
keybindings.includes("vim") && key.name === "j" || // Emacs keybinding: Ctrl+N means "next" in Emacs navigation conventions
|
|
49
|
-
keybindings.includes("emacs") && key.ctrl && key.name === "n"
|
|
50
|
-
), "isDownKey");
|
|
51
|
-
exports2.isDownKey = isDownKey;
|
|
52
|
-
var isSpaceKey = /* @__PURE__ */ __name((key) => key.name === "space", "isSpaceKey");
|
|
53
|
-
exports2.isSpaceKey = isSpaceKey;
|
|
54
|
-
var isBackspaceKey = /* @__PURE__ */ __name((key) => key.name === "backspace", "isBackspaceKey");
|
|
55
|
-
exports2.isBackspaceKey = isBackspaceKey;
|
|
56
|
-
var isTabKey = /* @__PURE__ */ __name((key) => key.name === "tab", "isTabKey");
|
|
57
|
-
exports2.isTabKey = isTabKey;
|
|
58
|
-
var isNumberKey = /* @__PURE__ */ __name((key) => "1234567890".includes(key.name), "isNumberKey");
|
|
59
|
-
exports2.isNumberKey = isNumberKey;
|
|
60
|
-
var isEnterKey = /* @__PURE__ */ __name((key) => key.name === "enter" || key.name === "return", "isEnterKey");
|
|
61
|
-
exports2.isEnterKey = isEnterKey;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js
|
|
66
|
-
var require_errors = __commonJS({
|
|
67
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js"(exports2) {
|
|
68
|
-
"use strict";
|
|
69
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70
|
-
exports2.ValidationError = exports2.HookError = exports2.ExitPromptError = exports2.CancelPromptError = exports2.AbortPromptError = void 0;
|
|
71
|
-
var AbortPromptError = class extends Error {
|
|
72
|
-
static {
|
|
73
|
-
__name(this, "AbortPromptError");
|
|
74
|
-
}
|
|
75
|
-
name = "AbortPromptError";
|
|
76
|
-
message = "Prompt was aborted";
|
|
77
|
-
constructor(options) {
|
|
78
|
-
super();
|
|
79
|
-
this.cause = options?.cause;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
exports2.AbortPromptError = AbortPromptError;
|
|
83
|
-
var CancelPromptError = class extends Error {
|
|
84
|
-
static {
|
|
85
|
-
__name(this, "CancelPromptError");
|
|
86
|
-
}
|
|
87
|
-
name = "CancelPromptError";
|
|
88
|
-
message = "Prompt was canceled";
|
|
89
|
-
};
|
|
90
|
-
exports2.CancelPromptError = CancelPromptError;
|
|
91
|
-
var ExitPromptError = class extends Error {
|
|
92
|
-
static {
|
|
93
|
-
__name(this, "ExitPromptError");
|
|
94
|
-
}
|
|
95
|
-
name = "ExitPromptError";
|
|
96
|
-
};
|
|
97
|
-
exports2.ExitPromptError = ExitPromptError;
|
|
98
|
-
var HookError = class extends Error {
|
|
99
|
-
static {
|
|
100
|
-
__name(this, "HookError");
|
|
101
|
-
}
|
|
102
|
-
name = "HookError";
|
|
103
|
-
};
|
|
104
|
-
exports2.HookError = HookError;
|
|
105
|
-
var ValidationError = class extends Error {
|
|
106
|
-
static {
|
|
107
|
-
__name(this, "ValidationError");
|
|
108
|
-
}
|
|
109
|
-
name = "ValidationError";
|
|
110
|
-
};
|
|
111
|
-
exports2.ValidationError = ValidationError;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js
|
|
116
|
-
var require_hook_engine = __commonJS({
|
|
117
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js"(exports2) {
|
|
118
|
-
"use strict";
|
|
119
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
120
|
-
exports2.effectScheduler = void 0;
|
|
121
|
-
exports2.withHooks = withHooks;
|
|
122
|
-
exports2.readline = readline;
|
|
123
|
-
exports2.withUpdates = withUpdates;
|
|
124
|
-
exports2.withPointer = withPointer;
|
|
125
|
-
exports2.handleChange = handleChange;
|
|
126
|
-
var node_async_hooks_1 = require("node:async_hooks");
|
|
127
|
-
var errors_ts_1 = require_errors();
|
|
128
|
-
var hookStorage = new node_async_hooks_1.AsyncLocalStorage();
|
|
129
|
-
function createStore(rl) {
|
|
130
|
-
const store = {
|
|
131
|
-
rl,
|
|
132
|
-
hooks: [],
|
|
133
|
-
hooksCleanup: [],
|
|
134
|
-
hooksEffect: [],
|
|
135
|
-
index: 0,
|
|
136
|
-
handleChange() {
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
return store;
|
|
140
|
-
}
|
|
141
|
-
__name(createStore, "createStore");
|
|
142
|
-
function withHooks(rl, cb) {
|
|
143
|
-
const store = createStore(rl);
|
|
144
|
-
return hookStorage.run(store, () => {
|
|
145
|
-
function cycle(render) {
|
|
146
|
-
store.handleChange = () => {
|
|
147
|
-
store.index = 0;
|
|
148
|
-
render();
|
|
149
|
-
};
|
|
150
|
-
store.handleChange();
|
|
151
|
-
}
|
|
152
|
-
__name(cycle, "cycle");
|
|
153
|
-
return cb(cycle);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
__name(withHooks, "withHooks");
|
|
157
|
-
function getStore() {
|
|
158
|
-
const store = hookStorage.getStore();
|
|
159
|
-
if (!store) {
|
|
160
|
-
throw new errors_ts_1.HookError("[Inquirer] Hook functions can only be called from within a prompt");
|
|
161
|
-
}
|
|
162
|
-
return store;
|
|
163
|
-
}
|
|
164
|
-
__name(getStore, "getStore");
|
|
165
|
-
function readline() {
|
|
166
|
-
return getStore().rl;
|
|
167
|
-
}
|
|
168
|
-
__name(readline, "readline");
|
|
169
|
-
function withUpdates(fn) {
|
|
170
|
-
const wrapped = /* @__PURE__ */ __name((...args) => {
|
|
171
|
-
const store = getStore();
|
|
172
|
-
let shouldUpdate = false;
|
|
173
|
-
const oldHandleChange = store.handleChange;
|
|
174
|
-
store.handleChange = () => {
|
|
175
|
-
shouldUpdate = true;
|
|
176
|
-
};
|
|
177
|
-
const returnValue = fn(...args);
|
|
178
|
-
if (shouldUpdate) {
|
|
179
|
-
oldHandleChange();
|
|
180
|
-
}
|
|
181
|
-
store.handleChange = oldHandleChange;
|
|
182
|
-
return returnValue;
|
|
183
|
-
}, "wrapped");
|
|
184
|
-
return node_async_hooks_1.AsyncResource.bind(wrapped);
|
|
185
|
-
}
|
|
186
|
-
__name(withUpdates, "withUpdates");
|
|
187
|
-
function withPointer(cb) {
|
|
188
|
-
const store = getStore();
|
|
189
|
-
const { index } = store;
|
|
190
|
-
const pointer = {
|
|
191
|
-
get() {
|
|
192
|
-
return store.hooks[index];
|
|
193
|
-
},
|
|
194
|
-
set(value) {
|
|
195
|
-
store.hooks[index] = value;
|
|
196
|
-
},
|
|
197
|
-
initialized: index in store.hooks
|
|
198
|
-
};
|
|
199
|
-
const returnValue = cb(pointer);
|
|
200
|
-
store.index++;
|
|
201
|
-
return returnValue;
|
|
202
|
-
}
|
|
203
|
-
__name(withPointer, "withPointer");
|
|
204
|
-
function handleChange() {
|
|
205
|
-
getStore().handleChange();
|
|
206
|
-
}
|
|
207
|
-
__name(handleChange, "handleChange");
|
|
208
|
-
exports2.effectScheduler = {
|
|
209
|
-
queue(cb) {
|
|
210
|
-
const store = getStore();
|
|
211
|
-
const { index } = store;
|
|
212
|
-
store.hooksEffect.push(() => {
|
|
213
|
-
store.hooksCleanup[index]?.();
|
|
214
|
-
const cleanFn = cb(readline());
|
|
215
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
216
|
-
throw new errors_ts_1.ValidationError("useEffect return value must be a cleanup function or nothing.");
|
|
217
|
-
}
|
|
218
|
-
store.hooksCleanup[index] = cleanFn;
|
|
219
|
-
});
|
|
220
|
-
},
|
|
221
|
-
run() {
|
|
222
|
-
const store = getStore();
|
|
223
|
-
withUpdates(() => {
|
|
224
|
-
store.hooksEffect.forEach((effect) => {
|
|
225
|
-
effect();
|
|
226
|
-
});
|
|
227
|
-
store.hooksEffect.length = 0;
|
|
228
|
-
})();
|
|
229
|
-
},
|
|
230
|
-
clearAll() {
|
|
231
|
-
const store = getStore();
|
|
232
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
|
233
|
-
cleanFn?.();
|
|
234
|
-
});
|
|
235
|
-
store.hooksEffect.length = 0;
|
|
236
|
-
store.hooksCleanup.length = 0;
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js
|
|
243
|
-
var require_use_state = __commonJS({
|
|
244
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js"(exports2) {
|
|
245
|
-
"use strict";
|
|
246
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
247
|
-
exports2.useState = useState;
|
|
248
|
-
var node_async_hooks_1 = require("node:async_hooks");
|
|
249
|
-
var hook_engine_ts_1 = require_hook_engine();
|
|
250
|
-
function useState(defaultValue) {
|
|
251
|
-
return (0, hook_engine_ts_1.withPointer)((pointer) => {
|
|
252
|
-
const setState = node_async_hooks_1.AsyncResource.bind(/* @__PURE__ */ __name(function setState2(newValue) {
|
|
253
|
-
if (pointer.get() !== newValue) {
|
|
254
|
-
pointer.set(newValue);
|
|
255
|
-
(0, hook_engine_ts_1.handleChange)();
|
|
256
|
-
}
|
|
257
|
-
}, "setState"));
|
|
258
|
-
if (pointer.initialized) {
|
|
259
|
-
return [pointer.get(), setState];
|
|
260
|
-
}
|
|
261
|
-
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
262
|
-
pointer.set(value);
|
|
263
|
-
return [value, setState];
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
__name(useState, "useState");
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@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.0_@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 (input) => input;
|
|
299
|
-
}
|
|
300
|
-
const openCode = `\x1B[${open}m`;
|
|
301
|
-
const closeCode = `\x1B[${close}m`;
|
|
302
|
-
return (input) => {
|
|
303
|
-
const string = input + "";
|
|
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);
|
|
316
|
-
}
|
|
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;
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
// node_modules/.pnpm/@inquirer+figures@1.0.14/node_modules/@inquirer/figures/dist/commonjs/index.js
|
|
368
|
-
var require_commonjs = __commonJS({
|
|
369
|
-
"node_modules/.pnpm/@inquirer+figures@1.0.14/node_modules/@inquirer/figures/dist/commonjs/index.js"(exports2) {
|
|
370
|
-
"use strict";
|
|
371
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
372
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
373
|
-
};
|
|
374
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375
|
-
exports2.replaceSymbols = exports2.fallbackSymbols = exports2.mainSymbols = void 0;
|
|
376
|
-
var node_process_1 = __importDefault(require("node:process"));
|
|
377
|
-
function isUnicodeSupported() {
|
|
378
|
-
if (node_process_1.default.platform !== "win32") {
|
|
379
|
-
return node_process_1.default.env["TERM"] !== "linux";
|
|
380
|
-
}
|
|
381
|
-
return Boolean(node_process_1.default.env["WT_SESSION"]) || // Windows Terminal
|
|
382
|
-
Boolean(node_process_1.default.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
|
|
383
|
-
node_process_1.default.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
|
|
384
|
-
node_process_1.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || node_process_1.default.env["TERM_PROGRAM"] === "vscode" || node_process_1.default.env["TERM"] === "xterm-256color" || node_process_1.default.env["TERM"] === "alacritty" || node_process_1.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
385
|
-
}
|
|
386
|
-
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
387
|
-
var common = {
|
|
388
|
-
circleQuestionMark: "(?)",
|
|
389
|
-
questionMarkPrefix: "(?)",
|
|
390
|
-
square: "█",
|
|
391
|
-
squareDarkShade: "▓",
|
|
392
|
-
squareMediumShade: "▒",
|
|
393
|
-
squareLightShade: "░",
|
|
394
|
-
squareTop: "▀",
|
|
395
|
-
squareBottom: "▄",
|
|
396
|
-
squareLeft: "▌",
|
|
397
|
-
squareRight: "▐",
|
|
398
|
-
squareCenter: "■",
|
|
399
|
-
bullet: "●",
|
|
400
|
-
dot: "․",
|
|
401
|
-
ellipsis: "…",
|
|
402
|
-
pointerSmall: "›",
|
|
403
|
-
triangleUp: "▲",
|
|
404
|
-
triangleUpSmall: "▴",
|
|
405
|
-
triangleDown: "▼",
|
|
406
|
-
triangleDownSmall: "▾",
|
|
407
|
-
triangleLeftSmall: "◂",
|
|
408
|
-
triangleRightSmall: "▸",
|
|
409
|
-
home: "⌂",
|
|
410
|
-
heart: "♥",
|
|
411
|
-
musicNote: "♪",
|
|
412
|
-
musicNoteBeamed: "♫",
|
|
413
|
-
arrowUp: "↑",
|
|
414
|
-
arrowDown: "↓",
|
|
415
|
-
arrowLeft: "←",
|
|
416
|
-
arrowRight: "→",
|
|
417
|
-
arrowLeftRight: "↔",
|
|
418
|
-
arrowUpDown: "↕",
|
|
419
|
-
almostEqual: "≈",
|
|
420
|
-
notEqual: "≠",
|
|
421
|
-
lessOrEqual: "≤",
|
|
422
|
-
greaterOrEqual: "≥",
|
|
423
|
-
identical: "≡",
|
|
424
|
-
infinity: "∞",
|
|
425
|
-
subscriptZero: "₀",
|
|
426
|
-
subscriptOne: "₁",
|
|
427
|
-
subscriptTwo: "₂",
|
|
428
|
-
subscriptThree: "₃",
|
|
429
|
-
subscriptFour: "₄",
|
|
430
|
-
subscriptFive: "₅",
|
|
431
|
-
subscriptSix: "₆",
|
|
432
|
-
subscriptSeven: "₇",
|
|
433
|
-
subscriptEight: "₈",
|
|
434
|
-
subscriptNine: "₉",
|
|
435
|
-
oneHalf: "½",
|
|
436
|
-
oneThird: "⅓",
|
|
437
|
-
oneQuarter: "¼",
|
|
438
|
-
oneFifth: "⅕",
|
|
439
|
-
oneSixth: "⅙",
|
|
440
|
-
oneEighth: "⅛",
|
|
441
|
-
twoThirds: "⅔",
|
|
442
|
-
twoFifths: "⅖",
|
|
443
|
-
threeQuarters: "¾",
|
|
444
|
-
threeFifths: "⅗",
|
|
445
|
-
threeEighths: "⅜",
|
|
446
|
-
fourFifths: "⅘",
|
|
447
|
-
fiveSixths: "⅚",
|
|
448
|
-
fiveEighths: "⅝",
|
|
449
|
-
sevenEighths: "⅞",
|
|
450
|
-
line: "─",
|
|
451
|
-
lineBold: "━",
|
|
452
|
-
lineDouble: "═",
|
|
453
|
-
lineDashed0: "┄",
|
|
454
|
-
lineDashed1: "┅",
|
|
455
|
-
lineDashed2: "┈",
|
|
456
|
-
lineDashed3: "┉",
|
|
457
|
-
lineDashed4: "╌",
|
|
458
|
-
lineDashed5: "╍",
|
|
459
|
-
lineDashed6: "╴",
|
|
460
|
-
lineDashed7: "╶",
|
|
461
|
-
lineDashed8: "╸",
|
|
462
|
-
lineDashed9: "╺",
|
|
463
|
-
lineDashed10: "╼",
|
|
464
|
-
lineDashed11: "╾",
|
|
465
|
-
lineDashed12: "−",
|
|
466
|
-
lineDashed13: "–",
|
|
467
|
-
lineDashed14: "‐",
|
|
468
|
-
lineDashed15: "⁃",
|
|
469
|
-
lineVertical: "│",
|
|
470
|
-
lineVerticalBold: "┃",
|
|
471
|
-
lineVerticalDouble: "║",
|
|
472
|
-
lineVerticalDashed0: "┆",
|
|
473
|
-
lineVerticalDashed1: "┇",
|
|
474
|
-
lineVerticalDashed2: "┊",
|
|
475
|
-
lineVerticalDashed3: "┋",
|
|
476
|
-
lineVerticalDashed4: "╎",
|
|
477
|
-
lineVerticalDashed5: "╏",
|
|
478
|
-
lineVerticalDashed6: "╵",
|
|
479
|
-
lineVerticalDashed7: "╷",
|
|
480
|
-
lineVerticalDashed8: "╹",
|
|
481
|
-
lineVerticalDashed9: "╻",
|
|
482
|
-
lineVerticalDashed10: "╽",
|
|
483
|
-
lineVerticalDashed11: "╿",
|
|
484
|
-
lineDownLeft: "┐",
|
|
485
|
-
lineDownLeftArc: "╮",
|
|
486
|
-
lineDownBoldLeftBold: "┓",
|
|
487
|
-
lineDownBoldLeft: "┒",
|
|
488
|
-
lineDownLeftBold: "┑",
|
|
489
|
-
lineDownDoubleLeftDouble: "╗",
|
|
490
|
-
lineDownDoubleLeft: "╖",
|
|
491
|
-
lineDownLeftDouble: "╕",
|
|
492
|
-
lineDownRight: "┌",
|
|
493
|
-
lineDownRightArc: "╭",
|
|
494
|
-
lineDownBoldRightBold: "┏",
|
|
495
|
-
lineDownBoldRight: "┎",
|
|
496
|
-
lineDownRightBold: "┍",
|
|
497
|
-
lineDownDoubleRightDouble: "╔",
|
|
498
|
-
lineDownDoubleRight: "╓",
|
|
499
|
-
lineDownRightDouble: "╒",
|
|
500
|
-
lineUpLeft: "┘",
|
|
501
|
-
lineUpLeftArc: "╯",
|
|
502
|
-
lineUpBoldLeftBold: "┛",
|
|
503
|
-
lineUpBoldLeft: "┚",
|
|
504
|
-
lineUpLeftBold: "┙",
|
|
505
|
-
lineUpDoubleLeftDouble: "╝",
|
|
506
|
-
lineUpDoubleLeft: "╜",
|
|
507
|
-
lineUpLeftDouble: "╛",
|
|
508
|
-
lineUpRight: "└",
|
|
509
|
-
lineUpRightArc: "╰",
|
|
510
|
-
lineUpBoldRightBold: "┗",
|
|
511
|
-
lineUpBoldRight: "┖",
|
|
512
|
-
lineUpRightBold: "┕",
|
|
513
|
-
lineUpDoubleRightDouble: "╚",
|
|
514
|
-
lineUpDoubleRight: "╙",
|
|
515
|
-
lineUpRightDouble: "╘",
|
|
516
|
-
lineUpDownLeft: "┤",
|
|
517
|
-
lineUpBoldDownBoldLeftBold: "┫",
|
|
518
|
-
lineUpBoldDownBoldLeft: "┨",
|
|
519
|
-
lineUpDownLeftBold: "┥",
|
|
520
|
-
lineUpBoldDownLeftBold: "┩",
|
|
521
|
-
lineUpDownBoldLeftBold: "┪",
|
|
522
|
-
lineUpDownBoldLeft: "┧",
|
|
523
|
-
lineUpBoldDownLeft: "┦",
|
|
524
|
-
lineUpDoubleDownDoubleLeftDouble: "╣",
|
|
525
|
-
lineUpDoubleDownDoubleLeft: "╢",
|
|
526
|
-
lineUpDownLeftDouble: "╡",
|
|
527
|
-
lineUpDownRight: "├",
|
|
528
|
-
lineUpBoldDownBoldRightBold: "┣",
|
|
529
|
-
lineUpBoldDownBoldRight: "┠",
|
|
530
|
-
lineUpDownRightBold: "┝",
|
|
531
|
-
lineUpBoldDownRightBold: "┡",
|
|
532
|
-
lineUpDownBoldRightBold: "┢",
|
|
533
|
-
lineUpDownBoldRight: "┟",
|
|
534
|
-
lineUpBoldDownRight: "┞",
|
|
535
|
-
lineUpDoubleDownDoubleRightDouble: "╠",
|
|
536
|
-
lineUpDoubleDownDoubleRight: "╟",
|
|
537
|
-
lineUpDownRightDouble: "╞",
|
|
538
|
-
lineDownLeftRight: "┬",
|
|
539
|
-
lineDownBoldLeftBoldRightBold: "┳",
|
|
540
|
-
lineDownLeftBoldRightBold: "┯",
|
|
541
|
-
lineDownBoldLeftRight: "┰",
|
|
542
|
-
lineDownBoldLeftBoldRight: "┱",
|
|
543
|
-
lineDownBoldLeftRightBold: "┲",
|
|
544
|
-
lineDownLeftRightBold: "┮",
|
|
545
|
-
lineDownLeftBoldRight: "┭",
|
|
546
|
-
lineDownDoubleLeftDoubleRightDouble: "╦",
|
|
547
|
-
lineDownDoubleLeftRight: "╥",
|
|
548
|
-
lineDownLeftDoubleRightDouble: "╤",
|
|
549
|
-
lineUpLeftRight: "┴",
|
|
550
|
-
lineUpBoldLeftBoldRightBold: "┻",
|
|
551
|
-
lineUpLeftBoldRightBold: "┷",
|
|
552
|
-
lineUpBoldLeftRight: "┸",
|
|
553
|
-
lineUpBoldLeftBoldRight: "┹",
|
|
554
|
-
lineUpBoldLeftRightBold: "┺",
|
|
555
|
-
lineUpLeftRightBold: "┶",
|
|
556
|
-
lineUpLeftBoldRight: "┵",
|
|
557
|
-
lineUpDoubleLeftDoubleRightDouble: "╩",
|
|
558
|
-
lineUpDoubleLeftRight: "╨",
|
|
559
|
-
lineUpLeftDoubleRightDouble: "╧",
|
|
560
|
-
lineUpDownLeftRight: "┼",
|
|
561
|
-
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
|
562
|
-
lineUpDownBoldLeftBoldRightBold: "╈",
|
|
563
|
-
lineUpBoldDownLeftBoldRightBold: "╇",
|
|
564
|
-
lineUpBoldDownBoldLeftRightBold: "╊",
|
|
565
|
-
lineUpBoldDownBoldLeftBoldRight: "╉",
|
|
566
|
-
lineUpBoldDownLeftRight: "╀",
|
|
567
|
-
lineUpDownBoldLeftRight: "╁",
|
|
568
|
-
lineUpDownLeftBoldRight: "┽",
|
|
569
|
-
lineUpDownLeftRightBold: "┾",
|
|
570
|
-
lineUpBoldDownBoldLeftRight: "╂",
|
|
571
|
-
lineUpDownLeftBoldRightBold: "┿",
|
|
572
|
-
lineUpBoldDownLeftBoldRight: "╃",
|
|
573
|
-
lineUpBoldDownLeftRightBold: "╄",
|
|
574
|
-
lineUpDownBoldLeftBoldRight: "╅",
|
|
575
|
-
lineUpDownBoldLeftRightBold: "╆",
|
|
576
|
-
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
|
577
|
-
lineUpDoubleDownDoubleLeftRight: "╫",
|
|
578
|
-
lineUpDownLeftDoubleRightDouble: "╪",
|
|
579
|
-
lineCross: "╳",
|
|
580
|
-
lineBackslash: "╲",
|
|
581
|
-
lineSlash: "╱"
|
|
582
|
-
};
|
|
583
|
-
var specialMainSymbols = {
|
|
584
|
-
tick: "✔",
|
|
585
|
-
info: "ℹ",
|
|
586
|
-
warning: "⚠",
|
|
587
|
-
cross: "✘",
|
|
588
|
-
squareSmall: "◻",
|
|
589
|
-
squareSmallFilled: "◼",
|
|
590
|
-
circle: "◯",
|
|
591
|
-
circleFilled: "◉",
|
|
592
|
-
circleDotted: "◌",
|
|
593
|
-
circleDouble: "◎",
|
|
594
|
-
circleCircle: "ⓞ",
|
|
595
|
-
circleCross: "ⓧ",
|
|
596
|
-
circlePipe: "Ⓘ",
|
|
597
|
-
radioOn: "◉",
|
|
598
|
-
radioOff: "◯",
|
|
599
|
-
checkboxOn: "☒",
|
|
600
|
-
checkboxOff: "☐",
|
|
601
|
-
checkboxCircleOn: "ⓧ",
|
|
602
|
-
checkboxCircleOff: "Ⓘ",
|
|
603
|
-
pointer: "❯",
|
|
604
|
-
triangleUpOutline: "△",
|
|
605
|
-
triangleLeft: "◀",
|
|
606
|
-
triangleRight: "▶",
|
|
607
|
-
lozenge: "◆",
|
|
608
|
-
lozengeOutline: "◇",
|
|
609
|
-
hamburger: "☰",
|
|
610
|
-
smiley: "㋡",
|
|
611
|
-
mustache: "෴",
|
|
612
|
-
star: "★",
|
|
613
|
-
play: "▶",
|
|
614
|
-
nodejs: "⬢",
|
|
615
|
-
oneSeventh: "⅐",
|
|
616
|
-
oneNinth: "⅑",
|
|
617
|
-
oneTenth: "⅒"
|
|
618
|
-
};
|
|
619
|
-
var specialFallbackSymbols = {
|
|
620
|
-
tick: "√",
|
|
621
|
-
info: "i",
|
|
622
|
-
warning: "‼",
|
|
623
|
-
cross: "×",
|
|
624
|
-
squareSmall: "□",
|
|
625
|
-
squareSmallFilled: "■",
|
|
626
|
-
circle: "( )",
|
|
627
|
-
circleFilled: "(*)",
|
|
628
|
-
circleDotted: "( )",
|
|
629
|
-
circleDouble: "( )",
|
|
630
|
-
circleCircle: "(○)",
|
|
631
|
-
circleCross: "(×)",
|
|
632
|
-
circlePipe: "(│)",
|
|
633
|
-
radioOn: "(*)",
|
|
634
|
-
radioOff: "( )",
|
|
635
|
-
checkboxOn: "[×]",
|
|
636
|
-
checkboxOff: "[ ]",
|
|
637
|
-
checkboxCircleOn: "(×)",
|
|
638
|
-
checkboxCircleOff: "( )",
|
|
639
|
-
pointer: ">",
|
|
640
|
-
triangleUpOutline: "∆",
|
|
641
|
-
triangleLeft: "◄",
|
|
642
|
-
triangleRight: "►",
|
|
643
|
-
lozenge: "♦",
|
|
644
|
-
lozengeOutline: "◊",
|
|
645
|
-
hamburger: "≡",
|
|
646
|
-
smiley: "☺",
|
|
647
|
-
mustache: "┌─┐",
|
|
648
|
-
star: "✶",
|
|
649
|
-
play: "►",
|
|
650
|
-
nodejs: "♦",
|
|
651
|
-
oneSeventh: "1/7",
|
|
652
|
-
oneNinth: "1/9",
|
|
653
|
-
oneTenth: "1/10"
|
|
654
|
-
};
|
|
655
|
-
exports2.mainSymbols = { ...common, ...specialMainSymbols };
|
|
656
|
-
exports2.fallbackSymbols = {
|
|
657
|
-
...common,
|
|
658
|
-
...specialFallbackSymbols
|
|
659
|
-
};
|
|
660
|
-
var shouldUseMain = isUnicodeSupported();
|
|
661
|
-
var figures = shouldUseMain ? exports2.mainSymbols : exports2.fallbackSymbols;
|
|
662
|
-
exports2.default = figures;
|
|
663
|
-
var replacements = Object.entries(specialMainSymbols);
|
|
664
|
-
var replaceSymbols = /* @__PURE__ */ __name((string, { useFallback = !shouldUseMain } = {}) => {
|
|
665
|
-
if (useFallback) {
|
|
666
|
-
for (const [key, mainSymbol] of replacements) {
|
|
667
|
-
const fallbackSymbol = exports2.fallbackSymbols[key];
|
|
668
|
-
if (!fallbackSymbol) {
|
|
669
|
-
throw new Error(`Unable to find fallback for ${key}`);
|
|
670
|
-
}
|
|
671
|
-
string = string.replaceAll(mainSymbol, fallbackSymbol);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
return string;
|
|
675
|
-
}, "replaceSymbols");
|
|
676
|
-
exports2.replaceSymbols = replaceSymbols;
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
|
|
680
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js
|
|
681
|
-
var require_theme = __commonJS({
|
|
682
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js"(exports2) {
|
|
683
|
-
"use strict";
|
|
684
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
685
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
686
|
-
};
|
|
687
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
688
|
-
exports2.defaultTheme = void 0;
|
|
689
|
-
var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
|
|
690
|
-
var figures_1 = __importDefault(require_commonjs());
|
|
691
|
-
exports2.defaultTheme = {
|
|
692
|
-
prefix: {
|
|
693
|
-
idle: yoctocolors_cjs_1.default.blue("?"),
|
|
694
|
-
// TODO: use figure
|
|
695
|
-
done: yoctocolors_cjs_1.default.green(figures_1.default.tick)
|
|
696
|
-
},
|
|
697
|
-
spinner: {
|
|
698
|
-
interval: 80,
|
|
699
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => yoctocolors_cjs_1.default.yellow(frame))
|
|
700
|
-
},
|
|
701
|
-
style: {
|
|
702
|
-
answer: yoctocolors_cjs_1.default.cyan,
|
|
703
|
-
message: yoctocolors_cjs_1.default.bold,
|
|
704
|
-
error: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.red(`> ${text}`), "error"),
|
|
705
|
-
defaultAnswer: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`(${text})`), "defaultAnswer"),
|
|
706
|
-
help: yoctocolors_cjs_1.default.dim,
|
|
707
|
-
highlight: yoctocolors_cjs_1.default.cyan,
|
|
708
|
-
key: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(yoctocolors_cjs_1.default.bold(`<${text}>`)), "key")
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
|
|
714
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js
|
|
715
|
-
var require_make_theme = __commonJS({
|
|
716
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js"(exports2) {
|
|
717
|
-
"use strict";
|
|
718
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
719
|
-
exports2.makeTheme = makeTheme;
|
|
720
|
-
var theme_ts_1 = require_theme();
|
|
721
|
-
function isPlainObject(value) {
|
|
722
|
-
if (typeof value !== "object" || value === null)
|
|
723
|
-
return false;
|
|
724
|
-
let proto = value;
|
|
725
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
726
|
-
proto = Object.getPrototypeOf(proto);
|
|
727
|
-
}
|
|
728
|
-
return Object.getPrototypeOf(value) === proto;
|
|
729
|
-
}
|
|
730
|
-
__name(isPlainObject, "isPlainObject");
|
|
731
|
-
function deepMerge(...objects) {
|
|
732
|
-
const output = {};
|
|
733
|
-
for (const obj of objects) {
|
|
734
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
735
|
-
const prevValue = output[key];
|
|
736
|
-
output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
return output;
|
|
740
|
-
}
|
|
741
|
-
__name(deepMerge, "deepMerge");
|
|
742
|
-
function makeTheme(...themes) {
|
|
743
|
-
const themesToMerge = [
|
|
744
|
-
theme_ts_1.defaultTheme,
|
|
745
|
-
...themes.filter((theme) => theme != null)
|
|
746
|
-
];
|
|
747
|
-
return deepMerge(...themesToMerge);
|
|
748
|
-
}
|
|
749
|
-
__name(makeTheme, "makeTheme");
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
|
|
753
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js
|
|
754
|
-
var require_use_prefix = __commonJS({
|
|
755
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js"(exports2) {
|
|
756
|
-
"use strict";
|
|
757
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
758
|
-
exports2.usePrefix = usePrefix;
|
|
759
|
-
var use_state_ts_1 = require_use_state();
|
|
760
|
-
var use_effect_ts_1 = require_use_effect();
|
|
761
|
-
var make_theme_ts_1 = require_make_theme();
|
|
762
|
-
function usePrefix({ status = "idle", theme }) {
|
|
763
|
-
const [showLoader, setShowLoader] = (0, use_state_ts_1.useState)(false);
|
|
764
|
-
const [tick, setTick] = (0, use_state_ts_1.useState)(0);
|
|
765
|
-
const { prefix, spinner } = (0, make_theme_ts_1.makeTheme)(theme);
|
|
766
|
-
(0, use_effect_ts_1.useEffect)(() => {
|
|
767
|
-
if (status === "loading") {
|
|
768
|
-
let tickInterval;
|
|
769
|
-
let inc = -1;
|
|
770
|
-
const delayTimeout = setTimeout(() => {
|
|
771
|
-
setShowLoader(true);
|
|
772
|
-
tickInterval = setInterval(() => {
|
|
773
|
-
inc = inc + 1;
|
|
774
|
-
setTick(inc % spinner.frames.length);
|
|
775
|
-
}, spinner.interval);
|
|
776
|
-
}, 300);
|
|
777
|
-
return () => {
|
|
778
|
-
clearTimeout(delayTimeout);
|
|
779
|
-
clearInterval(tickInterval);
|
|
780
|
-
};
|
|
781
|
-
} else {
|
|
782
|
-
setShowLoader(false);
|
|
783
|
-
}
|
|
784
|
-
}, [status]);
|
|
785
|
-
if (showLoader) {
|
|
786
|
-
return spinner.frames[tick];
|
|
787
|
-
}
|
|
788
|
-
const iconName = status === "loading" ? "idle" : status;
|
|
789
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
790
|
-
}
|
|
791
|
-
__name(usePrefix, "usePrefix");
|
|
792
|
-
}
|
|
793
|
-
});
|
|
794
|
-
|
|
795
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js
|
|
796
|
-
var require_use_memo = __commonJS({
|
|
797
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js"(exports2) {
|
|
798
|
-
"use strict";
|
|
799
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
800
|
-
exports2.useMemo = useMemo;
|
|
801
|
-
var hook_engine_ts_1 = require_hook_engine();
|
|
802
|
-
function useMemo(fn, dependencies) {
|
|
803
|
-
return (0, hook_engine_ts_1.withPointer)((pointer) => {
|
|
804
|
-
const prev = pointer.get();
|
|
805
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
806
|
-
const value = fn();
|
|
807
|
-
pointer.set({ value, dependencies });
|
|
808
|
-
return value;
|
|
809
|
-
}
|
|
810
|
-
return prev.value;
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
__name(useMemo, "useMemo");
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
|
|
817
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js
|
|
818
|
-
var require_use_ref = __commonJS({
|
|
819
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js"(exports2) {
|
|
820
|
-
"use strict";
|
|
821
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
822
|
-
exports2.useRef = useRef;
|
|
823
|
-
var use_state_ts_1 = require_use_state();
|
|
824
|
-
function useRef(val) {
|
|
825
|
-
return (0, use_state_ts_1.useState)({ current: val })[0];
|
|
826
|
-
}
|
|
827
|
-
__name(useRef, "useRef");
|
|
828
|
-
}
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js
|
|
832
|
-
var require_use_keypress = __commonJS({
|
|
833
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js"(exports2) {
|
|
834
|
-
"use strict";
|
|
835
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
836
|
-
exports2.useKeypress = useKeypress;
|
|
837
|
-
var use_ref_ts_1 = require_use_ref();
|
|
838
|
-
var use_effect_ts_1 = require_use_effect();
|
|
839
|
-
var hook_engine_ts_1 = require_hook_engine();
|
|
840
|
-
function useKeypress(userHandler) {
|
|
841
|
-
const signal = (0, use_ref_ts_1.useRef)(userHandler);
|
|
842
|
-
signal.current = userHandler;
|
|
843
|
-
(0, use_effect_ts_1.useEffect)((rl) => {
|
|
844
|
-
let ignore = false;
|
|
845
|
-
const handler = (0, hook_engine_ts_1.withUpdates)((_input, event) => {
|
|
846
|
-
if (ignore)
|
|
847
|
-
return;
|
|
848
|
-
void signal.current(event, rl);
|
|
849
|
-
});
|
|
850
|
-
rl.input.on("keypress", handler);
|
|
851
|
-
return () => {
|
|
852
|
-
ignore = true;
|
|
853
|
-
rl.input.removeListener("keypress", handler);
|
|
854
|
-
};
|
|
855
|
-
}, []);
|
|
856
|
-
}
|
|
857
|
-
__name(useKeypress, "useKeypress");
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
|
|
861
|
-
// node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
862
|
-
var require_cli_width = __commonJS({
|
|
863
|
-
"node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js"(exports2, module2) {
|
|
864
|
-
"use strict";
|
|
865
|
-
module2.exports = cliWidth;
|
|
866
|
-
function normalizeOpts(options) {
|
|
867
|
-
const defaultOpts = {
|
|
868
|
-
defaultWidth: 0,
|
|
869
|
-
output: process.stdout,
|
|
870
|
-
tty: require("tty")
|
|
871
|
-
};
|
|
872
|
-
if (!options) {
|
|
873
|
-
return defaultOpts;
|
|
874
|
-
}
|
|
875
|
-
Object.keys(defaultOpts).forEach(function(key) {
|
|
876
|
-
if (!options[key]) {
|
|
877
|
-
options[key] = defaultOpts[key];
|
|
878
|
-
}
|
|
879
|
-
});
|
|
880
|
-
return options;
|
|
881
|
-
}
|
|
882
|
-
__name(normalizeOpts, "normalizeOpts");
|
|
883
|
-
function cliWidth(options) {
|
|
884
|
-
const opts = normalizeOpts(options);
|
|
885
|
-
if (opts.output.getWindowSize) {
|
|
886
|
-
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
887
|
-
}
|
|
888
|
-
if (opts.tty.getWindowSize) {
|
|
889
|
-
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
890
|
-
}
|
|
891
|
-
if (opts.output.columns) {
|
|
892
|
-
return opts.output.columns;
|
|
893
|
-
}
|
|
894
|
-
if (process.env.CLI_WIDTH) {
|
|
895
|
-
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
896
|
-
if (!isNaN(width) && width !== 0) {
|
|
897
|
-
return width;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
return opts.defaultWidth;
|
|
901
|
-
}
|
|
902
|
-
__name(cliWidth, "cliWidth");
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
|
|
906
|
-
// node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
907
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
908
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
909
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
910
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
911
|
-
const pattern = `${osc}|${csi}`;
|
|
912
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
913
|
-
}
|
|
914
|
-
var init_ansi_regex = __esm({
|
|
915
|
-
"node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js"() {
|
|
916
|
-
__name(ansiRegex, "ansiRegex");
|
|
917
|
-
}
|
|
918
|
-
});
|
|
919
|
-
|
|
920
|
-
// node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
921
|
-
function stripAnsi(string) {
|
|
922
|
-
if (typeof string !== "string") {
|
|
923
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
924
|
-
}
|
|
925
|
-
return string.replace(regex, "");
|
|
926
|
-
}
|
|
927
|
-
var regex;
|
|
928
|
-
var init_strip_ansi = __esm({
|
|
929
|
-
"node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js"() {
|
|
930
|
-
init_ansi_regex();
|
|
931
|
-
regex = ansiRegex();
|
|
932
|
-
__name(stripAnsi, "stripAnsi");
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
|
-
|
|
936
|
-
// node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
|
|
937
|
-
function isAmbiguous(x) {
|
|
938
|
-
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
939
|
-
}
|
|
940
|
-
function isFullWidth(x) {
|
|
941
|
-
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
942
|
-
}
|
|
943
|
-
function isWide(x) {
|
|
944
|
-
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
945
|
-
}
|
|
946
|
-
var init_lookup = __esm({
|
|
947
|
-
"node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js"() {
|
|
948
|
-
__name(isAmbiguous, "isAmbiguous");
|
|
949
|
-
__name(isFullWidth, "isFullWidth");
|
|
950
|
-
__name(isWide, "isWide");
|
|
951
|
-
}
|
|
952
|
-
});
|
|
953
|
-
|
|
954
|
-
// node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
|
|
955
|
-
function validate(codePoint) {
|
|
956
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
957
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
961
|
-
validate(codePoint);
|
|
962
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
963
|
-
return 2;
|
|
964
|
-
}
|
|
965
|
-
return 1;
|
|
966
|
-
}
|
|
967
|
-
var init_get_east_asian_width = __esm({
|
|
968
|
-
"node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js"() {
|
|
969
|
-
init_lookup();
|
|
970
|
-
__name(validate, "validate");
|
|
971
|
-
__name(eastAsianWidth, "eastAsianWidth");
|
|
972
|
-
}
|
|
973
|
-
});
|
|
974
|
-
|
|
975
|
-
// node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
|
|
976
|
-
function baseVisible(segment) {
|
|
977
|
-
return segment.replace(leadingNonPrintingRegex, "");
|
|
978
|
-
}
|
|
979
|
-
function isZeroWidthCluster(segment) {
|
|
980
|
-
return zeroWidthClusterRegex.test(segment);
|
|
981
|
-
}
|
|
982
|
-
function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
|
|
983
|
-
let extra = 0;
|
|
984
|
-
if (segment.length > 1) {
|
|
985
|
-
for (const char of segment.slice(1)) {
|
|
986
|
-
if (char >= "" && char <= "") {
|
|
987
|
-
extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
return extra;
|
|
992
|
-
}
|
|
993
|
-
function stringWidth(input, options = {}) {
|
|
994
|
-
if (typeof input !== "string" || input.length === 0) {
|
|
995
|
-
return 0;
|
|
996
|
-
}
|
|
997
|
-
const {
|
|
998
|
-
ambiguousIsNarrow = true,
|
|
999
|
-
countAnsiEscapeCodes = false
|
|
1000
|
-
} = options;
|
|
1001
|
-
let string = input;
|
|
1002
|
-
if (!countAnsiEscapeCodes) {
|
|
1003
|
-
string = stripAnsi(string);
|
|
1004
|
-
}
|
|
1005
|
-
if (string.length === 0) {
|
|
1006
|
-
return 0;
|
|
1007
|
-
}
|
|
1008
|
-
let width = 0;
|
|
1009
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
1010
|
-
for (const { segment } of segmenter.segment(string)) {
|
|
1011
|
-
if (isZeroWidthCluster(segment)) {
|
|
1012
|
-
continue;
|
|
1013
|
-
}
|
|
1014
|
-
if (rgiEmojiRegex.test(segment)) {
|
|
1015
|
-
width += 2;
|
|
1016
|
-
continue;
|
|
1017
|
-
}
|
|
1018
|
-
const codePoint = baseVisible(segment).codePointAt(0);
|
|
1019
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
1020
|
-
width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
|
|
1021
|
-
}
|
|
1022
|
-
return width;
|
|
1023
|
-
}
|
|
1024
|
-
var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
|
|
1025
|
-
var init_string_width = __esm({
|
|
1026
|
-
"node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js"() {
|
|
1027
|
-
init_strip_ansi();
|
|
1028
|
-
init_get_east_asian_width();
|
|
1029
|
-
segmenter = new Intl.Segmenter();
|
|
1030
|
-
zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
1031
|
-
leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
1032
|
-
rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
1033
|
-
__name(baseVisible, "baseVisible");
|
|
1034
|
-
__name(isZeroWidthCluster, "isZeroWidthCluster");
|
|
1035
|
-
__name(trailingHalfwidthWidth, "trailingHalfwidthWidth");
|
|
1036
|
-
__name(stringWidth, "stringWidth");
|
|
1037
|
-
}
|
|
1038
|
-
});
|
|
1039
|
-
|
|
1040
|
-
// node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
1041
|
-
function assembleStyles() {
|
|
1042
|
-
const codes = /* @__PURE__ */ new Map();
|
|
1043
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
1044
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
1045
|
-
styles[styleName] = {
|
|
1046
|
-
open: `\x1B[${style[0]}m`,
|
|
1047
|
-
close: `\x1B[${style[1]}m`
|
|
1048
|
-
};
|
|
1049
|
-
group[styleName] = styles[styleName];
|
|
1050
|
-
codes.set(style[0], style[1]);
|
|
1051
|
-
}
|
|
1052
|
-
Object.defineProperty(styles, groupName, {
|
|
1053
|
-
value: group,
|
|
1054
|
-
enumerable: false
|
|
1055
|
-
});
|
|
1056
|
-
}
|
|
1057
|
-
Object.defineProperty(styles, "codes", {
|
|
1058
|
-
value: codes,
|
|
1059
|
-
enumerable: false
|
|
1060
|
-
});
|
|
1061
|
-
styles.color.close = "\x1B[39m";
|
|
1062
|
-
styles.bgColor.close = "\x1B[49m";
|
|
1063
|
-
styles.color.ansi = wrapAnsi16();
|
|
1064
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
1065
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
1066
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1067
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1068
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1069
|
-
Object.defineProperties(styles, {
|
|
1070
|
-
rgbToAnsi256: {
|
|
1071
|
-
value(red, green, blue) {
|
|
1072
|
-
if (red === green && green === blue) {
|
|
1073
|
-
if (red < 8) {
|
|
1074
|
-
return 16;
|
|
1075
|
-
}
|
|
1076
|
-
if (red > 248) {
|
|
1077
|
-
return 231;
|
|
1078
|
-
}
|
|
1079
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
1080
|
-
}
|
|
1081
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
1082
|
-
},
|
|
1083
|
-
enumerable: false
|
|
1084
|
-
},
|
|
1085
|
-
hexToRgb: {
|
|
1086
|
-
value(hex) {
|
|
1087
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
1088
|
-
if (!matches) {
|
|
1089
|
-
return [0, 0, 0];
|
|
1090
|
-
}
|
|
1091
|
-
let [colorString] = matches;
|
|
1092
|
-
if (colorString.length === 3) {
|
|
1093
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
1094
|
-
}
|
|
1095
|
-
const integer = Number.parseInt(colorString, 16);
|
|
1096
|
-
return [
|
|
1097
|
-
/* eslint-disable no-bitwise */
|
|
1098
|
-
integer >> 16 & 255,
|
|
1099
|
-
integer >> 8 & 255,
|
|
1100
|
-
integer & 255
|
|
1101
|
-
/* eslint-enable no-bitwise */
|
|
1102
|
-
];
|
|
1103
|
-
},
|
|
1104
|
-
enumerable: false
|
|
1105
|
-
},
|
|
1106
|
-
hexToAnsi256: {
|
|
1107
|
-
value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
|
|
1108
|
-
enumerable: false
|
|
1109
|
-
},
|
|
1110
|
-
ansi256ToAnsi: {
|
|
1111
|
-
value(code) {
|
|
1112
|
-
if (code < 8) {
|
|
1113
|
-
return 30 + code;
|
|
1114
|
-
}
|
|
1115
|
-
if (code < 16) {
|
|
1116
|
-
return 90 + (code - 8);
|
|
1117
|
-
}
|
|
1118
|
-
let red;
|
|
1119
|
-
let green;
|
|
1120
|
-
let blue;
|
|
1121
|
-
if (code >= 232) {
|
|
1122
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
1123
|
-
green = red;
|
|
1124
|
-
blue = red;
|
|
1125
|
-
} else {
|
|
1126
|
-
code -= 16;
|
|
1127
|
-
const remainder = code % 36;
|
|
1128
|
-
red = Math.floor(code / 36) / 5;
|
|
1129
|
-
green = Math.floor(remainder / 6) / 5;
|
|
1130
|
-
blue = remainder % 6 / 5;
|
|
1131
|
-
}
|
|
1132
|
-
const value = Math.max(red, green, blue) * 2;
|
|
1133
|
-
if (value === 0) {
|
|
1134
|
-
return 30;
|
|
1135
|
-
}
|
|
1136
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
1137
|
-
if (value === 2) {
|
|
1138
|
-
result += 60;
|
|
1139
|
-
}
|
|
1140
|
-
return result;
|
|
1141
|
-
},
|
|
1142
|
-
enumerable: false
|
|
1143
|
-
},
|
|
1144
|
-
rgbToAnsi: {
|
|
1145
|
-
value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
|
|
1146
|
-
enumerable: false
|
|
1147
|
-
},
|
|
1148
|
-
hexToAnsi: {
|
|
1149
|
-
value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
|
|
1150
|
-
enumerable: false
|
|
1151
|
-
}
|
|
1152
|
-
});
|
|
1153
|
-
return styles;
|
|
1154
|
-
}
|
|
1155
|
-
var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
|
1156
|
-
var init_ansi_styles = __esm({
|
|
1157
|
-
"node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js"() {
|
|
1158
|
-
ANSI_BACKGROUND_OFFSET = 10;
|
|
1159
|
-
wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
|
|
1160
|
-
wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
|
|
1161
|
-
wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
|
|
1162
|
-
styles = {
|
|
1163
|
-
modifier: {
|
|
1164
|
-
reset: [0, 0],
|
|
1165
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
1166
|
-
bold: [1, 22],
|
|
1167
|
-
dim: [2, 22],
|
|
1168
|
-
italic: [3, 23],
|
|
1169
|
-
underline: [4, 24],
|
|
1170
|
-
overline: [53, 55],
|
|
1171
|
-
inverse: [7, 27],
|
|
1172
|
-
hidden: [8, 28],
|
|
1173
|
-
strikethrough: [9, 29]
|
|
1174
|
-
},
|
|
1175
|
-
color: {
|
|
1176
|
-
black: [30, 39],
|
|
1177
|
-
red: [31, 39],
|
|
1178
|
-
green: [32, 39],
|
|
1179
|
-
yellow: [33, 39],
|
|
1180
|
-
blue: [34, 39],
|
|
1181
|
-
magenta: [35, 39],
|
|
1182
|
-
cyan: [36, 39],
|
|
1183
|
-
white: [37, 39],
|
|
1184
|
-
// Bright color
|
|
1185
|
-
blackBright: [90, 39],
|
|
1186
|
-
gray: [90, 39],
|
|
1187
|
-
// Alias of `blackBright`
|
|
1188
|
-
grey: [90, 39],
|
|
1189
|
-
// Alias of `blackBright`
|
|
1190
|
-
redBright: [91, 39],
|
|
1191
|
-
greenBright: [92, 39],
|
|
1192
|
-
yellowBright: [93, 39],
|
|
1193
|
-
blueBright: [94, 39],
|
|
1194
|
-
magentaBright: [95, 39],
|
|
1195
|
-
cyanBright: [96, 39],
|
|
1196
|
-
whiteBright: [97, 39]
|
|
1197
|
-
},
|
|
1198
|
-
bgColor: {
|
|
1199
|
-
bgBlack: [40, 49],
|
|
1200
|
-
bgRed: [41, 49],
|
|
1201
|
-
bgGreen: [42, 49],
|
|
1202
|
-
bgYellow: [43, 49],
|
|
1203
|
-
bgBlue: [44, 49],
|
|
1204
|
-
bgMagenta: [45, 49],
|
|
1205
|
-
bgCyan: [46, 49],
|
|
1206
|
-
bgWhite: [47, 49],
|
|
1207
|
-
// Bright color
|
|
1208
|
-
bgBlackBright: [100, 49],
|
|
1209
|
-
bgGray: [100, 49],
|
|
1210
|
-
// Alias of `bgBlackBright`
|
|
1211
|
-
bgGrey: [100, 49],
|
|
1212
|
-
// Alias of `bgBlackBright`
|
|
1213
|
-
bgRedBright: [101, 49],
|
|
1214
|
-
bgGreenBright: [102, 49],
|
|
1215
|
-
bgYellowBright: [103, 49],
|
|
1216
|
-
bgBlueBright: [104, 49],
|
|
1217
|
-
bgMagentaBright: [105, 49],
|
|
1218
|
-
bgCyanBright: [106, 49],
|
|
1219
|
-
bgWhiteBright: [107, 49]
|
|
1220
|
-
}
|
|
1221
|
-
};
|
|
1222
|
-
modifierNames = Object.keys(styles.modifier);
|
|
1223
|
-
foregroundColorNames = Object.keys(styles.color);
|
|
1224
|
-
backgroundColorNames = Object.keys(styles.bgColor);
|
|
1225
|
-
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1226
|
-
__name(assembleStyles, "assembleStyles");
|
|
1227
|
-
ansiStyles = assembleStyles();
|
|
1228
|
-
ansi_styles_default = ansiStyles;
|
|
1229
|
-
}
|
|
1230
|
-
});
|
|
1231
|
-
|
|
1232
|
-
// node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
1233
|
-
var wrap_ansi_exports = {};
|
|
1234
|
-
__export(wrap_ansi_exports, {
|
|
1235
|
-
default: () => wrapAnsi
|
|
1236
|
-
});
|
|
1237
|
-
function wrapAnsi(string, columns, options) {
|
|
1238
|
-
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
1239
|
-
}
|
|
1240
|
-
var ESCAPES, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, wrapAnsiCode, wrapAnsiHyperlink, wordLengths, wrapWord, stringVisibleTrimSpacesRight, exec;
|
|
1241
|
-
var init_wrap_ansi = __esm({
|
|
1242
|
-
"node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js"() {
|
|
1243
|
-
init_string_width();
|
|
1244
|
-
init_strip_ansi();
|
|
1245
|
-
init_ansi_styles();
|
|
1246
|
-
ESCAPES = /* @__PURE__ */ new Set([
|
|
1247
|
-
"\x1B",
|
|
1248
|
-
""
|
|
1249
|
-
]);
|
|
1250
|
-
END_CODE = 39;
|
|
1251
|
-
ANSI_ESCAPE_BELL = "\x07";
|
|
1252
|
-
ANSI_CSI = "[";
|
|
1253
|
-
ANSI_OSC = "]";
|
|
1254
|
-
ANSI_SGR_TERMINATOR = "m";
|
|
1255
|
-
ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
1256
|
-
wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
|
|
1257
|
-
wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
|
|
1258
|
-
wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
|
|
1259
|
-
wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
|
|
1260
|
-
const characters = [...word];
|
|
1261
|
-
let isInsideEscape = false;
|
|
1262
|
-
let isInsideLinkEscape = false;
|
|
1263
|
-
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
1264
|
-
for (const [index, character] of characters.entries()) {
|
|
1265
|
-
const characterLength = stringWidth(character);
|
|
1266
|
-
if (visible + characterLength <= columns) {
|
|
1267
|
-
rows[rows.length - 1] += character;
|
|
1268
|
-
} else {
|
|
1269
|
-
rows.push(character);
|
|
1270
|
-
visible = 0;
|
|
1271
|
-
}
|
|
1272
|
-
if (ESCAPES.has(character)) {
|
|
1273
|
-
isInsideEscape = true;
|
|
1274
|
-
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
1275
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
1276
|
-
}
|
|
1277
|
-
if (isInsideEscape) {
|
|
1278
|
-
if (isInsideLinkEscape) {
|
|
1279
|
-
if (character === ANSI_ESCAPE_BELL) {
|
|
1280
|
-
isInsideEscape = false;
|
|
1281
|
-
isInsideLinkEscape = false;
|
|
1282
|
-
}
|
|
1283
|
-
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
1284
|
-
isInsideEscape = false;
|
|
1285
|
-
}
|
|
1286
|
-
continue;
|
|
1287
|
-
}
|
|
1288
|
-
visible += characterLength;
|
|
1289
|
-
if (visible === columns && index < characters.length - 1) {
|
|
1290
|
-
rows.push("");
|
|
1291
|
-
visible = 0;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
1295
|
-
rows[rows.length - 2] += rows.pop();
|
|
1296
|
-
}
|
|
1297
|
-
}, "wrapWord");
|
|
1298
|
-
stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
|
|
1299
|
-
const words = string.split(" ");
|
|
1300
|
-
let last = words.length;
|
|
1301
|
-
while (last > 0) {
|
|
1302
|
-
if (stringWidth(words[last - 1]) > 0) {
|
|
1303
|
-
break;
|
|
1304
|
-
}
|
|
1305
|
-
last--;
|
|
1306
|
-
}
|
|
1307
|
-
if (last === words.length) {
|
|
1308
|
-
return string;
|
|
1309
|
-
}
|
|
1310
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
1311
|
-
}, "stringVisibleTrimSpacesRight");
|
|
1312
|
-
exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
|
|
1313
|
-
if (options.trim !== false && string.trim() === "") {
|
|
1314
|
-
return "";
|
|
1315
|
-
}
|
|
1316
|
-
let returnValue = "";
|
|
1317
|
-
let escapeCode;
|
|
1318
|
-
let escapeUrl;
|
|
1319
|
-
const lengths = wordLengths(string);
|
|
1320
|
-
let rows = [""];
|
|
1321
|
-
for (const [index, word] of string.split(" ").entries()) {
|
|
1322
|
-
if (options.trim !== false) {
|
|
1323
|
-
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
1324
|
-
}
|
|
1325
|
-
let rowLength = stringWidth(rows.at(-1));
|
|
1326
|
-
if (index !== 0) {
|
|
1327
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
1328
|
-
rows.push("");
|
|
1329
|
-
rowLength = 0;
|
|
1330
|
-
}
|
|
1331
|
-
if (rowLength > 0 || options.trim === false) {
|
|
1332
|
-
rows[rows.length - 1] += " ";
|
|
1333
|
-
rowLength++;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
if (options.hard && lengths[index] > columns) {
|
|
1337
|
-
const remainingColumns = columns - rowLength;
|
|
1338
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
1339
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
1340
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
1341
|
-
rows.push("");
|
|
1342
|
-
}
|
|
1343
|
-
wrapWord(rows, word, columns);
|
|
1344
|
-
continue;
|
|
1345
|
-
}
|
|
1346
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
1347
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
1348
|
-
wrapWord(rows, word, columns);
|
|
1349
|
-
continue;
|
|
1350
|
-
}
|
|
1351
|
-
rows.push("");
|
|
1352
|
-
}
|
|
1353
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
1354
|
-
wrapWord(rows, word, columns);
|
|
1355
|
-
continue;
|
|
1356
|
-
}
|
|
1357
|
-
rows[rows.length - 1] += word;
|
|
1358
|
-
}
|
|
1359
|
-
if (options.trim !== false) {
|
|
1360
|
-
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
1361
|
-
}
|
|
1362
|
-
const preString = rows.join("\n");
|
|
1363
|
-
const pre = [...preString];
|
|
1364
|
-
let preStringIndex = 0;
|
|
1365
|
-
for (const [index, character] of pre.entries()) {
|
|
1366
|
-
returnValue += character;
|
|
1367
|
-
if (ESCAPES.has(character)) {
|
|
1368
|
-
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
1369
|
-
if (groups.code !== void 0) {
|
|
1370
|
-
const code2 = Number.parseFloat(groups.code);
|
|
1371
|
-
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
1372
|
-
} else if (groups.uri !== void 0) {
|
|
1373
|
-
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
1377
|
-
if (pre[index + 1] === "\n") {
|
|
1378
|
-
if (escapeUrl) {
|
|
1379
|
-
returnValue += wrapAnsiHyperlink("");
|
|
1380
|
-
}
|
|
1381
|
-
if (escapeCode && code) {
|
|
1382
|
-
returnValue += wrapAnsiCode(code);
|
|
1383
|
-
}
|
|
1384
|
-
} else if (character === "\n") {
|
|
1385
|
-
if (escapeCode && code) {
|
|
1386
|
-
returnValue += wrapAnsiCode(escapeCode);
|
|
1387
|
-
}
|
|
1388
|
-
if (escapeUrl) {
|
|
1389
|
-
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
preStringIndex += character.length;
|
|
1393
|
-
}
|
|
1394
|
-
return returnValue;
|
|
1395
|
-
}, "exec");
|
|
1396
|
-
__name(wrapAnsi, "wrapAnsi");
|
|
1397
|
-
}
|
|
1398
|
-
});
|
|
1399
|
-
|
|
1400
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js
|
|
1401
|
-
var require_utils = __commonJS({
|
|
1402
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js"(exports2) {
|
|
1403
|
-
"use strict";
|
|
1404
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
1405
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1406
|
-
};
|
|
1407
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1408
|
-
exports2.breakLines = breakLines;
|
|
1409
|
-
exports2.readlineWidth = readlineWidth;
|
|
1410
|
-
var cli_width_1 = __importDefault(require_cli_width());
|
|
1411
|
-
var wrap_ansi_1 = __importDefault((init_wrap_ansi(), __toCommonJS(wrap_ansi_exports)));
|
|
1412
|
-
var hook_engine_ts_1 = require_hook_engine();
|
|
1413
|
-
function breakLines(content, width) {
|
|
1414
|
-
return content.split("\n").flatMap((line) => (0, wrap_ansi_1.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
|
|
1415
|
-
}
|
|
1416
|
-
__name(breakLines, "breakLines");
|
|
1417
|
-
function readlineWidth() {
|
|
1418
|
-
return (0, cli_width_1.default)({ defaultWidth: 80, output: (0, hook_engine_ts_1.readline)().output });
|
|
1419
|
-
}
|
|
1420
|
-
__name(readlineWidth, "readlineWidth");
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1423
|
-
|
|
1424
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js
|
|
1425
|
-
var require_use_pagination = __commonJS({
|
|
1426
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js"(exports2) {
|
|
1427
|
-
"use strict";
|
|
1428
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1429
|
-
exports2.usePagination = usePagination;
|
|
1430
|
-
var use_ref_ts_1 = require_use_ref();
|
|
1431
|
-
var utils_ts_1 = require_utils();
|
|
1432
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
1433
|
-
const state = (0, use_ref_ts_1.useRef)({
|
|
1434
|
-
lastPointer: active,
|
|
1435
|
-
lastActive: void 0
|
|
1436
|
-
});
|
|
1437
|
-
const { lastPointer, lastActive } = state.current;
|
|
1438
|
-
const middle = Math.floor(pageSize / 2);
|
|
1439
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
1440
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
1441
|
-
let pointer = defaultPointerPosition;
|
|
1442
|
-
if (renderedLength > pageSize) {
|
|
1443
|
-
if (loop) {
|
|
1444
|
-
pointer = lastPointer;
|
|
1445
|
-
if (
|
|
1446
|
-
// First render, skip this logic.
|
|
1447
|
-
lastActive != null && // Only move the pointer down when the user moves down.
|
|
1448
|
-
lastActive < active && // Check user didn't move up across page boundary.
|
|
1449
|
-
active - lastActive < pageSize
|
|
1450
|
-
) {
|
|
1451
|
-
pointer = Math.min(
|
|
1452
|
-
// Furthest allowed position for the pointer is the middle of the list
|
|
1453
|
-
middle,
|
|
1454
|
-
Math.abs(active - lastActive) === 1 ? Math.min(
|
|
1455
|
-
// Move the pointer at most the height of the last active item.
|
|
1456
|
-
lastPointer + (renderedItems[lastActive]?.length ?? 0),
|
|
1457
|
-
// If the user moved by one item, move the pointer to the natural position of the active item as
|
|
1458
|
-
// long as it doesn't move the cursor up.
|
|
1459
|
-
Math.max(defaultPointerPosition, lastPointer)
|
|
1460
|
-
) : (
|
|
1461
|
-
// Otherwise, move the pointer down by the difference between the active and last active item.
|
|
1462
|
-
lastPointer + active - lastActive
|
|
1463
|
-
)
|
|
1464
|
-
);
|
|
1465
|
-
}
|
|
1466
|
-
} else {
|
|
1467
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
1468
|
-
pointer = spaceUnderActive < pageSize - middle ? (
|
|
1469
|
-
// If the active item is near the end of the list, progressively move the cursor towards the end.
|
|
1470
|
-
pageSize - spaceUnderActive
|
|
1471
|
-
) : (
|
|
1472
|
-
// Otherwise, progressively move the pointer to the middle of the list.
|
|
1473
|
-
Math.min(defaultPointerPosition, middle)
|
|
1474
|
-
);
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
state.current.lastPointer = pointer;
|
|
1478
|
-
state.current.lastActive = active;
|
|
1479
|
-
return pointer;
|
|
1480
|
-
}
|
|
1481
|
-
__name(usePointerPosition, "usePointerPosition");
|
|
1482
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
1483
|
-
const width = (0, utils_ts_1.readlineWidth)();
|
|
1484
|
-
const bound = /* @__PURE__ */ __name((num) => (num % items.length + items.length) % items.length, "bound");
|
|
1485
|
-
const renderedItems = items.map((item, index) => {
|
|
1486
|
-
if (item == null)
|
|
1487
|
-
return [];
|
|
1488
|
-
return (0, utils_ts_1.breakLines)(renderItem({ item, index, isActive: index === active }), width).split("\n");
|
|
1489
|
-
});
|
|
1490
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
1491
|
-
const renderItemAtIndex = /* @__PURE__ */ __name((index) => renderedItems[index] ?? [], "renderItemAtIndex");
|
|
1492
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
1493
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
1494
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
1495
|
-
const pageBuffer = Array.from({ length: pageSize });
|
|
1496
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
1497
|
-
const itemVisited = /* @__PURE__ */ new Set([active]);
|
|
1498
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
|
1499
|
-
let itemPointer = bound(active + 1);
|
|
1500
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
1501
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
1502
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
1503
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
1504
|
-
itemVisited.add(itemPointer);
|
|
1505
|
-
bufferPointer += linesToAdd.length;
|
|
1506
|
-
itemPointer = bound(itemPointer + 1);
|
|
1507
|
-
}
|
|
1508
|
-
bufferPointer = activeItemPosition - 1;
|
|
1509
|
-
itemPointer = bound(active - 1);
|
|
1510
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
1511
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
1512
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
1513
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
1514
|
-
itemVisited.add(itemPointer);
|
|
1515
|
-
bufferPointer -= linesToAdd.length;
|
|
1516
|
-
itemPointer = bound(itemPointer - 1);
|
|
1517
|
-
}
|
|
1518
|
-
return pageBuffer.filter((line) => typeof line === "string").join("\n");
|
|
1519
|
-
}
|
|
1520
|
-
__name(usePagination, "usePagination");
|
|
1521
|
-
}
|
|
1522
|
-
});
|
|
1523
|
-
|
|
1524
|
-
// node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
1525
|
-
var require_lib = __commonJS({
|
|
1526
|
-
"node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js"(exports2, module2) {
|
|
1527
|
-
var Stream = require("stream");
|
|
1528
|
-
var MuteStream = class extends Stream {
|
|
1529
|
-
static {
|
|
1530
|
-
__name(this, "MuteStream");
|
|
1531
|
-
}
|
|
1532
|
-
#isTTY = null;
|
|
1533
|
-
constructor(opts = {}) {
|
|
1534
|
-
super(opts);
|
|
1535
|
-
this.writable = this.readable = true;
|
|
1536
|
-
this.muted = false;
|
|
1537
|
-
this.on("pipe", this._onpipe);
|
|
1538
|
-
this.replace = opts.replace;
|
|
1539
|
-
this._prompt = opts.prompt || null;
|
|
1540
|
-
this._hadControl = false;
|
|
1541
|
-
}
|
|
1542
|
-
#destSrc(key, def) {
|
|
1543
|
-
if (this._dest) {
|
|
1544
|
-
return this._dest[key];
|
|
1545
|
-
}
|
|
1546
|
-
if (this._src) {
|
|
1547
|
-
return this._src[key];
|
|
1548
|
-
}
|
|
1549
|
-
return def;
|
|
1550
|
-
}
|
|
1551
|
-
#proxy(method, ...args) {
|
|
1552
|
-
if (typeof this._dest?.[method] === "function") {
|
|
1553
|
-
this._dest[method](...args);
|
|
1554
|
-
}
|
|
1555
|
-
if (typeof this._src?.[method] === "function") {
|
|
1556
|
-
this._src[method](...args);
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
get isTTY() {
|
|
1560
|
-
if (this.#isTTY !== null) {
|
|
1561
|
-
return this.#isTTY;
|
|
1562
|
-
}
|
|
1563
|
-
return this.#destSrc("isTTY", false);
|
|
1564
|
-
}
|
|
1565
|
-
// basically just get replace the getter/setter with a regular value
|
|
1566
|
-
set isTTY(val) {
|
|
1567
|
-
this.#isTTY = val;
|
|
1568
|
-
}
|
|
1569
|
-
get rows() {
|
|
1570
|
-
return this.#destSrc("rows");
|
|
1571
|
-
}
|
|
1572
|
-
get columns() {
|
|
1573
|
-
return this.#destSrc("columns");
|
|
1574
|
-
}
|
|
1575
|
-
mute() {
|
|
1576
|
-
this.muted = true;
|
|
1577
|
-
}
|
|
1578
|
-
unmute() {
|
|
1579
|
-
this.muted = false;
|
|
1580
|
-
}
|
|
1581
|
-
_onpipe(src) {
|
|
1582
|
-
this._src = src;
|
|
1583
|
-
}
|
|
1584
|
-
pipe(dest, options) {
|
|
1585
|
-
this._dest = dest;
|
|
1586
|
-
return super.pipe(dest, options);
|
|
1587
|
-
}
|
|
1588
|
-
pause() {
|
|
1589
|
-
if (this._src) {
|
|
1590
|
-
return this._src.pause();
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
resume() {
|
|
1594
|
-
if (this._src) {
|
|
1595
|
-
return this._src.resume();
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
write(c) {
|
|
1599
|
-
if (this.muted) {
|
|
1600
|
-
if (!this.replace) {
|
|
1601
|
-
return true;
|
|
1602
|
-
}
|
|
1603
|
-
if (c.match(/^\u001b/)) {
|
|
1604
|
-
if (c.indexOf(this._prompt) === 0) {
|
|
1605
|
-
c = c.slice(this._prompt.length);
|
|
1606
|
-
c = c.replace(/./g, this.replace);
|
|
1607
|
-
c = this._prompt + c;
|
|
1608
|
-
}
|
|
1609
|
-
this._hadControl = true;
|
|
1610
|
-
return this.emit("data", c);
|
|
1611
|
-
} else {
|
|
1612
|
-
if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
|
|
1613
|
-
this._hadControl = false;
|
|
1614
|
-
this.emit("data", this._prompt);
|
|
1615
|
-
c = c.slice(this._prompt.length);
|
|
1616
|
-
}
|
|
1617
|
-
c = c.toString().replace(/./g, this.replace);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
this.emit("data", c);
|
|
1621
|
-
}
|
|
1622
|
-
end(c) {
|
|
1623
|
-
if (this.muted) {
|
|
1624
|
-
if (c && this.replace) {
|
|
1625
|
-
c = c.toString().replace(/./g, this.replace);
|
|
1626
|
-
} else {
|
|
1627
|
-
c = null;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
if (c) {
|
|
1631
|
-
this.emit("data", c);
|
|
1632
|
-
}
|
|
1633
|
-
this.emit("end");
|
|
1634
|
-
}
|
|
1635
|
-
destroy(...args) {
|
|
1636
|
-
return this.#proxy("destroy", ...args);
|
|
1637
|
-
}
|
|
1638
|
-
destroySoon(...args) {
|
|
1639
|
-
return this.#proxy("destroySoon", ...args);
|
|
1640
|
-
}
|
|
1641
|
-
close(...args) {
|
|
1642
|
-
return this.#proxy("close", ...args);
|
|
1643
|
-
}
|
|
1644
|
-
};
|
|
1645
|
-
module2.exports = MuteStream;
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
|
-
|
|
1649
|
-
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js
|
|
1650
|
-
var require_signals = __commonJS({
|
|
1651
|
-
"node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js"(exports2) {
|
|
1652
|
-
"use strict";
|
|
1653
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1654
|
-
exports2.signals = void 0;
|
|
1655
|
-
exports2.signals = [];
|
|
1656
|
-
exports2.signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1657
|
-
if (process.platform !== "win32") {
|
|
1658
|
-
exports2.signals.push(
|
|
1659
|
-
"SIGALRM",
|
|
1660
|
-
"SIGABRT",
|
|
1661
|
-
"SIGVTALRM",
|
|
1662
|
-
"SIGXCPU",
|
|
1663
|
-
"SIGXFSZ",
|
|
1664
|
-
"SIGUSR2",
|
|
1665
|
-
"SIGTRAP",
|
|
1666
|
-
"SIGSYS",
|
|
1667
|
-
"SIGQUIT",
|
|
1668
|
-
"SIGIOT"
|
|
1669
|
-
// should detect profiler and enable/disable accordingly.
|
|
1670
|
-
// see #21
|
|
1671
|
-
// 'SIGPROF'
|
|
1672
|
-
);
|
|
1673
|
-
}
|
|
1674
|
-
if (process.platform === "linux") {
|
|
1675
|
-
exports2.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
});
|
|
1679
|
-
|
|
1680
|
-
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js
|
|
1681
|
-
var require_cjs = __commonJS({
|
|
1682
|
-
"node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
|
|
1683
|
-
"use strict";
|
|
1684
|
-
var _a;
|
|
1685
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1686
|
-
exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
|
|
1687
|
-
var signals_js_1 = require_signals();
|
|
1688
|
-
Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
1689
|
-
return signals_js_1.signals;
|
|
1690
|
-
}, "get") });
|
|
1691
|
-
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");
|
|
1692
|
-
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
1693
|
-
var global = globalThis;
|
|
1694
|
-
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
1695
|
-
var Emitter = class {
|
|
1696
|
-
static {
|
|
1697
|
-
__name(this, "Emitter");
|
|
1698
|
-
}
|
|
1699
|
-
emitted = {
|
|
1700
|
-
afterExit: false,
|
|
1701
|
-
exit: false
|
|
1702
|
-
};
|
|
1703
|
-
listeners = {
|
|
1704
|
-
afterExit: [],
|
|
1705
|
-
exit: []
|
|
1706
|
-
};
|
|
1707
|
-
count = 0;
|
|
1708
|
-
id = Math.random();
|
|
1709
|
-
constructor() {
|
|
1710
|
-
if (global[kExitEmitter]) {
|
|
1711
|
-
return global[kExitEmitter];
|
|
1712
|
-
}
|
|
1713
|
-
ObjectDefineProperty(global, kExitEmitter, {
|
|
1714
|
-
value: this,
|
|
1715
|
-
writable: false,
|
|
1716
|
-
enumerable: false,
|
|
1717
|
-
configurable: false
|
|
1718
|
-
});
|
|
1719
|
-
}
|
|
1720
|
-
on(ev, fn) {
|
|
1721
|
-
this.listeners[ev].push(fn);
|
|
1722
|
-
}
|
|
1723
|
-
removeListener(ev, fn) {
|
|
1724
|
-
const list = this.listeners[ev];
|
|
1725
|
-
const i = list.indexOf(fn);
|
|
1726
|
-
if (i === -1) {
|
|
1727
|
-
return;
|
|
1728
|
-
}
|
|
1729
|
-
if (i === 0 && list.length === 1) {
|
|
1730
|
-
list.length = 0;
|
|
1731
|
-
} else {
|
|
1732
|
-
list.splice(i, 1);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
emit(ev, code, signal) {
|
|
1736
|
-
if (this.emitted[ev]) {
|
|
1737
|
-
return false;
|
|
1738
|
-
}
|
|
1739
|
-
this.emitted[ev] = true;
|
|
1740
|
-
let ret = false;
|
|
1741
|
-
for (const fn of this.listeners[ev]) {
|
|
1742
|
-
ret = fn(code, signal) === true || ret;
|
|
1743
|
-
}
|
|
1744
|
-
if (ev === "exit") {
|
|
1745
|
-
ret = this.emit("afterExit", code, signal) || ret;
|
|
1746
|
-
}
|
|
1747
|
-
return ret;
|
|
1748
|
-
}
|
|
1749
|
-
};
|
|
1750
|
-
var SignalExitBase = class {
|
|
1751
|
-
static {
|
|
1752
|
-
__name(this, "SignalExitBase");
|
|
1753
|
-
}
|
|
1754
|
-
};
|
|
1755
|
-
var signalExitWrap = /* @__PURE__ */ __name((handler) => {
|
|
1756
|
-
return {
|
|
1757
|
-
onExit(cb, opts) {
|
|
1758
|
-
return handler.onExit(cb, opts);
|
|
1759
|
-
},
|
|
1760
|
-
load() {
|
|
1761
|
-
return handler.load();
|
|
1762
|
-
},
|
|
1763
|
-
unload() {
|
|
1764
|
-
return handler.unload();
|
|
1765
|
-
}
|
|
1766
|
-
};
|
|
1767
|
-
}, "signalExitWrap");
|
|
1768
|
-
var SignalExitFallback = class extends SignalExitBase {
|
|
1769
|
-
static {
|
|
1770
|
-
__name(this, "SignalExitFallback");
|
|
1771
|
-
}
|
|
1772
|
-
onExit() {
|
|
1773
|
-
return () => {
|
|
1774
|
-
};
|
|
1775
|
-
}
|
|
1776
|
-
load() {
|
|
1777
|
-
}
|
|
1778
|
-
unload() {
|
|
1779
|
-
}
|
|
1780
|
-
};
|
|
1781
|
-
var SignalExit = class extends SignalExitBase {
|
|
1782
|
-
static {
|
|
1783
|
-
__name(this, "SignalExit");
|
|
1784
|
-
}
|
|
1785
|
-
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
1786
|
-
// so use a supported signal instead
|
|
1787
|
-
/* c8 ignore start */
|
|
1788
|
-
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
1789
|
-
/* c8 ignore stop */
|
|
1790
|
-
#emitter = new Emitter();
|
|
1791
|
-
#process;
|
|
1792
|
-
#originalProcessEmit;
|
|
1793
|
-
#originalProcessReallyExit;
|
|
1794
|
-
#sigListeners = {};
|
|
1795
|
-
#loaded = false;
|
|
1796
|
-
constructor(process3) {
|
|
1797
|
-
super();
|
|
1798
|
-
this.#process = process3;
|
|
1799
|
-
this.#sigListeners = {};
|
|
1800
|
-
for (const sig of signals_js_1.signals) {
|
|
1801
|
-
this.#sigListeners[sig] = () => {
|
|
1802
|
-
const listeners = this.#process.listeners(sig);
|
|
1803
|
-
let { count } = this.#emitter;
|
|
1804
|
-
const p = process3;
|
|
1805
|
-
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
1806
|
-
count += p.__signal_exit_emitter__.count;
|
|
1807
|
-
}
|
|
1808
|
-
if (listeners.length === count) {
|
|
1809
|
-
this.unload();
|
|
1810
|
-
const ret = this.#emitter.emit("exit", null, sig);
|
|
1811
|
-
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
1812
|
-
if (!ret)
|
|
1813
|
-
process3.kill(process3.pid, s);
|
|
1814
|
-
}
|
|
1815
|
-
};
|
|
1816
|
-
}
|
|
1817
|
-
this.#originalProcessReallyExit = process3.reallyExit;
|
|
1818
|
-
this.#originalProcessEmit = process3.emit;
|
|
1819
|
-
}
|
|
1820
|
-
onExit(cb, opts) {
|
|
1821
|
-
if (!processOk(this.#process)) {
|
|
1822
|
-
return () => {
|
|
1823
|
-
};
|
|
1824
|
-
}
|
|
1825
|
-
if (this.#loaded === false) {
|
|
1826
|
-
this.load();
|
|
1827
|
-
}
|
|
1828
|
-
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
1829
|
-
this.#emitter.on(ev, cb);
|
|
1830
|
-
return () => {
|
|
1831
|
-
this.#emitter.removeListener(ev, cb);
|
|
1832
|
-
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
1833
|
-
this.unload();
|
|
1834
|
-
}
|
|
1835
|
-
};
|
|
1836
|
-
}
|
|
1837
|
-
load() {
|
|
1838
|
-
if (this.#loaded) {
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
this.#loaded = true;
|
|
1842
|
-
this.#emitter.count += 1;
|
|
1843
|
-
for (const sig of signals_js_1.signals) {
|
|
1844
|
-
try {
|
|
1845
|
-
const fn = this.#sigListeners[sig];
|
|
1846
|
-
if (fn)
|
|
1847
|
-
this.#process.on(sig, fn);
|
|
1848
|
-
} catch (_) {
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
this.#process.emit = (ev, ...a) => {
|
|
1852
|
-
return this.#processEmit(ev, ...a);
|
|
1853
|
-
};
|
|
1854
|
-
this.#process.reallyExit = (code) => {
|
|
1855
|
-
return this.#processReallyExit(code);
|
|
1856
|
-
};
|
|
1857
|
-
}
|
|
1858
|
-
unload() {
|
|
1859
|
-
if (!this.#loaded) {
|
|
1860
|
-
return;
|
|
1861
|
-
}
|
|
1862
|
-
this.#loaded = false;
|
|
1863
|
-
signals_js_1.signals.forEach((sig) => {
|
|
1864
|
-
const listener = this.#sigListeners[sig];
|
|
1865
|
-
if (!listener) {
|
|
1866
|
-
throw new Error("Listener not defined for signal: " + sig);
|
|
1867
|
-
}
|
|
1868
|
-
try {
|
|
1869
|
-
this.#process.removeListener(sig, listener);
|
|
1870
|
-
} catch (_) {
|
|
1871
|
-
}
|
|
1872
|
-
});
|
|
1873
|
-
this.#process.emit = this.#originalProcessEmit;
|
|
1874
|
-
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
1875
|
-
this.#emitter.count -= 1;
|
|
1876
|
-
}
|
|
1877
|
-
#processReallyExit(code) {
|
|
1878
|
-
if (!processOk(this.#process)) {
|
|
1879
|
-
return 0;
|
|
1880
|
-
}
|
|
1881
|
-
this.#process.exitCode = code || 0;
|
|
1882
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1883
|
-
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
1884
|
-
}
|
|
1885
|
-
#processEmit(ev, ...args) {
|
|
1886
|
-
const og = this.#originalProcessEmit;
|
|
1887
|
-
if (ev === "exit" && processOk(this.#process)) {
|
|
1888
|
-
if (typeof args[0] === "number") {
|
|
1889
|
-
this.#process.exitCode = args[0];
|
|
1890
|
-
}
|
|
1891
|
-
const ret = og.call(this.#process, ev, ...args);
|
|
1892
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1893
|
-
return ret;
|
|
1894
|
-
} else {
|
|
1895
|
-
return og.call(this.#process, ev, ...args);
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
};
|
|
1899
|
-
var process2 = globalThis.process;
|
|
1900
|
-
_a = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback()), /**
|
|
1901
|
-
* Called when the process is exiting, whether via signal, explicit
|
|
1902
|
-
* exit, or running out of stuff to do.
|
|
1903
|
-
*
|
|
1904
|
-
* If the global process object is not suitable for instrumentation,
|
|
1905
|
-
* then this will be a no-op.
|
|
1906
|
-
*
|
|
1907
|
-
* Returns a function that may be used to unload signal-exit.
|
|
1908
|
-
*/
|
|
1909
|
-
exports2.onExit = _a.onExit, /**
|
|
1910
|
-
* Load the listeners. Likely you never need to call this, unless
|
|
1911
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
1912
|
-
* Mostly exposed for the benefit of testing.
|
|
1913
|
-
*
|
|
1914
|
-
* @internal
|
|
1915
|
-
*/
|
|
1916
|
-
exports2.load = _a.load, /**
|
|
1917
|
-
* Unload the listeners. Likely you never need to call this, unless
|
|
1918
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
1919
|
-
* Mostly exposed for the benefit of testing.
|
|
1920
|
-
*
|
|
1921
|
-
* @internal
|
|
1922
|
-
*/
|
|
1923
|
-
exports2.unload = _a.unload;
|
|
1924
|
-
}
|
|
1925
|
-
});
|
|
1926
|
-
|
|
1927
|
-
// node_modules/.pnpm/@inquirer+ansi@1.0.1/node_modules/@inquirer/ansi/dist/commonjs/index.js
|
|
1928
|
-
var require_commonjs2 = __commonJS({
|
|
1929
|
-
"node_modules/.pnpm/@inquirer+ansi@1.0.1/node_modules/@inquirer/ansi/dist/commonjs/index.js"(exports2) {
|
|
1930
|
-
"use strict";
|
|
1931
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1932
|
-
exports2.eraseLines = exports2.cursorTo = exports2.cursorDown = exports2.cursorUp = exports2.cursorShow = exports2.cursorHide = exports2.cursorLeft = void 0;
|
|
1933
|
-
var ESC = "\x1B[";
|
|
1934
|
-
exports2.cursorLeft = ESC + "G";
|
|
1935
|
-
exports2.cursorHide = ESC + "?25l";
|
|
1936
|
-
exports2.cursorShow = ESC + "?25h";
|
|
1937
|
-
var cursorUp = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}A` : "", "cursorUp");
|
|
1938
|
-
exports2.cursorUp = cursorUp;
|
|
1939
|
-
var cursorDown = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}B` : "", "cursorDown");
|
|
1940
|
-
exports2.cursorDown = cursorDown;
|
|
1941
|
-
var cursorTo = /* @__PURE__ */ __name((x, y) => {
|
|
1942
|
-
if (typeof y === "number" && !Number.isNaN(y)) {
|
|
1943
|
-
return `${ESC}${y + 1};${x + 1}H`;
|
|
1944
|
-
}
|
|
1945
|
-
return `${ESC}${x + 1}G`;
|
|
1946
|
-
}, "cursorTo");
|
|
1947
|
-
exports2.cursorTo = cursorTo;
|
|
1948
|
-
var eraseLine = ESC + "2K";
|
|
1949
|
-
var eraseLines = /* @__PURE__ */ __name((lines) => lines > 0 ? (eraseLine + (0, exports2.cursorUp)(1)).repeat(lines - 1) + eraseLine + exports2.cursorLeft : "", "eraseLines");
|
|
1950
|
-
exports2.eraseLines = eraseLines;
|
|
1951
|
-
}
|
|
1952
|
-
});
|
|
1953
|
-
|
|
1954
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js
|
|
1955
|
-
var require_screen_manager = __commonJS({
|
|
1956
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js"(exports2) {
|
|
1957
|
-
"use strict";
|
|
1958
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1959
|
-
var node_util_1 = require("node:util");
|
|
1960
|
-
var utils_ts_1 = require_utils();
|
|
1961
|
-
var ansi_1 = require_commonjs2();
|
|
1962
|
-
var height = /* @__PURE__ */ __name((content) => content.split("\n").length, "height");
|
|
1963
|
-
var lastLine = /* @__PURE__ */ __name((content) => content.split("\n").pop() ?? "", "lastLine");
|
|
1964
|
-
var ScreenManager = class {
|
|
1965
|
-
static {
|
|
1966
|
-
__name(this, "ScreenManager");
|
|
1967
|
-
}
|
|
1968
|
-
// These variables are keeping information to allow correct prompt re-rendering
|
|
1969
|
-
height = 0;
|
|
1970
|
-
extraLinesUnderPrompt = 0;
|
|
1971
|
-
cursorPos;
|
|
1972
|
-
rl;
|
|
1973
|
-
constructor(rl) {
|
|
1974
|
-
this.rl = rl;
|
|
1975
|
-
this.cursorPos = rl.getCursorPos();
|
|
1976
|
-
}
|
|
1977
|
-
write(content) {
|
|
1978
|
-
this.rl.output.unmute();
|
|
1979
|
-
this.rl.output.write(content);
|
|
1980
|
-
this.rl.output.mute();
|
|
1981
|
-
}
|
|
1982
|
-
render(content, bottomContent = "") {
|
|
1983
|
-
const promptLine = lastLine(content);
|
|
1984
|
-
const rawPromptLine = (0, node_util_1.stripVTControlCharacters)(promptLine);
|
|
1985
|
-
let prompt = rawPromptLine;
|
|
1986
|
-
if (this.rl.line.length > 0) {
|
|
1987
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
|
1988
|
-
}
|
|
1989
|
-
this.rl.setPrompt(prompt);
|
|
1990
|
-
this.cursorPos = this.rl.getCursorPos();
|
|
1991
|
-
const width = (0, utils_ts_1.readlineWidth)();
|
|
1992
|
-
content = (0, utils_ts_1.breakLines)(content, width);
|
|
1993
|
-
bottomContent = (0, utils_ts_1.breakLines)(bottomContent, width);
|
|
1994
|
-
if (rawPromptLine.length % width === 0) {
|
|
1995
|
-
content += "\n";
|
|
1996
|
-
}
|
|
1997
|
-
let output = content + (bottomContent ? "\n" + bottomContent : "");
|
|
1998
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
1999
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
|
|
2000
|
-
if (bottomContentHeight > 0)
|
|
2001
|
-
output += (0, ansi_1.cursorUp)(bottomContentHeight);
|
|
2002
|
-
output += (0, ansi_1.cursorTo)(this.cursorPos.cols);
|
|
2003
|
-
this.write((0, ansi_1.cursorDown)(this.extraLinesUnderPrompt) + (0, ansi_1.eraseLines)(this.height) + output);
|
|
2004
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
2005
|
-
this.height = height(output);
|
|
2006
|
-
}
|
|
2007
|
-
checkCursorPos() {
|
|
2008
|
-
const cursorPos = this.rl.getCursorPos();
|
|
2009
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
2010
|
-
this.write((0, ansi_1.cursorTo)(cursorPos.cols));
|
|
2011
|
-
this.cursorPos = cursorPos;
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
done({ clearContent }) {
|
|
2015
|
-
this.rl.setPrompt("");
|
|
2016
|
-
let output = (0, ansi_1.cursorDown)(this.extraLinesUnderPrompt);
|
|
2017
|
-
output += clearContent ? (0, ansi_1.eraseLines)(this.height) : "\n";
|
|
2018
|
-
output += ansi_1.cursorShow;
|
|
2019
|
-
this.write(output);
|
|
2020
|
-
this.rl.close();
|
|
2021
|
-
}
|
|
2022
|
-
};
|
|
2023
|
-
exports2.default = ScreenManager;
|
|
2024
|
-
}
|
|
2025
|
-
});
|
|
2026
|
-
|
|
2027
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js
|
|
2028
|
-
var require_promise_polyfill = __commonJS({
|
|
2029
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js"(exports2) {
|
|
2030
|
-
"use strict";
|
|
2031
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2032
|
-
exports2.PromisePolyfill = void 0;
|
|
2033
|
-
var PromisePolyfill = class extends Promise {
|
|
2034
|
-
static {
|
|
2035
|
-
__name(this, "PromisePolyfill");
|
|
2036
|
-
}
|
|
2037
|
-
// Available starting from Node 22
|
|
2038
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
|
|
2039
|
-
static withResolver() {
|
|
2040
|
-
let resolve;
|
|
2041
|
-
let reject;
|
|
2042
|
-
const promise = new Promise((res, rej) => {
|
|
2043
|
-
resolve = res;
|
|
2044
|
-
reject = rej;
|
|
2045
|
-
});
|
|
2046
|
-
return { promise, resolve, reject };
|
|
2047
|
-
}
|
|
2048
|
-
};
|
|
2049
|
-
exports2.PromisePolyfill = PromisePolyfill;
|
|
2050
|
-
}
|
|
2051
|
-
});
|
|
2052
|
-
|
|
2053
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js
|
|
2054
|
-
var require_create_prompt = __commonJS({
|
|
2055
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js"(exports2) {
|
|
2056
|
-
"use strict";
|
|
2057
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2058
|
-
if (k2 === void 0) k2 = k;
|
|
2059
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2060
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2061
|
-
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2062
|
-
return m[k];
|
|
2063
|
-
}, "get") };
|
|
2064
|
-
}
|
|
2065
|
-
Object.defineProperty(o, k2, desc);
|
|
2066
|
-
}) : (function(o, m, k, k2) {
|
|
2067
|
-
if (k2 === void 0) k2 = k;
|
|
2068
|
-
o[k2] = m[k];
|
|
2069
|
-
}));
|
|
2070
|
-
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2071
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2072
|
-
}) : function(o, v) {
|
|
2073
|
-
o["default"] = v;
|
|
2074
|
-
});
|
|
2075
|
-
var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
2076
|
-
var ownKeys = /* @__PURE__ */ __name(function(o) {
|
|
2077
|
-
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
2078
|
-
var ar = [];
|
|
2079
|
-
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
2080
|
-
return ar;
|
|
2081
|
-
};
|
|
2082
|
-
return ownKeys(o);
|
|
2083
|
-
}, "ownKeys");
|
|
2084
|
-
return function(mod) {
|
|
2085
|
-
if (mod && mod.__esModule) return mod;
|
|
2086
|
-
var result = {};
|
|
2087
|
-
if (mod != null) {
|
|
2088
|
-
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2089
|
-
}
|
|
2090
|
-
__setModuleDefault(result, mod);
|
|
2091
|
-
return result;
|
|
2092
|
-
};
|
|
2093
|
-
})();
|
|
2094
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2095
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2096
|
-
};
|
|
2097
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2098
|
-
exports2.createPrompt = createPrompt;
|
|
2099
|
-
var readline = __importStar(require("node:readline"));
|
|
2100
|
-
var node_async_hooks_1 = require("node:async_hooks");
|
|
2101
|
-
var mute_stream_1 = __importDefault(require_lib());
|
|
2102
|
-
var signal_exit_1 = require_cjs();
|
|
2103
|
-
var screen_manager_ts_1 = __importDefault(require_screen_manager());
|
|
2104
|
-
var promise_polyfill_ts_1 = require_promise_polyfill();
|
|
2105
|
-
var hook_engine_ts_1 = require_hook_engine();
|
|
2106
|
-
var errors_ts_1 = require_errors();
|
|
2107
|
-
function getCallSites() {
|
|
2108
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
|
2109
|
-
let result = [];
|
|
2110
|
-
try {
|
|
2111
|
-
Error.prepareStackTrace = (_, callSites) => {
|
|
2112
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
|
2113
|
-
result = callSitesWithoutCurrent;
|
|
2114
|
-
return callSitesWithoutCurrent;
|
|
2115
|
-
};
|
|
2116
|
-
new Error().stack;
|
|
2117
|
-
} catch {
|
|
2118
|
-
return result;
|
|
2119
|
-
}
|
|
2120
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
|
2121
|
-
return result;
|
|
2122
|
-
}
|
|
2123
|
-
__name(getCallSites, "getCallSites");
|
|
2124
|
-
function createPrompt(view) {
|
|
2125
|
-
const callSites = getCallSites();
|
|
2126
|
-
const prompt = /* @__PURE__ */ __name((config, context = {}) => {
|
|
2127
|
-
const { input = process.stdin, signal } = context;
|
|
2128
|
-
const cleanups = /* @__PURE__ */ new Set();
|
|
2129
|
-
const output = new mute_stream_1.default();
|
|
2130
|
-
output.pipe(context.output ?? process.stdout);
|
|
2131
|
-
const rl = readline.createInterface({
|
|
2132
|
-
terminal: true,
|
|
2133
|
-
input,
|
|
2134
|
-
output
|
|
2135
|
-
});
|
|
2136
|
-
const screen = new screen_manager_ts_1.default(rl);
|
|
2137
|
-
const { promise, resolve, reject } = promise_polyfill_ts_1.PromisePolyfill.withResolver();
|
|
2138
|
-
const cancel = /* @__PURE__ */ __name(() => reject(new errors_ts_1.CancelPromptError()), "cancel");
|
|
2139
|
-
if (signal) {
|
|
2140
|
-
const abort = /* @__PURE__ */ __name(() => reject(new errors_ts_1.AbortPromptError({ cause: signal.reason })), "abort");
|
|
2141
|
-
if (signal.aborted) {
|
|
2142
|
-
abort();
|
|
2143
|
-
return Object.assign(promise, { cancel });
|
|
2144
|
-
}
|
|
2145
|
-
signal.addEventListener("abort", abort);
|
|
2146
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
2147
|
-
}
|
|
2148
|
-
cleanups.add((0, signal_exit_1.onExit)((code, signal2) => {
|
|
2149
|
-
reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
|
|
2150
|
-
}));
|
|
2151
|
-
const sigint = /* @__PURE__ */ __name(() => reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with SIGINT`)), "sigint");
|
|
2152
|
-
rl.on("SIGINT", sigint);
|
|
2153
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
2154
|
-
const checkCursorPos = /* @__PURE__ */ __name(() => screen.checkCursorPos(), "checkCursorPos");
|
|
2155
|
-
rl.input.on("keypress", checkCursorPos);
|
|
2156
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
2157
|
-
return (0, hook_engine_ts_1.withHooks)(rl, (cycle) => {
|
|
2158
|
-
const hooksCleanup = node_async_hooks_1.AsyncResource.bind(() => hook_engine_ts_1.effectScheduler.clearAll());
|
|
2159
|
-
rl.on("close", hooksCleanup);
|
|
2160
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
2161
|
-
cycle(() => {
|
|
2162
|
-
try {
|
|
2163
|
-
const nextView = view(config, (value) => {
|
|
2164
|
-
setImmediate(() => resolve(value));
|
|
2165
|
-
});
|
|
2166
|
-
if (nextView === void 0) {
|
|
2167
|
-
const callerFilename = callSites[1]?.getFileName();
|
|
2168
|
-
throw new Error(`Prompt functions must return a string.
|
|
2169
|
-
at ${callerFilename}`);
|
|
2170
|
-
}
|
|
2171
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
2172
|
-
screen.render(content, bottomContent);
|
|
2173
|
-
hook_engine_ts_1.effectScheduler.run();
|
|
2174
|
-
} catch (error) {
|
|
2175
|
-
reject(error);
|
|
2176
|
-
}
|
|
2177
|
-
});
|
|
2178
|
-
return Object.assign(promise.then((answer) => {
|
|
2179
|
-
hook_engine_ts_1.effectScheduler.clearAll();
|
|
2180
|
-
return answer;
|
|
2181
|
-
}, (error) => {
|
|
2182
|
-
hook_engine_ts_1.effectScheduler.clearAll();
|
|
2183
|
-
throw error;
|
|
2184
|
-
}).finally(() => {
|
|
2185
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
2186
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
2187
|
-
output.end();
|
|
2188
|
-
}).then(() => promise), { cancel });
|
|
2189
|
-
});
|
|
2190
|
-
}, "prompt");
|
|
2191
|
-
return prompt;
|
|
2192
|
-
}
|
|
2193
|
-
__name(createPrompt, "createPrompt");
|
|
2194
|
-
}
|
|
2195
|
-
});
|
|
2196
|
-
|
|
2197
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js
|
|
2198
|
-
var require_Separator = __commonJS({
|
|
2199
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js"(exports2) {
|
|
2200
|
-
"use strict";
|
|
2201
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2202
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2203
|
-
};
|
|
2204
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2205
|
-
exports2.Separator = void 0;
|
|
2206
|
-
var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
|
|
2207
|
-
var figures_1 = __importDefault(require_commonjs());
|
|
2208
|
-
var Separator = class {
|
|
2209
|
-
static {
|
|
2210
|
-
__name(this, "Separator");
|
|
2211
|
-
}
|
|
2212
|
-
separator = yoctocolors_cjs_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line));
|
|
2213
|
-
type = "separator";
|
|
2214
|
-
constructor(separator) {
|
|
2215
|
-
if (separator) {
|
|
2216
|
-
this.separator = separator;
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
static isSeparator(choice) {
|
|
2220
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
2221
|
-
}
|
|
2222
|
-
};
|
|
2223
|
-
exports2.Separator = Separator;
|
|
2224
|
-
}
|
|
2225
|
-
});
|
|
2226
|
-
|
|
2227
|
-
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js
|
|
2228
|
-
var require_commonjs3 = __commonJS({
|
|
2229
|
-
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js"(exports2) {
|
|
2230
|
-
"use strict";
|
|
2231
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2232
|
-
if (k2 === void 0) k2 = k;
|
|
2233
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2234
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2235
|
-
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2236
|
-
return m[k];
|
|
2237
|
-
}, "get") };
|
|
2238
|
-
}
|
|
2239
|
-
Object.defineProperty(o, k2, desc);
|
|
2240
|
-
}) : (function(o, m, k, k2) {
|
|
2241
|
-
if (k2 === void 0) k2 = k;
|
|
2242
|
-
o[k2] = m[k];
|
|
2243
|
-
}));
|
|
2244
|
-
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
2245
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
2246
|
-
};
|
|
2247
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2248
|
-
exports2.Separator = exports2.createPrompt = exports2.usePagination = exports2.makeTheme = exports2.useKeypress = exports2.useRef = exports2.useMemo = exports2.useEffect = exports2.useState = exports2.usePrefix = exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
|
|
2249
|
-
var key_ts_1 = require_key();
|
|
2250
|
-
Object.defineProperty(exports2, "isUpKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2251
|
-
return key_ts_1.isUpKey;
|
|
2252
|
-
}, "get") });
|
|
2253
|
-
Object.defineProperty(exports2, "isDownKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2254
|
-
return key_ts_1.isDownKey;
|
|
2255
|
-
}, "get") });
|
|
2256
|
-
Object.defineProperty(exports2, "isSpaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2257
|
-
return key_ts_1.isSpaceKey;
|
|
2258
|
-
}, "get") });
|
|
2259
|
-
Object.defineProperty(exports2, "isBackspaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2260
|
-
return key_ts_1.isBackspaceKey;
|
|
2261
|
-
}, "get") });
|
|
2262
|
-
Object.defineProperty(exports2, "isTabKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2263
|
-
return key_ts_1.isTabKey;
|
|
2264
|
-
}, "get") });
|
|
2265
|
-
Object.defineProperty(exports2, "isNumberKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2266
|
-
return key_ts_1.isNumberKey;
|
|
2267
|
-
}, "get") });
|
|
2268
|
-
Object.defineProperty(exports2, "isEnterKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2269
|
-
return key_ts_1.isEnterKey;
|
|
2270
|
-
}, "get") });
|
|
2271
|
-
__exportStar(require_errors(), exports2);
|
|
2272
|
-
var use_prefix_ts_1 = require_use_prefix();
|
|
2273
|
-
Object.defineProperty(exports2, "usePrefix", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2274
|
-
return use_prefix_ts_1.usePrefix;
|
|
2275
|
-
}, "get") });
|
|
2276
|
-
var use_state_ts_1 = require_use_state();
|
|
2277
|
-
Object.defineProperty(exports2, "useState", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2278
|
-
return use_state_ts_1.useState;
|
|
2279
|
-
}, "get") });
|
|
2280
|
-
var use_effect_ts_1 = require_use_effect();
|
|
2281
|
-
Object.defineProperty(exports2, "useEffect", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2282
|
-
return use_effect_ts_1.useEffect;
|
|
2283
|
-
}, "get") });
|
|
2284
|
-
var use_memo_ts_1 = require_use_memo();
|
|
2285
|
-
Object.defineProperty(exports2, "useMemo", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2286
|
-
return use_memo_ts_1.useMemo;
|
|
2287
|
-
}, "get") });
|
|
2288
|
-
var use_ref_ts_1 = require_use_ref();
|
|
2289
|
-
Object.defineProperty(exports2, "useRef", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2290
|
-
return use_ref_ts_1.useRef;
|
|
2291
|
-
}, "get") });
|
|
2292
|
-
var use_keypress_ts_1 = require_use_keypress();
|
|
2293
|
-
Object.defineProperty(exports2, "useKeypress", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2294
|
-
return use_keypress_ts_1.useKeypress;
|
|
2295
|
-
}, "get") });
|
|
2296
|
-
var make_theme_ts_1 = require_make_theme();
|
|
2297
|
-
Object.defineProperty(exports2, "makeTheme", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2298
|
-
return make_theme_ts_1.makeTheme;
|
|
2299
|
-
}, "get") });
|
|
2300
|
-
var use_pagination_ts_1 = require_use_pagination();
|
|
2301
|
-
Object.defineProperty(exports2, "usePagination", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2302
|
-
return use_pagination_ts_1.usePagination;
|
|
2303
|
-
}, "get") });
|
|
2304
|
-
var create_prompt_ts_1 = require_create_prompt();
|
|
2305
|
-
Object.defineProperty(exports2, "createPrompt", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2306
|
-
return create_prompt_ts_1.createPrompt;
|
|
2307
|
-
}, "get") });
|
|
2308
|
-
var Separator_ts_1 = require_Separator();
|
|
2309
|
-
Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2310
|
-
return Separator_ts_1.Separator;
|
|
2311
|
-
}, "get") });
|
|
2312
|
-
}
|
|
2313
|
-
});
|
|
2314
|
-
|
|
2315
|
-
// node_modules/.pnpm/@inquirer+input@4.2.2_@types+node@24.9.2/node_modules/@inquirer/input/dist/commonjs/index.js
|
|
2316
|
-
var require_commonjs4 = __commonJS({
|
|
2317
|
-
"node_modules/.pnpm/@inquirer+input@4.2.2_@types+node@24.9.2/node_modules/@inquirer/input/dist/commonjs/index.js"(exports2) {
|
|
2318
|
-
"use strict";
|
|
2319
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2320
|
-
var core_1 = require_commonjs3();
|
|
2321
|
-
var inputTheme = {
|
|
2322
|
-
validationFailureMode: "keep"
|
|
2323
|
-
};
|
|
2324
|
-
exports2.default = (0, core_1.createPrompt)((config, done) => {
|
|
2325
|
-
const { required, validate: validate2 = /* @__PURE__ */ __name(() => true, "validate"), prefill = "tab" } = config;
|
|
2326
|
-
const theme = (0, core_1.makeTheme)(inputTheme, config.theme);
|
|
2327
|
-
const [status, setStatus] = (0, core_1.useState)("idle");
|
|
2328
|
-
const [defaultValue = "", setDefaultValue] = (0, core_1.useState)(config.default);
|
|
2329
|
-
const [errorMsg, setError] = (0, core_1.useState)();
|
|
2330
|
-
const [value, setValue] = (0, core_1.useState)("");
|
|
2331
|
-
const prefix = (0, core_1.usePrefix)({ status, theme });
|
|
2332
|
-
(0, core_1.useKeypress)(async (key, rl) => {
|
|
2333
|
-
if (status !== "idle") {
|
|
2334
|
-
return;
|
|
2335
|
-
}
|
|
2336
|
-
if ((0, core_1.isEnterKey)(key)) {
|
|
2337
|
-
const answer = value || defaultValue;
|
|
2338
|
-
setStatus("loading");
|
|
2339
|
-
const isValid = required && !answer ? "You must provide a value" : await validate2(answer);
|
|
2340
|
-
if (isValid === true) {
|
|
2341
|
-
setValue(answer);
|
|
2342
|
-
setStatus("done");
|
|
2343
|
-
done(answer);
|
|
2344
|
-
} else {
|
|
2345
|
-
if (theme.validationFailureMode === "clear") {
|
|
2346
|
-
setValue("");
|
|
2347
|
-
} else {
|
|
2348
|
-
rl.write(value);
|
|
2349
|
-
}
|
|
2350
|
-
setError(isValid || "You must provide a valid value");
|
|
2351
|
-
setStatus("idle");
|
|
2352
|
-
}
|
|
2353
|
-
} else if ((0, core_1.isBackspaceKey)(key) && !value) {
|
|
2354
|
-
setDefaultValue(void 0);
|
|
2355
|
-
} else if ((0, core_1.isTabKey)(key) && !value) {
|
|
2356
|
-
setDefaultValue(void 0);
|
|
2357
|
-
rl.clearLine(0);
|
|
2358
|
-
rl.write(defaultValue);
|
|
2359
|
-
setValue(defaultValue);
|
|
2360
|
-
} else {
|
|
2361
|
-
setValue(rl.line);
|
|
2362
|
-
setError(void 0);
|
|
2363
|
-
}
|
|
2364
|
-
});
|
|
2365
|
-
(0, core_1.useEffect)((rl) => {
|
|
2366
|
-
if (prefill === "editable" && defaultValue) {
|
|
2367
|
-
rl.write(defaultValue);
|
|
2368
|
-
setValue(defaultValue);
|
|
2369
|
-
}
|
|
2370
|
-
}, []);
|
|
2371
|
-
const message = theme.style.message(config.message, status);
|
|
2372
|
-
let formattedValue = value;
|
|
2373
|
-
if (typeof config.transformer === "function") {
|
|
2374
|
-
formattedValue = config.transformer(value, { isFinal: status === "done" });
|
|
2375
|
-
} else if (status === "done") {
|
|
2376
|
-
formattedValue = theme.style.answer(value);
|
|
2377
|
-
}
|
|
2378
|
-
let defaultStr;
|
|
2379
|
-
if (defaultValue && status !== "done" && !value) {
|
|
2380
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
|
2381
|
-
}
|
|
2382
|
-
let error = "";
|
|
2383
|
-
if (errorMsg) {
|
|
2384
|
-
error = theme.style.error(errorMsg);
|
|
2385
|
-
}
|
|
2386
|
-
return [
|
|
2387
|
-
[prefix, message, defaultStr, formattedValue].filter((v) => v !== void 0).join(" "),
|
|
2388
|
-
error
|
|
2389
|
-
];
|
|
2390
|
-
});
|
|
2391
|
-
}
|
|
2392
|
-
});
|
|
2393
|
-
|
|
2394
|
-
// src/external/@inquirer/input.js
|
|
2395
|
-
module.exports = require_commonjs4();
|
|
2396
|
-
if (module.exports && module.exports.default && Object.keys(module.exports).length === 1) { module.exports = module.exports.default; }
|
|
3
|
+
// Re-export from external-pack bundle for better deduplication.
|
|
4
|
+
const { input } = require('../external-pack')
|
|
5
|
+
module.exports = input
|