@povio/openapi-codegen-cli 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/rest/error-handling.mjs +3 -0
- package/dist/sh.js +1 -1
- package/package.json +1 -1
package/dist/sh.js
CHANGED
|
@@ -565,7 +565,7 @@ ${ot.join(`
|
|
|
565
565
|
`;_e.forEach(ot=>{Lt+=ot}),f.fail(Lt)}},"implications");let oe={};A.conflicts=t(function(Ae,_e){ho("<string|object> [array|string]",[Ae,_e],arguments.length),typeof Ae=="object"?Object.keys(Ae).forEach(Lt=>{A.conflicts(Lt,Ae[Lt])}):(l.global(Ae),oe[Ae]||(oe[Ae]=[]),Array.isArray(_e)?_e.forEach(Lt=>A.conflicts(Ae,Lt)):oe[Ae].push(_e))},"conflicts"),A.getConflicting=()=>oe,A.conflicting=t(function(Ae){Object.keys(Ae).forEach(_e=>{oe[_e]&&oe[_e].forEach(Lt=>{Lt&&Ae[_e]!==void 0&&Ae[Lt]!==void 0&&f.fail(S("Arguments %s and %s are mutually exclusive",_e,Lt))})}),l.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(oe).forEach(_e=>{oe[_e].forEach(Lt=>{Lt&&Ae[h.Parser.camelCase(_e)]!==void 0&&Ae[h.Parser.camelCase(Lt)]!==void 0&&f.fail(S("Arguments %s and %s are mutually exclusive",_e,Lt))})})},"conflictingFn"),A.recommendCommands=t(function(Ae,_e){_e=_e.sort((Ht,jr)=>jr.length-Ht.length);let ot=null,tt=1/0;for(let Ht=0,jr;(jr=_e[Ht])!==void 0;Ht++){let Gn=RQe(Ae,jr);Gn<=3&&Gn<tt&&(tt=Gn,ot=jr)}ot&&f.fail(S("Did you mean %s?",ot))},"recommendCommands"),A.reset=t(function(Ae){return j=$6(j,_e=>!Ae[_e]),oe=$6(oe,_e=>!Ae[_e]),A},"reset");let ge=[];return A.freeze=t(function(){ge.push({implied:j,conflicting:oe})},"freeze"),A.unfreeze=t(function(){let Ae=ge.pop();p1(Ae,void 0,h),{implied:j,conflicting:oe}=Ae},"unfreeze"),A}t(jQe,"validation");var nke=[],WV;function HV(l,f,h,S){WV=S;let C={};if(Object.prototype.hasOwnProperty.call(l,"extends")){if(typeof l.extends!="string")return C;let A=/\.json|\..*rc$/.test(l.extends),j=null;if(A)j=z5t(f,l.extends);else try{j=require.resolve(l.extends)}catch{return l}q5t(j),nke.push(j),C=A?JSON.parse(WV.readFileSync(j,"utf8")):require(l.extends),delete l.extends,C=HV(C,WV.path.dirname(j),h,WV)}return nke=[],h?BQe(C,l):Object.assign({},C,l)}t(HV,"applyExtends");function q5t(l){if(nke.indexOf(l)>-1)throw new Up(`Circular extended configurations: '${l}'.`)}t(q5t,"checkForCircularExtends");function z5t(l,f){return WV.path.resolve(l,f)}t(z5t,"getPathToDefaultConfig");function BQe(l,f){let h={};function S(C){return C&&typeof C=="object"&&!Array.isArray(C)}t(S,"isObject"),Object.assign(h,l);for(let C of Object.keys(f))S(f[C])&&S(h[C])?h[C]=BQe(l[C],f[C]):h[C]=f[C];return h}t(BQe,"mergeDeep");var xo=function(l,f,h,S,C){if(S==="m")throw new TypeError("Private method is not writable");if(S==="a"&&!C)throw new TypeError("Private accessor was defined without a setter");if(typeof f=="function"?l!==f||!C:!f.has(l))throw new TypeError("Cannot write private member to an object whose class did not declare it");return S==="a"?C.call(l,h):C?C.value=h:f.set(l,h),h},Zt=function(l,f,h,S){if(h==="a"&&!S)throw new TypeError("Private accessor was defined without a getter");if(typeof f=="function"?l!==f||!S:!f.has(l))throw new TypeError("Cannot read private member from an object whose class did not declare it");return h==="m"?S:h==="a"?S.call(l):S?S.value:f.get(l)},Om,v8,GV,jS,Qb,ese,z6,b8,tse,BS,rse,JS,Hk,Zb,$S,nse,cR,Ag,Bo,ise,sse,Xb,S8,lR,x8,V6,ase,Bc,T8,C8,k8,il,ose,Gk,sm;function sZe(l){return(f=[],h=l.process.cwd(),S)=>{let C=new dke(f,h,S,l);return Object.defineProperty(C,"argv",{get:t(()=>C.parse(),"get"),enumerable:!0}),C.help(),C.version(),C}}t(sZe,"YargsFactory");var JQe=Symbol("copyDoubleDash"),$Qe=Symbol("copyDoubleDash"),ike=Symbol("deleteFromParserHintObject"),qQe=Symbol("emitWarning"),zQe=Symbol("freeze"),VQe=Symbol("getDollarZero"),E8=Symbol("getParserConfiguration"),UQe=Symbol("getUsageConfiguration"),ske=Symbol("guessLocale"),WQe=Symbol("guessVersion"),HQe=Symbol("parsePositionalNumbers"),ake=Symbol("pkgUp"),U6=Symbol("populateParserHintArray"),uR=Symbol("populateParserHintSingleValueDictionary"),oke=Symbol("populateParserHintArrayDictionary"),cke=Symbol("populateParserHintDictionary"),lke=Symbol("sanitizeKey"),uke=Symbol("setKey"),fke=Symbol("unfreeze"),GQe=Symbol("validateAsync"),QQe=Symbol("getCommandInstance"),ZQe=Symbol("getContext"),XQe=Symbol("getHasOutput"),YQe=Symbol("getLoggerInstance"),KQe=Symbol("getParseContext"),eZe=Symbol("getUsageInstance"),tZe=Symbol("getValidationInstance"),cse=Symbol("hasParseCallback"),rZe=Symbol("isGlobalContext"),P8=Symbol("postProcess"),nZe=Symbol("rebase"),_ke=Symbol("reset"),QV=Symbol("runYargsParserAndExecuteCommands"),pke=Symbol("runValidation"),iZe=Symbol("setHasOutput"),w8=Symbol("kTrackManuallySetKeys"),mke=class mke{constructor(f=[],h,S,C){this.customScriptName=!1,this.parsed=!1,Om.set(this,void 0),v8.set(this,void 0),GV.set(this,{commands:[],fullCommands:[]}),jS.set(this,null),Qb.set(this,null),ese.set(this,"show-hidden"),z6.set(this,null),b8.set(this,!0),tse.set(this,{}),BS.set(this,!0),rse.set(this,[]),JS.set(this,void 0),Hk.set(this,{}),Zb.set(this,!1),$S.set(this,null),nse.set(this,!0),cR.set(this,void 0),Ag.set(this,""),Bo.set(this,void 0),ise.set(this,void 0),sse.set(this,{}),Xb.set(this,null),S8.set(this,null),lR.set(this,{}),x8.set(this,{}),V6.set(this,void 0),ase.set(this,!1),Bc.set(this,void 0),T8.set(this,!1),C8.set(this,!1),k8.set(this,!1),il.set(this,void 0),ose.set(this,{}),Gk.set(this,null),sm.set(this,void 0),xo(this,Bc,C,"f"),xo(this,V6,f,"f"),xo(this,v8,h,"f"),xo(this,ise,S,"f"),xo(this,JS,new Xie(this),"f"),this.$0=this[VQe](),this[_ke](),xo(this,Om,Zt(this,Om,"f"),"f"),xo(this,il,Zt(this,il,"f"),"f"),xo(this,sm,Zt(this,sm,"f"),"f"),xo(this,Bo,Zt(this,Bo,"f"),"f"),Zt(this,Bo,"f").showHiddenOpt=Zt(this,ese,"f"),xo(this,cR,this[$Qe](),"f")}addHelpOpt(f,h){let S="help";return ho("[string|boolean] [string]",[f,h],arguments.length),Zt(this,$S,"f")&&(this[ike](Zt(this,$S,"f")),xo(this,$S,null,"f")),f===!1&&h===void 0?this:(xo(this,$S,typeof f=="string"?f:S,"f"),this.boolean(Zt(this,$S,"f")),this.describe(Zt(this,$S,"f"),h||Zt(this,il,"f").deferY18nLookup("Show help")),this)}help(f,h){return this.addHelpOpt(f,h)}addShowHiddenOpt(f,h){if(ho("[string|boolean] [string]",[f,h],arguments.length),f===!1&&h===void 0)return this;let S=typeof f=="string"?f:Zt(this,ese,"f");return this.boolean(S),this.describe(S,h||Zt(this,il,"f").deferY18nLookup("Show hidden options")),Zt(this,Bo,"f").showHiddenOpt=S,this}showHidden(f,h){return this.addShowHiddenOpt(f,h)}alias(f,h){return ho("<object|string|array> [string|array]",[f,h],arguments.length),this[oke](this.alias.bind(this),"alias",f,h),this}array(f){return ho("<array|string>",[f],arguments.length),this[U6]("array",f),this[w8](f),this}boolean(f){return ho("<array|string>",[f],arguments.length),this[U6]("boolean",f),this[w8](f),this}check(f,h){return ho("<function> [boolean]",[f,h],arguments.length),this.middleware((S,C)=>y8(()=>f(S,C.getOptions()),A=>(A?(typeof A=="string"||A instanceof Error)&&Zt(this,il,"f").fail(A.toString(),A):Zt(this,il,"f").fail(Zt(this,Bc,"f").y18n.__("Argument check failed: %s",f.toString())),S),A=>(Zt(this,il,"f").fail(A.message?A.message:A.toString(),A),S)),!1,h),this}choices(f,h){return ho("<object|string|array> [string|array]",[f,h],arguments.length),this[oke](this.choices.bind(this),"choices",f,h),this}coerce(f,h){if(ho("<object|string|array> [function]",[f,h],arguments.length),Array.isArray(f)){if(!h)throw new Up("coerce callback must be provided");for(let S of f)this.coerce(S,h);return this}else if(typeof f=="object"){for(let S of Object.keys(f))this.coerce(S,f[S]);return this}if(!h)throw new Up("coerce callback must be provided");return Zt(this,Bo,"f").key[f]=!0,Zt(this,JS,"f").addCoerceMiddleware((S,C)=>{let A;return Object.prototype.hasOwnProperty.call(S,f)?y8(()=>(A=C.getAliases(),h(S[f])),Z=>{S[f]=Z;let oe=C.getInternalMethods().getParserConfiguration()["strip-aliased"];if(A[f]&&oe!==!0)for(let ge of A[f])S[ge]=Z;return S},Z=>{throw new Up(Z.message)}):S},f),this}conflicts(f,h){return ho("<string|object> [string|array]",[f,h],arguments.length),Zt(this,sm,"f").conflicts(f,h),this}config(f="config",h,S){return ho("[object|string] [string|function] [function]",[f,h,S],arguments.length),typeof f=="object"&&!Array.isArray(f)?(f=HV(f,Zt(this,v8,"f"),this[E8]()["deep-merge-config"]||!1,Zt(this,Bc,"f")),Zt(this,Bo,"f").configObjects=(Zt(this,Bo,"f").configObjects||[]).concat(f),this):(typeof h=="function"&&(S=h,h=void 0),this.describe(f,h||Zt(this,il,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(f)?f:[f]).forEach(C=>{Zt(this,Bo,"f").config[C]=S||!0}),this)}completion(f,h,S){return ho("[string] [string|boolean|function] [function]",[f,h,S],arguments.length),typeof h=="function"&&(S=h,h=void 0),xo(this,Qb,f||Zt(this,Qb,"f")||"completion","f"),!h&&h!==!1&&(h="generate completion script"),this.command(Zt(this,Qb,"f"),h),S&&Zt(this,jS,"f").registerFunction(S),this}command(f,h,S,C,A,j){return ho("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[f,h,S,C,A,j],arguments.length),Zt(this,Om,"f").addHandler(f,h,S,C,A,j),this}commands(f,h,S,C,A,j){return this.command(f,h,S,C,A,j)}commandDir(f,h){ho("<string> [object]",[f,h],arguments.length);let S=Zt(this,ise,"f")||Zt(this,Bc,"f").require;return Zt(this,Om,"f").addDirectory(f,S,Zt(this,Bc,"f").getCallerFile(),h),this}count(f){return ho("<array|string>",[f],arguments.length),this[U6]("count",f),this[w8](f),this}default(f,h,S){return ho("<object|string|array> [*] [string]",[f,h,S],arguments.length),S&&(QCe(f,Zt(this,Bc,"f")),Zt(this,Bo,"f").defaultDescription[f]=S),typeof h=="function"&&(QCe(f,Zt(this,Bc,"f")),Zt(this,Bo,"f").defaultDescription[f]||(Zt(this,Bo,"f").defaultDescription[f]=Zt(this,il,"f").functionDescription(h)),h=h.call()),this[uR](this.default.bind(this),"default",f,h),this}defaults(f,h,S){return this.default(f,h,S)}demandCommand(f=1,h,S,C){return ho("[number] [number|string] [string|null|undefined] [string|null|undefined]",[f,h,S,C],arguments.length),typeof h!="number"&&(S=h,h=1/0),this.global("_",!1),Zt(this,Bo,"f").demandedCommands._={min:f,max:h,minMsg:S,maxMsg:C},this}demand(f,h,S){return Array.isArray(h)?(h.forEach(C=>{p1(S,!0,Zt(this,Bc,"f")),this.demandOption(C,S)}),h=1/0):typeof h!="number"&&(S=h,h=1/0),typeof f=="number"?(p1(S,!0,Zt(this,Bc,"f")),this.demandCommand(f,h,S,S)):Array.isArray(f)?f.forEach(C=>{p1(S,!0,Zt(this,Bc,"f")),this.demandOption(C,S)}):typeof S=="string"?this.demandOption(f,S):(S===!0||typeof S>"u")&&this.demandOption(f),this}demandOption(f,h){return ho("<object|string|array> [string]",[f,h],arguments.length),this[uR](this.demandOption.bind(this),"demandedOptions",f,h),this}deprecateOption(f,h){return ho("<string> [string|boolean]",[f,h],arguments.length),Zt(this,Bo,"f").deprecatedOptions[f]=h,this}describe(f,h){return ho("<object|string|array> [string]",[f,h],arguments.length),this[uke](f,!0),Zt(this,il,"f").describe(f,h),this}detectLocale(f){return ho("<boolean>",[f],arguments.length),xo(this,b8,f,"f"),this}env(f){return ho("[string|boolean]",[f],arguments.length),f===!1?delete Zt(this,Bo,"f").envPrefix:Zt(this,Bo,"f").envPrefix=f||"",this}epilogue(f){return ho("<string>",[f],arguments.length),Zt(this,il,"f").epilog(f),this}epilog(f){return this.epilogue(f)}example(f,h){return ho("<string|array> [string]",[f,h],arguments.length),Array.isArray(f)?f.forEach(S=>this.example(...S)):Zt(this,il,"f").example(f,h),this}exit(f,h){xo(this,Zb,!0,"f"),xo(this,z6,h,"f"),Zt(this,BS,"f")&&Zt(this,Bc,"f").process.exit(f)}exitProcess(f=!0){return ho("[boolean]",[f],arguments.length),xo(this,BS,f,"f"),this}fail(f){if(ho("<function|boolean>",[f],arguments.length),typeof f=="boolean"&&f!==!1)throw new Up("Invalid first argument. Expected function or boolean 'false'");return Zt(this,il,"f").failFn(f),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(f,h){return ho("<array> [function]",[f,h],arguments.length),h?Zt(this,jS,"f").getCompletion(f,h):new Promise((S,C)=>{Zt(this,jS,"f").getCompletion(f,(A,j)=>{A?C(A):S(j)})})}getDemandedOptions(){return ho([],0),Zt(this,Bo,"f").demandedOptions}getDemandedCommands(){return ho([],0),Zt(this,Bo,"f").demandedCommands}getDeprecatedOptions(){return ho([],0),Zt(this,Bo,"f").deprecatedOptions}getDetectLocale(){return Zt(this,b8,"f")}getExitProcess(){return Zt(this,BS,"f")}getGroups(){return Object.assign({},Zt(this,Hk,"f"),Zt(this,x8,"f"))}getHelp(){if(xo(this,Zb,!0,"f"),!Zt(this,il,"f").hasCachedHelpMessage()){if(!this.parsed){let h=this[QV](Zt(this,V6,"f"),void 0,void 0,0,!0);if(Wp(h))return h.then(()=>Zt(this,il,"f").help())}let f=Zt(this,Om,"f").runDefaultBuilderOn(this);if(Wp(f))return f.then(()=>Zt(this,il,"f").help())}return Promise.resolve(Zt(this,il,"f").help())}getOptions(){return Zt(this,Bo,"f")}getStrict(){return Zt(this,T8,"f")}getStrictCommands(){return Zt(this,C8,"f")}getStrictOptions(){return Zt(this,k8,"f")}global(f,h){return ho("<string|array> [boolean]",[f,h],arguments.length),f=[].concat(f),h!==!1?Zt(this,Bo,"f").local=Zt(this,Bo,"f").local.filter(S=>f.indexOf(S)===-1):f.forEach(S=>{Zt(this,Bo,"f").local.includes(S)||Zt(this,Bo,"f").local.push(S)}),this}group(f,h){ho("<string|array> <string>",[f,h],arguments.length);let S=Zt(this,x8,"f")[h]||Zt(this,Hk,"f")[h];Zt(this,x8,"f")[h]&&delete Zt(this,x8,"f")[h];let C={};return Zt(this,Hk,"f")[h]=(S||[]).concat(f).filter(A=>C[A]?!1:C[A]=!0),this}hide(f){return ho("<string>",[f],arguments.length),Zt(this,Bo,"f").hiddenOptions.push(f),this}implies(f,h){return ho("<string|object> [number|string|array]",[f,h],arguments.length),Zt(this,sm,"f").implies(f,h),this}locale(f){return ho("[string]",[f],arguments.length),f===void 0?(this[ske](),Zt(this,Bc,"f").y18n.getLocale()):(xo(this,b8,!1,"f"),Zt(this,Bc,"f").y18n.setLocale(f),this)}middleware(f,h,S){return Zt(this,JS,"f").addMiddleware(f,!!h,S)}nargs(f,h){return ho("<string|object|array> [number]",[f,h],arguments.length),this[uR](this.nargs.bind(this),"narg",f,h),this}normalize(f){return ho("<array|string>",[f],arguments.length),this[U6]("normalize",f),this}number(f){return ho("<array|string>",[f],arguments.length),this[U6]("number",f),this[w8](f),this}option(f,h){if(ho("<string|object> [object]",[f,h],arguments.length),typeof f=="object")Object.keys(f).forEach(S=>{this.options(S,f[S])});else{typeof h!="object"&&(h={}),this[w8](f),Zt(this,Gk,"f")&&(f==="version"||(h==null?void 0:h.alias)==="version")&&this[qQe](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
566
566
|
`),void 0,"versionWarning"),Zt(this,Bo,"f").key[f]=!0,h.alias&&this.alias(f,h.alias);let S=h.deprecate||h.deprecated;S&&this.deprecateOption(f,S);let C=h.demand||h.required||h.require;C&&this.demand(f,C),h.demandOption&&this.demandOption(f,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&this.conflicts(f,h.conflicts),"default"in h&&this.default(f,h.default),h.implies!==void 0&&this.implies(f,h.implies),h.nargs!==void 0&&this.nargs(f,h.nargs),h.config&&this.config(f,h.configParser),h.normalize&&this.normalize(f),h.choices&&this.choices(f,h.choices),h.coerce&&this.coerce(f,h.coerce),h.group&&this.group(f,h.group),(h.boolean||h.type==="boolean")&&(this.boolean(f),h.alias&&this.boolean(h.alias)),(h.array||h.type==="array")&&(this.array(f),h.alias&&this.array(h.alias)),(h.number||h.type==="number")&&(this.number(f),h.alias&&this.number(h.alias)),(h.string||h.type==="string")&&(this.string(f),h.alias&&this.string(h.alias)),(h.count||h.type==="count")&&this.count(f),typeof h.global=="boolean"&&this.global(f,h.global),h.defaultDescription&&(Zt(this,Bo,"f").defaultDescription[f]=h.defaultDescription),h.skipValidation&&this.skipValidation(f);let A=h.describe||h.description||h.desc,j=Zt(this,il,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(j,f)||typeof A=="string")&&this.describe(f,A),h.hidden&&this.hide(f),h.requiresArg&&this.requiresArg(f)}return this}options(f,h){return this.option(f,h)}parse(f,h,S){ho("[string|array] [function|boolean|object] [function]",[f,h,S],arguments.length),this[zQe](),typeof f>"u"&&(f=Zt(this,V6,"f")),typeof h=="object"&&(xo(this,S8,h,"f"),h=S),typeof h=="function"&&(xo(this,Xb,h,"f"),h=!1),h||xo(this,V6,f,"f"),Zt(this,Xb,"f")&&xo(this,BS,!1,"f");let C=this[QV](f,!!h),A=this.parsed;return Zt(this,jS,"f").setParsed(this.parsed),Wp(C)?C.then(j=>(Zt(this,Xb,"f")&&Zt(this,Xb,"f").call(this,Zt(this,z6,"f"),j,Zt(this,Ag,"f")),j)).catch(j=>{throw Zt(this,Xb,"f")&&Zt(this,Xb,"f")(j,this.parsed.argv,Zt(this,Ag,"f")),j}).finally(()=>{this[fke](),this.parsed=A}):(Zt(this,Xb,"f")&&Zt(this,Xb,"f").call(this,Zt(this,z6,"f"),C,Zt(this,Ag,"f")),this[fke](),this.parsed=A,C)}parseAsync(f,h,S){let C=this.parse(f,h,S);return Wp(C)?C:Promise.resolve(C)}parseSync(f,h,S){let C=this.parse(f,h,S);if(Wp(C))throw new Up(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return C}parserConfiguration(f){return ho("<object>",[f],arguments.length),xo(this,sse,f,"f"),this}pkgConf(f,h){ho("<string> [string]",[f,h],arguments.length);let S=null,C=this[ake](h||Zt(this,v8,"f"));return C[f]&&typeof C[f]=="object"&&(S=HV(C[f],h||Zt(this,v8,"f"),this[E8]()["deep-merge-config"]||!1,Zt(this,Bc,"f")),Zt(this,Bo,"f").configObjects=(Zt(this,Bo,"f").configObjects||[]).concat(S)),this}positional(f,h){ho("<string> <object>",[f,h],arguments.length);let S=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];h=$6(h,(j,Z)=>j==="type"&&!["string","number","boolean"].includes(Z)?!1:S.includes(j));let C=Zt(this,GV,"f").fullCommands[Zt(this,GV,"f").fullCommands.length-1],A=C?Zt(this,Om,"f").cmdToParseOptions(C):{array:[],alias:{},default:{},demand:{}};return aR(A).forEach(j=>{let Z=A[j];Array.isArray(Z)?Z.indexOf(f)!==-1&&(h[j]=!0):Z[f]&&!(j in h)&&(h[j]=Z[f])}),this.group(f,Zt(this,il,"f").getPositionalGroupName()),this.option(f,h)}recommendCommands(f=!0){return ho("[boolean]",[f],arguments.length),xo(this,ase,f,"f"),this}required(f,h,S){return this.demand(f,h,S)}require(f,h,S){return this.demand(f,h,S)}requiresArg(f){return ho("<array|string|object> [number]",[f],arguments.length),typeof f=="string"&&Zt(this,Bo,"f").narg[f]?this:(this[uR](this.requiresArg.bind(this),"narg",f,NaN),this)}showCompletionScript(f,h){return ho("[string] [string]",[f,h],arguments.length),f=f||this.$0,Zt(this,cR,"f").log(Zt(this,jS,"f").generateCompletionScript(f,h||Zt(this,Qb,"f")||"completion")),this}showHelp(f){if(ho("[string|function]",[f],arguments.length),xo(this,Zb,!0,"f"),!Zt(this,il,"f").hasCachedHelpMessage()){if(!this.parsed){let S=this[QV](Zt(this,V6,"f"),void 0,void 0,0,!0);if(Wp(S))return S.then(()=>{Zt(this,il,"f").showHelp(f)}),this}let h=Zt(this,Om,"f").runDefaultBuilderOn(this);if(Wp(h))return h.then(()=>{Zt(this,il,"f").showHelp(f)}),this}return Zt(this,il,"f").showHelp(f),this}scriptName(f){return this.customScriptName=!0,this.$0=f,this}showHelpOnFail(f,h){return ho("[boolean|string] [string]",[f,h],arguments.length),Zt(this,il,"f").showHelpOnFail(f,h),this}showVersion(f){return ho("[string|function]",[f],arguments.length),Zt(this,il,"f").showVersion(f),this}skipValidation(f){return ho("<array|string>",[f],arguments.length),this[U6]("skipValidation",f),this}strict(f){return ho("[boolean]",[f],arguments.length),xo(this,T8,f!==!1,"f"),this}strictCommands(f){return ho("[boolean]",[f],arguments.length),xo(this,C8,f!==!1,"f"),this}strictOptions(f){return ho("[boolean]",[f],arguments.length),xo(this,k8,f!==!1,"f"),this}string(f){return ho("<array|string>",[f],arguments.length),this[U6]("string",f),this[w8](f),this}terminalWidth(){return ho([],0),Zt(this,Bc,"f").process.stdColumns}updateLocale(f){return this.updateStrings(f)}updateStrings(f){return ho("<object>",[f],arguments.length),xo(this,b8,!1,"f"),Zt(this,Bc,"f").y18n.updateLocale(f),this}usage(f,h,S,C){if(ho("<string|null|undefined> [string|boolean] [function|object] [function]",[f,h,S,C],arguments.length),h!==void 0){if(p1(f,null,Zt(this,Bc,"f")),(f||"").match(/^\$0( |$)/))return this.command(f,h,S,C);throw new Up(".usage() description must start with $0 if being used as alias for .command()")}else return Zt(this,il,"f").usage(f),this}usageConfiguration(f){return ho("<object>",[f],arguments.length),xo(this,ose,f,"f"),this}version(f,h,S){let C="version";if(ho("[boolean|string] [string] [string]",[f,h,S],arguments.length),Zt(this,Gk,"f")&&(this[ike](Zt(this,Gk,"f")),Zt(this,il,"f").version(void 0),xo(this,Gk,null,"f")),arguments.length===0)S=this[WQe](),f=C;else if(arguments.length===1){if(f===!1)return this;S=f,f=C}else arguments.length===2&&(S=h,h=void 0);return xo(this,Gk,typeof f=="string"?f:C,"f"),h=h||Zt(this,il,"f").deferY18nLookup("Show version number"),Zt(this,il,"f").version(S||void 0),this.boolean(Zt(this,Gk,"f")),this.describe(Zt(this,Gk,"f"),h),this}wrap(f){return ho("<number|null|undefined>",[f],arguments.length),Zt(this,il,"f").wrap(f),this}[(Om=new WeakMap,v8=new WeakMap,GV=new WeakMap,jS=new WeakMap,Qb=new WeakMap,ese=new WeakMap,z6=new WeakMap,b8=new WeakMap,tse=new WeakMap,BS=new WeakMap,rse=new WeakMap,JS=new WeakMap,Hk=new WeakMap,Zb=new WeakMap,$S=new WeakMap,nse=new WeakMap,cR=new WeakMap,Ag=new WeakMap,Bo=new WeakMap,ise=new WeakMap,sse=new WeakMap,Xb=new WeakMap,S8=new WeakMap,lR=new WeakMap,x8=new WeakMap,V6=new WeakMap,ase=new WeakMap,Bc=new WeakMap,T8=new WeakMap,C8=new WeakMap,k8=new WeakMap,il=new WeakMap,ose=new WeakMap,Gk=new WeakMap,sm=new WeakMap,JQe)](f){if(!f._||!f["--"])return f;f._.push.apply(f._,f["--"]);try{delete f["--"]}catch{}return f}[$Qe](){return{log:t((...f)=>{this[cse]()||console.log(...f),xo(this,Zb,!0,"f"),Zt(this,Ag,"f").length&&xo(this,Ag,Zt(this,Ag,"f")+`
|
|
567
567
|
`,"f"),xo(this,Ag,Zt(this,Ag,"f")+f.join(" "),"f")},"log"),error:t((...f)=>{this[cse]()||console.error(...f),xo(this,Zb,!0,"f"),Zt(this,Ag,"f").length&&xo(this,Ag,Zt(this,Ag,"f")+`
|
|
568
|
-
`,"f"),xo(this,Ag,Zt(this,Ag,"f")+f.join(" "),"f")},"error")}}[ike](f){aR(Zt(this,Bo,"f")).forEach(h=>{if((C=>C==="configObjects")(h))return;let S=Zt(this,Bo,"f")[h];Array.isArray(S)?S.includes(f)&&S.splice(S.indexOf(f),1):typeof S=="object"&&delete S[f]}),delete Zt(this,il,"f").getDescriptions()[f]}[qQe](f,h,S){Zt(this,tse,"f")[S]||(Zt(this,Bc,"f").process.emitWarning(f,h),Zt(this,tse,"f")[S]=!0)}[zQe](){Zt(this,rse,"f").push({options:Zt(this,Bo,"f"),configObjects:Zt(this,Bo,"f").configObjects.slice(0),exitProcess:Zt(this,BS,"f"),groups:Zt(this,Hk,"f"),strict:Zt(this,T8,"f"),strictCommands:Zt(this,C8,"f"),strictOptions:Zt(this,k8,"f"),completionCommand:Zt(this,Qb,"f"),output:Zt(this,Ag,"f"),exitError:Zt(this,z6,"f"),hasOutput:Zt(this,Zb,"f"),parsed:this.parsed,parseFn:Zt(this,Xb,"f"),parseContext:Zt(this,S8,"f")}),Zt(this,il,"f").freeze(),Zt(this,sm,"f").freeze(),Zt(this,Om,"f").freeze(),Zt(this,JS,"f").freeze()}[VQe](){let f="",h;return/\b(node|iojs|electron)(\.exe)?$/.test(Zt(this,Bc,"f").process.argv()[0])?h=Zt(this,Bc,"f").process.argv().slice(1,2):h=Zt(this,Bc,"f").process.argv().slice(0,1),f=h.map(S=>{let C=this[nZe](Zt(this,v8,"f"),S);return S.match(/^(\/|([a-zA-Z]:)?\\)/)&&C.length<S.length?C:S}).join(" ").trim(),Zt(this,Bc,"f").getEnv("_")&&Zt(this,Bc,"f").getProcessArgvBin()===Zt(this,Bc,"f").getEnv("_")&&(f=Zt(this,Bc,"f").getEnv("_").replace(`${Zt(this,Bc,"f").path.dirname(Zt(this,Bc,"f").process.execPath())}/`,"")),f}[E8](){return Zt(this,sse,"f")}[UQe](){return Zt(this,ose,"f")}[ske](){if(!Zt(this,b8,"f"))return;let f=Zt(this,Bc,"f").getEnv("LC_ALL")||Zt(this,Bc,"f").getEnv("LC_MESSAGES")||Zt(this,Bc,"f").getEnv("LANG")||Zt(this,Bc,"f").getEnv("LANGUAGE")||"en_US";this.locale(f.replace(/[.:].*/,""))}[WQe](){return this[ake]().version||"unknown"}[HQe](f){let h=f["--"]?f["--"]:f._;for(let S=0,C;(C=h[S])!==void 0;S++)Zt(this,Bc,"f").Parser.looksLikeNumber(C)&&Number.isSafeInteger(Math.floor(parseFloat(`${C}`)))&&(h[S]=Number(C));return f}[ake](f){let h=f||"*";if(Zt(this,lR,"f")[h])return Zt(this,lR,"f")[h];let S={};try{let C=f||Zt(this,Bc,"f").mainFilename;!f&&Zt(this,Bc,"f").path.extname(C)&&(C=Zt(this,Bc,"f").path.dirname(C));let A=Zt(this,Bc,"f").findUp(C,(j,Z)=>{if(Z.includes("package.json"))return"package.json"});p1(A,void 0,Zt(this,Bc,"f")),S=JSON.parse(Zt(this,Bc,"f").readFileSync(A,"utf8"))}catch{}return Zt(this,lR,"f")[h]=S||{},Zt(this,lR,"f")[h]}[U6](f,h){h=[].concat(h),h.forEach(S=>{S=this[lke](S),Zt(this,Bo,"f")[f].push(S)})}[uR](f,h,S,C){this[cke](f,h,S,C,(A,j,Z)=>{Zt(this,Bo,"f")[A][j]=Z})}[oke](f,h,S,C){this[cke](f,h,S,C,(A,j,Z)=>{Zt(this,Bo,"f")[A][j]=(Zt(this,Bo,"f")[A][j]||[]).concat(Z)})}[cke](f,h,S,C,A){if(Array.isArray(S))S.forEach(j=>{f(j,C)});else if((j=>typeof j=="object")(S))for(let j of aR(S))f(j,S[j]);else A(h,this[lke](S),C)}[lke](f){return f==="__proto__"?"___proto___":f}[uke](f,h){return this[uR](this[uke].bind(this),"key",f,h),this}[fke](){var f,h,S,C,A,j,Z,oe,ge,je,Ae,_e;let Lt=Zt(this,rse,"f").pop();p1(Lt,void 0,Zt(this,Bc,"f"));let ot;f=this,h=this,S=this,C=this,A=this,j=this,Z=this,oe=this,ge=this,je=this,Ae=this,_e=this,{options:{set value(tt){xo(f,Bo,tt,"f")}}.value,configObjects:ot,exitProcess:{set value(tt){xo(h,BS,tt,"f")}}.value,groups:{set value(tt){xo(S,Hk,tt,"f")}}.value,output:{set value(tt){xo(C,Ag,tt,"f")}}.value,exitError:{set value(tt){xo(A,z6,tt,"f")}}.value,hasOutput:{set value(tt){xo(j,Zb,tt,"f")}}.value,parsed:this.parsed,strict:{set value(tt){xo(Z,T8,tt,"f")}}.value,strictCommands:{set value(tt){xo(oe,C8,tt,"f")}}.value,strictOptions:{set value(tt){xo(ge,k8,tt,"f")}}.value,completionCommand:{set value(tt){xo(je,Qb,tt,"f")}}.value,parseFn:{set value(tt){xo(Ae,Xb,tt,"f")}}.value,parseContext:{set value(tt){xo(_e,S8,tt,"f")}}.value}=Lt,Zt(this,Bo,"f").configObjects=ot,Zt(this,il,"f").unfreeze(),Zt(this,sm,"f").unfreeze(),Zt(this,Om,"f").unfreeze(),Zt(this,JS,"f").unfreeze()}[GQe](f,h){return y8(h,S=>(f(S),S))}getInternalMethods(){return{getCommandInstance:this[QQe].bind(this),getContext:this[ZQe].bind(this),getHasOutput:this[XQe].bind(this),getLoggerInstance:this[YQe].bind(this),getParseContext:this[KQe].bind(this),getParserConfiguration:this[E8].bind(this),getUsageConfiguration:this[UQe].bind(this),getUsageInstance:this[eZe].bind(this),getValidationInstance:this[tZe].bind(this),hasParseCallback:this[cse].bind(this),isGlobalContext:this[rZe].bind(this),postProcess:this[P8].bind(this),reset:this[_ke].bind(this),runValidation:this[pke].bind(this),runYargsParserAndExecuteCommands:this[QV].bind(this),setHasOutput:this[iZe].bind(this)}}[QQe](){return Zt(this,Om,"f")}[ZQe](){return Zt(this,GV,"f")}[XQe](){return Zt(this,Zb,"f")}[YQe](){return Zt(this,cR,"f")}[KQe](){return Zt(this,S8,"f")||{}}[eZe](){return Zt(this,il,"f")}[tZe](){return Zt(this,sm,"f")}[cse](){return!!Zt(this,Xb,"f")}[rZe](){return Zt(this,nse,"f")}[P8](f,h,S,C){return S||Wp(f)||(h||(f=this[JQe](f)),(this[E8]()["parse-positional-numbers"]||this[E8]()["parse-positional-numbers"]===void 0)&&(f=this[HQe](f)),C&&(f=g8(f,this,Zt(this,JS,"f").getMiddleware(),!1))),f}[_ke](f={}){xo(this,Bo,Zt(this,Bo,"f")||{},"f");let h={};h.local=Zt(this,Bo,"f").local||[],h.configObjects=Zt(this,Bo,"f").configObjects||[];let S={};h.local.forEach(j=>{S[j]=!0,(f[j]||[]).forEach(Z=>{S[Z]=!0})}),Object.assign(Zt(this,x8,"f"),Object.keys(Zt(this,Hk,"f")).reduce((j,Z)=>{let oe=Zt(this,Hk,"f")[Z].filter(ge=>!(ge in S));return oe.length>0&&(j[Z]=oe),j},{})),xo(this,Hk,{},"f");let C=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return C.forEach(j=>{h[j]=(Zt(this,Bo,"f")[j]||[]).filter(Z=>!S[Z])}),A.forEach(j=>{h[j]=$6(Zt(this,Bo,"f")[j],Z=>!S[Z])}),h.envPrefix=Zt(this,Bo,"f").envPrefix,xo(this,Bo,h,"f"),xo(this,il,Zt(this,il,"f")?Zt(this,il,"f").reset(S):NQe(this,Zt(this,Bc,"f")),"f"),xo(this,sm,Zt(this,sm,"f")?Zt(this,sm,"f").reset(S):jQe(this,Zt(this,il,"f"),Zt(this,Bc,"f")),"f"),xo(this,Om,Zt(this,Om,"f")?Zt(this,Om,"f").reset():DQe(Zt(this,il,"f"),Zt(this,sm,"f"),Zt(this,JS,"f"),Zt(this,Bc,"f")),"f"),Zt(this,jS,"f")||xo(this,jS,MQe(this,Zt(this,il,"f"),Zt(this,Om,"f"),Zt(this,Bc,"f")),"f"),Zt(this,JS,"f").reset(),xo(this,Qb,null,"f"),xo(this,Ag,"","f"),xo(this,z6,null,"f"),xo(this,Zb,!1,"f"),this.parsed=!1,this}[nZe](f,h){return Zt(this,Bc,"f").path.relative(f,h)}[QV](f,h,S,C=0,A=!1){let j=!!S||A;f=f||Zt(this,V6,"f"),Zt(this,Bo,"f").__=Zt(this,Bc,"f").y18n.__,Zt(this,Bo,"f").configuration=this[E8]();let Z=!!Zt(this,Bo,"f").configuration["populate--"],oe=Object.assign({},Zt(this,Bo,"f").configuration,{"populate--":!0}),ge=Zt(this,Bc,"f").Parser.detailed(f,Object.assign({},Zt(this,Bo,"f"),{configuration:{"parse-positional-numbers":!1,...oe}})),je=Object.assign(ge.argv,Zt(this,S8,"f")),Ae,_e=ge.aliases,Lt=!1,ot=!1;Object.keys(je).forEach(tt=>{tt===Zt(this,$S,"f")&&je[tt]?Lt=!0:tt===Zt(this,Gk,"f")&&je[tt]&&(ot=!0)}),je.$0=this.$0,this.parsed=ge,C===0&&Zt(this,il,"f").clearCachedHelpMessage();try{if(this[ske](),h)return this[P8](je,Z,!!S,!1);Zt(this,$S,"f")&&[Zt(this,$S,"f")].concat(_e[Zt(this,$S,"f")]||[]).filter($i=>$i.length>1).includes(""+je._[je._.length-1])&&(je._.pop(),Lt=!0),xo(this,nse,!1,"f");let tt=Zt(this,Om,"f").getCommands(),Ht=Zt(this,jS,"f").completionKey in je,jr=Lt||Ht||A;if(je._.length){if(tt.length){let Gn;for(let $i=C||0,is;je._[$i]!==void 0;$i++)if(is=String(je._[$i]),tt.includes(is)&&is!==Zt(this,Qb,"f")){let xi=Zt(this,Om,"f").runCommand(is,this,ge,$i+1,A,Lt||ot||A);return this[P8](xi,Z,!!S,!1)}else if(!Gn&&is!==Zt(this,Qb,"f")){Gn=is;break}!Zt(this,Om,"f").hasDefaultCommand()&&Zt(this,ase,"f")&&Gn&&!jr&&Zt(this,sm,"f").recommendCommands(Gn,tt)}Zt(this,Qb,"f")&&je._.includes(Zt(this,Qb,"f"))&&!Ht&&(Zt(this,BS,"f")&&q6(!0),this.showCompletionScript(),this.exit(0))}if(Zt(this,Om,"f").hasDefaultCommand()&&!jr){let Gn=Zt(this,Om,"f").runCommand(null,this,ge,0,A,Lt||ot||A);return this[P8](Gn,Z,!!S,!1)}if(Ht){Zt(this,BS,"f")&&q6(!0),f=[].concat(f);let Gn=f.slice(f.indexOf(`--${Zt(this,jS,"f").completionKey}`)+1);return Zt(this,jS,"f").getCompletion(Gn,($i,is)=>{if($i)throw new Up($i.message);(is||[]).forEach(xi=>{Zt(this,cR,"f").log(xi)}),this.exit(0)}),this[P8](je,!Z,!!S,!1)}if(Zt(this,Zb,"f")||(Lt?(Zt(this,BS,"f")&&q6(!0),j=!0,this.showHelp("log"),this.exit(0)):ot&&(Zt(this,BS,"f")&&q6(!0),j=!0,Zt(this,il,"f").showVersion("log"),this.exit(0))),!j&&Zt(this,Bo,"f").skipValidation.length>0&&(j=Object.keys(je).some(Gn=>Zt(this,Bo,"f").skipValidation.indexOf(Gn)>=0&&je[Gn]===!0)),!j){if(ge.error)throw new Up(ge.error.message);if(!Ht){let Gn=this[pke](_e,{},ge.error);S||(Ae=g8(je,this,Zt(this,JS,"f").getMiddleware(),!0)),Ae=this[GQe](Gn,Ae??je),Wp(Ae)&&!S&&(Ae=Ae.then(()=>g8(je,this,Zt(this,JS,"f").getMiddleware(),!1)))}}}catch(tt){if(tt instanceof Up)Zt(this,il,"f").fail(tt.message,tt);else throw tt}return this[P8](Ae??je,Z,!!S,!0)}[pke](f,h,S,C){let A={...this.getDemandedOptions()};return j=>{if(S)throw new Up(S.message);Zt(this,sm,"f").nonOptionCount(j),Zt(this,sm,"f").requiredArguments(j,A);let Z=!1;Zt(this,C8,"f")&&(Z=Zt(this,sm,"f").unknownCommands(j)),Zt(this,T8,"f")&&!Z?Zt(this,sm,"f").unknownArguments(j,f,h,!!C):Zt(this,k8,"f")&&Zt(this,sm,"f").unknownArguments(j,f,{},!1,!1),Zt(this,sm,"f").limitedChoices(j),Zt(this,sm,"f").implications(j),Zt(this,sm,"f").conflicting(j)}}[iZe](){xo(this,Zb,!0,"f")}[w8](f){if(typeof f=="string")Zt(this,Bo,"f").key[f]=!0;else for(let h of f)Zt(this,Bo,"f").key[h]=!0}};t(mke,"YargsInstance");var dke=mke;function AQe(l){return!!l&&typeof l.getInternalMethods=="function"}t(AQe,"isYargsInstance");var V5t=sZe(GCe),aZe=V5t;var ZV=require("util");function hke(l){console.log(l)}t(hke,"log");function qS(l){console.log(`[INFO] ${l}`)}t(qS,"logInfo");function XV(l){console.log((0,ZV.styleText)("green",`[SUCCESS] ${l}`))}t(XV,"logSuccess");function D8(l,f){l instanceof Error?console.log((0,ZV.styleText)("red",`[ERROR] ${f||l.message}`)):console.log((0,ZV.styleText)("red",`[ERROR] ${l}`))}t(D8,"logError");function lse(l){console.log((0,ZV.styleText)("bgYellow",`==== ${l} ====`))}t(lse,"logBanner");var oZe=jh(require("fs"));function fR(){return"2.0.5"}t(fR,"getVersion");var VXt=jh(lZe());var gke=Symbol("options_key");function Gu(l){return(f,h)=>{var S,C;if(l!=null){let A={...Reflect.getMetadata(gke,f),[h]:{...l,describe:l.envAlias?`${l.describe||""} [${l.envAlias}]`:l.describe,type:l.type||((C=(S=Reflect.getMetadata("design:type",f,h))==null?void 0:S.name)==null?void 0:C.toLowerCase())}};Reflect.defineMetadata(gke,A,f)}}}t(Gu,"YargOption");function uZe(l){let f=Reflect.getMetadata(gke,l.prototype);if(!f)throw new Error(`Options for ${l.name} were not defined`);return f}t(uZe,"getYargsOption");function use(l){return async f=>f.options(U5t(l)).middleware(async h=>await W5t(l,h),!0)}t(use,"getBuilder");function U5t(l){return Object.entries(uZe(l)).reduce((f,[h,S])=>(f[h]=Object.fromEntries(Object.entries(S).filter(([C])=>!["envAlias","default"].includes(C))),f),{})}t(U5t,"getYargsOptions");async function W5t(l,f){let h=new l;for(let[S,C]of Object.entries(uZe(l)))h[S]=f[S]??C.default;return h}t(W5t,"loadYargsConfig");var Kke=require("util");var fZe={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Ambiguous",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I Am a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",424:"Failed Dependency",428:"Precondition Required",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},_Ze={"invalid-schema":"Invalid OpenAPI Schemas","invalid-operation-id":"Invalid Operation IDs","missing-path-parameter":"Missing Path Parameters","not-allowed-inline-enum":"Not Allowed Inline Enums","not-allowed-circular-schema":"Not Allowed Circular Schemas","missing-acl-condition-property":"Missing x-acl Condition Properties","missing-status-code":"Missing HTTP Status Codes","invalid-status-code":"Invalid HTTP Status Codes","multiple-success-status-codes":"Multiple Success HTTP Status Codes"};var y_=t(l=>l.charAt(0).toUpperCase()+l.slice(1),"capitalize"),W6=t(l=>l.charAt(0).toLowerCase()+l.slice(1),"decapitalize"),YV=t(l=>l.replace(/(-\w)/g,f=>f[1].toUpperCase()),"kebabToCamel"),_y=t(l=>l.replace(/(_\w)/g,f=>f[1].toUpperCase()),"snakeToCamel"),pZe=t(l=>l.replace(/[\W_]+(\w)?/g,(f,h)=>(h==null?void 0:h.toUpperCase())??""),"nonWordCharactersToCamel"),yke=t((l,f="")=>l.endsWith(f)?l:`${l}${f}`,"suffixIfNeeded"),dZe=t((l,f)=>l.replace(new RegExp(`${f}$`),""),"removeSuffix"),H5t=t(l=>{var S;let f=l.reduce((C,A)=>({...C,[A]:(C[A]??0)+1}),{});return(S=Object.entries(f).toSorted((C,A)=>C[1]===A[1]?A[0].length-C[0].length:A[1]-C[1])[0])==null?void 0:S[0]},"getLongestMostCommon"),vke=t(l=>{let f=l.flatMap(h=>G5t(mZe(y_(h))));return H5t(f)},"getMostCommonAdjacentCombinationSplit"),mZe=t(l=>l.split(/(?<![A-Z])(?=[A-Z])/).filter(Boolean),"splitByUppercase"),fse=t(l=>mZe(l).join(" "),"camelToSpaceSeparated"),G5t=t((l,f=["dto","by","for","of","in","to","and","with"])=>{var S;let h=[];for(let C=0;C<l.length;C++)if(!f.includes(l[C].toLowerCase()))for(let A=C+1;A<=l.length;A++)f.includes((S=l[A-1])==null?void 0:S.toLowerCase())||h.push(l.slice(C,A).join(""));return h},"getAdjacentStringCombinations"),hZe=t((l,f)=>{let h=f.replace(/es$|s$/g,""),S=new RegExp(`(${W6(h)}|${y_(h)})[a-z]*(?=$|[A-Z])`,"g");return l.replace(S,"")},"removeWord");function A8(l){return pZe(l)}t(A8,"formatTag");function H6(l,f){var S;let h=(S=l.tags)==null?void 0:S[0];return A8(h??f.defaultTag)}t(H6,"getOperationTag");function yv(l,f){var S;let h=f.splitByTags?(S=l.tags)==null?void 0:S[0]:f.defaultTag;return A8(h??f.defaultTag)}t(yv,"getEndpointTag");function gZe(l,f){return f.excludeTags.some(h=>h.toLowerCase()===l.toLowerCase())}t(gZe,"isTagExcluded");var I8="application/json",bke={"Content-Type":I8,Accept:I8},_se="data",Ske="axios",G6="config",Qk="AxiosRequestConfig",pse={defaultImport:Ske,bindings:[Qk],from:"axios"};var qw=jh(dse()),xke=2,yZe=["application/octet-stream","multipart/form-data","application/x-www-form-urlencoded","*/*"],vZe=["query","header","path"],N8=[qw.OpenAPIV3.HttpMethods.GET,qw.OpenAPIV3.HttpMethods.PUT,qw.OpenAPIV3.HttpMethods.POST,qw.OpenAPIV3.HttpMethods.DELETE,qw.OpenAPIV3.HttpMethods.OPTIONS,qw.OpenAPIV3.HttpMethods.HEAD,qw.OpenAPIV3.HttpMethods.PATCH,qw.OpenAPIV3.HttpMethods.TRACE],bZe=["string","number","integer","boolean"],KV=["allOf","anyOf","oneOf"];var SZe="Schema",xZe="Enum",TZe="Body",CZe="Param",kZe="Response",EZe="ErrorResponse",eU="z.void()",_R="z.any()",mse="z.instanceof(Blob)",tU="z.enum",PZe="z.int()",wZe="z.number()",hse="z.string()",DZe="z.email()",AZe="z.url()",IZe="z.uuid()",NZe="z.iso.datetime({ offset: true })",Z6={bindings:["z"],from:"zod"};var zw=Symbol.for("@ts-pattern/matcher"),X5t=Symbol.for("@ts-pattern/isVariadic"),yse="@ts-pattern/anonymous-select-key",Tke=t(l=>!!(l&&typeof l=="object"),"r"),gse=t(l=>l&&!!l[zw],"i"),Yk=t((l,f,h)=>{if(gse(l)){let S=l[zw](),{matched:C,selections:A}=S.match(f);return C&&A&&Object.keys(A).forEach(j=>h(j,A[j])),C}if(Tke(l)){if(!Tke(f))return!1;if(Array.isArray(l)){if(!Array.isArray(f))return!1;let S=[],C=[],A=[];for(let j of l.keys()){let Z=l[j];gse(Z)&&Z[X5t]?A.push(Z):A.length?C.push(Z):S.push(Z)}if(A.length){if(A.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<S.length+C.length)return!1;let j=f.slice(0,S.length),Z=C.length===0?[]:f.slice(-C.length),oe=f.slice(S.length,C.length===0?1/0:-C.length);return S.every((ge,je)=>Yk(ge,j[je],h))&&C.every((ge,je)=>Yk(ge,Z[je],h))&&(A.length===0||Yk(A[0],oe,h))}return l.length===f.length&&l.every((j,Z)=>Yk(j,f[Z],h))}return Reflect.ownKeys(l).every(S=>{let C=l[S];return(S in f||gse(A=C)&&A[zw]().matcherType==="optional")&&Yk(C,f[S],h);var A})}return Object.is(f,l)},"s"),t4=t(l=>{var f,h,S;return Tke(l)?gse(l)?(f=(h=(S=l[zw]()).getSelectionKeys)==null?void 0:h.call(S))!=null?f:[]:Array.isArray(l)?nU(l,t4):nU(Object.values(l),t4):[]},"o"),nU=t((l,f)=>l.reduce((h,S)=>h.concat(f(S)),[]),"c");function zS(l){return Object.assign(l,{optional:t(()=>Y5t(l),"optional"),and:t(f=>id(l,f),"and"),or:t(f=>K5t(l,f),"or"),select:t(f=>f===void 0?OZe(l):OZe(f,l),"select")})}t(zS,"u");function Y5t(l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return f===void 0?(t4(l).forEach(C=>S(C,void 0)),{matched:!0,selections:h}):{matched:Yk(l,f,S),selections:h}},"match"),getSelectionKeys:t(()=>t4(l),"getSelectionKeys"),matcherType:"optional"})})}t(Y5t,"h");function id(...l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return{matched:l.every(C=>Yk(C,f,S)),selections:h}},"match"),getSelectionKeys:t(()=>nU(l,t4),"getSelectionKeys"),matcherType:"and"})})}t(id,"m");function K5t(...l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return nU(l,t4).forEach(C=>S(C,void 0)),{matched:l.some(C=>Yk(C,f,S)),selections:h}},"match"),getSelectionKeys:t(()=>nU(l,t4),"getSelectionKeys"),matcherType:"or"})})}t(K5t,"d");function Lf(l){return{[zw]:()=>({match:t(f=>({matched:!!l(f)}),"match")})}}t(Lf,"p");function OZe(...l){let f=typeof l[0]=="string"?l[0]:void 0,h=l.length===2?l[1]:typeof l[0]=="string"?void 0:l[0];return zS({[zw]:()=>({match:t(S=>{let C={[f??yse]:S};return{matched:h===void 0||Yk(h,S,(A,j)=>{C[A]=j}),selections:C}},"match"),getSelectionKeys:t(()=>[f??yse].concat(h===void 0?[]:t4(h)),"getSelectionKeys")})})}t(OZe,"y");function Zk(l){return typeof l=="number"}t(Zk,"v");function X6(l){return typeof l=="string"}t(X6,"b");function Y6(l){return typeof l=="bigint"}t(Y6,"w");var nYt=zS(Lf(function(l){return!0}));var K6=t(l=>Object.assign(zS(l),{startsWith:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.startsWith(h)))));var h},"startsWith"),endsWith:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.endsWith(h)))));var h},"endsWith"),minLength:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length>=h))(f))),"minLength"),length:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length===h))(f))),"length"),maxLength:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length<=h))(f))),"maxLength"),includes:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.includes(h)))));var h},"includes"),regex:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&!!S.match(h)))));var h},"regex")}),"j"),iYt=K6(Lf(X6)),Xk=t(l=>Object.assign(zS(l),{between:t((f,h)=>Xk(id(l,((S,C)=>Lf(A=>Zk(A)&&S<=A&&C>=A))(f,h))),"between"),lt:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S<h))(f))),"lt"),gt:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S>h))(f))),"gt"),lte:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S<=h))(f))),"lte"),gte:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S>=h))(f))),"gte"),int:t(()=>Xk(id(l,Lf(f=>Zk(f)&&Number.isInteger(f)))),"int"),finite:t(()=>Xk(id(l,Lf(f=>Zk(f)&&Number.isFinite(f)))),"finite"),positive:t(()=>Xk(id(l,Lf(f=>Zk(f)&&f>0))),"positive"),negative:t(()=>Xk(id(l,Lf(f=>Zk(f)&&f<0))),"negative")}),"x"),sYt=Xk(Lf(Zk)),e4=t(l=>Object.assign(zS(l),{between:t((f,h)=>e4(id(l,((S,C)=>Lf(A=>Y6(A)&&S<=A&&C>=A))(f,h))),"between"),lt:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S<h))(f))),"lt"),gt:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S>h))(f))),"gt"),lte:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S<=h))(f))),"lte"),gte:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S>=h))(f))),"gte"),positive:t(()=>e4(id(l,Lf(f=>Y6(f)&&f>0))),"positive"),negative:t(()=>e4(id(l,Lf(f=>Y6(f)&&f<0))),"negative")}),"A"),aYt=e4(Lf(Y6)),oYt=zS(Lf(function(l){return typeof l=="boolean"})),cYt=zS(Lf(function(l){return typeof l=="symbol"})),lYt=zS(Lf(function(l){return l==null})),uYt=zS(Lf(function(l){return l!=null}));var Pke=class Pke extends Error{constructor(f){let h;try{h=JSON.stringify(f)}catch{h=f}super(`Pattern matching error: no pattern matches value ${h}`),this.input=void 0,this.input=f}};t(Pke,"W");var Cke=Pke,kke={matched:!1,value:void 0};function l0(l){return new Eke(l,kke)}t(l0,"z");var rU=class rU{constructor(f,h){this.input=void 0,this.state=void 0,this.input=f,this.state=h}with(...f){if(this.state.matched)return this;let h=f[f.length-1],S=[f[0]],C;f.length===3&&typeof f[1]=="function"?C=f[1]:f.length>2&&S.push(...f.slice(1,f.length-1));let A=!1,j={},Z=t((ge,je)=>{A=!0,j[ge]=je},"a"),oe=!S.some(ge=>Yk(ge,this.input,Z))||C&&!C(this.input)?kke:{matched:!0,value:h(A?yse in j?j[yse]:j:this.input,this.input)};return new rU(this.input,oe)}when(f,h){if(this.state.matched)return this;let S=!!f(this.input);return new rU(this.input,S?{matched:!0,value:h(this.input,this.input)}:kke)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Cke(this.input)}run(){return this.exhaustive()}returnType(){return this}};t(rU,"I");var Eke=rU;function xf(l){return l!=null&&Object.prototype.hasOwnProperty.call(l,"$ref")}t(xf,"isReferenceObject");function py(l){return!xf(l)}t(py,"isSchemaObject");function vse(l){return l.type==="array"}t(vse,"isArraySchemaObject");function FZe(l){if(!l.allOf)throw new Error("Function inferRequiredSchema is specialized to handle item with required only in an allOf array.");let[f,h]=l.allOf.reduce((C,A)=>{if(eFt(A)){let j=A.required;C[0].push(...j??[])}else C[1].push(A);return C},[[],[]]),S={properties:f.reduce((C,A)=>(C[A]={},C),{}),type:"object",required:f};return{noRequiredOnlyAllof:h,composedRequiredSchema:S,patchRequiredSchemaInLoop:t((C,A)=>{if(xf(C)){let j=A(C.$ref);j&&S.required.forEach(Z=>{var oe;S.properties[Z]=((oe=j==null?void 0:j.properties)==null?void 0:oe[Z])??{}})}else{let j=C.properties??{};S.required.forEach(Z=>{j[Z]&&(S.properties[Z]=j[Z]??{})})}},"patchRequiredSchemaInLoop")}}t(FZe,"inferRequiredSchema");var eFt=t(l=>!xf(l)&&!!l.required&&!l.type&&!l.properties&&!(l!=null&&l.allOf)&&!(l!=null&&l.anyOf)&&!l.oneOf,"isBrokenAllOfItem");var RZe=t(l=>`#/components/schemas/${l}`,"getSchemaRef"),O8=t(l=>l[1]==="/"?l:"#/"+l.slice(1),"autocorrectRef"),pR=t(l=>O8(l).split("/").at(-1),"getSchemaNameByRef");function Dke(l){let f=tFt(l).normalize("NFKD").trim().replace(/\s+/g,"_").replace(/--+/g,"-").replace(/-+/g,"_").replace(/[^\w-]+/g,"_");return _y(f)}t(Dke,"normalizeString");function Ake(l){return/^[a-zA-Z]\w*$/.test(l)?l:`"${l}"`}t(Ake,"wrapWithQuotesIfNeeded");function LZe(l){return typeof l=="string"&&l.startsWith('"')&&l.endsWith('"')?l.slice(1,-1):l}t(LZe,"unwrapQuotesIfNeeded");function tFt(l){let f=Number(l[0]);return typeof f=="number"&&!Number.isNaN(f)?"_"+l:l}t(tFt,"prefixStringStartingWithNumberIfNeeded");function Ike(l){let f=l.replaceAll("_","#");return _y(f.replaceAll("-","_")).replaceAll("#","_")}t(Ike,"pathParamToVariableName");var F8=t(l=>bZe.includes(l),"isPrimitiveType");function jZe(l){return l.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/([\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F\uFFFE\uFFFF])/g,(f,h)=>{let S=h.codePointAt(),C=S.toString(16);return S<=255?`\\x${`00${C}`.slice(-2)}`:`\\u${`0000${C}`.slice(-4)}`}).replace(/\//g,"\\/")}t(jZe,"escapeControlCharacters");function Kk(l){return l.includes("application/")&&l.includes("json")||yZe.includes(l)||l.includes("text/")}t(Kk,"isParamMediaTypeAllowed");function iU(l){return l>=200&&l<300}t(iU,"isMainResponseStatus");function bse(l){return!(l>=200&&l<300)}t(bse,"isErrorStatus");function Sse(l){return l.startsWith("application/")}t(Sse,"isMediaTypeAllowed");var MZe=/({\w+})/g,rFt=/[^\w\-]+/g;function BZe(l){l=y_(YV(l.replaceAll("/","-")).replaceAll("-",""));let f=[...l.matchAll(MZe)];if(f.length>0){let h=f.toSorted((S,C)=>S.index-C.index)[f.length-1][0];l=`${l.replace(MZe,"")}By${y_(h.slice(1,-1))}`}return l.replace(rFt,"_")}t(BZe,"pathToVariableName");var wke=/{(\b\w+(?:-\w+)*\b)}/g;function JZe(l){let f=l.match(wke);return f===null?l.replaceAll(wke,":$1"):(f.forEach(h=>{let S=Ike(h.replaceAll(wke,":$1"));l=l.replaceAll(h,S)}),l)}t(JZe,"replaceHyphenatedPath");var xse=t(l=>{let f=l["x-enumNames"],h=Array.isArray(f)&&f.length>0,S=!!l.schema&&py(l.schema)&&l.schema.type==="string";return h&&S},"isSortingParameterObject"),M8=t((l,f)=>f.excludePathRegex?new RegExp(f.excludePathRegex).test(l):!1,"isPathExcluded");function eE({schema:l,meta:f,options:h}){let S=[];l0(l.type).with("string",()=>S.push(sFt(l))).with("number","integer",()=>S.push(oFt(l))).with("array",()=>S.push(cFt(l))).otherwise(()=>{}),typeof l.description=="string"&&l.description!==""&&h.withDescription&&([`
|
|
568
|
+
`,"f"),xo(this,Ag,Zt(this,Ag,"f")+f.join(" "),"f")},"error")}}[ike](f){aR(Zt(this,Bo,"f")).forEach(h=>{if((C=>C==="configObjects")(h))return;let S=Zt(this,Bo,"f")[h];Array.isArray(S)?S.includes(f)&&S.splice(S.indexOf(f),1):typeof S=="object"&&delete S[f]}),delete Zt(this,il,"f").getDescriptions()[f]}[qQe](f,h,S){Zt(this,tse,"f")[S]||(Zt(this,Bc,"f").process.emitWarning(f,h),Zt(this,tse,"f")[S]=!0)}[zQe](){Zt(this,rse,"f").push({options:Zt(this,Bo,"f"),configObjects:Zt(this,Bo,"f").configObjects.slice(0),exitProcess:Zt(this,BS,"f"),groups:Zt(this,Hk,"f"),strict:Zt(this,T8,"f"),strictCommands:Zt(this,C8,"f"),strictOptions:Zt(this,k8,"f"),completionCommand:Zt(this,Qb,"f"),output:Zt(this,Ag,"f"),exitError:Zt(this,z6,"f"),hasOutput:Zt(this,Zb,"f"),parsed:this.parsed,parseFn:Zt(this,Xb,"f"),parseContext:Zt(this,S8,"f")}),Zt(this,il,"f").freeze(),Zt(this,sm,"f").freeze(),Zt(this,Om,"f").freeze(),Zt(this,JS,"f").freeze()}[VQe](){let f="",h;return/\b(node|iojs|electron)(\.exe)?$/.test(Zt(this,Bc,"f").process.argv()[0])?h=Zt(this,Bc,"f").process.argv().slice(1,2):h=Zt(this,Bc,"f").process.argv().slice(0,1),f=h.map(S=>{let C=this[nZe](Zt(this,v8,"f"),S);return S.match(/^(\/|([a-zA-Z]:)?\\)/)&&C.length<S.length?C:S}).join(" ").trim(),Zt(this,Bc,"f").getEnv("_")&&Zt(this,Bc,"f").getProcessArgvBin()===Zt(this,Bc,"f").getEnv("_")&&(f=Zt(this,Bc,"f").getEnv("_").replace(`${Zt(this,Bc,"f").path.dirname(Zt(this,Bc,"f").process.execPath())}/`,"")),f}[E8](){return Zt(this,sse,"f")}[UQe](){return Zt(this,ose,"f")}[ske](){if(!Zt(this,b8,"f"))return;let f=Zt(this,Bc,"f").getEnv("LC_ALL")||Zt(this,Bc,"f").getEnv("LC_MESSAGES")||Zt(this,Bc,"f").getEnv("LANG")||Zt(this,Bc,"f").getEnv("LANGUAGE")||"en_US";this.locale(f.replace(/[.:].*/,""))}[WQe](){return this[ake]().version||"unknown"}[HQe](f){let h=f["--"]?f["--"]:f._;for(let S=0,C;(C=h[S])!==void 0;S++)Zt(this,Bc,"f").Parser.looksLikeNumber(C)&&Number.isSafeInteger(Math.floor(parseFloat(`${C}`)))&&(h[S]=Number(C));return f}[ake](f){let h=f||"*";if(Zt(this,lR,"f")[h])return Zt(this,lR,"f")[h];let S={};try{let C=f||Zt(this,Bc,"f").mainFilename;!f&&Zt(this,Bc,"f").path.extname(C)&&(C=Zt(this,Bc,"f").path.dirname(C));let A=Zt(this,Bc,"f").findUp(C,(j,Z)=>{if(Z.includes("package.json"))return"package.json"});p1(A,void 0,Zt(this,Bc,"f")),S=JSON.parse(Zt(this,Bc,"f").readFileSync(A,"utf8"))}catch{}return Zt(this,lR,"f")[h]=S||{},Zt(this,lR,"f")[h]}[U6](f,h){h=[].concat(h),h.forEach(S=>{S=this[lke](S),Zt(this,Bo,"f")[f].push(S)})}[uR](f,h,S,C){this[cke](f,h,S,C,(A,j,Z)=>{Zt(this,Bo,"f")[A][j]=Z})}[oke](f,h,S,C){this[cke](f,h,S,C,(A,j,Z)=>{Zt(this,Bo,"f")[A][j]=(Zt(this,Bo,"f")[A][j]||[]).concat(Z)})}[cke](f,h,S,C,A){if(Array.isArray(S))S.forEach(j=>{f(j,C)});else if((j=>typeof j=="object")(S))for(let j of aR(S))f(j,S[j]);else A(h,this[lke](S),C)}[lke](f){return f==="__proto__"?"___proto___":f}[uke](f,h){return this[uR](this[uke].bind(this),"key",f,h),this}[fke](){var f,h,S,C,A,j,Z,oe,ge,je,Ae,_e;let Lt=Zt(this,rse,"f").pop();p1(Lt,void 0,Zt(this,Bc,"f"));let ot;f=this,h=this,S=this,C=this,A=this,j=this,Z=this,oe=this,ge=this,je=this,Ae=this,_e=this,{options:{set value(tt){xo(f,Bo,tt,"f")}}.value,configObjects:ot,exitProcess:{set value(tt){xo(h,BS,tt,"f")}}.value,groups:{set value(tt){xo(S,Hk,tt,"f")}}.value,output:{set value(tt){xo(C,Ag,tt,"f")}}.value,exitError:{set value(tt){xo(A,z6,tt,"f")}}.value,hasOutput:{set value(tt){xo(j,Zb,tt,"f")}}.value,parsed:this.parsed,strict:{set value(tt){xo(Z,T8,tt,"f")}}.value,strictCommands:{set value(tt){xo(oe,C8,tt,"f")}}.value,strictOptions:{set value(tt){xo(ge,k8,tt,"f")}}.value,completionCommand:{set value(tt){xo(je,Qb,tt,"f")}}.value,parseFn:{set value(tt){xo(Ae,Xb,tt,"f")}}.value,parseContext:{set value(tt){xo(_e,S8,tt,"f")}}.value}=Lt,Zt(this,Bo,"f").configObjects=ot,Zt(this,il,"f").unfreeze(),Zt(this,sm,"f").unfreeze(),Zt(this,Om,"f").unfreeze(),Zt(this,JS,"f").unfreeze()}[GQe](f,h){return y8(h,S=>(f(S),S))}getInternalMethods(){return{getCommandInstance:this[QQe].bind(this),getContext:this[ZQe].bind(this),getHasOutput:this[XQe].bind(this),getLoggerInstance:this[YQe].bind(this),getParseContext:this[KQe].bind(this),getParserConfiguration:this[E8].bind(this),getUsageConfiguration:this[UQe].bind(this),getUsageInstance:this[eZe].bind(this),getValidationInstance:this[tZe].bind(this),hasParseCallback:this[cse].bind(this),isGlobalContext:this[rZe].bind(this),postProcess:this[P8].bind(this),reset:this[_ke].bind(this),runValidation:this[pke].bind(this),runYargsParserAndExecuteCommands:this[QV].bind(this),setHasOutput:this[iZe].bind(this)}}[QQe](){return Zt(this,Om,"f")}[ZQe](){return Zt(this,GV,"f")}[XQe](){return Zt(this,Zb,"f")}[YQe](){return Zt(this,cR,"f")}[KQe](){return Zt(this,S8,"f")||{}}[eZe](){return Zt(this,il,"f")}[tZe](){return Zt(this,sm,"f")}[cse](){return!!Zt(this,Xb,"f")}[rZe](){return Zt(this,nse,"f")}[P8](f,h,S,C){return S||Wp(f)||(h||(f=this[JQe](f)),(this[E8]()["parse-positional-numbers"]||this[E8]()["parse-positional-numbers"]===void 0)&&(f=this[HQe](f)),C&&(f=g8(f,this,Zt(this,JS,"f").getMiddleware(),!1))),f}[_ke](f={}){xo(this,Bo,Zt(this,Bo,"f")||{},"f");let h={};h.local=Zt(this,Bo,"f").local||[],h.configObjects=Zt(this,Bo,"f").configObjects||[];let S={};h.local.forEach(j=>{S[j]=!0,(f[j]||[]).forEach(Z=>{S[Z]=!0})}),Object.assign(Zt(this,x8,"f"),Object.keys(Zt(this,Hk,"f")).reduce((j,Z)=>{let oe=Zt(this,Hk,"f")[Z].filter(ge=>!(ge in S));return oe.length>0&&(j[Z]=oe),j},{})),xo(this,Hk,{},"f");let C=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return C.forEach(j=>{h[j]=(Zt(this,Bo,"f")[j]||[]).filter(Z=>!S[Z])}),A.forEach(j=>{h[j]=$6(Zt(this,Bo,"f")[j],Z=>!S[Z])}),h.envPrefix=Zt(this,Bo,"f").envPrefix,xo(this,Bo,h,"f"),xo(this,il,Zt(this,il,"f")?Zt(this,il,"f").reset(S):NQe(this,Zt(this,Bc,"f")),"f"),xo(this,sm,Zt(this,sm,"f")?Zt(this,sm,"f").reset(S):jQe(this,Zt(this,il,"f"),Zt(this,Bc,"f")),"f"),xo(this,Om,Zt(this,Om,"f")?Zt(this,Om,"f").reset():DQe(Zt(this,il,"f"),Zt(this,sm,"f"),Zt(this,JS,"f"),Zt(this,Bc,"f")),"f"),Zt(this,jS,"f")||xo(this,jS,MQe(this,Zt(this,il,"f"),Zt(this,Om,"f"),Zt(this,Bc,"f")),"f"),Zt(this,JS,"f").reset(),xo(this,Qb,null,"f"),xo(this,Ag,"","f"),xo(this,z6,null,"f"),xo(this,Zb,!1,"f"),this.parsed=!1,this}[nZe](f,h){return Zt(this,Bc,"f").path.relative(f,h)}[QV](f,h,S,C=0,A=!1){let j=!!S||A;f=f||Zt(this,V6,"f"),Zt(this,Bo,"f").__=Zt(this,Bc,"f").y18n.__,Zt(this,Bo,"f").configuration=this[E8]();let Z=!!Zt(this,Bo,"f").configuration["populate--"],oe=Object.assign({},Zt(this,Bo,"f").configuration,{"populate--":!0}),ge=Zt(this,Bc,"f").Parser.detailed(f,Object.assign({},Zt(this,Bo,"f"),{configuration:{"parse-positional-numbers":!1,...oe}})),je=Object.assign(ge.argv,Zt(this,S8,"f")),Ae,_e=ge.aliases,Lt=!1,ot=!1;Object.keys(je).forEach(tt=>{tt===Zt(this,$S,"f")&&je[tt]?Lt=!0:tt===Zt(this,Gk,"f")&&je[tt]&&(ot=!0)}),je.$0=this.$0,this.parsed=ge,C===0&&Zt(this,il,"f").clearCachedHelpMessage();try{if(this[ske](),h)return this[P8](je,Z,!!S,!1);Zt(this,$S,"f")&&[Zt(this,$S,"f")].concat(_e[Zt(this,$S,"f")]||[]).filter($i=>$i.length>1).includes(""+je._[je._.length-1])&&(je._.pop(),Lt=!0),xo(this,nse,!1,"f");let tt=Zt(this,Om,"f").getCommands(),Ht=Zt(this,jS,"f").completionKey in je,jr=Lt||Ht||A;if(je._.length){if(tt.length){let Gn;for(let $i=C||0,is;je._[$i]!==void 0;$i++)if(is=String(je._[$i]),tt.includes(is)&&is!==Zt(this,Qb,"f")){let xi=Zt(this,Om,"f").runCommand(is,this,ge,$i+1,A,Lt||ot||A);return this[P8](xi,Z,!!S,!1)}else if(!Gn&&is!==Zt(this,Qb,"f")){Gn=is;break}!Zt(this,Om,"f").hasDefaultCommand()&&Zt(this,ase,"f")&&Gn&&!jr&&Zt(this,sm,"f").recommendCommands(Gn,tt)}Zt(this,Qb,"f")&&je._.includes(Zt(this,Qb,"f"))&&!Ht&&(Zt(this,BS,"f")&&q6(!0),this.showCompletionScript(),this.exit(0))}if(Zt(this,Om,"f").hasDefaultCommand()&&!jr){let Gn=Zt(this,Om,"f").runCommand(null,this,ge,0,A,Lt||ot||A);return this[P8](Gn,Z,!!S,!1)}if(Ht){Zt(this,BS,"f")&&q6(!0),f=[].concat(f);let Gn=f.slice(f.indexOf(`--${Zt(this,jS,"f").completionKey}`)+1);return Zt(this,jS,"f").getCompletion(Gn,($i,is)=>{if($i)throw new Up($i.message);(is||[]).forEach(xi=>{Zt(this,cR,"f").log(xi)}),this.exit(0)}),this[P8](je,!Z,!!S,!1)}if(Zt(this,Zb,"f")||(Lt?(Zt(this,BS,"f")&&q6(!0),j=!0,this.showHelp("log"),this.exit(0)):ot&&(Zt(this,BS,"f")&&q6(!0),j=!0,Zt(this,il,"f").showVersion("log"),this.exit(0))),!j&&Zt(this,Bo,"f").skipValidation.length>0&&(j=Object.keys(je).some(Gn=>Zt(this,Bo,"f").skipValidation.indexOf(Gn)>=0&&je[Gn]===!0)),!j){if(ge.error)throw new Up(ge.error.message);if(!Ht){let Gn=this[pke](_e,{},ge.error);S||(Ae=g8(je,this,Zt(this,JS,"f").getMiddleware(),!0)),Ae=this[GQe](Gn,Ae??je),Wp(Ae)&&!S&&(Ae=Ae.then(()=>g8(je,this,Zt(this,JS,"f").getMiddleware(),!1)))}}}catch(tt){if(tt instanceof Up)Zt(this,il,"f").fail(tt.message,tt);else throw tt}return this[P8](Ae??je,Z,!!S,!0)}[pke](f,h,S,C){let A={...this.getDemandedOptions()};return j=>{if(S)throw new Up(S.message);Zt(this,sm,"f").nonOptionCount(j),Zt(this,sm,"f").requiredArguments(j,A);let Z=!1;Zt(this,C8,"f")&&(Z=Zt(this,sm,"f").unknownCommands(j)),Zt(this,T8,"f")&&!Z?Zt(this,sm,"f").unknownArguments(j,f,h,!!C):Zt(this,k8,"f")&&Zt(this,sm,"f").unknownArguments(j,f,{},!1,!1),Zt(this,sm,"f").limitedChoices(j),Zt(this,sm,"f").implications(j),Zt(this,sm,"f").conflicting(j)}}[iZe](){xo(this,Zb,!0,"f")}[w8](f){if(typeof f=="string")Zt(this,Bo,"f").key[f]=!0;else for(let h of f)Zt(this,Bo,"f").key[h]=!0}};t(mke,"YargsInstance");var dke=mke;function AQe(l){return!!l&&typeof l.getInternalMethods=="function"}t(AQe,"isYargsInstance");var V5t=sZe(GCe),aZe=V5t;var ZV=require("util");function hke(l){console.log(l)}t(hke,"log");function qS(l){console.log(`[INFO] ${l}`)}t(qS,"logInfo");function XV(l){console.log((0,ZV.styleText)("green",`[SUCCESS] ${l}`))}t(XV,"logSuccess");function D8(l,f){l instanceof Error?console.log((0,ZV.styleText)("red",`[ERROR] ${f||l.message}`)):console.log((0,ZV.styleText)("red",`[ERROR] ${l}`))}t(D8,"logError");function lse(l){console.log((0,ZV.styleText)("bgYellow",`==== ${l} ====`))}t(lse,"logBanner");var oZe=jh(require("fs"));function fR(){return"2.0.6"}t(fR,"getVersion");var VXt=jh(lZe());var gke=Symbol("options_key");function Gu(l){return(f,h)=>{var S,C;if(l!=null){let A={...Reflect.getMetadata(gke,f),[h]:{...l,describe:l.envAlias?`${l.describe||""} [${l.envAlias}]`:l.describe,type:l.type||((C=(S=Reflect.getMetadata("design:type",f,h))==null?void 0:S.name)==null?void 0:C.toLowerCase())}};Reflect.defineMetadata(gke,A,f)}}}t(Gu,"YargOption");function uZe(l){let f=Reflect.getMetadata(gke,l.prototype);if(!f)throw new Error(`Options for ${l.name} were not defined`);return f}t(uZe,"getYargsOption");function use(l){return async f=>f.options(U5t(l)).middleware(async h=>await W5t(l,h),!0)}t(use,"getBuilder");function U5t(l){return Object.entries(uZe(l)).reduce((f,[h,S])=>(f[h]=Object.fromEntries(Object.entries(S).filter(([C])=>!["envAlias","default"].includes(C))),f),{})}t(U5t,"getYargsOptions");async function W5t(l,f){let h=new l;for(let[S,C]of Object.entries(uZe(l)))h[S]=f[S]??C.default;return h}t(W5t,"loadYargsConfig");var Kke=require("util");var fZe={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Ambiguous",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I Am a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",424:"Failed Dependency",428:"Precondition Required",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},_Ze={"invalid-schema":"Invalid OpenAPI Schemas","invalid-operation-id":"Invalid Operation IDs","missing-path-parameter":"Missing Path Parameters","not-allowed-inline-enum":"Not Allowed Inline Enums","not-allowed-circular-schema":"Not Allowed Circular Schemas","missing-acl-condition-property":"Missing x-acl Condition Properties","missing-status-code":"Missing HTTP Status Codes","invalid-status-code":"Invalid HTTP Status Codes","multiple-success-status-codes":"Multiple Success HTTP Status Codes"};var y_=t(l=>l.charAt(0).toUpperCase()+l.slice(1),"capitalize"),W6=t(l=>l.charAt(0).toLowerCase()+l.slice(1),"decapitalize"),YV=t(l=>l.replace(/(-\w)/g,f=>f[1].toUpperCase()),"kebabToCamel"),_y=t(l=>l.replace(/(_\w)/g,f=>f[1].toUpperCase()),"snakeToCamel"),pZe=t(l=>l.replace(/[\W_]+(\w)?/g,(f,h)=>(h==null?void 0:h.toUpperCase())??""),"nonWordCharactersToCamel"),yke=t((l,f="")=>l.endsWith(f)?l:`${l}${f}`,"suffixIfNeeded"),dZe=t((l,f)=>l.replace(new RegExp(`${f}$`),""),"removeSuffix"),H5t=t(l=>{var S;let f=l.reduce((C,A)=>({...C,[A]:(C[A]??0)+1}),{});return(S=Object.entries(f).toSorted((C,A)=>C[1]===A[1]?A[0].length-C[0].length:A[1]-C[1])[0])==null?void 0:S[0]},"getLongestMostCommon"),vke=t(l=>{let f=l.flatMap(h=>G5t(mZe(y_(h))));return H5t(f)},"getMostCommonAdjacentCombinationSplit"),mZe=t(l=>l.split(/(?<![A-Z])(?=[A-Z])/).filter(Boolean),"splitByUppercase"),fse=t(l=>mZe(l).join(" "),"camelToSpaceSeparated"),G5t=t((l,f=["dto","by","for","of","in","to","and","with"])=>{var S;let h=[];for(let C=0;C<l.length;C++)if(!f.includes(l[C].toLowerCase()))for(let A=C+1;A<=l.length;A++)f.includes((S=l[A-1])==null?void 0:S.toLowerCase())||h.push(l.slice(C,A).join(""));return h},"getAdjacentStringCombinations"),hZe=t((l,f)=>{let h=f.replace(/es$|s$/g,""),S=new RegExp(`(${W6(h)}|${y_(h)})[a-z]*(?=$|[A-Z])`,"g");return l.replace(S,"")},"removeWord");function A8(l){return pZe(l)}t(A8,"formatTag");function H6(l,f){var S;let h=(S=l.tags)==null?void 0:S[0];return A8(h??f.defaultTag)}t(H6,"getOperationTag");function yv(l,f){var S;let h=f.splitByTags?(S=l.tags)==null?void 0:S[0]:f.defaultTag;return A8(h??f.defaultTag)}t(yv,"getEndpointTag");function gZe(l,f){return f.excludeTags.some(h=>h.toLowerCase()===l.toLowerCase())}t(gZe,"isTagExcluded");var I8="application/json",bke={"Content-Type":I8,Accept:I8},_se="data",Ske="axios",G6="config",Qk="AxiosRequestConfig",pse={defaultImport:Ske,bindings:[Qk],from:"axios"};var qw=jh(dse()),xke=2,yZe=["application/octet-stream","multipart/form-data","application/x-www-form-urlencoded","*/*"],vZe=["query","header","path"],N8=[qw.OpenAPIV3.HttpMethods.GET,qw.OpenAPIV3.HttpMethods.PUT,qw.OpenAPIV3.HttpMethods.POST,qw.OpenAPIV3.HttpMethods.DELETE,qw.OpenAPIV3.HttpMethods.OPTIONS,qw.OpenAPIV3.HttpMethods.HEAD,qw.OpenAPIV3.HttpMethods.PATCH,qw.OpenAPIV3.HttpMethods.TRACE],bZe=["string","number","integer","boolean"],KV=["allOf","anyOf","oneOf"];var SZe="Schema",xZe="Enum",TZe="Body",CZe="Param",kZe="Response",EZe="ErrorResponse",eU="z.void()",_R="z.any()",mse="z.instanceof(Blob)",tU="z.enum",PZe="z.int()",wZe="z.number()",hse="z.string()",DZe="z.email()",AZe="z.url()",IZe="z.uuid()",NZe="z.iso.datetime({ offset: true })",Z6={bindings:["z"],from:"zod"};var zw=Symbol.for("@ts-pattern/matcher"),X5t=Symbol.for("@ts-pattern/isVariadic"),yse="@ts-pattern/anonymous-select-key",Tke=t(l=>!!(l&&typeof l=="object"),"r"),gse=t(l=>l&&!!l[zw],"i"),Yk=t((l,f,h)=>{if(gse(l)){let S=l[zw](),{matched:C,selections:A}=S.match(f);return C&&A&&Object.keys(A).forEach(j=>h(j,A[j])),C}if(Tke(l)){if(!Tke(f))return!1;if(Array.isArray(l)){if(!Array.isArray(f))return!1;let S=[],C=[],A=[];for(let j of l.keys()){let Z=l[j];gse(Z)&&Z[X5t]?A.push(Z):A.length?C.push(Z):S.push(Z)}if(A.length){if(A.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<S.length+C.length)return!1;let j=f.slice(0,S.length),Z=C.length===0?[]:f.slice(-C.length),oe=f.slice(S.length,C.length===0?1/0:-C.length);return S.every((ge,je)=>Yk(ge,j[je],h))&&C.every((ge,je)=>Yk(ge,Z[je],h))&&(A.length===0||Yk(A[0],oe,h))}return l.length===f.length&&l.every((j,Z)=>Yk(j,f[Z],h))}return Reflect.ownKeys(l).every(S=>{let C=l[S];return(S in f||gse(A=C)&&A[zw]().matcherType==="optional")&&Yk(C,f[S],h);var A})}return Object.is(f,l)},"s"),t4=t(l=>{var f,h,S;return Tke(l)?gse(l)?(f=(h=(S=l[zw]()).getSelectionKeys)==null?void 0:h.call(S))!=null?f:[]:Array.isArray(l)?nU(l,t4):nU(Object.values(l),t4):[]},"o"),nU=t((l,f)=>l.reduce((h,S)=>h.concat(f(S)),[]),"c");function zS(l){return Object.assign(l,{optional:t(()=>Y5t(l),"optional"),and:t(f=>id(l,f),"and"),or:t(f=>K5t(l,f),"or"),select:t(f=>f===void 0?OZe(l):OZe(f,l),"select")})}t(zS,"u");function Y5t(l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return f===void 0?(t4(l).forEach(C=>S(C,void 0)),{matched:!0,selections:h}):{matched:Yk(l,f,S),selections:h}},"match"),getSelectionKeys:t(()=>t4(l),"getSelectionKeys"),matcherType:"optional"})})}t(Y5t,"h");function id(...l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return{matched:l.every(C=>Yk(C,f,S)),selections:h}},"match"),getSelectionKeys:t(()=>nU(l,t4),"getSelectionKeys"),matcherType:"and"})})}t(id,"m");function K5t(...l){return zS({[zw]:()=>({match:t(f=>{let h={},S=t((C,A)=>{h[C]=A},"r");return nU(l,t4).forEach(C=>S(C,void 0)),{matched:l.some(C=>Yk(C,f,S)),selections:h}},"match"),getSelectionKeys:t(()=>nU(l,t4),"getSelectionKeys"),matcherType:"or"})})}t(K5t,"d");function Lf(l){return{[zw]:()=>({match:t(f=>({matched:!!l(f)}),"match")})}}t(Lf,"p");function OZe(...l){let f=typeof l[0]=="string"?l[0]:void 0,h=l.length===2?l[1]:typeof l[0]=="string"?void 0:l[0];return zS({[zw]:()=>({match:t(S=>{let C={[f??yse]:S};return{matched:h===void 0||Yk(h,S,(A,j)=>{C[A]=j}),selections:C}},"match"),getSelectionKeys:t(()=>[f??yse].concat(h===void 0?[]:t4(h)),"getSelectionKeys")})})}t(OZe,"y");function Zk(l){return typeof l=="number"}t(Zk,"v");function X6(l){return typeof l=="string"}t(X6,"b");function Y6(l){return typeof l=="bigint"}t(Y6,"w");var nYt=zS(Lf(function(l){return!0}));var K6=t(l=>Object.assign(zS(l),{startsWith:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.startsWith(h)))));var h},"startsWith"),endsWith:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.endsWith(h)))));var h},"endsWith"),minLength:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length>=h))(f))),"minLength"),length:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length===h))(f))),"length"),maxLength:t(f=>K6(id(l,(h=>Lf(S=>X6(S)&&S.length<=h))(f))),"maxLength"),includes:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&S.includes(h)))));var h},"includes"),regex:t(f=>{return K6(id(l,(h=f,Lf(S=>X6(S)&&!!S.match(h)))));var h},"regex")}),"j"),iYt=K6(Lf(X6)),Xk=t(l=>Object.assign(zS(l),{between:t((f,h)=>Xk(id(l,((S,C)=>Lf(A=>Zk(A)&&S<=A&&C>=A))(f,h))),"between"),lt:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S<h))(f))),"lt"),gt:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S>h))(f))),"gt"),lte:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S<=h))(f))),"lte"),gte:t(f=>Xk(id(l,(h=>Lf(S=>Zk(S)&&S>=h))(f))),"gte"),int:t(()=>Xk(id(l,Lf(f=>Zk(f)&&Number.isInteger(f)))),"int"),finite:t(()=>Xk(id(l,Lf(f=>Zk(f)&&Number.isFinite(f)))),"finite"),positive:t(()=>Xk(id(l,Lf(f=>Zk(f)&&f>0))),"positive"),negative:t(()=>Xk(id(l,Lf(f=>Zk(f)&&f<0))),"negative")}),"x"),sYt=Xk(Lf(Zk)),e4=t(l=>Object.assign(zS(l),{between:t((f,h)=>e4(id(l,((S,C)=>Lf(A=>Y6(A)&&S<=A&&C>=A))(f,h))),"between"),lt:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S<h))(f))),"lt"),gt:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S>h))(f))),"gt"),lte:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S<=h))(f))),"lte"),gte:t(f=>e4(id(l,(h=>Lf(S=>Y6(S)&&S>=h))(f))),"gte"),positive:t(()=>e4(id(l,Lf(f=>Y6(f)&&f>0))),"positive"),negative:t(()=>e4(id(l,Lf(f=>Y6(f)&&f<0))),"negative")}),"A"),aYt=e4(Lf(Y6)),oYt=zS(Lf(function(l){return typeof l=="boolean"})),cYt=zS(Lf(function(l){return typeof l=="symbol"})),lYt=zS(Lf(function(l){return l==null})),uYt=zS(Lf(function(l){return l!=null}));var Pke=class Pke extends Error{constructor(f){let h;try{h=JSON.stringify(f)}catch{h=f}super(`Pattern matching error: no pattern matches value ${h}`),this.input=void 0,this.input=f}};t(Pke,"W");var Cke=Pke,kke={matched:!1,value:void 0};function l0(l){return new Eke(l,kke)}t(l0,"z");var rU=class rU{constructor(f,h){this.input=void 0,this.state=void 0,this.input=f,this.state=h}with(...f){if(this.state.matched)return this;let h=f[f.length-1],S=[f[0]],C;f.length===3&&typeof f[1]=="function"?C=f[1]:f.length>2&&S.push(...f.slice(1,f.length-1));let A=!1,j={},Z=t((ge,je)=>{A=!0,j[ge]=je},"a"),oe=!S.some(ge=>Yk(ge,this.input,Z))||C&&!C(this.input)?kke:{matched:!0,value:h(A?yse in j?j[yse]:j:this.input,this.input)};return new rU(this.input,oe)}when(f,h){if(this.state.matched)return this;let S=!!f(this.input);return new rU(this.input,S?{matched:!0,value:h(this.input,this.input)}:kke)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Cke(this.input)}run(){return this.exhaustive()}returnType(){return this}};t(rU,"I");var Eke=rU;function xf(l){return l!=null&&Object.prototype.hasOwnProperty.call(l,"$ref")}t(xf,"isReferenceObject");function py(l){return!xf(l)}t(py,"isSchemaObject");function vse(l){return l.type==="array"}t(vse,"isArraySchemaObject");function FZe(l){if(!l.allOf)throw new Error("Function inferRequiredSchema is specialized to handle item with required only in an allOf array.");let[f,h]=l.allOf.reduce((C,A)=>{if(eFt(A)){let j=A.required;C[0].push(...j??[])}else C[1].push(A);return C},[[],[]]),S={properties:f.reduce((C,A)=>(C[A]={},C),{}),type:"object",required:f};return{noRequiredOnlyAllof:h,composedRequiredSchema:S,patchRequiredSchemaInLoop:t((C,A)=>{if(xf(C)){let j=A(C.$ref);j&&S.required.forEach(Z=>{var oe;S.properties[Z]=((oe=j==null?void 0:j.properties)==null?void 0:oe[Z])??{}})}else{let j=C.properties??{};S.required.forEach(Z=>{j[Z]&&(S.properties[Z]=j[Z]??{})})}},"patchRequiredSchemaInLoop")}}t(FZe,"inferRequiredSchema");var eFt=t(l=>!xf(l)&&!!l.required&&!l.type&&!l.properties&&!(l!=null&&l.allOf)&&!(l!=null&&l.anyOf)&&!l.oneOf,"isBrokenAllOfItem");var RZe=t(l=>`#/components/schemas/${l}`,"getSchemaRef"),O8=t(l=>l[1]==="/"?l:"#/"+l.slice(1),"autocorrectRef"),pR=t(l=>O8(l).split("/").at(-1),"getSchemaNameByRef");function Dke(l){let f=tFt(l).normalize("NFKD").trim().replace(/\s+/g,"_").replace(/--+/g,"-").replace(/-+/g,"_").replace(/[^\w-]+/g,"_");return _y(f)}t(Dke,"normalizeString");function Ake(l){return/^[a-zA-Z]\w*$/.test(l)?l:`"${l}"`}t(Ake,"wrapWithQuotesIfNeeded");function LZe(l){return typeof l=="string"&&l.startsWith('"')&&l.endsWith('"')?l.slice(1,-1):l}t(LZe,"unwrapQuotesIfNeeded");function tFt(l){let f=Number(l[0]);return typeof f=="number"&&!Number.isNaN(f)?"_"+l:l}t(tFt,"prefixStringStartingWithNumberIfNeeded");function Ike(l){let f=l.replaceAll("_","#");return _y(f.replaceAll("-","_")).replaceAll("#","_")}t(Ike,"pathParamToVariableName");var F8=t(l=>bZe.includes(l),"isPrimitiveType");function jZe(l){return l.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/([\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F\uFFFE\uFFFF])/g,(f,h)=>{let S=h.codePointAt(),C=S.toString(16);return S<=255?`\\x${`00${C}`.slice(-2)}`:`\\u${`0000${C}`.slice(-4)}`}).replace(/\//g,"\\/")}t(jZe,"escapeControlCharacters");function Kk(l){return l.includes("application/")&&l.includes("json")||yZe.includes(l)||l.includes("text/")}t(Kk,"isParamMediaTypeAllowed");function iU(l){return l>=200&&l<300}t(iU,"isMainResponseStatus");function bse(l){return!(l>=200&&l<300)}t(bse,"isErrorStatus");function Sse(l){return l.startsWith("application/")}t(Sse,"isMediaTypeAllowed");var MZe=/({\w+})/g,rFt=/[^\w\-]+/g;function BZe(l){l=y_(YV(l.replaceAll("/","-")).replaceAll("-",""));let f=[...l.matchAll(MZe)];if(f.length>0){let h=f.toSorted((S,C)=>S.index-C.index)[f.length-1][0];l=`${l.replace(MZe,"")}By${y_(h.slice(1,-1))}`}return l.replace(rFt,"_")}t(BZe,"pathToVariableName");var wke=/{(\b\w+(?:-\w+)*\b)}/g;function JZe(l){let f=l.match(wke);return f===null?l.replaceAll(wke,":$1"):(f.forEach(h=>{let S=Ike(h.replaceAll(wke,":$1"));l=l.replaceAll(h,S)}),l)}t(JZe,"replaceHyphenatedPath");var xse=t(l=>{let f=l["x-enumNames"],h=Array.isArray(f)&&f.length>0,S=!!l.schema&&py(l.schema)&&l.schema.type==="string";return h&&S},"isSortingParameterObject"),M8=t((l,f)=>f.excludePathRegex?new RegExp(f.excludePathRegex).test(l):!1,"isPathExcluded");function eE({schema:l,meta:f,options:h}){let S=[];l0(l.type).with("string",()=>S.push(sFt(l))).with("number","integer",()=>S.push(oFt(l))).with("array",()=>S.push(cFt(l))).otherwise(()=>{}),typeof l.description=="string"&&l.description!==""&&h.withDescription&&([`
|
|
569
569
|
`,"\r",`\r
|
|
570
570
|
`].some(A=>String.prototype.includes.call(l.description,A))?S.push(`describe(\`${l.description}\`)`):S.push(`describe("${l.description}")`));let C=S.concat(nFt({schema:l,meta:f,options:h}),h.withDefaultValues!==!1?iFt(l):[]).filter(Boolean).join(".");return C?`.${C}`:""}t(eE,"getZodChain");function nFt({schema:l,meta:f,options:h}){return l.nullable&&!(f!=null&&f.isRequired)?"nullish()":l.nullable||h.replaceOptionalWithNullish&&(f!=null&&f.isParentPartial)?"nullable()":f!=null&&f.isRequired?"":h.replaceOptionalWithNullish?"nullish()":"optional()"}t(nFt,"getZodChainablePresence");function iFt(l){return l.default!==void 0?`default(${l0(l.type).with("number","integer",()=>LZe(l.default)).otherwise(()=>JSON.stringify(l.default))})`:""}t(iFt,"getZodChainableDefault");function sFt(l){let f=[];return l.enum||(l.minLength!==void 0&&f.push(`min(${l.minLength})`),l.maxLength!==void 0&&f.push(`max(${l.maxLength})`)),l.pattern&&f.push(`regex(${aFt(l.pattern)})`),f.join(".")}t(sFt,"getZodChainableStringValidations");function aFt(l){return l.startsWith("/")&&l.endsWith("/")&&(l=l.slice(1,-1)),l=jZe(l),`/${l}/`}t(aFt,"formatPatternIfNeeded");function oFt(l){let f=[];return l.enum?"":(l.minimum!==void 0?l.exclusiveMinimum===!0?f.push(`gt(${l.minimum})`):f.push(`gte(${l.minimum})`):typeof l.exclusiveMinimum=="number"&&f.push(`gt(${l.exclusiveMinimum})`),l.maximum!==void 0?l.exclusiveMaximum===!0?f.push(`lt(${l.maximum})`):f.push(`lte(${l.maximum})`):typeof l.exclusiveMaximum=="number"&&f.push(`lt(${l.exclusiveMaximum})`),l.multipleOf&&f.push(`multipleOf(${l.multipleOf})`),f.join("."))}t(oFt,"getZodChainableNumberValidations");function cFt(l){let f=[];return l.minItems&&f.push(`min(${l.minItems})`),l.maxItems&&f.push(`max(${l.maxItems})`),f.join(".")}t(cFt,"getZodChainableArrayValidations");var R_=t(({type:l,tag:f,options:h})=>`${y_(f)}${h.configs[l].namespaceSuffix}`,"getNamespaceName");function $Ze(l,f){let h=l.getRefByZodSchemaName(f);if(h){let C=Array.from(l.dependencyGraph.refsDependencyGraph[h]??[]).map(j=>l.getZodSchemaNameByRef(j)),A=l.getExtractedEnumZodSchemaNamesReferencedBySchemaRef(h);return[...C,...A]}let S=l.getCompositeZodSchemaByZodSchemaName(f);return S?Array.from(Tse(S)).map(C=>l.getZodSchemaNameByRef(C)):[]}t($Ze,"getZodSchemaRefs");function Tse(l,{skipObjectSchema:f=!1}={}){return l.children.reduce((S,C)=>{let A=C.ref??C.enumRef;return A&&S.add(A),C.children.length>0&&(!f||!py(C.schema)||C.schema.type!=="object")&&Tse(C).forEach(j=>S.add(j)),S},new Set)}t(Tse,"getSchemaRefs");var R8=t(l=>l.reduce((f,h)=>f+h,0),"sum");function Ig(l,f){if(!f)return l;if(xf(f))return l+2;if(Array.isArray(f.type))return f.type.length===1?Yb("oneOf")+Ig(l,{...f,type:f.type[0]}):l+Yb("oneOf")+R8(f.type.map(h=>Ig(0,{...f,type:h})));if(f.oneOf)return f.oneOf.length===1?Yb("oneOf")+Ig(l,f.oneOf[0]):l+Yb("oneOf")+R8(f.oneOf.map(h=>Ig(0,h)));if(f.anyOf)return f.anyOf.length===1?Yb("anyOf")+Ig(l,f.anyOf[0]):l+Yb("anyOf")+R8(f.anyOf.map(h=>Ig(0,h)));if(f.allOf)return f.allOf.length===1?Yb("allOf")+Ig(l,f.allOf[0]):l+Yb("allOf")+R8(f.allOf.map(h=>Ig(0,h)));if(!f.type)return l;if(F8(f.type))return f.enum?l+qZe(f)+Yb("enum")+R8(f.enum.map(h=>Ig(0,h))):l+qZe(f);if(f.type==="array")return f.items?Yb("array")+Ig(l,f.items):Yb("array")+Ig(l);if(f.type==="object"||f.properties||f.additionalProperties){if(f.properties){let h=Object.values(f.properties);l+=Yb("object")+R8(h.map(S=>Ig(0,S)))}else l+=Yb("empty-object");f.additionalProperties&&(typeof f.additionalProperties=="object"?l+=Ig(0,f.additionalProperties):l+=Ig(1))}return l}t(Ig,"getOpenAPISchemaComplexity");function qZe(l){return l0(l.type).with("string","number","integer","boolean",()=>1).otherwise(()=>0)}t(qZe,"complexityByType");function Yb(l){return l0(l).with("oneOf",()=>2).with("anyOf",()=>3).with("allOf",()=>2).with("enum","array","empty-object",()=>1).with("object",()=>2).otherwise(()=>0)}t(Yb,"complexityByComposite");var Oke=class Oke{constructor(f,h,S={referencedBy:[]},C){this.schema=f;this.resolver=h;xf(f)&&(this.ref=f.$ref),C&&(this.enumRef=C),this.meta={...S,referencedBy:[...(S==null?void 0:S.referencedBy)??[]]},this.ref&&this.meta.referencedBy.push(this)}code;ref;enumRef;children=[];meta;getCodeString(f,h){var A,j;if(!this.ref&&this.code)return this.code;if(!this.ref)throw new Error("Zod schema is missing both ref and code");let S=(A=this.resolver)==null?void 0:A.getZodSchemaNameByRef(this.ref);if(!S)return this.ref;let C=(j=this.resolver)==null?void 0:j.getTagByZodSchemaName(S);return h!=null&&h.tsNamespaces&&C&&C!==f?`${R_({type:"models",tag:C,options:h})}.${S}`:S}get complexity(){return Ig(0,this.schema)}assign(f){return this.code=f,this}inherit(f){return f&&f.children.push(this),this}};t(Oke,"ZodSchema");var sU=Oke;function Nke(l){var f,h;if(l)return(f=l.parent)!=null&&f.ref?l.parent.ref:Nke((h=l.parent)==null?void 0:h.meta)}t(Nke,"getParentRef");function am({schema:l,resolver:f,meta:h,tag:S}){var ot;let C=new sU(l,f,h),A={parent:C.inherit(h==null?void 0:h.parent),referencedBy:[...C.meta.referencedBy]},j={resolver:f,meta:A,tag:S};if(xf(l))return lFt({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});let Z=fFt({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});if(Z)return Z;let oe=uFt({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});if(oe)return oe;let ge=_Ft({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});if(ge)return ge;let je=pFt({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});if(je)return je;let Ae=dFt({schema:l,zodSchema:C,resolver:f,meta:A,tag:S});if(Ae)return Ae;let _e=f.options.allReadonly?".readonly()":"";if(vse(l))return l.items?C.assign(`z.array(${am({...j,schema:l.items}).getCodeString(S,f.options)}${eE({schema:l.items,meta:{...A,isRequired:!0},options:f.options})})${_e}`):C.assign(`z.array(${_R})${_e}`);let Lt=l.type?l.type.toLowerCase():void 0;if(Lt==="object"||l.properties||l.additionalProperties){let tt=l.required&&l.required.length>0,Ht=f.options.withImplicitRequiredProps?!1:l.properties&&!((ot=l.required)!=null&&ot.length),jr="{}";l.properties&&(jr=`{ ${Object.entries(l.properties).map(([Nn,Wr])=>{var zr;let dl={...A,isRequired:Ht?!0:tt?(zr=l.required)==null?void 0:zr.includes(Nn):f.options.withImplicitRequiredProps,name:Nn,isParentPartial:Ht},pa=Wr;if(xf(Wr)&&f&&(pa=f.getSchemaByRef(Wr.$ref),!pa))throw new Error(`Schema ${Wr.$ref} not found`);let Fa=am({...j,schema:Wr,meta:dl}),Xr=Fa.getCodeString(S,f.options)+eE({schema:pa,meta:dl,options:f.options}),Ps=!1,Us=Nke(h);return Us&&(Ps=[...xf(Wr)?[Wr.$ref]:[],...Tse(Fa,{skipObjectSchema:!0})].some($o=>{var gr;return(gr=f.dependencyGraph.deepDependencyGraph[$o])==null?void 0:gr.has(Us)})),[Nn,Xr,Ps]}).map(([Nn,Wr,dl])=>dl?`get ${Ake(Nn)}() { return ${Wr} }`:`${Ake(Nn)}: ${Wr}`).join(", ")} }`);let Gn="";l.additionalProperties&&(Gn=`.catchall(${typeof l.additionalProperties=="object"&&Object.keys(l.additionalProperties).length>0?am({...j,schema:l.additionalProperties}).getCodeString(S,f.options)+eE({schema:l.additionalProperties,meta:{...A,isRequired:!0},options:f.options}):_R})`);let is=`z.object(${jr})${Ht?".partial()":""}${Gn}${_e}`;return C.assign(is)}if(Lt==="any")return C.assign(_R);if(!Lt)return C.assign("z.unknown()");throw new Error(`Unsupported schema type: ${Lt}`)}t(am,"getZodSchema");function lFt({schema:l,zodSchema:f,resolver:h,meta:S,tag:C}){if(!xf(l))return;let A=f.meta.referencedBy.slice(0,-1).map(oe=>oe.ref?h.getZodSchemaNameByRef(oe.ref)??oe.ref:void 0).filter(Boolean),j=h.getZodSchemaNameByRef(l.$ref);if(A.length>1&&A.includes(j))return f.assign(h.getCodeByZodSchemaName(f.ref));let Z=h.getCodeByZodSchemaName(l.$ref);if(!Z){let oe=h.getSchemaByRef(l.$ref);if(!oe)throw new Error(`Schema ${l.$ref} not found`);Z=am({schema:oe,resolver:h,meta:S,tag:C}).getCodeString(C,h.options)}return h.getCodeByZodSchemaName(j)||h.setZodSchema(j,Z,C),f}t(lFt,"getReferenceZodSchema");function uFt({schema:l,zodSchema:f,resolver:h,meta:S,tag:C}){var j;if(!py(l)||!l.oneOf)return;if(l.oneOf.length===1){let Z=am({schema:l.oneOf[0],resolver:h,meta:S,tag:C});return f.assign(Z.getCodeString(C,h.options))}let A=(j=l.oneOf)==null?void 0:j.some(Z=>py(Z)&&((Z==null?void 0:Z.allOf)||[]).length>1);if(l.discriminator&&!A){let Z=l.discriminator.propertyName;return f.assign(`
|
|
571
571
|
z.discriminatedUnion("${Z}", [${l.oneOf.map(oe=>am({schema:oe,resolver:h,meta:S,tag:C}).getCodeString(C,h.options)).join(", ")}])
|