{"_id":"mschema-rpc","_rev":"830315","name":"mschema-rpc","description":"Minimalistic Remote Procedural Call library using mschema validation for remote method's input and output.","dist-tags":{"latest":"0.7.0"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"}],"time":{"modified":"2024-07-09T04:10:13.000Z","created":"2013-11-29T17:38:38.512Z","0.7.0":"2016-12-14T20:29:46.060Z","0.6.0":"2015-12-04T04:22:59.303Z","0.5.1":"2013-12-10T02:34:53.176Z","0.5.0":"2013-11-29T17:38:38.512Z"},"users":{},"author":{"name":"Marak Squires","email":"support@marak.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/mschema/mschema-rpc.git"},"versions":{"0.7.0":{"name":"mschema-rpc","version":"0.7.0","description":"Minimalistic Remote Procedural Call library using mschema validation for remote method's input and output.","keywords":["rpc","remote","method","schema","mschema","validator"],"main":"index.js","directories":{"example":"examples","test":"tap test/"},"scripts":{"test":"tap test"},"repository":{"type":"git","url":"git+ssh://git@github.com/mschema/mschema-rpc.git"},"dependencies":{"mschema":"0.5.x"},"devDependencies":{"tap":"~0.4.4"},"author":{"name":"Marak Squires","email":"support@marak.com"},"license":"MIT","gitHead":"e36f6f7c0ed191baf817d8a7e85faca88767e43e","bugs":{"url":"https://github.com/mschema/mschema-rpc/issues"},"homepage":"https://github.com/mschema/mschema-rpc#readme","_id":"mschema-rpc@0.7.0","_shasum":"1ad61a6dfddaee460f9eb0a6a160d10b5f74fddf","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.0","_npmUser":{"name":"marak","email":"marak.squires@gmail.com"},"dist":{"shasum":"1ad61a6dfddaee460f9eb0a6a160d10b5f74fddf","tarball":"http://registry-npm.ywwl.com/mschema-rpc/download/mschema-rpc-0.7.0.tgz","integrity":"sha512-axuRgIRfg/CGeRuPeZLZUp6sgTn39I/niecklvPgqbxUxBgyeDRrPyAnMR2NINSasaENaNESF5Ff87XtHyYhHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDFuPGDTIpMjLA/SHRV/U/XSUpYAdtU2fzVnTXcAmWiyAiEAy+qV+LYOUKe37o/WgxWONhsvNFn7+S1ghL6H8UC6kV0="}],"size":6209,"noattachment":false,"key":"/mschema-rpc/-/mschema-rpc-0.7.0.tgz"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/mschema-rpc-0.7.0.tgz_1481747385452_0.5664986637420952"},"publish_time":1481747386060,"_cnpm_publish_time":1481747386060},"0.6.0":{"name":"mschema-rpc","version":"0.6.0","description":"Minimalistic Remote Procedural Call library using mschema validation for remote method's input and output.","keywords":["rpc","remote","method","schema","mschema","validator"],"main":"index.js","directories":{"example":"examples","test":"tap test/"},"scripts":{"test":"tap test"},"repository":{"type":"git","url":"git+ssh://git@github.com/mschema/mschema-rpc.git"},"dependencies":{"mschema":"0.5.x"},"devDependencies":{"tap":"~0.4.4"},"author":{"name":"Marak Squires","email":"support@marak.com"},"license":"MIT","gitHead":"0834dc1fab80f3a87944b43f942ed340c488db2e","bugs":{"url":"https://github.com/mschema/mschema-rpc/issues"},"homepage":"https://github.com/mschema/mschema-rpc#readme","_id":"mschema-rpc@0.6.0","_shasum":"30b58e88f6da6105d19dfc5347f5a234e809aa59","_from":".","_npmVersion":"3.3.3","_nodeVersion":"0.12.7","_npmUser":{"name":"marak","email":"marak.squires@gmail.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"}],"dist":{"shasum":"30b58e88f6da6105d19dfc5347f5a234e809aa59","tarball":"http://registry-npm.ywwl.com/mschema-rpc/download/mschema-rpc-0.6.0.tgz","integrity":"sha512-C0wY6B/EYw2Ou6aWezZwvZ9+GfNhJpV+fAacbXFeYe2ArMnwovu9y1h4gm3EoWlvpBJQy+wj5HZbqyIMXOjD6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHKoaxoTbXShYC/OFxsQw/yX2lK8OtC+f7dBDSCrQVWAiBOuX+HL/xQIKlhB/EjdosAqJtHJEb6F/9EWmyuX1gHag=="}],"size":6166,"noattachment":false,"key":"/mschema-rpc/-/mschema-rpc-0.6.0.tgz"},"publish_time":1449202979303,"_cnpm_publish_time":1449202979303},"0.5.1":{"name":"mschema-rpc","version":"0.5.1","description":"Minimalistic Remote Procedural Call library using mschema validation for remote method's input and output.","keywords":["rpc","remote","method","schema","mschema","validator"],"main":"index.js","directories":{"example":"examples","test":"tap test/"},"scripts":{"test":"tap test"},"repository":{"type":"git","url":"http://github.com/mschema/mschema-rpc.git"},"dependencies":{"mschema":"0.5.x"},"devDependencies":{"tap":"~0.4.4"},"author":{"name":"Marak Squires","email":"support@marak.com"},"license":"MIT","bugs":{"url":"https://github.com/mschema/mschema-rpc/issues"},"_id":"mschema-rpc@0.5.1","dist":{"shasum":"811f70b61b63a5dd83cc884aa81ca739f23560af","tarball":"http://registry-npm.ywwl.com/mschema-rpc/download/mschema-rpc-0.5.1.tgz","integrity":"sha512-HmlYHiNWGNnGLiLcU02+dkbJRg2PQ0OBcpD0tmOsXzUi6xEj74qvt9MvEw6SP7J1qgEOaHsnAJtH7dipj+NdfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWCrwbQeFylnpmP11ZShXOlHpaqR/L2w+bNkqjzVcJ4AIgTJAJE1JReLBl0+i7MDe0xSU88OgNRNx1p9QzL6AFGPM="}],"size":6449,"noattachment":false,"key":"/mschema-rpc/-/mschema-rpc-0.5.1.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"marak","email":"marak.squires@gmail.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"}],"publish_time":1386642893176,"_cnpm_publish_time":1386642893176},"0.5.0":{"name":"mschema-rpc","version":"0.5.0","description":"Minimalistic Remote Procedural Call library using mschema validation for remote method's input and output.","keywords":["rpc","remote","method","schema","mschema","validator"],"main":"index.js","directories":{"example":"examples","test":"tap test/"},"scripts":{"test":"tap test"},"repository":{"type":"git","url":"http://github.com/mschema/mschema-rpc.git"},"dependencies":{"mschema":"0.5.x"},"devDependencies":{"tap":"~0.4.4"},"author":{"name":"Marak Squires","email":"support@marak.com"},"license":"MIT","bugs":{"url":"https://github.com/mschema/mschema-rpc/issues"},"_id":"mschema-rpc@0.5.0","dist":{"shasum":"7797412aee67de193e0080b439aa46b707244b59","tarball":"http://registry-npm.ywwl.com/mschema-rpc/download/mschema-rpc-0.5.0.tgz","integrity":"sha512-q2pneoGDuc9yjmOyln97je3CO0cAeHvs3D/ypEIkcb+op/OyLKuRqyU6RDqfob6Mo4hQ2G1mRNyck4xSvlJ4Zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUse/sAWTF9SOVcRJ9YkSTsqNs2HfQwceGhMdLL6IBaAiBU77GvjGRFN4qcpC7+8mg1OwBhYyOhpBzB0KBh7jwyNA=="}],"size":5605,"noattachment":false,"key":"/mschema-rpc/-/mschema-rpc-0.5.0.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"marak","email":"marak.squires@gmail.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"}],"publish_time":1385746718512,"_cnpm_publish_time":1385746718512}},"readme":"# mschema-rpc\n\n<img src=\"https://travis-ci.org/mschema/mschema-rpc.svg?branch=master\"/>\n\nMinimalistic [Remote Procedural Call](http://en.wikipedia.org/wiki/Remote_procedure_call) library using [mschema](http://mschema.org) validation for remote method's input and output.\n\n## Features\n\n - Provides validation to functions incoming arguments and outgoing results\n - Validation based on [mschema](http://mschema.org)\n\n# API\n\n### rpc.invoke(inputData, method, methodSchema, callback)\n\n### inputData\nthe input data to be sent to `method`\n\n### method\nthe method to be executed remotely\n\n### methodSchema\nthe schema to be used to validate the input and output of `method`\n\n**schema format**\n```json\n{\n  \"input\": {\n    \"key\": \"val\"\n  },\n  \"output\": {\n    \"key\": \"val\"\n  }\n}\n```\n*see: http://github.com/mschema/mschema for full schema format documentation*\n\n### callback\n\nthe callback to be executed after `method` has been invoked\n\n## Example\n\n```js \n\nvar rpc = require('mschema-rpc');\n\nvar fireSchema = {\n  \"description\": \"fires missle\",\n  \"input\": {\n    \"name\": \"string\",\n      \"power\": {\n        \"type\": \"string\",\n        \"enum\": [\"high\", \"medium\", \"low\"]\n      },\n      \"warheads\": {\n        \"type\": \"number\",\n        \"min\": 1,\n        \"max\": 8\n      }\n    },\n  \"output\": {\n    \"result\": \"string\"\n  }\n};\n\nfunction fireFn (input, callback) {\n  callback(null, 'weapon fired');\n}\n\nvar data = {\n  \"name\": \"small missle\",\n  \"power\": \"low\",\n  \"warheads\": 8\n};\n\nrpc.invoke(data, fireFn, fireSchema, function(errors, result) {\n  console.log('errors', errors);\n  console.log('result', result);\n});\n```","_attachments":{},"homepage":"https://github.com/mschema/mschema-rpc#readme","bugs":{"url":"https://github.com/mschema/mschema-rpc/issues"},"license":"MIT"}