├── .bookignore
├── .circleci
├── bash_env.sh
└── config.yml
├── .config.js
├── .dockerignore
├── .env
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .gitmodules
├── .nvmrc
├── .yarnrc.yml
├── Dockerfile
├── Dockerfile.dev
├── LICENSE
├── README.md
├── SUMMARY.md
├── __mocks__
├── @electron
│ └── remote.js
└── fileMock.js
├── app
├── actions
│ ├── async.js
│ ├── index.js
│ ├── sync.js
│ └── utils.js
├── app.global.css
├── app.html
├── app.icns
├── auth.js
├── components
│ ├── AdHocModal.js
│ ├── BluetoothModal.js
│ ├── ClinicUploadDone.js
│ ├── ClinicUserBlock.js
│ ├── ClinicUserEdit.js
│ ├── ClinicUserSelect.js
│ ├── DeviceSelection.js
│ ├── DeviceTimeModal.js
│ ├── Footer.js
│ ├── Header.js
│ ├── Loading.js
│ ├── LoadingBar.js
│ ├── LoggedInAs.js
│ ├── LoggedOut.js
│ ├── Login.js
│ ├── NoUploadTargets.js
│ ├── PatientLimitModal.js
│ ├── ProgressBar.js
│ ├── TimezoneDropdown.js
│ ├── UpdateModal.js
│ ├── UpdatePlease.js
│ ├── Upload.js
│ ├── UploadList.js
│ ├── UserDropdown.js
│ ├── VersionCheckError.js
│ └── ViewDataLink.js
├── constants
│ ├── actionSources.js
│ ├── actionTypes.js
│ ├── actionWorkingMap.js
│ ├── errorMessages.js
│ ├── metrics.js
│ ├── otherConstants.js
│ └── usrMessages.js
├── containers
│ ├── App.js
│ ├── ClinicUserEditPage.js
│ ├── ClinicUserSelectPage.js
│ ├── MainPage.js
│ ├── NoUploadTargetsPage.js
│ ├── SettingsPage.js
│ ├── Top.js
│ └── WorkspacePage.js
├── dev-app-update.yml
├── index.js
├── main.dev.js
├── package.json
├── reducers
│ ├── devices.js
│ ├── index.js
│ ├── initialState.js
│ ├── misc.js
│ ├── uploads.js
│ ├── users.js
│ └── working.js
├── static
│ └── silent-check-sso.html
├── store
│ ├── configureStore.development.js
│ ├── configureStore.js
│ └── configureStore.production.js
├── utils
│ ├── config.i18next.js
│ ├── debugMode.js
│ ├── env.js
│ ├── errors.js
│ ├── ipc.js
│ ├── metrics.js
│ ├── rollbar.js
│ └── uploadDataPeriod.js
├── web.ejs
└── yarn.lock
├── artifact.sh
├── babel.config.js
├── config.server.js
├── config
├── development.sh
├── device-debug.sh
├── integration.sh
├── local.example.js
├── local.sh
├── qa1.sh
├── qa2.sh
├── staging.sh
└── ui-debug.sh
├── docker-compose.yaml
├── docs
├── BootstrappingToUTC.md
├── README.md
├── checklists
│ ├── README.md
│ ├── abbottFreeStyleLibre.md
│ ├── abbottFreeStyleLite.md
│ ├── abbottFreeStyleNeo.md
│ ├── abbottPrecisionXtra.md
│ ├── avivaConnectAndGuide.md
│ ├── bayerContour.md
│ ├── bayerContourNext.md
│ ├── careSensUSB.md
│ ├── caresensNPremierBluetooth.md
│ ├── dexcom.md
│ ├── glucoRx.md
│ ├── glucocard.md
│ ├── glucocardExpression.md
│ ├── insuletOmniPod.md
│ ├── medtronic.md
│ ├── medtronic600.md
│ ├── medtronic600CGM.md
│ ├── medtronicCGM.md
│ ├── microTechEquil.md
│ ├── oneTouchUltra2.md
│ ├── oneTouchUltraMini.md
│ ├── oneTouchVerio.md
│ ├── oneTouchVerioBLE.md
│ ├── oneTouchVerioIQ.md
│ ├── reliOnPremier.md
│ ├── reliOnPrime.md
│ ├── tandem.md
│ ├── tandemCGM.md
│ └── trividiaTrueMetrix.md
├── checklisttemplates
│ ├── BGMChecklist.md
│ ├── CGMChecklist.md
│ ├── PumpChecklist.md
│ └── README.md
├── guide
│ ├── Architecture.md
│ ├── CodeStyle.md
│ ├── DirectoryStructure.md
│ └── FeatureOverview.md
├── misc
│ ├── CSSModules.md
│ ├── FlatRateBasals.md
│ ├── PWDSimulators.md
│ └── README.md
└── state
│ ├── CustomMiddleware.md
│ ├── ExampleStateTree.md
│ ├── README.md
│ ├── StateTreeGlossary.md
│ └── app-snapshot.png
├── electron-builder-publish.js
├── entrypoint.sh
├── extension
├── README.md
├── background.js
├── icon-128.png
└── manifest.json
├── fonts
├── basis-grotesque-black-italic.woff
├── basis-grotesque-black.woff
├── basis-grotesque-bold-italic.woff
├── basis-grotesque-bold.woff
├── basis-grotesque-italic.woff
├── basis-grotesque-light-italic.woff
├── basis-grotesque-light.woff
├── basis-grotesque-medium-italic.woff
├── basis-grotesque-medium.woff
├── basis-grotesque-mono-bold-italic.woff
├── basis-grotesque-mono-bold.woff
├── basis-grotesque-mono-italic.woff
├── basis-grotesque-mono-regular.woff
├── basis-grotesque-regular.woff
├── icons.woff
├── opensans-bold.woff
├── opensans-bolditalic.woff
├── opensans-italic.woff
└── opensans.woff
├── images
├── LimitReached.svg
├── MM600_CNL_combo@2x.jpg
├── MM723_CNL_combo@2x.jpg
├── Screenshot 1.png
├── Screenshot 2.png
├── T_icon_animated.gif
├── T_icon_dark_128.png
├── T_icon_dark_16.png
├── T_icon_dark_32.png
├── T_icon_dark_512.png
├── T_icon_dark_64.png
├── T_icon_smalltile.png
├── T_icon_transparent.png
├── Tidepool_Logo_Light x2.png
├── adhoc_s1.png
├── adhoc_s2.png
├── happy_device.png
├── search_icon_2x.png
├── tidepoolLogoWhite_256.png
├── tidepool_logo_transparent.png
├── unhappy_device.png
└── unhappy_meter.png
├── jest.setup.js
├── lib
├── TimezoneOffsetUtil.js
├── bleDevice.js
├── commonFunctions.js
├── config.js
├── core
│ ├── .eslintrc
│ ├── api.js
│ ├── clinicUtils.js
│ ├── device.js
│ ├── driverManifests.js
│ ├── localStore.js
│ ├── mapcat.js
│ ├── personUtils.js
│ ├── repeat.js
│ ├── storage.js
│ └── validation
│ │ ├── postalCodes.js
│ │ └── states.js
├── crc.js
├── driverManager.js
├── drivers
│ ├── abbott
│ │ ├── .eslintrc
│ │ ├── abbottFreeStyleLibre.js
│ │ ├── abbottFreeStyleLite.js
│ │ ├── abbottFreeStyleNeo.js
│ │ ├── abbottPrecisionXtra.js
│ │ ├── cli
│ │ │ ├── csv_loader.js
│ │ │ └── fslibre.js
│ │ ├── freeStyleLibreConstants.js
│ │ ├── freeStyleLibreData.js
│ │ ├── freeStyleLibreProtocol.js
│ │ ├── libreViewDriver.js
│ │ └── tools
│ │ │ ├── README
│ │ │ ├── fslibre_usb_dissector.lua
│ │ │ └── lua_debug.sh
│ ├── allmedicus
│ │ └── agm4000.js
│ ├── bayer
│ │ ├── .eslintrc
│ │ ├── bayerConstants.js
│ │ ├── bayerContour.js
│ │ └── bayerContourNext.js
│ ├── bluetoothLE
│ │ └── bluetoothLEDriver.js
│ ├── dexcom
│ │ ├── .eslintrc
│ │ ├── dexcomDriver.js
│ │ └── userSettingsChanges.js
│ ├── glucorx
│ │ └── glucoRxDriver.js
│ ├── i-sens
│ │ ├── .eslintrc
│ │ ├── careSens.js
│ │ ├── glucocardExpression.js
│ │ ├── reliOnConstants.js
│ │ └── reliOnPrime.js
│ ├── insulet
│ │ ├── .eslintrc
│ │ ├── cli
│ │ │ ├── README.md
│ │ │ └── ibf_loader.js
│ │ ├── common.js
│ │ ├── insuletDriver.js
│ │ ├── insuletSimulator.js
│ │ └── objectBuildingLogic.js
│ ├── medtronic
│ │ ├── cli
│ │ │ ├── README.md
│ │ │ ├── blob_loader.js
│ │ │ ├── compare_json.js
│ │ │ └── getBlobFromLog.js
│ │ ├── docs
│ │ │ ├── images
│ │ │ │ ├── README.md
│ │ │ │ ├── png
│ │ │ │ │ └── basal.png
│ │ │ │ ├── src
│ │ │ │ │ ├── MiniMedMessage.diag
│ │ │ │ │ ├── alarmPump.diag
│ │ │ │ │ ├── basal.diag
│ │ │ │ │ ├── basalSchedules.diag
│ │ │ │ │ ├── bolus.diag
│ │ │ │ │ ├── changeTime.diag
│ │ │ │ │ ├── lowBattery.diag
│ │ │ │ │ ├── lowReservoir.diag
│ │ │ │ │ ├── newTimeSet.diag
│ │ │ │ │ ├── prime.diag
│ │ │ │ │ ├── resume.diag
│ │ │ │ │ ├── rewind.diag
│ │ │ │ │ ├── smbg.diag
│ │ │ │ │ ├── smbgLinked.diag
│ │ │ │ │ ├── suspend.diag
│ │ │ │ │ ├── tempBasal.diag
│ │ │ │ │ ├── tempBasalDuration.diag
│ │ │ │ │ ├── wizard.diag
│ │ │ │ │ └── wizardSettings.diag
│ │ │ │ └── svg
│ │ │ │ │ ├── MiniMedMessage.svg
│ │ │ │ │ ├── alarmPump.svg
│ │ │ │ │ ├── basal.svg
│ │ │ │ │ ├── basalSchedules.svg
│ │ │ │ │ ├── bolus.svg
│ │ │ │ │ ├── prime.svg
│ │ │ │ │ ├── rewind.svg
│ │ │ │ │ ├── smbg.svg
│ │ │ │ │ ├── smbgLinked.svg
│ │ │ │ │ ├── suspend.svg
│ │ │ │ │ ├── tempBasal.svg
│ │ │ │ │ ├── tempBasalDuration.svg
│ │ │ │ │ ├── wizard.svg
│ │ │ │ │ └── wizardSettings.svg
│ │ │ └── packetStructure.md
│ │ ├── medtronicDriver.js
│ │ ├── medtronicSimulator.js
│ │ └── processData.js
│ ├── medtronic600
│ │ ├── .eslintrc
│ │ ├── NGPHistoryParser.js
│ │ ├── NGPUtil.js
│ │ ├── cli
│ │ │ └── blob_loader.js
│ │ ├── docs
│ │ │ ├── images
│ │ │ │ ├── README.md
│ │ │ │ ├── src
│ │ │ │ │ ├── BWZCarbRatiosCommand.diag
│ │ │ │ │ ├── BWZCarbRatiosResponse.diag
│ │ │ │ │ ├── BWZSensitivityFactorsCommand.diag
│ │ │ │ │ ├── BWZSensitivityFactorsResponse.diag
│ │ │ │ │ ├── BWZTargetsCommand.diag
│ │ │ │ │ ├── BWZTargetsResponse.diag
│ │ │ │ │ ├── BayerUSB.diag
│ │ │ │ │ ├── HighSpeedModeCommand.diag
│ │ │ │ │ ├── JoinNetworkRequest.diag
│ │ │ │ │ ├── JoinNetworkResponse.diag
│ │ │ │ │ ├── LinkKeyResponse.diag
│ │ │ │ │ ├── Medtronic600Sequence.diag
│ │ │ │ │ ├── MiniMedMessage.diag
│ │ │ │ │ ├── NGPMessage.diag
│ │ │ │ │ ├── OpenConnectionRequest.diag
│ │ │ │ │ ├── PumpHistoryInfoCommand.diag
│ │ │ │ │ ├── PumpStatusCommand.diag
│ │ │ │ │ ├── PumpStatusResponse.diag
│ │ │ │ │ ├── PumpTimeCommand.diag
│ │ │ │ │ ├── PumpTimeResponse.diag
│ │ │ │ │ ├── ReadBasalPatternCommand.diag
│ │ │ │ │ ├── ReadBasalPatternResponse.diag
│ │ │ │ │ ├── ReadInfoResponse.diag
│ │ │ │ │ ├── TransmitPacketRequest.diag
│ │ │ │ │ └── TransmitPacketResponse.diag
│ │ │ │ └── svg
│ │ │ │ │ ├── BWZCarbRatiosCommand.svg
│ │ │ │ │ ├── BWZCarbRatiosResponse.svg
│ │ │ │ │ ├── BWZSensitivityFactorsCommand.svg
│ │ │ │ │ ├── BWZSensitivityFactorsResponse.svg
│ │ │ │ │ ├── BWZTargetsCommand.svg
│ │ │ │ │ ├── BWZTargetsResponse.svg
│ │ │ │ │ ├── BayerUSB.svg
│ │ │ │ │ ├── HighSpeedModeCommand.svg
│ │ │ │ │ ├── JoinNetworkRequest.svg
│ │ │ │ │ ├── JoinNetworkResponse.svg
│ │ │ │ │ ├── LinkKeyResponse.svg
│ │ │ │ │ ├── Medtronic600Sequence.svg
│ │ │ │ │ ├── MiniMedMessage.svg
│ │ │ │ │ ├── NGPMessage.svg
│ │ │ │ │ ├── OpenConnectionRequest.svg
│ │ │ │ │ ├── PumpStatusCommand.svg
│ │ │ │ │ ├── PumpStatusResponse.svg
│ │ │ │ │ ├── PumpTimeCommand.svg
│ │ │ │ │ ├── PumpTimeResponse.svg
│ │ │ │ │ ├── ReadBasalPatternCommand.svg
│ │ │ │ │ ├── ReadBasalPatternResponse.svg
│ │ │ │ │ ├── ReadInfoResponse.svg
│ │ │ │ │ ├── TransmitPacketRequest.svg
│ │ │ │ │ └── TransmitPacketResponse.svg
│ │ │ └── packetStructure.md
│ │ ├── medtronic600Driver.js
│ │ └── medtronic600Simulator.js
│ ├── onetouch
│ │ ├── .eslintrc
│ │ ├── catalina-sudo
│ │ │ └── sudo.js
│ │ ├── cli
│ │ │ └── otverio.js
│ │ ├── oneTouchUltra2.js
│ │ ├── oneTouchUltraMini.js
│ │ ├── oneTouchVerio.js
│ │ ├── oneTouchVerioBLE.js
│ │ └── oneTouchVerioIQ.js
│ ├── roche
│ │ ├── .eslintrc
│ │ ├── accuChekUSB.js
│ │ ├── models.js
│ │ └── utils.js
│ ├── trividia
│ │ ├── .eslintrc
│ │ └── trueMetrix.js
│ └── weitai
│ │ ├── .eslintrc
│ │ ├── utils.js
│ │ └── weiTaiUSB.js
├── eventAnnotations.js
├── hidDevice.js
├── objectBuilder.js
├── serialDevice.js
├── statusManager.js
├── struct.js
└── usbDevice.js
├── locales
├── en
│ ├── translation.json
│ └── translation.missing.json
└── es
│ ├── translation.json
│ └── translation.missing.json
├── package.json
├── resources
├── background.tiff
├── icon.icns
├── icon.ico
├── icon.png
├── icons
│ ├── 128x128.png
│ ├── 16x16.png
│ ├── 32x32.png
│ ├── 512x512.png
│ └── 64x64.png
├── installer.nsh
├── installerIcon.ico
├── linux
│ ├── 51-tidepool-uploader.rules
│ └── uploader.desktop
├── mac
│ ├── helpers
│ │ └── org.tidepool.disk-permissions
│ │ │ ├── install.sh
│ │ │ ├── org.tidepool.disk-permissions.plist
│ │ │ └── org.tidepool.disk-permissions.sh
│ ├── sudo-askpass.osascript.js
│ └── updateDrivers.sh
└── win
│ ├── README.md
│ ├── TidepoolUSBDriver.ddf
│ ├── TidepoolUSBDriver_x64.exe
│ ├── TidepoolUSBDriver_x86.exe
│ ├── Tidepool_T_Icon.png
│ ├── amd64
│ ├── FTSER2K.sys
│ ├── WdfCoInstaller01009.dll
│ ├── ftbusui.dll
│ ├── ftd2xx.lib
│ ├── ftd2xx64.dll
│ ├── ftdibus.sys
│ ├── ftlang.dll
│ ├── ser2pl64.sys
│ ├── silabser.sys
│ ├── tiusb.i51
│ └── tiusb.sys
│ ├── dpinst.xml
│ ├── ftdibus.cat
│ ├── ftdibus.inf
│ ├── ftdiport.cat
│ ├── ftdiport.inf
│ ├── i386
│ ├── FTSER2K.sys
│ ├── ftbusui.dll
│ ├── ftd2xx.dll
│ ├── ftd2xx.lib
│ ├── ftdibus.sys
│ ├── ftlang.dll
│ ├── ser2pl.sys
│ ├── silabser.sys
│ ├── tiusb.i51
│ └── tiusb.sys
│ ├── phdc.inf
│ ├── phdc_driver.cat
│ ├── tidepool.cer
│ ├── tidepoolhid.cat
│ ├── tidepoolhid.inf
│ ├── tidepoolvcp.cat
│ ├── tidepoolvcp.inf
│ ├── webusb.inf
│ ├── winusbinstallation.cat
│ ├── x64
│ ├── WdfCoInstaller01009.dll
│ ├── WdfCoInstaller01011.dll
│ └── winusbcoinstaller2.dll
│ └── x86
│ ├── WdfCoInstaller01009.dll
│ ├── WdfCoInstaller01011.dll
│ └── winusbcoinstaller2.dll
├── scripts
├── cat-config.js
├── config.sh
├── json-compare.js
├── notarize.js
├── start-linux.sh
├── update-gh-pages.sh
└── whitelisting
│ ├── README.md
│ ├── av-submit.js
│ └── mcafee-template.json
├── server.js
├── sounds
├── UploadFailed.wav
└── UploadSucceeded.wav
├── styles
├── components
│ ├── AdHocModal.module.less
│ ├── App.module.less
│ ├── BluetoothModal.module.less
│ ├── ClinicUploadDone.module.less
│ ├── ClinicUserBlock.module.less
│ ├── ClinicUserEdit.module.less
│ ├── ClinicUserSelect.module.less
│ ├── DevTools.module.less
│ ├── DeviceSelection.module.less
│ ├── DeviceTimeModal.module.less
│ ├── Footer.module.less
│ ├── Header.module.less
│ ├── LoadingBar.module.less
│ ├── LoggedInAs.module.less
│ ├── LoggedOut.module.less
│ ├── Login.module.less
│ ├── NoUploadTargets.module.less
│ ├── PatientLimitModal.module.less
│ ├── ProgressBar.module.less
│ ├── TimezoneDropdown.module.less
│ ├── UpdateModal.module.less
│ ├── Upload.module.less
│ ├── UploadList.module.less
│ ├── UserDropdown.module.less
│ ├── VersionCheck.module.less
│ ├── ViewDataLink.module.less
│ └── WorkspacePage.module.less
├── core
│ ├── buttons.module.less
│ ├── fonts.less
│ ├── forms.less
│ ├── icons.module.less
│ ├── layout.module.less
│ ├── scaffolding.less
│ ├── select.less
│ ├── typography.module.less
│ └── variables.less
└── main.less
├── test
├── .eslintrc
├── app
│ ├── actions
│ │ ├── async.test.js
│ │ ├── sync.test.js
│ │ └── utils.test.js
│ ├── components
│ │ └── .gitkeep
│ ├── containers
│ │ └── .gitkeep
│ └── reducers
│ │ ├── misc.test.js
│ │ ├── uploads.test.js
│ │ ├── users.test.js
│ │ └── working.test.js
├── e2e.js
├── example.js
└── lib
│ ├── abbott
│ ├── testFreeStyleLibreData.js
│ └── testFreeStyleLibreProtocol.js
│ ├── core
│ ├── clinicUtils.test.js
│ └── personUtils.test.js
│ ├── dexcom
│ └── testUserSettingsChanges.js
│ ├── fixtures
│ ├── nonpwd.json
│ └── pwd.json
│ ├── insulet
│ ├── testInsuletDriver.js
│ ├── testInsuletSimulator.js
│ └── testLogic.js
│ ├── medtronic
│ ├── testMedtronicSimulator.js
│ └── testProcessData.js
│ ├── medtronic600
│ ├── .eslintrc
│ ├── testMedtronic600Simulator.js
│ └── testNGPHistoryParser.js
│ ├── tandem
│ └── testTandemSimulator.js
│ ├── testCommonFunctions.js
│ ├── testDriverManager.js
│ ├── testHidDevice.js
│ ├── testLocalStore.js
│ ├── testObjectBuilder.js
│ ├── testSerialDevice.js
│ ├── testStatusManager.js
│ ├── testStruct.js
│ └── testTimezoneOffsetUtil.js
├── version.sh
├── webpack.config.base.mjs
├── webpack.config.eslint.js
├── webpack.config.main.prod.babel.mjs
├── webpack.config.renderer.dev.babel.mjs
├── webpack.config.renderer.prod.babel.mjs
├── webpack.config.web.dev.babel.mjs
└── yarn.lock
/.bookignore:
--------------------------------------------------------------------------------
1 | app/
2 | build/
3 | config/
4 | dist/
5 | fonts/
6 | images/
7 | lib/**/*.js
8 | node_modules/
9 | resources/
10 | scripts/
11 | sounds/
12 | styles/
13 | test/
14 | **/*.js
15 | .bookignore
16 | .babelrc
17 | .eslintrc
18 | .gitignore
19 | .travis.yml
20 | .circleci
21 | .eslintignore
22 | .nvmrc
23 | appveyor.yml
24 | description.txt
25 | greenkeeper.json
26 | LICENSE
27 | manifest.json
28 | package.json
29 | update-gh-pages.sh
30 | yarn.lock
31 | .dockerignore
32 | .env
33 | Dockerfile
34 | docker-compose.yaml
35 | entrypoint.sh
36 | locales/
37 |
--------------------------------------------------------------------------------
/.circleci/bash_env.sh:
--------------------------------------------------------------------------------
1 | # nvm
2 | source ~/.nvm/nvm.sh
3 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | **/node_modules
2 |
3 | Dockerfile
4 |
5 | Dockerfile.dev
6 |
7 | docker-compose.yaml
8 |
9 | .env
10 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | #ROLLBAR_POST_TOKEN=
2 |
3 | API_URL=http://localhost:3000
4 | UPLOAD_URL=http://localhost:3000
5 | DATA_URL=http://localhost:3000
6 | BLIP_URL=http://localhost:3000
7 | DEBUG_ERROR=true
8 | REDUX_LOG=false
9 | REDUX_DEV_UI=false
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | app/dist/
2 | app/main.prod.js
3 | node_modules/
4 | dist/
5 | web/
6 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | // I want to use babel-eslint for parsing!
3 | "parser": "@babel/eslint-parser",
4 | "env": {
5 | // I write for browser
6 | "browser": true,
7 | // in CommonJS
8 | "node": true,
9 | "es6": true,
10 | "es2020": true // e.g. BigInt
11 | },
12 | "globals": {
13 | "jest": true,
14 | "chai": false,
15 | "console": false,
16 | "define": false,
17 | "expect": false,
18 | "process": false,
19 | "require": false,
20 | "sinon": false,
21 | "__MOCK__": false,
22 | "__MOCK_PARAMS__": false,
23 | "__UPLOAD_API__": false,
24 | "__DATA_HOST__": false,
25 | "__API_HOST__": false,
26 | "__SHOW_ACCEPT_TERMS__": false,
27 | "__PASSWORD_MIN_LENGTH__": false,
28 | "__INVITE_KEY__": false
29 | },
30 | // To give you an idea how to override rule options:
31 | "rules": {
32 | "quotes": [2, "single"],
33 | "strict": [2, "never"],
34 | "eol-last": 0,
35 | "no-mixed-requires": 0,
36 | "no-underscore-dangle": 0,
37 | "wrap-iife": [2, "inside"],
38 | "no-caller": 2,
39 | "no-undef": 2,
40 | "new-cap": 2,
41 | "semi": 2,
42 | "react/jsx-uses-react": 2,
43 | "react/jsx-uses-vars": 2,
44 | "react/react-in-jsx-scope": 2,
45 | // uploader specific
46 | "camelcase": 0,
47 | "eqeqeq": 0,
48 | "no-bitwise": 0,
49 | // TODO: either try to fix this globally or use an embedded .eslintrc for drivers
50 | "no-use-before-define": 0,
51 | "max-len": ["warn", { "code": 100 }],
52 | "prefer-destructuring": "warn",
53 | "linebreak-style": 0,
54 | "no-buffer-constructor": "warn"
55 | },
56 | "plugins": [
57 | "@babel",
58 | "react",
59 | "promise",
60 | "import",
61 | "lodash",
62 | "jest"
63 | ],
64 | "settings": {
65 | "import/resolver": {
66 | "webpack": {
67 | "config": "webpack.config.eslint.js"
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.dat
5 | *.out
6 | *.pid
7 | *.gz
8 | *.swp
9 |
10 | pids
11 | logs
12 | results
13 | config/*
14 | !config/local.sh
15 | !config/local.example.js
16 | build
17 | build/Release
18 | .eslintcache
19 | dist
20 | dist.zip
21 | release
22 | app/main.prod.js
23 | app/main.prod.js.map
24 | app/renderer.prod.js
25 | app/renderer.prod.js.map
26 | app/style.css
27 | app/style.css.map
28 | main.js
29 | main.js.map
30 |
31 |
32 | lib/drivers/medtronic/cli/*.json
33 | lib/drivers/insulet/cli/*.ibf
34 | resources/win/disk1
35 | resources/win/setup.*
36 |
37 | tmp
38 | npm-debug.log
39 | node_modules
40 | app/node_modules
41 | bower_components
42 | coverage
43 |
44 | .DS_Store
45 | .idea
46 | *.iml
47 | .com.apple.timemachine.*
48 | .tern-project
49 |
50 | _book/
51 | web/
52 |
53 | \.vscode/
54 |
55 | # yarn (ref https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
56 | .pnp.*
57 | .yarn/*
58 | !.yarn/patches
59 | !.yarn/plugins
60 | !.yarn/releases
61 | !.yarn/sdks
62 | !.yarn/versions
63 |
64 | app/.pnp.*
65 | app/.yarn/*
66 | !app/.yarn/patches
67 | !app/.yarn/plugins
68 | !app/.yarn/releases
69 | !app/.yarn/sdks
70 | !app/.yarn/versions
71 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/drivers/tandem"]
2 | path = lib/drivers/tandem
3 | url = git@github.com:tidepool-org/tandem-driver.git
4 | [submodule "lib/drivers/fora"]
5 | path = lib/drivers/fora
6 | url = git@github.com:tidepool-org/fora-driver.git
7 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 20.14.0
2 |
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
--------------------------------------------------------------------------------
/Dockerfile.dev:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04
2 |
3 | ENV DEBIAN_FRONTEND noninteractive
4 | ENV NODE_VERSION "v12.13.0"
5 |
6 | # Lots of packages. Some dependencies and stuff for GUI.
7 | RUN apt-get -qq -y update && \
8 | apt-get -qq -y install build-essential git curl libusb-1.0 libavutil-dev libxss1 \
9 | libsecret-1-dev libudev-dev libgtk-3-0 libcanberra-gtk3-module packagekit-gtk3-module \
10 | chromium-browser
11 |
12 | RUN useradd -s /bin/bash node && mkdir -p /home/node/.config \
13 | && chown -R node:node /home/node
14 |
15 | # Yarn
16 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
17 |
18 | RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
19 | RUN apt-get -qq -y update && apt-get -qq -y install yarn
20 |
21 | # Node
22 | RUN curl -O https://nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz \
23 | && tar -xzf node-$NODE_VERSION-linux-x64.tar.gz -C /usr/local/bin
24 |
25 | ENV PATH=/usr/local/bin/node-$NODE_VERSION-linux-x64/bin:${PATH}
26 |
27 | RUN chown -R node:$(id -gn node) /home/node/.config
28 |
29 | WORKDIR /home/node
30 |
31 | RUN mkdir uploader
32 |
33 | ENV NODE_ENV "development"
34 |
35 | WORKDIR /home/node/uploader/
36 |
37 | COPY entrypoint.sh entrypoint.sh
38 |
39 | USER node
40 |
41 | ENTRYPOINT ["/bin/bash", "entrypoint.sh"]
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014-2015, Tidepool Project
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this
11 | list of conditions and the following disclaimer in the documentation and/or other
12 | materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 | POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/__mocks__/@electron/remote.js:
--------------------------------------------------------------------------------
1 | const i18n = {
2 | t: jest.fn((key) => key),
3 | };
4 |
5 | module.exports = {
6 | getGlobal: jest.fn(() => i18n),
7 | };
8 |
--------------------------------------------------------------------------------
/__mocks__/fileMock.js:
--------------------------------------------------------------------------------
1 | module.exports = 'test-file-stub';
2 |
--------------------------------------------------------------------------------
/app/actions/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2015, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import * as async from './async';
19 | import * as sync from './sync';
20 |
21 | export default {
22 | async: async,
23 | sync: sync
24 | };
25 |
--------------------------------------------------------------------------------
/app/app.global.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/app/app.global.css
--------------------------------------------------------------------------------
/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Tidepool Uploader
6 |
17 |
18 |
19 |
20 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/app.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/app/app.icns
--------------------------------------------------------------------------------
/app/components/ClinicUploadDone.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | var React = require('react');
19 | var _ = require('lodash');
20 | var PropTypes = require('prop-types');
21 |
22 | var styles = require('../../styles/components/ClinicUploadDone.module.less');
23 |
24 | import { i18n } from '../utils/config.i18next';
25 |
26 | class ClinicUploadDone extends React.Component {
27 | static propTypes = {
28 | onClicked: PropTypes.func.isRequired,
29 | uploadTargetUser: PropTypes.string.isRequired,
30 | uploadsByUser: PropTypes.object.isRequired
31 | };
32 |
33 | handleClick = () => {
34 | this.props.onClicked();
35 | };
36 |
37 | hasCompletedUpload = () => {
38 | return _.find(_.get(this.props.uploadsByUser, this.props.uploadTargetUser, {}), {completed: true});
39 | };
40 |
41 | render() {
42 | return (
43 |
50 | );
51 | }
52 | }
53 |
54 | module.exports = ClinicUploadDone;
55 |
--------------------------------------------------------------------------------
/app/components/Loading.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | var React = require('react');
19 | var styles = require('../../styles/components/App.module.less');
20 | import { i18n } from '../utils/config.i18next';
21 |
22 | class Loading extends React.Component {
23 | render() {
24 | return
25 |
26 | {i18n.t('Loading...')}
27 |
28 |
;
29 | }
30 | }
31 |
32 | module.exports = Loading;
33 |
--------------------------------------------------------------------------------
/app/components/LoadingBar.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | var React = require('react');
19 |
20 | var styles = require('../../styles/components/LoadingBar.module.less');
21 |
22 | class LoadingBar extends React.Component {
23 | render() {
24 | return (
25 |
28 | );
29 | }
30 | }
31 |
32 | module.exports = LoadingBar;
33 |
--------------------------------------------------------------------------------
/app/components/LoggedOut.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import * as styles from '../../styles/components/LoggedOut.module.less';
3 | import { useDispatch } from 'react-redux';
4 |
5 | import actions from '../actions/';
6 | const asyncActions = actions.async;
7 | import { pages } from '../constants/otherConstants';
8 | import * as actionSources from '../constants/actionSources';
9 | import logo from '../../images/Tidepool_Logo_Light x2.png';
10 |
11 | import { i18n } from '../utils/config.i18next';
12 |
13 | export const LoggedOut = () => {
14 | const dispatch = useDispatch();
15 |
16 | const handleReturn = (e) => {
17 | e.preventDefault();
18 | dispatch(asyncActions.setPage(pages.LOGIN, actionSources.USER));
19 | };
20 |
21 | return (
22 |
23 |
24 |

25 |
26 |
27 |
28 | {i18n.t('You have been signed out of your session.')}
29 |
30 |
31 | {i18n.t(
32 | 'For security reasons, we automatically sign you out after a certain period of inactivity, or if you\'ve signed out from another browser tab.'
33 | )}
34 |
35 |
36 | {i18n.t('Please sign in again to continue.')}
37 |
38 |
49 |
50 | );
51 | };
52 |
53 | export default LoggedOut;
54 |
--------------------------------------------------------------------------------
/app/components/ProgressBar.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | var React = require('react');
19 | var PropTypes = require('prop-types');
20 |
21 | var styles = require('../../styles/components/ProgressBar.module.less');
22 |
23 | class ProgressBar extends React.Component {
24 | static propTypes = {
25 | // Percentage is an integer between 0 and 100
26 | percentage: PropTypes.number.isRequired
27 | };
28 |
29 | render() {
30 | // Minimum fill of 1%
31 | var width = this.props.percentage ? this.props.percentage : 1;
32 | return (
33 |
36 | );
37 | }
38 | }
39 |
40 | module.exports = ProgressBar;
41 |
--------------------------------------------------------------------------------
/app/components/ViewDataLink.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | var _ = require('lodash');
19 | var PropTypes = require('prop-types');
20 | var React = require('react');
21 |
22 | var styles = require('../../styles/components/ViewDataLink.module.less');
23 |
24 | import { i18n } from '../utils/config.i18next';
25 |
26 | class ViewDataLink extends React.Component {
27 | static propTypes = {
28 | href: PropTypes.string.isRequired,
29 | onViewClicked: PropTypes.func.isRequired
30 | };
31 |
32 | render() {
33 | return (
34 |
43 | );
44 | }
45 | }
46 |
47 | module.exports = ViewDataLink;
48 |
--------------------------------------------------------------------------------
/app/constants/usrMessages.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = {
3 | EMAIL_SENT: 'We just sent you an e-mail.',
4 | MSG_UTC: 'UTC time: ',
5 | YOUR_ACCOUNT_DATA_SETUP: 'Click here to complete the "Set up data storage" step.',
6 | };
7 |
--------------------------------------------------------------------------------
/app/containers/NoUploadTargetsPage.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014-2016, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import _ from 'lodash';
19 | import { connect } from 'react-redux';
20 | import React, { Component } from 'react';
21 | import NoUploadTargets from '../components/NoUploadTargets';
22 |
23 | export class NoUploadTargetsPage extends Component {
24 |
25 | render() {
26 | const newPatientLink = _.get(this.props, ['blipUrls', 'newPatient'], '');
27 | const blipUrl = _.get(this.props, ['blipUrls', 'blipUrl'], '');
28 | const user = _.get(this.props, ['allUsers', this.props.loggedInUser], null);
29 | return (
30 |
31 |
35 |
36 | );
37 | }
38 | }
39 |
40 | export default connect(
41 | (state) => {
42 | return {
43 | allUsers: state.allUsers,
44 | blipUrls: state.blipUrls,
45 | loggedInUser: state.loggedInUser,
46 | };
47 | }
48 | )(NoUploadTargetsPage);
49 |
--------------------------------------------------------------------------------
/app/containers/Top.js:
--------------------------------------------------------------------------------
1 | import { hot } from 'react-hot-loader/root';
2 | import rollbar from '../utils/rollbar';
3 | import _ from 'lodash';
4 | import React from 'react';
5 | import { Provider } from 'react-redux';
6 | import { Route } from 'react-router-dom';
7 | import { push } from 'connected-react-router';
8 | import { ConnectedRouter } from 'connected-react-router';
9 | import { createBrowserHistory, createMemoryHistory } from 'history';
10 |
11 | import env from '../utils/env';
12 | import { ipcRenderer } from '../utils/ipc';
13 | import config from '../../lib/config';
14 | window.DEBUG = config.DEBUG;
15 | import configureStore from '../store/configureStore';
16 | import App from './App';
17 | import '../app.global.css';
18 | import '../../styles/main.less';
19 | import { OidcWrapper } from '../auth';
20 |
21 | let history;
22 | if (env.electron) {
23 | history = createMemoryHistory();
24 | } else {
25 | history = createBrowserHistory({basename: '/uploader'});
26 | }
27 |
28 | const store = configureStore(undefined, history);
29 | store.dispatch(push('/uploader'));
30 |
31 | // This is the communication mechanism for receiving actions dispatched from
32 | // the `main` Electron process. `action` should always be the resulting object
33 | // from an action creator.
34 | ipcRenderer.on('action', function(event, action) {
35 | store.dispatch(action);
36 | });
37 |
38 | ipcRenderer.on('newHash', (e, hash) => {
39 | window.location.hash = hash;
40 | });
41 |
42 | const Top = () => (
43 |
44 |
45 |
46 | } />
47 |
48 |
49 |
50 | );
51 | export default hot(Top);
52 |
--------------------------------------------------------------------------------
/app/dev-app-update.yml:
--------------------------------------------------------------------------------
1 | # easiest way is to just launch `python -m http.server 8080`
2 | # in a folder that contains the `latest.yml` and installation file
3 |
4 | provider: generic
5 | url: http://127.0.0.1:8080
6 |
--------------------------------------------------------------------------------
/app/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from 'react-dom';
3 |
4 | import localStore from '../lib/core/localStore';
5 | import Top from './containers/Top';
6 |
7 | localStore.init(localStore.getInitialState(), () => {});
8 |
9 | render(
10 | ,
11 | document.getElementById('app')
12 | );
13 |
--------------------------------------------------------------------------------
/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tidepool-uploader",
3 | "productName": "tidepool-uploader",
4 | "version": "2.62.0",
5 | "description": "Tidepool Project Universal Uploader",
6 | "main": "./main.prod.js",
7 | "author": {
8 | "name": "Tidepool Project",
9 | "email": "gerrit@tidepool.org"
10 | },
11 | "license": "BSD-2-Clause",
12 | "dependencies": {
13 | "@tidepool/direct-io": "3.0.2",
14 | "drivelist": "12.0.2",
15 | "keytar": "7.9.0",
16 | "usb": "2.13.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/reducers/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2015, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import _ from 'lodash';
19 | import { combineReducers } from 'redux';
20 | import { connectRouter } from 'connected-react-router';
21 | import { reducer as formReducer } from 'redux-form';
22 | import * as misc from './misc';
23 | import * as uploads from './uploads';
24 | import * as users from './users';
25 | import working from './working';
26 |
27 | const rootReducer = function(history) {
28 | return combineReducers(
29 | _.assign(
30 | misc,
31 | uploads,
32 | users,
33 | { form: formReducer },
34 | { router: connectRouter(history) },
35 | { working },
36 | )
37 | );
38 | };
39 |
40 | export default rootReducer;
41 |
--------------------------------------------------------------------------------
/app/static/silent-check-sso.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/store/configureStore.js:
--------------------------------------------------------------------------------
1 | if (process.env.NODE_ENV === 'production') {
2 | module.exports = require('./configureStore.production'); // eslint-disable-line global-require
3 | } else {
4 | module.exports = require('./configureStore.development'); // eslint-disable-line global-require
5 | }
6 |
--------------------------------------------------------------------------------
/app/store/configureStore.production.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware } from 'redux';
2 | import thunk from 'redux-thunk';
3 | import { routerMiddleware } from 'connected-react-router';
4 | import rootReducer from '../reducers';
5 | import api from '../../lib/core/api';
6 | import config from '../../lib/config';
7 | import { createErrorLogger } from '../utils/errors';
8 | import { createMetricsTracker } from '../utils/metrics';
9 | import { oidcMiddleware } from '../auth';
10 |
11 | api.create({
12 | apiUrl: config.API_URL,
13 | uploadUrl: config.UPLOAD_URL,
14 | dataUrl: config.DATA_URL,
15 | version: config.version
16 | });
17 |
18 | export default function configureStore(initialState, history) {
19 | const router = routerMiddleware(history);
20 | const enhancer = applyMiddleware(
21 | thunk,
22 | router,
23 | createErrorLogger(api),
24 | createMetricsTracker(api),
25 | oidcMiddleware(api),
26 | );
27 |
28 | return createStore(rootReducer(history), initialState, enhancer); // eslint-disable-line
29 | }
30 |
--------------------------------------------------------------------------------
/app/utils/debugMode.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2017, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 | import env from './env';
18 | import _ from 'lodash';
19 | import { ipcRenderer, ipcMain } from './ipc';
20 |
21 | if (env.electron_renderer) {
22 | let isDebug =
23 | process.env.DEBUG_ERROR ||
24 | JSON.parse(localStorage.getItem('isDebug')) ||
25 | false;
26 |
27 | const debugMode = (module.exports = {
28 | isDebug,
29 | setDebug: function(isDebug) {
30 | ipcRenderer.send('setDebug', isDebug);
31 | localStorage.setItem('isDebug', JSON.stringify(isDebug));
32 | debugMode.isDebug = isDebug;
33 | return debugMode.isDebug;
34 | },
35 | });
36 | } else {
37 | let isDebug = _.get(process, 'env.DEBUG_ERROR', false);
38 |
39 | if (env.electron_main) {
40 | ipcMain.on('setDebug', (event, arg) => {
41 | debugMode.isDebug = arg;
42 | });
43 | }
44 |
45 | const debugMode = (module.exports = {
46 | isDebug,
47 | setDebug: function(isDebug) {
48 | debugMode.isDebug = isDebug;
49 | return debugMode.isDebug;
50 | },
51 | });
52 | }
53 |
--------------------------------------------------------------------------------
/app/utils/env.js:
--------------------------------------------------------------------------------
1 | import isElectron from 'is-electron';
2 |
3 | const is_electron = isElectron();
4 | const isRenderer = process && process.type === 'renderer';
5 | const isBrowser =
6 | typeof window !== 'undefined' && typeof window.document !== 'undefined';
7 | const isNode =
8 | typeof process !== 'undefined' &&
9 | process.versions != null &&
10 | process.versions.node != null;
11 |
12 | export default {
13 | electron: is_electron,
14 | electron_main: is_electron && !isRenderer,
15 | electron_renderer: is_electron && isRenderer,
16 | browser: !is_electron && isBrowser,
17 | node: isNode,
18 | };
19 |
--------------------------------------------------------------------------------
/app/utils/ipc.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import env from './env';
3 |
4 | let ipcRenderer = { send: _.noop, on: _.noop };
5 | let ipcMain = { send: _.noop, on: _.noop };
6 |
7 | if (env.electron) {
8 | let electron = require('electron');
9 | ipcRenderer = electron.ipcRenderer;
10 | ipcMain = electron.ipcMain;
11 | }
12 |
13 | export { ipcRenderer, ipcMain };
14 |
--------------------------------------------------------------------------------
/app/utils/rollbar.js:
--------------------------------------------------------------------------------
1 | /* global __VERSION_SHA__ */
2 | import Rollbar from 'rollbar/dist/rollbar.umd';
3 |
4 | let rollbar;
5 |
6 | if (process.env.NODE_ENV === 'production') {
7 |
8 | rollbar = new Rollbar({
9 | accessToken: 'e73a71af17f7497eb606ef6278b190f3',
10 | captureUncaught: true,
11 | enabled: process.env.NODE_ENV === 'production',
12 | payload: {
13 | environment: 'electron_renderer',
14 | client: {
15 | javascript: {
16 | code_version: __VERSION_SHA__,
17 | guess_uncaught_frames: true
18 | }
19 | },
20 | server: {
21 | root: 'webpack:///./'
22 | }
23 | },
24 | // to deal with URI's as local filesystem paths, we use the "many domain" transform:
25 | // https://rollbar.com/docs/source-maps/#using-source-maps-on-many-domains
26 | transform: function(payload) {
27 | var trace = payload.body.trace;
28 | if (trace && trace.frames) {
29 | for (var i = 0; i < trace.frames.length; i++) {
30 | var filename = trace.frames[i].filename;
31 | if (filename) {
32 | trace.frames[i].filename = 'http://dynamichost/dist/renderer.prod.js';
33 | }
34 | }
35 | }
36 | }
37 | }
38 | );
39 | };
40 |
41 | export default rollbar;
42 |
--------------------------------------------------------------------------------
/app/web.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Tidepool Uploader
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/artifact.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 | wget -q -O artifact_node.sh 'https://raw.githubusercontent.com/tidepool-org/tools/add-circleci/artifact/artifact.sh'
4 | chmod +x artifact_node.sh
5 |
6 | . ./version.sh
7 | ./artifact_node.sh node
8 |
--------------------------------------------------------------------------------
/config.server.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | var fs = require('fs');
17 |
18 | function maybeReplaceWithContentsOfFile(obj, field) {
19 | var potentialFile = obj[field];
20 | if (potentialFile != null && fs.existsSync(potentialFile)) {
21 | obj[field] = fs.readFileSync(potentialFile).toString();
22 | }
23 | }
24 |
25 | var config = {};
26 |
27 | config.httpPort = process.env.PORT;
28 |
29 | config.httpsPort = process.env.HTTPS_PORT;
30 |
31 | // The https config to pass along to https.createServer.
32 | var theConfig = process.env.HTTPS_CONFIG;
33 | config.httpsConfig = null;
34 | if (theConfig) {
35 | config.httpsConfig = JSON.parse(theConfig);
36 | maybeReplaceWithContentsOfFile(config.httpsConfig, 'key');
37 | maybeReplaceWithContentsOfFile(config.httpsConfig, 'cert');
38 | maybeReplaceWithContentsOfFile(config.httpsConfig, 'pfx');
39 | }
40 |
41 | // Make sure we have an HTTPS config if a port is set
42 | if (config.httpsPort && !config.httpsConfig) {
43 | throw new Error('No https config provided, please set HTTPS_CONFIG with at least the certificate to use.');
44 | }
45 |
46 | module.exports = config;
47 |
--------------------------------------------------------------------------------
/config/development.sh:
--------------------------------------------------------------------------------
1 | export API_URL='https://dev-api.tidepool.org'
2 | export UPLOAD_URL='https://dev-uploads.tidepool.org'
3 | export BLIP_URL='https://dev-blip.tidepool.org'
4 | export DATA_URL='https://dev-api.tidepool.org/dataservices'
5 | export DEBUG_ERROR=false
6 | export REDUX_LOG=false
7 | export REDUX_DEV_UI=false
8 |
--------------------------------------------------------------------------------
/config/device-debug.sh:
--------------------------------------------------------------------------------
1 | export API_URL='http://localhost:31500'
2 | export UPLOAD_URL='http://localhost:31500'
3 | export DATA_URL='http://localhost:31500/dataservices'
4 | export BLIP_URL='http://localhost:31500'
5 | export DEBUG_ERROR=true
6 | export REDUX_LOG=false
7 | export REDUX_DEV_UI=false
8 |
--------------------------------------------------------------------------------
/config/integration.sh:
--------------------------------------------------------------------------------
1 | export API_URL='https://int-api.tidepool.org'
2 | export UPLOAD_URL='https://int-uploads.tidepool.org'
3 | export BLIP_URL='https://int-blip.tidepool.org'
4 | export DATA_URL='https://int-api.tidepool.org/dataservices'
5 | export DEBUG_ERROR=false
6 | export REDUX_LOG=false
7 | export REDUX_DEV_UI=false
8 |
--------------------------------------------------------------------------------
/config/local.example.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copy this file to `config/local.js` and update as needed
3 | */
4 |
5 | const linkedPackages = {
6 | // 'tidepool-platform-client': process.env.TIDEPOOL_DOCKER_PLATFORM_CLIENT_DIR || '../platform-client',
7 | };
8 |
9 | const environments = {
10 | local: {
11 | API_URL: 'http://localhost:8009',
12 | UPLOAD_URL: 'http://localhost:8009',
13 | DATA_URL: 'http://localhost:9220',
14 | BLIP_URL: 'http://localhost:3000'
15 | },
16 | qa1: {
17 | API_URL: 'https://qa1.development.tidepool.org',
18 | UPLOAD_URL: 'https://qa1.development.tidepool.org',
19 | DATA_URL: 'https://qa1.development.tidepool.org/dataservices',
20 | BLIP_URL: 'https://qa1.development.tidepool.org'
21 | },
22 | qa2: {
23 | API_URL: 'https://qa2.development.tidepool.org',
24 | UPLOAD_URL: 'https://qa2.development.tidepool.org',
25 | DATA_URL: 'https://qa2.development.tidepool.org/dataservices',
26 | BLIP_URL: 'https://qa2.development.tidepool.org'
27 | },
28 | int: {
29 | API_URL: 'https://external.integration.tidepool.org/',
30 | UPLOAD_URL: 'https://external.integration.tidepool.org/',
31 | DATA_URL: 'https://external.integration.tidepool.org/dataservices',
32 | BLIP_URL: 'https://external.integration.tidepool.org/'
33 | },
34 | prd: {
35 | API_URL: 'https://api.tidepool.org',
36 | UPLOAD_URL: 'https://api.tidepool.org',
37 | DATA_URL: 'https://api.tidepool.org/dataservices',
38 | BLIP_URL: 'https://app.tidepool.org'
39 | },
40 | };
41 |
42 | // Select environment here
43 | const env = 'qa1';
44 |
45 | const selectedEnv = environments[env];
46 | const apiHost = selectedEnv.API_URL;
47 | const uploadApi = apiHost;
48 |
49 | module.exports = {
50 | listLinkedPackages: () => console.log(Object.keys(linkedPackages).join(',')),
51 | linkedPackages,
52 | apiHost,
53 | uploadApi,
54 | environment: selectedEnv
55 | };
56 |
--------------------------------------------------------------------------------
/config/local.sh:
--------------------------------------------------------------------------------
1 | export API_URL='http://localhost:31500'
2 | export UPLOAD_URL='http://localhost:31500'
3 | export DATA_URL='http://localhost:31500/dataservices'
4 | export BLIP_URL='http://localhost:31500'
5 | export DEBUG_ERROR=false
6 | export REDUX_LOG=false
7 | export REDUX_DEV_UI=false
8 |
--------------------------------------------------------------------------------
/config/qa1.sh:
--------------------------------------------------------------------------------
1 | export API_URL='https://qa1.development.tidepool.org'
2 | export UPLOAD_URL='https://qa1.development.tidepool.org'
3 | export BLIP_URL='https://qa1.development.tidepool.org'
4 | export DATA_URL='https://qa1.development.tidepool.org/dataservices'
5 | export DEBUG_ERROR=true
6 | export REDUX_LOG=true
7 | export REDUX_DEV_UI=true
8 |
--------------------------------------------------------------------------------
/config/qa2.sh:
--------------------------------------------------------------------------------
1 | export API_URL='https://qa2.development.tidepool.org'
2 | export UPLOAD_URL='https://qa2.development.tidepool.org'
3 | export BLIP_URL='https://qa2.development.tidepool.org'
4 | export DATA_URL='https://qa2.development.tidepool.org/dataservices'
5 | export DEBUG_ERROR=true
6 | export REDUX_LOG=true
7 | export REDUX_DEV_UI=true
8 |
--------------------------------------------------------------------------------
/config/staging.sh:
--------------------------------------------------------------------------------
1 | export API_URL='https://stg-api.tidepool.org'
2 | export UPLOAD_URL='https://stg-uploads.tidepool.org'
3 | export BLIP_URL='https://stg-blip.tidepool.org'
4 | export DATA_URL='https://stg-api.tidepool.org/dataservices'
5 | export DEBUG_ERROR=false
6 | export REDUX_LOG=false
7 | export REDUX_DEV_UI=false
8 |
--------------------------------------------------------------------------------
/config/ui-debug.sh:
--------------------------------------------------------------------------------
1 | export API_URL='http://localhost:31500'
2 | export UPLOAD_URL='http://localhost:31500'
3 | export DATA_URL='http://localhost:31500/dataservices'
4 | export BLIP_URL='http://localhost:31500'
5 | export DEBUG_ERROR=false
6 | export REDUX_LOG=true
7 | export REDUX_DEV_UI=true
8 |
--------------------------------------------------------------------------------
/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | version: "3.4"
2 | services:
3 | uploader:
4 | network_mode: host
5 | ipc: host
6 | privileged: true
7 | build:
8 | context: .
9 | dockerfile: Dockerfile.dev
10 | image: "tidepool/uploader:latest"
11 | container_name: "uploader"
12 | environment:
13 | - API_URL=${API_URL:-http://localhost:3000}
14 | - UPLOAD_URL=${UPLOAD_URL:-http://localhost:3000}
15 | - DATA_URL=${DATA_URL:-http://localhost:3000}
16 | - BLIP_URL=${BLIP_URL:-http://localhost:3000}
17 | - DEBUG_ERROR=${DEBUG_ERROR:-false}
18 | - REDUX_LOG=${REDUX_LOG:-false}
19 | - REDUX_DEV_UI=${REDUX_DEV_UI:-false}
20 | - DISPLAY=unix$DISPLAY
21 | - ROLLBAR_POST_TOKEN=${ROLLBAR_POST_TOKEN}
22 | volumes:
23 | - .:/home/node/uploader
24 | - /tmp/.X11-unix:/tmp/.X11-unix
25 | - /dev:/dev
26 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Tidepool uploader developer guide
2 |
3 | As you're getting ready to develop code in this repository, we recommend starting with the following documents:
4 |
5 | - [overview of features](./guide/FeatureOverview.md)
6 | - [app & directory structure](./guide/DirectoryStructure.md)
7 | - [architecture](./guide/Architecture.md)
8 | - [code style](./guide/CodeStyle.md)
9 | - [application state](./state/README.md)
10 | - [driver checklists](./checklists/README.md)
11 |
--------------------------------------------------------------------------------
/docs/checklists/README.md:
--------------------------------------------------------------------------------
1 | Checklists for the implementation of drivers for reading data from diabetes devices currently supported or in development.
2 |
3 | * [Abbott FreeStyle Lite & Freedom Lite (BGM)](abbottFreeStyleLite.md)
4 | * [Abbott FreeStyle Libre (CGM & BGM data)](abbottFreeStyleLibre.md)
5 | * [Abbott FreeStyle Neo (BGM)](abbottFreeStyleNeo.md)
6 | * [Abbott Precision Xtra (blood glucose & ketone meter)](abbottPrecisionXtra.md)
7 | * [Accu-chek Aviva Connect, Guide & Guide Me (BGM)](avivaConnectAndGuide.md)
8 | * [Ascensia/Bayer Contour (BGM)](bayerContour.md)
9 | * [Ascensia/Bayer Contour Next (BGM)](bayerContourNext.md)
10 | * [CareSens N Premier & Dual (BGM)](caresensUSB.md)
11 | * [CareSens N Premier & Dual over Bluetooth (BGM)](caresensNPremierBluetooth.md)
12 | * [Dexcom CGM](dexcom.md)
13 | * [GLUCOCARD Shine, Shine XL, Shine Connex & Shine Express (GBM)](glucocard.md)
14 | * [GLUCOCARD Expression (BGM)](glucocardExpression.md)
15 | * [Insulet OmniPod Insulin Delivery System](insuletOmniPod.md)
16 | * [Medtronic 5/7-series (pump data)](medtronic.md)
17 | * [Medtronic 5/7-series (CGM data)](medtronicCGM.md)
18 | * [Medtronic 6-series (pump data)](medtronic600.md)
19 | * [Medtronic 6-series (CGM data)](medtronic600CGM.md)
20 | * [MicroTech Equil Pump](microTechEquil.md)
21 | * [OneTouch Ultra 2 (BGM)](oneTouchUltra2.md)
22 | * [OneTouch UltraMini (BGM)](oneTouchUltraMini.md)
23 | * [OneTouch Verio, Verio Flex and Verio Reflect (BGM))](oneTouchVerio.md)
24 | * [OneTouch Verio Flex and Verio Reflect oover Bluetooth (BGM))](oneTouchVerio.md)
25 | * [OneTouch VerioIQ (BGM)](oneTouchVerioIQ.md)
26 | * [ReliOn Premier (BGM)](reliOnPremier.md)
27 | * [Tandem Insulin Pumps](tandem.md)
28 | * [Tandem (CGM data)](tandemCGM.md)
29 | * [Trividia TRUE METRIX (BGM)](trividiaTrueMetrix.md)
30 |
--------------------------------------------------------------------------------
/docs/checklists/abbottFreeStyleLite.md:
--------------------------------------------------------------------------------
1 | # Abbott FreeStyle Lite Meter
2 |
3 | ## Checklist for Blood Glucose Meter Implementation
4 |
5 | (Key:
6 |
7 | - `[x]` available in data protocol/documented in spec and implemented
8 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
9 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
10 | - `*[ ]` TODO: needs implementation!
11 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
12 |
13 | ### Required if Present
14 |
15 | - `[x]` smbg values
16 | - `*[?]` units of smbg values (read from device, not hard-coded)
17 | - `[x]` out-of-range values (LO or HI)
18 | - `*[?]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
19 | - `[?]` date & time settings changes
20 | - `[ ]` blood ketone values
21 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
22 | - `[ ]` ketone out-of-range values
23 | - `[ ]` ketone out-of-range value thresholds
24 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
25 |
26 | ### No Tidepool Data Model Yet
27 |
28 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
29 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
30 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
31 |
32 | ### Tidepool ingestion API
33 |
34 | Choose one of the following:
35 |
36 | - `[x]` legacy "jellyfish" ingestion API
37 | - `[ ]` platform ingestion API
38 |
39 | ### Known implementation issues/TODOs
40 |
41 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
42 |
--------------------------------------------------------------------------------
/docs/checklists/abbottFreeStyleNeo.md:
--------------------------------------------------------------------------------
1 | ## Checklist for Blood Glucose Meter Implementation
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[-]` units of smbg values (read from device, not hard-coded)
15 | - `[ ]` out-of-range values (LO or HI)
16 | - `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[x]` date & time settings changes
18 | - `[x]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[x]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/abbottPrecisionXtra.md:
--------------------------------------------------------------------------------
1 | # Abbott Precision Xtra Blood and Ketone Meter
2 |
3 | ## Checklist for Blood Glucose Meter Implementation
4 |
5 | (Key:
6 |
7 | - `[x]` available in data protocol/documented in spec and implemented
8 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
9 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
10 | - `*[ ]` TODO: needs implementation!
11 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
12 |
13 | ### Required if Present
14 |
15 | - `[x]` smbg values
16 | - `*[?]` units of smbg values (read from device, not hard-coded)
17 | - `[x]` out-of-range values (LO or HI)
18 | - `*[?]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
19 | - `[ ]` date & time settings changes
20 | - `[x]` blood ketone values
21 | - `[x]` units of blood ketone values (read from device, not hard-coded)
22 | - `[x]` ketone out-of-range values
23 | - `[ ]` ketone out-of-range value thresholds
24 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
25 |
26 | ### No Tidepool Data Model Yet
27 |
28 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
29 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
30 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
31 |
32 | ### Tidepool ingestion API
33 |
34 | Choose one of the following:
35 |
36 | - `[x]` legacy "jellyfish" ingestion API
37 | - `[ ]` platform ingestion API
38 |
39 | ### Known implementation issues/TODOs
40 |
41 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
42 |
--------------------------------------------------------------------------------
/docs/checklists/avivaConnectAndGuide.md:
--------------------------------------------------------------------------------
1 | ## Accu-Chek Aviva Connect, Guide & Guide Me
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[ ]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[?]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/bayerContour.md:
--------------------------------------------------------------------------------
1 | ## Checklist for Blood Glucose Meter Implementation
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[x]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/bayerContourNext.md:
--------------------------------------------------------------------------------
1 | # Bayer Contour Next
2 |
3 | Supported devices:
4 | - Bayer Contour Next
5 | - Bayer Contour Next USB
6 | - Bayer Contour USB
7 |
8 | ## Checklist for Blood Glucose Meter Implementation
9 |
10 | (Key:
11 |
12 | - `[x]` available in data protocol/documented in spec and implemented
13 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
14 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
15 | - `*[ ]` TODO: needs implementation!
16 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
17 |
18 | ### Required if Present
19 |
20 | - `[x]` smbg values
21 | - `[x]` units of smbg values (read from device, not hard-coded)
22 | - `[x]` out-of-range values (LO or HI)
23 | - `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
24 | - `[ ]` date & time settings changes
25 | - `[ ]` blood ketone values
26 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
27 | - `[ ]` ketone out-of-range values
28 | - `[ ]` ketone out-of-range value thresholds
29 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
30 |
31 | ### No Tidepool Data Model Yet
32 |
33 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
34 | - `[-]` device settings, other than date & time (e.g., target blood glucose range)
35 | - `[-]` tag/note (e.g., pre- vs. post-meal)
36 | - `[-]` carbs
37 | - `[-]` insulin
38 |
39 | ### Tidepool ingestion API
40 |
41 | Choose one of the following:
42 |
43 | - `[x]` legacy "jellyfish" ingestion API
44 | - `[ ]` platform ingestion API
45 |
46 | ### Known implementation issues/TODOs
47 |
48 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
49 |
--------------------------------------------------------------------------------
/docs/checklists/careSensUSB.md:
--------------------------------------------------------------------------------
1 | ## CareSens meters over USB cable
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[x]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[x]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/caresensNPremierBluetooth.md:
--------------------------------------------------------------------------------
1 | ## CareSens N Premier & Dual meters over Bluetooth LE
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[x]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[-]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[-]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[-]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
41 | It is not possible to distinguish between CareSens models when uploading via Bluetooth, as the Bluetooth advertising name for Premier and Dual meters uses the same format ("CareSens + 4 digits")
42 |
--------------------------------------------------------------------------------
/docs/checklists/glucoRx.md:
--------------------------------------------------------------------------------
1 | ## GlucoRx
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[x]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[x]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[ ]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | We are also ignoring Hematocrit (HCT) values from the HCT meter, as it's not in our data model yet.
40 |
--------------------------------------------------------------------------------
/docs/checklists/glucocard.md:
--------------------------------------------------------------------------------
1 | ## GLUCOCARD Shine, Shine XL, Shine Connex, Shine Express
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/glucocardExpression.md:
--------------------------------------------------------------------------------
1 | ## GLUCOCARD Expression
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[x]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
--------------------------------------------------------------------------------
/docs/checklists/oneTouchUltra2.md:
--------------------------------------------------------------------------------
1 | ## OneTouch Ultra 2
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[x]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[x]` legacy "jellyfish" ingestion API
35 | - `[ ]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/oneTouchUltraMini.md:
--------------------------------------------------------------------------------
1 | ## LifeScan OneTouch UltraMini
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[x]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | #### Notes:
25 | - according to user manual, <20 mg/dL is LO and >600 mg/dL is HI
26 |
27 | ### No Tidepool Data Model Yet
28 |
29 | - `[ ]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
30 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
31 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
32 |
33 | #### Notes:
34 | - control solution tests are not sent from the meter
35 |
36 | ### Tidepool ingestion API
37 |
38 | Choose one of the following:
39 |
40 | - `[ ]` legacy "jellyfish" ingestion API
41 | - `[ ]` platform ingestion API
42 |
43 | ### Known implementation issues/TODOs
44 |
45 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
46 |
--------------------------------------------------------------------------------
/docs/checklists/oneTouchVerioBLE.md:
--------------------------------------------------------------------------------
1 | ## OneTouch Verio Flex & Verio Reflect over Bluetooth
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[-]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/reliOnPremier.md:
--------------------------------------------------------------------------------
1 | ## ReliOn Premier (BLU, Voice and Classic)
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[ ]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/reliOnPrime.md:
--------------------------------------------------------------------------------
1 | ## Checklist for ReliOn Prime meter
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[-]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklists/trividiaTrueMetrix.md:
--------------------------------------------------------------------------------
1 | ## Trividia Health TRUE METRIX, TRUE METRIX AIR and TRUE METRIX GO
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[x]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[x]` out-of-range values (LO or HI)
16 | - `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[x]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[-]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[-]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[x]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklisttemplates/BGMChecklist.md:
--------------------------------------------------------------------------------
1 | ## Checklist for Blood Glucose Meter Implementation
2 |
3 | (Key:
4 |
5 | - `[x]` available in data protocol/documented in spec and implemented
6 | - `[-]` available in data protocol/documented in spec but *not* yet implemented
7 | - `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
8 | - `*[ ]` TODO: needs implementation!
9 | - `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)
10 |
11 | ### Required if Present
12 |
13 | - `[ ]` smbg values
14 | - `[ ]` units of smbg values (read from device, not hard-coded)
15 | - `[ ]` out-of-range values (LO or HI)
16 | - `[ ]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
17 | - `[ ]` date & time settings changes
18 | - `[ ]` blood ketone values
19 | - `[ ]` units of blood ketone values (read from device, not hard-coded)
20 | - `[ ]` ketone out-of-range values
21 | - `[ ]` ketone out-of-range value thresholds
22 | - `[ ]` use `common.checkDeviceTime(currentDeviceTime, timezone, cb)` to check against server time
23 |
24 | ### No Tidepool Data Model Yet
25 |
26 | - `[ ]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
27 | - `[ ]` device settings, other than date & time (e.g., target blood glucose range)
28 | - `[ ]` tag/note (e.g., pre- vs. post-meal)
29 |
30 | ### Tidepool ingestion API
31 |
32 | Choose one of the following:
33 |
34 | - `[ ]` legacy "jellyfish" ingestion API
35 | - `[ ]` platform ingestion API
36 |
37 | ### Known implementation issues/TODOs
38 |
39 | *Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
40 |
--------------------------------------------------------------------------------
/docs/checklisttemplates/README.md:
--------------------------------------------------------------------------------
1 | Templates of checklists for implementations of drivers to read data from diabetes devices.
2 |
3 | - [blood glucose meters (BGMs)](BGMChecklist.md)
4 | - [continuous glucose monitors (CGMs)](CGMChecklist.md)
5 | - [insulin pumps](PumpChecklist.md)
--------------------------------------------------------------------------------
/docs/guide/Architecture.md:
--------------------------------------------------------------------------------
1 | ### Architecture
2 |
3 | Coming soon!
4 |
--------------------------------------------------------------------------------
/docs/guide/CodeStyle.md:
--------------------------------------------------------------------------------
1 | ### Code style
2 |
3 | See [the section of the README dedicated to this topic](../../README.md#linting--code-style 'Linting & Code Style') as well as the general [React @ Tidepool guide](http://developer.tidepool.io/docs/front-end/react/index.html 'Tidepool developer portal: React @ Tidepool') for React-specific style and best practices.
4 |
--------------------------------------------------------------------------------
/docs/guide/DirectoryStructure.md:
--------------------------------------------------------------------------------
1 | ### App & directory structure
2 |
3 | Coming soon!
4 |
--------------------------------------------------------------------------------
/docs/guide/FeatureOverview.md:
--------------------------------------------------------------------------------
1 | ## Overview of features
2 |
3 | Coming soon!
4 |
--------------------------------------------------------------------------------
/docs/misc/README.md:
--------------------------------------------------------------------------------
1 | Miscellaneous technical documents.
2 |
3 | - guidance documentation for ["simulator" modules](PWDSimulators.md) accompanying our insulin pump drivers
4 | - technical explanation of the challenges of ["flat" basal profiles (on insulin pumps)](FlatRateBasals.md)
5 | - some details concerning [CSS modules in the uploader](CSSModules.md)
6 |
--------------------------------------------------------------------------------
/docs/state/CustomMiddleware.md:
--------------------------------------------------------------------------------
1 | ## Custom Middleware
2 |
3 | One of the great benefits of [redux](http://redux.js.org/) is the easy path it provides for writing middleware to perform various actions in response to some or all of the redux actions that are the source of all changes to the application's state tree. The open-source community provides some great middleware options like the [redux logger](https://github.com/fcomb/redux-logger) that we include behind an environment variable to assist in development.
4 |
5 | In the Tidepool Uploader, we also include two custom middlewares: one for making calls to our metrics API and one for logging application errors.
6 |
7 | The source for the metrics middleware is found in `lib/redux/utils/metrics.js`. It performs a call to the Tidepool metrics API for any redux action that includes a `metric` property inside its `meta` property.
8 |
9 | The source of the error-logging middleware is found in `lib/redux/utils/errors.js`. It performs a call to the Tidepool server-side error logging for any redux action that has the boolean flag `error` as true and a JavaScript `Error` object as its `payload`.
10 |
11 | If the source code of our custom middlewares confuses more than it answers questions, we recommended reading the excellent [intro to middleware](http://redux.js.org/docs/advanced/Middleware.html) included in the redux documentation.
12 |
--------------------------------------------------------------------------------
/docs/state/README.md:
--------------------------------------------------------------------------------
1 | ### The uploader's usage of Redux for application state management
2 |
3 | As of February of 2016, we have migrated the application state (including UI state) management in the Tidepool Uploader to [Redux](http://redux.js.org/). Redux is a lightweight but powerful state container for JavaScript applications that takes inspiration equally from (a) Facebook's [Flux](https://facebook.github.io/flux/) application architecture (especially its emphasis on one-way data flow) and (b) functional programming, in particular [Elm](http://elm-lang.org/), a functional programming language for building GUIs on the web.
4 |
5 | Please read the general [Redux @ Tidepool](http://developer.tidepool.io/docs/front-end/redux/index.html 'Tidepool developer portal: Redux @ Tidepool') documentation before reading the documents listed below giving details of our usage of Redux in the Tidepool uploader.
6 |
7 | Keep in mind also that we have [some work remaining](https://trello.com/c/mmMR0qpw 'Trello: align the uploader\'s use of Redux with blip\'s') to bring the uploader's Redux implementation more in line with that in Tidepool's main web application [blip](https://github.com/tidepool-org/blip 'GitHub: blip').
8 |
9 | Detailed documentation on the uploader's Redux implementation:
10 |
11 | - [Example state tree](ExampleStateTree.md)
12 | - [Glossary of state tree terms](StateTreeGlossary.md)
13 | - [Custom middleware](CustomMiddleware.md)
14 |
--------------------------------------------------------------------------------
/docs/state/app-snapshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/docs/state/app-snapshot.png
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -eu
4 |
5 | npm config set scripts-prepend-node-path true
6 |
7 | yarn --cwd /home/node/uploader/ install
8 |
9 | yarn --cwd /home/node/uploader/ run dev
10 |
11 | # wait forever
12 | while true
13 | do
14 | tail -f /dev/null & wait ${!}
15 | done
--------------------------------------------------------------------------------
/extension/README.md:
--------------------------------------------------------------------------------
1 | # Uploader Helper extension
2 |
3 | This extension supports additional upload mechanisms for specific blood glucose meters, expanding support for compatible devices.
4 |
5 | To distribute a new version of this extension, create a .zip file of this directory and upload the package to the Tidepool Uploader Helper store listing at:
6 |
7 | https://chrome.google.com/u/1/webstore/devconsole/90b45b27-1051-413d-ba60-4b1e3971fe7a/nejgoemnddedidafdoppamlbijokiahb/edit
--------------------------------------------------------------------------------
/extension/icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/extension/icon-128.png
--------------------------------------------------------------------------------
/extension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 3,
3 | "name": "Tidepool Uploader Helper",
4 | "version": "1.0",
5 | "description": "This extension supports additional upload mechanisms for specific blood glucose meters, expanding support for compatible devices.",
6 | "icons": {
7 | "128": "icon-128.png"
8 | },
9 | "permissions": [
10 | "nativeMessaging"
11 | ],
12 | "background": {
13 | "service_worker": "background.js"
14 | },
15 | "externally_connectable": {
16 | "matches": [
17 | "http://localhost:3005/*",
18 | "https://*.tidepool.org/*"
19 | ]
20 | },
21 | "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAos4V4S/7tWoEGVppnpQaDsl0DjibWk12sSUfr3chmbDcPfQPw+1iZNZ16oMazdfyj/UBQA5hYlCycSSGExvl8N1JM0/sJ5DEs1hy5cmyR6MuAdXOuu0X1NzRS8rdi67msWXVJUO51AUIByHy5BArjw3AzaE4kxAWRexUvMjb8wC7/k5hmU7pimL/t7sa0O6ghmzJFvqu7nzK6x5+bGeHRfXg0OLqtAc3eLByRZbT0HOfgPEFsBq5LrbS3/MvzjNorWon0BcLYV7JayFkmpV/p3nQp+7SwiHKadsexlwreOly+Gk6tppkieiYsznI4kqQOpVrPrI+iMe+LCfw4NzhVQIDAQAB"
22 | }
23 |
--------------------------------------------------------------------------------
/fonts/basis-grotesque-black-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-black-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-black.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-bold-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-bold-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-bold.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-light-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-light-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-light.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-medium-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-medium-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-medium.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-mono-bold-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-mono-bold-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-mono-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-mono-bold.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-mono-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-mono-italic.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-mono-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-mono-regular.woff
--------------------------------------------------------------------------------
/fonts/basis-grotesque-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/basis-grotesque-regular.woff
--------------------------------------------------------------------------------
/fonts/icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/icons.woff
--------------------------------------------------------------------------------
/fonts/opensans-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/opensans-bold.woff
--------------------------------------------------------------------------------
/fonts/opensans-bolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/opensans-bolditalic.woff
--------------------------------------------------------------------------------
/fonts/opensans-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/opensans-italic.woff
--------------------------------------------------------------------------------
/fonts/opensans.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/fonts/opensans.woff
--------------------------------------------------------------------------------
/images/MM600_CNL_combo@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/MM600_CNL_combo@2x.jpg
--------------------------------------------------------------------------------
/images/MM723_CNL_combo@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/MM723_CNL_combo@2x.jpg
--------------------------------------------------------------------------------
/images/Screenshot 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/Screenshot 1.png
--------------------------------------------------------------------------------
/images/Screenshot 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/Screenshot 2.png
--------------------------------------------------------------------------------
/images/T_icon_animated.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_animated.gif
--------------------------------------------------------------------------------
/images/T_icon_dark_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_dark_128.png
--------------------------------------------------------------------------------
/images/T_icon_dark_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_dark_16.png
--------------------------------------------------------------------------------
/images/T_icon_dark_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_dark_32.png
--------------------------------------------------------------------------------
/images/T_icon_dark_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_dark_512.png
--------------------------------------------------------------------------------
/images/T_icon_dark_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_dark_64.png
--------------------------------------------------------------------------------
/images/T_icon_smalltile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_smalltile.png
--------------------------------------------------------------------------------
/images/T_icon_transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/T_icon_transparent.png
--------------------------------------------------------------------------------
/images/Tidepool_Logo_Light x2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/Tidepool_Logo_Light x2.png
--------------------------------------------------------------------------------
/images/adhoc_s1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/adhoc_s1.png
--------------------------------------------------------------------------------
/images/adhoc_s2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/adhoc_s2.png
--------------------------------------------------------------------------------
/images/happy_device.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/happy_device.png
--------------------------------------------------------------------------------
/images/search_icon_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/search_icon_2x.png
--------------------------------------------------------------------------------
/images/tidepoolLogoWhite_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/tidepoolLogoWhite_256.png
--------------------------------------------------------------------------------
/images/tidepool_logo_transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/tidepool_logo_transparent.png
--------------------------------------------------------------------------------
/images/unhappy_device.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/unhappy_device.png
--------------------------------------------------------------------------------
/images/unhappy_meter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/images/unhappy_meter.png
--------------------------------------------------------------------------------
/jest.setup.js:
--------------------------------------------------------------------------------
1 | jest.mock('@electron/remote', () => {
2 | const mockI18n = {
3 | t: jest.fn(
4 | (str, obj = {}) => {
5 | const keys = Object.keys(obj);
6 | let replacedStr = str;
7 | for (const key of keys) {
8 | console.log(key);
9 | const re = new RegExp(`{{\\s*${key}\\s*}}`, 'g');
10 | replacedStr = replacedStr.replace(re, obj[key]);
11 | }
12 | return replacedStr;
13 | }
14 | )
15 | };
16 |
17 | return {
18 | getGlobal: jest.fn(() => mockI18n),
19 | };
20 | });
21 |
--------------------------------------------------------------------------------
/lib/bleDevice.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2019, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | const isBrowser = typeof window !== 'undefined';
19 | const debug = isBrowser ? require('bows')('bleDevice') : console.log;
20 |
21 | export default class BLEDevice {
22 | constructor(deviceInfo) {
23 | debug('BLE Constructor');
24 | this.ble = deviceInfo.ble;
25 | }
26 | };
27 |
28 | module.exports = BLEDevice;
29 |
--------------------------------------------------------------------------------
/lib/config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 | var pkg = require('../package.json');
18 |
19 | var config = require('../.config');
20 |
21 | if (!config) {
22 | throw new Error('Expected `config` on the global `window` object');
23 | }
24 |
25 | config.version = pkg.version;
26 | config.namedVersion = pkg.name+' '+pkg.version;
27 |
28 | module.exports = config;
29 |
--------------------------------------------------------------------------------
/lib/core/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6
6 | },
7 | "rules": {
8 | "max-len": "warn",
9 | "import/order": "warn",
10 | "no-plusplus": [
11 | "error",
12 | {
13 | "allowForLoopAfterthoughts": true
14 | }
15 | ],
16 | "lodash/prefer-lodash-method": "off",
17 | "arrow-parens": "warn",
18 | "operator-linebreak": "warn",
19 | "no-else-return": "warn",
20 | "object-curly-newline": "warn",
21 | "linebreak-style": 0,
22 | "implicit-arrow-linebreak": "warn"
23 | },
24 | "settings": {
25 | "lodash": 3,
26 | "import/resolver": node
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/core/localStore.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import env from '../../app/utils/env';
19 |
20 | const storage = require('./storage');
21 |
22 | const mockStore = {
23 | getItem: (item) => this[item],
24 | setItem: (item, val) => { this[item] = val; return val; },
25 | removeItem: (item) => delete this[item],
26 | };
27 |
28 | let localStore = null;
29 | let ourStore = null;
30 |
31 | if (env.electron_renderer || env.browser) {
32 | ourStore = typeof window !== 'undefined' ? window.localStorage : mockStore;
33 | }
34 |
35 | if (ourStore) {
36 | localStore = storage({
37 | ourStore,
38 | });
39 | localStore.getInitialState = () => ({
40 | authToken: null,
41 | devices: null,
42 | });
43 | }
44 |
45 | module.exports = localStore;
46 |
--------------------------------------------------------------------------------
/lib/core/mapcat.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | const _ = require('lodash');
17 |
18 | // mapcat([1, 5], function(x) { return [x, x+1]; });
19 | // -> [1, 2, 5, 6]
20 | module.exports = (coll, fn) => _.reduce(coll, (acc, item) => {
21 | const fnItem = fn(item);
22 | if (fnItem && fnItem.length) {
23 | return acc.concat(fnItem);
24 | }
25 | return acc;
26 | }, []);
27 |
--------------------------------------------------------------------------------
/lib/core/personUtils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | const _ = require('lodash');
17 |
18 | const personUtils = {};
19 |
20 | personUtils.patientFullName = (person) => {
21 | const profile = _.get(person, 'profile', {});
22 | const patientInfo = _.get(person, ['profile', 'patient'], {});
23 |
24 | if (patientInfo.isOtherPerson) {
25 | return _.get(patientInfo, 'fullName', '');
26 | }
27 | return _.get(profile, 'fullName', '');
28 | };
29 |
30 | personUtils.userHasRole = (user, role) => _.indexOf(_.get(user, 'roles', []), role) !== -1;
31 |
32 | personUtils.patientInfo = (person) => _.get(person, ['profile', 'patient']);
33 |
34 | personUtils.isPatient = (person) => Boolean(personUtils.patientInfo(person));
35 |
36 | personUtils.isDataDonationAccount = (account) => {
37 | const username = account.username || account.email || '';
38 | return /^bigdata(.+)?@tidepool\.org$/.test(username);
39 | };
40 |
41 | personUtils.isClinic = (user) => _.indexOf(_.get(user, 'roles', []), 'clinic') !== -1;
42 |
43 | personUtils.isClinicianAccount = (user) => (_.indexOf(_.get(user, 'roles', []), 'clinic') !== -1 || _.indexOf(_.get(user, 'roles', []), 'clinician') !== -1 || user?.isClinicMember);
44 |
45 | module.exports = personUtils;
46 |
--------------------------------------------------------------------------------
/lib/core/repeat.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | // Calls an asynchronous function every `wait` milliseconds
17 | // Stops when error occurs or returned `stop()` function is called
18 | // If `timeout` (milliseconds) is set, will automatically stop when time expires
19 | // Calls `done` if provided after stopping, with any `err` object that occurred
20 | module.exports = (func, wait, timeout, done = () => {}) => {
21 | let stopped = false;
22 | let timeoutId;
23 |
24 | const stop = (err) => {
25 | if (timeoutId) {
26 | clearTimeout(timeoutId);
27 | }
28 | stopped = true;
29 | done(err);
30 | };
31 |
32 | if (timeout) {
33 | if (timeout <= wait) {
34 | throw new Error('Repeat `timeout` must be smaller than `wait`');
35 | }
36 | timeoutId = setTimeout(() => {
37 | stop();
38 | }, timeout);
39 | }
40 |
41 | const go = () => {
42 | if (stopped) {
43 | return;
44 | }
45 |
46 | func((err) => {
47 | if (err) {
48 | return stop(err);
49 | }
50 |
51 | return setTimeout(go, wait);
52 | });
53 | };
54 |
55 | go();
56 |
57 | return stop;
58 | };
59 |
--------------------------------------------------------------------------------
/lib/core/storage.js:
--------------------------------------------------------------------------------
1 | // == BSD2 LICENSE ==
2 | // Copyright (c) 2014, Tidepool Project
3 | //
4 | // This program is free software; you can redistribute it and/or modify it under
5 | // the terms of the associated License, which is identical to the BSD 2-Clause
6 | // License as published by the Open Source Initiative at opensource.org.
7 | //
8 | // This program is distributed in the hope that it will be useful, but WITHOUT
9 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | // FOR A PARTICULAR PURPOSE. See the License for more details.
11 | //
12 | // You should have received a copy of the License along with this program; if
13 | // not, you can obtain one from Tidepool Project at tidepool.org.
14 | // == BSD2 LICENSE ==
15 |
16 | import _ from 'lodash';
17 |
18 | /**
19 | * Create our the store we will be using
20 | *
21 | * @param {Object} options
22 | * @param {Object} options.ourStore the storage system we are using
23 | */
24 | module.exports = (options) => ({
25 | init: (data, cb) => {
26 | const result = _.reduce(data, (res, defaultValue, key) => {
27 | let value = options.ourStore.getItem(key);
28 | if (value == null) {
29 | value = defaultValue;
30 | }
31 | res[key] = value;
32 | return res;
33 | }, {});
34 | cb(result);
35 | },
36 | getItem: options.ourStore.getItem.bind(options.ourStore),
37 | setItem: options.ourStore.setItem.bind(options.ourStore),
38 | removeItem: options.ourStore.removeItem.bind(options.ourStore),
39 | });
40 |
--------------------------------------------------------------------------------
/lib/core/validation/states.js:
--------------------------------------------------------------------------------
1 | export default {
2 | CA: {
3 | AB: 'Alberta',
4 | BC: 'British Columbia',
5 | MB: 'Manitoba',
6 | NB: 'New Brunswick',
7 | NL: 'Newfoundland and Labrador',
8 | NS: 'Nova Scotia',
9 | NT: 'Northwest Territories',
10 | NU: 'Nunavut',
11 | ON: 'Ontario',
12 | PE: 'Prince Edward Island',
13 | QC: 'Québec',
14 | SK: 'Saskatchewan',
15 | YT: 'Yukon',
16 | },
17 | US: {
18 | AL: 'Alabama',
19 | AK: 'Alaska',
20 | AS: 'American Samoa',
21 | AZ: 'Arizona',
22 | AR: 'Arkansas',
23 | CA: 'California',
24 | CO: 'Colorado',
25 | CT: 'Connecticut',
26 | DE: 'Delaware',
27 | DC: 'District Of Columbia',
28 | FM: 'Federated States Of Micronesia',
29 | FL: 'Florida',
30 | GA: 'Georgia',
31 | GU: 'Guam',
32 | HI: 'Hawaii',
33 | ID: 'Idaho',
34 | IL: 'Illinois',
35 | IN: 'Indiana',
36 | IA: 'Iowa',
37 | KS: 'Kansas',
38 | KY: 'Kentucky',
39 | LA: 'Louisiana',
40 | ME: 'Maine',
41 | MH: 'Marshall Islands',
42 | MD: 'Maryland',
43 | MA: 'Massachusetts',
44 | MI: 'Michigan',
45 | MN: 'Minnesota',
46 | MS: 'Mississippi',
47 | MO: 'Missouri',
48 | MT: 'Montana',
49 | NE: 'Nebraska',
50 | NV: 'Nevada',
51 | NH: 'New Hampshire',
52 | NJ: 'New Jersey',
53 | NM: 'New Mexico',
54 | NY: 'New York',
55 | NC: 'North Carolina',
56 | ND: 'North Dakota',
57 | MP: 'Northern Mariana Islands',
58 | OH: 'Ohio',
59 | OK: 'Oklahoma',
60 | OR: 'Oregon',
61 | PW: 'Palau',
62 | PA: 'Pennsylvania',
63 | PR: 'Puerto Rico',
64 | RI: 'Rhode Island',
65 | SC: 'South Carolina',
66 | SD: 'South Dakota',
67 | TN: 'Tennessee',
68 | TX: 'Texas',
69 | UT: 'Utah',
70 | VT: 'Vermont',
71 | VI: 'Virgin Islands',
72 | VA: 'Virginia',
73 | WA: 'Washington',
74 | WV: 'West Virginia',
75 | WI: 'Wisconsin',
76 | WY: 'Wyoming',
77 | },
78 | };
79 |
--------------------------------------------------------------------------------
/lib/drivers/abbott/tools/README:
--------------------------------------------------------------------------------
1 | To analyze the USB protocol of the Abbott FreeStyle Libre, install this Lua plugin for Wireshark and sniff the traffic on the appropriate usbmon interface.
2 |
3 | To install this plugin, copy it or make a symlink to it in:
4 | ~/.wireshark/plugins
5 |
--------------------------------------------------------------------------------
/lib/drivers/abbott/tools/lua_debug.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This script helps with debugging a Lua Wireshark plugin on Linux (and possibly OSX).
4 | # Before using it, install Zero Brane Studio IDE and start its Debugger Server.
5 | # Open the plugin script to be debugged in the IDE from its install path (e.g. the Wireshark plugin dir).
6 | # Make sure the ZBS variable is set to the install path of the IDE:
7 | export ZBS=/opt/zbstudio
8 |
9 | # In your Lua plugin add these two lines at the very top:
10 | # _G.debug = require("debug")
11 | # require("mobdebug").start()
12 |
13 | # Run this script and it will stop at the above lines in the debugger.
14 |
15 |
16 |
17 | if [[ "$(uname -m)" == "x86_64" ]]; then ARCH="x64"; else ARCH="x86"; fi
18 |
19 | export LUA_PATH="./?.lua;$ZBS/lualibs/?/?.lua;$ZBS/lualibs/?.lua"
20 | export LUA_CPATH="$ZBS/bin/?.so;$ZBS/bin/linux/$ARCH/clibs52/?.so"
21 |
22 | if [ "$#" -ne 1 ]; then
23 | echo "usage: $0 PCAP_FILE"
24 | exit
25 | fi
26 |
27 | # If the plugin is loaded automatically by Wireshark from one of its plugin directories:
28 | tshark -r $1
29 | #wireshark -r $1
30 |
31 | # If the plugin is to be manually loaded:
32 | #tshark -X lua_script:fslibre_usb_dissector.lua -r $1
33 | #wireshark -X lua_script:fslibre_usb_dissector.lua -r $1
34 |
--------------------------------------------------------------------------------
/lib/drivers/dexcom/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | },
7 | "rules": {
8 | "max-len": "warn",
9 | "consistent-return": "warn",
10 | "no-plusplus": ["error", {
11 | "allowForLoopAfterthoughts": true
12 | }],
13 | "arrow-parens": "warn",
14 | "linebreak-style": 0,
15 | "operator-linebreak": "warn"
16 | },
17 | "settings": {
18 | "lodash": 3
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/drivers/i-sens/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | },
7 | "rules": {
8 | "max-len": "warn",
9 | "consistent-return": "warn",
10 | "linebreak-style": 0,
11 | "no-plusplus": ["error", {
12 | "allowForLoopAfterthoughts": true
13 | }],
14 | "arrow-parens": "warn",
15 | "operator-linebreak": "warn"
16 | },
17 | "settings": {
18 | "lodash": 3
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/drivers/i-sens/reliOnConstants.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2021, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | export const ASCII_CONTROL = {
19 | ACK: 0x06,
20 | CR: 0x0D,
21 | ENQ: 0x05,
22 | EOT: 0x04,
23 | ETB: 0x17,
24 | ETX: 0x03,
25 | LF: 0x0A,
26 | NAK: 0x15,
27 | STX: 0x02,
28 | CAN: 0x18,
29 | };
30 |
31 | export const COMMANDS = {
32 | READ: [0x52, 0x7c], // R|
33 | WRITE: [0x57, 0x7c], // W|
34 | DATE: [0x44, 0x7c], // D|
35 | TIME: [0x54, 0x7c], // T|
36 | DATA: [0x4e, 0x7c], // N|
37 | NROFRECORDS: [0x4d, 0x7c], // M|
38 | };
39 |
40 | export const FLAGS = {
41 | HI: { value: 0x01, name: 'High measurement result' },
42 | LO: { value: 0x02, name: 'Low measurement result' },
43 | CONTROL_SOLUTION: { value: 0x04, name: 'Control Solution Test' },
44 | };
45 |
--------------------------------------------------------------------------------
/lib/drivers/insulet/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6
6 | },
7 | "rules": {
8 | "no-plusplus": ["error", {
9 | "allowForLoopAfterthoughts": true
10 | }],
11 | "max-len": "warn",
12 | "max-classes-per-file": "warn",
13 | "import/order": "warn",
14 | "operator-linebreak": "warn",
15 | "arrow-parens": "warn",
16 | "no-else-return": "warn",
17 | "lines-between-class-members": "warn",
18 | "function-paren-newline": "warn",
19 | "comma-style": "warn",
20 | "linebreak-style": 0,
21 | "implicit-arrow-linebreak": "warn"
22 | },
23 | "settings": {
24 | "lodash": 4,
25 | "import/resolver": node
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/drivers/insulet/cli/README.md:
--------------------------------------------------------------------------------
1 | # Insulet file uploader
2 |
3 | Uploads raw insulet file into the tidepool platform
4 |
5 | ### Setup
6 |
7 | Configuration values (for example the URL of the Tidepool Platform) are set via environment variables. If you need to add a config value, modify the `.config.js` file. To set config values (do this before building the app), you can use Shell scripts that export environment variables, for example:
8 |
9 | ```bash
10 | $ source config/local.sh
11 | ```
12 |
13 | ### Usage
14 |
15 | From the base uploader directory:
16 |
17 | ```
18 | node -r @babel/register lib/drivers/insulet/cli/ibf_loader.js -f -u -p
19 |
20 | ```
21 |
22 | - --file
23 | - short code -f
24 | - path to the insulet ibf file path
25 | - --username
26 | - short code -u
27 | - username who that data is being loaded for
28 | - --password
29 | - short code -p
30 | - password for this user
31 | - --timezone
32 | - short code -t
33 | - named timezone
34 | - default is config.DEFAULT_TIMEZONE
35 |
--------------------------------------------------------------------------------
/lib/drivers/insulet/common.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | module.exports = {
19 | fixFloatingPoint: (n) => Math.floor(n * 100 + 0.5) / 100,
20 | };
21 |
--------------------------------------------------------------------------------
/lib/drivers/insulet/objectBuildingLogic.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import common from './common';
19 |
20 | module.exports = {
21 | calculateNetRecommendation: (wizDetails) => {
22 | let total = wizDetails.carb_bolus_units_suggested;
23 | // only consider IOB (and add a correction) if there's a BG input
24 | if (wizDetails.current_bg !== null) {
25 | if (wizDetails.meal_units_iob < wizDetails.corr_units_suggested) {
26 | total += wizDetails.corr_units_suggested - wizDetails.meal_units_iob;
27 | } else if (wizDetails.corr_units_suggested < 0) {
28 | total += wizDetails.corr_units_suggested;
29 | }
30 | total -= wizDetails.corr_units_iob;
31 | }
32 | const correctPrecision = common.fixFloatingPoint(total, 2);
33 | return correctPrecision < 0 ? 0.0 : correctPrecision;
34 | },
35 | };
36 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/cli/README.md:
--------------------------------------------------------------------------------
1 | # Blob Loader
2 |
3 | The `blob_loader.js` script directly uploads a JSON blob file to the targeted environment.
4 |
5 | This script requires Node v7.9.0.
6 |
7 | To execute:
8 |
9 | 1. In the top-level directory of the repository:
10 | 1. Ensure the latest Node modules are installed via `yarn`. For example:
11 | ```
12 | yarn install
13 | ```
14 | 1. Source the appropriate environment configuration file from the `config` directory. For example:
15 | ```
16 | source config/staging.sh
17 | ```
18 | 1. Change the current directory to `lib/drivers/medtronic/cli`. For example:
19 | ```
20 | cd lib/drivers/medtronic/cli
21 | ```
22 | 1. Execute the `blob_loader.js` script via `node` given the following template:
23 | ```
24 | node -r babel-register ./blob_loader.js -f '' -u '' -p '' -t ''
25 | ```
26 | Replace `` with the absolute or relative path to the JSON blob file, `` and `` with the username and password for a previously created DSA on the targeted environment, and `` with a valid IANA time zone name for the upload. For example:
27 | ```
28 | node -r babel-register ./blob_loader.js -f 'my_medtronic_blob.json' -u 'my@email.com' -p 'my_password' -t 'US/Pacific'
29 | ```
30 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/README.md:
--------------------------------------------------------------------------------
1 | Images are created using `packetdiag`, which is part of the `nwdiag` package that can be installed using `pip install nwdiag`.
2 |
3 | The packet structure is specified in the (human-readable) .diag file. For more details and examples, see the [`nwdiag` documentation](http://blockdiag.com/en/nwdiag/packetdiag-examples.html).
4 |
5 | To generate an .svg image from a .diag file, type the following in the console:
6 |
7 | packetdiag -T SVG src/.diag -o svg/.svg
8 |
9 |
10 | On Mac: To convert an .svg file into a .png file, first do `brew install librsvg`, and then:
11 |
12 | rsvg-convert -h svg/.svg -o png/.png
13 |
14 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/png/basal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/lib/drivers/medtronic/docs/images/png/basal.png
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/MiniMedMessage.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-1: Header
6 | 2-7: Pump Serial Number
7 | 8-17: [color = "#888888"]
8 | 18: Operation [rotate = 270]
9 | 19: Retries [rotate = 270]
10 | 20: Timeout [rotate = 270]
11 | 21-22: [color = "#888888"]
12 | 23-24: Expected Bytes
13 | 25-26: Expected Packets
14 | 27: NAK code [rotate = 270]
15 | 28-29: Payload size
16 | 30-31: [color = "#888888"]
17 | 32: Checksum [rotate = 270]
18 | 33-62: Payload [color = "#EBF1DF"]
19 | 63: ... [color = "#EBF1DF", style = dashed]
20 | }
21 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/alarmPump.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x06 (packet type)
6 | 8-15: alarm type
7 | 16-23: ??
8 | 24-31: ??
9 |
10 |
11 | 32-71: date/time
12 | }
13 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/basal.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x7B (packet type)
6 | 8-15: ??
7 |
8 | 16-31: date/time
9 | 32-34: schedule\nname [rotate=270]
10 | 35-55: date/time
11 |
12 |
13 | 56-63: offset
14 | 64-71: rate
15 | 72-79: ??
16 | }
17 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/basalSchedules.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 64
3 | node_height = 72
4 |
5 | 0-7: packet type
6 | 8-15: ??
7 |
8 | 16-31: date/time
9 | 32-34: active\nschedule [rotate=270]
10 | 35-55: date/time
11 |
12 | 56-1207: schedules (1 byte offset, 1 byte rate, 1 byte q) x 48
13 |
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/bolus.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x01 (packet type)
6 | 8-23: programmed amount
7 | 24-39: actual amount
8 | 40-55:iob
9 |
10 | 56-71: date/time
11 | 72-73: dual bolus\check [rotate=270]
12 | 74-95: date/time
13 | }
14 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/changeTime.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x17 (packet type)
5 | 8-15: 0x00
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/lowBattery.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x19 (packet type)
5 | 8-15: ??
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/lowReservoir.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x34 (packet type)
5 | 8-15: amount
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/newTimeSet.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x18 (packet type)
5 | 8-15: 0x00
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/prime.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x03 (packet type)
6 | 8-15: ??
7 | 16-23: type
8 | 24-31: ??
9 | 32-39: amount
10 |
11 | 40-79: date/time
12 | }
13 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/resume.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x1F (packet type)
5 | 8-15: ??
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/rewind.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x21 (packet type)
6 | 8-15: 0x00
7 |
8 | 16-55: date/time
9 | }
10 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/smbg.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 92
4 |
5 | 0-7: 0x0A (packet type)
6 | 8-15: amount (low)
7 |
8 | 16-31: date/time
9 | 32-33: amount\n(high) [rotate=270]
10 | 34-47: date/time
11 | 48: amount (high) [rotate=270]
12 | 49-55: date/time
13 | }
14 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/smbgLinked.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x3F (packet type)
6 | 8-10: ???
7 | 11-15: amount\n(high)
8 |
9 | 16-31: date/time
10 | 32-34: amount\n(low) [rotate=270]
11 | 35-55: date/time
12 |
13 | 56-79: meter serial number
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/suspend.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 |
4 | 0-7: 0x1E (packet type)
5 | 8-15: ??
6 |
7 | 16-55: date/time
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/tempBasal.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x33 (packet type)
6 | 8-15: rate /\npercentage [rotate=270]
7 |
8 | 16-55: date/time
9 |
10 | 56-60: type
11 | }
12 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/tempBasalDuration.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x16 (packet type)
6 | 8-15: duration
7 |
8 | 16-55: date/time
9 | }
10 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/wizard.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: 0x5B (packet type)
6 | 8-15: bg (low)
7 |
8 | 16-55: date/time
9 |
10 | 56-63: carbInput (low)
11 | 64-65: BG units [rotate=270]
12 | 66-67: ??
13 | 68-69: carbInput\n (high) [rotate=270]
14 | 70-71: bgInput\n (high) [rotate=270]
15 | 72-76: ??
16 | 77-87: insulinCarbRatio
17 |
18 |
19 | 88-95: insulinSensitivity
20 | 96-103: bgTarget.low
21 | 104-111: recommended.correction (low)
22 | 112-127: recommended.carb
23 |
24 | 128: ??
25 | 129-131: recommend\ned.correction\n (high) [rotate=270]
26 | 132-135: ??
27 | 136-151: insulinOnBoard
28 | 152-167: recommended.net
29 | 168-175: bgTarget.high
30 | }
31 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic/docs/images/src/wizardSettings.diag:
--------------------------------------------------------------------------------
1 | {
2 | colwidth = 64
3 |
4 | 0-7: 0x5A (packet type)
5 | 8-15: ??
6 |
7 | 16-55: date/time
8 |
9 | 56-63: old units (bg & carb)
10 | 64-71: ??
11 | 72-263: old carb ratios (1 byte offset, 2 bytes ratio)
12 |
13 | 264-271: ??
14 | 272-399: old insulin sensitivities (1 byte offset, 1 byte amount)
15 |
16 | 400-407: ??
17 | 408-599: old BG targets (1 byte offset, 1 byte low, 1 byte high)
18 |
19 | 600-615: ??
20 |
21 | 616-623: new units (bg & carb)
22 | 624-631: ??
23 | 632-815: new carb ratios
24 |
25 | 816-823: ??
26 | 824-951: new insulin sensitivities
27 |
28 | 952-959: ??
29 | 960-1151: new BG targets
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6
6 | },
7 | "rules": {
8 | "no-plusplus": ["error", {
9 | "allowForLoopAfterthoughts": true
10 | }],
11 | "max-len": "warn",
12 | "max-classes-per-file": "warn",
13 | "import/order": "warn",
14 | "operator-linebreak": "warn",
15 | "arrow-parens": "warn",
16 | "no-else-return": "warn",
17 | "lines-between-class-members": "warn",
18 | "function-paren-newline": "warn",
19 | "comma-style": "warn",
20 | "linebreak-style": 0,
21 | "implicit-arrow-linebreak": "warn"
22 | },
23 | "settings": {
24 | "lodash": 3,
25 | "import/resolver": node
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/README.md:
--------------------------------------------------------------------------------
1 | Images are created using `packetdiag`, which is part of the `nwdiag` package that can be installed using `pip install nwdiag`.
2 |
3 | The packet structure is specified in the (human-readable) .diag file. For more details and examples, see the [`nwdiag` documentation](http://blockdiag.com/en/nwdiag/packetdiag-examples.html).
4 |
5 | To generate an .svg image from a .diag file, type the following in the console:
6 |
7 | packetdiag -T SVG src/.diag -o svg/.svg
8 |
9 | If you want to convert the whole directory, you can use this one-liner (from this directory):
10 |
11 | while read file; do echo "Converting ${file}..."; $(echo $file | awk '{a=$0;gsub(/^src/,"svg",$0);gsub(/\.diag/,".svg",$0);system("packetdiag -T SVG " a " -o " $0)}'); done < <(find src -name "*.diag")
12 |
13 | On Mac: To convert an .svg file into a .png file, first do `brew install librsvg`, and then:
14 |
15 | rsvg-convert -h svg/.svg -o png/.png
16 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZCarbRatiosCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x012B
7 | 3-4: Checksum [rotate = 270]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZCarbRatiosResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x012C
7 | 3-4: Inner\nCCITT
8 | 5: # Items [rotate = 270]
9 | 6-9: Carb Ratio\nTGT 1\ngrams [rotate = 270, color = "#EBF1DF"]
10 | 10-13: Exchg Ratio\nTGT 1\nunits [rotate = 270, color = "#EBF1DF"]
11 | 14: TGT 1 Time [rotate = 270, color = "#EBF1DF"]
12 | 15-17: ... [style = "dashed"]
13 | 18-19: CCITT
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZSensitivityFactorsCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x012E
7 | 3-4: Checksum [rotate = 270]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZSensitivityFactorsResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x012F
7 | 3-4: Inner\nCCITT
8 | 5: # Items [rotate = 270]
9 | 6-7: ISF TGT 1\nmg/dL [rotate = 270, color = "#EBF1DF"]
10 | 8-9: ISF TGT 1\nmmol/L [rotate = 270, color = "#EBF1DF"]
11 | 10: TGT 1 Time [rotate = 270, color = "#EBF1DF"]
12 | 11-13: ... [style = "dashed"]
13 | 14-15: CCITT
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZTargetsCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0131
7 | 3-4: Checksum [rotate = 270]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BWZTargetsResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0132
7 | 3-4: Inner\nCCITT
8 | 5: # Items [rotate = 270]
9 | 6-7: High TGT 1\nmg/dL [rotate = 270, color = "#EBF1DF"]
10 | 8-9: High TGT 1\nmmol/L [rotate = 270, color = "#EBF1DF"]
11 | 10-11: Low TGT 1\nmg/dL [rotate = 270, color = "#EBF1DF"]
12 | 12-13: Low TGT 1\nmmol/L [rotate = 270, color = "#EBF1DF"]
13 | 14: TGT 1 Time [rotate = 270, color = "#EBF1DF"]
14 | 15-17: ... [style = "dashed"]
15 | 18-19: CCITT
16 | }
17 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/BayerUSB.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-2: Header [description = "ABC"]
6 | 3: Payload size [rotate = 270]
7 | 4-63: Payload [color = "#EBF1DF"]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/HighSpeedModeCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0412
7 | 3: Mode [rotate = 270]
8 | 4-5: Checksum [rotate = 270]
9 | }
10 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/JoinNetworkRequest.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1: Channel [rotate = 270]
7 | 2-4: [color = "#888888"]
8 | 5: 0x07 [color = "#888888", rotate = 270]
9 | 6: 0x07 [color = "#888888", rotate = 270]
10 | 7-8: [color = "#888888"]
11 | 9: 0x02 [color = "#888888", rotate = 270]
12 | 10-17: CNL MAC
13 | 18-25: Pump MAC
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/JoinNetworkResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: 0x00 [rotate = 270, color = "#888888"]
6 | 1: 0x04 [rotate = 270, color = "#888888"]
7 | 2-6: Pump Serial
8 | 7: 0x02 [rotate = 270, color = "#888888"]
9 | 8-15: Pump MAC
10 | 16: 0x82 [rotate = 270]
11 | 17-21: [color = "#888888"]
12 | 22: 0x07 [rotate = 270, color = "#888888"]
13 | 23: [color = "#888888"]
14 | 24: 0x28 [rotate = 270, color = "#888888"]
15 | 25-32: CNL MAC
16 | 33: 0x42 [rotate = 270]
17 | 34-40: [color = "#888888"]
18 | 41: Channel [rotate = 270]
19 | }
20 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/LinkKeyResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-55: Link Key
6 | }
7 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/MiniMedMessage.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-1: Header
6 | 2-7: Pump Serial Number
7 | 8-17: [color = "#888888"]
8 | 18: Operation [rotate = 270]
9 | 19-22: Sequence Number
10 | 23-27: [color = "#888888"]
11 | 28-29: Payload Size
12 | 30-31: [color = "#888888"]
13 | 32: Checksum [rotate = 270]
14 | 33-62: Payload [color = "#EBF1DF"]
15 | 63: ... [color = "#EBF1DF", style = dashed]
16 | }
17 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/NGPMessage.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Command [rotate = 270]
6 | 1: Size [rotate = 270]
7 | 2-55: Payload [color = "#EBF1DF"]
8 | 56: ... [color = "#EBF1DF", style = dashed]
9 | 57-58: Checksum [rotate = 270, color = "#E4DFEC", style = dashed]
10 | }
11 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/OpenConnectionRequest.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-31: HMAC of Contour Next Link 2.4 model and serial number
6 | }
7 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/PumpHistoryInfoCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x030C
7 | 3: Data Type [rotate = 270]
8 | 4: 0x04 [rotate = 270]
9 | 5-8: From RTC [rotate = 270]
10 | 9-12: To RTC [rotate = 270]
11 | 13: 0x00 [rotate = 270]
12 | 14: 0x00 [rotate = 270]
13 | 15-16: Checksum [rotate = 270]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/PumpStatusCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0112
7 | 3-4: Checksum [rotate = 270]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/PumpStatusResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x013c
7 | 3: Pump Status [rotate = 270]
8 | 4-25: ?? [color = "#888888"]
9 | 26: Active Basal [rotate = 270]
10 | 27-30: Normal Rate
11 | 31-34: Temp Rate
12 | 35: Temp % [rotate = 270]
13 | 36-37: Temp\nmin.\nremain
14 | 38-41: Total basal\ndelivered
15 | 42: Battery % [rotate = 270]
16 | 43-46: Insulin remaining
17 | 47: Hours [rotate = 270]
18 | 48: Minutes [rotate = 270]
19 | 49-52: Active Insulin\n(IOB)
20 | 53-54: SGV
21 | 55-62: Timestamp of last SGV
22 | 63: PLGM status [rotate = 270]
23 | 64: CGM status [rotate = 270]
24 | 65-71: ?? [color = "#888888"]
25 | 72: BWZ status [rotate = 270]
26 | 73-74: BGL
27 | 75-95: ?? [color = "#888888"]
28 | 96-97: CCITT
29 | }
30 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/PumpTimeCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0403
7 | 3-4: Checksum [rotate = 270]
8 | }
9 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/PumpTimeResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0407
7 | 3: Time Set [rotate = 270]
8 | 4-7: RTC
9 | 8-11: Offset
10 | 12-13: Checksum [rotate = 270]
11 | }
12 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/ReadBasalPatternCommand.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 16
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0116
7 | 3: Pattern # [rotate = 270]
8 | 4-5: Checksum [rotate = 270]
9 | }
10 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/ReadBasalPatternResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: Seq # [rotate = 270]
6 | 1-2: 0x0123
7 | 3: Pattern # [rotate = 270]
8 | 4: # Items [rotate = 270]
9 | 5-8: Basal Rate 1 [rotate = 270, color = "#EBF1DF"]
10 | 9: Rate 1 Time [rotate = 270, color = "#EBF1DF"]
11 | 10-12: ... [style = "dashed"]
12 | 13-14: CCITT
13 | }
14 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/ReadInfoResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: CNL MAC
6 | 8-15: Pump MAC
7 | 16-17: Link Counter [rotate = 270]
8 | 18: Mode Flags [rotate = 270]
9 | }
10 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/TransmitPacketRequest.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0-7: Pump MAC
6 | 8: Seq # [rotate = 270]
7 | 9: Mode Flags [rotate = 270]
8 | 10: Size [rotate = 270]
9 | 11-30: Encrypted Payload [color = "#FCE9DA"]
10 | 31: ... [color = "#FCE9DA", style = dashed]
11 | }
12 |
--------------------------------------------------------------------------------
/lib/drivers/medtronic600/docs/images/src/TransmitPacketResponse.diag:
--------------------------------------------------------------------------------
1 | packetdiag {
2 | colwidth = 32
3 | node_height = 72
4 |
5 | 0: 0x00 [rotate = 270]
6 | 1: 0x06 [rotate = 270]
7 | 2-9: Pump MAC
8 | 10-17: Link MAC
9 | 18: Seq # [rotate = 270]
10 | 19-20: [color = "#888888"]
11 | 21: Size [rotate = 270]
12 | 22-30: Encrypted Payload [color = "#FCE9DA"]
13 | 31: ... [color = "#FCE9DA", style = dashed]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/drivers/roche/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | },
7 | "rules": {
8 | "no-plusplus": ["error", {
9 | "allowForLoopAfterthoughts": true
10 | }],
11 | "arrow-parens": "warn",
12 | "linebreak-style": 0,
13 | "operator-linebreak": "warn"
14 | },
15 | "settings": {
16 | "lodash": 3
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/drivers/roche/models.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2024, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | import _ from 'lodash';
19 |
20 | const models = [
21 | { name: 'Aviva Connect', numbers: [483, 484, 497, 498, 499, 500, 502, 685] },
22 | { name: 'Performa Connect', numbers: [479, 501, 503, 765] },
23 | { name: 'Guide', numbers: [921, 922, 923, 925, 926, 929, 930, 932] },
24 | { name: 'Instant (single-button)', numbers: [958, 959, 960, 961, 963, 964, 965] },
25 | { name: 'Guide Me', numbers: [897, 898, 901, 902, 903, 904, 905] },
26 | { name: 'Instant (two-button)', numbers: [972, 973, 975, 976, 977, 978, 979, 980] },
27 | { name: 'Instant S (single-button)', numbers: [966, 967, 968, 969, 970, 971] },
28 | { name: 'ReliOn Platinum', numbers: [982] },
29 | ];
30 |
31 | const getModelName = (number) => {
32 | // eslint-disable-next-line no-restricted-syntax
33 | for (const i in models) {
34 | if (models[i].numbers.indexOf(_.toInteger(number)) >= 0) {
35 | return models[i].name;
36 | }
37 | }
38 | return `Unknown model ${number}`;
39 | };
40 |
41 | export default getModelName;
42 |
--------------------------------------------------------------------------------
/lib/drivers/trividia/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | },
7 | "rules": {
8 | "max-len": "warn",
9 | "linebreak-style": 0,
10 | "no-plusplus": ["error", {
11 | "allowForLoopAfterthoughts": true
12 | }],
13 | "operator-linebreak": "warn",
14 | "implicit-arrow-linebreak": "warn"
15 | },
16 | "settings": {
17 | "lodash": 3
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/drivers/weitai/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | },
7 | "rules": {
8 | "max-len": "warn",
9 | "consistent-return": "warn",
10 | "no-continue": "warn",
11 | "prefer-template": "warn",
12 | "no-param-reassign": "warn",
13 | "linebreak-style": 0,
14 | "no-restricted-syntax": "warn",
15 | "import/no-extraneous-dependencies": "warn",
16 | "no-plusplus": ["error", {
17 | "allowForLoopAfterthoughts": true
18 | }],
19 | "operator-linebreak": "warn",
20 | "implicit-arrow-linebreak": "warn"
21 | },
22 | "settings": {
23 | "lodash": 3
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/eventAnnotations.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | /**
19 | * Adds an annotation to an event.
20 | *
21 | * @param event the event
22 | * @param ann the opaque string code for the annotation to add, or the annotation object itself
23 | */
24 | exports.annotateEvent = function(event, ann) {
25 | if (event.annotations == null) {
26 | event.annotations = [];
27 | }
28 |
29 | var annotation = typeof(ann) === 'string' ? { code: ann } : ann;
30 | if (! exports.isAnnotated(event, annotation)) {
31 | event.annotations.push(annotation);
32 | }
33 |
34 | return event;
35 | };
36 |
37 | /**
38 | * Checks if an event is annotated with the specific annotation
39 | *
40 | * @param event
41 | * @param ann the opaque string code for the annotation to add, or the annotation object itself
42 | */
43 | exports.isAnnotated = function (event, ann) {
44 | if (event == null || event.annotations == null || event.annotations.length === 0) {
45 | return false;
46 | }
47 |
48 | var annotation = typeof(ann) === 'string' ? { code: ann } : ann;
49 | for (var i = 0; i < event.annotations.length; ++i) {
50 | if (event.annotations[i].code === annotation.code) {
51 | return true;
52 | }
53 | }
54 | return false;
55 | };
56 |
--------------------------------------------------------------------------------
/lib/statusManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | module.exports = function (config) {
19 | var progress = config.progress;
20 | var steps = config.steps;
21 |
22 | var stepProgress = function(step, stepPercentage, isFirstUpload) {
23 | var stepName = steps[step].name;
24 | var range = steps[step].max - steps[step].min;
25 | var totalPercentage = steps[step].min + Math.floor(range * stepPercentage / 100.0);
26 | progress(stepName, totalPercentage, isFirstUpload);
27 | };
28 |
29 | return {
30 | progressForStep: function(step) {
31 | return stepProgress.bind(this, step);
32 | }
33 | };
34 | };
35 |
--------------------------------------------------------------------------------
/lib/usbDevice.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2019, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | export default class UsbDevice {
19 | constructor(deviceInfo) {
20 | const self = this;
21 | self.device = deviceInfo.usbDevice;
22 |
23 | (async () => {
24 | if (self.device == null) {
25 | const devices = await navigator.usb.getDevices();
26 | for (const usbDevice of devices) {
27 | if (usbDevice.productId === deviceInfo.productId &&
28 | usbDevice.vendorId === deviceInfo.vendorId) {
29 | self.device = usbDevice;
30 | }
31 | }
32 | }
33 |
34 | if (self.device == null) {
35 | self.device = await navigator.usb.requestDevice({
36 | filters: [
37 | {
38 | vendorId: deviceInfo.vendorId,
39 | productId: deviceInfo.productId,
40 | },
41 | ],
42 | });
43 | }
44 | })().catch((error) => {
45 | console.log('Error during USB setup:', error);
46 | throw new Error(error);
47 | });
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/locales/es/translation.missing.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/resources/background.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/background.tiff
--------------------------------------------------------------------------------
/resources/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icon.icns
--------------------------------------------------------------------------------
/resources/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icon.ico
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icon.png
--------------------------------------------------------------------------------
/resources/icons/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icons/128x128.png
--------------------------------------------------------------------------------
/resources/icons/16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icons/16x16.png
--------------------------------------------------------------------------------
/resources/icons/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icons/32x32.png
--------------------------------------------------------------------------------
/resources/icons/512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icons/512x512.png
--------------------------------------------------------------------------------
/resources/icons/64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/icons/64x64.png
--------------------------------------------------------------------------------
/resources/installerIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/installerIcon.ico
--------------------------------------------------------------------------------
/resources/linux/uploader.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Name=Tidepool Dev Uploader
4 | MimeType=x-scheme-handler/tidepooluploader;
5 |
--------------------------------------------------------------------------------
/resources/mac/helpers/org.tidepool.disk-permissions/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | BASE_PATH="$(cd "$(dirname "${0}")" 2>/dev/null && pwd)"
3 | HELPER_SCRIPT="org.tidepool.disk-permissions.sh"
4 | HELPER_SCRIPT_PATH="/Library/PrivilegedHelperTools"
5 | PLIST_NAME="org.tidepool.disk-permissions.plist"
6 | PLIST_PATH="/Library/LaunchDaemons"
7 |
8 | if [ test -z $BASE_PATH ]; then
9 | echo "Base path not found."
10 | exit 1
11 | fi
12 |
13 | if [ "${1}" = "--uninstall" ]; then
14 | if [ -e "${PLIST_PATH}" ]; then
15 | echo "Uninstalling Tidepool disk permission helper..."
16 | sudo launchctl unload "${PLIST_PATH}/${PLIST_NAME}"
17 | sudo rm "${HELPER_SCRIPT_PATH}/${HELPER_SCRIPT}" "${PLIST_PATH}/${PLIST_NAME}"
18 | echo "Done."
19 | else
20 | echo "Tidepool disk permission helper not found."
21 | fi
22 | elif [ "${1}" = "--install" ]; then
23 | echo "Installing Tidepool disk permission helper..."
24 | sudo mkdir -p "${PLIST_PATH}"
25 | sudo mkdir -p "${HELPER_SCRIPT_PATH}"
26 | sudo cp "${BASE_PATH}/${HELPER_SCRIPT}" "${HELPER_SCRIPT_PATH}/${HELPER_SCRIPT}"
27 | sudo cp "${BASE_PATH}/${PLIST_NAME}" "${PLIST_PATH}/${PLIST_NAME}"
28 | sudo chown -R root:wheel "${HELPER_SCRIPT_PATH}" "${PLIST_PATH}"
29 | sudo launchctl load "${PLIST_PATH}/${PLIST_NAME}"
30 | echo "Done."
31 |
32 | echo "Running disk permission helper now..."
33 | sudo "${HELPER_SCRIPT_PATH}/${HELPER_SCRIPT}"
34 | echo "Done."
35 | else
36 | echo "usage: ${0} [--install|--uninstall]"
37 | fi
38 |
--------------------------------------------------------------------------------
/resources/mac/helpers/org.tidepool.disk-permissions/org.tidepool.disk-permissions.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleVersion
6 | 2
7 | Label
8 | org.tidepool.disk-permissions
9 | ProgramArguments
10 |
11 | /Library/PrivilegedHelperTools/org.tidepool.disk-permissions.sh
12 |
13 | KeepAlive
14 |
15 | RunAtLoad
16 |
17 | StartOnMount
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/resources/mac/helpers/org.tidepool.disk-permissions/org.tidepool.disk-permissions.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | for DEVICE in `ls /dev/rdisk*`; do
4 | diskutil info $DEVICE | grep -q "LifeScan Media"
5 | if [ "$?" -eq "0" ]; then
6 | chmod a+rw $DEVICE
7 | fi
8 | done
9 |
--------------------------------------------------------------------------------
/resources/mac/sudo-askpass.osascript.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env osascript -l JavaScript
2 |
3 | /*
4 | * == BSD2 LICENSE ==
5 | * Copyright (c) 2020, Tidepool Project
6 | *
7 | * This program is free software; you can redistribute it and/or modify it under
8 | * the terms of the associated License, which is identical to the BSD 2-Clause
9 | * License as published by the Open Source Initiative at opensource.org.
10 | *
11 | * This program is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 | * FOR A PARTICULAR PURPOSE. See the License for more details.
14 | *
15 | * You should have received a copy of the License along with this program; if
16 | * not, you can obtain one from Tidepool Project at tidepool.org.
17 | * == BSD2 LICENSE ==
18 | */
19 |
20 | /* eslint-disable */
21 |
22 | ObjC.import('stdlib')
23 |
24 | const app = Application.currentApplication()
25 | app.includeStandardAdditions = true
26 |
27 | const result = app.displayDialog('Please enter your computer password to allow Tidepool Uploader to access your OneTouch meter.', {
28 | defaultAnswer: '',
29 | withIcon: Path('/Applications/Tidepool\ Uploader.app/Contents/Resources/icon.icns'),
30 | buttons: ['Cancel', 'Why do I need to do this?', 'OK'],
31 | defaultButton: 'OK',
32 | hiddenAnswer: true,
33 | })
34 |
35 | if (result.buttonReturned === 'OK') {
36 | result.textReturned
37 | } else if (result.buttonReturned === 'Why do I need to do this?') {
38 | app.openLocation('https://support.tidepool.org/hc/en-us/articles/360019872851-Uploading-your-OneTouch-Verio-and-Verio-Flex-Meter')
39 | } else {
40 | $.exit(255)
41 | }
42 |
--------------------------------------------------------------------------------
/resources/mac/updateDrivers.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | HELPER_PATH=$1/helpers
3 |
4 | "$HELPER_PATH/org.tidepool.disk-permissions/install.sh" --uninstall
5 |
6 | "$HELPER_PATH/org.tidepool.disk-permissions/install.sh" --install
7 |
8 | echo "Done."
9 |
--------------------------------------------------------------------------------
/resources/win/TidepoolUSBDriver.ddf:
--------------------------------------------------------------------------------
1 | ;*** Submission.ddf Tidepool USB drivers
2 | ;
3 | .OPTION EXPLICIT ; Generate errors
4 | .Set CabinetFileCountThreshold=0
5 | .Set FolderFileCountThreshold=0
6 | .Set FolderSizeThreshold=0
7 | .Set MaxCabinetSize=0
8 | .Set MaxDiskFileCount=0
9 | .Set MaxDiskSize=0
10 | .Set CompressionType=MSZIP
11 | .Set Cabinet=on
12 | .Set Compress=on
13 | ;Specify file name for new cab file
14 | .Set CabinetNameTemplate=TidepoolUSBDriver.cab
15 | ;Specify files to be included in cab file
16 | .Set DestinationDir=win10
17 | tidepoolvcp.inf
18 | tidepoolhid.inf
19 | ftdibus.inf
20 | ftdiport.inf
21 | webusb.inf
22 | phdc.inf
23 | .Set DestinationDir=win10\amd64
24 | amd64\ftbusui.dll
25 | amd64\ftd2xx.lib
26 | amd64\ftd2xx64.dll
27 | amd64\ftdibus.sys
28 | amd64\ftlang.dll
29 | amd64\FTSER2K.sys
30 | amd64\ser2pl64.sys
31 | amd64\silabser.sys
32 | amd64\tiusb.i51
33 | amd64\tiusb.sys
34 | amd64\WdfCoInstaller01009.dll
35 | .Set DestinationDir=win10\x64
36 | x64\WdfCoInstaller01009.dll
37 | x64\WdfCoInstaller01011.dll
38 | x64\winusbcoinstaller2.dll
39 | .Set DestinationDir=win10\i386
40 | i386\ftbusui.dll
41 | i386\ftd2xx.dll
42 | i386\ftd2xx.lib
43 | i386\ftdibus.sys
44 | i386\ftlang.dll
45 | i386\FTSER2K.sys
46 | i386\ser2pl.sys
47 | i386\silabser.sys
48 | i386\tiusb.i51
49 | i386\tiusb.sys
50 | .Set DestinationDir=win10\x86
51 | x86\WdfCoInstaller01009.dll
52 | x86\WdfCoInstaller01011.dll
53 | x86\winusbcoinstaller2.dll
54 |
--------------------------------------------------------------------------------
/resources/win/TidepoolUSBDriver_x64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/TidepoolUSBDriver_x64.exe
--------------------------------------------------------------------------------
/resources/win/TidepoolUSBDriver_x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/TidepoolUSBDriver_x86.exe
--------------------------------------------------------------------------------
/resources/win/Tidepool_T_Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/Tidepool_T_Icon.png
--------------------------------------------------------------------------------
/resources/win/amd64/FTSER2K.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/FTSER2K.sys
--------------------------------------------------------------------------------
/resources/win/amd64/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/resources/win/amd64/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ftbusui.dll
--------------------------------------------------------------------------------
/resources/win/amd64/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ftd2xx.lib
--------------------------------------------------------------------------------
/resources/win/amd64/ftd2xx64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ftd2xx64.dll
--------------------------------------------------------------------------------
/resources/win/amd64/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ftdibus.sys
--------------------------------------------------------------------------------
/resources/win/amd64/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ftlang.dll
--------------------------------------------------------------------------------
/resources/win/amd64/ser2pl64.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/ser2pl64.sys
--------------------------------------------------------------------------------
/resources/win/amd64/silabser.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/silabser.sys
--------------------------------------------------------------------------------
/resources/win/amd64/tiusb.i51:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/tiusb.i51
--------------------------------------------------------------------------------
/resources/win/amd64/tiusb.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/amd64/tiusb.sys
--------------------------------------------------------------------------------
/resources/win/ftdibus.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/ftdibus.cat
--------------------------------------------------------------------------------
/resources/win/ftdiport.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/ftdiport.cat
--------------------------------------------------------------------------------
/resources/win/i386/FTSER2K.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/FTSER2K.sys
--------------------------------------------------------------------------------
/resources/win/i386/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ftbusui.dll
--------------------------------------------------------------------------------
/resources/win/i386/ftd2xx.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ftd2xx.dll
--------------------------------------------------------------------------------
/resources/win/i386/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ftd2xx.lib
--------------------------------------------------------------------------------
/resources/win/i386/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ftdibus.sys
--------------------------------------------------------------------------------
/resources/win/i386/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ftlang.dll
--------------------------------------------------------------------------------
/resources/win/i386/ser2pl.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/ser2pl.sys
--------------------------------------------------------------------------------
/resources/win/i386/silabser.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/silabser.sys
--------------------------------------------------------------------------------
/resources/win/i386/tiusb.i51:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/tiusb.i51
--------------------------------------------------------------------------------
/resources/win/i386/tiusb.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/i386/tiusb.sys
--------------------------------------------------------------------------------
/resources/win/phdc_driver.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/phdc_driver.cat
--------------------------------------------------------------------------------
/resources/win/tidepool.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/tidepool.cer
--------------------------------------------------------------------------------
/resources/win/tidepoolhid.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/tidepoolhid.cat
--------------------------------------------------------------------------------
/resources/win/tidepoolvcp.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/tidepoolvcp.cat
--------------------------------------------------------------------------------
/resources/win/webusb.inf:
--------------------------------------------------------------------------------
1 | [Version]
2 | Signature = "$Windows NT$"
3 | Class = USBDevice
4 | ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
5 | Provider = %ManufacturerName%
6 | CatalogFile = WinUSBInstallation.cat
7 | DriverVer = 10/19/2022,14.0.0.0
8 |
9 | ; ========== Manufacturer/Models sections ===========
10 |
11 | [Manufacturer]
12 | %ManufacturerName% = Standard,NTx86,NTia64,NTamd64
13 |
14 | [Standard.NTx86]
15 | %DeviceDesc% = USB_Install,USB\VID_0E8D&PID_201D&MI_00
16 | %DeviceDesc% = USB_Install,USB\VID_05C6&PID_9120 ; Equil
17 | %DeviceDesc% = USB_Install,USB\VID_18D1&PID_2D01 ; Equil in accessory mode
18 |
19 | [Standard.NTia64]
20 | %DeviceDesc% = USB_Install,USB\VID_0E8D&PID_201D&MI_00
21 | %DeviceDesc% = USB_Install,USB\VID_05C6&PID_9120
22 | %DeviceDesc% = USB_Install,USB\VID_18D1&PID_2D01
23 |
24 | [Standard.NTamd64]
25 | %DeviceDesc% = USB_Install,USB\VID_0E8D&PID_201D&MI_00
26 | %DeviceDesc% = USB_Install,USB\VID_05C6&PID_9120
27 | %DeviceDesc% = USB_Install,USB\VID_18D1&PID_2D01
28 |
29 | ; =================== Installation ===================
30 |
31 | [USB_Install]
32 | Include = winusb.inf
33 | Needs = WINUSB.NT
34 |
35 | [USB_Install.Services]
36 | Include = winusb.inf
37 | Needs = WINUSB.NT.Services
38 |
39 | [USB_Install.HW]
40 | AddReg = Dev_AddReg
41 |
42 | [Dev_AddReg]
43 | HKR,,DeviceInterfaceGUIDs,0x10000,"{D252C909-8325-43A8-9235-0169BF676338}"
44 |
45 | ; =================== Strings ===================
46 |
47 | [Strings]
48 | ManufacturerName = "Tidepool"
49 | ClassName = "WinUSB devices"
50 | DeviceDesc = "Tidepool USB driver (WinUSB)"
51 | REG_MULTI_SZ = 0x00010000
52 |
--------------------------------------------------------------------------------
/resources/win/winusbinstallation.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/winusbinstallation.cat
--------------------------------------------------------------------------------
/resources/win/x64/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x64/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/resources/win/x64/WdfCoInstaller01011.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x64/WdfCoInstaller01011.dll
--------------------------------------------------------------------------------
/resources/win/x64/winusbcoinstaller2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x64/winusbcoinstaller2.dll
--------------------------------------------------------------------------------
/resources/win/x86/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x86/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/resources/win/x86/WdfCoInstaller01011.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x86/WdfCoInstaller01011.dll
--------------------------------------------------------------------------------
/resources/win/x86/winusbcoinstaller2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/resources/win/x86/winusbcoinstaller2.dll
--------------------------------------------------------------------------------
/scripts/cat-config.js:
--------------------------------------------------------------------------------
1 | var util = require('util');
2 |
3 | var output;
4 | var config = require('../.config.js');
5 |
6 | output = util.inspect(config, {depth: null});
7 | output = 'window.config = ' + output + ';';
8 |
9 | console.log(output);
10 |
--------------------------------------------------------------------------------
/scripts/config.sh:
--------------------------------------------------------------------------------
1 | # Generate config file for development
2 | mkdir -p build
3 | node scripts/cat-config.js > build/config.js
4 |
--------------------------------------------------------------------------------
/scripts/notarize.js:
--------------------------------------------------------------------------------
1 | const { notarize } = require('@electron/notarize');
2 |
3 | exports.default = async function notarizing(context) {
4 | const { electronPlatformName, appOutDir } = context;
5 | if (electronPlatformName !== 'darwin') {
6 | return;
7 | }
8 |
9 | const appName = context.packager.appInfo.productFilename;
10 |
11 | console.log(`Notarizing ${appName}`);
12 |
13 | return await notarize({
14 | appPath: `${appOutDir}/${appName}.app`,
15 | appleId: process.env.APPLEID,
16 | appleIdPassword: process.env.APPLEIDPASS,
17 | teamId: process.env.TEAMID,
18 | tool: 'notarytool',
19 | });
20 | };
21 |
--------------------------------------------------------------------------------
/scripts/start-linux.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | export START_HOT=1 NODE_ENV=development
3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 | APP_ROOT="${SCRIPT_DIR%/*}"
5 |
6 | if [ -e $HOME/.local/share/applications/uploader.desktop ]
7 | then
8 | echo "Uploader.desktop is installed."
9 | else
10 | cp ../resources/linux/uploader.desktop .
11 | printf "Exec=sh -c \"%s/scripts/start-linux.sh %%u\"\n" $APP_ROOT >> uploader.desktop
12 | desktop-file-install --dir=$HOME/.local/share/applications uploader.desktop
13 | update-desktop-database $HOME/.local/share/applications
14 | rm ./uploader.desktop
15 | echo "Uploader.desktop now installed."
16 | fi
17 |
18 | # Make sure that Node.js is available in the path
19 | export NVM_DIR="$HOME/.nvm"
20 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
21 |
22 | cd $APP_ROOT
23 | ./node_modules/.bin/webpack-dev-server --config webpack.config.renderer.dev.babel.mjs --env argv="$1"
24 |
25 | # To debug this script, add " &> /tmp/uploader.txt" to the previous line
26 |
--------------------------------------------------------------------------------
/scripts/update-gh-pages.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo ""
4 | echo "### Building docs static website with GitBook... ###"
5 | echo ""
6 |
7 | ./node_modules/.bin/gitbook build
8 |
9 | echo ""
10 | echo "### Syncing docs static website to web/ directory... ###"
11 | echo ""
12 |
13 | rsync -rv --delete-before --exclude '.git/' _book/ web/
14 |
15 | echo ""
16 | echo "### Cleaning up GitBook build... ###"
17 | echo ""
18 |
19 | rm -rf _book/
20 |
21 | echo "### Final step is to navigate into web/, confirm the changes and commit them..."
22 | echo "Then push to gh-pages branch. ###"
23 | echo ""
--------------------------------------------------------------------------------
/scripts/whitelisting/README.md:
--------------------------------------------------------------------------------
1 | ## av-submit.js
2 |
3 | Use: `yarn av-whitelist`
4 |
5 | This script will submit the latest release of Uploader to the following antivirus vendors:
6 |
7 | - Kaspersky, by submitting an XML file via FTP
8 | - McAfee, by submitting a form via e-mail
9 |
10 | If you want to update the McAfee template, you'll need Tidepool AWS SES CLI credentials (with permissions to update e-mail templates) as well as the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html), and run:
11 |
12 | ```
13 | aws ses update-template --cli-input-json file://scripts/mcafee-template.json
14 | ```
15 |
16 | You also need to set the following environment variables for the script to work (available in 1Password):
17 |
18 | ```
19 | FTP_AV_PASSWORD_TIDEPOOL
20 | AWS_ACCESS_KEY_ID
21 | AWS_SECRET_ACCESS_KEY
22 | ```
23 |
24 | This script is currently set up to run automatically on Appveyor when a release is tagged.
25 |
--------------------------------------------------------------------------------
/sounds/UploadFailed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/sounds/UploadFailed.wav
--------------------------------------------------------------------------------
/sounds/UploadSucceeded.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/sounds/UploadSucceeded.wav
--------------------------------------------------------------------------------
/styles/components/App.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .app {
19 | composes: base from '../core/typography.module.less';
20 | composes: flexColumn from '../core/layout.module.less';
21 | height: 100%;
22 | }
23 |
24 | // Page
25 | // ====================================
26 |
27 | .page {
28 | margin-left: auto;
29 | margin-right: auto;
30 | margin-bottom: 20px;
31 | box-sizing: border-box;
32 | }
33 |
34 | .loading {
35 | composes: page;
36 | width: 300px;
37 | text-align: center;
38 | }
39 |
40 | .mainWrap {
41 | composes: flexColumn from '../core/layout.module.less';
42 | flex-shrink: 0;
43 | }
44 |
45 | .changePerson {
46 | composes: link small from '../core/typography.module.less';
47 | composes: pageRow from '../core/layout.module.less';
48 | text-decoration: none;
49 | &:hover {
50 | text-decoration: none;
51 | cursor: pointer;
52 | }
53 | }
54 |
55 | .linkDisabled {
56 | &:hover {
57 | cursor: not-allowed;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/styles/components/BluetoothModal.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .modalWrap {
4 | composes: flexRow from '../core/layout.module.less';
5 | justify-content: center;
6 | position: absolute;
7 | top: 0; left: 0;
8 | background-color: rgba(0, 0, 0, 0.25);
9 | width: 100%;
10 | height: 100%;
11 | }
12 |
13 | .modal {
14 | composes: flexColumn from '../core/layout.module.less';
15 | min-width: 330px;
16 | background-color: @gray-background;
17 | border-radius: 5px;
18 | border: solid 1px @gray-light;
19 | padding: 5px;
20 | justify-content: center;
21 | align-self: center;
22 | align-items: center;
23 | }
24 |
25 | .title {
26 | composes: small bold from '../core/typography.module.less';
27 | padding: 10px 10px 5px 10px;
28 | }
29 |
30 | .text {
31 | composes: small from '../core/typography.module.less';
32 | text-align: center;
33 | max-width: 260px;
34 | }
35 |
36 | .actions {
37 | padding: 15px;
38 | }
39 |
40 | .button {
41 | composes: btn btnPrimary from '../core/buttons.module.less';
42 | margin: 6px;
43 | }
44 |
45 | .buttonSecondary {
46 | composes: btn btnSecondary from '../core/buttons.module.less';
47 | margin: 6px;
48 | }
49 |
50 | .textInputWrapper {
51 | composes: boxFlex from '../core/layout.module.less';
52 | margin-top: 10px;
53 | margin-bottom: 10px;
54 | }
55 |
56 | .textInput {
57 | composes: form-control from '../core/forms.less';
58 | }
--------------------------------------------------------------------------------
/styles/components/ClinicUploadDone.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .buttonWrap {
19 | composes: flexRow pageRow from '../core/layout.module.less';
20 | flex-direction: row-reverse;
21 | }
22 |
23 | .button {
24 | composes: btn btnPrimary from '../core/buttons.module.less';
25 | font-size: @font-size-large;
26 | padding: 5px 0px;
27 | margin: 10px auto;
28 | }
29 |
--------------------------------------------------------------------------------
/styles/components/ClinicUserBlock.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | .main {
17 | composes: whiteBox flexRowWrap from '../core/layout.module.less';
18 | justify-content: space-between;
19 | padding: 20px 25px;
20 | margin-bottom:0px;
21 | border-bottom: none;
22 | }
23 |
24 | .nameWrap {
25 | composes: flexRow from '../core/layout.module.less';
26 | align-items: flex-end;
27 | width: 100%
28 | }
29 |
30 | .name {
31 | composes: large from '../core/typography.module.less';
32 | padding-right: 25px;
33 | max-width:50%;
34 | white-space: nowrap;
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | }
38 |
39 | .birthday {
40 | composes: large from '../core/typography.module.less';
41 | }
42 |
43 | .edit {
44 | composes: link small from '../core/typography.module.less';
45 | padding-left: 15px;
46 | text-decoration: none;
47 | margin-left: auto;
48 | &:hover {
49 | text-decoration: none;
50 | cursor: pointer;
51 | }
52 | }
53 |
54 | .disabled {
55 | &:hover {
56 | cursor: not-allowed;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/styles/components/DevTools.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | .container {
17 | width: 100%;
18 | height: 100%;
19 | }
20 |
--------------------------------------------------------------------------------
/styles/components/Footer.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .footer {
19 | composes: flexColumn from '../core/layout.module.less';
20 | flex-shrink: 0;
21 | margin-top: auto;
22 | margin-bottom: 30px;
23 | }
24 |
25 | .footerRow {
26 | composes: flexRow from '../core/layout.module.less';
27 | width: 100%;
28 | max-width: 550px;
29 | margin: 0px auto;
30 | justify-content: space-around;
31 | align-self: flex-end;
32 | align-items: center;
33 | }
34 |
35 | .footerLink {
36 | composes: invertLink gray from '../core/typography.module.less';
37 | text-decoration: none;
38 | line-height: 36px;
39 | &:hover,
40 | &:focus,
41 | &:active {
42 | text-decoration: none;
43 | }
44 | }
45 |
46 | .version {
47 | composes: lightGray from '../core/typography.module.less';
48 | margin: 10px auto;
49 | }
50 |
51 | .betaWarning {
52 | composes: large from '../core/typography.module.less';
53 | color: @red-error;
54 | margin: 0px auto;
55 | }
56 |
--------------------------------------------------------------------------------
/styles/components/LoadingBar.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | // Adapted from:
17 | // http://css-tricks.com/css3-progress-bars/
18 |
19 | @import '../core/variables.less';
20 |
21 | .loadingBar {
22 | border: 1px solid @gray-light;
23 | color: #fff;
24 | width: 100%;
25 | }
26 |
27 | .fill {
28 | display: block;
29 | width: 100%;
30 | height: 100%;
31 | background-color: @purple-medium;
32 | position: relative;
33 | overflow: hidden;
34 | }
35 |
36 | .fill:after {
37 | content: "";
38 | position: absolute;
39 | top: 0;
40 | left: 0;
41 | bottom: 0;
42 | right: 0;
43 | background-image: -webkit-gradient(linear, 0 0, 100% 100%,
44 | color-stop(.25, rgba(255, 255, 255, .2)),
45 | color-stop(.25, transparent), color-stop(.5, transparent),
46 | color-stop(.5, rgba(255, 255, 255, .2)),
47 | color-stop(.75, rgba(255, 255, 255, .2)),
48 | color-stop(.75, transparent), to(transparent)
49 | );
50 | z-index: 1;
51 | -webkit-background-size: 50px 50px;
52 | -webkit-animation: animation 2s linear infinite;
53 | overflow: hidden;
54 | }
55 |
56 | @-webkit-keyframes animation {
57 | 0% {
58 | background-position: 0 0;
59 | }
60 | 100% {
61 | background-position: 50px 50px;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/styles/components/LoggedOut.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .loggedOutPage {
4 | composes: page from './App.module.less';
5 | width: 488px;
6 | background: white;
7 | margin-top: auto;
8 | border: 1px solid #DFE2E6;
9 | border-radius: 4px;
10 | padding: 44px;
11 | }
12 |
13 | .form {
14 | composes: boxFlex from '../core/layout.module.less';
15 | border-color: @purple-light;
16 | }
17 |
18 | .actions {
19 | composes: flexRowWrap from '../core/layout.module.less';
20 | justify-content: space-between;
21 | margin-top: 5px;
22 | }
23 |
24 | .button {
25 | composes: btn btnPrimary from '../core/buttons.module.less';
26 | display: block;
27 | margin: 0 auto;
28 | width: 100%;
29 | }
30 |
31 | .logoWrapper {
32 | composes: flexRow from '../core/layout.module.less';
33 | justify-content: center;
34 | margin-bottom: 32px;
35 | }
36 |
37 | .logo {
38 | width: 227px;
39 | height: 24px;
40 | }
41 |
42 | .hr {
43 | width: 400px;
44 | margin-bottom: 32px;
45 | color: #DFE2E6;
46 | }
47 |
48 | .heroText {
49 | composes: flexRow from '../core/layout.module.less';
50 | composes: medium from '../core/typography.module.less';
51 | margin: 15px auto 15px auto;
52 | }
53 |
54 | .explainer {
55 | composes: small from '../core/typography.module.less';
56 | color: @gray-medium;
57 | margin-bottom: 21px;
58 | }
59 |
--------------------------------------------------------------------------------
/styles/components/NoUploadTargets.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .main {
19 | composes: whiteBox from '../core/layout.module.less';
20 | composes: centerContainer from '../core/layout.module.less';
21 | width: 515px;
22 | height: 445px;
23 | margin-top: 20px;
24 | }
25 |
26 | .paragraph {
27 | text-align: center;
28 | width: 290px;
29 | margin: 0 auto;
30 | }
31 |
32 | .link {
33 | composes: link from '../core/typography.module.less';
34 |
35 | &:hover,
36 | &:focus,
37 | &:active {
38 | text-decoration: none;
39 | }
40 | }
41 |
42 | .linkCentered {
43 | text-align: center;
44 | }
45 |
46 | .buttonCta {
47 | composes: btn btnPrimary from '../core/buttons.module.less';
48 | width: 300px;
49 | padding: 15px 10px;
50 | font-size: @font-size-large;
51 | margin: 0 auto 25px;
52 | }
53 |
54 | .buttonStandard {
55 | composes: btn btnPrimary from '../core/buttons.module.less';
56 | padding: 0px 10px;
57 | margin: 0 auto 25px;
58 | }
59 |
--------------------------------------------------------------------------------
/styles/components/PatientLimitModal.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .modalWrap {
4 | composes: flexColumn from '../core/layout.module.less';
5 | justify-content: center;
6 | position: absolute;
7 | top: 0;
8 | left: 0;
9 | background-color: rgba(0, 0, 0, 0.25);
10 | width: 100%;
11 | height: 100%;
12 | }
13 |
14 | .modal {
15 | composes: boxFlex flexColumn from '../core/layout.module.less';
16 | min-width: 350px;
17 | max-width: calc(100% - 80px);
18 | background-color: #ffffff;
19 | border-radius: 5px;
20 | border: solid 1px @gray-light;
21 | justify-content: center;
22 | align-self: center;
23 | align-items: center;
24 | }
25 |
26 | .text {
27 | composes: small from '../core/typography.module.less';
28 | width: 100%;
29 | color: #4f6a92;
30 | }
31 |
32 | .body {
33 | composes: flexColumn from '../core/layout.module.less';
34 | justify-content: space-around;
35 | align-items: center;
36 | margin-top: 35px;
37 | margin-left: 35px;
38 | margin-right: 35px;
39 | padding: 0 20px;
40 | }
41 |
42 | .actions {
43 | composes: flexColumn from '../core/layout.module.less';
44 | padding-bottom: 22px;
45 | width: 310px;
46 | align-items: center;
47 | }
48 |
49 | .button {
50 | composes: btn btnPrimary from '../core/buttons.module.less';
51 | font-size: 12px;
52 | margin: 6px;
53 | padding: 0 10px;
54 | }
55 |
56 | .image {
57 | width: 213px;
58 | margin-bottom: 24px;
59 | }
60 |
61 | .largeText {
62 | composes: medium from '../core/typography.module.less';
63 | text-align: center;
64 | margin: 0 0 24px 0;
65 | }
66 |
67 | .smallText {
68 | composes: tiny from '../core/typography.module.less';
69 | text-align: center;
70 | margin-bottom: 16px;
71 | }
72 |
73 | .learnMoreLink {
74 | composes: link from '../core/typography.module.less';
75 | color: #6783ff;
76 | }
77 |
--------------------------------------------------------------------------------
/styles/components/ProgressBar.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .progressBar {
19 | border: 1px solid @gray-light;
20 | color: #fff;
21 | width: 100%;
22 | }
23 |
24 | .fill {
25 | background-color: @purple-medium;
26 | transition: width 200ms;
27 | }
28 |
--------------------------------------------------------------------------------
/styles/components/UpdateModal.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .purpleCentered {
4 | color: @purple-dark;
5 | text-align: center;
6 | }
7 |
8 | .modalWrap {
9 | composes: flexRow from '../core/layout.module.less';
10 | justify-content: center;
11 | position: absolute;
12 | top: 0; left: 0;
13 | background-color: rgba(0, 0, 0, 0.25);
14 | width: 100%;
15 | height: 100%;
16 | }
17 |
18 | .modal {
19 | composes: flexColumn from '../core/layout.module.less';
20 | min-width: 330px;
21 | background-color: @gray-background;
22 | border-radius: 5px;
23 | border: solid 1px @gray-light;
24 | padding: 5px;
25 | justify-content: center;
26 | align-self: center;
27 | align-items: center;
28 | }
29 |
30 | .title {
31 | composes: small bold from '../core/typography.module.less';
32 | padding-top: 10px;
33 | padding-bottom: 5px;
34 | }
35 |
36 | .text {
37 | composes: small from '../core/typography.module.less';
38 | text-align: center;
39 | width: 100%;
40 | }
41 |
42 | .textRed {
43 | composes: small from '../core/typography.module.less';
44 | text-align: center;
45 | width: 100%;
46 | color: #FB5A52;
47 | }
48 |
49 | .body {
50 | display:flex;
51 | flex-direction: column;
52 | align-items: center;
53 | padding: 15px;
54 | }
55 |
56 | .actions {
57 | padding: 15px;
58 | }
59 |
60 | .button {
61 | composes: btn btnPrimary from '../core/buttons.module.less';
62 | margin: 6px;
63 | }
64 |
65 | .buttonSecondary {
66 | composes: btn btnSecondary from '../core/buttons.module.less';
67 | margin: 6px;
68 | }
69 |
--------------------------------------------------------------------------------
/styles/components/UserDropdown.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .uploadGroup {
4 | composes: whiteBox flexRow from '../core/layout.module.less';
5 | justify-content: space-between;
6 | margin-bottom: 0px;
7 | border-bottom: 0px;
8 | padding: 15px 15px 15px 29px;
9 | select {
10 | font-size: 20px;
11 | }
12 | }
13 |
14 | .label {
15 | font-size: @font-size-large;
16 | margin-top: 10px;
17 | }
18 |
19 | .list {
20 | margin-top: 0px;
21 | }
22 |
23 | .settings {
24 | composes: list;
25 | width: 260px;
26 | }
27 |
28 | .main {
29 | composes: list;
30 | width: 280px;
31 | }
32 |
--------------------------------------------------------------------------------
/styles/components/VersionCheck.module.less:
--------------------------------------------------------------------------------
1 | @import '../core/variables.less';
2 |
3 | .modalWrap {
4 | composes: flexRow from '../core/layout.module.less';
5 | justify-content: center;
6 | position: absolute;
7 | top: 0; left: 0;
8 | background-color: rgba(39, 27, 70, 0.5);
9 | width: 100%;
10 | height: 100%;
11 | }
12 |
13 | .modal {
14 | composes: flexColumn from '../core/layout.module.less';
15 | min-width: 330px;
16 | background-color: @gray-background;
17 | border-radius: 5px;
18 | border: solid 1px @gray-light;
19 | padding: 30px;
20 | justify-content: center;
21 | align-self: center;
22 | align-items: center;
23 | .icon {
24 | color: @purple-medium;
25 | font-size: 48px;
26 | }
27 | }
28 |
29 | .purpleCentered {
30 | color: @purple-dark;
31 | text-align: center;
32 | }
33 |
34 | .mostlyOpaqueBackground {
35 | background-color: rgba(255, 255, 255, 0.925);
36 | }
37 |
38 |
39 |
40 | .failed {
41 | composes: flexColumn from '../core/layout.module.less';
42 | }
43 |
44 | .offline {
45 | composes: flexColumn from '../core/layout.module.less';
46 | }
47 |
48 | .text {
49 | composes: small from '../core/typography.module.less';
50 | }
51 |
52 | .link {
53 | composes: link from '../core/typography.module.less';
54 |
55 | &:hover,
56 | &:focus,
57 | &:active {
58 | text-decoration: none;
59 | }
60 | }
61 |
62 | .lineOne {
63 | composes: large from '../core/typography.module.less';
64 | font-weight: 500;
65 | margin: 8px 0;
66 | color: #4f6a92;
67 | }
68 |
69 | .lineTwo {
70 | composes: medium from '../core/typography.module.less';
71 | font-weight: 500;
72 | margin: 8px 0;
73 | color: #7e98c3;
74 | }
75 |
76 | .mostImportant {
77 | margin-top: 20px;
78 | }
79 |
80 | .error {
81 | position: absolute;
82 | top: 600px; left: 0px;
83 |
84 | width: 100%;
85 | min-height: 80px;
86 | }
87 |
88 | .errorText {
89 | composes: purpleCentered;
90 | composes: tiny from '../core/typography.module.less';
91 | margin: 0;
92 | }
93 |
--------------------------------------------------------------------------------
/styles/components/ViewDataLink.module.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import '../core/variables.less';
17 |
18 | .buttonWrap {
19 | composes: flexRow pageRow from '../core/layout.module.less';
20 | flex-direction: row-reverse;
21 | padding-right: 23px;
22 | padding-top: 10px;
23 | }
24 |
25 | .button {
26 | composes: btn btnSecondary from '../core/buttons.module.less';
27 | font-size: @font-size-large;
28 | padding: 5px 0px;
29 | margin: 10px auto;
30 | }
31 |
--------------------------------------------------------------------------------
/styles/core/forms.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import 'variables.less';
17 |
18 |
19 | .form-control-border {
20 | border: @form-control-border-size solid fade(@form-control-border-color, 50%);
21 | border-radius: 0px;
22 |
23 | &:hover {
24 | border-color: @purple-light;
25 | }
26 |
27 | &:focus {
28 | // Disable default WebKit focus style
29 | outline: 0;
30 | border-color: @purple-medium;
31 | }
32 |
33 | &:disabled {
34 | border-color: fade(@form-control-border-color, 70%);
35 | cursor: not-allowed;
36 | background-color: @gray-background;
37 | }
38 | }
39 |
40 | .form-control {
41 | display: block;
42 |
43 | font-size: @font-size-medium;
44 | height: @form-control-height;
45 | line-height: (@line-height-medium);
46 | vertical-align: middle;
47 |
48 | padding: 0 15px;
49 |
50 | .form-control-border();
51 | background: #fff;
52 | color: @text-color;
53 |
54 | textarea& {
55 | height: auto;
56 | line-height: @line-height-medium;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/styles/core/scaffolding.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | @import 'variables.less';
17 |
18 | // Body reset
19 | // ====================================
20 |
21 | html {
22 | height: 100%;
23 | }
24 |
25 | body {
26 | padding: 0;
27 | margin: 0;
28 | background-color: @body-bg;
29 | height: 100%;
30 | }
31 |
32 | #app {
33 | height: 100%;
34 | }
35 |
36 | // Inputs
37 | // ====================================
38 |
39 | // Make form elements use body font styles
40 | input,
41 | button,
42 | select,
43 | textarea {
44 | font-family: inherit;
45 | font-size: inherit;
46 | line-height: inherit;
47 | }
48 |
49 |
50 | // Images
51 | // ====================================
52 | img {
53 | vertical-align: middle;
54 | }
55 |
56 |
57 | // Scrollbar
58 | // ====================================
59 |
60 | // it's not very clear that content is scrollable
61 | // so make sure a scrollbar always displays
62 | ::-webkit-scrollbar {
63 | -webkit-appearance: none;
64 | }
65 | ::-webkit-scrollbar:vertical {
66 | width: 10px;
67 | }
68 | ::-webkit-scrollbar-track {
69 | background-color: rgba(255,255,255,0.25);
70 | border-radius: 5px;
71 | }
72 | ::-webkit-scrollbar-thumb {
73 | border-radius: 5px;
74 | background-color: rgba(0,0,0,0.15);
75 | }
76 |
--------------------------------------------------------------------------------
/styles/core/select.less:
--------------------------------------------------------------------------------
1 | @import 'forms.less';
2 | @import '../../node_modules/react-select/less/select.less';
3 |
4 | // mixin overrides
5 | .Select-focus-state(@color) {
6 | box-shadow: none;
7 | }
8 | .Select-focus-state-classic() {
9 | box-shadow: none;
10 | }
11 |
12 | .Select-control {
13 | // for hover, focus and disabled styles
14 | .form-control-border()
15 | }
16 |
17 | .is-open > .Select-control {
18 | border-color: @purple-medium;
19 | }
20 |
21 | // disabled option cursor override
22 | .Select-option {
23 | &.is-disabled {
24 | cursor: not-allowed;
25 | }
26 | }
27 |
28 | @select-primary-color: @purple-medium;
29 | @select-input-bg-disabled: @gray-background;
30 | @select-input-border-color: fade(@form-control-border-color, 50%);
31 | @select-input-border-radius: 0px;
32 | @select-input-border-width: @form-control-border-size;
33 | @select-input-height: @form-control-height;
34 | @select-input-internal-height: @form-control-height;
35 |
--------------------------------------------------------------------------------
/styles/core/typography.module.less:
--------------------------------------------------------------------------------
1 | @import 'variables.less';
2 |
3 | .base {
4 | font-family: @font-family-base;
5 | font-size: @font-size-small;
6 | line-height: @line-height-small;
7 | color: @text-color;
8 | }
9 |
10 | .link {
11 | color: @link-color;
12 | text-decoration: underline;
13 |
14 | &:hover,
15 | &:focus {
16 | color: @link-hover-color;
17 | text-decoration: underline;
18 | }
19 | }
20 |
21 | .invertLink {
22 | composes: link;
23 | color: @link-hover-color;
24 |
25 | &:hover,
26 | &:focus {
27 | color: @link-color;
28 | }
29 | }
30 |
31 | .large {
32 | font-size: @font-size-large;
33 | line-height: @line-height-large;
34 | }
35 |
36 | .medium {
37 | font-size: @font-size-medium;
38 | line-height: @line-height-medium;
39 | }
40 |
41 | .small {
42 | font-size: @font-size-small;
43 | line-height: @line-height-small;
44 | }
45 |
46 | .tiny {
47 | font-size: @font-size-tiny;
48 | line-height: @line-height-tiny;
49 | }
50 |
51 | .bold {
52 | font-weight: bold;
53 | }
54 |
55 | .lightGray {
56 | color: @gray-light;
57 | }
58 |
59 | .gray {
60 | color: @gray-medium;
61 | }
62 |
--------------------------------------------------------------------------------
/styles/main.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2014, Tidepool Project
3 | *
4 | * This program is free software; you can redistribute it and/or modify it under
5 | * the terms of the associated License, which is identical to the BSD 2-Clause
6 | * License as published by the Open Source Initiative at opensource.org.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the License for more details.
11 | *
12 | * You should have received a copy of the License along with this program; if
13 | * not, you can obtain one from Tidepool Project at tidepool.org.
14 | */
15 |
16 | // Core
17 | // ====================================
18 |
19 | @import "core/fonts.less";
20 |
21 | @import "core/scaffolding.less";
22 | @import "core/select.less";
23 |
--------------------------------------------------------------------------------
/test/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "es6": true,
4 | "jest/globals": true
5 | },
6 | "plugins": [
7 | "jest"
8 | ],
9 | "rules": {
10 | "no-unused-expressions": 0,
11 | "linebreak-style": 0,
12 | "jest/no-disabled-tests": "warn",
13 | "jest/no-focused-tests": "error",
14 | "jest/no-identical-title": "error"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/app/components/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/test/app/components/.gitkeep
--------------------------------------------------------------------------------
/test/app/containers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/test/app/containers/.gitkeep
--------------------------------------------------------------------------------
/test/e2e.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tidepool-org/uploader/2451716d52290d35ec155de228ec4995d111999b/test/e2e.js
--------------------------------------------------------------------------------
/test/example.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable func-names */
2 | import { expect } from 'chai';
3 |
4 |
5 | describe('description', () => {
6 | test('should have description', () => {
7 | expect(1 + 2).to.equal(3);
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/test/lib/fixtures/nonpwd.json:
--------------------------------------------------------------------------------
1 | {
2 | "user": {
3 | "userid": "9508844d",
4 | "username": "futejok@foobar.com",
5 | "termsAccepted": "2015-12-05T13:09:50-08:00",
6 | "emails": [
7 | "futejok@foobar.com"
8 | ]
9 | },
10 | "profile": {
11 | "fullName": "Jeffrey Gene Lyons"
12 | },
13 | "memberships": [
14 | {
15 | "userid": "9508844d",
16 | "profile": {
17 | "fullName": "Jeffrey Gene Lyons"
18 | }
19 | },
20 | {
21 | "userid": "01188072",
22 | "profile": {
23 | "fullName": "Lily Garza",
24 | "patient": {
25 | "about": "Jewsein haszuk suspogpid ejeew zeiheegu.",
26 | "birthday": "1978-01-13",
27 | "diagnosisDate": "1988-01-22"
28 | }
29 | }
30 | },
31 | {
32 | "userid": "53ef303b",
33 | "profile": {
34 | "fullName": "Birdie Luella Jones",
35 | "patient": {
36 | "about": "Wu jeohe siniece lawbe wukhuw.",
37 | "birthday": "1964-01-02",
38 | "diagnosisDate": "1977-01-13"
39 | }
40 | }
41 | },
42 | {
43 | "userid": "cbccfb03",
44 | "profile": {
45 | "fullName": "Douglas Ruiz",
46 | "patient": {
47 | "about": "Ge ruti peva heranadi zaotcu.",
48 | "birthday": "1969-08-12",
49 | "diagnosisDate": "1977-08-13"
50 | }
51 | }
52 | }
53 | ]
54 | }
--------------------------------------------------------------------------------
/test/lib/fixtures/pwd.json:
--------------------------------------------------------------------------------
1 | {
2 | "user": {
3 | "userid": "ad7f18a8",
4 | "username": "ik@foobar.com",
5 | "termsAccepted": "2015-12-05T12:57:51-08:00",
6 | "emails": [
7 | "ik@foobar.com"
8 | ]
9 | },
10 | "profile": {
11 | "fullName": "Tillie Andrews",
12 | "patient": {
13 | "about": "Ti agopovtu tadbuhto map bacosub.",
14 | "birthday": "1974-10-30",
15 | "diagnosisDate": "1986-11-06"
16 | }
17 | },
18 | "memberships": [
19 | {
20 | "userid": "ad7f18a8",
21 | "profile": {
22 | "fullName": "Tillie Andrews",
23 | "patient": {
24 | "about": "Ti agopovtu tadbuhto map bacosub.",
25 | "birthday": "1974-10-30",
26 | "diagnosisDate": "1986-11-06"
27 | }
28 | }
29 | },
30 | {
31 | "userid": "2166340f",
32 | "profile": {
33 | "fullName": "George Taylor",
34 | "patient": {
35 | "about": "",
36 | "birthday": "1977-10-12",
37 | "diagnosisDate": "1989-10-14"
38 | }
39 | }
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/test/lib/insulet/testInsuletDriver.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2018, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 | /* global beforeEach, describe, it */
19 |
20 | var _ = require('lodash');
21 | var expect = require('salinity').expect;
22 |
23 | var driver = require('../../../lib/drivers/insulet/insuletDriver.js');
24 |
25 | describe('insuletDriver.js', () => {
26 | var insuletDriver;
27 |
28 | beforeEach(() => {
29 | insuletDriver = driver({});
30 | });
31 |
32 | describe('decodeSerial', () => {
33 | test('decodes 0x20409A4', () => {
34 | expect(insuletDriver._decodeSerial(0x20409A4)).to.equal('010002-00617');
35 | });
36 | });
37 | });
38 |
--------------------------------------------------------------------------------
/test/lib/medtronic600/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "plugins": ["lodash"],
4 | "parserOptions": {
5 | "ecmaVersion": 6
6 | },
7 | "rules": {
8 | "linebreak-style": 0,
9 | "no-plusplus": ["error", {
10 | "allowForLoopAfterthoughts": true
11 | }],
12 | },
13 | "settings": {
14 | "lodash": 3
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/lib/testDriverManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 |
19 | var expect = require('salinity').expect;
20 |
21 | var driverManager = require('../../lib/driverManager.js');
22 |
23 |
24 | describe('driverManager.js', () => {
25 |
26 | var manager;
27 | var config = {};
28 | var drivers = {};
29 |
30 | beforeEach(() => {
31 | manager = driverManager(drivers, config);
32 | });
33 |
34 | describe('detect', () => {
35 | test('exists', () => {
36 | expect(manager).itself.to.respondTo('detect');
37 | });
38 | });
39 |
40 | describe('process', () => {
41 | test('exists', () => {
42 | expect(manager).itself.to.respondTo('process');
43 | });
44 | });
45 |
46 | });
--------------------------------------------------------------------------------
/test/lib/testHidDevice.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 |
19 | /*
20 | * IOET
21 | * Test for new hidDevice facilities
22 | * */
23 |
24 | var expect = require('salinity').expect;
25 |
26 | var hidDevice = require('../../lib/hidDevice.js');
27 |
28 | describe('hidDevice.js', () => {
29 |
30 | var device;
31 | var config = {};
32 |
33 | beforeEach(() => {
34 | device = hidDevice(config);
35 | });
36 |
37 | describe('connect', () => {
38 | test('exists', () => {
39 | expect(device).itself.to.respondTo('connect');
40 | });
41 | });
42 | describe('disconnect', () => {
43 | test('exists', () => {
44 | expect(device).itself.to.respondTo('disconnect');
45 | });
46 | });
47 | describe('receive', () => {
48 | test('exists', () => {
49 | expect(device).itself.to.respondTo('receive');
50 | });
51 | });
52 | describe('send', () => {
53 | test('exists', () => {
54 | expect(device).itself.to.respondTo('send');
55 | });
56 | });
57 | });
58 |
--------------------------------------------------------------------------------
/test/lib/testStatusManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * == BSD2 LICENSE ==
3 | * Copyright (c) 2014, Tidepool Project
4 | *
5 | * This program is free software; you can redistribute it and/or modify it under
6 | * the terms of the associated License, which is identical to the BSD 2-Clause
7 | * License as published by the Open Source Initiative at opensource.org.
8 | *
9 | * This program is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the License for more details.
12 | *
13 | * You should have received a copy of the License along with this program; if
14 | * not, you can obtain one from Tidepool Project at tidepool.org.
15 | * == BSD2 LICENSE ==
16 | */
17 |
18 |
19 | var expect = require('salinity').expect;
20 |
21 | var statusManager = require('../../lib/statusManager.js');
22 |
23 |
24 | describe('statusManager.js', () => {
25 |
26 | var manager;
27 | var config = {};
28 |
29 | beforeEach(() => {
30 | manager = statusManager(config);
31 | });
32 |
33 | describe('progressForStep', () => {
34 | test('exists', () => {
35 | expect(manager).itself.to.respondTo('progressForStep');
36 | });
37 | });
38 |
39 | });
--------------------------------------------------------------------------------
/version.sh:
--------------------------------------------------------------------------------
1 | # Read the node version from the .nvmrc file
2 | NVMRC_FILE=".nvmrc"
3 | if [[ -f "$NVMRC_FILE" ]]; then
4 | ARTIFACT_NODE_VERSION=$(cat "$NVMRC_FILE")
5 | export ARTIFACT_NODE_VERSION
6 | fi
7 |
8 | export START_NODE_VERSION="${ARTIFACT_NODE_VERSION}"
9 |
--------------------------------------------------------------------------------
/webpack.config.base.mjs:
--------------------------------------------------------------------------------
1 | /**
2 | * Base webpack config used across other specific configs
3 | */
4 |
5 | import _ from 'lodash';
6 | import path from 'node:path';
7 | import { fileURLToPath } from 'node:url';
8 | import webpack from 'webpack';
9 | import appPkg from './app/package.json' with { type: 'json' };
10 |
11 | const __filename = fileURLToPath(import.meta.url);
12 | const __dirname = path.dirname(__filename);
13 |
14 | const externals = _.get(appPkg, 'dependencies', {});
15 | const additionalExternals = _.get(appPkg, 'optionalDependencies', {});
16 |
17 | export default {
18 | module: {
19 | rules: [{
20 | test: /\.jsx?$/,
21 | use: [{
22 | loader: 'babel-loader',
23 | options: {
24 | cacheDirectory: true
25 | }
26 | }],
27 | exclude: /node_modules/
28 | },
29 | // https://github.com/ashtuchkin/iconv-lite/issues/204#issuecomment-432048618
30 | {
31 | test: /node_modules[\/\\](iconv-lite)[\/\\].+/,
32 | resolve: {
33 | aliasFields: ['main']
34 | }
35 | }]
36 | },
37 |
38 | output: {
39 | path: path.join(__dirname, 'app'),
40 | // https://github.com/webpack/webpack/issues/1114
41 | library: {
42 | type: 'commonjs2'
43 | }
44 | },
45 |
46 | /**
47 | * Determine the array of extensions that should be used to resolve modules.
48 | */
49 | resolve: {
50 | extensions: ['.js', '.jsx', '.json'],
51 | alias: {
52 | superagent: 'superagent/lib/client.js',
53 | emitter: 'component-emitter',
54 | reduce: 'reduce-component'
55 | }
56 | },
57 | resolveLoader: { },
58 |
59 | plugins: [
60 | new webpack.EnvironmentPlugin({
61 | NODE_ENV: 'production'
62 | }),
63 | ],
64 |
65 | externals: [...Object.keys(externals || {}), ...Object.keys(additionalExternals || {})]
66 | };
67 |
--------------------------------------------------------------------------------
/webpack.config.eslint.js:
--------------------------------------------------------------------------------
1 | require('@babel/register');
2 |
3 | module.exports = require('./webpack.config.renderer.dev.babel').default;
4 |
--------------------------------------------------------------------------------