@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.
Files changed (124) hide show
  1. package/bin/VERSION +1 -1
  2. package/bin/linux/contrast-service +0 -0
  3. package/bin/mac/contrast-service +0 -0
  4. package/bin/windows/contrast-service.exe +0 -0
  5. package/lib/protect/rules/cmd-injection/cmdinjection-rule.js +1 -1
  6. package/node_modules/async/CHANGELOG.md +13 -0
  7. package/node_modules/async/all.js +74 -9
  8. package/node_modules/async/allLimit.js +3 -3
  9. package/node_modules/async/allSeries.js +3 -3
  10. package/node_modules/async/any.js +75 -9
  11. package/node_modules/async/anyLimit.js +3 -3
  12. package/node_modules/async/anySeries.js +3 -3
  13. package/node_modules/async/applyEach.js +2 -2
  14. package/node_modules/async/applyEachSeries.js +2 -2
  15. package/node_modules/async/asyncify.js +3 -3
  16. package/node_modules/async/auto.js +81 -15
  17. package/node_modules/async/autoInject.js +30 -4
  18. package/node_modules/async/cargo.js +1 -1
  19. package/node_modules/async/cargoQueue.js +1 -1
  20. package/node_modules/async/compose.js +1 -1
  21. package/node_modules/async/concat.js +72 -4
  22. package/node_modules/async/concatLimit.js +3 -3
  23. package/node_modules/async/concatSeries.js +2 -2
  24. package/node_modules/async/detect.js +43 -8
  25. package/node_modules/async/detectLimit.js +3 -3
  26. package/node_modules/async/detectSeries.js +3 -3
  27. package/node_modules/async/dir.js +1 -1
  28. package/node_modules/async/dist/async.js +1379 -168
  29. package/node_modules/async/dist/async.min.js +1 -1
  30. package/node_modules/async/dist/async.mjs +1372 -161
  31. package/node_modules/async/doDuring.js +3 -3
  32. package/node_modules/async/doUntil.js +2 -2
  33. package/node_modules/async/doWhilst.js +3 -3
  34. package/node_modules/async/during.js +3 -3
  35. package/node_modules/async/each.js +69 -28
  36. package/node_modules/async/eachLimit.js +4 -4
  37. package/node_modules/async/eachOf.js +85 -16
  38. package/node_modules/async/eachOfLimit.js +3 -3
  39. package/node_modules/async/eachOfSeries.js +2 -2
  40. package/node_modules/async/eachSeries.js +2 -2
  41. package/node_modules/async/ensureAsync.js +2 -2
  42. package/node_modules/async/every.js +74 -9
  43. package/node_modules/async/everyLimit.js +3 -3
  44. package/node_modules/async/everySeries.js +3 -3
  45. package/node_modules/async/filter.js +49 -9
  46. package/node_modules/async/filterLimit.js +3 -3
  47. package/node_modules/async/filterSeries.js +3 -3
  48. package/node_modules/async/find.js +43 -8
  49. package/node_modules/async/findLimit.js +3 -3
  50. package/node_modules/async/findSeries.js +3 -3
  51. package/node_modules/async/flatMap.js +72 -4
  52. package/node_modules/async/flatMapLimit.js +3 -3
  53. package/node_modules/async/flatMapSeries.js +2 -2
  54. package/node_modules/async/foldl.js +87 -11
  55. package/node_modules/async/foldr.js +2 -2
  56. package/node_modules/async/forEach.js +69 -28
  57. package/node_modules/async/forEachLimit.js +4 -4
  58. package/node_modules/async/forEachOf.js +85 -16
  59. package/node_modules/async/forEachOfLimit.js +3 -3
  60. package/node_modules/async/forEachOfSeries.js +2 -2
  61. package/node_modules/async/forEachSeries.js +2 -2
  62. package/node_modules/async/forever.js +4 -4
  63. package/node_modules/async/groupBy.js +62 -8
  64. package/node_modules/async/groupByLimit.js +3 -3
  65. package/node_modules/async/groupBySeries.js +2 -2
  66. package/node_modules/async/inject.js +87 -11
  67. package/node_modules/async/internal/applyEach.js +2 -2
  68. package/node_modules/async/internal/asyncEachOfLimit.js +1 -1
  69. package/node_modules/async/internal/consoleFunc.js +5 -1
  70. package/node_modules/async/internal/createTester.js +2 -2
  71. package/node_modules/async/internal/eachOfLimit.js +6 -6
  72. package/node_modules/async/internal/filter.js +2 -2
  73. package/node_modules/async/internal/iterator.js +5 -2
  74. package/node_modules/async/internal/map.js +1 -1
  75. package/node_modules/async/internal/parallel.js +3 -3
  76. package/node_modules/async/internal/queue.js +4 -4
  77. package/node_modules/async/internal/reject.js +2 -2
  78. package/node_modules/async/internal/setImmediate.js +6 -2
  79. package/node_modules/async/internal/wrapAsync.js +1 -1
  80. package/node_modules/async/log.js +1 -1
  81. package/node_modules/async/map.js +86 -6
  82. package/node_modules/async/mapLimit.js +3 -3
  83. package/node_modules/async/mapSeries.js +3 -3
  84. package/node_modules/async/mapValues.js +102 -12
  85. package/node_modules/async/mapValuesLimit.js +4 -4
  86. package/node_modules/async/mapValuesSeries.js +1 -1
  87. package/node_modules/async/memoize.js +3 -3
  88. package/node_modules/async/nextTick.js +3 -3
  89. package/node_modules/async/package.json +4 -6
  90. package/node_modules/async/parallel.js +96 -7
  91. package/node_modules/async/parallelLimit.js +2 -2
  92. package/node_modules/async/priorityQueue.js +11 -4
  93. package/node_modules/async/queue.js +4 -4
  94. package/node_modules/async/race.js +3 -3
  95. package/node_modules/async/reduce.js +87 -11
  96. package/node_modules/async/reduceRight.js +2 -2
  97. package/node_modules/async/reflect.js +2 -2
  98. package/node_modules/async/reflectAll.js +1 -1
  99. package/node_modules/async/reject.js +44 -10
  100. package/node_modules/async/rejectLimit.js +3 -3
  101. package/node_modules/async/rejectSeries.js +3 -3
  102. package/node_modules/async/retry.js +2 -2
  103. package/node_modules/async/retryable.js +4 -4
  104. package/node_modules/async/select.js +49 -9
  105. package/node_modules/async/selectLimit.js +3 -3
  106. package/node_modules/async/selectSeries.js +3 -3
  107. package/node_modules/async/seq.js +4 -4
  108. package/node_modules/async/series.js +112 -12
  109. package/node_modules/async/setImmediate.js +1 -1
  110. package/node_modules/async/some.js +75 -9
  111. package/node_modules/async/someLimit.js +3 -3
  112. package/node_modules/async/someSeries.js +3 -3
  113. package/node_modules/async/sortBy.js +121 -19
  114. package/node_modules/async/timeout.js +2 -2
  115. package/node_modules/async/times.js +1 -1
  116. package/node_modules/async/timesLimit.js +3 -3
  117. package/node_modules/async/timesSeries.js +1 -1
  118. package/node_modules/async/transform.js +111 -19
  119. package/node_modules/async/tryEach.js +3 -3
  120. package/node_modules/async/until.js +3 -3
  121. package/node_modules/async/waterfall.js +4 -4
  122. package/node_modules/async/whilst.js +3 -3
  123. package/node_modules/async/wrapSync.js +3 -3
  124. package/package.json +1 -1
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _concatLimit = require('./concatLimit');
7
+ var _concatLimit = require('./concatLimit.js');
8
8
 
