@regulaforensics/face-sdk 8.4.1386-rc → 8.4.1390-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 CHANGED
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = 'RNFaceSDK'
8
- s.version = '8.4.1386-rc'
8
+ s.version = '8.4.1390-nightly'
9
9
  s.summary = package['description']
10
10
  s.license = package['license']
11
11
 
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
16
16
  s.ios.deployment_target = '13.0'
17
17
  s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
18
18
  s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
19
- s.dependency 'FaceSDKStage', '8.4.4957'
19
+ s.dependency 'FaceSDKNightly', '8.4.4970'
20
20
  s.dependency 'React'
21
21
  end
@@ -43,8 +43,9 @@ class CDVFaceSDK : CordovaPlugin() {
43
43
  if (method == "setEvent") eventCallbackIds[args(0)] = callbackContext.callbackId
44
44
  try {
45
45
  methodCall(method) { data: Any? -> sendEvent(callbackContext.callbackId, data) }
46
- } catch (error: Exception) {
47
- Log.e("REGULA", "Caught exception in \"$method\" function:", error)
46
+ } catch (error: Throwable) {
47
+ Log.e("REGULA", "Caught an exception in \"$method\" function:", error)
48
+ sendEvent(callbackContext.callbackId, "Unexpected error, check logs for details")
48
49
  }
49
50
  return true
50
51
  }
