@decaf-ts/utils 0.1.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/LICENSE.md +157 -0
- package/README.md +95 -0
- package/dist/esm/utils.js +1 -0
- package/dist/types/bin/tag-release.d.ts +1 -0
- package/dist/types/bin/update-scripts.d.ts +1 -0
- package/dist/types/cli/command.d.ts +110 -0
- package/dist/types/cli/commands/index.d.ts +2 -0
- package/dist/types/cli/commands/tag-release.d.ts +105 -0
- package/dist/types/cli/commands/update-scripts.d.ts +211 -0
- package/dist/types/cli/constants.d.ts +73 -0
- package/dist/types/cli/index.d.ts +4 -0
- package/dist/types/cli/types.d.ts +28 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/input/index.d.ts +2 -0
- package/dist/types/input/input.d.ts +472 -0
- package/dist/types/input/types.d.ts +76 -0
- package/dist/types/output/common.d.ts +51 -0
- package/dist/types/output/index.d.ts +3 -0
- package/dist/types/output/logging.d.ts +177 -0
- package/dist/types/output/types.d.ts +203 -0
- package/dist/types/utils/accumulator.d.ts +105 -0
- package/dist/types/utils/constants.d.ts +136 -0
- package/dist/types/utils/environment.d.ts +57 -0
- package/dist/types/utils/fs.d.ts +133 -0
- package/dist/types/utils/http.d.ts +41 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/md.d.ts +156 -0
- package/dist/types/utils/tests.d.ts +170 -0
- package/dist/types/utils/text.d.ts +106 -0
- package/dist/types/utils/timeout.d.ts +1 -0
- package/dist/types/utils/types.d.ts +81 -0
- package/dist/types/utils/utils.d.ts +91 -0
- package/dist/types/utils/web.d.ts +7 -0
- package/dist/types/writers/OutputWriter.d.ts +49 -0
- package/dist/types/writers/RegexpOutputWriter.d.ts +69 -0
- package/dist/types/writers/StandardOutputWriter.d.ts +91 -0
- package/dist/types/writers/index.d.ts +4 -0
- package/dist/types/writers/types.d.ts +29 -0
- package/dist/utils.js +1 -0
- package/lib/assets/slogans.json +802 -0
- package/lib/bin/tag-release.cjs +12 -0
- package/lib/bin/update-scripts.cjs +12 -0
- package/lib/cli/command.cjs +153 -0
- package/lib/cli/commands/index.cjs +20 -0
- package/lib/cli/commands/tag-release.cjs +168 -0
- package/lib/cli/commands/update-scripts.cjs +511 -0
- package/lib/cli/constants.cjs +80 -0
- package/lib/cli/index.cjs +22 -0
- package/lib/cli/types.cjs +4 -0
- package/lib/esm/assets/slogans.json +802 -0
- package/lib/esm/bin/tag-release.js +10 -0
- package/lib/esm/bin/update-scripts.js +10 -0
- package/lib/esm/cli/command.js +149 -0
- package/lib/esm/cli/commands/index.js +4 -0
- package/lib/esm/cli/commands/tag-release.js +164 -0
- package/lib/esm/cli/commands/update-scripts.js +504 -0
- package/lib/esm/cli/constants.js +77 -0
- package/lib/esm/cli/index.js +6 -0
- package/lib/esm/cli/types.js +3 -0
- package/lib/esm/index.js +41 -0
- package/lib/esm/input/index.js +4 -0
- package/lib/esm/input/input.js +570 -0
- package/lib/esm/input/types.js +3 -0
- package/lib/esm/output/common.js +93 -0
- package/lib/esm/output/index.js +5 -0
- package/lib/esm/output/logging.js +350 -0
- package/lib/esm/output/types.js +3 -0
- package/lib/esm/utils/accumulator.js +145 -0
- package/lib/esm/utils/constants.js +176 -0
- package/lib/esm/utils/environment.js +91 -0
- package/lib/esm/utils/fs.js +271 -0
- package/lib/esm/utils/http.js +70 -0
- package/lib/esm/utils/index.js +9 -0
- package/lib/esm/utils/md.js +3 -0
- package/lib/esm/utils/tests.js +223 -0
- package/lib/esm/utils/text.js +142 -0
- package/lib/esm/utils/timeout.js +5 -0
- package/lib/esm/utils/types.js +3 -0
- package/lib/esm/utils/utils.js +220 -0
- package/lib/esm/utils/web.js +12 -0
- package/lib/esm/writers/OutputWriter.js +3 -0
- package/lib/esm/writers/RegexpOutputWriter.js +98 -0
- package/lib/esm/writers/StandardOutputWriter.js +127 -0
- package/lib/esm/writers/index.js +6 -0
- package/lib/esm/writers/types.js +3 -0
- package/lib/index.cjs +58 -0
- package/lib/input/index.cjs +20 -0
- package/lib/input/input.cjs +577 -0
- package/lib/input/types.cjs +4 -0
- package/lib/output/common.cjs +100 -0
- package/lib/output/index.cjs +21 -0
- package/lib/output/logging.cjs +355 -0
- package/lib/output/types.cjs +4 -0
- package/lib/utils/accumulator.cjs +149 -0
- package/lib/utils/constants.cjs +179 -0
- package/lib/utils/environment.cjs +95 -0
- package/lib/utils/fs.cjs +288 -0
- package/lib/utils/http.cjs +77 -0
- package/lib/utils/index.cjs +25 -0
- package/lib/utils/md.cjs +4 -0
- package/lib/utils/tests.cjs +263 -0
- package/lib/utils/text.cjs +153 -0
- package/lib/utils/timeout.cjs +8 -0
- package/lib/utils/types.cjs +4 -0
- package/lib/utils/utils.cjs +226 -0
- package/lib/utils/web.cjs +15 -0
- package/lib/writers/OutputWriter.cjs +4 -0
- package/lib/writers/RegexpOutputWriter.cjs +102 -0
- package/lib/writers/StandardOutputWriter.cjs +131 -0
- package/lib/writers/index.cjs +22 -0
- package/lib/writers/types.cjs +4 -0
- package/package.json +121 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";var t={65:(e,t,s)=>{const i=s(7096);e.exports=function(e,t){let s=String(i(e)||"").split(/\r?\n/);return t?s.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):s.length}},323:e=>{class t{constructor({token:e,date:t,parts:s,locales:i}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((s,i)=>i>e&&s instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const s=e.indexOf(this);return e.find(((e,i)=>i>s&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},405:(e,t,s)=>{const i=s(1394),{cursor:r}=s(723),o=s(4872),{clear:n,figures:a,style:l,wrap:h,entriesToDisplay:c}=s(1189);e.exports=class extends o{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=n("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,s,r){const o=(t.selected?i.green(a.radioOn):a.radioOff)+" "+r+" ";let n,l;return t.disabled?n=e===s?i.gray().underline(t.title):i.strikethrough().gray(t.title):(n=e===s?i.cyan().underline(t.title):t.title,e===s&&t.description&&(l=` - ${t.description}`,(o.length+n.length+l.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(l="\n"+h(t.description,{margin:o.length,width:this.out.columns})))),o+n+i.gray(l||"")}paginateOptions(e){if(0===e.length)return i.red("No matches for this query.");let t,{startIndex:s,endIndex:r}=c(this.cursor,e.length,this.optionsPerPage),o=[];for(let i=s;i<r;i++)t=i===s&&s>0?a.arrowUp:i===r-1&&r<e.length?a.arrowDown:" ",o.push(this.renderOption(this.cursor,e[i],i,t));return"\n"+o.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let e=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=n(e,this.out.columns)}}},674:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StyledString=void 0,t.style=function(...e){return new o(e.join(" "))};const i=s(6471),r=s(8564);class o{constructor(e){this.text=e,Object.entries(i.StandardForegroundColors).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>this.foreground(t)})})),Object.entries(i.BrightForegroundColors).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>this.foreground(t)})})),Object.entries(i.StandardBackgroundColors).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>this.background(t)})})),Object.entries(i.BrightBackgroundColors).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>this.background(t)})})),Object.entries(i.styles).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>this.style(t)})}))}clear(){return this.text=(0,r.clear)(this.text),this}raw(e){return this.text=(0,r.raw)(this.text,e),this}foreground(e){return this.text=(0,r.colorizeANSI)(this.text,e),this}background(e){return this.text=(0,r.colorizeANSI)(this.text,e,!0),this}style(e){return"string"!=typeof e||e in i.styles?(this.text=(0,r.applyStyle)(this.text,e),this):(console.warn(`Invalid style: ${e}`),this)}color256(e){return this.text=(0,r.colorize256)(this.text,e),this}bgColor256(e){return this.text=(0,r.colorize256)(this.text,e,!0),this}rgb(e,t,s){return this.text=(0,r.colorizeRGB)(this.text,e,t,s),this}bgRgb(e,t,s){return this.text=(0,r.colorizeRGB)(this.text,e,t,s,!0),this}toString(){return this.text}}t.StyledString=o},723:e=>{const t="[",s={to:(e,s)=>s?`${t}${s+1};${e+1}H`:`${t}${e+1}G`,move(e,s){let i="";return e<0?i+=`${t}${-e}D`:e>0&&(i+=`${t}${e}C`),s<0?i+=`${t}${-s}A`:s>0&&(i+=`${t}${s}B`),i},up:(e=1)=>`${t}${e}A`,down:(e=1)=>`${t}${e}B`,forward:(e=1)=>`${t}${e}C`,backward:(e=1)=>`${t}${e}D`,nextLine:(e=1)=>`${t}E`.repeat(e),prevLine:(e=1)=>`${t}F`.repeat(e),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:"7",restore:"8"},i={up:(e=1)=>`${t}S`.repeat(e),down:(e=1)=>`${t}T`.repeat(e)},r={screen:`${t}2J`,up:(e=1)=>`${t}1J`.repeat(e),down:(e=1)=>`${t}J`.repeat(e),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(e){let t="";for(let i=0;i<e;i++)t+=this.line+(i<e-1?s.up():"");return e&&(t+=s.left),t}};e.exports={cursor:s,scroll:i,erase:r,beep:""}},769:e=>{e.exports=(e,t,s)=>{s=s||t;let i=Math.min(t-s,e-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,t)}}},866:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.printBanner=function(e){const t=a(),s="# ░▒▓███████▓▒░ ░▒▓████████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░ ░▒▓████████▓▒░ ░▒▓████████▓▒░ ░▒▓███████▓▒░ \n# ( ( ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ \n# ) ) ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ \n# [=======] ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓████████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓██████▓▒░ \n# `-----´ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ \n# ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ \n# ░▒▓███████▓▒░ ░▒▓████████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░ \n#".split("\n"),i=s.reduce(((e,t)=>Math.max(e,t.length)),0);s.push(`# ${t.padStart(i-3)}`),s.forEach(((t,s)=>{(e?e.info.bind(e):console.log.bind(console))((0,o.style)(t||"").raw(n[s]).text)}))},t.getSlogan=a;const r=i(s(9680)),o=s(1076),n=["[38;5;215m","[38;5;209m","[38;5;205m","[38;5;210m","[38;5;217m","[38;5;216m","[38;5;224m","[38;5;230m","[38;5;230m"];function a(e){try{return e=void 0===e?Math.floor(Math.random()*r.default.length):e,r.default[e].Slogan}catch(e){throw new Error(`Failed to retrieve slogans: ${e}`)}}},869:e=>{e.exports=(e,t={})=>{const s=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+s.length>=i||e[e.length-1].length+t.length+1<i?e[e.length-1]+=` ${t}`:e.push(`${s}${t}`),e)),[s]).join("\n"))).join("\n")}},948:(e,t,s)=>{const i=s(1394),r=s(4872),{style:o,clear:n}=s(1189),{erase:a,cursor:l}=s(723);e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(n(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(a.line+l.to(0)+this.outputText))}}},1076:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(8564),t),r(s(6471),t),r(s(674),t)},1189:(e,t,s)=>{e.exports={action:s(3075),clear:s(8868),style:s(4792),strip:s(5815),figures:s(5992),lines:s(4182),wrap:s(869),entriesToDisplay:s(4536)}},1394:e=>{const{FORCE_COLOR:t,NODE_DISABLE_COLORS:s,TERM:i}=process.env,r={enabled:!s&&"dumb"!==i&&"0"!==t,reset:n(0,0),bold:n(1,22),dim:n(2,22),italic:n(3,23),underline:n(4,24),inverse:n(7,27),hidden:n(8,28),strikethrough:n(9,29),black:n(30,39),red:n(31,39),green:n(32,39),yellow:n(33,39),blue:n(34,39),magenta:n(35,39),cyan:n(36,39),white:n(37,39),gray:n(90,39),grey:n(90,39),bgBlack:n(40,49),bgRed:n(41,49),bgGreen:n(42,49),bgYellow:n(43,49),bgBlue:n(44,49),bgMagenta:n(45,49),bgCyan:n(46,49),bgWhite:n(47,49)};function o(e,t){let s,i=0,r="",o="";for(;i<e.length;i++)s=e[i],r+=s.open,o+=s.close,t.includes(s.close)&&(t=t.replace(s.rgx,s.close+s.open));return r+t+o}function n(e,t){let s={open:`[${e}m`,close:`[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(s)),void 0===t?this:r.enabled?o(this.keys,t+""):t+""):void 0===t?function(e,t){let s={has:e,keys:t};return s.reset=r.reset.bind(s),s.bold=r.bold.bind(s),s.dim=r.dim.bind(s),s.italic=r.italic.bind(s),s.underline=r.underline.bind(s),s.inverse=r.inverse.bind(s),s.hidden=r.hidden.bind(s),s.strikethrough=r.strikethrough.bind(s),s.black=r.black.bind(s),s.red=r.red.bind(s),s.green=r.green.bind(s),s.yellow=r.yellow.bind(s),s.blue=r.blue.bind(s),s.magenta=r.magenta.bind(s),s.cyan=r.cyan.bind(s),s.white=r.white.bind(s),s.gray=r.gray.bind(s),s.grey=r.grey.bind(s),s.bgBlack=r.bgBlack.bind(s),s.bgRed=r.bgRed.bind(s),s.bgGreen=r.bgGreen.bind(s),s.bgYellow=r.bgYellow.bind(s),s.bgBlue=r.bgBlue.bind(s),s.bgMagenta=r.bgMagenta.bind(s),s.bgCyan=r.bgCyan.bind(s),s.bgWhite=r.bgWhite.bind(s),s}([e],[s]):r.enabled?o([s],t+""):t+""}}e.exports=r},1416:e=>{e.exports=(e,t={})=>{const s=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+s.length>=i||e[e.length-1].length+t.length+1<i?e[e.length-1]+=` ${t}`:e.push(`${s}${t}`),e)),[s]).join("\n"))).join("\n")}},1458:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(s=e,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e;var s}}},1494:(e,t,s)=>{const i=s(1394),r=s(4872),{style:o,clear:n}=s(1189),{cursor:a,erase:l}=s(723);e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(n(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+a.to(0)+this.outputText))}}},1679:(e,t,s)=>{function i(e,t,s,i,r,o,n){try{var a=e[o](n),l=a.value}catch(e){return void s(e)}a.done?t(l):Promise.resolve(l).then(i,r)}const r=s(1394),o=s(4597),n=s(723),a=n.erase,l=n.cursor,h=s(4586),c=h.style,u=h.clear,d=h.figures,g=h.wrap,f=h.entriesToDisplay,p=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),m=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends o{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const s=e.findIndex((e=>e.value===t||e.title===t));return s>-1?s:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=c.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=u("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=p(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var t,s=this;return(t=function*(){const t=s.completing=s.suggest(s.input,s.choices),i=yield t;if(s.completing!==t)return;s.suggestions=i.map(((e,t,s)=>({title:m(s,t),value:p(s,t),description:e.description}))),s.completing=!1;const r=Math.max(i.length-1,0);s.moveSelect(Math.min(r,s.select)),e&&e()},function(){var e=this,s=arguments;return new Promise((function(r,o){var n=t.apply(e,s);function a(e){i(n,r,o,a,l,"next",e)}function l(e){i(n,r,o,a,l,"throw",e)}a(void 0)}))})()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,i){let o,n=s?d.arrowUp:i?d.arrowDown:" ",a=t?r.cyan().underline(e.title):e.title;return n=(t?r.cyan(d.pointer)+" ":" ")+n,e.description&&(o=` - ${e.description}`,(n.length+a.length+o.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(o="\n"+g(e.description,{margin:3,width:this.out.columns}))),n+" "+a+r.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(l.hide):this.out.write(u(this.outputText,this.out.columns)),super.render();let e=f(this.select,this.choices.length,this.limit),t=e.startIndex,s=e.endIndex;if(this.outputText=[c.symbol(this.done,this.aborted,this.exited),r.bold(this.msg),c.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const e=this.suggestions.slice(t,s).map(((e,i)=>this.renderOption(e,this.select===i+t,0===i&&t>0,i+t===s-1&&s<this.choices.length))).join("\n");this.outputText+="\n"+(e||r.gray(this.fallback.title))}this.out.write(a.line+l.to(0)+this.outputText)}}},1715:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(s=e,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e;var s}}},1908:(e,t,s)=>{e.exports={DatePart:s(323),Meridiem:s(5404),Day:s(1458),Hours:s(9199),Milliseconds:s(3988),Minutes:s(6781),Month:s(4906),Seconds:s(3217),Year:s(8775)}},1928:(e,t)=>{function s(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=function(e,t,s=" "){if(1!==s.length)throw new Error("Invalid character length for padding. must be one!");return e.padEnd(t,s)},t.patchPlaceholders=function(e,t){return e.replace(/\$\{([a-zA-Z0-9_]+)\}/g,((e,s)=>t[s]||e))},t.patchString=function(e,t,s="g"){return Object.entries(t).forEach((([t,r])=>{const o=new RegExp(i(t),s);e=e.replace(o,r)})),e},t.toCamelCase=function(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,((e,t)=>0===t?e.toLowerCase():e.toUpperCase())).replace(/\s+/g,"")},t.toENVFormat=function(e){return s(e).toUpperCase()},t.toSnakeCase=s,t.toKebabCase=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()},t.toPascalCase=function(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(e=>e.toUpperCase())).replace(/\s+/g,"")},t.escapeRegExp=i},1980:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},2030:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=s(1928),r=s(3741),o=s(3885);class n extends r.ObjectAccumulator{static{this.factory=()=>new n}constructor(){super()}fromEnv(e){let t;return(0,o.isBrowser)()?t=globalThis.ENV:(t=globalThis.process.env,e=(0,i.toENVFormat)(e)),t[e]}expand(e){Object.entries(e).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>{const s=this.fromEnv(e);return void 0===s?t:s},set:e=>{t=e},configurable:!0,enumerable:!0})}))}static instance(...e){return n._instance=n._instance?n._instance:n.factory(...e),n._instance}static accumulate(e){return n.instance().accumulate(e)}static keys(e=!0){return n.instance().keys().map((t=>e?(0,i.toENVFormat)(t):t))}}t.Environment=n},2064:(e,t,s)=>{e.exports={TextPrompt:s(4785),SelectPrompt:s(5646),TogglePrompt:s(1494),DatePrompt:s(2378),NumberPrompt:s(7679),MultiselectPrompt:s(405),AutocompletePrompt:s(4230),AutocompleteMultiselectPrompt:s(2869),ConfirmPrompt:s(948)}},2191:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReleaseScript=void 0;const i=s(6686),r=s(7154),o=s(7714),n=s(9529),a={ci:{type:"boolean",default:!0},message:{type:"string",short:"m"},tag:{type:"string",short:"t",default:void 0}};class l extends n.Command{constructor(){super("ReleaseScript",a)}async prepareVersion(e){const t=this.log.for(this.prepareVersion);return(e=this.testVersion(e||""))||(t.verbose("No release message provided. Prompting for one:"),t.info("Listing latest git tags:"),await(0,i.runCommand)("git tag --sort=-taggerdate | head -n 5").promise,await o.UserInput.insistForText("tag","Enter the new tag number (accepts v*.*.*[-...])",(e=>!!e.toString().match(/^v[0-9]+\.[0-9]+.[0-9]+(-[0-9a-zA-Z-]+)?$/))))}testVersion(e){const t=this.log.for(this.testVersion);switch(e=e.trim().toLowerCase()){case r.SemVersion.PATCH:case r.SemVersion.MINOR:case r.SemVersion.MAJOR:return t.verbose(`Using provided SemVer update: ${e}`,1),e;default:return t.verbose(`Testing provided version for SemVer compatibility: ${e}`,1),new RegExp(r.SemVersionRegex).test(e)?(t.verbose(`version approved: ${e}`,1),e):void t.debug(`Invalid version number: ${e}`)}}async prepareMessage(e){const t=this.log.for(this.prepareMessage);return e||(t.verbose("No release message provided. Prompting for one"),await o.UserInput.insistForText("message","What should be the release message/ticket?",(e=>!!e&&e.toString().length>5)))}async run(e){let t;const{ci:s}=e;let{tag:n,message:a}=e;n=await this.prepareVersion(n),a=await this.prepareMessage(a),t=await(0,i.runCommand)(`npm run prepare-release -- ${n} ${a}`,{cwd:process.cwd()}).promise,t=await(0,i.runCommand)("git status --porcelain").promise,await t,t.logs.length&&await o.UserInput.askConfirmation("git-changes","Do you want to push the changes to the remote repository?",!0)&&(await(0,i.runCommand)("git add .").promise,await(0,i.runCommand)(`git commit -m "${n} - ${a} - after release preparation${s?"":r.NoCIFLag}"`).promise),await(0,i.runCommand)(`npm version "${n}" -m "${a}${s?"":r.NoCIFLag}"`).promise,await(0,i.runCommand)("git push --follow-tags").promise,s||await(0,i.runCommand)("NPM_TOKEN=$(cat .npmtoken) npm publish --access public").promise}}t.ReleaseScript=l},2287:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},2368:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},2376:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},2378:(e,t,s)=>{const i=s(1394),r=s(4872),{style:o,clear:n,figures:a}=s(1189),{erase:l,cursor:h}=s(723),{DatePart:c,Meridiem:u,Day:d,Hours:g,Milliseconds:f,Minutes:p,Month:m,Seconds:b,Year:v}=s(7957),y=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,w={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new d(e),3:e=>new m(e),4:e=>new v(e),5:e=>new u(e),6:e=>new g(e),7:e=>new p(e),8:e=>new b(e),9:e=>new f(e)},S={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(S,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=n("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=y.exec(e);){let e=t.shift(),s=t.findIndex((e=>null!=e));this.parts.push(s in w?w[s]({token:t[s]||e,date:this.date,parts:this.parts,locales:this.locales}):t[s]||e)}let s=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof c))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof c))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(h.hide):this.out.write(n(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.parts.reduce(((e,t,s)=>e.concat(s!==this.cursor||this.done?t:i.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":a.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(l.line+h.to(0)+this.outputText))}}},2522:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},2672:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},2869:(e,t,s)=>{const i=s(1394),{cursor:r}=s(723),o=s(405),{clear:n,style:a,figures:l}=s(1189);e.exports=class extends o{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=n("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(e,t,s){let r;return r=t.disabled?e===s?i.gray().underline(t.title):i.strikethrough().gray(t.title):e===s?i.cyan().underline(t.title):t.title,(t.selected?i.green(l.radioOn):l.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let e=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=n(e,this.out.columns)}}},2935:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(7154),t),r(s(2030),t),r(s(3340),t),r(s(4747),t),r(s(1928),t),r(s(3874),t),r(s(6686),t)},3075:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},3179:(e,t,s)=>{const i=s(1394),r=s(4597),o=s(4586),n=o.style,a=o.clear,l=o.figures,h=o.wrap,c=o.entriesToDisplay,u=s(723).cursor;e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=a("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let e=c(this.cursor,this.choices.length,this.optionsPerPage),t=e.startIndex,s=e.endIndex;if(this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let e=t;e<s;e++){let r,o,n="",a=this.choices[e];o=e===t&&t>0?l.arrowUp:e===s-1&&s<this.choices.length?l.arrowDown:" ",a.disabled?(r=this.cursor===e?i.gray().underline(a.title):i.strikethrough().gray(a.title),o=(this.cursor===e?i.bold().gray(l.pointer)+" ":" ")+o):(r=this.cursor===e?i.cyan().underline(a.title):a.title,o=(this.cursor===e?i.cyan(l.pointer)+" ":" ")+o,a.description&&this.cursor===e&&(n=` - ${a.description}`,(o.length+r.length+n.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(n="\n"+h(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${i.gray(n)}\n`}}this.out.write(this.outputText)}}},3217:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},3258:(e,t,s)=>{const i=t,r=s(3847),o=e=>e;function n(e,t,s={}){return new Promise(((i,n)=>{const a=new r[e](t),l=s.onAbort||o,h=s.onSubmit||o,c=s.onExit||o;a.on("state",t.onState||o),a.on("submit",(e=>i(h(e)))),a.on("exit",(e=>i(c(e)))),a.on("abort",(e=>n(l(e))))}))}i.text=e=>n("TextPrompt",e),i.password=e=>(e.style="password",i.text(e)),i.invisible=e=>(e.style="invisible",i.text(e)),i.number=e=>n("NumberPrompt",e),i.date=e=>n("DatePrompt",e),i.confirm=e=>n("ConfirmPrompt",e),i.list=e=>{const t=e.separator||",";return n("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},i.toggle=e=>n("TogglePrompt",e),i.select=e=>n("SelectPrompt",e),i.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return n("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},i.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return n("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));i.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),n("AutocompletePrompt",e))},3340:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.patchFile=function e(t,s){const i=h.for(e);if(!r.default.existsSync(t))throw new Error(`File not found at path "${t}".`);let o=c(t);try{i.verbose(`Patching file "${t}"...`),i.debug(`with value: ${JSON.stringify(s)}`),o=(0,a.patchString)(o,s)}catch(e){throw new Error(`Error patching file: ${e}`)}u(t,o)},t.readFile=c,t.writeFile=u,t.getPackage=d,t.setPackageAttribute=function(e,t,s=process.cwd()){const i=d(s);i[e]=t,u(o.default.join(s,"package.json"),JSON.stringify(i,null,2))},t.getPackageVersion=function(e=process.cwd()){return d(e,"version")},t.getDependencies=g,t.updateDependencies=async function e(){const t=h.for(e);t.info("checking for updates..."),await(0,l.runCommand)("npx npm-check-updates -u").promise,t.info("updating..."),await(0,l.runCommand)("npx npm run do-install").promise},t.installIfNotAvailable=async function(e,t){if(!t){const e=await g();t={prod:e.prod?.map((e=>e.name))||[],dev:e.dev?.map((e=>e.name))||[],peer:e.peer?.map((e=>e.name))||[]}}const{prod:s,dev:i,peer:r}=t,o=Array.from(new Set([...s||[],...i||[],...r||[]])),n=(e="string"==typeof e?[e]:e).filter((e=>!o.includes(e)));return n.length&&await f({dev:n}),t.dev=t.dev||[],t.dev.push(...n),t},t.pushToGit=async function e(){const t=h.for(e),s=await(0,l.runCommand)("git config user.name").promise,i=await(0,l.runCommand)("git config user.email").promise;t.verbose(`cached git id: ${s}/${i}. changing to automation`),await(0,l.runCommand)('git config user.email "automation@decaf.ts"').promise,await(0,l.runCommand)('git config user.name "decaf"').promise,t.info("Pushing changes to git..."),await(0,l.runCommand)("git add .").promise,await(0,l.runCommand)('git commit -m "refs #1 - after repo setup"').promise,await(0,l.runCommand)("git push").promise,await(0,l.runCommand)(`git config user.email "${i}"`).promise,await(0,l.runCommand)(`git config user.name "${s}"`).promise,t.verbose(`reverted to git id: ${s}/${i}`)},t.installDependencies=f,t.normalizeImport=async function(e){return e.then((e=>e.default||e))};const r=i(s(9896)),o=i(s(6928)),n=s(9834),a=s(1928),l=s(6686),h=n.Logging.for("fs");function c(e){const t=h.for(c);try{return t.verbose(`Reading file "${e}"...`),r.default.readFileSync(e,"utf8")}catch(s){throw t.verbose(`Error reading file "${e}": ${s}`),new Error(`Error reading file "${e}": ${s}`)}}function u(e,t){const s=h.for(u);try{s.verbose(`Writing file "${e} with ${t.length} bytes...`),r.default.writeFileSync(e,t,"utf8")}catch(t){throw s.verbose(`Error writing file "${e}": ${t}`),new Error(`Error writing file "${e}": ${t}`)}}function d(e=process.cwd(),t){let s;try{s=JSON.parse(c(o.default.join(e,"package.json")))}catch(e){throw new Error(`Failed to retrieve package information" ${e}`)}if(t){if(!(t in s))throw new Error(`Property "${t}" not found in package.json`);return s[t]}return s}async function g(e=process.cwd()){let t;try{t=JSON.parse(await(0,l.runCommand)("npm ls --json",{cwd:e}).promise)}catch(e){throw new Error(`Failed to retrieve dependencies: ${e}`)}const s=(e,t)=>({name:e[0],version:e[1].version});return{prod:Object.entries(t.dependencies||{}).map(s),dev:Object.entries(t.devDependencies||{}).map(s),peer:Object.entries(t.peerDependencies||{}).map(s)}}async function f(e){const t=h.for(f),s=e.prod||[],i=e.dev||[],r=e.peer||[];s.length&&(t.info(`Installing dependencies ${s.join(", ")}...`),await(0,l.runCommand)(`npm install ${s.join(" ")}`,{cwd:process.cwd()}).promise),i.length&&(t.info(`Installing devDependencies ${i.join(", ")}...`),await(0,l.runCommand)(`npm install --save-dev ${i.join(" ")}`,{cwd:process.cwd()}).promise),r.length&&(t.info(`Installing peerDependencies ${r.join(", ")}...`),await(0,l.runCommand)(`npm install --save-peer ${r.join(" ")}`,{cwd:process.cwd()}).promise)}},3410:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectAccumulator=void 0;class s{constructor(){Object.defineProperty(this,"__size",{value:0,writable:!0,configurable:!1,enumerable:!1})}expand(e){Object.entries(e).forEach((([e,t])=>{Object.defineProperty(this,e,{get:()=>t,set:e=>{t=e},configurable:!0,enumerable:!0})}))}accumulate(e){return this.expand(e),this.__size=this.__size+Object.keys(e).length,this}get(e){return this[e]}has(e){return!!this[e]}remove(e){return e in this?(delete this[e],this.__size--,this):this}keys(){return Object.keys(this)}values(){return Object.values(this)}size(){return this.__size}clear(){return new s}forEach(e){Object.entries(this).forEach((([t,s],i)=>e(s,t,i)))}map(e){return Object.entries(this).map((([t,s],i)=>e(s,t,i)))}}t.ObjectAccumulator=s},3785:t=>{t.exports=e(import.meta.url)("readline")},3847:(e,t,s)=>{e.exports={TextPrompt:s(7160),SelectPrompt:s(3179),TogglePrompt:s(5319),DatePrompt:s(5359),NumberPrompt:s(8158),MultiselectPrompt:s(6818),AutocompletePrompt:s(1679),AutocompleteMultiselectPrompt:s(6854),ConfirmPrompt:s(9331)}},3874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3885:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=function(){return Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype}},3967:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(866),t),r(s(9834),t),r(s(5322),t)},3988:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},4182:(e,t,s)=>{const i=s(5815);e.exports=function(e,t){let s=String(i(e)||"").split(/\r?\n/);return t?s.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):s.length}},4230:(e,t,s)=>{const i=s(1394),r=s(4872),{erase:o,cursor:n}=s(723),{style:a,clear:l,figures:h,wrap:c,entriesToDisplay:u}=s(1189),d=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),g=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const s=e.findIndex((e=>e.value===t||e.title===t));return s>-1?s:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=a.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=d(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){const t=this.completing=this.suggest(this.input,this.choices),s=await t;if(this.completing!==t)return;this.suggestions=s.map(((e,t,s)=>({title:g(s,t),value:d(s,t),description:e.description}))),this.completing=!1;const i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,r){let o,n=s?h.arrowUp:r?h.arrowDown:" ",a=t?i.cyan().underline(e.title):e.title;return n=(t?i.cyan(h.pointer)+" ":" ")+n,e.description&&(o=` - ${e.description}`,(n.length+a.length+o.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(o="\n"+c(e.description,{margin:3,width:this.out.columns}))),n+" "+a+i.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(n.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=u(this.select,this.choices.length,this.limit);if(this.outputText=[a.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),a.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const s=this.suggestions.slice(e,t).map(((s,i)=>this.renderOption(s,this.select===i+e,0===i&&e>0,i+e===t-1&&t<this.choices.length))).join("\n");this.outputText+="\n"+(s||i.gray(this.fallback.title))}this.out.write(o.line+n.to(0)+this.outputText)}}},4363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4409:(e,t,s)=>{function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function r(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?i(Object(s),!0).forEach((function(t){o(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):i(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function o(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,i=new Array(t);s<t;s++)i[s]=e[s];return i}function a(e,t,s,i,r,o,n){try{var a=e[o](n),l=a.value}catch(e){return void s(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function l(e){return function(){var t=this,s=arguments;return new Promise((function(i,r){var o=e.apply(t,s);function n(e){a(o,i,r,n,l,"next",e)}function l(e){a(o,i,r,n,l,"throw",e)}n(void 0)}))}}const h=s(3258),c=["suggest","format","onState","validate","onRender","type"],u=()=>{};function d(){return g.apply(this,arguments)}function g(){return g=l((function*(e=[],{onSubmit:t=u,onCancel:s=u}={}){const i={},o=d._override||{};let a,g,p,m,b,v;e=[].concat(e);const y=function(){var e=l((function*(e,t,s=!1){if(s||!e.validate||!0===e.validate(t))return e.format?yield e.format(t,i):t}));return function(t,s){return e.apply(this,arguments)}}();var w,S=function(e,t){var s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=function(e,t){if(e){if("string"==typeof e)return n(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){s=s.call(e)},n:function(){var e=s.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==s.return||s.return()}finally{if(l)throw o}}}}(e);try{for(S.s();!(w=S.n()).done;){g=w.value;var T=g;if(m=T.name,b=T.type,"function"==typeof b&&(b=yield b(a,r({},i),g),g.type=b),b){for(let e in g){if(c.includes(e))continue;let t=g[e];g[e]="function"==typeof t?yield t(a,r({},i),v):t}if(v=g,"string"!=typeof g.message)throw new Error("prompt message is required");var C=g;if(m=C.name,b=C.type,void 0===h[b])throw new Error(`prompt type (${b}) is not defined`);if(void 0===o[g.name]||(a=yield y(g,o[g.name]),void 0===a)){try{a=d._injected?f(d._injected,g.initial):yield h[b](g),i[m]=a=yield y(g,a,!0),p=yield t(g,a,i)}catch(e){p=!(yield s(g,i))}if(p)return i}else i[m]=a}}}catch(e){S.e(e)}finally{S.f()}return i})),g.apply(this,arguments)}function f(e,t){const s=e.shift();if(s instanceof Error)throw s;return void 0===s?t:s}e.exports=Object.assign(d,{prompt:d,prompts:h,inject:function(e){d._injected=(d._injected||[]).concat(e)},override:function(e){d._override=Object.assign({},e)}})},4434:t=>{t.exports=e(import.meta.url)("events")},4515:(e,t,s)=>{function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,i=new Array(t);s<t;s++)i[s]=e[s];return i}const r=s(7096),o=s(723),n=o.erase,a=o.cursor;e.exports=function(e,t){if(!t)return n.line+a.to(0);let s=0;var o,l=function(e,t){var s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=function(e,t){if(e){if("string"==typeof e)return i(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,l=!1;return{s:function(){s=s.call(e)},n:function(){var e=s.next();return a=e.done,e},e:function(e){l=!0,n=e},f:function(){try{a||null==s.return||s.return()}finally{if(l)throw n}}}}(e.split(/\r?\n/));try{for(l.s();!(o=l.n()).done;){let e=o.value;s+=1+Math.floor(Math.max([...r(e)].length-1,0)/t)}}catch(e){l.e(e)}finally{l.f()}return n.lines(s)}},4536:e=>{e.exports=(e,t,s)=>{s=s||t;let i=Math.min(t-s,e-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,t)}}},4586:(e,t,s)=>{e.exports={action:s(2522),clear:s(4515),style:s(9939),strip:s(7096),figures:s(9599),lines:s(65),wrap:s(1416),entriesToDisplay:s(769)}},4597:(e,t,s)=>{const i=s(3785),r=s(4586).action,o=s(4434),n=s(723),a=n.beep,l=n.cursor,h=s(1394);e.exports=class extends o{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,o=(e,t)=>{let i=r(t,s);!1===i?this._&&this._(e,t):"function"==typeof this[i]?this[i](t):this.bell()};this.close=()=>{this.out.write(l.show),this.in.removeListener("keypress",o),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",o)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(a)}render(){this.onRender(h),this.firstRender&&(this.firstRender=!1)}}},4639:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateSync=void 0;const r=i(s(6928)),o=s(9529),n=s(2935),a=s(6946),l=i(s(9896)),h="https://raw.githubusercontent.com/decaf-ts/ts-workspace/master",c={templates:[".github/ISSUE_TEMPLATE/bug_report.md",".github/ISSUE_TEMPLATE/feature_request.md",".github/FUNDING.yml"],workflows:[".github/workflows/codeql-analysis.yml",".github/workflows/jest-coverage.yaml",".github/workflows/nodejs-build-prod.yaml",".github/workflows/pages.yaml",".github/workflows/publish-on-release.yaml",".github/workflows/release-on-tag.yaml",".github/workflows/snyk-analysis.yaml"],ide:[".idea/runConfigurations/All Tests.run.xml",".idea/runConfigurations/build.run.xml",".idea/runConfigurations/build_prod.run.xml",".idea/runConfigurations/coverage.run.xml",".idea/runConfigurations/docs.run.xml",".idea/runConfigurations/drawings.run.xml",".idea/runConfigurations/flash-forward.run.xml",".idea/runConfigurations/Integration_Tests.run.xml",".idea/runConfigurations/Bundling_Tests.run.xml",".idea/runConfigurations/lint-fix.run.xml",".idea/runConfigurations/release.run.xml",".idea/runConfigurations/test_circular.run.xml",".idea/runConfigurations/uml.run.xml",".idea/runConfigurations/Unit Tests.run.xml",".idea/runConfigurations/update-scripts.run.xml"],docs:["workdocs/tutorials/Contributing.md","workdocs/tutorials/Documentation.md","workdocs/tutorials/For Developers.md","workdocs/2-Badges.md","workdocs/jsdocs.json","workdocs/readme-md.json"],styles:[".prettierrc","eslint.config.js"],scripts:["bin/update-scripts.cjs","bin/tag-release.cjs"],tests:["jest.config.ts","workdocs/reports/jest.coverage.config.ts"],typescript:["tsconfig.json"],docker:["Dockerfile"],automation:["workdocs/confluence/Continuous Integration-Deployment/GitHub.md","workdocs/confluence/Continuous Integration-Deployment/Jira.md","workdocs/confluence/Continuous Integration-Deployment/Teams.md"]},u={boot:{type:"boolean"},org:{type:"string",short:"o"},name:{type:"string",short:"n",default:void 0},author:{type:"string",short:"a",default:void 0},all:{type:"boolean"},license:{type:"string",message:"Pick the license"},scripts:{type:"boolean"},styles:{type:"boolean"},docs:{type:"boolean"},ide:{type:"boolean"},workflows:{type:"boolean"},templates:{type:"boolean"},typescript:{type:"boolean"},docker:{type:"boolean"},pkg:{type:"boolean"},dependencies:{type:"boolean"},tests:{type:"boolean"},automation:{type:"boolean"}};class d extends o.Command{constructor(){super("TemplateSync",u),this.replacements={},this.getStyles=()=>this.downloadOption("styles"),this.getTemplates=()=>this.downloadOption("templates"),this.getWorkflows=()=>this.downloadOption("workflows"),this.getDocs=()=>this.downloadOption("docs"),this.getTypescript=()=>this.downloadOption("typescript"),this.getAutomation=()=>this.downloadOption("automation"),this.getTests=()=>this.downloadOption("tests"),this.getDocker=()=>this.downloadOption("docker")}loadValuesFromPackage(){const e=process.cwd(),t=(0,n.getPackage)(e,"author");let s,i=(0,n.getPackage)(e,"name");if(i.startsWith("@")){const e=i.split("/");i=e[1],s=e[0].replace("@","")}["Tiago Venceslau","TiagoVenceslau","${author}"].forEach((e=>this.replacements[e]=t)),["TS-Workspace","ts-workspace","${name}"].forEach((e=>this.replacements[e]=i)),["decaf-ts","${org}"].forEach((e=>this.replacements[e]=s||'""')),this.replacements["${org_or_owner}"]=s||i}async downloadOption(e){if(!(e in c))throw new Error(`Option "${e}" not found in options`);const t=c[e];for(const e of t){this.log.info(`Downloading ${e}`);let t=await n.HttpClient.downloadFile(`${h}/${e}`);t=(0,n.patchString)(t,this.replacements),(0,n.writeFile)(r.default.join(process.cwd(),e),t)}}async getLicense(e){this.log.info(`Downloading ${e} license`);const t=`${h}/workdocs/licenses/${e}.md`;let s=await n.HttpClient.downloadFile(t);s=(0,n.patchString)(s,this.replacements),(0,n.writeFile)(r.default.join(process.cwd(),"LICENSE.md"),s),(0,n.setPackageAttribute)("license",e)}async getIde(){l.default.mkdirSync(r.default.join(process.cwd(),".idea","runConfigurations"),{recursive:!0}),await this.downloadOption("ide")}async getScripts(){await this.downloadOption("scripts"),this.log.info("please re-run the command"),process.exit(0)}async initPackage(e,t,s){try{const i=(0,n.getPackage)();delete i[n.SetupScriptKey],i.name=e,i.version="0.0.1",i.author=t,i.license=s,l.default.writeFileSync("package.json",JSON.stringify(i,null,2))}catch(e){throw new Error(`Error fixing package.json: ${e}`)}}async updatePackageScrips(){try{const e=JSON.parse(await n.HttpClient.downloadFile(`${h}/package.json`)),{scripts:t}=e,s=(0,n.getPackage)();Object.keys(s.scripts).forEach((e=>{if(e in t){const i=(0,n.patchString)(t[e],this.replacements);i!==t[e]&&(s.scripts[e]=i)}})),s.exports.require=e.exports.require,s.exports.import=e.exports.import,s.types=e.types,l.default.writeFileSync("package.json",JSON.stringify(s,null,2))}catch(e){throw new Error(`Error fixing package.json scripts: ${e}`)}}async createTokenFiles(){const e=this.log.for(this.createTokenFiles),t=await a.UserInput.insistForText("token","please input your github token",(e=>!!e.match(/^ghp_[0-9a-zA-Z]{36}$/g)));Object.values(n.Tokens).forEach((s=>{try{let i;try{i=l.default.existsSync(s)}catch(i){return e.info(`Token file ${s} not found. Creating a new one...`),void l.default.writeFileSync(s,".token"===s?t:"")}i||l.default.writeFileSync(s,".token"===s?t:"")}catch(e){throw new Error(`Error creating token file ${s}: ${e}`)}}))}async getOrg(){const e=await a.UserInput.askText("Organization","Enter the organization name (will be used to scope your npm project. leave blank to create a unscoped project):");return await a.UserInput.askConfirmation("Confirm organization","Is this organization correct?",!0)?e:this.getOrg()}async auditFix(){return await(0,n.runCommand)("npm audit fix --force").promise}patchFiles(){const e=[...l.default.readdirSync(r.default.join(process.cwd(),"src"),{recursive:!0,withFileTypes:!0}).filter((e=>e.isFile())).map((e=>r.default.join(e.parentPath,e.name))),...l.default.readdirSync(r.default.join(process.cwd(),"workdocs"),{recursive:!0,withFileTypes:!0}).filter((e=>e.isFile()&&e.name.endsWith(".md"))).map((e=>r.default.join(e.parentPath,e.name))),r.default.join(process.cwd(),".gitlab-ci.yml"),r.default.join(process.cwd(),"workdocs","jsdocs.json")];for(const t of e)(0,n.patchFile)(t,this.replacements)}async updateDependencies(){try{const e=JSON.parse(await n.HttpClient.downloadFile(`${h}/package.json`)),{devDependencies:t}=e,s=(0,n.getPackage)();Object.keys(s.scripts).forEach((e=>{if(e in t){const i=t[e];i!==t[e]&&(s.devDependencies=s.devDependencies||{},s.devDependencies[e]=i)}})),l.default.writeFileSync("package.json",JSON.stringify(s,null,2)),await(0,n.runCommand)("npm install").promise}catch(e){throw new Error(`Error fixing package.json dependencies: ${e}`)}}async run(e){let{license:t}=e;const{boot:s}=e;let{all:i,scripts:r,styles:o,docs:n,ide:l,workflows:h,templates:c,docker:u,typescript:d,dependencies:g,tests:f,automation:p,pkg:m}=e;if((r||o||n||l||h||c||u||d||p||g||f||m)&&(i=!1),s){const e=await this.getOrg(),s=await a.UserInput.insistForText("Project name","Enter the project name:",(e=>e.length>1)),i=await a.UserInput.insistForText("Author","Enter the author name:",(e=>e.length>1)),r=e?`@${e}/${s}`:s;await this.initPackage(r,i,t),await this.createTokenFiles(),await this.auditFix(),this.patchFiles()}i&&(r=!1,o=!0,n=!0,l=!0,h=!0,c=!0,u=!0,d=!0,m=!0,g=!0,f=!0,p=!1),void 0===r&&(r=await a.UserInput.askConfirmation("scripts","Do you want to get scripts?",!0)),r&&await this.getScripts(),this.loadValuesFromPackage(),i||void 0!==t||await a.UserInput.askConfirmation("license","Do you want to set a license?",!0)&&(t=await a.UserInput.insistForText("license","Enter the desired License (MIT|GPL|Apache|LGPL|AGPL):",(e=>!!e&&!!e.match(/^(MIT|GPL|Apache|LGPL|AGPL)$/g)))),void 0!==t&&await this.getLicense(t),void 0===l&&(l=await a.UserInput.askConfirmation("ide","Do you want to get ide configs?",!0)),l&&await this.getIde(),void 0===d&&(d=await a.UserInput.askConfirmation("typescript","Do you want to get typescript configs?",!0)),d&&await this.getTypescript(),void 0===u&&(u=await a.UserInput.askConfirmation("docker","Do you want to get docker configs?",!0)),u&&await this.getDocker(),void 0===p&&(p=await a.UserInput.askConfirmation("automation","Do you want to get automation configs?",!0)),p&&await this.getAutomation(),void 0===o&&(o=await a.UserInput.askConfirmation("styles","Do you want to get styles?",!0)),o&&await this.getStyles(),void 0===n&&(n=await a.UserInput.askConfirmation("docs","Do you want to get docs?",!0)),n&&await this.getDocs(),void 0===h&&(h=await a.UserInput.askConfirmation("workflows","Do you want to get workflows?",!0)),h&&await this.getWorkflows(),void 0===c&&(c=await a.UserInput.askConfirmation("templates","Do you want to get templates?",!0)),c&&await this.getTemplates(),void 0===m&&(m=await a.UserInput.askConfirmation("pkg","Do you want to update your package.json scripts?",!0)),m&&await this.updatePackageScrips(),void 0===f&&(f=await a.UserInput.askConfirmation("pkg","Do you want to update your test configs?",!0)),f&&await this.getTests(),void 0===g&&(g=await a.UserInput.askConfirmation("pkg","Do you want to update dev dependencies?",!0)),g&&await this.updateDependencies()}}t.TemplateSync=d},4737:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4747:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=void 0;const r=i(s(5692)),o=s(9834);class n{static{this.log=o.Logging.for(n)}static async downloadFile(e){return new Promise(((t,s)=>{!function e(i){i=encodeURI(i),r.default.get(i,(r=>{if(301===r.statusCode||307===r.statusCode)return e(r.headers.location);if(200!==r.statusCode)return n.log.error(`Failed to fetch ${i} (status: ${r.statusCode})`),s(new Error(`Failed to fetch ${i}`));let o="";r.on("data",(e=>{o+=e})),r.on("error",(e=>{s(e)})),r.on("end",(()=>{t(o)}))}))}(e)}))}}t.HttpClient=n},4785:(e,t,s)=>{const i=s(1394),r=s(4872),{erase:o,cursor:n}=s(723),{style:a,clear:l,lines:h,figures:c}=s(1189);e.exports=class extends r{constructor(e={}){super(e),this.transform=a.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error)return this.red=!0,this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(n.down(h(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns)),this.out.write(l(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":c.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(o.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore+n.move(this.cursorOffset,0)))}}},4792:(e,t,s)=>{const i=s(1394),r=s(5992),o=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),n=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});e.exports={styles:o,render:e=>o[e]||o.default,symbols:n,symbol:(e,t,s)=>t?n.aborted:s?n.exited:e?n.done:n.default,delimiter:e=>i.gray(e?r.ellipsis:r.pointerSmall),item:(e,t)=>i.gray(e?t?r.pointerSmall:"+":r.line)}},4872:(e,t,s)=>{const i=s(3785),{action:r}=s(1189),o=s(4434),{beep:n,cursor:a}=s(723),l=s(1394);e.exports=class extends o{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,o=(e,t)=>{let i=r(t,s);!1===i?this._&&this._(e,t):"function"==typeof this[i]?this[i](t):this.bell()};this.close=()=>{this.out.write(a.show),this.in.removeListener("keypress",o),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",o)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(n)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},4906:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},5135:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},5317:t=>{t.exports=e(import.meta.url)("child_process")},5319:(e,t,s)=>{const i=s(1394),r=s(4597),o=s(4586),n=o.style,a=o.clear,l=s(723),h=l.cursor,c=l.erase;e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(h.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(c.line+h.to(0)+this.outputText))}}},5322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5359:(e,t,s)=>{function i(e,t,s,i,r,o,n){try{var a=e[o](n),l=a.value}catch(e){return void s(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function r(e){return function(){var t=this,s=arguments;return new Promise((function(r,o){var n=e.apply(t,s);function a(e){i(n,r,o,a,l,"next",e)}function l(e){i(n,r,o,a,l,"throw",e)}a(void 0)}))}}const o=s(1394),n=s(4597),a=s(4586),l=a.style,h=a.clear,c=a.figures,u=s(723),d=u.erase,g=u.cursor,f=s(1908),p=f.DatePart,m=f.Meridiem,b=f.Day,v=f.Hours,y=f.Milliseconds,w=f.Minutes,S=f.Month,T=f.Seconds,C=f.Year,x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,k={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new b(e),3:e=>new S(e),4:e=>new C(e),5:e=>new m(e),6:e=>new v(e),7:e=>new w(e),8:e=>new T(e),9:e=>new y(e)},D={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(D,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=h("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=x.exec(e);){let e=t.shift(),s=t.findIndex((e=>null!=e));this.parts.push(s in k?k[s]({token:t[s]||e,date:this.date,parts:this.parts,locales:this.locales}):t[s]||e)}let s=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof p))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return r((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return r((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof p))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(g.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(!1),this.parts.reduce(((e,t,s)=>e.concat(s!==this.cursor||this.done?t:o.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":c.pointerSmall} ${o.red().italic(t)}`),"")),this.out.write(d.line+g.to(0)+this.outputText))}}},5404:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},5568:e=>{class t{constructor({token:e,date:t,parts:s,locales:i}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((s,i)=>i>e&&s instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const s=e.indexOf(this);return e.find(((e,i)=>i>s&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},5646:(e,t,s)=>{const i=s(1394),r=s(4872),{style:o,clear:n,figures:a,wrap:l,entriesToDisplay:h}=s(1189),{cursor:c}=s(723);e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=n("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=h(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let s=e;s<t;s++){let r,o,n="",h=this.choices[s];o=s===e&&e>0?a.arrowUp:s===t-1&&t<this.choices.length?a.arrowDown:" ",h.disabled?(r=this.cursor===s?i.gray().underline(h.title):i.strikethrough().gray(h.title),o=(this.cursor===s?i.bold().gray(a.pointer)+" ":" ")+o):(r=this.cursor===s?i.cyan().underline(h.title):h.title,o=(this.cursor===s?i.cyan(a.pointer)+" ":" ")+o,h.description&&this.cursor===s&&(n=` - ${h.description}`,(o.length+r.length+n.length>=this.out.columns||h.description.split(/\r?\n/).length>1)&&(n="\n"+l(h.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${i.gray(n)}\n`}}this.out.write(this.outputText)}}},5692:t=>{t.exports=e(import.meta.url)("https")},5815:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(t,"g");return"string"==typeof e?e.replace(s,""):e}},5992:e=>{const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},s={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},i="win32"===process.platform?s:t;e.exports=i},6471:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.styles=t.BrightBackgroundColors=t.StandardBackgroundColors=t.BrightForegroundColors=t.StandardForegroundColors=t.AnsiReset=void 0,t.AnsiReset="[0m",t.StandardForegroundColors={black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37},t.BrightForegroundColors={brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},t.StandardBackgroundColors={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47},t.BrightBackgroundColors={bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},t.styles={reset:0,bold:1,dim:2,italic:3,underline:4,blink:5,inverse:7,hidden:8,strikethrough:9,doubleUnderline:21,normalColor:22,noItalicOrFraktur:23,noUnderline:24,noBlink:25,noInverse:27,noHidden:28,noStrikethrough:29}},6483:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6487:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(2191),t),r(s(4639),t)},6686:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lockify=function(e){let t=Promise.resolve();return(...s)=>{const i=t.then((()=>e(...s)));return t=i.catch((()=>{})),i}},t.chainAbortController=a,t.spawnCommand=l,t.runCommand=function e(t,s={},i=r.StandardOutputWriter,...a){const h=o.Logging.for(e),c=new AbortController,u={abort:c,command:t,logs:[],errs:[]},d=new Promise(((e,r)=>{let o;try{o=new i(t,{resolve:e,reject:r},...a),u.cmd=l(o,t,s,c,h)}catch(e){return r(new Error(`Error running command ${t}: ${e}`))}u.cmd.stdout.setEncoding("utf8"),u.cmd.stdout.on("data",(e=>{e=e.toString(),u.logs.push(e),o.data(e)})),u.cmd.stderr.on("data",(e=>{e=e.toString(),u.errs.push(e),o.error(e)})),u.cmd.once("error",(e=>{o.exit(e.message,u.errs)})),u.cmd.once("exit",((e=0)=>{c.signal.aborted&&null===e&&(e=n.AbortCode),o.exit(e,0===e?u.logs:u.errs)}))}));return Object.assign(u,{promise:d,pipe:async e=>{const s=h.for("pipe");try{s.verbose(`Executing pipe function ${t}...`);const i=await d;return s.verbose(`Piping output to ${e.name}: ${i}`),e(i)}catch(e){throw s.error(`Error piping command output: ${e}`),e}}}),u};const i=s(5317),r=s(9499),o=s(9834),n=s(7154);function a(e,...t){let s,i;if(e instanceof AbortSignal?(i=new AbortController,s=[e,...t]):(i=e,s=t),i.signal.aborted)return i;const r=()=>i.abort();for(const e of s){if(e.aborted){i.abort();break}e.addEventListener("abort",r,{once:!0,signal:i.signal})}return i}function l(e,t,s,r,o){function n(t,r){const[n,a]=e.parseCommand(t);o.info(`Running command: ${n}`),o.debug(`with args: ${a.join(" ")}`);const l=(0,i.spawn)(n,a,{...s,cwd:s.cwd||process.cwd(),env:Object.assign({},process.env,s.env,{PATH:process.env.PATH}),shell:s.shell||!1,signal:r.signal});return o.verbose(`pid : ${l.pid}`),l}const l=t.match(/[<>$#]/g);if(l)throw new Error(`Invalid command: ${t}. contains invalid characters: ${l}`);if(t.includes(" | ")){const e=t.split(" | "),s=[],i=new Array(e.length);i[0]=r;for(let t=0;t<e.length;t++)0!==t&&(i[t]=a(i[t-1].signal)),s.push(n(e[t],i[t])),0!==t&&s[t-1].stdout.pipe(s[t].stdin);return s[e.length-1]}return n(t,r)}},6694:(e,t,s)=>{const i=s(5568);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},6781:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},6818:(e,t,s)=>{const i=s(1394),r=s(723).cursor,o=s(4597),n=s(4586),a=n.clear,l=n.figures,h=n.style,c=n.wrap,u=n.entriesToDisplay;e.exports=class extends o{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=a("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,s,r){const o=(t.selected?i.green(l.radioOn):l.radioOff)+" "+r+" ";let n,a;return t.disabled?n=e===s?i.gray().underline(t.title):i.strikethrough().gray(t.title):(n=e===s?i.cyan().underline(t.title):t.title,e===s&&t.description&&(a=` - ${t.description}`,(o.length+n.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a="\n"+c(t.description,{margin:o.length,width:this.out.columns})))),o+n+i.gray(a||"")}paginateOptions(e){if(0===e.length)return i.red("No matches for this query.");let t,s=u(this.cursor,e.length,this.optionsPerPage),r=s.startIndex,o=s.endIndex,n=[];for(let s=r;s<o;s++)t=s===r&&r>0?l.arrowUp:s===o-1&&o<e.length?l.arrowDown:" ",n.push(this.renderOption(this.cursor,e[s],s,t));return"\n"+n.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let e=[h.symbol(this.done,this.aborted),i.bold(this.msg),h.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},6837:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCommandValues=t.DefaultCommandOptions=void 0,t.DefaultCommandOptions={verbose:{type:"boolean",short:"V",default:void 0},version:{type:"boolean",short:"v",default:void 0},help:{type:"boolean",short:"h",default:!1},logLevel:{type:"string",default:"info"},logStyle:{type:"boolean",default:!0},timestamp:{type:"boolean",default:!0},banner:{type:"boolean",default:!0}},t.DefaultCommandValues=Object.keys(t.DefaultCommandOptions).reduce(((e,s)=>(e[s]=t.DefaultCommandOptions[s].default,e)),{})},6854:(e,t,s)=>{const i=s(1394),r=s(723).cursor,o=s(6818),n=s(4586),a=n.clear,l=n.style,h=n.figures;e.exports=class extends o{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=a("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${h.arrowUp}/${h.arrowDown}: Highlight option\n ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(e,t,s){let r;return r=t.disabled?e===s?i.gray().underline(t.title):i.strikethrough().gray(t.title):e===s?i.cyan().underline(t.title):t.title,(t.selected?i.green(h.radioOn):h.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let e=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},6928:t=>{t.exports=e(import.meta.url)("path")},6946:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(7714),t),r(s(6483),t)},7096:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(t,"g");return"string"==typeof e?e.replace(s,""):e}},7154:(e,t)=>{var s,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AbortCode=t.DefaultLoggingConfig=t.DefaultTheme=t.NumericLogLevels=t.LogLevel=t.Tokens=t.SetupScriptKey=t.NoCIFLag=t.SemVersion=t.SemVersionRegex=t.Encoding=void 0,t.Encoding="utf-8",t.SemVersionRegex=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z])))/g,function(e){e.PATCH="patch",e.MINOR="minor",e.MAJOR="major"}(s||(t.SemVersion=s={})),t.NoCIFLag="-no-ci",t.SetupScriptKey="postinstall",function(e){e.GIT=".token",e.NPM=".npmtoken",e.DOCKER=".dockertoken",e.CONFLUENCE=".confluence-token"}(i||(t.Tokens=i={})),function(e){e.error="error",e.info="info",e.verbose="verbose",e.debug="debug",e.silly="silly"}(r||(t.LogLevel=r={})),t.NumericLogLevels={error:2,info:4,verbose:6,debug:7,silly:9},t.DefaultTheme={class:{fg:34},id:{fg:36},stack:{},timestamp:{},message:{error:{fg:31}},method:{},logLevel:{error:{fg:31,style:["bold"]},info:{},verbose:{},debug:{fg:33}}},t.DefaultLoggingConfig={verbose:0,level:r.info,logLevel:!0,style:!1,separator:" - ",timestamp:!0,timestampFormat:"HH:mm:ss.SSS",context:!0,theme:t.DefaultTheme},t.AbortCode="Aborted"},7160:(e,t,s)=>{function i(e,t,s,i,r,o,n){try{var a=e[o](n),l=a.value}catch(e){return void s(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function r(e){return function(){var t=this,s=arguments;return new Promise((function(r,o){var n=e.apply(t,s);function a(e){i(n,r,o,a,l,"next",e)}function l(e){i(n,r,o,a,l,"throw",e)}a(void 0)}))}}const o=s(1394),n=s(4597),a=s(723),l=a.erase,h=a.cursor,c=s(4586),u=c.style,d=c.clear,g=c.lines,f=c.figures;e.exports=class extends n{constructor(e={}){super(e),this.transform=u.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=d("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=o.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return r((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return r((function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error)return e.red=!0,e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(h.down(g(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns)),this.out.write(d(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":f.pointerSmall} ${o.red().italic(t)}`),"")),this.out.write(l.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0)))}}},7679:(e,t,s)=>{const i=s(1394),r=s(4872),{cursor:o,erase:n}=s(723),{style:a,figures:l,clear:h,lines:c}=s(1189),u=/[0-9]/,d=e=>void 0!==e,g=(e,t)=>{let s=Math.pow(10,t);return Math.round(e*s)/s};e.exports=class extends r{constructor(e={}){super(e),this.transform=a.render(e.style),this.msg=e.message,this.initial=d(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=d(e.min)?e.min:-1/0,this.max=d(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${g(e,this.round)}`),this._value=g(e,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||u.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let e=this.value;this.value=""!==e?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(o.down(c(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns)),this.out.write(h(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:i[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":l.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(n.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore))}}},7714:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UserInput=void 0;const r=i(s(9240)),o=s(9023),n=s(9834);class a{static{this.logger=n.Logging.for(a)}constructor(e){this.type="text",this.name=e}setType(e){return a.logger.verbose(`Setting type to: ${e}`),this.type=e,this}setMessage(e){return a.logger.verbose(`Setting message to: ${e}`),this.message=e,this}setInitial(e){return a.logger.verbose(`Setting initial value to: ${e}`),this.initial=e,this}setStyle(e){return a.logger.verbose(`Setting style to: ${e}`),this.style=e,this}setFormat(e){return a.logger.verbose("Setting format function"),this.format=e,this}setValidate(e){return a.logger.verbose("Setting validate function"),this.validate=e,this}setOnState(e){return a.logger.verbose("Setting onState callback"),this.onState=e,this}setOnRender(e){return a.logger.verbose("Setting onRender callback"),this.onRender=e,this}setMin(e){return a.logger.verbose(`Setting min value to: ${e}`),this.min=e,this}setMax(e){return a.logger.verbose(`Setting max value to: ${e}`),this.max=e,this}setFloat(e){return a.logger.verbose(`Setting float to: ${e}`),this.float=e,this}setRound(e){return a.logger.verbose(`Setting round to: ${e}`),this.round=e,this}setInstructions(e){return a.logger.verbose(`Setting instructions to: ${e}`),this.instructions=e,this}setIncrement(e){return a.logger.verbose(`Setting increment to: ${e}`),this.increment=e,this}setSeparator(e){return a.logger.verbose(`Setting separator to: ${e}`),this.separator=e,this}setActive(e){return a.logger.verbose(`Setting active style to: ${e}`),this.active=e,this}setInactive(e){return a.logger.verbose(`Setting inactive style to: ${e}`),this.inactive=e,this}setChoices(e){return a.logger.verbose(`Setting choices: ${JSON.stringify(e)}`),this.choices=e,this}setHint(e){return a.logger.verbose(`Setting hint to: ${e}`),this.hint=e,this}setWarn(e){return a.logger.verbose(`Setting warn to: ${e}`),this.warn=e,this}setSuggest(e){return a.logger.verbose("Setting suggest function"),this.suggest=e,this}setLimit(e){return a.logger.verbose(`Setting limit to: ${e}`),this.limit=e,this}setMask(e){return a.logger.verbose(`Setting mask to: ${e}`),this.mask=e,this}setStdout(e){return a.logger.verbose("Setting stdout stream"),this.stdout=e,this}setStdin(e){return this.stdin=e,this}async ask(){return(await a.ask(this))[this.name]}static async ask(e){const t=a.logger.for(this.ask);let s;Array.isArray(e)||(e=[e]);try{t.verbose(`Asking questions: ${e.map((e=>e.name)).join(", ")}`),s=await(0,r.default)(e),t.verbose(`Received answers: ${JSON.stringify(s,null,2)}`)}catch(e){throw new Error(`Error while getting input: ${e}`)}return s}static async askNumber(e,t,s,i,r){a.logger.for(this.askNumber).verbose(`Asking number input: undefined, question: ${t}, min: ${s}, max: ${i}, initial: ${r}`);const o=new a(e).setMessage(t).setType("number");return"number"==typeof s&&o.setMin(s),"number"==typeof i&&o.setMax(i),"number"==typeof r&&o.setInitial(r),(await this.ask(o))[e]}static async askText(e,t,s=void 0,i){a.logger.for(this.askText).verbose(`Asking text input: undefined, question: ${t}, mask: ${s}, initial: ${i}`);const r=new a(e).setMessage(t);return s&&r.setMask(s),"string"==typeof i&&r.setInitial(i),(await this.ask(r))[e]}static async askConfirmation(e,t,s){a.logger.for(this.askConfirmation).verbose(`Asking confirmation input: undefined, question: ${t}, initial: ${s}`);const i=new a(e).setMessage(t).setType("confirm");return void 0!==s&&i.setInitial(s),(await this.ask(i))[e]}static async insist(e,t,s,i=1){const r=a.logger.for(this.insist);let o;r.verbose(`Insisting on input: ${e.name}, test: ${t.toString()}, defaultConfirmation: ${s}, limit: ${i}`);let n,l=0;try{do{o=(await a.ask(e))[e.name],t(o)?(n=await a.askConfirmation(`${e.name}-confirm`,`Is the ${e.type} correct?`,s),n||(o=void 0)):o=void 0}while(void 0===o&&i>1&&l++<i)}catch(e){throw r.error(`Error while insisting: ${e}`),e}return void 0===o&&r.info("no selection..."),o}static async insistForText(e,t,s,i=void 0,r,o=!1,n=-1){a.logger.for(this.insistForText).verbose(`Insisting for text input: undefined, question: ${t}, test: ${s.toString()}, mask: ${i}, initial: ${r}, defaultConfirmation: ${o}, limit: ${n}`);const l=new a(e).setMessage(t);return i&&l.setMask(i),"string"==typeof r&&l.setInitial(r),await this.insist(l,s,o,n)}static async insistForNumber(e,t,s,i,r,o,n=!1,l=-1){a.logger.for(this.insistForNumber).verbose(`Insisting for number input: undefined, question: ${t}, test: ${s.toString()}, min: ${i}, max: ${r}, initial: ${o}, defaultConfirmation: ${n}, limit: ${l}`);const h=new a(e).setMessage(t).setType("number");return"number"==typeof i&&h.setMin(i),"number"==typeof r&&h.setMax(r),"number"==typeof o&&h.setInitial(o),await this.insist(h,s,n,l)}static parseArgs(e){const t=a.logger.for(this.parseArgs),s={args:process.argv.slice(2),options:e};t.debug(`Parsing arguments: ${JSON.stringify(s,null,2)}`);try{return(0,o.parseArgs)(s)}catch(i){throw t.debug(`Error while parsing arguments:\n${JSON.stringify(s,null,2)}\n | options\n${JSON.stringify(e,null,2)}\n | ${i}`),new Error(`Error while parsing arguments: ${i}`)}}}t.UserInput=a},7729:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,r(s(8184),t),r(s(6946),t),r(s(3967),t),r(s(2935),t),r(s(9050),t),t.VERSION="0.1.6"},7957:(e,t,s)=>{e.exports={DatePart:s(5568),Meridiem:s(5135),Day:s(1715),Hours:s(6694),Milliseconds:s(1980),Minutes:s(2672),Month:s(2287),Seconds:s(2376),Year:s(2368)}},8158:(e,t,s)=>{function i(e,t,s,i,r,o,n){try{var a=e[o](n),l=a.value}catch(e){return void s(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function r(e){return function(){var t=this,s=arguments;return new Promise((function(r,o){var n=e.apply(t,s);function a(e){i(n,r,o,a,l,"next",e)}function l(e){i(n,r,o,a,l,"throw",e)}a(void 0)}))}}const o=s(1394),n=s(4597),a=s(723),l=a.cursor,h=a.erase,c=s(4586),u=c.style,d=c.figures,g=c.clear,f=c.lines,p=/[0-9]/,m=e=>void 0!==e,b=(e,t)=>{let s=Math.pow(10,t);return Math.round(e*s)/s};e.exports=class extends n{constructor(e={}){super(e),this.transform=u.render(e.style),this.msg=e.message,this.initial=m(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=m(e.min)?e.min:-1/0,this.max=m(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${b(e,this.round)}`),this._value=b(e,this.round)):(this.placeholder=!0,this.rendered=o.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||p.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return r((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return r((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();let t=e.value;e.value=""!==t?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(l.down(f(this.outputError,this.out.columns)-1)+g(this.outputError,this.out.columns)),this.out.write(g(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:o[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,s)=>e+`\n${s?" ":d.pointerSmall} ${o.red().italic(t)}`),"")),this.out.write(h.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore))}}},8184:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(6487),t),r(s(9529),t),r(s(6837),t),r(s(4737),t)},8404:(e,t,s)=>{const i=s(9083),r=["suggest","format","onState","validate","onRender","type"],o=()=>{};async function n(e=[],{onSubmit:t=o,onCancel:s=o}={}){const l={},h=n._override||{};let c,u,d,g,f,p;e=[].concat(e);const m=async(e,t,s=!1)=>{if(s||!e.validate||!0===e.validate(t))return e.format?await e.format(t,l):t};for(u of e)if(({name:g,type:f}=u),"function"==typeof f&&(f=await f(c,{...l},u),u.type=f),f){for(let e in u){if(r.includes(e))continue;let t=u[e];u[e]="function"==typeof t?await t(c,{...l},p):t}if(p=u,"string"!=typeof u.message)throw new Error("prompt message is required");if(({name:g,type:f}=u),void 0===i[f])throw new Error(`prompt type (${f}) is not defined`);if(void 0===h[u.name]||(c=await m(u,h[u.name]),void 0===c)){try{c=n._injected?a(n._injected,u.initial):await i[f](u),l[g]=c=await m(u,c,!0),d=await t(u,c,l)}catch(e){d=!await s(u,l)}if(d)return l}else l[g]=c}return l}function a(e,t){const s=e.shift();if(s instanceof Error)throw s;return void 0===s?t:s}e.exports=Object.assign(n,{prompt:n,prompts:i,inject:function(e){n._injected=(n._injected||[]).concat(e)},override:function(e){n._override=Object.assign({},e)}})},8564:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.colorizeANSI=function(e,t,s=!1){return isNaN(t)?(console.warn(`Invalid color number on the ANSI scale: ${t}. ignoring...`),e):(s&&(t>30&&t<=40||t>90&&t<=100)&&(t+=10),`[${t}m${e}${i.AnsiReset}`)},t.colorize256=function(e,t,s=!1){return isNaN(t)||t<0||t>255?(console.warn(`Invalid color number on the 256 scale: ${t}. ignoring...`),e):`[${s?48:38};5;${t}m${e}${i.AnsiReset}`},t.colorizeRGB=function(e,t,s,r,o=!1){return isNaN(t)||isNaN(s)||isNaN(r)||[t,s,r].some((e=>e<0||e>255))?(console.warn(`Invalid RGB color values: r=${t}, g=${s}, b=${r}. Ignoring...`),e):`[${o?48:38};2;${t};${s};${r}m${e}${i.AnsiReset}`},t.applyStyle=function(e,t){return`[${"number"==typeof t?t:i.styles[t]}m${e}${i.AnsiReset}`},t.clear=function(e){return e.replace(/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g,"")},t.raw=function(e,t){return`${t}${e}${i.AnsiReset}`};const i=s(6471)},8775:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},8868:(e,t,s)=>{const i=s(5815),{erase:r,cursor:o}=s(723);e.exports=function(e,t){if(!t)return r.line+o.to(0);let s=0;const n=e.split(/\r?\n/);for(let e of n)s+=1+Math.floor(Math.max([...i(e)].length-1,0)/t);return r.lines(s)}},9023:t=>{t.exports=e(import.meta.url)("util")},9050:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(3410),t),r(s(9067),t),r(s(9499),t),r(s(4363),t)},9067:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegexpOutputWriter=void 0;const i=s(9499);class r extends i.StandardOutputWriter{constructor(e,t,s,i="g"){super(e,t);try{this.regexp="string"==typeof s?new RegExp(s,i):s}catch(e){throw new Error(`Invalid regular expression: ${e}`)}}test(e){let t;this.regexp.lastIndex=0;try{t=this.regexp.exec(e)}catch(t){return console.debug(`Failed to parse chunk: ${e}\nError: ${t} `)}return t}testAndResolve(e){const t=this.test(e);t&&this.resolve(t[0])}testAndReject(e){const t=this.test(e);t&&this.reject(t[0])}data(e){super.data(e),this.testAndResolve(String(e))}error(e){super.error(e),this.testAndReject(String(e))}}t.RegexpOutputWriter=r},9083:(e,t,s)=>{const i=t,r=s(2064),o=e=>e;function n(e,t,s={}){return new Promise(((i,n)=>{const a=new r[e](t),l=s.onAbort||o,h=s.onSubmit||o,c=s.onExit||o;a.on("state",t.onState||o),a.on("submit",(e=>i(h(e)))),a.on("exit",(e=>i(c(e)))),a.on("abort",(e=>n(l(e))))}))}i.text=e=>n("TextPrompt",e),i.password=e=>(e.style="password",i.text(e)),i.invisible=e=>(e.style="invisible",i.text(e)),i.number=e=>n("NumberPrompt",e),i.date=e=>n("DatePrompt",e),i.confirm=e=>n("ConfirmPrompt",e),i.list=e=>{const t=e.separator||",";return n("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},i.toggle=e=>n("TogglePrompt",e),i.select=e=>n("SelectPrompt",e),i.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return n("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},i.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return n("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));i.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),n("AutocompletePrompt",e))},9199:(e,t,s)=>{const i=s(323);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},9240:(e,t,s)=>{e.exports=function(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,s=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(s[t]>e[t])return!1;if(e[t]>s[t])return!0}return!1}("8.6.0")?s(4409):s(8404)},9331:(e,t,s)=>{const i=s(1394),r=s(4597),o=s(4586),n=o.style,a=o.clear,l=s(723),h=l.erase,c=l.cursor;e.exports=class extends r{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(h.line+c.to(0)+this.outputText))}}},9499:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StandardOutputWriter=void 0;const i=s(7154),r=s(9834),o=s(1076);t.StandardOutputWriter=class{constructor(e,t,...s){this.cmd=e,this.lock=t,this.logger=r.Logging.for(this.cmd)}log(e,t){t=Buffer.isBuffer(t)?t.toString(i.Encoding):t;const s=`${"stderr"===e?(0,o.style)("ERROR").red.text:e}: ${t}`;this.logger.info(s)}data(e){this.log("stdout",String(e))}error(e){this.log("stderr",String(e))}errors(e){this.log("stderr",`Error executing command exited : ${e}`)}exit(e,t){this.log("stdout",`command exited code : ${0===e?(0,o.style)(e.toString()).green.text:(0,o.style)(null===e?"null":e.toString()).red.text}`),0===e?this.resolve(t.map((e=>e.trim())).join("\n")):this.reject(new Error(t.length?t.join("\n"):e.toString()))}parseCommand(e){return e="string"==typeof e?e.split(" "):e,this.cmd=e.join(" "),[e[0],e.slice(1)]}resolve(e){this.log("stdout",`${this.cmd} executed successfully: ${(0,o.style)(e?"ran to completion":e).green}`),this.lock.resolve(e)}reject(e){e instanceof Error||(e=new Error("number"==typeof e?`Exit code ${e}`:e)),this.log("stderr",`${this.cmd} failed to execute: ${(0,o.style)(e.message).red}`),this.lock.reject(e)}}},9529:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Command=void 0;const i=s(9834),r=s(7154),o=s(7714),n=s(6837),a=s(3340),l=s(866),h=s(2030);class c{constructor(e,t={},s=[]){this.name=e,this.inputs=t,this.requirements=s,c.log||(Object.defineProperty(c,"log",{writable:!1,value:i.Logging.for(c.name)}),this.log=c.log),this.log=c.log.for(this.name),this.inputs=Object.assign({},n.DefaultCommandOptions,t)}async checkRequirements(){const{prod:e,dev:t,peer:s}=await(0,a.getDependencies)(),i=[],r=Array.from(new Set([...e,...t,...s]).values()).map((e=>e.name));for(const e of this.requirements)r.includes(e)||i.push(e);i.length}help(e){return this.log.info("This is help. I'm no use because I should have been overridden.")}async execute(){const e=o.UserInput.parseArgs(this.inputs),t=h.Environment.accumulate(r.DefaultLoggingConfig).accumulate(n.DefaultCommandValues).accumulate(e.values),{timestamp:s,verbose:i,version:c,help:u,logLevel:d,logStyle:g,banner:f}=t;if(this.log.setConfig({...t,timestamp:!!s,level:d,style:!!g,verbose:i||0}),c)return(0,a.getPackageVersion)();if(u)return this.help(e);let p;f&&(0,l.printBanner)(this.log.for(l.printBanner,{timestamp:!1,style:!1,context:!1,logLevel:!1}));try{p=await this.run(t)}catch(e){throw this.log.error(`Error while running provided cli function: ${e}`),e}return p}}t.Command=c},9599:e=>{const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},s={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},i="win32"===process.platform?s:t;e.exports=i},9680:e=>{e.exports=JSON.parse('[{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That\'s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"No caffeine, no chaos. Just clean code.","Tags":"Coffee-themed, Calm, Tech"},{"Slogan":"Full flavor, no jitters. That’s Decaf-TS.","Tags":"Coffee-themed, Cheerful"},{"Slogan":"Chill fullstack. Powered by Decaf.","Tags":"Coffee-themed, Fun, Tech"},{"Slogan":"Decaf-TS: Brewed for calm code.","Tags":"Coffee-themed, Branding"},{"Slogan":"Smooth as your morning Decaf.","Tags":"Coffee-themed, Chill"},{"Slogan":"All the kick, none of the crash.","Tags":"Coffee-themed, Energetic"},{"Slogan":"Sip back and ship faster.","Tags":"Coffee-themed, Fun"},{"Slogan":"Keep calm and code Decaf.","Tags":"Coffee-themed, Playful"},{"Slogan":"Code without the caffeine shakes.","Tags":"Coffee-themed, Humorous"},{"Slogan":"Your fullstack, decaffeinated.","Tags":"Coffee-themed, Technical"},{"Slogan":"Decaf-TS: Where smart contracts meet smart interfaces.","Tags":"Blockchain, Smart Contracts, Tech"},{"Slogan":"Ship dApps without the stress.","Tags":"Blockchain, Cheerful, Developer"},{"Slogan":"No CRUD, no problem — Decaf your data.","Tags":"Data, No-CRUD, Chill"},{"Slogan":"From DID to UI, without breaking a sweat.","Tags":"DID, SSI, UI, Calm"},{"Slogan":"Decaf-TS: Your frontend already understands your smart contract.","Tags":"Smart Contracts, DX, Magic"},{"Slogan":"Self-sovereign by design. Productive by default.","Tags":"SSI, Developer, Calm"},{"Slogan":"Build once. Deploy everywhere. Decentralized and delightful.","Tags":"Blockchain, Multi-platform, Happy"},{"Slogan":"Data that defines its own destiny.","Tags":"SSI, Data-driven, Empowerment"},{"Slogan":"Goodbye CRUD, hello intent-based interfaces.","Tags":"No-CRUD, UI, Technical"},{"Slogan":"The smoothest path from DID to done.","Tags":"DID, Workflow, Chill"},{"Slogan":"Because your dApp deserves more than boilerplate.","Tags":"Blockchain, DevX, Efficiency"},{"Slogan":"Own your data. Own your flow.","Tags":"SSI, Control, Ownership"},{"Slogan":"Write logic like it belongs with the data — because it does.","Tags":"Data Logic, Developer, Smart"},{"Slogan":"From smart contracts to smarter frontends.","Tags":"Smart Contracts, UI, DX"},{"Slogan":"No caffeine. No CRUD. Just the future.","Tags":"No-CRUD, Coffee-themed, Futuristic"},{"Slogan":"The future of web3 UX is Decaf.","Tags":"Blockchain, UX, Vision"},{"Slogan":"Code with confidence. Govern with clarity.","Tags":"Blockchain, Governance, Calm"},{"Slogan":"Interfaces that obey the data, not the other way around.","Tags":"UI, Data Logic, Self-aware"},{"Slogan":"Brew business logic right into your bytes.","Tags":"Data Logic, Coffee-themed, Fun"},{"Slogan":"DIDs done differently — and delightfully.","Tags":"DID, Self-Sovereign, Playful"},{"Slogan":"Decaf-TS-TS: Where blockchain contracts meet smart interfaces.","Tags":"Blockchain, Smart Contracts, Tech"},{"Slogan":"Ship dApps without the stress.","Tags":"Blockchain, Cheerful, Developer"},{"Slogan":"No boilerplate, no problem — Decaf-TS your data.","Tags":"Data, No-CRUD, Chill"},{"Slogan":"From DID to UI, without breaking a sweat.","Tags":"DID, SSI, UI, Calm"},{"Slogan":"Decaf-TS-TS: Your frontend already understands your blockchain contract.","Tags":"Smart Contracts, DX, Magic"},{"Slogan":"Self-sovereign by design. Productive by default.","Tags":"SSI, Developer, Calm"},{"Slogan":"Build once. Deploy everywhere. Decentralized and delightful.","Tags":"Blockchain, Multi-platform, Happy"},{"Slogan":"Data that defines its own destiny.","Tags":"SSI, Data-driven, Empowerment"},{"Slogan":"Goodbye boilerplate, hello intent-based interfaces.","Tags":"No-CRUD, UI, Technical"},{"Slogan":"The smoothest path from DID to done.","Tags":"DID, Workflow, Chill"},{"Slogan":"Because your dApp deserves more than boilerplate.","Tags":"Blockchain, DevX, Efficiency"},{"Slogan":"Own your data. Own your flow.","Tags":"SSI, Control, Ownership"},{"Slogan":"Write logic like it belongs with the data — because it does.","Tags":"Data Logic, Developer, Smart"},{"Slogan":"From blockchain contracts to smarter frontends.","Tags":"Smart Contracts, UI, DX"},{"Slogan":"No caffeine. No boilerplate. Just the future.","Tags":"No-CRUD, Coffee-themed, Futuristic"},{"Slogan":"The future of web3 UX is Decaf-TS.","Tags":"Blockchain, UX, Vision"},{"Slogan":"Code with confidence. Govern with clarity.","Tags":"Blockchain, Governance, Calm"},{"Slogan":"Interfaces that obey the data, not the other way around.","Tags":"UI, Data Logic, Self-aware"},{"Slogan":"Brew business logic right into your bytes.","Tags":"Data Logic, Coffee-themed, Fun"},{"Slogan":"DIDs done differently — and delightfully.","Tags":"DID, Self-Sovereign, Playful"},{"Slogan":"Decaf-TS-TS: Where blockchain contracts meet smart interfaces.","Tags":"Blockchain, Smart Contracts, Tech"},{"Slogan":"Ship dApps without the stress.","Tags":"Blockchain, Cheerful, Developer"},{"Slogan":"No boilerplate, no problem — Decaf-TS your data.","Tags":"Data, No-CRUD, Chill"},{"Slogan":"From DID to UI, without breaking a sweat.","Tags":"DID, SSI, UI, Calm"},{"Slogan":"Decaf-TS-TS: Your frontend already understands your blockchain contract.","Tags":"Smart Contracts, DX, Magic"},{"Slogan":"Self-sovereign by design. Productive by default.","Tags":"SSI, Developer, Calm"},{"Slogan":"Build once. Deploy everywhere. Decentralized and delightful.","Tags":"Blockchain, Multi-platform, Happy"},{"Slogan":"Data that defines its own destiny.","Tags":"SSI, Data-driven, Empowerment"},{"Slogan":"Goodbye boilerplate, hello intent-based interfaces.","Tags":"No-CRUD, UI, Technical"},{"Slogan":"The smoothest path from DID to done.","Tags":"DID, Workflow, Chill"},{"Slogan":"Because your dApp deserves more than boilerplate.","Tags":"Blockchain, DevX, Efficiency"},{"Slogan":"Own your data. Own your flow.","Tags":"SSI, Control, Ownership"},{"Slogan":"Write logic like it belongs with the data — because it does.","Tags":"Data Logic, Developer, Smart"},{"Slogan":"From blockchain contracts to smarter frontends.","Tags":"Smart Contracts, UI, DX"},{"Slogan":"No caffeine. No boilerplate. Just the future.","Tags":"No-CRUD, Coffee-themed, Futuristic"},{"Slogan":"The future of web3 UX is Decaf-TS.","Tags":"Blockchain, UX, Vision"},{"Slogan":"Code with confidence. Govern with clarity.","Tags":"Blockchain, Governance, Calm"},{"Slogan":"Interfaces that obey the data, not the other way around.","Tags":"UI, Data Logic, Self-aware"},{"Slogan":"Brew business logic right into your bytes.","Tags":"Data Logic, Coffee-themed, Fun"},{"Slogan":"DIDs done differently — and delightfully.","Tags":"DID, Self-Sovereign, Playful"},{"Slogan":"Decaf-TS-TS: Where blockchain contracts meet smart interfaces.","Tags":"Blockchain, Smart Contracts, Tech"},{"Slogan":"Ship dApps without the stress.","Tags":"Blockchain, Cheerful, Developer"},{"Slogan":"No boilerplate, no problem — Decaf-TS your data.","Tags":"Data, No-CRUD, Chill"},{"Slogan":"From DID to UI, without breaking a sweat.","Tags":"DID, SSI, UI, Calm"},{"Slogan":"Decaf-TS-TS: Your frontend already understands your blockchain contract.","Tags":"Smart Contracts, DX, Magic"},{"Slogan":"Self-sovereign by design. Productive by default.","Tags":"SSI, Developer, Calm"},{"Slogan":"Build once. Deploy everywhere. Decentralized and delightful.","Tags":"Blockchain, Multi-platform, Happy"},{"Slogan":"Data that defines its own destiny.","Tags":"SSI, Data-driven, Empowerment"},{"Slogan":"Goodbye boilerplate, hello intent-based interfaces.","Tags":"No-CRUD, UI, Technical"},{"Slogan":"The smoothest path from DID to done.","Tags":"DID, Workflow, Chill"},{"Slogan":"Because your dApp deserves more than boilerplate.","Tags":"Blockchain, DevX, Efficiency"},{"Slogan":"Own your data. Own your flow.","Tags":"SSI, Control, Ownership"},{"Slogan":"Write logic like it belongs with the data — because it does.","Tags":"Data Logic, Developer, Smart"},{"Slogan":"From blockchain contracts to smarter frontends.","Tags":"Smart Contracts, UI, DX"},{"Slogan":"No caffeine. No boilerplate. Just the future.","Tags":"No-CRUD, Coffee-themed, Futuristic"},{"Slogan":"The future of web3 UX is Decaf-TS.","Tags":"Blockchain, UX, Vision"},{"Slogan":"Code with confidence. Govern with clarity.","Tags":"Blockchain, Governance, Calm"},{"Slogan":"Interfaces that obey the data, not the other way around.","Tags":"UI, Data Logic, Self-aware"},{"Slogan":"Brew business logic right into your bytes.","Tags":"Data Logic, Coffee-themed, Fun"},{"Slogan":"DIDs done differently — and delightfully.","Tags":"DID, Self-Sovereign, Playful"},{"Slogan":"Decaf-TS-TS: Where blockchain contracts meet smart interfaces.","Tags":"Blockchain, Smart Contracts, Tech"},{"Slogan":"Ship dApps without the stress.","Tags":"Blockchain, Cheerful, Developer"},{"Slogan":"No boilerplate, no problem — Decaf-TS your data.","Tags":"Data, No-CRUD, Chill"},{"Slogan":"From DID to UI, without breaking a sweat.","Tags":"DID, SSI, UI, Calm"},{"Slogan":"Decaf-TS-TS: Your frontend already understands your blockchain contract.","Tags":"Smart Contracts, DX, Magic"},{"Slogan":"Self-sovereign by design. Productive by default.","Tags":"SSI, Developer, Calm"},{"Slogan":"Build once. Deploy everywhere. Decentralized and delightful.","Tags":"Blockchain, Multi-platform, Happy"},{"Slogan":"Data that defines its own destiny.","Tags":"SSI, Data-driven, Empowerment"},{"Slogan":"Goodbye boilerplate, hello intent-based interfaces.","Tags":"No-CRUD, UI, Technical"},{"Slogan":"The smoothest path from DID to done.","Tags":"DID, Workflow, Chill"},{"Slogan":"Because your dApp deserves more than boilerplate.","Tags":"Blockchain, DevX, Efficiency"},{"Slogan":"Own your data. Own your flow.","Tags":"SSI, Control, Ownership"},{"Slogan":"Write logic like it belongs with the data — because it does.","Tags":"Data Logic, Developer, Smart"},{"Slogan":"From blockchain contracts to smarter frontends.","Tags":"Smart Contracts, UI, DX"},{"Slogan":"No caffeine. No boilerplate. Just the future.","Tags":"No-CRUD, Coffee-themed, Futuristic"},{"Slogan":"The future of web3 UX is Decaf-TS.","Tags":"Blockchain, UX, Vision"},{"Slogan":"Code with confidence. Govern with clarity.","Tags":"Blockchain, Governance, Calm"},{"Slogan":"Interfaces that obey the data, not the other way around.","Tags":"UI, Data Logic, Self-aware"},{"Slogan":"Brew business logic right into your bytes.","Tags":"Data Logic, Coffee-themed, Fun"},{"Slogan":"DIDs done differently — and delightfully.","Tags":"DID, Self-Sovereign, Playful"}]')},9834:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logging=t.MiniLogger=void 0;const i=s(7154),r=s(1076);class o{constructor(e,t,s){this.context=e,this.conf=t,this.id=s}config(e){return this.conf&&e in this.conf?this.conf[e]:n.getConfig()[e]}for(e,t){return e=e?"string"==typeof e?e:e.name:void 0,n.for([this.context,e].join("."),this.id,t)}createLog(e,t,s){const i=[],r=this.config("style");if(this.config("timestamp")){const t=(new Date).toISOString(),s=r?n.theme(t,"timestamp",e):t;i.push(s)}if(this.config("logLevel")){const t=r?n.theme(e,"logLevel",e):e;i.push(t)}if(this.config("context")){const t=r?n.theme(this.context,"class",e):this.context;i.push(t)}const o=r?n.theme("string"==typeof t?t:t.message,"message",e):"string"==typeof t?t:t.message;return i.push(o),(s||t instanceof Error)&&(s=r?n.theme(s||t.stack,"stack",e):s,i.push(`\nStack trace:\n${s}`)),i.join(this.config("separator"))}log(e,t,s){if(i.NumericLogLevels[this.config("level")]<i.NumericLogLevels[e])return;let r;switch(e){case i.LogLevel.info:r=console.log;break;case i.LogLevel.verbose:case i.LogLevel.debug:r=console.debug;break;case i.LogLevel.error:r=console.error;break;default:throw new Error("Invalid log level")}r(this.createLog(e,t,s))}silly(e,t=0){this.config("verbose")>=t&&this.log(i.LogLevel.verbose,e)}verbose(e,t=0){this.config("verbose")>=t&&this.log(i.LogLevel.verbose,e)}info(e){this.log(i.LogLevel.info,e)}debug(e){this.log(i.LogLevel.debug,e)}error(e){this.log(i.LogLevel.error,e)}setConfig(e){this.conf={...this.conf||{},...e}}}t.MiniLogger=o;class n{static{this._factory=(e,t,s)=>new o(e,t,s)}static{this._config=i.DefaultLoggingConfig}constructor(){}static setConfig(e){Object.assign(this._config,e)}static getConfig(){return Object.assign({},this._config)}static get(){return this.global=this.global?this.global:this._factory("Logging"),this.global}static verbose(e,t=0){return this.get().verbose(e,t)}static info(e){return this.get().info(e)}static debug(e){return this.get().debug(e)}static silly(e){return this.get().silly(e)}static error(e){return this.get().error(e)}static for(e,t,s){return e="string"==typeof e?e:e.name,s="object"==typeof(t="string"==typeof t?t:void 0)?t:s,this._factory(e,s,t)}static because(e,t){return this._factory(e,this._config,t)}static theme(e,t,s,o=i.DefaultTheme){if(!this._config.style)return e;const a=n.get().for(this.theme),l=o[t];if(!l||!Object.keys(l).length)return e;let h=l;const c=Object.assign({},i.LogLevel);return Object.keys(l)[0]in c&&(h=l[s]||{}),Object.keys(h).reduce(((e,t)=>{const s=h[t];return s?function(e,t,s){try{const i=e;let o=(0,r.style)(i);function n(e,n=!1){let l=n?o.background:o.foreground;if(!Array.isArray(e))return l.call(o,s);switch(e.length){case 1:return l=n?o.bgColor256:o.color256,l(e[0]);case 3:return l=n?o.bgRgb:o.rgb,o.rgb(e[0],e[1],e[2]);default:return a.error(`Not a valid color option: ${t}`),(0,r.style)(i)}}function l(e){o="number"==typeof e?o.style(e):o[e]}switch(t){case"bg":case"fg":return n(s).text;case"style":return Array.isArray(s)?s.forEach(l):l(s),o.text;default:return a.error(`Not a valid theme option: ${t}`),i}}catch(h){return a.error(`Error applying style: ${t} with value ${s}`),e}}(e,t,s):e}),e)}}t.Logging=n},9896:t=>{t.exports=e(import.meta.url)("fs")},9939:(e,t,s)=>{const i=s(1394),r=s(9599),o=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),n=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});e.exports={styles:o,render:e=>o[e]||o.default,symbols:n,symbol:(e,t,s)=>t?n.aborted:s?n.exited:e?n.done:n.default,delimiter:e=>i.gray(e?r.ellipsis:r.pointerSmall),item:(e,t)=>i.gray(e?t?r.pointerSmall:"+":r.line)}}},s={};!function e(i){var r=s[i];if(void 0!==r)return r.exports;var o=s[i]={exports:{}};return t[i].call(o.exports,o,o.exports,e),o.exports}(7729);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ParseArgsResult } from "../input/types";
|
|
2
|
+
import { LoggingConfig, VerbosityLogger } from "../output/types";
|
|
3
|
+
import { CommandOptions } from "./types";
|
|
4
|
+
import { DefaultCommandValues } from "./constants";
|
|
5
|
+
/**
|
|
6
|
+
* @class Command
|
|
7
|
+
* @abstract
|
|
8
|
+
* @template I - The type of input options for the command.
|
|
9
|
+
* @template R - The return type of the command execution.
|
|
10
|
+
* @memberOf utils/cli
|
|
11
|
+
* @description Abstract base class for command implementation.
|
|
12
|
+
* @summary Provides a structure for creating command-line interface commands with input handling, logging, and execution flow.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} name - The name of the command.
|
|
15
|
+
* @param {CommandOptions<I>} [inputs] - The input options for the command.
|
|
16
|
+
* @param {string[]} [requirements] - The list of required dependencies for the command.
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class Command<I, R> {
|
|
19
|
+
protected name: string;
|
|
20
|
+
protected inputs: CommandOptions<I>;
|
|
21
|
+
protected requirements: string[];
|
|
22
|
+
/**
|
|
23
|
+
* @static
|
|
24
|
+
* @description Static logger for the Command class.
|
|
25
|
+
* @type {VerbosityLogger}
|
|
26
|
+
*/
|
|
27
|
+
static log: VerbosityLogger;
|
|
28
|
+
/**
|
|
29
|
+
* @protected
|
|
30
|
+
* @description Instance logger for the command.
|
|
31
|
+
* @type {VerbosityLogger}
|
|
32
|
+
*/
|
|
33
|
+
protected log: VerbosityLogger;
|
|
34
|
+
protected constructor(name: string, inputs?: CommandOptions<I>, requirements?: string[]);
|
|
35
|
+
/**
|
|
36
|
+
* @protected
|
|
37
|
+
* @async
|
|
38
|
+
* @description Checks if all required dependencies are present.
|
|
39
|
+
* @summary Retrieves the list of dependencies and compares it against the required dependencies for the command.
|
|
40
|
+
* @returns {Promise<void>} A promise that resolves when the check is complete.
|
|
41
|
+
*
|
|
42
|
+
* @mermaid
|
|
43
|
+
* sequenceDiagram
|
|
44
|
+
* participant Command
|
|
45
|
+
* participant getDependencies
|
|
46
|
+
* participant Set
|
|
47
|
+
* Command->>getDependencies: Call
|
|
48
|
+
* getDependencies-->>Command: Return {prod, dev, peer}
|
|
49
|
+
* Command->>Set: Create Set from prod, dev, peer
|
|
50
|
+
* Set-->>Command: Return unique dependencies
|
|
51
|
+
* Command->>Command: Compare against requirements
|
|
52
|
+
* alt Missing dependencies
|
|
53
|
+
* Command->>Command: Add to missing list
|
|
54
|
+
* end
|
|
55
|
+
* Note over Command: If missing.length > 0, handle missing dependencies
|
|
56
|
+
*/
|
|
57
|
+
protected checkRequirements(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* @protected
|
|
60
|
+
* @description Provides help information for the command.
|
|
61
|
+
* @summary This method should be overridden in derived classes to provide specific help information.
|
|
62
|
+
* @param {ParseArgsResult} args - The parsed command-line arguments.
|
|
63
|
+
* @returns {void}
|
|
64
|
+
*/
|
|
65
|
+
protected help(args: ParseArgsResult): void;
|
|
66
|
+
/**
|
|
67
|
+
* @protected
|
|
68
|
+
* @abstract
|
|
69
|
+
* @description Runs the command with the provided arguments.
|
|
70
|
+
* @summary This method should be implemented in derived classes to define the command's behavior.
|
|
71
|
+
* @param {ParseArgsResult} answers - The parsed command-line arguments.
|
|
72
|
+
* @returns {Promise<R | string | void>} A promise that resolves with the command's result.
|
|
73
|
+
*/
|
|
74
|
+
protected abstract run<R>(answers: LoggingConfig & typeof DefaultCommandValues & {
|
|
75
|
+
[k in keyof I]: unknown;
|
|
76
|
+
}): Promise<R | string | void>;
|
|
77
|
+
/**
|
|
78
|
+
* @async
|
|
79
|
+
* @description Executes the command.
|
|
80
|
+
* @summary This method handles the overall execution flow of the command, including parsing arguments,
|
|
81
|
+
* setting up logging, checking for version or help requests, and running the command.
|
|
82
|
+
* @returns {Promise<R | string | void>} A promise that resolves with the command's result.
|
|
83
|
+
*
|
|
84
|
+
* @mermaid
|
|
85
|
+
* sequenceDiagram
|
|
86
|
+
* participant Command
|
|
87
|
+
* participant UserInput
|
|
88
|
+
* participant Logging
|
|
89
|
+
* participant getPackageVersion
|
|
90
|
+
* participant printBanner
|
|
91
|
+
* Command->>UserInput: parseArgs(inputs)
|
|
92
|
+
* UserInput-->>Command: Return ParseArgsResult
|
|
93
|
+
* Command->>Command: Process options
|
|
94
|
+
* Command->>Logging: setConfig(options)
|
|
95
|
+
* alt version requested
|
|
96
|
+
* Command->>getPackageVersion: Call
|
|
97
|
+
* getPackageVersion-->>Command: Return version
|
|
98
|
+
* else help requested
|
|
99
|
+
* Command->>Command: help(args)
|
|
100
|
+
* else banner requested
|
|
101
|
+
* Command->>printBanner: Call
|
|
102
|
+
* end
|
|
103
|
+
* Command->>Command: run(args)
|
|
104
|
+
* alt error occurs
|
|
105
|
+
* Command->>Command: Log error
|
|
106
|
+
* end
|
|
107
|
+
* Command-->>Command: Return result
|
|
108
|
+
*/
|
|
109
|
+
execute(): Promise<R | string | void>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Command } from "../command";
|
|
2
|
+
import { LoggingConfig } from "../../output";
|
|
3
|
+
import { DefaultCommandValues } from "../index";
|
|
4
|
+
declare const options: {
|
|
5
|
+
ci: {
|
|
6
|
+
type: string;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
message: {
|
|
10
|
+
type: string;
|
|
11
|
+
short: string;
|
|
12
|
+
};
|
|
13
|
+
tag: {
|
|
14
|
+
type: string;
|
|
15
|
+
short: string;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @class ReleaseScript
|
|
21
|
+
* @extends {Command}
|
|
22
|
+
* @cavegory scripts
|
|
23
|
+
* @description A command-line script for managing releases and version updates.
|
|
24
|
+
* @summary This script automates the process of creating and pushing new releases. It handles version updates,
|
|
25
|
+
* commit messages, and optionally publishes to NPM. The script supports semantic versioning and can work in both CI and non-CI environments.
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} options - Configuration options for the script
|
|
28
|
+
* @param {boolean} options.ci - Whether the script is running in a CI environment (default: true)
|
|
29
|
+
* @param {string} options.message - The release message (short: 'm')
|
|
30
|
+
* @param {string} options.tag - The version tag to use (short: 't', default: undefined)
|
|
31
|
+
*/
|
|
32
|
+
export declare class ReleaseScript extends Command<typeof options, void> {
|
|
33
|
+
constructor();
|
|
34
|
+
/**
|
|
35
|
+
* @description Prepares the version for the release.
|
|
36
|
+
* @summary This method validates the provided tag or prompts the user for a new one if not provided or invalid.
|
|
37
|
+
* It also displays the latest git tags for reference.
|
|
38
|
+
* @param {string} tag - The version tag to prepare
|
|
39
|
+
* @returns {Promise<string>} The prepared version tag
|
|
40
|
+
*
|
|
41
|
+
* @mermaid
|
|
42
|
+
* sequenceDiagram
|
|
43
|
+
* participant R as ReleaseScript
|
|
44
|
+
* participant T as TestVersion
|
|
45
|
+
* participant U as UserInput
|
|
46
|
+
* participant G as Git
|
|
47
|
+
* R->>T: testVersion(tag)
|
|
48
|
+
* alt tag is valid
|
|
49
|
+
* T-->>R: return tag
|
|
50
|
+
* else tag is invalid or not provided
|
|
51
|
+
* R->>G: List latest git tags
|
|
52
|
+
* R->>U: Prompt for new tag
|
|
53
|
+
* U-->>R: return new tag
|
|
54
|
+
* end
|
|
55
|
+
*/
|
|
56
|
+
prepareVersion(tag?: string): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* @description Tests if the provided version is valid.
|
|
59
|
+
* @summary This method checks if the version is a valid semantic version or a predefined update type (PATCH, MINOR, MAJOR).
|
|
60
|
+
* @param {string} version - The version to test
|
|
61
|
+
* @returns {string | undefined} The validated version or undefined if invalid
|
|
62
|
+
*/
|
|
63
|
+
testVersion(version: string): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* @description Prepares the release message.
|
|
66
|
+
* @summary This method either returns the provided message or prompts the user for a new one if not provided.
|
|
67
|
+
* @param {string} [message] - The release message
|
|
68
|
+
* @returns {Promise<string>} The prepared release message
|
|
69
|
+
*/
|
|
70
|
+
prepareMessage(message?: string): Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* @description Runs the release script.
|
|
73
|
+
* @summary This method orchestrates the entire release process, including version preparation, message creation,
|
|
74
|
+
* git operations, and npm publishing (if not in CI environment).
|
|
75
|
+
* @param {ParseArgsResult} args - The parsed command-line arguments
|
|
76
|
+
* @returns {Promise<void>}
|
|
77
|
+
*
|
|
78
|
+
* @mermaid
|
|
79
|
+
* sequenceDiagram
|
|
80
|
+
* participant R as ReleaseScript
|
|
81
|
+
* participant V as PrepareVersion
|
|
82
|
+
* participant M as PrepareMessage
|
|
83
|
+
* participant N as NPM
|
|
84
|
+
* participant G as Git
|
|
85
|
+
* participant U as UserInput
|
|
86
|
+
* R->>V: prepareVersion(tag)
|
|
87
|
+
* R->>M: prepareMessage(message)
|
|
88
|
+
* R->>N: Run prepare-release script
|
|
89
|
+
* R->>G: Check git status
|
|
90
|
+
* alt changes exist
|
|
91
|
+
* R->>U: Ask for confirmation
|
|
92
|
+
* U-->>R: Confirm
|
|
93
|
+
* R->>G: Add and commit changes
|
|
94
|
+
* end
|
|
95
|
+
* R->>N: Update npm version
|
|
96
|
+
* R->>G: Push changes and tags
|
|
97
|
+
* alt not CI environment
|
|
98
|
+
* R->>N: Publish to npm
|
|
99
|
+
* end
|
|
100
|
+
*/
|
|
101
|
+
run(args: LoggingConfig & typeof DefaultCommandValues & {
|
|
102
|
+
[k in keyof typeof options]: unknown;
|
|
103
|
+
}): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
export {};
|