9
9
  var _concatLimit2 = _interopRequireDefault(_concatLimit);
10
10
 
11
- var _awaitify = require('./internal/awaitify');
11
+ var _awaitify = require('./internal/awaitify.js');
12
12
 
13
13
  var _awaitify2 = _interopRequireDefault(_awaitify);
14
14
 
@@ -36,9 +36,77 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
36
36
  * @returns A Promise, if no callback is passed
37
37
  * @example
38
38
  *
39
- * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
40
- * // files is now a list of filenames that exist in the 3 directories
39
+ * // dir1 is a directory that contains file1.txt, file2.txt
40
+ * // dir2 is a directory that contains file3.txt, file4.txt
41
+ * // dir3 is a directory that contains file5.txt
42
+ * // dir4 does not exist
43
+ *
44
+ * let directoryList = ['dir1','dir2','dir3'];
45
+ * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];
46
+ *
47
+ * // Using callbacks
48
+ * async.concat(directoryList, fs.readdir, function(err, results) {
49
+ * if (err) {
50
+ * console.log(err);
51
+ * } else {
52
+ * console.log(results);
53
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
54
+ * }
55
+ * });
56
+ *
57
+ * // Error Handling
58
+ * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {
59
+ * if (err) {
60
+ * console.log(err);
61
+ * // [ Error: ENOENT: no such file or directory ]
62
+ * // since dir4 does not exist
63
+ * } else {
64
+ * console.log(results);
65
+ * }
66
+ * });
67
+ *
68
+ * // Using Promises
69
+ * async.concat(directoryList, fs.readdir)
70
+ * .then(results => {
71
+ * console.log(results);
72
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
73
+ * }).catch(err => {
74
+ * console.log(err);
41
75
  * });
