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/bin/orval.js
CHANGED
|
@@ -3236,7 +3236,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3236
3236
|
var package_default = {
|
|
3237
3237
|
name: "orval",
|
|
3238
3238
|
description: "A swagger client generator for typescript",
|
|
3239
|
-
version: "7.
|
|
3239
|
+
version: "7.8.0",
|
|
3240
3240
|
license: "MIT",
|
|
3241
3241
|
files: [
|
|
3242
3242
|
"dist"
|
|
@@ -3290,16 +3290,16 @@ var package_default = {
|
|
|
3290
3290
|
"typedoc-plugin-coverage": "^3.4.1"
|
|
3291
3291
|
},
|
|
3292
3292
|
dependencies: {
|
|
3293
|
-
"@apidevtools/swagger-parser": "^10.1.
|
|
3294
|
-
"@orval/angular": "7.
|
|
3295
|
-
"@orval/axios": "7.
|
|
3296
|
-
"@orval/core": "7.
|
|
3297
|
-
"@orval/fetch": "7.
|
|
3298
|
-
"@orval/hono": "7.
|
|
3299
|
-
"@orval/mock": "7.
|
|
3300
|
-
"@orval/query": "7.
|
|
3301
|
-
"@orval/swr": "7.
|
|
3302
|
-
"@orval/zod": "7.
|
|
3293
|
+
"@apidevtools/swagger-parser": "^10.1.1",
|
|
3294
|
+
"@orval/angular": "7.8.0",
|
|
3295
|
+
"@orval/axios": "7.8.0",
|
|
3296
|
+
"@orval/core": "7.8.0",
|
|
3297
|
+
"@orval/fetch": "7.8.0",
|
|
3298
|
+
"@orval/hono": "7.8.0",
|
|
3299
|
+
"@orval/mock": "7.8.0",
|
|
3300
|
+
"@orval/query": "7.8.0",
|
|
3301
|
+
"@orval/swr": "7.8.0",
|
|
3302
|
+
"@orval/zod": "7.8.0",
|
|
3303
3303
|
ajv: "^8.17.1",
|
|
3304
3304
|
cac: "^6.7.14",
|
|
3305
3305
|
chalk: "^4.1.2",
|
|
@@ -3312,7 +3312,7 @@ var package_default = {
|
|
|
3312
3312
|
"openapi3-ts": "4.2.2",
|
|
3313
3313
|
"string-argv": "^0.3.2",
|
|
3314
3314
|
tsconfck: "^2.0.1",
|
|
3315
|
-
typedoc: "^0.
|
|
3315
|
+
typedoc: "^0.28.0",
|
|
3316
3316
|
"typedoc-plugin-markdown": "^4.4.2",
|
|
3317
3317
|
typescript: "^5.6.3"
|
|
3318
3318
|
}
|
|
@@ -3527,7 +3527,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
|
|
|
3527
3527
|
|
|
3528
3528
|
// src/utils/options.ts
|
|
3529
3529
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
3530
|
-
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;
|
|
3530
|
+
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;
|
|
3531
3531
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
3532
3532
|
if (!options.input) {
|
|
3533
3533
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -3573,6 +3573,7 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
3573
3573
|
shouldExportMutatorHooks: true,
|
|
3574
3574
|
shouldExportHttpClient: true,
|
|
3575
3575
|
shouldExportQueryKey: true,
|
|
3576
|
+
shouldSplitQueryKey: false,
|
|
3576
3577
|
...normalizeQueryOptions((_b = outputOptions.override) == null ? void 0 : _b.query, workspace)
|
|
3577
3578
|
};
|
|
3578
3579
|
const normalizedOptions = {
|
|
@@ -3727,27 +3728,28 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
3727
3728
|
)
|
|
3728
3729
|
} : {}
|
|
3729
3730
|
},
|
|
3730
|
-
generateEachHttpStatus: (_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.generateEachHttpStatus) != null ? _Jb : false
|
|
3731
|
+
generateEachHttpStatus: (_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.generateEachHttpStatus) != null ? _Jb : false,
|
|
3732
|
+
dateTimeOptions: (_Mb = (_Lb = (_Kb = outputOptions.override) == null ? void 0 : _Kb.zod) == null ? void 0 : _Lb.dateTimeOptions) != null ? _Mb : {}
|
|
3731
3733
|
},
|
|
3732
3734
|
swr: {
|
|
3733
|
-
...(
|
|
3735
|
+
...(_Ob = (_Nb = outputOptions.override) == null ? void 0 : _Nb.swr) != null ? _Ob : {}
|
|
3734
3736
|
},
|
|
3735
3737
|
angular: {
|
|
3736
|
-
provideIn: (
|
|
3738
|
+
provideIn: (_Rb = (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.angular) == null ? void 0 : _Qb.provideIn) != null ? _Rb : "root"
|
|
3737
3739
|
},
|
|
3738
3740
|
fetch: {
|
|
3739
|
-
includeHttpResponseReturnType: (
|
|
3740
|
-
...(
|
|
3741
|
+
includeHttpResponseReturnType: (_Ub = (_Tb = (_Sb = outputOptions.override) == null ? void 0 : _Sb.fetch) == null ? void 0 : _Tb.includeHttpResponseReturnType) != null ? _Ub : true,
|
|
3742
|
+
...(_Wb = (_Vb = outputOptions.override) == null ? void 0 : _Vb.fetch) != null ? _Wb : {}
|
|
3741
3743
|
},
|
|
3742
|
-
useDates: ((
|
|
3743
|
-
useDeprecatedOperations: (
|
|
3744
|
-
useNativeEnums: (
|
|
3745
|
-
suppressReadonlyModifier: ((
|
|
3744
|
+
useDates: ((_Xb = outputOptions.override) == null ? void 0 : _Xb.useDates) || false,
|
|
3745
|
+
useDeprecatedOperations: (_Zb = (_Yb = outputOptions.override) == null ? void 0 : _Yb.useDeprecatedOperations) != null ? _Zb : true,
|
|
3746
|
+
useNativeEnums: (_$b = (__b = outputOptions.override) == null ? void 0 : __b.useNativeEnums) != null ? _$b : false,
|
|
3747
|
+
suppressReadonlyModifier: ((_ac = outputOptions.override) == null ? void 0 : _ac.suppressReadonlyModifier) || false
|
|
3746
3748
|
},
|
|
3747
|
-
allParamsOptional: (
|
|
3748
|
-
urlEncodeParameters: (
|
|
3749
|
-
optionsParamRequired: (
|
|
3750
|
-
propertySortOrder: (
|
|
3749
|
+
allParamsOptional: (_bc = outputOptions.allParamsOptional) != null ? _bc : false,
|
|
3750
|
+
urlEncodeParameters: (_cc = outputOptions.urlEncodeParameters) != null ? _cc : false,
|
|
3751
|
+
optionsParamRequired: (_dc = outputOptions.optionsParamRequired) != null ? _dc : false,
|
|
3752
|
+
propertySortOrder: (_ec = outputOptions.propertySortOrder) != null ? _ec : import_core7.PropertySortOrder.SPECIFICATION
|
|
3751
3753
|
},
|
|
3752
3754
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
3753
3755
|
};
|
|
@@ -3816,7 +3818,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
|
|
|
3816
3818
|
...rest
|
|
3817
3819
|
}
|
|
3818
3820
|
]) => {
|
|
3819
|
-
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;
|
|
3821
|
+
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;
|
|
3820
3822
|
return [
|
|
3821
3823
|
key,
|
|
3822
3824
|
{
|
|
@@ -3879,7 +3881,8 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
|
|
|
3879
3881
|
)
|
|
3880
3882
|
} : {}
|
|
3881
3883
|
},
|
|
3882
|
-
generateEachHttpStatus: (_J = zod2 == null ? void 0 : zod2.generateEachHttpStatus) != null ? _J : false
|
|
3884
|
+
generateEachHttpStatus: (_J = zod2 == null ? void 0 : zod2.generateEachHttpStatus) != null ? _J : false,
|
|
3885
|
+
dateTimeOptions: (_K = zod2 == null ? void 0 : zod2.dateTimeOptions) != null ? _K : {}
|
|
3883
3886
|
}
|
|
3884
3887
|
} : {},
|
|
3885
3888
|
...transformer ? { transformer: normalizePath(transformer, workspace) } : {},
|
|
@@ -3999,6 +4002,10 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions =
|
|
|
3999
4002
|
shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
|
|
4000
4003
|
} : {},
|
|
4001
4004
|
...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
|
|
4005
|
+
...!(0, import_core7.isUndefined)(globalOptions.shouldSplitQueryKey) ? {
|
|
4006
|
+
shouldSplitQueryKey: globalOptions.shouldSplitQueryKey
|
|
4007
|
+
} : {},
|
|
4008
|
+
...!(0, import_core7.isUndefined)(queryOptions.shouldSplitQueryKey) ? { shouldSplitQueryKey: queryOptions.shouldSplitQueryKey } : {},
|
|
4002
4009
|
...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
|
|
4003
4010
|
signal: globalOptions.signal
|
|
4004
4011
|
} : {},
|
|
@@ -4314,7 +4321,7 @@ var generateSpecs = async (config, workspace, projectName) => {
|
|
|
4314
4321
|
return;
|
|
4315
4322
|
}
|
|
4316
4323
|
let hasErrors;
|
|
4317
|
-
const accumulate = (0, import_core11.asyncReduce)(
|
|
4324
|
+
const accumulate = await (0, import_core11.asyncReduce)(
|
|
4318
4325
|
Object.entries(config),
|
|
4319
4326
|
async (acc, [projectName2, options]) => {
|
|
4320
4327
|
try {
|