Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit eb40260f authored by Erik Schwartz's avatar Erik Schwartz 🉐
Browse files

Bump to Node.js LTS v12

Also bumped NPM package versions and made minor documentation
and package.json improvements.
parent 7df6ffcb
......@@ -4,18 +4,18 @@ Download files from IQ SFTP server to local filesystem.
* Used for BO report delivery to Rec Fusion customers.
* BO -> SFTP [project documentation](
* Tested with [Node.js v8 LTS](
* Tested with [Node.js v12 LTS](
## Install and unit test
First, install Node.js runtime ([Linux download](, [Windows download](, [SHAsums](
First, install the [Node.js runtime](
Next, clone this repository, enter its top-level directory, and install the required NPM modules:
cd recfu-mover
npm install
npm test
npm audit
Next, copy the example configuration:
......@@ -32,11 +32,11 @@ cp ./site-config/client.json.EXAMPLE ./site-config/client.json
From this application's top-level directory, run the app using:
node app.js
npm run download
For scheduled runs of this application (through cron or Windows' Scheduled Tasks) it may be useful to redirect program output to a log file for later review, e.g.:
node app.js >> /path/to/recfu-mover.log 2>&1
npm run download >> /path/to/recfu-mover.log 2>&1
......@@ -44,6 +44,8 @@ function downloadFile(sshOpt, remoteFile, localFile, callback) {
sftp.unlink(remoteFile, (err) => {
if (err) {
// Don't blow up if we cannot delete the file on the remote
// system, but give a warning about it.
console.error('Problem removing remote file');
return callback(null, 'Downloaded to ' + localFile);
"name": "recfu-mover",
"version": "1.0.0",
"version": "1.0.1",
"main": "app.js",
"dependencies": {
"eslint": "^5.7.0",
"eslint": "^6.8.0",
"eslint-config-strongloop": "^2.1.0",
"mocha": "^5.2.0",
"mocha": "^7.0.1",
"rewire": "^4.0.1",
"ssh2": "^0.6.1"
"ssh2": "^0.8.7"
"devDependencies": {},
"scripts": {
"pretest": "eslint --ignore-path .eslintignore .",
"test": "mocha"
"test": "mocha",
"download": "npm test && node app.js"
"author": "whatitis",
"license": "MIT",
"description": "Move files from IQ SFTP server to Rec Sports Windows share",
"repository": {
"type": "git",
"url": ""
"url": ""
......@@ -32,12 +32,14 @@ describe('Filesystem & JSON parsing integration', function() {
it('should return an object', function() {
o = readSftpOptions(configs[i]);
describe('Check names', function() {
it('should contain known properties', function() {
it('should contain an SSH setting property', function() {
assert.equal(o.hasOwnProperty('sshSettings'), true);
it('should contain host/username properties', function() {
assert.equal(o.sshSettings.hasOwnProperty('host'), true);
assert.equal(o.sshSettings.hasOwnProperty('username'), true);
it('should contain local/remote file properties', function() {
assert.equal(o.hasOwnProperty('localFile'), true);
assert.equal(o.hasOwnProperty('remoteFile'), true);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment