diff --git a/cli.js b/cli.js index e1d0402..dcc1939 100755 --- a/cli.js +++ b/cli.js @@ -21,7 +21,7 @@ if (argv.help) return usage() var src = argv._[0] || process.cwd() var dest = argv._[1] var indexSpeed = speed() -var logspeed = 200 +var logspeed = argv.logspeed || 400 var neat = neatLog([mainView, progressView], {logspeed: logspeed}) neat.use(runDat) diff --git a/package.json b/package.json index f171d47..e15d7b8 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "cli-truncate": "^1.0.0", "dat-encoding": "^4.0.2", "dat-node": "^3.0.0", - "dat-secret-storage": "^2.0.0", - "dat-storage": "0.0.1", + "dat-storage": "^1.0.0", "debug": "^2.4.5", "minimist": "^1.2.0", "mkdirp": "^0.5.1", diff --git a/storage.js b/storage.js index cf4dd2e..cbc5be2 100644 --- a/storage.js +++ b/storage.js @@ -1,6 +1,5 @@ var fs = require('fs') var ram = require('random-access-memory') -var secretStore = require('dat-secret-storage') var datStore = require('dat-storage') var mkdirp = require('mkdirp') @@ -8,13 +7,12 @@ module.exports = storage function storage (dir, opts) { if (opts.temp) return ram - if (typeof opts.sleep === 'string') return secretStore(opts.sleep) + if (typeof opts.sleep === 'string') return opts.sleep mkdirp.sync(dir) try { var isDir = fs.statSync(dir).isDirectory() - if (isDir && opts.secretKey !== undefined) return datStore(dir) - if (isDir) return secretStore(datStore(dir)) + if (isDir) return datStore(dir) error() } catch (e) { throw e