bunkit-cli 0.3.0 → 0.4.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/README.md +70 -9
- package/dist/index.js +1765 -179
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2249,6 +2249,224 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
2249
2249
|
module.exports.createColors = createColors;
|
|
2250
2250
|
});
|
|
2251
2251
|
|
|
2252
|
+
// ../../node_modules/.bun/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
|
|
2253
|
+
var require_boxes = __commonJS((exports, module) => {
|
|
2254
|
+
module.exports = {
|
|
2255
|
+
single: {
|
|
2256
|
+
topLeft: "\u250C",
|
|
2257
|
+
top: "\u2500",
|
|
2258
|
+
topRight: "\u2510",
|
|
2259
|
+
right: "\u2502",
|
|
2260
|
+
bottomRight: "\u2518",
|
|
2261
|
+
bottom: "\u2500",
|
|
2262
|
+
bottomLeft: "\u2514",
|
|
2263
|
+
left: "\u2502"
|
|
2264
|
+
},
|
|
2265
|
+
double: {
|
|
2266
|
+
topLeft: "\u2554",
|
|
2267
|
+
top: "\u2550",
|
|
2268
|
+
topRight: "\u2557",
|
|
2269
|
+
right: "\u2551",
|
|
2270
|
+
bottomRight: "\u255D",
|
|
2271
|
+
bottom: "\u2550",
|
|
2272
|
+
bottomLeft: "\u255A",
|
|
2273
|
+
left: "\u2551"
|
|
2274
|
+
},
|
|
2275
|
+
round: {
|
|
2276
|
+
topLeft: "\u256D",
|
|
2277
|
+
top: "\u2500",
|
|
2278
|
+
topRight: "\u256E",
|
|
2279
|
+
right: "\u2502",
|
|
2280
|
+
bottomRight: "\u256F",
|
|
2281
|
+
bottom: "\u2500",
|
|
2282
|
+
bottomLeft: "\u2570",
|
|
2283
|
+
left: "\u2502"
|
|
2284
|
+
},
|
|
2285
|
+
bold: {
|
|
2286
|
+
topLeft: "\u250F",
|
|
2287
|
+
top: "\u2501",
|
|
2288
|
+
topRight: "\u2513",
|
|
2289
|
+
right: "\u2503",
|
|
2290
|
+
bottomRight: "\u251B",
|
|
2291
|
+
bottom: "\u2501",
|
|
2292
|
+
bottomLeft: "\u2517",
|
|
2293
|
+
left: "\u2503"
|
|
2294
|
+
},
|
|
2295
|
+
singleDouble: {
|
|
2296
|
+
topLeft: "\u2553",
|
|
2297
|
+
top: "\u2500",
|
|
2298
|
+
topRight: "\u2556",
|
|
2299
|
+
right: "\u2551",
|
|
2300
|
+
bottomRight: "\u255C",
|
|
2301
|
+
bottom: "\u2500",
|
|
2302
|
+
bottomLeft: "\u2559",
|
|
2303
|
+
left: "\u2551"
|
|
2304
|
+
},
|
|
2305
|
+
doubleSingle: {
|
|
2306
|
+
topLeft: "\u2552",
|
|
2307
|
+
top: "\u2550",
|
|
2308
|
+
topRight: "\u2555",
|
|
2309
|
+
right: "\u2502",
|
|
2310
|
+
bottomRight: "\u255B",
|
|
2311
|
+
bottom: "\u2550",
|
|
2312
|
+
bottomLeft: "\u2558",
|
|
2313
|
+
left: "\u2502"
|
|
2314
|
+
},
|
|
2315
|
+
classic: {
|
|
2316
|
+
topLeft: "+",
|
|
2317
|
+
top: "-",
|
|
2318
|
+
topRight: "+",
|
|
2319
|
+
right: "|",
|
|
2320
|
+
bottomRight: "+",
|
|
2321
|
+
bottom: "-",
|
|
2322
|
+
bottomLeft: "+",
|
|
2323
|
+
left: "|"
|
|
2324
|
+
},
|
|
2325
|
+
arrow: {
|
|
2326
|
+
topLeft: "\u2198",
|
|
2327
|
+
top: "\u2193",
|
|
2328
|
+
topRight: "\u2199",
|
|
2329
|
+
right: "\u2190",
|
|
2330
|
+
bottomRight: "\u2196",
|
|
2331
|
+
bottom: "\u2191",
|
|
2332
|
+
bottomLeft: "\u2197",
|
|
2333
|
+
left: "\u2192"
|
|
2334
|
+
}
|
|
2335
|
+
};
|
|
2336
|
+
});
|
|
2337
|
+
|
|
2338
|
+
// ../../node_modules/.bun/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
|
|
2339
|
+
var require_cli_boxes = __commonJS((exports, module) => {
|
|
2340
|
+
var cliBoxes = require_boxes();
|
|
2341
|
+
module.exports = cliBoxes;
|
|
2342
|
+
module.exports.default = cliBoxes;
|
|
2343
|
+
});
|
|
2344
|
+
|
|
2345
|
+
// ../../node_modules/.bun/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
2346
|
+
var require_ansi_regex = __commonJS((exports, module) => {
|
|
2347
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
2348
|
+
const pattern = [
|
|
2349
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
2350
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
2351
|
+
].join("|");
|
|
2352
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
2353
|
+
};
|
|
2354
|
+
});
|
|
2355
|
+
|
|
2356
|
+
// ../../node_modules/.bun/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
2357
|
+
var require_strip_ansi = __commonJS((exports, module) => {
|
|
2358
|
+
var ansiRegex2 = require_ansi_regex();
|
|
2359
|
+
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
|
|
2360
|
+
});
|
|
2361
|
+
|
|
2362
|
+
// ../../node_modules/.bun/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
2363
|
+
var require_is_fullwidth_code_point = __commonJS((exports, module) => {
|
|
2364
|
+
var isFullwidthCodePoint = (codePoint) => {
|
|
2365
|
+
if (Number.isNaN(codePoint)) {
|
|
2366
|
+
return false;
|
|
2367
|
+
}
|
|
2368
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
|
|
2369
|
+
return true;
|
|
2370
|
+
}
|
|
2371
|
+
return false;
|
|
2372
|
+
};
|
|
2373
|
+
module.exports = isFullwidthCodePoint;
|
|
2374
|
+
module.exports.default = isFullwidthCodePoint;
|
|
2375
|
+
});
|
|
2376
|
+
|
|
2377
|
+
// ../../node_modules/.bun/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
2378
|
+
var require_emoji_regex = __commonJS((exports, module) => {
|
|
2379
|
+
module.exports = function() {
|
|
2380
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
2381
|
+
};
|
|
2382
|
+
});
|
|
2383
|
+
|
|
2384
|
+
// ../../node_modules/.bun/string-width@4.2.3/node_modules/string-width/index.js
|
|
2385
|
+
var require_string_width = __commonJS((exports, module) => {
|
|
2386
|
+
var stripAnsi2 = require_strip_ansi();
|
|
2387
|
+
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
2388
|
+
var emojiRegex = require_emoji_regex();
|
|
2389
|
+
var stringWidth2 = (string) => {
|
|
2390
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
2391
|
+
return 0;
|
|
2392
|
+
}
|
|
2393
|
+
string = stripAnsi2(string);
|
|
2394
|
+
if (string.length === 0) {
|
|
2395
|
+
return 0;
|
|
2396
|
+
}
|
|
2397
|
+
string = string.replace(emojiRegex(), " ");
|
|
2398
|
+
let width = 0;
|
|
2399
|
+
for (let i = 0;i < string.length; i++) {
|
|
2400
|
+
const code = string.codePointAt(i);
|
|
2401
|
+
if (code <= 31 || code >= 127 && code <= 159) {
|
|
2402
|
+
continue;
|
|
2403
|
+
}
|
|
2404
|
+
if (code >= 768 && code <= 879) {
|
|
2405
|
+
continue;
|
|
2406
|
+
}
|
|
2407
|
+
if (code > 65535) {
|
|
2408
|
+
i++;
|
|
2409
|
+
}
|
|
2410
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
2411
|
+
}
|
|
2412
|
+
return width;
|
|
2413
|
+
};
|
|
2414
|
+
module.exports = stringWidth2;
|
|
2415
|
+
module.exports.default = stringWidth2;
|
|
2416
|
+
});
|
|
2417
|
+
|
|
2418
|
+
// ../../node_modules/.bun/ansi-align@3.0.1/node_modules/ansi-align/index.js
|
|
2419
|
+
var require_ansi_align = __commonJS((exports, module) => {
|
|
2420
|
+
var stringWidth2 = require_string_width();
|
|
2421
|
+
function ansiAlign(text, opts) {
|
|
2422
|
+
if (!text)
|
|
2423
|
+
return text;
|
|
2424
|
+
opts = opts || {};
|
|
2425
|
+
const align = opts.align || "center";
|
|
2426
|
+
if (align === "left")
|
|
2427
|
+
return text;
|
|
2428
|
+
const split = opts.split || `
|
|
2429
|
+
`;
|
|
2430
|
+
const pad = opts.pad || " ";
|
|
2431
|
+
const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
|
|
2432
|
+
let returnString = false;
|
|
2433
|
+
if (!Array.isArray(text)) {
|
|
2434
|
+
returnString = true;
|
|
2435
|
+
text = String(text).split(split);
|
|
2436
|
+
}
|
|
2437
|
+
let width;
|
|
2438
|
+
let maxWidth = 0;
|
|
2439
|
+
text = text.map(function(str) {
|
|
2440
|
+
str = String(str);
|
|
2441
|
+
width = stringWidth2(str);
|
|
2442
|
+
maxWidth = Math.max(width, maxWidth);
|
|
2443
|
+
return {
|
|
2444
|
+
str,
|
|
2445
|
+
width
|
|
2446
|
+
};
|
|
2447
|
+
}).map(function(obj) {
|
|
2448
|
+
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
|
|
2449
|
+
});
|
|
2450
|
+
return returnString ? text.join(split) : text;
|
|
2451
|
+
}
|
|
2452
|
+
ansiAlign.left = function left(text) {
|
|
2453
|
+
return ansiAlign(text, { align: "left" });
|
|
2454
|
+
};
|
|
2455
|
+
ansiAlign.center = function center(text) {
|
|
2456
|
+
return ansiAlign(text, { align: "center" });
|
|
2457
|
+
};
|
|
2458
|
+
ansiAlign.right = function right(text) {
|
|
2459
|
+
return ansiAlign(text, { align: "right" });
|
|
2460
|
+
};
|
|
2461
|
+
module.exports = ansiAlign;
|
|
2462
|
+
function halfDiff(maxWidth, curWidth) {
|
|
2463
|
+
return Math.floor((maxWidth - curWidth) / 2);
|
|
2464
|
+
}
|
|
2465
|
+
function fullDiff(maxWidth, curWidth) {
|
|
2466
|
+
return maxWidth - curWidth;
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2469
|
+
|
|
2252
2470
|
// ../../node_modules/.bun/universalify@2.0.1/node_modules/universalify/index.js
|
|
2253
2471
|
var require_universalify = __commonJS((exports) => {
|
|
2254
2472
|
exports.fromCallback = function(fn) {
|
|
@@ -4396,9 +4614,9 @@ var require_fs2 = __commonJS((exports) => {
|
|
|
4396
4614
|
var require_path = __commonJS((exports) => {
|
|
4397
4615
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4398
4616
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
|
|
4399
|
-
var
|
|
4617
|
+
var os2 = __require("os");
|
|
4400
4618
|
var path = __require("path");
|
|
4401
|
-
var IS_WINDOWS_PLATFORM =
|
|
4619
|
+
var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
|
|
4402
4620
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
4403
4621
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
4404
4622
|
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
@@ -6985,17 +7203,17 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
6985
7203
|
}
|
|
6986
7204
|
const opts = options || {};
|
|
6987
7205
|
const posix = utils.isWindows(options);
|
|
6988
|
-
const
|
|
6989
|
-
const state =
|
|
6990
|
-
delete
|
|
7206
|
+
const regex2 = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
7207
|
+
const state = regex2.state;
|
|
7208
|
+
delete regex2.state;
|
|
6991
7209
|
let isIgnored = () => false;
|
|
6992
7210
|
if (opts.ignore) {
|
|
6993
7211
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
6994
7212
|
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
6995
7213
|
}
|
|
6996
7214
|
const matcher = (input, returnObject = false) => {
|
|
6997
|
-
const { isMatch, match, output } = picomatch.test(input,
|
|
6998
|
-
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
7215
|
+
const { isMatch, match, output } = picomatch.test(input, regex2, options, { glob, posix });
|
|
7216
|
+
const result = { glob, state, regex: regex2, posix, input, output, match, isMatch };
|
|
6999
7217
|
if (typeof opts.onResult === "function") {
|
|
7000
7218
|
opts.onResult(result);
|
|
7001
7219
|
}
|
|
@@ -7020,7 +7238,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7020
7238
|
}
|
|
7021
7239
|
return matcher;
|
|
7022
7240
|
};
|
|
7023
|
-
picomatch.test = (input,
|
|
7241
|
+
picomatch.test = (input, regex2, options, { glob, posix } = {}) => {
|
|
7024
7242
|
if (typeof input !== "string") {
|
|
7025
7243
|
throw new TypeError("Expected input to be a string");
|
|
7026
7244
|
}
|
|
@@ -7037,16 +7255,16 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7037
7255
|
}
|
|
7038
7256
|
if (match === false || opts.capture === true) {
|
|
7039
7257
|
if (opts.matchBase === true || opts.basename === true) {
|
|
7040
|
-
match = picomatch.matchBase(input,
|
|
7258
|
+
match = picomatch.matchBase(input, regex2, options, posix);
|
|
7041
7259
|
} else {
|
|
7042
|
-
match =
|
|
7260
|
+
match = regex2.exec(output);
|
|
7043
7261
|
}
|
|
7044
7262
|
}
|
|
7045
7263
|
return { isMatch: Boolean(match), match, output };
|
|
7046
7264
|
};
|
|
7047
7265
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
7048
|
-
const
|
|
7049
|
-
return
|
|
7266
|
+
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
7267
|
+
return regex2.test(path.basename(input));
|
|
7050
7268
|
};
|
|
7051
7269
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
7052
7270
|
picomatch.parse = (pattern, options) => {
|
|
@@ -7066,11 +7284,11 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7066
7284
|
if (state && state.negated === true) {
|
|
7067
7285
|
source = `^(?!${source}).*$`;
|
|
7068
7286
|
}
|
|
7069
|
-
const
|
|
7287
|
+
const regex2 = picomatch.toRegex(source, options);
|
|
7070
7288
|
if (returnState === true) {
|
|
7071
|
-
|
|
7289
|
+
regex2.state = state;
|
|
7072
7290
|
}
|
|
7073
|
-
return
|
|
7291
|
+
return regex2;
|
|
7074
7292
|
};
|
|
7075
7293
|
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
7076
7294
|
if (!input || typeof input !== "string") {
|
|
@@ -7229,8 +7447,8 @@ var require_micromatch = __commonJS((exports, module) => {
|
|
|
7229
7447
|
};
|
|
7230
7448
|
micromatch.capture = (glob, input, options) => {
|
|
7231
7449
|
let posix = utils.isWindows(options);
|
|
7232
|
-
let
|
|
7233
|
-
let match =
|
|
7450
|
+
let regex2 = picomatch.makeRe(String(glob), { ...options, capture: true });
|
|
7451
|
+
let match = regex2.exec(posix ? utils.toPosixSlashes(input) : input);
|
|
7234
7452
|
if (match) {
|
|
7235
7453
|
return match.slice(1).map((v2) => v2 === undefined ? "" : v2);
|
|
7236
7454
|
}
|
|
@@ -9428,8 +9646,8 @@ var require_settings4 = __commonJS((exports) => {
|
|
|
9428
9646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9429
9647
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
|
|
9430
9648
|
var fs = __require("fs");
|
|
9431
|
-
var
|
|
9432
|
-
var CPU_COUNT = Math.max(
|
|
9649
|
+
var os2 = __require("os");
|
|
9650
|
+
var CPU_COUNT = Math.max(os2.cpus().length, 1);
|
|
9433
9651
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
9434
9652
|
lstat: fs.lstat,
|
|
9435
9653
|
lstatSync: fs.lstatSync,
|
|
@@ -9812,7 +10030,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
|
|
|
9812
10030
|
var which = require_which();
|
|
9813
10031
|
var getPathKey = require_path_key();
|
|
9814
10032
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
9815
|
-
const
|
|
10033
|
+
const env2 = parsed.options.env || process.env;
|
|
9816
10034
|
const cwd = process.cwd();
|
|
9817
10035
|
const hasCustomCwd = parsed.options.cwd != null;
|
|
9818
10036
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
|
@@ -9824,7 +10042,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
|
|
|
9824
10042
|
let resolved;
|
|
9825
10043
|
try {
|
|
9826
10044
|
resolved = which.sync(parsed.command, {
|
|
9827
|
-
path:
|
|
10045
|
+
path: env2[getPathKey({ env: env2 })],
|
|
9828
10046
|
pathExt: withoutPathExt ? path2.delimiter : undefined
|
|
9829
10047
|
});
|
|
9830
10048
|
} catch (e2) {} finally {
|
|
@@ -11463,39 +11681,1350 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
|
|
|
11463
11681
|
};
|
|
11464
11682
|
|
|
11465
11683
|
// src/index.ts
|
|
11466
|
-
var
|
|
11684
|
+
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
11685
|
+
|
|
11686
|
+
// ../../node_modules/.bun/boxen@8.0.1/node_modules/boxen/index.js
|
|
11687
|
+
import process3 from "process";
|
|
11688
|
+
|
|
11689
|
+
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
11690
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
11691
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
11692
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
11693
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
11694
|
+
const pattern = `${osc}|${csi}`;
|
|
11695
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
11696
|
+
}
|
|
11697
|
+
|
|
11698
|
+
// ../../node_modules/.bun/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
11699
|
+
var regex = ansiRegex();
|
|
11700
|
+
function stripAnsi(string) {
|
|
11701
|
+
if (typeof string !== "string") {
|
|
11702
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
11703
|
+
}
|
|
11704
|
+
return string.replace(regex, "");
|
|
11705
|
+
}
|
|
11706
|
+
|
|
11707
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
11708
|
+
function isAmbiguous(x2) {
|
|
11709
|
+
return x2 === 161 || x2 === 164 || x2 === 167 || x2 === 168 || x2 === 170 || x2 === 173 || x2 === 174 || x2 >= 176 && x2 <= 180 || x2 >= 182 && x2 <= 186 || x2 >= 188 && x2 <= 191 || x2 === 198 || x2 === 208 || x2 === 215 || x2 === 216 || x2 >= 222 && x2 <= 225 || x2 === 230 || x2 >= 232 && x2 <= 234 || x2 === 236 || x2 === 237 || x2 === 240 || x2 === 242 || x2 === 243 || x2 >= 247 && x2 <= 250 || x2 === 252 || x2 === 254 || x2 === 257 || x2 === 273 || x2 === 275 || x2 === 283 || x2 === 294 || x2 === 295 || x2 === 299 || x2 >= 305 && x2 <= 307 || x2 === 312 || x2 >= 319 && x2 <= 322 || x2 === 324 || x2 >= 328 && x2 <= 331 || x2 === 333 || x2 === 338 || x2 === 339 || x2 === 358 || x2 === 359 || x2 === 363 || x2 === 462 || x2 === 464 || x2 === 466 || x2 === 468 || x2 === 470 || x2 === 472 || x2 === 474 || x2 === 476 || x2 === 593 || x2 === 609 || x2 === 708 || x2 === 711 || x2 >= 713 && x2 <= 715 || x2 === 717 || x2 === 720 || x2 >= 728 && x2 <= 731 || x2 === 733 || x2 === 735 || x2 >= 768 && x2 <= 879 || x2 >= 913 && x2 <= 929 || x2 >= 931 && x2 <= 937 || x2 >= 945 && x2 <= 961 || x2 >= 963 && x2 <= 969 || x2 === 1025 || x2 >= 1040 && x2 <= 1103 || x2 === 1105 || x2 === 8208 || x2 >= 8211 && x2 <= 8214 || x2 === 8216 || x2 === 8217 || x2 === 8220 || x2 === 8221 || x2 >= 8224 && x2 <= 8226 || x2 >= 8228 && x2 <= 8231 || x2 === 8240 || x2 === 8242 || x2 === 8243 || x2 === 8245 || x2 === 8251 || x2 === 8254 || x2 === 8308 || x2 === 8319 || x2 >= 8321 && x2 <= 8324 || x2 === 8364 || x2 === 8451 || x2 === 8453 || x2 === 8457 || x2 === 8467 || x2 === 8470 || x2 === 8481 || x2 === 8482 || x2 === 8486 || x2 === 8491 || x2 === 8531 || x2 === 8532 || x2 >= 8539 && x2 <= 8542 || x2 >= 8544 && x2 <= 8555 || x2 >= 8560 && x2 <= 8569 || x2 === 8585 || x2 >= 8592 && x2 <= 8601 || x2 === 8632 || x2 === 8633 || x2 === 8658 || x2 === 8660 || x2 === 8679 || x2 === 8704 || x2 === 8706 || x2 === 8707 || x2 === 8711 || x2 === 8712 || x2 === 8715 || x2 === 8719 || x2 === 8721 || x2 === 8725 || x2 === 8730 || x2 >= 8733 && x2 <= 8736 || x2 === 8739 || x2 === 8741 || x2 >= 8743 && x2 <= 8748 || x2 === 8750 || x2 >= 8756 && x2 <= 8759 || x2 === 8764 || x2 === 8765 || x2 === 8776 || x2 === 8780 || x2 === 8786 || x2 === 8800 || x2 === 8801 || x2 >= 8804 && x2 <= 8807 || x2 === 8810 || x2 === 8811 || x2 === 8814 || x2 === 8815 || x2 === 8834 || x2 === 8835 || x2 === 8838 || x2 === 8839 || x2 === 8853 || x2 === 8857 || x2 === 8869 || x2 === 8895 || x2 === 8978 || x2 >= 9312 && x2 <= 9449 || x2 >= 9451 && x2 <= 9547 || x2 >= 9552 && x2 <= 9587 || x2 >= 9600 && x2 <= 9615 || x2 >= 9618 && x2 <= 9621 || x2 === 9632 || x2 === 9633 || x2 >= 9635 && x2 <= 9641 || x2 === 9650 || x2 === 9651 || x2 === 9654 || x2 === 9655 || x2 === 9660 || x2 === 9661 || x2 === 9664 || x2 === 9665 || x2 >= 9670 && x2 <= 9672 || x2 === 9675 || x2 >= 9678 && x2 <= 9681 || x2 >= 9698 && x2 <= 9701 || x2 === 9711 || x2 === 9733 || x2 === 9734 || x2 === 9737 || x2 === 9742 || x2 === 9743 || x2 === 9756 || x2 === 9758 || x2 === 9792 || x2 === 9794 || x2 === 9824 || x2 === 9825 || x2 >= 9827 && x2 <= 9829 || x2 >= 9831 && x2 <= 9834 || x2 === 9836 || x2 === 9837 || x2 === 9839 || x2 === 9886 || x2 === 9887 || x2 === 9919 || x2 >= 9926 && x2 <= 9933 || x2 >= 9935 && x2 <= 9939 || x2 >= 9941 && x2 <= 9953 || x2 === 9955 || x2 === 9960 || x2 === 9961 || x2 >= 9963 && x2 <= 9969 || x2 === 9972 || x2 >= 9974 && x2 <= 9977 || x2 === 9979 || x2 === 9980 || x2 === 9982 || x2 === 9983 || x2 === 10045 || x2 >= 10102 && x2 <= 10111 || x2 >= 11094 && x2 <= 11097 || x2 >= 12872 && x2 <= 12879 || x2 >= 57344 && x2 <= 63743 || x2 >= 65024 && x2 <= 65039 || x2 === 65533 || x2 >= 127232 && x2 <= 127242 || x2 >= 127248 && x2 <= 127277 || x2 >= 127280 && x2 <= 127337 || x2 >= 127344 && x2 <= 127373 || x2 === 127375 || x2 === 127376 || x2 >= 127387 && x2 <= 127404 || x2 >= 917760 && x2 <= 917999 || x2 >= 983040 && x2 <= 1048573 || x2 >= 1048576 && x2 <= 1114109;
|
|
11710
|
+
}
|
|
11711
|
+
function isFullWidth(x2) {
|
|
11712
|
+
return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
|
|
11713
|
+
}
|
|
11714
|
+
function isWide(x2) {
|
|
11715
|
+
return x2 >= 4352 && x2 <= 4447 || x2 === 8986 || x2 === 8987 || x2 === 9001 || x2 === 9002 || x2 >= 9193 && x2 <= 9196 || x2 === 9200 || x2 === 9203 || x2 === 9725 || x2 === 9726 || x2 === 9748 || x2 === 9749 || x2 >= 9776 && x2 <= 9783 || x2 >= 9800 && x2 <= 9811 || x2 === 9855 || x2 >= 9866 && x2 <= 9871 || x2 === 9875 || x2 === 9889 || x2 === 9898 || x2 === 9899 || x2 === 9917 || x2 === 9918 || x2 === 9924 || x2 === 9925 || x2 === 9934 || x2 === 9940 || x2 === 9962 || x2 === 9970 || x2 === 9971 || x2 === 9973 || x2 === 9978 || x2 === 9981 || x2 === 9989 || x2 === 9994 || x2 === 9995 || x2 === 10024 || x2 === 10060 || x2 === 10062 || x2 >= 10067 && x2 <= 10069 || x2 === 10071 || x2 >= 10133 && x2 <= 10135 || x2 === 10160 || x2 === 10175 || x2 === 11035 || x2 === 11036 || x2 === 11088 || x2 === 11093 || x2 >= 11904 && x2 <= 11929 || x2 >= 11931 && x2 <= 12019 || x2 >= 12032 && x2 <= 12245 || x2 >= 12272 && x2 <= 12287 || x2 >= 12289 && x2 <= 12350 || x2 >= 12353 && x2 <= 12438 || x2 >= 12441 && x2 <= 12543 || x2 >= 12549 && x2 <= 12591 || x2 >= 12593 && x2 <= 12686 || x2 >= 12688 && x2 <= 12773 || x2 >= 12783 && x2 <= 12830 || x2 >= 12832 && x2 <= 12871 || x2 >= 12880 && x2 <= 42124 || x2 >= 42128 && x2 <= 42182 || x2 >= 43360 && x2 <= 43388 || x2 >= 44032 && x2 <= 55203 || x2 >= 63744 && x2 <= 64255 || x2 >= 65040 && x2 <= 65049 || x2 >= 65072 && x2 <= 65106 || x2 >= 65108 && x2 <= 65126 || x2 >= 65128 && x2 <= 65131 || x2 >= 94176 && x2 <= 94180 || x2 >= 94192 && x2 <= 94198 || x2 >= 94208 && x2 <= 101589 || x2 >= 101631 && x2 <= 101662 || x2 >= 101760 && x2 <= 101874 || x2 >= 110576 && x2 <= 110579 || x2 >= 110581 && x2 <= 110587 || x2 === 110589 || x2 === 110590 || x2 >= 110592 && x2 <= 110882 || x2 === 110898 || x2 >= 110928 && x2 <= 110930 || x2 === 110933 || x2 >= 110948 && x2 <= 110951 || x2 >= 110960 && x2 <= 111355 || x2 >= 119552 && x2 <= 119638 || x2 >= 119648 && x2 <= 119670 || x2 === 126980 || x2 === 127183 || x2 === 127374 || x2 >= 127377 && x2 <= 127386 || x2 >= 127488 && x2 <= 127490 || x2 >= 127504 && x2 <= 127547 || x2 >= 127552 && x2 <= 127560 || x2 === 127568 || x2 === 127569 || x2 >= 127584 && x2 <= 127589 || x2 >= 127744 && x2 <= 127776 || x2 >= 127789 && x2 <= 127797 || x2 >= 127799 && x2 <= 127868 || x2 >= 127870 && x2 <= 127891 || x2 >= 127904 && x2 <= 127946 || x2 >= 127951 && x2 <= 127955 || x2 >= 127968 && x2 <= 127984 || x2 === 127988 || x2 >= 127992 && x2 <= 128062 || x2 === 128064 || x2 >= 128066 && x2 <= 128252 || x2 >= 128255 && x2 <= 128317 || x2 >= 128331 && x2 <= 128334 || x2 >= 128336 && x2 <= 128359 || x2 === 128378 || x2 === 128405 || x2 === 128406 || x2 === 128420 || x2 >= 128507 && x2 <= 128591 || x2 >= 128640 && x2 <= 128709 || x2 === 128716 || x2 >= 128720 && x2 <= 128722 || x2 >= 128725 && x2 <= 128728 || x2 >= 128732 && x2 <= 128735 || x2 === 128747 || x2 === 128748 || x2 >= 128756 && x2 <= 128764 || x2 >= 128992 && x2 <= 129003 || x2 === 129008 || x2 >= 129292 && x2 <= 129338 || x2 >= 129340 && x2 <= 129349 || x2 >= 129351 && x2 <= 129535 || x2 >= 129648 && x2 <= 129660 || x2 >= 129664 && x2 <= 129674 || x2 >= 129678 && x2 <= 129734 || x2 === 129736 || x2 >= 129741 && x2 <= 129756 || x2 >= 129759 && x2 <= 129770 || x2 >= 129775 && x2 <= 129784 || x2 >= 131072 && x2 <= 196605 || x2 >= 196608 && x2 <= 262141;
|
|
11716
|
+
}
|
|
11717
|
+
|
|
11718
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
11719
|
+
function validate(codePoint) {
|
|
11720
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
11721
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
11722
|
+
}
|
|
11723
|
+
}
|
|
11724
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
11725
|
+
validate(codePoint);
|
|
11726
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
11727
|
+
return 2;
|
|
11728
|
+
}
|
|
11729
|
+
return 1;
|
|
11730
|
+
}
|
|
11731
|
+
|
|
11732
|
+
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
11733
|
+
var emoji_regex_default = () => {
|
|
11734
|
+
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;
|
|
11735
|
+
};
|
|
11736
|
+
|
|
11737
|
+
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
11738
|
+
var segmenter = new Intl.Segmenter;
|
|
11739
|
+
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
11740
|
+
function stringWidth(string, options = {}) {
|
|
11741
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
11742
|
+
return 0;
|
|
11743
|
+
}
|
|
11744
|
+
const {
|
|
11745
|
+
ambiguousIsNarrow = true,
|
|
11746
|
+
countAnsiEscapeCodes = false
|
|
11747
|
+
} = options;
|
|
11748
|
+
if (!countAnsiEscapeCodes) {
|
|
11749
|
+
string = stripAnsi(string);
|
|
11750
|
+
}
|
|
11751
|
+
if (string.length === 0) {
|
|
11752
|
+
return 0;
|
|
11753
|
+
}
|
|
11754
|
+
let width = 0;
|
|
11755
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
11756
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
11757
|
+
const codePoint = character.codePointAt(0);
|
|
11758
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
11759
|
+
continue;
|
|
11760
|
+
}
|
|
11761
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
11762
|
+
continue;
|
|
11763
|
+
}
|
|
11764
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
11765
|
+
continue;
|
|
11766
|
+
}
|
|
11767
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
11768
|
+
continue;
|
|
11769
|
+
}
|
|
11770
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
11771
|
+
continue;
|
|
11772
|
+
}
|
|
11773
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
11774
|
+
continue;
|
|
11775
|
+
}
|
|
11776
|
+
if (emoji_regex_default().test(character)) {
|
|
11777
|
+
width += 2;
|
|
11778
|
+
continue;
|
|
11779
|
+
}
|
|
11780
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
11781
|
+
}
|
|
11782
|
+
return width;
|
|
11783
|
+
}
|
|
11784
|
+
|
|
11785
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
11786
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
11787
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
11788
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
11789
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
11790
|
+
var styles = {
|
|
11791
|
+
modifier: {
|
|
11792
|
+
reset: [0, 0],
|
|
11793
|
+
bold: [1, 22],
|
|
11794
|
+
dim: [2, 22],
|
|
11795
|
+
italic: [3, 23],
|
|
11796
|
+
underline: [4, 24],
|
|
11797
|
+
overline: [53, 55],
|
|
11798
|
+
inverse: [7, 27],
|
|
11799
|
+
hidden: [8, 28],
|
|
11800
|
+
strikethrough: [9, 29]
|
|
11801
|
+
},
|
|
11802
|
+
color: {
|
|
11803
|
+
black: [30, 39],
|
|
11804
|
+
red: [31, 39],
|
|
11805
|
+
green: [32, 39],
|
|
11806
|
+
yellow: [33, 39],
|
|
11807
|
+
blue: [34, 39],
|
|
11808
|
+
magenta: [35, 39],
|
|
11809
|
+
cyan: [36, 39],
|
|
11810
|
+
white: [37, 39],
|
|
11811
|
+
blackBright: [90, 39],
|
|
11812
|
+
gray: [90, 39],
|
|
11813
|
+
grey: [90, 39],
|
|
11814
|
+
redBright: [91, 39],
|
|
11815
|
+
greenBright: [92, 39],
|
|
11816
|
+
yellowBright: [93, 39],
|
|
11817
|
+
blueBright: [94, 39],
|
|
11818
|
+
magentaBright: [95, 39],
|
|
11819
|
+
cyanBright: [96, 39],
|
|
11820
|
+
whiteBright: [97, 39]
|
|
11821
|
+
},
|
|
11822
|
+
bgColor: {
|
|
11823
|
+
bgBlack: [40, 49],
|
|
11824
|
+
bgRed: [41, 49],
|
|
11825
|
+
bgGreen: [42, 49],
|
|
11826
|
+
bgYellow: [43, 49],
|
|
11827
|
+
bgBlue: [44, 49],
|
|
11828
|
+
bgMagenta: [45, 49],
|
|
11829
|
+
bgCyan: [46, 49],
|
|
11830
|
+
bgWhite: [47, 49],
|
|
11831
|
+
bgBlackBright: [100, 49],
|
|
11832
|
+
bgGray: [100, 49],
|
|
11833
|
+
bgGrey: [100, 49],
|
|
11834
|
+
bgRedBright: [101, 49],
|
|
11835
|
+
bgGreenBright: [102, 49],
|
|
11836
|
+
bgYellowBright: [103, 49],
|
|
11837
|
+
bgBlueBright: [104, 49],
|
|
11838
|
+
bgMagentaBright: [105, 49],
|
|
11839
|
+
bgCyanBright: [106, 49],
|
|
11840
|
+
bgWhiteBright: [107, 49]
|
|
11841
|
+
}
|
|
11842
|
+
};
|
|
11843
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
11844
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
11845
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
11846
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
11847
|
+
function assembleStyles() {
|
|
11848
|
+
const codes = new Map;
|
|
11849
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
11850
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
11851
|
+
styles[styleName] = {
|
|
11852
|
+
open: `\x1B[${style[0]}m`,
|
|
11853
|
+
close: `\x1B[${style[1]}m`
|
|
11854
|
+
};
|
|
11855
|
+
group[styleName] = styles[styleName];
|
|
11856
|
+
codes.set(style[0], style[1]);
|
|
11857
|
+
}
|
|
11858
|
+
Object.defineProperty(styles, groupName, {
|
|
11859
|
+
value: group,
|
|
11860
|
+
enumerable: false
|
|
11861
|
+
});
|
|
11862
|
+
}
|
|
11863
|
+
Object.defineProperty(styles, "codes", {
|
|
11864
|
+
value: codes,
|
|
11865
|
+
enumerable: false
|
|
11866
|
+
});
|
|
11867
|
+
styles.color.close = "\x1B[39m";
|
|
11868
|
+
styles.bgColor.close = "\x1B[49m";
|
|
11869
|
+
styles.color.ansi = wrapAnsi16();
|
|
11870
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
11871
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
11872
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
11873
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
11874
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
11875
|
+
Object.defineProperties(styles, {
|
|
11876
|
+
rgbToAnsi256: {
|
|
11877
|
+
value(red, green, blue) {
|
|
11878
|
+
if (red === green && green === blue) {
|
|
11879
|
+
if (red < 8) {
|
|
11880
|
+
return 16;
|
|
11881
|
+
}
|
|
11882
|
+
if (red > 248) {
|
|
11883
|
+
return 231;
|
|
11884
|
+
}
|
|
11885
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
11886
|
+
}
|
|
11887
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
11888
|
+
},
|
|
11889
|
+
enumerable: false
|
|
11890
|
+
},
|
|
11891
|
+
hexToRgb: {
|
|
11892
|
+
value(hex) {
|
|
11893
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
11894
|
+
if (!matches) {
|
|
11895
|
+
return [0, 0, 0];
|
|
11896
|
+
}
|
|
11897
|
+
let [colorString] = matches;
|
|
11898
|
+
if (colorString.length === 3) {
|
|
11899
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
11900
|
+
}
|
|
11901
|
+
const integer = Number.parseInt(colorString, 16);
|
|
11902
|
+
return [
|
|
11903
|
+
integer >> 16 & 255,
|
|
11904
|
+
integer >> 8 & 255,
|
|
11905
|
+
integer & 255
|
|
11906
|
+
];
|
|
11907
|
+
},
|
|
11908
|
+
enumerable: false
|
|
11909
|
+
},
|
|
11910
|
+
hexToAnsi256: {
|
|
11911
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
11912
|
+
enumerable: false
|
|
11913
|
+
},
|
|
11914
|
+
ansi256ToAnsi: {
|
|
11915
|
+
value(code) {
|
|
11916
|
+
if (code < 8) {
|
|
11917
|
+
return 30 + code;
|
|
11918
|
+
}
|
|
11919
|
+
if (code < 16) {
|
|
11920
|
+
return 90 + (code - 8);
|
|
11921
|
+
}
|
|
11922
|
+
let red;
|
|
11923
|
+
let green;
|
|
11924
|
+
let blue;
|
|
11925
|
+
if (code >= 232) {
|
|
11926
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
11927
|
+
green = red;
|
|
11928
|
+
blue = red;
|
|
11929
|
+
} else {
|
|
11930
|
+
code -= 16;
|
|
11931
|
+
const remainder = code % 36;
|
|
11932
|
+
red = Math.floor(code / 36) / 5;
|
|
11933
|
+
green = Math.floor(remainder / 6) / 5;
|
|
11934
|
+
blue = remainder % 6 / 5;
|
|
11935
|
+
}
|
|
11936
|
+
const value = Math.max(red, green, blue) * 2;
|
|
11937
|
+
if (value === 0) {
|
|
11938
|
+
return 30;
|
|
11939
|
+
}
|
|
11940
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
11941
|
+
if (value === 2) {
|
|
11942
|
+
result += 60;
|
|
11943
|
+
}
|
|
11944
|
+
return result;
|
|
11945
|
+
},
|
|
11946
|
+
enumerable: false
|
|
11947
|
+
},
|
|
11948
|
+
rgbToAnsi: {
|
|
11949
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
11950
|
+
enumerable: false
|
|
11951
|
+
},
|
|
11952
|
+
hexToAnsi: {
|
|
11953
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
11954
|
+
enumerable: false
|
|
11955
|
+
}
|
|
11956
|
+
});
|
|
11957
|
+
return styles;
|
|
11958
|
+
}
|
|
11959
|
+
var ansiStyles = assembleStyles();
|
|
11960
|
+
var ansi_styles_default = ansiStyles;
|
|
11961
|
+
|
|
11962
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
11963
|
+
import process2 from "process";
|
|
11964
|
+
import os from "os";
|
|
11965
|
+
import tty from "tty";
|
|
11966
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
11967
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11968
|
+
const position = argv.indexOf(prefix + flag);
|
|
11969
|
+
const terminatorPosition = argv.indexOf("--");
|
|
11970
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11971
|
+
}
|
|
11972
|
+
var { env } = process2;
|
|
11973
|
+
var flagForceColor;
|
|
11974
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
11975
|
+
flagForceColor = 0;
|
|
11976
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
11977
|
+
flagForceColor = 1;
|
|
11978
|
+
}
|
|
11979
|
+
function envForceColor() {
|
|
11980
|
+
if ("FORCE_COLOR" in env) {
|
|
11981
|
+
if (env.FORCE_COLOR === "true") {
|
|
11982
|
+
return 1;
|
|
11983
|
+
}
|
|
11984
|
+
if (env.FORCE_COLOR === "false") {
|
|
11985
|
+
return 0;
|
|
11986
|
+
}
|
|
11987
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
11988
|
+
}
|
|
11989
|
+
}
|
|
11990
|
+
function translateLevel(level) {
|
|
11991
|
+
if (level === 0) {
|
|
11992
|
+
return false;
|
|
11993
|
+
}
|
|
11994
|
+
return {
|
|
11995
|
+
level,
|
|
11996
|
+
hasBasic: true,
|
|
11997
|
+
has256: level >= 2,
|
|
11998
|
+
has16m: level >= 3
|
|
11999
|
+
};
|
|
12000
|
+
}
|
|
12001
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
12002
|
+
const noFlagForceColor = envForceColor();
|
|
12003
|
+
if (noFlagForceColor !== undefined) {
|
|
12004
|
+
flagForceColor = noFlagForceColor;
|
|
12005
|
+
}
|
|
12006
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
12007
|
+
if (forceColor === 0) {
|
|
12008
|
+
return 0;
|
|
12009
|
+
}
|
|
12010
|
+
if (sniffFlags) {
|
|
12011
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
12012
|
+
return 3;
|
|
12013
|
+
}
|
|
12014
|
+
if (hasFlag("color=256")) {
|
|
12015
|
+
return 2;
|
|
12016
|
+
}
|
|
12017
|
+
}
|
|
12018
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
12019
|
+
return 1;
|
|
12020
|
+
}
|
|
12021
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
12022
|
+
return 0;
|
|
12023
|
+
}
|
|
12024
|
+
const min = forceColor || 0;
|
|
12025
|
+
if (env.TERM === "dumb") {
|
|
12026
|
+
return min;
|
|
12027
|
+
}
|
|
12028
|
+
if (process2.platform === "win32") {
|
|
12029
|
+
const osRelease = os.release().split(".");
|
|
12030
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
12031
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
12032
|
+
}
|
|
12033
|
+
return 1;
|
|
12034
|
+
}
|
|
12035
|
+
if ("CI" in env) {
|
|
12036
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
12037
|
+
return 3;
|
|
12038
|
+
}
|
|
12039
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
12040
|
+
return 1;
|
|
12041
|
+
}
|
|
12042
|
+
return min;
|
|
12043
|
+
}
|
|
12044
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
12045
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
12046
|
+
}
|
|
12047
|
+
if (env.COLORTERM === "truecolor") {
|
|
12048
|
+
return 3;
|
|
12049
|
+
}
|
|
12050
|
+
if (env.TERM === "xterm-kitty") {
|
|
12051
|
+
return 3;
|
|
12052
|
+
}
|
|
12053
|
+
if (env.TERM === "xterm-ghostty") {
|
|
12054
|
+
return 3;
|
|
12055
|
+
}
|
|
12056
|
+
if (env.TERM === "wezterm") {
|
|
12057
|
+
return 3;
|
|
12058
|
+
}
|
|
12059
|
+
if ("TERM_PROGRAM" in env) {
|
|
12060
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
12061
|
+
switch (env.TERM_PROGRAM) {
|
|
12062
|
+
case "iTerm.app": {
|
|
12063
|
+
return version >= 3 ? 3 : 2;
|
|
12064
|
+
}
|
|
12065
|
+
case "Apple_Terminal": {
|
|
12066
|
+
return 2;
|
|
12067
|
+
}
|
|
12068
|
+
}
|
|
12069
|
+
}
|
|
12070
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
12071
|
+
return 2;
|
|
12072
|
+
}
|
|
12073
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
12074
|
+
return 1;
|
|
12075
|
+
}
|
|
12076
|
+
if ("COLORTERM" in env) {
|
|
12077
|
+
return 1;
|
|
12078
|
+
}
|
|
12079
|
+
return min;
|
|
12080
|
+
}
|
|
12081
|
+
function createSupportsColor(stream, options = {}) {
|
|
12082
|
+
const level = _supportsColor(stream, {
|
|
12083
|
+
streamIsTTY: stream && stream.isTTY,
|
|
12084
|
+
...options
|
|
12085
|
+
});
|
|
12086
|
+
return translateLevel(level);
|
|
12087
|
+
}
|
|
12088
|
+
var supportsColor = {
|
|
12089
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
12090
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
12091
|
+
};
|
|
12092
|
+
var supports_color_default = supportsColor;
|
|
12093
|
+
|
|
12094
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
12095
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
12096
|
+
let index = string.indexOf(substring);
|
|
12097
|
+
if (index === -1) {
|
|
12098
|
+
return string;
|
|
12099
|
+
}
|
|
12100
|
+
const substringLength = substring.length;
|
|
12101
|
+
let endIndex = 0;
|
|
12102
|
+
let returnValue = "";
|
|
12103
|
+
do {
|
|
12104
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
12105
|
+
endIndex = index + substringLength;
|
|
12106
|
+
index = string.indexOf(substring, endIndex);
|
|
12107
|
+
} while (index !== -1);
|
|
12108
|
+
returnValue += string.slice(endIndex);
|
|
12109
|
+
return returnValue;
|
|
12110
|
+
}
|
|
12111
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
12112
|
+
let endIndex = 0;
|
|
12113
|
+
let returnValue = "";
|
|
12114
|
+
do {
|
|
12115
|
+
const gotCR = string[index - 1] === "\r";
|
|
12116
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
12117
|
+
` : `
|
|
12118
|
+
`) + postfix;
|
|
12119
|
+
endIndex = index + 1;
|
|
12120
|
+
index = string.indexOf(`
|
|
12121
|
+
`, endIndex);
|
|
12122
|
+
} while (index !== -1);
|
|
12123
|
+
returnValue += string.slice(endIndex);
|
|
12124
|
+
return returnValue;
|
|
12125
|
+
}
|
|
12126
|
+
|
|
12127
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
12128
|
+
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
12129
|
+
var GENERATOR = Symbol("GENERATOR");
|
|
12130
|
+
var STYLER = Symbol("STYLER");
|
|
12131
|
+
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
12132
|
+
var levelMapping = [
|
|
12133
|
+
"ansi",
|
|
12134
|
+
"ansi",
|
|
12135
|
+
"ansi256",
|
|
12136
|
+
"ansi16m"
|
|
12137
|
+
];
|
|
12138
|
+
var styles2 = Object.create(null);
|
|
12139
|
+
var applyOptions = (object, options = {}) => {
|
|
12140
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
12141
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
12142
|
+
}
|
|
12143
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
12144
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
12145
|
+
};
|
|
12146
|
+
var chalkFactory = (options) => {
|
|
12147
|
+
const chalk = (...strings) => strings.join(" ");
|
|
12148
|
+
applyOptions(chalk, options);
|
|
12149
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
12150
|
+
return chalk;
|
|
12151
|
+
};
|
|
12152
|
+
function createChalk(options) {
|
|
12153
|
+
return chalkFactory(options);
|
|
12154
|
+
}
|
|
12155
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
12156
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
12157
|
+
styles2[styleName] = {
|
|
12158
|
+
get() {
|
|
12159
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
12160
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
12161
|
+
return builder;
|
|
12162
|
+
}
|
|
12163
|
+
};
|
|
12164
|
+
}
|
|
12165
|
+
styles2.visible = {
|
|
12166
|
+
get() {
|
|
12167
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
12168
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
12169
|
+
return builder;
|
|
12170
|
+
}
|
|
12171
|
+
};
|
|
12172
|
+
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
12173
|
+
if (model === "rgb") {
|
|
12174
|
+
if (level === "ansi16m") {
|
|
12175
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
12176
|
+
}
|
|
12177
|
+
if (level === "ansi256") {
|
|
12178
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
12179
|
+
}
|
|
12180
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
12181
|
+
}
|
|
12182
|
+
if (model === "hex") {
|
|
12183
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
12184
|
+
}
|
|
12185
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
12186
|
+
};
|
|
12187
|
+
var usedModels = ["rgb", "hex", "ansi256"];
|
|
12188
|
+
for (const model of usedModels) {
|
|
12189
|
+
styles2[model] = {
|
|
12190
|
+
get() {
|
|
12191
|
+
const { level } = this;
|
|
12192
|
+
return function(...arguments_) {
|
|
12193
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
12194
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
12195
|
+
};
|
|
12196
|
+
}
|
|
12197
|
+
};
|
|
12198
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
12199
|
+
styles2[bgModel] = {
|
|
12200
|
+
get() {
|
|
12201
|
+
const { level } = this;
|
|
12202
|
+
return function(...arguments_) {
|
|
12203
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
12204
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
12205
|
+
};
|
|
12206
|
+
}
|
|
12207
|
+
};
|
|
12208
|
+
}
|
|
12209
|
+
var proto = Object.defineProperties(() => {}, {
|
|
12210
|
+
...styles2,
|
|
12211
|
+
level: {
|
|
12212
|
+
enumerable: true,
|
|
12213
|
+
get() {
|
|
12214
|
+
return this[GENERATOR].level;
|
|
12215
|
+
},
|
|
12216
|
+
set(level) {
|
|
12217
|
+
this[GENERATOR].level = level;
|
|
12218
|
+
}
|
|
12219
|
+
}
|
|
12220
|
+
});
|
|
12221
|
+
var createStyler = (open, close, parent) => {
|
|
12222
|
+
let openAll;
|
|
12223
|
+
let closeAll;
|
|
12224
|
+
if (parent === undefined) {
|
|
12225
|
+
openAll = open;
|
|
12226
|
+
closeAll = close;
|
|
12227
|
+
} else {
|
|
12228
|
+
openAll = parent.openAll + open;
|
|
12229
|
+
closeAll = close + parent.closeAll;
|
|
12230
|
+
}
|
|
12231
|
+
return {
|
|
12232
|
+
open,
|
|
12233
|
+
close,
|
|
12234
|
+
openAll,
|
|
12235
|
+
closeAll,
|
|
12236
|
+
parent
|
|
12237
|
+
};
|
|
12238
|
+
};
|
|
12239
|
+
var createBuilder = (self, _styler, _isEmpty) => {
|
|
12240
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
12241
|
+
Object.setPrototypeOf(builder, proto);
|
|
12242
|
+
builder[GENERATOR] = self;
|
|
12243
|
+
builder[STYLER] = _styler;
|
|
12244
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
12245
|
+
return builder;
|
|
12246
|
+
};
|
|
12247
|
+
var applyStyle = (self, string) => {
|
|
12248
|
+
if (self.level <= 0 || !string) {
|
|
12249
|
+
return self[IS_EMPTY] ? "" : string;
|
|
12250
|
+
}
|
|
12251
|
+
let styler = self[STYLER];
|
|
12252
|
+
if (styler === undefined) {
|
|
12253
|
+
return string;
|
|
12254
|
+
}
|
|
12255
|
+
const { openAll, closeAll } = styler;
|
|
12256
|
+
if (string.includes("\x1B")) {
|
|
12257
|
+
while (styler !== undefined) {
|
|
12258
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
12259
|
+
styler = styler.parent;
|
|
12260
|
+
}
|
|
12261
|
+
}
|
|
12262
|
+
const lfIndex = string.indexOf(`
|
|
12263
|
+
`);
|
|
12264
|
+
if (lfIndex !== -1) {
|
|
12265
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
12266
|
+
}
|
|
12267
|
+
return openAll + string + closeAll;
|
|
12268
|
+
};
|
|
12269
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
12270
|
+
var chalk = createChalk();
|
|
12271
|
+
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
12272
|
+
var source_default = chalk;
|
|
12273
|
+
|
|
12274
|
+
// ../../node_modules/.bun/widest-line@5.0.0/node_modules/widest-line/index.js
|
|
12275
|
+
function widestLine(string) {
|
|
12276
|
+
let lineWidth = 0;
|
|
12277
|
+
for (const line of string.split(`
|
|
12278
|
+
`)) {
|
|
12279
|
+
lineWidth = Math.max(lineWidth, stringWidth(line));
|
|
12280
|
+
}
|
|
12281
|
+
return lineWidth;
|
|
12282
|
+
}
|
|
12283
|
+
|
|
12284
|
+
// ../../node_modules/.bun/boxen@8.0.1/node_modules/boxen/index.js
|
|
12285
|
+
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
12286
|
+
|
|
12287
|
+
// ../../node_modules/.bun/camelcase@8.0.0/node_modules/camelcase/index.js
|
|
12288
|
+
var UPPERCASE = /[\p{Lu}]/u;
|
|
12289
|
+
var LOWERCASE = /[\p{Ll}]/u;
|
|
12290
|
+
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
|
12291
|
+
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
|
12292
|
+
var SEPARATORS = /[_.\- ]+/;
|
|
12293
|
+
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
|
12294
|
+
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
12295
|
+
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
|
12296
|
+
var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {
|
|
12297
|
+
let isLastCharLower = false;
|
|
12298
|
+
let isLastCharUpper = false;
|
|
12299
|
+
let isLastLastCharUpper = false;
|
|
12300
|
+
let isLastLastCharPreserved = false;
|
|
12301
|
+
for (let index = 0;index < string.length; index++) {
|
|
12302
|
+
const character = string[index];
|
|
12303
|
+
isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
|
|
12304
|
+
if (isLastCharLower && UPPERCASE.test(character)) {
|
|
12305
|
+
string = string.slice(0, index) + "-" + string.slice(index);
|
|
12306
|
+
isLastCharLower = false;
|
|
12307
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
12308
|
+
isLastCharUpper = true;
|
|
12309
|
+
index++;
|
|
12310
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {
|
|
12311
|
+
string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
|
|
12312
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
12313
|
+
isLastCharUpper = false;
|
|
12314
|
+
isLastCharLower = true;
|
|
12315
|
+
} else {
|
|
12316
|
+
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
|
12317
|
+
isLastLastCharUpper = isLastCharUpper;
|
|
12318
|
+
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
|
12319
|
+
}
|
|
12320
|
+
}
|
|
12321
|
+
return string;
|
|
12322
|
+
};
|
|
12323
|
+
var preserveConsecutiveUppercase = (input, toLowerCase) => {
|
|
12324
|
+
LEADING_CAPITAL.lastIndex = 0;
|
|
12325
|
+
return input.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
|
|
12326
|
+
};
|
|
12327
|
+
var postProcess = (input, toUpperCase) => {
|
|
12328
|
+
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
|
12329
|
+
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
|
12330
|
+
return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_3, identifier) => toUpperCase(identifier));
|
|
12331
|
+
};
|
|
12332
|
+
function camelCase(input, options) {
|
|
12333
|
+
if (!(typeof input === "string" || Array.isArray(input))) {
|
|
12334
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
|
12335
|
+
}
|
|
12336
|
+
options = {
|
|
12337
|
+
pascalCase: false,
|
|
12338
|
+
preserveConsecutiveUppercase: false,
|
|
12339
|
+
...options
|
|
12340
|
+
};
|
|
12341
|
+
if (Array.isArray(input)) {
|
|
12342
|
+
input = input.map((x2) => x2.trim()).filter((x2) => x2.length).join("-");
|
|
12343
|
+
} else {
|
|
12344
|
+
input = input.trim();
|
|
12345
|
+
}
|
|
12346
|
+
if (input.length === 0) {
|
|
12347
|
+
return "";
|
|
12348
|
+
}
|
|
12349
|
+
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
|
12350
|
+
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
|
12351
|
+
if (input.length === 1) {
|
|
12352
|
+
if (SEPARATORS.test(input)) {
|
|
12353
|
+
return "";
|
|
12354
|
+
}
|
|
12355
|
+
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
|
12356
|
+
}
|
|
12357
|
+
const hasUpperCase = input !== toLowerCase(input);
|
|
12358
|
+
if (hasUpperCase) {
|
|
12359
|
+
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
|
12360
|
+
}
|
|
12361
|
+
input = input.replace(LEADING_SEPARATORS, "");
|
|
12362
|
+
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
|
12363
|
+
if (options.pascalCase) {
|
|
12364
|
+
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
12365
|
+
}
|
|
12366
|
+
return postProcess(input, toUpperCase);
|
|
12367
|
+
}
|
|
12368
|
+
|
|
12369
|
+
// ../../node_modules/.bun/boxen@8.0.1/node_modules/boxen/index.js
|
|
12370
|
+
var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
12371
|
+
|
|
12372
|
+
// ../../node_modules/.bun/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
12373
|
+
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
12374
|
+
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
12375
|
+
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
12376
|
+
var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
12377
|
+
var styles3 = {
|
|
12378
|
+
modifier: {
|
|
12379
|
+
reset: [0, 0],
|
|
12380
|
+
bold: [1, 22],
|
|
12381
|
+
dim: [2, 22],
|
|
12382
|
+
italic: [3, 23],
|
|
12383
|
+
underline: [4, 24],
|
|
12384
|
+
overline: [53, 55],
|
|
12385
|
+
inverse: [7, 27],
|
|
12386
|
+
hidden: [8, 28],
|
|
12387
|
+
strikethrough: [9, 29]
|
|
12388
|
+
},
|
|
12389
|
+
color: {
|
|
12390
|
+
black: [30, 39],
|
|
12391
|
+
red: [31, 39],
|
|
12392
|
+
green: [32, 39],
|
|
12393
|
+
yellow: [33, 39],
|
|
12394
|
+
blue: [34, 39],
|
|
12395
|
+
magenta: [35, 39],
|
|
12396
|
+
cyan: [36, 39],
|
|
12397
|
+
white: [37, 39],
|
|
12398
|
+
blackBright: [90, 39],
|
|
12399
|
+
gray: [90, 39],
|
|
12400
|
+
grey: [90, 39],
|
|
12401
|
+
redBright: [91, 39],
|
|
12402
|
+
greenBright: [92, 39],
|
|
12403
|
+
yellowBright: [93, 39],
|
|
12404
|
+
blueBright: [94, 39],
|
|
12405
|
+
magentaBright: [95, 39],
|
|
12406
|
+
cyanBright: [96, 39],
|
|
12407
|
+
whiteBright: [97, 39]
|
|
12408
|
+
},
|
|
12409
|
+
bgColor: {
|
|
12410
|
+
bgBlack: [40, 49],
|
|
12411
|
+
bgRed: [41, 49],
|
|
12412
|
+
bgGreen: [42, 49],
|
|
12413
|
+
bgYellow: [43, 49],
|
|
12414
|
+
bgBlue: [44, 49],
|
|
12415
|
+
bgMagenta: [45, 49],
|
|
12416
|
+
bgCyan: [46, 49],
|
|
12417
|
+
bgWhite: [47, 49],
|
|
12418
|
+
bgBlackBright: [100, 49],
|
|
12419
|
+
bgGray: [100, 49],
|
|
12420
|
+
bgGrey: [100, 49],
|
|
12421
|
+
bgRedBright: [101, 49],
|
|
12422
|
+
bgGreenBright: [102, 49],
|
|
12423
|
+
bgYellowBright: [103, 49],
|
|
12424
|
+
bgBlueBright: [104, 49],
|
|
12425
|
+
bgMagentaBright: [105, 49],
|
|
12426
|
+
bgCyanBright: [106, 49],
|
|
12427
|
+
bgWhiteBright: [107, 49]
|
|
12428
|
+
}
|
|
12429
|
+
};
|
|
12430
|
+
var modifierNames2 = Object.keys(styles3.modifier);
|
|
12431
|
+
var foregroundColorNames2 = Object.keys(styles3.color);
|
|
12432
|
+
var backgroundColorNames2 = Object.keys(styles3.bgColor);
|
|
12433
|
+
var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
12434
|
+
function assembleStyles2() {
|
|
12435
|
+
const codes = new Map;
|
|
12436
|
+
for (const [groupName, group] of Object.entries(styles3)) {
|
|
12437
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
12438
|
+
styles3[styleName] = {
|
|
12439
|
+
open: `\x1B[${style[0]}m`,
|
|
12440
|
+
close: `\x1B[${style[1]}m`
|
|
12441
|
+
};
|
|
12442
|
+
group[styleName] = styles3[styleName];
|
|
12443
|
+
codes.set(style[0], style[1]);
|
|
12444
|
+
}
|
|
12445
|
+
Object.defineProperty(styles3, groupName, {
|
|
12446
|
+
value: group,
|
|
12447
|
+
enumerable: false
|
|
12448
|
+
});
|
|
12449
|
+
}
|
|
12450
|
+
Object.defineProperty(styles3, "codes", {
|
|
12451
|
+
value: codes,
|
|
12452
|
+
enumerable: false
|
|
12453
|
+
});
|
|
12454
|
+
styles3.color.close = "\x1B[39m";
|
|
12455
|
+
styles3.bgColor.close = "\x1B[49m";
|
|
12456
|
+
styles3.color.ansi = wrapAnsi162();
|
|
12457
|
+
styles3.color.ansi256 = wrapAnsi2562();
|
|
12458
|
+
styles3.color.ansi16m = wrapAnsi16m2();
|
|
12459
|
+
styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
|
|
12460
|
+
styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
|
|
12461
|
+
styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
|
|
12462
|
+
Object.defineProperties(styles3, {
|
|
12463
|
+
rgbToAnsi256: {
|
|
12464
|
+
value(red, green, blue) {
|
|
12465
|
+
if (red === green && green === blue) {
|
|
12466
|
+
if (red < 8) {
|
|
12467
|
+
return 16;
|
|
12468
|
+
}
|
|
12469
|
+
if (red > 248) {
|
|
12470
|
+
return 231;
|
|
12471
|
+
}
|
|
12472
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
12473
|
+
}
|
|
12474
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
12475
|
+
},
|
|
12476
|
+
enumerable: false
|
|
12477
|
+
},
|
|
12478
|
+
hexToRgb: {
|
|
12479
|
+
value(hex) {
|
|
12480
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
12481
|
+
if (!matches) {
|
|
12482
|
+
return [0, 0, 0];
|
|
12483
|
+
}
|
|
12484
|
+
let [colorString] = matches;
|
|
12485
|
+
if (colorString.length === 3) {
|
|
12486
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
12487
|
+
}
|
|
12488
|
+
const integer = Number.parseInt(colorString, 16);
|
|
12489
|
+
return [
|
|
12490
|
+
integer >> 16 & 255,
|
|
12491
|
+
integer >> 8 & 255,
|
|
12492
|
+
integer & 255
|
|
12493
|
+
];
|
|
12494
|
+
},
|
|
12495
|
+
enumerable: false
|
|
12496
|
+
},
|
|
12497
|
+
hexToAnsi256: {
|
|
12498
|
+
value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
|
|
12499
|
+
enumerable: false
|
|
12500
|
+
},
|
|
12501
|
+
ansi256ToAnsi: {
|
|
12502
|
+
value(code) {
|
|
12503
|
+
if (code < 8) {
|
|
12504
|
+
return 30 + code;
|
|
12505
|
+
}
|
|
12506
|
+
if (code < 16) {
|
|
12507
|
+
return 90 + (code - 8);
|
|
12508
|
+
}
|
|
12509
|
+
let red;
|
|
12510
|
+
let green;
|
|
12511
|
+
let blue;
|
|
12512
|
+
if (code >= 232) {
|
|
12513
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
12514
|
+
green = red;
|
|
12515
|
+
blue = red;
|
|
12516
|
+
} else {
|
|
12517
|
+
code -= 16;
|
|
12518
|
+
const remainder = code % 36;
|
|
12519
|
+
red = Math.floor(code / 36) / 5;
|
|
12520
|
+
green = Math.floor(remainder / 6) / 5;
|
|
12521
|
+
blue = remainder % 6 / 5;
|
|
12522
|
+
}
|
|
12523
|
+
const value = Math.max(red, green, blue) * 2;
|
|
12524
|
+
if (value === 0) {
|
|
12525
|
+
return 30;
|
|
12526
|
+
}
|
|
12527
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
12528
|
+
if (value === 2) {
|
|
12529
|
+
result += 60;
|
|
12530
|
+
}
|
|
12531
|
+
return result;
|
|
12532
|
+
},
|
|
12533
|
+
enumerable: false
|
|
12534
|
+
},
|
|
12535
|
+
rgbToAnsi: {
|
|
12536
|
+
value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
|
|
12537
|
+
enumerable: false
|
|
12538
|
+
},
|
|
12539
|
+
hexToAnsi: {
|
|
12540
|
+
value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
|
|
12541
|
+
enumerable: false
|
|
12542
|
+
}
|
|
12543
|
+
});
|
|
12544
|
+
return styles3;
|
|
12545
|
+
}
|
|
12546
|
+
var ansiStyles2 = assembleStyles2();
|
|
12547
|
+
var ansi_styles_default2 = ansiStyles2;
|
|
12548
|
+
|
|
12549
|
+
// ../../node_modules/.bun/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
12550
|
+
var ESCAPES = new Set([
|
|
12551
|
+
"\x1B",
|
|
12552
|
+
"\x9B"
|
|
12553
|
+
]);
|
|
12554
|
+
var END_CODE = 39;
|
|
12555
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
12556
|
+
var ANSI_CSI = "[";
|
|
12557
|
+
var ANSI_OSC = "]";
|
|
12558
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
12559
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
12560
|
+
var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
12561
|
+
var wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
12562
|
+
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
12563
|
+
var wrapWord = (rows, word, columns) => {
|
|
12564
|
+
const characters = [...word];
|
|
12565
|
+
let isInsideEscape = false;
|
|
12566
|
+
let isInsideLinkEscape = false;
|
|
12567
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
12568
|
+
for (const [index, character] of characters.entries()) {
|
|
12569
|
+
const characterLength = stringWidth(character);
|
|
12570
|
+
if (visible + characterLength <= columns) {
|
|
12571
|
+
rows[rows.length - 1] += character;
|
|
12572
|
+
} else {
|
|
12573
|
+
rows.push(character);
|
|
12574
|
+
visible = 0;
|
|
12575
|
+
}
|
|
12576
|
+
if (ESCAPES.has(character)) {
|
|
12577
|
+
isInsideEscape = true;
|
|
12578
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
12579
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
12580
|
+
}
|
|
12581
|
+
if (isInsideEscape) {
|
|
12582
|
+
if (isInsideLinkEscape) {
|
|
12583
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
12584
|
+
isInsideEscape = false;
|
|
12585
|
+
isInsideLinkEscape = false;
|
|
12586
|
+
}
|
|
12587
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
12588
|
+
isInsideEscape = false;
|
|
12589
|
+
}
|
|
12590
|
+
continue;
|
|
12591
|
+
}
|
|
12592
|
+
visible += characterLength;
|
|
12593
|
+
if (visible === columns && index < characters.length - 1) {
|
|
12594
|
+
rows.push("");
|
|
12595
|
+
visible = 0;
|
|
12596
|
+
}
|
|
12597
|
+
}
|
|
12598
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
12599
|
+
rows[rows.length - 2] += rows.pop();
|
|
12600
|
+
}
|
|
12601
|
+
};
|
|
12602
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
12603
|
+
const words = string.split(" ");
|
|
12604
|
+
let last = words.length;
|
|
12605
|
+
while (last > 0) {
|
|
12606
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
12607
|
+
break;
|
|
12608
|
+
}
|
|
12609
|
+
last--;
|
|
12610
|
+
}
|
|
12611
|
+
if (last === words.length) {
|
|
12612
|
+
return string;
|
|
12613
|
+
}
|
|
12614
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
12615
|
+
};
|
|
12616
|
+
var exec = (string, columns, options = {}) => {
|
|
12617
|
+
if (options.trim !== false && string.trim() === "") {
|
|
12618
|
+
return "";
|
|
12619
|
+
}
|
|
12620
|
+
let returnValue = "";
|
|
12621
|
+
let escapeCode;
|
|
12622
|
+
let escapeUrl;
|
|
12623
|
+
const lengths = wordLengths(string);
|
|
12624
|
+
let rows = [""];
|
|
12625
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
12626
|
+
if (options.trim !== false) {
|
|
12627
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
12628
|
+
}
|
|
12629
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
12630
|
+
if (index !== 0) {
|
|
12631
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
12632
|
+
rows.push("");
|
|
12633
|
+
rowLength = 0;
|
|
12634
|
+
}
|
|
12635
|
+
if (rowLength > 0 || options.trim === false) {
|
|
12636
|
+
rows[rows.length - 1] += " ";
|
|
12637
|
+
rowLength++;
|
|
12638
|
+
}
|
|
12639
|
+
}
|
|
12640
|
+
if (options.hard && lengths[index] > columns) {
|
|
12641
|
+
const remainingColumns = columns - rowLength;
|
|
12642
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
12643
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
12644
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
12645
|
+
rows.push("");
|
|
12646
|
+
}
|
|
12647
|
+
wrapWord(rows, word, columns);
|
|
12648
|
+
continue;
|
|
12649
|
+
}
|
|
12650
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
12651
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
12652
|
+
wrapWord(rows, word, columns);
|
|
12653
|
+
continue;
|
|
12654
|
+
}
|
|
12655
|
+
rows.push("");
|
|
12656
|
+
}
|
|
12657
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
12658
|
+
wrapWord(rows, word, columns);
|
|
12659
|
+
continue;
|
|
12660
|
+
}
|
|
12661
|
+
rows[rows.length - 1] += word;
|
|
12662
|
+
}
|
|
12663
|
+
if (options.trim !== false) {
|
|
12664
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
12665
|
+
}
|
|
12666
|
+
const preString = rows.join(`
|
|
12667
|
+
`);
|
|
12668
|
+
const pre = [...preString];
|
|
12669
|
+
let preStringIndex = 0;
|
|
12670
|
+
for (const [index, character] of pre.entries()) {
|
|
12671
|
+
returnValue += character;
|
|
12672
|
+
if (ESCAPES.has(character)) {
|
|
12673
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
12674
|
+
if (groups.code !== undefined) {
|
|
12675
|
+
const code2 = Number.parseFloat(groups.code);
|
|
12676
|
+
escapeCode = code2 === END_CODE ? undefined : code2;
|
|
12677
|
+
} else if (groups.uri !== undefined) {
|
|
12678
|
+
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
12679
|
+
}
|
|
12680
|
+
}
|
|
12681
|
+
const code = ansi_styles_default2.codes.get(Number(escapeCode));
|
|
12682
|
+
if (pre[index + 1] === `
|
|
12683
|
+
`) {
|
|
12684
|
+
if (escapeUrl) {
|
|
12685
|
+
returnValue += wrapAnsiHyperlink("");
|
|
12686
|
+
}
|
|
12687
|
+
if (escapeCode && code) {
|
|
12688
|
+
returnValue += wrapAnsiCode(code);
|
|
12689
|
+
}
|
|
12690
|
+
} else if (character === `
|
|
12691
|
+
`) {
|
|
12692
|
+
if (escapeCode && code) {
|
|
12693
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
12694
|
+
}
|
|
12695
|
+
if (escapeUrl) {
|
|
12696
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
12697
|
+
}
|
|
12698
|
+
}
|
|
12699
|
+
preStringIndex += character.length;
|
|
12700
|
+
}
|
|
12701
|
+
return returnValue;
|
|
12702
|
+
};
|
|
12703
|
+
function wrapAnsi(string, columns, options) {
|
|
12704
|
+
return String(string).normalize().replaceAll(`\r
|
|
12705
|
+
`, `
|
|
12706
|
+
`).split(`
|
|
12707
|
+
`).map((line) => exec(line, columns, options)).join(`
|
|
12708
|
+
`);
|
|
12709
|
+
}
|
|
12710
|
+
|
|
12711
|
+
// ../../node_modules/.bun/boxen@8.0.1/node_modules/boxen/index.js
|
|
12712
|
+
var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
|
|
12713
|
+
var NEWLINE = `
|
|
12714
|
+
`;
|
|
12715
|
+
var PAD = " ";
|
|
12716
|
+
var NONE = "none";
|
|
12717
|
+
var terminalColumns = () => {
|
|
12718
|
+
const { env: env2, stdout, stderr } = process3;
|
|
12719
|
+
if (stdout?.columns) {
|
|
12720
|
+
return stdout.columns;
|
|
12721
|
+
}
|
|
12722
|
+
if (stderr?.columns) {
|
|
12723
|
+
return stderr.columns;
|
|
12724
|
+
}
|
|
12725
|
+
if (env2.COLUMNS) {
|
|
12726
|
+
return Number.parseInt(env2.COLUMNS, 10);
|
|
12727
|
+
}
|
|
12728
|
+
return 80;
|
|
12729
|
+
};
|
|
12730
|
+
var getObject = (detail) => typeof detail === "number" ? {
|
|
12731
|
+
top: detail,
|
|
12732
|
+
right: detail * 3,
|
|
12733
|
+
bottom: detail,
|
|
12734
|
+
left: detail * 3
|
|
12735
|
+
} : {
|
|
12736
|
+
top: 0,
|
|
12737
|
+
right: 0,
|
|
12738
|
+
bottom: 0,
|
|
12739
|
+
left: 0,
|
|
12740
|
+
...detail
|
|
12741
|
+
};
|
|
12742
|
+
var getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
|
|
12743
|
+
var getBorderChars = (borderStyle) => {
|
|
12744
|
+
const sides = [
|
|
12745
|
+
"topLeft",
|
|
12746
|
+
"topRight",
|
|
12747
|
+
"bottomRight",
|
|
12748
|
+
"bottomLeft",
|
|
12749
|
+
"left",
|
|
12750
|
+
"right",
|
|
12751
|
+
"top",
|
|
12752
|
+
"bottom"
|
|
12753
|
+
];
|
|
12754
|
+
let characters;
|
|
12755
|
+
if (borderStyle === NONE) {
|
|
12756
|
+
borderStyle = {};
|
|
12757
|
+
for (const side of sides) {
|
|
12758
|
+
borderStyle[side] = "";
|
|
12759
|
+
}
|
|
12760
|
+
}
|
|
12761
|
+
if (typeof borderStyle === "string") {
|
|
12762
|
+
characters = import_cli_boxes.default[borderStyle];
|
|
12763
|
+
if (!characters) {
|
|
12764
|
+
throw new TypeError(`Invalid border style: ${borderStyle}`);
|
|
12765
|
+
}
|
|
12766
|
+
} else {
|
|
12767
|
+
if (typeof borderStyle?.vertical === "string") {
|
|
12768
|
+
borderStyle.left = borderStyle.vertical;
|
|
12769
|
+
borderStyle.right = borderStyle.vertical;
|
|
12770
|
+
}
|
|
12771
|
+
if (typeof borderStyle?.horizontal === "string") {
|
|
12772
|
+
borderStyle.top = borderStyle.horizontal;
|
|
12773
|
+
borderStyle.bottom = borderStyle.horizontal;
|
|
12774
|
+
}
|
|
12775
|
+
for (const side of sides) {
|
|
12776
|
+
if (borderStyle[side] === null || typeof borderStyle[side] !== "string") {
|
|
12777
|
+
throw new TypeError(`Invalid border style: ${side}`);
|
|
12778
|
+
}
|
|
12779
|
+
}
|
|
12780
|
+
characters = borderStyle;
|
|
12781
|
+
}
|
|
12782
|
+
return characters;
|
|
12783
|
+
};
|
|
12784
|
+
var makeTitle = (text, horizontal, alignment) => {
|
|
12785
|
+
let title = "";
|
|
12786
|
+
const textWidth = stringWidth(text);
|
|
12787
|
+
switch (alignment) {
|
|
12788
|
+
case "left": {
|
|
12789
|
+
title = text + horizontal.slice(textWidth);
|
|
12790
|
+
break;
|
|
12791
|
+
}
|
|
12792
|
+
case "right": {
|
|
12793
|
+
title = horizontal.slice(textWidth) + text;
|
|
12794
|
+
break;
|
|
12795
|
+
}
|
|
12796
|
+
default: {
|
|
12797
|
+
horizontal = horizontal.slice(textWidth);
|
|
12798
|
+
if (horizontal.length % 2 === 1) {
|
|
12799
|
+
horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
|
|
12800
|
+
title = horizontal.slice(1) + text + horizontal;
|
|
12801
|
+
} else {
|
|
12802
|
+
horizontal = horizontal.slice(horizontal.length / 2);
|
|
12803
|
+
title = horizontal + text + horizontal;
|
|
12804
|
+
}
|
|
12805
|
+
break;
|
|
12806
|
+
}
|
|
12807
|
+
}
|
|
12808
|
+
return title;
|
|
12809
|
+
};
|
|
12810
|
+
var makeContentText = (text, { padding, width, textAlignment, height }) => {
|
|
12811
|
+
text = import_ansi_align.default(text, { align: textAlignment });
|
|
12812
|
+
let lines = text.split(NEWLINE);
|
|
12813
|
+
const textWidth = widestLine(text);
|
|
12814
|
+
const max = width - padding.left - padding.right;
|
|
12815
|
+
if (textWidth > max) {
|
|
12816
|
+
const newLines = [];
|
|
12817
|
+
for (const line of lines) {
|
|
12818
|
+
const createdLines = wrapAnsi(line, max, { hard: true });
|
|
12819
|
+
const alignedLines = import_ansi_align.default(createdLines, { align: textAlignment });
|
|
12820
|
+
const alignedLinesArray = alignedLines.split(`
|
|
12821
|
+
`);
|
|
12822
|
+
const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
|
|
12823
|
+
for (const alignedLine of alignedLinesArray) {
|
|
12824
|
+
let paddedLine;
|
|
12825
|
+
switch (textAlignment) {
|
|
12826
|
+
case "center": {
|
|
12827
|
+
paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
|
|
12828
|
+
break;
|
|
12829
|
+
}
|
|
12830
|
+
case "right": {
|
|
12831
|
+
paddedLine = PAD.repeat(max - longestLength) + alignedLine;
|
|
12832
|
+
break;
|
|
12833
|
+
}
|
|
12834
|
+
default: {
|
|
12835
|
+
paddedLine = alignedLine;
|
|
12836
|
+
break;
|
|
12837
|
+
}
|
|
12838
|
+
}
|
|
12839
|
+
newLines.push(paddedLine);
|
|
12840
|
+
}
|
|
12841
|
+
}
|
|
12842
|
+
lines = newLines;
|
|
12843
|
+
}
|
|
12844
|
+
if (textAlignment === "center" && textWidth < max) {
|
|
12845
|
+
lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
|
|
12846
|
+
} else if (textAlignment === "right" && textWidth < max) {
|
|
12847
|
+
lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
|
|
12848
|
+
}
|
|
12849
|
+
const paddingLeft = PAD.repeat(padding.left);
|
|
12850
|
+
const paddingRight = PAD.repeat(padding.right);
|
|
12851
|
+
lines = lines.map((line) => {
|
|
12852
|
+
const newLine = paddingLeft + line + paddingRight;
|
|
12853
|
+
return newLine + PAD.repeat(width - stringWidth(newLine));
|
|
12854
|
+
});
|
|
12855
|
+
if (padding.top > 0) {
|
|
12856
|
+
lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
|
|
12857
|
+
}
|
|
12858
|
+
if (padding.bottom > 0) {
|
|
12859
|
+
lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
|
|
12860
|
+
}
|
|
12861
|
+
if (height && lines.length > height) {
|
|
12862
|
+
lines = lines.slice(0, height);
|
|
12863
|
+
} else if (height && lines.length < height) {
|
|
12864
|
+
lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
|
|
12865
|
+
}
|
|
12866
|
+
return lines.join(NEWLINE);
|
|
12867
|
+
};
|
|
12868
|
+
var boxContent = (content, contentWidth, options) => {
|
|
12869
|
+
const colorizeBorder = (border) => {
|
|
12870
|
+
const newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;
|
|
12871
|
+
return options.dimBorder ? source_default.dim(newBorder) : newBorder;
|
|
12872
|
+
};
|
|
12873
|
+
const colorizeContent = (content2) => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content2) : content2;
|
|
12874
|
+
const chars = getBorderChars(options.borderStyle);
|
|
12875
|
+
const columns = terminalColumns();
|
|
12876
|
+
let marginLeft = PAD.repeat(options.margin.left);
|
|
12877
|
+
if (options.float === "center") {
|
|
12878
|
+
const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
|
|
12879
|
+
marginLeft = PAD.repeat(marginWidth);
|
|
12880
|
+
} else if (options.float === "right") {
|
|
12881
|
+
const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
|
|
12882
|
+
marginLeft = PAD.repeat(marginWidth);
|
|
12883
|
+
}
|
|
12884
|
+
let result = "";
|
|
12885
|
+
if (options.margin.top) {
|
|
12886
|
+
result += NEWLINE.repeat(options.margin.top);
|
|
12887
|
+
}
|
|
12888
|
+
if (options.borderStyle !== NONE || options.title) {
|
|
12889
|
+
result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
|
|
12890
|
+
}
|
|
12891
|
+
const lines = content.split(NEWLINE);
|
|
12892
|
+
result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
|
|
12893
|
+
if (options.borderStyle !== NONE) {
|
|
12894
|
+
result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
|
|
12895
|
+
}
|
|
12896
|
+
if (options.margin.bottom) {
|
|
12897
|
+
result += NEWLINE.repeat(options.margin.bottom);
|
|
12898
|
+
}
|
|
12899
|
+
return result;
|
|
12900
|
+
};
|
|
12901
|
+
var sanitizeOptions = (options) => {
|
|
12902
|
+
if (options.fullscreen && process3?.stdout) {
|
|
12903
|
+
let newDimensions = [process3.stdout.columns, process3.stdout.rows];
|
|
12904
|
+
if (typeof options.fullscreen === "function") {
|
|
12905
|
+
newDimensions = options.fullscreen(...newDimensions);
|
|
12906
|
+
}
|
|
12907
|
+
options.width ||= newDimensions[0];
|
|
12908
|
+
options.height ||= newDimensions[1];
|
|
12909
|
+
}
|
|
12910
|
+
options.width &&= Math.max(1, options.width - getBorderWidth(options.borderStyle));
|
|
12911
|
+
options.height &&= Math.max(1, options.height - getBorderWidth(options.borderStyle));
|
|
12912
|
+
return options;
|
|
12913
|
+
};
|
|
12914
|
+
var formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
|
|
12915
|
+
var determineDimensions = (text, options) => {
|
|
12916
|
+
options = sanitizeOptions(options);
|
|
12917
|
+
const widthOverride = options.width !== undefined;
|
|
12918
|
+
const columns = terminalColumns();
|
|
12919
|
+
const borderWidth = getBorderWidth(options.borderStyle);
|
|
12920
|
+
const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
|
|
12921
|
+
const widest = widestLine(wrapAnsi(text, columns - borderWidth, { hard: true, trim: false })) + options.padding.left + options.padding.right;
|
|
12922
|
+
if (options.title && widthOverride) {
|
|
12923
|
+
options.title = options.title.slice(0, Math.max(0, options.width - 2));
|
|
12924
|
+
options.title &&= formatTitle(options.title, options.borderStyle);
|
|
12925
|
+
} else if (options.title) {
|
|
12926
|
+
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
|
|
12927
|
+
if (options.title) {
|
|
12928
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
12929
|
+
if (stringWidth(options.title) > widest) {
|
|
12930
|
+
options.width = stringWidth(options.title);
|
|
12931
|
+
}
|
|
12932
|
+
}
|
|
12933
|
+
}
|
|
12934
|
+
options.width ||= widest;
|
|
12935
|
+
if (!widthOverride) {
|
|
12936
|
+
if (options.margin.left && options.margin.right && options.width > maxWidth) {
|
|
12937
|
+
const spaceForMargins = columns - options.width - borderWidth;
|
|
12938
|
+
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
|
|
12939
|
+
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
|
|
12940
|
+
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
|
|
12941
|
+
}
|
|
12942
|
+
options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
|
|
12943
|
+
}
|
|
12944
|
+
if (options.width - (options.padding.left + options.padding.right) <= 0) {
|
|
12945
|
+
options.padding.left = 0;
|
|
12946
|
+
options.padding.right = 0;
|
|
12947
|
+
}
|
|
12948
|
+
if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
|
|
12949
|
+
options.padding.top = 0;
|
|
12950
|
+
options.padding.bottom = 0;
|
|
12951
|
+
}
|
|
12952
|
+
return options;
|
|
12953
|
+
};
|
|
12954
|
+
var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
|
|
12955
|
+
var isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
|
|
12956
|
+
var getColorFunction = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
|
|
12957
|
+
var getBGColorFunction = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
|
|
12958
|
+
function boxen(text, options) {
|
|
12959
|
+
options = {
|
|
12960
|
+
padding: 0,
|
|
12961
|
+
borderStyle: "single",
|
|
12962
|
+
dimBorder: false,
|
|
12963
|
+
textAlignment: "left",
|
|
12964
|
+
float: "left",
|
|
12965
|
+
titleAlignment: "left",
|
|
12966
|
+
...options
|
|
12967
|
+
};
|
|
12968
|
+
if (options.align) {
|
|
12969
|
+
options.textAlignment = options.align;
|
|
12970
|
+
}
|
|
12971
|
+
if (options.borderColor && !isColorValid(options.borderColor)) {
|
|
12972
|
+
throw new Error(`${options.borderColor} is not a valid borderColor`);
|
|
12973
|
+
}
|
|
12974
|
+
if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
|
|
12975
|
+
throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
|
|
12976
|
+
}
|
|
12977
|
+
options.padding = getObject(options.padding);
|
|
12978
|
+
options.margin = getObject(options.margin);
|
|
12979
|
+
options = determineDimensions(text, options);
|
|
12980
|
+
text = makeContentText(text, options);
|
|
12981
|
+
return boxContent(text, options.width, options);
|
|
12982
|
+
}
|
|
11467
12983
|
|
|
11468
12984
|
// ../core/src/banner.ts
|
|
11469
|
-
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
11470
12985
|
var quotes = [
|
|
11471
12986
|
"Don't Panic - your app is being baked",
|
|
11472
12987
|
"From scratch to production in seconds",
|
|
11473
|
-
"
|
|
11474
|
-
"
|
|
11475
|
-
"
|
|
11476
|
-
"
|
|
11477
|
-
"
|
|
11478
|
-
"
|
|
11479
|
-
"
|
|
11480
|
-
"
|
|
12988
|
+
"Modern tools for modern builders",
|
|
12989
|
+
"Ship faster, build smarter",
|
|
12990
|
+
"Type-safe, blazingly fast, production-ready",
|
|
12991
|
+
"Bake once, deploy everywhere",
|
|
12992
|
+
"The future of full-stack development",
|
|
12993
|
+
"Where speed meets elegance",
|
|
12994
|
+
"Built for indie hackers, loved by teams",
|
|
12995
|
+
"Your shortcut to production excellence"
|
|
11481
12996
|
];
|
|
11482
12997
|
var getRandomQuote = () => {
|
|
11483
12998
|
return quotes[Math.floor(Math.random() * quotes.length)];
|
|
11484
12999
|
};
|
|
11485
|
-
var
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.yellow("\u2517\u251B\u2022\u2517\u2501\u251B\u251B\u2517\u251B\u2517\u253B \u253B")} ${import_picocolors3.default.dim("\u2551")}
|
|
11493
|
-
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim("\u2551")}
|
|
11494
|
-
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.cyan(quote.padEnd(46))} ${import_picocolors3.default.dim("\u2551")}
|
|
11495
|
-
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim("\u2551")}
|
|
11496
|
-
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim(`v${version}`)}${" ".repeat(43 - version.length)}\uD83C\uDF5E ${import_picocolors3.default.dim("\u2551")}
|
|
11497
|
-
${import_picocolors3.default.dim("\u255A" + "\u2550".repeat(50) + "\u255D")}
|
|
13000
|
+
var logo = `
|
|
13001
|
+
____ _ _ _
|
|
13002
|
+
| _ \\ | | (_) |
|
|
13003
|
+
| |_) |_ _ _ __ | | ___| |_
|
|
13004
|
+
| _ <| | | | '_ \\| |/ / | __|
|
|
13005
|
+
| |_) | |_| | | | | <| | |_
|
|
13006
|
+
|____/ \\__,_|_| |_|_|\\_\\_|\\__|
|
|
11498
13007
|
`;
|
|
13008
|
+
var createBanner = (version = "0.3.1") => {
|
|
13009
|
+
const quote = getRandomQuote();
|
|
13010
|
+
const content = [
|
|
13011
|
+
source_default.yellow(logo.trim()),
|
|
13012
|
+
"",
|
|
13013
|
+
source_default.cyan("\uD83C\uDF5E Bake production-ready apps in seconds"),
|
|
13014
|
+
source_default.dim("Modern \u2022 Fast \u2022 Opinionated"),
|
|
13015
|
+
"",
|
|
13016
|
+
source_default.cyan(quote),
|
|
13017
|
+
"",
|
|
13018
|
+
source_default.dim(`v${version}`)
|
|
13019
|
+
].join(`
|
|
13020
|
+
`);
|
|
13021
|
+
return boxen(content, {
|
|
13022
|
+
padding: 1,
|
|
13023
|
+
margin: { top: 1, bottom: 1 },
|
|
13024
|
+
borderColor: "gray",
|
|
13025
|
+
borderStyle: "round",
|
|
13026
|
+
dimBorder: true
|
|
13027
|
+
});
|
|
11499
13028
|
};
|
|
11500
13029
|
var showBanner = (version) => {
|
|
11501
13030
|
console.log(createBanner(version));
|
|
@@ -11872,9 +13401,9 @@ import { spawnSync } from "child_process";
|
|
|
11872
13401
|
import { debuglog } from "util";
|
|
11873
13402
|
|
|
11874
13403
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/utils/standard-stream.js
|
|
11875
|
-
import
|
|
13404
|
+
import process4 from "process";
|
|
11876
13405
|
var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
11877
|
-
var STANDARD_STREAMS = [
|
|
13406
|
+
var STANDARD_STREAMS = [process4.stdin, process4.stdout, process4.stderr];
|
|
11878
13407
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
11879
13408
|
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
11880
13409
|
|
|
@@ -12011,14 +13540,14 @@ var quoteString = (escapedArgument) => {
|
|
|
12011
13540
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
12012
13541
|
|
|
12013
13542
|
// ../../node_modules/.bun/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
12014
|
-
import
|
|
13543
|
+
import process5 from "process";
|
|
12015
13544
|
function isUnicodeSupported() {
|
|
12016
|
-
const { env } =
|
|
12017
|
-
const { TERM, TERM_PROGRAM } =
|
|
12018
|
-
if (
|
|
13545
|
+
const { env: env2 } = process5;
|
|
13546
|
+
const { TERM, TERM_PROGRAM } = env2;
|
|
13547
|
+
if (process5.platform !== "win32") {
|
|
12019
13548
|
return TERM !== "linux";
|
|
12020
13549
|
}
|
|
12021
|
-
return Boolean(
|
|
13550
|
+
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
12022
13551
|
}
|
|
12023
13552
|
|
|
12024
13553
|
// ../../node_modules/.bun/figures@6.1.0/node_modules/figures/index.js
|
|
@@ -12298,8 +13827,8 @@ var figures_default = figures;
|
|
|
12298
13827
|
var replacements = Object.entries(specialMainSymbols);
|
|
12299
13828
|
|
|
12300
13829
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
|
12301
|
-
import
|
|
12302
|
-
var hasColors =
|
|
13830
|
+
import tty2 from "tty";
|
|
13831
|
+
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
12303
13832
|
var format2 = (open, close) => {
|
|
12304
13833
|
if (!hasColors) {
|
|
12305
13834
|
return (input) => input;
|
|
@@ -12522,22 +14051,22 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
12522
14051
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/arguments/options.js
|
|
12523
14052
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
12524
14053
|
import path6 from "path";
|
|
12525
|
-
import
|
|
14054
|
+
import process8 from "process";
|
|
12526
14055
|
|
|
12527
14056
|
// ../../node_modules/.bun/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
12528
|
-
import
|
|
14057
|
+
import process6 from "process";
|
|
12529
14058
|
import path3 from "path";
|
|
12530
14059
|
|
|
12531
14060
|
// ../../node_modules/.bun/path-key@4.0.0/node_modules/path-key/index.js
|
|
12532
14061
|
function pathKey(options = {}) {
|
|
12533
14062
|
const {
|
|
12534
|
-
env = process.env,
|
|
14063
|
+
env: env2 = process.env,
|
|
12535
14064
|
platform: platform2 = process.platform
|
|
12536
14065
|
} = options;
|
|
12537
14066
|
if (platform2 !== "win32") {
|
|
12538
14067
|
return "PATH";
|
|
12539
14068
|
}
|
|
12540
|
-
return Object.keys(
|
|
14069
|
+
return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
12541
14070
|
}
|
|
12542
14071
|
|
|
12543
14072
|
// ../../node_modules/.bun/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
@@ -12566,10 +14095,10 @@ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
12566
14095
|
|
|
12567
14096
|
// ../../node_modules/.bun/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
12568
14097
|
var npmRunPath = ({
|
|
12569
|
-
cwd =
|
|
12570
|
-
path: pathOption =
|
|
14098
|
+
cwd = process6.cwd(),
|
|
14099
|
+
path: pathOption = process6.env[pathKey()],
|
|
12571
14100
|
preferLocal = true,
|
|
12572
|
-
execPath =
|
|
14101
|
+
execPath = process6.execPath,
|
|
12573
14102
|
addExecPath = true
|
|
12574
14103
|
} = {}) => {
|
|
12575
14104
|
const cwdPath = path3.resolve(toPath(cwd));
|
|
@@ -12597,12 +14126,12 @@ var applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
12597
14126
|
result.push(pathPart);
|
|
12598
14127
|
}
|
|
12599
14128
|
};
|
|
12600
|
-
var npmRunPathEnv = ({ env =
|
|
12601
|
-
|
|
12602
|
-
const pathName = pathKey({ env });
|
|
12603
|
-
options.path =
|
|
12604
|
-
|
|
12605
|
-
return
|
|
14129
|
+
var npmRunPathEnv = ({ env: env2 = process6.env, ...options } = {}) => {
|
|
14130
|
+
env2 = { ...env2 };
|
|
14131
|
+
const pathName = pathKey({ env: env2 });
|
|
14132
|
+
options.path = env2[pathName];
|
|
14133
|
+
env2[pathName] = npmRunPath(options);
|
|
14134
|
+
return env2;
|
|
12606
14135
|
};
|
|
12607
14136
|
|
|
12608
14137
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/terminate/kill.js
|
|
@@ -13860,14 +15389,14 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
13860
15389
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/arguments/cwd.js
|
|
13861
15390
|
import { statSync } from "fs";
|
|
13862
15391
|
import path5 from "path";
|
|
13863
|
-
import
|
|
15392
|
+
import process7 from "process";
|
|
13864
15393
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
13865
15394
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
13866
15395
|
return path5.resolve(cwdString);
|
|
13867
15396
|
};
|
|
13868
15397
|
var getDefaultCwd = () => {
|
|
13869
15398
|
try {
|
|
13870
|
-
return
|
|
15399
|
+
return process7.cwd();
|
|
13871
15400
|
} catch (error) {
|
|
13872
15401
|
error.message = `The current directory does not exist.
|
|
13873
15402
|
${error.message}`;
|
|
@@ -13910,7 +15439,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
13910
15439
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
13911
15440
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
13912
15441
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
13913
|
-
if (
|
|
15442
|
+
if (process8.platform === "win32" && path6.basename(file, ".exe") === "cmd") {
|
|
13914
15443
|
commandArguments.unshift("/q");
|
|
13915
15444
|
}
|
|
13916
15445
|
return { file, commandArguments, options };
|
|
@@ -13951,17 +15480,17 @@ var addDefaultOptions = ({
|
|
|
13951
15480
|
serialization
|
|
13952
15481
|
});
|
|
13953
15482
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
13954
|
-
const
|
|
15483
|
+
const env2 = extendEnv ? { ...process8.env, ...envOption } : envOption;
|
|
13955
15484
|
if (preferLocal || node) {
|
|
13956
15485
|
return npmRunPathEnv({
|
|
13957
|
-
env,
|
|
15486
|
+
env: env2,
|
|
13958
15487
|
cwd: localDirectory,
|
|
13959
15488
|
execPath: nodePath,
|
|
13960
15489
|
preferLocal,
|
|
13961
15490
|
addExecPath: node
|
|
13962
15491
|
});
|
|
13963
15492
|
}
|
|
13964
|
-
return
|
|
15493
|
+
return env2;
|
|
13965
15494
|
};
|
|
13966
15495
|
|
|
13967
15496
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/arguments/shell.js
|
|
@@ -15120,7 +16649,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
|
|
|
15120
16649
|
var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
15121
16650
|
|
|
15122
16651
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/stdio/direction.js
|
|
15123
|
-
import
|
|
16652
|
+
import process9 from "process";
|
|
15124
16653
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
15125
16654
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
15126
16655
|
if (directions.includes("input") && directions.includes("output")) {
|
|
@@ -15162,10 +16691,10 @@ var guessStreamDirection = {
|
|
|
15162
16691
|
}
|
|
15163
16692
|
};
|
|
15164
16693
|
var getStandardStreamDirection = (value) => {
|
|
15165
|
-
if ([0,
|
|
16694
|
+
if ([0, process9.stdin].includes(value)) {
|
|
15166
16695
|
return "input";
|
|
15167
16696
|
}
|
|
15168
|
-
if ([1, 2,
|
|
16697
|
+
if ([1, 2, process9.stdout, process9.stderr].includes(value)) {
|
|
15169
16698
|
return "output";
|
|
15170
16699
|
}
|
|
15171
16700
|
};
|
|
@@ -15210,7 +16739,7 @@ var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(
|
|
|
15210
16739
|
|
|
15211
16740
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/stdio/native.js
|
|
15212
16741
|
import { readFileSync } from "fs";
|
|
15213
|
-
import
|
|
16742
|
+
import tty3 from "tty";
|
|
15214
16743
|
var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
15215
16744
|
if (!isStdioArray || type !== "native") {
|
|
15216
16745
|
return stdioItem;
|
|
@@ -15240,7 +16769,7 @@ var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
|
|
|
15240
16769
|
if (direction === "output") {
|
|
15241
16770
|
return { type: "fileNumber", value: targetFdNumber, optionName };
|
|
15242
16771
|
}
|
|
15243
|
-
if (
|
|
16772
|
+
if (tty3.isatty(targetFdNumber)) {
|
|
15244
16773
|
throw new TypeError(`The \`${optionName}: ${serializeOptionValue(value)}\` option is invalid: it cannot be a TTY with synchronous methods.`);
|
|
15245
16774
|
}
|
|
15246
16775
|
return { type: "uint8Array", value: bufferToUint8Array(readFileSync(targetFdNumber)), optionName };
|
|
@@ -16272,7 +17801,7 @@ import { setMaxListeners } from "events";
|
|
|
16272
17801
|
import { spawn } from "child_process";
|
|
16273
17802
|
|
|
16274
17803
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/ipc/methods.js
|
|
16275
|
-
import
|
|
17804
|
+
import process10 from "process";
|
|
16276
17805
|
|
|
16277
17806
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/ipc/get-one.js
|
|
16278
17807
|
import { once as once5, on as on2 } from "events";
|
|
@@ -16411,9 +17940,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
16411
17940
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
16412
17941
|
};
|
|
16413
17942
|
var getIpcExport = () => {
|
|
16414
|
-
const anyProcess =
|
|
17943
|
+
const anyProcess = process10;
|
|
16415
17944
|
const isSubprocess = true;
|
|
16416
|
-
const ipc =
|
|
17945
|
+
const ipc = process10.channel !== undefined;
|
|
16417
17946
|
return {
|
|
16418
17947
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
16419
17948
|
getCancelSignal: getCancelSignal.bind(undefined, {
|
|
@@ -16858,7 +18387,7 @@ if (process.platform === "linux") {
|
|
|
16858
18387
|
}
|
|
16859
18388
|
|
|
16860
18389
|
// ../../node_modules/.bun/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
16861
|
-
var processOk = (
|
|
18390
|
+
var processOk = (process11) => !!process11 && typeof process11 === "object" && typeof process11.removeListener === "function" && typeof process11.emit === "function" && typeof process11.reallyExit === "function" && typeof process11.listeners === "function" && typeof process11.kill === "function" && typeof process11.pid === "number" && typeof process11.on === "function";
|
|
16862
18391
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
16863
18392
|
var global2 = globalThis;
|
|
16864
18393
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -16941,22 +18470,22 @@ class SignalExitFallback extends SignalExitBase {
|
|
|
16941
18470
|
}
|
|
16942
18471
|
|
|
16943
18472
|
class SignalExit extends SignalExitBase {
|
|
16944
|
-
#hupSig =
|
|
18473
|
+
#hupSig = process11.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
16945
18474
|
#emitter = new Emitter;
|
|
16946
18475
|
#process;
|
|
16947
18476
|
#originalProcessEmit;
|
|
16948
18477
|
#originalProcessReallyExit;
|
|
16949
18478
|
#sigListeners = {};
|
|
16950
18479
|
#loaded = false;
|
|
16951
|
-
constructor(
|
|
18480
|
+
constructor(process11) {
|
|
16952
18481
|
super();
|
|
16953
|
-
this.#process =
|
|
18482
|
+
this.#process = process11;
|
|
16954
18483
|
this.#sigListeners = {};
|
|
16955
18484
|
for (const sig of signals) {
|
|
16956
18485
|
this.#sigListeners[sig] = () => {
|
|
16957
18486
|
const listeners = this.#process.listeners(sig);
|
|
16958
18487
|
let { count: count2 } = this.#emitter;
|
|
16959
|
-
const p2 =
|
|
18488
|
+
const p2 = process11;
|
|
16960
18489
|
if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
|
|
16961
18490
|
count2 += p2.__signal_exit_emitter__.count;
|
|
16962
18491
|
}
|
|
@@ -16965,12 +18494,12 @@ class SignalExit extends SignalExitBase {
|
|
|
16965
18494
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
16966
18495
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
16967
18496
|
if (!ret)
|
|
16968
|
-
|
|
18497
|
+
process11.kill(process11.pid, s);
|
|
16969
18498
|
}
|
|
16970
18499
|
};
|
|
16971
18500
|
}
|
|
16972
|
-
this.#originalProcessReallyExit =
|
|
16973
|
-
this.#originalProcessEmit =
|
|
18501
|
+
this.#originalProcessReallyExit = process11.reallyExit;
|
|
18502
|
+
this.#originalProcessEmit = process11.emit;
|
|
16974
18503
|
}
|
|
16975
18504
|
onExit(cb, opts) {
|
|
16976
18505
|
if (!processOk(this.#process)) {
|
|
@@ -17048,12 +18577,12 @@ class SignalExit extends SignalExitBase {
|
|
|
17048
18577
|
}
|
|
17049
18578
|
}
|
|
17050
18579
|
}
|
|
17051
|
-
var
|
|
18580
|
+
var process11 = globalThis.process;
|
|
17052
18581
|
var {
|
|
17053
18582
|
onExit,
|
|
17054
18583
|
load,
|
|
17055
18584
|
unload
|
|
17056
|
-
} = signalExitWrap(processOk(
|
|
18585
|
+
} = signalExitWrap(processOk(process11) ? new SignalExit(process11) : new SignalExitFallback);
|
|
17057
18586
|
|
|
17058
18587
|
// ../../node_modules/.bun/execa@9.6.0/node_modules/execa/lib/terminate/cleanup.js
|
|
17059
18588
|
var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -18438,30 +19967,30 @@ function validateProjectName(name) {
|
|
|
18438
19967
|
return { valid: true };
|
|
18439
19968
|
}
|
|
18440
19969
|
// ../core/src/logger.ts
|
|
18441
|
-
var
|
|
19970
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
18442
19971
|
var logger = {
|
|
18443
19972
|
info(message) {
|
|
18444
|
-
console.log(
|
|
19973
|
+
console.log(import_picocolors3.default.blue("\u2139"), message);
|
|
18445
19974
|
},
|
|
18446
19975
|
success(message) {
|
|
18447
|
-
console.log(
|
|
19976
|
+
console.log(import_picocolors3.default.green("\u2714"), message);
|
|
18448
19977
|
},
|
|
18449
19978
|
warn(message) {
|
|
18450
|
-
console.log(
|
|
19979
|
+
console.log(import_picocolors3.default.yellow("\u26A0"), message);
|
|
18451
19980
|
},
|
|
18452
19981
|
error(message) {
|
|
18453
|
-
console.error(
|
|
19982
|
+
console.error(import_picocolors3.default.red("\u2716"), message);
|
|
18454
19983
|
},
|
|
18455
19984
|
step(message) {
|
|
18456
|
-
console.log(
|
|
19985
|
+
console.log(import_picocolors3.default.cyan("\u2192"), message);
|
|
18457
19986
|
},
|
|
18458
19987
|
debug(message) {
|
|
18459
19988
|
if (process.env.DEBUG) {
|
|
18460
|
-
console.log(
|
|
19989
|
+
console.log(import_picocolors3.default.gray("[DEBUG]"), message);
|
|
18461
19990
|
}
|
|
18462
19991
|
},
|
|
18463
19992
|
dim(message) {
|
|
18464
|
-
console.log(
|
|
19993
|
+
console.log(import_picocolors3.default.dim(message));
|
|
18465
19994
|
},
|
|
18466
19995
|
br() {
|
|
18467
19996
|
console.log();
|
|
@@ -19431,13 +20960,13 @@ function timeRegex(args) {
|
|
|
19431
20960
|
return new RegExp(`^${timeRegexSource(args)}$`);
|
|
19432
20961
|
}
|
|
19433
20962
|
function datetimeRegex(args) {
|
|
19434
|
-
let
|
|
20963
|
+
let regex2 = `${dateRegexSource}T${timeRegexSource(args)}`;
|
|
19435
20964
|
const opts = [];
|
|
19436
20965
|
opts.push(args.local ? `Z?` : `Z`);
|
|
19437
20966
|
if (args.offset)
|
|
19438
20967
|
opts.push(`([+-]\\d{2}:?\\d{2})`);
|
|
19439
|
-
|
|
19440
|
-
return new RegExp(`^${
|
|
20968
|
+
regex2 = `${regex2}(${opts.join("|")})`;
|
|
20969
|
+
return new RegExp(`^${regex2}$`);
|
|
19441
20970
|
}
|
|
19442
20971
|
function isValidIP(ip, version) {
|
|
19443
20972
|
if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
|
|
@@ -19684,8 +21213,8 @@ class ZodString extends ZodType {
|
|
|
19684
21213
|
status.dirty();
|
|
19685
21214
|
}
|
|
19686
21215
|
} else if (check.kind === "datetime") {
|
|
19687
|
-
const
|
|
19688
|
-
if (!
|
|
21216
|
+
const regex2 = datetimeRegex(check);
|
|
21217
|
+
if (!regex2.test(input.data)) {
|
|
19689
21218
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
19690
21219
|
addIssueToContext(ctx, {
|
|
19691
21220
|
code: ZodIssueCode.invalid_string,
|
|
@@ -19695,8 +21224,8 @@ class ZodString extends ZodType {
|
|
|
19695
21224
|
status.dirty();
|
|
19696
21225
|
}
|
|
19697
21226
|
} else if (check.kind === "date") {
|
|
19698
|
-
const
|
|
19699
|
-
if (!
|
|
21227
|
+
const regex2 = dateRegex;
|
|
21228
|
+
if (!regex2.test(input.data)) {
|
|
19700
21229
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
19701
21230
|
addIssueToContext(ctx, {
|
|
19702
21231
|
code: ZodIssueCode.invalid_string,
|
|
@@ -19706,8 +21235,8 @@ class ZodString extends ZodType {
|
|
|
19706
21235
|
status.dirty();
|
|
19707
21236
|
}
|
|
19708
21237
|
} else if (check.kind === "time") {
|
|
19709
|
-
const
|
|
19710
|
-
if (!
|
|
21238
|
+
const regex2 = timeRegex(check);
|
|
21239
|
+
if (!regex2.test(input.data)) {
|
|
19711
21240
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
19712
21241
|
addIssueToContext(ctx, {
|
|
19713
21242
|
code: ZodIssueCode.invalid_string,
|
|
@@ -19782,8 +21311,8 @@ class ZodString extends ZodType {
|
|
|
19782
21311
|
}
|
|
19783
21312
|
return { status: status.value, value: input.data };
|
|
19784
21313
|
}
|
|
19785
|
-
_regex(
|
|
19786
|
-
return this.refinement((data) =>
|
|
21314
|
+
_regex(regex2, validation, message) {
|
|
21315
|
+
return this.refinement((data) => regex2.test(data), {
|
|
19787
21316
|
validation,
|
|
19788
21317
|
code: ZodIssueCode.invalid_string,
|
|
19789
21318
|
...errorUtil.errToObj(message)
|
|
@@ -19875,10 +21404,10 @@ class ZodString extends ZodType {
|
|
|
19875
21404
|
duration(message) {
|
|
19876
21405
|
return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
|
|
19877
21406
|
}
|
|
19878
|
-
regex(
|
|
21407
|
+
regex(regex2, message) {
|
|
19879
21408
|
return this._addCheck({
|
|
19880
21409
|
kind: "regex",
|
|
19881
|
-
regex,
|
|
21410
|
+
regex: regex2,
|
|
19882
21411
|
...errorUtil.errToObj(message)
|
|
19883
21412
|
});
|
|
19884
21413
|
}
|
|
@@ -22602,7 +24131,7 @@ async function installDependencies(cwd, packages) {
|
|
|
22602
24131
|
}
|
|
22603
24132
|
}
|
|
22604
24133
|
// src/commands/init.real.ts
|
|
22605
|
-
var
|
|
24134
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
22606
24135
|
|
|
22607
24136
|
// ../templates/src/render.ts
|
|
22608
24137
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
@@ -23022,64 +24551,121 @@ Built with \u2764\uFE0F using Bun monorepo features
|
|
|
23022
24551
|
await writeFile(join(projectPath, "tsconfig.json"), JSON.stringify(tsconfigContent, null, 2));
|
|
23023
24552
|
}
|
|
23024
24553
|
// src/commands/init.real.ts
|
|
23025
|
-
|
|
23026
|
-
const
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
|
|
23032
|
-
|
|
24554
|
+
function getOptionValue(envVar, option, defaultValue) {
|
|
24555
|
+
const envValue = process.env[envVar];
|
|
24556
|
+
if (envValue !== undefined) {
|
|
24557
|
+
if (envValue === "true")
|
|
24558
|
+
return true;
|
|
24559
|
+
if (envValue === "false")
|
|
24560
|
+
return false;
|
|
24561
|
+
return envValue;
|
|
24562
|
+
}
|
|
24563
|
+
return option ?? defaultValue;
|
|
24564
|
+
}
|
|
24565
|
+
async function initCommand(options = {}) {
|
|
24566
|
+
const isNonInteractive = process.env.BUNKIT_NON_INTERACTIVE === "true" || options.nonInteractive === true;
|
|
24567
|
+
let projectName = getOptionValue("BUNKIT_PROJECT_NAME", options.name);
|
|
24568
|
+
if (!projectName) {
|
|
24569
|
+
if (isNonInteractive) {
|
|
24570
|
+
throw new Error("Project name is required in non-interactive mode. " + "Provide it via BUNKIT_PROJECT_NAME env var or --name flag.");
|
|
24571
|
+
}
|
|
24572
|
+
projectName = await he({
|
|
24573
|
+
message: "\uD83D\uDCE6 What is your project named?",
|
|
24574
|
+
placeholder: "my-awesome-project",
|
|
24575
|
+
validate: (value) => {
|
|
24576
|
+
const result = validateProjectName(value);
|
|
24577
|
+
if (!result.valid)
|
|
24578
|
+
return result.error;
|
|
24579
|
+
}
|
|
24580
|
+
});
|
|
24581
|
+
if (pD(projectName)) {
|
|
24582
|
+
xe("Operation cancelled.");
|
|
24583
|
+
process.exit(0);
|
|
23033
24584
|
}
|
|
23034
|
-
}
|
|
23035
|
-
|
|
23036
|
-
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
|
|
23040
|
-
|
|
23041
|
-
|
|
23042
|
-
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
23046
|
-
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
24585
|
+
} else {
|
|
24586
|
+
const result = validateProjectName(projectName);
|
|
24587
|
+
if (!result.valid) {
|
|
24588
|
+
throw new Error(`Invalid project name: ${result.error}`);
|
|
24589
|
+
}
|
|
24590
|
+
}
|
|
24591
|
+
let preset = getOptionValue("BUNKIT_PRESET", options.preset);
|
|
24592
|
+
if (!preset) {
|
|
24593
|
+
if (isNonInteractive) {
|
|
24594
|
+
throw new Error("Preset is required in non-interactive mode. " + "Provide it via BUNKIT_PRESET env var or --preset flag. " + "Valid values: minimal, web, api, full");
|
|
24595
|
+
}
|
|
24596
|
+
preset = await ve({
|
|
24597
|
+
message: "\uD83C\uDFA8 Which preset would you like?",
|
|
24598
|
+
options: [
|
|
24599
|
+
{
|
|
24600
|
+
value: "minimal",
|
|
24601
|
+
label: "\u26A1 Minimal",
|
|
24602
|
+
hint: "Single repo, clean start"
|
|
24603
|
+
},
|
|
24604
|
+
{
|
|
24605
|
+
value: "web",
|
|
24606
|
+
label: "\uD83C\uDF10 Web",
|
|
24607
|
+
hint: "Next.js 16 + React 19"
|
|
24608
|
+
},
|
|
24609
|
+
{
|
|
24610
|
+
value: "api",
|
|
24611
|
+
label: "\uD83D\uDE80 API",
|
|
24612
|
+
hint: "Hono + Bun.serve()"
|
|
24613
|
+
},
|
|
24614
|
+
{
|
|
24615
|
+
value: "full",
|
|
24616
|
+
label: "\uD83D\uDCE6 Full-stack",
|
|
24617
|
+
hint: "Monorepo with everything"
|
|
24618
|
+
}
|
|
24619
|
+
]
|
|
24620
|
+
});
|
|
24621
|
+
if (pD(preset)) {
|
|
24622
|
+
xe("Operation cancelled.");
|
|
24623
|
+
process.exit(0);
|
|
24624
|
+
}
|
|
24625
|
+
} else {
|
|
24626
|
+
const validPresets = ["minimal", "web", "api", "full"];
|
|
24627
|
+
if (!validPresets.includes(preset)) {
|
|
24628
|
+
throw new Error(`Invalid preset: ${preset}. Valid values: ${validPresets.join(", ")}`);
|
|
24629
|
+
}
|
|
24630
|
+
}
|
|
24631
|
+
let shouldInstall = getOptionValue("BUNKIT_INSTALL", options.install, true);
|
|
24632
|
+
if (shouldInstall === undefined) {
|
|
24633
|
+
if (isNonInteractive) {
|
|
24634
|
+
shouldInstall = true;
|
|
24635
|
+
} else {
|
|
24636
|
+
shouldInstall = await ye({
|
|
24637
|
+
message: "\uD83D\uDCE5 Install dependencies?",
|
|
24638
|
+
initialValue: true
|
|
24639
|
+
});
|
|
24640
|
+
if (pD(shouldInstall)) {
|
|
24641
|
+
xe("Operation cancelled.");
|
|
24642
|
+
process.exit(0);
|
|
23061
24643
|
}
|
|
23062
|
-
|
|
23063
|
-
});
|
|
23064
|
-
if (pD(preset)) {
|
|
23065
|
-
xe("Operation cancelled.");
|
|
23066
|
-
process.exit(0);
|
|
24644
|
+
}
|
|
23067
24645
|
}
|
|
23068
|
-
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
|
|
23072
|
-
|
|
23073
|
-
|
|
23074
|
-
|
|
24646
|
+
let shouldInitGit = getOptionValue("BUNKIT_GIT", options.git, true);
|
|
24647
|
+
if (shouldInitGit === undefined) {
|
|
24648
|
+
if (isNonInteractive) {
|
|
24649
|
+
shouldInitGit = true;
|
|
24650
|
+
} else {
|
|
24651
|
+
shouldInitGit = await ye({
|
|
24652
|
+
message: "\uD83D\uDD27 Initialize git repository?",
|
|
24653
|
+
initialValue: true
|
|
24654
|
+
});
|
|
24655
|
+
if (pD(shouldInitGit)) {
|
|
24656
|
+
xe("Operation cancelled.");
|
|
24657
|
+
process.exit(0);
|
|
24658
|
+
}
|
|
24659
|
+
}
|
|
23075
24660
|
}
|
|
23076
|
-
|
|
23077
|
-
|
|
23078
|
-
|
|
23079
|
-
});
|
|
23080
|
-
|
|
23081
|
-
|
|
23082
|
-
|
|
24661
|
+
if (isNonInteractive) {
|
|
24662
|
+
console.log(`
|
|
24663
|
+
\uD83D\uDCCB Configuration:`);
|
|
24664
|
+
console.log(` Project: ${import_picocolors4.default.cyan(projectName)}`);
|
|
24665
|
+
console.log(` Preset: ${import_picocolors4.default.cyan(preset)}`);
|
|
24666
|
+
console.log(` Install dependencies: ${import_picocolors4.default.cyan(shouldInstall ? "yes" : "no")}`);
|
|
24667
|
+
console.log(` Initialize git: ${import_picocolors4.default.cyan(shouldInitGit ? "yes" : "no")}`);
|
|
24668
|
+
console.log("");
|
|
23083
24669
|
}
|
|
23084
24670
|
const s = Y2();
|
|
23085
24671
|
s.start("\uD83D\uDD28 Creating project structure...");
|
|
@@ -23138,21 +24724,21 @@ async function initCommand() {
|
|
|
23138
24724
|
}
|
|
23139
24725
|
};
|
|
23140
24726
|
Me([
|
|
23141
|
-
`${
|
|
23142
|
-
shouldInstall ? "" : `${
|
|
23143
|
-
`${
|
|
24727
|
+
`${import_picocolors4.default.cyan("cd")} ${projectName}`,
|
|
24728
|
+
shouldInstall ? "" : `${import_picocolors4.default.cyan("bun install")}`,
|
|
24729
|
+
`${import_picocolors4.default.cyan(getDevCommand())} ${import_picocolors4.default.dim("# Start development")}`
|
|
23144
24730
|
].filter(Boolean).join(`
|
|
23145
24731
|
`), `${getPresetEmoji()} Next steps`);
|
|
23146
24732
|
} catch (error) {
|
|
23147
24733
|
s.stop("\u274C Failed to create project");
|
|
23148
|
-
xe(`${
|
|
24734
|
+
xe(`${import_picocolors4.default.red("Error:")} ${error.message}`);
|
|
23149
24735
|
process.exit(1);
|
|
23150
24736
|
}
|
|
23151
24737
|
}
|
|
23152
24738
|
function getDependenciesForPreset(preset) {
|
|
23153
24739
|
switch (preset) {
|
|
23154
24740
|
case "web":
|
|
23155
|
-
return ["react@19.1.0", "react-dom@19.1.0", "next@
|
|
24741
|
+
return ["react@19.1.0", "react-dom@19.1.0", "next@16.0.0", "tailwindcss@4.1.7"];
|
|
23156
24742
|
case "api":
|
|
23157
24743
|
return ["hono@4.7.12"];
|
|
23158
24744
|
case "full":
|
|
@@ -23186,14 +24772,14 @@ var packageJson = await Bun.file(new URL("../package.json", import.meta.url)).js
|
|
|
23186
24772
|
var VERSION = packageJson.version;
|
|
23187
24773
|
var program2 = new Command;
|
|
23188
24774
|
program2.name("bunkit").description("Bake production-ready apps in seconds").version(VERSION);
|
|
23189
|
-
program2.command("init").description("Create a new project interactively").action(async () => {
|
|
24775
|
+
program2.command("init").description("Create a new project interactively").option("--name <name>", "Project name").option("--preset <preset>", "Preset type (minimal, web, api, full)").option("--no-git", "Skip git initialization").option("--no-install", "Skip dependency installation").option("--non-interactive", "Run without prompts (requires all options)").action(async (options) => {
|
|
23190
24776
|
showBanner(VERSION);
|
|
23191
24777
|
try {
|
|
23192
|
-
await initCommand();
|
|
23193
|
-
Se(
|
|
24778
|
+
await initCommand(options);
|
|
24779
|
+
Se(import_picocolors5.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
23194
24780
|
} catch (error) {
|
|
23195
24781
|
M2.error(error.message);
|
|
23196
|
-
Se(
|
|
24782
|
+
Se(import_picocolors5.default.red("\u274C Project creation failed"));
|
|
23197
24783
|
process.exit(1);
|
|
23198
24784
|
}
|
|
23199
24785
|
});
|
|
@@ -23201,10 +24787,10 @@ program2.command("create").argument("<preset>", "Preset type (minimal, web, api,
|
|
|
23201
24787
|
showBanner(VERSION);
|
|
23202
24788
|
try {
|
|
23203
24789
|
await createCommand2(preset, name, options);
|
|
23204
|
-
Se(
|
|
24790
|
+
Se(import_picocolors5.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
23205
24791
|
} catch (error) {
|
|
23206
24792
|
M2.error(error.message);
|
|
23207
|
-
Se(
|
|
24793
|
+
Se(import_picocolors5.default.red("\u274C Project creation failed"));
|
|
23208
24794
|
process.exit(1);
|
|
23209
24795
|
}
|
|
23210
24796
|
});
|
|
@@ -23212,10 +24798,10 @@ program2.command("add").argument("<feature>", "Feature to add (auth, database, u
|
|
|
23212
24798
|
showBanner(VERSION);
|
|
23213
24799
|
try {
|
|
23214
24800
|
await addCommand(feature, options);
|
|
23215
|
-
Se(
|
|
24801
|
+
Se(import_picocolors5.default.green("\u2728 Feature added successfully! \uD83C\uDF5E"));
|
|
23216
24802
|
} catch (error) {
|
|
23217
24803
|
M2.error(error.message);
|
|
23218
|
-
Se(
|
|
24804
|
+
Se(import_picocolors5.default.red("\u274C Feature installation failed"));
|
|
23219
24805
|
process.exit(1);
|
|
23220
24806
|
}
|
|
23221
24807
|
});
|