@redocly/cli 2.43.0 → 2.43.2
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/{IW4HG6VD.js → 2H43OFX2.js} +1 -1
- package/lib/chunks/{L3YH7RCT.js → 3Q7NWMTP.js} +1 -1
- package/lib/chunks/{KM7RL6C4.js → 47NNACMG.js} +236 -147
- package/lib/chunks/{X6IKW6K4.js → 6HPPISLY.js} +1 -1
- package/lib/chunks/{PFD7KGH7.js → 6QZTE6N6.js} +1 -1
- package/lib/chunks/{4VF6MPJJ.js → 7COMRSUB.js} +1 -1
- package/lib/chunks/{3BCHPW6T.js → 7M747VY2.js} +1 -1
- package/lib/chunks/{HXYO6QS2.js → BFESXNQW.js} +1 -1
- package/lib/chunks/{E36IFTLX.js → CHEI2COC.js} +1 -1
- package/lib/chunks/{UXH3ZSSV.js → CQMYMPLY.js} +1 -1
- package/lib/chunks/{WNTLDT6L.js → DLYUMFFQ.js} +3 -3
- package/lib/chunks/{NGPG6D6W.js → E23LWKBB.js} +1 -1
- package/lib/chunks/{C35TOMVY.js → EK3VLO23.js} +1 -1
- package/lib/chunks/{TMQJQANP.js → H5AKFBMX.js} +1 -1
- package/lib/chunks/{KIVPQZDC.js → HRN4XSXF.js} +1 -1
- package/lib/chunks/{QFG7TTKG.js → K4MGAJAT.js} +1 -1
- package/lib/chunks/{5E3VKU5T.js → MK7BP3KL.js} +1 -1
- package/lib/chunks/{3VZLNQK3.js → WF2UYHZN.js} +1 -1
- package/lib/chunks/X5UP7OHY.js +8 -0
- package/lib/index.js +7 -7
- package/package.json +1 -1
- package/lib/chunks/DNOXLF53.js +0 -8
|
@@ -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"./DLYUMFFQ.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};
|