@redocly/cli 2.49.0 → 2.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +1 -1
- package/lib/chunks/{QZH7EL26.js → 3BZL5B4H.js} +1 -1
- package/lib/chunks/{KK77ANZH.js → 3O6RY2OI.js} +1 -1
- package/lib/chunks/{UMQN5HTL.js → 3UDONSS2.js} +1 -1
- package/lib/chunks/{4I2OVMBJ.js → 4OMVSQVK.js} +1 -1
- package/lib/chunks/{ZXKOHMC6.js → 4PPXJI4C.js} +1 -1
- package/lib/chunks/{2U54VUOE.js → 5HNCFY3B.js} +1 -1
- package/lib/chunks/{7R5PBTLG.js → 7EFXGPDR.js} +1 -1
- package/lib/chunks/{5SAFIITS.js → 7K66NKDE.js} +1 -1
- package/lib/chunks/{6KCIFTIG.js → 7RCYOS5C.js} +1 -1
- package/lib/chunks/{CCR5RYCX.js → A5ASAZNF.js} +1 -1
- package/lib/chunks/{4JDAOKRJ.js → AEYKQB3Y.js} +1 -1
- package/lib/chunks/{YOJGIGE3.js → C7PTGUVO.js} +1 -1
- package/lib/chunks/{5JIGUBC3.js → CWHIZM5P.js} +1 -1
- package/lib/chunks/{TSRK76GA.js → D7CUMUET.js} +1 -1
- package/lib/chunks/{MHITBEGC.js → ENKAF6J7.js} +1 -1
- package/lib/chunks/{ZOUQBK53.js → FRTUU2MY.js} +1 -1
- package/lib/chunks/{DCN3GSUA.js → G4MWXFHH.js} +1 -1
- package/lib/chunks/{WPGKH5NI.js → GG676VHI.js} +1 -1
- package/lib/chunks/{KHEMMNFU.js → GTD7QSP5.js} +1 -1
- package/lib/chunks/{WXVC3KOI.js → GULPNFGZ.js} +1 -1
- package/lib/chunks/{GRJG3TOI.js → GZI26L3N.js} +1 -1
- package/lib/chunks/{TLQZAJQU.js → H2G5AV35.js} +1 -1
- package/lib/chunks/{NTPLYWAB.js → HKNDR3ZE.js} +1 -1
- package/lib/chunks/{KK2STV73.js → J7XZNTM3.js} +1 -1
- package/lib/chunks/{6VSHPQXO.js → JVOPWBET.js} +1 -1
- package/lib/chunks/{NUNOXB7Z.js → KD4AOMY6.js} +1 -1
- package/lib/chunks/{VBPP2WUF.js → KW2DYFTU.js} +1 -1
- package/lib/chunks/{E5I67ZCZ.js → KW4NHNFI.js} +1 -1
- package/lib/chunks/{OUCZOBEX.js → M3HF5ZRI.js} +1 -1
- package/lib/chunks/{HJ36YGCI.js → M3XP3LQ3.js} +106 -106
- package/lib/chunks/{OKITK6EF.js → MOKGEIKX.js} +1 -1
- package/lib/chunks/{NYLAOZPO.js → N4AFJIJZ.js} +1 -1
- package/lib/chunks/{YI34NB7D.js → PQ2JPZXM.js} +1 -1
- package/lib/chunks/{O4R6BSAS.js → QKGUXGJO.js} +1 -1
- package/lib/chunks/{YXXYE4G2.js → RQPDQIKC.js} +1 -1
- package/lib/chunks/{HA22GUKQ.js → SSHEKZ4L.js} +1 -1
- package/lib/chunks/{74WJ7S7J.js → T5DNFYA3.js} +1 -1
- package/lib/chunks/{YP5GHFYE.js → TFNO2II2.js} +1 -1
- package/lib/chunks/{R4XFBOJU.js → TNYG2WWT.js} +1 -1
- package/lib/chunks/{T5EPIBMA.js → TXGTKM76.js} +1 -1
- package/lib/chunks/{V2LJ4UGM.js → UHWZYG4E.js} +1 -1
- package/lib/chunks/{JBNPGEIJ.js → ULOXDWJT.js} +1 -1
- package/lib/chunks/{M6KLAAY4.js → VEQESANY.js} +1 -1
- package/lib/chunks/{ZMCRMR2V.js → VGBSMXRM.js} +2 -2
- package/lib/chunks/{C5TR4MMN.js → VN7LZQGN.js} +1 -1
- package/lib/chunks/{U2H2LXZE.js → W5DUUIKF.js} +1 -1
- package/lib/chunks/{BT3ELZVX.js → WAUR32EX.js} +1 -1
- package/lib/chunks/{HL5FOKC4.js → WG3HZCUF.js} +1 -1
- package/lib/chunks/{FUMCRNTK.js → WZ7U5J57.js} +1 -1
- package/lib/chunks/{GNMJA2V2.js → YAMJYOV5.js} +1 -1
- package/lib/chunks/{RXOEH2LN.js → YOFC4HMY.js} +1 -1
- package/lib/eject-assets/generators/cli/docs.ts +1 -1
- package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
- package/lib/eject-assets/generators/cli/index.ts +2 -2
- package/lib/eject-assets/generators/cli/render.ts +1 -1
- package/lib/eject-assets/generators/go/client.ts +1 -1
- package/lib/eject-assets/generators/go/descriptor.ts +1 -1
- package/lib/eject-assets/generators/go/index.ts +2 -2
- package/lib/eject-assets/generators/go/models.ts +1 -1
- package/lib/eject-assets/generators/go/naming.ts +1 -1
- package/lib/eject-assets/generators/go/operations.ts +1 -1
- package/lib/eject-assets/generators/go/pagination.ts +1 -1
- package/lib/eject-assets/generators/go/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +1 -1
- package/lib/eject-assets/generators/mock/index.ts +2 -2
- package/lib/eject-assets/generators/mock/render.ts +1 -1
- package/lib/eject-assets/generators/mock/sample.ts +1 -1
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +1 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +1 -1
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +1 -1
- package/lib/eject-assets/generators/php/pagination.ts +1 -1
- package/lib/eject-assets/generators/php/types.ts +1 -1
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +1 -1
- package/lib/eject-assets/generators/python/index.ts +2 -2
- package/lib/eject-assets/generators/python/models.ts +1 -1
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +1 -1
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +1 -1
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/index.js +8 -8
- package/package.json +1 -1
|
@@ -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"./
|
|
7
|
+
import{c}from"./M3XP3LQ3.js";import{open as C,readdir as N,stat as P}from"node:fs/promises";import d from"node:path";var $=new Set([".yaml",".yml",".json"]);async function D(e){let n=[];async function t(r){let o=await N(r,{withFileTypes:!0});for(let s of o){if(s.name.startsWith("."))continue;let i=d.join(r,s.name);if(s.isDirectory()){await t(i);continue}s.isFile()&&$.has(d.extname(s.name).toLowerCase())&&n.push(i)}}return await t(e),n.sort(),n}async function _(e,n=4096){let t=await C(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 M(e){return d.resolve(process.cwd(),e)}async function K(e){let n=await P(e);if(n.isFile())return[e];if(!n.isDirectory())return[];let t=[];async function r(o){let s=await N(o,{withFileTypes:!0});for(let i of s){if(i.name.startsWith("."))continue;let a=d.join(o,i.name);if(i.isDirectory()){await r(a);continue}i.isFile()&&t.push(a)}}return await r(e),t.sort(),t}var k="drift.local",O=`http://${k}`;function u(e){return e===k}var U=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"]),J=["cf-","sec-ch-","sec-fetch-","x-amz-","x-amzn-","x-b3-","x-envoy-","x-forwarded-","x-github-"],R=`
|
|
8
8
|
`;function Y(e){return e.split(R)}function g(e,n,t){let r=n.toLowerCase(),o=e[r];if(o===void 0){e[r]=t;return}e[r]=r==="set-cookie"?`${o}${R}${t}`:`${o},${t}`}function p(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&&g(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)g(n,t,String(o));continue}g(n,t,String(r))}return n}function f(e){try{return new URL(e)}catch{return new URL(e,O)}}function m(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e}function L(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(e){let n=[],t=0,r=e.startsWith("/")?e:`/${e}`,s=m(r).split("/").map(i=>{if(!i)return"";let a=i.match(/^\{([^}]+)\}$/);return a?(n.push(a[1]),"([^/]+)"):(t+=2,L(i))}).join("/");return{regex:new RegExp(`^${s||"/"}$`),params:n,score:t}}function l(e,n){if(n&&A(e))try{return JSON.parse(n)}catch{return}}function E(e){return e?e.split(";")[0]?.trim().toLowerCase()??"":""}function A(e){let n=E(e);return n==="application/json"||n.endsWith("+json")}function Q(e,n){let t=E(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 Z(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 v(e,n){let t=e.toLowerCase();return t.startsWith(":")||U.has(t)||J.some(r=>t.startsWith(r))?!0:n?n.names.has(t)||n.prefixes.some(r=>t.startsWith(r)):!1}import{createReadStream as q}from"node:fs";import{readFile as B}from"node:fs/promises";import{createInterface as F}from"node:readline";function I(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 se(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 H(e,n){if(e!=null){if(n==="base64"&&typeof e=="string")try{return Buffer.from(e,"base64").toString("utf8")}catch{return e}return I(e)}}function ae(e,n,t){let r=e.method?.toUpperCase(),o=e.url;if(!r||!o)return null;let s=p(e.requestHeaders),i=f(o);if(u(i.host)&&s.host)try{i=new URL(`${i.protocol}//${s.host}${i.pathname}${i.search}`)}catch{i=f(o)}let a=e.requestContentType??s["content-type"],y=H(e.requestBody),T={method:r,url:i.toString(),path:i.pathname,query:i.searchParams,protocol:i.protocol,protocolKnown:e.schemeKnown??/^https?:\/\//i.test(o),host:u(i.host)?void 0:i.host||void 0,headers:s,contentType:a,bodyText:y,bodyJson:l(a,y)},h,x=e.responseStatus;if(x!==void 0){let w=p(e.responseHeaders),S=e.responseContentType??w["content-type"],b=H(e.responseBody);h={status:x,statusText:e.responseStatusText,headers:w,contentType:S,bodyText:b,bodyJson:l(S,b)}}return{index:n,source:t,startedAt:e.startedAt,request:T,response:h,raw:e.raw}}async function*ce(e){let n=q(e,{encoding:"utf8"}),t=F({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*ue(e,n){let t=await B(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 fe(e){return p(e)["content-type"]}function ge(e){return e?.replace(/\/+$/,"")||void 0}function z(e,n){if(!n||n==="/")return e||"/";if(e===n)return"/";if(e.startsWith(`${n}/`))return e.slice(n.length)||"/"}function me(e,n){if(n.startsWith("/"))return z(e.path,n);let t=f(n.includes("://")?n:`http://${n}`);if(!(u(t.host)||e.host!==void 0&&e.host.toLowerCase()!==t.host))return z(e.path,m(t.pathname))}export{D as a,_ as b,M as c,K as d,u as e,Y as f,f as g,m as h,V as i,E as j,A as k,Q as l,Z as m,v as n,I as o,se as p,H as q,ae as r,ce as s,ue as t,fe as u,ge as v,me 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{h as a}from"./
|
|
7
|
+
import{h as a}from"./7K66NKDE.js";import"./P26PQ2RU.js";import"./RS5PUOTT.js";import"./JVOPWBET.js";import"./BXI4SF2U.js";import"./32XCOMOR.js";import"./M3XP3LQ3.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as RedoclyOAuthClient};
|
|
@@ -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
|
-
var e={name:"@redocly/cli",version:"2.49.
|
|
7
|
+
var e={name:"@redocly/cli",version:"2.49.1",description:"",license:"MIT",bin:{redocly:"bin/cli.js",openapi:"bin/cli.js"},type:"module",engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{build:"node ./scripts/build.mjs","prepare:publish-dir":"node ./scripts/prepare-publish-dir.mjs","clean:publish-dir":`node -e "require('fs').rmSync('.publish', {recursive:true, force:true})"`},publishConfig:{directory:".publish"},repository:{type:"git",url:"https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["linter","OpenAPI","Swagger","OpenAPI linter","Swagger linter","AsyncAPI linter","Arazzo linter","oas"],contributors:["Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"],devDependencies:{"@opentelemetry/exporter-trace-otlp-http":"0.219.0","@opentelemetry/resources":"2.8.0","@opentelemetry/sdk-trace-node":"2.8.0","@opentelemetry/semantic-conventions":"1.41.1","@redocly/cli-otel":"0.3.5","@redocly/client-generator":"0.4.2","@redocly/openapi-core":"2.49.1","@redocly/respect-core":"2.49.1","@types/cookie":"0.6.0","@types/har-format":"^1.2.16","@types/react":"^17.0.0 || ^18.2.21 || ^19.2.16","@types/react-dom":"^17.0.0 || ^18.2.7 || ^19.2.3","@types/semver":"^7.5.0","@types/set-cookie-parser":"2.4.10","@types/yargs":"17.0.32",colorette:"^1.2.0",cookie:"^0.7.2",dotenv:"16.4.7",esbuild:"^0.28.0",glob:"^13.0.5",handlebars:"^4.7.9","https-proxy-agent":"^7.0.5",react:"^17.0.0 || ^18.2.0 || ^19.2.7","react-dom":"^17.0.0 || ^18.2.0 || ^19.2.7",redoc:"2.5.3",semver:"^7.5.2","set-cookie-parser":"^2.3.5","styled-components":"6.4.2",typescript:"6.0.2",ulid:"^3.0.1",undici:"^6.28.0",yargs:"17.0.1"}};var{version:s,name:i,engines:c}=e,n=e.devDependencies.redoc,p="sha384-xiEssMQFSpSfLbzRZCGfxxIM5QDb2DTrU6vyoZdp2sV1L6pmOMy6MpTtUoLbpC96";export{s as a,i as b,c,n as d,p as e};
|
|
@@ -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 oe,e as ae,f as ue,g as ce,h as b,i as de,k as H,l as V,m as pe,n as le,v as he,w as me}from"./
|
|
7
|
+
import{a as oe,e as ae,f as ue,g as ce,h as b,i as de,k as H,l as V,m as pe,n as le,v as he,w as me}from"./HKNDR3ZE.js";import{D as X,E as g,F as O,G as Z,H as $,I as C,K as S,M as y,O as w,Q as ee,R as te,S as Je,W as ne,Y as re,_ as se,aa as ie,c as l,p as Y,u as Q,x as We}from"./M3XP3LQ3.js";import{e as J}from"./RFWIIJFG.js";import fe from"node:path";function R(t){return t?t.trim():""}function T(t){let e=R(t.operationId)||R(t.path);return[R(t.ruleId),R(t.severity),R(t.message),e,R(t.target),R(t.schemaPath)].join("")}var F=t=>X(S(t));function Ye(t){return t==="error"?"error":t==="warning"?"warning":"note"}function Qe(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
|
|
8
8
|
`)?e:`"${e.replace(/"/g,'""')}"`}function Xe(t){return fe.isAbsolute(t)?fe.relative(process.cwd(),t)||".":t}function Ze(t){if(!t)return null;let e=t.operationPathTemplate;return typeof e=="string"&&e.length>0?e:null}function et(t){return Object.entries(t).sort((e,r)=>{let n=r[1]-e[1];return n!==0?n:e[0].localeCompare(r[0])})}function tt(t){let e=[],r=new Map;for(let n of t){let s=T({ruleId:n.ruleId,severity:n.severity,message:n.message,operationId:n.operationId,path:n.path,target:n.target,schemaPath:n.schemaPath}),i=r.get(s);if(i!==void 0){e[i].occurrences+=1;continue}r.set(s,e.length),e.push({finding:n,occurrences:1})}return e}function nt(t){let e=tt(t.findings).map(n=>({occurrences:n.occurrences,exchangeIndex:n.finding.exchangeIndex,ruleId:n.finding.ruleId,severity:n.finding.severity,category:n.finding.category,message:n.finding.message,operationId:n.finding.operationId,specSource:n.finding.specSource,target:n.finding.target,schemaPath:n.finding.schemaPath,dataPath:n.finding.dataPath,details:n.finding.details,method:n.finding.method,url:n.finding.url,path:n.finding.path,status:n.finding.status})),r={run:{id:t.runId,specSource:t.meta.specSource,trafficPath:t.meta.trafficPath,format:t.meta.format,matchMode:t.meta.matchMode,server:t.meta.server,totalExchanges:t.summary.totalExchanges,documentedExchanges:t.summary.documentedExchanges,undocumentedExchanges:t.summary.undocumentedExchanges,skippedExchanges:t.summary.skippedExchanges,findingsBySeverity:t.summary.findingsBySeverity,findingsByRule:t.summary.findingsByRule,totalProblems:t.summary.totalProblemGroups,durationMs:t.summary.durationMs},problems:e};return`${JSON.stringify(r,null,2)}
|
|
9
9
|
`}function rt(t){let e=["run_id","finding_id","exchange_index","severity","category","rule_id","message","method","path","url","status","operation_id","spec_source","target","schema_path","data_path"],r=t.findings.map(s=>[t.runId,s.id,s.exchangeIndex,s.severity,s.category,s.ruleId,s.message,s.method,s.path,s.url,s.status,s.operationId,s.specSource,s.target,s.schemaPath,s.dataPath]);return`${[e,...r].map(s=>s.map(Qe).join(",")).join(`
|
|
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{a}from"./
|
|
7
|
+
import{a}from"./WAUR32EX.js";import"./TNYG2WWT.js";import"./MOKGEIKX.js";import"./4OMVSQVK.js";import"./VGBSMXRM.js";import"./PFYPTG4G.js";import"./M3XP3LQ3.js";import"./NEWT5A6S.js";import"./NB54XRRU.js";import"./HJYFWIVE.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
|
|
@@ -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 T,b as O,c as A,d as E}from"./
|
|
7
|
+
import{a as T,b as O,c as A,d as E}from"./KD4AOMY6.js";import{c as m,k as C,r as $}from"./HKNDR3ZE.js";import{a as R,b as y}from"./5HNCFY3B.js";import{a as q}from"./BXI4SF2U.js";import{O as u,c as H}from"./M3XP3LQ3.js";import"./NEWT5A6S.js";import{e as z}from"./RFWIIJFG.js";import{createReadStream as F,createWriteStream as k,existsSync as V}from"node:fs";import{appendFile as N,mkdir as j,rm as _,writeFile as W}from"node:fs/promises";import B from"node:path";import{createInterface as G}from"node:readline";var w=class{outputPath;entriesPath;creatorVersion;writeChain=Promise.resolve();directoryEnsured=!1;started=!1;count=0;constructor(t,r){this.outputPath=B.resolve(process.cwd(),t),this.entriesPath=`${this.outputPath}.entries.tmp`,this.creatorVersion=r}get entryCount(){return this.count}add(t){let r=`${JSON.stringify(t)}
|
|
8
8
|
`,n=this.writeChain.catch(()=>{}).then(()=>this.append(r)).then(()=>{this.count+=1});return this.writeChain=n.catch(()=>{}),n}async finalize(){await this.writeChain.catch(()=>{}),await this.ensureDirectory(),await this.writeDocument(),await _(this.entriesPath,{force:!0})}async append(t){if(await this.ensureDirectory(),!this.started){await W(this.entriesPath,t,"utf8"),this.started=!0;return}await N(this.entriesPath,t,"utf8")}async ensureDirectory(){this.directoryEnsured||(await j(B.dirname(this.outputPath),{recursive:!0}),this.directoryEnsured=!0)}async writeDocument(){let t=k(this.outputPath,{encoding:"utf8"}),r=n=>new Promise((o,s)=>{t.write(n,i=>i?s(i):o())});try{let n=JSON.stringify({name:"redocly-cli proxy",version:this.creatorVersion});await r(`{
|
|
9
9
|
"log": {
|
|
10
10
|
"version": "1.2",
|
|
@@ -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"./
|
|
7
|
+
import{a as C}from"./VGBSMXRM.js";import{c as w}from"./M3XP3LQ3.js";import{a as H,e as q,g as P,h as g,k as E}from"./NB54XRRU.js";import{join as ae}from"node:path";var j=class{code;constructor(r){this.code=r}};function A(e,r,n={}){let t=new Map(r.map(s=>[s.name,s.schema])),o=k(e,t,new Set,n.dateType??"string");return o===b?null:o}var b=Symbol("cycle");function J(e,r){if(e.kind==="union"){for(let t of e.members){let o=J(t,r);if(o)return o}return}if(e.kind!=="scalar")return;let n=e.metadata?.format;if(n==="binary")return new j("new Blob([])");if(r==="Date"){if(n==="date-time")return new j('new Date("2024-01-01T00:00:00Z")');if(n==="date")return new j('new Date("2024-01-01")')}}function I(e,r){let n=new Map,t=[],o=!1;for(let s of e){if(s.kind==="unknown")continue;let i=G(s,r);if(i?.kind!=="object"){t.push(s);continue}o=!0;for(let a of i.properties){let u=O(a.schema,r,new Set),c=n.get(a.name);(c===void 0||u>=c.rank)&&n.set(a.name,{schema:a.schema,required:a.required||(c?.required??!1),rank:u})}}return o?{merged:{kind:"object",properties:[...n.entries()].map(([s,i])=>({name:s,schema:i.schema,required:i.required}))},rest:t}:{merged:void 0,rest:t}}function G(e,r){let n=new Set,t=e;for(;t?.kind==="ref";){if(n.has(t.name))return;n.add(t.name),t=r.get(t.name)}return t}function O(e,r,n){switch(e.kind){case"literal":return 40;case"enum":return e.values.length===1?40:30;case"union":return Math.max(0,...e.members.map(t=>O(t,r,n)))-1;case"ref":{if(n.has(e.name))return 20;let t=r.get(e.name);return t===void 0?20:O(t,r,new Set(n).add(e.name))}case"null":case"unknown":return 10;default:return 20}}function k(e,r,n,t){let o=J(e,t);if(o)return o;let s=e.metadata,i=a=>a===null?e.kind==="null"||e.kind==="union"&&e.members.some(u=>u.kind==="null"):e.kind==="enum"?e.values.includes(a):e.kind==="literal"?a===e.value:!0;if(s?.example!==void 0&&i(s.example))return s.example;if(s?.default!==void 0&&i(s.default))return s.default;switch(e.kind){case"scalar":return K(e.scalar,s);case"array":{let a=k(e.items,r,n,t);return a===b?[]:[a]}case"object":return Object.fromEntries(e.properties.flatMap(a=>{let u=k(a.schema,r,n,t);return u===b?a.required?[[a.name,null]]:[]:[[a.name,u]]}));case"record":{let a=k(e.value,r,n,t);return a===b?{}:{key:a}}case"enum":return e.values[0];case"literal":return e.value;case"union":{for(let a of e.members){let u=k(a,r,n,t);if(u!==b)return u}return e.members.length>0?b:null}case"intersection":{let{merged:a,rest:u}=I(e.members,r),c=u.map(m=>k(m,r,n,t)).filter(m=>m!==b);if(a){let m=k(a,r,n,t),M=w(m)?m:{};for(let V of c)w(V)&&Object.assign(M,V);return M}let h=c.filter(w);return h.length>0?h.reduce((m,M)=>Object.assign(m,M),{}):c.length>0?c[0]:{}}case"omit":{let a=r.get(e.base);if(!a)return null;let u=k(a,r,n,t);if(w(u)){let c={...u};for(let h of e.keys)delete c[h];return c}return u}case"ref":{if(n.has(e.name))return b;let a=r.get(e.name);if(!a)return null;n.add(e.name);let u=k(a,r,n,t);return n.delete(e.name),u}case"null":case"unknown":return null}}function K(e,r){if(e==="boolean")return!0;if(e==="integer"||e==="number")return 0;switch(r?.format){case"email":return"user@example.com";case"uuid":return"00000000-0000-4000-8000-000000000000";case"date-time":return"2024-01-01T00:00:00Z";case"date":return"2024-01-01";case"uri":case"url":return"https://example.com";default:return"string"}}var f=e=>({kind:"expr",text:e}),d=e=>({kind:"object",entries:e});function l(e){return e.kind==="object"}function D(e,r){return l(e)?d([...e.entries,{spread:r}]):e}var L=" ";function x(e,r){switch(e.kind){case"expr":return e.text;case"wrap":return`${e.before}${x(e.value,r)}${e.after}`;case"array":{if(e.items.length===0)return"[]";let n=r+L;return`[
|
|
8
8
|
${e.items.map((o,s)=>`${n}${x(o,n)}${s===e.items.length-1?"":","}`).join(`
|
|
9
9
|
`)}
|
|
10
10
|
${r}]`}case"object":{if(e.entries.length===0)return"{}";let n=r+L;return`{
|