orval 7.3.0 → 7.4.1

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 CHANGED
@@ -3183,12 +3183,12 @@ var import_mock = require("@orval/mock");
3183
3183
  var import_angular = __toESM(require("@orval/angular"));
3184
3184
  var import_axios = __toESM(require("@orval/axios"));
3185
3185
  var import_core = require("@orval/core");
3186
+ var import_fetch = __toESM(require("@orval/fetch"));
3187
+ var import_hono = __toESM(require("@orval/hono"));
3186
3188
  var mock = __toESM(require("@orval/mock"));
3187
3189
  var import_query = __toESM(require("@orval/query"));
3188
3190
  var import_swr = __toESM(require("@orval/swr"));
3189
3191
  var import_zod = __toESM(require("@orval/zod"));
3190
- var import_hono = __toESM(require("@orval/hono"));
3191
- var import_fetch = __toESM(require("@orval/fetch"));
3192
3192
  var DEFAULT_CLIENT = import_core.OutputClient.AXIOS;
3193
3193
  var getGeneratorClient = (outputClient, output) => {
3194
3194
  const GENERATOR_CLIENT = {
@@ -3305,7 +3305,7 @@ var generateClientFooter = ({
3305
3305
  hasAwaitedType
3306
3306
  });
3307
3307
  }
3308
- } catch (e) {
3308
+ } catch {
3309
3309
  implementation = footer({
3310
3310
  operationNames,
3311
3311
  title: titles.implementation,
@@ -3415,6 +3415,7 @@ var getApiBuilder = async ({
3415
3415
  const api = await (0, import_core2.asyncReduce)(
3416
3416
  Object.entries((_a = context.specs[context.specKey].paths) != null ? _a : {}),
3417
3417
  async (acc, [pathRoute, verbs]) => {
3418
+ var _a2;
3418
3419
  const route = (0, import_core2.getRoute)(pathRoute);
3419
3420
  let resolvedVerbs = verbs;
3420
3421
  let resolvedContext = context;
@@ -3462,13 +3463,11 @@ var getApiBuilder = async ({
3462
3463
  },
3463
3464
  []
3464
3465
  );
3465
- let fullRoute = route;
3466
- if (output.baseUrl) {
3467
- if (output.baseUrl.endsWith("/") && route.startsWith("/")) {
3468
- fullRoute = route.slice(1);
3469
- }
3470
- fullRoute = `${output.baseUrl}${fullRoute}`;
3471
- }
3466
+ const fullRoute = (0, import_core2.getFullRoute)(
3467
+ route,
3468
+ (_a2 = verbs.servers) != null ? _a2 : context.specs[context.specKey].servers,
3469
+ output.baseUrl
3470
+ );
3472
3471
  const pathOperations = await generateOperations(
3473
3472
  output.client,
3474
3473
  verbsOptions,
@@ -3741,7 +3740,7 @@ var import_chalk2 = __toESM(require("chalk"));
3741
3740
  var package_default = {
3742
3741
  name: "orval",
3743
3742
  description: "A swagger client generator for typescript",
3744
- version: "7.3.0",
3743
+ version: "7.4.1",
3745
3744
  license: "MIT",
3746
3745
  files: [
3747
3746
  "dist"
@@ -3795,16 +3794,16 @@ var package_default = {
3795
3794
  },
3796
3795
  dependencies: {
3797
3796
  "@apidevtools/swagger-parser": "^10.1.0",
3798
- "@orval/angular": "7.3.0",
3799
- "@orval/axios": "7.3.0",
3800
- "@orval/core": "7.3.0",
3801
- "@orval/fetch": "7.3.0",
3802
- "@orval/hono": "7.3.0",
3803
- "@orval/mock": "7.3.0",
3804
- "@orval/query": "7.3.0",
3805
- "@orval/swr": "7.3.0",
3806
- "@orval/zod": "7.3.0",
3807
- ajv: "^8.12.0",
3797
+ "@orval/angular": "7.4.1",
3798
+ "@orval/axios": "7.4.1",
3799
+ "@orval/core": "7.4.1",
3800
+ "@orval/fetch": "7.4.1",
3801
+ "@orval/hono": "7.4.1",
3802
+ "@orval/mock": "7.4.1",
3803
+ "@orval/query": "7.4.1",
3804
+ "@orval/swr": "7.4.1",
3805
+ "@orval/zod": "7.4.1",
3806
+ ajv: "^8.17.1",
3808
3807
  cac: "^6.7.14",
3809
3808
  chalk: "^4.1.2",
3810
3809
  chokidar: "^4.0.1",
@@ -3815,7 +3814,10 @@ var package_default = {
3815
3814
  "lodash.uniq": "^4.5.0",
3816
3815
  "openapi3-ts": "4.2.2",
3817
3816
  "string-argv": "^0.3.2",
3818
- tsconfck: "^2.0.1"
3817
+ tsconfck: "^2.0.1",
3818
+ typedoc: "0.26.11",
3819
+ "typedoc-plugin-markdown": "4.2.10",
3820
+ typescript: "^5.6.3"
3819
3821
  }
3820
3822
  };
3821
3823
 
@@ -4028,7 +4030,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
4028
4030
 
4029
4031
  // src/utils/options.ts
4030
4032
  var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
4031
- 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;
4033
+ 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;
4032
4034
  const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
4033
4035
  if (!options.input) {
4034
4036
  (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
@@ -4102,31 +4104,32 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4102
4104
  mode: normalizeOutputMode((_j = outputOptions.mode) != null ? _j : mode),
4103
4105
  mock: mock2,
4104
4106
  clean: (_l = (_k = outputOptions.clean) != null ? _k : clean) != null ? _l : false,
4105
- prettier: (_n = (_m = outputOptions.prettier) != null ? _m : prettier) != null ? _n : false,
4106
- tslint: (_p = (_o = outputOptions.tslint) != null ? _o : tslint) != null ? _p : false,
4107
- biome: (_r = (_q = outputOptions.biome) != null ? _q : biome) != null ? _r : false,
4107
+ docs: (_m = outputOptions.docs) != null ? _m : false,
4108
+ prettier: (_o = (_n = outputOptions.prettier) != null ? _n : prettier) != null ? _o : false,
4109
+ tslint: (_q = (_p = outputOptions.tslint) != null ? _p : tslint) != null ? _q : false,
4110
+ biome: (_s = (_r = outputOptions.biome) != null ? _r : biome) != null ? _s : false,
4108
4111
  tsconfig,
4109
4112
  packageJson,
4110
- headers: (_s = outputOptions.headers) != null ? _s : false,
4111
- indexFiles: (_t = outputOptions.indexFiles) != null ? _t : true,
4113
+ headers: (_t = outputOptions.headers) != null ? _t : false,
4114
+ indexFiles: (_u = outputOptions.indexFiles) != null ? _u : true,
4112
4115
  baseUrl: outputOptions.baseUrl,
4113
- unionAddMissingProperties: (_u = outputOptions.unionAddMissingProperties) != null ? _u : false,
4116
+ unionAddMissingProperties: (_v = outputOptions.unionAddMissingProperties) != null ? _v : false,
4114
4117
  override: {
4115
4118
  ...outputOptions.override,
4116
4119
  mock: {
4117
- arrayMin: (_x = (_w = (_v = outputOptions.override) == null ? void 0 : _v.mock) == null ? void 0 : _w.arrayMin) != null ? _x : 1,
4118
- arrayMax: (_A = (_z = (_y = outputOptions.override) == null ? void 0 : _y.mock) == null ? void 0 : _z.arrayMax) != null ? _A : 10,
4119
- ...(_C = (_B = outputOptions.override) == null ? void 0 : _B.mock) != null ? _C : {}
4120
+ arrayMin: (_y = (_x = (_w = outputOptions.override) == null ? void 0 : _w.mock) == null ? void 0 : _x.arrayMin) != null ? _y : 1,
4121
+ arrayMax: (_B = (_A = (_z = outputOptions.override) == null ? void 0 : _z.mock) == null ? void 0 : _A.arrayMax) != null ? _B : 10,
4122
+ ...(_D = (_C = outputOptions.override) == null ? void 0 : _C.mock) != null ? _D : {}
4120
4123
  },
4121
4124
  operations: normalizeOperationsAndTags(
4122
- (_E = (_D = outputOptions.override) == null ? void 0 : _D.operations) != null ? _E : {},
4125
+ (_F = (_E = outputOptions.override) == null ? void 0 : _E.operations) != null ? _F : {},
4123
4126
  outputWorkspace,
4124
4127
  {
4125
4128
  query: globalQueryOptions
4126
4129
  }
4127
4130
  ),
4128
4131
  tags: normalizeOperationsAndTags(
4129
- (_G = (_F = outputOptions.override) == null ? void 0 : _F.tags) != null ? _G : {},
4132
+ (_H = (_G = outputOptions.override) == null ? void 0 : _G.tags) != null ? _H : {},
4130
4133
  outputWorkspace,
4131
4134
  {
4132
4135
  query: globalQueryOptions
@@ -4134,117 +4137,118 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4134
4137
  ),
4135
4138
  mutator: normalizeMutator(
4136
4139
  outputWorkspace,
4137
- (_H = outputOptions.override) == null ? void 0 : _H.mutator
4140
+ (_I = outputOptions.override) == null ? void 0 : _I.mutator
4138
4141
  ),
4139
- formData: (_L = !(0, import_core7.isBoolean)((_I = outputOptions.override) == null ? void 0 : _I.formData) ? normalizeMutator(
4142
+ formData: (_M = !(0, import_core7.isBoolean)((_J = outputOptions.override) == null ? void 0 : _J.formData) ? normalizeMutator(
4140
4143
  outputWorkspace,
4141
- (_J = outputOptions.override) == null ? void 0 : _J.formData
4142
- ) : (_K = outputOptions.override) == null ? void 0 : _K.formData) != null ? _L : true,
4143
- formUrlEncoded: (_P = !(0, import_core7.isBoolean)((_M = outputOptions.override) == null ? void 0 : _M.formUrlEncoded) ? normalizeMutator(
4144
+ (_K = outputOptions.override) == null ? void 0 : _K.formData
4145
+ ) : (_L = outputOptions.override) == null ? void 0 : _L.formData) != null ? _M : true,
4146
+ formUrlEncoded: (_Q = !(0, import_core7.isBoolean)((_N = outputOptions.override) == null ? void 0 : _N.formUrlEncoded) ? normalizeMutator(
4144
4147
  outputWorkspace,
4145
- (_N = outputOptions.override) == null ? void 0 : _N.formUrlEncoded
4146
- ) : (_O = outputOptions.override) == null ? void 0 : _O.formUrlEncoded) != null ? _P : true,
4148
+ (_O = outputOptions.override) == null ? void 0 : _O.formUrlEncoded
4149
+ ) : (_P = outputOptions.override) == null ? void 0 : _P.formUrlEncoded) != null ? _Q : true,
4147
4150
  paramsSerializer: normalizeMutator(
4148
4151
  outputWorkspace,
4149
- (_Q = outputOptions.override) == null ? void 0 : _Q.paramsSerializer
4152
+ (_R = outputOptions.override) == null ? void 0 : _R.paramsSerializer
4150
4153
  ),
4151
- header: ((_R = outputOptions.override) == null ? void 0 : _R.header) === false ? false : (0, import_core7.isFunction)((_S = outputOptions.override) == null ? void 0 : _S.header) ? (_T = outputOptions.override) == null ? void 0 : _T.header : getDefaultFilesHeader,
4152
- requestOptions: (_V = (_U = outputOptions.override) == null ? void 0 : _U.requestOptions) != null ? _V : true,
4154
+ header: ((_S = outputOptions.override) == null ? void 0 : _S.header) === false ? false : (0, import_core7.isFunction)((_T = outputOptions.override) == null ? void 0 : _T.header) ? (_U = outputOptions.override) == null ? void 0 : _U.header : getDefaultFilesHeader,
4155
+ requestOptions: (_W = (_V = outputOptions.override) == null ? void 0 : _V.requestOptions) != null ? _W : true,
4153
4156
  components: {
4154
4157
  schemas: {
4155
4158
  suffix: import_core7.RefComponentSuffix.schemas,
4156
- itemSuffix: (_Z = (_Y = (_X = (_W = outputOptions.override) == null ? void 0 : _W.components) == null ? void 0 : _X.schemas) == null ? void 0 : _Y.itemSuffix) != null ? _Z : "Item",
4157
- ...(_aa = (_$ = (__ = outputOptions.override) == null ? void 0 : __.components) == null ? void 0 : _$.schemas) != null ? _aa : {}
4159
+ itemSuffix: (__ = (_Z = (_Y = (_X = outputOptions.override) == null ? void 0 : _X.components) == null ? void 0 : _Y.schemas) == null ? void 0 : _Z.itemSuffix) != null ? __ : "Item",
4160
+ ...(_ba = (_aa = (_$ = outputOptions.override) == null ? void 0 : _$.components) == null ? void 0 : _aa.schemas) != null ? _ba : {}
4158
4161
  },
4159
4162
  responses: {
4160
4163
  suffix: import_core7.RefComponentSuffix.responses,
4161
- ...(_da = (_ca = (_ba = outputOptions.override) == null ? void 0 : _ba.components) == null ? void 0 : _ca.responses) != null ? _da : {}
4164
+ ...(_ea = (_da = (_ca = outputOptions.override) == null ? void 0 : _ca.components) == null ? void 0 : _da.responses) != null ? _ea : {}
4162
4165
  },
4163
4166
  parameters: {
4164
4167
  suffix: import_core7.RefComponentSuffix.parameters,
4165
- ...(_ga = (_fa = (_ea = outputOptions.override) == null ? void 0 : _ea.components) == null ? void 0 : _fa.parameters) != null ? _ga : {}
4168
+ ...(_ha = (_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.components) == null ? void 0 : _ga.parameters) != null ? _ha : {}
4166
4169
  },
4167
4170
  requestBodies: {
4168
4171
  suffix: import_core7.RefComponentSuffix.requestBodies,
4169
- ...(_ja = (_ia = (_ha = outputOptions.override) == null ? void 0 : _ha.components) == null ? void 0 : _ia.requestBodies) != null ? _ja : {}
4172
+ ...(_ka = (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.components) == null ? void 0 : _ja.requestBodies) != null ? _ka : {}
4170
4173
  }
4171
4174
  },
4172
- hono: normalizeHonoOptions((_ka = outputOptions.override) == null ? void 0 : _ka.hono, workspace),
4175
+ hono: normalizeHonoOptions((_la = outputOptions.override) == null ? void 0 : _la.hono, workspace),
4173
4176
  query: globalQueryOptions,
4174
4177
  zod: {
4175
4178
  strict: {
4176
- param: (_oa = (_na = (_ma = (_la = outputOptions.override) == null ? void 0 : _la.zod) == null ? void 0 : _ma.strict) == null ? void 0 : _na.param) != null ? _oa : false,
4177
- query: (_sa = (_ra = (_qa = (_pa = outputOptions.override) == null ? void 0 : _pa.zod) == null ? void 0 : _qa.strict) == null ? void 0 : _ra.query) != null ? _sa : false,
4178
- header: (_wa = (_va = (_ua = (_ta = outputOptions.override) == null ? void 0 : _ta.zod) == null ? void 0 : _ua.strict) == null ? void 0 : _va.header) != null ? _wa : false,
4179
- body: (_Aa = (_za = (_ya = (_xa = outputOptions.override) == null ? void 0 : _xa.zod) == null ? void 0 : _ya.strict) == null ? void 0 : _za.body) != null ? _Aa : false,
4180
- response: (_Ea = (_Da = (_Ca = (_Ba = outputOptions.override) == null ? void 0 : _Ba.zod) == null ? void 0 : _Ca.strict) == null ? void 0 : _Da.response) != null ? _Ea : false
4179
+ param: (_pa = (_oa = (_na = (_ma = outputOptions.override) == null ? void 0 : _ma.zod) == null ? void 0 : _na.strict) == null ? void 0 : _oa.param) != null ? _pa : false,
4180
+ query: (_ta = (_sa = (_ra = (_qa = outputOptions.override) == null ? void 0 : _qa.zod) == null ? void 0 : _ra.strict) == null ? void 0 : _sa.query) != null ? _ta : false,
4181
+ header: (_xa = (_wa = (_va = (_ua = outputOptions.override) == null ? void 0 : _ua.zod) == null ? void 0 : _va.strict) == null ? void 0 : _wa.header) != null ? _xa : false,
4182
+ body: (_Ba = (_Aa = (_za = (_ya = outputOptions.override) == null ? void 0 : _ya.zod) == null ? void 0 : _za.strict) == null ? void 0 : _Aa.body) != null ? _Ba : false,
4183
+ response: (_Fa = (_Ea = (_Da = (_Ca = outputOptions.override) == null ? void 0 : _Ca.zod) == null ? void 0 : _Da.strict) == null ? void 0 : _Ea.response) != null ? _Fa : false
4181
4184
  },
4182
4185
  generate: {
4183
- param: (_Ia = (_Ha = (_Ga = (_Fa = outputOptions.override) == null ? void 0 : _Fa.zod) == null ? void 0 : _Ga.generate) == null ? void 0 : _Ha.param) != null ? _Ia : true,
4184
- query: (_Ma = (_La = (_Ka = (_Ja = outputOptions.override) == null ? void 0 : _Ja.zod) == null ? void 0 : _Ka.generate) == null ? void 0 : _La.query) != null ? _Ma : true,
4185
- header: (_Qa = (_Pa = (_Oa = (_Na = outputOptions.override) == null ? void 0 : _Na.zod) == null ? void 0 : _Oa.generate) == null ? void 0 : _Pa.header) != null ? _Qa : true,
4186
- body: (_Ua = (_Ta = (_Sa = (_Ra = outputOptions.override) == null ? void 0 : _Ra.zod) == null ? void 0 : _Sa.generate) == null ? void 0 : _Ta.body) != null ? _Ua : true,
4187
- response: (_Ya = (_Xa = (_Wa = (_Va = outputOptions.override) == null ? void 0 : _Va.zod) == null ? void 0 : _Wa.generate) == null ? void 0 : _Xa.response) != null ? _Ya : true
4186
+ param: (_Ja = (_Ia = (_Ha = (_Ga = outputOptions.override) == null ? void 0 : _Ga.zod) == null ? void 0 : _Ha.generate) == null ? void 0 : _Ia.param) != null ? _Ja : true,
4187
+ query: (_Na = (_Ma = (_La = (_Ka = outputOptions.override) == null ? void 0 : _Ka.zod) == null ? void 0 : _La.generate) == null ? void 0 : _Ma.query) != null ? _Na : true,
4188
+ header: (_Ra = (_Qa = (_Pa = (_Oa = outputOptions.override) == null ? void 0 : _Oa.zod) == null ? void 0 : _Pa.generate) == null ? void 0 : _Qa.header) != null ? _Ra : true,
4189
+ body: (_Va = (_Ua = (_Ta = (_Sa = outputOptions.override) == null ? void 0 : _Sa.zod) == null ? void 0 : _Ta.generate) == null ? void 0 : _Ua.body) != null ? _Va : true,
4190
+ response: (_Za = (_Ya = (_Xa = (_Wa = outputOptions.override) == null ? void 0 : _Wa.zod) == null ? void 0 : _Xa.generate) == null ? void 0 : _Ya.response) != null ? _Za : true
4188
4191
  },
4189
4192
  coerce: {
4190
- param: (_ab = (_$a = (__a = (_Za = outputOptions.override) == null ? void 0 : _Za.zod) == null ? void 0 : __a.coerce) == null ? void 0 : _$a.param) != null ? _ab : false,
4191
- query: (_eb = (_db = (_cb = (_bb = outputOptions.override) == null ? void 0 : _bb.zod) == null ? void 0 : _cb.coerce) == null ? void 0 : _db.query) != null ? _eb : false,
4192
- header: (_ib = (_hb = (_gb = (_fb = outputOptions.override) == null ? void 0 : _fb.zod) == null ? void 0 : _gb.coerce) == null ? void 0 : _hb.header) != null ? _ib : false,
4193
- body: (_mb = (_lb = (_kb = (_jb = outputOptions.override) == null ? void 0 : _jb.zod) == null ? void 0 : _kb.coerce) == null ? void 0 : _lb.body) != null ? _mb : false,
4194
- response: (_qb = (_pb = (_ob = (_nb = outputOptions.override) == null ? void 0 : _nb.zod) == null ? void 0 : _ob.coerce) == null ? void 0 : _pb.response) != null ? _qb : false
4193
+ param: (_bb = (_ab = (_$a = (__a = outputOptions.override) == null ? void 0 : __a.zod) == null ? void 0 : _$a.coerce) == null ? void 0 : _ab.param) != null ? _bb : false,
4194
+ query: (_fb = (_eb = (_db = (_cb = outputOptions.override) == null ? void 0 : _cb.zod) == null ? void 0 : _db.coerce) == null ? void 0 : _eb.query) != null ? _fb : false,
4195
+ header: (_jb = (_ib = (_hb = (_gb = outputOptions.override) == null ? void 0 : _gb.zod) == null ? void 0 : _hb.coerce) == null ? void 0 : _ib.header) != null ? _jb : false,
4196
+ body: (_nb = (_mb = (_lb = (_kb = outputOptions.override) == null ? void 0 : _kb.zod) == null ? void 0 : _lb.coerce) == null ? void 0 : _mb.body) != null ? _nb : false,
4197
+ response: (_rb = (_qb = (_pb = (_ob = outputOptions.override) == null ? void 0 : _ob.zod) == null ? void 0 : _pb.coerce) == null ? void 0 : _qb.response) != null ? _rb : false
4195
4198
  },
4196
4199
  preprocess: {
4197
- ...((_tb = (_sb = (_rb = outputOptions.override) == null ? void 0 : _rb.zod) == null ? void 0 : _sb.preprocess) == null ? void 0 : _tb.param) ? {
4200
+ ...((_ub = (_tb = (_sb = outputOptions.override) == null ? void 0 : _sb.zod) == null ? void 0 : _tb.preprocess) == null ? void 0 : _ub.param) ? {
4198
4201
  param: normalizeMutator(
4199
4202
  workspace,
4200
4203
  outputOptions.override.zod.preprocess.param
4201
4204
  )
4202
4205
  } : {},
4203
- ...((_wb = (_vb = (_ub = outputOptions.override) == null ? void 0 : _ub.zod) == null ? void 0 : _vb.preprocess) == null ? void 0 : _wb.query) ? {
4206
+ ...((_xb = (_wb = (_vb = outputOptions.override) == null ? void 0 : _vb.zod) == null ? void 0 : _wb.preprocess) == null ? void 0 : _xb.query) ? {
4204
4207
  query: normalizeMutator(
4205
4208
  workspace,
4206
4209
  outputOptions.override.zod.preprocess.query
4207
4210
  )
4208
4211
  } : {},
4209
- ...((_zb = (_yb = (_xb = outputOptions.override) == null ? void 0 : _xb.zod) == null ? void 0 : _yb.preprocess) == null ? void 0 : _zb.header) ? {
4212
+ ...((_Ab = (_zb = (_yb = outputOptions.override) == null ? void 0 : _yb.zod) == null ? void 0 : _zb.preprocess) == null ? void 0 : _Ab.header) ? {
4210
4213
  header: normalizeMutator(
4211
4214
  workspace,
4212
4215
  outputOptions.override.zod.preprocess.header
4213
4216
  )
4214
4217
  } : {},
4215
- ...((_Cb = (_Bb = (_Ab = outputOptions.override) == null ? void 0 : _Ab.zod) == null ? void 0 : _Bb.preprocess) == null ? void 0 : _Cb.body) ? {
4218
+ ...((_Db = (_Cb = (_Bb = outputOptions.override) == null ? void 0 : _Bb.zod) == null ? void 0 : _Cb.preprocess) == null ? void 0 : _Db.body) ? {
4216
4219
  body: normalizeMutator(
4217
4220
  workspace,
4218
4221
  outputOptions.override.zod.preprocess.body
4219
4222
  )
4220
4223
  } : {},
4221
- ...((_Fb = (_Eb = (_Db = outputOptions.override) == null ? void 0 : _Db.zod) == null ? void 0 : _Eb.preprocess) == null ? void 0 : _Fb.response) ? {
4224
+ ...((_Gb = (_Fb = (_Eb = outputOptions.override) == null ? void 0 : _Eb.zod) == null ? void 0 : _Fb.preprocess) == null ? void 0 : _Gb.response) ? {
4222
4225
  response: normalizeMutator(
4223
4226
  workspace,
4224
4227
  outputOptions.override.zod.preprocess.response
4225
4228
  )
4226
4229
  } : {}
4227
4230
  },
4228
- generateEachHttpStatus: (_Ib = (_Hb = (_Gb = outputOptions.override) == null ? void 0 : _Gb.zod) == null ? void 0 : _Hb.generateEachHttpStatus) != null ? _Ib : false
4231
+ generateEachHttpStatus: (_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.generateEachHttpStatus) != null ? _Jb : false
4229
4232
  },
4230
4233
  swr: {
4231
- ...(_Kb = (_Jb = outputOptions.override) == null ? void 0 : _Jb.swr) != null ? _Kb : {}
4234
+ ...(_Lb = (_Kb = outputOptions.override) == null ? void 0 : _Kb.swr) != null ? _Lb : {}
4232
4235
  },
4233
4236
  angular: {
4234
- provideIn: (_Nb = (_Mb = (_Lb = outputOptions.override) == null ? void 0 : _Lb.angular) == null ? void 0 : _Mb.provideIn) != null ? _Nb : "root"
4237
+ provideIn: (_Ob = (_Nb = (_Mb = outputOptions.override) == null ? void 0 : _Mb.angular) == null ? void 0 : _Nb.provideIn) != null ? _Ob : "root"
4235
4238
  },
4236
4239
  fetch: {
4237
- includeHttpResponseReturnType: (_Qb = (_Pb = (_Ob = outputOptions.override) == null ? void 0 : _Ob.fetch) == null ? void 0 : _Pb.includeHttpResponseReturnType) != null ? _Qb : true,
4238
- ...(_Sb = (_Rb = outputOptions.override) == null ? void 0 : _Rb.fetch) != null ? _Sb : {}
4240
+ includeHttpResponseReturnType: (_Rb = (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.fetch) == null ? void 0 : _Qb.includeHttpResponseReturnType) != null ? _Rb : true,
4241
+ ...(_Tb = (_Sb = outputOptions.override) == null ? void 0 : _Sb.fetch) != null ? _Tb : {}
4239
4242
  },
4240
- useDates: ((_Tb = outputOptions.override) == null ? void 0 : _Tb.useDates) || false,
4241
- useDeprecatedOperations: (_Vb = (_Ub = outputOptions.override) == null ? void 0 : _Ub.useDeprecatedOperations) != null ? _Vb : true,
4242
- useNativeEnums: (_Xb = (_Wb = outputOptions.override) == null ? void 0 : _Wb.useNativeEnums) != null ? _Xb : false,
4243
- suppressReadonlyModifier: ((_Yb = outputOptions.override) == null ? void 0 : _Yb.suppressReadonlyModifier) || false
4243
+ useDates: ((_Ub = outputOptions.override) == null ? void 0 : _Ub.useDates) || false,
4244
+ useDeprecatedOperations: (_Wb = (_Vb = outputOptions.override) == null ? void 0 : _Vb.useDeprecatedOperations) != null ? _Wb : true,
4245
+ useNativeEnums: (_Yb = (_Xb = outputOptions.override) == null ? void 0 : _Xb.useNativeEnums) != null ? _Yb : false,
4246
+ suppressReadonlyModifier: ((_Zb = outputOptions.override) == null ? void 0 : _Zb.suppressReadonlyModifier) || false
4244
4247
  },
4245
- allParamsOptional: (_Zb = outputOptions.allParamsOptional) != null ? _Zb : false,
4246
- urlEncodeParameters: (__b = outputOptions.urlEncodeParameters) != null ? __b : false,
4247
- optionsParamRequired: (_$b = outputOptions.optionsParamRequired) != null ? _$b : false
4248
+ allParamsOptional: (__b = outputOptions.allParamsOptional) != null ? __b : false,
4249
+ urlEncodeParameters: (_$b = outputOptions.urlEncodeParameters) != null ? _$b : false,
4250
+ optionsParamRequired: (_ac = outputOptions.optionsParamRequired) != null ? _ac : false,
4251
+ propertySortOrder: (_bc = outputOptions.propertySortOrder) != null ? _bc : import_core7.PropertySortOrder.SPECIFICATION
4248
4252
  },
4249
4253
  hooks: options.hooks ? normalizeHooks(options.hooks) : {}
4250
4254
  };
@@ -4548,6 +4552,7 @@ var import_chalk4 = __toESM(require("chalk"));
4548
4552
  var import_execa2 = __toESM(require("execa"));
4549
4553
  var import_fs_extra5 = __toESM(require("fs-extra"));
4550
4554
  var import_lodash2 = __toESM(require("lodash.uniq"));
4555
+ var import_typedoc = require("typedoc");
4551
4556
 
4552
4557
  // src/utils/executeHook.ts
4553
4558
  var import_core9 = require("@orval/core");
@@ -4642,7 +4647,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4642
4647
  }
4643
4648
  if (output.workspace) {
4644
4649
  const workspacePath = output.workspace;
4645
- let imports = implementationPaths.filter(
4650
+ const imports = implementationPaths.filter(
4646
4651
  (path) => !output.mock || !path.endsWith(`.${(0, import_core10.getMockFileExtensionByTypeName)(output.mock)}.ts`)
4647
4652
  ).map(
4648
4653
  (path) => import_core10.upath.relativeSafe(
@@ -4698,7 +4703,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4698
4703
  if (output.prettier) {
4699
4704
  try {
4700
4705
  await (0, import_execa2.default)("prettier", ["--write", ...paths]);
4701
- } catch (e) {
4706
+ } catch {
4702
4707
  (0, import_core10.log)(
4703
4708
  import_chalk4.default.yellow(
4704
4709
  `\u26A0\uFE0F ${projectTitle ? `${projectTitle} - ` : ""}Prettier not found`
@@ -4714,6 +4719,39 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4714
4719
  (0, import_core10.log)(import_chalk4.default.yellow(message));
4715
4720
  }
4716
4721
  }
4722
+ if (output.docs) {
4723
+ try {
4724
+ let config = {};
4725
+ let configPath = null;
4726
+ if (typeof output.docs === "object") {
4727
+ ({ configPath = null, ...config } = output.docs);
4728
+ if (configPath) {
4729
+ config.options = configPath;
4730
+ }
4731
+ }
4732
+ const app = await import_typedoc.Application.bootstrapWithPlugins({
4733
+ entryPoints: paths,
4734
+ // Set the custom config location if it has been provided.
4735
+ ...config,
4736
+ plugin: ["typedoc-plugin-markdown"]
4737
+ });
4738
+ if (!app.options.isSet("readme")) {
4739
+ app.options.setValue("readme", "none");
4740
+ }
4741
+ if (!app.options.isSet("logLevel")) {
4742
+ app.options.setValue("logLevel", "None");
4743
+ }
4744
+ const project = await app.convert();
4745
+ if (project) {
4746
+ await app.generateDocs(project, app.options.getValue("out"));
4747
+ } else {
4748
+ throw new Error("TypeDoc not initialised");
4749
+ }
4750
+ } catch (e) {
4751
+ const message = e.exitCode === 1 ? e.stdout + e.stderr : `\u26A0\uFE0F ${projectTitle ? `${projectTitle} - ` : ""}Unable to generate docs`;
4752
+ (0, import_core10.log)(import_chalk4.default.yellow(message));
4753
+ }
4754
+ }
4717
4755
  (0, import_core10.createSuccessMessage)(projectTitle);
4718
4756
  };
4719
4757
  var getWriteMode = (mode) => {