@redocly/cli 2.59.0 → 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 (126) hide show
  1. package/lib/chunks/{RSJYGTUN.js → 2F2YM4RD.js} +1 -1
  2. package/lib/chunks/{GYVNLXXF.js → 3MPID4OC.js} +1 -1
  3. package/lib/chunks/{V2MDYOAB.js → 4HEJ6GQB.js} +2 -2
  4. package/lib/chunks/{J56XVM43.js → 4WAQNM63.js} +2 -2
  5. package/lib/chunks/{YYL4GJWR.js → 4XDEFJCF.js} +1 -1
  6. package/lib/chunks/{IOYEFQOG.js → 52MW7SRF.js} +1 -1
  7. package/lib/chunks/{F2MGZZWG.js → 72ZX5WSN.js} +1 -1
  8. package/lib/chunks/{NFJLKOC3.js → 7C244K4X.js} +1 -1
  9. package/lib/chunks/{7YRZIM5N.js → 7ED6ZTTH.js} +1 -1
  10. package/lib/chunks/{IT53FBW3.js → ACVFQG4D.js} +1 -1
  11. package/lib/chunks/{PHV3T4WH.js → AP2GA7RS.js} +2 -2
  12. package/lib/chunks/{J3SQBSQT.js → B5GZ7KU2.js} +1 -1
  13. package/lib/chunks/{B7HK2FMY.js → BHUCIWQF.js} +1 -1
  14. package/lib/chunks/{DBWAOHZO.js → BZBFESBB.js} +1 -1
  15. package/lib/chunks/{MO5BUSRI.js → CAJM6OL3.js} +1 -1
  16. package/lib/chunks/{E2UY7KGT.js → CEPC3LL4.js} +1 -1
  17. package/lib/chunks/{QTOB5ERW.js → CKZ35ARL.js} +1 -1
  18. package/lib/chunks/DAAOXDSB.js +11 -0
  19. package/lib/chunks/{MBJ2NZOC.js → DJWI7SF7.js} +1 -1
  20. package/lib/chunks/{ZLNFQUIK.js → DJXBNZCO.js} +1 -1
  21. package/lib/chunks/{RTZAVLXW.js → DTMC35L3.js} +1 -1
  22. package/lib/chunks/{AX7QT4NM.js → EXCIOEBN.js} +1 -1
  23. package/lib/chunks/{AF5IHTRV.js → G4ZIYGF5.js} +1 -1
  24. package/lib/chunks/{O553F5PN.js → GC26XZYZ.js} +1 -1
  25. package/lib/chunks/{6IOZ5LPA.js → GD6WKI2C.js} +1 -1
  26. package/lib/chunks/{BEYYSLHN.js → GHPOEF7A.js} +1 -1
  27. package/lib/chunks/{42YAZTOS.js → GYKYFMW3.js} +1 -1
  28. package/lib/chunks/{DAQRGYND.js → HFGKPU2P.js} +1 -1
  29. package/lib/chunks/{BYWCQTSQ.js → HNKSHJLU.js} +1 -1
  30. package/lib/chunks/{P6JG7GU7.js → HQUG6XPO.js} +1 -1
  31. package/lib/chunks/{WK3QKCKY.js → HSHAARAO.js} +1 -1
  32. package/lib/chunks/{CUJVZNF3.js → HVO5F4MP.js} +1 -1
  33. package/lib/chunks/{RS64EP6M.js → HZZP3BZQ.js} +1 -1
  34. package/lib/chunks/{OFVQSSQQ.js → IAN3UOJT.js} +1 -1
  35. package/lib/chunks/{ECKYES2X.js → IJ43XWPG.js} +1 -1
  36. package/lib/chunks/{6367YNHA.js → J4NCFMOR.js} +1 -1
  37. package/lib/chunks/{BRJNFWLD.js → LF35KJ5M.js} +1 -1
  38. package/lib/chunks/{AVEIZUZG.js → MCJLOALK.js} +1 -1
  39. package/lib/chunks/{NSLUCFIM.js → MJYI42E6.js} +1 -1
  40. package/lib/chunks/{7QMY27YR.js → N4AA4DRD.js} +1 -1
  41. package/lib/chunks/{CSBPXWYJ.js → NADFEIIN.js} +1 -1
  42. package/lib/chunks/{J2APNZBG.js → O4RAFGZA.js} +1 -1
  43. package/lib/chunks/{UESEVDDS.js → O5WCU6SC.js} +1 -1
  44. package/lib/chunks/{US7OHDWQ.js → OKTLNLO3.js} +1 -1
  45. package/lib/chunks/{7FNYMCIP.js → PGZIUA7J.js} +1 -1
  46. package/lib/chunks/{KSTWCX27.js → PKYNMOKV.js} +1 -1
  47. package/lib/chunks/{NBRDOUIR.js → Q526MFO3.js} +1 -1
  48. package/lib/chunks/{OIPFI3RD.js → QGUZ4KFX.js} +1 -1
  49. package/lib/chunks/{G5TC4ZEC.js → RDMFHSDB.js} +1 -1
  50. package/lib/chunks/S27TE7KZ.js +8 -0
  51. package/lib/chunks/{7W4L5LRS.js → S46ENZHC.js} +1 -1
  52. package/lib/chunks/{UQSXY6X3.js → S5G22GL5.js} +1 -1
  53. package/lib/chunks/{QB6J3FNI.js → SDNESV5E.js} +1 -1
  54. package/lib/chunks/{FG62OWSV.js → SL6UQOKE.js} +1 -1
  55. package/lib/chunks/{PRAHH3RT.js → SNR3DAVL.js} +1 -1
  56. package/lib/chunks/{OIISHIPF.js → SXOXAG7R.js} +2 -2
  57. package/lib/chunks/{LHKSVCO3.js → UPHYYNN3.js} +3 -3
  58. package/lib/chunks/{NSK5BX5M.js → UXSV2J6V.js} +1 -1
  59. package/lib/chunks/{PCJ3RO4V.js → V46KUEYR.js} +1 -1
  60. package/lib/chunks/VCV3FKMW.js +7 -0
  61. package/lib/chunks/{GEYI6VH2.js → W3K4YAMS.js} +1 -1
  62. package/lib/chunks/{NC5GB4G5.js → W7VT3BOM.js} +1 -1
  63. package/lib/chunks/WFIIXHF3.js +9 -0
  64. package/lib/chunks/{NEOAISVJ.js → XHDOW23C.js} +1 -1
  65. package/lib/chunks/{IDDPOAAO.js → XQA4EEZA.js} +1 -1
  66. package/lib/chunks/{TJGR5OHF.js → XZKUPNLZ.js} +1 -1
  67. package/lib/chunks/{AVVEOYYF.js → YNPWONFN.js} +1 -1
  68. package/lib/chunks/{TPR5SEOT.js → ZJAFKITR.js} +1 -1
  69. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  70. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  71. package/lib/eject-assets/generators/cli/index.ts +2 -2
  72. package/lib/eject-assets/generators/cli/render.ts +1 -1
  73. package/lib/eject-assets/generators/go/client.ts +1 -1
  74. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  75. package/lib/eject-assets/generators/go/index.ts +2 -2
  76. package/lib/eject-assets/generators/go/models.ts +1 -1
  77. package/lib/eject-assets/generators/go/naming.ts +1 -1
  78. package/lib/eject-assets/generators/go/operations.ts +1 -1
  79. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  80. package/lib/eject-assets/generators/go/types.ts +1 -1
  81. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  82. package/lib/eject-assets/generators/mock/index.ts +2 -2
  83. package/lib/eject-assets/generators/mock/render.ts +1 -1
  84. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  85. package/lib/eject-assets/generators/mock/values.ts +1 -1
  86. package/lib/eject-assets/generators/php/client.ts +1 -1
  87. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  88. package/lib/eject-assets/generators/php/index.ts +2 -2
  89. package/lib/eject-assets/generators/php/models.ts +1 -1
  90. package/lib/eject-assets/generators/php/naming.ts +1 -1
  91. package/lib/eject-assets/generators/php/operations.ts +1 -1
  92. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  93. package/lib/eject-assets/generators/php/types.ts +1 -1
  94. package/lib/eject-assets/generators/python/client.ts +1 -1
  95. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  96. package/lib/eject-assets/generators/python/index.ts +2 -2
  97. package/lib/eject-assets/generators/python/models.ts +1 -1
  98. package/lib/eject-assets/generators/python/naming.ts +1 -1
  99. package/lib/eject-assets/generators/python/operations.ts +1 -1
  100. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  101. package/lib/eject-assets/generators/python/types.ts +1 -1
  102. package/lib/eject-assets/generators/swr/index.ts +2 -2
  103. package/lib/eject-assets/generators/swr/render.ts +1 -1
  104. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  105. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  106. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  107. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  108. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  109. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  110. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  111. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  112. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  113. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  114. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  115. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  116. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  117. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  118. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  119. package/lib/eject-assets/generators/zod/index.ts +2 -2
  120. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  121. package/lib/index.js +6 -5
  122. package/package.json +1 -1
  123. package/lib/chunks/2ZE577MX.js +0 -11
  124. package/lib/chunks/6CJDOMNR.js +0 -8
  125. package/lib/chunks/QEM3YVSB.js +0 -7
  126. package/lib/chunks/YSCPIS6C.js +0 -9
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b}from"./G5TC4ZEC.js";import"./NSLUCFIM.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as bundleTelemetry,b as handleBundle};
7
+ import{a,b}from"./RDMFHSDB.js";import"./MJYI42E6.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as bundleTelemetry,b as handleBundle};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as k,f as v}from"./NSLUCFIM.js";import{K as A,L as S,M as y,T as f,U as w,ba as d,fa as l,ga as n,ia as x,ja as h,ka as O,ma as g,pa as b,q as u,v as p}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as F}from"perf_hooks";function I(o){let t=Object.fromEntries(Object.entries(o).map(([s,{metric:e,total:r,counts:a}])=>[s,{metric:e,total:r,counts:a}]));n.output(JSON.stringify(t,null,2))}function P(o){let t=`| Feature | Count |
7
+ import{b as k,f as v}from"./MJYI42E6.js";import{L as A,M as S,N as y,V as f,W as w,da as d,ha as l,ia as n,ka as x,la as h,ma as O,oa as g,q as u,ra as b,w as p}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as F}from"perf_hooks";function I(o){let t=Object.fromEntries(Object.entries(o).map(([s,{metric:e,total:r,counts:a}])=>[s,{metric:e,total:r,counts:a}]));n.output(JSON.stringify(t,null,2))}function P(o){let t=`| Feature | Count |
8
8
  | --- | --- |
9
9
  `,s=[];for(let{metric:e,total:r,counts:a}of Object.values(o)){t+=`| ${e} | ${r} |
10
10
  `;let c=Object.entries(a??{});c.length&&s.push(`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as O,d as se,f as oe}from"./DAQRGYND.js";import"./UF2ZCH7W.js";import{a as Re,b as U,c as ne}from"./GHSNC2OX.js";import{a as re}from"./LRUXN6H5.js";import{$ as ee,T as Y,Z as F,_ as S,aa as I,c as Q,ea as w,ga as k,ma as te}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import{c as X,e as R}from"./RFWIIJFG.js";var ye=X(V=>{"use strict";V.parse=ze;V.serialize=Fe;var _e=Object.prototype.toString,$e=Object.prototype.hasOwnProperty,Oe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,We=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,Be=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,De=/^[\u0020-\u003A\u003D-\u007E]*$/;function ze(e,r){if(typeof e!="string")throw new TypeError("argument str must be a string");var t={},s=e.length;if(s<2)return t;var n=r&&r.decode||Ie,o=0,i=0,a=0;do{if(i=e.indexOf("=",o),i===-1)break;if(a=e.indexOf(";",o),a===-1)a=s;else if(i>a){o=e.lastIndexOf(";",i-1)+1;continue}var c=de(e,o,i),f=he(e,i,c),p=e.slice(c,f);if(!$e.call(t,p)){var u=de(e,i+1,a),m=he(e,a,u);e.charCodeAt(u)===34&&e.charCodeAt(m-1)===34&&(u++,m--);var l=e.slice(u,m);t[p]=Ne(l,n)}o=a+1}while(o<s);return t}function de(e,r,t){do{var s=e.charCodeAt(r);if(s!==32&&s!==9)return r}while(++r<t);return t}function he(e,r,t){for(;r>t;){var s=e.charCodeAt(--r);if(s!==32&&s!==9)return r+1}return t}function Fe(e,r,t){var s=t&&t.encode||encodeURIComponent;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!Oe.test(e))throw new TypeError("argument name is invalid");var n=s(r);if(!We.test(n))throw new TypeError("argument val is invalid");var o=e+"="+n;if(!t)return o;if(t.maxAge!=null){var i=Math.floor(t.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+i}if(t.domain){if(!Be.test(t.domain))throw new TypeError("option domain is invalid");o+="; Domain="+t.domain}if(t.path){if(!De.test(t.path))throw new TypeError("option path is invalid");o+="; Path="+t.path}if(t.expires){var a=t.expires;if(!Ue(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+a.toUTCString()}if(t.httpOnly&&(o+="; HttpOnly"),t.secure&&(o+="; Secure"),t.partitioned&&(o+="; Partitioned"),t.priority){var c=typeof t.priority=="string"?t.priority.toLowerCase():t.priority;switch(c){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(t.sameSite){var f=typeof t.sameSite=="string"?t.sameSite.toLowerCase():t.sameSite;switch(f){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Ie(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Ue(e){return _e.call(e)==="[object Date]"}function Ne(e,r){try{return r(e)}catch{return e}}});var be=X((gt,P)=>{"use strict";var W={decodeValues:!0,map:!1,silent:!1};function H(e){return typeof e=="string"&&!!e.trim()}function J(e,r){var t=e.split(";").filter(H),s=t.shift(),n=qe(s),o=n.name,i=n.value;r=r?Object.assign({},W,r):W;try{i=r.decodeValues?decodeURIComponent(i):i}catch(c){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",c)}var a={name:o,value:i};return t.forEach(function(c){var f=c.split("="),p=f.shift().trimLeft().toLowerCase(),u=f.join("=");p==="expires"?a.expires=new Date(u):p==="max-age"?a.maxAge=parseInt(u,10):p==="secure"?a.secure=!0:p==="httponly"?a.httpOnly=!0:p==="samesite"?a.sameSite=u:p==="partitioned"?a.partitioned=!0:a[p]=u}),a}function qe(e){var r="",t="",s=e.split("=");return s.length>1?(r=s.shift(),t=s.join("=")):t=e,{name:r,value:t}}function xe(e,r){if(r=r?Object.assign({},W,r):W,!e)return r.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var t=e.headers[Object.keys(e.headers).find(function(n){return n.toLowerCase()==="set-cookie"})];!t&&e.headers.cookie&&!r.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=t}if(Array.isArray(e)||(e=[e]),r.map){var s={};return e.filter(H).reduce(function(n,o){var i=J(o,r);return n[i.name]=i,n},s)}else return e.filter(H).map(function(n){return J(n,r)})}function Ve(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var r=[],t=0,s,n,o,i,a;function c(){for(;t<e.length&&/\s/.test(e.charAt(t));)t+=1;return t<e.length}function f(){return n=e.charAt(t),n!=="="&&n!==";"&&n!==","}for(;t<e.length;){for(s=t,a=!1;c();)if(n=e.charAt(t),n===","){for(o=t,t+=1,c(),i=t;t<e.length&&f();)t+=1;t<e.length&&e.charAt(t)==="="?(a=!0,t=i,r.push(e.substring(s,o)),s=t):t=o+1}else t+=1;(!a||t>=e.length)&&r.push(e.substring(s,e.length))}return r}P.exports=xe;P.exports.parse=xe;P.exports.parseString=J;P.exports.splitCookiesString=Ve});import{existsSync as Qe,readFileSync as Ye,writeFileSync as Ae}from"node:fs";import{dirname as et,basename as tt}from"node:path";function N(e,r){return JSON.stringify(e,(s,n)=>{if(n instanceof ArrayBuffer){if(n.byteLength>1048576)return{__type:"ArrayBuffer",data:`File too large to serialize (${n.byteLength} bytes). Maximum allowed size is 1048576 bytes.`,byteLength:n.byteLength};let o=new Uint8Array(n);return{__type:"ArrayBuffer",data:Buffer.from(o).toString("base64"),byteLength:n.byteLength}}return n instanceof File?{__type:"File",name:n.name||"[File Object]",size:n.size||0,type:n.type||"",lastModified:n.lastModified||0}:n},r)}var ie=R(Re(),1);import*as ae from"node:fs";import*as E from"node:path";function ce(e){if(e){let r=E.dirname(e);for(;r!==E.resolve(r,"..");){let t=E.join(r,".env");if(ae.existsSync(t)){ie.config({path:t});break}r=E.resolve(r,"..")}}return process.env}var C=R(re(),1);function Me(e,r={}){let{clientCert:t,clientKey:s,caCert:n}=r,o=new URL(e).origin,i=U(),a=i&&!ne(e);if(t&&s&&a)return new C.ProxyAgent({uri:i,connect:{key:Buffer.from(s),cert:Buffer.from(t),...n&&{ca:Buffer.from(n)},rejectUnauthorized:!0}});if(t&&s)return new C.Client(o,{connect:{key:Buffer.from(s),cert:Buffer.from(t),...n&&{ca:Buffer.from(n)},rejectUnauthorized:!0}});if(a)return new C.ProxyAgent({uri:i})}function fe(e){if(!U()&&(!e||Object.keys(e).length===0))return C.fetch;let t=new Map;return(s,n)=>{let o=typeof s=="string"?s:s instanceof URL?s.toString():"url"in s?s.url:void 0;if(!o)throw new Error("Invalid input URL");let i=e?Pe(o,e):void 0,a=new URL(o).origin,c=t.get(a);return c||(c=Me(o,i)||n?.dispatcher,c&&t.set(a,c)),(0,C.fetch)(s,{...n,dispatcher:c})}}function Pe(e,r){let t=new URL(e);return r[t.origin]||r[t.hostname]}import*as q from"node:path";function ue(e,r){let s=Math.max(...e.map(({file:i})=>q.basename(i).length+40)),n=[{name:"Filename",width:s},{name:"Workflows",width:10},{name:"Passed",width:7},{name:"Failed",width:7},{name:"Warnings",width:8}],o="";o+=`${w(`\u250C${n.map(i=>"\u2500".repeat(i.width+2)).join("\u252C")}\u2510`)}
7
+ import{c as O,d as se,f as oe}from"./HFGKPU2P.js";import"./UF2ZCH7W.js";import{a as Re,b as U,c as ne}from"./GHSNC2OX.js";import{a as re}from"./LRUXN6H5.js";import{$ as F,V as Y,aa as S,ba as ee,c as Q,ca as I,ga as w,ia as k,oa as te}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import{c as X,e as R}from"./RFWIIJFG.js";var ye=X(V=>{"use strict";V.parse=ze;V.serialize=Fe;var _e=Object.prototype.toString,$e=Object.prototype.hasOwnProperty,Oe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,We=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,Be=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,De=/^[\u0020-\u003A\u003D-\u007E]*$/;function ze(e,r){if(typeof e!="string")throw new TypeError("argument str must be a string");var t={},s=e.length;if(s<2)return t;var n=r&&r.decode||Ie,o=0,i=0,a=0;do{if(i=e.indexOf("=",o),i===-1)break;if(a=e.indexOf(";",o),a===-1)a=s;else if(i>a){o=e.lastIndexOf(";",i-1)+1;continue}var c=de(e,o,i),f=he(e,i,c),p=e.slice(c,f);if(!$e.call(t,p)){var u=de(e,i+1,a),m=he(e,a,u);e.charCodeAt(u)===34&&e.charCodeAt(m-1)===34&&(u++,m--);var l=e.slice(u,m);t[p]=Ne(l,n)}o=a+1}while(o<s);return t}function de(e,r,t){do{var s=e.charCodeAt(r);if(s!==32&&s!==9)return r}while(++r<t);return t}function he(e,r,t){for(;r>t;){var s=e.charCodeAt(--r);if(s!==32&&s!==9)return r+1}return t}function Fe(e,r,t){var s=t&&t.encode||encodeURIComponent;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!Oe.test(e))throw new TypeError("argument name is invalid");var n=s(r);if(!We.test(n))throw new TypeError("argument val is invalid");var o=e+"="+n;if(!t)return o;if(t.maxAge!=null){var i=Math.floor(t.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+i}if(t.domain){if(!Be.test(t.domain))throw new TypeError("option domain is invalid");o+="; Domain="+t.domain}if(t.path){if(!De.test(t.path))throw new TypeError("option path is invalid");o+="; Path="+t.path}if(t.expires){var a=t.expires;if(!Ue(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+a.toUTCString()}if(t.httpOnly&&(o+="; HttpOnly"),t.secure&&(o+="; Secure"),t.partitioned&&(o+="; Partitioned"),t.priority){var c=typeof t.priority=="string"?t.priority.toLowerCase():t.priority;switch(c){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(t.sameSite){var f=typeof t.sameSite=="string"?t.sameSite.toLowerCase():t.sameSite;switch(f){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Ie(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Ue(e){return _e.call(e)==="[object Date]"}function Ne(e,r){try{return r(e)}catch{return e}}});var be=X((gt,P)=>{"use strict";var W={decodeValues:!0,map:!1,silent:!1};function H(e){return typeof e=="string"&&!!e.trim()}function J(e,r){var t=e.split(";").filter(H),s=t.shift(),n=qe(s),o=n.name,i=n.value;r=r?Object.assign({},W,r):W;try{i=r.decodeValues?decodeURIComponent(i):i}catch(c){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",c)}var a={name:o,value:i};return t.forEach(function(c){var f=c.split("="),p=f.shift().trimLeft().toLowerCase(),u=f.join("=");p==="expires"?a.expires=new Date(u):p==="max-age"?a.maxAge=parseInt(u,10):p==="secure"?a.secure=!0:p==="httponly"?a.httpOnly=!0:p==="samesite"?a.sameSite=u:p==="partitioned"?a.partitioned=!0:a[p]=u}),a}function qe(e){var r="",t="",s=e.split("=");return s.length>1?(r=s.shift(),t=s.join("=")):t=e,{name:r,value:t}}function xe(e,r){if(r=r?Object.assign({},W,r):W,!e)return r.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var t=e.headers[Object.keys(e.headers).find(function(n){return n.toLowerCase()==="set-cookie"})];!t&&e.headers.cookie&&!r.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=t}if(Array.isArray(e)||(e=[e]),r.map){var s={};return e.filter(H).reduce(function(n,o){var i=J(o,r);return n[i.name]=i,n},s)}else return e.filter(H).map(function(n){return J(n,r)})}function Ve(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var r=[],t=0,s,n,o,i,a;function c(){for(;t<e.length&&/\s/.test(e.charAt(t));)t+=1;return t<e.length}function f(){return n=e.charAt(t),n!=="="&&n!==";"&&n!==","}for(;t<e.length;){for(s=t,a=!1;c();)if(n=e.charAt(t),n===","){for(o=t,t+=1,c(),i=t;t<e.length&&f();)t+=1;t<e.length&&e.charAt(t)==="="?(a=!0,t=i,r.push(e.substring(s,o)),s=t):t=o+1}else t+=1;(!a||t>=e.length)&&r.push(e.substring(s,e.length))}return r}P.exports=xe;P.exports.parse=xe;P.exports.parseString=J;P.exports.splitCookiesString=Ve});import{existsSync as Qe,readFileSync as Ye,writeFileSync as Ae}from"node:fs";import{dirname as et,basename as tt}from"node:path";function N(e,r){return JSON.stringify(e,(s,n)=>{if(n instanceof ArrayBuffer){if(n.byteLength>1048576)return{__type:"ArrayBuffer",data:`File too large to serialize (${n.byteLength} bytes). Maximum allowed size is 1048576 bytes.`,byteLength:n.byteLength};let o=new Uint8Array(n);return{__type:"ArrayBuffer",data:Buffer.from(o).toString("base64"),byteLength:n.byteLength}}return n instanceof File?{__type:"File",name:n.name||"[File Object]",size:n.size||0,type:n.type||"",lastModified:n.lastModified||0}:n},r)}var ie=R(Re(),1);import*as ae from"node:fs";import*as E from"node:path";function ce(e){if(e){let r=E.dirname(e);for(;r!==E.resolve(r,"..");){let t=E.join(r,".env");if(ae.existsSync(t)){ie.config({path:t});break}r=E.resolve(r,"..")}}return process.env}var C=R(re(),1);function Me(e,r={}){let{clientCert:t,clientKey:s,caCert:n}=r,o=new URL(e).origin,i=U(),a=i&&!ne(e);if(t&&s&&a)return new C.ProxyAgent({uri:i,connect:{key:Buffer.from(s),cert:Buffer.from(t),...n&&{ca:Buffer.from(n)},rejectUnauthorized:!0}});if(t&&s)return new C.Client(o,{connect:{key:Buffer.from(s),cert:Buffer.from(t),...n&&{ca:Buffer.from(n)},rejectUnauthorized:!0}});if(a)return new C.ProxyAgent({uri:i})}function fe(e){if(!U()&&(!e||Object.keys(e).length===0))return C.fetch;let t=new Map;return(s,n)=>{let o=typeof s=="string"?s:s instanceof URL?s.toString():"url"in s?s.url:void 0;if(!o)throw new Error("Invalid input URL");let i=e?Pe(o,e):void 0,a=new URL(o).origin,c=t.get(a);return c||(c=Me(o,i)||n?.dispatcher,c&&t.set(a,c)),(0,C.fetch)(s,{...n,dispatcher:c})}}function Pe(e,r){let t=new URL(e);return r[t.origin]||r[t.hostname]}import*as q from"node:path";function ue(e,r){let s=Math.max(...e.map(({file:i})=>q.basename(i).length+40)),n=[{name:"Filename",width:s},{name:"Workflows",width:10},{name:"Passed",width:7},{name:"Failed",width:7},{name:"Warnings",width:8}],o="";o+=`${w(`\u250C${n.map(i=>"\u2500".repeat(i.width+2)).join("\u252C")}\u2510`)}
8
8
  `,o+=`${w(`\u2502${n.map(i=>` ${i.name.padEnd(i.width)} `).join("\u2502")}\u2502`)}
9
9
  `,o+=`${w(`\u251C${n.map(i=>"\u2500".repeat(i.width+2)).join("\u253C")}\u2524`)}
10
10
  `,e.forEach(({file:i,executedWorkflows:a,argv:c})=>{let f=q.basename(i),p=c?.workflow||[],u=c?.skip||[],m=p&&p.length?a.filter(({workflowId:A})=>p.includes(A)):a;m=u&&u.length?m.filter(({workflowId:A})=>!u.includes(A)):m;let{workflows:l}=O(m),d=w(l.total.toString().padEnd(11)),L=S(l.passed.toString().padEnd(8)),y=l.failed>0?F(l.failed.toString().padEnd(8)):w("-".padEnd(8)),b=l.warnings>0?ee(l.warnings.toString().padEnd(9)):w("-".padEnd(9)),j=`${l.failed>0?"x":"\u2713"} ${f}`.padEnd(s+1),D=l.failed>0?F(j):S(j);o+=w("\u2502")+` ${D}`+w("\u2502")+` ${d}`+w("\u2502")+` ${L}`+w("\u2502")+` ${y}`+w("\u2502")+` ${b}`+w("\u2502")+`
@@ -16,7 +16,7 @@ import{c as O,d as se,f as oe}from"./DAQRGYND.js";import"./UF2ZCH7W.js";import{a
16
16
  `);if(h._compressed=/^(gzip|compress|deflate|br)$/.test(d.headers.get("content-encoding")||""),h.response.content||(h.response.content={size:-1}),h._compressed){let x=await y.arrayBuffer();h.response.content.size=x.byteLength}else h.response.content.size=b?Buffer.byteLength(b):-1;let Z=b?Buffer.byteLength(b):-1;h.response={headers:M(d.headers),cookies:Ce(d.headers),status:d.status,statusText:d.statusText||"",httpVersion:d.httpVersion?`HTTP/${d.httpVersion}`:"HTTP/1.1",redirectURL:d.headers.location||"",content:{size:h._compressed&&h.response.content.size!==-1?h.response.content.size:Buffer.byteLength(b),mimeType:d.headers.get("content-type")||"",text:b,compression:h._compressed&&h.response.content.size!==-1?h.response.content.size-Z:0},bodySize:Z,headersSize:A};let{_timestamps:g}=h;h.timings={blocked:Math.max(v(g.start,g.socket),.01),dns:-1,connect:Math.max(v(g.lookup,g.connect),-1),ssl:g.secureConnect?Math.max(v(g.connect,g.secureConnect),-1):-1,send:v(g.secureConnect||g.connect,g.sent),wait:Math.max(v(g.sent,g.firstByte),0),receive:v(g.firstByte,g.received)},h.time=v(g.start,g.received);let _=[],$=h;do{let x=$._parent;delete $._parent,x&&_.unshift(x),$=x}while($);return m.pageref=i||"page_1",_.forEach(x=>{x.pageref=m.pageref}),d.harEntry=m,Array.isArray(o?.log?.entries)&&o.log.entries.push(..._,m),a&&(_.forEach(x=>{a(x)}),a(m)),d}};function Ee(e){let r={};for(let t of e){let{executedWorkflows:s,globalTimeoutError:n,ctx:o,secretValues:i}=t;r[t.file]=oe({value:{totalRequests:t.totalRequests,executedWorkflows:s.map(a=>Se(a)),totalTimeMs:t.totalTimeMs,globalTimeoutError:n,secretValues:i},noSecretsMasking:o.noSecretsMasking,secretsSet:o.secretsSet||new Set})}return r}function Se(e){let{ctx:r,...t}=e,s=e.executedSteps.map(i=>Ke(i,e.workflowId,r)),n=O([e]);return{...t,executedSteps:s,status:n.steps.failed>0?"error":n.steps.warnings>0?"warn":"success",totalRequests:n.totalRequests,totalTimeMs:e.totalTimeMs}}function Ke(e,r,t){if("executedSteps"in e)return Se(e);let s=t.$workflows[r].steps[e.stepId];return{type:"step",stepId:e.stepId,workflowId:r,request:{method:s?.request?.method||"",url:e.response?.requestUrl||"",headers:s?.request?.header||{},body:s?.request?.body},response:{statusCode:e.response?.statusCode||0,body:s?.response?.body,headers:e.response?.header||{},time:e.response?.time||0,size:e.response?.responseSize},checks:e.checks.map(n=>({...n,status:Ge(n)})),totalTimeMs:s?.response?.time||0,retriesLeft:e.retriesLeft,status:Ze(e.checks)}}function Ge(e){return e.passed?"success":e.severity==="error"?"error":"warn"}function Ze(e){let r=!1;for(let t of e){if(!t.passed&&t.severity==="error")return"error";!t.passed&&t.severity==="warn"&&(r=!0)}return r?"warn":"success"}import*as T from"node:fs";import*as Te from"node:path";function Le(e={},r){let t={};for(let[s,n]of Object.entries(e))t[s]={clientCert:G(n.clientCert,r),clientKey:G(n.clientKey,r),caCert:G(n.caCert,r)};return t}function G(e,r){if(e)try{if(!(e.includes("-----BEGIN")&&e.includes("-----END"))){let s=Te.resolve(r,e);return T.accessSync(s,T.constants.R_OK),T.readFileSync(s,"utf-8")}return Xe(e)}catch(t){throw new Error(`Failed to read certificate: ${t.message}`)}}function Xe(e){let r=e.match(/^(-----BEGIN[^-]+-----)\r?\n([A-Za-z0-9+/=\r\n\t ]+)\r?\n(-----END[^-]+-----)/);if(!r)throw new Error("Invalid certificate format");let[,t,s,n]=r,o=s.replace(/\s+/g,"").match(/.{1,64}/g)?.join(`
17
17
  `)||"";return`${t}
18
18
  ${o}
19
- ${n}`}async function Vt({argv:e,config:r,version:t,collectSpecData:s}){let n,o;try{let{run:i,conditionallyMaskSecrets:a}=await import("./NEOAISVJ.js"),c=r.configPath?et(r.configPath):process.cwd();e.mtls&&(n=Le(e.mtls,c));let f=fe(n);e["har-output"]&&(o=le({version:t}),f=K(f,{har:o}));let p=new Y({http:{headers:r.resolve?.http?.headers??[],customFetch:f}}),u={files:e.files,input:e.input,server:e.server,workflow:e.workflow,skip:e.skip,verbose:e.verbose,config:r,version:t,collectSpecData:s,severity:e.severity,maxSteps:e["max-steps"],maxFetchTimeout:e["max-fetch-timeout"],executionTimeout:e["execution-timeout"],requestFileLoader:{getFileBody:async y=>{if(!Qe(y))throw new Error(`File ${y} doesn't exist or isn't readable.`);let b=Ye(y);return new File([b],tt(y))}},envVariables:ce(c)||{},logger:k,fetch:f,externalRefResolver:p,noSecretsMasking:e["no-secrets-masking"]};if(u.skip&&u.workflow)throw new Error("Cannot use both --skip and --workflow flags at the same time.");if(e["har-output"]&&!e["har-output"].endsWith(".har"))throw new Error("File for HAR logs should be in .har format");if(e["json-output"]&&!e["json-output"].endsWith(".json"))throw new Error("File for JSON logs should be in .json format");if(u.files.length>1&&e["har-output"])throw new Error("Currently only a single file can be run with --har-output. Please run a single file at a time.");let m=performance.now(),l=await i(u);k.printNewLine(),ue(l,k),k.printNewLine();let d=l.some(y=>y.hasProblems),L=l.some(y=>y.hasWarnings);if(e["json-output"]){let y={files:Ee(l),status:d?"error":L?"warn":"success",totalTime:performance.now()-m};Ae(e["json-output"],N(y,2),"utf-8"),k.output(I(k.indent(`JSON logs saved in ${S(e["json-output"])}`,2))),k.printNewLine(),k.printNewLine()}if(e["har-output"])for(let y of l){let b=a({value:o,noSecretsMasking:y.ctx.noSecretsMasking,secretsSet:y.ctx.secretsSet||new Set});Ae(e["har-output"],N(b,2),"utf-8"),k.output(I(`Har logs saved in ${S(e["har-output"])}`)),k.printNewLine(),k.printNewLine()}if(d)throw new Error(" Tests exited with error ")}catch(i){throw new te(i?.message??i)}}export{Vt as handleRespect};
19
+ ${n}`}async function Vt({argv:e,config:r,version:t,collectSpecData:s}){let n,o;try{let{run:i,conditionallyMaskSecrets:a}=await import("./XHDOW23C.js"),c=r.configPath?et(r.configPath):process.cwd();e.mtls&&(n=Le(e.mtls,c));let f=fe(n);e["har-output"]&&(o=le({version:t}),f=K(f,{har:o}));let p=new Y({http:{headers:r.resolve?.http?.headers??[],customFetch:f}}),u={files:e.files,input:e.input,server:e.server,workflow:e.workflow,skip:e.skip,verbose:e.verbose,config:r,version:t,collectSpecData:s,severity:e.severity,maxSteps:e["max-steps"],maxFetchTimeout:e["max-fetch-timeout"],executionTimeout:e["execution-timeout"],requestFileLoader:{getFileBody:async y=>{if(!Qe(y))throw new Error(`File ${y} doesn't exist or isn't readable.`);let b=Ye(y);return new File([b],tt(y))}},envVariables:ce(c)||{},logger:k,fetch:f,externalRefResolver:p,noSecretsMasking:e["no-secrets-masking"]};if(u.skip&&u.workflow)throw new Error("Cannot use both --skip and --workflow flags at the same time.");if(e["har-output"]&&!e["har-output"].endsWith(".har"))throw new Error("File for HAR logs should be in .har format");if(e["json-output"]&&!e["json-output"].endsWith(".json"))throw new Error("File for JSON logs should be in .json format");if(u.files.length>1&&e["har-output"])throw new Error("Currently only a single file can be run with --har-output. Please run a single file at a time.");let m=performance.now(),l=await i(u);k.printNewLine(),ue(l,k),k.printNewLine();let d=l.some(y=>y.hasProblems),L=l.some(y=>y.hasWarnings);if(e["json-output"]){let y={files:Ee(l),status:d?"error":L?"warn":"success",totalTime:performance.now()-m};Ae(e["json-output"],N(y,2),"utf-8"),k.output(I(k.indent(`JSON logs saved in ${S(e["json-output"])}`,2))),k.printNewLine(),k.printNewLine()}if(e["har-output"])for(let y of l){let b=a({value:o,noSecretsMasking:y.ctx.noSecretsMasking,secretsSet:y.ctx.secretsSet||new Set});Ae(e["har-output"],N(b,2),"utf-8"),k.output(I(`Har logs saved in ${S(e["har-output"])}`)),k.printNewLine(),k.printNewLine()}if(d)throw new Error(" Tests exited with error ")}catch(i){throw new te(i?.message??i)}}export{Vt as handleRespect};
20
20
  /*! Bundled license information:
21
21
 
22
22
  cookie/index.js:
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as x,ga as O}from"./PHV3T4WH.js";import{m}from"./UW4UC7ZI.js";function R(e){return e.flatMap(n=>n.operations)}function P(e,n,s){let r=e.specName??e.name;if(s?.exclude?.includes(r))return{};let a=s?.operations?.[r];if(a!==void 0)return y(e,n,a,`pagination.operations["${r}"]`,!0);if(e.paginationExtension!==void 0)return y(e,n,e.paginationExtension,"x-redoclyPagination",!0);if(s?.style!==void 0){let{exclude:o,operations:c,...t}=s;return y(e,n,t,"pagination convention",!1)}return{}}function H(e,n){let s=new Map,r=[];for(let a of R(e.services)){let o=P(a,e,n);o.error!==void 0?r.push(o.error):o.spec!==void 0&&s.set(a.name,{spec:o.spec,itemSchema:o.itemSchema})}if(r.length>0)throw new Error(["Invalid pagination configuration:",...r].join(`
7
+ import{c as x,ia as O}from"./AP2GA7RS.js";import{m}from"./UW4UC7ZI.js";function R(e){return e.flatMap(n=>n.operations)}function P(e,n,s){let r=e.specName??e.name;if(s?.exclude?.includes(r))return{};let a=s?.operations?.[r];if(a!==void 0)return y(e,n,a,`pagination.operations["${r}"]`,!0);if(e.paginationExtension!==void 0)return y(e,n,e.paginationExtension,"x-redoclyPagination",!0);if(s?.style!==void 0){let{exclude:o,operations:c,...t}=s;return y(e,n,t,"pagination convention",!1)}return{}}function H(e,n){let s=new Map,r=[];for(let a of R(e.services)){let o=P(a,e,n);o.error!==void 0?r.push(o.error):o.spec!==void 0&&s.set(a.name,{spec:o.spec,itemSchema:o.itemSchema})}if(r.length>0)throw new Error(["Invalid pagination configuration:",...r].join(`
8
8
  - `));return s}function y(e,n,s,r,a){let o=`Pagination for operation "${e.name}" (${r})`,c=q(s);if(c!==void 0)return{error:`${o}: ${c}`};let t=s,d=i=>a?{error:`${o}: ${i}`}:{};if(e.sse!==void 0)return d("the operation is a Server-Sent Events stream");if(t.style!=="link"){let i=t.style==="cursor"?"cursorParam":"offsetParam",l=t.style==="cursor"?t.cursorParam:t.offsetParam,k=e.queryParams.find(u=>u.name===l);if(!k){let u=e.queryParams.map(E=>E.name).join(", ");return d(`query parameter "${l}" is not declared on the operation`+(u===""?"":` (declared: ${u})`))}let p=C(k.schema,n);if(!(p!==void 0&&(t.style==="cursor"?b(p,n):p.kind==="scalar"&&(p.scalar==="number"||p.scalar==="integer")))){let u=t.style==="cursor"?"a string":"a number";return d(`the "${i}" query parameter "${l}" must accept ${u} (got ${I(p)})`)}}let g=e.successResponses.find(i=>i.contentType.toLowerCase().includes("json"));if(!g)return d("the operation has no JSON success response");if(t.style==="link"){let i=e.successResponseHeaders?.some(l=>l.name==="link")===!0;if(!i&&!a)return{};i||O.warn(`generate-client: ${o.toLowerCase()} follows the Link header, but the success response does not document one.
9
9
  `)}let h=m(g.schema,t.items,n);if(h===void 0)return d(`the "items" pointer "${t.items}" does not resolve in the success response schema`);if(h.kind!=="array")return d(`the "items" pointer "${t.items}" must point at an array (got ${h.kind})`);if(t.style==="cursor"){let i=m(g.schema,t.nextCursor,n);if(i===void 0)return d(`the "nextCursor" pointer "${t.nextCursor}" does not resolve in the success response schema`);if(!b(i,n))return d(`the "nextCursor" pointer "${t.nextCursor}" must point at a string (got ${i.kind})`);if(t.hasMore!==void 0){let l=m(g.schema,t.hasMore,n);if(l===void 0)return d(`the "hasMore" pointer "${t.hasMore}" does not resolve in the success response schema`);if(l.kind!=="scalar"||l.scalar!=="boolean")return d(`the "hasMore" pointer "${t.hasMore}" must point at a boolean (got ${l.kind})`)}}let f=t.limitParam!==void 0?{limitParam:t.limitParam}:{};return{spec:t.style==="cursor"?{style:"cursor",param:t.cursorParam,...f,nextCursor:t.nextCursor,...t.hasMore!==void 0?{hasMore:t.hasMore}:{},items:t.items}:t.style==="link"?{style:"link",...f,items:t.items}:{style:t.style,param:t.offsetParam,...f,items:t.items},itemSchema:h.items}}function q(e){if(!x(e))return"the rule must be an object";let{style:n,cursorParam:s,nextCursor:r,hasMore:a,offsetParam:o,limitParam:c,items:t}=e;if(n!=="cursor"&&n!=="offset"&&n!=="page"&&n!=="link")return`"style" must be one of "cursor" | "offset" | "page" | "link" (got ${JSON.stringify(n)})`;if(typeof t!="string"||t!==""&&!t.startsWith("/"))return'"items" must be a JSON pointer starting with "/" (or "" when the response body is the item array itself)';if(n==="cursor"){if(typeof s!="string"||s==="")return'cursor style requires a "cursorParam" query parameter name';if(typeof r!="string"||!r.startsWith("/"))return'cursor style requires a "nextCursor" JSON pointer starting with "/"';if(a!==void 0&&(typeof a!="string"||!a.startsWith("/")))return'"hasMore" must be a JSON pointer starting with "/"'}else if((n==="offset"||n==="page")&&(typeof o!="string"||o===""))return`${n} style requires an "offsetParam" query parameter name`;if(c!==void 0&&typeof c!="string")return'"limitParam" must be a query parameter name'}function I(e){return e===void 0?"an unresolvable ref":e.kind==="scalar"||e.kind==="enum"?e.scalar:e.kind}function C(e,n){let s=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(s.has(a))return;s.add(a);let o=n.schemas.find(c=>c.name===a);if(o===void 0)return;r=o.schema}return r}function b(e,n){return e.kind==="scalar"||e.kind==="enum"?e.scalar==="string":e.kind==="literal"?typeof e.value=="string":e.kind==="union"?e.members.every(s=>{let r=C(s,n);return r!==void 0&&(r.kind==="null"||r.kind!=="union"&&b(r,n))}):!1}var G={"types.ts":`/**
10
10
  * The public type surface of the client runtime \u2014 \`@redocly/client-generator\`'s
@@ -5397,4 +5397,4 @@ async function runSingle(
5397
5397
  }
5398
5398
  return fail(1, detail);
5399
5399
  }
5400
- }`},S=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","toFormData","toHeaderRecord"];var j=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],$=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],N=["AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],w;function Q(){return w===void 0&&(w=new Set([...j,...$,...N,...S])),w}var A={name:"@redocly/client-generator",version:"0.4.24",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"2.59.0"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var ee=A.version;function T(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function v(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function ne(e,n){let s=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=T(n.trim().slice(s.length)),a=T(e);if(!(r===void 0||a===void 0))return v(a,r)<0?!1:s===">="?!0:s===""?v(a,r)===0:s==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:v(a,r)===0}export{R as a,H as b,G as c,W as d,j as e,Q as f,ee as g,ne as h};
5400
+ }`},S=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","toFormData","toHeaderRecord"];var j=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],$=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],N=["AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],w;function Q(){return w===void 0&&(w=new Set([...j,...$,...N,...S])),w}var A={name:"@redocly/client-generator",version:"0.4.25",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"2.60.0"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var ee=A.version;function T(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function v(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function ne(e,n){let s=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=T(n.trim().slice(s.length)),a=T(e);if(!(r===void 0||a===void 0))return v(a,r)<0?!1:s===">="?!0:s===""?v(a,r)===0:s==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:v(a,r)===0}export{R as a,H as b,G as c,W as d,j as e,Q as f,ee as g,ne as h};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ga as r}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
7
+ import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ia as r}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
8
8
  Launching translate using NPX.
9
9
 
10
10
  `);let{npxExecutableName:s,sanitize:a,shell:i}=e(),l=a(n["project-dir"],o),c=a(n.locale,t);p(s,["-y","@redocly/realm","translate",c,`-d=${l}`],{stdio:"inherit",shell:i}).on("error",m=>{throw r.info(`Translate launch failed: ${m.message}`),new Error("Translate launch failed.")})};export{u as handleTranslations};
@@ -4,5 +4,5 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c}from"./PHV3T4WH.js";import{open as U,readdir as H,stat as J}from"node:fs/promises";import x from"node:path";var L=new Set([".yaml",".yml",".json"]);async function K(e){let n=[];async function t(r){let o=await H(r,{withFileTypes:!0});for(let s of o){if(s.name.startsWith("."))continue;let i=x.join(r,s.name);if(s.isDirectory()){await t(i);continue}s.isFile()&&L.has(x.extname(s.name).toLowerCase())&&n.push(i)}}return await t(e),n.sort(),n}async function G(e,n=4096){let t=await U(e,"r");try{let r=Buffer.allocUnsafe(n),{bytesRead:o}=await t.read(r,0,n,0);return r.toString("utf8",0,o)}finally{await t.close()}}function X(e){return x.resolve(process.cwd(),e)}async function Y(e){let n=await J(e);if(n.isFile())return[e];if(!n.isDirectory())return[];let t=[];async function r(o){let s=await H(o,{withFileTypes:!0});for(let i of s){if(i.name.startsWith("."))continue;let a=x.join(o,i.name);if(i.isDirectory()){await r(a);continue}i.isFile()&&t.push(a)}}return await r(e),t.sort(),t}var z="drift.local",B=`http://${z}`;function l(e){return e===z}var I=new Set(["accept","accept-charset","accept-encoding","accept-language","authorization","baggage","cache-control","cdn-loop","cookie","connection","content-length","content-type","dpr","dnt","downlink","ect","forwarded","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","origin","pragma","priority","range","referer","sec-fetch-dest","sec-fetch-mode","sec-fetch-site","sec-fetch-user","sec-gpc","sentry-trace","te","traceparent","tracestate","upgrade","upgrade-insecure-requests","user-agent","via","x-client-trace-id","x-cloud-trace-context","x-correlation-id","x-http-method-override","x-hub-signature","x-hub-signature-256","x-method-override","x-real-ip","x-request-id","x-forwarded-for","x-forwarded-host","x-forwarded-port","x-forwarded-proto"]),q=["cf-","sec-ch-","sec-fetch-","x-amz-","x-amzn-","x-b3-","x-envoy-","x-forwarded-","x-github-"],T=`
7
+ import{c}from"./AP2GA7RS.js";import{open as U,readdir as H,stat as J}from"node:fs/promises";import x from"node:path";var L=new Set([".yaml",".yml",".json"]);async function K(e){let n=[];async function t(r){let o=await H(r,{withFileTypes:!0});for(let s of o){if(s.name.startsWith("."))continue;let i=x.join(r,s.name);if(s.isDirectory()){await t(i);continue}s.isFile()&&L.has(x.extname(s.name).toLowerCase())&&n.push(i)}}return await t(e),n.sort(),n}async function G(e,n=4096){let t=await U(e,"r");try{let r=Buffer.allocUnsafe(n),{bytesRead:o}=await t.read(r,0,n,0);return r.toString("utf8",0,o)}finally{await t.close()}}function X(e){return x.resolve(process.cwd(),e)}async function Y(e){let n=await J(e);if(n.isFile())return[e];if(!n.isDirectory())return[];let t=[];async function r(o){let s=await H(o,{withFileTypes:!0});for(let i of s){if(i.name.startsWith("."))continue;let a=x.join(o,i.name);if(i.isDirectory()){await r(a);continue}i.isFile()&&t.push(a)}}return await r(e),t.sort(),t}var z="drift.local",B=`http://${z}`;function l(e){return e===z}var I=new Set(["accept","accept-charset","accept-encoding","accept-language","authorization","baggage","cache-control","cdn-loop","cookie","connection","content-length","content-type","dpr","dnt","downlink","ect","forwarded","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","origin","pragma","priority","range","referer","sec-fetch-dest","sec-fetch-mode","sec-fetch-site","sec-fetch-user","sec-gpc","sentry-trace","te","traceparent","tracestate","upgrade","upgrade-insecure-requests","user-agent","via","x-client-trace-id","x-cloud-trace-context","x-correlation-id","x-http-method-override","x-hub-signature","x-hub-signature-256","x-method-override","x-real-ip","x-request-id","x-forwarded-for","x-forwarded-host","x-forwarded-port","x-forwarded-proto"]),q=["cf-","sec-ch-","sec-fetch-","x-amz-","x-amzn-","x-b3-","x-envoy-","x-forwarded-","x-github-"],T=`
8
8
  `;function Z(e){return e.split(T)}function S(e,n,t){let r=n.toLowerCase(),o=e[r];if(o===void 0){e[r]=t;return}e[r]=r==="set-cookie"?`${o}${T}${t}`:`${o},${t}`}function w(e){if(!c(e)&&!Array.isArray(e))return{};let n={};if(Array.isArray(e)){for(let t of e){if(!c(t))continue;let{name:r,value:o}=t;typeof r=="string"&&o!==void 0&&S(n,r,String(o))}return n}for(let[t,r]of Object.entries(e))if(r!=null){if(Array.isArray(r)){for(let o of r)S(n,t,String(o));continue}S(n,t,String(r))}return n}function m(e){try{return new URL(e)}catch{return new URL(e,B)}}function N(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(e){let n=[],t=0,r=e.startsWith("/")?e:`/${e}`,s=N(r).split("/").map(i=>{if(!i)return"";let a=[...i.matchAll(/\{([^}]+)\}/g)],h=n.length,u="",p=0,f=0;for(let[y,d]of a.entries()){let R=i.slice(f,d.index);u+=b(R),p+=R.length,n.push(d[1]),f=d.index+d[0].length;let E=a[y+1];if(!E){u+="([^/]+)";continue}let A=i.slice(f,E.index);u+=A?`((?:(?!${b(A)})[^/])+)`:"([^/])"}let g=i.slice(f);return u+=b(g),p+=g.length,n.length===h?t+=2:p>0&&(t+=1),u}).join("/");return{regex:new RegExp(`^${s||"/"}$`),params:n,score:t}}function k(e,n){if(n&&P(e))try{return JSON.parse(n)}catch{return}}function C(e){return e?e.split(";")[0]?.trim().toLowerCase()??"":""}function P(e){let n=C(e);return n==="application/json"||n.endsWith("+json")}function ee(e,n){let t=C(n);if(!t)return e["application/json"]??e["*/*"];if(e[t]!==void 0)return e[t];let[r,o]=t.split("/");if(r&&o){let s=`${r}/*`;if(e[s]!==void 0)return e[s]}return e["*/*"]}function ne(e){let n=new Set,t=[];for(let r of e){let o=r.trim().toLowerCase();o.length!==0&&(o.endsWith("*")?t.push(o.slice(0,-1)):n.add(o))}return{names:n,prefixes:t}}function te(e,n){let t=e.toLowerCase();return t.startsWith(":")||I.has(t)||q.some(r=>t.startsWith(r))?!0:n?n.names.has(t)||n.prefixes.some(r=>t.startsWith(r)):!1}import{createReadStream as F}from"node:fs";import{readFile as j}from"node:fs/promises";import{createInterface as W}from"node:readline";function D(e){if(e!=null){if(typeof e=="string")return e;if(Buffer.isBuffer(e))return e.toString("utf8");if(c(e)||Array.isArray(e))try{return JSON.stringify(e)}catch{return String(e)}return String(e)}}function ue(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){let n=Number(e);if(Number.isFinite(n))return n}}function $(e,n){if(e!=null){if(n==="base64"&&typeof e=="string")try{return Buffer.from(e,"base64").toString("utf8")}catch{return e}return D(e)}}function fe(e,n,t){let r=e.method?.toUpperCase(),o=e.url;if(!r||!o)return null;let s=w(e.requestHeaders),i=m(o);if(l(i.host)&&s.host)try{i=new URL(`${i.protocol}//${s.host}${i.pathname}${i.search}`)}catch{i=m(o)}let a=e.requestContentType??s["content-type"],h=$(e.requestBody),u={method:r,url:i.toString(),path:i.pathname,query:i.searchParams,protocol:i.protocol,protocolKnown:e.schemeKnown??/^https?:\/\//i.test(o),host:l(i.host)?void 0:i.host||void 0,headers:s,contentType:a,bodyText:h,bodyJson:k(a,h)},p,f=e.responseStatus;if(f!==void 0){let g=w(e.responseHeaders),y=e.responseContentType??g["content-type"],d=$(e.responseBody);p={status:f,statusText:e.responseStatusText,headers:g,contentType:y,bodyText:d,bodyJson:k(y,d)}}return{index:n,source:t,startedAt:e.startedAt,request:u,response:p,raw:e.raw}}async function*de(e){let n=F(e,{encoding:"utf8"}),t=W({input:n,crlfDelay:1/0});for await(let r of t){let o=r.trim();if(o)try{let s=JSON.parse(o);c(s)&&(yield s)}catch{}}}async function*pe(e,n){let t=await j(e,"utf8"),r=JSON.parse(t);if(n)for(let o of n.split("."))r=c(r)?r[o]:void 0;if(Array.isArray(r))for(let o of r)c(o)&&(yield o)}function ge(e){return w(e)["content-type"]}function he(e){return e?.replace(/\/+$/,"")||void 0}function O(e,n){if(!n||n==="/")return e||"/";if(e===n)return"/";if(e.startsWith(`${n}/`))return e.slice(n.length)||"/"}function ye(e,n){if(n.startsWith("/"))return O(e.path,n);let t=m(n.includes("://")?n:`http://${n}`);if(!(l(t.host)||e.host!==void 0&&e.host.toLowerCase()!==t.host))return O(e.path,N(t.pathname))}export{K as a,G as b,X as c,Y as d,l as e,Z as f,m as g,N as h,v as i,C as j,P as k,ee as l,ne as m,te as n,D as o,ue as p,$ as q,fe as r,de as s,pe as t,ge as u,he as v,ye as w};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./O553F5PN.js";import"./2U6O26CV.js";import"./DBWAOHZO.js";import"./J56XVM43.js";import"./WZXA5XPB.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
7
+ import{a,b,c,d,e}from"./GC26XZYZ.js";import"./2U6O26CV.js";import"./BZBFESBB.js";import"./4WAQNM63.js";import"./WZXA5XPB.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as q}from"./PCJ3RO4V.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./NC5GB4G5.js";import{b as J,d as M,e as Y,v as L}from"./NSLUCFIM.js";import"./LRUXN6H5.js";import{$ as j,T as N,X as v,Z as O,_ as A,aa as b,ca as y,da as C,ea as R,ga as e,l as h,ma as w,na as D,sa as S,va as g}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
7
+ import{a as q}from"./V46KUEYR.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./W7VT3BOM.js";import{b as J,d as M,e as Y,v as L}from"./MJYI42E6.js";import"./LRUXN6H5.js";import{$ as O,V as N,Z as v,aa as A,ba as j,ca as b,ea as y,fa as C,ga as R,ia as e,l as h,oa as w,pa as D,ua as S,xa as g}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
8
8
  \u2611\uFE0F Achieved Level: ${y(o)}
9
9
 
10
10
  `))),e.output(`<?xml version="1.0" encoding="UTF-8"?>
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{c as p}from"./HBUZKWXC.js";import{a as i,b as s}from"./4PTNG4EI.js";import{ga as t}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as g}from"node:child_process";import{existsSync as l,readFileSync as P}from"node:fs";import w from"node:path";var S=async({argv:r})=>{let{plan:e,port:a}=r,n=r["project-dir"],o=r.product||h(n);if(!j(o))throw t.info(`Invalid product ${o}.`),new Error("Project preview launch failed.");let c=s[o],d=i[o];t.info(`
7
+ import{c as p}from"./HBUZKWXC.js";import{a as i,b as s}from"./4PTNG4EI.js";import{ia as t}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as g}from"node:child_process";import{existsSync as l,readFileSync as P}from"node:fs";import w from"node:path";var S=async({argv:r})=>{let{plan:e,port:a}=r,n=r["project-dir"],o=r.product||h(n);if(!j(o))throw t.info(`Invalid product ${o}.`),new Error("Project preview launch failed.");let c=s[o],d=i[o];t.info(`
8
8
  Launching preview of ${c} ${e} using NPX.
9
9
 
10
10
  `);let{npxExecutableName:m,shell:f}=p();g(m,["-y",d,"preview",`--plan=${e}`,`--port=${a||4e3}`],{stdio:"inherit",cwd:n,shell:f}).on("error",u=>{throw t.info(`Project preview launch failed: ${u.message}`),new Error("Project preview launch failed.")})},j=r=>r?!!s[r]:!1,h=r=>{let e=w.join(process.cwd(),r,"package.json");if(l(e))try{let n=JSON.parse(P(e,"utf-8")).dependencies||{};for(let[o,c]of Object.entries(i))if(n[c])return t.info(`
@@ -4,6 +4,6 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as m,j as C,o as a,p,q as T,r as l,s as h,t as f,u as d}from"./IOYEFQOG.js";import{c as g}from"./PHV3T4WH.js";import A from"node:path";function L(e,n){if(C(e)!=="application/x-www-form-urlencoded"||!Array.isArray(n))return;let o=new URLSearchParams;for(let s of n){if(!g(s))continue;let t=a(s.name);t!==void 0&&o.append(t,a(s.value)??"")}return o.size>0?o.toString():void 0}function K(e,n,o){let s=e?.request,t=e?.response;if(!s)return null;let r=s?.postData,i=a(r?.mimeType),u=r?.text??L(i,r?.params),c=a(r?.encoding),y=t?.content?.text,S=a(t?.content?.encoding),q=p(t?.status);return l({method:a(s?.method),url:a(s?.url),requestHeaders:s?.headers,requestBody:T(u,c),requestContentType:i,responseStatus:q===0?void 0:q,responseStatusText:a(t?.statusText),responseHeaders:t?.headers,responseBody:T(y,S),responseContentType:a(t?.content?.mimeType),startedAt:a(e?.startedDateTime),raw:e},n,o)}var b=class{id="har";canParse(n,o){if(A.extname(n).toLowerCase()===".har")return!0;let t=o.toLowerCase();return t.includes('"log"')&&t.includes('"entries"')}async*parse(n){let o=0;for await(let s of f(n,"log.entries")){let t=K(s,o,n);t&&(yield t),o+=1}}};import $ from"node:path";function H(e){let n=a(e.url??e.uri);if(n)return{url:n};let o=a(e.host??e.headers?.host),s=a(e.path??e.request_uri),t=a(e.scheme??e.forwarded_proto);return o&&s?{url:`${t??"http"}://${o}${s}`,schemeKnown:!!t}:{url:s,schemeKnown:!!t}}function z(e,n,o){let s=e?.request??e?.req??e?.http?.request;if(!s)return null;let t=e?.response??e?.res??e?.http?.response,r=t?.body??t?.raw_body??t?.payload??t?.data,i=s?.body??s?.raw_body??s?.payload??s?.data,{url:u,schemeKnown:c}=H(s);return l({method:a(s?.method??s?.http_method),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:i,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode),responseHeaders:t?.headers,responseBody:r,responseContentType:d(t?.headers),startedAt:a(e?.started_at??e?.startedAt??e?.timestamp),raw:e},n,o)}var x=class{id="kong";canParse(n,o){if($.extname(n).toLowerCase()===".kong")return!0;let t=o.toLowerCase();return t.includes('"latencies"')||t.includes('"request"')&&t.includes('"response"')&&t.includes('"route"')}async*parse(n){let o=(await m(n,16)).trim().slice(0,1),s=0;if(o==="["){for await(let t of f(n)){let r=z(t,s,n);r&&(yield r),s+=1}return}for await(let t of h(n)){let r=z(t,s,n);r&&(yield r),s+=1}}};import R from"node:path";function U(e){return e?.request??e?.req??e?.httpRequest??e?.http?.request??e}function I(e){return e?.response??e?.res??e?.httpResponse??e?.http?.response}function O(e,n){let o=a(n?.url??n?.uri??n?.requestUrl??e?.url);if(o)return{url:o};let s=a(n?.host??n?.headers?.host??e?.host),t=a(n?.path??e?.path??n?.pathname),r=a(n?.scheme??e?.scheme);return s&&t?{url:`${r??"http"}://${s}${t}`,schemeKnown:!!r}:{url:t,schemeKnown:!!r}}function k(e,n,o){let s=U(e),t=I(e),r=s?.body??s?.bodyText??s?.payload??s?.data??s?.rawBody,i=t?.body??t?.bodyText??t?.payload??t?.data??t?.rawBody,{url:u,schemeKnown:c}=O(e,s);return l({method:a(s?.method??s?.httpMethod??e?.method??e?.httpMethod),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:r,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode??e?.status??e?.statusCode),responseHeaders:t?.headers,responseBody:i,responseContentType:d(t?.headers),startedAt:a(e?.startedAt??e?.timestamp??e?.time),raw:e},n,o)}var w=class{id="ndjson";canParse(n,o){let s=R.extname(n).toLowerCase();if(s===".ndjson"||s===".jsonl"||s===".jsonlines")return!0;let t=o.lastIndexOf(`
7
+ import{b as m,j as C,o as a,p,q as T,r as l,s as h,t as f,u as d}from"./52MW7SRF.js";import{c as g}from"./AP2GA7RS.js";import A from"node:path";function L(e,n){if(C(e)!=="application/x-www-form-urlencoded"||!Array.isArray(n))return;let o=new URLSearchParams;for(let s of n){if(!g(s))continue;let t=a(s.name);t!==void 0&&o.append(t,a(s.value)??"")}return o.size>0?o.toString():void 0}function K(e,n,o){let s=e?.request,t=e?.response;if(!s)return null;let r=s?.postData,i=a(r?.mimeType),u=r?.text??L(i,r?.params),c=a(r?.encoding),y=t?.content?.text,S=a(t?.content?.encoding),q=p(t?.status);return l({method:a(s?.method),url:a(s?.url),requestHeaders:s?.headers,requestBody:T(u,c),requestContentType:i,responseStatus:q===0?void 0:q,responseStatusText:a(t?.statusText),responseHeaders:t?.headers,responseBody:T(y,S),responseContentType:a(t?.content?.mimeType),startedAt:a(e?.startedDateTime),raw:e},n,o)}var b=class{id="har";canParse(n,o){if(A.extname(n).toLowerCase()===".har")return!0;let t=o.toLowerCase();return t.includes('"log"')&&t.includes('"entries"')}async*parse(n){let o=0;for await(let s of f(n,"log.entries")){let t=K(s,o,n);t&&(yield t),o+=1}}};import $ from"node:path";function H(e){let n=a(e.url??e.uri);if(n)return{url:n};let o=a(e.host??e.headers?.host),s=a(e.path??e.request_uri),t=a(e.scheme??e.forwarded_proto);return o&&s?{url:`${t??"http"}://${o}${s}`,schemeKnown:!!t}:{url:s,schemeKnown:!!t}}function z(e,n,o){let s=e?.request??e?.req??e?.http?.request;if(!s)return null;let t=e?.response??e?.res??e?.http?.response,r=t?.body??t?.raw_body??t?.payload??t?.data,i=s?.body??s?.raw_body??s?.payload??s?.data,{url:u,schemeKnown:c}=H(s);return l({method:a(s?.method??s?.http_method),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:i,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode),responseHeaders:t?.headers,responseBody:r,responseContentType:d(t?.headers),startedAt:a(e?.started_at??e?.startedAt??e?.timestamp),raw:e},n,o)}var x=class{id="kong";canParse(n,o){if($.extname(n).toLowerCase()===".kong")return!0;let t=o.toLowerCase();return t.includes('"latencies"')||t.includes('"request"')&&t.includes('"response"')&&t.includes('"route"')}async*parse(n){let o=(await m(n,16)).trim().slice(0,1),s=0;if(o==="["){for await(let t of f(n)){let r=z(t,s,n);r&&(yield r),s+=1}return}for await(let t of h(n)){let r=z(t,s,n);r&&(yield r),s+=1}}};import R from"node:path";function U(e){return e?.request??e?.req??e?.httpRequest??e?.http?.request??e}function I(e){return e?.response??e?.res??e?.httpResponse??e?.http?.response}function O(e,n){let o=a(n?.url??n?.uri??n?.requestUrl??e?.url);if(o)return{url:o};let s=a(n?.host??n?.headers?.host??e?.host),t=a(n?.path??e?.path??n?.pathname),r=a(n?.scheme??e?.scheme);return s&&t?{url:`${r??"http"}://${s}${t}`,schemeKnown:!!r}:{url:t,schemeKnown:!!r}}function k(e,n,o){let s=U(e),t=I(e),r=s?.body??s?.bodyText??s?.payload??s?.data??s?.rawBody,i=t?.body??t?.bodyText??t?.payload??t?.data??t?.rawBody,{url:u,schemeKnown:c}=O(e,s);return l({method:a(s?.method??s?.httpMethod??e?.method??e?.httpMethod),url:u,schemeKnown:c,requestHeaders:s?.headers,requestBody:r,requestContentType:d(s?.headers),responseStatus:p(t?.status??t?.statusCode??e?.status??e?.statusCode),responseHeaders:t?.headers,responseBody:i,responseContentType:d(t?.headers),startedAt:a(e?.startedAt??e?.timestamp??e?.time),raw:e},n,o)}var w=class{id="ndjson";canParse(n,o){let s=R.extname(n).toLowerCase();if(s===".ndjson"||s===".jsonl"||s===".jsonlines")return!0;let t=o.lastIndexOf(`
8
8
  `),i=(t===-1?o:o.slice(0,t)).split(`
9
9
  `).map(u=>u.trim()).find(Boolean);if(!i?.startsWith("{")||!i.endsWith("}"))return!1;try{return JSON.parse(i),!0}catch{return!1}}async*parse(n){let o=0;for await(let s of h(n)){let t=k(s,o,n);t&&(yield t),o+=1}}};import J from"node:path";function P(e){if(!e)return{};let n=e.trim().split(/\s+/);return n.length<2?{}:{method:n[0],path:n[1],protocol:n[2]}}function W(e,n){let o=a(n?.url??n?.request_uri??n?.uri??e?.url??e?.request_url??e?.absolute_uri),s=P(a(e?.request??n?.request_line)),t=a(n?.request_uri??n?.uri??n?.path??e?.request_uri??e?.uri)??s.path;if(o?.startsWith("http://")||o?.startsWith("https://"))return{url:o};let r=a(n?.host??n?.headers?.host??e?.host??e?.http_host??e?.server_name??e?.vhost),i=a(e?.scheme??n?.scheme??e?.request_scheme),u=!!i;if(r&&(o||t)){let c=i??"http",y=o??t;return y?.startsWith("/")?{url:`${c}://${r}${y}`,schemeKnown:u}:{url:`${c}://${r}/${y}`,schemeKnown:u}}return{url:o??t,schemeKnown:u}}function E(e,n,o){let s=g(e?.request)?e.request:e,t=g(e?.response)?e.response:void 0,r=P(a(e?.request)),i=a(s?.method??s?.request_method??e?.request_method??e?.method)??r.method,{url:u,schemeKnown:c}=W(e,s);return l({method:i,url:u,schemeKnown:c,requestHeaders:s?.headers??s?.request_headers??e?.request_headers??e?.headers,requestBody:s?.body??s?.request_body??e?.request_body??e?.body,requestContentType:d(s?.headers??s?.request_headers??e?.request_headers),responseStatus:p(t?.status??t?.status_code??e?.status??e?.status_code??e?.response_status),responseHeaders:t?.headers??t?.response_headers??e?.response_headers??e?.headers_out,responseBody:t?.body??t?.response_body??e?.response_body,responseContentType:d(t?.headers??t?.response_headers??e?.response_headers),startedAt:a(e?.time_iso8601??e?.timestamp??e?.time??e?.time_local??e?.["@timestamp"]),raw:e},n,o)}async function*j(e){if((await m(e,16)).trim().slice(0,1)==="["){yield*f(e);return}for await(let o of h(e))yield o}var N=class{id="nginx-json";canParse(n,o){let s=J.extname(n).toLowerCase(),t=n.toLowerCase();if(s===".ndjson"&&t.includes("nginx"))return!0;let r=o.toLowerCase();return r.includes('"request_uri"')||r.includes('"time_iso8601"')||r.includes('"upstream_response_time"')||r.includes('"remote_addr"')}async*parse(n){let o=0;for await(let s of j(n)){let t=E(s,o,n);t&&(yield t),o+=1}}},_=class{id="apache-json";canParse(n,o){let s=J.extname(n).toLowerCase(),t=n.toLowerCase();if(s===".ndjson"&&t.includes("apache"))return!0;let r=o.toLowerCase();return r.includes('"request_method"')||r.includes('"request_uri"')||r.includes('"vhost"')||r.includes('"response_status"')}async*parse(n){let o=0;for await(let s of j(n)){let t=E(s,o,n);t&&(yield t),o+=1}}};var B=[new b,new x,new N,new _,new w];async function le(e,n){if(n!=="auto"){let s=B.find(t=>t.id===n);if(!s)throw new Error(`Unsupported parser format: ${n}`);return s}let o=await m(e);return B.find(s=>s.canParse(e,o))}export{le as a};
@@ -133,7 +133,7 @@ ${JSON.stringify(n,null,2)}`);Re(r.rules,n.rules),Re(r.oas2Rules,n.oas2Rules),Le
133
133
  ${l.stack}`)}},o=new Map,i=jZ(t);i&&e.push(i);let s=new Set;if(r){let c=[];for(let l of e){if(!et(l)){c.push(l);continue}let p=tr.isAbsolute(l)?l:yd(l,tr.join(t,ss),t).absolutePath;s.has(p)||(s.add(p),c.push({absolutePath:p}))}return c}return(await Promise.all(e.map(async c=>{if(et(c)){if(pe(c))throw new Error(ce.red("We don't support remote plugins yet."));if(s.has(c))return;s.add(c)}let l=await n(c);if(!l)return;let p=Array.isArray(l)?l:[l];return(await Promise.all(p.map(async u=>{if(!u)return;let f=u.id;if(typeof f!="string")throw new Error(ce.red(`Plugin must define \`id\` property in ${ce.blue(c.toString())}.`));if(f===Xc)throw new Error(`Plugin id "${f}" is reserved for Recheck presets.`);let m=u.absolutePath??c.toString(),h=o.get(f);if(h){if(m!==h)throw new Error(ce.red(`Plugin "id" must be unique. Plugin ${ce.blue(m)} uses id "${ce.blue(f)}" already seen in ${ce.blue(m)}`));return}o.set(f,m);let y={id:f,...u.configs?{configs:u.configs}:{},...u.typeExtension?{typeExtension:u.typeExtension}:{}};if(u.rules){if(!u.rules.oas3&&!u.rules.oas2&&!u.rules.async2&&!u.rules.async3&&!u.rules.arazzo1&&!u.rules.overlay1&&!u.rules.openrpc1&&!u.rules.graphql)throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, \`openrpc1\`, or \`graphql\` rules "${c}.`);y.rules={},u.rules.oas3&&(y.rules.oas3=ot(u.rules.oas3,f)),u.rules.oas2&&(y.rules.oas2=ot(u.rules.oas2,f)),u.rules.async2&&(y.rules.async2=ot(u.rules.async2,f)),u.rules.async3&&(y.rules.async3=ot(u.rules.async3,f)),u.rules.arazzo1&&(y.rules.arazzo1=ot(u.rules.arazzo1,f)),u.rules.overlay1&&(y.rules.overlay1=ot(u.rules.overlay1,f)),u.rules.openrpc1&&(y.rules.openrpc1=ot(u.rules.openrpc1,f)),u.rules.graphql&&(y.rules.graphql=ot(u.rules.graphql,f))}if(u.preprocessors){if(!u.preprocessors.oas3&&!u.preprocessors.oas2&&!u.preprocessors.async2&&!u.preprocessors.async3&&!u.preprocessors.arazzo1&&!u.preprocessors.overlay1&&!u.preprocessors.openrpc1)throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${c}.`);y.preprocessors={},u.preprocessors.oas3&&(y.preprocessors.oas3=ot(u.preprocessors.oas3,f)),u.preprocessors.oas2&&(y.preprocessors.oas2=ot(u.preprocessors.oas2,f)),u.preprocessors.async2&&(y.preprocessors.async2=ot(u.preprocessors.async2,f)),u.preprocessors.async3&&(y.preprocessors.async3=ot(u.preprocessors.async3,f)),u.preprocessors.arazzo1&&(y.preprocessors.arazzo1=ot(u.preprocessors.arazzo1,f)),u.preprocessors.overlay1&&(y.preprocessors.overlay1=ot(u.preprocessors.overlay1,f)),u.preprocessors.openrpc1&&(y.preprocessors.openrpc1=ot(u.preprocessors.openrpc1,f))}if(u.decorators){if(!u.decorators.oas3&&!u.decorators.oas2&&!u.decorators.async2&&!u.decorators.async3&&!u.decorators.arazzo1&&!u.decorators.overlay1&&!u.decorators.openrpc1)throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${c}.`);y.decorators={},u.decorators.oas3&&(y.decorators.oas3=ot(u.decorators.oas3,f)),u.decorators.oas2&&(y.decorators.oas2=ot(u.decorators.oas2,f)),u.decorators.async2&&(y.decorators.async2=ot(u.decorators.async2,f)),u.decorators.async3&&(y.decorators.async3=ot(u.decorators.async3,f)),u.decorators.arazzo1&&(y.decorators.arazzo1=ot(u.decorators.arazzo1,f)),u.decorators.overlay1&&(y.decorators.overlay1=ot(u.decorators.overlay1,f)),u.decorators.openrpc1&&(y.decorators.openrpc1=ot(u.decorators.openrpc1,f))}return u.assertions&&(y.assertions=u.assertions),{...u,...y}}))).filter(Pt)}))).filter(Pt).flat()}function h1(e,t){let{pluginId:r,configName:n}=a1(e),o=t.find(s=>s.id===r);if(!o)throw new Error(`Invalid config ${ce.red(e)}: plugin ${r} is not included.`);let i=o.configs?.[n];if(!i)throw new Error(r?`Invalid config ${ce.red(e)}: plugin ${r} doesn't export config with name ${n}.`:`Invalid config ${ce.red(e)}: there is no such built-in config.`);return i}function fb({node:e,ctx:t,plugins:r}){if(!e.extends)return e;let n=r.some(i=>i.id===Xc),o=(e.extends||[]).filter(yt).map(i=>{if(!pe(i)&&!MZ.extname(i))return i1(i)&&!n?null:h1(i,r);let s=t.resolve({$ref:i});return s.location&&s.node!==void 0?s.node:null}).filter(yt);return hd([...o.map(i=>fb({node:i,ctx:t,plugins:r})),{...e,extends:void 0}])}function gd(e,t){if(T(e)&&Array.isArray(e.plugins)){let{plugins:r,rootConfigDir:n}=t.getVisitorData();r.push(...e.plugins.map(o=>yd(o,t.location.source.absoluteRef.replace(/^file:\/\//,""),n)))}}var y1=Mt([{severity:"error",ruleId:Wp,visitor:{ref:{},ConfigGovernance:{leave(e,t){gd(e,t)}},ConfigApisProperties:{leave(e,t){gd(e,t)}},[At.ScorecardClassicLevel]:{leave(e,t){gd(e,t)}},ConfigRoot:{leave(e,t){gd(e,t)}}}}],bo);function vd(e,t){if(T(e)&&e.extends){let{plugins:r,skipPluginEval:n}=t.getVisitorData();if(n)return;let o=fb({node:e,ctx:t,plugins:r});Object.assign(e,o),delete e.extends}}var g1=Mt([{severity:"error",ruleId:Gp,visitor:{ref:{leave(e,t,r){fa(e,r,t)}},ConfigGovernance:{leave(e,t){vd(e,t)}},ConfigApisProperties:{leave(e,t){vd(e,t)}},[At.ScorecardClassicLevel]:{leave(e,t){vd(e,t)}},ConfigRoot:{leave(e,t){vd(e,t)}}}}],bo);function u1(e,t,r){let n={plugins:[],rootConfigDir:r},o={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[Wp]:n}};return Lt({document:e,rootType:bo.ConfigRoot,normalizedVisitors:y1,resolvedRefMap:t,ctx:o}),n.plugins}function d1(e,t,r,n=!1){let o={plugins:r,skipPluginEval:n},i={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[Gp]:o}};return Lt({document:e,rootType:bo.ConfigRoot,normalizedVisitors:g1,resolvedRefMap:t,ctx:i}),e.parsed??{}}async function LZ(e){let{ref:t,doc:r,externalRefResolver:n=new ar(e.config.resolve),base:o=null}=e;if(!(t||r))throw new Error(`Document or reference is required.
134
134
  `);let i=r===void 0?await n.resolveDocument(o,t,!0):r;if(i instanceof Error)throw i;return e.collectSpecData?.(i),$m({document:i,...e,externalRefResolver:n,types:zo(Un(i.parsed))})}import*as ln from"node:path";var Ni=un(jk(),1);var _re=150,Pre=3;function Td(e,t){Pa.enabled=t;let{start:r,end:n={line:r.line,col:r.col+1},source:o}=e,i=o.getLines(),s=r.line,a=Math.max(Math.min(n.line,i.length),r.line),c=Math.max(a-s-Pre+1,0);c<2&&(c=0);let l=[],p=0;for(let f=s;f<=a&&!(c>0&&f>=a-c);f++){let m=i[f-1]||"";m!==""&&(p=Od(m));let h=f===s?r.col-1:p,y=f===a?n.col-1:m.length;l.push([`${f}`,u(m,h,y,ce.red)]),t||l.push(["",Mk(m,h,y)])}return c>0&&(l.push(["\u2026",`${Fb(p)}${ce.gray(`< ${c} more lines >`)}`]),l.push([`${a}`,u(i[a-1],-1,n.col-1,ce.red)]),t||l.push(["",Mk(i[a-1],-1,n.col-1)])),$re([[`${s-2}`,u(i[s-1-2])],[`${s-1}`,u(i[s-1-1])],...l,[`${a+1}`,u(i[a-1+1])],[`${a+2}`,u(i[a-1+2])]]);function u(f,m=-1,h=1/0,y=ce.gray){return!t||!f?f:(m===-1&&(m=Od(f)),h=Math.min(h,f.length),f.substr(0,m)+y(f.substring(m,h))+f.substr(h))}}function $re(e){let t=e.filter(([o,i])=>i!==void 0),r=Math.max(...t.map(([o])=>o.length)),n=Math.min(...t.map(([o,i])=>i===""?1/0:Od(i)));return t.map(([o,i])=>ce.gray(Are(r,o)+" |")+(i?" "+Ere(i.substring(n)):"")).join(`
135
135
  `)}function Ere(e,t=_re){let r=e.length-t;if(r>0){let n=ce.gray(`...<${r} chars>`);return e.substring(0,t-n.length)+n}else return e}function Mk(e,t=-1,r=1/0){return t===-1&&(t=Od(e)),r=Math.min(r,e.length),Fb(t)+"^".repeat(Math.max(r-t,1))}function Fb(e){return" ".repeat(e)}function Are(e,t){return Fb(e-t.length)+t}function Od(e){for(let t=0;t<e.length;t++)if(e[t]!==" ")return t;return e.length}function Dn(e){if(e.pointer===void 0)return e;let{source:t,pointer:r,reportOnKey:n}=e,o=t.getAst(Ni.safeLoad),i=Uk(o,r,!!n);return{...e,pointer:void 0,...Tre(t,i?.startPosition??1,i?.endPosition??1)}}var Lk=new WeakMap;function Ore(e){let t=Lk.get(e);if(!t){t=[0];for(let r=0;r<e.body.length;r++)e.body[r]===`
136
- `&&t.push(r+1);Lk.set(e,t)}return t}function Fk(e,t,r){let n=0,o=t.length-1;for(;n<o;){let a=Math.floor((n+o+1)/2);t[a]<=r?n=a:o=a-1}let i=t[n],s=0;return n>0&&e.body[i]==="\r"&&r>i&&(s=1),{line:n+1,col:r-i+1-s}}function Tre(e,t,r){if(t===r)return{start:{line:1,col:1},end:{line:1,col:1}};let n=Ore(e),o=Fk(e,n,t),i=Fk(e,n,r-1);return{start:o,end:{line:i.line,col:i.col+1}}}function Uk(e,t,r){let n=Yd(t.substr(2));if(e===void 0)return;let o=e;for(let i of n)if(o.kind===Ni.Kind.MAP){let s=o.mappings.find(a=>a.key.value===i);if(!s||(o=s,!s?.value))break;o=s.value}else if(o.kind===Ni.Kind.SEQ){let s=o.items[parseInt(i,10)];if(!s)break;o=s}if(r){let i=o.parent;return!i||i.kind===Ni.Kind.SEQ?o:i.kind===Ni.Kind.MAPPING?i.key:o}else return o}var Rre={INVALID_SEVERITY_LEVEL:"Invalid severity level; accepted values: error or warn"},zk={warn:e=>ce.bgYellow(ce.black(e)),error:ce.bgRed},Vk={warn:ce.yellow,error:ce.red},ca={warn:"Warning",error:"Error"},kre={error:"critical",warn:"minor"},Ire=+(_a.REDOCLY_CLI_LINT_MAX_SUGGESTIONS??5);function Rd(e){return e==="error"?1:2}function Bk(e){let t=0,r=0,n=0;for(let o of e){if(o.ignored){n++;continue}o.severity==="error"&&t++,o.severity==="warn"&&r++}return{errors:t,warnings:r,ignored:n}}function Cre(e,t){let{maxProblems:r=100,cwd:n=xt?"":process.cwd(),format:o="codeframe",color:i=Pa.enabled,totals:s=Bk(e),version:a="2.0",command:c}=t;Pa.enabled=i;let l=e.length;e=e.filter(S=>!S.ignored);let p=l-e.length;if(e=e.sort((S,E)=>Rd(S.severity)-Rd(E.severity)).slice(0,r),!l&&o!=="json"&&o!=="junit")return;switch(o){case"json":f();break;case"codeframe":for(let S=0;S<e.length;S++){let E=e[S];c==="bundle"||c==="check-config"?le.info(`${h(E,S)}
136
+ `&&t.push(r+1);Lk.set(e,t)}return t}function Fk(e,t,r){let n=0,o=t.length-1;for(;n<o;){let a=Math.floor((n+o+1)/2);t[a]<=r?n=a:o=a-1}let i=t[n],s=0;return n>0&&e.body[i]==="\r"&&r>i&&(s=1),{line:n+1,col:r-i+1-s}}function Tre(e,t,r){if(t===r)return{start:{line:1,col:1},end:{line:1,col:1}};let n=Ore(e),o=Fk(e,n,t),i=Fk(e,n,r-1);return{start:o,end:{line:i.line,col:i.col+1}}}function Uk(e,t,r){let n=Yd(t.substr(2));if(e===void 0)return;let o=e;for(let i of n)if(o.kind===Ni.Kind.MAP){let s=o.mappings.find(a=>a.key.value===i);if(!s||(o=s,!s?.value))break;o=s.value}else if(o.kind===Ni.Kind.SEQ){let s=o.items[parseInt(i,10)];if(!s)break;o=s}if(r){let i=o.parent;return!i||i.kind===Ni.Kind.SEQ?o:i.kind===Ni.Kind.MAPPING?i.key:o}else return o}var Rre={INVALID_SEVERITY_LEVEL:"Invalid severity level; accepted values: error or warn"},zk={warn:e=>ce.bgYellow(ce.black(e)),error:ce.bgRed},Vk={warn:ce.yellow,error:ce.red},ca={warn:"Warning",error:"Error"},kre={error:"critical",warn:"minor"},Ire=+(_a.REDOCLY_CLI_LINT_MAX_SUGGESTIONS??5);function Rd(e){return e==="error"?1:2}function Bk(e){let t=0,r=0,n=0;for(let o of e){if(o.ignored){n++;continue}o.severity==="error"&&t++,o.severity==="warn"&&r++}return{errors:t,warnings:r,ignored:n}}function Cre(e,t){let{maxProblems:r=100,cwd:n=xt?"":process.cwd(),format:o="codeframe",color:i=Pa.enabled,totals:s=Bk(e),version:a="2.0",command:c}=t;Pa.enabled=i;let l=e.length;e=e.filter(S=>!S.ignored);let p=l-e.length;if(e=e.sort((S,E)=>Rd(S.severity)-Rd(E.severity)).slice(0,r),!l&&o!=="json"&&o!=="junit")return;switch(o){case"json":f();break;case"codeframe":for(let S=0;S<e.length;S++){let E=e[S];c==="bundle"||c==="check-config"||c==="split"?le.info(`${h(E,S)}
137
137
  `):le.output(`${h(E,S)}
138
138
  `)}break;case"stylish":{let S=Ub(e);for(let[E,{ruleIdPad:P,locationPad:O,fileProblems:q}]of Object.entries(S)){le.output(`${ce.blue(pe(E)?E:ln.relative(n,E))}:
139
139
  `);for(let I=0;I<q.length;I++){let k=q[I];le.output(`${y(k,O,P)}
@@ -191,7 +191,7 @@ ${S.message}
191
191
  `:"",u=s.message+(l!==""||p!==""?`
192
192
 
193
193
  `:"")+l+p,f={title:s.ruleId,file:pe(a.source.absoluteRef)?a.source.absoluteRef:ln.relative(t,a.source.absoluteRef),line:a.start.line,col:a.start.col,endLine:a.end?.line,endColumn:a.end?.col};le.output(`::${c} ${r(f)}::${o(u)}
194
- `)}function r(s){return Object.entries(s).filter(([,a])=>a!=null).map(([a,c])=>`${a}=${i(c)}`).join(",")}function n(s){return s==null?"":typeof s=="string"||s instanceof String?s:JSON.stringify(s)}function o(s){return n(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function i(s){return n(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}var{theme:n_e,...jre}=ps.properties,Mre={...ps,properties:jre};async function Kk(e){let{ref:t,externalRefResolver:r=new ar(e.config.resolve)}=e,n=await r.resolveDocument(null,t,!0);return e.collectSpecData?.(n),kd({document:n,...e,externalRefResolver:r})}async function Lre(e){let{source:t,absoluteRef:r,externalRefResolver:n=new ar(e.config.resolve)}=e,o=Ko(t,r||"/");return kd({document:o,...e,externalRefResolver:n})}async function kd(e){let{document:t,customTypes:r,externalRefResolver:n,config:o}=e;if(es(t.source.absoluteRef)){let{lintGraphqlDocument:m}=await import("./UYZXI3NO.js");return m({document:t,config:o})}let i=Un(t.parsed),s=o.getRulesForSpecVersion($a(i)),a=Kr(o.extendTypes(r??zo(i),i),o),c={problems:[],specVersion:i,config:o,visitorsData:{}},l=Di(s,o,"preprocessors",i),p=Di(s,o,"rules",i),u=await Sr({rootDocument:t,rootType:a.Root,externalRefResolver:n});l.length>0&&(Lt({document:t,rootType:a.Root,normalizedVisitors:Mt(l,a),resolvedRefMap:u,ctx:c}),u=await Sr({rootDocument:t,rootType:a.Root,externalRefResolver:n}));let f=Mt(p,a);return Lt({document:t,rootType:a.Root,normalizedVisitors:f,resolvedRefMap:u,ctx:c}),c.problems.map(m=>o.addProblemToIgnore(m))}async function Fre(e){let{severity:t,externalRefResolver:r=new ar,config:n}=e;if(!n.document)throw new Error("Config document is not set.");let o={problems:[],specVersion:"config",config:n,visitorsData:{}},i=Kr(e.externalConfigTypes||Bl(Mre,n)),s=[{severity:t||"error",ruleId:"configuration struct",visitor:Ct({severity:"error"})},{severity:t||"error",ruleId:"configuration no-unresolved-refs",visitor:Et({severity:"error"})}],a=Mt(s,i),c=n.resolvedRefMap||await Sr({rootDocument:n.document,rootType:i.ConfigRoot,externalRefResolver:r});return Lt({document:n.document,rootType:i.ConfigRoot,normalizedVisitors:a,resolvedRefMap:c,ctx:o}),o.problems}import*as Ure from"node:fs";import*as zb from"node:path";function zre(e){return(zb.extname(e)===".yaml"||zb.extname(e)===".yml")&&!!Ure?.existsSync?.(e)}function Vre(e){return T(e)&&!vr(e)}async function Bre(e){return new Promise(t=>setTimeout(t,e))}function zr(e,t){if(B(t.parent))return;let r=t.key.toString(),n=e.counts??={};n[r]=(n[r]??0)+1}function Vb(e){for(let o of Object.values(e))o.items&&(o.total=o.items.size);let{xExtensions:t}=e,r=t.counts??{},n=Object.keys(r).sort();t.total=n.length,t.counts=Object.fromEntries(n.map(o=>[o,r[o]]))}var Hre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},XCodeSampleList:{enter(t,r){zr(e.xExtensions,r)}},ExamplesMap:{enter(t,r){r.key.toString()==="x-examples"&&zr(e.xExtensions,r)}},EnumDescriptions:{enter(t,r){zr(e.xExtensions,r)}},TagGroups:{enter(t,r){zr(e.xExtensions,r)}},Logo:{enter(t,r){zr(e.xExtensions,r)}},XServerList:{enter(t,r){zr(e.xExtensions,r)}},XUsePkce:{enter(t,r){zr(e.xExtensions,r)}},Operation:{enter(t,r){r.key.toString()==="x-query"&&zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},Link:{leave(t){e.links.items.add(t.operationId)}},WebhooksMap:{enter(t,r){r.key.toString()==="x-webhooks"&&zr(e.xExtensions,r)},Operation:{leave(t){if(e.webhooks.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}},Parameter:{leave(t){e.parameters.items.add(t.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}}),Kre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}},Parameter:{leave(t,{key:r}){e.parameters.items.add(r.toString())}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}}),Gre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(t,{key:r}){e.parameters.items.add(r.toString())}}}},NamedOperations:{Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}});import*as Yk from"node:fs";import*as oo from"node:path";function Wk(e,t){if(!e.rules)return{};let r={},n=[];for(let[o,i]of Object.entries(e.rules))if(o.startsWith("rule/")&&T(i)){let s=i;if(t){Gk(t,s);for(let a of s.where||[])Gk(t,a)}n.push({...s,assertionId:o})}else r[o]=i;return n.length>0&&(r.assertions=n),r}function Gk(e,t){for(let r of Object.keys(t.assertions||{})){let[n,o]=r.split("/");if(!n||!o)continue;let i=e.find(s=>s.id===n);if(!i)throw Error(`Plugin ${n} isn't found.`);if(!i.assertions||!i.assertions[o])throw Error(`Plugin ${n} doesn't export assertions function with name ${o}.`);Tn[r]=VO(i.assertions[o])}}var pa=class e{resolvedConfig;configPath;document;resolvedRefMap;resolve;_alias;plugins;ignore={};doNotResolveExamples;rules;preprocessors;decorators;recheck;_usedRules=new Set;_usedVersions=new Set;constructor(t,r={}){this.resolvedConfig=t,this.configPath=r.configPath,this.document=r.document,this.resolvedRefMap=r.resolvedRefMap,this.resolve=md(this.resolvedConfig.resolve),this._alias=r.alias,this.plugins=r.plugins||[],this.doNotResolveExamples=!!t.resolve?.doNotResolveExamples;let n=o=>Wk({rules:o},this.plugins);this.rules={oas2:n({...t.rules,...t.oas2Rules}),oas3_0:n({...t.rules,...t.oas3_0Rules}),oas3_1:n({...t.rules,...t.oas3_1Rules}),oas3_2:n({...t.rules,...t.oas3_2Rules}),async2:n({...t.rules,...t.async2Rules}),async3:n({...t.rules,...t.async3Rules}),arazzo1:n({...t.rules,...t.arazzo1Rules}),arazzo1_1:n({...t.rules,...t.arazzo1_1Rules}),overlay1:n({...t.rules,...t.overlay1Rules}),openrpc1:n({...t.rules,...t.openrpc1Rules}),graphql:n({...Vi(t.rules??{},["no-unresolved-refs"]),...t.graphqlRules})},this.preprocessors={oas2:{...t.preprocessors,...t.oas2Preprocessors},oas3_0:{...t.preprocessors,...t.oas3_0Preprocessors},oas3_1:{...t.preprocessors,...t.oas3_1Preprocessors},oas3_2:{...t.preprocessors,...t.oas3_2Preprocessors},async2:{...t.preprocessors,...t.async2Preprocessors},async3:{...t.preprocessors,...t.async3Preprocessors},arazzo1:{...t.preprocessors,...t.arazzo1Preprocessors},arazzo1_1:{...t.preprocessors,...t.arazzo1_1Preprocessors},overlay1:{...t.preprocessors,...t.overlay1Preprocessors},openrpc1:{...t.preprocessors,...t.openrpc1Preprocessors},graphql:{}},this.decorators={oas2:{...t.decorators,...t.oas2Decorators},oas3_0:{...t.decorators,...t.oas3_0Decorators},oas3_1:{...t.decorators,...t.oas3_1Decorators},oas3_2:{...t.decorators,...t.oas3_2Decorators},async2:{...t.decorators,...t.async2Decorators},async3:{...t.decorators,...t.async3Decorators},arazzo1:{...t.decorators,...t.arazzo1Decorators},arazzo1_1:{...t.decorators,...t.arazzo1_1Decorators},overlay1:{...t.decorators,...t.overlay1Decorators},openrpc1:{...t.decorators,...t.openrpc1Decorators},graphql:{}},this.recheck=t.recheck??{rules:{}},this.ignore=r.ignore??{}}forAlias(t){if(t===void 0||!T(this.resolvedConfig?.apis?.[t]))return this;let{apis:r,...n}=this.resolvedConfig,{root:o,output:i,...s}=r[t];return new e({...n,...s},{configPath:this.configPath,document:this.document,resolvedRefMap:this.resolvedRefMap,alias:t,plugins:this.plugins,ignore:this.ignore})}clearIgnoreForRef(t){let r=this.configPath?oo.dirname(this.configPath):process.cwd(),n=pe(t)?t:oo.resolve(r,t);delete this.ignore[n]}saveIgnore(){let t=this.configPath?oo.dirname(this.configPath):process.cwd(),r=oo.join(t,Ca),n={};for(let o of Object.keys(this.ignore)){let i=pe(o)?o:Ia(oo.relative(t,o)),s=n[i]=this.ignore[o];for(let a of Object.keys(s))s[a]=Array.from(s[a])}Yk.writeFileSync(r,DS+_p(n))}addIgnore(t){let r=this.ignore,n=t.location[0];if(n.pointer===void 0)return;let o=r[n.source.absoluteRef]=r[n.source.absoluteRef]||{};(o[t.ruleId]=o[t.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(t){let r=t.location[0];if(r.pointer===void 0)return t;let o=(this.ignore[r.source.absoluteRef]||{})[t.ruleId],i=o&&o.has(r.pointer);return i?{...t,ignored:i}:t}extendTypes(t,r){let n=t;for(let o of this.plugins)if(o.typeExtension!==void 0)switch(r){case"oas3_0":case"oas3_1":case"oas3_2":if(!o.typeExtension.oas3)continue;n=o.typeExtension.oas3(n,r);break;case"oas2":if(!o.typeExtension.oas2)continue;n=o.typeExtension.oas2(n,r);break;case"async2":if(!o.typeExtension.async2)continue;n=o.typeExtension.async2(n,r);break;case"async3":if(!o.typeExtension.async3)continue;n=o.typeExtension.async3(n,r);break;case"arazzo1":case"arazzo1_1":if(!o.typeExtension.arazzo1)continue;n=o.typeExtension.arazzo1(n,r);break;case"overlay1":if(!o.typeExtension.overlay1)continue;n=o.typeExtension.overlay1(n,r);break;case"openrpc1":if(!o.typeExtension.openrpc1)continue;n=o.typeExtension.openrpc1(n,r);break;case"graphql":break;default:throw new Error("Not implemented")}return n}getRuleSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.rules[r][t]||"off";return typeof n=="string"?{severity:n}:{severity:"error",...n}}getPreprocessorSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.preprocessors[r][t]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getDecoratorSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.decorators[r][t]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getUnusedRules(){let t=[],r=[],n=[];for(let o of Array.from(this._usedVersions))t.push(...Object.keys(this.rules[o]).filter(i=>!this._usedRules.has(i))),r.push(...Object.keys(this.decorators[o]).filter(i=>!this._usedRules.has(i))),n.push(...Object.keys(this.preprocessors[o]).filter(i=>!this._usedRules.has(i)));return{rules:t,preprocessors:n,decorators:r}}getRulesForSpecVersion(t){switch(t){case"oas3":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.oas3&&r.push(n.preprocessors.oas3)),this.plugins.forEach(n=>n.rules?.oas3&&r.push(n.rules.oas3)),this.plugins.forEach(n=>n.decorators?.oas3&&r.push(n.decorators.oas3)),r}case"oas2":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.oas2&&r.push(n.preprocessors.oas2)),this.plugins.forEach(n=>n.rules?.oas2&&r.push(n.rules.oas2)),this.plugins.forEach(n=>n.decorators?.oas2&&r.push(n.decorators.oas2)),r}case"async2":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.async2&&r.push(n.preprocessors.async2)),this.plugins.forEach(n=>n.rules?.async2&&r.push(n.rules.async2)),this.plugins.forEach(n=>n.decorators?.async2&&r.push(n.decorators.async2)),r}case"async3":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.async3&&r.push(n.preprocessors.async3)),this.plugins.forEach(n=>n.rules?.async3&&r.push(n.rules.async3)),this.plugins.forEach(n=>n.decorators?.async3&&r.push(n.decorators.async3)),r}case"arazzo1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.arazzo1&&r.push(n.preprocessors.arazzo1)),this.plugins.forEach(n=>n.rules?.arazzo1&&r.push(n.rules.arazzo1)),this.plugins.forEach(n=>n.decorators?.arazzo1&&r.push(n.decorators.arazzo1)),r}case"arazzo1_1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.arazzo1_1&&r.push(n.preprocessors.arazzo1_1)),this.plugins.forEach(n=>n.rules?.arazzo1_1&&r.push(n.rules.arazzo1_1)),this.plugins.forEach(n=>n.decorators?.arazzo1_1&&r.push(n.decorators.arazzo1_1)),r}case"overlay1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.overlay1&&r.push(n.preprocessors.overlay1)),this.plugins.forEach(n=>n.rules?.overlay1&&r.push(n.rules.overlay1)),this.plugins.forEach(n=>n.decorators?.overlay1&&r.push(n.decorators.overlay1)),r}case"openrpc1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.openrpc1&&r.push(n.preprocessors.openrpc1)),this.plugins.forEach(n=>n.rules?.openrpc1&&r.push(n.rules.openrpc1)),this.plugins.forEach(n=>n.decorators?.openrpc1&&r.push(n.decorators.openrpc1)),r}case"graphql":{let r=[];return this.plugins.forEach(n=>n.rules?.graphql&&r.push(n.rules.graphql)),r}}}skipRules(t){for(let r of t||[])for(let n of Bi)if(this.rules[n][r])this.rules[n][r]="off";else if(Array.isArray(this.rules[n].assertions))for(let o of this.rules[n].assertions)o.assertionId===r&&(o.severity="off")}skipPreprocessors(t){for(let r of t||[])for(let n of Bi)this.preprocessors[n][r]&&(this.preprocessors[n][r]="off")}skipDecorators(t){for(let r of t||[])for(let n of Bi)this.decorators[n][r]&&(this.decorators[n][r]="off")}};import*as np from"node:fs";import*as Qk from"node:path";function Wre(e,t){let r=Object.create(null);for(let n of Object.keys(e)){let o=e[n],i=pe(n)?n:up(t,n);r[i]=Object.create(null);for(let s of Object.keys(o))r[i][s]=new Set(o[s])}return r}async function Jk(e,t){let r=e?Qd(e):xt?"":process.cwd(),n=r?up(r,Ca):Ca;if(np?.existsSync&&!pe(n)&&!np.existsSync(n))return{};let o=await t.resolveDocument(null,n,!0);return o instanceof Error||!o.parsed?{}:Wre(o.parsed||{},r)}async function Yre(e={}){let{configPath:t=Xk(),customExtends:r,externalRefResolver:n,skipPluginEval:o,plugins:i}=e,s=n??new ar,a=t?await s.resolveDocument(null,t,!0):void 0;if(a instanceof Error)throw a;let{resolvedConfig:c,resolvedRefMap:l,plugins:p}=await db({rawConfigDocument:a?eI(a):void 0,customExtends:r,configPath:t,externalRefResolver:n,skipPluginEval:o,plugins:i}),u=await Jk(t,s);return new pa(c,{configPath:t,document:a,resolvedRefMap:l,plugins:p,ignore:u})}function Xk(e){if(!np?.existsSync)return;let t=e?Qk.resolve(e,ss):ss;return np.existsSync(t)?t:void 0}async function Zk(e,{configPath:t,externalRefResolver:r,ignore:n,plugins:o}={}){let s=Ko(typeof e=="string"?e:"",t??"");typeof e!="string"&&e&&(s.parsed=e);let{resolvedConfig:a,resolvedRefMap:c,plugins:l}=await db({rawConfigDocument:eI(s),configPath:t,externalRefResolver:r,plugins:o});return new pa(a,{configPath:t,document:s,resolvedRefMap:c,plugins:l,ignore:n})}function eI(e){if(!e.parsed)return e;let{plugins:t,resolve:r,...n}=e.parsed,o={...structuredClone(n),plugins:t?.slice(),...r&&{resolve:{...r}}};return{...e,parsed:o}}export{zre as a,wr as b,T as c,vr as d,$i as e,Vre as f,et as g,yt as h,yc as i,Bre as j,Wd as k,sN as l,aN as m,xt as n,Ia as o,mi as p,Kr as q,B as r,lp as s,pe as t,fn as u,zo as v,re as w,Ga as x,lh as y,gs as z,Ja as A,vs as B,Mh as C,gP as D,sy as E,Ay as F,By as G,E$ as H,Wy as I,Xy as J,Hre as K,Kre as L,Gre as M,Ho as N,_p as O,mn as P,es as Q,va as R,Ep as S,ar as T,Sr as U,IO as V,jO as W,Sz as X,wz as Y,Tz as Z,Rz as _,kz as $,Iz as aa,Cz as ba,Nz as ca,qz as da,Dz as ea,sm as fa,le as ga,$a as ha,Un as ia,Mt as ja,Lt as ka,ice as la,rs as ma,lm as na,$m as oa,LZ as pa,Yre as qa,Zk as ra,Dn as sa,Bk as ta,Cre as ua,pn as va,Kk as wa,Lre as xa,kd as ya,Fre as za};
194
+ `)}function r(s){return Object.entries(s).filter(([,a])=>a!=null).map(([a,c])=>`${a}=${i(c)}`).join(",")}function n(s){return s==null?"":typeof s=="string"||s instanceof String?s:JSON.stringify(s)}function o(s){return n(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function i(s){return n(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}var{theme:n_e,...jre}=ps.properties,Mre={...ps,properties:jre};async function Kk(e){let{ref:t,externalRefResolver:r=new ar(e.config.resolve)}=e,n=await r.resolveDocument(null,t,!0);return e.collectSpecData?.(n),kd({document:n,...e,externalRefResolver:r})}async function Lre(e){let{source:t,absoluteRef:r,externalRefResolver:n=new ar(e.config.resolve)}=e,o=Ko(t,r||"/");return kd({document:o,...e,externalRefResolver:n})}async function kd(e){let{document:t,customTypes:r,externalRefResolver:n,config:o}=e;if(es(t.source.absoluteRef)){let{lintGraphqlDocument:m}=await import("./UYZXI3NO.js");return m({document:t,config:o})}let i=Un(t.parsed),s=o.getRulesForSpecVersion($a(i)),a=Kr(o.extendTypes(r??zo(i),i),o),c={problems:[],specVersion:i,config:o,visitorsData:{}},l=Di(s,o,"preprocessors",i),p=Di(s,o,"rules",i),u=await Sr({rootDocument:t,rootType:a.Root,externalRefResolver:n});l.length>0&&(Lt({document:t,rootType:a.Root,normalizedVisitors:Mt(l,a),resolvedRefMap:u,ctx:c}),u=await Sr({rootDocument:t,rootType:a.Root,externalRefResolver:n}));let f=Mt(p,a);return Lt({document:t,rootType:a.Root,normalizedVisitors:f,resolvedRefMap:u,ctx:c}),c.problems.map(m=>o.addProblemToIgnore(m))}async function Fre(e){let{severity:t,externalRefResolver:r=new ar,config:n}=e;if(!n.document)throw new Error("Config document is not set.");let o={problems:[],specVersion:"config",config:n,visitorsData:{}},i=Kr(e.externalConfigTypes||Bl(Mre,n)),s=[{severity:t||"error",ruleId:"configuration struct",visitor:Ct({severity:"error"})},{severity:t||"error",ruleId:"configuration no-unresolved-refs",visitor:Et({severity:"error"})}],a=Mt(s,i),c=n.resolvedRefMap||await Sr({rootDocument:n.document,rootType:i.ConfigRoot,externalRefResolver:r});return Lt({document:n.document,rootType:i.ConfigRoot,normalizedVisitors:a,resolvedRefMap:c,ctx:o}),o.problems}import*as Ure from"node:fs";import*as zb from"node:path";function zre(e){return(zb.extname(e)===".yaml"||zb.extname(e)===".yml")&&!!Ure?.existsSync?.(e)}function Vre(e){return T(e)&&!vr(e)}async function Bre(e){return new Promise(t=>setTimeout(t,e))}function zr(e,t){if(B(t.parent))return;let r=t.key.toString(),n=e.counts??={};n[r]=(n[r]??0)+1}function Vb(e){for(let o of Object.values(e))o.items&&(o.total=o.items.size);let{xExtensions:t}=e,r=t.counts??{},n=Object.keys(r).sort();t.total=n.length,t.counts=Object.fromEntries(n.map(o=>[o,r[o]]))}var Hre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},XCodeSampleList:{enter(t,r){zr(e.xExtensions,r)}},ExamplesMap:{enter(t,r){r.key.toString()==="x-examples"&&zr(e.xExtensions,r)}},EnumDescriptions:{enter(t,r){zr(e.xExtensions,r)}},TagGroups:{enter(t,r){zr(e.xExtensions,r)}},Logo:{enter(t,r){zr(e.xExtensions,r)}},XServerList:{enter(t,r){zr(e.xExtensions,r)}},XUsePkce:{enter(t,r){zr(e.xExtensions,r)}},Operation:{enter(t,r){r.key.toString()==="x-query"&&zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},Link:{leave(t){e.links.items.add(t.operationId)}},WebhooksMap:{enter(t,r){r.key.toString()==="x-webhooks"&&zr(e.xExtensions,r)},Operation:{leave(t){if(e.webhooks.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}},Parameter:{leave(t){e.parameters.items.add(t.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}}),Kre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}},Parameter:{leave(t,{key:r}){e.parameters.items.add(r.toString())}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}}),Gre=e=>({SpecExtension:{enter(t,r){zr(e.xExtensions,r)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(t,{key:r}){e.parameters.items.add(r.toString())}}}},NamedOperations:{Operation:{leave(t){if(e.operations.total++,t.tags)for(let r of t.tags)e.tags.items.add(r)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){Vb(e)}}});import*as Yk from"node:fs";import*as oo from"node:path";function Wk(e,t){if(!e.rules)return{};let r={},n=[];for(let[o,i]of Object.entries(e.rules))if(o.startsWith("rule/")&&T(i)){let s=i;if(t){Gk(t,s);for(let a of s.where||[])Gk(t,a)}n.push({...s,assertionId:o})}else r[o]=i;return n.length>0&&(r.assertions=n),r}function Gk(e,t){for(let r of Object.keys(t.assertions||{})){let[n,o]=r.split("/");if(!n||!o)continue;let i=e.find(s=>s.id===n);if(!i)throw Error(`Plugin ${n} isn't found.`);if(!i.assertions||!i.assertions[o])throw Error(`Plugin ${n} doesn't export assertions function with name ${o}.`);Tn[r]=VO(i.assertions[o])}}var pa=class e{resolvedConfig;configPath;document;resolvedRefMap;resolve;_alias;plugins;ignore={};doNotResolveExamples;rules;preprocessors;decorators;recheck;_usedRules=new Set;_usedVersions=new Set;constructor(t,r={}){this.resolvedConfig=t,this.configPath=r.configPath,this.document=r.document,this.resolvedRefMap=r.resolvedRefMap,this.resolve=md(this.resolvedConfig.resolve),this._alias=r.alias,this.plugins=r.plugins||[],this.doNotResolveExamples=!!t.resolve?.doNotResolveExamples;let n=o=>Wk({rules:o},this.plugins);this.rules={oas2:n({...t.rules,...t.oas2Rules}),oas3_0:n({...t.rules,...t.oas3_0Rules}),oas3_1:n({...t.rules,...t.oas3_1Rules}),oas3_2:n({...t.rules,...t.oas3_2Rules}),async2:n({...t.rules,...t.async2Rules}),async3:n({...t.rules,...t.async3Rules}),arazzo1:n({...t.rules,...t.arazzo1Rules}),arazzo1_1:n({...t.rules,...t.arazzo1_1Rules}),overlay1:n({...t.rules,...t.overlay1Rules}),openrpc1:n({...t.rules,...t.openrpc1Rules}),graphql:n({...Vi(t.rules??{},["no-unresolved-refs"]),...t.graphqlRules})},this.preprocessors={oas2:{...t.preprocessors,...t.oas2Preprocessors},oas3_0:{...t.preprocessors,...t.oas3_0Preprocessors},oas3_1:{...t.preprocessors,...t.oas3_1Preprocessors},oas3_2:{...t.preprocessors,...t.oas3_2Preprocessors},async2:{...t.preprocessors,...t.async2Preprocessors},async3:{...t.preprocessors,...t.async3Preprocessors},arazzo1:{...t.preprocessors,...t.arazzo1Preprocessors},arazzo1_1:{...t.preprocessors,...t.arazzo1_1Preprocessors},overlay1:{...t.preprocessors,...t.overlay1Preprocessors},openrpc1:{...t.preprocessors,...t.openrpc1Preprocessors},graphql:{}},this.decorators={oas2:{...t.decorators,...t.oas2Decorators},oas3_0:{...t.decorators,...t.oas3_0Decorators},oas3_1:{...t.decorators,...t.oas3_1Decorators},oas3_2:{...t.decorators,...t.oas3_2Decorators},async2:{...t.decorators,...t.async2Decorators},async3:{...t.decorators,...t.async3Decorators},arazzo1:{...t.decorators,...t.arazzo1Decorators},arazzo1_1:{...t.decorators,...t.arazzo1_1Decorators},overlay1:{...t.decorators,...t.overlay1Decorators},openrpc1:{...t.decorators,...t.openrpc1Decorators},graphql:{}},this.recheck=t.recheck??{rules:{}},this.ignore=r.ignore??{}}forAlias(t){if(t===void 0||!T(this.resolvedConfig?.apis?.[t]))return this;let{apis:r,...n}=this.resolvedConfig,{root:o,output:i,...s}=r[t];return new e({...n,...s},{configPath:this.configPath,document:this.document,resolvedRefMap:this.resolvedRefMap,alias:t,plugins:this.plugins,ignore:this.ignore})}clearIgnoreForRef(t){let r=this.configPath?oo.dirname(this.configPath):process.cwd(),n=pe(t)?t:oo.resolve(r,t);delete this.ignore[n]}saveIgnore(){let t=this.configPath?oo.dirname(this.configPath):process.cwd(),r=oo.join(t,Ca),n={};for(let o of Object.keys(this.ignore)){let i=pe(o)?o:Ia(oo.relative(t,o)),s=n[i]=this.ignore[o];for(let a of Object.keys(s))s[a]=Array.from(s[a])}Yk.writeFileSync(r,DS+_p(n))}addIgnore(t){let r=this.ignore,n=t.location[0];if(n.pointer===void 0)return;let o=r[n.source.absoluteRef]=r[n.source.absoluteRef]||{};(o[t.ruleId]=o[t.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(t){let r=t.location[0];if(r.pointer===void 0)return t;let o=(this.ignore[r.source.absoluteRef]||{})[t.ruleId],i=o&&o.has(r.pointer);return i?{...t,ignored:i}:t}extendTypes(t,r){let n=t;for(let o of this.plugins)if(o.typeExtension!==void 0)switch(r){case"oas3_0":case"oas3_1":case"oas3_2":if(!o.typeExtension.oas3)continue;n=o.typeExtension.oas3(n,r);break;case"oas2":if(!o.typeExtension.oas2)continue;n=o.typeExtension.oas2(n,r);break;case"async2":if(!o.typeExtension.async2)continue;n=o.typeExtension.async2(n,r);break;case"async3":if(!o.typeExtension.async3)continue;n=o.typeExtension.async3(n,r);break;case"arazzo1":case"arazzo1_1":if(!o.typeExtension.arazzo1)continue;n=o.typeExtension.arazzo1(n,r);break;case"overlay1":if(!o.typeExtension.overlay1)continue;n=o.typeExtension.overlay1(n,r);break;case"openrpc1":if(!o.typeExtension.openrpc1)continue;n=o.typeExtension.openrpc1(n,r);break;case"graphql":break;default:throw new Error("Not implemented")}return n}getRuleSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.rules[r][t]||"off";return typeof n=="string"?{severity:n}:{severity:"error",...n}}getPreprocessorSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.preprocessors[r][t]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getDecoratorSettings(t,r){this._usedRules.add(t),this._usedVersions.add(r);let n=this.decorators[r][t]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getUnusedRules(){let t=[],r=[],n=[];for(let o of Array.from(this._usedVersions))t.push(...Object.keys(this.rules[o]).filter(i=>!this._usedRules.has(i))),r.push(...Object.keys(this.decorators[o]).filter(i=>!this._usedRules.has(i))),n.push(...Object.keys(this.preprocessors[o]).filter(i=>!this._usedRules.has(i)));return{rules:t,preprocessors:n,decorators:r}}getRulesForSpecVersion(t){switch(t){case"oas3":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.oas3&&r.push(n.preprocessors.oas3)),this.plugins.forEach(n=>n.rules?.oas3&&r.push(n.rules.oas3)),this.plugins.forEach(n=>n.decorators?.oas3&&r.push(n.decorators.oas3)),r}case"oas2":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.oas2&&r.push(n.preprocessors.oas2)),this.plugins.forEach(n=>n.rules?.oas2&&r.push(n.rules.oas2)),this.plugins.forEach(n=>n.decorators?.oas2&&r.push(n.decorators.oas2)),r}case"async2":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.async2&&r.push(n.preprocessors.async2)),this.plugins.forEach(n=>n.rules?.async2&&r.push(n.rules.async2)),this.plugins.forEach(n=>n.decorators?.async2&&r.push(n.decorators.async2)),r}case"async3":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.async3&&r.push(n.preprocessors.async3)),this.plugins.forEach(n=>n.rules?.async3&&r.push(n.rules.async3)),this.plugins.forEach(n=>n.decorators?.async3&&r.push(n.decorators.async3)),r}case"arazzo1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.arazzo1&&r.push(n.preprocessors.arazzo1)),this.plugins.forEach(n=>n.rules?.arazzo1&&r.push(n.rules.arazzo1)),this.plugins.forEach(n=>n.decorators?.arazzo1&&r.push(n.decorators.arazzo1)),r}case"arazzo1_1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.arazzo1_1&&r.push(n.preprocessors.arazzo1_1)),this.plugins.forEach(n=>n.rules?.arazzo1_1&&r.push(n.rules.arazzo1_1)),this.plugins.forEach(n=>n.decorators?.arazzo1_1&&r.push(n.decorators.arazzo1_1)),r}case"overlay1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.overlay1&&r.push(n.preprocessors.overlay1)),this.plugins.forEach(n=>n.rules?.overlay1&&r.push(n.rules.overlay1)),this.plugins.forEach(n=>n.decorators?.overlay1&&r.push(n.decorators.overlay1)),r}case"openrpc1":{let r=[];return this.plugins.forEach(n=>n.preprocessors?.openrpc1&&r.push(n.preprocessors.openrpc1)),this.plugins.forEach(n=>n.rules?.openrpc1&&r.push(n.rules.openrpc1)),this.plugins.forEach(n=>n.decorators?.openrpc1&&r.push(n.decorators.openrpc1)),r}case"graphql":{let r=[];return this.plugins.forEach(n=>n.rules?.graphql&&r.push(n.rules.graphql)),r}}}skipRules(t){for(let r of t||[])for(let n of Bi)if(this.rules[n][r])this.rules[n][r]="off";else if(Array.isArray(this.rules[n].assertions))for(let o of this.rules[n].assertions)o.assertionId===r&&(o.severity="off")}skipPreprocessors(t){for(let r of t||[])for(let n of Bi)this.preprocessors[n][r]&&(this.preprocessors[n][r]="off")}skipDecorators(t){for(let r of t||[])for(let n of Bi)this.decorators[n][r]&&(this.decorators[n][r]="off")}};import*as np from"node:fs";import*as Qk from"node:path";function Wre(e,t){let r=Object.create(null);for(let n of Object.keys(e)){let o=e[n],i=pe(n)?n:up(t,n);r[i]=Object.create(null);for(let s of Object.keys(o))r[i][s]=new Set(o[s])}return r}async function Jk(e,t){let r=e?Qd(e):xt?"":process.cwd(),n=r?up(r,Ca):Ca;if(np?.existsSync&&!pe(n)&&!np.existsSync(n))return{};let o=await t.resolveDocument(null,n,!0);return o instanceof Error||!o.parsed?{}:Wre(o.parsed||{},r)}async function Yre(e={}){let{configPath:t=Xk(),customExtends:r,externalRefResolver:n,skipPluginEval:o,plugins:i}=e,s=n??new ar,a=t?await s.resolveDocument(null,t,!0):void 0;if(a instanceof Error)throw a;let{resolvedConfig:c,resolvedRefMap:l,plugins:p}=await db({rawConfigDocument:a?eI(a):void 0,customExtends:r,configPath:t,externalRefResolver:n,skipPluginEval:o,plugins:i}),u=await Jk(t,s);return new pa(c,{configPath:t,document:a,resolvedRefMap:l,plugins:p,ignore:u})}function Xk(e){if(!np?.existsSync)return;let t=e?Qk.resolve(e,ss):ss;return np.existsSync(t)?t:void 0}async function Zk(e,{configPath:t,externalRefResolver:r,ignore:n,plugins:o}={}){let s=Ko(typeof e=="string"?e:"",t??"");typeof e!="string"&&e&&(s.parsed=e);let{resolvedConfig:a,resolvedRefMap:c,plugins:l}=await db({rawConfigDocument:eI(s),configPath:t,externalRefResolver:r,plugins:o});return new pa(a,{configPath:t,document:s,resolvedRefMap:c,plugins:l,ignore:n})}function eI(e){if(!e.parsed)return e;let{plugins:t,resolve:r,...n}=e.parsed,o={...structuredClone(n),plugins:t?.slice(),...r&&{resolve:{...r}}};return{...e,parsed:o}}export{zre as a,wr as b,T as c,vr as d,$i as e,Vre as f,et as g,yt as h,yc as i,Bre as j,Wd as k,sN as l,aN as m,xt as n,Ia as o,mi as p,Kr as q,B as r,lp as s,dn as t,pe as u,fn as v,zo as w,re as x,Ga as y,lh as z,gs as A,Ja as B,vs as C,Mh as D,gP as E,sy as F,Ay as G,By as H,E$ as I,Wy as J,Xy as K,Hre as L,Kre as M,Gre as N,Ho as O,_p as P,mn as Q,es as R,va as S,hn as T,Ep as U,ar as V,Sr as W,IO as X,jO as Y,Sz as Z,wz as _,Tz as $,Rz as aa,kz as ba,Iz as ca,Cz as da,Nz as ea,qz as fa,Dz as ga,sm as ha,le as ia,$a as ja,Un as ka,Mt as la,Lt as ma,ice as na,rs as oa,lm as pa,$m as qa,LZ as ra,Yre as sa,Zk as ta,Dn as ua,Bk as va,Cre as wa,pn as xa,Kk as ya,Lre as za,kd as Aa,Fre as Ba};
195
195
  /*! Bundled license information:
196
196
 
197
197
  js-yaml/dist/js-yaml.mjs:
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./KSTWCX27.js";import"./DBWAOHZO.js";import"./J56XVM43.js";import"./WZXA5XPB.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as mockGenerator};
7
+ import{a}from"./PKYNMOKV.js";import"./BZBFESBB.js";import"./4WAQNM63.js";import"./WZXA5XPB.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as mockGenerator};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as x,b as f,c as m,d}from"./CSBPXWYJ.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
7
+ import{a as x,b as f,c as m,d}from"./NADFEIIN.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
8
8
  `)}function b(e,t){if(!f(e))return!1;let n=t.get(e.name);return n!==void 0&&n.spec.style!=="link"}function j(e,t,n){let r=[...e.some(a=>b(a,n))?["infiniteQueryOptions"]:[],...e.some(f)?["queryOptions"]:[]],s=[...e.filter(m).map(d),"RequestOptions"].sort().map(a=>`type ${a}`),i=[];return r.length>0&&i.push(`import { ${r.join(", ")} } from "@tanstack/${t.framework}-query";`),i.push(`import { client, ${s.join(", ")} } from "${t.sdkModule}";`),i.join(`
9
9
  `)}function K(e,t){let n=M(e,t);return m(e)?`export const ${e.name}QueryKey = (vars?: ${d(e)}) =>
10
10
  vars === undefined ? ([${n}] as const) : ([${n}, vars] as const);`:`export const ${e.name}QueryKey = () => [${n}] as const;`}function M(e,t){return t===void 0?`"${e.name}"`:`${h(t)}, "${e.name}"`}function Q(e,t,n,r,s){return`/**
@@ -8,4 +8,4 @@ import{a as f,m as u}from"./UW4UC7ZI.js";function m(e,t){let n=t??{},i=e.specNam
8
8
  `))e.line(c);e.line("```"),e.blank()}let a=[...t.pathParams,...t.queryParams,...t.headerParams];a.length>0&&T(e,a),t.requestBody!==void 0&&e.line(`Body: \`${t.requestBody.contentType}\`${t.requestBody.required?", required":", optional"}, of type ${o(t.requestBody.schema)}.`);let r=t.successResponses[0];e.line(r===void 0?"Returns no content.":`Returns \`${r.contentType}\`, of type ${o(r.schema)}.`),(n.paginated!==void 0?n.paginated.has(t.name):m(t,n.pagination)!==void 0)&&e.line("This operation is paginated, so the SDK gives it page and item iterators."),t.successResponses.some(c=>c.contentType==="text/event-stream")&&e.line("This operation streams server-sent events, so the SDK iterates the events."),P(t)&&e.line("This operation returns binary content."),e.blank()}function v(e,t){let n=new f;if(t.frontmatter&&(n.line("---"),n.line(`title: ${t.title}`),n.line("---"),n.blank()),n.line(`# ${t.title}`),n.blank(),n.line(`Generated reference for the ${t.language.label} SDK, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line(t.language.requires),n.blank(),n.line("## Authentication"),n.blank(),e.securitySchemes.length===0)n.line("The description declares no security schemes.");else{n.line("The description declares these schemes, which you pass to the client:"),n.blank(),n.line("| Scheme | Kind | Sent as |"),n.line("| ------ | ---- | ------- |");for(let r of e.securitySchemes){let s=r.kind==="bearer"?"`Authorization: Bearer <token>`":r.kind==="basic"?"`Authorization: Basic <base64>`":r.kind==="apiKeyHeader"?`the \`${r.headerName}\` header`:r.kind==="apiKeyQuery"?`the \`${r.paramName}\` query parameter`:`the \`${r.cookieName}\` cookie`;n.line(`| \`${r.key}\` | ${r.kind} | ${s} |`)}}n.blank();let i=e.services.flatMap(r=>r.operations),a=[...new Set(i.map(r=>r.tags[0]))];for(let r of a){n.line(r===void 0?"## Operations":`## ${r}`),n.blank();for(let s of i.filter(c=>c.tags[0]===r))C(n,s,t)}return n.toString().replace(/\n{3,}/g,`
9
9
 
10
10
  `).trimEnd()+`
11
- `}var ee=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function E(e){return e}function w(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function A(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function q(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function de(e){return e}async function ke(e){return(await import("./FG62OWSV.js")).generateClient(e)}export{m as a,h as b,x as c,k as d,d as e,b as f,S as g,$ as h,v as i,ee as j,E as k,w as l,A as m,q as n,de as o,ke as p};
11
+ `}var ee=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function E(e){return e}function w(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function A(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function q(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function de(e){return e}async function ke(e){return(await import("./SL6UQOKE.js")).generateClient(e)}export{m as a,h as b,x as c,k as d,d as e,b as f,S as g,$ as h,v as i,ee as j,E as k,w as l,A as m,q as n,de as o,ke as p};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./NC5GB4G5.js";import"./LRUXN6H5.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{j as InvalidReuniteUrlError,f as REUNITE_URLS,l as RedoclyOAuthClient,k as RedoclyOAuthDeviceFlow,c as ReuniteApi,b as ReuniteApiClient,a as ReuniteApiError,o as collectFilesToPush,u as evaluatePluginsFromCode,r as fetchRemoteScorecardAndPlugins,e as getApiKeys,g as getDomain,d as getMostUrgentSunsetWarning,p as getPushStatus,h as getReuniteUrl,t as getTarget,v as isAllowedScorecardProjectUrl,i as isValidReuniteUrl,n as pushFiles,s as resolveConfigForTarget,m as resolveProjectRef,w as validateScorecard,q as waitForDeployment};
7
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./W7VT3BOM.js";import"./LRUXN6H5.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{j as InvalidReuniteUrlError,f as REUNITE_URLS,l as RedoclyOAuthClient,k as RedoclyOAuthDeviceFlow,c as ReuniteApi,b as ReuniteApiClient,a as ReuniteApiError,o as collectFilesToPush,u as evaluatePluginsFromCode,r as fetchRemoteScorecardAndPlugins,e as getApiKeys,g as getDomain,d as getMostUrgentSunsetWarning,p as getPushStatus,h as getReuniteUrl,t as getTarget,v as isAllowedScorecardProjectUrl,i as isValidReuniteUrl,n as pushFiles,s as resolveConfigForTarget,m as resolveProjectRef,w as validateScorecard,q as waitForDeployment};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as D}from"./NSLUCFIM.js";import{T as C,U as j,ga as $,ia as k,ja as M,ka as S,ma as b,q as F,t as R,v as x}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{relative as I,resolve as U}from"node:path";var A=20;async function B({argv:o,config:t,collectSpecData:r}){let[{path:s}]=await D([o.api],t),n=new C(t.resolve),e=await n.resolveDocument(null,s,!0);r?.(e);let i=k(e.parsed),d=F(t.extendTypes(x(i),i),t),p=new Map,u=({source:l,pointer:c},f,N)=>{let v=`${l.absoluteRef}${c}`,y=p.get(v);if(!y){p.set(v,{absoluteRef:l.absoluteRef,pointer:c,types:[f],resolvesTo:N});return}y.types.includes(f)||y.types.push(f),y.resolvesTo||(y.resolvesTo=N)},m={any:{enter(l,{location:c,type:f}){u(c,f.name)}},ref(l,{location:c,type:f},N){u(c,f.name,N.location)}},h={problems:[],specVersion:i,config:t,visitorsData:{}},a=await j({rootDocument:e,rootType:d.Root,externalRefResolver:n});if(S({document:e,rootType:d.Root,normalizedVisitors:M([{severity:"warn",ruleId:"inspect-node-types",visitor:m}],d),resolvedRefMap:a,ctx:h}),o.pointer){let l=W(p,o.pointer,e.source.absoluteRef);o.parents?L(w(p,l,e.source.absoluteRef)):$.output(`${l.types.join(`
7
+ import{b as D}from"./MJYI42E6.js";import{V as C,W as j,ia as $,ka as k,la as M,ma as S,oa as b,q as F,u as R,w as x}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{relative as I,resolve as U}from"node:path";var A=20;async function B({argv:o,config:t,collectSpecData:r}){let[{path:s}]=await D([o.api],t),n=new C(t.resolve),e=await n.resolveDocument(null,s,!0);r?.(e);let i=k(e.parsed),d=F(t.extendTypes(x(i),i),t),p=new Map,u=({source:l,pointer:c},f,N)=>{let v=`${l.absoluteRef}${c}`,y=p.get(v);if(!y){p.set(v,{absoluteRef:l.absoluteRef,pointer:c,types:[f],resolvesTo:N});return}y.types.includes(f)||y.types.push(f),y.resolvesTo||(y.resolvesTo=N)},m={any:{enter(l,{location:c,type:f}){u(c,f.name)}},ref(l,{location:c,type:f},N){u(c,f.name,N.location)}},h={problems:[],specVersion:i,config:t,visitorsData:{}},a=await j({rootDocument:e,rootType:d.Root,externalRefResolver:n});if(S({document:e,rootType:d.Root,normalizedVisitors:M([{severity:"warn",ruleId:"inspect-node-types",visitor:m}],d),resolvedRefMap:a,ctx:h}),o.pointer){let l=W(p,o.pointer,e.source.absoluteRef);o.parents?L(w(p,l,e.source.absoluteRef)):$.output(`${l.types.join(`
8
8
  `)}
9
9
  `);return}let g=[...p.values()];if(o.summary)V(g);else if(o.type){let l=o.type,c=g.filter(({types:f})=>f.includes(l));if(c.length===0)throw new b(`No nodes of type '${l}'. Run the command with --summary to see the types used in this description.`);o.parents?L(c.flatMap(f=>w(p,f,e.source.absoluteRef)),l):E(c)}else E(g)}function w(o,t,r,s=new Set){let n=`${t.absoluteRef}${t.pointer}`;if(s.has(n))return[[t]];s.add(n);let e=[],i=t.pointer.split("/");for(let p=1;p<i.length;p++){let u=p===1?"#/":i.slice(0,p).join("/");if(u===t.pointer)continue;let m=o.get(`${t.absoluteRef}${u}`);m&&e.push(m)}e.push(t);let d=[];e[0].absoluteRef===r&&e[0].pointer==="#/"&&d.push(e);for(let[p,u]of e.entries()){let m=[...o.values()].filter(a=>a.resolvesTo?.source.absoluteRef===u.absoluteRef&&a.resolvesTo.pointer===u.pointer),h=e.slice(p+1);for(let a of m)d.push(...w(o,a,r,s).map(g=>[...g,...h]))}return d.length?d:[e]}function L(o,t){let r=new Set(o.map(s=>s.map(({types:n})=>t&&n.includes(t)?t:n.join(", ")).join(" \u2192 ")));for(let s of r)$.output(`${s}
10
10
  `)}function W(o,t,r){let[s,n]=t.split("#"),e=s?R(s)?s:U(process.cwd(),s):r,i=o.get(`${e}#${n||"/"}`);if(!i)throw new b(`No node at ${t}. ${z(o,e,`#${n||"/"}`,s)??`Check the pointer, and make sure the file is referenced from ${T(r)}.`}`);return i}function z(o,t,r,s){let n=r.split("/");for(let e=n.length-1;e>=1;e--){let i=e===1?"#/":n.slice(0,e).join("/"),d=o.get(`${t}${i}`);if(!d)continue;let p=n[e].toLowerCase(),u=e===1?"#/":`${i}/`,m=[...o.values()].filter(c=>c.absoluteRef===t&&c.pointer.startsWith(u)&&!c.pointer.slice(u.length).includes("/")),h=m.filter(c=>c.pointer.slice(u.length).toLowerCase().includes(p)),a=(h.length?h:m).map(c=>` ${s}${c.pointer}`),g=a.length-A;g>0&&(a.length=A,a.push(` \u2026and ${g} more`));let l=`The closest node is ${d.types.join(", ")} at ${s}${i}.`;return a.length?`${l} Did you mean:
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./6367YNHA.js";import"./DBWAOHZO.js";import"./J56XVM43.js";import"./WZXA5XPB.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
7
+ import{a}from"./J4NCFMOR.js";import"./BZBFESBB.js";import"./4WAQNM63.js";import"./WZXA5XPB.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
@@ -0,0 +1,11 @@
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 C,b as Z,c as ee,d as Ne,e as te,f as ne,g as Se,h as oe}from"./VCV3FKMW.js";import{a as Fe,b as De}from"./64G5RPLP.js";import{f as de,g as L,h as ue,i as Ce,l as W,m as h,n as Oe}from"./MJYI42E6.js";import{$ as le,O as pe,S as ce,T as fe,aa as ye,b as me,c as j,ca as u,d as O,h as ae,ia as N,ka as he,o as A,oa as S,r as d,t as v,va as ge,wa as Ae}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as U from"node:fs";import*as Ge from"node:path";import{performance as Xe}from"perf_hooks";import*as G from"node:path";import*as R from"node:path";function F(e,t,o){let n=R.resolve(e),r=R.resolve(t);if(r!==n&&!r.startsWith(n+R.sep))throw new S(`Refusing to write "${o}" outside the output directory.`)}import*as we from"node:path";function D(e,t,o,n,r){let m=o?`.${o}`:"",a=we.join(e,t),i=a+m,p=n.get(i.toLowerCase());for(let s=2;n.has(i.toLowerCase());s++)i=`${a}-${s}${m}`;return r&&p&&p!==t&&p.toLowerCase()===t.toLowerCase()&&r.conflicts.push({name:t,collidingName:p,filename:i,pointer:r.pointer}),n.set(i.toLowerCase(),t),i}function $(e,t,o,n,r,m,a){let i={},p=new Map;for(let[s,c]of Object.entries(e||{})){if(d(c))continue;let f=D(n,L(s,r),m,p,{conflicts:a,pointer:`${t}/${v(s)}`});F(o,f,s),i[s]=f}return i}import*as Pe from"node:path";function g(e,t,o={}){Se(e,r=>{if(d(r)&&oe(r.$ref))n(r,"$ref");else if(j(r.discriminator)&&j(r.discriminator.mapping)){let{mapping:m}=r.discriminator;for(let a of Object.keys(m)){let i=m[a];typeof i=="string"&&oe(i)&&n(r.discriminator.mapping,a)}}});function n(r,m){let a=r[m].split("/"),i=a.pop(),p=a[2],s=o[p];if(!s||!s[i])return;let c=A(Pe.relative(t,s[i].filename));c.startsWith(".")||(c="./"+c),r[m]=c}}function Y(e,t,o="warn"){if(o==="off"||e.length===0)return;let n=e.map(({name:r,collidingName:m,filename:a,pointer:i})=>({ruleId:"split",severity:o,message:`${r} and ${m} would share one file on a case-insensitive file system`+(o==="error"?".":`, saving ${r} to ${a}.`),location:[{source:t,pointer:i,reportOnKey:!0}],suggest:[]}));if(Ae(n,{totals:ge(n),command:"split"}),o==="error")throw new S("\u274C Errors encountered while splitting: files not created.")}import*as ie from"node:path";var Ee=["schemas","messages","securitySchemes","parameters","correlationIds","messageTraits","operationTraits","serverBindings","channelBindings","operationBindings","messageBindings"];var xe=["schemas","messages","securitySchemes","servers","serverVariables","parameters","replies","replyAddresses","correlationIds","messageTraits","operationTraits","tags","externalDocs","serverBindings","channelBindings","operationBindings","messageBindings"];function H(e,t){return(t==="async2"?Ee:xe).filter(n=>n in e)}function ve({asyncapi:e,asyncapiDir:t,componentsFiles:o,ext:n,specVersion:r,conflicts:m}){let a=e.components;if(!a)return;let i=ie.join(t,C),p=H(a,r);for(let s of p){let c=ie.join(i,s),f=new Map;for(let l of Object.keys(a[s]||{})){let y=D(c,l,n,f,{conflicts:m,pointer:`#/components/${s}/${v(l)}`});F(t,y,l),o[s]=o[s]||{},o[s][l]={filename:y}}}}import*as be from"node:fs";import*as V from"node:path";import*as P from"node:fs";import*as $e from"node:path";function E(e,t,o){if(!P.existsSync(e)||!P.statSync(e).isDirectory())return;let n=P.readdirSync(e);for(let r of n){let m=$e.join(e,r);P.statSync(m).isDirectory()?E(m,t,o):t(m,e,o)}}function b(e,t,o){if(!ce(e))return;let n=W(e);g(n,t,o),h(n,e)}function Te({channels:e,channelsFiles:t,asyncapiDir:o,outDir:n,componentsFiles:r}){if(e){be.mkdirSync(n,{recursive:!0});for(let m of Object.keys(e)){let a=e[m];if(d(a))continue;let i=t[m];g(a,V.dirname(i),r),h(a,i),e[m]={$ref:A(V.relative(o,i))},E(n,b,r)}}}import*as Be from"node:fs";import*as k from"node:path";import*as ke from"node:fs";function K(e){return e!=="securitySchemes"}function z(e,t){K(t)&&ke.mkdirSync(e,{recursive:!0})}import*as je from"node:fs";function q(e,t){return je.existsSync(e)&&!me(W(e),t)}import*as Re from"node:path";function T(e,t,o){if(!(!j(e)&&!Array.isArray(e))){if(Array.isArray(e)){for(let n of e)T(n,t,o);return}for(let n of Object.keys(e)){let r=e[n];if(n==="$ref"&&typeof r=="string"&&r.startsWith("#/channels/")){let m=r.slice(11),a=m.indexOf("/"),i=a===-1?m:m.slice(0,a),p=a===-1?"":m.slice(a),s=o[i];if(s){let c=A(Re.relative(t,s));e[n]=p?`${c}#${p}`:c}}else T(r,t,o)}}}function _e(e,t){let o=e.components;o&&(O(o[t])&&delete o[t],O(o)&&delete e.components)}function Ie({asyncapi:e,asyncapiDir:t,componentsFiles:o,channelsFiles:n,specVersion:r}){let m=e.components;if(m){let p=function(s){let c=k.join(a,s);z(c,s);for(let f of Object.keys(m?.[s]||{})){let{filename:l}=o[s][f],y=m?.[s]?.[f];g(y,k.dirname(l),o),T(y,k.dirname(l),n),q(l,y)?N.warn(`warning: conflict for ${f} - file already exists with different content: ${u(l)} ... Skip.
8
+ `):h(y,l),delete m?.[s]?.[f]}_e(e,s)},a=k.join(t,C);Be.mkdirSync(a,{recursive:!0}),H(m,r).forEach(p)}}import*as Me from"node:fs";import*as _ from"node:path";function Le({operations:e,operationFiles:t,asyncapiDir:o,outDir:n,componentsFiles:r,channelsFiles:m}){if(e){Me.mkdirSync(n,{recursive:!0});for(let a of Object.keys(e)){let i=e[a];if(d(i))continue;let p=t[a];g(i,_.dirname(p),r),T(i,_.dirname(p),m),h(i,p),e[a]={$ref:A(_.relative(o,p))},E(n,b,r)}}}function We({asyncapi:e,asyncapiDir:t,pathSeparator:o,ext:n,specVersion:r,source:m,fileNameConflictsSeverity:a}){let i=G.join(t,te),p=G.join(t,ne),s=r==="async3"?e.operations:void 0,c={},f=[];ve({asyncapi:e,asyncapiDir:t,componentsFiles:c,ext:n,specVersion:r,conflicts:f});let l=$(e.channels,`#/${te}`,t,i,o,n,f),y=$(s,`#/${ne}`,t,p,o,n,f);Y(f,m,a),Te({channels:e.channels,channelsFiles:l,asyncapiDir:t,outDir:i,componentsFiles:c}),Ie({asyncapi:e,asyncapiDir:t,componentsFiles:c,channelsFiles:l,specVersion:r}),Le({operations:s,operationFiles:y,asyncapiDir:t,outDir:p,componentsFiles:c,channelsFiles:l}),g(e,t,c),h(e,G.join(t,`asyncapi.${n}`))}import*as Q from"node:path";import*as se from"node:path";function X(e){return e?De.filter(t=>K(t)&&Object.keys(e).includes(t)):[]}function Ye(e,t,o,n,r){let{components:m}=e;if(!m)return;let a=se.join(t,C);for(let i of X(m)){let p=se.join(a,i),s=new Map;for(let c of Object.keys(m[i]||{})){let f=D(p,c,n,s,{conflicts:r,pointer:`#/components/${i}/${v(c)}`});F(t,f,c);let l=[];i==="schemas"&&(l=(m[i]?.[c]?.allOf||[]).map(({$ref:y})=>y).filter(ae)),o[i]=o[i]||{},o[i][c]={inherits:l,filename:f}}}}import*as Ke from"node:fs";import*as B from"node:path";import*as J from"node:path";function He(e,t,o,n){if(!e.discriminator)return;let r=`#/${C}/schemas/${t}`,m={};for(let[s,{inherits:c,filename:f}]of Object.entries(n))if(c.indexOf(r)>-1){let l=A(J.relative(J.dirname(o),f));m[s]=l.startsWith(".")?l:"./"+l}if(O(m))return;let a=e.properties[e.discriminator.propertyName],i=a&&a.enum,p=e.discriminator.mapping=e.discriminator.mapping||{};for(let s of Object.keys(m))i&&!i.includes(s)||(p[s]&&p[s]!==m[s]&&N.warn(`warning: explicit mapping overlaps with local mapping entry ${le(s)} at ${u(o)}. Please check it.`),p[s]=m[s])}function Ve(e,t){e.components&&O(e.components[t])&&delete e.components[t],O(e.components)&&delete e.components}function ze(e,t,o){let{components:n}=e;if(n){let a=function(i){let p=B.join(r,i);z(p,i);for(let s of Object.keys(n?.[i]||{})){let{filename:c}=o[i][s],f=n?.[i]?.[s];g(f,B.dirname(c),o),He(f,s,c,o.schemas||{}),q(c,f)?N.warn(`warning: conflict for ${s} - file already exists with different content: ${u(c)} ... Skip.
9
+ `):h(f,c),delete e.components?.[i]?.[s]}Ve(e,i)},r=B.join(t,C);Ke.mkdirSync(r,{recursive:!0}),X(n).forEach(a)}}import*as I from"node:fs";import*as x from"node:path";function re(e,t,o,n,r,m,a=""){if(!e)return;I.mkdirSync(n,{recursive:!0});let i=new Map;for(let p of Object.keys(e)){let s=e[p];if(d(s))continue;let c=t[p];for(let f of Fe){let l=s[f],y=l?.["x-code-samples"]||l?.["x-codeSamples"];if(!(!y||!Array.isArray(y)))for(let w of y){if(w.source&&w.source.$ref)continue;let M=D(x.join(o,"code_samples",ue(w.lang),a+L(p,m)),f,Ce(w.lang).slice(1),i);F(o,M,w.lang),I.mkdirSync(x.dirname(M),{recursive:!0}),I.writeFileSync(M,w.source),w.source={$ref:A(x.relative(n,M))}}}h(s,c),e[p]={$ref:A(x.relative(o,c))},E(n,b,r)}}function qe(e,t,o,n,r,m){let a=Q.join(t,Z),i=Q.join(t,ee),p=e.webhooks||e["x-webhooks"],s="webhooks"in e&&e.webhooks?`#/${ee}`:`#/${Ne}`,c={},f=[];Ye(e,t,c,n,f);let l=$(e.paths,`#/${Z}`,t,a,o,n,f),y=$(p,s,t,i,o,n,f);Y(f,r,m),ze(e,t,c),re(e.paths,l,t,a,c,o),re(p,y,t,i,c,o,"webhook_"),g(e,t,c),h(e,Q.join(t,`openapi.${n}`))}async function ro({argv:e,collectSpecData:t}){let o=Xe.now(),{api:n,outDir:r,separator:m}=e,a=Oe(n);if(!U.existsSync(n))throw new S(`File ${u(n)} does not exist.`);let i=new fe(Ge.resolve(n),U.readFileSync(n,"utf-8")),p=pe(i.body,{filename:n});t?.({parsed:p});let s=he(p);switch(s){case"async2":case"async3":We({asyncapi:p,asyncapiDir:r,pathSeparator:m,ext:a,specVersion:s,source:i,fileNameConflictsSeverity:e["file-name-conflicts-severity"]});break;case"oas3_0":case"oas3_1":case"oas3_2":qe(p,r,m,a,i,e["file-name-conflicts-severity"]);break;case"oas2":throw new S("OpenAPI 2 is not supported by this command.");default:throw new S("File does not conform to the OpenAPI or AsyncAPI Specification. Version is not specified.")}N.info(`\u{1FA93} Document: ${u(n)} ${ye("is successfully split")}
10
+ and all related files are saved to the directory: ${u(r)}
11
+ `),de("split",o,n)}export{ro as handleSplit};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{b as $,e as T,o as E,p as F,r as I,t as L,v as m}from"./NSLUCFIM.js";import{aa as w,ea as l,ga as n,l as x,na as h,ta as A,ua as g,wa as k}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
7
+ import{b as $,e as T,o as E,p as F,r as I,t as L,v as m}from"./MJYI42E6.js";import{ca as w,ga as l,ia as n,l as x,pa as h,va as A,wa as g,ya as k}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
8
8
 
9
9
  `),f===void 0?n.info(l(`validating ${m(o)}...
10
10
  `)):n.info(l(`validating ${m(o)} using lint rules for api '${f}'...
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as R,b as u,c as f,d}from"./TJGR5OHF.js";import{d as y,e as G,f as x}from"./IDDPOAAO.js";import{c as g,d as S,e as h}from"./ECKYES2X.js";import{c as k,d as v,e as b}from"./O553F5PN.js";import{a as D,b as E,c as q,d as z}from"./NBRDOUIR.js";import{a as o}from"./B7HK2FMY.js";import{a,b as p,c as s}from"./TPR5SEOT.js";import"./2U6O26CV.js";import{a as m}from"./6367YNHA.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./BRJNFWLD.js";import"./CSBPXWYJ.js";import{a as I,d as M,e as N}from"./UESEVDDS.js";import{a as l}from"./KSTWCX27.js";import{a as H,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir}from"./DBWAOHZO.js";import"./J56XVM43.js";import{a as U}from"./WZXA5XPB.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import{e as T,h as j,k as w}from"./LD5MEXEL.js";import{a as _,b as B,c as F,d as J,e as Q,f as K,g as P,h as V,i as W,j as X,k as Y,l as Z,m as $,n as rr}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Dr(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{ir as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Dr as collectGeneratedFiles,K as deref,V as discriminatorCases,Z as docText,Y as enumValues,P as flattenAllOf,z as generateClient,rr as headerCoerceType,J as identifierFor,nr as isBinaryContentType,or as isMultipartBody,W as isNullable,er as jsonSuccessSchema,I as operationSignature,sr as paginationItemSchema,H as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,mr as renderReferencePage,T as safeIdent,$ as schemaAtPointer,pr as securityRequirements,ar as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,X as unwrapNullable};
7
+ import{a as R,b as u,c as f,d}from"./XZKUPNLZ.js";import{d as y,e as G,f as x}from"./XQA4EEZA.js";import{c as g,d as S,e as h}from"./IJ43XWPG.js";import{c as k,d as v,e as b}from"./GC26XZYZ.js";import{a as D,b as E,c as q,d as z}from"./Q526MFO3.js";import{a as o}from"./BHUCIWQF.js";import{a,b as p,c as s}from"./ZJAFKITR.js";import"./2U6O26CV.js";import{a as m}from"./J4NCFMOR.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./LF35KJ5M.js";import"./NADFEIIN.js";import{a as I,d as M,e as N}from"./O5WCU6SC.js";import{a as l}from"./PKYNMOKV.js";import{a as H,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir}from"./BZBFESBB.js";import"./4WAQNM63.js";import{a as U}from"./WZXA5XPB.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import{e as T,h as j,k as w}from"./LD5MEXEL.js";import{a as _,b as B,c as F,d as J,e as Q,f as K,g as P,h as V,i as W,j as X,k as Y,l as Z,m as $,n as rr}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Dr(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{ir as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Dr as collectGeneratedFiles,K as deref,V as discriminatorCases,Z as docText,Y as enumValues,P as flattenAllOf,z as generateClient,rr as headerCoerceType,J as identifierFor,nr as isBinaryContentType,or as isMultipartBody,W as isNullable,er as jsonSuccessSchema,I as operationSignature,sr as paginationItemSchema,H as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,mr as renderReferencePage,T as safeIdent,$ as schemaAtPointer,pr as securityRequirements,ar as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,X as unwrapNullable};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as c}from"./PCJ3RO4V.js";import{h as s,l as a}from"./NC5GB4G5.js";import"./LRUXN6H5.js";import{_ as t,ga as e,ma as i}from"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function y({argv:r,config:l,version:d}){let o=s(l,r.residency);try{let n=new a(d);r.verbose&&(e.info(`OAuth client initialized.
7
+ import{a as c}from"./V46KUEYR.js";import{h as s,l as a}from"./W7VT3BOM.js";import"./LRUXN6H5.js";import{aa as t,ia as e,oa as i}from"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function y({argv:r,config:l,version:d}){let o=s(l,r.residency);try{let n=new a(d);r.verbose&&(e.info(`OAuth client initialized.
8
8
  `),e.info(`Local credentials file path: ${n.credentialsFilePath}
9
9
  `)),await n.login(o,c),e.output(t(`\u2705 Logged in
10
10
 
@@ -4,5 +4,5 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{ga as t}from"./PHV3T4WH.js";import*as e from"node:process";var o=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],n=class{frames;currentFrame;intervalId;message;constructor(){this.frames=o,this.currentFrame=0,this.intervalId=null,this.message=""}showFrame(){t.info("\r"+this.frames[this.currentFrame]+" "+this.message),this.currentFrame=(this.currentFrame+1)%this.frames.length}start(r){if(this.message!==r){if(this.message=r,!e.stderr.isTTY){t.info(`${r}...
7
+ import{ia as t}from"./AP2GA7RS.js";import*as e from"node:process";var o=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],n=class{frames;currentFrame;intervalId;message;constructor(){this.frames=o,this.currentFrame=0,this.intervalId=null,this.message=""}showFrame(){t.info("\r"+this.frames[this.currentFrame]+" "+this.message),this.currentFrame=(this.currentFrame+1)%this.frames.length}start(r){if(this.message!==r){if(this.message=r,!e.stderr.isTTY){t.info(`${r}...
8
8
  `);return}this.intervalId===null&&(this.intervalId=setInterval(()=>{this.showFrame()},100))}}stop(){this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null,t.info("\r")),this.message=""}};function h(i){i.stop(),e.stderr.isTTY&&t.info("\x1B[2K")}function m(i,r){let[s]=r.inFlight;if(!s)return;let a=r.inFlight.size>1?` (+${r.inFlight.size-1} more)`:"";i.start(`[${r.position}/${r.total}] ${r.action} ${s}${a}`)}export{n as a,h as b,m as c};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./B7HK2FMY.js";import"./CSBPXWYJ.js";import"./UESEVDDS.js";import"./DBWAOHZO.js";import"./J56XVM43.js";import"./WZXA5XPB.js";import"./PHV3T4WH.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
7
+ import{a}from"./BHUCIWQF.js";import"./NADFEIIN.js";import"./O5WCU6SC.js";import"./BZBFESBB.js";import"./4WAQNM63.js";import"./WZXA5XPB.js";import"./AP2GA7RS.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};