Skip to content

Commit 50b5e47

Browse files
committed
fix: naming consistency across app - actual app name is LibreLinkUp not LibreLink Up
1 parent f68450d commit 50b5e47

8 files changed

Lines changed: 51 additions & 51 deletions

File tree

.env.example

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# Copy this file to `.env` and adjust the values accordingly.
22
# All commented-out options below are optional config settings - uncomment the line to explicitly set and use a value.
33

4-
###################
5-
# LibreLink config
6-
###################
4+
####################
5+
# LibreLinkUp config
6+
####################
77

8-
# LibreLink Up Login Email
8+
# LibreLinkUp Login Email
99
LINK_UP_USERNAME="mail@example.com"
1010

11-
# LibreLink Up Login Password
11+
# LibreLinkUp Login Password
1212
LINK_UP_PASSWORD="mypassword"
1313

14-
# LibreLink Up Patient-ID. Can be received from the console output if multiple connections are available.
14+
# LibreLinkUp Patient-ID. Can be received from the console output if multiple connections are available.
1515
#LINK_UP_CONNECTION="123456abc-abcd-efgh-7891def"
1616

17-
# The time interval (in minutes) of requesting values from libre link up.
17+
# The time interval (in minutes) of requesting values from LibreLinkUp.
1818
#LINK_UP_TIME_INTERVAL=5
1919

2020
# Your region. Used to determine the correct LibreLinkUp service.
2121
# Possible values: AE, AP, AU, CA, DE, EU, EU2, FR, JP, US, LA, RU, CN
2222
#LINK_UP_REGION="EU"
2323

24-
# LibreLink Up App Version.
25-
# This may need to be updated if you are using a newer version of the LibreLink Up App.
24+
# LibreLinkUp App Version.
25+
# This may need to be updated if you are using a newer version of the LibreLinkUp App.
2626
#LINK_UP_VERSION=4.16.0
2727

28-
###################
28+
####################
2929
# Nightscout config
30-
###################
30+
####################
3131

3232
# Hostname of the Nightscout instance (without https://)
3333
NIGHTSCOUT_URL="nightscout.yourdomain.com"
@@ -42,16 +42,16 @@ NIGHTSCOUT_API_TOKEN="162f14de46149447c3338a8286223de407e3b2fa"
4242
# Sets the device name used in Nightscout
4343
#NIGHTSCOUT_DEVICE_NAME="nightscout-librelink-up"
4444

45-
###################
45+
####################
4646
# Script config
47-
###################
47+
####################
4848

4949
# The setting of verbosity for logging, should be one of info or debug
5050
#LOG_LEVEL="info"
5151

5252
# Disables the scheduler and runs the script just once
5353
#SINGLE_SHOT=true
5454

55-
# Upload all available data from LibreLink Up instead of just data newer than last upload.
55+
# Upload all available data from LibreLinkUp instead of just data newer than last upload.
5656
# LibreLinkUp sometimes lags behind in reporting recent historical data, so it is advised to run the script with ALL_DATA set to true at least once a day.
5757
#ALL_DATA=true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN npm run build
2222
RUN npm prune --omit dev
2323

2424
FROM node:20-bookworm-slim
25-
LABEL description="Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout"
25+
LABEL description="Script written in TypeScript that uploads CGM readings from LibreLinkUp to Nightscout"
2626

2727
COPY --from=build-stage /usr/src/app /usr/src/app
2828

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Nightscout LibreLink Up Uploader/Sidecar
1+
# Nightscout LibreLinkUp Uploader/Sidecar
22

