{"_id":"attachmate","_rev":"40-5d97eddd9da56eed4766fb88956d4a4d","name":"attachmate","description":"CouchDB Attachment Helpers","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.0","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"inherits":">= 1.0.0","request":"2.2.x","fstream":">= 0.1.3","mime":">= 1.0.0","debug":"*"},"devDependencies":{"vows":"0.5.x"},"repository":{"type":"git","url":"git://github.com/steelmesh/attachmate.git"},"bugs":{"url":"http://github.com/steelmesh/attachmate/issues"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"attachmate@0.1.0","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"314ef7a1883d46cd2a7c3353b0804b034f8e66f1","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.0.tgz","integrity":"sha512-PZ3gt6KSmGRDBgSYR6RYXbQTvvox4/pFaxoKnJsJgQgV8aHe4ujtMPCE9yKYpeZM/sU3kUffSdvzJqioIxHRtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDATd74fqrwR5WHQqxURDh93DeiJ16lAewfcgzdPyj/UAiATiqt3BIwrGXRDBE0Ptc4eL8n+havolERFtWBzh/9YVg=="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"directories":{}},"0.1.1":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.1","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"inherits":">= 1.0.0","request":"2.2.x","fstream":">= 0.1.3","mime":">= 1.0.0","debug":"*"},"devDependencies":{"vows":"0.5.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"attachmate@0.1.1","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6a7e03de5e65457f9b8e54bfb48621735959cd33","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.1.tgz","integrity":"sha512-FttF2upOTtvCK8XdLQGCqvDLoLVpkZTt+sik8PeAYwHWTKFImnYQ9z6FTombfjDm8yo7h60nHTlYCa+/02kX9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCivOdyMGPxwHBOvXglEGY/HENZp6uaztDUc2w4zHFpjwIhAI+pr6ujVH0y4RyJwYs6m74DtZmlOdLXUSkCSDEm3SLu"}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.2":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.2","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"inherits":">= 1.0.0","request":"2.9.x","fstream":"0.1.x","mime":"1.2.x","debug":"*"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"attachmate@0.1.2","_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"e039938e3654b20f2009254a5fe2248bc7cae7f9","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.2.tgz","integrity":"sha512-PGEiIPUFaRqtatT//3dJ1Rq0ObiEFXnHLW7DrsOJb77QzFFO6TTVncFxI8FnKfCC6yNZ9ioDdbKMrUzbeIsrJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBpxFT+bI/BfwXb0JBHt7KljjKhQql4sA/BGVjrcaa7OAiEA8oAiZKUR/l4bL8jHxtKuF99OcONdIMXD9IwukrxboEs="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.3":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.3","engines":{"node":">= 0.4.x < 0.9.0"},"dependencies":{"inherits":">= 1.0.0","request":"2.9.x","fstream":"0.1.x","mime":"1.2.x","debug":"*"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"contributors":[],"_id":"attachmate@0.1.3","dist":{"shasum":"a37dccde87729a6df6b666017fee5e9b16185be3","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.3.tgz","integrity":"sha512-UcqUFinaUTEafQmT+w9Ip/p1Qt6rkjtr+/Zd1XDtIW0qfAcdrd13LJrEap9uaGthGyVGWUAYepiZK2oD3gjDCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjOycTkMk+1iw11Fd6aMk3UeEN9dMuFlfzOO87x3HVDAiEApCt5C5v7lqQnj1H/VtweU7h7CV0Hdz6UVryQl6Xa/ZU="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.4":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.4","engines":{"node":">= 0.4.x < 0.9.0"},"dependencies":{"request":"2.10.x","fstream":"0.1.x","mime":"1.2.x","debug":"*"},"devDependencies":{"async":"0.1.x","mocha":"1.3.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"contributors":[],"_id":"attachmate@0.1.4","dist":{"shasum":"1667d2d9751b0c56a3d303a19c4829cb9869e620","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.4.tgz","integrity":"sha512-Q0psvBm++AVG3ADz+37N1D8EL8DbX6mZuO2DDhgK0/RsiIFKgpeGAcn+rw8O4C/WYYaDlh8IpXZR89JrBhhtqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD19WTwTK6I/FSWsk1RaXj6ltx6ZhJP52lQ1QIQZCzbLQIhAOVDZtrebAz6Kqi9nscoOABz+ZrVBbsV9uOEJEklDs45"}]},"_npmVersion":"1.1.52","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.5":{"name":"attachmate","description":"CouchDB Attachment Helpers (part of the Steelmesh stack)","tags":["couchdb"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"version":"0.1.5","engines":{"node":">= 0.4.x < 0.9.0"},"dependencies":{"request":"2.11.x","fstream":"0.1.x","mime":"1.2.x","debug":"*"},"devDependencies":{"async":"0.1.x","mocha":"1.4.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"scripts":{"test":"./node_modules/.bin/mocha --reporter spec -t 0"},"contributors":[],"_id":"attachmate@0.1.5","dist":{"shasum":"cd142907bd3004dcbdaa3e8a7e0e674571b37ade","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.5.tgz","integrity":"sha512-JGyk6Gs903y8zlsRoFihLYdcHmS1Yl2PzZiouIYfeCmJ4lK89uDyXxfdLUvrlwYPBvIYv2jtKDhkoAqh4wHAaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyChZ64+g4lOPAh61xOpDVwfEXldXy5zfnOgZaiekNJwIhAN+WujcqEnlVmjnzPpqvDt5TqfqCfb+rqnMIbAy5SNKX"}]},"_npmVersion":"1.1.52","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.6":{"name":"attachmate","description":"CouchDB Attachment Helpers","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.1.6","dependencies":{"request":"~2.27.0","fstream":"~0.1.24","mime":"~1.2.11","debug":"*"},"devDependencies":{"async":"0.2.x","mocha":"~1.14.0","mkdirp":"~0.3.5"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"scripts":{"gendocs":"gendocs > README.md","test":"$(npm bin)/mocha --reporter spec -t 0"},"main":"index.js","directories":{"example":"examples","test":"test"},"keywords":["couchdb","attachment","download","upload"],"license":"MIT","_id":"attachmate@0.1.6","dist":{"shasum":"58bdfdb7711cc827268f85883690b76eea2aa219","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.6.tgz","integrity":"sha512-d3Lmz92ior7a+2IBKqKdLxoK0lMBAKJAfFjaQgVdNiY52rPEyAphgrxqx02xuK9eAmmgTlkilZh2ZPAZ3FHUEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAS0vGPU5Gkmo/sf/nTtu2T62kEknllE2orq2yfwlZBAiBFVZlmUJUK/NC+1TJNXfM2cQ7kFvZS7sXYAKRdFhEb+Q=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}]},"0.1.7":{"name":"attachmate","description":"CouchDB Attachment Helpers","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.1.7","dependencies":{"request":"^2","fstream":"~0.1","mime":"^1","debug":"*"},"devDependencies":{"async":"~0.9","mocha":"^1","mkdirp":"~0.5"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"scripts":{"gendocs":"gendocs > README.md","test":"mocha --reporter spec -t 0"},"main":"index.js","directories":{"example":"examples","test":"test"},"keywords":["couchdb","attachment","download","upload"],"license":"MIT","homepage":"https://github.com/DamonOehlman/attachmate","_id":"attachmate@0.1.7","_shasum":"470c31f11e98a85efd670c59c46da55b40514fce","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"dist":{"shasum":"470c31f11e98a85efd670c59c46da55b40514fce","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-0.1.7.tgz","integrity":"sha512-b9IRPae/3N9y3de5hwgTfGMm96KfsmJNmT5BTphQp4cuIYpWCQOPZWvFaFkwO/Ya9q1I9U33ixOta9zKaOw9Iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDi8Wsvb6k+S5CimAnYnXPJIfCSY9vrDwTnxTKq3MWxgAiEAmKbCX2R5Vei67moj0Shj6Cp2b9y01JlQhbT1U1gYnqI="}]}},"1.0.0":{"name":"attachmate","description":"CouchDB Attachment Helpers","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.0.0","stability":"stable","dependencies":{"debug":"*","fstream":"^1.0.11","mime":"^1","request":"^2"},"devDependencies":{"async":"^2.4.1","mkdirp":"~0.5","mocha":"^3.4.2"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/attachmate.git"},"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"scripts":{"gendocs":"gendocs > README.md","test":"mocha --reporter spec -t 0"},"main":"index.js","directories":{"example":"examples","test":"test"},"keywords":["couchdb","attachment","download","upload"],"license":"MIT","gitHead":"b4545c05ecf837e92265460c070067fb29da7a74","homepage":"https://github.com/DamonOehlman/attachmate#readme","_id":"attachmate@1.0.0","_shasum":"f42d8c9a78c8fa5c7d224400af9fcedc24b2a3a0","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"dist":{"shasum":"f42d8c9a78c8fa5c7d224400af9fcedc24b2a3a0","tarball":"https://registry.npmjs.org/attachmate/-/attachmate-1.0.0.tgz","integrity":"sha512-ljM7SbMQf8Ioqcv8+SXpBcTiPyneBrFjzJmLmW/I/do780CBNzDzfUxJBW9NlezcH8m+tlJD19vQgixLiDwyvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHa+jn6/vtWEyuvHO3rJ9Y7mzSIqt/RFPBlLsa2pMjftAiBRyyRSMnT5jhhRR0XrlOHngcZmhm0PilRB3QkongL0RQ=="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/attachmate-1.0.0.tgz_1497516419306_0.6637803681660444"}}},"readme":"\n# attachmate\n\nStreamable CouchDB attachments\n\nAn experiment in using @isaacs useful\n[fstream](https://github.com/isaacs/fstream) project to stream files in\nand out of [CouchDB](http://couchdb.apache.org/) as attachments to\ndocuments.\n\n\n[![NPM](https://nodei.co/npm/attachmate.png)](https://nodei.co/npm/attachmate/)\n\n[![stable](https://img.shields.io/badge/stability-stable-green.svg)](https://github.com/dominictarr/stability#stable) [![Build Status](https://api.travis-ci.org/DamonOehlman/attachmate.svg?branch=master)](https://travis-ci.org/DamonOehlman/attachmate) [![bitHound Score](https://www.bithound.io/github/DamonOehlman/attachmate/badges/score.svg)](https://www.bithound.io/github/DamonOehlman/attachmate) \n\n## Downloading From Couch to FileSystem\n\n### Example: Download Attachments to the Filesystem\n\n```js\nvar attachmate = require('attachmate');\nvar fstream = require('fstream');\nvar path = require('path');\nvar outputPath = path.resolve(__dirname, 'output');\nvar mkdirp = require('mkdirp');\n\nmkdirp(outputPath, function(err) {\n  if (err) return;\n\n  var r = fstream.Reader({\n    type: attachmate.Reader,\n    path: 'http://localhost:5984/testdb/test'\n  });\n\n  var w = fstream.Writer({\n    path: outputPath,\n    type: 'Directory'\n  });\n\n  // pipe the attachments to the directory\n  r.pipe(w);\n});\n\n\n```\n\n### Example: Download Attachments (using download helper)\n\n```js\nvar attachmate = require('attachmate');\nvar path = require('path');\nvar outputPath = path.resolve(__dirname, 'output');\nvar mkdirp = require('mkdirp');\n\nmkdirp(outputPath, function(err) {\n  if (err) return;\n\n  attachmate.download(\n    'http://localhost:5984/testdb/test',\n    outputPath,\n    function(err) {\n      console.log('done, error = ', err);\n    }\n  );\n});\n\n\n```\n\n## Uploading from Filesystem to Couch\n\n### Options\n\nThe fstream classes take a set of options at initialization.  In keeping\nwith the fstream standard, we use the `path` option to denote the target\ndocument.  The following additional options are also supported:\n\n- `preserveExisting` - whether or not existing attachments on the\n  document should be preserved. (default = true)\n\n- `includeHidden` - whether or not hidden files should be included when\n   uploading attachments to couch. (default = false)\n\n### Example: Upload Attachments from the Filesystem\n\n```js\nvar attachmate = require('attachmate');\nvar fstream = require('fstream');\nvar path = require('path');\n\nvar r = fstream.Reader({\n  path: path.resolve(__dirname, 'input'),\n  type: 'Directory'\n});\n\nvar w = new attachmate.Writer({\n  path: 'http://localhost:5984/testdb/test',\n  includeHidden: false,\n  preserveExisting: true\n});\n\n// pipe the attachments to the directory\nr.pipe(w);\n```\n\n### Example: Upload Attachments (using upload helper)\n\n```js\nvar attachmate = require('attachmate');\nvar path = require('path');\n\nattachmate.upload(\n  'http://localhost:5984/testdb/test',\n  path.resolve(__dirname, 'input'),\n  function(err) {\n    console.log('done, error = ', err);\n  }\n);\n```\n\n## Reference\n\n## AttachmentReader\n\n### _getEntries()\n\n### _read()\n\n### pause()\n\n### resume()\n\n## HttpRequestEntry(targetDoc, path)\n\n### _getStream()\n\n### _read()\n\n### pause()\n\n### resume()\n\n## AttachmentWriter(props)\n\n### add()\n\n### end()\n\n### _addAttachment(name, chunks, size)\n\n### _process()\n\n## License(s)\n\n### MIT\n\nCopyright (c) 2017 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-13T03:43:00.499Z","created":"2011-11-30T07:11:33.398Z","0.0.1":"2011-11-30T07:11:37.499Z","0.0.2":"2011-12-02T01:47:58.674Z","0.0.3":"2011-12-02T04:51:53.495Z","0.0.4":"2011-12-02T05:22:21.154Z","0.0.5":"2011-12-02T09:19:17.694Z","0.1.0":"2011-12-19T11:59:21.384Z","0.1.1":"2011-12-30T02:40:34.151Z","0.1.2":"2012-03-02T06:08:22.816Z","0.1.3":"2012-06-27T07:01:23.574Z","0.1.4":"2012-08-27T23:38:21.989Z","0.1.5":"2012-09-08T05:53:42.458Z","0.1.6":"2013-11-05T11:32:08.232Z","0.1.7":"2014-05-18T22:37:11.146Z","1.0.0":"2017-06-15T08:46:59.482Z"},"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/attachmate.git"},"homepage":"https://github.com/DamonOehlman/attachmate#readme","keywords":["couchdb","attachment","download","upload"],"bugs":{"url":"http://github.com/DamonOehlman/attachmate/issues"},"license":"MIT","readmeFilename":"README.md"}