Skip to content

Commit

Permalink
fix: Webpack errors & warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Mar 22, 2021
1 parent 02c931c commit d23f56c
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/bindings/hci/Adapter.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/hci/Adapter.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/bindings/hci/misc/Hci.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/bindings/hci/misc/Hci.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/hci/misc/Hci.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion lib/bindings/hci/misc/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { Advertisement } from './Advertisement';
export { Gap } from './Gap';
export { Hci } from './Hci';
export { Signaling } from './Signaling';
Expand Down
2 changes: 1 addition & 1 deletion lib/bindings/hci/misc/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/hci/misc/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/bindings/hci/Adapter.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import { Adapter, AddressType, GattLocal, Peripheral } from '../../models';

import { HciGattLocal } from './gatt';
import { Advertisement, Gap, Hci } from './misc';
import { Gap, Hci } from './misc';
import { HciPeripheral } from './Peripheral';

const SCAN_ENABLE_TIMEOUT = 1000;
const ADVERTISING_ENABLE_TIMEOUT = 1000;

interface Advertisement {
localName: string;
txPowerLevel: number;
manufacturerData: Buffer;
serviceData: { uuid: string; data: Buffer }[];
serviceUuids: string[];
solicitationServiceUuids: string[];
}

export class HciAdapter extends Adapter {
private initialized = false;

Expand Down
8 changes: 0 additions & 8 deletions src/bindings/hci/misc/Advertisement.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/bindings/hci/misc/Hci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ export class Hci extends TypedEmitter<HciEvents> {

private static createSocket() {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return new (require('@abandonware/bluetooth-hci-socket'))();
const NAME = '@abandonware/bluetooth-hci-socket';
return new (require(`${NAME}`))();
}

public static getDeviceList(): HciDevice[] {
Expand Down
1 change: 0 additions & 1 deletion src/bindings/hci/misc/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { Advertisement } from './Advertisement';
export { Gap } from './Gap';
export { Hci } from './Hci';
export { Signaling } from './Signaling';

0 comments on commit d23f56c

Please sign in to comment.