orval 6.30.1 → 6.31.0
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/README.md +1 -0
- package/dist/bin/orval.js +100 -92
- package/dist/bin/orval.js.map +1 -1
- package/dist/index.js +100 -92
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -3823,7 +3823,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3823
3823
|
var package_default = {
|
|
3824
3824
|
name: "orval",
|
|
3825
3825
|
description: "A swagger client generator for typescript",
|
|
3826
|
-
version: "6.
|
|
3826
|
+
version: "6.31.0",
|
|
3827
3827
|
license: "MIT",
|
|
3828
3828
|
files: [
|
|
3829
3829
|
"dist"
|
|
@@ -3877,15 +3877,15 @@ var package_default = {
|
|
|
3877
3877
|
},
|
|
3878
3878
|
dependencies: {
|
|
3879
3879
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
3880
|
-
"@orval/angular": "6.
|
|
3881
|
-
"@orval/axios": "6.
|
|
3882
|
-
"@orval/core": "6.
|
|
3883
|
-
"@orval/fetch": "6.
|
|
3884
|
-
"@orval/hono": "6.
|
|
3885
|
-
"@orval/mock": "6.
|
|
3886
|
-
"@orval/query": "6.
|
|
3887
|
-
"@orval/swr": "6.
|
|
3888
|
-
"@orval/zod": "6.
|
|
3880
|
+
"@orval/angular": "6.31.0",
|
|
3881
|
+
"@orval/axios": "6.31.0",
|
|
3882
|
+
"@orval/core": "6.31.0",
|
|
3883
|
+
"@orval/fetch": "6.31.0",
|
|
3884
|
+
"@orval/hono": "6.31.0",
|
|
3885
|
+
"@orval/mock": "6.31.0",
|
|
3886
|
+
"@orval/query": "6.31.0",
|
|
3887
|
+
"@orval/swr": "6.31.0",
|
|
3888
|
+
"@orval/zod": "6.31.0",
|
|
3889
3889
|
ajv: "^8.12.0",
|
|
3890
3890
|
cac: "^6.7.14",
|
|
3891
3891
|
chalk: "^4.1.2",
|
|
@@ -4113,7 +4113,7 @@ function defineConfig(options) {
|
|
|
4113
4113
|
return options;
|
|
4114
4114
|
}
|
|
4115
4115
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
4116
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab
|
|
4116
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab;
|
|
4117
4117
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
4118
4118
|
if (!options.input) {
|
|
4119
4119
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -4152,13 +4152,13 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4152
4152
|
}
|
|
4153
4153
|
const defaultFileExtension = ".ts";
|
|
4154
4154
|
const globalQueryOptions = {
|
|
4155
|
-
useQuery:
|
|
4156
|
-
useMutation:
|
|
4157
|
-
signal:
|
|
4158
|
-
shouldExportMutatorHooks:
|
|
4159
|
-
shouldExportHttpClient:
|
|
4160
|
-
shouldExportQueryKey:
|
|
4161
|
-
...normalizeQueryOptions((
|
|
4155
|
+
useQuery: true,
|
|
4156
|
+
useMutation: true,
|
|
4157
|
+
signal: true,
|
|
4158
|
+
shouldExportMutatorHooks: true,
|
|
4159
|
+
shouldExportHttpClient: true,
|
|
4160
|
+
shouldExportQueryKey: true,
|
|
4161
|
+
...normalizeQueryOptions((_b = outputOptions.override) == null ? void 0 : _b.query, workspace)
|
|
4162
4162
|
};
|
|
4163
4163
|
const normalizedOptions = {
|
|
4164
4164
|
input: {
|
|
@@ -4166,14 +4166,14 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4166
4166
|
validation: inputOptions.validation || false,
|
|
4167
4167
|
override: {
|
|
4168
4168
|
transformer: normalizePath(
|
|
4169
|
-
(
|
|
4169
|
+
(_c = inputOptions.override) == null ? void 0 : _c.transformer,
|
|
4170
4170
|
workspace
|
|
4171
4171
|
)
|
|
4172
4172
|
},
|
|
4173
|
-
converterOptions: (
|
|
4173
|
+
converterOptions: (_d = inputOptions.converterOptions) != null ? _d : {},
|
|
4174
4174
|
parserOptions: (0, import_core7.mergeDeep)(
|
|
4175
4175
|
parserDefaultOptions,
|
|
4176
|
-
(
|
|
4176
|
+
(_e = inputOptions.parserOptions) != null ? _e : {}
|
|
4177
4177
|
),
|
|
4178
4178
|
filters: inputOptions.filters
|
|
4179
4179
|
},
|
|
@@ -4182,35 +4182,35 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4182
4182
|
schemas: normalizePath(outputOptions.schemas, outputWorkspace),
|
|
4183
4183
|
fileExtension: outputOptions.fileExtension || defaultFileExtension,
|
|
4184
4184
|
workspace: outputOptions.workspace ? outputWorkspace : void 0,
|
|
4185
|
-
client: (
|
|
4186
|
-
mode: normalizeOutputMode((
|
|
4185
|
+
client: (_g = (_f = outputOptions.client) != null ? _f : client) != null ? _g : import_core7.OutputClient.AXIOS_FUNCTIONS,
|
|
4186
|
+
mode: normalizeOutputMode((_h = outputOptions.mode) != null ? _h : mode),
|
|
4187
4187
|
mock: mock2,
|
|
4188
|
-
clean: (
|
|
4189
|
-
prettier: (
|
|
4190
|
-
tslint: (
|
|
4191
|
-
biome: (
|
|
4188
|
+
clean: (_j = (_i = outputOptions.clean) != null ? _i : clean) != null ? _j : false,
|
|
4189
|
+
prettier: (_l = (_k = outputOptions.prettier) != null ? _k : prettier) != null ? _l : false,
|
|
4190
|
+
tslint: (_n = (_m = outputOptions.tslint) != null ? _m : tslint) != null ? _n : false,
|
|
4191
|
+
biome: (_p = (_o = outputOptions.biome) != null ? _o : biome) != null ? _p : false,
|
|
4192
4192
|
tsconfig,
|
|
4193
4193
|
packageJson,
|
|
4194
|
-
headers: (
|
|
4195
|
-
indexFiles: (
|
|
4194
|
+
headers: (_q = outputOptions.headers) != null ? _q : false,
|
|
4195
|
+
indexFiles: (_r = outputOptions.indexFiles) != null ? _r : true,
|
|
4196
4196
|
baseUrl: outputOptions.baseUrl,
|
|
4197
|
-
unionAddMissingProperties: (
|
|
4197
|
+
unionAddMissingProperties: (_s = outputOptions.unionAddMissingProperties) != null ? _s : false,
|
|
4198
4198
|
override: {
|
|
4199
4199
|
...outputOptions.override,
|
|
4200
4200
|
mock: {
|
|
4201
|
-
arrayMin: (
|
|
4202
|
-
arrayMax: (
|
|
4203
|
-
...(
|
|
4201
|
+
arrayMin: (_v = (_u = (_t = outputOptions.override) == null ? void 0 : _t.mock) == null ? void 0 : _u.arrayMin) != null ? _v : 1,
|
|
4202
|
+
arrayMax: (_y = (_x = (_w = outputOptions.override) == null ? void 0 : _w.mock) == null ? void 0 : _x.arrayMax) != null ? _y : 10,
|
|
4203
|
+
...(_A = (_z = outputOptions.override) == null ? void 0 : _z.mock) != null ? _A : {}
|
|
4204
4204
|
},
|
|
4205
4205
|
operations: normalizeOperationsAndTags(
|
|
4206
|
-
(
|
|
4206
|
+
(_C = (_B = outputOptions.override) == null ? void 0 : _B.operations) != null ? _C : {},
|
|
4207
4207
|
outputWorkspace,
|
|
4208
4208
|
{
|
|
4209
4209
|
query: globalQueryOptions
|
|
4210
4210
|
}
|
|
4211
4211
|
),
|
|
4212
4212
|
tags: normalizeOperationsAndTags(
|
|
4213
|
-
(
|
|
4213
|
+
(_E = (_D = outputOptions.override) == null ? void 0 : _D.tags) != null ? _E : {},
|
|
4214
4214
|
outputWorkspace,
|
|
4215
4215
|
{
|
|
4216
4216
|
query: globalQueryOptions
|
|
@@ -4218,113 +4218,106 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4218
4218
|
),
|
|
4219
4219
|
mutator: normalizeMutator(
|
|
4220
4220
|
outputWorkspace,
|
|
4221
|
-
(
|
|
4221
|
+
(_F = outputOptions.override) == null ? void 0 : _F.mutator
|
|
4222
4222
|
),
|
|
4223
|
-
formData: (
|
|
4223
|
+
formData: (_J = !(0, import_core7.isBoolean)((_G = outputOptions.override) == null ? void 0 : _G.formData) ? normalizeMutator(
|
|
4224
4224
|
outputWorkspace,
|
|
4225
|
-
(
|
|
4226
|
-
) : (
|
|
4227
|
-
formUrlEncoded: (
|
|
4225
|
+
(_H = outputOptions.override) == null ? void 0 : _H.formData
|
|
4226
|
+
) : (_I = outputOptions.override) == null ? void 0 : _I.formData) != null ? _J : true,
|
|
4227
|
+
formUrlEncoded: (_N = !(0, import_core7.isBoolean)((_K = outputOptions.override) == null ? void 0 : _K.formUrlEncoded) ? normalizeMutator(
|
|
4228
4228
|
outputWorkspace,
|
|
4229
|
-
(
|
|
4230
|
-
) : (
|
|
4229
|
+
(_L = outputOptions.override) == null ? void 0 : _L.formUrlEncoded
|
|
4230
|
+
) : (_M = outputOptions.override) == null ? void 0 : _M.formUrlEncoded) != null ? _N : true,
|
|
4231
4231
|
paramsSerializer: normalizeMutator(
|
|
4232
4232
|
outputWorkspace,
|
|
4233
|
-
(
|
|
4233
|
+
(_O = outputOptions.override) == null ? void 0 : _O.paramsSerializer
|
|
4234
4234
|
),
|
|
4235
|
-
header: ((
|
|
4236
|
-
requestOptions: (
|
|
4235
|
+
header: ((_P = outputOptions.override) == null ? void 0 : _P.header) === false ? false : (0, import_core7.isFunction)((_Q = outputOptions.override) == null ? void 0 : _Q.header) ? (_R = outputOptions.override) == null ? void 0 : _R.header : getDefaultFilesHeader,
|
|
4236
|
+
requestOptions: (_T = (_S = outputOptions.override) == null ? void 0 : _S.requestOptions) != null ? _T : true,
|
|
4237
4237
|
components: {
|
|
4238
4238
|
schemas: {
|
|
4239
4239
|
suffix: import_core7.RefComponentSuffix.schemas,
|
|
4240
|
-
itemSuffix: (
|
|
4241
|
-
...(
|
|
4240
|
+
itemSuffix: (_X = (_W = (_V = (_U = outputOptions.override) == null ? void 0 : _U.components) == null ? void 0 : _V.schemas) == null ? void 0 : _W.itemSuffix) != null ? _X : "Item",
|
|
4241
|
+
...(__ = (_Z = (_Y = outputOptions.override) == null ? void 0 : _Y.components) == null ? void 0 : _Z.schemas) != null ? __ : {}
|
|
4242
4242
|
},
|
|
4243
4243
|
responses: {
|
|
4244
4244
|
suffix: import_core7.RefComponentSuffix.responses,
|
|
4245
|
-
...(
|
|
4245
|
+
...(_ba = (_aa = (_$ = outputOptions.override) == null ? void 0 : _$.components) == null ? void 0 : _aa.responses) != null ? _ba : {}
|
|
4246
4246
|
},
|
|
4247
4247
|
parameters: {
|
|
4248
4248
|
suffix: import_core7.RefComponentSuffix.parameters,
|
|
4249
|
-
...(
|
|
4249
|
+
...(_ea = (_da = (_ca = outputOptions.override) == null ? void 0 : _ca.components) == null ? void 0 : _da.parameters) != null ? _ea : {}
|
|
4250
4250
|
},
|
|
4251
4251
|
requestBodies: {
|
|
4252
4252
|
suffix: import_core7.RefComponentSuffix.requestBodies,
|
|
4253
|
-
...(
|
|
4253
|
+
...(_ha = (_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.components) == null ? void 0 : _ga.requestBodies) != null ? _ha : {}
|
|
4254
4254
|
}
|
|
4255
4255
|
},
|
|
4256
|
-
hono: normalizeHonoOptions((
|
|
4257
|
-
query:
|
|
4258
|
-
useQuery: (_Da = (_Ca = (_Ba = outputOptions.override) == null ? void 0 : _Ba.query) == null ? void 0 : _Ca.useQuery) != null ? _Da : true,
|
|
4259
|
-
useMutation: (_Ga = (_Fa = (_Ea = outputOptions.override) == null ? void 0 : _Ea.query) == null ? void 0 : _Fa.useMutation) != null ? _Ga : true,
|
|
4260
|
-
signal: (_Ja = (_Ia = (_Ha = outputOptions.override) == null ? void 0 : _Ha.query) == null ? void 0 : _Ia.signal) != null ? _Ja : true,
|
|
4261
|
-
shouldExportMutatorHooks: (_Ma = (_La = (_Ka = outputOptions.override) == null ? void 0 : _Ka.query) == null ? void 0 : _La.shouldExportMutatorHooks) != null ? _Ma : true,
|
|
4262
|
-
shouldExportHttpClient: (_Pa = (_Oa = (_Na = outputOptions.override) == null ? void 0 : _Na.query) == null ? void 0 : _Oa.shouldExportHttpClient) != null ? _Pa : true,
|
|
4263
|
-
shouldExportQueryKey: (_Sa = (_Ra = (_Qa = outputOptions.override) == null ? void 0 : _Qa.query) == null ? void 0 : _Ra.shouldExportQueryKey) != null ? _Sa : true,
|
|
4264
|
-
...normalizeQueryOptions((_Ta = outputOptions.override) == null ? void 0 : _Ta.query, workspace)
|
|
4265
|
-
},
|
|
4256
|
+
hono: normalizeHonoOptions((_ia = outputOptions.override) == null ? void 0 : _ia.hono, workspace),
|
|
4257
|
+
query: globalQueryOptions,
|
|
4266
4258
|
zod: {
|
|
4267
4259
|
strict: {
|
|
4268
|
-
param: (
|
|
4269
|
-
query: (
|
|
4270
|
-
header: (
|
|
4271
|
-
body: (
|
|
4272
|
-
response: (
|
|
4260
|
+
param: (_ma = (_la = (_ka = (_ja = outputOptions.override) == null ? void 0 : _ja.zod) == null ? void 0 : _ka.strict) == null ? void 0 : _la.param) != null ? _ma : false,
|
|
4261
|
+
query: (_qa = (_pa = (_oa = (_na = outputOptions.override) == null ? void 0 : _na.zod) == null ? void 0 : _oa.strict) == null ? void 0 : _pa.query) != null ? _qa : false,
|
|
4262
|
+
header: (_ua = (_ta = (_sa = (_ra = outputOptions.override) == null ? void 0 : _ra.zod) == null ? void 0 : _sa.strict) == null ? void 0 : _ta.header) != null ? _ua : false,
|
|
4263
|
+
body: (_ya = (_xa = (_wa = (_va = outputOptions.override) == null ? void 0 : _va.zod) == null ? void 0 : _wa.strict) == null ? void 0 : _xa.body) != null ? _ya : false,
|
|
4264
|
+
response: (_Ca = (_Ba = (_Aa = (_za = outputOptions.override) == null ? void 0 : _za.zod) == null ? void 0 : _Aa.strict) == null ? void 0 : _Ba.response) != null ? _Ca : false
|
|
4273
4265
|
},
|
|
4274
4266
|
coerce: {
|
|
4275
|
-
param: (
|
|
4276
|
-
query: (
|
|
4277
|
-
header: (
|
|
4278
|
-
body: (
|
|
4279
|
-
response: (
|
|
4267
|
+
param: (_Ga = (_Fa = (_Ea = (_Da = outputOptions.override) == null ? void 0 : _Da.zod) == null ? void 0 : _Ea.coerce) == null ? void 0 : _Fa.param) != null ? _Ga : false,
|
|
4268
|
+
query: (_Ka = (_Ja = (_Ia = (_Ha = outputOptions.override) == null ? void 0 : _Ha.zod) == null ? void 0 : _Ia.coerce) == null ? void 0 : _Ja.query) != null ? _Ka : false,
|
|
4269
|
+
header: (_Oa = (_Na = (_Ma = (_La = outputOptions.override) == null ? void 0 : _La.zod) == null ? void 0 : _Ma.coerce) == null ? void 0 : _Na.header) != null ? _Oa : false,
|
|
4270
|
+
body: (_Sa = (_Ra = (_Qa = (_Pa = outputOptions.override) == null ? void 0 : _Pa.zod) == null ? void 0 : _Qa.coerce) == null ? void 0 : _Ra.body) != null ? _Sa : false,
|
|
4271
|
+
response: (_Wa = (_Va = (_Ua = (_Ta = outputOptions.override) == null ? void 0 : _Ta.zod) == null ? void 0 : _Ua.coerce) == null ? void 0 : _Va.response) != null ? _Wa : false
|
|
4280
4272
|
},
|
|
4281
4273
|
preprocess: {
|
|
4282
|
-
...((
|
|
4274
|
+
...((_Za = (_Ya = (_Xa = outputOptions.override) == null ? void 0 : _Xa.zod) == null ? void 0 : _Ya.preprocess) == null ? void 0 : _Za.param) ? {
|
|
4283
4275
|
param: normalizeMutator(
|
|
4284
4276
|
workspace,
|
|
4285
4277
|
outputOptions.override.zod.preprocess.param
|
|
4286
4278
|
)
|
|
4287
4279
|
} : {},
|
|
4288
|
-
...((
|
|
4280
|
+
...((_ab = (_$a = (__a = outputOptions.override) == null ? void 0 : __a.zod) == null ? void 0 : _$a.preprocess) == null ? void 0 : _ab.query) ? {
|
|
4289
4281
|
query: normalizeMutator(
|
|
4290
4282
|
workspace,
|
|
4291
4283
|
outputOptions.override.zod.preprocess.query
|
|
4292
4284
|
)
|
|
4293
4285
|
} : {},
|
|
4294
|
-
...((
|
|
4286
|
+
...((_db = (_cb = (_bb = outputOptions.override) == null ? void 0 : _bb.zod) == null ? void 0 : _cb.preprocess) == null ? void 0 : _db.header) ? {
|
|
4295
4287
|
header: normalizeMutator(
|
|
4296
4288
|
workspace,
|
|
4297
4289
|
outputOptions.override.zod.preprocess.header
|
|
4298
4290
|
)
|
|
4299
4291
|
} : {},
|
|
4300
|
-
...((
|
|
4292
|
+
...((_gb = (_fb = (_eb = outputOptions.override) == null ? void 0 : _eb.zod) == null ? void 0 : _fb.preprocess) == null ? void 0 : _gb.body) ? {
|
|
4301
4293
|
body: normalizeMutator(
|
|
4302
4294
|
workspace,
|
|
4303
4295
|
outputOptions.override.zod.preprocess.body
|
|
4304
4296
|
)
|
|
4305
4297
|
} : {},
|
|
4306
|
-
...((
|
|
4298
|
+
...((_jb = (_ib = (_hb = outputOptions.override) == null ? void 0 : _hb.zod) == null ? void 0 : _ib.preprocess) == null ? void 0 : _jb.response) ? {
|
|
4307
4299
|
response: normalizeMutator(
|
|
4308
4300
|
workspace,
|
|
4309
4301
|
outputOptions.override.zod.preprocess.response
|
|
4310
4302
|
)
|
|
4311
4303
|
} : {}
|
|
4312
|
-
}
|
|
4304
|
+
},
|
|
4305
|
+
generateEachHttpStatus: (_mb = (_lb = (_kb = outputOptions.override) == null ? void 0 : _kb.zod) == null ? void 0 : _lb.generateEachHttpStatus) != null ? _mb : false
|
|
4313
4306
|
},
|
|
4314
4307
|
swr: {
|
|
4315
|
-
...(
|
|
4308
|
+
...(_ob = (_nb = outputOptions.override) == null ? void 0 : _nb.swr) != null ? _ob : {}
|
|
4316
4309
|
},
|
|
4317
4310
|
angular: {
|
|
4318
|
-
provideIn: (
|
|
4311
|
+
provideIn: (_rb = (_qb = (_pb = outputOptions.override) == null ? void 0 : _pb.angular) == null ? void 0 : _qb.provideIn) != null ? _rb : "root"
|
|
4319
4312
|
},
|
|
4320
|
-
useDates: ((
|
|
4321
|
-
useDeprecatedOperations: (
|
|
4322
|
-
useNativeEnums: (
|
|
4323
|
-
suppressReadonlyModifier: ((
|
|
4313
|
+
useDates: ((_sb = outputOptions.override) == null ? void 0 : _sb.useDates) || false,
|
|
4314
|
+
useDeprecatedOperations: (_ub = (_tb = outputOptions.override) == null ? void 0 : _tb.useDeprecatedOperations) != null ? _ub : true,
|
|
4315
|
+
useNativeEnums: (_wb = (_vb = outputOptions.override) == null ? void 0 : _vb.useNativeEnums) != null ? _wb : false,
|
|
4316
|
+
suppressReadonlyModifier: ((_xb = outputOptions.override) == null ? void 0 : _xb.suppressReadonlyModifier) || false
|
|
4324
4317
|
},
|
|
4325
|
-
allParamsOptional: (
|
|
4326
|
-
urlEncodeParameters: (
|
|
4327
|
-
optionsParamRequired: (
|
|
4318
|
+
allParamsOptional: (_yb = outputOptions.allParamsOptional) != null ? _yb : false,
|
|
4319
|
+
urlEncodeParameters: (_zb = outputOptions.urlEncodeParameters) != null ? _zb : false,
|
|
4320
|
+
optionsParamRequired: (_Ab = outputOptions.optionsParamRequired) != null ? _Ab : false
|
|
4328
4321
|
},
|
|
4329
4322
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
4330
4323
|
};
|
|
@@ -4393,7 +4386,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
|
|
|
4393
4386
|
...rest
|
|
4394
4387
|
}
|
|
4395
4388
|
]) => {
|
|
4396
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
4389
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
4397
4390
|
return [
|
|
4398
4391
|
key,
|
|
4399
4392
|
{
|
|
@@ -4448,7 +4441,8 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
|
|
|
4448
4441
|
zod2.preprocess.response
|
|
4449
4442
|
)
|
|
4450
4443
|
} : {}
|
|
4451
|
-
}
|
|
4444
|
+
},
|
|
4445
|
+
generateEachHttpStatus: (_z = zod2 == null ? void 0 : zod2.generateEachHttpStatus) != null ? _z : false
|
|
4452
4446
|
}
|
|
4453
4447
|
} : {},
|
|
4454
4448
|
...transformer ? { transformer: normalizePath(transformer, workspace) } : {},
|
|
@@ -4516,7 +4510,6 @@ var normalizeHonoOptions = (hono2 = {}, workspace) => {
|
|
|
4516
4510
|
};
|
|
4517
4511
|
};
|
|
4518
4512
|
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
|
|
4519
|
-
var _a, _b, _c, _d;
|
|
4520
4513
|
if (queryOptions.options) {
|
|
4521
4514
|
console.warn(
|
|
4522
4515
|
"[WARN] Using query options is deprecated and will be removed in a future major release. Please use queryOptions or mutationOptions instead."
|
|
@@ -4555,10 +4548,22 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions =
|
|
|
4555
4548
|
queryOptions == null ? void 0 : queryOptions.mutationOptions
|
|
4556
4549
|
)
|
|
4557
4550
|
} : {},
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4551
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportQueryKey) ? {
|
|
4552
|
+
shouldExportQueryKey: globalOptions.shouldExportQueryKey
|
|
4553
|
+
} : {},
|
|
4554
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
|
|
4555
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportHttpClient) ? {
|
|
4556
|
+
shouldExportHttpClient: globalOptions.shouldExportHttpClient
|
|
4557
|
+
} : {},
|
|
4558
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
|
|
4559
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportMutatorHooks) ? {
|
|
4560
|
+
shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
|
|
4561
|
+
} : {},
|
|
4562
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
|
|
4563
|
+
...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
|
|
4564
|
+
signal: globalOptions.signal
|
|
4565
|
+
} : {},
|
|
4566
|
+
...!(0, import_core7.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
|
|
4562
4567
|
...!(0, import_core7.isUndefined)(globalOptions.version) ? {
|
|
4563
4568
|
version: globalOptions.version
|
|
4564
4569
|
} : {},
|
|
@@ -4656,6 +4661,7 @@ var getHeader = (option, info) => {
|
|
|
4656
4661
|
return Array.isArray(header) ? (0, import_core10.jsDoc)({ description: header }) : header;
|
|
4657
4662
|
};
|
|
4658
4663
|
var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
4664
|
+
var _a;
|
|
4659
4665
|
const { info = { title: "", version: 0 }, schemas, target } = builder;
|
|
4660
4666
|
const { output } = options;
|
|
4661
4667
|
const projectTitle = projectName || info.title;
|
|
@@ -4671,6 +4677,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
|
4671
4677
|
const header = getHeader(output.override.header, info);
|
|
4672
4678
|
if (output.schemas) {
|
|
4673
4679
|
const rootSchemaPath = output.schemas;
|
|
4680
|
+
const fileExtension = ["tags", "tags-split", "split"].includes(output.mode) ? ".ts" : (_a = output.fileExtension) != null ? _a : ".ts";
|
|
4674
4681
|
await Promise.all(
|
|
4675
4682
|
Object.entries(schemas).map(([specKey, schemas2]) => {
|
|
4676
4683
|
const schemaPath = !(0, import_core10.isRootKey)(specKey, target) ? import_core10.upath.join(rootSchemaPath, specsName[specKey]) : rootSchemaPath;
|
|
@@ -4678,6 +4685,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
|
4678
4685
|
schemaPath,
|
|
4679
4686
|
schemas: schemas2,
|
|
4680
4687
|
target,
|
|
4688
|
+
fileExtension,
|
|
4681
4689
|
specsName,
|
|
4682
4690
|
specKey,
|
|
4683
4691
|
isRootKey: (0, import_core10.isRootKey)(specKey, target),
|