From 319210edf4954b3f0833d565a3f2be54724513b9 Mon Sep 17 00:00:00 2001 From: hans Date: Mon, 21 Feb 2022 19:39:13 +0100 Subject: [PATCH 1/3] Fix docu. --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6ab1c6e313b..2ce76fd23ab 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,21 @@ The script takes the following environment variables |LINK_UP_USERNAME|LibreLink Up Login Email|mail@example.com| |LINK_UP_PASSWORD|LibreLink Up Login Password|mypassword| |NIGHTSCOUT_URL|Hostname of the Nightscout instance (without https://)|nightscout.yourdomain.com| -|NIGHTSCOUT_API_TOKEN|Nightscout access token|librelinku-123456789abcde| +|NIGHTSCOUT_API_TOKEN|SHA1 Hash of Nightscout access token| +162f14de46149447c3338a8286223de407e3b2fa| ## Usage There are different options for using this script. -### Variant 1: Local +### Variant 1: On Heroku + +- Click [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/timoschlueter/nightscout-librelink-up) +- Login to Heroku if not already happened +- Provide proper values for the `environment variables` +- **Important: make sure that yor Nightscout API token is hashed with SHA1** +- Click `Deploy` to deploy the app + +### Variant 2: Local The installation process can be startetd by running `npm install` in the root directory. @@ -27,14 +36,15 @@ To start the process simply create a bash script with the set environment variab export LINK_UP_USERNAME="mail@example.com" export LINK_UP_PASSWORD="mypassword" export NIGHTSCOUT_URL="nightscout.yourdomain.com" -export NIGHTSCOUT_API_TOKEN="librelinku-123456789abcde" +# use `shasum` instead of `sha1sum` on Mac +export NIGHTSCOUT_API_TOKEN=$(echo -n "foo-bar-baz" | sha1sum | cut -d ' ' -f 1) npm start ``` Execute the script and check the console output. -### Variant 2: Docker +### Variant 3: Docker The easiest way to use this is to use the latest docker image: ``` @@ -44,7 +54,7 @@ docker run -e LINK_UP_USERNAME="mail@example.com" \ -e NIGHTSCOUT_API_TOKEN="librelinku-123456789abcde" timoschlueter/nightscout-librelink-up ``` -### Variant 3: Docker Compose +### Variant 4: Docker Compose If you are already using a dockerized Nightscout instance, this image can be easily added to your existing docker-compose file: ``` From ac786d9ca5f6e6404900660c861cd3f231133ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Schl=C3=BCter?= Date: Mon, 21 Feb 2022 19:52:50 +0100 Subject: [PATCH 2/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6e6c612508..d527bf7b3fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightscout-librelink-up", - "version": "1.4.0", + "version": "1.4.1", "description": "Script written in JavaScript (Node) that uploads CGM readings from LibreLink Up to Nightscout", "main": "index.js", "scripts": { From 4651516fc90c0d78ae4f83c608c7749a3a3d349a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 18:53:34 +0000 Subject: [PATCH 3/3] Bump follow-redirects from 1.14.7 to 1.14.9 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.9. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.9) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 050799d652e..744ab4df720 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,9 +101,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", "funding": [ { "type": "individual", @@ -394,9 +394,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" }, "inherits": { "version": "2.0.4",