From 24eeb956940514c5cf192efd11e321a0718fbef5 Mon Sep 17 00:00:00 2001 From: Marco Crespi Date: Tue, 20 Apr 2021 09:26:55 +0200 Subject: [PATCH] fix(win): Try fixing missing imports --- lib/bindings/win/bindings.d.ts | 5 +++++ lib/bindings/win/bindings.d.ts.map | 2 +- lib/bindings/win/bindings.js | 27 ++++++++++++++++-------- lib/bindings/win/bindings.js.map | 2 +- lib/bindings/win/rt-utils.d.ts | 5 +---- lib/bindings/win/rt-utils.d.ts.map | 2 +- lib/bindings/win/rt-utils.js | 10 ++++++++- lib/bindings/win/rt-utils.js.map | 2 +- src/bindings/win/bindings.ts | 34 ++++++++++++++++++++++-------- src/bindings/win/rt-utils.ts | 14 +++++++----- 10 files changed, 71 insertions(+), 32 deletions(-) diff --git a/lib/bindings/win/bindings.d.ts b/lib/bindings/win/bindings.d.ts index 25c6d9c7..6cac908e 100644 --- a/lib/bindings/win/bindings.d.ts +++ b/lib/bindings/win/bindings.d.ts @@ -1,5 +1,8 @@ /// import EventEmitter from 'events'; +declare global { + const Windows: any; +} export interface Radio extends EventEmitter { kind: string; name: string; @@ -14,6 +17,8 @@ export declare class NobleBindings extends EventEmitter { private _advertisementWatcher; private _filterAdvertisementServiceUuids; private _allowAdvertisementDuplicates; + private static isInit; + private static init; static getAdapterList(): Promise; constructor(radio: Radio); init(): void; diff --git a/lib/bindings/win/bindings.d.ts.map b/lib/bindings/win/bindings.d.ts.map index 16c776d9..aa908b15 100644 --- a/lib/bindings/win/bindings.d.ts.map +++ b/lib/bindings/win/bindings.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../src/bindings/win/bindings.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAwClC,MAAM,WAAW,KAAM,SAAQ,YAAY;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd;AA8DD,qBA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E,MAAM,GAAG,IAAI;IAoB9F,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI;IAoB5G,UAAU,CAChB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,GACV,IAAI;IAmBP,OAAO,CAAC,iBAAiB;IA0BzB,OAAO,CAAC,+BAA+B,CAgJrC;IAEF,OAAO,CAAC,8BAA8B,CASpC;IAEF,OAAO,CAAC,0BAA0B,CAchC;IAEF,OAAO,CAAC,sBAAsB;IAkC9B,OAAO,CAAC,6BAA6B;IAgCrC,OAAO,CAAC,yBAAyB;CA2CjC"} \ No newline at end of file diff --git a/lib/bindings/win/bindings.js b/lib/bindings/win/bindings.js index 372a4b1f..1dcba03f 100644 --- a/lib/bindings/win/bindings.js +++ b/lib/bindings/win/bindings.js @@ -36,13 +36,13 @@ exports.NobleBindings = void 0; const events_1 = __importDefault(require("events")); const rt = __importStar(require("./rt-utils")); // Note the load order here is important for cross-namespace dependencies. -rt.using(require('../../../build/Release/win-foundation.node'), 'Windows.Foundation'); -rt.using(require('../../../build/Release/win-storage.streams.node'), 'Windows.Storage.Streams'); -rt.using(require('../../../build/Release/win-dev.enum.node'), 'Windows.Devices.Enumeration'); -rt.using(require('../../../build/Release/win-dev.ble.gap.node'), 'Windows.Devices.Bluetooth.GenericAttributeProfile'); -rt.using(require('../../../build/Release/win-dev.ble.node'), 'Windows.Devices.Bluetooth'); -rt.using(require('../../../build/Release/win-dev.ble.adv.node'), 'Windows.Devices.Bluetooth.Advertisement'); -rt.using(require('../../../build/Release/win-dev.radios.node'), 'Windows.Devices.Radios'); +rt.using('../../../build/Release/win-foundation.node', 'Windows.Foundation'); +rt.using('../../../build/Release/win-storage.streams.node', 'Windows.Storage.Streams'); +rt.using('../../../build/Release/win-dev.enum.node', 'Windows.Devices.Enumeration'); +rt.using('../../../build/Release/win-dev.ble.gap.node', 'Windows.Devices.Bluetooth.GenericAttributeProfile'); +rt.using('../../../build/Release/win-dev.ble.node', 'Windows.Devices.Bluetooth'); +rt.using('../../../build/Release/win-dev.ble.adv.node', 'Windows.Devices.Bluetooth.Advertisement'); +rt.using('../../../build/Release/win-dev.radios.node', 'Windows.Devices.Radios'); const BluetoothLEDevice = Windows.Devices.Bluetooth.BluetoothLEDevice; const BluetoothCacheMode = Windows.Devices.Bluetooth.BluetoothCacheMode; const BluetoothUuidHelper = Windows.Devices.Bluetooth.BluetoothUuidHelper; @@ -53,8 +53,8 @@ const BluetoothLEAdvertisementType = Windows.Devices.Bluetooth.Advertisement.Blu const BluetoothLEAdvertisementDataTypes = Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementDataTypes; const BluetoothLEAdvertisementWatcherStatus = Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcherStatus; const GattCharacteristicProperties = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicProperties; -const GattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService; -const GattServiceUuids = Windows.Devices.Bluetooth.GenericAttributeProfile.GattServiceUuids; +// const GattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService; +// const GattServiceUuids = Windows.Devices.Bluetooth.GenericAttributeProfile.GattServiceUuids; const GattCommunicationStatus = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus; const GattClientCharacteristicConfigurationDescriptorValue = Windows.Devices.Bluetooth.GenericAttributeProfile.GattClientCharacteristicConfigurationDescriptorValue; const Radio = Windows.Devices.Radios.Radio; @@ -221,13 +221,21 @@ class NobleBindings extends events_1.default { }; this._radio = radio; } + static init() { + if (this.isInit) { + return; + } + this.isInit = true; + } static getAdapterList() { return __awaiter(this, void 0, void 0, function* () { + this.init(); const radios = rt.toArray((yield rt.promisify(Radio.getRadiosAsync)())); return radios.filter((radio) => radio.kind === RadioKind.bluetooth); }); } init() { + this.init(); this._advertisementWatcher = new BluetoothLEAdvertisementWatcher(); this._advertisementWatcher.scanningMode = BluetoothLEScanningMode.active; this._advertisementWatcher.on('received', this._onAdvertisementWatcherReceived); @@ -612,6 +620,7 @@ class NobleBindings extends events_1.default { } } exports.NobleBindings = NobleBindings; +NobleBindings.isInit = false; function formatBluetoothAddress(address) { if (!address) { return 'null'; diff --git a/lib/bindings/win/bindings.js.map b/lib/bindings/win/bindings.js.map index a4c96646..954001ac 100644 --- a/lib/bindings/win/bindings.js.map +++ b/lib/bindings/win/bindings.js.map @@ -1 +1 @@ -{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../src/bindings/win/bindings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,oDAAkC;AAIlC,+CAAiC;AAEjC,0EAA0E;AAC1E,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,4CAA4C,CAAC,EAAE,oBAAoB,CAAC,CAAC;AACtF,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,iDAAiD,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAChG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,0CAA0C,CAAC,EAAE,6BAA6B,CAAC,CAAC;AAC7F,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,6CAA6C,CAAC,EAAE,mDAAmD,CAAC,CAAC;AACtH,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,yCAAyC,CAAC,EAAE,2BAA2B,CAAC,CAAC;AAC1F,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,6CAA6C,CAAC,EAAE,yCAAyC,CAAC,CAAC;AAC5G,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,4CAA4C,CAAC,EAAE,wBAAwB,CAAC,CAAC;AAE1F,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS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AAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;KAC5C;AACF,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,WAAW,CAAC,MAAgB;IACpC,OAAO,CAAC,IAAY,EAAE,EAAE;QACvB,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC;AACH,CAAC;AAMD,SAAS,wBAAwB,CAAC,UAAkB,EAAE,MAA2B;IAChF,IAAI,MAAM,CAAC,MAAM,KAAK,uBAAuB,CAAC,WAAW,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,UAAU,CAAC,CAAC;KACrD;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,uBAAuB,CAAC,aAAa,EAAE;QACnE,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,UAAU,CAAC,CAAC;KAC3E;AACF,CAAC"} \ No newline at end of file diff --git a/lib/bindings/win/rt-utils.d.ts b/lib/bindings/win/rt-utils.d.ts index ebb42942..829c2a32 100644 --- a/lib/bindings/win/rt-utils.d.ts +++ b/lib/bindings/win/rt-utils.d.ts @@ -1,8 +1,5 @@ /// -declare global { - const Windows: any; -} -export declare function using(nsPackage: any, ns: string): void; +export declare function using(packageName: string, ns: string): void; export declare function promisify(fn: () => void, o?: unknown): (...args: unknown[]) => Promise; export declare function toArray(o: { length: number; diff --git a/lib/bindings/win/rt-utils.d.ts.map b/lib/bindings/win/rt-utils.d.ts.map index b3163a52..329dae83 100644 --- a/lib/bindings/win/rt-utils.d.ts.map +++ b/lib/bindings/win/rt-utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"rt-utils.d.ts","sourceRoot":"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KAAK,IAAI,IAAI,CAAC;CACd;AAID,wBAAgB,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAyB5E;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAGnF;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAW5C"} \ No newline at end of file diff --git a/lib/bindings/win/rt-utils.js b/lib/bindings/win/rt-utils.js index 766137fd..243e145b 100644 --- a/lib/bindings/win/rt-utils.js +++ b/lib/bindings/win/rt-utils.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.disposeAll = exports.trackDisposables = exports.trackDisposable = exports.keepAlive = exports.fromBuffer = exports.toBuffer = exports.toMap = exports.toArray = exports.promisify = exports.using = void 0; // Relative path to NodeRT-generaged UWP namespace modules. // Require a NodeRt namespace package and load it into the global namespace. -function using(nsPackage, ns) { +function using(packageName, ns) { const nsParts = ns.split('/').slice(-1)[0].split('.'); let parentObj = global; // Build an object tree as necessary for the namespace hierarchy. @@ -17,6 +17,14 @@ function using(nsPackage, ns) { parentObj = nsObj; } const lastNsPart = nsParts[nsParts.length - 1]; + let nsPackage = {}; + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + nsPackage = require(packageName); + } + catch (_a) { + // NO-OP + } // Merge in any already-loaded sub-namespaces. // This allows loading in non-hierarchical order. const nsObj = parentObj[lastNsPart]; diff --git a/lib/bindings/win/rt-utils.js.map b/lib/bindings/win/rt-utils.js.map index b678116f..26ddfc0c 100644 --- a/lib/bindings/win/rt-utils.js.map +++ b/lib/bindings/win/rt-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"rt-utils.js","sourceRoot":"","sources":["../../../src/bindings/win/rt-utils.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;A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AyBC;AAED,SAAgB,gBAAgB,CAAuB,GAAW,EAAE,KAAU;IAC7E,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC;AACd,CAAC;AAHD,4CAGC;AAED,SAAgB,UAAU,CAAC,GAAW;IACrC,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAE1C,IAAI,CAAC,cAAc,EAAE;QACpB,OAAO;KACP;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/C,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;QACrC,UAAU,CAAC,KAAK,EAAE,CAAC;KACnB;AACF,CAAC;AAXD,gCAWC"} \ No newline at end of file diff --git a/src/bindings/win/bindings.ts b/src/bindings/win/bindings.ts index e97a2a38..72b15cb9 100644 --- a/src/bindings/win/bindings.ts +++ b/src/bindings/win/bindings.ts @@ -5,14 +5,18 @@ import { AddressType } from '../../models'; import * as rt from './rt-utils'; +declare global { + const Windows: any; +} + // Note the load order here is important for cross-namespace dependencies. -rt.using(require('../../../build/Release/win-foundation.node'), 'Windows.Foundation'); -rt.using(require('../../../build/Release/win-storage.streams.node'), 'Windows.Storage.Streams'); -rt.using(require('../../../build/Release/win-dev.enum.node'), 'Windows.Devices.Enumeration'); -rt.using(require('../../../build/Release/win-dev.ble.gap.node'), 'Windows.Devices.Bluetooth.GenericAttributeProfile'); -rt.using(require('../../../build/Release/win-dev.ble.node'), 'Windows.Devices.Bluetooth'); -rt.using(require('../../../build/Release/win-dev.ble.adv.node'), 'Windows.Devices.Bluetooth.Advertisement'); -rt.using(require('../../../build/Release/win-dev.radios.node'), 'Windows.Devices.Radios'); +rt.using('../../../build/Release/win-foundation.node', 'Windows.Foundation'); +rt.using('../../../build/Release/win-storage.streams.node', 'Windows.Storage.Streams'); +rt.using('../../../build/Release/win-dev.enum.node', 'Windows.Devices.Enumeration'); +rt.using('../../../build/Release/win-dev.ble.gap.node', 'Windows.Devices.Bluetooth.GenericAttributeProfile'); +rt.using('../../../build/Release/win-dev.ble.node', 'Windows.Devices.Bluetooth'); +rt.using('../../../build/Release/win-dev.ble.adv.node', 'Windows.Devices.Bluetooth.Advertisement'); +rt.using('../../../build/Release/win-dev.radios.node', 'Windows.Devices.Radios'); const BluetoothLEDevice = Windows.Devices.Bluetooth.BluetoothLEDevice; const BluetoothCacheMode = Windows.Devices.Bluetooth.BluetoothCacheMode; @@ -27,8 +31,8 @@ const BluetoothLEAdvertisementWatcherStatus = Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcherStatus; const GattCharacteristicProperties = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicProperties; -const GattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService; -const GattServiceUuids = Windows.Devices.Bluetooth.GenericAttributeProfile.GattServiceUuids; +// const GattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService; +// const GattServiceUuids = Windows.Devices.Bluetooth.GenericAttributeProfile.GattServiceUuids; const GattCommunicationStatus = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus; const GattClientCharacteristicConfigurationDescriptorValue = Windows.Devices.Bluetooth.GenericAttributeProfile.GattClientCharacteristicConfigurationDescriptorValue; @@ -115,7 +119,17 @@ export class NobleBindings extends EventEmitter { private _filterAdvertisementServiceUuids: string[]; private _allowAdvertisementDuplicates: boolean; + private static isInit = false; + private static init() { + if (this.isInit) { + return; + } + + this.isInit = true; + } + public static async getAdapterList(): Promise { + this.init(); const radios = rt.toArray((await rt.promisify(Radio.getRadiosAsync)()) as Radio[]); return radios.filter((radio) => radio.kind === RadioKind.bluetooth); } @@ -127,6 +141,8 @@ export class NobleBindings extends EventEmitter { } public init(): void { + this.init(); + this._advertisementWatcher = new BluetoothLEAdvertisementWatcher(); this._advertisementWatcher.scanningMode = BluetoothLEScanningMode.active; this._advertisementWatcher.on('received', this._onAdvertisementWatcherReceived); diff --git a/src/bindings/win/rt-utils.ts b/src/bindings/win/rt-utils.ts index 77b35ebe..63fdbad4 100644 --- a/src/bindings/win/rt-utils.ts +++ b/src/bindings/win/rt-utils.ts @@ -1,13 +1,9 @@ // Utility functions for working with NodeRT projections. -declare global { - const Windows: any; -} - // Relative path to NodeRT-generaged UWP namespace modules. // Require a NodeRt namespace package and load it into the global namespace. -export function using(nsPackage: any, ns: string): void { +export function using(packageName: string, ns: string): void { const nsParts = ns.split('/').slice(-1)[0].split('.'); let parentObj: any = global; @@ -23,6 +19,14 @@ export function using(nsPackage: any, ns: string): void { const lastNsPart = nsParts[nsParts.length - 1]; + let nsPackage: any = {}; + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + nsPackage = require(packageName); + } catch { + // NO-OP + } + // Merge in any already-loaded sub-namespaces. // This allows loading in non-hierarchical order. const nsObj = parentObj[lastNsPart];