orval 7.4.1 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/orval.js +69 -561
- package/dist/bin/orval.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +73 -562
- package/dist/index.js.map +1 -1
- package/package.json +16 -15
package/dist/bin/orval.js
CHANGED
|
@@ -6,9 +6,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
-
};
|
|
12
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
10
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
11
|
for (let key of __getOwnPropNames(from))
|
|
@@ -26,514 +23,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
23
|
mod
|
|
27
24
|
));
|
|
28
25
|
|
|
29
|
-
// ../../node_modules/lodash.omit/index.js
|
|
30
|
-
var require_lodash = __commonJS({
|
|
31
|
-
"../../node_modules/lodash.omit/index.js"(exports2, module2) {
|
|
32
|
-
"use strict";
|
|
33
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
34
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
35
|
-
var INFINITY = 1 / 0;
|
|
36
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
37
|
-
var argsTag = "[object Arguments]";
|
|
38
|
-
var funcTag = "[object Function]";
|
|
39
|
-
var genTag = "[object GeneratorFunction]";
|
|
40
|
-
var symbolTag = "[object Symbol]";
|
|
41
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
42
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
43
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
44
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
45
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
46
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
47
|
-
function apply(func, thisArg, args) {
|
|
48
|
-
switch (args.length) {
|
|
49
|
-
case 0:
|
|
50
|
-
return func.call(thisArg);
|
|
51
|
-
case 1:
|
|
52
|
-
return func.call(thisArg, args[0]);
|
|
53
|
-
case 2:
|
|
54
|
-
return func.call(thisArg, args[0], args[1]);
|
|
55
|
-
case 3:
|
|
56
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
57
|
-
}
|
|
58
|
-
return func.apply(thisArg, args);
|
|
59
|
-
}
|
|
60
|
-
function arrayIncludes(array, value) {
|
|
61
|
-
var length = array ? array.length : 0;
|
|
62
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
63
|
-
}
|
|
64
|
-
function arrayIncludesWith(array, value, comparator) {
|
|
65
|
-
var index = -1, length = array ? array.length : 0;
|
|
66
|
-
while (++index < length) {
|
|
67
|
-
if (comparator(value, array[index])) {
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
function arrayMap(array, iteratee) {
|
|
74
|
-
var index = -1, length = array ? array.length : 0, result = Array(length);
|
|
75
|
-
while (++index < length) {
|
|
76
|
-
result[index] = iteratee(array[index], index, array);
|
|
77
|
-
}
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
function arrayPush(array, values) {
|
|
81
|
-
var index = -1, length = values.length, offset = array.length;
|
|
82
|
-
while (++index < length) {
|
|
83
|
-
array[offset + index] = values[index];
|
|
84
|
-
}
|
|
85
|
-
return array;
|
|
86
|
-
}
|
|
87
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
88
|
-
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
89
|
-
while (fromRight ? index-- : ++index < length) {
|
|
90
|
-
if (predicate(array[index], index, array)) {
|
|
91
|
-
return index;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return -1;
|
|
95
|
-
}
|
|
96
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
97
|
-
if (value !== value) {
|
|
98
|
-
return baseFindIndex(array, baseIsNaN, fromIndex);
|
|
99
|
-
}
|
|
100
|
-
var index = fromIndex - 1, length = array.length;
|
|
101
|
-
while (++index < length) {
|
|
102
|
-
if (array[index] === value) {
|
|
103
|
-
return index;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return -1;
|
|
107
|
-
}
|
|
108
|
-
function baseIsNaN(value) {
|
|
109
|
-
return value !== value;
|
|
110
|
-
}
|
|
111
|
-
function baseTimes(n, iteratee) {
|
|
112
|
-
var index = -1, result = Array(n);
|
|
113
|
-
while (++index < n) {
|
|
114
|
-
result[index] = iteratee(index);
|
|
115
|
-
}
|
|
116
|
-
return result;
|
|
117
|
-
}
|
|
118
|
-
function baseUnary(func) {
|
|
119
|
-
return function(value) {
|
|
120
|
-
return func(value);
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function cacheHas(cache, key) {
|
|
124
|
-
return cache.has(key);
|
|
125
|
-
}
|
|
126
|
-
function getValue(object, key) {
|
|
127
|
-
return object == null ? void 0 : object[key];
|
|
128
|
-
}
|
|
129
|
-
function isHostObject(value) {
|
|
130
|
-
var result = false;
|
|
131
|
-
if (value != null && typeof value.toString != "function") {
|
|
132
|
-
try {
|
|
133
|
-
result = !!(value + "");
|
|
134
|
-
} catch (e) {
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
function overArg(func, transform) {
|
|
140
|
-
return function(arg) {
|
|
141
|
-
return func(transform(arg));
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
var arrayProto = Array.prototype;
|
|
145
|
-
var funcProto = Function.prototype;
|
|
146
|
-
var objectProto = Object.prototype;
|
|
147
|
-
var coreJsData = root["__core-js_shared__"];
|
|
148
|
-
var maskSrcKey = function() {
|
|
149
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
150
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
151
|
-
}();
|
|
152
|
-
var funcToString = funcProto.toString;
|
|
153
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
154
|
-
var objectToString = objectProto.toString;
|
|
155
|
-
var reIsNative = RegExp(
|
|
156
|
-
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
157
|
-
);
|
|
158
|
-
var Symbol2 = root.Symbol;
|
|
159
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
160
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
161
|
-
var splice = arrayProto.splice;
|
|
162
|
-
var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
|
|
163
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
164
|
-
var nativeMax = Math.max;
|
|
165
|
-
var Map = getNative(root, "Map");
|
|
166
|
-
var nativeCreate = getNative(Object, "create");
|
|
167
|
-
function Hash(entries) {
|
|
168
|
-
var index = -1, length = entries ? entries.length : 0;
|
|
169
|
-
this.clear();
|
|
170
|
-
while (++index < length) {
|
|
171
|
-
var entry = entries[index];
|
|
172
|
-
this.set(entry[0], entry[1]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function hashClear() {
|
|
176
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
177
|
-
}
|
|
178
|
-
function hashDelete(key) {
|
|
179
|
-
return this.has(key) && delete this.__data__[key];
|
|
180
|
-
}
|
|
181
|
-
function hashGet(key) {
|
|
182
|
-
var data = this.__data__;
|
|
183
|
-
if (nativeCreate) {
|
|
184
|
-
var result = data[key];
|
|
185
|
-
return result === HASH_UNDEFINED ? void 0 : result;
|
|
186
|
-
}
|
|
187
|
-
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
188
|
-
}
|
|
189
|
-
function hashHas(key) {
|
|
190
|
-
var data = this.__data__;
|
|
191
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
192
|
-
}
|
|
193
|
-
function hashSet(key, value) {
|
|
194
|
-
var data = this.__data__;
|
|
195
|
-
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
196
|
-
return this;
|
|
197
|
-
}
|
|
198
|
-
Hash.prototype.clear = hashClear;
|
|
199
|
-
Hash.prototype["delete"] = hashDelete;
|
|
200
|
-
Hash.prototype.get = hashGet;
|
|
201
|
-
Hash.prototype.has = hashHas;
|
|
202
|
-
Hash.prototype.set = hashSet;
|
|
203
|
-
function ListCache(entries) {
|
|
204
|
-
var index = -1, length = entries ? entries.length : 0;
|
|
205
|
-
this.clear();
|
|
206
|
-
while (++index < length) {
|
|
207
|
-
var entry = entries[index];
|
|
208
|
-
this.set(entry[0], entry[1]);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
function listCacheClear() {
|
|
212
|
-
this.__data__ = [];
|
|
213
|
-
}
|
|
214
|
-
function listCacheDelete(key) {
|
|
215
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
216
|
-
if (index < 0) {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
var lastIndex = data.length - 1;
|
|
220
|
-
if (index == lastIndex) {
|
|
221
|
-
data.pop();
|
|
222
|
-
} else {
|
|
223
|
-
splice.call(data, index, 1);
|
|
224
|
-
}
|
|
225
|
-
return true;
|
|
226
|
-
}
|
|
227
|
-
function listCacheGet(key) {
|
|
228
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
229
|
-
return index < 0 ? void 0 : data[index][1];
|
|
230
|
-
}
|
|
231
|
-
function listCacheHas(key) {
|
|
232
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
233
|
-
}
|
|
234
|
-
function listCacheSet(key, value) {
|
|
235
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
236
|
-
if (index < 0) {
|
|
237
|
-
data.push([key, value]);
|
|
238
|
-
} else {
|
|
239
|
-
data[index][1] = value;
|
|
240
|
-
}
|
|
241
|
-
return this;
|
|
242
|
-
}
|
|
243
|
-
ListCache.prototype.clear = listCacheClear;
|
|
244
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
245
|
-
ListCache.prototype.get = listCacheGet;
|
|
246
|
-
ListCache.prototype.has = listCacheHas;
|
|
247
|
-
ListCache.prototype.set = listCacheSet;
|
|
248
|
-
function MapCache(entries) {
|
|
249
|
-
var index = -1, length = entries ? entries.length : 0;
|
|
250
|
-
this.clear();
|
|
251
|
-
while (++index < length) {
|
|
252
|
-
var entry = entries[index];
|
|
253
|
-
this.set(entry[0], entry[1]);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
function mapCacheClear() {
|
|
257
|
-
this.__data__ = {
|
|
258
|
-
"hash": new Hash(),
|
|
259
|
-
"map": new (Map || ListCache)(),
|
|
260
|
-
"string": new Hash()
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
function mapCacheDelete(key) {
|
|
264
|
-
return getMapData(this, key)["delete"](key);
|
|
265
|
-
}
|
|
266
|
-
function mapCacheGet(key) {
|
|
267
|
-
return getMapData(this, key).get(key);
|
|
268
|
-
}
|
|
269
|
-
function mapCacheHas(key) {
|
|
270
|
-
return getMapData(this, key).has(key);
|
|
271
|
-
}
|
|
272
|
-
function mapCacheSet(key, value) {
|
|
273
|
-
getMapData(this, key).set(key, value);
|
|
274
|
-
return this;
|
|
275
|
-
}
|
|
276
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
277
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
278
|
-
MapCache.prototype.get = mapCacheGet;
|
|
279
|
-
MapCache.prototype.has = mapCacheHas;
|
|
280
|
-
MapCache.prototype.set = mapCacheSet;
|
|
281
|
-
function SetCache(values) {
|
|
282
|
-
var index = -1, length = values ? values.length : 0;
|
|
283
|
-
this.__data__ = new MapCache();
|
|
284
|
-
while (++index < length) {
|
|
285
|
-
this.add(values[index]);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
function setCacheAdd(value) {
|
|
289
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
290
|
-
return this;
|
|
291
|
-
}
|
|
292
|
-
function setCacheHas(value) {
|
|
293
|
-
return this.__data__.has(value);
|
|
294
|
-
}
|
|
295
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
296
|
-
SetCache.prototype.has = setCacheHas;
|
|
297
|
-
function arrayLikeKeys(value, inherited) {
|
|
298
|
-
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
|
299
|
-
var length = result.length, skipIndexes = !!length;
|
|
300
|
-
for (var key in value) {
|
|
301
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
|
|
302
|
-
result.push(key);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return result;
|
|
306
|
-
}
|
|
307
|
-
function assocIndexOf(array, key) {
|
|
308
|
-
var length = array.length;
|
|
309
|
-
while (length--) {
|
|
310
|
-
if (eq(array[length][0], key)) {
|
|
311
|
-
return length;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return -1;
|
|
315
|
-
}
|
|
316
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
317
|
-
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
|
|
318
|
-
if (!length) {
|
|
319
|
-
return result;
|
|
320
|
-
}
|
|
321
|
-
if (iteratee) {
|
|
322
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
323
|
-
}
|
|
324
|
-
if (comparator) {
|
|
325
|
-
includes = arrayIncludesWith;
|
|
326
|
-
isCommon = false;
|
|
327
|
-
} else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
328
|
-
includes = cacheHas;
|
|
329
|
-
isCommon = false;
|
|
330
|
-
values = new SetCache(values);
|
|
331
|
-
}
|
|
332
|
-
outer:
|
|
333
|
-
while (++index < length) {
|
|
334
|
-
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|
335
|
-
value = comparator || value !== 0 ? value : 0;
|
|
336
|
-
if (isCommon && computed === computed) {
|
|
337
|
-
var valuesIndex = valuesLength;
|
|
338
|
-
while (valuesIndex--) {
|
|
339
|
-
if (values[valuesIndex] === computed) {
|
|
340
|
-
continue outer;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
result.push(value);
|
|
344
|
-
} else if (!includes(values, computed, comparator)) {
|
|
345
|
-
result.push(value);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
return result;
|
|
349
|
-
}
|
|
350
|
-
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
351
|
-
var index = -1, length = array.length;
|
|
352
|
-
predicate || (predicate = isFlattenable);
|
|
353
|
-
result || (result = []);
|
|
354
|
-
while (++index < length) {
|
|
355
|
-
var value = array[index];
|
|
356
|
-
if (depth > 0 && predicate(value)) {
|
|
357
|
-
if (depth > 1) {
|
|
358
|
-
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
359
|
-
} else {
|
|
360
|
-
arrayPush(result, value);
|
|
361
|
-
}
|
|
362
|
-
} else if (!isStrict) {
|
|
363
|
-
result[result.length] = value;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return result;
|
|
367
|
-
}
|
|
368
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
369
|
-
var result = keysFunc(object);
|
|
370
|
-
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
371
|
-
}
|
|
372
|
-
function baseIsNative(value) {
|
|
373
|
-
if (!isObject7(value) || isMasked(value)) {
|
|
374
|
-
return false;
|
|
375
|
-
}
|
|
376
|
-
var pattern = isFunction5(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
377
|
-
return pattern.test(toSource(value));
|
|
378
|
-
}
|
|
379
|
-
function baseKeysIn(object) {
|
|
380
|
-
if (!isObject7(object)) {
|
|
381
|
-
return nativeKeysIn(object);
|
|
382
|
-
}
|
|
383
|
-
var isProto = isPrototype(object), result = [];
|
|
384
|
-
for (var key in object) {
|
|
385
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
386
|
-
result.push(key);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
return result;
|
|
390
|
-
}
|
|
391
|
-
function basePick(object, props) {
|
|
392
|
-
object = Object(object);
|
|
393
|
-
return basePickBy(object, props, function(value, key) {
|
|
394
|
-
return key in object;
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
function basePickBy(object, props, predicate) {
|
|
398
|
-
var index = -1, length = props.length, result = {};
|
|
399
|
-
while (++index < length) {
|
|
400
|
-
var key = props[index], value = object[key];
|
|
401
|
-
if (predicate(value, key)) {
|
|
402
|
-
result[key] = value;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
return result;
|
|
406
|
-
}
|
|
407
|
-
function baseRest(func, start) {
|
|
408
|
-
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
409
|
-
return function() {
|
|
410
|
-
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
411
|
-
while (++index < length) {
|
|
412
|
-
array[index] = args[start + index];
|
|
413
|
-
}
|
|
414
|
-
index = -1;
|
|
415
|
-
var otherArgs = Array(start + 1);
|
|
416
|
-
while (++index < start) {
|
|
417
|
-
otherArgs[index] = args[index];
|
|
418
|
-
}
|
|
419
|
-
otherArgs[start] = array;
|
|
420
|
-
return apply(func, this, otherArgs);
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
function getAllKeysIn(object) {
|
|
424
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
425
|
-
}
|
|
426
|
-
function getMapData(map2, key) {
|
|
427
|
-
var data = map2.__data__;
|
|
428
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
429
|
-
}
|
|
430
|
-
function getNative(object, key) {
|
|
431
|
-
var value = getValue(object, key);
|
|
432
|
-
return baseIsNative(value) ? value : void 0;
|
|
433
|
-
}
|
|
434
|
-
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
|
435
|
-
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
436
|
-
var result = [];
|
|
437
|
-
while (object) {
|
|
438
|
-
arrayPush(result, getSymbols(object));
|
|
439
|
-
object = getPrototype(object);
|
|
440
|
-
}
|
|
441
|
-
return result;
|
|
442
|
-
};
|
|
443
|
-
function isFlattenable(value) {
|
|
444
|
-
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
445
|
-
}
|
|
446
|
-
function isIndex(value, length) {
|
|
447
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
448
|
-
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
449
|
-
}
|
|
450
|
-
function isKeyable(value) {
|
|
451
|
-
var type2 = typeof value;
|
|
452
|
-
return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
|
|
453
|
-
}
|
|
454
|
-
function isMasked(func) {
|
|
455
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
456
|
-
}
|
|
457
|
-
function isPrototype(value) {
|
|
458
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
459
|
-
return value === proto;
|
|
460
|
-
}
|
|
461
|
-
function nativeKeysIn(object) {
|
|
462
|
-
var result = [];
|
|
463
|
-
if (object != null) {
|
|
464
|
-
for (var key in Object(object)) {
|
|
465
|
-
result.push(key);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
return result;
|
|
469
|
-
}
|
|
470
|
-
function toKey(value) {
|
|
471
|
-
if (typeof value == "string" || isSymbol(value)) {
|
|
472
|
-
return value;
|
|
473
|
-
}
|
|
474
|
-
var result = value + "";
|
|
475
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
476
|
-
}
|
|
477
|
-
function toSource(func) {
|
|
478
|
-
if (func != null) {
|
|
479
|
-
try {
|
|
480
|
-
return funcToString.call(func);
|
|
481
|
-
} catch (e) {
|
|
482
|
-
}
|
|
483
|
-
try {
|
|
484
|
-
return func + "";
|
|
485
|
-
} catch (e) {
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
return "";
|
|
489
|
-
}
|
|
490
|
-
function eq(value, other) {
|
|
491
|
-
return value === other || value !== value && other !== other;
|
|
492
|
-
}
|
|
493
|
-
function isArguments(value) {
|
|
494
|
-
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
495
|
-
}
|
|
496
|
-
var isArray = Array.isArray;
|
|
497
|
-
function isArrayLike(value) {
|
|
498
|
-
return value != null && isLength(value.length) && !isFunction5(value);
|
|
499
|
-
}
|
|
500
|
-
function isArrayLikeObject(value) {
|
|
501
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
502
|
-
}
|
|
503
|
-
function isFunction5(value) {
|
|
504
|
-
var tag = isObject7(value) ? objectToString.call(value) : "";
|
|
505
|
-
return tag == funcTag || tag == genTag;
|
|
506
|
-
}
|
|
507
|
-
function isLength(value) {
|
|
508
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
509
|
-
}
|
|
510
|
-
function isObject7(value) {
|
|
511
|
-
var type2 = typeof value;
|
|
512
|
-
return !!value && (type2 == "object" || type2 == "function");
|
|
513
|
-
}
|
|
514
|
-
function isObjectLike(value) {
|
|
515
|
-
return !!value && typeof value == "object";
|
|
516
|
-
}
|
|
517
|
-
function isSymbol(value) {
|
|
518
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
519
|
-
}
|
|
520
|
-
function keysIn(object) {
|
|
521
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
522
|
-
}
|
|
523
|
-
var omit2 = baseRest(function(object, props) {
|
|
524
|
-
if (object == null) {
|
|
525
|
-
return {};
|
|
526
|
-
}
|
|
527
|
-
props = arrayMap(baseFlatten(props, 1), toKey);
|
|
528
|
-
return basePick(object, baseDifference(getAllKeysIn(object), props));
|
|
529
|
-
});
|
|
530
|
-
function stubArray() {
|
|
531
|
-
return [];
|
|
532
|
-
}
|
|
533
|
-
module2.exports = omit2;
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
|
|
537
26
|
// src/bin/orval.ts
|
|
538
27
|
var import_core12 = require("@orval/core");
|
|
539
28
|
var import_cac = require("cac");
|
|
@@ -3173,7 +2662,6 @@ var import_fs_extra = __toESM(require("fs-extra"));
|
|
|
3173
2662
|
|
|
3174
2663
|
// src/import-open-api.ts
|
|
3175
2664
|
var import_core3 = require("@orval/core");
|
|
3176
|
-
var import_lodash = __toESM(require_lodash());
|
|
3177
2665
|
|
|
3178
2666
|
// src/api.ts
|
|
3179
2667
|
var import_core2 = require("@orval/core");
|
|
@@ -3349,7 +2837,8 @@ var generateMock2 = (verbOption, options) => {
|
|
|
3349
2837
|
return {
|
|
3350
2838
|
implementation: {
|
|
3351
2839
|
function: "",
|
|
3352
|
-
handler: ""
|
|
2840
|
+
handler: "",
|
|
2841
|
+
handlerName: ""
|
|
3353
2842
|
},
|
|
3354
2843
|
imports: []
|
|
3355
2844
|
};
|
|
@@ -3378,7 +2867,6 @@ var generateOperations = (outputClient = DEFAULT_CLIENT, verbsOptions, options,
|
|
|
3378
2867
|
acc[verbOption.operationId] = {
|
|
3379
2868
|
implementation: verbOption.doc + client.implementation,
|
|
3380
2869
|
imports: client.imports,
|
|
3381
|
-
// @ts-expect-error // FIXME
|
|
3382
2870
|
implementationMock: generatedMock.implementation,
|
|
3383
2871
|
importsMock: generatedMock.imports,
|
|
3384
2872
|
tags: verbOption.tags,
|
|
@@ -3468,6 +2956,10 @@ var getApiBuilder = async ({
|
|
|
3468
2956
|
(_a2 = verbs.servers) != null ? _a2 : context.specs[context.specKey].servers,
|
|
3469
2957
|
output.baseUrl
|
|
3470
2958
|
);
|
|
2959
|
+
if (!output.target) {
|
|
2960
|
+
(0, import_core2.logError)("Output does not have a target");
|
|
2961
|
+
process.exit(1);
|
|
2962
|
+
}
|
|
3471
2963
|
const pathOperations = await generateOperations(
|
|
3472
2964
|
output.client,
|
|
3473
2965
|
verbsOptions,
|
|
@@ -3477,7 +2969,6 @@ var getApiBuilder = async ({
|
|
|
3477
2969
|
override: output.override,
|
|
3478
2970
|
context: resolvedContext,
|
|
3479
2971
|
mock: output.mock,
|
|
3480
|
-
// @ts-expect-error // FIXME
|
|
3481
2972
|
output: output.target
|
|
3482
2973
|
},
|
|
3483
2974
|
output
|
|
@@ -3526,7 +3017,6 @@ var importOpenApi = async ({
|
|
|
3526
3017
|
const specs = await generateInputSpecs({ specs: data, input, workspace });
|
|
3527
3018
|
const schemas = getApiSchemas({ input, output, target, workspace, specs });
|
|
3528
3019
|
const api = await getApiBuilder({
|
|
3529
|
-
// @ts-expect-error // FIXME
|
|
3530
3020
|
input,
|
|
3531
3021
|
output,
|
|
3532
3022
|
context: {
|
|
@@ -3564,7 +3054,7 @@ var generateInputSpecs = async ({
|
|
|
3564
3054
|
);
|
|
3565
3055
|
const transfomedSchema = transformerFn ? transformerFn(schema2) : schema2;
|
|
3566
3056
|
if (input.validation) {
|
|
3567
|
-
await (0, import_core3.ibmOpenapiValidator)(transfomedSchema);
|
|
3057
|
+
await (0, import_core3.ibmOpenapiValidator)(transfomedSchema, input.validation);
|
|
3568
3058
|
}
|
|
3569
3059
|
acc[specKey] = transfomedSchema;
|
|
3570
3060
|
return acc;
|
|
@@ -3628,7 +3118,7 @@ var getApiSchemas = ({
|
|
|
3628
3118
|
};
|
|
3629
3119
|
var getAllSchemas = (spec, specKey) => {
|
|
3630
3120
|
var _a;
|
|
3631
|
-
const
|
|
3121
|
+
const keysToOmit = [
|
|
3632
3122
|
"openapi",
|
|
3633
3123
|
"info",
|
|
3634
3124
|
"servers",
|
|
@@ -3637,20 +3127,28 @@ var getAllSchemas = (spec, specKey) => {
|
|
|
3637
3127
|
"security",
|
|
3638
3128
|
"tags",
|
|
3639
3129
|
"externalDocs"
|
|
3640
|
-
]
|
|
3130
|
+
];
|
|
3131
|
+
const cleanedSpec = Object.fromEntries(
|
|
3132
|
+
Object.entries(spec).filter(([key]) => !keysToOmit.includes(key))
|
|
3133
|
+
);
|
|
3641
3134
|
if (specKey && (0, import_core3.isSchema)(cleanedSpec)) {
|
|
3642
3135
|
const name = import_core3.upath.getSchemaFileName(specKey);
|
|
3136
|
+
const additionalKeysToOmit = [
|
|
3137
|
+
"type",
|
|
3138
|
+
"properties",
|
|
3139
|
+
"allOf",
|
|
3140
|
+
"oneOf",
|
|
3141
|
+
"anyOf",
|
|
3142
|
+
"items"
|
|
3143
|
+
];
|
|
3643
3144
|
return {
|
|
3644
3145
|
[name]: cleanedSpec,
|
|
3645
3146
|
...getAllSchemas(
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
"anyOf",
|
|
3652
|
-
"items"
|
|
3653
|
-
])
|
|
3147
|
+
Object.fromEntries(
|
|
3148
|
+
Object.entries(cleanedSpec).filter(
|
|
3149
|
+
([key]) => !additionalKeysToOmit.includes(key)
|
|
3150
|
+
)
|
|
3151
|
+
)
|
|
3654
3152
|
)
|
|
3655
3153
|
};
|
|
3656
3154
|
}
|
|
@@ -3704,7 +3202,7 @@ var resolveSpecs = async (path, { validate, ...options }, isUrl3, isOnlySchema)
|
|
|
3704
3202
|
};
|
|
3705
3203
|
var importSpecs = async (workspace, options) => {
|
|
3706
3204
|
const { input, output } = options;
|
|
3707
|
-
if ((0, import_core4.
|
|
3205
|
+
if (!(0, import_core4.isString)(input.target)) {
|
|
3708
3206
|
return importOpenApi({
|
|
3709
3207
|
data: { [workspace]: input.target },
|
|
3710
3208
|
input,
|
|
@@ -3715,7 +3213,6 @@ var importSpecs = async (workspace, options) => {
|
|
|
3715
3213
|
}
|
|
3716
3214
|
const isPathUrl = (0, import_core4.isUrl)(input.target);
|
|
3717
3215
|
const data = await resolveSpecs(
|
|
3718
|
-
// @ts-expect-error // FIXME
|
|
3719
3216
|
input.target,
|
|
3720
3217
|
input.parserOptions,
|
|
3721
3218
|
isPathUrl,
|
|
@@ -3725,7 +3222,6 @@ var importSpecs = async (workspace, options) => {
|
|
|
3725
3222
|
data,
|
|
3726
3223
|
input,
|
|
3727
3224
|
output,
|
|
3728
|
-
// @ts-expect-error // FIXME
|
|
3729
3225
|
target: input.target,
|
|
3730
3226
|
workspace
|
|
3731
3227
|
});
|
|
@@ -3740,7 +3236,7 @@ var import_chalk2 = __toESM(require("chalk"));
|
|
|
3740
3236
|
var package_default = {
|
|
3741
3237
|
name: "orval",
|
|
3742
3238
|
description: "A swagger client generator for typescript",
|
|
3743
|
-
version: "7.
|
|
3239
|
+
version: "7.6.0",
|
|
3744
3240
|
license: "MIT",
|
|
3745
3241
|
files: [
|
|
3746
3242
|
"dist"
|
|
@@ -3778,7 +3274,7 @@ var package_default = {
|
|
|
3778
3274
|
},
|
|
3779
3275
|
repository: {
|
|
3780
3276
|
type: "git",
|
|
3781
|
-
url: "https://github.com/orval-labs/orval"
|
|
3277
|
+
url: "git+https://github.com/orval-labs/orval.git"
|
|
3782
3278
|
},
|
|
3783
3279
|
scripts: {
|
|
3784
3280
|
build: "tsup ./src/bin/orval.ts ./src/index.ts --target node12 --clean --sourcemap --dts",
|
|
@@ -3790,23 +3286,24 @@ var package_default = {
|
|
|
3790
3286
|
devDependencies: {
|
|
3791
3287
|
"@types/inquirer": "^9.0.6",
|
|
3792
3288
|
"@types/js-yaml": "^4.0.8",
|
|
3793
|
-
"@types/lodash.uniq": "^4.5.8"
|
|
3289
|
+
"@types/lodash.uniq": "^4.5.8",
|
|
3290
|
+
"typedoc-plugin-coverage": "^3.4.1"
|
|
3794
3291
|
},
|
|
3795
3292
|
dependencies: {
|
|
3796
3293
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
3797
|
-
"@orval/angular": "7.
|
|
3798
|
-
"@orval/axios": "7.
|
|
3799
|
-
"@orval/core": "7.
|
|
3800
|
-
"@orval/fetch": "7.
|
|
3801
|
-
"@orval/hono": "7.
|
|
3802
|
-
"@orval/mock": "7.
|
|
3803
|
-
"@orval/query": "7.
|
|
3804
|
-
"@orval/swr": "7.
|
|
3805
|
-
"@orval/zod": "7.
|
|
3294
|
+
"@orval/angular": "7.6.0",
|
|
3295
|
+
"@orval/axios": "7.6.0",
|
|
3296
|
+
"@orval/core": "7.6.0",
|
|
3297
|
+
"@orval/fetch": "7.6.0",
|
|
3298
|
+
"@orval/hono": "7.6.0",
|
|
3299
|
+
"@orval/mock": "7.6.0",
|
|
3300
|
+
"@orval/query": "7.6.0",
|
|
3301
|
+
"@orval/swr": "7.6.0",
|
|
3302
|
+
"@orval/zod": "7.6.0",
|
|
3806
3303
|
ajv: "^8.17.1",
|
|
3807
3304
|
cac: "^6.7.14",
|
|
3808
3305
|
chalk: "^4.1.2",
|
|
3809
|
-
chokidar: "^4.0.
|
|
3306
|
+
chokidar: "^4.0.3",
|
|
3810
3307
|
enquirer: "^2.4.1",
|
|
3811
3308
|
execa: "^5.1.1",
|
|
3812
3309
|
"find-up": "5.0.0",
|
|
@@ -3815,8 +3312,8 @@ var package_default = {
|
|
|
3815
3312
|
"openapi3-ts": "4.2.2",
|
|
3816
3313
|
"string-argv": "^0.3.2",
|
|
3817
3314
|
tsconfck: "^2.0.1",
|
|
3818
|
-
typedoc: "0.
|
|
3819
|
-
"typedoc-plugin-markdown": "4.2
|
|
3315
|
+
typedoc: "^0.27.7",
|
|
3316
|
+
"typedoc-plugin-markdown": "^4.4.2",
|
|
3820
3317
|
typescript: "^5.6.3"
|
|
3821
3318
|
}
|
|
3822
3319
|
};
|
|
@@ -4055,16 +3552,17 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4055
3552
|
outputOptions.packageJson || globalOptions.packageJson,
|
|
4056
3553
|
workspace
|
|
4057
3554
|
);
|
|
4058
|
-
|
|
4059
|
-
|
|
3555
|
+
const mockOption = (_a = outputOptions.mock) != null ? _a : globalOptions.mock;
|
|
3556
|
+
let mock2;
|
|
3557
|
+
if (typeof mockOption === "boolean" && mockOption) {
|
|
4060
3558
|
mock2 = import_mock2.DEFAULT_MOCK_OPTIONS;
|
|
4061
|
-
} else if ((0, import_core7.isFunction)(
|
|
4062
|
-
} else if (!
|
|
3559
|
+
} else if ((0, import_core7.isFunction)(mockOption)) {
|
|
3560
|
+
} else if (!mockOption) {
|
|
4063
3561
|
mock2 = void 0;
|
|
4064
3562
|
} else {
|
|
4065
3563
|
mock2 = {
|
|
4066
3564
|
...import_mock2.DEFAULT_MOCK_OPTIONS,
|
|
4067
|
-
...
|
|
3565
|
+
...mockOption
|
|
4068
3566
|
};
|
|
4069
3567
|
}
|
|
4070
3568
|
const defaultFileExtension = ".ts";
|
|
@@ -4097,6 +3595,7 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
|
|
|
4097
3595
|
output: {
|
|
4098
3596
|
target: globalOptions.output ? normalizePath(globalOptions.output, process.cwd()) : normalizePath(outputOptions.target, outputWorkspace),
|
|
4099
3597
|
schemas: normalizePath(outputOptions.schemas, outputWorkspace),
|
|
3598
|
+
namingConvention: outputOptions.namingConvention || import_core7.NamingConvention.CAMEL_CASE,
|
|
4100
3599
|
fileExtension: outputOptions.fileExtension || defaultFileExtension,
|
|
4101
3600
|
workspace: outputOptions.workspace ? outputWorkspace : void 0,
|
|
4102
3601
|
client: (_g = (_f = outputOptions.client) != null ? _f : client) != null ? _g : import_core7.OutputClient.AXIOS_FUNCTIONS,
|
|
@@ -4301,7 +3800,7 @@ var normalizePath = (path, workspace) => {
|
|
|
4301
3800
|
}
|
|
4302
3801
|
return import_core7.upath.resolve(workspace, path);
|
|
4303
3802
|
};
|
|
4304
|
-
var normalizeOperationsAndTags = (operationsOrTags, workspace,
|
|
3803
|
+
var normalizeOperationsAndTags = (operationsOrTags, workspace, global) => {
|
|
4305
3804
|
return Object.fromEntries(
|
|
4306
3805
|
Object.entries(operationsOrTags).map(
|
|
4307
3806
|
([
|
|
@@ -4323,7 +3822,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
|
|
|
4323
3822
|
{
|
|
4324
3823
|
...rest,
|
|
4325
3824
|
...query2 ? {
|
|
4326
|
-
query: normalizeQueryOptions(query2, workspace,
|
|
3825
|
+
query: normalizeQueryOptions(query2, workspace, global.query)
|
|
4327
3826
|
} : {},
|
|
4328
3827
|
...zod2 ? {
|
|
4329
3828
|
zod: {
|
|
@@ -4441,10 +3940,12 @@ var normalizeHooks = (hooks) => {
|
|
|
4441
3940
|
}, {});
|
|
4442
3941
|
};
|
|
4443
3942
|
var normalizeHonoOptions = (hono2 = {}, workspace) => {
|
|
4444
|
-
var _a;
|
|
3943
|
+
var _a, _b;
|
|
4445
3944
|
return {
|
|
4446
3945
|
...hono2.handlers ? { handlers: import_core7.upath.resolve(workspace, hono2.handlers) } : {},
|
|
4447
|
-
|
|
3946
|
+
compositeRoute: (_a = hono2.compositeRoute) != null ? _a : "",
|
|
3947
|
+
validator: (_b = hono2.validator) != null ? _b : true,
|
|
3948
|
+
validatorOutputPath: hono2.validatorOutputPath ? import_core7.upath.resolve(workspace, hono2.validatorOutputPath) : ""
|
|
4448
3949
|
};
|
|
4449
3950
|
};
|
|
4450
3951
|
var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
|
|
@@ -4551,8 +4052,7 @@ var import_core10 = require("@orval/core");
|
|
|
4551
4052
|
var import_chalk4 = __toESM(require("chalk"));
|
|
4552
4053
|
var import_execa2 = __toESM(require("execa"));
|
|
4553
4054
|
var import_fs_extra5 = __toESM(require("fs-extra"));
|
|
4554
|
-
var
|
|
4555
|
-
var import_typedoc = require("typedoc");
|
|
4055
|
+
var import_lodash = __toESM(require("lodash.uniq"));
|
|
4556
4056
|
|
|
4557
4057
|
// src/utils/executeHook.ts
|
|
4558
4058
|
var import_core9 = require("@orval/core");
|
|
@@ -4599,7 +4099,7 @@ var getHeader = (option, info) => {
|
|
|
4599
4099
|
return Array.isArray(header) ? (0, import_core10.jsDoc)({ description: header }) : header;
|
|
4600
4100
|
};
|
|
4601
4101
|
var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
4602
|
-
var _a;
|
|
4102
|
+
var _a, _b;
|
|
4603
4103
|
const { info = { title: "", version: 0 }, schemas, target } = builder;
|
|
4604
4104
|
const { output } = options;
|
|
4605
4105
|
const projectTitle = projectName || info.title;
|
|
@@ -4623,6 +4123,7 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
|
4623
4123
|
schemaPath,
|
|
4624
4124
|
schemas: schemas2,
|
|
4625
4125
|
target,
|
|
4126
|
+
namingConvention: output.namingConvention,
|
|
4626
4127
|
fileExtension,
|
|
4627
4128
|
specsName,
|
|
4628
4129
|
specKey,
|
|
@@ -4667,12 +4168,13 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
|
4667
4168
|
const importsNotDeclared = imports.filter((imp) => !data.includes(imp));
|
|
4668
4169
|
await import_fs_extra5.default.appendFile(
|
|
4669
4170
|
indexFile,
|
|
4670
|
-
(0,
|
|
4171
|
+
(0, import_lodash.default)(importsNotDeclared).map((imp) => `export * from '${imp}';
|
|
4172
|
+
`).join("")
|
|
4671
4173
|
);
|
|
4672
4174
|
} else {
|
|
4673
4175
|
await import_fs_extra5.default.outputFile(
|
|
4674
4176
|
indexFile,
|
|
4675
|
-
(0,
|
|
4177
|
+
(0, import_lodash.default)(imports).map((imp) => `export * from '${imp}';`).join("\n") + "\n"
|
|
4676
4178
|
);
|
|
4677
4179
|
}
|
|
4678
4180
|
implementationPaths = [indexFile, ...implementationPaths];
|
|
@@ -4729,11 +4231,17 @@ var writeSpecs = async (builder, workspace, options, projectName) => {
|
|
|
4729
4231
|
config.options = configPath;
|
|
4730
4232
|
}
|
|
4731
4233
|
}
|
|
4732
|
-
const
|
|
4234
|
+
const getTypedocApplication = async () => {
|
|
4235
|
+
const { Application: Application2 } = await Promise.resolve().then(() => __toESM(require("typedoc")));
|
|
4236
|
+
return Application2;
|
|
4237
|
+
};
|
|
4238
|
+
const Application = await getTypedocApplication();
|
|
4239
|
+
const app = await Application.bootstrapWithPlugins({
|
|
4733
4240
|
entryPoints: paths,
|
|
4241
|
+
theme: "markdown",
|
|
4734
4242
|
// Set the custom config location if it has been provided.
|
|
4735
4243
|
...config,
|
|
4736
|
-
plugin: ["typedoc-plugin-markdown"]
|
|
4244
|
+
plugin: ["typedoc-plugin-markdown", ...(_b = config.plugin) != null ? _b : []]
|
|
4737
4245
|
});
|
|
4738
4246
|
if (!app.options.isSet("readme")) {
|
|
4739
4247
|
app.options.setValue("readme", "none");
|