react-native-ble-nitro 1.0.0-beta.5 → 1.0.0-beta.6
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/lib/BleManagerCompatFactory.d.ts +3 -3
- package/lib/BleManagerCompatFactory.js +3 -3
- package/lib/BleManagerFactory.d.ts +2 -2
- package/lib/commonjs/BleManagerCompatFactory.d.ts +3 -3
- package/lib/commonjs/BleManagerCompatFactory.d.ts.map +1 -1
- package/lib/commonjs/BleManagerCompatFactory.js +20 -20
- package/lib/commonjs/BleManagerCompatFactory.js.map +1 -1
- package/lib/commonjs/BleManagerFactory.d.ts +2 -2
- package/lib/commonjs/BleManagerFactory.d.ts.map +1 -1
- package/lib/commonjs/compatibility/constants.d.ts +1 -1
- package/lib/commonjs/compatibility/constants.d.ts.map +1 -1
- package/lib/commonjs/compatibility/constants.js +5 -5
- package/lib/commonjs/compatibility/constants.js.map +1 -1
- package/lib/commonjs/compatibility/deviceWrapper.d.ts +2 -2
- package/lib/commonjs/compatibility/deviceWrapper.d.ts.map +1 -1
- package/lib/commonjs/compatibility/deviceWrapper.js +4 -4
- package/lib/commonjs/compatibility/deviceWrapper.js.map +1 -1
- package/lib/commonjs/compatibility/enums.d.ts +1 -1
- package/lib/commonjs/compatibility/enums.d.ts.map +1 -1
- package/lib/commonjs/compatibility/enums.js +34 -34
- package/lib/commonjs/compatibility/enums.js.map +1 -1
- package/lib/commonjs/compatibility/index.d.ts +5 -5
- package/lib/commonjs/compatibility/index.d.ts.map +1 -1
- package/lib/commonjs/compatibility/index.js +15 -15
- package/lib/commonjs/compatibility/index.js.map +1 -1
- package/lib/commonjs/compatibility/serviceData.d.ts +1 -1
- package/lib/commonjs/compatibility/serviceData.d.ts.map +1 -1
- package/lib/commonjs/errors/BleError.d.ts +2 -2
- package/lib/commonjs/errors/BleError.d.ts.map +1 -1
- package/lib/commonjs/errors/BleError.js +41 -41
- package/lib/commonjs/errors/BleError.js.map +1 -1
- package/lib/commonjs/index.d.ts +10 -10
- package/lib/commonjs/index.d.ts.map +1 -1
- package/lib/commonjs/index.js +16 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/BleManager.nitro.d.ts +1 -1
- package/lib/commonjs/specs/BleManager.nitro.d.ts.map +1 -1
- package/lib/commonjs/specs/Characteristic.nitro.d.ts +1 -1
- package/lib/commonjs/specs/Characteristic.nitro.d.ts.map +1 -1
- package/lib/commonjs/specs/Descriptor.nitro.d.ts +1 -1
- package/lib/commonjs/specs/Descriptor.nitro.d.ts.map +1 -1
- package/lib/commonjs/specs/Device.nitro.d.ts +1 -1
- package/lib/commonjs/specs/Device.nitro.d.ts.map +1 -1
- package/lib/commonjs/specs/Service.nitro.d.ts +1 -1
- package/lib/commonjs/specs/Service.nitro.d.ts.map +1 -1
- package/lib/commonjs/utils/base64.d.ts +1 -1
- package/lib/commonjs/utils/base64.d.ts.map +1 -1
- package/lib/commonjs/utils/index.d.ts +2 -2
- package/lib/commonjs/utils/index.d.ts.map +1 -1
- package/lib/commonjs/utils/index.js +2 -2
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/uuid.d.ts +1 -1
- package/lib/commonjs/utils/uuid.d.ts.map +1 -1
- package/lib/compatibility/constants.d.ts +1 -1
- package/lib/compatibility/constants.js +1 -1
- package/lib/compatibility/deviceWrapper.d.ts +2 -2
- package/lib/compatibility/deviceWrapper.js +2 -2
- package/lib/compatibility/enums.d.ts +1 -1
- package/lib/compatibility/enums.js +1 -1
- package/lib/compatibility/index.d.ts +5 -5
- package/lib/compatibility/index.js +4 -4
- package/lib/compatibility/serviceData.d.ts +1 -1
- package/lib/errors/BleError.d.ts +2 -2
- package/lib/errors/BleError.js +1 -1
- package/lib/index.d.ts +10 -10
- package/lib/index.js +8 -8
- package/lib/specs/BleManager.nitro.d.ts +1 -1
- package/lib/specs/Characteristic.nitro.d.ts +1 -1
- package/lib/specs/Descriptor.nitro.d.ts +1 -1
- package/lib/specs/Device.nitro.d.ts +1 -1
- package/lib/specs/Service.nitro.d.ts +1 -1
- package/lib/utils/base64.d.ts +1 -1
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/index.js +2 -2
- package/lib/utils/uuid.d.ts +1 -1
- package/package.json +2 -2
- package/plugin/build/index.d.ts +1 -1
- package/plugin/build/index.js +5 -5
- package/src/BleManagerCompatFactory.ts +6 -6
- package/src/BleManagerFactory.ts +2 -2
- package/src/__tests__/BleManager.test.ts +2 -2
- package/src/compatibility/constants.ts +1 -1
- package/src/compatibility/deviceWrapper.ts +4 -4
- package/src/compatibility/enums.ts +1 -1
- package/src/compatibility/index.ts +5 -5
- package/src/compatibility/serviceData.ts +1 -1
- package/src/errors/BleError.ts +2 -2
- package/src/index.ts +10 -10
- package/src/specs/BleManager.nitro.ts +1 -1
- package/src/specs/Characteristic.nitro.ts +1 -1
- package/src/specs/Descriptor.nitro.ts +1 -1
- package/src/specs/Device.nitro.ts +1 -1
- package/src/specs/Service.nitro.ts +1 -1
- package/src/utils/base64.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/uuid.ts +1 -1
package/lib/errors/BleError.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './compatibility/constants
|
|
2
|
-
export * from './utils/index
|
|
3
|
-
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory
|
|
4
|
-
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory
|
|
5
|
-
export * from './errors/BleError
|
|
6
|
-
export { DeviceWrapper as Device } from './compatibility/deviceWrapper
|
|
7
|
-
export type { BleManagerOptions, ScanOptions, ConnectionOptions, NativeBleError, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, Subscription } from './specs/types
|
|
8
|
-
export { State, LogLevel } from './compatibility/enums
|
|
9
|
-
export type { CharacteristicSubscriptionType, RefreshGattMoment } from './compatibility/enums
|
|
10
|
-
export { fullUUID } from './utils/uuid
|
|
1
|
+
export * from './compatibility/constants';
|
|
2
|
+
export * from './utils/index';
|
|
3
|
+
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory';
|
|
4
|
+
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory';
|
|
5
|
+
export * from './errors/BleError';
|
|
6
|
+
export { DeviceWrapper as Device } from './compatibility/deviceWrapper';
|
|
7
|
+
export type { BleManagerOptions, ScanOptions, ConnectionOptions, NativeBleError, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, Subscription } from './specs/types';
|
|
8
|
+
export { State, LogLevel } from './compatibility/enums';
|
|
9
|
+
export type { CharacteristicSubscriptionType, RefreshGattMoment } from './compatibility/enums';
|
|
10
|
+
export { fullUUID } from './utils/uuid';
|
package/lib/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// Export compatibility layer types and constants
|
|
2
|
-
export * from './compatibility/constants
|
|
2
|
+
export * from './compatibility/constants';
|
|
3
3
|
// Export utility functions
|
|
4
|
-
export * from './utils/index
|
|
4
|
+
export * from './utils/index';
|
|
5
5
|
// Export the main BleManager instance with compatibility wrapper
|
|
6
|
-
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory
|
|
6
|
+
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory';
|
|
7
7
|
// Export BleManager factory utilities (for internal use by error handling)
|
|
8
|
-
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory
|
|
8
|
+
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory';
|
|
9
9
|
// Export error handling utilities
|
|
10
|
-
export * from './errors/BleError
|
|
10
|
+
export * from './errors/BleError';
|
|
11
11
|
// Export device wrapper for compatibility
|
|
12
|
-
export { DeviceWrapper as Device } from './compatibility/deviceWrapper
|
|
12
|
+
export { DeviceWrapper as Device } from './compatibility/deviceWrapper';
|
|
13
13
|
// Export react-native-ble-plx compatible enum types (drop-in replacement)
|
|
14
|
-
export { State, LogLevel } from './compatibility/enums
|
|
14
|
+
export { State, LogLevel } from './compatibility/enums';
|
|
15
15
|
// Re-export react-native-ble-plx compatible API
|
|
16
|
-
export { fullUUID } from './utils/uuid
|
|
16
|
+
export { fullUUID } from './utils/uuid';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { State, LogLevel, UUID, DeviceId, TransactionId, ConnectionPriority, ScanOptions, ConnectionOptions, StateListener, DeviceScanListener, DeviceDisconnectedListener, CharacteristicMonitorListener, CharacteristicSubscriptionType, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, Base64, Subscription } from './types
|
|
2
|
+
import type { State, LogLevel, UUID, DeviceId, TransactionId, ConnectionPriority, ScanOptions, ConnectionOptions, StateListener, DeviceScanListener, DeviceDisconnectedListener, CharacteristicMonitorListener, CharacteristicSubscriptionType, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, Base64, Subscription } from './types';
|
|
3
3
|
export interface BleManagerNitroOptions {
|
|
4
4
|
restoreStateIdentifier?: string;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { Identifier, UUID, DeviceId, Base64, TransactionId, CharacteristicSubscriptionType, NativeDescriptor, CharacteristicMonitorListener, Subscription } from './types
|
|
2
|
+
import type { Identifier, UUID, DeviceId, Base64, TransactionId, CharacteristicSubscriptionType, NativeDescriptor, CharacteristicMonitorListener, Subscription } from './types';
|
|
3
3
|
export interface Characteristic extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
android: 'kotlin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { Identifier, UUID, DeviceId, Base64, TransactionId } from './types
|
|
2
|
+
import type { Identifier, UUID, DeviceId, Base64, TransactionId } from './types';
|
|
3
3
|
export interface Descriptor extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
android: 'kotlin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { DeviceId, UUID, Base64, TransactionId, ConnectionPriority, ConnectionOptions, CharacteristicSubscriptionType, ServiceDataEntry, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, DeviceDisconnectedListener, CharacteristicMonitorListener, Subscription } from './types
|
|
2
|
+
import type { DeviceId, UUID, Base64, TransactionId, ConnectionPriority, ConnectionOptions, CharacteristicSubscriptionType, ServiceDataEntry, NativeDevice, NativeService, NativeCharacteristic, NativeDescriptor, DeviceDisconnectedListener, CharacteristicMonitorListener, Subscription } from './types';
|
|
3
3
|
export interface Device extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
android: 'kotlin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { Identifier, UUID, DeviceId, Base64, TransactionId, CharacteristicSubscriptionType, NativeCharacteristic, NativeDescriptor, CharacteristicMonitorListener, Subscription } from './types
|
|
2
|
+
import type { Identifier, UUID, DeviceId, Base64, TransactionId, CharacteristicSubscriptionType, NativeCharacteristic, NativeDescriptor, CharacteristicMonitorListener, Subscription } from './types';
|
|
3
3
|
export interface Service extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
android: 'kotlin';
|
package/lib/utils/base64.d.ts
CHANGED
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './uuid
|
|
2
|
-
export * from './base64
|
|
1
|
+
export * from './uuid';
|
|
2
|
+
export * from './base64';
|
package/lib/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './uuid
|
|
2
|
-
export * from './base64
|
|
1
|
+
export * from './uuid';
|
|
2
|
+
export * from './base64';
|
package/lib/utils/uuid.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-ble-nitro",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "High-performance React Native BLE library built on Nitro Modules - drop-in replacement for react-native-ble-plx",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"react-native-nitro-modules": "*"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
+
"@expo/config-plugins": "^10.1.2",
|
|
71
72
|
"@types/jest": "^29.5.0",
|
|
72
73
|
"@types/node": "^20.0.0",
|
|
73
74
|
"@types/react": "^18.2.0",
|
|
74
75
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
75
76
|
"@typescript-eslint/parser": "^6.21.0",
|
|
76
77
|
"eslint": "^8.0.0",
|
|
77
|
-
"expo": "^52.0.47",
|
|
78
78
|
"expo-module-scripts": "^4.1.9",
|
|
79
79
|
"jest": "^29.0.0",
|
|
80
80
|
"nitro-codegen": "^0.26.4",
|
package/plugin/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
import withBleNitro, { withBleNitroAndroid, withBleNitroIOS, type BleNitroPluginProps } from './withBleNitro
|
|
2
|
+
import withBleNitro, { withBleNitroAndroid, withBleNitroIOS, type BleNitroPluginProps } from './withBleNitro';
|
|
3
3
|
/**
|
|
4
4
|
* Expo Config Plugin for react-native-ble-nitro
|
|
5
5
|
*
|
package/plugin/build/index.js
CHANGED
|
@@ -34,10 +34,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.withBleNitroIOS = exports.withBleNitroAndroid = exports.withBleNitro = void 0;
|
|
37
|
-
const
|
|
38
|
-
exports.withBleNitro =
|
|
39
|
-
Object.defineProperty(exports, "withBleNitroAndroid", { enumerable: true, get: function () { return
|
|
40
|
-
Object.defineProperty(exports, "withBleNitroIOS", { enumerable: true, get: function () { return
|
|
37
|
+
const withBleNitro_1 = __importStar(require("./withBleNitro"));
|
|
38
|
+
exports.withBleNitro = withBleNitro_1.default;
|
|
39
|
+
Object.defineProperty(exports, "withBleNitroAndroid", { enumerable: true, get: function () { return withBleNitro_1.withBleNitroAndroid; } });
|
|
40
|
+
Object.defineProperty(exports, "withBleNitroIOS", { enumerable: true, get: function () { return withBleNitro_1.withBleNitroIOS; } });
|
|
41
41
|
/**
|
|
42
42
|
* Expo Config Plugin for react-native-ble-nitro
|
|
43
43
|
*
|
|
@@ -62,6 +62,6 @@ Object.defineProperty(exports, "withBleNitroIOS", { enumerable: true, get: funct
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
const plugin = (config, props) => {
|
|
65
|
-
return (0,
|
|
65
|
+
return (0, withBleNitro_1.default)(config, props || {});
|
|
66
66
|
};
|
|
67
67
|
exports.default = plugin;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* by wrapping the Nitro implementation with compatibility shims
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { createBleManager } from './BleManagerFactory
|
|
9
|
-
import type { BleManager as BleManagerInterface } from './specs/BleManager.nitro
|
|
8
|
+
import { createBleManager } from './BleManagerFactory';
|
|
9
|
+
import type { BleManager as BleManagerInterface } from './specs/BleManager.nitro';
|
|
10
10
|
import type {
|
|
11
11
|
BleManagerOptions,
|
|
12
12
|
UUID,
|
|
@@ -21,16 +21,16 @@ import type {
|
|
|
21
21
|
NativeDescriptor,
|
|
22
22
|
LogLevel,
|
|
23
23
|
Subscription
|
|
24
|
-
} from './specs/types
|
|
25
|
-
import { DeviceWrapper } from './compatibility/deviceWrapper
|
|
24
|
+
} from './specs/types';
|
|
25
|
+
import { DeviceWrapper } from './compatibility/deviceWrapper';
|
|
26
26
|
import {
|
|
27
|
-
stateToString,
|
|
27
|
+
stateToString,
|
|
28
28
|
logLevelToString,
|
|
29
29
|
normalizeLogLevel,
|
|
30
30
|
normalizeCharacteristicSubscriptionType,
|
|
31
31
|
State as PlxState,
|
|
32
32
|
LogLevel as PlxLogLevel
|
|
33
|
-
} from './compatibility/enums
|
|
33
|
+
} from './compatibility/enums';
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
/**
|
package/src/BleManagerFactory.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NitroModules } from 'react-native-nitro-modules';
|
|
2
|
-
import type { BleManager as BleManagerInterface, BleManagerNitroOptions } from './specs/BleManager.nitro
|
|
3
|
-
import type { BleManagerOptions } from './specs/types
|
|
2
|
+
import type { BleManager as BleManagerInterface, BleManagerNitroOptions } from './specs/BleManager.nitro';
|
|
3
|
+
import type { BleManagerOptions } from './specs/types';
|
|
4
4
|
|
|
5
5
|
// Store callbacks that can't be passed to Nitro
|
|
6
6
|
const storedCallbacks = new WeakMap<BleManagerInterface, {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Copyright © 2025 Zyke (https://zyke.co)
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { BleManager } from '../index
|
|
8
|
-
import { State, LogLevel } from '../specs/types
|
|
7
|
+
import { BleManager } from '../index';
|
|
8
|
+
import { State, LogLevel } from '../specs/types';
|
|
9
9
|
|
|
10
10
|
// Create a mock Nitro manager
|
|
11
11
|
const mockNitroManager = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Wraps Nitro Device objects to provide the original react-native-ble-plx API
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { Device as NitroDevice } from '../specs/Device.nitro
|
|
7
|
+
import type { Device as NitroDevice } from '../specs/Device.nitro';
|
|
8
8
|
import type {
|
|
9
9
|
NativeDevice,
|
|
10
10
|
UUID,
|
|
@@ -19,13 +19,13 @@ import type {
|
|
|
19
19
|
NativeDescriptor,
|
|
20
20
|
CharacteristicSubscriptionType,
|
|
21
21
|
Subscription
|
|
22
|
-
} from '../specs/types
|
|
23
|
-
import { serviceDataArrayToMap } from './serviceData
|
|
22
|
+
} from '../specs/types';
|
|
23
|
+
import { serviceDataArrayToMap } from './serviceData';
|
|
24
24
|
import {
|
|
25
25
|
normalizeCharacteristicSubscriptionType,
|
|
26
26
|
stateToString,
|
|
27
27
|
characteristicSubscriptionTypeToString
|
|
28
|
-
} from './enums
|
|
28
|
+
} from './enums';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Device wrapper that provides react-native-ble-plx compatibility
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
LogLevel as NitroLogLevel,
|
|
12
12
|
CharacteristicSubscriptionType as NitroCharacteristicSubscriptionType,
|
|
13
13
|
RefreshGattMoment as NitroRefreshGattMoment,
|
|
14
|
-
} from '../specs/types
|
|
14
|
+
} from '../specs/types';
|
|
15
15
|
|
|
16
16
|
// Define exact string enums and types matching react-native-ble-plx
|
|
17
17
|
export enum State {
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Nitro's type system constraints.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export * from './serviceData
|
|
10
|
-
export * from './deviceWrapper
|
|
11
|
-
export * from './constants
|
|
9
|
+
export * from './serviceData';
|
|
10
|
+
export * from './deviceWrapper';
|
|
11
|
+
export * from './constants';
|
|
12
12
|
|
|
13
13
|
// Explicitly export enum utilities and enums to avoid conflicts
|
|
14
14
|
export {
|
|
@@ -23,10 +23,10 @@ export {
|
|
|
23
23
|
normalizeCharacteristicSubscriptionType,
|
|
24
24
|
State,
|
|
25
25
|
LogLevel
|
|
26
|
-
} from './enums
|
|
26
|
+
} from './enums';
|
|
27
27
|
|
|
28
28
|
// Export type literals (not enums) for exact react-native-ble-plx compatibility
|
|
29
29
|
export type {
|
|
30
30
|
CharacteristicSubscriptionType,
|
|
31
31
|
RefreshGattMoment
|
|
32
|
-
} from './enums
|
|
32
|
+
} from './enums';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and the original { [uuid: string]: Base64 } format from react-native-ble-plx
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ServiceDataEntry, UUID, Base64 } from '../specs/types
|
|
8
|
+
import type { ServiceDataEntry, UUID, Base64 } from '../specs/types';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Convert ServiceDataEntry array to the original index signature format
|
package/src/errors/BleError.ts
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
BleATTErrorCode,
|
|
4
4
|
BleIOSErrorCode,
|
|
5
5
|
BleAndroidErrorCode
|
|
6
|
-
} from '../specs/types
|
|
6
|
+
} from '../specs/types';
|
|
7
7
|
import type {
|
|
8
8
|
NativeBleError,
|
|
9
9
|
BleErrorCodeMessageMapping
|
|
10
|
-
} from '../specs/types
|
|
10
|
+
} from '../specs/types';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Default error messages for BLE error codes
|
package/src/index.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// Export compatibility layer types and constants
|
|
2
|
-
export * from './compatibility/constants
|
|
2
|
+
export * from './compatibility/constants';
|
|
3
3
|
|
|
4
4
|
// Export utility functions
|
|
5
|
-
export * from './utils/index
|
|
5
|
+
export * from './utils/index';
|
|
6
6
|
|
|
7
7
|
// Export the main BleManager instance with compatibility wrapper
|
|
8
|
-
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory
|
|
8
|
+
export { BleManagerCompat as BleManager, createBleManagerCompat as createBleManager } from './BleManagerCompatFactory';
|
|
9
9
|
|
|
10
10
|
// Export BleManager factory utilities (for internal use by error handling)
|
|
11
|
-
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory
|
|
11
|
+
export { getCustomErrorMessage, getStoredCallbacks } from './BleManagerFactory';
|
|
12
12
|
|
|
13
13
|
// Export error handling utilities
|
|
14
|
-
export * from './errors/BleError
|
|
14
|
+
export * from './errors/BleError';
|
|
15
15
|
|
|
16
16
|
// Export device wrapper for compatibility
|
|
17
|
-
export { DeviceWrapper as Device } from './compatibility/deviceWrapper
|
|
17
|
+
export { DeviceWrapper as Device } from './compatibility/deviceWrapper';
|
|
18
18
|
|
|
19
19
|
// Export interfaces for TypeScript (but not runtime values)
|
|
20
20
|
export type {
|
|
@@ -27,19 +27,19 @@ export type {
|
|
|
27
27
|
NativeCharacteristic,
|
|
28
28
|
NativeDescriptor,
|
|
29
29
|
Subscription
|
|
30
|
-
} from './specs/types
|
|
30
|
+
} from './specs/types';
|
|
31
31
|
|
|
32
32
|
// Export react-native-ble-plx compatible enum types (drop-in replacement)
|
|
33
33
|
export {
|
|
34
34
|
State,
|
|
35
35
|
LogLevel
|
|
36
|
-
} from './compatibility/enums
|
|
36
|
+
} from './compatibility/enums';
|
|
37
37
|
|
|
38
38
|
// Export react-native-ble-plx compatible type literals (drop-in replacement)
|
|
39
39
|
export type {
|
|
40
40
|
CharacteristicSubscriptionType,
|
|
41
41
|
RefreshGattMoment
|
|
42
|
-
} from './compatibility/enums
|
|
42
|
+
} from './compatibility/enums';
|
|
43
43
|
|
|
44
44
|
// Re-export react-native-ble-plx compatible API
|
|
45
|
-
export { fullUUID } from './utils/uuid
|
|
45
|
+
export { fullUUID } from './utils/uuid';
|
package/src/utils/base64.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './uuid
|
|
2
|
-
export * from './base64
|
|
1
|
+
export * from './uuid';
|
|
2
|
+
export * from './base64';
|
package/src/utils/uuid.ts
CHANGED