simplejsble 1.2.1-dev84 → 1.2.1-dev88

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.
package/dist/adapter.d.ts CHANGED
@@ -42,6 +42,13 @@ export declare class Adapter extends EventEmitter<AdapterEvents> {
42
42
  scanGetResults(): Peripheral[];
43
43
  getPairedPeripherals(): Promise<Peripheral[]>;
44
44
  getConnectedPeripherals(): Promise<Peripheral[]>;
45
+ /**
46
+ * The peripherals CoreBluetooth already knows on macOS, by the identifiers
47
+ * address() returned earlier, without scanning. Unknown identifiers are
48
+ * skipped, and a returned peripheral might be out of range. Other platforms
49
+ * reject with OPERATION_NOT_SUPPORTED.
50
+ */
51
+ retrieveCachedPeripherals(identifiers: readonly string[]): Promise<Peripheral[]>;
45
52
  /** A host for GATT services of this process, advertised by this adapter. */
46
53
  createLocalPeripheral(): LocalPeripheral;
47
54
  /**
package/dist/adapter.js CHANGED
@@ -82,6 +82,15 @@ class Adapter extends node_events_1.EventEmitter {
82
82
  getConnectedPeripherals() {
83
83
  return this.#handle.getConnectedPeripherals().then(handles => handles.map(peripheral_1.Peripheral.wrap));
84
84
  }
85
+ /**
86
+ * The peripherals CoreBluetooth already knows on macOS, by the identifiers
87
+ * address() returned earlier, without scanning. Unknown identifiers are
88
+ * skipped, and a returned peripheral might be out of range. Other platforms
89
+ * reject with OPERATION_NOT_SUPPORTED.
90
+ */
91
+ async retrieveCachedPeripherals(identifiers) {
92
+ return (await this.#handle.retrieveCachedPeripherals(identifiers)).map(peripheral_1.Peripheral.wrap);
93
+ }
85
94
  /** A host for GATT services of this process, advertised by this adapter. */
86
95
  createLocalPeripheral() {
87
96
  return local_1.LocalPeripheral.wrap(this.#handle.createLocalPeripheral());
package/dist/local.d.ts CHANGED
@@ -23,6 +23,12 @@ export declare class LocalPeripheral extends EventEmitter<LocalPeripheralEvents>
23
23
  setAdvertisedManufacturerData(companyId: number, data: Uint8Array): void;
24
24
  /** Whether clients can connect, true by default. */
25
25
  setConnectable(connectable: boolean): void;
26
+ /**
27
+ * Sets the local name in the advertisement on macOS and Linux, or removes it
28
+ * with null. This changes only the advertisement, not the system's Bluetooth
29
+ * name. Other platforms throw OPERATION_NOT_SUPPORTED.
30
+ */
31
+ setAdvertisementLocalName(name: string | null): void;
26
32
  addService(uuid: string): LocalService;
27
33
  services(): LocalService[];
28
34
  removeAllServices(): void;
package/dist/local.js CHANGED
@@ -43,6 +43,14 @@ class LocalPeripheral extends node_events_1.EventEmitter {
43
43
  setConnectable(connectable) {
44
44
  this.#handle.setConnectable(connectable);
45
45
  }
46
+ /**
47
+ * Sets the local name in the advertisement on macOS and Linux, or removes it
48
+ * with null. This changes only the advertisement, not the system's Bluetooth
49
+ * name. Other platforms throw OPERATION_NOT_SUPPORTED.
50
+ */
51
+ setAdvertisementLocalName(name) {
52
+ this.#handle.setAdvertisementLocalName(name);
53
+ }
46
54
  addService(uuid) {
47
55
  return LocalService.wrap(this.#handle.addService(uuid));
48
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "1.2.1-dev84",
3
+ "version": "1.2.1-dev88",
4
4
  "description": "SimpleBLE for Node.js and Electron: a cross-platform Bluetooth Low Energy library",
5
5
  "keywords": [
6
6
  "bluetooth",