@@ -20,7 +20,7 @@ android {
20
20
  rootProject.allprojects {
21
21
  repositories {
22
22
  maven {
23
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
23
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
24
24
  }
25
25
  }
26
26
  }
@@ -29,7 +29,7 @@ dependencies {
29
29
  //noinspection GradleDynamicVersion
30
30
  implementation 'com.facebook.react:react-native:+'
31
31
  //noinspection GradleDependency
32
- implementation('com.regula.face:api:8.4.5393'){
32
+ implementation('com.regula.face:api:8.4.5399'){
33
33
  transitive = true
34
34
  }
35
35
  }
@@ -6,13 +6,13 @@ android {
6
6
 
7
7
  repositories {
8
8
  maven {
9
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
9
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
10
10
  }
11
11
  }
12
12
 
13
13
  dependencies {
14
14
  //noinspection GradleDependency
15
- implementation('com.regula.face:api:8.4.5393'){
15
+ implementation('com.regula.face:api:8.4.5399'){
16
16
  transitive = true
17
17
  }
18
18
  }
@@ -846,12 +846,12 @@ fun generatePersonDBResponse(data: Any?, error: String?) = mapOf(
846
846
 
847
847
  fun personFromJSON(input: JSONObject?) = input?.let {
848
848
  val result = Person::class.constructor().instantiate()
849
- result.name = it.getString("name")
850
- result.setPrivateProperty("g", it.getJSONArray("groups").toArray<String>())
851
- result.setPrivateProperty("f", it.getString("updatedAt").toDate())
852
- result.setPrivateProperty("a", it.getString("id"))
849
+ result.name = it.getStringOrNull("name")
850
+ result.setPrivateProperty("g", it.getJSONArrayOrNull("groups").toArray<String>())
851
+ result.setPrivateProperty("f", it.getStringOrNull("updatedAt").toDate())
852
+ result.setPrivateProperty("a", it.getStringOrNull("id"))
853
853
  result.setPrivateProperty("b", it.getJSONObjectOrNull("metadata") ?: JSONObject())
854
- result.setPrivateProperty("c", it.getString("createdAt").toDate())
854
+ result.setPrivateProperty("c", it.getStringOrNull("createdAt").toDate())
855
855
  result.expireAt = it.getStringOrNull("expireAt").toDate()
856
856
  result.externalId = it.getStringOrNull("externalId")
857
857
  result.timeToLive = it.getIntOrNull("ttl")
@@ -65,8 +65,9 @@ class RNFaceSDKModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
65
65
  args = JSONArray(arguments.toArrayList())
66
66
  try {
67
67
  methodCall(method) { data -> promise.resolve(data.toSendable()) }
68
- } catch (error: Exception) {
69
- Log.e("REGULA", "Caught exception in \"$method\" function:", error)
68
+ } catch (error: Throwable) {
69
+ Log.e("REGULA", "Caught an exception in \"$method\" function:", error)
70
+ promise.reject(Throwable("Unexpected error, check logs for details"))
70
71
  }
71
72
  }
72
73
 
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "8.4.1386-rc",
10
- "@regulaforensics/face-core-basic": "8.4.840-rc",
9
+ "@regulaforensics/face-sdk": "8.4.1390-nightly",
10
+ "@regulaforensics/face-core-basic": "8.4.842-nightly",
11
11
  "@awesome-cordova-plugins/file": "^8.1.0",
12
12
  "@awesome-cordova-plugins/camera": "^8.1.0",
13
13
  "cordova-plugin-file": "^8.1.3",
@@ -6,7 +6,7 @@ var image1: MatchFacesImage | null
6
6
  var image2: MatchFacesImage | null
7
7
 
8
8
  async function init() {
9
- if (!await initializeReader()) return
9
+ if (!await initialize()) return
10
10
  setStatus("Ready")
11
11
  }
12
12
 
@@ -73,7 +73,7 @@ function setImage(base64: string, type: number, position: number) {
73
73
 
74
74
  // If 'regula.license' exists, init using license(enables offline match)
75
75
  // otherwise init without license.
76
- async function initializeReader() {
76
+ async function initialize() {
77
77
  setStatus("Initializing...")
78
78
 
79
79
  var license = await loadAssetIfExists("regula.license")
@@ -20,8 +20,8 @@
20
20
  "@awesome-cordova-plugins/camera": "^9.2.0",
21
21
  "@awesome-cordova-plugins/dialogs": "^9.2.0",
22
22
  "@awesome-cordova-plugins/file": "^9.2.0",
23
- "@regulaforensics/face-sdk": "8.4.1386-rc",
24
- "@regulaforensics/face-core-basic": "8.4.840-rc",
23
+ "@regulaforensics/face-sdk": "8.4.1390-nightly",
24
+ "@regulaforensics/face-core-basic": "8.4.842-nightly",
25
25
  "cordova-android": "^15.0.0",
26
26
  "cordova-ios": "^8.1.1",
27
27
  "cordova-plugin-camera": "^8.0.0",
@@ -6,7 +6,7 @@ var image1: MatchFacesImage | null
6
6
  var image2: MatchFacesImage | null
7
7
 
8
8
  async function init() {
9
- if (!await initializeReader()) return
9
+ if (!await initialize()) return
10
10
  setStatus("Ready")
11
11
  }
12
12
 
@@ -73,7 +73,7 @@ function setImage(base64: string, type: number, position: number) {
73
73
 
74
74
  // If 'regula.license' exists, init using license(enables offline match)
75
75
  // otherwise init without license.
76
- async function initializeReader() {
76
+ async function initialize() {
77
77
  setStatus("Initializing...")
78
78
 
79
79
  var license = await loadAssetIfExists("regula.license")
@@ -8,8 +8,8 @@
8
8
  "start": "expo start"
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "8.4.1386-rc",
12
- "@regulaforensics/face-core-basic": "8.4.840-rc",
11
+ "@regulaforensics/face-sdk": "8.4.1390-nightly",
12
+ "@regulaforensics/face-core-basic": "8.4.842-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",
@@ -6,7 +6,7 @@ var image1: MatchFacesImage | null
6
6
  var image2: MatchFacesImage | null
7
7
 
8
8
  async function init() {
9
- if (!await initializeReader()) return
9
+ if (!await initialize()) return
10
10
  setStatus("Ready")
11
11
  }
12
12
 
@@ -73,7 +73,7 @@ function setImage(base64: string, type: number, position: number) {
73
73
 
74
74
  // If 'regula.license' exists, init using license(enables offline match)
75
75
  // otherwise init without license.
76
- async function initializeReader() {
76
+ async function initialize() {
77
77
  setStatus("Initializing...")
78
78
 
79
79
  var license = await loadAssetIfExists("regula.license")
package/ios/Decoder.swift CHANGED
@@ -774,7 +774,7 @@ public extension URL {
774
774
  public extension PersonDatabase.Person {
775
775
  static func decode(_ it: Any?) -> PersonDatabase.Person? {
776
776
  guard let it = it as? [String: Any] else { return nil }
777
- let result = PersonDatabase.Person.emptyInit() as PersonDatabase.Person
777
+ let result = PersonDatabase.Person()
778
778
  result.setValue(Date.decode(it["updatedAt"]), forKey: "updatedAt")
779
779
  result.setValue(Date.decode(it["createdAt"]), forKey: "createdAt")
780
780
  result.setValue(it["name"] as Any?, forKey: "name")
@@ -787,10 +787,9 @@ public extension PersonDatabase.Person {
787
787
  return result
788
788
  }
789
789
  func encode() -> [String: Any?]? {
790
- if (self.itemId == nil) { return nil }
791
790
  return [
792
- "updatedAt": self.updatedAt.encode(),
793
- "createdAt": self.createdAt.encode(),
791
+ "updatedAt": self.updatedAt?.encode(),
792
+ "createdAt": self.createdAt?.encode(),
794
793
  "name": self.name,
795
794
  "groups": self.groups,
796
795
  "id": self.itemId,
@@ -822,7 +821,7 @@ public extension PersonDatabase.PersonImage {
822
821
  func encode() -> [String: Any?] {
823
822
  return [
824
823
  "url": self.url.encode(),
825
- "createdAt": self.createdAt.encode(),
824
+ "createdAt": self.createdAt?.encode(),
826
825
  "path": self.path,
827
826
  "contentType": self.contentType,
828
827
  "id": self.itemId,
@@ -857,7 +856,7 @@ public extension PersonDatabase.PersonGroup {
857
856
  }
858
857
  func encode() -> [String: Any?] {
859
858
  return [
860
- "createdAt": self.createdAt.encode(),
859
+ "createdAt": self.createdAt?.encode(),
861
860
  "name": self.name,
862
861
  "id": self.itemId,
863
862
  "metadata": self.metadata,
@@ -953,7 +952,7 @@ public extension PersonDatabase.SearchPersonImage {
953
952
  func encode2() -> [String: Any?] {
954
953
  return [
955
954
  "url": self.url.encode(),
956
- "createdAt": self.createdAt.encode(),
955
+ "createdAt": self.createdAt?.encode(),
957
956
  "similarity": self.similarity,
958
957
  "distance": self.distance,
959
958
  "path": self.path,
@@ -985,8 +984,8 @@ public extension PersonDatabase.SearchPerson {
985
984
  return [
986
985
  "detection": self.detection.encode(),
987
986
  "images": self.images.compactMap({ $0.encode2() }),
988
- "createdAt": self.createdAt.encode(),
989
- "updatedAt": self.updatedAt.encode(),
987
+ "createdAt": self.createdAt?.encode(),
988
+ "updatedAt": self.updatedAt?.encode(),
990
989
  "name": self.name,
991
990
  "groups": self.groups,
992
991
  "id": self.itemId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.4.1386-rc",
3
+ "version": "8.4.1390-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.4.1386-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.4.1390-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/regulaforensics/podspecs.git" />
28
28
  </config>
29
29
  <pods>
30
- <pod name="FaceSDKStage" spec="8.4.4957" />
30
+ <pod name="FaceSDKNightly" spec="8.4.4970" />
31
31
  </pods>
32
32
  </podspec>
33
33
  </platform>
@@ -13,12 +13,9 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "8.4.1386-rc",
16
+ "version": "1.0.0",
17
17
  "dev": true,
18
- "license": "commercial",
19
- "dependencies": {
20
- "@expo/config-plugins": "^10.0.0"
21
- }
18
+ "license": "commercial"
22
19
  },
23
20
  "node_modules/@esbuild/aix-ppc64": {
24
21
  "version": "0.25.9",