specberus
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -24,24 +24,16 @@ /*jshint es5:true */ | ||
; | ||
function addPart (req, name, value) { | ||
req.part() | ||
.set("Content-Disposition", 'form-data; name="' + name + '"') | ||
.set("Content-Type", "text/plain") | ||
.write(value); | ||
} | ||
if (sr.url) { | ||
req = sua.get(service) | ||
.set("User-Agent", ua) | ||
.query({ uri: sr.url, profile: "css3", output: "json", type: "html" }); | ||
.set("User-Agent", ua); | ||
req.query({ uri: sr.url, profile: "css3", output: "json", type: "html" }); | ||
} | ||
else { | ||
req = sua.post(service) | ||
.set("User-Agent", ua) | ||
; | ||
addPart(req, "text", sr.source); | ||
addPart(req, "profile", "css3"); | ||
addPart(req, "output", "json"); | ||
addPart(req, "type", "html"); | ||
req = sua.post(service); | ||
req.set("User-Agent", ua) | ||
.field('text', sr.source) | ||
.field('profile', "css3") | ||
.field('output', "json") | ||
.field('type', "html"); | ||
} | ||
req | ||
.end(function (res) { | ||
req.end(function (err, res) { | ||
var json = res.body; | ||
@@ -48,0 +40,0 @@ if (!json) return sr.throw("No JSON input."); |
@@ -11,3 +11,3 @@ /*jshint es5:true */ | ||
} else { | ||
service = "http://validator.w3.org/check"; | ||
service = "https://validator.w3.org/nu/"; | ||
} | ||
@@ -23,7 +23,8 @@ if (sr.config.skipValidation) { | ||
var req | ||
, ua = "Specberus/" + sr.version + " Node/" + process.version + " by sexy Robin"; | ||
, ua = "Specberus/" + sr.version + " Node/" + process.version + " by sexy Robin" | ||
; | ||
if (sr.url) { | ||
req = sua.get(service) | ||
.set("User-Agent", ua) | ||
.query({ uri: sr.url, output: "json" }); | ||
.set("User-Agent", ua); | ||
req.query({ doc: sr.url, out: "json" }); | ||
} | ||
@@ -33,6 +34,7 @@ else { | ||
.set("User-Agent", ua) | ||
.field('output', 'json') | ||
.field('uploaded_file', sr.source); | ||
.set('Content-Type', 'text/html') | ||
.send(sr.source) | ||
.query({ out: 'json'}); | ||
} | ||
req.end(function (res) { | ||
req.end(function (err, res) { | ||
var json = res.body; | ||
@@ -39,0 +41,0 @@ if (!json) return sr.throw("No JSON input."); |
{ | ||
"name": "specberus", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Specberus is a checker used at W3C to validate the compliance of Technical Reports with publication rules.", | ||
@@ -12,11 +12,11 @@ "license": "MIT", | ||
"dependencies": { | ||
"body-parser": "^1.12.4", | ||
"compression": "^1.4.4", | ||
"express": "^4.12.3", | ||
"body-parser": "^1.13.2", | ||
"compression": "^1.5.1", | ||
"express": "^4.13.1", | ||
"insafe": "^0.3.0", | ||
"morgan": "^1.5.3", | ||
"promise": "^7.0.1", | ||
"request": "^2.55.0", | ||
"morgan": "^1.6.1", | ||
"promise": "^7.0.3", | ||
"request": "^2.58.0", | ||
"socket.io": "^1.3.5", | ||
"superagent": "^0.17.0", | ||
"superagent": "^1.2.0", | ||
"whacko": "^0.18.1" | ||
@@ -27,4 +27,5 @@ }, | ||
"expect.js": "^0.3.1", | ||
"istanbul": "^0.3.14", | ||
"mocha": "^2.2.4" | ||
"istanbul": "^0.3.17", | ||
"mocha": "^2.2.5", | ||
"nsp": "^1.0.3" | ||
}, | ||
@@ -34,2 +35,3 @@ "scripts": { | ||
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls", | ||
"nsp": "nsp package", | ||
"start": "node app.js", | ||
@@ -36,0 +38,0 @@ "test": "mocha" |
@@ -14,4 +14,4 @@ [![npm version](https://img.shields.io/npm/v/specberus.svg)](https://npmjs.org/package/specberus) | ||
Specberus is a Node application. It will eventually be distributed through npm, but in the meantime | ||
you can simply clone this repository and run: | ||
Specberus is a Node.js application, [distributed through npm](https://www.npmjs.com/package/specberus). | ||
Alternatively, you can clone [the repository](https://github.com/w3c/specberus) and run: | ||
@@ -18,0 +18,0 @@ npm install -d |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
13
11
1202261
5
157
6064
+ Addedasync@1.5.2(transitive)
+ Addedcookiejar@2.0.6(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedextend@3.0.0(transitive)
+ Addedform-data@1.0.0-rc3(transitive)
+ Addedformidable@1.0.17(transitive)
+ Addedmime@1.3.4(transitive)
+ Addedqs@2.3.3(transitive)
+ Addedreadable-stream@1.0.27-1(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedsuperagent@1.8.5(transitive)
- Removedcookiejar@1.3.0(transitive)
- Removeddebug@0.7.4(transitive)
- Removedemitter-component@1.0.0(transitive)
- Removedextend@1.2.1(transitive)
- Removedformidable@1.0.14(transitive)
- Removedmethods@0.0.1(transitive)
- Removedmime@1.2.5(transitive)
- Removedqs@0.6.5(transitive)
- Removedsuperagent@0.17.0(transitive)
Updatedbody-parser@^1.13.2
Updatedcompression@^1.5.1
Updatedexpress@^4.13.1
Updatedmorgan@^1.6.1
Updatedpromise@^7.0.3
Updatedrequest@^2.58.0
Updatedsuperagent@^1.2.0