Merge remote-tracking branch 'origin/master' into accounts

This commit is contained in:
Karol Wypchlo 2021-02-01 17:37:00 +01:00
commit 38ac0c7c8f
3 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,5 @@
const { getYesterdayISOString } = require("./utils");
require("yargs/yargs")(process.argv.slice(2)).command( require("yargs/yargs")(process.argv.slice(2)).command(
"$0 <type>", "$0 <type>",
"Skynet portal health checks", "Skynet portal health checks",
@ -31,7 +33,10 @@ require("yargs/yargs")(process.argv.slice(2)).command(
checks: await Promise.all(checks.map((check) => new Promise(check))), checks: await Promise.all(checks.map((check) => new Promise(check))),
}; };
// read before writing to make sure no external changes are overwritten db.read() // read before writing to make sure no external changes are overwritten
db.read().get(type).push(entry).write(); .get(type) // get the list of records of given type
.push(entry) // insert new record
.remove(({ date }) => date < getYesterdayISOString()) // drop old records
.write();
} }
).argv; ).argv;

View File

@ -11,7 +11,7 @@
"gatsby": "2.31.1", "gatsby": "2.31.1",
"gatsby-image": "2.10.0", "gatsby-image": "2.10.0",
"gatsby-plugin-manifest": "2.11.0", "gatsby-plugin-manifest": "2.11.0",
"gatsby-plugin-matomo": "0.8.3", "gatsby-plugin-matomo": "0.9.0",
"gatsby-plugin-react-helmet": "3.9.0", "gatsby-plugin-react-helmet": "3.9.0",
"gatsby-plugin-remove-serviceworker": "1.0.0", "gatsby-plugin-remove-serviceworker": "1.0.0",
"gatsby-plugin-robots-txt": "1.5.5", "gatsby-plugin-robots-txt": "1.5.5",
@ -37,7 +37,7 @@
"devDependencies": { "devDependencies": {
"cypress": "6.3.0", "cypress": "6.3.0",
"cypress-file-upload": "5.0.2", "cypress-file-upload": "5.0.2",
"eslint": "7.18.0", "eslint": "7.19.0",
"eslint-config-prettier": "7.2.0", "eslint-config-prettier": "7.2.0",
"eslint-plugin-cypress": "2.11.2", "eslint-plugin-cypress": "2.11.2",
"eslint-plugin-react": "7.22.0", "eslint-plugin-react": "7.22.0",

View File

@ -10,7 +10,7 @@ source /home/user/.bashrc
# Add SSH keys and set SSH configs # Add SSH keys and set SSH configs
sudo cp /home/user/skynet-webportal/setup-scripts/support/ssh_config /etc/ssh/ssh_config sudo cp /home/user/skynet-webportal/setup-scripts/support/ssh_config /etc/ssh/ssh_config
mkdir -p /home/user/.ssh mkdir -p /home/user/.ssh
cat /home/user/skynet-webportal/setup-scripts/support/authorized_keys >> /home/user/.ssh/authorized_keys # cat /home/user/skynet-webportal/setup-scripts/support/authorized_keys >> /home/user/.ssh/authorized_keys
# Install apt packages # Install apt packages
sudo apt-get update sudo apt-get update