Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

@aballard/refactor #124

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ansballard
Copy link
Contributor

Hello again!

So I realized I added a pretty terrible bug with my last PR (all uploaded files go to the root of the remote server, ignores destination). So I wanted to fix that, but I kind of got carried away. So I...

  • moved all the Makefile logic to package.json (standard node practice)
  • updated all used npm deps to the latest
  • replaced jscoverage (ahd security warnings) with nyc (standard)
  • added e2e tests for a few of the main methods using a mock local server
    • based that server on the sftp example in the ssh2 repo, along with parts of the README
    • runs on port 2222, tears down and spins up separately for each test
  • fixed the bug I introduced by adding back the logic to write to a given directory with the source filename, and passed in either that desintation or the given one to the scp method
  • replaced the password prompts with the npm prompt package, so passwords can be hidden

I also wanted to replace jshint with prettier (much smaller footprint when deving, and prettier is pretty standard at this point), add some coverage thresholds, and maybe beef up the local server so it actually writes files so all that logic can be checked, but that's for another day I guess.

Sorry for the massive PR, let me know if you'd like anything changed!

Aaron Ballard and others added 7 commits October 9, 2018 12:53
…linting and testing before commits, added pacakge-lock.json, added _site and lib-cov with ignored contents instead of creating them every time, fix linting errors in bin and client.js
…move index.js and add a main entry to replace it
…cal mock ssh server, along with the relevant mocks and mock server implementation. Also added coverage output in /coverage (ignored)
…ll request overrode the destination and defaulted to the home directory. Can check by uploading a file with a specified directory that isn't ~, the previous version still goes to ~ while the new goes to the specified.
…swords. Also require scp directly from bin instead of '..'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant