@stoprocent/bleno 0.10.3 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -13
- package/index.d.ts +6 -6
- package/lib/bleno.js +4 -4
- package/package.json +2 -2
- package/prebuilds/darwin-x64+arm64/@stoprocent+bleno.node +0 -0
- package/prebuilds/win32-ia32/@stoprocent+bleno.node +0 -0
- package/prebuilds/win32-x64/@stoprocent+bleno.node +0 -0
- package/FUNDING.yml +0 -15
package/README.md
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
# bleno
|
|
2
2
|
|
|
3
|
-
[
|
|
8
|
-
[](MIT)
|
|
11
|
-
[](
|
|
14
|
-
https://www.npmjs.com/package/@stoprocent/bleno
|
|
15
|
-
)
|
|
3
|
+
[](https://www.npmjs.com/package/@stoprocent/bleno)
|
|
4
|
+
[](https://www.npmjs.com/package/@stoprocent/bleno)
|
|
16
5
|
|
|
17
6
|
A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals.
|
|
18
7
|
|
package/index.d.ts
CHANGED
|
@@ -51,12 +51,12 @@ declare module '@stoprocent/bleno' {
|
|
|
51
51
|
|
|
52
52
|
constructor(options: CharacteristicOptions);
|
|
53
53
|
|
|
54
|
-
onIndicate:
|
|
55
|
-
onNotify:
|
|
56
|
-
onReadRequest:
|
|
57
|
-
onSubscribe:
|
|
58
|
-
onUnsubscribe:
|
|
59
|
-
onWriteRequest:
|
|
54
|
+
onIndicate(handle: ConnectionHandle): void;
|
|
55
|
+
onNotify(handle: ConnectionHandle): void;
|
|
56
|
+
onReadRequest(handle: ConnectionHandle, offset: number, callback: ReadRequestCallback): void;
|
|
57
|
+
onSubscribe(handle: ConnectionHandle, maxValueSize: number, updateValueCallback: UpdateValueCallback): void;
|
|
58
|
+
onUnsubscribe(handle: ConnectionHandle): void;
|
|
59
|
+
onWriteRequest(handle: ConnectionHandle, data: Buffer, offset: number, withoutResponse: boolean, callback: WriteRequestCallback): void;
|
|
60
60
|
|
|
61
61
|
toString(): string;
|
|
62
62
|
|
package/lib/bleno.js
CHANGED
|
@@ -76,11 +76,11 @@ class Bleno extends EventEmitter {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
async waitForPoweredOnAsync (timeout = 10000) {
|
|
79
|
-
if (this.state === 'poweredOn') {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
79
|
return new Promise((resolve, reject) => {
|
|
80
|
+
if (this.state === 'poweredOn') {
|
|
81
|
+
resolve();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
84
|
const timeoutId = setTimeout(() => {
|
|
85
85
|
this.removeListener('stateChange', stateChangeHandler);
|
|
86
86
|
reject(new Error(`Timeout waiting for poweredOn state. Current state: ${this.state}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoprocent/bleno",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"node-gyp-build": "^4.8.4"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@stoprocent/bluetooth-hci-socket": "^2.
|
|
72
|
+
"@stoprocent/bluetooth-hci-socket": "^2.2.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/FUNDING.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
-
polar: # Replace with a single Polar username
|
|
13
|
-
buy_me_a_coffee: stoprocent # Replace with a single Buy Me a Coffee username
|
|
14
|
-
thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|