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/bin/orval.js
CHANGED
|
@@ -3812,7 +3812,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3812
3812
|
var package_default = {
|
|
3813
3813
|
name: "orval",
|
|
3814
3814
|
description: "A swagger client generator for typescript",
|
|
3815
|
-
version: "6.30.
|
|
3815
|
+
version: "6.30.2",
|
|
3816
3816
|
license: "MIT",
|
|
3817
3817
|
files: [
|
|
3818
3818
|
"dist"
|
|
@@ -3866,15 +3866,15 @@ var package_default = {
|
|
|
3866
3866
|
},
|
|
3867
3867
|
dependencies: {
|
|
3868
3868
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
3869
|
-
"@orval/angular": "6.30.
|
|
3870
|
-
"@orval/axios": "6.30.
|
|
3871
|
-
"@orval/core": "6.30.
|
|
3872
|
-
"@orval/fetch": "6.30.
|
|
3873
|
-
"@orval/hono": "6.30.
|
|
3874
|
-
"@orval/mock": "6.30.
|
|
3875
|
-
"@orval/query": "6.30.
|
|
3876
|
-
"@orval/swr": "6.30.
|
|
3877
|
-
"@orval/zod": "6.30.
|
|
3869
|
+
"@orval/angular": "6.30.2",
|
|
3870
|
+
"@orval/axios": "6.30.2",
|
|
3871
|
+
"@orval/core": "6.30.2",
|
|
3872
|
+
"@orval/fetch": "6.30.2",
|
|
3873
|
+
"@orval/hono": "6.30.2",
|
|
3874
|
+
"@orval/mock": "6.30.2",
|
|
3875
|
+
"@orval/query": "6.30.2",
|
|
3876
|
+
"@orval/swr": "6.30.2",
|
|
3877
|
+
"@orval/zod": "6.30.2",
|
|
3878
3878
|
ajv: "^8.12.0",
|
|
3879
3879
|
cac: "^6.7.14",
|
|
3880
3880
|
chalk: "^4.1.2",
|
|
@@ -4099,7 +4099,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
|
|
|
4099
4099
|
|
|
4100
4100
|
// src/utils/options.ts
|
|
4101
4101
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
4102
|
-
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
|
|
4102
|
+
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;
|
|
4103
4103
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
4104
4104
|
if (!options.input) {
|
|
4105
4105
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -4137,20 +4137,29 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4137
4137
|
};
|
|
4138
4138
|
}
|
|
4139
4139
|
const defaultFileExtension = ".ts";
|
|
4140
|
+
const globalQueryOptions = {
|
|
4141
|
+
useQuery: true,
|
|
4142
|
+
useMutation: true,
|
|
4143
|
+
signal: true,
|
|
4144
|
+
shouldExportMutatorHooks: true,
|
|
4145
|
+
shouldExportHttpClient: true,
|
|
4146
|
+
shouldExportQueryKey: true,
|
|
4147
|
+
...normalizeQueryOptions((_b = outputOptions.override) == null ? void 0 : _b.query, workspace)
|
|
4148
|
+
};
|
|
4140
4149
|
const normalizedOptions = {
|
|
4141
4150
|
input: {
|
|
4142
4151
|
target: globalOptions.input ? normalizePathOrUrl(globalOptions.input, process.cwd()) : normalizePathOrUrl(inputOptions.target, workspace),
|
|
4143
4152
|
validation: inputOptions.validation || false,
|
|
4144
4153
|
override: {
|
|
4145
4154
|
transformer: normalizePath(
|
|
4146
|
-
(
|
|
4155
|
+
(_c = inputOptions.override) == null ? void 0 : _c.transformer,
|
|
4147
4156
|
workspace
|
|
4148
4157
|
)
|
|
4149
4158
|
},
|
|
4150
|
-
converterOptions: (
|
|
4159
|
+
converterOptions: (_d = inputOptions.converterOptions) != null ? _d : {},
|
|
4151
4160
|
parserOptions: (0, import_core7.mergeDeep)(
|
|
4152
4161
|
parserDefaultOptions,
|
|
4153
|
-
(
|
|
4162
|
+
(_e = inputOptions.parserOptions) != null ? _e : {}
|
|
4154
4163
|
),
|
|
4155
4164
|
filters: inputOptions.filters
|
|
4156
4165
|
},
|
|
@@ -4159,122 +4168,120 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4159
4168
|
schemas: normalizePath(outputOptions.schemas, outputWorkspace),
|
|
4160
4169
|
fileExtension: outputOptions.fileExtension || defaultFileExtension,
|
|
4161
4170
|
workspace: outputOptions.workspace ? outputWorkspace : void 0,
|
|
4162
|
-
client: (
|
|
4163
|
-
mode: normalizeOutputMode((
|
|
4171
|
+
client: (_g = (_f = outputOptions.client) != null ? _f : client) != null ? _g : import_core7.OutputClient.AXIOS_FUNCTIONS,
|
|
4172
|
+
mode: normalizeOutputMode((_h = outputOptions.mode) != null ? _h : mode),
|
|
4164
4173
|
mock: mock2,
|
|
4165
|
-
clean: (
|
|
4166
|
-
prettier: (
|
|
4167
|
-
tslint: (
|
|
4168
|
-
biome: (
|
|
4174
|
+
clean: (_j = (_i = outputOptions.clean) != null ? _i : clean) != null ? _j : false,
|
|
4175
|
+
prettier: (_l = (_k = outputOptions.prettier) != null ? _k : prettier) != null ? _l : false,
|
|
4176
|
+
tslint: (_n = (_m = outputOptions.tslint) != null ? _m : tslint) != null ? _n : false,
|
|
4177
|
+
biome: (_p = (_o = outputOptions.biome) != null ? _o : biome) != null ? _p : false,
|
|
4169
4178
|
tsconfig,
|
|
4170
4179
|
packageJson,
|
|
4171
|
-
headers: (
|
|
4172
|
-
indexFiles: (
|
|
4180
|
+
headers: (_q = outputOptions.headers) != null ? _q : false,
|
|
4181
|
+
indexFiles: (_r = outputOptions.indexFiles) != null ? _r : true,
|
|
4173
4182
|
baseUrl: outputOptions.baseUrl,
|
|
4174
|
-
unionAddMissingProperties: (
|
|
4183
|
+
unionAddMissingProperties: (_s = outputOptions.unionAddMissingProperties) != null ? _s : false,
|
|
4175
4184
|
override: {
|
|
4176
4185
|
...outputOptions.override,
|
|
4177
4186
|
mock: {
|
|
4178
|
-
arrayMin: (
|
|
4179
|
-
arrayMax: (
|
|
4180
|
-
...(
|
|
4187
|
+
arrayMin: (_v = (_u = (_t = outputOptions.override) == null ? void 0 : _t.mock) == null ? void 0 : _u.arrayMin) != null ? _v : 1,
|
|
4188
|
+
arrayMax: (_y = (_x = (_w = outputOptions.override) == null ? void 0 : _w.mock) == null ? void 0 : _x.arrayMax) != null ? _y : 10,
|
|
4189
|
+
...(_A = (_z = outputOptions.override) == null ? void 0 : _z.mock) != null ? _A : {}
|
|
4181
4190
|
},
|
|
4182
4191
|
operations: normalizeOperationsAndTags(
|
|
4183
|
-
(
|
|
4184
|
-
outputWorkspace
|
|
4192
|
+
(_C = (_B = outputOptions.override) == null ? void 0 : _B.operations) != null ? _C : {},
|
|
4193
|
+
outputWorkspace,
|
|
4194
|
+
{
|
|
4195
|
+
query: globalQueryOptions
|
|
4196
|
+
}
|
|
4185
4197
|
),
|
|
4186
4198
|
tags: normalizeOperationsAndTags(
|
|
4187
|
-
(
|
|
4188
|
-
outputWorkspace
|
|
4199
|
+
(_E = (_D = outputOptions.override) == null ? void 0 : _D.tags) != null ? _E : {},
|
|
4200
|
+
outputWorkspace,
|
|
4201
|
+
{
|
|
4202
|
+
query: globalQueryOptions
|
|
4203
|
+
}
|
|
4189
4204
|
),
|
|
4190
4205
|
mutator: normalizeMutator(
|
|
4191
4206
|
outputWorkspace,
|
|
4192
|
-
(
|
|
4207
|
+
(_F = outputOptions.override) == null ? void 0 : _F.mutator
|
|
4193
4208
|
),
|
|
4194
|
-
formData: (
|
|
4209
|
+
formData: (_J = !(0, import_core7.isBoolean)((_G = outputOptions.override) == null ? void 0 : _G.formData) ? normalizeMutator(
|
|
4195
4210
|
outputWorkspace,
|
|
4196
|
-
(
|
|
4197
|
-
) : (
|
|
4198
|
-
formUrlEncoded: (
|
|
4211
|
+
(_H = outputOptions.override) == null ? void 0 : _H.formData
|
|
4212
|
+
) : (_I = outputOptions.override) == null ? void 0 : _I.formData) != null ? _J : true,
|
|
4213
|
+
formUrlEncoded: (_N = !(0, import_core7.isBoolean)((_K = outputOptions.override) == null ? void 0 : _K.formUrlEncoded) ? normalizeMutator(
|
|
4199
4214
|
outputWorkspace,
|
|
4200
|
-
(
|
|
4201
|
-
) : (
|
|
4215
|
+
(_L = outputOptions.override) == null ? void 0 : _L.formUrlEncoded
|
|
4216
|
+
) : (_M = outputOptions.override) == null ? void 0 : _M.formUrlEncoded) != null ? _N : true,
|
|
4202
4217
|
paramsSerializer: normalizeMutator(
|
|
4203
4218
|
outputWorkspace,
|
|
4204
|
-
(
|
|
4219
|
+
(_O = outputOptions.override) == null ? void 0 : _O.paramsSerializer
|
|
4205
4220
|
),
|
|
4206
|
-
header: ((
|
|
4207
|
-
requestOptions: (
|
|
4221
|
+
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,
|
|
4222
|
+
requestOptions: (_T = (_S = outputOptions.override) == null ? void 0 : _S.requestOptions) != null ? _T : true,
|
|
4208
4223
|
components: {
|
|
4209
4224
|
schemas: {
|
|
4210
4225
|
suffix: import_core7.RefComponentSuffix.schemas,
|
|
4211
|
-
itemSuffix: (
|
|
4212
|
-
...(
|
|
4226
|
+
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",
|
|
4227
|
+
...(__ = (_Z = (_Y = outputOptions.override) == null ? void 0 : _Y.components) == null ? void 0 : _Z.schemas) != null ? __ : {}
|
|
4213
4228
|
},
|
|
4214
4229
|
responses: {
|
|
4215
4230
|
suffix: import_core7.RefComponentSuffix.responses,
|
|
4216
|
-
...(
|
|
4231
|
+
...(_ba = (_aa = (_$ = outputOptions.override) == null ? void 0 : _$.components) == null ? void 0 : _aa.responses) != null ? _ba : {}
|
|
4217
4232
|
},
|
|
4218
4233
|
parameters: {
|
|
4219
4234
|
suffix: import_core7.RefComponentSuffix.parameters,
|
|
4220
|
-
...(
|
|
4235
|
+
...(_ea = (_da = (_ca = outputOptions.override) == null ? void 0 : _ca.components) == null ? void 0 : _da.parameters) != null ? _ea : {}
|
|
4221
4236
|
},
|
|
4222
4237
|
requestBodies: {
|
|
4223
4238
|
suffix: import_core7.RefComponentSuffix.requestBodies,
|
|
4224
|
-
...(
|
|
4239
|
+
...(_ha = (_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.components) == null ? void 0 : _ga.requestBodies) != null ? _ha : {}
|
|
4225
4240
|
}
|
|
4226
4241
|
},
|
|
4227
|
-
hono: normalizeHonoOptions((
|
|
4228
|
-
query:
|
|
4229
|
-
useQuery: (_ka = (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.query) == null ? void 0 : _ja.useQuery) != null ? _ka : true,
|
|
4230
|
-
useMutation: (_na = (_ma = (_la = outputOptions.override) == null ? void 0 : _la.query) == null ? void 0 : _ma.useMutation) != null ? _na : true,
|
|
4231
|
-
signal: (_qa = (_pa = (_oa = outputOptions.override) == null ? void 0 : _oa.query) == null ? void 0 : _pa.signal) != null ? _qa : true,
|
|
4232
|
-
shouldExportMutatorHooks: (_ta = (_sa = (_ra = outputOptions.override) == null ? void 0 : _ra.query) == null ? void 0 : _sa.shouldExportMutatorHooks) != null ? _ta : true,
|
|
4233
|
-
shouldExportHttpClient: (_wa = (_va = (_ua = outputOptions.override) == null ? void 0 : _ua.query) == null ? void 0 : _va.shouldExportHttpClient) != null ? _wa : true,
|
|
4234
|
-
shouldExportQueryKey: (_za = (_ya = (_xa = outputOptions.override) == null ? void 0 : _xa.query) == null ? void 0 : _ya.shouldExportQueryKey) != null ? _za : true,
|
|
4235
|
-
...normalizeQueryOptions((_Aa = outputOptions.override) == null ? void 0 : _Aa.query, workspace)
|
|
4236
|
-
},
|
|
4242
|
+
hono: normalizeHonoOptions((_ia = outputOptions.override) == null ? void 0 : _ia.hono, workspace),
|
|
4243
|
+
query: globalQueryOptions,
|
|
4237
4244
|
zod: {
|
|
4238
4245
|
strict: {
|
|
4239
|
-
param: (
|
|
4240
|
-
query: (
|
|
4241
|
-
header: (
|
|
4242
|
-
body: (
|
|
4243
|
-
response: (
|
|
4246
|
+
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,
|
|
4247
|
+
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,
|
|
4248
|
+
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,
|
|
4249
|
+
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,
|
|
4250
|
+
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
|
|
4244
4251
|
},
|
|
4245
4252
|
coerce: {
|
|
4246
|
-
param: (
|
|
4247
|
-
query: (
|
|
4248
|
-
header: (
|
|
4249
|
-
body: (
|
|
4250
|
-
response: (
|
|
4253
|
+
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,
|
|
4254
|
+
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,
|
|
4255
|
+
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,
|
|
4256
|
+
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,
|
|
4257
|
+
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
|
|
4251
4258
|
},
|
|
4252
4259
|
preprocess: {
|
|
4253
|
-
...((
|
|
4260
|
+
...((_Za = (_Ya = (_Xa = outputOptions.override) == null ? void 0 : _Xa.zod) == null ? void 0 : _Ya.preprocess) == null ? void 0 : _Za.param) ? {
|
|
4254
4261
|
param: normalizeMutator(
|
|
4255
4262
|
workspace,
|
|
4256
4263
|
outputOptions.override.zod.preprocess.param
|
|
4257
4264
|
)
|
|
4258
4265
|
} : {},
|
|
4259
|
-
...((
|
|
4266
|
+
...((_ab = (_$a = (__a = outputOptions.override) == null ? void 0 : __a.zod) == null ? void 0 : _$a.preprocess) == null ? void 0 : _ab.query) ? {
|
|
4260
4267
|
query: normalizeMutator(
|
|
4261
4268
|
workspace,
|
|
4262
4269
|
outputOptions.override.zod.preprocess.query
|
|
4263
4270
|
)
|
|
4264
4271
|
} : {},
|
|
4265
|
-
...((
|
|
4272
|
+
...((_db = (_cb = (_bb = outputOptions.override) == null ? void 0 : _bb.zod) == null ? void 0 : _cb.preprocess) == null ? void 0 : _db.header) ? {
|
|
4266
4273
|
header: normalizeMutator(
|
|
4267
4274
|
workspace,
|
|
4268
4275
|
outputOptions.override.zod.preprocess.header
|
|
4269
4276
|
)
|
|
4270
4277
|
} : {},
|
|
4271
|
-
...((
|
|
4278
|
+
...((_gb = (_fb = (_eb = outputOptions.override) == null ? void 0 : _eb.zod) == null ? void 0 : _fb.preprocess) == null ? void 0 : _gb.body) ? {
|
|
4272
4279
|
body: normalizeMutator(
|
|
4273
4280
|
workspace,
|
|
4274
4281
|
outputOptions.override.zod.preprocess.body
|
|
4275
4282
|
)
|
|
4276
4283
|
} : {},
|
|
4277
|
-
...((
|
|
4284
|
+
...((_jb = (_ib = (_hb = outputOptions.override) == null ? void 0 : _hb.zod) == null ? void 0 : _ib.preprocess) == null ? void 0 : _jb.response) ? {
|
|
4278
4285
|
response: normalizeMutator(
|
|
4279
4286
|
workspace,
|
|
4280
4287
|
outputOptions.override.zod.preprocess.response
|
|
@@ -4283,19 +4290,19 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4283
4290
|
}
|
|
4284
4291
|
},
|
|
4285
4292
|
swr: {
|
|
4286
|
-
...(
|
|
4293
|
+
...(_lb = (_kb = outputOptions.override) == null ? void 0 : _kb.swr) != null ? _lb : {}
|
|
4287
4294
|
},
|
|
4288
4295
|
angular: {
|
|
4289
|
-
provideIn: (
|
|
4296
|
+
provideIn: (_ob = (_nb = (_mb = outputOptions.override) == null ? void 0 : _mb.angular) == null ? void 0 : _nb.provideIn) != null ? _ob : "root"
|
|
4290
4297
|
},
|
|
4291
|
-
useDates: ((
|
|
4292
|
-
useDeprecatedOperations: (
|
|
4293
|
-
useNativeEnums: (
|
|
4294
|
-
suppressReadonlyModifier: ((
|
|
4298
|
+
useDates: ((_pb = outputOptions.override) == null ? void 0 : _pb.useDates) || false,
|
|
4299
|
+
useDeprecatedOperations: (_rb = (_qb = outputOptions.override) == null ? void 0 : _qb.useDeprecatedOperations) != null ? _rb : true,
|
|
4300
|
+
useNativeEnums: (_tb = (_sb = outputOptions.override) == null ? void 0 : _sb.useNativeEnums) != null ? _tb : false,
|
|
4301
|
+
suppressReadonlyModifier: ((_ub = outputOptions.override) == null ? void 0 : _ub.suppressReadonlyModifier) || false
|
|
4295
4302
|
},
|
|
4296
|
-
allParamsOptional: (
|
|
4297
|
-
urlEncodeParameters: (
|
|
4298
|
-
optionsParamRequired: (
|
|
4303
|
+
allParamsOptional: (_vb = outputOptions.allParamsOptional) != null ? _vb : false,
|
|
4304
|
+
urlEncodeParameters: (_wb = outputOptions.urlEncodeParameters) != null ? _wb : false,
|
|
4305
|
+
optionsParamRequired: (_xb = outputOptions.optionsParamRequired) != null ? _xb : false
|
|
4299
4306
|
},
|
|
4300
4307
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
4301
4308
|
};
|
|
@@ -4348,7 +4355,7 @@ var normalizePath = (path, workspace) => {
|
|
|
4348
4355
|
}
|
|
4349
4356
|
return import_core7.upath.resolve(workspace, path);
|
|
4350
4357
|
};
|
|
4351
|
-
var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
|
|
4358
|
+
var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
|
|
4352
4359
|
return Object.fromEntries(
|
|
4353
4360
|
Object.entries(operationsOrTags).map(
|
|
4354
4361
|
([
|
|
@@ -4370,7 +4377,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
|
|
|
4370
4377
|
{
|
|
4371
4378
|
...rest,
|
|
4372
4379
|
...query2 ? {
|
|
4373
|
-
query: normalizeQueryOptions(query2, workspace)
|
|
4380
|
+
query: normalizeQueryOptions(query2, workspace, global2.query)
|
|
4374
4381
|
} : {},
|
|
4375
4382
|
...zod2 ? {
|
|
4376
4383
|
zod: {
|
|
@@ -4486,7 +4493,7 @@ var normalizeHonoOptions = (hono2 = {}, workspace) => {
|
|
|
4486
4493
|
validator: (_a = hono2.validator) != null ? _a : true
|
|
4487
4494
|
};
|
|
4488
4495
|
};
|
|
4489
|
-
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
|
|
4496
|
+
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
|
|
4490
4497
|
if (queryOptions.options) {
|
|
4491
4498
|
console.warn(
|
|
4492
4499
|
"[WARN] Using query options is deprecated and will be removed in a future major release. Please use queryOptions or mutationOptions instead."
|
|
@@ -4501,25 +4508,49 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
|
|
|
4501
4508
|
...!(0, import_core7.isUndefined)(queryOptions.useSuspenseInfiniteQuery) ? { useSuspenseInfiniteQuery: queryOptions.useSuspenseInfiniteQuery } : {},
|
|
4502
4509
|
...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
|
|
4503
4510
|
...queryOptions.options ? { options: queryOptions.options } : {},
|
|
4511
|
+
...globalOptions.queryKey ? {
|
|
4512
|
+
queryKey: globalOptions.queryKey
|
|
4513
|
+
} : {},
|
|
4504
4514
|
...(queryOptions == null ? void 0 : queryOptions.queryKey) ? {
|
|
4505
4515
|
queryKey: normalizeMutator(outputWorkspace, queryOptions == null ? void 0 : queryOptions.queryKey)
|
|
4506
4516
|
} : {},
|
|
4517
|
+
...globalOptions.queryOptions ? {
|
|
4518
|
+
queryOptions: globalOptions.queryOptions
|
|
4519
|
+
} : {},
|
|
4507
4520
|
...(queryOptions == null ? void 0 : queryOptions.queryOptions) ? {
|
|
4508
4521
|
queryOptions: normalizeMutator(
|
|
4509
4522
|
outputWorkspace,
|
|
4510
4523
|
queryOptions == null ? void 0 : queryOptions.queryOptions
|
|
4511
4524
|
)
|
|
4512
4525
|
} : {},
|
|
4526
|
+
...globalOptions.mutationOptions ? {
|
|
4527
|
+
mutationOptions: globalOptions.mutationOptions
|
|
4528
|
+
} : {},
|
|
4513
4529
|
...(queryOptions == null ? void 0 : queryOptions.mutationOptions) ? {
|
|
4514
4530
|
mutationOptions: normalizeMutator(
|
|
4515
4531
|
outputWorkspace,
|
|
4516
4532
|
queryOptions == null ? void 0 : queryOptions.mutationOptions
|
|
4517
4533
|
)
|
|
4518
4534
|
} : {},
|
|
4519
|
-
...!(0, import_core7.isUndefined)(
|
|
4535
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportQueryKey) ? {
|
|
4536
|
+
shouldExportQueryKey: globalOptions.shouldExportQueryKey
|
|
4537
|
+
} : {},
|
|
4520
4538
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
|
|
4539
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportHttpClient) ? {
|
|
4540
|
+
shouldExportHttpClient: globalOptions.shouldExportHttpClient
|
|
4541
|
+
} : {},
|
|
4521
4542
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
|
|
4543
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldExportMutatorHooks) ? {
|
|
4544
|
+
shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
|
|
4545
|
+
} : {},
|
|
4546
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
|
|
4547
|
+
...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
|
|
4548
|
+
signal: globalOptions.signal
|
|
4549
|
+
} : {},
|
|
4522
4550
|
...!(0, import_core7.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
|
|
4551
|
+
...!(0, import_core7.isUndefined)(globalOptions.version) ? {
|
|
4552
|
+
version: globalOptions.version
|
|
4553
|
+
} : {},
|
|
4523
4554
|
...!(0, import_core7.isUndefined)(queryOptions.version) ? { version: queryOptions.version } : {}
|
|
4524
4555
|
};
|
|
4525
4556
|
};
|