@redocly/cli 2.52.1 → 2.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/lib/chunks/{BT6KOTWJ.js → 37GCJWSG.js} +1 -1
  2. package/lib/chunks/{Z56NVT3C.js → 4HUU5J27.js} +1 -1
  3. package/lib/chunks/{WNOJ33NP.js → 4NOPFMP4.js} +1 -1
  4. package/lib/chunks/{E44UEWCI.js → 4RAXWSAO.js} +1 -1
  5. package/lib/chunks/{ANMFTH7J.js → 53NH2YLN.js} +1 -1
  6. package/lib/chunks/{U3LG2XZJ.js → 5FFLTZ6L.js} +1 -1
  7. package/lib/chunks/{ZAZG6Z4J.js → 5JDWBBWV.js} +1 -1
  8. package/lib/chunks/{ZGSX24WO.js → 5NPDMO3J.js} +1 -1
  9. package/lib/chunks/{F7TVQGKE.js → 7IFNT3UE.js} +2 -2
  10. package/lib/chunks/{43FMQGIC.js → 7L3XKM63.js} +1 -1
  11. package/lib/chunks/{KTY2NT6E.js → A5EVSQCM.js} +1 -1
  12. package/lib/chunks/AVA66QDF.js +48 -0
  13. package/lib/chunks/{GCM2GVOB.js → B5L66Q7A.js} +1 -1
  14. package/lib/chunks/{GNCL6OYK.js → BYAKG3UQ.js} +1 -1
  15. package/lib/chunks/{B4BGW6LX.js → CB6XVWTN.js} +1 -1
  16. package/lib/chunks/{N2CTYNAN.js → COKBGZJC.js} +1 -1
  17. package/lib/chunks/{XMISXGL7.js → D2C25BNK.js} +1 -1
  18. package/lib/chunks/{DDB52L66.js → D3QMBJ7F.js} +1 -1
  19. package/lib/chunks/{X4ZTHKYE.js → DHG5G2WS.js} +1 -1
  20. package/lib/chunks/{IBTEY2L5.js → EJQ73UTM.js} +1 -1
  21. package/lib/chunks/{Z3H5BHVF.js → G3H6T776.js} +1 -1
  22. package/lib/chunks/{AOOXKVZ6.js → HLKETLGO.js} +1 -1
  23. package/lib/chunks/{T5KTLVAZ.js → HP22AUQM.js} +1 -1
  24. package/lib/chunks/{NIDDLLHO.js → HVX462TG.js} +1 -1
  25. package/lib/chunks/{O3T4DGBI.js → ILDBRWGH.js} +1 -1
  26. package/lib/chunks/{AGENG2WT.js → K2W62QUQ.js} +1 -1
  27. package/lib/chunks/{YVY7OG3K.js → KG3R3V6C.js} +1 -1
  28. package/lib/chunks/{NOI562GM.js → LKVLN23O.js} +1 -1
  29. package/lib/chunks/{TWYMGTRR.js → LWZVYHV3.js} +1 -1
  30. package/lib/chunks/{JCEAJTUA.js → MYLGXOMV.js} +1 -1
  31. package/lib/chunks/{YMON5AYA.js → OKE3CBRC.js} +1 -1
  32. package/lib/chunks/{KMCWK6TG.js → PG3YUEW2.js} +1 -1
  33. package/lib/chunks/{WNU6CBDY.js → QWDO5IDC.js} +1 -1
  34. package/lib/chunks/{ZQYHXXTF.js → SBPDYTA3.js} +1 -1
  35. package/lib/chunks/{P3CVK7VZ.js → SGXQZAK5.js} +1 -1
  36. package/lib/chunks/{RUPZTXQ3.js → SP226N2A.js} +1 -1
  37. package/lib/chunks/{OTGTOSNW.js → TCATLY4M.js} +1 -1
  38. package/lib/chunks/{M7QRMIWR.js → U7FHAHPW.js} +1 -1
  39. package/lib/chunks/{MTD74D7D.js → V23P2ZD3.js} +1 -1
  40. package/lib/chunks/{BWQB4GUQ.js → VK3Z4ATC.js} +1 -1
  41. package/lib/chunks/{ZXPLB4LA.js → WZOA4JEM.js} +1 -1
  42. package/lib/chunks/{4XWI7J57.js → Y7WOUHSW.js} +244 -244
  43. package/lib/chunks/{MJSI4VHA.js → YD6ZIH2Z.js} +1 -1
  44. package/lib/chunks/{YDCOQ3IQ.js → YS566YFE.js} +1 -1
  45. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  46. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  47. package/lib/eject-assets/generators/cli/index.ts +2 -2
  48. package/lib/eject-assets/generators/cli/render.ts +1 -1
  49. package/lib/eject-assets/generators/go/client.ts +1 -1
  50. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  51. package/lib/eject-assets/generators/go/index.ts +2 -2
  52. package/lib/eject-assets/generators/go/models.ts +1 -1
  53. package/lib/eject-assets/generators/go/naming.ts +1 -1
  54. package/lib/eject-assets/generators/go/operations.ts +1 -1
  55. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  56. package/lib/eject-assets/generators/go/types.ts +1 -1
  57. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  58. package/lib/eject-assets/generators/mock/index.ts +2 -2
  59. package/lib/eject-assets/generators/mock/render.ts +1 -1
  60. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  61. package/lib/eject-assets/generators/mock/values.ts +1 -1
  62. package/lib/eject-assets/generators/php/client.ts +1 -1
  63. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  64. package/lib/eject-assets/generators/php/index.ts +2 -2
  65. package/lib/eject-assets/generators/php/models.ts +1 -1
  66. package/lib/eject-assets/generators/php/naming.ts +1 -1
  67. package/lib/eject-assets/generators/php/operations.ts +1 -1
  68. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  69. package/lib/eject-assets/generators/php/types.ts +1 -1
  70. package/lib/eject-assets/generators/python/client.ts +1 -1
  71. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  72. package/lib/eject-assets/generators/python/index.ts +2 -2
  73. package/lib/eject-assets/generators/python/models.ts +1 -1
  74. package/lib/eject-assets/generators/python/naming.ts +1 -1
  75. package/lib/eject-assets/generators/python/operations.ts +1 -1
  76. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  77. package/lib/eject-assets/generators/python/types.ts +1 -1
  78. package/lib/eject-assets/generators/swr/index.ts +2 -2
  79. package/lib/eject-assets/generators/swr/render.ts +1 -1
  80. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  81. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  82. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  83. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  84. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  85. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  86. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  87. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  88. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  89. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  90. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  91. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  92. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  93. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  94. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  95. package/lib/eject-assets/generators/zod/index.ts +2 -2
  96. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  97. package/lib/index.js +139 -141
  98. package/package.json +1 -1
  99. package/lib/chunks/SEECFWS6.js +0 -47
