{"name":"protodef-validator","version":"1.3.0","description":"Validate ProtoDef protocol definition in node","main":"index.js","scripts":{"test":"node example.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/ProtoDef-io/node-protodef-validator.git"},"bin":{"protodef-validator":"cli.js"},"keywords":["protodef","type","serialization","schema","json"],"author":{"name":"Romain Beaumont","email":"romain.rom1@gmail.com","url":"<romain.rom1@gmail.com>"},"license":"MIT","bugs":{"url":"https://github.com/ProtoDef-io/node-protodef-validator/issues"},"homepage":"https://github.com/ProtoDef-io/node-protodef-validator#readme","dependencies":{"ajv":"^6.5.4"},"gitHead":"f09fe8b1e00c365079fcee03f0e72ce25f9b2a32","_id":"protodef-validator@1.3.0","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-qS3b1TccA7mSjxeKcTUfAcAZfQQAvzup8Wy3nb55Dq/gMdRuX/GepsQPAylIxM64zG0JffVXKJEng83YG6rSWg==","shasum":"e25d68446c612b9cf72633b4ffb88388a32d0b88","tarball":"http://registry-npm.ywwl.com/protodef-validator/download/protodef-validator-1.3.0.tgz","fileCount":31,"unpackedSize":62394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwUQ6CRA9TVsSAnZWagAAS/UQAI2ARHTN/CknOrZpV6eG\nGt8SPq/hFqNZYyLMQ7fe4m72LpHlD2Bdk0leOBsjRznqRYEGZff0Hm/k8xsO\nl8flK2LZyqsVnWE4TdMSD7uSH8weTcKNlDCVcDqJJ++KmHsHnhrqc4xWf8Hn\nVGlj4ZEGseKD9BB5XL02L6FsR+nr8MpLgX1HMzosTudlWfk7bbshfSueMfU6\nwRCkmk+1NGDUtWwB2kZzAoJMvD/MuqLA6SmeGW/yYBZNa0iOo4FRZwhrq9jg\n7zEgxVTrkLqYmmI9Fy4Wet49xlQTpRatc/QPhTZgAlZCbztVcy81j+GtCRsR\nstJHrK+J2+ePhoIRbtO1BI24TXeU9n/IxVXfS0P+8t2rhoSxFKYOe2mWjtlI\nB8z//j7RWoOu8duSqfvLhFg3MqE7QjFuQVlZ3ZvCYffX6WNRy4HM16FQa1Sh\npd4se/3FXa0F+rL4SuY9UhqupFxLYZCTPpj+hlnVn/xyirhm8opiLkju4vlj\nGYwCmE1P3GH+BKyr1ZuUgD0VNNCOc3GdzCHC4NXERE7fMRlL+1cXRQ53XoLq\n5bQDwEfbAY3mTO359KmUILOSnqsBwNU2VksxzKtGWq1B8ha2UaekPBm2xVWu\n67p2O4nasRHeXiX/zC0d9Gm0wEXGpg1hLTjmdWpx041GG+/w3+I6w62tnHBs\nGkaM\r\n=sMJA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4ESpZW5gdZwW8IzJ7TSs4QZUO3u0vw289s9JX3QNO0AiEAgyDkmud1RluaxIcX26ZegMFf4zrS8bGQuLnHTmZ7mWU="}],"size":12233,"noattachment":false,"key":"/protodef-validator/-/protodef-validator-1.3.0.tgz"},"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"directories":{},"maintainers":[{"name":"rom1504","email":"romain.rom1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protodef-validator_1.3.0_1623278649946_0.2348985450771668"},"_hasShrinkwrap":false,"readme":"# ProtoDef-validator\n\n[![NPM version](https://img.shields.io/npm/v/protodef-validator.svg)](http://npmjs.com/package/protodef-validator)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](https://discord.gg/GsEFRM8)\n[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen.svg)](https://gitter.im/PrismarineJS/general)\n[![Irc](https://img.shields.io/badge/chat-on%20irc-brightgreen.svg)](https://irc.gitter.im/)\n[![Build Status](https://github.com/ProtoDef-io/node-protodef-validator/workflows/CI/badge.svg)](https://github.com/ProtoDef-io/node-protodef-validator/actions?query=workflow%3A%22CI%22)\n[![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/ProtoDef-io/node-protodef-validator)\n\n\nValidate [ProtoDef](https://github.com/ProtoDef-io/ProtoDef) protocol definition in node\n\n## Installing\n\n```\nnpm install protodef-validator\n```\n\n## Usage\n\nSee [example](example.js)\n\n## Command Line Interface\n\nYou can install this package globally with `npm install -g protodef-validator` and then run `protodef-validator someProtocol.json` to validate it.\n\n## API\n\n### Validator\n\nClass to make validator instances\n\n#### Validator.addType(name [,schema])\n\nadd the type `name` with schema `schema`\n\nIf `schema` isn't specified, use a default schema.\n\n#### Validator.addTypes(schemas)\n\nAdd `schemas` which is an object with keys the name of the schemas and values the schema definitions.\n\n#### Validator.validateType(type)\n\nvalidates a type definition `type`\n\nthrows an exception if the type isn't correct\n\n#### Validator.validateProtocol(protocol)\n\nvalidates a protocol definition `protocol`\n\nthrows an exception if the protocol isn't correct\n\n## History\n\n### 1.3.0\n\n* update protodef\n\n### 1.2.3\n\n* add .json suffix when requiring (for webpack)\n\n### 1.2.2\n\n* fix release\n\n### 1.2.1\n\n* update ajv and protodef\n\n### 1.2.0\n\n* allow : in switch keys\n\n### 1.1.7\n\n* properly define compareTo/compareToValue\n\n### 1.1.6\n\n* fix compareToValue switch property allowance\n\n### 1.1.5\n\n* properly normalize schema names\n\n### 1.1.4\n\n* normalize refs\n\n### 1.1.3\n\n* print errors again\n\n### 1.1.2\n\n* fix release\n\n### 1.1.1\n\n* recreate ajv instance to recompile if types were validated hence compiled\n\n### 1.1.0\n\n* check the datatypes have been defined\n* make it possible to add types with a default schema\n* better errors\n\n### 1.0.2\n\n* ignore already added types\n\n### 1.0.1\n\n* fix index.js\n\n### 1.0.0\n\n* can validate types and protocols\n","publish_time":1623278650120,"_cnpm_publish_time":1623278650120,"dist-tags":{"latest":"1.5.0"}}