@redocly/cli 2.58.0 → 2.58.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/{TAEOWXJJ.js → 263OU3EK.js} +1 -1
- package/lib/chunks/{5WKNTF7W.js → 2CAHRLJ3.js} +1 -1
- package/lib/chunks/{YMMEOUYX.js → 2H2LESBI.js} +1 -1
- package/lib/chunks/{C6B5SYPM.js → 34J7T7MH.js} +1 -1
- package/lib/chunks/{JXAUEF5V.js → 3STDF6WW.js} +1 -1
- package/lib/chunks/{3RJ5Q24M.js → 3WFT3I7F.js} +1 -1
- package/lib/chunks/{JPHYX7OV.js → 4R5JMLPR.js} +1 -1
- package/lib/chunks/{R5A3H7N2.js → 4U5QHDPF.js} +1 -1
- package/lib/chunks/{65C4QORD.js → 4WEATF5W.js} +1 -1
- package/lib/chunks/{BZNIB4HL.js → 4Y6NCJUT.js} +1 -1
- package/lib/chunks/{FBHTM4LH.js → 5AUGOZUX.js} +1 -1
- package/lib/chunks/{2ERUBDSZ.js → 5TPCSTMC.js} +1 -1
- package/lib/chunks/{4BCJL2BX.js → 6VBDC3HP.js} +1 -1
- package/lib/chunks/{QXUO5IQJ.js → 6XEDECSL.js} +1 -1
- package/lib/chunks/{NYQDTPTE.js → 7JYJB6ME.js} +1 -1
- package/lib/chunks/{EPFKYDYC.js → 7WMNFTJC.js} +1 -1
- package/lib/chunks/{252ZXXJ7.js → AW5K6TIG.js} +1 -1
- package/lib/chunks/{LIAO3NFX.js → BBX56KPO.js} +1 -1
- package/lib/chunks/{6HHP5O4K.js → BNNOQCQA.js} +1 -1
- package/lib/chunks/{X5U3XCIW.js → CMHJY4T2.js} +1 -1
- package/lib/chunks/{LWTH3K75.js → CTTC32GG.js} +1 -1
- package/lib/chunks/{WFGS4GSF.js → DD3JYFIR.js} +3 -3
- package/lib/chunks/{DVJIGHFR.js → DEZGXWTS.js} +1 -1
- package/lib/chunks/{PB256IKB.js → DTH2KLMU.js} +2 -2
- package/lib/chunks/{7HX6H6PZ.js → EPO2USQL.js} +1 -1
- package/lib/chunks/{M4JX2FBY.js → EXXYMXIB.js} +1 -1
- package/lib/chunks/{ERFOEXTV.js → H4NHEW6K.js} +1 -1
- package/lib/chunks/{NRU2WFMW.js → ICTI23CL.js} +2 -2
- package/lib/chunks/{SXYE4UNQ.js → IMRV4QDD.js} +1 -1
- package/lib/chunks/{MT5H2R3P.js → JD3HIQIK.js} +56 -56
- package/lib/chunks/{T6HGKHGP.js → JIN2S34E.js} +1 -1
- package/lib/chunks/{ROE2PM62.js → KIUUH6YY.js} +1 -1
- package/lib/chunks/{PWVCTNVT.js → LBQ2QKCY.js} +1 -1
- package/lib/chunks/{YTAL3SI4.js → LHKIMOHX.js} +2 -2
- package/lib/chunks/{U4WMP25Y.js → LRFPMBTV.js} +1 -1
- package/lib/chunks/{46SNGFKM.js → M7T6N7AK.js} +1 -1
- package/lib/chunks/{3QTDDZ3U.js → MGVCQC3T.js} +1 -1
- package/lib/chunks/{RREAI5RF.js → MSKEZAFV.js} +1 -1
- package/lib/chunks/{YFBPBQ7G.js → MVXFJBMU.js} +1 -1
- package/lib/chunks/{2LDRZLQD.js → MW2B5X5N.js} +1 -1
- package/lib/chunks/{MWJGFN4Y.js → NJRBU6GW.js} +1 -1
- package/lib/chunks/{JF6HX6A6.js → NMS2HUB3.js} +1 -1
- package/lib/chunks/{7KZRKMQI.js → O3UAIIFE.js} +1 -1
- package/lib/chunks/{FIMSBOF2.js → OJPXHGKU.js} +1 -1
- package/lib/chunks/{PZEYEOIF.js → PFZ3YKKV.js} +1 -1
- package/lib/chunks/{BNAH4YGC.js → PI42YPSD.js} +1 -1
- package/lib/chunks/{OQ2G774U.js → PJD3MHLL.js} +1 -1
- package/lib/chunks/{YLFY2DKU.js → PJXZKT3O.js} +1 -1
- package/lib/chunks/{2523PDUF.js → Q4ESEW3O.js} +1 -1
- package/lib/chunks/{6G6YWZOW.js → QK7R3ZTY.js} +1 -1
- package/lib/chunks/{6XXDGMQI.js → QQZJ42HN.js} +1 -1
- package/lib/chunks/{GDFQSHUE.js → R2IHROCG.js} +1 -1
- package/lib/chunks/{7BM3QKWP.js → RAYBJJ43.js} +1 -1
- package/lib/chunks/{NSNQAVBA.js → RVRYLTME.js} +1 -1
- package/lib/chunks/{H7Z35EAH.js → RW4XUFPU.js} +1 -1
- package/lib/chunks/{3TRGOJ74.js → SQUNMRDS.js} +1 -1
- package/lib/chunks/{VNSAGJ2H.js → SQYOXXOB.js} +1 -1
- package/lib/chunks/{6ESHHDEM.js → UK55KIZM.js} +1 -1
- package/lib/chunks/{D2IJWX6B.js → URZNERQS.js} +1 -1
- package/lib/chunks/{TTWBJ74O.js → W3WAOVRR.js} +1 -1
- package/lib/chunks/{ABUS6H76.js → WJTV2BWV.js} +2 -2
- package/lib/chunks/{3TNSVCBC.js → WTIPGXGP.js} +1 -1
- package/lib/chunks/{YPT2KQ2K.js → XIO2RWJ6.js} +1 -1
- package/lib/chunks/{V34PUN4E.js → XTW63JDM.js} +1 -1
- package/lib/chunks/{XARQ5LTM.js → YURX7H3N.js} +1 -1
- package/lib/chunks/{QZJD7SST.js → YZRKJF2V.js} +1 -1
- package/lib/chunks/{OJE7THLM.js → Z7JI42WA.js} +1 -1
- package/lib/chunks/{N6VRECSO.js → ZIIE7LXR.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 +24 -23
- 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 +2 -2
- package/lib/eject-assets/generators/php/pagination.ts +2 -2
- 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/eject-assets/skills/php-generator/SKILL.md +5 -0
- package/lib/index.js +5 -5
- package/package.json +1 -1
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -664,7 +664,7 @@ Packages:
|
|
|
664
664
|
@redocly/ajv@8.18.3 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
665
665
|
@redocly/cli-otel@0.3.7 — Copyright 2025 Redocly Inc, all rights reserved.
|
|
666
666
|
@redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
|
|
667
|
-
@redocly/config@0.
|
|
667
|
+
@redocly/config@0.61.1 — Copyright 2024 Redocly Inc.
|
|
668
668
|
@redocly/openapi-core@1.34.20
|
|
669
669
|
agent-base@7.1.4 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
670
670
|
ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
|
|
@@ -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"./
|
|
7
|
+
import{ga as t}from"./JD3HIQIK.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,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 ye,e as ve,f as Se,g as we,h as O,i as Re,k,l as A,m as Ie,n as Pe,v as be,w as Oe}from"./
|
|
7
|
+
import{a as ye,e as ve,f as Se,g as we,h as O,i as Re,k,l as A,m as Ie,n as Pe,v as be,w as Oe}from"./MVXFJBMU.js";import{$ as E,J as ot,T as ce,W as at,X as pe,Y as g,Z as $,_ as de,aa as q,c as d,ca as S,ea as v,ga as R,ha as le,ia as fe,ja as me,ka as he,pa as ge,q as ae,v as ue}from"./JD3HIQIK.js";import{e as oe}from"./RFWIIJFG.js";import ke from"node:path";function I(t){return t?t.trim():""}function B(t){let e=I(t.operationId)||I(t.path);return[I(t.ruleId),I(t.severity),I(t.message),e,I(t.target),I(t.schemaPath)].join("")}var _=t=>pe(S(t));function ut(t){return t==="error"?"error":t==="warning"?"warning":"note"}function ct(t){if(t==null)return"";let e=String(t);return!e.includes(",")&&!e.includes('"')&&!e.includes(`
|
|
8
8
|
`)?e:`"${e.replace(/"/g,'""')}"`}function pt(t){return ke.isAbsolute(t)?ke.relative(process.cwd(),t)||".":t}function dt(t){if(!t)return null;let e=t.operationPathTemplate;return typeof e=="string"&&e.length>0?e:null}function lt(t){return Object.entries(t).sort((e,r)=>{let n=r[1]-e[1];return n!==0?n:e[0].localeCompare(r[0])})}function ft(t){let e=[],r=new Map;for(let n of t){let s=B({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 mt(t){let e=ft(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 ht(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(ct).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"./RAYBJJ43.js";import"./WTIPGXGP.js";import"./QQZJ42HN.js";import"./EXXYMXIB.js";import"./ICTI23CL.js";import"./WZXA5XPB.js";import"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as swrGenerator};
|
|
@@ -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}from"./
|
|
7
|
+
import{a,b,c,d,e,f}from"./O3UAIIFE.js";import"./2U6O26CV.js";import"./EXXYMXIB.js";import"./ICTI23CL.js";import"./WZXA5XPB.js";import"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{f as pythonDocs,d as pythonGenerator,c as pythonOptions,e as pythonSample,a as pythonType,b as renderPythonModels};
|
|
@@ -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"./
|
|
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"./QQZJ42HN.js";import{g as b,i as T}from"./EXXYMXIB.js";import{a as f,c as R,d as v,e as k}from"./ICTI23CL.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 C}from"./
|
|
7
|
+
import{a as C}from"./ICTI23CL.js";import{c as w}from"./JD3HIQIK.js";import{a as H,e as q,g as P,h as g,k as E}from"./LD5MEXEL.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`{
|
|
@@ -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"./
|
|
7
|
+
import{b as k,f as v}from"./ZIIE7LXR.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"./JD3HIQIK.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,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{u as o}from"./
|
|
7
|
+
import{u as o}from"./ZIIE7LXR.js";import{$ as t}from"./JD3HIQIK.js";var r=" ",a=" ";function g(i){let p=Math.max(...i.map(n=>o(n).length)),e=p+a.length*2,c=r+t("\u2551"+" ".repeat(e)+"\u2551");return["",r+t("\u2554"+"\u2550".repeat(e)+"\u2557"),c,...i.map(n=>{let h=" ".repeat(p-o(n).length);return`${r}${t("\u2551")}${a}${n}${h}${a}${t("\u2551")}`}),c,r+t("\u255A"+"\u2550".repeat(e)+"\u255D"),"",""].join(`
|
|
8
8
|
`)}export{g as a};
|
|
@@ -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,c as n}from"./HBUZKWXC.js";import{ga as t}from"./
|
|
7
|
+
import{a as o,c as n}from"./HBUZKWXC.js";import{ga as t}from"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as m}from"node:child_process";var j=async({argv:e})=>{t.info(`
|
|
8
8
|
Launching eject using NPX.
|
|
9
9
|
|
|
10
10
|
`);let{npxExecutableName:c,sanitize:r,shell:i}=n(),p=r(e.path,o),a=r(e["project-dir"],o);m(c,["-y","@redocly/realm","eject",`${e.type}`,p,`-d=${a}`,e.force?`--force=${e.force}`:""],{stdio:"inherit",shell:i}).on("error",s=>{throw t.info(`Eject launch failed: ${s.message}`),new Error("Eject launch failed.")})};export{j as handleEject};
|
|
@@ -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"./
|
|
7
|
+
import{b as D}from"./ZIIE7LXR.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"./JD3HIQIK.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"./
|
|
7
|
+
import{a}from"./6XEDECSL.js";import"./EXXYMXIB.js";import"./ICTI23CL.js";import"./WZXA5XPB.js";import"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
|
|
@@ -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"./
|
|
7
|
+
import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ga as r}from"./JD3HIQIK.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,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 A,c as F,d as S,e as l}from"./
|
|
7
|
+
import{b as A,c as F,d as S,e as l}from"./Z7JI42WA.js";import"./263OU3EK.js";import{e as $,g as x,n as I,o as P}from"./SQUNMRDS.js";import{f as p}from"./ZIIE7LXR.js";import"./LRUXN6H5.js";import{_ as w,ga as n,l as u}from"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function O({argv:t,config:o,version:c}){let h=performance.now(),j=Date.now(),{organization:g,project:d,"mount-path":z,verbose:D}=t,f=t.domain||x(),e,r,y,b,s=[];try{let i=$();if(e=P(t.files,(a,T)=>{n.warn(`File ${a} is overwritten by ${T}
|
|
8
8
|
`)}),!e.length)return p("push",h,"No files to upload");let m=await I({domain:f,apiKey:i,organization:g,project:d,mountPath:z,files:e,defaultBranch:t["default-branch"],commit:{message:t.message,branchName:t.branch,sha:t["commit-sha"],url:t["commit-url"],createdAt:t["created-at"],namespace:t.namespace,repository:t.repository,author:U(t.author)},version:c,replace:t.replace,onUploadStart:a=>{n.info(`Uploading to ${a.mountPath} ${e.length} ${u("file",e.length)}:
|
|
9
9
|
`)},onSunsetWarning:a=>s.push(a),onSlugDeprecated:S});r=m.pushId,y=m.organizationId,b=m.projectId}catch(i){l("push",s),F("\u2717 File upload failed.",i)}for(let i of e)n.info(w(`\u2713 ${i.name}
|
|
10
10
|
`));return n.info(`
|
|
@@ -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 h}from"./
|
|
7
|
+
import{a as h}from"./ICTI23CL.js";import{e as g,h as p,k as $}from"./LD5MEXEL.js";import{join as R}from"node:path";var a=" ";function m(e){return`${$(e)}Schema`}var y=new Map;function u(e,r=y,t=""){return j(w(e,r,t),e)}function w(e,r,t){switch(e.kind){case"scalar":return z(e.scalar,e.metadata);case"object":return b(e.properties,r,t);case"array":return`z.array(${u(e.items,r,t)})`;case"record":return`z.record(z.string(), ${u(e.value,r,t)})`;case"ref":return`z.lazy(() => ${m(e.name)})`;case"literal":return`z.literal(${p(e.value)})`;case"enum":return q(e.values);case"union":return k(e.members,r,t);case"intersection":return e.members.map(n=>u(n,r,t)).reduce((n,o)=>`${n}.and(${o})`);case"null":return"z.null()";case"unknown":return"z.unknown()";case"omit":return E(e.base,e.keys,r,t)}}function z(e,r){switch(e){case"string":return r?.format==="binary"?"z.instanceof(Blob)":"z.string()";case"integer":return"z.number().int()";case"number":return"z.number()";case"boolean":return"z.boolean()"}}function c(e){return g(e)===e?e:JSON.stringify(e)}function b(e,r,t){if(e.length===0)return"z.object({})";let n=t+a;return`z.object({
|
|
8
8
|
${e.map((s,i)=>{let d=u(s.schema,r,n),l=s.required?d:`${d}.optional()`,x=i===e.length-1?"":",";return`${n}${c(s.name)}: ${l}${x}`}).join(`
|
|
9
9
|
`)}
|
|
10
10
|
${t}})`}function q(e){return e.every(r=>typeof r=="string")?`z.enum([${e.map(r=>JSON.stringify(r)).join(", ")}])`:`z.union([${e.map(r=>`z.literal(${p(r)})`).join(", ")}])`}function k(e,r,t){let n=e.map(o=>u(o,r,t));return n.length===1?n[0]:`z.union([${n.join(", ")}])`}function E(e,r,t,n){let o=t.get(e);if(o&&o.kind!=="object")return u(f(o,r,t,new Set([e])),t,n);let s=r.map(i=>`${c(i)}: true`).join(", ");return`${m(e)}.omit({ ${s} })`}function f(e,r,t,n){switch(e.kind){case"object":return{...e,properties:e.properties.filter(o=>!r.includes(o.name))};case"union":case"intersection":return{...e,members:e.members.map(o=>f(o,r,t,n))};case"ref":{if(n.has(e.name))return e;let o=t.get(e.name);if(!o)return e;if(o.kind==="object"){let s=r.filter(i=>o.properties.some(d=>d.name===i));return s.length>0?{kind:"omit",base:e.name,keys:s}:e}return f(o,r,t,new Set([...n,e.name]))}default:return e}}function j(e,r){let t=r.metadata;if(!t)return e;let n=e;return r.kind==="scalar"&&r.scalar==="string"&&(t.minLength!==void 0&&(n=`${n}.min(${t.minLength})`),t.maxLength!==void 0&&(n=`${n}.max(${t.maxLength})`),t.pattern!==void 0&&(n=`${n}.regex(new RegExp(${JSON.stringify(t.pattern)}))`)),r.kind==="scalar"&&(r.scalar==="number"||r.scalar==="integer")&&(t.minimum!==void 0&&(n=`${n}.min(${t.minimum})`),t.maximum!==void 0&&(n=`${n}.max(${t.maximum})`),t.exclusiveMinimum!==void 0&&(n=`${n}.gt(${t.exclusiveMinimum})`),t.exclusiveMaximum!==void 0&&(n=`${n}.lt(${t.exclusiveMaximum})`)),r.kind==="array"&&(t.minItems!==void 0&&(n=`${n}.min(${t.minItems})`),t.maxItems!==void 0&&(n=`${n}.max(${t.maxItems})`)),n}function Z(e,r){let t=[];for(let n of h(e.services)){if(n.sse!==void 0)continue;let o=n.requestBody,s=o&&o.contentType.toLowerCase().includes("json")?u(o.schema,r,a):void 0,i=n.successResponses.find(l=>l.contentType.toLowerCase().includes("json")),d=i?u(i.schema,r,a):void 0;!s&&!d||t.push({name:n.specName??n.name,request:s,response:d})}return t}function I(e){let r=e.flatMap(n=>[`${a}${c(n.name)}: {`,...n.request?[`${a}${a}request: z.ZodType;`]:[],...n.response?[`${a}${a}response: z.ZodType;`]:[],`${a}};`]),t=e.map((n,o)=>{let s=[...n.request?[`request: ${n.request}`]:[],...n.response?[`response: ${n.response}`]:[]].join(", "),i=o===e.length-1?"":",";return`${a}${c(n.name)}: { ${s} }${i}`});return["/**"," * Request/response validators by operationId \u2014 powers `zodValidation`, or import one directly."," */","export const operationSchemas: {",...r,"} = {",...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 ee,b as te,f as ne,g as E,h as re}from"./
|
|
7
|
+
import{a as ee,b as te,f as ne,g as E,h as re}from"./ICTI23CL.js";import{a as y}from"./WZXA5XPB.js";import{O as W,T as V,c as x,ga as b,ia as Q,pa as Y,r as v,ra as T,s as H,t as J,ya as Z}from"./JD3HIQIK.js";import{b as A,c as G,k as D}from"./LD5MEXEL.js";import{mkdir as ct,readFile as ut,writeFile as dt}from"node:fs/promises";import{dirname as ke,parse as ft,resolve as R,sep as pt}from"node:path";function M(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./OJPXHGKU.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("./PFZ3YKKV.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./5AUGOZUX.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":M("react"),"tanstack-query-vue":M("vue"),"tanstack-query-svelte":M("svelte"),"tanstack-query-solid":M("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./2H2LESBI.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./NJRBU6GW.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./MGVCQC3T.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./34J7T7MH.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./XIO2RWJ6.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./BBX56KPO.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function oe(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(m=>`--generator ${m}`).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 se(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,ve(s,o,i))}return r}function ve(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=Se(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function Se(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 xe,resolve as qe}from"node:path";import{pathToFileURL as Pe}from"node:url";var Oe=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 ae(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ce(n,a);let r=[];for(let a of e)r.push(await ie(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 ie(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 ie(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 je(e,n??process.cwd());return ce(t,s),s.name}function ce(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=re(E,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 ${E}. 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
|
-
var e={name:"@redocly/cli",version:"2.58.
|
|
7
|
+
var e={name:"@redocly/cli",version:"2.58.2",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:"git+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:{"@modelcontextprotocol/sdk":"^1.30.0","@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.7","@redocly/client-generator":"0.4.23","@redocly/openapi-core":"2.58.2","@redocly/recheck":"2.58.2","@redocly/respect-core":"2.58.2","@redocly/reunite-integration":"2.58.2","@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",react:"^17.0.0 || ^18.2.0 || ^19.2.7","react-dom":"^17.0.0 || ^18.2.0 || ^19.2.7",redoc:"2.5.4",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.29.0",yargs:"17.0.1"}};var{version:c,name:i,engines:s}=e,n=e.devDependencies.redoc,p="sha384-w447zOpYfw/1Tv/5AK9NfHTlQIqE3RVR6KY62jCyy9zNDgO64cMwGGP1Fj0zJVf5";export{c as a,i as b,s as 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 c}from"./
|
|
7
|
+
import{a as c}from"./YZRKJF2V.js";import{h as s,l as a}from"./SQUNMRDS.js";import"./LRUXN6H5.js";import{_ as t,ga as e,ma as i}from"./JD3HIQIK.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,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"./
|
|
7
|
+
import{a,b,c,d,e}from"./WJTV2BWV.js";import"./2U6O26CV.js";import"./EXXYMXIB.js";import"./ICTI23CL.js";import"./WZXA5XPB.js";import"./JD3HIQIK.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"./
|
|
7
|
+
import{a as q}from"./YZRKJF2V.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./SQUNMRDS.js";import{b as J,d as M,e as Y,v as L}from"./ZIIE7LXR.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"./JD3HIQIK.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{b as S,c as N,e as R,j as g,k as _,o as v,q as F,r as U,s as b,v as s}from"./
|
|
7
|
+
import{b as S,c as N,e as R,j as g,k as _,o as v,q as F,r as U,s as b,v as s}from"./ZIIE7LXR.js";import{$,_ as y,aa as i,ea as u,ga as n,na as k,pa as T,t as O,ta as B,ua as E}from"./JD3HIQIK.js";import{writeFileSync as L}from"fs";import{resolve as j}from"path";import{performance as q}from"perf_hooks";var P={};async function Y({argv:e,config:l,version:W,collectSpecData:G}){let A=await S(e.apis,l),a={errors:0,warnings:0,ignored:0},I=N(l);for(let{path:o,alias:c,output:J}of A)try{let d=q.now(),p=l.forAlias(c);p.skipPreprocessors(e["skip-preprocessor"]),p.skipDecorators(e["skip-decorator"]);let m=e.overlay??p.resolvedConfig.overlays?.map(t=>O(t)?t:j(I,t));m?.length&&(P.bundle_overlays_count=(P.bundle_overlays_count??0)+m.length),c===void 0?n.info(u(`bundling ${s(o)}...
|
|
8
8
|
`)):n.info(u(`bundling ${s(o)} using configuration for api '${c}'...
|
|
9
9
|
`));let{bundle:D,problems:w,...x}=await T({ref:o,config:p,dereference:e.dereferenced,removeUnusedComponents:e["remove-unused-components"],keepUrlRefs:e["keep-url-references"],componentRenamingConflicts:e["component-renaming-conflicts-severity"],componentNamesStrategy:e["component-names-strategy"],overlays:m,collectSpecData:G}),r=B(w),{outputFile:f,ext:K}=F({entrypoint:o,output:J,argvOutput:e.output,ext:e.ext,entries:e?.apis?.length||0});if(r.errors===0||e.force)if(f){let t=g(b(D.parsed),K,e.dereferenced);_(f,t)}else{let t=g(b(D.parsed),e.ext||"yaml",e.dereferenced);n.output(t)}a.errors+=r.errors,a.warnings+=r.warnings,a.ignored+=r.ignored,E(w,{format:"codeframe",totals:r,version:W,command:"bundle"}),e.metafile&&(A.length>1&&n.warn('[WARNING] "--metafile" cannot be used with multiple apis. Skipping...'),L(e.metafile,JSON.stringify(x),"utf-8"));let h=R(d);r.errors>0?e.force?n.info(`\u2753 Created a bundle for ${i(s(o))} at ${i(f||"stdout")} with errors ${y(h)}.
|
|
10
10
|
${$("Errors ignored because of --force")}.
|
|
@@ -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 P,b as y,c as $}from"./
|
|
7
|
+
import{a as P,b as y,c as $}from"./263OU3EK.js";import{ga as h,xa as x}from"./JD3HIQIK.js";function N(t){let e=t.trim(),n=e.match(/^```(?:ya?ml|json)?\s*\n([\s\S]*?)\n```$/);return n?n[1]:e}async function O(t,e){let r=(await x({source:t,config:e})).filter(o=>o.severity==="error");if(r.length>0){let o=r.slice(0,5).map(s=>`${s.ruleId}: ${s.message}`).join("; ");throw new Error(`the result has ${r.length} validation problem(s): ${o}`)}}import{spawn as T}from"node:child_process";import{mkdtemp as v}from"node:fs/promises";import{tmpdir as R}from"node:os";import S from"node:path";var I=3e5,a=class extends Error{},C;function L(){return C??=v(S.join(R(),"redocly-ai-")),C}async function w(t,e,n,r){let o=await L();return new Promise((s,u)=>{let i=T(t,e,{stdio:["pipe","pipe","pipe"],cwd:o,env:{...process.env,...r}}),l="",f="",g=!1,d=setTimeout(()=>{g=!0,i.kill("SIGKILL")},I);i.stdout.on("data",c=>{l+=c.toString()}),i.stderr.on("data",c=>{f+=c.toString()}),i.on("error",c=>{if(clearTimeout(d),c.code==="ENOENT"){u(new a(`Could not find the "${t}" CLI on PATH. Is it installed?`));return}u(c)}),i.on("close",c=>{if(clearTimeout(d),g){u(new Error(`The "${t}" CLI did not respond within ${I/1e3} seconds.`));return}s({stdout:l,stderr:f,code:c})}),i.stdin.on("error",()=>{}),i.stdin.end(n)})}async function A(t){let e=["-p","--output-format","text","--tools","","--strict-mcp-config","--setting-sources","","--no-session-persistence","--append-system-prompt",t.system];t.model&&e.push("--model",t.model);let{stdout:n,stderr:r,code:o}=await w("claude",e,t.user,{CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:"1"});if(o!==0)throw new Error(`claude CLI exited with code ${o}: ${r.trim()||n.trim()}`);if(!n.trim())throw new Error("claude CLI returned no output.");return{text:n}}async function b(t){let e=["exec","--skip-git-repo-check","--sandbox","read-only","-c","mcp_servers={}","-c","project_doc_max_bytes=0"];t.model&&e.push("--model",t.model),e.push("-");let n=`${t.system}
|
|
8
8
|
|
|
9
9
|
${t.user}`,{stdout:r,stderr:o,code:s}=await w("codex",e,n);if(s!==0)throw new Error(`codex CLI exited with code ${s}: ${o.trim()||r.trim()}`);if(!r.trim())throw new Error("codex CLI returned no output.");return{text:r}}async function _(t){let e=["-p","--output-format","text","--trust"];t.model&&e.push("--model",t.model);let n=`${t.system}
|
|
10
10
|
|
|
@@ -4,10 +4,10 @@ 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 l,b as O,c as v,d as U,e as F}from"./U5DIFWGH.js";import{b as R}from"./
|
|
7
|
+
import{a as l,b as O,c as v,d as U,e as F}from"./U5DIFWGH.js";import{b as R}from"./ZIIE7LXR.js";import{$ as k,aa as $,c as G,ea as S,ga as b,l as P,ma as g}from"./JD3HIQIK.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{readFileSync as z}from"node:fs";import{mkdir as H,writeFile as B}from"node:fs/promises";import{basename as T,dirname as A,extname as I,isAbsolute as N,relative as j,resolve as f}from"node:path";var V=/^[a-z][a-z0-9+.-]+:/i;function L(e,n){let{setup:o}=e;if(typeof o!="string")return e;if(V.test(o))throw new g(`
|
|
8
8
|
\u274C \`client.setup\` must be a local file path \u2014 remote setup modules are not supported.
|
|
9
9
|
Got: ${o}
|
|
10
|
-
`);return N(o)?e:{...e,setup:f(n,o)}}function q(e){return`${e.replace(/[\\/]/g,"_")}.client.ts`}function D(e){if(e.startsWith("//"))return!1;if(e.startsWith("/"))return!0;try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}async function ie({argv:e,config:n}){let{AUTHORING_HELPER_NAMES:o,generateClient:c,mergeConfig:m}=await import("./
|
|
10
|
+
`);return N(o)?e:{...e,setup:f(n,o)}}function q(e){return`${e.replace(/[\\/]/g,"_")}.client.ts`}function D(e){if(e.startsWith("//"))return!1;if(e.startsWith("/"))return!0;try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}async function ie({argv:e,config:n}){let{AUTHORING_HELPER_NAMES:o,generateClient:c,mergeConfig:m}=await import("./IMRV4QDD.js"),t=n.configPath?A(n.configPath):process.cwd(),s={serverUrl:e["server-url"],outputMode:e["output-mode"],runtime:e.runtime,importExt:e["import-ext"],goPackage:e["go-package"],argsStyle:e["args-style"],errorMode:e["error-mode"],dateType:e["date-type"],mockData:e["mock-data"],mockSeed:e["mock-seed"],docs:e.docs,generators:e.generator?.map(a=>a.startsWith(".")?f(a):a),setup:e.setup===void 0?void 0:L({setup:e.setup},process.cwd()).setup},r=n.resolvedConfig.apis??{},i=Object.keys(r).filter(a=>G(r[a].client)||r[a].clientOutput!==void 0);if(e.api===void 0){if(e.output)throw new g("\n\u274C --output can't target multiple APIs. Set `clientOutput` under each api in redocly.yaml, or pass a single <api>.\n");if(i.length===0)throw new g("\n\u274C No API to generate. Add a `client` block or `clientOutput` under an `apis:` entry, or pass <api> (a file/URL or an `apis:` alias).\n")}let u=await R(e.api===void 0?i:[e.api],n),p={config:n,configDir:t,cliFlags:s,outputFlag:e.output,toolkit:{generateClient:c,mergeConfig:m,helperNames:o},seenOutputs:new Set,composable:[]};for(let a of u)await J(a,p);let y=G(n.resolvedConfig.client)?n.resolvedConfig.client:{};y.cliOutput!==void 0&&e.api===void 0&&p.composable.length>0&&await K(y.cliOutput,p)}async function J(e,{config:n,configDir:o,cliFlags:c,outputFlag:m,toolkit:t,seenOutputs:s,composable:r}){let{path:i,alias:u}=e,p=u??T(i,I(i)),y=n.forAlias(u),{client:a,clientOutput:E}=y.resolvedConfig,W=L(G(a)?a:{},o),h=t.mergeConfig(W,c);Q(h.generators??[],t.helperNames,o);let C=m!==void 0?f(m):E!==void 0?f(o,E):f(o,q(p));if(!C.endsWith(".ts"))throw new g(`
|
|
11
11
|
\u274C output must point at a TypeScript file (ending in .ts).
|
|
12
12
|
Got: ${C}
|
|
13
13
|
`);if(s.has(C))throw new g(`
|
|
@@ -23,7 +23,7 @@ import{a as l,b as O,c as v,d as U,e as F}from"./U5DIFWGH.js";import{b as R}from
|
|
|
23
23
|
`)}catch(d){let w=d instanceof Error?d.message:String(d);throw l.generate_client_error_category=F(w),new g(`
|
|
24
24
|
\u274C Failed to generate client for ${p}.
|
|
25
25
|
${w}
|
|
26
|
-
`)}}async function K(e,{configDir:n,seenOutputs:o,composable:c}){let{renderComposedCliEntry:m}=await import("./
|
|
26
|
+
`)}}async function K(e,{configDir:n,seenOutputs:o,composable:c}){let{renderComposedCliEntry:m}=await import("./EPO2USQL.js"),t=f(n,e);if(!t.endsWith(".ts"))throw new g(`
|
|
27
27
|
\u274C client.cliOutput must point at a TypeScript file (ending in .ts).
|
|
28
28
|
Got: ${t}
|
|
29
29
|
`);if(o.has(t))throw new g(`
|
|
@@ -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"./
|
|
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"./MVXFJBMU.js";import{c as g}from"./JD3HIQIK.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,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"./
|
|
7
|
+
import{c as O,d as se,f as oe}from"./XTW63JDM.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"./JD3HIQIK.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"./V34PUN4E.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("./
|
|
19
|
+
${n}`}async function Vt({argv:e,config:r,version:t,collectSpecData:s}){let n,o;try{let{run:i,conditionallyMaskSecrets:a}=await import("./MSKEZAFV.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,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"./
|
|
7
|
+
import{a as R,b as u,c as f,d}from"./W3WAOVRR.js";import{d as y,e as G,f as x}from"./O3UAIIFE.js";import{c as g,d as S,e as h}from"./MW2B5X5N.js";import{c as k,d as v,e as b}from"./WJTV2BWV.js";import{a as D,b as E,c as q,d as z}from"./7JYJB6ME.js";import{a as o}from"./PJD3MHLL.js";import{a,b as p,c as s}from"./3STDF6WW.js";import"./2U6O26CV.js";import{a as m}from"./6XEDECSL.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./RAYBJJ43.js";import"./WTIPGXGP.js";import{a as I,d as M,e as N}from"./QQZJ42HN.js";import{a as l}from"./3WFT3I7F.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"./EXXYMXIB.js";import"./ICTI23CL.js";import{a as U}from"./WZXA5XPB.js";import"./JD3HIQIK.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};
|
|
@@ -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("./
|
|
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("./LBQ2QKCY.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};
|