@contrast/agent 4.16.1 → 4.16.2
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/bin/VERSION +1 -1
- package/bin/linux/contrast-service +0 -0
- package/bin/mac/contrast-service +0 -0
- package/bin/windows/contrast-service.exe +0 -0
- package/lib/protect/rules/cmd-injection/cmdinjection-rule.js +1 -1
- package/node_modules/async/CHANGELOG.md +13 -0
- package/node_modules/async/all.js +74 -9
- package/node_modules/async/allLimit.js +3 -3
- package/node_modules/async/allSeries.js +3 -3
- package/node_modules/async/any.js +75 -9
- package/node_modules/async/anyLimit.js +3 -3
- package/node_modules/async/anySeries.js +3 -3
- package/node_modules/async/applyEach.js +2 -2
- package/node_modules/async/applyEachSeries.js +2 -2
- package/node_modules/async/asyncify.js +3 -3
- package/node_modules/async/auto.js +81 -15
- package/node_modules/async/autoInject.js +30 -4
- package/node_modules/async/cargo.js +1 -1
- package/node_modules/async/cargoQueue.js +1 -1
- package/node_modules/async/compose.js +1 -1
- package/node_modules/async/concat.js +72 -4
- package/node_modules/async/concatLimit.js +3 -3
- package/node_modules/async/concatSeries.js +2 -2
- package/node_modules/async/detect.js +43 -8
- package/node_modules/async/detectLimit.js +3 -3
- package/node_modules/async/detectSeries.js +3 -3
- package/node_modules/async/dir.js +1 -1
- package/node_modules/async/dist/async.js +1379 -168
- package/node_modules/async/dist/async.min.js +1 -1
- package/node_modules/async/dist/async.mjs +1372 -161
- package/node_modules/async/doDuring.js +3 -3
- package/node_modules/async/doUntil.js +2 -2
- package/node_modules/async/doWhilst.js +3 -3
- package/node_modules/async/during.js +3 -3
- package/node_modules/async/each.js +69 -28
- package/node_modules/async/eachLimit.js +4 -4
- package/node_modules/async/eachOf.js +85 -16
- package/node_modules/async/eachOfLimit.js +3 -3
- package/node_modules/async/eachOfSeries.js +2 -2
- package/node_modules/async/eachSeries.js +2 -2
- package/node_modules/async/ensureAsync.js +2 -2
- package/node_modules/async/every.js +74 -9
- package/node_modules/async/everyLimit.js +3 -3
- package/node_modules/async/everySeries.js +3 -3
- package/node_modules/async/filter.js +49 -9
- package/node_modules/async/filterLimit.js +3 -3
- package/node_modules/async/filterSeries.js +3 -3
- package/node_modules/async/find.js +43 -8
- package/node_modules/async/findLimit.js +3 -3
- package/node_modules/async/findSeries.js +3 -3
- package/node_modules/async/flatMap.js +72 -4
- package/node_modules/async/flatMapLimit.js +3 -3
- package/node_modules/async/flatMapSeries.js +2 -2
- package/node_modules/async/foldl.js +87 -11
- package/node_modules/async/foldr.js +2 -2
- package/node_modules/async/forEach.js +69 -28
- package/node_modules/async/forEachLimit.js +4 -4
- package/node_modules/async/forEachOf.js +85 -16
- package/node_modules/async/forEachOfLimit.js +3 -3
- package/node_modules/async/forEachOfSeries.js +2 -2
- package/node_modules/async/forEachSeries.js +2 -2
- package/node_modules/async/forever.js +4 -4
- package/node_modules/async/groupBy.js +62 -8
- package/node_modules/async/groupByLimit.js +3 -3
- package/node_modules/async/groupBySeries.js +2 -2
- package/node_modules/async/inject.js +87 -11
- package/node_modules/async/internal/applyEach.js +2 -2
- package/node_modules/async/internal/asyncEachOfLimit.js +1 -1
- package/node_modules/async/internal/consoleFunc.js +5 -1
- package/node_modules/async/internal/createTester.js +2 -2
- package/node_modules/async/internal/eachOfLimit.js +6 -6
- package/node_modules/async/internal/filter.js +2 -2
- package/node_modules/async/internal/iterator.js +5 -2
- package/node_modules/async/internal/map.js +1 -1
- package/node_modules/async/internal/parallel.js +3 -3
- package/node_modules/async/internal/queue.js +4 -4
- package/node_modules/async/internal/reject.js +2 -2
- package/node_modules/async/internal/setImmediate.js +6 -2
- package/node_modules/async/internal/wrapAsync.js +1 -1
- package/node_modules/async/log.js +1 -1
- package/node_modules/async/map.js +86 -6
- package/node_modules/async/mapLimit.js +3 -3
- package/node_modules/async/mapSeries.js +3 -3
- package/node_modules/async/mapValues.js +102 -12
- package/node_modules/async/mapValuesLimit.js +4 -4
- package/node_modules/async/mapValuesSeries.js +1 -1
- package/node_modules/async/memoize.js +3 -3
- package/node_modules/async/nextTick.js +3 -3
- package/node_modules/async/package.json +4 -6
- package/node_modules/async/parallel.js +96 -7
- package/node_modules/async/parallelLimit.js +2 -2
- package/node_modules/async/priorityQueue.js +11 -4
- package/node_modules/async/queue.js +4 -4
- package/node_modules/async/race.js +3 -3
- package/node_modules/async/reduce.js +87 -11
- package/node_modules/async/reduceRight.js +2 -2
- package/node_modules/async/reflect.js +2 -2
- package/node_modules/async/reflectAll.js +1 -1
- package/node_modules/async/reject.js +44 -10
- package/node_modules/async/rejectLimit.js +3 -3
- package/node_modules/async/rejectSeries.js +3 -3
- package/node_modules/async/retry.js +2 -2
- package/node_modules/async/retryable.js +4 -4
- package/node_modules/async/select.js +49 -9
- package/node_modules/async/selectLimit.js +3 -3
- package/node_modules/async/selectSeries.js +3 -3
- package/node_modules/async/seq.js +4 -4
- package/node_modules/async/series.js +112 -12
- package/node_modules/async/setImmediate.js +1 -1
- package/node_modules/async/some.js +75 -9
- package/node_modules/async/someLimit.js +3 -3
- package/node_modules/async/someSeries.js +3 -3
- package/node_modules/async/sortBy.js +121 -19
- package/node_modules/async/timeout.js +2 -2
- package/node_modules/async/times.js +1 -1
- package/node_modules/async/timesLimit.js +3 -3
- package/node_modules/async/timesSeries.js +1 -1
- package/node_modules/async/transform.js +111 -19
- package/node_modules/async/tryEach.js +3 -3
- package/node_modules/async/until.js +3 -3
- package/node_modules/async/waterfall.js +4 -4
- package/node_modules/async/whilst.js +3 -3
- package/node_modules/async/wrapSync.js +3 -3
- package/package.json +1 -1
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = transform;
|
|
7
7
|
|
|
8
|
-
var _eachOf = require('./eachOf');
|
|
8
|
+
var _eachOf = require('./eachOf.js');
|
|
9
9
|
|
|
10
10
|
var _eachOf2 = _interopRequireDefault(_eachOf);
|
|
11
11
|
|
|
12
|
-
var _once = require('./internal/once');
|
|
12
|
+
var _once = require('./internal/once.js');
|
|
13
13
|
|
|
14
14
|
var _once2 = _interopRequireDefault(_once);
|
|
15
15
|
|
|
16
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
16
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
17
17
|
|
|
18
18
|
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
|
19
19
|
|
|
20
|
-
var _promiseCallback = require('./internal/promiseCallback');
|
|
20
|
+
var _promiseCallback = require('./internal/promiseCallback.js');
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -43,26 +43,118 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
43
43
|
* @returns {Promise} a promise, if no callback provided
|
|
44
44
|
* @example
|
|
45
45
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
46
|
+
* // file1.txt is a file that is 1000 bytes in size
|
|
47
|
+
* // file2.txt is a file that is 2000 bytes in size
|
|
48
|
+
* // file3.txt is a file that is 3000 bytes in size
|
|
49
|
+
*
|
|
50
|
+
* // helper function that returns human-readable size format from bytes
|
|
51
|
+
* function formatBytes(bytes, decimals = 2) {
|
|
52
|
+
* // implementation not included for brevity
|
|
53
|
+
* return humanReadbleFilesize;
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* const fileList = ['file1.txt','file2.txt','file3.txt'];
|
|
57
|
+
*
|
|
58
|
+
* // asynchronous function that returns the file size, transformed to human-readable format
|
|
59
|
+
* // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
|
|
60
|
+
* function transformFileSize(acc, value, key, callback) {
|
|
61
|
+
* fs.stat(value, function(err, stat) {
|
|
62
|
+
* if (err) {
|
|
63
|
+
* return callback(err);
|
|
64
|
+
* }
|
|
65
|
+
* acc[key] = formatBytes(stat.size);
|
|
66
|
+
* callback(null);
|
|
51
67
|
* });
|
|
52
|
-
* }
|
|
53
|
-
*
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* // Using callbacks
|
|
71
|
+
* async.transform(fileList, transformFileSize, function(err, result) {
|
|
72
|
+
* if(err) {
|
|
73
|
+
* console.log(err);
|
|
74
|
+
* } else {
|
|
75
|
+
* console.log(result);
|
|
76
|
+
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
|
|
77
|
+
* }
|
|
54
78
|
* });
|
|
55
79
|
*
|
|
80
|
+
* // Using Promises
|
|
81
|
+
* async.transform(fileList, transformFileSize)
|
|
82
|
+
* .then(result => {
|
|
83
|
+
* console.log(result);
|
|
84
|
+
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
|
|
85
|
+
* }).catch(err => {
|
|
86
|
+
* console.log(err);
|
|
87
|
+
* });
|
|
88
|
+
*
|
|
89
|
+
* // Using async/await
|
|
90
|
+
* (async () => {
|
|
91
|
+
* try {
|
|
92
|
+
* let result = await async.transform(fileList, transformFileSize);
|
|
93
|
+
* console.log(result);
|
|
94
|
+
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
|
|
95
|
+
* }
|
|
96
|
+
* catch (err) {
|
|
97
|
+
* console.log(err);
|
|
98
|
+
* }
|
|
99
|
+
* })();
|
|
100
|
+
*
|
|
56
101
|
* @example
|
|
57
102
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
103
|
+
* // file1.txt is a file that is 1000 bytes in size
|
|
104
|
+
* // file2.txt is a file that is 2000 bytes in size
|
|
105
|
+
* // file3.txt is a file that is 3000 bytes in size
|
|
106
|
+
*
|
|
107
|
+
* // helper function that returns human-readable size format from bytes
|
|
108
|
+
* function formatBytes(bytes, decimals = 2) {
|
|
109
|
+
* // implementation not included for brevity
|
|
110
|
+
* return humanReadbleFilesize;
|
|
111
|
+
* }
|
|
112
|
+
*
|
|
113
|
+
* const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' };
|
|
114
|
+
*
|
|
115
|
+
* // asynchronous function that returns the file size, transformed to human-readable format
|
|
116
|
+
* // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
|
|
117
|
+
* function transformFileSize(acc, value, key, callback) {
|
|
118
|
+
* fs.stat(value, function(err, stat) {
|
|
119
|
+
* if (err) {
|
|
120
|
+
* return callback(err);
|
|
121
|
+
* }
|
|
122
|
+
* acc[key] = formatBytes(stat.size);
|
|
123
|
+
* callback(null);
|
|
124
|
+
* });
|
|
125
|
+
* }
|
|
126
|
+
*
|
|
127
|
+
* // Using callbacks
|
|
128
|
+
* async.transform(fileMap, transformFileSize, function(err, result) {
|
|
129
|
+
* if(err) {
|
|
130
|
+
* console.log(err);
|
|
131
|
+
* } else {
|
|
132
|
+
* console.log(result);
|
|
133
|
+
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
|
|
134
|
+
* }
|
|
135
|
+
* });
|
|
136
|
+
*
|
|
137
|
+
* // Using Promises
|
|
138
|
+
* async.transform(fileMap, transformFileSize)
|
|
139
|
+
* .then(result => {
|
|
140
|
+
* console.log(result);
|
|
141
|
+
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
|
|
142
|
+
* }).catch(err => {
|
|
143
|
+
* console.log(err);
|
|
144
|
+
* });
|
|
145
|
+
*
|
|
146
|
+
* // Using async/await
|
|
147
|
+
* async () => {
|
|
148
|
+
* try {
|
|
149
|
+
* let result = await async.transform(fileMap, transformFileSize);
|
|
150
|
+
* console.log(result);
|
|
151
|
+
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
|
|
152
|
+
* }
|
|
153
|
+
* catch (err) {
|
|
154
|
+
* console.log(err);
|
|
155
|
+
* }
|
|
156
|
+
* }
|
|
157
|
+
*
|
|
66
158
|
*/
|
|
67
159
|
function transform(coll, accumulator, iteratee, callback) {
|
|
68
160
|
if (arguments.length <= 3 && typeof accumulator === 'function') {
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _eachSeries = require('./eachSeries');
|
|
7
|
+
var _eachSeries = require('./eachSeries.js');
|
|
8
8
|
|
|
9
9
|
var _eachSeries2 = _interopRequireDefault(_eachSeries);
|
|
10
10
|
|
|
11
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
11
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
12
12
|
|
|
13
13
|
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
|
14
14
|
|
|
15
|
-
var _awaitify = require('./internal/awaitify');
|
|
15
|
+
var _awaitify = require('./internal/awaitify.js');
|
|
16
16
|
|
|
17
17
|
var _awaitify2 = _interopRequireDefault(_awaitify);
|
|
18
18
|
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = until;
|
|
7
7
|
|
|
8
|
-
var _whilst = require('./whilst');
|
|
8
|
+
var _whilst = require('./whilst.js');
|
|
9
9
|
|
|
10
10
|
var _whilst2 = _interopRequireDefault(_whilst);
|
|
11
11
|
|
|
12
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
12
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
13
13
|
|
|
14
14
|
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
|
15
15
|
|
|
@@ -41,7 +41,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
41
41
|
* @example
|
|
42
42
|
* const results = []
|
|
43
43
|
* let finished = false
|
|
44
|
-
* async.until(function test(
|
|
44
|
+
* async.until(function test(cb) {
|
|
45
45
|
* cb(null, finished)
|
|
46
46
|
* }, function iter(next) {
|
|
47
47
|
* fetchPage(url, (err, body) => {
|
|
@@ -4,19 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _once = require('./internal/once');
|
|
7
|
+
var _once = require('./internal/once.js');
|
|
8
8
|
|
|
9
9
|
var _once2 = _interopRequireDefault(_once);
|
|
10
10
|
|
|
11
|
-
var _onlyOnce = require('./internal/onlyOnce');
|
|
11
|
+
var _onlyOnce = require('./internal/onlyOnce.js');
|
|
12
12
|
|
|
13
13
|
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
|
|
14
14
|
|
|
15
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
15
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
16
16
|
|
|
17
17
|
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
|
18
18
|
|
|
19
|
-
var _awaitify = require('./internal/awaitify');
|
|
19
|
+
var _awaitify = require('./internal/awaitify.js');
|
|
20
20
|
|
|
21
21
|
var _awaitify2 = _interopRequireDefault(_awaitify);
|
|
22
22
|
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _onlyOnce = require('./internal/onlyOnce');
|
|
7
|
+
var _onlyOnce = require('./internal/onlyOnce.js');
|
|
8
8
|
|
|
9
9
|
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
|
|
10
10
|
|
|
11
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
11
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
12
12
|
|
|
13
13
|
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
|
14
14
|
|
|
15
|
-
var _awaitify = require('./internal/awaitify');
|
|
15
|
+
var _awaitify = require('./internal/awaitify.js');
|
|
16
16
|
|
|
17
17
|
var _awaitify2 = _interopRequireDefault(_awaitify);
|
|
18
18
|
|
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = asyncify;
|
|
7
7
|
|
|
8
|
-
var _initialParams = require('./internal/initialParams');
|
|
8
|
+
var _initialParams = require('./internal/initialParams.js');
|
|
9
9
|
|
|
10
10
|
var _initialParams2 = _interopRequireDefault(_initialParams);
|
|
11
11
|
|
|
12
|
-
var _setImmediate = require('./internal/setImmediate');
|
|
12
|
+
var _setImmediate = require('./internal/setImmediate.js');
|
|
13
13
|
|
|
14
14
|
var _setImmediate2 = _interopRequireDefault(_setImmediate);
|
|
15
15
|
|
|
16
|
-
var _wrapAsync = require('./internal/wrapAsync');
|
|
16
|
+
var _wrapAsync = require('./internal/wrapAsync.js');
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|