create-chayns-app 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -37,4 +37,4 @@ var i=r(181);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}i
|
|
|
37
37
|
*
|
|
38
38
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
39
39
|
* Released under the MIT License.
|
|
40
|
-
*/const i=r(3102);const toRegexRange=(e,t,r)=>{if(i(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(i(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let n={relaxZeros:true,...r};if(typeof n.strictZeros==="boolean"){n.relaxZeros=n.strictZeros===false}let s=String(n.relaxZeros);let o=String(n.shorthand);let a=String(n.capture);let l=String(n.wrap);let u=e+":"+t+"="+s+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let h=Math.min(e,t);let f=Math.max(e,t);if(Math.abs(h-f)===1){let r=e+"|"+t;if(n.capture){return`(${r})`}if(n.wrap===false){return r}return`(?:${r})`}let p=hasPadding(e)||hasPadding(t);let d={min:e,max:t,a:h,b:f};let m=[];let g=[];if(p){d.isPadded=p;d.maxLen=String(d.max).length}if(h<0){let e=f<0?Math.abs(f):1;g=splitToPatterns(e,Math.abs(h),d,n);h=d.a=0}if(f>=0){m=splitToPatterns(h,f,d,n)}d.negatives=g;d.positives=m;d.result=collatePatterns(g,m,n);if(n.capture===true){d.result=`(${d.result})`}else if(n.wrap!==false&&m.length+g.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[u]=d;return d.result};function collatePatterns(e,t,r){let i=filterPatterns(e,t,"-",false,r)||[];let n=filterPatterns(t,e,"",false,r)||[];let s=filterPatterns(e,t,"-?",true,r)||[];let o=i.concat(s).concat(n);return o.join("|")}function splitToRanges(e,t){let r=1;let i=1;let n=countNines(e,r);let s=new Set([t]);while(e<=n&&n<=t){s.add(n);r+=1;n=countNines(e,r)}n=countZeros(t+1,i)-1;while(e<n&&n<=t){s.add(n);i+=1;n=countZeros(t+1,i)-1}s=[...s];s.sort(compare);return s}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let i=zip(e,t);let n=i.length;let s="";let o=0;for(let e=0;e<n;e++){let[t,n]=i[e];if(t===n){s+=t}else if(t!=="0"||n!=="9"){s+=toCharacterClass(t,n,r)}else{o++}}if(o){s+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:s,count:[o],digits:n}}function splitToPatterns(e,t,r,i){let n=splitToRanges(e,t);let s=[];let o=e;let a;for(let e=0;e<n.length;e++){let t=n[e];let l=rangeToPattern(String(o),String(t),i);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){u=padZeros(t,r,i)}l.string=u+l.pattern+toQuantifier(l.count);s.push(l);o=t+1;a=l}return s}function filterPatterns(e,t,r,i,n){let s=[];for(let n of e){let{string:e}=n;if(!i&&!contains(t,"string",e)){s.push(r+e)}if(i&&contains(t,"string",e)){s.push(r+e)}}return s}function zip(e,t){let r=[];for(let i=0;i<e.length;i++)r.push([e[i],t[i]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let i=Math.abs(t.maxLen-String(e).length);let n=r.relaxZeros!==false;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${i}}`:`0{${i}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},4488:(e,t,r)=>{e.exports=r(9023).deprecate},7825:(e,t,r)=>{"use strict";const{builtinModules:i}=r(3339);var n=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var s=["node_modules","favicon.ico"];function validate(e){var t=[];var r=[];if(e===null){r.push("name cannot be null");return done(t,r)}if(e===undefined){r.push("name cannot be undefined");return done(t,r)}if(typeof e!=="string"){r.push("name must be a string");return done(t,r)}if(!e.length){r.push("name length must be greater than zero")}if(e.match(/^\./)){r.push("name cannot start with a period")}if(e.match(/^_/)){r.push("name cannot start with an underscore")}if(e.trim()!==e){r.push("name cannot contain leading or trailing spaces")}s.forEach((function(t){if(e.toLowerCase()===t){r.push(t+" is a blacklisted name")}}));if(i.includes(e.toLowerCase())){t.push(e+" is a core module name")}if(e.length>214){t.push("name can no longer contain more than 214 characters")}if(e.toLowerCase()!==e){t.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(e.split("/").slice(-1)[0])){t.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(e)!==e){var o=e.match(n);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(t,r)}}r.push("name can only contain URL-friendly characters")}return done(t,r)}var done=function(e,t){var r={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};if(!r.warnings.length){delete r.warnings}if(!r.errors.length){delete r.errors}return r};e.exports=validate},9792:e=>{e.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]},7390:(e,t,r)=>{"use strict";var i=r(7730);var n=r(9792);var s={nul:0,control:0};e.exports=function wcwidth(e){return wcswidth(e,s)};e.exports.config=function(e){e=i(e||{},s);return function wcwidth(t){return wcswidth(t,e)}};function wcswidth(e,t){if(typeof e!=="string")return wcwidth(e,t);var r=0;for(var i=0;i<e.length;i++){var n=wcwidth(e.charCodeAt(i),t);if(n<0)return-1;r+=n}return r}function wcwidth(e,t){if(e===0)return t.nul;if(e<32||e>=127&&e<160)return t.control;if(bisearch(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function bisearch(e){var t=0;var r=n.length-1;var i;if(e<n[0][0]||e>n[r][1])return false;while(r>=t){i=Math.floor((t+r)/2);if(e>n[i][1])t=i+1;else if(e<n[i][0])r=i-1;else return true}return false}},6848:(e,t,r)=>{const i=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const n=r(6928);const s=i?";":":";const o=r(2940);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||s;const n=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=i?o.split(r):[""];if(i){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:n,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:i,pathExt:s,pathExtExe:a}=getPathInfo(e,t);const l=[];const step=r=>new Promise(((s,o)=>{if(r===i.length)return t.all&&l.length?s(l):o(getNotFoundError(e));const a=i[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const h=n.join(u,e);const f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;s(subStep(f,r,0))}));const subStep=(e,r,i)=>new Promise(((n,u)=>{if(i===s.length)return n(step(r+1));const h=s[i];o(e+h,{pathExt:a},((s,o)=>{if(!s&&o){if(t.all)l.push(e+h);else return n(e+h)}return n(subStep(e,r,i+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:i,pathExtExe:s}=getPathInfo(e,t);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const h=/^".*"$/.test(u)?u.slice(1,-1):u;const f=n.join(h,e);const p=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let e=0;e<i.length;e++){const r=p+i[e];try{const e=o.sync(r,{pathExt:s});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},6390:(e,t,r)=>{const i=r(6928);const n=r(4469);const{promisify:s}=r(9023);const o=r(9896);const a=r(5648);const l=s(o.writeFile);const u=s(o.readFile);e.exports=async function copyTemplate({destination:e,templateDir:t,adjustContent:r}){const s=await a("**/*",{cwd:t});const o=s.map((async s=>{let o=await u(i.join(t,s),{encoding:"utf-8"});if(typeof r==="function"){o=r(o)}const a=s.replace("template-gitignore",".gitignore").replace("template-package-redux.json","package.json").replace("template-package.json","package.json");const h=i.join(e,a);await n(i.join(h,".."));await l(h,o)}));await Promise.all(o)}},7455:e=>{const t={page:"A complete page",pagemakerPlugin:"A pagemaker plugin"};const r={v4:"v4 (Javascript api)",v5:"v5 (React api (new))"};const i={Yes:"Yes",No:"No"};e.exports={ProjectTypes:t,ProjectVersions:r,YesOrNo:i}},7822:e=>{e.exports=function mapReplace(e,t){let r=e;for(const[e,i]of Object.entries(t)){r=r.replace(new RegExp(`\\{\\{ ${e} \\}\\}`,"g"),i)}return r}},14:e=>{e.exports=function toCapitalizedWords(e){var t=e.match(/[A-Za-z][a-z]*/g)||[];return t.map(capitalize).join(" ")};function capitalize(e){return e.charAt(0).toUpperCase()+e.substring(1)}},2613:e=>{"use strict";e.exports=require("assert")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},3339:e=>{"use strict";e.exports=require("module")},1421:e=>{"use strict";e.exports=require("node:child_process")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},3785:e=>{"use strict";e.exports=require("readline")},2203:e=>{"use strict";e.exports=require("stream")},2018:e=>{"use strict";e.exports=require("tty")},9023:e=>{"use strict";e.exports=require("util")},8909:(e,t,r)=>{const{Argument:i}=r(9154);const{Command:n}=r(4348);const{CommanderError:s,InvalidArgumentError:o}=r(1135);const{Help:a}=r(9754);const{Option:l}=r(5240);t.program=new n;t.createCommand=e=>new n(e);t.createOption=(e,t)=>new l(e,t);t.createArgument=(e,t)=>new i(e,t);t.Command=n;t.Option=l;t.Argument=i;t.Help=a;t.CommanderError=s;t.InvalidArgumentError=o;t.InvalidOptionArgumentError=o},9154:(e,t,r)=>{const{InvalidArgumentError:i}=r(1135);class Argument{constructor(e,t){this.description=t||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(e[0]){case"<":this.required=true;this._name=e.slice(1,-1);break;case"[":this.required=false;this._name=e.slice(1,-1);break;default:this.required=true;this._name=e;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(e){const t=e.name()+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}t.Argument=Argument;t.humanReadableArgName=humanReadableArgName},4348:(e,t,r)=>{const i=r(8474).EventEmitter;const n=r(1421);const s=r(6760);const o=r(3024);const a=r(1708);const{Argument:l,humanReadableArgName:u}=r(9154);const{CommanderError:h}=r(1135);const{Help:f}=r(9754);const{Option:p,DualOptions:d}=r(5240);const{suggestSimilar:m}=r(5030);class Command extends i{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=e||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={}}copyInheritedSettings(e){this._outputConfiguration=e._outputConfiguration;this._helpOption=e._helpOption;this._helpCommand=e._helpCommand;this._helpConfiguration=e._helpConfiguration;this._exitCallback=e._exitCallback;this._storeOptionsAsProperties=e._storeOptionsAsProperties;this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue;this._allowExcessArguments=e._allowExcessArguments;this._enablePositionalOptions=e._enablePositionalOptions;this._showHelpAfterError=e._showHelpAfterError;this._showSuggestionAfterError=e._showSuggestionAfterError;return this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent){e.push(t)}return e}command(e,t,r){let i=t;let n=r;if(typeof i==="object"&&i!==null){n=i;i=null}n=n||{};const[,s,o]=e.match(/([^ ]+) *(.*)/);const a=this.createCommand(s);if(i){a.description(i);a._executableHandler=true}if(n.isDefault)this._defaultCommandName=a._name;a._hidden=!!(n.noHelp||n.hidden);a._executableFile=n.executableFile||null;if(o)a.arguments(o);this._registerCommand(a);a.parent=this;a.copyInheritedSettings(this);if(i)return this;return a}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}showHelpAfterError(e=true){if(typeof e!=="string")e=!!e;this._showHelpAfterError=e;return this}showSuggestionAfterError(e=true){this._showSuggestionAfterError=!!e;return this}addCommand(e,t){if(!e._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this._registerCommand(e);e.parent=this;e._checkForBrokenPassThrough();return this}createArgument(e,t){return new l(e,t)}argument(e,t,r,i){const n=this.createArgument(e,t);if(typeof r==="function"){n.default(i).argParser(r)}else{n.default(r)}this.addArgument(n);return this}arguments(e){e.trim().split(/ +/).forEach((e=>{this.argument(e)}));return this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic){throw new Error(`only the last argument can be variadic '${t.name()}'`)}if(e.required&&e.defaultValue!==undefined&&e.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${e.name()}'`)}this.registeredArguments.push(e);return this}helpCommand(e,t){if(typeof e==="boolean"){this._addImplicitHelpCommand=e;return this}e=e??"help [command]";const[,r,i]=e.match(/([^ ]+) *(.*)/);const n=t??"display help for command";const s=this.createCommand(r);s.helpOption(false);if(i)s.arguments(i);if(n)s.description(n);this._addImplicitHelpCommand=true;this._helpCommand=s;return this}addHelpCommand(e,t){if(typeof e!=="object"){this.helpCommand(e,t);return this}this._addImplicitHelpCommand=true;this._helpCommand=e;return this}_getHelpCommand(){const e=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(e){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(e,t){const r=["preSubcommand","preAction","postAction"];if(!r.includes(e)){throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${r.join("', '")}'`)}if(this._lifeCycleHooks[e]){this._lifeCycleHooks[e].push(t)}else{this._lifeCycleHooks[e]=[t]}return this}exitOverride(e){if(e){this._exitCallback=e}else{this._exitCallback=e=>{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,r){if(this._exitCallback){this._exitCallback(new h(e,t,r))}a.exit(e)}action(e){const listener=t=>{const r=this.registeredArguments.length;const i=t.slice(0,r);if(this._storeOptionsAsProperties){i[r]=this}else{i[r]=this.opts()}i.push(this);return e.apply(this,i)};this._actionHandler=listener;return this}createOption(e,t){return new p(e,t)}_callParseArg(e,t,r,i){try{return e.parseArg(t,r)}catch(e){if(e.code==="commander.invalidArgument"){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const knownBy=e=>[e.name()].concat(e.aliases());const t=knownBy(e).find((e=>this._findCommand(e)));if(t){const r=knownBy(this._findCommand(t)).join("|");const i=knownBy(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name();const r=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");if(!this._findOption(t)){this.setOptionValueWithSource(r,e.defaultValue===undefined?true:e.defaultValue,"default")}}else if(e.defaultValue!==undefined){this.setOptionValueWithSource(r,e.defaultValue,"default")}const handleOptionValue=(t,i,n)=>{if(t==null&&e.presetArg!==undefined){t=e.presetArg}const s=this.getOptionValue(r);if(t!==null&&e.parseArg){t=this._callParseArg(e,t,s,i)}else if(t!==null&&e.variadic){t=e._concatValue(t,s)}if(t==null){if(e.negate){t=false}else if(e.isBoolean()||e.optional){t=true}else{t=""}}this.setOptionValueWithSource(r,t,n)};this.on("option:"+t,(t=>{const r=`error: option '${e.flags}' argument '${t}' is invalid.`;handleOptionValue(t,r,"cli")}));if(e.envVar){this.on("optionEnv:"+t,(t=>{const r=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;handleOptionValue(t,r,"env")}))}return this}_optionEx(e,t,r,i,n){if(typeof t==="object"&&t instanceof p){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const s=this.createOption(t,r);s.makeOptionMandatory(!!e.mandatory);if(typeof i==="function"){s.default(n).argParser(i)}else if(i instanceof RegExp){const e=i;i=(t,r)=>{const i=e.exec(t);return i?i[0]:r};s.default(n).argParser(i)}else{s.default(i)}return this.addOption(s)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:true},e,t,r,i)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(e=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!e;return this}getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,undefined)}setOptionValueWithSource(e,t,r){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}this._optionValueSources[e]=r;return this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;this._getCommandAndAncestors().forEach((r=>{if(r.getOptionValueSource(e)!==undefined){t=r.getOptionValueSource(e)}}));return t}_prepareUserArgs(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined&&t.from===undefined){if(a.versions?.electron){t.from="electron"}const e=a.execArgv??[];if(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print")){t.from="eval"}}if(e===undefined){e=a.argv}this.rawArgs=e.slice();let r;switch(t.from){case undefined:case"node":this._scriptPath=e[1];r=e.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=e[1];r=e.slice(2)}else{r=e.slice(1)}break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return r}parse(e,t){const r=this._prepareUserArgs(e,t);this._parseCommand([],r);return this}async parseAsync(e,t){const r=this._prepareUserArgs(e,t);await this._parseCommand([],r);return this}_executeSubCommand(e,t){t=t.slice();let r=false;const i=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(e,t){const r=s.resolve(e,t);if(o.existsSync(r))return r;if(i.includes(s.extname(t)))return undefined;const n=i.find((e=>o.existsSync(`${r}${e}`)));if(n)return`${r}${n}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let l=e._executableFile||`${this._name}-${e._name}`;let u=this._executableDir||"";if(this._scriptPath){let e;try{e=o.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}u=s.resolve(s.dirname(e),u)}if(u){let t=findFile(u,l);if(!t&&!e._executableFile&&this._scriptPath){const r=s.basename(this._scriptPath,s.extname(this._scriptPath));if(r!==this._name){t=findFile(u,`${r}-${e._name}`)}}l=t||l}r=i.includes(s.extname(l));let f;if(a.platform!=="win32"){if(r){t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=n.spawn(a.argv[0],t,{stdio:"inherit"})}else{f=n.spawn(l,t,{stdio:"inherit"})}}else{t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=n.spawn(a.execPath,t,{stdio:"inherit"})}if(!f.killed){const e=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];e.forEach((e=>{a.on(e,(()=>{if(f.killed===false&&f.exitCode===null){f.kill(e)}}))}))}const p=this._exitCallback;f.on("close",(e=>{e=e??1;if(!p){a.exit(e)}else{p(new h(e,"commander.executeSubCommandAsync","(close)"))}}));f.on("error",(t=>{if(t.code==="ENOENT"){const t=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const r=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(r)}else if(t.code==="EACCES"){throw new Error(`'${l}' not executable`)}if(!p){a.exit(1)}else{const e=new h(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;p(e)}}));this.runningCommand=f}_dispatchSubcommand(e,t,r){const i=this._findCommand(e);if(!i)this.help({error:true});let n;n=this._chainOrCallSubCommandHook(n,i,"preSubcommand");n=this._chainOrCall(n,(()=>{if(i._executableHandler){this._executeSubCommand(i,t.concat(r))}else{return i._parseCommand(t,r)}}));return n}_dispatchHelpCommand(e){if(!e){this.help()}const t=this._findCommand(e);if(t&&!t._executableHandler){t.help()}return this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{if(e.required&&this.args[t]==null){this.missingArgument(e.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(e,t,r)=>{let i=t;if(t!==null&&e.parseArg){const n=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,r,n)}return i};this._checkNumberOfArguments();const e=[];this.registeredArguments.forEach(((t,r)=>{let i=t.defaultValue;if(t.variadic){if(r<this.args.length){i=this.args.slice(r);if(t.parseArg){i=i.reduce(((e,r)=>myParseArg(t,r,e)),t.defaultValue)}}else if(i===undefined){i=[]}}else if(r<this.args.length){i=this.args[r];if(t.parseArg){i=myParseArg(t,i,t.defaultValue)}}e[r]=i}));this.processedArgs=e}_chainOrCall(e,t){if(e&&e.then&&typeof e.then==="function"){return e.then((()=>t()))}return t()}_chainOrCallHooks(e,t){let r=e;const i=[];this._getCommandAndAncestors().reverse().filter((e=>e._lifeCycleHooks[t]!==undefined)).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{i.push({hookedCommand:e,callback:t})}))}));if(t==="postAction"){i.reverse()}i.forEach((e=>{r=this._chainOrCall(r,(()=>e.callback(e.hookedCommand,this)))}));return r}_chainOrCallSubCommandHook(e,t,r){let i=e;if(this._lifeCycleHooks[r]!==undefined){this._lifeCycleHooks[r].forEach((e=>{i=this._chainOrCall(i,(()=>e(this,t)))}))}return i}_parseCommand(e,t){const r=this.parseOptions(t);this._parseOptionsEnv();this._parseOptionsImplied();e=e.concat(r.operands);t=r.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){return this._dispatchSubcommand(e[0],e.slice(1),t)}if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(e[1])}if(this._defaultCommandName){this._outputHelpIfRequested(t);return this._dispatchSubcommand(this._defaultCommandName,e,t)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(r.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(r.unknown.length>0){this.unknownOption(r.unknown[0])}};const i=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let r;r=this._chainOrCallHooks(r,"preAction");r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs)));if(this.parent){r=this._chainOrCall(r,(()=>{this.parent.emit(i,e,t)}))}r=this._chainOrCallHooks(r,"postAction");return r}if(this.parent&&this.parent.listenerCount(i)){checkForUnknownOptions();this._processArguments();this.parent.emit(i,e,t)}else if(e.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",e,t)}if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{if(t.mandatory&&e.getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();if(this.getOptionValue(t)===undefined){return false}return this.getOptionValueSource(t)!=="default"}));const t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const r=e.find((e=>t.conflictsWith.includes(e.attributeName())));if(r){this._conflictingOption(t,r)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[];const r=[];let i=t;const n=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let s=null;while(n.length){const e=n.shift();if(e==="--"){if(i===r)i.push(e);i.push(...n);break}if(s&&!maybeOption(e)){this.emit(`option:${s.name()}`,e);continue}s=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=n.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(n.length>0&&!maybeOption(n[0])){e=n.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}s=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);n.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){i=r}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(e)){t.push(e);if(n.length>0)r.push(...n);break}else if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e);if(n.length>0)t.push(...n);break}else if(this._defaultCommandName){r.push(e);if(n.length>0)r.push(...n);break}}if(this._passThroughOptions){i.push(e);if(n.length>0)i.push(...n);break}i.push(e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const r=t||{};const i=r.exitCode||1;const n=r.code||"commander.error";this._exit(i,n,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();if(this.getOptionValue(t)===undefined||["default","config","env"].includes(this.getOptionValueSource(t))){if(e.required||e.optional){this.emit(`optionEnv:${e.name()}`,a.env[e.envVar])}else{this.emit(`optionEnv:${e.name()}`)}}}}))}_parseOptionsImplied(){const e=new d(this.options);const hasCustomOptionValue=e=>this.getOptionValue(e)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((t=>t.implied!==undefined&&hasCustomOptionValue(t.attributeName())&&e.valueFromOption(this.getOptionValue(t.attributeName()),t))).forEach((e=>{Object.keys(e.implied).filter((e=>!hasCustomOptionValue(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const findBestOptionFromValue=e=>{const t=e.attributeName();const r=this.getOptionValue(t);const i=this.options.find((e=>e.negate&&t===e.attributeName()));const n=this.options.find((e=>!e.negate&&t===e.attributeName()));if(i&&(i.presetArg===undefined&&r===false||i.presetArg!==undefined&&r===i.presetArg)){return i}return n||e};const getErrorMessage=e=>{const t=findBestOptionFromValue(e);const r=t.attributeName();const i=this.getOptionValueSource(r);if(i==="env"){return`environment variable '${t.envVar}'`}return`option '${t.flags}'`};const r=`error: ${getErrorMessage(e)} cannot be used with ${getErrorMessage(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[];let i=this;do{const e=i.createHelp().visibleOptions(i).filter((e=>e.long)).map((e=>e.long));r=r.concat(e);i=i.parent}while(i&&!i._enablePositionalOptions);t=m(e,r)}const r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length;const r=t===1?"":"s";const i=this.parent?` for '${this.name()}'`:"";const n=`error: too many arguments${i}. Expected ${t} argument${r} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((e=>{r.push(e.name());if(e.alias())r.push(e.alias())}));t=m(e,r)}const r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===undefined)return this._version;this._version=e;t=t||"-V, --version";r=r||"output the version number";const i=this.createOption(t,r);this._versionOptionName=i.attributeName();this._registerOption(i);this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;if(t){this._argsDescription=t}return this}summary(e){if(e===undefined)return this._summary;this._summary=e;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");const r=this.parent?._findCommand(e);if(r){const t=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>u(e)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}nameFromFilename(e){this._name=s.basename(e,s.extname(e));return this}executableDir(e){if(e===undefined)return this._executableDir;this._executableDir=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let r;if(t.error){r=e=>this._outputConfiguration.writeErr(e)}else{r=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||r;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",r)));this.emit("beforeHelp",r);let i=this.helpInformation(r);if(t){i=t(i);if(typeof i!=="string"&&!Buffer.isBuffer(i)){throw new Error("outputHelp callback must return a string or a Buffer")}}r.write(i);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",r);this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",r)))}helpOption(e,t){if(typeof e==="boolean"){if(e){this._helpOption=this._helpOption??undefined}else{this._helpOption=null}return this}e=e??"-h, --help";t=t??"display help for command";this._helpOption=this.createOption(e,t);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(e){this._helpOption=e;return this}help(e){this.outputHelp(e);let t=a.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const r=["beforeAll","before","after","afterAll"];if(!r.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`)}const i=`${e}Help`;this.on(i,(e=>{let r;if(typeof t==="function"){r=t({error:e.error,command:e.command})}else{r=t}if(r){e.write(`${r}\n`)}}));return this}_outputHelpIfRequested(e){const t=this._getHelpOption();const r=t&&e.find((e=>t.is(e)));if(r){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let r="127.0.0.1";let i="9229";let n;if((n=e.match(/^(--inspect(-brk)?)$/))!==null){t=n[1]}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=n[1];if(/^\d+$/.test(n[3])){i=n[3]}else{r=n[3]}}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=n[1];r=n[3];i=n[4]}if(t&&i!=="0"){return`${t}=${r}:${parseInt(i)+1}`}return e}))}t.Command=Command},1135:(e,t)=>{class CommanderError extends Error{constructor(e,t,r){super(r);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}t.CommanderError=CommanderError;t.InvalidArgumentError=InvalidArgumentError},9754:(e,t,r)=>{const{humanReadableArgName:i}=r(9154);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));const r=e._getHelpCommand();if(r&&!r._hidden){t.push(r)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}compareOptions(e,t){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return getSortKey(e).localeCompare(getSortKey(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const r=e._getHelpOption();if(r&&!r.hidden){const i=r.short&&e._findOption(r.short);const n=r.long&&e._findOption(r.long);if(!i&&!n){t.push(r)}else if(r.long&&!n){t.push(e.createOption(r.long,r.description))}else if(r.short&&!i){t.push(e.createOption(r.short,r.description))}}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let r=e.parent;r;r=r.parent){const e=r.options.filter((e=>!e.hidden));t.push(...e)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleArguments(e){if(e._argsDescription){e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""}))}if(e.registeredArguments.find((e=>e.description))){return e.registeredArguments}return[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>i(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,r)=>Math.max(e,t.subcommandTerm(r).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,r)=>Math.max(e,t.argumentTerm(r).length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let r="";for(let t=e.parent;t;t=t.parent){r=t.name()+" "+r}return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){const r=e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==="boolean";if(r){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}}if(e.presetArg!==undefined&&e.optional){t.push(`preset: ${JSON.stringify(e.presetArg)}`)}if(e.envVar!==undefined){t.push(`env: ${e.envVar}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}argumentDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){const r=`(${t.join(", ")})`;if(e.description){return`${e.description} ${r}`}return r}return e.description}formatHelp(e,t){const r=t.padWidth(e,t);const i=t.helpWidth||80;const n=2;const s=2;function formatItem(e,o){if(o){const a=`${e.padEnd(r+s)}${o}`;return t.wrap(a,i-n,r+s)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(n))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([t.wrap(a,i,0),""])}const l=t.visibleArguments(e).map((e=>formatItem(t.argumentTerm(e),t.argumentDescription(e))));if(l.length>0){o=o.concat(["Arguments:",formatList(l),""])}const u=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(u.length>0){o=o.concat(["Options:",formatList(u),""])}if(this.showGlobalOptions){const r=t.visibleGlobalOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(r.length>0){o=o.concat(["Global Options:",formatList(r),""])}}const h=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(h.length>0){o=o.concat(["Commands:",formatList(h),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,i=40){const n=" \\f\\t\\v - \ufeff";const s=new RegExp(`[\\n][${n}]+`);if(e.match(s))return e;const o=t-r;if(o<i)return e;const a=e.slice(0,r);const l=e.slice(r).replace("\r\n","\n");const u=" ".repeat(r);const h="";const f=`\\s${h}`;const p=new RegExp(`\n|.{1,${o-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g");const d=l.match(p)||[];return a+d.map(((e,t)=>{if(e==="\n")return"";return(t>0?u:"")+e.trimEnd()})).join("\n")}}t.Help=Help},5240:(e,t,r)=>{const{InvalidArgumentError:i}=r(1135);class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const r=splitOptionFlags(e);this.short=r.shortFlag;this.long=r.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}preset(e){this.presetArg=e;return this}conflicts(e){this.conflictsWith=this.conflictsWith.concat(e);return this}implies(e){let t=e;if(typeof e==="string"){t={[e]:true}}this.implied=Object.assign(this.implied||{},t);return this}env(e){this.envVar=e;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(e){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;e.forEach((e=>{if(e.negate){this.negativeOptions.set(e.attributeName(),e)}else{this.positiveOptions.set(e.attributeName(),e)}}));this.negativeOptions.forEach(((e,t)=>{if(this.positiveOptions.has(t)){this.dualOptions.add(t)}}))}valueFromOption(e,t){const r=t.attributeName();if(!this.dualOptions.has(r))return true;const i=this.negativeOptions.get(r).presetArg;const n=i!==undefined?i:false;return t.negate===(n===e)}}function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function splitOptionFlags(e){let t;let r;const i=e.split(/[ |,]+/);if(i.length>1&&!/^[[<]/.test(i[1]))t=i.shift();r=i.shift();if(!t&&/^-[^-]$/.test(r)){t=r;r=undefined}return{shortFlag:t,longFlag:r}}t.Option=Option;t.DualOptions=DualOptions},5030:(e,t)=>{const r=3;function editDistance(e,t){if(Math.abs(e.length-t.length)>r)return Math.max(e.length,t.length);const i=[];for(let t=0;t<=e.length;t++){i[t]=[t]}for(let e=0;e<=t.length;e++){i[0][e]=e}for(let r=1;r<=t.length;r++){for(let n=1;n<=e.length;n++){let s=1;if(e[n-1]===t[r-1]){s=0}else{s=1}i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s);if(n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]){i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1)}}}return i[e.length][t.length]}function suggestSimilar(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));const i=e.startsWith("--");if(i){e=e.slice(2);t=t.map((e=>e.slice(2)))}let n=[];let s=r;const o=.4;t.forEach((t=>{if(t.length<=1)return;const r=editDistance(e,t);const i=Math.max(e.length,t.length);const a=(i-r)/i;if(a>o){if(r<s){s=r;n=[t]}else if(r===s){n.push(t)}}}));n.sort(((e,t)=>e.localeCompare(t)));if(i){n=n.map((e=>`--${e}`))}if(n.length>1){return`\n(Did you mean one of ${n.join(", ")}?)`}if(n.length===1){return`\n(Did you mean ${n[0]}?)`}return""}t.suggestSimilar=suggestSimilar},555:(e,t,r)=>{"use strict";r.r(t);r.d(t,{isNpm:()=>l,isNpmOrYarn:()=>h,isYarn:()=>u});var i=r(1708);const n=i.env.npm_package_json;const s=i.env.npm_config_user_agent;const o=Boolean(s&&s.startsWith("npm"));const a=Boolean(n&&n.endsWith("package.json"));const l=o||a;const u=Boolean(s&&s.startsWith("yarn"));const h=l||u},8629:e=>{"use strict";e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜 🤛 ","🤜 🤛 ","🤜 🤛 "," 🤜 🤛 "," 🤜🤛 "," 🤜✨🤛 ","🤜 ✨ 🤛 "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ "," "," "," "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"create-chayns-app","version":"1.1.21","private":false,"description":"Create a new chayns® development project in one command.","keywords":["chayns","react","chayns-toolkit","chayns-components","starter-kit"],"bugs":{"url":"https://github.com/TobitSoftware/create-chayns-app/issues","email":"leonhard.driesch@tobit.com"},"repository":{"type":"git","url":"https://github.com/TobitSoftware/create-chayns-app.git"},"license":"MIT","author":{"name":"Leonhard Driesch","email":"leonhard.driesch@tobit.com"},"main":"index.js","bin":{"create-chayns-app":"dist/index.js"},"scripts":{"build":"ncc build src/index.js -o dist -m","format":"prettier . --ignore-path .gitignore --write","prepublishOnly":"npm run build","start":"node src/index.js"},"devDependencies":{"@vercel/ncc":"^0.38.2","chalk":"4.1.2","commander":"12.1.0","enquirer":"^2.4.1","eslint":"^9.14.0","execa":"5.1.1","fast-glob":"^3.3.2","is-npm":"6.0.0","mkdirp":"1.0.4","ora":"5.4.1","prettier":"^3.3.3","prettier-plugin-packagejson":"^2.5.3","react-redux":"^9.1.2","validate-npm-package-name":"^6.0.0"},"publishConfig":{"access":"public"}}')}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var n=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};const{prompt:i}=__nccwpck_require__(9973);const n=__nccwpck_require__(7825);const s=__nccwpck_require__(465);const o=__nccwpck_require__(6390);const a=__nccwpck_require__(6928);const{isYarn:l}=__nccwpck_require__(555);const u=__nccwpck_require__(7822);const h=__nccwpck_require__(8204);const{Command:f}=__nccwpck_require__(8909);const p=__nccwpck_require__(8330);const{ProjectTypes:d,ProjectVersions:m,YesOrNo:g}=__nccwpck_require__(7455);const y=__nccwpck_require__(5696);const b=__nccwpck_require__(14);const{promisify:_}=__nccwpck_require__(9023);const v=__nccwpck_require__(9896);const w=_(v.writeFile);const S=_(v.readFile);const x=h.command;const E=new f;E.version(p.version).option("-G, --no-git","initialize the project without a git repository").option("-C, --no-initial-commit","don't perform an initial commit").option("-I, --no-install","don't install packages after initialization").option("-M, --module-federation","install to use as module (only internal)").option("-p, --package-manager <manager>","specify the package manager to use (`npm` or `yarn`). Defaults to the one used to execute the command.").action(createChaynsApp).parse(process.argv);async function createChaynsApp({git:e,initialCommit:t,install:r,packageManager:f,moduleFederation:p}){let _;let E;if(!p){({projectVersion:_}=await i({type:"select",name:"projectVersion",message:"What api version do you want to use?",choices:Object.values(m)}));({projectType:E}=await i({type:"select",name:"projectType",message:"What type of project do you want to create?",choices:Object.values(d)}))}let k=false;let A;while(!k){const{packageName:e}=await i([{type:"input",name:"packageName",message:"What should the name of your project be?",initial:"my-awesome-project"}]);const{validForNewPackages:t,errors:r=[],warnings:o=[]}=n(e);if(!t){console.log(`\n${s.hex("#31D1DF")(`\`${e}\``)} is unfortunately not a valid project name, because:`);for(const e of[...r,...o]){console.log(s.hex("#94A3B8")(` - ${e}`))}console.log("")}else{k=true;A=e}}const{summary:C}=await i({type:"input",message:"How would you summarize this project in a few words?",name:"summary"});function fillTemplates(e){return u(e,{"package-name":A,"readable-package-name":b(A),description:C,"install-command":P==="yarn"?"yarn":"npm install","run-command":P==="yarn"?"yarn":"npm run","package-name-underscore":A.replace("-","_")})}const R=a.resolve(A);const P=f||(l?"yarn":"npm");if(_===m.v4){console.log(`\n${s.bold.magentaBright("Awesome!")} Please wait a quick second while we bootstrap your project...\n`);switch(E){case d.page:await o({destination:R,templateDir:a.join(` ${__dirname} `.trim(),"../templates/page"),adjustContent:e=>u(fillTemplates(e),{"tapp-style":""})});break;case d.pagemakerPlugin:await o({destination:R,projectName:A,templateDir:a.join(` ${__dirname} `.trim(),"../templates/page"),adjustContent:e=>u(fillTemplates(e),{"tapp-style":' style="padding: 0 0 16px !important"'})});break}}else{const{chooseRedux:e}=await i({type:"select",name:"chooseRedux",message:"Do you want to add redux-toolkit?",choices:Object.values(g)});const{chooseTypescript:t}=await i({type:"select",name:"chooseTypescript",message:"Do you want to add typescript?",choices:Object.values(g)});const getTemplatePath=e=>a.join(` ${__dirname} `.trim(),e);const copyFile=async(e,t,r)=>{let i=await S(e,{encoding:"utf-8"});if(r){i=u(i,{"package-name":A,"readable-package-name":b(A),description:C,"install-command":P==="yarn"?"yarn":"npm install","run-command":P==="yarn"?"yarn":"npm run"})}await w(t,i)};const handleReplace=e=>u(fillTemplates(e),{"tapp-style":E===d.pagemakerPlugin?' style="padding: 0 0 16px !important"':""});if(e===g.Yes){const e=`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/src`;await o({destination:R+"/src",projectName:A,templateDir:a.join(` ${__dirname} `.trim(),e)});await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/.eslintrc`),a.join(R,".eslintrc"))}const r=`../templates/api-v5/page${t===g.Yes?"-ts":""}${p?"-module":""}${e===g.Yes?"-redux":""}`;await o({destination:R,projectName:A,templateDir:getTemplatePath(r),adjustContent:handleReplace});const n=a.join(R,"package.json");await copyFile(getTemplatePath(`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/template-package${e===g.Yes?"-redux":""}.json`),n,true);await copyFile(getTemplatePath(`../templates/shared/README.md`),a.join(R,"README.md"),true);await copyFile(getTemplatePath(`../templates/shared/template-gitignore`),a.join(R,".gitignore"),true);await copyFile(getTemplatePath(`../templates/api-v5/shared/.env`),a.join(R,".env"));await copyFile(getTemplatePath(`../templates/api-v5/shared/.env.development.local`),a.join(R,".env.development.local"));if(!v.existsSync(a.join(R,"/src/constants"))){v.mkdirSync(a.join(R,"/src/constants"))}await copyFile(getTemplatePath(`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/src/constants/server-urls.${t===g.Yes?"ts":"js"}`),a.join(R,`/src/constants/server-urls.${t===g.Yes?"ts":"js"}`));if(t===g.Yes){await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/tsconfig.json`),a.join(R,"tsconfig.json"));if(!v.existsSync(a.join(R,"/src/types"))){v.mkdirSync(a.join(R,"/src/types"))}await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/src/types/global.d.ts`),a.join(R,"/src/types/global.d.ts"))}const s=a.join(R,"toolkit.config.js");if(p){const e=`toolkit.config-module.js`;await copyFile(getTemplatePath(`../templates/api-v5/shared/${e}`),s)}else{await copyFile(getTemplatePath(`../templates/api-v5/shared/toolkit.config.js`),s)}}if(e){const e=y("Initializing Git repository").start();try{await x("git init",{cwd:R});e.succeed("Initialized a Git repository")}catch(t){throw t;e.fail(`Failed to initialize a Git repository. You can do this yourself by running ${s.cyanBright(`git init`)}.`)}}if(r){const e=y(`Installing packages using ${s.blueBright(P)}`).start();try{await x(`${P} install`,{cwd:R});e.succeed(`Installed packages with ${s.blueBright(P)}`)}catch{e.fail(`Failed to install packages with ${s.blueBright(P)}. You can do this yourself by running ${s.cyanBright(`${P} install`)}.`)}}if(e&&t){const e=y("Performing an initial commit").start();try{await x("git add .",{cwd:R});await h("git",["commit","-m",":tada: Initial commit"],{cwd:R});e.succeed("Perfomed an initial commit")}catch(t){console.error(t);e.fail("Failed to perform an initial commit.")}}console.log(`\n${s.bold.greenBright("Congrats!")} Your new project is ready to go!`);const O=P==="yarn"?"yarn dev":"npm run dev";console.log(`Open the created ${s.yellowBright(`./${A}/`)} folder in your favorite editor and start ${s.cyanBright("`"+O+"`")}.\n`)}module.exports=r})();
|
|
40
|
+
*/const i=r(3102);const toRegexRange=(e,t,r)=>{if(i(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(i(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let n={relaxZeros:true,...r};if(typeof n.strictZeros==="boolean"){n.relaxZeros=n.strictZeros===false}let s=String(n.relaxZeros);let o=String(n.shorthand);let a=String(n.capture);let l=String(n.wrap);let u=e+":"+t+"="+s+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let h=Math.min(e,t);let f=Math.max(e,t);if(Math.abs(h-f)===1){let r=e+"|"+t;if(n.capture){return`(${r})`}if(n.wrap===false){return r}return`(?:${r})`}let p=hasPadding(e)||hasPadding(t);let d={min:e,max:t,a:h,b:f};let m=[];let g=[];if(p){d.isPadded=p;d.maxLen=String(d.max).length}if(h<0){let e=f<0?Math.abs(f):1;g=splitToPatterns(e,Math.abs(h),d,n);h=d.a=0}if(f>=0){m=splitToPatterns(h,f,d,n)}d.negatives=g;d.positives=m;d.result=collatePatterns(g,m,n);if(n.capture===true){d.result=`(${d.result})`}else if(n.wrap!==false&&m.length+g.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[u]=d;return d.result};function collatePatterns(e,t,r){let i=filterPatterns(e,t,"-",false,r)||[];let n=filterPatterns(t,e,"",false,r)||[];let s=filterPatterns(e,t,"-?",true,r)||[];let o=i.concat(s).concat(n);return o.join("|")}function splitToRanges(e,t){let r=1;let i=1;let n=countNines(e,r);let s=new Set([t]);while(e<=n&&n<=t){s.add(n);r+=1;n=countNines(e,r)}n=countZeros(t+1,i)-1;while(e<n&&n<=t){s.add(n);i+=1;n=countZeros(t+1,i)-1}s=[...s];s.sort(compare);return s}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let i=zip(e,t);let n=i.length;let s="";let o=0;for(let e=0;e<n;e++){let[t,n]=i[e];if(t===n){s+=t}else if(t!=="0"||n!=="9"){s+=toCharacterClass(t,n,r)}else{o++}}if(o){s+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:s,count:[o],digits:n}}function splitToPatterns(e,t,r,i){let n=splitToRanges(e,t);let s=[];let o=e;let a;for(let e=0;e<n.length;e++){let t=n[e];let l=rangeToPattern(String(o),String(t),i);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){u=padZeros(t,r,i)}l.string=u+l.pattern+toQuantifier(l.count);s.push(l);o=t+1;a=l}return s}function filterPatterns(e,t,r,i,n){let s=[];for(let n of e){let{string:e}=n;if(!i&&!contains(t,"string",e)){s.push(r+e)}if(i&&contains(t,"string",e)){s.push(r+e)}}return s}function zip(e,t){let r=[];for(let i=0;i<e.length;i++)r.push([e[i],t[i]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let i=Math.abs(t.maxLen-String(e).length);let n=r.relaxZeros!==false;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${i}}`:`0{${i}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},4488:(e,t,r)=>{e.exports=r(9023).deprecate},7825:(e,t,r)=>{"use strict";const{builtinModules:i}=r(3339);var n=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var s=["node_modules","favicon.ico"];function validate(e){var t=[];var r=[];if(e===null){r.push("name cannot be null");return done(t,r)}if(e===undefined){r.push("name cannot be undefined");return done(t,r)}if(typeof e!=="string"){r.push("name must be a string");return done(t,r)}if(!e.length){r.push("name length must be greater than zero")}if(e.match(/^\./)){r.push("name cannot start with a period")}if(e.match(/^_/)){r.push("name cannot start with an underscore")}if(e.trim()!==e){r.push("name cannot contain leading or trailing spaces")}s.forEach((function(t){if(e.toLowerCase()===t){r.push(t+" is a blacklisted name")}}));if(i.includes(e.toLowerCase())){t.push(e+" is a core module name")}if(e.length>214){t.push("name can no longer contain more than 214 characters")}if(e.toLowerCase()!==e){t.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(e.split("/").slice(-1)[0])){t.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(e)!==e){var o=e.match(n);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(t,r)}}r.push("name can only contain URL-friendly characters")}return done(t,r)}var done=function(e,t){var r={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};if(!r.warnings.length){delete r.warnings}if(!r.errors.length){delete r.errors}return r};e.exports=validate},9792:e=>{e.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]},7390:(e,t,r)=>{"use strict";var i=r(7730);var n=r(9792);var s={nul:0,control:0};e.exports=function wcwidth(e){return wcswidth(e,s)};e.exports.config=function(e){e=i(e||{},s);return function wcwidth(t){return wcswidth(t,e)}};function wcswidth(e,t){if(typeof e!=="string")return wcwidth(e,t);var r=0;for(var i=0;i<e.length;i++){var n=wcwidth(e.charCodeAt(i),t);if(n<0)return-1;r+=n}return r}function wcwidth(e,t){if(e===0)return t.nul;if(e<32||e>=127&&e<160)return t.control;if(bisearch(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function bisearch(e){var t=0;var r=n.length-1;var i;if(e<n[0][0]||e>n[r][1])return false;while(r>=t){i=Math.floor((t+r)/2);if(e>n[i][1])t=i+1;else if(e<n[i][0])r=i-1;else return true}return false}},6848:(e,t,r)=>{const i=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const n=r(6928);const s=i?";":":";const o=r(2940);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||s;const n=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=i?o.split(r):[""];if(i){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:n,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:i,pathExt:s,pathExtExe:a}=getPathInfo(e,t);const l=[];const step=r=>new Promise(((s,o)=>{if(r===i.length)return t.all&&l.length?s(l):o(getNotFoundError(e));const a=i[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const h=n.join(u,e);const f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;s(subStep(f,r,0))}));const subStep=(e,r,i)=>new Promise(((n,u)=>{if(i===s.length)return n(step(r+1));const h=s[i];o(e+h,{pathExt:a},((s,o)=>{if(!s&&o){if(t.all)l.push(e+h);else return n(e+h)}return n(subStep(e,r,i+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:i,pathExtExe:s}=getPathInfo(e,t);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const h=/^".*"$/.test(u)?u.slice(1,-1):u;const f=n.join(h,e);const p=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let e=0;e<i.length;e++){const r=p+i[e];try{const e=o.sync(r,{pathExt:s});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},6390:(e,t,r)=>{const i=r(6928);const n=r(4469);const{promisify:s}=r(9023);const o=r(9896);const a=r(5648);const l=s(o.writeFile);const u=s(o.readFile);e.exports=async function copyTemplate({destination:e,templateDir:t,adjustContent:r}){const s=await a("**/*",{cwd:t});const o=s.map((async s=>{let o=await u(i.join(t,s),{encoding:"utf-8"});if(typeof r==="function"){o=r(o)}const a=s.replace("template-gitignore",".gitignore").replace("template-package-redux.json","package.json").replace("template-package.json","package.json");const h=i.join(e,a);await n(i.join(h,".."));await l(h,o)}));await Promise.all(o)}},7455:e=>{const t={page:"A complete page",pagemakerPlugin:"A pagemaker plugin"};const r={v4:"v4 (Javascript api)",v5:"v5 (React api (new))"};const i={Yes:"Yes",No:"No"};e.exports={ProjectTypes:t,ProjectVersions:r,YesOrNo:i}},7822:e=>{e.exports=function mapReplace(e,t){let r=e;for(const[e,i]of Object.entries(t)){r=r.replace(new RegExp(`\\{\\{ ${e} \\}\\}`,"g"),i)}return r}},14:e=>{e.exports=function toCapitalizedWords(e){var t=e.match(/[A-Za-z][a-z]*/g)||[];return t.map(capitalize).join(" ")};function capitalize(e){return e.charAt(0).toUpperCase()+e.substring(1)}},2613:e=>{"use strict";e.exports=require("assert")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},3339:e=>{"use strict";e.exports=require("module")},1421:e=>{"use strict";e.exports=require("node:child_process")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},3785:e=>{"use strict";e.exports=require("readline")},2203:e=>{"use strict";e.exports=require("stream")},2018:e=>{"use strict";e.exports=require("tty")},9023:e=>{"use strict";e.exports=require("util")},8909:(e,t,r)=>{const{Argument:i}=r(9154);const{Command:n}=r(4348);const{CommanderError:s,InvalidArgumentError:o}=r(1135);const{Help:a}=r(9754);const{Option:l}=r(5240);t.program=new n;t.createCommand=e=>new n(e);t.createOption=(e,t)=>new l(e,t);t.createArgument=(e,t)=>new i(e,t);t.Command=n;t.Option=l;t.Argument=i;t.Help=a;t.CommanderError=s;t.InvalidArgumentError=o;t.InvalidOptionArgumentError=o},9154:(e,t,r)=>{const{InvalidArgumentError:i}=r(1135);class Argument{constructor(e,t){this.description=t||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(e[0]){case"<":this.required=true;this._name=e.slice(1,-1);break;case"[":this.required=false;this._name=e.slice(1,-1);break;default:this.required=true;this._name=e;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(e){const t=e.name()+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}t.Argument=Argument;t.humanReadableArgName=humanReadableArgName},4348:(e,t,r)=>{const i=r(8474).EventEmitter;const n=r(1421);const s=r(6760);const o=r(3024);const a=r(1708);const{Argument:l,humanReadableArgName:u}=r(9154);const{CommanderError:h}=r(1135);const{Help:f}=r(9754);const{Option:p,DualOptions:d}=r(5240);const{suggestSimilar:m}=r(5030);class Command extends i{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=e||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={}}copyInheritedSettings(e){this._outputConfiguration=e._outputConfiguration;this._helpOption=e._helpOption;this._helpCommand=e._helpCommand;this._helpConfiguration=e._helpConfiguration;this._exitCallback=e._exitCallback;this._storeOptionsAsProperties=e._storeOptionsAsProperties;this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue;this._allowExcessArguments=e._allowExcessArguments;this._enablePositionalOptions=e._enablePositionalOptions;this._showHelpAfterError=e._showHelpAfterError;this._showSuggestionAfterError=e._showSuggestionAfterError;return this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent){e.push(t)}return e}command(e,t,r){let i=t;let n=r;if(typeof i==="object"&&i!==null){n=i;i=null}n=n||{};const[,s,o]=e.match(/([^ ]+) *(.*)/);const a=this.createCommand(s);if(i){a.description(i);a._executableHandler=true}if(n.isDefault)this._defaultCommandName=a._name;a._hidden=!!(n.noHelp||n.hidden);a._executableFile=n.executableFile||null;if(o)a.arguments(o);this._registerCommand(a);a.parent=this;a.copyInheritedSettings(this);if(i)return this;return a}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}showHelpAfterError(e=true){if(typeof e!=="string")e=!!e;this._showHelpAfterError=e;return this}showSuggestionAfterError(e=true){this._showSuggestionAfterError=!!e;return this}addCommand(e,t){if(!e._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this._registerCommand(e);e.parent=this;e._checkForBrokenPassThrough();return this}createArgument(e,t){return new l(e,t)}argument(e,t,r,i){const n=this.createArgument(e,t);if(typeof r==="function"){n.default(i).argParser(r)}else{n.default(r)}this.addArgument(n);return this}arguments(e){e.trim().split(/ +/).forEach((e=>{this.argument(e)}));return this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic){throw new Error(`only the last argument can be variadic '${t.name()}'`)}if(e.required&&e.defaultValue!==undefined&&e.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${e.name()}'`)}this.registeredArguments.push(e);return this}helpCommand(e,t){if(typeof e==="boolean"){this._addImplicitHelpCommand=e;return this}e=e??"help [command]";const[,r,i]=e.match(/([^ ]+) *(.*)/);const n=t??"display help for command";const s=this.createCommand(r);s.helpOption(false);if(i)s.arguments(i);if(n)s.description(n);this._addImplicitHelpCommand=true;this._helpCommand=s;return this}addHelpCommand(e,t){if(typeof e!=="object"){this.helpCommand(e,t);return this}this._addImplicitHelpCommand=true;this._helpCommand=e;return this}_getHelpCommand(){const e=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(e){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(e,t){const r=["preSubcommand","preAction","postAction"];if(!r.includes(e)){throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${r.join("', '")}'`)}if(this._lifeCycleHooks[e]){this._lifeCycleHooks[e].push(t)}else{this._lifeCycleHooks[e]=[t]}return this}exitOverride(e){if(e){this._exitCallback=e}else{this._exitCallback=e=>{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,r){if(this._exitCallback){this._exitCallback(new h(e,t,r))}a.exit(e)}action(e){const listener=t=>{const r=this.registeredArguments.length;const i=t.slice(0,r);if(this._storeOptionsAsProperties){i[r]=this}else{i[r]=this.opts()}i.push(this);return e.apply(this,i)};this._actionHandler=listener;return this}createOption(e,t){return new p(e,t)}_callParseArg(e,t,r,i){try{return e.parseArg(t,r)}catch(e){if(e.code==="commander.invalidArgument"){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const knownBy=e=>[e.name()].concat(e.aliases());const t=knownBy(e).find((e=>this._findCommand(e)));if(t){const r=knownBy(this._findCommand(t)).join("|");const i=knownBy(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name();const r=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");if(!this._findOption(t)){this.setOptionValueWithSource(r,e.defaultValue===undefined?true:e.defaultValue,"default")}}else if(e.defaultValue!==undefined){this.setOptionValueWithSource(r,e.defaultValue,"default")}const handleOptionValue=(t,i,n)=>{if(t==null&&e.presetArg!==undefined){t=e.presetArg}const s=this.getOptionValue(r);if(t!==null&&e.parseArg){t=this._callParseArg(e,t,s,i)}else if(t!==null&&e.variadic){t=e._concatValue(t,s)}if(t==null){if(e.negate){t=false}else if(e.isBoolean()||e.optional){t=true}else{t=""}}this.setOptionValueWithSource(r,t,n)};this.on("option:"+t,(t=>{const r=`error: option '${e.flags}' argument '${t}' is invalid.`;handleOptionValue(t,r,"cli")}));if(e.envVar){this.on("optionEnv:"+t,(t=>{const r=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;handleOptionValue(t,r,"env")}))}return this}_optionEx(e,t,r,i,n){if(typeof t==="object"&&t instanceof p){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const s=this.createOption(t,r);s.makeOptionMandatory(!!e.mandatory);if(typeof i==="function"){s.default(n).argParser(i)}else if(i instanceof RegExp){const e=i;i=(t,r)=>{const i=e.exec(t);return i?i[0]:r};s.default(n).argParser(i)}else{s.default(i)}return this.addOption(s)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:true},e,t,r,i)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(e=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!e;return this}getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,undefined)}setOptionValueWithSource(e,t,r){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}this._optionValueSources[e]=r;return this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;this._getCommandAndAncestors().forEach((r=>{if(r.getOptionValueSource(e)!==undefined){t=r.getOptionValueSource(e)}}));return t}_prepareUserArgs(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined&&t.from===undefined){if(a.versions?.electron){t.from="electron"}const e=a.execArgv??[];if(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print")){t.from="eval"}}if(e===undefined){e=a.argv}this.rawArgs=e.slice();let r;switch(t.from){case undefined:case"node":this._scriptPath=e[1];r=e.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=e[1];r=e.slice(2)}else{r=e.slice(1)}break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return r}parse(e,t){const r=this._prepareUserArgs(e,t);this._parseCommand([],r);return this}async parseAsync(e,t){const r=this._prepareUserArgs(e,t);await this._parseCommand([],r);return this}_executeSubCommand(e,t){t=t.slice();let r=false;const i=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(e,t){const r=s.resolve(e,t);if(o.existsSync(r))return r;if(i.includes(s.extname(t)))return undefined;const n=i.find((e=>o.existsSync(`${r}${e}`)));if(n)return`${r}${n}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let l=e._executableFile||`${this._name}-${e._name}`;let u=this._executableDir||"";if(this._scriptPath){let e;try{e=o.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}u=s.resolve(s.dirname(e),u)}if(u){let t=findFile(u,l);if(!t&&!e._executableFile&&this._scriptPath){const r=s.basename(this._scriptPath,s.extname(this._scriptPath));if(r!==this._name){t=findFile(u,`${r}-${e._name}`)}}l=t||l}r=i.includes(s.extname(l));let f;if(a.platform!=="win32"){if(r){t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=n.spawn(a.argv[0],t,{stdio:"inherit"})}else{f=n.spawn(l,t,{stdio:"inherit"})}}else{t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=n.spawn(a.execPath,t,{stdio:"inherit"})}if(!f.killed){const e=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];e.forEach((e=>{a.on(e,(()=>{if(f.killed===false&&f.exitCode===null){f.kill(e)}}))}))}const p=this._exitCallback;f.on("close",(e=>{e=e??1;if(!p){a.exit(e)}else{p(new h(e,"commander.executeSubCommandAsync","(close)"))}}));f.on("error",(t=>{if(t.code==="ENOENT"){const t=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const r=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(r)}else if(t.code==="EACCES"){throw new Error(`'${l}' not executable`)}if(!p){a.exit(1)}else{const e=new h(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;p(e)}}));this.runningCommand=f}_dispatchSubcommand(e,t,r){const i=this._findCommand(e);if(!i)this.help({error:true});let n;n=this._chainOrCallSubCommandHook(n,i,"preSubcommand");n=this._chainOrCall(n,(()=>{if(i._executableHandler){this._executeSubCommand(i,t.concat(r))}else{return i._parseCommand(t,r)}}));return n}_dispatchHelpCommand(e){if(!e){this.help()}const t=this._findCommand(e);if(t&&!t._executableHandler){t.help()}return this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{if(e.required&&this.args[t]==null){this.missingArgument(e.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(e,t,r)=>{let i=t;if(t!==null&&e.parseArg){const n=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,r,n)}return i};this._checkNumberOfArguments();const e=[];this.registeredArguments.forEach(((t,r)=>{let i=t.defaultValue;if(t.variadic){if(r<this.args.length){i=this.args.slice(r);if(t.parseArg){i=i.reduce(((e,r)=>myParseArg(t,r,e)),t.defaultValue)}}else if(i===undefined){i=[]}}else if(r<this.args.length){i=this.args[r];if(t.parseArg){i=myParseArg(t,i,t.defaultValue)}}e[r]=i}));this.processedArgs=e}_chainOrCall(e,t){if(e&&e.then&&typeof e.then==="function"){return e.then((()=>t()))}return t()}_chainOrCallHooks(e,t){let r=e;const i=[];this._getCommandAndAncestors().reverse().filter((e=>e._lifeCycleHooks[t]!==undefined)).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{i.push({hookedCommand:e,callback:t})}))}));if(t==="postAction"){i.reverse()}i.forEach((e=>{r=this._chainOrCall(r,(()=>e.callback(e.hookedCommand,this)))}));return r}_chainOrCallSubCommandHook(e,t,r){let i=e;if(this._lifeCycleHooks[r]!==undefined){this._lifeCycleHooks[r].forEach((e=>{i=this._chainOrCall(i,(()=>e(this,t)))}))}return i}_parseCommand(e,t){const r=this.parseOptions(t);this._parseOptionsEnv();this._parseOptionsImplied();e=e.concat(r.operands);t=r.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){return this._dispatchSubcommand(e[0],e.slice(1),t)}if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(e[1])}if(this._defaultCommandName){this._outputHelpIfRequested(t);return this._dispatchSubcommand(this._defaultCommandName,e,t)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(r.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(r.unknown.length>0){this.unknownOption(r.unknown[0])}};const i=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let r;r=this._chainOrCallHooks(r,"preAction");r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs)));if(this.parent){r=this._chainOrCall(r,(()=>{this.parent.emit(i,e,t)}))}r=this._chainOrCallHooks(r,"postAction");return r}if(this.parent&&this.parent.listenerCount(i)){checkForUnknownOptions();this._processArguments();this.parent.emit(i,e,t)}else if(e.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",e,t)}if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{if(t.mandatory&&e.getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();if(this.getOptionValue(t)===undefined){return false}return this.getOptionValueSource(t)!=="default"}));const t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const r=e.find((e=>t.conflictsWith.includes(e.attributeName())));if(r){this._conflictingOption(t,r)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[];const r=[];let i=t;const n=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let s=null;while(n.length){const e=n.shift();if(e==="--"){if(i===r)i.push(e);i.push(...n);break}if(s&&!maybeOption(e)){this.emit(`option:${s.name()}`,e);continue}s=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=n.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(n.length>0&&!maybeOption(n[0])){e=n.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}s=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);n.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){i=r}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(e)){t.push(e);if(n.length>0)r.push(...n);break}else if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e);if(n.length>0)t.push(...n);break}else if(this._defaultCommandName){r.push(e);if(n.length>0)r.push(...n);break}}if(this._passThroughOptions){i.push(e);if(n.length>0)i.push(...n);break}i.push(e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const r=t||{};const i=r.exitCode||1;const n=r.code||"commander.error";this._exit(i,n,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();if(this.getOptionValue(t)===undefined||["default","config","env"].includes(this.getOptionValueSource(t))){if(e.required||e.optional){this.emit(`optionEnv:${e.name()}`,a.env[e.envVar])}else{this.emit(`optionEnv:${e.name()}`)}}}}))}_parseOptionsImplied(){const e=new d(this.options);const hasCustomOptionValue=e=>this.getOptionValue(e)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((t=>t.implied!==undefined&&hasCustomOptionValue(t.attributeName())&&e.valueFromOption(this.getOptionValue(t.attributeName()),t))).forEach((e=>{Object.keys(e.implied).filter((e=>!hasCustomOptionValue(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const findBestOptionFromValue=e=>{const t=e.attributeName();const r=this.getOptionValue(t);const i=this.options.find((e=>e.negate&&t===e.attributeName()));const n=this.options.find((e=>!e.negate&&t===e.attributeName()));if(i&&(i.presetArg===undefined&&r===false||i.presetArg!==undefined&&r===i.presetArg)){return i}return n||e};const getErrorMessage=e=>{const t=findBestOptionFromValue(e);const r=t.attributeName();const i=this.getOptionValueSource(r);if(i==="env"){return`environment variable '${t.envVar}'`}return`option '${t.flags}'`};const r=`error: ${getErrorMessage(e)} cannot be used with ${getErrorMessage(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[];let i=this;do{const e=i.createHelp().visibleOptions(i).filter((e=>e.long)).map((e=>e.long));r=r.concat(e);i=i.parent}while(i&&!i._enablePositionalOptions);t=m(e,r)}const r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length;const r=t===1?"":"s";const i=this.parent?` for '${this.name()}'`:"";const n=`error: too many arguments${i}. Expected ${t} argument${r} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((e=>{r.push(e.name());if(e.alias())r.push(e.alias())}));t=m(e,r)}const r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===undefined)return this._version;this._version=e;t=t||"-V, --version";r=r||"output the version number";const i=this.createOption(t,r);this._versionOptionName=i.attributeName();this._registerOption(i);this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;if(t){this._argsDescription=t}return this}summary(e){if(e===undefined)return this._summary;this._summary=e;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");const r=this.parent?._findCommand(e);if(r){const t=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>u(e)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}nameFromFilename(e){this._name=s.basename(e,s.extname(e));return this}executableDir(e){if(e===undefined)return this._executableDir;this._executableDir=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let r;if(t.error){r=e=>this._outputConfiguration.writeErr(e)}else{r=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||r;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",r)));this.emit("beforeHelp",r);let i=this.helpInformation(r);if(t){i=t(i);if(typeof i!=="string"&&!Buffer.isBuffer(i)){throw new Error("outputHelp callback must return a string or a Buffer")}}r.write(i);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",r);this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",r)))}helpOption(e,t){if(typeof e==="boolean"){if(e){this._helpOption=this._helpOption??undefined}else{this._helpOption=null}return this}e=e??"-h, --help";t=t??"display help for command";this._helpOption=this.createOption(e,t);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(e){this._helpOption=e;return this}help(e){this.outputHelp(e);let t=a.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const r=["beforeAll","before","after","afterAll"];if(!r.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`)}const i=`${e}Help`;this.on(i,(e=>{let r;if(typeof t==="function"){r=t({error:e.error,command:e.command})}else{r=t}if(r){e.write(`${r}\n`)}}));return this}_outputHelpIfRequested(e){const t=this._getHelpOption();const r=t&&e.find((e=>t.is(e)));if(r){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let r="127.0.0.1";let i="9229";let n;if((n=e.match(/^(--inspect(-brk)?)$/))!==null){t=n[1]}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=n[1];if(/^\d+$/.test(n[3])){i=n[3]}else{r=n[3]}}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=n[1];r=n[3];i=n[4]}if(t&&i!=="0"){return`${t}=${r}:${parseInt(i)+1}`}return e}))}t.Command=Command},1135:(e,t)=>{class CommanderError extends Error{constructor(e,t,r){super(r);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}t.CommanderError=CommanderError;t.InvalidArgumentError=InvalidArgumentError},9754:(e,t,r)=>{const{humanReadableArgName:i}=r(9154);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));const r=e._getHelpCommand();if(r&&!r._hidden){t.push(r)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}compareOptions(e,t){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return getSortKey(e).localeCompare(getSortKey(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const r=e._getHelpOption();if(r&&!r.hidden){const i=r.short&&e._findOption(r.short);const n=r.long&&e._findOption(r.long);if(!i&&!n){t.push(r)}else if(r.long&&!n){t.push(e.createOption(r.long,r.description))}else if(r.short&&!i){t.push(e.createOption(r.short,r.description))}}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let r=e.parent;r;r=r.parent){const e=r.options.filter((e=>!e.hidden));t.push(...e)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleArguments(e){if(e._argsDescription){e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""}))}if(e.registeredArguments.find((e=>e.description))){return e.registeredArguments}return[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>i(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,r)=>Math.max(e,t.subcommandTerm(r).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,r)=>Math.max(e,t.argumentTerm(r).length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let r="";for(let t=e.parent;t;t=t.parent){r=t.name()+" "+r}return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){const r=e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==="boolean";if(r){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}}if(e.presetArg!==undefined&&e.optional){t.push(`preset: ${JSON.stringify(e.presetArg)}`)}if(e.envVar!==undefined){t.push(`env: ${e.envVar}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}argumentDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){const r=`(${t.join(", ")})`;if(e.description){return`${e.description} ${r}`}return r}return e.description}formatHelp(e,t){const r=t.padWidth(e,t);const i=t.helpWidth||80;const n=2;const s=2;function formatItem(e,o){if(o){const a=`${e.padEnd(r+s)}${o}`;return t.wrap(a,i-n,r+s)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(n))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([t.wrap(a,i,0),""])}const l=t.visibleArguments(e).map((e=>formatItem(t.argumentTerm(e),t.argumentDescription(e))));if(l.length>0){o=o.concat(["Arguments:",formatList(l),""])}const u=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(u.length>0){o=o.concat(["Options:",formatList(u),""])}if(this.showGlobalOptions){const r=t.visibleGlobalOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(r.length>0){o=o.concat(["Global Options:",formatList(r),""])}}const h=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(h.length>0){o=o.concat(["Commands:",formatList(h),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,i=40){const n=" \\f\\t\\v - \ufeff";const s=new RegExp(`[\\n][${n}]+`);if(e.match(s))return e;const o=t-r;if(o<i)return e;const a=e.slice(0,r);const l=e.slice(r).replace("\r\n","\n");const u=" ".repeat(r);const h="";const f=`\\s${h}`;const p=new RegExp(`\n|.{1,${o-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g");const d=l.match(p)||[];return a+d.map(((e,t)=>{if(e==="\n")return"";return(t>0?u:"")+e.trimEnd()})).join("\n")}}t.Help=Help},5240:(e,t,r)=>{const{InvalidArgumentError:i}=r(1135);class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const r=splitOptionFlags(e);this.short=r.shortFlag;this.long=r.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}preset(e){this.presetArg=e;return this}conflicts(e){this.conflictsWith=this.conflictsWith.concat(e);return this}implies(e){let t=e;if(typeof e==="string"){t={[e]:true}}this.implied=Object.assign(this.implied||{},t);return this}env(e){this.envVar=e;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(e){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;e.forEach((e=>{if(e.negate){this.negativeOptions.set(e.attributeName(),e)}else{this.positiveOptions.set(e.attributeName(),e)}}));this.negativeOptions.forEach(((e,t)=>{if(this.positiveOptions.has(t)){this.dualOptions.add(t)}}))}valueFromOption(e,t){const r=t.attributeName();if(!this.dualOptions.has(r))return true;const i=this.negativeOptions.get(r).presetArg;const n=i!==undefined?i:false;return t.negate===(n===e)}}function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function splitOptionFlags(e){let t;let r;const i=e.split(/[ |,]+/);if(i.length>1&&!/^[[<]/.test(i[1]))t=i.shift();r=i.shift();if(!t&&/^-[^-]$/.test(r)){t=r;r=undefined}return{shortFlag:t,longFlag:r}}t.Option=Option;t.DualOptions=DualOptions},5030:(e,t)=>{const r=3;function editDistance(e,t){if(Math.abs(e.length-t.length)>r)return Math.max(e.length,t.length);const i=[];for(let t=0;t<=e.length;t++){i[t]=[t]}for(let e=0;e<=t.length;e++){i[0][e]=e}for(let r=1;r<=t.length;r++){for(let n=1;n<=e.length;n++){let s=1;if(e[n-1]===t[r-1]){s=0}else{s=1}i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s);if(n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]){i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1)}}}return i[e.length][t.length]}function suggestSimilar(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));const i=e.startsWith("--");if(i){e=e.slice(2);t=t.map((e=>e.slice(2)))}let n=[];let s=r;const o=.4;t.forEach((t=>{if(t.length<=1)return;const r=editDistance(e,t);const i=Math.max(e.length,t.length);const a=(i-r)/i;if(a>o){if(r<s){s=r;n=[t]}else if(r===s){n.push(t)}}}));n.sort(((e,t)=>e.localeCompare(t)));if(i){n=n.map((e=>`--${e}`))}if(n.length>1){return`\n(Did you mean one of ${n.join(", ")}?)`}if(n.length===1){return`\n(Did you mean ${n[0]}?)`}return""}t.suggestSimilar=suggestSimilar},555:(e,t,r)=>{"use strict";r.r(t);r.d(t,{isNpm:()=>l,isNpmOrYarn:()=>h,isYarn:()=>u});var i=r(1708);const n=i.env.npm_package_json;const s=i.env.npm_config_user_agent;const o=Boolean(s&&s.startsWith("npm"));const a=Boolean(n&&n.endsWith("package.json"));const l=o||a;const u=Boolean(s&&s.startsWith("yarn"));const h=l||u},8629:e=>{"use strict";e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜 🤛 ","🤜 🤛 ","🤜 🤛 "," 🤜 🤛 "," 🤜🤛 "," 🤜✨🤛 ","🤜 ✨ 🤛 "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ "," "," "," "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"create-chayns-app","version":"1.1.23","private":false,"description":"Create a new chayns® development project in one command.","keywords":["chayns","react","chayns-toolkit","chayns-components","starter-kit"],"bugs":{"url":"https://github.com/TobitSoftware/create-chayns-app/issues","email":"leonhard.driesch@tobit.com"},"repository":{"type":"git","url":"https://github.com/TobitSoftware/create-chayns-app.git"},"license":"MIT","author":{"name":"Leonhard Driesch","email":"leonhard.driesch@tobit.com"},"main":"index.js","bin":{"create-chayns-app":"dist/index.js"},"scripts":{"build":"ncc build src/index.js -o dist -m","format":"prettier . --ignore-path .gitignore --write","prepublishOnly":"npm run build","start":"node src/index.js"},"devDependencies":{"@vercel/ncc":"^0.38.2","chalk":"4.1.2","commander":"12.1.0","enquirer":"^2.4.1","eslint":"^9.14.0","execa":"5.1.1","fast-glob":"^3.3.2","is-npm":"6.0.0","mkdirp":"1.0.4","ora":"5.4.1","prettier":"^3.3.3","prettier-plugin-packagejson":"^2.5.3","react-redux":"^9.1.2","validate-npm-package-name":"^6.0.0"},"publishConfig":{"access":"public"}}')}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var n=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};const{prompt:i}=__nccwpck_require__(9973);const n=__nccwpck_require__(7825);const s=__nccwpck_require__(465);const o=__nccwpck_require__(6390);const a=__nccwpck_require__(6928);const{isYarn:l}=__nccwpck_require__(555);const u=__nccwpck_require__(7822);const h=__nccwpck_require__(8204);const{Command:f}=__nccwpck_require__(8909);const p=__nccwpck_require__(8330);const{ProjectTypes:d,ProjectVersions:m,YesOrNo:g}=__nccwpck_require__(7455);const y=__nccwpck_require__(5696);const b=__nccwpck_require__(14);const{promisify:_}=__nccwpck_require__(9023);const v=__nccwpck_require__(9896);const w=_(v.writeFile);const S=_(v.readFile);const x=h.command;const E=new f;E.version(p.version).option("-G, --no-git","initialize the project without a git repository").option("-C, --no-initial-commit","don't perform an initial commit").option("-I, --no-install","don't install packages after initialization").option("-M, --module-federation","install to use as module (only internal)").option("-p, --package-manager <manager>","specify the package manager to use (`npm` or `yarn`). Defaults to the one used to execute the command.").action(createChaynsApp).parse(process.argv);async function createChaynsApp({git:e,initialCommit:t,install:r,packageManager:f,moduleFederation:p}){let _;let E;if(!p){({projectVersion:_}=await i({type:"select",name:"projectVersion",message:"What api version do you want to use?",choices:Object.values(m)}));({projectType:E}=await i({type:"select",name:"projectType",message:"What type of project do you want to create?",choices:Object.values(d)}))}let k=false;let A;while(!k){const{packageName:e}=await i([{type:"input",name:"packageName",message:"What should the name of your project be?",initial:"my-awesome-project"}]);const{validForNewPackages:t,errors:r=[],warnings:o=[]}=n(e);if(!t){console.log(`\n${s.hex("#31D1DF")(`\`${e}\``)} is unfortunately not a valid project name, because:`);for(const e of[...r,...o]){console.log(s.hex("#94A3B8")(` - ${e}`))}console.log("")}else{k=true;A=e}}const{summary:C}=await i({type:"input",message:"How would you summarize this project in a few words?",name:"summary"});function fillTemplates(e){return u(e,{"package-name":A,"readable-package-name":b(A),description:C,"install-command":P==="yarn"?"yarn":"npm install","run-command":P==="yarn"?"yarn":"npm run","package-name-underscore":A.replace("-","_")})}const R=a.resolve(A);const P=f||(l?"yarn":"npm");if(_===m.v4){console.log(`\n${s.bold.magentaBright("Awesome!")} Please wait a quick second while we bootstrap your project...\n`);switch(E){case d.page:await o({destination:R,templateDir:a.join(` ${__dirname} `.trim(),"../templates/page"),adjustContent:e=>u(fillTemplates(e),{"tapp-style":""})});break;case d.pagemakerPlugin:await o({destination:R,projectName:A,templateDir:a.join(` ${__dirname} `.trim(),"../templates/page"),adjustContent:e=>u(fillTemplates(e),{"tapp-style":' style="padding: 0 0 16px !important"'})});break}}else{const{chooseRedux:e}=await i({type:"select",name:"chooseRedux",message:"Do you want to add redux-toolkit?",choices:Object.values(g)});const{chooseTypescript:t}=await i({type:"select",name:"chooseTypescript",message:"Do you want to add typescript?",choices:Object.values(g)});const getTemplatePath=e=>a.join(` ${__dirname} `.trim(),e);const copyFile=async(e,t,r)=>{let i=await S(e,{encoding:"utf-8"});if(r){i=u(i,{"package-name":A,"readable-package-name":b(A),description:C,"install-command":P==="yarn"?"yarn":"npm install","run-command":P==="yarn"?"yarn":"npm run"})}await w(t,i)};const handleReplace=e=>u(fillTemplates(e),{"tapp-style":E===d.pagemakerPlugin?' style="padding: 0 0 16px !important"':""});if(e===g.Yes){const e=`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/src`;await o({destination:R+"/src",projectName:A,templateDir:a.join(` ${__dirname} `.trim(),e)});await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/.eslintrc`),a.join(R,".eslintrc"))}const r=`../templates/api-v5/page${t===g.Yes?"-ts":""}${p?"-module":""}${e===g.Yes?"-redux":""}`;await o({destination:R,projectName:A,templateDir:getTemplatePath(r),adjustContent:handleReplace});const n=a.join(R,"package.json");await copyFile(getTemplatePath(`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/template-package${e===g.Yes?"-redux":""}.json`),n,true);await copyFile(getTemplatePath(`../templates/shared/README.md`),a.join(R,"README.md"),true);await copyFile(getTemplatePath(`../templates/shared/template-gitignore`),a.join(R,".gitignore"),true);await copyFile(getTemplatePath(`../templates/api-v5/shared/.env`),a.join(R,".env"));await copyFile(getTemplatePath(`../templates/api-v5/shared/.env.development.local`),a.join(R,".env.development.local"));if(!v.existsSync(a.join(R,"/src/constants"))){v.mkdirSync(a.join(R,"/src/constants"))}await copyFile(getTemplatePath(`../templates/api-v5/shared/${t===g.Yes?"ts":"js"}/src/constants/server-urls.${t===g.Yes?"ts":"js"}`),a.join(R,`/src/constants/server-urls.${t===g.Yes?"ts":"js"}`));if(t===g.Yes){await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/tsconfig.json`),a.join(R,"tsconfig.json"));if(!v.existsSync(a.join(R,"/src/types"))){v.mkdirSync(a.join(R,"/src/types"))}await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/src/types/global.d.ts`),a.join(R,"/src/types/global.d.ts"));await copyFile(getTemplatePath(`../templates/api-v5/shared/ts/src/types/environment.d.ts`),a.join(R,"/src/types/environment.d.ts"))}const s=a.join(R,"toolkit.config.js");if(p){const e=`toolkit.config-module.js`;await copyFile(getTemplatePath(`../templates/api-v5/shared/${e}`),s)}else{await copyFile(getTemplatePath(`../templates/api-v5/shared/toolkit.config.js`),s)}}if(e){const e=y("Initializing Git repository").start();try{await x("git init",{cwd:R});e.succeed("Initialized a Git repository")}catch(t){throw t;e.fail(`Failed to initialize a Git repository. You can do this yourself by running ${s.cyanBright(`git init`)}.`)}}if(r){const e=y(`Installing packages using ${s.blueBright(P)}`).start();try{await x(`${P} install`,{cwd:R});e.succeed(`Installed packages with ${s.blueBright(P)}`)}catch{e.fail(`Failed to install packages with ${s.blueBright(P)}. You can do this yourself by running ${s.cyanBright(`${P} install`)}.`)}}if(e&&t){const e=y("Performing an initial commit").start();try{await x("git add .",{cwd:R});await h("git",["commit","-m",":tada: Initial commit"],{cwd:R});e.succeed("Perfomed an initial commit")}catch(t){console.error(t);e.fail("Failed to perform an initial commit.")}}console.log(`\n${s.bold.greenBright("Congrats!")} Your new project is ready to go!`);const O=P==="yarn"?"yarn dev":"npm run dev";console.log(`Open the created ${s.yellowBright(`./${A}/`)} folder in your favorite editor and start ${s.cyanBright("`"+O+"`")}.\n`)}module.exports=r})();
|
package/package.json
CHANGED