orval 6.22.1 → 6.23.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 +22 -21
- package/dist/index.js +22 -21
- package/package.json +8 -8
package/dist/bin/orval.js
CHANGED
|
@@ -3782,7 +3782,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3782
3782
|
var package_default = {
|
|
3783
3783
|
name: "orval",
|
|
3784
3784
|
description: "A swagger client generator for typescript",
|
|
3785
|
-
version: "6.
|
|
3785
|
+
version: "6.23.0",
|
|
3786
3786
|
license: "MIT",
|
|
3787
3787
|
files: [
|
|
3788
3788
|
"dist"
|
|
@@ -3835,13 +3835,13 @@ var package_default = {
|
|
|
3835
3835
|
},
|
|
3836
3836
|
dependencies: {
|
|
3837
3837
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
3838
|
-
"@orval/angular": "6.
|
|
3839
|
-
"@orval/axios": "6.
|
|
3840
|
-
"@orval/core": "6.
|
|
3841
|
-
"@orval/mock": "6.
|
|
3842
|
-
"@orval/query": "6.
|
|
3843
|
-
"@orval/swr": "6.
|
|
3844
|
-
"@orval/zod": "6.
|
|
3838
|
+
"@orval/angular": "6.23.0",
|
|
3839
|
+
"@orval/axios": "6.23.0",
|
|
3840
|
+
"@orval/core": "6.23.0",
|
|
3841
|
+
"@orval/mock": "6.23.0",
|
|
3842
|
+
"@orval/query": "6.23.0",
|
|
3843
|
+
"@orval/swr": "6.23.0",
|
|
3844
|
+
"@orval/zod": "6.23.0",
|
|
3845
3845
|
ajv: "^8.12.0",
|
|
3846
3846
|
cac: "^6.7.14",
|
|
3847
3847
|
chalk: "^4.1.2",
|
|
@@ -4067,7 +4067,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
|
|
|
4067
4067
|
|
|
4068
4068
|
// src/utils/options.ts
|
|
4069
4069
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
4070
|
-
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;
|
|
4070
|
+
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;
|
|
4071
4071
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
4072
4072
|
if (!options.input) {
|
|
4073
4073
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -4171,39 +4171,40 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4171
4171
|
components: {
|
|
4172
4172
|
schemas: {
|
|
4173
4173
|
suffix: import_core7.RefComponentSuffix.schemas,
|
|
4174
|
-
|
|
4174
|
+
itemSuffix: (_T = (_S = (_R = (_Q = outputOptions.override) == null ? void 0 : _Q.components) == null ? void 0 : _R.schemas) == null ? void 0 : _S.itemSuffix) != null ? _T : "Item",
|
|
4175
|
+
...(_W = (_V = (_U = outputOptions.override) == null ? void 0 : _U.components) == null ? void 0 : _V.schemas) != null ? _W : {}
|
|
4175
4176
|
},
|
|
4176
4177
|
responses: {
|
|
4177
4178
|
suffix: import_core7.RefComponentSuffix.responses,
|
|
4178
|
-
...(
|
|
4179
|
+
...(_Z = (_Y = (_X = outputOptions.override) == null ? void 0 : _X.components) == null ? void 0 : _Y.responses) != null ? _Z : {}
|
|
4179
4180
|
},
|
|
4180
4181
|
parameters: {
|
|
4181
4182
|
suffix: import_core7.RefComponentSuffix.parameters,
|
|
4182
|
-
...(
|
|
4183
|
+
...(_aa = (_$ = (__ = outputOptions.override) == null ? void 0 : __.components) == null ? void 0 : _$.parameters) != null ? _aa : {}
|
|
4183
4184
|
},
|
|
4184
4185
|
requestBodies: {
|
|
4185
4186
|
suffix: import_core7.RefComponentSuffix.requestBodies,
|
|
4186
|
-
...(
|
|
4187
|
+
...(_da = (_ca = (_ba = outputOptions.override) == null ? void 0 : _ba.components) == null ? void 0 : _ca.requestBodies) != null ? _da : {}
|
|
4187
4188
|
}
|
|
4188
4189
|
},
|
|
4189
4190
|
query: {
|
|
4190
4191
|
useQuery: true,
|
|
4191
4192
|
useMutation: true,
|
|
4192
4193
|
signal: true,
|
|
4193
|
-
...normalizeQueryOptions((
|
|
4194
|
+
...normalizeQueryOptions((_ea = outputOptions.override) == null ? void 0 : _ea.query, workspace)
|
|
4194
4195
|
},
|
|
4195
4196
|
swr: {
|
|
4196
|
-
...(
|
|
4197
|
+
...(_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.swr) != null ? _ga : {}
|
|
4197
4198
|
},
|
|
4198
4199
|
angular: {
|
|
4199
|
-
provideIn: (
|
|
4200
|
+
provideIn: (_ja = (_ia = (_ha = outputOptions.override) == null ? void 0 : _ha.angular) == null ? void 0 : _ia.provideIn) != null ? _ja : "root"
|
|
4200
4201
|
},
|
|
4201
|
-
useDates: ((
|
|
4202
|
-
useDeprecatedOperations: (
|
|
4203
|
-
useNativeEnums: (
|
|
4202
|
+
useDates: ((_ka = outputOptions.override) == null ? void 0 : _ka.useDates) || false,
|
|
4203
|
+
useDeprecatedOperations: (_ma = (_la = outputOptions.override) == null ? void 0 : _la.useDeprecatedOperations) != null ? _ma : true,
|
|
4204
|
+
useNativeEnums: (_oa = (_na = outputOptions.override) == null ? void 0 : _na.useNativeEnums) != null ? _oa : false
|
|
4204
4205
|
},
|
|
4205
|
-
allParamsOptional: (
|
|
4206
|
-
urlEncodeParameters: (
|
|
4206
|
+
allParamsOptional: (_pa = outputOptions.allParamsOptional) != null ? _pa : false,
|
|
4207
|
+
urlEncodeParameters: (_qa = outputOptions.urlEncodeParameters) != null ? _qa : false
|
|
4207
4208
|
},
|
|
4208
4209
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
4209
4210
|
};
|
package/dist/index.js
CHANGED
|
@@ -3793,7 +3793,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3793
3793
|
var package_default = {
|
|
3794
3794
|
name: "orval",
|
|
3795
3795
|
description: "A swagger client generator for typescript",
|
|
3796
|
-
version: "6.
|
|
3796
|
+
version: "6.23.0",
|
|
3797
3797
|
license: "MIT",
|
|
3798
3798
|
files: [
|
|
3799
3799
|
"dist"
|
|
@@ -3846,13 +3846,13 @@ var package_default = {
|
|
|
3846
3846
|
},
|
|
3847
3847
|
dependencies: {
|
|
3848
3848
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
3849
|
-
"@orval/angular": "6.
|
|
3850
|
-
"@orval/axios": "6.
|
|
3851
|
-
"@orval/core": "6.
|
|
3852
|
-
"@orval/mock": "6.
|
|
3853
|
-
"@orval/query": "6.
|
|
3854
|
-
"@orval/swr": "6.
|
|
3855
|
-
"@orval/zod": "6.
|
|
3849
|
+
"@orval/angular": "6.23.0",
|
|
3850
|
+
"@orval/axios": "6.23.0",
|
|
3851
|
+
"@orval/core": "6.23.0",
|
|
3852
|
+
"@orval/mock": "6.23.0",
|
|
3853
|
+
"@orval/query": "6.23.0",
|
|
3854
|
+
"@orval/swr": "6.23.0",
|
|
3855
|
+
"@orval/zod": "6.23.0",
|
|
3856
3856
|
ajv: "^8.12.0",
|
|
3857
3857
|
cac: "^6.7.14",
|
|
3858
3858
|
chalk: "^4.1.2",
|
|
@@ -4081,7 +4081,7 @@ function defineConfig(options) {
|
|
|
4081
4081
|
return options;
|
|
4082
4082
|
}
|
|
4083
4083
|
var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
|
|
4084
|
-
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;
|
|
4084
|
+
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;
|
|
4085
4085
|
const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
|
|
4086
4086
|
if (!options.input) {
|
|
4087
4087
|
(0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
|
|
@@ -4185,39 +4185,40 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4185
4185
|
components: {
|
|
4186
4186
|
schemas: {
|
|
4187
4187
|
suffix: import_core7.RefComponentSuffix.schemas,
|
|
4188
|
-
|
|
4188
|
+
itemSuffix: (_T = (_S = (_R = (_Q = outputOptions.override) == null ? void 0 : _Q.components) == null ? void 0 : _R.schemas) == null ? void 0 : _S.itemSuffix) != null ? _T : "Item",
|
|
4189
|
+
...(_W = (_V = (_U = outputOptions.override) == null ? void 0 : _U.components) == null ? void 0 : _V.schemas) != null ? _W : {}
|
|
4189
4190
|
},
|
|
4190
4191
|
responses: {
|
|
4191
4192
|
suffix: import_core7.RefComponentSuffix.responses,
|
|
4192
|
-
...(
|
|
4193
|
+
...(_Z = (_Y = (_X = outputOptions.override) == null ? void 0 : _X.components) == null ? void 0 : _Y.responses) != null ? _Z : {}
|
|
4193
4194
|
},
|
|
4194
4195
|
parameters: {
|
|
4195
4196
|
suffix: import_core7.RefComponentSuffix.parameters,
|
|
4196
|
-
...(
|
|
4197
|
+
...(_aa = (_$ = (__ = outputOptions.override) == null ? void 0 : __.components) == null ? void 0 : _$.parameters) != null ? _aa : {}
|
|
4197
4198
|
},
|
|
4198
4199
|
requestBodies: {
|
|
4199
4200
|
suffix: import_core7.RefComponentSuffix.requestBodies,
|
|
4200
|
-
...(
|
|
4201
|
+
...(_da = (_ca = (_ba = outputOptions.override) == null ? void 0 : _ba.components) == null ? void 0 : _ca.requestBodies) != null ? _da : {}
|
|
4201
4202
|
}
|
|
4202
4203
|
},
|
|
4203
4204
|
query: {
|
|
4204
4205
|
useQuery: true,
|
|
4205
4206
|
useMutation: true,
|
|
4206
4207
|
signal: true,
|
|
4207
|
-
...normalizeQueryOptions((
|
|
4208
|
+
...normalizeQueryOptions((_ea = outputOptions.override) == null ? void 0 : _ea.query, workspace)
|
|
4208
4209
|
},
|
|
4209
4210
|
swr: {
|
|
4210
|
-
...(
|
|
4211
|
+
...(_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.swr) != null ? _ga : {}
|
|
4211
4212
|
},
|
|
4212
4213
|
angular: {
|
|
4213
|
-
provideIn: (
|
|
4214
|
+
provideIn: (_ja = (_ia = (_ha = outputOptions.override) == null ? void 0 : _ha.angular) == null ? void 0 : _ia.provideIn) != null ? _ja : "root"
|
|
4214
4215
|
},
|
|
4215
|
-
useDates: ((
|
|
4216
|
-
useDeprecatedOperations: (
|
|
4217
|
-
useNativeEnums: (
|
|
4216
|
+
useDates: ((_ka = outputOptions.override) == null ? void 0 : _ka.useDates) || false,
|
|
4217
|
+
useDeprecatedOperations: (_ma = (_la = outputOptions.override) == null ? void 0 : _la.useDeprecatedOperations) != null ? _ma : true,
|
|
4218
|
+
useNativeEnums: (_oa = (_na = outputOptions.override) == null ? void 0 : _na.useNativeEnums) != null ? _oa : false
|
|
4218
4219
|
},
|
|
4219
|
-
allParamsOptional: (
|
|
4220
|
-
urlEncodeParameters: (
|
|
4220
|
+
allParamsOptional: (_pa = outputOptions.allParamsOptional) != null ? _pa : false,
|
|
4221
|
+
urlEncodeParameters: (_qa = outputOptions.urlEncodeParameters) != null ? _qa : false
|
|
4221
4222
|
},
|
|
4222
4223
|
hooks: options.hooks ? normalizeHooks(options.hooks) : {}
|
|
4223
4224
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orval",
|
|
3
3
|
"description": "A swagger client generator for typescript",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.23.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
57
|
-
"@orval/angular": "6.
|
|
58
|
-
"@orval/axios": "6.
|
|
59
|
-
"@orval/core": "6.
|
|
60
|
-
"@orval/mock": "6.
|
|
61
|
-
"@orval/query": "6.
|
|
62
|
-
"@orval/swr": "6.
|
|
63
|
-
"@orval/zod": "6.
|
|
57
|
+
"@orval/angular": "6.23.0",
|
|
58
|
+
"@orval/axios": "6.23.0",
|
|
59
|
+
"@orval/core": "6.23.0",
|
|
60
|
+
"@orval/mock": "6.23.0",
|
|
61
|
+
"@orval/query": "6.23.0",
|
|
62
|
+
"@orval/swr": "6.23.0",
|
|
63
|
+
"@orval/zod": "6.23.0",
|
|
64
64
|
"ajv": "^8.12.0",
|
|
65
65
|
"cac": "^6.7.14",
|
|
66
66
|
"chalk": "^4.1.2",
|