{"_id":"@coboxcoop/peer-fs","_rev":"3-82aa38e60abc001d3346cf6defc0fc98","name":"@coboxcoop/peer-fs","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@coboxcoop/peer-fs","version":"0.0.1","description":"a multiwriter peer to peer filesystem","main":"index.js","scripts":{"test":"istanbul cover tape test/**/*.test.js | tap-spec"},"author":{"name":"Karissa McKelvey"},"license":"MIT","dependencies":{"corestore":"github:coboxcoop/corestore#default-core-in-opts","hypercore-crypto":"^1.0.0","hyperdrive":"github:mafintosh/hyperdrive","kappa-core":"^4.0.0","kappa-view-kv":"^2.0.1","memdb":"^1.3.1","mountable-hypertrie":"^0.10.3","multifeed":"github:coboxcoop/multifeed#enable-custom-keypair-for-feeds","random-access-memory":"^3.1.1"},"devDependencies":{"istanbul":"^0.4.5","mkdirp":"^0.5.1","pump":"^3.0.0","rimraf":"^2.6.3","tap-spec":"^5.0.0","tape":"^4.10.1","tape-plus":"^1.0.0","tmp":"^0.1.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/coboxcoop/peer-fs.git"},"keywords":["multiwriter","dat","kappa-core","peerfs","kappa-drive","kappa"],"bugs":{"url":"https://github.com/coboxcoop/peer-fs/issues"},"homepage":"https://github.com/coboxcoop/peer-fs#readme","gitHead":"667f9407f5a3492cdde5bb510269e2f2b8302558","_id":"@coboxcoop/peer-fs@0.0.1","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-rJm6c97Pyw61BX/FzP5/jviLYJftQNioFIYitYp3DES7ZyH+CcnpDbokfA92Dxmd9hYKqbjI12UVUjOg5gGKfA==","shasum":"5f0f2c8c57b5016b715a4b28f26c8b2edbb4e31f","tarball":"https://registry.npmjs.org/@coboxcoop/peer-fs/-/peer-fs-0.0.1.tgz","fileCount":10,"unpackedSize":18006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQJDYCRA9TVsSAnZWagAABtcP/RRXG9087KI2pKCclS+N\nAZCfqL+H/MTxQVXCPY70HPEahqI0qrEuvbbxaZzqvfjf6wjEZc2Jf3acruW0\nUxcbIbUnQHxiDYzao+sz73Y16LrM90woT3snVUYnr1EFxWDtmu2NIfd34tlR\nx3yDWjEWJK93vGJK55nvvJvjzUIQKre6w9D2KZ2iEij8FYQ1rP+s9TaWfJNT\nxq4rFewUoz4YJJSHThFNp+ZWE4ZdEOjpzewUJIGRSlnsmDjJvC1sqlsWlD72\nU9m63bGjeE66Dkc8ij9X2LEnlyFnTbfZcbLwBrCH4RniO9F0SmwfjrreFaS+\nKUgCBi3wv1+yxsP1Lvm0hjt3ho6yksNghNXoYUpo2qKxg7s7MQM2gVxO5ljr\nhFh5nTiVNjgLSlBSb5wfqzuGiVh45GHKqIXczDPjgimyy/fsfmK0xyvbtkU8\nNUI5X6TEXe4fl1tEq43R+GE1XSwdndXZVBVWIa58tWi5gXtC88PugZLdNujz\nXfppw57HsyqqHtqMyasBsRYaVkwOG0qKdibeIDMH0bZue6BzEBxZtlRXEx3F\nfet9AUFbYz1ZBbSrfHY9OH4FN8PxDL6JS1KHKuxoWLgsiYNxZStsh7WEU8k4\n2j26ZnjDVrXhCCUlTBHHVCIAllTXjSyc8f5nCrKmpj3nvqlVBOdFqtvUIhFu\n/ERu\r\n=/d3/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjMXSpffVUP0MIg0yypD2/Dt3E11LG0DbowQOrSHSiqQIgHC80tk+R9JccMK/9HDlhVX0lM4JJl/5XBQNEQkBDR4Y="}]},"maintainers":[{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"}],"_npmUser":{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/peer-fs_0.0.1_1564512471398_0.10289595240703275"},"_hasShrinkwrap":false,"deprecated":"deprecated in favour of kappa-drive"}},"time":{"created":"2019-07-30T18:47:51.179Z","0.0.1":"2019-07-30T18:47:51.528Z","modified":"2022-04-04T23:54:02.873Z"},"maintainers":[{"email":"ameba23@systemli.org","name":"ameba23"},{"email":"kieran@tenthousandthings.org.uk","name":"kyphae"}],"description":"a multiwriter peer to peer filesystem","homepage":"https://github.com/coboxcoop/peer-fs#readme","keywords":["multiwriter","dat","kappa-core","peerfs","kappa-drive","kappa"],"repository":{"type":"git","url":"git+https://github.com/coboxcoop/peer-fs.git"},"author":{"name":"Karissa McKelvey"},"bugs":{"url":"https://github.com/coboxcoop/peer-fs/issues"},"license":"MIT","readme":"# peer-fs\n\nA multiwriter peer-to-peer filesystem. Supports [Hyperdrive V10](https://github.com/mafintosh/hyperdrive/).\n\n## Usage\n\nSee [test/index.test.js](test/index.test.js) for examples.\n\n## API\n\n#### ```var drive = KappaDrive(storage, key, opts)```\n\nReturns a [KappaCore](kappa-db/kappa-core) instance. Passes these options directly to that instance.\n\nIn addition, peerfs accepts the following optional arguments:\n\n* `resolveFork`: a function taking `values` of known versions of that file. If there are more than one here, there is a fork. By default, this returns the first item in the list. Overwrite this to get more fancy. \n\n#### ```drive.replicate()```\n\nReplicate between two `peer-fs` instances.\n\n#### ```drive.readFile(filename, cb)```\n\nRead asyncronously.\n\n#### ```drive.writeFile(filename, content, cb)```\n\nWrite asyncronously.\n\n#### ```drive.createWriteStream(filename, cb)```\n\nWrite to a stream.\n\n#### ```drive.createReadStream(filename, cb)```\n\nRead file from a stream.\n\n## License\n\nMIT\n\n## Credit\n\nHuge credit to [Karissa](https://github.com/karissa) for ideating and writing [peerfs](https://github.com/karissa/peerfs) and allowing us to run with it and complete the API.\n\n:black_heart: :purple_heart: :green_heart:\n\n#### TODO\n\n- [ ] Move all of the functions over from hyperdrive to the top constructor instance. (e.g., readdir, stat)\n- [ ] Improve performance and stability of index writes by using something other than JSON.\n- [ ] Allow resolveFork function to get access to the stat object of the file on that write so that it can make a more intelligent display or make better decisions about the fork\n- [ ] Allow forks to be unresolved cc @substack\n- [ ] When writing, in the link we should record the seq of the hyperdrive, and on `whoHasFile`, checkout to that seq if its not the latest\n","readmeFilename":"README.md"}