diff --git a/gulpfile.js b/gulpfile.js index 5f7433e..8c23359 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,7 +22,6 @@ var typesDir = "types"; // Browser bundles var bundleDir = "dist"; var bundleGlobal = "SecureDfu"; -var bundleIgnore = "webbluetooth"; var watching = false; @@ -81,7 +80,6 @@ gulp.task("bundle", ["compile"], () => { return browserify(nodeDir, { standalone: bundleGlobal }) - .ignore(bundleIgnore) .bundle() .on("error", handleError) .pipe(source(`${fileName}.js`)) diff --git a/package.json b/package.json index 02f78b3..a822187 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ }, "devDependencies": { "@types/node": "^8.0.54", + "@types/web-bluetooth": "0.0.4", "browserify": "^15.0.0", "crc-32": "^1.0.2", "del": "^3.0.0", @@ -47,9 +48,7 @@ "tslint-eslint-rules": "^4.1.1", "typescript": "^2.6.2", "vinyl-buffer": "^1.0.1", - "vinyl-source-stream": "^2.0.0" - }, - "dependencies": { - "webbluetooth": "^1.0.1" + "vinyl-source-stream": "^2.0.0", + "webbluetooth": "^1.0.2" } } diff --git a/src/secure-dfu.ts b/src/secure-dfu.ts index aeaa948..dd010cd 100644 --- a/src/secure-dfu.ts +++ b/src/secure-dfu.ts @@ -23,16 +23,8 @@ * SOFTWARE. */ -import { Bluetooth, BluetoothDevice } from "webbluetooth"; -import { BluetoothRemoteGATTCharacteristic } from "webbluetooth"; import { EventDispatcher } from "./dispatcher"; -declare global { - interface Navigator { - bluetooth: any; - } -} - const CONTROL_UUID = "8ec90001-f315-4f60-9fb8-838830daea50"; const PACKET_UUID = "8ec90002-f315-4f60-9fb8-838830daea50"; const BUTTON_UUID = "8ec90003-f315-4f60-9fb8-838830daea50";