Skip to content

Commit 0c9222e

Browse files
sarahspinssulkaharobewestpazaanPetrOndrusek
authored
#11 (#11)
* Fix pushover init * Fix pushover test * New Crowdin updates (#6652) * New translations en.json (Norwegian Bokmal) * 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 (Greek) * New translations en.json (Dutch) * New translations en.json (Finnish) * Various fixes to localization - #6516 #6523 #6524 * Test new dev version of minimed-connect-to-nightscout Try out plugin with recent fixes, thanks to @fredmk. * * More small localization fixes * Change link to point to github.io docs * Fix upbat.js levels reference * Fix authorization renewal * New Crowdin updates (#6653) * New translations en.json (Norwegian Bokmal) * 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 (Czech) * New translations en.json (Finnish) * New translations en.json (Greek) * New translations en.json (Dutch) * New translations en.json (Norwegian Bokmal) * New translations en.json (Norwegian Bokmal) * New translations en.json (Norwegian Bokmal) * New translations en.json (Swedish) * New translations en.json (Norwegian Bokmal) * 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 (Dutch) * New translations en.json (Swedish) * New translations en.json (Czech) * New translations en.json (Romanian) * New translations en.json (Romanian) * New translations en.json (Russian) * New translations en.json (Russian) * Add a missing localization, fix unit tests * Fix a localization key * Rename Weekly Success report to Weekly Distribution * Fix a bug with auth calls that send a false API secret * upgrade minimed-connect-to-nightscout 1.5.0 Update to version available in npm. * Replace Travis build with a GitHub Action (#6690) * Create Docker release workflow for GA * Remove Travis workflow * Remove dependency on Makefile * Update default environment to Node 14 * Use git SHA instead of version for `dev` images * APIv3: Cache invalidation + refactoring (#6688) * 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 Co-authored-by: Petr Ondrusek <[email protected]> Co-authored-by: Petr Ondrůšek <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * New Crowdin updates (#6675) * 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 (Dutch) * New translations en.json (Greek) * New translations en.json (Romanian) * New translations en.json (Finnish) * Update source file en.json * New translations en.json (Romanian) * New translations en.json (Romanian) * New translations en.json (Finnish) * New translations en.json (Romanian) * New translations en.json (Romanian) * New translations en.json (Turkish) * 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 (Greek) * New translations en.json (French) * New translations en.json (Czech) * New translations en.json (Norwegian Bokmal) * Update source file en.json * New translations en.json (Romanian) * New translations en.json (Norwegian Bokmal) * New translations en.json (Russian) * New translations en.json (Finnish) * New translations en.json (Czech) * New translations en.json (Czech) * Update source file en.json * german translations template for googlehome integration (#6674) Co-authored-by: tanja3981 <[email protected]> * Added support for multiple uploaders in virtual assistant delta calculation (#6559) * Added support for multiple uploaders in delta calculation * Moved moment creation * Moved delta stuff into bgnow plugin * Typo * Removed old implementation * Removed accidental translations * Added new translation key * Removed duplicate translation key (#6699) * New Crowdin updates (#6700) * 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 (Dutch) * New translations en.json (Norwegian Bokmal) * New translations en.json (Czech) * New translations en.json (French) * New translations en.json (Romanian) * New translations en.json (German) * * Additional unit test for the authorization API * Stop logging the API SECRET * * Bump version to 14.1.1 * Allow reducing timer length in delays for security tests * Re-enable partial report test * Security improvement batch (#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 (#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 <[email protected]> Co-authored-by: Petr Ondrůšek <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * * 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 (#6718) Skip the docker push steps if the repo owner is not 'nightscout'. * Cherry picking CI flow file so users don't get a CI build fail after merging to latest release * Support pump status upload display override (#6698) * Fix admin localization * Clean statics & bundle more (#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 (#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 <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * Add eslint security plugin (#5450) Co-authored-by: Jakob Sandberg <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * Allow api3 behind reverse proxy (#5631) * Allow api3 behind reverse proxy * fix test Co-authored-by: Sulka Haro <[email protected]> * Move to package-lock, as per #5735 * New Crowdin updates (#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 #6720 - Added es_ES template for Alexa (#6779) * Added sensor code transmitter ID fields (#6780) * Copied #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 <[email protected]> * #6701 Save report preferences (#6761) Proof of concept to demonstrate saving report preferences Co-authored-by: Sulka Haro <[email protected]> * New Crowdin updates (#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 (#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 (#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 (#6776) * rename toFixedMin to toRoundedStr * round the insulin value * Typo correction for translation (#6805) * #6701 Report storage tests (#6814) * #6701 Report storage tests Functional and unit tests * #6701 Test cleanup * #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. * #6701 false positive test The page isn't refreshing Co-authored-by: Sulka Haro <[email protected]> * Update mongo-storage.js (#6811) - use default time outs - remove MongoDB_URI (including user name and password) from public error message - fix typos Co-authored-by: Sulka Haro <[email protected]> * Unit test teardown improvements (#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 (#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 (#6819) Co-authored-by: Sulka Haro <[email protected]> * Bolus settings (#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 <[email protected]> * Added a specific rendering for BG Check events on the Day to Day report. (#6530) Added an option to hide BG Check and other events on the Day to Day report. Co-authored-by: Sulka Haro <[email protected]> * New Crowdin updates (#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 (#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 #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 (#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 (#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 <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * New Crowdin updates (#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 (#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 (#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 <[email protected]> Co-authored-by: Petr Ondrůšek <[email protected]> Co-authored-by: Sulka Haro <[email protected]> * New Crowdin updates (#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 (#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 (#6873) * Fix server.js location for Azure * New translations en.json (Romanian) (#6869) * New Crowdin updates (#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) (#6907) * New translations en.json (Hungarian) (#6908) * * Bump version to 14.2.3 * Change packaging to include full moment.js locale library to fix date processing issues for some users * Add `docker-compose` support (#6903) * Create docker-compose.yml file for easy deployment * Restore invalid password, to force change * New Crowdin updates (#6917) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Czech) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Hungarian) * New translations en.json (Russian) * New translations en.json (Romanian) * New translations en.json (Italian) * New translations en.json (Italian) * New translations en.json (Tamil) * New translations en.json (Portuguese) * New translations en.json (Slovenian) * New translations en.json (Slovenian) * New translations en.json (Slovenian) * New translations en.json (Slovenian) * New translations en.json (Slovenian) * New translations en.json (Slovenian) * New translations en.json (Chinese Simplified) * New translations en.json (Norwegian Bokmal) * New translations en.json (French) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Simplified) * Fixing a bad URL that sends the user to docs if they have an open site (#7005) Fixing a bad URL that sends the user to docs if they have an open site http://nightscout.github.io/nightscout/security/#how-to-turn-off-unauthorized-access Co-authored-by: Sulka Haro <[email protected]> * New translations en.json (German) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Greek) * New translations en.json (Greek) * New translations en.json (Greek) * bump share2nightscout-bridge version Use npm update --save share2nightscout-bridge to update package-lock.json and package.json. This should assist in updates intended to help unify Dexcom Account management. * New translations en.json (Hebrew) * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * respect per route body-parser configuration This change allows each route to express policies for interpreting and parsing the request body. Before this change uploads to entries or treatments api would error if they were larger than 100Kb due to the preference being set for the whole server. This change removes the global preference in favor of allowing each route to choose it's own request size limit. We also refactor usage of body-parser to be more consistent throughout the code base. Most routes can use jsonParser, rawPraser, and urlencodedParser provided by the common wares component. Anything doing something else should be called out as such. For example, treatments, activity, and entries allow uploads up to 50Mb. Other v1 endpoints are using the common configuration set to 1Mb. * New translations en.json (Arabic) * New translations en.json (Arabic) * New translations en.json (Arabic) * sanitize x-forwarded-for header (#7122) Many proxies (NGINX included) will generate a list of IPs in v4 and v6 formats. The forwarded-for library is a well-maintained library for express that sanitizes, checks, and validates trusted proxy IPs. This helps eliminate XSS or other attempts to inject invalid material through the x-forwarded-for header. Co-authored-by: Sulka Haro <[email protected]> * Prep next release - 14.2.4 * Add wares to v2 to support request parsing * Move wares to ctx * npm install diffs make package-lock.json match This patch is intended to make everything match for version 14.2.4. * new dev branch starting post 14.2.4 release * Fix api-secret header name in swagger configuration. The /api-docs/ endpoint will now send the correct api-secret header when API_SECRET is used for authentication. * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Polish) * New translations en.json (Polish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Turkish) * New translations en.json (Hebrew) * update minimum version of share2nightscout-bridge Forcing a newer version of share2nightscout-bridge in order to keep up with Dexcom changes. * update minimed-connect-to-nightscout updates Include enhancements on the minimed-connect-to-nightscout plugin to include fetching data from a Careportal account. * Increase accuracy of mg/dl to mmol/l ratio Using a ratio of 18 mg/ml to 1 mmol/l causes NightScout to report different values compared Dexcom app/receivers. A more accurate value is based on 0.0555 mmol/l to 1 mg/dl. The inverse is 18.018018018 mg/dl to 1 mmol/l This puts the value closer to the Dexcom app/receiver. Affected values: |mg/dl| 18|18.018018018| |----:|---:|-----------:| | 109| 6.1| 6.0| | 118| 6.6| 6.5| | 127| 7.1| 7.0| | 136| 7.6| 7.5| | 145| 8.1| 8.0| | 154| 8.6| 8.5| | 163| 9.1| 9.0| | 172| 9.6| 9.5| | 181|10.1| 10.0| | 190|10.6| 10.5| | 199|11.1| 11.0| | 208|11.6| 11.5| | 217|12.1| 12.0| | 226|12.6| 12.5| | 235|13.1| 13.0| | 244|13.6| 13.5| | 253|14.1| 14.0| | 262|14.6| 14.5| | 271|15.1| 15.0| | 280|15.6| 15.5| | 289|16.1| 16.0| | 298|16.6| 16.5| | 307|17.1| 17.0| | 309|17.2| 17.1| | 316|17.6| 17.5| | 318|17.7| 17.6| | 325|18.1| 18.0| | 327|18.2| 18.1| | 334|18.6| 18.5| | 336|18.7| 18.6| | 343|19.1| 19.0| | 345|19.2| 19.1| | 352|19.6| 19.5| | 354|19.7| 19.6| | 361|20.1| 20.0| | 363|20.2| 20.1| | 370|20.6| 20.5| | 372|20.7| 20.6| | 379|21.1| 21.0| | 381|21.2| 21.1| | 388|21.6| 21.5| | 390|21.7| 21.6| | 397|22.1| 22.0| | 399|22.2| 22.1| * Support Dexcom HIGH/LOW when device is share2 Using share2nightscout-bridge, the device property is defined as 'share2' displayBg should honour the Dexcom HIGH and LOW values when the device is share2 This ensures that NightScout returns "LOW" for 39mg/dl and "HIGH" for 401mg/dl as is reported in the Dexcom app/receiver. * Revert "update minimed-connect-to-nightscout updates" This reverts commit 513d155728952a3cb360de3434bc985f606ffc3d. * use newer version of minimed-connect-to-nightscout This patches uses a newer versin of minimed-connect-to-nightscout that is designed to work under the same version of node as Nightscout. It should result in Nightscout gaining a capability to use Medtronic Careportal accounts for cloud to cloud synchronization. * New translations en.json (Chinese Simplified) * Fixes broken Docker image build The `npm audit fix` in the `Dockerfile` is currently deleting vulnerable packages. Although we do want to have package security, this should be done in a development process, not as part of the Docker build. This commit also reduces the Docker image size and improves security. * New translations en.json (Chinese Simplified) * Generating codacy coverage should not fail build This should force the coverage job to return with a success error code. Codacy changed support for legacy projects. This change should not cause builds to fail and should not influence ability to merge pull requests. Until further work with coverage with codacy, this change emits a warning of "NO COVERAGE" while allowing the build to pass, rather than failing the build. * Synchronise the dexcom collection times to reduce refresh lag When collecting date from Dexcom via share2bridge-dexcom before we would poll at regular intervals. Dexcom transmitters / apps refresh every 5 minutes give/take the inaccuracy in the transmitters clock. If we poll every 5 minutes, we will randomly introduce up to 5 minutes of lag before we refresh. For example, if we poll 4:59s after dexcom refreshed we will face a 4:59s lag seeing the latest data arrive This patch introduces a refresh adjustment. We look at the timestamp of the most recent data item and aim to refresh 5 minutes plus a buffer after that timestamp. for example, 5:20s after the most recent data time. the additional buffer gives dexcom a chance to push the data through their application/infrastructure (after the app sends the data, it appears in testing to be around 20s before it is available in the API) This reduces the lag time to a reliable 20 seconds regardless of when nightscout was started and keeps it in track as it drifts forwards and back. * Update test for new default interval The default interval is increasd from 2.5 minutes to 2.6 minutes This change incorporates the lag between the app uploading and the data being available in share2nightscout-bridge This change also accomodates the optimisation of the refresh interval based on the last collected data timestamp Co-authored-by: Sulka Haro <[email protected]> Co-authored-by: Ben West <[email protected]> Co-authored-by: Lennart Goedhart <[email protected]> Co-authored-by: Petr Ondrusek <[email protected]> Co-authored-by: Petr Ondrusek <[email protected]> Co-authored-by: Petr Ondrůšek <[email protected]> Co-authored-by: Tanja <[email protected]> Co-authored-by: tanja3981 <[email protected]> Co-authored-by: Caleb <[email protected]> Co-authored-by: Stephen Brown II <[email protected]> Co-authored-by: Jeremy Cunningham <[email protected]> Co-authored-by: Jeremy Cunningham <[email protected]> Co-authored-by: Jakob <[email protected]> Co-authored-by: Jakob Sandberg <[email protected]> Co-authored-by: Milos Kozak <[email protected]> Co-authored-by: Matt Gaide <[email protected]> Co-authored-by: bassettb <[email protected]> Co-authored-by: philipgo <[email protected]> Co-authored-by: Jason Calabrese <[email protected]> Co-authored-by: Michael Kroes <[email protected]> Co-authored-by: Scott Hanselman <[email protected]> Co-authored-by: Matthew Dawson <[email protected]> Co-authored-by: cpitchford <[email protected]>
1 parent 4fa10de commit 0c9222e

File tree

335 files changed

+54967
-26270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+54967
-26270
lines changed

.deployment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[config]
2-
command = bash deploy.sh
2+
command = bash bin/azure-deploy.sh

.eslintrc.js

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
module.exports = {
2-
"plugins": [ ],
3-
"extends": [
4-
"eslint:recommended"
2+
'plugins': [
3+
'security'
54
],
6-
"parser": "babel-eslint",
7-
"env": {
8-
"browser": true,
9-
"commonjs": true,
10-
"es6": true,
11-
"node": true,
12-
"mocha": true,
13-
"jquery": true
5+
'extends': [
6+
'eslint:recommended',
7+
'plugin:security/recommended'
8+
],
9+
'parser': 'babel-eslint',
10+
'env': {
11+
'browser': true,
12+
'commonjs': true,
13+
'es6': true,
14+
'node': true,
15+
'mocha': true,
16+
'jquery': true
1417
},
15-
"rules": {
16-
"no-unused-vars": [
17-
"error",
18+
'rules': {
19+
'security/detect-object-injection' : 0,
20+
'no-unused-vars': [
21+
'error',
1822
{
19-
"varsIgnorePattern": "should|expect"
23+
'varsIgnorePattern': 'should|expect'
2024
}
2125
]
22-
}
26+
},
27+
'overrides': [
28+
{
29+
'files': ['lib/client/*.js'],
30+
'rules': {
31+
'security/detect-object-injection': 0
32+
}
33+
}
34+
],
2335
};

.github/ISSUE_TEMPLATE/--bug-report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ label: bug
55

66
---
77

8+
**If you need support for Nightscout, PLEASE DO NOT FILE A TICKET HERE**
9+
For support, please post a question to the "CGM in The Cloud" group in Facebook
10+
(https://www.facebook.com/groups/cgminthecloud) or visit the WeAreNotWaiting Discord at https://discord.gg/zg7CvCQ
11+
812
**Describe the bug**
913
A clear and concise description of what the bug is.
1014

.github/ISSUE_TEMPLATE/--feature-request--.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ about: Suggest an idea for this project
44

55
---
66

7+
**If you need support for Nightscout, PLEASE DO NOT FILE A TICKET HERE**
8+
For support, please post a question to the "CGM in The Cloud" group in Facebook
9+
(https://www.facebook.com/groups/cgminthecloud) or visit the WeAreNotWaiting Discord at https://discord.gg/zg7CvCQ
10+
711
**Is your feature request related to a problem? Please describe.**
812
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
913

.github/ISSUE_TEMPLATE/--individual-troubleshooting-help.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Troubleshooting Documentation
4+
url: http://nightscout.github.io/troubleshoot/troublehoot/
5+
about: Having trouble with Nightscout? Please check our step by step troubleshooting instructions.
6+
- name: Nightscout Community Support in Facebook
7+
url: https://www.facebook.com/groups/cgminthecloud
8+
about: If you're a Nightscout user and have trouble with your site, please post questions here. We don't have the resources to answer support questions posted here as tickets.
9+
- name: Nightscout Community Support in Discord
10+
url: https://discord.gg/zg7CvCQ
11+
about: If you're a Nightscout user and have trouble with your site, please post questions here. We don't have the resources to answer support questions posted here as tickets.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
# ******** NOTE ********
12+
13+
name: "CodeQL"
14+
15+
on:
16+
push:
17+
branches: [ dev ]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: [ master ]
21+
schedule:
22+
- cron: '43 23 * * 3'
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: [ 'javascript' ]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
35+
# Learn more:
36+
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v1
45+
with:
46+
languages: ${{ matrix.language }}
47+
# If you wish to specify custom queries, you can do so here or in a config file.
48+
# By default, queries listed here will override any specified in a config file.
49+
# Prefix the list here with "+" to use these queries and those in the config file.
50+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
51+
52+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53+
# If this step fails, then you should remove it and run the build manually (see below)
54+
- name: Autobuild
55+
uses: github/codeql-action/autobuild@v1
56+
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 https://git.io/JvXDl
59+
60+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
61+
# and modify them (or add more) to build your code if your project
62+
# uses a compiled language
63+
64+
#- run: |
65+
# make bootstrap
66+
# make release
67+
68+
- name: Perform CodeQL Analysis
69+
uses: github/codeql-action/analyze@v1

.github/workflows/main.yml

Lines changed: 86 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,93 @@
1-
name: CI test
1+
name: CI test and publish Docker image
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches:
10+
- master
11+
- dev
412

513
jobs:
6-
build:
7-
8-
runs-on: ubuntu-16.04
9-
14+
test:
15+
name: Run Tests
16+
runs-on: ubuntu-latest
1017
strategy:
1118
matrix:
12-
node-version: [10.x, 12.x]
19+
node-version: [12.x, 14.x]
20+
mongodb-version: [4.2, 4.4]
21+
22+
steps:
23+
- name: Git Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Start MongoDB ${{ matrix.mongodb-version }}
32+
uses: supercharge/[email protected]
33+
with:
34+
mongodb-version: ${{ matrix.mongodb-version }}
35+
36+
- name: Install dependencies
37+
run: npm install
38+
- name: Run Tests
39+
run: npm run-script test-ci
40+
- name: Send Coverage
41+
run: npm run-script coverage
42+
43+
publish_dev:
44+
name: Publish dev branch to Docker Hub
45+
needs: test
46+
runs-on: ubuntu-latest
47+
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'
48+
env:
49+
DOCKER_IMAGE: nightscout/cgm-remote-monitor
50+
steps:
51+
- name: Login to Docker Hub
52+
uses: docker/login-action@v1
53+
with:
54+
username: ${{ secrets.DOCKER_USER }}
55+
password: ${{ secrets.DOCKER_PASS }}
56+
- name: Clean git Checkout
57+
if: success()
58+
uses: actions/checkout@v2
59+
- name: Build, tag and push the dev Docker image
60+
if: success()
61+
run: |
62+
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} .
63+
docker image push ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
64+
docker tag ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} ${{ env.DOCKER_IMAGE }}:latest_dev
65+
docker image push ${{ env.DOCKER_IMAGE }}:latest_dev
1366
67+
publish_master:
68+
name: Publish master branch to Docker Hub
69+
needs: test
70+
runs-on: ubuntu-latest
71+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'nightscout'
72+
env:
73+
DOCKER_IMAGE: nightscout/cgm-remote-monitor
1474
steps:
15-
- uses: actions/checkout@v1
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: Install dependencies
21-
run: npm install
22-
- name: Install MongoDB
23-
run: |
24-
wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
25-
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
26-
sudo apt-get update
27-
sudo apt-get install -y mongodb-org
28-
sudo apt-get install -y --allow-downgrades mongodb-org=3.6.14 mongodb-org-server=3.6.14 mongodb-org-shell=3.6.14 mongodb-org-mongos=3.6.14 mongodb-org-tools=3.6.14
29-
- name: Start MongoDB
30-
run: sudo systemctl start mongod
31-
- name: Run tests
32-
run: npm run-script test-ci
75+
- name: Login to Docker Hub
76+
uses: docker/login-action@v1
77+
with:
78+
username: ${{ secrets.DOCKER_USER }}
79+
password: ${{ secrets.DOCKER_PASS }}
80+
- name: Clean git Checkout
81+
if: success()
82+
uses: actions/checkout@v2
83+
- name: get-npm-version
84+
if: success()
85+
id: package-version
86+
uses: martinbeentjes/npm-get-version-action@master
87+
- name: Build, tag and push the master Docker image
88+
if: success()
89+
run: |
90+
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} .
91+
docker image push ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
92+
docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} ${{ env.DOCKER_IMAGE }}:latest
93+
docker image push ${{ env.DOCKER_IMAGE }}:latest

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bundle/bundle.out.js
99
*.iml
1010
my.env
1111
my.*.env
12+
*.pem
1213

1314
static/bower_components/
1415
.*.sw?
@@ -28,5 +29,8 @@ npm-debug.log
2829
/cgm-remote-monitor.njsproj
2930
/cgm-remote-monitor.sln
3031
/obj/Debug
31-
/bin
3232
/*.bat
33+
34+
# directories created by docker-compose.yml
35+
mongo-data/
36+
letsencrypt/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.16.0
1+
14.15.3

0 commit comments

Comments
 (0)