unified-ble-manager 4.0.9 → 4.0.11
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/CHANGELOG.md +22 -0
- package/MIGRATION_4.0.md +1 -1
- package/README.md +39 -14
- package/RELEASE.md +44 -2
- package/SBOM.cdx.json +5 -29
- package/THIRD_PARTY_LICENSES.json +2 -9
- package/docs/CONNECTION_MANAGER.md +34 -0
- package/docs/ELECTRON.md +1 -1
- package/docs/EXPO_PLUGIN.md +1 -1
- package/docs/GAPS.4.0.md +1 -1
- package/docs/GETTING_STARTED.md +3 -3
- package/docs/NODE.md +1 -1
- package/docs/WEB.md +215 -75
- package/docs/generated/PLATFORM_SUPPORT.md +1 -1
- package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js +5 -4
- package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js.map +1 -1
- package/lib/commonjs/implementation-version.js +1 -1
- package/lib/commonjs/implementation-version.js.map +1 -1
- package/lib/module/backends/corebluetooth/corebluetooth-handles.js +5 -4
- package/lib/module/backends/corebluetooth/corebluetooth-handles.js.map +1 -1
- package/lib/module/implementation-version.js +1 -1
- package/lib/module/implementation-version.js.map +1 -1
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-handles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation-version.d.ts +1 -1
- package/lib/typescript/commonjs/src/implementation-version.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
- package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-handles.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
- package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
- package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts +1 -1
- package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation-version.d.ts +1 -1
- package/lib/typescript/module/src/implementation-version.d.ts.map +1 -1
- package/native/PREBUILDS.json +5 -5
- package/native/electron/corebluetooth/prebuilds/darwin-arm64/unified_ble_corebluetooth.node +0 -0
- package/native/electron/corebluetooth/prebuilds/darwin-x64/unified_ble_corebluetooth.node +0 -0
- package/native/electron/winrt/prebuilds/win32-arm64/unified_ble_winrt.node +0 -0
- package/native/electron/winrt/prebuilds/win32-x64/unified_ble_winrt.node +0 -0
- package/package.json +6 -4
- package/src/backends/corebluetooth/corebluetooth-handles.ts +5 -4
- package/src/implementation-version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,28 @@ All notable changes to `unified-ble-manager` are documented here.
|
|
|
6
6
|
|
|
7
7
|
No changes yet.
|
|
8
8
|
|
|
9
|
+
## [4.0.11] - 2026-08-30
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
- Document adapter interruption recovery through `manager.adapter.watchState()`
|
|
14
|
+
in the README and connection guide, and add the same flow to the Expo
|
|
15
|
+
example. UBM invalidates affected generations and leaves reconnect policy
|
|
16
|
+
with the host; the example displays live adapter power, availability, and
|
|
17
|
+
authorization instead of polling or silently reconnecting.
|
|
18
|
+
|
|
19
|
+
## [4.0.10] - 2026-08-30
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
|
|
23
|
+
- Preserve the originating native platform details when a shared direct-GATT
|
|
24
|
+
cleanup failure is normalized. React Native Android adapter-loss diagnostics
|
|
25
|
+
now retain their Android domain and code instead of being mislabeled as
|
|
26
|
+
CoreBluetooth; Apple retains its CoreBluetooth domain, and host-neutral
|
|
27
|
+
cleanup records keep the same public operation and retry-ownership contract.
|
|
28
|
+
- Build the complete package during `prepare`, so an explicitly pinned Git
|
|
29
|
+
release branch exposes the same public entrypoints as the packed artifact.
|
|
30
|
+
|
|
9
31
|
## [4.0.9] - 2026-08-29
|
|
10
32
|
|
|
11
33
|
### Documentation
|
package/MIGRATION_4.0.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Migrating from react-native-ble-plx
|
|
4
4
|
|
|
5
|
-
This source targets `4.0.
|
|
5
|
+
This source targets `4.0.11`. The `4.0.0` release is a new package and a new contract. It is **not a source-compatible rename**. There is no `new BleManager()` facade, no Base64 characteristic values, and no public transaction IDs.
|
|
6
6
|
|
|
7
7
|
This page is for a React Native app that already uses `react-native-ble-plx`. Web, Electron, Node, and Tauri are new hosts — use those pages after you understand the RN rewrite.
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ root import does not pick a radio. Package SemVer and backend support labels are
|
|
|
12
12
|
independent: each radio backend keeps its evidence-derived label. See
|
|
13
13
|
[`docs/PLATFORMS.md`](docs/PLATFORMS.md).
|
|
14
14
|
|
|
15
|
-
This source tree is versioned `4.0.
|
|
15
|
+
This source tree is versioned `4.0.11`. Install the exact version shown in the npm
|
|
16
16
|
registry. During release preparation, the version in `package.json` can be ahead
|
|
17
17
|
of npm until the matching tag-driven workflow publishes it; the registry and
|
|
18
18
|
GitHub release remain authoritative.
|
|
@@ -62,7 +62,7 @@ The root import selects no radio. Import the host you actually run.
|
|
|
62
62
|
| ---------------------------------------- | ------------------------------------------------------------------------------ |
|
|
63
63
|
| `unified-ble-manager` | Host-neutral manager, handles, helpers, and shared types |
|
|
64
64
|
| `unified-ble-manager/react-native` | React Native Android / Apple manager |
|
|
65
|
-
| `unified-ble-manager/react`
|
|
65
|
+
| `unified-ble-manager/react` | React provider, hooks, and React-facing type utilities |
|
|
66
66
|
| `unified-ble-manager/expo` | Expo development-build manager, readiness, and native configuration checks |
|
|
67
67
|
| `unified-ble-manager/web` | Web Bluetooth chooser + matched manager |
|
|
68
68
|
| `unified-ble-manager/electron/main` | Trusted Electron-main radio + IPC router |
|
|
@@ -106,6 +106,31 @@ On Android, `manager.peers.bonded()` lists paired system peers and
|
|
|
106
106
|
reachable. See [`docs/PEERS.md`](docs/PEERS.md) for the persistence and error
|
|
107
107
|
semantics.
|
|
108
108
|
|
|
109
|
+
### Recovering after an adapter interruption
|
|
110
|
+
|
|
111
|
+
Adapter power and authorization changes are observable through the same public
|
|
112
|
+
contract on every backend:
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
const watch = await manager.adapter.watchState()
|
|
116
|
+
let previous = watch.initial
|
|
117
|
+
for await (const item of watch.values) {
|
|
118
|
+
if (item.kind !== 'value') continue
|
|
119
|
+
const state = item.value
|
|
120
|
+
const restored = previous.power !== 'on' && state.power === 'on'
|
|
121
|
+
previous = state
|
|
122
|
+
if (restored && state.availability === 'available' && state.authorization === 'granted') {
|
|
123
|
+
// Reconcile your saved peer/reference and reconnect using your product policy.
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
await watch.stop()
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
UBM invalidates affected connections when the adapter is unavailable and does
|
|
130
|
+
not reconnect silently. The host observes `watchState()`, resolves a fresh
|
|
131
|
+
peer/reference, and starts a new connection generation. Do not poll, create a
|
|
132
|
+
second manager, or reuse old GATT/database handles.
|
|
133
|
+
|
|
109
134
|
### Expo plugin
|
|
110
135
|
|
|
111
136
|
Use an Expo development build, never Expo Go. Plugin options live in
|
|
@@ -174,7 +199,7 @@ try {
|
|
|
174
199
|
|
|
175
200
|
Battery Level and Heart Rate Control Point are optional or conditional; see [`docs/TUTORIALS.md`](docs/TUTORIALS.md). Persistent subscriptions also live there.
|
|
176
201
|
|
|
177
|
-
Web Bluetooth replaces the scan with `ble.choose(...)` from a user gesture. Tauri and the Electron renderer use different host entrypoints — see those host pages.
|
|
202
|
+
Web Bluetooth replaces the scan with `ble.choose(...)` from a user gesture. The [complete Web Bluetooth guide](docs/WEB.md) and [TypeScript/Vite example](example-web/) cover chooser permissions, authorized peers, bounded operations, notifications, structured errors, and safe cleanup. Tauri and the Electron renderer use different host entrypoints — see those host pages.
|
|
178
203
|
|
|
179
204
|
## Why the API looks like this
|
|
180
205
|
|
|
@@ -293,17 +318,17 @@ after disconnect, service change, or rediscovery.
|
|
|
293
318
|
|
|
294
319
|
### Host factories
|
|
295
320
|
|
|
296
|
-
| Factory | Returns
|
|
297
|
-
| -------------------------------------------------------------------------------------- |
|
|
298
|
-
| `createReactNativeBleManager` | Zero-plumbing public React Native manager
|
|
299
|
-
| `createReactNativeBleManagerWithEnvironment` | Injectable RN factory for tests
|
|
300
|
-
| `createExpoBleManager` | Expo development-build manager with readiness and native configuration checks
|
|
301
|
-
| `createWebBleManager` | Zero-plumbing public Web manager; use `ble.choose()` from a user gesture
|
|
302
|
-
| `createCoreBluetoothBleManager` / `createWinRtBleManager` / `createBluezBleManager` | One-call Node managers
|
|
303
|
-
| `createElectronMainCoreBluetoothBackendProvider` / `WinRt` | Main-process provider; you still build a `BleManager`
|
|
304
|
-
| `createElectronRendererBleManager` / `createElectronRendererBleManagerWithEnvironment` | Public renderer `BleManager` over a preload transport; the renderer never loads a radio backend
|
|
305
|
-
| `createTauriBleManager` | Zero-plumbing Tauri `BleManager`; tests use `createTauriBleManagerWithEnvironment`
|
|
306
|
-
| `createBleManagerFromProvider` | Advanced provider construction
|
|
321
|
+
| Factory | Returns |
|
|
322
|
+
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
323
|
+
| `createReactNativeBleManager` | Zero-plumbing public React Native manager |
|
|
324
|
+
| `createReactNativeBleManagerWithEnvironment` | Injectable RN factory for tests |
|
|
325
|
+
| `createExpoBleManager` | Expo development-build manager with readiness and native configuration checks |
|
|
326
|
+
| `createWebBleManager` | Zero-plumbing public Web manager; use `ble.choose()` from a user gesture |
|
|
327
|
+
| `createCoreBluetoothBleManager` / `createWinRtBleManager` / `createBluezBleManager` | One-call Node managers |
|
|
328
|
+
| `createElectronMainCoreBluetoothBackendProvider` / `WinRt` | Main-process provider; you still build a `BleManager` |
|
|
329
|
+
| `createElectronRendererBleManager` / `createElectronRendererBleManagerWithEnvironment` | Public renderer `BleManager` over a preload transport; the renderer never loads a radio backend |
|
|
330
|
+
| `createTauriBleManager` | Zero-plumbing Tauri `BleManager`; tests use `createTauriBleManagerWithEnvironment` |
|
|
331
|
+
| `createBleManagerFromProvider` | Advanced provider construction |
|
|
307
332
|
| `createPublicBleManagerFacade` | Projects an already-owned `/advanced` manager into the root public `BleManager`; creates no advanced manager, backend, or radio |
|
|
308
333
|
|
|
309
334
|
## Other hosts
|
package/RELEASE.md
CHANGED
|
@@ -81,7 +81,7 @@ Active `4.0.0-rc.*` release-train candidates publish to npm `latest` so a bare `
|
|
|
81
81
|
|
|
82
82
|
On release day, set `release_candidate` to the exact candidate required by the
|
|
83
83
|
release plan. RC2, RC3, RC4, `4.0.0-rc.4.1`, and RC5 are already immutable
|
|
84
|
-
once tagged. Stable `4.0.0` through `4.0.
|
|
84
|
+
once tagged. Stable `4.0.0` through `4.0.10` are immutable. `4.0.11` is the current train head.
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
87
|
release_candidate=4.0.0-rc.N
|
|
@@ -133,6 +133,48 @@ The `v4.0.3` tag is immutable published history. Do not recreate or move it.
|
|
|
133
133
|
git tag -a v4.0.3 -m "v4.0.3"
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
## Releasing 4.0.11
|
|
137
|
+
|
|
138
|
+
The `v4.0.11` tag must identify the exact current `main` commit after canonical
|
|
139
|
+
CI passes. Do not tag this feature branch directly.
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
git fetch origin --tags
|
|
143
|
+
git checkout main
|
|
144
|
+
git pull --ff-only origin main
|
|
145
|
+
|
|
146
|
+
test "$(git branch --show-current)" = "main"
|
|
147
|
+
test "$(node -p "require('./package.json').version")" = "4.0.11"
|
|
148
|
+
git diff --exit-code
|
|
149
|
+
git diff --cached --exit-code
|
|
150
|
+
|
|
151
|
+
git tag -a v4.0.11 -m "v4.0.11"
|
|
152
|
+
git push origin v4.0.11
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Before tagging, confirm release-note extraction finds `## [4.0.11]`.
|
|
156
|
+
|
|
157
|
+
## Releasing 4.0.10
|
|
158
|
+
|
|
159
|
+
The `v4.0.10` tag must identify the exact current `main` commit after canonical
|
|
160
|
+
CI passes. Do not tag this release branch directly.
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
git fetch origin --tags
|
|
164
|
+
git checkout main
|
|
165
|
+
git pull --ff-only origin main
|
|
166
|
+
|
|
167
|
+
test "$(git branch --show-current)" = "main"
|
|
168
|
+
test "$(node -p "require('./package.json').version")" = "4.0.10"
|
|
169
|
+
git diff --exit-code
|
|
170
|
+
git diff --cached --exit-code
|
|
171
|
+
|
|
172
|
+
git tag -a v4.0.10 -m "v4.0.10"
|
|
173
|
+
git push origin v4.0.10
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Before tagging, confirm release-note extraction finds `## [4.0.10]`.
|
|
177
|
+
|
|
136
178
|
## Releasing 4.0.9
|
|
137
179
|
|
|
138
180
|
The `v4.0.9` tag must identify the exact current `main` commit after canonical
|
|
@@ -256,7 +298,7 @@ a green publish job and a package a consumer can actually install are not the
|
|
|
256
298
|
same claim.
|
|
257
299
|
|
|
258
300
|
```sh
|
|
259
|
-
version=4.0.
|
|
301
|
+
version=4.0.11
|
|
260
302
|
|
|
261
303
|
npm view "unified-ble-manager@$version" version
|
|
262
304
|
npm view unified-ble-manager dist-tags --json
|
package/SBOM.cdx.json
CHANGED
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
"metadata": {
|
|
7
7
|
"component": {
|
|
8
8
|
"type": "library",
|
|
9
|
-
"bom-ref": "pkg:npm/unified-ble-manager@4.0.
|
|
9
|
+
"bom-ref": "pkg:npm/unified-ble-manager@4.0.11",
|
|
10
10
|
"name": "unified-ble-manager",
|
|
11
|
-
"version": "4.0.
|
|
11
|
+
"version": "4.0.11",
|
|
12
12
|
"licenses": [
|
|
13
13
|
{
|
|
14
14
|
"expression": "Apache-2.0"
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
|
-
"purl": "pkg:npm/unified-ble-manager@4.0.
|
|
17
|
+
"purl": "pkg:npm/unified-ble-manager@4.0.11"
|
|
18
18
|
},
|
|
19
19
|
"properties": [
|
|
20
20
|
{
|
|
21
21
|
"name": "unified-ble-manager:pnpm-lock-sha256",
|
|
22
|
-
"value": "
|
|
22
|
+
"value": "58c2b09c18f10de1e250a357e5ce9445fe6bcace614e3778bc60166b9db31fa1"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "unified-ble-manager:dependency-scope",
|
|
@@ -66,25 +66,6 @@
|
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
{
|
|
70
|
-
"type": "library",
|
|
71
|
-
"bom-ref": "pkg:npm/%40tauri-apps/api@2.11.1",
|
|
72
|
-
"group": "@tauri-apps",
|
|
73
|
-
"name": "api",
|
|
74
|
-
"version": "2.11.1",
|
|
75
|
-
"licenses": [
|
|
76
|
-
{
|
|
77
|
-
"expression": "Apache-2.0 OR MIT"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"purl": "pkg:npm/%40tauri-apps/api@2.11.1",
|
|
81
|
-
"properties": [
|
|
82
|
-
{
|
|
83
|
-
"name": "unified-ble-manager:license-source",
|
|
84
|
-
"value": "package-metadata"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
69
|
{
|
|
89
70
|
"type": "library",
|
|
90
71
|
"bom-ref": "pkg:npm/abbrev@4.0.0",
|
|
@@ -457,10 +438,6 @@
|
|
|
457
438
|
"pkg:npm/minipass@7.1.3"
|
|
458
439
|
]
|
|
459
440
|
},
|
|
460
|
-
{
|
|
461
|
-
"ref": "pkg:npm/%40tauri-apps/api@2.11.1",
|
|
462
|
-
"dependsOn": []
|
|
463
|
-
},
|
|
464
441
|
{
|
|
465
442
|
"ref": "pkg:npm/abbrev@4.0.0",
|
|
466
443
|
"dependsOn": []
|
|
@@ -560,10 +537,9 @@
|
|
|
560
537
|
"dependsOn": []
|
|
561
538
|
},
|
|
562
539
|
{
|
|
563
|
-
"ref": "pkg:npm/unified-ble-manager@4.0.
|
|
540
|
+
"ref": "pkg:npm/unified-ble-manager@4.0.11",
|
|
564
541
|
"dependsOn": [
|
|
565
542
|
"pkg:npm/%40babel/runtime@7.29.7",
|
|
566
|
-
"pkg:npm/%40tauri-apps/api@2.11.1",
|
|
567
543
|
"pkg:npm/node-addon-api@8.9.0",
|
|
568
544
|
"pkg:npm/node-gyp@12.4.0"
|
|
569
545
|
]
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"schemaVersion": "1.0.0",
|
|
5
5
|
"package": {
|
|
6
6
|
"name": "unified-ble-manager",
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.11"
|
|
8
8
|
},
|
|
9
9
|
"source": {
|
|
10
10
|
"method": "pnpm-lock production graph with installed-manifest license audit",
|
|
11
11
|
"lockfile": "pnpm-lock.yaml",
|
|
12
|
-
"lockfileSha256": "
|
|
12
|
+
"lockfileSha256": "58c2b09c18f10de1e250a357e5ce9445fe6bcace614e3778bc60166b9db31fa1"
|
|
13
13
|
},
|
|
14
14
|
"reviewedOverrides": [
|
|
15
15
|
{
|
|
@@ -41,13 +41,6 @@
|
|
|
41
41
|
"licenseSource": "package-metadata",
|
|
42
42
|
"purl": "pkg:npm/%40isaacs/fs-minipass@4.0.1"
|
|
43
43
|
},
|
|
44
|
-
{
|
|
45
|
-
"name": "@tauri-apps/api",
|
|
46
|
-
"version": "2.11.1",
|
|
47
|
-
"license": "Apache-2.0 OR MIT",
|
|
48
|
-
"licenseSource": "package-metadata",
|
|
49
|
-
"purl": "pkg:npm/%40tauri-apps/api@2.11.1"
|
|
50
|
-
},
|
|
51
44
|
{
|
|
52
45
|
"name": "abbrev",
|
|
53
46
|
"version": "4.0.0",
|
|
@@ -95,6 +95,40 @@ reconnect. See [`BACKGROUND.md`](BACKGROUND.md) and
|
|
|
95
95
|
[`EXPO_PLUGIN.md`](EXPO_PLUGIN.md). Electron renderer resources remain owned by
|
|
96
96
|
their authorized renderer lease; the main process owns the physical backend.
|
|
97
97
|
|
|
98
|
+
## Adapter interruption and recovery
|
|
99
|
+
|
|
100
|
+
An adapter power transition is not a peer disappearance. UBM publishes the
|
|
101
|
+
typed transition through `manager.adapter.watchState()` and invalidates active
|
|
102
|
+
connection generations while the adapter is unavailable. This behavior is
|
|
103
|
+
shared by the React Native Android, React Native Apple, BlueZ, WinRT, Electron,
|
|
104
|
+
Tauri, and Web backends wherever the platform exposes adapter state.
|
|
105
|
+
|
|
106
|
+
The application remains the reconnect authority:
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
const watch = await manager.adapter.watchState()
|
|
110
|
+
let prior = watch.initial
|
|
111
|
+
for await (const item of watch.values) {
|
|
112
|
+
if (item.kind !== 'value') continue
|
|
113
|
+
const current = item.value
|
|
114
|
+
const becameReady = prior.power !== 'on'
|
|
115
|
+
&& current.power === 'on'
|
|
116
|
+
&& current.availability === 'available'
|
|
117
|
+
&& current.authorization === 'granted'
|
|
118
|
+
prior = current
|
|
119
|
+
if (becameReady) {
|
|
120
|
+
// Resolve a fresh peer/reference and invoke the caller-owned retry policy.
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
await watch.stop()
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Do not create a second manager or reuse a connection/database from before the
|
|
127
|
+
adapter loss. A backend may report a cleanup retry while native operations are
|
|
128
|
+
settling; wait for a ready state and retry the application operation with a new
|
|
129
|
+
generation. Backends that cannot observe a given adapter transition expose the
|
|
130
|
+
truthful snapshot they have and never fabricate reconnect behavior.
|
|
131
|
+
|
|
98
132
|
## Cleanup failures
|
|
99
133
|
|
|
100
134
|
Cleanup records are data. A `release-failed` result retains retry ownership and
|
package/docs/ELECTRON.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Main owns the radio. The renderer uses a versioned IPC client and never loads a native addon.
|
|
6
6
|
|
|
7
|
-
This source targets `4.0.
|
|
7
|
+
This source targets `4.0.11`. Tagged releases ship Node-API v8 prebuilds covering macOS and Windows `arm64`/`x64` for both Node and modern Electron.
|
|
8
8
|
|
|
9
9
|
`unified-ble-manager/electron/main` and
|
|
10
10
|
`unified-ble-manager/electron/renderer` are the only Electron entrypoints.
|
package/docs/EXPO_PLUGIN.md
CHANGED
|
@@ -7,7 +7,7 @@ start a radio, request runtime permissions during prebuild, or prove physical
|
|
|
7
7
|
radio/restoration reliability. Expo Go is not a supported BLE execution
|
|
8
8
|
environment because it cannot contain this native module.
|
|
9
9
|
|
|
10
|
-
Use the v2 plugin options in this `4.0.
|
|
10
|
+
Use the v2 plugin options in this `4.0.11` source. Those options match
|
|
11
11
|
the schema introduced at `4.0.0-rc.4`. Expo Go cannot load this native module.
|
|
12
12
|
|
|
13
13
|
## Installation and development build
|
package/docs/GAPS.4.0.md
CHANGED
|
@@ -14,7 +14,7 @@ This file tracks platform code, CI, package, lab, and live-radio evidence. It do
|
|
|
14
14
|
|
|
15
15
|
The clean-baseline contract, unified core, public manager, deterministic backend, TCK, native protocol, first-party backend implementations, host-isolated package exports, SDK/CLI, and legacy-absence gates exist in the 4.0 source. Passing deterministic, compile, ABI, or package tests are implementation proof; they do not become physical-radio support evidence unless a retained record proves the corresponding live scenario.
|
|
16
16
|
|
|
17
|
-
This source targets `unified-ble-manager@4.0.
|
|
17
|
+
This source targets `unified-ble-manager@4.0.11`; the npm registry and release
|
|
18
18
|
provenance, not a source version string, determine whether it is published.
|
|
19
19
|
Earlier stable releases remain immutable published history. Backend support labels remain
|
|
20
20
|
evidence-derived. This package does not rewrite the evidence inventory: a backend remains at the support level
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
This page gets you to a first scan, connect, read, notify, and teardown on React Native. Other hosts are linked at the bottom. The root import does not turn Bluetooth on.
|
|
6
6
|
|
|
7
|
-
This source targets `4.0.
|
|
7
|
+
This source targets `4.0.11`; verify the published version in the npm registry.
|
|
8
8
|
|
|
9
9
|
## Pick a host
|
|
10
10
|
|
|
@@ -38,11 +38,11 @@ request runtime permissions on Android 12+, add
|
|
|
38
38
|
#### Expo / CNG v2
|
|
39
39
|
|
|
40
40
|
The Expo v2 schema and `unified-ble-manager/expo` factory are in this source.
|
|
41
|
-
After the npm registry lists `4.0.
|
|
41
|
+
After the npm registry lists `4.0.11`, install that exact version and keep it in
|
|
42
42
|
your lockfile while validating the native build:
|
|
43
43
|
|
|
44
44
|
```sh
|
|
45
|
-
pnpm add unified-ble-manager@4.0.
|
|
45
|
+
pnpm add unified-ble-manager@4.0.11
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
The package does not run in Expo Go.
|
package/docs/NODE.md
CHANGED
|
@@ -10,7 +10,7 @@ The root import does not open an adapter. Pick one backend:
|
|
|
10
10
|
| `unified-ble-manager/node/winrt` | Windows |
|
|
11
11
|
| `unified-ble-manager/node/bluez` | Linux (needs `dbus-next@^0.10.2` in the app) |
|
|
12
12
|
|
|
13
|
-
This source targets `4.0.
|
|
13
|
+
This source targets `4.0.11`. Tagged releases ship Node-API v8 prebuilds for macOS and Windows on `arm64` and `x64`. A normal install should not compile native code. BlueZ talks D-Bus and has no addon.
|
|
14
14
|
|
|
15
15
|
## One-call factories
|
|
16
16
|
|