@pactflow/openapi-pact-comparator 1.11.0 → 1.12.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/cli.cjs +283 -113
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +214 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +214 -85
- package/dist/index.mjs.map +1 -1
- package/dist/server.cjs +71337 -0
- package/dist/server.cjs.map +1 -0
- package/dist/src/cli/runner.d.ts +22 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/server.d.ts +1 -0
- package/dist/src/transform/requestSchema.d.ts +2 -0
- package/package.json +16 -14
package/dist/index.mjs
CHANGED
|
@@ -15,17 +15,17 @@ var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
15
15
|
var Symbol$2 = root.Symbol;
|
|
16
16
|
|
|
17
17
|
/** Used for built-in method references. */
|
|
18
|
-
var objectProto$
|
|
18
|
+
var objectProto$e = Object.prototype;
|
|
19
19
|
|
|
20
20
|
/** Used to check objects for own properties. */
|
|
21
|
-
var hasOwnProperty$
|
|
21
|
+
var hasOwnProperty$b = objectProto$e.hasOwnProperty;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Used to resolve the
|
|
25
25
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
26
26
|
* of values.
|
|
27
27
|
*/
|
|
28
|
-
var nativeObjectToString$1 = objectProto$
|
|
28
|
+
var nativeObjectToString$1 = objectProto$e.toString;
|
|
29
29
|
|
|
30
30
|
/** Built-in value references. */
|
|
31
31
|
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
@@ -38,7 +38,7 @@ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
|
38
38
|
* @returns {string} Returns the raw `toStringTag`.
|
|
39
39
|
*/
|
|
40
40
|
function getRawTag(value) {
|
|
41
|
-
var isOwn = hasOwnProperty$
|
|
41
|
+
var isOwn = hasOwnProperty$b.call(value, symToStringTag$1),
|
|
42
42
|
tag = value[symToStringTag$1];
|
|
43
43
|
|
|
44
44
|
try {
|
|
@@ -58,14 +58,14 @@ function getRawTag(value) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/** Used for built-in method references. */
|
|
61
|
-
var objectProto$
|
|
61
|
+
var objectProto$d = Object.prototype;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Used to resolve the
|
|
65
65
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
66
66
|
* of values.
|
|
67
67
|
*/
|
|
68
|
-
var nativeObjectToString = objectProto$
|
|
68
|
+
var nativeObjectToString = objectProto$d.toString;
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -366,17 +366,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
366
366
|
|
|
367
367
|
/** Used for built-in method references. */
|
|
368
368
|
var funcProto$1 = Function.prototype,
|
|
369
|
-
objectProto$
|
|
369
|
+
objectProto$c = Object.prototype;
|
|
370
370
|
|
|
371
371
|
/** Used to resolve the decompiled source of functions. */
|
|
372
372
|
var funcToString$1 = funcProto$1.toString;
|
|
373
373
|
|
|
374
374
|
/** Used to check objects for own properties. */
|
|
375
|
-
var hasOwnProperty$
|
|
375
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
376
376
|
|
|
377
377
|
/** Used to detect if a method is native. */
|
|
378
378
|
var reIsNative = RegExp('^' +
|
|
379
|
-
funcToString$1.call(hasOwnProperty$
|
|
379
|
+
funcToString$1.call(hasOwnProperty$a).replace(reRegExpChar, '\\$&')
|
|
380
380
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
381
381
|
);
|
|
382
382
|
|
|
@@ -791,10 +791,10 @@ function eq(value, other) {
|
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
/** Used for built-in method references. */
|
|
794
|
-
var objectProto$
|
|
794
|
+
var objectProto$b = Object.prototype;
|
|
795
795
|
|
|
796
796
|
/** Used to check objects for own properties. */
|
|
797
|
-
var hasOwnProperty$
|
|
797
|
+
var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
|
|
798
798
|
|
|
799
799
|
/**
|
|
800
800
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
@@ -808,7 +808,7 @@ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
|
|
|
808
808
|
*/
|
|
809
809
|
function assignValue(object, key, value) {
|
|
810
810
|
var objValue = object[key];
|
|
811
|
-
if (!(hasOwnProperty$
|
|
811
|
+
if (!(hasOwnProperty$9.call(object, key) && eq(objValue, value)) ||
|
|
812
812
|
(value === undefined && !(key in object))) {
|
|
813
813
|
baseAssignValue(object, key, value);
|
|
814
814
|
}
|
|
@@ -1014,7 +1014,7 @@ function createAssigner(assigner) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
1016
|
/** Used for built-in method references. */
|
|
1017
|
-
var objectProto$
|
|
1017
|
+
var objectProto$a = Object.prototype;
|
|
1018
1018
|
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Checks if `value` is likely a prototype object.
|
|
@@ -1025,7 +1025,7 @@ var objectProto$9 = Object.prototype;
|
|
|
1025
1025
|
*/
|
|
1026
1026
|
function isPrototype(value) {
|
|
1027
1027
|
var Ctor = value && value.constructor,
|
|
1028
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$
|
|
1028
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$a;
|
|
1029
1029
|
|
|
1030
1030
|
return value === proto;
|
|
1031
1031
|
}
|
|
@@ -1064,13 +1064,13 @@ function baseIsArguments(value) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
|
|
1066
1066
|
/** Used for built-in method references. */
|
|
1067
|
-
var objectProto$
|
|
1067
|
+
var objectProto$9 = Object.prototype;
|
|
1068
1068
|
|
|
1069
1069
|
/** Used to check objects for own properties. */
|
|
1070
|
-
var hasOwnProperty$
|
|
1070
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
1071
1071
|
|
|
1072
1072
|
/** Built-in value references. */
|
|
1073
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
1073
|
+
var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
|
|
1074
1074
|
|
|
1075
1075
|
/**
|
|
1076
1076
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -1091,7 +1091,7 @@ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
|
|
|
1091
1091
|
* // => false
|
|
1092
1092
|
*/
|
|
1093
1093
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
1094
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
1094
|
+
return isObjectLike(value) && hasOwnProperty$8.call(value, 'callee') &&
|
|
1095
1095
|
!propertyIsEnumerable$1.call(value, 'callee');
|
|
1096
1096
|
};
|
|
1097
1097
|
|
|
@@ -1264,10 +1264,10 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
1264
1264
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1265
1265
|
|
|
1266
1266
|
/** Used for built-in method references. */
|
|
1267
|
-
var objectProto$
|
|
1267
|
+
var objectProto$8 = Object.prototype;
|
|
1268
1268
|
|
|
1269
1269
|
/** Used to check objects for own properties. */
|
|
1270
|
-
var hasOwnProperty$
|
|
1270
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
1271
1271
|
|
|
1272
1272
|
/**
|
|
1273
1273
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -1287,7 +1287,7 @@ function arrayLikeKeys(value, inherited) {
|
|
|
1287
1287
|
length = result.length;
|
|
1288
1288
|
|
|
1289
1289
|
for (var key in value) {
|
|
1290
|
-
if ((inherited || hasOwnProperty$
|
|
1290
|
+
if ((inherited || hasOwnProperty$7.call(value, key)) &&
|
|
1291
1291
|
!(skipIndexes && (
|
|
1292
1292
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1293
1293
|
key == 'length' ||
|
|
@@ -1322,10 +1322,10 @@ function overArg(func, transform) {
|
|
|
1322
1322
|
var nativeKeys = overArg(Object.keys, Object);
|
|
1323
1323
|
|
|
1324
1324
|
/** Used for built-in method references. */
|
|
1325
|
-
var objectProto$
|
|
1325
|
+
var objectProto$7 = Object.prototype;
|
|
1326
1326
|
|
|
1327
1327
|
/** Used to check objects for own properties. */
|
|
1328
|
-
var hasOwnProperty$
|
|
1328
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
1329
1329
|
|
|
1330
1330
|
/**
|
|
1331
1331
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
@@ -1340,7 +1340,7 @@ function baseKeys(object) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
var result = [];
|
|
1342
1342
|
for (var key in Object(object)) {
|
|
1343
|
-
if (hasOwnProperty$
|
|
1343
|
+
if (hasOwnProperty$6.call(object, key) && key != 'constructor') {
|
|
1344
1344
|
result.push(key);
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
@@ -1399,10 +1399,10 @@ function nativeKeysIn(object) {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
1401
|
/** Used for built-in method references. */
|
|
1402
|
-
var objectProto$
|
|
1402
|
+
var objectProto$6 = Object.prototype;
|
|
1403
1403
|
|
|
1404
1404
|
/** Used to check objects for own properties. */
|
|
1405
|
-
var hasOwnProperty$
|
|
1405
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
1406
1406
|
|
|
1407
1407
|
/**
|
|
1408
1408
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
@@ -1419,7 +1419,7 @@ function baseKeysIn(object) {
|
|
|
1419
1419
|
result = [];
|
|
1420
1420
|
|
|
1421
1421
|
for (var key in object) {
|
|
1422
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty$
|
|
1422
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$5.call(object, key)))) {
|
|
1423
1423
|
result.push(key);
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
@@ -1513,10 +1513,10 @@ function hashDelete(key) {
|
|
|
1513
1513
|
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
1514
1514
|
|
|
1515
1515
|
/** Used for built-in method references. */
|
|
1516
|
-
var objectProto$
|
|
1516
|
+
var objectProto$5 = Object.prototype;
|
|
1517
1517
|
|
|
1518
1518
|
/** Used to check objects for own properties. */
|
|
1519
|
-
var hasOwnProperty$
|
|
1519
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1520
1520
|
|
|
1521
1521
|
/**
|
|
1522
1522
|
* Gets the hash value for `key`.
|
|
@@ -1533,14 +1533,14 @@ function hashGet(key) {
|
|
|
1533
1533
|
var result = data[key];
|
|
1534
1534
|
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
1535
1535
|
}
|
|
1536
|
-
return hasOwnProperty$
|
|
1536
|
+
return hasOwnProperty$4.call(data, key) ? data[key] : undefined;
|
|
1537
1537
|
}
|
|
1538
1538
|
|
|
1539
1539
|
/** Used for built-in method references. */
|
|
1540
|
-
var objectProto$
|
|
1540
|
+
var objectProto$4 = Object.prototype;
|
|
1541
1541
|
|
|
1542
1542
|
/** Used to check objects for own properties. */
|
|
1543
|
-
var hasOwnProperty$
|
|
1543
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1544
1544
|
|
|
1545
1545
|
/**
|
|
1546
1546
|
* Checks if a hash value for `key` exists.
|
|
@@ -1553,7 +1553,7 @@ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
|
1553
1553
|
*/
|
|
1554
1554
|
function hashHas(key) {
|
|
1555
1555
|
var data = this.__data__;
|
|
1556
|
-
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$
|
|
1556
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
|
|
1557
1557
|
}
|
|
1558
1558
|
|
|
1559
1559
|
/** Used to stand-in for `undefined` hash values. */
|
|
@@ -2198,13 +2198,13 @@ var objectTag$2 = '[object Object]';
|
|
|
2198
2198
|
|
|
2199
2199
|
/** Used for built-in method references. */
|
|
2200
2200
|
var funcProto = Function.prototype,
|
|
2201
|
-
objectProto$
|
|
2201
|
+
objectProto$3 = Object.prototype;
|
|
2202
2202
|
|
|
2203
2203
|
/** Used to resolve the decompiled source of functions. */
|
|
2204
2204
|
var funcToString = funcProto.toString;
|
|
2205
2205
|
|
|
2206
2206
|
/** Used to check objects for own properties. */
|
|
2207
|
-
var hasOwnProperty$
|
|
2207
|
+
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
2208
2208
|
|
|
2209
2209
|
/** Used to infer the `Object` constructor. */
|
|
2210
2210
|
var objectCtorString = funcToString.call(Object);
|
|
@@ -2245,7 +2245,7 @@ function isPlainObject(value) {
|
|
|
2245
2245
|
if (proto === null) {
|
|
2246
2246
|
return true;
|
|
2247
2247
|
}
|
|
2248
|
-
var Ctor = hasOwnProperty$
|
|
2248
|
+
var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
|
|
2249
2249
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
2250
2250
|
funcToString.call(Ctor) == objectCtorString;
|
|
2251
2251
|
}
|
|
@@ -2488,10 +2488,10 @@ function stubArray() {
|
|
|
2488
2488
|
}
|
|
2489
2489
|
|
|
2490
2490
|
/** Used for built-in method references. */
|
|
2491
|
-
var objectProto$
|
|
2491
|
+
var objectProto$2 = Object.prototype;
|
|
2492
2492
|
|
|
2493
2493
|
/** Built-in value references. */
|
|
2494
|
-
var propertyIsEnumerable = objectProto$
|
|
2494
|
+
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
2495
2495
|
|
|
2496
2496
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2497
2497
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
@@ -2654,10 +2654,10 @@ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$2)
|
|
|
2654
2654
|
}
|
|
2655
2655
|
|
|
2656
2656
|
/** Used for built-in method references. */
|
|
2657
|
-
var objectProto = Object.prototype;
|
|
2657
|
+
var objectProto$1 = Object.prototype;
|
|
2658
2658
|
|
|
2659
2659
|
/** Used to check objects for own properties. */
|
|
2660
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2660
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2661
2661
|
|
|
2662
2662
|
/**
|
|
2663
2663
|
* Initializes an array clone.
|
|
@@ -2671,7 +2671,7 @@ function initCloneArray(array) {
|
|
|
2671
2671
|
result = new array.constructor(length);
|
|
2672
2672
|
|
|
2673
2673
|
// Add properties assigned by `RegExp#exec`.
|
|
2674
|
-
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
2674
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty$1.call(array, 'index')) {
|
|
2675
2675
|
result.index = array.index;
|
|
2676
2676
|
result.input = array.input;
|
|
2677
2677
|
}
|
|
@@ -3580,6 +3580,12 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
3580
3580
|
baseMerge(object, source, srcIndex);
|
|
3581
3581
|
});
|
|
3582
3582
|
|
|
3583
|
+
/** Used for built-in method references. */
|
|
3584
|
+
var objectProto = Object.prototype;
|
|
3585
|
+
|
|
3586
|
+
/** Used to check objects for own properties. */
|
|
3587
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3588
|
+
|
|
3583
3589
|
/**
|
|
3584
3590
|
* The base implementation of `_.unset`.
|
|
3585
3591
|
*
|
|
@@ -3590,8 +3596,47 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
3590
3596
|
*/
|
|
3591
3597
|
function baseUnset(object, path) {
|
|
3592
3598
|
path = castPath(path, object);
|
|
3593
|
-
|
|
3594
|
-
|
|
3599
|
+
|
|
3600
|
+
// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
3601
|
+
var index = -1,
|
|
3602
|
+
length = path.length;
|
|
3603
|
+
|
|
3604
|
+
if (!length) {
|
|
3605
|
+
return true;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
|
3609
|
+
|
|
3610
|
+
while (++index < length) {
|
|
3611
|
+
var key = path[index];
|
|
3612
|
+
|
|
3613
|
+
// skip non-string keys (e.g., Symbols, numbers)
|
|
3614
|
+
if (typeof key !== 'string') {
|
|
3615
|
+
continue;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
3619
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
3620
|
+
return false;
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
// Block "constructor.prototype" chains
|
|
3624
|
+
if (key === 'constructor' &&
|
|
3625
|
+
(index + 1) < length &&
|
|
3626
|
+
typeof path[index + 1] === 'string' &&
|
|
3627
|
+
path[index + 1] === 'prototype') {
|
|
3628
|
+
|
|
3629
|
+
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
3630
|
+
if (isRootPrimitive && index === 0) {
|
|
3631
|
+
continue;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
return false;
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
var obj = parent(object, path);
|
|
3639
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
3595
3640
|
}
|
|
3596
3641
|
|
|
3597
3642
|
/**
|
|
@@ -6056,10 +6101,32 @@ function requireUtils$1 () {
|
|
|
6056
6101
|
hasRequiredUtils$1 = 1;
|
|
6057
6102
|
|
|
6058
6103
|
var formats = /*@__PURE__*/ requireFormats$1();
|
|
6104
|
+
var getSideChannel = requireSideChannel();
|
|
6059
6105
|
|
|
6060
6106
|
var has = Object.prototype.hasOwnProperty;
|
|
6061
6107
|
var isArray = Array.isArray;
|
|
6062
6108
|
|
|
6109
|
+
// Track objects created from arrayLimit overflow using side-channel
|
|
6110
|
+
// Stores the current max numeric index for O(1) lookup
|
|
6111
|
+
var overflowChannel = getSideChannel();
|
|
6112
|
+
|
|
6113
|
+
var markOverflow = function markOverflow(obj, maxIndex) {
|
|
6114
|
+
overflowChannel.set(obj, maxIndex);
|
|
6115
|
+
return obj;
|
|
6116
|
+
};
|
|
6117
|
+
|
|
6118
|
+
var isOverflow = function isOverflow(obj) {
|
|
6119
|
+
return overflowChannel.has(obj);
|
|
6120
|
+
};
|
|
6121
|
+
|
|
6122
|
+
var getMaxIndex = function getMaxIndex(obj) {
|
|
6123
|
+
return overflowChannel.get(obj);
|
|
6124
|
+
};
|
|
6125
|
+
|
|
6126
|
+
var setMaxIndex = function setMaxIndex(obj, maxIndex) {
|
|
6127
|
+
overflowChannel.set(obj, maxIndex);
|
|
6128
|
+
};
|
|
6129
|
+
|
|
6063
6130
|
var hexTable = (function () {
|
|
6064
6131
|
var array = [];
|
|
6065
6132
|
for (var i = 0; i < 256; ++i) {
|
|
@@ -6109,7 +6176,12 @@ function requireUtils$1 () {
|
|
|
6109
6176
|
if (isArray(target)) {
|
|
6110
6177
|
target.push(source);
|
|
6111
6178
|
} else if (target && typeof target === 'object') {
|
|
6112
|
-
if (
|
|
6179
|
+
if (isOverflow(target)) {
|
|
6180
|
+
// Add at next numeric index for overflow objects
|
|
6181
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
6182
|
+
target[newIndex] = source;
|
|
6183
|
+
setMaxIndex(target, newIndex);
|
|
6184
|
+
} else if (
|
|
6113
6185
|
(options && (options.plainObjects || options.allowPrototypes))
|
|
6114
6186
|
|| !has.call(Object.prototype, source)
|
|
6115
6187
|
) {
|
|
@@ -6123,6 +6195,18 @@ function requireUtils$1 () {
|
|
|
6123
6195
|
}
|
|
6124
6196
|
|
|
6125
6197
|
if (!target || typeof target !== 'object') {
|
|
6198
|
+
if (isOverflow(source)) {
|
|
6199
|
+
// Create new object with target at 0, source values shifted by 1
|
|
6200
|
+
var sourceKeys = Object.keys(source);
|
|
6201
|
+
var result = options && options.plainObjects
|
|
6202
|
+
? { __proto__: null, 0: target }
|
|
6203
|
+
: { 0: target };
|
|
6204
|
+
for (var m = 0; m < sourceKeys.length; m++) {
|
|
6205
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
6206
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
6207
|
+
}
|
|
6208
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
6209
|
+
}
|
|
6126
6210
|
return [target].concat(source);
|
|
6127
6211
|
}
|
|
6128
6212
|
|
|
@@ -6294,8 +6378,20 @@ function requireUtils$1 () {
|
|
|
6294
6378
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
6295
6379
|
};
|
|
6296
6380
|
|
|
6297
|
-
var combine = function combine(a, b) {
|
|
6298
|
-
|
|
6381
|
+
var combine = function combine(a, b, arrayLimit, plainObjects) {
|
|
6382
|
+
// If 'a' is already an overflow object, add to it
|
|
6383
|
+
if (isOverflow(a)) {
|
|
6384
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
6385
|
+
a[newIndex] = b;
|
|
6386
|
+
setMaxIndex(a, newIndex);
|
|
6387
|
+
return a;
|
|
6388
|
+
}
|
|
6389
|
+
|
|
6390
|
+
var result = [].concat(a, b);
|
|
6391
|
+
if (result.length > arrayLimit) {
|
|
6392
|
+
return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1);
|
|
6393
|
+
}
|
|
6394
|
+
return result;
|
|
6299
6395
|
};
|
|
6300
6396
|
|
|
6301
6397
|
var maybeMap = function maybeMap(val, fn) {
|
|
@@ -6317,6 +6413,7 @@ function requireUtils$1 () {
|
|
|
6317
6413
|
decode: decode,
|
|
6318
6414
|
encode: encode,
|
|
6319
6415
|
isBuffer: isBuffer,
|
|
6416
|
+
isOverflow: isOverflow,
|
|
6320
6417
|
isRegExp: isRegExp,
|
|
6321
6418
|
maybeMap: maybeMap,
|
|
6322
6419
|
merge: merge
|
|
@@ -6803,16 +6900,18 @@ function requireParse$1 () {
|
|
|
6803
6900
|
} else {
|
|
6804
6901
|
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
6805
6902
|
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6903
|
+
if (key !== null) {
|
|
6904
|
+
val = utils.maybeMap(
|
|
6905
|
+
parseArrayValue(
|
|
6906
|
+
part.slice(pos + 1),
|
|
6907
|
+
options,
|
|
6908
|
+
isArray(obj[key]) ? obj[key].length : 0
|
|
6909
|
+
),
|
|
6910
|
+
function (encodedVal) {
|
|
6911
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
6912
|
+
}
|
|
6913
|
+
);
|
|
6914
|
+
}
|
|
6816
6915
|
}
|
|
6817
6916
|
|
|
6818
6917
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
@@ -6823,11 +6922,18 @@ function requireParse$1 () {
|
|
|
6823
6922
|
val = isArray(val) ? [val] : val;
|
|
6824
6923
|
}
|
|
6825
6924
|
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6925
|
+
if (key !== null) {
|
|
6926
|
+
var existing = has.call(obj, key);
|
|
6927
|
+
if (existing && options.duplicates === 'combine') {
|
|
6928
|
+
obj[key] = utils.combine(
|
|
6929
|
+
obj[key],
|
|
6930
|
+
val,
|
|
6931
|
+
options.arrayLimit,
|
|
6932
|
+
options.plainObjects
|
|
6933
|
+
);
|
|
6934
|
+
} else if (!existing || options.duplicates === 'last') {
|
|
6935
|
+
obj[key] = val;
|
|
6936
|
+
}
|
|
6831
6937
|
}
|
|
6832
6938
|
}
|
|
6833
6939
|
|
|
@@ -6848,9 +6954,19 @@ function requireParse$1 () {
|
|
|
6848
6954
|
var root = chain[i];
|
|
6849
6955
|
|
|
6850
6956
|
if (root === '[]' && options.parseArrays) {
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6957
|
+
if (utils.isOverflow(leaf)) {
|
|
6958
|
+
// leaf is already an overflow object, preserve it
|
|
6959
|
+
obj = leaf;
|
|
6960
|
+
} else {
|
|
6961
|
+
obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
|
|
6962
|
+
? []
|
|
6963
|
+
: utils.combine(
|
|
6964
|
+
[],
|
|
6965
|
+
leaf,
|
|
6966
|
+
options.arrayLimit,
|
|
6967
|
+
options.plainObjects
|
|
6968
|
+
);
|
|
6969
|
+
}
|
|
6854
6970
|
} else {
|
|
6855
6971
|
obj = options.plainObjects ? { __proto__: null } : {};
|
|
6856
6972
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
@@ -6878,29 +6994,28 @@ function requireParse$1 () {
|
|
|
6878
6994
|
return leaf;
|
|
6879
6995
|
};
|
|
6880
6996
|
|
|
6881
|
-
var
|
|
6882
|
-
if (!givenKey) {
|
|
6883
|
-
return;
|
|
6884
|
-
}
|
|
6885
|
-
|
|
6886
|
-
// Transform dot notation to bracket notation
|
|
6997
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
6887
6998
|
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
6888
6999
|
|
|
6889
|
-
|
|
7000
|
+
if (options.depth <= 0) {
|
|
7001
|
+
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
7002
|
+
if (!options.allowPrototypes) {
|
|
7003
|
+
return;
|
|
7004
|
+
}
|
|
7005
|
+
}
|
|
7006
|
+
|
|
7007
|
+
return [key];
|
|
7008
|
+
}
|
|
6890
7009
|
|
|
6891
7010
|
var brackets = /(\[[^[\]]*])/;
|
|
6892
7011
|
var child = /(\[[^[\]]*])/g;
|
|
6893
7012
|
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
7013
|
+
var segment = brackets.exec(key);
|
|
6897
7014
|
var parent = segment ? key.slice(0, segment.index) : key;
|
|
6898
7015
|
|
|
6899
|
-
// Stash the parent if it exists
|
|
6900
|
-
|
|
6901
7016
|
var keys = [];
|
|
7017
|
+
|
|
6902
7018
|
if (parent) {
|
|
6903
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
6904
7019
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
6905
7020
|
if (!options.allowPrototypes) {
|
|
6906
7021
|
return;
|
|
@@ -6910,28 +7025,42 @@ function requireParse$1 () {
|
|
|
6910
7025
|
keys.push(parent);
|
|
6911
7026
|
}
|
|
6912
7027
|
|
|
6913
|
-
// Loop through children appending to the array until we hit depth
|
|
6914
|
-
|
|
6915
7028
|
var i = 0;
|
|
6916
|
-
while (
|
|
7029
|
+
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
6917
7030
|
i += 1;
|
|
6918
|
-
|
|
7031
|
+
|
|
7032
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
7033
|
+
if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
|
|
6919
7034
|
if (!options.allowPrototypes) {
|
|
6920
7035
|
return;
|
|
6921
7036
|
}
|
|
6922
7037
|
}
|
|
7038
|
+
|
|
6923
7039
|
keys.push(segment[1]);
|
|
6924
7040
|
}
|
|
6925
7041
|
|
|
6926
|
-
// If there's a remainder, check strictDepth option for throw, else just add whatever is left
|
|
6927
|
-
|
|
6928
7042
|
if (segment) {
|
|
6929
7043
|
if (options.strictDepth === true) {
|
|
6930
7044
|
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
6931
7045
|
}
|
|
7046
|
+
|
|
6932
7047
|
keys.push('[' + key.slice(segment.index) + ']');
|
|
6933
7048
|
}
|
|
6934
7049
|
|
|
7050
|
+
return keys;
|
|
7051
|
+
};
|
|
7052
|
+
|
|
7053
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
7054
|
+
if (!givenKey) {
|
|
7055
|
+
return;
|
|
7056
|
+
}
|
|
7057
|
+
|
|
7058
|
+
var keys = splitKeyIntoSegments(givenKey, options);
|
|
7059
|
+
|
|
7060
|
+
if (!keys) {
|
|
7061
|
+
return;
|
|
7062
|
+
}
|
|
7063
|
+
|
|
6935
7064
|
return parseObject(keys, val, options, valuesParsed);
|
|
6936
7065
|
};
|
|
6937
7066
|
|
|
@@ -13802,13 +13931,13 @@ function requireDataType () {
|
|
|
13802
13931
|
case "number":
|
|
13803
13932
|
gen
|
|
13804
13933
|
.elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null
|
|
13805
|
-
|| (${dataType} == "string" && ${data} && ${data}
|
|
13934
|
+
|| (${dataType} == "string" && ${data} && ${data} == +${data})`)
|
|
13806
13935
|
.assign(coerced, (0, codegen_1._) `+${data}`);
|
|
13807
13936
|
return;
|
|
13808
13937
|
case "integer":
|
|
13809
13938
|
gen
|
|
13810
13939
|
.elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null
|
|
13811
|
-
|| (${dataType} === "string" && ${data} && ${data}
|
|
13940
|
+
|| (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`)
|
|
13812
13941
|
.assign(coerced, (0, codegen_1._) `+${data}`);
|
|
13813
13942
|
return;
|
|
13814
13943
|
case "boolean":
|