@contrast/route-coverage 1.10.0 → 1.11.1
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/LICENSE +12 -0
- package/lib/install/express.js +2 -0
- package/lib/install/fastify.js +2 -2
- package/package.json +7 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright: 2023 Contrast Security, Inc
|
|
2
|
+
Contact: support@contrastsecurity.com
|
|
3
|
+
License: Commercial
|
|
4
|
+
|
|
5
|
+
NOTICE: This Software and the patented inventions embodied within may only be
|
|
6
|
+
used as part of Contrast Security’s commercial offerings. Even though it is
|
|
7
|
+
made available through public repositories, use of this Software is subject to
|
|
8
|
+
the applicable End User Licensing Agreement found at
|
|
9
|
+
https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
10
|
+
between Contrast Security and the End User. The Software may not be reverse
|
|
11
|
+
engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
12
|
+
way not consistent with the End User License Agreement.
|
package/lib/install/express.js
CHANGED
|
@@ -182,6 +182,8 @@ module.exports = function init(core) {
|
|
|
182
182
|
|
|
183
183
|
['http', 'https', 'spdy'].forEach((name) => {
|
|
184
184
|
depHooks.resolve({ name }, (module) => {
|
|
185
|
+
if (!module.Server?.prototype) return;
|
|
186
|
+
|
|
185
187
|
patcher.patch(module.Server.prototype, 'listen', {
|
|
186
188
|
name: `${name}.Server.prototype.listen`,
|
|
187
189
|
patchType,
|
package/lib/install/fastify.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
const { createSignature } = require('./../utils/route-info');
|
|
19
19
|
const { toLowerCase } = require('@contrast/common');
|
|
20
20
|
|
|
21
|
-
/** @typedef {Parameters<import('
|
|
21
|
+
/** @typedef {Parameters<import('fastify-3.0.0').onRouteHookHandler>[0]} RouteOptions */
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @param {import('..').Core & {
|
|
@@ -86,7 +86,7 @@ module.exports = function init(core) {
|
|
|
86
86
|
install() {
|
|
87
87
|
depHooks.resolve(
|
|
88
88
|
{ name: 'fastify', version: '>=3.0.0' },
|
|
89
|
-
/** @param {import("
|
|
89
|
+
/** @param {import("fastify-3.0.0").fastify} fastify */
|
|
90
90
|
(fastify) =>
|
|
91
91
|
patcher.patch(fastify, {
|
|
92
92
|
name: 'fastify.build',
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/route-coverage",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.11.1",
|
|
4
|
+
"description": "Handles route discovery and observation",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/"
|
|
9
|
+
],
|
|
7
10
|
"main": "lib/index.js",
|
|
8
11
|
"types": "lib/index.d.ts",
|
|
9
12
|
"engines": {
|
|
@@ -14,6 +17,6 @@
|
|
|
14
17
|
"test": "../scripts/test.sh"
|
|
15
18
|
},
|
|
16
19
|
"dependencies": {
|
|
17
|
-
"@contrast/common": "1.
|
|
20
|
+
"@contrast/common": "1.15.1"
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|