Compare commits

...

7 Commits
3.0.1 ... 3.2.0

Author SHA1 Message Date
Jose Bolos
ff8142b4e4 Version 3.2.0 (#270) 2020-10-05 17:35:43 +01:00
Jose Bolos
2f7e8ae451 Update dependencies (#269) 2020-10-05 17:04:12 +01:00
Sam Clulow
a2cc2c7942 Replace Chalk with Kleur (#264)
- Remove Chalk
- Add Kleur
- Update index.js
- Update copyright in README

Fixes #256
2020-06-29 16:27:44 +01:00
Jose Bolos
59f657b422 Update all devdependencies to the latest versions (#258) 2020-04-28 12:33:36 +01:00
Jose Bolos
ea3183791c Version 3.1.0 (#246)
* Version 3.1.0

Also minor bump to pa11y-webservice

* Bump webservice so it includes data fixtures
2019-09-27 11:44:24 +01:00
Jose Bolos
102a237d2e Bump webservice version and other deps (#245) 2019-09-20 15:59:21 +01:00
Jose Bolos
7c77467dcf Fix incorrect values being passed to ObjectID (#244)
Due to the routes being defined in the wrong order, certain urls (e.g. `/tasks/:taskid:/edit`) are being captured by the results route instead (e.g. `/tasks/:taskid:/:resultid:`). This is causing the wrong method to being called with parts of the path like `edit`, `run`, etc. being passed as an argument to ObjectID(). As these are not valid MongoDB IDs, the method displays instead an error message:

> Argument passed in must be a single String of 12 bytes or a string of 24 hex characters

Also change the path to the favicon image to be not relative, as this is causing a `favicon.png` string to be sent as an argument to ObjectID() when visiting certain pages due to the previous issue.
2019-09-20 14:57:15 +01:00
6 changed files with 196 additions and 183 deletions

View File

@@ -1,6 +1,18 @@
# Changelog
## 3.2.0 (2020-10-05)
* Update pa11y to version 5.3.0, which means better compatibility with sites using AMD modules
* Update pa11y-webservice to version 3.2.0, which adds the ability to configure the number of workers running pa11y tests
* Update several dependencies
* Replace chalk with kleur
## 3.1.0 (2019-09-27)
* Display the task ID before each line of output, so it's clear to which task a line of output belongs to when they run in parallel.
* Bump pa11y-webservice version, which fixes an issue with some pages failing to run.
* Fix incorrect routes passing an invalid value to Mongo's ObjectID.
## 3.0.0 (2019-07-16)
* Update pa11y to v5, which replaces Phantomjs with Headless Chrome

View File

@@ -139,7 +139,7 @@ If you're opening issues related to these, please mention the version that the i
## License
Pa11y Dashboard is licensed under the [GNU General Public License 3.0][info-license].<br/>
Copyright &copy; 20132019, Team Pa11y and contributors
Copyright &copy; 20132020, Team Pa11y and contributors
[gpl]: http://www.gnu.org/licenses/gpl-3.0.html
[mongo]: http://www.mongodb.org/

3
app.js
View File

@@ -93,7 +93,6 @@ function initApp(config, callback) {
// Load routes
require('./route/index')(app);
require('./route/task/index')(app);
require('./route/result/index')(app);
require('./route/result/download')(app);
if (!config.readonly) {
require('./route/new')(app);
@@ -103,6 +102,8 @@ function initApp(config, callback) {
require('./route/task/ignore')(app);
require('./route/task/unignore')(app);
}
// Needs to be loaded after `/route/task/edit`
require('./route/result/index')(app);
// Error handling
app.express.get('*', (request, response) => {

View File

@@ -14,7 +14,7 @@
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
const chalk = require('chalk');
const kleur = require('kleur');
const config = require('./config');
process.on('SIGINT', () => {
@@ -29,16 +29,16 @@ require('./app')(config, (error, app) => {
}
console.log('');
console.log(chalk.underline.magenta('Pa11y Dashboard started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), app.address);
console.log(kleur.underline().magenta('Pa11y Dashboard started'));
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
console.log(kleur.grey('uri: %s'), app.address);
app.on('route-error', error => {
const stack = (error.stack ? error.stack.split('\n') : [error.message]);
const msg = chalk.red(stack.shift());
const msg = kleur.red(stack.shift());
console.error('');
console.error(msg);
console.error(chalk.grey(stack.join('\n')));
console.error(kleur.grey(stack.join('\n')));
});
// Start the webservice if required
@@ -50,11 +50,11 @@ require('./app')(config, (error, app) => {
}
console.log('');
console.log(chalk.underline.cyan('Pa11y Webservice started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
console.log(chalk.grey('database: %s'), config.webservice.database);
console.log(chalk.grey('cron: %s'), config.webservice.cron);
console.log(kleur.underline().cyan('Pa11y Webservice started'));
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
console.log(kleur.grey('uri: %s'), webservice.server.info.uri);
console.log(kleur.grey('database: %s'), config.webservice.database);
console.log(kleur.grey('cron: %s'), config.webservice.cron);
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "pa11y-dashboard",
"version": "3.0.0",
"version": "3.2.0",
"private": true,
"description": "Pa11y Dashboard is a visual web interface to the Pa11y accessibility reporter",
"keywords": [
@@ -26,26 +26,26 @@
},
"dependencies": {
"body-parser": "~1.19.0",
"chalk": "~2.4.2",
"compression": "~1.7.4",
"express-hbs": "~2.1.2",
"express": "~4.17.1",
"express-hbs": "~2.1.2",
"http-headers": "~3.0.2",
"moment": "~2.24.0",
"kleur": "~4.1.2",
"moment": "~2.29.0",
"pa11y-webservice": "~3.2.0",
"pa11y-webservice-client-node": "~2.0.0",
"pa11y-webservice": "~3.0.1",
"underscore": "~1.9.1"
"underscore": "~1.11.0"
},
"devDependencies": {
"bower": "^1.8.8",
"cheerio": "^1.0.0-rc.3",
"eslint": "^6.0.1",
"less": "^3.9.0",
"mocha": "^6.1.4",
"eslint": "^6.8.0",
"less": "^3.11.1",
"mocha": "^7.2.0",
"pa11y-lint-config": "^1.2.1",
"proclaim": "^3.6.0",
"request": "^2.88.0",
"uglify-js": "^3.6.0"
"request": "^2.88.2",
"uglify-js": "^3.11.0"
},
"scripts": {
"start": "node index.js",

View File

@@ -27,7 +27,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#if noindex}}<meta name="robots" content="noindex"/>{{/if}}
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="icon" type="image/png" href="/favicon.png" />
<!-- For mobile devices. -->
<meta name="viewport" content="width=device-width"/>