orval 7.0.0 → 7.1.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
@@ -565,10 +565,8 @@ function isObject(subject) {
565
565
  return typeof subject === "object" && subject !== null;
566
566
  }
567
567
  function toArray(sequence) {
568
- if (Array.isArray(sequence))
569
- return sequence;
570
- else if (isNothing(sequence))
571
- return [];
568
+ if (Array.isArray(sequence)) return sequence;
569
+ else if (isNothing(sequence)) return [];
572
570
  return [sequence];
573
571
  }
574
572
  function extend(target, source) {
@@ -608,8 +606,7 @@ var common = {
608
606
  };
609
607
  function formatError(exception2, compact) {
610
608
  var where = "", message = exception2.reason || "(unknown reason)";
611
- if (!exception2.mark)
612
- return message;
609
+ if (!exception2.mark) return message;
613
610
  if (exception2.mark.name) {
614
611
  where += 'in "' + exception2.mark.name + '" ';
615
612
  }
@@ -660,16 +657,11 @@ function padStart(string, max) {
660
657
  }
661
658
  function makeSnippet(mark, options) {
662
659
  options = Object.create(options || null);
663
- if (!mark.buffer)
664
- return null;
665
- if (!options.maxLength)
666
- options.maxLength = 79;
667
- if (typeof options.indent !== "number")
668
- options.indent = 1;
669
- if (typeof options.linesBefore !== "number")
670
- options.linesBefore = 3;
671
- if (typeof options.linesAfter !== "number")
672
- options.linesAfter = 2;
660
+ if (!mark.buffer) return null;
661
+ if (!options.maxLength) options.maxLength = 79;
662
+ if (typeof options.indent !== "number") options.indent = 1;
663
+ if (typeof options.linesBefore !== "number") options.linesBefore = 3;
664
+ if (typeof options.linesAfter !== "number") options.linesAfter = 2;
673
665
  var re = /\r?\n|\r|\0/g;
674
666
  var lineStarts = [0];
675
667
  var lineEnds = [];
@@ -682,14 +674,12 @@ function makeSnippet(mark, options) {
682
674
  foundLineNo = lineStarts.length - 2;
683
675
  }
684
676
  }
685
- if (foundLineNo < 0)
686
- foundLineNo = lineStarts.length - 1;
677
+ if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
687
678
  var result = "", i, line;
688
679
  var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
689
680
  var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
690
681
  for (i = 1; i <= options.linesBefore; i++) {
691
- if (foundLineNo - i < 0)
692
- break;
682
+ if (foundLineNo - i < 0) break;
693
683
  line = getLine(
694
684
  mark.buffer,
695
685
  lineStarts[foundLineNo - i],
@@ -703,8 +693,7 @@ function makeSnippet(mark, options) {
703
693
  result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
704
694
  result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
705
695
  for (i = 1; i <= options.linesAfter; i++) {
706
- if (foundLineNo + i >= lineEnds.length)
707
- break;
696
+ if (foundLineNo + i >= lineEnds.length) break;
708
697
  line = getLine(
709
698
  mark.buffer,
710
699
  lineStarts[foundLineNo + i],
@@ -823,10 +812,8 @@ Schema$1.prototype.extend = function extend2(definition) {
823
812
  } else if (Array.isArray(definition)) {
824
813
  explicit = explicit.concat(definition);
825
814
  } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
826
- if (definition.implicit)
827
- implicit = implicit.concat(definition.implicit);
828
- if (definition.explicit)
829
- explicit = explicit.concat(definition.explicit);
815
+ if (definition.implicit) implicit = implicit.concat(definition.implicit);
816
+ if (definition.explicit) explicit = explicit.concat(definition.explicit);
830
817
  } else {
831
818
  throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
832
819
  }
@@ -881,8 +868,7 @@ var failsafe = new schema({
881
868
  ]
882
869
  });
883
870
  function resolveYamlNull(data) {
884
- if (data === null)
885
- return true;
871
+ if (data === null) return true;
886
872
  var max = data.length;
887
873
  return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
888
874
  }
@@ -917,8 +903,7 @@ var _null = new type("tag:yaml.org,2002:null", {
917
903
  defaultStyle: "lowercase"
918
904
  });
919
905
  function resolveYamlBoolean(data) {
920
- if (data === null)
921
- return false;
906
+ if (data === null) return false;
922
907
  var max = data.length;
923
908
  return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
924
909
  }
@@ -956,27 +941,22 @@ function isDecCode(c) {
956
941
  return 48 <= c && c <= 57;
957
942
  }
958
943
  function resolveYamlInteger(data) {
959
- if (data === null)
960
- return false;
944
+ if (data === null) return false;
961
945
  var max = data.length, index = 0, hasDigits = false, ch;
962
- if (!max)
963
- return false;
946
+ if (!max) return false;
964
947
  ch = data[index];
965
948
  if (ch === "-" || ch === "+") {
966
949
  ch = data[++index];
967
950
  }
968
951
  if (ch === "0") {
969
- if (index + 1 === max)
970
- return true;
952
+ if (index + 1 === max) return true;
971
953
  ch = data[++index];
972
954
  if (ch === "b") {
973
955
  index++;
974
956
  for (; index < max; index++) {
975
957
  ch = data[index];
976
- if (ch === "_")
977
- continue;
978
- if (ch !== "0" && ch !== "1")
979
- return false;
958
+ if (ch === "_") continue;
959
+ if (ch !== "0" && ch !== "1") return false;
980
960
  hasDigits = true;
981
961
  }
982
962
  return hasDigits && ch !== "_";
@@ -985,10 +965,8 @@ function resolveYamlInteger(data) {
985
965
  index++;
986
966
  for (; index < max; index++) {
987
967
  ch = data[index];
988
- if (ch === "_")
989
- continue;
990
- if (!isHexCode(data.charCodeAt(index)))
991
- return false;
968
+ if (ch === "_") continue;
969
+ if (!isHexCode(data.charCodeAt(index))) return false;
992
970
  hasDigits = true;
993
971
  }
994
972
  return hasDigits && ch !== "_";
@@ -997,28 +975,23 @@ function resolveYamlInteger(data) {
997
975
  index++;
998
976
  for (; index < max; index++) {
999
977
  ch = data[index];
1000
- if (ch === "_")
1001
- continue;
1002
- if (!isOctCode(data.charCodeAt(index)))
1003
- return false;
978
+ if (ch === "_") continue;
979
+ if (!isOctCode(data.charCodeAt(index))) return false;
1004
980
  hasDigits = true;
1005
981
  }
1006
982
  return hasDigits && ch !== "_";
1007
983
  }
1008
984
  }
1009
- if (ch === "_")
1010
- return false;
985
+ if (ch === "_") return false;
1011
986
  for (; index < max; index++) {
1012
987
  ch = data[index];
1013
- if (ch === "_")
1014
- continue;
988
+ if (ch === "_") continue;
1015
989
  if (!isDecCode(data.charCodeAt(index))) {
1016
990
  return false;
1017
991
  }
1018
992
  hasDigits = true;
1019
993
  }
1020
- if (!hasDigits || ch === "_")
1021
- return false;
994
+ if (!hasDigits || ch === "_") return false;
1022
995
  return true;
1023
996
  }
1024
997
  function constructYamlInteger(data) {
@@ -1028,20 +1001,15 @@ function constructYamlInteger(data) {
1028
1001
  }
1029
1002
  ch = value[0];
1030
1003
  if (ch === "-" || ch === "+") {
1031
- if (ch === "-")
1032
- sign = -1;
1004
+ if (ch === "-") sign = -1;
1033
1005
  value = value.slice(1);
1034
1006
  ch = value[0];
1035
1007
  }
1036
- if (value === "0")
1037
- return 0;
1008
+ if (value === "0") return 0;
1038
1009
  if (ch === "0") {
1039
- if (value[1] === "b")
1040
- return sign * parseInt(value.slice(2), 2);
1041
- if (value[1] === "x")
1042
- return sign * parseInt(value.slice(2), 16);
1043
- if (value[1] === "o")
1044
- return sign * parseInt(value.slice(2), 8);
1010
+ if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
1011
+ if (value[1] === "x") return sign * parseInt(value.slice(2), 16);
1012
+ if (value[1] === "o") return sign * parseInt(value.slice(2), 8);
1045
1013
  }
1046
1014
  return sign * parseInt(value, 10);
1047
1015
  }
@@ -1081,8 +1049,7 @@ var YAML_FLOAT_PATTERN = new RegExp(
1081
1049
  "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
1082
1050
  );
1083
1051
  function resolveYamlFloat(data) {
1084
- if (data === null)
1085
- return false;
1052
+ if (data === null) return false;
1086
1053
  if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
1087
1054
  // Probably should update regexp & check speed
1088
1055
  data[data.length - 1] === "_") {
@@ -1167,21 +1134,16 @@ var YAML_TIMESTAMP_REGEXP = new RegExp(
1167
1134
  "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
1168
1135
  );
1169
1136
  function resolveYamlTimestamp(data) {
1170
- if (data === null)
1171
- return false;
1172
- if (YAML_DATE_REGEXP.exec(data) !== null)
1173
- return true;
1174
- if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
1175
- return true;
1137
+ if (data === null) return false;
1138
+ if (YAML_DATE_REGEXP.exec(data) !== null) return true;
1139
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
1176
1140
  return false;
1177
1141
  }
1178
1142
  function constructYamlTimestamp(data) {
1179
1143
  var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
1180
1144
  match = YAML_DATE_REGEXP.exec(data);
1181
- if (match === null)
1182
- match = YAML_TIMESTAMP_REGEXP.exec(data);
1183
- if (match === null)
1184
- throw new Error("Date resolve error");
1145
+ if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
1146
+ if (match === null) throw new Error("Date resolve error");
1185
1147
  year = +match[1];
1186
1148
  month = +match[2] - 1;
1187
1149
  day = +match[3];
@@ -1202,12 +1164,10 @@ function constructYamlTimestamp(data) {
1202
1164
  tz_hour = +match[10];
1203
1165
  tz_minute = +(match[11] || 0);
1204
1166
  delta = (tz_hour * 60 + tz_minute) * 6e4;
1205
- if (match[9] === "-")
1206
- delta = -delta;
1167
+ if (match[9] === "-") delta = -delta;
1207
1168
  }
1208
1169
  date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
1209
- if (delta)
1210
- date.setTime(date.getTime() - delta);
1170
+ if (delta) date.setTime(date.getTime() - delta);
1211
1171
  return date;
1212
1172
  }
1213
1173
  function representYamlTimestamp(object) {
@@ -1229,15 +1189,12 @@ var merge = new type("tag:yaml.org,2002:merge", {
1229
1189
  });
1230
1190
  var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
1231
1191
  function resolveYamlBinary(data) {
1232
- if (data === null)
1233
- return false;
1192
+ if (data === null) return false;
1234
1193
  var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP;
1235
1194
  for (idx = 0; idx < max; idx++) {
1236
1195
  code = map2.indexOf(data.charAt(idx));
1237
- if (code > 64)
1238
- continue;
1239
- if (code < 0)
1240
- return false;
1196
+ if (code > 64) continue;
1197
+ if (code < 0) return false;
1241
1198
  bitlen += 6;
1242
1199
  }
1243
1200
  return bitlen % 8 === 0;
@@ -1308,28 +1265,21 @@ var binary = new type("tag:yaml.org,2002:binary", {
1308
1265
  var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
1309
1266
  var _toString$2 = Object.prototype.toString;
1310
1267
  function resolveYamlOmap(data) {
1311
- if (data === null)
1312
- return true;
1268
+ if (data === null) return true;
1313
1269
  var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
1314
1270
  for (index = 0, length = object.length; index < length; index += 1) {
1315
1271
  pair = object[index];
1316
1272
  pairHasKey = false;
1317
- if (_toString$2.call(pair) !== "[object Object]")
1318
- return false;
1273
+ if (_toString$2.call(pair) !== "[object Object]") return false;
1319
1274
  for (pairKey in pair) {
1320
1275
  if (_hasOwnProperty$3.call(pair, pairKey)) {
1321
- if (!pairHasKey)
1322
- pairHasKey = true;
1323
- else
1324
- return false;
1276
+ if (!pairHasKey) pairHasKey = true;
1277
+ else return false;
1325
1278
  }
1326
1279
  }
1327
- if (!pairHasKey)
1328
- return false;
1329
- if (objectKeys.indexOf(pairKey) === -1)
1330
- objectKeys.push(pairKey);
1331
- else
1332
- return false;
1280
+ if (!pairHasKey) return false;
1281
+ if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
1282
+ else return false;
1333
1283
  }
1334
1284
  return true;
1335
1285
  }
@@ -1343,24 +1293,20 @@ var omap = new type("tag:yaml.org,2002:omap", {
1343
1293
  });
1344
1294
  var _toString$1 = Object.prototype.toString;
1345
1295
  function resolveYamlPairs(data) {
1346
- if (data === null)
1347
- return true;
1296
+ if (data === null) return true;
1348
1297
  var index, length, pair, keys, result, object = data;
1349
1298
  result = new Array(object.length);
1350
1299
  for (index = 0, length = object.length; index < length; index += 1) {
1351
1300
  pair = object[index];
1352
- if (_toString$1.call(pair) !== "[object Object]")
1353
- return false;
1301
+ if (_toString$1.call(pair) !== "[object Object]") return false;
1354
1302
  keys = Object.keys(pair);
1355
- if (keys.length !== 1)
1356
- return false;
1303
+ if (keys.length !== 1) return false;
1357
1304
  result[index] = [keys[0], pair[keys[0]]];
1358
1305
  }
1359
1306
  return true;
1360
1307
  }
1361
1308
  function constructYamlPairs(data) {
1362
- if (data === null)
1363
- return [];
1309
+ if (data === null) return [];
1364
1310
  var index, length, pair, keys, result, object = data;
1365
1311
  result = new Array(object.length);
1366
1312
  for (index = 0, length = object.length; index < length; index += 1) {
@@ -1377,13 +1323,11 @@ var pairs = new type("tag:yaml.org,2002:pairs", {
1377
1323
  });
1378
1324
  var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
1379
1325
  function resolveYamlSet(data) {
1380
- if (data === null)
1381
- return true;
1326
+ if (data === null) return true;
1382
1327
  var key, object = data;
1383
1328
  for (key in object) {
1384
1329
  if (_hasOwnProperty$2.call(object, key)) {
1385
- if (object[key] !== null)
1386
- return false;
1330
+ if (object[key] !== null) return false;
1387
1331
  }
1388
1332
  }
1389
1333
  return true;
@@ -2044,8 +1988,7 @@ function readBlockScalar(state, nodeIndent) {
2044
1988
  }
2045
1989
  function readBlockSequence(state, nodeIndent) {
2046
1990
  var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
2047
- if (state.firstTabInLine !== -1)
2048
- return false;
1991
+ if (state.firstTabInLine !== -1) return false;
2049
1992
  if (state.anchor !== null) {
2050
1993
  state.anchorMap[state.anchor] = _result;
2051
1994
  }
@@ -2093,8 +2036,7 @@ function readBlockSequence(state, nodeIndent) {
2093
2036
  }
2094
2037
  function readBlockMapping(state, nodeIndent, flowIndent) {
2095
2038
  var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
2096
- if (state.firstTabInLine !== -1)
2097
- return false;
2039
+ if (state.firstTabInLine !== -1) return false;
2098
2040
  if (state.anchor !== null) {
2099
2041
  state.anchorMap[state.anchor] = _result;
2100
2042
  }
@@ -2204,8 +2146,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) {
2204
2146
  function readTagProperty(state) {
2205
2147
  var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
2206
2148
  ch = state.input.charCodeAt(state.position);
2207
- if (ch !== 33)
2208
- return false;
2149
+ if (ch !== 33) return false;
2209
2150
  if (state.tag !== null) {
2210
2151
  throwError(state, "duplication of a tag property");
2211
2152
  }
@@ -2276,8 +2217,7 @@ function readTagProperty(state) {
2276
2217
  function readAnchorProperty(state) {
2277
2218
  var _position, ch;
2278
2219
  ch = state.input.charCodeAt(state.position);
2279
- if (ch !== 38)
2280
- return false;
2220
+ if (ch !== 38) return false;
2281
2221
  if (state.anchor !== null) {
2282
2222
  throwError(state, "duplication of an anchor property");
2283
2223
  }
@@ -2295,8 +2235,7 @@ function readAnchorProperty(state) {
2295
2235
  function readAlias(state) {
2296
2236
  var _position, alias, ch;
2297
2237
  ch = state.input.charCodeAt(state.position);
2298
- if (ch !== 42)
2299
- return false;
2238
+ if (ch !== 42) return false;
2300
2239
  ch = state.input.charCodeAt(++state.position);
2301
2240
  _position = state.position;
2302
2241
  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
@@ -2472,16 +2411,14 @@ function readDocument(state) {
2472
2411
  } while (ch !== 0 && !is_EOL(ch));
2473
2412
  break;
2474
2413
  }
2475
- if (is_EOL(ch))
2476
- break;
2414
+ if (is_EOL(ch)) break;
2477
2415
  _position = state.position;
2478
2416
  while (ch !== 0 && !is_WS_OR_EOL(ch)) {
2479
2417
  ch = state.input.charCodeAt(++state.position);
2480
2418
  }
2481
2419
  directiveArgs.push(state.input.slice(_position, state.position));
2482
2420
  }
2483
- if (ch !== 0)
2484
- readLineBreak(state);
2421
+ if (ch !== 0) readLineBreak(state);
2485
2422
  if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
2486
2423
  directiveHandlers[directiveName](state, directiveName, directiveArgs);
2487
2424
  } else {
@@ -2633,8 +2570,7 @@ var DEPRECATED_BOOLEANS_SYNTAX = [
2633
2570
  var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
2634
2571
  function compileStyleMap(schema2, map2) {
2635
2572
  var result, keys, index, length, tag, style, type2;
2636
- if (map2 === null)
2637
- return {};
2573
+ if (map2 === null) return {};
2638
2574
  result = {};
2639
2575
  keys = Object.keys(map2);
2640
2576
  for (index = 0, length = keys.length; index < length; index += 1) {
@@ -2703,8 +2639,7 @@ function indentString(string, spaces) {
2703
2639
  line = string.slice(position, next + 1);
2704
2640
  position = next + 1;
2705
2641
  }
2706
- if (line.length && line !== "\n")
2707
- result += ind;
2642
+ if (line.length && line !== "\n") result += ind;
2708
2643
  result += line;
2709
2644
  }
2710
2645
  return result;
@@ -2888,8 +2823,7 @@ function foldString(string, width) {
2888
2823
  return result;
2889
2824
  }
2890
2825
  function foldLine(line, width) {
2891
- if (line === "" || line[0] === " ")
2892
- return line;
2826
+ if (line === "" || line[0] === " ") return line;
2893
2827
  var breakRe = / [^ ]/g;
2894
2828
  var match;
2895
2829
  var start = 0, end, curr = 0, next = 0;
@@ -2920,8 +2854,7 @@ function escapeString(string) {
2920
2854
  escapeSeq = ESCAPE_SEQUENCES[char];
2921
2855
  if (!escapeSeq && isPrintable(char)) {
2922
2856
  result += string[i];
2923
- if (char >= 65536)
2924
- result += string[i + 1];
2857
+ if (char >= 65536) result += string[i + 1];
2925
2858
  } else {
2926
2859
  result += escapeSeq || encodeHex(char);
2927
2860
  }
@@ -2936,8 +2869,7 @@ function writeFlowSequence(state, level, object) {
2936
2869
  value = state.replacer.call(object, String(index), value);
2937
2870
  }
2938
2871
  if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
2939
- if (_result !== "")
2940
- _result += "," + (!state.condenseFlow ? " " : "");
2872
+ if (_result !== "") _result += "," + (!state.condenseFlow ? " " : "");
2941
2873
  _result += state.dump;
2942
2874
  }
2943
2875
  }
@@ -2970,10 +2902,8 @@ function writeFlowMapping(state, level, object) {
2970
2902
  var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
2971
2903
  for (index = 0, length = objectKeyList.length; index < length; index += 1) {
2972
2904
  pairBuffer = "";
2973
- if (_result !== "")
2974
- pairBuffer += ", ";
2975
- if (state.condenseFlow)
2976
- pairBuffer += '"';
2905
+ if (_result !== "") pairBuffer += ", ";
2906
+ if (state.condenseFlow) pairBuffer += '"';
2977
2907
  objectKey = objectKeyList[index];
2978
2908
  objectValue = object[objectKey];
2979
2909
  if (state.replacer) {
@@ -2982,8 +2912,7 @@ function writeFlowMapping(state, level, object) {
2982
2912
  if (!writeNode(state, level, objectKey, false, false)) {
2983
2913
  continue;
2984
2914
  }
2985
- if (state.dump.length > 1024)
2986
- pairBuffer += "? ";
2915
+ if (state.dump.length > 1024) pairBuffer += "? ";
2987
2916
  pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
2988
2917
  if (!writeNode(state, level, objectValue, false, false)) {
2989
2918
  continue;
@@ -3134,8 +3063,7 @@ function writeNode(state, level, object, block, compact, iskey, isblockseq) {
3134
3063
  } else if (type2 === "[object Undefined]") {
3135
3064
  return false;
3136
3065
  } else {
3137
- if (state.skipInvalid)
3138
- return false;
3066
+ if (state.skipInvalid) return false;
3139
3067
  throw new exception("unacceptable kind of an object to dump " + type2);
3140
3068
  }
3141
3069
  if (state.tag !== null && state.tag !== "?") {
@@ -3188,14 +3116,12 @@ function inspectNode(object, objects, duplicatesIndexes) {
3188
3116
  function dump$1(input, options) {
3189
3117
  options = options || {};
3190
3118
  var state = new State(options);
3191
- if (!state.noRefs)
3192
- getDuplicateReferences(input, state);
3119
+ if (!state.noRefs) getDuplicateReferences(input, state);
3193
3120
  var value = input;
3194
3121
  if (state.replacer) {
3195
3122
  value = state.replacer.call({ "": value }, "", value);
3196
3123
  }
3197
- if (writeNode(state, 0, value, true, true))
3198
- return state.dump + "\n";
3124
+ if (writeNode(state, 0, value, true, true)) return state.dump + "\n";
3199
3125
  return "";
3200
3126
  }
3201
3127
  var dump_1 = dump$1;
@@ -3824,7 +3750,7 @@ var import_chalk2 = __toESM(require("chalk"));
3824
3750
  var package_default = {
3825
3751
  name: "orval",
3826
3752
  description: "A swagger client generator for typescript",
3827
- version: "7.0.0",
3753
+ version: "7.1.0",
3828
3754
  license: "MIT",
3829
3755
  files: [
3830
3756
  "dist"
@@ -3878,15 +3804,15 @@ var package_default = {
3878
3804
  },
3879
3805
  dependencies: {
3880
3806
  "@apidevtools/swagger-parser": "^10.1.0",
3881
- "@orval/angular": "7.0.0",
3882
- "@orval/axios": "7.0.0",
3883
- "@orval/core": "7.0.0",
3884
- "@orval/fetch": "7.0.0",
3885
- "@orval/hono": "7.0.0",
3886
- "@orval/mock": "7.0.0",
3887
- "@orval/query": "7.0.0",
3888
- "@orval/swr": "7.0.0",
3889
- "@orval/zod": "7.0.0",
3807
+ "@orval/angular": "7.1.0",
3808
+ "@orval/axios": "7.1.0",
3809
+ "@orval/core": "7.1.0",
3810
+ "@orval/fetch": "7.1.0",
3811
+ "@orval/hono": "7.1.0",
3812
+ "@orval/mock": "7.1.0",
3813
+ "@orval/query": "7.1.0",
3814
+ "@orval/swr": "7.1.0",
3815
+ "@orval/zod": "7.1.0",
3890
3816
  ajv: "^8.12.0",
3891
3817
  cac: "^6.7.14",
3892
3818
  chalk: "^4.1.2",
@@ -4114,7 +4040,7 @@ function defineConfig(options) {
4114
4040
  return options;
4115
4041
  }
4116
4042
  var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
4117
- 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;
4043
+ 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;
4118
4044
  const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
4119
4045
  if (!options.input) {
4120
4046
  (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
@@ -4319,14 +4245,18 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4319
4245
  angular: {
4320
4246
  provideIn: (_Nb = (_Mb = (_Lb = outputOptions.override) == null ? void 0 : _Lb.angular) == null ? void 0 : _Mb.provideIn) != null ? _Nb : "root"
4321
4247
  },
4322
- useDates: ((_Ob = outputOptions.override) == null ? void 0 : _Ob.useDates) || false,
4323
- useDeprecatedOperations: (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.useDeprecatedOperations) != null ? _Qb : true,
4324
- useNativeEnums: (_Sb = (_Rb = outputOptions.override) == null ? void 0 : _Rb.useNativeEnums) != null ? _Sb : false,
4325
- suppressReadonlyModifier: ((_Tb = outputOptions.override) == null ? void 0 : _Tb.suppressReadonlyModifier) || false
4248
+ fetch: {
4249
+ includeHttpStatusReturnType: (_Qb = (_Pb = (_Ob = outputOptions.override) == null ? void 0 : _Ob.fetch) == null ? void 0 : _Pb.includeHttpStatusReturnType) != null ? _Qb : true,
4250
+ ...(_Sb = (_Rb = outputOptions.override) == null ? void 0 : _Rb.fetch) != null ? _Sb : {}
4251
+ },
4252
+ useDates: ((_Tb = outputOptions.override) == null ? void 0 : _Tb.useDates) || false,
4253
+ useDeprecatedOperations: (_Vb = (_Ub = outputOptions.override) == null ? void 0 : _Ub.useDeprecatedOperations) != null ? _Vb : true,
4254
+ useNativeEnums: (_Xb = (_Wb = outputOptions.override) == null ? void 0 : _Wb.useNativeEnums) != null ? _Xb : false,
4255
+ suppressReadonlyModifier: ((_Yb = outputOptions.override) == null ? void 0 : _Yb.suppressReadonlyModifier) || false
4326
4256
  },
4327
- allParamsOptional: (_Ub = outputOptions.allParamsOptional) != null ? _Ub : false,
4328
- urlEncodeParameters: (_Vb = outputOptions.urlEncodeParameters) != null ? _Vb : false,
4329
- optionsParamRequired: (_Wb = outputOptions.optionsParamRequired) != null ? _Wb : false
4257
+ allParamsOptional: (_Zb = outputOptions.allParamsOptional) != null ? _Zb : false,
4258
+ urlEncodeParameters: (__b = outputOptions.urlEncodeParameters) != null ? __b : false,
4259
+ optionsParamRequired: (_$b = outputOptions.optionsParamRequired) != null ? _$b : false
4330
4260
  },
4331
4261
  hooks: options.hooks ? normalizeHooks(options.hooks) : {}
4332
4262
  };
@@ -4601,8 +4531,7 @@ var getDefaultFilesHeader = ({
4601
4531
  // src/utils/watcher.ts
4602
4532
  var import_core8 = require("@orval/core");
4603
4533
  var startWatcher = async (watchOptions, watchFn, defaultTarget = ".") => {
4604
- if (!watchOptions)
4605
- return;
4534
+ if (!watchOptions) return;
4606
4535
  const { watch } = await Promise.resolve().then(() => __toESM(require("chokidar")));
4607
4536
  const ignored = ["**/{.git,node_modules}/**"];
4608
4537
  const watchPaths = typeof watchOptions === "boolean" ? defaultTarget : Array.isArray(watchOptions) ? watchOptions.filter(
@@ -4864,8 +4793,7 @@ var generateSpecs = async (config, workspace, projectName) => {
4864
4793
  },
4865
4794
  []
4866
4795
  );
4867
- if (hasErrors)
4868
- process.exit(1);
4796
+ if (hasErrors) process.exit(1);
4869
4797
  return accumulate;
4870
4798
  };
4871
4799
  var generateConfig = async (configFile, options) => {