76
+ *
77
+ * // Error Handling
78
+ * async.concat(withMissingDirectoryList, fs.readdir)
79
+ * .then(results => {
80
+ * console.log(results);
81
+ * }).catch(err => {
82
+ * console.log(err);
83
+ * // [ Error: ENOENT: no such file or directory ]
84
+ * // since dir4 does not exist
85
+ * });
86
+ *
87
+ * // Using async/await
88
+ * async () => {
89
+ * try {
90
+ * let results = await async.concat(directoryList, fs.readdir);
91
+ * console.log(results);
92
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
93
+ * } catch (err) {
94
+ * console.log(err);
95
+ * }
96
+ * }
97
+ *
98
+ * // Error Handling
99
+ * async () => {
100
+ * try {
101
+ * let results = await async.concat(withMissingDirectoryList, fs.readdir);
102
+ * console.log(results);
103
+ * } catch (err) {
104
+ * console.log(err);
105
+ * // [ Error: ENOENT: no such file or directory ]
106
+ * // since dir4 does not exist
107
+ * }
108
+ * }
109
+ *
42
110
  */
43
111
  function concat(coll, iteratee, callback) {
44
112
  return (0, _concatLimit2.default)(coll, Infinity, iteratee, callback);
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _wrapAsync = require('./internal/wrapAsync');
7
+ var _wrapAsync = require('./internal/wrapAsync.js');
8
8
 
9
9
  var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
10
10
 
11
- var _mapLimit = require('./mapLimit');
11
+ var _mapLimit = require('./mapLimit.js');
12
12
 
13
13
  var _mapLimit2 = _interopRequireDefault(_mapLimit);
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
 
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _concatLimit = require('./concatLimit');
7
+ var _concatLimit = require('./concatLimit.js');
8
8
 
9
9
  var _concatLimit2 = _interopRequireDefault(_concatLimit);
10
10
 
11
- var _awaitify = require('./internal/awaitify');
11
+ var _awaitify = require('./internal/awaitify.js');
12
12
 
13
13
  var _awaitify2 = _interopRequireDefault(_awaitify);
14
14
 
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _createTester = require('./internal/createTester');
7
+ var _createTester = require('./internal/createTester.js');
8
8
 
9
9
  var _createTester2 = _interopRequireDefault(_createTester);
10
10
 
11
- var _eachOf = require('./eachOf');
11
+ var _eachOf = require('./eachOf.js');
12
12
 
13
13
  var _eachOf2 = _interopRequireDefault(_eachOf);
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
 
@@ -46,13 +46,48 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
46
46
  * @returns A Promise, if no callback is passed
47
47
  * @example
48
48
  *
49
- * async.detect(['file1','file2','file3'], function(filePath, callback) {
50
- * fs.access(filePath, function(err) {
51
- * callback(null, !err)
52
- * });
53
- * }, function(err, result) {
49
+ * // dir1 is a directory that contains file1.txt, file2.txt
50
+ * // dir2 is a directory that contains file3.txt, file4.txt
51
+ * // dir3 is a directory that contains file5.txt
52
+ *
53
+ * // asynchronous function that checks if a file exists
54
+ * function fileExists(file, callback) {
55
+ * fs.access(file, fs.constants.F_OK, (err) => {
56
+ * callback(null, !err);
57
+ * });
58
+ * }
59
+ *
60
+ * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,
61
+ * function(err, result) {
62
+ * console.log(result);
63
+ * // dir1/file1.txt
64
+ * // result now equals the first file in the list that exists
65
+ * }
66
+ *);
67
+ *
68
+ * // Using Promises
69
+ * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)
70
+ * .then(result => {
71
+ * console.log(result);
72
+ * // dir1/file1.txt
54
73
  * // result now equals the first file in the list that exists
74
+ * }).catch(err => {
75
+ * console.log(err);
55
76
  * });
77
+ *
78
+ * // Using async/await
79
+ * async () => {
80
+ * try {
81
+ * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);
82
+ * console.log(result);
83
+ * // dir1/file1.txt
84
+ * // result now equals the file in the list that exists
85
+ * }
86
+ * catch (err) {
87
+ * console.log(err);
88
+ * }
89
+ * }
90
+ *
56
91
  */
57
92
  function detect(coll, iteratee, callback) {
58
93
  return (0, _createTester2.default)(bool => bool, (res, item) => item)(_eachOf2.default, coll, iteratee, callback);
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _createTester = require('./internal/createTester');
7
+ var _createTester = require('./internal/createTester.js');
8
8
 
9
9
  var _createTester2 = _interopRequireDefault(_createTester);
10
10
 
11
- var _eachOfLimit = require('./internal/eachOfLimit');
11
+ var _eachOfLimit = require('./internal/eachOfLimit.js');
12
12
 
13
13
  var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
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
 
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _createTester = require('./internal/createTester');
7
+ var _createTester = require('./internal/createTester.js');
8
8
 
9
9
  var _createTester2 = _interopRequireDefault(_createTester);
10
10
 
11
- var _eachOfLimit = require('./internal/eachOfLimit');
11
+ var _eachOfLimit = require('./internal/eachOfLimit.js');
12
12
 
13
13
  var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
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
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _consoleFunc = require('./internal/consoleFunc');
7
+ var _consoleFunc = require('./internal/consoleFunc.js');
8
8
 
9
9
  var _consoleFunc2 = _interopRequireDefault(_consoleFunc);
10
10