From 22d77d248bfd4b3a3f637d5d46d30c5db62b3818 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 1 Oct 2024 14:56:15 +0100 Subject: [PATCH 1/6] filter out topaz signature pads from ports list --- app/main.dev.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/main.dev.js b/app/main.dev.js index b3efbef5d..1f375d0da 100755 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -273,11 +273,12 @@ operating system, as soon as possible.`, mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { event.preventDefault(); + portList = portList.filter(port => port.serialNumber !== 'TOPAZBSB'); // filter out signature pads console.log('Port list:', portList); let selectedPort; for (let i = 0; i < serialPortFilter.length; i++) { - selectedPort = portList.find((element) => + selectedPort = portList.find((element) => serialPortFilter[i].usbVendorId === parseInt(element.vendorId, 10) && serialPortFilter[i].usbProductId === parseInt(element.productId, 10) ); @@ -717,7 +718,7 @@ if (!gotTheLock) { return handleIncomingUrl(url); } }); - + // Protocol handler for osx app.on('open-url', (event, url) => { event.preventDefault(); @@ -733,4 +734,4 @@ function getURLFromArgs(args) { } } return undefined; -} \ No newline at end of file +} From c2fc36f7c24b1db5bb49157c01dd690f27d5f3d7 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 1 Oct 2024 14:56:58 +0100 Subject: [PATCH 2/6] v2.59.1-filter-signature-pads.1 --- app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index 62435c25f..b92b00534 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "tidepool-uploader", "productName": "tidepool-uploader", - "version": "2.59.1", + "version": "2.59.1-filter-signature-pads.1", "description": "Tidepool Project Universal Uploader", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index 3966b844a..1837f6d88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidepool-uploader", - "version": "2.59.1", + "version": "2.59.1-filter-signature-pads.1", "description": "Tidepool Project Universal Uploader", "private": true, "main": "main.prod.js", From 0402bdf5f432bd06b0ff13511908ededb89b32db Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 15 Oct 2024 16:30:15 +0100 Subject: [PATCH 3/6] check device instance ID if serial number field not available --- app/main.dev.js | 6 +++++- lib/drivers/tandem | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main.dev.js b/app/main.dev.js index 1f375d0da..39152600a 100755 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -273,7 +273,11 @@ operating system, as soon as possible.`, mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { event.preventDefault(); - portList = portList.filter(port => port.serialNumber !== 'TOPAZBSB'); // filter out signature pads + portList = portList.filter(port => ( + // filter out signature pads + port.serialNumber !== 'TOPAZBSB' && + !(typeof port.deviceInstanceId === 'string' && port.deviceInstanceId.includes('TOPAZBSB')) + )); console.log('Port list:', portList); let selectedPort; diff --git a/lib/drivers/tandem b/lib/drivers/tandem index 2b598f844..a5b753895 160000 --- a/lib/drivers/tandem +++ b/lib/drivers/tandem @@ -1 +1 @@ -Subproject commit 2b598f8446d7bd883c40f120b6cc354d964cda0b +Subproject commit a5b753895d7f16a3c952c6c08c953c828af37cb9 From 0fe3b936608401c33b3ff6a0b4720ad8267bff8a Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 15 Oct 2024 16:30:35 +0100 Subject: [PATCH 4/6] v2.59.1-filter-signature-pads.2 --- app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index b92b00534..179f2b43e 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "tidepool-uploader", "productName": "tidepool-uploader", - "version": "2.59.1-filter-signature-pads.1", + "version": "2.59.1-filter-signature-pads.2", "description": "Tidepool Project Universal Uploader", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index 1837f6d88..507475e7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidepool-uploader", - "version": "2.59.1-filter-signature-pads.1", + "version": "2.59.1-filter-signature-pads.2", "description": "Tidepool Project Universal Uploader", "private": true, "main": "main.prod.js", From a3b1b7b8c94974b983d4198ddeaaf3a43eb1db2e Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Thu, 10 Oct 2024 16:21:34 +0100 Subject: [PATCH 5/6] change from npm to yarn in package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 507475e7d..821db251a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "start-main-dev": "cross-env HOT=1 NODE_ENV=development electron --no-sandbox -r @babel/register ./app/main.dev.js", "server": "node server", "prepare-qa-build": "node -r @babel/register scripts/prepare-qa-build.js", - "package": "npm run build-quiet && electron-builder -p always -c electron-builder-publish.js" + "package": "yarn build-quiet && electron-builder -p always -c electron-builder-publish.js" }, "dependencies": { "@electron/remote": "2.1.2", From 22b5531fd6f7adb8ada9d2f0d0509ad6136ecb9d Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Thu, 10 Oct 2024 15:46:00 +0100 Subject: [PATCH 6/6] bump version of nvm --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ef0c6bcc..2f58bee33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,12 +23,16 @@ jobs: name: Install nvm and node command: | set +e - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash source ~/.nvm/nvm.sh + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" nvm install v18.17.1 nvm alias default v18.17.1 - run: node -v - run: npm install --global npm node-gyp + - run: echo $SHELL - run: npm -v - run: node-gyp -v - run: curl -o- -L https://yarnpkg.com/install.sh | bash