Skip to content
Permalink
Browse files

Upgrading deps

  • Loading branch information...
andrewshell committed Jul 2, 2019
1 parent 557635d commit 96977afe3a4b9cf67aad963224f7ed44cbc4d06f
@@ -0,0 +1,2 @@
DOMAIN=localhost
PORT=5337
@@ -0,0 +1,7 @@
{
"extends": "crockford",
"env": {
"node": true,
"es6": true
}
}
@@ -1,7 +1,9 @@
.DS_Store
.env
.node-version
.nyc_output/
coverage/
/data/
node_modules/
package-lock.json
Procfile
2 app.js
@@ -1,6 +1,8 @@
(function () {
"use strict";

require('dotenv').config();

var app,
cors = require('cors'),
express = require('express'),
@@ -2,16 +2,16 @@
"use strict";

var express = require('express'),
router = express.Router();
router = new express.Router();

router.get('/', function (req, res) {
switch (req.accepts('html')) {
case 'html':
res.render('home');
break;
default:
res.status(406).send('Not Acceptable');
break;
case 'html':
res.render('home');
break;
default:
res.status(406).send('Not Acceptable');
break;
}
});

@@ -2,7 +2,7 @@
"use strict";

var express = require('express'),
router = express.Router();
router = new express.Router();

router.use('/', require('./home'));
router.use('/pleaseNotify', require('./please-notify'));
@@ -2,16 +2,16 @@
"use strict";

var express = require('express'),
router = express.Router();
router = new express.Router();

router.get('/', function (req, res) {
switch (req.accepts('html')) {
case 'html':
res.render('ping-form');
break;
default:
res.status(406).send('Not Acceptable');
break;
case 'html':
res.render('ping-form');
break;
default:
res.status(406).send('Not Acceptable');
break;
}
});

@@ -8,26 +8,26 @@
parsePingParams = require('../services/parse-ping-params'),
ping = require('../services/ping'),
restReturnSuccess = require('../services/rest-return-success'),
router = express.Router(),
router = new express.Router(),
syncStruct = require('../services/sync-struct'),
urlencodedParser = bodyParser.urlencoded({ extended: false });

function processResponse(req, res, result) {
switch (req.accepts('xml', 'json')) {
case 'xml':
res.set('Content-Type', 'text/xml');
res.send(restReturnSuccess(
result.success,
result.msg,
'result'
));
break;
case 'json':
res.json(result);
break;
default:
res.status(406).send('Not Acceptable');
break;
case 'xml':
res.set('Content-Type', 'text/xml');
res.send(restReturnSuccess(
result.success,
result.msg,
'result'
));
break;
case 'json':
res.json(result);
break;
default:
res.status(406).send('Not Acceptable');
break;
}
}

@@ -8,26 +8,26 @@
parseNotifyParams = require('../services/parse-notify-params'),
pleaseNotify = require('../services/please-notify'),
restReturnSuccess = require('../services/rest-return-success'),
router = express.Router(),
router = new express.Router(),
syncStruct = require('../services/sync-struct'),
urlencodedParser = bodyParser.urlencoded({ extended: false });

function processResponse(req, res, result) {
switch (req.accepts('xml', 'json')) {
case 'xml':
res.set('Content-Type', 'text/xml');
res.send(restReturnSuccess(
result.success,
result.msg,
'notifyResult'
));
break;
case 'json':
res.json(result);
break;
default:
res.status(406).send('Not Acceptable');
break;
case 'xml':
res.set('Content-Type', 'text/xml');
res.send(restReturnSuccess(
result.success,
result.msg,
'notifyResult'
));
break;
case 'json':
res.json(result);
break;
default:
res.status(406).send('Not Acceptable');
break;
}
}

@@ -6,7 +6,7 @@
errorResult = require('../services/error-result'),
express = require('express'),
logEmitter = require('../services/log-emitter'),
router = express.Router();
router = new express.Router();

function fetchVals(db, callback) {
var vals = {
@@ -25,16 +25,16 @@

function processResponse(req, res, vals) {
switch (req.accepts('html', 'json')) {
case 'html':
vals.wshost = res.app.locals.host + ':' + res.app.locals.port;
res.render('view-log', vals);
break;
case 'json':
res.json(vals.eventlog);
break;
default:
res.status(406).send('Not Acceptable');
break;
case 'html':
vals.wshost = res.app.locals.host + ':' + res.app.locals.port;
res.render('view-log', vals);
break;
case 'json':
res.json(vals.eventlog);
break;
default:
res.status(406).send('Not Acceptable');
break;
}
}

@@ -6,42 +6,47 @@
"scripts": {
"start": "node app.js --use_strict",
"jshint": "echo '=> linting' && jshint ./**/*.js",
"jscs": "echo '=> sniffing' && jscs -p crockford ./**/*.js",
"pretest": "npm run jshint -s && npm run jscs -s",
"test": "echo '=> testing' && istanbul cover _mocha -- --recursive -R spec -r should",
"posttest": "istanbul check-coverage"
"eslint": "echo '=> sniffing' && eslint controllers/ services/",
"pretest": "npm run jshint -s && npm run eslint -s",
"test": "echo '=> testing' && nyc mocha -- --recursive -R spec -r should",
"posttest": "nyc check-coverage"
},
"engines": {
"node": ">=10.6.0"
},
"author": "Andrew Shell <andrew@andrewshell.org>",
"license": "MIT",
"dependencies": {
"async": "^2.6.1",
"body-parser": "^1.18.3",
"console-stamp": "^0.2.7",
"cors": "^2.8.4",
"db-migrate": "^0.11.3",
"db-migrate-sqlite3": "^0.3.1",
"express": "^4.16.3",
"express-handlebars": "^3.0.0",
"async": "^3.1.0",
"body-parser": "^1.19.0",
"console-stamp": "^0.2.9",
"cors": "^2.8.5",
"db-migrate": "^0.11.6",
"db-migrate-sqlite3": "^0.4.0",
"dotenv": "^8.0.0",
"express": "^4.17.1",
"express-handlebars": "^3.1.0",
"express-ws": "^4.0.0",
"moment": "^2.22.2",
"moment": "^2.24.0",
"morgan": "^1.9.1",
"nconf": "^0.10.0",
"request": "^2.88.0",
"sprintf-js": "^1.1.1",
"sqlite3": "^4.0.2",
"xmlbuilder": "^10.0.0"
"sprintf-js": "^1.1.2",
"sqlite3": "^4.0.9",
"xmlbuilder": "^13.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/andrewshell/rsscloud-server.git"
},
"devDependencies": {
"istanbul": "^0.4.5",
"jscs": "^3.0.7",
"jshint": "^2.9.6",
"mocha": "^5.2.0",
"nock": "^9.6.1",
"eslint": "^6.0.1",
"eslint-config-crockford": "^2.0.0",
"jshint": "^2.10.2",
"mocha": "^6.1.4",
"nock": "^10.0.6",
"nyc": "^14.1.1",
"should": "^13.2.3",
"sinon": "^6.3.4"
"sinon": "^7.3.2"
}
}
@@ -23,9 +23,8 @@
var stmt = db.prepare(`
DELETE FROM log_events
WHERE time < ?
`);

var time = moment().subtract(1, 'day');
`),
time = moment().subtract(1, 'day');

console.log('Flushing old logs: ' + time.toISOString());

@@ -24,11 +24,11 @@
var apiurl;

switch (protocol) {
case 'http-post':
apiurl = scheme + '://';
break;
default:
return callback(sprintf(appMessages.error.subscription.invalidProtocol, protocol));
case 'http-post':
apiurl = scheme + '://';
break;
default:
return callback(sprintf(appMessages.error.subscription.invalidProtocol, protocol));
}

if (client.indexOf(':') > -1) {
@@ -0,0 +1 @@
{{{body}}}

0 comments on commit 96977af

Please sign in to comment.
You can’t perform that action at this time.