Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nitor into rds-custom

* 'master' of https://github.com/kimberscott/cgm-remote-monitor: (194 commits)
  New translations en.json (Hungarian) (nightscout#6908)
  New translations en.json (Hungarian) (nightscout#6907)
  New translations en.json (Hungarian)
  New translations en.json (Swedish)
  New translations en.json (Spanish)
  New translations en.json (Czech)
  New translations en.json (Danish)
  New translations en.json (German)
  New translations en.json (Finnish)
  New translations en.json (Norwegian Bokmal)
  New translations en.json (Dutch)
  New translations en.json (Portuguese)
  Update source file en.json
  New translations en.json (Slovak)
  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 (Spanish)
  ...

# Conflicts:
#	lib/plugins/careportal.js
  • Loading branch information
Kim Scott committed Apr 5, 2021
2 parents 4a5bf53 + 35d1779 commit 0387e37
Show file tree
Hide file tree
Showing 280 changed files with 45,386 additions and 22,188 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
}
}
],
};
69 changes: 69 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'

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

47 changes: 7 additions & 40 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 @@ -35,6 +34,11 @@
[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

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

Expand All @@ -46,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 Expand Up @@ -188,8 +192,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 +232,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
Loading

0 comments on commit 0387e37

Please sign in to comment.