33
![docker-image](https://github.com/timoschlueter/nightscout-librelink-up/actions/workflows/docker-image.yml/badge.svg)
44

5-
Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout. The upload should
5+
Script written in TypeScript that uploads CGM readings from LibreLinkUp to Nightscout. The upload should
66
work with at least Freestyle Libre 2 (FGM) and Libre 3 CGM sensors.
77

88
<a href="https://cloud.digitalocean.com/apps/new?repo=https://github.com/timoschlueter/nightscout-librelink-up/tree/main&refcode=0b12ad5a5fe6" target="_blank">
@@ -19,21 +19,21 @@ work with at least Freestyle Libre 2 (FGM) and Libre 3 CGM sensors.
1919

2020
The script takes the following environment variables:
2121

22-
| Variable | Description | Example | Required |
23-
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|----------|
24-
| LINK_UP_USERNAME | LibreLink Up Login Email | mail@example.com | X |
25-
| LINK_UP_PASSWORD | LibreLink Up Login Password | mypassword | X |
26-
| LINK_UP_CONNECTION | LibreLink Up Patient-ID. Can be received from the console output if multiple connections are available. | 123456abc-abcd-efgh-7891def | |
27-
| LINK_UP_TIME_INTERVAL | The time interval (in minutes) of requesting values from libre link up. | 5 | |
28-
| LINK_UP_REGION | Your region. Used to determine the correct LibreLinkUp service (Possible values: AE, AP, AU, CA, DE, EU, EU2, FR, JP, US, LA, RU, CN) | EU | |
29-
| LINK_UP_VERSION | LibreLink Up App Version. This may need to be updated if you are using a newer version of the LibreLink Up App. | 4.16.0 | |
30-
| NIGHTSCOUT_URL | Hostname of the Nightscout instance (without https://) | nightscout.yourdomain.com | X |
31-
| NIGHTSCOUT_API_TOKEN | SHA1 Hash of Nightscout access token | 162f14de46149447c3338a8286223de407e3b2fa | X |
32-
| NIGHTSCOUT_DISABLE_HTTPS | Disables the HTTPS requirement for Nightscout URLs | true | |
33-
| NIGHTSCOUT_DEVICE_NAME | Sets the device name used in Nightscout | nightscout-librelink-up | |
34-
| LOG_LEVEL | The setting of verbosity for logging, should be one of info or debug | info | |
35-
| SINGLE_SHOT | Disables the scheduler and runs the script just once | true | |
36-
| ALL_DATA | Upload all available data from LibreLink Up instead of just data newer than last upload. LibreLinkUp sometimes lags behind in reporting recent historical data, so it is advised to run the script with ALL_DATA set to true at least once a day. | true | |
22+
| Variable | Description | Example | Required |
23+
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|----------|
24+
| LINK_UP_USERNAME | LibreLinkUp Login Email | mail@example.com | X |
25+
| LINK_UP_PASSWORD | LibreLinkUp Login Password | mypassword | X |
26+
| LINK_UP_CONNECTION | LibreLinkUp Patient-ID. Can be received from the console output if multiple connections are available. | 123456abc-abcd-efgh-7891def | |
27+
| LINK_UP_TIME_INTERVAL | The time interval (in minutes) of requesting values from LibreLinkUp. | 5 | |
28+
| LINK_UP_REGION | Your region. Used to determine the correct LibreLinkUp service (Possible values: AE, AP, AU, CA, DE, EU, EU2, FR, JP, US, LA, RU, CN) | EU | |
29+
| LINK_UP_VERSION | LibreLinkUp App Version. This may need to be updated if you are using a newer version of the LibreLinkUp App. | 4.16.0 | |
30+
| NIGHTSCOUT_URL | Hostname of the Nightscout instance (without https://) | nightscout.yourdomain.com | X |
31+
| NIGHTSCOUT_API_TOKEN | SHA1 Hash of Nightscout access token | 162f14de46149447c3338a8286223de407e3b2fa | X |
32+
| NIGHTSCOUT_DISABLE_HTTPS | Disables the HTTPS requirement for Nightscout URLs | true | |
33+
| NIGHTSCOUT_DEVICE_NAME | Sets the device name used in Nightscout | nightscout-librelink-up | |
34+
| LOG_LEVEL | The setting of verbosity for logging, should be one of info or debug | info | |
35+
| SINGLE_SHOT | Disables the scheduler and runs the script just once | true | |
36+
| ALL_DATA | Upload all available data from LibreLinkUp instead of just data newer than last upload. LibreLinkUp sometimes lags behind in reporting recent historical data, so it is advised to run the script with ALL_DATA set to true at least once a day. | true | |
3737

3838
These variables can be set in your environment or in a `.env` file in the root directory of the project - see `.env.example` for an example (copy this file to `.env` and adjust the values accordingly).
3939

app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"required": false
2929
},
3030
"LINK_UP_TIME_INTERVAL": {
31-
"description": "The time interval (in minutes) in which the values should be retrieved from Libre Link Up",
31+
"description": "The time interval (in minutes) in which the values should be retrieved from LibreLinkUp",
3232
"value": "5",
3333
"required": true
3434
},
@@ -38,7 +38,7 @@
3838
"required": false
3939
},
4040
"LINK_UP_VERSION": {
41-
"description": "LibreLink Up App Version. This may need to be updated if you are using a newer version of the LibreLink Up App",
41+
"description": "LibreLinkUp App Version. This may need to be updated if you are using a newer version of the LibreLinkUp App",
4242
"value": "4.16.0",
4343
"required": false
4444
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nightscout-librelink-up",
33
"version": "3.2.0",
4-
"description": "Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout",
4+
"description": "Script written in TypeScript that uploads CGM readings from LibreLinkUp to Nightscout",
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "npx tsc",

src/index.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Nightscout LibreLink Up Uploader/Sidecar
3-
* Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout.
2+
* Nightscout LibreLinkUp Uploader/Sidecar
3+
* Script written in TypeScript that uploads CGM readings from LibreLinkUp to Nightscout.
44
*
55
* SPDX-License-Identifier: MIT
66
*/
@@ -80,7 +80,7 @@ axios.interceptors.response.use(
8080
const USER_AGENT = "Mozilla/5.0 (iPhone; CPU OS 17_4.1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/17.4.1 Mobile/10A5355d Safari/8536.25";
8181

8282
/**
83-
* LibreLink Up API Settings (Don't change this unless you know what you are doing)
83+
* LibreLinkUp API Settings (Don't change this unless you know what you are doing)
8484
*/
8585
const LIBRE_LINK_UP_VERSION = config.linkUpVersion;
8686
const LIBRE_LINK_UP_PRODUCT = "llu.ios";
@@ -129,7 +129,7 @@ async function main(): Promise<void>
129129
const authTicket: AuthTicket | null = await login();
130130
if (!authTicket)
131131
{
132-
logger.error("LibreLink Up - No AuthTicket received. Please check your credentials.");
132+
logger.error("LibreLinkUp - No AuthTicket received. Please check your credentials.");
133133
deleteAuthTicket();
134134
deleteAccountId();
135135
return;
@@ -171,23 +171,23 @@ export async function login(): Promise<AuthTicket | null>
171171
{
172172
if (response.data.status !== 0)
173173
{
174-
logger.error(`LibreLink Up - Non-zero status code: ${JSON.stringify(response.data)}`)
174+
logger.error(`LibreLinkUp - Non-zero status code: ${JSON.stringify(response.data)}`)
175175
return null;
176176
}
177177
if (response.data.data.redirect === true && response.data.data.region)
178178
{
179179
const correctRegion = response.data.data.region.toUpperCase();
180180
logger.error(
181-
`LibreLink Up - Logged in to the wrong region. Switch to '${correctRegion}' region.`
181+
`LibreLinkUp - Logged in to the wrong region. Switch to '${correctRegion}' region.`
182182
);
183183
return null;
184184
}
185-
logger.info("Logged in to LibreLink Up");
185+
logger.info("Logged in to LibreLinkUp");
186186
updateAccountId(response.data.data.user.id);
187187
return response.data.data.authTicket;
188188
} catch (err)
189189
{
190-
logger.error("Invalid authentication token. Please check your LibreLink Up credentials", err);
190+
logger.error("Invalid authentication token. Please check your LibreLinkUp credentials", err);
191191
return null;
192192
}
193193
} catch (error)
@@ -249,13 +249,13 @@ export async function getLibreLinkUpConnection(): Promise<string | null>
249249

250250
if (connectionData.length === 0)
251251
{
252-
logger.error("No LibreLink Up connection found");
252+
logger.error("No LibreLinkUp connection found");
253253
return null;
254254
}
255255

256256
if (connectionData.length === 1)
257257
{
258-
logger.info("Found 1 LibreLink Up connection.");
258+
logger.info("Found 1 LibreLinkUp connection.");
259259
logPickedUpConnection(connectionData[0]);
260260
return connectionData[0].patientId;
261261
}
@@ -346,7 +346,7 @@ async function uploadToNightScout(measurementData: GraphData): Promise<void>
346346

347347
function dumpConnectionData(connectionData: Connection[]): void
348348
{
349-
logger.debug("Found " + connectionData.length + " LibreLink Up connections:");
349+
logger.debug("Found " + connectionData.length + " LibreLinkUp connections:");
350350
connectionData.map((connectionEntry: Connection, index: number) =>
351351
{
352352
logger.debug("[" + (index + 1) + "] " + connectionEntry.firstName + " " + connectionEntry.lastName + " (Patient-ID: " +

tests/unit-tests/helpers/helpers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import "jest";
22
import {getUtcDateFromString, mapTrendArrow} from "../../../src/helpers/helpers";
33

44
describe("Helpers", () => {
5-
it("Mapping Trend Arrows from LibreLink Up to Nightscout", async () =>
5+
it("Mapping Trend Arrows from LibreLinkUp to Nightscout", async () =>
66
{
77
expect(mapTrendArrow(1)).toBe("SingleDown");
88
expect(mapTrendArrow(2)).toBe("FortyFiveDown");
@@ -12,7 +12,7 @@ describe("Helpers", () => {
1212
expect(mapTrendArrow(0)).toBe("NOT COMPUTABLE");
1313
});
1414

15-
it("Converting LibreLink Up timestamp to UTC epoch time", async () =>
15+
it("Converting LibreLinkUp timestamp to UTC epoch time", async () =>
1616
{
1717
const sampleFactoryTimestamp = "12/30/2022 4:42:41 PM";
1818
const utcDateFromString = getUtcDateFromString(sampleFactoryTimestamp);

tests/unit-tests/librelink/librelink.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mock.onGet("https://api-eu.libreview.io/llu/connections").reply(200, connections
1919
mock.onGet("https://api-eu.libreview.io/llu/connections/7ad66b40-ba9b-401e-9845-4f49f998cf16/graph").reply(200, graphResponse);
2020
mock.onGet("http://localhost:1337/api/v1/entries?count=1").reply(200, []);
2121

22-
describe("LibreLink Up", () =>
22+
describe("LibreLinkUp", () =>
2323
{
2424
const env = process.env
2525

@@ -34,7 +34,7 @@ describe("LibreLink Up", () =>
3434
process.env = env
3535
})
3636

37-
it("Successful login to LibreLink Up", async () =>
37+
it("Successful login to LibreLinkUp", async () =>
3838
{
3939
const authTicket: AuthTicket | null = await login();
4040
expect(authTicket).not.toBeNull();
@@ -43,7 +43,7 @@ describe("LibreLink Up", () =>
4343
expect(authTicket?.duration).toBe(15552000000);
4444
});
4545

46-
it("Failed login to LibreLink Up", async () =>
46+
it("Failed login to LibreLinkUp", async () =>
4747
{
4848
mock.onPost("https://api-eu.libreview.io/llu/auth/login").reply(200, loginFailedResponse);
4949

0 commit comments

Comments
 (0)