@hey-api/openapi-ts 0.83.0 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XDXACE7V.js → chunk-3AYBIZLR.js} +10 -10
- package/dist/chunk-3AYBIZLR.js.map +1 -0
- package/dist/clients/angular/client.ts +3 -3
- package/dist/clients/angular/utils.ts +33 -39
- package/dist/clients/fetch/client.ts +4 -4
- package/dist/clients/fetch/utils.ts +33 -39
- package/dist/clients/next/client.ts +4 -4
- package/dist/clients/next/utils.ts +32 -33
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -26
- package/dist/index.d.ts +23 -26
- package/dist/index.js +1 -1
- package/dist/internal.cjs +9 -9
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-CcDC5oij.d.cts → types.d-CRtO-Prt.d.cts} +16 -0
- package/dist/{types.d-CcDC5oij.d.ts → types.d-CRtO-Prt.d.ts} +16 -0
- package/package.json +3 -2
- package/dist/chunk-XDXACE7V.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$6, c as IR } from './types.d-
|
|
2
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-
|
|
1
|
+
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$6, c as IR } from './types.d-CRtO-Prt.cjs';
|
|
2
|
+
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-CRtO-Prt.cjs';
|
|
3
3
|
import { HttpHeaders, HttpClient, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
|
4
4
|
import { Injector } from '@angular/core';
|
|
5
5
|
import { CreateAxiosDefaults, AxiosStatic, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios';
|
|
@@ -223,19 +223,18 @@ type ErrInterceptor$2<Err, Res, Req, Options> = (error: Err, response: Res, requ
|
|
|
223
223
|
type ReqInterceptor$2<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
224
224
|
type ResInterceptor$2<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
225
225
|
declare class Interceptors$2<Interceptor> {
|
|
226
|
-
|
|
227
|
-
constructor();
|
|
226
|
+
fns: Array<Interceptor | null>;
|
|
228
227
|
clear(): void;
|
|
229
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
230
|
-
exists(id: number | Interceptor): boolean;
|
|
231
228
|
eject(id: number | Interceptor): void;
|
|
232
|
-
|
|
229
|
+
exists(id: number | Interceptor): boolean;
|
|
230
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
231
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
233
232
|
use(fn: Interceptor): number;
|
|
234
233
|
}
|
|
235
234
|
interface Middleware$2<Req, Res, Err, Options> {
|
|
236
|
-
error:
|
|
237
|
-
request:
|
|
238
|
-
response:
|
|
235
|
+
error: Interceptors$2<ErrInterceptor$2<Err, Res, Req, Options>>;
|
|
236
|
+
request: Interceptors$2<ReqInterceptor$2<Req, Options>>;
|
|
237
|
+
response: Interceptors$2<ResInterceptor$2<Res, Req, Options>>;
|
|
239
238
|
}
|
|
240
239
|
|
|
241
240
|
type ResponseStyle$1 = 'data' | 'fields';
|
|
@@ -418,19 +417,18 @@ type ErrInterceptor$1<Err, Res, Req, Options> = (error: Err, response: Res, requ
|
|
|
418
417
|
type ReqInterceptor$1<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
419
418
|
type ResInterceptor$1<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
420
419
|
declare class Interceptors$1<Interceptor> {
|
|
421
|
-
|
|
422
|
-
constructor();
|
|
420
|
+
fns: Array<Interceptor | null>;
|
|
423
421
|
clear(): void;
|
|
424
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
425
|
-
exists(id: number | Interceptor): boolean;
|
|
426
422
|
eject(id: number | Interceptor): void;
|
|
427
|
-
|
|
423
|
+
exists(id: number | Interceptor): boolean;
|
|
424
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
425
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
428
426
|
use(fn: Interceptor): number;
|
|
429
427
|
}
|
|
430
428
|
interface Middleware$1<Req, Res, Err, Options> {
|
|
431
|
-
error:
|
|
432
|
-
request:
|
|
433
|
-
response:
|
|
429
|
+
error: Interceptors$1<ErrInterceptor$1<Err, Res, Req, Options>>;
|
|
430
|
+
request: Interceptors$1<ReqInterceptor$1<Req, Options>>;
|
|
431
|
+
response: Interceptors$1<ResInterceptor$1<Res, Req, Options>>;
|
|
434
432
|
}
|
|
435
433
|
|
|
436
434
|
type ResponseStyle = 'data' | 'fields';
|
|
@@ -541,19 +539,18 @@ type ErrInterceptor<Err, Res, Options> = (error: Err, response: Res, options: Op
|
|
|
541
539
|
type ReqInterceptor<Options> = (options: Options) => void | Promise<void>;
|
|
542
540
|
type ResInterceptor<Res, Options> = (response: Res, options: Options) => Res | Promise<Res>;
|
|
543
541
|
declare class Interceptors<Interceptor> {
|
|
544
|
-
|
|
545
|
-
constructor();
|
|
542
|
+
fns: Array<Interceptor | null>;
|
|
546
543
|
clear(): void;
|
|
547
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
548
|
-
exists(id: number | Interceptor): boolean;
|
|
549
544
|
eject(id: number | Interceptor): void;
|
|
550
|
-
|
|
545
|
+
exists(id: number | Interceptor): boolean;
|
|
546
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
547
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
551
548
|
use(fn: Interceptor): number;
|
|
552
549
|
}
|
|
553
550
|
interface Middleware<Res, Err, Options> {
|
|
554
|
-
error:
|
|
555
|
-
request:
|
|
556
|
-
response:
|
|
551
|
+
error: Interceptors<ErrInterceptor<Err, Res, Options>>;
|
|
552
|
+
request: Interceptors<ReqInterceptor<Options>>;
|
|
553
|
+
response: Interceptors<ResInterceptor<Res, Options>>;
|
|
557
554
|
}
|
|
558
555
|
|
|
559
556
|
interface Config$1<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$5 {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$6, c as IR } from './types.d-
|
|
2
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-
|
|
1
|
+
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$6, c as IR } from './types.d-CRtO-Prt.js';
|
|
2
|
+
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-CRtO-Prt.js';
|
|
3
3
|
import { HttpHeaders, HttpClient, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
|
4
4
|
import { Injector } from '@angular/core';
|
|
5
5
|
import { CreateAxiosDefaults, AxiosStatic, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios';
|
|
@@ -223,19 +223,18 @@ type ErrInterceptor$2<Err, Res, Req, Options> = (error: Err, response: Res, requ
|
|
|
223
223
|
type ReqInterceptor$2<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
224
224
|
type ResInterceptor$2<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
225
225
|
declare class Interceptors$2<Interceptor> {
|
|
226
|
-
|
|
227
|
-
constructor();
|
|
226
|
+
fns: Array<Interceptor | null>;
|
|
228
227
|
clear(): void;
|
|
229
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
230
|
-
exists(id: number | Interceptor): boolean;
|
|
231
228
|
eject(id: number | Interceptor): void;
|
|
232
|
-
|
|
229
|
+
exists(id: number | Interceptor): boolean;
|
|
230
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
231
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
233
232
|
use(fn: Interceptor): number;
|
|
234
233
|
}
|
|
235
234
|
interface Middleware$2<Req, Res, Err, Options> {
|
|
236
|
-
error:
|
|
237
|
-
request:
|
|
238
|
-
response:
|
|
235
|
+
error: Interceptors$2<ErrInterceptor$2<Err, Res, Req, Options>>;
|
|
236
|
+
request: Interceptors$2<ReqInterceptor$2<Req, Options>>;
|
|
237
|
+
response: Interceptors$2<ResInterceptor$2<Res, Req, Options>>;
|
|
239
238
|
}
|
|
240
239
|
|
|
241
240
|
type ResponseStyle$1 = 'data' | 'fields';
|
|
@@ -418,19 +417,18 @@ type ErrInterceptor$1<Err, Res, Req, Options> = (error: Err, response: Res, requ
|
|
|
418
417
|
type ReqInterceptor$1<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
419
418
|
type ResInterceptor$1<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
420
419
|
declare class Interceptors$1<Interceptor> {
|
|
421
|
-
|
|
422
|
-
constructor();
|
|
420
|
+
fns: Array<Interceptor | null>;
|
|
423
421
|
clear(): void;
|
|
424
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
425
|
-
exists(id: number | Interceptor): boolean;
|
|
426
422
|
eject(id: number | Interceptor): void;
|
|
427
|
-
|
|
423
|
+
exists(id: number | Interceptor): boolean;
|
|
424
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
425
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
428
426
|
use(fn: Interceptor): number;
|
|
429
427
|
}
|
|
430
428
|
interface Middleware$1<Req, Res, Err, Options> {
|
|
431
|
-
error:
|
|
432
|
-
request:
|
|
433
|
-
response:
|
|
429
|
+
error: Interceptors$1<ErrInterceptor$1<Err, Res, Req, Options>>;
|
|
430
|
+
request: Interceptors$1<ReqInterceptor$1<Req, Options>>;
|
|
431
|
+
response: Interceptors$1<ResInterceptor$1<Res, Req, Options>>;
|
|
434
432
|
}
|
|
435
433
|
|
|
436
434
|
type ResponseStyle = 'data' | 'fields';
|
|
@@ -541,19 +539,18 @@ type ErrInterceptor<Err, Res, Options> = (error: Err, response: Res, options: Op
|
|
|
541
539
|
type ReqInterceptor<Options> = (options: Options) => void | Promise<void>;
|
|
542
540
|
type ResInterceptor<Res, Options> = (response: Res, options: Options) => Res | Promise<Res>;
|
|
543
541
|
declare class Interceptors<Interceptor> {
|
|
544
|
-
|
|
545
|
-
constructor();
|
|
542
|
+
fns: Array<Interceptor | null>;
|
|
546
543
|
clear(): void;
|
|
547
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
548
|
-
exists(id: number | Interceptor): boolean;
|
|
549
544
|
eject(id: number | Interceptor): void;
|
|
550
|
-
|
|
545
|
+
exists(id: number | Interceptor): boolean;
|
|
546
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
547
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
551
548
|
use(fn: Interceptor): number;
|
|
552
549
|
}
|
|
553
550
|
interface Middleware<Res, Err, Options> {
|
|
554
|
-
error:
|
|
555
|
-
request:
|
|
556
|
-
response:
|
|
551
|
+
error: Interceptors<ErrInterceptor<Err, Res, Options>>;
|
|
552
|
+
request: Interceptors<ReqInterceptor<Options>>;
|
|
553
|
+
response: Interceptors<ResInterceptor<Res, Options>>;
|
|
557
554
|
}
|
|
558
555
|
|
|
559
556
|
interface Config$1<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$5 {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {createRequire}from'module';import {b,a,c,w,K,r,i,k,l,j,h,L,o,p as p$1,F,E,n,A,g,e,d,m,y,u,x as x$1,q,B as B$1,C,D,f,z}from'./chunk-
|
|
1
|
+
import {createRequire}from'module';import {b,a,c,w,K,r,i,k,l,j,h,L,o,p as p$1,F,E,n,A,g,e,d,m,y,u,x as x$1,q,B as B$1,C,D,f,z}from'./chunk-3AYBIZLR.js';export{G as clientDefaultConfig,H as clientDefaultMeta,I as clientPluginHandler,v as compiler,s as defaultPaginationKeywords,J as defaultPlugins,t as definePluginConfig,u as tsc}from'./chunk-3AYBIZLR.js';import b$1 from'ansi-colors';import yr from'color-support';import x from'node:path';import R from'node:fs';import kt from'typescript';import p from'handlebars';createRequire(import.meta.url);
|
|
2
2
|
var $e=b((io,je)=>{je.exports=Be;Be.sync=St;var De=a("fs");function wt(e,n){var o=n.pathExt!==void 0?n.pathExt:process.env.PATHEXT;if(!o||(o=o.split(";"),o.indexOf("")!==-1))return true;for(var r=0;r<o.length;r++){var t=o[r].toLowerCase();if(t&&e.substr(-t.length).toLowerCase()===t)return true}return false}function Ie(e,n,o){return !e.isSymbolicLink()&&!e.isFile()?false:wt(n,o)}function Be(e,n,o){De.stat(e,function(r,t){o(r,r?false:Ie(t,e,n));});}function St(e,n){return Ie(De.statSync(e),e,n)}});var We=b((ao,Le)=>{Le.exports=Fe;Fe.sync=Ot;var Ne=a("fs");function Fe(e,n,o){Ne.stat(e,function(r,t){o(r,r?false:_e(t,n));});}function Ot(e,n){return _e(Ne.statSync(e),n)}function _e(e,n){return e.isFile()&&Ht(e,n)}function Ht(e,n){var o=e.mode,r=e.uid,t=e.gid,s=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),a=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),i=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),c=i|u,f=o&l||o&u&&t===a||o&i&&r===s||o&c&&s===0;return f}});var Ue=b((uo,Me)=>{a("fs");var M;process.platform==="win32"||global.TESTING_WINDOWS?M=$e():M=We();Me.exports=X;X.sync=Dt;function X(e,n,o){if(typeof n=="function"&&(o=n,n={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,t){X(e,n||{},function(s,a){s?t(s):r(a);});})}M(e,n||{},function(r,t){r&&(r.code==="EACCES"||n&&n.ignoreErrors)&&(r=null,t=false),o(r,t);});}function Dt(e,n){try{return M.sync(e,n||{})}catch(o){if(n&&n.ignoreErrors||o.code==="EACCES")return false;throw o}}});var Je=b((po,Qe)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Ve=a("path"),It=H?";":":",Ge=Ue(),ze=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ke=(e,n)=>{let o=n.colon||It,r=e.match(/\//)||H&&e.match(/\\/)?[""]:[...H?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(o)],t=H?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=H?t.split(o):[""];return H&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:t}},Xe=(e,n,o)=>{typeof n=="function"&&(o=n,n={}),n||(n={});let{pathEnv:r,pathExt:t,pathExtExe:s}=Ke(e,n),a=[],i=l=>new Promise((c,f)=>{if(l===r.length)return n.all&&a.length?c(a):f(ze(e));let m=r[l],d=/^".*"$/.test(m)?m.slice(1,-1):m,y=Ve.join(d,e),q=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+y:y;c(u(q,l,0));}),u=(l,c,f)=>new Promise((m,d)=>{if(f===t.length)return m(i(c+1));let y=t[f];Ge(l+y,{pathExt:s},(q,k)=>{if(!q&&k)if(n.all)a.push(l+y);else return m(l+y);return m(u(l,c,f+1))});});return o?i(0).then(l=>o(null,l),o):i(0)},Bt=(e,n)=>{n=n||{};let{pathEnv:o,pathExt:r,pathExtExe:t}=Ke(e,n),s=[];for(let a=0;a<o.length;a++){let i=o[a],u=/^".*"$/.test(i)?i.slice(1,-1):i,l=Ve.join(u,e),c=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let f=0;f<r.length;f++){let m=c+r[f];try{if(Ge.sync(m,{pathExt:t}))if(n.all)s.push(m);else return m}catch{}}}if(n.all&&s.length)return s;if(n.nothrow)return null;throw ze(e)};Qe.exports=Xe;Xe.sync=Bt;});var Ze=b((co,Q)=>{var Ye=(e={})=>{let n=e.env||process.env;return (e.platform||process.platform)!=="win32"?"PATH":Object.keys(n).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};Q.exports=Ye;Q.exports.default=Ye;});var rn=b((fo,tn)=>{var en=a("path"),jt=Je(),$t=Ze();function nn(e,n){let o=e.options.env||process.env,r=process.cwd(),t=e.options.cwd!=null,s=t&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd);}catch{}let a;try{a=jt.sync(e.command,{path:o[$t({env:o})],pathExt:n?en.delimiter:void 0});}catch{}finally{s&&process.chdir(r);}return a&&(a=en.resolve(t?e.options.cwd:"",a)),a}function Nt(e){return nn(e)||nn(e,true)}tn.exports=Nt;});var on=b((mo,Y)=>{var J=/([()\][%!^"`<>&|;, *?])/g;function Ft(e){return e=e.replace(J,"^$1"),e}function _t(e,n){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(J,"^$1"),n&&(e=e.replace(J,"^$1")),e}Y.exports.command=Ft;Y.exports.argument=_t;});var an=b((go,sn)=>{sn.exports=/^#!(.*)/;});var un=b((yo,ln)=>{var Lt=an();ln.exports=(e="")=>{let n=e.match(Lt);if(!n)return null;let[o,r]=n[0].replace(/#! ?/,"").split(" "),t=o.split("/").pop();return t==="env"?r:r?`${t} ${r}`:t};});var cn=b((ho,pn)=>{var Z=a("fs"),Wt=un();function Mt(e){let o=Buffer.alloc(150),r;try{r=Z.openSync(e,"r"),Z.readSync(r,o,0,150,0),Z.closeSync(r);}catch{}return Wt(o.toString())}pn.exports=Mt;});var gn=b((vo,dn)=>{var Ut=a("path"),fn=rn(),mn=on(),Vt=cn(),Gt=process.platform==="win32",zt=/\.(?:com|exe)$/i,Kt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Xt(e){e.file=fn(e);let n=e.file&&Vt(e.file);return n?(e.args.unshift(e.file),e.command=n,fn(e)):e.file}function Qt(e){if(!Gt)return e;let n=Xt(e),o=!zt.test(n);if(e.options.forceShell||o){let r=Kt.test(n);e.command=Ut.normalize(e.command),e.command=mn.command(e.command),e.args=e.args.map(s=>mn.argument(s,r));let t=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${t}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=true;}return e}function Jt(e,n,o){n&&!Array.isArray(n)&&(o=n,n=null),n=n?n.slice(0):[],o=Object.assign({},o);let r={command:e,args:n,options:o,file:void 0,original:{command:e,args:n}};return o.shell?r:Qt(r)}dn.exports=Jt;});var vn=b((Ro,hn)=>{var ee=process.platform==="win32";function ne(e,n){return Object.assign(new Error(`${n} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${n} ${e.command}`,path:e.command,spawnargs:e.args})}function Yt(e,n){if(!ee)return;let o=e.emit;e.emit=function(r,t){if(r==="exit"){let s=yn(t,n);if(s)return o.call(e,"error",s)}return o.apply(e,arguments)};}function yn(e,n){return ee&&e===1&&!n.file?ne(n.original,"spawn"):null}function Zt(e,n){return ee&&e===1&&!n.file?ne(n.original,"spawnSync"):null}hn.exports={hookChildProcess:Yt,verifyENOENT:yn,verifyENOENTSync:Zt,notFoundError:ne};});var Pn=b((xo,D)=>{var Rn=a("child_process"),te=gn(),re=vn();function xn(e,n,o){let r=te(e,n,o),t=Rn.spawn(r.command,r.args,r.options);return re.hookChildProcess(t,r),t}function er(e,n,o){let r=te(e,n,o),t=Rn.spawnSync(r.command,r.args,r.options);return t.error=t.error||re.verifyENOENTSync(t.status,r),t}D.exports=xn;D.exports.spawn=xn;D.exports.sync=er;D.exports._parse=te;D.exports._enoent=re;});var Ae=()=>{if(typeof Bun<"u"){let[e]=Bun.version.split(".").map(Number);if(e<1)throw new h(`Unsupported Bun version ${Bun.version}. Please use Bun 1.0.0 or newer.`)}else if(typeof process<"u"&&process.versions?.node){let[e]=process.versions.node.split(".").map(Number);if(e<18)throw new h(`Unsupported Node version ${process.versions.node}. Please use Node 18 or newer.`)}};var W=e=>{switch(e){case "legacy/angular":return "AngularHttpRequest";case "legacy/axios":return "AxiosHttpRequest";case "legacy/fetch":return "FetchHttpRequest";case "legacy/node":return "NodeHttpRequest";case "legacy/xhr":return "XHRHttpRequest";default:return ""}};var Te=async(e,n$1,o,r)=>{let t=n(),s=m(t),a=r.client({$config:t,...o,httpRequest:W(s.name),models:D(o.models),services:D(o.services)});p$1(t)&&(f(n$1),R.writeFileSync(x.resolve(n$1,`${p$1(t)}.ts`),a));};var Ee=async(e,n$1,o)=>{let r=n();if(r.exportCore){let t=m(r),s={httpRequest:W(t.name),server:r.base!==void 0?r.base:n$1.server,version:n$1.version};if(R.rmSync(x.resolve(e),{force:true,recursive:true}),R.mkdirSync(x.resolve(e),{recursive:true}),await R.writeFileSync(x.resolve(e,"OpenAPI.ts"),o.core.settings({$config:r,...s})),await R.writeFileSync(x.resolve(e,"ApiError.ts"),o.core.apiError({$config:r,...s})),await R.writeFileSync(x.resolve(e,"ApiRequestOptions.ts"),o.core.apiRequestOptions({$config:r,...s})),await R.writeFileSync(x.resolve(e,"ApiResult.ts"),o.core.apiResult({$config:r,...s})),t.name!=="legacy/angular"&&await R.writeFileSync(x.resolve(e,"CancelablePromise.ts"),o.core.cancelablePromise({$config:r,...s})),await R.writeFileSync(x.resolve(e,"request.ts"),o.core.request({$config:r,...s})),p$1(r)&&(await R.writeFileSync(x.resolve(e,"BaseHttpRequest.ts"),o.core.baseHttpRequest({$config:r,...s})),await R.writeFileSync(x.resolve(e,`${s.httpRequest}.ts`),o.core.httpRequest({$config:r,...s}))),r.request){let a=x.resolve(process.cwd(),r.request);if(!await R.existsSync(a))throw new Error(`Custom request file "${a}" does not exists`);await R.copyFileSync(a,x.resolve(e,"request.ts"));}}};var ke=({files:e})=>{let n$1=n();e.index=new x$1({dir:n$1.output.path,id:"index",name:"index.ts"}),p$1(n$1)&&e.index.add(u.exportNamedDeclaration({exports:p$1(n$1),module:`./${p$1(n$1)}`})),n$1.exportCore&&(e.index.add(u.exportNamedDeclaration({exports:"ApiError",module:"./core/ApiError"})),n$1.plugins["@hey-api/sdk"]?.config.response==="response"&&e.index.add(u.exportNamedDeclaration({exports:{asType:true,name:"ApiResult"},module:"./core/ApiResult"})),p$1(n$1)&&e.index.add(u.exportNamedDeclaration({exports:"BaseHttpRequest",module:"./core/BaseHttpRequest"})),m(n$1).name!=="legacy/angular"&&e.index.add(u.exportNamedDeclaration({exports:["CancelablePromise","CancelError"],module:"./core/CancelablePromise"})),e.index.add(u.exportNamedDeclaration({exports:["OpenAPI",{asType:true,name:"OpenAPIConfig"}],module:"./core/OpenAPI"}))),Object.keys(e).sort().forEach(o=>{let r=e[o];o==="index"||r.isEmpty()||r.exportFromIndex&&e.index.add(u.exportAllDeclaration({module:`./${r.nameWithoutExtension()}`}));});};var we=async({client:e$1,openApi:n$1,templates:o$1})=>{let r=n(),t=n$1;if(e$1){if(r.plugins["@hey-api/sdk"]?.config.include&&r.plugins["@hey-api/sdk"].config.asClass){let l=new RegExp(r.plugins["@hey-api/sdk"].config.include);e$1.services=e$1.services.filter(c=>l.test(c.name));}if(r.plugins["@hey-api/typescript"]?.config.include){let l=new RegExp(r.plugins["@hey-api/typescript"].config.include);e$1.models=e$1.models.filter(c=>l.test(c.name));}}let s=x.resolve(r.output.path);r.output.clean&&g(s);let a=e(d(r.output.tsConfigPath)),i=m(r);!o(r)&&"bundle"in i.config&&i.config.bundle&&y({legacy:true,outputPath:s,plugin:i,tsConfig:a}),await Te(t,s,e$1,o$1),await Ee(x.resolve(r.output.path,"core"),e$1,o$1);let u={};for(let l of r.pluginOrder){let c=r.plugins[l],f=(c.output??"").split("/"),m=x.resolve(r.output.path,...f.slice(0,f.length-1));u[c.name]=new x$1({dir:m,id:`legacy-unused-${c.name}`,name:`${f[f.length-1]}.ts`}),c.handlerLegacy?.({client:e$1,files:u,openApi:t,plugin:c});}ke({files:u}),Object.entries(u).forEach(([l,c])=>{r.dryRun||(l==="index"?c.write(`
|
|
3
3
|
`,a):c.write(`
|
|
4
4
|
|