@@ -34,6 +34,7 @@ import rdapValidator from "../lib/rdap-validator.js";
34
34
import XMLHttpRequest from "xmlhttprequest" ;
35
35
36
36
const jsonResultData = {
37
+ rdapValidatorVersion : rdapValidator . version ,
37
38
testedURL : url ,
38
39
expectedResponseType : responseType ,
39
40
serverType : serverType ,
@@ -44,7 +45,7 @@ rdapValidator.setXHR(XMLHttpRequest.XMLHttpRequest);
44
45
45
46
let lastPath = null ;
46
47
47
- const cliResultCallback = function ( result , message , context , path ) {
48
+ const cliResultCallback = function ( result , message , path ) {
48
49
const indentString = " " ;
49
50
const onlyErrors = opt . named . hasOwnProperty ( "only-errors" ) ;
50
51
const indent = indentString . repeat ( onlyErrors ? 0 : Math . max ( 0 , rdapValidator . path . length - 1 ) ) ;
@@ -54,10 +55,6 @@ const cliResultCallback = function(result, message, context, path) {
54
55
55
56
console . log ( indent + "\x1b[1;31m✘\x1b[0m " + message ) ;
56
57
57
- if ( context !== undefined ) {
58
- console . log ( "\n" + indentString + indentString + indent + JSON . stringify ( context , null , 2 ) . trimEnd ( ) . replaceAll ( "\n" , "\n" + indentString + indentString + indent ) + "\n" ) ;
59
- }
60
-
61
58
} else if ( false === onlyErrors ) {
62
59
if ( true === result ) {
63
60
console . log ( indent + "\x1b[1;32m✓\x1b[0m " + message ) ;
@@ -69,12 +66,11 @@ const cliResultCallback = function(result, message, context, path) {
69
66
}
70
67
} ;
71
68
72
- const jsonResultCallback = function ( result , message , context , path ) {
69
+ const jsonResultCallback = function ( result , message , path ) {
73
70
jsonResultData . results . push ( {
74
71
testPassed : result ,
75
- message : message ,
76
- context : context ,
77
- path : path ,
72
+ message : message ,
73
+ path : path ,
78
74
} ) ;
79
75
} ;
80
76
0 commit comments