@cypsela/sailplane-node
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@cypsela/sailplane-node", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "collaborative file system on ipfs", | ||
@@ -31,3 +31,2 @@ "main": "src/index.js", | ||
"@tabcat/orbit-db-fsstore": "^1.0.0", | ||
"cross-env": "^7.0.2", | ||
"it-all": "^1.0.2", | ||
@@ -38,2 +37,3 @@ "it-last": "^1.0.2", | ||
"devDependencies": { | ||
"cross-env": "^7.0.2", | ||
"ipfs-utils": "^2.2.2", | ||
@@ -40,0 +40,0 @@ "mocha": "^7.2.0", |
@@ -0,1 +1,3 @@ | ||
[![npm (scoped)](https://img.shields.io/npm/v/@cypsela/sailplane-node)](https://www.npmjs.com/package/@cypsela/sailplane-node) | ||
# sailplane-node | ||
@@ -2,0 +4,0 @@ collaborative file system on ipfs |
@@ -14,2 +14,8 @@ | ||
const defaultOptions = { | ||
autoStart: true, | ||
load: true, | ||
onStop: function () {} | ||
} | ||
class SharedFS { | ||
@@ -19,3 +25,3 @@ constructor (db, ipfs, options = {}) { | ||
this._ipfs = ipfs | ||
this.options = options | ||
this.options = { ...defaultOptions, ...options } | ||
@@ -33,3 +39,3 @@ this.address = this._db.address | ||
this._onStop = this.options.onStop || function () {} | ||
this._onStop = this.options.onStop | ||
@@ -45,3 +51,3 @@ // improvement: remove uncalled, queued promises on add of new promise | ||
const sharedfs = new SharedFS(fsstore, ipfs, options) | ||
if (options.autoStart !== false) await sharedfs.start() | ||
if (sharedfs.options.autoStart) await sharedfs.start() | ||
return sharedfs | ||
@@ -48,0 +54,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1971331
4
361
144
6
- Removedcross-env@^7.0.2
- Removedcross-env@7.0.3(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedisexe@2.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedwhich@2.0.2(transitive)