@rindo/core 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/cli/config-flags.d.ts +122 -122
  2. package/cli/index.cjs +2301 -2432
  3. package/cli/index.d.ts +19 -19
  4. package/cli/index.js +2302 -2433
  5. package/cli/package.json +1 -1
  6. package/compiler/package.json +1 -1
  7. package/compiler/rindo.d.ts +73 -73
  8. package/compiler/rindo.js +66137 -62812
  9. package/compiler/rindo.min.js +2 -2
  10. package/compiler/sys/in-memory-fs.d.ts +218 -218
  11. package/compiler/transpile.d.ts +32 -32
  12. package/dev-server/client/app-error.d.ts +18 -18
  13. package/dev-server/client/events.d.ts +6 -6
  14. package/dev-server/client/hmr-components.d.ts +1 -1
  15. package/dev-server/client/hmr-external-styles.d.ts +1 -1
  16. package/dev-server/client/hmr-images.d.ts +1 -1
  17. package/dev-server/client/hmr-inline-styles.d.ts +1 -1
  18. package/dev-server/client/hmr-util.d.ts +9 -9
  19. package/dev-server/client/hmr-window.d.ts +10 -10
  20. package/dev-server/client/index.d.ts +6 -6
  21. package/dev-server/client/index.js +781 -781
  22. package/dev-server/client/logger.d.ts +5 -5
  23. package/dev-server/client/package.json +1 -1
  24. package/dev-server/client/progress.d.ts +3 -3
  25. package/dev-server/client/status.d.ts +4 -4
  26. package/dev-server/connector.html +2 -2
  27. package/dev-server/index.d.ts +3 -3
  28. package/dev-server/index.js +228 -228
  29. package/dev-server/open-in-editor-api.js +1 -1
  30. package/dev-server/package.json +1 -1
  31. package/dev-server/server-process.js +1301 -1279
  32. package/dev-server/ws.js +1 -1
  33. package/dev-server/xdg-open +0 -0
  34. package/internal/app-data/index.cjs +88 -88
  35. package/internal/app-data/index.d.ts +4 -4
  36. package/internal/app-data/index.js +88 -88
  37. package/internal/app-data/package.json +1 -1
  38. package/internal/client/css-shim.js +1 -1
  39. package/internal/client/dom.js +1 -1
  40. package/internal/client/index.js +3380 -3373
  41. package/internal/client/package.json +1 -1
  42. package/internal/client/patch-browser.js +155 -155
  43. package/internal/client/patch-esm.js +25 -25
  44. package/internal/client/shadow-css.js +382 -382
  45. package/internal/hydrate/package.json +1 -1
  46. package/internal/index.d.ts +2 -2
  47. package/internal/index.js +1 -1
  48. package/internal/package.json +1 -1
  49. package/internal/rindo-private.d.ts +2272 -2268
  50. package/internal/rindo-public-compiler.d.ts +2377 -2353
  51. package/internal/rindo-public-docs.d.ts +139 -139
  52. package/internal/rindo-public-runtime.d.ts +1636 -1636
  53. package/internal/testing/package.json +1 -1
  54. package/mock-doc/index.cjs +4766 -4766
  55. package/mock-doc/index.d.ts +1006 -1006
  56. package/mock-doc/index.js +4766 -4766
  57. package/mock-doc/package.json +1 -1
  58. package/package.json +10 -10
  59. package/screenshot/connector-base.d.ts +42 -42
  60. package/screenshot/connector-local.d.ts +7 -7
  61. package/screenshot/index.d.ts +3 -3
  62. package/screenshot/index.js +615 -615
  63. package/screenshot/package.json +1 -1
  64. package/screenshot/pixel-match.d.ts +1 -1
  65. package/screenshot/pixel-match.js +14 -14
  66. package/screenshot/screenshot-compare.d.ts +3 -3
  67. package/screenshot/screenshot-fs.d.ts +15 -15
  68. package/sys/node/autoprefixer.js +2 -2
  69. package/sys/node/glob.js +1 -1
  70. package/sys/node/graceful-fs.js +1 -1
  71. package/sys/node/index.d.ts +22 -22
  72. package/sys/node/index.js +6 -3
  73. package/sys/node/node-fetch.js +1 -1
  74. package/sys/node/package.json +1 -1
  75. package/sys/node/prompts.js +1 -1
  76. package/sys/node/worker.js +1 -1
  77. package/testing/index.d.ts +12 -12
  78. package/testing/index.js +7 -3
  79. package/testing/jest/jest-config.d.ts +16 -16
  80. package/testing/jest/jest-environment.d.ts +15 -15
  81. package/testing/jest/jest-preprocessor.d.ts +59 -59
  82. package/testing/jest/jest-runner.d.ts +10 -10
  83. package/testing/jest/jest-screenshot.d.ts +2 -2
  84. package/testing/jest/jest-serializer.d.ts +4 -4
  85. package/testing/jest/jest-setup-test-framework.d.ts +1 -1
  86. package/testing/matchers/attributes.d.ts +14 -14
  87. package/testing/matchers/class-list.d.ts +12 -12
  88. package/testing/matchers/events.d.ts +21 -21
  89. package/testing/matchers/html.d.ts +12 -12
  90. package/testing/matchers/index.d.ts +23 -23
  91. package/testing/matchers/screenshot.d.ts +5 -5
  92. package/testing/matchers/text.d.ts +4 -4
  93. package/testing/mock-fetch.d.ts +11 -11
  94. package/testing/mocks.d.ts +56 -56
  95. package/testing/package.json +1 -1
  96. package/testing/puppeteer/index.d.ts +2 -2
  97. package/testing/puppeteer/puppeteer-browser.d.ts +6 -6
  98. package/testing/puppeteer/puppeteer-declarations.d.ts +403 -403
  99. package/testing/puppeteer/puppeteer-element.d.ts +67 -67
  100. package/testing/puppeteer/puppeteer-emulate.d.ts +2 -2
  101. package/testing/puppeteer/puppeteer-events.d.ts +21 -21
  102. package/testing/puppeteer/puppeteer-page.d.ts +2 -2
  103. package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -4
  104. package/testing/reset-build-conditionals.d.ts +2 -2
  105. package/testing/spec-page.d.ts +2 -2
  106. package/testing/test-transpile.d.ts +2 -2
  107. package/testing/testing-logger.d.ts +25 -25
  108. package/testing/testing-sys.d.ts +6 -6
  109. package/testing/testing-utils.d.ts +79 -79
  110. package/testing/testing.d.ts +2 -2
  111. package/dependencies.json +0 -120
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/sys/node",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Rindo Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1 +1 @@
1
- !function(t,e){for(var s in e)t[s]=e[s]}(exports,function(t){var e={};function s(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(i,r,function(e){return t[e]}.bind(null,r));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=8)}([function(t,e,s){"use strict";const{FORCE_COLOR:i,NODE_DISABLE_COLORS:r,TERM:n}=process.env,h={enabled:!r&&"dumb"!==n&&"0"!==i,reset:l(0,0),bold:l(1,22),dim:l(2,22),italic:l(3,23),underline:l(4,24),inverse:l(7,27),hidden:l(8,28),strikethrough:l(9,29),black:l(30,39),red:l(31,39),green:l(32,39),yellow:l(33,39),blue:l(34,39),magenta:l(35,39),cyan:l(36,39),white:l(37,39),gray:l(90,39),grey:l(90,39),bgBlack:l(40,49),bgRed:l(41,49),bgGreen:l(42,49),bgYellow:l(43,49),bgBlue:l(44,49),bgMagenta:l(45,49),bgCyan:l(46,49),bgWhite:l(47,49)};function o(t,e){let s,i=0,r="",n="";for(;i<t.length;i++)s=t[i],r+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return r+e+n}function l(t,e){let s={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){return void 0!==this&&void 0!==this.has?(this.has.includes(t)||(this.has.push(t),this.keys.push(s)),void 0===e?this:h.enabled?o(this.keys,e+""):e+""):void 0===e?function(t,e){let s={has:t,keys:e};return s.reset=h.reset.bind(s),s.bold=h.bold.bind(s),s.dim=h.dim.bind(s),s.italic=h.italic.bind(s),s.underline=h.underline.bind(s),s.inverse=h.inverse.bind(s),s.hidden=h.hidden.bind(s),s.strikethrough=h.strikethrough.bind(s),s.black=h.black.bind(s),s.red=h.red.bind(s),s.green=h.green.bind(s),s.yellow=h.yellow.bind(s),s.blue=h.blue.bind(s),s.magenta=h.magenta.bind(s),s.cyan=h.cyan.bind(s),s.white=h.white.bind(s),s.gray=h.gray.bind(s),s.grey=h.grey.bind(s),s.bgBlack=h.bgBlack.bind(s),s.bgRed=h.bgRed.bind(s),s.bgGreen=h.bgGreen.bind(s),s.bgYellow=h.bgYellow.bind(s),s.bgBlue=h.bgBlue.bind(s),s.bgMagenta=h.bgMagenta.bind(s),s.bgCyan=h.bgCyan.bind(s),s.bgWhite=h.bgWhite.bind(s),s}([t],[s]):h.enabled?o([s],e+""):e+""}}t.exports=h},function(t,e,s){"use strict";const i="[",r={to:(t,e)=>e?`${i}${e+1};${t+1}H`:`${i}${t+1}G`,move(t,e){let s="";return t<0?s+=`${i}${-t}D`:t>0&&(s+=`${i}${t}C`),e<0?s+=`${i}${-e}A`:e>0&&(s+=`${i}${e}B`),s},up:(t=1)=>`${i}${t}A`,down:(t=1)=>`${i}${t}B`,forward:(t=1)=>`${i}${t}C`,backward:(t=1)=>`${i}${t}D`,nextLine:(t=1)=>`${i}E`.repeat(t),prevLine:(t=1)=>`${i}F`.repeat(t),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:"7",restore:"8"},n={up:(t=1)=>`${i}S`.repeat(t),down:(t=1)=>`${i}T`.repeat(t)},h={screen:`${i}2J`,up:(t=1)=>`${i}1J`.repeat(t),down:(t=1)=>`${i}J`.repeat(t),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(t){let e="";for(let s=0;s<t;s++)e+=this.line+(s<t-1?r.up():"");return t&&(e+=r.left),e}};t.exports={cursor:r,scroll:n,erase:h,beep:""}},function(t,e,s){"use strict";t.exports={action:s(14),clear:s(15),style:s(16),strip:s(5),figures:s(6),lines:s(17),wrap:s(18),entriesToDisplay:s(19)}},function(t,e,s){"use strict";class i{constructor({token:t,date:e,parts:s,locales:i}){this.token=t,this.date=e||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,s)=>s>t&&e instanceof i))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,s)=>s>e&&t instanceof i))}toString(){return String(this.date)}}t.exports=i},function(t,e,s){"use strict";const i=s(13),{action:r}=s(2),n=s(20),{beep:h,cursor:o}=s(1),l=s(0);t.exports=class extends n{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);const e=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,e),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(t,e)=>{let i=r(e,s);!1===i?this._&&this._(t,e):"function"==typeof this[i]?this[i](e):this.bell()};this.close=()=>{this.out.write(o.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),e.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},function(t,e,s){"use strict";t.exports=t=>{const e=["[\\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(e,"g");return"string"==typeof t?t.replace(s,""):t}},function(t,e,s){"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},n="win32"===process.platform?r:i;t.exports=n},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(4),{clear:h,figures:o,style:l,wrap:a,entriesToDisplay:u}=s(2);t.exports=class extends n{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(void 0===t.value?e:t.value),selected:t&&t.selected,disabled:t&&t.disabled}))),this.clear=h("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map((t=>!t.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const t=this.value.filter((t=>t.selected));this.minSelected&&t.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((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((e=>e.selected=t)),this.render()}_(t,e){if(" "===t)this.handleSpaceToggle();else{if("a"!==t)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${o.arrowUp}/${o.arrowDown}: Highlight option\n ${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(t,e,s,r){const n=(e.selected?i.green(o.radioOn):o.radioOff)+" "+r+" ";let h,l;return e.disabled?h=t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):(h=t===s?i.cyan().underline(e.title):e.title,t===s&&e.description&&(l=` - ${e.description}`,(n.length+h.length+l.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(l="\n"+a(e.description,{margin:n.length,width:this.out.columns})))),n+h+i.gray(l||"")}paginateOptions(t){if(0===t.length)return i.red("No matches for this query.");let e,{startIndex:s,endIndex:r}=u(this.cursor,t.length,this.optionsPerPage),n=[];for(let i=s;i<r;i++)e=i===s&&s>0?o.arrowUp:i===r-1&&r<t.length?o.arrowDown:" ",n.push(this.renderOption(this.cursor,t[i],i,e));return"\n"+n.join("\n")}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){t.exports=s(9)},function(t,e,s){"use strict";const i=s(10),r=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function h(t=[],{onSubmit:e=n,onCancel:s=n}={}){const l={},a=h._override||{};let u,d,c,p,g,f;t=[].concat(t);const m=async(t,e,s=!1)=>{if(s||!t.validate||!0===t.validate(e))return t.format?await t.format(e,l):e};for(d of t)if(({name:p,type:g}=d),"function"==typeof g&&(g=await g(u,{...l},d),d.type=g),g){for(let t in d){if(r.includes(t))continue;let e=d[t];d[t]="function"==typeof e?await e(u,{...l},f):e}if(f=d,"string"!=typeof d.message)throw new Error("prompt message is required");if(({name:p,type:g}=d),void 0===i[g])throw new Error(`prompt type (${g}) is not defined`);if(void 0===a[d.name]||(u=await m(d,a[d.name]),void 0===u)){try{u=h._injected?o(h._injected,d.initial):await i[g](d),l[p]=u=await m(d,u,!0),c=await e(d,u,l)}catch(t){c=!await s(d,l)}if(c)return l}else l[p]=u}return l}function o(t,e){const s=t.shift();if(s instanceof Error)throw s;return void 0===s?e:s}t.exports=Object.assign(h,{prompt:h,prompts:i,inject:function(t){h._injected=(h._injected||[]).concat(t)},override:function(t){h._override=Object.assign({},t)}})},function(t,e,s){"use strict";const i=e,r=s(11),n=t=>t;function h(t,e,s={}){return new Promise(((i,h)=>{const o=new r[t](e),l=s.onAbort||n,a=s.onSubmit||n,u=s.onExit||n;o.on("state",e.onState||n),o.on("submit",(t=>i(a(t)))),o.on("exit",(t=>i(u(t)))),o.on("abort",(t=>h(l(t))))}))}i.text=t=>h("TextPrompt",t),i.password=t=>(t.style="password",i.text(t)),i.invisible=t=>(t.style="invisible",i.text(t)),i.number=t=>h("NumberPrompt",t),i.date=t=>h("DatePrompt",t),i.confirm=t=>h("ConfirmPrompt",t),i.list=t=>{const e=t.separator||",";return h("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})},i.toggle=t=>h("TogglePrompt",t),i.select=t=>h("SelectPrompt",t),i.multiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("MultiselectPrompt",t,{onAbort:e,onSubmit:e})},i.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};const o=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));i.autocomplete=t=>(t.suggest=t.suggest||o,t.choices=[].concat(t.choices||[]),h("AutocompletePrompt",t))},function(t,e,s){"use strict";t.exports={TextPrompt:s(12),SelectPrompt:s(21),TogglePrompt:s(22),DatePrompt:s(23),NumberPrompt:s(33),MultiselectPrompt:s(7),AutocompletePrompt:s(34),AutocompleteMultiselectPrompt:s(35),ConfirmPrompt:s(36)}},function(t,e,s){const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,lines:a,figures:u}=s(2);t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,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 t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}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(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,e){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${t}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),e=this.value.slice(this.cursor);this.value=`${t}${e}`,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 t=this.value.slice(0,this.cursor),e=this.value.slice(this.cursor+1);this.value=`${t}${e}`,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(a(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=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":u.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(n.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0)))}}},function(t,e){t.exports=require("readline")},function(t,e,s){"use strict";t.exports=(t,e)=>{if(!t.meta||"escape"===t.name){if(t.ctrl){if("a"===t.name)return"first";if("c"===t.name)return"abort";if("d"===t.name)return"abort";if("e"===t.name)return"last";if("g"===t.name)return"reset"}if(e){if("j"===t.name)return"down";if("k"===t.name)return"up"}return"return"===t.name||"enter"===t.name?"submit":"backspace"===t.name?"delete":"delete"===t.name?"deleteForward":"abort"===t.name?"abort":"escape"===t.name?"exit":"tab"===t.name?"next":"pagedown"===t.name?"nextPage":"pageup"===t.name?"prevPage":"home"===t.name?"home":"end"===t.name?"end":"up"===t.name?"up":"down"===t.name?"down":"right"===t.name?"right":"left"===t.name&&"left"}}},function(t,e,s){"use strict";const i=s(5),{erase:r,cursor:n}=s(1);t.exports=function(t,e){if(!e)return r.line+n.to(0);let s=0;const h=t.split(/\r?\n/);for(let t of h)s+=1+Math.floor(Math.max([...i(t)].length-1,0)/e);return r.lines(s)}},function(t,e,s){"use strict";const i=s(0),r=s(6),n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),h=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});t.exports={styles:n,render:t=>n[t]||n.default,symbols:h,symbol:(t,e,s)=>e?h.aborted:s?h.exited:t?h.done:h.default,delimiter:t=>i.gray(t?r.ellipsis:r.pointerSmall),item:(t,e)=>i.gray(t?e?r.pointerSmall:"+":r.line)}},function(t,e,s){"use strict";const i=s(5);t.exports=function(t,e){let s=String(i(t)||"").split(/\r?\n/);return e?s.map((t=>Math.ceil(t.length/e))).reduce(((t,e)=>t+e)):s.length}},function(t,e,s){"use strict";t.exports=(t,e={})=>{const s=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,e)=>(e.length+s.length>=i||t[t.length-1].length+e.length+1<i?t[t.length-1]+=` ${e}`:t.push(`${s}${e}`),t)),[s]).join("\n"))).join("\n")}},function(t,e,s){"use strict";t.exports=(t,e,s)=>{s=s||e;let i=Math.min(e-s,t-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,e)}}},function(t,e){t.exports=require("events")},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o,wrap:l,entriesToDisplay:a}=s(2),{cursor:u}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),value:t&&(void 0===t.value?e:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}))),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=h("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].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()}_(t,e){if(" "===t)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(h(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=a(this.cursor,this.choices.length,this.optionsPerPage);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 s=t;s<e;s++){let r,n,h="",a=this.choices[s];n=s===t&&t>0?o.arrowUp:s===e-1&&e<this.choices.length?o.arrowDown:" ",a.disabled?(r=this.cursor===s?i.gray().underline(a.title):i.strikethrough().gray(a.title),n=(this.cursor===s?i.bold().gray(o.pointer)+" ":" ")+n):(r=this.cursor===s?i.cyan().underline(a.title):a.title,n=(this.cursor===s?i.cyan(o.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(h=` - ${a.description}`,(n.length+r.length+h.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(h="\n"+l(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${r}${i.gray(h)}\n`}}this.out.write(this.outputText)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{cursor:o,erase:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.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()}_(t,e){if(" "===t)this.value=!this.value;else if("1"===t)this.value=!0;else{if("0"!==t)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(h(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(l.line+o.to(0)+this.outputText))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o}=s(2),{erase:l,cursor:a}=s(1),{DatePart:u,Meridiem:d,Day:c,Hours:p,Milliseconds:g,Minutes:f,Month:m,Seconds:b,Year:v}=s(24),w=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new c(t),3:t=>new m(t),4:t=>new v(t),5:t=>new d(t),6:t=>new p(t),7:t=>new f(t),8:t=>new b(t),9:t=>new g(t)},x={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(",")};t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.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(t){t&&this._date.setTime(t.getTime())}set mask(t){let e;for(this.parts=[];e=w.exec(t);){let t=e.shift(),s=e.findIndex((t=>null!=t));this.parts.push(s in y?y[s]({token:e[s]||t,date:this.date,parts:this.parts,locales:this.locales}):e[s]||t)}let s=this.parts.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof u))),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 t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}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 t=this.parts[this.cursor].prev();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof u))),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.parts.reduce(((t,e,s)=>t.concat(s!==this.cursor||this.done?e:i.cyan().underline(e.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":o.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(l.line+a.to(0)+this.outputText))}}},function(t,e,s){"use strict";t.exports={DatePart:s(3),Meridiem:s(25),Day:s(26),Hours:s(27),Milliseconds:s(28),Minutes:s(29),Month:s(30),Seconds:s(31),Year:s(32)}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),e=this.date.getDay();return"DD"===this.token?String(t).padStart(2,"0"):"Do"===this.token?t+(s=t,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?e+1:"ddd"===this.token?this.locales.weekdaysShort[e]:"dddd"===this.token?this.locales.weekdays[e]:t;var s}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),e=this.token.length;return 2===e?String(t+1).padStart(2,"0"):3===e?this.locales.monthsShort[t]:4===e?this.locales.months[t]:String(t+1)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?t.substr(-2):t}}},function(t,e,s){const i=s(0),r=s(4),{cursor:n,erase:h}=s(1),{style:o,figures:l,clear:a,lines:u}=s(2),d=/[0-9]/,c=t=>void 0!==t,p=(t,e)=>{let s=Math.pow(10,e);return Math.round(t*s)/s};t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.msg=t.message,this.initial=c(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=c(t.min)?t.min:-1/0,this.max=c(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){t||0===t?(this.placeholder=!1,this.rendered=this.transform.render(`${p(t,this.round)}`),this._value=p(t,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return"-"===t||"."===t&&this.float||d.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=""!==t?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let t=this.value;this.value=""!==t?t: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 t=this.value.toString();if(0===t.length)return this.bell();this.value=this.parse(t=t.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()}_(t,e){if(!this.valid(t))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=s,this.color="cyan","."===t)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(n.down(u(this.outputError,this.out.columns)-1)+a(this.outputError,this.out.columns)),this.out.write(a(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.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(((t,e,s)=>t+`\n${s?" ":l.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(h.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,figures:a,wrap:u,entriesToDisplay:d}=s(2),c=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),p=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial="number"==typeof t.initial?t.initial:((t,e)=>{const s=t.findIndex((t=>t.value===e||t.title===e));return s>-1?s:void 0})(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=o.render(t.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(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return"number"==typeof this._fb?t=this.choices[this._fb]:"string"==typeof this._fb&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=c(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices),s=await e;if(this.completing!==e)return;this.suggestions=s.map(((t,e,s)=>({title:p(s,e),value:c(s,e),description:t.description}))),this.completing=!1;const i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),t&&t()}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()}_(t,e){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${t}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let t=this.input.slice(0,this.cursor-1),e=this.input.slice(this.cursor);this.input=`${t}${e}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),e=this.input.slice(this.cursor+1);this.input=`${t}${e}`,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(t,e,s,r){let n,h=s?a.arrowUp:r?a.arrowDown:" ",o=e?i.cyan().underline(t.title):t.title;return h=(e?i.cyan(a.pointer)+" ":" ")+h,t.description&&(n=` - ${t.description}`,(h.length+o.length+n.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(n="\n"+u(t.description,{margin:3,width:this.out.columns}))),h+" "+o+i.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=d(this.select,this.choices.length,this.limit);if(this.outputText=[o.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),o.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(t,e).map(((s,i)=>this.renderOption(s,this.select===i+t,0===i&&t>0,i+t===e-1&&e<this.choices.length))).join("\n");this.outputText+="\n"+(s||i.gray(this.fallback.title))}this.out.write(n.line+h.to(0)+this.outputText)}}},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(7),{clear:h,style:o,figures:l}=s(2);t.exports=class extends n{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=h("",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((t=>t.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 t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>!this.inputValue||(!("string"!=typeof t.title||!t.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof t.value||!t.value.toLowerCase().includes(this.inputValue.toLowerCase())))));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e,this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,e){" "===t?this.handleSpaceToggle():this.handleInputChange(t)}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(t,e,s){let r;return r=e.disabled?t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):t===s?i.cyan().underline(e.title):e.title,(e.selected?i.green(l.radioOn):l.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{erase:o,cursor:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.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()}_(t,e){return"y"===t.toLowerCase()?(this.value=!0,this.submit()):"n"===t.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(h(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(o.line+l.to(0)+this.outputText))}}}]));
1
+ (()=>{var t={391:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:s,TERM:i}=process.env,r={enabled:!s&&"dumb"!==i&&"0"!==e,reset:h(0,0),bold:h(1,22),dim:h(2,22),italic:h(3,23),underline:h(4,24),inverse:h(7,27),hidden:h(8,28),strikethrough:h(9,29),black:h(30,39),red:h(31,39),green:h(32,39),yellow:h(33,39),blue:h(34,39),magenta:h(35,39),cyan:h(36,39),white:h(37,39),gray:h(90,39),grey:h(90,39),bgBlack:h(40,49),bgRed:h(41,49),bgGreen:h(42,49),bgYellow:h(43,49),bgBlue:h(44,49),bgMagenta:h(45,49),bgCyan:h(46,49),bgWhite:h(47,49)};function n(t,e){let s,i=0,r="",n="";for(;i<t.length;i++)s=t[i],r+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return r+e+n}function h(t,e){let s={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){return void 0!==this&&void 0!==this.has?(this.has.includes(t)||(this.has.push(t),this.keys.push(s)),void 0===e?this:r.enabled?n(this.keys,e+""):e+""):void 0===e?function(t,e){let s={has:t,keys:e};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}([t],[s]):r.enabled?n([s],e+""):e+""}}t.exports=r},468:t=>{"use strict";class e{constructor({token:t,date:e,parts:s,locales:i}){this.token=t,this.date=e||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((s,i)=>i>t&&s instanceof e))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const s=t.indexOf(this);return t.find(((t,i)=>i>s&&t instanceof e))}toString(){return String(this.date)}}t.exports=e},608:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),e=this.date.getDay();return"DD"===this.token?String(t).padStart(2,"0"):"Do"===this.token?t+(s=t,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?e+1:"ddd"===this.token?this.locales.weekdaysShort[e]:"dddd"===this.token?this.locales.weekdays[e]:t;var s}}},134:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}},106:(t,e,s)=>{"use strict";t.exports={DatePart:s(468),Meridiem:s(689),Day:s(608),Hours:s(134),Milliseconds:s(479),Minutes:s(512),Month:s(318),Seconds:s(908),Year:s(958)}},689:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}},479:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},512:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}},318:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),e=this.token.length;return 2===e?String(t+1).padStart(2,"0"):3===e?this.locales.monthsShort[t]:4===e?this.locales.months[t]:String(t+1)}}},908:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}},958:(t,e,s)=>{"use strict";const i=s(468);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?t.substr(-2):t}}},656:(t,e,s)=>{"use strict";const i=s(391),r=s(739),{erase:n,cursor:h}=s(698),{style:o,clear:l,figures:a,wrap:u,entriesToDisplay:d}=s(16),c=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),p=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial="number"==typeof t.initial?t.initial:((t,e)=>{const s=t.findIndex((t=>t.value===e||t.title===e));return s>-1?s:void 0})(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=o.render(t.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(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return"number"==typeof this._fb?t=this.choices[this._fb]:"string"==typeof this._fb&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=c(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices),s=await e;if(this.completing!==e)return;this.suggestions=s.map(((t,e,s)=>({title:p(s,e),value:c(s,e),description:t.description}))),this.completing=!1;const i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),t&&t()}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()}_(t,e){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${t}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let t=this.input.slice(0,this.cursor-1),e=this.input.slice(this.cursor);this.input=`${t}${e}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),e=this.input.slice(this.cursor+1);this.input=`${t}${e}`,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(t,e,s,r){let n,h=s?a.arrowUp:r?a.arrowDown:" ",o=e?i.cyan().underline(t.title):t.title;return h=(e?i.cyan(a.pointer)+" ":" ")+h,t.description&&(n=` - ${t.description}`,(h.length+o.length+n.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(n="\n"+u(t.description,{margin:3,width:this.out.columns}))),h+" "+o+i.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=d(this.select,this.choices.length,this.limit);if(this.outputText=[o.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),o.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(t,e).map(((s,i)=>this.renderOption(s,this.select===i+t,0===i&&t>0,i+t===e-1&&e<this.choices.length))).join("\n");this.outputText+="\n"+(s||i.gray(this.fallback.title))}this.out.write(n.line+h.to(0)+this.outputText)}}},900:(t,e,s)=>{"use strict";const i=s(391),{cursor:r}=s(698),n=s(702),{clear:h,style:o,figures:l}=s(16);t.exports=class extends n{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=h("",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((t=>t.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 t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>!this.inputValue||(!("string"!=typeof t.title||!t.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof t.value||!t.value.toLowerCase().includes(this.inputValue.toLowerCase())))));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e,this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,e){" "===t?this.handleSpaceToggle():this.handleInputChange(t)}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(t,e,s){let r;return r=e.disabled?t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):t===s?i.cyan().underline(e.title):e.title,(e.selected?i.green(l.radioOn):l.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},747:(t,e,s)=>{const i=s(391),r=s(739),{style:n,clear:h}=s(16),{erase:o,cursor:l}=s(698);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.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()}_(t,e){return"y"===t.toLowerCase()?(this.value=!0,this.submit()):"n"===t.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(h(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(o.line+l.to(0)+this.outputText))}}},54:(t,e,s)=>{"use strict";const i=s(391),r=s(739),{style:n,clear:h,figures:o}=s(16),{erase:l,cursor:a}=s(698),{DatePart:u,Meridiem:d,Day:c,Hours:p,Milliseconds:g,Minutes:m,Month:f,Seconds:b,Year:v}=s(106),w=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new c(t),3:t=>new f(t),4:t=>new v(t),5:t=>new d(t),6:t=>new p(t),7:t=>new m(t),8:t=>new b(t),9:t=>new g(t)},x={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(",")};t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.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(t){t&&this._date.setTime(t.getTime())}set mask(t){let e;for(this.parts=[];e=w.exec(t);){let t=e.shift(),s=e.findIndex((t=>null!=t));this.parts.push(s in y?y[s]({token:e[s]||t,date:this.date,parts:this.parts,locales:this.locales}):e[s]||t)}let s=this.parts.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof u))),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 t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}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 t=this.parts[this.cursor].prev();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof u))),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.parts.reduce(((t,e,s)=>t.concat(s!==this.cursor||this.done?e:i.cyan().underline(e.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":o.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(l.line+a.to(0)+this.outputText))}}},635:(t,e,s)=>{"use strict";t.exports={TextPrompt:s(490),SelectPrompt:s(770),TogglePrompt:s(639),DatePrompt:s(54),NumberPrompt:s(531),MultiselectPrompt:s(702),AutocompletePrompt:s(656),AutocompleteMultiselectPrompt:s(900),ConfirmPrompt:s(747)}},702:(t,e,s)=>{"use strict";const i=s(391),{cursor:r}=s(698),n=s(739),{clear:h,figures:o,style:l,wrap:a,entriesToDisplay:u}=s(16);t.exports=class extends n{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(void 0===t.value?e:t.value),selected:t&&t.selected,disabled:t&&t.disabled}))),this.clear=h("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map((t=>!t.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const t=this.value.filter((t=>t.selected));this.minSelected&&t.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((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((e=>e.selected=t)),this.render()}_(t,e){if(" "===t)this.handleSpaceToggle();else{if("a"!==t)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${o.arrowUp}/${o.arrowDown}: Highlight option\n ${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(t,e,s,r){const n=(e.selected?i.green(o.radioOn):o.radioOff)+" "+r+" ";let h,l;return e.disabled?h=t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):(h=t===s?i.cyan().underline(e.title):e.title,t===s&&e.description&&(l=` - ${e.description}`,(n.length+h.length+l.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(l="\n"+a(e.description,{margin:n.length,width:this.out.columns})))),n+h+i.gray(l||"")}paginateOptions(t){if(0===t.length)return i.red("No matches for this query.");let e,{startIndex:s,endIndex:r}=u(this.cursor,t.length,this.optionsPerPage),n=[];for(let i=s;i<r;i++)e=i===s&&s>0?o.arrowUp:i===r-1&&r<t.length?o.arrowDown:" ",n.push(this.renderOption(this.cursor,t[i],i,e));return"\n"+n.join("\n")}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},531:(t,e,s)=>{const i=s(391),r=s(739),{cursor:n,erase:h}=s(698),{style:o,figures:l,clear:a,lines:u}=s(16),d=/[0-9]/,c=t=>void 0!==t,p=(t,e)=>{let s=Math.pow(10,e);return Math.round(t*s)/s};t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.msg=t.message,this.initial=c(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=c(t.min)?t.min:-1/0,this.max=c(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){t||0===t?(this.placeholder=!1,this.rendered=this.transform.render(`${p(t,this.round)}`),this._value=p(t,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return"-"===t||"."===t&&this.float||d.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=""!==t?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let t=this.value;this.value=""!==t?t: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 t=this.value.toString();if(0===t.length)return this.bell();this.value=this.parse(t=t.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()}_(t,e){if(!this.valid(t))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=s,this.color="cyan","."===t)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(n.down(u(this.outputError,this.out.columns)-1)+a(this.outputError,this.out.columns)),this.out.write(a(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.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(((t,e,s)=>t+`\n${s?" ":l.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(h.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}},739:(t,e,s)=>{"use strict";const i=s(521),{action:r}=s(16),n=s(361),{beep:h,cursor:o}=s(698),l=s(391);t.exports=class extends n{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);const e=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,e),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(t,e)=>{let i=r(e,s);!1===i?this._&&this._(t,e):"function"==typeof this[i]?this[i](e):this.bell()};this.close=()=>{this.out.write(o.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),e.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},770:(t,e,s)=>{"use strict";const i=s(391),r=s(739),{style:n,clear:h,figures:o,wrap:l,entriesToDisplay:a}=s(16),{cursor:u}=s(698);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),value:t&&(void 0===t.value?e:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}))),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=h("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].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()}_(t,e){if(" "===t)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(h(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=a(this.cursor,this.choices.length,this.optionsPerPage);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 s=t;s<e;s++){let r,n,h="",a=this.choices[s];n=s===t&&t>0?o.arrowUp:s===e-1&&e<this.choices.length?o.arrowDown:" ",a.disabled?(r=this.cursor===s?i.gray().underline(a.title):i.strikethrough().gray(a.title),n=(this.cursor===s?i.bold().gray(o.pointer)+" ":" ")+n):(r=this.cursor===s?i.cyan().underline(a.title):a.title,n=(this.cursor===s?i.cyan(o.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(h=` - ${a.description}`,(n.length+r.length+h.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(h="\n"+l(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${r}${i.gray(h)}\n`}}this.out.write(this.outputText)}}},490:(t,e,s)=>{const i=s(391),r=s(739),{erase:n,cursor:h}=s(698),{style:o,clear:l,lines:a,figures:u}=s(16);t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,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 t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}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(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,e){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${t}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),e=this.value.slice(this.cursor);this.value=`${t}${e}`,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 t=this.value.slice(0,this.cursor),e=this.value.slice(this.cursor+1);this.value=`${t}${e}`,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(a(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=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":u.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(n.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0)))}}},639:(t,e,s)=>{const i=s(391),r=s(739),{style:n,clear:h}=s(16),{cursor:o,erase:l}=s(698);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.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()}_(t,e){if(" "===t)this.value=!this.value;else if("1"===t)this.value=!0;else{if("0"!==t)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(h(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(l.line+o.to(0)+this.outputText))}}},439:(t,e,s)=>{"use strict";const i=s(910),r=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function h(t=[],{onSubmit:e=n,onCancel:s=n}={}){const l={},a=h._override||{};let u,d,c,p,g,m;t=[].concat(t);const f=async(t,e,s=!1)=>{if(s||!t.validate||!0===t.validate(e))return t.format?await t.format(e,l):e};for(d of t)if(({name:p,type:g}=d),"function"==typeof g&&(g=await g(u,{...l},d),d.type=g),g){for(let t in d){if(r.includes(t))continue;let e=d[t];d[t]="function"==typeof e?await e(u,{...l},m):e}if(m=d,"string"!=typeof d.message)throw new Error("prompt message is required");if(({name:p,type:g}=d),void 0===i[g])throw new Error(`prompt type (${g}) is not defined`);if(void 0===a[d.name]||(u=await f(d,a[d.name]),void 0===u)){try{u=h._injected?o(h._injected,d.initial):await i[g](d),l[p]=u=await f(d,u,!0),c=await e(d,u,l)}catch(t){c=!await s(d,l)}if(c)return l}else l[p]=u}return l}function o(t,e){const s=t.shift();if(s instanceof Error)throw s;return void 0===s?e:s}t.exports=Object.assign(h,{prompt:h,prompts:i,inject:function(t){h._injected=(h._injected||[]).concat(t)},override:function(t){h._override=Object.assign({},t)}})},910:(t,e,s)=>{"use strict";const i=e,r=s(635),n=t=>t;function h(t,e,s={}){return new Promise(((i,h)=>{const o=new r[t](e),l=s.onAbort||n,a=s.onSubmit||n,u=s.onExit||n;o.on("state",e.onState||n),o.on("submit",(t=>i(a(t)))),o.on("exit",(t=>i(u(t)))),o.on("abort",(t=>h(l(t))))}))}i.text=t=>h("TextPrompt",t),i.password=t=>(t.style="password",i.text(t)),i.invisible=t=>(t.style="invisible",i.text(t)),i.number=t=>h("NumberPrompt",t),i.date=t=>h("DatePrompt",t),i.confirm=t=>h("ConfirmPrompt",t),i.list=t=>{const e=t.separator||",";return h("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})},i.toggle=t=>h("TogglePrompt",t),i.select=t=>h("SelectPrompt",t),i.multiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("MultiselectPrompt",t,{onAbort:e,onSubmit:e})},i.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};const o=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));i.autocomplete=t=>(t.suggest=t.suggest||o,t.choices=[].concat(t.choices||[]),h("AutocompletePrompt",t))},866:t=>{"use strict";t.exports=(t,e)=>{if(!t.meta||"escape"===t.name){if(t.ctrl){if("a"===t.name)return"first";if("c"===t.name)return"abort";if("d"===t.name)return"abort";if("e"===t.name)return"last";if("g"===t.name)return"reset"}if(e){if("j"===t.name)return"down";if("k"===t.name)return"up"}return"return"===t.name||"enter"===t.name?"submit":"backspace"===t.name?"delete":"delete"===t.name?"deleteForward":"abort"===t.name?"abort":"escape"===t.name?"exit":"tab"===t.name?"next":"pagedown"===t.name?"nextPage":"pageup"===t.name?"prevPage":"home"===t.name?"home":"end"===t.name?"end":"up"===t.name?"up":"down"===t.name?"down":"right"===t.name?"right":"left"===t.name&&"left"}}},694:(t,e,s)=>{"use strict";const i=s(420),{erase:r,cursor:n}=s(698);t.exports=function(t,e){if(!e)return r.line+n.to(0);let s=0;const h=t.split(/\r?\n/);for(let t of h)s+=1+Math.floor(Math.max([...i(t)].length-1,0)/e);return r.lines(s)}},163:t=>{"use strict";t.exports=(t,e,s)=>{s=s||e;let i=Math.min(e-s,t-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,e)}}},815:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},s={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},i="win32"===process.platform?s:e;t.exports=i},16:(t,e,s)=>{"use strict";t.exports={action:s(866),clear:s(694),style:s(424),strip:s(420),figures:s(815),lines:s(985),wrap:s(524),entriesToDisplay:s(163)}},985:(t,e,s)=>{"use strict";const i=s(420);t.exports=function(t,e){let s=String(i(t)||"").split(/\r?\n/);return e?s.map((t=>Math.ceil(t.length/e))).reduce(((t,e)=>t+e)):s.length}},420:t=>{"use strict";t.exports=t=>{const e=["[\\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(e,"g");return"string"==typeof t?t.replace(s,""):t}},424:(t,e,s)=>{"use strict";const i=s(391),r=s(815),n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),h=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});t.exports={styles:n,render:t=>n[t]||n.default,symbols:h,symbol:(t,e,s)=>e?h.aborted:s?h.exited:t?h.done:h.default,delimiter:t=>i.gray(t?r.ellipsis:r.pointerSmall),item:(t,e)=>i.gray(t?e?r.pointerSmall:"+":r.line)}},524:t=>{"use strict";t.exports=(t,e={})=>{const s=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,e)=>(e.length+s.length>=i||t[t.length-1].length+e.length+1<i?t[t.length-1]+=` ${e}`:t.push(`${s}${e}`),t)),[s]).join("\n"))).join("\n")}},698:t=>{"use strict";const e="[",s={to:(t,s)=>s?`${e}${s+1};${t+1}H`:`${e}${t+1}G`,move(t,s){let i="";return t<0?i+=`${e}${-t}D`:t>0&&(i+=`${e}${t}C`),s<0?i+=`${e}${-s}A`:s>0&&(i+=`${e}${s}B`),i},up:(t=1)=>`${e}${t}A`,down:(t=1)=>`${e}${t}B`,forward:(t=1)=>`${e}${t}C`,backward:(t=1)=>`${e}${t}D`,nextLine:(t=1)=>`${e}E`.repeat(t),prevLine:(t=1)=>`${e}F`.repeat(t),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:"7",restore:"8"},i={up:(t=1)=>`${e}S`.repeat(t),down:(t=1)=>`${e}T`.repeat(t)},r={screen:`${e}2J`,up:(t=1)=>`${e}1J`.repeat(t),down:(t=1)=>`${e}J`.repeat(t),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(t){let e="";for(let i=0;i<t;i++)e+=this.line+(i<t-1?s.up():"");return t&&(e+=s.left),e}};t.exports={cursor:s,scroll:i,erase:r,beep:""}},167:(t,e,s)=>{t.exports=s(439)},361:t=>{"use strict";t.exports=require("events")},521:t=>{"use strict";t.exports=require("readline")}},e={};var s=function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}(167),i=exports;for(var r in s)i[r]=s[r];s.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System Worker v3.0.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System Worker v3.1.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _interopNamespace(e) {
5
5
  if (e && e.__esModule) return e;
@@ -1,12 +1,12 @@
1
- export { createJestPuppeteerEnvironment } from './jest/jest-environment';
2
- export { jestPreprocessor } from './jest/jest-preprocessor';
3
- export { createTestRunner } from './jest/jest-runner';
4
- export { jestSetupTestFramework } from './jest/jest-setup-test-framework';
5
- export { mockFetch, MockHeaders, MockRequest, MockRequestInfo, MockRequestInit, MockResponse, MockResponseInit, } from './mock-fetch';
6
- export { mockBuildCtx, mockCompilerCtx, mockCompilerSystem, mockConfig, mockDocument, mockLoadConfigInit, mockLogger, mockModule, mockValidatedConfig, mockWindow, } from './mocks';
7
- export { E2EElement, E2EPage, newE2EPage } from './puppeteer';
8
- export { newSpecPage } from './spec-page';
9
- export { transpile } from './test-transpile';
10
- export { createTesting } from './testing';
11
- export { shuffleArray } from './testing-utils';
12
- export type { EventSpy, SpecPage, Testing } from '@rindo/core/internal';
1
+ export { createJestPuppeteerEnvironment } from './jest/jest-environment';
2
+ export { jestPreprocessor } from './jest/jest-preprocessor';
3
+ export { createTestRunner } from './jest/jest-runner';
4
+ export { jestSetupTestFramework } from './jest/jest-setup-test-framework';
5
+ export { mockFetch, MockHeaders, MockRequest, MockRequestInfo, MockRequestInit, MockResponse, MockResponseInit, } from './mock-fetch';
6
+ export { mockBuildCtx, mockCompilerCtx, mockCompilerSystem, mockConfig, mockDocument, mockLoadConfigInit, mockLogger, mockModule, mockValidatedConfig, mockWindow, } from './mocks';
7
+ export { E2EElement, E2EPage, newE2EPage } from './puppeteer';
8
+ export { newSpecPage } from './spec-page';
9
+ export { transpile } from './test-transpile';
10
+ export { createTesting } from './testing';
11
+ export { shuffleArray } from './testing-utils';
12
+ export type { EventSpy, SpecPage, Testing } from '@rindo/core/internal';
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Testing v3.0.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Testing v3.1.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -89,6 +89,7 @@ async function startPuppeteerBrowser(e) {
89
89
  }
90
90
 
91
91
  function transpile(e, t = {}) {
92
+ var r;
92
93
  t = {
93
94
  ...t,
94
95
  componentExport: null,
@@ -100,7 +101,8 @@ function transpile(e, t = {}) {
100
101
  sourceMap: "inline",
101
102
  style: null,
102
103
  styleImportData: "queryparams",
103
- target: "es2015"
104
+ target: "es2015",
105
+ transformAliasedImportPaths: (r = process.env.__RINDO_TRANSPILE_PATHS__, "true" === r)
104
106
  };
105
107
  try {
106
108
  const e = process.versions.node.split(".");
@@ -217,6 +219,7 @@ async function runJest(e, t) {
217
219
  return r;
218
220
  }(e.testing, e.flags);
219
221
  t.__RINDO_EMULATE_CONFIGS__ = JSON.stringify(s), t.__RINDO_ENV__ = JSON.stringify(e.env),
222
+ t.__RINDO_TRANSPILE_PATHS__ = e.transformAliasedImportPaths ? "true" : "false",
220
223
  e.flags.ci || e.flags.e2e ? t.__RINDO_DEFAULT_TIMEOUT__ = "30000" : t.__RINDO_DEFAULT_TIMEOUT__ = "15000",
221
224
  e.flags.devtools && (t.__RINDO_DEFAULT_TIMEOUT__ = "300000000"), e.logger.debug(`default timeout: ${t.__RINDO_DEFAULT_TIMEOUT__}`);
222
225
  const n = function n(e) {
@@ -3151,7 +3154,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3151
3154
  d("/");
3152
3155
  const D = {
3153
3156
  name: "in-memory",
3154
- version: "3.0.0",
3157
+ version: "3.1.0",
3155
3158
  events: a,
3156
3159
  access: async e => u(e),
3157
3160
  accessSync: u,
@@ -4037,6 +4040,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
4037
4040
  rootDir: s,
4038
4041
  sys: createTestingSystem(),
4039
4042
  testing: {},
4043
+ transformAliasedImportPaths: !1,
4040
4044
  ...e
4041
4045
  };
4042
4046
  }, exports.mockWindow = function mockWindow(e = null) {
@@ -1,16 +1,16 @@
1
- import type { Config } from '@jest/types';
2
- import type * as d from '@rindo/core/internal';
3
- /**
4
- * Builds the `argv` to be used when programmatically invoking the Jest CLI
5
- * @param config the Rindo config to use while generating Jest CLI arguments
6
- * @returns the arguments to pass to the Jest CLI, wrapped in an object
7
- */
8
- export declare function buildJestArgv(config: d.ValidatedConfig): Config.Argv;
9
- /**
10
- * Generate a Jest run configuration to be used as a part of the `argv` passed to the Jest CLI when it is invoked
11
- * programmatically
12
- * @param config the Rindo config to use while generating Jest CLI arguments
13
- * @returns the Jest Config to attach to the `argv` argument
14
- */
15
- export declare function buildJestConfig(config: d.ValidatedConfig): string;
16
- export declare function getProjectListFromCLIArgs(config: d.Config, argv: Config.Argv): Config.Path[];
1
+ import type { Config } from '@jest/types';
2
+ import type * as d from '@rindo/core/internal';
3
+ /**
4
+ * Builds the `argv` to be used when programmatically invoking the Jest CLI
5
+ * @param config the Rindo config to use while generating Jest CLI arguments
6
+ * @returns the arguments to pass to the Jest CLI, wrapped in an object
7
+ */
8
+ export declare function buildJestArgv(config: d.ValidatedConfig): Config.Argv;
9
+ /**
10
+ * Generate a Jest run configuration to be used as a part of the `argv` passed to the Jest CLI when it is invoked
11
+ * programmatically
12
+ * @param config the Rindo config to use while generating Jest CLI arguments
13
+ * @returns the Jest Config to attach to the `argv` argument
14
+ */
15
+ export declare function buildJestConfig(config: d.ValidatedConfig): string;
16
+ export declare function getProjectListFromCLIArgs(config: d.Config, argv: Config.Argv): Config.Path[];
@@ -1,15 +1,15 @@
1
- import type { JestEnvironmentGlobal } from '@rindo/core/internal';
2
- export declare function createJestPuppeteerEnvironment(): {
3
- new (config: any): {
4
- [x: string]: any;
5
- global: JestEnvironmentGlobal;
6
- browser: any;
7
- pages: any[];
8
- setup(): Promise<void>;
9
- newPuppeteerPage(): Promise<import("puppeteer").Page>;
10
- closeOpenPages(): Promise<void>;
11
- teardown(): Promise<void>;
12
- getVmContext(): any;
13
- };
14
- [x: string]: any;
15
- };
1
+ import type { JestEnvironmentGlobal } from '@rindo/core/internal';
2
+ export declare function createJestPuppeteerEnvironment(): {
3
+ new (config: any): {
4
+ [x: string]: any;
5
+ global: JestEnvironmentGlobal;
6
+ browser: any;
7
+ pages: any[];
8
+ setup(): Promise<void>;
9
+ newPuppeteerPage(): Promise<import("puppeteer").Page>;
10
+ closeOpenPages(): Promise<void>;
11
+ teardown(): Promise<void>;
12
+ getVmContext(): any;
13
+ };
14
+ [x: string]: any;
15
+ };
@@ -1,59 +1,59 @@
1
- type Jest26CacheKeyOptions = {
2
- instrument: boolean;
3
- rootDir: string;
4
- };
5
- type Jest26Config = {
6
- instrument: boolean;
7
- rootDir: string;
8
- };
9
- type Jest27TransformOptions = {
10
- config: Jest26Config;
11
- };
12
- export declare const jestPreprocessor: {
13
- /**
14
- * Transforms a file to CommonJS to be used by Jest. The API for `process` is described in the
15
- * ["Writing custom transformers"](https://jestjs.io/docs/code-transformation#writing-custom-transformers)
16
- * documentation on the jest site. Unfortunately, the URL is not versioned at the time of this writing. For
17
- * reference, the v27.2 docs were referenced (the most recent available).
18
- *
19
- * This function attempts to support several versions of Jest (v23 through v27). Support for earlier versions of Jest
20
- * will be removed in a future major version of Rindo.
21
- *
22
- * @param sourceText the contents of the source file
23
- * @param sourcePath the path to the source file
24
- * @param jestConfig the jest configuration when called by Jest 26 and lower. This parameter is folded into
25
- * `transformOptions` when called by Jest 27+ as a top level `config` property. Calls to this function from Jest 27+
26
- * will have a `Jest27TransformOptions` shape
27
- * @param transformOptions an object containing the various transformation options. In Jest 27+ this parameter occurs
28
- * third in this function signature (and no fourth parameter is formally accepted)
29
- * @returns the transformed file contents if the file should be transformed. returns the original source otherwise
30
- */
31
- process(sourceText: string, sourcePath: string, jestConfig: Jest26Config | Jest27TransformOptions, transformOptions?: Jest26Config): string;
32
- /**
33
- * Generates a key used to cache the results of transforming a file. This helps avoid re-processing a file via the
34
- * `transform` function unnecessarily (when no changes have occurred). The API for `getCacheKey` is described in the
35
- * ["Writing custom transformers"](https://jestjs.io/docs/code-transformation#writing-custom-transformers)
36
- * documentation on the jest site. Unfortunately, the URL is not versioned at the time of this writing. For
37
- * reference, the v27.2 docs were referenced (the most recent available).
38
- *
39
- * This function attempts to support several versions of Jest (v23 through v27). Support for earlier versions of Jest
40
- * will be removed in a future major version of Rindo.
41
- *
42
- * @param sourceText the contents of the source file
43
- * @param sourcePath the path to the source file
44
- * @param jestConfigStr a stringified version of the jest configuration when called by Jest 26 and lower. This
45
- * parameter takes the shape of `transformOptions` when called by Jest 27+.
46
- * @param transformOptions an object containing the various transformation options. In Jest 27+ this parameter occurs
47
- * third in this function signature (and no fourth parameter is formally accepted)
48
- * @returns the key to cache a file with
49
- */
50
- getCacheKey(sourceText: string, sourcePath: string, jestConfigStr: string | Jest27TransformOptions, transformOptions?: Jest26CacheKeyOptions): string;
51
- };
52
- /**
53
- * Determines if a file should be transformed prior to being consumed by Jest, based on the file name and its contents
54
- * @param filePath the path of the file
55
- * @param sourceText the contents of the file
56
- * @returns `true` if the file should be transformed, `false` otherwise
57
- */
58
- export declare function shouldTransform(filePath: string, sourceText: string): boolean;
59
- export {};
1
+ type Jest26CacheKeyOptions = {
2
+ instrument: boolean;
3
+ rootDir: string;
4
+ };
5
+ type Jest26Config = {
6
+ instrument: boolean;
7
+ rootDir: string;
8
+ };
9
+ type Jest27TransformOptions = {
10
+ config: Jest26Config;
11
+ };
12
+ export declare const jestPreprocessor: {
13
+ /**
14
+ * Transforms a file to CommonJS to be used by Jest. The API for `process` is described in the
15
+ * ["Writing custom transformers"](https://jestjs.io/docs/code-transformation#writing-custom-transformers)
16
+ * documentation on the jest site. Unfortunately, the URL is not versioned at the time of this writing. For
17
+ * reference, the v27.2 docs were referenced (the most recent available).
18
+ *
19
+ * This function attempts to support several versions of Jest (v23 through v27). Support for earlier versions of Jest
20
+ * will be removed in a future major version of Rindo.
21
+ *
22
+ * @param sourceText the contents of the source file
23
+ * @param sourcePath the path to the source file
24
+ * @param jestConfig the jest configuration when called by Jest 26 and lower. This parameter is folded into
25
+ * `transformOptions` when called by Jest 27+ as a top level `config` property. Calls to this function from Jest 27+
26
+ * will have a `Jest27TransformOptions` shape
27
+ * @param transformOptions an object containing the various transformation options. In Jest 27+ this parameter occurs
28
+ * third in this function signature (and no fourth parameter is formally accepted)
29
+ * @returns the transformed file contents if the file should be transformed. returns the original source otherwise
30
+ */
31
+ process(sourceText: string, sourcePath: string, jestConfig: Jest26Config | Jest27TransformOptions, transformOptions?: Jest26Config): string;
32
+ /**
33
+ * Generates a key used to cache the results of transforming a file. This helps avoid re-processing a file via the
34
+ * `transform` function unnecessarily (when no changes have occurred). The API for `getCacheKey` is described in the
35
+ * ["Writing custom transformers"](https://jestjs.io/docs/code-transformation#writing-custom-transformers)
36
+ * documentation on the jest site. Unfortunately, the URL is not versioned at the time of this writing. For
37
+ * reference, the v27.2 docs were referenced (the most recent available).
38
+ *
39
+ * This function attempts to support several versions of Jest (v23 through v27). Support for earlier versions of Jest
40
+ * will be removed in a future major version of Rindo.
41
+ *
42
+ * @param sourceText the contents of the source file
43
+ * @param sourcePath the path to the source file
44
+ * @param jestConfigStr a stringified version of the jest configuration when called by Jest 26 and lower. This
45
+ * parameter takes the shape of `transformOptions` when called by Jest 27+.
46
+ * @param transformOptions an object containing the various transformation options. In Jest 27+ this parameter occurs
47
+ * third in this function signature (and no fourth parameter is formally accepted)
48
+ * @returns the key to cache a file with
49
+ */
50
+ getCacheKey(sourceText: string, sourcePath: string, jestConfigStr: string | Jest27TransformOptions, transformOptions?: Jest26CacheKeyOptions): string;
51
+ };
52
+ /**
53
+ * Determines if a file should be transformed prior to being consumed by Jest, based on the file name and its contents
54
+ * @param filePath the path of the file
55
+ * @param sourceText the contents of the file
56
+ * @returns `true` if the file should be transformed, `false` otherwise
57
+ */
58
+ export declare function shouldTransform(filePath: string, sourceText: string): boolean;
59
+ export {};
@@ -1,10 +1,10 @@
1
- import type * as d from '@rindo/core/internal';
2
- import type { ConfigFlags } from '../../cli/config-flags';
3
- export declare function runJest(config: d.ValidatedConfig, env: d.E2EProcessEnv): Promise<boolean>;
4
- /**
5
- * Creates a Rindo test runner
6
- * @returns the test runner
7
- */
8
- export declare function createTestRunner(): any;
9
- export declare function includeTestFile(testPath: string, env: d.E2EProcessEnv): boolean;
10
- export declare function getEmulateConfigs(testing: d.TestingConfig, flags: ConfigFlags): d.EmulateConfig[];
1
+ import type * as d from '@rindo/core/internal';
2
+ import type { ConfigFlags } from '../../cli/config-flags';
3
+ export declare function runJest(config: d.ValidatedConfig, env: d.E2EProcessEnv): Promise<boolean>;
4
+ /**
5
+ * Creates a Rindo test runner
6
+ * @returns the test runner
7
+ */
8
+ export declare function createTestRunner(): any;
9
+ export declare function includeTestFile(testPath: string, env: d.E2EProcessEnv): boolean;
10
+ export declare function getEmulateConfigs(testing: d.TestingConfig, flags: ConfigFlags): d.EmulateConfig[];
@@ -1,2 +1,2 @@
1
- import type * as d from '@rindo/core/internal';
2
- export declare function runJestScreenshot(config: d.ValidatedConfig, env: d.E2EProcessEnv): Promise<boolean>;
1
+ import type * as d from '@rindo/core/internal';
2
+ export declare function runJestScreenshot(config: d.ValidatedConfig, env: d.E2EProcessEnv): Promise<boolean>;
@@ -1,4 +1,4 @@
1
- export declare const HtmlSerializer: {
2
- print: (val: unknown) => string;
3
- test: (val: any) => boolean;
4
- };
1
+ export declare const HtmlSerializer: {
2
+ print: (val: unknown) => string;
3
+ test: (val: any) => boolean;
4
+ };
@@ -1 +1 @@
1
- export declare function jestSetupTestFramework(): void;
1
+ export declare function jestSetupTestFramework(): void;
@@ -1,14 +1,14 @@
1
- export declare function toEqualAttribute(elm: HTMLElement, expectAttrName: string, expectAttrValue: string): {
2
- message: () => string;
3
- pass: boolean;
4
- };
5
- export declare function toEqualAttributes(elm: HTMLElement, expectAttrs: {
6
- [attrName: string]: any;
7
- }): {
8
- message: () => string;
9
- pass: boolean;
10
- };
11
- export declare function toHaveAttribute(elm: HTMLElement, expectAttrName: string): {
12
- message: () => string;
13
- pass: boolean;
14
- };
1
+ export declare function toEqualAttribute(elm: HTMLElement, expectAttrName: string, expectAttrValue: string): {
2
+ message: () => string;
3
+ pass: boolean;
4
+ };
5
+ export declare function toEqualAttributes(elm: HTMLElement, expectAttrs: {
6
+ [attrName: string]: any;
7
+ }): {
8
+ message: () => string;
9
+ pass: boolean;
10
+ };
11
+ export declare function toHaveAttribute(elm: HTMLElement, expectAttrName: string): {
12
+ message: () => string;
13
+ pass: boolean;
14
+ };
@@ -1,12 +1,12 @@
1
- export declare function toHaveClass(elm: HTMLElement, expectClassName: string): {
2
- message: () => string;
3
- pass: boolean;
4
- };
5
- export declare function toHaveClasses(elm: HTMLElement, expectClassNames: string[]): {
6
- message: () => string;
7
- pass: boolean;
8
- };
9
- export declare function toMatchClasses(elm: HTMLElement, expectClassNames: string[]): {
10
- message: () => string;
11
- pass: boolean;
12
- };
1
+ export declare function toHaveClass(elm: HTMLElement, expectClassName: string): {
2
+ message: () => string;
3
+ pass: boolean;
4
+ };
5
+ export declare function toHaveClasses(elm: HTMLElement, expectClassNames: string[]): {
6
+ message: () => string;
7
+ pass: boolean;
8
+ };
9
+ export declare function toMatchClasses(elm: HTMLElement, expectClassNames: string[]): {
10
+ message: () => string;
11
+ pass: boolean;
12
+ };