Merge pull request #7568 from nightscout/wip/bewest/PieterGit-dev20220815

Wip/bewest/pieter git dev20220815
This commit is contained in:
Ben West
2022-10-01 12:10:27 -07:00
committed by GitHub
10 changed files with 2815 additions and 5367 deletions
+12
View File
@@ -0,0 +1,12 @@
# Browsers we support
# See https://github.com/browserslist/browserslist for details
> 0.25%
ios_saf 9.3
ios_saf 10.3
ios_saf 13.7
ios_saf 14.8
not dead
not and_uc 12.12
not ie 11
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x]
mongodb-version: [4.2, 4.4]
steps:
+1 -1
View File
@@ -1 +1 @@
14.15.3
16.16.0
+20 -15
View File
@@ -1,5 +1,5 @@
Nightscout Web Monitor (a.k.a. cgm-remote-monitor)
======================================
==================================================
![nightscout horizontal](https://cloud.githubusercontent.com/assets/751143/8425633/93c94dc0-1ebc-11e5-99e7-71a8f464caac.png)
@@ -149,23 +149,28 @@ you're welcome to issue a documentation pull request with instructions on how to
## Recommended minimum browser versions for using Nightscout:
Older versions of the browsers might work, but are untested.
Our [browserslist](https://github.com/browserslist/browserslist) policy is documented in `.browserlistrc`.
We currently support approximately [91%](https://browsersl.ist/?q=%3E+0.25%25%2C+ios_saf+9.3%2C+ios_saf+10.3%2C+ios_saf+13.7%2C+ios_saf+14.8%2C+not+dead%2C+not+and_uc+12.12%2C+not+ie+11%0A) of all browsers globally used. These include:
- Android 4
- iOS 6
- Chrome 35
- Edge 17
- Firefox 61
- Opera 12.1
- Safari 6 (macOS 10.7)
- Internet Explorer: not supported
- Android Chrome: 104 or later (`and_chr`)
- Google Chrome: 101 or later (`chrome`)
- Microsoft Edge: 103 or later (`edge`)
- Mozilla Firefox: 102 or later (`firefox`)
- Apple Safari on iOS: 15.5 or later (`ios_saf`)
- Opera Mini on Android: 63 or later (`op_mini`)
- Opera: 88 or later (`opera`)
- Apple Safari for macOS 10.15 Catalina or later: : 15.5 or later (`safari`)
- Samsung Internet on Android: 17.0 or later (`samsung`)
- Internet Explorer 11 : not supported
Some features may not work with devices/browsers on the older end of these requirements.
Older versions or other browsers might work, but are untested and unsupported. We'll try to to keep Nightscout compatible with older iPads (e.g. Safari on iOS 10.3.4), but note that those devices are not supported by Apple anymore and have known security issues. Debugging these old devices gets harder due to Apple not supporting debugging the old devices on Macs that have been updated. Some features may not work with devices/browsers on the older end of these requirements.
## Windows installation software requirements:
- [Node.js](http://nodejs.org/) Latest Node 12 LTS. Node versions that do not have the latest security patches will not work. Use [Install instructions for Node](https://nodejs.org/en/download/package-manager/) or use `bin/setup.sh`)
- [MongoDB](https://www.mongodb.com/download-center?jmp=nav#community) 3.x or later. MongoDB 2.4 is only supported for Raspberry Pi.
## Installation software requirements:
- [Node.js](http://nodejs.org/) Latest Node v14 or v16 LTS. Node versions that do not have the latest security patches will not be supported. Use [Install instructions for Node](https://nodejs.org/en/download/package-manager/) or use `bin/setup.sh`)
- [MongoDB](https://www.mongodb.com/download-center?jmp=nav#community) 4.2 or 4.4.
As a non-root user clone this repo then install dependencies into the root of the project:
@@ -184,7 +189,7 @@ $ npm install
- If deploying the software to Microsoft Azure, you must set ** in the app settings for *WEBSITE_NODE_DEFAULT_VERSION* and *SCM_COMMAND_IDLE_TIMEOUT* **before** you deploy the latest Nightscout or the site deployment will likely fail. Other hosting environments do not require this setting. Additionally, if using the Azure free hosting tier, the installation might fail due to resource constraints imposed by Azure on the free hosting. Please set the following settings to the environment in Azure:
```
WEBSITE_NODE_DEFAULT_VERSION=10.15.2
WEBSITE_NODE_DEFAULT_VERSION=16.16.0
SCM_COMMAND_IDLE_TIMEOUT=300
```
- See [install MongoDB, Node.js, and Nightscouton a single Windows system](https://github.com/jaylagorio/Nightscout-on-Windows-Server). if you want to host your Nightscout outside of the cloud. Although the instructions are intended for Windows Server the procedure is compatible with client versions of Windows such as Windows 7 and Windows 10.
+1 -1
View File
@@ -218,7 +218,7 @@
},
"WEBSITE_NODE_DEFAULT_VERSION": {
"type": "string",
"defaultValue": "8.11.1"
"defaultValue": "16.16.0"
}
},
"resources": [{
+1 -1
View File
@@ -85,7 +85,7 @@ hashauth.init = function init (client, $) {
client.browserUtils.reload();
}
// clear eveything just in case
// clear everything just in case
hashauth.apisecret = null;
hashauth.apisecrethash = null;
hashauth.authenticated = false;
+5 -4
View File
@@ -23,7 +23,8 @@ function boot (env, language) {
//////////////////////////////////////////////////
// Check Node version.
// Latest Node 10 to 14 LTS are recommended and supported.
// Latest Node LTS releases are recommended and supported.
// Current Node releases MAY work, but are not recommended. Will be tested in CI
// Older Node versions or Node versions with known security issues will not work.
///////////////////////////////////////////////////
function checkNodeVersion (ctx, next) {
@@ -35,9 +36,9 @@ function boot (env, language) {
const isLTS = process.release.lts ? true : false;
if (isLTS && (semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0') || semver.satisfies(nodeVersion, '^12.0.0') || semver.satisfies(nodeVersion, '^10.0.0'))) {
//Latest Node 10 LTS and Node 12 LTS are recommended and supported.
//Require at least Node 8 LTS and Node 10 LTS without known security issues
if (isLTS && (semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) {
//Latest Node 14 LTS and Node 16 LTS are recommended and supported.
//Require at least Node 14 without known security issues
console.debug('Node LTS version ' + nodeVersion + ' is supported');
next();
return;
+2755 -5323
View File
File diff suppressed because it is too large Load Diff
+18 -20
View File
@@ -1,6 +1,6 @@
{
"name": "nightscout",
"version": "14.2.7",
"version": "15.0.0",
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
"license": "AGPL-3.0",
"author": "Nightscout Team",
@@ -65,16 +65,16 @@
}
},
"engines": {
"node": "^16.x || ^14.x || ^12.x"
"node": "^16.x || ^14.x"
},
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.12.11",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"acorn": "^8.0.5",
"acorn-jsx": "^5.3.1",
"apn": "^2.2.0",
"async": "^0.9.2",
"babel-loader": "^8.1.0",
"babel-loader": "^8.2.5",
"base64url": "^3.0.1",
"body-parser": "^1.19.0",
"bootevent": "0.0.1",
@@ -88,7 +88,7 @@
"d3": "^5.16.0",
"dompurify": "^2.2.6",
"easyxml": "^2.0.1",
"ejs": "^2.7.4",
"ejs": "^3.1.8",
"errorhandler": "^1.5.1",
"event-stream": "3.3.4",
"expose-loader": "^2.0.0",
@@ -112,7 +112,7 @@
"moment": "^2.27.0",
"moment-locales-webpack-plugin": "^1.2.0",
"moment-timezone": "^0.5.31",
"moment-timezone-data-webpack-plugin": "^1.3.0",
"moment-timezone-data-webpack-plugin": "^1.5.0",
"mongo-url-parser": "^1.0.1",
"mongodb": "^3.6.0",
"mongomock": "^0.1.2",
@@ -130,33 +130,31 @@
"socket.io": "~2.4.0",
"stream-browserify": "^3.0.0",
"style-loader": "^0.23.1",
"swagger-ui-dist": "^3.32.1",
"swagger-ui-express": "^4.1.4",
"swagger-ui-dist": "^4.13.2",
"swagger-ui-express": "^4.5.0",
"traverse": "^0.6.6",
"uuid": "^3.4.0",
"webpack": "^5.20.2",
"webpack-cli": "^4.5.0"
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"devDependencies": {
"@types/tough-cookie": "^4.0.0",
"axios": "^0.21.1",
"babel-eslint": "^10.1.0",
"benv": "^3.3.0",
"codacy-coverage": "^3.4.0",
"csv-parse": "^4.12.0",
"env-cmd": "^10.1.0",
"eslint": "^7.19.0",
"eslint-plugin-security": "^1.4.0",
"eslint-webpack-plugin": "^2.4.3",
"mocha": "^8.1.1",
"nodemon": "^1.19.4",
"eslint-webpack-plugin": "^2.7.0",
"mocha": "^8.4.0",
"nodemon": "^2.0.19",
"nyc": "^14.1.1",
"should": "^13.2.3",
"supertest": "^3.4.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-dev-middleware": "^4.1.0",
"webpack-hot-middleware": "^2.25.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-middleware": "^4.3.0",
"webpack-hot-middleware": "^2.25.2",
"xml2js": "^0.4.23"
},
"browserslist": "> 0.25%, not dead, ios_saf 10"
}
}
+1 -1
View File
@@ -106,7 +106,7 @@ const rules = [
loader: 'file-loader',
options: {
outputPath: 'images'
//the images will be emmited to public/assets/images/ folder
//the images will be emitted to public/assets/images/ folder
//the images will be put in the DOM <style> tag as eg. background: url(assets/images/image.png);
},
exclude: /node_modules/