mirror of
https://github.com/S2-/gitlit
synced 2025-08-03 12:50:04 +02:00
add node modules to repo
This commit is contained in:
13
node_modules/har-validator/LICENSE
generated
vendored
Normal file
13
node_modules/har-validator/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright (c) 2015, Ahmad Nassri <ahmad@ahmadnassri.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
54
node_modules/har-validator/README.md
generated
vendored
Normal file
54
node_modules/har-validator/README.md
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url]
|
||||
|
||||
> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
|
||||
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Downloads][npm-downloads]][npm-url]
|
||||
[![Code Climate][codeclimate-quality]][codeclimate-url]
|
||||
[![Coverage Status][codeclimate-coverage]][codeclimate-url]
|
||||
[![Dependency Status][dependencyci-image]][dependencyci-url]
|
||||
[![Dependencies][david-image]][david-url]
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install --only=production --save har-validator
|
||||
```
|
||||
|
||||
## CLI Usage
|
||||
|
||||
Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.
|
||||
|
||||
## API
|
||||
|
||||
**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided*
|
||||
|
||||
- [async API](docs/async.md)
|
||||
- [callback API](docs/async.md)
|
||||
- [Promise API](docs/promise.md) *(default)*
|
||||
|
||||
----
|
||||
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) ·
|
||||
> License: [ISC][license-url] ·
|
||||
> Github: [@ahmadnassri](https://github.com/ahmadnassri) ·
|
||||
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
|
||||
|
||||
[license-url]: http://choosealicense.com/licenses/isc/
|
||||
[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square
|
||||
|
||||
[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
|
||||
[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
|
||||
|
||||
[npm-url]: https://www.npmjs.com/package/har-validator
|
||||
[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
|
||||
[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
|
||||
|
||||
[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
|
||||
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
|
||||
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
|
||||
|
||||
[david-url]: https://david-dm.org/ahmadnassri/har-validator
|
||||
[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
|
||||
|
||||
[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-validator
|
||||
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-validator/badge?style=flat-square
|
98
node_modules/har-validator/lib/async.js
generated
vendored
Normal file
98
node_modules/har-validator/lib/async.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
var Ajv = require('ajv')
|
||||
var HARError = require('./error')
|
||||
var schemas = require('har-schema')
|
||||
|
||||
var ajv
|
||||
|
||||
function validate (name, data, next) {
|
||||
data = data || {}
|
||||
|
||||
// validator config
|
||||
ajv = ajv || new Ajv({
|
||||
allErrors: true,
|
||||
schemas: schemas
|
||||
})
|
||||
|
||||
var validate = ajv.getSchema(name + '.json')
|
||||
|
||||
var valid = validate(data)
|
||||
|
||||
// callback?
|
||||
if (typeof next === 'function') {
|
||||
return next(!valid ? new HARError(validate.errors) : null, valid)
|
||||
}
|
||||
|
||||
return valid
|
||||
}
|
||||
|
||||
exports.afterRequest = function (data, next) {
|
||||
return validate('afterRequest', data, next)
|
||||
}
|
||||
|
||||
exports.beforeRequest = function (data, next) {
|
||||
return validate('beforeRequest', data, next)
|
||||
}
|
||||
|
||||
exports.browser = function (data, next) {
|
||||
return validate('browser', data, next)
|
||||
}
|
||||
|
||||
exports.cache = function (data, next) {
|
||||
return validate('cache', data, next)
|
||||
}
|
||||
|
||||
exports.content = function (data, next) {
|
||||
return validate('content', data, next)
|
||||
}
|
||||
|
||||
exports.cookie = function (data, next) {
|
||||
return validate('cookie', data, next)
|
||||
}
|
||||
|
||||
exports.creator = function (data, next) {
|
||||
return validate('creator', data, next)
|
||||
}
|
||||
|
||||
exports.entry = function (data, next) {
|
||||
return validate('entry', data, next)
|
||||
}
|
||||
|
||||
exports.har = function (data, next) {
|
||||
return validate('har', data, next)
|
||||
}
|
||||
|
||||
exports.header = function (data, next) {
|
||||
return validate('header', data, next)
|
||||
}
|
||||
|
||||
exports.log = function (data, next) {
|
||||
return validate('log', data, next)
|
||||
}
|
||||
|
||||
exports.page = function (data, next) {
|
||||
return validate('page', data, next)
|
||||
}
|
||||
|
||||
exports.pageTimings = function (data, next) {
|
||||
return validate('pageTimings', data, next)
|
||||
}
|
||||
|
||||
exports.postData = function (data, next) {
|
||||
return validate('postData', data, next)
|
||||
}
|
||||
|
||||
exports.query = function (data, next) {
|
||||
return validate('query', data, next)
|
||||
}
|
||||
|
||||
exports.request = function (data, next) {
|
||||
return validate('request', data, next)
|
||||
}
|
||||
|
||||
exports.response = function (data, next) {
|
||||
return validate('response', data, next)
|
||||
}
|
||||
|
||||
exports.timings = function (data, next) {
|
||||
return validate('timings', data, next)
|
||||
}
|
17
node_modules/har-validator/lib/error.js
generated
vendored
Normal file
17
node_modules/har-validator/lib/error.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
function HARError (errors) {
|
||||
var message = 'validation failed'
|
||||
|
||||
this.name = 'HARError'
|
||||
this.message = message
|
||||
this.errors = errors
|
||||
|
||||
if (typeof Error.captureStackTrace === 'function') {
|
||||
Error.captureStackTrace(this, this.constructor)
|
||||
} else {
|
||||
this.stack = (new Error(message)).stack
|
||||
}
|
||||
}
|
||||
|
||||
HARError.prototype = Error.prototype
|
||||
|
||||
module.exports = HARError
|
95
node_modules/har-validator/lib/promise.js
generated
vendored
Normal file
95
node_modules/har-validator/lib/promise.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
var Ajv = require('ajv')
|
||||
var HARError = require('./error')
|
||||
var schemas = require('har-schema')
|
||||
|
||||
var ajv
|
||||
|
||||
function validate (name, data) {
|
||||
data = data || {}
|
||||
|
||||
// validator config
|
||||
ajv = ajv || new Ajv({
|
||||
allErrors: true,
|
||||
schemas: schemas
|
||||
})
|
||||
|
||||
var validate = ajv.getSchema(name + '.json')
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
var valid = validate(data)
|
||||
|
||||
!valid ? reject(new HARError(validate.errors)) : resolve(data)
|
||||
})
|
||||
}
|
||||
|
||||
exports.afterRequest = function (data) {
|
||||
return validate('afterRequest', data)
|
||||
}
|
||||
|
||||
exports.beforeRequest = function (data) {
|
||||
return validate('beforeRequest', data)
|
||||
}
|
||||
|
||||
exports.browser = function (data) {
|
||||
return validate('browser', data)
|
||||
}
|
||||
|
||||
exports.cache = function (data) {
|
||||
return validate('cache', data)
|
||||
}
|
||||
|
||||
exports.content = function (data) {
|
||||
return validate('content', data)
|
||||
}
|
||||
|
||||
exports.cookie = function (data) {
|
||||
return validate('cookie', data)
|
||||
}
|
||||
|
||||
exports.creator = function (data) {
|
||||
return validate('creator', data)
|
||||
}
|
||||
|
||||
exports.entry = function (data) {
|
||||
return validate('entry', data)
|
||||
}
|
||||
|
||||
exports.har = function (data) {
|
||||
return validate('har', data)
|
||||
}
|
||||
|
||||
exports.header = function (data) {
|
||||
return validate('header', data)
|
||||
}
|
||||
|
||||
exports.log = function (data) {
|
||||
return validate('log', data)
|
||||
}
|
||||
|
||||
exports.page = function (data) {
|
||||
return validate('page', data)
|
||||
}
|
||||
|
||||
exports.pageTimings = function (data) {
|
||||
return validate('pageTimings', data)
|
||||
}
|
||||
|
||||
exports.postData = function (data) {
|
||||
return validate('postData', data)
|
||||
}
|
||||
|
||||
exports.query = function (data) {
|
||||
return validate('query', data)
|
||||
}
|
||||
|
||||
exports.request = function (data) {
|
||||
return validate('request', data)
|
||||
}
|
||||
|
||||
exports.response = function (data) {
|
||||
return validate('response', data)
|
||||
}
|
||||
|
||||
exports.timings = function (data) {
|
||||
return validate('timings', data)
|
||||
}
|
79
node_modules/har-validator/package.json
generated
vendored
Normal file
79
node_modules/har-validator/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"har-validator@5.0.3",
|
||||
"/home/s2/Documents/Code/gitlit"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "har-validator@5.0.3",
|
||||
"_id": "har-validator@5.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
|
||||
"_location": "/har-validator",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "har-validator@5.0.3",
|
||||
"name": "har-validator",
|
||||
"escapedName": "har-validator",
|
||||
"rawSpec": "5.0.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.0.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/request"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
|
||||
"_spec": "5.0.3",
|
||||
"_where": "/home/s2/Documents/Code/gitlit",
|
||||
"author": {
|
||||
"name": "Ahmad Nassri",
|
||||
"email": "ahmad@ahmadnassri.com",
|
||||
"url": "https://www.ahmadnassri.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ahmadnassri/har-validator/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": "^5.1.0",
|
||||
"har-schema": "^2.0.0"
|
||||
},
|
||||
"description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
|
||||
"devDependencies": {
|
||||
"echint": "^4.0.1",
|
||||
"standard": "^10.0.2",
|
||||
"tap": "^10.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/ahmadnassri/har-validator",
|
||||
"keywords": [
|
||||
"har",
|
||||
"cli",
|
||||
"ajv",
|
||||
"http",
|
||||
"archive",
|
||||
"validate",
|
||||
"validator"
|
||||
],
|
||||
"license": "ISC",
|
||||
"main": "lib/promise.js",
|
||||
"name": "har-validator",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ahmadnassri/har-validator.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "tap test --reporter silent --coverage",
|
||||
"lint": "standard && echint",
|
||||
"pretest": "npm run lint",
|
||||
"test": "tap test"
|
||||
},
|
||||
"version": "5.0.3"
|
||||
}
|
Reference in New Issue
Block a user