Skip to content

Commit

Permalink
feat: remove pasv url resolution (QuorumDMS#153)
Browse files Browse the repository at this point in the history
* fix: correctly try additional ports on EADDRINUSE

* feat: remove passive url host resoltion

See: QuorumDMS#139

* feat: require pasv url to be specified

* fix(pasv): check for set pasv url

* chore: update scripts

* fix(cli): remove undefined values

* chore: add cli to eslint verify

* chore: run eslint

* chore: update scripts

* feat: add maximum number of retries to port selection

* chore: simplify eslint config

* chore: simplify dev dependencies

* chore: generate contributors

* chore: update readme contributors

* chore: add verify step to release

BREAKING CHANGE: remove ipify.org automatic resolution of ip
  • Loading branch information
trs authored Feb 21, 2019
1 parent a3fa1a2 commit e582068
Show file tree
Hide file tree
Showing 26 changed files with 2,168 additions and 1,640 deletions.
30 changes: 26 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ base-build: &base-build
- node_modules
- run:
name: Lint
command: npm run verify:js
command: npm run verify
- run:
name: Test
command: npm run test:once
command: npm run test

jobs:
test_node_10:
Expand All @@ -50,6 +50,21 @@ jobs:
- NODE_VERSION: 6
<<: *base-build

release_dry_run:
docker:
- image: circleci/node:8
environment:
- NODE_VERSION: 8
steps:
- checkout
- <<: *create-cache-file
- restore_cache:
<<: *package-json-cache
- deploy:
name: Dry Release
command: |
npm run semantic-release -- --dry-run
release:
docker:
- image: circleci/node:8
Expand All @@ -61,7 +76,7 @@ jobs:
- restore_cache:
<<: *package-json-cache
- deploy:
name: Semantic Release
name: Release
command: |
npm run semantic-release
Expand All @@ -81,11 +96,18 @@ workflows:
filters:
branches:
only: master
- release:
- release_dry_run:
requires:
- test_node_6
- test_node_8
- test_node_10
- hold_release:
type: approval
requires:
- release_dry_run
- release:
requires:
- hold_release

build_and_test:
jobs:
Expand Down
7 changes: 0 additions & 7 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# START_CONFIT_GENERATED_CONTENT
# Common folders to ignore
node_modules/*
bower_components/*

# Config folder (optional - you might want to lint this...)
config/*

# END_CONFIT_GENERATED_CONTENT
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
test_tmp/

node_modules/

dist/
reports/
npm-debug.log
.nyc_output/
test_tmp/
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@

- Any new fixes are features should include new or updated [tests](/test).
- Commits follow the [AngularJS Git Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit), please review and commit accordingly
- Submit your pull requests to the `master` branch, these will normally be merged into a seperate branch for any finally changes before being merged into `master`.
- Submit any bugs or requests to the issues page in Github.
- Submit your pull requests to the `master` branch, these will normally be merged into a separate branch for any finally changes before being merged into `master`.
- Submit any bugs or requests to the issues page in Github.

## Setup

- Clone the repository `git clone`
- Install dependencies `npm install`
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Tyler Stewart
Copyright (c) 2019 Tyler Stewart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ connection.on('RNTO', (error, fileName) => { ... });

Occurs when a file is renamed.

`error` if successful, will be `null`
`error` if successful, will be `null`
`fileName` name of the file that was renamed

## Supported Commands
Expand Down Expand Up @@ -321,32 +321,34 @@ __Used in:__ `SITE CHMOD`
Returns a unique file name to write to
__Used in:__ `STOU`

<!--[RM_CONTRIBUTING]-->
## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

<!--[]-->

## Contributors

- [OzairP](https://github.com/OzairP)
- [qchar](https://github.com/qchar)
- [jorinvo](https://github.com/jorinvo)
- [voxsoftware](https://github.com/voxsoftware)
- [pkeuter](https://github.com/pkeuter)
- [TimLuq](https://github.com/TimLuq)
- [edin-mg](https://github.com/edin-m)
- [crabl](https://github.com/crabl)
- [hirviid](https://github.com/hirviid)
- [DiegoRBaquero](https://github.com/DiegoRBaquero)
- [edin-m](https://github.com/edin-m)
- [voxsoftware](https://github.com/voxsoftware)
- [jorinvo](https://github.com/jorinvo)
- [Johnnyrook777](https://github.com/Johnnyrook777)
- [qchar](https://github.com/qchar)
- [mikejestes](https://github.com/mikejestes)
- [pkeuter](https://github.com/pkeuter)
- [qiansc](https://github.com/qiansc)
- [broofa](https://github.com/broofa)
- [lafin](https://github.com/lafin)
- [alancnet](https://github.com/alancnet)
- [zgwit](https://github.com/zgwit)

<!--[RM_LICENSE]-->
## License

This software is licensed under the MIT Licence. See [LICENSE](LICENSE).

<!--[]-->

## References

- [https://cr.yp.to/ftp.html](https://cr.yp.to/ftp.html)
10 changes: 7 additions & 3 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,15 @@ function setupState(_args) {
}

function startFtpServer(_state) {
// Remove null/undefined options so they get set to defaults, below
for (const key in _state) {
if (_state[key] === undefined) delete _state[key];
}

function checkLogin(data, resolve, reject) {
const user = _state.credentials[data.username]
if (_state.anonymous || (user && user.password === data.password)) {
return resolve({root: (user && user.root) || _state.root});
const user = _state.credentials[data.username];
if (_state.anonymous || user && user.password === data.password) {
return resolve({root: user && user.root || _state.root});
}

return reject(new errors.GeneralError('Invalid username or password', 401));
Expand Down
38 changes: 0 additions & 38 deletions config/release/commitMessageConfig.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/testUnit/mocha.opts

This file was deleted.

6 changes: 0 additions & 6 deletions config/testUnit/reporters.json

This file was deleted.

162 changes: 0 additions & 162 deletions config/verify/.eslintrc

This file was deleted.

Loading

0 comments on commit e582068

Please sign in to comment.