@regulaforensics/face-sdk 8.2.812-beta → 8.2.818-nightly
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/RNFaceSDK.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/examples/capacitor/package-lock.json +29 -29
- package/examples/capacitor/package.json +2 -2
- package/examples/ionic/package-lock.json +1006 -851
- package/examples/ionic/package.json +2 -2
- package/examples/react_native/package-lock.json +1173 -1439
- package/examples/react_native/package.json +2 -2
- package/ios/CDVFaceSDK.swift +18 -19
- package/ios/Decoder.swift +9 -9
- package/ios/RNFaceSDK.swift +11 -11
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/package-lock.json +1 -1
- package/www/cordova.js +6 -6
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"start": "expo start"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/face-sdk": "8.2.
|
|
12
|
-
"@regulaforensics/face-core-basic": "8.
|
|
11
|
+
"@regulaforensics/face-sdk": "8.2.818-nightly",
|
|
12
|
+
"@regulaforensics/face-core-basic": "8.2.431-nightly",
|
|
13
13
|
"react-native": "^0.81.4",
|
|
14
14
|
"react-native-fs": "^2.20.0",
|
|
15
15
|
"react-native-image-picker": "^8.2.1",
|
package/ios/CDVFaceSDK.swift
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
var eventCallbackIds: [String: String] = [:]
|
|
2
|
-
private var this: CDVFaceSDK?
|
|
3
|
-
|
|
4
|
-
func sendEvent(_ event: String, _ data: Any? = "") {
|
|
5
|
-
var callbackId = event
|
|
6
|
-
let eventId = eventCallbackIds[event]
|
|
7
|
-
if eventId != nil { callbackId = eventId! }
|
|
8
|
-
|
|
9
|
-
// In this section unreasonable casts and optionals are made to
|
|
10
|
-
// ensure that this code works with both cordova-ios@7 and cordova-ios@8.
|
|
11
|
-
var sendable = data.toSendable()
|
|
12
|
-
if sendable is NSNull { sendable = "" }
|
|
13
|
-
let message = sendable as! String
|
|
14
|
-
let result: CDVPluginResult? = CDVPluginResult(status: CDVCommandStatus.ok, messageAs: message)
|
|
15
|
-
result!.setKeepCallbackAs(true)
|
|
16
|
-
|
|
17
|
-
this!.commandDelegate.send(result!, callbackId: callbackId)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
1
|
@objc(CDVFaceSDK)
|
|
21
2
|
class CDVFaceSDK: CDVPlugin {
|
|
22
3
|
@objc(exec:)
|
|
@@ -34,6 +15,24 @@ class CDVFaceSDK: CDVPlugin {
|
|
|
34
15
|
}
|
|
35
16
|
}
|
|
36
17
|
|
|
18
|
+
var this: CDVFaceSDK?
|
|
19
|
+
var eventCallbackIds: [String: String] = [:]
|
|
20
|
+
func sendEvent(_ event: String, _ data: Any? = "") {
|
|
21
|
+
var callbackId = event
|
|
22
|
+
let eventId = eventCallbackIds[event]
|
|
23
|
+
if eventId != nil { callbackId = eventId! }
|
|
24
|
+
|
|
25
|
+
// In this section unreasonable casts and optionals are made to
|
|
26
|
+
// ensure that this code works with both cordova-ios@7 and cordova-ios@8.
|
|
27
|
+
var sendable = data.toSendable()
|
|
28
|
+
if sendable is NSNull { sendable = "" }
|
|
29
|
+
let message = sendable as! String
|
|
30
|
+
let result: CDVPluginResult? = CDVPluginResult(status: CDVCommandStatus.ok, messageAs: message)
|
|
31
|
+
result!.setKeepCallbackAs(true)
|
|
32
|
+
|
|
33
|
+
this!.commandDelegate.send(result!, callbackId: callbackId)
|
|
34
|
+
}
|
|
35
|
+
|
|
37
36
|
let rootViewController: () -> UIViewController? = {
|
|
38
37
|
return UIApplication.shared.connectedScenes
|
|
39
38
|
.compactMap { $0 as? UIWindowScene }
|
package/ios/Decoder.swift
CHANGED
|
@@ -95,7 +95,7 @@ public extension FaceCaptureResponse {
|
|
|
95
95
|
Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
96
96
|
alloc, sel,
|
|
97
97
|
Image.decode(it["image"]),
|
|
98
|
-
nil
|
|
98
|
+
nil
|
|
99
99
|
)})
|
|
100
100
|
}
|
|
101
101
|
func encode() -> [String: Any?] {
|
|
@@ -122,7 +122,7 @@ public extension LivenessResponse {
|
|
|
122
122
|
it["estimatedAge"],
|
|
123
123
|
it["liveness"] as! Int,
|
|
124
124
|
UIImage.decode(it["image"]),
|
|
125
|
-
nil
|
|
125
|
+
nil
|
|
126
126
|
)})
|
|
127
127
|
}
|
|
128
128
|
func encode() -> [String: Any?] {
|
|
@@ -304,7 +304,7 @@ public extension MatchFacesDetection {
|
|
|
304
304
|
it["imageIndex"],
|
|
305
305
|
MatchFacesImage.decode(it["image"]),
|
|
306
306
|
(it["faces"] as? [Any])?.map { MatchFacesDetectionFace.decode($0) },
|
|
307
|
-
nil
|
|
307
|
+
nil
|
|
308
308
|
)})
|
|
309
309
|
}
|
|
310
310
|
func encode() -> [String: Any?] {
|
|
@@ -366,7 +366,7 @@ public extension MatchFacesResponse {
|
|
|
366
366
|
alloc, sel,
|
|
367
367
|
(it["results"] as? [Any])?.map { MatchFacesComparedFacesPair.decode($0) },
|
|
368
368
|
(it["detections"] as? [Any])?.map { MatchFacesDetection.decode($0) },
|
|
369
|
-
nil
|
|
369
|
+
nil
|
|
370
370
|
)}) as MatchFacesResponse
|
|
371
371
|
result.setValue(it["tag"] as? String, forKey: "tag")
|
|
372
372
|
return result
|
|
@@ -564,7 +564,7 @@ public extension ImageQualityResult {
|
|
|
564
564
|
it["group"] as! Int,
|
|
565
565
|
it["status"] as! Int,
|
|
566
566
|
it["value"] as! NSNumber,
|
|
567
|
-
ImageQualityRange.decode(it["range"])
|
|
567
|
+
ImageQualityRange.decode(it["range"])!
|
|
568
568
|
)})
|
|
569
569
|
}
|
|
570
570
|
func encode() -> [String: Any?] {
|
|
@@ -590,7 +590,7 @@ public extension DetectFacesAttributeResult {
|
|
|
590
590
|
it["attribute"],
|
|
591
591
|
it["confidence"],
|
|
592
592
|
it["value"],
|
|
593
|
-
ImageQualityRange.decode(it["range"])?.asList()
|
|
593
|
+
ImageQualityRange.decode(it["range"])?.asList()
|
|
594
594
|
)})
|
|
595
595
|
}
|
|
596
596
|
func encode() -> [String: Any?] {
|
|
@@ -617,7 +617,7 @@ public extension DetectFaceResult {
|
|
|
617
617
|
it["crop"],
|
|
618
618
|
CGRect.decode(it["faceRect"]),
|
|
619
619
|
(it["landmarks"] as? [Any])?.map{ Point.decode($0) },
|
|
620
|
-
CGRect.decode(it["originalRect"])
|
|
620
|
+
CGRect.decode(it["originalRect"])
|
|
621
621
|
)})
|
|
622
622
|
}
|
|
623
623
|
func encode() -> [String: Any?] {
|
|
@@ -644,7 +644,7 @@ public extension DetectFacesResponse {
|
|
|
644
644
|
alloc, sel,
|
|
645
645
|
(it["allDetections"] as? [Any])?.map { DetectFaceResult.decode($0) },
|
|
646
646
|
it["scenario"],
|
|
647
|
-
nil
|
|
647
|
+
nil
|
|
648
648
|
)})
|
|
649
649
|
}
|
|
650
650
|
func encode() -> [String: Any?] {
|
|
@@ -864,7 +864,7 @@ public extension PersonDatabase.SearchPersonDetection {
|
|
|
864
864
|
CGRect.decode(it["rect"]),
|
|
865
865
|
(it["landmarks"] as? [Any])?.map { Point.decode($0) },
|
|
866
866
|
UIImage.decode(it["crop"]),
|
|
867
|
-
it["rotationAngle"]
|
|
867
|
+
it["rotationAngle"]
|
|
868
868
|
)})
|
|
869
869
|
}
|
|
870
870
|
func encode() -> [String: Any?] {
|
package/ios/RNFaceSDK.swift
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import React
|
|
2
2
|
|
|
3
|
-
func sendEvent(_ event: String, _ data: Any? = nil) {
|
|
4
|
-
guard let plugin = this, hasListeners else { return }
|
|
5
|
-
DispatchQueue.main.async {
|
|
6
|
-
plugin.sendEvent(withName: event, body: data.toSendable())
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
private var firedCallbacks: [RCTResponseSenderBlock] = []
|
|
11
|
-
private var hasListeners: Bool = false
|
|
12
|
-
private var this: RNFaceSDK?
|
|
13
|
-
|
|
14
3
|
@objc(RNFaceSDK)
|
|
15
4
|
public class RNFaceSDK: RCTEventEmitter {
|
|
16
5
|
override public func startObserving() { hasListeners = true }
|
|
@@ -39,4 +28,15 @@ public class RNFaceSDK: RCTEventEmitter {
|
|
|
39
28
|
}
|
|
40
29
|
}
|
|
41
30
|
|
|
31
|
+
private var firedCallbacks: [RCTResponseSenderBlock] = []
|
|
32
|
+
private var hasListeners: Bool = false
|
|
33
|
+
private var this: RNFaceSDK?
|
|
34
|
+
|
|
35
|
+
func sendEvent(_ event: String, _ data: Any? = nil) {
|
|
36
|
+
guard let plugin = this, hasListeners else { return }
|
|
37
|
+
DispatchQueue.main.async {
|
|
38
|
+
plugin.sendEvent(withName: event, body: data.toSendable())
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
42
|
let rootViewController: () -> UIViewController? = { return RCTPresentedViewController() }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.818-nightly",
|
|
4
4
|
"description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/face-sdk" version="8.2.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="8.2.818-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
4
|
<description>Cordova plugin for Regula Face SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
28
28
|
</config>
|
|
29
29
|
<pods>
|
|
30
|
-
<pod name="
|
|
30
|
+
<pod name="FaceSDKNightly" spec="8.2.3756" />
|
|
31
31
|
</pods>
|
|
32
32
|
</podspec>
|
|
33
33
|
</platform>
|
package/test/package-lock.json
CHANGED
package/www/cordova.js
CHANGED
|
@@ -4469,12 +4469,6 @@ class SearchPersonRequest {
|
|
|
4469
4469
|
/******/ if (cachedModule !== undefined) {
|
|
4470
4470
|
/******/ return cachedModule.exports;
|
|
4471
4471
|
/******/ }
|
|
4472
|
-
/******/ // Check if module exists (development only)
|
|
4473
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
4474
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
4475
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
4476
|
-
/******/ throw e;
|
|
4477
|
-
/******/ }
|
|
4478
4472
|
/******/ // Create a new module (and put it into the cache)
|
|
4479
4473
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
4480
4474
|
/******/ // no module.id needed
|
|
@@ -4483,6 +4477,12 @@ class SearchPersonRequest {
|
|
|
4483
4477
|
/******/ };
|
|
4484
4478
|
/******/
|
|
4485
4479
|
/******/ // Execute the module function
|
|
4480
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
4481
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
4482
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
4483
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
4484
|
+
/******/ throw e;
|
|
4485
|
+
/******/ }
|
|
4486
4486
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
4487
4487
|
/******/
|
|
4488
4488
|
/******/ // Return the exports of the module
|