orval 8.16.0 → 8.17.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as description, i as startWatcher, l as name, n as loadConfigFile, r as generateSpec, s as normalizeOptions, t as findConfigFile, u as version } from "../config-4RhXX__A.mjs";
2
+ import { c as description, i as startWatcher, l as name, n as loadConfigFile, r as generateSpec, s as normalizeOptions, t as findConfigFile, u as version } from "../config-DKT1smAv.mjs";
3
3
  import path from "node:path";
4
4
  import { Option, program } from "@commander-js/extra-typings";
5
5
  import { ErrorWithTag, OutputClient, OutputMode, SupportedFormatter, getWarningCount, isString, log, logError, resetWarnings, setVerbose, startMessage } from "@orval/core";
@@ -28,7 +28,7 @@ import fs$2 from "node:fs";
28
28
  import { createJiti } from "jiti";
29
29
  //#region package.json
30
30
  var name = "orval";
31
- var version = "8.16.0";
31
+ var version = "8.17.0";
32
32
  var description = "A swagger client generator for typescript";
33
33
  //#endregion
34
34
  //#region src/client.ts
@@ -939,11 +939,14 @@ async function normalizeOptions(optionsExport, workspace = process.cwd(), global
939
939
  };
940
940
  else if (mocksOption && typeof mocksOption === "object") {
941
941
  if (!Array.isArray(mocksOption.generators)) throw new TypeError("mock.generators must be an array of generator entries (e.g. [{ type: \"msw\" }]).");
942
+ const sharedMockPath = mocksOption.path && isString(mocksOption.path) ? normalizePath(mocksOption.path, outputWorkspace) : void 0;
942
943
  mocks = {
943
944
  indexMockFiles: mocksOption.indexMockFiles ?? false,
945
+ path: sharedMockPath,
944
946
  generators: mocksOption.generators.map((m) => isFunction(m) ? m : {
945
947
  ...getDefaultMockOptionsForType(m.type),
946
- ...m
948
+ ...m,
949
+ path: m.path && isString(m.path) ? normalizePath(m.path, outputWorkspace) : sharedMockPath
947
950
  })
948
951
  };
949
952
  }
@@ -2323,4 +2326,4 @@ async function loadConfigFile(configFilePath) {
2323
2326
  //#endregion
2324
2327
  export { defineConfig as a, description as c, startWatcher as i, name as l, loadConfigFile as n, defineTransformer as o, generateSpec as r, normalizeOptions as s, findConfigFile as t, version as u };
2325
2328
 
2326
- //# sourceMappingURL=config-4RhXX__A.mjs.map
2329
+ //# sourceMappingURL=config-DKT1smAv.mjs.map