ota-hub-reactjs 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,21 +156,6 @@ export function useESP32MultiDeviceWhisperer({ releasePortByDefault, ...props }
156
156
  });
157
157
  base.updateConnection(uuid, (c) => ({ ...c, port }));
158
158
  }
159
- else {
160
- try {
161
- const oldInfo = port.getInfo();
162
- const authorizedPorts = await navigator.serial.getPorts();
163
- const freshPort = authorizedPorts.find((p) => p.getInfo().usbVendorId === oldInfo.usbVendorId &&
164
- p.getInfo().usbProductId === oldInfo.usbProductId);
165
- if (freshPort) {
166
- port = freshPort; // Swap out the dead pointer
167
- base.updateConnection(uuid, (c) => ({ ...c, port }));
168
- }
169
- }
170
- catch (e) {
171
- console.warn(`[${uuid}] Failed to silently heal port reference:`, e);
172
- }
173
- }
174
159
  base.updateConnection(uuid, (c) => ({ ...c, isConnecting: true }));
175
160
  const use_baudrate = baudrate ?? conn.baudrate ?? 115200;
176
161
  const transport = new Transport(port, false, false);
@@ -334,7 +319,6 @@ export function useESP32MultiDeviceWhisperer({ releasePortByDefault, ...props }
334
319
  const prevAutoConnect = conn.autoConnect;
335
320
  base.updateConnection(uuid, (c) => ({
336
321
  ...c,
337
- port: conn.port, // Restore the port into state in case disconnect wiped it
338
322
  isFlashing: true,
339
323
  flashProgress: 0,
340
324
  flashError: undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ota-hub-reactjs",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "ReactJS tools for building web apps to flash MCU devices such as esp32, brought to you by OTA Hub.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",