* feat(commands): expose a RNTO event, updated a readme file
* feat(commands): fixed test for the RNTO
* chore: fixed prepush errors
* fix: turnback spaces into a README.md
* fix: timeouts when using tls
* fix: correct tls connection
* fix(connector): dont prematurely destroy socket
* fix(passive): set connected if not tls
* refactor: dont return promises on connector end
Since we're not waiting, we don't need to return promises
* (fix) base: set datasocket to null once destroyed (#119)
Ensure new sockets get created when uploading files by setting the datasocket to null after its destroyed
* fix(stor): use the close event (#118)
The 'end' event is not called when using SSL. Should use the 'close' event
* refactor(list): chained promises with less depth (#117)
* Update list.js
Tidy up of the List function.
Makes the intent of the method clearer, as there are less nested promises
* refactor(list): chained promises with less depth
* refactor: fixup formatting
* test: update test file config
* fix: command parse ignores flags on RETR and SIZE (#121)
fixes#120
* refactor: upper directive before checking flag parse
* test: add test for command option parse
* feat: restrict command flags to single dash, single character
Only parse `-x` style flags.
* Update find-port.js
Reuse the Port Number Generator
* feat(passive): initialize port factory in server
Ensures that each passive connection does not have to start from the beginning of the pasv port range
https://github.com/trs/ftp-srv/pull/110
* fix(connector): ensure data socket is destroyed and resolved
If there was a data socket, this would never resolve
* test: use bluebird promises for tests, fix stubs
* fix(commands): ensure connector is ended before resuming
Emit and reply with the full paths to the files.
BREAKING CHANGE: fs expects an object `{stream, clientPath}` in response to `.read()` and `.write()`.
This is implemented in a backwards compatible way, and works with the old `fs` implementation. But since this may break builds in unintented ways.
Using a generator, will loop through min and max ports in order
This should be faster and more efficient since it starts after the last valid port meaning it has a higher chance of being valid
* fix(connector): build passive server correctly for tls
Fixes an issue where passive tls connections would never be fulfilled.
This uses `tls` to create a server if the connection is secure, which allows an ftp client to connect correctly
* test: stop skipping explicit tests
cli would reject all logins with `530 Cannot destructure property `password` of 'undefined' or 'null'.` because the credentials object was being indexed with `[object Object]`. Even with that fixed, if the username was not found, it would produce that error.
This has passive connections to listen on the same hostname as the server.
But allows this to be customized via the `pasv_url` option.
Hostnames are no longer resolved if given `0.0.0.0`, except when being given to the client via `PASV`