@redocly/cli 2.58.2 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/THIRD_PARTY_NOTICES +5 -5
  2. package/lib/chunks/{RW4XUFPU.js → 2F2YM4RD.js} +1 -1
  3. package/lib/chunks/{4R5JMLPR.js → 3MPID4OC.js} +1 -1
  4. package/lib/chunks/{DTH2KLMU.js → 4HEJ6GQB.js} +2 -2
  5. package/lib/chunks/{ICTI23CL.js → 4WAQNM63.js} +2 -2
  6. package/lib/chunks/{5TPCSTMC.js → 4XDEFJCF.js} +1 -1
  7. package/lib/chunks/{MVXFJBMU.js → 52MW7SRF.js} +1 -1
  8. package/lib/chunks/{BBX56KPO.js → 72ZX5WSN.js} +1 -1
  9. package/lib/chunks/{BNNOQCQA.js → 7C244K4X.js} +1 -1
  10. package/lib/chunks/{QK7R3ZTY.js → 7ED6ZTTH.js} +1 -1
  11. package/lib/chunks/{DEZGXWTS.js → ACVFQG4D.js} +1 -1
  12. package/lib/chunks/AP2GA7RS.js +199 -0
  13. package/lib/chunks/{NJRBU6GW.js → B5GZ7KU2.js} +1 -1
  14. package/lib/chunks/{PJD3MHLL.js → BHUCIWQF.js} +1 -1
  15. package/lib/chunks/{EXXYMXIB.js → BZBFESBB.js} +1 -1
  16. package/lib/chunks/{NMS2HUB3.js → CAJM6OL3.js} +1 -1
  17. package/lib/chunks/{4Y6NCJUT.js → CEPC3LL4.js} +1 -1
  18. package/lib/chunks/{5AUGOZUX.js → CKZ35ARL.js} +1 -1
  19. package/lib/chunks/DAAOXDSB.js +11 -0
  20. package/lib/chunks/{YURX7H3N.js → DJWI7SF7.js} +1 -1
  21. package/lib/chunks/{EPO2USQL.js → DJXBNZCO.js} +1 -1
  22. package/lib/chunks/{AW5K6TIG.js → DTMC35L3.js} +1 -1
  23. package/lib/chunks/{263OU3EK.js → EXCIOEBN.js} +1 -1
  24. package/lib/chunks/{OJPXHGKU.js → G4ZIYGF5.js} +1 -1
  25. package/lib/chunks/{WJTV2BWV.js → GC26XZYZ.js} +1 -1
  26. package/lib/chunks/{R2IHROCG.js → GD6WKI2C.js} +1 -1
  27. package/lib/chunks/{PFZ3YKKV.js → GHPOEF7A.js} +1 -1
  28. package/lib/chunks/GYKYFMW3.js +169 -0
  29. package/lib/chunks/{XTW63JDM.js → HFGKPU2P.js} +1 -1
  30. package/lib/chunks/{MGVCQC3T.js → HNKSHJLU.js} +1 -1
  31. package/lib/chunks/HQUG6XPO.js +3156 -0
  32. package/lib/chunks/{UK55KIZM.js → HSHAARAO.js} +1 -1
  33. package/lib/chunks/{JIN2S34E.js → HVO5F4MP.js} +1 -1
  34. package/lib/chunks/{6VBDC3HP.js → HZZP3BZQ.js} +1 -1
  35. package/lib/chunks/{KIUUH6YY.js → IAN3UOJT.js} +1 -1
  36. package/lib/chunks/{MW2B5X5N.js → IJ43XWPG.js} +1 -1
  37. package/lib/chunks/{6XEDECSL.js → J4NCFMOR.js} +1 -1
  38. package/lib/chunks/{RAYBJJ43.js → LF35KJ5M.js} +1 -1
  39. package/lib/chunks/{2CAHRLJ3.js → MCJLOALK.js} +1 -1
  40. package/lib/chunks/{ZIIE7LXR.js → MJYI42E6.js} +1 -1
  41. package/lib/chunks/{XIO2RWJ6.js → N4AA4DRD.js} +1 -1
  42. package/lib/chunks/{WTIPGXGP.js → NADFEIIN.js} +1 -1
  43. package/lib/chunks/{4WEATF5W.js → O4RAFGZA.js} +1 -1
  44. package/lib/chunks/{QQZJ42HN.js → O5WCU6SC.js} +1 -1
  45. package/lib/chunks/{IMRV4QDD.js → OKTLNLO3.js} +1 -1
  46. package/lib/chunks/{URZNERQS.js → PGZIUA7J.js} +1 -1
  47. package/lib/chunks/{3WFT3I7F.js → PKYNMOKV.js} +1 -1
  48. package/lib/chunks/{7JYJB6ME.js → Q526MFO3.js} +1 -1
  49. package/lib/chunks/{7WMNFTJC.js → QGUZ4KFX.js} +1 -1
  50. package/lib/chunks/{CMHJY4T2.js → RDMFHSDB.js} +1 -1
  51. package/lib/chunks/S27TE7KZ.js +8 -0
  52. package/lib/chunks/{34J7T7MH.js → S46ENZHC.js} +1 -1
  53. package/lib/chunks/{LRFPMBTV.js → S5G22GL5.js} +1 -1
  54. package/lib/chunks/{RVRYLTME.js → SDNESV5E.js} +1 -1
  55. package/lib/chunks/{LBQ2QKCY.js → SL6UQOKE.js} +1 -1
  56. package/lib/chunks/{2H2LESBI.js → SNR3DAVL.js} +1 -1
  57. package/lib/chunks/{LHKIMOHX.js → SXOXAG7R.js} +2 -2
  58. package/lib/chunks/{DD3JYFIR.js → UPHYYNN3.js} +3 -3
  59. package/lib/chunks/{Z7JI42WA.js → UXSV2J6V.js} +1 -1
  60. package/lib/chunks/{YZRKJF2V.js → V46KUEYR.js} +1 -1
  61. package/lib/chunks/VCV3FKMW.js +7 -0
  62. package/lib/chunks/{CTTC32GG.js → W3K4YAMS.js} +1 -1
  63. package/lib/chunks/{SQUNMRDS.js → W7VT3BOM.js} +1 -1
  64. package/lib/chunks/WFIIXHF3.js +9 -0
  65. package/lib/chunks/{MSKEZAFV.js → XHDOW23C.js} +1 -1
  66. package/lib/chunks/{O3UAIIFE.js → XQA4EEZA.js} +1 -1
  67. package/lib/chunks/{W3WAOVRR.js → XZKUPNLZ.js} +1 -1
  68. package/lib/chunks/{PJXZKT3O.js → YNPWONFN.js} +1 -1
  69. package/lib/chunks/{3STDF6WW.js → ZJAFKITR.js} +1 -1
  70. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  71. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  72. package/lib/eject-assets/generators/cli/index.ts +2 -2
  73. package/lib/eject-assets/generators/cli/render.ts +1 -1
  74. package/lib/eject-assets/generators/go/client.ts +1 -1
  75. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  76. package/lib/eject-assets/generators/go/index.ts +2 -2
  77. package/lib/eject-assets/generators/go/models.ts +1 -1
  78. package/lib/eject-assets/generators/go/naming.ts +1 -1
  79. package/lib/eject-assets/generators/go/operations.ts +1 -1
  80. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  81. package/lib/eject-assets/generators/go/types.ts +1 -1
  82. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  83. package/lib/eject-assets/generators/mock/index.ts +2 -2
  84. package/lib/eject-assets/generators/mock/render.ts +1 -1
  85. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  86. package/lib/eject-assets/generators/mock/values.ts +1 -1
  87. package/lib/eject-assets/generators/php/client.ts +1 -1
  88. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  89. package/lib/eject-assets/generators/php/index.ts +2 -2
  90. package/lib/eject-assets/generators/php/models.ts +1 -1
  91. package/lib/eject-assets/generators/php/naming.ts +1 -1
  92. package/lib/eject-assets/generators/php/operations.ts +1 -1
  93. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  94. package/lib/eject-assets/generators/php/types.ts +1 -1
  95. package/lib/eject-assets/generators/python/client.ts +1 -1
  96. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  97. package/lib/eject-assets/generators/python/index.ts +2 -2
  98. package/lib/eject-assets/generators/python/models.ts +1 -1
  99. package/lib/eject-assets/generators/python/naming.ts +1 -1
  100. package/lib/eject-assets/generators/python/operations.ts +1 -1
  101. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  102. package/lib/eject-assets/generators/python/types.ts +1 -1
  103. package/lib/eject-assets/generators/swr/index.ts +2 -2
  104. package/lib/eject-assets/generators/swr/render.ts +1 -1
  105. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  106. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  107. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  108. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  109. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  110. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  111. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  112. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  113. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  114. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  115. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  116. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  117. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  118. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  119. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  120. package/lib/eject-assets/generators/zod/index.ts +2 -2
  121. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  122. package/lib/eject-assets/skills/php-generator/SKILL.md +1 -1
  123. package/lib/eject-assets/skills/zod-generator/SKILL.md +1 -1
  124. package/lib/index.js +6 -5
  125. package/package.json +1 -1
  126. package/lib/chunks/4U5QHDPF.js +0 -8
  127. package/lib/chunks/H4NHEW6K.js +0 -9
  128. package/lib/chunks/JD3HIQIK.js +0 -193
  129. package/lib/chunks/M7T6N7AK.js +0 -11
  130. package/lib/chunks/PI42YPSD.js +0 -7
  131. package/lib/chunks/Q4ESEW3O.js +0 -160
  132. package/lib/chunks/SQYOXXOB.js +0 -3155
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- var __filename = __fileURLToPath(import.meta.url);
6
- var __dirname = __pathDirname(__filename);
7
- import{a as F,b as ae,c as me,d as pe,e as K}from"./PI42YPSD.js";import{a as ce,b as fe}from"./64G5RPLP.js";import{f as oe,g as x,h as ie,i as se,l as T,m as h,n as re}from"./ZIIE7LXR.js";import{R as Z,Z as ee,_ as te,aa as u,b as U,c as I,d as O,ga as N,h as L,ia as ne,ma as b,o as d,r as S}from"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as Me from"node:fs";import{performance as We}from"perf_hooks";import*as ve from"node:fs";import*as G from"node:path";import*as le from"node:path";function A(e,t,n={}){pe(e,i=>{if(S(i)&&K(i.$ref))o(i,"$ref");else if(I(i.discriminator)&&I(i.discriminator.mapping)){let{mapping:s}=i.discriminator;for(let m of Object.keys(s)){let a=s[m];typeof a=="string"&&K(a)&&o(i.discriminator.mapping,m)}}});function o(i,s){let m=i[s].split("/"),a=m.pop(),p=m[2],r=n[p];if(!r||!r[a])return;let c=d(le.relative(t,r[a].filename));c.startsWith(".")||(c="./"+c),i[s]=c}}import*as Q from"node:path";import*as ye from"node:path";function E(e,t,n){return ye.join(e,t)+`.${n}`}var he=["schemas","messages","securitySchemes","parameters","correlationIds","messageTraits","operationTraits","serverBindings","channelBindings","operationBindings","messageBindings"];var Ae=["schemas","messages","securitySchemes","servers","serverVariables","parameters","replies","replyAddresses","correlationIds","messageTraits","operationTraits","tags","externalDocs","serverBindings","channelBindings","operationBindings","messageBindings"];function Y(e,t){return(t==="async2"?he:Ae).filter(o=>o in e)}function de({asyncapi:e,asyncapiDir:t,componentsFiles:n,ext:o,specVersion:i}){let s=e.components;if(!s)return;let m=Q.join(t,F),a=Y(s,i);for(let p of a){let r=Q.join(m,p);for(let c of Object.keys(s[p]||{})){let y=E(r,c,o),f=[];p==="schemas"&&(f=(s[p]?.[c]?.allOf||[]).map(({$ref:l})=>l).filter(L)),n[p]=n[p]||{},n[p][c]={inherits:f,filename:y}}}}import*as ue from"node:fs";import*as w from"node:path";import*as M from"node:path";function g(e,t,n){let o=M.resolve(e),i=M.resolve(t);if(i!==o&&!i.startsWith(o+M.sep))throw new b(`Refusing to write "${n}" outside the output directory.`)}import*as P from"node:fs";import*as ge from"node:path";function v(e,t,n){if(!P.existsSync(e)||!P.statSync(e).isDirectory())return;let o=P.readdirSync(e);for(let i of o){let s=ge.join(e,i);P.statSync(s).isDirectory()?v(s,t,n):t(s,e,n)}}function $(e,t,n){if(!Z(e))return;let o=T(e);A(o,t,n),h(o,e)}function Ce({channels:e,asyncapiDir:t,outDir:n,componentsFiles:o,pathSeparator:i,ext:s}){let m={};if(!e)return m;ue.mkdirSync(n,{recursive:!0});for(let a of Object.keys(e)){let p=`${w.join(n,x(a,i))}.${s}`,r=e[a];S(r)||(g(t,p,a),m[a]=p,A(r,w.dirname(p),o),h(r,p),e[a]={$ref:d(w.relative(t,p))},v(n,$,o))}return m}import*as De from"node:fs";import*as R from"node:path";import*as Oe from"node:fs";function j(e){return e!=="securitySchemes"}function V(e,t){j(t)&&Oe.mkdirSync(e,{recursive:!0})}import*as Se from"node:fs";function H(e,t){return Se.existsSync(e)&&!U(T(e),t)}import*as Ne from"node:path";function k(e,t,n){if(!(!I(e)&&!Array.isArray(e))){if(Array.isArray(e)){for(let o of e)k(o,t,n);return}for(let o of Object.keys(e)){let i=e[o];if(o==="$ref"&&typeof i=="string"&&i.startsWith("#/channels/")){let s=i.slice(11),m=s.indexOf("/"),a=m===-1?s:s.slice(0,m),p=m===-1?"":s.slice(m),r=n[a];if(r){let c=d(Ne.relative(t,r));e[o]=p?`${c}#${p}`:c}}else k(i,t,n)}}}function Fe(e,t){let n=e.components;n&&(O(n[t])&&delete n[t],O(n)&&delete e.components)}function xe({asyncapi:e,asyncapiDir:t,componentsFiles:n,channelsFiles:o,ext:i,specVersion:s}){let m=e.components;if(m){let r=function(c){let y=R.join(a,c);V(y,c);for(let f of Object.keys(m?.[c]||{})){let l=E(y,f,i);g(t,l,f);let C=m?.[c]?.[f];A(C,R.dirname(l),n),k(C,R.dirname(l),o),H(l,C)?N.warn(`warning: conflict for ${f} - file already exists with different content: ${u(l)} ... Skip.
8
- `):h(C,l),delete m?.[c]?.[f]}Fe(e,c)},a=R.join(t,F);De.mkdirSync(a,{recursive:!0}),Y(m,s).forEach(r)}}import*as Ee from"node:fs";import*as _ from"node:path";function Pe({operations:e,asyncapiDir:t,outDir:n,componentsFiles:o,channelsFiles:i,pathSeparator:s,ext:m}){if(e){Ee.mkdirSync(n,{recursive:!0});for(let a of Object.keys(e)){let p=`${_.join(n,x(a,s))}.${m}`,r=e[a];S(r)||(g(t,p,a),A(r,_.dirname(p),o),k(r,_.dirname(p),i),h(r,p),e[a]={$ref:d(_.relative(t,p))},v(n,$,o))}}}function _e({asyncapi:e,asyncapiDir:t,pathSeparator:n,ext:o,specVersion:i}){ve.mkdirSync(t,{recursive:!0});let s={};de({asyncapi:e,asyncapiDir:t,componentsFiles:s,ext:o,specVersion:i});let m=e.channels,a=m?Ce({channels:m,asyncapiDir:t,outDir:G.join(t,ae),componentsFiles:s,pathSeparator:n,ext:o}):{};xe({asyncapi:e,asyncapiDir:t,componentsFiles:s,channelsFiles:a,ext:o,specVersion:i}),i==="async3"&&e.operations&&Pe({operations:e.operations,asyncapiDir:t,outDir:G.join(t,me),componentsFiles:s,channelsFiles:a,pathSeparator:n,ext:o}),A(e,t,s),h(e,G.join(t,`asyncapi.${o}`))}import*as Be from"node:fs";import*as J from"node:path";import*as ke from"node:fs";import*as B from"node:path";import*as q from"node:path";function be(e){return q.basename(e,q.extname(e))}function Te(e){return e?fe.filter(t=>j(t)&&Object.keys(e).includes(t)):[]}function $e(e,t,n,o,i){let s=[];n==="schemas"&&(s=(e?.[n]?.[o]?.allOf||[]).map(({$ref:m})=>m).filter(L)),t[n]=t[n]||{},t[n][o]={inherits:s,filename:i}}import*as X from"node:path";function we(e,t,n,o){if(!e.discriminator)return;let i=`#/${F}/schemas/${t}`,s={};for(let[r,{inherits:c,filename:y}]of Object.entries(o))if(c.indexOf(i)>-1){let f=d(X.relative(X.dirname(n),y));s[r]=f.startsWith(".")?f:"./"+f}if(O(s))return;let m=e.properties[e.discriminator.propertyName],a=m&&m.enum,p=e.discriminator.mapping=e.discriminator.mapping||{};for(let r of Object.keys(s))a&&!a.includes(r)||(p[r]&&p[r]!==s[r]&&N.warn(`warning: explicit mapping overlaps with local mapping entry ${ee(r)} at ${u(n)}. Please check it.`),p[r]=s[r])}function je(e,t){e.components&&O(e.components[t])&&delete e.components[t],O(e.components)&&delete e.components}function Re(e,t,n,o){let{components:i}=e;if(i){let a=function(r){let c=B.join(s,r);for(let y of Object.keys(i?.[r]||{})){let f=E(c,y,o);g(t,f,y),$e(i,n,r,y,f)}},p=function(r){let c=B.join(s,r);V(c,r);for(let y of Object.keys(i?.[r]||{})){let f=E(c,y,o),l=i?.[r]?.[y];A(l,B.dirname(f),n),we(l,be(f),f,n.schemas||{}),H(f,l)?N.warn(`warning: conflict for ${y} - file already exists with different content: ${u(f)} ... Skip.
9
- `):h(l,f),j(r)&&delete e.components?.[r]?.[y]}je(e,r)},s=B.join(t,F);ke.mkdirSync(s,{recursive:!0});let m=Te(i);m.forEach(a),m.forEach(p)}}import*as W from"node:fs";import*as D from"node:path";function z(e,t,n,o,i,s="",m){if(e){W.mkdirSync(n,{recursive:!0});for(let a of Object.keys(e)){let p=`${D.join(n,x(a,i))}.${m}`,r=e[a];if(!S(r)){g(t,p,a);for(let c of ce){let y=r[c],f=y?.["x-code-samples"]||y?.["x-codeSamples"];if(!(!f||!Array.isArray(f)))for(let l of f){if(l.source&&l.source.$ref)continue;let C=D.join(t,"code_samples",ie(l.lang),s+x(a,i),c+se(l.lang));g(t,C,l.lang),W.mkdirSync(D.dirname(C),{recursive:!0}),W.writeFileSync(C,l.source),l.source={$ref:d(D.relative(n,C))}}}h(r,p),e[a]={$ref:d(D.relative(t,p))},v(n,$,o)}}}}function Ie(e,t,n,o){Be.mkdirSync(t,{recursive:!0});let i={};Re(e,t,i,o),z(e.paths,t,J.join(t,"paths"),i,n,void 0,o);let s=e.webhooks||e["x-webhooks"];z(s,t,J.join(t,"webhooks"),i,n,"webhook_",o),A(e,t,i),h(e,J.join(t,`openapi.${o}`))}async function Vn({argv:e,collectSpecData:t}){let n=We.now(),{api:o,outDir:i,separator:s}=e,m=re(o);if(!Me.existsSync(o))throw new b(`File ${u(o)} does not exist.`);let a=T(o);t?.({parsed:a});let p=ne(a);switch(p){case"async2":case"async3":_e({asyncapi:a,asyncapiDir:i,pathSeparator:s,ext:m,specVersion:p});break;case"oas3_0":case"oas3_1":case"oas3_2":Ie(a,i,s,m);break;case"oas2":throw new b("OpenAPI 2 is not supported by this command.");default:throw new b("File does not conform to the OpenAPI or AsyncAPI Specification. Version is not specified.")}N.info(`\u{1FA93} Document: ${u(o)} ${te("is successfully split")}
10
- and all related files are saved to the directory: ${u(i)}
11
- `),oe("split",n,o)}export{Vn as handleSplit,z as iteratePathItems};
@@ -1,7 +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{c as r}from"./JD3HIQIK.js";var s="components";var p="channels",i="operations";function e(o,n){if(r(o)){n(o);for(let t of Object.keys(o))e(o[t],n)}else if(Array.isArray(o))for(let t of o)e(t,n)}function a(o){return o.startsWith(`#/${s}/`)}export{s as a,p as b,i as c,e as d,a as e};