brilliantsole 0.0.45 → 0.0.46

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.
@@ -12,8 +12,8 @@ import 'svgson';
12
12
  import 'svg-pathdata';
13
13
  import * as webbluetooth from 'webbluetooth';
14
14
  import * as dgram from 'dgram';
15
- import noble from '@abandonware/noble';
16
15
  import os from 'os';
16
+ import noble from '@abandonware/noble';
17
17
 
18
18
  const isInProduction = "__BRILLIANTSOLE__PROD__" == "__BRILLIANTSOLE__PROD__";
19
19
  const isInDev = "__BRILLIANTSOLE__PROD__" == "__BRILLIANTSOLE__DEV__";
@@ -13468,6 +13468,9 @@ class BaseScanner {
13468
13468
  _a$1 = BaseScanner;
13469
13469
 
13470
13470
  const _console$6 = createConsole("NobleConnectionManager", { log: false });
13471
+ let filterUUIDs = true;
13472
+ const isLinux = os.platform() == "linux";
13473
+ filterUUIDs = !isLinux;
13471
13474
  class NobleConnectionManager extends BluetoothConnectionManager {
13472
13475
  get bluetoothId() {
13473
13476
  return this.#noblePeripheral.id;
@@ -13490,7 +13493,9 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13490
13493
  if (!canConnect) {
13491
13494
  return false;
13492
13495
  }
13496
+ console.log("FUCK");
13493
13497
  await this.#noblePeripheral.connectAsync();
13498
+ console.log("YEA");
13494
13499
  return true;
13495
13500
  }
13496
13501
  async disconnect() {
@@ -13559,7 +13564,15 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13559
13564
  async onNoblePeripheralConnect(noblePeripheral) {
13560
13565
  _console$6.log("onNoblePeripheralConnect", noblePeripheral.id, noblePeripheral.state);
13561
13566
  if (noblePeripheral.state == "connected") {
13562
- await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
13567
+ _console$6.log("discoverServicesAsync", noblePeripheral.id, {
13568
+ allServiceUUIDs,
13569
+ });
13570
+ if (filterUUIDs) {
13571
+ await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
13572
+ }
13573
+ else {
13574
+ await this.#noblePeripheral.discoverServicesAsync();
13575
+ }
13563
13576
  }
13564
13577
  await this.#onNoblePeripheralState();
13565
13578
  }
@@ -13618,6 +13631,14 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13618
13631
  for (const index in services) {
13619
13632
  const service = services[index];
13620
13633
  _console$6.log("service", service.uuid);
13634
+ if (service.uuid == "1800") {
13635
+ _console$6.log("skipping 1800");
13636
+ continue;
13637
+ }
13638
+ if (service.uuid == "1801") {
13639
+ _console$6.log("skipping 1801");
13640
+ continue;
13641
+ }
13621
13642
  const serviceName = getServiceNameFromUUID(service.uuid);
13622
13643
  _console$6.assertWithError(serviceName, `no name found for service uuid "${service.uuid}"`);
13623
13644
  _console$6.log({ serviceName });