@kinosec/cli 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/cli.js +1435 -297
- package/dist/cli.js.map +1 -1
- package/package.json +3 -2
package/dist/cli.js
CHANGED
|
@@ -3507,7 +3507,7 @@ var require_string_width = __commonJS({
|
|
|
3507
3507
|
var stripAnsi2 = require_strip_ansi();
|
|
3508
3508
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
3509
3509
|
var emojiRegex = require_emoji_regex();
|
|
3510
|
-
var
|
|
3510
|
+
var stringWidth3 = (string) => {
|
|
3511
3511
|
if (typeof string !== "string" || string.length === 0) {
|
|
3512
3512
|
return 0;
|
|
3513
3513
|
}
|
|
@@ -3532,8 +3532,8 @@ var require_string_width = __commonJS({
|
|
|
3532
3532
|
}
|
|
3533
3533
|
return width;
|
|
3534
3534
|
};
|
|
3535
|
-
module.exports =
|
|
3536
|
-
module.exports.default =
|
|
3535
|
+
module.exports = stringWidth3;
|
|
3536
|
+
module.exports.default = stringWidth3;
|
|
3537
3537
|
}
|
|
3538
3538
|
});
|
|
3539
3539
|
|
|
@@ -3541,7 +3541,7 @@ var require_string_width = __commonJS({
|
|
|
3541
3541
|
var require_utils = __commonJS({
|
|
3542
3542
|
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js"(exports, module) {
|
|
3543
3543
|
"use strict";
|
|
3544
|
-
var
|
|
3544
|
+
var stringWidth3 = require_string_width();
|
|
3545
3545
|
function codeRegex(capture) {
|
|
3546
3546
|
return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
|
|
3547
3547
|
}
|
|
@@ -3550,7 +3550,7 @@ var require_utils = __commonJS({
|
|
|
3550
3550
|
let stripped = ("" + str).replace(code, "");
|
|
3551
3551
|
let split = stripped.split("\n");
|
|
3552
3552
|
return split.reduce(function(memo, s) {
|
|
3553
|
-
return
|
|
3553
|
+
return stringWidth3(s) > memo ? stringWidth3(s) : memo;
|
|
3554
3554
|
}, 0);
|
|
3555
3555
|
}
|
|
3556
3556
|
function repeat(str, times) {
|
|
@@ -3844,8 +3844,8 @@ var require_utils = __commonJS({
|
|
|
3844
3844
|
var require_styles = __commonJS({
|
|
3845
3845
|
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
|
|
3846
3846
|
"use strict";
|
|
3847
|
-
var
|
|
3848
|
-
module["exports"] =
|
|
3847
|
+
var styles4 = {};
|
|
3848
|
+
module["exports"] = styles4;
|
|
3849
3849
|
var codes = {
|
|
3850
3850
|
reset: [0, 0],
|
|
3851
3851
|
bold: [1, 22],
|
|
@@ -3901,7 +3901,7 @@ var require_styles = __commonJS({
|
|
|
3901
3901
|
};
|
|
3902
3902
|
Object.keys(codes).forEach(function(key) {
|
|
3903
3903
|
var val = codes[key];
|
|
3904
|
-
var style =
|
|
3904
|
+
var style = styles4[key] = [];
|
|
3905
3905
|
style.open = "\x1B[" + val[0] + "m";
|
|
3906
3906
|
style.close = "\x1B[" + val[1] + "m";
|
|
3907
3907
|
});
|
|
@@ -4364,7 +4364,7 @@ var require_colors = __commonJS({
|
|
|
4364
4364
|
module["exports"] = colors;
|
|
4365
4365
|
colors.themes = {};
|
|
4366
4366
|
var util = __require("util");
|
|
4367
|
-
var
|
|
4367
|
+
var ansiStyles3 = colors.styles = require_styles();
|
|
4368
4368
|
var defineProps = Object.defineProperties;
|
|
4369
4369
|
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
4370
4370
|
colors.supportsColor = require_supports_colors().supportsColor;
|
|
@@ -4384,7 +4384,7 @@ var require_colors = __commonJS({
|
|
|
4384
4384
|
if (!colors.enabled) {
|
|
4385
4385
|
return str + "";
|
|
4386
4386
|
}
|
|
4387
|
-
var styleMap =
|
|
4387
|
+
var styleMap = ansiStyles3[style];
|
|
4388
4388
|
if (!styleMap && style in colors) {
|
|
4389
4389
|
return colors[style](str);
|
|
4390
4390
|
}
|
|
@@ -4405,11 +4405,11 @@ var require_colors = __commonJS({
|
|
|
4405
4405
|
builder.__proto__ = proto2;
|
|
4406
4406
|
return builder;
|
|
4407
4407
|
}
|
|
4408
|
-
var
|
|
4408
|
+
var styles4 = (function() {
|
|
4409
4409
|
var ret = {};
|
|
4410
|
-
|
|
4411
|
-
Object.keys(
|
|
4412
|
-
|
|
4410
|
+
ansiStyles3.grey = ansiStyles3.gray;
|
|
4411
|
+
Object.keys(ansiStyles3).forEach(function(key) {
|
|
4412
|
+
ansiStyles3[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles3[key].close), "g");
|
|
4413
4413
|
ret[key] = {
|
|
4414
4414
|
get: function() {
|
|
4415
4415
|
return build(this._styles.concat(key));
|
|
@@ -4419,7 +4419,7 @@ var require_colors = __commonJS({
|
|
|
4419
4419
|
return ret;
|
|
4420
4420
|
})();
|
|
4421
4421
|
var proto2 = defineProps(function colors2() {
|
|
4422
|
-
},
|
|
4422
|
+
}, styles4);
|
|
4423
4423
|
function applyStyle2() {
|
|
4424
4424
|
var args = Array.prototype.slice.call(arguments);
|
|
4425
4425
|
var str = args.map(function(arg) {
|
|
@@ -4436,7 +4436,7 @@ var require_colors = __commonJS({
|
|
|
4436
4436
|
var nestedStyles = this._styles;
|
|
4437
4437
|
var i = nestedStyles.length;
|
|
4438
4438
|
while (i--) {
|
|
4439
|
-
var code =
|
|
4439
|
+
var code = ansiStyles3[nestedStyles[i]];
|
|
4440
4440
|
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
4441
4441
|
if (newLinesPresent) {
|
|
4442
4442
|
str = str.replace(newLineRegex, function(match) {
|
|
@@ -4468,7 +4468,7 @@ var require_colors = __commonJS({
|
|
|
4468
4468
|
};
|
|
4469
4469
|
function init() {
|
|
4470
4470
|
var ret = {};
|
|
4471
|
-
Object.keys(
|
|
4471
|
+
Object.keys(styles4).forEach(function(name) {
|
|
4472
4472
|
ret[name] = {
|
|
4473
4473
|
get: function() {
|
|
4474
4474
|
return build([name]);
|
|
@@ -7750,6 +7750,27 @@ function parseApiError(body, status) {
|
|
|
7750
7750
|
requestId: typeof b.request_id === "string" ? b.request_id : "unknown"
|
|
7751
7751
|
});
|
|
7752
7752
|
}
|
|
7753
|
+
var CredentialsResource = class {
|
|
7754
|
+
constructor(api) {
|
|
7755
|
+
this.api = api;
|
|
7756
|
+
}
|
|
7757
|
+
api;
|
|
7758
|
+
async set(assetId, params) {
|
|
7759
|
+
return this.api.put(`v1/assets/${assetId}/credentials`, { json: params }).json();
|
|
7760
|
+
}
|
|
7761
|
+
async get(assetId) {
|
|
7762
|
+
return this.api.get(`v1/assets/${assetId}/credentials`).json();
|
|
7763
|
+
}
|
|
7764
|
+
async remove(assetId) {
|
|
7765
|
+
return this.api.delete(`v1/assets/${assetId}/credentials`).json();
|
|
7766
|
+
}
|
|
7767
|
+
async setTarget(assetId, params) {
|
|
7768
|
+
return this.api.put(`v1/assets/${assetId}/credentials/target`, { json: params }).json();
|
|
7769
|
+
}
|
|
7770
|
+
async removeTarget(assetId) {
|
|
7771
|
+
return this.api.delete(`v1/assets/${assetId}/credentials/target`).json();
|
|
7772
|
+
}
|
|
7773
|
+
};
|
|
7753
7774
|
var IDEMPOTENT_EXACT_PATHS = ["/v1/scans", "/v1/tokens"];
|
|
7754
7775
|
var IDEMPOTENT_SUFFIXES = ["/cancel", "/retest"];
|
|
7755
7776
|
function needsIdempotencyKey(method, path) {
|
|
@@ -7831,8 +7852,10 @@ var KinoSecClient = class {
|
|
|
7831
7852
|
var AssetsResource = class {
|
|
7832
7853
|
constructor(api) {
|
|
7833
7854
|
this.api = api;
|
|
7855
|
+
this.credentials = new CredentialsResource(api);
|
|
7834
7856
|
}
|
|
7835
7857
|
api;
|
|
7858
|
+
credentials;
|
|
7836
7859
|
async list(params = {}) {
|
|
7837
7860
|
return this.api.get("v1/assets", { searchParams: buildSearchParams(params) }).json();
|
|
7838
7861
|
}
|
|
@@ -7926,50 +7949,819 @@ var ReportsResource = class {
|
|
|
7926
7949
|
async list(params = {}) {
|
|
7927
7950
|
return this.api.get("v1/reports", { searchParams: buildSearchParams(params) }).json();
|
|
7928
7951
|
}
|
|
7929
|
-
async get(id) {
|
|
7930
|
-
return this.api.get(`v1/reports/${id}`).json();
|
|
7952
|
+
async get(id) {
|
|
7953
|
+
return this.api.get(`v1/reports/${id}`).json();
|
|
7954
|
+
}
|
|
7955
|
+
async export(params) {
|
|
7956
|
+
return this.api.post("v1/reports", { json: params }).json();
|
|
7957
|
+
}
|
|
7958
|
+
};
|
|
7959
|
+
var TokensResource = class {
|
|
7960
|
+
constructor(api) {
|
|
7961
|
+
this.api = api;
|
|
7962
|
+
}
|
|
7963
|
+
api;
|
|
7964
|
+
async list(params = {}) {
|
|
7965
|
+
return this.api.get("v1/tokens", { searchParams: buildSearchParams(params) }).json();
|
|
7966
|
+
}
|
|
7967
|
+
async create(params) {
|
|
7968
|
+
return this.api.post("v1/tokens", { json: params }).json();
|
|
7969
|
+
}
|
|
7970
|
+
async revoke(id) {
|
|
7971
|
+
await this.api.delete(`v1/tokens/${id}`);
|
|
7972
|
+
}
|
|
7973
|
+
};
|
|
7974
|
+
var MeResource = class {
|
|
7975
|
+
constructor(api) {
|
|
7976
|
+
this.api = api;
|
|
7977
|
+
}
|
|
7978
|
+
api;
|
|
7979
|
+
async get() {
|
|
7980
|
+
return this.api.get("v1/me").json();
|
|
7981
|
+
}
|
|
7982
|
+
};
|
|
7983
|
+
var AuditResource = class {
|
|
7984
|
+
constructor(api) {
|
|
7985
|
+
this.api = api;
|
|
7986
|
+
}
|
|
7987
|
+
api;
|
|
7988
|
+
async list(params = {}) {
|
|
7989
|
+
return this.api.get("v1/audit", { searchParams: buildSearchParams(params) }).json();
|
|
7990
|
+
}
|
|
7991
|
+
};
|
|
7992
|
+
|
|
7993
|
+
// src/lib/output.ts
|
|
7994
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
7995
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
7996
|
+
|
|
7997
|
+
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
7998
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
7999
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
8000
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
8001
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
8002
|
+
const pattern = `${osc}|${csi}`;
|
|
8003
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
8004
|
+
}
|
|
8005
|
+
|
|
8006
|
+
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
8007
|
+
var regex = ansiRegex();
|
|
8008
|
+
function stripAnsi(string) {
|
|
8009
|
+
if (typeof string !== "string") {
|
|
8010
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
8011
|
+
}
|
|
8012
|
+
if (!string.includes("\x1B") && !string.includes("\x9B")) {
|
|
8013
|
+
return string;
|
|
8014
|
+
}
|
|
8015
|
+
return string.replace(regex, "");
|
|
8016
|
+
}
|
|
8017
|
+
|
|
8018
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
8019
|
+
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
8020
|
+
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
8021
|
+
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
8022
|
+
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
8023
|
+
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
8024
|
+
|
|
8025
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
8026
|
+
var isInRange = (ranges, codePoint) => {
|
|
8027
|
+
let low = 0;
|
|
8028
|
+
let high = Math.floor(ranges.length / 2) - 1;
|
|
8029
|
+
while (low <= high) {
|
|
8030
|
+
const mid = Math.floor((low + high) / 2);
|
|
8031
|
+
const i = mid * 2;
|
|
8032
|
+
if (codePoint < ranges[i]) {
|
|
8033
|
+
high = mid - 1;
|
|
8034
|
+
} else if (codePoint > ranges[i + 1]) {
|
|
8035
|
+
low = mid + 1;
|
|
8036
|
+
} else {
|
|
8037
|
+
return true;
|
|
8038
|
+
}
|
|
8039
|
+
}
|
|
8040
|
+
return false;
|
|
8041
|
+
};
|
|
8042
|
+
|
|
8043
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
8044
|
+
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
8045
|
+
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
8046
|
+
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
8047
|
+
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
8048
|
+
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
8049
|
+
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
8050
|
+
var minimumNarrowCodePoint = narrowRanges[0];
|
|
8051
|
+
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
8052
|
+
var minimumWideCodePoint = wideRanges[0];
|
|
8053
|
+
var maximumWideCodePoint = wideRanges.at(-1);
|
|
8054
|
+
var commonCjkCodePoint = 19968;
|
|
8055
|
+
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
8056
|
+
function findWideFastPathRange(ranges) {
|
|
8057
|
+
let fastPathStart = ranges[0];
|
|
8058
|
+
let fastPathEnd = ranges[1];
|
|
8059
|
+
for (let index = 0; index < ranges.length; index += 2) {
|
|
8060
|
+
const start = ranges[index];
|
|
8061
|
+
const end = ranges[index + 1];
|
|
8062
|
+
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
8063
|
+
return [start, end];
|
|
8064
|
+
}
|
|
8065
|
+
if (end - start > fastPathEnd - fastPathStart) {
|
|
8066
|
+
fastPathStart = start;
|
|
8067
|
+
fastPathEnd = end;
|
|
8068
|
+
}
|
|
8069
|
+
}
|
|
8070
|
+
return [fastPathStart, fastPathEnd];
|
|
8071
|
+
}
|
|
8072
|
+
var isAmbiguous = (codePoint) => {
|
|
8073
|
+
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
8074
|
+
return false;
|
|
8075
|
+
}
|
|
8076
|
+
return isInRange(ambiguousRanges, codePoint);
|
|
8077
|
+
};
|
|
8078
|
+
var isFullWidth = (codePoint) => {
|
|
8079
|
+
if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
|
|
8080
|
+
return false;
|
|
8081
|
+
}
|
|
8082
|
+
return isInRange(fullwidthRanges, codePoint);
|
|
8083
|
+
};
|
|
8084
|
+
var isWide = (codePoint) => {
|
|
8085
|
+
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
8086
|
+
return true;
|
|
8087
|
+
}
|
|
8088
|
+
if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
|
|
8089
|
+
return false;
|
|
8090
|
+
}
|
|
8091
|
+
return isInRange(wideRanges, codePoint);
|
|
8092
|
+
};
|
|
8093
|
+
|
|
8094
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
8095
|
+
function validate2(codePoint) {
|
|
8096
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
8097
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
8098
|
+
}
|
|
8099
|
+
}
|
|
8100
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
8101
|
+
validate2(codePoint);
|
|
8102
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
8103
|
+
return 2;
|
|
8104
|
+
}
|
|
8105
|
+
return 1;
|
|
8106
|
+
}
|
|
8107
|
+
|
|
8108
|
+
// ../../node_modules/.pnpm/string-width@8.2.1/node_modules/string-width/index.js
|
|
8109
|
+
var segmenter = new Intl.Segmenter();
|
|
8110
|
+
var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
8111
|
+
var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
8112
|
+
var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
8113
|
+
var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
|
|
8114
|
+
var extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
|
|
8115
|
+
function isDoubleWidthNonRgiEmojiSequence(segment) {
|
|
8116
|
+
if (segment.length > 50) {
|
|
8117
|
+
return false;
|
|
8118
|
+
}
|
|
8119
|
+
if (unqualifiedKeycapRegex.test(segment)) {
|
|
8120
|
+
return true;
|
|
8121
|
+
}
|
|
8122
|
+
if (segment.includes("\u200D")) {
|
|
8123
|
+
const pictographics = segment.match(extendedPictographicRegex);
|
|
8124
|
+
return pictographics !== null && pictographics.length >= 2;
|
|
8125
|
+
}
|
|
8126
|
+
return false;
|
|
8127
|
+
}
|
|
8128
|
+
function baseVisible(segment) {
|
|
8129
|
+
return segment.replace(leadingNonPrintingRegex, "");
|
|
8130
|
+
}
|
|
8131
|
+
function isZeroWidthCluster(segment) {
|
|
8132
|
+
return zeroWidthClusterRegex.test(segment);
|
|
8133
|
+
}
|
|
8134
|
+
function isHangulLeadingJamo(codePoint) {
|
|
8135
|
+
return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
|
|
8136
|
+
}
|
|
8137
|
+
function isHangulVowelJamo(codePoint) {
|
|
8138
|
+
return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
|
|
8139
|
+
}
|
|
8140
|
+
function isHangulTrailingJamo(codePoint) {
|
|
8141
|
+
return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
|
|
8142
|
+
}
|
|
8143
|
+
function isHangulJamo(codePoint) {
|
|
8144
|
+
return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
|
|
8145
|
+
}
|
|
8146
|
+
function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
|
|
8147
|
+
const codePoints = [];
|
|
8148
|
+
for (const character of visibleSegment) {
|
|
8149
|
+
if (zeroWidthClusterRegex.test(character)) {
|
|
8150
|
+
continue;
|
|
8151
|
+
}
|
|
8152
|
+
codePoints.push(character.codePointAt(0));
|
|
8153
|
+
}
|
|
8154
|
+
if (codePoints.length === 0) {
|
|
8155
|
+
return void 0;
|
|
8156
|
+
}
|
|
8157
|
+
let width = 0;
|
|
8158
|
+
for (let index = 0; index < codePoints.length; index++) {
|
|
8159
|
+
const codePoint = codePoints[index];
|
|
8160
|
+
if (!isHangulJamo(codePoint)) {
|
|
8161
|
+
if (width === 0) {
|
|
8162
|
+
return void 0;
|
|
8163
|
+
}
|
|
8164
|
+
for (let remaining = index; remaining < codePoints.length; remaining++) {
|
|
8165
|
+
width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
|
|
8166
|
+
}
|
|
8167
|
+
return width;
|
|
8168
|
+
}
|
|
8169
|
+
if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
|
|
8170
|
+
width += 2;
|
|
8171
|
+
index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
|
|
8172
|
+
continue;
|
|
8173
|
+
}
|
|
8174
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
8175
|
+
}
|
|
8176
|
+
return width;
|
|
8177
|
+
}
|
|
8178
|
+
function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
|
|
8179
|
+
let extra = 0;
|
|
8180
|
+
let first = true;
|
|
8181
|
+
for (const character of visibleSegment) {
|
|
8182
|
+
if (first) {
|
|
8183
|
+
first = false;
|
|
8184
|
+
continue;
|
|
8185
|
+
}
|
|
8186
|
+
if (character >= "\uFF00" && character <= "\uFFEF") {
|
|
8187
|
+
extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8190
|
+
return extra;
|
|
8191
|
+
}
|
|
8192
|
+
function stringWidth(input, options = {}) {
|
|
8193
|
+
if (typeof input !== "string" || input.length === 0) {
|
|
8194
|
+
return 0;
|
|
8195
|
+
}
|
|
8196
|
+
const {
|
|
8197
|
+
ambiguousIsNarrow = true,
|
|
8198
|
+
countAnsiEscapeCodes = false
|
|
8199
|
+
} = options;
|
|
8200
|
+
let string = input;
|
|
8201
|
+
if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("\x9B"))) {
|
|
8202
|
+
string = stripAnsi(string);
|
|
8203
|
+
}
|
|
8204
|
+
if (string.length === 0) {
|
|
8205
|
+
return 0;
|
|
8206
|
+
}
|
|
8207
|
+
if (/^[\u0020-\u007E]*$/.test(string)) {
|
|
8208
|
+
return string.length;
|
|
8209
|
+
}
|
|
8210
|
+
let width = 0;
|
|
8211
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
8212
|
+
for (const { segment } of segmenter.segment(string)) {
|
|
8213
|
+
if (isZeroWidthCluster(segment)) {
|
|
8214
|
+
continue;
|
|
8215
|
+
}
|
|
8216
|
+
if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
|
|
8217
|
+
width += 2;
|
|
8218
|
+
continue;
|
|
8219
|
+
}
|
|
8220
|
+
const visibleSegment = baseVisible(segment);
|
|
8221
|
+
const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
|
|
8222
|
+
if (hangulWidth !== void 0) {
|
|
8223
|
+
width += hangulWidth;
|
|
8224
|
+
continue;
|
|
8225
|
+
}
|
|
8226
|
+
const codePoint = visibleSegment.codePointAt(0);
|
|
8227
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
8228
|
+
width += trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions);
|
|
8229
|
+
}
|
|
8230
|
+
return width;
|
|
8231
|
+
}
|
|
8232
|
+
|
|
8233
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
8234
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
8235
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
8236
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
8237
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
8238
|
+
var styles = {
|
|
8239
|
+
modifier: {
|
|
8240
|
+
reset: [0, 0],
|
|
8241
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
8242
|
+
bold: [1, 22],
|
|
8243
|
+
dim: [2, 22],
|
|
8244
|
+
italic: [3, 23],
|
|
8245
|
+
underline: [4, 24],
|
|
8246
|
+
overline: [53, 55],
|
|
8247
|
+
inverse: [7, 27],
|
|
8248
|
+
hidden: [8, 28],
|
|
8249
|
+
strikethrough: [9, 29]
|
|
8250
|
+
},
|
|
8251
|
+
color: {
|
|
8252
|
+
black: [30, 39],
|
|
8253
|
+
red: [31, 39],
|
|
8254
|
+
green: [32, 39],
|
|
8255
|
+
yellow: [33, 39],
|
|
8256
|
+
blue: [34, 39],
|
|
8257
|
+
magenta: [35, 39],
|
|
8258
|
+
cyan: [36, 39],
|
|
8259
|
+
white: [37, 39],
|
|
8260
|
+
// Bright color
|
|
8261
|
+
blackBright: [90, 39],
|
|
8262
|
+
gray: [90, 39],
|
|
8263
|
+
// Alias of `blackBright`
|
|
8264
|
+
grey: [90, 39],
|
|
8265
|
+
// Alias of `blackBright`
|
|
8266
|
+
redBright: [91, 39],
|
|
8267
|
+
greenBright: [92, 39],
|
|
8268
|
+
yellowBright: [93, 39],
|
|
8269
|
+
blueBright: [94, 39],
|
|
8270
|
+
magentaBright: [95, 39],
|
|
8271
|
+
cyanBright: [96, 39],
|
|
8272
|
+
whiteBright: [97, 39]
|
|
8273
|
+
},
|
|
8274
|
+
bgColor: {
|
|
8275
|
+
bgBlack: [40, 49],
|
|
8276
|
+
bgRed: [41, 49],
|
|
8277
|
+
bgGreen: [42, 49],
|
|
8278
|
+
bgYellow: [43, 49],
|
|
8279
|
+
bgBlue: [44, 49],
|
|
8280
|
+
bgMagenta: [45, 49],
|
|
8281
|
+
bgCyan: [46, 49],
|
|
8282
|
+
bgWhite: [47, 49],
|
|
8283
|
+
// Bright color
|
|
8284
|
+
bgBlackBright: [100, 49],
|
|
8285
|
+
bgGray: [100, 49],
|
|
8286
|
+
// Alias of `bgBlackBright`
|
|
8287
|
+
bgGrey: [100, 49],
|
|
8288
|
+
// Alias of `bgBlackBright`
|
|
8289
|
+
bgRedBright: [101, 49],
|
|
8290
|
+
bgGreenBright: [102, 49],
|
|
8291
|
+
bgYellowBright: [103, 49],
|
|
8292
|
+
bgBlueBright: [104, 49],
|
|
8293
|
+
bgMagentaBright: [105, 49],
|
|
8294
|
+
bgCyanBright: [106, 49],
|
|
8295
|
+
bgWhiteBright: [107, 49]
|
|
8296
|
+
}
|
|
8297
|
+
};
|
|
8298
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
8299
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
8300
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
8301
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
8302
|
+
function assembleStyles() {
|
|
8303
|
+
const codes = /* @__PURE__ */ new Map();
|
|
8304
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
8305
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
8306
|
+
styles[styleName] = {
|
|
8307
|
+
open: `\x1B[${style[0]}m`,
|
|
8308
|
+
close: `\x1B[${style[1]}m`
|
|
8309
|
+
};
|
|
8310
|
+
group[styleName] = styles[styleName];
|
|
8311
|
+
codes.set(style[0], style[1]);
|
|
8312
|
+
}
|
|
8313
|
+
Object.defineProperty(styles, groupName, {
|
|
8314
|
+
value: group,
|
|
8315
|
+
enumerable: false
|
|
8316
|
+
});
|
|
8317
|
+
}
|
|
8318
|
+
Object.defineProperty(styles, "codes", {
|
|
8319
|
+
value: codes,
|
|
8320
|
+
enumerable: false
|
|
8321
|
+
});
|
|
8322
|
+
styles.color.close = "\x1B[39m";
|
|
8323
|
+
styles.bgColor.close = "\x1B[49m";
|
|
8324
|
+
styles.color.ansi = wrapAnsi16();
|
|
8325
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
8326
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
8327
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
8328
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
8329
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
8330
|
+
Object.defineProperties(styles, {
|
|
8331
|
+
rgbToAnsi256: {
|
|
8332
|
+
value(red, green, blue) {
|
|
8333
|
+
if (red === green && green === blue) {
|
|
8334
|
+
if (red < 8) {
|
|
8335
|
+
return 16;
|
|
8336
|
+
}
|
|
8337
|
+
if (red > 248) {
|
|
8338
|
+
return 231;
|
|
8339
|
+
}
|
|
8340
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
8341
|
+
}
|
|
8342
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
8343
|
+
},
|
|
8344
|
+
enumerable: false
|
|
8345
|
+
},
|
|
8346
|
+
hexToRgb: {
|
|
8347
|
+
value(hex) {
|
|
8348
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
8349
|
+
if (!matches) {
|
|
8350
|
+
return [0, 0, 0];
|
|
8351
|
+
}
|
|
8352
|
+
let [colorString] = matches;
|
|
8353
|
+
if (colorString.length === 3) {
|
|
8354
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
8355
|
+
}
|
|
8356
|
+
const integer = Number.parseInt(colorString, 16);
|
|
8357
|
+
return [
|
|
8358
|
+
/* eslint-disable no-bitwise */
|
|
8359
|
+
integer >> 16 & 255,
|
|
8360
|
+
integer >> 8 & 255,
|
|
8361
|
+
integer & 255
|
|
8362
|
+
/* eslint-enable no-bitwise */
|
|
8363
|
+
];
|
|
8364
|
+
},
|
|
8365
|
+
enumerable: false
|
|
8366
|
+
},
|
|
8367
|
+
hexToAnsi256: {
|
|
8368
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
8369
|
+
enumerable: false
|
|
8370
|
+
},
|
|
8371
|
+
ansi256ToAnsi: {
|
|
8372
|
+
value(code) {
|
|
8373
|
+
if (code < 8) {
|
|
8374
|
+
return 30 + code;
|
|
8375
|
+
}
|
|
8376
|
+
if (code < 16) {
|
|
8377
|
+
return 90 + (code - 8);
|
|
8378
|
+
}
|
|
8379
|
+
let red;
|
|
8380
|
+
let green;
|
|
8381
|
+
let blue;
|
|
8382
|
+
if (code >= 232) {
|
|
8383
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
8384
|
+
green = red;
|
|
8385
|
+
blue = red;
|
|
8386
|
+
} else {
|
|
8387
|
+
code -= 16;
|
|
8388
|
+
const remainder = code % 36;
|
|
8389
|
+
red = Math.floor(code / 36) / 5;
|
|
8390
|
+
green = Math.floor(remainder / 6) / 5;
|
|
8391
|
+
blue = remainder % 6 / 5;
|
|
8392
|
+
}
|
|
8393
|
+
const value = Math.max(red, green, blue) * 2;
|
|
8394
|
+
if (value === 0) {
|
|
8395
|
+
return 30;
|
|
8396
|
+
}
|
|
8397
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
8398
|
+
if (value === 2) {
|
|
8399
|
+
result += 60;
|
|
8400
|
+
}
|
|
8401
|
+
return result;
|
|
8402
|
+
},
|
|
8403
|
+
enumerable: false
|
|
8404
|
+
},
|
|
8405
|
+
rgbToAnsi: {
|
|
8406
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
8407
|
+
enumerable: false
|
|
8408
|
+
},
|
|
8409
|
+
hexToAnsi: {
|
|
8410
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
8411
|
+
enumerable: false
|
|
8412
|
+
}
|
|
8413
|
+
});
|
|
8414
|
+
return styles;
|
|
8415
|
+
}
|
|
8416
|
+
var ansiStyles = assembleStyles();
|
|
8417
|
+
var ansi_styles_default = ansiStyles;
|
|
8418
|
+
|
|
8419
|
+
// ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
|
|
8420
|
+
var ANSI_ESCAPE = "\x1B";
|
|
8421
|
+
var ANSI_ESCAPE_CSI = "\x9B";
|
|
8422
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
8423
|
+
ANSI_ESCAPE,
|
|
8424
|
+
ANSI_ESCAPE_CSI
|
|
8425
|
+
]);
|
|
8426
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
8427
|
+
var ANSI_CSI = "[";
|
|
8428
|
+
var ANSI_OSC = "]";
|
|
8429
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
8430
|
+
var ANSI_SGR_RESET = 0;
|
|
8431
|
+
var ANSI_SGR_RESET_FOREGROUND = 39;
|
|
8432
|
+
var ANSI_SGR_RESET_BACKGROUND = 49;
|
|
8433
|
+
var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
|
|
8434
|
+
var ANSI_SGR_FOREGROUND_EXTENDED = 38;
|
|
8435
|
+
var ANSI_SGR_BACKGROUND_EXTENDED = 48;
|
|
8436
|
+
var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
|
|
8437
|
+
var ANSI_SGR_COLOR_MODE_256 = 5;
|
|
8438
|
+
var ANSI_SGR_COLOR_MODE_RGB = 2;
|
|
8439
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
8440
|
+
var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}|${ANSI_ESCAPE_LINK}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
|
|
8441
|
+
var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}`);
|
|
8442
|
+
var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
|
|
8443
|
+
ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
|
|
8444
|
+
var segmenter2 = new Intl.Segmenter();
|
|
8445
|
+
var getGraphemes = (string) => Array.from(segmenter2.segment(string), ({ segment }) => segment);
|
|
8446
|
+
var TAB_SIZE = 8;
|
|
8447
|
+
var wrapAnsiCode = (code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
8448
|
+
var wrapAnsiHyperlink = (url) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
8449
|
+
var getSgrTokens = (sgrParameters) => {
|
|
8450
|
+
const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
|
|
8451
|
+
const sgrTokens = [];
|
|
8452
|
+
for (let index = 0; index < codes.length; index++) {
|
|
8453
|
+
const code = codes[index];
|
|
8454
|
+
if (!Number.isFinite(code)) {
|
|
8455
|
+
continue;
|
|
8456
|
+
}
|
|
8457
|
+
if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
|
|
8458
|
+
if (index + 1 >= codes.length) {
|
|
8459
|
+
break;
|
|
8460
|
+
}
|
|
8461
|
+
const mode = codes[index + 1];
|
|
8462
|
+
if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
|
|
8463
|
+
sgrTokens.push([code, mode, codes[index + 2]]);
|
|
8464
|
+
index += 2;
|
|
8465
|
+
continue;
|
|
8466
|
+
}
|
|
8467
|
+
const red = codes[index + 2];
|
|
8468
|
+
const green = codes[index + 3];
|
|
8469
|
+
const blue = codes[index + 4];
|
|
8470
|
+
if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
|
|
8471
|
+
sgrTokens.push([code, mode, red, green, blue]);
|
|
8472
|
+
index += 4;
|
|
8473
|
+
continue;
|
|
8474
|
+
}
|
|
8475
|
+
break;
|
|
8476
|
+
}
|
|
8477
|
+
sgrTokens.push([code]);
|
|
8478
|
+
}
|
|
8479
|
+
return sgrTokens;
|
|
8480
|
+
};
|
|
8481
|
+
var removeActiveStyle = (activeStyles, family) => {
|
|
8482
|
+
const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
|
|
8483
|
+
if (activeStyleIndex !== -1) {
|
|
8484
|
+
activeStyles.splice(activeStyleIndex, 1);
|
|
8485
|
+
}
|
|
8486
|
+
};
|
|
8487
|
+
var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
|
|
8488
|
+
removeActiveStyle(activeStyles, nextActiveStyle.family);
|
|
8489
|
+
activeStyles.push(nextActiveStyle);
|
|
8490
|
+
};
|
|
8491
|
+
var removeModifierStylesByClose = (activeStyles, closeCode) => {
|
|
8492
|
+
for (let index = activeStyles.length - 1; index >= 0; index--) {
|
|
8493
|
+
const activeStyle = activeStyles[index];
|
|
8494
|
+
if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
|
|
8495
|
+
activeStyles.splice(index, 1);
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
};
|
|
8499
|
+
var getColorStyle = (code, sgrToken) => {
|
|
8500
|
+
if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
|
|
8501
|
+
return {
|
|
8502
|
+
family: "foreground",
|
|
8503
|
+
open: sgrToken.join(";"),
|
|
8504
|
+
close: ANSI_SGR_RESET_FOREGROUND
|
|
8505
|
+
};
|
|
8506
|
+
}
|
|
8507
|
+
if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
|
|
8508
|
+
return {
|
|
8509
|
+
family: "background",
|
|
8510
|
+
open: sgrToken.join(";"),
|
|
8511
|
+
close: ANSI_SGR_RESET_BACKGROUND
|
|
8512
|
+
};
|
|
8513
|
+
}
|
|
8514
|
+
if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
|
|
8515
|
+
return {
|
|
8516
|
+
family: "underlineColor",
|
|
8517
|
+
open: sgrToken.join(";"),
|
|
8518
|
+
close: ANSI_SGR_RESET_UNDERLINE_COLOR
|
|
8519
|
+
};
|
|
8520
|
+
}
|
|
8521
|
+
};
|
|
8522
|
+
var applySgrResetCode = (code, activeStyles) => {
|
|
8523
|
+
if (code === ANSI_SGR_RESET) {
|
|
8524
|
+
activeStyles.length = 0;
|
|
8525
|
+
return true;
|
|
8526
|
+
}
|
|
8527
|
+
if (code === ANSI_SGR_RESET_FOREGROUND) {
|
|
8528
|
+
removeActiveStyle(activeStyles, "foreground");
|
|
8529
|
+
return true;
|
|
8530
|
+
}
|
|
8531
|
+
if (code === ANSI_SGR_RESET_BACKGROUND) {
|
|
8532
|
+
removeActiveStyle(activeStyles, "background");
|
|
8533
|
+
return true;
|
|
8534
|
+
}
|
|
8535
|
+
if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
|
|
8536
|
+
removeActiveStyle(activeStyles, "underlineColor");
|
|
8537
|
+
return true;
|
|
8538
|
+
}
|
|
8539
|
+
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
|
|
8540
|
+
removeModifierStylesByClose(activeStyles, code);
|
|
8541
|
+
return true;
|
|
8542
|
+
}
|
|
8543
|
+
return false;
|
|
8544
|
+
};
|
|
8545
|
+
var applySgrToken = (sgrToken, activeStyles) => {
|
|
8546
|
+
const [code] = sgrToken;
|
|
8547
|
+
if (applySgrResetCode(code, activeStyles)) {
|
|
8548
|
+
return;
|
|
8549
|
+
}
|
|
8550
|
+
const colorStyle = getColorStyle(code, sgrToken);
|
|
8551
|
+
if (colorStyle) {
|
|
8552
|
+
upsertActiveStyle(activeStyles, colorStyle);
|
|
8553
|
+
return;
|
|
8554
|
+
}
|
|
8555
|
+
const close = ansi_styles_default.codes.get(code);
|
|
8556
|
+
if (close !== void 0 && close !== ANSI_SGR_RESET) {
|
|
8557
|
+
upsertActiveStyle(activeStyles, {
|
|
8558
|
+
family: `modifier-${code}`,
|
|
8559
|
+
open: sgrToken.join(";"),
|
|
8560
|
+
close
|
|
8561
|
+
});
|
|
7931
8562
|
}
|
|
7932
|
-
|
|
7933
|
-
|
|
8563
|
+
};
|
|
8564
|
+
var applySgrParameters = (sgrParameters, activeStyles) => {
|
|
8565
|
+
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
8566
|
+
applySgrToken(sgrToken, activeStyles);
|
|
7934
8567
|
}
|
|
7935
8568
|
};
|
|
7936
|
-
var
|
|
7937
|
-
|
|
7938
|
-
|
|
8569
|
+
var applySgrResets = (sgrParameters, activeStyles) => {
|
|
8570
|
+
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
8571
|
+
const [code] = sgrToken;
|
|
8572
|
+
applySgrResetCode(code, activeStyles);
|
|
7939
8573
|
}
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
8574
|
+
};
|
|
8575
|
+
var applyLeadingSgrResets = (string, activeStyles) => {
|
|
8576
|
+
let remainder = string;
|
|
8577
|
+
while (remainder.length > 0) {
|
|
8578
|
+
if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
|
|
8579
|
+
const match = ANSI_ESCAPE_REGEX.exec(remainder);
|
|
8580
|
+
if (!match) {
|
|
8581
|
+
break;
|
|
8582
|
+
}
|
|
8583
|
+
if (match.groups.sgr !== void 0) {
|
|
8584
|
+
applySgrResets(match.groups.sgr, activeStyles);
|
|
8585
|
+
}
|
|
8586
|
+
remainder = remainder.slice(match[0].length);
|
|
8587
|
+
continue;
|
|
8588
|
+
}
|
|
8589
|
+
if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
|
|
8590
|
+
const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
|
|
8591
|
+
if (!match || match.groups.sgr === void 0) {
|
|
8592
|
+
break;
|
|
8593
|
+
}
|
|
8594
|
+
applySgrResets(match.groups.sgr, activeStyles);
|
|
8595
|
+
remainder = remainder.slice(match[0].length);
|
|
8596
|
+
continue;
|
|
8597
|
+
}
|
|
8598
|
+
break;
|
|
7943
8599
|
}
|
|
7944
|
-
|
|
7945
|
-
|
|
8600
|
+
};
|
|
8601
|
+
var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join("");
|
|
8602
|
+
var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join("");
|
|
8603
|
+
var wordLengths = (string) => string.split(" ").map((word) => stringWidth(word));
|
|
8604
|
+
var wrapWord = (rows, word, columns) => {
|
|
8605
|
+
const characters = getGraphemes(word);
|
|
8606
|
+
let isInsideEscape = false;
|
|
8607
|
+
let isInsideLinkEscape = false;
|
|
8608
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
8609
|
+
for (const [index, character] of characters.entries()) {
|
|
8610
|
+
const characterLength = stringWidth(character);
|
|
8611
|
+
if (visible + characterLength <= columns) {
|
|
8612
|
+
rows[rows.length - 1] += character;
|
|
8613
|
+
} else {
|
|
8614
|
+
rows.push(character);
|
|
8615
|
+
visible = 0;
|
|
8616
|
+
}
|
|
8617
|
+
if (ESCAPES.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
|
|
8618
|
+
isInsideEscape = true;
|
|
8619
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
8620
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
8621
|
+
}
|
|
8622
|
+
if (isInsideEscape) {
|
|
8623
|
+
if (isInsideLinkEscape) {
|
|
8624
|
+
if (character === ANSI_ESCAPE_BELL || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
|
|
8625
|
+
isInsideEscape = false;
|
|
8626
|
+
isInsideLinkEscape = false;
|
|
8627
|
+
}
|
|
8628
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
8629
|
+
isInsideEscape = false;
|
|
8630
|
+
}
|
|
8631
|
+
continue;
|
|
8632
|
+
}
|
|
8633
|
+
visible += characterLength;
|
|
8634
|
+
if (visible === columns && index < characters.length - 1) {
|
|
8635
|
+
rows.push("");
|
|
8636
|
+
visible = 0;
|
|
8637
|
+
}
|
|
7946
8638
|
}
|
|
7947
|
-
|
|
7948
|
-
|
|
8639
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
8640
|
+
rows[rows.length - 2] += rows.pop();
|
|
7949
8641
|
}
|
|
7950
8642
|
};
|
|
7951
|
-
var
|
|
7952
|
-
|
|
7953
|
-
|
|
8643
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
8644
|
+
const words = string.split(" ");
|
|
8645
|
+
let last = words.length;
|
|
8646
|
+
while (last > 0) {
|
|
8647
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
8648
|
+
break;
|
|
8649
|
+
}
|
|
8650
|
+
last--;
|
|
7954
8651
|
}
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
return this.api.get("v1/me").json();
|
|
8652
|
+
if (last === words.length) {
|
|
8653
|
+
return string;
|
|
7958
8654
|
}
|
|
8655
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
7959
8656
|
};
|
|
7960
|
-
var
|
|
7961
|
-
|
|
7962
|
-
|
|
8657
|
+
var expandTabs = (line) => {
|
|
8658
|
+
if (!line.includes(" ")) {
|
|
8659
|
+
return line;
|
|
8660
|
+
}
|
|
8661
|
+
const segments = line.split(" ");
|
|
8662
|
+
let visible = 0;
|
|
8663
|
+
let expandedLine = "";
|
|
8664
|
+
for (const [index, segment] of segments.entries()) {
|
|
8665
|
+
expandedLine += segment;
|
|
8666
|
+
visible += stringWidth(segment);
|
|
8667
|
+
if (index < segments.length - 1) {
|
|
8668
|
+
const spaces = TAB_SIZE - visible % TAB_SIZE;
|
|
8669
|
+
expandedLine += " ".repeat(spaces);
|
|
8670
|
+
visible += spaces;
|
|
8671
|
+
}
|
|
8672
|
+
}
|
|
8673
|
+
return expandedLine;
|
|
8674
|
+
};
|
|
8675
|
+
var exec = (string, columns, options = {}) => {
|
|
8676
|
+
if (options.trim !== false && string.trim() === "") {
|
|
8677
|
+
return "";
|
|
7963
8678
|
}
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
8679
|
+
let returnValue = "";
|
|
8680
|
+
let escapeUrl;
|
|
8681
|
+
const activeStyles = [];
|
|
8682
|
+
const lengths = wordLengths(string);
|
|
8683
|
+
let rows = [""];
|
|
8684
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
8685
|
+
if (options.trim !== false) {
|
|
8686
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
8687
|
+
}
|
|
8688
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
8689
|
+
if (index !== 0) {
|
|
8690
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
8691
|
+
rows.push("");
|
|
8692
|
+
rowLength = 0;
|
|
8693
|
+
}
|
|
8694
|
+
if (rowLength > 0 || options.trim === false) {
|
|
8695
|
+
rows[rows.length - 1] += " ";
|
|
8696
|
+
rowLength++;
|
|
8697
|
+
}
|
|
8698
|
+
}
|
|
8699
|
+
if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
|
|
8700
|
+
const remainingColumns = columns - rowLength;
|
|
8701
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
8702
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
8703
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
8704
|
+
rows.push("");
|
|
8705
|
+
}
|
|
8706
|
+
wrapWord(rows, word, columns);
|
|
8707
|
+
continue;
|
|
8708
|
+
}
|
|
8709
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
8710
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
8711
|
+
wrapWord(rows, word, columns);
|
|
8712
|
+
continue;
|
|
8713
|
+
}
|
|
8714
|
+
rows.push("");
|
|
8715
|
+
}
|
|
8716
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
8717
|
+
wrapWord(rows, word, columns);
|
|
8718
|
+
continue;
|
|
8719
|
+
}
|
|
8720
|
+
rows[rows.length - 1] += word;
|
|
8721
|
+
}
|
|
8722
|
+
if (options.trim !== false) {
|
|
8723
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
8724
|
+
}
|
|
8725
|
+
const preString = rows.join("\n");
|
|
8726
|
+
const pre = getGraphemes(preString);
|
|
8727
|
+
let preStringIndex = 0;
|
|
8728
|
+
for (const [index, character] of pre.entries()) {
|
|
8729
|
+
returnValue += character;
|
|
8730
|
+
if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
|
|
8731
|
+
const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
8732
|
+
if (groups.sgr !== void 0) {
|
|
8733
|
+
applySgrParameters(groups.sgr, activeStyles);
|
|
8734
|
+
} else if (groups.uri !== void 0) {
|
|
8735
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
8736
|
+
}
|
|
8737
|
+
} else if (character === ANSI_ESCAPE_CSI) {
|
|
8738
|
+
const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
8739
|
+
if (groups.sgr !== void 0) {
|
|
8740
|
+
applySgrParameters(groups.sgr, activeStyles);
|
|
8741
|
+
}
|
|
8742
|
+
}
|
|
8743
|
+
if (pre[index + 1] === "\n") {
|
|
8744
|
+
if (escapeUrl) {
|
|
8745
|
+
returnValue += wrapAnsiHyperlink("");
|
|
8746
|
+
}
|
|
8747
|
+
returnValue += getClosingSgrSequence(activeStyles);
|
|
8748
|
+
} else if (character === "\n") {
|
|
8749
|
+
const openingStyles = [...activeStyles];
|
|
8750
|
+
applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
|
|
8751
|
+
returnValue += getOpeningSgrSequence(openingStyles);
|
|
8752
|
+
if (escapeUrl) {
|
|
8753
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
8754
|
+
}
|
|
8755
|
+
}
|
|
8756
|
+
preStringIndex += character.length;
|
|
7967
8757
|
}
|
|
8758
|
+
return returnValue;
|
|
7968
8759
|
};
|
|
8760
|
+
function wrapAnsi(string, columns, options) {
|
|
8761
|
+
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
|
|
8762
|
+
}
|
|
7969
8763
|
|
|
7970
8764
|
// src/lib/output.ts
|
|
7971
|
-
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
7972
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
7973
8765
|
function isTTY() {
|
|
7974
8766
|
return Boolean(process.stdout.isTTY) && !process.env.CI && !process.env.NO_COLOR;
|
|
7975
8767
|
}
|
|
@@ -8004,6 +8796,73 @@ function truncate(str, maxLen) {
|
|
|
8004
8796
|
if (str.length <= maxLen) return str;
|
|
8005
8797
|
return str.slice(0, maxLen - 1) + "\u2026";
|
|
8006
8798
|
}
|
|
8799
|
+
function severityColor(level) {
|
|
8800
|
+
if (!isTTY()) return level;
|
|
8801
|
+
switch (level.toLowerCase()) {
|
|
8802
|
+
case "critical":
|
|
8803
|
+
return import_picocolors.default.red(import_picocolors.default.bold(level));
|
|
8804
|
+
case "high":
|
|
8805
|
+
return import_picocolors.default.yellow(level);
|
|
8806
|
+
case "medium":
|
|
8807
|
+
return import_picocolors.default.dim(import_picocolors.default.yellow(level));
|
|
8808
|
+
case "low":
|
|
8809
|
+
return import_picocolors.default.green(level);
|
|
8810
|
+
case "info":
|
|
8811
|
+
return import_picocolors.default.cyan(level);
|
|
8812
|
+
default:
|
|
8813
|
+
return level;
|
|
8814
|
+
}
|
|
8815
|
+
}
|
|
8816
|
+
function getSeverityCount(counts, level) {
|
|
8817
|
+
if (!counts) return 0;
|
|
8818
|
+
const key = Object.keys(counts).find((k) => k.toLowerCase() === level);
|
|
8819
|
+
return key ? counts[key] : 0;
|
|
8820
|
+
}
|
|
8821
|
+
function formatFindings(counts) {
|
|
8822
|
+
const c = getSeverityCount(counts, "critical");
|
|
8823
|
+
const h = getSeverityCount(counts, "high");
|
|
8824
|
+
const m = getSeverityCount(counts, "medium");
|
|
8825
|
+
const l = getSeverityCount(counts, "low");
|
|
8826
|
+
const i = getSeverityCount(counts, "info");
|
|
8827
|
+
if (!isTTY()) return `${c}C ${h}H ${m}M ${l}L ${i}I`;
|
|
8828
|
+
return [
|
|
8829
|
+
import_picocolors.default.red(import_picocolors.default.bold(`${c}C`)),
|
|
8830
|
+
import_picocolors.default.yellow(`${h}H`),
|
|
8831
|
+
import_picocolors.default.dim(import_picocolors.default.yellow(`${m}M`)),
|
|
8832
|
+
import_picocolors.default.green(`${l}L`),
|
|
8833
|
+
import_picocolors.default.cyan(`${i}I`)
|
|
8834
|
+
].join(" ");
|
|
8835
|
+
}
|
|
8836
|
+
function printDetail(fields, sections) {
|
|
8837
|
+
const tty2 = isTTY();
|
|
8838
|
+
const cols = process.stdout.columns ?? 80;
|
|
8839
|
+
const width = tty2 ? Math.min(cols, 100) : Infinity;
|
|
8840
|
+
const indent = " ";
|
|
8841
|
+
const maxLabelLen = Math.max(...fields.map((f) => f.label.length));
|
|
8842
|
+
const padLen = maxLabelLen + 1;
|
|
8843
|
+
for (const { label, value } of fields) {
|
|
8844
|
+
const coloredLabel = tty2 ? import_picocolors.default.dim(`${label}:`.padEnd(padLen)) : `${label}:`.padEnd(padLen);
|
|
8845
|
+
console.log(`${coloredLabel} ${value}`);
|
|
8846
|
+
}
|
|
8847
|
+
if (!sections) return;
|
|
8848
|
+
for (const { title, body } of sections) {
|
|
8849
|
+
if (!body?.trim()) continue;
|
|
8850
|
+
const underline = "\u2500".repeat(title.length);
|
|
8851
|
+
const header = tty2 ? import_picocolors.default.bold(title) : title;
|
|
8852
|
+
const separator = tty2 ? import_picocolors.default.dim(underline) : underline;
|
|
8853
|
+
let content;
|
|
8854
|
+
if (width === Infinity) {
|
|
8855
|
+
content = body.trim().split("\n").map((line) => indent + line).join("\n");
|
|
8856
|
+
} else {
|
|
8857
|
+
const wrapped = wrapAnsi(body.trim(), width - indent.length, { hard: true, trim: false });
|
|
8858
|
+
content = wrapped.split("\n").map((line) => indent + line).join("\n");
|
|
8859
|
+
}
|
|
8860
|
+
console.log(`
|
|
8861
|
+
${header}
|
|
8862
|
+
${separator}
|
|
8863
|
+
${content}`);
|
|
8864
|
+
}
|
|
8865
|
+
}
|
|
8007
8866
|
|
|
8008
8867
|
// src/lib/errors.ts
|
|
8009
8868
|
function handleError(error) {
|
|
@@ -8409,17 +9268,15 @@ Examples:
|
|
|
8409
9268
|
printJson(me);
|
|
8410
9269
|
return;
|
|
8411
9270
|
}
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
]
|
|
8422
|
-
);
|
|
9271
|
+
printDetail([
|
|
9272
|
+
{ label: "User ID", value: `\u2026${me.user.id.slice(-8)}` },
|
|
9273
|
+
{ label: "Email", value: me.user.email ?? "(not set)" },
|
|
9274
|
+
{ label: "Plan", value: `${me.plan.tier} (${me.plan.slug})` },
|
|
9275
|
+
{ label: "Org", value: me.org ? me.org.name ?? me.org.id : "(none)" },
|
|
9276
|
+
{ label: "Auth Type", value: me.auth_type },
|
|
9277
|
+
{ label: "Token ID", value: `\u2026${me.token_id.slice(-8)}` },
|
|
9278
|
+
{ label: "Scopes", value: me.scopes.length > 0 ? me.scopes.join(", ") : "(all \u2014 session)" }
|
|
9279
|
+
]);
|
|
8423
9280
|
} catch (error) {
|
|
8424
9281
|
handleError(error);
|
|
8425
9282
|
}
|
|
@@ -8430,11 +9287,11 @@ Examples:
|
|
|
8430
9287
|
import process9 from "process";
|
|
8431
9288
|
|
|
8432
9289
|
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
8433
|
-
var
|
|
8434
|
-
var
|
|
8435
|
-
var
|
|
8436
|
-
var
|
|
8437
|
-
var
|
|
9290
|
+
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
9291
|
+
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
9292
|
+
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
9293
|
+
var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
9294
|
+
var styles2 = {
|
|
8438
9295
|
modifier: {
|
|
8439
9296
|
reset: [0, 0],
|
|
8440
9297
|
// 21 isn't widely supported and 22 does the same thing
|
|
@@ -8494,39 +9351,39 @@ var styles = {
|
|
|
8494
9351
|
bgWhiteBright: [107, 49]
|
|
8495
9352
|
}
|
|
8496
9353
|
};
|
|
8497
|
-
var
|
|
8498
|
-
var
|
|
8499
|
-
var
|
|
8500
|
-
var
|
|
8501
|
-
function
|
|
9354
|
+
var modifierNames2 = Object.keys(styles2.modifier);
|
|
9355
|
+
var foregroundColorNames2 = Object.keys(styles2.color);
|
|
9356
|
+
var backgroundColorNames2 = Object.keys(styles2.bgColor);
|
|
9357
|
+
var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
9358
|
+
function assembleStyles2() {
|
|
8502
9359
|
const codes = /* @__PURE__ */ new Map();
|
|
8503
|
-
for (const [groupName, group] of Object.entries(
|
|
9360
|
+
for (const [groupName, group] of Object.entries(styles2)) {
|
|
8504
9361
|
for (const [styleName, style] of Object.entries(group)) {
|
|
8505
|
-
|
|
9362
|
+
styles2[styleName] = {
|
|
8506
9363
|
open: `\x1B[${style[0]}m`,
|
|
8507
9364
|
close: `\x1B[${style[1]}m`
|
|
8508
9365
|
};
|
|
8509
|
-
group[styleName] =
|
|
9366
|
+
group[styleName] = styles2[styleName];
|
|
8510
9367
|
codes.set(style[0], style[1]);
|
|
8511
9368
|
}
|
|
8512
|
-
Object.defineProperty(
|
|
9369
|
+
Object.defineProperty(styles2, groupName, {
|
|
8513
9370
|
value: group,
|
|
8514
9371
|
enumerable: false
|
|
8515
9372
|
});
|
|
8516
9373
|
}
|
|
8517
|
-
Object.defineProperty(
|
|
9374
|
+
Object.defineProperty(styles2, "codes", {
|
|
8518
9375
|
value: codes,
|
|
8519
9376
|
enumerable: false
|
|
8520
9377
|
});
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
Object.defineProperties(
|
|
9378
|
+
styles2.color.close = "\x1B[39m";
|
|
9379
|
+
styles2.bgColor.close = "\x1B[49m";
|
|
9380
|
+
styles2.color.ansi = wrapAnsi162();
|
|
9381
|
+
styles2.color.ansi256 = wrapAnsi2562();
|
|
9382
|
+
styles2.color.ansi16m = wrapAnsi16m2();
|
|
9383
|
+
styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
|
|
9384
|
+
styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
|
|
9385
|
+
styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
|
|
9386
|
+
Object.defineProperties(styles2, {
|
|
8530
9387
|
rgbToAnsi256: {
|
|
8531
9388
|
value(red, green, blue) {
|
|
8532
9389
|
if (red === green && green === blue) {
|
|
@@ -8564,7 +9421,7 @@ function assembleStyles() {
|
|
|
8564
9421
|
enumerable: false
|
|
8565
9422
|
},
|
|
8566
9423
|
hexToAnsi256: {
|
|
8567
|
-
value: (hex) =>
|
|
9424
|
+
value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
|
|
8568
9425
|
enumerable: false
|
|
8569
9426
|
},
|
|
8570
9427
|
ansi256ToAnsi: {
|
|
@@ -8602,18 +9459,18 @@ function assembleStyles() {
|
|
|
8602
9459
|
enumerable: false
|
|
8603
9460
|
},
|
|
8604
9461
|
rgbToAnsi: {
|
|
8605
|
-
value: (red, green, blue) =>
|
|
9462
|
+
value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
|
|
8606
9463
|
enumerable: false
|
|
8607
9464
|
},
|
|
8608
9465
|
hexToAnsi: {
|
|
8609
|
-
value: (hex) =>
|
|
9466
|
+
value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
|
|
8610
9467
|
enumerable: false
|
|
8611
9468
|
}
|
|
8612
9469
|
});
|
|
8613
|
-
return
|
|
9470
|
+
return styles2;
|
|
8614
9471
|
}
|
|
8615
|
-
var
|
|
8616
|
-
var
|
|
9472
|
+
var ansiStyles2 = assembleStyles2();
|
|
9473
|
+
var ansi_styles_default2 = ansiStyles2;
|
|
8617
9474
|
|
|
8618
9475
|
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
8619
9476
|
import process2 from "process";
|
|
@@ -8788,7 +9645,7 @@ var levelMapping = [
|
|
|
8788
9645
|
"ansi256",
|
|
8789
9646
|
"ansi16m"
|
|
8790
9647
|
];
|
|
8791
|
-
var
|
|
9648
|
+
var styles3 = /* @__PURE__ */ Object.create(null);
|
|
8792
9649
|
var applyOptions = (object, options = {}) => {
|
|
8793
9650
|
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
8794
9651
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
@@ -8806,8 +9663,8 @@ function createChalk(options) {
|
|
|
8806
9663
|
return chalkFactory(options);
|
|
8807
9664
|
}
|
|
8808
9665
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
8809
|
-
for (const [styleName, style] of Object.entries(
|
|
8810
|
-
|
|
9666
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
|
|
9667
|
+
styles3[styleName] = {
|
|
8811
9668
|
get() {
|
|
8812
9669
|
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
8813
9670
|
Object.defineProperty(this, styleName, { value: builder });
|
|
@@ -8815,7 +9672,7 @@ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
|
8815
9672
|
}
|
|
8816
9673
|
};
|
|
8817
9674
|
}
|
|
8818
|
-
|
|
9675
|
+
styles3.visible = {
|
|
8819
9676
|
get() {
|
|
8820
9677
|
const builder = createBuilder(this, this[STYLER], true);
|
|
8821
9678
|
Object.defineProperty(this, "visible", { value: builder });
|
|
@@ -8825,35 +9682,35 @@ styles2.visible = {
|
|
|
8825
9682
|
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
8826
9683
|
if (model === "rgb") {
|
|
8827
9684
|
if (level === "ansi16m") {
|
|
8828
|
-
return
|
|
9685
|
+
return ansi_styles_default2[type].ansi16m(...arguments_);
|
|
8829
9686
|
}
|
|
8830
9687
|
if (level === "ansi256") {
|
|
8831
|
-
return
|
|
9688
|
+
return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
|
|
8832
9689
|
}
|
|
8833
|
-
return
|
|
9690
|
+
return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
|
|
8834
9691
|
}
|
|
8835
9692
|
if (model === "hex") {
|
|
8836
|
-
return getModelAnsi("rgb", level, type, ...
|
|
9693
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
|
|
8837
9694
|
}
|
|
8838
|
-
return
|
|
9695
|
+
return ansi_styles_default2[type][model](...arguments_);
|
|
8839
9696
|
};
|
|
8840
9697
|
var usedModels = ["rgb", "hex", "ansi256"];
|
|
8841
9698
|
for (const model of usedModels) {
|
|
8842
|
-
|
|
9699
|
+
styles3[model] = {
|
|
8843
9700
|
get() {
|
|
8844
9701
|
const { level } = this;
|
|
8845
9702
|
return function(...arguments_) {
|
|
8846
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_),
|
|
9703
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER]);
|
|
8847
9704
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
8848
9705
|
};
|
|
8849
9706
|
}
|
|
8850
9707
|
};
|
|
8851
9708
|
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
8852
|
-
|
|
9709
|
+
styles3[bgModel] = {
|
|
8853
9710
|
get() {
|
|
8854
9711
|
const { level } = this;
|
|
8855
9712
|
return function(...arguments_) {
|
|
8856
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_),
|
|
9713
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER]);
|
|
8857
9714
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
8858
9715
|
};
|
|
8859
9716
|
}
|
|
@@ -8861,7 +9718,7 @@ for (const model of usedModels) {
|
|
|
8861
9718
|
}
|
|
8862
9719
|
var proto = Object.defineProperties(() => {
|
|
8863
9720
|
}, {
|
|
8864
|
-
...
|
|
9721
|
+
...styles3,
|
|
8865
9722
|
level: {
|
|
8866
9723
|
enumerable: true,
|
|
8867
9724
|
get() {
|
|
@@ -8919,7 +9776,7 @@ var applyStyle = (self, string) => {
|
|
|
8919
9776
|
}
|
|
8920
9777
|
return openAll + string + closeAll;
|
|
8921
9778
|
};
|
|
8922
|
-
Object.defineProperties(createChalk.prototype,
|
|
9779
|
+
Object.defineProperties(createChalk.prototype, styles3);
|
|
8923
9780
|
var chalk = createChalk();
|
|
8924
9781
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
8925
9782
|
var source_default = chalk;
|
|
@@ -9279,173 +10136,62 @@ cliCursor.show = (writableStream = process5.stderr) => {
|
|
|
9279
10136
|
writableStream.write("\x1B[?25h");
|
|
9280
10137
|
};
|
|
9281
10138
|
cliCursor.hide = (writableStream = process5.stderr) => {
|
|
9282
|
-
if (!writableStream.isTTY) {
|
|
9283
|
-
return;
|
|
9284
|
-
}
|
|
9285
|
-
restore_cursor_default();
|
|
9286
|
-
isHidden = true;
|
|
9287
|
-
writableStream.write("\x1B[?25l");
|
|
9288
|
-
};
|
|
9289
|
-
cliCursor.toggle = (force, writableStream) => {
|
|
9290
|
-
if (force !== void 0) {
|
|
9291
|
-
isHidden = force;
|
|
9292
|
-
}
|
|
9293
|
-
if (isHidden) {
|
|
9294
|
-
cliCursor.show(writableStream);
|
|
9295
|
-
} else {
|
|
9296
|
-
cliCursor.hide(writableStream);
|
|
9297
|
-
}
|
|
9298
|
-
};
|
|
9299
|
-
var cli_cursor_default = cliCursor;
|
|
9300
|
-
|
|
9301
|
-
// ../../node_modules/.pnpm/ora@8.2.0/node_modules/ora/index.js
|
|
9302
|
-
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
9303
|
-
|
|
9304
|
-
// ../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
9305
|
-
import process6 from "process";
|
|
9306
|
-
function isUnicodeSupported() {
|
|
9307
|
-
if (process6.platform !== "win32") {
|
|
9308
|
-
return process6.env.TERM !== "linux";
|
|
9309
|
-
}
|
|
9310
|
-
return Boolean(process6.env.CI) || Boolean(process6.env.WT_SESSION) || Boolean(process6.env.TERMINUS_SUBLIME) || process6.env.ConEmuTask === "{cmd::Cmder}" || process6.env.TERM_PROGRAM === "Terminus-Sublime" || process6.env.TERM_PROGRAM === "vscode" || process6.env.TERM === "xterm-256color" || process6.env.TERM === "alacritty" || process6.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
9311
|
-
}
|
|
9312
|
-
|
|
9313
|
-
// ../../node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
9314
|
-
var main = {
|
|
9315
|
-
info: source_default.blue("\u2139"),
|
|
9316
|
-
success: source_default.green("\u2714"),
|
|
9317
|
-
warning: source_default.yellow("\u26A0"),
|
|
9318
|
-
error: source_default.red("\u2716")
|
|
9319
|
-
};
|
|
9320
|
-
var fallback = {
|
|
9321
|
-
info: source_default.blue("i"),
|
|
9322
|
-
success: source_default.green("\u221A"),
|
|
9323
|
-
warning: source_default.yellow("\u203C"),
|
|
9324
|
-
error: source_default.red("\xD7")
|
|
9325
|
-
};
|
|
9326
|
-
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
9327
|
-
var log_symbols_default = logSymbols;
|
|
9328
|
-
|
|
9329
|
-
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
9330
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
9331
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
9332
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
9333
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
9334
|
-
const pattern = `${osc}|${csi}`;
|
|
9335
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
9336
|
-
}
|
|
9337
|
-
|
|
9338
|
-
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
9339
|
-
var regex = ansiRegex();
|
|
9340
|
-
function stripAnsi(string) {
|
|
9341
|
-
if (typeof string !== "string") {
|
|
9342
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
9343
|
-
}
|
|
9344
|
-
if (!string.includes("\x1B") && !string.includes("\x9B")) {
|
|
9345
|
-
return string;
|
|
9346
|
-
}
|
|
9347
|
-
return string.replace(regex, "");
|
|
9348
|
-
}
|
|
9349
|
-
|
|
9350
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
9351
|
-
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
9352
|
-
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
9353
|
-
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
9354
|
-
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
9355
|
-
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
9356
|
-
|
|
9357
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
9358
|
-
var isInRange = (ranges, codePoint) => {
|
|
9359
|
-
let low = 0;
|
|
9360
|
-
let high = Math.floor(ranges.length / 2) - 1;
|
|
9361
|
-
while (low <= high) {
|
|
9362
|
-
const mid = Math.floor((low + high) / 2);
|
|
9363
|
-
const i = mid * 2;
|
|
9364
|
-
if (codePoint < ranges[i]) {
|
|
9365
|
-
high = mid - 1;
|
|
9366
|
-
} else if (codePoint > ranges[i + 1]) {
|
|
9367
|
-
low = mid + 1;
|
|
9368
|
-
} else {
|
|
9369
|
-
return true;
|
|
9370
|
-
}
|
|
9371
|
-
}
|
|
9372
|
-
return false;
|
|
9373
|
-
};
|
|
9374
|
-
|
|
9375
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
9376
|
-
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
9377
|
-
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
9378
|
-
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
9379
|
-
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
9380
|
-
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
9381
|
-
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
9382
|
-
var minimumNarrowCodePoint = narrowRanges[0];
|
|
9383
|
-
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
9384
|
-
var minimumWideCodePoint = wideRanges[0];
|
|
9385
|
-
var maximumWideCodePoint = wideRanges.at(-1);
|
|
9386
|
-
var commonCjkCodePoint = 19968;
|
|
9387
|
-
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
9388
|
-
function findWideFastPathRange(ranges) {
|
|
9389
|
-
let fastPathStart = ranges[0];
|
|
9390
|
-
let fastPathEnd = ranges[1];
|
|
9391
|
-
for (let index = 0; index < ranges.length; index += 2) {
|
|
9392
|
-
const start = ranges[index];
|
|
9393
|
-
const end = ranges[index + 1];
|
|
9394
|
-
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
9395
|
-
return [start, end];
|
|
9396
|
-
}
|
|
9397
|
-
if (end - start > fastPathEnd - fastPathStart) {
|
|
9398
|
-
fastPathStart = start;
|
|
9399
|
-
fastPathEnd = end;
|
|
9400
|
-
}
|
|
9401
|
-
}
|
|
9402
|
-
return [fastPathStart, fastPathEnd];
|
|
9403
|
-
}
|
|
9404
|
-
var isAmbiguous = (codePoint) => {
|
|
9405
|
-
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
9406
|
-
return false;
|
|
9407
|
-
}
|
|
9408
|
-
return isInRange(ambiguousRanges, codePoint);
|
|
9409
|
-
};
|
|
9410
|
-
var isFullWidth = (codePoint) => {
|
|
9411
|
-
if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
|
|
9412
|
-
return false;
|
|
10139
|
+
if (!writableStream.isTTY) {
|
|
10140
|
+
return;
|
|
9413
10141
|
}
|
|
9414
|
-
|
|
10142
|
+
restore_cursor_default();
|
|
10143
|
+
isHidden = true;
|
|
10144
|
+
writableStream.write("\x1B[?25l");
|
|
9415
10145
|
};
|
|
9416
|
-
|
|
9417
|
-
if (
|
|
9418
|
-
|
|
10146
|
+
cliCursor.toggle = (force, writableStream) => {
|
|
10147
|
+
if (force !== void 0) {
|
|
10148
|
+
isHidden = force;
|
|
9419
10149
|
}
|
|
9420
|
-
if (
|
|
9421
|
-
|
|
10150
|
+
if (isHidden) {
|
|
10151
|
+
cliCursor.show(writableStream);
|
|
10152
|
+
} else {
|
|
10153
|
+
cliCursor.hide(writableStream);
|
|
9422
10154
|
}
|
|
9423
|
-
return isInRange(wideRanges, codePoint);
|
|
9424
10155
|
};
|
|
10156
|
+
var cli_cursor_default = cliCursor;
|
|
9425
10157
|
|
|
9426
|
-
// ../../node_modules/.pnpm/
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
9435
|
-
return 2;
|
|
10158
|
+
// ../../node_modules/.pnpm/ora@8.2.0/node_modules/ora/index.js
|
|
10159
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
10160
|
+
|
|
10161
|
+
// ../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
10162
|
+
import process6 from "process";
|
|
10163
|
+
function isUnicodeSupported() {
|
|
10164
|
+
if (process6.platform !== "win32") {
|
|
10165
|
+
return process6.env.TERM !== "linux";
|
|
9436
10166
|
}
|
|
9437
|
-
return
|
|
10167
|
+
return Boolean(process6.env.CI) || Boolean(process6.env.WT_SESSION) || Boolean(process6.env.TERMINUS_SUBLIME) || process6.env.ConEmuTask === "{cmd::Cmder}" || process6.env.TERM_PROGRAM === "Terminus-Sublime" || process6.env.TERM_PROGRAM === "vscode" || process6.env.TERM === "xterm-256color" || process6.env.TERM === "alacritty" || process6.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
9438
10168
|
}
|
|
9439
10169
|
|
|
10170
|
+
// ../../node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
10171
|
+
var main = {
|
|
10172
|
+
info: source_default.blue("\u2139"),
|
|
10173
|
+
success: source_default.green("\u2714"),
|
|
10174
|
+
warning: source_default.yellow("\u26A0"),
|
|
10175
|
+
error: source_default.red("\u2716")
|
|
10176
|
+
};
|
|
10177
|
+
var fallback = {
|
|
10178
|
+
info: source_default.blue("i"),
|
|
10179
|
+
success: source_default.green("\u221A"),
|
|
10180
|
+
warning: source_default.yellow("\u203C"),
|
|
10181
|
+
error: source_default.red("\xD7")
|
|
10182
|
+
};
|
|
10183
|
+
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
10184
|
+
var log_symbols_default = logSymbols;
|
|
10185
|
+
|
|
9440
10186
|
// ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
9441
10187
|
var emoji_regex_default = () => {
|
|
9442
10188
|
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
9443
10189
|
};
|
|
9444
10190
|
|
|
9445
10191
|
// ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
9446
|
-
var
|
|
10192
|
+
var segmenter3 = new Intl.Segmenter();
|
|
9447
10193
|
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
9448
|
-
function
|
|
10194
|
+
function stringWidth2(string, options = {}) {
|
|
9449
10195
|
if (typeof string !== "string" || string.length === 0) {
|
|
9450
10196
|
return 0;
|
|
9451
10197
|
}
|
|
@@ -9461,7 +10207,7 @@ function stringWidth(string, options = {}) {
|
|
|
9461
10207
|
}
|
|
9462
10208
|
let width = 0;
|
|
9463
10209
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
9464
|
-
for (const { segment: character } of
|
|
10210
|
+
for (const { segment: character } of segmenter3.segment(string)) {
|
|
9465
10211
|
const codePoint = character.codePointAt(0);
|
|
9466
10212
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
9467
10213
|
continue;
|
|
@@ -9702,7 +10448,7 @@ var Ora = class {
|
|
|
9702
10448
|
const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
|
|
9703
10449
|
this.#lineCount = 0;
|
|
9704
10450
|
for (const line of stripAnsi(fullText).split("\n")) {
|
|
9705
|
-
this.#lineCount += Math.max(1, Math.ceil(
|
|
10451
|
+
this.#lineCount += Math.max(1, Math.ceil(stringWidth2(line, { countAnsiEscapeCodes: true }) / columns));
|
|
9706
10452
|
}
|
|
9707
10453
|
}
|
|
9708
10454
|
get isEnabled() {
|
|
@@ -10189,10 +10935,15 @@ Examples:
|
|
|
10189
10935
|
asset = await client.assets.lookup(domain);
|
|
10190
10936
|
} catch (err) {
|
|
10191
10937
|
if (err instanceof ApiError && err.status === 404) {
|
|
10192
|
-
|
|
10193
|
-
|
|
10938
|
+
asset = await client.assets.create({
|
|
10939
|
+
asset_type: "domain",
|
|
10940
|
+
asset_value: domain,
|
|
10941
|
+
verification_method: "dns"
|
|
10942
|
+
});
|
|
10943
|
+
console.error(`Asset created for ${domain}.`);
|
|
10944
|
+
} else {
|
|
10945
|
+
throw err;
|
|
10194
10946
|
}
|
|
10195
|
-
throw err;
|
|
10196
10947
|
}
|
|
10197
10948
|
targetDisplay = domain;
|
|
10198
10949
|
params = { asset_id: asset.id, scan_mode: options.mode };
|
|
@@ -10376,7 +11127,402 @@ Timeout: pentest still running after ${options.timeout}s.`);
|
|
|
10376
11127
|
}
|
|
10377
11128
|
|
|
10378
11129
|
// src/commands/asset.ts
|
|
11130
|
+
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
11131
|
+
|
|
11132
|
+
// src/commands/asset-auth.ts
|
|
10379
11133
|
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
11134
|
+
|
|
11135
|
+
// src/lib/resolve-asset.ts
|
|
11136
|
+
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-/i;
|
|
11137
|
+
async function resolveAsset(client, identifier) {
|
|
11138
|
+
try {
|
|
11139
|
+
if (UUID_RE.test(identifier)) {
|
|
11140
|
+
return await client.assets.get(identifier);
|
|
11141
|
+
}
|
|
11142
|
+
return await client.assets.lookup(identifier);
|
|
11143
|
+
} catch (error) {
|
|
11144
|
+
if (error instanceof ApiError && error.status === 404) {
|
|
11145
|
+
throw new ApiError({
|
|
11146
|
+
status: 404,
|
|
11147
|
+
code: error.code,
|
|
11148
|
+
detail: `Asset "${identifier}" not found. Create it with:
|
|
11149
|
+
kinosec asset create --type domain --value ${identifier} --verify-method dns
|
|
11150
|
+
or use pentest which auto-creates the asset:
|
|
11151
|
+
kinosec pentest -t ${identifier}`,
|
|
11152
|
+
requestId: error.requestId
|
|
11153
|
+
});
|
|
11154
|
+
}
|
|
11155
|
+
throw error;
|
|
11156
|
+
}
|
|
11157
|
+
}
|
|
11158
|
+
|
|
11159
|
+
// src/lib/prompt.ts
|
|
11160
|
+
import { createInterface as createInterface2 } from "readline";
|
|
11161
|
+
async function promptMasked(label) {
|
|
11162
|
+
if (!isTTY() || !process.stdin.isTTY) {
|
|
11163
|
+
console.error(`Cannot prompt for ${label} in non-interactive mode. Use flags instead.`);
|
|
11164
|
+
process.exit(2);
|
|
11165
|
+
}
|
|
11166
|
+
process.stderr.write(`${label}: `);
|
|
11167
|
+
return new Promise((resolve, reject) => {
|
|
11168
|
+
const chars = [];
|
|
11169
|
+
process.stdin.setRawMode(true);
|
|
11170
|
+
process.stdin.resume();
|
|
11171
|
+
process.stdin.setEncoding("utf-8");
|
|
11172
|
+
const onData = (chunk) => {
|
|
11173
|
+
for (const ch of chunk) {
|
|
11174
|
+
if (ch === "\r" || ch === "\n") {
|
|
11175
|
+
process.stdin.setRawMode(false);
|
|
11176
|
+
process.stdin.pause();
|
|
11177
|
+
process.stdin.removeListener("data", onData);
|
|
11178
|
+
process.stderr.write("\n");
|
|
11179
|
+
resolve(chars.join(""));
|
|
11180
|
+
return;
|
|
11181
|
+
} else if (ch === "") {
|
|
11182
|
+
process.stdin.setRawMode(false);
|
|
11183
|
+
process.stdin.pause();
|
|
11184
|
+
process.stdin.removeListener("data", onData);
|
|
11185
|
+
process.stderr.write("\n");
|
|
11186
|
+
reject(new Error("Cancelled"));
|
|
11187
|
+
return;
|
|
11188
|
+
} else if (ch === "\x7F" || ch === "\b") {
|
|
11189
|
+
if (chars.length > 0) {
|
|
11190
|
+
chars.pop();
|
|
11191
|
+
process.stderr.write("\b \b");
|
|
11192
|
+
}
|
|
11193
|
+
} else if (ch >= " ") {
|
|
11194
|
+
chars.push(ch);
|
|
11195
|
+
process.stderr.write("*");
|
|
11196
|
+
}
|
|
11197
|
+
}
|
|
11198
|
+
};
|
|
11199
|
+
process.stdin.on("data", onData);
|
|
11200
|
+
});
|
|
11201
|
+
}
|
|
11202
|
+
async function promptText(label) {
|
|
11203
|
+
if (!isTTY() || !process.stdin.isTTY) {
|
|
11204
|
+
console.error(`Cannot prompt for ${label} in non-interactive mode. Use flags instead.`);
|
|
11205
|
+
process.exit(2);
|
|
11206
|
+
}
|
|
11207
|
+
const rl = createInterface2({ input: process.stdin, output: process.stderr });
|
|
11208
|
+
const answer = await new Promise((resolve) => {
|
|
11209
|
+
rl.question(`${label}: `, resolve);
|
|
11210
|
+
});
|
|
11211
|
+
rl.close();
|
|
11212
|
+
return answer;
|
|
11213
|
+
}
|
|
11214
|
+
async function promptSelect(message, options) {
|
|
11215
|
+
if (!isTTY() || !process.stdin.isTTY) {
|
|
11216
|
+
console.error("Cannot show interactive menu in non-interactive mode. Use flags instead.");
|
|
11217
|
+
process.exit(2);
|
|
11218
|
+
}
|
|
11219
|
+
console.error(`
|
|
11220
|
+
${message}`);
|
|
11221
|
+
for (let i = 0; i < options.length; i++) {
|
|
11222
|
+
console.error(` ${i + 1}. ${options[i].label} \u2014 ${options[i].description}`);
|
|
11223
|
+
}
|
|
11224
|
+
const rl = createInterface2({ input: process.stdin, output: process.stderr });
|
|
11225
|
+
const answer = await new Promise((resolve) => {
|
|
11226
|
+
rl.question("> ", resolve);
|
|
11227
|
+
});
|
|
11228
|
+
rl.close();
|
|
11229
|
+
const index = parseInt(answer, 10) - 1;
|
|
11230
|
+
if (isNaN(index) || index < 0 || index >= options.length) {
|
|
11231
|
+
console.error("Invalid selection.");
|
|
11232
|
+
process.exit(2);
|
|
11233
|
+
}
|
|
11234
|
+
return options[index].value;
|
|
11235
|
+
}
|
|
11236
|
+
|
|
11237
|
+
// src/commands/asset-auth.ts
|
|
11238
|
+
var VALID_AUTH_TYPES = ["bearer", "basic", "apikey", "session", "cookie"];
|
|
11239
|
+
var AUTH_TYPE_OPTIONS = [
|
|
11240
|
+
{ value: "bearer", label: "Bearer Token", description: "Authorization header with token" },
|
|
11241
|
+
{ value: "apikey", label: "API Key", description: "Custom header (e.g. X-API-Key)" },
|
|
11242
|
+
{ value: "basic", label: "Basic Auth", description: "Username + password" },
|
|
11243
|
+
{ value: "session", label: "Session Login", description: "Replays login form POST" },
|
|
11244
|
+
{ value: "cookie", label: "Cookie / Session", description: "Inject browser cookies" }
|
|
11245
|
+
];
|
|
11246
|
+
async function collectCredentialsInteractive(authType) {
|
|
11247
|
+
const params = { auth_type: authType, credentials: {} };
|
|
11248
|
+
switch (authType) {
|
|
11249
|
+
case "bearer": {
|
|
11250
|
+
params.credentials = { token: await promptMasked("Bearer token") };
|
|
11251
|
+
break;
|
|
11252
|
+
}
|
|
11253
|
+
case "basic": {
|
|
11254
|
+
const username = await promptText("Username");
|
|
11255
|
+
const password = await promptMasked("Password");
|
|
11256
|
+
params.credentials = { username, password };
|
|
11257
|
+
break;
|
|
11258
|
+
}
|
|
11259
|
+
case "apikey": {
|
|
11260
|
+
const key = await promptMasked("API key");
|
|
11261
|
+
const headerName = await promptText("Header name (e.g. X-API-Key)");
|
|
11262
|
+
params.credentials = { key };
|
|
11263
|
+
params.auth_header_name = headerName;
|
|
11264
|
+
break;
|
|
11265
|
+
}
|
|
11266
|
+
case "session": {
|
|
11267
|
+
const username = await promptText("Username or email");
|
|
11268
|
+
const password = await promptMasked("Password");
|
|
11269
|
+
const endpoint = await promptText("Login endpoint URL");
|
|
11270
|
+
params.credentials = { email: username, password };
|
|
11271
|
+
params.auth_endpoint_url = endpoint;
|
|
11272
|
+
break;
|
|
11273
|
+
}
|
|
11274
|
+
case "cookie": {
|
|
11275
|
+
params.credentials = { cookie: await promptMasked("Cookie string") };
|
|
11276
|
+
break;
|
|
11277
|
+
}
|
|
11278
|
+
}
|
|
11279
|
+
return params;
|
|
11280
|
+
}
|
|
11281
|
+
function collectCredentialsFromFlags(options) {
|
|
11282
|
+
const authType = options.type;
|
|
11283
|
+
const params = { auth_type: authType, credentials: {} };
|
|
11284
|
+
switch (authType) {
|
|
11285
|
+
case "bearer": {
|
|
11286
|
+
if (!options.bearerToken) {
|
|
11287
|
+
console.error("--bearer-token is required for bearer auth type.");
|
|
11288
|
+
process.exit(2);
|
|
11289
|
+
}
|
|
11290
|
+
params.credentials = { token: options.bearerToken };
|
|
11291
|
+
break;
|
|
11292
|
+
}
|
|
11293
|
+
case "basic": {
|
|
11294
|
+
if (!options.username || !options.password) {
|
|
11295
|
+
console.error("--username and --password are required for basic auth type.");
|
|
11296
|
+
process.exit(2);
|
|
11297
|
+
}
|
|
11298
|
+
params.credentials = { username: options.username, password: options.password };
|
|
11299
|
+
break;
|
|
11300
|
+
}
|
|
11301
|
+
case "apikey": {
|
|
11302
|
+
if (!options.key || !options.headerName) {
|
|
11303
|
+
console.error("--key and --header-name are required for apikey auth type.");
|
|
11304
|
+
process.exit(2);
|
|
11305
|
+
}
|
|
11306
|
+
params.credentials = { key: options.key };
|
|
11307
|
+
params.auth_header_name = options.headerName;
|
|
11308
|
+
break;
|
|
11309
|
+
}
|
|
11310
|
+
case "session": {
|
|
11311
|
+
if (!options.username || !options.password || !options.authEndpoint) {
|
|
11312
|
+
console.error("--username, --password, and --auth-endpoint are required for session auth type.");
|
|
11313
|
+
process.exit(2);
|
|
11314
|
+
}
|
|
11315
|
+
params.credentials = { email: options.username, password: options.password };
|
|
11316
|
+
params.auth_endpoint_url = options.authEndpoint;
|
|
11317
|
+
break;
|
|
11318
|
+
}
|
|
11319
|
+
case "cookie": {
|
|
11320
|
+
if (!options.cookie) {
|
|
11321
|
+
console.error("--cookie is required for cookie auth type.");
|
|
11322
|
+
process.exit(2);
|
|
11323
|
+
}
|
|
11324
|
+
params.credentials = { cookie: options.cookie };
|
|
11325
|
+
break;
|
|
11326
|
+
}
|
|
11327
|
+
}
|
|
11328
|
+
if (options.context) {
|
|
11329
|
+
params.context_text = options.context;
|
|
11330
|
+
}
|
|
11331
|
+
return params;
|
|
11332
|
+
}
|
|
11333
|
+
function registerAssetAuthCommand(assetCmd) {
|
|
11334
|
+
const auth = assetCmd.command("auth").description("Manage asset authentication credentials");
|
|
11335
|
+
auth.command("set").description("Configure authentication credentials for an asset").argument("<asset>", "Asset domain name or UUID").option("--type <type>", "Auth type: bearer, basic, apikey, session, cookie").option("--bearer-token <value>", "Bearer token (bearer type)").option("--username <value>", "Username or email (basic, session types)").option("--password <value>", "Password (basic, session types)").option("--key <value>", "API key value (apikey type)").option("--header-name <name>", "Custom header name (apikey type, e.g. X-API-Key)").option("--cookie <value>", "Cookie string (cookie type)").option("--auth-endpoint <url>", "Login endpoint URL (session type)").option("--context <text>", "Optional notes about the auth configuration").addHelpText("after", `
|
|
11336
|
+
Examples:
|
|
11337
|
+
$ kinosec asset auth set example.com # interactive
|
|
11338
|
+
$ kinosec asset auth set example.com --type bearer --bearer-token "$TOKEN"
|
|
11339
|
+
$ kinosec asset auth set example.com --type basic --username admin --password "$PASS"
|
|
11340
|
+
$ kinosec asset auth set example.com --type apikey --key "$KEY" --header-name "X-API-Key"
|
|
11341
|
+
$ kinosec asset auth set example.com --type session --username admin@example.com --password "$PASS" --auth-endpoint "https://example.com/api/login"
|
|
11342
|
+
$ kinosec asset auth set example.com --type cookie --cookie "session_id=abc123"
|
|
11343
|
+
|
|
11344
|
+
Security: Pass credentials via environment variables to avoid shell history exposure.`).action(async (assetIdentifier, options) => {
|
|
11345
|
+
try {
|
|
11346
|
+
const opts = auth.parent.parent.opts();
|
|
11347
|
+
const { token, apiUrl } = resolveToken(opts);
|
|
11348
|
+
const client = new KinoSecClient({ apiUrl, token });
|
|
11349
|
+
const asset = await resolveAsset(client, assetIdentifier);
|
|
11350
|
+
let params;
|
|
11351
|
+
if (options.type) {
|
|
11352
|
+
if (!VALID_AUTH_TYPES.includes(options.type)) {
|
|
11353
|
+
console.error(`Invalid auth type "${options.type}". Must be: ${VALID_AUTH_TYPES.join(", ")}`);
|
|
11354
|
+
process.exit(2);
|
|
11355
|
+
}
|
|
11356
|
+
params = collectCredentialsFromFlags(options);
|
|
11357
|
+
} else {
|
|
11358
|
+
const authType = await promptSelect("Authentication type:", AUTH_TYPE_OPTIONS);
|
|
11359
|
+
params = await collectCredentialsInteractive(authType);
|
|
11360
|
+
if (options.context) {
|
|
11361
|
+
params.context_text = options.context;
|
|
11362
|
+
}
|
|
11363
|
+
}
|
|
11364
|
+
const result = await client.assets.credentials.set(asset.id, params);
|
|
11365
|
+
if (opts.json || opts.output === "json") {
|
|
11366
|
+
printJson({ ...result, asset: asset.asset_value });
|
|
11367
|
+
return;
|
|
11368
|
+
}
|
|
11369
|
+
printSuccess(`Credentials saved for ${asset.asset_value} (${result.auth_type})`);
|
|
11370
|
+
} catch (error) {
|
|
11371
|
+
handleError(error);
|
|
11372
|
+
}
|
|
11373
|
+
});
|
|
11374
|
+
auth.command("show").description("Show authentication configuration for an asset").argument("<asset>", "Asset domain name or UUID").addHelpText("after", `
|
|
11375
|
+
Examples:
|
|
11376
|
+
$ kinosec asset auth show example.com
|
|
11377
|
+
$ kinosec asset auth show example.com --json`).action(async (assetIdentifier) => {
|
|
11378
|
+
try {
|
|
11379
|
+
const opts = auth.parent.parent.opts();
|
|
11380
|
+
const { token, apiUrl } = resolveToken(opts);
|
|
11381
|
+
const client = new KinoSecClient({ apiUrl, token });
|
|
11382
|
+
const asset = await resolveAsset(client, assetIdentifier);
|
|
11383
|
+
const creds = await client.assets.credentials.get(asset.id);
|
|
11384
|
+
if (opts.json || opts.output === "json") {
|
|
11385
|
+
printJson({ asset: asset.asset_value, ...creds });
|
|
11386
|
+
return;
|
|
11387
|
+
}
|
|
11388
|
+
if (!creds.has_credentials) {
|
|
11389
|
+
console.log(`Asset: ${asset.asset_value}`);
|
|
11390
|
+
console.log(`Auth Type: ${import_picocolors6.default.dim("(none)")}`);
|
|
11391
|
+
console.log(`Has Credentials: no`);
|
|
11392
|
+
return;
|
|
11393
|
+
}
|
|
11394
|
+
console.log(`Asset: ${asset.asset_value}`);
|
|
11395
|
+
console.log(`Auth Type: ${creds.auth_type}`);
|
|
11396
|
+
console.log(`Has Credentials: yes`);
|
|
11397
|
+
if (creds.auth_header_name) {
|
|
11398
|
+
console.log(`Header Name: ${creds.auth_header_name}`);
|
|
11399
|
+
}
|
|
11400
|
+
if (creds.auth_endpoint_url) {
|
|
11401
|
+
console.log(`Auth Endpoint: ${creds.auth_endpoint_url}`);
|
|
11402
|
+
}
|
|
11403
|
+
if (creds.context_text) {
|
|
11404
|
+
console.log(`Notes: ${creds.context_text}`);
|
|
11405
|
+
}
|
|
11406
|
+
if (creds.target_account) {
|
|
11407
|
+
const ta = creds.target_account;
|
|
11408
|
+
const hasAny = ta.has_username || ta.has_cookie || ta.has_bearer_token || ta.has_apikey;
|
|
11409
|
+
if (hasAny) {
|
|
11410
|
+
const detail = ta.has_username ? "username" : ta.has_bearer_token ? "bearer token" : ta.has_cookie ? "cookie" : "API key";
|
|
11411
|
+
console.log(`Target Account: ${import_picocolors6.default.green("configured")} (${detail})`);
|
|
11412
|
+
} else {
|
|
11413
|
+
console.log(`Target Account: ${import_picocolors6.default.dim("not configured")}`);
|
|
11414
|
+
}
|
|
11415
|
+
}
|
|
11416
|
+
} catch (error) {
|
|
11417
|
+
handleError(error);
|
|
11418
|
+
}
|
|
11419
|
+
});
|
|
11420
|
+
auth.command("remove").description("Remove all credentials for an asset").argument("<asset>", "Asset domain name or UUID").option("-y, --yes", "Skip confirmation prompt").addHelpText("after", `
|
|
11421
|
+
Examples:
|
|
11422
|
+
$ kinosec asset auth remove example.com
|
|
11423
|
+
$ kinosec asset auth remove example.com --yes`).action(async (assetIdentifier, options) => {
|
|
11424
|
+
try {
|
|
11425
|
+
const opts = auth.parent.parent.opts();
|
|
11426
|
+
const { token, apiUrl } = resolveToken(opts);
|
|
11427
|
+
const client = new KinoSecClient({ apiUrl, token });
|
|
11428
|
+
const asset = await resolveAsset(client, assetIdentifier);
|
|
11429
|
+
await confirmDestructive(`Remove all credentials for ${asset.asset_value}?`, Boolean(options.yes));
|
|
11430
|
+
await client.assets.credentials.remove(asset.id);
|
|
11431
|
+
if (opts.json || opts.output === "json") {
|
|
11432
|
+
printJson({ deleted: true, asset: asset.asset_value });
|
|
11433
|
+
return;
|
|
11434
|
+
}
|
|
11435
|
+
printSuccess(`Credentials removed for ${asset.asset_value}`);
|
|
11436
|
+
} catch (error) {
|
|
11437
|
+
handleError(error);
|
|
11438
|
+
}
|
|
11439
|
+
});
|
|
11440
|
+
auth.command("set-target").description("Configure IDOR target account credentials").argument("<asset>", "Asset domain name or UUID").option("--target-username <value>", "Target account username or email").option("--target-password <value>", "Target account password").option("--target-totp-secret <value>", "Target account TOTP secret").option("--target-token <value>", "Target bearer token").option("--target-cookie <value>", "Target cookie string").option("--target-key <value>", "Target API key").addHelpText("after", `
|
|
11441
|
+
Examples:
|
|
11442
|
+
$ kinosec asset auth set-target example.com # interactive
|
|
11443
|
+
$ kinosec asset auth set-target example.com --target-username victim@example.com --target-password "$PASS"
|
|
11444
|
+
$ kinosec asset auth set-target example.com --target-token "$VICTIM_TOKEN"
|
|
11445
|
+
$ kinosec asset auth set-target example.com --target-cookie "session_id=victim_abc"`).action(async (assetIdentifier, options) => {
|
|
11446
|
+
try {
|
|
11447
|
+
const opts = auth.parent.parent.opts();
|
|
11448
|
+
const { token, apiUrl } = resolveToken(opts);
|
|
11449
|
+
const client = new KinoSecClient({ apiUrl, token });
|
|
11450
|
+
const asset = await resolveAsset(client, assetIdentifier);
|
|
11451
|
+
const creds = await client.assets.credentials.get(asset.id);
|
|
11452
|
+
if (!creds.has_credentials || !creds.auth_type) {
|
|
11453
|
+
console.error(`No primary credentials configured for ${asset.asset_value}. Run 'kinosec asset auth set' first.`);
|
|
11454
|
+
process.exit(2);
|
|
11455
|
+
}
|
|
11456
|
+
const isTokenBased = creds.auth_type === "bearer" || creds.auth_type === "apikey" || creds.auth_type === "cookie";
|
|
11457
|
+
const hasAnyFlag = options.targetUsername || options.targetPassword || options.targetTotpSecret || options.targetToken || options.targetCookie || options.targetKey;
|
|
11458
|
+
let targetParams;
|
|
11459
|
+
if (hasAnyFlag) {
|
|
11460
|
+
targetParams = {
|
|
11461
|
+
username: options.targetUsername,
|
|
11462
|
+
password: options.targetPassword,
|
|
11463
|
+
totp_secret: options.targetTotpSecret,
|
|
11464
|
+
bearer_token: options.targetToken,
|
|
11465
|
+
cookie: options.targetCookie,
|
|
11466
|
+
apikey: options.targetKey
|
|
11467
|
+
};
|
|
11468
|
+
} else {
|
|
11469
|
+
console.error(`
|
|
11470
|
+
Primary auth type: ${creds.auth_type}
|
|
11471
|
+
`);
|
|
11472
|
+
if (isTokenBased) {
|
|
11473
|
+
if (creds.auth_type === "bearer") {
|
|
11474
|
+
const targetToken = await promptMasked("Target bearer token");
|
|
11475
|
+
targetParams = { bearer_token: targetToken };
|
|
11476
|
+
} else if (creds.auth_type === "cookie") {
|
|
11477
|
+
const targetCookie = await promptMasked("Target cookie string");
|
|
11478
|
+
targetParams = { cookie: targetCookie };
|
|
11479
|
+
} else {
|
|
11480
|
+
const targetKey = await promptMasked("Target API key");
|
|
11481
|
+
targetParams = { apikey: targetKey };
|
|
11482
|
+
}
|
|
11483
|
+
} else {
|
|
11484
|
+
const username = await promptText("Target account username");
|
|
11485
|
+
const password = await promptMasked("Target account password");
|
|
11486
|
+
targetParams = { username, password };
|
|
11487
|
+
const totp = await promptText("Target TOTP secret (optional, Enter to skip)");
|
|
11488
|
+
if (totp) {
|
|
11489
|
+
targetParams.totp_secret = totp;
|
|
11490
|
+
}
|
|
11491
|
+
}
|
|
11492
|
+
}
|
|
11493
|
+
await client.assets.credentials.setTarget(asset.id, targetParams);
|
|
11494
|
+
if (opts.json || opts.output === "json") {
|
|
11495
|
+
printJson({ saved: true, asset: asset.asset_value });
|
|
11496
|
+
return;
|
|
11497
|
+
}
|
|
11498
|
+
printSuccess(`Target account saved for ${asset.asset_value} (IDOR testing)`);
|
|
11499
|
+
} catch (error) {
|
|
11500
|
+
handleError(error);
|
|
11501
|
+
}
|
|
11502
|
+
});
|
|
11503
|
+
auth.command("remove-target").description("Remove target account credentials (keeps primary credentials)").argument("<asset>", "Asset domain name or UUID").option("-y, --yes", "Skip confirmation prompt").addHelpText("after", `
|
|
11504
|
+
Examples:
|
|
11505
|
+
$ kinosec asset auth remove-target example.com
|
|
11506
|
+
$ kinosec asset auth remove-target example.com --yes`).action(async (assetIdentifier, options) => {
|
|
11507
|
+
try {
|
|
11508
|
+
const opts = auth.parent.parent.opts();
|
|
11509
|
+
const { token, apiUrl } = resolveToken(opts);
|
|
11510
|
+
const client = new KinoSecClient({ apiUrl, token });
|
|
11511
|
+
const asset = await resolveAsset(client, assetIdentifier);
|
|
11512
|
+
await confirmDestructive(`Remove target account for ${asset.asset_value}?`, Boolean(options.yes));
|
|
11513
|
+
await client.assets.credentials.removeTarget(asset.id);
|
|
11514
|
+
if (opts.json || opts.output === "json") {
|
|
11515
|
+
printJson({ deleted: true, asset: asset.asset_value });
|
|
11516
|
+
return;
|
|
11517
|
+
}
|
|
11518
|
+
printSuccess(`Target account removed for ${asset.asset_value}`);
|
|
11519
|
+
} catch (error) {
|
|
11520
|
+
handleError(error);
|
|
11521
|
+
}
|
|
11522
|
+
});
|
|
11523
|
+
}
|
|
11524
|
+
|
|
11525
|
+
// src/commands/asset.ts
|
|
10380
11526
|
function registerAssetCommand(program3) {
|
|
10381
11527
|
const asset = program3.command("asset").description("Manage assets");
|
|
10382
11528
|
asset.command("list").description("List assets").option("--limit <n>", "Max results per page", "20").option("--cursor <cursor>", "Pagination cursor").option("--search <term>", "Filter by asset value (substring match)").option("--status <status>", "Filter by status (verified, unverified)").option("--type <type>", "Filter by type (domain, subdomain, ip)").addHelpText("after", `
|
|
@@ -10415,7 +11561,7 @@ Examples:
|
|
|
10415
11561
|
])
|
|
10416
11562
|
);
|
|
10417
11563
|
if (result.next_cursor) {
|
|
10418
|
-
console.log(
|
|
11564
|
+
console.log(import_picocolors7.default.dim(`
|
|
10419
11565
|
More results available. Use --cursor ${result.next_cursor}`));
|
|
10420
11566
|
}
|
|
10421
11567
|
} catch (error) {
|
|
@@ -10523,26 +11669,16 @@ Examples:
|
|
|
10523
11669
|
handleError(error);
|
|
10524
11670
|
}
|
|
10525
11671
|
});
|
|
11672
|
+
registerAssetAuthCommand(asset);
|
|
10526
11673
|
}
|
|
10527
11674
|
|
|
10528
11675
|
// src/commands/finding.ts
|
|
10529
|
-
var
|
|
10530
|
-
function
|
|
10531
|
-
if (
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
case "high":
|
|
10536
|
-
return import_picocolors7.default.red(level);
|
|
10537
|
-
case "medium":
|
|
10538
|
-
return import_picocolors7.default.yellow(level);
|
|
10539
|
-
case "low":
|
|
10540
|
-
return import_picocolors7.default.blue(level);
|
|
10541
|
-
case "info":
|
|
10542
|
-
return import_picocolors7.default.dim(level);
|
|
10543
|
-
default:
|
|
10544
|
-
return level;
|
|
10545
|
-
}
|
|
11676
|
+
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
11677
|
+
function formatPoc(poc) {
|
|
11678
|
+
if (poc == null) return null;
|
|
11679
|
+
if (typeof poc === "string") return poc.trim() || null;
|
|
11680
|
+
const json = JSON.stringify(poc, null, 2);
|
|
11681
|
+
return json === "{}" || json === "[]" ? null : json;
|
|
10546
11682
|
}
|
|
10547
11683
|
var VALID_STATUSES = ["open", "fixed", "false_positive", "accepted_risk", "resolved"];
|
|
10548
11684
|
function registerFindingCommand(program3) {
|
|
@@ -10578,7 +11714,7 @@ Examples:
|
|
|
10578
11714
|
])
|
|
10579
11715
|
);
|
|
10580
11716
|
if (result.next_cursor) {
|
|
10581
|
-
console.log(
|
|
11717
|
+
console.log(import_picocolors8.default.dim(`
|
|
10582
11718
|
More results available. Use --cursor ${result.next_cursor}`));
|
|
10583
11719
|
}
|
|
10584
11720
|
} catch (error) {
|
|
@@ -10598,17 +11734,21 @@ Examples:
|
|
|
10598
11734
|
printJson(detail);
|
|
10599
11735
|
return;
|
|
10600
11736
|
}
|
|
10601
|
-
|
|
10602
|
-
|
|
11737
|
+
const pocBody = formatPoc(detail.poc);
|
|
11738
|
+
printDetail(
|
|
10603
11739
|
[
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
11740
|
+
{ label: "ID", value: detail.id },
|
|
11741
|
+
{ label: "Name", value: detail.finding_name },
|
|
11742
|
+
{ label: "Severity", value: severityColor(detail.impact_level) },
|
|
11743
|
+
{ label: "Status", value: detail.status },
|
|
11744
|
+
{ label: "Verification", value: detail.verification_status },
|
|
11745
|
+
{ label: "Phase", value: detail.scan_phase },
|
|
11746
|
+
{ label: "Created", value: detail.created_at }
|
|
11747
|
+
],
|
|
11748
|
+
[
|
|
11749
|
+
{ title: "Description", body: detail.finding_description },
|
|
11750
|
+
{ title: "Solution", body: detail.finding_solution },
|
|
11751
|
+
...pocBody ? [{ title: "Proof of Concept", body: pocBody }] : []
|
|
10612
11752
|
]
|
|
10613
11753
|
);
|
|
10614
11754
|
} catch (error) {
|
|
@@ -10662,7 +11802,7 @@ Examples:
|
|
|
10662
11802
|
}
|
|
10663
11803
|
|
|
10664
11804
|
// src/commands/report.ts
|
|
10665
|
-
var
|
|
11805
|
+
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
10666
11806
|
function renderMarkdown(data) {
|
|
10667
11807
|
const { scan, findings } = data;
|
|
10668
11808
|
const lines = [];
|
|
@@ -10729,19 +11869,17 @@ Examples:
|
|
|
10729
11869
|
return;
|
|
10730
11870
|
}
|
|
10731
11871
|
printTable(
|
|
10732
|
-
["ID", "Target", "Mode", "
|
|
11872
|
+
["ID", "Target", "Mode", "Findings", "Completed"],
|
|
10733
11873
|
result.items.map((r) => [
|
|
10734
11874
|
r.id,
|
|
10735
11875
|
truncate(r.domain_or_ip, 30),
|
|
10736
11876
|
r.scan_mode,
|
|
10737
|
-
|
|
10738
|
-
String(r.severity_counts?.High ?? 0),
|
|
10739
|
-
String(r.severity_counts?.Medium ?? 0),
|
|
11877
|
+
formatFindings(r.severity_counts),
|
|
10740
11878
|
r.scan_completed_at ? new Date(r.scan_completed_at).toLocaleDateString() : "(pending)"
|
|
10741
11879
|
])
|
|
10742
11880
|
);
|
|
10743
11881
|
if (result.next_cursor) {
|
|
10744
|
-
console.log(
|
|
11882
|
+
console.log(import_picocolors9.default.dim(`
|
|
10745
11883
|
More results available. Use --cursor ${result.next_cursor}`));
|
|
10746
11884
|
}
|
|
10747
11885
|
} catch (error) {
|
|
@@ -10812,7 +11950,7 @@ Examples:
|
|
|
10812
11950
|
}
|
|
10813
11951
|
|
|
10814
11952
|
// src/commands/token.ts
|
|
10815
|
-
var
|
|
11953
|
+
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
10816
11954
|
function registerTokenCommand(program3) {
|
|
10817
11955
|
const token = program3.command("token").description("Manage API tokens");
|
|
10818
11956
|
token.command("list").description("List API tokens").option("--limit <n>", "Max results per page", "20").option("--cursor <cursor>", "Pagination cursor").addHelpText("after", `
|
|
@@ -10847,7 +11985,7 @@ Examples:
|
|
|
10847
11985
|
])
|
|
10848
11986
|
);
|
|
10849
11987
|
if (result.next_cursor) {
|
|
10850
|
-
console.log(
|
|
11988
|
+
console.log(import_picocolors10.default.dim(`
|
|
10851
11989
|
More results available. Use --cursor ${result.next_cursor}`));
|
|
10852
11990
|
}
|
|
10853
11991
|
} catch (error) {
|
|
@@ -10874,7 +12012,7 @@ Examples:
|
|
|
10874
12012
|
}
|
|
10875
12013
|
printSuccess(`Token created: ${result.name}`);
|
|
10876
12014
|
console.log("");
|
|
10877
|
-
console.log(
|
|
12015
|
+
console.log(import_picocolors10.default.bold(" Token: ") + result.token);
|
|
10878
12016
|
console.log("");
|
|
10879
12017
|
printWarning("Save this token \u2014 it will not be shown again.");
|
|
10880
12018
|
console.log(` ID: ${result.id}`);
|
|
@@ -10907,7 +12045,7 @@ Examples:
|
|
|
10907
12045
|
|
|
10908
12046
|
// src/cli.ts
|
|
10909
12047
|
var program2 = new Command();
|
|
10910
|
-
program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.
|
|
12048
|
+
program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.4.0", "-v, --version").option("--token <pat>", "API token (overrides KINOSEC_TOKEN and config)").option("--api-url <url>", "API base URL (overrides config)").option("--output <format>", "Output format: text or json", "text").option("--json", "Shorthand for --output json").option("--no-color", "Disable colors");
|
|
10911
12049
|
registerAuthCommand(program2);
|
|
10912
12050
|
registerConfigCommand(program2);
|
|
10913
12051
|
registerMeCommand(program2);
|
|
@@ -10916,7 +12054,7 @@ registerAssetCommand(program2);
|
|
|
10916
12054
|
registerFindingCommand(program2);
|
|
10917
12055
|
registerReportCommand(program2);
|
|
10918
12056
|
registerTokenCommand(program2);
|
|
10919
|
-
program2.parseAsync(process.argv).then(() => checkForUpdate("0.
|
|
12057
|
+
program2.parseAsync(process.argv).then(() => checkForUpdate("0.4.0")).catch(handleError);
|
|
10920
12058
|
/*! Bundled license information:
|
|
10921
12059
|
|
|
10922
12060
|
ky/distribution/index.js:
|