@learnosity/lib-qti-converter 0.12.6 → 0.12.7

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.
Files changed (28) hide show
  1. package/package.json +3 -2
  2. package/packages/cli/dist/batchProcessors-DU1HwpHY.js +3753 -0
  3. package/packages/cli/dist/batchProcessors-DU1HwpHY.js.map +1 -0
  4. package/packages/cli/dist/batchWorker.js +1 -1
  5. package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js → learnosityToQti-BSbH3jyx.js} +4 -4
  6. package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js.map → learnosityToQti-BSbH3jyx.js.map} +1 -1
  7. package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js → learnosityToQtiPackage-B0xRzYmy.js} +4 -5
  8. package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js.map → learnosityToQtiPackage-B0xRzYmy.js.map} +1 -1
  9. package/packages/cli/dist/main.js +6 -6
  10. package/packages/cli/dist/main.js.map +1 -1
  11. package/packages/cli/dist/nodeFileAccess-BkzSHCOh.js +291 -0
  12. package/packages/cli/dist/nodeFileAccess-BkzSHCOh.js.map +1 -0
  13. package/packages/cli/dist/{pathUtils-CgoDQyJk.js → pathUtils-B9yPTlVF.js} +3 -149
  14. package/packages/cli/dist/pathUtils-B9yPTlVF.js.map +1 -0
  15. package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js → qtiPackageToLearnosity-C7JaaUDU.js} +5 -5
  16. package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js.map → qtiPackageToLearnosity-C7JaaUDU.js.map} +1 -1
  17. package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js → qtiToLearnosity-CYoG2aIX.js} +5 -5
  18. package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js.map → qtiToLearnosity-CYoG2aIX.js.map} +1 -1
  19. package/packages/cli/dist/resolveOptions-CW80R2EQ.js +2879 -0
  20. package/packages/cli/dist/resolveOptions-CW80R2EQ.js.map +1 -0
  21. package/packages/cli/dist/{resolveOptions-ehwJSkQy.js → table-DjOn2Tsk.js} +2427 -2816
  22. package/packages/cli/dist/table-DjOn2Tsk.js.map +1 -0
  23. package/packages/cli/dist/batchProcessors-C8k2v0o_.js +0 -217
  24. package/packages/cli/dist/batchProcessors-C8k2v0o_.js.map +0 -1
  25. package/packages/cli/dist/pathUtils-CgoDQyJk.js.map +0 -1
  26. package/packages/cli/dist/resolveOptions-ehwJSkQy.js.map +0 -1
  27. package/packages/cli/dist/table-DYcNeyJ_.js +0 -2306
  28. package/packages/cli/dist/table-DYcNeyJ_.js.map +0 -1
