Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream sync #22

Merged
merged 189 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
dd0c7f0
Point readme to correct location of swagger.yaml
Jan 28, 2022
1a83292
Remove unused OTP field from Remote Override form.
gestrich Aug 14, 2022
a5fcc84
Merge branch 'dev' into bugfix/remove-remote-override-otp
bewest Aug 14, 2022
3213835
Merge branch 'dev' into bugfix/remove-remote-override-otp
bewest Aug 14, 2022
fb4d467
update Node requirements. This is a follow up from https://github.com…
PieterGit Aug 15, 2022
0a81915
drop Node 18 support for now
PieterGit Aug 15, 2022
652baed
update all webpack related plugins to latest version
PieterGit Aug 15, 2022
b7ee1bf
upgrade mocha to 8.4.0 and nodemon to 2.0.19 and recreate package-loc…
PieterGit Aug 16, 2022
4a64be2
remove two critical vulnerabilities in npm packages. Remove codacy-co…
PieterGit Aug 16, 2022
3c516d5
support > 0.25% of browerslist, see if we can support iOS 9.3.x as we…
PieterGit Aug 16, 2022
7b01d49
Experimenting around changing build artefact location to go to node_m…
sulkaharo Aug 28, 2022
37a2a0d
Try .cache in node_modules
sulkaharo Aug 29, 2022
a6eb156
Fix app.js
sulkaharo Aug 29, 2022
ec3cf94
* Fix tests
sulkaharo Aug 30, 2022
6c03dcd
Remove mkdir from package.json and change key generation to a post sc…
sulkaharo Aug 30, 2022
6978a90
Fix package running the post script
sulkaharo Aug 30, 2022
2e4551e
Merge branch 'dev' into new_cache_location
sulkaharo Aug 30, 2022
2e7f695
initialize new dev area post-release
bewest Sep 30, 2022
9f622c2
Merge branch 'dev20220815' of github.com:PieterGit/cgm-remote-monitor…
bewest Oct 1, 2022
64d93e6
allow any LTS version
bewest Oct 1, 2022
a8da747
Merge pull request #7568 from nightscout/wip/bewest/PieterGit-dev2022…
bewest Oct 1, 2022
aed9998
Merge branch 'dev' into new_cache_location
bewest Oct 1, 2022
8706658
Merge pull request #7526 from sulkaharo/new_cache_location
bewest Oct 1, 2022
2e1ee38
inject text instead of HTML name
bewest Oct 1, 2022
1db4047
avoid HTML injection
bewest Oct 1, 2022
74ce49c
Merge pull request #7569 from nightscout/wip/bewest/code-ql-analysis
bewest Oct 1, 2022
dbce9db
codeql text/html injection in food.js
bewest Oct 1, 2022
09c9f81
Merge pull request #7570 from nightscout/wip/bewest/code-ql-analysis
bewest Oct 1, 2022
0fd05c2
fix webpack 5 in Lerna
k2s Oct 29, 2022
e78a63f
fix formatting of empty spaces
k2s Oct 29, 2022
ed7fdf7
fix don't print error about IMPORT_CONFIG if not defined
k2s Oct 29, 2022
2c6ba28
Merge pull request #7647 from k2s/fix-empty-import-config
bewest Nov 1, 2022
bcfe437
Merge branch 'dev' into bugfix/remove-remote-override-otp
bewest Nov 16, 2022
efc994b
remove Heroku deploy button from readme
bewest Nov 16, 2022
4aa0657
Merge pull request #7513 from gestrich/bugfix/remove-remote-override-otp
bewest Nov 16, 2022
8594a2d
Regenerated package-lock with newer NPM and fixed a unit test that br…
sulkaharo Dec 30, 2022
bd40046
Change the SHA1 validation to be case insensitive (#7780)
sulkaharo Dec 30, 2022
79e80c5
New Crowdin updates (#7238)
sulkaharo Dec 30, 2022
ad7706d
Merge branch 'master' into dev
sulkaharo Jan 1, 2023
6834822
Update package-lock so it matches the package.json
sulkaharo Jan 1, 2023
6ad4ef1
Update socket.io and uuid packages (#7793)
sulkaharo Jan 1, 2023
ba76940
Fix Server error (#7784)
Joerg-Schoemer Jan 1, 2023
2dfc471
Forwarded fix (#7593)
dnicolaas Jan 1, 2023
e1f75cb
Change viewport scale to fix layout on iPhone (#7623)
sulkaharo Jan 1, 2023
3a06295
Refactor moment to be loaded from ctx (#7331)
sulkaharo Jan 1, 2023
8e59864
Adding USE_NPM_INSTALL to the Heroku deploy file so new deploys work
sulkaharo Jan 5, 2023
6bccede
Change automated tests to run against the major Mongo releases from l…
sulkaharo Jan 5, 2023
30216aa
Update codeQL actions to v2
sulkaharo Jan 5, 2023
3636f37
Update actions/checkout action to v3
sulkaharo Jan 5, 2023
bdcb706
Generate package-lock with npm 6 to fix deployment issues on various …
sulkaharo Jan 6, 2023
c1de8a5
Disabling some date magic from Careportal that's breaking date entry
sulkaharo Jan 9, 2023
fd701e9
Fixes a bug introduced in #7273 (#7825)
sulkaharo Jan 12, 2023
a6ad678
add a note on OBSCURED and OBSCURE_DEVICE_PROVENANCE
bewest Jan 12, 2023
bc8ccc8
Merge master to dev so Git is in sync (#7834)
sulkaharo Jan 15, 2023
c343719
apiv3 fix patch operation (#7807)
MilosKozak Jan 17, 2023
05de94e
Delete v3 api identifiers when cloning a record in profile editor (#7…
sulkaharo Jan 23, 2023
26a8cf1
Downgrade jsdom to version 11.11.0 (#7851)
sulkaharo Jan 24, 2023
0426b01
Fix api v3 users seeing gaps in CGM data (#7853)
sulkaharo Jan 24, 2023
0541e2a
daytoday reports are always in the profile's time zone
bewest Jan 15, 2023
a47b367
pin start of day in profile's timezone
bewest Jan 15, 2023
0330e13
ensure timezones assigned once in daily reports
bewest Jan 23, 2023
8983713
ensure daily reports dates translate to profile timezone
bewest Jan 23, 2023
f51fac9
clock at the end of the day is 23:59:59.999
bewest Jan 23, 2023
28e75a6
Possibly fix Loop time zones not being recognised in profile editor a…
sulkaharo Jan 24, 2023
6a543c8
Merge branch 'dev' into wip/bewest/daytoday-redo-03
sulkaharo Jan 24, 2023
250b808
New Crowdin updates (#7808)
sulkaharo Jan 24, 2023
0ee0712
redact console log lines
bewest Jan 24, 2023
8e0ec88
Merge branch 'wip/bewest/daytoday-redo-03' of github.com:nightscout/c…
bewest Jan 24, 2023
a4f9271
Revert "clock at the end of the day is 23:59:59.999"
bewest Jan 26, 2023
f6b2d4f
Revert "Revert "clock at the end of the day is 23:59:59.999""
bewest Jan 26, 2023
10dd236
daytoday: Align start of day with data across zones
bewest Jan 26, 2023
b376239
Merge branch 'dev' into wip/bewest/daytoday-redo-03
bewest Jan 26, 2023
d185cf6
Update Mongo URL parser to 1.0.2 to fix issues Scott H found (#7606)
sulkaharo Jan 27, 2023
3b7528a
minimum attempt to protect /api/v2/ endpoints (#7554)
bewest Jan 27, 2023
5d3268a
Merge branch 'dev' into wip/bewest/daytoday-redo-03
bewest Jan 27, 2023
48d1ae3
tweak tests/logging
bewest Jan 27, 2023
664efe6
Merge branch 'wip/bewest/daytoday-redo-03' of github.com:nightscout/c…
bewest Jan 27, 2023
a805939
fix test with fixtures both ways
bewest Jan 27, 2023
903669a
Merge pull request #7857 from nightscout/wip/bewest/daytoday-redo-03
bewest Jan 28, 2023
adc70b7
Add logging limits to all services (mongo, nightscout and traefik) (#…
bjornoleh Feb 9, 2023
2795892
Add event type to event on treatment notify if it's missing (#7888)
sulkaharo Feb 13, 2023
d1fe8f5
Fixed pushover callbacks not being processed (#7876)
yodax Feb 18, 2023
0f69153
Added charging state to the uploader battery pill when it's provided …
yodax Feb 18, 2023
4e1f364
Fix loading JWT when auth subject has no permissions (#7894)
sulkaharo Feb 18, 2023
89d7eb6
Alarm sockets for api v3 (#7858)
MilosKozak Feb 18, 2023
ac1a7d1
Api3 remove auth token (#6863)
PetrOndrusek Feb 18, 2023
93df3c4
cheat for tests across different time zones
bewest Feb 21, 2023
97a4ee7
Merge pull request #7905 from nightscout/wip/bewest/fix-timezone-test
bewest Feb 21, 2023
32b2376
Fixes #7910
sulkaharo Feb 25, 2023
d7f4432
* Add a unit test to check the /entries endpoint returns values in co…
sulkaharo Feb 25, 2023
a4d07cd
Merge pull request #7911 from nightscout/wip/sulka/fix_entries_api
bewest Feb 25, 2023
867fc96
Ensure indexes for Roles and Subjects collections as part of boot (#7…
MarcinJuraszek Feb 26, 2023
ec83b57
Merge branch 'master' into dev
sulkaharo Feb 26, 2023
aa4faa6
New Crowdin updates (#7869)
sulkaharo Mar 29, 2023
25672ea
experimental support for nightscout-connect
bewest Apr 7, 2023
1020ec3
pass new sbx via event argument
bewest Apr 8, 2023
37a4ec1
Merge branch 'dev' into wip/bewest/document-data-rights
bewest May 2, 2023
9874a50
Merge pull request #7828 from nightscout/wip/bewest/document-data-rights
bewest May 2, 2023
9258cdc
Merge branch 'dev' into wip/bewest/nightscout-connect
bewest May 2, 2023
728b7be
temporary nightscout-connect by url
bewest May 9, 2023
cf5646b
Increase debounce for data loads to 15 seconds and trigger a data-loa…
sulkaharo May 29, 2023
8faf5dc
use released version of nightscout-connect
bewest May 31, 2023
4b4b9b0
Merge branch 'wip/bewest/nightscout-connect' of github.com:nightscout…
bewest May 31, 2023
93ffb25
Upgrade Mongo driver to latest legacy-API compatible version
sulkaharo Jun 1, 2023
32163a0
* Fix storage so tests pass with new Mongo driver
sulkaharo Jun 1, 2023
d29ff5c
allow running with node 20, current release
bewest Jun 1, 2023
65707ad
refactor IMPORT_CONFIG to use axios instead of request.
bewest Jun 1, 2023
ea56b79
Fix authorization storage
sulkaharo Jun 2, 2023
f96435b
bump minimed-connect-to-nighscout version
bewest Jun 2, 2023
7f05018
* Creates new V2 API to load minimized current system state in one re…
sulkaharo Jun 4, 2023
69dba90
Fix loading SBX
sulkaharo Jun 4, 2023
d2c9838
* Rename API to Summary
sulkaharo Jun 6, 2023
d09355e
Rename files to match api
sulkaharo Jun 6, 2023
99a152f
Only include noise if there is noise
sulkaharo Jun 6, 2023
6beb8a4
nightscout-connnect upgrade
bewest Jun 7, 2023
c2199c1
Merge remote-tracking branch 'official/easystate-api' into wip/bewest…
bewest Jun 7, 2023
5231543
better internal support for nightscout-connect
bewest Jun 7, 2023
5064984
bump minimed-connect-to-nightscout package
bewest Jun 9, 2023
4397fa7
introduce connect, initiate deprecation for bridge and mmconnect.
bewest Jun 9, 2023
6354494
Fix default value of the checkbox in plugin-specific settings (#8031)
Jackenmen Jun 10, 2023
5f953df
Fix label's `for` attribute for plugin-specific settings (#8030)
Jackenmen Jun 10, 2023
e7e04fc
use latest version of nightscout-connect
bewest Jun 13, 2023
e37db6b
Merge branch 'dev' into wip/bewest/nightscout-connect
bewest Jun 14, 2023
9d55ea5
Merge pull request #7983 from nightscout/wip/bewest/nightscout-connect
bewest Jun 14, 2023
e9d087d
Update Docker to use the same Node version as defined in .nvmrc
sulkaharo Jun 17, 2023
8b39822
Merge branch 'wip/bewest/nightscout-connect' of github.com:nightscout…
bewest Jun 19, 2023
29f84c1
bump nightscout-connect patch version
bewest Jun 19, 2023
f3afaec
Merge pull request #8039 from nightscout/wip/bewest/nightscout-connect
bewest Jun 19, 2023
726a99a
New translations en.json (Ukrainian)
sulkaharo Jun 21, 2023
cd766c2
New translations en.json (Ukrainian)
sulkaharo Jun 21, 2023
e99a166
Fix null values in the summary API
sulkaharo Jun 28, 2023
c2f1108
Remove node-apn
gestrich Jul 1, 2023
f63566b
Remove pem library
gestrich Jul 1, 2023
34bd1ff
Remove base64url library
gestrich Jul 1, 2023
20675cc
add @parse/node-apn library
gestrich Jul 1, 2023
d500fd8
Import new node library
gestrich Jun 29, 2023
282a992
Merge pull request #8042 from nightscout/crowdin_incoming
bewest Aug 4, 2023
613a699
Merge pull request #8047 from gestrich/feature/2023/06/bg/node-apn-up…
bewest Aug 5, 2023
a5acd9b
update nightscout-connect 0.0.8
bewest Aug 5, 2023
6296a75
update nightscout-connect dependency
bewest Aug 6, 2023
d602de1
bump nightscout-connect 0.0.10
bewest Aug 6, 2023
b4ab7ce
New translations en.json (Greek)
sulkaharo Aug 21, 2023
79df562
npm install nightscout-connect@^0.0.11
bewest Aug 25, 2023
9f2f98b
allow client to load successfully without requiring API SECRET
bewest Sep 3, 2023
5488df4
Merge pull request #8085 from nightscout/wip/bewest/api-secret-free-r…
bewest Sep 3, 2023
203f16f
README.md: use shareous1 for Nightscout connect using Dexcom share
bjornoleh Aug 13, 2023
2ba788d
Merge branch 'dev' into crowdin_incoming
sulkaharo Sep 13, 2023
0e485b4
Enable Ukrainian in translations
sulkaharo Sep 13, 2023
c591292
New translations en.json (Chinese Simplified)
sulkaharo Sep 14, 2023
b0756cc
New translations en.json (Chinese Simplified)
sulkaharo Sep 15, 2023
0b44d5d
New translations en.json (Spanish)
sulkaharo Sep 15, 2023
ed10ca1
New translations en.json (Chinese Simplified)
sulkaharo Sep 15, 2023
8b5c3d8
APIv3 sync only on srvModified
MilosKozak Sep 25, 2023
f722bb6
Merge branch 'dev' into apiv3sync
MilosKozak Sep 25, 2023
5f8c734
Merge pull request #8100 from nightscout/apiv3sync
bewest Oct 3, 2023
10cd789
Merge branch 'dev' into shareous
bjornoleh Oct 6, 2023
b1eb27e
Merge pull request #8073 from bjornoleh/shareous
bewest Oct 6, 2023
6e1c69f
Merge branch 'dev' into readme-swagger-link
bewest Oct 12, 2023
4a461e5
Merge pull request #7312 from jakobsandberg/readme-swagger-link
bewest Oct 12, 2023
3893eb4
allow running any version of LTS
bewest Oct 12, 2023
ebece1b
n 14 && npm install
bewest Oct 12, 2023
48dfa22
set expectation to take around 15 seconds for first load
bewest Oct 12, 2023
c6c0a0a
Merge remote-tracking branch 'official/dev' into less_frequent_db_upd…
bewest Oct 12, 2023
7819223
Allow any LTS version.
bewest Oct 12, 2023
6964916
n 14 && npm install
bewest Oct 12, 2023
97a603f
upgrade nightscout-connect@^0.0.12, npm install
bewest Oct 12, 2023
2757fe5
Merge pull request #8026 from nightscout/less_frequent_db_updates
bewest Oct 12, 2023
2d18433
Merge branch 'dev' into crowdin_incoming
bewest Oct 12, 2023
5d83048
Merge pull request #8082 from nightscout/crowdin_incoming
bewest Oct 13, 2023
da3b2ee
Merge pull request #7809 from nightscout/dev
bewest Oct 18, 2023
b2a59ee
create next dev area post release
bewest Oct 18, 2023
2e65b1d
Revert "Merge pull request #8026 from nightscout/less_frequent_db_upd…
bewest Oct 19, 2023
89354e5
bump nightscout-connect version
bewest Oct 20, 2023
bfecbe7
Merge pull request #8115 from nightscout/hotfix/revert/8026
bewest Oct 20, 2023
f46f869
Merge pull request #8109 from nightscout/dev
bewest Oct 20, 2023
c22b9e6
create space for developing post release
bewest Oct 20, 2023
cfe89c8
bump for dev post release of 15.0.1
bewest Oct 20, 2023
b166afc
socket.io: enable legacy v2 connections
bewest Oct 21, 2023
40dc7b0
restore compat with socket.io v2 client
Oct 21, 2023
19be01d
socket.io prefer version from @thecubic
bewest Oct 22, 2023
73c8089
Merge pull request #8127 from nightscout/wip/bewest/restore-v2
bewest Oct 22, 2023
0fbacfd
alarmSocket: customizing authorization requirements
bewest Oct 22, 2023
e0c35bc
Merge branch 'dev' into wip/bewest/8107-profile-buttons
bewest Oct 22, 2023
d8fe025
alarmSocket: document and prep concept
bewest Oct 22, 2023
1fa6af4
alarmSocket: don't double initialize, stub out non-global-ack
bewest Oct 22, 2023
c089286
remove spurious logging in profileeditor
bewest Oct 23, 2023
a7ebb30
add notes regarding handling unauthorized ACK request
bewest Oct 23, 2023
44f70db
Merge pull request #8132 from nightscout/wip/bewest/8107-profile-buttons
bewest Oct 24, 2023
21e0591
Merge pull request #8128 from nightscout/dev
bewest Oct 25, 2023
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
12 changes: 12 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -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

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -52,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -66,4 +66,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
mongodb-version: [4.2, 4.4]
node-version: [14.x, 16.x]
mongodb-version: [4.4, 5.0, 6.0]

steps:
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build, tag and push the dev Docker image
if: success() && github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.3
16.16.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.15.3-alpine
FROM node:16.16.0-alpine

LABEL maintainer="Nightscout Contributors"

Expand Down
160 changes: 129 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -9,8 +9,6 @@ Nightscout Web Monitor (a.k.a. cgm-remote-monitor)
[![Codacy Badge][codacy-img]][codacy-url]
[![Discord chat][discord-img]][discord-url]

[![Deploy to Heroku][heroku-img]][heroku-url] [![Update your site][update-img]][update-fork]

This acts as a web-based CGM (Continuous Glucose Monitor) to allow
multiple caregivers to remotely view a patient's glucose data in
real time. The server reads a MongoDB which is intended to be data
Expand Down Expand Up @@ -105,8 +103,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
- [`treatmentnotify` (Treatment Notifications)](#treatmentnotify-treatment-notifications)
- [`basal` (Basal Profile)](#basal-basal-profile)
- [`bolus` (Bolus Rendering)](#bolus-bolus-rendering)
- [`bridge` (Share2Nightscout bridge)](#bridge-share2nightscout-bridge)
- [`mmconnect` (MiniMed Connect bridge)](#mmconnect-minimed-connect-bridge)
- [`connect` (Nightscout Connect)](#connect-nightscout-connect)
- [`bridge` (Share2Nightscout bridge)](#bridge-share2nightscout-bridge), _deprecated_
- [`mmconnect` (MiniMed Connect bridge)](#mmconnect-minimed-connect-bridge), _deprecated_
- [`pump` (Pump Monitoring)](#pump-pump-monitoring)
- [`openaps` (OpenAPS)](#openaps-openaps)
- [`loop` (Loop)](#loop-loop)
Expand All @@ -132,40 +131,38 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)

## Supported configurations:

If you plan to use Nightscout, we recommend using [Heroku](https://nightscout.github.io/nightscout/new_user/) as this is free and easy to use.
We used to recommend hostig at Azure, but the resource needs of Nightscout have grown over the years and Azure won't comfortably run Nightscout
anymore in the free tier. If you're hosting in Azure and looking to update your site, we recommend you
[switch from Azure to Heroku](http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/nightscout-setup.html#switching-from-azure-to-heroku)
as you're likely to hit issues in the process of updating the site.

- [Nightscout Setup with Heroku](https://nightscout.github.io/nightscout/new_user/) (recommended)
- [Nightscout Setup](https://nightscout.github.io/nightscout/new_user/) (recommended)

While you can install Nightscout on a virtual server or a Raspberry Pi, we do not recommend this unless you have at least some
experience hosting Node applications and development using the toolchain in use with Nightscout. Heroku automates all of the
hosting for you and even many of the dvelopers run their production sites in Heroku due to convenience.
experience hosting Node applications and development using the toolchain in use with Nightscout.

If you're a hosting provider and want to provide our users additional free hosting options,
If you're a hosting provider and want to provide our users additional hosting options,
you're welcome to issue a documentation pull request with instructions on how to setup Nightscout on your system.

## 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 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

- Android 4
- iOS 6
- Chrome 35
- Edge 17
- Firefox 61
- Opera 12.1
- Safari 6 (macOS 10.7)
- Internet Explorer: not supported
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.

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:

Expand All @@ -184,7 +181,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.
Expand Down Expand Up @@ -232,7 +229,7 @@ Once you've installed Nightscout, you can access API documentation by loading `/
* Boluses over 2U: `http://localhost:1337/api/v1/treatments.json?find[insulin][$gte]=2`

The API is Swagger enabled, so you can generate client code to make working with the API easy.
To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or review [swagger.yaml](swagger.yaml).
To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or review [swagger.yaml](lib/server/swagger.yaml).

## Environment

Expand All @@ -256,6 +253,14 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `IMPORT_CONFIG` - Used to import settings and extended settings from a url such as a gist. Structure of file should be something like: `{"settings": {"theme": "colors"}, "extendedSettings": {"upbat": {"enableAlerts": true}}}`
* `TREATMENTS_AUTH` (`on`) - possible values `on` or `off`. Deprecated, if set to `off` the `careportal` role will be added to `AUTH_DEFAULT_ROLES`

#### Data Rights

These are useful to help protect your rights to portability and
autonomy for your data:
* `OBSCURED` - list, identical to `ENABLE`, a list of plugins to
obscure.
* `OBSCURE_DEVICE_PROVENANCE` - Required, a string visible to the [companies deciding to filter based on your data](https://help.sugarmate.io/en/articles/4673402-adding-a-nightscout-data-source). For example, `my-data-rights`.

### Alarms

These alarm setting affect all delivery methods (browser, Pushover, IFTTT, etc.). Values and settings entered here will be the defaults for new browser views, but will be overridden if different choices are made in the settings UI.
Expand Down Expand Up @@ -484,8 +489,98 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `BOLUS_RENDER_FORMAT` (`default`) - Possible values are `hidden`, `default` (with leading zero and U), `concise` (with U, without leading zero), and `minimal` (without leading zero and U).
* `BOLUS_RENDER_FORMAT_SMALL` (`default`) - Possible values are `hidden`, `default` (with leading zero and U), `concise` (with U, without leading zero), and `minimal` (without leading zero and U).

##### `connect` (Nightscout Connect)

Connect common diabetes cloud resources to Nightscout.
Include the keyword `connect` in the `ENABLE` list.
Nightscout connection uses extended settings using the environment variable prefix `CONNECT_`.
* `CONNECT_SOURCE` - The name for the source of one of the supported inputs. one of `nightscout`, `dexcomshare`, etc...
###### Nightscout

> Work in progress

To sync from another Nightscout site, include `CONNECT_SOURCE_ENDPOINT` and
`CONNECT_SOURCE_API_SECRET`.
* `CONNECT_SOURCE=nightscout`
* `CONNECT_SOURCE_ENDPOINT=<URL>`
* `CONNECT_SOURCE_API_SECRET=<OPTIONAL_API_SECRET>`

The `CONNECT_SOURCE_ENDPOINT` must be a fully qualified URL and may contain a
`?token=<subject>` query string to specify an accessToken.
The `CONNECT_SOURCE_API_SECRET`, if provided, will be used to create a token
called `nightscout-connect-reader`. This information or the token provided in
the query will be used to read information from Nightscout and is optional if
the site is readable by default.

Select this driver by setting `CONNECT_SOURCE` equal to `nightscout`.



###### Dexcom Share
To synchronize from Dexcom Share use the following variables.
* `CONNECT_SOURCE=dexcomshare`
* `CONNECT_SHARE_ACCOUNT_NAME=`
* `CONNECT_SHARE_PASSWORD=`

Optional, `CONNECT_SHARE_REGION` and `CONNECT_SHARE_SERVER` do the same thing, only specify one.
* `CONNECT_SHARE_REGION=` `ous` or `us`. `us` is the default if nothing is
provided. Selecting `us` sets `CONNECT_SHARE_SERVER` to `share2.dexcom.com`.
Selecting `ous` here sets `CONNECT_SHARE_SERVER` to `shareous1.dexcom.com`.
* `CONNECT_SHARE_SERVER=` set the server domain to use.


###### Glooko

> Note: Experimental.

To synchronize from Glooko use the following variables.
* `CONNECT_SOURCE=glooko`
* `CONNECT_GLOOKO_EMAIL=`
* `CONNECT_GLOOKO_PASSWORD=`

By default, `CONNECT_GLOOKO_SERVER` is set to `api.glooko.com` because the
default value for `CONNECT_GLOOKO_ENV` is `default`.
* `CONNECT_GLOOKO_ENV` is the word `default` by defalt. Other values are
`development`, `production`, for `api.glooko.work`, and
`externalapi.glooko.com`, respectively.
* `CONNECT_GLOOKO_SERVER` the hostname server to use - `api.glooko.com` by `default`.

If both, `CONNECT_GLOOKO_SERVER` and `CONNECT_GLOOKO_ENV` are set, only
`CONNECT_GLOOKO_SERVER` will be used.

###### Libre Link Up
To synchronize from Libre Link Up use the following variables.
* `CONNECT_SOURCE=linkup`
* `CONNECT_LINK_UP_USERNAME=`
* `CONNECT_LINK_UP_PASSWORD=`

By default, `CONNECT_LINK_UP_SERVER` is set to `api-eu.libreview.io` because the
default value for `CONNECT_LINK_UP_REGION` is `EU`.
Other available values for `CONNECT_LINK_UP_REGION`:
* `US`, `EU`, `DE`, `FR`, `JP`, `AP`, `AU`, `AE`

For folks connected to many patients, you can provide the patient ID by setting
the `CONNECT_LINK_UP_PATIENT_ID` variable.

###### Minimed Carelink

To synchronize from Medtronic Minimed Carelink, set the following
environment variables.
* `CONNECT_SOURCE=minimedcarelink`
* `CONNECT_CARELINK_USERNAME`
* `CONNECT_CARELINK_PASSWORD`
* `CONNECT_CARELINK_REGION` Either `eu` to set `CONNECT_CARELINK_SERVER` to
`carelink.minimed.eu` or `us` to use `carelink.minimed.com`.

For folks using the new Many to Many feature, please provide the username of the
patient to follow using `CONNECT_CARELINK_PATIENT_USERNAME` variable.


##### `bridge` (Share2Nightscout bridge)
Glucose reading directly from the Dexcom Share service, uses these extended settings:

> **Deprecated** Please consider using the `connect` plugin instead.

Fetch glucose reading directly from the Dexcom Share service, uses these extended settings:
* `BRIDGE_USER_NAME` - Your username for the Share service.
* `BRIDGE_PASSWORD` - Your password for the Share service.
* `BRIDGE_INTERVAL` (`150000` *2.5 minutes*) - The time (in milliseconds) to wait between each update.
Expand All @@ -496,6 +591,9 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `BRIDGE_SERVER` (``) - The default blank value is used to fetch data from Dexcom servers in the US. Set to (`EU`) to fetch from European servers instead.

##### `mmconnect` (MiniMed Connect bridge)

> **Deprecated** Please consider using the `connect` plugin instead.

Transfer real-time MiniMed Connect data from the Medtronic CareLink server into Nightscout ([read more](https://github.com/mddub/minimed-connect-to-nightscout))
* `MMCONNECT_USER_NAME` - Your user name for CareLink Connect.
* `MMCONNECT_PASSWORD` - Your password for CareLink Connect.
Expand Down
5 changes: 5 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@
"description": "Default setting for new browser views, for the time mode. ('12' or '24')",
"value": "12",
"required": false
},
"USE_NPM_INSTALL": {
"description": "You need to have this set for deployment to work in Heroku",
"value": "true",
"required": true
}
},
"addons": [
Expand Down
2 changes: 1 addition & 1 deletion azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
},
"WEBSITE_NODE_DEFAULT_VERSION": {
"type": "string",
"defaultValue": "8.11.1"
"defaultValue": "16.16.0"
}
},
"resources": [{
Expand Down
10 changes: 8 additions & 2 deletions bundle/bundle.source.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ require('../node_modules/flot/jquery.flot.time');
require('../node_modules/flot/jquery.flot.pie');
require('../node_modules/flot/jquery.flot.fillbetween');

window.moment = require('moment-timezone');
const moment = require('moment-timezone');

window.moment = moment;

window.Nightscout = window.Nightscout || {};

var ctx = {
moment: moment
};

window.Nightscout = {
client: require('../lib/client'),
units: require('../lib/units')(),
admin_plugins: require('../lib/admin_plugins/')()
admin_plugins: require('../lib/admin_plugins/')(ctx)
};

window.Nightscout.report_plugins_preinit = require('../lib/report_plugins/');
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
version: '3'

x-logging:
&default-logging
options:
max-size: '10m'
max-file: '5'
driver: json-file

services:
mongo:
image: mongo:4.4
volumes:
- ${NS_MONGO_DATA_DIR:-./mongo-data}:/data/db:cached
logging: *default-logging

nightscout:
image: nightscout/cgm-remote-monitor:latest
Expand All @@ -19,6 +27,7 @@ services:
- 'traefik.http.routers.nightscout.rule=Host(`localhost`)'
- 'traefik.http.routers.nightscout.entrypoints=websecure'
- 'traefik.http.routers.nightscout.tls.certresolver=le'
logging: *default-logging
environment:
### Variables for the container
NODE_ENV: production
Expand Down Expand Up @@ -74,3 +83,4 @@ services:
volumes:
- './letsencrypt:/letsencrypt'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
logging: *default-logging
Loading
Loading