@regulaforensics/face-sdk 8.3.1423-rc → 8.3.1427-rc

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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  .package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
11
11
  .package(
12
12
  url: "https://github.com/regulaforensics/FaceSDK-Swift-Package",
13
- exact: "8.4.5017-rc"
13
+ exact: "8.4.5036-rc"
14
14
  )
15
15
  ],
16
16
  targets: [
@@ -31,7 +31,7 @@ dependencies {
31
31
  //noinspection GradleDynamicVersion
32
32
  implementation("com.facebook.react:react-native:+")
33
33
  //noinspection GradleDependency
34
- implementation("com.regula.face:api:8.3.5441") {
34
+ implementation("com.regula.face:api:8.4.5445") {
35
35
  isTransitive = true
36
36
  }
37
37
  }
@@ -11,7 +11,7 @@ repositories {
11
11
 
12
12
  dependencies {
13
13
  //noinspection GradleDependency
14
- add("implementation", "com.regula.face:api:8.3.5441") {
14
+ add("implementation", "com.regula.face:api:8.4.5445") {
15
15
  isTransitive = true
16
16
  }
17
17
  }
@@ -990,9 +990,8 @@ fun generateSearchPersonDetection(input: Detection?) = input?.let {
990
990
  "landmarks" to it.landmarks.toJson(::generatePoint),
991
991
  "rect" to generateRect(it.rect),
992
992
  "crop" to it.cropImage,
993
- // In 6.1 getting NaN from getRotationAngle() on valid request
994
- // Putting NaN in JSONObject throws an error
995
- "rotationAngle" to if (!it.rotationAngle.isNaN()) it.rotationAngle else null,
993
+ // Missing scores/angles in duplicate results can be NaN; JSON requires finite numbers.
994
+ "rotationAngle" to (it.rotationAngle.takeIf { value -> value.isFinite() } ?: -1.0),
996
995
  ).toJson()
997
996
  }
998
997
 
@@ -1005,8 +1004,8 @@ fun searchPersonImageFromJSON(input: JSONObject): SearchPersonImage = input.let
1005
1004
  }
1006
1005
 
1007
1006
  fun generateSearchPersonImage(it: SearchPersonImage) = mapOf(
1008
- "similarity" to it.similarity,
1009
- "distance" to it.distance,
1007
+ "similarity" to (it.similarity.takeIf { value -> value.isFinite() } ?: -1.0),
1008
+ "distance" to (it.distance.takeIf { value -> value.isFinite() } ?: -1.0),
1010
1009
  "path" to it.path,
1011
1010
  "url" to it.url,
1012
1011
  "contentType" to it.contentType,
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "8.3.1423-rc",
10
- "@regulaforensics/face-core-basic": "8.4.865-rc",
9
+ "@regulaforensics/face-sdk": "8.3.1427-rc",
10
+ "@regulaforensics/face-core-basic": "8.4.868-rc",
11
11
  "@capacitor/dialog": "^8.0.0",
12
12
  "@capacitor/cli": "^8.5.2",
13
13
  "@capacitor/core": "^8.5.2",
@@ -20,8 +20,8 @@
20
20
  "@awesome-cordova-plugins/camera": "^9.6.0",
21
21
  "@awesome-cordova-plugins/dialogs": "^9.6.0",
22
22
  "@awesome-cordova-plugins/file": "^9.6.0",
23
- "@regulaforensics/face-sdk": "8.3.1423-rc",
24
- "@regulaforensics/face-core-basic": "8.4.865-rc",
23
+ "@regulaforensics/face-sdk": "8.3.1427-rc",
24
+ "@regulaforensics/face-core-basic": "8.4.868-rc",
25
25
  "cordova-android": "^15.1.0",
26
26
  "cordova-ios": "^8.1.1",
27
27
  "cordova-plugin-camera": "^8.0.0",
@@ -8,8 +8,8 @@
8
8
  "start": "expo start --port \"$npm_package_config_metroPort\""
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "8.3.1423-rc",
12
- "@regulaforensics/face-core-basic": "8.4.865-rc",
11
+ "@regulaforensics/face-sdk": "8.3.1427-rc",
12
+ "@regulaforensics/face-core-basic": "8.4.868-rc",
13
13
  "react-native": "0.88.0-rc.0",
14
14
  "react-native-fs": "^2.20.0",
15
15
  "react-native-image-picker": "^8.2.1",
package/ios/Utils.swift CHANGED
@@ -27,11 +27,13 @@ extension Any? {
27
27
  func fixNulls(_ value: Any?) -> Any {
28
28
  guard let value else { return NSNull() }
29
29
  switch value {
30
- case let value as [String: Any]:
30
+ // Native results can contain unavailable scores represented by NaN or infinity.
31
+ case let value as NSNumber where !value.doubleValue.isFinite: return -1
32
+ case let value as [String: Any?]:
31
33
  var dict = [String: Any]()
32
34
  for (k, v) in value { dict[k] = fixNulls(v) }
33
35
  return dict
34
- case let value as [Any]: return value.map { fixNulls($0) }
36
+ case let value as [Any?]: return value.map { fixNulls($0) }
35
37
  default: return value
36
38
  }
37
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.3.1423-rc",
3
+ "version": "8.3.1427-rc",
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.3.1423-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.3.1427-rc" 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/regulaforensics/podspecs.git" />
28
28
  </config>
29
29
  <pods>
30
- <pod name="FaceSDKStage" spec="8.4.5017" nospm="true" />
30
+ <pod name="FaceSDKStage" spec="8.4.5036" nospm="true" />
31
31
  </pods>
32
32
  </podspec>
33
33
  </platform>
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'react-native-face-sdk'
3
- s.version = '8.3.1423-rc'
3
+ s.version = '8.3.1427-rc'
4
4
  s.summary = 'Regula React Native plugin.'
5
5
  s.license = 'commercial'
6
6
  s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
@@ -9,6 +9,6 @@ Pod::Spec.new do |s|
9
9
  s.ios.deployment_target = '15.0'
10
10
  s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
11
11
  s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
12
- s.dependency 'FaceSDKStage', '8.4.5017'
12
+ s.dependency 'FaceSDKStage', '8.4.5036'
13
13
  s.dependency 'React'
14
14
  end
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "8.3.1423-rc",
16
+ "version": "8.3.1427-rc",
17
17
  "dev": true,
18
18
  "license": "commercial",
19
19
  "dependencies": {
@@ -1,7 +1,7 @@
1
1
  export class PersonImage {
2
2
  get path(): string
3
3
  get url(): string
4
- get contentType(): string | null
4
+ get contentType(): string
5
5
  get id(): string
6
6
  get metadata(): any
7
7
  get createdAt(): Date
@@ -16,7 +16,7 @@ export class SearchPersonImage {
16
16
  get distance(): number
17
17
  get path(): string
18
18
  get url(): string
19
- get contentType(): string | null
19
+ get contentType(): string
20
20
  get id(): string
21
21
  get metadata(): any
22
22
  get createdAt(): Date