@@ -1568,7 +1568,7 @@ module.exports = __nccwpck_require__(9023).inspect;
15681568
15691569/***/ }),
15701570
1571- /***/ 991 :
1571+ /***/ 7772 :
15721572/***/ ((module) => {
15731573
15741574
@@ -1598,14 +1598,14 @@ module.exports = {
15981598
15991599/***/ }),
16001600
1601- /***/ 3627 :
1601+ /***/ 4164 :
16021602/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
16031603
16041604
16051605
1606- var stringify = __nccwpck_require__(6586 );
1607- var parse = __nccwpck_require__(7140 );
1608- var formats = __nccwpck_require__(991 );
1606+ var stringify = __nccwpck_require__(1241 );
1607+ var parse = __nccwpck_require__(3335 );
1608+ var formats = __nccwpck_require__(7772 );
16091609
16101610module.exports = {
16111611 formats: formats,
@@ -1616,12 +1616,12 @@ module.exports = {
16161616
16171617/***/ }),
16181618
1619- /***/ 7140 :
1619+ /***/ 3335 :
16201620/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
16211621
16221622
16231623
1624- var utils = __nccwpck_require__(6678 );
1624+ var utils = __nccwpck_require__(637 );
16251625
16261626var has = Object.prototype.hasOwnProperty;
16271627var isArray = Array.isArray;
@@ -1657,8 +1657,19 @@ var interpretNumericEntities = function (str) {
16571657 });
16581658};
16591659
1660- var parseArrayValue = function (val, options, currentArrayLength) {
1660+ var parseArrayValue = function (val, options, currentArrayLength, isFlatArrayValue ) {
16611661 if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
1662+ if (isFlatArrayValue && options.throwOnLimitExceeded) {
1663+ var commaCount = 0;
1664+ var commaIndex = val.indexOf(',');
1665+ while (commaIndex > -1) {
1666+ commaCount += 1;
1667+ if (commaCount >= options.arrayLimit) {
1668+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
1669+ }
1670+ commaIndex = val.indexOf(',', commaIndex + 1);
1671+ }
1672+ }
16621673 return val.split(',');
16631674 }
16641675
@@ -1735,7 +1746,8 @@ var parseValues = function parseQueryStringValues(str, options) {
17351746 parseArrayValue(
17361747 part.slice(pos + 1),
17371748 options,
1738- isArray(obj[key]) ? obj[key].length : 0
1749+ isArray(obj[key]) ? obj[key].length : 0,
1750+ part.indexOf('[]=') === -1
17391751 ),
17401752 function (encodedVal) {
17411753 return options.decoder(encodedVal, defaults.decoder, charset, 'value');
@@ -1753,10 +1765,7 @@ var parseValues = function parseQueryStringValues(str, options) {
17531765 }
17541766
17551767 if (options.comma && isArray(val) && val.length > options.arrayLimit) {
1756- if (options.throwOnLimitExceeded) {
1757- throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
1758- }
1759- val = utils.combine([], val, options.arrayLimit, options.plainObjects);
1768+ val = utils.combine([], val, options.arrayLimit, options.plainObjects, options.throwOnLimitExceeded);
17601769 }
17611770
17621771 if (key !== null) {
@@ -1766,7 +1775,8 @@ var parseValues = function parseQueryStringValues(str, options) {
17661775 obj[key],
17671776 val,
17681777 options.arrayLimit,
1769- options.plainObjects
1778+ options.plainObjects,
1779+ options.throwOnLimitExceeded
17701780 );
17711781 } else if (!existing || options.duplicates === 'last') {
17721782 obj[key] = val;
@@ -1801,7 +1811,8 @@ var parseObject = function (chain, val, options, valuesParsed) {
18011811 [],
18021812 leaf,
18031813 options.arrayLimit,
1804- options.plainObjects
1814+ options.plainObjects,
1815+ options.throwOnLimitExceeded
18051816 );
18061817 }
18071818 } else {
@@ -2026,14 +2037,14 @@ module.exports = function (str, opts) {
20262037
20272038/***/ }),
20282039
2029- /***/ 6586 :
2040+ /***/ 1241 :
20302041/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
20312042
20322043
20332044
2034- var getSideChannel = __nccwpck_require__(5019 );
2035- var utils = __nccwpck_require__(6678 );
2036- var formats = __nccwpck_require__(991 );
2045+ var getSideChannel = __nccwpck_require__(8008 );
2046+ var utils = __nccwpck_require__(637 );
2047+ var formats = __nccwpck_require__(7772 );
20372048var has = Object.prototype.hasOwnProperty;
20382049
20392050var arrayPrefixGenerators = {
@@ -2396,13 +2407,14 @@ module.exports = function (object, opts) {
23962407
23972408/***/ }),
23982409
2399- /***/ 6678 :
2410+ /***/ 637 :
24002411/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
24012412
24022413
24032414
2404- var formats = __nccwpck_require__(991);
2405- var getSideChannel = __nccwpck_require__(5019);
2415+ var formats = __nccwpck_require__(7772);
2416+ var getSideChannel = __nccwpck_require__(8008);
2417+ var defineProperty = __nccwpck_require__(5683);
24062418
24072419var has = Object.prototype.hasOwnProperty;
24082420var isArray = Array.isArray;
@@ -2467,6 +2479,19 @@ var arrayToObject = function arrayToObject(source, options) {
24672479 return obj;
24682480};
24692481
2482+ var setProperty = function setProperty(obj, key, value) {
2483+ if (key === '__proto__' && defineProperty) {
2484+ defineProperty(obj, key, {
2485+ configurable: true,
2486+ enumerable: true,
2487+ value: value,
2488+ writable: true
2489+ });
2490+ } else {
2491+ obj[key] = value;
2492+ }
2493+ };
2494+
24702495var merge = function merge(target, source, options) {
24712496 /* eslint no-param-reassign: 0 */
24722497 if (!source) {
@@ -2476,7 +2501,10 @@ var merge = function merge(target, source, options) {
24762501 if (typeof source !== 'object' && typeof source !== 'function') {
24772502 if (isArray(target)) {
24782503 var nextIndex = target.length;
2479- if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) {
2504+ if (options && typeof options.arrayLimit === 'number' && nextIndex >= options.arrayLimit) {
2505+ if (options.throwOnLimitExceeded) {
2506+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
2507+ }
24802508 return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
24812509 }
24822510 target[nextIndex] = source;
@@ -2516,6 +2544,9 @@ var merge = function merge(target, source, options) {
25162544 }
25172545 var combined = [target].concat(source);
25182546 if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) {
2547+ if (options.throwOnLimitExceeded) {
2548+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
2549+ }
25192550 return markOverflow(arrayToObject(combined, options), combined.length - 1);
25202551 }
25212552 return combined;
@@ -2539,16 +2570,22 @@ var merge = function merge(target, source, options) {
25392570 target[i] = item;
25402571 }
25412572 });
2573+ if (options && typeof options.arrayLimit === 'number' && target.length > options.arrayLimit) {
2574+ if (options.throwOnLimitExceeded) {
2575+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
2576+ }
2577+ return markOverflow(arrayToObject(target, options), target.length - 1);
2578+ }
25422579 return target;
25432580 }
25442581
25452582 return Object.keys(source).reduce(function (acc, key) {
25462583 var value = source[key];
25472584
25482585 if (has.call(acc, key)) {
2549- acc[ key] = merge(acc[key], value, options);
2586+ setProperty( acc, key, merge(acc[key], value, options) );
25502587 } else {
2551- acc[ key] = value;
2588+ setProperty( acc, key, value) ;
25522589 }
25532590
25542591 if (isOverflow(source) && !isOverflow(acc)) {
@@ -2567,7 +2604,7 @@ var merge = function merge(target, source, options) {
25672604
25682605var assign = function assignSingleSource(target, source) {
25692606 return Object.keys(source).reduce(function (acc, key) {
2570- acc[ key] = source[key];
2607+ setProperty( acc, key, source[key]) ;
25712608 return acc;
25722609 }, target);
25732610};
@@ -2613,6 +2650,13 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) {
26132650 var out = '';
26142651 for (var j = 0; j < string.length; j += limit) {
26152652 var segment = string.length >= limit ? string.slice(j, j + limit) : string;
2653+ if (j + limit < string.length) {
2654+ var last = segment.charCodeAt(segment.length - 1);
2655+ if (last >= 0xD800 && last <= 0xDBFF) {
2656+ segment = segment.slice(0, -1);
2657+ j -= 1;
2658+ }
2659+ }
26162660 var arr = [];
26172661
26182662 for (var i = 0; i < segment.length; ++i) {
@@ -2666,7 +2710,7 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) {
26662710
26672711var compact = function compact(value) {
26682712 var queue = [{ obj: { o: value }, prop: 'o' }];
2669- var refs = [] ;
2713+ var refs = getSideChannel() ;
26702714
26712715 for (var i = 0; i < queue.length; ++i) {
26722716 var item = queue[i];
@@ -2676,9 +2720,9 @@ var compact = function compact(value) {
26762720 for (var j = 0; j < keys.length; ++j) {
26772721 var key = keys[j];
26782722 var val = obj[key];
2679- if (typeof val === 'object' && val !== null && refs.indexOf (val) === -1 ) {
2723+ if (typeof val === 'object' && val !== null && ! refs.has (val)) {
26802724 queue[queue.length] = { obj: obj, prop: key };
2681- refs[refs.length] = val;
2725+ refs.set( val, true) ;
26822726 }
26832727 }
26842728 }
@@ -2700,9 +2744,12 @@ var isBuffer = function isBuffer(obj) {
27002744 return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
27012745};
27022746
2703- var combine = function combine(a, b, arrayLimit, plainObjects) {
2747+ var combine = function combine(a, b, arrayLimit, plainObjects, throwOnLimitExceeded ) {
27042748 // If 'a' is already an overflow object, add to it
27052749 if (isOverflow(a)) {
2750+ if (throwOnLimitExceeded) {
2751+ throw new RangeError('Array limit exceeded. Only ' + arrayLimit + ' element' + (arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
2752+ }
27062753 var newIndex = getMaxIndex(a) + 1;
27072754 a[newIndex] = b;
27082755 setMaxIndex(a, newIndex);
@@ -2711,6 +2758,9 @@ var combine = function combine(a, b, arrayLimit, plainObjects) {
27112758
27122759 var result = [].concat(a, b);
27132760 if (result.length > arrayLimit) {
2761+ if (throwOnLimitExceeded) {
2762+ throw new RangeError('Array limit exceeded. Only ' + arrayLimit + ' element' + (arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
2763+ }
27142764 return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1);
27152765 }
27162766 return result;
@@ -5793,7 +5843,7 @@ module.exports = $WeakMap
57935843
57945844/***/ }),
57955845
5796- /***/ 5019 :
5846+ /***/ 8008 :
57975847/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
57985848
57995849
@@ -5816,7 +5866,10 @@ module.exports = function getSideChannel() {
58165866 var channel = {
58175867 assert: function (key) {
58185868 if (!channel.has(key)) {
5819- throw new $TypeError('Side channel does not contain ' + inspect(key));
5869+ var keyDesc = key && Object(key) === key
5870+ ? 'the given object key'
5871+ : inspect(key);
5872+ throw new $TypeError('Side channel does not contain ' + keyDesc);
58205873 }
58215874 },
58225875 'delete': function (key) {
@@ -5836,7 +5889,7 @@ module.exports = function getSideChannel() {
58365889 $channelData.set(key, value);
58375890 }
58385891 };
5839- // @ts-expect-error TODO: figure out why this is erroring
5892+
58405893 return channel;
58415894};
58425895
@@ -6122,7 +6175,7 @@ exports.debug = debug; // for test
61226175
61236176/***/ }),
61246177
6125- /***/ 3623 :
6178+ /***/ 992 :
61266179/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
61276180
61286181
@@ -6142,7 +6195,7 @@ exports.HttpClient = exports.HttpClientResponse = exports.HttpCodes = void 0;
61426195exports.isHttps = isHttps;
61436196const http = __nccwpck_require__(8611);
61446197const https = __nccwpck_require__(5692);
6145- const util = __nccwpck_require__(16 );
6198+ const util = __nccwpck_require__(9863 );
61466199let fs;
61476200let tunnel;
61486201var HttpCodes;
@@ -6643,7 +6696,7 @@ exports.HttpClient = HttpClient;
66436696
66446697/***/ }),
66456698
6646- /***/ 16 :
6699+ /***/ 9863 :
66476700/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
66486701
66496702
@@ -6663,7 +6716,7 @@ exports.getUrl = getUrl;
66636716exports.decompressGzippedContent = decompressGzippedContent;
66646717exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv;
66656718exports.obtainContentCharset = obtainContentCharset;
6666- const qs = __nccwpck_require__(3627 );
6719+ const qs = __nccwpck_require__(4164 );
66676720const zlib = __nccwpck_require__(3106);
66686721/**
66696722 * creates an url from a request url and optional base url (http://server:8080)
@@ -38512,8 +38565,8 @@ async function downloadAndExtractZip(url) {
3851238565 throw new Error(`Failed to download and extract ChromeDriver from ${url} after ${maxRetries} attempts: ${message}`);
3851338566}
3851438567
38515- // EXTERNAL MODULE: ./node_modules/.pnpm/typed-rest-client@3.0 .0/node_modules/typed-rest-client/HttpClient.js
38516- var typed_rest_client_HttpClient = __nccwpck_require__(3623 );
38568+ // EXTERNAL MODULE: ./node_modules/.pnpm/typed-rest-client@3.1 .0/node_modules/typed-rest-client/HttpClient.js
38569+ var typed_rest_client_HttpClient = __nccwpck_require__(992 );
3851738570;// CONCATENATED MODULE: ./lib/installer/http.js
3851838571/**
3851938572 * HTTP helpers used by the TypeScript rewrite of setup-chromedriver.
0 commit comments