Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

har-validator

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

har-validator - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

package.json
{
"version": "1.0.0",
"version": "1.0.1",
"name": "har-validator",

@@ -30,9 +30,9 @@ "description": "HTTP Archive (HAR) validator using JSON Schema",

"mocha": "^2.1.0",
"should": "^4.6.1"
"should": "^5.0.1"
},
"dependencies": {
"chalk": "^0.5.1",
"chalk": "^1.0.0",
"commander": "^2.6.0",
"is-my-json-valid": "^2.4.0"
"is-my-json-valid": "^2.9.4"
}
}

@@ -7,4 +7,10 @@ 'use strict';

module.exports = function (data, cb) {
if (!data) {
return false;
}
// execute is-my-json-valid
var valid = validate(data);
// callback?
if (cb) {

@@ -11,0 +17,0 @@ return cb(validate.errors, valid);

@@ -41,10 +41,7 @@ {

"properties": {
"startedDateTime": {
"type": "string",
"format": "date-time"
},
"id": { "type": "string", "unique": true },
"title": { "type": "string" },
"pageTimings": { "$ref": "#/definitions/pageTimings" },
"comment": { "type": "string" }
"startedDateTime": { "type": "string", "format": "date-time" },
"id": { "type": "string", "unique": true },
"title": { "type": "string" },
"pageTimings": { "$ref": "#/definitions/pageTimings" },
"comment": { "type": "string" }
}

@@ -68,6 +65,3 @@ },

"pageref": { "type": "string" },
"startedDateTime": {
"type": "string",
"format": "date-time"
},
"startedDateTime": { "type": "string", "format": "date-time" },
"time": { "type": "number", "min": 0 },

@@ -78,3 +72,3 @@ "request": { "$ref": "#/definitions/request" },

"timings": { "$ref": "#/definitions/timings" },
"serverIPAddress": { "type": "string" },
"serverIPAddress": { "type": "string", "format": "ipv4" },
"connection": { "type": "string" },

@@ -90,3 +84,3 @@ "comment": { "type": "string" }

"method": { "type": "string" },
"url": { "type": "string" },
"url": { "type": "string", "format": "uri" },
"httpVersion": { "type": "string" },

@@ -200,5 +194,5 @@ "cookies": {

"properties": {
"beforeRequest": { "$ref": "#/definitions/cacheEntry" },
"afterRequest": { "$ref": "#/definitions/cacheEntry" },
"comment": { "type": "string" }
"beforeRequest": { "$ref": "#/definitions/cacheEntry" },
"afterRequest": { "$ref": "#/definitions/cacheEntry" },
"comment": { "type": "string" }
}

@@ -205,0 +199,0 @@ },

@@ -11,4 +11,6 @@ 'use strict';

validate({}, function (err, valid) {
valid.should.be.false;
err[0].should.have.property('message');
err[0].message.should.equal('missing required properties');
err[0].message.should.equal('is required');
});

@@ -21,4 +23,6 @@

validate([], function (err, valid) {
valid.should.be.false;
err[0].should.have.property('message');
err[0].message.should.equal('missing required properties');
err[0].message.should.equal('is the wrong type');
});

@@ -29,2 +33,10 @@

it('should fail with undefined', function (done) {
validate(undefined, function (err, valid) {
valid.should.be.false;
});
done();
});
it('should fail on bad "log.version"', function (done) {

@@ -31,0 +43,0 @@ validate(fixtures.invalid.version, function (err, valid) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc