@contrast/route-coverage 1.46.0 → 1.48.0
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/lib/install/hapi.js +9 -2
- package/lib/install/restify.js +1 -1
- package/package.json +10 -10
package/lib/install/hapi.js
CHANGED
|
@@ -62,11 +62,18 @@ module.exports = function init(core) {
|
|
|
62
62
|
patcher.patch(data.result.route.settings, 'handler', {
|
|
63
63
|
name: 'route.settings.handler',
|
|
64
64
|
patchType,
|
|
65
|
-
|
|
65
|
+
// this needs to be in a pre-hook so that the route
|
|
66
|
+
// data is in the store before our dataflow hooks run
|
|
67
|
+
pre({ args }) {
|
|
66
68
|
const [{ method, path: url, route }] = args;
|
|
67
69
|
//TODO: Will this signature always be associated with an existing route?
|
|
68
70
|
const signature = createSignature(method, path);
|
|
69
|
-
routeCoverage.observe({
|
|
71
|
+
routeCoverage.observe({
|
|
72
|
+
signature,
|
|
73
|
+
url,
|
|
74
|
+
method: StringPrototypeToLowerCase.call(method),
|
|
75
|
+
normalizedUrl: route.path,
|
|
76
|
+
});
|
|
70
77
|
}
|
|
71
78
|
});
|
|
72
79
|
}
|
package/lib/install/restify.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = function init(core) {
|
|
|
36
36
|
|
|
37
37
|
return core.routeCoverage.restify = {
|
|
38
38
|
install() {
|
|
39
|
-
depHooks.resolve({ name: 'restify', version: '>=
|
|
39
|
+
depHooks.resolve({ name: 'restify', version: '>=10 <12' }, (restify) => {
|
|
40
40
|
patcher.patch(restify, 'createServer', {
|
|
41
41
|
name: 'restify.createServer',
|
|
42
42
|
patchType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/route-coverage",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
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)",
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"types": "lib/index.d.ts",
|
|
15
15
|
"engines": {
|
|
16
16
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">= 18.7.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.
|
|
24
|
-
"@contrast/config": "1.
|
|
25
|
-
"@contrast/core": "1.
|
|
26
|
-
"@contrast/dep-hooks": "1.
|
|
27
|
-
"@contrast/fn-inspect": "^
|
|
28
|
-
"@contrast/logger": "1.
|
|
29
|
-
"@contrast/patcher": "1.
|
|
30
|
-
"@contrast/scopes": "1.
|
|
23
|
+
"@contrast/common": "1.36.0",
|
|
24
|
+
"@contrast/config": "1.51.0",
|
|
25
|
+
"@contrast/core": "1.56.0",
|
|
26
|
+
"@contrast/dep-hooks": "1.25.0",
|
|
27
|
+
"@contrast/fn-inspect": "^5.0.2",
|
|
28
|
+
"@contrast/logger": "1.29.0",
|
|
29
|
+
"@contrast/patcher": "1.28.0",
|
|
30
|
+
"@contrast/scopes": "1.26.0",
|
|
31
31
|
"semver": "^7.6.0"
|
|
32
32
|
}
|
|
33
33
|
}
|