Skip to content

Commit

Permalink
Upgrade to 14.1.1 (#1)
Browse files Browse the repository at this point in the history
* * Bump version to 14.1.1
* Allow reducing timer length in delays for security tests

* Re-enable partial report test

* Security improvement batch (nightscout#6622)

* Adds a new method for the server to push notifies to the client, which require administration privileges from the user. If there are messages in queue but user is not privileged, she is notified of pending messages

* Fix unit tests

* Increase timeouts on tests

* Add translations

* * Aggregate admin messages
* Send admin message on auth fail
* Sending messages over bus
* XSS filtering of objects sent over the REST API

* Warn users if their instance is world readable

* Fix adminnotifies init()

* Fix couple issues from Codacy

* APIv3: wrapping all results in JSON (nightscout#6703)

* APIv3: isolating documents from tests (not allowing clashes of calculated identifiers)

* removing unused async keyword

* fixing api v3 swagger and moving it to /api3-docs

* APIv3: adding cachedCollection stub of cachedCollection storage implementation

* APIv3: mongo cachedCollection storage implementation

* APIv3: testing and debugging cache updates

* APIv3: more testing on cache updates

* APIv3: fixing bad async functions

* APIv3: finishing cache invalidation tests

* APIv3: wrapping VERSION result

* APIv3: wrapping STATUS result

* APIv3: wrapping DELETE result

* APIv3: wrapping READ result + partially SEARCH and HISTORY

* APIv3: wrapping CREATE result

* APIv3: wrapping UPDATE + PATCH result

* APIv3: wrapping LAST MODIFIED result

* APIv3: updating swagger doc

* APIv3: updating tutorial.md

* APIv3: tuning tests

* APIv3: merge dev

Co-authored-by: Petr Ondrusek <petr.ondrusek@seznam.cz>
Co-authored-by: Petr Ondrůšek <petr.ondrusek@okin.eu>
Co-authored-by: Sulka Haro <sulka@sulka.net>

* * Improved internal API for injecting values into localization keys
* Fix a hard to translate key that was split to two separate values

* Don't run docker push on forks (nightscout#6718)

Skip the docker push steps if the repo owner is not 'nightscout'.

* Support pump status upload display override (nightscout#6698)

* Fix admin localization

* Clean statics & bundle more (nightscout#6745)

* * Remove unused old version of MFB
* Bundle food, profile editor
* Clean up the static folders

* Fix tests

* feat: disable pump battery alarms at night option (nightscout#5359)

* feat: add feature to disable pump battery alarms at night

* add timezone handling for server side

* Update pump.test.js

* Update pump.test.js

* Update pump.test.js

Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
Co-authored-by: Sulka Haro <sulka@sulka.net>

* Add eslint security plugin (nightscout#5450)

Co-authored-by: Jakob Sandberg <jakobs@zillowgroup.com>
Co-authored-by: Sulka Haro <sulka@sulka.net>

* Allow api3 behind reverse proxy (nightscout#5631)

* Allow api3 behind reverse proxy

* fix test

Co-authored-by: Sulka Haro <sulka@sulka.net>

* Move to package-lock, as per nightscout#5735

* New Crowdin updates (nightscout#6713)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Hebrew)

* New translations en.json (Hungarian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Finnish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Croatian)

* Update source file en.json

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Greek)

* New translations en.json (Swedish)

* New translations en.json (Czech)

* New translations en.json (Russian)

* New translations en.json (Romanian)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Hungarian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Finnish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Croatian)

* New translations en.json (Romanian)

* New translations en.json (Hebrew)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Hungarian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Finnish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Croatian)

* Update source file en.json

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Swedish)

* New translations en.json (German)

* New translations en.json (Russian)

* New translations en.json (Czech)

* New translations en.json (German)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* New translations en.json (Dutch)

* New translations en.json (Hebrew)

* New translations en.json (Russian)

* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Russian)

* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Danish)

* New translations en.json (Portuguese, Brazilian)

* Implemented nightscout#6720 - Added es_ES template for Alexa (nightscout#6779)

* Added sensor code transmitter ID fields (nightscout#6780)

* Copied nightscout#5442 - Duplicated @c-robertson's work

* Added tx id and sensor code to tooltip

* Added swagger docs for the new fields

* Added missing language keys

* Added new fields to sage plugin display

Co-authored-by: Sulka Haro <sulka@sulka.net>

* nightscout#6701 Save report preferences (nightscout#6761)

Proof of concept to demonstrate saving report preferences

Co-authored-by: Sulka Haro <sulka@sulka.net>

* New Crowdin updates (nightscout#6769)

* New translations en.json (Russian)

* New translations en.json (Romanian)

* New translations en.json (Bulgarian)

* New translations en.json (Finnish)

* New translations en.json (Hindi)

* New translations en.json (French)

* New translations en.json (Swedish)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Italian)

* New translations en.json (Slovenian)

* New translations en.json (Slovenian)

* New translations en.json (Arabic)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Bulgarian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Bulgarian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (French)

* New translations en.json (Croatian)

* New translations en.json (Italian)

* New translations en.json (French)

* New translations en.json (Italian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (German)

* New translations en.json (Hebrew)

* New translations en.json (Italian)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Hungarian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Arabic)

* Catch error from websocket device status dedupe (nightscout#6777)

* Catch error from websocket device status dedupe

* Patch two more locations that don't catch errors correctly

* Changes the bundling so the site works on old Safari versions (nightscout#6800)

* Changes the bundling so the site works on old Safari versions

* Fix quotes

* Cache babel output for faster development

* Round insulin value in treatment tooltip (nightscout#6776)

* rename toFixedMin to toRoundedStr

* round the insulin value

* Typo correction for translation (nightscout#6805)

* nightscout#6701 Report storage tests (nightscout#6814)

* nightscout#6701 Report storage tests

Functional and unit tests

* nightscout#6701 Test cleanup

* nightscout#6701 js-storage teardown

The first time js-storage is required it evaluates if it's running in the browser or not: https://github.com/julien-maurel/js-storage/blob/master/js.storage.js#L423 and will define the localstorage getters and setters accordingly. This becomes an issue if testing localstorage between UI and non-UI tests. reportstorage.test.js was requiring it before hashauth.test.js causing a conflict.

* nightscout#6701 false positive test

The page isn't refreshing

Co-authored-by: Sulka Haro <sulka@sulka.net>

* Update mongo-storage.js (nightscout#6811)

- use default time outs
- remove MongoDB_URI (including user name and password) from public error message
- fix typos

Co-authored-by: Sulka Haro <sulka@sulka.net>

* Unit test teardown improvements (nightscout#6821)

* Clear module require()s between tests
Clear profile cache between tests

* Fix authentication for careportal test

* Add logging to see where the careportal test gets to

* Even more logging for headless setup

* Change to use before and after in careportal test

* Add time logging

* Bump headless setup time to a full minute

* More timers to figure out what's slow in GA

* Bump up timeout on failing test

* New Crowdin updates (nightscout#6804)

* New translations en.json (Hebrew)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.json (Swedish)

* New translations en.json (Czech)

* New translations en.json (Hungarian)

* New translations en.json (Croatian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Russian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Bulgarian)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* replace deprecated bodyParser ctor (nightscout#6819)

Co-authored-by: Sulka Haro <sulka@sulka.net>

* Bolus settings (nightscout#6834)

* Add bolus plugin and restructure rendering settings

* Add setting to prevent automated micro boluses from triggering notifications and snoozing alarms

* clean up

* Small change to the bolus-settings branch so it supports flexible configuration that enables the old behavior

* Translations

* Fix settings default

Co-authored-by: Jason Calabrese <jason@cbrese.com>

* Added a specific rendering for BG Check events on the Day to Day report. (nightscout#6530)

Added an option to hide BG Check and other events on the Day to Day report.

Co-authored-by: Sulka Haro <sulka@sulka.net>

* New Crowdin updates (nightscout#6833)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* New translations en.json (Finnish)

* New translations en.json (German)

* Refactoring organisation, bundling and security improvements (nightscout#6765)

* * Simplified bundling to just one bundle
* Removed cache invalidation token from bundling
* Generate strong persistent random string on deploy to use for JWT signing
* WIP: moving api-secret and JWT signing to a separate centralized security component
* Moved some server components away from project root
* Fix issues reported by linter

* Ignore detect-object-injection everywhere but the client

* Make admin message button red

* Remove alarms for some security alerts on code

* api_secret is now fully contained in the enclave

* Bump version to 14.2.0

* Fix Procfile, Dockerfile

* Revert to old token hash generation method

* Fix admin message localization, timer presentation

* * Fix nightscout#6843
* Don't do sync file access on requests to swagger files or service worker
* Adds an API test

* Add unit test for socket.io connect (nightscout#6845)

* Add unit test for socket.io connect

* Fix white space

* * Fix hard to understand loopalyzer localization key
* Fix websocket in unauthenticated cases

* Change authentication dialog button label to be more descriptive

* Remove duplicate key

* * Better unit test for admin notifications.
* Localisable API_SECRET warning
* Fix admin message time display when message is recent

* * Add Slovenian and fix Slovakian language code
* Hide Traditional Chinese due to low coverage
* Add Portuguese to the menu

* * Disabling tests that interfere with other tests
* Fix view include syntax
* Change Slovenian name to correct language

* Update webpack to v5 (nightscout#6844)

* upgrade webpack info

* cleanup eslint findings

* fix eslint formatter stylish error

* lazy is invalid option for webpack dev middleware

* upgrade webpack to 5.x

* remove unsupported terser option

* fix missing process polyfill dependency

* try alternate proces fix

* fix css image reference

* add statements to import missing css files to index.html

* TerserPlugin no longer required

* add missing css links

* remove terser

Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
Co-authored-by: Sulka Haro <sulka@sulka.net>

* New Crowdin updates (nightscout#6837)

* New translations en.json (Hebrew)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Spanish)

* New translations en.json (German)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Dutch)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Swedish)

* New translations en.json (Bulgarian)

* New translations en.json (Danish)

* New translations en.json (French)

* New translations en.json (Danish)

* New translations en.json (Greek)

* New translations en.json (Danish)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Russian)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Greek)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Norwegian Bokmal)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* New translations en.json (Japanese)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (French)

* New translations en.json (Greek)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* Update source file en.json

* New translations en.json (Slovenian)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Portuguese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Slovak)

* Update source file en.json

* New translations en.json (Portuguese)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Portuguese)

* Fix issue reported by CodeQL

* Removes an undocumented feature that has a javascript injection vulnerability

* Fix bug with previous removal

* Reduce the amount of false positives reported

* Cgm delta fix (nightscout#6848)

* If CGM value has changed, push it to server

* Fix VScode overeager code add

* Merge updated CGM data into client dataset

* Fix form parsing

* Fix json decoding for some api endpoints

* Remove broken header definition

* Fix Brazilian Portuguese language code

* Use password entropy analysis for determining password strength

* Api3 remove Date header (nightscout#6855)

* APIv3: isolating documents from tests (not allowing clashes of calculated identifiers)

* removing unused async keyword

* fixing api v3 swagger and moving it to /api3-docs

* APIv3: finishing cache invalidation tests

Co-authored-by: Petr Ondrusek <petr.ondrusek@seznam.cz>
Co-authored-by: Petr Ondrůšek <petr.ondrusek@okin.eu>
Co-authored-by: Sulka Haro <sulka@sulka.net>

* New Crowdin updates (nightscout#6849)

* New translations en.json (Greek)

* New translations en.json (Dutch)

* New translations en.json (Swedish)

* New translations en.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Notify users if they're reusing the API_SECRET for Mongo password

* Fix version number generation

* New Crowdin updates (nightscout#6858)

* New translations en.json (Greek)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Portuguese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Slovak)

* Update source file en.json

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Swedish)

* New translations en.json (Russian)

* New translations en.json (Romanian)

* New translations en.json (French)

* New translations en.json (Czech)

* New translations en.json (Danish)

* New translations en.json (Portuguese)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.json (Polish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Polish)

* New translations en.json (Romanian)

* New translations en.json (Romanian)

* New translations en.json (Greek)

* New translations en.json (Finnish)

* New translations en.json (Russian)

* * Only run CodeQL in NS repo (nightscout#6873)

* Fix server.js location for Azure

* New translations en.json (Romanian) (nightscout#6869)

* New Crowdin updates (nightscout#6874)

* New translations en.json (Czech)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* * Bump version to 14.2.1
* Update socket.io

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* * Bump dev to 14.2.2
* Add ADMIN_NOTIFIES_ENABLED feature flag
* Skip setting language code if language value is not null

* Fix adminnotifies test

* re-install server.js at root

This continues to allow using server.js programmatically from the root of the
project.

* include standard header for server.js at root.

* task: clean repo root

This change seeks to continue tidying up the repo.

* The database_configuration.json file is not used and has not been used since
  the project was published on github.  We remove the ability to look at files
  inside the source tree for database credentials.

*  Move example-profiles.md to the relevant documentation for plugins area and
   update the link to match.

* move script for repo maintenance aside

This script is used to help prep release branches and tags.  Since it's not
crucial to the business of remote monitoring and only useful as a maintenance
tool, we're moving it away from the project root.

* task: clean project root

Move update image into docs folder, away from project root.

* remove empty file from project root

* task: clean project root

setup.sh appears to be a developer utility to assist in bootstrapping a debian
based system.  It is intended to help install the dependencies needed to run
node, and not used in any automated deploy pipeline.

Instructions have been updated to suite this change which simply moves the
developer tool out of the project repo and into the bin subdirectory.

* task: tidy project root

This change moves the azure deployment script from the root of the project into
the bin subdirectory with a name that makes its purpose more clear.

.deployment file has been updated to execute the new path.

* task: tidy project root: webpack

This change attempts to tidy the project root by moving webpack configuration
into it's own subdirectory.  The metadata has been updated to match this information.

In addition, the configuration file itself is simplified for future maintainers
in some ways. Now the configuration to a projectRoot which is calculated
exactly once, instead of introspecting from __dirname each time.

* task: tidy example environment template

Move this away from project root and into docs area.
CONTRIBUTING file updated to match.

* task: tidy ci test env away from project root

This change moves the ci.test.env file into the tests/ subdirectory in an
effort to reduce the number of files in the project root.  The package.json
metadata is updated to enable continuous integration tools to continue to work
as expected.

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* * Fix running the site in dev mode
* Fix Pump Battery Age plugin name localization

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Portuguese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Slovak)

* Update source file en.json

* New translations en.json (Portuguese)

* New translations en.json (Dutch)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations en.json (Swedish)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian) (nightscout#6907)

* New translations en.json (Hungarian) (nightscout#6908)

Co-authored-by: Sulka Haro <sulka@sulka.net>
Co-authored-by: Petr Ondrusek <34578008+PetrOndrusek@users.noreply.github.com>
Co-authored-by: Petr Ondrusek <petr.ondrusek@seznam.cz>
Co-authored-by: Petr Ondrůšek <petr.ondrusek@okin.eu>
Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
Co-authored-by: Jeremy Cunningham <34543464+jpcunningh@users.noreply.github.com>
Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
Co-authored-by: Jakob <jakobsandberg95@gmail.com>
Co-authored-by: Jakob Sandberg <jakobs@zillowgroup.com>
Co-authored-by: Milos Kozak <m.kozak@sysop.cz>
Co-authored-by: Caleb <inventor96@users.noreply.github.com>
Co-authored-by: Matt Gaide <mgaide@salesforce.com>
Co-authored-by: bassettb <bryanbassett@gmail.com>
Co-authored-by: philipgo <skyrock@web.de>
Co-authored-by: Jason Calabrese <jason@cbrese.com>
Co-authored-by: Michael Kroes <michael@kroes.email>
Co-authored-by: Ben West <bewest@gmail.com>
  • Loading branch information
18 people committed Apr 12, 2021
1 parent 5ccd078 commit df6d5f8
Show file tree
Hide file tree
Showing 212 changed files with 24,413 additions and 7,302 deletions.
2 changes: 1 addition & 1 deletion .deployment
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[config]
command = bash deploy.sh
command = bash bin/azure-deploy.sh
44 changes: 28 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
module.exports = {
"plugins": [ ],
"extends": [
"eslint:recommended"
'plugins': [
'security'
],
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true,
"jquery": true
'extends': [
'eslint:recommended',
'plugin:security/recommended'
],
'parser': 'babel-eslint',
'env': {
'browser': true,
'commonjs': true,
'es6': true,
'node': true,
'mocha': true,
'jquery': true
},
"rules": {
"no-unused-vars": [
"error",
'rules': {
'security/detect-object-injection' : 0,
'no-unused-vars': [
'error',
{
"varsIgnorePattern": "should|expect"
'varsIgnorePattern': 'should|expect'
}
]
}
},
'overrides': [
{
'files': ['lib/client/*.js'],
'rules': {
'security/detect-object-injection': 0
}
}
],
};
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bundle/bundle.out.js
*.iml
my.env
my.*.env
*.pem

static/bower_components/
.*.sw?
Expand All @@ -28,5 +29,4 @@ npm-debug.log
/cgm-remote-monitor.njsproj
/cgm-remote-monitor.sln
/obj/Debug
/bin
/*.bat
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
[coverage-url]: https://coveralls.io/r/nightscout/cgm-remote-monitor?branch=master
[discord-img]: https://img.shields.io/discord/629952586895851530?label=discord%20chat
[discord-url]: https://discord.gg/rTKhrqz
[example-env-template]: docs/example-template.env

## Translations

Expand All @@ -49,15 +50,15 @@ Nightscout is a Node.js application. The basic installation of the software for
dependency installation has to be done using a non-root user - _do not use root_ for development and hosting
the software!
3. Get a Mongo database by either installing Mongo locally, or get a free cloud account from mLab or MongoDB Atlas.
4. Configure Nightscout by copying `my.env.template` to `my.env` and run it - see the next chapter in the instructions
4. Configure Nightscout by copying [`docs/example-template.env`][example-env-template] to `my.env` and run it - see the next chapter in the instructions

## Develop on `dev`

We develop on the `dev` branch. All new pull requests should be targeted to `dev`. The `master` branch is only used for distributing the latest version of the tested sources.

You can get the `dev` branch checked out using `git checkout dev`.

Once checked out, install the dependencies using `npm install`, then copy the included `my.env.template`file to `my.env` and edit the file to include your settings (like the Mongo URL). Leave the `NODE_ENV=development` line intact. Once set, run the site using `npm run dev`. This will start Nightscout in the development mode, with different code packaging rules and automatic restarting of the server using nodemon, when you save changed files on disk. The client also hot-reloads new code in, but it's recommended to reload the website after changes due to the way the plugin sandbox works.
Once checked out, install the dependencies using `npm install`, then copy the included [`docs/example-template.env`][example-env-template] to `my.env` file to `my.env` and edit the file to include your settings (like the Mongo URL). Leave the `NODE_ENV=development` line intact. Once set, run the site using `npm run dev`. This will start Nightscout in the development mode, with different code packaging rules and automatic restarting of the server using nodemon, when you save changed files on disk. The client also hot-reloads new code in, but it's recommended to reload the website after changes due to the way the plugin sandbox works.

Note the template sets `INSECURE_USE_HTTP` to `true` to enable the site to work over HTTP in local development.

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUN npm install && \

EXPOSE 1337

CMD ["node", "server.js"]
CMD ["node", "lib/server/server.js"]
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node server.js
web: node lib/server/server.js
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
[discord-url]: https://discord.gg/rTKhrqz
[heroku-img]: https://www.herokucdn.com/deploy/button.png
[heroku-url]: https://heroku.com/deploy?template=https://github.com/nightscout/cgm-remote-monitor
[update-img]: update.png
[update-img]: docs/update.png
[update-fork]: http://nightscout.github.io/pages/update-fork/
[original]: https://github.com/rnpenguin/cgm-remote-monitor

Expand Down Expand Up @@ -104,6 +104,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
- [`bage` (Battery Age)](#bage-battery-age)
- [`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)
- [`pump` (Pump Monitoring)](#pump-pump-monitoring)
Expand Down Expand Up @@ -163,7 +164,7 @@ Some features may not work with devices/browsers on the older end of these requi

## 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 `setup.sh`)
- [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.

As a non-root user clone this repo then install dependencies into the root of the project:
Expand Down Expand Up @@ -294,6 +295,8 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
### Predefined values for your browser settings (optional)

* `TIME_FORMAT` (`12`)- possible values `12` or `24`
* `DAY_START` (`7.0`) - time for start of day (0.0 - 24.0) for features using day time / night time options
* `DAY_END` (`21.0`) - time for end of day (0.0 - 24.0) for features using day time / night time options
* `NIGHT_MODE` (`off`) - possible values `on` or `off`
* `SHOW_RAWBG` (`never`) - possible values `always`, `never` or `noise`
* `CUSTOM_TITLE` (`Nightscout`) - Title for the main view
Expand All @@ -311,7 +314,6 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* The `linear` option has equidistant tick marks; the range used is dynamic so that space at the top of chart isn't wasted.
* The `log-dynamic` is similar to the default `log` options, but uses the same dynamic range and the `linear` scale.
* `EDIT_MODE` (`on`) - possible values `on` or `off`. Enables the icon allowing for editing of treatments in the main view.
* `BOLUS_RENDER_OVER` (1) - U value over which the bolus values are rendered on the chart if the 'x U and Over' option is selected. This value can be an integer or a float, e.g. 0.3, 1.5, 2, etc...

### Predefined values for your server settings (optional)
* `INSECURE_USE_HTTP` (`false`) - Redirect unsafe http traffic to https. Possible values `false`, or `true`. Your site redirects to `https` by default. If you don't want that from Nightscout, but want to implement that with a Nginx or Apache proxy, set `INSECURE_USE_HTTP` to `true`. Note: This will allow (unsafe) http traffic to your Nightscout instance and is not recommended.
Expand Down Expand Up @@ -468,12 +470,20 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `BAGE_URGENT` (`360`) - If time since last `Pump Battery Change` matches `BAGE_URGENT` hours, user will be issued a persistent warning of overdue change (default of 360 hours is 15 days).

##### `treatmentnotify` (Treatment Notifications)
Generates notifications when a treatment has been entered and snoozes alarms minutes after a treatment. Default snooze is 10 minutes, and can be set using the `TREATMENTNOTIFY_SNOOZE_MINS` [extended setting](#extended-settings).
Generates notifications when a treatment has been entered and snoozes alarms minutes after a treatment.
* `TREATMENTNOTIFY_SNOOZE_MINS` (`10`) - Number of minutes to snooze notifications after a treatment is entered
* `TREATMENTNOTIFY_INCLUDE_BOLUSES_OVER` (`0`) - U value over which the bolus will trigger a notification and snooze alarms

##### `basal` (Basal Profile)
Adds the Basal pill visualization to display the basal rate for the current time. Also enables the `bwp` plugin to calculate correction temp basal suggestions. Uses the `basal` field from the [treatment profile](#treatment-profile). Also uses the extended setting:
* `BASAL_RENDER` (`none`) - Possible values are `none`, `default`, or `icicle` (inverted)

##### `bolus` (Bolus Rendering)
Settings to configure Bolus rendering
* `BOLUS_RENDER_OVER` (`0`) - U value over which the bolus labels use the format defined in `BOLUS_RENDER_FORMAT`. This value can be an integer or a float, e.g. 0.3, 1.5, 2, etc.
* `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).

##### `bridge` (Share2Nightscout bridge)
Glucose reading directly from the Dexcom Share service, uses these extended settings:
* `BRIDGE_USER_NAME` - Your username for the Share service.
Expand Down Expand Up @@ -511,6 +521,7 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `PUMP_URGENT_BATT_P` (`20`) - The % of the pump battery remaining, an urgent alarm will be triggered when dropping below this threshold.
* `PUMP_WARN_BATT_V` (`1.35`) - The voltage (if percent isn't available) of the pump battery, a warning will be triggered when dropping below this threshold.
* `PUMP_URGENT_BATT_V` (`1.30`) - The voltage (if percent isn't available) of the pump battery, an urgent alarm will be triggered when dropping below this threshold.
* `PUMP_WARN_BATT_QUIET_NIGHT` (`false`) - Do not generate battery alarms at night.

##### `openaps` (OpenAPS)
Integrated OpenAPS loop monitoring, uses these extended settings:
Expand Down Expand Up @@ -659,7 +670,7 @@ For remote overrides, the following extended settings must be configured:
* `target_high` - Upper target for correction boluses.
* `target_low` - Lower target for correction boluses.

Some example profiles are [here](example-profiles.md).
Some example profiles are [here](docs/plugins/example-profiles.md).

## Setting environment variables
Easy to emulate on the commandline:
Expand All @@ -679,13 +690,13 @@ Your hosting provider probably has a way to set these through their GUI.
### Vagrant install

Optionally, use [Vagrant](https://www.vagrantup.com/) with the
included `Vagrantfile` and `setup.sh` to install OS and node packages to
included `Vagrantfile` and `bin/setup.sh` to install OS and node packages to
a virtual machine.

```bash
host$ vagrant up
host$ vagrant ssh
vm$ setup.sh
vm$ ./bin/setup.sh
```

The setup script will install OS packages then run `npm install`.
Expand Down
Loading

0 comments on commit df6d5f8

Please sign in to comment.