orval 7.8.0 → 7.10.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/index.js CHANGED
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
 
31
31
  // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
34
- Options: () => import_core12.Options,
35
- default: () => src_default,
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ Options: () => import_core13.Options,
35
+ default: () => index_default,
36
36
  defineConfig: () => defineConfig,
37
37
  generate: () => generate
38
38
  });
39
- module.exports = __toCommonJS(src_exports);
40
- var import_core12 = require("@orval/core");
39
+ module.exports = __toCommonJS(index_exports);
40
+ var import_core13 = require("@orval/core");
41
41
 
42
42
  // src/generate.ts
43
- var import_core11 = require("@orval/core");
43
+ var import_core12 = require("@orval/core");
44
44
 
45
45
  // src/import-specs.ts
46
46
  var import_swagger_parser = __toESM(require("@apidevtools/swagger-parser"));
@@ -2689,6 +2689,7 @@ var mock = __toESM(require("@orval/mock"));
2689
2689
  var import_query = __toESM(require("@orval/query"));
2690
2690
  var import_swr = __toESM(require("@orval/swr"));
2691
2691
  var import_zod = __toESM(require("@orval/zod"));
2692
+ var import_mcp = __toESM(require("@orval/mcp"));
2692
2693
  var DEFAULT_CLIENT = import_core.OutputClient.AXIOS;
