Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@cypsela/sailplane-node
Advanced tools
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.
npm install @cypsela/sailplane-node
check out ./test for examples
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
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
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
static
async
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
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
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
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
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
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
Creates a new path by adding path and name
Returns whether path exists in filesystem
Returns content type at path
Returns data stored path
Returns all paths under path
Returns all paths directly under path
FAQs
collaborative file system on ipfs
The npm package @cypsela/sailplane-node receives a total of 0 weekly downloads. As such, @cypsela/sailplane-node popularity was classified as not popular.
We found that @cypsela/sailplane-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.