@react-native-ohos/react-native-ble-plx 3.5.1-rc.1
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/LICENSE +202 -0
- package/README.OpenSource +11 -0
- package/README.md +9 -0
- package/app.plugin.js +1 -0
- package/harmony/rn_bleplx/BuildProfile.ets +9 -0
- package/harmony/rn_bleplx/build-profile.json5 +8 -0
- package/harmony/rn_bleplx/hvigorfile.ts +6 -0
- package/harmony/rn_bleplx/index.ets +5 -0
- package/harmony/rn_bleplx/obfuscation-rules.txt +18 -0
- package/harmony/rn_bleplx/oh-package.json5 +13 -0
- package/harmony/rn_bleplx/src/main/cpp/CMakeLists.txt +9 -0
- package/harmony/rn_bleplx/src/main/cpp/generated/BlePlx.cpp +64 -0
- package/harmony/rn_bleplx/src/main/cpp/generated/BlePlx.h +21 -0
- package/harmony/rn_bleplx/src/main/cpp/generated/BlePlxRNOHGeneratedPackage.h +76 -0
- package/harmony/rn_bleplx/src/main/ets/BleDevice.ts +79 -0
- package/harmony/rn_bleplx/src/main/ets/BleModule.ts +1208 -0
- package/harmony/rn_bleplx/src/main/ets/BlePlxInterface.ts +7 -0
- package/harmony/rn_bleplx/src/main/ets/BlePlxModule.ts +226 -0
- package/harmony/rn_bleplx/src/main/ets/BlePlxPackage.ts +26 -0
- package/harmony/rn_bleplx/src/main/ets/Characteristic.ts +159 -0
- package/harmony/rn_bleplx/src/main/ets/CommonConstants.ts +10 -0
- package/harmony/rn_bleplx/src/main/ets/Descriptor.ts +123 -0
- package/harmony/rn_bleplx/src/main/ets/Service.ts +65 -0
- package/harmony/rn_bleplx/src/main/ets/common/BleError.ts +70 -0
- package/harmony/rn_bleplx/src/main/ets/common/BleErrorToJsObjectConverter.ts +43 -0
- package/harmony/rn_bleplx/src/main/ets/common/BleEvent.ts +13 -0
- package/harmony/rn_bleplx/src/main/ets/common/BleUtils.ts +66 -0
- package/harmony/rn_bleplx/src/main/ets/common/IdGenerator.ts +29 -0
- package/harmony/rn_bleplx/src/main/ets/common/IdGeneratorKey.ts +50 -0
- package/harmony/rn_bleplx/src/main/ets/common/InstanceIdGenerator.ts +17 -0
- package/harmony/rn_bleplx/src/main/ets/common/Logger.ts +64 -0
- package/harmony/rn_bleplx/src/main/ets/common/PermissionHandler.ts +78 -0
- package/harmony/rn_bleplx/src/main/ets/common/ServiceFactory.ts +17 -0
- package/harmony/rn_bleplx/src/main/ets/generated/components/ts.ts +8 -0
- package/harmony/rn_bleplx/src/main/ets/generated/index.ets +8 -0
- package/harmony/rn_bleplx/src/main/ets/generated/ts.ts +9 -0
- package/harmony/rn_bleplx/src/main/ets/generated/turboModules/BlePlx.ts +105 -0
- package/harmony/rn_bleplx/src/main/ets/generated/turboModules/ts.ts +8 -0
- package/harmony/rn_bleplx/src/main/module.json5 +7 -0
- package/harmony/rn_bleplx/ts.ts +6 -0
- package/harmony/rn_bleplx.har +0 -0
- package/package.json +181 -0
- package/src/BleError.js +555 -0
- package/src/BleManager.js +1324 -0
- package/src/BleModule.js +857 -0
- package/src/Characteristic.js +180 -0
- package/src/Descriptor.js +83 -0
- package/src/Device.js +378 -0
- package/src/NativeBlePlx.ts +101 -0
- package/src/Service.js +204 -0
- package/src/TypeDefinition.js +365 -0
- package/src/Utils.js +29 -0
- package/src/index.d.ts +2126 -0
- package/src/index.js +20 -0
package/package.json
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-ble-plx",
|
|
3
|
+
"version": "3.5.1-rc.1",
|
|
4
|
+
"description": "React Native Bluetooth Low Energy library",
|
|
5
|
+
"main": "src/index",
|
|
6
|
+
"module": "src/index",
|
|
7
|
+
"types": "src/index.d.ts",
|
|
8
|
+
"react-native": "src/index",
|
|
9
|
+
"source": "src/index",
|
|
10
|
+
"overrides": {
|
|
11
|
+
"@react-native/codegen": "0.74.0"
|
|
12
|
+
},
|
|
13
|
+
"harmony": {
|
|
14
|
+
"alias": "react-native-ble-plx"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"src",
|
|
18
|
+
"lib",
|
|
19
|
+
"android",
|
|
20
|
+
"ios",
|
|
21
|
+
"cpp",
|
|
22
|
+
"harmony",
|
|
23
|
+
"plugin/build",
|
|
24
|
+
"app.plugin.js",
|
|
25
|
+
"*.podspec",
|
|
26
|
+
"!lib/typescript/example",
|
|
27
|
+
"!ios/build",
|
|
28
|
+
"!android/build",
|
|
29
|
+
"!android/gradle",
|
|
30
|
+
"!android/gradlew",
|
|
31
|
+
"!android/gradlew.bat",
|
|
32
|
+
"!android/local.properties",
|
|
33
|
+
"!**/__tests__",
|
|
34
|
+
"!**/__fixtures__",
|
|
35
|
+
"!**/__mocks__",
|
|
36
|
+
"!**/.*"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "babel src/ -d lib/",
|
|
40
|
+
"test": "yarn test:package ; yarn test:example ; yarn test:plugin",
|
|
41
|
+
"test:package": "jest --config jest.config.js --passWithNoTests",
|
|
42
|
+
"test:example": "jest --config example/jest.config.js",
|
|
43
|
+
"docs": "documentation build src/index.js -o docs --config documentation.yml -f html",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"lint": "flow && eslint \"**/*.{js,ts,tsx}\" && documentation lint index.js && yarn typecheck",
|
|
46
|
+
"release": "release-it",
|
|
47
|
+
"example": "yarn --cwd example",
|
|
48
|
+
"test:expo": "cd test_project && npx expo prebuild",
|
|
49
|
+
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
50
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build plugin/build lib",
|
|
51
|
+
"build:plugin": "tsc --build plugin",
|
|
52
|
+
"clean:plugin": "expo-module clean plugin",
|
|
53
|
+
"test:plugin": "jest --config plugin/jest.config.js",
|
|
54
|
+
"lint:plugin": "eslint plugin/src/*",
|
|
55
|
+
"codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name rn_bleplx --cpp-output-path ../harmony/rn_bleplx/src/main/cpp/generated --ets-output-path ../harmony/rn_bleplx/src/main/ets/generated --turbo-modules-spec-paths ./src"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"react-native",
|
|
59
|
+
"ios",
|
|
60
|
+
"android",
|
|
61
|
+
"React",
|
|
62
|
+
"Native",
|
|
63
|
+
"Bluetooth",
|
|
64
|
+
"Low",
|
|
65
|
+
"Energy",
|
|
66
|
+
"BLE"
|
|
67
|
+
],
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "git+https://github.com/react-native-oh-library/react-native-ble-plx.git"
|
|
71
|
+
},
|
|
72
|
+
"author": "dotintent (https://withintent.com/)",
|
|
73
|
+
"license": "MIT",
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/dotintent/react-native-ble-plx/issues"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/dotintent/react-native-ble-plx#readme",
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"registry": "https://registry.npmjs.org/"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@babel/cli": "^7.22.15",
|
|
83
|
+
"@babel/core": "^7.22.20",
|
|
84
|
+
"@babel/preset-flow": "^7.22.15",
|
|
85
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
86
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
87
|
+
"@react-native-community/cli": "^15.0.1",
|
|
88
|
+
"@react-native-community/eslint-config": "^3.0.2",
|
|
89
|
+
"@react-native/eslint-config": "^0.73.1",
|
|
90
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
91
|
+
"@types/jest": "^29.5.5",
|
|
92
|
+
"@types/react": "^18.2.44",
|
|
93
|
+
"@types/react-native": "0.70.0",
|
|
94
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
95
|
+
"babel-plugin-syntax-hermes-parser": "^0.15.1",
|
|
96
|
+
"commitlint": "^17.0.2",
|
|
97
|
+
"del-cli": "^5.1.0",
|
|
98
|
+
"documentation": "^12.3.0",
|
|
99
|
+
"eslint": "^8.51.0",
|
|
100
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
101
|
+
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
102
|
+
"eslint-config-prettier": "^9.0.0",
|
|
103
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
104
|
+
"eslint-plugin-ft-flow": "^2.0.1",
|
|
105
|
+
"eslint-plugin-import": "^2.28.1",
|
|
106
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
107
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
108
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
109
|
+
"expo-module-scripts": "^3.1.0",
|
|
110
|
+
"flow-bin": "^0.203.1",
|
|
111
|
+
"hermes-eslint": "^0.15.1",
|
|
112
|
+
"jest": "^29.7.0",
|
|
113
|
+
"pod-install": "^0.1.0",
|
|
114
|
+
"prettier": "^3.0.3",
|
|
115
|
+
"react": "18.3.1",
|
|
116
|
+
"react-native": "0.77.1",
|
|
117
|
+
"react-native-builder-bob": "^0.20.0",
|
|
118
|
+
"release-it": "^17.3.0",
|
|
119
|
+
"turbo": "^1.10.7",
|
|
120
|
+
"typescript": "^5.2.2",
|
|
121
|
+
"@react-native-oh/react-native-harmony-cli": "file:packages/rnoh-react-native-harmony-cli-0.77.10.tgz"
|
|
122
|
+
},
|
|
123
|
+
"resolutions": {
|
|
124
|
+
"@types/react": "^18.2.44"
|
|
125
|
+
},
|
|
126
|
+
"dependencies": {
|
|
127
|
+
"@expo/config-plugins": "^7.2.5 || ^8.0.0",
|
|
128
|
+
"react-native-ble-plx": "3.5.0"
|
|
129
|
+
},
|
|
130
|
+
"peerDependencies": {
|
|
131
|
+
"react": "*",
|
|
132
|
+
"react-native": "*"
|
|
133
|
+
},
|
|
134
|
+
"engines": {
|
|
135
|
+
"node": ">= 16.0.0"
|
|
136
|
+
},
|
|
137
|
+
"jest": {
|
|
138
|
+
"preset": "react-native",
|
|
139
|
+
"modulePathIgnorePatterns": [
|
|
140
|
+
"<rootDir>/integration-tests",
|
|
141
|
+
"<rootDir>/example/node_modules",
|
|
142
|
+
"<rootDir>/lib/"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"commitlint": {
|
|
146
|
+
"extends": [
|
|
147
|
+
"@commitlint/config-conventional"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"release-it": {
|
|
151
|
+
"git": {
|
|
152
|
+
"commitMessage": "chore: release ${version}",
|
|
153
|
+
"tagName": "v${version}"
|
|
154
|
+
},
|
|
155
|
+
"npm": {
|
|
156
|
+
"publish": true
|
|
157
|
+
},
|
|
158
|
+
"github": {
|
|
159
|
+
"release": true
|
|
160
|
+
},
|
|
161
|
+
"plugins": {
|
|
162
|
+
"@release-it/conventional-changelog": {
|
|
163
|
+
"preset": "angular"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"react-native-builder-bob": {
|
|
168
|
+
"source": "src",
|
|
169
|
+
"output": "lib",
|
|
170
|
+
"targets": [
|
|
171
|
+
"commonjs",
|
|
172
|
+
"module",
|
|
173
|
+
[
|
|
174
|
+
"typescript",
|
|
175
|
+
{
|
|
176
|
+
"project": "tsconfig.build.json"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|