2693
2694
  var getGeneratorClient = (outputClient, output) => {
2694
2695
  const GENERATOR_CLIENT = {
@@ -2701,7 +2702,8 @@ var getGeneratorClient = (outputClient, output) => {
2701
2702
  swr: (0, import_swr.default)()(),
2702
2703
  zod: (0, import_zod.default)()(),
2703
2704
  hono: (0, import_hono.default)()(),
2704
- fetch: (0, import_fetch.default)()()
2705
+ fetch: (0, import_fetch.default)()(),
2706
+ mcp: (0, import_mcp.default)()()
2705
2707
  };
2706
2708
  const generator = (0, import_core.isFunction)(outputClient) ? outputClient(GENERATOR_CLIENT) : GENERATOR_CLIENT[outputClient];
2707
2709
  if (!generator) {
@@ -3240,15 +3242,15 @@ var importSpecs = async (workspace, options) => {
3240
3242
  };
3241
3243
 
3242
3244
  // src/utils/options.ts
3243
- var import_core7 = require("@orval/core");
3245
+ var import_core8 = require("@orval/core");
3244
3246
  var import_mock2 = require("@orval/mock");
3245
- var import_chalk2 = __toESM(require("chalk"));
3247
+ var import_chalk3 = __toESM(require("chalk"));
3246
3248
 
3247
3249
  // package.json
3248
3250
  var package_default = {
3249
3251
  name: "orval",
3250
3252
  description: "A swagger client generator for typescript",
3251
- version: "7.8.0",
3253
+ version: "7.10.0",
3252
3254
  license: "MIT",
3253
3255
  files: [
3254
3256
  "dist"
@@ -3303,15 +3305,16 @@ var package_default = {
3303
3305
  },
3304
3306
  dependencies: {
3305
3307
  "@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",
3308
+ "@orval/angular": "7.10.0",
3309
+ "@orval/axios": "7.10.0",
3310
+ "@orval/core": "7.10.0",
3311
+ "@orval/fetch": "7.10.0",
3312
+ "@orval/hono": "7.10.0",
3313
+ "@orval/mcp": "7.10.0",
3314
+ "@orval/mock": "7.10.0",
3315
+ "@orval/query": "7.10.0",
3316
+ "@orval/swr": "7.10.0",
3317
+ "@orval/zod": "7.10.0",
3315
3318
  ajv: "^8.17.1",
3316
3319
  cac: "^6.7.14",
3317
3320
  chalk: "^4.1.2",
@@ -3319,7 +3322,7 @@ var package_default = {
3319
3322
  enquirer: "^2.4.1",
3320
3323
  execa: "^5.1.1",
3321
3324
  "find-up": "5.0.0",
3322
- "fs-extra": "^11.2.0",
3325
+ "fs-extra": "^11.3.0",
3323
3326
  "lodash.uniq": "^4.5.0",
3324
3327
  "openapi3-ts": "4.2.2",
3325
3328
  "string-argv": "^0.3.2",
@@ -3482,6 +3485,8 @@ var githubResolver = {
3482
3485
  };
3483
3486
 
3484
3487
  // src/utils/package-json.ts
3488
+ var import_core6 = require("@orval/core");
3489
+ var import_chalk2 = __toESM(require("chalk"));
3485
3490
  var import_find_up = __toESM(require("find-up"));
3486
3491
  var import_fs_extra3 = __toESM(require("fs-extra"));
3487
3492
  var loadPackageJson = async (packageJson, workspace = process.cwd()) => {
@@ -3491,26 +3496,88 @@ var loadPackageJson = async (packageJson, workspace = process.cwd()) => {
3491
3496
  });
3492
3497
  if (pkgPath) {
3493
3498
  const pkg = await Promise.resolve().then(() => __toESM(require(pkgPath)));
3494
- return pkg;
3499
+ return await maybeReplaceCatalog(pkg, workspace);
3495
3500
  }
3496
3501
  return;
3497
3502
  }
3498
3503
  const normalizedPath = normalizePath(packageJson, workspace);
3499
3504
  if (import_fs_extra3.default.existsSync(normalizedPath)) {
3500
3505
  const pkg = await Promise.resolve().then(() => __toESM(require(normalizedPath)));
3501
- return pkg;
3506
+ return await maybeReplaceCatalog(pkg, workspace);
3502
3507
  }
3503
3508
  return;
3504
3509
  };
3510
+ var maybeReplaceCatalog = async (pkg, workspace) => {
3511
+ var _a, _b, _c;
3512
+ if (![
3513
+ ...Object.entries((_a = pkg.dependencies) != null ? _a : {}),
3514
+ ...Object.entries((_b = pkg.devDependencies) != null ? _b : {}),
3515
+ ...Object.entries((_c = pkg.peerDependencies) != null ? _c : {})
3516
+ ].some(([, value]) => (0, import_core6.isString)(value) && value.startsWith("catalog:"))) {
3517
+ return pkg;
3518
+ }
3519
+ const filePath = await (0, import_find_up.default)("pnpm-workspace.yaml", { cwd: workspace });
3520
+ if (!filePath) {
3521
+ (0, import_core6.log)(
3522
+ `\u26A0\uFE0F ${import_chalk2.default.yellow("package.json contains pnpm catalog: in dependencies, but no pnpm-workspace.yaml was found.")}`
3523
+ );
3524
+ return pkg;
3525
+ }
3526
+ const file = await import_fs_extra3.default.readFile(filePath, "utf8");
3527
+ const pnpmWorkspaceFile = js_yaml_default.load(file);
3528
+ performSubstitution(pkg.dependencies, pnpmWorkspaceFile);
3529
+ performSubstitution(pkg.devDependencies, pnpmWorkspaceFile);
3530
+ performSubstitution(pkg.peerDependencies, pnpmWorkspaceFile);
3531
+ return pkg;
3532
+ };
3533
+ var performSubstitution = (dependencies, pnpmWorkspaceFile) => {
3534
+ var _a, _b;
3535
+ if (!dependencies) return;
3536
+ for (const [packageName, version] of Object.entries(dependencies)) {
3537
+ if (version === "catalog:" || version === "catalog:default") {
3538
+ if (!pnpmWorkspaceFile.catalog) {
3539
+ (0, import_core6.log)(
3540
+ `\u26A0\uFE0F ${import_chalk2.default.yellow(`when reading from pnpm-workspace.yaml, catalog: substitution for the package '${packageName}' failed as there were no default catalog.`)}`
3541
+ );
3542
+ continue;
3543
+ }
3544
+ const sub = pnpmWorkspaceFile.catalog[packageName];
3545
+ if (!sub) {
3546
+ (0, import_core6.log)(
3547
+ `\u26A0\uFE0F ${import_chalk2.default.yellow(`when reading from pnpm-workspace.yaml, catalog: substitution for the package '${packageName}' failed as there were no matching package in the default catalog.`)}`
3548
+ );
3549
+ continue;
3550
+ }
3551
+ dependencies[packageName] = sub;
3552
+ } else if (version.startsWith("catalog:")) {
3553
+ const catalogName = version.substring("catalog:".length);
3554
+ const catalog = (_a = pnpmWorkspaceFile.catalogs) == null ? void 0 : _a[catalogName];
3555
+ if (!catalog) {
3556
+ (0, import_core6.log)(
3557
+ `\u26A0\uFE0F ${import_chalk2.default.yellow(`when reading from pnpm-workspace.yaml, '${version}' substitution for the package '${packageName}' failed as there were no matching catalog named '${catalogName}'. (available named catalogs are: ${Object.keys((_b = pnpmWorkspaceFile.catalogs) != null ? _b : {}).join(", ")})`)}`
3558
+ );
3559
+ continue;
3560
+ }
3561
+ const sub = catalog[packageName];
3562
+ if (!sub) {
3563
+ (0, import_core6.log)(
3564
+ `\u26A0\uFE0F ${import_chalk2.default.yellow(`when reading from pnpm-workspace.yaml, '${version}' substitution for the package '${packageName}' failed as there were no package in the catalog named '${catalogName}'. (packages in the catalog are: ${Object.keys(catalog).join(", ")})`)}`
3565
+ );
3566
+ continue;
3567
+ }
3568
+ dependencies[packageName] = sub;
3569
+ }
3570
+ }
3571
+ };
3505
3572
 
3506
3573
  // src/utils/tsconfig.ts
3507
- var import_core6 = require("@orval/core");
3574
+ var import_core7 = require("@orval/core");
3508
3575
  var import_find_up2 = __toESM(require("find-up"));
3509
3576
  var import_fs_extra4 = __toESM(require("fs-extra"));
3510
3577
  var import_tsconfck = require("tsconfck");
3511
3578
  var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
3512
3579
  var _a, _b;
3513
- if ((0, import_core6.isUndefined)(tsconfig)) {
3580
+ if ((0, import_core7.isUndefined)(tsconfig)) {
3514
3581
  const configPath = await (0, import_find_up2.default)(["tsconfig.json", "jsconfig.json"], {
3515
3582
  cwd: workspace
3516
3583
  });
@@ -3520,7 +3587,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
3520
3587
  }
3521
3588
  return;
3522
3589
  }
3523
- if ((0, import_core6.isString)(tsconfig)) {
3590
+ if ((0, import_core7.isString)(tsconfig)) {
3524
3591
  const normalizedPath = normalizePath(tsconfig, workspace);
3525
3592
  if (import_fs_extra4.default.existsSync(normalizedPath)) {
3526
3593
  const config = await (0, import_tsconfck.parse)(normalizedPath);
@@ -3531,7 +3598,7 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
3531
3598
  }
3532
3599
  return;
3533
3600
  }
3534
- if ((0, import_core6.isObject)(tsconfig)) {
3601
+ if ((0, import_core7.isObject)(tsconfig)) {
3535
3602
  return tsconfig;
3536
3603
  }
3537
3604
  return;
@@ -3541,19 +3608,44 @@ var loadTsconfig = async (tsconfig, workspace = process.cwd()) => {
3541
3608
  function defineConfig(options) {
3542
3609
  return options;
3543
3610
  }
3611
+ var createFormData = (workspace, formData) => {
3612
+ var _a;
3613
+ const defaultArrayHandling = import_core8.FormDataArrayHandling.SERIALIZE;
3614
+ if (formData === void 0)
3615
+ return { disabled: false, arrayHandling: defaultArrayHandling };
3616
+ if ((0, import_core8.isBoolean)(formData))
3617
+ return { disabled: !formData, arrayHandling: defaultArrayHandling };
3618
+ if ((0, import_core8.isString)(formData))
3619
+ return {
3620
+ disabled: false,
3621
+ mutator: normalizeMutator(workspace, formData),
3622
+ arrayHandling: defaultArrayHandling
3623
+ };
3624
+ if ("mutator" in formData || "arrayHandling" in formData)
3625
+ return {
3626
+ disabled: false,
3627
+ mutator: normalizeMutator(workspace, formData.mutator),
3628
+ arrayHandling: (_a = formData.arrayHandling) != null ? _a : defaultArrayHandling
3629
+ };
3630
+ return {
3631
+ disabled: false,
3632
+ mutator: normalizeMutator(workspace, formData),
3633
+ arrayHandling: defaultArrayHandling
3634
+ };
3635
+ };
3544
3636
  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, _cc, _dc, _ec;
3546
- const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
3637
+ 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, _fc, _gc, _hc, _ic, _jc, _kc, _lc, _mc;
3638
+ const options = await ((0, import_core8.isFunction)(optionsExport) ? optionsExport() : optionsExport);
3547
3639
  if (!options.input) {
3548
- (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
3640
+ (0, import_core8.createLogger)().error(import_chalk3.default.red(`Config require an input`));
3549
3641
  process.exit(1);
3550
3642
  }
3551
3643
  if (!options.output) {
3552
- (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an output`));
3644
+ (0, import_core8.createLogger)().error(import_chalk3.default.red(`Config require an output`));
3553
3645
  process.exit(1);
3554
3646
  }
3555
- const inputOptions = (0, import_core7.isString)(options.input) ? { target: options.input } : options.input;
3556
- const outputOptions = (0, import_core7.isString)(options.output) ? { target: options.output } : options.output;
3647
+ const inputOptions = (0, import_core8.isString)(options.input) ? { target: options.input } : options.input;
3648
+ const outputOptions = (0, import_core8.isString)(options.output) ? { target: options.output } : options.output;
3557
3649
  const outputWorkspace = normalizePath(
3558
3650
  outputOptions.workspace || "",
3559
3651
  workspace
@@ -3571,7 +3663,8 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
3571
3663
  let mock2;
3572
3664
  if (typeof mockOption === "boolean" && mockOption) {
3573
3665
  mock2 = import_mock2.DEFAULT_MOCK_OPTIONS;
3574
- } else if ((0, import_core7.isFunction)(mockOption)) {
3666
+ } else if ((0, import_core8.isFunction)(mockOption)) {
3667
+ mock2 = mockOption;
3575
3668
  } else if (!mockOption) {
3576
3669
  mock2 = void 0;
3577
3670
  } else {
@@ -3602,7 +3695,7 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
3602
3695
  )
3603
3696
  },
3604
3697
  converterOptions: (_d = inputOptions.converterOptions) != null ? _d : {},
3605
- parserOptions: (0, import_core7.mergeDeep)(
3698
+ parserOptions: (0, import_core8.mergeDeep)(
3606
3699
  parserDefaultOptions,
3607
3700
  (_e = inputOptions.parserOptions) != null ? _e : {}
3608
3701
  ),
@@ -3611,11 +3704,11 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
3611
3704
  output: {
3612
3705
  target: globalOptions.output ? normalizePath(globalOptions.output, process.cwd()) : normalizePath(outputOptions.target, outputWorkspace),
3613
3706
  schemas: normalizePath(outputOptions.schemas, outputWorkspace),
3614
- namingConvention: outputOptions.namingConvention || import_core7.NamingConvention.CAMEL_CASE,
3707
+ namingConvention: outputOptions.namingConvention || import_core8.NamingConvention.CAMEL_CASE,
3615
3708
  fileExtension: outputOptions.fileExtension || defaultFileExtension,
3616
3709
  workspace: outputOptions.workspace ? outputWorkspace : void 0,
3617
- client: (_g = (_f = outputOptions.client) != null ? _f : client) != null ? _g : import_core7.OutputClient.AXIOS_FUNCTIONS,
3618
- httpClient: (_i = (_h = outputOptions.httpClient) != null ? _h : httpClient) != null ? _i : import_core7.OutputHttpClient.AXIOS,
3710
+ client: (_g = (_f = outputOptions.client) != null ? _f : client) != null ? _g : import_core8.OutputClient.AXIOS_FUNCTIONS,
3711
+ httpClient: (_i = (_h = outputOptions.httpClient) != null ? _h : httpClient) != null ? _i : import_core8.OutputHttpClient.AXIOS,
3619
3712
  mode: normalizeOutputMode((_j = outputOptions.mode) != null ? _j : mode),
3620
3713
  mock: mock2,
3621
3714
  clean: (_l = (_k = outputOptions.clean) != null ? _k : clean) != null ? _l : false,
@@ -3634,17 +3727,20 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
3634
3727
  mock: {
3635
3728
  arrayMin: (_y = (_x = (_w = outputOptions.override) == null ? void 0 : _w.mock) == null ? void 0 : _x.arrayMin) != null ? _y : 1,
3636
3729
  arrayMax: (_B = (_A = (_z = outputOptions.override) == null ? void 0 : _z.mock) == null ? void 0 : _A.arrayMax) != null ? _B : 10,
3637
- ...(_D = (_C = outputOptions.override) == null ? void 0 : _C.mock) != null ? _D : {}
3730
+ stringMin: (_E = (_D = (_C = outputOptions.override) == null ? void 0 : _C.mock) == null ? void 0 : _D.stringMin) != null ? _E : 10,
3731
+ stringMax: (_H = (_G = (_F = outputOptions.override) == null ? void 0 : _F.mock) == null ? void 0 : _G.stringMax) != null ? _H : 20,
3732
+ fractionDigits: (_K = (_J = (_I = outputOptions.override) == null ? void 0 : _I.mock) == null ? void 0 : _J.fractionDigits) != null ? _K : 2,
3733
+ ...(_L = outputOptions.override) == null ? void 0 : _L.mock
3638
3734
  },
3639
3735
  operations: normalizeOperationsAndTags(
3640
- (_F = (_E = outputOptions.override) == null ? void 0 : _E.operations) != null ? _F : {},
3736
+ (_N = (_M = outputOptions.override) == null ? void 0 : _M.operations) != null ? _N : {},
3641
3737
  outputWorkspace,
3642
3738
  {
3643
3739
  query: globalQueryOptions
3644
3740
  }
3645
3741
  ),
3646
3742
  tags: normalizeOperationsAndTags(
3647
- (_H = (_G = outputOptions.override) == null ? void 0 : _G.tags) != null ? _H : {},
3743
+ (_P = (_O = outputOptions.override) == null ? void 0 : _O.tags) != null ? _P : {},
3648
3744
  outputWorkspace,
3649
3745
  {
3650
3746
  query: globalQueryOptions
@@ -3652,129 +3748,130 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
3652
3748
  ),
3653
3749
  mutator: normalizeMutator(
3654
3750
  outputWorkspace,
3655
- (_I = outputOptions.override) == null ? void 0 : _I.mutator
3751
+ (_Q = outputOptions.override) == null ? void 0 : _Q.mutator
3656
3752
  ),
3657
- formData: (_M = !(0, import_core7.isBoolean)((_J = outputOptions.override) == null ? void 0 : _J.formData) ? normalizeMutator(
3753
+ formData: createFormData(
3658
3754
  outputWorkspace,
3659
- (_K = outputOptions.override) == null ? void 0 : _K.formData
3660
- ) : (_L = outputOptions.override) == null ? void 0 : _L.formData) != null ? _M : true,
3661
- formUrlEncoded: (_Q = !(0, import_core7.isBoolean)((_N = outputOptions.override) == null ? void 0 : _N.formUrlEncoded) ? normalizeMutator(
3755
+ (_R = outputOptions.override) == null ? void 0 : _R.formData
3756
+ ),
3757
+ formUrlEncoded: (_V = !(0, import_core8.isBoolean)((_S = outputOptions.override) == null ? void 0 : _S.formUrlEncoded) ? normalizeMutator(
3662
3758
  outputWorkspace,
3663
- (_O = outputOptions.override) == null ? void 0 : _O.formUrlEncoded
3664
- ) : (_P = outputOptions.override) == null ? void 0 : _P.formUrlEncoded) != null ? _Q : true,
3759
+ (_T = outputOptions.override) == null ? void 0 : _T.formUrlEncoded
3760
+ ) : (_U = outputOptions.override) == null ? void 0 : _U.formUrlEncoded) != null ? _V : true,
3665
3761
  paramsSerializer: normalizeMutator(
3666
3762
  outputWorkspace,
3667
- (_R = outputOptions.override) == null ? void 0 : _R.paramsSerializer
3763
+ (_W = outputOptions.override) == null ? void 0 : _W.paramsSerializer
3668
3764
  ),
3669
- 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,
3670
- requestOptions: (_W = (_V = outputOptions.override) == null ? void 0 : _V.requestOptions) != null ? _W : true,
3765
+ header: ((_X = outputOptions.override) == null ? void 0 : _X.header) === false ? false : (0, import_core8.isFunction)((_Y = outputOptions.override) == null ? void 0 : _Y.header) ? (_Z = outputOptions.override) == null ? void 0 : _Z.header : getDefaultFilesHeader,
3766
+ requestOptions: (_$ = (__ = outputOptions.override) == null ? void 0 : __.requestOptions) != null ? _$ : true,
3671
3767
  components: {
3672
3768
  schemas: {
3673
- suffix: import_core7.RefComponentSuffix.schemas,
3674
- itemSuffix: (__ = (_Z = (_Y = (_X = outputOptions.override) == null ? void 0 : _X.components) == null ? void 0 : _Y.schemas) == null ? void 0 : _Z.itemSuffix) != null ? __ : "Item",
3675
- ...(_ba = (_aa = (_$ = outputOptions.override) == null ? void 0 : _$.components) == null ? void 0 : _aa.schemas) != null ? _ba : {}
3769
+ suffix: import_core8.RefComponentSuffix.schemas,
3770
+ itemSuffix: (_da = (_ca = (_ba = (_aa = outputOptions.override) == null ? void 0 : _aa.components) == null ? void 0 : _ba.schemas) == null ? void 0 : _ca.itemSuffix) != null ? _da : "Item",
3771
+ ...(_ga = (_fa = (_ea = outputOptions.override) == null ? void 0 : _ea.components) == null ? void 0 : _fa.schemas) != null ? _ga : {}
3676
3772
  },
3677
3773
  responses: {
3678
- suffix: import_core7.RefComponentSuffix.responses,
3679
- ...(_ea = (_da = (_ca = outputOptions.override) == null ? void 0 : _ca.components) == null ? void 0 : _da.responses) != null ? _ea : {}
3774
+ suffix: import_core8.RefComponentSuffix.responses,
3775
+ ...(_ja = (_ia = (_ha = outputOptions.override) == null ? void 0 : _ha.components) == null ? void 0 : _ia.responses) != null ? _ja : {}
3680
3776
  },
3681
3777
  parameters: {
3682
- suffix: import_core7.RefComponentSuffix.parameters,
3683
- ...(_ha = (_ga = (_fa = outputOptions.override) == null ? void 0 : _fa.components) == null ? void 0 : _ga.parameters) != null ? _ha : {}
3778
+ suffix: import_core8.RefComponentSuffix.parameters,
3779
+ ...(_ma = (_la = (_ka = outputOptions.override) == null ? void 0 : _ka.components) == null ? void 0 : _la.parameters) != null ? _ma : {}
3684
3780
  },
3685
3781
  requestBodies: {
3686
- suffix: import_core7.RefComponentSuffix.requestBodies,
3687
- ...(_ka = (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.components) == null ? void 0 : _ja.requestBodies) != null ? _ka : {}
3782
+ suffix: import_core8.RefComponentSuffix.requestBodies,
3783
+ ...(_pa = (_oa = (_na = outputOptions.override) == null ? void 0 : _na.components) == null ? void 0 : _oa.requestBodies) != null ? _pa : {}
3688
3784
  }
3689
3785
  },
3690
- hono: normalizeHonoOptions((_la = outputOptions.override) == null ? void 0 : _la.hono, workspace),
3786
+ hono: normalizeHonoOptions((_qa = outputOptions.override) == null ? void 0 : _qa.hono, workspace),
3787
+ jsDoc: normalizeJSDocOptions((_ra = outputOptions.override) == null ? void 0 : _ra.jsDoc),
3691
3788
  query: globalQueryOptions,
3692
3789
  zod: {
3693
3790
  strict: {
3694
- 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,
3695
- 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,
3696
- 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,
3697
- 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,
3698
- 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
3791
+ param: (_va = (_ua = (_ta = (_sa = outputOptions.override) == null ? void 0 : _sa.zod) == null ? void 0 : _ta.strict) == null ? void 0 : _ua.param) != null ? _va : false,
3792
+ query: (_za = (_ya = (_xa = (_wa = outputOptions.override) == null ? void 0 : _wa.zod) == null ? void 0 : _xa.strict) == null ? void 0 : _ya.query) != null ? _za : false,
3793
+ header: (_Da = (_Ca = (_Ba = (_Aa = outputOptions.override) == null ? void 0 : _Aa.zod) == null ? void 0 : _Ba.strict) == null ? void 0 : _Ca.header) != null ? _Da : false,
3794
+ body: (_Ha = (_Ga = (_Fa = (_Ea = outputOptions.override) == null ? void 0 : _Ea.zod) == null ? void 0 : _Fa.strict) == null ? void 0 : _Ga.body) != null ? _Ha : false,
3795
+ response: (_La = (_Ka = (_Ja = (_Ia = outputOptions.override) == null ? void 0 : _Ia.zod) == null ? void 0 : _Ja.strict) == null ? void 0 : _Ka.response) != null ? _La : false
3699
3796
  },
3700
3797
  generate: {
3701
- 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,
3702
- 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,
3703
- 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,
3704
- 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,
3705
- 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
3798
+ param: (_Pa = (_Oa = (_Na = (_Ma = outputOptions.override) == null ? void 0 : _Ma.zod) == null ? void 0 : _Na.generate) == null ? void 0 : _Oa.param) != null ? _Pa : true,
3799
+ query: (_Ta = (_Sa = (_Ra = (_Qa = outputOptions.override) == null ? void 0 : _Qa.zod) == null ? void 0 : _Ra.generate) == null ? void 0 : _Sa.query) != null ? _Ta : true,
3800
+ header: (_Xa = (_Wa = (_Va = (_Ua = outputOptions.override) == null ? void 0 : _Ua.zod) == null ? void 0 : _Va.generate) == null ? void 0 : _Wa.header) != null ? _Xa : true,
3801
+ body: (_$a = (__a = (_Za = (_Ya = outputOptions.override) == null ? void 0 : _Ya.zod) == null ? void 0 : _Za.generate) == null ? void 0 : __a.body) != null ? _$a : true,
3802
+ response: (_db = (_cb = (_bb = (_ab = outputOptions.override) == null ? void 0 : _ab.zod) == null ? void 0 : _bb.generate) == null ? void 0 : _cb.response) != null ? _db : true
3706
3803
  },
3707
3804
  coerce: {
3708
- 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,
3709
- 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,
3710
- 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,
3711
- 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,
3712
- 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
3805
+ param: (_hb = (_gb = (_fb = (_eb = outputOptions.override) == null ? void 0 : _eb.zod) == null ? void 0 : _fb.coerce) == null ? void 0 : _gb.param) != null ? _hb : false,
3806
+ query: (_lb = (_kb = (_jb = (_ib = outputOptions.override) == null ? void 0 : _ib.zod) == null ? void 0 : _jb.coerce) == null ? void 0 : _kb.query) != null ? _lb : false,
3807
+ header: (_pb = (_ob = (_nb = (_mb = outputOptions.override) == null ? void 0 : _mb.zod) == null ? void 0 : _nb.coerce) == null ? void 0 : _ob.header) != null ? _pb : false,
3808
+ body: (_tb = (_sb = (_rb = (_qb = outputOptions.override) == null ? void 0 : _qb.zod) == null ? void 0 : _rb.coerce) == null ? void 0 : _sb.body) != null ? _tb : false,
3809
+ response: (_xb = (_wb = (_vb = (_ub = outputOptions.override) == null ? void 0 : _ub.zod) == null ? void 0 : _vb.coerce) == null ? void 0 : _wb.response) != null ? _xb : false
3713
3810
  },
3714
3811
  preprocess: {
3715
- ...((_ub = (_tb = (_sb = outputOptions.override) == null ? void 0 : _sb.zod) == null ? void 0 : _tb.preprocess) == null ? void 0 : _ub.param) ? {
3812
+ ...((_Ab = (_zb = (_yb = outputOptions.override) == null ? void 0 : _yb.zod) == null ? void 0 : _zb.preprocess) == null ? void 0 : _Ab.param) ? {
3716
3813
  param: normalizeMutator(
3717
3814
  workspace,
3718
3815
  outputOptions.override.zod.preprocess.param
3719
3816
  )
3720
3817
  } : {},
3721
- ...((_xb = (_wb = (_vb = outputOptions.override) == null ? void 0 : _vb.zod) == null ? void 0 : _wb.preprocess) == null ? void 0 : _xb.query) ? {
3818
+ ...((_Db = (_Cb = (_Bb = outputOptions.override) == null ? void 0 : _Bb.zod) == null ? void 0 : _Cb.preprocess) == null ? void 0 : _Db.query) ? {
3722
3819
  query: normalizeMutator(
3723
3820
  workspace,
3724
3821
  outputOptions.override.zod.preprocess.query
3725
3822
  )
3726
3823
  } : {},
3727
- ...((_Ab = (_zb = (_yb = outputOptions.override) == null ? void 0 : _yb.zod) == null ? void 0 : _zb.preprocess) == null ? void 0 : _Ab.header) ? {
3824
+ ...((_Gb = (_Fb = (_Eb = outputOptions.override) == null ? void 0 : _Eb.zod) == null ? void 0 : _Fb.preprocess) == null ? void 0 : _Gb.header) ? {
3728
3825
  header: normalizeMutator(
3729
3826
  workspace,
3730
3827
  outputOptions.override.zod.preprocess.header
3731
3828
  )
3732
3829
  } : {},
3733
- ...((_Db = (_Cb = (_Bb = outputOptions.override) == null ? void 0 : _Bb.zod) == null ? void 0 : _Cb.preprocess) == null ? void 0 : _Db.body) ? {
3830
+ ...((_Jb = (_Ib = (_Hb = outputOptions.override) == null ? void 0 : _Hb.zod) == null ? void 0 : _Ib.preprocess) == null ? void 0 : _Jb.body) ? {
3734
3831
  body: normalizeMutator(
3735
3832
  workspace,
3736
3833
  outputOptions.override.zod.preprocess.body
3737
3834
  )
3738
3835
  } : {},
3739
- ...((_Gb = (_Fb = (_Eb = outputOptions.override) == null ? void 0 : _Eb.zod) == null ? void 0 : _Fb.preprocess) == null ? void 0 : _Gb.response) ? {
3836
+ ...((_Mb = (_Lb = (_Kb = outputOptions.override) == null ? void 0 : _Kb.zod) == null ? void 0 : _Lb.preprocess) == null ? void 0 : _Mb.response) ? {
3740
3837
  response: normalizeMutator(
3741
3838
  workspace,
3742
3839
  outputOptions.override.zod.preprocess.response
3743
3840
  )
3744
3841
  } : {}
3745
3842
  },
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 : {}
3843
+ generateEachHttpStatus: (_Pb = (_Ob = (_Nb = outputOptions.override) == null ? void 0 : _Nb.zod) == null ? void 0 : _Ob.generateEachHttpStatus) != null ? _Pb : false,
3844
+ dateTimeOptions: (_Sb = (_Rb = (_Qb = outputOptions.override) == null ? void 0 : _Qb.zod) == null ? void 0 : _Rb.dateTimeOptions) != null ? _Sb : {}
3748
3845
  },
3749
3846
  swr: {
3750
- ...(_Ob = (_Nb = outputOptions.override) == null ? void 0 : _Nb.swr) != null ? _Ob : {}
3847
+ ...(_Ub = (_Tb = outputOptions.override) == null ? void 0 : _Tb.swr) != null ? _Ub : {}
3751
3848
  },
3752
3849
  angular: {
3753
- provideIn: (_Rb = (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.angular) == null ? void 0 : _Qb.provideIn) != null ? _Rb : "root"
3850
+ provideIn: (_Xb = (_Wb = (_Vb = outputOptions.override) == null ? void 0 : _Vb.angular) == null ? void 0 : _Wb.provideIn) != null ? _Xb : "root"
3754
3851
  },
3755
3852
  fetch: {
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 : {}
3853
+ includeHttpResponseReturnType: (__b = (_Zb = (_Yb = outputOptions.override) == null ? void 0 : _Yb.fetch) == null ? void 0 : _Zb.includeHttpResponseReturnType) != null ? __b : true,
3854
+ ...(_ac = (_$b = outputOptions.override) == null ? void 0 : _$b.fetch) != null ? _ac : {}
3758
3855
  },
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
3856
+ useDates: ((_bc = outputOptions.override) == null ? void 0 : _bc.useDates) || false,
3857
+ useDeprecatedOperations: (_dc = (_cc = outputOptions.override) == null ? void 0 : _cc.useDeprecatedOperations) != null ? _dc : true,
3858
+ enumGenerationType: ((_fc = (_ec = outputOptions.override) == null ? void 0 : _ec.useNativeEnums) != null ? _fc : false) ? "enum" : (_hc = (_gc = outputOptions.override) == null ? void 0 : _gc.enumGenerationType) != null ? _hc : "const",
3859
+ suppressReadonlyModifier: ((_ic = outputOptions.override) == null ? void 0 : _ic.suppressReadonlyModifier) || false
3763
3860
  },
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
3861
+ allParamsOptional: (_jc = outputOptions.allParamsOptional) != null ? _jc : false,
3862
+ urlEncodeParameters: (_kc = outputOptions.urlEncodeParameters) != null ? _kc : false,
3863
+ optionsParamRequired: (_lc = outputOptions.optionsParamRequired) != null ? _lc : false,
3864
+ propertySortOrder: (_mc = outputOptions.propertySortOrder) != null ? _mc : import_core8.PropertySortOrder.SPECIFICATION
3768
3865
  },
3769
3866
  hooks: options.hooks ? normalizeHooks(options.hooks) : {}
3770
3867
  };
3771
3868
  if (!normalizedOptions.input.target) {
3772
- (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input target`));
3869
+ (0, import_core8.createLogger)().error(import_chalk3.default.red(`Config require an input target`));
3773
3870
  process.exit(1);
3774
3871
  }
3775
3872
  if (!normalizedOptions.output.target && !normalizedOptions.output.schemas) {
3776
- (0, import_core7.createLogger)().error(
3777
- import_chalk2.default.red(`Config require an output target or schemas`)
3873
+ (0, import_core8.createLogger)().error(
3874
+ import_chalk3.default.red(`Config require an output target or schemas`)
3778
3875
  );
3779
3876
  process.exit(1);
3780
3877
  }
@@ -3786,36 +3883,36 @@ var parserDefaultOptions = {
3786
3883
  };
3787
3884
  var normalizeMutator = (workspace, mutator) => {
3788
3885
  var _a;
3789
- if ((0, import_core7.isObject)(mutator)) {
3886
+ if ((0, import_core8.isObject)(mutator)) {
3790
3887
  if (!mutator.path) {
3791
- (0, import_core7.createLogger)().error(import_chalk2.default.red(`Mutator need a path`));
3888
+ (0, import_core8.createLogger)().error(import_chalk3.default.red(`Mutator need a path`));
3792
3889
  process.exit(1);
3793
3890
  }
3794
3891
  return {
3795
3892
  ...mutator,
3796
- path: import_core7.upath.resolve(workspace, mutator.path),
3893
+ path: import_core8.upath.resolve(workspace, mutator.path),
3797
3894
  default: (_a = mutator.default || !mutator.name) != null ? _a : false
3798
3895
  };
3799
3896
  }
3800
- if ((0, import_core7.isString)(mutator)) {
3897
+ if ((0, import_core8.isString)(mutator)) {
3801
3898
  return {
3802
- path: import_core7.upath.resolve(workspace, mutator),
3899
+ path: import_core8.upath.resolve(workspace, mutator),
3803
3900
  default: true
3804
3901
  };
3805
3902
  }
3806
3903
  return mutator;
3807
3904
  };
3808
3905
  var normalizePathOrUrl = (path, workspace) => {
3809
- if ((0, import_core7.isString)(path) && !(0, import_core7.isUrl)(path)) {
3906
+ if ((0, import_core8.isString)(path) && !(0, import_core8.isUrl)(path)) {
3810
3907
  return normalizePath(path, workspace);
3811
3908
  }
3812
3909
  return path;
3813
3910
  };
3814
3911
  var normalizePath = (path, workspace) => {
3815
- if (!(0, import_core7.isString)(path)) {
3912
+ if (!(0, import_core8.isString)(path)) {
3816
3913
  return path;
3817
3914
  }
3818
- return import_core7.upath.resolve(workspace, path);
3915
+ return import_core8.upath.resolve(workspace, path);
3819
3916
  };
3820
3917
  var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
3821
3918
  return Object.fromEntries(
@@ -3902,11 +3999,9 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
3902
3999
  } : {},
3903
4000
  ...transformer ? { transformer: normalizePath(transformer, workspace) } : {},
3904
4001
  ...mutator ? { mutator: normalizeMutator(workspace, mutator) } : {},
3905
- ...formData ? {
3906
- formData: !(0, import_core7.isBoolean)(formData) ? normalizeMutator(workspace, formData) : formData
3907
- } : {},
4002
+ ...createFormData(workspace, formData),
3908
4003
  ...formUrlEncoded ? {
3909
- formUrlEncoded: !(0, import_core7.isBoolean)(formUrlEncoded) ? normalizeMutator(workspace, formUrlEncoded) : formUrlEncoded
4004
+ formUrlEncoded: !(0, import_core8.isBoolean)(formUrlEncoded) ? normalizeMutator(workspace, formUrlEncoded) : formUrlEncoded
3910
4005
  } : {},
3911
4006
  ...paramsSerializer ? {
3912
4007
  paramsSerializer: normalizeMutator(
@@ -3922,18 +4017,18 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
3922
4017
  };
3923
4018
  var normalizeOutputMode = (mode) => {
3924
4019
  if (!mode) {
3925
- return import_core7.OutputMode.SINGLE;
4020
+ return import_core8.OutputMode.SINGLE;
3926
4021
  }
3927
- if (!Object.values(import_core7.OutputMode).includes(mode)) {
3928
- (0, import_core7.createLogger)().warn(import_chalk2.default.yellow(`Unknown the provided mode => ${mode}`));
3929
- return import_core7.OutputMode.SINGLE;
4022
+ if (!Object.values(import_core8.OutputMode).includes(mode)) {
4023
+ (0, import_core8.createLogger)().warn(import_chalk3.default.yellow(`Unknown the provided mode => ${mode}`));
4024
+ return import_core8.OutputMode.SINGLE;
3930
4025
  }
3931
4026
  return mode;
3932
4027
  };
3933
4028
  var normalizeHooks = (hooks) => {
3934
4029
  const keys = Object.keys(hooks);
3935
4030
  return keys.reduce((acc, key) => {
3936
- if ((0, import_core7.isString)(hooks[key])) {
4031
+ if ((0, import_core8.isString)(hooks[key])) {
3937
4032
  return {
3938
4033
  ...acc,
3939
4034
  [key]: [hooks[key]]
@@ -3943,12 +4038,12 @@ var normalizeHooks = (hooks) => {
3943
4038
  ...acc,
3944
4039
  [key]: hooks[key]
3945
4040
  };
3946
- } else if ((0, import_core7.isFunction)(hooks[key])) {
4041
+ } else if ((0, import_core8.isFunction)(hooks[key])) {
3947
4042
  return {
3948
4043
  ...acc,
3949
4044
  [key]: [hooks[key]]
3950
4045
  };
3951
- } else if ((0, import_core7.isObject)(hooks[key])) {
4046
+ } else if ((0, import_core8.isObject)(hooks[key])) {
3952
4047
  return {
3953
4048
  ...acc,
3954
4049
  [key]: [hooks[key]]
@@ -3960,10 +4055,15 @@ var normalizeHooks = (hooks) => {
3960
4055
  var normalizeHonoOptions = (hono2 = {}, workspace) => {
3961
4056
  var _a, _b;
3962
4057
  return {
3963
- ...hono2.handlers ? { handlers: import_core7.upath.resolve(workspace, hono2.handlers) } : {},
4058
+ ...hono2.handlers ? { handlers: import_core8.upath.resolve(workspace, hono2.handlers) } : {},
3964
4059
  compositeRoute: (_a = hono2.compositeRoute) != null ? _a : "",
3965
4060
  validator: (_b = hono2.validator) != null ? _b : true,
3966
- validatorOutputPath: hono2.validatorOutputPath ? import_core7.upath.resolve(workspace, hono2.validatorOutputPath) : ""
4061
+ validatorOutputPath: hono2.validatorOutputPath ? import_core8.upath.resolve(workspace, hono2.validatorOutputPath) : ""
4062
+ };
4063
+ };
4064
+ var normalizeJSDocOptions = (jsdoc = {}) => {
4065
+ return {
4066
+ ...jsdoc
3967
4067
  };
3968
4068
  };
3969
4069
  var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
@@ -3973,12 +4073,12 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions =
3973
4073
  );
3974
4074
  }
3975
4075
  return {
3976
- ...!(0, import_core7.isUndefined)(queryOptions.usePrefetch) ? { usePrefetch: queryOptions.usePrefetch } : {},
3977
- ...!(0, import_core7.isUndefined)(queryOptions.useQuery) ? { useQuery: queryOptions.useQuery } : {},
3978
- ...!(0, import_core7.isUndefined)(queryOptions.useSuspenseQuery) ? { useSuspenseQuery: queryOptions.useSuspenseQuery } : {},
3979
- ...!(0, import_core7.isUndefined)(queryOptions.useMutation) ? { useMutation: queryOptions.useMutation } : {},
3980
- ...!(0, import_core7.isUndefined)(queryOptions.useInfinite) ? { useInfinite: queryOptions.useInfinite } : {},
3981
- ...!(0, import_core7.isUndefined)(queryOptions.useSuspenseInfiniteQuery) ? { useSuspenseInfiniteQuery: queryOptions.useSuspenseInfiniteQuery } : {},
4076
+ ...!(0, import_core8.isUndefined)(queryOptions.usePrefetch) ? { usePrefetch: queryOptions.usePrefetch } : {},
4077
+ ...!(0, import_core8.isUndefined)(queryOptions.useQuery) ? { useQuery: queryOptions.useQuery } : {},
4078
+ ...!(0, import_core8.isUndefined)(queryOptions.useSuspenseQuery) ? { useSuspenseQuery: queryOptions.useSuspenseQuery } : {},
4079
+ ...!(0, import_core8.isUndefined)(queryOptions.useMutation) ? { useMutation: queryOptions.useMutation } : {},
4080
+ ...!(0, import_core8.isUndefined)(queryOptions.useInfinite) ? { useInfinite: queryOptions.useInfinite } : {},
4081
+ ...!(0, import_core8.isUndefined)(queryOptions.useSuspenseInfiniteQuery) ? { useSuspenseInfiniteQuery: queryOptions.useSuspenseInfiniteQuery } : {},
3982
4082
  ...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
3983
4083
  ...queryOptions.options ? { options: queryOptions.options } : {},
3984
4084
  ...globalOptions.queryKey ? {
@@ -4005,30 +4105,30 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions =
4005
4105
  queryOptions == null ? void 0 : queryOptions.mutationOptions
4006
4106
  )
4007
4107
  } : {},
4008
- ...!(0, import_core7.isUndefined)(globalOptions.shouldExportQueryKey) ? {
4108
+ ...!(0, import_core8.isUndefined)(globalOptions.shouldExportQueryKey) ? {
4009
4109
  shouldExportQueryKey: globalOptions.shouldExportQueryKey
4010
4110
  } : {},
4011
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
4012
- ...!(0, import_core7.isUndefined)(globalOptions.shouldExportHttpClient) ? {
4111
+ ...!(0, import_core8.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
4112
+ ...!(0, import_core8.isUndefined)(globalOptions.shouldExportHttpClient) ? {
4013
4113
  shouldExportHttpClient: globalOptions.shouldExportHttpClient
4014
4114
  } : {},
4015
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
4016
- ...!(0, import_core7.isUndefined)(globalOptions.shouldExportMutatorHooks) ? {
4115
+ ...!(0, import_core8.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
4116
+ ...!(0, import_core8.isUndefined)(globalOptions.shouldExportMutatorHooks) ? {
4017
4117
  shouldExportMutatorHooks: globalOptions.shouldExportMutatorHooks
4018
4118
  } : {},
4019
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
4020
- ...!(0, import_core7.isUndefined)(globalOptions.shouldSplitQueryKey) ? {
4119
+ ...!(0, import_core8.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
4120
+ ...!(0, import_core8.isUndefined)(globalOptions.shouldSplitQueryKey) ? {
4021
4121
  shouldSplitQueryKey: globalOptions.shouldSplitQueryKey
4022
4122
  } : {},
4023
- ...!(0, import_core7.isUndefined)(queryOptions.shouldSplitQueryKey) ? { shouldSplitQueryKey: queryOptions.shouldSplitQueryKey } : {},
4024
- ...!(0, import_core7.isUndefined)(globalOptions.signal) ? {
4123
+ ...!(0, import_core8.isUndefined)(queryOptions.shouldSplitQueryKey) ? { shouldSplitQueryKey: queryOptions.shouldSplitQueryKey } : {},
4124
+ ...!(0, import_core8.isUndefined)(globalOptions.signal) ? {
4025
4125
  signal: globalOptions.signal
4026
4126
  } : {},
4027
- ...!(0, import_core7.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
4028
- ...!(0, import_core7.isUndefined)(globalOptions.version) ? {
4127
+ ...!(0, import_core8.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
4128
+ ...!(0, import_core8.isUndefined)(globalOptions.version) ? {
4029
4129
  version: globalOptions.version
4030
4130
  } : {},
4031
- ...!(0, import_core7.isUndefined)(queryOptions.version) ? { version: queryOptions.version } : {}
4131
+ ...!(0, import_core8.isUndefined)(queryOptions.version) ? { version: queryOptions.version } : {}
4032
4132
  };
4033
4133
  };
4034
4134
  var getDefaultFilesHeader = ({
@@ -4044,7 +4144,7 @@ var getDefaultFilesHeader = ({
4044
4144
  ];
4045
4145
 
4046
4146
  // src/utils/watcher.ts
4047
- var import_core8 = require("@orval/core");
4147
+ var import_core9 = require("@orval/core");
4048
4148
  var startWatcher = async (watchOptions, watchFn, defaultTarget = ".") => {
4049
4149
  if (!watchOptions) return;
4050
4150
  const { watch } = await Promise.resolve().then(() => __toESM(require("chokidar")));
@@ -4052,7 +4152,7 @@ var startWatcher = async (watchOptions, watchFn, defaultTarget = ".") => {
4052
4152
  const watchPaths = typeof watchOptions === "boolean" ? defaultTarget : Array.isArray(watchOptions) ? watchOptions.filter(
4053
4153
  (path) => typeof path === "string"
4054
4154
  ) : watchOptions;
4055
- (0, import_core8.log)(
4155
+ (0, import_core9.log)(
4056
4156
  `Watching for changes in ${Array.isArray(watchPaths) ? watchPaths.map((v) => '"' + v + '"').join(" | ") : '"' + watchPaths + '"'}`
4057
4157
  );
4058
4158
  const watcher = watch(watchPaths, {
@@ -4060,40 +4160,40 @@ var startWatcher = async (watchOptions, watchFn, defaultTarget = ".") => {
4060
4160
  ignored
4061
4161
  });
4062
4162
  watcher.on("all", async (type2, file) => {
4063
- (0, import_core8.log)(`Change detected: ${type2} ${file}`);
4163
+ (0, import_core9.log)(`Change detected: ${type2} ${file}`);
4064
4164
  try {
4065
4165
  await watchFn();
4066
4166
  } catch (e) {
4067
- (0, import_core8.logError)(e);
4167
+ (0, import_core9.logError)(e);
4068
4168
  }
4069
4169
  });
4070
4170
  };
4071
4171
 
4072
4172
  // src/write-specs.ts
4073
- var import_core10 = require("@orval/core");
4074
- var import_chalk4 = __toESM(require("chalk"));
4173
+ var import_core11 = require("@orval/core");
4174
+ var import_chalk5 = __toESM(require("chalk"));
4075
4175
  var import_execa2 = __toESM(require("execa"));
4076
4176
  var import_fs_extra5 = __toESM(require("fs-extra"));
4077
4177
  var import_lodash = __toESM(require("lodash.uniq"));
4078
4178
 
4079
4179
  // src/utils/executeHook.ts
4080
- var import_core9 = require("@orval/core");
4081
- var import_chalk3 = __toESM(require("chalk"));
4180
+ var import_core10 = require("@orval/core");
4181
+ var import_chalk4 = __toESM(require("chalk"));
4082
4182
  var import_execa = __toESM(require("execa"));
4083
4183
  var import_string_argv = require("string-argv");
4084
4184
  var executeHook = async (name, commands = [], args = []) => {
4085
- (0, import_core9.log)(import_chalk3.default.white(`Running ${name} hook...`));
4185
+ (0, import_core10.log)(import_chalk4.default.white(`Running ${name} hook...`));
4086
4186
  for (const command of commands) {
4087
4187
  try {
4088
- if ((0, import_core9.isString)(command)) {
4188
+ if ((0, import_core10.isString)(command)) {
4089
4189
  await executeCommand(command, args);
4090
- } else if ((0, import_core9.isFunction)(command)) {
4190
+ } else if ((0, import_core10.isFunction)(command)) {
4091
4191
  await command(args);
4092
- } else if ((0, import_core9.isObject)(command)) {
4192
+ } else if ((0, import_core10.isObject)(command)) {
4093
4193
  await executeObjectCommand(command, args);
4094
4194
  }
4095
4195
  } catch (e) {
4096
- (0, import_core9.logError)(e, `Failed to run ${name} hook`);
4196
+ (0, import_core10.logError)(e, `Failed to run ${name} hook`);
4097
4197
  }
4098
4198
  }
4099
4199
  };
@@ -4105,9 +4205,9 @@ async function executeObjectCommand(command, args) {
4105
4205
  if (command.injectGeneratedDirsAndFiles === false) {
4106
4206
  args = [];
4107
4207
  }
4108
- if ((0, import_core9.isString)(command.command)) {
4208
+ if ((0, import_core10.isString)(command.command)) {
4109
4209
  await executeCommand(command.command, args);
4110
- } else if ((0, import_core9.isFunction)(command.command)) {
4210
+ } else if ((0, import_core10.isFunction)(command.command)) {
4111
4211
  await command.command();
4112
4212
  }
4113
4213
  }
@@ -4118,7 +4218,7 @@ var getHeader = (option, info) => {
4118
4218
  return "";
4119
4219
  }
4120
4220
  const header = option(info);
4121
- return Array.isArray(header) ? (0, import_core10.jsDoc)({ description: header }) : header;
4221
+ return Array.isArray(header) ? (0, import_core11.jsDoc)({ description: header }) : header;
4122
4222
  };
4123
4223
  var writeSpecs = async (builder, workspace, options, projectName) => {
4124
4224
  var _a, _b;
@@ -4127,7 +4227,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4127
4227
  const projectTitle = projectName || info.title;
4128
4228
  const specsName = Object.keys(schemas).reduce(
4129
4229
  (acc, specKey) => {
4130
- const basePath = import_core10.upath.getSpecName(specKey, target);
4230
+ const basePath = import_core11.upath.getSpecName(specKey, target);
4131
4231
  const name = basePath.slice(1).split("/").join("-");
4132
4232
  acc[specKey] = name;
4133
4233
  return acc;
@@ -4140,8 +4240,8 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4140
4240
  const fileExtension = ["tags", "tags-split", "split"].includes(output.mode) ? ".ts" : (_a = output.fileExtension) != null ? _a : ".ts";
4141
4241
  await Promise.all(
4142
4242
  Object.entries(schemas).map(([specKey, schemas2]) => {
4143
- const schemaPath = !(0, import_core10.isRootKey)(specKey, target) ? import_core10.upath.join(rootSchemaPath, specsName[specKey]) : rootSchemaPath;
4144
- return (0, import_core10.writeSchemas)({
4243
+ const schemaPath = !(0, import_core11.isRootKey)(specKey, target) ? import_core11.upath.join(rootSchemaPath, specsName[specKey]) : rootSchemaPath;
4244
+ return (0, import_core11.writeSchemas)({
4145
4245
  schemaPath,
4146
4246
  schemas: schemas2,
4147
4247
  target,
@@ -4149,7 +4249,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4149
4249
  fileExtension,
4150
4250
  specsName,
4151
4251
  specKey,
4152
- isRootKey: (0, import_core10.isRootKey)(specKey, target),
4252
+ isRootKey: (0, import_core11.isRootKey)(specKey, target),
4153
4253
  header,
4154
4254
  indexFiles: output.indexFiles
4155
4255
  });
@@ -4171,20 +4271,20 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4171
4271
  if (output.workspace) {
4172
4272
  const workspacePath = output.workspace;
4173
4273
  const imports = implementationPaths.filter(
4174
- (path) => !output.mock || !path.endsWith(`.${(0, import_core10.getMockFileExtensionByTypeName)(output.mock)}.ts`)
4274
+ (path) => !output.mock || !path.endsWith(`.${(0, import_core11.getMockFileExtensionByTypeName)(output.mock)}.ts`)
4175
4275
  ).map(
4176
- (path) => import_core10.upath.relativeSafe(
4276
+ (path) => import_core11.upath.relativeSafe(
4177
4277
  workspacePath,
4178
- (0, import_core10.getFileInfo)(path).pathWithoutExtension
4278
+ (0, import_core11.getFileInfo)(path).pathWithoutExtension
4179
4279
  )
4180
4280
  );
4181
4281
  if (output.schemas) {
4182
4282
  imports.push(
4183
- import_core10.upath.relativeSafe(workspacePath, (0, import_core10.getFileInfo)(output.schemas).dirname)
4283
+ import_core11.upath.relativeSafe(workspacePath, (0, import_core11.getFileInfo)(output.schemas).dirname)
4184
4284
  );
4185
4285
  }
4186
4286
  if (output.indexFiles) {
4187
- const indexFile = import_core10.upath.join(workspacePath, "/index.ts");
4287
+ const indexFile = import_core11.upath.join(workspacePath, "/index.ts");
4188
4288
  if (await import_fs_extra5.default.pathExists(indexFile)) {
4189
4289
  const data = await import_fs_extra5.default.readFile(indexFile, "utf8");
4190
4290
  const importsNotDeclared = imports.filter((imp) => !data.includes(imp));
@@ -4214,7 +4314,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4214
4314
  ];
4215
4315
  }
4216
4316
  const paths = [
4217
- ...output.schemas ? [(0, import_core10.getFileInfo)(output.schemas).dirname] : [],
4317
+ ...output.schemas ? [(0, import_core11.getFileInfo)(output.schemas).dirname] : [],
4218
4318
  ...implementationPaths
4219
4319
  ];
4220
4320
  if (options.hooks.afterAllFilesWrite) {
@@ -4228,8 +4328,8 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4228
4328
  try {
4229
4329
  await (0, import_execa2.default)("prettier", ["--write", ...paths]);
4230
4330
  } catch {
4231
- (0, import_core10.log)(
4232
- import_chalk4.default.yellow(
4331
+ (0, import_core11.log)(
4332
+ import_chalk5.default.yellow(
4233
4333
  `\u26A0\uFE0F ${projectTitle ? `${projectTitle} - ` : ""}Prettier not found`
4234
4334
  )
4235
4335
  );
@@ -4240,7 +4340,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4240
4340
  await (0, import_execa2.default)("biome", ["check", "--write", ...paths]);
4241
4341
  } catch (e) {
4242
4342
  const message = e.exitCode === 1 ? e.stdout + e.stderr : `\u26A0\uFE0F ${projectTitle ? `${projectTitle} - ` : ""}biome not found`;
4243
- (0, import_core10.log)(import_chalk4.default.yellow(message));
4343
+ (0, import_core11.log)(import_chalk5.default.yellow(message));
4244
4344
  }
4245
4345
  }
4246
4346
  if (output.docs) {
@@ -4279,22 +4379,22 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
4279
4379
  }
4280
4380
  } catch (e) {
4281
4381
  const message = e.exitCode === 1 ? e.stdout + e.stderr : `\u26A0\uFE0F ${projectTitle ? `${projectTitle} - ` : ""}Unable to generate docs`;
4282
- (0, import_core10.log)(import_chalk4.default.yellow(message));
4382
+ (0, import_core11.log)(import_chalk5.default.yellow(message));
4283
4383
  }
4284
4384
  }
4285
- (0, import_core10.createSuccessMessage)(projectTitle);
4385
+ (0, import_core11.createSuccessMessage)(projectTitle);
4286
4386
  };
4287
4387
  var getWriteMode = (mode) => {
4288
4388
  switch (mode) {
4289
- case import_core10.OutputMode.SPLIT:
4290
- return import_core10.writeSplitMode;
4291
- case import_core10.OutputMode.TAGS:
4292
- return import_core10.writeTagsMode;
4293
- case import_core10.OutputMode.TAGS_SPLIT:
4294
- return import_core10.writeSplitTagsMode;
4295
- case import_core10.OutputMode.SINGLE:
4389
+ case import_core11.OutputMode.SPLIT:
4390
+ return import_core11.writeSplitMode;
4391
+ case import_core11.OutputMode.TAGS:
4392
+ return import_core11.writeTagsMode;
4393
+ case import_core11.OutputMode.TAGS_SPLIT:
4394
+ return import_core11.writeSplitTagsMode;
4395
+ case import_core11.OutputMode.SINGLE:
4296
4396
  default:
4297
- return import_core10.writeSingleMode;
4397
+ return import_core11.writeSingleMode;
4298
4398
  }
4299
4399
  };
4300
4400
 
@@ -4303,18 +4403,18 @@ var generateSpec = async (workspace, options, projectName) => {
4303
4403
  if (options.output.clean) {
4304
4404
  const extraPatterns = Array.isArray(options.output.clean) ? options.output.clean : [];
4305
4405
  if (options.output.target) {
4306
- await (0, import_core11.removeFiles)(
4406
+ await (0, import_core12.removeFiles)(
4307
4407
  ["**/*", "!**/*.d.ts", ...extraPatterns],
4308
- (0, import_core11.getFileInfo)(options.output.target).dirname
4408
+ (0, import_core12.getFileInfo)(options.output.target).dirname
4309
4409
  );
4310
4410
  }
4311
4411
  if (options.output.schemas) {
4312
- await (0, import_core11.removeFiles)(
4412
+ await (0, import_core12.removeFiles)(
4313
4413
  ["**/*", "!**/*.d.ts", ...extraPatterns],
4314
- (0, import_core11.getFileInfo)(options.output.schemas).dirname
4414
+ (0, import_core12.getFileInfo)(options.output.schemas).dirname
4315
4415
  );
4316
4416
  }
4317
- (0, import_core11.log)(`${projectName ? `${projectName}: ` : ""}Cleaning output folder`);
4417
+ (0, import_core12.log)(`${projectName ? `${projectName}: ` : ""}Cleaning output folder`);
4318
4418
  }
4319
4419
  const writeSpecBuilder = await importSpecs(workspace, options);
4320
4420
  await writeSpecs(writeSpecBuilder, workspace, options, projectName);
@@ -4326,24 +4426,24 @@ var generateSpecs = async (config, workspace, projectName) => {
4326
4426
  try {
4327
4427
  await generateSpec(workspace, options, projectName);
4328
4428
  } catch (e) {
4329
- (0, import_core11.logError)(e, projectName);
4429
+ (0, import_core12.logError)(e, projectName);
4330
4430
  process.exit(1);
4331
4431
  }
4332
4432
  } else {
4333
- (0, import_core11.logError)("Project not found");
4433
+ (0, import_core12.logError)("Project not found");
4334
4434
  process.exit(1);
4335
4435
  }
4336
4436
  return;
4337
4437
  }
4338
4438
  let hasErrors;
4339
- const accumulate = await (0, import_core11.asyncReduce)(
4439
+ const accumulate = await (0, import_core12.asyncReduce)(
4340
4440
  Object.entries(config),
4341
4441
  async (acc, [projectName2, options]) => {
4342
4442
  try {
4343
4443
  acc.push(await generateSpec(workspace, options, projectName2));
4344
4444
  } catch (e) {
4345
4445
  hasErrors = true;
4346
- (0, import_core11.logError)(e, projectName2);
4446
+ (0, import_core12.logError)(e, projectName2);
4347
4447
  }
4348
4448
  return acc;
4349
4449
  },
@@ -4357,15 +4457,15 @@ var generateConfig = async (configFile, options) => {
4357
4457
  path,
4358
4458
  file: configExternal,
4359
4459
  error
4360
- } = await (0, import_core11.loadFile)(configFile, {
4460
+ } = await (0, import_core12.loadFile)(configFile, {
4361
4461
  defaultFileName: "orval.config"
4362
4462
  });
4363
4463
  if (!configExternal) {
4364
4464
  throw `failed to load from ${path} => ${error}`;
4365
4465
  }
4366
- const workspace = import_core11.upath.dirname(path);
4367
- const config = await ((0, import_core11.isFunction)(configExternal) ? configExternal() : configExternal);
4368
- const normalizedConfig = await (0, import_core11.asyncReduce)(
4466
+ const workspace = import_core12.upath.dirname(path);
4467
+ const config = await ((0, import_core12.isFunction)(configExternal) ? configExternal() : configExternal);
4468
+ const normalizedConfig = await (0, import_core12.asyncReduce)(
4369
4469
  Object.entries(config),
4370
4470
  async (acc, [key, value]) => {
4371
4471
  acc[key] = await normalizeOptions(value, workspace, options);
@@ -4375,7 +4475,7 @@ var generateConfig = async (configFile, options) => {
4375
4475
  );
4376
4476
  const fileToWatch = Object.entries(normalizedConfig).filter(
4377
4477
  ([project]) => (options == null ? void 0 : options.projectName) === void 0 || project === (options == null ? void 0 : options.projectName)
4378
- ).map(([, { input }]) => input.target).filter((target) => (0, import_core11.isString)(target));
4478
+ ).map(([, { input }]) => input.target).filter((target) => (0, import_core12.isString)(target));
4379
4479
  if ((options == null ? void 0 : options.watch) && fileToWatch.length) {
4380
4480
  startWatcher(
4381
4481
  options == null ? void 0 : options.watch,
@@ -4388,9 +4488,9 @@ var generateConfig = async (configFile, options) => {
4388
4488
  };
4389
4489
 
4390
4490
  // src/index.ts
4391
- __reExport(src_exports, require("@orval/core"), module.exports);
4491
+ __reExport(index_exports, require("@orval/core"), module.exports);
4392
4492
  var generate = async (optionsExport, workspace = process.cwd(), options) => {
4393
- if (!optionsExport || (0, import_core12.isString)(optionsExport)) {
4493
+ if (!optionsExport || (0, import_core13.isString)(optionsExport)) {
4394
4494
  return generateConfig(optionsExport, options);
4395
4495
  }
4396
4496
  const normalizedOptions = await normalizeOptions(
@@ -4405,7 +4505,7 @@ var generate = async (optionsExport, workspace = process.cwd(), options) => {
4405
4505
  try {
4406
4506
  await generateSpec(workspace, normalizedOptions);
4407
4507
  } catch (e) {
4408
- (0, import_core12.logError)(e, options == null ? void 0 : options.projectName);
4508
+ (0, import_core13.logError)(e, options == null ? void 0 : options.projectName);
4409
4509
  }
4410
4510
  },
4411
4511
  normalizedOptions.input.target
@@ -4414,11 +4514,11 @@ var generate = async (optionsExport, workspace = process.cwd(), options) => {
4414
4514
  try {
4415
4515
  return await generateSpec(workspace, normalizedOptions);
4416
4516
  } catch (e) {
4417
- (0, import_core12.logError)(e, options == null ? void 0 : options.projectName);
4517
+ (0, import_core13.logError)(e, options == null ? void 0 : options.projectName);
4418
4518
  }
4419
4519
  }
4420
4520
  };
4421
- var src_default = generate;
4521
+ var index_default = generate;
4422
4522
  // Annotate the CommonJS export names for ESM import in node:
4423
4523
  0 && (module.exports = {
4424
4524
  Options,