orval 6.30.0 → 6.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/orval.js +114 -83
- package/dist/bin/orval.js.map +1 -1
- package/dist/index.js +114 -83
- 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.30.
|
|
3826
|
+
version: "6.30.2",
|
|
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.30.
|
|
3881
|
-
"@orval/axios": "6.30.
|
|
3882
|
-
"@orval/core": "6.30.
|
|
3883
|
-
"@orval/fetch": "6.30.
|
|
3884
|
-
"@orval/hono": "6.30.
|
|
3885
|
-
"@orval/mock": "6.30.
|
|
3886
|
-
"@orval/query": "6.30.
|
|
3887
|
-
"@orval/swr": "6.30.
|
|
3888
|
-
"@orval/zod": "6.30.
|
|
3880
|
+
"@orval/angular": "6.30.2",
|
|
3881
|
+
"@orval/axios": "6.30.2",
|
|
3882
|
+
"@orval/core": "6.30.2",
|
|
3883
|
+
"@orval/fetch": "6.30.2",
|
|
3884
|
+
"@orval/hono": "6.30.2",
|
|
3885
|
+
"@orval/mock": "6.30.2",
|
|
3886
|
+
"@orval/query": "6.30.2",
|
|
3887
|
+
"@orval/swr": "6.30.2",
|
|
3888
|
+
"@orval/zod": "6.30.2",
|
|
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
|
|
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;
|
|
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`));
|
|
@@ -4151,20 +4151,29 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4151
4151
|
};
|
|
4152
4152
|
}
|
|
4153
4153
|
const defaultFileExtension = ".ts";
|
|
4154
|
+
const globalQueryOptions = {
|
|
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
|
+
};
|
|
4154
4163
|
const normalizedOptions = {
|
|
4155
4164
|
input: {
|
|
4156
4165
|
target: globalOptions.input ? normalizePathOrUrl(globalOptions.input, process.cwd()) : normalizePathOrUrl(inputOptions.target, workspace),
|
|
4157
4166
|
validation: inputOptions.validation || false,
|
|
4158
4167
|
override: {
|
|
4159
4168
|
transformer: normalizePath(
|
|
4160
|
-
(
|
|
4169
|
+
(_c = inputOptions.override) == null ? void 0 : _c.transformer,
|
|
4161
4170
|
workspace
|
|
4162
4171
|
)
|
|
4163
4172
|
},
|
|
4164
|
-
converterOptions: (
|
|
4173
|
+
converterOptions: (_d = inputOptions.converterOptions) != null ? _d : {},
|
|
4165
4174
|
parserOptions: (0, import_core7.mergeDeep)(
|
|
4166
4175
|
parserDefaultOptions,
|
|
4167
|
-
(
|
|
4176
|
+
(_e = inputOptions.parserOptions) != null ? _e : {}
|
|
4168
4177
|
),
|
|
4169
4178
|
filters: inputOptions.filters
|
|
4170
4179
|
},
|
|
@@ -4173,122 +4182,120 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4173
4182
|
schemas: normalizePath(outputOptions.schemas, outputWorkspace),
|
|
4174
4183
|
fileExtension: outputOptions.fileExtension || defaultFileExtension,
|
|
4175
4184
|
workspace: outputOptions.workspace ? outputWorkspace : void 0,
|
|
4176
|
-
client: (
|
|
4177
|
-
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),
|
|
4178
4187
|
mock: mock2,
|
|
4179
|
-
clean: (
|
|
4180
|
-
prettier: (
|
|
4181
|
-
tslint: (
|
|
4182
|
-
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,
|
|
4183
4192
|
tsconfig,
|
|
4184
4193
|
packageJson,
|
|
4185
|
-
headers: (
|
|
4186
|
-
indexFiles: (
|
|
4194
|
+
headers: (_q = outputOptions.headers) != null ? _q : false,
|
|
4195
|
+
indexFiles: (_r = outputOptions.indexFiles) != null ? _r : true,
|
|
4187
4196
|
baseUrl: outputOptions.baseUrl,
|
|
4188
|
-
unionAddMissingProperties: (
|
|
4197
|
+
unionAddMissingProperties: (_s = outputOptions.unionAddMissingProperties) != null ? _s : false,
|
|
4189
4198
|
override: {
|
|
4190
4199
|
...outputOptions.override,
|
|
4191
4200
|
mock: {
|
|
4192
|
-
arrayMin: (
|
|
4193
|
-
arrayMax: (
|
|
4194
|
-
...(
|
|
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 : {}
|
|
4195
4204
|
},
|
|
4196
4205
|
operations: normalizeOperationsAndTags(
|
|
4197
|
-
(
|
|
4198
|
-
outputWorkspace
|
|
4206
|
+
(_C = (_B = outputOptions.override) == null ? void 0 : _B.operations) != null ? _C : {},
|
|
4207
|
+
outputWorkspace,
|
|
4208
|
+
{
|
|
4209
|
+
query: globalQueryOptions
|
|
4210
|
+
}
|
|
4199
4211
|
),
|
|
4200
4212
|
tags: normalizeOperationsAndTags(
|
|
4201
|
-
(
|
|
4202
|
-
outputWorkspace
|
|
4213
|
+
(_E = (_D = outputOptions.override) == null ? void 0 : _D.tags) != null ? _E : {},
|
|
4214
|
+
outputWorkspace,
|
|
4215
|
+
{
|
|
4216
|
+
query: globalQueryOptions
|
|
4217
|
+
}
|
|
4203
4218
|
),
|
|
4204
4219
|
mutator: normalizeMutator(
|
|
4205
4220
|
outputWorkspace,
|
|
4206
|
-
(
|
|
4221
|
+
(_F = outputOptions.override) == null ? void 0 : _F.mutator
|
|
4207
4222
|
),
|
|
4208
|
-
formData: (
|
|
4223
|
+
formData: (_J = !(0, import_core7.isBoolean)((_G = outputOptions.override) == null ? void 0 : _G.formData) ? normalizeMutator(
|
|
4209
4224
|
outputWorkspace,
|
|
4210
|
-
(
|
|
4211
|
-
) : (
|
|
4212
|
-
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(
|
|
4213
4228
|
outputWorkspace,
|
|
4214
|
-
(
|
|
4215
|
-
) : (
|
|
4229
|
+
(_L = outputOptions.override) == null ? void 0 : _L.formUrlEncoded
|
|
4230
|
+
) : (_M = outputOptions.override) == null ? void 0 : _M.formUrlEncoded) != null ? _N : true,
|
|
4216
4231
|
paramsSerializer: normalizeMutator(
|
|
4217
4232
|
outputWorkspace,
|
|
4218
|
-
(
|
|
4233
|
+
(_O = outputOptions.override) == null ? void 0 : _O.paramsSerializer
|
|
4219
4234
|
),
|
|
4220
|
-
header: ((
|
|
4221
|
-
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,
|
|
4222
4237
|
components: {
|
|
4223
4238
|
schemas: {
|
|
4224
4239
|
suffix: import_core7.RefComponentSuffix.schemas,
|
|
4225
|
-
itemSuffix: (
|
|
4226
|
-
...(
|
|
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 ? __ : {}
|
|
4227
4242
|
},
|
|
4228
4243
|
responses: {
|
|
4229
4244
|
suffix: import_core7.RefComponentSuffix.responses,
|
|
4230
|
-
...(
|
|
4245
|
+
...(_ba = (_aa = (_$ = outputOptions.override) == null ? void 0 : _$.components) == null ? void 0 : _aa.responses) != null ? _ba : {}
|
|
4231
4246
|
},
|
|
4232
4247
|
parameters: {
|
|
4233
4248
|
suffix: import_core7.RefComponentSuffix.parameters,
|
|
4234
|
-
...(
|
|
4249
|
+
...(_ea = (_da = (_ca = outputOptions.override) == null ? void 0 : _ca.components) == null ? void 0 : _da.parameters) != null ? _ea : {}
|
|
4235
4250
|
},
|
|
4236
4251
|
requestBodies: {
|
|
4237
4252
|
suffix: import_core7.RefComponentSuffix.requestBodies,
|
|
4238
|
-
...(
|
|
4253
|
+
...(_ha = (_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.components) == null ? void 0 : _ga.requestBodies) != null ? _ha : {}
|
|
4239
4254
|
}
|
|
4240
4255
|
},
|
|
4241
|
-
hono: normalizeHonoOptions((
|
|
4242
|
-
query:
|
|
4243
|
-
useQuery: (_ka = (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.query) == null ? void 0 : _ja.useQuery) != null ? _ka : true,
|
|
4244
|
-
useMutation: (_na = (_ma = (_la = outputOptions.override) == null ? void 0 : _la.query) == null ? void 0 : _ma.useMutation) != null ? _na : true,
|
|
4245
|
-
signal: (_qa = (_pa = (_oa = outputOptions.override) == null ? void 0 : _oa.query) == null ? void 0 : _pa.signal) != null ? _qa : true,
|
|
4246
|
-
shouldExportMutatorHooks: (_ta = (_sa = (_ra = outputOptions.override) == null ? void 0 : _ra.query) == null ? void 0 : _sa.shouldExportMutatorHooks) != null ? _ta : true,
|
|
4247
|
-
shouldExportHttpClient: (_wa = (_va = (_ua = outputOptions.override) == null ? void 0 : _ua.query) == null ? void 0 : _va.shouldExportHttpClient) != null ? _wa : true,
|
|
4248
|
-
shouldExportQueryKey: (_za = (_ya = (_xa = outputOptions.override) == null ? void 0 : _xa.query) == null ? void 0 : _ya.shouldExportQueryKey) != null ? _za : true,
|
|
4249
|
-
...normalizeQueryOptions((_Aa = outputOptions.override) == null ? void 0 : _Aa.query, workspace)
|
|
4250
|
-
},
|
|
4256
|
+
hono: normalizeHonoOptions((_ia = outputOptions.override) == null ? void 0 : _ia.hono, workspace),
|
|
4257
|
+
query: globalQueryOptions,
|
|
4251
4258
|
zod: {
|
|
4252
4259
|
strict: {
|
|
4253
|
-
param: (
|
|
4254
|
-
query: (
|
|
4255
|
-
header: (
|
|
4256
|
-
body: (
|
|
4257
|
-
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
|
|
4258
4265
|
},
|
|
4259
4266
|
coerce: {
|
|
4260
|
-
param: (
|
|
4261
|
-
query: (
|
|
4262
|
-
header: (
|
|
4263
|
-
body: (
|
|
4264
|
-
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
|
|
4265
4272
|
},
|
|
4266
4273
|
preprocess: {
|
|
4267
|
-
...((
|
|
4274
|
+
...((_Za = (_Ya = (_Xa = outputOptions.override) == null ? void 0 : _Xa.zod) == null ? void 0 : _Ya.preprocess) == null ? void 0 : _Za.param) ? {
|
|
4268
4275
|
param: normalizeMutator(
|
|
4269
4276
|
workspace,
|
|
4270
4277
|
outputOptions.override.zod.preprocess.param
|
|
4271
4278
|
)
|
|
4272
4279
|
} : {},
|
|
4273
|
-
...((
|
|
4280
|
+
...((_ab = (_$a = (__a = outputOptions.override) == null ? void 0 : __a.zod) == null ? void 0 : _$a.preprocess) == null ? void 0 : _ab.query) ? {
|
|
4274
4281
|
query: normalizeMutator(
|
|
4275
4282
|
workspace,
|
|
4276
4283
|
outputOptions.override.zod.preprocess.query
|
|
4277
4284
|
)
|
|
4278
4285
|
} : {},
|
|
4279
|
-
...((
|
|
4286
|
+
...((_db = (_cb = (_bb = outputOptions.override) == null ? void 0 : _bb.zod) == null ? void 0 : _cb.preprocess) == null ? void 0 : _db.header) ? {
|
|
4280
4287
|
header: normalizeMutator(
|
|
4281
4288
|
workspace,
|
|
4282
4289
|
outputOptions.override.zod.preprocess.header
|
|
4283
4290
|
)
|
|
4284
4291
|
} : {},
|
|
4285
|
-
...((
|
|
4292
|
+
...((_gb = (_fb = (_eb = outputOptions.override) == null ? void 0 : _eb.zod) == null ? void 0 : _fb.preprocess) == null ? void 0 : _gb.body) ? {
|
|
4286
4293
|
body: normalizeMutator(
|
|
4287
4294
|
workspace,
|
|
4288
4295
|
outputOptions.override.zod.preprocess.body
|
|
4289
4296
|
)
|
|
4290
4297
|
} : {},
|
|
4291
|
-
...((
|
|
4298
|
+
...((_jb = (_ib = (_hb = outputOptions.override) == null ? void 0 : _hb.zod) == null ? void 0 : _ib.preprocess) == null ? void 0 : _jb.response) ? {
|
|
4292
4299
|
response: normalizeMutator(
|
|
4293
4300
|
workspace,
|
|
4294
4301
|
outputOptions.override.zod.preprocess.response
|
|
@@ -4297,19 +4304,19 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4297
4304
|
}
|
|
4298
4305
|
},
|
|
4299
4306
|
swr: {
|
|
4300
|
-
...(
|
|
4307
|
+
...(_lb = (_kb = outputOptions.override) == null ? void 0 : _kb.swr) != null ? _lb : {}
|
|
4301
4308
|
},
|
|
4302
4309
|
angular: {
|
|
4303
|
-
provideIn: (
|
|
4310
|
+
provideIn: (_ob = (_nb = (_mb = outputOptions.override) == null ? void 0 : _mb.angular) == null ? void 0 : _nb.provideIn) != null ? _ob : "root"
|
|
4304
4311
|
},
|
|
4305
|
-
useDates: ((
|
|
4306
|
-
useDeprecatedOperations: (
|
|
4307
|
-
useNativeEnums: (
|
|
4308
|
-
suppressReadonlyModifier: ((
|
|
4312
|
+
useDates: ((_pb = outputOptions.override) == null ? void 0 : _pb.useDates) || false,
|
|
4313
|
+
useDeprecatedOperations: (_rb = (_qb = outputOptions.override) == null ? void 0 : _qb.useDeprecatedOperations) != null ? _rb : true,
|
|
4314
|
+
useNativeEnums: (_tb = (_sb = outputOptions.override) == null ? void 0 : _sb.useNativeEnums) != null ? _tb : false,
|
|
4315
|
+
suppressReadonlyModifier: ((_ub = outputOptions.override) == null ? void 0 : _ub.suppressReadonlyModifier) || false
|
|
4309
4316
|
},
|
|
4310
|
-
allParamsOptional: (
|
|
4311
|
-
urlEncodeParameters: (
|
|
4312
|
-
optionsParamRequired: (
|
|
4317
|
+
allParamsOptional: (_vb = outputOptions.allParamsOptional) != null ? _vb : false,
|
|
4318
|
+
urlEncodeParameters: (_wb = outputOptions.urlEncodeParameters) != null ? _wb : false,
|
|
4319
|
+
optionsParamRequired: (_xb = outputOptions.optionsParamRequired) != null ? _xb : false
|
|
4313
4320
|
},
|
|
4314
4321
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
4315
4322
|
};
|
|
@@ -4362,7 +4369,7 @@ var normalizePath = (path, workspace) => {
|
|
|
4362
4369
|
}
|
|
4363
4370
|
return import_core7.upath.resolve(workspace, path);
|
|
4364
4371
|
};
|
|
4365
|
-
var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
|
|
4372
|
+
var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
|
|
4366
4373
|
return Object.fromEntries(
|
|
4367
4374
|
Object.entries(operationsOrTags).map(
|
|
4368
4375
|
([
|
|
@@ -4384,7 +4391,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
|
|
|
4384
4391
|
{
|
|
4385
4392
|
...rest,
|
|
4386
4393
|
...query2 ? {
|
|
4387
|
-
query: normalizeQueryOptions(query2, workspace)
|
|
4394
|
+
query: normalizeQueryOptions(query2, workspace, global2.query)
|
|
4388
4395
|
} : {},
|
|
4389
4396
|
...zod2 ? {
|
|
4390
4397
|
zod: {
|
|
@@ -4500,7 +4507,7 @@ var normalizeHonoOptions = (hono2 = {}, workspace) => {
|
|
|
4500
4507
|
validator: (_a = hono2.validator) != null ? _a : true
|
|
4501
4508
|
};
|
|
4502
4509
|
};
|
|
4503
|
-
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
|
|
4510
|
+
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
|
|
4504
4511
|
if (queryOptions.options) {
|
|
4505
4512
|
console.warn(
|
|
4506
4513
|
"[WARN] Using query options is deprecated and will be removed in a future major release. Please use queryOptions or mutationOptions instead."
|
|
@@ -4515,25 +4522,49 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
|
|
|
4515
4522
|
...!(0, import_core7.isUndefined)(queryOptions.useSuspenseInfiniteQuery) ? { useSuspenseInfiniteQuery: queryOptions.useSuspenseInfiniteQuery } : {},
|
|
4516
4523
|
...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
|
|
4517
4524
|
...queryOptions.options ? { options: queryOptions.options } : {},
|
|
4525
|
+
...globalOptions.queryKey ? {
|
|
4526
|
+
queryKey: globalOptions.queryKey
|
|
4527
|
+
} : {},
|
|
4518
4528
|
...(queryOptions == null ? void 0 : queryOptions.queryKey) ? {
|
|
4519
4529
|
queryKey: normalizeMutator(outputWorkspace, queryOptions == null ? void 0 : queryOptions.queryKey)
|
|
4520
4530
|
} : {},
|
|
4531
|
+
...globalOptions.queryOptions ? {
|
|
4532
|
+
queryOptions: globalOptions.queryOptions
|
|
4533
|
+
} : {},
|
|
4521
4534
|
...(queryOptions == null ? void 0 : queryOptions.queryOptions) ? {
|
|
4522
4535
|
queryOptions: normalizeMutator(
|
|
4523
4536
|
outputWorkspace,
|
|
4524
4537
|
queryOptions == null ? void 0 : queryOptions.queryOptions
|
|
4525
4538
|
)
|
|
4526
4539
|
} : {},
|
|
4540
|
+
...globalOptions.mutationOptions ? {
|
|
4541
|
+
mutationOptions: globalOptions.mutationOptions
|
|
4542
|
+
} : {},
|
|
4527
4543
|
...(queryOptions == null ? void 0 : queryOptions.mutationOptions) ? {
|
|
4528
4544
|
mutationOptions: normalizeMutator(
|
|
4529
4545
|
outputWorkspace,
|
|
4530
4546
|
queryOptions == null ? void 0 : queryOptions.mutationOptions
|
|
4531
4547
|
)
|
|
4532
4548
|
} : {},
|
|
4533
|
-
...!(0, import_core7.isUndefined)(
|
|
4549
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportQueryKey) ? {
|
|
4550
|
+
shouldExportQueryKey: globalOptions.shouldExportQueryKey
|
|
4551
|
+
} : {},
|
|
4534
4552
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
|
|
4553
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportHttpClient) ? {
|
|
4554
|
+
shouldExportHttpClient: globalOptions.shouldExportHttpClient
|
|
4555
|
+
} : {},
|
|
4535
4556
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
|
|
4557
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportMutatorHooks) ? {
|
|
4558
|
+
shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
|
|
4559
|
+
} : {},
|
|
4560
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
|
|
4561
|
+
...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
|
|
4562
|
+
signal: globalOptions.signal
|
|
4563
|
+
} : {},
|
|
4536
4564
|
...!(0, import_core7.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
|
|
4565
|
+
...!(0, import_core7.isUndefined)(globalOptions.version) ? {
|
|
4566
|
+
version: globalOptions.version
|
|
4567
|
+
} : {},
|
|
4537
4568
|
...!(0, import_core7.isUndefined)(queryOptions.version) ? { version: queryOptions.version } : {}
|
|
4538
4569
|
};
|
|
4539
4570
|
};
|