Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

EPIC-1285 latest node modules and corresponding changes #302

Merged
merged 1 commit into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"font-sizes": false,
"important": false,
"known-properties": false,
"order-alphabetical":false,
"overqualified-elements": false,
"qualified-headings": false,
"regex-selectors": false,
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ESM",
"name": "esm",
"version": "0.4.1",
"description": "EAO Project Space",
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ module.exports.initMiddleware = function (app) {
// Add multipart handling middleware
var uploaddir = process.env.UPLOAD_PATH || './uploads/';
if (uploaddir.substr(-1, 1) !== '/') uploaddir += '/';
// app.use requires a middleware function
app.use(multer({
dest: uploaddir,
inMemory: false
}));
}).any());
};

/**
Expand Down Expand Up @@ -167,9 +168,9 @@ module.exports.initModulesConfiguration = function (app, db) {
module.exports.initHelmetHeaders = function (app) {
// Use helmet to secure Express headers
var SIX_MONTHS = 15778476000;
app.use(helmet.xframe());
app.use(helmet.frameguard());
app.use(helmet.xssFilter());
app.use(helmet.nosniff());
app.use(helmet.noSniff());
app.use(helmet.hsts({
maxAge: SIX_MONTHS,
includeSubdomains: true,
Expand Down
3 changes: 2 additions & 1 deletion config/lib/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ var config = require('../config'),
chalk = require('chalk'),
path = require('path'),
mongoose = require('mongoose');

// mongoose's promise library is deprecated, make use of the native promises instead
mongoose.Promise = Promise;
// Load the mongoose models
module.exports.loadModels = function () {
// Globbing model files
Expand Down
1 change: 1 addition & 0 deletions modules/codelists/client/services/codelist.services.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// jshint latedef: false
'use strict';

angular.module('core')
Expand Down
11 changes: 6 additions & 5 deletions modules/documents/client/services/documents.upload.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ angular.module('documents')

var inProgressFiles = [];

var setAllowedActions = function(service) {
service.actions.allowStart = (service.counts.total > 0 && !service.actions.busy && !service.actions.started) && (service.counts.uploading === 0, service.counts.failed === 0 && service.counts.cancelled === 0 && service.counts.uploaded === 0); // can't upload until last batch cleared...
service.actions.allowStop = (service.counts.total > 0 && service.actions.busy && service.actions.started);
service.actions.allowReset = (service.counts.total > 0 && !service.actions.busy && !service.actions.started); // clear ok when not uploading and we have files to remove
};

var initialize = function(service) {
if (service.actions.busy) {
Expand Down Expand Up @@ -39,11 +44,7 @@ angular.module('documents')
}
};

var setAllowedActions = function(service) {
service.actions.allowStart = (service.counts.total > 0 && !service.actions.busy && !service.actions.started) && (service.counts.uploading === 0, service.counts.failed === 0 && service.counts.cancelled === 0 && service.counts.uploaded === 0); // can't upload until last batch cleared...
service.actions.allowStop = (service.counts.total > 0 && service.actions.busy && service.actions.started);
service.actions.allowReset = (service.counts.total > 0 && !service.actions.busy && !service.actions.started); // clear ok when not uploading and we have files to remove
};


var addSingleFile = function(service, f) {
if (service.actions.busy) {
Expand Down
38 changes: 17 additions & 21 deletions modules/utils/client/visualizations/utils.client.visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ function directiveProgressCircle(d3, $window, _) {
template: '<svg class="d3-progress-circle"></svg>',
link: function (scope, element, attrs) {

scope.$watch('percentage', function(newValue) {
if(newValue !== undefined) {
drawProgressPie (angular.element(element), 'arcs', {}, [
[newValue, "#5cb85c"],
[(100 - newValue), "#c0c0c0"]
]
);
resize();
}
});


// -----------------------------------------------------------------------------------
//
// D3: PIE Code
Expand Down Expand Up @@ -142,21 +130,29 @@ function directiveProgressCircle(d3, $window, _) {
//
// -----------------------------------------------------------------------------------

var bw;

var bw;
var resize = function() {
bw = angular.element(element)[0].parentNode.clientWidth-30;

var chart = angular.element(element)[0];
bw = angular.element(element)[0].parentNode.clientWidth-30;

chart.setAttribute("width", bw);
chart.setAttribute("height", bw);
};

d3.select(window).on('resize', resize);
var chart = angular.element(element)[0];

chart.setAttribute("width", bw);
chart.setAttribute("height", bw);
};

scope.$watch('percentage', function(newValue) {
if(newValue !== undefined) {
drawProgressPie (angular.element(element), 'arcs', {}, [
[newValue, "#5cb85c"],
[(100 - newValue), "#c0c0c0"]
]
);
resize();
}
});

d3.select(window).on('resize', resize);
}
};
return directive;
Expand Down
125 changes: 62 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,81 +19,80 @@
"postinstall": "git config --global url.https://.insteadOf git:// && bower install --config.interactive=false --allow-root && grunt buildprod"
},
"dependencies": {
"acl": "~0.4.4",
"async": "^1.3.0",
"body-parser": "^1.13.1",
"bower": "^1.4.1",
"cfenv": "~1.0.0",
"chalk": "^1.1.0",
"cheerio": "~0.19.0",
"compression": "^1.5.0",
"acl": "~0.4.11",
"async": "^2.6.0",
"body-parser": "^1.18.2",
"bower": "^1.8.2",
"cfenv": "~1.0.4",
"chalk": "^2.3.0",
"cheerio": "~1.0.0-rc.2",
"compression": "^1.7.1",
"connect-flash": "~0.1.1",
"connect-mongo": "~0.8.1",
"consolidate": "~0.13.1",
"cookie-parser": "^1.3.2",
"crypto": "0.0.3",
"csv-parse": "1.0.2",
"express": "^4.13.1",
"express-session": "^1.11.3",
"forever": "~0.14.2",
"glob": "^5.0.13",
"grunt": "0.4.5",
"grunt-cli": "~0.1.13",
"helmet": "~0.9.1",
"jasmine-core": "^2.3.4",
"lodash": "^4.0.0",
"method-override": "^2.3.3",
"mocha": "~1.20.0",
"mongodb": "~2.0",
"mongodb-core": "~1.0",
"mongoose": "4.6.6",
"morgan": "^1.6.1",
"multer": "0.1.8",
"node-pre-gyp": "0.6.4",
"nodemailer": "^2.3.2",
"passport": "~0.2.2",
"passport-github": "~0.1.5",
"connect-mongo": "~2.0.0",
"consolidate": "~0.15.0",
"cookie-parser": "^1.4.3",
"csv-parse": "2.0.0",
"express": "^4.16.2",
"express-session": "^1.15.6",
"forever": "~0.15.3",
"glob": "^7.1.2",
"grunt": "1.0.1",
"grunt-cli": "~1.2.0",
"helmet": "~3.9.0",
"jasmine-core": "^2.8.0",
"lodash": "^4.17.4",
"method-override": "^2.3.10",
"mocha": "~4.0.1",
"mongodb": "~2.2.33",
"mongodb-core": "~2.1.7",
"mongoose": "4.10.8",
"morgan": "^1.9.0",
"multer": "1.3.0",
"node-pre-gyp": "0.6.39",
"nodemailer": "^4.4.0",
"passport": "~0.4.0",
"passport-github": "~1.1.0",
"passport-local": "^1.0.0",
"passport-unique-token": "^0.1.4",
"promise": "^7.1.1",
"promise": "^8.0.1",
"rss": "^1.2.1",
"serve-favicon": "^2.3.0",
"socket.io": "^1.3.5",
"serve-favicon": "^2.4.5",
"socket.io": "^2.0.4",
"spooky": "~0.2.5",
"swig": "^1.4.2",
"tiny-jsonrpc": "~0.2.1",
"tiny-jsonrpc": "~2.0.1",
"tree-model": "^1.0.6",
"uid-safe": "2.0.0",
"validator": "^3.41.2"
"uid-safe": "2.1.5",
"validator": "^9.1.1"
},
"devDependencies": {
"coveralls": "^2.11.4",
"coveralls": "^3.0.0",
"grunt-concurrent": "^2.3.1",
"grunt-contrib-copy": "~0.8.0",
"grunt-contrib-csslint": "~0.4.0",
"grunt-contrib-cssmin": "~0.12.3",
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-uglify": "~0.9.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-csslint": "~2.0.0",
"grunt-contrib-cssmin": "~2.2.1",
"grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-less": "^1.4.1",
"grunt-contrib-uglify": "~3.1.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-env": "~0.4.4",
"grunt-karma": "~0.11.2",
"grunt-mocha-istanbul": "^2.4.0",
"grunt-mocha-test": "~0.12.7",
"grunt-ng-annotate": "^1.0.1",
"grunt-karma": "~2.0.0",
"grunt-mocha-istanbul": "5.0.2",
"grunt-mocha-test": "~0.13.3",
"grunt-ng-annotate": "^3.0.0",
"grunt-ng-constant": "^2.0.1",
"grunt-node-inspector": ">=0.2.0",
"grunt-protractor-runner": "^2.0.0",
"grunt-sass": "^1.2.0",
"karma": "~0.12.37",
"karma-chrome-launcher": "~0.2.0",
"karma-coverage": "~0.4.2",
"karma-firefox-launcher": "~0.1.6",
"karma-jasmine": "~0.3.6",
"karma-ng-html2js-preprocessor": "^0.1.2",
"load-grunt-tasks": "^3.2.0",
"run-sequence": "^1.1.1",
"should": "^7.0.1",
"supertest": "^1.0.1"
"grunt-protractor-runner": "^5.0.0",
"grunt-sass": "^2.0.0",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage": "~1.1.1",
"karma-firefox-launcher": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-ng-html2js-preprocessor": "^1.0.0",
"load-grunt-tasks": "^3.5.2",
"run-sequence": "^2.2.0",
"should": "^13.1.3",
"supertest": "^3.0.0"
}
}
2 changes: 2 additions & 0 deletions scripts/reset-password.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var nodemailer = require('nodemailer'),
mongoose = require('mongoose'),
chalk = require('chalk'),
Expand Down