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.4.0 to 1.5.0

src/schemas/cache.json

2

package.json
{
"version": "1.4.0",
"version": "1.5.0",
"name": "har-validator",

@@ -4,0 +4,0 @@ "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",

'use strict'
var schemas = require('./schemas')
var validator = require('is-my-json-valid')
var schemas = require('./schemas.json')

@@ -13,2 +13,30 @@ function ValidationError (errors) {

// is-my-json-valid does not provide meaningful error messages for external schemas
// this is a workaround
schemas.cache.properties.beforeRequest = schemas.cacheEntry
schemas.cache.properties.afterRequest = schemas.cacheEntry
schemas.page.properties.pageTimings = schemas.pageTimings
schemas.request.properties.cookies.items = schemas.cookie
schemas.request.properties.headers.items = schemas.record
schemas.request.properties.queryString.items = schemas.record
schemas.request.properties.postData = schemas.postData
schemas.response.properties.cookies.items = schemas.cookie
schemas.response.properties.headers.items = schemas.record
schemas.response.properties.content = schemas.content
schemas.entry.properties.request = schemas.request
schemas.entry.properties.response = schemas.response
schemas.entry.properties.cache = schemas.cache
schemas.entry.properties.timings = schemas.timings
schemas.log.properties.creator = schemas.creator
schemas.log.properties.browser = schemas.creator
schemas.log.properties.pages.items = schemas.page
schemas.log.properties.entries.items = schemas.entry
schemas.har.properties.log = schemas.log
var runner = function (schema, data, cb) {

@@ -39,3 +67,3 @@ var validate = validator(schema, {

module.exports = function (data, cb) {
return runner(schemas.log, data, cb)
return runner(schemas.har, data, cb)
}

@@ -42,0 +70,0 @@

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