@psdk/device-webusb
Advanced tools
Comparing version 0.2.34 to 0.2.35
@@ -1,2 +0,2 @@ | ||
import { ConnectedDevice, ReadOptions } from "@psdk/frame"; | ||
import { ConnectedDevice, ReadOptions } from "@psdk/frame-father"; | ||
export declare class Webusb { | ||
@@ -3,0 +3,0 @@ private readonly filters; |
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.DeviceFilter = exports.WebusbReadOptions = exports.Webusb = void 0; | ||
const frame_1 = require("@psdk/frame"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class Webusb { | ||
@@ -24,3 +24,3 @@ constructor(options) { | ||
this.interface = (_b = options.interface) !== null && _b !== void 0 ? _b : 0; | ||
this.state = frame_1.ConnectionState.DISCONNECTED; | ||
this.state = frame_father_1.ConnectionState.DISCONNECTED; | ||
this.readEndpoint = (_c = options.readEndpoint) !== null && _c !== void 0 ? _c : 2; | ||
@@ -50,10 +50,10 @@ this.writeEndpoint = (_d = options.writeEndpoint) !== null && _d !== void 0 ? _d : 2; | ||
yield device.claimInterface(device.configuration.interfaces[this.interface].interfaceNumber); | ||
this.state = frame_1.ConnectionState.CONNECTED; | ||
this.state = frame_father_1.ConnectionState.CONNECTED; | ||
// @ts-ignore | ||
navigator.usb.addEventListener('connect', e => { | ||
this.state = frame_1.ConnectionState.CONNECTED; | ||
this.state = frame_father_1.ConnectionState.CONNECTED; | ||
}); | ||
// @ts-ignore | ||
navigator.usb.addEventListener('disconnect', e => { | ||
this.state = frame_1.ConnectionState.DISCONNECTED; | ||
this.state = frame_father_1.ConnectionState.DISCONNECTED; | ||
}); | ||
@@ -74,3 +74,3 @@ this.device = device; | ||
if (!device.opened) { | ||
return frame_1.ConnectionState.DISCONNECTED; | ||
return frame_father_1.ConnectionState.DISCONNECTED; | ||
} | ||
@@ -118,3 +118,3 @@ return _connectionState(); | ||
exports.Webusb = Webusb; | ||
class WebusbReadOptions extends frame_1.ReadOptions { | ||
class WebusbReadOptions extends frame_father_1.ReadOptions { | ||
constructor(options) { | ||
@@ -121,0 +121,0 @@ var _a; |
{ | ||
"name": "@psdk/device-webusb", | ||
"version": "0.2.34", | ||
"version": "0.2.35", | ||
"description": "psdk", | ||
@@ -45,3 +45,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@psdk/frame": "0.2.34" | ||
"@psdk/frame-father": "0.2.35" | ||
}, | ||
@@ -52,3 +52,3 @@ "files": [ | ||
], | ||
"gitHead": "882830c6760f740ac1265cac559df14e3852111d" | ||
"gitHead": "c7f0050eee6537a4f14095d07761f5206cba8d38" | ||
} |
Sorry, the diff of this file is not supported yet
71924
+ Added@psdk/frame-father@0.2.35
+ Added@psdk/frame-father@0.2.35(transitive)
- Removed@psdk/frame@0.2.34
- Removed@psdk/frame@0.2.34(transitive)