Permalink
Browse files

1.0 roundup

  • Loading branch information...
karissa committed Nov 5, 2015
1 parent eef205e commit 983f1436a00b36889750633fac2c2eb1d46e5d07
Showing with 44 additions and 1,076 deletions.
  1. +24 −0 bin/add.js
  2. +1 −20 bin/checkout.js
  3. +1 −25 bin/clone.js
  4. +0 −23 bin/datasets.js
  5. +0 −39 bin/delete.js
  6. +0 −56 bin/diff.js
  7. +0 −76 bin/export.js
  8. +0 −58 bin/files.js
  9. +0 −40 bin/forks.js
  10. +0 −41 bin/get.js
  11. +0 −86 bin/import.js
  12. +1 −17 bin/init.js
  13. +0 −85 bin/keys.js
  14. +1 −28 bin/log.js
  15. +0 −108 bin/merge.js
  16. +1 −56 bin/pull.js
  17. +1 −48 bin/push.js
  18. +0 −41 bin/read.js
  19. +0 −33 bin/replicate.js
  20. +1 −24 bin/status.js
  21. +0 −75 bin/write.js
  22. +1 −23 index.js
  23. +0 −14 lib/export.js
  24. +0 −42 lib/import.js
  25. +6 −0 schema.proto
  26. +6 −18 usage/root.txt
View
@@ -0,0 +1,24 @@
var pump = require('pump')
var basename = require('path').basename
var debug = require('debug')('bin/write')
var openDat = require('../lib/util/open-dat.js')
var createFileStream = require('../lib/util/create-file-stream.js')
var abort = require('../lib/util/abort.js')
var usage = require('../lib/util/usage.js')('write.txt')
var progress = require('../lib/util/progress.js')
module.exports = {
name: 'add',
command: handleWrite,
options: []
}
function handleWrite (args) {
debug('handleAdd', args)
if (args.help || args._.length === 0) {
return usage()
}
throw new Error('unimplemented')
}
View
@@ -1,6 +1,3 @@
var checkout = require('../lib/checkout.js')
var openDat = require('../lib/util/open-dat.js')
var abort = require('../lib/util/abort.js')
var usage = require('../lib/util/usage.js')('checkout.txt')
module.exports = {
@@ -11,21 +8,5 @@ module.exports = {
function handleCheckout (args) {
if (args.help || args._.length === 0) return usage()
openDat(args, function (err, db) {
if (err) abort(err)
var head = args._[0]
db = checkout(db, head)
db.on('error', done)
db.on('ready', done)
function done (err) {
if (err) return abort(err, args, 'Could not find checkout with hash ' + head)
var msg = 'Current version is now ' + db.head
if (args.json) console.log(JSON.stringify({version: db.head, message: msg}))
else console.log(msg)
db.close()
}
})
throw new Error('Unimplemented')
}
View
@@ -1,8 +1,6 @@
var abort = require('../lib/util/abort.js')
var usage = require('../lib/util/usage.js')('clone.txt')
var authPrompt = require('../lib/util/auth-prompt.js')
var auth = require('../lib/util/url-auth.js')
var progress = require('../lib/util/progress.js')
var clone = require('../lib/clone.js')
@@ -28,29 +26,7 @@ function handleClone (args) {
var source = args._[0]
var path = args._[1] || getName(source)
if (args.username && args.password) {
source = auth(source, args.username, args.password)
}
var cloneStream = clone(source, path, args, function finished (err, db) {
if (err) {
if (err.level === 'client-authentication' && !args.json) {
return authPrompt(args, handleClone)
} else {
return abort(err, args)
}
}
if (args.json) console.log(JSON.stringify({cloned: true}))
else console.error('Clone from remote to %s has completed.', path)
db.close()
})
if (!args.json) {
cloneStream.once('progress', function () {
progress(cloneStream, {verb: 'Cloning ' + source + ' into ' + path + '...\nProgress: ', replicate: true})
})
}
throw new Error('Unimplemented')
}
function getName (source) {
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 983f143

Please sign in to comment.