orval 7.6.0 → 7.8.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/dist/bin/orval.js +36 -29
- package/dist/bin/orval.js.map +1 -1
- package/dist/index.js +36 -29
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -3248,7 +3248,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3248
3248
|
var package_default = {
|
|
3249
3249
|
name: "orval",
|
|
3250
3250
|
description: "A swagger client generator for typescript",
|
|
3251
|
-
version: "7.
|
|
3251
|
+
version: "7.8.0",
|
|
3252
3252
|
license: "MIT",
|
|
3253
3253
|
files: [
|
|
3254
3254
|
"dist"
|
|
@@ -3302,16 +3302,16 @@ var package_default = {
|
|
|
3302
3302
|
"typedoc-plugin-coverage": "^3.4.1"
|
|
3303
3303
|
},
|
|
3304
3304
|
dependencies: {
|
|
3305
|
-
"@apidevtools/swagger-parser": "^10.1.
|
|
3306
|
-
"@orval/angular": "7.
|
|
3307
|
-
"@orval/axios": "7.
|
|
3308
|
-
"@orval/core": "7.
|
|
3309
|
-
"@orval/fetch": "7.
|
|
3310
|
-
"@orval/hono": "7.
|
|
3311
|
-
"@orval/mock": "7.
|
|
3312
|
-
"@orval/query": "7.
|
|
3313
|
-
"@orval/swr": "7.
|
|
3314
|
-
"@orval/zod": "7.
|
|
3305
|
+
"@apidevtools/swagger-parser": "^10.1.1",
|
|
3306
|
+
"@orval/angular": "7.8.0",
|
|
3307
|
+
"@orval/axios": "7.8.0",
|
|
3308
|
+
"@orval/core": "7.8.0",
|
|
3309
|
+
"@orval/fetch": "7.8.0",
|
|
3310
|
+
"@orval/hono": "7.8.0",
|
|
3311
|
+
"@orval/mock": "7.8.0",
|
|
3312
|
+
"@orval/query": "7.8.0",
|
|
3313
|
+
"@orval/swr": "7.8.0",
|
|
3314
|
+
"@orval/zod": "7.8.0",
|
|
3315
3315
|
ajv: "^8.17.1",
|
|
3316
3316
|
cac: "^6.7.14",
|
|
3317
3317
|
chalk: "^4.1.2",
|
|
@@ -3324,7 +3324,7 @@ var package_default = {
|
|
|
3324
3324
|
"openapi3-ts": "4.2.2",
|
|
3325
3325
|
"string-argv": "^0.3.2",
|
|
3326
3326
|
tsconfck: "^2.0.1",
|
|
3327
|
-
typedoc: "^0.
|
|
3327
|
+
typedoc: "^0.28.0",
|
|
3328
3328
|
"typedoc-plugin-markdown": "^4.4.2",
|
|
3329
3329
|
typescript: "^5.6.3"
|
|
3330
3330
|
}
|
|
@@ -3542,7 +3542,7 @@ function defineConfig(options) {
|
|
|
3542
3542
|
return options;
|
|
3543
3543
|
}
|
|
3544
3544
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
3545
|
-
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, _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, __b, _$b, _ac, _bc;
|
|
3545
|
+
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, _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, __b, _$b, _ac, _bc, _cc, _dc, _ec;
|
|
3546
3546
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
3547
3547
|
if (!options.input) {
|
|
3548
3548
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -3588,6 +3588,7 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
3588
3588
|
shouldExportMutatorHooks: true,
|
|
3589
3589
|
shouldExportHttpClient: true,
|
|
3590
3590
|
shouldExportQueryKey: true,
|
|
3591
|
+
shouldSplitQueryKey: false,
|
|
3591
3592
|
...normalizeQueryOptions((_b = outputOptions.override) == null ? void 0 : _b.query, workspace)
|
|
3592
3593
|
};
|
|
3593
3594
|
const normalizedOptions = {
|
|
@@ -3742,27 +3743,28 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
3742
3743
|
)
|
|
3743
3744
|
} : {}
|
|
3744
3745
|
},
|
|
3745
|
-
generateEachHttpStatus: (_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.generateEachHttpStatus) != null ? _Jb : false
|
|
3746
|
+
generateEachHttpStatus: (_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.generateEachHttpStatus) != null ? _Jb : false,
|
|
3747
|
+
dateTimeOptions: (_Mb = (_Lb = (_Kb = outputOptions.override) == null ? void 0 : _Kb.zod) == null ? void 0 : _Lb.dateTimeOptions) != null ? _Mb : {}
|
|
3746
3748
|
},
|
|
3747
3749
|
swr: {
|
|
3748
|
-
...(
|
|
3750
|
+
...(_Ob = (_Nb = outputOptions.override) == null ? void 0 : _Nb.swr) != null ? _Ob : {}
|
|
3749
3751
|
},
|
|
3750
3752
|
angular: {
|
|
3751
|
-
provideIn: (
|
|
3753
|
+
provideIn: (_Rb = (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.angular) == null ? void 0 : _Qb.provideIn) != null ? _Rb : "root"
|
|
3752
3754
|
},
|
|
3753
3755
|
fetch: {
|
|
3754
|
-
includeHttpResponseReturnType: (
|
|
3755
|
-
...(
|
|
3756
|
+
includeHttpResponseReturnType: (_Ub = (_Tb = (_Sb = outputOptions.override) == null ? void 0 : _Sb.fetch) == null ? void 0 : _Tb.includeHttpResponseReturnType) != null ? _Ub : true,
|
|
3757
|
+
...(_Wb = (_Vb = outputOptions.override) == null ? void 0 : _Vb.fetch) != null ? _Wb : {}
|
|
3756
3758
|
},
|
|
3757
|
-
useDates: ((
|
|
3758
|
-
useDeprecatedOperations: (
|
|
3759
|
-
useNativeEnums: (
|
|
3760
|
-
suppressReadonlyModifier: ((
|
|
3759
|
+
useDates: ((_Xb = outputOptions.override) == null ? void 0 : _Xb.useDates) || false,
|
|
3760
|
+
useDeprecatedOperations: (_Zb = (_Yb = outputOptions.override) == null ? void 0 : _Yb.useDeprecatedOperations) != null ? _Zb : true,
|
|
3761
|
+
useNativeEnums: (_$b = (__b = outputOptions.override) == null ? void 0 : __b.useNativeEnums) != null ? _$b : false,
|
|
3762
|
+
suppressReadonlyModifier: ((_ac = outputOptions.override) == null ? void 0 : _ac.suppressReadonlyModifier) || false
|
|
3761
3763
|
},
|
|
3762
|
-
allParamsOptional: (
|
|
3763
|
-
urlEncodeParameters: (
|
|
3764
|
-
optionsParamRequired: (
|
|
3765
|
-
propertySortOrder: (
|
|
3764
|
+
allParamsOptional: (_bc = outputOptions.allParamsOptional) != null ? _bc : false,
|
|
3765
|
+
urlEncodeParameters: (_cc = outputOptions.urlEncodeParameters) != null ? _cc : false,
|
|
3766
|
+
optionsParamRequired: (_dc = outputOptions.optionsParamRequired) != null ? _dc : false,
|
|
3767
|
+
propertySortOrder: (_ec = outputOptions.propertySortOrder) != null ? _ec : import_core7.PropertySortOrder.SPECIFICATION
|
|
3766
3768
|
},
|
|
3767
3769
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
3768
3770
|
};
|
|
@@ -3831,7 +3833,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
|
|
|
3831
3833
|
...rest
|
|
3832
3834
|
}
|
|
3833
3835
|
]) => {
|
|
3834
|
-
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;
|
|
3836
|
+
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;
|
|
3835
3837
|
return [
|
|
3836
3838
|
key,
|
|
3837
3839
|
{
|
|
@@ -3894,7 +3896,8 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
|
|
|
3894
3896
|
)
|
|
3895
3897
|
} : {}
|
|
3896
3898
|
},
|
|
3897
|
-
generateEachHttpStatus: (_J = zod2 == null ? void 0 : zod2.generateEachHttpStatus) != null ? _J : false
|
|
3899
|
+
generateEachHttpStatus: (_J = zod2 == null ? void 0 : zod2.generateEachHttpStatus) != null ? _J : false,
|
|
3900
|
+
dateTimeOptions: (_K = zod2 == null ? void 0 : zod2.dateTimeOptions) != null ? _K : {}
|
|
3898
3901
|
}
|
|
3899
3902
|
} : {},
|
|
3900
3903
|
...transformer ? { transformer: normalizePath(transformer, workspace) } : {},
|
|
@@ -4014,6 +4017,10 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions =
|
|
|
4014
4017
|
shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
|
|
4015
4018
|
} : {},
|
|
4016
4019
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
|
|
4020
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldSplitQueryKey) ? {
|
|
4021
|
+
shouldSplitQueryKey: globalOptions.shouldSplitQueryKey
|
|
4022
|
+
} : {},
|
|
4023
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldSplitQueryKey) ? { shouldSplitQueryKey: queryOptions.shouldSplitQueryKey } : {},
|
|
4017
4024
|
...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
|
|
4018
4025
|
signal: globalOptions.signal
|
|
4019
4026
|
} : {},
|
|
@@ -4329,7 +4336,7 @@ var generateSpecs = async (config, workspace, projectName) => {
|
|
|
4329
4336
|
return;
|
|
4330
4337
|
}
|
|
4331
4338
|
let hasErrors;
|
|
4332
|
-
const accumulate = (0, import_core11.asyncReduce)(
|
|
4339
|
+
const accumulate = await (0, import_core11.asyncReduce)(
|
|
4333
4340
|
Object.entries(config),
|
|
4334
4341
|
async (acc, [projectName2, options]) => {
|
|
4335
4342
|
try {
|