Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Downstream Sync #10

Merged
merged 78 commits into from
Jan 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f08f9ea
* Bump version to 14.0.7
sulkaharo Sep 30, 2020
b6bde83
Fixed #5852 - Updated Google Home setup steps (#6195)
inventor96 Oct 5, 2020
d9e63fb
Fix broken swagger for APIv3 (#6201)
PetrOndrusek Oct 18, 2020
76b9de9
Use lodash.get() in virtual assistant API endpoints (v2) (#6199)
inventor96 Oct 20, 2020
7753241
Corrected setup of `dbsize` for virtual assistants (#6270)
inventor96 Oct 20, 2020
fe33f7f
Create config.yml
sulkaharo Oct 29, 2020
8ba3793
Delete --individual-troubleshooting-help.md
sulkaharo Oct 29, 2020
bc55b07
Update config.yml
sulkaharo Oct 29, 2020
b762ade
Fix batch (#6248)
sulkaharo Nov 10, 2020
f81ac59
Adding Hungarian translation to nightscout (#6037)
smilodonis Nov 11, 2020
6a84be1
Update language.js (#6193)
bjornoleh Nov 11, 2020
60424d3
#5991 Typo in translation (#6217)
mg80 Nov 11, 2020
92ac596
add missing translations (#6346)
herzogmedia Nov 11, 2020
ead1370
Updated Alexa's intents because Amazon required new ones yet again. (…
inventor96 Nov 12, 2020
376c790
Add runtime state tracking to Nightscout, where client now checks if …
sulkaharo Nov 14, 2020
978f205
Add file missing from previous commit
sulkaharo Nov 14, 2020
85c59a6
Merge branch 'master' into dev
sulkaharo Nov 14, 2020
5f59c1d
Update app.json
sulkaharo Nov 14, 2020
384de77
Fix unit tests
sulkaharo Nov 14, 2020
edf432a
Merge branch 'master' into dev
sulkaharo Nov 14, 2020
d7f472a
Fix the read detection to work correctly with MongoDB Atlas
sulkaharo Nov 14, 2020
a9692d1
* Added basal and careportal to default plugins
sulkaharo Nov 15, 2020
e7d080a
Increase load interval to 5 seconds
sulkaharo Nov 15, 2020
257dfb2
Merge pull request #6445 from nightscout/dev
sulkaharo Nov 15, 2020
cb14de0
Bump version to 14.0.8
sulkaharo Nov 15, 2020
695e98b
Create codeql-analysis.yml
sulkaharo Nov 15, 2020
2a96c44
Merge branch 'master' into dev
sulkaharo Nov 15, 2020
c9156bd
Revised Norwegian (nb) translations (#6525)
bjornoleh Nov 17, 2020
4ace125
Move localisation to Crowdin (#6518)
sulkaharo Nov 17, 2020
74cf673
* Reformat the source language file
sulkaharo Nov 18, 2020
15f47f6
One more tiny formatting fix
sulkaharo Nov 18, 2020
76ce300
Inzulin -> Insulin in English
sulkaharo Nov 18, 2020
cb7c74e
Fix typo in Portugues Brazilian language code
sulkaharo Nov 23, 2020
fc849fb
New Crowdin updates (#6535)
sulkaharo Nov 23, 2020
8367d00
Update CONTRIBUTING.md (#6540)
bjornoleh Nov 23, 2020
3680975
Typo correction (#6558)
inventor96 Nov 23, 2020
4c12fe6
Increased the width of the inlinepiechart to fit the Dutch translated…
yodax Nov 23, 2020
7a3b968
Refactor `mongo-storage.js` (#6589)
pazaan Nov 30, 2020
d0cf72a
Fixes the color changes based on BG target preferences in the clock v…
sulkaharo Dec 8, 2020
512139e
Added some boot logging & allow booting using Node 14 LTS
sulkaharo Dec 9, 2020
bc0f817
* Fix a bug with reloading while the server is starting
sulkaharo Dec 9, 2020
f02b8d9
Fix timing issue with a test using async, causing tests to randomly fail
sulkaharo Dec 10, 2020
7fe8e32
Refactor core auth (#6596)
sulkaharo Dec 10, 2020
71a5354
New Crowdin updates (#6567)
sulkaharo Dec 10, 2020
f2fd923
Bump version to 14.1.0 given changes to auth and localization
sulkaharo Dec 14, 2020
558ddb4
New Crowdin updates (#6640)
sulkaharo Dec 14, 2020
9a6ee8a
Fix applying localizations to plugin names in client preferences
sulkaharo Dec 14, 2020
c12ad76
* Refactor how the levels dependency is loaded, to fix some localizat…
sulkaharo Dec 14, 2020
a073841
Oops, push the unit test changes as well
sulkaharo Dec 14, 2020
7c3ab00
Fix pushover init
sulkaharo Dec 14, 2020
d81e342
Fix pushover test
sulkaharo Dec 14, 2020
9e3d9a6
New Crowdin updates (#6652)
sulkaharo Dec 14, 2020
0a2fee8
Various fixes to localization - #6516 #6523 #6524
sulkaharo Dec 15, 2020
b09e463
Test new dev version of minimed-connect-to-nightscout
bewest Dec 16, 2020
8c59de8
* More small localization fixes
sulkaharo Dec 17, 2020
2eb9cf8
Merge branch 'dev' into wip/bewest/mmconnect
bewest Dec 18, 2020
4bdd271
Fix upbat.js levels reference
sulkaharo Dec 21, 2020
edfcf6e
Fix authorization renewal
sulkaharo Dec 21, 2020
0a15938
New Crowdin updates (#6653)
sulkaharo Dec 21, 2020
2c30b64
Add a missing localization, fix unit tests
sulkaharo Dec 21, 2020
92cc12e
Fix a localization key
sulkaharo Dec 22, 2020
4b98d35
Merge branch 'dev' into wip/bewest/mmconnect
bewest Dec 22, 2020
186e978
Rename Weekly Success report to Weekly Distribution
sulkaharo Dec 24, 2020
f36048d
Fix a bug with auth calls that send a false API secret
sulkaharo Dec 27, 2020
fc9fd34
upgrade minimed-connect-to-nightscout 1.5.0
bewest Dec 30, 2020
e3784ea
Merge branch 'dev' into wip/bewest/mmconnect
bewest Dec 30, 2020
76f198a
Merge branch 'wip/bewest/mmconnect' of github.com:nightscout/cgm-remo…
bewest Dec 30, 2020
411463e
Replace Travis build with a GitHub Action (#6690)
pazaan Jan 1, 2021
6b28a14
APIv3: Cache invalidation + refactoring (#6688)
PetrOndrusek Jan 1, 2021
923cdad
New Crowdin updates (#6675)
sulkaharo Jan 1, 2021
405eb0d
german translations template for googlehome integration (#6674)
tanja3981 Jan 1, 2021
773f89e
Added support for multiple uploaders in virtual assistant delta calc…
inventor96 Jan 2, 2021
3c61266
Removed duplicate translation key (#6699)
inventor96 Jan 2, 2021
82a9e18
New Crowdin updates (#6700)
sulkaharo Jan 4, 2021
46e4d17
* Additional unit test for the authorization API
sulkaharo Jan 4, 2021
3eeacc3
Merge pull request #6650 from nightscout/dev
sulkaharo Jan 6, 2021
e893d73
Cherry picking CI flow file so users don't get a CI build fail after …
sulkaharo Jan 12, 2021
317db57
Merge pull request #9 from nightscout/master
gruoner Jan 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/--individual-troubleshooting-help.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Troubleshooting Documentation
url: http://nightscout.github.io/troubleshoot/troublehoot/
about: Having trouble with Nightscout? Please check our step by step troubleshooting instructions.
- name: Nightscout Community Support in Facebook
url: https://www.facebook.com/groups/cgminthecloud
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.
- name: Nightscout Community Support in Discord
url: https://discord.gg/zg7CvCQ
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.
68 changes: 68 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
# ******** NOTE ********

name: "CodeQL"

on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '43 23 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
113 changes: 86 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,93 @@
name: CI test
name: CI test and publish Docker image

on: [push, pull_request]
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
build:

runs-on: ubuntu-16.04

test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [12.x, 14.x]
mongodb-version: [4.2, 4.4]

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

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

- name: Start MongoDB ${{ matrix.mongodb-version }}
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}

- name: Install dependencies
run: npm install
- name: Run Tests
run: npm run-script test-ci
- name: Send Coverage
run: npm run-script coverage

publish_dev:
name: Publish dev branch to Docker Hub
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v2
- name: Build, tag and push the dev Docker image
if: success()
run: |
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} .
docker image push ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
docker tag ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} ${{ env.DOCKER_IMAGE }}:latest_dev
docker image push ${{ env.DOCKER_IMAGE }}:latest_dev

publish_master:
name: Publish master branch to Docker Hub
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.repository_owner == 'nightscout'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Install MongoDB
run: |
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo apt-get install -y --allow-downgrades mongodb-org=4.4.0 mongodb-org-server=4.4.0 mongodb-org-shell=4.4.0 mongodb-org-mongos=4.4.0 mongodb-org-tools=4.4.0
- name: Start MongoDB
run: sudo systemctl start mongod
- name: Run Tests
run: npm run-script test-ci
- name: Send Coverage
run: npm run-script coverage
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v2
- name: get-npm-version
if: success()
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Build, tag and push the master Docker image
if: success()
run: |
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} .
docker image push ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} ${{ env.DOCKER_IMAGE }}:latest
docker image push ${{ env.DOCKER_IMAGE }}:latest
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.16.0
14.15.3
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

42 changes: 4 additions & 38 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- [List of Contributors](#list-of-contributors)
- [Core developers, contributing developers, coordinators and documentation writers](#core-developers-contributing-developers-coordinators-and-documentation-writers)
- [Plugin contributors](#plugin-contributors)
- [Translators](#translators)
- [List of all contributors](#list-of-all-contributors)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand All @@ -36,6 +35,10 @@
[discord-img]: https://img.shields.io/discord/629952586895851530?label=discord%20chat
[discord-url]: https://discord.gg/rTKhrqz

## Translations

Please visit our [project in Crowdin](https://crowdin.com/project/nightscout) to translate Nigthscout. If you want to add a new language, please get in touch with the dev team in [Discord][discord-url].

## Installation for development

Nightscout is a Node.js application. The basic installation of the software for local purposes is:
Expand Down Expand Up @@ -188,8 +191,6 @@ Also if you can't code, it's possible to contribute by improving the documentati
| Core developers: | [@jasoncalabrese] [@MilosKozak] [@PieterGit] [@sulkaharo] |
| Former Core developers: (not active): | [@bewest] |
| Contributing developers: | [@jpcunningh] [@scottleibrand] [@komarserjio] [@jweismann] |
| Release coordination 0.10.x: | [@PieterGit] [@sulkaharo] |
| Release coordination 0.11.x: | [@PieterGit] |
| Issue/Pull request coordination: | Please volunteer |
| Cleaning up git fork spam: | Please volunteer |
| Documentation writers: | [@andrew-warrington] [@unsoluble] [@tynbendad] [@danamlewis] [@rarneson] |
Expand Down Expand Up @@ -230,41 +231,6 @@ Also if you can't code, it's possible to contribute by improving the documentati
| [`upbat` (Uploader Battery)](README.md#upbat-uploader-battery)| [@jpcunningh] | Please volunteer |
| [`xdrip-js` (xDrip-js)](README.md#xdrip-js-xdrip-js)| [@jpcunningh] | Please volunteer |

### Translators

See `/translations` of your Nightscout, to view the current translation coverage and the missing items.
Languages with less than 90% coverage will be removed in a future Nightscout versions.

| Language | List of translators | Status
| ------------- | -------------------- |-------------------- |
| Български (`bg`) |Please volunteer| OK |
| Čeština (`cs`) |Please volunteer|OK |
| Deutsch (`de`) |[@viderehh] [@herzogmedia] |OK |
| Dansk (`dk`) | [@janrpn] |OK |
| Ελληνικά (`el`)|Please volunteer|Needs attention: 68.5%|
| English (`en`)|Please volunteer|OK|
| Español (`es`) |Please volunteer|OK|
| Suomi (`fi`)|[@sulkaharo] |OK|
| Français (`fr`)|Please volunteer|OK|
| עברית (`he`)| [@jakebloom] |OK|
| Hrvatski (`hr`)|[@OpossumGit]|OK|
| Italiano (`it`)|Please volunteer|OK|
| 日本語 (`ja`)|[@LuminaryXion]|Working on this|
| 한국어 (`ko`)|Please volunteer|Needs attention: 80.6%|
| Norsk (Bokmål) (`nb`)|Please volunteer|OK|
| Nederlands (`nl`)|[@PieterGit]|OK|
| Polski (`pl`)|[@Bartlomiejsz]|OK|
| Português (Brasil) (`pt`)|Please volunteer|OK|
| Română (`ro`)|Please volunteer|OK|
| Русский (`ru`)|[@apanasef]|OK|
| Slovenčina (`sk`)|Please volunteer|OK|
| Svenska (`sv`)|Please volunteer|OK|
| Türkçe (`tr`)|[@diabetlum]|OK|
| 中文(简体) (`zh_cn`) | [@jizhongwen]|OK|
| 中文(繁體) (`zh_tw`) | [@jizhongwen]|Needs attention: 25.0%
| 日本語 (`ja_jp`) | [@LuminaryXion]|


### List of all contributors
| Contribution area | List of contributors |
| ------------------------------------- | -------------------- |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.example → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:10-alpine
FROM node:14.15.3-alpine

MAINTAINER Nightscout Contributors
LABEL maintainer="Nightscout Contributors"

RUN mkdir -p /opt/app
ADD . /opt/app
Expand Down
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MONGO_SETTINGS=MONGO_CONNECTION=${MONGO_CONNECTION} \
# coverage reporter's ability to instrument the tests correctly.
# Hard coding it to the local with our pinned version is bigger for
# initial installs, but ensures a consistent environment everywhere.
# On Travis, ./node_modules/.bin and other `nvm` and `npm` bundles are
# On GA, ./node_modules/.bin and other `nvm` and `npm` bundles are
# inserted into the default `$PATH` enviroinment, making pointing to
# the unwrapped mocha executable necessary.
MOCHA=./node_modules/mocha/bin/_mocha
Expand All @@ -25,7 +25,7 @@ ANALYZED=./coverage/lcov.info
# Following token deprecated
# export CODACY_REPO_TOKEN=e29ae5cf671f4f918912d9864316207c

DOCKER_IMAGE=nightscout/cgm-remote-monitor-travis
DOCKER_IMAGE=nightscout/cgm-remote-monitor

all: test

Expand All @@ -48,7 +48,7 @@ test_onebyone:
test:
${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap ${TESTS}

travis:
ci_tests:
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
# NODE_ENV=test ${MONGO_SETTINGS} \
# ${ISTANBUL} cover ${MOCHA} --report lcovonly -- --timeout 5000 -R tap ${TESTS}
Expand All @@ -57,28 +57,25 @@ travis:
docker_release:
# Get the version from the package.json file
$(eval DOCKER_TAG=$(shell cat package.json | jq '.version' | tr -d '"'))
$(eval NODE_VERSION=$(shell cat .nvmrc))
$(eval BRANCH=$(lastword $(subst /, ,$(GITHUB_REF))))
#
# Create a Dockerfile that contains the correct NodeJS version
cat Dockerfile.example | sed -e "s/^FROM node:.*/FROM node:${NODE_VERSION}/" > Dockerfile
#
# Rebuild the image. We do this with no-cache so that we have all security upgrades,
# since that's more important than fewer layers in the Docker image.
docker build --no-cache=true -t $(DOCKER_IMAGE):$(DOCKER_TAG) .
# Push an image to Docker Hub with the version from package.json:
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
#
# Push the master branch to Docker hub as 'latest'
if [ "$(TRAVIS_BRANCH)" = "master" ]; then \
if [ "$(BRANCH)" = "master" ]; then \
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest && \
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
docker push $(DOCKER_IMAGE):latest; \
fi
#
# Push the dev branch to Docker Hub as 'latest_dev'
if [ "$(TRAVIS_BRANCH)" = "dev" ]; then \
if [ "$(BRANCH)" = "dev" ]; then \
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest_dev && \
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
docker push $(DOCKER_IMAGE):latest_dev; \
fi
rm -f Dockerfile

.PHONY: all coverage docker_release report test travis
.PHONY: all coverage docker_release report test ci_tests
Loading