@@ -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"./MJSI4VHA.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"./YD6ZIH2Z.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,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"./43FMQGIC.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"./7L3XKM63.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`/**
@@ -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 S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./WNOJ33NP.js";import{b,g as T}from"./TWYMGTRR.js";import{a as f,c as R,d as v,e as k}from"./F7TVQGKE.js";import{d as I,f as N,h as P,i as j,m as C}from"./LD5MEXEL.js";import{join as Y}from"node:path";var y="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function $(e){return e.filter(t=>t.length>0).join(`
7
+ import{b as S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./4NOPFMP4.js";import{b,g as T}from"./LWZVYHV3.js";import{a as f,c as R,d as v,e as k}from"./7IFNT3UE.js";import{d as I,f as N,h as P,i as j,m as C}from"./LD5MEXEL.js";import{join as Y}from"node:path";var y="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function $(e){return e.filter(t=>t.length>0).join(`
8
8
 
9
9
  `)+`
10
10
  `}function O(e){let t=["/**",` * ${j(`${e.title} (v${e.version})`)}`];if(e.description)for(let n of C(j(e.description)))t.push(` * ${n}`.replace(/ +$/,""));return t.push(" */"),t.join(`
@@ -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}from"./RS5PUOTT.js";import{a as I}from"./BXI4SF2U.js";import{c as p}from"./P26PQ2RU.js";import{a as R}from"./YVY7OG3K.js";import{O as T,Q as w,W as a}from"./MJSI4VHA.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
7
+ import{a as O}from"./RS5PUOTT.js";import{a as I}from"./BXI4SF2U.js";import{c as p}from"./P26PQ2RU.js";import{a as R}from"./KG3R3V6C.js";import{O as T,Q as w,W as a}from"./YD6ZIH2Z.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
8
8
 
9
9
  `):a.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${r.toLocaleString()}. ${s}
10
10
 
@@ -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{c as a,d as b}from"./M7QRMIWR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as generateClient,a as runGenerators};
7
+ import{c as a,d as b}from"./U7FHAHPW.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as generateClient,a as runGenerators};
@@ -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"./BWQB4GUQ.js";import"./2U6O26CV.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
7
+ import{a,b,c,d,e}from"./VK3Z4ATC.js";import"./2U6O26CV.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
@@ -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"./JCEAJTUA.js";import{c as g}from"./MJSI4VHA.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"./MYLGXOMV.js";import{c as g}from"./YD6ZIH2Z.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};
@@ -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"./DDB52L66.js";import"./2U6O26CV.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.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"./D3QMBJ7F.js";import"./2U6O26CV.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.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 Z,b as ee,f as te,g as G,h as ne}from"./F7TVQGKE.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./MJSI4VHA.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./T5KTLVAZ.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./ZAZG6Z4J.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./ZXPLB4LA.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./AOOXKVZ6.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./N2CTYNAN.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./U3LG2XZJ.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./E44UEWCI.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./P3CVK7VZ.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./OTGTOSNW.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
7
+ import{a as Z,b as ee,f as te,g as G,h as ne}from"./7IFNT3UE.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./YD6ZIH2Z.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./HP22AUQM.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./5JDWBBWV.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./WZOA4JEM.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./HLKETLGO.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./COKBGZJC.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./5FFLTZ6L.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./4RAXWSAO.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./SGXQZAK5.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./TCATLY4M.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
8
8
  `);let o=t.errorMode??"throw",i=t.dateType??"string";for(let a of e){let c=n.get(a);if(!c)throw new y(`Unknown generator: ${a}`);for(let d of c.requires??[])if(!s.has(d)){let f=[...new Set([d,...e])].map(h=>`--generator ${h}`).join(" ");throw new y(`The "${a}" generator requires the "${d}" generator. Add it, e.g. ${f}.`)}if(c.errorModes&&!c.errorModes.includes(o))throw new y(`The "${a}" generator does not support --error-mode "${o}" (supported: ${c.errorModes.join(", ")}).`);if(c.dateTypes&&!c.dateTypes.includes(i))throw new y(`The "${a}" generator requires --date-type ${c.dateTypes.join(" or ")} (got "${i}") so the runtime values match the generated types.`);let u={...t,outputMode:r};for(let[d,f]of Object.entries(c.notApplicable??{}))u[d]!==void 0&&b.warn(`generate-client: the "${a}" generator ignores ${d} \u2014 ${f}.
