@redocly/cli 2.66.1 → 2.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chunks/{PYSE2LAG.js → 2AJDP47K.js} +1 -1
- package/lib/chunks/{7NPQH3V7.js → 3HSHTOK2.js} +1 -1
- package/lib/chunks/{F7K3O6UM.js → 3SPC2VZI.js} +1 -1
- package/lib/chunks/{K4IZRPJV.js → 4JI4GT6B.js} +35 -35
- package/lib/chunks/{CK2FG2DD.js → 6BJRKKAU.js} +1 -1
- package/lib/chunks/{JZV7OYQZ.js → 7WOMNRDU.js} +1 -1
- package/lib/chunks/{ULKOLYWY.js → 7YY5ECWE.js} +1 -1
- package/lib/chunks/{SDGM5YBT.js → A3NSKGWO.js} +1 -1
- package/lib/chunks/{4ABWBH3W.js → AENSGZDZ.js} +1 -1
- package/lib/chunks/{TPBJSMIK.js → AL7PXK7F.js} +1 -1
- package/lib/chunks/{B4Z2Z4FS.js → BUQQJCMF.js} +1 -1
- package/lib/chunks/{TLDUEX6A.js → BYO4KBZG.js} +1 -1
- package/lib/chunks/{LR6VKQFM.js → CCZY5XJV.js} +2 -2
- package/lib/chunks/{VAPT4FUS.js → D4U2LEEI.js} +1 -1
- package/lib/chunks/{GLUPJCQU.js → D5A4WCOD.js} +1 -1
- package/lib/chunks/{LJTGHAPA.js → DQZXJA6Q.js} +1 -1
- package/lib/chunks/{FXCLUZIF.js → DTPYQUHR.js} +13 -13
- package/lib/chunks/{U7SJFXVW.js → EDKRUI6D.js} +1 -1
- package/lib/chunks/{WFZEGGBA.js → EOCKJNES.js} +1 -1
- package/lib/chunks/{LSFJCPZH.js → EPVPJTXN.js} +1 -1
- package/lib/chunks/{TOBKCE6P.js → F77DQGVI.js} +1 -1
- package/lib/chunks/{T23ZPTN4.js → F7DLPPNU.js} +1 -1
- package/lib/chunks/{ROLEKKAB.js → G67BALR7.js} +1 -1
- package/lib/chunks/{RALPAYEE.js → GP5VOB7R.js} +1 -1
- package/lib/chunks/{POIQ4MUQ.js → GU34RIUR.js} +1 -1
- package/lib/chunks/{L3SH4LDY.js → H3CWVIT3.js} +1 -1
- package/lib/chunks/{ON2YZD5C.js → HET452FN.js} +1 -1
- package/lib/chunks/{HXPCC4OG.js → HG5B2AKP.js} +1 -1
- package/lib/chunks/{NUBOB7QM.js → HPYQF7FO.js} +2 -2
- package/lib/chunks/{KOEA2NZG.js → HQTUYG5X.js} +2 -2
- package/lib/chunks/{M37DUXGN.js → HU6QTMHN.js} +1 -1
- package/lib/chunks/{IAAYM25M.js → IHFKHD4E.js} +1 -1
- package/lib/chunks/{NT6J6VMM.js → IRF3OXDB.js} +1 -1
- package/lib/chunks/{OYDBXGWA.js → IZVG6IUS.js} +1 -1
- package/lib/chunks/{UJN4HIWM.js → J32G7NQF.js} +1 -1
- package/lib/chunks/{AONBK2JI.js → JH6AK2RM.js} +1 -1
- package/lib/chunks/{RO4A6LSK.js → JMYCFXFO.js} +1 -1
- package/lib/chunks/{6KF4UNVM.js → KA43H34P.js} +1 -1
- package/lib/chunks/{R5MSEDNK.js → KHQEQ7SW.js} +1 -1
- package/lib/chunks/{ZSK75GT2.js → KIFTQ6KG.js} +1 -1
- package/lib/chunks/{JGSM4NRA.js → KMGFC2JR.js} +1 -1
- package/lib/chunks/{5EHUKG3I.js → LEPQDSTM.js} +1 -1
- package/lib/chunks/{UYF7BOSD.js → LZUYKJND.js} +1 -1
- package/lib/chunks/{PGX27JIK.js → M5FZMXND.js} +1 -1
- package/lib/chunks/{NHOPECWM.js → MLLRCWW6.js} +1 -1
- package/lib/chunks/{FOXOWXSK.js → OKWRNBEY.js} +1 -1
- package/lib/chunks/{JFWECYV5.js → OLVAP7AA.js} +1 -1
- package/lib/chunks/{CVCE3TMJ.js → OUNJECS6.js} +1 -1
- package/lib/chunks/{6JHVGOS4.js → PNADRNVV.js} +1 -1
- package/lib/chunks/{NFCO7FU3.js → QPNNEO3Y.js} +1 -1
- package/lib/chunks/{FP63LRP5.js → QT45SNBU.js} +1 -1
- package/lib/chunks/{46YO7ZAG.js → RIJ5NQKJ.js} +1 -1
- package/lib/chunks/{IVWO724G.js → RV4QSDBS.js} +1 -1
- package/lib/chunks/{ARBQ5CUR.js → SR776DY3.js} +1 -1
- package/lib/chunks/{QMIJ4HMG.js → TO7JCTX3.js} +1 -1
- package/lib/chunks/{DRSH6QBU.js → UNWO4KGQ.js} +1 -1
- package/lib/chunks/{YY44N7JX.js → VEVZJC25.js} +1 -1
- package/lib/chunks/{AZPQQ3GI.js → VJQCED3T.js} +1 -1
- package/lib/chunks/{FHDBQIEB.js → WFKHK77N.js} +1 -1
- package/lib/chunks/{36DQZK3T.js → WH5ELPJC.js} +1 -1
- package/lib/chunks/{STYLK3WI.js → WHI5PM5X.js} +1 -1
- package/lib/chunks/{YCJL4ZHF.js → WJLUIDSE.js} +1 -1
- package/lib/chunks/{M3VAMERP.js → XZIAEGVZ.js} +1 -1
- package/lib/chunks/{JZPKVDJA.js → XZNJU67S.js} +1 -1
- package/lib/chunks/{LIDTATJI.js → Y5OFK6NL.js} +1 -1
- package/lib/chunks/{GG6HRP6Y.js → YIXIZB5W.js} +1 -1
- package/lib/chunks/{OMDMN4SS.js → YQYR6TIT.js} +1 -1
- package/lib/chunks/YUHXZXUL.js +34 -0
- package/lib/chunks/{KTZA5BVG.js → ZLAHBPRQ.js} +1 -1
- package/lib/chunks/{USAJ5FBD.js → ZMV5LF7Y.js} +1 -1
- package/lib/eject-assets/generators/cli/docs.ts +1 -1
- package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
- package/lib/eject-assets/generators/cli/index.ts +2 -2
- package/lib/eject-assets/generators/cli/render.ts +1 -1
- package/lib/eject-assets/generators/go/client.ts +1 -1
- package/lib/eject-assets/generators/go/descriptor.ts +1 -1
- package/lib/eject-assets/generators/go/index.ts +2 -2
- package/lib/eject-assets/generators/go/models.ts +1 -1
- package/lib/eject-assets/generators/go/naming.ts +1 -1
- package/lib/eject-assets/generators/go/operations.ts +1 -1
- package/lib/eject-assets/generators/go/pagination.ts +1 -1
- package/lib/eject-assets/generators/go/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +1 -1
- package/lib/eject-assets/generators/mock/index.ts +2 -2
- package/lib/eject-assets/generators/mock/render.ts +1 -1
- package/lib/eject-assets/generators/mock/sample.ts +1 -1
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +1 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +1 -1
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +1 -1
- package/lib/eject-assets/generators/php/pagination.ts +1 -1
- package/lib/eject-assets/generators/php/types.ts +1 -1
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +1 -1
- package/lib/eject-assets/generators/python/index.ts +2 -2
- package/lib/eject-assets/generators/python/models.ts +1 -1
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +1 -1
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +1 -1
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/index.js +5 -5
- package/package.json +1 -1
- package/lib/chunks/MSJZTIMR.js +0 -34
package/lib/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
var __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
var __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as si,f as te}from"./chunks/U5DIFWGH.js";import{c as oi}from"./chunks/4PTNG4EI.js";import{a as er}from"./chunks/6KF4UNVM.js";import{a as Fa}from"./chunks/ERBLCNSR.js";import{a as ai,c as tr,d as Dr,e as li,g as ui}from"./chunks/TZMWTSOQ.js";import{a as Le,b as ni,c as ii}from"./chunks/JZV7OYQZ.js";import{a as ci}from"./chunks/L3SH4LDY.js";import{a as ri}from"./chunks/46YO7ZAG.js";import{Ba as ti,O as Yn,R as Kn,Z as Dt,a as Vn,aa as _t,ba as Jt,c as Oe,ea as ct,ga as Xn,ia as H,ja as Qt,ka as Jn,l as Tr,oa as ge,pa as Zt,sa as Qn,u as Bn,va as Zn,wa as ei}from"./chunks/K4IZRPJV.js";import"./chunks/NEWT5A6S.js";import{a as Ue,c as k,e as Xt}from"./chunks/RFWIIJFG.js";var St=k((Id,fi)=>{"use strict";var ka="2.0.0",za=Number.MAX_SAFE_INTEGER||9007199254740991,Ua=16,Ga=250,Wa=["major","premajor","minor","preminor","patch","prepatch","prerelease"];fi.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ua,MAX_SAFE_BUILD_LENGTH:Ga,MAX_SAFE_INTEGER:za,RELEASE_TYPES:Wa,SEMVER_SPEC_VERSION:ka,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var qt=k((Ld,di)=>{"use strict";var Ha=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};di.exports=Ha});var Ct=k((Ge,pi)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:qr,MAX_SAFE_BUILD_LENGTH:Va,MAX_LENGTH:Ba}=St(),Ya=qt();Ge=pi.exports={};var Ka=Ge.re=[],Xa=Ge.safeRe=[],C=Ge.src=[],Ja=Ge.safeSrc=[],R=Ge.t={},Qa=0,Mr="[a-zA-Z0-9-]",Za=[["\\s",1],["\\d",Ba],[Mr,Va]],ec=r=>{for(let[e,t]of Za)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},G=(r,e,t)=>{let n=ec(e),i=Qa++;Ya(r,i,e),R[r]=i,C[i]=e,Ja[i]=n,Ka[i]=new RegExp(e,t?"g":void 0),Xa[i]=new RegExp(n,t?"g":void 0)};G("NUMERICIDENTIFIER","0|[1-9]\\d*");G("NUMERICIDENTIFIERLOOSE","\\d+");G("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Mr}*`);G("MAINVERSION",`(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})`);G("MAINVERSIONLOOSE",`(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})`);G("PRERELEASEIDENTIFIER",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIER]})`);G("PRERELEASEIDENTIFIERLOOSE",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIERLOOSE]})`);G("PRERELEASE",`(?:-(${C[R.PRERELEASEIDENTIFIER]}(?:\\.${C[R.PRERELEASEIDENTIFIER]})*))`);G("PRERELEASELOOSE",`(?:-?(${C[R.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[R.PRERELEASEIDENTIFIERLOOSE]})*))`);G("BUILDIDENTIFIER",`${Mr}+`);G("BUILD",`(?:\\+(${C[R.BUILDIDENTIFIER]}(?:\\.${C[R.BUILDIDENTIFIER]})*))`);G("FULLPLAIN",`v?${C[R.MAINVERSION]}${C[R.PRERELEASE]}?${C[R.BUILD]}?`);G("FULL",`^${C[R.FULLPLAIN]}$`);G("LOOSEPLAIN",`[v=\\s]*${C[R.MAINVERSIONLOOSE]}${C[R.PRERELEASELOOSE]}?${C[R.BUILD]}?`);G("LOOSE",`^${C[R.LOOSEPLAIN]}$`);G("GTLT","((?:<|>)?=?)");G("XRANGEIDENTIFIERLOOSE",`${C[R.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);G("XRANGEIDENTIFIER",`${C[R.NUMERICIDENTIFIER]}|x|X|\\*`);G("XRANGEPLAIN",`[v=\\s]*(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:${C[R.PRERELEASE]})?${C[R.BUILD]}?)?)?`);G("XRANGEPLAINLOOSE",`[v=\\s]*(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:${C[R.PRERELEASELOOSE]})?${C[R.BUILD]}?)?)?`);G("XRANGE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAIN]}$`);G("XRANGELOOSE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAINLOOSE]}$`);G("COERCEPLAIN",`(^|[^\\d])(\\d{1,${qr}})(?:\\.(\\d{1,${qr}}))?(?:\\.(\\d{1,${qr}}))?`);G("COERCE",`${C[R.COERCEPLAIN]}(?:$|[^\\d])`);G("COERCEFULL",C[R.COERCEPLAIN]+`(?:${C[R.PRERELEASE]})?(?:${C[R.BUILD]})?(?:$|[^\\d])`);G("COERCERTL",C[R.COERCE],!0);G("COERCERTLFULL",C[R.COERCEFULL],!0);G("LONETILDE","(?:~>?)");G("TILDETRIM",`(\\s*)${C[R.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";G("TILDE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAIN]}$`);G("TILDELOOSE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAINLOOSE]}$`);G("LONECARET","(?:\\^)");G("CARETTRIM",`(\\s*)${C[R.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";G("CARET",`^${C[R.LONECARET]}${C[R.XRANGEPLAIN]}$`);G("CARETLOOSE",`^${C[R.LONECARET]}${C[R.XRANGEPLAINLOOSE]}$`);G("COMPARATORLOOSE",`^${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]})$|^$`);G("COMPARATOR",`^${C[R.GTLT]}\\s*(${C[R.FULLPLAIN]})$|^$`);G("COMPARATORTRIM",`(\\s*)${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]}|${C[R.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";G("HYPHENRANGE",`^\\s*(${C[R.XRANGEPLAIN]})\\s+-\\s+(${C[R.XRANGEPLAIN]})\\s*$`);G("HYPHENRANGELOOSE",`^\\s*(${C[R.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[R.XRANGEPLAINLOOSE]})\\s*$`);G("STAR","(<|>)?=?\\s*\\*");G("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");G("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var rr=k((Pd,hi)=>{"use strict";var tc=Object.freeze({loose:!0}),rc=Object.freeze({}),nc=r=>r?typeof r!="object"?tc:r:rc;hi.exports=nc});var Fr=k((Nd,yi)=>{"use strict";var mi=/^[0-9]+$/,gi=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=mi.test(r),n=mi.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},ic=(r,e)=>gi(e,r);yi.exports={compareIdentifiers:gi,rcompareIdentifiers:ic}});var ye=k((Td,wi)=>{"use strict";var nr=qt(),{MAX_LENGTH:bi,MAX_SAFE_INTEGER:ir}=St(),{safeRe:sr,t:or}=Ct(),sc=rr(),{compareIdentifiers:kr}=Fr(),oc=(r,e)=>{let t=e.split(".");if(t.length>r.length)return!1;for(let n=0;n<t.length;n++)if(kr(r[n],t[n])!==0)return!1;return!0},zr=class r{constructor(e,t){if(t=sc(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>bi)throw new TypeError(`version is longer than ${bi} characters`);nr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?sr[or.LOOSE]:sr[or.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ir||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ir||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ir||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<ir)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(nr("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],i=e.prerelease[t];if(nr("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return kr(n,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(nr("build compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return kr(n,i)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?sr[or.PRERELEASELOOSE]:sr[or.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(n===!1&&(s=[t]),oc(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};wi.exports=zr});var et=k((Dd,Ai)=>{"use strict";var Ei=ye(),ac=(r,e,t=!1)=>{if(r instanceof Ei)return r;try{return new Ei(r,e)}catch(n){if(!t)return null;throw n}};Ai.exports=ac});var _i=k((qd,Oi)=>{"use strict";var cc=et(),lc=(r,e)=>{let t=cc(r,e);return t?t.version:null};Oi.exports=lc});var Ci=k((Md,Si)=>{"use strict";var uc=et(),fc=(r,e)=>{let t=uc(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Si.exports=fc});var ji=k((Fd,xi)=>{"use strict";var Ri=ye(),dc=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Ri(r instanceof Ri?r.version:r,t).inc(e,n,i).version}catch{return null}};xi.exports=dc});var Ii=k((kd,$i)=>{"use strict";var vi=et(),pc=(r,e)=>{let t=vi(r,null,!0),n=vi(e,null,!0),i=t.compare(n);if(i===0)return null;let s=i>0,o=s?t:n,a=s?n:t,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let h=u?"pre":"";return t.major!==n.major?h+"major":t.minor!==n.minor?h+"minor":t.patch!==n.patch?h+"patch":"prerelease"};$i.exports=pc});var Pi=k((zd,Li)=>{"use strict";var hc=ye(),mc=(r,e)=>new hc(r,e).major;Li.exports=mc});var Ti=k((Ud,Ni)=>{"use strict";var gc=ye(),yc=(r,e)=>new gc(r,e).minor;Ni.exports=yc});var qi=k((Gd,Di)=>{"use strict";var bc=ye(),wc=(r,e)=>new bc(r,e).patch;Di.exports=wc});var Fi=k((Wd,Mi)=>{"use strict";var Ec=et(),Ac=(r,e)=>{let t=Ec(r,e);return t&&t.prerelease.length?t.prerelease:null};Mi.exports=Ac});var Pe=k((Hd,zi)=>{"use strict";var ki=ye(),Oc=(r,e,t)=>new ki(r,t).compare(new ki(e,t));zi.exports=Oc});var Gi=k((Vd,Ui)=>{"use strict";var _c=Pe(),Sc=(r,e,t)=>_c(e,r,t);Ui.exports=Sc});var Hi=k((Bd,Wi)=>{"use strict";var Cc=Pe(),Rc=(r,e)=>Cc(r,e,!0);Wi.exports=Rc});var ar=k((Yd,Bi)=>{"use strict";var Vi=ye(),xc=(r,e,t)=>{let n=new Vi(r,t),i=new Vi(e,t);return n.compare(i)||n.compareBuild(i)};Bi.exports=xc});var Ki=k((Kd,Yi)=>{"use strict";var jc=ar(),vc=(r,e)=>r.sort((t,n)=>jc(t,n,e));Yi.exports=vc});var Ji=k((Xd,Xi)=>{"use strict";var $c=ar(),Ic=(r,e)=>r.sort((t,n)=>$c(n,t,e));Xi.exports=Ic});var Mt=k((Jd,Qi)=>{"use strict";var Lc=Pe(),Pc=(r,e,t)=>Lc(r,e,t)>0;Qi.exports=Pc});var cr=k((Qd,Zi)=>{"use strict";var Nc=Pe(),Tc=(r,e,t)=>Nc(r,e,t)<0;Zi.exports=Tc});var Ur=k((Zd,es)=>{"use strict";var Dc=Pe(),qc=(r,e,t)=>Dc(r,e,t)===0;es.exports=qc});var Gr=k((ep,ts)=>{"use strict";var Mc=Pe(),Fc=(r,e,t)=>Mc(r,e,t)!==0;ts.exports=Fc});var lr=k((tp,rs)=>{"use strict";var kc=Pe(),zc=(r,e,t)=>kc(r,e,t)>=0;rs.exports=zc});var ur=k((rp,ns)=>{"use strict";var Uc=Pe(),Gc=(r,e,t)=>Uc(r,e,t)<=0;ns.exports=Gc});var Wr=k((np,is)=>{"use strict";var Wc=Ur(),Hc=Gr(),Vc=Mt(),Bc=lr(),Yc=cr(),Kc=ur(),Xc=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Wc(r,t,n);case"!=":return Hc(r,t,n);case">":return Vc(r,t,n);case">=":return Bc(r,t,n);case"<":return Yc(r,t,n);case"<=":return Kc(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};is.exports=Xc});var os=k((ip,ss)=>{"use strict";var Jc=ye(),Qc=et(),{safeRe:fr,t:dr}=Ct(),Zc=(r,e)=>{if(r instanceof Jc)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?fr[dr.COERCEFULL]:fr[dr.COERCE]);else{let u=e.includePrerelease?fr[dr.COERCERTLFULL]:fr[dr.COERCERTL],p;for(;(p=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||p.index+p[0].length!==t.index+t[0].length)&&(t=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(t===null)return null;let n=t[2],i=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Qc(`${n}.${i}.${s}${o}${a}`,e)};ss.exports=Zc});var cs=k((sp,as)=>{"use strict";var el=et(),tl=St(),rl=ye(),nl=(r,e,t)=>{if(!tl.RELEASE_TYPES.includes(e))return null;let n=il(r,t);return n&&sl(n,e)},il=(r,e)=>{let t=r instanceof rl?r.version:r;return el(t,e)},sl=(r,e)=>{if(ol(e))return r.version;switch(r.prerelease=[],e){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},ol=r=>r.startsWith("pre");as.exports=nl});var us=k((op,ls)=>{"use strict";var Hr=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};ls.exports=Hr});var Ne=k((ap,hs)=>{"use strict";var al=/\s+/g,Vr=class r{constructor(e,t){if(t=ll(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Br)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(al," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!ds(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&bl(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let n=0;n<t.length;n++)n>0&&(this.formatted+=" "),this.formatted+=t[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(yl,"");let n=((this.options.includePrerelease&&ml)|(this.options.loose&&gl))+":"+e,i=fs.get(n);if(i)return i;let s=this.options.loose,o=s?_e[be.HYPHENRANGELOOSE]:_e[be.HYPHENRANGE];e=e.replace(o,vl(this.options.includePrerelease)),re("hyphen replace",e),e=e.replace(_e[be.COMPARATORTRIM],dl),re("comparator trim",e),e=e.replace(_e[be.TILDETRIM],pl),re("tilde trim",e),e=e.replace(_e[be.CARETTRIM],hl),re("caret trim",e);let a=e.split(" ").map(l=>wl(l,this.options)).join(" ").split(/\s+/).map(l=>jl(l,this.options));s&&(a=a.filter(l=>(re("loose invalid filter",l,this.options),!!l.match(_e[be.COMPARATORLOOSE])))),re("range list",a);let u=new Map,p=a.map(l=>new Br(l,this.options));for(let l of p){if(ds(l))return[l];u.set(l.value,l)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return fs.set(n,h),h}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>ps(n,t)&&e.set.some(i=>ps(i,t)&&n.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ul(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if($l(this.set[t],e,this.options))return!0;return!1}};hs.exports=Vr;var cl=us(),fs=new cl,ll=rr(),Br=Ft(),re=qt(),ul=ye(),{safeRe:_e,src:fl,t:be,comparatorTrimReplace:dl,tildeTrimReplace:pl,caretTrimReplace:hl}=Ct(),{FLAG_INCLUDE_PRERELEASE:ml,FLAG_LOOSE:gl}=St(),yl=new RegExp(fl[be.BUILD],"g"),ds=r=>r.value==="<0.0.0-0",bl=r=>r.value==="",ps=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(s=>i.intersects(s,e)),i=n.pop();return t},wl=(r,e)=>(r=r.replace(_e[be.BUILD],""),re("comp",r,e),r=_l(r,e),re("caret",r),r=Al(r,e),re("tildes",r),r=Cl(r,e),re("xrange",r),r=xl(r,e),re("stars",r),r),de=r=>!r||r.toLowerCase()==="x"||r==="*",El=(r,e,t)=>de(r)&&!de(e)||de(e)&&t&&!de(t),Al=(r,e)=>r.trim().split(/\s+/).map(t=>Ol(t,e)).join(" "),Ol=(r,e)=>{let t=e.loose?_e[be.TILDELOOSE]:_e[be.TILDE],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,u)=>{re("tilde",r,i,s,o,a,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(a)?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u?(re("replaceTilde pr",u),p=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):p=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,re("tilde return",p),p})},_l=(r,e)=>r.trim().split(/\s+/).map(t=>Sl(t,e)).join(" "),Sl=(r,e)=>{re("caret",r,e);let t=e.loose?_e[be.CARETLOOSE]:_e[be.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,u)=>{re("caret",r,i,s,o,a,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(a)?s==="0"?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:u?(re("replaceCaret pr",u),s==="0"?o==="0"?p=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:p=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(re("no pr"),s==="0"?o==="0"?p=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:p=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),re("caret return",p),p})},Cl=(r,e)=>(re("replaceXRanges",r,e),r.split(/\s+/).map(t=>Rl(t,e)).join(" ")),Rl=(r,e)=>{r=r.trim();let t=e.loose?_e[be.XRANGELOOSE]:_e[be.XRANGE];return r.replace(t,(n,i,s,o,a,u)=>{if(re("xRange",r,n,i,s,o,a,u),El(s,o,a))return r;let p=de(s),h=p||de(o),l=h||de(a),b=l;return i==="="&&b&&(i=""),u=e.includePrerelease?"-0":"",p?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&b?(h&&(o=0),a=0,i===">"?(i=">=",h?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",h?s=+s+1:o=+o+1),i==="<"&&(u="-0"),n=`${i+s}.${o}.${a}${u}`):h?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:l&&(n=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),re("xRange return",n),n})},xl=(r,e)=>(re("replaceStars",r,e),r.trim().replace(_e[be.STAR],"")),jl=(r,e)=>(re("replaceGTE0",r,e),r.trim().replace(_e[e.includePrerelease?be.GTE0PRE:be.GTE0],"")),vl=r=>(e,t,n,i,s,o,a,u,p,h,l,b)=>(de(n)?t="":de(i)?t=`>=${n}.0.0${r?"-0":""}`:de(s)?t=`>=${n}.${i}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,de(p)?u="":de(h)?u=`<${+p+1}.0.0-0`:de(l)?u=`<${p}.${+h+1}.0-0`:b?u=`<=${p}.${h}.${l}-${b}`:r?u=`<${p}.${h}.${+l+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),$l=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(re(r[n].semver),r[n].semver!==Br.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Ft=k((cp,Es)=>{"use strict";var kt=Symbol("SemVer ANY"),Xr=class r{static get ANY(){return kt}constructor(e,t){if(t=ms(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===kt?this.value="":this.value=this.operator+this.semver.version,Kr("comp",this)}parse(e){let t=this.options.loose?gs[ys.COMPARATORLOOSE]:gs[ys.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new bs(n[2],this.options.loose):this.semver=kt}toString(){return this.value}test(e){if(Kr("Comparator.test",e,this.options.loose),this.semver===kt||e===kt)return!0;if(typeof e=="string")try{e=new bs(e,this.options)}catch{return!1}return Yr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ws(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new ws(this.value,t).test(e.semver):(t=ms(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Yr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Yr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Es.exports=Xr;var ms=rr(),{safeRe:gs,t:ys}=Ct(),Yr=Wr(),Kr=qt(),bs=ye(),ws=Ne()});var zt=k((lp,As)=>{"use strict";var Il=Ne(),Ll=(r,e,t)=>{try{e=new Il(e,t)}catch{return!1}return e.test(r)};As.exports=Ll});var _s=k((up,Os)=>{"use strict";var Pl=Ne(),Nl=(r,e)=>new Pl(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Os.exports=Nl});var Cs=k((fp,Ss)=>{"use strict";var Tl=ye(),Dl=Ne(),ql=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Dl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Tl(n,t))}),n};Ss.exports=ql});var xs=k((dp,Rs)=>{"use strict";var Ml=ye(),Fl=Ne(),kl=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Fl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Ml(n,t))}),n};Rs.exports=kl});var $s=k((pp,vs)=>{"use strict";var Jr=ye(),zl=Ne(),js=Mt(),Ul=(r,e)=>{r=new zl(r,e);let t=new Jr("0.0.0");if(r.test(t)||(t=new Jr("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],s=null;i.forEach(o=>{let a=new Jr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||js(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||js(t,s))&&(t=s)}return t&&r.test(t)?t:null};vs.exports=Ul});var Ls=k((hp,Is)=>{"use strict";var Gl=Ne(),Wl=(r,e)=>{try{return new Gl(r,e).range||"*"}catch{return null}};Is.exports=Wl});var pr=k((mp,Ds)=>{"use strict";var Hl=ye(),Ts=Ft(),{ANY:Vl}=Ts,Bl=Ne(),Yl=zt(),Ps=Mt(),Ns=cr(),Kl=ur(),Xl=lr(),Jl=(r,e,t,n)=>{r=new Hl(r,n),e=new Bl(e,n);let i,s,o,a,u;switch(t){case">":i=Ps,s=Kl,o=Ns,a=">",u=">=";break;case"<":i=Ns,s=Xl,o=Ps,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Yl(r,e,n))return!1;for(let p=0;p<e.set.length;++p){let h=e.set[p],l=null,b=null;if(h.forEach(m=>{m.semver===Vl&&(m=new Ts(">=0.0.0")),l=l||m,b=b||m,i(m.semver,l.semver,n)?l=m:o(m.semver,b.semver,n)&&(b=m)}),l.operator===a||l.operator===u||(!b.operator||b.operator===a)&&s(r,b.semver))return!1;if(b.operator===u&&o(r,b.semver))return!1}return!0};Ds.exports=Jl});var Ms=k((gp,qs)=>{"use strict";var Ql=pr(),Zl=(r,e,t)=>Ql(r,e,">",t);qs.exports=Zl});var ks=k((yp,Fs)=>{"use strict";var eu=pr(),tu=(r,e,t)=>eu(r,e,"<",t);Fs.exports=tu});var Gs=k((bp,Us)=>{"use strict";var zs=Ne(),ru=(r,e,t)=>(r=new zs(r,t),e=new zs(e,t),r.intersects(e,t));Us.exports=ru});var Hs=k((wp,Ws)=>{"use strict";var nu=zt(),iu=Pe();Ws.exports=(r,e,t)=>{let n=[],i=null,s=null,o=r.sort((h,l)=>iu(h,l,t));for(let h of o)nu(h,e,t)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[h,l]of n)h===l?a.push(h):!l&&h===o[0]?a.push("*"):l?h===o[0]?a.push(`<=${l}`):a.push(`${h} - ${l}`):a.push(`>=${h}`);let u=a.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var Js=k((Ep,Xs)=>{"use strict";var Vs=Ne(),en=Ft(),{ANY:Qr}=en,Zr=zt(),tn=Pe(),su=(r,e,t={})=>{if(r===e)return!0;r=new Vs(r,t),e=new Vs(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let o=au(i,s,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ou=[new en(">=0.0.0-0")],Bs=[new en(">=0.0.0")],au=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Qr){if(e.length===1&&e[0].semver===Qr)return!0;t.includePrerelease?r=ou:r=Bs}if(e.length===1&&e[0].semver===Qr){if(t.includePrerelease)return!0;e=Bs}let n=new Set,i,s;for(let m of r)m.operator===">"||m.operator===">="?i=Ys(i,m,t):m.operator==="<"||m.operator==="<="?s=Ks(s,m,t):n.add(m.semver);if(n.size>1)return null;let o;if(i&&s){if(o=tn(i.semver,s.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let m of n){if(i&&!Zr(m,String(i),t)||s&&!Zr(m,String(s),t))return null;for(let E of e)if(!Zr(m,String(E),t))return!1;return!0}let a,u,p,h,l=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,b=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;l&&l.prerelease.length===1&&s.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let m of e){if(h=h||m.operator===">"||m.operator===">=",p=p||m.operator==="<"||m.operator==="<=",i){if(b&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===b.major&&m.semver.minor===b.minor&&m.semver.patch===b.patch&&(b=!1),m.operator===">"||m.operator===">="){if(a=Ys(i,m,t),a===m&&a!==i)return!1}else if(i.operator===">="&&!m.test(i.semver))return!1}if(s){if(l&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===l.major&&m.semver.minor===l.minor&&m.semver.patch===l.patch&&(l=!1),m.operator==="<"||m.operator==="<="){if(u=Ks(s,m,t),u===m&&u!==s)return!1}else if(s.operator==="<="&&!m.test(s.semver))return!1}if(!m.operator&&(s||i)&&o!==0)return!1}return!(i&&p&&!s&&o!==0||s&&h&&!i&&o!==0||b||l)},Ys=(r,e,t)=>{if(!r)return e;let n=tn(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Ks=(r,e,t)=>{if(!r)return e;let n=tn(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Xs.exports=su});var hr=k((Ap,eo)=>{"use strict";var rn=Ct(),Qs=St(),cu=ye(),Zs=Fr(),lu=et(),uu=_i(),fu=Ci(),du=ji(),pu=Ii(),hu=Pi(),mu=Ti(),gu=qi(),yu=Fi(),bu=Pe(),wu=Gi(),Eu=Hi(),Au=ar(),Ou=Ki(),_u=Ji(),Su=Mt(),Cu=cr(),Ru=Ur(),xu=Gr(),ju=lr(),vu=ur(),$u=Wr(),Iu=os(),Lu=cs(),Pu=Ft(),Nu=Ne(),Tu=zt(),Du=_s(),qu=Cs(),Mu=xs(),Fu=$s(),ku=Ls(),zu=pr(),Uu=Ms(),Gu=ks(),Wu=Gs(),Hu=Hs(),Vu=Js();eo.exports={parse:lu,valid:uu,clean:fu,inc:du,diff:pu,major:hu,minor:mu,patch:gu,prerelease:yu,compare:bu,rcompare:wu,compareLoose:Eu,compareBuild:Au,sort:Ou,rsort:_u,gt:Su,lt:Cu,eq:Ru,neq:xu,gte:ju,lte:vu,cmp:$u,coerce:Iu,truncate:Lu,Comparator:Pu,Range:Nu,satisfies:Tu,toComparators:Du,maxSatisfying:qu,minSatisfying:Mu,minVersion:Fu,validRange:ku,outside:zu,gtr:Uu,ltr:Gu,intersects:Wu,simplifyRange:Hu,subset:Vu,SemVer:cu,re:rn.re,src:rn.src,tokens:rn.t,SEMVER_SPEC_VERSION:Qs.SEMVER_SPEC_VERSION,RELEASE_TYPES:Qs.RELEASE_TYPES,compareIdentifiers:Zs.compareIdentifiers,rcompareIdentifiers:Zs.rcompareIdentifiers}});var mr=Xt(hr(),1);import*as Ut from"node:process";try{let r=ii?.node;typeof r=="string"&&!mr.satisfies(Ut.version,r)&&H.warn(`
|
|
8
|
+
import{a as si,f as te}from"./chunks/U5DIFWGH.js";import{c as oi}from"./chunks/4PTNG4EI.js";import{a as er}from"./chunks/KA43H34P.js";import{a as Fa}from"./chunks/ERBLCNSR.js";import{a as ai,c as tr,d as Dr,e as li,g as ui}from"./chunks/TZMWTSOQ.js";import{a as Le,b as ni,c as ii}from"./chunks/7WOMNRDU.js";import{a as ci}from"./chunks/H3CWVIT3.js";import{a as ri}from"./chunks/RIJ5NQKJ.js";import{Ba as ti,O as Yn,R as Kn,Z as Dt,a as Vn,aa as _t,ba as Jt,c as Oe,ea as ct,ga as Xn,ia as H,ja as Qt,ka as Jn,l as Tr,oa as ge,pa as Zt,sa as Qn,u as Bn,va as Zn,wa as ei}from"./chunks/4JI4GT6B.js";import"./chunks/NEWT5A6S.js";import{a as Ue,c as k,e as Xt}from"./chunks/RFWIIJFG.js";var St=k((Id,fi)=>{"use strict";var ka="2.0.0",za=Number.MAX_SAFE_INTEGER||9007199254740991,Ua=16,Ga=250,Wa=["major","premajor","minor","preminor","patch","prepatch","prerelease"];fi.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ua,MAX_SAFE_BUILD_LENGTH:Ga,MAX_SAFE_INTEGER:za,RELEASE_TYPES:Wa,SEMVER_SPEC_VERSION:ka,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var qt=k((Ld,di)=>{"use strict";var Ha=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};di.exports=Ha});var Ct=k((Ge,pi)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:qr,MAX_SAFE_BUILD_LENGTH:Va,MAX_LENGTH:Ba}=St(),Ya=qt();Ge=pi.exports={};var Ka=Ge.re=[],Xa=Ge.safeRe=[],C=Ge.src=[],Ja=Ge.safeSrc=[],R=Ge.t={},Qa=0,Mr="[a-zA-Z0-9-]",Za=[["\\s",1],["\\d",Ba],[Mr,Va]],ec=r=>{for(let[e,t]of Za)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},G=(r,e,t)=>{let n=ec(e),i=Qa++;Ya(r,i,e),R[r]=i,C[i]=e,Ja[i]=n,Ka[i]=new RegExp(e,t?"g":void 0),Xa[i]=new RegExp(n,t?"g":void 0)};G("NUMERICIDENTIFIER","0|[1-9]\\d*");G("NUMERICIDENTIFIERLOOSE","\\d+");G("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Mr}*`);G("MAINVERSION",`(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})\\.(${C[R.NUMERICIDENTIFIER]})`);G("MAINVERSIONLOOSE",`(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})\\.(${C[R.NUMERICIDENTIFIERLOOSE]})`);G("PRERELEASEIDENTIFIER",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIER]})`);G("PRERELEASEIDENTIFIERLOOSE",`(?:${C[R.NONNUMERICIDENTIFIER]}|${C[R.NUMERICIDENTIFIERLOOSE]})`);G("PRERELEASE",`(?:-(${C[R.PRERELEASEIDENTIFIER]}(?:\\.${C[R.PRERELEASEIDENTIFIER]})*))`);G("PRERELEASELOOSE",`(?:-?(${C[R.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[R.PRERELEASEIDENTIFIERLOOSE]})*))`);G("BUILDIDENTIFIER",`${Mr}+`);G("BUILD",`(?:\\+(${C[R.BUILDIDENTIFIER]}(?:\\.${C[R.BUILDIDENTIFIER]})*))`);G("FULLPLAIN",`v?${C[R.MAINVERSION]}${C[R.PRERELEASE]}?${C[R.BUILD]}?`);G("FULL",`^${C[R.FULLPLAIN]}$`);G("LOOSEPLAIN",`[v=\\s]*${C[R.MAINVERSIONLOOSE]}${C[R.PRERELEASELOOSE]}?${C[R.BUILD]}?`);G("LOOSE",`^${C[R.LOOSEPLAIN]}$`);G("GTLT","((?:<|>)?=?)");G("XRANGEIDENTIFIERLOOSE",`${C[R.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);G("XRANGEIDENTIFIER",`${C[R.NUMERICIDENTIFIER]}|x|X|\\*`);G("XRANGEPLAIN",`[v=\\s]*(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:\\.(${C[R.XRANGEIDENTIFIER]})(?:${C[R.PRERELEASE]})?${C[R.BUILD]}?)?)?`);G("XRANGEPLAINLOOSE",`[v=\\s]*(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[R.XRANGEIDENTIFIERLOOSE]})(?:${C[R.PRERELEASELOOSE]})?${C[R.BUILD]}?)?)?`);G("XRANGE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAIN]}$`);G("XRANGELOOSE",`^${C[R.GTLT]}\\s*${C[R.XRANGEPLAINLOOSE]}$`);G("COERCEPLAIN",`(^|[^\\d])(\\d{1,${qr}})(?:\\.(\\d{1,${qr}}))?(?:\\.(\\d{1,${qr}}))?`);G("COERCE",`${C[R.COERCEPLAIN]}(?:$|[^\\d])`);G("COERCEFULL",C[R.COERCEPLAIN]+`(?:${C[R.PRERELEASE]})?(?:${C[R.BUILD]})?(?:$|[^\\d])`);G("COERCERTL",C[R.COERCE],!0);G("COERCERTLFULL",C[R.COERCEFULL],!0);G("LONETILDE","(?:~>?)");G("TILDETRIM",`(\\s*)${C[R.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";G("TILDE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAIN]}$`);G("TILDELOOSE",`^${C[R.LONETILDE]}${C[R.XRANGEPLAINLOOSE]}$`);G("LONECARET","(?:\\^)");G("CARETTRIM",`(\\s*)${C[R.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";G("CARET",`^${C[R.LONECARET]}${C[R.XRANGEPLAIN]}$`);G("CARETLOOSE",`^${C[R.LONECARET]}${C[R.XRANGEPLAINLOOSE]}$`);G("COMPARATORLOOSE",`^${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]})$|^$`);G("COMPARATOR",`^${C[R.GTLT]}\\s*(${C[R.FULLPLAIN]})$|^$`);G("COMPARATORTRIM",`(\\s*)${C[R.GTLT]}\\s*(${C[R.LOOSEPLAIN]}|${C[R.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";G("HYPHENRANGE",`^\\s*(${C[R.XRANGEPLAIN]})\\s+-\\s+(${C[R.XRANGEPLAIN]})\\s*$`);G("HYPHENRANGELOOSE",`^\\s*(${C[R.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[R.XRANGEPLAINLOOSE]})\\s*$`);G("STAR","(<|>)?=?\\s*\\*");G("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");G("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var rr=k((Pd,hi)=>{"use strict";var tc=Object.freeze({loose:!0}),rc=Object.freeze({}),nc=r=>r?typeof r!="object"?tc:r:rc;hi.exports=nc});var Fr=k((Nd,yi)=>{"use strict";var mi=/^[0-9]+$/,gi=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=mi.test(r),n=mi.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},ic=(r,e)=>gi(e,r);yi.exports={compareIdentifiers:gi,rcompareIdentifiers:ic}});var ye=k((Td,wi)=>{"use strict";var nr=qt(),{MAX_LENGTH:bi,MAX_SAFE_INTEGER:ir}=St(),{safeRe:sr,t:or}=Ct(),sc=rr(),{compareIdentifiers:kr}=Fr(),oc=(r,e)=>{let t=e.split(".");if(t.length>r.length)return!1;for(let n=0;n<t.length;n++)if(kr(r[n],t[n])!==0)return!1;return!0},zr=class r{constructor(e,t){if(t=sc(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>bi)throw new TypeError(`version is longer than ${bi} characters`);nr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?sr[or.LOOSE]:sr[or.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ir||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ir||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ir||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<ir)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(nr("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],i=e.prerelease[t];if(nr("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return kr(n,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(nr("build compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return kr(n,i)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?sr[or.PRERELEASELOOSE]:sr[or.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];if(n===!1&&(s=[t]),oc(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};wi.exports=zr});var et=k((Dd,Ai)=>{"use strict";var Ei=ye(),ac=(r,e,t=!1)=>{if(r instanceof Ei)return r;try{return new Ei(r,e)}catch(n){if(!t)return null;throw n}};Ai.exports=ac});var _i=k((qd,Oi)=>{"use strict";var cc=et(),lc=(r,e)=>{let t=cc(r,e);return t?t.version:null};Oi.exports=lc});var Ci=k((Md,Si)=>{"use strict";var uc=et(),fc=(r,e)=>{let t=uc(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Si.exports=fc});var ji=k((Fd,xi)=>{"use strict";var Ri=ye(),dc=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Ri(r instanceof Ri?r.version:r,t).inc(e,n,i).version}catch{return null}};xi.exports=dc});var Ii=k((kd,$i)=>{"use strict";var vi=et(),pc=(r,e)=>{let t=vi(r,null,!0),n=vi(e,null,!0),i=t.compare(n);if(i===0)return null;let s=i>0,o=s?t:n,a=s?n:t,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let h=u?"pre":"";return t.major!==n.major?h+"major":t.minor!==n.minor?h+"minor":t.patch!==n.patch?h+"patch":"prerelease"};$i.exports=pc});var Pi=k((zd,Li)=>{"use strict";var hc=ye(),mc=(r,e)=>new hc(r,e).major;Li.exports=mc});var Ti=k((Ud,Ni)=>{"use strict";var gc=ye(),yc=(r,e)=>new gc(r,e).minor;Ni.exports=yc});var qi=k((Gd,Di)=>{"use strict";var bc=ye(),wc=(r,e)=>new bc(r,e).patch;Di.exports=wc});var Fi=k((Wd,Mi)=>{"use strict";var Ec=et(),Ac=(r,e)=>{let t=Ec(r,e);return t&&t.prerelease.length?t.prerelease:null};Mi.exports=Ac});var Pe=k((Hd,zi)=>{"use strict";var ki=ye(),Oc=(r,e,t)=>new ki(r,t).compare(new ki(e,t));zi.exports=Oc});var Gi=k((Vd,Ui)=>{"use strict";var _c=Pe(),Sc=(r,e,t)=>_c(e,r,t);Ui.exports=Sc});var Hi=k((Bd,Wi)=>{"use strict";var Cc=Pe(),Rc=(r,e)=>Cc(r,e,!0);Wi.exports=Rc});var ar=k((Yd,Bi)=>{"use strict";var Vi=ye(),xc=(r,e,t)=>{let n=new Vi(r,t),i=new Vi(e,t);return n.compare(i)||n.compareBuild(i)};Bi.exports=xc});var Ki=k((Kd,Yi)=>{"use strict";var jc=ar(),vc=(r,e)=>r.sort((t,n)=>jc(t,n,e));Yi.exports=vc});var Ji=k((Xd,Xi)=>{"use strict";var $c=ar(),Ic=(r,e)=>r.sort((t,n)=>$c(n,t,e));Xi.exports=Ic});var Mt=k((Jd,Qi)=>{"use strict";var Lc=Pe(),Pc=(r,e,t)=>Lc(r,e,t)>0;Qi.exports=Pc});var cr=k((Qd,Zi)=>{"use strict";var Nc=Pe(),Tc=(r,e,t)=>Nc(r,e,t)<0;Zi.exports=Tc});var Ur=k((Zd,es)=>{"use strict";var Dc=Pe(),qc=(r,e,t)=>Dc(r,e,t)===0;es.exports=qc});var Gr=k((ep,ts)=>{"use strict";var Mc=Pe(),Fc=(r,e,t)=>Mc(r,e,t)!==0;ts.exports=Fc});var lr=k((tp,rs)=>{"use strict";var kc=Pe(),zc=(r,e,t)=>kc(r,e,t)>=0;rs.exports=zc});var ur=k((rp,ns)=>{"use strict";var Uc=Pe(),Gc=(r,e,t)=>Uc(r,e,t)<=0;ns.exports=Gc});var Wr=k((np,is)=>{"use strict";var Wc=Ur(),Hc=Gr(),Vc=Mt(),Bc=lr(),Yc=cr(),Kc=ur(),Xc=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Wc(r,t,n);case"!=":return Hc(r,t,n);case">":return Vc(r,t,n);case">=":return Bc(r,t,n);case"<":return Yc(r,t,n);case"<=":return Kc(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};is.exports=Xc});var os=k((ip,ss)=>{"use strict";var Jc=ye(),Qc=et(),{safeRe:fr,t:dr}=Ct(),Zc=(r,e)=>{if(r instanceof Jc)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?fr[dr.COERCEFULL]:fr[dr.COERCE]);else{let u=e.includePrerelease?fr[dr.COERCERTLFULL]:fr[dr.COERCERTL],p;for(;(p=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||p.index+p[0].length!==t.index+t[0].length)&&(t=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(t===null)return null;let n=t[2],i=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Qc(`${n}.${i}.${s}${o}${a}`,e)};ss.exports=Zc});var cs=k((sp,as)=>{"use strict";var el=et(),tl=St(),rl=ye(),nl=(r,e,t)=>{if(!tl.RELEASE_TYPES.includes(e))return null;let n=il(r,t);return n&&sl(n,e)},il=(r,e)=>{let t=r instanceof rl?r.version:r;return el(t,e)},sl=(r,e)=>{if(ol(e))return r.version;switch(r.prerelease=[],e){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},ol=r=>r.startsWith("pre");as.exports=nl});var us=k((op,ls)=>{"use strict";var Hr=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};ls.exports=Hr});var Ne=k((ap,hs)=>{"use strict";var al=/\s+/g,Vr=class r{constructor(e,t){if(t=ll(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Br)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(al," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!ds(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&bl(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let n=0;n<t.length;n++)n>0&&(this.formatted+=" "),this.formatted+=t[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(yl,"");let n=((this.options.includePrerelease&&ml)|(this.options.loose&&gl))+":"+e,i=fs.get(n);if(i)return i;let s=this.options.loose,o=s?_e[be.HYPHENRANGELOOSE]:_e[be.HYPHENRANGE];e=e.replace(o,vl(this.options.includePrerelease)),re("hyphen replace",e),e=e.replace(_e[be.COMPARATORTRIM],dl),re("comparator trim",e),e=e.replace(_e[be.TILDETRIM],pl),re("tilde trim",e),e=e.replace(_e[be.CARETTRIM],hl),re("caret trim",e);let a=e.split(" ").map(l=>wl(l,this.options)).join(" ").split(/\s+/).map(l=>jl(l,this.options));s&&(a=a.filter(l=>(re("loose invalid filter",l,this.options),!!l.match(_e[be.COMPARATORLOOSE])))),re("range list",a);let u=new Map,p=a.map(l=>new Br(l,this.options));for(let l of p){if(ds(l))return[l];u.set(l.value,l)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return fs.set(n,h),h}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>ps(n,t)&&e.set.some(i=>ps(i,t)&&n.every(s=>i.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ul(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if($l(this.set[t],e,this.options))return!0;return!1}};hs.exports=Vr;var cl=us(),fs=new cl,ll=rr(),Br=Ft(),re=qt(),ul=ye(),{safeRe:_e,src:fl,t:be,comparatorTrimReplace:dl,tildeTrimReplace:pl,caretTrimReplace:hl}=Ct(),{FLAG_INCLUDE_PRERELEASE:ml,FLAG_LOOSE:gl}=St(),yl=new RegExp(fl[be.BUILD],"g"),ds=r=>r.value==="<0.0.0-0",bl=r=>r.value==="",ps=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(s=>i.intersects(s,e)),i=n.pop();return t},wl=(r,e)=>(r=r.replace(_e[be.BUILD],""),re("comp",r,e),r=_l(r,e),re("caret",r),r=Al(r,e),re("tildes",r),r=Cl(r,e),re("xrange",r),r=xl(r,e),re("stars",r),r),de=r=>!r||r.toLowerCase()==="x"||r==="*",El=(r,e,t)=>de(r)&&!de(e)||de(e)&&t&&!de(t),Al=(r,e)=>r.trim().split(/\s+/).map(t=>Ol(t,e)).join(" "),Ol=(r,e)=>{let t=e.loose?_e[be.TILDELOOSE]:_e[be.TILDE],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,u)=>{re("tilde",r,i,s,o,a,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(a)?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u?(re("replaceTilde pr",u),p=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`):p=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,re("tilde return",p),p})},_l=(r,e)=>r.trim().split(/\s+/).map(t=>Sl(t,e)).join(" "),Sl=(r,e)=>{re("caret",r,e);let t=e.loose?_e[be.CARETLOOSE]:_e[be.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,u)=>{re("caret",r,i,s,o,a,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(a)?s==="0"?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:u?(re("replaceCaret pr",u),s==="0"?o==="0"?p=`>=${s}.${o}.${a}-${u} <${s}.${o}.${+a+1}-0`:p=`>=${s}.${o}.${a}-${u} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${a}-${u} <${+s+1}.0.0-0`):(re("no pr"),s==="0"?o==="0"?p=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:p=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),re("caret return",p),p})},Cl=(r,e)=>(re("replaceXRanges",r,e),r.split(/\s+/).map(t=>Rl(t,e)).join(" ")),Rl=(r,e)=>{r=r.trim();let t=e.loose?_e[be.XRANGELOOSE]:_e[be.XRANGE];return r.replace(t,(n,i,s,o,a,u)=>{if(re("xRange",r,n,i,s,o,a,u),El(s,o,a))return r;let p=de(s),h=p||de(o),l=h||de(a),b=l;return i==="="&&b&&(i=""),u=e.includePrerelease?"-0":"",p?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&b?(h&&(o=0),a=0,i===">"?(i=">=",h?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",h?s=+s+1:o=+o+1),i==="<"&&(u="-0"),n=`${i+s}.${o}.${a}${u}`):h?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:l&&(n=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),re("xRange return",n),n})},xl=(r,e)=>(re("replaceStars",r,e),r.trim().replace(_e[be.STAR],"")),jl=(r,e)=>(re("replaceGTE0",r,e),r.trim().replace(_e[e.includePrerelease?be.GTE0PRE:be.GTE0],"")),vl=r=>(e,t,n,i,s,o,a,u,p,h,l,b)=>(de(n)?t="":de(i)?t=`>=${n}.0.0${r?"-0":""}`:de(s)?t=`>=${n}.${i}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,de(p)?u="":de(h)?u=`<${+p+1}.0.0-0`:de(l)?u=`<${p}.${+h+1}.0-0`:b?u=`<=${p}.${h}.${l}-${b}`:r?u=`<${p}.${h}.${+l+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),$l=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(re(r[n].semver),r[n].semver!==Br.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Ft=k((cp,Es)=>{"use strict";var kt=Symbol("SemVer ANY"),Xr=class r{static get ANY(){return kt}constructor(e,t){if(t=ms(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===kt?this.value="":this.value=this.operator+this.semver.version,Kr("comp",this)}parse(e){let t=this.options.loose?gs[ys.COMPARATORLOOSE]:gs[ys.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new bs(n[2],this.options.loose):this.semver=kt}toString(){return this.value}test(e){if(Kr("Comparator.test",e,this.options.loose),this.semver===kt||e===kt)return!0;if(typeof e=="string")try{e=new bs(e,this.options)}catch{return!1}return Yr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ws(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new ws(this.value,t).test(e.semver):(t=ms(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Yr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Yr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Es.exports=Xr;var ms=rr(),{safeRe:gs,t:ys}=Ct(),Yr=Wr(),Kr=qt(),bs=ye(),ws=Ne()});var zt=k((lp,As)=>{"use strict";var Il=Ne(),Ll=(r,e,t)=>{try{e=new Il(e,t)}catch{return!1}return e.test(r)};As.exports=Ll});var _s=k((up,Os)=>{"use strict";var Pl=Ne(),Nl=(r,e)=>new Pl(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Os.exports=Nl});var Cs=k((fp,Ss)=>{"use strict";var Tl=ye(),Dl=Ne(),ql=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Dl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Tl(n,t))}),n};Ss.exports=ql});var xs=k((dp,Rs)=>{"use strict";var Ml=ye(),Fl=Ne(),kl=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Fl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Ml(n,t))}),n};Rs.exports=kl});var $s=k((pp,vs)=>{"use strict";var Jr=ye(),zl=Ne(),js=Mt(),Ul=(r,e)=>{r=new zl(r,e);let t=new Jr("0.0.0");if(r.test(t)||(t=new Jr("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],s=null;i.forEach(o=>{let a=new Jr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||js(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||js(t,s))&&(t=s)}return t&&r.test(t)?t:null};vs.exports=Ul});var Ls=k((hp,Is)=>{"use strict";var Gl=Ne(),Wl=(r,e)=>{try{return new Gl(r,e).range||"*"}catch{return null}};Is.exports=Wl});var pr=k((mp,Ds)=>{"use strict";var Hl=ye(),Ts=Ft(),{ANY:Vl}=Ts,Bl=Ne(),Yl=zt(),Ps=Mt(),Ns=cr(),Kl=ur(),Xl=lr(),Jl=(r,e,t,n)=>{r=new Hl(r,n),e=new Bl(e,n);let i,s,o,a,u;switch(t){case">":i=Ps,s=Kl,o=Ns,a=">",u=">=";break;case"<":i=Ns,s=Xl,o=Ps,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Yl(r,e,n))return!1;for(let p=0;p<e.set.length;++p){let h=e.set[p],l=null,b=null;if(h.forEach(m=>{m.semver===Vl&&(m=new Ts(">=0.0.0")),l=l||m,b=b||m,i(m.semver,l.semver,n)?l=m:o(m.semver,b.semver,n)&&(b=m)}),l.operator===a||l.operator===u||(!b.operator||b.operator===a)&&s(r,b.semver))return!1;if(b.operator===u&&o(r,b.semver))return!1}return!0};Ds.exports=Jl});var Ms=k((gp,qs)=>{"use strict";var Ql=pr(),Zl=(r,e,t)=>Ql(r,e,">",t);qs.exports=Zl});var ks=k((yp,Fs)=>{"use strict";var eu=pr(),tu=(r,e,t)=>eu(r,e,"<",t);Fs.exports=tu});var Gs=k((bp,Us)=>{"use strict";var zs=Ne(),ru=(r,e,t)=>(r=new zs(r,t),e=new zs(e,t),r.intersects(e,t));Us.exports=ru});var Hs=k((wp,Ws)=>{"use strict";var nu=zt(),iu=Pe();Ws.exports=(r,e,t)=>{let n=[],i=null,s=null,o=r.sort((h,l)=>iu(h,l,t));for(let h of o)nu(h,e,t)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[h,l]of n)h===l?a.push(h):!l&&h===o[0]?a.push("*"):l?h===o[0]?a.push(`<=${l}`):a.push(`${h} - ${l}`):a.push(`>=${h}`);let u=a.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var Js=k((Ep,Xs)=>{"use strict";var Vs=Ne(),en=Ft(),{ANY:Qr}=en,Zr=zt(),tn=Pe(),su=(r,e,t={})=>{if(r===e)return!0;r=new Vs(r,t),e=new Vs(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let o=au(i,s,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ou=[new en(">=0.0.0-0")],Bs=[new en(">=0.0.0")],au=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Qr){if(e.length===1&&e[0].semver===Qr)return!0;t.includePrerelease?r=ou:r=Bs}if(e.length===1&&e[0].semver===Qr){if(t.includePrerelease)return!0;e=Bs}let n=new Set,i,s;for(let m of r)m.operator===">"||m.operator===">="?i=Ys(i,m,t):m.operator==="<"||m.operator==="<="?s=Ks(s,m,t):n.add(m.semver);if(n.size>1)return null;let o;if(i&&s){if(o=tn(i.semver,s.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let m of n){if(i&&!Zr(m,String(i),t)||s&&!Zr(m,String(s),t))return null;for(let E of e)if(!Zr(m,String(E),t))return!1;return!0}let a,u,p,h,l=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,b=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;l&&l.prerelease.length===1&&s.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let m of e){if(h=h||m.operator===">"||m.operator===">=",p=p||m.operator==="<"||m.operator==="<=",i){if(b&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===b.major&&m.semver.minor===b.minor&&m.semver.patch===b.patch&&(b=!1),m.operator===">"||m.operator===">="){if(a=Ys(i,m,t),a===m&&a!==i)return!1}else if(i.operator===">="&&!m.test(i.semver))return!1}if(s){if(l&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===l.major&&m.semver.minor===l.minor&&m.semver.patch===l.patch&&(l=!1),m.operator==="<"||m.operator==="<="){if(u=Ks(s,m,t),u===m&&u!==s)return!1}else if(s.operator==="<="&&!m.test(s.semver))return!1}if(!m.operator&&(s||i)&&o!==0)return!1}return!(i&&p&&!s&&o!==0||s&&h&&!i&&o!==0||b||l)},Ys=(r,e,t)=>{if(!r)return e;let n=tn(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Ks=(r,e,t)=>{if(!r)return e;let n=tn(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Xs.exports=su});var hr=k((Ap,eo)=>{"use strict";var rn=Ct(),Qs=St(),cu=ye(),Zs=Fr(),lu=et(),uu=_i(),fu=Ci(),du=ji(),pu=Ii(),hu=Pi(),mu=Ti(),gu=qi(),yu=Fi(),bu=Pe(),wu=Gi(),Eu=Hi(),Au=ar(),Ou=Ki(),_u=Ji(),Su=Mt(),Cu=cr(),Ru=Ur(),xu=Gr(),ju=lr(),vu=ur(),$u=Wr(),Iu=os(),Lu=cs(),Pu=Ft(),Nu=Ne(),Tu=zt(),Du=_s(),qu=Cs(),Mu=xs(),Fu=$s(),ku=Ls(),zu=pr(),Uu=Ms(),Gu=ks(),Wu=Gs(),Hu=Hs(),Vu=Js();eo.exports={parse:lu,valid:uu,clean:fu,inc:du,diff:pu,major:hu,minor:mu,patch:gu,prerelease:yu,compare:bu,rcompare:wu,compareLoose:Eu,compareBuild:Au,sort:Ou,rsort:_u,gt:Su,lt:Cu,eq:Ru,neq:xu,gte:ju,lte:vu,cmp:$u,coerce:Iu,truncate:Lu,Comparator:Pu,Range:Nu,satisfies:Tu,toComparators:Du,maxSatisfying:qu,minSatisfying:Mu,minVersion:Fu,validRange:ku,outside:zu,gtr:Uu,ltr:Gu,intersects:Wu,simplifyRange:Hu,subset:Vu,SemVer:cu,re:rn.re,src:rn.src,tokens:rn.t,SEMVER_SPEC_VERSION:Qs.SEMVER_SPEC_VERSION,RELEASE_TYPES:Qs.RELEASE_TYPES,compareIdentifiers:Zs.compareIdentifiers,rcompareIdentifiers:Zs.rcompareIdentifiers}});var mr=Xt(hr(),1);import*as Ut from"node:process";try{let r=ii?.node;typeof r=="string"&&!mr.satisfies(Ut.version,r)&&H.warn(`
|
|
9
9
|
\u26A0\uFE0F Warning: failed to satisfy expected node version. Expected: "${r}", Current "${Ut.version}"
|
|
10
10
|
|
|
11
11
|
`),mr.major(Ut.version)===20&&H.info(er([Dt(Jt("Deprecation warning: Node.js 20 support is ending")),"","Node.js 20 reached end-of-life on April 30, 2026.","Future Redocly CLI releases require Node.js 22.12.0 or later.",`You are using Node.js ${Ut.version}.`,"",`Update Node.js: ${ct("https://nodejs.org/en/download")}`]))}catch{}var qa=Xt(Fa(),1);import*as Ma from"node:path";import{notStrictEqual as yf,strictEqual as bf}from"assert";var Bu={right:Qu,center:Zu},Yu=0,gr=1,Ku=2,yr=3,nn=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)!==null&&t!==void 0?t:!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let t=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
|
|
@@ -122,7 +122,7 @@ Eject that one and set the framework in your copy's default export:
|
|
|
122
122
|
# then in generators/tanstack-query/index.ts: run: tanstackQueryGenerator('${n}')
|
|
123
123
|
`);return}if(!It.has(t))throw te.eject_generator_outcome="unknown-generator",new ge(`
|
|
124
124
|
\u274C Unknown generator "${t}". Ejectable generators: ${[...It].join(", ")}.
|
|
125
|
-
`);let i=Vf(),s=Bf(i,t),{GENERATOR_VERSION:o}=await import("./chunks/
|
|
125
|
+
`);let i=Vf(),s=Bf(i,t),{GENERATOR_VERSION:o}=await import("./chunks/D4U2LEEI.js"),a=Gf(r.dir??"./generators"),u=s===void 0?V(a,`${t}.mjs`):V(a,t,"index.ts"),p=ke(process.cwd(),u)||u;if(r.update){if(s===void 0){let O=Ee(V(i,"generators",`${t}.mjs`),"utf-8");Jf({name:t,asset:O,toolkitVersion:o,assetsDir:i,dir:a,target:u,printedTarget:p})}else Xf({name:t,files:s,toolkitVersion:o,assetsDir:i,dir:a,targetDir:V(a,t)});return}if(we(u)&&!r.force)throw te.eject_generator_outcome="already-exists",new ge(`
|
|
126
126
|
\u274C ${p} already exists. Use --update to merge the newer version in, or --force to overwrite.
|
|
127
127
|
`);Ln(Yt(u),{recursive:!0});let h=s===void 0?[Ee(V(i,"generators",`${t}.mjs`),"utf-8")]:s.map(O=>Ee(V(i,"generators",t,O),"utf-8"));s===void 0?ae(u,h[0],"utf-8"):s.forEach((O,U)=>{ae(V(a,t,O),h[U],"utf-8")});let l=na("client-generators",i),b=na(`${t}-generator`,i);Pn(a,Tn(a));let m=`./${ke(e.configPath===void 0?process.cwd():ea(Yt(e.configPath)),ea(u)).split("\\").join("/")}`,E=Dn({[Re]:o}),d=h.some(O=>O.includes(`from "${vn}"`)||O.includes(`from '${vn}'`)),S=Kf(e.configPath,t,m),N=s===void 0?p:ke(process.cwd(),V(a,t))+"/";H.info(`Ejected the "${t}" generator to ${N}.
|
|
128
128
|
`+(E==="added"?`Added ${Re} to devDependencies (the ejected file imports its toolkit) \u2014 run your installer.
|
|
@@ -156,13 +156,13 @@ Reference: ${Hf}
|
|
|
156
156
|
- ${o.message}`)}if(r["lint-config"]==="off"||n.document===void 0)return n;let i=await ti({config:n,severity:r["lint-config"]||"warn"}),s=Zn(i);if(ei(i,{maxProblems:r["max-problems"],totals:s,version:e,command:"check-config"}),wd(s,Sa(r)),s.errors>0)throw new Zt("Config check failed.");return n}function wd(r,e){r.errors>0?H.error(`\u274C Your config has ${r.errors} ${Tr("error",r.errors)}.
|
|
157
157
|
`):r.warnings>0?H.warn(`\u26A0\uFE0F Your config has ${r.warnings} ${Tr("warning",r.warnings)}.
|
|
158
158
|
`):e==="check-config"&&H.info(_t(`\u2705 Your config is valid.
|
|
159
|
-
`))}import{execSync as Ed}from"node:child_process";import*as Nt from"node:fs";import{existsSync as Ad,writeFileSync as Od,readFileSync as ja}from"node:fs";import*as va from"node:os";import{tmpdir as $a}from"node:os";import{dirname as xa,join as Pr}from"node:path";async function Ra(r=tr){try{let{fetchWithTimeout:e}=await import("./chunks/HHCU6T2V.js");return await e(ai,{timeout:r}),!0}catch{return!1}}var Lr="***";async function Ia({config:r,argv:e,exit_code:t,execution_time:n,spec_version:i,spec_keyword:s,spec_full_version:o,respect_x_security_auth_types:a,respect_source_description_types:u,respect_criterion_object_types:p,lint_rules_with_errors:h,lint_rules_with_warnings:l,lint_rules_with_ignored_problems:b,generate_client:m,eject_generator:E,bundle:d}){try{if(!e||!await Ra(1e3))return;let{_:[N],$0:O,...U}=e,{RedoclyOAuthClient:W,getReuniteUrl:xe}=await import("./chunks/
|
|
159
|
+
`))}import{execSync as Ed}from"node:child_process";import*as Nt from"node:fs";import{existsSync as Ad,writeFileSync as Od,readFileSync as ja}from"node:fs";import*as va from"node:os";import{tmpdir as $a}from"node:os";import{dirname as xa,join as Pr}from"node:path";async function Ra(r=tr){try{let{fetchWithTimeout:e}=await import("./chunks/HHCU6T2V.js");return await e(ai,{timeout:r}),!0}catch{return!1}}var Lr="***";async function Ia({config:r,argv:e,exit_code:t,execution_time:n,spec_version:i,spec_keyword:s,spec_full_version:o,respect_x_security_auth_types:a,respect_source_description_types:u,respect_criterion_object_types:p,lint_rules_with_errors:h,lint_rules_with_warnings:l,lint_rules_with_ignored_problems:b,generate_client:m,eject_generator:E,bundle:d}){try{if(!e||!await Ra(1e3))return;let{_:[N],$0:O,...U}=e,{RedoclyOAuthClient:W,getReuniteUrl:xe}=await import("./chunks/BYO4KBZG.js"),Xe=new W(Le),Je=xe(r,U.residency),Qe=await Xe.isAuthorized(Je),B=$d();B||(B=`ann_${ui()}`,vd(B));let He=Qt(i),$=[{id:N,object:"command",uri:`urn:redocly:cli:command:${N}`,logged_in:Qe?"yes":"no",command:N,...Rd(U,process.argv.slice(2)),node_version:process.version,npm_version:jd(),version:Le,exit_code:t,execution_time:n,metadata:process.env.REDOCLY_CLI_TELEMETRY_METADATA,environment_ci:process.env.CI,environment:process.env.REDOCLY_ENVIRONMENT,has_config:typeof r?.document?.parsed>"u"?"no":"yes",spec_version:i,spec_keyword:s,spec_full_version:o,respect_x_security_auth_types:He==="arazzo1"&&a?.length?JSON.stringify(a):void 0,respect_source_description_types:He==="arazzo1"&&u?.length?JSON.stringify(u):void 0,respect_criterion_object_types:He==="arazzo1"&&p?.length?JSON.stringify(p):void 0,lint_rules_with_errors:h?.length?JSON.stringify(h):void 0,lint_rules_with_warnings:l?.length?JSON.stringify(l):void 0,lint_rules_with_ignored_problems:b?.length?JSON.stringify(b):void 0,generate_client_builtin_generators:m?.generate_client_builtin_generators?.length?JSON.stringify(m.generate_client_builtin_generators):void 0,generate_client_custom_generators_count:m?.generate_client_custom_generators_count,generate_client_toolkit_imports:m?.generate_client_toolkit_imports?.length?JSON.stringify(m.generate_client_toolkit_imports):void 0,generate_client_error_category:m?.generate_client_error_category,generate_client_ejected_generators:m?.generate_client_ejected_generators?.length?JSON.stringify(m.generate_client_ejected_generators):void 0,generate_client_composed_apis_count:m?.generate_client_composed_apis_count,eject_generator_action:E?.eject_generator_action,eject_generator_name:E?.eject_generator_name,eject_generator_outcome:E?.eject_generator_outcome,eject_generator_conflicts:E?.eject_generator_conflicts,eject_generator_from_version:E?.eject_generator_from_version,eject_generator_to_version:E?.eject_generator_to_version,bundle_overlays_count:d?.bundle_overlays_count}],_=li.mapToCloudEvent({type:"com.redocly.command.ran",source:"urn:redocly:cli",origin:"redocly-cli",env:"production",osPlatform:va.platform(),actor:{id:B,object:"user",uri:""},category:"product",data:$}),{otelTelemetry:P}=await import("./chunks/GU34RIUR.js");P.send(_)}catch{}}function La(r,e){for(let t of r.sourceDescriptions??[])t.type&&e.add(t.type)}function Pa(r,e){for(let t of r.workflows??[]){Pt(t.successActions,e),Pt(t.failureActions,e);for(let n of t.steps??[])Na(n.successCriteria,e),Pt(n.onSuccess,e),Pt(n.onFailure,e)}Pt(Object.values(r.components?.successActions??{}),e),Pt(Object.values(r.components?.failureActions??{}),e)}function Pt(r,e){for(let t of r??[])Na(t.criteria,e)}function Na(r,e){for(let t of r??[]){let n=_d(t);n&&e.add(n)}}function _d(r){let e=r.type;return typeof e=="string"?e:e?.type||(r.condition?"simple":void 0)}function Ta(r,e){for(let t of r.workflows??[]){for(let n of t["x-security"]??[]){let i=n.scheme;if(i?.type){let s=i.type==="http"?i.scheme:i.type;s&&e.add(s)}}for(let n of t.steps??[])for(let i of n["x-security"]??[]){let s=i.scheme;if(s?.type){let a=s.type==="http"?s.scheme:s.type;a&&e.add(a)}let o=i.schemeName;o&&e.add(o)}}}function Sd(r){return Nt.existsSync(r)&&Nt.statSync(r).isFile()}function Cd(r){return Nt.existsSync(r)&&Nt.statSync(r).isDirectory()}function Un(r){return r&&(Bn(r)?r.split("://")[0]+"://url":Sd(r)?r.replace(/.+\.([^.]+)$/,(e,t)=>"file-"+t):Cd(r)?"folder":r)}function Gn(r,e,t){let n=Array.isArray(e)?e:[e];for(let i of n)i.length>1&&(r=r.replaceAll(i,t));return r}function Da(r,e){let t={};for(let[n,i]of Object.entries(r))e.includes(n)?t[n]=Lr:Oe(i)?t[n]=Da(i,e):t[n]=i;return t}function Wn(r,e,t=[]){if(Array.isArray(r))return r.forEach(n=>Wn(n,e,t)),t;if(Oe(r))for(let[n,i]of Object.entries(r))e.includes(n)&&typeof i=="string"?t.push(i):(Oe(i)||Array.isArray(i))&&Wn(i,e,t);return t}function Rd(r,e){let t=["organization","o","input","i","author","a","clientCert","clientKey","caCert","server","S"],n=e.join(" "),i={};for(let[s,o]of Object.entries(r))if(t.includes(s))i[s]=Lr,n=Gn(n,o,Lr);else if(typeof o=="string"){let a=Un(o);i[s]=a,n=Gn(n,o,a)}else if(Array.isArray(o)){i[s]=o.map(Un);for(let a of o){let u=Un(a);n.includes(a)&&(n=n.replaceAll(a,u))}}else if(Oe(o)){let a=Wn(o,t);for(let u of a)n=Gn(n,u,Lr);i[s]=Da(o,t)}else i[s]=o;return{arguments:JSON.stringify(i),raw_input:n}}var xd=process.platform==="win32"?Pr(xa(process.execPath),"node_modules","npm","package.json"):Pr(xa(process.execPath),"..","lib","node_modules","npm","package.json");function jd(){try{return JSON.parse(ja(xd,"utf8")).version}catch{}try{return Ed("npm -v",{stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return"unknown"}}var vd=r=>{if(!(process.env.CI||!r))try{let t=Pr($a(),Dr);Od(t,r)}catch{}},$d=()=>{if(!process.env.CI)try{let e=Pr($a(),Dr);return Ad(e)?ja(e).toString().trim():void 0}catch{return}};function J(r,e={}){return async t=>{let n=performance.now(),i=2,s,o="unknown",a,u,p,h=new Set,l=new Set,b=new Set,m=({parsed:O,source:U})=>{if(o="unknown",a=void 0,u=void 0,U?.absoluteRef&&Kn(U.absoluteRef)){o="graphql";return}try{o=Jn(O)}catch{o="unsupported"}Oe(O)&&(a=O?.openapi?"openapi":O?.swagger?"swagger":O?.asyncapi?"asyncapi":O?.arazzo?"arazzo":O?.overlay?"overlay":void 0,a&&(u=O[a]),Qt(o)==="arazzo1"&&(Ta(O,h),La(O,l),Pa(O,b)))},E=new Set,d=new Set,S=new Set,N=O=>{for(let U of O)U.ignored?S.add(U.ruleId):U.severity==="error"?E.add(U.ruleId):U.severity==="warn"&&d.add(U.ruleId)};try{if(t.config&&!Vn(t.config))throw new ge("Please provide a valid path to the configuration file.");p=await Ca(t,Le,e.plugins),s=p.resolvedConfig.telemetry,i=1,typeof r=="function"&&await r({argv:t,config:p,version:Le,collectSpecData:m,collectResults:N}),i=0}catch(O){O instanceof Zt||(O instanceof ge?H.error(O.message+`
|
|
160
160
|
|
|
161
161
|
`):(H.error(`An unexpected error occurred. This is likely a bug that should be reported.
|
|
162
162
|
`),H.error(O instanceof Error?O.stack||O.message:String(O)),H.error(`
|
|
163
163
|
`)))}finally{if(process.env.REDOCLY_TELEMETRY!=="off"&&s!=="off"){let O=Math.round(performance.now()-n);await Ia({config:p,argv:t,exit_code:i,execution_time:O,spec_version:o,spec_keyword:a,spec_full_version:u,respect_x_security_auth_types:[...h],respect_source_description_types:[...l],respect_criterion_object_types:[...b],lint_rules_with_errors:[...E],lint_rules_with_warnings:[...d],lint_rules_with_ignored_problems:[...S],generate_client:si,eject_generator:te,bundle:ci})}process.once("beforeExit",()=>{process.exit(i)})}}}qa.config({path:Ma.resolve(process.cwd(),"./.env")});Oa();Zo(ln(process.argv)).version(!1).option("version",{type:"boolean",description:"Show version number.",global:!1}).middleware(r=>{r.version&&r._.length===0&&(H.output(`${Le}
|
|
164
|
-
`),process.exit(0))},!0).help("help","Show help.").parserConfiguration({"greedy-arrays":!1,"boolean-negation":!1}).command("stats [api]","Show statistics for an API description.",r=>r.env("REDOCLY_CLI_STATS").positional("api",{type:"string"}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["stylish","json","markdown"],default:"stylish"}}),async r=>{let{handleStats:e}=await import("./chunks/ON2YZD5C.js");J(e)(r)}).command("inspect-node-types <api>","Show the node types of an API description, for writing configurable rules and custom plugins [experimental].",r=>r.env("REDOCLY_CLI_INSPECT_NODE_TYPES").positional("api",{description:"API description file to inspect.",type:"string",demandOption:!0}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},pointer:{description:"JSON pointer to a node, optionally prefixed with a file: `#/paths` or `schemas.yaml#/User`.",type:"string",alias:"p"},type:{description:"List only the nodes of this type.",type:"string"},summary:{description:"List the node types used in the description, with counts.",type:"boolean"},parents:{description:"Show the chain of node types leading to the node: down to the node with --pointer, or the distinct chains that reach the type with --type.",type:"boolean"}}).conflicts({pointer:["type","summary"],type:["summary"],summary:["parents"]}).check(e=>{if(e.parents&&!e.pointer&&!e.type)throw new Error("The --parents option requires --pointer or --type.");return!0}),async r=>{let{handleInspectNodeTypes:e}=await import("./chunks/FHDBQIEB.js");J(e)(r)}).command("score [api]","Score an API description for integration simplicity and agent readiness.",r=>r.env("REDOCLY_CLI_SCORE").positional("api",{type:"string"}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["stylish","json"],default:"stylish"},"operation-details":{description:"Print per-operation metric details.",type:"boolean",default:!1},"debug-operation-id":{description:"Print detailed schema breakdown for a specific operation.",type:"string"}}),async r=>{let{handleScore:e}=await import("./chunks/5EHUKG3I.js");J(e)(r)}).command("split [api]","Split an API description into a multi-file structure.",r=>r.env("REDOCLY_CLI_SPLIT").positional("api",{description:"API description file that you want to split",type:"string"}).option({outDir:{description:"Output directory where files will be saved.",required:!0,type:"string"},separator:{description:"File path separator used while splitting.",required:!1,type:"string",default:"_"},"file-name-conflicts-severity":{description:"Severity level for file name conflicts.",choices:["warn","error","off"],default:"warn"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}).demandOption("api"),async r=>{let{handleSplit:e}=await import("./chunks/USAJ5FBD.js");J(e)(r)}).command("join [apis...]","Join multiple API descriptions into one [experimental].",r=>r.env("REDOCLY_CLI_JOIN").positional("apis",{array:!0,type:"string",demandOption:!0}).option({"prefix-tags-with-info-prop":{description:"Prefix tags with property value from info object.",requiresArg:!0,type:"string"},"prefix-tags-with-filename":{description:"Prefix tags with property value from file name.",type:"boolean",default:!1},"prefix-components-with-info-prop":{description:"Prefix components with property value from info object.",requiresArg:!0,type:"string"},"without-x-tag-groups":{description:"Skip automated x-tagGroups creation",type:"boolean"},output:{description:"Output file.",alias:"o",type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleJoin:e}=await import("./chunks/FOXOWXSK.js");J(e)(r)}).command("push-status [pushId]",!1,r=>r.env("REDOCLY_CLI_PUSH_STATUS").positional("pushId",{description:"Push id.",type:"string",demandOption:!0}).implies("max-execution-time","wait").option({organization:{description:"ID of the organization to push to.",type:"string",alias:"o",required:!0},project:{description:"ID of the project to push to.",type:"string",required:!0,alias:"p"},domain:{description:"Specify a domain.",alias:"d",type:"string",required:!1},wait:{description:"Wait for build to finish.",type:"boolean",default:!1},"max-execution-time":{description:"Maximum execution time in seconds.",type:"number"},"continue-on-deploy-failures":{description:"Command does not fail even if the deployment fails.",type:"boolean",default:!1},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handlePushStatus:e}=await import("./chunks/CK2FG2DD.js");J(e)(r)}).command("push [files...]","Push documents to Reunite.",r=>r.env("REDOCLY_CLI_PUSH").positional("files",{type:"string",array:!0,demandOption:!0}).option({branch:{description:"Branch name to push to.",type:"string",alias:"b",required:!0},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},organization:{description:"ID of the organization to push to.",type:"string",alias:"o",required:!0},project:{description:"ID of the project to push to.",type:"string",alias:"p",required:!0},"mount-path":{description:"The path files should be pushed to.",type:"string",alias:"mp",required:!0,coerce:_a},author:{description:"Author of the commit.",type:"string",alias:"a",required:!0},message:{description:"Commit message.",type:"string",alias:"m",required:!0},"commit-sha":{description:"Commit SHA.",type:"string",alias:"sha"},"commit-url":{description:"Commit URL.",type:"string",alias:"url"},namespace:{description:"Repository namespace.",type:"string"},repository:{description:"Repository name.",type:"string"},"created-at":{description:"Commit creation date.",type:"string"},domain:{description:"Specify a domain.",alias:"d",type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"default-branch":{type:"string",default:"main"},"max-execution-time":{description:"Maximum execution time in seconds.",type:"number"},"wait-for-deployment":{description:"Wait for build to finish.",type:"boolean",default:!1},replace:{description:"Remove the files under the mount path that are not part of this push.",type:"boolean",default:!1},verbose:{type:"boolean",default:!1},"continue-on-deploy-failures":{description:"Command does not fail even if the deployment fails.",type:"boolean",default:!1}}),async r=>{let{handlePush:e}=await import("./chunks/JZPKVDJA.js");J(e)(r)}).command("recheck [paths..]","Lint Markdown prose and structure from the recheck block in redocly.yaml.",r=>r.env("REDOCLY_CLI_RECHECK").positional("paths",{array:!0,type:"string",describe:"Files or directories to lint. Default: the current directory."}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["table","json","sarif","github-actions"],default:"table"},tags:{description:"Run only rules with these tags.",array:!0,type:"string"},rule:{description:"Run only these rules.",alias:"r",array:!0,type:"string"},"skip-rule":{description:"Skip these rules.",array:!0,type:"string"},stats:{description:"Print rule statistics.",alias:"s",type:"boolean"},fix:{description:"Apply fixes to Markdown files.",alias:"f",type:"boolean"},"max-problems":{description:"Maximum number of problems in the report.",type:"number"},summary:{description:"Print a run summary.",choices:["json","text"],type:"string"},"summary-path":{description:"Write the summary to a file.",type:"string"},readability:{description:"Report readability scores instead of linting.",type:"boolean"},"generate-baseline":{description:"Write the baseline file from the current findings.",type:"boolean"},"generate-markdoc-schema":{description:"Generate a Markdoc tag schema from theme modules.",type:"boolean"},from:{description:"Module paths to read Markdoc tags from (with --generate-markdoc-schema).",array:!0,type:"string"},output:{description:"Output file for the generated schema.",type:"string"},check:{description:"Fail if the generated schema differs from --output.",type:"boolean"}}),async r=>{let{handleRecheck:e}=await import("./chunks/OYDBXGWA.js"),{recheckPresetsPlugin:t}=await import("./chunks/WSDNWUOV.js");J(e,{plugins:[t]})(r)}).command("lint [apis...]","Lint an API or Arazzo description.",r=>r.env("REDOCLY_CLI_LINT").positional("apis",{array:!0,type:"string",demandOption:!0}).option({format:{description:"Use a specific output format.",choices:["stylish","codeframe","json","checkstyle","codeclimate","summary","markdown","github-actions","junit"],default:"codeframe"},"max-problems":{requiresArg:!0,description:"Reduce output to a maximum of N problems.",type:"number",default:100},"generate-ignore-file":{description:"Generate an ignore file.",type:"boolean"},"skip-rule":{description:"Ignore certain rules.",array:!0,type:"string"},"skip-preprocessor":{description:"Ignore certain preprocessors.",array:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},extends:{description:"Override extends configurations (defaults or config file settings).",requiresArg:!0,array:!0,type:"string"}}),async r=>{let{handleLint:e}=await import("./chunks/M3VAMERP.js");J(e)(r)}).command("bundle [apis...]","Bundle a multi-file API description to a single file.",r=>r.env("REDOCLY_CLI_BUNDLE").positional("apis",{array:!0,type:"string",demandOption:!0}).options({output:{type:"string",description:"Output file or folder for inline APIs.",alias:"o"},ext:{description:"Bundle file extension.",requiresArg:!0,choices:ri},"skip-preprocessor":{description:"Ignore certain preprocessors.",array:!0,type:"string"},"skip-decorator":{description:"Ignore certain decorators.",array:!0,type:"string"},overlay:{description:"Overlay file to apply. Repeat to apply several, in order.",array:!0,type:"string",requiresArg:!0},dereferenced:{alias:"d",type:"boolean",description:"Produce a fully dereferenced bundle."},force:{alias:"f",type:"boolean",description:"Produce bundle output even when errors occur."},config:{description:"Path to the config file.",type:"string"},metafile:{description:"Produce metadata about the bundle",type:"string"},extends:{description:"Override extends configurations (defaults or config file settings).",requiresArg:!0,array:!0,type:"string",hidden:!0},"remove-unused-components":{description:"Remove unused components.",type:"boolean",default:!1},"keep-url-references":{description:"Keep absolute url references.",type:"boolean",alias:"k"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},"component-renaming-conflicts-severity":{description:"Whether to show warnings or fail on renaming conflicts (defaults to warn).",choices:["warn","error","off"]},"component-names-strategy":{description:"How to name inlined Schema components: 'basename' (default) or 'title' (from each schema's `title`).",choices:["basename","title"],default:"basename"}}).check(e=>{if(e.output&&(!e.apis||e.apis.length===0))throw new Error("At least one inline API must be specified when using --output.");return!0}),async r=>{let{handleBundle:e}=await import("./chunks/UYF7BOSD.js");J(e)(r)}).command("check-config","Lint the Redocly configuration file.",async r=>r.env("REDOCLY_CLI_CHECK_CONFIG").option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error"],default:"error"}}),r=>{J()(r)}).command("login","Log in to Redocly.",async r=>r.env("REDOCLY_CLI_LOGIN").options({residency:{description:"Residency of the application. Defaults to `us`.",alias:["r"],type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"}}),async r=>{let{handleLogin:e}=await import("./chunks/DRSH6QBU.js");J(e)(r)}).command("logout","Clear your stored credentials.",r=>r,async r=>{let{handleLogout:e}=await import("./chunks/FP63LRP5.js");J(e)(r)}).command("project","[early access] Work with a Redocly-hosted project.",r=>r.env("REDOCLY_CLI_PROJECT").command("clone <project> [directory]","Clone a Redocly-hosted project as a Git repository.",e=>e.positional("project",{description:"Organization and project slugs or IDs, as `<organization>/<project>`.",type:"string",demandOption:!0}).positional("directory",{description:"Directory to clone into. Defaults to the project.",type:"string"}).options({residency:{description:"Residency of the application. Defaults to `us`.",alias:["r"],type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"}}),async e=>{let{handleProjectClone:t}=await import("./chunks/YY44N7JX.js");J(t)(e)}).command("git-credentials <operation>",!1,e=>e.positional("operation",{description:"Credential helper operation: get, store, or erase.",type:"string",demandOption:!0}),async e=>{let{handleProjectGitCredentials:t}=await import("./chunks/IAAYM25M.js");process.stdout.write(await t({operation:e.operation,input:process.stdin,version:Le}))}).demandCommand(1,"Specify a project subcommand: clone.")).command("preview","Preview Redocly project using one of the product NPM packages.",r=>r.env("REDOCLY_CLI_PREVIEW").options({product:{type:"string",choices:["redoc","revel","reef","realm","redoc-revel","redoc-reef","revel-reef"],description:"Product used to launch preview. Default is inferred from project's package.json or 'realm' is used."},plan:{type:"string",choices:oi,default:"enterprise"},port:{alias:"p",type:"number",description:"Preview port.",default:4e3,coerce:at("port",!0)},"project-dir":{alias:["d","source-dir"],type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{process.argv.some(t=>t.startsWith("--source-dir"))&&H.error(`Option --source-dir is deprecated and will be removed soon. Use --project-dir instead.
|
|
165
|
-
`);let{previewProject:e}=await import("./chunks/4ABWBH3W.js");J(e)(r)}).command("build-docs [api]","Produce API documentation as an HTML file",r=>r.positional("api",{type:"string"}).options({o:{describe:"Output destination file.",alias:"output",type:"string",default:"redoc-static.html"},title:{describe:"Page title.",type:"string"},disableGoogleFont:{describe:"Disable Google fonts.",type:"boolean",default:!1},t:{alias:"template",describe:"Path to handlebars page template, see https://github.com/Redocly/redocly-cli/blob/main/packages/cli/src/commands/build-docs/template.hbs for the example.",type:"string"},templateOptions:{describe:"Additional options to pass to the template. Use dot notation, e.g. templateOptions.metaDescription"},theme:{describe:"Redoc theme.openapi configuration. Use dot notation, e.g. theme.openapi.nativeScrollbars"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}).check(e=>{if(e.theme&&!e.theme?.openapi)throw new Error("Invalid option: theme.openapi not set.");return!0}),async r=>{let{handlerBuildCommand:e}=await import("./chunks/ULKOLYWY.js");J(e)(r)}).command("translate <locale>","Creates or updates translations.yaml files and fills them with missing built-in translations and translations from the redocly.yaml and sidebars.yaml files.",r=>r.env("REDOCLY_CLI_TRANSLATE").positional("locale",{description:"Locale code to generate translations for, or `all` for all current project locales.",type:"string",demandOption:!0}).options({"project-dir":{alias:"d",type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleTranslations:e}=await import("./chunks/OMDMN4SS.js");J(e)(r)}).command("eject <type> [path]","Helper function to eject project elements for customization.",r=>r.env("REDOCLY_CLI_EJECT").positional("type",{description:"Specifies what type of project element to eject. Currently this value must be `component`.",demandOption:!0,choices:["component"]}).positional("path",{description:"Filepath to a component or filepath with glob pattern.",type:"string"}).options({"project-dir":{alias:"d",type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},force:{alias:"f",type:"boolean",description:'Skips the "overwrite existing" confirmation when ejecting a component that is already ejected in the destination.'},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleEject:e}=await import("./chunks/LJTGHAPA.js");J(e)(r)}).command("respect [files...]","Run Arazzo tests.",r=>r.env("REDOCLY_CLI_RESPECT").positional("files",{describe:"Test files or glob pattern.",type:"string",array:!0,default:[]}).options({input:{alias:"i",describe:"Input parameters.",type:"string"},server:{alias:"S",describe:"Server parameters.",type:"string"},workflow:{alias:"w",describe:"Workflow name.",type:"string",array:!0},skip:{alias:"s",describe:"Workflow to skip.",type:"string",array:!0},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"},"har-output":{describe:"Har file output name.",type:"string",alias:"H"},"json-output":{describe:"JSON file output name.",type:"string",alias:"J"},mtls:{describe:'Per-domain mutual TLS certificates configuration as JSON. Format: {"<domain>": {"clientCert": "<path>", "clientKey": "<path>", "caCert": "<path>"}}',type:"string",array:!0,coerce:ha},severity:{describe:"Severity of the check.",type:"string"},"max-steps":{describe:"Maximum number of steps to run (default: 2000).",type:"number",default:2e3,coerce:at("max-steps",!0)},"max-fetch-timeout":{describe:"Maximum time to wait for API response per request in milliseconds (default: 40 seconds).",type:"number",default:4e4,coerce:at("max-fetch-timeout",!1)},"execution-timeout":{describe:"Maximum time to wait for the Respect execution in milliseconds (default: 1 hour).",type:"number",default:36e5,coerce:at("execution-timeout",!1)},"no-secrets-masking":{describe:"Do not mask secrets in the output.",type:"boolean",default:!1}}),async r=>{let{handleRespect:e}=await import("./chunks/KOEA2NZG.js");J(e)(r)}).command("generate-arazzo <descriptionPath>","Auto-generate arazzo description file from an API description.",r=>r.env("REDOCLY_CLI_GENERATE_ARAZZO").positional("descriptionPath",{describe:"Description file path.",type:"string"}).options({"output-file":{alias:"o",describe:"Output File name.",type:"string",requiresArg:!0},"with-ai":{describe:"Redesign the generated workflows with an AI provider, using the OpenAPI description as context.",type:"boolean",default:!1},"ai-provider":{describe:'AI provider used with --with-ai; runs the "claude", "codex", or "cursor" CLI in non-interactive mode.',choices:["claude","codex","cursor"],default:"claude"},"ai-model":{describe:"Model passed to the selected AI provider (provider-specific default applies).",type:"string"},"ai-concurrency":{describe:"Number of workflows designed in parallel with --with-ai for large descriptions.",type:"number",default:4,coerce:at("ai-concurrency",!0)},"max-workflows":{describe:"Most workflows the AI may design with --with-ai.",type:"number",default:10,coerce:at("max-workflows",!0)}}),async r=>{let{handleGenerateArazzo:e}=await import("./chunks/NUBOB7QM.js");J(e)(r)}).command("generate-client [api]","Generate a TypeScript client from an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_GENERATE_CLIENT").positional("api",{describe:"OpenAPI description file path (or alias from redocly.yaml `apis:`).",type:"string"}).options({output:{alias:"o",describe:"Output file path for the generated client (must end in .ts).",type:"string",requiresArg:!0},"server-url":{describe:"Override the server URL inlined into the generated runtime. Defaults to `servers[0].url`.",type:"string",requiresArg:!0},"output-mode":{describe:"How the client is split across files: `single` (default, one file) or `split` (schema types and guards in a sibling `<name>.schemas.ts` the entry re-exports).",choices:["single","split"],requiresArg:!0},runtime:{describe:"Runtime distribution: 'inline' (default) embeds the runtime in the generated file; 'module' writes it as real files in a runtime/ folder beside the client.",choices:["inline","module"],requiresArg:!0},docs:{description:"Also write reference documentation for what this run generates: one Markdown page per selected generator that documents itself (the CLI, and each SDK).",type:"boolean"},"go-package":{description:"Package clause of the `go` generator's output (a valid Go package name). Defaults to `client`.",type:"string",requiresArg:!0},"import-ext":{describe:"Extension in generated relative imports: 'js' (default) suits tsc and bundlers; 'ts' suits runtimes that resolve specifiers literally, like Node's built-in type stripping (node client.ts).",choices:["js","ts"],requiresArg:!0},setup:{describe:"Path to a publisher setup module (a file default-exporting { config, middleware }) that gets included into the generated client \u2014 pre-configure defaults such as the server URL, retries, headers, and middleware, so a published SDK ships with them built in. Works across all output modes.",type:"string",requiresArg:!0},"args-style":{describe:"How operation inputs are passed: `flat` (default) spreads path params as positional arguments followed by `params`/`body`/`headers`; `grouped` bundles every input into a single `args` object (the per-call request `init` stays a separate trailing argument).",choices:["flat","grouped"],requiresArg:!0},"error-mode":{describe:"Error handling: 'throw' (default) throws ApiError on non-2xx; 'result' returns { data, error, response }.",choices:["throw","result"],requiresArg:!0},"date-type":{describe:"How `date-time`/`date` string fields are typed: 'string' (default) keeps the ISO wire shape; 'Date' emits a `Date` (pair with --generator transformers so the runtime value matches).",choices:["string","Date"],requiresArg:!0},"mock-data":{describe:"How the `mock` generator produces data: 'static' (default) inlines deterministic literals (zero-dep); 'faker' emits @faker-js/faker calls for realistic data (install @faker-js/faker as a dev dependency).",choices:["static","faker"],requiresArg:!0},"mock-seed":{describe:"Seed for faker-mode mocks: emits a top-level `faker.seed(<n>)` so generated data is reproducible across runs. Ignored in static mode.",type:"number",requiresArg:!0},generator:{describe:'Generator to run; repeat the flag to run several (default: typescript). Built-in: typescript, zod, tanstack-query, tanstack-query-vue, tanstack-query-svelte, tanstack-query-solid, swr, mock, transformers, cli, python, go, php \u2014 or a path/package specifier for a custom generator. What each one emits is in the "Use the generated client" guide. Example: --generator typescript --generator zod',type:"string",array:!0,requiresArg:!0},config:{describe:"Path to the config file.",type:"string",requiresArg:!0}}),async r=>{let{handleGenerateClient:e}=await import("./chunks/MSJZTIMR.js");J(e)(r)}).command("eject-generator [generator]","Vendor a built-in client generator into your repo as an editable file [experimental].",r=>r.positional("generator",{describe:`Built-in generator to eject (${[...It].join(", ")}).`,type:"string"}).options({config:{description:"Path to the config file.",type:"string"},dir:{describe:"Directory to eject into (default: ./generators).",type:"string",requiresArg:!0},force:{describe:"Overwrite an existing ejected file (discards local edits).",type:"boolean",default:!1},update:{describe:"Three-way merge a newer generator version into your customized copy (pristine \xD7 new \xD7 yours).",type:"boolean",default:!1}}),async r=>{J(da)(r)}).command("skills","Install the Redocly CLI agent skills for AI coding agents.",r=>r.options({agent:{description:"Agents to install the skills for. Default: detected agents.",type:"array",string:!0,choices:ya},global:{description:"Install in your home folder instead of the current project.",type:"boolean",default:!1},list:{description:"List the bundled skills without installing them.",type:"boolean",default:!1}}),async r=>{J(ba)(r)}).command("generate-spec <traffic>","Infer an OpenAPI description from recorded HTTP traffic, optionally refined with AI [experimental].",r=>r.env("REDOCLY_CLI_GENERATE_SPEC").positional("traffic",{describe:"Path to a traffic log file or folder (HAR, Kong, Nginx/Apache JSON, NDJSON).",type:"string"}).option({type:{describe:"Target API description type.",choices:["openapi"],default:"openapi"},"openapi-version":{describe:"OpenAPI version of the generated description.",type:"string",choices:["3.1","3.2"],default:"3.2"},"traffic-format":{describe:"Traffic input format.",choices:["auto","har","kong","nginx-json","apache-json","ndjson"],default:"auto"},server:{describe:"Server URL the traffic was captured against: only requests under it are considered, the rest of their URL becomes the API path, and it becomes the servers URL of the generated description.",type:"string"},title:{describe:"Title for the generated API description.",type:"string"},"with-ai":{describe:"Refine the inferred description with an AI provider to narrow the hypothesis.",type:"boolean",default:!1},"ai-provider":{describe:'AI provider used with --with-ai; runs the "claude", "codex", or "cursor" CLI in non-interactive mode.',choices:["claude","codex","cursor"],default:"claude"},"ai-model":{describe:"Model passed to the selected AI provider (provider-specific default applies).",type:"string"},"ai-concurrency":{describe:"Number of operations refined in parallel with --with-ai.",type:"number",default:4,coerce:at("ai-concurrency",!0)},output:{alias:"o",describe:"Write the generated description to this file instead of stdout.",type:"string"},config:{describe:"Path to the config file.",type:"string"}}),async r=>{let{handleGenerateSpec:e}=await import("./chunks/HXPCC4OG.js");J(e)(r)}).command("introspect-mcp [server-url]","Introspect a running MCP server and record its capabilities in the x-mcp extension of an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_INTROSPECT_MCP").positional("server-url",{describe:"URL of the MCP server (Streamable HTTP, with a fallback to the legacy HTTP+SSE transport). Alternative to --command.",type:"string"}).option({command:{describe:'Command that starts a local MCP server to introspect over stdio, for example "npx -y my-mcp-server". Quote arguments that contain spaces. Alternative to a server URL.',type:"string",requiresArg:!0},output:{alias:"o",describe:"OpenAPI description file to create or update.",type:"string",default:"openapi.yaml"},header:{alias:"H",describe:'Header sent with every request to the MCP server, in "Name: value" format. Repeat the option for multiple headers.',array:!0,type:"string"},check:{describe:"Verify the description is up to date with the MCP server instead of writing: report the differences and exit with an error when it is not.",type:"boolean",default:!1},config:{describe:"Path to the config file.",type:"string"}}).check(e=>{if(!!e["server-url"]==!!e.command)throw new Error("Provide either an MCP server URL or --command, not both.");if(e.command&&e.header)throw new Error("The --header option only applies to an MCP server URL.");return!0}),async r=>{let{handleIntrospectMcp:e}=await import("./chunks/B4Z2Z4FS.js");J(e)(r)}).command("scorecard-classic [api]","Run quality scorecards with multiple rule levels to validate and maintain API description standards.",r=>r.positional("api",{type:"string"}).option({config:{describe:"Path to the config file.",type:"string"},"project-url":{describe:"URL to the project scorecard configuration.",type:"string"},format:{description:"Use a specific output format.",choices:["stylish","json","checkstyle","junit"],default:"stylish"},"target-level":{describe:"Target level for the scorecard.",type:"string"},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"}}),async r=>{let{handleScorecardClassic:e}=await import("./chunks/LSFJCPZH.js");J(e)(r)}).command("drift <traffic>","Detect drift between recorded HTTP traffic and an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_DRIFT").positional("traffic",{describe:"Path to a traffic log file or folder (HAR, Kong, Nginx/Apache JSON, NDJSON).",type:"string"}).option({api:{describe:"OpenAPI description file or folder to validate against.",type:"string",demandOption:!0},"traffic-format":{describe:"Traffic input format.",choices:["auto","har","kong","nginx-json","apache-json","ndjson"],default:"auto"},"report-format":{describe:"Output format.",alias:"format",choices:["pretty","json","csv","sarif"],default:"pretty"},"match-mode":{describe:"Endpoint matching mode (how requests are located via the description servers). Mutually exclusive with --server.",choices:["strict-host","basepath"],defaultDescription:"strict-host"},"ignore-cookies":{describe:"Ignore cookie-based checks (useful for logs exported without cookies).",type:"boolean",default:!1},"ignore-headers":{describe:'Comma-separated header names to skip in undocumented-header checks. A trailing "*" matches by prefix, e.g. "x-consumer-*".',type:"string"},"max-findings":{describe:"Maximum findings shown in pretty output.",type:"number",default:10},"min-severity":{describe:"Discard findings below this severity from the report.",choices:["info","warning","error"],default:"info"},rules:{describe:"Comma-separated builtin rules to run.",type:"string"},output:{alias:"o",describe:"Write the drift report (in the format selected with --format) to this file instead of stdout.",type:"string"},server:{describe:"Server URL the traffic was captured against: only requests under it are considered, and the rest of their URL is treated as the API path. It replaces the description servers and the remaining path is matched against the description paths directly. Mutually exclusive with --match-mode.",type:"string"},coverage:{describe:"Print how much of the description the traffic exercised: operations, parameters, schema properties, and response codes.",type:"boolean",default:!1},"coverage-output":{describe:"Write a detailed JSON coverage report (per operation, with covered and missing items) to this file.",type:"string"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{describe:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleDrift:e}=await import("./chunks/36DQZK3T.js");J(e)(r)}).command("proxy","Capture live HTTP traffic through a reverse proxy into a HAR file, optionally validating it against an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_PROXY").option({target:{describe:"Upstream base URL to forward captured requests to.",type:"string",demandOption:!0},port:{describe:"Port the proxy listens on.",type:"number",default:4040},host:{describe:"Host the proxy binds to.",type:"string",default:"127.0.0.1"},har:{describe:"Path to the HAR file where captured traffic is written.",type:"string",demandOption:!0},api:{describe:"OpenAPI description file or folder to validate captured traffic against (live).",type:"string"},"report-format":{describe:"Output format for the validation report printed on shutdown.",alias:"format",choices:["pretty","json","csv","sarif"],default:"pretty"},"match-mode":{describe:"Endpoint matching mode.",choices:["strict-host","basepath"],default:"strict-host"},"ignore-cookies":{describe:"Ignore cookie-based checks.",type:"boolean",default:!1},"ignore-headers":{describe:'Comma-separated header names to skip in undocumented-header checks. A trailing "*" matches by prefix, e.g. "x-consumer-*".',type:"string"},"max-findings":{describe:"Maximum findings shown in pretty output.",type:"number",default:10},rules:{describe:"Comma-separated builtin rules to run.",type:"string"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{describe:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleProxy:e}=await import("./chunks/JGSM4NRA.js");J(e)(r)}).completion("completion","Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([Aa]).strict().argv;
|
|
164
|
+
`),process.exit(0))},!0).help("help","Show help.").parserConfiguration({"greedy-arrays":!1,"boolean-negation":!1}).command("stats [api]","Show statistics for an API description.",r=>r.env("REDOCLY_CLI_STATS").positional("api",{type:"string"}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["stylish","json","markdown"],default:"stylish"}}),async r=>{let{handleStats:e}=await import("./chunks/HET452FN.js");J(e)(r)}).command("inspect-node-types <api>","Show the node types of an API description, for writing configurable rules and custom plugins [experimental].",r=>r.env("REDOCLY_CLI_INSPECT_NODE_TYPES").positional("api",{description:"API description file to inspect.",type:"string",demandOption:!0}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},pointer:{description:"JSON pointer to a node, optionally prefixed with a file: `#/paths` or `schemas.yaml#/User`.",type:"string",alias:"p"},type:{description:"List only the nodes of this type.",type:"string"},summary:{description:"List the node types used in the description, with counts.",type:"boolean"},parents:{description:"Show the chain of node types leading to the node: down to the node with --pointer, or the distinct chains that reach the type with --type.",type:"boolean"}}).conflicts({pointer:["type","summary"],type:["summary"],summary:["parents"]}).check(e=>{if(e.parents&&!e.pointer&&!e.type)throw new Error("The --parents option requires --pointer or --type.");return!0}),async r=>{let{handleInspectNodeTypes:e}=await import("./chunks/WFKHK77N.js");J(e)(r)}).command("score [api]","Score an API description for integration simplicity and agent readiness.",r=>r.env("REDOCLY_CLI_SCORE").positional("api",{type:"string"}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["stylish","json"],default:"stylish"},"operation-details":{description:"Print per-operation metric details.",type:"boolean",default:!1},"debug-operation-id":{description:"Print detailed schema breakdown for a specific operation.",type:"string"}}),async r=>{let{handleScore:e}=await import("./chunks/LEPQDSTM.js");J(e)(r)}).command("split [api]","Split an API description into a multi-file structure.",r=>r.env("REDOCLY_CLI_SPLIT").positional("api",{description:"API description file that you want to split",type:"string"}).option({outDir:{description:"Output directory where files will be saved.",required:!0,type:"string"},separator:{description:"File path separator used while splitting.",required:!1,type:"string",default:"_"},"file-name-conflicts-severity":{description:"Severity level for file name conflicts.",choices:["warn","error","off"],default:"warn"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}).demandOption("api"),async r=>{let{handleSplit:e}=await import("./chunks/ZMV5LF7Y.js");J(e)(r)}).command("join [apis...]","Join multiple API descriptions into one [experimental].",r=>r.env("REDOCLY_CLI_JOIN").positional("apis",{array:!0,type:"string",demandOption:!0}).option({"prefix-tags-with-info-prop":{description:"Prefix tags with property value from info object.",requiresArg:!0,type:"string"},"prefix-tags-with-filename":{description:"Prefix tags with property value from file name.",type:"boolean",default:!1},"prefix-components-with-info-prop":{description:"Prefix components with property value from info object.",requiresArg:!0,type:"string"},"without-x-tag-groups":{description:"Skip automated x-tagGroups creation",type:"boolean"},output:{description:"Output file.",alias:"o",type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleJoin:e}=await import("./chunks/OKWRNBEY.js");J(e)(r)}).command("push-status [pushId]",!1,r=>r.env("REDOCLY_CLI_PUSH_STATUS").positional("pushId",{description:"Push id.",type:"string",demandOption:!0}).implies("max-execution-time","wait").option({organization:{description:"ID of the organization to push to.",type:"string",alias:"o",required:!0},project:{description:"ID of the project to push to.",type:"string",required:!0,alias:"p"},domain:{description:"Specify a domain.",alias:"d",type:"string",required:!1},wait:{description:"Wait for build to finish.",type:"boolean",default:!1},"max-execution-time":{description:"Maximum execution time in seconds.",type:"number"},"continue-on-deploy-failures":{description:"Command does not fail even if the deployment fails.",type:"boolean",default:!1},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handlePushStatus:e}=await import("./chunks/6BJRKKAU.js");J(e)(r)}).command("push [files...]","Push documents to Reunite.",r=>r.env("REDOCLY_CLI_PUSH").positional("files",{type:"string",array:!0,demandOption:!0}).option({branch:{description:"Branch name to push to.",type:"string",alias:"b",required:!0},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},organization:{description:"ID of the organization to push to.",type:"string",alias:"o",required:!0},project:{description:"ID of the project to push to.",type:"string",alias:"p",required:!0},"mount-path":{description:"The path files should be pushed to.",type:"string",alias:"mp",required:!0,coerce:_a},author:{description:"Author of the commit.",type:"string",alias:"a",required:!0},message:{description:"Commit message.",type:"string",alias:"m",required:!0},"commit-sha":{description:"Commit SHA.",type:"string",alias:"sha"},"commit-url":{description:"Commit URL.",type:"string",alias:"url"},namespace:{description:"Repository namespace.",type:"string"},repository:{description:"Repository name.",type:"string"},"created-at":{description:"Commit creation date.",type:"string"},domain:{description:"Specify a domain.",alias:"d",type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},"default-branch":{type:"string",default:"main"},"max-execution-time":{description:"Maximum execution time in seconds.",type:"number"},"wait-for-deployment":{description:"Wait for build to finish.",type:"boolean",default:!1},replace:{description:"Remove the files under the mount path that are not part of this push.",type:"boolean",default:!1},verbose:{type:"boolean",default:!1},"continue-on-deploy-failures":{description:"Command does not fail even if the deployment fails.",type:"boolean",default:!1}}),async r=>{let{handlePush:e}=await import("./chunks/XZNJU67S.js");J(e)(r)}).command("recheck [paths..]","Lint Markdown prose and structure from the recheck block in redocly.yaml.",r=>r.env("REDOCLY_CLI_RECHECK").positional("paths",{array:!0,type:"string",describe:"Files or directories to lint. Default: the current directory."}).option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},format:{description:"Use a specific output format.",choices:["table","json","sarif","github-actions"],default:"table"},tags:{description:"Run only rules with these tags.",array:!0,type:"string"},rule:{description:"Run only these rules.",alias:"r",array:!0,type:"string"},"skip-rule":{description:"Skip these rules.",array:!0,type:"string"},stats:{description:"Print rule statistics.",alias:"s",type:"boolean"},fix:{description:"Apply fixes to Markdown files.",alias:"f",type:"boolean"},"max-problems":{description:"Maximum number of problems in the report.",type:"number"},summary:{description:"Print a run summary.",choices:["json","text"],type:"string"},"summary-path":{description:"Write the summary to a file.",type:"string"},readability:{description:"Report readability scores instead of linting.",type:"boolean"},"generate-baseline":{description:"Write the baseline file from the current findings.",type:"boolean"},"generate-markdoc-schema":{description:"Generate a Markdoc tag schema from theme modules.",type:"boolean"},from:{description:"Module paths to read Markdoc tags from (with --generate-markdoc-schema).",array:!0,type:"string"},output:{description:"Output file for the generated schema.",type:"string"},check:{description:"Fail if the generated schema differs from --output.",type:"boolean"}}),async r=>{let{handleRecheck:e}=await import("./chunks/IZVG6IUS.js"),{recheckPresetsPlugin:t}=await import("./chunks/WSDNWUOV.js");J(e,{plugins:[t]})(r)}).command("lint [apis...]","Lint an API or Arazzo description.",r=>r.env("REDOCLY_CLI_LINT").positional("apis",{array:!0,type:"string",demandOption:!0}).option({format:{description:"Use a specific output format.",choices:["stylish","codeframe","json","checkstyle","codeclimate","summary","markdown","github-actions","junit"],default:"codeframe"},"max-problems":{requiresArg:!0,description:"Reduce output to a maximum of N problems.",type:"number",default:100},"generate-ignore-file":{description:"Generate an ignore file.",type:"boolean"},"skip-rule":{description:"Ignore certain rules.",array:!0,type:"string"},"skip-preprocessor":{description:"Ignore certain preprocessors.",array:!0,type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},extends:{description:"Override extends configurations (defaults or config file settings).",requiresArg:!0,array:!0,type:"string"}}),async r=>{let{handleLint:e}=await import("./chunks/XZIAEGVZ.js");J(e)(r)}).command("bundle [apis...]","Bundle a multi-file API description to a single file.",r=>r.env("REDOCLY_CLI_BUNDLE").positional("apis",{array:!0,type:"string",demandOption:!0}).options({output:{type:"string",description:"Output file or folder for inline APIs.",alias:"o"},ext:{description:"Bundle file extension.",requiresArg:!0,choices:ri},"skip-preprocessor":{description:"Ignore certain preprocessors.",array:!0,type:"string"},"skip-decorator":{description:"Ignore certain decorators.",array:!0,type:"string"},overlay:{description:"Overlay file to apply. Repeat to apply several, in order.",array:!0,type:"string",requiresArg:!0},dereferenced:{alias:"d",type:"boolean",description:"Produce a fully dereferenced bundle."},force:{alias:"f",type:"boolean",description:"Produce bundle output even when errors occur."},config:{description:"Path to the config file.",type:"string"},metafile:{description:"Produce metadata about the bundle",type:"string"},extends:{description:"Override extends configurations (defaults or config file settings).",requiresArg:!0,array:!0,type:"string",hidden:!0},"remove-unused-components":{description:"Remove unused components.",type:"boolean",default:!1},"keep-url-references":{description:"Keep absolute url references.",type:"boolean",alias:"k"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"},"component-renaming-conflicts-severity":{description:"Whether to show warnings or fail on renaming conflicts (defaults to warn).",choices:["warn","error","off"]},"component-names-strategy":{description:"How to name inlined Schema components: 'basename' (default) or 'title' (from each schema's `title`).",choices:["basename","title"],default:"basename"}}).check(e=>{if(e.output&&(!e.apis||e.apis.length===0))throw new Error("At least one inline API must be specified when using --output.");return!0}),async r=>{let{handleBundle:e}=await import("./chunks/LZUYKJND.js");J(e)(r)}).command("check-config","Lint the Redocly configuration file.",async r=>r.env("REDOCLY_CLI_CHECK_CONFIG").option({config:{description:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error"],default:"error"}}),r=>{J()(r)}).command("login","Log in to Redocly.",async r=>r.env("REDOCLY_CLI_LOGIN").options({residency:{description:"Residency of the application. Defaults to `us`.",alias:["r"],type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"}}),async r=>{let{handleLogin:e}=await import("./chunks/UNWO4KGQ.js");J(e)(r)}).command("logout","Clear your stored credentials.",r=>r,async r=>{let{handleLogout:e}=await import("./chunks/QT45SNBU.js");J(e)(r)}).command("project","[early access] Work with a Redocly-hosted project.",r=>r.env("REDOCLY_CLI_PROJECT").command("clone <project> [directory]","Clone a Redocly-hosted project as a Git repository.",e=>e.positional("project",{description:"Organization and project slugs or IDs, as `<organization>/<project>`.",type:"string",demandOption:!0}).positional("directory",{description:"Directory to clone into. Defaults to the project.",type:"string"}).options({residency:{description:"Residency of the application. Defaults to `us`.",alias:["r"],type:"string"},config:{description:"Path to the config file.",requiresArg:!0,type:"string"}}),async e=>{let{handleProjectClone:t}=await import("./chunks/VEVZJC25.js");J(t)(e)}).command("git-credentials <operation>",!1,e=>e.positional("operation",{description:"Credential helper operation: get, store, or erase.",type:"string",demandOption:!0}),async e=>{let{handleProjectGitCredentials:t}=await import("./chunks/IHFKHD4E.js");process.stdout.write(await t({operation:e.operation,input:process.stdin,version:Le}))}).demandCommand(1,"Specify a project subcommand: clone.")).command("preview","Preview Redocly project using one of the product NPM packages.",r=>r.env("REDOCLY_CLI_PREVIEW").options({product:{type:"string",choices:["redoc","revel","reef","realm","redoc-revel","redoc-reef","revel-reef"],description:"Product used to launch preview. Default is inferred from project's package.json or 'realm' is used."},plan:{type:"string",choices:oi,default:"enterprise"},port:{alias:"p",type:"number",description:"Preview port.",default:4e3,coerce:at("port",!0)},"project-dir":{alias:["d","source-dir"],type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{process.argv.some(t=>t.startsWith("--source-dir"))&&H.error(`Option --source-dir is deprecated and will be removed soon. Use --project-dir instead.
|
|
165
|
+
`);let{previewProject:e}=await import("./chunks/AENSGZDZ.js");J(e)(r)}).command("build-docs [api]","Produce API documentation as an HTML file",r=>r.positional("api",{type:"string"}).options({o:{describe:"Output destination file.",alias:"output",type:"string",default:"redoc-static.html"},title:{describe:"Page title.",type:"string"},disableGoogleFont:{describe:"Disable Google fonts.",type:"boolean",default:!1},t:{alias:"template",describe:"Path to handlebars page template, see https://github.com/Redocly/redocly-cli/blob/main/packages/cli/src/commands/build-docs/template.hbs for the example.",type:"string"},templateOptions:{describe:"Additional options to pass to the template. Use dot notation, e.g. templateOptions.metaDescription"},theme:{describe:"Redoc theme.openapi configuration. Use dot notation, e.g. theme.openapi.nativeScrollbars"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}).check(e=>{if(e.theme&&!e.theme?.openapi)throw new Error("Invalid option: theme.openapi not set.");return!0}),async r=>{let{handlerBuildCommand:e}=await import("./chunks/7YY5ECWE.js");J(e)(r)}).command("translate <locale>","Creates or updates translations.yaml files and fills them with missing built-in translations and translations from the redocly.yaml and sidebars.yaml files.",r=>r.env("REDOCLY_CLI_TRANSLATE").positional("locale",{description:"Locale code to generate translations for, or `all` for all current project locales.",type:"string",demandOption:!0}).options({"project-dir":{alias:"d",type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleTranslations:e}=await import("./chunks/YQYR6TIT.js");J(e)(r)}).command("eject <type> [path]","Helper function to eject project elements for customization.",r=>r.env("REDOCLY_CLI_EJECT").positional("type",{description:"Specifies what type of project element to eject. Currently this value must be `component`.",demandOption:!0,choices:["component"]}).positional("path",{description:"Filepath to a component or filepath with glob pattern.",type:"string"}).options({"project-dir":{alias:"d",type:"string",description:"Specifies the project content directory. The default value is the directory where the command is executed.",default:"."},force:{alias:"f",type:"boolean",description:'Skips the "overwrite existing" confirmation when ejecting a component that is already ejected in the destination.'},"lint-config":{description:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleEject:e}=await import("./chunks/DQZXJA6Q.js");J(e)(r)}).command("respect [files...]","Run Arazzo tests.",r=>r.env("REDOCLY_CLI_RESPECT").positional("files",{describe:"Test files or glob pattern.",type:"string",array:!0,default:[]}).options({input:{alias:"i",describe:"Input parameters.",type:"string"},server:{alias:"S",describe:"Server parameters.",type:"string"},workflow:{alias:"w",describe:"Workflow name.",type:"string",array:!0},skip:{alias:"s",describe:"Workflow to skip.",type:"string",array:!0},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"},"har-output":{describe:"Har file output name.",type:"string",alias:"H"},"json-output":{describe:"JSON file output name.",type:"string",alias:"J"},mtls:{describe:'Per-domain mutual TLS certificates configuration as JSON. Format: {"<domain>": {"clientCert": "<path>", "clientKey": "<path>", "caCert": "<path>"}}',type:"string",array:!0,coerce:ha},severity:{describe:"Severity of the check.",type:"string"},"max-steps":{describe:"Maximum number of steps to run (default: 2000).",type:"number",default:2e3,coerce:at("max-steps",!0)},"max-fetch-timeout":{describe:"Maximum time to wait for API response per request in milliseconds (default: 40 seconds).",type:"number",default:4e4,coerce:at("max-fetch-timeout",!1)},"execution-timeout":{describe:"Maximum time to wait for the Respect execution in milliseconds (default: 1 hour).",type:"number",default:36e5,coerce:at("execution-timeout",!1)},"no-secrets-masking":{describe:"Do not mask secrets in the output.",type:"boolean",default:!1}}),async r=>{let{handleRespect:e}=await import("./chunks/HQTUYG5X.js");J(e)(r)}).command("generate-arazzo <descriptionPath>","Auto-generate arazzo description file from an API description.",r=>r.env("REDOCLY_CLI_GENERATE_ARAZZO").positional("descriptionPath",{describe:"Description file path.",type:"string"}).options({"output-file":{alias:"o",describe:"Output File name.",type:"string",requiresArg:!0},"with-ai":{describe:"Redesign the generated workflows with an AI provider, using the OpenAPI description as context.",type:"boolean",default:!1},"ai-provider":{describe:'AI provider used with --with-ai; runs the "claude", "codex", or "cursor" CLI in non-interactive mode.',choices:["claude","codex","cursor"],default:"claude"},"ai-model":{describe:"Model passed to the selected AI provider (provider-specific default applies).",type:"string"},"ai-concurrency":{describe:"Number of workflows designed in parallel with --with-ai for large descriptions.",type:"number",default:4,coerce:at("ai-concurrency",!0)},"max-workflows":{describe:"Most workflows the AI may design with --with-ai.",type:"number",default:10,coerce:at("max-workflows",!0)}}),async r=>{let{handleGenerateArazzo:e}=await import("./chunks/HPYQF7FO.js");J(e)(r)}).command("generate-client [api]","Generate a TypeScript client from an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_GENERATE_CLIENT").positional("api",{describe:"OpenAPI description file path (or alias from redocly.yaml `apis:`).",type:"string"}).options({output:{alias:"o",describe:"Output file path for the generated client (must end in .ts).",type:"string",requiresArg:!0},"server-url":{describe:"Override the server URL inlined into the generated runtime. Defaults to `servers[0].url`.",type:"string",requiresArg:!0},"output-mode":{describe:"How the client is split across files: `single` (default, one file) or `split` (schema types and guards in a sibling `<name>.schemas.ts` the entry re-exports).",choices:["single","split"],requiresArg:!0},runtime:{describe:"Runtime distribution: 'inline' (default) embeds the runtime in the generated file; 'module' writes it as real files in a runtime/ folder beside the client.",choices:["inline","module"],requiresArg:!0},docs:{description:"Also write reference documentation for what this run generates: one Markdown page per selected generator that documents itself (the CLI, and each SDK).",type:"boolean"},"go-package":{description:"Package clause of the `go` generator's output (a valid Go package name). Defaults to `client`.",type:"string",requiresArg:!0},"import-ext":{describe:"Extension in generated relative imports: 'js' (default) suits tsc and bundlers; 'ts' suits runtimes that resolve specifiers literally, like Node's built-in type stripping (node client.ts).",choices:["js","ts"],requiresArg:!0},setup:{describe:"Path to a publisher setup module (a file default-exporting { config, middleware }) that gets included into the generated client \u2014 pre-configure defaults such as the server URL, retries, headers, and middleware, so a published SDK ships with them built in. Works across all output modes.",type:"string",requiresArg:!0},"args-style":{describe:"How operation inputs are passed: `flat` (default) spreads path params as positional arguments followed by `params`/`body`/`headers`; `grouped` bundles every input into a single `args` object (the per-call request `init` stays a separate trailing argument).",choices:["flat","grouped"],requiresArg:!0},"error-mode":{describe:"Error handling: 'throw' (default) throws ApiError on non-2xx; 'result' returns { data, error, response }.",choices:["throw","result"],requiresArg:!0},"date-type":{describe:"How `date-time`/`date` string fields are typed: 'string' (default) keeps the ISO wire shape; 'Date' emits a `Date` (pair with --generator transformers so the runtime value matches).",choices:["string","Date"],requiresArg:!0},"mock-data":{describe:"How the `mock` generator produces data: 'static' (default) inlines deterministic literals (zero-dep); 'faker' emits @faker-js/faker calls for realistic data (install @faker-js/faker as a dev dependency).",choices:["static","faker"],requiresArg:!0},"mock-seed":{describe:"Seed for faker-mode mocks: emits a top-level `faker.seed(<n>)` so generated data is reproducible across runs. Ignored in static mode.",type:"number",requiresArg:!0},generator:{describe:'Generator to run; repeat the flag to run several (default: typescript). Built-in: typescript, zod, tanstack-query, tanstack-query-vue, tanstack-query-svelte, tanstack-query-solid, swr, mock, transformers, cli, python, go, php \u2014 or a path/package specifier for a custom generator. What each one emits is in the "Use the generated client" guide. Example: --generator typescript --generator zod',type:"string",array:!0,requiresArg:!0},config:{describe:"Path to the config file.",type:"string",requiresArg:!0}}),async r=>{let{handleGenerateClient:e}=await import("./chunks/YUHXZXUL.js");J(e)(r)}).command("eject-generator [generator]","Vendor a built-in client generator into your repo as an editable file [experimental].",r=>r.positional("generator",{describe:`Built-in generator to eject (${[...It].join(", ")}).`,type:"string"}).options({config:{description:"Path to the config file.",type:"string"},dir:{describe:"Directory to eject into (default: ./generators).",type:"string",requiresArg:!0},force:{describe:"Overwrite an existing ejected file (discards local edits).",type:"boolean",default:!1},update:{describe:"Three-way merge a newer generator version into your customized copy (pristine \xD7 new \xD7 yours).",type:"boolean",default:!1}}),async r=>{J(da)(r)}).command("skills","Install the Redocly CLI agent skills for AI coding agents.",r=>r.options({agent:{description:"Agents to install the skills for. Default: detected agents.",type:"array",string:!0,choices:ya},global:{description:"Install in your home folder instead of the current project.",type:"boolean",default:!1},list:{description:"List the bundled skills without installing them.",type:"boolean",default:!1}}),async r=>{J(ba)(r)}).command("generate-spec <traffic>","Infer an OpenAPI description from recorded HTTP traffic, optionally refined with AI [experimental].",r=>r.env("REDOCLY_CLI_GENERATE_SPEC").positional("traffic",{describe:"Path to a traffic log file or folder (HAR, Kong, Nginx/Apache JSON, NDJSON).",type:"string"}).option({type:{describe:"Target API description type.",choices:["openapi"],default:"openapi"},"openapi-version":{describe:"OpenAPI version of the generated description.",type:"string",choices:["3.1","3.2"],default:"3.2"},"traffic-format":{describe:"Traffic input format.",choices:["auto","har","kong","nginx-json","apache-json","ndjson"],default:"auto"},server:{describe:"Server URL the traffic was captured against: only requests under it are considered, the rest of their URL becomes the API path, and it becomes the servers URL of the generated description.",type:"string"},title:{describe:"Title for the generated API description.",type:"string"},"with-ai":{describe:"Refine the inferred description with an AI provider to narrow the hypothesis.",type:"boolean",default:!1},"ai-provider":{describe:'AI provider used with --with-ai; runs the "claude", "codex", or "cursor" CLI in non-interactive mode.',choices:["claude","codex","cursor"],default:"claude"},"ai-model":{describe:"Model passed to the selected AI provider (provider-specific default applies).",type:"string"},"ai-concurrency":{describe:"Number of operations refined in parallel with --with-ai.",type:"number",default:4,coerce:at("ai-concurrency",!0)},output:{alias:"o",describe:"Write the generated description to this file instead of stdout.",type:"string"},config:{describe:"Path to the config file.",type:"string"}}),async r=>{let{handleGenerateSpec:e}=await import("./chunks/HG5B2AKP.js");J(e)(r)}).command("introspect-mcp [server-url]","Introspect a running MCP server and record its capabilities in the x-mcp extension of an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_INTROSPECT_MCP").positional("server-url",{describe:"URL of the MCP server (Streamable HTTP, with a fallback to the legacy HTTP+SSE transport). Alternative to --command.",type:"string"}).option({command:{describe:'Command that starts a local MCP server to introspect over stdio, for example "npx -y my-mcp-server". Quote arguments that contain spaces. Alternative to a server URL.',type:"string",requiresArg:!0},output:{alias:"o",describe:"OpenAPI description file to create or update.",type:"string",default:"openapi.yaml"},header:{alias:"H",describe:'Header sent with every request to the MCP server, in "Name: value" format. Repeat the option for multiple headers.',array:!0,type:"string"},check:{describe:"Verify the description is up to date with the MCP server instead of writing: report the differences and exit with an error when it is not.",type:"boolean",default:!1},config:{describe:"Path to the config file.",type:"string"}}).check(e=>{if(!!e["server-url"]==!!e.command)throw new Error("Provide either an MCP server URL or --command, not both.");if(e.command&&e.header)throw new Error("The --header option only applies to an MCP server URL.");return!0}),async r=>{let{handleIntrospectMcp:e}=await import("./chunks/BUQQJCMF.js");J(e)(r)}).command("scorecard-classic [api]","Run quality scorecards with multiple rule levels to validate and maintain API description standards.",r=>r.positional("api",{type:"string"}).option({config:{describe:"Path to the config file.",type:"string"},"project-url":{describe:"URL to the project scorecard configuration.",type:"string"},format:{description:"Use a specific output format.",choices:["stylish","json","checkstyle","junit"],default:"stylish"},"target-level":{describe:"Target level for the scorecard.",type:"string"},verbose:{alias:"v",describe:"Apply verbose mode.",type:"boolean"}}),async r=>{let{handleScorecardClassic:e}=await import("./chunks/EPVPJTXN.js");J(e)(r)}).command("drift <traffic>","Detect drift between recorded HTTP traffic and an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_DRIFT").positional("traffic",{describe:"Path to a traffic log file or folder (HAR, Kong, Nginx/Apache JSON, NDJSON).",type:"string"}).option({api:{describe:"OpenAPI description file or folder to validate against.",type:"string",demandOption:!0},"traffic-format":{describe:"Traffic input format.",choices:["auto","har","kong","nginx-json","apache-json","ndjson"],default:"auto"},"report-format":{describe:"Output format.",alias:"format",choices:["pretty","json","csv","sarif"],default:"pretty"},"match-mode":{describe:"Endpoint matching mode (how requests are located via the description servers). Mutually exclusive with --server.",choices:["strict-host","basepath"],defaultDescription:"strict-host"},"ignore-cookies":{describe:"Ignore cookie-based checks (useful for logs exported without cookies).",type:"boolean",default:!1},"ignore-headers":{describe:'Comma-separated header names to skip in undocumented-header checks. A trailing "*" matches by prefix, e.g. "x-consumer-*".',type:"string"},"max-findings":{describe:"Maximum findings shown in pretty output.",type:"number",default:10},"min-severity":{describe:"Discard findings below this severity from the report.",choices:["info","warning","error"],default:"info"},rules:{describe:"Comma-separated builtin rules to run.",type:"string"},output:{alias:"o",describe:"Write the drift report (in the format selected with --format) to this file instead of stdout.",type:"string"},server:{describe:"Server URL the traffic was captured against: only requests under it are considered, and the rest of their URL is treated as the API path. It replaces the description servers and the remaining path is matched against the description paths directly. Mutually exclusive with --match-mode.",type:"string"},coverage:{describe:"Print how much of the description the traffic exercised: operations, parameters, schema properties, and response codes.",type:"boolean",default:!1},"coverage-output":{describe:"Write a detailed JSON coverage report (per operation, with covered and missing items) to this file.",type:"string"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{describe:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleDrift:e}=await import("./chunks/WH5ELPJC.js");J(e)(r)}).command("proxy","Capture live HTTP traffic through a reverse proxy into a HAR file, optionally validating it against an OpenAPI description [experimental].",r=>r.env("REDOCLY_CLI_PROXY").option({target:{describe:"Upstream base URL to forward captured requests to.",type:"string",demandOption:!0},port:{describe:"Port the proxy listens on.",type:"number",default:4040},host:{describe:"Host the proxy binds to.",type:"string",default:"127.0.0.1"},har:{describe:"Path to the HAR file where captured traffic is written.",type:"string",demandOption:!0},api:{describe:"OpenAPI description file or folder to validate captured traffic against (live).",type:"string"},"report-format":{describe:"Output format for the validation report printed on shutdown.",alias:"format",choices:["pretty","json","csv","sarif"],default:"pretty"},"match-mode":{describe:"Endpoint matching mode.",choices:["strict-host","basepath"],default:"strict-host"},"ignore-cookies":{describe:"Ignore cookie-based checks.",type:"boolean",default:!1},"ignore-headers":{describe:'Comma-separated header names to skip in undocumented-header checks. A trailing "*" matches by prefix, e.g. "x-consumer-*".',type:"string"},"max-findings":{describe:"Maximum findings shown in pretty output.",type:"number",default:10},rules:{describe:"Comma-separated builtin rules to run.",type:"string"},config:{describe:"Path to the config file.",type:"string"},"lint-config":{describe:"Severity level for config file linting.",choices:["warn","error","off"],default:"warn"}}),async r=>{let{handleProxy:e}=await import("./chunks/KMGFC2JR.js");J(e)(r)}).completion("completion","Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([Aa]).strict().argv;
|
|
166
166
|
/*! Bundled license information:
|
|
167
167
|
|
|
168
168
|
yargs-parser/build/lib/string-utils.js:
|
package/package.json
CHANGED
package/lib/chunks/MSJZTIMR.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as l,b as v,c as U,d as F,e as R}from"./U5DIFWGH.js";import{b as O}from"./46YO7ZAG.js";import{ba as k,c as G,ca as $,ga as S,ia as b,l as P,oa as g}from"./K4IZRPJV.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{readFileSync as z}from"node:fs";import{mkdir as H,writeFile as B}from"node:fs/promises";import{basename as T,dirname as A,extname as I,isAbsolute as N,relative as j,resolve as f}from"node:path";var V=/^[a-z][a-z0-9+.-]+:/i;function L(e,n){let{setup:o}=e;if(typeof o!="string")return e;if(V.test(o))throw new g(`
|
|
8
|
-
\u274C \`client.setup\` must be a local file path \u2014 remote setup modules are not supported.
|
|
9
|
-
Got: ${o}
|
|
10
|
-
`);return N(o)?e:{...e,setup:f(n,o)}}function q(e){return`${e.replace(/[\\/]/g,"_")}.client.ts`}function D(e){if(e.startsWith("//"))return!1;if(e.startsWith("/"))return!0;try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}async function ie({argv:e,config:n}){let{AUTHORING_HELPER_NAMES:o,generateClient:c,mergeConfig:m}=await import("./VAPT4FUS.js"),t=n.configPath?A(n.configPath):process.cwd(),s={serverUrl:e["server-url"],outputMode:e["output-mode"],runtime:e.runtime,importExt:e["import-ext"],goPackage:e["go-package"],argsStyle:e["args-style"],errorMode:e["error-mode"],dateType:e["date-type"],mockData:e["mock-data"],mockSeed:e["mock-seed"],docs:e.docs,generators:e.generator?.map(a=>a.startsWith(".")?f(a):a),setup:e.setup===void 0?void 0:L({setup:e.setup},process.cwd()).setup},r=n.resolvedConfig.apis??{},i=Object.keys(r).filter(a=>G(r[a].client)||r[a].clientOutput!==void 0);if(e.api===void 0){if(e.output)throw new g("\n\u274C --output can't target multiple APIs. Set `clientOutput` under each api in redocly.yaml, or pass a single <api>.\n");if(i.length===0)throw new g("\n\u274C No API to generate. Add a `client` block or `clientOutput` under an `apis:` entry, or pass <api> (a file/URL or an `apis:` alias).\n")}let u=await O(e.api===void 0?i:[e.api],n),p={config:n,configDir:t,cliFlags:s,outputFlag:e.output,toolkit:{generateClient:c,mergeConfig:m,helperNames:o},seenOutputs:new Set,composable:[]};for(let a of u)await J(a,p);let y=G(n.resolvedConfig.client)?n.resolvedConfig.client:{};y.cliOutput!==void 0&&e.api===void 0&&p.composable.length>0&&await K(y.cliOutput,p)}async function J(e,{config:n,configDir:o,cliFlags:c,outputFlag:m,toolkit:t,seenOutputs:s,composable:r}){let{path:i,alias:u}=e,p=u??T(i,I(i)),y=n.forAlias(u),{client:a,clientOutput:E}=y.resolvedConfig,W=L(G(a)?a:{},o),h=t.mergeConfig(W,c);Q(h.generators??[],t.helperNames,o);let C=m!==void 0?f(m):E!==void 0?f(o,E):f(o,q(p));if(!C.endsWith(".ts"))throw new g(`
|
|
11
|
-
\u274C output must point at a TypeScript file (ending in .ts).
|
|
12
|
-
Got: ${C}
|
|
13
|
-
`);if(s.has(C))throw new g(`
|
|
14
|
-
\u274C Two APIs write to the same path: ${C}.
|
|
15
|
-
Give each api a distinct \`clientOutput\`.
|
|
16
|
-
`);if(s.add(C),h.serverUrl!==void 0&&!D(h.serverUrl))throw new g(`
|
|
17
|
-
\u274C serverUrl must be an absolute URL (https://api.example.com) or a root-relative path (/v1) \u2014 set via --server-url or the \`client\` block in redocly.yaml.
|
|
18
|
-
Got: ${h.serverUrl}
|
|
19
|
-
`);try{b.info(S(`
|
|
20
|
-
Generating client for ${p}...
|
|
21
|
-
`));let d=await t.generateClient({...h,api:i,output:C,config:y,configDir:o}),w=d.files.find(_=>_.path.endsWith(".cli.ts"));if(w!==void 0){let _=h.importExt??"js";r.push({alias:p,cliPath:w.path.replace(/\.ts$/,_==="ts"?".ts":".js")})}for(let _ of d.files)s.add(_.path);let M=`Client successfully generated: ${`${d.files.length} ${P("file",d.files.length)}`} (${d.bytes} bytes) at ${k(d.outputPath)}.`;b.info(`
|
|
22
|
-
`+$(M)+`
|
|
23
|
-
`)}catch(d){let w=d instanceof Error?d.message:String(d);throw l.generate_client_error_category=R(w),new g(`
|
|
24
|
-
\u274C Failed to generate client for ${p}.
|
|
25
|
-
${w}
|
|
26
|
-
`)}}async function K(e,{configDir:n,seenOutputs:o,composable:c}){let{renderComposedCliEntry:m}=await import("./JFWECYV5.js"),t=f(n,e);if(!t.endsWith(".ts"))throw new g(`
|
|
27
|
-
\u274C client.cliOutput must point at a TypeScript file (ending in .ts).
|
|
28
|
-
Got: ${t}
|
|
29
|
-
`);if(o.has(t))throw new g(`
|
|
30
|
-
\u274C client.cliOutput resolves to a file this run generated: ${t}.
|
|
31
|
-
Give the composed entry its own path.
|
|
32
|
-
`);let s=T(t,I(t)),r=m(c.map(({alias:i,cliPath:u})=>({alias:i,modulePath:`./${j(A(t),u).split("\\").join("/")}`})),s);await H(A(t),{recursive:!0}),await B(t,r,"utf-8"),l.generate_client_composed_apis_count=c.length,b.info(`
|
|
33
|
-
`+$(`Composed CLI written to ${k(j(process.cwd(),t))} \u2014 ${c.map(({alias:i})=>i).join(", ")} behind one \`${s}\` binary.`)+`
|
|
34
|
-
`)}var x=new Set;function Q(e,n,o){let c=new Set(l.generate_client_builtin_generators??[]),m=new Set(l.generate_client_toolkit_imports??[]),t=new Set(l.generate_client_ejected_generators??[]),s=l.generate_client_custom_generators_count??0;for(let r of e){if(v.has(r)){c.add(r);continue}if(!x.has(r)&&(x.add(r),s++,r.startsWith(".")||N(r)))try{let i=z(f(o,r),"utf-8");for(let p of U(i,n))m.add(p);let u=F(i);u&&t.add(`${u.name}@${u.version}`)}catch{}}l.generate_client_builtin_generators=[...c],l.generate_client_custom_generators_count=s,l.generate_client_toolkit_imports=[...m],l.generate_client_ejected_generators=[...t]}export{Q as collectGeneratorUsage,ie as handleGenerateClient};
|