@redocly/cli 2.62.0 → 2.62.1
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/{66GKT2TZ.js → 23KTTVIR.js} +1 -1
- package/lib/chunks/{4WO6ZSKT.js → 3M4FKKBI.js} +1 -1
- package/lib/chunks/{QAUXTHD6.js → 5S5OMDQZ.js} +1 -1
- package/lib/chunks/{53INGMTO.js → 5UYYEBJY.js} +1 -1
- package/lib/chunks/{SS6PCAMM.js → 5YW5LAGV.js} +1 -1
- package/lib/chunks/{AZO6SCNH.js → 7YNVVBUW.js} +1 -1
- package/lib/chunks/{TWWNWQRB.js → B64RMZSV.js} +1 -1
- package/lib/chunks/{OT7Y7FIM.js → BX2H6D2W.js} +1 -1
- package/lib/chunks/{B2J7WNDG.js → DBBMGF4W.js} +1 -1
- package/lib/chunks/{TF4PPK4N.js → G55KF2JU.js} +1 -1
- package/lib/chunks/{ZYQDPQVA.js → ID2DJAJI.js} +1 -1
- package/lib/chunks/{N3GO4LRW.js → KQ5RN67Y.js} +1 -1
- package/lib/chunks/{R2TPTKNR.js → L3H2DSRP.js} +1 -1
- package/lib/chunks/{NENSYJQB.js → LWPTRXNP.js} +1 -1
- package/lib/chunks/{PXCT44HL.js → O7F2NBMC.js} +2 -2
- package/lib/chunks/{DFWXX7E2.js → P7MVM2ZA.js} +1 -1
- package/lib/chunks/{G5N3UXMR.js → PRSNVDUV.js} +1 -1
- package/lib/chunks/{T4Y6M5MJ.js → QMIOB64K.js} +1 -1
- package/lib/chunks/{I6AAWNTY.js → QWPV64G2.js} +1 -1
- package/lib/chunks/SOI7RTB4.js +8 -0
- package/lib/chunks/{HN2ZK7LZ.js → U77FTE2C.js} +1 -1
- package/lib/chunks/{OMIM3KH6.js → UFZ7VJKO.js} +1 -1
- package/lib/chunks/{C67OKMFJ.js → UWK3L6LB.js} +1 -1
- package/lib/chunks/{KPPPJNVL.js → VE45GKNY.js} +1 -1
- package/lib/chunks/{VX2VONNO.js → W3G6AQCC.js} +1 -1
- package/lib/chunks/{NFRA6IE2.js → WPIZQQ5C.js} +1 -1
- package/lib/chunks/{S3STDXJN.js → XVZ7A34Y.js} +1 -1
- package/lib/chunks/{WQ3XMPU7.js → Y5AAEFMH.js} +1 -1
- package/lib/chunks/{75SLMDAN.js → YINR7LU6.js} +1 -1
- package/lib/chunks/{2EP764NP.js → ZJYDDU5M.js} +1 -1
- package/lib/chunks/{DC2HDHGE.js → ZNQTCB4Q.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/VGM6NIVC.js +0 -8
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 ri,f as te}from"./chunks/U5DIFWGH.js";import{c as ni}from"./chunks/4PTNG4EI.js";import{a as Xt}from"./chunks/3DEJQSYG.js";import{a as Na,b as si,c as oi}from"./chunks/GHSNC2OX.js";import{a as ai}from"./chunks/HBENVUR4.js";import{a as Zn}from"./chunks/6NB3FKVN.js";import{a as Ta}from"./chunks/LRUXN6H5.js";import{a as ii,c as Jt,d as Lr,e as ci,g as li}from"./chunks/TZMWTSOQ.js";import{a as Ie,b as ei,c as ti}from"./chunks/VX2VONNO.js";import{Ba as Qn,O as Wn,R as Hn,Z as Vn,a as Gn,aa as Bt,ba as Bn,c as we,ea as Lt,ia as K,ja as Yt,ka as Yn,l as Pr,oa as Oe,pa as Kt,sa as Kn,u as kn,va as Xn,wa as Jn}from"./chunks/22EANOP2.js";import"./chunks/NEWT5A6S.js";import{a as Ue,c as z,e as Pt}from"./chunks/RFWIIJFG.js";var wt=z((md,ui)=>{"use strict";var Da="2.0.0",qa=Number.MAX_SAFE_INTEGER||9007199254740991,Ma=16,Fa=250,za=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ui.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ma,MAX_SAFE_BUILD_LENGTH:Fa,MAX_SAFE_INTEGER:qa,RELEASE_TYPES:za,SEMVER_SPEC_VERSION:Da,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Nt=z((gd,fi)=>{"use strict";var Ua=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};fi.exports=Ua});var Ot=z((Ge,di)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Nr,MAX_SAFE_BUILD_LENGTH:Ga,MAX_LENGTH:ka}=wt(),Wa=Nt();Ge=di.exports={};var Ha=Ge.re=[],Va=Ge.safeRe=[],C=Ge.src=[],Ba=Ge.safeSrc=[],x=Ge.t={},Ya=0,Tr="[a-zA-Z0-9-]",Ka=[["\\s",1],["\\d",ka],[Tr,Ga]],Xa=r=>{for(let[e,t]of Ka)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},k=(r,e,t)=>{let n=Xa(e),i=Ya++;Wa(r,i,e),x[r]=i,C[i]=e,Ba[i]=n,Ha[i]=new RegExp(e,t?"g":void 0),Va[i]=new RegExp(n,t?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*");k("NUMERICIDENTIFIERLOOSE","\\d+");k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Tr}*`);k("MAINVERSION",`(${C[x.NUMERICIDENTIFIER]})\\.(${C[x.NUMERICIDENTIFIER]})\\.(${C[x.NUMERICIDENTIFIER]})`);k("MAINVERSIONLOOSE",`(${C[x.NUMERICIDENTIFIERLOOSE]})\\.(${C[x.NUMERICIDENTIFIERLOOSE]})\\.(${C[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASEIDENTIFIER",`(?:${C[x.NONNUMERICIDENTIFIER]}|${C[x.NUMERICIDENTIFIER]})`);k("PRERELEASEIDENTIFIERLOOSE",`(?:${C[x.NONNUMERICIDENTIFIER]}|${C[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASE",`(?:-(${C[x.PRERELEASEIDENTIFIER]}(?:\\.${C[x.PRERELEASEIDENTIFIER]})*))`);k("PRERELEASELOOSE",`(?:-?(${C[x.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[x.PRERELEASEIDENTIFIERLOOSE]})*))`);k("BUILDIDENTIFIER",`${Tr}+`);k("BUILD",`(?:\\+(${C[x.BUILDIDENTIFIER]}(?:\\.${C[x.BUILDIDENTIFIER]})*))`);k("FULLPLAIN",`v?${C[x.MAINVERSION]}${C[x.PRERELEASE]}?${C[x.BUILD]}?`);k("FULL",`^${C[x.FULLPLAIN]}$`);k("LOOSEPLAIN",`[v=\\s]*${C[x.MAINVERSIONLOOSE]}${C[x.PRERELEASELOOSE]}?${C[x.BUILD]}?`);k("LOOSE",`^${C[x.LOOSEPLAIN]}$`);k("GTLT","((?:<|>)?=?)");k("XRANGEIDENTIFIERLOOSE",`${C[x.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);k("XRANGEIDENTIFIER",`${C[x.NUMERICIDENTIFIER]}|x|X|\\*`);k("XRANGEPLAIN",`[v=\\s]*(${C[x.XRANGEIDENTIFIER]})(?:\\.(${C[x.XRANGEIDENTIFIER]})(?:\\.(${C[x.XRANGEIDENTIFIER]})(?:${C[x.PRERELEASE]})?${C[x.BUILD]}?)?)?`);k("XRANGEPLAINLOOSE",`[v=\\s]*(${C[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[x.XRANGEIDENTIFIERLOOSE]})(?:${C[x.PRERELEASELOOSE]})?${C[x.BUILD]}?)?)?`);k("XRANGE",`^${C[x.GTLT]}\\s*${C[x.XRANGEPLAIN]}$`);k("XRANGELOOSE",`^${C[x.GTLT]}\\s*${C[x.XRANGEPLAINLOOSE]}$`);k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Nr}})(?:\\.(\\d{1,${Nr}}))?(?:\\.(\\d{1,${Nr}}))?`);k("COERCE",`${C[x.COERCEPLAIN]}(?:$|[^\\d])`);k("COERCEFULL",C[x.COERCEPLAIN]+`(?:${C[x.PRERELEASE]})?(?:${C[x.BUILD]})?(?:$|[^\\d])`);k("COERCERTL",C[x.COERCE],!0);k("COERCERTLFULL",C[x.COERCEFULL],!0);k("LONETILDE","(?:~>?)");k("TILDETRIM",`(\\s*)${C[x.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";k("TILDE",`^${C[x.LONETILDE]}${C[x.XRANGEPLAIN]}$`);k("TILDELOOSE",`^${C[x.LONETILDE]}${C[x.XRANGEPLAINLOOSE]}$`);k("LONECARET","(?:\\^)");k("CARETTRIM",`(\\s*)${C[x.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";k("CARET",`^${C[x.LONECARET]}${C[x.XRANGEPLAIN]}$`);k("CARETLOOSE",`^${C[x.LONECARET]}${C[x.XRANGEPLAINLOOSE]}$`);k("COMPARATORLOOSE",`^${C[x.GTLT]}\\s*(${C[x.LOOSEPLAIN]})$|^$`);k("COMPARATOR",`^${C[x.GTLT]}\\s*(${C[x.FULLPLAIN]})$|^$`);k("COMPARATORTRIM",`(\\s*)${C[x.GTLT]}\\s*(${C[x.LOOSEPLAIN]}|${C[x.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";k("HYPHENRANGE",`^\\s*(${C[x.XRANGEPLAIN]})\\s+-\\s+(${C[x.XRANGEPLAIN]})\\s*$`);k("HYPHENRANGELOOSE",`^\\s*(${C[x.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[x.XRANGEPLAINLOOSE]})\\s*$`);k("STAR","(<|>)?=?\\s*\\*");k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Qt=z((yd,pi)=>{"use strict";var Ja=Object.freeze({loose:!0}),Qa=Object.freeze({}),Za=r=>r?typeof r!="object"?Ja:r:Qa;pi.exports=Za});var Dr=z((bd,gi)=>{"use strict";var hi=/^[0-9]+$/,mi=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=hi.test(r),n=hi.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},ec=(r,e)=>mi(e,r);gi.exports={compareIdentifiers:mi,rcompareIdentifiers:ec}});var me=z((Ed,bi)=>{"use strict";var Zt=Nt(),{MAX_LENGTH:yi,MAX_SAFE_INTEGER:er}=wt(),{safeRe:tr,t:rr}=Ot(),tc=Qt(),{compareIdentifiers:qr}=Dr(),rc=(r,e)=>{let t=e.split(".");if(t.length>r.length)return!1;for(let n=0;n<t.length;n++)if(qr(r[n],t[n])!==0)return!1;return!0},Mr=class r{constructor(e,t){if(t=tc(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>yi)throw new TypeError(`version is longer than ${yi} characters`);Zt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?tr[rr.LOOSE]:tr[rr.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>er||this.major<0)throw new TypeError("Invalid major version");if(this.minor>er||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>er||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<er)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(Zt("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(Zt("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 qr(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(Zt("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 qr(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?tr[rr.PRERELEASELOOSE]:tr[rr.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]),rc(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}};bi.exports=Mr});var Qe=z((wd,wi)=>{"use strict";var Ei=me(),nc=(r,e,t=!1)=>{if(r instanceof Ei)return r;try{return new Ei(r,e)}catch(n){if(!t)return null;throw n}};wi.exports=nc});var Ai=z((Od,Oi)=>{"use strict";var ic=Qe(),sc=(r,e)=>{let t=ic(r,e);return t?t.version:null};Oi.exports=sc});var Si=z((Ad,_i)=>{"use strict";var oc=Qe(),ac=(r,e)=>{let t=oc(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};_i.exports=ac});var Ri=z((_d,xi)=>{"use strict";var Ci=me(),cc=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Ci(r instanceof Ci?r.version:r,t).inc(e,n,i).version}catch{return null}};xi.exports=cc});var $i=z((Sd,ji)=>{"use strict";var vi=Qe(),lc=(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,c=s?n:t,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0)return c.minor&&!c.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"};ji.exports=lc});var Pi=z((Cd,Ii)=>{"use strict";var uc=me(),fc=(r,e)=>new uc(r,e).major;Ii.exports=fc});var Ni=z((xd,Li)=>{"use strict";var dc=me(),pc=(r,e)=>new dc(r,e).minor;Li.exports=pc});var Di=z((Rd,Ti)=>{"use strict";var hc=me(),mc=(r,e)=>new hc(r,e).patch;Ti.exports=mc});var Mi=z((vd,qi)=>{"use strict";var gc=Qe(),yc=(r,e)=>{let t=gc(r,e);return t&&t.prerelease.length?t.prerelease:null};qi.exports=yc});var Pe=z((jd,zi)=>{"use strict";var Fi=me(),bc=(r,e,t)=>new Fi(r,t).compare(new Fi(e,t));zi.exports=bc});var Gi=z(($d,Ui)=>{"use strict";var Ec=Pe(),wc=(r,e,t)=>Ec(e,r,t);Ui.exports=wc});var Wi=z((Id,ki)=>{"use strict";var Oc=Pe(),Ac=(r,e)=>Oc(r,e,!0);ki.exports=Ac});var nr=z((Pd,Vi)=>{"use strict";var Hi=me(),_c=(r,e,t)=>{let n=new Hi(r,t),i=new Hi(e,t);return n.compare(i)||n.compareBuild(i)};Vi.exports=_c});var Yi=z((Ld,Bi)=>{"use strict";var Sc=nr(),Cc=(r,e)=>r.sort((t,n)=>Sc(t,n,e));Bi.exports=Cc});var Xi=z((Nd,Ki)=>{"use strict";var xc=nr(),Rc=(r,e)=>r.sort((t,n)=>xc(n,t,e));Ki.exports=Rc});var Tt=z((Td,Ji)=>{"use strict";var vc=Pe(),jc=(r,e,t)=>vc(r,e,t)>0;Ji.exports=jc});var ir=z((Dd,Qi)=>{"use strict";var $c=Pe(),Ic=(r,e,t)=>$c(r,e,t)<0;Qi.exports=Ic});var Fr=z((qd,Zi)=>{"use strict";var Pc=Pe(),Lc=(r,e,t)=>Pc(r,e,t)===0;Zi.exports=Lc});var zr=z((Md,es)=>{"use strict";var Nc=Pe(),Tc=(r,e,t)=>Nc(r,e,t)!==0;es.exports=Tc});var sr=z((Fd,ts)=>{"use strict";var Dc=Pe(),qc=(r,e,t)=>Dc(r,e,t)>=0;ts.exports=qc});var or=z((zd,rs)=>{"use strict";var Mc=Pe(),Fc=(r,e,t)=>Mc(r,e,t)<=0;rs.exports=Fc});var Ur=z((Ud,ns)=>{"use strict";var zc=Fr(),Uc=zr(),Gc=Tt(),kc=sr(),Wc=ir(),Hc=or(),Vc=(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 zc(r,t,n);case"!=":return Uc(r,t,n);case">":return Gc(r,t,n);case">=":return kc(r,t,n);case"<":return Wc(r,t,n);case"<=":return Hc(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};ns.exports=Vc});var ss=z((Gd,is)=>{"use strict";var Bc=me(),Yc=Qe(),{safeRe:ar,t:cr}=Ot(),Kc=(r,e)=>{if(r instanceof Bc)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?ar[cr.COERCEFULL]:ar[cr.COERCE]);else{let u=e.includePrerelease?ar[cr.COERCERTLFULL]:ar[cr.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]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Yc(`${n}.${i}.${s}${o}${c}`,e)};is.exports=Kc});var as=z((kd,os)=>{"use strict";var Xc=Qe(),Jc=wt(),Qc=me(),Zc=(r,e,t)=>{if(!Jc.RELEASE_TYPES.includes(e))return null;let n=el(r,t);return n&&tl(n,e)},el=(r,e)=>{let t=r instanceof Qc?r.version:r;return Xc(t,e)},tl=(r,e)=>{if(rl(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()},rl=r=>r.startsWith("pre");os.exports=Zc});var ls=z((Wd,cs)=>{"use strict";var Gr=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}};cs.exports=Gr});var Le=z((Hd,ps)=>{"use strict";var nl=/\s+/g,kr=class r{constructor(e,t){if(t=sl(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Wr)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(nl," "),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=>!fs(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&&hl(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(pl,"");let n=((this.options.includePrerelease&&fl)|(this.options.loose&&dl))+":"+e,i=us.get(n);if(i)return i;let s=this.options.loose,o=s?Ae[ge.HYPHENRANGELOOSE]:Ae[ge.HYPHENRANGE];e=e.replace(o,Cl(this.options.includePrerelease)),re("hyphen replace",e),e=e.replace(Ae[ge.COMPARATORTRIM],cl),re("comparator trim",e),e=e.replace(Ae[ge.TILDETRIM],ll),re("tilde trim",e),e=e.replace(Ae[ge.CARETTRIM],ul),re("caret trim",e);let c=e.split(" ").map(l=>ml(l,this.options)).join(" ").split(/\s+/).map(l=>Sl(l,this.options));s&&(c=c.filter(l=>(re("loose invalid filter",l,this.options),!!l.match(Ae[ge.COMPARATORLOOSE])))),re("range list",c);let u=new Map,p=c.map(l=>new Wr(l,this.options));for(let l of p){if(fs(l))return[l];u.set(l.value,l)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return us.set(n,h),h}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>ds(n,t)&&e.set.some(i=>ds(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 ol(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(xl(this.set[t],e,this.options))return!0;return!1}};ps.exports=kr;var il=ls(),us=new il,sl=Qt(),Wr=Dt(),re=Nt(),ol=me(),{safeRe:Ae,src:al,t:ge,comparatorTrimReplace:cl,tildeTrimReplace:ll,caretTrimReplace:ul}=Ot(),{FLAG_INCLUDE_PRERELEASE:fl,FLAG_LOOSE:dl}=wt(),pl=new RegExp(al[ge.BUILD],"g"),fs=r=>r.value==="<0.0.0-0",hl=r=>r.value==="",ds=(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},ml=(r,e)=>(r=r.replace(Ae[ge.BUILD],""),re("comp",r,e),r=El(r,e),re("caret",r),r=yl(r,e),re("tildes",r),r=Ol(r,e),re("xrange",r),r=_l(r,e),re("stars",r),r),de=r=>!r||r.toLowerCase()==="x"||r==="*",gl=(r,e,t)=>de(r)&&!de(e)||de(e)&&t&&!de(t),yl=(r,e)=>r.trim().split(/\s+/).map(t=>bl(t,e)).join(" "),bl=(r,e)=>{let t=e.loose?Ae[ge.TILDELOOSE]:Ae[ge.TILDE],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,c,u)=>{re("tilde",r,i,s,o,c,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(c)?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u?(re("replaceTilde pr",u),p=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`):p=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`,re("tilde return",p),p})},El=(r,e)=>r.trim().split(/\s+/).map(t=>wl(t,e)).join(" "),wl=(r,e)=>{re("caret",r,e);let t=e.loose?Ae[ge.CARETLOOSE]:Ae[ge.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,c,u)=>{re("caret",r,i,s,o,c,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(c)?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}.${c}-${u} <${s}.${o}.${+c+1}-0`:p=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${c}-${u} <${+s+1}.0.0-0`):(re("no pr"),s==="0"?o==="0"?p=`>=${s}.${o}.${c} <${s}.${o}.${+c+1}-0`:p=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${c} <${+s+1}.0.0-0`),re("caret return",p),p})},Ol=(r,e)=>(re("replaceXRanges",r,e),r.split(/\s+/).map(t=>Al(t,e)).join(" ")),Al=(r,e)=>{r=r.trim();let t=e.loose?Ae[ge.XRANGELOOSE]:Ae[ge.XRANGE];return r.replace(t,(n,i,s,o,c,u)=>{if(re("xRange",r,n,i,s,o,c,u),gl(s,o,c))return r;let p=de(s),h=p||de(o),l=h||de(c),b=l;return i==="="&&b&&(i=""),u=e.includePrerelease?"-0":"",p?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&b?(h&&(o=0),c=0,i===">"?(i=">=",h?(s=+s+1,o=0,c=0):(o=+o+1,c=0)):i==="<="&&(i="<",h?s=+s+1:o=+o+1),i==="<"&&(u="-0"),n=`${i+s}.${o}.${c}${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})},_l=(r,e)=>(re("replaceStars",r,e),r.trim().replace(Ae[ge.STAR],"")),Sl=(r,e)=>(re("replaceGTE0",r,e),r.trim().replace(Ae[e.includePrerelease?ge.GTE0PRE:ge.GTE0],"")),Cl=r=>(e,t,n,i,s,o,c,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()),xl=(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!==Wr.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 Dt=z((Vd,Es)=>{"use strict";var qt=Symbol("SemVer ANY"),Br=class r{static get ANY(){return qt}constructor(e,t){if(t=hs(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Vr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===qt?this.value="":this.value=this.operator+this.semver.version,Vr("comp",this)}parse(e){let t=this.options.loose?ms[gs.COMPARATORLOOSE]:ms[gs.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 ys(n[2],this.options.loose):this.semver=qt}toString(){return this.value}test(e){if(Vr("Comparator.test",e,this.options.loose),this.semver===qt||e===qt)return!0;if(typeof e=="string")try{e=new ys(e,this.options)}catch{return!1}return Hr(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 bs(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new bs(this.value,t).test(e.semver):(t=hs(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("=")||Hr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Hr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Es.exports=Br;var hs=Qt(),{safeRe:ms,t:gs}=Ot(),Hr=Ur(),Vr=Nt(),ys=me(),bs=Le()});var Mt=z((Bd,ws)=>{"use strict";var Rl=Le(),vl=(r,e,t)=>{try{e=new Rl(e,t)}catch{return!1}return e.test(r)};ws.exports=vl});var As=z((Yd,Os)=>{"use strict";var jl=Le(),$l=(r,e)=>new jl(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Os.exports=$l});var Ss=z((Kd,_s)=>{"use strict";var Il=me(),Pl=Le(),Ll=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Pl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Il(n,t))}),n};_s.exports=Ll});var xs=z((Xd,Cs)=>{"use strict";var Nl=me(),Tl=Le(),Dl=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Tl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Nl(n,t))}),n};Cs.exports=Dl});var js=z((Jd,vs)=>{"use strict";var Yr=me(),ql=Le(),Rs=Tt(),Ml=(r,e)=>{r=new ql(r,e);let t=new Yr("0.0.0");if(r.test(t)||(t=new Yr("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 c=new Yr(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!s||Rs(c,s))&&(s=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||Rs(t,s))&&(t=s)}return t&&r.test(t)?t:null};vs.exports=Ml});var Is=z((Qd,$s)=>{"use strict";var Fl=Le(),zl=(r,e)=>{try{return new Fl(r,e).range||"*"}catch{return null}};$s.exports=zl});var lr=z((Zd,Ts)=>{"use strict";var Ul=me(),Ns=Dt(),{ANY:Gl}=Ns,kl=Le(),Wl=Mt(),Ps=Tt(),Ls=ir(),Hl=or(),Vl=sr(),Bl=(r,e,t,n)=>{r=new Ul(r,n),e=new kl(e,n);let i,s,o,c,u;switch(t){case">":i=Ps,s=Hl,o=Ls,c=">",u=">=";break;case"<":i=Ls,s=Vl,o=Ps,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Wl(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(g=>{g.semver===Gl&&(g=new Ns(">=0.0.0")),l=l||g,b=b||g,i(g.semver,l.semver,n)?l=g:o(g.semver,b.semver,n)&&(b=g)}),l.operator===c||l.operator===u||(!b.operator||b.operator===c)&&s(r,b.semver))return!1;if(b.operator===u&&o(r,b.semver))return!1}return!0};Ts.exports=Bl});var qs=z((ep,Ds)=>{"use strict";var Yl=lr(),Kl=(r,e,t)=>Yl(r,e,">",t);Ds.exports=Kl});var Fs=z((tp,Ms)=>{"use strict";var Xl=lr(),Jl=(r,e,t)=>Xl(r,e,"<",t);Ms.exports=Jl});var Gs=z((rp,Us)=>{"use strict";var zs=Le(),Ql=(r,e,t)=>(r=new zs(r,t),e=new zs(e,t),r.intersects(e,t));Us.exports=Ql});var Ws=z((np,ks)=>{"use strict";var Zl=Mt(),eu=Pe();ks.exports=(r,e,t)=>{let n=[],i=null,s=null,o=r.sort((h,l)=>eu(h,l,t));for(let h of o)Zl(h,e,t)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let c=[];for(let[h,l]of n)h===l?c.push(h):!l&&h===o[0]?c.push("*"):l?h===o[0]?c.push(`<=${l}`):c.push(`${h} - ${l}`):c.push(`>=${h}`);let u=c.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var Xs=z((ip,Ks)=>{"use strict";var Hs=Le(),Jr=Dt(),{ANY:Kr}=Jr,Xr=Mt(),Qr=Pe(),tu=(r,e,t={})=>{if(r===e)return!0;r=new Hs(r,t),e=new Hs(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let o=nu(i,s,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ru=[new Jr(">=0.0.0-0")],Vs=[new Jr(">=0.0.0")],nu=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Kr){if(e.length===1&&e[0].semver===Kr)return!0;t.includePrerelease?r=ru:r=Vs}if(e.length===1&&e[0].semver===Kr){if(t.includePrerelease)return!0;e=Vs}let n=new Set,i,s;for(let g of r)g.operator===">"||g.operator===">="?i=Bs(i,g,t):g.operator==="<"||g.operator==="<="?s=Ys(s,g,t):n.add(g.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Qr(i.semver,s.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let g of n){if(i&&!Xr(g,String(i),t)||s&&!Xr(g,String(s),t))return null;for(let w of e)if(!Xr(g,String(w),t))return!1;return!0}let c,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 g of e){if(h=h||g.operator===">"||g.operator===">=",p=p||g.operator==="<"||g.operator==="<=",i){if(b&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===b.major&&g.semver.minor===b.minor&&g.semver.patch===b.patch&&(b=!1),g.operator===">"||g.operator===">="){if(c=Bs(i,g,t),c===g&&c!==i)return!1}else if(i.operator===">="&&!g.test(i.semver))return!1}if(s){if(l&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===l.major&&g.semver.minor===l.minor&&g.semver.patch===l.patch&&(l=!1),g.operator==="<"||g.operator==="<="){if(u=Ys(s,g,t),u===g&&u!==s)return!1}else if(s.operator==="<="&&!g.test(s.semver))return!1}if(!g.operator&&(s||i)&&o!==0)return!1}return!(i&&p&&!s&&o!==0||s&&h&&!i&&o!==0||b||l)},Bs=(r,e,t)=>{if(!r)return e;let n=Qr(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Ys=(r,e,t)=>{if(!r)return e;let n=Qr(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Ks.exports=tu});var ur=z((sp,Zs)=>{"use strict";var Zr=Ot(),Js=wt(),iu=me(),Qs=Dr(),su=Qe(),ou=Ai(),au=Si(),cu=Ri(),lu=$i(),uu=Pi(),fu=Ni(),du=Di(),pu=Mi(),hu=Pe(),mu=Gi(),gu=Wi(),yu=nr(),bu=Yi(),Eu=Xi(),wu=Tt(),Ou=ir(),Au=Fr(),_u=zr(),Su=sr(),Cu=or(),xu=Ur(),Ru=ss(),vu=as(),ju=Dt(),$u=Le(),Iu=Mt(),Pu=As(),Lu=Ss(),Nu=xs(),Tu=js(),Du=Is(),qu=lr(),Mu=qs(),Fu=Fs(),zu=Gs(),Uu=Ws(),Gu=Xs();Zs.exports={parse:su,valid:ou,clean:au,inc:cu,diff:lu,major:uu,minor:fu,patch:du,prerelease:pu,compare:hu,rcompare:mu,compareLoose:gu,compareBuild:yu,sort:bu,rsort:Eu,gt:wu,lt:Ou,eq:Au,neq:_u,gte:Su,lte:Cu,cmp:xu,coerce:Ru,truncate:vu,Comparator:ju,Range:$u,satisfies:Iu,toComparators:Pu,maxSatisfying:Lu,minSatisfying:Nu,minVersion:Tu,validRange:Du,outside:qu,gtr:Mu,ltr:Fu,intersects:zu,simplifyRange:Uu,subset:Gu,SemVer:iu,re:Zr.re,src:Zr.src,tokens:Zr.t,SEMVER_SPEC_VERSION:Js.SEMVER_SPEC_VERSION,RELEASE_TYPES:Js.RELEASE_TYPES,compareIdentifiers:Qs.compareIdentifiers,rcompareIdentifiers:Qs.rcompareIdentifiers}});var fr=Pt(ur(),1);import*as Ft from"node:process";try{let r=ti?.node;typeof r=="string"&&!fr.satisfies(Ft.version,r)&&K.warn(`
|
|
8
|
+
import{a as ri,f as te}from"./chunks/U5DIFWGH.js";import{c as ni}from"./chunks/4PTNG4EI.js";import{a as Xt}from"./chunks/3DEJQSYG.js";import{a as Na,b as si,c as oi}from"./chunks/GHSNC2OX.js";import{a as ai}from"./chunks/HBENVUR4.js";import{a as Zn}from"./chunks/6NB3FKVN.js";import{a as Ta}from"./chunks/LRUXN6H5.js";import{a as ii,c as Jt,d as Lr,e as ci,g as li}from"./chunks/TZMWTSOQ.js";import{a as Ie,b as ei,c as ti}from"./chunks/W3G6AQCC.js";import{Ba as Qn,O as Wn,R as Hn,Z as Vn,a as Gn,aa as Bt,ba as Bn,c as we,ea as Lt,ia as K,ja as Yt,ka as Yn,l as Pr,oa as Oe,pa as Kt,sa as Kn,u as kn,va as Xn,wa as Jn}from"./chunks/22EANOP2.js";import"./chunks/NEWT5A6S.js";import{a as Ue,c as z,e as Pt}from"./chunks/RFWIIJFG.js";var wt=z((md,ui)=>{"use strict";var Da="2.0.0",qa=Number.MAX_SAFE_INTEGER||9007199254740991,Ma=16,Fa=250,za=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ui.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ma,MAX_SAFE_BUILD_LENGTH:Fa,MAX_SAFE_INTEGER:qa,RELEASE_TYPES:za,SEMVER_SPEC_VERSION:Da,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Nt=z((gd,fi)=>{"use strict";var Ua=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};fi.exports=Ua});var Ot=z((Ge,di)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Nr,MAX_SAFE_BUILD_LENGTH:Ga,MAX_LENGTH:ka}=wt(),Wa=Nt();Ge=di.exports={};var Ha=Ge.re=[],Va=Ge.safeRe=[],C=Ge.src=[],Ba=Ge.safeSrc=[],x=Ge.t={},Ya=0,Tr="[a-zA-Z0-9-]",Ka=[["\\s",1],["\\d",ka],[Tr,Ga]],Xa=r=>{for(let[e,t]of Ka)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},k=(r,e,t)=>{let n=Xa(e),i=Ya++;Wa(r,i,e),x[r]=i,C[i]=e,Ba[i]=n,Ha[i]=new RegExp(e,t?"g":void 0),Va[i]=new RegExp(n,t?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*");k("NUMERICIDENTIFIERLOOSE","\\d+");k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Tr}*`);k("MAINVERSION",`(${C[x.NUMERICIDENTIFIER]})\\.(${C[x.NUMERICIDENTIFIER]})\\.(${C[x.NUMERICIDENTIFIER]})`);k("MAINVERSIONLOOSE",`(${C[x.NUMERICIDENTIFIERLOOSE]})\\.(${C[x.NUMERICIDENTIFIERLOOSE]})\\.(${C[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASEIDENTIFIER",`(?:${C[x.NONNUMERICIDENTIFIER]}|${C[x.NUMERICIDENTIFIER]})`);k("PRERELEASEIDENTIFIERLOOSE",`(?:${C[x.NONNUMERICIDENTIFIER]}|${C[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASE",`(?:-(${C[x.PRERELEASEIDENTIFIER]}(?:\\.${C[x.PRERELEASEIDENTIFIER]})*))`);k("PRERELEASELOOSE",`(?:-?(${C[x.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[x.PRERELEASEIDENTIFIERLOOSE]})*))`);k("BUILDIDENTIFIER",`${Tr}+`);k("BUILD",`(?:\\+(${C[x.BUILDIDENTIFIER]}(?:\\.${C[x.BUILDIDENTIFIER]})*))`);k("FULLPLAIN",`v?${C[x.MAINVERSION]}${C[x.PRERELEASE]}?${C[x.BUILD]}?`);k("FULL",`^${C[x.FULLPLAIN]}$`);k("LOOSEPLAIN",`[v=\\s]*${C[x.MAINVERSIONLOOSE]}${C[x.PRERELEASELOOSE]}?${C[x.BUILD]}?`);k("LOOSE",`^${C[x.LOOSEPLAIN]}$`);k("GTLT","((?:<|>)?=?)");k("XRANGEIDENTIFIERLOOSE",`${C[x.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);k("XRANGEIDENTIFIER",`${C[x.NUMERICIDENTIFIER]}|x|X|\\*`);k("XRANGEPLAIN",`[v=\\s]*(${C[x.XRANGEIDENTIFIER]})(?:\\.(${C[x.XRANGEIDENTIFIER]})(?:\\.(${C[x.XRANGEIDENTIFIER]})(?:${C[x.PRERELEASE]})?${C[x.BUILD]}?)?)?`);k("XRANGEPLAINLOOSE",`[v=\\s]*(${C[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[x.XRANGEIDENTIFIERLOOSE]})(?:${C[x.PRERELEASELOOSE]})?${C[x.BUILD]}?)?)?`);k("XRANGE",`^${C[x.GTLT]}\\s*${C[x.XRANGEPLAIN]}$`);k("XRANGELOOSE",`^${C[x.GTLT]}\\s*${C[x.XRANGEPLAINLOOSE]}$`);k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Nr}})(?:\\.(\\d{1,${Nr}}))?(?:\\.(\\d{1,${Nr}}))?`);k("COERCE",`${C[x.COERCEPLAIN]}(?:$|[^\\d])`);k("COERCEFULL",C[x.COERCEPLAIN]+`(?:${C[x.PRERELEASE]})?(?:${C[x.BUILD]})?(?:$|[^\\d])`);k("COERCERTL",C[x.COERCE],!0);k("COERCERTLFULL",C[x.COERCEFULL],!0);k("LONETILDE","(?:~>?)");k("TILDETRIM",`(\\s*)${C[x.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";k("TILDE",`^${C[x.LONETILDE]}${C[x.XRANGEPLAIN]}$`);k("TILDELOOSE",`^${C[x.LONETILDE]}${C[x.XRANGEPLAINLOOSE]}$`);k("LONECARET","(?:\\^)");k("CARETTRIM",`(\\s*)${C[x.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";k("CARET",`^${C[x.LONECARET]}${C[x.XRANGEPLAIN]}$`);k("CARETLOOSE",`^${C[x.LONECARET]}${C[x.XRANGEPLAINLOOSE]}$`);k("COMPARATORLOOSE",`^${C[x.GTLT]}\\s*(${C[x.LOOSEPLAIN]})$|^$`);k("COMPARATOR",`^${C[x.GTLT]}\\s*(${C[x.FULLPLAIN]})$|^$`);k("COMPARATORTRIM",`(\\s*)${C[x.GTLT]}\\s*(${C[x.LOOSEPLAIN]}|${C[x.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";k("HYPHENRANGE",`^\\s*(${C[x.XRANGEPLAIN]})\\s+-\\s+(${C[x.XRANGEPLAIN]})\\s*$`);k("HYPHENRANGELOOSE",`^\\s*(${C[x.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[x.XRANGEPLAINLOOSE]})\\s*$`);k("STAR","(<|>)?=?\\s*\\*");k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Qt=z((yd,pi)=>{"use strict";var Ja=Object.freeze({loose:!0}),Qa=Object.freeze({}),Za=r=>r?typeof r!="object"?Ja:r:Qa;pi.exports=Za});var Dr=z((bd,gi)=>{"use strict";var hi=/^[0-9]+$/,mi=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=hi.test(r),n=hi.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},ec=(r,e)=>mi(e,r);gi.exports={compareIdentifiers:mi,rcompareIdentifiers:ec}});var me=z((Ed,bi)=>{"use strict";var Zt=Nt(),{MAX_LENGTH:yi,MAX_SAFE_INTEGER:er}=wt(),{safeRe:tr,t:rr}=Ot(),tc=Qt(),{compareIdentifiers:qr}=Dr(),rc=(r,e)=>{let t=e.split(".");if(t.length>r.length)return!1;for(let n=0;n<t.length;n++)if(qr(r[n],t[n])!==0)return!1;return!0},Mr=class r{constructor(e,t){if(t=tc(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>yi)throw new TypeError(`version is longer than ${yi} characters`);Zt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?tr[rr.LOOSE]:tr[rr.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>er||this.major<0)throw new TypeError("Invalid major version");if(this.minor>er||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>er||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<er)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(Zt("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(Zt("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 qr(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(Zt("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 qr(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?tr[rr.PRERELEASELOOSE]:tr[rr.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]),rc(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}};bi.exports=Mr});var Qe=z((wd,wi)=>{"use strict";var Ei=me(),nc=(r,e,t=!1)=>{if(r instanceof Ei)return r;try{return new Ei(r,e)}catch(n){if(!t)return null;throw n}};wi.exports=nc});var Ai=z((Od,Oi)=>{"use strict";var ic=Qe(),sc=(r,e)=>{let t=ic(r,e);return t?t.version:null};Oi.exports=sc});var Si=z((Ad,_i)=>{"use strict";var oc=Qe(),ac=(r,e)=>{let t=oc(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};_i.exports=ac});var Ri=z((_d,xi)=>{"use strict";var Ci=me(),cc=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Ci(r instanceof Ci?r.version:r,t).inc(e,n,i).version}catch{return null}};xi.exports=cc});var $i=z((Sd,ji)=>{"use strict";var vi=Qe(),lc=(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,c=s?n:t,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0)return c.minor&&!c.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"};ji.exports=lc});var Pi=z((Cd,Ii)=>{"use strict";var uc=me(),fc=(r,e)=>new uc(r,e).major;Ii.exports=fc});var Ni=z((xd,Li)=>{"use strict";var dc=me(),pc=(r,e)=>new dc(r,e).minor;Li.exports=pc});var Di=z((Rd,Ti)=>{"use strict";var hc=me(),mc=(r,e)=>new hc(r,e).patch;Ti.exports=mc});var Mi=z((vd,qi)=>{"use strict";var gc=Qe(),yc=(r,e)=>{let t=gc(r,e);return t&&t.prerelease.length?t.prerelease:null};qi.exports=yc});var Pe=z((jd,zi)=>{"use strict";var Fi=me(),bc=(r,e,t)=>new Fi(r,t).compare(new Fi(e,t));zi.exports=bc});var Gi=z(($d,Ui)=>{"use strict";var Ec=Pe(),wc=(r,e,t)=>Ec(e,r,t);Ui.exports=wc});var Wi=z((Id,ki)=>{"use strict";var Oc=Pe(),Ac=(r,e)=>Oc(r,e,!0);ki.exports=Ac});var nr=z((Pd,Vi)=>{"use strict";var Hi=me(),_c=(r,e,t)=>{let n=new Hi(r,t),i=new Hi(e,t);return n.compare(i)||n.compareBuild(i)};Vi.exports=_c});var Yi=z((Ld,Bi)=>{"use strict";var Sc=nr(),Cc=(r,e)=>r.sort((t,n)=>Sc(t,n,e));Bi.exports=Cc});var Xi=z((Nd,Ki)=>{"use strict";var xc=nr(),Rc=(r,e)=>r.sort((t,n)=>xc(n,t,e));Ki.exports=Rc});var Tt=z((Td,Ji)=>{"use strict";var vc=Pe(),jc=(r,e,t)=>vc(r,e,t)>0;Ji.exports=jc});var ir=z((Dd,Qi)=>{"use strict";var $c=Pe(),Ic=(r,e,t)=>$c(r,e,t)<0;Qi.exports=Ic});var Fr=z((qd,Zi)=>{"use strict";var Pc=Pe(),Lc=(r,e,t)=>Pc(r,e,t)===0;Zi.exports=Lc});var zr=z((Md,es)=>{"use strict";var Nc=Pe(),Tc=(r,e,t)=>Nc(r,e,t)!==0;es.exports=Tc});var sr=z((Fd,ts)=>{"use strict";var Dc=Pe(),qc=(r,e,t)=>Dc(r,e,t)>=0;ts.exports=qc});var or=z((zd,rs)=>{"use strict";var Mc=Pe(),Fc=(r,e,t)=>Mc(r,e,t)<=0;rs.exports=Fc});var Ur=z((Ud,ns)=>{"use strict";var zc=Fr(),Uc=zr(),Gc=Tt(),kc=sr(),Wc=ir(),Hc=or(),Vc=(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 zc(r,t,n);case"!=":return Uc(r,t,n);case">":return Gc(r,t,n);case">=":return kc(r,t,n);case"<":return Wc(r,t,n);case"<=":return Hc(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};ns.exports=Vc});var ss=z((Gd,is)=>{"use strict";var Bc=me(),Yc=Qe(),{safeRe:ar,t:cr}=Ot(),Kc=(r,e)=>{if(r instanceof Bc)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?ar[cr.COERCEFULL]:ar[cr.COERCE]);else{let u=e.includePrerelease?ar[cr.COERCERTLFULL]:ar[cr.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]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Yc(`${n}.${i}.${s}${o}${c}`,e)};is.exports=Kc});var as=z((kd,os)=>{"use strict";var Xc=Qe(),Jc=wt(),Qc=me(),Zc=(r,e,t)=>{if(!Jc.RELEASE_TYPES.includes(e))return null;let n=el(r,t);return n&&tl(n,e)},el=(r,e)=>{let t=r instanceof Qc?r.version:r;return Xc(t,e)},tl=(r,e)=>{if(rl(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()},rl=r=>r.startsWith("pre");os.exports=Zc});var ls=z((Wd,cs)=>{"use strict";var Gr=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}};cs.exports=Gr});var Le=z((Hd,ps)=>{"use strict";var nl=/\s+/g,kr=class r{constructor(e,t){if(t=sl(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Wr)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(nl," "),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=>!fs(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&&hl(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(pl,"");let n=((this.options.includePrerelease&&fl)|(this.options.loose&&dl))+":"+e,i=us.get(n);if(i)return i;let s=this.options.loose,o=s?Ae[ge.HYPHENRANGELOOSE]:Ae[ge.HYPHENRANGE];e=e.replace(o,Cl(this.options.includePrerelease)),re("hyphen replace",e),e=e.replace(Ae[ge.COMPARATORTRIM],cl),re("comparator trim",e),e=e.replace(Ae[ge.TILDETRIM],ll),re("tilde trim",e),e=e.replace(Ae[ge.CARETTRIM],ul),re("caret trim",e);let c=e.split(" ").map(l=>ml(l,this.options)).join(" ").split(/\s+/).map(l=>Sl(l,this.options));s&&(c=c.filter(l=>(re("loose invalid filter",l,this.options),!!l.match(Ae[ge.COMPARATORLOOSE])))),re("range list",c);let u=new Map,p=c.map(l=>new Wr(l,this.options));for(let l of p){if(fs(l))return[l];u.set(l.value,l)}u.size>1&&u.has("")&&u.delete("");let h=[...u.values()];return us.set(n,h),h}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>ds(n,t)&&e.set.some(i=>ds(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 ol(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(xl(this.set[t],e,this.options))return!0;return!1}};ps.exports=kr;var il=ls(),us=new il,sl=Qt(),Wr=Dt(),re=Nt(),ol=me(),{safeRe:Ae,src:al,t:ge,comparatorTrimReplace:cl,tildeTrimReplace:ll,caretTrimReplace:ul}=Ot(),{FLAG_INCLUDE_PRERELEASE:fl,FLAG_LOOSE:dl}=wt(),pl=new RegExp(al[ge.BUILD],"g"),fs=r=>r.value==="<0.0.0-0",hl=r=>r.value==="",ds=(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},ml=(r,e)=>(r=r.replace(Ae[ge.BUILD],""),re("comp",r,e),r=El(r,e),re("caret",r),r=yl(r,e),re("tildes",r),r=Ol(r,e),re("xrange",r),r=_l(r,e),re("stars",r),r),de=r=>!r||r.toLowerCase()==="x"||r==="*",gl=(r,e,t)=>de(r)&&!de(e)||de(e)&&t&&!de(t),yl=(r,e)=>r.trim().split(/\s+/).map(t=>bl(t,e)).join(" "),bl=(r,e)=>{let t=e.loose?Ae[ge.TILDELOOSE]:Ae[ge.TILDE],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,c,u)=>{re("tilde",r,i,s,o,c,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(c)?p=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u?(re("replaceTilde pr",u),p=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`):p=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`,re("tilde return",p),p})},El=(r,e)=>r.trim().split(/\s+/).map(t=>wl(t,e)).join(" "),wl=(r,e)=>{re("caret",r,e);let t=e.loose?Ae[ge.CARETLOOSE]:Ae[ge.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,c,u)=>{re("caret",r,i,s,o,c,u);let p;return de(s)?p="":de(o)?p=`>=${s}.0.0${n} <${+s+1}.0.0-0`:de(c)?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}.${c}-${u} <${s}.${o}.${+c+1}-0`:p=`>=${s}.${o}.${c}-${u} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${c}-${u} <${+s+1}.0.0-0`):(re("no pr"),s==="0"?o==="0"?p=`>=${s}.${o}.${c} <${s}.${o}.${+c+1}-0`:p=`>=${s}.${o}.${c} <${s}.${+o+1}.0-0`:p=`>=${s}.${o}.${c} <${+s+1}.0.0-0`),re("caret return",p),p})},Ol=(r,e)=>(re("replaceXRanges",r,e),r.split(/\s+/).map(t=>Al(t,e)).join(" ")),Al=(r,e)=>{r=r.trim();let t=e.loose?Ae[ge.XRANGELOOSE]:Ae[ge.XRANGE];return r.replace(t,(n,i,s,o,c,u)=>{if(re("xRange",r,n,i,s,o,c,u),gl(s,o,c))return r;let p=de(s),h=p||de(o),l=h||de(c),b=l;return i==="="&&b&&(i=""),u=e.includePrerelease?"-0":"",p?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&b?(h&&(o=0),c=0,i===">"?(i=">=",h?(s=+s+1,o=0,c=0):(o=+o+1,c=0)):i==="<="&&(i="<",h?s=+s+1:o=+o+1),i==="<"&&(u="-0"),n=`${i+s}.${o}.${c}${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})},_l=(r,e)=>(re("replaceStars",r,e),r.trim().replace(Ae[ge.STAR],"")),Sl=(r,e)=>(re("replaceGTE0",r,e),r.trim().replace(Ae[e.includePrerelease?ge.GTE0PRE:ge.GTE0],"")),Cl=r=>(e,t,n,i,s,o,c,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()),xl=(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!==Wr.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 Dt=z((Vd,Es)=>{"use strict";var qt=Symbol("SemVer ANY"),Br=class r{static get ANY(){return qt}constructor(e,t){if(t=hs(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Vr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===qt?this.value="":this.value=this.operator+this.semver.version,Vr("comp",this)}parse(e){let t=this.options.loose?ms[gs.COMPARATORLOOSE]:ms[gs.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 ys(n[2],this.options.loose):this.semver=qt}toString(){return this.value}test(e){if(Vr("Comparator.test",e,this.options.loose),this.semver===qt||e===qt)return!0;if(typeof e=="string")try{e=new ys(e,this.options)}catch{return!1}return Hr(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 bs(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new bs(this.value,t).test(e.semver):(t=hs(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("=")||Hr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Hr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Es.exports=Br;var hs=Qt(),{safeRe:ms,t:gs}=Ot(),Hr=Ur(),Vr=Nt(),ys=me(),bs=Le()});var Mt=z((Bd,ws)=>{"use strict";var Rl=Le(),vl=(r,e,t)=>{try{e=new Rl(e,t)}catch{return!1}return e.test(r)};ws.exports=vl});var As=z((Yd,Os)=>{"use strict";var jl=Le(),$l=(r,e)=>new jl(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));Os.exports=$l});var Ss=z((Kd,_s)=>{"use strict";var Il=me(),Pl=Le(),Ll=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Pl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Il(n,t))}),n};_s.exports=Ll});var xs=z((Xd,Cs)=>{"use strict";var Nl=me(),Tl=Le(),Dl=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Tl(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Nl(n,t))}),n};Cs.exports=Dl});var js=z((Jd,vs)=>{"use strict";var Yr=me(),ql=Le(),Rs=Tt(),Ml=(r,e)=>{r=new ql(r,e);let t=new Yr("0.0.0");if(r.test(t)||(t=new Yr("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 c=new Yr(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!s||Rs(c,s))&&(s=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||Rs(t,s))&&(t=s)}return t&&r.test(t)?t:null};vs.exports=Ml});var Is=z((Qd,$s)=>{"use strict";var Fl=Le(),zl=(r,e)=>{try{return new Fl(r,e).range||"*"}catch{return null}};$s.exports=zl});var lr=z((Zd,Ts)=>{"use strict";var Ul=me(),Ns=Dt(),{ANY:Gl}=Ns,kl=Le(),Wl=Mt(),Ps=Tt(),Ls=ir(),Hl=or(),Vl=sr(),Bl=(r,e,t,n)=>{r=new Ul(r,n),e=new kl(e,n);let i,s,o,c,u;switch(t){case">":i=Ps,s=Hl,o=Ls,c=">",u=">=";break;case"<":i=Ls,s=Vl,o=Ps,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Wl(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(g=>{g.semver===Gl&&(g=new Ns(">=0.0.0")),l=l||g,b=b||g,i(g.semver,l.semver,n)?l=g:o(g.semver,b.semver,n)&&(b=g)}),l.operator===c||l.operator===u||(!b.operator||b.operator===c)&&s(r,b.semver))return!1;if(b.operator===u&&o(r,b.semver))return!1}return!0};Ts.exports=Bl});var qs=z((ep,Ds)=>{"use strict";var Yl=lr(),Kl=(r,e,t)=>Yl(r,e,">",t);Ds.exports=Kl});var Fs=z((tp,Ms)=>{"use strict";var Xl=lr(),Jl=(r,e,t)=>Xl(r,e,"<",t);Ms.exports=Jl});var Gs=z((rp,Us)=>{"use strict";var zs=Le(),Ql=(r,e,t)=>(r=new zs(r,t),e=new zs(e,t),r.intersects(e,t));Us.exports=Ql});var Ws=z((np,ks)=>{"use strict";var Zl=Mt(),eu=Pe();ks.exports=(r,e,t)=>{let n=[],i=null,s=null,o=r.sort((h,l)=>eu(h,l,t));for(let h of o)Zl(h,e,t)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let c=[];for(let[h,l]of n)h===l?c.push(h):!l&&h===o[0]?c.push("*"):l?h===o[0]?c.push(`<=${l}`):c.push(`${h} - ${l}`):c.push(`>=${h}`);let u=c.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var Xs=z((ip,Ks)=>{"use strict";var Hs=Le(),Jr=Dt(),{ANY:Kr}=Jr,Xr=Mt(),Qr=Pe(),tu=(r,e,t={})=>{if(r===e)return!0;r=new Hs(r,t),e=new Hs(e,t);let n=!1;e:for(let i of r.set){for(let s of e.set){let o=nu(i,s,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ru=[new Jr(">=0.0.0-0")],Vs=[new Jr(">=0.0.0")],nu=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Kr){if(e.length===1&&e[0].semver===Kr)return!0;t.includePrerelease?r=ru:r=Vs}if(e.length===1&&e[0].semver===Kr){if(t.includePrerelease)return!0;e=Vs}let n=new Set,i,s;for(let g of r)g.operator===">"||g.operator===">="?i=Bs(i,g,t):g.operator==="<"||g.operator==="<="?s=Ys(s,g,t):n.add(g.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Qr(i.semver,s.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let g of n){if(i&&!Xr(g,String(i),t)||s&&!Xr(g,String(s),t))return null;for(let w of e)if(!Xr(g,String(w),t))return!1;return!0}let c,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 g of e){if(h=h||g.operator===">"||g.operator===">=",p=p||g.operator==="<"||g.operator==="<=",i){if(b&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===b.major&&g.semver.minor===b.minor&&g.semver.patch===b.patch&&(b=!1),g.operator===">"||g.operator===">="){if(c=Bs(i,g,t),c===g&&c!==i)return!1}else if(i.operator===">="&&!g.test(i.semver))return!1}if(s){if(l&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===l.major&&g.semver.minor===l.minor&&g.semver.patch===l.patch&&(l=!1),g.operator==="<"||g.operator==="<="){if(u=Ys(s,g,t),u===g&&u!==s)return!1}else if(s.operator==="<="&&!g.test(s.semver))return!1}if(!g.operator&&(s||i)&&o!==0)return!1}return!(i&&p&&!s&&o!==0||s&&h&&!i&&o!==0||b||l)},Bs=(r,e,t)=>{if(!r)return e;let n=Qr(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Ys=(r,e,t)=>{if(!r)return e;let n=Qr(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Ks.exports=tu});var ur=z((sp,Zs)=>{"use strict";var Zr=Ot(),Js=wt(),iu=me(),Qs=Dr(),su=Qe(),ou=Ai(),au=Si(),cu=Ri(),lu=$i(),uu=Pi(),fu=Ni(),du=Di(),pu=Mi(),hu=Pe(),mu=Gi(),gu=Wi(),yu=nr(),bu=Yi(),Eu=Xi(),wu=Tt(),Ou=ir(),Au=Fr(),_u=zr(),Su=sr(),Cu=or(),xu=Ur(),Ru=ss(),vu=as(),ju=Dt(),$u=Le(),Iu=Mt(),Pu=As(),Lu=Ss(),Nu=xs(),Tu=js(),Du=Is(),qu=lr(),Mu=qs(),Fu=Fs(),zu=Gs(),Uu=Ws(),Gu=Xs();Zs.exports={parse:su,valid:ou,clean:au,inc:cu,diff:lu,major:uu,minor:fu,patch:du,prerelease:pu,compare:hu,rcompare:mu,compareLoose:gu,compareBuild:yu,sort:bu,rsort:Eu,gt:wu,lt:Ou,eq:Au,neq:_u,gte:Su,lte:Cu,cmp:xu,coerce:Ru,truncate:vu,Comparator:ju,Range:$u,satisfies:Iu,toComparators:Pu,maxSatisfying:Lu,minSatisfying:Nu,minVersion:Tu,validRange:Du,outside:qu,gtr:Mu,ltr:Fu,intersects:zu,simplifyRange:Uu,subset:Gu,SemVer:iu,re:Zr.re,src:Zr.src,tokens:Zr.t,SEMVER_SPEC_VERSION:Js.SEMVER_SPEC_VERSION,RELEASE_TYPES:Js.RELEASE_TYPES,compareIdentifiers:Qs.compareIdentifiers,rcompareIdentifiers:Qs.rcompareIdentifiers}});var fr=Pt(ur(),1);import*as Ft from"node:process";try{let r=ti?.node;typeof r=="string"&&!fr.satisfies(Ft.version,r)&&K.warn(`
|
|
9
9
|
\u26A0\uFE0F Warning: failed to satisfy expected node version. Expected: "${r}", Current "${Ft.version}"
|
|
10
10
|
|
|
11
11
|
`),fr.major(Ft.version)===20&&K.info(Xt([Vn(Bn("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 ${Ft.version}.`,"",`Update Node.js: ${Lt("https://nodejs.org/en/download")}`]))}catch{}var Pa=Pt(Na(),1);import*as La from"node:path";import{notStrictEqual as pf,strictEqual as hf}from"assert";var ku={right:Yu,center:Ku},Wu=0,dr=1,Hu=2,pr=3,en=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(!Rt.has(t))throw te.eject_generator_outcome="unknown-generator",new Oe(`
|
|
124
124
|
\u274C Unknown generator "${t}". Ejectable generators: ${[...Rt].join(", ")}.
|
|
125
|
-
`);let i=Gf(),s=kf(i,t),{GENERATOR_VERSION:o}=await import("./chunks/
|
|
125
|
+
`);let i=Gf(),s=kf(i,t),{GENERATOR_VERSION:o}=await import("./chunks/B64RMZSV.js"),c=Ff(r.dir??"./generators"),u=s===void 0?H(c,`${t}.mjs`):H(c,t,"index.ts"),p=Fe(process.cwd(),u)||u;if(r.update){if(s===void 0){let A=be(H(i,"generators",`${t}.mjs`),"utf-8");Bf({name:t,asset:A,toolkitVersion:o,assetsDir:i,dir:c,target:u,printedTarget:p})}else Vf({name:t,files:s,toolkitVersion:o,assetsDir:i,dir:c,targetDir:H(c,t)});return}if(ye(u)&&!r.force)throw te.eject_generator_outcome="already-exists",new Oe(`
|
|
126
126
|
\u274C ${p} already exists. Use --update to merge the newer version in, or --force to overwrite.
|
|
127
127
|
`);jn(Ht(u),{recursive:!0});let h=s===void 0?[be(H(i,"generators",`${t}.mjs`),"utf-8")]:s.map(A=>be(H(i,"generators",t,A),"utf-8"));s===void 0?ae(u,h[0],"utf-8"):s.forEach((A,G)=>{ae(H(c,t,A),h[G],"utf-8")});let l=ra("client-generators",i),b=ra(`${t}-generator`,i);$n(c,Pn(c));let g=`./${Fe(e.configPath===void 0?process.cwd():Zo(Ht(e.configPath)),Zo(u)).split("\\").join("/")}`,w=Ln({[Ce]:o}),d=h.some(A=>A.includes(`from "${xn}"`)||A.includes(`from '${xn}'`)),S=Hf(e.configPath,t,g),N=s===void 0?p:Fe(process.cwd(),H(c,t))+"/";K.info(`Ejected the "${t}" generator to ${N}.
|
|
128
128
|
`+(w==="added"?`Added ${Ce} to devDependencies (the ejected file imports its toolkit) \u2014 run your installer.
|
|
@@ -146,13 +146,13 @@ Reference: ${Uf}
|
|
|
146
146
|
- ${o.message}`)}if(r["lint-config"]==="off"||n.document===void 0)return n;let i=await Qn({config:n,severity:r["lint-config"]||"warn"}),s=Xn(i);if(Jn(i,{maxProblems:r["max-problems"],totals:s,version:e,command:"check-config"}),nd(s,Ea(r)),s.errors>0)throw new Kt("Config check failed.");return n}function nd(r,e){r.errors>0?K.error(`\u274C Your config has ${r.errors} ${Pr("error",r.errors)}.
|
|
147
147
|
`):r.warnings>0?K.warn(`\u26A0\uFE0F Your config has ${r.warnings} ${Pr("warning",r.warnings)}.
|
|
148
148
|
`):e==="check-config"&&K.info(Bt(`\u2705 Your config is valid.
|
|
149
|
-
`))}import{execSync as id}from"node:child_process";import*as $t from"node:fs";import{existsSync as sd,writeFileSync as od,readFileSync as _a}from"node:fs";import*as Sa from"node:os";import{tmpdir as Ca}from"node:os";import{dirname as Aa,join as $r}from"node:path";async function Oa(r=Jt){try{return await vr(ii,{timeout:r}),!0}catch{return!1}}var jr="***";async function xa({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:c,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:g,eject_generator:w,bundle:d}){try{if(!e||!await Oa(1e3))return;let{_:[N],$0:A,...G}=e,{RedoclyOAuthClient:W,getReuniteUrl:xe}=await import("./chunks/AB2EMYEK.js"),Ye=new W(Ie),Ke=xe(r,G.residency),Xe=await Ye.isAuthorized(Ke),V=hd();V||(V=`ann_${li()}`,pd(V));let We=Yt(i),$=[{id:N,object:"command",uri:`urn:redocly:cli:command:${N}`,logged_in:Xe?"yes":"no",command:N,...ud(G,process.argv.slice(2)),node_version:process.version,npm_version:dd(),version:Ie,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:We==="arazzo1"&&c?.length?JSON.stringify(c):void 0,respect_source_description_types:We==="arazzo1"&&u?.length?JSON.stringify(u):void 0,respect_criterion_object_types:We==="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:g?.generate_client_builtin_generators?.length?JSON.stringify(g.generate_client_builtin_generators):void 0,generate_client_custom_generators_count:g?.generate_client_custom_generators_count,generate_client_toolkit_imports:g?.generate_client_toolkit_imports?.length?JSON.stringify(g.generate_client_toolkit_imports):void 0,generate_client_error_category:g?.generate_client_error_category,generate_client_ejected_generators:g?.generate_client_ejected_generators?.length?JSON.stringify(g.generate_client_ejected_generators):void 0,generate_client_composed_apis_count:g?.generate_client_composed_apis_count,eject_generator_action:w?.eject_generator_action,eject_generator_name:w?.eject_generator_name,eject_generator_outcome:w?.eject_generator_outcome,eject_generator_conflicts:w?.eject_generator_conflicts,eject_generator_from_version:w?.eject_generator_from_version,eject_generator_to_version:w?.eject_generator_to_version,bundle_overlays_count:d?.bundle_overlays_count}],_=ci.mapToCloudEvent({type:"com.redocly.command.ran",source:"urn:redocly:cli",origin:"redocly-cli",env:"production",osPlatform:Sa.platform(),actor:{id:V,object:"user",uri:""},category:"product",data:$}),{otelTelemetry:L}=await import("./chunks/
|
|
149
|
+
`))}import{execSync as id}from"node:child_process";import*as $t from"node:fs";import{existsSync as sd,writeFileSync as od,readFileSync as _a}from"node:fs";import*as Sa from"node:os";import{tmpdir as Ca}from"node:os";import{dirname as Aa,join as $r}from"node:path";async function Oa(r=Jt){try{return await vr(ii,{timeout:r}),!0}catch{return!1}}var jr="***";async function xa({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:c,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:g,eject_generator:w,bundle:d}){try{if(!e||!await Oa(1e3))return;let{_:[N],$0:A,...G}=e,{RedoclyOAuthClient:W,getReuniteUrl:xe}=await import("./chunks/AB2EMYEK.js"),Ye=new W(Ie),Ke=xe(r,G.residency),Xe=await Ye.isAuthorized(Ke),V=hd();V||(V=`ann_${li()}`,pd(V));let We=Yt(i),$=[{id:N,object:"command",uri:`urn:redocly:cli:command:${N}`,logged_in:Xe?"yes":"no",command:N,...ud(G,process.argv.slice(2)),node_version:process.version,npm_version:dd(),version:Ie,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:We==="arazzo1"&&c?.length?JSON.stringify(c):void 0,respect_source_description_types:We==="arazzo1"&&u?.length?JSON.stringify(u):void 0,respect_criterion_object_types:We==="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:g?.generate_client_builtin_generators?.length?JSON.stringify(g.generate_client_builtin_generators):void 0,generate_client_custom_generators_count:g?.generate_client_custom_generators_count,generate_client_toolkit_imports:g?.generate_client_toolkit_imports?.length?JSON.stringify(g.generate_client_toolkit_imports):void 0,generate_client_error_category:g?.generate_client_error_category,generate_client_ejected_generators:g?.generate_client_ejected_generators?.length?JSON.stringify(g.generate_client_ejected_generators):void 0,generate_client_composed_apis_count:g?.generate_client_composed_apis_count,eject_generator_action:w?.eject_generator_action,eject_generator_name:w?.eject_generator_name,eject_generator_outcome:w?.eject_generator_outcome,eject_generator_conflicts:w?.eject_generator_conflicts,eject_generator_from_version:w?.eject_generator_from_version,eject_generator_to_version:w?.eject_generator_to_version,bundle_overlays_count:d?.bundle_overlays_count}],_=ci.mapToCloudEvent({type:"com.redocly.command.ran",source:"urn:redocly:cli",origin:"redocly-cli",env:"production",osPlatform:Sa.platform(),actor:{id:V,object:"user",uri:""},category:"product",data:$}),{otelTelemetry:L}=await import("./chunks/VE45GKNY.js");L.send(_)}catch{}}function Ra(r,e){for(let t of r.sourceDescriptions??[])t.type&&e.add(t.type)}function va(r,e){for(let t of r.workflows??[]){jt(t.successActions,e),jt(t.failureActions,e);for(let n of t.steps??[])ja(n.successCriteria,e),jt(n.onSuccess,e),jt(n.onFailure,e)}jt(Object.values(r.components?.successActions??{}),e),jt(Object.values(r.components?.failureActions??{}),e)}function jt(r,e){for(let t of r??[])ja(t.criteria,e)}function ja(r,e){for(let t of r??[]){let n=ad(t);n&&e.add(n)}}function ad(r){let e=r.type;return typeof e=="string"?e:e?.type||(r.condition?"simple":void 0)}function $a(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 c=s.type==="http"?s.scheme:s.type;c&&e.add(c)}let o=i.schemeName;o&&e.add(o)}}}function cd(r){return $t.existsSync(r)&&$t.statSync(r).isFile()}function ld(r){return $t.existsSync(r)&&$t.statSync(r).isDirectory()}function Mn(r){return r&&(kn(r)?r.split("://")[0]+"://url":cd(r)?r.replace(/.+\.([^.]+)$/,(e,t)=>"file-"+t):ld(r)?"folder":r)}function Fn(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 Ia(r,e){let t={};for(let[n,i]of Object.entries(r))e.includes(n)?t[n]=jr:we(i)?t[n]=Ia(i,e):t[n]=i;return t}function zn(r,e,t=[]){if(Array.isArray(r))return r.forEach(n=>zn(n,e,t)),t;if(we(r))for(let[n,i]of Object.entries(r))e.includes(n)&&typeof i=="string"?t.push(i):(we(i)||Array.isArray(i))&&zn(i,e,t);return t}function ud(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]=jr,n=Fn(n,o,jr);else if(typeof o=="string"){let c=Mn(o);i[s]=c,n=Fn(n,o,c)}else if(Array.isArray(o)){i[s]=o.map(Mn);for(let c of o){let u=Mn(c);n.includes(c)&&(n=n.replaceAll(c,u))}}else if(we(o)){let c=zn(o,t);for(let u of c)n=Fn(n,u,jr);i[s]=Ia(o,t)}else i[s]=o;return{arguments:JSON.stringify(i),raw_input:n}}var fd=process.platform==="win32"?$r(Aa(process.execPath),"node_modules","npm","package.json"):$r(Aa(process.execPath),"..","lib","node_modules","npm","package.json");function dd(){try{return JSON.parse(_a(fd,"utf8")).version}catch{}try{return id("npm -v",{stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return"unknown"}}var pd=r=>{if(!(process.env.CI||!r))try{let t=$r(Ca(),Lr);od(t,r)}catch{}},hd=()=>{if(!process.env.CI)try{let e=$r(Ca(),Lr);return sd(e)?_a(e).toString().trim():void 0}catch{return}};function J(r,e={}){return async t=>{let n=performance.now(),i=2,s,o="unknown",c,u,p,h=new Set,l=new Set,b=new Set,g=({parsed:A,source:G})=>{if(o="unknown",c=void 0,u=void 0,G?.absoluteRef&&Hn(G.absoluteRef)){o="graphql";return}try{o=Yn(A)}catch{o="unsupported"}we(A)&&(c=A?.openapi?"openapi":A?.swagger?"swagger":A?.asyncapi?"asyncapi":A?.arazzo?"arazzo":A?.overlay?"overlay":void 0,c&&(u=A[c]),Yt(o)==="arazzo1"&&($a(A,h),Ra(A,l),va(A,b)))},w=new Set,d=new Set,S=new Set,N=A=>{for(let G of A)G.ignored?S.add(G.ruleId):G.severity==="error"?w.add(G.ruleId):G.severity==="warn"&&d.add(G.ruleId)};try{if(t.config&&!Gn(t.config))throw new Oe("Please provide a valid path to the configuration file.");p=await wa(t,Ie,e.plugins),s=p.resolvedConfig.telemetry,i=1,typeof r=="function"&&await r({argv:t,config:p,version:Ie,collectSpecData:g,collectResults:N}),i=0}catch(A){A instanceof Kt||(A instanceof Oe?K.error(A.message+`
|
|
150
150
|
|
|
151
151
|
`):(K.error(`An unexpected error occurred. This is likely a bug that should be reported.
|
|
152
152
|
`),K.error(A instanceof Error?A.stack||A.message:String(A)),K.error(`
|
|
153
153
|
`)))}finally{if(process.env.REDOCLY_TELEMETRY!=="off"&&s!=="off"){let A=Math.round(performance.now()-n);await xa({config:p,argv:t,exit_code:i,execution_time:A,spec_version:o,spec_keyword:c,spec_full_version:u,respect_x_security_auth_types:[...h],respect_source_description_types:[...l],respect_criterion_object_types:[...b],lint_rules_with_errors:[...w],lint_rules_with_warnings:[...d],lint_rules_with_ignored_problems:[...S],generate_client:ri,eject_generator:te,bundle:ai})}process.once("beforeExit",()=>{process.exit(i)})}}}Pa.config({path:La.resolve(process.cwd(),"./.env")});ya();Qo(on(process.argv)).version(!1).option("version",{type:"boolean",description:"Show version number.",global:!1}).middleware(r=>{r.version&&r._.length===0&&(K.output(`${Ie}
|
|
154
|
-
`),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/LVGVWPDB.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/SXBAAS4M.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/XJTGJYVS.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/37WWN4MA.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/3C6UUCEW.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/RGU6OZYB.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:ba},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/YPYZCXVX.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/2XK7ML3U.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/S6NFOZ34.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:Zn},"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/6EGJEFXO.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/VXLODB3S.js");J(e)(r)}).command("logout","Clear your stored credentials.",r=>r,async r=>{let{handleLogout:e}=await import("./chunks/NBI4EQPC.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/VGM6NIVC.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/LNYTDBAU.js");process.stdout.write(await t({operation:e.operation,input:process.stdin,version:Ie}))}).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:ni,default:"enterprise"},port:{alias:"p",type:"number",description:"Preview port.",default:4e3,coerce:st("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"))&&K.error(`Option --source-dir is deprecated and will be removed soon. Use --project-dir instead.
|
|
155
|
-
`);let{previewProject:e}=await import("./chunks/SYWAPWW7.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/QAUXTHD6.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/LRLGVYCG.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/TBZEEKTV.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:pa},severity:{describe:"Severity of the check.",type:"string"},"max-steps":{describe:"Maximum number of steps to run (default: 2000).",type:"number",default:2e3,coerce:st("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:st("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:st("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/WEOCCL26.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:st("ai-concurrency",!0)},"max-workflows":{describe:"Most workflows the AI may design with --with-ai.",type:"number",default:10,coerce:st("max-workflows",!0)}}),async r=>{let{handleGenerateArazzo:e}=await import("./chunks/5PG3ST2N.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/PXCT44HL.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 (${[...Rt].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(fa)(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"},"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:st("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/OP7NIAI7.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/2OVI7BIW.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/RUIEI3YV.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/3JYY42DL.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/GVQMC2WB.js");J(e)(r)}).completion("completion","Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([ga]).strict().argv;
|
|
154
|
+
`),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/LVGVWPDB.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/SXBAAS4M.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/XJTGJYVS.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/37WWN4MA.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/3C6UUCEW.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/RGU6OZYB.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:ba},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/YPYZCXVX.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/2XK7ML3U.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/S6NFOZ34.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:Zn},"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/6EGJEFXO.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/VXLODB3S.js");J(e)(r)}).command("logout","Clear your stored credentials.",r=>r,async r=>{let{handleLogout:e}=await import("./chunks/NBI4EQPC.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/SOI7RTB4.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/LNYTDBAU.js");process.stdout.write(await t({operation:e.operation,input:process.stdin,version:Ie}))}).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:ni,default:"enterprise"},port:{alias:"p",type:"number",description:"Preview port.",default:4e3,coerce:st("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"))&&K.error(`Option --source-dir is deprecated and will be removed soon. Use --project-dir instead.
|
|
155
|
+
`);let{previewProject:e}=await import("./chunks/SYWAPWW7.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/5S5OMDQZ.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/LRLGVYCG.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/TBZEEKTV.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:pa},severity:{describe:"Severity of the check.",type:"string"},"max-steps":{describe:"Maximum number of steps to run (default: 2000).",type:"number",default:2e3,coerce:st("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:st("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:st("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/WEOCCL26.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:st("ai-concurrency",!0)},"max-workflows":{describe:"Most workflows the AI may design with --with-ai.",type:"number",default:10,coerce:st("max-workflows",!0)}}),async r=>{let{handleGenerateArazzo:e}=await import("./chunks/5PG3ST2N.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/O7F2NBMC.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 (${[...Rt].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(fa)(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"},"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:st("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/OP7NIAI7.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/2OVI7BIW.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/RUIEI3YV.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/3JYY42DL.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/GVQMC2WB.js");J(e)(r)}).completion("completion","Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([ga]).strict().argv;
|
|
156
156
|
/*! Bundled license information:
|
|
157
157
|
|
|
158
158
|
yargs-parser/build/lib/string-utils.js:
|
package/package.json
CHANGED
package/lib/chunks/VGM6NIVC.js
DELETED
|
@@ -1,8 +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{h as l}from"./5NOJ76EP.js";import"./LRUXN6H5.js";import{ia as p,oa as i}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as j}from"node:child_process";import{existsSync as y}from"node:fs";import*as c from"node:path";function d(e,t,o){return`${e}/api/orgs/${encodeURIComponent(t)}/projects/${encodeURIComponent(o)}/git`}function m(e,t){let o=`credential.${e}/.helper`,r=P("redocly")?"redocly":`npx --yes @redocly/cli@${t}`;return[`${o}=`,`${o}=!REDOCLY_SUPPRESS_UPDATE_NOTICE=true ${r} project git-credentials`]}async function a(e){return new Promise((t,o)=>{let r=j("git",e,{stdio:"inherit",env:{...process.env,GIT_TERMINAL_PROMPT:"0"}});r.on("error",n=>o(x(n))),r.on("close",n=>t(n??1))})}function P(e){let t=process.platform==="win32"?[".cmd",".exe"]:[""];return(process.env.PATH??"").split(c.delimiter).some(o=>o&&t.some(r=>y(c.join(o,e+r))))}function x(e){return e.code==="ENOENT"?new i("git is not installed or not on PATH."):e}async function S({argv:e,config:t,version:o}){let[r,n,...g]=e.project.split("/");if(!r||!n||g.length>0)throw new i(`Specify the project as \`<organization>/<project>\`, for example \`acme/developer-portal\`. Got: \`${e.project}\`.`);let s=l(t,e.residency),f=d(s,r,n),u=m(s,o);if(p.info(`Cloning ${r}/${n} from ${s}
|
|
8
|
-
`),await a(["clone",...u.flatMap(C=>["--config",C]),f,e.directory??n])!==0)throw new i("git clone failed.")}export{S as handleProjectClone};
|