{"_id":"changemate","_rev":"46-52d339c17dbfa02263b23f1b44413b71","name":"changemate","description":"Change Notification for CouchDB","dist-tags":{"latest":"1.0.0"},"versions":{"0.4.6":{"name":"changemate","description":"Change Notification service (part of the Steelmesh stack)","tags":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.4.6","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"debug":">= 0.1.0"},"devDependencies":{"config":">= 0.4.0","nano":">= 1.0.0","mocha":">= 0.7.0"},"repository":{"type":"git","url":"git://github.com/steelmesh/changemate.git"},"bugs":{"url":"http://github.com/steelmesh/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 10000"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"changemate@0.4.6","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"96250d293b53fe644e3aa4b9a8dcb3c6af050a19","tarball":"https://registry.npmjs.org/changemate/-/changemate-0.4.6.tgz","integrity":"sha512-/NutRwtg9eNbBpWW69H2hXd2qVmW/58CqKSNGTj/Ng3LeQHGTR9raOqWDoZk/SUOLhVPBO9CPiQFgotibr0PJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGs9xNPPQrAWGNvjRoMqmiA33ci6cxZrR8Q+5SBFgyv2AiB7cj1hHhNLOySHhErnTipVIg37RirmVOGfkxeSzYstIg=="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"directories":{}},"0.4.7":{"name":"changemate","description":"Change Notification for CouchDB (plus others)","tags":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.4.7","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"debug":">= 0.1.0"},"devDependencies":{"config":">= 0.4.0","nano":">= 1.0.0","mocha":">= 0.7.0"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 10000"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"changemate@0.4.7","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"290ddacc4432b62327ed6286eda7fd8445e56154","tarball":"https://registry.npmjs.org/changemate/-/changemate-0.4.7.tgz","integrity":"sha512-9suwW9MKNs7euXyKb/o05SJieCsDoTnmmuEvkConAkxR1hB0LHnK+RPt88TGUXdMYpRX0DZtIJJSMyN/43wn2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLyUgiLy7nFGxEiUjBwdHN7kQvkhjQSBHRUjHM+Rc9ZQIgKj1My+6KQ1ypsAdU3fp9+DNLCrjQ8+8bTU7YOdLbwYs="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.4.8":{"name":"changemate","description":"Change Notification for CouchDB (plus others)","tags":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.4.8","engines":{"node":">= 0.4.x < 0.9.0"},"dependencies":{"debug":">= 0.1.0"},"devDependencies":{"config":">= 0.4.0","nano":">= 1.0.0","mocha":">= 0.7.0"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 10000"},"contributors":[],"_id":"changemate@0.4.8","dist":{"shasum":"f20eef1f5153b841b6168383da9a2e819b6d0a1f","tarball":"https://registry.npmjs.org/changemate/-/changemate-0.4.8.tgz","integrity":"sha512-MkFhkIdxaOWFzTto+DOeFmRMzNhnCFo4sINcAHzgsoGZFKIvb3Nif2Pac7rsLycxbiitGQihzwg8o3w1zJsBWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaw0KDzrWKnL4+bBooXwirHKXoTFVLuw/ohWmUwLHAkAiBzfBr6STrX7RWB922r799Imyd1/C69vqLPJJPzbzdMEw=="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.5.1":{"name":"changemate","description":"Change Notification for CouchDB","keywords":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.5.1","dependencies":{"debug":"*"},"devDependencies":{"config":"~0.4","nano":"^5","mocha":"^1"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 60000","gendocs":"gendocs > README.md"},"homepage":"https://github.com/DamonOehlman/changemate","main":"index.js","directories":{"example":"examples","test":"test"},"license":"MIT","_id":"changemate@0.5.1","_shasum":"6912c72aa883557b432720c251528f3eca990d73","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"dist":{"shasum":"6912c72aa883557b432720c251528f3eca990d73","tarball":"https://registry.npmjs.org/changemate/-/changemate-0.5.1.tgz","integrity":"sha512-aV2wALk/tu9qsvCAas98u5+r4ZlYN+SAiCr5SSAFC1Psnvuj6ohQWsKqwrUUmILSB5w5bckAxLtgm96BvLqzlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFX69rhvtOAWNRL/B8eP0UltkpyVIsHNYv9ZwbwVvCW+AiBZ01o/nxhO1M3TwNCS+F6bL8hb7zXeCzrl8HGseb5iwA=="}]}},"0.6.0":{"name":"changemate","description":"Change Notification for CouchDB","keywords":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.6.0","dependencies":{"cog":"~0.5","debug":"*","follow":"~0.11"},"devDependencies":{"config":"~0.4","mocha":"^1","nano":"^5","request":"^2"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 60s test/all.js","gendocs":"gendocs > README.md"},"homepage":"https://github.com/DamonOehlman/changemate","main":"index.js","directories":{"example":"examples","test":"test"},"license":"MIT","_id":"changemate@0.6.0","_shasum":"5ba486719e9ac4124e41e9dd7d88238b687e288b","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"dist":{"shasum":"5ba486719e9ac4124e41e9dd7d88238b687e288b","tarball":"https://registry.npmjs.org/changemate/-/changemate-0.6.0.tgz","integrity":"sha512-BvCD8S850X/Us7YbNQQqsVHnswEK019yd7/TUm3d0tEJvJ6sA0SWzC5W1AJP2heOCK4Nb/e6iSTmAh3Gtn7/BQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID0lTU/3mGCTr9FY9KmxqJjuKIDqSjSLEm6N9pc45l/PAiA5PQSiBE2xD+djy36HpsFa35Gdfl5BLeUZDSQGA83SQg=="}]}},"1.0.0":{"name":"changemate","description":"Change Notification for CouchDB","keywords":["change","notify","filesystem","couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.0.0","dependencies":{"cog":"^1.1.0","debug":"^2.2.0","follow":"^0.12.1"},"devDependencies":{"config":"^1.20.3","mocha":"^2.4.5","nano":"^6.2.0","request":"^2.72.0"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"scripts":{"test":"mocha --reporter spec -t 60s test/all.js","gendocs":"gendocs > README.md"},"homepage":"https://github.com/DamonOehlman/changemate","main":"index.js","directories":{"example":"examples","test":"test"},"stability":"unstable","license":"MIT","gitHead":"e0eb1adaf6ef483f58c39bbffef079739c864ccd","_id":"changemate@1.0.0","_shasum":"ce0e5e627f8fea0132efc4ac58955e995fd4401f","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"dist":{"shasum":"ce0e5e627f8fea0132efc4ac58955e995fd4401f","tarball":"https://registry.npmjs.org/changemate/-/changemate-1.0.0.tgz","integrity":"sha512-HmijlyZeCVRsJO3jZVw6xgIVml5PJBujakrPaVsO8FFZLDK+3R5AZO/1H38wOixrMsWWmJeVV/hqLQl70wS6OQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcp8c7z/W6CzFl6lhnXgMOf5//wDBIoppe45ToyzBb/AiEA1qHme6XXu2aH+8EIfqgczCOBT7+gf0Rp0EQskuzLXd0="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/changemate-1.0.0.tgz_1464001177502_0.9653865245636553"}}},"readme":"# changemate\n\nChangemate is a change notification service and framework. At present it only\nsupports responding to the `_changes` feed of a couch database, but will be\nexpanded in time to support other change notification formats.\n\n\n[![NPM](https://nodei.co/npm/changemate.png)](https://nodei.co/npm/changemate/)\n\n[![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable) [![Build Status](https://api.travis-ci.org/DamonOehlman/changemate.svg?branch=master)](https://travis-ci.org/DamonOehlman/changemate) [![bitHound Score](https://www.bithound.io/github/DamonOehlman/changemate/badges/score.svg)](https://www.bithound.io/github/DamonOehlman/changemate) \n\n## Supported Notifiers\n\n### CouchDB\n\nThe couchdb notifier is the first cab off the rank, as it is required for\n[steelmesh](https://github.com/steelmesh/steelmesh).  The couchdb notifier hooks\ninto the [continuous changes feed](http://wiki.apache.org/couchdb/HTTP_Document_API#A_changes)\nfor a couchdb instance.\n\n```js\nvar changemate = require('changemate');\nvar counter = 0;\nvar notifier = changemate('<:couch:> https://fluxant.cloudant.com/seattle_neighbourhood');\n\nnotifier\n  .on('connect', function() {\n    console.log('connected');\n  })\n  .on('change', function(data) {\n    console.log('got change id: ' + data.id + ', seq: ' + data.seq + ', counter: ' + (++counter));\n  })\n  .on('close', function() {\n    console.log('disconnected from server');\n  });\n\n```\n\n__Supported Options:__\n\n- `since` - the change_sequence to get changes since\n- `include_docs` - whether or not document fragments should be included\n   with the change data\n\n## State Management\n\nYou can see by running the example above, that the changes for the feed are\nread from `since=0` each time.  While this is good for the purpose of the\nexample, it's unlikely to be the desired behaviour in your application.\n\nChangemate does not offer a checkpoint persistence mechanism, but does provide\ncheckpoint information so that you can store that information yourself and\nuse it:\n\n```js\nvar changemate = require('changemate');\nvar counter = 0;\nvar notifier;\nvar _checkpoint;\n\nfunction _createNotifier() {\n  // reset the counter\n  counter = 0;\n\n  console.log(_checkpoint);\n\n  // create the notifier\n  notifier = changemate(\n    '<:couch:> https://fluxant.cloudant.com/seattle_neighbourhood', // target\n    {}, // options\n    _checkpoint // checkpoint\n  );\n\n  notifier.on('change', function(data, checkpoint) {\n    // save the checkpoint\n    _checkpoint = checkpoint;\n\n    console.log('got change id: ' + data.id + ', seq: ' + data.seq + ', counter: ' + (++counter));\n    if (counter >= 100) {\n      notifier.close();\n      _createNotifier();\n    }\n  });\n}\n\n// create the notifier\n_createNotifier();\n\n```\n\nIn the example above, we are collecting the checkpoint data that is passed\nthrough in the change event.  Additionally, we are closing the notifier for\nevery 100 updates, and creating a new notifier with the checkpoint data that\nhas been captured in previous events.\n\nTo make the sample above persist across sessions, the checkpoint information\ncould be save to a local JSON file or similar and reloaded the next time the\nscript ran to start from next required update.\n\n## License(s)\n\n### MIT\n\nCopyright (c) 2016 Damon Oehlman <damon.oehlman@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"time":{"modified":"2022-06-13T05:52:51.225Z","created":"2011-11-30T04:56:37.049Z","0.1.0":"2011-11-30T04:56:41.864Z","0.2.0":"2011-12-04T00:25:36.756Z","0.3.0":"2011-12-16T09:55:21.621Z","0.4.1":"2011-12-22T13:14:00.074Z","0.4.2":"2011-12-22T23:54:23.350Z","0.4.3":"2011-12-23T03:00:56.684Z","0.4.4":"2011-12-23T03:51:10.466Z","0.4.5":"2011-12-23T12:47:12.695Z","0.4.6":"2011-12-26T23:04:11.063Z","0.4.7":"2011-12-30T02:36:28.195Z","0.4.8":"2012-06-27T07:21:12.219Z","0.5.1":"2014-05-13T01:43:11.142Z","0.6.0":"2014-05-18T12:09:24.401Z","1.0.0":"2016-05-23T10:59:39.569Z"},"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/changemate.git"},"homepage":"https://github.com/DamonOehlman/changemate","keywords":["change","notify","filesystem","couchdb"],"bugs":{"url":"http://github.com/DamonOehlman/changemate/issues"},"license":"MIT","readmeFilename":"README.md"}