@carbon/upgrade 11.5.0 → 11.6.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/cli.js +959 -229
- package/package.json +3 -3
package/cli.js
CHANGED
|
@@ -21,6 +21,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
23
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
28
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
29
|
mod
|
|
26
30
|
));
|
|
@@ -867,6 +871,8 @@ var require_route = __commonJS({
|
|
|
867
871
|
const models = Object.keys(conversions);
|
|
868
872
|
for (let len = models.length, i = 0; i < len; i++) {
|
|
869
873
|
graph[models[i]] = {
|
|
874
|
+
// http://jsperf.com/1-vs-infinity
|
|
875
|
+
// micro-opt, but this is simple.
|
|
870
876
|
distance: -1,
|
|
871
877
|
parent: null
|
|
872
878
|
};
|
|
@@ -1042,6 +1048,7 @@ var require_ansi_styles = __commonJS({
|
|
|
1042
1048
|
const styles = {
|
|
1043
1049
|
modifier: {
|
|
1044
1050
|
reset: [0, 0],
|
|
1051
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1045
1052
|
bold: [1, 22],
|
|
1046
1053
|
dim: [2, 22],
|
|
1047
1054
|
italic: [3, 23],
|
|
@@ -1059,6 +1066,7 @@ var require_ansi_styles = __commonJS({
|
|
|
1059
1066
|
magenta: [35, 39],
|
|
1060
1067
|
cyan: [36, 39],
|
|
1061
1068
|
white: [37, 39],
|
|
1069
|
+
// Bright color
|
|
1062
1070
|
blackBright: [90, 39],
|
|
1063
1071
|
redBright: [91, 39],
|
|
1064
1072
|
greenBright: [92, 39],
|
|
@@ -1077,6 +1085,7 @@ var require_ansi_styles = __commonJS({
|
|
|
1077
1085
|
bgMagenta: [45, 49],
|
|
1078
1086
|
bgCyan: [46, 49],
|
|
1079
1087
|
bgWhite: [47, 49],
|
|
1088
|
+
// Bright color
|
|
1080
1089
|
bgBlackBright: [100, 49],
|
|
1081
1090
|
bgRedBright: [101, 49],
|
|
1082
1091
|
bgGreenBright: [102, 49],
|
|
@@ -4276,6 +4285,10 @@ var require_separator = __commonJS({
|
|
|
4276
4285
|
this.type = "separator";
|
|
4277
4286
|
this.line = chalk4.dim(line || new Array(15).join(figures.line));
|
|
4278
4287
|
}
|
|
4288
|
+
/**
|
|
4289
|
+
* Stringify separator
|
|
4290
|
+
* @return {String} the separator display string
|
|
4291
|
+
*/
|
|
4279
4292
|
toString() {
|
|
4280
4293
|
return this.line;
|
|
4281
4294
|
}
|
|
@@ -4525,11 +4538,18 @@ var require_baseUI = __commonJS({
|
|
|
4525
4538
|
process.on("exit", this.onForceClose);
|
|
4526
4539
|
this.rl.on("SIGINT", this.onForceClose);
|
|
4527
4540
|
}
|
|
4541
|
+
/**
|
|
4542
|
+
* Handle the ^C exit
|
|
4543
|
+
* @return {null}
|
|
4544
|
+
*/
|
|
4528
4545
|
onForceClose() {
|
|
4529
4546
|
this.close();
|
|
4530
4547
|
process.kill(process.pid, "SIGINT");
|
|
4531
4548
|
console.log("");
|
|
4532
4549
|
}
|
|
4550
|
+
/**
|
|
4551
|
+
* Close the interface and cleanup listeners
|
|
4552
|
+
*/
|
|
4533
4553
|
close() {
|
|
4534
4554
|
this.rl.removeListener("SIGINT", this.onForceClose);
|
|
4535
4555
|
process.removeListener("exit", this.onForceClose);
|
|
@@ -4634,7 +4654,13 @@ var require_ansi_escapes = __commonJS({
|
|
|
4634
4654
|
ansiEscapes.scrollUp = ESC + "S";
|
|
4635
4655
|
ansiEscapes.scrollDown = ESC + "T";
|
|
4636
4656
|
ansiEscapes.clearScreen = "\x1Bc";
|
|
4637
|
-
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` :
|
|
4657
|
+
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
|
|
4658
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
4659
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
4660
|
+
// 3. Moves cursor to the top-left position
|
|
4661
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
4662
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
|
|
4663
|
+
);
|
|
4638
4664
|
ansiEscapes.beep = BEL;
|
|
4639
4665
|
ansiEscapes.link = (text, url) => {
|
|
4640
4666
|
return [
|
|
@@ -4724,6 +4750,10 @@ var require_bottom_bar = __commonJS({
|
|
|
4724
4750
|
this.bottomBar = opt.bottomBar || "";
|
|
4725
4751
|
this.render();
|
|
4726
4752
|
}
|
|
4753
|
+
/**
|
|
4754
|
+
* Render the prompt to screen
|
|
4755
|
+
* @return {BottomBar} self
|
|
4756
|
+
*/
|
|
4727
4757
|
render() {
|
|
4728
4758
|
this.write(this.bottomBar);
|
|
4729
4759
|
return this;
|
|
@@ -4732,6 +4762,11 @@ var require_bottom_bar = __commonJS({
|
|
|
4732
4762
|
rlUtils.clearLine(this.rl, this.bottomBar.split("\n").length);
|
|
4733
4763
|
return this;
|
|
4734
4764
|
}
|
|
4765
|
+
/**
|
|
4766
|
+
* Update the bottom bar content and rerender
|
|
4767
|
+
* @param {String} bottomBar Bottom bar content
|
|
4768
|
+
* @return {BottomBar} self
|
|
4769
|
+
*/
|
|
4735
4770
|
updateBottomBar(bottomBar) {
|
|
4736
4771
|
rlUtils.clearLine(this.rl, 1);
|
|
4737
4772
|
this.rl.output.unmute();
|
|
@@ -4741,6 +4776,11 @@ var require_bottom_bar = __commonJS({
|
|
|
4741
4776
|
this.rl.output.mute();
|
|
4742
4777
|
return this;
|
|
4743
4778
|
}
|
|
4779
|
+
/**
|
|
4780
|
+
* Write out log data
|
|
4781
|
+
* @param {String} data - The log data to be output
|
|
4782
|
+
* @return {BottomBar} self
|
|
4783
|
+
*/
|
|
4744
4784
|
writeLog(data) {
|
|
4745
4785
|
this.rl.output.unmute();
|
|
4746
4786
|
this.clean();
|
|
@@ -4749,9 +4789,18 @@ var require_bottom_bar = __commonJS({
|
|
|
4749
4789
|
this.rl.output.mute();
|
|
4750
4790
|
return this;
|
|
4751
4791
|
}
|
|
4792
|
+
/**
|
|
4793
|
+
* Make sure line end on a line feed
|
|
4794
|
+
* @param {String} str Input string
|
|
4795
|
+
* @return {String} The input string with a final line feed
|
|
4796
|
+
*/
|
|
4752
4797
|
enforceLF(str) {
|
|
4753
4798
|
return str.match(/[\r\n]$/) ? str : str + "\n";
|
|
4754
4799
|
}
|
|
4800
|
+
/**
|
|
4801
|
+
* Helper for writing message in Prompt
|
|
4802
|
+
* @param {String} message - The message to be output
|
|
4803
|
+
*/
|
|
4755
4804
|
write(message) {
|
|
4756
4805
|
const msgLines = message.split(/\n/);
|
|
4757
4806
|
this.height = msgLines.length;
|
|
@@ -15993,6 +16042,7 @@ var require_prompt = __commonJS({
|
|
|
15993
16042
|
this.process = obs.pipe(
|
|
15994
16043
|
concatMap(this.processQuestion.bind(this)),
|
|
15995
16044
|
publish()
|
|
16045
|
+
// Creates a hot Observable. It prevents duplicating prompts.
|
|
15996
16046
|
);
|
|
15997
16047
|
this.process.connect();
|
|
15998
16048
|
return this.process.pipe(
|
|
@@ -16002,6 +16052,9 @@ var require_prompt = __commonJS({
|
|
|
16002
16052
|
}, this.answers)
|
|
16003
16053
|
).toPromise(Promise).then(this.onCompletion.bind(this), this.onError.bind(this));
|
|
16004
16054
|
}
|
|
16055
|
+
/**
|
|
16056
|
+
* Once all prompt are over
|
|
16057
|
+
*/
|
|
16005
16058
|
onCompletion() {
|
|
16006
16059
|
this.close();
|
|
16007
16060
|
return this.answers;
|
|
@@ -16142,6 +16195,9 @@ var require_signals = __commonJS({
|
|
|
16142
16195
|
"SIGSYS",
|
|
16143
16196
|
"SIGQUIT",
|
|
16144
16197
|
"SIGIOT"
|
|
16198
|
+
// should detect profiler and enable/disable accordingly.
|
|
16199
|
+
// see #21
|
|
16200
|
+
// 'SIGPROF'
|
|
16145
16201
|
);
|
|
16146
16202
|
}
|
|
16147
16203
|
if (process.platform === "linux") {
|
|
@@ -16277,7 +16333,8 @@ var require_signal_exit = __commonJS({
|
|
|
16277
16333
|
if (!processOk(global.process)) {
|
|
16278
16334
|
return;
|
|
16279
16335
|
}
|
|
16280
|
-
process2.exitCode = code ||
|
|
16336
|
+
process2.exitCode = code || /* istanbul ignore next */
|
|
16337
|
+
0;
|
|
16281
16338
|
emit("exit", process2.exitCode, null);
|
|
16282
16339
|
emit("afterexit", process2.exitCode, null);
|
|
16283
16340
|
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
@@ -16708,7 +16765,11 @@ var require_arrayLikeKeys = __commonJS({
|
|
|
16708
16765
|
function arrayLikeKeys(value, inherited) {
|
|
16709
16766
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
16710
16767
|
for (var key in value) {
|
|
16711
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes &&
|
|
16768
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
16769
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
16770
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
16771
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
16772
|
+
isIndex(key, length)))) {
|
|
16712
16773
|
result.push(key);
|
|
16713
16774
|
}
|
|
16714
16775
|
}
|
|
@@ -18434,6 +18495,7 @@ var require_choices = __commonJS({
|
|
|
18434
18495
|
var Separator = require_separator();
|
|
18435
18496
|
var Choice = require_choice();
|
|
18436
18497
|
module2.exports = class Choices {
|
|
18498
|
+
/** @param {Array} choices All `choice` to keep in the collection */
|
|
18437
18499
|
constructor(choices, answers) {
|
|
18438
18500
|
this.choices = choices.map((val) => {
|
|
18439
18501
|
if (val.type === "separator") {
|
|
@@ -18462,20 +18524,41 @@ var require_choices = __commonJS({
|
|
|
18462
18524
|
}
|
|
18463
18525
|
});
|
|
18464
18526
|
}
|
|
18527
|
+
/**
|
|
18528
|
+
* Get a valid choice from the collection
|
|
18529
|
+
* @param {Number} selector The selected choice index
|
|
18530
|
+
* @return {Choice|Undefined} Return the matched choice or undefined
|
|
18531
|
+
*/
|
|
18465
18532
|
getChoice(selector) {
|
|
18466
18533
|
assert(typeof selector === "number");
|
|
18467
18534
|
return this.realChoices[selector];
|
|
18468
18535
|
}
|
|
18536
|
+
/**
|
|
18537
|
+
* Get a raw element from the collection
|
|
18538
|
+
* @param {Number} selector The selected index value
|
|
18539
|
+
* @return {Choice|Undefined} Return the matched choice or undefined
|
|
18540
|
+
*/
|
|
18469
18541
|
get(selector) {
|
|
18470
18542
|
assert(typeof selector === "number");
|
|
18471
18543
|
return this.choices[selector];
|
|
18472
18544
|
}
|
|
18545
|
+
/**
|
|
18546
|
+
* Match the valid choices against a where clause
|
|
18547
|
+
* @param {Object} whereClause Lodash `where` clause
|
|
18548
|
+
* @return {Array} Matching choices or empty array
|
|
18549
|
+
*/
|
|
18473
18550
|
where(whereClause) {
|
|
18474
18551
|
return _.filter(this.realChoices, whereClause);
|
|
18475
18552
|
}
|
|
18553
|
+
/**
|
|
18554
|
+
* Pluck a particular key from the choices
|
|
18555
|
+
* @param {String} propertyName Property name to select
|
|
18556
|
+
* @return {Array} Selected properties
|
|
18557
|
+
*/
|
|
18476
18558
|
pluck(propertyName) {
|
|
18477
18559
|
return _.map(this.realChoices, propertyName);
|
|
18478
18560
|
}
|
|
18561
|
+
// Expose usual Array methods
|
|
18479
18562
|
indexOf(...args) {
|
|
18480
18563
|
return this.choices.indexOf(...args);
|
|
18481
18564
|
}
|
|
@@ -18575,7 +18658,22 @@ var require_is_fullwidth_code_point = __commonJS({
|
|
|
18575
18658
|
if (Number.isNaN(codePoint)) {
|
|
18576
18659
|
return false;
|
|
18577
18660
|
}
|
|
18578
|
-
if (codePoint >= 4352 && (codePoint <= 4447 ||
|
|
18661
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
18662
|
+
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
18663
|
+
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
18664
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
18665
|
+
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
18666
|
+
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
18667
|
+
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
18668
|
+
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
18669
|
+
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
18670
|
+
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
18671
|
+
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
18672
|
+
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
18673
|
+
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
18674
|
+
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
18675
|
+
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
18676
|
+
131072 <= codePoint && codePoint <= 262141)) {
|
|
18579
18677
|
return true;
|
|
18580
18678
|
}
|
|
18581
18679
|
return false;
|
|
@@ -20237,7 +20335,8 @@ var require_is_unicode_supported = __commonJS({
|
|
|
20237
20335
|
if (process.platform !== "win32") {
|
|
20238
20336
|
return true;
|
|
20239
20337
|
}
|
|
20240
|
-
return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) ||
|
|
20338
|
+
return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
20339
|
+
process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty";
|
|
20241
20340
|
};
|
|
20242
20341
|
}
|
|
20243
20342
|
});
|
|
@@ -20593,7 +20692,14 @@ var require_wcwidth = __commonJS({
|
|
|
20593
20692
|
return opts.control;
|
|
20594
20693
|
if (bisearch(ucs))
|
|
20595
20694
|
return 0;
|
|
20596
|
-
return 1 + (ucs >= 4352 && (ucs <= 4447 ||
|
|
20695
|
+
return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants
|
|
20696
|
+
ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi
|
|
20697
|
+
ucs >= 44032 && ucs <= 55203 || // Hangul Syllables
|
|
20698
|
+
ucs >= 63744 && ucs <= 64255 || // CJK Compatibility Ideographs
|
|
20699
|
+
ucs >= 65040 && ucs <= 65049 || // Vertical forms
|
|
20700
|
+
ucs >= 65072 && ucs <= 65135 || // CJK Compatibility Forms
|
|
20701
|
+
ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms
|
|
20702
|
+
ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
|
|
20597
20703
|
}
|
|
20598
20704
|
function bisearch(ucs) {
|
|
20599
20705
|
var min = 0;
|
|
@@ -20784,6 +20890,7 @@ var require_buffer_list = __commonJS({
|
|
|
20784
20890
|
}
|
|
20785
20891
|
return ret;
|
|
20786
20892
|
}
|
|
20893
|
+
// Consumes a specified amount of bytes or characters from the buffered data.
|
|
20787
20894
|
}, {
|
|
20788
20895
|
key: "consume",
|
|
20789
20896
|
value: function consume(n, hasStrings) {
|
|
@@ -20803,6 +20910,7 @@ var require_buffer_list = __commonJS({
|
|
|
20803
20910
|
value: function first() {
|
|
20804
20911
|
return this.head.data;
|
|
20805
20912
|
}
|
|
20913
|
+
// Consumes a specified amount of characters from the buffered data.
|
|
20806
20914
|
}, {
|
|
20807
20915
|
key: "_getString",
|
|
20808
20916
|
value: function _getString(n) {
|
|
@@ -20836,6 +20944,7 @@ var require_buffer_list = __commonJS({
|
|
|
20836
20944
|
this.length -= c;
|
|
20837
20945
|
return ret;
|
|
20838
20946
|
}
|
|
20947
|
+
// Consumes a specified amount of bytes from the buffered data.
|
|
20839
20948
|
}, {
|
|
20840
20949
|
key: "_getBuffer",
|
|
20841
20950
|
value: function _getBuffer(n) {
|
|
@@ -20867,11 +20976,14 @@ var require_buffer_list = __commonJS({
|
|
|
20867
20976
|
this.length -= c;
|
|
20868
20977
|
return ret;
|
|
20869
20978
|
}
|
|
20979
|
+
// Make sure the linked list only shows the minimal necessary information.
|
|
20870
20980
|
}, {
|
|
20871
20981
|
key: custom,
|
|
20872
20982
|
value: function value(_, options) {
|
|
20873
20983
|
return inspect(this, _objectSpread({}, options, {
|
|
20984
|
+
// Only inspect one level.
|
|
20874
20985
|
depth: 0,
|
|
20986
|
+
// It should not recurse.
|
|
20875
20987
|
customInspect: false
|
|
20876
20988
|
}));
|
|
20877
20989
|
}
|
|
@@ -21357,6 +21469,9 @@ var require_stream_writable = __commonJS({
|
|
|
21357
21469
|
return this;
|
|
21358
21470
|
};
|
|
21359
21471
|
Object.defineProperty(Writable.prototype, "writableBuffer", {
|
|
21472
|
+
// making it explicit this property is not enumerable
|
|
21473
|
+
// because otherwise some prototype manipulation in
|
|
21474
|
+
// userland will fail
|
|
21360
21475
|
enumerable: false,
|
|
21361
21476
|
get: function get() {
|
|
21362
21477
|
return this._writableState && this._writableState.getBuffer();
|
|
@@ -21369,6 +21484,9 @@ var require_stream_writable = __commonJS({
|
|
|
21369
21484
|
return chunk;
|
|
21370
21485
|
}
|
|
21371
21486
|
Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
|
|
21487
|
+
// making it explicit this property is not enumerable
|
|
21488
|
+
// because otherwise some prototype manipulation in
|
|
21489
|
+
// userland will fail
|
|
21372
21490
|
enumerable: false,
|
|
21373
21491
|
get: function get() {
|
|
21374
21492
|
return this._writableState.highWaterMark;
|
|
@@ -21547,6 +21665,9 @@ var require_stream_writable = __commonJS({
|
|
|
21547
21665
|
return this;
|
|
21548
21666
|
};
|
|
21549
21667
|
Object.defineProperty(Writable.prototype, "writableLength", {
|
|
21668
|
+
// making it explicit this property is not enumerable
|
|
21669
|
+
// because otherwise some prototype manipulation in
|
|
21670
|
+
// userland will fail
|
|
21550
21671
|
enumerable: false,
|
|
21551
21672
|
get: function get() {
|
|
21552
21673
|
return this._writableState.length;
|
|
@@ -21619,6 +21740,9 @@ var require_stream_writable = __commonJS({
|
|
|
21619
21740
|
state.corkedRequestsFree.next = corkReq;
|
|
21620
21741
|
}
|
|
21621
21742
|
Object.defineProperty(Writable.prototype, "destroyed", {
|
|
21743
|
+
// making it explicit this property is not enumerable
|
|
21744
|
+
// because otherwise some prototype manipulation in
|
|
21745
|
+
// userland will fail
|
|
21622
21746
|
enumerable: false,
|
|
21623
21747
|
get: function get() {
|
|
21624
21748
|
if (this._writableState === void 0) {
|
|
@@ -21685,18 +21809,27 @@ var require_stream_duplex = __commonJS({
|
|
|
21685
21809
|
}
|
|
21686
21810
|
}
|
|
21687
21811
|
Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
|
|
21812
|
+
// making it explicit this property is not enumerable
|
|
21813
|
+
// because otherwise some prototype manipulation in
|
|
21814
|
+
// userland will fail
|
|
21688
21815
|
enumerable: false,
|
|
21689
21816
|
get: function get() {
|
|
21690
21817
|
return this._writableState.highWaterMark;
|
|
21691
21818
|
}
|
|
21692
21819
|
});
|
|
21693
21820
|
Object.defineProperty(Duplex.prototype, "writableBuffer", {
|
|
21821
|
+
// making it explicit this property is not enumerable
|
|
21822
|
+
// because otherwise some prototype manipulation in
|
|
21823
|
+
// userland will fail
|
|
21694
21824
|
enumerable: false,
|
|
21695
21825
|
get: function get() {
|
|
21696
21826
|
return this._writableState && this._writableState.getBuffer();
|
|
21697
21827
|
}
|
|
21698
21828
|
});
|
|
21699
21829
|
Object.defineProperty(Duplex.prototype, "writableLength", {
|
|
21830
|
+
// making it explicit this property is not enumerable
|
|
21831
|
+
// because otherwise some prototype manipulation in
|
|
21832
|
+
// userland will fail
|
|
21700
21833
|
enumerable: false,
|
|
21701
21834
|
get: function get() {
|
|
21702
21835
|
return this._writableState.length;
|
|
@@ -21711,6 +21844,9 @@ var require_stream_duplex = __commonJS({
|
|
|
21711
21844
|
self2.end();
|
|
21712
21845
|
}
|
|
21713
21846
|
Object.defineProperty(Duplex.prototype, "destroyed", {
|
|
21847
|
+
// making it explicit this property is not enumerable
|
|
21848
|
+
// because otherwise some prototype manipulation in
|
|
21849
|
+
// userland will fail
|
|
21714
21850
|
enumerable: false,
|
|
21715
21851
|
get: function get() {
|
|
21716
21852
|
if (this._readableState === void 0 || this._writableState === void 0) {
|
|
@@ -22541,6 +22677,9 @@ var require_stream_readable = __commonJS({
|
|
|
22541
22677
|
Stream.call(this);
|
|
22542
22678
|
}
|
|
22543
22679
|
Object.defineProperty(Readable.prototype, "destroyed", {
|
|
22680
|
+
// making it explicit this property is not enumerable
|
|
22681
|
+
// because otherwise some prototype manipulation in
|
|
22682
|
+
// userland will fail
|
|
22544
22683
|
enumerable: false,
|
|
22545
22684
|
get: function get() {
|
|
22546
22685
|
if (this._readableState === void 0) {
|
|
@@ -23128,18 +23267,27 @@ var require_stream_readable = __commonJS({
|
|
|
23128
23267
|
};
|
|
23129
23268
|
}
|
|
23130
23269
|
Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
|
|
23270
|
+
// making it explicit this property is not enumerable
|
|
23271
|
+
// because otherwise some prototype manipulation in
|
|
23272
|
+
// userland will fail
|
|
23131
23273
|
enumerable: false,
|
|
23132
23274
|
get: function get() {
|
|
23133
23275
|
return this._readableState.highWaterMark;
|
|
23134
23276
|
}
|
|
23135
23277
|
});
|
|
23136
23278
|
Object.defineProperty(Readable.prototype, "readableBuffer", {
|
|
23279
|
+
// making it explicit this property is not enumerable
|
|
23280
|
+
// because otherwise some prototype manipulation in
|
|
23281
|
+
// userland will fail
|
|
23137
23282
|
enumerable: false,
|
|
23138
23283
|
get: function get() {
|
|
23139
23284
|
return this._readableState && this._readableState.buffer;
|
|
23140
23285
|
}
|
|
23141
23286
|
});
|
|
23142
23287
|
Object.defineProperty(Readable.prototype, "readableFlowing", {
|
|
23288
|
+
// making it explicit this property is not enumerable
|
|
23289
|
+
// because otherwise some prototype manipulation in
|
|
23290
|
+
// userland will fail
|
|
23143
23291
|
enumerable: false,
|
|
23144
23292
|
get: function get() {
|
|
23145
23293
|
return this._readableState.flowing;
|
|
@@ -23152,6 +23300,9 @@ var require_stream_readable = __commonJS({
|
|
|
23152
23300
|
});
|
|
23153
23301
|
Readable._fromList = fromList;
|
|
23154
23302
|
Object.defineProperty(Readable.prototype, "readableLength", {
|
|
23303
|
+
// making it explicit this property is not enumerable
|
|
23304
|
+
// because otherwise some prototype manipulation in
|
|
23305
|
+
// userland will fail
|
|
23155
23306
|
enumerable: false,
|
|
23156
23307
|
get: function get() {
|
|
23157
23308
|
return this._readableState.length;
|
|
@@ -24266,11 +24417,17 @@ var require_screen_manager = __commonJS({
|
|
|
24266
24417
|
});
|
|
24267
24418
|
return width;
|
|
24268
24419
|
}
|
|
24420
|
+
/**
|
|
24421
|
+
* @param {string[]} lines
|
|
24422
|
+
*/
|
|
24269
24423
|
breakLines(lines, width = this.normalizedCliWidth()) {
|
|
24270
24424
|
return lines.map(
|
|
24271
24425
|
(line) => wrapAnsi(line, width, { trim: false, hard: true }).split("\n")
|
|
24272
24426
|
);
|
|
24273
24427
|
}
|
|
24428
|
+
/**
|
|
24429
|
+
* @param {string} content
|
|
24430
|
+
*/
|
|
24274
24431
|
forceLineReturn(content, width = this.normalizedCliWidth()) {
|
|
24275
24432
|
return this.breakLines(content.split("\n"), width).flat().join("\n");
|
|
24276
24433
|
}
|
|
@@ -24319,6 +24476,10 @@ var require_base = __commonJS({
|
|
|
24319
24476
|
this.rl = rl;
|
|
24320
24477
|
this.screen = new ScreenManager(this.rl);
|
|
24321
24478
|
}
|
|
24479
|
+
/**
|
|
24480
|
+
* Start the Inquiry session and manage output value filtering
|
|
24481
|
+
* @return {Promise}
|
|
24482
|
+
*/
|
|
24322
24483
|
run() {
|
|
24323
24484
|
return new Promise((resolve, reject) => {
|
|
24324
24485
|
this._run(
|
|
@@ -24327,15 +24488,29 @@ var require_base = __commonJS({
|
|
|
24327
24488
|
);
|
|
24328
24489
|
});
|
|
24329
24490
|
}
|
|
24491
|
+
// Default noop (this one should be overwritten in prompts)
|
|
24330
24492
|
_run(cb) {
|
|
24331
24493
|
cb();
|
|
24332
24494
|
}
|
|
24495
|
+
/**
|
|
24496
|
+
* Throw an error telling a required parameter is missing
|
|
24497
|
+
* @param {String} name Name of the missing param
|
|
24498
|
+
* @return {Throw Error}
|
|
24499
|
+
*/
|
|
24333
24500
|
throwParamError(name) {
|
|
24334
24501
|
throw new Error("You must provide a `" + name + "` parameter");
|
|
24335
24502
|
}
|
|
24503
|
+
/**
|
|
24504
|
+
* Called when the UI closes. Override to do any specific cleanup necessary
|
|
24505
|
+
*/
|
|
24336
24506
|
close() {
|
|
24337
24507
|
this.screen.releaseCursor();
|
|
24338
24508
|
}
|
|
24509
|
+
/**
|
|
24510
|
+
* Run the provided validation method each time a submit event occur.
|
|
24511
|
+
* @param {Rx.Observable} submit - submit event flow
|
|
24512
|
+
* @return {Object} Object containing two observables: `success` and `error`
|
|
24513
|
+
*/
|
|
24339
24514
|
handleSubmitEvents(submit) {
|
|
24340
24515
|
const self2 = this;
|
|
24341
24516
|
const validate = runAsync(this.opt.validate);
|
|
@@ -24374,9 +24549,19 @@ var require_base = __commonJS({
|
|
|
24374
24549
|
const content = bottomContent ? this.getQuestion() + value : this.getQuestion().slice(this.opt.prefix.length + 1) + value;
|
|
24375
24550
|
this.screen.renderWithSpinner(content, bottomContent);
|
|
24376
24551
|
}
|
|
24552
|
+
/**
|
|
24553
|
+
* Allow override, e.g. for password prompts
|
|
24554
|
+
* See: https://github.com/SBoudrias/Inquirer.js/issues/1022
|
|
24555
|
+
*
|
|
24556
|
+
* @return {String} value to display while spinning
|
|
24557
|
+
*/
|
|
24377
24558
|
getSpinningValue(value) {
|
|
24378
24559
|
return value;
|
|
24379
24560
|
}
|
|
24561
|
+
/**
|
|
24562
|
+
* Generate the prompt question string
|
|
24563
|
+
* @return {String} prompt question string
|
|
24564
|
+
*/
|
|
24380
24565
|
getQuestion() {
|
|
24381
24566
|
let message = (this.opt.prefix ? this.opt.prefix + " " : "") + chalk4.bold(this.opt.message) + this.opt.suffix + chalk4.reset(" ");
|
|
24382
24567
|
if (this.opt.default != null && this.status !== "touched" && this.status !== "answered") {
|
|
@@ -24447,6 +24632,10 @@ var require_paginator = __commonJS({
|
|
|
24447
24632
|
"use strict";
|
|
24448
24633
|
var chalk4 = require_source();
|
|
24449
24634
|
var Paginator = class {
|
|
24635
|
+
/**
|
|
24636
|
+
* @param {import("./screen-manager")} [screen]
|
|
24637
|
+
* @param {{isInfinite?: boolean}} [options]
|
|
24638
|
+
*/
|
|
24450
24639
|
constructor(screen, options = {}) {
|
|
24451
24640
|
const { isInfinite = true } = options;
|
|
24452
24641
|
this.lastIndex = 0;
|
|
@@ -24550,6 +24739,11 @@ var require_list = __commonJS({
|
|
|
24550
24739
|
const shouldLoop = this.opt.loop === void 0 ? true : this.opt.loop;
|
|
24551
24740
|
this.paginator = new Paginator(this.screen, { isInfinite: shouldLoop });
|
|
24552
24741
|
}
|
|
24742
|
+
/**
|
|
24743
|
+
* Start the Inquiry session
|
|
24744
|
+
* @param {Function} cb Callback when prompt is done
|
|
24745
|
+
* @return {this}
|
|
24746
|
+
*/
|
|
24553
24747
|
_run(cb) {
|
|
24554
24748
|
this.done = cb;
|
|
24555
24749
|
const self2 = this;
|
|
@@ -24568,6 +24762,10 @@ var require_list = __commonJS({
|
|
|
24568
24762
|
this.render();
|
|
24569
24763
|
return this;
|
|
24570
24764
|
}
|
|
24765
|
+
/**
|
|
24766
|
+
* Render the prompt to screen
|
|
24767
|
+
* @return {ListPrompt} self
|
|
24768
|
+
*/
|
|
24571
24769
|
render() {
|
|
24572
24770
|
let message = this.getQuestion();
|
|
24573
24771
|
if (this.firstRender) {
|
|
@@ -24599,6 +24797,9 @@ var require_list = __commonJS({
|
|
|
24599
24797
|
this.firstRender = false;
|
|
24600
24798
|
this.screen.render(message);
|
|
24601
24799
|
}
|
|
24800
|
+
/**
|
|
24801
|
+
* When user press `enter` key
|
|
24802
|
+
*/
|
|
24602
24803
|
onSubmit(value) {
|
|
24603
24804
|
this.status = "answered";
|
|
24604
24805
|
this.render();
|
|
@@ -24609,6 +24810,9 @@ var require_list = __commonJS({
|
|
|
24609
24810
|
getCurrentValue() {
|
|
24610
24811
|
return this.opt.choices.getChoice(this.selected).value;
|
|
24611
24812
|
}
|
|
24813
|
+
/**
|
|
24814
|
+
* When user press a key
|
|
24815
|
+
*/
|
|
24612
24816
|
onUpKey() {
|
|
24613
24817
|
this.selected = incrementListIndex(this.selected, "up", this.opt);
|
|
24614
24818
|
this.render();
|
|
@@ -24662,6 +24866,11 @@ var require_input = __commonJS({
|
|
|
24662
24866
|
var Base = require_base();
|
|
24663
24867
|
var observe = require_events();
|
|
24664
24868
|
var InputPrompt = class extends Base {
|
|
24869
|
+
/**
|
|
24870
|
+
* Start the Inquiry session
|
|
24871
|
+
* @param {Function} cb Callback when prompt is done
|
|
24872
|
+
* @return {this}
|
|
24873
|
+
*/
|
|
24665
24874
|
_run(cb) {
|
|
24666
24875
|
this.done = cb;
|
|
24667
24876
|
const events = observe(this.rl);
|
|
@@ -24673,6 +24882,10 @@ var require_input = __commonJS({
|
|
|
24673
24882
|
this.render();
|
|
24674
24883
|
return this;
|
|
24675
24884
|
}
|
|
24885
|
+
/**
|
|
24886
|
+
* Render the prompt to screen
|
|
24887
|
+
* @return {InputPrompt} self
|
|
24888
|
+
*/
|
|
24676
24889
|
render(error) {
|
|
24677
24890
|
let bottomContent = "";
|
|
24678
24891
|
let appendContent = "";
|
|
@@ -24694,6 +24907,9 @@ var require_input = __commonJS({
|
|
|
24694
24907
|
}
|
|
24695
24908
|
this.screen.render(message, bottomContent);
|
|
24696
24909
|
}
|
|
24910
|
+
/**
|
|
24911
|
+
* When user press `enter` key
|
|
24912
|
+
*/
|
|
24697
24913
|
filterInput(input) {
|
|
24698
24914
|
if (!input) {
|
|
24699
24915
|
return this.opt.default == null ? "" : this.opt.default;
|
|
@@ -24712,6 +24928,9 @@ var require_input = __commonJS({
|
|
|
24712
24928
|
this.rl.cursor += value.length;
|
|
24713
24929
|
this.render(isValid);
|
|
24714
24930
|
}
|
|
24931
|
+
/**
|
|
24932
|
+
* When user press a key
|
|
24933
|
+
*/
|
|
24715
24934
|
onKeypress() {
|
|
24716
24935
|
this.status = "touched";
|
|
24717
24936
|
this.render();
|
|
@@ -24768,6 +24987,11 @@ var require_confirm = __commonJS({
|
|
|
24768
24987
|
}
|
|
24769
24988
|
this.opt.default = rawDefault ? "Y/n" : "y/N";
|
|
24770
24989
|
}
|
|
24990
|
+
/**
|
|
24991
|
+
* Start the Inquiry session
|
|
24992
|
+
* @param {Function} cb Callback when prompt is done
|
|
24993
|
+
* @return {this}
|
|
24994
|
+
*/
|
|
24771
24995
|
_run(cb) {
|
|
24772
24996
|
this.done = cb;
|
|
24773
24997
|
const events = observe(this.rl);
|
|
@@ -24776,6 +25000,10 @@ var require_confirm = __commonJS({
|
|
|
24776
25000
|
this.render();
|
|
24777
25001
|
return this;
|
|
24778
25002
|
}
|
|
25003
|
+
/**
|
|
25004
|
+
* Render the prompt to screen
|
|
25005
|
+
* @return {ConfirmPrompt} self
|
|
25006
|
+
*/
|
|
24779
25007
|
render(answer) {
|
|
24780
25008
|
let message = this.getQuestion();
|
|
24781
25009
|
if (typeof answer === "boolean") {
|
|
@@ -24786,6 +25014,9 @@ var require_confirm = __commonJS({
|
|
|
24786
25014
|
this.screen.render(message);
|
|
24787
25015
|
return this;
|
|
24788
25016
|
}
|
|
25017
|
+
/**
|
|
25018
|
+
* When user press `enter` key
|
|
25019
|
+
*/
|
|
24789
25020
|
onEnd(input) {
|
|
24790
25021
|
this.status = "answered";
|
|
24791
25022
|
const output = this.opt.filter(input);
|
|
@@ -24793,6 +25024,9 @@ var require_confirm = __commonJS({
|
|
|
24793
25024
|
this.screen.done();
|
|
24794
25025
|
this.done(output);
|
|
24795
25026
|
}
|
|
25027
|
+
/**
|
|
25028
|
+
* When user press a key
|
|
25029
|
+
*/
|
|
24796
25030
|
onKeypress() {
|
|
24797
25031
|
this.render();
|
|
24798
25032
|
}
|
|
@@ -24842,6 +25076,11 @@ var require_rawlist = __commonJS({
|
|
|
24842
25076
|
const shouldLoop = this.opt.loop === void 0 ? true : this.opt.loop;
|
|
24843
25077
|
this.paginator = new Paginator(void 0, { isInfinite: shouldLoop });
|
|
24844
25078
|
}
|
|
25079
|
+
/**
|
|
25080
|
+
* Start the Inquiry session
|
|
25081
|
+
* @param {Function} cb Callback when prompt is done
|
|
25082
|
+
* @return {this}
|
|
25083
|
+
*/
|
|
24845
25084
|
_run(cb) {
|
|
24846
25085
|
this.done = cb;
|
|
24847
25086
|
const events = observe(this.rl);
|
|
@@ -24855,6 +25094,10 @@ var require_rawlist = __commonJS({
|
|
|
24855
25094
|
this.render();
|
|
24856
25095
|
return this;
|
|
24857
25096
|
}
|
|
25097
|
+
/**
|
|
25098
|
+
* Render the prompt to screen
|
|
25099
|
+
* @return {RawListPrompt} self
|
|
25100
|
+
*/
|
|
24858
25101
|
render(error) {
|
|
24859
25102
|
let message = this.getQuestion();
|
|
24860
25103
|
let bottomContent = "";
|
|
@@ -24871,6 +25114,9 @@ var require_rawlist = __commonJS({
|
|
|
24871
25114
|
}
|
|
24872
25115
|
this.screen.render(message, bottomContent);
|
|
24873
25116
|
}
|
|
25117
|
+
/**
|
|
25118
|
+
* When user press `enter` key
|
|
25119
|
+
*/
|
|
24874
25120
|
getCurrentValue(index) {
|
|
24875
25121
|
if (index == null) {
|
|
24876
25122
|
index = this.rawDefault;
|
|
@@ -24893,6 +25139,9 @@ var require_rawlist = __commonJS({
|
|
|
24893
25139
|
onError() {
|
|
24894
25140
|
this.render("Please enter a valid index");
|
|
24895
25141
|
}
|
|
25142
|
+
/**
|
|
25143
|
+
* When user press a key
|
|
25144
|
+
*/
|
|
24896
25145
|
onKeypress() {
|
|
24897
25146
|
let index;
|
|
24898
25147
|
if (this.lastKey === "arrow") {
|
|
@@ -24908,12 +25157,22 @@ var require_rawlist = __commonJS({
|
|
|
24908
25157
|
}
|
|
24909
25158
|
this.render();
|
|
24910
25159
|
}
|
|
25160
|
+
/**
|
|
25161
|
+
* When user press up key
|
|
25162
|
+
*/
|
|
24911
25163
|
onUpKey() {
|
|
24912
25164
|
this.onArrowKey("up");
|
|
24913
25165
|
}
|
|
25166
|
+
/**
|
|
25167
|
+
* When user press down key
|
|
25168
|
+
*/
|
|
24914
25169
|
onDownKey() {
|
|
24915
25170
|
this.onArrowKey("down");
|
|
24916
25171
|
}
|
|
25172
|
+
/**
|
|
25173
|
+
* When user press up or down key
|
|
25174
|
+
* @param {String} type Arrow type: up or down
|
|
25175
|
+
*/
|
|
24917
25176
|
onArrowKey(type) {
|
|
24918
25177
|
this.selected = incrementListIndex(this.selected, type, this.opt) || 0;
|
|
24919
25178
|
this.hiddenLine = String(this.selected + 1);
|
|
@@ -24975,6 +25234,11 @@ var require_expand2 = __commonJS({
|
|
|
24975
25234
|
this.opt.default = this.generateChoicesString(this.opt.choices, this.opt.default);
|
|
24976
25235
|
this.paginator = new Paginator(this.screen);
|
|
24977
25236
|
}
|
|
25237
|
+
/**
|
|
25238
|
+
* Start the Inquiry session
|
|
25239
|
+
* @param {Function} cb Callback when prompt is done
|
|
25240
|
+
* @return {this}
|
|
25241
|
+
*/
|
|
24978
25242
|
_run(cb) {
|
|
24979
25243
|
this.done = cb;
|
|
24980
25244
|
const events = observe(this.rl);
|
|
@@ -24987,6 +25251,10 @@ var require_expand2 = __commonJS({
|
|
|
24987
25251
|
this.render();
|
|
24988
25252
|
return this;
|
|
24989
25253
|
}
|
|
25254
|
+
/**
|
|
25255
|
+
* Render the prompt to screen
|
|
25256
|
+
* @return {ExpandPrompt} self
|
|
25257
|
+
*/
|
|
24990
25258
|
render(error, hint) {
|
|
24991
25259
|
let message = this.getQuestion();
|
|
24992
25260
|
let bottomContent = "";
|
|
@@ -25016,6 +25284,10 @@ var require_expand2 = __commonJS({
|
|
|
25016
25284
|
}
|
|
25017
25285
|
return selected.value;
|
|
25018
25286
|
}
|
|
25287
|
+
/**
|
|
25288
|
+
* Generate the prompt choices string
|
|
25289
|
+
* @return {String} Choices string
|
|
25290
|
+
*/
|
|
25019
25291
|
getChoices() {
|
|
25020
25292
|
let output = "";
|
|
25021
25293
|
this.opt.choices.forEach((choice) => {
|
|
@@ -25041,6 +25313,9 @@ var require_expand2 = __commonJS({
|
|
|
25041
25313
|
}
|
|
25042
25314
|
this.render(state.isValid);
|
|
25043
25315
|
}
|
|
25316
|
+
/**
|
|
25317
|
+
* When user press `enter` key
|
|
25318
|
+
*/
|
|
25044
25319
|
onSubmit(state) {
|
|
25045
25320
|
this.status = "answered";
|
|
25046
25321
|
const choice = this.opt.choices.where({ value: state.value })[0];
|
|
@@ -25049,6 +25324,9 @@ var require_expand2 = __commonJS({
|
|
|
25049
25324
|
this.screen.done();
|
|
25050
25325
|
this.done(state.value);
|
|
25051
25326
|
}
|
|
25327
|
+
/**
|
|
25328
|
+
* When user press a key
|
|
25329
|
+
*/
|
|
25052
25330
|
onKeypress() {
|
|
25053
25331
|
this.selectedKey = this.rl.line.toLowerCase();
|
|
25054
25332
|
const selected = this.opt.choices.where({ key: this.selectedKey })[0];
|
|
@@ -25058,6 +25336,10 @@ var require_expand2 = __commonJS({
|
|
|
25058
25336
|
this.render(null, selected ? selected.name : null);
|
|
25059
25337
|
}
|
|
25060
25338
|
}
|
|
25339
|
+
/**
|
|
25340
|
+
* Validate the choices
|
|
25341
|
+
* @param {Array} choices
|
|
25342
|
+
*/
|
|
25061
25343
|
validateChoices(choices) {
|
|
25062
25344
|
let formatError;
|
|
25063
25345
|
const errors = [];
|
|
@@ -25088,6 +25370,12 @@ var require_expand2 = __commonJS({
|
|
|
25088
25370
|
);
|
|
25089
25371
|
}
|
|
25090
25372
|
}
|
|
25373
|
+
/**
|
|
25374
|
+
* Generate a string out of the choices keys
|
|
25375
|
+
* @param {Array} choices
|
|
25376
|
+
* @param {Number|String} default - the choice index or name to capitalize
|
|
25377
|
+
* @return {String} The rendered choices key string
|
|
25378
|
+
*/
|
|
25091
25379
|
generateChoicesString(choices, defaultChoice) {
|
|
25092
25380
|
let defIndex = choices.realLength - 1;
|
|
25093
25381
|
if (typeof defaultChoice === "number" && this.opt.choices.getChoice(defaultChoice)) {
|
|
@@ -25152,6 +25440,11 @@ var require_checkbox = __commonJS({
|
|
|
25152
25440
|
const shouldLoop = this.opt.loop === void 0 ? true : this.opt.loop;
|
|
25153
25441
|
this.paginator = new Paginator(this.screen, { isInfinite: shouldLoop });
|
|
25154
25442
|
}
|
|
25443
|
+
/**
|
|
25444
|
+
* Start the Inquiry session
|
|
25445
|
+
* @param {Function} cb Callback when prompt is done
|
|
25446
|
+
* @return {this}
|
|
25447
|
+
*/
|
|
25155
25448
|
_run(cb) {
|
|
25156
25449
|
this.done = cb;
|
|
25157
25450
|
const events = observe(this.rl);
|
|
@@ -25171,6 +25464,10 @@ var require_checkbox = __commonJS({
|
|
|
25171
25464
|
this.firstRender = false;
|
|
25172
25465
|
return this;
|
|
25173
25466
|
}
|
|
25467
|
+
/**
|
|
25468
|
+
* Render the prompt to screen
|
|
25469
|
+
* @return {CheckboxPrompt} self
|
|
25470
|
+
*/
|
|
25174
25471
|
render(error) {
|
|
25175
25472
|
let message = this.getQuestion();
|
|
25176
25473
|
let bottomContent = "";
|
|
@@ -25205,6 +25502,9 @@ var require_checkbox = __commonJS({
|
|
|
25205
25502
|
}
|
|
25206
25503
|
this.screen.render(message, bottomContent);
|
|
25207
25504
|
}
|
|
25505
|
+
/**
|
|
25506
|
+
* When user press `enter` key
|
|
25507
|
+
*/
|
|
25208
25508
|
onEnd(state) {
|
|
25209
25509
|
this.status = "answered";
|
|
25210
25510
|
this.dontShowHints = true;
|
|
@@ -25317,6 +25617,11 @@ var require_password = __commonJS({
|
|
|
25317
25617
|
return new Array(input.length + 1).join(maskChar);
|
|
25318
25618
|
}
|
|
25319
25619
|
var PasswordPrompt = class extends Base {
|
|
25620
|
+
/**
|
|
25621
|
+
* Start the Inquiry session
|
|
25622
|
+
* @param {Function} cb Callback when prompt is done
|
|
25623
|
+
* @return {this}
|
|
25624
|
+
*/
|
|
25320
25625
|
_run(cb) {
|
|
25321
25626
|
this.done = cb;
|
|
25322
25627
|
const events = observe(this.rl);
|
|
@@ -25328,6 +25633,10 @@ var require_password = __commonJS({
|
|
|
25328
25633
|
this.render();
|
|
25329
25634
|
return this;
|
|
25330
25635
|
}
|
|
25636
|
+
/**
|
|
25637
|
+
* Render the prompt to screen
|
|
25638
|
+
* @return {PasswordPrompt} self
|
|
25639
|
+
*/
|
|
25331
25640
|
render(error) {
|
|
25332
25641
|
let message = this.getQuestion();
|
|
25333
25642
|
let bottomContent = "";
|
|
@@ -25347,9 +25656,15 @@ var require_password = __commonJS({
|
|
|
25347
25656
|
}
|
|
25348
25657
|
return this.opt.mask ? mask(value, this.opt.mask) : chalk4.italic.dim("[input is hidden] ");
|
|
25349
25658
|
}
|
|
25659
|
+
/**
|
|
25660
|
+
* Mask value during async filter/validation.
|
|
25661
|
+
*/
|
|
25350
25662
|
getSpinningValue(value) {
|
|
25351
25663
|
return this.getMaskedValue(value);
|
|
25352
25664
|
}
|
|
25665
|
+
/**
|
|
25666
|
+
* When user press `enter` key
|
|
25667
|
+
*/
|
|
25353
25668
|
filterInput(input) {
|
|
25354
25669
|
if (!input) {
|
|
25355
25670
|
return this.opt.default == null ? "" : this.opt.default;
|
|
@@ -30638,17 +30953,29 @@ var require_iso2022 = __commonJS({
|
|
|
30638
30953
|
};
|
|
30639
30954
|
this.escapeSequences = [
|
|
30640
30955
|
[27, 36, 40, 67],
|
|
30956
|
+
// KS X 1001:1992
|
|
30641
30957
|
[27, 36, 40, 68],
|
|
30958
|
+
// JIS X 212-1990
|
|
30642
30959
|
[27, 36, 64],
|
|
30960
|
+
// JIS C 6226-1978
|
|
30643
30961
|
[27, 36, 65],
|
|
30962
|
+
// GB 2312-80
|
|
30644
30963
|
[27, 36, 66],
|
|
30964
|
+
// JIS X 208-1983
|
|
30645
30965
|
[27, 38, 64],
|
|
30966
|
+
// JIS X 208 1990, 1997
|
|
30646
30967
|
[27, 40, 66],
|
|
30968
|
+
// ASCII
|
|
30647
30969
|
[27, 40, 72],
|
|
30970
|
+
// JIS-Roman
|
|
30648
30971
|
[27, 40, 73],
|
|
30972
|
+
// Half-width katakana
|
|
30649
30973
|
[27, 40, 74],
|
|
30974
|
+
// JIS-Roman
|
|
30650
30975
|
[27, 46, 65],
|
|
30976
|
+
// ISO 8859-1
|
|
30651
30977
|
[27, 46, 70]
|
|
30978
|
+
// ISO 8859-7
|
|
30652
30979
|
];
|
|
30653
30980
|
};
|
|
30654
30981
|
util.inherits(module2.exports.ISO_2022_JP, ISO_2022);
|
|
@@ -30667,16 +30994,27 @@ var require_iso2022 = __commonJS({
|
|
|
30667
30994
|
};
|
|
30668
30995
|
this.escapeSequences = [
|
|
30669
30996
|
[27, 36, 41, 65],
|
|
30997
|
+
// GB 2312-80
|
|
30670
30998
|
[27, 36, 41, 71],
|
|
30999
|
+
// CNS 11643-1992 Plane 1
|
|
30671
31000
|
[27, 36, 42, 72],
|
|
31001
|
+
// CNS 11643-1992 Plane 2
|
|
30672
31002
|
[27, 36, 41, 69],
|
|
31003
|
+
// ISO-IR-165
|
|
30673
31004
|
[27, 36, 43, 73],
|
|
31005
|
+
// CNS 11643-1992 Plane 3
|
|
30674
31006
|
[27, 36, 43, 74],
|
|
31007
|
+
// CNS 11643-1992 Plane 4
|
|
30675
31008
|
[27, 36, 43, 75],
|
|
31009
|
+
// CNS 11643-1992 Plane 5
|
|
30676
31010
|
[27, 36, 43, 76],
|
|
31011
|
+
// CNS 11643-1992 Plane 6
|
|
30677
31012
|
[27, 36, 43, 77],
|
|
31013
|
+
// CNS 11643-1992 Plane 7
|
|
30678
31014
|
[27, 78],
|
|
31015
|
+
// SS2
|
|
30679
31016
|
[27, 79]
|
|
31017
|
+
// SS3
|
|
30680
31018
|
];
|
|
30681
31019
|
};
|
|
30682
31020
|
util.inherits(module2.exports.ISO_2022_CN, ISO_2022);
|
|
@@ -30934,6 +31272,7 @@ var require_internal = __commonJS({
|
|
|
30934
31272
|
"use strict";
|
|
30935
31273
|
var Buffer2 = require_safer().Buffer;
|
|
30936
31274
|
module2.exports = {
|
|
31275
|
+
// Encodings
|
|
30937
31276
|
utf8: { type: "_internal", bomAware: true },
|
|
30938
31277
|
cesu8: { type: "_internal", bomAware: true },
|
|
30939
31278
|
unicode11utf8: "utf8",
|
|
@@ -30942,6 +31281,7 @@ var require_internal = __commonJS({
|
|
|
30942
31281
|
binary: { type: "_internal" },
|
|
30943
31282
|
base64: { type: "_internal" },
|
|
30944
31283
|
hex: { type: "_internal" },
|
|
31284
|
+
// Codec.
|
|
30945
31285
|
_internal: InternalCodec
|
|
30946
31286
|
};
|
|
30947
31287
|
function InternalCodec(codecOptions, iconv) {
|
|
@@ -31450,6 +31790,7 @@ var require_sbcs_data = __commonJS({
|
|
|
31450
31790
|
"../../node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module2) {
|
|
31451
31791
|
"use strict";
|
|
31452
31792
|
module2.exports = {
|
|
31793
|
+
// Not supported by iconv, not sure why.
|
|
31453
31794
|
"10029": "maccenteuro",
|
|
31454
31795
|
"maccenteuro": {
|
|
31455
31796
|
"type": "_sbcs",
|
|
@@ -31465,6 +31806,7 @@ var require_sbcs_data = __commonJS({
|
|
|
31465
31806
|
"type": "_sbcs",
|
|
31466
31807
|
"chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"
|
|
31467
31808
|
},
|
|
31809
|
+
// Aliases of generated encodings.
|
|
31468
31810
|
"ascii8bit": "ascii",
|
|
31469
31811
|
"usascii": "ascii",
|
|
31470
31812
|
"ansix34": "ascii",
|
|
@@ -33684,6 +34026,36 @@ var require_dbcs_data = __commonJS({
|
|
|
33684
34026
|
"../../node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module2) {
|
|
33685
34027
|
"use strict";
|
|
33686
34028
|
module2.exports = {
|
|
34029
|
+
// == Japanese/ShiftJIS ====================================================
|
|
34030
|
+
// All japanese encodings are based on JIS X set of standards:
|
|
34031
|
+
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
34032
|
+
// JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
34033
|
+
// Has several variations in 1978, 1983, 1990 and 1997.
|
|
34034
|
+
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
|
|
34035
|
+
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
|
|
34036
|
+
// 2 planes, first is superset of 0208, second - revised 0212.
|
|
34037
|
+
// Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
|
|
34038
|
+
// Byte encodings are:
|
|
34039
|
+
// * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
|
|
34040
|
+
// encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
|
|
34041
|
+
// Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
|
|
34042
|
+
// * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
|
|
34043
|
+
// 0x00-0x7F - lower part of 0201
|
|
34044
|
+
// 0x8E, 0xA1-0xDF - upper part of 0201
|
|
34045
|
+
// (0xA1-0xFE)x2 - 0208 plane (94x94).
|
|
34046
|
+
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
|
|
34047
|
+
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
|
|
34048
|
+
// Used as-is in ISO2022 family.
|
|
34049
|
+
// * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
34050
|
+
// 0201-1976 Roman, 0208-1978, 0208-1983.
|
|
34051
|
+
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
|
|
34052
|
+
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
|
|
34053
|
+
// * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
|
|
34054
|
+
// * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
|
|
34055
|
+
//
|
|
34056
|
+
// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
|
|
34057
|
+
//
|
|
34058
|
+
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
|
|
33687
34059
|
"shiftjis": {
|
|
33688
34060
|
type: "_dbcs",
|
|
33689
34061
|
table: function() {
|
|
@@ -33709,12 +34081,20 @@ var require_dbcs_data = __commonJS({
|
|
|
33709
34081
|
},
|
|
33710
34082
|
encodeAdd: { "\xA5": 92, "\u203E": 126 }
|
|
33711
34083
|
},
|
|
34084
|
+
// TODO: KDDI extension to Shift_JIS
|
|
34085
|
+
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
|
|
34086
|
+
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
|
|
34087
|
+
// == Chinese/GBK ==========================================================
|
|
34088
|
+
// http://en.wikipedia.org/wiki/GBK
|
|
34089
|
+
// We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
34090
|
+
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
|
|
33712
34091
|
"gb2312": "cp936",
|
|
33713
34092
|
"gb231280": "cp936",
|
|
33714
34093
|
"gb23121980": "cp936",
|
|
33715
34094
|
"csgb2312": "cp936",
|
|
33716
34095
|
"csiso58gb231280": "cp936",
|
|
33717
34096
|
"euccn": "cp936",
|
|
34097
|
+
// Microsoft's CP936 is a subset and approximation of GBK.
|
|
33718
34098
|
"windows936": "cp936",
|
|
33719
34099
|
"ms936": "cp936",
|
|
33720
34100
|
"936": "cp936",
|
|
@@ -33724,6 +34104,7 @@ var require_dbcs_data = __commonJS({
|
|
|
33724
34104
|
return require_cp936();
|
|
33725
34105
|
}
|
|
33726
34106
|
},
|
|
34107
|
+
// GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
|
|
33727
34108
|
"gbk": {
|
|
33728
34109
|
type: "_dbcs",
|
|
33729
34110
|
table: function() {
|
|
@@ -33732,6 +34113,11 @@ var require_dbcs_data = __commonJS({
|
|
|
33732
34113
|
},
|
|
33733
34114
|
"xgbk": "gbk",
|
|
33734
34115
|
"isoir58": "gbk",
|
|
34116
|
+
// GB18030 is an algorithmic extension of GBK.
|
|
34117
|
+
// Main source: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
34118
|
+
// http://icu-project.org/docs/papers/gb18030.html
|
|
34119
|
+
// http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
|
|
34120
|
+
// http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
|
|
33735
34121
|
"gb18030": {
|
|
33736
34122
|
type: "_dbcs",
|
|
33737
34123
|
table: function() {
|
|
@@ -33744,6 +34130,8 @@ var require_dbcs_data = __commonJS({
|
|
|
33744
34130
|
encodeAdd: { "\u20AC": 41699 }
|
|
33745
34131
|
},
|
|
33746
34132
|
"chinese": "gb18030",
|
|
34133
|
+
// == Korean ===============================================================
|
|
34134
|
+
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
|
|
33747
34135
|
"windows949": "cp949",
|
|
33748
34136
|
"ms949": "cp949",
|
|
33749
34137
|
"949": "cp949",
|
|
@@ -33761,6 +34149,28 @@ var require_dbcs_data = __commonJS({
|
|
|
33761
34149
|
"ksc56011987": "cp949",
|
|
33762
34150
|
"ksc56011989": "cp949",
|
|
33763
34151
|
"ksc5601": "cp949",
|
|
34152
|
+
// == Big5/Taiwan/Hong Kong ================================================
|
|
34153
|
+
// There are lots of tables for Big5 and cp950. Please see the following links for history:
|
|
34154
|
+
// http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
|
|
34155
|
+
// Variations, in roughly number of defined chars:
|
|
34156
|
+
// * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
|
|
34157
|
+
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
|
|
34158
|
+
// * Big5-2003 (Taiwan standard) almost superset of cp950.
|
|
34159
|
+
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
|
|
34160
|
+
// * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
34161
|
+
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
|
|
34162
|
+
// Plus, it has 4 combining sequences.
|
|
34163
|
+
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
|
|
34164
|
+
// because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
|
|
34165
|
+
// Implementations are not consistent within browsers; sometimes labeled as just big5.
|
|
34166
|
+
// MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
|
|
34167
|
+
// Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
|
|
34168
|
+
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
|
|
34169
|
+
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
|
|
34170
|
+
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
|
|
34171
|
+
//
|
|
34172
|
+
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
|
|
34173
|
+
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
|
|
33764
34174
|
"windows950": "cp950",
|
|
33765
34175
|
"ms950": "cp950",
|
|
33766
34176
|
"950": "cp950",
|
|
@@ -33770,6 +34180,7 @@ var require_dbcs_data = __commonJS({
|
|
|
33770
34180
|
return require_cp950();
|
|
33771
34181
|
}
|
|
33772
34182
|
},
|
|
34183
|
+
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
|
|
33773
34184
|
"big5": "big5hkscs",
|
|
33774
34185
|
"big5hkscs": {
|
|
33775
34186
|
type: "_dbcs",
|
|
@@ -34511,22 +34922,25 @@ var require_CreateFileError = __commonJS({
|
|
|
34511
34922
|
};
|
|
34512
34923
|
}();
|
|
34513
34924
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34514
|
-
var CreateFileError =
|
|
34515
|
-
|
|
34516
|
-
function
|
|
34517
|
-
|
|
34518
|
-
|
|
34519
|
-
|
|
34520
|
-
|
|
34521
|
-
|
|
34522
|
-
|
|
34523
|
-
|
|
34524
|
-
|
|
34925
|
+
var CreateFileError = (
|
|
34926
|
+
/** @class */
|
|
34927
|
+
function(_super) {
|
|
34928
|
+
__extends(CreateFileError2, _super);
|
|
34929
|
+
function CreateFileError2(originalError) {
|
|
34930
|
+
var _newTarget = this.constructor;
|
|
34931
|
+
var _this = _super.call(this, "Failed to create temporary file for editor") || this;
|
|
34932
|
+
_this.originalError = originalError;
|
|
34933
|
+
var proto = _newTarget.prototype;
|
|
34934
|
+
if (Object.setPrototypeOf) {
|
|
34935
|
+
Object.setPrototypeOf(_this, proto);
|
|
34936
|
+
} else {
|
|
34937
|
+
_this.__proto__ = _newTarget.prototype;
|
|
34938
|
+
}
|
|
34939
|
+
return _this;
|
|
34525
34940
|
}
|
|
34526
|
-
return
|
|
34527
|
-
}
|
|
34528
|
-
|
|
34529
|
-
}(Error);
|
|
34941
|
+
return CreateFileError2;
|
|
34942
|
+
}(Error)
|
|
34943
|
+
);
|
|
34530
34944
|
exports.CreateFileError = CreateFileError;
|
|
34531
34945
|
}
|
|
34532
34946
|
});
|
|
@@ -34555,22 +34969,25 @@ var require_LaunchEditorError = __commonJS({
|
|
|
34555
34969
|
};
|
|
34556
34970
|
}();
|
|
34557
34971
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34558
|
-
var LaunchEditorError =
|
|
34559
|
-
|
|
34560
|
-
function
|
|
34561
|
-
|
|
34562
|
-
|
|
34563
|
-
|
|
34564
|
-
|
|
34565
|
-
|
|
34566
|
-
|
|
34567
|
-
|
|
34568
|
-
|
|
34972
|
+
var LaunchEditorError = (
|
|
34973
|
+
/** @class */
|
|
34974
|
+
function(_super) {
|
|
34975
|
+
__extends(LaunchEditorError2, _super);
|
|
34976
|
+
function LaunchEditorError2(originalError) {
|
|
34977
|
+
var _newTarget = this.constructor;
|
|
34978
|
+
var _this = _super.call(this, "Failed launch editor") || this;
|
|
34979
|
+
_this.originalError = originalError;
|
|
34980
|
+
var proto = _newTarget.prototype;
|
|
34981
|
+
if (Object.setPrototypeOf) {
|
|
34982
|
+
Object.setPrototypeOf(_this, proto);
|
|
34983
|
+
} else {
|
|
34984
|
+
_this.__proto__ = _newTarget.prototype;
|
|
34985
|
+
}
|
|
34986
|
+
return _this;
|
|
34569
34987
|
}
|
|
34570
|
-
return
|
|
34571
|
-
}
|
|
34572
|
-
|
|
34573
|
-
}(Error);
|
|
34988
|
+
return LaunchEditorError2;
|
|
34989
|
+
}(Error)
|
|
34990
|
+
);
|
|
34574
34991
|
exports.LaunchEditorError = LaunchEditorError;
|
|
34575
34992
|
}
|
|
34576
34993
|
});
|
|
@@ -34599,22 +35016,25 @@ var require_ReadFileError = __commonJS({
|
|
|
34599
35016
|
};
|
|
34600
35017
|
}();
|
|
34601
35018
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34602
|
-
var ReadFileError =
|
|
34603
|
-
|
|
34604
|
-
function
|
|
34605
|
-
|
|
34606
|
-
|
|
34607
|
-
|
|
34608
|
-
|
|
34609
|
-
|
|
34610
|
-
|
|
34611
|
-
|
|
34612
|
-
|
|
35019
|
+
var ReadFileError = (
|
|
35020
|
+
/** @class */
|
|
35021
|
+
function(_super) {
|
|
35022
|
+
__extends(ReadFileError2, _super);
|
|
35023
|
+
function ReadFileError2(originalError) {
|
|
35024
|
+
var _newTarget = this.constructor;
|
|
35025
|
+
var _this = _super.call(this, "Failed to read temporary file") || this;
|
|
35026
|
+
_this.originalError = originalError;
|
|
35027
|
+
var proto = _newTarget.prototype;
|
|
35028
|
+
if (Object.setPrototypeOf) {
|
|
35029
|
+
Object.setPrototypeOf(_this, proto);
|
|
35030
|
+
} else {
|
|
35031
|
+
_this.__proto__ = _newTarget.prototype;
|
|
35032
|
+
}
|
|
35033
|
+
return _this;
|
|
34613
35034
|
}
|
|
34614
|
-
return
|
|
34615
|
-
}
|
|
34616
|
-
|
|
34617
|
-
}(Error);
|
|
35035
|
+
return ReadFileError2;
|
|
35036
|
+
}(Error)
|
|
35037
|
+
);
|
|
34618
35038
|
exports.ReadFileError = ReadFileError;
|
|
34619
35039
|
}
|
|
34620
35040
|
});
|
|
@@ -34643,22 +35063,25 @@ var require_RemoveFileError = __commonJS({
|
|
|
34643
35063
|
};
|
|
34644
35064
|
}();
|
|
34645
35065
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34646
|
-
var RemoveFileError =
|
|
34647
|
-
|
|
34648
|
-
function
|
|
34649
|
-
|
|
34650
|
-
|
|
34651
|
-
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
34655
|
-
|
|
34656
|
-
|
|
35066
|
+
var RemoveFileError = (
|
|
35067
|
+
/** @class */
|
|
35068
|
+
function(_super) {
|
|
35069
|
+
__extends(RemoveFileError2, _super);
|
|
35070
|
+
function RemoveFileError2(originalError) {
|
|
35071
|
+
var _newTarget = this.constructor;
|
|
35072
|
+
var _this = _super.call(this, "Failed to cleanup temporary file") || this;
|
|
35073
|
+
_this.originalError = originalError;
|
|
35074
|
+
var proto = _newTarget.prototype;
|
|
35075
|
+
if (Object.setPrototypeOf) {
|
|
35076
|
+
Object.setPrototypeOf(_this, proto);
|
|
35077
|
+
} else {
|
|
35078
|
+
_this.__proto__ = _newTarget.prototype;
|
|
35079
|
+
}
|
|
35080
|
+
return _this;
|
|
34657
35081
|
}
|
|
34658
|
-
return
|
|
34659
|
-
}
|
|
34660
|
-
|
|
34661
|
-
}(Error);
|
|
35082
|
+
return RemoveFileError2;
|
|
35083
|
+
}(Error)
|
|
35084
|
+
);
|
|
34662
35085
|
exports.RemoveFileError = RemoveFileError;
|
|
34663
35086
|
}
|
|
34664
35087
|
});
|
|
@@ -34710,141 +35133,144 @@ var require_main = __commonJS({
|
|
|
34710
35133
|
});
|
|
34711
35134
|
}
|
|
34712
35135
|
exports.editAsync = editAsync;
|
|
34713
|
-
var ExternalEditor =
|
|
34714
|
-
|
|
34715
|
-
|
|
34716
|
-
|
|
34717
|
-
|
|
34718
|
-
|
|
34719
|
-
|
|
34720
|
-
|
|
34721
|
-
|
|
34722
|
-
this.
|
|
34723
|
-
|
|
34724
|
-
|
|
34725
|
-
|
|
34726
|
-
|
|
34727
|
-
|
|
34728
|
-
|
|
34729
|
-
|
|
34730
|
-
|
|
34731
|
-
var
|
|
34732
|
-
|
|
35136
|
+
var ExternalEditor = (
|
|
35137
|
+
/** @class */
|
|
35138
|
+
function() {
|
|
35139
|
+
function ExternalEditor2(text, fileOptions) {
|
|
35140
|
+
if (text === void 0) {
|
|
35141
|
+
text = "";
|
|
35142
|
+
}
|
|
35143
|
+
this.text = "";
|
|
35144
|
+
this.fileOptions = {};
|
|
35145
|
+
this.text = text;
|
|
35146
|
+
if (fileOptions) {
|
|
35147
|
+
this.fileOptions = fileOptions;
|
|
35148
|
+
}
|
|
35149
|
+
this.determineEditor();
|
|
35150
|
+
this.createTemporaryFile();
|
|
35151
|
+
}
|
|
35152
|
+
ExternalEditor2.splitStringBySpace = function(str) {
|
|
35153
|
+
var pieces = [];
|
|
35154
|
+
var currentString = "";
|
|
35155
|
+
for (var strIndex = 0; strIndex < str.length; strIndex++) {
|
|
35156
|
+
var currentLetter = str[strIndex];
|
|
35157
|
+
if (strIndex > 0 && currentLetter === " " && str[strIndex - 1] !== "\\" && currentString.length > 0) {
|
|
35158
|
+
pieces.push(currentString);
|
|
35159
|
+
currentString = "";
|
|
35160
|
+
} else {
|
|
35161
|
+
currentString += currentLetter;
|
|
35162
|
+
}
|
|
35163
|
+
}
|
|
35164
|
+
if (currentString.length > 0) {
|
|
34733
35165
|
pieces.push(currentString);
|
|
34734
|
-
currentString = "";
|
|
34735
|
-
} else {
|
|
34736
|
-
currentString += currentLetter;
|
|
34737
35166
|
}
|
|
34738
|
-
|
|
34739
|
-
|
|
34740
|
-
|
|
34741
|
-
|
|
34742
|
-
|
|
34743
|
-
|
|
34744
|
-
|
|
34745
|
-
|
|
34746
|
-
|
|
34747
|
-
return this.tempFile;
|
|
34748
|
-
},
|
|
34749
|
-
enumerable: true,
|
|
34750
|
-
configurable: true
|
|
34751
|
-
});
|
|
34752
|
-
Object.defineProperty(ExternalEditor2.prototype, "last_exit_status", {
|
|
34753
|
-
get: function() {
|
|
34754
|
-
console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward.");
|
|
34755
|
-
return this.lastExitStatus;
|
|
34756
|
-
},
|
|
34757
|
-
enumerable: true,
|
|
34758
|
-
configurable: true
|
|
34759
|
-
});
|
|
34760
|
-
ExternalEditor2.prototype.run = function() {
|
|
34761
|
-
this.launchEditor();
|
|
34762
|
-
this.readTemporaryFile();
|
|
34763
|
-
return this.text;
|
|
34764
|
-
};
|
|
34765
|
-
ExternalEditor2.prototype.runAsync = function(callback) {
|
|
34766
|
-
var _this = this;
|
|
34767
|
-
try {
|
|
34768
|
-
this.launchEditorAsync(function() {
|
|
34769
|
-
try {
|
|
34770
|
-
_this.readTemporaryFile();
|
|
34771
|
-
setImmediate(callback, null, _this.text);
|
|
34772
|
-
} catch (readError) {
|
|
34773
|
-
setImmediate(callback, readError, null);
|
|
34774
|
-
}
|
|
34775
|
-
});
|
|
34776
|
-
} catch (launchError) {
|
|
34777
|
-
setImmediate(callback, launchError, null);
|
|
34778
|
-
}
|
|
34779
|
-
};
|
|
34780
|
-
ExternalEditor2.prototype.cleanup = function() {
|
|
34781
|
-
this.removeTemporaryFile();
|
|
34782
|
-
};
|
|
34783
|
-
ExternalEditor2.prototype.determineEditor = function() {
|
|
34784
|
-
var editor = process.env.VISUAL ? process.env.VISUAL : process.env.EDITOR ? process.env.EDITOR : /^win/.test(process.platform) ? "notepad" : "vim";
|
|
34785
|
-
var editorOpts = ExternalEditor2.splitStringBySpace(editor).map(function(piece) {
|
|
34786
|
-
return piece.replace("\\ ", " ");
|
|
35167
|
+
return pieces;
|
|
35168
|
+
};
|
|
35169
|
+
Object.defineProperty(ExternalEditor2.prototype, "temp_file", {
|
|
35170
|
+
get: function() {
|
|
35171
|
+
console.log("DEPRECATED: temp_file. Use tempFile moving forward.");
|
|
35172
|
+
return this.tempFile;
|
|
35173
|
+
},
|
|
35174
|
+
enumerable: true,
|
|
35175
|
+
configurable: true
|
|
34787
35176
|
});
|
|
34788
|
-
|
|
34789
|
-
|
|
34790
|
-
|
|
34791
|
-
|
|
34792
|
-
|
|
34793
|
-
|
|
34794
|
-
|
|
34795
|
-
|
|
34796
|
-
|
|
35177
|
+
Object.defineProperty(ExternalEditor2.prototype, "last_exit_status", {
|
|
35178
|
+
get: function() {
|
|
35179
|
+
console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward.");
|
|
35180
|
+
return this.lastExitStatus;
|
|
35181
|
+
},
|
|
35182
|
+
enumerable: true,
|
|
35183
|
+
configurable: true
|
|
35184
|
+
});
|
|
35185
|
+
ExternalEditor2.prototype.run = function() {
|
|
35186
|
+
this.launchEditor();
|
|
35187
|
+
this.readTemporaryFile();
|
|
35188
|
+
return this.text;
|
|
35189
|
+
};
|
|
35190
|
+
ExternalEditor2.prototype.runAsync = function(callback) {
|
|
35191
|
+
var _this = this;
|
|
35192
|
+
try {
|
|
35193
|
+
this.launchEditorAsync(function() {
|
|
35194
|
+
try {
|
|
35195
|
+
_this.readTemporaryFile();
|
|
35196
|
+
setImmediate(callback, null, _this.text);
|
|
35197
|
+
} catch (readError) {
|
|
35198
|
+
setImmediate(callback, readError, null);
|
|
35199
|
+
}
|
|
35200
|
+
});
|
|
35201
|
+
} catch (launchError) {
|
|
35202
|
+
setImmediate(callback, launchError, null);
|
|
34797
35203
|
}
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
}
|
|
34802
|
-
|
|
34803
|
-
|
|
34804
|
-
|
|
34805
|
-
|
|
34806
|
-
|
|
34807
|
-
|
|
34808
|
-
|
|
34809
|
-
|
|
34810
|
-
|
|
34811
|
-
|
|
35204
|
+
};
|
|
35205
|
+
ExternalEditor2.prototype.cleanup = function() {
|
|
35206
|
+
this.removeTemporaryFile();
|
|
35207
|
+
};
|
|
35208
|
+
ExternalEditor2.prototype.determineEditor = function() {
|
|
35209
|
+
var editor = process.env.VISUAL ? process.env.VISUAL : process.env.EDITOR ? process.env.EDITOR : /^win/.test(process.platform) ? "notepad" : "vim";
|
|
35210
|
+
var editorOpts = ExternalEditor2.splitStringBySpace(editor).map(function(piece) {
|
|
35211
|
+
return piece.replace("\\ ", " ");
|
|
35212
|
+
});
|
|
35213
|
+
var bin = editorOpts.shift();
|
|
35214
|
+
this.editor = { args: editorOpts, bin };
|
|
35215
|
+
};
|
|
35216
|
+
ExternalEditor2.prototype.createTemporaryFile = function() {
|
|
35217
|
+
try {
|
|
35218
|
+
this.tempFile = tmp_1.tmpNameSync(this.fileOptions);
|
|
35219
|
+
var opt = { encoding: "utf8" };
|
|
35220
|
+
if (this.fileOptions.hasOwnProperty("mode")) {
|
|
35221
|
+
opt.mode = this.fileOptions.mode;
|
|
34812
35222
|
}
|
|
34813
|
-
this.
|
|
35223
|
+
fs_1.writeFileSync(this.tempFile, this.text, opt);
|
|
35224
|
+
} catch (createFileError) {
|
|
35225
|
+
throw new CreateFileError_1.CreateFileError(createFileError);
|
|
34814
35226
|
}
|
|
34815
|
-
}
|
|
34816
|
-
|
|
34817
|
-
|
|
34818
|
-
|
|
34819
|
-
|
|
34820
|
-
|
|
34821
|
-
|
|
34822
|
-
|
|
34823
|
-
|
|
34824
|
-
|
|
34825
|
-
|
|
34826
|
-
|
|
34827
|
-
|
|
34828
|
-
|
|
34829
|
-
|
|
34830
|
-
|
|
34831
|
-
|
|
34832
|
-
|
|
34833
|
-
|
|
34834
|
-
|
|
34835
|
-
|
|
34836
|
-
|
|
34837
|
-
|
|
34838
|
-
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
34842
|
-
|
|
34843
|
-
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
35227
|
+
};
|
|
35228
|
+
ExternalEditor2.prototype.readTemporaryFile = function() {
|
|
35229
|
+
try {
|
|
35230
|
+
var tempFileBuffer = fs_1.readFileSync(this.tempFile);
|
|
35231
|
+
if (tempFileBuffer.length === 0) {
|
|
35232
|
+
this.text = "";
|
|
35233
|
+
} else {
|
|
35234
|
+
var encoding = chardet_1.detect(tempFileBuffer).toString();
|
|
35235
|
+
if (!iconv_lite_1.encodingExists(encoding)) {
|
|
35236
|
+
encoding = "utf8";
|
|
35237
|
+
}
|
|
35238
|
+
this.text = iconv_lite_1.decode(tempFileBuffer, encoding);
|
|
35239
|
+
}
|
|
35240
|
+
} catch (readFileError) {
|
|
35241
|
+
throw new ReadFileError_1.ReadFileError(readFileError);
|
|
35242
|
+
}
|
|
35243
|
+
};
|
|
35244
|
+
ExternalEditor2.prototype.removeTemporaryFile = function() {
|
|
35245
|
+
try {
|
|
35246
|
+
fs_1.unlinkSync(this.tempFile);
|
|
35247
|
+
} catch (removeFileError) {
|
|
35248
|
+
throw new RemoveFileError_1.RemoveFileError(removeFileError);
|
|
35249
|
+
}
|
|
35250
|
+
};
|
|
35251
|
+
ExternalEditor2.prototype.launchEditor = function() {
|
|
35252
|
+
try {
|
|
35253
|
+
var editorProcess = child_process_1.spawnSync(this.editor.bin, this.editor.args.concat([this.tempFile]), { stdio: "inherit" });
|
|
35254
|
+
this.lastExitStatus = editorProcess.status;
|
|
35255
|
+
} catch (launchError) {
|
|
35256
|
+
throw new LaunchEditorError_1.LaunchEditorError(launchError);
|
|
35257
|
+
}
|
|
35258
|
+
};
|
|
35259
|
+
ExternalEditor2.prototype.launchEditorAsync = function(callback) {
|
|
35260
|
+
var _this = this;
|
|
35261
|
+
try {
|
|
35262
|
+
var editorProcess = child_process_1.spawn(this.editor.bin, this.editor.args.concat([this.tempFile]), { stdio: "inherit" });
|
|
35263
|
+
editorProcess.on("exit", function(code) {
|
|
35264
|
+
_this.lastExitStatus = code;
|
|
35265
|
+
setImmediate(callback);
|
|
35266
|
+
});
|
|
35267
|
+
} catch (launchError) {
|
|
35268
|
+
throw new LaunchEditorError_1.LaunchEditorError(launchError);
|
|
35269
|
+
}
|
|
35270
|
+
};
|
|
35271
|
+
return ExternalEditor2;
|
|
35272
|
+
}()
|
|
35273
|
+
);
|
|
34848
35274
|
exports.ExternalEditor = ExternalEditor;
|
|
34849
35275
|
}
|
|
34850
35276
|
});
|
|
@@ -34859,6 +35285,11 @@ var require_editor = __commonJS({
|
|
|
34859
35285
|
var observe = require_events();
|
|
34860
35286
|
var { Subject } = require_cjs();
|
|
34861
35287
|
var EditorPrompt = class extends Base {
|
|
35288
|
+
/**
|
|
35289
|
+
* Start the Inquiry session
|
|
35290
|
+
* @param {Function} cb Callback when prompt is done
|
|
35291
|
+
* @return {this}
|
|
35292
|
+
*/
|
|
34862
35293
|
_run(cb) {
|
|
34863
35294
|
this.done = cb;
|
|
34864
35295
|
this.editorResult = new Subject();
|
|
@@ -34872,6 +35303,10 @@ var require_editor = __commonJS({
|
|
|
34872
35303
|
this.render();
|
|
34873
35304
|
return this;
|
|
34874
35305
|
}
|
|
35306
|
+
/**
|
|
35307
|
+
* Render the prompt to screen
|
|
35308
|
+
* @return {EditorPrompt} self
|
|
35309
|
+
*/
|
|
34875
35310
|
render(error) {
|
|
34876
35311
|
let bottomContent = "";
|
|
34877
35312
|
let message = this.getQuestion();
|
|
@@ -34885,6 +35320,9 @@ var require_editor = __commonJS({
|
|
|
34885
35320
|
}
|
|
34886
35321
|
this.screen.render(message, bottomContent);
|
|
34887
35322
|
}
|
|
35323
|
+
/**
|
|
35324
|
+
* Launch $EDITOR on user press enter
|
|
35325
|
+
*/
|
|
34888
35326
|
startExternalEditor() {
|
|
34889
35327
|
this.rl.pause();
|
|
34890
35328
|
editAsync(this.currentText, this.endExternalEditor.bind(this));
|
|
@@ -34971,7 +35409,8 @@ var require_constants = __commonJS({
|
|
|
34971
35409
|
"../../node_modules/semver/internal/constants.js"(exports, module2) {
|
|
34972
35410
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
34973
35411
|
var MAX_LENGTH = 256;
|
|
34974
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|
35412
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
35413
|
+
9007199254740991;
|
|
34975
35414
|
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
34976
35415
|
module2.exports = {
|
|
34977
35416
|
SEMVER_SPEC_VERSION,
|
|
@@ -35229,6 +35668,8 @@ var require_semver = __commonJS({
|
|
|
35229
35668
|
}
|
|
35230
35669
|
} while (++i);
|
|
35231
35670
|
}
|
|
35671
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
35672
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
35232
35673
|
inc(release, identifier) {
|
|
35233
35674
|
switch (release) {
|
|
35234
35675
|
case "premajor":
|
|
@@ -36077,6 +36518,7 @@ var require_lru_cache2 = __commonJS({
|
|
|
36077
36518
|
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
36078
36519
|
this.reset();
|
|
36079
36520
|
}
|
|
36521
|
+
// resize the cache when the max changes.
|
|
36080
36522
|
set max(mL) {
|
|
36081
36523
|
if (typeof mL !== "number" || mL < 0)
|
|
36082
36524
|
throw new TypeError("max must be a non-negative number");
|
|
@@ -36101,6 +36543,7 @@ var require_lru_cache2 = __commonJS({
|
|
|
36101
36543
|
get maxAge() {
|
|
36102
36544
|
return this[MAX_AGE];
|
|
36103
36545
|
}
|
|
36546
|
+
// resize the cache when the lengthCalculator changes.
|
|
36104
36547
|
set lengthCalculator(lC) {
|
|
36105
36548
|
if (typeof lC !== "function")
|
|
36106
36549
|
lC = naiveLength;
|
|
@@ -36415,6 +36858,7 @@ var require_range2 = __commonJS({
|
|
|
36415
36858
|
});
|
|
36416
36859
|
});
|
|
36417
36860
|
}
|
|
36861
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
36418
36862
|
test(version) {
|
|
36419
36863
|
if (!version) {
|
|
36420
36864
|
return false;
|
|
@@ -38299,6 +38743,7 @@ var require_mkdirs = __commonJS({
|
|
|
38299
38743
|
module2.exports = {
|
|
38300
38744
|
mkdirs: makeDir,
|
|
38301
38745
|
mkdirsSync: makeDirSync,
|
|
38746
|
+
// alias
|
|
38302
38747
|
mkdirp: makeDir,
|
|
38303
38748
|
mkdirpSync: makeDirSync,
|
|
38304
38749
|
ensureDir: makeDir,
|
|
@@ -39531,14 +39976,17 @@ var require_ensure = __commonJS({
|
|
|
39531
39976
|
var { createLink, createLinkSync } = require_link();
|
|
39532
39977
|
var { createSymlink, createSymlinkSync } = require_symlink();
|
|
39533
39978
|
module2.exports = {
|
|
39979
|
+
// file
|
|
39534
39980
|
createFile,
|
|
39535
39981
|
createFileSync,
|
|
39536
39982
|
ensureFile: createFile,
|
|
39537
39983
|
ensureFileSync: createFileSync,
|
|
39984
|
+
// link
|
|
39538
39985
|
createLink,
|
|
39539
39986
|
createLinkSync,
|
|
39540
39987
|
ensureLink: createLink,
|
|
39541
39988
|
ensureLinkSync: createLinkSync,
|
|
39989
|
+
// symlink
|
|
39542
39990
|
createSymlink,
|
|
39543
39991
|
createSymlinkSync,
|
|
39544
39992
|
ensureSymlink: createSymlink,
|
|
@@ -39673,6 +40121,7 @@ var require_jsonfile2 = __commonJS({
|
|
|
39673
40121
|
"use strict";
|
|
39674
40122
|
var jsonFile = require_jsonfile();
|
|
39675
40123
|
module2.exports = {
|
|
40124
|
+
// jsonfile exports
|
|
39676
40125
|
readJson: jsonFile.readFile,
|
|
39677
40126
|
readJsonSync: jsonFile.readFileSync,
|
|
39678
40127
|
writeJson: jsonFile.writeFile,
|
|
@@ -39924,7 +40373,9 @@ var require_lib2 = __commonJS({
|
|
|
39924
40373
|
"../../node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
39925
40374
|
"use strict";
|
|
39926
40375
|
module2.exports = {
|
|
40376
|
+
// Export promiseified graceful-fs:
|
|
39927
40377
|
...require_fs(),
|
|
40378
|
+
// Export extra methods:
|
|
39928
40379
|
...require_copy2(),
|
|
39929
40380
|
...require_empty2(),
|
|
39930
40381
|
...require_ensure(),
|
|
@@ -40918,50 +41369,97 @@ var require_constants2 = __commonJS({
|
|
|
40918
41369
|
"use strict";
|
|
40919
41370
|
module2.exports = {
|
|
40920
41371
|
MAX_LENGTH: 1024 * 64,
|
|
41372
|
+
// Digits
|
|
40921
41373
|
CHAR_0: "0",
|
|
41374
|
+
/* 0 */
|
|
40922
41375
|
CHAR_9: "9",
|
|
41376
|
+
/* 9 */
|
|
41377
|
+
// Alphabet chars.
|
|
40923
41378
|
CHAR_UPPERCASE_A: "A",
|
|
41379
|
+
/* A */
|
|
40924
41380
|
CHAR_LOWERCASE_A: "a",
|
|
41381
|
+
/* a */
|
|
40925
41382
|
CHAR_UPPERCASE_Z: "Z",
|
|
41383
|
+
/* Z */
|
|
40926
41384
|
CHAR_LOWERCASE_Z: "z",
|
|
41385
|
+
/* z */
|
|
40927
41386
|
CHAR_LEFT_PARENTHESES: "(",
|
|
41387
|
+
/* ( */
|
|
40928
41388
|
CHAR_RIGHT_PARENTHESES: ")",
|
|
41389
|
+
/* ) */
|
|
40929
41390
|
CHAR_ASTERISK: "*",
|
|
41391
|
+
/* * */
|
|
41392
|
+
// Non-alphabetic chars.
|
|
40930
41393
|
CHAR_AMPERSAND: "&",
|
|
41394
|
+
/* & */
|
|
40931
41395
|
CHAR_AT: "@",
|
|
41396
|
+
/* @ */
|
|
40932
41397
|
CHAR_BACKSLASH: "\\",
|
|
41398
|
+
/* \ */
|
|
40933
41399
|
CHAR_BACKTICK: "`",
|
|
41400
|
+
/* ` */
|
|
40934
41401
|
CHAR_CARRIAGE_RETURN: "\r",
|
|
41402
|
+
/* \r */
|
|
40935
41403
|
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
41404
|
+
/* ^ */
|
|
40936
41405
|
CHAR_COLON: ":",
|
|
41406
|
+
/* : */
|
|
40937
41407
|
CHAR_COMMA: ",",
|
|
41408
|
+
/* , */
|
|
40938
41409
|
CHAR_DOLLAR: "$",
|
|
41410
|
+
/* . */
|
|
40939
41411
|
CHAR_DOT: ".",
|
|
41412
|
+
/* . */
|
|
40940
41413
|
CHAR_DOUBLE_QUOTE: '"',
|
|
41414
|
+
/* " */
|
|
40941
41415
|
CHAR_EQUAL: "=",
|
|
41416
|
+
/* = */
|
|
40942
41417
|
CHAR_EXCLAMATION_MARK: "!",
|
|
41418
|
+
/* ! */
|
|
40943
41419
|
CHAR_FORM_FEED: "\f",
|
|
41420
|
+
/* \f */
|
|
40944
41421
|
CHAR_FORWARD_SLASH: "/",
|
|
41422
|
+
/* / */
|
|
40945
41423
|
CHAR_HASH: "#",
|
|
41424
|
+
/* # */
|
|
40946
41425
|
CHAR_HYPHEN_MINUS: "-",
|
|
41426
|
+
/* - */
|
|
40947
41427
|
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
41428
|
+
/* < */
|
|
40948
41429
|
CHAR_LEFT_CURLY_BRACE: "{",
|
|
41430
|
+
/* { */
|
|
40949
41431
|
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
41432
|
+
/* [ */
|
|
40950
41433
|
CHAR_LINE_FEED: "\n",
|
|
41434
|
+
/* \n */
|
|
40951
41435
|
CHAR_NO_BREAK_SPACE: "\xA0",
|
|
41436
|
+
/* \u00A0 */
|
|
40952
41437
|
CHAR_PERCENT: "%",
|
|
41438
|
+
/* % */
|
|
40953
41439
|
CHAR_PLUS: "+",
|
|
41440
|
+
/* + */
|
|
40954
41441
|
CHAR_QUESTION_MARK: "?",
|
|
41442
|
+
/* ? */
|
|
40955
41443
|
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
41444
|
+
/* > */
|
|
40956
41445
|
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
41446
|
+
/* } */
|
|
40957
41447
|
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
41448
|
+
/* ] */
|
|
40958
41449
|
CHAR_SEMICOLON: ";",
|
|
41450
|
+
/* ; */
|
|
40959
41451
|
CHAR_SINGLE_QUOTE: "'",
|
|
41452
|
+
/* ' */
|
|
40960
41453
|
CHAR_SPACE: " ",
|
|
41454
|
+
/* */
|
|
40961
41455
|
CHAR_TAB: " ",
|
|
41456
|
+
/* \t */
|
|
40962
41457
|
CHAR_UNDERSCORE: "_",
|
|
41458
|
+
/* _ */
|
|
40963
41459
|
CHAR_VERTICAL_LINE: "|",
|
|
41460
|
+
/* | */
|
|
40964
41461
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
|
|
41462
|
+
/* \uFEFF */
|
|
40965
41463
|
};
|
|
40966
41464
|
}
|
|
40967
41465
|
});
|
|
@@ -40974,17 +41472,29 @@ var require_parse3 = __commonJS({
|
|
|
40974
41472
|
var {
|
|
40975
41473
|
MAX_LENGTH,
|
|
40976
41474
|
CHAR_BACKSLASH,
|
|
41475
|
+
/* \ */
|
|
40977
41476
|
CHAR_BACKTICK,
|
|
41477
|
+
/* ` */
|
|
40978
41478
|
CHAR_COMMA,
|
|
41479
|
+
/* , */
|
|
40979
41480
|
CHAR_DOT,
|
|
41481
|
+
/* . */
|
|
40980
41482
|
CHAR_LEFT_PARENTHESES,
|
|
41483
|
+
/* ( */
|
|
40981
41484
|
CHAR_RIGHT_PARENTHESES,
|
|
41485
|
+
/* ) */
|
|
40982
41486
|
CHAR_LEFT_CURLY_BRACE,
|
|
41487
|
+
/* { */
|
|
40983
41488
|
CHAR_RIGHT_CURLY_BRACE,
|
|
41489
|
+
/* } */
|
|
40984
41490
|
CHAR_LEFT_SQUARE_BRACKET,
|
|
41491
|
+
/* [ */
|
|
40985
41492
|
CHAR_RIGHT_SQUARE_BRACKET,
|
|
41493
|
+
/* ] */
|
|
40986
41494
|
CHAR_DOUBLE_QUOTE,
|
|
41495
|
+
/* " */
|
|
40987
41496
|
CHAR_SINGLE_QUOTE,
|
|
41497
|
+
/* ' */
|
|
40988
41498
|
CHAR_NO_BREAK_SPACE,
|
|
40989
41499
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
40990
41500
|
} = require_constants2();
|
|
@@ -41333,61 +41843,112 @@ var require_constants3 = __commonJS({
|
|
|
41333
41843
|
module2.exports = {
|
|
41334
41844
|
MAX_LENGTH: 1024 * 64,
|
|
41335
41845
|
POSIX_REGEX_SOURCE,
|
|
41846
|
+
// regular expressions
|
|
41336
41847
|
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
41337
41848
|
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
41338
41849
|
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
41339
41850
|
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
41340
41851
|
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
41341
41852
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
41853
|
+
// Replace globs with equivalent patterns to reduce parsing time.
|
|
41342
41854
|
REPLACEMENTS: {
|
|
41343
41855
|
"***": "*",
|
|
41344
41856
|
"**/**": "**",
|
|
41345
41857
|
"**/**/**": "**"
|
|
41346
41858
|
},
|
|
41859
|
+
// Digits
|
|
41347
41860
|
CHAR_0: 48,
|
|
41861
|
+
/* 0 */
|
|
41348
41862
|
CHAR_9: 57,
|
|
41863
|
+
/* 9 */
|
|
41864
|
+
// Alphabet chars.
|
|
41349
41865
|
CHAR_UPPERCASE_A: 65,
|
|
41866
|
+
/* A */
|
|
41350
41867
|
CHAR_LOWERCASE_A: 97,
|
|
41868
|
+
/* a */
|
|
41351
41869
|
CHAR_UPPERCASE_Z: 90,
|
|
41870
|
+
/* Z */
|
|
41352
41871
|
CHAR_LOWERCASE_Z: 122,
|
|
41872
|
+
/* z */
|
|
41353
41873
|
CHAR_LEFT_PARENTHESES: 40,
|
|
41874
|
+
/* ( */
|
|
41354
41875
|
CHAR_RIGHT_PARENTHESES: 41,
|
|
41876
|
+
/* ) */
|
|
41355
41877
|
CHAR_ASTERISK: 42,
|
|
41878
|
+
/* * */
|
|
41879
|
+
// Non-alphabetic chars.
|
|
41356
41880
|
CHAR_AMPERSAND: 38,
|
|
41881
|
+
/* & */
|
|
41357
41882
|
CHAR_AT: 64,
|
|
41883
|
+
/* @ */
|
|
41358
41884
|
CHAR_BACKWARD_SLASH: 92,
|
|
41885
|
+
/* \ */
|
|
41359
41886
|
CHAR_CARRIAGE_RETURN: 13,
|
|
41887
|
+
/* \r */
|
|
41360
41888
|
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
41889
|
+
/* ^ */
|
|
41361
41890
|
CHAR_COLON: 58,
|
|
41891
|
+
/* : */
|
|
41362
41892
|
CHAR_COMMA: 44,
|
|
41893
|
+
/* , */
|
|
41363
41894
|
CHAR_DOT: 46,
|
|
41895
|
+
/* . */
|
|
41364
41896
|
CHAR_DOUBLE_QUOTE: 34,
|
|
41897
|
+
/* " */
|
|
41365
41898
|
CHAR_EQUAL: 61,
|
|
41899
|
+
/* = */
|
|
41366
41900
|
CHAR_EXCLAMATION_MARK: 33,
|
|
41901
|
+
/* ! */
|
|
41367
41902
|
CHAR_FORM_FEED: 12,
|
|
41903
|
+
/* \f */
|
|
41368
41904
|
CHAR_FORWARD_SLASH: 47,
|
|
41905
|
+
/* / */
|
|
41369
41906
|
CHAR_GRAVE_ACCENT: 96,
|
|
41907
|
+
/* ` */
|
|
41370
41908
|
CHAR_HASH: 35,
|
|
41909
|
+
/* # */
|
|
41371
41910
|
CHAR_HYPHEN_MINUS: 45,
|
|
41911
|
+
/* - */
|
|
41372
41912
|
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
41913
|
+
/* < */
|
|
41373
41914
|
CHAR_LEFT_CURLY_BRACE: 123,
|
|
41915
|
+
/* { */
|
|
41374
41916
|
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
41917
|
+
/* [ */
|
|
41375
41918
|
CHAR_LINE_FEED: 10,
|
|
41919
|
+
/* \n */
|
|
41376
41920
|
CHAR_NO_BREAK_SPACE: 160,
|
|
41921
|
+
/* \u00A0 */
|
|
41377
41922
|
CHAR_PERCENT: 37,
|
|
41923
|
+
/* % */
|
|
41378
41924
|
CHAR_PLUS: 43,
|
|
41925
|
+
/* + */
|
|
41379
41926
|
CHAR_QUESTION_MARK: 63,
|
|
41927
|
+
/* ? */
|
|
41380
41928
|
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
41929
|
+
/* > */
|
|
41381
41930
|
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
41931
|
+
/* } */
|
|
41382
41932
|
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
41933
|
+
/* ] */
|
|
41383
41934
|
CHAR_SEMICOLON: 59,
|
|
41935
|
+
/* ; */
|
|
41384
41936
|
CHAR_SINGLE_QUOTE: 39,
|
|
41937
|
+
/* ' */
|
|
41385
41938
|
CHAR_SPACE: 32,
|
|
41939
|
+
/* */
|
|
41386
41940
|
CHAR_TAB: 9,
|
|
41941
|
+
/* \t */
|
|
41387
41942
|
CHAR_UNDERSCORE: 95,
|
|
41943
|
+
/* _ */
|
|
41388
41944
|
CHAR_VERTICAL_LINE: 124,
|
|
41945
|
+
/* | */
|
|
41389
41946
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
41947
|
+
/* \uFEFF */
|
|
41390
41948
|
SEP: path3.sep,
|
|
41949
|
+
/**
|
|
41950
|
+
* Create EXTGLOB_CHARS
|
|
41951
|
+
*/
|
|
41391
41952
|
extglobChars(chars) {
|
|
41392
41953
|
return {
|
|
41393
41954
|
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
|
|
@@ -41397,6 +41958,9 @@ var require_constants3 = __commonJS({
|
|
|
41397
41958
|
"@": { type: "at", open: "(?:", close: ")" }
|
|
41398
41959
|
};
|
|
41399
41960
|
},
|
|
41961
|
+
/**
|
|
41962
|
+
* Create GLOB_CHARS
|
|
41963
|
+
*/
|
|
41400
41964
|
globChars(win32) {
|
|
41401
41965
|
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
41402
41966
|
}
|
|
@@ -41474,20 +42038,35 @@ var require_scan2 = __commonJS({
|
|
|
41474
42038
|
var utils = require_utils5();
|
|
41475
42039
|
var {
|
|
41476
42040
|
CHAR_ASTERISK,
|
|
42041
|
+
/* * */
|
|
41477
42042
|
CHAR_AT,
|
|
42043
|
+
/* @ */
|
|
41478
42044
|
CHAR_BACKWARD_SLASH,
|
|
42045
|
+
/* \ */
|
|
41479
42046
|
CHAR_COMMA,
|
|
42047
|
+
/* , */
|
|
41480
42048
|
CHAR_DOT,
|
|
42049
|
+
/* . */
|
|
41481
42050
|
CHAR_EXCLAMATION_MARK,
|
|
42051
|
+
/* ! */
|
|
41482
42052
|
CHAR_FORWARD_SLASH,
|
|
42053
|
+
/* / */
|
|
41483
42054
|
CHAR_LEFT_CURLY_BRACE,
|
|
42055
|
+
/* { */
|
|
41484
42056
|
CHAR_LEFT_PARENTHESES,
|
|
42057
|
+
/* ( */
|
|
41485
42058
|
CHAR_LEFT_SQUARE_BRACKET,
|
|
42059
|
+
/* [ */
|
|
41486
42060
|
CHAR_PLUS,
|
|
42061
|
+
/* + */
|
|
41487
42062
|
CHAR_QUESTION_MARK,
|
|
42063
|
+
/* ? */
|
|
41488
42064
|
CHAR_RIGHT_CURLY_BRACE,
|
|
42065
|
+
/* } */
|
|
41489
42066
|
CHAR_RIGHT_PARENTHESES,
|
|
42067
|
+
/* ) */
|
|
41490
42068
|
CHAR_RIGHT_SQUARE_BRACKET
|
|
42069
|
+
/* ] */
|
|
41491
42070
|
} = require_constants3();
|
|
41492
42071
|
var isPathSeparator = (code) => {
|
|
41493
42072
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
@@ -43218,8 +43797,18 @@ var require_tasks = __commonJS({
|
|
|
43218
43797
|
const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
|
|
43219
43798
|
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
|
43220
43799
|
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
|
43221
|
-
const staticTasks = convertPatternsToTasks(
|
|
43222
|
-
|
|
43800
|
+
const staticTasks = convertPatternsToTasks(
|
|
43801
|
+
staticPatterns,
|
|
43802
|
+
negativePatterns,
|
|
43803
|
+
/* dynamic */
|
|
43804
|
+
false
|
|
43805
|
+
);
|
|
43806
|
+
const dynamicTasks = convertPatternsToTasks(
|
|
43807
|
+
dynamicPatterns,
|
|
43808
|
+
negativePatterns,
|
|
43809
|
+
/* dynamic */
|
|
43810
|
+
true
|
|
43811
|
+
);
|
|
43223
43812
|
return staticTasks.concat(dynamicTasks);
|
|
43224
43813
|
}
|
|
43225
43814
|
exports.generate = generate;
|
|
@@ -44637,6 +45226,10 @@ var require_entry = __commonJS({
|
|
|
44637
45226
|
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
44638
45227
|
return utils.pattern.matchAny(fullpath, patternsRe);
|
|
44639
45228
|
}
|
|
45229
|
+
/**
|
|
45230
|
+
* First, just trying to apply patterns to the path.
|
|
45231
|
+
* Second, trying to apply patterns to the path with final slash.
|
|
45232
|
+
*/
|
|
44640
45233
|
_isMatchToPatterns(entryPath, patternsRe) {
|
|
44641
45234
|
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
|
44642
45235
|
return utils.pattern.matchAny(filepath, patternsRe) || utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -45707,6 +46300,7 @@ var require_ansi_styles2 = __commonJS({
|
|
|
45707
46300
|
const styles = {
|
|
45708
46301
|
modifier: {
|
|
45709
46302
|
reset: [0, 0],
|
|
46303
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
45710
46304
|
bold: [1, 22],
|
|
45711
46305
|
dim: [2, 22],
|
|
45712
46306
|
italic: [3, 23],
|
|
@@ -45725,6 +46319,7 @@ var require_ansi_styles2 = __commonJS({
|
|
|
45725
46319
|
magenta: [35, 39],
|
|
45726
46320
|
cyan: [36, 39],
|
|
45727
46321
|
white: [37, 39],
|
|
46322
|
+
// Bright color
|
|
45728
46323
|
blackBright: [90, 39],
|
|
45729
46324
|
redBright: [91, 39],
|
|
45730
46325
|
greenBright: [92, 39],
|
|
@@ -45743,6 +46338,7 @@ var require_ansi_styles2 = __commonJS({
|
|
|
45743
46338
|
bgMagenta: [45, 49],
|
|
45744
46339
|
bgCyan: [46, 49],
|
|
45745
46340
|
bgWhite: [47, 49],
|
|
46341
|
+
// Bright color
|
|
45746
46342
|
bgBlackBright: [100, 49],
|
|
45747
46343
|
bgRedBright: [101, 49],
|
|
45748
46344
|
bgGreenBright: [102, 49],
|
|
@@ -46372,7 +46968,8 @@ var require_Immutable = __commonJS({
|
|
|
46372
46968
|
return printAsLeaf(name);
|
|
46373
46969
|
}
|
|
46374
46970
|
if (val[IS_KEYED_SENTINEL]) {
|
|
46375
|
-
return `${name + SPACE}{${
|
|
46971
|
+
return `${name + SPACE}{${// from Immutable collection of entries or from ECMAScript object
|
|
46972
|
+
val._iter || val._object ? (0, _collections.printIteratorEntries)(
|
|
46376
46973
|
val.entries(),
|
|
46377
46974
|
config,
|
|
46378
46975
|
indentation,
|
|
@@ -46381,7 +46978,10 @@ var require_Immutable = __commonJS({
|
|
|
46381
46978
|
printer
|
|
46382
46979
|
) : LAZY}}`;
|
|
46383
46980
|
}
|
|
46384
|
-
return `${name + SPACE}[${val._iter ||
|
|
46981
|
+
return `${name + SPACE}[${val._iter || // from Immutable collection of values
|
|
46982
|
+
val._array || // from ECMAScript array
|
|
46983
|
+
val._collection || // from ECMAScript collection in immutable v4
|
|
46984
|
+
val._iterable ? (0, _collections.printIteratorValues)(
|
|
46385
46985
|
val.values(),
|
|
46386
46986
|
config,
|
|
46387
46987
|
indentation,
|
|
@@ -48009,19 +48609,23 @@ var require_build3 = __commonJS({
|
|
|
48009
48609
|
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
48010
48610
|
if (d < dMin) {
|
|
48011
48611
|
iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);
|
|
48012
|
-
} else if (
|
|
48013
|
-
|
|
48014
|
-
|
|
48015
|
-
|
|
48016
|
-
|
|
48017
|
-
|
|
48018
|
-
|
|
48019
|
-
|
|
48020
|
-
|
|
48021
|
-
|
|
48022
|
-
|
|
48023
|
-
|
|
48024
|
-
|
|
48612
|
+
} else if (
|
|
48613
|
+
// If a reverse path overlaps a forward path in the same diagonal,
|
|
48614
|
+
// return a division of the index intervals at the middle change.
|
|
48615
|
+
extendOverlappablePathsR(
|
|
48616
|
+
d,
|
|
48617
|
+
aStart,
|
|
48618
|
+
aEnd,
|
|
48619
|
+
bStart,
|
|
48620
|
+
bEnd,
|
|
48621
|
+
isCommon,
|
|
48622
|
+
aIndexesF,
|
|
48623
|
+
iMaxF,
|
|
48624
|
+
aIndexesR,
|
|
48625
|
+
iMaxR,
|
|
48626
|
+
division
|
|
48627
|
+
)
|
|
48628
|
+
) {
|
|
48025
48629
|
return;
|
|
48026
48630
|
}
|
|
48027
48631
|
}
|
|
@@ -48042,19 +48646,23 @@ var require_build3 = __commonJS({
|
|
|
48042
48646
|
);
|
|
48043
48647
|
if (d < dMin) {
|
|
48044
48648
|
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
48045
|
-
} else if (
|
|
48046
|
-
|
|
48047
|
-
|
|
48048
|
-
|
|
48049
|
-
|
|
48050
|
-
|
|
48051
|
-
|
|
48052
|
-
|
|
48053
|
-
|
|
48054
|
-
|
|
48055
|
-
|
|
48056
|
-
|
|
48057
|
-
|
|
48649
|
+
} else if (
|
|
48650
|
+
// If a forward path overlaps a reverse path in the same diagonal,
|
|
48651
|
+
// return a division of the index intervals at the middle change.
|
|
48652
|
+
extendOverlappablePathsF(
|
|
48653
|
+
d,
|
|
48654
|
+
aStart,
|
|
48655
|
+
aEnd,
|
|
48656
|
+
bStart,
|
|
48657
|
+
bEnd,
|
|
48658
|
+
isCommon,
|
|
48659
|
+
aIndexesF,
|
|
48660
|
+
iMaxF,
|
|
48661
|
+
aIndexesR,
|
|
48662
|
+
iMaxR,
|
|
48663
|
+
division
|
|
48664
|
+
)
|
|
48665
|
+
) {
|
|
48058
48666
|
return;
|
|
48059
48667
|
}
|
|
48060
48668
|
}
|
|
@@ -48718,7 +49326,9 @@ var require_getAlignedDiffs = __commonJS({
|
|
|
48718
49326
|
var ChangeBuffer = class {
|
|
48719
49327
|
op;
|
|
48720
49328
|
line;
|
|
49329
|
+
// incomplete line
|
|
48721
49330
|
lines;
|
|
49331
|
+
// complete lines
|
|
48722
49332
|
changeColor;
|
|
48723
49333
|
constructor(op, changeColor) {
|
|
48724
49334
|
this.op = op;
|
|
@@ -48735,15 +49345,18 @@ var require_getAlignedDiffs = __commonJS({
|
|
|
48735
49345
|
this.op,
|
|
48736
49346
|
concatenateRelevantDiffs(this.op, this.line, this.changeColor)
|
|
48737
49347
|
) : this.line[0][0] === this.op ? this.line[0] : new _cleanupSemantic.Diff(this.op, this.line[0][1])
|
|
49348
|
+
// was common diff
|
|
48738
49349
|
);
|
|
48739
49350
|
this.line.length = 0;
|
|
48740
49351
|
}
|
|
48741
49352
|
isLineEmpty() {
|
|
48742
49353
|
return this.line.length === 0;
|
|
48743
49354
|
}
|
|
49355
|
+
// Minor input to buffer.
|
|
48744
49356
|
pushDiff(diff2) {
|
|
48745
49357
|
this.line.push(diff2);
|
|
48746
49358
|
}
|
|
49359
|
+
// Main input to buffer.
|
|
48747
49360
|
align(diff2) {
|
|
48748
49361
|
const string = diff2[1];
|
|
48749
49362
|
if (string.includes("\n")) {
|
|
@@ -48761,6 +49374,7 @@ var require_getAlignedDiffs = __commonJS({
|
|
|
48761
49374
|
this.pushDiff(diff2);
|
|
48762
49375
|
}
|
|
48763
49376
|
}
|
|
49377
|
+
// Output from buffer.
|
|
48764
49378
|
moveLinesTo(lines) {
|
|
48765
49379
|
if (!this.isLineEmpty()) {
|
|
48766
49380
|
this.pushLine();
|
|
@@ -48794,6 +49408,7 @@ var require_getAlignedDiffs = __commonJS({
|
|
|
48794
49408
|
this.deleteBuffer.moveLinesTo(this.lines);
|
|
48795
49409
|
this.insertBuffer.moveLinesTo(this.lines);
|
|
48796
49410
|
}
|
|
49411
|
+
// Input to buffer.
|
|
48797
49412
|
align(diff2) {
|
|
48798
49413
|
const op = diff2[0];
|
|
48799
49414
|
const string = diff2[1];
|
|
@@ -48820,6 +49435,7 @@ var require_getAlignedDiffs = __commonJS({
|
|
|
48820
49435
|
this.pushDiffChangeLines(diff2);
|
|
48821
49436
|
}
|
|
48822
49437
|
}
|
|
49438
|
+
// Output from buffer.
|
|
48823
49439
|
getLines() {
|
|
48824
49440
|
this.flushChangeLines();
|
|
48825
49441
|
return this.lines;
|
|
@@ -48888,6 +49504,7 @@ var require_printDiffs = __commonJS({
|
|
|
48888
49504
|
isMultiline ? `${b}
|
|
48889
49505
|
` : b,
|
|
48890
49506
|
true
|
|
49507
|
+
// cleanupSemantic
|
|
48891
49508
|
);
|
|
48892
49509
|
if (hasCommonDiff(diffs, isMultiline)) {
|
|
48893
49510
|
const optionsNormalized = (0, _normalizeDiffOptions.normalizeDiffOptions)(
|
|
@@ -50409,6 +51026,8 @@ var require_build7 = __commonJS({
|
|
|
50409
51026
|
});
|
|
50410
51027
|
return lines;
|
|
50411
51028
|
}
|
|
51029
|
+
// if the full 'source' can render in
|
|
51030
|
+
// the target line, do so.
|
|
50412
51031
|
renderInline(source, previousLine) {
|
|
50413
51032
|
const match = source.match(/^ */);
|
|
50414
51033
|
const leadingWhitespace = match ? match[0].length : 0;
|
|
@@ -50626,7 +51245,14 @@ var require_require_directory = __commonJS({
|
|
|
50626
51245
|
}
|
|
50627
51246
|
};
|
|
50628
51247
|
function checkFileInclusion(path3, filename, options) {
|
|
50629
|
-
return
|
|
51248
|
+
return (
|
|
51249
|
+
// verify file has valid extension
|
|
51250
|
+
new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
|
|
51251
|
+
!(options.include && options.include instanceof RegExp && !options.include.test(path3)) && // if options.include is a function, evaluate it and make sure the path passes
|
|
51252
|
+
!(options.include && typeof options.include === "function" && !options.include(path3, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
|
|
51253
|
+
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path3)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
|
|
51254
|
+
!(options.exclude && typeof options.exclude === "function" && options.exclude(path3, filename))
|
|
51255
|
+
);
|
|
50630
51256
|
}
|
|
50631
51257
|
function requireDirectory(m, path3, options) {
|
|
50632
51258
|
var retval = {};
|
|
@@ -52471,6 +53097,10 @@ function getColor(level) {
|
|
|
52471
53097
|
}
|
|
52472
53098
|
var defaultLevel = process.env.NODE_ENV === "test" ? "warn" : "info";
|
|
52473
53099
|
var Logger = {
|
|
53100
|
+
/**
|
|
53101
|
+
* @param {string} level
|
|
53102
|
+
* @returns {LoggerInstance}
|
|
53103
|
+
*/
|
|
52474
53104
|
create(level = defaultLevel) {
|
|
52475
53105
|
let max = levels[level];
|
|
52476
53106
|
const logger2 = {
|
|
@@ -52574,6 +53204,10 @@ function hash(str) {
|
|
|
52574
53204
|
|
|
52575
53205
|
// src/workspace.js
|
|
52576
53206
|
var Workspace = class {
|
|
53207
|
+
/**
|
|
53208
|
+
* @param {string} directory
|
|
53209
|
+
* @returns {Promise<Workspace>}
|
|
53210
|
+
*/
|
|
52577
53211
|
static async load(directory) {
|
|
52578
53212
|
const tree = await loadWorkspace(directory);
|
|
52579
53213
|
const visited = /* @__PURE__ */ new Map();
|
|
@@ -52720,6 +53354,10 @@ function getAvailableWorkspaces(directory) {
|
|
|
52720
53354
|
});
|
|
52721
53355
|
}
|
|
52722
53356
|
var _PackageJson = class {
|
|
53357
|
+
/**
|
|
53358
|
+
* @param {object} packageJson
|
|
53359
|
+
* @returns {PackageJson}
|
|
53360
|
+
*/
|
|
52723
53361
|
static create(packageJson) {
|
|
52724
53362
|
return new _PackageJson(packageJson);
|
|
52725
53363
|
}
|
|
@@ -53053,6 +53691,12 @@ async function run2(options) {
|
|
|
53053
53691
|
// src/upgrades.js
|
|
53054
53692
|
var TRANSFORM_DIR = import_path2.default.join(__dirname, "transforms");
|
|
53055
53693
|
var Change = {
|
|
53694
|
+
/**
|
|
53695
|
+
* @param {object} options
|
|
53696
|
+
* @param {string} options.name
|
|
53697
|
+
* @param {string} options.version
|
|
53698
|
+
* @returns {object}
|
|
53699
|
+
*/
|
|
53056
53700
|
install({ name, version }) {
|
|
53057
53701
|
return {
|
|
53058
53702
|
type: "install",
|
|
@@ -53065,6 +53709,11 @@ var Change = {
|
|
|
53065
53709
|
uninstall: {
|
|
53066
53710
|
type: "uninstall"
|
|
53067
53711
|
},
|
|
53712
|
+
/**
|
|
53713
|
+
* @param {object} options
|
|
53714
|
+
* @param {string} options.version
|
|
53715
|
+
* @returns {object}
|
|
53716
|
+
*/
|
|
53068
53717
|
update({ version }) {
|
|
53069
53718
|
return {
|
|
53070
53719
|
type: "update",
|
|
@@ -53227,7 +53876,7 @@ var upgrades = [
|
|
|
53227
53876
|
var package_default = {
|
|
53228
53877
|
name: "@carbon/upgrade",
|
|
53229
53878
|
description: "A tool for upgrading Carbon versions",
|
|
53230
|
-
version: "11.
|
|
53879
|
+
version: "11.6.0",
|
|
53231
53880
|
license: "Apache-2.0",
|
|
53232
53881
|
bin: {
|
|
53233
53882
|
"carbon-upgrade": "./bin/carbon-upgrade.js"
|
|
@@ -53264,7 +53913,7 @@ var package_default = {
|
|
|
53264
53913
|
devDependencies: {
|
|
53265
53914
|
chalk: "^4.1.1",
|
|
53266
53915
|
"change-case": "^4.1.2",
|
|
53267
|
-
esbuild: "^0.
|
|
53916
|
+
esbuild: "^0.17.0",
|
|
53268
53917
|
execa: "^5.1.1",
|
|
53269
53918
|
"fast-glob": "^3.2.11",
|
|
53270
53919
|
"fs-extra": "^10.0.0",
|
|
@@ -53390,3 +54039,84 @@ function run3(command, ignoreSafetyChecks = false) {
|
|
|
53390
54039
|
0 && (module.exports = {
|
|
53391
54040
|
main
|
|
53392
54041
|
});
|
|
54042
|
+
/*! Bundled license information:
|
|
54043
|
+
|
|
54044
|
+
object-assign/index.js:
|
|
54045
|
+
(*
|
|
54046
|
+
object-assign
|
|
54047
|
+
(c) Sindre Sorhus
|
|
54048
|
+
@license MIT
|
|
54049
|
+
*)
|
|
54050
|
+
|
|
54051
|
+
safe-buffer/index.js:
|
|
54052
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
54053
|
+
|
|
54054
|
+
tmp/lib/tmp.js:
|
|
54055
|
+
(*!
|
|
54056
|
+
* Tmp
|
|
54057
|
+
*
|
|
54058
|
+
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
54059
|
+
*
|
|
54060
|
+
* MIT Licensed
|
|
54061
|
+
*)
|
|
54062
|
+
|
|
54063
|
+
is-extglob/index.js:
|
|
54064
|
+
(*!
|
|
54065
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
54066
|
+
*
|
|
54067
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
54068
|
+
* Licensed under the MIT License.
|
|
54069
|
+
*)
|
|
54070
|
+
|
|
54071
|
+
is-glob/index.js:
|
|
54072
|
+
(*!
|
|
54073
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
54074
|
+
*
|
|
54075
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
54076
|
+
* Released under the MIT License.
|
|
54077
|
+
*)
|
|
54078
|
+
|
|
54079
|
+
is-number/index.js:
|
|
54080
|
+
(*!
|
|
54081
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
54082
|
+
*
|
|
54083
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
54084
|
+
* Released under the MIT License.
|
|
54085
|
+
*)
|
|
54086
|
+
|
|
54087
|
+
to-regex-range/index.js:
|
|
54088
|
+
(*!
|
|
54089
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
54090
|
+
*
|
|
54091
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
54092
|
+
* Released under the MIT License.
|
|
54093
|
+
*)
|
|
54094
|
+
|
|
54095
|
+
fill-range/index.js:
|
|
54096
|
+
(*!
|
|
54097
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
54098
|
+
*
|
|
54099
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
54100
|
+
* Licensed under the MIT License.
|
|
54101
|
+
*)
|
|
54102
|
+
|
|
54103
|
+
react-is/cjs/react-is.production.min.js:
|
|
54104
|
+
(** @license React v17.0.2
|
|
54105
|
+
* react-is.production.min.js
|
|
54106
|
+
*
|
|
54107
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
54108
|
+
*
|
|
54109
|
+
* This source code is licensed under the MIT license found in the
|
|
54110
|
+
* LICENSE file in the root directory of this source tree.
|
|
54111
|
+
*)
|
|
54112
|
+
|
|
54113
|
+
react-is/cjs/react-is.development.js:
|
|
54114
|
+
(** @license React v17.0.2
|
|
54115
|
+
* react-is.development.js
|
|
54116
|
+
*
|
|
54117
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
54118
|
+
*
|
|
54119
|
+
* This source code is licensed under the MIT license found in the
|
|
54120
|
+
* LICENSE file in the root directory of this source tree.
|
|
54121
|
+
*)
|
|
54122
|
+
*/
|