@@ -1,2306 +0,0 @@
1
- import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.js";
2
- import process$1 from "node:process";
3
- import { mkdir, writeFile } from "fs/promises";
4
- import { dirname, join } from "path";
5
- import os from "node:os";
6
- import tty from "node:tty";
7
- //#region ../core/src/diagnostics/formatDiagnosticsReport.ts
8
- /**
9
- * Format diagnostics array into structured report with metadata
10
- */
11
- function formatDiagnosticsReport(diagnostics, options) {
12
- const { inputPath, outputPath, totalItemsFound, totalActivitiesFound = 0, convertedFiles, failedFiles, convertedActivities = [], failedActivities = [] } = options;
13
- const infoIssues = diagnostics.filter((d) => d.level === "info").map((d) => ({
14
- code: d.code,
15
- message: d.message,
16
- file: d.file
17
- }));
18
- const warningIssues = diagnostics.filter((d) => d.level === "warning").map((d) => ({
19
- code: d.code,
20
- message: d.message,
21
- file: d.file
22
- }));
23
- const seenErrorFiles = /* @__PURE__ */ new Set();
24
- const errorIssues = diagnostics.filter((d) => d.level === "error").reduce((acc, d) => {
25
- if (!seenErrorFiles.has(d.file)) {
26
- seenErrorFiles.add(d.file);
27
- acc.push({
28
- code: d.code,
29
- message: d.message,
30
- file: d.file
31
- });
32
- }
33
- return acc;
34
- }, []);
35
- return {
36
- directory_input: inputPath,
37
- directory_output: outputPath,
38
- total_items_found: totalItemsFound,
39
- total_items_processed: convertedFiles.length + failedFiles.length,
40
- total_items_converted: convertedFiles.length,
41
- total_items_failed: failedFiles.length,
42
- total_activities_found: totalActivitiesFound,
43
- total_activities_converted: convertedActivities.length,
44
- total_activities_failed: failedActivities.length,
45
- converted_items: convertedFiles,
46
- failed_items: failedFiles,
47
- converted_activities: convertedActivities,
48
- failed_activities: failedActivities,
49
- issues: {
50
- errors: errorIssues,
51
- info: infoIssues,
52
- warnings: warningIssues
53
- }
54
- };
55
- }
56
- //#endregion
57
- //#region src/io/writeDiagnostics.ts
58
- function formatDiagnosticsJson(diagnostics, options) {
59
- if (options) {
60
- const report = formatDiagnosticsReport(diagnostics, options);
61
- return JSON.stringify(report, null, 2);
62
- }
63
- return JSON.stringify(diagnostics, null, 2);
64
- }
65
- /**
66
- * Write diagnostics to file and/or stderr
67
- * @param diagnostics - Diagnostics to write
68
- * @param diagnosticsMode - Where to write diagnostics
69
- * @param explicitPath - Explicit diagnostics file path (if user provided one)
70
- * @param outputPath - Output file path (used to derive diagnostics path if no explicit path)
71
- * @param verbose - Include verbose output
72
- * @param options - Options for formatting the diagnostics report
73
- */
74
- async function writeDiagnostics(diagnostics, diagnosticsMode, explicitPath, outputPath, verbose, options) {
75
- const shouldWriteFile = diagnosticsMode === "file" || diagnosticsMode === "both";
76
- const shouldWriteStderr = diagnosticsMode === "stderr" || diagnosticsMode === "both";
77
- const json = formatDiagnosticsJson(diagnostics, options);
78
- if (shouldWriteFile) {
79
- const diagnosticsPath = explicitPath ?? getDiagnosticsPath(outputPath);
80
- await mkdir(dirname(diagnosticsPath), { recursive: true });
81
- await writeFile(diagnosticsPath, json, "utf-8");
82
- }
83
- if (shouldWriteStderr && verbose) {
84
- process.stderr.write("\n--- Diagnostics JSON ---\n");
85
- process.stderr.write(json);
86
- process.stderr.write("\n");
87
- }
88
- }
89
- /**
90
- * Get the path for diagnostics file
91
- */
92
- function getDiagnosticsPath(outputPath) {
93
- if (outputPath === "-") return join(process.cwd(), "diagnostics.json");
94
- const dir = dirname(outputPath);
95
- return join(dir, "diagnostics.json");
96
- }
97
- //#endregion
98
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js
99
- var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
100
- let messages = [];
101
- let level = 0;
102
- const debug = (msg, min) => {
103
- if (level >= min) messages.push(msg);
104
- };
105
- debug.WARN = 1;
106
- debug.INFO = 2;
107
- debug.DEBUG = 3;
108
- debug.reset = () => {
109
- messages = [];
110
- };
111
- debug.setDebugLevel = (v) => {
112
- level = v;
113
- };
114
- debug.warn = (msg) => debug(msg, debug.WARN);
115
- debug.info = (msg) => debug(msg, debug.INFO);
116
- debug.debug = (msg) => debug(msg, debug.DEBUG);
117
- debug.debugMessages = () => messages;
118
- module.exports = debug;
119
- }));
120
- //#endregion
121
- //#region ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
122
- var require_ansi_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
123
- module.exports = ({ onlyFirst = false } = {}) => {
124
- const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
125
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
126
- };
127
- }));
128
- //#endregion
129
- //#region ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
130
- var require_strip_ansi = /* @__PURE__ */ __commonJSMin(((exports, module) => {
131
- const ansiRegex = require_ansi_regex();
132
- module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
133
- }));
134
- //#endregion
135
- //#region ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
136
- var require_is_fullwidth_code_point = /* @__PURE__ */ __commonJSMin(((exports, module) => {
137
- const isFullwidthCodePoint = (codePoint) => {
138
- if (Number.isNaN(codePoint)) return false;
139
- 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)) return true;
140
- return false;
141
- };
142
- module.exports = isFullwidthCodePoint;
143
- module.exports.default = isFullwidthCodePoint;
144
- }));
145
- //#endregion
146
- //#region ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
147
- var require_emoji_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
148
- module.exports = function() {
149
- 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;
150
- };
151
- }));
152
- //#endregion
153
- //#region ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
154
- var require_string_width = /* @__PURE__ */ __commonJSMin(((exports, module) => {
155
- const stripAnsi = require_strip_ansi();
156
- const isFullwidthCodePoint = require_is_fullwidth_code_point();
157
- const emojiRegex = require_emoji_regex();
158
- const stringWidth = (string) => {
159
- if (typeof string !== "string" || string.length === 0) return 0;
160
- string = stripAnsi(string);
161
- if (string.length === 0) return 0;
162
- string = string.replace(emojiRegex(), " ");
163
- let width = 0;
164
- for (let i = 0; i < string.length; i++) {
165
- const code = string.codePointAt(i);
166
- if (code <= 31 || code >= 127 && code <= 159) continue;
167
- if (code >= 768 && code <= 879) continue;
168
- if (code > 65535) i++;
169
- width += isFullwidthCodePoint(code) ? 2 : 1;
170
- }
171
- return width;
172
- };
173
- module.exports = stringWidth;
174
- module.exports.default = stringWidth;
175
- }));
176
- //#endregion
177
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js
178
- var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
179
- const stringWidth = require_string_width();
180
- function codeRegex(capture) {
181
- return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
182
- }
183
- function strlen(str) {
184
- let code = codeRegex();
185
- return ("" + str).replace(code, "").split("\n").reduce(function(memo, s) {
186
- return stringWidth(s) > memo ? stringWidth(s) : memo;
187
- }, 0);
188
- }
189
- function repeat(str, times) {
190
- return Array(times + 1).join(str);
191
- }
192
- function pad(str, len, pad, dir) {
193
- let length = strlen(str);
194
- if (len + 1 >= length) {
195
- let padlen = len - length;
196
- switch (dir) {
197
- case "right":
198
- str = repeat(pad, padlen) + str;
199
- break;
200
- case "center": {
201
- let right = Math.ceil(padlen / 2);
202
- str = repeat(pad, padlen - right) + str + repeat(pad, right);
203
- break;
204
- }
205
- default: str = str + repeat(pad, padlen);
206
- }
207
- }
208
- return str;
209
- }
210
- let codeCache = {};
211
- function addToCodeCache(name, on, off) {
212
- on = "\x1B[" + on + "m";
213
- off = "\x1B[" + off + "m";
214
- codeCache[on] = {
215
- set: name,
216
- to: true
217
- };
218
- codeCache[off] = {
219
- set: name,
220
- to: false
221
- };
222
- codeCache[name] = {
223
- on,
224
- off
225
- };
226
- }
227
- addToCodeCache("bold", 1, 22);
228
- addToCodeCache("italics", 3, 23);
229
- addToCodeCache("underline", 4, 24);
230
- addToCodeCache("inverse", 7, 27);
231
- addToCodeCache("strikethrough", 9, 29);
232
- function updateState(state, controlChars) {
233
- let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
234
- if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
235
- state.lastForegroundAdded = controlChars[0];
236
- return;
237
- }
238
- if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
239
- state.lastBackgroundAdded = controlChars[0];
240
- return;
241
- }
242
- if (controlCode === 0) {
243
- for (let i in state)
244
- /* istanbul ignore else */
245
- if (Object.prototype.hasOwnProperty.call(state, i)) delete state[i];
246
- return;
247
- }
248
- let info = codeCache[controlChars[0]];
249
- if (info) state[info.set] = info.to;
250
- }
251
- function readState(line) {
252
- let code = codeRegex(true);
253
- let controlChars = code.exec(line);
254
- let state = {};
255
- while (controlChars !== null) {
256
- updateState(state, controlChars);
257
- controlChars = code.exec(line);
258
- }
259
- return state;
260
- }
261
- function unwindState(state, ret) {
262
- let lastBackgroundAdded = state.lastBackgroundAdded;
263
- let lastForegroundAdded = state.lastForegroundAdded;
264
- delete state.lastBackgroundAdded;
265
- delete state.lastForegroundAdded;
266
- Object.keys(state).forEach(function(key) {
267
- if (state[key]) ret += codeCache[key].off;
268
- });
269
- if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret += "\x1B[49m";
270
- if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret += "\x1B[39m";
271
- return ret;
272
- }
273
- function rewindState(state, ret) {
274
- let lastBackgroundAdded = state.lastBackgroundAdded;
275
- let lastForegroundAdded = state.lastForegroundAdded;
276
- delete state.lastBackgroundAdded;
277
- delete state.lastForegroundAdded;
278
- Object.keys(state).forEach(function(key) {
279
- if (state[key]) ret = codeCache[key].on + ret;
280
- });
281
- if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret = lastBackgroundAdded + ret;
282
- if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret = lastForegroundAdded + ret;
283
- return ret;
284
- }
285
- function truncateWidth(str, desiredLength) {
286
- if (str.length === strlen(str)) return str.substr(0, desiredLength);
287
- while (strlen(str) > desiredLength) str = str.slice(0, -1);
288
- return str;
289
- }
290
- function truncateWidthWithAnsi(str, desiredLength) {
291
- let code = codeRegex(true);
292
- let split = str.split(codeRegex());
293
- let splitIndex = 0;
294
- let retLen = 0;
295
- let ret = "";
296
- let myArray;
297
- let state = {};
298
- while (retLen < desiredLength) {
299
- myArray = code.exec(str);
300
- let toAdd = split[splitIndex];
301
- splitIndex++;
302
- if (retLen + strlen(toAdd) > desiredLength) toAdd = truncateWidth(toAdd, desiredLength - retLen);
303
- ret += toAdd;
304
- retLen += strlen(toAdd);
305
- if (retLen < desiredLength) {
306
- if (!myArray) break;
307
- ret += myArray[0];
308
- updateState(state, myArray);
309
- }
310
- }
311
- return unwindState(state, ret);
312
- }
313
- function truncate(str, desiredLength, truncateChar) {
314
- truncateChar = truncateChar || "…";
315
- if (strlen(str) <= desiredLength) return str;
316
- desiredLength -= strlen(truncateChar);
317
- let ret = truncateWidthWithAnsi(str, desiredLength);
318
- ret += truncateChar;
319
- const hrefTag = "\x1B]8;;\x07";
320
- if (str.includes(hrefTag) && !ret.includes(hrefTag)) ret += hrefTag;
321
- return ret;
322
- }
323
- function defaultOptions() {
324
- return {
325
- chars: {
326
- top: "─",
327
- "top-mid": "┬",
328
- "top-left": "┌",
329
- "top-right": "┐",
330
- bottom: "─",
331
- "bottom-mid": "┴",
332
- "bottom-left": "└",
333
- "bottom-right": "┘",
334
- left: "│",
335
- "left-mid": "├",
336
- mid: "─",
337
- "mid-mid": "┼",
338
- right: "│",
339
- "right-mid": "┤",
340
- middle: "│"
341
- },
342
- truncate: "…",
343
- colWidths: [],
344
- rowHeights: [],
345
- colAligns: [],
346
- rowAligns: [],
347
- style: {
348
- "padding-left": 1,
349
- "padding-right": 1,
350
- head: ["red"],
351
- border: ["grey"],
352
- compact: false
353
- },
354
- head: []
355
- };
356
- }
357
- function mergeOptions(options, defaults) {
358
- options = options || {};
359
- defaults = defaults || defaultOptions();
360
- let ret = Object.assign({}, defaults, options);
361
- ret.chars = Object.assign({}, defaults.chars, options.chars);
362
- ret.style = Object.assign({}, defaults.style, options.style);
363
- return ret;
364
- }
365
- function wordWrap(maxLength, input) {
366
- let lines = [];
367
- let split = input.split(/(\s+)/g);
368
- let line = [];
369
- let lineLength = 0;
370
- let whitespace;
371
- for (let i = 0; i < split.length; i += 2) {
372
- let word = split[i];
373
- let newLength = lineLength + strlen(word);
374
- if (lineLength > 0 && whitespace) newLength += whitespace.length;
375
- if (newLength > maxLength) {
376
- if (lineLength !== 0) lines.push(line.join(""));
377
- line = [word];
378
- lineLength = strlen(word);
379
- } else {
380
- line.push(whitespace || "", word);
381
- lineLength = newLength;
382
- }
383
- whitespace = split[i + 1];
384
- }
385
- if (lineLength) lines.push(line.join(""));
386
- return lines;
387
- }
388
- function textWrap(maxLength, input) {
389
- let lines = [];
390
- let line = "";
391
- function pushLine(str, ws) {
392
- if (line.length && ws) line += ws;
393
- line += str;
394
- while (line.length > maxLength) {
395
- lines.push(line.slice(0, maxLength));
396
- line = line.slice(maxLength);
397
- }
398
- }
399
- let split = input.split(/(\s+)/g);
400
- for (let i = 0; i < split.length; i += 2) pushLine(split[i], i && split[i - 1]);
401
- if (line.length) lines.push(line);
402
- return lines;
403
- }
404
- function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
405
- let output = [];
406
- input = input.split("\n");
407
- const handler = wrapOnWordBoundary ? wordWrap : textWrap;
408
- for (let i = 0; i < input.length; i++) output.push.apply(output, handler(maxLength, input[i]));
409
- return output;
410
- }
411
- function colorizeLines(input) {
412
- let state = {};
413
- let output = [];
414
- for (let i = 0; i < input.length; i++) {
415
- let line = rewindState(state, input[i]);
416
- state = readState(line);
417
- let temp = Object.assign({}, state);
418
- output.push(unwindState(temp, line));
419
- }
420
- return output;
421
- }
422
- /**
423
- * Credit: Matheus Sampaio https://github.com/matheussampaio
424
- */
425
- function hyperlink(url, text) {
426
- const OSC = "\x1B]";
427
- const BEL = "\x07";
428
- const SEP = ";";
429
- return [
430
- OSC,
431
- "8",
432
- SEP,
433
- SEP,
434
- url || text,
435
- BEL,
436
- text,
437
- OSC,
438
- "8",
439
- SEP,
440
- SEP,
441
- BEL
442
- ].join("");
443
- }
444
- module.exports = {
445
- strlen,
446
- repeat,
447
- pad,
448
- truncate,
449
- mergeOptions,
450
- wordWrap: multiLineWordWrap,
451
- colorizeLines,
452
- hyperlink
453
- };
454
- }));
455
- //#endregion
456
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js
457
- var require_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
458
- var styles = {};
459
- module["exports"] = styles;
460
- var codes = {
461
- reset: [0, 0],
462
- bold: [1, 22],
463
- dim: [2, 22],
464
- italic: [3, 23],
465
- underline: [4, 24],
466
- inverse: [7, 27],
467
- hidden: [8, 28],
468
- strikethrough: [9, 29],
469
- black: [30, 39],
470
- red: [31, 39],
471
- green: [32, 39],
472
- yellow: [33, 39],
473
- blue: [34, 39],
474
- magenta: [35, 39],
475
- cyan: [36, 39],
476
- white: [37, 39],
477
- gray: [90, 39],
478
- grey: [90, 39],
479
- brightRed: [91, 39],
480
- brightGreen: [92, 39],
481
- brightYellow: [93, 39],
482
- brightBlue: [94, 39],
483
- brightMagenta: [95, 39],
484
- brightCyan: [96, 39],
485
- brightWhite: [97, 39],
486
- bgBlack: [40, 49],
487
- bgRed: [41, 49],
488
- bgGreen: [42, 49],
489
- bgYellow: [43, 49],
490
- bgBlue: [44, 49],
491
- bgMagenta: [45, 49],
492
- bgCyan: [46, 49],
493
- bgWhite: [47, 49],
494
- bgGray: [100, 49],
495
- bgGrey: [100, 49],
496
- bgBrightRed: [101, 49],
497
- bgBrightGreen: [102, 49],
498
- bgBrightYellow: [103, 49],
499
- bgBrightBlue: [104, 49],
500
- bgBrightMagenta: [105, 49],
501
- bgBrightCyan: [106, 49],
502
- bgBrightWhite: [107, 49],
503
- blackBG: [40, 49],
504
- redBG: [41, 49],
505
- greenBG: [42, 49],
506
- yellowBG: [43, 49],
507
- blueBG: [44, 49],
508
- magentaBG: [45, 49],
509
- cyanBG: [46, 49],
510
- whiteBG: [47, 49]
511
- };
512
- Object.keys(codes).forEach(function(key) {
513
- var val = codes[key];
514
- var style = styles[key] = [];
515
- style.open = "\x1B[" + val[0] + "m";
516
- style.close = "\x1B[" + val[1] + "m";
517
- });
518
- }));
519
- //#endregion
520
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js
521
- var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
522
- module.exports = function(flag, argv) {
523
- argv = argv || process.argv;
524
- var terminatorPos = argv.indexOf("--");
525
- var prefix = /^-{1,2}/.test(flag) ? "" : "--";
526
- var pos = argv.indexOf(prefix + flag);
527
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
528
- };
529
- }));
530
- //#endregion
531
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js
532
- var require_supports_colors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
533
- var os$1 = __require("os");
534
- var hasFlag = require_has_flag();
535
- var env = process.env;
536
- var forceColor = void 0;
537
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) forceColor = false;
538
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = true;
539
- if ("FORCE_COLOR" in env) forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
540
- function translateLevel(level) {
541
- if (level === 0) return false;
542
- return {
543
- level,
544
- hasBasic: true,
545
- has256: level >= 2,
546
- has16m: level >= 3
547
- };
548
- }
549
- function supportsColor(stream) {
550
- if (forceColor === false) return 0;
551
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
552
- if (hasFlag("color=256")) return 2;
553
- if (stream && !stream.isTTY && forceColor !== true) return 0;
554
- var min = forceColor ? 1 : 0;
555
- if (process.platform === "win32") {
556
- var osRelease = os$1.release().split(".");
557
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
558
- return 1;
559
- }
560
- if ("CI" in env) {
561
- if ([
562
- "TRAVIS",
563
- "CIRCLECI",
564
- "APPVEYOR",
565
- "GITLAB_CI"
566
- ].some(function(sign) {
567
- return sign in env;
568
- }) || env.CI_NAME === "codeship") return 1;
569
- return min;
570
- }
571
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
572
- if ("TERM_PROGRAM" in env) {
573
- var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
574
- switch (env.TERM_PROGRAM) {
575
- case "iTerm.app": return version >= 3 ? 3 : 2;
576
- case "Hyper": return 3;
577
- case "Apple_Terminal": return 2;
578
- }
579
- }
580
- if (/-256(color)?$/i.test(env.TERM)) return 2;
581
- if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
582
- if ("COLORTERM" in env) return 1;
583
- if (env.TERM === "dumb") return min;
584
- return min;
585
- }
586
- function getSupportLevel(stream) {
587
- return translateLevel(supportsColor(stream));
588
- }
589
- module.exports = {
590
- supportsColor: getSupportLevel,
591
- stdout: getSupportLevel(process.stdout),
592
- stderr: getSupportLevel(process.stderr)
593
- };
594
- }));
595
- //#endregion
596
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
597
- var require_trap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
598
- module["exports"] = function runTheTrap(text, options) {
599
- var result = "";
600
- text = text || "Run the trap, drop the bass";
601
- text = text.split("");
602
- var trap = {
603
- a: [
604
- "@",
605
- "Ą",
606
- "Ⱥ",
607
- "Ʌ",
608
- "Δ",
609
- "Λ",
610
- "Д"
611
- ],
612
- b: [
613
- "ß",
614
- "Ɓ",
615
- "Ƀ",
616
- "ɮ",
617
- "β",
618
- "฿"
619
- ],
620
- c: [
621
- "©",
622
- "Ȼ",
623
- "Ͼ"
624
- ],
625
- d: [
626
- "Ð",
627
- "Ɗ",
628
- "Ԁ",
629
- "ԁ",
630
- "Ԃ",
631
- "ԃ"
632
- ],
633
- e: [
634
- "Ë",
635
- "ĕ",
636
- "Ǝ",
637
- "ɘ",
638
- "Σ",
639
- "ξ",
640
- "Ҽ",
641
- "੬"
642
- ],
643
- f: ["Ӻ"],
644
- g: ["ɢ"],
645
- h: [
646
- "Ħ",
647
- "ƕ",
648
- "Ң",
649
- "Һ",
650
- "Ӈ",
651
- "Ԋ"
652
- ],
653
- i: ["༏"],
654
- j: ["Ĵ"],
655
- k: [
656
- "ĸ",
657
- "Ҡ",
658
- "Ӄ",
659
- "Ԟ"
660
- ],
661
- l: ["Ĺ"],
662
- m: [
663
- "ʍ",
664
- "Ӎ",
665
- "ӎ",
666
- "Ԡ",
667
- "ԡ",
668
- "൩"
669
- ],
670
- n: [
671
- "Ñ",
672
- "ŋ",
673
- "Ɲ",
674
- "Ͷ",
675
- "Π",
676
- "Ҋ"
677
- ],
678
- o: [
679
- "Ø",
680
- "õ",
681
- "ø",
682
- "Ǿ",
683
- "ʘ",
684
- "Ѻ",
685
- "ם",
686
- "۝",
687
- "๏"
688
- ],
689
- p: ["Ƿ", "Ҏ"],
690
- q: ["্"],
691
- r: [
692
- "®",
693
- "Ʀ",
694
- "Ȑ",
695
- "Ɍ",
696
- "ʀ",
697
- "Я"
698
- ],
699
- s: [
700
- "§",
701
- "Ϟ",
702
- "ϟ",
703
- "Ϩ"
704
- ],
705
- t: [
706
- "Ł",
707
- "Ŧ",
708
- "ͳ"
709
- ],
710
- u: ["Ʊ", "Ս"],
711
- v: ["ט"],
712
- w: [
713
- "Ш",
714
- "Ѡ",
715
- "Ѽ",
716
- "൰"
717
- ],
718
- x: [
719
- "Ҳ",
720
- "Ӿ",
721
- "Ӽ",
722
- "ӽ"
723
- ],
724
- y: [
725
- "¥",
726
- "Ұ",
727
- "Ӌ"
728
- ],
729
- z: ["Ƶ", "ɀ"]
730
- };
731
- text.forEach(function(c) {
732
- c = c.toLowerCase();
733
- var chars = trap[c] || [" "];
734
- var rand = Math.floor(Math.random() * chars.length);
735
- if (typeof trap[c] !== "undefined") result += trap[c][rand];
736
- else result += c;
737
- });
738
- return result;
739
- };
740
- }));
741
- //#endregion
742
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
743
- var require_zalgo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
744
- module["exports"] = function zalgo(text, options) {
745
- text = text || " he is here ";
746
- var soul = {
747
- "up": [
748
- "̍",
749
- "̎",
750
- "̄",
751
- "̅",
752
- "̿",
753
- "̑",
754
- "̆",
755
- "̐",
756
- "͒",
757
- "͗",
758
- "͑",
759
- "̇",
760
- "̈",
761
- "̊",
762
- "͂",
763
- "̓",
764
- "̈",
765
- "͊",
766
- "͋",
767
- "͌",
768
- "̃",
769
- "̂",
770
- "̌",
771
- "͐",
772
- "̀",
773
- "́",
774
- "̋",
775
- "̏",
776
- "̒",
777
- "̓",
778
- "̔",
779
- "̽",
780
- "̉",
781
- "ͣ",
782
- "ͤ",
783
- "ͥ",
784
- "ͦ",
785
- "ͧ",
786
- "ͨ",
787
- "ͩ",
788
- "ͪ",
789
- "ͫ",
790
- "ͬ",
791
- "ͭ",
792
- "ͮ",
793
- "ͯ",
794
- "̾",
795
- "͛",
796
- "͆",
797
- "̚"
798
- ],
799
- "down": [
800
- "̖",
801
- "̗",
802
- "̘",
803
- "̙",
804
- "̜",
805
- "̝",
806
- "̞",
807
- "̟",
808
- "̠",
809
- "̤",
810
- "̥",
811
- "̦",
812
- "̩",
813
- "̪",
814
- "̫",
815
- "̬",
816
- "̭",
817
- "̮",
818
- "̯",
819
- "̰",
820
- "̱",
821
- "̲",
822
- "̳",
823
- "̹",
824
- "̺",
825
- "̻",
826
- "̼",
827
- "ͅ",
828
- "͇",
829
- "͈",
830
- "͉",
831
- "͍",
832
- "͎",
833
- "͓",
834
- "͔",
835
- "͕",
836
- "͖",
837
- "͙",
838
- "͚",
839
- "̣"
840
- ],
841
- "mid": [
842
- "̕",
843
- "̛",
844
- "̀",
845
- "́",
846
- "͘",
847
- "̡",
848
- "̢",
849
- "̧",
850
- "̨",
851
- "̴",
852
- "̵",
853
- "̶",
854
- "͜",
855
- "͝",
856
- "͞",
857
- "͟",
858
- "͠",
859
- "͢",
860
- "̸",
861
- "̷",
862
- "͡",
863
- " ҉"
864
- ]
865
- };
866
- var all = [].concat(soul.up, soul.down, soul.mid);
867
- function randomNumber(range) {
868
- return Math.floor(Math.random() * range);
869
- }
870
- function isChar(character) {
871
- var bool = false;
872
- all.filter(function(i) {
873
- bool = i === character;
874
- });
875
- return bool;
876
- }
877
- function heComes(text, options) {
878
- var result = "";
879
- var counts;
880
- var l;
881
- options = options || {};
882
- options["up"] = typeof options["up"] !== "undefined" ? options["up"] : true;
883
- options["mid"] = typeof options["mid"] !== "undefined" ? options["mid"] : true;
884
- options["down"] = typeof options["down"] !== "undefined" ? options["down"] : true;
885
- options["size"] = typeof options["size"] !== "undefined" ? options["size"] : "maxi";
886
- text = text.split("");
887
- for (l in text) {
888
- if (isChar(l)) continue;
889
- result = result + text[l];
890
- counts = {
891
- "up": 0,
892
- "down": 0,
893
- "mid": 0
894
- };
895
- switch (options.size) {
896
- case "mini":
897
- counts.up = randomNumber(8);
898
- counts.mid = randomNumber(2);
899
- counts.down = randomNumber(8);
900
- break;
901
- case "maxi":
902
- counts.up = randomNumber(16) + 3;
903
- counts.mid = randomNumber(4) + 1;
904
- counts.down = randomNumber(64) + 3;
905
- break;
906
- default:
907
- counts.up = randomNumber(8) + 1;
908
- counts.mid = randomNumber(6) / 2;
909
- counts.down = randomNumber(8) + 1;
910
- }
911
- var arr = [
912
- "up",
913
- "mid",
914
- "down"
915
- ];
916
- for (var d in arr) {
917
- var index = arr[d];
918
- for (var i = 0; i <= counts[index]; i++) if (options[index]) result = result + soul[index][randomNumber(soul[index].length)];
919
- }
920
- }
921
- return result;
922
- }
923
- return heComes(text, options);
924
- };
925
- }));
926
- //#endregion
927
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js
928
- var require_america = /* @__PURE__ */ __commonJSMin(((exports, module) => {
929
- module["exports"] = function(colors) {
930
- return function(letter, i, exploded) {
931
- if (letter === " ") return letter;
932
- switch (i % 3) {
933
- case 0: return colors.red(letter);
934
- case 1: return colors.white(letter);
935
- case 2: return colors.blue(letter);
936
- }
937
- };
938
- };
939
- }));
940
- //#endregion
941
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js
942
- var require_zebra = /* @__PURE__ */ __commonJSMin(((exports, module) => {
943
- module["exports"] = function(colors) {
944
- return function(letter, i, exploded) {
945
- return i % 2 === 0 ? letter : colors.inverse(letter);
946
- };
947
- };
948
- }));
949
- //#endregion
950
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js
951
- var require_rainbow = /* @__PURE__ */ __commonJSMin(((exports, module) => {
952
- module["exports"] = function(colors) {
953
- var rainbowColors = [
954
- "red",
955
- "yellow",
956
- "green",
957
- "blue",
958
- "magenta"
959
- ];
960
- return function(letter, i, exploded) {
961
- if (letter === " ") return letter;
962
- else return colors[rainbowColors[i++ % rainbowColors.length]](letter);
963
- };
964
- };
965
- }));
966
- //#endregion
967
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js
968
- var require_random = /* @__PURE__ */ __commonJSMin(((exports, module) => {
969
- module["exports"] = function(colors) {
970
- var available = [
971
- "underline",
972
- "inverse",
973
- "grey",
974
- "yellow",
975
- "red",
976
- "green",
977
- "blue",
978
- "white",
979
- "cyan",
980
- "magenta",
981
- "brightYellow",
982
- "brightRed",
983
- "brightGreen",
984
- "brightBlue",
985
- "brightWhite",
986
- "brightCyan",
987
- "brightMagenta"
988
- ];
989
- return function(letter, i, exploded) {
990
- return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
991
- };
992
- };
993
- }));
994
- //#endregion
995
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js
996
- var require_colors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
997
- var colors = {};
998
- module["exports"] = colors;
999
- colors.themes = {};
1000
- var util = __require("util");
1001
- var ansiStyles = colors.styles = require_styles();
1002
- var defineProps = Object.defineProperties;
1003
- var newLineRegex = /* @__PURE__ */ new RegExp(/[\r\n]+/g);
1004
- colors.supportsColor = require_supports_colors().supportsColor;
1005
- if (typeof colors.enabled === "undefined") colors.enabled = colors.supportsColor() !== false;
1006
- colors.enable = function() {
1007
- colors.enabled = true;
1008
- };
1009
- colors.disable = function() {
1010
- colors.enabled = false;
1011
- };
1012
- colors.stripColors = colors.strip = function(str) {
1013
- return ("" + str).replace(/\x1B\[\d+m/g, "");
1014
- };
1015
- colors.stylize = function stylize(str, style) {
1016
- if (!colors.enabled) return str + "";
1017
- var styleMap = ansiStyles[style];
1018
- if (!styleMap && style in colors) return colors[style](str);
1019
- return styleMap.open + str + styleMap.close;
1020
- };
1021
- var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
1022
- var escapeStringRegexp = function(str) {
1023
- if (typeof str !== "string") throw new TypeError("Expected a string");
1024
- return str.replace(matchOperatorsRe, "\\$&");
1025
- };
1026
- function build(_styles) {
1027
- var builder = function builder() {
1028
- return applyStyle.apply(builder, arguments);
1029
- };
1030
- builder._styles = _styles;
1031
- builder.__proto__ = proto;
1032
- return builder;
1033
- }
1034
- var styles = (function() {
1035
- var ret = {};
1036
- ansiStyles.grey = ansiStyles.gray;
1037
- Object.keys(ansiStyles).forEach(function(key) {
1038
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
1039
- ret[key] = { get: function() {
1040
- return build(this._styles.concat(key));
1041
- } };
1042
- });
1043
- return ret;
1044
- })();
1045
- var proto = defineProps(function colors() {}, styles);
1046
- function applyStyle() {
1047
- var str = Array.prototype.slice.call(arguments).map(function(arg) {
1048
- if (arg != null && arg.constructor === String) return arg;
1049
- else return util.inspect(arg);
1050
- }).join(" ");
1051
- if (!colors.enabled || !str) return str;
1052
- var newLinesPresent = str.indexOf("\n") != -1;
1053
- var nestedStyles = this._styles;
1054
- var i = nestedStyles.length;
1055
- while (i--) {
1056
- var code = ansiStyles[nestedStyles[i]];
1057
- str = code.open + str.replace(code.closeRe, code.open) + code.close;
1058
- if (newLinesPresent) str = str.replace(newLineRegex, function(match) {
1059
- return code.close + match + code.open;
1060
- });
1061
- }
1062
- return str;
1063
- }
1064
- colors.setTheme = function(theme) {
1065
- if (typeof theme === "string") {
1066
- console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
1067
- return;
1068
- }
1069
- for (var style in theme) (function(style) {
1070
- colors[style] = function(str) {
1071
- if (typeof theme[style] === "object") {
1072
- var out = str;
1073
- for (var i in theme[style]) out = colors[theme[style][i]](out);
1074
- return out;
1075
- }
1076
- return colors[theme[style]](str);
1077
- };
1078
- })(style);
1079
- };
1080
- function init() {
1081
- var ret = {};
1082
- Object.keys(styles).forEach(function(name) {
1083
- ret[name] = { get: function() {
1084
- return build([name]);
1085
- } };
1086
- });
1087
- return ret;
1088
- }
1089
- var sequencer = function sequencer(map, str) {
1090
- var exploded = str.split("");
1091
- exploded = exploded.map(map);
1092
- return exploded.join("");
1093
- };
1094
- colors.trap = require_trap();
1095
- colors.zalgo = require_zalgo();
1096
- colors.maps = {};
1097
- colors.maps.america = require_america()(colors);
1098
- colors.maps.zebra = require_zebra()(colors);
1099
- colors.maps.rainbow = require_rainbow()(colors);
1100
- colors.maps.random = require_random()(colors);
1101
- for (var map in colors.maps) (function(map) {
1102
- colors[map] = function(str) {
1103
- return sequencer(colors.maps[map], str);
1104
- };
1105
- })(map);
1106
- defineProps(colors, init());
1107
- }));
1108
- //#endregion
1109
- //#region ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js
1110
- var require_safe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1111
- module["exports"] = require_colors();
1112
- }));
1113
- //#endregion
1114
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js
1115
- var require_cell = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1116
- const { info, debug } = require_debug();
1117
- const utils = require_utils();
1118
- var Cell = class Cell {
1119
- /**
1120
- * A representation of a cell within the table.
1121
- * Implementations must have `init` and `draw` methods,
1122
- * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
1123
- * @param options
1124
- * @constructor
1125
- */
1126
- constructor(options) {
1127
- this.setOptions(options);
1128
- /**
1129
- * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
1130
- * `init` being called;
1131
- * @type {Number}
1132
- */
1133
- this.x = null;
1134
- this.y = null;
1135
- }
1136
- setOptions(options) {
1137
- if ([
1138
- "boolean",
1139
- "number",
1140
- "bigint",
1141
- "string"
1142
- ].indexOf(typeof options) !== -1) options = { content: "" + options };
1143
- options = options || {};
1144
- this.options = options;
1145
- let content = options.content;
1146
- if ([
1147
- "boolean",
1148
- "number",
1149
- "bigint",
1150
- "string"
1151
- ].indexOf(typeof content) !== -1) this.content = String(content);
1152
- else if (!content) this.content = this.options.href || "";
1153
- else throw new Error("Content needs to be a primitive, got: " + typeof content);
1154
- this.colSpan = options.colSpan || 1;
1155
- this.rowSpan = options.rowSpan || 1;
1156
- if (this.options.href) Object.defineProperty(this, "href", { get() {
1157
- return this.options.href;
1158
- } });
1159
- }
1160
- mergeTableOptions(tableOptions, cells) {
1161
- this.cells = cells;
1162
- let optionsChars = this.options.chars || {};
1163
- let tableChars = tableOptions.chars;
1164
- let chars = this.chars = {};
1165
- CHAR_NAMES.forEach(function(name) {
1166
- setOption(optionsChars, tableChars, name, chars);
1167
- });
1168
- this.truncate = this.options.truncate || tableOptions.truncate;
1169
- let style = this.options.style = this.options.style || {};
1170
- let tableStyle = tableOptions.style;
1171
- setOption(style, tableStyle, "padding-left", this);
1172
- setOption(style, tableStyle, "padding-right", this);
1173
- this.head = style.head || tableStyle.head;
1174
- this.border = style.border || tableStyle.border;
1175
- this.fixedWidth = tableOptions.colWidths[this.x];
1176
- this.lines = this.computeLines(tableOptions);
1177
- this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
1178
- this.desiredHeight = this.lines.length;
1179
- }
1180
- computeLines(tableOptions) {
1181
- const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
1182
- const { wordWrap = tableWordWrap } = this.options;
1183
- if (this.fixedWidth && wordWrap) {
1184
- this.fixedWidth -= this.paddingLeft + this.paddingRight;
1185
- if (this.colSpan) {
1186
- let i = 1;
1187
- while (i < this.colSpan) {
1188
- this.fixedWidth += tableOptions.colWidths[this.x + i];
1189
- i++;
1190
- }
1191
- }
1192
- const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
1193
- const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
1194
- return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
1195
- }
1196
- return this.wrapLines(this.content.split("\n"));
1197
- }
1198
- wrapLines(computedLines) {
1199
- const lines = utils.colorizeLines(computedLines);
1200
- if (this.href) return lines.map((line) => utils.hyperlink(this.href, line));
1201
- return lines;
1202
- }
1203
- /**
1204
- * Initializes the Cells data structure.
1205
- *
1206
- * @param tableOptions - A fully populated set of tableOptions.
1207
- * In addition to the standard default values, tableOptions must have fully populated the
1208
- * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
1209
- * of columns or rows (respectively) in this table, and each array item must be a Number.
1210
- *
1211
- */
1212
- init(tableOptions) {
1213
- let x = this.x;
1214
- let y = this.y;
1215
- this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
1216
- this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
1217
- this.width = this.widths.reduce(sumPlusOne, -1);
1218
- this.height = this.heights.reduce(sumPlusOne, -1);
1219
- this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
1220
- this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
1221
- this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
1222
- }
1223
- /**
1224
- * Draws the given line of the cell.
1225
- * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
1226
- * @param lineNum - can be `top`, `bottom` or a numerical line number.
1227
- * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
1228
- * many rows below it's being called from. Otherwise it's undefined.
1229
- * @returns {String} The representation of this line.
1230
- */
1231
- draw(lineNum, spanningCell) {
1232
- if (lineNum == "top") return this.drawTop(this.drawRight);
1233
- if (lineNum == "bottom") return this.drawBottom(this.drawRight);
1234
- let content = utils.truncate(this.content, 10, this.truncate);
1235
- if (!lineNum) info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
1236
- let padLen = Math.max(this.height - this.lines.length, 0);
1237
- let padTop;
1238
- switch (this.vAlign) {
1239
- case "center":
1240
- padTop = Math.ceil(padLen / 2);
1241
- break;
1242
- case "bottom":
1243
- padTop = padLen;
1244
- break;
1245
- default: padTop = 0;
1246
- }
1247
- if (lineNum < padTop || lineNum >= padTop + this.lines.length) return this.drawEmpty(this.drawRight, spanningCell);
1248
- let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
1249
- return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
1250
- }
1251
- /**
1252
- * Renders the top line of the cell.
1253
- * @param drawRight - true if this method should render the right edge of the cell.
1254
- * @returns {String}
1255
- */
1256
- drawTop(drawRight) {
1257
- let content = [];
1258
- if (this.cells) this.widths.forEach(function(width, index) {
1259
- content.push(this._topLeftChar(index));
1260
- content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
1261
- }, this);
1262
- else {
1263
- content.push(this._topLeftChar(0));
1264
- content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
1265
- }
1266
- if (drawRight) content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
1267
- return this.wrapWithStyleColors("border", content.join(""));
1268
- }
1269
- _topLeftChar(offset) {
1270
- let x = this.x + offset;
1271
- let leftChar;
1272
- if (this.y == 0) leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
1273
- else if (x == 0) leftChar = "leftMid";
1274
- else {
1275
- leftChar = offset == 0 ? "midMid" : "bottomMid";
1276
- if (this.cells) {
1277
- if (this.cells[this.y - 1][x] instanceof Cell.ColSpanCell) leftChar = offset == 0 ? "topMid" : "mid";
1278
- if (offset == 0) {
1279
- let i = 1;
1280
- while (this.cells[this.y][x - i] instanceof Cell.ColSpanCell) i++;
1281
- if (this.cells[this.y][x - i] instanceof Cell.RowSpanCell) leftChar = "leftMid";
1282
- }
1283
- }
1284
- }
1285
- return this.chars[leftChar];
1286
- }
1287
- wrapWithStyleColors(styleProperty, content) {
1288
- if (this[styleProperty] && this[styleProperty].length) try {
1289
- let colors = require_safe();
1290
- for (let i = this[styleProperty].length - 1; i >= 0; i--) colors = colors[this[styleProperty][i]];
1291
- return colors(content);
1292
- } catch (e) {
1293
- return content;
1294
- }
1295
- else return content;
1296
- }
1297
- /**
1298
- * Renders a line of text.
1299
- * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
1300
- * There may be top-padding above the first line of text.
1301
- * @param drawRight - true if this method should render the right edge of the cell.
1302
- * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
1303
- * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
1304
- * only include the truncation symbol if the text will not fit horizontally within the cell width.
1305
- * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1306
- * @returns {String}
1307
- */
1308
- drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
1309
- let left = this.chars[this.x == 0 ? "left" : "middle"];
1310
- if (this.x && spanningCell && this.cells) {
1311
- let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1312
- while (cellLeft instanceof ColSpanCell) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1313
- if (!(cellLeft instanceof RowSpanCell)) left = this.chars["rightMid"];
1314
- }
1315
- let leftPadding = utils.repeat(" ", this.paddingLeft);
1316
- let right = drawRight ? this.chars["right"] : "";
1317
- let rightPadding = utils.repeat(" ", this.paddingRight);
1318
- let line = this.lines[lineNum];
1319
- let len = this.width - (this.paddingLeft + this.paddingRight);
1320
- if (forceTruncationSymbol) line += this.truncate || "…";
1321
- let content = utils.truncate(line, len, this.truncate);
1322
- content = utils.pad(content, len, " ", this.hAlign);
1323
- content = leftPadding + content + rightPadding;
1324
- return this.stylizeLine(left, content, right);
1325
- }
1326
- stylizeLine(left, content, right) {
1327
- left = this.wrapWithStyleColors("border", left);
1328
- right = this.wrapWithStyleColors("border", right);
1329
- if (this.y === 0) content = this.wrapWithStyleColors("head", content);
1330
- return left + content + right;
1331
- }
1332
- /**
1333
- * Renders the bottom line of the cell.
1334
- * @param drawRight - true if this method should render the right edge of the cell.
1335
- * @returns {String}
1336
- */
1337
- drawBottom(drawRight) {
1338
- let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
1339
- let content = utils.repeat(this.chars.bottom, this.width);
1340
- let right = drawRight ? this.chars["bottomRight"] : "";
1341
- return this.wrapWithStyleColors("border", left + content + right);
1342
- }
1343
- /**
1344
- * Renders a blank line of text within the cell. Used for top and/or bottom padding.
1345
- * @param drawRight - true if this method should render the right edge of the cell.
1346
- * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1347
- * @returns {String}
1348
- */
1349
- drawEmpty(drawRight, spanningCell) {
1350
- let left = this.chars[this.x == 0 ? "left" : "middle"];
1351
- if (this.x && spanningCell && this.cells) {
1352
- let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1353
- while (cellLeft instanceof ColSpanCell) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1354
- if (!(cellLeft instanceof RowSpanCell)) left = this.chars["rightMid"];
1355
- }
1356
- let right = drawRight ? this.chars["right"] : "";
1357
- let content = utils.repeat(" ", this.width);
1358
- return this.stylizeLine(left, content, right);
1359
- }
1360
- };
1361
- var ColSpanCell = class {
1362
- /**
1363
- * A Cell that doesn't do anything. It just draws empty lines.
1364
- * Used as a placeholder in column spanning.
1365
- * @constructor
1366
- */
1367
- constructor() {}
1368
- draw(lineNum) {
1369
- if (typeof lineNum === "number") debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
1370
- return "";
1371
- }
1372
- init() {}
1373
- mergeTableOptions() {}
1374
- };
1375
- var RowSpanCell = class {
1376
- /**
1377
- * A placeholder Cell for a Cell that spans multiple rows.
1378
- * It delegates rendering to the original cell, but adds the appropriate offset.
1379
- * @param originalCell
1380
- * @constructor
1381
- */
1382
- constructor(originalCell) {
1383
- this.originalCell = originalCell;
1384
- }
1385
- init(tableOptions) {
1386
- let y = this.y;
1387
- let originalY = this.originalCell.y;
1388
- this.cellOffset = y - originalY;
1389
- this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
1390
- }
1391
- draw(lineNum) {
1392
- if (lineNum == "top") return this.originalCell.draw(this.offset, this.cellOffset);
1393
- if (lineNum == "bottom") return this.originalCell.draw("bottom");
1394
- debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
1395
- return this.originalCell.draw(this.offset + 1 + lineNum);
1396
- }
1397
- mergeTableOptions() {}
1398
- };
1399
- function firstDefined(...args) {
1400
- return args.filter((v) => v !== void 0 && v !== null).shift();
1401
- }
1402
- function setOption(objA, objB, nameB, targetObj) {
1403
- let nameA = nameB.split("-");
1404
- if (nameA.length > 1) {
1405
- nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
1406
- nameA = nameA.join("");
1407
- targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
1408
- } else targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
1409
- }
1410
- function findDimension(dimensionTable, startingIndex, span) {
1411
- let ret = dimensionTable[startingIndex];
1412
- for (let i = 1; i < span; i++) ret += 1 + dimensionTable[startingIndex + i];
1413
- return ret;
1414
- }
1415
- function sumPlusOne(a, b) {
1416
- return a + b + 1;
1417
- }
1418
- let CHAR_NAMES = [
1419
- "top",
1420
- "top-mid",
1421
- "top-left",
1422
- "top-right",
1423
- "bottom",
1424
- "bottom-mid",
1425
- "bottom-left",
1426
- "bottom-right",
1427
- "left",
1428
- "left-mid",
1429
- "mid",
1430
- "mid-mid",
1431
- "right",
1432
- "right-mid",
1433
- "middle"
1434
- ];
1435
- module.exports = Cell;
1436
- module.exports.ColSpanCell = ColSpanCell;
1437
- module.exports.RowSpanCell = RowSpanCell;
1438
- }));
1439
- //#endregion
1440
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js
1441
- var require_layout_manager = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1442
- const { warn, debug } = require_debug();
1443
- const Cell = require_cell();
1444
- const { ColSpanCell, RowSpanCell } = Cell;
1445
- (function() {
1446
- function next(alloc, col) {
1447
- if (alloc[col] > 0) return next(alloc, col + 1);
1448
- return col;
1449
- }
1450
- function layoutTable(table) {
1451
- let alloc = {};
1452
- table.forEach(function(row, rowIndex) {
1453
- let col = 0;
1454
- row.forEach(function(cell) {
1455
- cell.y = rowIndex;
1456
- cell.x = rowIndex ? next(alloc, col) : col;
1457
- const rowSpan = cell.rowSpan || 1;
1458
- const colSpan = cell.colSpan || 1;
1459
- if (rowSpan > 1) for (let cs = 0; cs < colSpan; cs++) alloc[cell.x + cs] = rowSpan;
1460
- col = cell.x + colSpan;
1461
- });
1462
- Object.keys(alloc).forEach((idx) => {
1463
- alloc[idx]--;
1464
- if (alloc[idx] < 1) delete alloc[idx];
1465
- });
1466
- });
1467
- }
1468
- function maxWidth(table) {
1469
- let mw = 0;
1470
- table.forEach(function(row) {
1471
- row.forEach(function(cell) {
1472
- mw = Math.max(mw, cell.x + (cell.colSpan || 1));
1473
- });
1474
- });
1475
- return mw;
1476
- }
1477
- function maxHeight(table) {
1478
- return table.length;
1479
- }
1480
- function cellsConflict(cell1, cell2) {
1481
- let yMin1 = cell1.y;
1482
- let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
1483
- let yMin2 = cell2.y;
1484
- let yConflict = !(yMin1 > cell2.y - 1 + (cell2.rowSpan || 1) || yMin2 > yMax1);
1485
- let xMin1 = cell1.x;
1486
- let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
1487
- let xMin2 = cell2.x;
1488
- let xConflict = !(xMin1 > cell2.x - 1 + (cell2.colSpan || 1) || xMin2 > xMax1);
1489
- return yConflict && xConflict;
1490
- }
1491
- function conflictExists(rows, x, y) {
1492
- let i_max = Math.min(rows.length - 1, y);
1493
- let cell = {
1494
- x,
1495
- y
1496
- };
1497
- for (let i = 0; i <= i_max; i++) {
1498
- let row = rows[i];
1499
- for (let j = 0; j < row.length; j++) if (cellsConflict(cell, row[j])) return true;
1500
- }
1501
- return false;
1502
- }
1503
- function allBlank(rows, y, xMin, xMax) {
1504
- for (let x = xMin; x < xMax; x++) if (conflictExists(rows, x, y)) return false;
1505
- return true;
1506
- }
1507
- function addRowSpanCells(table) {
1508
- table.forEach(function(row, rowIndex) {
1509
- row.forEach(function(cell) {
1510
- for (let i = 1; i < cell.rowSpan; i++) {
1511
- let rowSpanCell = new RowSpanCell(cell);
1512
- rowSpanCell.x = cell.x;
1513
- rowSpanCell.y = cell.y + i;
1514
- rowSpanCell.colSpan = cell.colSpan;
1515
- insertCell(rowSpanCell, table[rowIndex + i]);
1516
- }
1517
- });
1518
- });
1519
- }
1520
- function addColSpanCells(cellRows) {
1521
- for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
1522
- let cellColumns = cellRows[rowIndex];
1523
- for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
1524
- let cell = cellColumns[columnIndex];
1525
- for (let k = 1; k < cell.colSpan; k++) {
1526
- let colSpanCell = new ColSpanCell();
1527
- colSpanCell.x = cell.x + k;
1528
- colSpanCell.y = cell.y;
1529
- cellColumns.splice(columnIndex + 1, 0, colSpanCell);
1530
- }
1531
- }
1532
- }
1533
- }
1534
- function insertCell(cell, row) {
1535
- let x = 0;
1536
- while (x < row.length && row[x].x < cell.x) x++;
1537
- row.splice(x, 0, cell);
1538
- }
1539
- function fillInTable(table) {
1540
- let h_max = maxHeight(table);
1541
- let w_max = maxWidth(table);
1542
- debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
1543
- for (let y = 0; y < h_max; y++) for (let x = 0; x < w_max; x++) if (!conflictExists(table, x, y)) {
1544
- let opts = {
1545
- x,
1546
- y,
1547
- colSpan: 1,
1548
- rowSpan: 1
1549
- };
1550
- x++;
1551
- while (x < w_max && !conflictExists(table, x, y)) {
1552
- opts.colSpan++;
1553
- x++;
1554
- }
1555
- let y2 = y + 1;
1556
- while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
1557
- opts.rowSpan++;
1558
- y2++;
1559
- }
1560
- let cell = new Cell(opts);
1561
- cell.x = opts.x;
1562
- cell.y = opts.y;
1563
- warn(`Missing cell at ${cell.y}-${cell.x}.`);
1564
- insertCell(cell, table[y]);
1565
- }
1566
- }
1567
- function generateCells(rows) {
1568
- return rows.map(function(row) {
1569
- if (!Array.isArray(row)) {
1570
- let key = Object.keys(row)[0];
1571
- row = row[key];
1572
- if (Array.isArray(row)) {
1573
- row = row.slice();
1574
- row.unshift(key);
1575
- } else row = [key, row];
1576
- }
1577
- return row.map(function(cell) {
1578
- return new Cell(cell);
1579
- });
1580
- });
1581
- }
1582
- function makeTableLayout(rows) {
1583
- let cellRows = generateCells(rows);
1584
- layoutTable(cellRows);
1585
- fillInTable(cellRows);
1586
- addRowSpanCells(cellRows);
1587
- addColSpanCells(cellRows);
1588
- return cellRows;
1589
- }
1590
- module.exports = {
1591
- makeTableLayout,
1592
- layoutTable,
1593
- addRowSpanCells,
1594
- maxWidth,
1595
- fillInTable,
1596
- computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
1597
- computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
1598
- };
1599
- })();
1600
- function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
1601
- return function(vals, table) {
1602
- let result = [];
1603
- let spanners = [];
1604
- let auto = {};
1605
- table.forEach(function(row) {
1606
- row.forEach(function(cell) {
1607
- if ((cell[colSpan] || 1) > 1) spanners.push(cell);
1608
- else result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
1609
- });
1610
- });
1611
- vals.forEach(function(val, index) {
1612
- if (typeof val === "number") result[index] = val;
1613
- });
1614
- for (let k = spanners.length - 1; k >= 0; k--) {
1615
- let cell = spanners[k];
1616
- let span = cell[colSpan];
1617
- let col = cell[x];
1618
- let existingWidth = result[col];
1619
- let editableCols = typeof vals[col] === "number" ? 0 : 1;
1620
- if (typeof existingWidth === "number") for (let i = 1; i < span; i++) {
1621
- existingWidth += 1 + result[col + i];
1622
- if (typeof vals[col + i] !== "number") editableCols++;
1623
- }
1624
- else {
1625
- existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
1626
- if (!auto[col] || auto[col] < existingWidth) auto[col] = existingWidth;
1627
- }
1628
- if (cell[desiredWidth] > existingWidth) {
1629
- let i = 0;
1630
- while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
1631
- if (typeof vals[col + i] !== "number") {
1632
- let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
1633
- existingWidth += dif;
1634
- result[col + i] += dif;
1635
- editableCols--;
1636
- }
1637
- i++;
1638
- }
1639
- }
1640
- }
1641
- Object.assign(vals, result, auto);
1642
- for (let j = 0; j < vals.length; j++) vals[j] = Math.max(forcedMin, vals[j] || 0);
1643
- };
1644
- }
1645
- }));
1646
- //#endregion
1647
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js
1648
- var require_table = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1649
- const debug = require_debug();
1650
- const utils = require_utils();
1651
- const tableLayout = require_layout_manager();
1652
- var Table = class extends Array {
1653
- constructor(opts) {
1654
- super();
1655
- const options = utils.mergeOptions(opts);
1656
- Object.defineProperty(this, "options", {
1657
- value: options,
1658
- enumerable: options.debug
1659
- });
1660
- if (options.debug) {
1661
- switch (typeof options.debug) {
1662
- case "boolean":
1663
- debug.setDebugLevel(debug.WARN);
1664
- break;
1665
- case "number":
1666
- debug.setDebugLevel(options.debug);
1667
- break;
1668
- case "string":
1669
- debug.setDebugLevel(parseInt(options.debug, 10));
1670
- break;
1671
- default:
1672
- debug.setDebugLevel(debug.WARN);
1673
- debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
1674
- }
1675
- Object.defineProperty(this, "messages", { get() {
1676
- return debug.debugMessages();
1677
- } });
1678
- }
1679
- }
1680
- toString() {
1681
- let array = this;
1682
- let headersPresent = this.options.head && this.options.head.length;
1683
- if (headersPresent) {
1684
- array = [this.options.head];
1685
- if (this.length) array.push.apply(array, this);
1686
- } else this.options.style.head = [];
1687
- let cells = tableLayout.makeTableLayout(array);
1688
- cells.forEach(function(row) {
1689
- row.forEach(function(cell) {
1690
- cell.mergeTableOptions(this.options, cells);
1691
- }, this);
1692
- }, this);
1693
- tableLayout.computeWidths(this.options.colWidths, cells);
1694
- tableLayout.computeHeights(this.options.rowHeights, cells);
1695
- cells.forEach(function(row) {
1696
- row.forEach(function(cell) {
1697
- cell.init(this.options);
1698
- }, this);
1699
- }, this);
1700
- let result = [];
1701
- for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
1702
- let row = cells[rowIndex];
1703
- let heightOfRow = this.options.rowHeights[rowIndex];
1704
- if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) doDraw(row, "top", result);
1705
- for (let lineNum = 0; lineNum < heightOfRow; lineNum++) doDraw(row, lineNum, result);
1706
- if (rowIndex + 1 == cells.length) doDraw(row, "bottom", result);
1707
- }
1708
- return result.join("\n");
1709
- }
1710
- get width() {
1711
- return this.toString().split("\n")[0].length;
1712
- }
1713
- };
1714
- Table.reset = () => debug.reset();
1715
- function doDraw(row, lineNum, result) {
1716
- let line = [];
1717
- row.forEach(function(cell) {
1718
- line.push(cell.draw(lineNum));
1719
- });
1720
- let str = line.join("");
1721
- if (str.length) result.push(str);
1722
- }
1723
- module.exports = Table;
1724
- }));
1725
- //#endregion
1726
- //#region ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js
1727
- var require_cli_table3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1728
- module.exports = require_table();
1729
- }));
1730
- //#endregion
1731
- //#region ../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/utilities.js
1732
- var import_cli_table3 = /* @__PURE__ */ __toESM(require_cli_table3(), 1);
1733
- function stringReplaceAll(string, substring, postfix) {
1734
- let index = string.indexOf(substring);
1735
- if (index === -1) return string;
1736
- const substringLength = substring.length;
1737
- let endIndex = 0;
1738
- let returnValue = "";
1739
- do {
1740
- returnValue += string.slice(endIndex, index) + substring + postfix;
1741
- endIndex = index + substringLength;
1742
- index = string.indexOf(substring, endIndex);
1743
- } while (index !== -1);
1744
- returnValue += string.slice(endIndex);
1745
- return returnValue;
1746
- }
1747
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1748
- let endIndex = 0;
1749
- let returnValue = "";
1750
- do {
1751
- const isGotCR = string[index - 1] === "\r";
1752
- returnValue += string.slice(endIndex, isGotCR ? index - 1 : index) + prefix + (isGotCR ? "\r\n" : "\n") + postfix;
1753
- endIndex = index + 1;
1754
- index = string.indexOf("\n", endIndex);
1755
- } while (index !== -1);
1756
- returnValue += string.slice(endIndex);
1757
- return returnValue;
1758
- }
1759
- //#endregion
1760
- //#region ../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/ansi-styles/index.js
1761
- const ANSI_BACKGROUND_OFFSET = 10;
1762
- const ANSI_UNDERLINE_OFFSET = 20;
1763
- const wrapAnsi16 = (offset = 0) => (code) => `\u{1B}[${code + offset}m`;
1764
- const wrapAnsi256 = (offset = 0) => (code) => `\u{1B}[${38 + offset};5;${code}m`;
1765
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u{1B}[${38 + offset};2;${red};${green};${blue}m`;
1766
- const wrapUnderlineAnsi = (code) => `\u{1B}[58;5;${code < 90 ? code - 30 : code - 90 + 8}m`;
1767
- const styles$1 = {
1768
- modifier: {
1769
- reset: [0, 0],
1770
- bold: [1, 22],
1771
- dim: [2, 22],
1772
- italic: [3, 23],
1773
- underline: [4, 24],
1774
- underlineDouble: ["4:2", 24],
1775
- underlineCurly: ["4:3", 24],
1776
- underlineDotted: ["4:4", 24],
1777
- underlineDashed: ["4:5", 24],
1778
- overline: [53, 55],
1779
- inverse: [7, 27],
1780
- hidden: [8, 28],
1781
- strikethrough: [9, 29]
1782
- },
1783
- color: {
1784
- black: [30, 39],
1785
- red: [31, 39],
1786
- green: [32, 39],
1787
- yellow: [33, 39],
1788
- blue: [34, 39],
1789
- magenta: [35, 39],
1790
- cyan: [36, 39],
1791
- white: [37, 39],
1792
- blackBright: [90, 39],
1793
- gray: [90, 39],
1794
- grey: [90, 39],
1795
- redBright: [91, 39],
1796
- greenBright: [92, 39],
1797
- yellowBright: [93, 39],
1798
- blueBright: [94, 39],
1799
- magentaBright: [95, 39],
1800
- cyanBright: [96, 39],
1801
- whiteBright: [97, 39]
1802
- },
1803
- bgColor: {
1804
- bgBlack: [40, 49],
1805
- bgRed: [41, 49],
1806
- bgGreen: [42, 49],
1807
- bgYellow: [43, 49],
1808
- bgBlue: [44, 49],
1809
- bgMagenta: [45, 49],
1810
- bgCyan: [46, 49],
1811
- bgWhite: [47, 49],
1812
- bgBlackBright: [100, 49],
1813
- bgGray: [100, 49],
1814
- bgGrey: [100, 49],
1815
- bgRedBright: [101, 49],
1816
- bgGreenBright: [102, 49],
1817
- bgYellowBright: [103, 49],
1818
- bgBlueBright: [104, 49],
1819
- bgMagentaBright: [105, 49],
1820
- bgCyanBright: [106, 49],
1821
- bgWhiteBright: [107, 49]
1822
- },
1823
- underlineColor: {
1824
- underlineBlack: ["58;5;0", 59],
1825
- underlineRed: ["58;5;1", 59],
1826
- underlineGreen: ["58;5;2", 59],
1827
- underlineYellow: ["58;5;3", 59],
1828
- underlineBlue: ["58;5;4", 59],
1829
- underlineMagenta: ["58;5;5", 59],
1830
- underlineCyan: ["58;5;6", 59],
1831
- underlineWhite: ["58;5;7", 59],
1832
- underlineBlackBright: ["58;5;8", 59],
1833
- underlineGray: ["58;5;8", 59],
1834
- underlineGrey: ["58;5;8", 59],
1835
- underlineRedBright: ["58;5;9", 59],
1836
- underlineGreenBright: ["58;5;10", 59],
1837
- underlineYellowBright: ["58;5;11", 59],
1838
- underlineBlueBright: ["58;5;12", 59],
1839
- underlineMagentaBright: ["58;5;13", 59],
1840
- underlineCyanBright: ["58;5;14", 59],
1841
- underlineWhiteBright: ["58;5;15", 59]
1842
- }
1843
- };
1844
- Object.keys(styles$1.modifier);
1845
- const foregroundColorNames = Object.keys(styles$1.color);
1846
- const backgroundColorNames = Object.keys(styles$1.bgColor);
1847
- Object.keys(styles$1.underlineColor);
1848
- [...foregroundColorNames, ...backgroundColorNames];
1849
- function assembleStyles() {
1850
- const codes = /* @__PURE__ */ new Map();
1851
- for (const [groupName, group] of Object.entries(styles$1)) {
1852
- for (const [styleName, style] of Object.entries(group)) {
1853
- styles$1[styleName] = {
1854
- open: `\u{1B}[${style[0]}m`,
1855
- close: `\u{1B}[${style[1]}m`
1856
- };
1857
- group[styleName] = styles$1[styleName];
1858
- codes.set(Number.parseInt(style[0], 10), style[1]);
1859
- }
1860
- Object.defineProperty(styles$1, groupName, {
1861
- value: group,
1862
- enumerable: false
1863
- });
1864
- }
1865
- Object.defineProperty(styles$1, "codes", {
1866
- value: codes,
1867
- enumerable: false
1868
- });
1869
- styles$1.color.close = "\x1B[39m";
1870
- styles$1.bgColor.close = "\x1B[49m";
1871
- styles$1.underlineColor.close = "\x1B[59m";
1872
- styles$1.color.ansi = wrapAnsi16();
1873
- styles$1.color.ansi256 = wrapAnsi256();
1874
- styles$1.color.ansi16m = wrapAnsi16m();
1875
- styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1876
- styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1877
- styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1878
- styles$1.underlineColor.ansi = wrapUnderlineAnsi;
1879
- styles$1.underlineColor.ansi256 = wrapAnsi256(ANSI_UNDERLINE_OFFSET);
1880
- styles$1.underlineColor.ansi16m = wrapAnsi16m(ANSI_UNDERLINE_OFFSET);
1881
- Object.defineProperties(styles$1, {
1882
- rgbToAnsi256: {
1883
- value(red, green, blue) {
1884
- if (red === green && green === blue) {
1885
- if (red < 8) return 16;
1886
- if (red > 248) return 231;
1887
- return Math.round((red - 8) / 247 * 24) + 232;
1888
- }
1889
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1890
- },
1891
- enumerable: false
1892
- },
1893
- hexToRgb: {
1894
- value(hex) {
1895
- const matches = /[\da-f]{6}|[\da-f]{3}/i.exec(hex.toString(16));
1896
- if (!matches) return [
1897
- 0,
1898
- 0,
1899
- 0
1900
- ];
1901
- let [colorString] = matches;
1902
- if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
1903
- const integer = Number.parseInt(colorString, 16);
1904
- return [
1905
- integer >> 16 & 255,
1906
- integer >> 8 & 255,
1907
- integer & 255
1908
- ];
1909
- },
1910
- enumerable: false
1911
- },
1912
- hexToAnsi256: {
1913
- value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
1914
- enumerable: false
1915
- },
1916
- ansi256ToAnsi: {
1917
- value(code) {
1918
- if (code < 8) return 30 + code;
1919
- if (code < 16) return 90 + (code - 8);
1920
- let red;
1921
- let green;
1922
- let blue;
1923
- if (code >= 232) {
1924
- red = ((code - 232) * 10 + 8) / 255;
1925
- green = red;
1926
- blue = red;
1927
- } else {
1928
- code -= 16;
1929
- const remainder = code % 36;
1930
- red = Math.floor(code / 36) / 5;
1931
- green = Math.floor(remainder / 6) / 5;
1932
- blue = remainder % 6 / 5;
1933
- }
1934
- const value = Math.max(red, green, blue) * 2;
1935
- if (value === 0) return 30;
1936
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1937
- if (value === 2) result += 60;
1938
- return result;
1939
- },
1940
- enumerable: false
1941
- },
1942
- rgbToAnsi: {
1943
- value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
1944
- enumerable: false
1945
- },
1946
- hexToAnsi: {
1947
- value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
1948
- enumerable: false
1949
- }
1950
- });
1951
- return styles$1;
1952
- }
1953
- const ansiStyles = assembleStyles();
1954
- //#endregion
1955
- //#region ../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/supports-color/index.js
1956
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
1957
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1958
- const position = argv.indexOf(prefix + flag);
1959
- const terminatorPosition = argv.indexOf("--");
1960
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1961
- }
1962
- const { env } = process$1;
1963
- let flagForceColor;
1964
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
1965
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
1966
- function hasNumericForceColor() {
1967
- return /^\d+$/.test(env.FORCE_COLOR);
1968
- }
1969
- function envForceColor() {
1970
- if (!("FORCE_COLOR" in env)) return;
1971
- if (env.FORCE_COLOR === "false") return 0;
1972
- if (env.FORCE_COLOR === "true" || env.FORCE_COLOR.length === 0) return 1;
1973
- if (!hasNumericForceColor()) return;
1974
- return Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
1975
- }
1976
- function translateLevel(level) {
1977
- if (level === 0) return false;
1978
- return {
1979
- level,
1980
- hasBasic: true,
1981
- has256: level >= 2,
1982
- has16m: level >= 3
1983
- };
1984
- }
1985
- function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1986
- const noFlagForceColor = envForceColor();
1987
- if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
1988
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
1989
- if (forceColor === 0) return 0;
1990
- if (sniffFlags) {
1991
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
1992
- if (hasFlag("color=256")) return 2;
1993
- }
1994
- if (forceColor !== void 0 && hasNumericForceColor()) return forceColor;
1995
- if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
1996
- if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
1997
- const min = forceColor || 0;
1998
- if (env.TERM === "dumb") return min;
1999
- if (process$1.platform === "win32") {
2000
- const osRelease = os.release().split(".");
2001
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
2002
- return 1;
2003
- }
2004
- if ("CI" in env) {
2005
- if ([
2006
- "GITHUB_ACTIONS",
2007
- "GITEA_ACTIONS",
2008
- "CIRCLECI"
2009
- ].some((key) => key in env)) return 3;
2010
- if ([
2011
- "TRAVIS",
2012
- "APPVEYOR",
2013
- "GITLAB_CI",
2014
- "BUILDKITE",
2015
- "DRONE"
2016
- ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
2017
- return min;
2018
- }
2019
- if ("TEAMCITY_VERSION" in env) return /^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
2020
- if (env.COLORTERM === "truecolor") return 3;
2021
- if (env.TERM === "xterm-kitty") return 3;
2022
- if (env.TERM === "xterm-ghostty") return 3;
2023
- if (env.TERM === "wezterm") return 3;
2024
- if ("TERM_PROGRAM" in env) {
2025
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".", 1)[0], 10);
2026
- switch (env.TERM_PROGRAM) {
2027
- case "iTerm.app": return version >= 3 ? 3 : 2;
2028
- case "Apple_Terminal": return 2;
2029
- }
2030
- }
2031
- if (/-256(?:color)?$/i.test(env.TERM)) return 2;
2032
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
2033
- if ("COLORTERM" in env) return 1;
2034
- return min;
2035
- }
2036
- function createSupportsColor(stream, options = {}) {
2037
- return translateLevel(_supportsColor(stream, {
2038
- streamIsTTY: stream && stream.isTTY,
2039
- ...options
2040
- }));
2041
- }
2042
- //#endregion
2043
- //#region ../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/index.js
2044
- const { stdout: stdoutColor, stderr: stderrColor } = {
2045
- stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
2046
- stderr: createSupportsColor({ isTTY: tty.isatty(2) })
2047
- };
2048
- const GENERATOR = Symbol("GENERATOR");
2049
- const STYLER = Symbol("STYLER");
2050
- const IS_EMPTY = Symbol("IS_EMPTY");
2051
- const LEVEL = Symbol("LEVEL");
2052
- const styles = Object.create(null);
2053
- const assertValidLevel = (level) => {
2054
- if (!Number.isSafeInteger(level) || level < 0 || level > 3) throw new Error("The `level` should be an integer from 0 to 3");
2055
- };
2056
- const levelDescriptor = {
2057
- enumerable: true,
2058
- get() {
2059
- return this[LEVEL];
2060
- },
2061
- set(level) {
2062
- assertValidLevel(level);
2063
- this[LEVEL] = level;
2064
- }
2065
- };
2066
- const applyOptions = (object, options = {}) => {
2067
- if (options.level !== void 0) assertValidLevel(options.level);
2068
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
2069
- object[LEVEL] = options.level === void 0 ? colorLevel : options.level;
2070
- };
2071
- const chalkFactory = (options) => {
2072
- const chalk = (...strings) => strings.join(" ");
2073
- applyOptions(chalk, options);
2074
- Object.setPrototypeOf(chalk, createChalk.prototype);
2075
- return chalk;
2076
- };
2077
- function createChalk(options) {
2078
- return chalkFactory(options);
2079
- }
2080
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
2081
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
2082
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
2083
- Object.defineProperty(this, styleName, { value: builder });
2084
- return builder;
2085
- } };
2086
- styles.visible = { get() {
2087
- const builder = createBuilder(this, this[STYLER], true);
2088
- Object.defineProperty(this, "visible", { value: builder });
2089
- return builder;
2090
- } };
2091
- const createModelConverters = (model, type) => {
2092
- const style = ansiStyles[type];
2093
- if (model === "rgb") {
2094
- const ansi = (red, green, blue) => style.ansi(ansiStyles.rgbToAnsi(red, green, blue));
2095
- const ansi256 = (red, green, blue) => style.ansi256(ansiStyles.rgbToAnsi256(red, green, blue));
2096
- return [
2097
- ansi,
2098
- ansi,
2099
- ansi256,
2100
- style.ansi16m
2101
- ];
2102
- }
2103
- if (model === "hex") {
2104
- const ansi = (hex) => style.ansi(ansiStyles.hexToAnsi(hex));
2105
- const ansi256 = (hex) => style.ansi256(ansiStyles.hexToAnsi256(hex));
2106
- return [
2107
- ansi,
2108
- ansi,
2109
- ansi256,
2110
- (hex) => style.ansi16m(...ansiStyles.hexToRgb(hex))
2111
- ];
2112
- }
2113
- const ansi = (code) => style.ansi(ansiStyles.ansi256ToAnsi(code));
2114
- return [
2115
- ansi,
2116
- ansi,
2117
- style.ansi256,
2118
- style.ansi256
2119
- ];
2120
- };
2121
- for (const model of [
2122
- "rgb",
2123
- "hex",
2124
- "ansi256"
2125
- ]) {
2126
- const capitalizedModel = model[0].toUpperCase() + model.slice(1);
2127
- for (const [styleName, type] of [
2128
- [model, "color"],
2129
- ["bg" + capitalizedModel, "bgColor"],
2130
- ["underline" + capitalizedModel, "underlineColor"]
2131
- ]) {
2132
- const { close } = ansiStyles[type];
2133
- const converters = createModelConverters(model, type);
2134
- styles[styleName] = { get() {
2135
- const styleFunction = function(first, second, third) {
2136
- const open = converters[this.level](first, second, third);
2137
- return createBuilder(this, createStyler(open, close, this[STYLER]), this[IS_EMPTY]);
2138
- };
2139
- Object.defineProperty(this, styleName, { value: styleFunction });
2140
- return styleFunction;
2141
- } };
2142
- }
2143
- }
2144
- const proto = Object.defineProperties(() => {}, {
2145
- ...styles,
2146
- level: {
2147
- enumerable: true,
2148
- get() {
2149
- return this[GENERATOR].level;
2150
- },
2151
- set(level) {
2152
- this[GENERATOR].level = level;
2153
- }
2154
- }
2155
- });
2156
- const createStyler = (open, close, parent) => {
2157
- let openAll;
2158
- let closeAll;
2159
- if (parent === void 0) {
2160
- openAll = open;
2161
- closeAll = close;
2162
- } else {
2163
- openAll = parent.openAll + open;
2164
- closeAll = close + parent.closeAll;
2165
- }
2166
- return {
2167
- open,
2168
- close,
2169
- openAll,
2170
- closeAll,
2171
- parent
2172
- };
2173
- };
2174
- const createBuilder = (self, _styler, _isEmpty) => {
2175
- const builder = (...arguments_) => {
2176
- if (arguments_.length === 1) return applyStyle(builder, "" + arguments_[0]);
2177
- if (arguments_.length === 2) return applyStyle(builder, arguments_[0] + " " + arguments_[1]);
2178
- return applyStyle(builder, arguments_.join(" "));
2179
- };
2180
- Object.setPrototypeOf(builder, proto);
2181
- builder[GENERATOR] = self[GENERATOR] ?? self;
2182
- builder[STYLER] = _styler;
2183
- builder[IS_EMPTY] = _isEmpty;
2184
- return builder;
2185
- };
2186
- const applyStyle = (self, string) => {
2187
- if (self[GENERATOR][LEVEL] <= 0 || !string) return self[IS_EMPTY] ? "" : string;
2188
- let styler = self[STYLER];
2189
- if (styler === void 0) return string;
2190
- const { openAll, closeAll } = styler;
2191
- if (string.includes("\x1B")) while (styler !== void 0) {
2192
- string = stringReplaceAll(string, styler.close, styler.open);
2193
- styler = styler.parent;
2194
- }
2195
- const lfIndex = string.indexOf("\n");
2196
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2197
- return openAll + string + closeAll;
2198
- };
2199
- Object.defineProperties(createChalk.prototype, {
2200
- ...styles,
2201
- level: levelDescriptor
2202
- });
2203
- const chalk = createChalk();
2204
- createChalk({ level: stderrColor ? stderrColor.level : 0 });
2205
- //#endregion
2206
- //#region src/ux/table.ts
2207
- /**
2208
- * Format diagnostics as a table
2209
- * @param diagnostics - Diagnostics to format
2210
- * @param verbose - If false, hide INFO level diagnostics (default: false)
2211
- */
2212
- function formatDiagnosticsTable(diagnostics, verbose = false) {
2213
- const filteredDiagnostics = verbose ? diagnostics : diagnostics.filter((d) => d.level !== "info");
2214
- if (filteredDiagnostics.length === 0) return "";
2215
- const table = new import_cli_table3.default({
2216
- head: [
2217
- chalk.bold("Level"),
2218
- chalk.bold("Code"),
2219
- chalk.bold("Message"),
2220
- chalk.bold("File")
2221
- ],
2222
- colWidths: [
2223
- 9,
2224
- 35,
2225
- 60,
2226
- 30
2227
- ],
2228
- style: {
2229
- head: [],
2230
- border: []
2231
- },
2232
- wordWrap: true
2233
- });
2234
- for (const diagnostic of filteredDiagnostics) {
2235
- const level = formatLevel(diagnostic.level);
2236
- const file = extractFilename(diagnostic.file || "-");
2237
- table.push([
2238
- level,
2239
- diagnostic.code,
2240
- diagnostic.message,
2241
- file
2242
- ]);
2243
- }
2244
- return table.toString();
2245
- }
2246
- /**
2247
- * Extract filename from path for display
2248
- */
2249
- function extractFilename(path) {
2250
- if (path === "-" || !path) return "-";
2251
- const parts = path.split(" > ")[0].split("/");
2252
- const filename = parts[parts.length - 1];
2253
- if (filename.length <= 28) return filename;
2254
- return "..." + filename.slice(-25);
2255
- }
2256
- /**
2257
- * Format diagnostic level with color
2258
- */
2259
- function formatLevel(level) {
2260
- switch (level) {
2261
- case "error": return chalk.red("ERROR");
2262
- case "warning": return chalk.yellow("WARNING");
2263
- case "info": return chalk.blue("INFO");
2264
- default: return level.toUpperCase();
2265
- }
2266
- }
2267
- /**
2268
- * Count error diagnostics
2269
- */
2270
- function countErrors(diagnostics) {
2271
- return diagnostics.filter((d) => d.level === "error").length;
2272
- }
2273
- /**
2274
- * Count warning diagnostics
2275
- */
2276
- function countWarnings(diagnostics) {
2277
- return diagnostics.filter((d) => d.level === "warning").length;
2278
- }
2279
- /**
2280
- * Count info diagnostics
2281
- */
2282
- function countInfo(diagnostics) {
2283
- return diagnostics.filter((d) => d.level === "info").length;
2284
- }
2285
- /**
2286
- * Format a condensed diagnostics summary table showing counts by level
2287
- * Used for batch processing to show per-package diagnostic summary
2288
- */
2289
- function formatDiagnosticsSummaryTable(diagnostics) {
2290
- const errorCount = countErrors(diagnostics);
2291
- const warningCount = countWarnings(diagnostics);
2292
- const infoCount = countInfo(diagnostics);
2293
- const table = new import_cli_table3.default({
2294
- head: [chalk.bold("Level"), chalk.bold("Count")],
2295
- style: {
2296
- head: [],
2297
- border: []
2298
- }
2299
- });
2300
- table.push([chalk.red("ERROR"), errorCount.toString()], [chalk.yellow("WARNING"), warningCount.toString()], [chalk.blue("INFO"), infoCount.toString()]);
2301
- return table.toString();
2302
- }
2303
- //#endregion
2304
- export { require_cli_table3 as a, chalk as i, formatDiagnosticsSummaryTable as n, require_string_width as o, formatDiagnosticsTable as r, writeDiagnostics as s, countErrors as t };
2305
-
2306
- //# sourceMappingURL=table-DYcNeyJ_.js.map