npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cypsela/sailplane-node

v2.2.2

Published

collaborative file system on ipfs

Downloads

26

Readme

npm (scoped)

sailplane-node

collaborative file system on ipfs

This package was built to enable collaborative file storage similar to popular consumer faced cloud storage. It uses a custom orbit-db store named orbit-db-fsstore to map file paths to IPFS content ids and calculates directory paths from contained file content ids.

Things to Note:

  • This is alpha software, the API is likely to change.
  • This is not yet a hardened protocol. Malicious entries added to the underlying orbitdb store could crash the program.
  • The orbitdb instance handed to SailplaneNode must use js-ipfs version 0.41+ (requires the async iterator api)

Install

npm install @cypsela/sailplane-node

API

check out ./test for examples

SailplaneNode API

.create(orbitdb, [options])

static async

orbitdb: an instance of OrbitDB

[options]: {Object} options to be used by the sailplane instance; no options defined yet

const sailplane = await Sailplane.create(orbitdb, {})

returns a Promise that resolves to an instance of SailplaneNode

.determineAddress(name, [options])

async

name: {String} naming the orbitdb filesystem store

[options]: {Object} options passed to orbitdb.determineAddress

const address = await sailplane.determineAddress('superdrive', {})

returns a Promise that resolves to an instance of OrbitDBAddress for an FSStore

.mount(address, [options])

async

address: {OrbitDBAddress or String} address of an FSStore

[options]: {Object} options passed to orbitdb.open and SharedFS.create

const sharedfs = await sailplane.mount(address, {})

returns a Promise that resolves to an instance of SharedFS

SharedFS API

.create(fsstore, [options])

static async

This method should not be directly called by users, use sailplane.mount instead

fsstore: an instance of FSStore

[options]: {Object} options to be used by the sharedfs instance

[options.onStop]: {Function} called and awaited before the sharedfs instance is stopped with sharedfs.stop. Used by sailplane.mount. Default is empty function

[options.autoStart]: {Boolean} whether to await sharedfs.start before returning sharedfs instance. Default: true

[options.loadDb]: {Boolean} whether calling sharedfs.start should load the fsstore history. Default: true

const sharedfs = await SharedFS.create(orbitdb, {})

returns a Promise that resolves to an instance of SharedFS

.start()

async

Starts the sharedfs instance. Depending on sharedfs.options start may be called automatically and load fsstore history.

await sharedfs.start()

returns a Promise that resolves to undefined

.stop([options])

async

[options]: {Object} options to be used

[options.drop]: {Boolean} whether to call .drop on the fsstore

Stops the sharedfs instance. Using the sharedfs instance after calling .stop could result in an error.

await sharedfs.stop()

returns a Promise that resolves to undefined

.upload(path, source)

async

path: {String} a string usable as an fsstore path. Every path must be a child of '/r'.

source: {data source} this is handed directly to ipfs.add

Upload folders and files to ipfs and add references to them in the fsstore.

await sharedfs.upload('/r', source)

returns a Promise that resolves to undefined

.read(path)

async

path: {String} path of filesystem to read

const cid = await sharedfs.read('/r')

returns a Promise that resolves to an instance of CID, more info about IPFS content ids

.remove(path)

async

path: {String} path of filesystem to remove

Removes a file or folder recursively at path.

await sharedfs.remove('/r')

returns a Promise that resolves to undefined

.fs.joinPath(path, name)

Creates a new path by adding path and name

documentation

.fs.exists(path)

Returns whether path exists in filesystem

documentation

.fs.content(path)

Returns content type at path

documentation

.fs.read(path)

Returns data stored path

documentation

.fs.tree(path)

Returns all paths under path

documentation

.fs.ls(path)

Returns all paths directly under path

documentation