@redocly/cli 0.0.0-snapshot.1791798660 → 0.0.0-snapshot.1791991532
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 +2 -2
- package/lib/chunks/{SXBAAS4M.js → 27RF53UX.js} +1 -1
- package/lib/chunks/{IAWXLFH5.js → 2OP5H56X.js} +1 -1
- package/lib/chunks/{MNH2K4WM.js → 2RFPYWLR.js} +1 -1
- package/lib/chunks/{6EGJEFXO.js → 3AN2JL5L.js} +1 -1
- package/lib/chunks/{3C6UUCEW.js → 3G6I2THA.js} +1 -1
- package/lib/chunks/{JM7UFSTY.js → 3S4IRDFA.js} +1 -1
- package/lib/chunks/{XCAIWCYC.js → 3ZECFMAT.js} +381 -381
- package/lib/chunks/{DS4SCWID.js → 4K56BI6R.js} +1 -1
- package/lib/chunks/{V47KAOFH.js → 4ROOQMBR.js} +1 -1
- package/lib/chunks/{I5CGSLGR.js → 5EHONRHV.js} +1 -1
- package/lib/chunks/{3DEJQSYG.js → 5PAHQ46O.js} +1 -1
- package/lib/chunks/{2XK7ML3U.js → 5X4BHEEC.js} +1 -1
- package/lib/chunks/{LRLGVYCG.js → 62DUJODV.js} +1 -1
- package/lib/chunks/{3FXYWWTJ.js → 65Z4HCGP.js} +1 -1
- package/lib/chunks/{MM6FCQYH.js → 6PXHGGMV.js} +1 -1
- package/lib/chunks/{H6CHW7QD.js → 6TWY22YJ.js} +1 -1
- package/lib/chunks/{KOR5TUJG.js → 75KF6KMH.js} +1 -1
- package/lib/chunks/{FDMXHRDK.js → BGYGNTSQ.js} +1 -1
- package/lib/chunks/{OP7NIAI7.js → CE33XFWK.js} +1 -1
- package/lib/chunks/{Z7TTYRM6.js → CLOQA45J.js} +1 -1
- package/lib/chunks/{SLQPKXO2.js → EHHPFNRI.js} +1 -1
- package/lib/chunks/{6DO6IN4A.js → EVRLVLLG.js} +1 -1
- package/lib/chunks/{S6NFOZ34.js → FR5GGAOC.js} +1 -1
- package/lib/chunks/{6NB3FKVN.js → G5N5PSW7.js} +1 -1
- package/lib/chunks/{WLWBF55X.js → GFVMASRA.js} +7 -7
- package/lib/chunks/{XJTGJYVS.js → GMDR5ZW4.js} +1 -1
- package/lib/chunks/{PA5NTLHU.js → HJG2FPQJ.js} +1 -1
- package/lib/chunks/{KRCCY64H.js → ICZFSIWN.js} +1 -1
- package/lib/chunks/{UT6R3WJ5.js → IGMVMLDP.js} +1 -1
- package/lib/chunks/{65VNXAVH.js → ILO7JIPX.js} +1 -1
- package/lib/chunks/{HYE4U6V5.js → JCULCLTC.js} +1 -1
- package/lib/chunks/{MIVAVRV6.js → KCUWXFMT.js} +1 -1
- package/lib/chunks/{TBZEEKTV.js → KO4GISAK.js} +1 -1
- package/lib/chunks/{RMDO6VMU.js → LRV7GOJA.js} +1 -1
- package/lib/chunks/LW2LHOYR.js +59 -0
- package/lib/chunks/M77N5EHO.js +20 -0
- package/lib/chunks/{PTNNX4IU.js → M7COG6HN.js} +1 -1
- package/lib/chunks/{WDYKA4ID.js → MI7HENSS.js} +1 -1
- package/lib/chunks/{GWXT3QO6.js → MNLUMWPT.js} +2 -2
- package/lib/chunks/{BPGARLT6.js → NFN2H3FA.js} +1 -1
- package/lib/chunks/{XC4CTAKH.js → NIHZJ7LQ.js} +1 -1
- package/lib/chunks/{US7X4XPD.js → NL4BJZLQ.js} +1 -1
- package/lib/chunks/{2OQM5ARW.js → NPLUTFQJ.js} +1 -1
- package/lib/chunks/{22EANOP2.js → NPUBXOHX.js} +105 -105
- package/lib/chunks/{XJE2OFDN.js → NR3R4HFM.js} +45 -18
- package/lib/chunks/{3JYY42DL.js → O4NYNM77.js} +1 -1
- package/lib/chunks/{3MVW5AM6.js → OSUNVIO2.js} +1 -1
- package/lib/chunks/PE2O6R3Q.js +20 -0
- package/lib/chunks/{LVGVWPDB.js → PXZCW4SP.js} +1 -1
- package/lib/chunks/{37WWN4MA.js → RK5FX2O4.js} +1 -1
- package/lib/chunks/RZFI2AG6.js +7 -0
- package/lib/chunks/SDBP6GLU.js +7 -0
- package/lib/chunks/{5PG3ST2N.js → SH7VG2WW.js} +2 -2
- package/lib/chunks/{ENSYM7KY.js → STYDNPKP.js} +1 -1
- package/lib/chunks/{244JPOF6.js → SYIN2AGJ.js} +1 -1
- package/lib/chunks/{HJ5DD7MU.js → UIOAY3HR.js} +1 -1
- package/lib/chunks/{SYWAPWW7.js → UX43XK5R.js} +1 -1
- package/lib/chunks/{2OVI7BIW.js → UYE3ZNKG.js} +1 -1
- package/lib/chunks/{SHZZKTDE.js → V6XQIM52.js} +1 -1
- package/lib/chunks/{HBENVUR4.js → VLUZTVYU.js} +1 -1
- package/lib/chunks/{TKLMYBPI.js → VWPTPKZ3.js} +1 -1
- package/lib/chunks/{P7RM5LE4.js → W5RHDYWX.js} +156 -58
- package/lib/chunks/{T5PHAXRK.js → WHGJW7RG.js} +1 -1
- package/lib/chunks/{4AM55DEH.js → X2PCIOQT.js} +1 -1
- package/lib/chunks/{YDVWNFMS.js → XJITGOF2.js} +1 -1
- package/lib/chunks/{RPHIT72T.js → Y4UGVSZQ.js} +1 -1
- package/lib/chunks/{VKGWZVJS.js → YAJ4H3PP.js} +3 -3
- package/lib/chunks/{CSYGFJ7J.js → YGJKFBLP.js} +1 -1
- package/lib/chunks/{ZCVUIIPU.js → YHGXW2UM.js} +1 -1
- package/lib/chunks/YLXEIEF2.js +11 -0
- package/lib/chunks/{XHWNKVDR.js → ZMQU3KUA.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 +2 -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 +2 -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 +2 -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 +56 -9
- 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/tanstack-query-generator/SKILL.md +5 -2
- package/lib/eject-assets/skills/typescript-generator/SKILL.md +5 -0
- package/lib/index.js +5 -5
- package/package.json +1 -1
- package/lib/chunks/2KDQDHHX.js +0 -11
- package/lib/chunks/3AJ7S63W.js +0 -20
- package/lib/chunks/BEIMEONG.js +0 -42
- package/lib/chunks/KEQMCLRU.js +0 -20
- package/lib/chunks/LSS2SW4D.js +0 -7
- package/lib/chunks/RJYQDEUH.js +0 -7
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -663,8 +663,8 @@ Packages:
|
|
|
663
663
|
@redocly/ajv@8.11.2 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
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
|
+
@redocly/config@0.0.0-feat-config-is-file-path.1ef532d5f77 — Copyright 2024 Redocly Inc.
|
|
666
667
|
@redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
|
|
667
|
-
@redocly/config@0.65.0 — 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
|
|
@@ -697,7 +697,7 @@ Packages:
|
|
|
697
697
|
foreach@2.0.6 — Copyright (c) 2013 Manuel Stofer
|
|
698
698
|
get-east-asian-width@1.7.0
|
|
699
699
|
graphql@16.14.2 — Copyright (c) GraphQL Contributors
|
|
700
|
-
handlebars@4.7.
|
|
700
|
+
handlebars@4.7.10 — Copyright (C) 2011-2019 by Yehuda Katz
|
|
701
701
|
has-flag@4.0.0
|
|
702
702
|
https-proxy-agent@7.0.6 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
703
703
|
is-buffer@2.0.5 — Copyright (c) Feross Aboukhadijeh
|
|
@@ -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"./G5N5PSW7.js";import{V as C,W as j,ia as $,ka as k,la as M,ma as S,oa as b,q as F,u as R,w as x}from"./NPUBXOHX.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{b as a,c as b,d as c}from"./
|
|
7
|
+
import{b as a,c as b,d as c}from"./ILO7JIPX.js";import"./NR3R4HFM.js";import"./UIOAY3HR.js";import"./YGJKFBLP.js";import"./YLXEIEF2.js";import"./W5RHDYWX.js";import"./WZXA5XPB.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as cliDocs,a as cliGenerator,c as cliSample};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e,f,g}from"./
|
|
7
|
+
import{a,b,c,d,e,f,g}from"./BGYGNTSQ.js";import"./UF2ZCH7W.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{d as RESET_ESCAPE_CODE,c as calculateTotals,f as conditionallyMaskSecrets,b as generate,e as maskSecrets,a as parseRuntimeExpression,g as run};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b}from"./
|
|
7
|
+
import{a,b}from"./VLUZTVYU.js";import"./G5N5PSW7.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as bundleTelemetry,b as handleBundle};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as $,g as xt,h as et}from"./
|
|
7
|
+
import{a as $,g as xt,h as et}from"./EHHPFNRI.js";import{a as wt}from"./64G5RPLP.js";import{b as lt,f as ut,m as gt,n as ht,s as yt}from"./G5N5PSW7.js";import{$ as D,V as Z,aa as G,b as N,ba as k,c as M,ca as v,d as it,g as at,i as U,ia as T,ka as tt,oa as w,qa as ft,r as E,va as ct,w as pt,wa as mt}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as Nt from"node:path";import{performance as jt}from"node:perf_hooks";import*as Ot from"node:path";function dt(t,e){xt(t,o=>{if(E(o)&&et(o.$ref)){let r=Ot.basename(o.$ref);o.$ref=o.$ref.replace(r,e+"_"+r)}else if(M(o.discriminator)&&M(o.discriminator.mapping)){let{mapping:r}=o.discriminator;for(let i of Object.keys(r)){let c=r[i];typeof c=="string"&&et(c)&&(r[i]=c.split("/").map((O,s,p)=>p.length-1===s&&!O.startsWith(e+"_")?e+"_"+O:O).join("/"))}}})}function j(t,e,o){if(!e)return"";if(!t)throw new w("Info section is not found in specification.");if(!t[e])throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value is not found in info section.`);if(!at(t[e]))throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value should be string.`);if(t[e].length>50)throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value length should not exceed 50 characters.`);return t[e].replaceAll(/\s/g,"_")}function ot(t,e){return e?t?.map(o=>{let r={};for(let[i,c]of Object.entries(o))Object.assign(r,{[e+"_"+i]:c});return r}):t}function C(t,e){return e?e+"_"+t:t}import*as Pt from"node:path";function H(t,e){return t.replace(/"(#\/components\/.*?)"/g,o=>{let r=Pt.basename(o);return o.replace(r,C(r,e))})}function B(t){return t.map(e=>({name:e}))}import*as q from"node:path";function bt(t){return q.basename(t,q.extname(t))}function vt(t){return Object.entries(t).filter(([e,o])=>o.length>1)}function rt(t,e){for(let[o,r]of e)T.warn(`Conflict on ${t} : ${D(o)} in files: ${v(r)}
|
|
8
8
|
`)}function Tt(t){T.info(G(`
|
|
9
9
|
${t} conflict(s) on tags.
|
|
10
10
|
Suggestion: please use ${v("prefix-tags-with-filename")}, ${v("prefix-tags-with-info-prop")} or ${v("without-x-tag-groups")} to prevent naming conflicts.
|
|
@@ -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"./W5RHDYWX.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(`
|