step-node-agent 3.29.1 → 3.29.3
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/node_modules/har-validator/node_modules/ajv/README.md +14 -6
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js +23 -11
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js +2 -2
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map +1 -1
- package/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts +5 -0
- package/node_modules/har-validator/node_modules/ajv/lib/compile/index.js +8 -6
- package/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst +15 -4
- package/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js +14 -4
- package/node_modules/har-validator/node_modules/ajv/package.json +2 -1
- package/node_modules/har-validator/node_modules/ajv/scripts/info +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/publish-built-version +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages +0 -0
- package/node_modules/minimatch/README.md +37 -0
- package/node_modules/minimatch/minimatch.js +160 -102
- package/node_modules/minimatch/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +22 -0
- package/node_modules/qs/README.md +11 -4
- package/node_modules/qs/dist/qs.js +24 -24
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +90 -47
- package/node_modules/qs/lib/utils.js +83 -11
- package/node_modules/qs/package.json +9 -8
- package/node_modules/qs/test/parse.js +245 -9
- package/node_modules/qs/test/stringify.js +7 -3
- package/node_modules/qs/test/utils.js +135 -0
- package/node_modules/request/node_modules/qs/CHANGELOG.md +12 -0
- package/node_modules/request/node_modules/qs/README.md +9 -3
- package/node_modules/request/node_modules/qs/dist/qs.js +10 -10
- package/node_modules/request/node_modules/qs/lib/parse.js +4 -4
- package/node_modules/request/node_modules/qs/lib/utils.js +6 -6
- package/node_modules/request/node_modules/qs/package.json +13 -4
- package/node_modules/request/node_modules/qs/test/parse.js +9 -0
- package/node_modules/request/node_modules/qs/test/stringify.js +6 -0
- package/node_modules/send/HISTORY.md +7 -0
- package/node_modules/send/package.json +5 -5
- package/node_modules/serve-static/HISTORY.md +6 -0
- package/node_modules/serve-static/package.json +2 -2
- package/node_modules/underscore/amd/_setup.js +1 -1
- package/node_modules/underscore/amd/pipe.js +13 -0
- package/node_modules/underscore/cjs/_setup.js +1 -1
- package/node_modules/underscore/cjs/pipe.js +12 -0
- package/node_modules/underscore/modules/_flatten.js +20 -18
- package/node_modules/underscore/modules/_setup.js +1 -1
- package/node_modules/underscore/modules/index.js +2 -2
- package/node_modules/underscore/modules/isEqual.js +108 -93
- package/node_modules/underscore/modules/package.json +1 -1
- package/node_modules/underscore/package.json +1 -1
- package/node_modules/underscore/underscore-esm-min.js +3 -3
- package/node_modules/underscore/underscore-esm-min.js.map +1 -1
- package/node_modules/underscore/underscore-esm.js +132 -115
- package/node_modules/underscore/underscore-esm.js.map +1 -1
- package/node_modules/underscore/underscore-min.js +3 -3
- package/node_modules/underscore/underscore-min.js.map +1 -1
- package/node_modules/underscore/underscore-node-f.cjs +132 -115
- package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
- package/node_modules/underscore/underscore-node.cjs +2 -2
- package/node_modules/underscore/underscore-node.mjs +2 -2
- package/node_modules/underscore/underscore-umd-min.js +3 -3
- package/node_modules/underscore/underscore-umd-min.js.map +1 -1
- package/node_modules/underscore/underscore-umd.js +132 -115
- package/node_modules/underscore/underscore-umd.js.map +1 -1
- package/node_modules/underscore/underscore.js +132 -115
- package/package.json +1 -1
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/request/node_modules/qs/bower.json +0 -21
- package/node_modules/request/node_modules/qs/component.json +0 -15
- package/node_modules/send/node_modules/http-errors/HISTORY.md +0 -180
- package/node_modules/send/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/send/node_modules/http-errors/README.md +0 -169
- package/node_modules/send/node_modules/http-errors/index.js +0 -289
- package/node_modules/send/node_modules/http-errors/package.json +0 -50
- package/node_modules/send/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/send/node_modules/statuses/LICENSE +0 -23
- package/node_modules/send/node_modules/statuses/README.md +0 -136
- package/node_modules/send/node_modules/statuses/codes.json +0 -65
- package/node_modules/send/node_modules/statuses/index.js +0 -146
- package/node_modules/send/node_modules/statuses/package.json +0 -49
- package/node_modules/serve-static/node_modules/http-errors/HISTORY.md +0 -180
- package/node_modules/serve-static/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/http-errors/README.md +0 -169
- package/node_modules/serve-static/node_modules/http-errors/index.js +0 -289
- package/node_modules/serve-static/node_modules/http-errors/package.json +0 -50
- package/node_modules/serve-static/node_modules/ms/index.js +0 -162
- package/node_modules/serve-static/node_modules/ms/license.md +0 -21
- package/node_modules/serve-static/node_modules/ms/package.json +0 -38
- package/node_modules/serve-static/node_modules/ms/readme.md +0 -59
- package/node_modules/serve-static/node_modules/send/HISTORY.md +0 -526
- package/node_modules/serve-static/node_modules/send/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/send/README.md +0 -327
- package/node_modules/serve-static/node_modules/send/SECURITY.md +0 -24
- package/node_modules/serve-static/node_modules/send/index.js +0 -1142
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md +0 -128
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js +0 -60
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json +0 -40
- package/node_modules/serve-static/node_modules/send/package.json +0 -62
- package/node_modules/serve-static/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/serve-static/node_modules/statuses/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/statuses/README.md +0 -136
- package/node_modules/serve-static/node_modules/statuses/codes.json +0 -65
- package/node_modules/serve-static/node_modules/statuses/index.js +0 -146
- package/node_modules/serve-static/node_modules/statuses/package.json +0 -49
- package/node_modules/underscore/amd/_set.js +0 -21
- package/node_modules/underscore/amd/set.js +0 -15
- package/node_modules/underscore/cjs/_set.js +0 -21
- package/node_modules/underscore/cjs/set.js +0 -15
|
@@ -63,7 +63,7 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
63
63
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
64
64
|
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
65
65
|
|
|
66
|
-
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
66
|
+
var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
|
|
67
67
|
var parts = cleanStr.split(
|
|
68
68
|
options.delimiter,
|
|
69
69
|
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
@@ -108,16 +108,18 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
108
108
|
} else {
|
|
109
109
|
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
if (key !== null) {
|
|
112
|
+
val = utils.maybeMap(
|
|
113
|
+
parseArrayValue(
|
|
114
|
+
part.slice(pos + 1),
|
|
115
|
+
options,
|
|
116
|
+
isArray(obj[key]) ? obj[key].length : 0
|
|
117
|
+
),
|
|
118
|
+
function (encodedVal) {
|
|
119
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
@@ -128,11 +130,25 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
128
130
|
val = isArray(val) ? [val] : val;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
if (options.comma && isArray(val) && val.length > options.arrayLimit) {
|
|
134
|
+
if (options.throwOnLimitExceeded) {
|
|
135
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
136
|
+
}
|
|
137
|
+
val = utils.combine([], val, options.arrayLimit, options.plainObjects);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (key !== null) {
|
|
141
|
+
var existing = has.call(obj, key);
|
|
142
|
+
if (existing && options.duplicates === 'combine') {
|
|
143
|
+
obj[key] = utils.combine(
|
|
144
|
+
obj[key],
|
|
145
|
+
val,
|
|
146
|
+
options.arrayLimit,
|
|
147
|
+
options.plainObjects
|
|
148
|
+
);
|
|
149
|
+
} else if (!existing || options.duplicates === 'last') {
|
|
150
|
+
obj[key] = val;
|
|
151
|
+
}
|
|
136
152
|
}
|
|
137
153
|
}
|
|
138
154
|
|
|
@@ -153,25 +169,39 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
153
169
|
var root = chain[i];
|
|
154
170
|
|
|
155
171
|
if (root === '[]' && options.parseArrays) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
172
|
+
if (utils.isOverflow(leaf)) {
|
|
173
|
+
// leaf is already an overflow object, preserve it
|
|
174
|
+
obj = leaf;
|
|
175
|
+
} else {
|
|
176
|
+
obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
|
|
177
|
+
? []
|
|
178
|
+
: utils.combine(
|
|
179
|
+
[],
|
|
180
|
+
leaf,
|
|
181
|
+
options.arrayLimit,
|
|
182
|
+
options.plainObjects
|
|
183
|
+
);
|
|
184
|
+
}
|
|
159
185
|
} else {
|
|
160
186
|
obj = options.plainObjects ? { __proto__: null } : {};
|
|
161
187
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
162
188
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
163
189
|
var index = parseInt(decodedRoot, 10);
|
|
164
|
-
|
|
165
|
-
obj = { 0: leaf };
|
|
166
|
-
} else if (
|
|
167
|
-
!isNaN(index)
|
|
190
|
+
var isValidArrayIndex = !isNaN(index)
|
|
168
191
|
&& root !== decodedRoot
|
|
169
192
|
&& String(index) === decodedRoot
|
|
170
193
|
&& index >= 0
|
|
171
|
-
&&
|
|
172
|
-
) {
|
|
194
|
+
&& options.parseArrays;
|
|
195
|
+
if (!options.parseArrays && decodedRoot === '') {
|
|
196
|
+
obj = { 0: leaf };
|
|
197
|
+
} else if (isValidArrayIndex && index < options.arrayLimit) {
|
|
173
198
|
obj = [];
|
|
174
199
|
obj[index] = leaf;
|
|
200
|
+
} else if (isValidArrayIndex && options.throwOnLimitExceeded) {
|
|
201
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
202
|
+
} else if (isValidArrayIndex) {
|
|
203
|
+
obj[index] = leaf;
|
|
204
|
+
utils.markOverflow(obj, index);
|
|
175
205
|
} else if (decodedRoot !== '__proto__') {
|
|
176
206
|
obj[decodedRoot] = leaf;
|
|
177
207
|
}
|
|
@@ -183,58 +213,71 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
183
213
|
return leaf;
|
|
184
214
|
};
|
|
185
215
|
|
|
186
|
-
var
|
|
187
|
-
if (!givenKey) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// Transform dot notation to bracket notation
|
|
216
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
192
217
|
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
193
218
|
|
|
194
|
-
|
|
219
|
+
if (options.depth <= 0) {
|
|
220
|
+
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
221
|
+
if (!options.allowPrototypes) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return [key];
|
|
227
|
+
}
|
|
195
228
|
|
|
196
229
|
var brackets = /(\[[^[\]]*])/;
|
|
197
230
|
var child = /(\[[^[\]]*])/g;
|
|
198
231
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
232
|
+
var segment = brackets.exec(key);
|
|
202
233
|
var parent = segment ? key.slice(0, segment.index) : key;
|
|
203
234
|
|
|
204
|
-
// Stash the parent if it exists
|
|
205
|
-
|
|
206
235
|
var keys = [];
|
|
236
|
+
|
|
207
237
|
if (parent) {
|
|
208
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
209
238
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
210
239
|
if (!options.allowPrototypes) {
|
|
211
240
|
return;
|
|
212
241
|
}
|
|
213
242
|
}
|
|
214
243
|
|
|
215
|
-
keys.
|
|
244
|
+
keys[keys.length] = parent;
|
|
216
245
|
}
|
|
217
246
|
|
|
218
|
-
// Loop through children appending to the array until we hit depth
|
|
219
|
-
|
|
220
247
|
var i = 0;
|
|
221
|
-
while (
|
|
248
|
+
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
222
249
|
i += 1;
|
|
223
|
-
|
|
250
|
+
|
|
251
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
252
|
+
if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
|
|
224
253
|
if (!options.allowPrototypes) {
|
|
225
254
|
return;
|
|
226
255
|
}
|
|
227
256
|
}
|
|
228
|
-
keys.push(segment[1]);
|
|
229
|
-
}
|
|
230
257
|
|
|
231
|
-
|
|
258
|
+
keys[keys.length] = segment[1];
|
|
259
|
+
}
|
|
232
260
|
|
|
233
261
|
if (segment) {
|
|
234
262
|
if (options.strictDepth === true) {
|
|
235
263
|
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
236
264
|
}
|
|
237
|
-
|
|
265
|
+
|
|
266
|
+
keys[keys.length] = '[' + key.slice(segment.index) + ']';
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return keys;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
273
|
+
if (!givenKey) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
var keys = splitKeyIntoSegments(givenKey, options);
|
|
278
|
+
|
|
279
|
+
if (!keys) {
|
|
280
|
+
return;
|
|
238
281
|
}
|
|
239
282
|
|
|
240
283
|
return parseObject(keys, val, options, valuesParsed);
|
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var formats = require('./formats');
|
|
4
|
+
var getSideChannel = require('side-channel');
|
|
4
5
|
|
|
5
6
|
var has = Object.prototype.hasOwnProperty;
|
|
6
7
|
var isArray = Array.isArray;
|
|
7
8
|
|
|
9
|
+
// Track objects created from arrayLimit overflow using side-channel
|
|
10
|
+
// Stores the current max numeric index for O(1) lookup
|
|
11
|
+
var overflowChannel = getSideChannel();
|
|
12
|
+
|
|
13
|
+
var markOverflow = function markOverflow(obj, maxIndex) {
|
|
14
|
+
overflowChannel.set(obj, maxIndex);
|
|
15
|
+
return obj;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var isOverflow = function isOverflow(obj) {
|
|
19
|
+
return overflowChannel.has(obj);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var getMaxIndex = function getMaxIndex(obj) {
|
|
23
|
+
return overflowChannel.get(obj);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var setMaxIndex = function setMaxIndex(obj, maxIndex) {
|
|
27
|
+
overflowChannel.set(obj, maxIndex);
|
|
28
|
+
};
|
|
29
|
+
|
|
8
30
|
var hexTable = (function () {
|
|
9
31
|
var array = [];
|
|
10
32
|
for (var i = 0; i < 256; ++i) {
|
|
11
|
-
array.
|
|
33
|
+
array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
|
|
12
34
|
}
|
|
13
35
|
|
|
14
36
|
return array;
|
|
@@ -24,7 +46,7 @@ var compactQueue = function compactQueue(queue) {
|
|
|
24
46
|
|
|
25
47
|
for (var j = 0; j < obj.length; ++j) {
|
|
26
48
|
if (typeof obj[j] !== 'undefined') {
|
|
27
|
-
compacted.
|
|
49
|
+
compacted[compacted.length] = obj[j];
|
|
28
50
|
}
|
|
29
51
|
}
|
|
30
52
|
|
|
@@ -52,9 +74,18 @@ var merge = function merge(target, source, options) {
|
|
|
52
74
|
|
|
53
75
|
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
54
76
|
if (isArray(target)) {
|
|
55
|
-
target.
|
|
77
|
+
var nextIndex = target.length;
|
|
78
|
+
if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) {
|
|
79
|
+
return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
|
|
80
|
+
}
|
|
81
|
+
target[nextIndex] = source;
|
|
56
82
|
} else if (target && typeof target === 'object') {
|
|
57
|
-
if (
|
|
83
|
+
if (isOverflow(target)) {
|
|
84
|
+
// Add at next numeric index for overflow objects
|
|
85
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
86
|
+
target[newIndex] = source;
|
|
87
|
+
setMaxIndex(target, newIndex);
|
|
88
|
+
} else if (
|
|
58
89
|
(options && (options.plainObjects || options.allowPrototypes))
|
|
59
90
|
|| !has.call(Object.prototype, source)
|
|
60
91
|
) {
|
|
@@ -68,7 +99,23 @@ var merge = function merge(target, source, options) {
|
|
|
68
99
|
}
|
|
69
100
|
|
|
70
101
|
if (!target || typeof target !== 'object') {
|
|
71
|
-
|
|
102
|
+
if (isOverflow(source)) {
|
|
103
|
+
// Create new object with target at 0, source values shifted by 1
|
|
104
|
+
var sourceKeys = Object.keys(source);
|
|
105
|
+
var result = options && options.plainObjects
|
|
106
|
+
? { __proto__: null, 0: target }
|
|
107
|
+
: { 0: target };
|
|
108
|
+
for (var m = 0; m < sourceKeys.length; m++) {
|
|
109
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
110
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
111
|
+
}
|
|
112
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
113
|
+
}
|
|
114
|
+
var combined = [target].concat(source);
|
|
115
|
+
if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) {
|
|
116
|
+
return markOverflow(arrayToObject(combined, options), combined.length - 1);
|
|
117
|
+
}
|
|
118
|
+
return combined;
|
|
72
119
|
}
|
|
73
120
|
|
|
74
121
|
var mergeTarget = target;
|
|
@@ -83,7 +130,7 @@ var merge = function merge(target, source, options) {
|
|
|
83
130
|
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
84
131
|
target[i] = merge(targetItem, item, options);
|
|
85
132
|
} else {
|
|
86
|
-
target.
|
|
133
|
+
target[target.length] = item;
|
|
87
134
|
}
|
|
88
135
|
} else {
|
|
89
136
|
target[i] = item;
|
|
@@ -100,6 +147,17 @@ var merge = function merge(target, source, options) {
|
|
|
100
147
|
} else {
|
|
101
148
|
acc[key] = value;
|
|
102
149
|
}
|
|
150
|
+
|
|
151
|
+
if (isOverflow(source) && !isOverflow(acc)) {
|
|
152
|
+
markOverflow(acc, getMaxIndex(source));
|
|
153
|
+
}
|
|
154
|
+
if (isOverflow(acc)) {
|
|
155
|
+
var keyNum = parseInt(key, 10);
|
|
156
|
+
if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) {
|
|
157
|
+
setMaxIndex(acc, keyNum);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
103
161
|
return acc;
|
|
104
162
|
}, mergeTarget);
|
|
105
163
|
};
|
|
@@ -216,8 +274,8 @@ var compact = function compact(value) {
|
|
|
216
274
|
var key = keys[j];
|
|
217
275
|
var val = obj[key];
|
|
218
276
|
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
219
|
-
queue.
|
|
220
|
-
refs.
|
|
277
|
+
queue[queue.length] = { obj: obj, prop: key };
|
|
278
|
+
refs[refs.length] = val;
|
|
221
279
|
}
|
|
222
280
|
}
|
|
223
281
|
}
|
|
@@ -239,15 +297,27 @@ var isBuffer = function isBuffer(obj) {
|
|
|
239
297
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
240
298
|
};
|
|
241
299
|
|
|
242
|
-
var combine = function combine(a, b) {
|
|
243
|
-
|
|
300
|
+
var combine = function combine(a, b, arrayLimit, plainObjects) {
|
|
301
|
+
// If 'a' is already an overflow object, add to it
|
|
302
|
+
if (isOverflow(a)) {
|
|
303
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
304
|
+
a[newIndex] = b;
|
|
305
|
+
setMaxIndex(a, newIndex);
|
|
306
|
+
return a;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
var result = [].concat(a, b);
|
|
310
|
+
if (result.length > arrayLimit) {
|
|
311
|
+
return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1);
|
|
312
|
+
}
|
|
313
|
+
return result;
|
|
244
314
|
};
|
|
245
315
|
|
|
246
316
|
var maybeMap = function maybeMap(val, fn) {
|
|
247
317
|
if (isArray(val)) {
|
|
248
318
|
var mapped = [];
|
|
249
319
|
for (var i = 0; i < val.length; i += 1) {
|
|
250
|
-
mapped.
|
|
320
|
+
mapped[mapped.length] = fn(val[i]);
|
|
251
321
|
}
|
|
252
322
|
return mapped;
|
|
253
323
|
}
|
|
@@ -262,7 +332,9 @@ module.exports = {
|
|
|
262
332
|
decode: decode,
|
|
263
333
|
encode: encode,
|
|
264
334
|
isBuffer: isBuffer,
|
|
335
|
+
isOverflow: isOverflow,
|
|
265
336
|
isRegExp: isRegExp,
|
|
337
|
+
markOverflow: markOverflow,
|
|
266
338
|
maybeMap: maybeMap,
|
|
267
339
|
merge: merge
|
|
268
340
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "qs",
|
|
3
3
|
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
|
|
4
4
|
"homepage": "https://github.com/ljharb/qs",
|
|
5
|
-
"version": "6.14.
|
|
5
|
+
"version": "6.14.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/ljharb/qs.git"
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@browserify/envify": "^6.0.0",
|
|
38
38
|
"@browserify/uglifyify": "^6.0.0",
|
|
39
|
-
"@ljharb/eslint-config": "^
|
|
39
|
+
"@ljharb/eslint-config": "^22.1.3",
|
|
40
40
|
"browserify": "^16.5.2",
|
|
41
41
|
"bundle-collapser": "^1.4.0",
|
|
42
42
|
"common-shakeify": "~1.0.0",
|
|
43
43
|
"eclint": "^2.8.1",
|
|
44
|
-
"es-value-fixtures": "^1.7.
|
|
45
|
-
"eslint": "
|
|
44
|
+
"es-value-fixtures": "^1.7.1",
|
|
45
|
+
"eslint": "^9.39.2",
|
|
46
46
|
"evalmd": "^0.0.19",
|
|
47
|
-
"for-each": "^0.3.
|
|
47
|
+
"for-each": "^0.3.5",
|
|
48
48
|
"glob": "=10.3.7",
|
|
49
49
|
"has-bigints": "^1.1.0",
|
|
50
50
|
"has-override-mistake": "^1.0.1",
|
|
@@ -54,12 +54,13 @@
|
|
|
54
54
|
"iconv-lite": "^0.5.1",
|
|
55
55
|
"in-publish": "^2.0.1",
|
|
56
56
|
"jackspeak": "=2.1.1",
|
|
57
|
+
"jiti": "^0.0.0",
|
|
57
58
|
"mkdirp": "^0.5.5",
|
|
58
59
|
"mock-property": "^1.1.0",
|
|
59
60
|
"module-deps": "^6.2.3",
|
|
60
|
-
"npmignore": "^0.3.
|
|
61
|
+
"npmignore": "^0.3.5",
|
|
61
62
|
"nyc": "^10.3.2",
|
|
62
|
-
"object-inspect": "^1.13.
|
|
63
|
+
"object-inspect": "^1.13.4",
|
|
63
64
|
"qs-iconv": "^1.0.4",
|
|
64
65
|
"safe-publish-latest": "^2.0.0",
|
|
65
66
|
"safer-buffer": "^2.1.2",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"posttest": "npx npm@'>=10.2' audit --production",
|
|
77
78
|
"readme": "evalmd README.md",
|
|
78
79
|
"postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
79
|
-
"lint": "eslint
|
|
80
|
+
"lint": "eslint .",
|
|
80
81
|
"dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js"
|
|
81
82
|
},
|
|
82
83
|
"license": "BSD-3-Clause",
|