@capacitor-community/bluetooth-le 7.0.0 → 7.1.0
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/CapacitorCommunityBluetoothLe.podspec +17 -17
- package/LICENSE +21 -21
- package/README.md +95 -26
- package/android/build.gradle +68 -68
- package/android/src/main/AndroidManifest.xml +22 -22
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/BluetoothLe.kt +1061 -1009
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/Conversion.kt +51 -51
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/Device.kt +720 -718
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/DeviceList.kt +28 -28
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/DeviceScanner.kt +189 -189
- package/dist/docs.json +892 -78
- package/dist/esm/bleClient.d.ts +277 -277
- package/dist/esm/bleClient.js +349 -349
- package/dist/esm/bleClient.js.map +1 -1
- package/dist/esm/config.d.ts +53 -53
- package/dist/esm/config.js +2 -2
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/conversion.d.ts +34 -34
- package/dist/esm/conversion.js +84 -84
- package/dist/esm/conversion.js.map +1 -1
- package/dist/esm/definitions.d.ts +301 -292
- package/dist/esm/definitions.js +42 -42
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugin.d.ts +2 -2
- package/dist/esm/plugin.js +4 -4
- package/dist/esm/plugin.js.map +1 -1
- package/dist/esm/queue.d.ts +3 -3
- package/dist/esm/queue.js +17 -17
- package/dist/esm/queue.js.map +1 -1
- package/dist/esm/timeout.d.ts +1 -1
- package/dist/esm/timeout.js +9 -9
- package/dist/esm/timeout.js.map +1 -1
- package/dist/esm/validators.d.ts +1 -1
- package/dist/esm/validators.js +11 -11
- package/dist/esm/validators.js.map +1 -1
- package/dist/esm/web.d.ts +56 -56
- package/dist/esm/web.js +340 -335
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +841 -834
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +841 -834
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Conversion.swift +83 -83
- package/ios/Plugin/Device.swift +423 -423
- package/ios/Plugin/DeviceManager.swift +401 -349
- package/ios/Plugin/Info.plist +24 -24
- package/ios/Plugin/Logging.swift +8 -8
- package/ios/Plugin/Plugin.h +10 -10
- package/ios/Plugin/Plugin.m +41 -41
- package/ios/Plugin/Plugin.swift +682 -636
- package/ios/Plugin/ThreadSafeDictionary.swift +13 -13
- package/package.json +101 -101
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
class ThreadSafeDictionary<K: Hashable, T> {
|
|
2
|
-
private var dictionary: [K: T] = [:]
|
|
3
|
-
private let queue = DispatchQueue(label: "threadSafeDictionaryQueue", attributes: .concurrent)
|
|
4
|
-
|
|
5
|
-
subscript(key: K) -> T? {
|
|
6
|
-
get {
|
|
7
|
-
return queue.sync { dictionary[key] }
|
|
8
|
-
}
|
|
9
|
-
set {
|
|
10
|
-
queue.async(flags: .barrier) { self.dictionary[key] = newValue }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
class ThreadSafeDictionary<K: Hashable, T> {
|
|
2
|
+
private var dictionary: [K: T] = [:]
|
|
3
|
+
private let queue = DispatchQueue(label: "threadSafeDictionaryQueue", attributes: .concurrent)
|
|
4
|
+
|
|
5
|
+
subscript(key: K) -> T? {
|
|
6
|
+
get {
|
|
7
|
+
return queue.sync { dictionary[key] }
|
|
8
|
+
}
|
|
9
|
+
set {
|
|
10
|
+
queue.async(flags: .barrier) { self.dictionary[key] = newValue }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@capacitor-community/bluetooth-le",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "Capacitor plugin for Bluetooth Low Energy ",
|
|
5
|
-
"main": "dist/plugin.cjs.js",
|
|
6
|
-
"module": "dist/esm/index.js",
|
|
7
|
-
"types": "dist/esm/index.d.ts",
|
|
8
|
-
"unpkg": "dist/plugin.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
11
|
-
"verify:ios": "set -o pipefail && cd ios && pod install && xcodebuild clean build test -workspace Plugin.xcworkspace -scheme Plugin -destination \"platform=iOS Simulator,name=iPhone 16\" | xcpretty && cd ..",
|
|
12
|
-
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
13
|
-
"verify:web": "npm run test:coverage && npm run build",
|
|
14
|
-
"lint": "npm run eslint && npm run prettier -- --check && npm run lint:ios",
|
|
15
|
-
"lint:ios": "npm run swiftlint -- lint ios",
|
|
16
|
-
"lint:android": "cd android && ./gradlew clean lint && cd ..",
|
|
17
|
-
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- lint --fix --format ios",
|
|
18
|
-
"eslint": "eslint . --ext ts",
|
|
19
|
-
"prettier": "prettier \"**/*.{css,html,ts,js}\"",
|
|
20
|
-
"swiftlint": "node-swiftlint",
|
|
21
|
-
"docgen": "docgen --api BleClientInterface --output-readme README.md --output-json dist/docs.json",
|
|
22
|
-
"postdocgen": "prettier README.md --write",
|
|
23
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
24
|
-
"clean": "rimraf ./dist",
|
|
25
|
-
"watch": "tsc --watch",
|
|
26
|
-
"prepublishOnly": "npm run build",
|
|
27
|
-
"test": "jest",
|
|
28
|
-
"test:coverage": "jest --coverage",
|
|
29
|
-
"test:watch": "jest --watch",
|
|
30
|
-
"version:dev": "npm version --no-git-tag-version $(git describe)",
|
|
31
|
-
"release": "standard-version",
|
|
32
|
-
"release:minor": "standard-version -r minor",
|
|
33
|
-
"release:major": "standard-version -r major"
|
|
34
|
-
},
|
|
35
|
-
"author": "pwespi",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@types/web-bluetooth": "^0.0.20"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@capacitor/android": "^7.0.0",
|
|
42
|
-
"@capacitor/cli": "^7.0.0",
|
|
43
|
-
"@capacitor/core": "^7.0.0",
|
|
44
|
-
"@capacitor/docgen": "^0.3.0",
|
|
45
|
-
"@capacitor/ios": "^7.0.0",
|
|
46
|
-
"@ionic/eslint-config": "^0.4.0",
|
|
47
|
-
"@ionic/prettier-config": "^4.0.0",
|
|
48
|
-
"@ionic/swiftlint-config": "^2.0.0",
|
|
49
|
-
"@types/jest": "^29.2.5",
|
|
50
|
-
"eslint": "^8.57.0",
|
|
51
|
-
"jest": "^29.3.1",
|
|
52
|
-
"jest-environment-jsdom": "^29.3.1",
|
|
53
|
-
"prettier": "^3.4.2",
|
|
54
|
-
"rimraf": "^6.0.1",
|
|
55
|
-
"rollup": "^4.30.1",
|
|
56
|
-
"standard-version": "^9.5.0",
|
|
57
|
-
"swiftlint": "^2.0.0",
|
|
58
|
-
"ts-jest": "^29.0.3",
|
|
59
|
-
"typescript": "~4.9.4"
|
|
60
|
-
},
|
|
61
|
-
"peerDependencies": {
|
|
62
|
-
"@capacitor/core": ">=7.0.0"
|
|
63
|
-
},
|
|
64
|
-
"files": [
|
|
65
|
-
"android/src/main/",
|
|
66
|
-
"android/build.gradle",
|
|
67
|
-
"dist/",
|
|
68
|
-
"ios/Plugin/",
|
|
69
|
-
"CapacitorCommunityBluetoothLe.podspec"
|
|
70
|
-
],
|
|
71
|
-
"keywords": [
|
|
72
|
-
"capacitor",
|
|
73
|
-
"plugin",
|
|
74
|
-
"native",
|
|
75
|
-
"bluetooth"
|
|
76
|
-
],
|
|
77
|
-
"capacitor": {
|
|
78
|
-
"ios": {
|
|
79
|
-
"src": "ios"
|
|
80
|
-
},
|
|
81
|
-
"android": {
|
|
82
|
-
"src": "android"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"prettier": "@ionic/prettier-config",
|
|
86
|
-
"swiftlint": "@ionic/swiftlint-config",
|
|
87
|
-
"eslintConfig": {
|
|
88
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
89
|
-
},
|
|
90
|
-
"repository": {
|
|
91
|
-
"type": "git",
|
|
92
|
-
"url": "https://github.com/capacitor-community/bluetooth-le"
|
|
93
|
-
},
|
|
94
|
-
"bugs": {
|
|
95
|
-
"url": "https://github.com/capacitor-community/bluetooth-le/issues"
|
|
96
|
-
},
|
|
97
|
-
"volta": {
|
|
98
|
-
"node": "22.13.1",
|
|
99
|
-
"npm": "11.0.0"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@capacitor-community/bluetooth-le",
|
|
3
|
+
"version": "7.1.0",
|
|
4
|
+
"description": "Capacitor plugin for Bluetooth Low Energy ",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"unpkg": "dist/plugin.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
11
|
+
"verify:ios": "set -o pipefail && cd ios && pod install && xcodebuild clean build test -workspace Plugin.xcworkspace -scheme Plugin -destination \"platform=iOS Simulator,name=iPhone 16\" | xcpretty && cd ..",
|
|
12
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
13
|
+
"verify:web": "npm run test:coverage && npm run build",
|
|
14
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run lint:ios",
|
|
15
|
+
"lint:ios": "npm run swiftlint -- lint ios",
|
|
16
|
+
"lint:android": "cd android && ./gradlew clean lint && cd ..",
|
|
17
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- lint --fix --format ios",
|
|
18
|
+
"eslint": "eslint . --ext ts",
|
|
19
|
+
"prettier": "prettier \"**/*.{css,html,ts,js}\"",
|
|
20
|
+
"swiftlint": "node-swiftlint",
|
|
21
|
+
"docgen": "docgen --api BleClientInterface --output-readme README.md --output-json dist/docs.json",
|
|
22
|
+
"postdocgen": "prettier README.md --write",
|
|
23
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
24
|
+
"clean": "rimraf ./dist",
|
|
25
|
+
"watch": "tsc --watch",
|
|
26
|
+
"prepublishOnly": "npm run build",
|
|
27
|
+
"test": "jest",
|
|
28
|
+
"test:coverage": "jest --coverage",
|
|
29
|
+
"test:watch": "jest --watch",
|
|
30
|
+
"version:dev": "npm version --no-git-tag-version $(git describe)",
|
|
31
|
+
"release": "standard-version",
|
|
32
|
+
"release:minor": "standard-version -r minor",
|
|
33
|
+
"release:major": "standard-version -r major"
|
|
34
|
+
},
|
|
35
|
+
"author": "pwespi",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@types/web-bluetooth": "^0.0.20"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@capacitor/android": "^7.0.0",
|
|
42
|
+
"@capacitor/cli": "^7.0.0",
|
|
43
|
+
"@capacitor/core": "^7.0.0",
|
|
44
|
+
"@capacitor/docgen": "^0.3.0",
|
|
45
|
+
"@capacitor/ios": "^7.0.0",
|
|
46
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
47
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
48
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
49
|
+
"@types/jest": "^29.2.5",
|
|
50
|
+
"eslint": "^8.57.0",
|
|
51
|
+
"jest": "^29.3.1",
|
|
52
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
53
|
+
"prettier": "^3.4.2",
|
|
54
|
+
"rimraf": "^6.0.1",
|
|
55
|
+
"rollup": "^4.30.1",
|
|
56
|
+
"standard-version": "^9.5.0",
|
|
57
|
+
"swiftlint": "^2.0.0",
|
|
58
|
+
"ts-jest": "^29.0.3",
|
|
59
|
+
"typescript": "~4.9.4"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@capacitor/core": ">=7.0.0"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"android/src/main/",
|
|
66
|
+
"android/build.gradle",
|
|
67
|
+
"dist/",
|
|
68
|
+
"ios/Plugin/",
|
|
69
|
+
"CapacitorCommunityBluetoothLe.podspec"
|
|
70
|
+
],
|
|
71
|
+
"keywords": [
|
|
72
|
+
"capacitor",
|
|
73
|
+
"plugin",
|
|
74
|
+
"native",
|
|
75
|
+
"bluetooth"
|
|
76
|
+
],
|
|
77
|
+
"capacitor": {
|
|
78
|
+
"ios": {
|
|
79
|
+
"src": "ios"
|
|
80
|
+
},
|
|
81
|
+
"android": {
|
|
82
|
+
"src": "android"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"prettier": "@ionic/prettier-config",
|
|
86
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
87
|
+
"eslintConfig": {
|
|
88
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
89
|
+
},
|
|
90
|
+
"repository": {
|
|
91
|
+
"type": "git",
|
|
92
|
+
"url": "https://github.com/capacitor-community/bluetooth-le"
|
|
93
|
+
},
|
|
94
|
+
"bugs": {
|
|
95
|
+
"url": "https://github.com/capacitor-community/bluetooth-le/issues"
|
|
96
|
+
},
|
|
97
|
+
"volta": {
|
|
98
|
+
"node": "22.13.1",
|
|
99
|
+
"npm": "11.0.0"
|
|
100
|
+
}
|
|
101
|
+
}
|