@catladder/cli 1.136.4 → 1.136.6
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/dist/bundles/catci/index.js +1 -1
- package/dist/bundles/catenv/index.js +2 -2
- package/dist/bundles/cli/index.js +2 -2
- package/dist/config/getProjectConfig.js +6 -9
- package/dist/config/getProjectConfig.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/config/getProjectConfig.ts +9 -11
|
@@ -38,4 +38,4 @@ object-assign
|
|
|
38
38
|
*
|
|
39
39
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
40
40
|
* Released under the MIT License.
|
|
41
|
-
*/const n=r(8418);const toRegexRange=(e,t,r)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(n(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let s=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let u=String(i.wrap);let c=e+":"+t+"="+s+o+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let h=hasPadding(e)||hasPadding(t);let d={min:e,max:t,a:l,b:p};let v=[];let g=[];if(h){d.isPadded=h;d.maxLen=String(d.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),d,i);l=d.a=0}if(p>=0){v=splitToPatterns(l,p,d,i)}d.negatives=g;d.positives=v;d.result=collatePatterns(g,v,i);if(i.capture===true){d.result=`(${d.result})`}else if(i.wrap!==false&&v.length+g.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[c]=d;return d.result};function collatePatterns(e,t,r){let n=filterPatterns(e,t,"-",false,r)||[];let i=filterPatterns(t,e,"",false,r)||[];let s=filterPatterns(e,t,"-?",true,r)||[];let o=n.concat(s).concat(i);return o.join("|")}function splitToRanges(e,t){let r=1;let n=1;let i=countNines(e,r);let s=new Set([t]);while(e<=i&&i<=t){s.add(i);r+=1;i=countNines(e,r)}i=countZeros(t+1,n)-1;while(e<i&&i<=t){s.add(i);n+=1;i=countZeros(t+1,n)-1}s=[...s];s.sort(compare);return s}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let n=zip(e,t);let i=n.length;let s="";let o=0;for(let e=0;e<i;e++){let[t,i]=n[e];if(t===i){s+=t}else if(t!=="0"||i!=="9"){s+=toCharacterClass(t,i,r)}else{o++}}if(o){s+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:s,count:[o],digits:i}}function splitToPatterns(e,t,r,n){let i=splitToRanges(e,t);let s=[];let o=e;let a;for(let e=0;e<i.length;e++){let t=i[e];let u=rangeToPattern(String(o),String(t),n);let c="";if(!r.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){c=padZeros(t,r,n)}u.string=c+u.pattern+toQuantifier(u.count);s.push(u);o=t+1;a=u}return s}function filterPatterns(e,t,r,n,i){let s=[];for(let i of e){let{string:e}=i;if(!n&&!contains(t,"string",e)){s.push(r+e)}if(n&&contains(t,"string",e)){s.push(r+e)}}return s}function zip(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let n=Math.abs(t.maxLen-String(e).length);let i=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},5832:(e,t,r)=>{"use strict";var n=r(3255);var i=r(7668);var s={exec:function exec(e,t){var r=this;var n=parseInput(e,this.parent.ui._activePrompt.screen.rl.cursor);var i=getCommandNames(this.parent.commands);var s=getMatch(n.context,i,{ignoreSlashes:true});var o=false;function end(e){var n=handleTabCounts.call(r,e,o);t(undefined,n)}function evaluateTabs(e){if(e.context&&e.context[e.context.length-1]==="/"){o=true}}if(s){n.context=s;evaluateTabs(n);end(assembleInput(n));return}n=getMatchObject.call(this,n,i);if(n.match){n=parseMatchSection.call(this,n);getMatchData.call(r,n,(function(e){var t=getMatch(n.context,e);if(t){n.context=t;evaluateTabs(n);end(assembleInput(n));return}end(filterData(n.context,e))}));return}end(filterData(n.context,i))},match:function match(e,t,r){t=t||[];r=r||{};t.sort();var s=n.clone(t);var o=String(e);var a="";if(r.ignoreSlashes!==true){var u=o.split("/");o=u.pop();a=u.join("/");a=u.length>0?a+"/":a}var c=[];for(var l=0;l<s.length;l++){if(i(s[l]).slice(0,o.length)===o){c.push(s[l])}}if(c.length===1){var p=String(i(c[0])).slice(i(c[0]).length-1)==="/"?"":" ";return a+c[0]+p}else if(c.length===0){return undefined}else if(o.length===0){return c}var h=c.reduce((function(e,t){for(var r=0;r<t.length;r++){if(e[r]&&t[r]!==e[r]){return t.substr(0,r)}}return e})).length;if(h===o.length){return c}return a+c[0].substr(0,h)}};function handleTabCounts(e,t){var r;if(n.isArray(e)){this._tabCtr+=1;if(this._tabCtr>1){r=e.length===0?undefined:e}}else{this._tabCtr=t===true?this._tabCtr+1:0;r=e}return r}function getMatch(e,t,r){var i=e.length;var o=e.replace(/^\s+/g,"");var a=s.match(o,t.slice(),r);if(n.isArray(a)){return a}var u=new Array(i-o.length+1).join(" ");if(a){a=u+a;return a}return undefined}function assembleInput(e){if(n.isArray(e.context)){return e.context}var t=(e.prefix||"")+(e.context||"")+(e.suffix||"");return i(t)}function filterData(e,t){t=t||[];var r=String(e||"").trim();var n=r.split("/");r=n.pop();var s=String(r).trim().split(" ");var o=t.filter((function(e){return i(e).slice(0,r.length)===r}));o=o.map((function(e){var t=String(e).trim().split(" ");if(t.length>1){t=t.slice(s.length);return t.join(" ")}return e}));return o}function parseInput(e,t){var r=String(e||"");var n=r.slice(0,t);var i=n.split("|");var s=i.slice(0,i.length-1)||[];s.push("");s=s.join("|");var o=getSuffix(r.slice(t));var a=i[i.length-1];return{raw:r,prefix:s,suffix:o,context:a}}function parseMatchSection(e){var t=(e.context||"").split(" ");var r=t.pop();var n=i(t[t.length-1]||"").trim();if(n.slice(0,1)==="-"){e.option=n}e.context=r;e.prefix=(e.prefix||"")+t.join(" ")+" ";return e}function getSuffix(e){e=e.slice(0,1)===" "?e:e.replace(/.+?(?=\s)/,"");e=e.slice(1,e.length);return e}function getCommandNames(e){var t=n.map(e,"_name");t=t.concat.apply(t,n.map(e,"_aliases"));t.sort();return t}function getMatchObject(e,t){var r=e.context.length;var i=String(e.context).replace(/^\s+/g,"");var s=new Array(r-i.length+1).join(" ");var o;var a;t.forEach((function(e){var t=i.substr(e.length,1);if(i.substr(0,e.length)===e&&String(e).trim()!==""&&t===" "){o=e;a=i.substr(e.length);s+=i.substr(0,e.length)}}));var u=o?n.find(this.parent.commands,{_name:String(o).trim()}):undefined;if(!u){this.parent.commands.forEach((function(e){if((e._aliases||[]).indexOf(String(o).trim())>-1){u=e}return}))}if(!u){u=n.find(this.parent.commands,{_catch:true});if(u){a=e.context}}if(!u){s=e.context;a=""}if(u){e.match=u;e.prefix+=s;e.context=a}return e}function getMatchData(e,t){var r=e.context;var s=e.match;var o=String(r).trim().slice(0,1)==="-";var a=e.option!==undefined;if(o===true){var u=[];for(var c=0;c<s.options.length;++c){var l=s.options[c].long;var p=s.options[c].short;if(!l&&p){u.push(p)}else if(l){u.push(l)}}t(u);return}function handleDataFormat(e,t,r){var i=[];if(n.isArray(t)){i=t}else if(n.isFunction(t)){var s=t.length<2?function(){}:function(e){r(e||[])};var o=t(e,s);if(o&&n.isFunction(o.then)){o.then((function(e){r(e)})).catch((function(e){r(e)}))}else if(t.length<2){r(o)}return}r(i);return}if(a===true){var h=i(e.option).trim();var d=n.find(s.options,{short:h});var v=n.find(s.options,{long:h});var g=v||d;if(g){var y=g.autocomplete;handleDataFormat(r,y,t);return}}var m=s._autocomplete;m=m&&m.data?m.data:m;handleDataFormat(r,m,t);return}e.exports=s},1183:(e,t,r)=>{"use strict";var n=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(9821);var s=r(3255);var o=function(){function CommandInstance(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var t=e.command;var r=e.commandObject;var n=e.args;var i=e.commandWrapper;var s=e.callback;var o=e.downstream;_classCallCheck(this,CommandInstance);this.command=t;this.commandObject=r;this.args=n;this.commandWrapper=i;this.session=i.session;this.parent=this.session.parent;this.callback=s;this.downstream=o}n(CommandInstance,[{key:"cancel",value:function cancel(){this.session.emit("vorpal_command_cancel")}},{key:"log",value:function log(){var e=this;var t=i.fixArgsForApply(arguments);if(this.downstream){var r=this.downstream.commandObject._fn||function(){};this.session.registerCommand();this.downstream.args.stdin=t;var n=function onComplete(t){if(e.session.isLocal()&&t){e.session.log(t.stack||t);e.session.parent.emit("client_command_error",{command:e.downstream.command,error:t})}e.session.completeCommand()};var o=this.downstream.commandObject._validate;if(s.isFunction(o)){try{o.call(this.downstream,this.downstream.args)}catch(e){this.session.log(e.toString());n();return}}var a=r.call(this.downstream,this.downstream.args,n);if(a&&s.isFunction(a.then)){a.then(n,n)}}else{this.session.log.apply(this.session,t)}}},{key:"prompt",value:function prompt(e,t,r){return this.session.prompt(e,t,r)}},{key:"delimiter",value:function delimiter(e,t,r){return this.session.delimiter(e,t,r)}},{key:"help",value:function help(e,t,r){return this.session.help(e,t,r)}},{key:"match",value:function match(e,t,r){return this.session.match(e,t,r)}}]);return CommandInstance}();e.exports=o},9092:(e,t,r)=>{"use strict";var n=r(2361).EventEmitter;var i=r(8770);var s=r(9821);var o=r(3255);var a=Command.prototype;e.exports=t=Command;function Command(e,t){if(!(this instanceof Command)){return new Command}this.commands=[];this.options=[];this._args=[];this._aliases=[];this._name=e;this._relay=false;this._hidden=false;this._parent=t;this._mode=false;this._catch=false;this._help=undefined;this._init=undefined;this._after=undefined;this._allowUnknownOptions=false}a.option=function(e,t,r){var n=this;var s=new i(e,t,r);var o=s.name();var a=_camelcase(o);var u;if(s.bool===false||s.optional||s.required){if(s.bool===false){u=true}if(u!==undefined){n[a]=u}}this.options.push(s);this.on(o,(function(e){if(typeof n[a]==="boolean"||typeof n[a]==="undefined"){if(e===null){n[a]=s.bool?u||true:false}else{n[a]=e}}else if(e!==null){n[a]=e}}));return this};a.action=function(e){var t=this;t._fn=e;return this};a.use=function(e){return e(this)};a.validate=function(e){var t=this;t._validate=e;return this};a.cancel=function(e){this._cancel=e;return this};a.done=function(e){this._done=e;return this};a.autocomplete=function(e){this._autocomplete=e;return this};a.autocompletion=function(e){this._parent._useDeprecatedAutocompletion=true;if(!o.isFunction(e)&&!o.isObject(e)){throw new Error("An invalid object type was passed into the first parameter of command.autocompletion: function expected.")}this._autocompletion=e;return this};a.init=function(e){var t=this;if(t._mode!==true){throw Error("Cannot call init from a non-mode action.")}t._init=e;return this};a.delimiter=function(e){this._delimiter=e;return this};a.types=function(e){var t=["string","boolean"];for(var r in e){if(t.indexOf(r)===-1){throw new Error("An invalid type was passed into command.types(): "+r)}e[r]=!o.isArray(e[r])?[e[r]]:e[r]}this._types=e;return this};a.alias=function(){var e=this;for(var t=0;t<arguments.length;++t){var r=arguments[t];if(o.isArray(r)){for(var n=0;n<r.length;++n){this.alias(r[n])}return this}this._parent.commands.forEach((function(t){if(!o.isEmpty(t._aliases)){if(o.includes(t._aliases,r)){var n='Duplicate alias "'+r+'" for command "'+e._name+'" detected. Was first reserved by command "'+t._name+'".';throw new Error(n)}}}));this._aliases.push(r)}return this};a.description=function(e){if(arguments.length===0){return this._description}this._description=e;return this};a.remove=function(){var e=this;this._parent.commands=o.reject(this._parent.commands,(function(t){if(t._name===e._name){return true}}));return this};a.arguments=function(e){return this._parseExpectedArgs(e.split(/ +/))};a.helpInformation=function(){var e=[];var t=this._name;var r="";if(this._description){e=[" "+this._description,""]}if(this._aliases.length>0){r=" Alias: "+this._aliases.join(" | ")+"\n"}var n=[""," Usage: "+t+" "+this.usage(),""];var i=[];var s=String(this.optionHelp().replace(/^/gm," "));var o=[" Options:","",s,""];var a=n.concat(i).concat(r).concat(e).concat(o).join("\n");a=a.replace(/\n\n\n/g,"\n\n");return a};a.hidden=function(){this._hidden=true;return this};a.allowUnknownOptions=function(){var e=arguments.length<=0||arguments[0]===undefined?true:arguments[0];e=e==="false"?false:e;this._allowUnknownOptions=!!e;return this};a.usage=function(e){var t=this._args.map((function(e){return s.humanReadableArgName(e)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+t.join(" "):"");if(arguments.length===0){return this._usage||r}this._usage=e;return this};a.optionHelp=function(){var e=this._largestOptionLength();return[s.pad("--help",e)+" output usage information"].concat(this.options.map((function(t){return s.pad(t.flags,e)+" "+t.description}))).join("\n")};a._largestOptionLength=function(){return this.options.reduce((function(e,t){return Math.max(e,t.flags.length)}),0)};a.help=function(e){if(o.isFunction(e)){this._help=e}return this};a.parse=function(e){if(o.isFunction(e)){this._parse=e}return this};a.after=function(e){if(o.isFunction(e)){this._after=e}return this};a._parseExpectedArgs=function(e){if(!e.length){return}var t=this;e.forEach((function(e){var r={required:false,name:"",variadic:false};switch(e[0]){case"<":r.required=true;r.name=e.slice(1,-1);break;case"[":r.name=e.slice(1,-1);break;default:break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){t._args.push(r)}}));if(t._args.length>1){t._args=t._args.sort((function(e,t){if(e.required&&!t.required){return-1}else if(t.required&&!e.required){return 1}else if(e.variadic&&!t.variadic){return 1}else if(t.variadic&&!e.variadic){return-1}return 0}))}return};function _camelcase(e){return e.split("-").reduce((function(e,t){return e+t[0].toUpperCase()+t.slice(1)}))}a.__proto__=n.prototype},539:(e,t,r)=>{"use strict";var n=r(3255);var i=r(1991).LocalStorage;var s=r(1017);var o=r(2037);var a=500;var u=s.normalize(s.join(o.tmpdir(),"/.local_storage"));var c=u;var l=function History(){this._storageKey=undefined;this._hist=[];this._histCtr=0;this._histCache=[];this._histCtrCache=0};l.prototype._init=function(){if(!this._storageKey){return}var e=JSON.parse(this._localStorage.getItem(this._storageKey));if(n.isArray(e)){Array.prototype.push.apply(this._hist,e)}};l.prototype.setId=function(e){if(!this._localStorage){this._localStorage=new i(c)}this._storageKey="cmd_history_"+e;this._init()};l.prototype.setStoragePath=function(e){if(!this._localStorage){this._localStorage=new i(e)}};l.prototype.getPreviousHistory=function(){this._histCtr++;this._histCtr=this._histCtr>this._hist.length?this._hist.length:this._histCtr;return this._hist[this._hist.length-this._histCtr]};l.prototype.getNextHistory=function(){this._histCtr--;if(this._histCtr<1){this._histCtr=0;return""}return this._hist[this._hist.length-this._histCtr]};l.prototype.peek=function(e){e=e||0;return this._hist[this._hist.length-1-e]};l.prototype.newCommand=function(e){this._histCtr=0;if(this._hist[this._hist.length-1]===e){return}this._hist.push(e);if(this._storageKey&&!this._inMode){var t=this._hist;var r=this._hist.length;if(r>a){t=this._hist.slice(r-a-1,r-1)}this._localStorage.setItem(this._storageKey,JSON.stringify(t))}};l.prototype.enterMode=function(){this._histCache=n.clone(this._hist);this._histCtrCache=parseFloat(this._histCtr);this._hist=[];this._histCtr=0;this._inMode=true};l.prototype.exitMode=function(){this._hist=this._histCache;this._histCtr=this._histCtrCache;this._histCache=[];this._histCtrCache=0;this._inMode=false};l.prototype.clear=function(){if(this._storageKey){this._localStorage.removeItem(this._storageKey)}};e.exports=l},5447:(e,t,r)=>{"use strict";var n=r(3255);e.exports=function(e){var t=process.stdout.write;var r=console.error;process.stdout.write=function(e){return function(t){var r=n.toArray(arguments);r[0]=interceptor(t);e.apply(process.stdout,r)}}(process.stdout.write);console.error=function(){return function(){var e=n.toArray(arguments);e.unshift("[31m[ERROR][0m");console.log.apply(console.log,e)}}(console.error);function interceptor(t){var r=e(t);if(typeof r==="string"){t=r.replace(/\n$/,"")+(r&&/\n$/.test(t)?"\n":"")}return t}return function unhook(){process.stdout.write=t;console.error=r}}},5946:(e,t,r)=>{"use strict";var n=r(1991).LocalStorage;var i=r(1017);var s=r(2037);var o=i.normalize(i.join(s.tmpdir(),"/.local_storage_"));var a=o;var u={setId:function setId(e){if(e===undefined){throw new Error("vorpal.localStorage() requires a unique key to be passed in.")}if(!this._localStorage){this._localStorage=new n(a+e)}},validate:function validate(){if(this._localStorage===undefined){throw new Error("Vorpal.localStorage() was not initialized before writing data.")}},getItem:function getItem(e,t){this.validate();return this._localStorage.getItem(e,t)},setItem:function setItem(e,t){this.validate();return this._localStorage.setItem(e,t)},removeItem:function removeItem(e){this.validate();return this._localStorage.removeItem(e)}};e.exports=u},8770:(e,t)=>{"use strict";var r=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var n=function(){function Option(e,t,r){_classCallCheck(this,Option);this.flags=e;this.required=~e.indexOf("<");this.optional=~e.indexOf("[");this.bool=!~e.indexOf("-no-");this.autocomplete=r;e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1])){this.assignFlag(e.shift())}this.assignFlag(e.shift());this.description=t||""}r(Option,[{key:"name",value:function name(){if(this.long!==undefined){return this.long.replace("--","").replace("no-","")}return this.short.replace("-","")}},{key:"is",value:function is(e){return e===this.short||e===this.long}},{key:"assignFlag",value:function assignFlag(e){if(e.startsWith("--")){this.long=e}else{this.short=e}}}]);return Option}();e.exports=t=n},3120:(e,t,r)=>{"use strict";var n=r(2361).EventEmitter;var i=r(2037);var s=r(3255);var o=r(9821);var a=r(5832);var u=r(1183);function Session(e){e=e||{};this.id=e.id||this._guid();this.parent=e.parent||undefined;this.authenticating=e.authenticating||false;this.authenticated=e.authenticated||undefined;this.user=e.user||"guest";this.host=e.host;this.address=e.address||undefined;this._isLocal=e.local||undefined;this._delimiter=e.delimiter||String(i.hostname()).split(".")[0]+"~$";this._modeDelimiter=undefined;this._tabCtr=0;this.cmdHistory=this.parent.cmdHistory;this._mode=undefined;return this}Session.prototype=Object.create(n.prototype);var c=Session.prototype;e.exports=t=Session;c.log=function(){var e=o.fixArgsForApply(arguments);return this._log.apply(this,e)};c._log=function(){var e=this;if(this.isLocal()){this.parent.ui.log.apply(this.parent.ui,arguments)}else{var t=[];for(var r=0;r<arguments.length;++r){var n=arguments[r];n=n&&n.stack?"Error: "+n.message:n;t.push(n)}e.parent._send("vantage-ssn-stdout-downstream","downstream",{sessionId:e.id,value:t})}return this};c.isLocal=function(){return this._isLocal};c.prompt=function(e,t){e=e||{};e.sessionId=this.id;return this.parent.prompt(e,t)};c.fullDelimiter=function(){var e=this._delimiter+(this._modeDelimiter!==undefined?this._modeDelimiter:"");return e};c.delimiter=function(e){if(e===undefined){return this._delimiter}this._delimiter=String(e).trim()+" ";if(this.isLocal()){this.parent.ui.refresh()}else{this.parent._send("vantage-delimiter-downstream","downstream",{value:e,sessionId:this.id})}return this};c.modeDelimiter=function(e){var t=this;if(e===undefined){return this._modeDelimiter}if(!this.isLocal()){t.parent._send("vantage-mode-delimiter-downstream","downstream",{value:e,sessionId:t.id})}else{if(e===false||e==="false"){this._modeDelimiter=undefined}else{this._modeDelimiter=String(e).trim()+" "}this.parent.ui.refresh()}return this};c.getKeypressResult=function(e,t,r){r=r||function(){};var n=["up","down","tab"].indexOf(e)>-1;if(e!=="tab"){this._tabCtr=0}if(n){if(["up","down"].indexOf(e)>-1){r(undefined,this.getHistory(e))}else if(e==="tab"){var i=this.parent._useDeprecatedAutocompletion?"getAutocompleteDeprecated":"getAutocomplete";this[i](t,(function(e,t){r(e,t)}))}}else{this._histCtr=0}};c.history=function(e){var t=[];if(e&&t.indexOf(String(e).toLowerCase())===-1){this.cmdHistory.newCommand(e)}};c.getAutocomplete=function(e,t){return a.exec.call(this,e,t)};c.getAutocompleteDeprecated=function(e,t){t=t||function(){};var r=this.parent.ui._activePrompt.screen.rl.cursor;var n=String(e).trim();var i=String(n).slice(0,r);var o=String(n).slice(r,n.length).replace(/ +$/,"");n=i;var a="";var u=n.lastIndexOf("|");if(u!==-1){a=n.substr(0,u+1)+" ";n=n.substr(u+1).trim()}var c=s.map(this.parent.commands,"_name");c=c.concat.apply(c,s.map(this.parent.commands,"_aliases"));var l=this._autocomplete(n,c);if(l&&n.length<String(l).trim().length){t(undefined,a+l+o);return}var p;var h;c.forEach((function(e){if(n.substr(0,e.length)===e&&String(e).trim()!==""){p=e;h=n.substr(e.length).trim()}}));var d=p?s.find(this.parent.commands,{_name:p}):undefined;if(!d){d=s.find(this.parent.commands,{_catch:true});if(d){h=n}}if(d&&s.isFunction(d._autocompletion)){this._tabCtr++;d._autocompletion.call(this,h,this._tabCtr,(function(e,r){if(e){return t(e)}if(s.isArray(r)){return t(undefined,r)}else if(r===undefined){return t(undefined,undefined)}return t(undefined,a+r+o)}))}else{t(undefined,undefined)}};c._autocomplete=function(e,t){return a.match.call(this,e,t)};c.help=function(e){this.log(this.parent._commandHelp(e||""))};c.match=function(e,t){return this._autocomplete(e,t)};c.execCommandSet=function(e,t){var r=this;var n={};var i;var a=t;this._registeredCommands=1;this._completedCommands=0;var c=new u({downstream:e.pipes[0],commandObject:e.commandObject,commandWrapper:e});e.commandInstance=c;function sendDones(e){if(e.commandObject&&e.commandObject._done){e.commandObject._done.call(e)}if(e.downstream){sendDones(e.downstream)}}this.cancelCommands=function(){var t=function callCancel(e){if(s.isFunction(e.commandObject._cancel)){e.commandObject._cancel.call(e)}if(e.downstream){callCancel(e.downstream)}};t(e.commandInstance);if(i&&s.isFunction(i.cancel)){i.cancel(e.commandInstance)}r.removeListener("vorpal_command_cancel",r.cancelCommands);r.cancelCommands=undefined;r._commandSetCallback=undefined;r._registeredCommands=0;r._completedCommands=0;r.parent.emit("client_command_cancelled",{command:e.command});a(e)};this.on("vorpal_command_cancel",r.cancelCommands);this._commandSetCallback=function(){var t=n.error;var i=n.data;var s=n.args;if(r.isLocal()&&t){var o;if(i&&i.stack){o=i.stack}else if(t&&t.stack){o=t.stack}else{o=t}r.log(o);r.parent.emit("client_command_error",{command:e.command,error:t})}else if(r.isLocal()){r.parent.emit("client_command_executed",{command:e.command})}r.removeListener("vorpal_command_cancel",r.cancelCommands);r.cancelCommands=undefined;a(e,t,i,s);sendDones(c)};function onCompletion(e,t,i,s){n={error:t,data:i,args:s};r.completeCommand()}var l;if(s.isFunction(e.validate)){try{l=e.validate.call(c,e.args)}catch(t){onCompletion(e,t);return this}}if(l!==true&&l!==undefined){onCompletion(e,l||null);return this}i=e.fn.call(c,e.args,(function(){var t=o.fixArgsForApply(arguments);onCompletion(e,t[0],t[1],t)}));if(i&&s.isFunction(i.then)){i.then((function(t){onCompletion(e,undefined,t)})).catch((function(t){onCompletion(e,true,t)}))}return this};c.registerCommand=function(){this._registeredCommands=this._registeredCommands||0;this._registeredCommands++;return this};c.completeCommand=function(){this._completedCommands++;if(this._registeredCommands<=this._completedCommands){this._registeredCommands=0;this._completedCommands=0;if(this._commandSetCallback){this._commandSetCallback()}this._commandSetCallback=undefined}return this};c.getHistory=function(e){var t;if(e==="up"){t=this.cmdHistory.getPreviousHistory()}else if(e==="down"){t=this.cmdHistory.getNextHistory()}return t};c._guid=function(){function s4(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}},2155:(e,t,r)=>{"use strict";var n=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e}function _inherits(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}var i=r(3255);var s=r(8622);var o=r(2361).EventEmitter;var a=r(8173);var u=r(9821);var c=r(5758);var l=function(e){_inherits(UI,e);function UI(){_classCallCheck(this,UI);var e=_possibleConstructorReturn(this,Object.getPrototypeOf(UI).call(this));var t=e;e.parent=undefined;e._activePrompt=undefined;e._midPrompt=false;e.inquirer=s;e.inquirerStdout=[];e._cancelled=false;e._pipeFn=undefined;e._sigintCalled=false;e._sigintCount=0;e._sigint=function(){if(e._sigintCount>1){e.parent.emit("vorpal_exit");process.exit(0)}else{var t=e.input();if(!e.parent){process.exit(0)}else if(e.parent.session.cancelCommands){e.imprint();e.submit("");e._sigintCalled=false;e._sigintCount=0;e.parent.session.emit("vorpal_command_cancel")}else if(String(t).trim()!==""){e.imprint();e.submit("");e._sigintCalled=false;e._sigintCount=0}else{e._sigintCalled=false;e.delimiter(" ");e.submit("");e.log("(^C again to quit)")}}};process.stdin.on("keypress",(function(r,n){n=n||{};if(n.ctrl===true&&n.shift===false&&n.meta===false&&["c","C"].indexOf(n.name)>-1){e._sigintCount++;if(e._sigint!==undefined&&!e._sigintCalled){e._sigintCalled=true;e._sigint.call(t.parent);e._sigintCalled=false}}else{e._sigintCalled=false;e._sigintCount=0}}));var r=["input","checkbox","confirm","expand","list","password","rawlist"];var n=function _loop(e){var n=r[e];s.prompt.prompts[n].prototype.getType=function(){return n};s.prompt.prompts[n].prototype.onKeypress=function(e){if(this.status&&this.status==="answered"){return}t._activePrompt=this;t.parent.emit("client_keypress",e);t._keypressHandler(e,this)};var i=s.prompt.prompts[n].prototype.render;s.prompt.prompts[n].prototype.render=function(){t._activePrompt=this;return i.apply(this,arguments)}};for(var o in r){n(o)}var a=function onSigInt(){if(i.isFunction(e._sigint)&&!e._sigintCalled){e._sigintCalled=true;e._sigint.call(e.parent)}};process.on("SIGINT",a);process.on("SIGTERM",a);return e}n(UI,[{key:"sigint",value:function sigint(e){if(i.isFunction(e)){this._sigint=e}else{throw new Error("vorpal.ui.sigint must be passed in a valid function.")}return this}},{key:"prompt",value:function prompt(e,t){var r=this;var prompt=undefined;e=e||{};if(!this.parent){return prompt}if(e.delimiter){this.setDelimiter(e.delimiter)}if(e.message){this.setDelimiter(e.message)}if(this._midPrompt){console.log("Prompt called when mid prompt...");throw new Error("UI Prompt called when already mid prompt.")}this._midPrompt=true;try{prompt=s.prompt(e,(function(e){r.inquirerStdout=[];r._midPrompt=false;if(r._cancel===true){r._cancel=false}else{t(e)}}));setTimeout((function(){}),100)}catch(e){console.log("Vorpal Prompt error:",e)}return prompt}},{key:"midPrompt",value:function midPrompt(){var e=this._midPrompt===true&&this.parent!==undefined;return e}},{key:"setDelimiter",value:function setDelimiter(e){var t=this;if(!this.parent){return}e=String(e).trim()+" ";this._lastDelimiter=e;s.prompt.prompts.password.prototype.getQuestion=function(){t._activePrompt=this;return this.opt.message};s.prompt.prompts.input.prototype.getQuestion=function(){t._activePrompt=this;var e=this.opt.message;if((this.opt.default||this.opt.default===false)&&this.status!=="answered"){e+=a.dim("("+this.opt.default+") ")}t.inquirerStdout.push(e);return e}}},{key:"_keypressHandler",value:function _keypressHandler(e,t){t.rl.line=t.rl.line.replace(/\t+/,"");var r=t.getType()!=="password"?t.rl.line:"*".repeat(t.rl.line.length);var n=t.rl.line.length;var i=t.rl.line.length;var s=i-n;t.rl.cursor+=s;var o=0;var u=t.getQuestion();var c=t.status==="answered"?a.cyan(t.answer):r;u+=c;t.screen.render(u,{cursor:o});var l=(e.key||{}).name;var p=t?String(r):undefined;this.emit("vorpal_ui_keypress",{key:l,value:p,e:e})}},{key:"pause",value:function pause(){if(!this.parent){return false}if(!this._activePrompt){return false}if(!this._midPrompt){return false}var e=this._lastDelimiter+this._activePrompt.rl.line;this._midPrompt=false;var t=this._activePrompt.screen.rl;var r=this._activePrompt.screen;t.output.unmute();r.clean();t.output.write("");return e}},{key:"resume",value:function resume(e){if(!this.parent){return this}e=e||"";if(!this._activePrompt){return this}if(this._midPrompt){return this}var t=this._activePrompt.screen.rl;t.output.write(e);this._midPrompt=true;return this}},{key:"cancel",value:function cancel(){if(this.midPrompt()){this._cancel=true;this.submit("");this._midPrompt=false}return this}},{key:"attach",value:function attach(e){this.parent=e;this.refresh();this.parent._prompt();return this}},{key:"detach",value:function detach(e){if(e===this.parent){this.parent=undefined}return this}},{key:"log",value:function log(){var e=u.fixArgsForApply(arguments);e=i.isFunction(this._pipeFn)?this._pipeFn(e):e;if(e===""){return this}e=u.fixArgsForApply(e);if(this.midPrompt()){var t=this.pause();console.log.apply(console.log,e);if(typeof t!=="undefined"&&t!==false){this.resume(t)}else{console.log("Log got back 'false' as data. This shouldn't happen.",t)}}else{console.log.apply(console.log,e)}return this}},{key:"submit",value:function submit(){if(this._activePrompt){this._activePrompt.rl.emit("line")}return this}},{key:"delimiter",value:function delimiter(e){if(!this._activePrompt){return this}var t=this._activePrompt;if(e===undefined){return t.opt.message}t.opt.message=e;this.refresh();return this}},{key:"input",value:function input(e){if(!this._activePrompt){return undefined}var t=this._activePrompt;if(e===undefined){return t.rl.line}var r=t.rl.line.length;t.rl.line=e;var n=t.rl.line.length;var i=n-r;t.rl.cursor+=i;var s=0;var o=t.getQuestion();var u=t.status==="answered"?a.cyan(t.answer):t.rl.line;o+=u;t.screen.render(o,{cursor:s});return this}},{key:"imprint",value:function imprint(){if(!this.parent){return this}var e=this._activePrompt.rl.line;var t=this._lastDelimiter||this.delimiter()||"";this.log(t+e);return this}},{key:"refresh",value:function refresh(){if(!this.parent||!this._activePrompt){return this}this._activePrompt.screen.clean();this._activePrompt.render();this._activePrompt.rl.output.write(this._activePrompt.rl.line);return this}},{key:"redraw",value:function redraw(e){c(e);return this}}]);return UI}(o);var p=new l;p.redraw.clear=function(){c.clear();return p};p.redraw.done=function(){c.done();p.refresh();return p};global.__vorpal=global.__vorpal||{};global.__vorpal.ui=global.__vorpal.ui||{exists:false,exports:undefined};if(!global.__vorpal.ui.exists){global.__vorpal.ui.exists=true;global.__vorpal.ui.exports=p;e.exports=t=global.__vorpal.ui.exports}else{e.exports=global.__vorpal.ui.exports}},9821:(e,t,r)=>{"use strict";var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};var i=r(3255);var s=r(1675);var o=r(7668);var a={parseArgs:function parseArgs(e,t){var r=/"(.*?)"|'(.*?)'|`(.*?)`|([^\s"]+)/gi;var n=[];var i=undefined;do{i=r.exec(e);if(i!==null){n.push(i[1]||i[2]||i[3]||i[4])}}while(i!==null);n=s(n,t);n._=n._||[];return n},parseCommand:function parseCommand(e,t){var r=this;var n=[];var s=undefined;var o=undefined;var a=undefined;function parsePipes(){var t=String(e).trim().split("|");var r=[];var s=['"',"'","`"];var o={};var a="";for(var u in t){var c=t[u];a+=c;for(var l=0;l<c.length;l++){var p=c[l];if(s.indexOf(p)!==-1){o[p]=!o[p]}}var h=i.some(s,(function(e){return o[e]}));if(!h||u*1===t.length-1){r.push(a.trim());a=""}else{a+="|"}}e=r.shift();n=n.concat(r)}function parseMatch(){a=r.matchCommand(e,t);s=a.command;o=a.args}parsePipes();parseMatch();if(s&&i.isFunction(s._parse)){e=s._parse(e,a.args);parsePipes();parseMatch()}return{command:e,match:s,matchArgs:o,pipes:n}},matchCommand:function matchCommand(e,t){var r=String(e).trim().split(" ");var n=undefined;var s=undefined;for(var o=0;o<r.length;++o){var a=String(r.slice(0,r.length-o).join(" ")).trim();n=i.find(t,{_name:a})||n;if(!n){for(var u in t){var c=t[u];var l=c._aliases.indexOf(a);n=l>-1?c:n}}if(n){s=r.slice(r.length-o,r.length).join(" ");break}}if(!n){n=i.find(t,{_catch:true});if(n){var p=i.map(t,"_name");var h=false;for(var u in p){var d=p[u];var v=String(d).split(" ");var g=String(n.command).split(" ");var y=true;for(var m=0;m<g.length;++m){if(v[m]!==g[m]){y=false;break}}if(y){h=true;break}}if(h){n=undefined}else{s=e}}}return{command:n,args:s}},buildCommandArgs:function buildCommandArgs(e,t,r,s){var o={options:{}};if(s){var a=/(['"]?)(\w+)=(?:(['"])((?:(?!\3).)*)\3|(\S+))\1/g;e=e.replace(a,"\"$2='$4$5'\"")}var u=t._types||{};var c=[];t.options.forEach((function(e){if(e.required===0&&e.optional===0){if(e.short){c.push(e.short)}if(e.long){c.push(e.long)}}}));var l=e.split(" ");u.boolean=c.map((function(e){return String(e).replace(/^-*/,"")})).filter((function(e){var t=false;var r=["-"+e,"--"+e,"--no-"+e];for(var n=0;n<l.length;++n){if(r.indexOf(l[n])>-1){t=true;break}}return t}));var p=this.parseArgs(e,u);function validateArg(e,t){return!(e===undefined&&t.required===true)}var h=true;var d=i.clone(p._);for(var v=0;v<10;++v){var g=t._args[v];var y=p._[v];if(g!==undefined){h=!h?false:validateArg(p._[v],g);if(!h){break}if(y!==undefined){if(g.variadic===true){o[g.name]=d}else{o[g.name]=y;d.shift()}}}}if(!h){return"\n Missing required argument. Showing Help:"}for(var m=0;m<t.options.length;++m){var b=t.options[m];var _=String(b.short||"").replace(/-/g,"");var w=String(b.long||"").replace(/--no-/g,"").replace(/^-*/g,"");var S=p[_]!==undefined?p[_]:undefined;S=S===undefined&&p[w]!==undefined?p[w]:S;var x=S===true||S===false;if(x&&b.required!==0){return"\n Missing required value for option "+(b.long||b.short)+". Showing Help:"}if(S!==undefined){o.options[w||_]=S}}var A=i.chain(p).keys().pull("_").pull("help").value();var I=function _loop(e){var r=A[e];var n=i.find(t.options,(function(e){if("--"+r===e.long||"--no-"+r===e.long||"-"+r===e.short){return true}return false}));if(n===undefined){if(t._allowUnknownOptions){o.options[r]=p[r]}else{return{v:"\n Invalid option: '"+r+"'. Showing Help:"}}}};for(var E in A){var j=I(E);if((typeof j==="undefined"?"undefined":n(j))==="object")return j.v}if(r&&r.args&&i.isObject(r.args)){o=i.extend(o,r.args)}if(p.help||p._.indexOf("/?")>-1){o.options.help=true}return o},humanReadableArgName:function humanReadableArgName(e){var t=e.name+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"},prettifyArray:function prettifyArray(e){e=e||[];var t=i.clone(e);var r=process.stdout.columns;var n=o(t.sort((function(e,t){return o(t).length-o(e).length}))[0]||"").length+2;var s=o(String(e.join(""))).length;var a=s+e.length*2<=r;var u=Math.floor(r/n);u=u<1?1:u;if(a){return e.join(" ")}var c=0;var l=[];var p="";for(var h in e){var d=e[h];if(c<u){c++}else{l.push(p);p="";c=1}p+=this.pad(d,n," ")}if(p!==""){l.push(p)}return l.join("\n")},pad:function pad(e,t,r){t=Math.floor(t);r=r||" ";var n=Math.max(0,t-o(e).length);return e+Array(n+1).join(r)},fixArgsForApply:function fixArgsForApply(e){if(!i.isObject(e)){if(!i.isArray(e)){return[e]}return e}var t=[];for(var r in e){var n=e[r];t.push(n)}return t}};e.exports=t=a},8972:(e,t,r)=>{"use strict";var n=r(3255);e.exports=function(e){e.command("help [command...]").description("Provides help for a given command.").action((function(e,t){var r=this;if(e.command){e.command=e.command.join(" ");var i=n.find(this.parent.commands,{_name:String(e.command).toLowerCase().trim()});if(i&&!i._hidden){if(n.isFunction(i._help)){i._help(e.command,(function(e){r.log(e);t()}));return}this.log(i.helpInformation())}else{this.log(this.parent._commandHelp(e.command))}}else{this.log(this.parent._commandHelp(e.command))}t()}));e.command("exit").alias("quit").description("Exits application.").action((function(e){e.options=e.options||{};e.options.sessionId=this.session.id;this.parent.exit(e.options)}))}},1491:(e,t,r)=>{"use strict";if(!global._babelPolyfill){r(7094)}var n=r(3255);var i=r(2361).EventEmitter;var s=r(9092);var o=r(1183);var a=r(9821);var u=r(2155);var c=r(3120);var l=r(5447);var p=r(1675);var h=r(8972);var d=r(8173);var v=r(2037);var g=r(539);var y=r(5946);var m=r(9217);function Vorpal(){if(!(this instanceof Vorpal)){return new Vorpal}this._version="";this.cmdHistory=new this.CmdHistoryExtension;this.commands=[];this._queue=[];this._command=undefined;this.ui=u;this.chalk=d;this.lodash=n;this._delimiter="local@"+String(v.hostname()).split(".")[0]+"~$ ";u.setDelimiter(this._delimiter);this.server={sessions:[]};this._hooked=false;this._useDeprecatedAutocompletion=false;this.util=a;this.Session=c;this.session=new this.Session({local:true,user:"local",parent:this,delimiter:this._delimiter});this.isCommandArgKeyPairNormalized=true;this._init();return this}Vorpal.prototype=Object.create(i.prototype);var b=Vorpal.prototype;t=e.exports=Vorpal;Vorpal.prototype._init=function(){var e=this;u.on("vorpal_ui_keypress",(function(t){e.emit("keypress",t);e._onKeypress(t.key,t.value)}));e.use(h)};Vorpal.prototype.parse=function(e,t){t=t||{};var r=e;var i=this;var s=!(n.find(this.commands,{_catch:true})===undefined);r.shift();r.shift();if(r.length>0||s){if(t.use==="minimist"){i=p(r)}else{for(var o=0;o<r.length;++o){if(o===0){continue}if(r[o].indexOf(" ")>-1){r[o]='"'+r[o]+'"'}}this.exec(r.join(" "),(function(e){if(e!==undefined&&e!==null){throw new Error(e)}process.exit(0)}))}}return i};b.version=function(e){this._version=e;return this};b.delimiter=function(e){this._delimiter=e;if(this.session.isLocal()&&!this.session.client){this.session.delimiter(e)}return this};b.use=function(e,t){if(!e){return this}if(n.isFunction(e)){e.call(this,this,t)}else if(n.isString(e)){return this.use(require(e),t)}else{e=n.isArray(e)?e:[e];for(var r=0;r<e.length;++r){var i=e[r];if(i.command){var s=this.command(i.command);if(i.description){s.description(i.description)}if(i.options){i.options=n.isArray(i.options)?i.options:[i.options];for(var o=0;o<i.options.length;++o){s.option(i.options[o][0],i.options[o][1])}}if(i.action){s.action(i.action)}}}}return this};b.command=function(e,t,r){r=r||{};e=String(e);var n=/(\[[^\]]*\]|\<[^\>]*\>)/g;var i=[];var o;while((o=n.exec(e))!==null){i.push(o[1])}var a=/^([^\[\<]*)/;var u=a.exec(e)[0].trim();var c=new s(u,this);if(t){c.description(t);this.executables=true}c._noHelp=Boolean(r.noHelp);c._mode=r.mode||false;c._catch=r.catch||false;c._parseExpectedArgs(i);c.parent=this;var l=false;for(var p=0;p<this.commands.length;++p){l=this.commands[p]._name===c._name?true:l;if(l){this.commands[p]=c;break}}if(!l){this.commands.push(c)}else{console.warn(d.yellow('Warning: command named "'+e+'" was registered more than once.\nIf you intend to override a command, you should explicitly remove the first command with command.remove().'))}this.emit("command_registered",{command:c,name:e});return c};b.mode=function(e,t,r){return this.command(e,t,n.extend(r||{},{mode:true}))};b.catch=function(e,t,r){return this.command(e,t,n.extend(r||{},{catch:true}))};b.default=function(e,t,r){return this.command(e,t,n.extend(r||{},{catch:true}))};b.log=function(){this.ui.log.apply(this.ui,arguments);return this};b.pipe=function(e){if(this.ui){this.ui._pipeFn=e}return this};b.hook=function(e){if(e!==undefined){this._hook(e)}else{this._unhook()}return this};b._unhook=function(){if(this._hooked&&this._unhook!==undefined){this._unhook();this._hooked=false}return this};b._hook=function(e){if(this._hooked&&this._unhook!==undefined){this._unhook()}this._unhook=l(e);this._hooked=true;return this};b.CmdHistoryExtension=g;b.history=function(e){this.cmdHistory.setId(e);return this};b.localStorage=function(e){var t=Object.create(y);t.setId(e);n.extend(this.localStorage,t);return this};b.historyStoragePath=function(e){this.cmdHistory.setStoragePath(e);return this};b.show=function(){u.attach(this);return this};b.hide=function(){u.detach(this);return this};b._onKeypress=function(e,t){var r=this;if(this.session.isLocal()&&!this.session.client&&!this._command){this.session.getKeypressResult(e,t,(function(e,t){if(!e&&t!==undefined){if(n.isArray(t)){var i=a.prettifyArray(t);r.ui.imprint();r.session.log(i)}else{r.ui.input(t)}}}))}else{this._send("vantage-keypress-upstream","upstream",{key:e,value:t,sessionId:this.session.id})}};b.prompt=function(){var e=this;var t=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var r=arguments[1];return new Promise((function(n){var i=function cb(e){n(e);if(r){r(e)}};var s=undefined;var o=e.getSessionById(t.sessionId);if(!o){throw new Error("Vorpal.prompt was called without a passed Session ID.")}var a=function handler(t){var r=t.value;e.removeListener("vantage-prompt-upstream",handler);i(r)};if(o.isLocal()){u.setDelimiter(t.message||o.delimiter());s=u.prompt(t,(function(e){u.setDelimiter(o.delimiter());i(e)}))}else{e.on("vantage-prompt-upstream",a);e._send("vantage-prompt-downstream","downstream",{options:t,value:undefined,sessionId:o.id})}return s}))};b._prompt=function(e){var t=this;var r;e=e||{};if(!e.sessionId){e.sessionId=t.session.id}var n=t.getSessionById(e.sessionId);if(!n.isLocal()){this._send("vantage-resume-downstream","downstream",{sessionId:e.sessionId});return t}if(u.midPrompt()){return t}r=u.prompt({type:"input",name:"command",message:n.fullDelimiter()},(function(r){if(t.ui._cancelled===true){t.ui._cancelled=false;return}var n=String(r.command).trim();t.emit("client_prompt_submit",n);if(n===""||n==="undefined"){t._prompt(e);return}t.exec(n,(function(){t._prompt(e)}))}));return r};b.exec=function(e,t,r){var i=this;var s=i.session;r=n.isFunction(t)?t:r;t=t||{};if(t.sessionId){s=i.getSessionById(t.sessionId)}var o={command:e,args:t,callback:r,session:s};if(r!==undefined){i._queue.push(o);i._queueHandler();return i}return new Promise((function(e,t){o.resolve=e;o.reject=t;i._queue.push(o);i._queueHandler()}))};b.execSync=function(e,t){var r=this;var n=r.session;t=t||{};if(t.sessionId){n=r.getSessionById(t.sessionId)}var i={command:e,args:t,session:n,sync:true,options:t};return r._execQueueItem(i)};b._queueHandler=function(){if(this._queue.length>0&&this._command===undefined){var e=this._queue.shift();this._execQueueItem(e)}};b._execQueueItem=function(e){var t=this;t._command=e;if(e.session.isLocal()&&!e.session.client){return this._exec(e)}t._send("vantage-command-upstream","upstream",{command:e.command,args:e.args,completed:false,sessionId:e.session.id})};b._exec=function(e){var t=this;e=e||{};e.command=e.command||"";var r=e.command;e.command=e.session._mode?e.session._mode:e.command;var i=false;if(this.ui._midPrompt){i=true;this.ui.cancel()}if(!e.session){throw new Error("Fatal Error: No session was passed into command for execution: "+e)}if(String(e.command).indexOf("undefine")>-1){throw new Error("vorpal._exec was called with an undefined command.")}e.session.history(e.session._mode?r:e.command);var s=this.util.parseCommand(e.command,this.commands);e.command=s.command;e.pipes=s.pipes;var a=s.match;var u=s.matchArgs;function throwHelp(e,t,r){if(t){e.session.log(t)}var n=r||a;e.session.log(n.helpInformation())}function callback(e,r,n,s){if(i){t._prompt()}if(e.sync){delete t._command;if(r){if(e.options&&(e.options.fatal===true||b._fatal===true)){throw new Error(r)}return r}return n}else if(e.callback){if(s){e.callback.apply(t,s)}else{e.callback.call(t,r,n)}}else if(!r&&e.resolve){e.resolve(n)}else if(r&&e.reject){e.reject(n)}delete t._command;t._queueHandler()}if(a){e.fn=a._fn;e._cancel=a._cancel;e.validate=a._validate;e.commandObject=a;var c=a._init||function(e,t){t()};var l=a._delimiter||String(e.command).toLowerCase()+":";e.args=t.util.buildCommandArgs(u,a,e,t.isCommandArgKeyPairNormalized);if(n.isString(e.args)||!n.isObject(e.args)){throwHelp(e,e.args);return callback(e,undefined,e.args)}var p=true;for(var h=0;h<e.pipes.length;++h){var d=t.util.matchCommand(e.pipes[h],t.commands);if(!d.command){e.session.log(t._commandHelp(e.pipes[h]));p=false;break}d.args=t.util.buildCommandArgs(d.args,d.command);if(n.isString(d.args)||!n.isObject(d.args)){throwHelp(e,d.args,d.command);p=false;break}e.pipes[h]=d}if(!p){return callback(e)}if(e.args.options.help&&n.isFunction(a._help)){e.fn=a._help;delete e.validate;delete e._cancel}else if(e.args.options.help){throwHelp(e,"");return callback(e)}if(a._mode===true&&!e.session._mode){e.session._mode=e.command;e.fn=c;delete e.validate;t.cmdHistory.enterMode();e.session.modeDelimiter(l)}else if(e.session._mode){if(String(r).trim()==="exit"){t._exitMode({sessionId:e.session.id});return callback(e)}e.args=r}if(e.sync===true){var v;var g;try{v=e.fn.call(new o({downstream:undefined,commandWrapper:e,commandObject:e.commandObject,args:e.args}),e.args)}catch(e){g=e}return callback(e,g,v)}e.pipes=e.pipes.map((function(t){return new o({commandWrapper:e,command:t.command._name,commandObject:t.command,args:t.args})}));for(var y=e.pipes.length-1;y>-1;--y){var m=e.pipes[y+1];e.pipes[y].downstream=m}e.session.execCommandSet(e,(function(e,t,r,n){callback(e,t,r,n)}))}else{e.session.log(this._commandHelp(e.command));return callback(e,undefined,"Invalid command.")}};b._exitMode=function(e){var t=this.getSessionById(e.sessionId);t._mode=false;this.cmdHistory.exitMode();t.modeDelimiter(false);this.emit("mode_exit",this.cmdHistory.peek())};b.sigint=function(e){if(n.isFunction(e)){u.sigint(e)}else{throw new Error("vorpal.sigint must be passed in a valid function.")}return this};b.find=function(e){return n.find(this.commands,{_name:e})};b.help=function(e){this._help=e};b._commandHelp=function(e){if(!this.commands.length){return""}if(this._help!==undefined&&n.isFunction(this._help)){return this._help(e)}var t=[];var r=[];e=e?String(e).trim().toLowerCase():undefined;for(var i=0;i<this.commands.length;++i){var s=String(this.commands[i]._name).split(" ");if(s.length===1&&s[0]===e&&!this.commands[i]._hidden&&!this.commands[i]._catch){r.push(e)}var o="";for(var u=0;u<s.length;++u){o=String(o+" "+s[u]).trim();if(o===e&&!this.commands[i]._hidden&&!this.commands[i]._catch){t.push(this.commands[i]);break}}}var c=e&&t.length===0&&r.length===0?[""," Invalid Command. Showing Help:",""].join("\n"):"";var l=t.length>0;var p=l?String(e).trim().split(" ").length+1:1;t=t.length===0?this.commands:t;var h=!(t.length+6>process.stdout.rows);var d=t.filter((function(e){return!e._noHelp})).filter((function(e){return!e._catch})).filter((function(e){return!e._hidden})).filter((function(e){if(h===true){return true}return String(e._name).trim().split(" ").length<=p})).map((function(e){var t=e._args.map((function(e){return a.humanReadableArgName(e)})).join(" ");return[e._name+(e._alias?"|"+e._alias:"")+(e.options.length?" [options]":"")+" "+t,e.description()||""]}));var v=d.reduce((function(e,t){return Math.max(e,t[0].length)}),0);var g={};var y=n.uniq(t.filter((function(e){return String(e._name).trim().split(" ").length>p})).map((function(e){return String(e._name).split(" ").slice(0,p).join(" ")})).map((function(e){g[e]=g[e]||0;g[e]++;return e}))).map((function(e){var t=" "+a.pad(e+" *",v)+" "+g[e]+" sub-command"+(g[e]===1?"":"s")+".";return t}));y=h?[]:y;var b=process.stdout.columns-(v+4);var _=d.length<1?"":"\n Commands:\n\n"+d.map((function(e){var t=" "+a.pad(e[0],v)+" ";var r=m(e[1],b-8).split("\n");for(var n=0;n<r.length;++n){if(n!==0){r[n]=a.pad("",v+6)+r[n]}}r=r.join("\n");return t+r})).join("\n")+"\n\n";var w=y.length<1?"":" Command Groups:\n\n"+y.join("\n")+"\n";var S=String(c+_+"\n"+w).replace(/\n\n\n/g,"\n\n").replace(/\n\n$/,"\n");return S};b._send=function(e,t,r,n){n=n||{};r=r||{};var i=this.getSessionById(r.sessionId);if(!i){throw new Error("No Sessions logged for ID "+r.sessionId+" in vorpal._send.")}if(t==="upstream"){if(i.client){i.client.emit(e,r)}}else if(t==="downstream"){if(i.server){i.server.emit(e,r)}}};b._proxy=function(e,t,r,n){var i=this;return new Promise((function(s){var o=i.getSessionById(r.sessionId);if(o&&!o.isLocal()&&o.client){i._send(e,t,r,n)}else{s()}}))};b.getSessionById=function(e){if(n.isObject(e)){throw new Error("vorpal.getSessionById: id "+JSON.stringify(e)+" should not be an object.")}var t=n.find(this.server.sessions,{id:e});t=this.session.id===e?this.session:t;if(!e){throw new Error("vorpal.getSessionById was called with no ID passed.")}if(!t){var r={local:this.session.id,server:n.map(this.server.sessions,"id")};throw new Error("No session found for id "+e+" in vorpal.getSessionById. Sessions: "+JSON.stringify(r))}return t};b.exit=function(e){var t=this.getSessionById(e.sessionId);this.emit("vorpal_exit");if(t.isLocal()){process.exit(0)}else{t.server.emit("vantage-close-downstream",{sessionId:t.id})}};Object.defineProperty(b,"activeCommand",{get:function get(){var e=this._command?this._command.commandInstance:undefined;return e}})},7374:e=>{"use strict";var t="[";var r=e.exports;r.cursorTo=function(e,r){if(arguments.length===0){return t+"H"}if(arguments.length===1){return t+(e+1)+"G"}return t+(r+1)+";"+(e+1)+"H"};r.cursorMove=function(e,r){var n="";if(e<0){n+=t+-e+"D"}else if(e>0){n+=t+e+"C"}if(r<0){n+=t+-r+"A"}else if(r>0){n+=t+r+"B"}return n};r.cursorUp=function(e){return t+(typeof e==="number"?e:1)+"A"};r.cursorDown=function(e){return t+(typeof e==="number"?e:1)+"B"};r.cursorForward=function(e){return t+(typeof e==="number"?e:1)+"C"};r.cursorBackward=function(e){return t+(typeof e==="number"?e:1)+"D"};r.cursorLeft=t+"1000D";r.cursorSavePosition=t+"s";r.cursorRestorePosition=t+"u";r.cursorGetPosition=t+"6n";r.cursorNextLine=t+"E";r.cursorPrevLine=t+"F";r.cursorHide=t+"?25l";r.cursorShow=t+"?25h";r.eraseLines=function(e){var t="";for(var n=0;n<e;n++){t+=r.cursorLeft+r.eraseEndLine+(n<e-1?r.cursorUp():"")}return t};r.eraseEndLine=t+"K";r.eraseStartLine=t+"1K";r.eraseLine=t+"2K";r.eraseDown=t+"J";r.eraseUp=t+"1J";r.eraseScreen=t+"2J";r.scrollUp=t+"S";r.scrollDown=t+"T";r.clearScreen="c";r.beep="";r.image=function(e,t){t=t||{};var r="]1337;File=inline=1";if(t.width){r+=";width="+t.width}if(t.height){r+=";height="+t.height}if(t.preserveAspectRatio===false){r+=";preserveAspectRatio=0"}return r+":"+e.toString("base64")+""};r.iTerm={};r.iTerm.setCwd=function(e){return"]50;CurrentDir="+(e||process.cwd())+""}},6901:e=>{"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},1982:(e,t,r)=>{"use strict";e=r.nmd(e);function assembleStyles(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};e.colors.grey=e.colors.gray;Object.keys(e).forEach((function(t){var r=e[t];Object.keys(r).forEach((function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}));Object.defineProperty(e,t,{value:r,enumerable:false})}));return e}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},8173:(e,t,r)=>{"use strict";var n=r(1369);var i=r(1982);var s=r(7668);var o=r(1098);var a=r(8357);var u=Object.defineProperties;var c=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(e){this.enabled=!e||e.enabled===undefined?a:e.enabled}if(c){i.blue.open="[94m"}var l=function(){var e={};Object.keys(i).forEach((function(t){i[t].closeRe=new RegExp(n(i[t].close),"g");e[t]={get:function(){return build.call(this,this._styles.concat(t))}}}));return e}();var p=u((function chalk(){}),l);function build(e){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=e;builder.enabled=this.enabled;builder.__proto__=p;return builder}function applyStyle(){var e=arguments;var t=e.length;var r=t!==0&&String(arguments[0]);if(t>1){for(var n=1;n<t;n++){r+=" "+e[n]}}if(!this.enabled||!r){return r}var s=this._styles;var o=s.length;var a=i.dim.open;if(c&&(s.indexOf("gray")!==-1||s.indexOf("grey")!==-1)){i.dim.open=""}while(o--){var u=i[s[o]];r=u.open+r.replace(u.closeRe,u.open)+u.close}i.dim.open=a;return r}function init(){var e={};Object.keys(l).forEach((function(t){e[t]={get:function(){return build.call(this,[t])}}}));return e}u(Chalk.prototype,init());e.exports=new Chalk;e.exports.styles=i;e.exports.hasColor=o;e.exports.stripColor=s;e.exports.supportsColor=a},6666:(e,t,r)=>{"use strict";var n=r(8955);e.exports=function(e){if(n(e)){return false}if(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false}},5758:(e,t,r)=>{"use strict";var n=r(7374);var i=r(2701);function main(e){var t=0;var render=function(){i.hide();var r=[].join.call(arguments," ")+"\n";e.write(n.eraseLines(t)+r);t=r.split("\n").length};render.clear=function(){e.write(n.eraseLines(t));t=0};render.done=function(){t=0;i.show()};return render}e.exports=main(process.stdout);e.exports.stderr=main(process.stderr);e.exports.create=main},1675:e=>{e.exports=function(e,t){if(!t)t={};var r={bools:{},strings:{},unknownFn:null};if(typeof t["unknown"]==="function"){r.unknownFn=t["unknown"]}if(typeof t["boolean"]==="boolean"&&t["boolean"]){r.allBools=true}else{[].concat(t["boolean"]).filter(Boolean).forEach((function(e){r.bools[e]=true}))}var n={};Object.keys(t.alias||{}).forEach((function(e){n[e]=[].concat(t.alias[e]);n[e].forEach((function(t){n[t]=[e].concat(n[e].filter((function(e){return t!==e})))}))}));[].concat(t.string).filter(Boolean).forEach((function(e){r.strings[e]=true;if(n[e]){r.strings[n[e]]=true}}));var i=t["default"]||{};var s={_:[]};Object.keys(r.bools).forEach((function(e){setArg(e,i[e]===undefined?false:i[e])}));var o=[];if(e.indexOf("--")!==-1){o=e.slice(e.indexOf("--")+1);e=e.slice(0,e.indexOf("--"))}function argDefined(e,t){return r.allBools&&/^--[^=]+$/.test(t)||r.strings[e]||r.bools[e]||n[e]}function setArg(e,t,i){if(i&&r.unknownFn&&!argDefined(e,i)){if(r.unknownFn(i)===false)return}var o=!r.strings[e]&&isNumber(t)?Number(t):t;setKey(s,e.split("."),o);(n[e]||[]).forEach((function(e){setKey(s,e.split("."),o)}))}function setKey(e,t,n){var i=e;for(var s=0;s<t.length-1;s++){var o=t[s];if(o==="__proto__")return;if(i[o]===undefined)i[o]={};if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype)i[o]={};if(i[o]===Array.prototype)i[o]=[];i=i[o]}var o=t[t.length-1];if(o==="__proto__")return;if(i===Object.prototype||i===Number.prototype||i===String.prototype)i={};if(i===Array.prototype)i=[];if(i[o]===undefined||r.bools[o]||typeof i[o]==="boolean"){i[o]=n}else if(Array.isArray(i[o])){i[o].push(n)}else{i[o]=[i[o],n]}}function aliasIsBoolean(e){return n[e].some((function(e){return r.bools[e]}))}for(var a=0;a<e.length;a++){var u=e[a];if(/^--.+=/.test(u)){var c=u.match(/^--([^=]+)=([\s\S]*)$/);var l=c[1];var p=c[2];if(r.bools[l]){p=p!=="false"}setArg(l,p,u)}else if(/^--no-.+/.test(u)){var l=u.match(/^--no-(.+)/)[1];setArg(l,false,u)}else if(/^--.+/.test(u)){var l=u.match(/^--(.+)/)[1];var h=e[a+1];if(h!==undefined&&!/^-/.test(h)&&!r.bools[l]&&!r.allBools&&(n[l]?!aliasIsBoolean(l):true)){setArg(l,h,u);a++}else if(/^(true|false)$/.test(h)){setArg(l,h==="true",u);a++}else{setArg(l,r.strings[l]?"":true,u)}}else if(/^-[^-]+/.test(u)){var d=u.slice(1,-1).split("");var v=false;for(var g=0;g<d.length;g++){var h=u.slice(g+2);if(h==="-"){setArg(d[g],h,u);continue}if(/[A-Za-z]/.test(d[g])&&/=/.test(h)){setArg(d[g],h.split("=")[1],u);v=true;break}if(/[A-Za-z]/.test(d[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(h)){setArg(d[g],h,u);v=true;break}if(d[g+1]&&d[g+1].match(/\W/)){setArg(d[g],u.slice(g+2),u);v=true;break}else{setArg(d[g],r.strings[d[g]]?"":true,u)}}var l=u.slice(-1)[0];if(!v&&l!=="-"){if(e[a+1]&&!/^(-|--)[^-]/.test(e[a+1])&&!r.bools[l]&&(n[l]?!aliasIsBoolean(l):true)){setArg(l,e[a+1],u);a++}else if(e[a+1]&&/^(true|false)$/.test(e[a+1])){setArg(l,e[a+1]==="true",u);a++}else{setArg(l,r.strings[l]?"":true,u)}}}else{if(!r.unknownFn||r.unknownFn(u)!==false){s._.push(r.strings["_"]||!isNumber(u)?u:Number(u))}if(t.stopEarly){s._.push.apply(s._,e.slice(a+1));break}}}Object.keys(i).forEach((function(e){if(!hasKey(s,e.split("."))){setKey(s,e.split("."),i[e]);(n[e]||[]).forEach((function(t){setKey(s,t.split("."),i[e])}))}}));if(t["--"]){s["--"]=new Array;o.forEach((function(e){s["--"].push(e)}))}else{o.forEach((function(e){s._.push(e)}))}return s};function hasKey(e,t){var r=e;t.slice(0,-1).forEach((function(e){r=r[e]||{}}));var n=t[t.length-1];return n in r}function isNumber(e){if(typeof e==="number")return true;if(/^0x[0-9a-f]+$/i.test(e))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}},1389:(e,t,r)=>{"use strict";var n=r(7668);var i=r(2257);var s=r(6666);e.exports=function(e){if(typeof e!=="string"||e.length===0){return 0}var t=0;e=n(e);for(var r=0;r<e.length;r++){var o=i(e,r);if(o<=31||o>=127&&o<=159){continue}if(o>=65536){r++}if(s(o)){t+=2}else{t++}}return t}},7668:(e,t,r)=>{"use strict";var n=r(6901)();e.exports=function(e){return typeof e==="string"?e.replace(n,""):e}},8357:e=>{"use strict";var t=process.argv;var r=t.indexOf("--");var hasFlag=function(e){e="--"+e;var n=t.indexOf(e);return n!==-1&&(r!==-1?n<r:true)};e.exports=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){return false}if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()},9217:(e,t,r)=>{"use strict";var n=r(1389);var i=r(7668);var s=["",""];var o=39;var a={0:0,1:22,2:22,3:23,4:24,7:27,8:28,9:29,30:39,31:39,32:39,33:39,34:39,35:39,36:39,37:39,90:39,40:49,41:49,42:49,43:49,44:49,45:49,46:49,47:49};function wrapAnsi(e){return s[0]+"["+e+"m"}function wordLengths(e){return e.split(" ").map((function(e){return n(e)}))}function wrapWord(e,t,r){var n=false;var o=i(e[e.length-1]).length;for(var a=0;a<t.length;a++){var u=t[a];e[e.length-1]+=u;if(s.indexOf(u)!==-1){n=true}else if(n&&u==="m"){n=false;continue}if(n){continue}o++;if(o>=r&&a<t.length-1){e.push("");o=0}}if(!o&&e[e.length-1].length>0&&e.length>1){e[e.length-2]+=e.pop()}}function exec(e,t,r){var i=r||{};var u="";var c="";var l;var p=wordLengths(e);var h=e.split(" ");var d=[""];for(var v=0,g;(g=h[v])!==undefined;v++){var y=n(d[d.length-1]);if(y){d[d.length-1]+=" ";y++}if(p[v]>t&&i.hard){if(y){d.push("")}wrapWord(d,g,t);continue}if(y+p[v]>t&&y>0){if(i.wordWrap===false&&y<t){wrapWord(d,g,t);continue}d.push("")}d[d.length-1]+=g}u=d.map((function(e){return e.trim()})).join("\n");for(var m=0;m<u.length;m++){var b=u[m];c+=b;if(s.indexOf(b)!==-1){var _=parseFloat(/[0-9][^m]*/.exec(u.slice(m,m+4)));l=_===o?null:_}if(l&&a[l]){if(u[m+1]==="\n"){c+=wrapAnsi(a[l])}else if(b==="\n"){c+=wrapAnsi(l)}}}return c}e.exports=function(e,t,r){return String(e).split("\n").map((function(e){return exec(e,t,r)})).join("\n")}},8584:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var n=e.apply(this,t);var i=t[t.length-1];if(typeof n==="function"&&n!==i){Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n}}},48:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};function isLower(e){return e>=97&&e<=122}function isUpper(e){return e>=65&&e<=90}function isDigit(e){return e>=48&&e<=57}function toUpper(e){return e-32}function toUpperSafe(e){if(isLower(e)){return e-32}return e}function toLower(e){return e+32}function camelize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||isUpper(r)||r==t){return e}var n=[];var i=false;if(isUpper(r)){i=true;n.push(toLower(r))}else{n.push(r)}var s=e.length;for(var o=1;o<s;++o){var a=e.charCodeAt(o);if(a===t){i=true;a=e.charCodeAt(++o);if(isNaN(a)){return e}n.push(toUpperSafe(a))}else{n.push(a)}}return i?String.fromCharCode.apply(undefined,n):e}function decamelize$1(e,t){var r=e.charCodeAt(0);if(!isLower(r)){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(isUpper(a)){s.push(t);s.push(toLower(a));i=true}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function pascalize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||r==t){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(a===t){i=true;a=e.charCodeAt(++o);if(isNaN(a)){return e}s.push(toUpperSafe(a))}else if(o===0&&isLower(a)){i=true;s.push(toUpper(a))}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function depascalize$1(e,t){var r=e.charCodeAt(0);if(!isUpper(r)){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(isUpper(a)){if(o>0){s.push(t)}s.push(toLower(a));i=true}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function shouldProcessValue(e){return e&&(typeof e==="undefined"?"undefined":r(e))=="object"&&!(e instanceof Date)&&!(e instanceof Function)}function processKeys(e,t,r){var n=void 0;if(e instanceof Array){n=[]}else{if(typeof e.prototype!=="undefined"){return e}n={}}for(var i in e){var s=e[i];if(typeof i==="string")i=t(i,r&&r.separator);if(shouldProcessValue(s)){n[i]=processKeys(s,t,r)}else{n[i]=s}}return n}function processKeysInPlace(e,t,r){var n=Object.keys(e);for(var i=0;i<n.length;++i){var s=n[i];var o=e[s];var a=t(s,r&&r.separator);if(a!==s){delete e[s]}if(shouldProcessValue(o)){e[a]=processKeys(o,t,r)}else{e[a]=o}}return e}function camelize$$1(e,t){return camelize$1(e,t&&t.charCodeAt(0)||95)}function decamelize$$1(e,t){return decamelize$1(e,t&&t.charCodeAt(0)||95)}function pascalize$$1(e,t){return pascalize$1(e,t&&t.charCodeAt(0)||95)}function depascalize$$1(e,t){return depascalize$1(e,t&&t.charCodeAt(0)||95)}function camelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,camelize$$1,t);return processKeys(e,camelize$$1,t)}function decamelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,decamelize$$1,t);return processKeys(e,decamelize$$1,t)}function pascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,pascalize$$1,t);return processKeys(e,pascalize$$1,t)}function depascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,depascalize$$1,t);return processKeys(e,depascalize$$1,t)}t.camelize=camelize$$1;t.decamelize=decamelize$$1;t.pascalize=pascalize$$1;t.depascalize=depascalize$$1;t.camelizeKeys=camelizeKeys;t.decamelizeKeys=decamelizeKeys;t.pascalizeKeys=pascalizeKeys;t.depascalizeKeys=depascalizeKeys},9491:e=>{"use strict";e.exports=require("assert")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3292:e=>{"use strict";e.exports=require("fs/promises")},5687:e=>{"use strict";e.exports=require("https")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},6224:e=>{"use strict";e.exports=require("tty")},3837:e=>{"use strict";e.exports=require("util")},6861:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncResult=void 0;var s=r(9293);var o=function(){function AsyncResult(e){this.promise=Promise.resolve(e)}AsyncResult.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return i(this,(function(n){if(r.isErr()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(r.isErr()){return[2,r]}t=s.Ok;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.thenInternal=function(e){return new AsyncResult(this.promise.then(e))};return AsyncResult}();t.AsyncResult=o},2807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(6861),t);i(r(9293),t);i(r(6456),t)},6456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Option=t.Some=t.None=void 0;var n=r(1414);var i=r(9293);var s=function(){function NoneImpl(){}NoneImpl.prototype.isSome=function(){return false};NoneImpl.prototype.isNone=function(){return true};NoneImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};NoneImpl.prototype.unwrapOr=function(e){return e};NoneImpl.prototype.expect=function(e){throw new Error("".concat(e))};NoneImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap None")};NoneImpl.prototype.map=function(e){return this};NoneImpl.prototype.mapOr=function(e,t){return e};NoneImpl.prototype.mapOrElse=function(e,t){return e()};NoneImpl.prototype.or=function(e){return e};NoneImpl.prototype.orElse=function(e){return e()};NoneImpl.prototype.andThen=function(e){return this};NoneImpl.prototype.toResult=function(e){return(0,i.Err)(e)};NoneImpl.prototype.toString=function(){return"None"};return NoneImpl}();t.None=new s;Object.freeze(t.None);var o=function(){function SomeImpl(e){if(!(this instanceof SomeImpl)){return new SomeImpl(e)}this.value=e}SomeImpl.prototype.isSome=function(){return true};SomeImpl.prototype.isNone=function(){return false};SomeImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};SomeImpl.prototype.unwrapOr=function(e){return this.value};SomeImpl.prototype.expect=function(e){return this.value};SomeImpl.prototype.unwrap=function(){return this.value};SomeImpl.prototype.map=function(e){return(0,t.Some)(e(this.value))};SomeImpl.prototype.mapOr=function(e,t){return t(this.value)};SomeImpl.prototype.mapOrElse=function(e,t){return t(this.value)};SomeImpl.prototype.or=function(e){return this};SomeImpl.prototype.orElse=function(e){return this};SomeImpl.prototype.andThen=function(e){return e(this.value)};SomeImpl.prototype.toResult=function(e){return(0,i.Ok)(this.value)};SomeImpl.prototype.safeUnwrap=function(){return this.value};SomeImpl.prototype.toString=function(){return"Some(".concat((0,n.toString)(this.value),")")};SomeImpl.EMPTY=new SomeImpl(undefined);return SomeImpl}();t.Some=o;var a;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isSome()){n.push(o.value)}else{return o}}return(0,t.Some)(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}for(var n=0,i=e;n<i.length;n++){var s=i[n];if(s.isSome()){return s}else{return s}}return t.None}e.any=any;function isOption(e){return e instanceof t.Some||e===t.None}e.isOption=isOption})(a||(t.Option=a={}))},9293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Result=t.Ok=t.OkImpl=t.Err=t.ErrImpl=void 0;var n=r(1414);var i=r(6456);var s=r(6861);var o=function(){function ErrImpl(e){if(!(this instanceof ErrImpl)){return new ErrImpl(e)}this.error=e;var t=(new Error).stack.split("\n").slice(2);if(t&&t.length>0&&t[0].includes("ErrImpl")){t.shift()}this._stack=t.join("\n")}ErrImpl.prototype.isOk=function(){return false};ErrImpl.prototype.isErr=function(){return true};ErrImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};ErrImpl.prototype.else=function(e){return e};ErrImpl.prototype.unwrapOr=function(e){return e};ErrImpl.prototype.expect=function(e){throw new Error("".concat(e," - Error: ").concat((0,n.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.expectErr=function(e){return this.error};ErrImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap Error: ".concat((0,n.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.unwrapErr=function(){return this.error};ErrImpl.prototype.map=function(e){return this};ErrImpl.prototype.andThen=function(e){return this};ErrImpl.prototype.mapErr=function(e){return new t.Err(e(this.error))};ErrImpl.prototype.mapOr=function(e,t){return e};ErrImpl.prototype.mapOrElse=function(e,t){return e(this.error)};ErrImpl.prototype.or=function(e){return e};ErrImpl.prototype.orElse=function(e){return e(this.error)};ErrImpl.prototype.toOption=function(){return i.None};ErrImpl.prototype.toString=function(){return"Err(".concat((0,n.toString)(this.error),")")};Object.defineProperty(ErrImpl.prototype,"stack",{get:function(){return"".concat(this,"\n").concat(this._stack)},enumerable:false,configurable:true});ErrImpl.prototype.toAsyncResult=function(){return new s.AsyncResult(this)};ErrImpl.EMPTY=new ErrImpl(undefined);return ErrImpl}();t.ErrImpl=o;t.Err=o;var a=function(){function OkImpl(e){if(!(this instanceof OkImpl)){return new OkImpl(e)}this.value=e}OkImpl.prototype.isOk=function(){return true};OkImpl.prototype.isErr=function(){return false};OkImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};OkImpl.prototype.else=function(e){return this.value};OkImpl.prototype.unwrapOr=function(e){return this.value};OkImpl.prototype.expect=function(e){return this.value};OkImpl.prototype.expectErr=function(e){throw new Error(e)};OkImpl.prototype.unwrap=function(){return this.value};OkImpl.prototype.unwrapErr=function(){throw new Error("Tried to unwrap Ok: ".concat((0,n.toString)(this.value)),{cause:this.value})};OkImpl.prototype.map=function(e){return new t.Ok(e(this.value))};OkImpl.prototype.andThen=function(e){return e(this.value)};OkImpl.prototype.mapErr=function(e){return this};OkImpl.prototype.mapOr=function(e,t){return t(this.value)};OkImpl.prototype.mapOrElse=function(e,t){return t(this.value)};OkImpl.prototype.or=function(e){return this};OkImpl.prototype.orElse=function(e){return this};OkImpl.prototype.toOption=function(){return(0,i.Some)(this.value)};OkImpl.prototype.safeUnwrap=function(){return this.value};OkImpl.prototype.toString=function(){return"Ok(".concat((0,n.toString)(this.value),")")};OkImpl.prototype.toAsyncResult=function(){return new s.AsyncResult(this)};OkImpl.EMPTY=new OkImpl(undefined);return OkImpl}();t.OkImpl=a;t.Ok=a;var u;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isOk()){n.push(o.value)}else{return o}}return new t.Ok(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isOk()){return o}else{n.push(o.error)}}return new t.Err(n)}e.any=any;function wrap(e){try{return new t.Ok(e())}catch(e){return new t.Err(e)}}e.wrap=wrap;function wrapAsync(e){try{return e().then((function(e){return new t.Ok(e)})).catch((function(e){return new t.Err(e)}))}catch(e){return Promise.resolve(new t.Err(e))}}e.wrapAsync=wrapAsync;function isResult(e){return e instanceof t.Err||e instanceof t.Ok}e.isResult=isResult})(u||(t.Result=u={}))},1414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toString=void 0;function toString(e){var t=String(e);if(t==="[object Object]"){try{t=JSON.stringify(e)}catch(e){}}return t}t.toString=toString},478:e=>{"use strict";e.exports=JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]')},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","ts-node":"^10.9.1","ts-results-es":"^4.1.0-alpha.1","typescript":"^4.5.4","vorpal":"^1.12.0"}}')}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}i.loaded=true;return i.exports}(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var i=Object.create(null);__nccwpck_require__.r(i);var s={};t=t||[null,e({}),e([]),e(e)];for(var o=n&2&&r;typeof o=="object"&&!~t.indexOf(o);o=e(o)){Object.getOwnPropertyNames(o).forEach((e=>s[e]=()=>r[e]))}s["default"]=()=>r;__nccwpck_require__.d(i,s);return i}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;e.__esModule=true;var t=__nccwpck_require__(4046);(0,t.runCatCi)()})();module.exports=r})();
|
|
41
|
+
*/const n=r(8418);const toRegexRange=(e,t,r)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(n(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let s=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let u=String(i.wrap);let c=e+":"+t+"="+s+o+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let h=hasPadding(e)||hasPadding(t);let d={min:e,max:t,a:l,b:p};let v=[];let g=[];if(h){d.isPadded=h;d.maxLen=String(d.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),d,i);l=d.a=0}if(p>=0){v=splitToPatterns(l,p,d,i)}d.negatives=g;d.positives=v;d.result=collatePatterns(g,v,i);if(i.capture===true){d.result=`(${d.result})`}else if(i.wrap!==false&&v.length+g.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[c]=d;return d.result};function collatePatterns(e,t,r){let n=filterPatterns(e,t,"-",false,r)||[];let i=filterPatterns(t,e,"",false,r)||[];let s=filterPatterns(e,t,"-?",true,r)||[];let o=n.concat(s).concat(i);return o.join("|")}function splitToRanges(e,t){let r=1;let n=1;let i=countNines(e,r);let s=new Set([t]);while(e<=i&&i<=t){s.add(i);r+=1;i=countNines(e,r)}i=countZeros(t+1,n)-1;while(e<i&&i<=t){s.add(i);n+=1;i=countZeros(t+1,n)-1}s=[...s];s.sort(compare);return s}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let n=zip(e,t);let i=n.length;let s="";let o=0;for(let e=0;e<i;e++){let[t,i]=n[e];if(t===i){s+=t}else if(t!=="0"||i!=="9"){s+=toCharacterClass(t,i,r)}else{o++}}if(o){s+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:s,count:[o],digits:i}}function splitToPatterns(e,t,r,n){let i=splitToRanges(e,t);let s=[];let o=e;let a;for(let e=0;e<i.length;e++){let t=i[e];let u=rangeToPattern(String(o),String(t),n);let c="";if(!r.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){c=padZeros(t,r,n)}u.string=c+u.pattern+toQuantifier(u.count);s.push(u);o=t+1;a=u}return s}function filterPatterns(e,t,r,n,i){let s=[];for(let i of e){let{string:e}=i;if(!n&&!contains(t,"string",e)){s.push(r+e)}if(n&&contains(t,"string",e)){s.push(r+e)}}return s}function zip(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let n=Math.abs(t.maxLen-String(e).length);let i=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},5832:(e,t,r)=>{"use strict";var n=r(3255);var i=r(7668);var s={exec:function exec(e,t){var r=this;var n=parseInput(e,this.parent.ui._activePrompt.screen.rl.cursor);var i=getCommandNames(this.parent.commands);var s=getMatch(n.context,i,{ignoreSlashes:true});var o=false;function end(e){var n=handleTabCounts.call(r,e,o);t(undefined,n)}function evaluateTabs(e){if(e.context&&e.context[e.context.length-1]==="/"){o=true}}if(s){n.context=s;evaluateTabs(n);end(assembleInput(n));return}n=getMatchObject.call(this,n,i);if(n.match){n=parseMatchSection.call(this,n);getMatchData.call(r,n,(function(e){var t=getMatch(n.context,e);if(t){n.context=t;evaluateTabs(n);end(assembleInput(n));return}end(filterData(n.context,e))}));return}end(filterData(n.context,i))},match:function match(e,t,r){t=t||[];r=r||{};t.sort();var s=n.clone(t);var o=String(e);var a="";if(r.ignoreSlashes!==true){var u=o.split("/");o=u.pop();a=u.join("/");a=u.length>0?a+"/":a}var c=[];for(var l=0;l<s.length;l++){if(i(s[l]).slice(0,o.length)===o){c.push(s[l])}}if(c.length===1){var p=String(i(c[0])).slice(i(c[0]).length-1)==="/"?"":" ";return a+c[0]+p}else if(c.length===0){return undefined}else if(o.length===0){return c}var h=c.reduce((function(e,t){for(var r=0;r<t.length;r++){if(e[r]&&t[r]!==e[r]){return t.substr(0,r)}}return e})).length;if(h===o.length){return c}return a+c[0].substr(0,h)}};function handleTabCounts(e,t){var r;if(n.isArray(e)){this._tabCtr+=1;if(this._tabCtr>1){r=e.length===0?undefined:e}}else{this._tabCtr=t===true?this._tabCtr+1:0;r=e}return r}function getMatch(e,t,r){var i=e.length;var o=e.replace(/^\s+/g,"");var a=s.match(o,t.slice(),r);if(n.isArray(a)){return a}var u=new Array(i-o.length+1).join(" ");if(a){a=u+a;return a}return undefined}function assembleInput(e){if(n.isArray(e.context)){return e.context}var t=(e.prefix||"")+(e.context||"")+(e.suffix||"");return i(t)}function filterData(e,t){t=t||[];var r=String(e||"").trim();var n=r.split("/");r=n.pop();var s=String(r).trim().split(" ");var o=t.filter((function(e){return i(e).slice(0,r.length)===r}));o=o.map((function(e){var t=String(e).trim().split(" ");if(t.length>1){t=t.slice(s.length);return t.join(" ")}return e}));return o}function parseInput(e,t){var r=String(e||"");var n=r.slice(0,t);var i=n.split("|");var s=i.slice(0,i.length-1)||[];s.push("");s=s.join("|");var o=getSuffix(r.slice(t));var a=i[i.length-1];return{raw:r,prefix:s,suffix:o,context:a}}function parseMatchSection(e){var t=(e.context||"").split(" ");var r=t.pop();var n=i(t[t.length-1]||"").trim();if(n.slice(0,1)==="-"){e.option=n}e.context=r;e.prefix=(e.prefix||"")+t.join(" ")+" ";return e}function getSuffix(e){e=e.slice(0,1)===" "?e:e.replace(/.+?(?=\s)/,"");e=e.slice(1,e.length);return e}function getCommandNames(e){var t=n.map(e,"_name");t=t.concat.apply(t,n.map(e,"_aliases"));t.sort();return t}function getMatchObject(e,t){var r=e.context.length;var i=String(e.context).replace(/^\s+/g,"");var s=new Array(r-i.length+1).join(" ");var o;var a;t.forEach((function(e){var t=i.substr(e.length,1);if(i.substr(0,e.length)===e&&String(e).trim()!==""&&t===" "){o=e;a=i.substr(e.length);s+=i.substr(0,e.length)}}));var u=o?n.find(this.parent.commands,{_name:String(o).trim()}):undefined;if(!u){this.parent.commands.forEach((function(e){if((e._aliases||[]).indexOf(String(o).trim())>-1){u=e}return}))}if(!u){u=n.find(this.parent.commands,{_catch:true});if(u){a=e.context}}if(!u){s=e.context;a=""}if(u){e.match=u;e.prefix+=s;e.context=a}return e}function getMatchData(e,t){var r=e.context;var s=e.match;var o=String(r).trim().slice(0,1)==="-";var a=e.option!==undefined;if(o===true){var u=[];for(var c=0;c<s.options.length;++c){var l=s.options[c].long;var p=s.options[c].short;if(!l&&p){u.push(p)}else if(l){u.push(l)}}t(u);return}function handleDataFormat(e,t,r){var i=[];if(n.isArray(t)){i=t}else if(n.isFunction(t)){var s=t.length<2?function(){}:function(e){r(e||[])};var o=t(e,s);if(o&&n.isFunction(o.then)){o.then((function(e){r(e)})).catch((function(e){r(e)}))}else if(t.length<2){r(o)}return}r(i);return}if(a===true){var h=i(e.option).trim();var d=n.find(s.options,{short:h});var v=n.find(s.options,{long:h});var g=v||d;if(g){var y=g.autocomplete;handleDataFormat(r,y,t);return}}var m=s._autocomplete;m=m&&m.data?m.data:m;handleDataFormat(r,m,t);return}e.exports=s},1183:(e,t,r)=>{"use strict";var n=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(9821);var s=r(3255);var o=function(){function CommandInstance(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var t=e.command;var r=e.commandObject;var n=e.args;var i=e.commandWrapper;var s=e.callback;var o=e.downstream;_classCallCheck(this,CommandInstance);this.command=t;this.commandObject=r;this.args=n;this.commandWrapper=i;this.session=i.session;this.parent=this.session.parent;this.callback=s;this.downstream=o}n(CommandInstance,[{key:"cancel",value:function cancel(){this.session.emit("vorpal_command_cancel")}},{key:"log",value:function log(){var e=this;var t=i.fixArgsForApply(arguments);if(this.downstream){var r=this.downstream.commandObject._fn||function(){};this.session.registerCommand();this.downstream.args.stdin=t;var n=function onComplete(t){if(e.session.isLocal()&&t){e.session.log(t.stack||t);e.session.parent.emit("client_command_error",{command:e.downstream.command,error:t})}e.session.completeCommand()};var o=this.downstream.commandObject._validate;if(s.isFunction(o)){try{o.call(this.downstream,this.downstream.args)}catch(e){this.session.log(e.toString());n();return}}var a=r.call(this.downstream,this.downstream.args,n);if(a&&s.isFunction(a.then)){a.then(n,n)}}else{this.session.log.apply(this.session,t)}}},{key:"prompt",value:function prompt(e,t,r){return this.session.prompt(e,t,r)}},{key:"delimiter",value:function delimiter(e,t,r){return this.session.delimiter(e,t,r)}},{key:"help",value:function help(e,t,r){return this.session.help(e,t,r)}},{key:"match",value:function match(e,t,r){return this.session.match(e,t,r)}}]);return CommandInstance}();e.exports=o},9092:(e,t,r)=>{"use strict";var n=r(2361).EventEmitter;var i=r(8770);var s=r(9821);var o=r(3255);var a=Command.prototype;e.exports=t=Command;function Command(e,t){if(!(this instanceof Command)){return new Command}this.commands=[];this.options=[];this._args=[];this._aliases=[];this._name=e;this._relay=false;this._hidden=false;this._parent=t;this._mode=false;this._catch=false;this._help=undefined;this._init=undefined;this._after=undefined;this._allowUnknownOptions=false}a.option=function(e,t,r){var n=this;var s=new i(e,t,r);var o=s.name();var a=_camelcase(o);var u;if(s.bool===false||s.optional||s.required){if(s.bool===false){u=true}if(u!==undefined){n[a]=u}}this.options.push(s);this.on(o,(function(e){if(typeof n[a]==="boolean"||typeof n[a]==="undefined"){if(e===null){n[a]=s.bool?u||true:false}else{n[a]=e}}else if(e!==null){n[a]=e}}));return this};a.action=function(e){var t=this;t._fn=e;return this};a.use=function(e){return e(this)};a.validate=function(e){var t=this;t._validate=e;return this};a.cancel=function(e){this._cancel=e;return this};a.done=function(e){this._done=e;return this};a.autocomplete=function(e){this._autocomplete=e;return this};a.autocompletion=function(e){this._parent._useDeprecatedAutocompletion=true;if(!o.isFunction(e)&&!o.isObject(e)){throw new Error("An invalid object type was passed into the first parameter of command.autocompletion: function expected.")}this._autocompletion=e;return this};a.init=function(e){var t=this;if(t._mode!==true){throw Error("Cannot call init from a non-mode action.")}t._init=e;return this};a.delimiter=function(e){this._delimiter=e;return this};a.types=function(e){var t=["string","boolean"];for(var r in e){if(t.indexOf(r)===-1){throw new Error("An invalid type was passed into command.types(): "+r)}e[r]=!o.isArray(e[r])?[e[r]]:e[r]}this._types=e;return this};a.alias=function(){var e=this;for(var t=0;t<arguments.length;++t){var r=arguments[t];if(o.isArray(r)){for(var n=0;n<r.length;++n){this.alias(r[n])}return this}this._parent.commands.forEach((function(t){if(!o.isEmpty(t._aliases)){if(o.includes(t._aliases,r)){var n='Duplicate alias "'+r+'" for command "'+e._name+'" detected. Was first reserved by command "'+t._name+'".';throw new Error(n)}}}));this._aliases.push(r)}return this};a.description=function(e){if(arguments.length===0){return this._description}this._description=e;return this};a.remove=function(){var e=this;this._parent.commands=o.reject(this._parent.commands,(function(t){if(t._name===e._name){return true}}));return this};a.arguments=function(e){return this._parseExpectedArgs(e.split(/ +/))};a.helpInformation=function(){var e=[];var t=this._name;var r="";if(this._description){e=[" "+this._description,""]}if(this._aliases.length>0){r=" Alias: "+this._aliases.join(" | ")+"\n"}var n=[""," Usage: "+t+" "+this.usage(),""];var i=[];var s=String(this.optionHelp().replace(/^/gm," "));var o=[" Options:","",s,""];var a=n.concat(i).concat(r).concat(e).concat(o).join("\n");a=a.replace(/\n\n\n/g,"\n\n");return a};a.hidden=function(){this._hidden=true;return this};a.allowUnknownOptions=function(){var e=arguments.length<=0||arguments[0]===undefined?true:arguments[0];e=e==="false"?false:e;this._allowUnknownOptions=!!e;return this};a.usage=function(e){var t=this._args.map((function(e){return s.humanReadableArgName(e)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+t.join(" "):"");if(arguments.length===0){return this._usage||r}this._usage=e;return this};a.optionHelp=function(){var e=this._largestOptionLength();return[s.pad("--help",e)+" output usage information"].concat(this.options.map((function(t){return s.pad(t.flags,e)+" "+t.description}))).join("\n")};a._largestOptionLength=function(){return this.options.reduce((function(e,t){return Math.max(e,t.flags.length)}),0)};a.help=function(e){if(o.isFunction(e)){this._help=e}return this};a.parse=function(e){if(o.isFunction(e)){this._parse=e}return this};a.after=function(e){if(o.isFunction(e)){this._after=e}return this};a._parseExpectedArgs=function(e){if(!e.length){return}var t=this;e.forEach((function(e){var r={required:false,name:"",variadic:false};switch(e[0]){case"<":r.required=true;r.name=e.slice(1,-1);break;case"[":r.name=e.slice(1,-1);break;default:break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){t._args.push(r)}}));if(t._args.length>1){t._args=t._args.sort((function(e,t){if(e.required&&!t.required){return-1}else if(t.required&&!e.required){return 1}else if(e.variadic&&!t.variadic){return 1}else if(t.variadic&&!e.variadic){return-1}return 0}))}return};function _camelcase(e){return e.split("-").reduce((function(e,t){return e+t[0].toUpperCase()+t.slice(1)}))}a.__proto__=n.prototype},539:(e,t,r)=>{"use strict";var n=r(3255);var i=r(1991).LocalStorage;var s=r(1017);var o=r(2037);var a=500;var u=s.normalize(s.join(o.tmpdir(),"/.local_storage"));var c=u;var l=function History(){this._storageKey=undefined;this._hist=[];this._histCtr=0;this._histCache=[];this._histCtrCache=0};l.prototype._init=function(){if(!this._storageKey){return}var e=JSON.parse(this._localStorage.getItem(this._storageKey));if(n.isArray(e)){Array.prototype.push.apply(this._hist,e)}};l.prototype.setId=function(e){if(!this._localStorage){this._localStorage=new i(c)}this._storageKey="cmd_history_"+e;this._init()};l.prototype.setStoragePath=function(e){if(!this._localStorage){this._localStorage=new i(e)}};l.prototype.getPreviousHistory=function(){this._histCtr++;this._histCtr=this._histCtr>this._hist.length?this._hist.length:this._histCtr;return this._hist[this._hist.length-this._histCtr]};l.prototype.getNextHistory=function(){this._histCtr--;if(this._histCtr<1){this._histCtr=0;return""}return this._hist[this._hist.length-this._histCtr]};l.prototype.peek=function(e){e=e||0;return this._hist[this._hist.length-1-e]};l.prototype.newCommand=function(e){this._histCtr=0;if(this._hist[this._hist.length-1]===e){return}this._hist.push(e);if(this._storageKey&&!this._inMode){var t=this._hist;var r=this._hist.length;if(r>a){t=this._hist.slice(r-a-1,r-1)}this._localStorage.setItem(this._storageKey,JSON.stringify(t))}};l.prototype.enterMode=function(){this._histCache=n.clone(this._hist);this._histCtrCache=parseFloat(this._histCtr);this._hist=[];this._histCtr=0;this._inMode=true};l.prototype.exitMode=function(){this._hist=this._histCache;this._histCtr=this._histCtrCache;this._histCache=[];this._histCtrCache=0;this._inMode=false};l.prototype.clear=function(){if(this._storageKey){this._localStorage.removeItem(this._storageKey)}};e.exports=l},5447:(e,t,r)=>{"use strict";var n=r(3255);e.exports=function(e){var t=process.stdout.write;var r=console.error;process.stdout.write=function(e){return function(t){var r=n.toArray(arguments);r[0]=interceptor(t);e.apply(process.stdout,r)}}(process.stdout.write);console.error=function(){return function(){var e=n.toArray(arguments);e.unshift("[31m[ERROR][0m");console.log.apply(console.log,e)}}(console.error);function interceptor(t){var r=e(t);if(typeof r==="string"){t=r.replace(/\n$/,"")+(r&&/\n$/.test(t)?"\n":"")}return t}return function unhook(){process.stdout.write=t;console.error=r}}},5946:(e,t,r)=>{"use strict";var n=r(1991).LocalStorage;var i=r(1017);var s=r(2037);var o=i.normalize(i.join(s.tmpdir(),"/.local_storage_"));var a=o;var u={setId:function setId(e){if(e===undefined){throw new Error("vorpal.localStorage() requires a unique key to be passed in.")}if(!this._localStorage){this._localStorage=new n(a+e)}},validate:function validate(){if(this._localStorage===undefined){throw new Error("Vorpal.localStorage() was not initialized before writing data.")}},getItem:function getItem(e,t){this.validate();return this._localStorage.getItem(e,t)},setItem:function setItem(e,t){this.validate();return this._localStorage.setItem(e,t)},removeItem:function removeItem(e){this.validate();return this._localStorage.removeItem(e)}};e.exports=u},8770:(e,t)=>{"use strict";var r=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var n=function(){function Option(e,t,r){_classCallCheck(this,Option);this.flags=e;this.required=~e.indexOf("<");this.optional=~e.indexOf("[");this.bool=!~e.indexOf("-no-");this.autocomplete=r;e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1])){this.assignFlag(e.shift())}this.assignFlag(e.shift());this.description=t||""}r(Option,[{key:"name",value:function name(){if(this.long!==undefined){return this.long.replace("--","").replace("no-","")}return this.short.replace("-","")}},{key:"is",value:function is(e){return e===this.short||e===this.long}},{key:"assignFlag",value:function assignFlag(e){if(e.startsWith("--")){this.long=e}else{this.short=e}}}]);return Option}();e.exports=t=n},3120:(e,t,r)=>{"use strict";var n=r(2361).EventEmitter;var i=r(2037);var s=r(3255);var o=r(9821);var a=r(5832);var u=r(1183);function Session(e){e=e||{};this.id=e.id||this._guid();this.parent=e.parent||undefined;this.authenticating=e.authenticating||false;this.authenticated=e.authenticated||undefined;this.user=e.user||"guest";this.host=e.host;this.address=e.address||undefined;this._isLocal=e.local||undefined;this._delimiter=e.delimiter||String(i.hostname()).split(".")[0]+"~$";this._modeDelimiter=undefined;this._tabCtr=0;this.cmdHistory=this.parent.cmdHistory;this._mode=undefined;return this}Session.prototype=Object.create(n.prototype);var c=Session.prototype;e.exports=t=Session;c.log=function(){var e=o.fixArgsForApply(arguments);return this._log.apply(this,e)};c._log=function(){var e=this;if(this.isLocal()){this.parent.ui.log.apply(this.parent.ui,arguments)}else{var t=[];for(var r=0;r<arguments.length;++r){var n=arguments[r];n=n&&n.stack?"Error: "+n.message:n;t.push(n)}e.parent._send("vantage-ssn-stdout-downstream","downstream",{sessionId:e.id,value:t})}return this};c.isLocal=function(){return this._isLocal};c.prompt=function(e,t){e=e||{};e.sessionId=this.id;return this.parent.prompt(e,t)};c.fullDelimiter=function(){var e=this._delimiter+(this._modeDelimiter!==undefined?this._modeDelimiter:"");return e};c.delimiter=function(e){if(e===undefined){return this._delimiter}this._delimiter=String(e).trim()+" ";if(this.isLocal()){this.parent.ui.refresh()}else{this.parent._send("vantage-delimiter-downstream","downstream",{value:e,sessionId:this.id})}return this};c.modeDelimiter=function(e){var t=this;if(e===undefined){return this._modeDelimiter}if(!this.isLocal()){t.parent._send("vantage-mode-delimiter-downstream","downstream",{value:e,sessionId:t.id})}else{if(e===false||e==="false"){this._modeDelimiter=undefined}else{this._modeDelimiter=String(e).trim()+" "}this.parent.ui.refresh()}return this};c.getKeypressResult=function(e,t,r){r=r||function(){};var n=["up","down","tab"].indexOf(e)>-1;if(e!=="tab"){this._tabCtr=0}if(n){if(["up","down"].indexOf(e)>-1){r(undefined,this.getHistory(e))}else if(e==="tab"){var i=this.parent._useDeprecatedAutocompletion?"getAutocompleteDeprecated":"getAutocomplete";this[i](t,(function(e,t){r(e,t)}))}}else{this._histCtr=0}};c.history=function(e){var t=[];if(e&&t.indexOf(String(e).toLowerCase())===-1){this.cmdHistory.newCommand(e)}};c.getAutocomplete=function(e,t){return a.exec.call(this,e,t)};c.getAutocompleteDeprecated=function(e,t){t=t||function(){};var r=this.parent.ui._activePrompt.screen.rl.cursor;var n=String(e).trim();var i=String(n).slice(0,r);var o=String(n).slice(r,n.length).replace(/ +$/,"");n=i;var a="";var u=n.lastIndexOf("|");if(u!==-1){a=n.substr(0,u+1)+" ";n=n.substr(u+1).trim()}var c=s.map(this.parent.commands,"_name");c=c.concat.apply(c,s.map(this.parent.commands,"_aliases"));var l=this._autocomplete(n,c);if(l&&n.length<String(l).trim().length){t(undefined,a+l+o);return}var p;var h;c.forEach((function(e){if(n.substr(0,e.length)===e&&String(e).trim()!==""){p=e;h=n.substr(e.length).trim()}}));var d=p?s.find(this.parent.commands,{_name:p}):undefined;if(!d){d=s.find(this.parent.commands,{_catch:true});if(d){h=n}}if(d&&s.isFunction(d._autocompletion)){this._tabCtr++;d._autocompletion.call(this,h,this._tabCtr,(function(e,r){if(e){return t(e)}if(s.isArray(r)){return t(undefined,r)}else if(r===undefined){return t(undefined,undefined)}return t(undefined,a+r+o)}))}else{t(undefined,undefined)}};c._autocomplete=function(e,t){return a.match.call(this,e,t)};c.help=function(e){this.log(this.parent._commandHelp(e||""))};c.match=function(e,t){return this._autocomplete(e,t)};c.execCommandSet=function(e,t){var r=this;var n={};var i;var a=t;this._registeredCommands=1;this._completedCommands=0;var c=new u({downstream:e.pipes[0],commandObject:e.commandObject,commandWrapper:e});e.commandInstance=c;function sendDones(e){if(e.commandObject&&e.commandObject._done){e.commandObject._done.call(e)}if(e.downstream){sendDones(e.downstream)}}this.cancelCommands=function(){var t=function callCancel(e){if(s.isFunction(e.commandObject._cancel)){e.commandObject._cancel.call(e)}if(e.downstream){callCancel(e.downstream)}};t(e.commandInstance);if(i&&s.isFunction(i.cancel)){i.cancel(e.commandInstance)}r.removeListener("vorpal_command_cancel",r.cancelCommands);r.cancelCommands=undefined;r._commandSetCallback=undefined;r._registeredCommands=0;r._completedCommands=0;r.parent.emit("client_command_cancelled",{command:e.command});a(e)};this.on("vorpal_command_cancel",r.cancelCommands);this._commandSetCallback=function(){var t=n.error;var i=n.data;var s=n.args;if(r.isLocal()&&t){var o;if(i&&i.stack){o=i.stack}else if(t&&t.stack){o=t.stack}else{o=t}r.log(o);r.parent.emit("client_command_error",{command:e.command,error:t})}else if(r.isLocal()){r.parent.emit("client_command_executed",{command:e.command})}r.removeListener("vorpal_command_cancel",r.cancelCommands);r.cancelCommands=undefined;a(e,t,i,s);sendDones(c)};function onCompletion(e,t,i,s){n={error:t,data:i,args:s};r.completeCommand()}var l;if(s.isFunction(e.validate)){try{l=e.validate.call(c,e.args)}catch(t){onCompletion(e,t);return this}}if(l!==true&&l!==undefined){onCompletion(e,l||null);return this}i=e.fn.call(c,e.args,(function(){var t=o.fixArgsForApply(arguments);onCompletion(e,t[0],t[1],t)}));if(i&&s.isFunction(i.then)){i.then((function(t){onCompletion(e,undefined,t)})).catch((function(t){onCompletion(e,true,t)}))}return this};c.registerCommand=function(){this._registeredCommands=this._registeredCommands||0;this._registeredCommands++;return this};c.completeCommand=function(){this._completedCommands++;if(this._registeredCommands<=this._completedCommands){this._registeredCommands=0;this._completedCommands=0;if(this._commandSetCallback){this._commandSetCallback()}this._commandSetCallback=undefined}return this};c.getHistory=function(e){var t;if(e==="up"){t=this.cmdHistory.getPreviousHistory()}else if(e==="down"){t=this.cmdHistory.getNextHistory()}return t};c._guid=function(){function s4(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}},2155:(e,t,r)=>{"use strict";var n=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e}function _inherits(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}var i=r(3255);var s=r(8622);var o=r(2361).EventEmitter;var a=r(8173);var u=r(9821);var c=r(5758);var l=function(e){_inherits(UI,e);function UI(){_classCallCheck(this,UI);var e=_possibleConstructorReturn(this,Object.getPrototypeOf(UI).call(this));var t=e;e.parent=undefined;e._activePrompt=undefined;e._midPrompt=false;e.inquirer=s;e.inquirerStdout=[];e._cancelled=false;e._pipeFn=undefined;e._sigintCalled=false;e._sigintCount=0;e._sigint=function(){if(e._sigintCount>1){e.parent.emit("vorpal_exit");process.exit(0)}else{var t=e.input();if(!e.parent){process.exit(0)}else if(e.parent.session.cancelCommands){e.imprint();e.submit("");e._sigintCalled=false;e._sigintCount=0;e.parent.session.emit("vorpal_command_cancel")}else if(String(t).trim()!==""){e.imprint();e.submit("");e._sigintCalled=false;e._sigintCount=0}else{e._sigintCalled=false;e.delimiter(" ");e.submit("");e.log("(^C again to quit)")}}};process.stdin.on("keypress",(function(r,n){n=n||{};if(n.ctrl===true&&n.shift===false&&n.meta===false&&["c","C"].indexOf(n.name)>-1){e._sigintCount++;if(e._sigint!==undefined&&!e._sigintCalled){e._sigintCalled=true;e._sigint.call(t.parent);e._sigintCalled=false}}else{e._sigintCalled=false;e._sigintCount=0}}));var r=["input","checkbox","confirm","expand","list","password","rawlist"];var n=function _loop(e){var n=r[e];s.prompt.prompts[n].prototype.getType=function(){return n};s.prompt.prompts[n].prototype.onKeypress=function(e){if(this.status&&this.status==="answered"){return}t._activePrompt=this;t.parent.emit("client_keypress",e);t._keypressHandler(e,this)};var i=s.prompt.prompts[n].prototype.render;s.prompt.prompts[n].prototype.render=function(){t._activePrompt=this;return i.apply(this,arguments)}};for(var o in r){n(o)}var a=function onSigInt(){if(i.isFunction(e._sigint)&&!e._sigintCalled){e._sigintCalled=true;e._sigint.call(e.parent)}};process.on("SIGINT",a);process.on("SIGTERM",a);return e}n(UI,[{key:"sigint",value:function sigint(e){if(i.isFunction(e)){this._sigint=e}else{throw new Error("vorpal.ui.sigint must be passed in a valid function.")}return this}},{key:"prompt",value:function prompt(e,t){var r=this;var prompt=undefined;e=e||{};if(!this.parent){return prompt}if(e.delimiter){this.setDelimiter(e.delimiter)}if(e.message){this.setDelimiter(e.message)}if(this._midPrompt){console.log("Prompt called when mid prompt...");throw new Error("UI Prompt called when already mid prompt.")}this._midPrompt=true;try{prompt=s.prompt(e,(function(e){r.inquirerStdout=[];r._midPrompt=false;if(r._cancel===true){r._cancel=false}else{t(e)}}));setTimeout((function(){}),100)}catch(e){console.log("Vorpal Prompt error:",e)}return prompt}},{key:"midPrompt",value:function midPrompt(){var e=this._midPrompt===true&&this.parent!==undefined;return e}},{key:"setDelimiter",value:function setDelimiter(e){var t=this;if(!this.parent){return}e=String(e).trim()+" ";this._lastDelimiter=e;s.prompt.prompts.password.prototype.getQuestion=function(){t._activePrompt=this;return this.opt.message};s.prompt.prompts.input.prototype.getQuestion=function(){t._activePrompt=this;var e=this.opt.message;if((this.opt.default||this.opt.default===false)&&this.status!=="answered"){e+=a.dim("("+this.opt.default+") ")}t.inquirerStdout.push(e);return e}}},{key:"_keypressHandler",value:function _keypressHandler(e,t){t.rl.line=t.rl.line.replace(/\t+/,"");var r=t.getType()!=="password"?t.rl.line:"*".repeat(t.rl.line.length);var n=t.rl.line.length;var i=t.rl.line.length;var s=i-n;t.rl.cursor+=s;var o=0;var u=t.getQuestion();var c=t.status==="answered"?a.cyan(t.answer):r;u+=c;t.screen.render(u,{cursor:o});var l=(e.key||{}).name;var p=t?String(r):undefined;this.emit("vorpal_ui_keypress",{key:l,value:p,e:e})}},{key:"pause",value:function pause(){if(!this.parent){return false}if(!this._activePrompt){return false}if(!this._midPrompt){return false}var e=this._lastDelimiter+this._activePrompt.rl.line;this._midPrompt=false;var t=this._activePrompt.screen.rl;var r=this._activePrompt.screen;t.output.unmute();r.clean();t.output.write("");return e}},{key:"resume",value:function resume(e){if(!this.parent){return this}e=e||"";if(!this._activePrompt){return this}if(this._midPrompt){return this}var t=this._activePrompt.screen.rl;t.output.write(e);this._midPrompt=true;return this}},{key:"cancel",value:function cancel(){if(this.midPrompt()){this._cancel=true;this.submit("");this._midPrompt=false}return this}},{key:"attach",value:function attach(e){this.parent=e;this.refresh();this.parent._prompt();return this}},{key:"detach",value:function detach(e){if(e===this.parent){this.parent=undefined}return this}},{key:"log",value:function log(){var e=u.fixArgsForApply(arguments);e=i.isFunction(this._pipeFn)?this._pipeFn(e):e;if(e===""){return this}e=u.fixArgsForApply(e);if(this.midPrompt()){var t=this.pause();console.log.apply(console.log,e);if(typeof t!=="undefined"&&t!==false){this.resume(t)}else{console.log("Log got back 'false' as data. This shouldn't happen.",t)}}else{console.log.apply(console.log,e)}return this}},{key:"submit",value:function submit(){if(this._activePrompt){this._activePrompt.rl.emit("line")}return this}},{key:"delimiter",value:function delimiter(e){if(!this._activePrompt){return this}var t=this._activePrompt;if(e===undefined){return t.opt.message}t.opt.message=e;this.refresh();return this}},{key:"input",value:function input(e){if(!this._activePrompt){return undefined}var t=this._activePrompt;if(e===undefined){return t.rl.line}var r=t.rl.line.length;t.rl.line=e;var n=t.rl.line.length;var i=n-r;t.rl.cursor+=i;var s=0;var o=t.getQuestion();var u=t.status==="answered"?a.cyan(t.answer):t.rl.line;o+=u;t.screen.render(o,{cursor:s});return this}},{key:"imprint",value:function imprint(){if(!this.parent){return this}var e=this._activePrompt.rl.line;var t=this._lastDelimiter||this.delimiter()||"";this.log(t+e);return this}},{key:"refresh",value:function refresh(){if(!this.parent||!this._activePrompt){return this}this._activePrompt.screen.clean();this._activePrompt.render();this._activePrompt.rl.output.write(this._activePrompt.rl.line);return this}},{key:"redraw",value:function redraw(e){c(e);return this}}]);return UI}(o);var p=new l;p.redraw.clear=function(){c.clear();return p};p.redraw.done=function(){c.done();p.refresh();return p};global.__vorpal=global.__vorpal||{};global.__vorpal.ui=global.__vorpal.ui||{exists:false,exports:undefined};if(!global.__vorpal.ui.exists){global.__vorpal.ui.exists=true;global.__vorpal.ui.exports=p;e.exports=t=global.__vorpal.ui.exports}else{e.exports=global.__vorpal.ui.exports}},9821:(e,t,r)=>{"use strict";var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};var i=r(3255);var s=r(1675);var o=r(7668);var a={parseArgs:function parseArgs(e,t){var r=/"(.*?)"|'(.*?)'|`(.*?)`|([^\s"]+)/gi;var n=[];var i=undefined;do{i=r.exec(e);if(i!==null){n.push(i[1]||i[2]||i[3]||i[4])}}while(i!==null);n=s(n,t);n._=n._||[];return n},parseCommand:function parseCommand(e,t){var r=this;var n=[];var s=undefined;var o=undefined;var a=undefined;function parsePipes(){var t=String(e).trim().split("|");var r=[];var s=['"',"'","`"];var o={};var a="";for(var u in t){var c=t[u];a+=c;for(var l=0;l<c.length;l++){var p=c[l];if(s.indexOf(p)!==-1){o[p]=!o[p]}}var h=i.some(s,(function(e){return o[e]}));if(!h||u*1===t.length-1){r.push(a.trim());a=""}else{a+="|"}}e=r.shift();n=n.concat(r)}function parseMatch(){a=r.matchCommand(e,t);s=a.command;o=a.args}parsePipes();parseMatch();if(s&&i.isFunction(s._parse)){e=s._parse(e,a.args);parsePipes();parseMatch()}return{command:e,match:s,matchArgs:o,pipes:n}},matchCommand:function matchCommand(e,t){var r=String(e).trim().split(" ");var n=undefined;var s=undefined;for(var o=0;o<r.length;++o){var a=String(r.slice(0,r.length-o).join(" ")).trim();n=i.find(t,{_name:a})||n;if(!n){for(var u in t){var c=t[u];var l=c._aliases.indexOf(a);n=l>-1?c:n}}if(n){s=r.slice(r.length-o,r.length).join(" ");break}}if(!n){n=i.find(t,{_catch:true});if(n){var p=i.map(t,"_name");var h=false;for(var u in p){var d=p[u];var v=String(d).split(" ");var g=String(n.command).split(" ");var y=true;for(var m=0;m<g.length;++m){if(v[m]!==g[m]){y=false;break}}if(y){h=true;break}}if(h){n=undefined}else{s=e}}}return{command:n,args:s}},buildCommandArgs:function buildCommandArgs(e,t,r,s){var o={options:{}};if(s){var a=/(['"]?)(\w+)=(?:(['"])((?:(?!\3).)*)\3|(\S+))\1/g;e=e.replace(a,"\"$2='$4$5'\"")}var u=t._types||{};var c=[];t.options.forEach((function(e){if(e.required===0&&e.optional===0){if(e.short){c.push(e.short)}if(e.long){c.push(e.long)}}}));var l=e.split(" ");u.boolean=c.map((function(e){return String(e).replace(/^-*/,"")})).filter((function(e){var t=false;var r=["-"+e,"--"+e,"--no-"+e];for(var n=0;n<l.length;++n){if(r.indexOf(l[n])>-1){t=true;break}}return t}));var p=this.parseArgs(e,u);function validateArg(e,t){return!(e===undefined&&t.required===true)}var h=true;var d=i.clone(p._);for(var v=0;v<10;++v){var g=t._args[v];var y=p._[v];if(g!==undefined){h=!h?false:validateArg(p._[v],g);if(!h){break}if(y!==undefined){if(g.variadic===true){o[g.name]=d}else{o[g.name]=y;d.shift()}}}}if(!h){return"\n Missing required argument. Showing Help:"}for(var m=0;m<t.options.length;++m){var b=t.options[m];var _=String(b.short||"").replace(/-/g,"");var w=String(b.long||"").replace(/--no-/g,"").replace(/^-*/g,"");var S=p[_]!==undefined?p[_]:undefined;S=S===undefined&&p[w]!==undefined?p[w]:S;var x=S===true||S===false;if(x&&b.required!==0){return"\n Missing required value for option "+(b.long||b.short)+". Showing Help:"}if(S!==undefined){o.options[w||_]=S}}var A=i.chain(p).keys().pull("_").pull("help").value();var I=function _loop(e){var r=A[e];var n=i.find(t.options,(function(e){if("--"+r===e.long||"--no-"+r===e.long||"-"+r===e.short){return true}return false}));if(n===undefined){if(t._allowUnknownOptions){o.options[r]=p[r]}else{return{v:"\n Invalid option: '"+r+"'. Showing Help:"}}}};for(var E in A){var j=I(E);if((typeof j==="undefined"?"undefined":n(j))==="object")return j.v}if(r&&r.args&&i.isObject(r.args)){o=i.extend(o,r.args)}if(p.help||p._.indexOf("/?")>-1){o.options.help=true}return o},humanReadableArgName:function humanReadableArgName(e){var t=e.name+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"},prettifyArray:function prettifyArray(e){e=e||[];var t=i.clone(e);var r=process.stdout.columns;var n=o(t.sort((function(e,t){return o(t).length-o(e).length}))[0]||"").length+2;var s=o(String(e.join(""))).length;var a=s+e.length*2<=r;var u=Math.floor(r/n);u=u<1?1:u;if(a){return e.join(" ")}var c=0;var l=[];var p="";for(var h in e){var d=e[h];if(c<u){c++}else{l.push(p);p="";c=1}p+=this.pad(d,n," ")}if(p!==""){l.push(p)}return l.join("\n")},pad:function pad(e,t,r){t=Math.floor(t);r=r||" ";var n=Math.max(0,t-o(e).length);return e+Array(n+1).join(r)},fixArgsForApply:function fixArgsForApply(e){if(!i.isObject(e)){if(!i.isArray(e)){return[e]}return e}var t=[];for(var r in e){var n=e[r];t.push(n)}return t}};e.exports=t=a},8972:(e,t,r)=>{"use strict";var n=r(3255);e.exports=function(e){e.command("help [command...]").description("Provides help for a given command.").action((function(e,t){var r=this;if(e.command){e.command=e.command.join(" ");var i=n.find(this.parent.commands,{_name:String(e.command).toLowerCase().trim()});if(i&&!i._hidden){if(n.isFunction(i._help)){i._help(e.command,(function(e){r.log(e);t()}));return}this.log(i.helpInformation())}else{this.log(this.parent._commandHelp(e.command))}}else{this.log(this.parent._commandHelp(e.command))}t()}));e.command("exit").alias("quit").description("Exits application.").action((function(e){e.options=e.options||{};e.options.sessionId=this.session.id;this.parent.exit(e.options)}))}},1491:(e,t,r)=>{"use strict";if(!global._babelPolyfill){r(7094)}var n=r(3255);var i=r(2361).EventEmitter;var s=r(9092);var o=r(1183);var a=r(9821);var u=r(2155);var c=r(3120);var l=r(5447);var p=r(1675);var h=r(8972);var d=r(8173);var v=r(2037);var g=r(539);var y=r(5946);var m=r(9217);function Vorpal(){if(!(this instanceof Vorpal)){return new Vorpal}this._version="";this.cmdHistory=new this.CmdHistoryExtension;this.commands=[];this._queue=[];this._command=undefined;this.ui=u;this.chalk=d;this.lodash=n;this._delimiter="local@"+String(v.hostname()).split(".")[0]+"~$ ";u.setDelimiter(this._delimiter);this.server={sessions:[]};this._hooked=false;this._useDeprecatedAutocompletion=false;this.util=a;this.Session=c;this.session=new this.Session({local:true,user:"local",parent:this,delimiter:this._delimiter});this.isCommandArgKeyPairNormalized=true;this._init();return this}Vorpal.prototype=Object.create(i.prototype);var b=Vorpal.prototype;t=e.exports=Vorpal;Vorpal.prototype._init=function(){var e=this;u.on("vorpal_ui_keypress",(function(t){e.emit("keypress",t);e._onKeypress(t.key,t.value)}));e.use(h)};Vorpal.prototype.parse=function(e,t){t=t||{};var r=e;var i=this;var s=!(n.find(this.commands,{_catch:true})===undefined);r.shift();r.shift();if(r.length>0||s){if(t.use==="minimist"){i=p(r)}else{for(var o=0;o<r.length;++o){if(o===0){continue}if(r[o].indexOf(" ")>-1){r[o]='"'+r[o]+'"'}}this.exec(r.join(" "),(function(e){if(e!==undefined&&e!==null){throw new Error(e)}process.exit(0)}))}}return i};b.version=function(e){this._version=e;return this};b.delimiter=function(e){this._delimiter=e;if(this.session.isLocal()&&!this.session.client){this.session.delimiter(e)}return this};b.use=function(e,t){if(!e){return this}if(n.isFunction(e)){e.call(this,this,t)}else if(n.isString(e)){return this.use(require(e),t)}else{e=n.isArray(e)?e:[e];for(var r=0;r<e.length;++r){var i=e[r];if(i.command){var s=this.command(i.command);if(i.description){s.description(i.description)}if(i.options){i.options=n.isArray(i.options)?i.options:[i.options];for(var o=0;o<i.options.length;++o){s.option(i.options[o][0],i.options[o][1])}}if(i.action){s.action(i.action)}}}}return this};b.command=function(e,t,r){r=r||{};e=String(e);var n=/(\[[^\]]*\]|\<[^\>]*\>)/g;var i=[];var o;while((o=n.exec(e))!==null){i.push(o[1])}var a=/^([^\[\<]*)/;var u=a.exec(e)[0].trim();var c=new s(u,this);if(t){c.description(t);this.executables=true}c._noHelp=Boolean(r.noHelp);c._mode=r.mode||false;c._catch=r.catch||false;c._parseExpectedArgs(i);c.parent=this;var l=false;for(var p=0;p<this.commands.length;++p){l=this.commands[p]._name===c._name?true:l;if(l){this.commands[p]=c;break}}if(!l){this.commands.push(c)}else{console.warn(d.yellow('Warning: command named "'+e+'" was registered more than once.\nIf you intend to override a command, you should explicitly remove the first command with command.remove().'))}this.emit("command_registered",{command:c,name:e});return c};b.mode=function(e,t,r){return this.command(e,t,n.extend(r||{},{mode:true}))};b.catch=function(e,t,r){return this.command(e,t,n.extend(r||{},{catch:true}))};b.default=function(e,t,r){return this.command(e,t,n.extend(r||{},{catch:true}))};b.log=function(){this.ui.log.apply(this.ui,arguments);return this};b.pipe=function(e){if(this.ui){this.ui._pipeFn=e}return this};b.hook=function(e){if(e!==undefined){this._hook(e)}else{this._unhook()}return this};b._unhook=function(){if(this._hooked&&this._unhook!==undefined){this._unhook();this._hooked=false}return this};b._hook=function(e){if(this._hooked&&this._unhook!==undefined){this._unhook()}this._unhook=l(e);this._hooked=true;return this};b.CmdHistoryExtension=g;b.history=function(e){this.cmdHistory.setId(e);return this};b.localStorage=function(e){var t=Object.create(y);t.setId(e);n.extend(this.localStorage,t);return this};b.historyStoragePath=function(e){this.cmdHistory.setStoragePath(e);return this};b.show=function(){u.attach(this);return this};b.hide=function(){u.detach(this);return this};b._onKeypress=function(e,t){var r=this;if(this.session.isLocal()&&!this.session.client&&!this._command){this.session.getKeypressResult(e,t,(function(e,t){if(!e&&t!==undefined){if(n.isArray(t)){var i=a.prettifyArray(t);r.ui.imprint();r.session.log(i)}else{r.ui.input(t)}}}))}else{this._send("vantage-keypress-upstream","upstream",{key:e,value:t,sessionId:this.session.id})}};b.prompt=function(){var e=this;var t=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var r=arguments[1];return new Promise((function(n){var i=function cb(e){n(e);if(r){r(e)}};var s=undefined;var o=e.getSessionById(t.sessionId);if(!o){throw new Error("Vorpal.prompt was called without a passed Session ID.")}var a=function handler(t){var r=t.value;e.removeListener("vantage-prompt-upstream",handler);i(r)};if(o.isLocal()){u.setDelimiter(t.message||o.delimiter());s=u.prompt(t,(function(e){u.setDelimiter(o.delimiter());i(e)}))}else{e.on("vantage-prompt-upstream",a);e._send("vantage-prompt-downstream","downstream",{options:t,value:undefined,sessionId:o.id})}return s}))};b._prompt=function(e){var t=this;var r;e=e||{};if(!e.sessionId){e.sessionId=t.session.id}var n=t.getSessionById(e.sessionId);if(!n.isLocal()){this._send("vantage-resume-downstream","downstream",{sessionId:e.sessionId});return t}if(u.midPrompt()){return t}r=u.prompt({type:"input",name:"command",message:n.fullDelimiter()},(function(r){if(t.ui._cancelled===true){t.ui._cancelled=false;return}var n=String(r.command).trim();t.emit("client_prompt_submit",n);if(n===""||n==="undefined"){t._prompt(e);return}t.exec(n,(function(){t._prompt(e)}))}));return r};b.exec=function(e,t,r){var i=this;var s=i.session;r=n.isFunction(t)?t:r;t=t||{};if(t.sessionId){s=i.getSessionById(t.sessionId)}var o={command:e,args:t,callback:r,session:s};if(r!==undefined){i._queue.push(o);i._queueHandler();return i}return new Promise((function(e,t){o.resolve=e;o.reject=t;i._queue.push(o);i._queueHandler()}))};b.execSync=function(e,t){var r=this;var n=r.session;t=t||{};if(t.sessionId){n=r.getSessionById(t.sessionId)}var i={command:e,args:t,session:n,sync:true,options:t};return r._execQueueItem(i)};b._queueHandler=function(){if(this._queue.length>0&&this._command===undefined){var e=this._queue.shift();this._execQueueItem(e)}};b._execQueueItem=function(e){var t=this;t._command=e;if(e.session.isLocal()&&!e.session.client){return this._exec(e)}t._send("vantage-command-upstream","upstream",{command:e.command,args:e.args,completed:false,sessionId:e.session.id})};b._exec=function(e){var t=this;e=e||{};e.command=e.command||"";var r=e.command;e.command=e.session._mode?e.session._mode:e.command;var i=false;if(this.ui._midPrompt){i=true;this.ui.cancel()}if(!e.session){throw new Error("Fatal Error: No session was passed into command for execution: "+e)}if(String(e.command).indexOf("undefine")>-1){throw new Error("vorpal._exec was called with an undefined command.")}e.session.history(e.session._mode?r:e.command);var s=this.util.parseCommand(e.command,this.commands);e.command=s.command;e.pipes=s.pipes;var a=s.match;var u=s.matchArgs;function throwHelp(e,t,r){if(t){e.session.log(t)}var n=r||a;e.session.log(n.helpInformation())}function callback(e,r,n,s){if(i){t._prompt()}if(e.sync){delete t._command;if(r){if(e.options&&(e.options.fatal===true||b._fatal===true)){throw new Error(r)}return r}return n}else if(e.callback){if(s){e.callback.apply(t,s)}else{e.callback.call(t,r,n)}}else if(!r&&e.resolve){e.resolve(n)}else if(r&&e.reject){e.reject(n)}delete t._command;t._queueHandler()}if(a){e.fn=a._fn;e._cancel=a._cancel;e.validate=a._validate;e.commandObject=a;var c=a._init||function(e,t){t()};var l=a._delimiter||String(e.command).toLowerCase()+":";e.args=t.util.buildCommandArgs(u,a,e,t.isCommandArgKeyPairNormalized);if(n.isString(e.args)||!n.isObject(e.args)){throwHelp(e,e.args);return callback(e,undefined,e.args)}var p=true;for(var h=0;h<e.pipes.length;++h){var d=t.util.matchCommand(e.pipes[h],t.commands);if(!d.command){e.session.log(t._commandHelp(e.pipes[h]));p=false;break}d.args=t.util.buildCommandArgs(d.args,d.command);if(n.isString(d.args)||!n.isObject(d.args)){throwHelp(e,d.args,d.command);p=false;break}e.pipes[h]=d}if(!p){return callback(e)}if(e.args.options.help&&n.isFunction(a._help)){e.fn=a._help;delete e.validate;delete e._cancel}else if(e.args.options.help){throwHelp(e,"");return callback(e)}if(a._mode===true&&!e.session._mode){e.session._mode=e.command;e.fn=c;delete e.validate;t.cmdHistory.enterMode();e.session.modeDelimiter(l)}else if(e.session._mode){if(String(r).trim()==="exit"){t._exitMode({sessionId:e.session.id});return callback(e)}e.args=r}if(e.sync===true){var v;var g;try{v=e.fn.call(new o({downstream:undefined,commandWrapper:e,commandObject:e.commandObject,args:e.args}),e.args)}catch(e){g=e}return callback(e,g,v)}e.pipes=e.pipes.map((function(t){return new o({commandWrapper:e,command:t.command._name,commandObject:t.command,args:t.args})}));for(var y=e.pipes.length-1;y>-1;--y){var m=e.pipes[y+1];e.pipes[y].downstream=m}e.session.execCommandSet(e,(function(e,t,r,n){callback(e,t,r,n)}))}else{e.session.log(this._commandHelp(e.command));return callback(e,undefined,"Invalid command.")}};b._exitMode=function(e){var t=this.getSessionById(e.sessionId);t._mode=false;this.cmdHistory.exitMode();t.modeDelimiter(false);this.emit("mode_exit",this.cmdHistory.peek())};b.sigint=function(e){if(n.isFunction(e)){u.sigint(e)}else{throw new Error("vorpal.sigint must be passed in a valid function.")}return this};b.find=function(e){return n.find(this.commands,{_name:e})};b.help=function(e){this._help=e};b._commandHelp=function(e){if(!this.commands.length){return""}if(this._help!==undefined&&n.isFunction(this._help)){return this._help(e)}var t=[];var r=[];e=e?String(e).trim().toLowerCase():undefined;for(var i=0;i<this.commands.length;++i){var s=String(this.commands[i]._name).split(" ");if(s.length===1&&s[0]===e&&!this.commands[i]._hidden&&!this.commands[i]._catch){r.push(e)}var o="";for(var u=0;u<s.length;++u){o=String(o+" "+s[u]).trim();if(o===e&&!this.commands[i]._hidden&&!this.commands[i]._catch){t.push(this.commands[i]);break}}}var c=e&&t.length===0&&r.length===0?[""," Invalid Command. Showing Help:",""].join("\n"):"";var l=t.length>0;var p=l?String(e).trim().split(" ").length+1:1;t=t.length===0?this.commands:t;var h=!(t.length+6>process.stdout.rows);var d=t.filter((function(e){return!e._noHelp})).filter((function(e){return!e._catch})).filter((function(e){return!e._hidden})).filter((function(e){if(h===true){return true}return String(e._name).trim().split(" ").length<=p})).map((function(e){var t=e._args.map((function(e){return a.humanReadableArgName(e)})).join(" ");return[e._name+(e._alias?"|"+e._alias:"")+(e.options.length?" [options]":"")+" "+t,e.description()||""]}));var v=d.reduce((function(e,t){return Math.max(e,t[0].length)}),0);var g={};var y=n.uniq(t.filter((function(e){return String(e._name).trim().split(" ").length>p})).map((function(e){return String(e._name).split(" ").slice(0,p).join(" ")})).map((function(e){g[e]=g[e]||0;g[e]++;return e}))).map((function(e){var t=" "+a.pad(e+" *",v)+" "+g[e]+" sub-command"+(g[e]===1?"":"s")+".";return t}));y=h?[]:y;var b=process.stdout.columns-(v+4);var _=d.length<1?"":"\n Commands:\n\n"+d.map((function(e){var t=" "+a.pad(e[0],v)+" ";var r=m(e[1],b-8).split("\n");for(var n=0;n<r.length;++n){if(n!==0){r[n]=a.pad("",v+6)+r[n]}}r=r.join("\n");return t+r})).join("\n")+"\n\n";var w=y.length<1?"":" Command Groups:\n\n"+y.join("\n")+"\n";var S=String(c+_+"\n"+w).replace(/\n\n\n/g,"\n\n").replace(/\n\n$/,"\n");return S};b._send=function(e,t,r,n){n=n||{};r=r||{};var i=this.getSessionById(r.sessionId);if(!i){throw new Error("No Sessions logged for ID "+r.sessionId+" in vorpal._send.")}if(t==="upstream"){if(i.client){i.client.emit(e,r)}}else if(t==="downstream"){if(i.server){i.server.emit(e,r)}}};b._proxy=function(e,t,r,n){var i=this;return new Promise((function(s){var o=i.getSessionById(r.sessionId);if(o&&!o.isLocal()&&o.client){i._send(e,t,r,n)}else{s()}}))};b.getSessionById=function(e){if(n.isObject(e)){throw new Error("vorpal.getSessionById: id "+JSON.stringify(e)+" should not be an object.")}var t=n.find(this.server.sessions,{id:e});t=this.session.id===e?this.session:t;if(!e){throw new Error("vorpal.getSessionById was called with no ID passed.")}if(!t){var r={local:this.session.id,server:n.map(this.server.sessions,"id")};throw new Error("No session found for id "+e+" in vorpal.getSessionById. Sessions: "+JSON.stringify(r))}return t};b.exit=function(e){var t=this.getSessionById(e.sessionId);this.emit("vorpal_exit");if(t.isLocal()){process.exit(0)}else{t.server.emit("vantage-close-downstream",{sessionId:t.id})}};Object.defineProperty(b,"activeCommand",{get:function get(){var e=this._command?this._command.commandInstance:undefined;return e}})},7374:e=>{"use strict";var t="[";var r=e.exports;r.cursorTo=function(e,r){if(arguments.length===0){return t+"H"}if(arguments.length===1){return t+(e+1)+"G"}return t+(r+1)+";"+(e+1)+"H"};r.cursorMove=function(e,r){var n="";if(e<0){n+=t+-e+"D"}else if(e>0){n+=t+e+"C"}if(r<0){n+=t+-r+"A"}else if(r>0){n+=t+r+"B"}return n};r.cursorUp=function(e){return t+(typeof e==="number"?e:1)+"A"};r.cursorDown=function(e){return t+(typeof e==="number"?e:1)+"B"};r.cursorForward=function(e){return t+(typeof e==="number"?e:1)+"C"};r.cursorBackward=function(e){return t+(typeof e==="number"?e:1)+"D"};r.cursorLeft=t+"1000D";r.cursorSavePosition=t+"s";r.cursorRestorePosition=t+"u";r.cursorGetPosition=t+"6n";r.cursorNextLine=t+"E";r.cursorPrevLine=t+"F";r.cursorHide=t+"?25l";r.cursorShow=t+"?25h";r.eraseLines=function(e){var t="";for(var n=0;n<e;n++){t+=r.cursorLeft+r.eraseEndLine+(n<e-1?r.cursorUp():"")}return t};r.eraseEndLine=t+"K";r.eraseStartLine=t+"1K";r.eraseLine=t+"2K";r.eraseDown=t+"J";r.eraseUp=t+"1J";r.eraseScreen=t+"2J";r.scrollUp=t+"S";r.scrollDown=t+"T";r.clearScreen="c";r.beep="";r.image=function(e,t){t=t||{};var r="]1337;File=inline=1";if(t.width){r+=";width="+t.width}if(t.height){r+=";height="+t.height}if(t.preserveAspectRatio===false){r+=";preserveAspectRatio=0"}return r+":"+e.toString("base64")+""};r.iTerm={};r.iTerm.setCwd=function(e){return"]50;CurrentDir="+(e||process.cwd())+""}},6901:e=>{"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},1982:(e,t,r)=>{"use strict";e=r.nmd(e);function assembleStyles(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};e.colors.grey=e.colors.gray;Object.keys(e).forEach((function(t){var r=e[t];Object.keys(r).forEach((function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}));Object.defineProperty(e,t,{value:r,enumerable:false})}));return e}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},8173:(e,t,r)=>{"use strict";var n=r(1369);var i=r(1982);var s=r(7668);var o=r(1098);var a=r(8357);var u=Object.defineProperties;var c=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(e){this.enabled=!e||e.enabled===undefined?a:e.enabled}if(c){i.blue.open="[94m"}var l=function(){var e={};Object.keys(i).forEach((function(t){i[t].closeRe=new RegExp(n(i[t].close),"g");e[t]={get:function(){return build.call(this,this._styles.concat(t))}}}));return e}();var p=u((function chalk(){}),l);function build(e){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=e;builder.enabled=this.enabled;builder.__proto__=p;return builder}function applyStyle(){var e=arguments;var t=e.length;var r=t!==0&&String(arguments[0]);if(t>1){for(var n=1;n<t;n++){r+=" "+e[n]}}if(!this.enabled||!r){return r}var s=this._styles;var o=s.length;var a=i.dim.open;if(c&&(s.indexOf("gray")!==-1||s.indexOf("grey")!==-1)){i.dim.open=""}while(o--){var u=i[s[o]];r=u.open+r.replace(u.closeRe,u.open)+u.close}i.dim.open=a;return r}function init(){var e={};Object.keys(l).forEach((function(t){e[t]={get:function(){return build.call(this,[t])}}}));return e}u(Chalk.prototype,init());e.exports=new Chalk;e.exports.styles=i;e.exports.hasColor=o;e.exports.stripColor=s;e.exports.supportsColor=a},6666:(e,t,r)=>{"use strict";var n=r(8955);e.exports=function(e){if(n(e)){return false}if(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false}},5758:(e,t,r)=>{"use strict";var n=r(7374);var i=r(2701);function main(e){var t=0;var render=function(){i.hide();var r=[].join.call(arguments," ")+"\n";e.write(n.eraseLines(t)+r);t=r.split("\n").length};render.clear=function(){e.write(n.eraseLines(t));t=0};render.done=function(){t=0;i.show()};return render}e.exports=main(process.stdout);e.exports.stderr=main(process.stderr);e.exports.create=main},1675:e=>{e.exports=function(e,t){if(!t)t={};var r={bools:{},strings:{},unknownFn:null};if(typeof t["unknown"]==="function"){r.unknownFn=t["unknown"]}if(typeof t["boolean"]==="boolean"&&t["boolean"]){r.allBools=true}else{[].concat(t["boolean"]).filter(Boolean).forEach((function(e){r.bools[e]=true}))}var n={};Object.keys(t.alias||{}).forEach((function(e){n[e]=[].concat(t.alias[e]);n[e].forEach((function(t){n[t]=[e].concat(n[e].filter((function(e){return t!==e})))}))}));[].concat(t.string).filter(Boolean).forEach((function(e){r.strings[e]=true;if(n[e]){r.strings[n[e]]=true}}));var i=t["default"]||{};var s={_:[]};Object.keys(r.bools).forEach((function(e){setArg(e,i[e]===undefined?false:i[e])}));var o=[];if(e.indexOf("--")!==-1){o=e.slice(e.indexOf("--")+1);e=e.slice(0,e.indexOf("--"))}function argDefined(e,t){return r.allBools&&/^--[^=]+$/.test(t)||r.strings[e]||r.bools[e]||n[e]}function setArg(e,t,i){if(i&&r.unknownFn&&!argDefined(e,i)){if(r.unknownFn(i)===false)return}var o=!r.strings[e]&&isNumber(t)?Number(t):t;setKey(s,e.split("."),o);(n[e]||[]).forEach((function(e){setKey(s,e.split("."),o)}))}function setKey(e,t,n){var i=e;for(var s=0;s<t.length-1;s++){var o=t[s];if(o==="__proto__")return;if(i[o]===undefined)i[o]={};if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype)i[o]={};if(i[o]===Array.prototype)i[o]=[];i=i[o]}var o=t[t.length-1];if(o==="__proto__")return;if(i===Object.prototype||i===Number.prototype||i===String.prototype)i={};if(i===Array.prototype)i=[];if(i[o]===undefined||r.bools[o]||typeof i[o]==="boolean"){i[o]=n}else if(Array.isArray(i[o])){i[o].push(n)}else{i[o]=[i[o],n]}}function aliasIsBoolean(e){return n[e].some((function(e){return r.bools[e]}))}for(var a=0;a<e.length;a++){var u=e[a];if(/^--.+=/.test(u)){var c=u.match(/^--([^=]+)=([\s\S]*)$/);var l=c[1];var p=c[2];if(r.bools[l]){p=p!=="false"}setArg(l,p,u)}else if(/^--no-.+/.test(u)){var l=u.match(/^--no-(.+)/)[1];setArg(l,false,u)}else if(/^--.+/.test(u)){var l=u.match(/^--(.+)/)[1];var h=e[a+1];if(h!==undefined&&!/^-/.test(h)&&!r.bools[l]&&!r.allBools&&(n[l]?!aliasIsBoolean(l):true)){setArg(l,h,u);a++}else if(/^(true|false)$/.test(h)){setArg(l,h==="true",u);a++}else{setArg(l,r.strings[l]?"":true,u)}}else if(/^-[^-]+/.test(u)){var d=u.slice(1,-1).split("");var v=false;for(var g=0;g<d.length;g++){var h=u.slice(g+2);if(h==="-"){setArg(d[g],h,u);continue}if(/[A-Za-z]/.test(d[g])&&/=/.test(h)){setArg(d[g],h.split("=")[1],u);v=true;break}if(/[A-Za-z]/.test(d[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(h)){setArg(d[g],h,u);v=true;break}if(d[g+1]&&d[g+1].match(/\W/)){setArg(d[g],u.slice(g+2),u);v=true;break}else{setArg(d[g],r.strings[d[g]]?"":true,u)}}var l=u.slice(-1)[0];if(!v&&l!=="-"){if(e[a+1]&&!/^(-|--)[^-]/.test(e[a+1])&&!r.bools[l]&&(n[l]?!aliasIsBoolean(l):true)){setArg(l,e[a+1],u);a++}else if(e[a+1]&&/^(true|false)$/.test(e[a+1])){setArg(l,e[a+1]==="true",u);a++}else{setArg(l,r.strings[l]?"":true,u)}}}else{if(!r.unknownFn||r.unknownFn(u)!==false){s._.push(r.strings["_"]||!isNumber(u)?u:Number(u))}if(t.stopEarly){s._.push.apply(s._,e.slice(a+1));break}}}Object.keys(i).forEach((function(e){if(!hasKey(s,e.split("."))){setKey(s,e.split("."),i[e]);(n[e]||[]).forEach((function(t){setKey(s,t.split("."),i[e])}))}}));if(t["--"]){s["--"]=new Array;o.forEach((function(e){s["--"].push(e)}))}else{o.forEach((function(e){s._.push(e)}))}return s};function hasKey(e,t){var r=e;t.slice(0,-1).forEach((function(e){r=r[e]||{}}));var n=t[t.length-1];return n in r}function isNumber(e){if(typeof e==="number")return true;if(/^0x[0-9a-f]+$/i.test(e))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}},1389:(e,t,r)=>{"use strict";var n=r(7668);var i=r(2257);var s=r(6666);e.exports=function(e){if(typeof e!=="string"||e.length===0){return 0}var t=0;e=n(e);for(var r=0;r<e.length;r++){var o=i(e,r);if(o<=31||o>=127&&o<=159){continue}if(o>=65536){r++}if(s(o)){t+=2}else{t++}}return t}},7668:(e,t,r)=>{"use strict";var n=r(6901)();e.exports=function(e){return typeof e==="string"?e.replace(n,""):e}},8357:e=>{"use strict";var t=process.argv;var r=t.indexOf("--");var hasFlag=function(e){e="--"+e;var n=t.indexOf(e);return n!==-1&&(r!==-1?n<r:true)};e.exports=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){return false}if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()},9217:(e,t,r)=>{"use strict";var n=r(1389);var i=r(7668);var s=["",""];var o=39;var a={0:0,1:22,2:22,3:23,4:24,7:27,8:28,9:29,30:39,31:39,32:39,33:39,34:39,35:39,36:39,37:39,90:39,40:49,41:49,42:49,43:49,44:49,45:49,46:49,47:49};function wrapAnsi(e){return s[0]+"["+e+"m"}function wordLengths(e){return e.split(" ").map((function(e){return n(e)}))}function wrapWord(e,t,r){var n=false;var o=i(e[e.length-1]).length;for(var a=0;a<t.length;a++){var u=t[a];e[e.length-1]+=u;if(s.indexOf(u)!==-1){n=true}else if(n&&u==="m"){n=false;continue}if(n){continue}o++;if(o>=r&&a<t.length-1){e.push("");o=0}}if(!o&&e[e.length-1].length>0&&e.length>1){e[e.length-2]+=e.pop()}}function exec(e,t,r){var i=r||{};var u="";var c="";var l;var p=wordLengths(e);var h=e.split(" ");var d=[""];for(var v=0,g;(g=h[v])!==undefined;v++){var y=n(d[d.length-1]);if(y){d[d.length-1]+=" ";y++}if(p[v]>t&&i.hard){if(y){d.push("")}wrapWord(d,g,t);continue}if(y+p[v]>t&&y>0){if(i.wordWrap===false&&y<t){wrapWord(d,g,t);continue}d.push("")}d[d.length-1]+=g}u=d.map((function(e){return e.trim()})).join("\n");for(var m=0;m<u.length;m++){var b=u[m];c+=b;if(s.indexOf(b)!==-1){var _=parseFloat(/[0-9][^m]*/.exec(u.slice(m,m+4)));l=_===o?null:_}if(l&&a[l]){if(u[m+1]==="\n"){c+=wrapAnsi(a[l])}else if(b==="\n"){c+=wrapAnsi(l)}}}return c}e.exports=function(e,t,r){return String(e).split("\n").map((function(e){return exec(e,t,r)})).join("\n")}},8584:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var n=e.apply(this,t);var i=t[t.length-1];if(typeof n==="function"&&n!==i){Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n}}},48:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};function isLower(e){return e>=97&&e<=122}function isUpper(e){return e>=65&&e<=90}function isDigit(e){return e>=48&&e<=57}function toUpper(e){return e-32}function toUpperSafe(e){if(isLower(e)){return e-32}return e}function toLower(e){return e+32}function camelize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||isUpper(r)||r==t){return e}var n=[];var i=false;if(isUpper(r)){i=true;n.push(toLower(r))}else{n.push(r)}var s=e.length;for(var o=1;o<s;++o){var a=e.charCodeAt(o);if(a===t){i=true;a=e.charCodeAt(++o);if(isNaN(a)){return e}n.push(toUpperSafe(a))}else{n.push(a)}}return i?String.fromCharCode.apply(undefined,n):e}function decamelize$1(e,t){var r=e.charCodeAt(0);if(!isLower(r)){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(isUpper(a)){s.push(t);s.push(toLower(a));i=true}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function pascalize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||r==t){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(a===t){i=true;a=e.charCodeAt(++o);if(isNaN(a)){return e}s.push(toUpperSafe(a))}else if(o===0&&isLower(a)){i=true;s.push(toUpper(a))}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function depascalize$1(e,t){var r=e.charCodeAt(0);if(!isUpper(r)){return e}var n=e.length;var i=false;var s=[];for(var o=0;o<n;++o){var a=e.charCodeAt(o);if(isUpper(a)){if(o>0){s.push(t)}s.push(toLower(a));i=true}else{s.push(a)}}return i?String.fromCharCode.apply(undefined,s):e}function shouldProcessValue(e){return e&&(typeof e==="undefined"?"undefined":r(e))=="object"&&!(e instanceof Date)&&!(e instanceof Function)}function processKeys(e,t,r){var n=void 0;if(e instanceof Array){n=[]}else{if(typeof e.prototype!=="undefined"){return e}n={}}for(var i in e){var s=e[i];if(typeof i==="string")i=t(i,r&&r.separator);if(shouldProcessValue(s)){n[i]=processKeys(s,t,r)}else{n[i]=s}}return n}function processKeysInPlace(e,t,r){var n=Object.keys(e);for(var i=0;i<n.length;++i){var s=n[i];var o=e[s];var a=t(s,r&&r.separator);if(a!==s){delete e[s]}if(shouldProcessValue(o)){e[a]=processKeys(o,t,r)}else{e[a]=o}}return e}function camelize$$1(e,t){return camelize$1(e,t&&t.charCodeAt(0)||95)}function decamelize$$1(e,t){return decamelize$1(e,t&&t.charCodeAt(0)||95)}function pascalize$$1(e,t){return pascalize$1(e,t&&t.charCodeAt(0)||95)}function depascalize$$1(e,t){return depascalize$1(e,t&&t.charCodeAt(0)||95)}function camelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,camelize$$1,t);return processKeys(e,camelize$$1,t)}function decamelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,decamelize$$1,t);return processKeys(e,decamelize$$1,t)}function pascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,pascalize$$1,t);return processKeys(e,pascalize$$1,t)}function depascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,depascalize$$1,t);return processKeys(e,depascalize$$1,t)}t.camelize=camelize$$1;t.decamelize=decamelize$$1;t.pascalize=pascalize$$1;t.depascalize=depascalize$$1;t.camelizeKeys=camelizeKeys;t.decamelizeKeys=decamelizeKeys;t.pascalizeKeys=pascalizeKeys;t.depascalizeKeys=depascalizeKeys},9491:e=>{"use strict";e.exports=require("assert")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3292:e=>{"use strict";e.exports=require("fs/promises")},5687:e=>{"use strict";e.exports=require("https")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},6224:e=>{"use strict";e.exports=require("tty")},3837:e=>{"use strict";e.exports=require("util")},6861:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncResult=void 0;var s=r(9293);var o=function(){function AsyncResult(e){this.promise=Promise.resolve(e)}AsyncResult.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return i(this,(function(n){if(r.isErr()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(r.isErr()){return[2,r]}t=s.Ok;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.thenInternal=function(e){return new AsyncResult(this.promise.then(e))};return AsyncResult}();t.AsyncResult=o},2807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(6861),t);i(r(9293),t);i(r(6456),t)},6456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Option=t.Some=t.None=void 0;var n=r(1414);var i=r(9293);var s=function(){function NoneImpl(){}NoneImpl.prototype.isSome=function(){return false};NoneImpl.prototype.isNone=function(){return true};NoneImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};NoneImpl.prototype.unwrapOr=function(e){return e};NoneImpl.prototype.expect=function(e){throw new Error("".concat(e))};NoneImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap None")};NoneImpl.prototype.map=function(e){return this};NoneImpl.prototype.mapOr=function(e,t){return e};NoneImpl.prototype.mapOrElse=function(e,t){return e()};NoneImpl.prototype.or=function(e){return e};NoneImpl.prototype.orElse=function(e){return e()};NoneImpl.prototype.andThen=function(e){return this};NoneImpl.prototype.toResult=function(e){return(0,i.Err)(e)};NoneImpl.prototype.toString=function(){return"None"};return NoneImpl}();t.None=new s;Object.freeze(t.None);var o=function(){function SomeImpl(e){if(!(this instanceof SomeImpl)){return new SomeImpl(e)}this.value=e}SomeImpl.prototype.isSome=function(){return true};SomeImpl.prototype.isNone=function(){return false};SomeImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};SomeImpl.prototype.unwrapOr=function(e){return this.value};SomeImpl.prototype.expect=function(e){return this.value};SomeImpl.prototype.unwrap=function(){return this.value};SomeImpl.prototype.map=function(e){return(0,t.Some)(e(this.value))};SomeImpl.prototype.mapOr=function(e,t){return t(this.value)};SomeImpl.prototype.mapOrElse=function(e,t){return t(this.value)};SomeImpl.prototype.or=function(e){return this};SomeImpl.prototype.orElse=function(e){return this};SomeImpl.prototype.andThen=function(e){return e(this.value)};SomeImpl.prototype.toResult=function(e){return(0,i.Ok)(this.value)};SomeImpl.prototype.safeUnwrap=function(){return this.value};SomeImpl.prototype.toString=function(){return"Some(".concat((0,n.toString)(this.value),")")};SomeImpl.EMPTY=new SomeImpl(undefined);return SomeImpl}();t.Some=o;var a;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isSome()){n.push(o.value)}else{return o}}return(0,t.Some)(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}for(var n=0,i=e;n<i.length;n++){var s=i[n];if(s.isSome()){return s}else{return s}}return t.None}e.any=any;function isOption(e){return e instanceof t.Some||e===t.None}e.isOption=isOption})(a||(t.Option=a={}))},9293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Result=t.Ok=t.OkImpl=t.Err=t.ErrImpl=void 0;var n=r(1414);var i=r(6456);var s=r(6861);var o=function(){function ErrImpl(e){if(!(this instanceof ErrImpl)){return new ErrImpl(e)}this.error=e;var t=(new Error).stack.split("\n").slice(2);if(t&&t.length>0&&t[0].includes("ErrImpl")){t.shift()}this._stack=t.join("\n")}ErrImpl.prototype.isOk=function(){return false};ErrImpl.prototype.isErr=function(){return true};ErrImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};ErrImpl.prototype.else=function(e){return e};ErrImpl.prototype.unwrapOr=function(e){return e};ErrImpl.prototype.expect=function(e){throw new Error("".concat(e," - Error: ").concat((0,n.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.expectErr=function(e){return this.error};ErrImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap Error: ".concat((0,n.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.unwrapErr=function(){return this.error};ErrImpl.prototype.map=function(e){return this};ErrImpl.prototype.andThen=function(e){return this};ErrImpl.prototype.mapErr=function(e){return new t.Err(e(this.error))};ErrImpl.prototype.mapOr=function(e,t){return e};ErrImpl.prototype.mapOrElse=function(e,t){return e(this.error)};ErrImpl.prototype.or=function(e){return e};ErrImpl.prototype.orElse=function(e){return e(this.error)};ErrImpl.prototype.toOption=function(){return i.None};ErrImpl.prototype.toString=function(){return"Err(".concat((0,n.toString)(this.error),")")};Object.defineProperty(ErrImpl.prototype,"stack",{get:function(){return"".concat(this,"\n").concat(this._stack)},enumerable:false,configurable:true});ErrImpl.prototype.toAsyncResult=function(){return new s.AsyncResult(this)};ErrImpl.EMPTY=new ErrImpl(undefined);return ErrImpl}();t.ErrImpl=o;t.Err=o;var a=function(){function OkImpl(e){if(!(this instanceof OkImpl)){return new OkImpl(e)}this.value=e}OkImpl.prototype.isOk=function(){return true};OkImpl.prototype.isErr=function(){return false};OkImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};OkImpl.prototype.else=function(e){return this.value};OkImpl.prototype.unwrapOr=function(e){return this.value};OkImpl.prototype.expect=function(e){return this.value};OkImpl.prototype.expectErr=function(e){throw new Error(e)};OkImpl.prototype.unwrap=function(){return this.value};OkImpl.prototype.unwrapErr=function(){throw new Error("Tried to unwrap Ok: ".concat((0,n.toString)(this.value)),{cause:this.value})};OkImpl.prototype.map=function(e){return new t.Ok(e(this.value))};OkImpl.prototype.andThen=function(e){return e(this.value)};OkImpl.prototype.mapErr=function(e){return this};OkImpl.prototype.mapOr=function(e,t){return t(this.value)};OkImpl.prototype.mapOrElse=function(e,t){return t(this.value)};OkImpl.prototype.or=function(e){return this};OkImpl.prototype.orElse=function(e){return this};OkImpl.prototype.toOption=function(){return(0,i.Some)(this.value)};OkImpl.prototype.safeUnwrap=function(){return this.value};OkImpl.prototype.toString=function(){return"Ok(".concat((0,n.toString)(this.value),")")};OkImpl.prototype.toAsyncResult=function(){return new s.AsyncResult(this)};OkImpl.EMPTY=new OkImpl(undefined);return OkImpl}();t.OkImpl=a;t.Ok=a;var u;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isOk()){n.push(o.value)}else{return o}}return new t.Ok(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var i=0,s=e;i<s.length;i++){var o=s[i];if(o.isOk()){return o}else{n.push(o.error)}}return new t.Err(n)}e.any=any;function wrap(e){try{return new t.Ok(e())}catch(e){return new t.Err(e)}}e.wrap=wrap;function wrapAsync(e){try{return e().then((function(e){return new t.Ok(e)})).catch((function(e){return new t.Err(e)}))}catch(e){return Promise.resolve(new t.Err(e))}}e.wrapAsync=wrapAsync;function isResult(e){return e instanceof t.Err||e instanceof t.Ok}e.isResult=isResult})(u||(t.Result=u={}))},1414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toString=void 0;function toString(e){var t=String(e);if(t==="[object Object]"){try{t=JSON.stringify(e)}catch(e){}}return t}t.toString=toString},478:e=>{"use strict";e.exports=JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]')},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"dependencies":{"ts-node":"^10.9.1"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","ts-results-es":"^4.1.0-alpha.1","typescript":"^4.5.4","vorpal":"^1.12.0"}}')}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}i.loaded=true;return i.exports}(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var i=Object.create(null);__nccwpck_require__.r(i);var s={};t=t||[null,e({}),e([]),e(e)];for(var o=n&2&&r;typeof o=="object"&&!~t.indexOf(o);o=e(o)){Object.getOwnPropertyNames(o).forEach((e=>s[e]=()=>r[e]))}s["default"]=()=>r;__nccwpck_require__.d(i,s);return i}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;e.__esModule=true;var t=__nccwpck_require__(4046);(0,t.runCatCi)()})();module.exports=r})();
|