@boses/skillink 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/bin/skillink.d.ts +1 -0
- package/dist/bin/skillink.js +8 -0
- package/dist/chunk-ZEFDUUIX.js +2628 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +64 -0
|
@@ -0,0 +1,2628 @@
|
|
|
1
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
// node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
|
|
38
|
+
import path from "path";
|
|
39
|
+
import { fileURLToPath } from "url";
|
|
40
|
+
var init_esm_shims = __esm({
|
|
41
|
+
"node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
42
|
+
"use strict";
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
47
|
+
var require_cli_width = __commonJS({
|
|
48
|
+
"node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js"(exports, module) {
|
|
49
|
+
"use strict";
|
|
50
|
+
init_esm_shims();
|
|
51
|
+
module.exports = cliWidth2;
|
|
52
|
+
function normalizeOpts(options) {
|
|
53
|
+
const defaultOpts = {
|
|
54
|
+
defaultWidth: 0,
|
|
55
|
+
output: process.stdout,
|
|
56
|
+
tty: __require("tty")
|
|
57
|
+
};
|
|
58
|
+
if (!options) {
|
|
59
|
+
return defaultOpts;
|
|
60
|
+
}
|
|
61
|
+
Object.keys(defaultOpts).forEach(function(key) {
|
|
62
|
+
if (!options[key]) {
|
|
63
|
+
options[key] = defaultOpts[key];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return options;
|
|
67
|
+
}
|
|
68
|
+
function cliWidth2(options) {
|
|
69
|
+
const opts = normalizeOpts(options);
|
|
70
|
+
if (opts.output.getWindowSize) {
|
|
71
|
+
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
72
|
+
}
|
|
73
|
+
if (opts.tty.getWindowSize) {
|
|
74
|
+
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
75
|
+
}
|
|
76
|
+
if (opts.output.columns) {
|
|
77
|
+
return opts.output.columns;
|
|
78
|
+
}
|
|
79
|
+
if (process.env.CLI_WIDTH) {
|
|
80
|
+
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
81
|
+
if (!isNaN(width) && width !== 0) {
|
|
82
|
+
return width;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return opts.defaultWidth;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
|
|
91
|
+
var require_lib = __commonJS({
|
|
92
|
+
"node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js"(exports, module) {
|
|
93
|
+
"use strict";
|
|
94
|
+
init_esm_shims();
|
|
95
|
+
var Stream = __require("stream");
|
|
96
|
+
var MuteStream2 = class extends Stream {
|
|
97
|
+
#isTTY = null;
|
|
98
|
+
constructor(opts = {}) {
|
|
99
|
+
super(opts);
|
|
100
|
+
this.writable = this.readable = true;
|
|
101
|
+
this.muted = false;
|
|
102
|
+
this.on("pipe", this._onpipe);
|
|
103
|
+
this.replace = opts.replace;
|
|
104
|
+
this._prompt = opts.prompt || null;
|
|
105
|
+
this._hadControl = false;
|
|
106
|
+
}
|
|
107
|
+
#destSrc(key, def) {
|
|
108
|
+
if (this._dest) {
|
|
109
|
+
return this._dest[key];
|
|
110
|
+
}
|
|
111
|
+
if (this._src) {
|
|
112
|
+
return this._src[key];
|
|
113
|
+
}
|
|
114
|
+
return def;
|
|
115
|
+
}
|
|
116
|
+
#proxy(method, ...args) {
|
|
117
|
+
if (typeof this._dest?.[method] === "function") {
|
|
118
|
+
this._dest[method](...args);
|
|
119
|
+
}
|
|
120
|
+
if (typeof this._src?.[method] === "function") {
|
|
121
|
+
this._src[method](...args);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
get isTTY() {
|
|
125
|
+
if (this.#isTTY !== null) {
|
|
126
|
+
return this.#isTTY;
|
|
127
|
+
}
|
|
128
|
+
return this.#destSrc("isTTY", false);
|
|
129
|
+
}
|
|
130
|
+
// basically just get replace the getter/setter with a regular value
|
|
131
|
+
set isTTY(val) {
|
|
132
|
+
this.#isTTY = val;
|
|
133
|
+
}
|
|
134
|
+
get rows() {
|
|
135
|
+
return this.#destSrc("rows");
|
|
136
|
+
}
|
|
137
|
+
get columns() {
|
|
138
|
+
return this.#destSrc("columns");
|
|
139
|
+
}
|
|
140
|
+
mute() {
|
|
141
|
+
this.muted = true;
|
|
142
|
+
}
|
|
143
|
+
unmute() {
|
|
144
|
+
this.muted = false;
|
|
145
|
+
}
|
|
146
|
+
_onpipe(src) {
|
|
147
|
+
this._src = src;
|
|
148
|
+
}
|
|
149
|
+
pipe(dest, options) {
|
|
150
|
+
this._dest = dest;
|
|
151
|
+
return super.pipe(dest, options);
|
|
152
|
+
}
|
|
153
|
+
pause() {
|
|
154
|
+
if (this._src) {
|
|
155
|
+
return this._src.pause();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
resume() {
|
|
159
|
+
if (this._src) {
|
|
160
|
+
return this._src.resume();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
write(c) {
|
|
164
|
+
if (this.muted) {
|
|
165
|
+
if (!this.replace) {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
if (c.match(/^\u001b/)) {
|
|
169
|
+
if (c.indexOf(this._prompt) === 0) {
|
|
170
|
+
c = c.slice(this._prompt.length);
|
|
171
|
+
c = c.replace(/./g, this.replace);
|
|
172
|
+
c = this._prompt + c;
|
|
173
|
+
}
|
|
174
|
+
this._hadControl = true;
|
|
175
|
+
return this.emit("data", c);
|
|
176
|
+
} else {
|
|
177
|
+
if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
|
|
178
|
+
this._hadControl = false;
|
|
179
|
+
this.emit("data", this._prompt);
|
|
180
|
+
c = c.slice(this._prompt.length);
|
|
181
|
+
}
|
|
182
|
+
c = c.toString().replace(/./g, this.replace);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
this.emit("data", c);
|
|
186
|
+
}
|
|
187
|
+
end(c) {
|
|
188
|
+
if (this.muted) {
|
|
189
|
+
if (c && this.replace) {
|
|
190
|
+
c = c.toString().replace(/./g, this.replace);
|
|
191
|
+
} else {
|
|
192
|
+
c = null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (c) {
|
|
196
|
+
this.emit("data", c);
|
|
197
|
+
}
|
|
198
|
+
this.emit("end");
|
|
199
|
+
}
|
|
200
|
+
destroy(...args) {
|
|
201
|
+
return this.#proxy("destroy", ...args);
|
|
202
|
+
}
|
|
203
|
+
destroySoon(...args) {
|
|
204
|
+
return this.#proxy("destroySoon", ...args);
|
|
205
|
+
}
|
|
206
|
+
close(...args) {
|
|
207
|
+
return this.#proxy("close", ...args);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
module.exports = MuteStream2;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
215
|
+
var require_picocolors = __commonJS({
|
|
216
|
+
"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
217
|
+
"use strict";
|
|
218
|
+
init_esm_shims();
|
|
219
|
+
var p = process || {};
|
|
220
|
+
var argv = p.argv || [];
|
|
221
|
+
var env = p.env || {};
|
|
222
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
223
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
224
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
225
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
226
|
+
};
|
|
227
|
+
var replaceClose = (string, close, replace, index) => {
|
|
228
|
+
let result = "", cursor = 0;
|
|
229
|
+
do {
|
|
230
|
+
result += string.substring(cursor, index) + replace;
|
|
231
|
+
cursor = index + close.length;
|
|
232
|
+
index = string.indexOf(close, cursor);
|
|
233
|
+
} while (~index);
|
|
234
|
+
return result + string.substring(cursor);
|
|
235
|
+
};
|
|
236
|
+
var createColors = (enabled = isColorSupported) => {
|
|
237
|
+
let f = enabled ? formatter : () => String;
|
|
238
|
+
return {
|
|
239
|
+
isColorSupported: enabled,
|
|
240
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
241
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
242
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
243
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
244
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
245
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
246
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
247
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
248
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
249
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
250
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
251
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
252
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
253
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
254
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
255
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
256
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
257
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
258
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
259
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
260
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
261
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
262
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
263
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
264
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
265
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
266
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
267
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
268
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
269
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
270
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
271
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
272
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
273
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
274
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
275
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
276
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
277
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
278
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
279
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
280
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
module.exports = createColors();
|
|
284
|
+
module.exports.createColors = createColors;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// src/index.ts
|
|
289
|
+
init_esm_shims();
|
|
290
|
+
import { cac } from "cac";
|
|
291
|
+
|
|
292
|
+
// src/commands/init.ts
|
|
293
|
+
init_esm_shims();
|
|
294
|
+
import path2 from "path";
|
|
295
|
+
import fs2 from "fs/promises";
|
|
296
|
+
import { existsSync as existsSync2 } from "fs";
|
|
297
|
+
|
|
298
|
+
// node_modules/.pnpm/@inquirer+prompts@8.2.0_@types+node@25.2.1/node_modules/@inquirer/prompts/dist/index.js
|
|
299
|
+
init_esm_shims();
|
|
300
|
+
|
|
301
|
+
// node_modules/.pnpm/@inquirer+checkbox@5.0.4_@types+node@25.2.1/node_modules/@inquirer/checkbox/dist/index.js
|
|
302
|
+
init_esm_shims();
|
|
303
|
+
|
|
304
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/index.js
|
|
305
|
+
init_esm_shims();
|
|
306
|
+
|
|
307
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/key.js
|
|
308
|
+
init_esm_shims();
|
|
309
|
+
var isUpKey = (key, keybindings = []) => (
|
|
310
|
+
// The up key
|
|
311
|
+
key.name === "up" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
312
|
+
keybindings.includes("vim") && key.name === "k" || // Emacs keybinding: Ctrl+P means "previous" in Emacs navigation conventions
|
|
313
|
+
keybindings.includes("emacs") && key.ctrl && key.name === "p"
|
|
314
|
+
);
|
|
315
|
+
var isDownKey = (key, keybindings = []) => (
|
|
316
|
+
// The down key
|
|
317
|
+
key.name === "down" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
318
|
+
keybindings.includes("vim") && key.name === "j" || // Emacs keybinding: Ctrl+N means "next" in Emacs navigation conventions
|
|
319
|
+
keybindings.includes("emacs") && key.ctrl && key.name === "n"
|
|
320
|
+
);
|
|
321
|
+
var isSpaceKey = (key) => key.name === "space";
|
|
322
|
+
var isTabKey = (key) => key.name === "tab";
|
|
323
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
324
|
+
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
325
|
+
|
|
326
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/errors.js
|
|
327
|
+
init_esm_shims();
|
|
328
|
+
var AbortPromptError = class extends Error {
|
|
329
|
+
name = "AbortPromptError";
|
|
330
|
+
message = "Prompt was aborted";
|
|
331
|
+
constructor(options) {
|
|
332
|
+
super();
|
|
333
|
+
this.cause = options?.cause;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
var CancelPromptError = class extends Error {
|
|
337
|
+
name = "CancelPromptError";
|
|
338
|
+
message = "Prompt was canceled";
|
|
339
|
+
};
|
|
340
|
+
var ExitPromptError = class extends Error {
|
|
341
|
+
name = "ExitPromptError";
|
|
342
|
+
};
|
|
343
|
+
var HookError = class extends Error {
|
|
344
|
+
name = "HookError";
|
|
345
|
+
};
|
|
346
|
+
var ValidationError = class extends Error {
|
|
347
|
+
name = "ValidationError";
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
351
|
+
init_esm_shims();
|
|
352
|
+
|
|
353
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
354
|
+
init_esm_shims();
|
|
355
|
+
import { AsyncResource as AsyncResource2 } from "async_hooks";
|
|
356
|
+
|
|
357
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
358
|
+
init_esm_shims();
|
|
359
|
+
import { AsyncLocalStorage, AsyncResource } from "async_hooks";
|
|
360
|
+
var hookStorage = new AsyncLocalStorage();
|
|
361
|
+
function createStore(rl) {
|
|
362
|
+
const store = {
|
|
363
|
+
rl,
|
|
364
|
+
hooks: [],
|
|
365
|
+
hooksCleanup: [],
|
|
366
|
+
hooksEffect: [],
|
|
367
|
+
index: 0,
|
|
368
|
+
handleChange() {
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
return store;
|
|
372
|
+
}
|
|
373
|
+
function withHooks(rl, cb) {
|
|
374
|
+
const store = createStore(rl);
|
|
375
|
+
return hookStorage.run(store, () => {
|
|
376
|
+
function cycle(render) {
|
|
377
|
+
store.handleChange = () => {
|
|
378
|
+
store.index = 0;
|
|
379
|
+
render();
|
|
380
|
+
};
|
|
381
|
+
store.handleChange();
|
|
382
|
+
}
|
|
383
|
+
return cb(cycle);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
function getStore() {
|
|
387
|
+
const store = hookStorage.getStore();
|
|
388
|
+
if (!store) {
|
|
389
|
+
throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
|
|
390
|
+
}
|
|
391
|
+
return store;
|
|
392
|
+
}
|
|
393
|
+
function readline() {
|
|
394
|
+
return getStore().rl;
|
|
395
|
+
}
|
|
396
|
+
function withUpdates(fn) {
|
|
397
|
+
const wrapped = (...args) => {
|
|
398
|
+
const store = getStore();
|
|
399
|
+
let shouldUpdate = false;
|
|
400
|
+
const oldHandleChange = store.handleChange;
|
|
401
|
+
store.handleChange = () => {
|
|
402
|
+
shouldUpdate = true;
|
|
403
|
+
};
|
|
404
|
+
const returnValue = fn(...args);
|
|
405
|
+
if (shouldUpdate) {
|
|
406
|
+
oldHandleChange();
|
|
407
|
+
}
|
|
408
|
+
store.handleChange = oldHandleChange;
|
|
409
|
+
return returnValue;
|
|
410
|
+
};
|
|
411
|
+
return AsyncResource.bind(wrapped);
|
|
412
|
+
}
|
|
413
|
+
function withPointer(cb) {
|
|
414
|
+
const store = getStore();
|
|
415
|
+
const { index } = store;
|
|
416
|
+
const pointer = {
|
|
417
|
+
get() {
|
|
418
|
+
return store.hooks[index];
|
|
419
|
+
},
|
|
420
|
+
set(value) {
|
|
421
|
+
store.hooks[index] = value;
|
|
422
|
+
},
|
|
423
|
+
initialized: index in store.hooks
|
|
424
|
+
};
|
|
425
|
+
const returnValue = cb(pointer);
|
|
426
|
+
store.index++;
|
|
427
|
+
return returnValue;
|
|
428
|
+
}
|
|
429
|
+
function handleChange() {
|
|
430
|
+
getStore().handleChange();
|
|
431
|
+
}
|
|
432
|
+
var effectScheduler = {
|
|
433
|
+
queue(cb) {
|
|
434
|
+
const store = getStore();
|
|
435
|
+
const { index } = store;
|
|
436
|
+
store.hooksEffect.push(() => {
|
|
437
|
+
store.hooksCleanup[index]?.();
|
|
438
|
+
const cleanFn = cb(readline());
|
|
439
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
440
|
+
throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
|
|
441
|
+
}
|
|
442
|
+
store.hooksCleanup[index] = cleanFn;
|
|
443
|
+
});
|
|
444
|
+
},
|
|
445
|
+
run() {
|
|
446
|
+
const store = getStore();
|
|
447
|
+
withUpdates(() => {
|
|
448
|
+
store.hooksEffect.forEach((effect) => {
|
|
449
|
+
effect();
|
|
450
|
+
});
|
|
451
|
+
store.hooksEffect.length = 0;
|
|
452
|
+
})();
|
|
453
|
+
},
|
|
454
|
+
clearAll() {
|
|
455
|
+
const store = getStore();
|
|
456
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
457
|
+
cleanFn?.();
|
|
458
|
+
});
|
|
459
|
+
store.hooksEffect.length = 0;
|
|
460
|
+
store.hooksCleanup.length = 0;
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
465
|
+
function useState(defaultValue) {
|
|
466
|
+
return withPointer((pointer) => {
|
|
467
|
+
const setState = AsyncResource2.bind(function setState2(newValue) {
|
|
468
|
+
if (pointer.get() !== newValue) {
|
|
469
|
+
pointer.set(newValue);
|
|
470
|
+
handleChange();
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
if (pointer.initialized) {
|
|
474
|
+
return [pointer.get(), setState];
|
|
475
|
+
}
|
|
476
|
+
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
477
|
+
pointer.set(value);
|
|
478
|
+
return [value, setState];
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
483
|
+
init_esm_shims();
|
|
484
|
+
function useEffect(cb, depArray) {
|
|
485
|
+
withPointer((pointer) => {
|
|
486
|
+
const oldDeps = pointer.get();
|
|
487
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
|
|
488
|
+
if (hasChanged) {
|
|
489
|
+
effectScheduler.queue(cb);
|
|
490
|
+
}
|
|
491
|
+
pointer.set(depArray);
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
496
|
+
init_esm_shims();
|
|
497
|
+
|
|
498
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/theme.js
|
|
499
|
+
init_esm_shims();
|
|
500
|
+
import { styleText } from "util";
|
|
501
|
+
|
|
502
|
+
// node_modules/.pnpm/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
503
|
+
init_esm_shims();
|
|
504
|
+
import process2 from "process";
|
|
505
|
+
function isUnicodeSupported() {
|
|
506
|
+
if (process2.platform !== "win32") {
|
|
507
|
+
return process2.env["TERM"] !== "linux";
|
|
508
|
+
}
|
|
509
|
+
return Boolean(process2.env["WT_SESSION"]) || // Windows Terminal
|
|
510
|
+
Boolean(process2.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
|
|
511
|
+
process2.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
|
|
512
|
+
process2.env["TERM_PROGRAM"] === "Terminus-Sublime" || process2.env["TERM_PROGRAM"] === "vscode" || process2.env["TERM"] === "xterm-256color" || process2.env["TERM"] === "alacritty" || process2.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
513
|
+
}
|
|
514
|
+
var common = {
|
|
515
|
+
circleQuestionMark: "(?)",
|
|
516
|
+
questionMarkPrefix: "(?)",
|
|
517
|
+
square: "\u2588",
|
|
518
|
+
squareDarkShade: "\u2593",
|
|
519
|
+
squareMediumShade: "\u2592",
|
|
520
|
+
squareLightShade: "\u2591",
|
|
521
|
+
squareTop: "\u2580",
|
|
522
|
+
squareBottom: "\u2584",
|
|
523
|
+
squareLeft: "\u258C",
|
|
524
|
+
squareRight: "\u2590",
|
|
525
|
+
squareCenter: "\u25A0",
|
|
526
|
+
bullet: "\u25CF",
|
|
527
|
+
dot: "\u2024",
|
|
528
|
+
ellipsis: "\u2026",
|
|
529
|
+
pointerSmall: "\u203A",
|
|
530
|
+
triangleUp: "\u25B2",
|
|
531
|
+
triangleUpSmall: "\u25B4",
|
|
532
|
+
triangleDown: "\u25BC",
|
|
533
|
+
triangleDownSmall: "\u25BE",
|
|
534
|
+
triangleLeftSmall: "\u25C2",
|
|
535
|
+
triangleRightSmall: "\u25B8",
|
|
536
|
+
home: "\u2302",
|
|
537
|
+
heart: "\u2665",
|
|
538
|
+
musicNote: "\u266A",
|
|
539
|
+
musicNoteBeamed: "\u266B",
|
|
540
|
+
arrowUp: "\u2191",
|
|
541
|
+
arrowDown: "\u2193",
|
|
542
|
+
arrowLeft: "\u2190",
|
|
543
|
+
arrowRight: "\u2192",
|
|
544
|
+
arrowLeftRight: "\u2194",
|
|
545
|
+
arrowUpDown: "\u2195",
|
|
546
|
+
almostEqual: "\u2248",
|
|
547
|
+
notEqual: "\u2260",
|
|
548
|
+
lessOrEqual: "\u2264",
|
|
549
|
+
greaterOrEqual: "\u2265",
|
|
550
|
+
identical: "\u2261",
|
|
551
|
+
infinity: "\u221E",
|
|
552
|
+
subscriptZero: "\u2080",
|
|
553
|
+
subscriptOne: "\u2081",
|
|
554
|
+
subscriptTwo: "\u2082",
|
|
555
|
+
subscriptThree: "\u2083",
|
|
556
|
+
subscriptFour: "\u2084",
|
|
557
|
+
subscriptFive: "\u2085",
|
|
558
|
+
subscriptSix: "\u2086",
|
|
559
|
+
subscriptSeven: "\u2087",
|
|
560
|
+
subscriptEight: "\u2088",
|
|
561
|
+
subscriptNine: "\u2089",
|
|
562
|
+
oneHalf: "\xBD",
|
|
563
|
+
oneThird: "\u2153",
|
|
564
|
+
oneQuarter: "\xBC",
|
|
565
|
+
oneFifth: "\u2155",
|
|
566
|
+
oneSixth: "\u2159",
|
|
567
|
+
oneEighth: "\u215B",
|
|
568
|
+
twoThirds: "\u2154",
|
|
569
|
+
twoFifths: "\u2156",
|
|
570
|
+
threeQuarters: "\xBE",
|
|
571
|
+
threeFifths: "\u2157",
|
|
572
|
+
threeEighths: "\u215C",
|
|
573
|
+
fourFifths: "\u2158",
|
|
574
|
+
fiveSixths: "\u215A",
|
|
575
|
+
fiveEighths: "\u215D",
|
|
576
|
+
sevenEighths: "\u215E",
|
|
577
|
+
line: "\u2500",
|
|
578
|
+
lineBold: "\u2501",
|
|
579
|
+
lineDouble: "\u2550",
|
|
580
|
+
lineDashed0: "\u2504",
|
|
581
|
+
lineDashed1: "\u2505",
|
|
582
|
+
lineDashed2: "\u2508",
|
|
583
|
+
lineDashed3: "\u2509",
|
|
584
|
+
lineDashed4: "\u254C",
|
|
585
|
+
lineDashed5: "\u254D",
|
|
586
|
+
lineDashed6: "\u2574",
|
|
587
|
+
lineDashed7: "\u2576",
|
|
588
|
+
lineDashed8: "\u2578",
|
|
589
|
+
lineDashed9: "\u257A",
|
|
590
|
+
lineDashed10: "\u257C",
|
|
591
|
+
lineDashed11: "\u257E",
|
|
592
|
+
lineDashed12: "\u2212",
|
|
593
|
+
lineDashed13: "\u2013",
|
|
594
|
+
lineDashed14: "\u2010",
|
|
595
|
+
lineDashed15: "\u2043",
|
|
596
|
+
lineVertical: "\u2502",
|
|
597
|
+
lineVerticalBold: "\u2503",
|
|
598
|
+
lineVerticalDouble: "\u2551",
|
|
599
|
+
lineVerticalDashed0: "\u2506",
|
|
600
|
+
lineVerticalDashed1: "\u2507",
|
|
601
|
+
lineVerticalDashed2: "\u250A",
|
|
602
|
+
lineVerticalDashed3: "\u250B",
|
|
603
|
+
lineVerticalDashed4: "\u254E",
|
|
604
|
+
lineVerticalDashed5: "\u254F",
|
|
605
|
+
lineVerticalDashed6: "\u2575",
|
|
606
|
+
lineVerticalDashed7: "\u2577",
|
|
607
|
+
lineVerticalDashed8: "\u2579",
|
|
608
|
+
lineVerticalDashed9: "\u257B",
|
|
609
|
+
lineVerticalDashed10: "\u257D",
|
|
610
|
+
lineVerticalDashed11: "\u257F",
|
|
611
|
+
lineDownLeft: "\u2510",
|
|
612
|
+
lineDownLeftArc: "\u256E",
|
|
613
|
+
lineDownBoldLeftBold: "\u2513",
|
|
614
|
+
lineDownBoldLeft: "\u2512",
|
|
615
|
+
lineDownLeftBold: "\u2511",
|
|
616
|
+
lineDownDoubleLeftDouble: "\u2557",
|
|
617
|
+
lineDownDoubleLeft: "\u2556",
|
|
618
|
+
lineDownLeftDouble: "\u2555",
|
|
619
|
+
lineDownRight: "\u250C",
|
|
620
|
+
lineDownRightArc: "\u256D",
|
|
621
|
+
lineDownBoldRightBold: "\u250F",
|
|
622
|
+
lineDownBoldRight: "\u250E",
|
|
623
|
+
lineDownRightBold: "\u250D",
|
|
624
|
+
lineDownDoubleRightDouble: "\u2554",
|
|
625
|
+
lineDownDoubleRight: "\u2553",
|
|
626
|
+
lineDownRightDouble: "\u2552",
|
|
627
|
+
lineUpLeft: "\u2518",
|
|
628
|
+
lineUpLeftArc: "\u256F",
|
|
629
|
+
lineUpBoldLeftBold: "\u251B",
|
|
630
|
+
lineUpBoldLeft: "\u251A",
|
|
631
|
+
lineUpLeftBold: "\u2519",
|
|
632
|
+
lineUpDoubleLeftDouble: "\u255D",
|
|
633
|
+
lineUpDoubleLeft: "\u255C",
|
|
634
|
+
lineUpLeftDouble: "\u255B",
|
|
635
|
+
lineUpRight: "\u2514",
|
|
636
|
+
lineUpRightArc: "\u2570",
|
|
637
|
+
lineUpBoldRightBold: "\u2517",
|
|
638
|
+
lineUpBoldRight: "\u2516",
|
|
639
|
+
lineUpRightBold: "\u2515",
|
|
640
|
+
lineUpDoubleRightDouble: "\u255A",
|
|
641
|
+
lineUpDoubleRight: "\u2559",
|
|
642
|
+
lineUpRightDouble: "\u2558",
|
|
643
|
+
lineUpDownLeft: "\u2524",
|
|
644
|
+
lineUpBoldDownBoldLeftBold: "\u252B",
|
|
645
|
+
lineUpBoldDownBoldLeft: "\u2528",
|
|
646
|
+
lineUpDownLeftBold: "\u2525",
|
|
647
|
+
lineUpBoldDownLeftBold: "\u2529",
|
|
648
|
+
lineUpDownBoldLeftBold: "\u252A",
|
|
649
|
+
lineUpDownBoldLeft: "\u2527",
|
|
650
|
+
lineUpBoldDownLeft: "\u2526",
|
|
651
|
+
lineUpDoubleDownDoubleLeftDouble: "\u2563",
|
|
652
|
+
lineUpDoubleDownDoubleLeft: "\u2562",
|
|
653
|
+
lineUpDownLeftDouble: "\u2561",
|
|
654
|
+
lineUpDownRight: "\u251C",
|
|
655
|
+
lineUpBoldDownBoldRightBold: "\u2523",
|
|
656
|
+
lineUpBoldDownBoldRight: "\u2520",
|
|
657
|
+
lineUpDownRightBold: "\u251D",
|
|
658
|
+
lineUpBoldDownRightBold: "\u2521",
|
|
659
|
+
lineUpDownBoldRightBold: "\u2522",
|
|
660
|
+
lineUpDownBoldRight: "\u251F",
|
|
661
|
+
lineUpBoldDownRight: "\u251E",
|
|
662
|
+
lineUpDoubleDownDoubleRightDouble: "\u2560",
|
|
663
|
+
lineUpDoubleDownDoubleRight: "\u255F",
|
|
664
|
+
lineUpDownRightDouble: "\u255E",
|
|
665
|
+
lineDownLeftRight: "\u252C",
|
|
666
|
+
lineDownBoldLeftBoldRightBold: "\u2533",
|
|
667
|
+
lineDownLeftBoldRightBold: "\u252F",
|
|
668
|
+
lineDownBoldLeftRight: "\u2530",
|
|
669
|
+
lineDownBoldLeftBoldRight: "\u2531",
|
|
670
|
+
lineDownBoldLeftRightBold: "\u2532",
|
|
671
|
+
lineDownLeftRightBold: "\u252E",
|
|
672
|
+
lineDownLeftBoldRight: "\u252D",
|
|
673
|
+
lineDownDoubleLeftDoubleRightDouble: "\u2566",
|
|
674
|
+
lineDownDoubleLeftRight: "\u2565",
|
|
675
|
+
lineDownLeftDoubleRightDouble: "\u2564",
|
|
676
|
+
lineUpLeftRight: "\u2534",
|
|
677
|
+
lineUpBoldLeftBoldRightBold: "\u253B",
|
|
678
|
+
lineUpLeftBoldRightBold: "\u2537",
|
|
679
|
+
lineUpBoldLeftRight: "\u2538",
|
|
680
|
+
lineUpBoldLeftBoldRight: "\u2539",
|
|
681
|
+
lineUpBoldLeftRightBold: "\u253A",
|
|
682
|
+
lineUpLeftRightBold: "\u2536",
|
|
683
|
+
lineUpLeftBoldRight: "\u2535",
|
|
684
|
+
lineUpDoubleLeftDoubleRightDouble: "\u2569",
|
|
685
|
+
lineUpDoubleLeftRight: "\u2568",
|
|
686
|
+
lineUpLeftDoubleRightDouble: "\u2567",
|
|
687
|
+
lineUpDownLeftRight: "\u253C",
|
|
688
|
+
lineUpBoldDownBoldLeftBoldRightBold: "\u254B",
|
|
689
|
+
lineUpDownBoldLeftBoldRightBold: "\u2548",
|
|
690
|
+
lineUpBoldDownLeftBoldRightBold: "\u2547",
|
|
691
|
+
lineUpBoldDownBoldLeftRightBold: "\u254A",
|
|
692
|
+
lineUpBoldDownBoldLeftBoldRight: "\u2549",
|
|
693
|
+
lineUpBoldDownLeftRight: "\u2540",
|
|
694
|
+
lineUpDownBoldLeftRight: "\u2541",
|
|
695
|
+
lineUpDownLeftBoldRight: "\u253D",
|
|
696
|
+
lineUpDownLeftRightBold: "\u253E",
|
|
697
|
+
lineUpBoldDownBoldLeftRight: "\u2542",
|
|
698
|
+
lineUpDownLeftBoldRightBold: "\u253F",
|
|
699
|
+
lineUpBoldDownLeftBoldRight: "\u2543",
|
|
700
|
+
lineUpBoldDownLeftRightBold: "\u2544",
|
|
701
|
+
lineUpDownBoldLeftBoldRight: "\u2545",
|
|
702
|
+
lineUpDownBoldLeftRightBold: "\u2546",
|
|
703
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "\u256C",
|
|
704
|
+
lineUpDoubleDownDoubleLeftRight: "\u256B",
|
|
705
|
+
lineUpDownLeftDoubleRightDouble: "\u256A",
|
|
706
|
+
lineCross: "\u2573",
|
|
707
|
+
lineBackslash: "\u2572",
|
|
708
|
+
lineSlash: "\u2571"
|
|
709
|
+
};
|
|
710
|
+
var specialMainSymbols = {
|
|
711
|
+
tick: "\u2714",
|
|
712
|
+
info: "\u2139",
|
|
713
|
+
warning: "\u26A0",
|
|
714
|
+
cross: "\u2718",
|
|
715
|
+
squareSmall: "\u25FB",
|
|
716
|
+
squareSmallFilled: "\u25FC",
|
|
717
|
+
circle: "\u25EF",
|
|
718
|
+
circleFilled: "\u25C9",
|
|
719
|
+
circleDotted: "\u25CC",
|
|
720
|
+
circleDouble: "\u25CE",
|
|
721
|
+
circleCircle: "\u24DE",
|
|
722
|
+
circleCross: "\u24E7",
|
|
723
|
+
circlePipe: "\u24BE",
|
|
724
|
+
radioOn: "\u25C9",
|
|
725
|
+
radioOff: "\u25EF",
|
|
726
|
+
checkboxOn: "\u2612",
|
|
727
|
+
checkboxOff: "\u2610",
|
|
728
|
+
checkboxCircleOn: "\u24E7",
|
|
729
|
+
checkboxCircleOff: "\u24BE",
|
|
730
|
+
pointer: "\u276F",
|
|
731
|
+
triangleUpOutline: "\u25B3",
|
|
732
|
+
triangleLeft: "\u25C0",
|
|
733
|
+
triangleRight: "\u25B6",
|
|
734
|
+
lozenge: "\u25C6",
|
|
735
|
+
lozengeOutline: "\u25C7",
|
|
736
|
+
hamburger: "\u2630",
|
|
737
|
+
smiley: "\u32E1",
|
|
738
|
+
mustache: "\u0DF4",
|
|
739
|
+
star: "\u2605",
|
|
740
|
+
play: "\u25B6",
|
|
741
|
+
nodejs: "\u2B22",
|
|
742
|
+
oneSeventh: "\u2150",
|
|
743
|
+
oneNinth: "\u2151",
|
|
744
|
+
oneTenth: "\u2152"
|
|
745
|
+
};
|
|
746
|
+
var specialFallbackSymbols = {
|
|
747
|
+
tick: "\u221A",
|
|
748
|
+
info: "i",
|
|
749
|
+
warning: "\u203C",
|
|
750
|
+
cross: "\xD7",
|
|
751
|
+
squareSmall: "\u25A1",
|
|
752
|
+
squareSmallFilled: "\u25A0",
|
|
753
|
+
circle: "( )",
|
|
754
|
+
circleFilled: "(*)",
|
|
755
|
+
circleDotted: "( )",
|
|
756
|
+
circleDouble: "( )",
|
|
757
|
+
circleCircle: "(\u25CB)",
|
|
758
|
+
circleCross: "(\xD7)",
|
|
759
|
+
circlePipe: "(\u2502)",
|
|
760
|
+
radioOn: "(*)",
|
|
761
|
+
radioOff: "( )",
|
|
762
|
+
checkboxOn: "[\xD7]",
|
|
763
|
+
checkboxOff: "[ ]",
|
|
764
|
+
checkboxCircleOn: "(\xD7)",
|
|
765
|
+
checkboxCircleOff: "( )",
|
|
766
|
+
pointer: ">",
|
|
767
|
+
triangleUpOutline: "\u2206",
|
|
768
|
+
triangleLeft: "\u25C4",
|
|
769
|
+
triangleRight: "\u25BA",
|
|
770
|
+
lozenge: "\u2666",
|
|
771
|
+
lozengeOutline: "\u25CA",
|
|
772
|
+
hamburger: "\u2261",
|
|
773
|
+
smiley: "\u263A",
|
|
774
|
+
mustache: "\u250C\u2500\u2510",
|
|
775
|
+
star: "\u2736",
|
|
776
|
+
play: "\u25BA",
|
|
777
|
+
nodejs: "\u2666",
|
|
778
|
+
oneSeventh: "1/7",
|
|
779
|
+
oneNinth: "1/9",
|
|
780
|
+
oneTenth: "1/10"
|
|
781
|
+
};
|
|
782
|
+
var mainSymbols = {
|
|
783
|
+
...common,
|
|
784
|
+
...specialMainSymbols
|
|
785
|
+
};
|
|
786
|
+
var fallbackSymbols = {
|
|
787
|
+
...common,
|
|
788
|
+
...specialFallbackSymbols
|
|
789
|
+
};
|
|
790
|
+
var shouldUseMain = isUnicodeSupported();
|
|
791
|
+
var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
792
|
+
var dist_default = figures;
|
|
793
|
+
var replacements = Object.entries(specialMainSymbols);
|
|
794
|
+
|
|
795
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/theme.js
|
|
796
|
+
var defaultTheme = {
|
|
797
|
+
prefix: {
|
|
798
|
+
idle: styleText("blue", "?"),
|
|
799
|
+
done: styleText("green", dist_default.tick)
|
|
800
|
+
},
|
|
801
|
+
spinner: {
|
|
802
|
+
interval: 80,
|
|
803
|
+
frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"].map((frame) => styleText("yellow", frame))
|
|
804
|
+
},
|
|
805
|
+
style: {
|
|
806
|
+
answer: (text) => styleText("cyan", text),
|
|
807
|
+
message: (text) => styleText("bold", text),
|
|
808
|
+
error: (text) => styleText("red", `> ${text}`),
|
|
809
|
+
defaultAnswer: (text) => styleText("dim", `(${text})`),
|
|
810
|
+
help: (text) => styleText("dim", text),
|
|
811
|
+
highlight: (text) => styleText("cyan", text),
|
|
812
|
+
key: (text) => styleText("cyan", styleText("bold", `<${text}>`))
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
817
|
+
function isPlainObject(value) {
|
|
818
|
+
if (typeof value !== "object" || value === null)
|
|
819
|
+
return false;
|
|
820
|
+
let proto = value;
|
|
821
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
822
|
+
proto = Object.getPrototypeOf(proto);
|
|
823
|
+
}
|
|
824
|
+
return Object.getPrototypeOf(value) === proto;
|
|
825
|
+
}
|
|
826
|
+
function deepMerge(...objects) {
|
|
827
|
+
const output = {};
|
|
828
|
+
for (const obj of objects) {
|
|
829
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
830
|
+
const prevValue = output[key];
|
|
831
|
+
output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
return output;
|
|
835
|
+
}
|
|
836
|
+
function makeTheme(...themes) {
|
|
837
|
+
const themesToMerge = [
|
|
838
|
+
defaultTheme,
|
|
839
|
+
...themes.filter((theme) => theme != null)
|
|
840
|
+
];
|
|
841
|
+
return deepMerge(...themesToMerge);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
845
|
+
function usePrefix({ status = "idle", theme }) {
|
|
846
|
+
const [showLoader, setShowLoader] = useState(false);
|
|
847
|
+
const [tick, setTick] = useState(0);
|
|
848
|
+
const { prefix, spinner } = makeTheme(theme);
|
|
849
|
+
useEffect(() => {
|
|
850
|
+
if (status === "loading") {
|
|
851
|
+
let tickInterval;
|
|
852
|
+
let inc = -1;
|
|
853
|
+
const delayTimeout = setTimeout(() => {
|
|
854
|
+
setShowLoader(true);
|
|
855
|
+
tickInterval = setInterval(() => {
|
|
856
|
+
inc = inc + 1;
|
|
857
|
+
setTick(inc % spinner.frames.length);
|
|
858
|
+
}, spinner.interval);
|
|
859
|
+
}, 300);
|
|
860
|
+
return () => {
|
|
861
|
+
clearTimeout(delayTimeout);
|
|
862
|
+
clearInterval(tickInterval);
|
|
863
|
+
};
|
|
864
|
+
} else {
|
|
865
|
+
setShowLoader(false);
|
|
866
|
+
}
|
|
867
|
+
}, [status]);
|
|
868
|
+
if (showLoader) {
|
|
869
|
+
return spinner.frames[tick];
|
|
870
|
+
}
|
|
871
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
872
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
876
|
+
init_esm_shims();
|
|
877
|
+
function useMemo(fn, dependencies) {
|
|
878
|
+
return withPointer((pointer) => {
|
|
879
|
+
const prev = pointer.get();
|
|
880
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
881
|
+
const value = fn();
|
|
882
|
+
pointer.set({ value, dependencies });
|
|
883
|
+
return value;
|
|
884
|
+
}
|
|
885
|
+
return prev.value;
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
890
|
+
init_esm_shims();
|
|
891
|
+
function useRef(val) {
|
|
892
|
+
return useState({ current: val })[0];
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
896
|
+
init_esm_shims();
|
|
897
|
+
function useKeypress(userHandler) {
|
|
898
|
+
const signal = useRef(userHandler);
|
|
899
|
+
signal.current = userHandler;
|
|
900
|
+
useEffect((rl) => {
|
|
901
|
+
let ignore = false;
|
|
902
|
+
const handler = withUpdates((_input, event) => {
|
|
903
|
+
if (ignore)
|
|
904
|
+
return;
|
|
905
|
+
void signal.current(event, rl);
|
|
906
|
+
});
|
|
907
|
+
rl.input.on("keypress", handler);
|
|
908
|
+
return () => {
|
|
909
|
+
ignore = true;
|
|
910
|
+
rl.input.removeListener("keypress", handler);
|
|
911
|
+
};
|
|
912
|
+
}, []);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
916
|
+
init_esm_shims();
|
|
917
|
+
|
|
918
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/utils.js
|
|
919
|
+
init_esm_shims();
|
|
920
|
+
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
921
|
+
|
|
922
|
+
// node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
923
|
+
init_esm_shims();
|
|
924
|
+
|
|
925
|
+
// node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
926
|
+
init_esm_shims();
|
|
927
|
+
|
|
928
|
+
// node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
929
|
+
init_esm_shims();
|
|
930
|
+
|
|
931
|
+
// node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
932
|
+
init_esm_shims();
|
|
933
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
934
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
935
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
936
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
937
|
+
const pattern = `${osc}|${csi}`;
|
|
938
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
942
|
+
var regex = ansiRegex();
|
|
943
|
+
function stripAnsi(string) {
|
|
944
|
+
if (typeof string !== "string") {
|
|
945
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
946
|
+
}
|
|
947
|
+
return string.replace(regex, "");
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
// node_modules/.pnpm/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
951
|
+
init_esm_shims();
|
|
952
|
+
|
|
953
|
+
// node_modules/.pnpm/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
954
|
+
init_esm_shims();
|
|
955
|
+
function isAmbiguous(x) {
|
|
956
|
+
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;
|
|
957
|
+
}
|
|
958
|
+
function isFullWidth(x) {
|
|
959
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
960
|
+
}
|
|
961
|
+
function isWide(x) {
|
|
962
|
+
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 <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || 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 <= 128728 || 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 <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
// node_modules/.pnpm/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
966
|
+
function validate(codePoint) {
|
|
967
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
968
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
972
|
+
validate(codePoint);
|
|
973
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
974
|
+
return 2;
|
|
975
|
+
}
|
|
976
|
+
return 1;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
// node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
980
|
+
init_esm_shims();
|
|
981
|
+
var emoji_regex_default = () => {
|
|
982
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
// node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
986
|
+
var segmenter = new Intl.Segmenter();
|
|
987
|
+
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
988
|
+
function stringWidth(string, options = {}) {
|
|
989
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
990
|
+
return 0;
|
|
991
|
+
}
|
|
992
|
+
const {
|
|
993
|
+
ambiguousIsNarrow = true,
|
|
994
|
+
countAnsiEscapeCodes = false
|
|
995
|
+
} = options;
|
|
996
|
+
if (!countAnsiEscapeCodes) {
|
|
997
|
+
string = stripAnsi(string);
|
|
998
|
+
}
|
|
999
|
+
if (string.length === 0) {
|
|
1000
|
+
return 0;
|
|
1001
|
+
}
|
|
1002
|
+
let width = 0;
|
|
1003
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
1004
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
1005
|
+
const codePoint = character.codePointAt(0);
|
|
1006
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
1007
|
+
continue;
|
|
1008
|
+
}
|
|
1009
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
1010
|
+
continue;
|
|
1011
|
+
}
|
|
1012
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
1013
|
+
continue;
|
|
1014
|
+
}
|
|
1015
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
1016
|
+
continue;
|
|
1017
|
+
}
|
|
1018
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
1019
|
+
continue;
|
|
1020
|
+
}
|
|
1021
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
1022
|
+
continue;
|
|
1023
|
+
}
|
|
1024
|
+
if (emoji_regex_default().test(character)) {
|
|
1025
|
+
width += 2;
|
|
1026
|
+
continue;
|
|
1027
|
+
}
|
|
1028
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
1029
|
+
}
|
|
1030
|
+
return width;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
1034
|
+
init_esm_shims();
|
|
1035
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
1036
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
1037
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
1038
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1039
|
+
var styles = {
|
|
1040
|
+
modifier: {
|
|
1041
|
+
reset: [0, 0],
|
|
1042
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1043
|
+
bold: [1, 22],
|
|
1044
|
+
dim: [2, 22],
|
|
1045
|
+
italic: [3, 23],
|
|
1046
|
+
underline: [4, 24],
|
|
1047
|
+
overline: [53, 55],
|
|
1048
|
+
inverse: [7, 27],
|
|
1049
|
+
hidden: [8, 28],
|
|
1050
|
+
strikethrough: [9, 29]
|
|
1051
|
+
},
|
|
1052
|
+
color: {
|
|
1053
|
+
black: [30, 39],
|
|
1054
|
+
red: [31, 39],
|
|
1055
|
+
green: [32, 39],
|
|
1056
|
+
yellow: [33, 39],
|
|
1057
|
+
blue: [34, 39],
|
|
1058
|
+
magenta: [35, 39],
|
|
1059
|
+
cyan: [36, 39],
|
|
1060
|
+
white: [37, 39],
|
|
1061
|
+
// Bright color
|
|
1062
|
+
blackBright: [90, 39],
|
|
1063
|
+
gray: [90, 39],
|
|
1064
|
+
// Alias of `blackBright`
|
|
1065
|
+
grey: [90, 39],
|
|
1066
|
+
// Alias of `blackBright`
|
|
1067
|
+
redBright: [91, 39],
|
|
1068
|
+
greenBright: [92, 39],
|
|
1069
|
+
yellowBright: [93, 39],
|
|
1070
|
+
blueBright: [94, 39],
|
|
1071
|
+
magentaBright: [95, 39],
|
|
1072
|
+
cyanBright: [96, 39],
|
|
1073
|
+
whiteBright: [97, 39]
|
|
1074
|
+
},
|
|
1075
|
+
bgColor: {
|
|
1076
|
+
bgBlack: [40, 49],
|
|
1077
|
+
bgRed: [41, 49],
|
|
1078
|
+
bgGreen: [42, 49],
|
|
1079
|
+
bgYellow: [43, 49],
|
|
1080
|
+
bgBlue: [44, 49],
|
|
1081
|
+
bgMagenta: [45, 49],
|
|
1082
|
+
bgCyan: [46, 49],
|
|
1083
|
+
bgWhite: [47, 49],
|
|
1084
|
+
// Bright color
|
|
1085
|
+
bgBlackBright: [100, 49],
|
|
1086
|
+
bgGray: [100, 49],
|
|
1087
|
+
// Alias of `bgBlackBright`
|
|
1088
|
+
bgGrey: [100, 49],
|
|
1089
|
+
// Alias of `bgBlackBright`
|
|
1090
|
+
bgRedBright: [101, 49],
|
|
1091
|
+
bgGreenBright: [102, 49],
|
|
1092
|
+
bgYellowBright: [103, 49],
|
|
1093
|
+
bgBlueBright: [104, 49],
|
|
1094
|
+
bgMagentaBright: [105, 49],
|
|
1095
|
+
bgCyanBright: [106, 49],
|
|
1096
|
+
bgWhiteBright: [107, 49]
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
1100
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
1101
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
1102
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1103
|
+
function assembleStyles() {
|
|
1104
|
+
const codes = /* @__PURE__ */ new Map();
|
|
1105
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1106
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
1107
|
+
styles[styleName] = {
|
|
1108
|
+
open: `\x1B[${style[0]}m`,
|
|
1109
|
+
close: `\x1B[${style[1]}m`
|
|
1110
|
+
};
|
|
1111
|
+
group[styleName] = styles[styleName];
|
|
1112
|
+
codes.set(style[0], style[1]);
|
|
1113
|
+
}
|
|
1114
|
+
Object.defineProperty(styles, groupName, {
|
|
1115
|
+
value: group,
|
|
1116
|
+
enumerable: false
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
Object.defineProperty(styles, "codes", {
|
|
1120
|
+
value: codes,
|
|
1121
|
+
enumerable: false
|
|
1122
|
+
});
|
|
1123
|
+
styles.color.close = "\x1B[39m";
|
|
1124
|
+
styles.bgColor.close = "\x1B[49m";
|
|
1125
|
+
styles.color.ansi = wrapAnsi16();
|
|
1126
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
1127
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
1128
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1129
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1130
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1131
|
+
Object.defineProperties(styles, {
|
|
1132
|
+
rgbToAnsi256: {
|
|
1133
|
+
value(red, green, blue) {
|
|
1134
|
+
if (red === green && green === blue) {
|
|
1135
|
+
if (red < 8) {
|
|
1136
|
+
return 16;
|
|
1137
|
+
}
|
|
1138
|
+
if (red > 248) {
|
|
1139
|
+
return 231;
|
|
1140
|
+
}
|
|
1141
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
1142
|
+
}
|
|
1143
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
1144
|
+
},
|
|
1145
|
+
enumerable: false
|
|
1146
|
+
},
|
|
1147
|
+
hexToRgb: {
|
|
1148
|
+
value(hex) {
|
|
1149
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
1150
|
+
if (!matches) {
|
|
1151
|
+
return [0, 0, 0];
|
|
1152
|
+
}
|
|
1153
|
+
let [colorString] = matches;
|
|
1154
|
+
if (colorString.length === 3) {
|
|
1155
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
1156
|
+
}
|
|
1157
|
+
const integer = Number.parseInt(colorString, 16);
|
|
1158
|
+
return [
|
|
1159
|
+
/* eslint-disable no-bitwise */
|
|
1160
|
+
integer >> 16 & 255,
|
|
1161
|
+
integer >> 8 & 255,
|
|
1162
|
+
integer & 255
|
|
1163
|
+
/* eslint-enable no-bitwise */
|
|
1164
|
+
];
|
|
1165
|
+
},
|
|
1166
|
+
enumerable: false
|
|
1167
|
+
},
|
|
1168
|
+
hexToAnsi256: {
|
|
1169
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
1170
|
+
enumerable: false
|
|
1171
|
+
},
|
|
1172
|
+
ansi256ToAnsi: {
|
|
1173
|
+
value(code) {
|
|
1174
|
+
if (code < 8) {
|
|
1175
|
+
return 30 + code;
|
|
1176
|
+
}
|
|
1177
|
+
if (code < 16) {
|
|
1178
|
+
return 90 + (code - 8);
|
|
1179
|
+
}
|
|
1180
|
+
let red;
|
|
1181
|
+
let green;
|
|
1182
|
+
let blue;
|
|
1183
|
+
if (code >= 232) {
|
|
1184
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
1185
|
+
green = red;
|
|
1186
|
+
blue = red;
|
|
1187
|
+
} else {
|
|
1188
|
+
code -= 16;
|
|
1189
|
+
const remainder = code % 36;
|
|
1190
|
+
red = Math.floor(code / 36) / 5;
|
|
1191
|
+
green = Math.floor(remainder / 6) / 5;
|
|
1192
|
+
blue = remainder % 6 / 5;
|
|
1193
|
+
}
|
|
1194
|
+
const value = Math.max(red, green, blue) * 2;
|
|
1195
|
+
if (value === 0) {
|
|
1196
|
+
return 30;
|
|
1197
|
+
}
|
|
1198
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
1199
|
+
if (value === 2) {
|
|
1200
|
+
result += 60;
|
|
1201
|
+
}
|
|
1202
|
+
return result;
|
|
1203
|
+
},
|
|
1204
|
+
enumerable: false
|
|
1205
|
+
},
|
|
1206
|
+
rgbToAnsi: {
|
|
1207
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
1208
|
+
enumerable: false
|
|
1209
|
+
},
|
|
1210
|
+
hexToAnsi: {
|
|
1211
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
1212
|
+
enumerable: false
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
return styles;
|
|
1216
|
+
}
|
|
1217
|
+
var ansiStyles = assembleStyles();
|
|
1218
|
+
var ansi_styles_default = ansiStyles;
|
|
1219
|
+
|
|
1220
|
+
// node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
1221
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
1222
|
+
"\x1B",
|
|
1223
|
+
"\x9B"
|
|
1224
|
+
]);
|
|
1225
|
+
var END_CODE = 39;
|
|
1226
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
1227
|
+
var ANSI_CSI = "[";
|
|
1228
|
+
var ANSI_OSC = "]";
|
|
1229
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
1230
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
1231
|
+
var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
1232
|
+
var wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
1233
|
+
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
1234
|
+
var wrapWord = (rows, word, columns) => {
|
|
1235
|
+
const characters = [...word];
|
|
1236
|
+
let isInsideEscape = false;
|
|
1237
|
+
let isInsideLinkEscape = false;
|
|
1238
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
1239
|
+
for (const [index, character] of characters.entries()) {
|
|
1240
|
+
const characterLength = stringWidth(character);
|
|
1241
|
+
if (visible + characterLength <= columns) {
|
|
1242
|
+
rows[rows.length - 1] += character;
|
|
1243
|
+
} else {
|
|
1244
|
+
rows.push(character);
|
|
1245
|
+
visible = 0;
|
|
1246
|
+
}
|
|
1247
|
+
if (ESCAPES.has(character)) {
|
|
1248
|
+
isInsideEscape = true;
|
|
1249
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
1250
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
1251
|
+
}
|
|
1252
|
+
if (isInsideEscape) {
|
|
1253
|
+
if (isInsideLinkEscape) {
|
|
1254
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
1255
|
+
isInsideEscape = false;
|
|
1256
|
+
isInsideLinkEscape = false;
|
|
1257
|
+
}
|
|
1258
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
1259
|
+
isInsideEscape = false;
|
|
1260
|
+
}
|
|
1261
|
+
continue;
|
|
1262
|
+
}
|
|
1263
|
+
visible += characterLength;
|
|
1264
|
+
if (visible === columns && index < characters.length - 1) {
|
|
1265
|
+
rows.push("");
|
|
1266
|
+
visible = 0;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
1270
|
+
rows[rows.length - 2] += rows.pop();
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
1274
|
+
const words = string.split(" ");
|
|
1275
|
+
let last = words.length;
|
|
1276
|
+
while (last > 0) {
|
|
1277
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
1278
|
+
break;
|
|
1279
|
+
}
|
|
1280
|
+
last--;
|
|
1281
|
+
}
|
|
1282
|
+
if (last === words.length) {
|
|
1283
|
+
return string;
|
|
1284
|
+
}
|
|
1285
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
1286
|
+
};
|
|
1287
|
+
var exec = (string, columns, options = {}) => {
|
|
1288
|
+
if (options.trim !== false && string.trim() === "") {
|
|
1289
|
+
return "";
|
|
1290
|
+
}
|
|
1291
|
+
let returnValue = "";
|
|
1292
|
+
let escapeCode;
|
|
1293
|
+
let escapeUrl;
|
|
1294
|
+
const lengths = wordLengths(string);
|
|
1295
|
+
let rows = [""];
|
|
1296
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
1297
|
+
if (options.trim !== false) {
|
|
1298
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
1299
|
+
}
|
|
1300
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
1301
|
+
if (index !== 0) {
|
|
1302
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
1303
|
+
rows.push("");
|
|
1304
|
+
rowLength = 0;
|
|
1305
|
+
}
|
|
1306
|
+
if (rowLength > 0 || options.trim === false) {
|
|
1307
|
+
rows[rows.length - 1] += " ";
|
|
1308
|
+
rowLength++;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
if (options.hard && lengths[index] > columns) {
|
|
1312
|
+
const remainingColumns = columns - rowLength;
|
|
1313
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
1314
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
1315
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
1316
|
+
rows.push("");
|
|
1317
|
+
}
|
|
1318
|
+
wrapWord(rows, word, columns);
|
|
1319
|
+
continue;
|
|
1320
|
+
}
|
|
1321
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
1322
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
1323
|
+
wrapWord(rows, word, columns);
|
|
1324
|
+
continue;
|
|
1325
|
+
}
|
|
1326
|
+
rows.push("");
|
|
1327
|
+
}
|
|
1328
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
1329
|
+
wrapWord(rows, word, columns);
|
|
1330
|
+
continue;
|
|
1331
|
+
}
|
|
1332
|
+
rows[rows.length - 1] += word;
|
|
1333
|
+
}
|
|
1334
|
+
if (options.trim !== false) {
|
|
1335
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
1336
|
+
}
|
|
1337
|
+
const preString = rows.join("\n");
|
|
1338
|
+
const pre = [...preString];
|
|
1339
|
+
let preStringIndex = 0;
|
|
1340
|
+
for (const [index, character] of pre.entries()) {
|
|
1341
|
+
returnValue += character;
|
|
1342
|
+
if (ESCAPES.has(character)) {
|
|
1343
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
1344
|
+
if (groups.code !== void 0) {
|
|
1345
|
+
const code2 = Number.parseFloat(groups.code);
|
|
1346
|
+
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
1347
|
+
} else if (groups.uri !== void 0) {
|
|
1348
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
1352
|
+
if (pre[index + 1] === "\n") {
|
|
1353
|
+
if (escapeUrl) {
|
|
1354
|
+
returnValue += wrapAnsiHyperlink("");
|
|
1355
|
+
}
|
|
1356
|
+
if (escapeCode && code) {
|
|
1357
|
+
returnValue += wrapAnsiCode(code);
|
|
1358
|
+
}
|
|
1359
|
+
} else if (character === "\n") {
|
|
1360
|
+
if (escapeCode && code) {
|
|
1361
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
1362
|
+
}
|
|
1363
|
+
if (escapeUrl) {
|
|
1364
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
preStringIndex += character.length;
|
|
1368
|
+
}
|
|
1369
|
+
return returnValue;
|
|
1370
|
+
};
|
|
1371
|
+
function wrapAnsi(string, columns, options) {
|
|
1372
|
+
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/utils.js
|
|
1376
|
+
function breakLines(content, width) {
|
|
1377
|
+
return content.split("\n").flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
|
|
1378
|
+
}
|
|
1379
|
+
function readlineWidth() {
|
|
1380
|
+
return (0, import_cli_width.default)({ defaultWidth: 80, output: readline().output });
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
1384
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
1385
|
+
const state = useRef({
|
|
1386
|
+
lastPointer: active,
|
|
1387
|
+
lastActive: void 0
|
|
1388
|
+
});
|
|
1389
|
+
const { lastPointer, lastActive } = state.current;
|
|
1390
|
+
const middle = Math.floor(pageSize / 2);
|
|
1391
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
1392
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
1393
|
+
let pointer = defaultPointerPosition;
|
|
1394
|
+
if (renderedLength > pageSize) {
|
|
1395
|
+
if (loop) {
|
|
1396
|
+
pointer = lastPointer;
|
|
1397
|
+
if (
|
|
1398
|
+
// First render, skip this logic.
|
|
1399
|
+
lastActive != null && // Only move the pointer down when the user moves down.
|
|
1400
|
+
lastActive < active && // Check user didn't move up across page boundary.
|
|
1401
|
+
active - lastActive < pageSize
|
|
1402
|
+
) {
|
|
1403
|
+
pointer = Math.min(
|
|
1404
|
+
// Furthest allowed position for the pointer is the middle of the list
|
|
1405
|
+
middle,
|
|
1406
|
+
Math.abs(active - lastActive) === 1 ? Math.min(
|
|
1407
|
+
// Move the pointer at most the height of the last active item.
|
|
1408
|
+
lastPointer + (renderedItems[lastActive]?.length ?? 0),
|
|
1409
|
+
// If the user moved by one item, move the pointer to the natural position of the active item as
|
|
1410
|
+
// long as it doesn't move the cursor up.
|
|
1411
|
+
Math.max(defaultPointerPosition, lastPointer)
|
|
1412
|
+
) : (
|
|
1413
|
+
// Otherwise, move the pointer down by the difference between the active and last active item.
|
|
1414
|
+
lastPointer + active - lastActive
|
|
1415
|
+
)
|
|
1416
|
+
);
|
|
1417
|
+
}
|
|
1418
|
+
} else {
|
|
1419
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
1420
|
+
pointer = spaceUnderActive < pageSize - middle ? (
|
|
1421
|
+
// If the active item is near the end of the list, progressively move the cursor towards the end.
|
|
1422
|
+
pageSize - spaceUnderActive
|
|
1423
|
+
) : (
|
|
1424
|
+
// Otherwise, progressively move the pointer to the middle of the list.
|
|
1425
|
+
Math.min(defaultPointerPosition, middle)
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
state.current.lastPointer = pointer;
|
|
1430
|
+
state.current.lastActive = active;
|
|
1431
|
+
return pointer;
|
|
1432
|
+
}
|
|
1433
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
1434
|
+
const width = readlineWidth();
|
|
1435
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
|
1436
|
+
const renderedItems = items.map((item, index) => {
|
|
1437
|
+
if (item == null)
|
|
1438
|
+
return [];
|
|
1439
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split("\n");
|
|
1440
|
+
});
|
|
1441
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
1442
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
|
1443
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
1444
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
1445
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
1446
|
+
const pageBuffer = Array.from({ length: pageSize });
|
|
1447
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
1448
|
+
const itemVisited = /* @__PURE__ */ new Set([active]);
|
|
1449
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
|
1450
|
+
let itemPointer = bound(active + 1);
|
|
1451
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
1452
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
1453
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
1454
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
1455
|
+
itemVisited.add(itemPointer);
|
|
1456
|
+
bufferPointer += linesToAdd.length;
|
|
1457
|
+
itemPointer = bound(itemPointer + 1);
|
|
1458
|
+
}
|
|
1459
|
+
bufferPointer = activeItemPosition - 1;
|
|
1460
|
+
itemPointer = bound(active - 1);
|
|
1461
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
1462
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
1463
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
1464
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
1465
|
+
itemVisited.add(itemPointer);
|
|
1466
|
+
bufferPointer -= linesToAdd.length;
|
|
1467
|
+
itemPointer = bound(itemPointer - 1);
|
|
1468
|
+
}
|
|
1469
|
+
return pageBuffer.filter((line) => typeof line === "string").join("\n");
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
1473
|
+
init_esm_shims();
|
|
1474
|
+
var import_mute_stream = __toESM(require_lib(), 1);
|
|
1475
|
+
import * as readline2 from "readline";
|
|
1476
|
+
import { AsyncResource as AsyncResource3 } from "async_hooks";
|
|
1477
|
+
|
|
1478
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
1479
|
+
init_esm_shims();
|
|
1480
|
+
|
|
1481
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
1482
|
+
init_esm_shims();
|
|
1483
|
+
var signals = [];
|
|
1484
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1485
|
+
if (process.platform !== "win32") {
|
|
1486
|
+
signals.push(
|
|
1487
|
+
"SIGALRM",
|
|
1488
|
+
"SIGABRT",
|
|
1489
|
+
"SIGVTALRM",
|
|
1490
|
+
"SIGXCPU",
|
|
1491
|
+
"SIGXFSZ",
|
|
1492
|
+
"SIGUSR2",
|
|
1493
|
+
"SIGTRAP",
|
|
1494
|
+
"SIGSYS",
|
|
1495
|
+
"SIGQUIT",
|
|
1496
|
+
"SIGIOT"
|
|
1497
|
+
// should detect profiler and enable/disable accordingly.
|
|
1498
|
+
// see #21
|
|
1499
|
+
// 'SIGPROF'
|
|
1500
|
+
);
|
|
1501
|
+
}
|
|
1502
|
+
if (process.platform === "linux") {
|
|
1503
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
1507
|
+
var processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
|
|
1508
|
+
var kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
|
|
1509
|
+
var global = globalThis;
|
|
1510
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
1511
|
+
var Emitter = class {
|
|
1512
|
+
emitted = {
|
|
1513
|
+
afterExit: false,
|
|
1514
|
+
exit: false
|
|
1515
|
+
};
|
|
1516
|
+
listeners = {
|
|
1517
|
+
afterExit: [],
|
|
1518
|
+
exit: []
|
|
1519
|
+
};
|
|
1520
|
+
count = 0;
|
|
1521
|
+
id = Math.random();
|
|
1522
|
+
constructor() {
|
|
1523
|
+
if (global[kExitEmitter]) {
|
|
1524
|
+
return global[kExitEmitter];
|
|
1525
|
+
}
|
|
1526
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
1527
|
+
value: this,
|
|
1528
|
+
writable: false,
|
|
1529
|
+
enumerable: false,
|
|
1530
|
+
configurable: false
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
on(ev, fn) {
|
|
1534
|
+
this.listeners[ev].push(fn);
|
|
1535
|
+
}
|
|
1536
|
+
removeListener(ev, fn) {
|
|
1537
|
+
const list = this.listeners[ev];
|
|
1538
|
+
const i = list.indexOf(fn);
|
|
1539
|
+
if (i === -1) {
|
|
1540
|
+
return;
|
|
1541
|
+
}
|
|
1542
|
+
if (i === 0 && list.length === 1) {
|
|
1543
|
+
list.length = 0;
|
|
1544
|
+
} else {
|
|
1545
|
+
list.splice(i, 1);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
emit(ev, code, signal) {
|
|
1549
|
+
if (this.emitted[ev]) {
|
|
1550
|
+
return false;
|
|
1551
|
+
}
|
|
1552
|
+
this.emitted[ev] = true;
|
|
1553
|
+
let ret = false;
|
|
1554
|
+
for (const fn of this.listeners[ev]) {
|
|
1555
|
+
ret = fn(code, signal) === true || ret;
|
|
1556
|
+
}
|
|
1557
|
+
if (ev === "exit") {
|
|
1558
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
1559
|
+
}
|
|
1560
|
+
return ret;
|
|
1561
|
+
}
|
|
1562
|
+
};
|
|
1563
|
+
var SignalExitBase = class {
|
|
1564
|
+
};
|
|
1565
|
+
var signalExitWrap = (handler) => {
|
|
1566
|
+
return {
|
|
1567
|
+
onExit(cb, opts) {
|
|
1568
|
+
return handler.onExit(cb, opts);
|
|
1569
|
+
},
|
|
1570
|
+
load() {
|
|
1571
|
+
return handler.load();
|
|
1572
|
+
},
|
|
1573
|
+
unload() {
|
|
1574
|
+
return handler.unload();
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
1579
|
+
onExit() {
|
|
1580
|
+
return () => {
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
load() {
|
|
1584
|
+
}
|
|
1585
|
+
unload() {
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
var SignalExit = class extends SignalExitBase {
|
|
1589
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
1590
|
+
// so use a supported signal instead
|
|
1591
|
+
/* c8 ignore start */
|
|
1592
|
+
#hupSig = process3.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
1593
|
+
/* c8 ignore stop */
|
|
1594
|
+
#emitter = new Emitter();
|
|
1595
|
+
#process;
|
|
1596
|
+
#originalProcessEmit;
|
|
1597
|
+
#originalProcessReallyExit;
|
|
1598
|
+
#sigListeners = {};
|
|
1599
|
+
#loaded = false;
|
|
1600
|
+
constructor(process4) {
|
|
1601
|
+
super();
|
|
1602
|
+
this.#process = process4;
|
|
1603
|
+
this.#sigListeners = {};
|
|
1604
|
+
for (const sig of signals) {
|
|
1605
|
+
this.#sigListeners[sig] = () => {
|
|
1606
|
+
const listeners = this.#process.listeners(sig);
|
|
1607
|
+
let { count } = this.#emitter;
|
|
1608
|
+
const p = process4;
|
|
1609
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
1610
|
+
count += p.__signal_exit_emitter__.count;
|
|
1611
|
+
}
|
|
1612
|
+
if (listeners.length === count) {
|
|
1613
|
+
this.unload();
|
|
1614
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
1615
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
1616
|
+
if (!ret)
|
|
1617
|
+
process4.kill(process4.pid, s);
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
}
|
|
1621
|
+
this.#originalProcessReallyExit = process4.reallyExit;
|
|
1622
|
+
this.#originalProcessEmit = process4.emit;
|
|
1623
|
+
}
|
|
1624
|
+
onExit(cb, opts) {
|
|
1625
|
+
if (!processOk(this.#process)) {
|
|
1626
|
+
return () => {
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
if (this.#loaded === false) {
|
|
1630
|
+
this.load();
|
|
1631
|
+
}
|
|
1632
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
1633
|
+
this.#emitter.on(ev, cb);
|
|
1634
|
+
return () => {
|
|
1635
|
+
this.#emitter.removeListener(ev, cb);
|
|
1636
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
1637
|
+
this.unload();
|
|
1638
|
+
}
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
load() {
|
|
1642
|
+
if (this.#loaded) {
|
|
1643
|
+
return;
|
|
1644
|
+
}
|
|
1645
|
+
this.#loaded = true;
|
|
1646
|
+
this.#emitter.count += 1;
|
|
1647
|
+
for (const sig of signals) {
|
|
1648
|
+
try {
|
|
1649
|
+
const fn = this.#sigListeners[sig];
|
|
1650
|
+
if (fn)
|
|
1651
|
+
this.#process.on(sig, fn);
|
|
1652
|
+
} catch (_) {
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
this.#process.emit = (ev, ...a) => {
|
|
1656
|
+
return this.#processEmit(ev, ...a);
|
|
1657
|
+
};
|
|
1658
|
+
this.#process.reallyExit = (code) => {
|
|
1659
|
+
return this.#processReallyExit(code);
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
unload() {
|
|
1663
|
+
if (!this.#loaded) {
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
this.#loaded = false;
|
|
1667
|
+
signals.forEach((sig) => {
|
|
1668
|
+
const listener = this.#sigListeners[sig];
|
|
1669
|
+
if (!listener) {
|
|
1670
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
1671
|
+
}
|
|
1672
|
+
try {
|
|
1673
|
+
this.#process.removeListener(sig, listener);
|
|
1674
|
+
} catch (_) {
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
1678
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
1679
|
+
this.#emitter.count -= 1;
|
|
1680
|
+
}
|
|
1681
|
+
#processReallyExit(code) {
|
|
1682
|
+
if (!processOk(this.#process)) {
|
|
1683
|
+
return 0;
|
|
1684
|
+
}
|
|
1685
|
+
this.#process.exitCode = code || 0;
|
|
1686
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1687
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
1688
|
+
}
|
|
1689
|
+
#processEmit(ev, ...args) {
|
|
1690
|
+
const og = this.#originalProcessEmit;
|
|
1691
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
1692
|
+
if (typeof args[0] === "number") {
|
|
1693
|
+
this.#process.exitCode = args[0];
|
|
1694
|
+
}
|
|
1695
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
1696
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1697
|
+
return ret;
|
|
1698
|
+
} else {
|
|
1699
|
+
return og.call(this.#process, ev, ...args);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
};
|
|
1703
|
+
var process3 = globalThis.process;
|
|
1704
|
+
var {
|
|
1705
|
+
/**
|
|
1706
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
1707
|
+
* exit, or running out of stuff to do.
|
|
1708
|
+
*
|
|
1709
|
+
* If the global process object is not suitable for instrumentation,
|
|
1710
|
+
* then this will be a no-op.
|
|
1711
|
+
*
|
|
1712
|
+
* Returns a function that may be used to unload signal-exit.
|
|
1713
|
+
*/
|
|
1714
|
+
onExit,
|
|
1715
|
+
/**
|
|
1716
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
1717
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
1718
|
+
* Mostly exposed for the benefit of testing.
|
|
1719
|
+
*
|
|
1720
|
+
* @internal
|
|
1721
|
+
*/
|
|
1722
|
+
load,
|
|
1723
|
+
/**
|
|
1724
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
1725
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
1726
|
+
* Mostly exposed for the benefit of testing.
|
|
1727
|
+
*
|
|
1728
|
+
* @internal
|
|
1729
|
+
*/
|
|
1730
|
+
unload
|
|
1731
|
+
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback());
|
|
1732
|
+
|
|
1733
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
1734
|
+
init_esm_shims();
|
|
1735
|
+
import { stripVTControlCharacters } from "util";
|
|
1736
|
+
|
|
1737
|
+
// node_modules/.pnpm/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
1738
|
+
init_esm_shims();
|
|
1739
|
+
var ESC = "\x1B[";
|
|
1740
|
+
var cursorLeft = ESC + "G";
|
|
1741
|
+
var cursorHide = ESC + "?25l";
|
|
1742
|
+
var cursorShow = ESC + "?25h";
|
|
1743
|
+
var cursorUp = (rows = 1) => rows > 0 ? `${ESC}${rows}A` : "";
|
|
1744
|
+
var cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : "";
|
|
1745
|
+
var cursorTo = (x, y) => {
|
|
1746
|
+
if (typeof y === "number" && !Number.isNaN(y)) {
|
|
1747
|
+
return `${ESC}${y + 1};${x + 1}H`;
|
|
1748
|
+
}
|
|
1749
|
+
return `${ESC}${x + 1}G`;
|
|
1750
|
+
};
|
|
1751
|
+
var eraseLine = ESC + "2K";
|
|
1752
|
+
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
1753
|
+
|
|
1754
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
1755
|
+
var height = (content) => content.split("\n").length;
|
|
1756
|
+
var lastLine = (content) => content.split("\n").pop() ?? "";
|
|
1757
|
+
var ScreenManager = class {
|
|
1758
|
+
// These variables are keeping information to allow correct prompt re-rendering
|
|
1759
|
+
height = 0;
|
|
1760
|
+
extraLinesUnderPrompt = 0;
|
|
1761
|
+
cursorPos;
|
|
1762
|
+
rl;
|
|
1763
|
+
constructor(rl) {
|
|
1764
|
+
this.rl = rl;
|
|
1765
|
+
this.cursorPos = rl.getCursorPos();
|
|
1766
|
+
}
|
|
1767
|
+
write(content) {
|
|
1768
|
+
this.rl.output.unmute();
|
|
1769
|
+
this.rl.output.write(content);
|
|
1770
|
+
this.rl.output.mute();
|
|
1771
|
+
}
|
|
1772
|
+
render(content, bottomContent = "") {
|
|
1773
|
+
const promptLine = lastLine(content);
|
|
1774
|
+
const rawPromptLine = stripVTControlCharacters(promptLine);
|
|
1775
|
+
let prompt = rawPromptLine;
|
|
1776
|
+
if (this.rl.line.length > 0) {
|
|
1777
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
1778
|
+
}
|
|
1779
|
+
this.rl.setPrompt(prompt);
|
|
1780
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
1781
|
+
const width = readlineWidth();
|
|
1782
|
+
content = breakLines(content, width);
|
|
1783
|
+
bottomContent = breakLines(bottomContent, width);
|
|
1784
|
+
if (rawPromptLine.length % width === 0) {
|
|
1785
|
+
content += "\n";
|
|
1786
|
+
}
|
|
1787
|
+
let output = content + (bottomContent ? "\n" + bottomContent : "");
|
|
1788
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
1789
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
|
|
1790
|
+
if (bottomContentHeight > 0)
|
|
1791
|
+
output += cursorUp(bottomContentHeight);
|
|
1792
|
+
output += cursorTo(this.cursorPos.cols);
|
|
1793
|
+
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
|
1794
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
1795
|
+
this.height = height(output);
|
|
1796
|
+
}
|
|
1797
|
+
checkCursorPos() {
|
|
1798
|
+
const cursorPos = this.rl.getCursorPos();
|
|
1799
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
1800
|
+
this.write(cursorTo(cursorPos.cols));
|
|
1801
|
+
this.cursorPos = cursorPos;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
done({ clearContent }) {
|
|
1805
|
+
this.rl.setPrompt("");
|
|
1806
|
+
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
1807
|
+
output += clearContent ? eraseLines(this.height) : "\n";
|
|
1808
|
+
output += cursorShow;
|
|
1809
|
+
this.write(output);
|
|
1810
|
+
this.rl.close();
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
|
|
1814
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
1815
|
+
init_esm_shims();
|
|
1816
|
+
var PromisePolyfill = class extends Promise {
|
|
1817
|
+
// Available starting from Node 22
|
|
1818
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
|
|
1819
|
+
static withResolver() {
|
|
1820
|
+
let resolve;
|
|
1821
|
+
let reject;
|
|
1822
|
+
const promise = new Promise((res, rej) => {
|
|
1823
|
+
resolve = res;
|
|
1824
|
+
reject = rej;
|
|
1825
|
+
});
|
|
1826
|
+
return { promise, resolve, reject };
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
|
|
1830
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
1831
|
+
function getCallSites() {
|
|
1832
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
1833
|
+
let result = [];
|
|
1834
|
+
try {
|
|
1835
|
+
Error.prepareStackTrace = (_, callSites) => {
|
|
1836
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
1837
|
+
result = callSitesWithoutCurrent;
|
|
1838
|
+
return callSitesWithoutCurrent;
|
|
1839
|
+
};
|
|
1840
|
+
new Error().stack;
|
|
1841
|
+
} catch {
|
|
1842
|
+
return result;
|
|
1843
|
+
}
|
|
1844
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
1845
|
+
return result;
|
|
1846
|
+
}
|
|
1847
|
+
function createPrompt(view) {
|
|
1848
|
+
const callSites = getCallSites();
|
|
1849
|
+
const prompt = (config, context = {}) => {
|
|
1850
|
+
const { input = process.stdin, signal } = context;
|
|
1851
|
+
const cleanups = /* @__PURE__ */ new Set();
|
|
1852
|
+
const output = new import_mute_stream.default();
|
|
1853
|
+
output.pipe(context.output ?? process.stdout);
|
|
1854
|
+
const rl = readline2.createInterface({
|
|
1855
|
+
terminal: true,
|
|
1856
|
+
input,
|
|
1857
|
+
output
|
|
1858
|
+
});
|
|
1859
|
+
const screen = new ScreenManager(rl);
|
|
1860
|
+
const { promise, resolve, reject } = PromisePolyfill.withResolver();
|
|
1861
|
+
const cancel = () => reject(new CancelPromptError());
|
|
1862
|
+
if (signal) {
|
|
1863
|
+
const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
|
|
1864
|
+
if (signal.aborted) {
|
|
1865
|
+
abort();
|
|
1866
|
+
return Object.assign(promise, { cancel });
|
|
1867
|
+
}
|
|
1868
|
+
signal.addEventListener("abort", abort);
|
|
1869
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
1870
|
+
}
|
|
1871
|
+
cleanups.add(onExit((code, signal2) => {
|
|
1872
|
+
reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
|
|
1873
|
+
}));
|
|
1874
|
+
const sigint = () => reject(new ExitPromptError(`User force closed the prompt with SIGINT`));
|
|
1875
|
+
rl.on("SIGINT", sigint);
|
|
1876
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
1877
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
1878
|
+
rl.input.on("keypress", checkCursorPos);
|
|
1879
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
1880
|
+
return withHooks(rl, (cycle) => {
|
|
1881
|
+
const hooksCleanup = AsyncResource3.bind(() => effectScheduler.clearAll());
|
|
1882
|
+
rl.on("close", hooksCleanup);
|
|
1883
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
1884
|
+
cycle(() => {
|
|
1885
|
+
try {
|
|
1886
|
+
const nextView = view(config, (value) => {
|
|
1887
|
+
setImmediate(() => resolve(value));
|
|
1888
|
+
});
|
|
1889
|
+
if (nextView === void 0) {
|
|
1890
|
+
const callerFilename = callSites[1]?.getFileName();
|
|
1891
|
+
throw new Error(`Prompt functions must return a string.
|
|
1892
|
+
at ${callerFilename}`);
|
|
1893
|
+
}
|
|
1894
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
1895
|
+
screen.render(content, bottomContent);
|
|
1896
|
+
effectScheduler.run();
|
|
1897
|
+
} catch (error) {
|
|
1898
|
+
reject(error);
|
|
1899
|
+
}
|
|
1900
|
+
});
|
|
1901
|
+
return Object.assign(promise.then((answer) => {
|
|
1902
|
+
effectScheduler.clearAll();
|
|
1903
|
+
return answer;
|
|
1904
|
+
}, (error) => {
|
|
1905
|
+
effectScheduler.clearAll();
|
|
1906
|
+
throw error;
|
|
1907
|
+
}).finally(() => {
|
|
1908
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
1909
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
1910
|
+
output.end();
|
|
1911
|
+
}).then(() => promise), { cancel });
|
|
1912
|
+
});
|
|
1913
|
+
};
|
|
1914
|
+
return prompt;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
// node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.2.1/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
1918
|
+
init_esm_shims();
|
|
1919
|
+
import { styleText as styleText2 } from "util";
|
|
1920
|
+
var Separator = class {
|
|
1921
|
+
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
1922
|
+
type = "separator";
|
|
1923
|
+
constructor(separator) {
|
|
1924
|
+
if (separator) {
|
|
1925
|
+
this.separator = separator;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
static isSeparator(choice) {
|
|
1929
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
1930
|
+
}
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1933
|
+
// node_modules/.pnpm/@inquirer+checkbox@5.0.4_@types+node@25.2.1/node_modules/@inquirer/checkbox/dist/index.js
|
|
1934
|
+
import { styleText as styleText3 } from "util";
|
|
1935
|
+
var checkboxTheme = {
|
|
1936
|
+
icon: {
|
|
1937
|
+
checked: styleText3("green", dist_default.circleFilled),
|
|
1938
|
+
unchecked: dist_default.circle,
|
|
1939
|
+
cursor: dist_default.pointer
|
|
1940
|
+
},
|
|
1941
|
+
style: {
|
|
1942
|
+
disabledChoice: (text) => styleText3("dim", `- ${text}`),
|
|
1943
|
+
renderSelectedChoices: (selectedChoices) => selectedChoices.map((choice) => choice.short).join(", "),
|
|
1944
|
+
description: (text) => styleText3("cyan", text),
|
|
1945
|
+
keysHelpTip: (keys) => keys.map(([key, action]) => `${styleText3("bold", key)} ${styleText3("dim", action)}`).join(styleText3("dim", " \u2022 "))
|
|
1946
|
+
},
|
|
1947
|
+
keybindings: []
|
|
1948
|
+
};
|
|
1949
|
+
function isSelectable(item) {
|
|
1950
|
+
return !Separator.isSeparator(item) && !item.disabled;
|
|
1951
|
+
}
|
|
1952
|
+
function isChecked(item) {
|
|
1953
|
+
return isSelectable(item) && item.checked;
|
|
1954
|
+
}
|
|
1955
|
+
function toggle(item) {
|
|
1956
|
+
return isSelectable(item) ? { ...item, checked: !item.checked } : item;
|
|
1957
|
+
}
|
|
1958
|
+
function check(checked) {
|
|
1959
|
+
return function(item) {
|
|
1960
|
+
return isSelectable(item) ? { ...item, checked } : item;
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
function normalizeChoices(choices) {
|
|
1964
|
+
return choices.map((choice) => {
|
|
1965
|
+
if (Separator.isSeparator(choice))
|
|
1966
|
+
return choice;
|
|
1967
|
+
if (typeof choice === "string") {
|
|
1968
|
+
return {
|
|
1969
|
+
value: choice,
|
|
1970
|
+
name: choice,
|
|
1971
|
+
short: choice,
|
|
1972
|
+
checkedName: choice,
|
|
1973
|
+
disabled: false,
|
|
1974
|
+
checked: false
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
const name = choice.name ?? String(choice.value);
|
|
1978
|
+
const normalizedChoice = {
|
|
1979
|
+
value: choice.value,
|
|
1980
|
+
name,
|
|
1981
|
+
short: choice.short ?? name,
|
|
1982
|
+
checkedName: choice.checkedName ?? name,
|
|
1983
|
+
disabled: choice.disabled ?? false,
|
|
1984
|
+
checked: choice.checked ?? false
|
|
1985
|
+
};
|
|
1986
|
+
if (choice.description) {
|
|
1987
|
+
normalizedChoice.description = choice.description;
|
|
1988
|
+
}
|
|
1989
|
+
return normalizedChoice;
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
var dist_default2 = createPrompt((config, done) => {
|
|
1993
|
+
const { pageSize = 7, loop = true, required, validate: validate2 = () => true } = config;
|
|
1994
|
+
const shortcuts = { all: "a", invert: "i", ...config.shortcuts };
|
|
1995
|
+
const theme = makeTheme(checkboxTheme, config.theme);
|
|
1996
|
+
const { keybindings } = theme;
|
|
1997
|
+
const [status, setStatus] = useState("idle");
|
|
1998
|
+
const prefix = usePrefix({ status, theme });
|
|
1999
|
+
const [items, setItems] = useState(normalizeChoices(config.choices));
|
|
2000
|
+
const bounds = useMemo(() => {
|
|
2001
|
+
const first = items.findIndex(isSelectable);
|
|
2002
|
+
const last = items.findLastIndex(isSelectable);
|
|
2003
|
+
if (first === -1) {
|
|
2004
|
+
throw new ValidationError("[checkbox prompt] No selectable choices. All choices are disabled.");
|
|
2005
|
+
}
|
|
2006
|
+
return { first, last };
|
|
2007
|
+
}, [items]);
|
|
2008
|
+
const [active, setActive] = useState(bounds.first);
|
|
2009
|
+
const [errorMsg, setError] = useState();
|
|
2010
|
+
useKeypress(async (key) => {
|
|
2011
|
+
if (isEnterKey(key)) {
|
|
2012
|
+
const selection = items.filter(isChecked);
|
|
2013
|
+
const isValid = await validate2([...selection]);
|
|
2014
|
+
if (required && !items.some(isChecked)) {
|
|
2015
|
+
setError("At least one choice must be selected");
|
|
2016
|
+
} else if (isValid === true) {
|
|
2017
|
+
setStatus("done");
|
|
2018
|
+
done(selection.map((choice) => choice.value));
|
|
2019
|
+
} else {
|
|
2020
|
+
setError(isValid || "You must select a valid value");
|
|
2021
|
+
}
|
|
2022
|
+
} else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
|
|
2023
|
+
if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
|
|
2024
|
+
const offset = isUpKey(key, keybindings) ? -1 : 1;
|
|
2025
|
+
let next = active;
|
|
2026
|
+
do {
|
|
2027
|
+
next = (next + offset + items.length) % items.length;
|
|
2028
|
+
} while (!isSelectable(items[next]));
|
|
2029
|
+
setActive(next);
|
|
2030
|
+
}
|
|
2031
|
+
} else if (isSpaceKey(key)) {
|
|
2032
|
+
setError(void 0);
|
|
2033
|
+
setItems(items.map((choice, i) => i === active ? toggle(choice) : choice));
|
|
2034
|
+
} else if (key.name === shortcuts.all) {
|
|
2035
|
+
const selectAll = items.some((choice) => isSelectable(choice) && !choice.checked);
|
|
2036
|
+
setItems(items.map(check(selectAll)));
|
|
2037
|
+
} else if (key.name === shortcuts.invert) {
|
|
2038
|
+
setItems(items.map(toggle));
|
|
2039
|
+
} else if (isNumberKey(key)) {
|
|
2040
|
+
const selectedIndex = Number(key.name) - 1;
|
|
2041
|
+
let selectableIndex = -1;
|
|
2042
|
+
const position = items.findIndex((item) => {
|
|
2043
|
+
if (Separator.isSeparator(item))
|
|
2044
|
+
return false;
|
|
2045
|
+
selectableIndex++;
|
|
2046
|
+
return selectableIndex === selectedIndex;
|
|
2047
|
+
});
|
|
2048
|
+
const selectedItem = items[position];
|
|
2049
|
+
if (selectedItem && isSelectable(selectedItem)) {
|
|
2050
|
+
setActive(position);
|
|
2051
|
+
setItems(items.map((choice, i) => i === position ? toggle(choice) : choice));
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
const message = theme.style.message(config.message, status);
|
|
2056
|
+
let description;
|
|
2057
|
+
const page = usePagination({
|
|
2058
|
+
items,
|
|
2059
|
+
active,
|
|
2060
|
+
renderItem({ item, isActive }) {
|
|
2061
|
+
if (Separator.isSeparator(item)) {
|
|
2062
|
+
return ` ${item.separator}`;
|
|
2063
|
+
}
|
|
2064
|
+
if (item.disabled) {
|
|
2065
|
+
const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
|
|
2066
|
+
return theme.style.disabledChoice(`${item.name} ${disabledLabel}`);
|
|
2067
|
+
}
|
|
2068
|
+
if (isActive) {
|
|
2069
|
+
description = item.description;
|
|
2070
|
+
}
|
|
2071
|
+
const checkbox = item.checked ? theme.icon.checked : theme.icon.unchecked;
|
|
2072
|
+
const name = item.checked ? item.checkedName : item.name;
|
|
2073
|
+
const color = isActive ? theme.style.highlight : (x) => x;
|
|
2074
|
+
const cursor = isActive ? theme.icon.cursor : " ";
|
|
2075
|
+
return color(`${cursor}${checkbox} ${name}`);
|
|
2076
|
+
},
|
|
2077
|
+
pageSize,
|
|
2078
|
+
loop
|
|
2079
|
+
});
|
|
2080
|
+
if (status === "done") {
|
|
2081
|
+
const selection = items.filter(isChecked);
|
|
2082
|
+
const answer = theme.style.answer(theme.style.renderSelectedChoices(selection, items));
|
|
2083
|
+
return [prefix, message, answer].filter(Boolean).join(" ");
|
|
2084
|
+
}
|
|
2085
|
+
const keys = [
|
|
2086
|
+
["\u2191\u2193", "navigate"],
|
|
2087
|
+
["space", "select"]
|
|
2088
|
+
];
|
|
2089
|
+
if (shortcuts.all)
|
|
2090
|
+
keys.push([shortcuts.all, "all"]);
|
|
2091
|
+
if (shortcuts.invert)
|
|
2092
|
+
keys.push([shortcuts.invert, "invert"]);
|
|
2093
|
+
keys.push(["\u23CE", "submit"]);
|
|
2094
|
+
const helpLine = theme.style.keysHelpTip(keys);
|
|
2095
|
+
const lines = [
|
|
2096
|
+
[prefix, message].filter(Boolean).join(" "),
|
|
2097
|
+
page,
|
|
2098
|
+
" ",
|
|
2099
|
+
description ? theme.style.description(description) : "",
|
|
2100
|
+
errorMsg ? theme.style.error(errorMsg) : "",
|
|
2101
|
+
helpLine
|
|
2102
|
+
].filter(Boolean).join("\n").trimEnd();
|
|
2103
|
+
return `${lines}${cursorHide}`;
|
|
2104
|
+
});
|
|
2105
|
+
|
|
2106
|
+
// node_modules/.pnpm/@inquirer+confirm@6.0.4_@types+node@25.2.1/node_modules/@inquirer/confirm/dist/index.js
|
|
2107
|
+
init_esm_shims();
|
|
2108
|
+
function getBooleanValue(value, defaultValue) {
|
|
2109
|
+
let answer = defaultValue !== false;
|
|
2110
|
+
if (/^(y|yes)/i.test(value))
|
|
2111
|
+
answer = true;
|
|
2112
|
+
else if (/^(n|no)/i.test(value))
|
|
2113
|
+
answer = false;
|
|
2114
|
+
return answer;
|
|
2115
|
+
}
|
|
2116
|
+
function boolToString(value) {
|
|
2117
|
+
return value ? "Yes" : "No";
|
|
2118
|
+
}
|
|
2119
|
+
var dist_default3 = createPrompt((config, done) => {
|
|
2120
|
+
const { transformer = boolToString } = config;
|
|
2121
|
+
const [status, setStatus] = useState("idle");
|
|
2122
|
+
const [value, setValue] = useState("");
|
|
2123
|
+
const theme = makeTheme(config.theme);
|
|
2124
|
+
const prefix = usePrefix({ status, theme });
|
|
2125
|
+
useKeypress((key, rl) => {
|
|
2126
|
+
if (status !== "idle")
|
|
2127
|
+
return;
|
|
2128
|
+
if (isEnterKey(key)) {
|
|
2129
|
+
const answer = getBooleanValue(value, config.default);
|
|
2130
|
+
setValue(transformer(answer));
|
|
2131
|
+
setStatus("done");
|
|
2132
|
+
done(answer);
|
|
2133
|
+
} else if (isTabKey(key)) {
|
|
2134
|
+
const answer = boolToString(!getBooleanValue(value, config.default));
|
|
2135
|
+
rl.clearLine(0);
|
|
2136
|
+
rl.write(answer);
|
|
2137
|
+
setValue(answer);
|
|
2138
|
+
} else {
|
|
2139
|
+
setValue(rl.line);
|
|
2140
|
+
}
|
|
2141
|
+
});
|
|
2142
|
+
let formattedValue = value;
|
|
2143
|
+
let defaultValue = "";
|
|
2144
|
+
if (status === "done") {
|
|
2145
|
+
formattedValue = theme.style.answer(value);
|
|
2146
|
+
} else {
|
|
2147
|
+
defaultValue = ` ${theme.style.defaultAnswer(config.default === false ? "y/N" : "Y/n")}`;
|
|
2148
|
+
}
|
|
2149
|
+
const message = theme.style.message(config.message, status);
|
|
2150
|
+
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
2151
|
+
});
|
|
2152
|
+
|
|
2153
|
+
// src/utils/fs.ts
|
|
2154
|
+
init_esm_shims();
|
|
2155
|
+
import fs from "fs/promises";
|
|
2156
|
+
import { existsSync, lstatSync } from "fs";
|
|
2157
|
+
async function ensureDir(dir) {
|
|
2158
|
+
await fs.mkdir(dir, { recursive: true });
|
|
2159
|
+
}
|
|
2160
|
+
function isSymlink(p) {
|
|
2161
|
+
try {
|
|
2162
|
+
const stats = lstatSync(p);
|
|
2163
|
+
return stats.isSymbolicLink();
|
|
2164
|
+
} catch {
|
|
2165
|
+
return false;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
async function createSymlink(target, path7) {
|
|
2169
|
+
const type = process.platform === "win32" ? "junction" : "dir";
|
|
2170
|
+
if (existsSync(path7)) {
|
|
2171
|
+
if (isSymlink(path7)) {
|
|
2172
|
+
await fs.unlink(path7);
|
|
2173
|
+
} else {
|
|
2174
|
+
throw new Error(`\u8DEF\u5F84 ${path7} \u5DF2\u5B58\u5728\u4E14\u4E0D\u662F\u7B26\u53F7\u94FE\u63A5\uFF0C\u8BF7\u624B\u52A8\u6E05\u7406\u3002`);
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
await fs.symlink(target, path7, type);
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
// src/commands/init.ts
|
|
2181
|
+
var TEMPLATE_SKILL = `---
|
|
2182
|
+
name: \u793A\u4F8B\u6280\u80FD
|
|
2183
|
+
description: \u8FD9\u662F\u4E00\u4E2A\u7531 Skillink \u751F\u6210\u7684\u6F14\u793A\u6280\u80FD\u3002
|
|
2184
|
+
---
|
|
2185
|
+
|
|
2186
|
+
# \u4F7F\u7528\u8BF4\u660E
|
|
2187
|
+
|
|
2188
|
+
\u6FC0\u6D3B\u6B64\u6280\u80FD\u5373\u53EF\u4F7F\u7528\u3002
|
|
2189
|
+
`;
|
|
2190
|
+
var DEFAULT_TARGETS = [
|
|
2191
|
+
{ name: "Cursor", value: "cursor", path: ".cursor/rules" },
|
|
2192
|
+
{ name: "Windsurf", value: "windsurf", path: ".windsurf/rules" },
|
|
2193
|
+
{ name: "VSCode", value: "vscode", path: ".vscode/skills" },
|
|
2194
|
+
{ name: "Gemini", value: "gemini", path: ".gemini/modules" }
|
|
2195
|
+
];
|
|
2196
|
+
async function initCommand(cwd = process.cwd()) {
|
|
2197
|
+
console.log("\u2728 Skillink \u521D\u59CB\u5316");
|
|
2198
|
+
const skillsDir = path2.join(cwd, ".agents", "skills");
|
|
2199
|
+
const configFile = path2.join(cwd, "skillink.config.ts");
|
|
2200
|
+
if (!existsSync2(skillsDir)) {
|
|
2201
|
+
const create = await dist_default3({
|
|
2202
|
+
message: `\u662F\u5426\u5728 ${skillsDir} \u521B\u5EFA\u6280\u80FD\u76EE\u5F55\uFF1F`,
|
|
2203
|
+
default: true
|
|
2204
|
+
});
|
|
2205
|
+
if (create) {
|
|
2206
|
+
await ensureDir(skillsDir);
|
|
2207
|
+
const exampleDir = path2.join(skillsDir, "example-skill");
|
|
2208
|
+
await ensureDir(exampleDir);
|
|
2209
|
+
await fs2.writeFile(path2.join(exampleDir, "SKILL.md"), TEMPLATE_SKILL);
|
|
2210
|
+
console.log("\u2705 \u5DF2\u521B\u5EFA\u793A\u4F8B\u6280\u80FD\u3002");
|
|
2211
|
+
}
|
|
2212
|
+
} else {
|
|
2213
|
+
console.log("\u2139\uFE0F \u6280\u80FD\u76EE\u5F55\u5DF2\u5B58\u5728\u3002");
|
|
2214
|
+
}
|
|
2215
|
+
const selectedTargets = await dist_default2({
|
|
2216
|
+
message: "\u9009\u62E9\u8981\u540C\u6B65\u7684 AI \u5DE5\u5177\uFF1A",
|
|
2217
|
+
choices: DEFAULT_TARGETS.map((t) => ({ name: t.name, value: t }))
|
|
2218
|
+
});
|
|
2219
|
+
if (selectedTargets.length === 0) {
|
|
2220
|
+
console.log("\u26A0\uFE0F \u672A\u9009\u62E9\u4EFB\u4F55\u76EE\u6807\u3002\u914D\u7F6E\u6587\u4EF6\u4E2D\u7684\u76EE\u6807\u5217\u8868\u5C06\u4E3A\u7A7A\u3002");
|
|
2221
|
+
}
|
|
2222
|
+
if (existsSync2(configFile)) {
|
|
2223
|
+
const overwrite = await dist_default3({
|
|
2224
|
+
message: "\u914D\u7F6E\u6587\u4EF6\u5DF2\u5B58\u5728\u3002\u662F\u5426\u8986\u76D6\uFF1F",
|
|
2225
|
+
default: false
|
|
2226
|
+
});
|
|
2227
|
+
if (!overwrite) {
|
|
2228
|
+
console.log("\u274C \u521D\u59CB\u5316\u5DF2\u53D6\u6D88\u3002");
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
const configContent = `import { defineConfig } from 'skillink';
|
|
2233
|
+
|
|
2234
|
+
export default defineConfig({
|
|
2235
|
+
source: '.agents/skills',
|
|
2236
|
+
targets: [
|
|
2237
|
+
${selectedTargets.map(
|
|
2238
|
+
(t) => ` {
|
|
2239
|
+
name: '${t.value}',
|
|
2240
|
+
path: '${t.path}',
|
|
2241
|
+
enabled: true,
|
|
2242
|
+
},`
|
|
2243
|
+
).join("\n")}
|
|
2244
|
+
],
|
|
2245
|
+
});
|
|
2246
|
+
`;
|
|
2247
|
+
await fs2.writeFile(configFile, configContent);
|
|
2248
|
+
console.log("\u2705 \u5DF2\u521B\u5EFA skillink.config.ts");
|
|
2249
|
+
console.log('\n\u{1F449} \u8FD0\u884C "npx @boses/skillink sync" \u5F00\u59CB\u540C\u6B65\uFF01');
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
// src/commands/sync.ts
|
|
2253
|
+
init_esm_shims();
|
|
2254
|
+
import chokidar from "chokidar";
|
|
2255
|
+
import path5 from "path";
|
|
2256
|
+
|
|
2257
|
+
// src/core/config.ts
|
|
2258
|
+
init_esm_shims();
|
|
2259
|
+
import path3 from "path";
|
|
2260
|
+
import { existsSync as existsSync3 } from "fs";
|
|
2261
|
+
import { createJiti } from "jiti";
|
|
2262
|
+
var CONFIG_FILES = [
|
|
2263
|
+
"skillink.config.ts",
|
|
2264
|
+
"skillink.config.js",
|
|
2265
|
+
"skillink.config.mjs",
|
|
2266
|
+
"skillink.config.cjs"
|
|
2267
|
+
];
|
|
2268
|
+
async function loadConfig(cwd = process.cwd()) {
|
|
2269
|
+
const jiti = createJiti(cwd);
|
|
2270
|
+
for (const file of CONFIG_FILES) {
|
|
2271
|
+
const configPath = path3.join(cwd, file);
|
|
2272
|
+
if (existsSync3(configPath)) {
|
|
2273
|
+
try {
|
|
2274
|
+
const mod = await jiti.import(configPath);
|
|
2275
|
+
return mod.default || mod;
|
|
2276
|
+
} catch (error) {
|
|
2277
|
+
console.error(`\u65E0\u6CD5\u4ECE ${file} \u52A0\u8F7D\u914D\u7F6E:`, error);
|
|
2278
|
+
return null;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
return null;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
// src/core/linker.ts
|
|
2286
|
+
init_esm_shims();
|
|
2287
|
+
import path4 from "path";
|
|
2288
|
+
import fs3 from "fs/promises";
|
|
2289
|
+
import { existsSync as existsSync4 } from "fs";
|
|
2290
|
+
var Linker = class {
|
|
2291
|
+
config;
|
|
2292
|
+
root;
|
|
2293
|
+
constructor(root, config) {
|
|
2294
|
+
this.root = root;
|
|
2295
|
+
this.config = config;
|
|
2296
|
+
}
|
|
2297
|
+
/**
|
|
2298
|
+
* 将所有技能同步到所有目标
|
|
2299
|
+
*/
|
|
2300
|
+
async sync() {
|
|
2301
|
+
const results = [];
|
|
2302
|
+
const sourceDir = path4.resolve(
|
|
2303
|
+
this.root,
|
|
2304
|
+
this.config.source || ".agents/skills"
|
|
2305
|
+
);
|
|
2306
|
+
if (!existsSync4(sourceDir)) {
|
|
2307
|
+
throw new Error(`\u672A\u627E\u5230\u6E90\u76EE\u5F55: ${sourceDir}`);
|
|
2308
|
+
}
|
|
2309
|
+
const skills = await this.getSkills(sourceDir);
|
|
2310
|
+
const targets = this.config.targets.filter((t) => t.enabled !== false);
|
|
2311
|
+
for (const target of targets) {
|
|
2312
|
+
const targetDir = path4.resolve(this.root, target.path);
|
|
2313
|
+
try {
|
|
2314
|
+
await ensureDir(targetDir);
|
|
2315
|
+
for (const skill of skills) {
|
|
2316
|
+
const result = await this.syncSkill(sourceDir, targetDir, skill);
|
|
2317
|
+
results.push({ ...result, target: target.name });
|
|
2318
|
+
}
|
|
2319
|
+
const cleanResults = await this.cleanStale(targetDir, skills);
|
|
2320
|
+
results.push(
|
|
2321
|
+
...cleanResults.map((r) => ({ ...r, target: target.name }))
|
|
2322
|
+
);
|
|
2323
|
+
} catch (error) {
|
|
2324
|
+
results.push({
|
|
2325
|
+
skill: "*",
|
|
2326
|
+
target: target.name,
|
|
2327
|
+
status: "failed",
|
|
2328
|
+
message: `\u76EE\u6807\u9519\u8BEF: ${error instanceof Error ? error.message : String(error)}`
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
return results;
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* 同步单个技能(创建或修复链接)
|
|
2336
|
+
*/
|
|
2337
|
+
async syncSkill(sourceRoot, targetRoot, skillName) {
|
|
2338
|
+
const sourcePath = path4.join(sourceRoot, skillName);
|
|
2339
|
+
const targetPath = path4.join(targetRoot, skillName);
|
|
2340
|
+
try {
|
|
2341
|
+
if (existsSync4(targetPath)) {
|
|
2342
|
+
if (isSymlink(targetPath)) {
|
|
2343
|
+
const currentTarget = await fs3.readlink(targetPath);
|
|
2344
|
+
const absCurrent = path4.resolve(
|
|
2345
|
+
path4.dirname(targetPath),
|
|
2346
|
+
currentTarget
|
|
2347
|
+
);
|
|
2348
|
+
const absSource = path4.resolve(sourcePath);
|
|
2349
|
+
if (absCurrent === absSource) {
|
|
2350
|
+
return {
|
|
2351
|
+
skill: skillName,
|
|
2352
|
+
target: "",
|
|
2353
|
+
status: "skipped",
|
|
2354
|
+
message: "\u5DF2\u6B63\u786E\u94FE\u63A5"
|
|
2355
|
+
};
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
await createSymlink(sourcePath, targetPath);
|
|
2360
|
+
return { skill: skillName, target: "", status: "linked" };
|
|
2361
|
+
} catch (error) {
|
|
2362
|
+
return {
|
|
2363
|
+
skill: skillName,
|
|
2364
|
+
target: "",
|
|
2365
|
+
status: "failed",
|
|
2366
|
+
message: error instanceof Error ? error.message : String(error)
|
|
2367
|
+
};
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
/**
|
|
2371
|
+
* 清理目标目录中的失效链接
|
|
2372
|
+
*/
|
|
2373
|
+
async cleanStale(targetRoot, validSkills) {
|
|
2374
|
+
const results = [];
|
|
2375
|
+
if (!existsSync4(targetRoot)) return [];
|
|
2376
|
+
const items = await fs3.readdir(targetRoot, { withFileTypes: true });
|
|
2377
|
+
for (const item of items) {
|
|
2378
|
+
if (item.isDirectory() || item.isSymbolicLink()) {
|
|
2379
|
+
if (!validSkills.includes(item.name)) {
|
|
2380
|
+
const itemPath = path4.join(targetRoot, item.name);
|
|
2381
|
+
if (isSymlink(itemPath)) {
|
|
2382
|
+
await fs3.unlink(itemPath);
|
|
2383
|
+
results.push({
|
|
2384
|
+
skill: item.name,
|
|
2385
|
+
target: "",
|
|
2386
|
+
status: "cleaned",
|
|
2387
|
+
message: "\u5DF2\u79FB\u9664\u5931\u6548\u94FE\u63A5"
|
|
2388
|
+
});
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
return results;
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* 将特定技能同步到所有目标(用于 Watch 模式)
|
|
2397
|
+
*/
|
|
2398
|
+
async syncSkillToAll(skillName) {
|
|
2399
|
+
const sourceDir = path4.resolve(
|
|
2400
|
+
this.root,
|
|
2401
|
+
this.config.source || ".agents/skills"
|
|
2402
|
+
);
|
|
2403
|
+
const targets = this.config.targets.filter((t) => t.enabled !== false);
|
|
2404
|
+
for (const target of targets) {
|
|
2405
|
+
const targetDir = path4.resolve(this.root, target.path);
|
|
2406
|
+
await ensureDir(targetDir);
|
|
2407
|
+
await this.syncSkill(sourceDir, targetDir, skillName);
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* 从所有目标中移除特定技能(用于 Watch 模式)
|
|
2412
|
+
*/
|
|
2413
|
+
async removeSkillFromAll(skillName) {
|
|
2414
|
+
const targets = this.config.targets.filter((t) => t.enabled !== false);
|
|
2415
|
+
for (const target of targets) {
|
|
2416
|
+
const targetDir = path4.resolve(this.root, target.path);
|
|
2417
|
+
const targetPath = path4.join(targetDir, skillName);
|
|
2418
|
+
if (existsSync4(targetPath)) {
|
|
2419
|
+
if (isSymlink(targetPath)) {
|
|
2420
|
+
await fs3.unlink(targetPath);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* 清理所有由 Skillink 创建的符号链接
|
|
2427
|
+
*/
|
|
2428
|
+
async cleanAll() {
|
|
2429
|
+
const targets = this.config.targets.filter((t) => t.enabled !== false);
|
|
2430
|
+
for (const target of targets) {
|
|
2431
|
+
const targetDir = path4.resolve(this.root, target.path);
|
|
2432
|
+
if (!existsSync4(targetDir)) continue;
|
|
2433
|
+
const items = await fs3.readdir(targetDir, { withFileTypes: true });
|
|
2434
|
+
for (const item of items) {
|
|
2435
|
+
if (item.isSymbolicLink()) {
|
|
2436
|
+
const itemPath = path4.join(targetDir, item.name);
|
|
2437
|
+
try {
|
|
2438
|
+
const linkTarget = await fs3.readlink(itemPath);
|
|
2439
|
+
const absLinkTarget = path4.resolve(targetDir, linkTarget);
|
|
2440
|
+
const absSourceDir = path4.resolve(
|
|
2441
|
+
this.root,
|
|
2442
|
+
this.config.source || ".agents/skills"
|
|
2443
|
+
);
|
|
2444
|
+
if (absLinkTarget.startsWith(absSourceDir)) {
|
|
2445
|
+
await fs3.unlink(itemPath);
|
|
2446
|
+
console.log(`\u5DF2\u4ECE ${target.name} \u79FB\u9664 ${item.name}`);
|
|
2447
|
+
}
|
|
2448
|
+
} catch {
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
/**
|
|
2455
|
+
* 获取源目录下的所有有效技能(子目录)
|
|
2456
|
+
*/
|
|
2457
|
+
async getSkills(sourceDir) {
|
|
2458
|
+
const items = await fs3.readdir(sourceDir, { withFileTypes: true });
|
|
2459
|
+
return items.filter((item) => item.isDirectory() && !item.name.startsWith(".")).map((item) => item.name);
|
|
2460
|
+
}
|
|
2461
|
+
};
|
|
2462
|
+
|
|
2463
|
+
// src/commands/sync.ts
|
|
2464
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
2465
|
+
async function syncCommand(options) {
|
|
2466
|
+
const cwd = options.cwd || process.cwd();
|
|
2467
|
+
const config = await loadConfig(cwd);
|
|
2468
|
+
if (!config) {
|
|
2469
|
+
console.error(import_picocolors.default.red('\u274C \u672A\u627E\u5230\u914D\u7F6E\u3002\u8BF7\u5148\u8FD0\u884C "skillink init"\u3002'));
|
|
2470
|
+
process.exit(1);
|
|
2471
|
+
}
|
|
2472
|
+
const linker = new Linker(cwd, config);
|
|
2473
|
+
console.log(import_picocolors.default.cyan("\u{1F504} \u6B63\u5728\u540C\u6B65\u6280\u80FD..."));
|
|
2474
|
+
const results = await linker.sync();
|
|
2475
|
+
let changes = 0;
|
|
2476
|
+
results.forEach((r) => {
|
|
2477
|
+
if (r.status === "linked" || r.status === "cleaned") {
|
|
2478
|
+
console.log(
|
|
2479
|
+
`${import_picocolors.default.green(r.status === "linked" ? "+" : "-")} ${r.skill} -> ${r.target}`
|
|
2480
|
+
);
|
|
2481
|
+
changes++;
|
|
2482
|
+
} else if (r.status === "failed") {
|
|
2483
|
+
console.error(import_picocolors.default.red(`\u274C ${r.skill} -> ${r.target}: ${r.message}`));
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
if (changes === 0) {
|
|
2487
|
+
console.log(import_picocolors.default.gray("\u65E0\u9700\u66F4\u6539\u3002\u6240\u6709\u6280\u80FD\u5DF2\u540C\u6B65\u3002"));
|
|
2488
|
+
} else {
|
|
2489
|
+
console.log(import_picocolors.default.green(`\u2705 \u5DF2\u540C\u6B65 ${changes} \u5904\u53D8\u66F4\u3002`));
|
|
2490
|
+
}
|
|
2491
|
+
if (options.watch) {
|
|
2492
|
+
console.log(import_picocolors.default.cyan("\n\u{1F440} \u6B63\u5728\u76D1\u89C6\u53D8\u66F4... \u6309 Ctrl+C \u505C\u6B62\u3002"));
|
|
2493
|
+
const sourceDir = path5.resolve(cwd, config.source || ".agents/skills");
|
|
2494
|
+
const watcher = chokidar.watch(sourceDir, {
|
|
2495
|
+
ignoreInitial: true,
|
|
2496
|
+
depth: 0,
|
|
2497
|
+
awaitWriteFinish: {
|
|
2498
|
+
stabilityThreshold: 100,
|
|
2499
|
+
pollInterval: 100
|
|
2500
|
+
}
|
|
2501
|
+
});
|
|
2502
|
+
watcher.on("all", async (event, filePath) => {
|
|
2503
|
+
const fileName = path5.basename(filePath);
|
|
2504
|
+
if (event === "addDir") {
|
|
2505
|
+
console.log(import_picocolors.default.green(`+ \u68C0\u6D4B\u5230\u65B0\u6280\u80FD: ${fileName}`));
|
|
2506
|
+
await linker.syncSkillToAll(fileName);
|
|
2507
|
+
} else if (event === "unlinkDir") {
|
|
2508
|
+
console.log(import_picocolors.default.red(`- \u6280\u80FD\u5DF2\u79FB\u9664: ${fileName}`));
|
|
2509
|
+
await linker.removeSkillFromAll(fileName);
|
|
2510
|
+
}
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
// src/commands/status.ts
|
|
2516
|
+
init_esm_shims();
|
|
2517
|
+
|
|
2518
|
+
// src/utils/logger.ts
|
|
2519
|
+
init_esm_shims();
|
|
2520
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
2521
|
+
var logger = {
|
|
2522
|
+
info: (msg) => console.log(import_picocolors2.default.cyan(msg)),
|
|
2523
|
+
success: (msg) => console.log(import_picocolors2.default.green(msg)),
|
|
2524
|
+
warn: (msg) => console.log(import_picocolors2.default.yellow(msg)),
|
|
2525
|
+
error: (msg) => console.error(import_picocolors2.default.red(msg)),
|
|
2526
|
+
gray: (msg) => console.log(import_picocolors2.default.gray(msg)),
|
|
2527
|
+
title: (msg) => console.log(import_picocolors2.default.bold(import_picocolors2.default.magenta(msg))),
|
|
2528
|
+
newline: () => console.log("")
|
|
2529
|
+
};
|
|
2530
|
+
|
|
2531
|
+
// src/commands/status.ts
|
|
2532
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
2533
|
+
import path6 from "path";
|
|
2534
|
+
import fs4 from "fs/promises";
|
|
2535
|
+
import { existsSync as existsSync5 } from "fs";
|
|
2536
|
+
async function statusCommand(options) {
|
|
2537
|
+
const cwd = options.cwd || process.cwd();
|
|
2538
|
+
const config = await loadConfig(cwd);
|
|
2539
|
+
if (!config) {
|
|
2540
|
+
logger.error('\u672A\u627E\u5230\u914D\u7F6E\u6587\u4EF6\u3002\u8BF7\u5148\u8FD0\u884C "skillink init"\u3002');
|
|
2541
|
+
return;
|
|
2542
|
+
}
|
|
2543
|
+
logger.title("Skillink \u540C\u6B65\u72B6\u6001");
|
|
2544
|
+
logger.newline();
|
|
2545
|
+
const sourcePath = path6.resolve(cwd, config.source || ".agents/skills");
|
|
2546
|
+
logger.info(`\u6E90\u76EE\u5F55: ${sourcePath}`);
|
|
2547
|
+
if (!existsSync5(sourcePath)) {
|
|
2548
|
+
logger.error("\u6E90\u76EE\u5F55\u4E0D\u5B58\u5728\uFF01");
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
const skills = await fs4.readdir(sourcePath, { withFileTypes: true });
|
|
2552
|
+
const validSkills = skills.filter((s) => s.isDirectory() && !s.name.startsWith(".")).map((s) => s.name);
|
|
2553
|
+
logger.gray(`\u627E\u5230 ${validSkills.length} \u4E2A\u6280\u80FD\u3002`);
|
|
2554
|
+
logger.newline();
|
|
2555
|
+
logger.info("\u76EE\u6807\u5DE5\u5177:");
|
|
2556
|
+
for (const target of config.targets) {
|
|
2557
|
+
if (target.enabled === false) continue;
|
|
2558
|
+
const targetDir = path6.resolve(cwd, target.path);
|
|
2559
|
+
console.log(`${import_picocolors3.default.bold(target.name)} [${targetDir}]`);
|
|
2560
|
+
if (!existsSync5(targetDir)) {
|
|
2561
|
+
console.log(import_picocolors3.default.red(" - \u76EE\u5F55\u7F3A\u5931\uFF08\u8FD0\u884C sync \u547D\u4EE4\u4EE5\u521B\u5EFA\uFF09"));
|
|
2562
|
+
continue;
|
|
2563
|
+
}
|
|
2564
|
+
let syncedCount = 0;
|
|
2565
|
+
let missingCount = 0;
|
|
2566
|
+
let brokenCount = 0;
|
|
2567
|
+
for (const skill of validSkills) {
|
|
2568
|
+
const linkPath = path6.join(targetDir, skill);
|
|
2569
|
+
if (!existsSync5(linkPath)) {
|
|
2570
|
+
try {
|
|
2571
|
+
const stats = await fs4.lstat(linkPath);
|
|
2572
|
+
if (stats.isSymbolicLink()) {
|
|
2573
|
+
brokenCount++;
|
|
2574
|
+
} else {
|
|
2575
|
+
missingCount++;
|
|
2576
|
+
}
|
|
2577
|
+
} catch {
|
|
2578
|
+
missingCount++;
|
|
2579
|
+
}
|
|
2580
|
+
} else {
|
|
2581
|
+
syncedCount++;
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
if (missingCount > 0) console.log(import_picocolors3.default.yellow(` - ${missingCount} \u4E2A\u7F3A\u5931`));
|
|
2585
|
+
if (brokenCount > 0) console.log(import_picocolors3.default.red(` - ${brokenCount} \u4E2A\u5931\u6548\u94FE\u63A5`));
|
|
2586
|
+
if (syncedCount > 0) console.log(import_picocolors3.default.green(` - ${syncedCount} \u4E2A\u5DF2\u540C\u6B65`));
|
|
2587
|
+
if (missingCount === 0 && brokenCount === 0)
|
|
2588
|
+
console.log(import_picocolors3.default.green(" \u72B6\u6001\u826F\u597D\uFF01"));
|
|
2589
|
+
console.log("");
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
// src/commands/clean.ts
|
|
2594
|
+
init_esm_shims();
|
|
2595
|
+
async function cleanCommand(cwd = process.cwd()) {
|
|
2596
|
+
const config = await loadConfig(cwd);
|
|
2597
|
+
if (!config) {
|
|
2598
|
+
logger.error("\u672A\u627E\u5230\u914D\u7F6E\u3002");
|
|
2599
|
+
return;
|
|
2600
|
+
}
|
|
2601
|
+
const answer = await dist_default3({
|
|
2602
|
+
message: "\u786E\u5B9A\u8981\u79FB\u9664\u6240\u6709\u5DF2\u540C\u6B65\u7684\u6280\u80FD\u94FE\u63A5\u5417\uFF1F",
|
|
2603
|
+
default: false
|
|
2604
|
+
});
|
|
2605
|
+
if (!answer) return;
|
|
2606
|
+
const linker = new Linker(cwd, config);
|
|
2607
|
+
logger.info("\u6B63\u5728\u6E05\u7406\u94FE\u63A5...");
|
|
2608
|
+
await linker.cleanAll();
|
|
2609
|
+
logger.success("\u6E05\u7406\u5B8C\u6210\u3002");
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
// src/index.ts
|
|
2613
|
+
var cli = cac("skillink");
|
|
2614
|
+
cli.command("init", "\u521D\u59CB\u5316 Skillink \u914D\u7F6E").action(() => initCommand());
|
|
2615
|
+
cli.command("sync", "\u5C06\u6280\u80FD\u540C\u6B65\u5230\u76EE\u6807\u5DE5\u5177").option("-w, --watch", "\u76D1\u89C6\u6587\u4EF6\u53D8\u66F4").action((options) => syncCommand(options));
|
|
2616
|
+
cli.command("status", "\u663E\u793A\u540C\u6B65\u72B6\u6001").action(() => statusCommand({}));
|
|
2617
|
+
cli.command("clean", "\u79FB\u9664\u6240\u6709\u751F\u6210\u7684\u7B26\u53F7\u94FE\u63A5").action(() => cleanCommand());
|
|
2618
|
+
cli.help();
|
|
2619
|
+
try {
|
|
2620
|
+
cli.parse();
|
|
2621
|
+
} catch (error) {
|
|
2622
|
+
logger.error(error instanceof Error ? error.message : String(error));
|
|
2623
|
+
process.exit(1);
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
export {
|
|
2627
|
+
init_esm_shims
|
|
2628
|
+
};
|