vlt 0.0.0-3 → 0.0.0-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +17 -10
- package/postinstall.cjs +56 -0
- package/vlix +25 -0
- package/vlr +25 -0
- package/vlrx +25 -0
- package/vlt +25 -0
- package/vlx +25 -0
- package/cache-unzip-src-unzip.js +0 -7896
- package/cache-unzip-src-unzip.js.map +0 -7
- package/chunk-227OF2U2.js +0 -1183
- package/chunk-227OF2U2.js.map +0 -7
- package/chunk-3HXIYJS2.js +0 -54
- package/chunk-3HXIYJS2.js.map +0 -7
- package/chunk-AA6MVXJX.js +0 -19823
- package/chunk-AA6MVXJX.js.map +0 -7
- package/chunk-BCK4ZGNG.js +0 -41
- package/chunk-BCK4ZGNG.js.map +0 -7
- package/chunk-DH36SF3E.js +0 -35
- package/chunk-DH36SF3E.js.map +0 -7
- package/chunk-FNKWJ7AZ.js +0 -1379
- package/chunk-FNKWJ7AZ.js.map +0 -7
- package/chunk-H77UDCL3.js +0 -9820
- package/chunk-H77UDCL3.js.map +0 -7
- package/chunk-HL76E44L.js +0 -73
- package/chunk-HL76E44L.js.map +0 -7
- package/chunk-IN7DEH7F.js +0 -44
- package/chunk-IN7DEH7F.js.map +0 -7
- package/chunk-JLP2QDXQ.js +0 -1137
- package/chunk-JLP2QDXQ.js.map +0 -7
- package/chunk-JMGSFQ32.js +0 -969
- package/chunk-JMGSFQ32.js.map +0 -7
- package/chunk-JQRUGUZ3.js +0 -512
- package/chunk-JQRUGUZ3.js.map +0 -7
- package/chunk-K2BYYPM7.js +0 -8656
- package/chunk-K2BYYPM7.js.map +0 -7
- package/chunk-LNUDEBGP.js +0 -2071
- package/chunk-LNUDEBGP.js.map +0 -7
- package/chunk-MV5ZQ3LW.js +0 -1105
- package/chunk-MV5ZQ3LW.js.map +0 -7
- package/chunk-O7CDQZDW.js +0 -5234
- package/chunk-O7CDQZDW.js.map +0 -7
- package/chunk-OFW7MWFP.js +0 -82
- package/chunk-OFW7MWFP.js.map +0 -7
- package/chunk-PGDJ2ZZ6.js +0 -4810
- package/chunk-PGDJ2ZZ6.js.map +0 -7
- package/chunk-POVPHE2F.js +0 -1864
- package/chunk-POVPHE2F.js.map +0 -7
- package/chunk-PTVPYZHU.js +0 -72
- package/chunk-PTVPYZHU.js.map +0 -7
- package/chunk-SXBMMXTY.js +0 -11837
- package/chunk-SXBMMXTY.js.map +0 -7
- package/chunk-UZZ72UON.js +0 -152
- package/chunk-UZZ72UON.js.map +0 -7
- package/chunk-V7KRP7IO.js +0 -481
- package/chunk-V7KRP7IO.js.map +0 -7
- package/chunk-WVNUD273.js +0 -83
- package/chunk-WVNUD273.js.map +0 -7
- package/chunk-WYPE3MV4.js +0 -62
- package/chunk-WYPE3MV4.js.map +0 -7
- package/chunk-ZRNJWPYC.js +0 -37
- package/chunk-ZRNJWPYC.js.map +0 -7
- package/cli-package.json +0 -107
- package/config-3QQHUYLI.js +0 -179
- package/config-3QQHUYLI.js.map +0 -7
- package/devtools-5BBQJTDW.js +0 -16682
- package/devtools-5BBQJTDW.js.map +0 -7
- package/exec-C6GK336U.js +0 -50
- package/exec-C6GK336U.js.map +0 -7
- package/gui-IQ4M4K5X.js +0 -46
- package/gui-IQ4M4K5X.js.map +0 -7
- package/gui-assets/favicon.ico +0 -0
- package/gui-assets/fonts/geist-mono.ttf +0 -0
- package/gui-assets/fonts/inter.ttf +0 -0
- package/gui-assets/images/folder.png +0 -0
- package/gui-assets/index.html +0 -34
- package/gui-assets/index.js +0 -1549
- package/gui-assets/index.js.map +0 -7
- package/gui-assets/main.css +0 -1
- package/help-R6TSKVEA.js +0 -25
- package/help-R6TSKVEA.js.map +0 -7
- package/init-UTJGYULC.js +0 -25
- package/init-UTJGYULC.js.map +0 -7
- package/install-5XDTGLAU.js +0 -56
- package/install-5XDTGLAU.js.map +0 -7
- package/install-exec-VMPN3JE7.js +0 -28
- package/install-exec-VMPN3JE7.js.map +0 -7
- package/list-Q7IANZ3I.js +0 -129
- package/list-Q7IANZ3I.js.map +0 -7
- package/login-VHJEIRVU.js +0 -36
- package/login-VHJEIRVU.js.map +0 -7
- package/logout-5KMCSSR4.js +0 -36
- package/logout-5KMCSSR4.js.map +0 -7
- package/pkg-WYFDWETL.js +0 -364
- package/pkg-WYFDWETL.js.map +0 -7
- package/query-KP4F5D2Y.js +0 -117
- package/query-KP4F5D2Y.js.map +0 -7
- package/registry-client-package.json +0 -85
- package/reporter-LFGXWL6N.js +0 -18
- package/reporter-LFGXWL6N.js.map +0 -7
- package/rollback-remove-src-remove.js +0 -7398
- package/rollback-remove-src-remove.js.map +0 -7
- package/run-XNDZH72D.js +0 -68
- package/run-XNDZH72D.js.map +0 -7
- package/run-exec-NXA33NXJ.js +0 -41
- package/run-exec-NXA33NXJ.js.map +0 -7
- package/source-JWPG6PR3.js +0 -33
- package/source-JWPG6PR3.js.map +0 -7
- package/token-6IJNGEMI.js +0 -86
- package/token-6IJNGEMI.js.map +0 -7
- package/uninstall-MI7NFD27.js +0 -45
- package/uninstall-MI7NFD27.js.map +0 -7
- package/vlix.js +0 -25
- package/vlix.js.map +0 -7
- package/vlr.js +0 -25
- package/vlr.js.map +0 -7
- package/vlrx.js +0 -25
- package/vlrx.js.map +0 -7
- package/vlt.js +0 -24
- package/vlt.js.map +0 -7
- package/vlx.js +0 -25
- package/vlx.js.map +0 -7
- package/whoami-3IEXJF3U.js +0 -46
- package/whoami-3IEXJF3U.js.map +0 -7
- package/yoga.wasm +0 -0
package/chunk-MV5ZQ3LW.js
DELETED
|
@@ -1,1105 +0,0 @@
|
|
|
1
|
-
var global = globalThis;
|
|
2
|
-
import {Buffer} from "node:buffer";
|
|
3
|
-
import {setImmediate, clearImmediate} from "node:timers";
|
|
4
|
-
import {createRequire as _vlt_createRequire} from 'node:module';
|
|
5
|
-
var require = _vlt_createRequire(import.meta.filename);
|
|
6
|
-
import {
|
|
7
|
-
isRunResult
|
|
8
|
-
} from "./chunk-JLP2QDXQ.js";
|
|
9
|
-
import {
|
|
10
|
-
stderr,
|
|
11
|
-
stdout
|
|
12
|
-
} from "./chunk-UZZ72UON.js";
|
|
13
|
-
import {
|
|
14
|
-
source_default
|
|
15
|
-
} from "./chunk-JQRUGUZ3.js";
|
|
16
|
-
import {
|
|
17
|
-
Monorepo
|
|
18
|
-
} from "./chunk-JMGSFQ32.js";
|
|
19
|
-
import {
|
|
20
|
-
error,
|
|
21
|
-
isErrorRoot
|
|
22
|
-
} from "./chunk-ZRNJWPYC.js";
|
|
23
|
-
import {
|
|
24
|
-
__commonJS,
|
|
25
|
-
__toESM
|
|
26
|
-
} from "./chunk-3HXIYJS2.js";
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/.pnpm/emoji-regex@10.3.0/node_modules/emoji-regex/index.js
|
|
29
|
-
var require_emoji_regex = __commonJS({
|
|
30
|
-
"../../node_modules/.pnpm/emoji-regex@10.3.0/node_modules/emoji-regex/index.js"(exports, module) {
|
|
31
|
-
module.exports = () => {
|
|
32
|
-
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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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\uDD3D\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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]|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\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;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/fix-emoji.js
|
|
38
|
-
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
39
|
-
var EMOJI_RE = (0, import_emoji_regex.default)();
|
|
40
|
-
var replaceWide = (c) => replaceNarrow(c) + " ";
|
|
41
|
-
var replaceNarrow = (c) => `<span style="position:absolute;line-height:1;margin-top:0.3ex">${c}</span> `;
|
|
42
|
-
var fixEmoji = (s) => {
|
|
43
|
-
return s.replace(/[\u2500-\u25FF]/g, replaceNarrow).replace(EMOJI_RE, replaceWide);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/default-colors.js
|
|
47
|
-
var COLOR = "#eeeeee";
|
|
48
|
-
var BACKGROUND = "#222222";
|
|
49
|
-
var defaultColor = (s) => {
|
|
50
|
-
if (s)
|
|
51
|
-
COLOR = s;
|
|
52
|
-
return COLOR;
|
|
53
|
-
};
|
|
54
|
-
var defaultBackground = (s) => {
|
|
55
|
-
if (s)
|
|
56
|
-
BACKGROUND = s;
|
|
57
|
-
return BACKGROUND;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/hex-to-rgb.js
|
|
61
|
-
var hexToRgb = (c) => {
|
|
62
|
-
c = c.replace(/^#/, "");
|
|
63
|
-
if (c.length === 3) {
|
|
64
|
-
const r2 = c.charAt(0);
|
|
65
|
-
const g2 = c.charAt(1);
|
|
66
|
-
const b2 = c.charAt(2);
|
|
67
|
-
return hexToRgb(`${r2}${r2}${g2}${g2}${b2}${b2}`);
|
|
68
|
-
}
|
|
69
|
-
if (c.length !== 6) {
|
|
70
|
-
throw new Error("invalid hex string: " + c);
|
|
71
|
-
}
|
|
72
|
-
const r = parseInt(c.substring(0, 2), 16);
|
|
73
|
-
const g = parseInt(c.substring(2, 4), 16);
|
|
74
|
-
const b = parseInt(c.substring(4, 6), 16);
|
|
75
|
-
if (r !== r || g !== g || b !== b) {
|
|
76
|
-
throw new Error("invalid hex string: " + c);
|
|
77
|
-
}
|
|
78
|
-
return [r, g, b];
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/rgb-to-hex.js
|
|
82
|
-
var rgbToHex = ([r, g, b]) => {
|
|
83
|
-
if (r !== r || g !== g || b !== b) {
|
|
84
|
-
throw new Error("invalid RGB: " + [r, g, b].join(","));
|
|
85
|
-
}
|
|
86
|
-
return `#${Math.max(0, Math.min(r, 255)).toString(16).padStart(2, "0") + Math.max(0, Math.min(g, 255)).toString(16).padStart(2, "0") + Math.max(0, Math.min(b, 255)).toString(16).padStart(2, "0")}`;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/dim-color.js
|
|
90
|
-
var DIMLEVEL = 0.75;
|
|
91
|
-
var dimColor = (c) => rgbToHex(hexToRgb(c).map((c2) => Math.floor(c2 * DIMLEVEL)));
|
|
92
|
-
|
|
93
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/html-escape.js
|
|
94
|
-
var htmlEscape = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
95
|
-
|
|
96
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/named.js
|
|
97
|
-
var nameCodes = {
|
|
98
|
-
black: 0,
|
|
99
|
-
red: 1,
|
|
100
|
-
green: 2,
|
|
101
|
-
yellow: 3,
|
|
102
|
-
blue: 4,
|
|
103
|
-
magenta: 5,
|
|
104
|
-
cyan: 6,
|
|
105
|
-
white: 7
|
|
106
|
-
};
|
|
107
|
-
var namedColors = [
|
|
108
|
-
"#000000",
|
|
109
|
-
"#ff0000",
|
|
110
|
-
"#00a000",
|
|
111
|
-
"#e0e000",
|
|
112
|
-
"#0040e0",
|
|
113
|
-
"#e000e0",
|
|
114
|
-
"#00b0b0",
|
|
115
|
-
"#e0e0e0"
|
|
116
|
-
];
|
|
117
|
-
var namedBrightColors = [
|
|
118
|
-
"#404040",
|
|
119
|
-
"#ff3030",
|
|
120
|
-
"#00ff00",
|
|
121
|
-
"#ffff00",
|
|
122
|
-
"#0080ff",
|
|
123
|
-
"#ff33ff",
|
|
124
|
-
"#00ffff",
|
|
125
|
-
"#ffffff"
|
|
126
|
-
];
|
|
127
|
-
|
|
128
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/xterm.js
|
|
129
|
-
var hex = (n) => n.toString(16).padStart(2, "0");
|
|
130
|
-
var colors = [
|
|
131
|
-
...function* () {
|
|
132
|
-
for (let red = 0; red < 6; red++) {
|
|
133
|
-
for (let green = 0; green < 6; green++) {
|
|
134
|
-
for (let blue = 0; blue < 6; blue++) {
|
|
135
|
-
const r = red ? red * 40 + 55 : 0;
|
|
136
|
-
const g = green ? green * 40 + 55 : 0;
|
|
137
|
-
const b = blue ? blue * 40 + 55 : 0;
|
|
138
|
-
yield `#${hex(r)}${hex(g)}${hex(b)}`;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}()
|
|
143
|
-
];
|
|
144
|
-
var grays = [
|
|
145
|
-
...function* () {
|
|
146
|
-
for (let gray = 0; gray < 24; gray++) {
|
|
147
|
-
const g = gray * 10 + 8;
|
|
148
|
-
yield `#${hex(g).repeat(3)}`;
|
|
149
|
-
}
|
|
150
|
-
}()
|
|
151
|
-
];
|
|
152
|
-
var xtermCode = (n) => {
|
|
153
|
-
if (n < 8)
|
|
154
|
-
return namedColors[n];
|
|
155
|
-
if (n < 16)
|
|
156
|
-
return namedBrightColors[n - 8];
|
|
157
|
-
if (n < Math.pow(6, 3))
|
|
158
|
-
return colors[n - 16];
|
|
159
|
-
if (n < 256)
|
|
160
|
-
return grays[n - 232];
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/style.js
|
|
164
|
-
var ALL_END = "0";
|
|
165
|
-
var BG_END = "49";
|
|
166
|
-
var BG_START = "48";
|
|
167
|
-
var BOLD_END = "22";
|
|
168
|
-
var BOLD_START = "1";
|
|
169
|
-
var DIM_START = "2";
|
|
170
|
-
var FG_END = "39";
|
|
171
|
-
var FG_START = "38";
|
|
172
|
-
var INV_END = "27";
|
|
173
|
-
var INV_START = "7";
|
|
174
|
-
var ITALIC_END = "23";
|
|
175
|
-
var ITALIC_START = "3";
|
|
176
|
-
var OVER_END = "55";
|
|
177
|
-
var OVER_START = "53";
|
|
178
|
-
var STRIKE_END = "29";
|
|
179
|
-
var STRIKE_START = "9";
|
|
180
|
-
var UNDERLINE_END = "24";
|
|
181
|
-
var UNDERLINE_START = "4";
|
|
182
|
-
var UNDERLINE_START_2 = "21";
|
|
183
|
-
var NAMED_RE = /^(3|4|9|10)([0-7])$/;
|
|
184
|
-
var NAMED_FG = "3";
|
|
185
|
-
var NAMED_BG = "4";
|
|
186
|
-
var NAMED_FG_BRIGHT = "9";
|
|
187
|
-
var NAMED_BG_BRIGHT = "10";
|
|
188
|
-
var VALID_CODE = () => new RegExp(
|
|
189
|
-
"\x1B\\]8;;(.*?)(?:\x1B|\x07)|\x1B\\[([0-9]*(?:;[0-9]*)*)m",
|
|
190
|
-
// end style codes
|
|
191
|
-
"g"
|
|
192
|
-
);
|
|
193
|
-
var RESET_STYLE = {
|
|
194
|
-
background: "",
|
|
195
|
-
bold: false,
|
|
196
|
-
color: "",
|
|
197
|
-
dim: false,
|
|
198
|
-
inverse: false,
|
|
199
|
-
italic: false,
|
|
200
|
-
overline: false,
|
|
201
|
-
strike: false,
|
|
202
|
-
underline: false
|
|
203
|
-
};
|
|
204
|
-
var RESET_PROPS = {
|
|
205
|
-
...RESET_STYLE,
|
|
206
|
-
href: ""
|
|
207
|
-
};
|
|
208
|
-
var namedColor = (c, bright = false) => {
|
|
209
|
-
if (!c)
|
|
210
|
-
return c;
|
|
211
|
-
c = c.toLowerCase();
|
|
212
|
-
const code = nameCodes[c];
|
|
213
|
-
if (typeof code === "number") {
|
|
214
|
-
return bright ? namedBrightColors[code] : namedColors[code];
|
|
215
|
-
}
|
|
216
|
-
if (c.includes("bright") && !bright) {
|
|
217
|
-
return namedColor(c.replace(/bright/g, ""), true);
|
|
218
|
-
}
|
|
219
|
-
return rgbToHex(hexToRgb(c));
|
|
220
|
-
};
|
|
221
|
-
var SEEN = /* @__PURE__ */ new Map();
|
|
222
|
-
var Style = class _Style {
|
|
223
|
-
#css;
|
|
224
|
-
#background;
|
|
225
|
-
#bold;
|
|
226
|
-
#color;
|
|
227
|
-
#dim;
|
|
228
|
-
#inverse;
|
|
229
|
-
#italic;
|
|
230
|
-
#overline;
|
|
231
|
-
#strike;
|
|
232
|
-
#underline;
|
|
233
|
-
#ansi;
|
|
234
|
-
#href;
|
|
235
|
-
constructor(styles) {
|
|
236
|
-
const { background = "", bold = false, color = "", dim = false, inverse = false, italic = false, overline = false, strike = false, underline = false, href = "" } = typeof styles !== "string" ? styles : _Style.ansiProperties(styles);
|
|
237
|
-
const ansi = _Style.propertiesAnsi({
|
|
238
|
-
background,
|
|
239
|
-
bold,
|
|
240
|
-
color,
|
|
241
|
-
dim,
|
|
242
|
-
inverse,
|
|
243
|
-
italic,
|
|
244
|
-
overline,
|
|
245
|
-
strike,
|
|
246
|
-
underline,
|
|
247
|
-
href
|
|
248
|
-
});
|
|
249
|
-
const seen = SEEN.get(ansi);
|
|
250
|
-
if (seen)
|
|
251
|
-
return seen;
|
|
252
|
-
SEEN.set(ansi, this);
|
|
253
|
-
this.#ansi = ansi;
|
|
254
|
-
this.#background = namedColor(background);
|
|
255
|
-
this.#bold = bold;
|
|
256
|
-
this.#color = namedColor(color);
|
|
257
|
-
this.#dim = dim;
|
|
258
|
-
this.#inverse = inverse;
|
|
259
|
-
this.#italic = italic;
|
|
260
|
-
this.#overline = overline;
|
|
261
|
-
this.#strike = strike;
|
|
262
|
-
this.#underline = underline;
|
|
263
|
-
try {
|
|
264
|
-
this.#href = href && String(new URL(href));
|
|
265
|
-
} catch {
|
|
266
|
-
this.#href = "";
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* True if this style is a full reset of all properties.
|
|
271
|
-
*/
|
|
272
|
-
get isReset() {
|
|
273
|
-
return this === RESET;
|
|
274
|
-
}
|
|
275
|
-
/** corresponding ANSI code sequence for this style */
|
|
276
|
-
get ansi() {
|
|
277
|
-
return this.#ansi;
|
|
278
|
-
}
|
|
279
|
-
/** Convert a set of properties to an ANSI style code */
|
|
280
|
-
static propertiesAnsi(styles) {
|
|
281
|
-
const { background, bold, color, dim, inverse, italic, overline, strike, underline, href = "" } = styles;
|
|
282
|
-
const codes = [
|
|
283
|
-
// always do a reset at the start
|
|
284
|
-
0,
|
|
285
|
-
...color ? [FG_START, 2, ...hexToRgb(namedColor(color))] : [],
|
|
286
|
-
...background ? [BG_START, 2, ...hexToRgb(namedColor(background))] : [],
|
|
287
|
-
...bold ? [BOLD_START] : [],
|
|
288
|
-
...dim ? [DIM_START] : [],
|
|
289
|
-
...inverse ? [INV_START] : [],
|
|
290
|
-
...italic ? [ITALIC_START] : [],
|
|
291
|
-
...overline ? [OVER_START] : [],
|
|
292
|
-
...strike ? [STRIKE_START] : [],
|
|
293
|
-
...underline ? [UNDERLINE_START] : []
|
|
294
|
-
];
|
|
295
|
-
return `\x1B]8;;${href}\x1B\\\x1B[${codes.join(";")}m`;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* If the input string is a sequence of *only* ANSI style and
|
|
299
|
-
* OSC href codes, returns the array of codes and their parameters.
|
|
300
|
-
* Otherwise, returns false.
|
|
301
|
-
*/
|
|
302
|
-
static validStyleCodes(s) {
|
|
303
|
-
let c = 0;
|
|
304
|
-
let m;
|
|
305
|
-
const results = [];
|
|
306
|
-
const vc = VALID_CODE();
|
|
307
|
-
while (m = vc.exec(s)) {
|
|
308
|
-
if (c !== m.index) {
|
|
309
|
-
return null;
|
|
310
|
-
}
|
|
311
|
-
c += m[0].length;
|
|
312
|
-
results.push([m[0], m[1] ?? m[2]]);
|
|
313
|
-
}
|
|
314
|
-
return results.length === 0 ? null : results;
|
|
315
|
-
}
|
|
316
|
-
/** a Style object that resets all properties */
|
|
317
|
-
static get RESET() {
|
|
318
|
-
return RESET;
|
|
319
|
-
}
|
|
320
|
-
/** Convert an ANSI style code to a set of properties */
|
|
321
|
-
static ansiProperties(code) {
|
|
322
|
-
const codes = _Style.validStyleCodes(code);
|
|
323
|
-
if (!codes) {
|
|
324
|
-
throw new Error("invalid ansi style code: " + JSON.stringify(code));
|
|
325
|
-
}
|
|
326
|
-
const style = {};
|
|
327
|
-
for (const code2 of codes) {
|
|
328
|
-
if (code2[0].startsWith("\x1B]8;;")) {
|
|
329
|
-
style.href = code2[1];
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
const codes2 = code2[1].split(";");
|
|
333
|
-
for (let i = 0; i < codes2.length; i++) {
|
|
334
|
-
const c = codes2[i];
|
|
335
|
-
switch (c) {
|
|
336
|
-
case "":
|
|
337
|
-
case ALL_END:
|
|
338
|
-
Object.assign(style, RESET_STYLE);
|
|
339
|
-
continue;
|
|
340
|
-
case BOLD_END:
|
|
341
|
-
style.bold = false;
|
|
342
|
-
style.dim = false;
|
|
343
|
-
continue;
|
|
344
|
-
case ITALIC_END:
|
|
345
|
-
style.italic = false;
|
|
346
|
-
continue;
|
|
347
|
-
case STRIKE_END:
|
|
348
|
-
style.strike = false;
|
|
349
|
-
continue;
|
|
350
|
-
case OVER_END:
|
|
351
|
-
style.overline = false;
|
|
352
|
-
continue;
|
|
353
|
-
case UNDERLINE_END:
|
|
354
|
-
style.underline = false;
|
|
355
|
-
continue;
|
|
356
|
-
case INV_END:
|
|
357
|
-
style.inverse = false;
|
|
358
|
-
continue;
|
|
359
|
-
case FG_END:
|
|
360
|
-
style.color = "";
|
|
361
|
-
continue;
|
|
362
|
-
case BG_END:
|
|
363
|
-
style.background = "";
|
|
364
|
-
continue;
|
|
365
|
-
case BOLD_START:
|
|
366
|
-
style.bold = true;
|
|
367
|
-
continue;
|
|
368
|
-
case INV_START:
|
|
369
|
-
style.inverse = true;
|
|
370
|
-
continue;
|
|
371
|
-
case UNDERLINE_START:
|
|
372
|
-
case UNDERLINE_START_2:
|
|
373
|
-
style.underline = true;
|
|
374
|
-
continue;
|
|
375
|
-
case DIM_START:
|
|
376
|
-
style.dim = true;
|
|
377
|
-
continue;
|
|
378
|
-
case OVER_START:
|
|
379
|
-
style.overline = true;
|
|
380
|
-
continue;
|
|
381
|
-
case ITALIC_START:
|
|
382
|
-
style.italic = true;
|
|
383
|
-
continue;
|
|
384
|
-
case STRIKE_START:
|
|
385
|
-
style.strike = true;
|
|
386
|
-
continue;
|
|
387
|
-
case BG_START:
|
|
388
|
-
case FG_START: {
|
|
389
|
-
const next = codes2[i + 1];
|
|
390
|
-
const prop = c == FG_START ? "color" : "background";
|
|
391
|
-
switch (next) {
|
|
392
|
-
case "5":
|
|
393
|
-
const xt = codes2[i + 2];
|
|
394
|
-
const code3 = xt && xtermCode(parseInt(xt, 10));
|
|
395
|
-
if (code3) {
|
|
396
|
-
i += 2;
|
|
397
|
-
style[prop] = code3;
|
|
398
|
-
}
|
|
399
|
-
continue;
|
|
400
|
-
case "2":
|
|
401
|
-
const sr = codes2[i + 2];
|
|
402
|
-
const sg = codes2[i + 3];
|
|
403
|
-
const sb = codes2[i + 4];
|
|
404
|
-
if (sr && sg && sb) {
|
|
405
|
-
const r = parseInt(sr, 10);
|
|
406
|
-
const g = parseInt(sg, 10);
|
|
407
|
-
const b = parseInt(sb, 10);
|
|
408
|
-
const hex2 = rgbToHex([r, g, b]);
|
|
409
|
-
if (r <= 255 && r >= 0 && g <= 255 && g >= 0 && b <= 255 && b >= 0) {
|
|
410
|
-
i += 4;
|
|
411
|
-
style[prop] = hex2;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
continue;
|
|
416
|
-
}
|
|
417
|
-
// named color/bg
|
|
418
|
-
default: {
|
|
419
|
-
const m = c.match(NAMED_RE);
|
|
420
|
-
if (!m)
|
|
421
|
-
continue;
|
|
422
|
-
const color = parseInt(m[2], 10);
|
|
423
|
-
switch (m[1]) {
|
|
424
|
-
case NAMED_FG:
|
|
425
|
-
style.color = namedColors[color];
|
|
426
|
-
continue;
|
|
427
|
-
case NAMED_BG:
|
|
428
|
-
style.background = namedColors[color];
|
|
429
|
-
continue;
|
|
430
|
-
case NAMED_FG_BRIGHT:
|
|
431
|
-
style.color = namedBrightColors[color];
|
|
432
|
-
continue;
|
|
433
|
-
case NAMED_BG_BRIGHT:
|
|
434
|
-
style.background = namedBrightColors[color];
|
|
435
|
-
continue;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
return style;
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Return a new Style with this one plus the updated properties.
|
|
445
|
-
*
|
|
446
|
-
* If a string is provided, must be a valid set of style and OSC hyperlink
|
|
447
|
-
* ANSI code, though unrecognized parameters within that code will be ignored
|
|
448
|
-
* rather than throwing an error.
|
|
449
|
-
*/
|
|
450
|
-
update(properties) {
|
|
451
|
-
const { background = this.#background, bold = this.#bold, color = this.#color, dim = this.#dim, inverse = this.#inverse, italic = this.#italic, overline = this.#overline, strike = this.#strike, underline = this.#underline, href = this.#href } = typeof properties === "string" ? _Style.ansiProperties(properties) : properties;
|
|
452
|
-
return background === this.#background && bold === this.#bold && color === this.#color && dim === this.#dim && inverse === this.#inverse && italic === this.#italic && overline === this.#overline && strike === this.#strike && underline === this.#underline && href === this.#href ? this : new _Style({
|
|
453
|
-
background,
|
|
454
|
-
bold,
|
|
455
|
-
color,
|
|
456
|
-
dim,
|
|
457
|
-
inverse,
|
|
458
|
-
italic,
|
|
459
|
-
overline,
|
|
460
|
-
strike,
|
|
461
|
-
underline,
|
|
462
|
-
href
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
[Symbol.for("nodejs.util.inspect.custom")](_, { colors: colors2 } = { colors: false }) {
|
|
466
|
-
const { ansi } = this;
|
|
467
|
-
return `Style { ${colors2 ? ansi : ""}${ansi.replace(/\x1b/g, "^[")}${colors2 ? "\x1B]8;;\x1B\\\x1B[m" : ""} }`;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Wrap the input string in the appropriate HTML for this style
|
|
471
|
-
*/
|
|
472
|
-
wrap(s) {
|
|
473
|
-
const css = this.toString();
|
|
474
|
-
const href = this.#href;
|
|
475
|
-
if (!css && !href)
|
|
476
|
-
return htmlEscape(s);
|
|
477
|
-
const tag = href ? `a` : "span";
|
|
478
|
-
return `<${tag}${href ? ` href="${href}"` : ""}${css ? ` style="${css}"` : ""}>${htmlEscape(s)}</${tag}>`;
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
* Return just the CSS for the styles. Href is not relevant.
|
|
482
|
-
*/
|
|
483
|
-
toString() {
|
|
484
|
-
if (this.#css)
|
|
485
|
-
return this.#css;
|
|
486
|
-
let color = this.#inverse ? this.#background : this.#color;
|
|
487
|
-
let background = this.#inverse ? this.#color : this.#background;
|
|
488
|
-
if (this.#inverse) {
|
|
489
|
-
color ||= defaultBackground();
|
|
490
|
-
background ||= defaultColor();
|
|
491
|
-
}
|
|
492
|
-
if (this.#dim && !(color && color === background)) {
|
|
493
|
-
color = dimColor(color || defaultColor());
|
|
494
|
-
}
|
|
495
|
-
const textDecoration = [
|
|
496
|
-
...this.#underline ? ["underline"] : [],
|
|
497
|
-
...this.#overline ? ["overline"] : [],
|
|
498
|
-
...this.#strike ? ["line-through"] : []
|
|
499
|
-
].join(" ");
|
|
500
|
-
return this.#css = [
|
|
501
|
-
...textDecoration ? [`text-decoration:${textDecoration}`] : [],
|
|
502
|
-
...this.#bold ? ["font-weight:bold"] : this.#dim ? ["font-weight:100"] : [],
|
|
503
|
-
...this.#italic ? ["font-style:italic"] : [],
|
|
504
|
-
...color ? [`color:${color}`] : [],
|
|
505
|
-
...background ? [`background:${background}`] : []
|
|
506
|
-
].join(";");
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
var RESET = new Style(RESET_PROPS);
|
|
510
|
-
|
|
511
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/block.js
|
|
512
|
-
var Block = class {
|
|
513
|
-
#style;
|
|
514
|
-
#text;
|
|
515
|
-
constructor(text, style) {
|
|
516
|
-
this.#text = text;
|
|
517
|
-
this.#style = style;
|
|
518
|
-
}
|
|
519
|
-
[Symbol.for("nodejs.util.inspect.custom")](_, opts, inspect) {
|
|
520
|
-
return `Block {${this.#style ? " " + inspect(this.#style, opts) : ""} ${inspect(this.#text, opts)} }`;
|
|
521
|
-
}
|
|
522
|
-
/** return the block as a styled `<span>` tag */
|
|
523
|
-
toString() {
|
|
524
|
-
return this.#toString(false);
|
|
525
|
-
}
|
|
526
|
-
/** a representation of the block as an ANSI styled string */
|
|
527
|
-
get ansi() {
|
|
528
|
-
return this.#toString(true);
|
|
529
|
-
}
|
|
530
|
-
#toString(ansi) {
|
|
531
|
-
return !this.#text ? "" : ansi ? (this.#style ?? Style.RESET).ansi + this.#text : fixEmoji((this.#style ?? Style.RESET).wrap(this.#text));
|
|
532
|
-
}
|
|
533
|
-
/** append text to the block */
|
|
534
|
-
write(c) {
|
|
535
|
-
this.#text += c;
|
|
536
|
-
return this;
|
|
537
|
-
}
|
|
538
|
-
/** the raw text that will be written */
|
|
539
|
-
get text() {
|
|
540
|
-
return this.#text;
|
|
541
|
-
}
|
|
542
|
-
/** the Style used by this block */
|
|
543
|
-
get style() {
|
|
544
|
-
return this.#style;
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/terminal.js
|
|
549
|
-
var CODES_RE = /^\u001b\[([0-9]*[A-GJKSTg]|([0-9;]*)m|([0-9]*;?[0-9]*)?[Hf]|\?[0-9]+[hl])/;
|
|
550
|
-
var OSC_RE = /^\u001b\](.*?)(?:\u0007|\u001b\\)/;
|
|
551
|
-
var OSC_TITLE = "0;";
|
|
552
|
-
var OSC_HREF = "8;;";
|
|
553
|
-
var Terminal = class {
|
|
554
|
-
// note: 0-indexed, but all the ansi codes are 1-indexed
|
|
555
|
-
#cursor = [0, 0];
|
|
556
|
-
// character data
|
|
557
|
-
#text = [];
|
|
558
|
-
// the style used to write it
|
|
559
|
-
#style = [];
|
|
560
|
-
// the current style we use to paint characters to our "screen"
|
|
561
|
-
#brush = new Style({});
|
|
562
|
-
#title = "";
|
|
563
|
-
#blocks;
|
|
564
|
-
constructor(input) {
|
|
565
|
-
if (input)
|
|
566
|
-
this.write(input);
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* Set the style that the terminal will use for text writes.
|
|
570
|
-
*
|
|
571
|
-
* If a string, must be a valid `\x1b[...m` ANSI style code.
|
|
572
|
-
*
|
|
573
|
-
* The styles provided will be appended onto the current style in use, just
|
|
574
|
-
* as they would be by a real terminal if the relevant ANSI code is
|
|
575
|
-
* encountered.
|
|
576
|
-
*/
|
|
577
|
-
setStyle(style) {
|
|
578
|
-
this.#brush = this.#brush.update(style);
|
|
579
|
-
return this;
|
|
580
|
-
}
|
|
581
|
-
/** Move the cursor up `n` lines, stopping at the top. */
|
|
582
|
-
up(n) {
|
|
583
|
-
this.#cursor[0] = Math.max(this.#cursor[0] - n, 0);
|
|
584
|
-
return this;
|
|
585
|
-
}
|
|
586
|
-
/** Move the cursor down `n` lines, without limit. */
|
|
587
|
-
down(n) {
|
|
588
|
-
this.#cursor[0] += n;
|
|
589
|
-
return this;
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* Prepend `n` empty lines at the start of the buffer, effectively moving the
|
|
593
|
-
* cursor up as a result.
|
|
594
|
-
*/
|
|
595
|
-
scrollUp(n) {
|
|
596
|
-
for (let i = 0; i < n; i++) {
|
|
597
|
-
this.#text.unshift([]);
|
|
598
|
-
this.#style.unshift([]);
|
|
599
|
-
}
|
|
600
|
-
return this;
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* Remove `n` lines from the start of the buffer, effectively moving the
|
|
604
|
-
* cursor down as a result.
|
|
605
|
-
*/
|
|
606
|
-
scrollDown(n) {
|
|
607
|
-
for (let i = 0; i < n; i++) {
|
|
608
|
-
this.#text.shift();
|
|
609
|
-
this.#style.shift();
|
|
610
|
-
}
|
|
611
|
-
return this;
|
|
612
|
-
}
|
|
613
|
-
/** Move the cursor forward `n` columns, without limit. */
|
|
614
|
-
forward(n) {
|
|
615
|
-
this.#cursor[1] += n;
|
|
616
|
-
return this;
|
|
617
|
-
}
|
|
618
|
-
/** Move the cursor back `n` columns, stopping at the first column. */
|
|
619
|
-
back(n) {
|
|
620
|
-
this.#cursor[1] = Math.max(0, this.#cursor[1] - n);
|
|
621
|
-
return this;
|
|
622
|
-
}
|
|
623
|
-
/** Move to the start of the `n`-th next line. */
|
|
624
|
-
nextLine(n) {
|
|
625
|
-
this.#cursor[0] += n;
|
|
626
|
-
this.#cursor[1] = 0;
|
|
627
|
-
return this;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Move to the start of the `n`-th previous line, stopping at the top of the
|
|
631
|
-
* screen.
|
|
632
|
-
*/
|
|
633
|
-
prevLine(n) {
|
|
634
|
-
this.#cursor[0] = Math.max(0, this.#cursor[0] - n);
|
|
635
|
-
this.#cursor[1] = 0;
|
|
636
|
-
return this;
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Move to the `n`-th column (1-indexed), limited by the left-most column.
|
|
640
|
-
*/
|
|
641
|
-
horizontalPosition(n) {
|
|
642
|
-
this.#cursor[1] = Math.max(0, n - 1);
|
|
643
|
-
return this;
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Move to the 1-indexed row and column specified, limited by the top and
|
|
647
|
-
* left sides of the screen.
|
|
648
|
-
*/
|
|
649
|
-
position(row, col) {
|
|
650
|
-
this.#cursor[0] = Math.max(row - 1, 0);
|
|
651
|
-
this.#cursor[1] = Math.max(col - 1, 0);
|
|
652
|
-
return this;
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Delete all printed data from the screen.
|
|
656
|
-
*
|
|
657
|
-
* Note that this is used for both `\x1b[2J` _and_ `\x1b[3J`, because there
|
|
658
|
-
* is no scrollback buffer in this virtual terminal.
|
|
659
|
-
*/
|
|
660
|
-
eraseScreen() {
|
|
661
|
-
this.#text.length = 0;
|
|
662
|
-
this.#style.length = 0;
|
|
663
|
-
return this;
|
|
664
|
-
}
|
|
665
|
-
/** Delete all printed data from the cursor to the end of the screen. */
|
|
666
|
-
eraseScreenToEnd() {
|
|
667
|
-
this.#text.splice(this.#cursor[0] + 1);
|
|
668
|
-
this.#style.splice(this.#cursor[0] + 1);
|
|
669
|
-
this.eraseLineToEnd();
|
|
670
|
-
return this;
|
|
671
|
-
}
|
|
672
|
-
/** Delete all printed data from the top of the screen to the cursor. */
|
|
673
|
-
eraseScreenFromStart() {
|
|
674
|
-
let i;
|
|
675
|
-
for (i = 0; i < this.#cursor[0]; i++) {
|
|
676
|
-
const line = this.#text[i];
|
|
677
|
-
const sline = this.#style[i];
|
|
678
|
-
if (!line || !sline)
|
|
679
|
-
continue;
|
|
680
|
-
line.length = 0;
|
|
681
|
-
sline.length = 0;
|
|
682
|
-
}
|
|
683
|
-
this.eraseLineFromStart();
|
|
684
|
-
return this;
|
|
685
|
-
}
|
|
686
|
-
/** Delete the contents of the current line. */
|
|
687
|
-
eraseLine() {
|
|
688
|
-
const line = this.#text[this.#cursor[0]];
|
|
689
|
-
const sline = this.#style[this.#cursor[0]];
|
|
690
|
-
if (!line || !sline)
|
|
691
|
-
return this;
|
|
692
|
-
line.length = 0;
|
|
693
|
-
sline.length = 0;
|
|
694
|
-
return this;
|
|
695
|
-
}
|
|
696
|
-
/**
|
|
697
|
-
* Delete printed data from the cursor to the end of the current line.
|
|
698
|
-
*/
|
|
699
|
-
eraseLineToEnd() {
|
|
700
|
-
const line = this.#text[this.#cursor[0]];
|
|
701
|
-
const sline = this.#style[this.#cursor[0]];
|
|
702
|
-
if (!line || !sline)
|
|
703
|
-
return this;
|
|
704
|
-
line.splice(this.#cursor[1]);
|
|
705
|
-
sline.splice(this.#cursor[1]);
|
|
706
|
-
return this;
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* Delete printed data from the start of the current line to the cursor.
|
|
710
|
-
*/
|
|
711
|
-
eraseLineFromStart() {
|
|
712
|
-
if (this.#cursor[1] === 0)
|
|
713
|
-
return this.eraseLine();
|
|
714
|
-
const line = this.#text[this.#cursor[0]];
|
|
715
|
-
const sline = this.#style[this.#cursor[0]];
|
|
716
|
-
if (!line || !sline)
|
|
717
|
-
return this;
|
|
718
|
-
for (let i = 0; i < this.#cursor[1]; i++) {
|
|
719
|
-
line[i] = " ";
|
|
720
|
-
sline[i] = void 0;
|
|
721
|
-
}
|
|
722
|
-
return this;
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Parse the ANSI encoded string provided, updating the internal character
|
|
726
|
-
* and style buffers appropriately.
|
|
727
|
-
*/
|
|
728
|
-
write(input) {
|
|
729
|
-
this.#blocks = void 0;
|
|
730
|
-
for (let c = 0; c < input.length; ) {
|
|
731
|
-
while (input.charAt(c) === "\x1B") {
|
|
732
|
-
switch (input.charAt(c + 1)) {
|
|
733
|
-
case "B":
|
|
734
|
-
this.horizontalPosition(1);
|
|
735
|
-
c += 2;
|
|
736
|
-
continue;
|
|
737
|
-
case "H":
|
|
738
|
-
c += 2;
|
|
739
|
-
continue;
|
|
740
|
-
case "D":
|
|
741
|
-
this.scrollDown(1);
|
|
742
|
-
c += 2;
|
|
743
|
-
continue;
|
|
744
|
-
case "M":
|
|
745
|
-
this.scrollUp(1);
|
|
746
|
-
c += 2;
|
|
747
|
-
continue;
|
|
748
|
-
}
|
|
749
|
-
const code = input.substring(c).match(CODES_RE);
|
|
750
|
-
if (code) {
|
|
751
|
-
c += code[0].length;
|
|
752
|
-
if (code[1].endsWith("m")) {
|
|
753
|
-
this.setStyle(code[0]);
|
|
754
|
-
continue;
|
|
755
|
-
} else {
|
|
756
|
-
const x = code[1].charAt(code[1].length - 1);
|
|
757
|
-
if (x === "H" || x === "f") {
|
|
758
|
-
const [n2, m] = code[1].replace(/[Hf]$/, "").split(";");
|
|
759
|
-
const row = Math.max(1, parseInt(n2 || "1", 10));
|
|
760
|
-
const col = Math.max(1, parseInt(m || "1", 10));
|
|
761
|
-
this.position(row, col);
|
|
762
|
-
continue;
|
|
763
|
-
}
|
|
764
|
-
const p = code[1].match(/^([0-9]+)/)?.[1];
|
|
765
|
-
const n = parseInt(p || "1", 10);
|
|
766
|
-
const z = parseInt(p || "0", 10);
|
|
767
|
-
switch (x) {
|
|
768
|
-
case "A":
|
|
769
|
-
this.up(n);
|
|
770
|
-
continue;
|
|
771
|
-
case "T":
|
|
772
|
-
this.scrollUp(n);
|
|
773
|
-
continue;
|
|
774
|
-
case "B":
|
|
775
|
-
this.down(n);
|
|
776
|
-
continue;
|
|
777
|
-
case "S":
|
|
778
|
-
this.scrollDown(n);
|
|
779
|
-
continue;
|
|
780
|
-
case "C":
|
|
781
|
-
this.forward(n);
|
|
782
|
-
continue;
|
|
783
|
-
case "D":
|
|
784
|
-
this.back(n);
|
|
785
|
-
continue;
|
|
786
|
-
case "E":
|
|
787
|
-
this.nextLine(n);
|
|
788
|
-
continue;
|
|
789
|
-
case "F":
|
|
790
|
-
this.prevLine(n);
|
|
791
|
-
continue;
|
|
792
|
-
case "G":
|
|
793
|
-
this.horizontalPosition(n);
|
|
794
|
-
continue;
|
|
795
|
-
case "J": {
|
|
796
|
-
switch (z) {
|
|
797
|
-
case 0:
|
|
798
|
-
this.eraseScreenToEnd();
|
|
799
|
-
continue;
|
|
800
|
-
case 1:
|
|
801
|
-
this.eraseScreenFromStart();
|
|
802
|
-
continue;
|
|
803
|
-
case 2:
|
|
804
|
-
case 3:
|
|
805
|
-
this.eraseScreen();
|
|
806
|
-
continue;
|
|
807
|
-
}
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
|
-
case "K": {
|
|
811
|
-
switch (z) {
|
|
812
|
-
case 0:
|
|
813
|
-
this.eraseLineToEnd();
|
|
814
|
-
continue;
|
|
815
|
-
case 1:
|
|
816
|
-
this.eraseLineFromStart();
|
|
817
|
-
continue;
|
|
818
|
-
case 2:
|
|
819
|
-
this.eraseLine();
|
|
820
|
-
continue;
|
|
821
|
-
}
|
|
822
|
-
continue;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
continue;
|
|
827
|
-
}
|
|
828
|
-
const osc = input.substring(c).match(OSC_RE);
|
|
829
|
-
if (osc?.index === 0) {
|
|
830
|
-
c += osc[0].length;
|
|
831
|
-
const cmd = osc[1];
|
|
832
|
-
if (cmd.startsWith(OSC_TITLE)) {
|
|
833
|
-
this.setTitle(cmd.substring(OSC_TITLE.length));
|
|
834
|
-
continue;
|
|
835
|
-
}
|
|
836
|
-
if (cmd.startsWith(OSC_HREF)) {
|
|
837
|
-
this.setStyle({ href: cmd.substring(OSC_HREF.length) });
|
|
838
|
-
continue;
|
|
839
|
-
}
|
|
840
|
-
continue;
|
|
841
|
-
}
|
|
842
|
-
break;
|
|
843
|
-
}
|
|
844
|
-
if (c >= input.length)
|
|
845
|
-
break;
|
|
846
|
-
const ch = input.charAt(c++);
|
|
847
|
-
if (ch === "\r") {
|
|
848
|
-
this.horizontalPosition(1);
|
|
849
|
-
continue;
|
|
850
|
-
}
|
|
851
|
-
if (ch === "\n") {
|
|
852
|
-
this.nextLine(1);
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
while (this.#text.length < this.#cursor[0]) {
|
|
856
|
-
this.#text.push([]);
|
|
857
|
-
this.#style.push([]);
|
|
858
|
-
}
|
|
859
|
-
const sline = this.#style[this.#cursor[0]] || [];
|
|
860
|
-
const line = this.#text[this.#cursor[0]] || [];
|
|
861
|
-
while (line.length < this.#cursor[1]) {
|
|
862
|
-
line.push(" ");
|
|
863
|
-
}
|
|
864
|
-
while (sline.length < this.#cursor[1]) {
|
|
865
|
-
sline.push(void 0);
|
|
866
|
-
}
|
|
867
|
-
line[this.#cursor[1]] = ch;
|
|
868
|
-
sline[this.#cursor[1]] = this.#brush.isReset ? void 0 : this.#brush;
|
|
869
|
-
this.#style[this.#cursor[0]] = sline;
|
|
870
|
-
this.#text[this.#cursor[0]] = line;
|
|
871
|
-
this.forward(1);
|
|
872
|
-
}
|
|
873
|
-
return this;
|
|
874
|
-
}
|
|
875
|
-
/**
|
|
876
|
-
* Called when an OSC code of `\x1b]0;...\x1b\` is encountered.
|
|
877
|
-
*
|
|
878
|
-
* Sets the `title` attribute on the root `<pre>` in html output,
|
|
879
|
-
* and creates a corresponding OSC title sequence in the ansi output.
|
|
880
|
-
*/
|
|
881
|
-
setTitle(s) {
|
|
882
|
-
this.#title = s;
|
|
883
|
-
return this;
|
|
884
|
-
}
|
|
885
|
-
/** the raw unstyled text of each line */
|
|
886
|
-
get text() {
|
|
887
|
-
return this.#text.map((l) => l.join(""));
|
|
888
|
-
}
|
|
889
|
-
[Symbol.for("nodejs.util.inspect.custom")](_, opts, inspect) {
|
|
890
|
-
const ins = inspect({
|
|
891
|
-
cursor: this.#cursor,
|
|
892
|
-
brush: this.#brush,
|
|
893
|
-
text: this.#text.map((l) => l.join("")),
|
|
894
|
-
blocks: this.blocks
|
|
895
|
-
}, opts);
|
|
896
|
-
return `Terminal ${ins}`;
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* Output the results of the style and character buffers as ANSI
|
|
900
|
-
* styled text. This effectively normalizes all color codes to explicit
|
|
901
|
-
* RGB values and resolves all cursor motions and other control codes,
|
|
902
|
-
* and styling runs of identical styles with a single code.
|
|
903
|
-
*/
|
|
904
|
-
get ansi() {
|
|
905
|
-
return this.#toString(true);
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
* Output the results of the style and character buffers as a `<pre>`
|
|
909
|
-
* tag with `<span>` elements setting effective styles.
|
|
910
|
-
*/
|
|
911
|
-
toString() {
|
|
912
|
-
return this.#toString(false);
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* An array of `Block` objects each representing a string of text with a
|
|
916
|
-
* given style.
|
|
917
|
-
*/
|
|
918
|
-
get blocks() {
|
|
919
|
-
if (this.#blocks)
|
|
920
|
-
return this.#blocks;
|
|
921
|
-
let cur = new Block("");
|
|
922
|
-
const blocks = [cur];
|
|
923
|
-
for (let i = 0; i < this.#text.length; i++) {
|
|
924
|
-
const line = this.#text[i] || [];
|
|
925
|
-
const sline = this.#style[i] || [];
|
|
926
|
-
for (let j = 0; j < line.length; j++) {
|
|
927
|
-
const st = sline[j];
|
|
928
|
-
const ch = line[j] || "";
|
|
929
|
-
if (st === cur.style)
|
|
930
|
-
cur.write(ch);
|
|
931
|
-
else
|
|
932
|
-
blocks.push(cur = new Block(ch, st));
|
|
933
|
-
}
|
|
934
|
-
if (this.#text[i + 1])
|
|
935
|
-
cur.write("\n");
|
|
936
|
-
}
|
|
937
|
-
return this.#blocks = blocks.filter((b) => !!b.text);
|
|
938
|
-
}
|
|
939
|
-
#toString(ansi) {
|
|
940
|
-
const contents = this.blocks.map((b) => ansi ? b.ansi : b.toString()).join("");
|
|
941
|
-
if (ansi) {
|
|
942
|
-
const title = this.#title ? `\x1B]0;${this.#title}\x1B\\` : "";
|
|
943
|
-
return title + contents + "\x1B[m";
|
|
944
|
-
}
|
|
945
|
-
const css = Object.entries({
|
|
946
|
-
color: defaultColor(),
|
|
947
|
-
background: defaultBackground(),
|
|
948
|
-
position: "relative"
|
|
949
|
-
}).map((kv) => kv.join(":")).join(";");
|
|
950
|
-
const preStyle = `style="${css}"`;
|
|
951
|
-
const preTitle = this.#title ? ` title="${this.#title}"` : "";
|
|
952
|
-
return `<pre ${preStyle}${preTitle}>${contents}</pre>`;
|
|
953
|
-
}
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
// ../../node_modules/.pnpm/ansi-to-pre@1.0.6/node_modules/ansi-to-pre/dist/esm/index.js
|
|
957
|
-
var ansiToAnsi = (input) => new Terminal(input).ansi;
|
|
958
|
-
|
|
959
|
-
// ../../src/vlt/src/exec-command.ts
|
|
960
|
-
var ExecCommand = class {
|
|
961
|
-
bg;
|
|
962
|
-
fg;
|
|
963
|
-
arg0;
|
|
964
|
-
args;
|
|
965
|
-
monorepo;
|
|
966
|
-
/** how many places are we doing things in? */
|
|
967
|
-
spaces;
|
|
968
|
-
conf;
|
|
969
|
-
projectRoot;
|
|
970
|
-
constructor(conf, bg, fg) {
|
|
971
|
-
this.conf = conf;
|
|
972
|
-
this.bg = bg;
|
|
973
|
-
this.fg = fg;
|
|
974
|
-
const {
|
|
975
|
-
projectRoot,
|
|
976
|
-
positionals: [arg0, ...args]
|
|
977
|
-
} = conf;
|
|
978
|
-
this.arg0 = arg0;
|
|
979
|
-
this.args = args;
|
|
980
|
-
const paths = conf.get("workspace");
|
|
981
|
-
const groups = conf.get("workspace-group");
|
|
982
|
-
const recursive = conf.get("recursive");
|
|
983
|
-
this.monorepo = paths?.length || groups?.length || recursive ? Monorepo.load(projectRoot, { load: { paths, groups } }) : void 0;
|
|
984
|
-
this.spaces = this.monorepo?.size ?? 1;
|
|
985
|
-
this.projectRoot = projectRoot;
|
|
986
|
-
}
|
|
987
|
-
async run() {
|
|
988
|
-
if (this.spaces === 1) {
|
|
989
|
-
const arg = this.fgArg();
|
|
990
|
-
if (!arg) return;
|
|
991
|
-
const result = await this.fg(arg);
|
|
992
|
-
stdout(result);
|
|
993
|
-
if (isRunResult(result)) {
|
|
994
|
-
this.setExitCode(result);
|
|
995
|
-
}
|
|
996
|
-
return result;
|
|
997
|
-
}
|
|
998
|
-
const m = this.monorepo;
|
|
999
|
-
if (!m || this.spaces === 0) {
|
|
1000
|
-
throw error("no matching workspaces found", {
|
|
1001
|
-
/* c8 ignore next - already guarded */
|
|
1002
|
-
validOptions: [...this.monorepo?.load().paths() ?? []]
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1005
|
-
const arg0 = this.arg0;
|
|
1006
|
-
if (!arg0) {
|
|
1007
|
-
this.noArgsMulti();
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
let failed = false;
|
|
1011
|
-
const resultMap = await m.run(async (ws) => {
|
|
1012
|
-
if (!failed) stderr(`${ws.path} ${arg0}`);
|
|
1013
|
-
const result = await this.bg(this.bgArg(ws)).catch(
|
|
1014
|
-
(er) => {
|
|
1015
|
-
if (isErrorRoot(er) && isRunResult(er.cause)) {
|
|
1016
|
-
this.printResult(ws, er.cause);
|
|
1017
|
-
}
|
|
1018
|
-
failed = true;
|
|
1019
|
-
throw er;
|
|
1020
|
-
}
|
|
1021
|
-
);
|
|
1022
|
-
if (!failed) this.printResult(ws, result);
|
|
1023
|
-
return result;
|
|
1024
|
-
});
|
|
1025
|
-
const results = {};
|
|
1026
|
-
for (const [ws, result] of resultMap) {
|
|
1027
|
-
if (result.status === 0 && result.signal === null) {
|
|
1028
|
-
result.stdout = "";
|
|
1029
|
-
result.stderr = "";
|
|
1030
|
-
}
|
|
1031
|
-
results[ws.path] = result;
|
|
1032
|
-
}
|
|
1033
|
-
return results;
|
|
1034
|
-
}
|
|
1035
|
-
printResult(ws, result) {
|
|
1036
|
-
if (result.status === 0 && result.signal === null) {
|
|
1037
|
-
stdout(ws.path, "ok");
|
|
1038
|
-
} else {
|
|
1039
|
-
stdout(source_default.bgWhiteBright.black.bold(ws.path + " failure"), {
|
|
1040
|
-
status: result.status,
|
|
1041
|
-
signal: result.signal
|
|
1042
|
-
});
|
|
1043
|
-
if (result.stderr) stderr(ansiToAnsi(result.stderr));
|
|
1044
|
-
if (result.stdout) stdout(ansiToAnsi(result.stdout));
|
|
1045
|
-
this.setExitCode(result);
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
setExitCode(result) {
|
|
1049
|
-
process.exitCode = process.exitCode || (result.status ?? 1);
|
|
1050
|
-
}
|
|
1051
|
-
/* c8 ignore start - env specific */
|
|
1052
|
-
interactiveShell() {
|
|
1053
|
-
return process.env.SHELL ?? this.conf.get("script-shell") ?? (process.platform === "win32" ? "cmd.exe" : "/bin/sh");
|
|
1054
|
-
}
|
|
1055
|
-
/* c8 ignore stop */
|
|
1056
|
-
// overridden by 'vlt run' to print options and return undefined
|
|
1057
|
-
defaultArg0() {
|
|
1058
|
-
return this.interactiveShell();
|
|
1059
|
-
}
|
|
1060
|
-
fgArg() {
|
|
1061
|
-
const ws = this.monorepo?.values().next().value;
|
|
1062
|
-
const cwd = ws?.fullpath ?? this.projectRoot;
|
|
1063
|
-
const arg0 = this.arg0 ?? this.defaultArg0();
|
|
1064
|
-
if (!arg0) {
|
|
1065
|
-
return void 0;
|
|
1066
|
-
}
|
|
1067
|
-
return {
|
|
1068
|
-
cwd,
|
|
1069
|
-
/* c8 ignore next - already guarded */
|
|
1070
|
-
arg0,
|
|
1071
|
-
args: this.args,
|
|
1072
|
-
projectRoot: this.projectRoot,
|
|
1073
|
-
packageJson: this.monorepo?.packageJson,
|
|
1074
|
-
"script-shell": this.arg0 ? this.conf.get("script-shell") : false
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
/** If this returns undefined, then nothing to do */
|
|
1078
|
-
bgArg(ws) {
|
|
1079
|
-
if (!this.arg0)
|
|
1080
|
-
throw error(
|
|
1081
|
-
"Cannot spawn interactive shells in multiple workspaces"
|
|
1082
|
-
);
|
|
1083
|
-
return {
|
|
1084
|
-
cwd: ws.fullpath,
|
|
1085
|
-
acceptFail: !this.conf.get("bail"),
|
|
1086
|
-
ignoreMissing: true,
|
|
1087
|
-
arg0: this.arg0,
|
|
1088
|
-
args: this.args,
|
|
1089
|
-
projectRoot: this.projectRoot,
|
|
1090
|
-
packageJson: this.monorepo?.packageJson,
|
|
1091
|
-
"script-shell": this.conf.get("script-shell")
|
|
1092
|
-
};
|
|
1093
|
-
}
|
|
1094
|
-
// overridden in `vlt run` to print available scripts
|
|
1095
|
-
noArgsMulti() {
|
|
1096
|
-
throw error(
|
|
1097
|
-
"Cannot spawn interactive shells in multiple workspaces"
|
|
1098
|
-
);
|
|
1099
|
-
}
|
|
1100
|
-
};
|
|
1101
|
-
|
|
1102
|
-
export {
|
|
1103
|
-
ExecCommand
|
|
1104
|
-
};
|
|
1105
|
-
//# sourceMappingURL=chunk-MV5ZQ3LW.js.map
|