diff --git a/.gitignore b/.gitignore index c2658d7..23d67fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +yarn.lock diff --git a/lib/cli.js b/lib/cli.js index 9f3e4be..e48d750 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -29,8 +29,8 @@ exports._parse = function (argv, _console, callback) { DEFAULT_SLEEP_MS) .option('--concurrency ', 'Amount of requests to run in parallel, defaults to ' + DEFAULT_CONCURRENCY, DEFAULT_CONCURRENCY) - .option('--usermedium ', 'Medium where the CSS will be used (e.g. `all` (service default), `print`, `screen`)') - .option('--profile ', 'CSS profile to use for validation (e.g. `css3svg` (service default), `css21`, `svg`)') + .option('--usermedium ', 'Medium where the CSS will be used (e.g. `all` (service default), `print`, `screen`)') // jscs:disable + .option('--profile ', 'CSS profile to use for validation (e.g. `css3svg` (service default), `css21`, `svg`)') // jscs:disable .option('--lang ', 'Language to use in response (e.g. `en` (service default), `bg`, `de`)') .option('--warning ', 'Warning level to set (e.g. `0`, `1`, `2` (service default), `no`)') .option('--vextwarning ', @@ -40,6 +40,9 @@ exports._parse = function (argv, _console, callback) { // Process our arguments program.parse(argv); + // Get program opts + var opts = program.opts(); + // Assume we are OK by default var status = STATUS_OK; @@ -54,17 +57,17 @@ exports._parse = function (argv, _console, callback) { } // Otherwise, perform our validation - async.eachOfLimit(filepathContentArr, program.concurrency, + async.eachOfLimit(filepathContentArr, opts.concurrency, function handleFilepathContent (filepathContent, i, cb) { var filepath = filepaths[i]; var options = { text: filepathContent, - w3cUrl: program.w3cUrl, - usermedium: program.usermedium, - profile: program.profile, - lang: program.lang, - warning: program.warning, - vextwarning: program.vextwarning + w3cUrl: opts.w3cUrl, + usermedium: opts.usermedium, + profile: opts.profile, + lang: opts.lang, + warning: opts.warning, + vextwarning: opts.vextwarning }; validateCss(options, function handleValidateCss (err, data) { @@ -96,7 +99,7 @@ exports._parse = function (argv, _console, callback) { } // Continue - setTimeout(cb, program.sleep); + setTimeout(cb, opts.delay); }); }, function handleResults (err) { // If there was an error, callback with it diff --git a/package.json b/package.json index 1209e41..be8f684 100644 --- a/package.json +++ b/package.json @@ -33,24 +33,24 @@ "test": "mocha && npm run lint" }, "dependencies": { - "async": "~2.1.5", - "commander": "~2.9.0", - "form-data": "~0.1.2", + "async": "~3.2.0", + "commander": "~7.1.0", + "form-data": "~4.0.0", "obj-extend": "~0.1.0", - "readable-stream": "~1.1.9", - "sax": "~0.5.5" + "readable-stream": "~3.6.0", + "sax": "~1.2.4" }, "devDependencies": { - "chai": "~3.5.0", - "eight-track": "~1.3.0", - "eight-track-normalize-multipart": "~0.1.0", - "express": "~3.21.2", - "foundry": "~4.3.2", - "foundry-release-git": "~2.0.2", + "chai": "~4.3.3", + "eight-track": "~2.1.0", + "eight-track-normalize-multipart": "~0.2.0", + "express": "~4.17.1", + "foundry": "~4.4.2", + "foundry-release-git": "~2.0.3", "foundry-release-npm": "~2.0.2", "jscs": "~3.0.7", - "jshint": "~2.9.4", - "mocha": "~3.2.0", + "jshint": "~2.12.0", + "mocha": "~8.3.1", "twolfson-style": "~1.6.1" }, "keywords": [ @@ -64,4 +64,4 @@ "foundry-release-npm" ] } -} \ No newline at end of file +} diff --git a/test/cli_test.js b/test/cli_test.js index 59760f7..ed92421 100644 --- a/test/cli_test.js +++ b/test/cli_test.js @@ -59,6 +59,6 @@ describe('An invalid CSS file processed by our CLI', function () { }); it('outputs our expected warning', function () { - expect(this.stderr).to.contain('invalid.css:3:\n Property -moz-box-sizing'); + expect(this.stderr).to.contain('invalid.css:3:\n “-moz-box-sizing” is an unknown vendor extension'); }); }); diff --git a/test/css-validator_test.js b/test/css-validator_test.js index 8612296..c605bf8 100644 --- a/test/css-validator_test.js +++ b/test/css-validator_test.js @@ -70,7 +70,7 @@ describe('A invalid CSS file being validated', function () { describe('A valid CSS URI being validated', function () { runValidateCssUri(function () { return { - uri: 'https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/valid.css' + uri: 'https://gitcdn.link/repo/twolfson/css-validator/0.7.0/test/test-files/valid.css' }; }); @@ -84,7 +84,7 @@ describe('A valid CSS URI being validated', function () { describe('A invalid CSS URI being validated', function () { runValidateCssUri(function () { return { - uri: 'https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/invalid.css' + uri: 'https://gitcdn.link/repo/twolfson/css-validator/0.7.0/test/test-files/invalid.css' }; }); diff --git a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1c56a083189bb3ccdfb8c5b3543341c5.json b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1c56a083189bb3ccdfb8c5b3543341c5.json deleted file mode 100644 index bc7d489..0000000 --- a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1c56a083189bb3ccdfb8c5b3543341c5.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "request": { - "httpVersion": "1.1", - "headers": { - "host": "localhost:1337", - "connection": "close" - }, - "trailers": {}, - "method": "GET", - "url": "/css-validator/validator?output=soap12&w3cUrl=http%3A%2F%2Flocalhost%3A1337%2Fcss-validator%2Fvalidator&uri=https%3A%2F%2Fcdn.rawgit.com%2Ftwolfson%2Fcss-validator%2F0.7.0%2Ftest%2Ftest-files%2Fvalid.css", - "body": "" - }, - "response": { - "httpVersion": "1.1", - "headers": { - "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:30:26 GMT", - "pragma": "no-cache", - "transfer-encoding": "chunked", - "content-language": "en", - "content-type": "application/soap+xml;charset=utf-8", - "server": "Jigsaw/2.3.0-beta3", - "vary": "Accept-Language", - "x-w3c-validator-errors": "0", - "x-w3c-validator-status": "Valid" - }, - "trailers": {}, - "statusCode": 200, - "body": "\n\n \n \n https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/valid.css\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:30:26Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" - } -} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1d9075ce414d56bc58f9a8b8c2fe5b9b.json b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1d9075ce414d56bc58f9a8b8c2fe5b9b.json deleted file mode 100644 index 3d62b2b..0000000 --- a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_1d9075ce414d56bc58f9a8b8c2fe5b9b.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "request": { - "httpVersion": "1.1", - "headers": { - "host": "localhost:1337", - "connection": "close" - }, - "trailers": {}, - "method": "GET", - "url": "/css-validator/validator?output=soap12&w3cUrl=http%3A%2F%2Flocalhost%3A1337%2Fcss-validator%2Fvalidator&uri=https%3A%2F%2Fcdn.rawgit.com%2Ftwolfson%2Fcss-validator%2F0.7.0%2Ftest%2Ftest-files%2Finvalid.css", - "body": "" - }, - "response": { - "httpVersion": "1.1", - "headers": { - "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:30:26 GMT", - "pragma": "no-cache", - "transfer-encoding": "chunked", - "content-language": "en", - "content-type": "application/soap+xml;charset=utf-8", - "server": "Jigsaw/2.3.0-beta3", - "vary": "Accept-Language", - "x-w3c-validator-errors": "1", - "x-w3c-validator-status": "Invalid" - }, - "trailers": {}, - "statusCode": 200, - "body": "\n\n \n \n https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/invalid.css\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:30:26Z\n false\n \n \n 1\n \n \n https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/invalid.css\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n url(ab 'cd') is not a background-color value : \n \n \n \n \n \n \n \n 1\n \n \n https://cdn.rawgit.com/twolfson/css-validator/0.7.0/test/test-files/invalid.css\n \n \n 3\n 0\n Property -moz-box-sizing is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" - } -} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_319e22637d6dc24aa73a46c650902961.json b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_319e22637d6dc24aa73a46c650902961.json new file mode 100644 index 0000000..20290df --- /dev/null +++ b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_319e22637d6dc24aa73a46c650902961.json @@ -0,0 +1,38 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "host": "localhost:1337", + "connection": "close" + }, + "trailers": {}, + "method": "GET", + "url": "/css-validator/validator?output=soap12&w3cUrl=http%3A%2F%2Flocalhost%3A1337%2Fcss-validator%2Fvalidator&uri=https%3A%2F%2Fgitcdn.link%2Frepo%2Ftwolfson%2Fcss-validator%2F0.7.0%2Ftest%2Ftest-files%2Fvalid.css", + "bodyEncoding": "utf8", + "body": "" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:21:41 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "0", + "x-w3c-validator-status": "Valid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n https://gitcdn.link/repo/twolfson/css-validator/0.7.0/test/test-files/valid.css\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:41Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" + } +} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_866e5724035789665269ec61dc1641a4.json b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_866e5724035789665269ec61dc1641a4.json new file mode 100644 index 0000000..f8f64cd --- /dev/null +++ b/test/test-files/fake-jigsaw/GET_%2Fcss-validator%2Fvalidator%3Fo_866e5724035789665269ec61dc1641a4.json @@ -0,0 +1,38 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "host": "localhost:1337", + "connection": "close" + }, + "trailers": {}, + "method": "GET", + "url": "/css-validator/validator?output=soap12&w3cUrl=http%3A%2F%2Flocalhost%3A1337%2Fcss-validator%2Fvalidator&uri=https%3A%2F%2Fgitcdn.link%2Frepo%2Ftwolfson%2Fcss-validator%2F0.7.0%2Ftest%2Ftest-files%2Finvalid.css", + "bodyEncoding": "utf8", + "body": "" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:21:01 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "1", + "x-w3c-validator-status": "Invalid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n https://gitcdn.link/repo/twolfson/css-validator/0.7.0/test/test-files/invalid.css\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:02Z\n false\n \n \n 1\n \n \n https://gitcdn.link/cdn/twolfson/css-validator/b694a83b93fa9ffb2150dd2fbab75223a49b3bd2/test/test-files/invalid.css\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n “url(ab 'cd')” is not a “background-color” value : \n \n \n \n \n \n \n \n 1\n \n \n https://gitcdn.link/cdn/twolfson/css-validator/b694a83b93fa9ffb2150dd2fbab75223a49b3bd2/test/test-files/invalid.css\n \n \n 3\n 0\n “-moz-box-sizing” is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" + } +} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_526485bb7d0707a4b57a91373385e04e.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_526485bb7d0707a4b57a91373385e04e.json index f4322e5..40d3693 100644 --- a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_526485bb7d0707a4b57a91373385e04e.json +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_526485bb7d0707a4b57a91373385e04e.json @@ -2,7 +2,7 @@ "request": { "httpVersion": "1.1", "headers": { - "content-type": "multipart/form-data; boundary=--------------------------119433183818606062351888", + "content-type": "multipart/form-data; boundary=--------------------------823789241125776521034436", "host": "localhost:1337", "connection": "close", "transfer-encoding": "chunked" @@ -10,25 +10,31 @@ "trailers": {}, "method": "POST", "url": "/css-validator/validator", - "body": "----------------------------119433183818606062351888\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------119433183818606062351888\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------119433183818606062351888\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------119433183818606062351888--" + "bodyEncoding": "utf8", + "body": "----------------------------823789241125776521034436\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------823789241125776521034436\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------823789241125776521034436\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------823789241125776521034436--" }, "response": { "httpVersion": "1.1", "headers": { "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:09:58 GMT", + "date": "Sun, 07 Mar 2021 10:21:40 GMT", "pragma": "no-cache", "transfer-encoding": "chunked", "content-language": "en", "content-type": "application/soap+xml;charset=utf-8", "server": "Jigsaw/2.3.0-beta3", "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", "x-w3c-validator-errors": "0", - "x-w3c-validator-status": "Valid" + "x-w3c-validator-status": "Valid", + "connection": "close" }, "trailers": {}, "statusCode": 200, - "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:09:58Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:40Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" } } \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_70e94cf96374050f7556586668bf6184.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_70e94cf96374050f7556586668bf6184.json index 2c2257d..a7f1b61 100644 --- a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_70e94cf96374050f7556586668bf6184.json +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_70e94cf96374050f7556586668bf6184.json @@ -2,7 +2,7 @@ "request": { "httpVersion": "1.1", "headers": { - "content-type": "multipart/form-data; boundary=--------------------------180478838620769357494280", + "content-type": "multipart/form-data; boundary=--------------------------322023314191257846612438", "host": "localhost:1337", "connection": "close", "transfer-encoding": "chunked" @@ -10,25 +10,31 @@ "trailers": {}, "method": "POST", "url": "/css-validator/validator", - "body": "----------------------------180478838620769357494280\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------180478838620769357494280\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------180478838620769357494280\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------180478838620769357494280--" + "bodyEncoding": "utf8", + "body": "----------------------------322023314191257846612438\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------322023314191257846612438\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------322023314191257846612438\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------322023314191257846612438--" }, "response": { "httpVersion": "1.1", "headers": { "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:09:58 GMT", + "date": "Sun, 07 Mar 2021 10:21:40 GMT", "pragma": "no-cache", "transfer-encoding": "chunked", "content-language": "en", "content-type": "application/soap+xml;charset=utf-8", "server": "Jigsaw/2.3.0-beta3", "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", "x-w3c-validator-errors": "1", - "x-w3c-validator-status": "Invalid" + "x-w3c-validator-status": "Invalid", + "connection": "close" }, "trailers": {}, "statusCode": 200, - "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:09:58Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n url(ab 'cd') is not a background-color value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n Property -moz-box-sizing is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:40Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n “url(ab 'cd')” is not a “background-color” value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n “-moz-box-sizing” is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" } } \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_aa857c07950aabae1aa1f97d95880a5e.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_aa857c07950aabae1aa1f97d95880a5e.json index 368b1e3..157dc27 100644 --- a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_aa857c07950aabae1aa1f97d95880a5e.json +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_aa857c07950aabae1aa1f97d95880a5e.json @@ -2,7 +2,7 @@ "request": { "httpVersion": "1.1", "headers": { - "content-type": "multipart/form-data; boundary=--------------------------631053412006540735923660", + "content-type": "multipart/form-data; boundary=--------------------------357882119082305388164373", "host": "localhost:1337", "connection": "close", "transfer-encoding": "chunked" @@ -10,25 +10,31 @@ "trailers": {}, "method": "POST", "url": "/css-validator/validator", - "body": "----------------------------631053412006540735923660\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------631053412006540735923660\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------631053412006540735923660\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------631053412006540735923660--" + "bodyEncoding": "utf8", + "body": "----------------------------357882119082305388164373\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------357882119082305388164373\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------357882119082305388164373\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------357882119082305388164373--" }, "response": { "httpVersion": "1.1", "headers": { "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:09:58 GMT", + "date": "Sun, 07 Mar 2021 10:21:40 GMT", "pragma": "no-cache", "transfer-encoding": "chunked", "content-language": "en", "content-type": "application/soap+xml;charset=utf-8", "server": "Jigsaw/2.3.0-beta3", "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", "x-w3c-validator-errors": "0", - "x-w3c-validator-status": "Valid" + "x-w3c-validator-status": "Valid", + "connection": "close" }, "trailers": {}, "statusCode": 200, - "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:09:58Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:40Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" } } \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_b01b6dda79fbb8a05a4313bd36d18166.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_b01b6dda79fbb8a05a4313bd36d18166.json new file mode 100644 index 0000000..8916f96 --- /dev/null +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_b01b6dda79fbb8a05a4313bd36d18166.json @@ -0,0 +1,40 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "content-type": "multipart/form-data; boundary=--------------------------907739183840313930238424", + "host": "localhost:1337", + "connection": "close", + "transfer-encoding": "chunked" + }, + "trailers": {}, + "method": "POST", + "url": "/css-validator/validator", + "bodyEncoding": "utf8", + "body": "----------------------------907739183840313930238424\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------907739183840313930238424\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------907739183840313930238424\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------907739183840313930238424--\r\n" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:25:09 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "1", + "x-w3c-validator-status": "Invalid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:25:09Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n “url(ab 'cd')” is not a “background-color” value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n “-moz-box-sizing” is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" + } +} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_bac997c6520131945d11659def6876b3.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_bac997c6520131945d11659def6876b3.json new file mode 100644 index 0000000..a5d4162 --- /dev/null +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_bac997c6520131945d11659def6876b3.json @@ -0,0 +1,40 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "content-type": "multipart/form-data; boundary=--------------------------540950892174155717799911", + "host": "localhost:1337", + "connection": "close", + "transfer-encoding": "chunked" + }, + "trailers": {}, + "method": "POST", + "url": "/css-validator/validator", + "bodyEncoding": "utf8", + "body": "----------------------------540950892174155717799911\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------540950892174155717799911\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------540950892174155717799911\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------540950892174155717799911--\r\n" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:25:09 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "1", + "x-w3c-validator-status": "Invalid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:25:09Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n “url(ab 'cd')” is not a “background-color” value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n “-moz-box-sizing” is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" + } +} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d0fc59552c514a6cfde2b979f258009e.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d0fc59552c514a6cfde2b979f258009e.json new file mode 100644 index 0000000..df6a5c1 --- /dev/null +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d0fc59552c514a6cfde2b979f258009e.json @@ -0,0 +1,40 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "content-type": "multipart/form-data; boundary=--------------------------461283002974093733751980", + "host": "localhost:1337", + "connection": "close", + "transfer-encoding": "chunked" + }, + "trailers": {}, + "method": "POST", + "url": "/css-validator/validator", + "bodyEncoding": "utf8", + "body": "----------------------------461283002974093733751980\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------461283002974093733751980\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------461283002974093733751980\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------461283002974093733751980--\r\n" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:25:09 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "0", + "x-w3c-validator-status": "Valid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:25:09Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" + } +} \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d56efd3da2bc6ea5b0c8346843f619dc.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d56efd3da2bc6ea5b0c8346843f619dc.json index 61ccf1c..94a0c94 100644 --- a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d56efd3da2bc6ea5b0c8346843f619dc.json +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_d56efd3da2bc6ea5b0c8346843f619dc.json @@ -2,7 +2,7 @@ "request": { "httpVersion": "1.1", "headers": { - "content-type": "multipart/form-data; boundary=--------------------------327561027419916412695239", + "content-type": "multipart/form-data; boundary=--------------------------490158434652554678086072", "host": "localhost:1337", "connection": "close", "transfer-encoding": "chunked" @@ -10,25 +10,31 @@ "trailers": {}, "method": "POST", "url": "/css-validator/validator", - "body": "----------------------------327561027419916412695239\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------327561027419916412695239\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------327561027419916412695239\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------327561027419916412695239--" + "bodyEncoding": "utf8", + "body": "----------------------------490158434652554678086072\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------490158434652554678086072\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------490158434652554678086072\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(ab'cd');\n -moz-box-sizing: content-box;\n}\n\n\r\n----------------------------490158434652554678086072--" }, "response": { "httpVersion": "1.1", "headers": { "cache-control": "no-cache", - "connection": "close", - "date": "Sun, 19 Mar 2017 07:09:59 GMT", + "date": "Sun, 07 Mar 2021 10:21:41 GMT", "pragma": "no-cache", "transfer-encoding": "chunked", "content-language": "en", "content-type": "application/soap+xml;charset=utf-8", "server": "Jigsaw/2.3.0-beta3", "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", "x-w3c-validator-errors": "1", - "x-w3c-validator-status": "Invalid" + "x-w3c-validator-status": "Invalid", + "connection": "close" }, "trailers": {}, "statusCode": 200, - "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2017-03-19T07:09:59Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n url(ab 'cd') is not a background-color value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n Property -moz-box-sizing is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:21:41Z\n false\n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 2\n parse-error\n body \n \n exp\n \n \n url(ab 'cd')\n \n value\n \n \n \n Value Error : background (nullcolors.html#propdef-background)\n \n “url(ab 'cd')” is not a “background-color” value : \n \n \n \n \n \n \n \n 1\n \n \n file://localhost/TextArea\n \n \n 3\n 0\n “-moz-box-sizing” is an unknown vendor extension\n vendor-extension\n \n \n \n \n \n \n \n\n\n" } } \ No newline at end of file diff --git a/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_e635bbc34c4e4b6f66663de649b058e5.json b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_e635bbc34c4e4b6f66663de649b058e5.json new file mode 100644 index 0000000..d6c4dc0 --- /dev/null +++ b/test/test-files/fake-jigsaw/POST_%2Fcss-validator%2Fvalidator_e635bbc34c4e4b6f66663de649b058e5.json @@ -0,0 +1,40 @@ +{ + "request": { + "httpVersion": "1.1", + "headers": { + "content-type": "multipart/form-data; boundary=--------------------------081802144532091806951155", + "host": "localhost:1337", + "connection": "close", + "transfer-encoding": "chunked" + }, + "trailers": {}, + "method": "POST", + "url": "/css-validator/validator", + "bodyEncoding": "utf8", + "body": "----------------------------081802144532091806951155\r\nContent-Disposition: form-data; name=\"output\"\r\n\r\nsoap12\r\n----------------------------081802144532091806951155\r\nContent-Disposition: form-data; name=\"text\"\r\n\r\nbody {\n background: url(abcd);\n}\n\r\n----------------------------081802144532091806951155\r\nContent-Disposition: form-data; name=\"w3cUrl\"\r\n\r\nhttp://localhost:1337/css-validator/validator\r\n----------------------------081802144532091806951155--\r\n" + }, + "response": { + "httpVersion": "1.1", + "headers": { + "cache-control": "no-cache", + "date": "Sun, 07 Mar 2021 10:25:08 GMT", + "pragma": "no-cache", + "transfer-encoding": "chunked", + "content-language": "en", + "content-type": "application/soap+xml;charset=utf-8", + "server": "Jigsaw/2.3.0-beta3", + "vary": "Accept-Language", + "access-control-allow-origin": "*", + "access-control-allow-headers": "content-type,accept-charset", + "access-control-allow-methods": "GET, HEAD, POST, OPTIONS", + "access-control-max-age": "600", + "x-w3c-validator-errors": "0", + "x-w3c-validator-status": "Valid", + "connection": "close" + }, + "trailers": {}, + "statusCode": 200, + "bodyEncoding": "utf8", + "body": "\n\n \n \n TextArea\n http://jigsaw.w3.org/css-validator/\n css3\n 2021-03-07T10:25:08Z\n true\n \n \n 0\n \n \n \n 0\n \n \n \n \n\n\n" + } +} \ No newline at end of file