9
9
  `)}}function oe(e,t,n){let r=new Map;for(let s of e){let o=t.get(s)?.options,i=n?.[s];if(o===void 0){i!==void 0&&b.warn(`generate-client: the "${s}" generator declares no options, so client.options.${s} is ignored.
10
10
  `),r.set(s,{});continue}r.set(s,ke(s,o,i))}return r}function ke(e,t,n){if(n!==void 0&&!x(n))throw new y(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},s=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!s.includes(i))throw new y(`The "${e}" generator got an unknown option "${i}". Declared options: ${s.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new y(`The "${e}" generator requires the "${i}" option.`);let o={...r};for(let[i,a]of Object.entries(t.properties)){if(o[i]===void 0){a.default!==void 0&&(o[i]=a.default);continue}let c=ve(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function ve(e,t){if("enum"in e)return e.enum.includes(t)?void 0:`must be one of: ${e.enum.join(", ")}`;if(e.type==="array"){let n=e.items.type;return Array.isArray(t)&&t.every(r=>typeof r===n)?void 0:`must be an array of ${n}`}return typeof t===e.type?void 0:`must be a ${e.type}`}import{isAbsolute as Oe,resolve as xe}from"node:path";import{pathToFileURL as qe}from"node:url";var Se=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,s,o,i){return r?t?".jsx":".js":s&&(!o||!i)?n:s+o+"."+i.toLowerCase()+"js"}):e};async function ie(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ae(n,a);let r=[];for(let a of e)r.push(await se(a,n,t.configDir));let s=[],o=new Set,i=async a=>{if(!(s.includes(a)||o.has(a))){o.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in I)&&await i(await se(c,n,t.configDir));o.delete(a),s.push(a)}};for(let a of r)await i(a);return{selected:s,registry:n}}async function se(e,t,n){if(t.has(e))return e;let r=I[e];if(r!==void 0){let{load:o,...i}=r;return t.set(e,{...i,...await o()}),e}if(e==="sdk")throw new y('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let s=await Pe(e,n??process.cwd());return ae(t,s),s.name}function ae(e,t){if(!x(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new y("Invalid custom generator: expected an object with a non-empty string `name` and a `run` function (build one with `defineGenerator`).");if(e.has(t.name))throw new y(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=ne(G,t.requiresGenerator);if(n===void 0)throw new y(`Generator "${t.name}" declares requiresGenerator "${t.requiresGenerator}", which is not a range we read. Use ^1.2.0, ~1.2.0, >=1.2.0, or an exact version.`);if(!n)throw new y(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${G}. Upgrade @redocly/cli if the generator is newer, or update the generator \u2014 \`redocly eject-generator <name> --update\` for an ejected file, or upgrade its package.`)}t.name in I&&b.warn(`generate-client: custom generator "${t.name}" takes over the built-in generator of the same name.
@@ -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 g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./TWYMGTRR.js";import{a as z,e as A,g as E}from"./F7TVQGKE.js";import{a}from"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m as unwrapNullable};
7
+ import{a as g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./LWZVYHV3.js";import{a as z,e as A,g as E}from"./7IFNT3UE.js";import{a}from"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m 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 O}from"./2U6O26CV.js";import{b as B,c as j,d as N,e as V,f as Q,g as Z,h as Y}from"./TWYMGTRR.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as T,c as C,d as P,e as W,g as _,h as M,i as A,j as z,k as K,l as U,n as J}from"./UW4UC7ZI.js";var G=C.go,S=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return P(t,{style:"camel",reserved:G})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
7
+ import{a as O}from"./2U6O26CV.js";import{b as B,c as j,d as N,e as V,f as Q,g as Z,h as Y}from"./LWZVYHV3.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as T,c as C,d as P,e as W,g as _,h as M,i as A,j as z,k as K,l as U,n as J}from"./UW4UC7ZI.js";var G=C.go,S=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return P(t,{style:"camel",reserved:G})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
8
8
  `?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of U(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=U(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let s of r.slice(1)){if(s===""){o||this.line("//"),o=!0;continue}this.line(`// ${s}`),o=!1}return this}layout(t){return ie(le(t))}toString(){return this.layout(super.toString())}};function d(e){let t=P(e,{style:"pascal",reserved:G});return t.startsWith("_")?`N${t.slice(1)}`:t}function ie(e){return`${e.replace(/\n{3,}/g,`
9
9
 
10
10
  `).trimEnd()}
@@ -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"./YDCOQ3IQ.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
7
+ import{a}from"./YS566YFE.js";import"./LWZVYHV3.js";import"./7IFNT3UE.js";import"./WZXA5XPB.js";import"./YD6ZIH2Z.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};