Skip to content

Commit

Permalink
Merge branch 'master' into embrace-support
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen authored Sep 16, 2024
2 parents 0772c8b + bae70ae commit 7705e87
Show file tree
Hide file tree
Showing 14 changed files with 3,166 additions and 4,292 deletions.
3 changes: 2 additions & 1 deletion app/actions/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ export function doDeviceUpload(driverId, opts = {}, utc) {
let errorMessage = 'E_DEVICE_UPLOAD';
if (_.get(targetDevice, 'source.driverId', null) === 'Medtronic') {
errorMessage = 'E_MEDTRONIC_UPLOAD';
} else if (_.get(targetDevice, 'source.driverId', null) === 'BluetoothLE') {
} else if (_.get(targetDevice, 'source.driverId', null) === 'BluetoothLE' ||
_.get(targetDevice, 'source.driverId', null) === 'OneTouchVerioBLE') {
errorMessage = 'E_BLUETOOTH_PAIR';
}

Expand Down
16 changes: 15 additions & 1 deletion app/actions/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,22 @@ export function makeUploadCb(dispatch, getState, errCode, utc) {

if (errCode === 'E_BLUETOOTH_PAIR') {
displayErr.message = 'Couldn\'t connect to device.';
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/360035332972';
displayErr.linkText = 'Is it paired?';

switch(uploadTargetDevice) {
case 'foracareble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/14620487836564';
break;
case 'caresensble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/360035332972#h_01EDCWR70ZH3WMHY4RX3SC80NX';
break;
case 'onetouchverioble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/11554128490900';
break;
default:
displayErr.message += ' Is it paired?';
displayErr.linkText = null;
}
}

if (err.code === 'E_VERIO_WRITE') {
Expand Down
8 changes: 7 additions & 1 deletion app/components/DeviceSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class DeviceSelection extends React.Component {
var addDevice = this.props.addDevice.bind(null, targetUser);
var removeDevice = this.props.removeDevice.bind(null, targetUser);
var {devices} = this.props;

const sortedDevices = _.chain(devices)
.values()
.sortBy('name')
.keyBy('key')
.value();

var onCheckedChange = function(e) {
if (e.target.checked) {
Expand All @@ -70,7 +76,7 @@ class DeviceSelection extends React.Component {
};
var {targetDevices} = this.props;

var items = _.map(devices, function(device) {
var items = _.map(sortedDevices, function(device) {
var isChecked = _.includes(targetDevices, device.key);

return (
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"license": "BSD-2-Clause",
"dependencies": {
"drivelist": "11.1.0",
"drivelist": "12.0.2",
"keytar": "7.9.0",
"@tidepool/direct-io": "3.0.2",
"usb": "2.11.0"
"usb": "2.13.0"
}
}
9 changes: 4 additions & 5 deletions app/reducers/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const devices = {
dexcom: {
instructions: i18n.t('Plug in receiver with micro-USB'),
key: 'dexcom',
name: 'Dexcom',
name: 'Dexcom (G4, G5 & G6) Receiver',
source: {type: 'device', driverId: 'Dexcom'},
enabled: {mac: true, win: true, linux: true}
},
Expand Down Expand Up @@ -157,7 +157,7 @@ const devices = {
enabled: {mac: true, win: true, linux: true}
},
omnipod: {
instructions: i18n.t('DASH PDM: Unlock. Plug into USB. Tap Export on PDM. Click Upload.'),
instructions: i18n.t('Unlock PDM. Plug into USB. Tap Export on PDM. Click Upload.'),
key: 'omnipod',
name: 'Insulet Omnipod DASH',
source: {type: 'device', driverId: 'InsuletOmniPod', extension: '.ibf'},
Expand Down Expand Up @@ -270,7 +270,7 @@ const devices = {
},
accuchekusb: {
instructions: i18n.t('Plug in meter with micro-USB cable'),
name: 'Roche Accu-Chek Aviva Connect, Instant, Guide & Guide Me',
name: 'Accu-Chek Aviva Connect, Instant, Guide & Guide Me',
key: 'accuchekusb',
source: {type: 'device', driverId: 'AccuChekUSB'},
enabled: {mac: true, win: true, linux: true},
Expand All @@ -286,7 +286,7 @@ const devices = {
},
truemetrix: {
instructions: i18n.t('True Metrix, True Metrix Pro & True Metrix Air: Place meter in cradle \u2022 True Metrix Go: Plug in meter with micro-USB cable'),
name: 'Trividia Health True Metrix',
name: 'True Metrix',
key: 'truemetrix',
source: {type: 'device', driverId: 'TrueMetrix'},
enabled: {mac: true, win: true, linux: true}
Expand All @@ -309,4 +309,3 @@ if (env.electron) {
}

export default devices;

85 changes: 33 additions & 52 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ chownr@^1.1.1:
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==

debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
version "4.3.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b"
integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==
dependencies:
ms "2.1.2"

Expand All @@ -73,18 +73,18 @@ deep-extend@^0.6.0:
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==

detect-libc@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d"
integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==

drivelist@11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/drivelist/-/drivelist-11.1.0.tgz#39b17b78bf7d717e666ad57f006ffaf9ee344ac7"
integrity sha512-DT328SbKqB78y+HUeuazwj4+Enh5ormv9OgTIMB0/OP2VxKLFDOrKhejJxjP9ytmJok8W/nzR8gSWdpiaJi1XA==
version "2.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700"
integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==

drivelist@12.0.2:
version "12.0.2"
resolved "https://registry.yarnpkg.com/drivelist/-/drivelist-12.0.2.tgz#2821250ccc0ee3161cc86b72724ee64bca72aa29"
integrity sha512-Nps4pc1ukIqDj7v00wGgBkS7P3VVEZZKcaTPVcE1Yl+dLojXuEv76BuSg6HgmhjeOFIIMz8q7Y+2tux6gYqCvg==
dependencies:
bindings "^1.5.0"
debug "^4.3.4"
node-addon-api "^5.0.0"
node-addon-api "^8.0.0"
prebuild-install "^7.1.1"

end-of-stream@^1.1.0, end-of-stream@^1.4.1:
Expand Down Expand Up @@ -137,13 +137,6 @@ keytar@7.9.0:
node-addon-api "^4.3.0"
prebuild-install "^7.0.1"

lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"

mimic-response@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
Expand All @@ -170,9 +163,9 @@ napi-build-utils@^1.0.1:
integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==

node-abi@^3.3.0:
version "3.54.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.54.0.tgz#f6386f7548817acac6434c6cba02999c9aebcc69"
integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==
version "3.65.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.65.0.tgz#ca92d559388e1e9cab1680a18c1a18757cdac9d3"
integrity sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==
dependencies:
semver "^7.3.5"

Expand All @@ -181,20 +174,15 @@ node-addon-api@^4.3.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f"
integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==

node-addon-api@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762"
integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==

node-addon-api@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb"
integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==
node-addon-api@^8.0.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-8.1.0.tgz#55a573685dd4bd053f189cffa4e6332d2b1f1645"
integrity sha512-yBY+qqWSv3dWKGODD6OGE6GnTX7Q2r+4+DfpqxHSHh8x0B4EKP9+wVGLS6U/AM1vxSNNmUEuIV5EGhYwPpfOwQ==

node-gyp-build@^4.5.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd"
integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==
version "4.8.1"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5"
integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==

once@^1.3.1, once@^1.4.0:
version "1.4.0"
Expand All @@ -204,9 +192,9 @@ once@^1.3.1, once@^1.4.0:
wrappy "1"

prebuild-install@^7.0.1, prebuild-install@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==
version "7.1.2"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.2.tgz#a5fd9986f5a6251fbc47e1e5c65de71e68c0a056"
integrity sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==
dependencies:
detect-libc "^2.0.0"
expand-template "^2.0.3"
Expand Down Expand Up @@ -254,11 +242,9 @@ safe-buffer@^5.0.1, safe-buffer@~5.2.0:
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==

semver@^7.3.5:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

simple-concat@^1.0.0:
version "1.0.1"
Expand Down Expand Up @@ -314,13 +300,13 @@ tunnel-agent@^0.6.0:
dependencies:
safe-buffer "^5.0.1"

usb@2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/usb/-/usb-2.11.0.tgz#bbb2257c65534635a450aed3754df7c8844d518e"
integrity sha512-u5+NZ6DtoW8TIBtuSArQGAZZ/K15i3lYvZBAYmcgI+RcDS9G50/KPrUd3CrU8M92ahyCvg5e0gc8BDvr5Hwejg==
usb@2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/usb/-/usb-2.13.0.tgz#521d11244cbe991a3f247c770821635abdcc9c7f"
integrity sha512-pTNKyxD1DfC1DYu8kFcIdpE8f33e0c2Sbmmi0HEs28HTVC555uocvYR1g5DDv4CBibacCh4BqRyYZJylN4mBbw==
dependencies:
"@types/w3c-web-usb" "^1.0.6"
node-addon-api "^7.0.0"
node-addon-api "^8.0.0"
node-gyp-build "^4.5.0"

util-deprecate@^1.0.1:
Expand All @@ -332,8 +318,3 @@ wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==

yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
7 changes: 7 additions & 0 deletions lib/core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ import * as actionUtils from '../../app/actions/utils';
import personUtils from './personUtils';
import env from '../../app/utils/env';

if (env.node && !env.electron && typeof globalThis.crypto === 'undefined') {
const { subtle } = require('crypto').webcrypto; // eslint-disable-line global-require
globalThis.crypto = {
subtle,
};
}

// eslint-disable-next-line no-console
const log = env.electron ? bows('Api') : console.log;

Expand Down
Loading

0 comments on commit 7705e87

Please sign in to comment.