-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HEAD
- Loading branch information
Showing
75 changed files
with
2,692 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules/ | |
|
||
dist/ | ||
reports/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
|
||
install: npm install | ||
|
||
script: | ||
- npm run verify:js | ||
- npm run test:coverage | ||
|
||
after_success: | ||
- if [ $TRAVIS_BRANCH = 'master' ]; then npm run semantic-release; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"global": { | ||
"statements": 80, | ||
"branches": 80, | ||
"functions": 60, | ||
"statements": 70, | ||
"branches": 60, | ||
"functions": 80, | ||
"lines": 80 | ||
}, | ||
"each": { | ||
"statements": 40, | ||
"branches": 50, | ||
"functions": 20, | ||
"lines": 40 | ||
"statements": 0, | ||
"branches": 0, | ||
"functions": 0, | ||
"lines": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = function () { | ||
return this.reply(202); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const _ = require('lodash'); | ||
|
||
module.exports = function ({command} = {}) { | ||
const method = _.upperCase(command._[1]); | ||
|
||
switch (method) { | ||
case 'TLS': return handleTLS.call(this); | ||
case 'SSL': return handleSSL.call(this); | ||
default: return this.reply(504); | ||
} | ||
} | ||
|
||
function handleTLS() { | ||
return this.reply(504); | ||
} | ||
|
||
function handleSSL() { | ||
return this.reply(504); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const cwd = require('./cwd'); | ||
|
||
module.exports = function(args) { | ||
args.command._ = [args.command._[0], '..']; | ||
return cwd.call(this, args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const when = require('when'); | ||
const escapePath = require('../helpers/escape-path'); | ||
|
||
module.exports = function ({log, command} = {}) { | ||
if (!this.fs) return this.reply(550, 'File system not instantiated'); | ||
if (!this.fs.chdir) return this.reply(402, 'Not supported by file system'); | ||
|
||
return when(this.fs.chdir(command._[1])) | ||
.then(cwd => { | ||
const path = cwd ? `"${escapePath(cwd)}"` : undefined; | ||
return this.reply(250, path); | ||
}) | ||
.catch(err => { | ||
log.error(err); | ||
return this.reply(550, err.message); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const when = require('when'); | ||
|
||
module.exports = function ({log, command} = {}) { | ||
if (!this.fs) return this.reply(550, 'File system not instantiated'); | ||
if (!this.fs.delete) return this.reply(402, 'Not supported by file system'); | ||
|
||
return when(this.fs.delete(command._[1])) | ||
.then(() => { | ||
return this.reply(250); | ||
}) | ||
.catch(err => { | ||
log.error(err); | ||
return this.reply(550); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const _ = require('lodash'); | ||
|
||
module.exports = function () { | ||
const registry = require('./registry'); | ||
const features = Object.keys(registry) | ||
.filter(cmd => registry[cmd].hasOwnProperty('feat')) | ||
.reduce((feats, cmd) => _.concat(feats, registry[cmd].feat), []) | ||
.map(feat => ` ${feat}`); | ||
return this.reply(211, 'Extensions supported', ...features, 'END'); | ||
} |
Oops, something went wrong.