@socketsecurity/cli-with-sentry 1.1.19 → 1.1.21
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/CHANGELOG.md +27 -9
- package/dist/cli.js +226 -160
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +28 -4
- package/dist/constants.js.map +1 -1
- package/dist/flags.js +21 -3
- package/dist/flags.js.map +1 -1
- package/dist/shadow-npm-bin2.js +2 -29
- package/dist/shadow-npm-bin2.js.map +1 -1
- package/dist/shadow-pnpm-bin2.js +7 -30
- package/dist/shadow-pnpm-bin2.js.map +1 -1
- package/dist/shadow-yarn-bin.js +9 -28
- package/dist/shadow-yarn-bin.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
- package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +1 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +1 -1
- package/dist/types/commands/organization/cmd-organization.d.mts.map +1 -1
- package/dist/types/commands/package/cmd-package.d.mts.map +1 -1
- package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
- package/dist/types/commands/patch/handle-patch.d.mts.map +1 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +1 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +1 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-view.d.mts.map +1 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +1 -1
- package/dist/types/constants.d.mts +6 -1
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/flags.d.mts.map +1 -1
- package/dist/types/shadow/npm-base.d.mts.map +1 -1
- package/dist/types/shadow/pnpm/bin.d.mts.map +1 -1
- package/dist/types/shadow/yarn/bin.d.mts.map +1 -1
- package/dist/types/test/json-output-validation.d.mts +37 -0
- package/dist/types/test/json-output-validation.d.mts.map +1 -0
- package/dist/types/test/mocks/socket-auth.d.mts +88 -0
- package/dist/types/test/mocks/socket-auth.d.mts.map +1 -0
- package/dist/types/utils/agent.d.mts.map +1 -1
- package/dist/types/utils/config.d.mts +1 -1
- package/dist/types/utils/determine-org-slug.d.mts.map +1 -1
- package/dist/types/utils/dlx-binary.d.mts +58 -0
- package/dist/types/utils/dlx-binary.d.mts.map +1 -0
- package/dist/types/utils/dlx-detection.d.mts +29 -0
- package/dist/types/utils/dlx-detection.d.mts.map +1 -0
- package/dist/types/utils/meow-with-subcommands.d.mts +33 -12
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/package-environment.d.mts.map +1 -1
- package/dist/types/utils/shadow-links.d.mts +5 -0
- package/dist/types/utils/shadow-links.d.mts.map +1 -0
- package/dist/types/utils/terminal-link.d.mts +52 -0
- package/dist/types/utils/terminal-link.d.mts.map +1 -0
- package/dist/types/utils/yarn-version.d.mts.map +1 -1
- package/dist/utils.js +537 -118
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +372 -372
- package/package.json +1 -1
- package/dist/types/shadow/npm/link.d.mts +0 -2
- package/dist/types/shadow/npm/link.d.mts.map +0 -1
- package/dist/types/shadow/pnpm/link.d.mts +0 -2
- package/dist/types/shadow/pnpm/link.d.mts.map +0 -1
- package/dist/types/shadow/yarn/link.d.mts +0 -2
- package/dist/types/shadow/yarn/link.d.mts.map +0 -1
package/dist/vendor.js
CHANGED
|
@@ -17,9 +17,8 @@ var require$$0$e = require$$0$7;
|
|
|
17
17
|
var require$$1$7 = require('node:http');
|
|
18
18
|
var require$$0$f = os$3;
|
|
19
19
|
var fs$6 = require('node:fs/promises');
|
|
20
|
-
var require$$1$8 = require('node:tty');
|
|
21
20
|
var signalExit = require('../external/@socketsecurity/registry/external/signal-exit');
|
|
22
|
-
var require$$0$g = require
|
|
21
|
+
var require$$0$g = require('node:tty');
|
|
23
22
|
var require$$0$h = process$2;
|
|
24
23
|
var require$$0$i = require('node:buffer');
|
|
25
24
|
var require$$2$3 = require('node:https');
|
|
@@ -35,6 +34,7 @@ var require$$10 = require('../external/@socketsecurity/registry/lib/json');
|
|
|
35
34
|
var require$$11 = require('../external/@socketsecurity/registry/lib/objects');
|
|
36
35
|
var require$$12 = require('../external/@socketsecurity/registry/lib/promises');
|
|
37
36
|
var require$$13 = require('../external/@socketsecurity/registry/lib/url');
|
|
37
|
+
var require$$1$8 = require$$0$g;
|
|
38
38
|
var node_buffer = require$$0$i;
|
|
39
39
|
var childProcess = require('node:child_process');
|
|
40
40
|
var require$$1$9 = require('node:path/win32');
|
|
@@ -11224,375 +11224,6 @@ function registryUrl(scope) {
|
|
|
11224
11224
|
return normalize$1(result[`${scope}:registry`] || npmConfigRegistry || result.registry || defaultUrl);
|
|
11225
11225
|
}
|
|
11226
11226
|
|
|
11227
|
-
var terminalLink = {exports: {}};
|
|
11228
|
-
|
|
11229
|
-
var ansiEscapes = {exports: {}};
|
|
11230
|
-
|
|
11231
|
-
var hasRequiredAnsiEscapes;
|
|
11232
|
-
function requireAnsiEscapes() {
|
|
11233
|
-
if (hasRequiredAnsiEscapes) return ansiEscapes.exports;
|
|
11234
|
-
hasRequiredAnsiEscapes = 1;
|
|
11235
|
-
(function (module) {
|
|
11236
|
-
|
|
11237
|
-
const ansiEscapes = module.exports;
|
|
11238
|
-
// TODO: remove this in the next major version
|
|
11239
|
-
module.exports.default = ansiEscapes;
|
|
11240
|
-
const ESC = '\u001B[';
|
|
11241
|
-
const OSC = '\u001B]';
|
|
11242
|
-
const BEL = '\u0007';
|
|
11243
|
-
const SEP = ';';
|
|
11244
|
-
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
11245
|
-
ansiEscapes.cursorTo = (x, y) => {
|
|
11246
|
-
if (typeof x !== 'number') {
|
|
11247
|
-
throw new TypeError('The `x` argument is required');
|
|
11248
|
-
}
|
|
11249
|
-
if (typeof y !== 'number') {
|
|
11250
|
-
return ESC + (x + 1) + 'G';
|
|
11251
|
-
}
|
|
11252
|
-
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
11253
|
-
};
|
|
11254
|
-
ansiEscapes.cursorMove = (x, y) => {
|
|
11255
|
-
if (typeof x !== 'number') {
|
|
11256
|
-
throw new TypeError('The `x` argument is required');
|
|
11257
|
-
}
|
|
11258
|
-
let ret = '';
|
|
11259
|
-
if (x < 0) {
|
|
11260
|
-
ret += ESC + -x + 'D';
|
|
11261
|
-
} else if (x > 0) {
|
|
11262
|
-
ret += ESC + x + 'C';
|
|
11263
|
-
}
|
|
11264
|
-
if (y < 0) {
|
|
11265
|
-
ret += ESC + -y + 'A';
|
|
11266
|
-
} else if (y > 0) {
|
|
11267
|
-
ret += ESC + y + 'B';
|
|
11268
|
-
}
|
|
11269
|
-
return ret;
|
|
11270
|
-
};
|
|
11271
|
-
ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
|
|
11272
|
-
ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
|
|
11273
|
-
ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
|
|
11274
|
-
ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
|
|
11275
|
-
ansiEscapes.cursorLeft = ESC + 'G';
|
|
11276
|
-
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
|
|
11277
|
-
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
|
|
11278
|
-
ansiEscapes.cursorGetPosition = ESC + '6n';
|
|
11279
|
-
ansiEscapes.cursorNextLine = ESC + 'E';
|
|
11280
|
-
ansiEscapes.cursorPrevLine = ESC + 'F';
|
|
11281
|
-
ansiEscapes.cursorHide = ESC + '?25l';
|
|
11282
|
-
ansiEscapes.cursorShow = ESC + '?25h';
|
|
11283
|
-
ansiEscapes.eraseLines = count => {
|
|
11284
|
-
let clear = '';
|
|
11285
|
-
for (let i = 0; i < count; i++) {
|
|
11286
|
-
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
|
|
11287
|
-
}
|
|
11288
|
-
if (count) {
|
|
11289
|
-
clear += ansiEscapes.cursorLeft;
|
|
11290
|
-
}
|
|
11291
|
-
return clear;
|
|
11292
|
-
};
|
|
11293
|
-
ansiEscapes.eraseEndLine = ESC + 'K';
|
|
11294
|
-
ansiEscapes.eraseStartLine = ESC + '1K';
|
|
11295
|
-
ansiEscapes.eraseLine = ESC + '2K';
|
|
11296
|
-
ansiEscapes.eraseDown = ESC + 'J';
|
|
11297
|
-
ansiEscapes.eraseUp = ESC + '1J';
|
|
11298
|
-
ansiEscapes.eraseScreen = ESC + '2J';
|
|
11299
|
-
ansiEscapes.scrollUp = ESC + 'S';
|
|
11300
|
-
ansiEscapes.scrollDown = ESC + 'T';
|
|
11301
|
-
ansiEscapes.clearScreen = '\u001Bc';
|
|
11302
|
-
ansiEscapes.clearTerminal = process.platform === 'win32' ? `${ansiEscapes.eraseScreen}${ESC}0f` :
|
|
11303
|
-
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
11304
|
-
// 2. Erases the whole screen including scrollback buffer
|
|
11305
|
-
// 3. Moves cursor to the top-left position
|
|
11306
|
-
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
11307
|
-
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
|
11308
|
-
ansiEscapes.beep = BEL;
|
|
11309
|
-
ansiEscapes.link = (text, url) => {
|
|
11310
|
-
return [OSC, '8', SEP, SEP, url, BEL, text, OSC, '8', SEP, SEP, BEL].join('');
|
|
11311
|
-
};
|
|
11312
|
-
ansiEscapes.image = (buffer, options = {}) => {
|
|
11313
|
-
let ret = `${OSC}1337;File=inline=1`;
|
|
11314
|
-
if (options.width) {
|
|
11315
|
-
ret += `;width=${options.width}`;
|
|
11316
|
-
}
|
|
11317
|
-
if (options.height) {
|
|
11318
|
-
ret += `;height=${options.height}`;
|
|
11319
|
-
}
|
|
11320
|
-
if (options.preserveAspectRatio === false) {
|
|
11321
|
-
ret += ';preserveAspectRatio=0';
|
|
11322
|
-
}
|
|
11323
|
-
return ret + ':' + buffer.toString('base64') + BEL;
|
|
11324
|
-
};
|
|
11325
|
-
ansiEscapes.iTerm = {
|
|
11326
|
-
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
11327
|
-
annotation: (message, options = {}) => {
|
|
11328
|
-
let ret = `${OSC}1337;`;
|
|
11329
|
-
const hasX = typeof options.x !== 'undefined';
|
|
11330
|
-
const hasY = typeof options.y !== 'undefined';
|
|
11331
|
-
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
|
|
11332
|
-
throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
|
|
11333
|
-
}
|
|
11334
|
-
message = message.replace(/\|/g, '');
|
|
11335
|
-
ret += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
|
|
11336
|
-
if (options.length > 0) {
|
|
11337
|
-
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join('|');
|
|
11338
|
-
} else {
|
|
11339
|
-
ret += message;
|
|
11340
|
-
}
|
|
11341
|
-
return ret + BEL;
|
|
11342
|
-
}
|
|
11343
|
-
};
|
|
11344
|
-
})(ansiEscapes);
|
|
11345
|
-
return ansiEscapes.exports;
|
|
11346
|
-
}
|
|
11347
|
-
|
|
11348
|
-
var hasFlag$1;
|
|
11349
|
-
var hasRequiredHasFlag$1;
|
|
11350
|
-
function requireHasFlag$1() {
|
|
11351
|
-
if (hasRequiredHasFlag$1) return hasFlag$1;
|
|
11352
|
-
hasRequiredHasFlag$1 = 1;
|
|
11353
|
-
hasFlag$1 = (flag, argv = process.argv) => {
|
|
11354
|
-
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
11355
|
-
const position = argv.indexOf(prefix + flag);
|
|
11356
|
-
const terminatorPosition = argv.indexOf('--');
|
|
11357
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11358
|
-
};
|
|
11359
|
-
return hasFlag$1;
|
|
11360
|
-
}
|
|
11361
|
-
|
|
11362
|
-
var supportsColor_1$1;
|
|
11363
|
-
var hasRequiredSupportsColor$2;
|
|
11364
|
-
function requireSupportsColor$2() {
|
|
11365
|
-
if (hasRequiredSupportsColor$2) return supportsColor_1$1;
|
|
11366
|
-
hasRequiredSupportsColor$2 = 1;
|
|
11367
|
-
const os = require$$0$f;
|
|
11368
|
-
const tty = require$$1$8;
|
|
11369
|
-
const hasFlag = requireHasFlag$1();
|
|
11370
|
-
const {
|
|
11371
|
-
env
|
|
11372
|
-
} = process;
|
|
11373
|
-
let forceColor;
|
|
11374
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) {
|
|
11375
|
-
forceColor = 0;
|
|
11376
|
-
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
11377
|
-
forceColor = 1;
|
|
11378
|
-
}
|
|
11379
|
-
if ('FORCE_COLOR' in env) {
|
|
11380
|
-
if (env.FORCE_COLOR === 'true') {
|
|
11381
|
-
forceColor = 1;
|
|
11382
|
-
} else if (env.FORCE_COLOR === 'false') {
|
|
11383
|
-
forceColor = 0;
|
|
11384
|
-
} else {
|
|
11385
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
11386
|
-
}
|
|
11387
|
-
}
|
|
11388
|
-
function translateLevel(level) {
|
|
11389
|
-
if (level === 0) {
|
|
11390
|
-
return false;
|
|
11391
|
-
}
|
|
11392
|
-
return {
|
|
11393
|
-
level,
|
|
11394
|
-
hasBasic: true,
|
|
11395
|
-
has256: level >= 2,
|
|
11396
|
-
has16m: level >= 3
|
|
11397
|
-
};
|
|
11398
|
-
}
|
|
11399
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
11400
|
-
if (forceColor === 0) {
|
|
11401
|
-
return 0;
|
|
11402
|
-
}
|
|
11403
|
-
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
11404
|
-
return 3;
|
|
11405
|
-
}
|
|
11406
|
-
if (hasFlag('color=256')) {
|
|
11407
|
-
return 2;
|
|
11408
|
-
}
|
|
11409
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
11410
|
-
return 0;
|
|
11411
|
-
}
|
|
11412
|
-
const min = forceColor || 0;
|
|
11413
|
-
if (env.TERM === 'dumb') {
|
|
11414
|
-
return min;
|
|
11415
|
-
}
|
|
11416
|
-
if (process.platform === 'win32') {
|
|
11417
|
-
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
11418
|
-
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
11419
|
-
const osRelease = os.release().split('.');
|
|
11420
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11421
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11422
|
-
}
|
|
11423
|
-
return 1;
|
|
11424
|
-
}
|
|
11425
|
-
if ('CI' in env) {
|
|
11426
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
11427
|
-
return 1;
|
|
11428
|
-
}
|
|
11429
|
-
return min;
|
|
11430
|
-
}
|
|
11431
|
-
if ('TEAMCITY_VERSION' in env) {
|
|
11432
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
11433
|
-
}
|
|
11434
|
-
if (env.COLORTERM === 'truecolor') {
|
|
11435
|
-
return 3;
|
|
11436
|
-
}
|
|
11437
|
-
if ('TERM_PROGRAM' in env) {
|
|
11438
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
11439
|
-
switch (env.TERM_PROGRAM) {
|
|
11440
|
-
case 'iTerm.app':
|
|
11441
|
-
return version >= 3 ? 3 : 2;
|
|
11442
|
-
case 'Apple_Terminal':
|
|
11443
|
-
return 2;
|
|
11444
|
-
// No default
|
|
11445
|
-
}
|
|
11446
|
-
}
|
|
11447
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
11448
|
-
return 2;
|
|
11449
|
-
}
|
|
11450
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
11451
|
-
return 1;
|
|
11452
|
-
}
|
|
11453
|
-
if ('COLORTERM' in env) {
|
|
11454
|
-
return 1;
|
|
11455
|
-
}
|
|
11456
|
-
return min;
|
|
11457
|
-
}
|
|
11458
|
-
function getSupportLevel(stream) {
|
|
11459
|
-
const level = supportsColor(stream, stream && stream.isTTY);
|
|
11460
|
-
return translateLevel(level);
|
|
11461
|
-
}
|
|
11462
|
-
supportsColor_1$1 = {
|
|
11463
|
-
supportsColor: getSupportLevel,
|
|
11464
|
-
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
11465
|
-
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
11466
|
-
};
|
|
11467
|
-
return supportsColor_1$1;
|
|
11468
|
-
}
|
|
11469
|
-
|
|
11470
|
-
var supportsHyperlinks;
|
|
11471
|
-
var hasRequiredSupportsHyperlinks;
|
|
11472
|
-
function requireSupportsHyperlinks() {
|
|
11473
|
-
if (hasRequiredSupportsHyperlinks) return supportsHyperlinks;
|
|
11474
|
-
hasRequiredSupportsHyperlinks = 1;
|
|
11475
|
-
const supportsColor = requireSupportsColor$2();
|
|
11476
|
-
const hasFlag = requireHasFlag$1();
|
|
11477
|
-
function parseVersion(versionString) {
|
|
11478
|
-
if (/^\d{3,4}$/.test(versionString)) {
|
|
11479
|
-
// Env var doesn't always use dots. example: 4601 => 46.1.0
|
|
11480
|
-
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
11481
|
-
return {
|
|
11482
|
-
major: 0,
|
|
11483
|
-
minor: parseInt(m[1], 10),
|
|
11484
|
-
patch: parseInt(m[2], 10)
|
|
11485
|
-
};
|
|
11486
|
-
}
|
|
11487
|
-
const versions = (versionString || '').split('.').map(n => parseInt(n, 10));
|
|
11488
|
-
return {
|
|
11489
|
-
major: versions[0],
|
|
11490
|
-
minor: versions[1],
|
|
11491
|
-
patch: versions[2]
|
|
11492
|
-
};
|
|
11493
|
-
}
|
|
11494
|
-
function supportsHyperlink(stream) {
|
|
11495
|
-
const {
|
|
11496
|
-
env
|
|
11497
|
-
} = process;
|
|
11498
|
-
if ('FORCE_HYPERLINK' in env) {
|
|
11499
|
-
return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
|
|
11500
|
-
}
|
|
11501
|
-
if (hasFlag('no-hyperlink') || hasFlag('no-hyperlinks') || hasFlag('hyperlink=false') || hasFlag('hyperlink=never')) {
|
|
11502
|
-
return false;
|
|
11503
|
-
}
|
|
11504
|
-
if (hasFlag('hyperlink=true') || hasFlag('hyperlink=always')) {
|
|
11505
|
-
return true;
|
|
11506
|
-
}
|
|
11507
|
-
|
|
11508
|
-
// Netlify does not run a TTY, it does not need `supportsColor` check
|
|
11509
|
-
if ('NETLIFY' in env) {
|
|
11510
|
-
return true;
|
|
11511
|
-
}
|
|
11512
|
-
|
|
11513
|
-
// If they specify no colors, they probably don't want hyperlinks.
|
|
11514
|
-
if (!supportsColor.supportsColor(stream)) {
|
|
11515
|
-
return false;
|
|
11516
|
-
}
|
|
11517
|
-
if (stream && !stream.isTTY) {
|
|
11518
|
-
return false;
|
|
11519
|
-
}
|
|
11520
|
-
if (process.platform === 'win32') {
|
|
11521
|
-
return false;
|
|
11522
|
-
}
|
|
11523
|
-
if ('CI' in env) {
|
|
11524
|
-
return false;
|
|
11525
|
-
}
|
|
11526
|
-
if ('TEAMCITY_VERSION' in env) {
|
|
11527
|
-
return false;
|
|
11528
|
-
}
|
|
11529
|
-
if ('TERM_PROGRAM' in env) {
|
|
11530
|
-
const version = parseVersion(env.TERM_PROGRAM_VERSION);
|
|
11531
|
-
switch (env.TERM_PROGRAM) {
|
|
11532
|
-
case 'iTerm.app':
|
|
11533
|
-
if (version.major === 3) {
|
|
11534
|
-
return version.minor >= 1;
|
|
11535
|
-
}
|
|
11536
|
-
return version.major > 3;
|
|
11537
|
-
case 'WezTerm':
|
|
11538
|
-
return version.major >= 20200620;
|
|
11539
|
-
case 'vscode':
|
|
11540
|
-
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
11541
|
-
// No default
|
|
11542
|
-
}
|
|
11543
|
-
}
|
|
11544
|
-
if ('VTE_VERSION' in env) {
|
|
11545
|
-
// 0.50.0 was supposed to support hyperlinks, but throws a segfault
|
|
11546
|
-
if (env.VTE_VERSION === '0.50.0') {
|
|
11547
|
-
return false;
|
|
11548
|
-
}
|
|
11549
|
-
const version = parseVersion(env.VTE_VERSION);
|
|
11550
|
-
return version.major > 0 || version.minor >= 50;
|
|
11551
|
-
}
|
|
11552
|
-
return false;
|
|
11553
|
-
}
|
|
11554
|
-
supportsHyperlinks = {
|
|
11555
|
-
supportsHyperlink,
|
|
11556
|
-
stdout: supportsHyperlink(process.stdout),
|
|
11557
|
-
stderr: supportsHyperlink(process.stderr)
|
|
11558
|
-
};
|
|
11559
|
-
return supportsHyperlinks;
|
|
11560
|
-
}
|
|
11561
|
-
|
|
11562
|
-
var hasRequiredTerminalLink;
|
|
11563
|
-
function requireTerminalLink() {
|
|
11564
|
-
if (hasRequiredTerminalLink) return terminalLink.exports;
|
|
11565
|
-
hasRequiredTerminalLink = 1;
|
|
11566
|
-
(function (module) {
|
|
11567
|
-
|
|
11568
|
-
const ansiEscapes = requireAnsiEscapes();
|
|
11569
|
-
const supportsHyperlinks = requireSupportsHyperlinks();
|
|
11570
|
-
const terminalLink = (text, url, {
|
|
11571
|
-
target = 'stdout',
|
|
11572
|
-
...options
|
|
11573
|
-
} = {}) => {
|
|
11574
|
-
if (!supportsHyperlinks[target]) {
|
|
11575
|
-
// If the fallback has been explicitly disabled, don't modify the text itself.
|
|
11576
|
-
if (options.fallback === false) {
|
|
11577
|
-
return text;
|
|
11578
|
-
}
|
|
11579
|
-
return typeof options.fallback === 'function' ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
|
|
11580
|
-
}
|
|
11581
|
-
return ansiEscapes.link(text, url);
|
|
11582
|
-
};
|
|
11583
|
-
module.exports = (text, url, options = {}) => terminalLink(text, url, options);
|
|
11584
|
-
module.exports.stderr = (text, url, options = {}) => terminalLink(text, url, {
|
|
11585
|
-
target: 'stderr',
|
|
11586
|
-
...options
|
|
11587
|
-
});
|
|
11588
|
-
module.exports.isSupported = supportsHyperlinks.stdout;
|
|
11589
|
-
module.exports.stderr.isSupported = supportsHyperlinks.stderr;
|
|
11590
|
-
})(terminalLink);
|
|
11591
|
-
return terminalLink.exports;
|
|
11592
|
-
}
|
|
11593
|
-
|
|
11594
|
-
var terminalLinkExports = requireTerminalLink();
|
|
11595
|
-
|
|
11596
11227
|
/* MAIN */
|
|
11597
11228
|
const attempt = (fn, fallback) => {
|
|
11598
11229
|
try {
|
|
@@ -29263,6 +28894,375 @@ function requireDist$e () {
|
|
|
29263
28894
|
|
|
29264
28895
|
var distExports$1 = requireDist$e();
|
|
29265
28896
|
|
|
28897
|
+
var terminalLink = {exports: {}};
|
|
28898
|
+
|
|
28899
|
+
var ansiEscapes = {exports: {}};
|
|
28900
|
+
|
|
28901
|
+
var hasRequiredAnsiEscapes;
|
|
28902
|
+
function requireAnsiEscapes() {
|
|
28903
|
+
if (hasRequiredAnsiEscapes) return ansiEscapes.exports;
|
|
28904
|
+
hasRequiredAnsiEscapes = 1;
|
|
28905
|
+
(function (module) {
|
|
28906
|
+
|
|
28907
|
+
const ansiEscapes = module.exports;
|
|
28908
|
+
// TODO: remove this in the next major version
|
|
28909
|
+
module.exports.default = ansiEscapes;
|
|
28910
|
+
const ESC = '\u001B[';
|
|
28911
|
+
const OSC = '\u001B]';
|
|
28912
|
+
const BEL = '\u0007';
|
|
28913
|
+
const SEP = ';';
|
|
28914
|
+
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
28915
|
+
ansiEscapes.cursorTo = (x, y) => {
|
|
28916
|
+
if (typeof x !== 'number') {
|
|
28917
|
+
throw new TypeError('The `x` argument is required');
|
|
28918
|
+
}
|
|
28919
|
+
if (typeof y !== 'number') {
|
|
28920
|
+
return ESC + (x + 1) + 'G';
|
|
28921
|
+
}
|
|
28922
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
28923
|
+
};
|
|
28924
|
+
ansiEscapes.cursorMove = (x, y) => {
|
|
28925
|
+
if (typeof x !== 'number') {
|
|
28926
|
+
throw new TypeError('The `x` argument is required');
|
|
28927
|
+
}
|
|
28928
|
+
let ret = '';
|
|
28929
|
+
if (x < 0) {
|
|
28930
|
+
ret += ESC + -x + 'D';
|
|
28931
|
+
} else if (x > 0) {
|
|
28932
|
+
ret += ESC + x + 'C';
|
|
28933
|
+
}
|
|
28934
|
+
if (y < 0) {
|
|
28935
|
+
ret += ESC + -y + 'A';
|
|
28936
|
+
} else if (y > 0) {
|
|
28937
|
+
ret += ESC + y + 'B';
|
|
28938
|
+
}
|
|
28939
|
+
return ret;
|
|
28940
|
+
};
|
|
28941
|
+
ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
|
|
28942
|
+
ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
|
|
28943
|
+
ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
|
|
28944
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
|
|
28945
|
+
ansiEscapes.cursorLeft = ESC + 'G';
|
|
28946
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
|
|
28947
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
|
|
28948
|
+
ansiEscapes.cursorGetPosition = ESC + '6n';
|
|
28949
|
+
ansiEscapes.cursorNextLine = ESC + 'E';
|
|
28950
|
+
ansiEscapes.cursorPrevLine = ESC + 'F';
|
|
28951
|
+
ansiEscapes.cursorHide = ESC + '?25l';
|
|
28952
|
+
ansiEscapes.cursorShow = ESC + '?25h';
|
|
28953
|
+
ansiEscapes.eraseLines = count => {
|
|
28954
|
+
let clear = '';
|
|
28955
|
+
for (let i = 0; i < count; i++) {
|
|
28956
|
+
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
|
|
28957
|
+
}
|
|
28958
|
+
if (count) {
|
|
28959
|
+
clear += ansiEscapes.cursorLeft;
|
|
28960
|
+
}
|
|
28961
|
+
return clear;
|
|
28962
|
+
};
|
|
28963
|
+
ansiEscapes.eraseEndLine = ESC + 'K';
|
|
28964
|
+
ansiEscapes.eraseStartLine = ESC + '1K';
|
|
28965
|
+
ansiEscapes.eraseLine = ESC + '2K';
|
|
28966
|
+
ansiEscapes.eraseDown = ESC + 'J';
|
|
28967
|
+
ansiEscapes.eraseUp = ESC + '1J';
|
|
28968
|
+
ansiEscapes.eraseScreen = ESC + '2J';
|
|
28969
|
+
ansiEscapes.scrollUp = ESC + 'S';
|
|
28970
|
+
ansiEscapes.scrollDown = ESC + 'T';
|
|
28971
|
+
ansiEscapes.clearScreen = '\u001Bc';
|
|
28972
|
+
ansiEscapes.clearTerminal = process.platform === 'win32' ? `${ansiEscapes.eraseScreen}${ESC}0f` :
|
|
28973
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
28974
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
28975
|
+
// 3. Moves cursor to the top-left position
|
|
28976
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
28977
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
|
28978
|
+
ansiEscapes.beep = BEL;
|
|
28979
|
+
ansiEscapes.link = (text, url) => {
|
|
28980
|
+
return [OSC, '8', SEP, SEP, url, BEL, text, OSC, '8', SEP, SEP, BEL].join('');
|
|
28981
|
+
};
|
|
28982
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
|
28983
|
+
let ret = `${OSC}1337;File=inline=1`;
|
|
28984
|
+
if (options.width) {
|
|
28985
|
+
ret += `;width=${options.width}`;
|
|
28986
|
+
}
|
|
28987
|
+
if (options.height) {
|
|
28988
|
+
ret += `;height=${options.height}`;
|
|
28989
|
+
}
|
|
28990
|
+
if (options.preserveAspectRatio === false) {
|
|
28991
|
+
ret += ';preserveAspectRatio=0';
|
|
28992
|
+
}
|
|
28993
|
+
return ret + ':' + buffer.toString('base64') + BEL;
|
|
28994
|
+
};
|
|
28995
|
+
ansiEscapes.iTerm = {
|
|
28996
|
+
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
28997
|
+
annotation: (message, options = {}) => {
|
|
28998
|
+
let ret = `${OSC}1337;`;
|
|
28999
|
+
const hasX = typeof options.x !== 'undefined';
|
|
29000
|
+
const hasY = typeof options.y !== 'undefined';
|
|
29001
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
|
|
29002
|
+
throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
|
|
29003
|
+
}
|
|
29004
|
+
message = message.replace(/\|/g, '');
|
|
29005
|
+
ret += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
|
|
29006
|
+
if (options.length > 0) {
|
|
29007
|
+
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join('|');
|
|
29008
|
+
} else {
|
|
29009
|
+
ret += message;
|
|
29010
|
+
}
|
|
29011
|
+
return ret + BEL;
|
|
29012
|
+
}
|
|
29013
|
+
};
|
|
29014
|
+
})(ansiEscapes);
|
|
29015
|
+
return ansiEscapes.exports;
|
|
29016
|
+
}
|
|
29017
|
+
|
|
29018
|
+
var hasFlag$1;
|
|
29019
|
+
var hasRequiredHasFlag$1;
|
|
29020
|
+
function requireHasFlag$1() {
|
|
29021
|
+
if (hasRequiredHasFlag$1) return hasFlag$1;
|
|
29022
|
+
hasRequiredHasFlag$1 = 1;
|
|
29023
|
+
hasFlag$1 = (flag, argv = process.argv) => {
|
|
29024
|
+
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
29025
|
+
const position = argv.indexOf(prefix + flag);
|
|
29026
|
+
const terminatorPosition = argv.indexOf('--');
|
|
29027
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
29028
|
+
};
|
|
29029
|
+
return hasFlag$1;
|
|
29030
|
+
}
|
|
29031
|
+
|
|
29032
|
+
var supportsColor_1$1;
|
|
29033
|
+
var hasRequiredSupportsColor$2;
|
|
29034
|
+
function requireSupportsColor$2() {
|
|
29035
|
+
if (hasRequiredSupportsColor$2) return supportsColor_1$1;
|
|
29036
|
+
hasRequiredSupportsColor$2 = 1;
|
|
29037
|
+
const os = require$$0$f;
|
|
29038
|
+
const tty = require$$1$8;
|
|
29039
|
+
const hasFlag = requireHasFlag$1();
|
|
29040
|
+
const {
|
|
29041
|
+
env
|
|
29042
|
+
} = process;
|
|
29043
|
+
let forceColor;
|
|
29044
|
+
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) {
|
|
29045
|
+
forceColor = 0;
|
|
29046
|
+
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
29047
|
+
forceColor = 1;
|
|
29048
|
+
}
|
|
29049
|
+
if ('FORCE_COLOR' in env) {
|
|
29050
|
+
if (env.FORCE_COLOR === 'true') {
|
|
29051
|
+
forceColor = 1;
|
|
29052
|
+
} else if (env.FORCE_COLOR === 'false') {
|
|
29053
|
+
forceColor = 0;
|
|
29054
|
+
} else {
|
|
29055
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
29056
|
+
}
|
|
29057
|
+
}
|
|
29058
|
+
function translateLevel(level) {
|
|
29059
|
+
if (level === 0) {
|
|
29060
|
+
return false;
|
|
29061
|
+
}
|
|
29062
|
+
return {
|
|
29063
|
+
level,
|
|
29064
|
+
hasBasic: true,
|
|
29065
|
+
has256: level >= 2,
|
|
29066
|
+
has16m: level >= 3
|
|
29067
|
+
};
|
|
29068
|
+
}
|
|
29069
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
29070
|
+
if (forceColor === 0) {
|
|
29071
|
+
return 0;
|
|
29072
|
+
}
|
|
29073
|
+
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
29074
|
+
return 3;
|
|
29075
|
+
}
|
|
29076
|
+
if (hasFlag('color=256')) {
|
|
29077
|
+
return 2;
|
|
29078
|
+
}
|
|
29079
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
29080
|
+
return 0;
|
|
29081
|
+
}
|
|
29082
|
+
const min = forceColor || 0;
|
|
29083
|
+
if (env.TERM === 'dumb') {
|
|
29084
|
+
return min;
|
|
29085
|
+
}
|
|
29086
|
+
if (process.platform === 'win32') {
|
|
29087
|
+
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
29088
|
+
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
29089
|
+
const osRelease = os.release().split('.');
|
|
29090
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
29091
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
29092
|
+
}
|
|
29093
|
+
return 1;
|
|
29094
|
+
}
|
|
29095
|
+
if ('CI' in env) {
|
|
29096
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
29097
|
+
return 1;
|
|
29098
|
+
}
|
|
29099
|
+
return min;
|
|
29100
|
+
}
|
|
29101
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
29102
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
29103
|
+
}
|
|
29104
|
+
if (env.COLORTERM === 'truecolor') {
|
|
29105
|
+
return 3;
|
|
29106
|
+
}
|
|
29107
|
+
if ('TERM_PROGRAM' in env) {
|
|
29108
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
29109
|
+
switch (env.TERM_PROGRAM) {
|
|
29110
|
+
case 'iTerm.app':
|
|
29111
|
+
return version >= 3 ? 3 : 2;
|
|
29112
|
+
case 'Apple_Terminal':
|
|
29113
|
+
return 2;
|
|
29114
|
+
// No default
|
|
29115
|
+
}
|
|
29116
|
+
}
|
|
29117
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
29118
|
+
return 2;
|
|
29119
|
+
}
|
|
29120
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
29121
|
+
return 1;
|
|
29122
|
+
}
|
|
29123
|
+
if ('COLORTERM' in env) {
|
|
29124
|
+
return 1;
|
|
29125
|
+
}
|
|
29126
|
+
return min;
|
|
29127
|
+
}
|
|
29128
|
+
function getSupportLevel(stream) {
|
|
29129
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
29130
|
+
return translateLevel(level);
|
|
29131
|
+
}
|
|
29132
|
+
supportsColor_1$1 = {
|
|
29133
|
+
supportsColor: getSupportLevel,
|
|
29134
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
29135
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
29136
|
+
};
|
|
29137
|
+
return supportsColor_1$1;
|
|
29138
|
+
}
|
|
29139
|
+
|
|
29140
|
+
var supportsHyperlinks;
|
|
29141
|
+
var hasRequiredSupportsHyperlinks;
|
|
29142
|
+
function requireSupportsHyperlinks() {
|
|
29143
|
+
if (hasRequiredSupportsHyperlinks) return supportsHyperlinks;
|
|
29144
|
+
hasRequiredSupportsHyperlinks = 1;
|
|
29145
|
+
const supportsColor = requireSupportsColor$2();
|
|
29146
|
+
const hasFlag = requireHasFlag$1();
|
|
29147
|
+
function parseVersion(versionString) {
|
|
29148
|
+
if (/^\d{3,4}$/.test(versionString)) {
|
|
29149
|
+
// Env var doesn't always use dots. example: 4601 => 46.1.0
|
|
29150
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
29151
|
+
return {
|
|
29152
|
+
major: 0,
|
|
29153
|
+
minor: parseInt(m[1], 10),
|
|
29154
|
+
patch: parseInt(m[2], 10)
|
|
29155
|
+
};
|
|
29156
|
+
}
|
|
29157
|
+
const versions = (versionString || '').split('.').map(n => parseInt(n, 10));
|
|
29158
|
+
return {
|
|
29159
|
+
major: versions[0],
|
|
29160
|
+
minor: versions[1],
|
|
29161
|
+
patch: versions[2]
|
|
29162
|
+
};
|
|
29163
|
+
}
|
|
29164
|
+
function supportsHyperlink(stream) {
|
|
29165
|
+
const {
|
|
29166
|
+
env
|
|
29167
|
+
} = process;
|
|
29168
|
+
if ('FORCE_HYPERLINK' in env) {
|
|
29169
|
+
return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
|
|
29170
|
+
}
|
|
29171
|
+
if (hasFlag('no-hyperlink') || hasFlag('no-hyperlinks') || hasFlag('hyperlink=false') || hasFlag('hyperlink=never')) {
|
|
29172
|
+
return false;
|
|
29173
|
+
}
|
|
29174
|
+
if (hasFlag('hyperlink=true') || hasFlag('hyperlink=always')) {
|
|
29175
|
+
return true;
|
|
29176
|
+
}
|
|
29177
|
+
|
|
29178
|
+
// Netlify does not run a TTY, it does not need `supportsColor` check
|
|
29179
|
+
if ('NETLIFY' in env) {
|
|
29180
|
+
return true;
|
|
29181
|
+
}
|
|
29182
|
+
|
|
29183
|
+
// If they specify no colors, they probably don't want hyperlinks.
|
|
29184
|
+
if (!supportsColor.supportsColor(stream)) {
|
|
29185
|
+
return false;
|
|
29186
|
+
}
|
|
29187
|
+
if (stream && !stream.isTTY) {
|
|
29188
|
+
return false;
|
|
29189
|
+
}
|
|
29190
|
+
if (process.platform === 'win32') {
|
|
29191
|
+
return false;
|
|
29192
|
+
}
|
|
29193
|
+
if ('CI' in env) {
|
|
29194
|
+
return false;
|
|
29195
|
+
}
|
|
29196
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
29197
|
+
return false;
|
|
29198
|
+
}
|
|
29199
|
+
if ('TERM_PROGRAM' in env) {
|
|
29200
|
+
const version = parseVersion(env.TERM_PROGRAM_VERSION);
|
|
29201
|
+
switch (env.TERM_PROGRAM) {
|
|
29202
|
+
case 'iTerm.app':
|
|
29203
|
+
if (version.major === 3) {
|
|
29204
|
+
return version.minor >= 1;
|
|
29205
|
+
}
|
|
29206
|
+
return version.major > 3;
|
|
29207
|
+
case 'WezTerm':
|
|
29208
|
+
return version.major >= 20200620;
|
|
29209
|
+
case 'vscode':
|
|
29210
|
+
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
29211
|
+
// No default
|
|
29212
|
+
}
|
|
29213
|
+
}
|
|
29214
|
+
if ('VTE_VERSION' in env) {
|
|
29215
|
+
// 0.50.0 was supposed to support hyperlinks, but throws a segfault
|
|
29216
|
+
if (env.VTE_VERSION === '0.50.0') {
|
|
29217
|
+
return false;
|
|
29218
|
+
}
|
|
29219
|
+
const version = parseVersion(env.VTE_VERSION);
|
|
29220
|
+
return version.major > 0 || version.minor >= 50;
|
|
29221
|
+
}
|
|
29222
|
+
return false;
|
|
29223
|
+
}
|
|
29224
|
+
supportsHyperlinks = {
|
|
29225
|
+
supportsHyperlink,
|
|
29226
|
+
stdout: supportsHyperlink(process.stdout),
|
|
29227
|
+
stderr: supportsHyperlink(process.stderr)
|
|
29228
|
+
};
|
|
29229
|
+
return supportsHyperlinks;
|
|
29230
|
+
}
|
|
29231
|
+
|
|
29232
|
+
var hasRequiredTerminalLink;
|
|
29233
|
+
function requireTerminalLink() {
|
|
29234
|
+
if (hasRequiredTerminalLink) return terminalLink.exports;
|
|
29235
|
+
hasRequiredTerminalLink = 1;
|
|
29236
|
+
(function (module) {
|
|
29237
|
+
|
|
29238
|
+
const ansiEscapes = requireAnsiEscapes();
|
|
29239
|
+
const supportsHyperlinks = requireSupportsHyperlinks();
|
|
29240
|
+
const terminalLink = (text, url, {
|
|
29241
|
+
target = 'stdout',
|
|
29242
|
+
...options
|
|
29243
|
+
} = {}) => {
|
|
29244
|
+
if (!supportsHyperlinks[target]) {
|
|
29245
|
+
// If the fallback has been explicitly disabled, don't modify the text itself.
|
|
29246
|
+
if (options.fallback === false) {
|
|
29247
|
+
return text;
|
|
29248
|
+
}
|
|
29249
|
+
return typeof options.fallback === 'function' ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
|
|
29250
|
+
}
|
|
29251
|
+
return ansiEscapes.link(text, url);
|
|
29252
|
+
};
|
|
29253
|
+
module.exports = (text, url, options = {}) => terminalLink(text, url, options);
|
|
29254
|
+
module.exports.stderr = (text, url, options = {}) => terminalLink(text, url, {
|
|
29255
|
+
target: 'stderr',
|
|
29256
|
+
...options
|
|
29257
|
+
});
|
|
29258
|
+
module.exports.isSupported = supportsHyperlinks.stdout;
|
|
29259
|
+
module.exports.stderr.isSupported = supportsHyperlinks.stderr;
|
|
29260
|
+
})(terminalLink);
|
|
29261
|
+
return terminalLink.exports;
|
|
29262
|
+
}
|
|
29263
|
+
|
|
29264
|
+
var terminalLinkExports = requireTerminalLink();
|
|
29265
|
+
|
|
29266
29266
|
var error$b;
|
|
29267
29267
|
var hasRequiredError$b;
|
|
29268
29268
|
function requireError$b() {
|
|
@@ -160978,5 +160978,5 @@ exports.terminalLinkExports = terminalLinkExports;
|
|
|
160978
160978
|
exports.updater = updater$1;
|
|
160979
160979
|
exports.yargsParser = yargsParser;
|
|
160980
160980
|
exports.yoctocolorsCjsExports = yoctocolorsCjsExports;
|
|
160981
|
-
//# debugId=
|
|
160981
|
+
//# debugId=55276b69-a85b-4093-b8dc-9ccc5865c66c
|
|
160982
160982
|
//# sourceMappingURL=vendor.js.map
|