@psdk/device-bluetooth-traits
Advanced tools
Comparing version 0.5.12 to 0.5.13
@@ -10,6 +10,7 @@ "use strict"; | ||
static isAllowServices(serviceUUID, allowServices) { | ||
var _a; | ||
if (allowServices == undefined) | ||
return true; | ||
for (const allowService of allowServices) { | ||
const rule = allowService.rule ?? types_1.AllowRule.EQUALS; | ||
const rule = (_a = allowService.rule) !== null && _a !== void 0 ? _a : types_1.AllowRule.EQUALS; | ||
switch (rule) { | ||
@@ -16,0 +17,0 @@ case types_1.AllowRule.EQUALS: { |
@@ -5,5 +5,2 @@ "use strict"; | ||
class JluetoothDevice { | ||
origin; | ||
name; | ||
deviceId; | ||
constructor(options) { | ||
@@ -10,0 +7,0 @@ this.origin = options.origin; |
@@ -1,2 +0,2 @@ | ||
var a=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var i in e)a(r,i,{get:e[i],enumerable:!0})},f=(r,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!b.call(r,t)&&t!==i&&a(r,t,{get:()=>e[t],enumerable:!(o=l(e,t))||o.enumerable});return r};var p=r=>f(a({},"__esModule",{value:!0}),r);var S={};v(S,{AllowRule:()=>c,Jluetooth:()=>n,JluetoothDevice:()=>s,TBluetoothHelpers:()=>d});module.exports=p(S);var n=class{async isDiscovery(){return(await this.bluetoothAdapterState()).discovering||!1}};var s=class{origin;name;deviceId;constructor(e){this.origin=e.origin,this.name=e.name,this.deviceId=e.deviceId}},c=(t=>(t.EQUALS="EQUALS",t.START_WITH="START_WITH",t.END_WITH="END_WITH",t.REGEX="REGEX",t))(c||{});var d=class{static isAllowService(e,i){return this.isAllowServices(e,i&&[i])}static isAllowServices(e,i){var o;if(i==null)return!0;for(let t of i)switch((o=t.rule)!=null?o:"EQUALS"){case"EQUALS":{if(e==t.uuid)return!0;break}case"START_WITH":{if(e.startsWith(t.uuid))return!0;break}case"END_WITH":{if(e.endsWith(t.uuid))return!0;break}case"REGEX":{if(new RegExp(t.uuid).test(e))return!0;break}}}}; | ||
var a=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var i in e)a(r,i,{get:e[i],enumerable:!0})},f=(r,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!b.call(r,t)&&t!==i&&a(r,t,{get:()=>e[t],enumerable:!(o=l(e,t))||o.enumerable});return r};var p=r=>f(a({},"__esModule",{value:!0}),r);var S={};v(S,{AllowRule:()=>c,Jluetooth:()=>n,JluetoothDevice:()=>s,TBluetoothHelpers:()=>d});module.exports=p(S);var n=class{async isDiscovery(){return(await this.bluetoothAdapterState()).discovering||!1}};var s=class{constructor(e){this.origin=e.origin,this.name=e.name,this.deviceId=e.deviceId}},c=(t=>(t.EQUALS="EQUALS",t.START_WITH="START_WITH",t.END_WITH="END_WITH",t.REGEX="REGEX",t))(c||{});var d=class{static isAllowService(e,i){return this.isAllowServices(e,i&&[i])}static isAllowServices(e,i){var o;if(i==null)return!0;for(let t of i)switch((o=t.rule)!=null?o:"EQUALS"){case"EQUALS":{if(e==t.uuid)return!0;break}case"START_WITH":{if(e.startsWith(t.uuid))return!0;break}case"END_WITH":{if(e.endsWith(t.uuid))return!0;break}case"REGEX":{if(new RegExp(t.uuid).test(e))return!0;break}}}}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@psdk/device-bluetooth-traits", | ||
"version": "0.5.12", | ||
"version": "0.5.13", | ||
"description": "psdk", | ||
@@ -27,3 +27,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@psdk/frame-father": "0.5.12", | ||
"@psdk/frame-father": "0.5.13", | ||
"await-timeout": "^1.1.1" | ||
@@ -36,3 +36,3 @@ }, | ||
], | ||
"gitHead": "bb30f7d6c858f5fd7afa620cae11b594fe4aa9f7" | ||
"gitHead": "79e71d930b142e5849dd7d6061562530060ead31" | ||
} |
Sorry, the diff of this file is not supported yet
15735
187
+ Added@psdk/frame-father@0.5.13(transitive)
- Removed@psdk/frame-father@0.5.12(transitive)
Updated@psdk/frame-father@0.5.13