@redocly/cli 0.0.0-snapshot.1793634365 → 0.0.0-snapshot.1793639154
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/lib/chunks/{BYXGTGTC.js → 2VEBJTXT.js} +1 -1
- package/lib/chunks/{DNGEQLDY.js → 46SLQ4CU.js} +1 -1
- package/lib/chunks/{NZ35BKRY.js → 4NSY3LMD.js} +2 -2
- package/lib/chunks/{EVCBWZMB.js → 55XS6NAN.js} +1 -1
- package/lib/chunks/{IKC4DXUG.js → 5PLF5DE4.js} +1 -1
- package/lib/chunks/{6LWQ5TYN.js → 6H6JZR34.js} +1 -1
- package/lib/chunks/{MQ5BA5G2.js → ADAQBYK6.js} +1 -1
- package/lib/chunks/{ODGWI3NN.js → ADRTGRZ3.js} +1 -1
- package/lib/chunks/{L3SVOYUL.js → AQGRZZTJ.js} +1 -1
- package/lib/chunks/{WM2YPWLO.js → CC3J4WUZ.js} +1 -1
- package/lib/chunks/{RRIV3EHA.js → D5FXUPT3.js} +7 -5
- package/lib/chunks/{IESUVLCO.js → DKO42NY5.js} +1 -1
- package/lib/chunks/{OOEFV6Z4.js → DQDINKZV.js} +1 -1
- package/lib/chunks/{OFCBZIPV.js → E2GVJIW4.js} +1 -1
- package/lib/chunks/{U4XFU44Z.js → E3DADNJB.js} +1 -1
- package/lib/chunks/{DTIZ4K5G.js → EVWUDZ53.js} +1 -1
- package/lib/chunks/{X6EMKM3S.js → FQW4AJZ5.js} +1 -1
- package/lib/chunks/{3RJYHSWV.js → GGVGW7FK.js} +1 -1
- package/lib/chunks/{7ZVC32EU.js → GMDXESQC.js} +1 -1
- package/lib/chunks/{2VVA5MVM.js → GUX653X5.js} +1 -1
- package/lib/chunks/{4KEUCKH2.js → HAEWZII5.js} +3 -1
- package/lib/chunks/{FRC4VTX7.js → HCEBTB6Q.js} +1 -1
- package/lib/chunks/{TUHQFT5Q.js → HEOB2XNV.js} +1 -1
- package/lib/chunks/{FLMPHEPL.js → JDREVQ6N.js} +2 -2
- package/lib/chunks/KT4ZWMGX.js +28 -0
- package/lib/chunks/{F535IDU4.js → LGCWGJ6M.js} +1 -1
- package/lib/chunks/{7EQLB7LP.js → NJRAYNNV.js} +1 -1
- package/lib/chunks/{FR2ROJXF.js → RBCDZ57G.js} +1 -1
- package/lib/chunks/{XXSPULVM.js → RQ2GHUTM.js} +1 -1
- package/lib/chunks/{TOJ7W5FT.js → S3IN43JY.js} +1 -1
- package/lib/chunks/{B4QEAX74.js → SKBRULRS.js} +1 -1
- package/lib/chunks/{GQTFT7VK.js → STTC5LQL.js} +1 -1
- package/lib/chunks/{PC5SY73H.js → U7DBLTUY.js} +1 -1
- package/lib/chunks/{E6L6DXPL.js → WYJDYKTU.js} +1 -1
- package/lib/chunks/{7VSOXAWC.js → XLGPRL3R.js} +1 -1
- package/lib/chunks/{JPS7RYPY.js → ZIUPK7LZ.js} +1 -1
- package/lib/chunks/{JEFVMI6X.js → ZQR3UXSE.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/java/client.ts +1 -1
- package/lib/eject-assets/generators/java/descriptor.ts +1 -1
- package/lib/eject-assets/generators/java/index.ts +2 -2
- package/lib/eject-assets/generators/java/models.ts +1 -1
- package/lib/eject-assets/generators/java/naming.ts +1 -1
- package/lib/eject-assets/generators/java/operations.ts +1 -1
- package/lib/eject-assets/generators/java/pagination.ts +1 -1
- package/lib/eject-assets/generators/java/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +1 -1
- package/lib/eject-assets/generators/mock/index.ts +2 -2
- package/lib/eject-assets/generators/mock/render.ts +1 -1
- package/lib/eject-assets/generators/mock/sample.ts +1 -1
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +1 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +1 -1
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +1 -1
- package/lib/eject-assets/generators/php/pagination.ts +1 -1
- package/lib/eject-assets/generators/php/types.ts +1 -1
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +1 -1
- package/lib/eject-assets/generators/python/index.ts +2 -2
- package/lib/eject-assets/generators/python/models.ts +1 -1
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +1 -1
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +1 -1
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/eject-assets/skills/python-generator/SKILL.md +2 -0
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/lib/chunks/AXVJNFC4.js +0 -25
|
@@ -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"./GUX653X5.js";import"./RQ2GHUTM.js";import"./ADRTGRZ3.js";import"./4NSY3LMD.js";import"./ZQR3UXSE.js";import"./D5FXUPT3.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as Ate,b as Ote}from"./FLMPHEPL.js";import{d as Rte}from"./F535IDU4.js";import{b as Ete,e as Tte}from"./ZC5BCEUX.js";import{T as xte,X as wte,c as bte,ga as wP,ka as o1,la as Cte,ma as kte,qa as k2,ta as Ste,u as yte}from"./X22IMAJK.js";import"./6RTITFQA.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
import{a as Ate,b as Ote}from"./JDREVQ6N.js";import{d as Rte}from"./LGCWGJ6M.js";import{b as Ete,e as Tte}from"./ZC5BCEUX.js";import{T as xte,X as wte,c as bte,ga as wP,ka as o1,la as Cte,ma as kte,qa as k2,ta as Ste,u as yte}from"./X22IMAJK.js";import"./6RTITFQA.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
8
8
|
|
|
9
9
|
Your code should look like:
|
|
10
10
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -4,8 +4,8 @@ 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,f,j as d,m as u}from"./
|
|
7
|
+
import{a as p,f,j as d,m as u}from"./D5FXUPT3.js";function m(e,t,n){let i=t??{},a=e.specName??e.name;if(Array.isArray(i.exclude)&&i.exclude.includes(a))return;let r=(i.operations??{})[a]??e.paginationExtension;if(r===void 0&&typeof i.style=="string"){let{exclude:l,operations:I,...h}=i;k(e,h,n)&&(r=h)}if(r===void 0||typeof r.style!="string")return;let o=r.style==="cursor"?r.cursorParam:r.offsetParam;return{style:r.style,...typeof o=="string"?{param:o}:{},...typeof r.nextCursor=="string"?{nextCursor:r.nextCursor}:{},...typeof r.hasMore=="string"?{hasMore:r.hasMore}:{},...typeof r.nextLink=="string"?{nextLink:r.nextLink}:{},...typeof r.limitParam=="string"?{limitParam:r.limitParam}:{},...typeof r.items=="string"?{items:r.items}:{}}}function k(e,t,n){if(t.style==="link")return e.successResponseHeaders?.some(a=>a.name==="link")===!0;if(t.style==="body-link"){if(typeof t.nextLink!="string"||n===void 0)return!1;let a=e.successResponses.find(o=>o.contentType.toLowerCase().includes("json"));if(a===void 0)return!1;let s=u(a.schema,t.nextLink,n);if(s===void 0)return!1;let r=f(d(s),n);return(r?.kind==="scalar"||r?.kind==="enum")&&r.scalar==="string"}let i=t.style==="cursor"?t.cursorParam:t.offsetParam;return typeof i=="string"&&e.queryParams.some(a=>a.name===i)}function b(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("json"))?.schema}function R(e){return e.successResponses.find(t=>t.contentType.toLowerCase().includes("text/event-stream"))}function x(e){return e.requestBody?.contentType.toLowerCase().includes("multipart")??!1}function S(e){let t=e.requestBody?.schema.kind;return x(e)&&t!=="object"&&t!=="ref"}var $=["application/octet-stream","application/pdf","image/","audio/","video/","font/","application/x-font-","application/zip","application/x-zip-compressed","application/gzip","application/x-gzip","application/x-bzip2","application/x-tar","application/x-rar-compressed","application/x-7z-compressed","application/vnd.openxmlformats-officedocument","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/msword","application/x-shockwave-flash"];function y(e){let t=e.split(";")[0].trim().toLowerCase();return $.some(n=>t.startsWith(n))}function P(e){let t=new Set(e.variables.map(r=>r.name)),n=[],i="",a=e.url,s=/\{([^{}]+)\}/;for(let r=s.exec(a);r!==null;r=s.exec(a))i+=a.slice(0,r.index),t.has(r[1])?(i!==""&&n.push({kind:"literal",value:i}),i="",n.push({kind:"variable",name:r[1]})):i+=r[0],a=a.slice(r.index+r[0].length);return i+=a,(i!==""||n.length===0)&&n.push({kind:"literal",value:i}),n}function T(e,t){return e.security.map(n=>n.flatMap(i=>{let a=t.securitySchemes.find(s=>s.key===i);return a===void 0?[]:a.kind==="bearer"||a.kind==="basic"?[{scheme:i,kind:a.kind}]:a.kind==="apiKeyHeader"?[{scheme:i,kind:"apiKey",name:a.headerName,in:"header"}]:a.kind==="apiKeyQuery"?[{scheme:i,kind:"apiKey",name:a.paramName,in:"query"}]:[{scheme:i,kind:"apiKey",name:a.cookieName,in:"cookie"}]})).filter(n=>n.length>0)}function C(e,t,n){if(e===void 0||t===void 0)return;let i=u(e,t,n);return i?.kind==="array"?i.items:void 0}function g(e){return(e??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function c(e){switch(e.kind){case"ref":return e.name;case"omit":return e.base;case"scalar":return e.scalar;case"array":return`array of ${c(e.items)}`;case"record":return`map of ${c(e.value)}`;case"enum":{let t=e.values.map(String),n=t.slice(0,6).join(", ");return t.length>6?`enum: ${n}, and ${t.length-6} more`:`enum: ${n}`}case"literal":return String(e.value);case"union":return e.members.map(c).join(" or ");case"intersection":return e.members.map(c).join(" and ");case"object":return"object";case"null":return"null";case"unknown":return"any"}}function N(e){return e.successResponses.some(t=>t.contentType.toLowerCase().includes("json"))?!1:e.successResponses.some(t=>y(t.contentType))}function w(e,t){e.line("| Parameter | In | Type | Required | Description |"),e.line("| --------- | -- | ---- | -------- | ----------- |");for(let n of t)e.line(`| \`${n.name}\` | ${n.in} | ${g(c(n.schema))} | ${n.required?"yes":"no"} | ${g(n.description)} |`);e.blank()}function B(e,t,n,i){e.line(`### \`${n.specName??n.name}\``),e.blank(),n.summary!==void 0&&(e.line(g(n.summary)),e.blank()),e.line(`\`${n.method.toUpperCase()} ${n.path}\``),e.blank();let a=i.sample(n);if(a!==void 0){e.line("```"+i.language.fence);for(let l of a.source.replace(/\n+$/,"").split(`
|
|
8
8
|
`))e.line(l);e.line("```"),e.blank()}let s=[...n.pathParams,...n.queryParams,...n.headerParams];s.length>0&&w(e,s),n.requestBody!==void 0&&e.line(`Body: \`${n.requestBody.contentType}\`${n.requestBody.required?", required":", optional"}, of type ${c(n.requestBody.schema)}.`);let r=n.successResponses[0];e.line(r===void 0?"Returns no content.":`Returns \`${r.contentType}\`, of type ${c(r.schema)}.`),(i.paginated!==void 0?i.paginated.has(n.name):m(n,i.pagination,t)!==void 0)&&e.line("This operation is paginated, so the SDK gives it page and item iterators."),n.successResponses.some(l=>l.contentType==="text/event-stream")&&e.line("This operation streams server-sent events, so the SDK iterates the events."),N(n)&&e.line("This operation returns binary content."),e.blank()}function E(e,t){let n=new p;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 s of e.securitySchemes){let r=s.kind==="bearer"?"`Authorization: Bearer <token>`":s.kind==="basic"?"`Authorization: Basic <base64>`":s.kind==="apiKeyHeader"?`the \`${s.headerName}\` header`:s.kind==="apiKeyQuery"?`the \`${s.paramName}\` query parameter`:`the \`${s.cookieName}\` cookie`;n.line(`| \`${s.key}\` | ${s.kind} | ${r} |`)}}n.blank();let i=e.services.flatMap(s=>s.operations),a=[...new Set(i.map(s=>s.tags[0]))];for(let s of a){n.line(s===void 0?"## Operations":`## ${s}`),n.blank();for(let r of i.filter(o=>o.tags[0]===s))B(n,e,r,t)}return n.toString().replace(/\n{3,}/g,`
|
|
9
9
|
|
|
10
10
|
`).trimEnd()+`
|
|
11
|
-
`}var ne=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isUntypedMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function A(e){return e}function q(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function j(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function L(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function ye(e){return e}async function be(e){return(await import("./
|
|
11
|
+
`}var ne=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isUntypedMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function A(e){return e}function q(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function j(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function L(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function ye(e){return e}async function be(e){return(await import("./EVWUDZ53.js")).generateClient(e)}export{m as a,b,R as c,x as d,S as e,y as f,P as g,T as h,C as i,E as j,ne as k,A as l,q as m,j as n,L as o,ye as p,be as q};
|
|
@@ -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"./SKBRULRS.js";import"./HAEWZII5.js";import"./4NSY3LMD.js";import"./D5FXUPT3.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{e as javaDocs,c as javaGenerator,d as javaSample,a as javaType,b as renderJavaModels};
|
|
@@ -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 f,b as i,c as l,d as m,e as u,f as k}from"./
|
|
7
|
+
import{a as f,b as i,c as l,d as m,e as u,f as k}from"./RQ2GHUTM.js";import{k as $}from"./ZQR3UXSE.js";import{join as p}from"node:path";function d(n,t){let e=f(n,"swr",t.reportFinding);if(e.length===0)return"";let s=e.some(i),o=e.some(r=>!i(r));return[...s?['import useSWR from "swr";']:[],...o?['import useSWRMutation from "swr/mutation";']:[],k(e,t.sdkModule,s),...e.flatMap(r=>i(r)?g(r):[S(r)])].join(`
|
|
8
8
|
|
|
9
9
|
`)}function y(n,t,e){return`export function use${$(n.name)}(${t}) {
|
|
10
10
|
return ${e};
|
|
@@ -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}from"./
|
|
7
|
+
import{a,b,c}from"./ADAQBYK6.js";import"./HAEWZII5.js";import"./ADRTGRZ3.js";import"./4NSY3LMD.js";import"./ZQR3UXSE.js";import"./D5FXUPT3.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{b as typescriptDocs,a as typescriptGenerator,c as typescriptSample};
|
|
@@ -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{f as L}from"./
|
|
7
|
+
import{f as L}from"./HAEWZII5.js";import{b as $,c as w,d as M,f as D,g as q,h as B,i as _,j as F,k as U}from"./ADRTGRZ3.js";import{h as T,j as E}from"./4NSY3LMD.js";import{d as k,f as C,h as P,i as j,m as A}from"./ZQR3UXSE.js";import{q as f,u as b,v as N,w as I,y as v}from"./D5FXUPT3.js";import{join as x}from"node:path";var d="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function S(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 A(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{f as k}from"./
|
|
7
|
+
import{f as k}from"./4NSY3LMD.js";import{a as x,e as P,f as v,i as H,j as C,k as p,l as M}from"./ZQR3UXSE.js";import{n as N,q as B}from"./D5FXUPT3.js";function y(e){let t=new Map(e.pathParams.map(r=>[r.name,r])),n=[];for(let r of e.path.matchAll(/\{([^{}]+)\}/g)){let s=t.get(r[1]);s!==void 0&&n.push(s)}return n}function I(e){let t=y(e),n=e.queryParams.length>0,r=!!e.requestBody,s=e.headerParams.length>0,o=e.cookieParams.length>0;return{hasQuery:n,hasBody:r,hasHeaders:s,hasCookies:o,hasInputs:t.length>0||n||r||s||o,varsRequired:t.length>0||e.queryParams.some(a=>a.required)||(e.requestBody?.required??!1)||e.headerParams.some(a=>a.required)||e.cookieParams.some(a=>a.required),variablesTypeName:`${p(e.name)}Variables`}}var E=" ";function $(e,t,n){let r=C(e,t);return r===void 0?[]:[`${n}/**`,...H(r).split(`
|
|
8
8
|
`).map(s=>`${n} * ${s}`.replace(/ +$/,"")),`${n} */`]}function O(e){return typeof e=="string"?JSON.stringify(e):String(e)}function F(e,t,n){switch(e){case"string":return t?.format==="binary"?"Blob":n==="Date"&&(t?.format==="date-time"||t?.format==="date")?"Date":"string";case"number":case"integer":return"number";case"boolean":return"boolean"}}function j(e){return e.kind==="union"||e.kind==="intersection"||e.kind==="enum"&&e.values.length>1}function c(e,t="string",n=""){switch(e.kind){case"scalar":return F(e.scalar,e.metadata,t);case"ref":return e.name;case"literal":return O(e.value);case"enum":return e.values.map(O).join(" | ");case"null":return"null";case"unknown":return"unknown";case"array":{let r=c(e.items,t,n);return j(e.items)?`(${r})[]`:`${r}[]`}case"record":return`Record<string, ${c(e.value,t,n)}>`;case"object":{if(e.properties.length===0)return"{}";let r=n+E;return`{
|
|
9
9
|
${e.properties.flatMap(o=>K(o,t,r)).join(`
|
|
10
10
|
`)}
|
|
@@ -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{e as g,h as p,k as $}from"./
|
|
7
|
+
import{e as g,h as p,k as $}from"./ZQR3UXSE.js";import{q as h}from"./D5FXUPT3.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 T}from"./
|
|
7
|
+
import{a as T}from"./HAEWZII5.js";import{b as N,c as j,d as Q,e as M,f as Y,g as Z,h as X,i as ee,j as ne}from"./4NSY3LMD.js";import{a as F,b as _,c as E,d as x,e as W,g as A,h as G,i as V,j as z,k as K,l as L,n as J,s as te,y as re}from"./D5FXUPT3.js";import{a as H}from"./WZXA5XPB.js";var U=E.go,P=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return x(t,{style:"camel",reserved:U})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let a=d(o),s=a;for(let l=2;r.has(s);l++)s=`${a}${l}`;return r.add(s),s})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
|
|
8
8
|
`?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of L(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=L(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let a of r.slice(1)){if(a===""){o||this.line("//"),o=!0;continue}this.line(`// ${a}`),o=!1}return this}layout(t){return de(me(t))}toString(){return this.layout(super.toString())}};function d(e){let t=x(e,{style:"pascal",reserved:U});return t.startsWith("_")?`N${t.slice(1)}`:t}function de(e){return`${e.replace(/\n{3,}/g,`
|
|
9
9
|
|
|
10
10
|
`).trimEnd()}
|
|
@@ -7,8 +7,8 @@ var __dirname = __pathDirname(__filename);
|
|
|
7
7
|
import{c as b,ka as T}from"./X22IMAJK.js";var A=class{indentUnit;lines=[];depth=0;constructor(n=" "){this.indentUnit=n}line(n=""){return this.lines.push(n===""?"":this.indentUnit.repeat(this.depth)+n),this}blank(){return this.line()}indent(n){return this.depth++,n(),this.depth--,this}block(n,t,r){return this.line(n),this.indent(t),r===void 0?this:this.line(r)}toString(){return this.lines.join(`
|
|
8
8
|
`)+`
|
|
9
9
|
`}};function v(e){return e.replace(/^\+(?=\d)/,"plus ").replace(/^-(?=\d)/,"minus ").replace(/([A-Z]{2,})s(?![a-z])/g,"$1S").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(n=>n!=="").map(n=>n.toLowerCase())}var E=e=>e.charAt(0).toUpperCase()+e.slice(1),w={camel:e=>{let[n,...t]=v(e);return(n??"")+t.map(E).join("")},pascal:e=>v(e).map(E).join(""),snake:e=>v(e).join("_"),screaming:e=>v(e).join("_").toUpperCase()},ae={typescript:new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","implements","interface","let","package","private","protected","public","static","yield","await"]),python:new Set(["false","none","true","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield","match","case","type"]),go:new Set(["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"]),php:new Set(["abstract","and","array","as","break","callable","case","catch","class","clone","const","continue","declare","default","die","do","echo","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","exit","extends","final","finally","fn","for","foreach","function","global","goto","if","implements","include","instanceof","insteadof","interface","isset","list","match","namespace","new","or","print","private","protected","public","readonly","require","return","static","switch","throw","trait","try","unset","use","var","while","xor","yield","true","false","null","int","float","bool","string","void","iterable","object","mixed","never","self","parent"]),java:new Set(["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instanceof","int","interface","long","native","new","package","private","protected","public","return","short","static","strictfp","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while","true","false","null","var","yield","record","sealed","permits","non-sealed"])};function F(e,n={}){let t=w[n.style??"camel"](e),r=t===""?"_":/^[0-9]/.test(t)?`_${t}`:t;return n.reserved?.has(r.toLowerCase())?`${r}_`:r}function P(e,n={}){let t=new Set(n.taken??[]),r=n.style==="snake"||n.style==="screaming"?"_":"";return e.map(a=>{let o=F(a,n),i=o;for(let s=2;t.has(i);s++)i=`${o}${r}${s}`;return t.add(i),i})}function m(e,n){let t=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(t.has(a))return;t.add(a);let o=n.schemas.find(i=>i.name===a);if(o===void 0)return;r=o.schema}return r}function K(e,n){let t=m(e,n);if(t===void 0)return;if(t.kind==="object")return{properties:t.properties,description:t.description};if(t.kind!=="intersection")return;let r=new Map;for(let a of t.members){let o=K(a,n);if(o===void 0)return;for(let i of o.properties)r.set(i.name,i)}return{properties:[...r.values()],description:t.description}}function ie(e,n){let t=m(e,n);if(t?.kind!=="union"||t.discriminator===void 0)return;let r=[];for(let{value:a,schemaName:o}of t.discriminator.mapping){let i=m({kind:"ref",name:o},n);if(i===void 0)return;r.push({value:a,schemaName:o,schema:i})}return{property:t.discriminator.propertyName,cases:r}}function B(e){return e.kind==="union"&&e.members.some(n=>n.kind==="null")}function de(e){if(e.kind!=="union"||!B(e))return e;let n=e.members.filter(t=>t.kind!=="null");return n.length===1?n[0]:{...e,members:n}}function le(e){if(e.kind!=="enum")return;let n=P(e.values.map(t=>typeof t=="string"?w.screaming(t):`VALUE_${w.screaming(String(t))}`),{style:"screaming"});return{values:e.values,scalar:e.scalar,memberNames:n}}function ce(e){if(!e)return[];let n=e.split(/\r\n|\n|\r/).map(t=>t.trim());for(;n.length>0&&n[0]==="";)n.shift();for(;n.length>0&&n[n.length-1]==="";)n.pop();return n}function I(e,n,t){if(e.kind==="object")return e.properties.find(r=>r.name===n)?.schema;if(e.kind==="record")return e.value;if(e.kind==="array"&&/^(0|[1-9]\d*)$/.test(n))return e.items;if(e.kind==="intersection"){let r;for(let a of e.members){let o=m(a,t);o!==void 0&&(r=I(o,n,t)??r)}return r}}function g(e,n,t){let r=e.kind==="omit"?{kind:"ref",name:e.base}:e,a=m(r,t);if(!(a===void 0||n!==""&&!n.startsWith("/"))){if(n==="")return a;for(let o of n.slice(1).split("/")){let i=o.replaceAll("~1","/").replaceAll("~0","~"),s=I(a,i,t);if(s===void 0||(a=m(s,t),a===void 0))return}return a}}function k(e,n,t=new Set){if(e.kind==="ref"){if(t.has(e.name))return"string";t.add(e.name);let r=n.schemas.find(a=>a.name===e.name);return r===void 0?"string":k(r.schema,n,t)}if(e.kind==="intersection"){let r=e.members.filter(o=>o.kind!=="unknown");if(r.length===1)return k(r[0],n,t);let a=[...new Set(r.map(o=>k(o,n,new Set(t))))];return a.length===1?a[0]:a.every(o=>o==="integer"||o==="number")?"number":"string"}if(e.kind==="union"){let r=e.members.filter(a=>a.kind!=="null");return r.length===1?k(r[0],n,t):"string"}if(e.kind==="scalar"||e.kind==="enum"){if(e.scalar==="integer")return"integer";if(e.scalar==="number")return"number";if(e.scalar==="boolean")return"boolean"}if(e.kind==="literal"){if(typeof e.value=="number")return Number.isInteger(e.value)?"integer":"number";if(typeof e.value=="boolean")return"boolean"}return"string"}import{AsyncLocalStorage as H}from"node:async_hooks";var z=new H,G={"operation-skipped":!0,"name-changed":!0,"option-ignored":!0,"generator-replaced":!0,"description-ignored":!0,"undocumented-header":!0,"browser-unsupported":!0,"command-shadowed":!0};function $(e){if(!W(e))throw new Error(`invalid finding ${JSON.stringify(e)}: a finding is { kind, message, operations }, with a known kind and the operation IDs as strings.`);T.warn(`generate-client: ${e.message}
|
|
10
|
-
`),z.getStore()?.(
|
|
11
|
-
- `));return t}function R(e,n,t,r,a){let o=`Pagination for operation "${e.name}" (${r})`,i=J(t);if(i!==void 0)return{error:`${o}: ${i}`};let s=t,d=l=>a?{error:`${o}: ${l}`}:{};if(e.sse!==void 0)return d("the operation is a Server-Sent Events stream");if(s.style!=="link"&&s.style!=="body-link"){let l=s.style==="cursor"?"cursorParam":"offsetParam",c=s.style==="cursor"?s.cursorParam:s.offsetParam,O=e.queryParams.find(u=>u.name===c);if(!O){let u=e.queryParams.map(M=>M.name).join(", ");return d(`query parameter "${c}" is not declared on the operation`+(u===""?"":` (declared: ${u})`))}let p=j(O.schema,n);if(!(p!==void 0&&(s.style==="cursor"?x(p,n):p.kind==="scalar"&&(p.scalar==="number"||p.scalar==="integer")))){let u=s.style==="cursor"?"a string":"a number";return d(`the "${l}" query parameter "${c}" must accept ${u} (got ${Y(p)})`)}}let h=e.successResponses.find(l=>l.contentType.toLowerCase().includes("json"));if(!h)return d("the operation has no JSON success response");if(s.style==="link"){let l=e.successResponseHeaders?.some(c=>c.name==="link")===!0;if(!l&&!a)return{};l||$({kind:"undocumented-header",message:`${o
|
|
10
|
+
`);let{kind:n,message:t,operations:r}=e;z.getStore()?.({kind:n,message:t,operations:r})}function W(e){if(!b(e))return!1;let{kind:n,message:t,operations:r}=e;if(typeof n!="string"||!Object.hasOwn(G,n)||typeof t!="string"||!Array.isArray(r))return!1;for(let a of r)if(typeof a!="string")return!1;return!0}function q(e){return e.flatMap(n=>n.operations)}function V(e,n,t){let r=e.specName??e.name;if(t?.exclude?.includes(r))return{};let a=t?.operations?.[r];if(a!==void 0)return R(e,n,a,`pagination.operations["${r}"]`,!0);if(e.paginationExtension!==void 0)return R(e,n,e.paginationExtension,"x-redoclyPagination",!0);if(t?.style!==void 0){let{exclude:o,operations:i,...s}=t;return R(e,n,s,"pagination convention",!1)}return{}}function we(e,n){let t=new Map,r=[];for(let a of q(e.services)){let o=V(a,e,n);o.error!==void 0?r.push(o.error):o.spec!==void 0&&t.set(a.name,{spec:o.spec,itemSchema:o.itemSchema})}if(r.length>0)throw new Error(["Invalid pagination configuration:",...r].join(`
|
|
11
|
+
- `));return t}function R(e,n,t,r,a){let o=`Pagination for operation "${e.name}" (${r})`,i=J(t);if(i!==void 0)return{error:`${o}: ${i}`};let s=t,d=l=>a?{error:`${o}: ${l}`}:{};if(e.sse!==void 0)return d("the operation is a Server-Sent Events stream");if(s.style!=="link"&&s.style!=="body-link"){let l=s.style==="cursor"?"cursorParam":"offsetParam",c=s.style==="cursor"?s.cursorParam:s.offsetParam,O=e.queryParams.find(u=>u.name===c);if(!O){let u=e.queryParams.map(M=>M.name).join(", ");return d(`query parameter "${c}" is not declared on the operation`+(u===""?"":` (declared: ${u})`))}let p=j(O.schema,n);if(!(p!==void 0&&(s.style==="cursor"?x(p,n):p.kind==="scalar"&&(p.scalar==="number"||p.scalar==="integer")))){let u=s.style==="cursor"?"a string":"a number";return d(`the "${l}" query parameter "${c}" must accept ${u} (got ${Y(p)})`)}}let h=e.successResponses.find(l=>l.contentType.toLowerCase().includes("json"));if(!h)return d("the operation has no JSON success response");if(s.style==="link"){let l=e.successResponseHeaders?.some(c=>c.name==="link")===!0;if(!l&&!a)return{};l||$({kind:"undocumented-header",message:`${o} follows the Link header, but the success response does not document one.`,operations:[e.specName??e.name]})}let f=g(h.schema,s.items,n);if(f===void 0)return d(`the "items" pointer "${s.items}" does not resolve in the success response schema`);if(f.kind!=="array")return d(`the "items" pointer "${s.items}" must point at an array (got ${f.kind})`);if(s.style==="body-link"){let l=g(h.schema,s.nextLink,n);if(l===void 0)return d(`the "nextLink" pointer "${s.nextLink}" does not resolve in the success response schema`);if(!x(l,n))return d(`the "nextLink" pointer "${s.nextLink}" must point at a string (got ${l.kind})`)}if(s.style==="cursor"){let l=g(h.schema,s.nextCursor,n);if(l===void 0)return d(`the "nextCursor" pointer "${s.nextCursor}" does not resolve in the success response schema`);if(!x(l,n))return d(`the "nextCursor" pointer "${s.nextCursor}" must point at a string (got ${l.kind})`);if(s.hasMore!==void 0){let c=g(h.schema,s.hasMore,n);if(c===void 0)return d(`the "hasMore" pointer "${s.hasMore}" does not resolve in the success response schema`);if(c.kind!=="scalar"||c.scalar!=="boolean")return d(`the "hasMore" pointer "${s.hasMore}" must point at a boolean (got ${c.kind})`)}}let y=s.limitParam!==void 0?{limitParam:s.limitParam}:{};return{spec:s.style==="cursor"?{style:"cursor",param:s.cursorParam,...y,nextCursor:s.nextCursor,...s.hasMore!==void 0?{hasMore:s.hasMore}:{},items:s.items}:s.style==="link"?{style:"link",...y,items:s.items}:s.style==="body-link"?{style:"body-link",...y,nextLink:s.nextLink,items:s.items}:{style:s.style,param:s.offsetParam,...y,items:s.items},itemSchema:f.items}}function J(e){if(!b(e))return"the rule must be an object";let{style:n,cursorParam:t,nextCursor:r,hasMore:a,offsetParam:o,nextLink:i,limitParam:s,items:d}=e;if(n!=="cursor"&&n!=="offset"&&n!=="page"&&n!=="link"&&n!=="body-link")return`"style" must be one of "cursor" | "offset" | "page" | "link" | "body-link" (got ${JSON.stringify(n)})`;if(typeof d!="string"||d!==""&&!d.startsWith("/"))return'"items" must be a JSON pointer starting with "/" (or "" when the response body is the item array itself)';if(n==="cursor"){if(typeof t!="string"||t==="")return'cursor style requires a "cursorParam" query parameter name';if(typeof r!="string"||!r.startsWith("/"))return'cursor style requires a "nextCursor" JSON pointer starting with "/"';if(a!==void 0&&(typeof a!="string"||!a.startsWith("/")))return'"hasMore" must be a JSON pointer starting with "/"'}else if(n==="offset"||n==="page"){if(typeof o!="string"||o==="")return`${n} style requires an "offsetParam" query parameter name`}else if(n==="body-link"&&(typeof i!="string"||!i.startsWith("/")))return'body-link style requires a "nextLink" JSON pointer starting with "/"';if(s!==void 0&&typeof s!="string")return'"limitParam" must be a query parameter name'}function Y(e){return e===void 0?"an unresolvable ref":e.kind==="scalar"||e.kind==="enum"?e.scalar:e.kind}function j(e,n){let t=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(t.has(a))return;t.add(a);let o=n.schemas.find(i=>i.name===a);if(o===void 0)return;r=o.schema}return r}function x(e,n){return e.kind==="scalar"||e.kind==="enum"?e.scalar==="string":e.kind==="literal"?typeof e.value=="string":e.kind==="union"?e.members.every(t=>{let r=j(t,n);return r!==void 0&&(r.kind==="null"||r.kind!=="union"&&x(r,n))}):!1}var Re=`// Usage telemetry for a generated Go SDK, written beside the client by
|
|
12
12
|
// \`client.telemetry: on\`. It counts calls per operation through the runtime's
|
|
13
13
|
// OnSettled hook and sends one event per operation and window. An event holds
|
|
14
14
|
// only the operation id, the counts, the window, and the SDK identity.
|
|
@@ -392,7 +392,7 @@ func usageTelemetryRandomHex(byteCount int) string {
|
|
|
392
392
|
rand.Read(buffer)
|
|
393
393
|
return hex.EncodeToString(buffer)
|
|
394
394
|
}
|
|
395
|
-
`,N=["UsageTelemetryOptions","UsageTelemetryEvent","UsageTelemetry","NewUsageTelemetry"];var
|
|
395
|
+
`,N=["UsageTelemetryOptions","UsageTelemetryEvent","UsageTelemetry","NewUsageTelemetry"];var Ce=`<?php
|
|
396
396
|
|
|
397
397
|
// Usage telemetry for a generated PHP SDK, written beside the client by
|
|
398
398
|
// \`client.telemetry: on\`. It counts calls per operation through the runtime's
|
|
@@ -477,6 +477,8 @@ final class UsageTelemetry
|
|
|
477
477
|
$now = microtime(true);
|
|
478
478
|
if ($this->counts !== [] && $now >= $this->nextSendAt) {
|
|
479
479
|
$this->flushWindow(true);
|
|
480
|
+
// The send can take up to SEND_TIMEOUT_MS, so the next window starts after it.
|
|
481
|
+
$now = microtime(true);
|
|
480
482
|
}
|
|
481
483
|
if ($this->counts === []) {
|
|
482
484
|
$this->windowStart = $now;
|
|
@@ -685,7 +687,7 @@ final class UsageTelemetry
|
|
|
685
687
|
return ['key' => $key, 'value' => ['doubleValue' => $value]];
|
|
686
688
|
}
|
|
687
689
|
}
|
|
688
|
-
`,
|
|
690
|
+
`,D=["UsageTelemetry"];var Te={"types.ts":`/**
|
|
689
691
|
* The public type surface of the client runtime \u2014 \`@redocly/client-generator\`'s
|
|
690
692
|
* app-facing runtime module. Pure types, no runtime code (excluded from coverage).
|
|
691
693
|
* The generator emits \`OPERATIONS\` literals typed
|
|
@@ -6361,4 +6363,4 @@ async function runSingle(
|
|
|
6361
6363
|
}
|
|
6362
6364
|
return fail(1, detail);
|
|
6363
6365
|
}
|
|
6364
|
-
}`},
|
|
6366
|
+
}`},L=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SettledCall","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","anySignal","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","timeoutSignal","toFormData","toHeaderRecord"];var Q=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],Z=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],X=["AbortController","AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","Symbol","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],S;function qe(){return S===void 0&&(S=new Set([...Q,...Z,...N,...D,...X,...L])),S}var U={name:"@redocly/client-generator",version:"0.0.0-snapshot.1793639154",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/java":{types:"./lib/printers/java.d.ts",import:"./lib/printers/java.js",default:"./lib/printers/java.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"0.0.0-snapshot.1793639154"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var Le=U.version;function _(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function C(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function Ue(e,n){let t=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=_(n.trim().slice(t.length)),a=_(e);if(!(r===void 0||a===void 0))return C(a,r)<0?!1:t===">="?!0:t===""?C(a,r)===0:t==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:C(a,r)===0}export{A as a,w as b,ae as c,F as d,P as e,m as f,K as g,ie as h,B as i,de as j,le as k,ce as l,g as m,k as n,z as o,$ as p,q,we as r,Re as s,Ce as t,Te as u,Ae as v,Q as w,qe as x,Le as y,Ue as z};
|
|
@@ -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,c as C,k as L}from"./JEFVMI6X.js";import{o as ne,p as b,q as D,r as re,x as oe,y as U,z as se}from"./RRIV3EHA.js";import{a as g}from"./WZXA5XPB.js";import{Ca as te,R as Q,X as Y,c as q,ma as Z,q as v,r as J,ta as ee,u as V,va as R}from"./X22IMAJK.js";import{mkdir as ut,readFile as pt,writeFile as dt}from"node:fs/promises";import{dirname as Se,parse as ft,resolve as E,sep as lt}from"node:path";function I(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./BYXGTGTC.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var T={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"},G={typescript:{load:()=>import("./6LWQ5TYN.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./7ZVC32EU.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./PC5SY73H.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":I("react"),"tanstack-query-vue":I("vue"),"tanstack-query-svelte":I("svelte"),"tanstack-query-solid":I("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./7VSOXAWC.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./OFCBZIPV.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./7EQLB7LP.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:T,load:()=>import("./X6EMKM3S.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:T,load:()=>import("./E6L6DXPL.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:T,load:()=>import("./TUHQFT5Q.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))},java:{errorModes:["throw"],notApplicable:T,load:()=>import("./EVCBWZMB.js").then(e=>({run:e.javaGenerator,sample:e.javaSample,docs:e.javaDocs}))}};function ie(e,t,n,r){let o=new Set(e);t.goPackage!==void 0&&!o.has("go")&&b({kind:"option-ignored",message:"goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).",operations:[]});let s=!1;for(let c of["typescript","go","python","php"])if(o.has(c)){s=!0;break}t.telemetry==="on"&&!s&&b({kind:"option-ignored",message:"telemetry is ignored \u2014 no selected generator writes a telemetry module (add --generator typescript, go, python, or php).",operations:[]});let i=t.errorMode??"throw",a=t.dateType??"string";for(let c of e){let u=n.get(c);if(!u)throw new g(`Unknown generator: ${c}`);for(let p of u.requires??[])if(!o.has(p)){let l=[...new Set([p,...e])].map(f=>`--generator ${f}`).join(" ");throw new g(`The "${c}" generator requires the "${p}" generator. Add it, e.g. ${l}.`)}if(u.errorModes&&!u.errorModes.includes(i))throw new g(`The "${c}" generator does not support --error-mode "${i}" (supported: ${u.errorModes.join(", ")}).`);if(u.dateTypes&&!u.dateTypes.includes(a))throw new g(`The "${c}" generator requires --date-type ${u.dateTypes.join(" or ")} (got "${a}") so the runtime values match the generated types.`);let d={...t,outputMode:r};for(let[p,l]of Object.entries(u.notApplicable??{}))d[p]!==void 0&&b({kind:"option-ignored",message:`the "${c}" generator ignores ${p} \u2014 ${l}.`,operations:[]})}}function ae(e,t,n){let r=new Map;for(let o of e){let s=t.get(o)?.options,i=n?.[o];if(s===void 0){i!==void 0&&b({kind:"option-ignored",message:`the "${o}" generator declares no options, so client.options.${o} is ignored.`,operations:[]}),r.set(o,{});continue}r.set(o,Oe(o,s,i))}return r}function Oe(e,t,n){if(n!==void 0&&!q(n))throw new g(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},o=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!o.includes(i))throw new g(`The "${e}" generator got an unknown option "${i}". Declared options: ${o.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new g(`The "${e}" generator requires the "${i}" option.`);let s={...r};for(let[i,a]of Object.entries(t.properties)){if(s[i]===void 0){a.default!==void 0&&(s[i]=a.default);continue}let c=xe(a,s[i]);if(c!==void 0)throw new g(`The "${e}" generator's "${i}" ${c}.`)}return s}function xe(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 je,resolve as Pe}from"node:path";import{pathToFileURL as Ae}from"node:url";var qe=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,s,i){return r?t?".jsx":".js":o&&(!s||!i)?n:o+s+"."+i.toLowerCase()+"js"}):e};async function ue(e,t={}){let n=new Map;for(let a of t.customGenerators??[])pe(n,a);let r=[];for(let a of e)r.push(await ce(a,n,t.configDir));let o=[],s=new Set,i=async a=>{if(!(o.includes(a)||s.has(a))){s.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in G)&&await i(await ce(c,n,t.configDir));s.delete(a),o.push(a)}};for(let a of r)await i(a);return{selected:o,registry:n}}async function ce(e,t,n){if(t.has(e))return e;let r=G[e];if(r!==void 0){let{load:s,...i}=r;return t.set(e,{...i,...await s()}),e}if(e==="sdk")throw new g('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let o=await Ne(e,n??process.cwd());return pe(t,o),o.name}function pe(e,t){if(!q(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new g("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 g(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=se(U,t.requiresGenerator);if(n===void 0)throw new g(`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 g(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${U}. 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 G&&b({kind:"generator-replaced",message:`custom generator "${t.name}" takes over the built-in generator of the same name.`,operations:[]}),e.set(t.name,{run:t.run,sample:t.sample,docs:t.docs,notApplicable:t.notApplicable,options:t.options,requires:t.requires,errorModes:t.errorModes,dateTypes:t.dateTypes})}async function Ne(e,t){if(V(e))throw new g(`Remote generator modules are not supported \u2014 use a local path or a package name. Got: ${e}`);let n=e.startsWith(".")||je(e),r=n?Ae(Pe(t,e)).href:e;if(n&&e.endsWith(".ts")&&!process.features.typescript)throw new g(`Generator "${e}" is TypeScript, which this Node cannot run directly \u2014 use Node 22.18, 23.6, or newer.`);let o;try{o=await import(qe(r))}catch(i){throw new g(`Could not load generator "${e}": ${i.message}`)}let s=o.default??o.generator;if(s===void 0)throw new g(`Generator module "${e}" must export a generator (a default export or a \`generator\` export built with \`defineGenerator\`).`);return s}function le(e){let t=new Set,n=new Set,r=new Map;for(let f of e.securitySchemes){let m=B(f.key,t,n);m!==f.key&&(r.set(f.key,m),F("security scheme",f.key,m,fe(f.key,t)),f.key=m)}let o=new Set(oe()),s=new Set(o),i=new Set,a=new Map;for(let f of e.schemas){let m=B(f.name,s,i);m!==f.name&&(a.set(f.name,m),F("schema",f.name,m,fe(f.name,o)),f.name=m)}let c=f=>a.get(f)??de(f),u=f=>r.get(f)??de(f);for(let f of e.schemas)$(f.schema,c);let d=new Set(s),p=new Set,l=new Set;for(let f of e.services)for(let m of f.operations){let y=l.has(m.name);l.add(m.name);let h=m.name,S=B(m.name,d,p);if(S!==m.name){let P=y?{kind:"duplicate-operation-id"}:o.has(h)?{kind:"reserved"}:s.has(h)?{kind:"schema-collision"}:{kind:"unusable"};F("operation",h,S,P,[h]),m.specName=m.name,m.name=S}Me(m,c),m.security=m.security.map(P=>P.map(u))}}function B(e,t,n){let r=C(e),o=r,s=2;for(;t.has(o)||n.has(L(o));)o=`${r}_${s++}`;return t.add(o),n.add(L(o)),o}function me(e){for(let t of e.schemas)if(!M(t.name))throw z("schema",t.name);for(let t of e.securitySchemes)if(!M(t.key))throw z("security scheme",t.key);for(let t of e.services)for(let n of t.operations)if(!M(n.name))throw z("operation",n.name)}function z(e,t){return new Error(`Internal error: ${e} name ${JSON.stringify(t)} is not a safe identifier after sanitization.`)}function de(e){return C(e)}function F(e,t,n,r,o=[]){let s=JSON.stringify(t),i=JSON.stringify(n),a=r.kind==="duplicate-operation-id"?`two operations share the operationId ${s}; the second is emitted as ${i} \u2014 give each operation a unique operationId to control its method name`:r.kind==="schema-collision"?`${e} ${s} collides with the schema of the same name, so it is emitted as ${i} \u2014 rename the operation or the schema in the description to control its name`:r.kind==="reserved"?`${e} ${s} is a name a generated client already declares, so it is emitted as ${i} \u2014 the reserved set spans every target language, so one schema keeps one name across the SDKs you generate`:`${e} ${s} is not a usable identifier, so it is emitted as ${i}`;b({kind:"name-changed",message:`${a}.`,operations:o})}function fe(e,t){return t.has(e)?{kind:"reserved"}:{kind:"unusable"}}function $(e,t){switch(e.kind){case"ref":e.name=t(e.name);break;case"omit":e.base=t(e.base);break;case"array":$(e.items,t);break;case"record":$(e.value,t);break;case"object":for(let n of e.properties)$(n.schema,t);break;case"union":for(let n of e.members)$(n,t);if(e.discriminator)for(let n of e.discriminator.mapping)n.schemaName=t(n.schemaName);break;case"intersection":for(let n of e.members)$(n,t);break}}function Me(e,t){for(let n of e.pathParams)$(n.schema,t);for(let n of e.queryParams)$(n.schema,t);for(let n of e.headerParams)$(n.schema,t);for(let n of e.cookieParams)$(n.schema,t);e.requestBody&&$(e.requestBody.schema,t);for(let n of[...e.successResponses,...e.errorResponses])$(n.schema,t),n.itemSchema&&$(n.itemSchema,t)}var Ie=["get","post","put","delete","patch","head","options"];function ye(e,t){if(!t.startsWith("#/"))throw new g(`External $ref not supported: ${t}`);let n=t.slice(2).split("/").map(o=>o.replace(/~1/g,"/").replace(/~0/g,"~")),r=e;for(let o of n){if(!q(r)&&!Array.isArray(r))throw new g(`Cannot resolve $ref: ${t}`);r=r[o]}if(r===void 0)throw new g(`Cannot resolve $ref: ${t}`);return r}function O(e,t){return v(t)?ye(e,t.$ref):t}function N(e){let t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function Te(e){let t=e,n={};return typeof t.minimum=="number"&&(n.minimum=t.minimum),typeof t.maximum=="number"&&(n.maximum=t.maximum),typeof t.exclusiveMinimum=="number"?n.exclusiveMinimum=t.exclusiveMinimum:t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n.exclusiveMinimum=t.minimum,delete n.minimum),typeof t.exclusiveMaximum=="number"?n.exclusiveMaximum=t.exclusiveMaximum:t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n.exclusiveMaximum=t.maximum,delete n.maximum),typeof t.multipleOf=="number"&&(n.multipleOf=t.multipleOf),typeof t.minLength=="number"&&(n.minLength=t.minLength),typeof t.maxLength=="number"&&(n.maxLength=t.maxLength),typeof t.pattern=="string"&&(n.pattern=t.pattern),typeof t.minItems=="number"&&(n.minItems=t.minItems),typeof t.maxItems=="number"&&(n.maxItems=t.maxItems),t.uniqueItems===!0&&(n.uniqueItems=!0),typeof t.format=="string"&&(n.format=t.format),t.deprecated===!0&&(n.deprecated=!0),t.example!==void 0?n.example=t.example:Array.isArray(t.examples)&&t.examples.length>0&&(n.example=t.examples[0]),t.default!==void 0&&(n.default=t.default),Object.keys(n).length>0?n:void 0}function Ge(e,t){let n=e.discriminator;if(!n||typeof n.propertyName!="string")return;let r=[];if(n.mapping)for(let[o,s]of Object.entries(n.mapping))r.push({value:o,schemaName:N(s)});else for(let o of t)if(v(o)){let s=N(o.$ref);r.push({value:s,schemaName:s})}if(r.length!==0)return{propertyName:n.propertyName,mapping:r}}function k(e,t){return t?{...e,metadata:t}:e}function K(e,t){return e?t?{...e,...t}:e:t}function Ee(e){return e?e.url.replace(/\{([^{}]+)\}/g,(t,n)=>e.variables?.[n]?.default??t):""}function ge(e){let t=e.info?.title??"Api",n=e.info?.version??"0.0.0",r=e.info?.description,o=Ee(e.servers?.[0]),s=(e.servers??[]).map(d=>({url:d.url,description:d.description,variables:Object.entries(d.variables??{}).map(([p,l])=>({name:p,default:l.default,description:l.description}))})),i=Be(e),a=Ce(e),c=ze(e,a),u={title:t,version:n,description:r,serverUrl:o,servers:s,services:c,schemas:i,securitySchemes:a};return le(u),Re(c,i),me(u),u}function Re(e,t){let n=new Map(t.map(r=>[r.name,r.schema]));for(let r of e)for(let o of r.operations){o.requestBody&&(o.requestBody.schema=A(o.requestBody.schema,"readOnly",n));for(let s of o.successResponses)s.schema=A(s.schema,"writeOnly",n)}}function De(e){let t=e.filter(n=>n.kind!=="unknown");return t.length>0?t:[{kind:"unknown"}]}function A(e,t,n){if(e.kind==="ref"){let r=Ue(e,t,n,new Set);return r.length>0?{kind:"omit",base:e.name,keys:r}:e}if(e.kind==="array")return{...e,items:A(e.items,t,n)};if(e.kind==="record")return{...e,value:A(e.value,t,n)};if(e.kind==="object"){let r=e.properties.filter(o=>!o[t]).map(o=>({...o,schema:A(o.schema,t,n)}));return{...e,properties:r}}return e}function Ue(e,t,n,r){let o=[],s=i=>{if(i.kind==="ref"){if(r.has(i.name))return;r.add(i.name);let a=n.get(i.name);a&&s(a)}else if(i.kind==="object")for(let a of i.properties)a[t]&&!o.includes(a.name)&&o.push(a.name);else if(i.kind==="intersection")for(let a of i.members)s(a)};return s(e),o}function Ce(e){let t=e.components?.securitySchemes;if(!t)return[];let n=[];for(let[r,o]of Object.entries(t)){let s=O(e,o),i=s.type;i==="oauth2"||i==="openIdConnect"?n.push({kind:"bearer",key:r}):i==="http"&&(s.scheme??"").toLowerCase()==="bearer"?n.push({kind:"bearer",key:r}):i==="http"&&(s.scheme??"").toLowerCase()==="basic"?n.push({kind:"basic",key:r}):i==="apiKey"&&s.in==="header"&&typeof s.name=="string"?n.push({kind:"apiKeyHeader",key:r,headerName:s.name}):i==="apiKey"&&s.in==="query"&&typeof s.name=="string"?n.push({kind:"apiKeyQuery",key:r,paramName:s.name}):i==="apiKey"&&s.in==="cookie"&&typeof s.name=="string"&&(b({kind:"browser-unsupported",message:`security scheme "${r}" sends its credential in the Cookie header, which browsers ignore \u2014 cookie auth works only in server-side clients.`,operations:[]}),n.push({kind:"apiKeyCookie",key:r,cookieName:s.name}))}return n}function Le(e,t,n){let r=e.security??t.security;if(!r)return[];let o=[];for(let s of r){let i=Object.keys(s);i.length!==0&&i.every(a=>n.has(a))&&o.push([...new Set(i)])}return o}function Be(e){let t=e.components?.schemas;return t?Object.entries(t).map(([n,r])=>{if(v(r)){let s=ye(e,r.$ref);return{name:n,schema:j(s,`components.schemas.${n}`,e),description:s.description}}let o=j(r,`components.schemas.${n}`,e);return{name:n,schema:o,description:r.description}}):[]}function ze(e,t){let n=new Set(t.map(i=>i.key)),r=[],o=new Set;for(let[i,a]of Object.entries(e.paths??{})){if(!a)continue;let c=O(e,a),u=(c.parameters??[]).map(d=>we(O(e,d),`paths.${i}.parameters`,e));for(let d of Ie){let p=c[d];p&&(r.push({method:d,path:i,operation:p,pathLevelParams:u}),p.operationId&&o.add(p.operationId))}}return[{name:"Default",operations:r.map(i=>{let a=i.operation.operationId??_e(Fe(i.method,i.path),o);return Xe(i.method,i.path,i.operation,a,i.pathLevelParams,e,n)})}]}function Fe(e,t){let n=t.split("/").filter(Boolean).map(r=>Ke(r.replace(/[{}]/g,"")));return`${e}${n.join("")}`}function Ke(e){return e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function _e(e,t){let n=e,r=2;for(;t.has(n);)n=`${e}${r++}`;return t.add(n),n}function Xe(e,t,n,r,o,s,i){let a=(n.parameters??[]).map(w=>we(O(s,w),`paths.${t}.${e}.parameters`,s)),c=new Set,u=[];for(let w of a)c.add(`${w.in}:${w.name}`),u.push(w);for(let w of o)c.has(`${w.in}:${w.name}`)||u.push(w);let d=u.filter(w=>w.in==="path"),p=u.filter(w=>w.in==="query"),l=u.filter(w=>w.in==="header"),f=u.filter(w=>w.in==="cookie"),m=n.requestBody?We(O(s,n.requestBody),`${e} ${t}`,s):void 0,{successResponses:y,successResponseHeaders:h}=Je(n,t,s),S=Qe(n,t,s),P=Le(n,s,i),H=n["x-redoclyPagination"],W=He(y);return{name:r,method:e,path:t,summary:n.summary,description:n.description,pathParams:d,queryParams:p,headerParams:l,cookieParams:f,requestBody:m,successResponses:y,...h===void 0?{}:{successResponseHeaders:h},errorResponses:S,security:P,tags:Array.isArray(n.tags)?n.tags.filter(w=>typeof w=="string"):[],...H!==void 0?{paginationExtension:H}:{},...W===void 0?{}:{sse:W}}}function He(e){let t=e.find(o=>o.contentType.split(";")[0].trim().toLowerCase()==="text/event-stream");if(t===void 0)return;let n=t.itemSchema&&t.itemSchema.kind!=="unknown"?t.itemSchema:t.schema.kind!=="unknown"?t.schema:void 0;if(n===void 0)return{dataKind:"text"};let r=n.kind==="object"||n.kind==="ref"||n.kind==="array"||n.kind==="record"||n.kind==="union"||n.kind==="intersection";return{eventSchema:n,dataKind:r?"json":"text"}}function we(e,t,n){if(!e.in)throw new g(`Parameter ${e.name} at ${t} is missing "in"`);if(!["path","query","header","cookie"].includes(e.in))throw new g(`Unsupported parameter location "${e.in}" for ${e.name} at ${t}`);let r=x(e.schema,`${t}.${e.name}`,n);e.deprecated===!0&&(r={...r,metadata:K(r.metadata,{deprecated:!0})});let o={name:e.name,in:e.in,schema:r,required:!!e.required,description:e.description};if(o.in==="query"){let s=e;(s.style==="form"||s.style==="spaceDelimited"||s.style==="pipeDelimited"||s.style==="deepObject")&&(o.style=s.style),typeof s.explode=="boolean"&&(o.explode=s.explode),typeof s.allowReserved=="boolean"&&(o.allowReserved=s.allowReserved)}return o}function We(e,t,n){let r=e.content??{},o=r["application/json"]??r["application/merge-patch+json"]??r["application/x-www-form-urlencoded"]??r["multipart/form-data"]??Object.values(r)[0];if(!o)return;let s=Object.keys(r).find(a=>r[a]===o),i=x(o.schema,`${t}.requestBody`,n);return{contentType:s,schema:i,required:!!e.required,description:e.description}}function Je(e,t,n){let r=e.responses??{},o=Object.keys(r).filter(l=>/^2\d\d$/.test(l));o.length===0&&(r["2XX"]?o.push("2XX"):r.default&&o.push("default"));let s=o[0];if(!s)return{successResponses:[]};let i=r[s];if(!i)return{successResponses:[]};let a=O(n,i),c=Ve(a.headers,`paths.${t}.response.${s}`,n),u=a.content;if(!u)return{successResponses:[],...c===void 0?{}:{successResponseHeaders:c}};let d=s==="default"||s==="2XX"?s:Number(s),p=[];for(let[l,f]of Object.entries(u)){let m=x(f.schema,`paths.${t}.response.${s}.${l}`,n),y=f.itemSchema,h=y!==void 0?x(y,`paths.${t}.response.${s}.${l}.itemSchema`,n):void 0;p.push({contentType:l,schema:m,status:d,...h===void 0?{}:{itemSchema:h}})}return{successResponses:p,...c===void 0?{}:{successResponseHeaders:c}}}function Ve(e,t,n){if(!e)return;let r=[];for(let[o,s]of Object.entries(e)){let i=O(n,s),a={name:o.toLowerCase(),schema:x(i.schema===void 0?void 0:O(n,i.schema),`${t}.headers.${o}`,n)};i.required===!0&&(a.required=!0),r.push(a)}return r.length>0?r:void 0}function Qe(e,t,n){let r=e.responses??{},o=Object.keys(r).filter(a=>/^([45]\d\d|4XX|5XX)$/.test(a));Object.keys(r).some(a=>/^(2\d\d|2XX)$/.test(a))&&r.default&&o.push("default");let i=[];for(let a of o){let c=r[a];if(!c)continue;let d=O(n,c).content;if(!d)continue;let p=a==="default"||a==="4XX"||a==="5XX"?a:Number(a);for(let[l,f]of Object.entries(d)){let m=x(f.schema,`paths.${t}.response.${a}.${l}`,n);i.push({contentType:l,schema:m,status:p})}}return i}function x(e,t,n){return e===void 0||typeof e=="boolean"?{kind:"unknown"}:v(e)?{kind:"ref",name:N(e.$ref)}:j(e,t,n)}function j(e,t,n){let r=Te(e),o=e.oneOf??e.anyOf;if(o){let a=o.map((d,p)=>v(d)?{kind:"ref",name:N(d.$ref)}:j(d,`${t}.[${p}]`,n)),c=De(a);if(c.length===1&&c.length<a.length){let d=c[0];return{...d,description:d.description??e.description,metadata:K(r,d.metadata)}}let u=Ge(e,o);return k({kind:"union",members:c,discriminator:u,description:e.description},r)}if(e.allOf){let a=e.allOf.map((u,d)=>v(u)?{kind:"ref",name:N(u.$ref)}:j(u,`${t}.allOf[${d}]`,n)),c=he(e,t,n);if(c.length>0&&a.unshift({kind:"object",properties:c}),a.length===1){let u=a[0];return{...u,description:u.description??e.description,metadata:K(r,u.metadata)}}return k({kind:"intersection",members:a,description:e.description},r)}let s=e.type;if(Array.isArray(s)){let a=s.filter(d=>d!=="null"),c=s.includes("null"),u=a.map(d=>{let p={...e,type:d};if(Array.isArray(p.enum)){let l=p.enum.filter(f=>f!==null);p.enum=l.length>0?l:void 0}return j(p,t,n)});return c&&u.push({kind:"null"}),u.length===1?u[0]:k({kind:"union",members:u,description:e.description},r)}if(e.nullable)return{kind:"union",members:[j({...e,nullable:void 0},t,n),{kind:"null"}],description:e.description};if(e.const!==void 0){let a=e.const;if(typeof a!="string"&&typeof a!="number"&&typeof a!="boolean")throw new g(`Unsupported const value at ${t}: ${JSON.stringify(a)}`);return k({kind:"literal",value:a,description:e.description},r)}if(e.enum){let a=e.enum,c=a.filter(l=>l!==null),u=c.length!==a.length;if(c.length===0)return k({kind:"null",description:e.description},r);let d=Ye(c,t),p=d==="boolean"?{kind:"scalar",scalar:"boolean",description:e.description}:{kind:"enum",values:c,scalar:d,description:e.description};return k(u?{kind:"union",members:[p,{kind:"null"}],description:e.description}:p,r)}let i=s;if(i==="null")return k({kind:"null",description:e.description},r);if(i==="array"){let a=e.items,c=x(a,`${t}.items`,n);return k({kind:"array",items:c,description:e.description},r)}if(i==="object"||e.properties||e.additionalProperties){let a=he(e,t,n),c=e.additionalProperties;if(a.length===0&&c!==!1){let u=x(c,`${t}.additionalProperties`,n);return k({kind:"record",value:u,description:e.description},r)}return k({kind:"object",properties:a,description:e.description},r)}return k(i==="string"||i==="number"||i==="integer"||i==="boolean"?{kind:"scalar",scalar:i,description:e.description}:{kind:"unknown",description:e.description},r)}function Ye(e,t){let n=!1,r=!1,o=!1;for(let s of e)if(typeof s=="string")n=!0;else if(typeof s=="number")r=!0;else if(typeof s=="boolean")o=!0;else throw new g(`Unsupported enum value type at ${t}: ${JSON.stringify(s)}`);return n&&!r&&!o?"string":r&&!n&&!o?"number":o&&!n&&!r?"boolean":"string"}function Ze(e){return!(e.openapi??"").startsWith("3.0")}function he(e,t,n){let r=e.properties??{},o=new Set(e.required??[]),s=Ze(n);return Object.entries(r).map(([i,a])=>{let c=a,u=v(a)&&!s;return u&&c.readOnly===!0&&b({kind:"description-ignored",message:`"${i}" declares readOnly beside a $ref, which OpenAPI ${n.openapi} ignores \u2014 the property stays in request bodies. Inline the schema, wrap the $ref in allOf, or move the description to OpenAPI 3.1.`,operations:[]}),u&&c.writeOnly===!0&&b({kind:"description-ignored",message:`"${i}" declares writeOnly beside a $ref, which OpenAPI ${n.openapi} ignores \u2014 the property stays in responses. Inline the schema, wrap the $ref in allOf, or move the description to OpenAPI 3.1.`,operations:[]}),{name:i,schema:x(a,`${t}.${i}`,n),required:o.has(i),description:a.description,...c.readOnly===!0&&!u?{readOnly:!0}:{},...c.writeOnly===!0&&!u?{writeOnly:!0}:{}}})}function be(e){let t=_(e),n={...t};delete n.swagger,delete n.host,delete n.basePath,delete n.schemes,delete n.definitions,delete n.securityDefinitions,delete n.consumes,delete n.produces,delete n.parameters,delete n.responses,n.openapi="3.0.3";let r=et(t);return r&&(n.servers=r),n.components=tt(t),n.paths=st(t.paths??{},t.consumes??void 0,t.produces??void 0),n}function et(e){let t=e.host,n=e.basePath??"",r=(e.schemes??["https"])[0]??"https";if(t)return[{url:`${r}://${t}${n}`}]}function tt(e){let t={};e.definitions&&(t.schemas=e.definitions),e.parameters&&(t.parameters=Object.fromEntries(Object.entries(e.parameters).map(([r,o])=>[r,X(o)]))),e.responses&&(t.responses=ke(e.responses,void 0));let n=e.securityDefinitions;if(n){let r={};for(let[o,s]of Object.entries(n))r[o]=nt(s);t.securitySchemes=r}return t}function nt(e){switch(e.type){case"basic":return{type:"http",scheme:"basic"};case"apiKey":return{type:"apiKey",name:e.name,in:e.in};case"oauth2":{let t=e.flow==="accessCode"?"authorizationCode":e.flow==="application"?"clientCredentials":e.flow,n={scopes:e.scopes??{}};return e.authorizationUrl&&(n.authorizationUrl=e.authorizationUrl),e.tokenUrl&&(n.tokenUrl=e.tokenUrl),{type:"oauth2",flows:{[t]:n}}}default:return e}}function _(e){if(Array.isArray(e))return e.map(_);if(q(e)){let t={};for(let[n,r]of Object.entries(e))n==="$ref"&&typeof r=="string"?t.$ref=r.replace("#/definitions/","#/components/schemas/").replace("#/parameters/","#/components/parameters/").replace("#/responses/","#/components/responses/"):t[n]=_(r);return t}return e}var rt="application/json",ot="application/json",$e=new Set(["name","in","required","description","deprecated","allowEmptyValue","collectionFormat"]);function st(e,t,n){let r={};for(let[o,s]of Object.entries(e)){let i=s,a={};for(let[c,u]of Object.entries(i)){if(c==="parameters"&&Array.isArray(u)){a.parameters=u.map(X);continue}if(!it(c)){a[c]=u;continue}a[c]=at(u,t,n)}r[o]=a}return r}function it(e){return["get","put","post","delete","options","head","patch"].includes(e.toLowerCase())}function at(e,t,n){let r=e.consumes??t,o=e.produces??n,s=e.parameters??[],i=s.find(p=>p.in==="body"),a=s.filter(p=>p.in==="formData"),c=s.filter(p=>p.in!=="body"&&p.in!=="formData").map(X),u={...e,parameters:c};delete u.consumes,delete u.produces;let d=r?.[0]??rt;if(i)u.requestBody={required:!!i.required,content:{[d]:{schema:i.schema}}};else if(a.length>0){let p={},l=[];for(let y of a)p[y.name]=ct(y),y.required&&l.push(y.name);let f={type:"object",properties:p};l.length>0&&(f.required=l);let m=r?.find(y=>y==="multipart/form-data")??r?.[0]??"application/x-www-form-urlencoded";u.requestBody={required:l.length>0,content:{[m]:{schema:f}}}}return e.responses&&(u.responses=ke(e.responses,o)),u}function X(e){if(e.$ref!==void 0||e.in==="body"||e.in==="formData")return e;let t={},n={};for(let[r,o]of Object.entries(e))$e.has(r)?t[r]=o:n[r]=o;if(t.schema=n,delete t.collectionFormat,e.in==="query"&&n.type==="array"){let r=e.collectionFormat??"csv";r!=="multi"&&(t.style=r==="ssv"?"spaceDelimited":r==="pipes"?"pipeDelimited":"form",t.explode=!1)}return t}function ct(e){let t={};for(let[n,r]of Object.entries(e))$e.has(n)||(t[n]=r);return t}function ke(e,t){let n=t?.[0]??ot,r={};for(let[o,s]of Object.entries(e)){let i=s;if(i.schema===void 0){r[o]=i;continue}let{schema:a,...c}=i;r[o]={...c,content:{[n]:{schema:a}}}}return r}async function ve(e,t,n){let r=t??await R({}),o=await ee({ref:e,config:r,collectSpecData:n}),s=await R({rules:{struct:"error"}}),i=await te({externalRefResolver:new Y,document:o.bundle,config:s}),a=[...o.problems,...i].filter(u=>u.severity==="error");if(a.length>0){let u=a.map(d=>`- ${d.message} (at ${d.location?.[0]?.pointer??e})`).join(`
|
|
7
|
+
import{b as M,c as C,k as L}from"./ZQR3UXSE.js";import{o as ne,p as b,q as D,r as re,x as oe,y as U,z as se}from"./D5FXUPT3.js";import{a as g}from"./WZXA5XPB.js";import{Ca as te,R as Q,X as Y,c as q,ma as Z,q as v,r as J,ta as ee,u as V,va as R}from"./X22IMAJK.js";import{mkdir as ut,readFile as pt,writeFile as dt}from"node:fs/promises";import{dirname as Se,parse as ft,resolve as E,sep as lt}from"node:path";function I(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./2VEBJTXT.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var T={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"},G={typescript:{load:()=>import("./6H6JZR34.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./GMDXESQC.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./U7DBLTUY.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":I("react"),"tanstack-query-vue":I("vue"),"tanstack-query-svelte":I("svelte"),"tanstack-query-solid":I("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./XLGPRL3R.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./E2GVJIW4.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./NJRAYNNV.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:T,load:()=>import("./FQW4AJZ5.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:T,load:()=>import("./WYJDYKTU.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:T,load:()=>import("./HEOB2XNV.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))},java:{errorModes:["throw"],notApplicable:T,load:()=>import("./55XS6NAN.js").then(e=>({run:e.javaGenerator,sample:e.javaSample,docs:e.javaDocs}))}};function ie(e,t,n,r){let o=new Set(e);t.goPackage!==void 0&&!o.has("go")&&b({kind:"option-ignored",message:"goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).",operations:[]});let s=!1;for(let c of["typescript","go","python","php"])if(o.has(c)){s=!0;break}t.telemetry==="on"&&!s&&b({kind:"option-ignored",message:"telemetry is ignored \u2014 no selected generator writes a telemetry module (add --generator typescript, go, python, or php).",operations:[]});let i=t.errorMode??"throw",a=t.dateType??"string";for(let c of e){let u=n.get(c);if(!u)throw new g(`Unknown generator: ${c}`);for(let p of u.requires??[])if(!o.has(p)){let l=[...new Set([p,...e])].map(f=>`--generator ${f}`).join(" ");throw new g(`The "${c}" generator requires the "${p}" generator. Add it, e.g. ${l}.`)}if(u.errorModes&&!u.errorModes.includes(i))throw new g(`The "${c}" generator does not support --error-mode "${i}" (supported: ${u.errorModes.join(", ")}).`);if(u.dateTypes&&!u.dateTypes.includes(a))throw new g(`The "${c}" generator requires --date-type ${u.dateTypes.join(" or ")} (got "${a}") so the runtime values match the generated types.`);let d={...t,outputMode:r};for(let[p,l]of Object.entries(u.notApplicable??{}))d[p]!==void 0&&b({kind:"option-ignored",message:`the "${c}" generator ignores ${p} \u2014 ${l}.`,operations:[]})}}function ae(e,t,n){let r=new Map;for(let o of e){let s=t.get(o)?.options,i=n?.[o];if(s===void 0){i!==void 0&&b({kind:"option-ignored",message:`the "${o}" generator declares no options, so client.options.${o} is ignored.`,operations:[]}),r.set(o,{});continue}r.set(o,Oe(o,s,i))}return r}function Oe(e,t,n){if(n!==void 0&&!q(n))throw new g(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},o=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!o.includes(i))throw new g(`The "${e}" generator got an unknown option "${i}". Declared options: ${o.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new g(`The "${e}" generator requires the "${i}" option.`);let s={...r};for(let[i,a]of Object.entries(t.properties)){if(s[i]===void 0){a.default!==void 0&&(s[i]=a.default);continue}let c=xe(a,s[i]);if(c!==void 0)throw new g(`The "${e}" generator's "${i}" ${c}.`)}return s}function xe(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 je,resolve as Pe}from"node:path";import{pathToFileURL as Ae}from"node:url";var qe=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,s,i){return r?t?".jsx":".js":o&&(!s||!i)?n:o+s+"."+i.toLowerCase()+"js"}):e};async function ue(e,t={}){let n=new Map;for(let a of t.customGenerators??[])pe(n,a);let r=[];for(let a of e)r.push(await ce(a,n,t.configDir));let o=[],s=new Set,i=async a=>{if(!(o.includes(a)||s.has(a))){s.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in G)&&await i(await ce(c,n,t.configDir));s.delete(a),o.push(a)}};for(let a of r)await i(a);return{selected:o,registry:n}}async function ce(e,t,n){if(t.has(e))return e;let r=G[e];if(r!==void 0){let{load:s,...i}=r;return t.set(e,{...i,...await s()}),e}if(e==="sdk")throw new g('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let o=await Ne(e,n??process.cwd());return pe(t,o),o.name}function pe(e,t){if(!q(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new g("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 g(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=se(U,t.requiresGenerator);if(n===void 0)throw new g(`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 g(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${U}. 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 G&&b({kind:"generator-replaced",message:`custom generator "${t.name}" takes over the built-in generator of the same name.`,operations:[]}),e.set(t.name,{run:t.run,sample:t.sample,docs:t.docs,notApplicable:t.notApplicable,options:t.options,requires:t.requires,errorModes:t.errorModes,dateTypes:t.dateTypes})}async function Ne(e,t){if(V(e))throw new g(`Remote generator modules are not supported \u2014 use a local path or a package name. Got: ${e}`);let n=e.startsWith(".")||je(e),r=n?Ae(Pe(t,e)).href:e;if(n&&e.endsWith(".ts")&&!process.features.typescript)throw new g(`Generator "${e}" is TypeScript, which this Node cannot run directly \u2014 use Node 22.18, 23.6, or newer.`);let o;try{o=await import(qe(r))}catch(i){throw new g(`Could not load generator "${e}": ${i.message}`)}let s=o.default??o.generator;if(s===void 0)throw new g(`Generator module "${e}" must export a generator (a default export or a \`generator\` export built with \`defineGenerator\`).`);return s}function le(e){let t=new Set,n=new Set,r=new Map;for(let f of e.securitySchemes){let m=B(f.key,t,n);m!==f.key&&(r.set(f.key,m),F("security scheme",f.key,m,fe(f.key,t)),f.key=m)}let o=new Set(oe()),s=new Set(o),i=new Set,a=new Map;for(let f of e.schemas){let m=B(f.name,s,i);m!==f.name&&(a.set(f.name,m),F("schema",f.name,m,fe(f.name,o)),f.name=m)}let c=f=>a.get(f)??de(f),u=f=>r.get(f)??de(f);for(let f of e.schemas)$(f.schema,c);let d=new Set(s),p=new Set,l=new Set;for(let f of e.services)for(let m of f.operations){let y=l.has(m.name);l.add(m.name);let h=m.name,S=B(m.name,d,p);if(S!==m.name){let P=y?{kind:"duplicate-operation-id"}:o.has(h)?{kind:"reserved"}:s.has(h)?{kind:"schema-collision"}:{kind:"unusable"};F("operation",h,S,P,[h]),m.specName=m.name,m.name=S}Me(m,c),m.security=m.security.map(P=>P.map(u))}}function B(e,t,n){let r=C(e),o=r,s=2;for(;t.has(o)||n.has(L(o));)o=`${r}_${s++}`;return t.add(o),n.add(L(o)),o}function me(e){for(let t of e.schemas)if(!M(t.name))throw z("schema",t.name);for(let t of e.securitySchemes)if(!M(t.key))throw z("security scheme",t.key);for(let t of e.services)for(let n of t.operations)if(!M(n.name))throw z("operation",n.name)}function z(e,t){return new Error(`Internal error: ${e} name ${JSON.stringify(t)} is not a safe identifier after sanitization.`)}function de(e){return C(e)}function F(e,t,n,r,o=[]){let s=JSON.stringify(t),i=JSON.stringify(n),a=r.kind==="duplicate-operation-id"?`two operations share the operationId ${s}; the second is emitted as ${i} \u2014 give each operation a unique operationId to control its method name`:r.kind==="schema-collision"?`${e} ${s} collides with the schema of the same name, so it is emitted as ${i} \u2014 rename the operation or the schema in the description to control its name`:r.kind==="reserved"?`${e} ${s} is a name a generated client already declares, so it is emitted as ${i} \u2014 the reserved set spans every target language, so one schema keeps one name across the SDKs you generate`:`${e} ${s} is not a usable identifier, so it is emitted as ${i}`;b({kind:"name-changed",message:`${a}.`,operations:o})}function fe(e,t){return t.has(e)?{kind:"reserved"}:{kind:"unusable"}}function $(e,t){switch(e.kind){case"ref":e.name=t(e.name);break;case"omit":e.base=t(e.base);break;case"array":$(e.items,t);break;case"record":$(e.value,t);break;case"object":for(let n of e.properties)$(n.schema,t);break;case"union":for(let n of e.members)$(n,t);if(e.discriminator)for(let n of e.discriminator.mapping)n.schemaName=t(n.schemaName);break;case"intersection":for(let n of e.members)$(n,t);break}}function Me(e,t){for(let n of e.pathParams)$(n.schema,t);for(let n of e.queryParams)$(n.schema,t);for(let n of e.headerParams)$(n.schema,t);for(let n of e.cookieParams)$(n.schema,t);e.requestBody&&$(e.requestBody.schema,t);for(let n of[...e.successResponses,...e.errorResponses])$(n.schema,t),n.itemSchema&&$(n.itemSchema,t)}var Ie=["get","post","put","delete","patch","head","options"];function ye(e,t){if(!t.startsWith("#/"))throw new g(`External $ref not supported: ${t}`);let n=t.slice(2).split("/").map(o=>o.replace(/~1/g,"/").replace(/~0/g,"~")),r=e;for(let o of n){if(!q(r)&&!Array.isArray(r))throw new g(`Cannot resolve $ref: ${t}`);r=r[o]}if(r===void 0)throw new g(`Cannot resolve $ref: ${t}`);return r}function O(e,t){return v(t)?ye(e,t.$ref):t}function N(e){let t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function Te(e){let t=e,n={};return typeof t.minimum=="number"&&(n.minimum=t.minimum),typeof t.maximum=="number"&&(n.maximum=t.maximum),typeof t.exclusiveMinimum=="number"?n.exclusiveMinimum=t.exclusiveMinimum:t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n.exclusiveMinimum=t.minimum,delete n.minimum),typeof t.exclusiveMaximum=="number"?n.exclusiveMaximum=t.exclusiveMaximum:t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n.exclusiveMaximum=t.maximum,delete n.maximum),typeof t.multipleOf=="number"&&(n.multipleOf=t.multipleOf),typeof t.minLength=="number"&&(n.minLength=t.minLength),typeof t.maxLength=="number"&&(n.maxLength=t.maxLength),typeof t.pattern=="string"&&(n.pattern=t.pattern),typeof t.minItems=="number"&&(n.minItems=t.minItems),typeof t.maxItems=="number"&&(n.maxItems=t.maxItems),t.uniqueItems===!0&&(n.uniqueItems=!0),typeof t.format=="string"&&(n.format=t.format),t.deprecated===!0&&(n.deprecated=!0),t.example!==void 0?n.example=t.example:Array.isArray(t.examples)&&t.examples.length>0&&(n.example=t.examples[0]),t.default!==void 0&&(n.default=t.default),Object.keys(n).length>0?n:void 0}function Ge(e,t){let n=e.discriminator;if(!n||typeof n.propertyName!="string")return;let r=[];if(n.mapping)for(let[o,s]of Object.entries(n.mapping))r.push({value:o,schemaName:N(s)});else for(let o of t)if(v(o)){let s=N(o.$ref);r.push({value:s,schemaName:s})}if(r.length!==0)return{propertyName:n.propertyName,mapping:r}}function k(e,t){return t?{...e,metadata:t}:e}function K(e,t){return e?t?{...e,...t}:e:t}function Ee(e){return e?e.url.replace(/\{([^{}]+)\}/g,(t,n)=>e.variables?.[n]?.default??t):""}function ge(e){let t=e.info?.title??"Api",n=e.info?.version??"0.0.0",r=e.info?.description,o=Ee(e.servers?.[0]),s=(e.servers??[]).map(d=>({url:d.url,description:d.description,variables:Object.entries(d.variables??{}).map(([p,l])=>({name:p,default:l.default,description:l.description}))})),i=Be(e),a=Ce(e),c=ze(e,a),u={title:t,version:n,description:r,serverUrl:o,servers:s,services:c,schemas:i,securitySchemes:a};return le(u),Re(c,i),me(u),u}function Re(e,t){let n=new Map(t.map(r=>[r.name,r.schema]));for(let r of e)for(let o of r.operations){o.requestBody&&(o.requestBody.schema=A(o.requestBody.schema,"readOnly",n));for(let s of o.successResponses)s.schema=A(s.schema,"writeOnly",n)}}function De(e){let t=e.filter(n=>n.kind!=="unknown");return t.length>0?t:[{kind:"unknown"}]}function A(e,t,n){if(e.kind==="ref"){let r=Ue(e,t,n,new Set);return r.length>0?{kind:"omit",base:e.name,keys:r}:e}if(e.kind==="array")return{...e,items:A(e.items,t,n)};if(e.kind==="record")return{...e,value:A(e.value,t,n)};if(e.kind==="object"){let r=e.properties.filter(o=>!o[t]).map(o=>({...o,schema:A(o.schema,t,n)}));return{...e,properties:r}}return e}function Ue(e,t,n,r){let o=[],s=i=>{if(i.kind==="ref"){if(r.has(i.name))return;r.add(i.name);let a=n.get(i.name);a&&s(a)}else if(i.kind==="object")for(let a of i.properties)a[t]&&!o.includes(a.name)&&o.push(a.name);else if(i.kind==="intersection")for(let a of i.members)s(a)};return s(e),o}function Ce(e){let t=e.components?.securitySchemes;if(!t)return[];let n=[];for(let[r,o]of Object.entries(t)){let s=O(e,o),i=s.type;i==="oauth2"||i==="openIdConnect"?n.push({kind:"bearer",key:r}):i==="http"&&(s.scheme??"").toLowerCase()==="bearer"?n.push({kind:"bearer",key:r}):i==="http"&&(s.scheme??"").toLowerCase()==="basic"?n.push({kind:"basic",key:r}):i==="apiKey"&&s.in==="header"&&typeof s.name=="string"?n.push({kind:"apiKeyHeader",key:r,headerName:s.name}):i==="apiKey"&&s.in==="query"&&typeof s.name=="string"?n.push({kind:"apiKeyQuery",key:r,paramName:s.name}):i==="apiKey"&&s.in==="cookie"&&typeof s.name=="string"&&(b({kind:"browser-unsupported",message:`security scheme "${r}" sends its credential in the Cookie header, which browsers ignore \u2014 cookie auth works only in server-side clients.`,operations:[]}),n.push({kind:"apiKeyCookie",key:r,cookieName:s.name}))}return n}function Le(e,t,n){let r=e.security??t.security;if(!r)return[];let o=[];for(let s of r){let i=Object.keys(s);i.length!==0&&i.every(a=>n.has(a))&&o.push([...new Set(i)])}return o}function Be(e){let t=e.components?.schemas;return t?Object.entries(t).map(([n,r])=>{if(v(r)){let s=ye(e,r.$ref);return{name:n,schema:j(s,`components.schemas.${n}`,e),description:s.description}}let o=j(r,`components.schemas.${n}`,e);return{name:n,schema:o,description:r.description}}):[]}function ze(e,t){let n=new Set(t.map(i=>i.key)),r=[],o=new Set;for(let[i,a]of Object.entries(e.paths??{})){if(!a)continue;let c=O(e,a),u=(c.parameters??[]).map(d=>we(O(e,d),`paths.${i}.parameters`,e));for(let d of Ie){let p=c[d];p&&(r.push({method:d,path:i,operation:p,pathLevelParams:u}),p.operationId&&o.add(p.operationId))}}return[{name:"Default",operations:r.map(i=>{let a=i.operation.operationId??_e(Fe(i.method,i.path),o);return Xe(i.method,i.path,i.operation,a,i.pathLevelParams,e,n)})}]}function Fe(e,t){let n=t.split("/").filter(Boolean).map(r=>Ke(r.replace(/[{}]/g,"")));return`${e}${n.join("")}`}function Ke(e){return e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function _e(e,t){let n=e,r=2;for(;t.has(n);)n=`${e}${r++}`;return t.add(n),n}function Xe(e,t,n,r,o,s,i){let a=(n.parameters??[]).map(w=>we(O(s,w),`paths.${t}.${e}.parameters`,s)),c=new Set,u=[];for(let w of a)c.add(`${w.in}:${w.name}`),u.push(w);for(let w of o)c.has(`${w.in}:${w.name}`)||u.push(w);let d=u.filter(w=>w.in==="path"),p=u.filter(w=>w.in==="query"),l=u.filter(w=>w.in==="header"),f=u.filter(w=>w.in==="cookie"),m=n.requestBody?We(O(s,n.requestBody),`${e} ${t}`,s):void 0,{successResponses:y,successResponseHeaders:h}=Je(n,t,s),S=Qe(n,t,s),P=Le(n,s,i),H=n["x-redoclyPagination"],W=He(y);return{name:r,method:e,path:t,summary:n.summary,description:n.description,pathParams:d,queryParams:p,headerParams:l,cookieParams:f,requestBody:m,successResponses:y,...h===void 0?{}:{successResponseHeaders:h},errorResponses:S,security:P,tags:Array.isArray(n.tags)?n.tags.filter(w=>typeof w=="string"):[],...H!==void 0?{paginationExtension:H}:{},...W===void 0?{}:{sse:W}}}function He(e){let t=e.find(o=>o.contentType.split(";")[0].trim().toLowerCase()==="text/event-stream");if(t===void 0)return;let n=t.itemSchema&&t.itemSchema.kind!=="unknown"?t.itemSchema:t.schema.kind!=="unknown"?t.schema:void 0;if(n===void 0)return{dataKind:"text"};let r=n.kind==="object"||n.kind==="ref"||n.kind==="array"||n.kind==="record"||n.kind==="union"||n.kind==="intersection";return{eventSchema:n,dataKind:r?"json":"text"}}function we(e,t,n){if(!e.in)throw new g(`Parameter ${e.name} at ${t} is missing "in"`);if(!["path","query","header","cookie"].includes(e.in))throw new g(`Unsupported parameter location "${e.in}" for ${e.name} at ${t}`);let r=x(e.schema,`${t}.${e.name}`,n);e.deprecated===!0&&(r={...r,metadata:K(r.metadata,{deprecated:!0})});let o={name:e.name,in:e.in,schema:r,required:!!e.required,description:e.description};if(o.in==="query"){let s=e;(s.style==="form"||s.style==="spaceDelimited"||s.style==="pipeDelimited"||s.style==="deepObject")&&(o.style=s.style),typeof s.explode=="boolean"&&(o.explode=s.explode),typeof s.allowReserved=="boolean"&&(o.allowReserved=s.allowReserved)}return o}function We(e,t,n){let r=e.content??{},o=r["application/json"]??r["application/merge-patch+json"]??r["application/x-www-form-urlencoded"]??r["multipart/form-data"]??Object.values(r)[0];if(!o)return;let s=Object.keys(r).find(a=>r[a]===o),i=x(o.schema,`${t}.requestBody`,n);return{contentType:s,schema:i,required:!!e.required,description:e.description}}function Je(e,t,n){let r=e.responses??{},o=Object.keys(r).filter(l=>/^2\d\d$/.test(l));o.length===0&&(r["2XX"]?o.push("2XX"):r.default&&o.push("default"));let s=o[0];if(!s)return{successResponses:[]};let i=r[s];if(!i)return{successResponses:[]};let a=O(n,i),c=Ve(a.headers,`paths.${t}.response.${s}`,n),u=a.content;if(!u)return{successResponses:[],...c===void 0?{}:{successResponseHeaders:c}};let d=s==="default"||s==="2XX"?s:Number(s),p=[];for(let[l,f]of Object.entries(u)){let m=x(f.schema,`paths.${t}.response.${s}.${l}`,n),y=f.itemSchema,h=y!==void 0?x(y,`paths.${t}.response.${s}.${l}.itemSchema`,n):void 0;p.push({contentType:l,schema:m,status:d,...h===void 0?{}:{itemSchema:h}})}return{successResponses:p,...c===void 0?{}:{successResponseHeaders:c}}}function Ve(e,t,n){if(!e)return;let r=[];for(let[o,s]of Object.entries(e)){let i=O(n,s),a={name:o.toLowerCase(),schema:x(i.schema===void 0?void 0:O(n,i.schema),`${t}.headers.${o}`,n)};i.required===!0&&(a.required=!0),r.push(a)}return r.length>0?r:void 0}function Qe(e,t,n){let r=e.responses??{},o=Object.keys(r).filter(a=>/^([45]\d\d|4XX|5XX)$/.test(a));Object.keys(r).some(a=>/^(2\d\d|2XX)$/.test(a))&&r.default&&o.push("default");let i=[];for(let a of o){let c=r[a];if(!c)continue;let d=O(n,c).content;if(!d)continue;let p=a==="default"||a==="4XX"||a==="5XX"?a:Number(a);for(let[l,f]of Object.entries(d)){let m=x(f.schema,`paths.${t}.response.${a}.${l}`,n);i.push({contentType:l,schema:m,status:p})}}return i}function x(e,t,n){return e===void 0||typeof e=="boolean"?{kind:"unknown"}:v(e)?{kind:"ref",name:N(e.$ref)}:j(e,t,n)}function j(e,t,n){let r=Te(e),o=e.oneOf??e.anyOf;if(o){let a=o.map((d,p)=>v(d)?{kind:"ref",name:N(d.$ref)}:j(d,`${t}.[${p}]`,n)),c=De(a);if(c.length===1&&c.length<a.length){let d=c[0];return{...d,description:d.description??e.description,metadata:K(r,d.metadata)}}let u=Ge(e,o);return k({kind:"union",members:c,discriminator:u,description:e.description},r)}if(e.allOf){let a=e.allOf.map((u,d)=>v(u)?{kind:"ref",name:N(u.$ref)}:j(u,`${t}.allOf[${d}]`,n)),c=he(e,t,n);if(c.length>0&&a.unshift({kind:"object",properties:c}),a.length===1){let u=a[0];return{...u,description:u.description??e.description,metadata:K(r,u.metadata)}}return k({kind:"intersection",members:a,description:e.description},r)}let s=e.type;if(Array.isArray(s)){let a=s.filter(d=>d!=="null"),c=s.includes("null"),u=a.map(d=>{let p={...e,type:d};if(Array.isArray(p.enum)){let l=p.enum.filter(f=>f!==null);p.enum=l.length>0?l:void 0}return j(p,t,n)});return c&&u.push({kind:"null"}),u.length===1?u[0]:k({kind:"union",members:u,description:e.description},r)}if(e.nullable)return{kind:"union",members:[j({...e,nullable:void 0},t,n),{kind:"null"}],description:e.description};if(e.const!==void 0){let a=e.const;if(typeof a!="string"&&typeof a!="number"&&typeof a!="boolean")throw new g(`Unsupported const value at ${t}: ${JSON.stringify(a)}`);return k({kind:"literal",value:a,description:e.description},r)}if(e.enum){let a=e.enum,c=a.filter(l=>l!==null),u=c.length!==a.length;if(c.length===0)return k({kind:"null",description:e.description},r);let d=Ye(c,t),p=d==="boolean"?{kind:"scalar",scalar:"boolean",description:e.description}:{kind:"enum",values:c,scalar:d,description:e.description};return k(u?{kind:"union",members:[p,{kind:"null"}],description:e.description}:p,r)}let i=s;if(i==="null")return k({kind:"null",description:e.description},r);if(i==="array"){let a=e.items,c=x(a,`${t}.items`,n);return k({kind:"array",items:c,description:e.description},r)}if(i==="object"||e.properties||e.additionalProperties){let a=he(e,t,n),c=e.additionalProperties;if(a.length===0&&c!==!1){let u=x(c,`${t}.additionalProperties`,n);return k({kind:"record",value:u,description:e.description},r)}return k({kind:"object",properties:a,description:e.description},r)}return k(i==="string"||i==="number"||i==="integer"||i==="boolean"?{kind:"scalar",scalar:i,description:e.description}:{kind:"unknown",description:e.description},r)}function Ye(e,t){let n=!1,r=!1,o=!1;for(let s of e)if(typeof s=="string")n=!0;else if(typeof s=="number")r=!0;else if(typeof s=="boolean")o=!0;else throw new g(`Unsupported enum value type at ${t}: ${JSON.stringify(s)}`);return n&&!r&&!o?"string":r&&!n&&!o?"number":o&&!n&&!r?"boolean":"string"}function Ze(e){return!(e.openapi??"").startsWith("3.0")}function he(e,t,n){let r=e.properties??{},o=new Set(e.required??[]),s=Ze(n);return Object.entries(r).map(([i,a])=>{let c=a,u=v(a)&&!s;return u&&c.readOnly===!0&&b({kind:"description-ignored",message:`"${i}" declares readOnly beside a $ref, which OpenAPI ${n.openapi} ignores \u2014 the property stays in request bodies. Inline the schema, wrap the $ref in allOf, or move the description to OpenAPI 3.1.`,operations:[]}),u&&c.writeOnly===!0&&b({kind:"description-ignored",message:`"${i}" declares writeOnly beside a $ref, which OpenAPI ${n.openapi} ignores \u2014 the property stays in responses. Inline the schema, wrap the $ref in allOf, or move the description to OpenAPI 3.1.`,operations:[]}),{name:i,schema:x(a,`${t}.${i}`,n),required:o.has(i),description:a.description,...c.readOnly===!0&&!u?{readOnly:!0}:{},...c.writeOnly===!0&&!u?{writeOnly:!0}:{}}})}function be(e){let t=_(e),n={...t};delete n.swagger,delete n.host,delete n.basePath,delete n.schemes,delete n.definitions,delete n.securityDefinitions,delete n.consumes,delete n.produces,delete n.parameters,delete n.responses,n.openapi="3.0.3";let r=et(t);return r&&(n.servers=r),n.components=tt(t),n.paths=st(t.paths??{},t.consumes??void 0,t.produces??void 0),n}function et(e){let t=e.host,n=e.basePath??"",r=(e.schemes??["https"])[0]??"https";if(t)return[{url:`${r}://${t}${n}`}]}function tt(e){let t={};e.definitions&&(t.schemas=e.definitions),e.parameters&&(t.parameters=Object.fromEntries(Object.entries(e.parameters).map(([r,o])=>[r,X(o)]))),e.responses&&(t.responses=ke(e.responses,void 0));let n=e.securityDefinitions;if(n){let r={};for(let[o,s]of Object.entries(n))r[o]=nt(s);t.securitySchemes=r}return t}function nt(e){switch(e.type){case"basic":return{type:"http",scheme:"basic"};case"apiKey":return{type:"apiKey",name:e.name,in:e.in};case"oauth2":{let t=e.flow==="accessCode"?"authorizationCode":e.flow==="application"?"clientCredentials":e.flow,n={scopes:e.scopes??{}};return e.authorizationUrl&&(n.authorizationUrl=e.authorizationUrl),e.tokenUrl&&(n.tokenUrl=e.tokenUrl),{type:"oauth2",flows:{[t]:n}}}default:return e}}function _(e){if(Array.isArray(e))return e.map(_);if(q(e)){let t={};for(let[n,r]of Object.entries(e))n==="$ref"&&typeof r=="string"?t.$ref=r.replace("#/definitions/","#/components/schemas/").replace("#/parameters/","#/components/parameters/").replace("#/responses/","#/components/responses/"):t[n]=_(r);return t}return e}var rt="application/json",ot="application/json",$e=new Set(["name","in","required","description","deprecated","allowEmptyValue","collectionFormat"]);function st(e,t,n){let r={};for(let[o,s]of Object.entries(e)){let i=s,a={};for(let[c,u]of Object.entries(i)){if(c==="parameters"&&Array.isArray(u)){a.parameters=u.map(X);continue}if(!it(c)){a[c]=u;continue}a[c]=at(u,t,n)}r[o]=a}return r}function it(e){return["get","put","post","delete","options","head","patch"].includes(e.toLowerCase())}function at(e,t,n){let r=e.consumes??t,o=e.produces??n,s=e.parameters??[],i=s.find(p=>p.in==="body"),a=s.filter(p=>p.in==="formData"),c=s.filter(p=>p.in!=="body"&&p.in!=="formData").map(X),u={...e,parameters:c};delete u.consumes,delete u.produces;let d=r?.[0]??rt;if(i)u.requestBody={required:!!i.required,content:{[d]:{schema:i.schema}}};else if(a.length>0){let p={},l=[];for(let y of a)p[y.name]=ct(y),y.required&&l.push(y.name);let f={type:"object",properties:p};l.length>0&&(f.required=l);let m=r?.find(y=>y==="multipart/form-data")??r?.[0]??"application/x-www-form-urlencoded";u.requestBody={required:l.length>0,content:{[m]:{schema:f}}}}return e.responses&&(u.responses=ke(e.responses,o)),u}function X(e){if(e.$ref!==void 0||e.in==="body"||e.in==="formData")return e;let t={},n={};for(let[r,o]of Object.entries(e))$e.has(r)?t[r]=o:n[r]=o;if(t.schema=n,delete t.collectionFormat,e.in==="query"&&n.type==="array"){let r=e.collectionFormat??"csv";r!=="multi"&&(t.style=r==="ssv"?"spaceDelimited":r==="pipes"?"pipeDelimited":"form",t.explode=!1)}return t}function ct(e){let t={};for(let[n,r]of Object.entries(e))$e.has(n)||(t[n]=r);return t}function ke(e,t){let n=t?.[0]??ot,r={};for(let[o,s]of Object.entries(e)){let i=s;if(i.schema===void 0){r[o]=i;continue}let{schema:a,...c}=i;r[o]={...c,content:{[n]:{schema:a}}}}return r}async function ve(e,t,n){let r=t??await R({}),o=await ee({ref:e,config:r,collectSpecData:n}),s=await R({rules:{struct:"error"}}),i=await te({externalRefResolver:new Y,document:o.bundle,config:s}),a=[...o.problems,...i].filter(u=>u.severity==="error");if(a.length>0){let u=a.map(d=>`- ${d.message} (at ${d.location?.[0]?.pointer??e})`).join(`
|
|
8
8
|
`);throw new Error(`The API description has ${a.length} error(s):
|
|
9
9
|
${u}`)}let c=o.bundle.parsed;return{document:c,version:Z(c)}}var mt=["Generated by @redocly/client-generator \u2014 do not edit by hand.","Source: OpenAPI description. Re-run `redocly generate-client` to update."];function ht(e,t){let n=[],r=new Set,o=E(Se(t.outputPath)),{dir:s,name:i,ext:a}=ft(t.outputPath),c={path:t.outputPath,dir:s,stem:i,ext:a},u=mt,d=!1;for(let p of t.generators){let l=t.registry.get(p),f={model:e,output:c,banner:u,reportFinding:b,outputMode:t.outputMode,emit:t.emit,pagination:t.pagination,selected:t.generators,options:t.generatorOptions?.get(p)??{}},m;try{t.emit.docs===!0&&l.docs!==void 0?(m=[...l.run(f),...l.docs(f)],d=!0):m=l.run(f)}catch(y){let h=y instanceof Error?y.message:String(y);throw new Error(`Generator "${p}" failed: ${h}`)}if(!Array.isArray(m)||m.some(y=>typeof y?.path!="string"||y.path===""||typeof y.content!="string"))throw new Error(`Generator "${p}" failed: run() must return an array of { path, content } files.`);for(let y of m){let h=E(o,y.path);if(h!==o&&!h.startsWith(o+lt))throw new Error(`Generator "${p}" failed: file path escapes the output directory: ${y.path}`);if(r.has(h))throw new Error(`Generator conflict: ${y.path} already emitted by an earlier generator`);r.add(h),n.push({path:h,content:y.content})}}return t.emit.docs===!0&&!d&&b({kind:"option-ignored",message:`docs is on, but no selected generator writes documentation (${t.generators.join(", ")}).`,operations:[]}),n}function yt(e){for(let t of e.services)for(let n of t.operations){let r=new Set,o=new Set;for(let s of[...n.pathParams,...n.queryParams,...n.headerParams,...n.cookieParams])r.has(s.name)&&o.add(s.name),r.add(s.name);o.size!==0&&b({kind:"name-changed",message:`operation "${n.specName??n.name}" uses ${[...o].map(s=>`"${s}"`).join(", ")} in more than one parameter location. Every SDK sends both, and the SDKs whose methods take one argument per parameter give the later one a suffixed name \u2014 rename it in the description to choose the name yourself.`,operations:[n.specName??n.name]})}}function gt(e,t,n,r,o,s,i){let a=[],c=new Set;for(let u of D(t.services)){let d=wt(e,u.path,u.method);if(c.has(d))continue;c.add(d);let p=r.map(l=>o.get(l)?.sample?.(u,{model:t,emit:n,outputPath:s,pagination:i})).filter(l=>l!==void 0);p.length>0&&a.push({target:d,update:{"x-codeSamples":p}})}if(a.length!==0)return Q({overlay:"1.0.0",info:{title:`Code samples for ${t.title}`,version:t.version},actions:a})}function wt(e,t,n){let r=i=>`['${i.replaceAll("\\","\\\\").replaceAll("'","\\'")}']`,o=e.paths?.[t];return`${v(o)&&o.$ref.startsWith("#/")?"$"+o.$ref.slice(2).split("/").map(J).map(r).join(""):`$.paths${r(t)}`}.${n}`}async function un(e){return ne.run(e.onFinding,()=>bt(e))}async function bt(e){if(e.output.split(/[\\/]/).some(h=>h==="undefined"||h==="null"))throw new Error(`output path "${e.output}" contains a literal "undefined" or "null" segment \u2014 this looks like an interpolation bug in the caller`);if(e.setup&&/^[a-z][a-z0-9+.-]+:/i.test(e.setup))throw new g(`setup must be a local file path \u2014 remote setup modules are not supported (got: ${e.setup})`);let t=E(e.output),{document:n,version:r}=await ve(e.api,e.config,e.collectSpecData),o=r==="oas2"?be(n):n,s=ge(o);yt(s);let i;if(e.setup){let{bakeSetup:h}=await import("./CQMMUWIJ.js"),S=E(e.configDir??process.cwd(),e.setup);i=h(await pt(S,"utf-8"))}let a=e.generators?.length?e.generators:["typescript"],{selected:c,registry:u}=await ue(a,{customGenerators:e.customGenerators,configDir:e.configDir}),d=re(s,e.pagination),p={serverUrl:e.serverUrl,argsStyle:e.argsStyle,errorMode:e.errorMode,dateType:e.dateType,mockData:e.mockData,mockSeed:e.mockSeed,queryKeyPrefix:e.queryKeyPrefix,telemetry:e.telemetry,setup:i,runtime:e.runtime,importExt:e.importExt,goPackage:e.goPackage,pagination:d,docs:e.docs,docsFrontmatter:e.docsFrontmatter};ie(c,p,u,e.outputMode);let l=ae(c,u,e.options),f=ht(s,{outputPath:t,outputMode:e.outputMode??"single",emit:p,pagination:d,generators:c,generatorOptions:l,registry:u});if(e.codeSamples===!0){let h=gt(n,s,p,c,u,t,d);h!==void 0&&f.push({path:t.replace(/\.[^.]+$/,".code-samples.yaml"),content:h})}let m=[];for(let h of f)await ut(Se(h.path),{recursive:!0}),await dt(h.path,h.content,"utf-8"),m.push({path:h.path,bytes:Buffer.byteLength(h.content,"utf-8")});let y=[];for(let h of D(s.services))y.push({id:h.specName??h.name,name:h.name});return{outputPath:t,bytes:m.reduce((h,S)=>h+S.bytes,0),files:m,operations:y}}export{G as a,ie as b,ht as c,un as d};
|
|
@@ -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 l}from"./
|
|
7
|
+
import{a as l}from"./ZIUPK7LZ.js";import{a as L,b as u,c as f,d}from"./E3DADNJB.js";import{d as G,e as y,f as v}from"./GGVGW7FK.js";import{c as x,d as S,e as g}from"./CC3J4WUZ.js";import{c as h,d as j,e as k}from"./STTC5LQL.js";import{c as D,d as b,e as E}from"./SKBRULRS.js";import{a as q,b as C,c as O,d as U}from"./DKO42NY5.js";import{a as t}from"./GUX653X5.js";import{a as n,b as p,c as m}from"./ADAQBYK6.js";import"./HAEWZII5.js";import{a as s}from"./AQGRZZTJ.js";import{a as c}from"./HCEBTB6Q.js";import{a as i}from"./5PLF5DE4.js";import"./RQ2GHUTM.js";import{a as R,d as z,e as A}from"./ADRTGRZ3.js";import{a as tr,b as ar,c as nr,d as pr,e as mr,f as sr,g as cr,h as ir,i as lr,j as ur,k as fr}from"./4NSY3LMD.js";import{e as I,h as M,k as N}from"./ZQR3UXSE.js";import{a as J,b as Q,c as H,d as K,e as P,f as V,g as W,h as X,i as Y,j as Z,k as $,l as rr,m as er,n as or}from"./D5FXUPT3.js";import{a as F}from"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";var _={typescript:{run:n,sample:m,docs:p},zod:{run:s},transformers:{run:c},"tanstack-query":{run:t("react")},"tanstack-query-vue":{run:t("vue")},"tanstack-query-svelte":{run:t("svelte")},"tanstack-query-solid":{run:t("solid")},swr:{run:i},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:G,sample:y,docs:v},go:{run:x,sample:S,docs:g},php:{run:h,sample:j,docs:k},java:{run:D,sample:b,docs:E}},B=Object.fromEntries(Object.entries(q).map(([e,{load:r,...o}])=>[e,{...o,..._[e]}]));function a(){return new Map(Object.entries(B))}function T(e,r,o=a(),w){C(e,r,o,w)}function Or(e,r){let o=r.registry??a();return T(r.generators,r.emit,o,r.outputMode),O(e,{...r,registry:o})}export{fr as AUTHORING_HELPER_NAMES,F as NotSupportedError,J as Printer,H as RESERVED_WORDS,Q as casing,M as codeLiteral,Or as collectGeneratedFiles,V as deref,X as discriminatorCases,rr as docText,$ as enumValues,W as flattenAllOf,U as generateClient,or as headerCoerceType,K as identifierFor,sr as isBinaryContentType,pr as isMultipartBody,Y as isNullable,mr as isUntypedMultipartBody,ar as jsonSuccessSchema,R as operationSignature,lr as paginationItemSchema,tr as paginationRuleFor,N as pascalCase,L as renderComposedCliEntry,ur as renderReferencePage,I as safeIdent,er as schemaAtPointer,ir as securityRequirements,cr as serverUrlParts,nr as sseResponse,z as tsJsdoc,A as tsType,P as uniqueIdentifiers,Z as unwrapNullable};
|
|
@@ -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"./ZIUPK7LZ.js";import"./4NSY3LMD.js";import"./ZQR3UXSE.js";import"./D5FXUPT3.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{a as mockGenerator};
|