diff --git a/node/lib/dokku-git-remote-parser/index.js b/node/lib/dokku-git-remote-parser/index.js deleted file mode 100644 index da518b0..0000000 --- a/node/lib/dokku-git-remote-parser/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var spawn = require('child_process').spawn, - parse = require('./lib/dokku-git-remote-stream') - -module.exports = function (cb) { - var gitRemote = spawn('git', ['remote', '-v'], { cwd: process.cwd() }) - - gitRemote.stdout - .pipe(parse) - .on('data', function (data) { - cb(data.host, data.appName) - }) -} diff --git a/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/index.js b/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/index.js deleted file mode 100644 index a10d0d6..0000000 --- a/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/index.js +++ /dev/null @@ -1,10 +0,0 @@ -var through2 = require('through2') - -module.exports = through2.obj(function(chunk, enc, cb) { - var remotes = chunk.toString().match(/dokku@([^:]*):(?:\/.*\/)?([^\s]*)/) - var host = remotes[1] - var appName = remotes[2] - - this.push({ host: host, appName: appName }) - cb() -}) diff --git a/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/package.json b/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/package.json deleted file mode 100644 index 67f5883..0000000 --- a/node/lib/dokku-git-remote-parser/lib/dokku-git-remote-stream/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "dokku-git-remote-stream", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "through2": "^0.6.3" - } -} diff --git a/node/lib/dokku-ssh/index.js b/node/lib/dokku-ssh/index.js deleted file mode 100644 index f2fe6f4..0000000 --- a/node/lib/dokku-ssh/index.js +++ /dev/null @@ -1,38 +0,0 @@ -var spawn = require('child_process').spawn, - util = require('util') - -var globalCommands = [ - 'apps:create', - 'apps:destroy', - 'backup:export', - 'backup:import', - 'plugins-install', - 'plugins', - 'plugins-update', - 'ps:rebuildall', - 'ps:restartall', - 'version', - 'help', - 'apps' -] - -module.exports = function (host, app, params) { - var sshParams = ['-T', 'dokku@' + host] - - if (util.isArray(params)) { - sshParams.push(params.shift()) - - if (globalCommands.indexOf(sshParams[sshParams.length - 1]) === -1) - sshParams.push(app) - - sshParams = sshParams.concat(params) - } - - var ssh = spawn('ssh', sshParams) - ssh.stdout.on('data', function (data) { - console.log(data.toString()) - }) - ssh.stderr.on('data', function (data) { - console.log('err:', data.toString()) - }) -} diff --git a/node/lib/dokku-ssh/package.json b/node/lib/dokku-ssh/package.json deleted file mode 100644 index 76f2953..0000000 --- a/node/lib/dokku-ssh/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "dokku-ssh", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" -}