{"_id":"@captainsafia/jmp-prebuilt","_rev":"7-0d98c1a8e1aeb0c6f9111daaa891f5fe","name":"@captainsafia/jmp-prebuilt","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"@captainsafia/jmp-prebuilt","version":"0.1.0","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","keywords":["jupyter","messaging","protocol","ijavascript"],"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"dependencies":{"node-uuid":"^1.4.2","zmq-prebuilt":"^1.0.0"},"devDependencies":{"jsdoc":"latest","jshint":"latest"},"scripts":{"doc":"jsdoc -R README.md -d doc index.js","doc:publish":"node scripts/doc-publish.js doc https://github.com/captainsafia/jmp","lint":"jshint index.js test/","test":"node test/index.js"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"gitHead":"f65066046271eb9bd0cb00a6fd1835312fd22dc3","homepage":"https://github.com/n-riesco/jmp#readme","_id":"@captainsafia/jmp-prebuilt@0.1.0","_shasum":"83a84c67a097f6012887e8d05ace230d0fc820c8","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"captainsafia","email":"safia@safia.rocks"},"dist":{"shasum":"83a84c67a097f6012887e8d05ace230d0fc820c8","tarball":"https://registry.npmjs.org/@captainsafia/jmp-prebuilt/-/jmp-prebuilt-0.1.0.tgz","integrity":"sha512-sQXkxTsUOUJF9d55BrgtqX/pR6lLl7HYxmf0ppvslUduaowhSzg9R/TZssPRWGOgh+Y7SWwaJlB97Thd4U9v1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeQhZYdMBvA5aP64q2tCLORlRFiyntkOEo6vt0B3T94AIhAJqWMIycHpT5WcS+nH4O8UjGQS4dcNxkqX8p68VKy9uZ"}]},"maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jmp-prebuilt-0.1.0.tgz_1470714926045_0.9729467863216996"}},"0.1.1":{"name":"@captainsafia/jmp-prebuilt","version":"0.1.1","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","keywords":["jupyter","messaging","protocol","ijavascript"],"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"dependencies":{"node-uuid":"^1.4.2","zmq-prebuilt":"^1.0.1"},"devDependencies":{"jsdoc":"latest","jshint":"latest"},"scripts":{"doc":"jsdoc -R README.md -d doc index.js","doc:publish":"node scripts/doc-publish.js doc https://github.com/captainsafia/jmp","lint":"jshint index.js test/","test":"node test/index.js"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"gitHead":"413f11153ebecb058d08374f362a0531627eaa6e","homepage":"https://github.com/n-riesco/jmp#readme","_id":"@captainsafia/jmp-prebuilt@0.1.1","_shasum":"ed2a401a869ffb9284220122c8ec017902b8a9be","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"captainsafia","email":"safia@safia.rocks"},"dist":{"shasum":"ed2a401a869ffb9284220122c8ec017902b8a9be","tarball":"https://registry.npmjs.org/@captainsafia/jmp-prebuilt/-/jmp-prebuilt-0.1.1.tgz","integrity":"sha512-EwM5rxEg8MrkV4+rSNDikQFSQUASnz9fdFEH8CMDTxtGYEhba07gWESaijMGHp/cktIF2nwXuiVLjZeCYst5Fw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVt5RLHXytUuCPC3z5nDvqa8ryP3xbgBS6Nm1+AWLUuAiAhpKLnqLIR4wV3GroIKWoV1fZ9DyDGZp6le+v0ElLTWg=="}]},"maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jmp-prebuilt-0.1.1.tgz_1470781459005_0.4010242926888168"}},"0.2.1":{"name":"@captainsafia/jmp-prebuilt","version":"0.2.1","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","keywords":["jupyter","messaging","protocol","ijavascript"],"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"dependencies":{"node-uuid":"^1.4.2","zmq-prebuilt":"^1.2.0"},"devDependencies":{"jsdoc":"latest","jshint":"latest"},"scripts":{"doc":"jsdoc -R README.md -d doc index.js","doc:publish":"node scripts/doc-publish.js doc https://github.com/captainsafia/jmp","lint":"jshint index.js test/","test":"node test/index.js"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"gitHead":"bedeb5dbba4f845bb4cbfa967aa025b4aba8e51f","homepage":"https://github.com/n-riesco/jmp#readme","_id":"@captainsafia/jmp-prebuilt@0.2.1","_shasum":"494dee23bcf05b719bfc19ee32bb37815f5d7a45","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.2.2","_npmUser":{"name":"captainsafia","email":"safia@safia.rocks"},"dist":{"shasum":"494dee23bcf05b719bfc19ee32bb37815f5d7a45","tarball":"https://registry.npmjs.org/@captainsafia/jmp-prebuilt/-/jmp-prebuilt-0.2.1.tgz","integrity":"sha512-6b7yI79jKwTDi+CQ5/1iFXdQfrK7p6o++Ymx9B+XRQDK6gPEDeFCMLEcHr8uw6v0DkgDaWf0AaX57tJp1Jxgug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgifw6sTbGxPRC1UKKp2vakN+GVp1tzgCaMTT73zJEgQIhAIt5SZtswwakVCJmm5Vaeaj5zzn8h/59w7StoAdY2Z9K"}]},"maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jmp-prebuilt-0.2.1.tgz_1473104974956_0.4274357866961509"}},"1.0.0":{"name":"@captainsafia/jmp-prebuilt","version":"1.0.0","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","keywords":["jupyter","messaging","protocol","ijavascript"],"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"dependencies":{"node-uuid":"^1.4.2","zmq-prebuilt":"^1.3.1"},"devDependencies":{"jsdoc":"latest","jshint":"latest"},"scripts":{"doc":"jsdoc -R README.md -d doc index.js","doc:publish":"node scripts/doc-publish.js doc https://github.com/captainsafia/jmp","lint":"jshint index.js test/","test":"node test/index.js"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"gitHead":"bdfe67cb6d54da795c9c6416ef979b3e241f0012","homepage":"https://github.com/n-riesco/jmp#readme","_id":"@captainsafia/jmp-prebuilt@1.0.0","_shasum":"fe9c4c103e1aa690a03de07422321ba70ba788bf","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.2.2","_npmUser":{"name":"captainsafia","email":"safia@safia.rocks"},"dist":{"shasum":"fe9c4c103e1aa690a03de07422321ba70ba788bf","tarball":"https://registry.npmjs.org/@captainsafia/jmp-prebuilt/-/jmp-prebuilt-1.0.0.tgz","integrity":"sha512-GUBWKc2TZGZ6wCyVR9nwmYgs9rUJkpPiwZ9WDaUfy3BEsUqWy9J3xLRNN15ved831E5Zbu/j74b+7W0kjwuBLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3iXD6sELbi3fJ0jPXz34mQqb0XrUdXxjkF1XrR61fsQIgEii9aMr+e6VqGU6eyqlQdp2XxQi/jhFpP1j7MaoUyuM="}]},"maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jmp-prebuilt-1.0.0.tgz_1473549386620_0.2947695159818977"}},"1.1.0":{"name":"@captainsafia/jmp-prebuilt","version":"1.1.0","description":"Node.js module for creating, parsing and replying to messages of the Jupyter Messaging Protocol (JMP)","keywords":["jupyter","messaging","protocol","ijavascript"],"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"dependencies":{"node-uuid":"^1.4.2","zmq-prebuilt":"^1.4.0"},"devDependencies":{"jsdoc":"latest","jshint":"latest"},"scripts":{"doc":"jsdoc -R README.md -d doc index.js","doc:publish":"node scripts/doc-publish.js doc https://github.com/captainsafia/jmp","lint":"jshint index.js test/","test":"node test/index.js"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"gitHead":"d36d4f6bcaf3415880929ea8bd0d8bf2f8d4bff1","homepage":"https://github.com/n-riesco/jmp#readme","_id":"@captainsafia/jmp-prebuilt@1.1.0","_shasum":"bc193034a7cf65401a040b1aa21e7ec075072f71","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.2.2","_npmUser":{"name":"captainsafia","email":"safia@safia.rocks"},"dist":{"shasum":"bc193034a7cf65401a040b1aa21e7ec075072f71","tarball":"https://registry.npmjs.org/@captainsafia/jmp-prebuilt/-/jmp-prebuilt-1.1.0.tgz","integrity":"sha512-/psY6R1BpWCh0KLRypRJVvmRgY9q/HY5fmFIuc3n20DiP5EcHkTSfCemwRylmFkoZ2o+5NRpHVi7X2yU5u2AcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDndvM40/SMJz5Qc0tchFW3zK/w4+ShpJ1T0GJ9ujrg6wIge/Ll5N8fiHBz6ss8rTHFeZAujrsOFHnnf9NBUrxJ4OY="}]},"maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/jmp-prebuilt-1.1.0.tgz_1473990771520_0.7842751203570515"}}},"readme":"# JMP\n\n`jmp` is an [npm module](https://www.npmjs.com/) for creating, parsing and\nreplying to messages of the [Jupyter Messaging\nProtocol](http://ipython.org/ipython-doc/stable/development/messaging.html) over\n[ZMQ sockets](http://zeromq.org/bindings:node-js).\n\n\n## Anouncements\n\n- Version v0.4.0 is is backwards-incompatible. The attribute\n  `Message#signatureOK` has been removed.\n  See [issue #10](https://github.com/n-riesco/jmp/issues/10).\n\n- Version v0.2.0 is backwards-incompatible. The attribute `Message#parentHeader`\n  has been renamed to\n  [`Message#parent_header`](http://n-riesco.github.io/jmp/module-jmp-Message.html#parent_header).\n  See [issue #7](https://github.com/n-riesco/jmp/issues/7).\n\n- Version v0.1.0 is backwards-incompatible. `npm` packages depending on the\n  initial release of JMP need to update their dependency field:\n\n```\n\"jmp\": \"<0.1.0\",\n```\n\n## Install\n\nThe latest stable release is published on\n[`npm`](https://www.npmjs.com/package/jmp) and can be installed by running:\n\n```sh\nnpm install jmp\n```\n\nThe master branch in the [github repository](https://github.com/n-riesco/jmp)\nprovides the latest development version and can be installed by:\n\n```sh\ngit clone https://github.com/n-riesco/jmp.git\nnpm install ./jmp\n```\n\nBranch `v0.0` provides the latest version of JMP, backwards-compatible with the\nfirst release. It can be installed from `npm`:\n\n```sh\nnpm install \"jmp@<0.1.0\"\n```\n\nor github:\n\n```sh\ngit clone -b v0.0 https://github.com/n-riesco/jmp.git\nnpm install ./jmp\n```\n\n## Usage\n\n### Import modules\n\nJMP depends on [ZMQ](http://zeromq.org/bindings:node-js) and for convenience JMP\nexports the module `zmq`:\n\n```js\nvar crypto = require(\"crypto\");\nvar uuid = require(\"node-uuid\");\n\nvar jmp = require(\"jmp\");\nvar zmq = jmp.zmq;\n```\n\n### Create JMP sockets\n\n```js\nvar scheme = \"sha256\";\nvar key = crypto.randomBytes(256).toString('base64');\n\nvar serverSocket = new jmp.Socket(\"router\", scheme, key);\nvar clientSocket = new jmp.Socket(\"dealer\", scheme, key);\n\nvar address = \"tcp://127.0.0.1:8888\";\n\nserverSocket.bindSync(address);\nclientSocket.connect(address);\n```\n\n### Create a JMP message from scratch\n\n```js\nvar request = new jmp.Message();\n\nrequest.idents = [];\nrequest.header = {\n    \"msg_id\": uuid.v4(),\n    \"username\": \"user\",\n    \"session\": uuid.v4(),\n    \"msg_type\": \"kernel_info_request\",\n    \"version\": \"5.0\",\n};\nrequest.parent_header = {};\nrequest.metadata = {};\nrequest.content = {};\n```\n\n### Send a message over a JMP socket\n\n```js\nclientSocket.send(request);\n```\n\n### Listen on a JMP socket and respond to a message\n\n```js\nserverSocket.on(\"message\", onRequest);\n\nfunction onRequest(msg) {\n    var responseMessageType = \"kernel_info_reply\";\n\n    var responseContent = {\n        \"protocol_version\": \"0.0.0\",\n        \"implementation\": \"kernel\",\n        \"implementation_version\": \"0.0.0\",\n        \"language_info\": {\n            \"name\": \"test\",\n            \"version\": \"0.0.0\",\n            \"mimetype\": \"text/plain\",\n            \"file_extension\": \"test\",\n        },\n        \"banner\": \"Test\",\n        \"help_links\": [{\n            \"text\": \"JMP\",\n            \"url\": \"https://github.com/n-riesco/nel\",\n        }],\n    };\n\n    var responseMetadata = {};\n\n    msg.respond(\n        serverSocket, responseMessageType, responseContent, reponseMetadata\n    );\n}\n```\n\n### Remove listeners and close sockets\n\n```js\nserverSocket.removeListener(\"message\", getRequest);\nserverSocket.close()\nclientSocket.close()\n```\n\n# Documentation\n\nDocumentation generated using [JSDoc](http://usejsdoc.org/) can be found\n[here](http://n-riesco.github.io/jmp/).\n\n# Contributions\n\nFirst of all, thank you for taking the time to contribute. Please, read\n[CONTRIBUTING.md](https://github.com/n-riesco/jmp/blob/master/CONTRIBUTING.md)\nand use the [issue tracker](https://github.com/n-riesco/jmp/issues) for any\ncontributions: support requests, bug reports, enhancement requests, pull\nrequests, ...\n","maintainers":[{"name":"captainsafia","email":"safia@safia.rocks"}],"time":{"modified":"2022-06-12T15:40:53.341Z","created":"2016-08-09T03:55:28.010Z","0.1.0":"2016-08-09T03:55:28.010Z","0.1.1":"2016-08-09T22:24:20.598Z","0.2.1":"2016-09-05T19:49:36.674Z","1.0.0":"2016-09-10T23:16:28.105Z","1.1.0":"2016-09-16T01:52:52.951Z"},"homepage":"https://github.com/n-riesco/jmp#readme","keywords":["jupyter","messaging","protocol","ijavascript"],"repository":{"type":"git","url":"git+https://github.com/n-riesco/jmp.git"},"contributors":[{"name":"Benjamin Abel","email":"bbig26@gmail.com"},{"name":"Kevin Kwok","email":"kkwok@mit.edu"},{"name":"Min RK","email":"benjaminrk@gmail.com"},{"name":"Nicolas Riesco","email":"enquiries@nicolasriesco.net"},{"name":"Will Whitney","email":"wfwhitney@gmail.com"}],"author":{"email":"enquiries@nicolasriesco.net","url":"http://www.nicolasriesco.net/"},"bugs":{"url":"https://github.com/captainsafia/zmq-prebuilt/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}