@regulaforensics/face-sdk 8.4.1402-beta → 8.4.1404-beta

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.
@@ -5,10 +5,10 @@
5
5
  "setup": "scripts/setup.sh",
6
6
  "ios": "scripts/ios.sh",
7
7
  "android": "scripts/android.sh",
8
- "start": "expo start --port 8082"
8
+ "start": "expo start --port \"$npm_package_config_metroPort\""
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "8.4.1402-beta",
11
+ "@regulaforensics/face-sdk": "8.4.1404-beta",
12
12
  "@regulaforensics/face-core-basic": "8.4.854-beta",
13
13
  "react-native": "0.88.0-rc.0",
14
14
  "react-native-fs": "^2.20.0",
@@ -28,5 +28,8 @@
28
28
  "expo-custom-assets": {
29
29
  "expo": "$expo"
30
30
  }
31
+ },
32
+ "config": {
33
+ "metroPort": 8082
31
34
  }
32
35
  }
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- adb reverse tcp:8082 tcp:8082 >/dev/null || :
4
+ adb reverse tcp:${npm_package_config_metroPort} tcp:${npm_package_config_metroPort} >/dev/null || :
5
5
  if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
6
6
  open -a 'Android Studio' android
7
- # Check Metro for this product on port 8082.
8
- if [[ "$(curl --silent --max-time 2 http://localhost:8082/status)" != "packager-status:running" ]]; then
7
+ # Check if Metro is running at app's port.
8
+ if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
9
9
  npm start
10
+ else
11
+ echo "Metro is already running on port ${npm_package_config_metroPort}."
10
12
  fi
11
13
  else
12
- expo run:android --device --port 8082
14
+ expo run:android --device --port ${npm_package_config_metroPort}
13
15
  fi
@@ -3,10 +3,12 @@ set -e
3
3
 
4
4
  if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
5
5
  open ios/Face.xcworkspace
6
- # Check Metro for this product on port 8082.
7
- if [[ "$(curl --silent --max-time 2 http://localhost:8082/status)" != "packager-status:running" ]]; then
6
+ # Check if Metro is running at app's port.
7
+ if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
8
8
  npm start
9
+ else
10
+ echo "Metro is already running on port ${npm_package_config_metroPort}."
9
11
  fi
10
12
  else
11
- npx expo run:ios --device --port 8082
13
+ npx expo run:ios --device --port ${npm_package_config_metroPort}
12
14
  fi
@@ -1,12 +1,15 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
+ # Kill Metro instance at app's port.
5
+ lsof -tiTCP:${npm_package_config_metroPort} -sTCP:LISTEN | xargs kill 2>/dev/null || true
6
+
4
7
  npm install
5
8
  rm -rf node_modules/expo/node_modules/expo-modules-core/android/.cxx # Temp fix for expo@58.0.0-preview.3
6
9
  npx expo prebuild --no-install
7
10
  (cd ios && (pod install || pod update))
8
11
 
9
- # add aaptOptions for offline match
12
+ # Add aaptOptions for offline match
10
13
  if ! grep -q faceSdkResource android/app/build.gradle && grep -q face-core-match package.json; then
11
14
  sed -i '' "s/androidResources/aaptOptions {\n\t\tnoCompress 'Regula\/faceSdkResource.dat'\n\t}\n\tandroidResources/" android/app/build.gradle
12
15
  fi
package/ios/Config.swift CHANGED
@@ -152,7 +152,7 @@ public extension LivenessConfiguration {
152
152
  "skipStep": self.stepSkippingMask.encode(),
153
153
  "metadata": self.metadata,
154
154
  "person": self.person.encode(),
155
- "searchFilter": self.searchFilter.encode(),
155
+ "searchFilter": self.searchFilter?.encode(),
156
156
  ]
157
157
  }
158
158
  }
@@ -178,7 +178,6 @@ public extension LivenessConfiguration {
178
178
  case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
179
179
  case("metadata"): builder.metadata = v as! [String: Any]
180
180
  case("personId"): builder.personId = v as! String
181
- case("externalId"): builder.externalId = v as? String
182
181
  case("threshold"): builder.threshold = v as? NSNumber
183
182
  default: break
184
183
  }
@@ -203,7 +202,6 @@ public extension LivenessConfiguration {
203
202
  "skipStep": self.stepSkippingMask.encode(),
204
203
  "metadata": self.metadata,
205
204
  "personId": self.personId,
206
- "externalId": self.externalId,
207
205
  "threshold": self.threshold,
208
206
  ]
209
207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.4.1402-beta",
3
+ "version": "8.4.1404-beta",
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.1402-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.4.1404-beta" 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>
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'react-native-face-sdk'
3
- s.version = '8.4.1402-beta'
3
+ s.version = '8.4.1404-beta'
4
4
  s.summary = 'Regula React Native plugin.'
5
5
  s.license = 'commercial'
6
6
  s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
package/test/json.tsx CHANGED
@@ -249,26 +249,6 @@ export var verificationConfig = {
249
249
  "personId": "test0",
250
250
  "threshold": 0.5,
251
251
  };
252
- export var verificationConfig2 = {
253
- "copyright": true,
254
- "cameraSwitchEnabled": false,
255
- "closeButtonEnabled": true,
256
- "torchButtonEnabled": false,
257
- "vibrateOnSteps": true,
258
- "cameraPositionAndroid": -1,
259
- "cameraPositionIOS": 1,
260
- "screenOrientation": [0, 1],
261
- "locationTrackingEnabled": true,
262
- "preventScreenRecording": false,
263
- "attemptsCount": 2,
264
- "recordingProcess": 0,
265
- "livenessType": 1,
266
- "tag": "test",
267
- "skipStep": [0, 1],
268
- "metadata": customJson,
269
- "externalId": "test1",
270
- "threshold": 0.5,
271
- };
272
252
  export var livenessBackendException = {
273
253
  "code": 200,
274
254
  "message": "No license",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "8.4.1402-beta",
16
+ "version": "8.4.1404-beta",
17
17
  "dev": true,
18
18
  "license": "commercial",
19
19
  "dependencies": {
package/test/test.tsx CHANGED
@@ -108,7 +108,6 @@ import {
108
108
  size,
109
109
  enrollmentConfig,
110
110
  verificationConfig,
111
- verificationConfig2,
112
111
  enrollmentResponse,
113
112
  verificationMatchResponse,
114
113
  verificationResponse,
@@ -148,7 +147,6 @@ compare('faceCaptureResponse', faceCaptureResponse, FaceCaptureResponse.fromJson
148
147
  compare('livenessConfig', livenessConfig, LivenessConfig.fromJson);
149
148
  compare('enrollmentConfig', enrollmentConfig, EnrollmentConfig.fromJson);
150
149
  compare('verificationConfig', verificationConfig, VerificationConfig.fromJson);
151
- compare('verificationConfig2', verificationConfig2, VerificationConfig.fromJson);
152
150
  compare('livenessBackendException', livenessBackendException, LivenessBackendException.fromJson);
153
151
  compare('livenessException', livenessException, LivenessException.fromJson);
154
152
  compare('livenessResponse', livenessResponse, LivenessResponse.fromJson);
@@ -20,10 +20,10 @@ export class VerificationConfig {
20
20
  skipStep
21
21
  metadata
22
22
  personId
23
- externalId
24
23
  threshold
25
24
 
26
- constructor(options) {
25
+ constructor(personId, options) {
26
+ this.personId = personId
27
27
  this.copyright = options?.copyright ?? true
28
28
  this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
29
29
  this.closeButtonEnabled = options?.closeButtonEnabled ?? true
@@ -41,22 +41,9 @@ export class VerificationConfig {
41
41
  this.skipStep = options?.skipStep ?? []
42
42
  this.metadata = options?.metadata
43
43
  this.personId = options?.personId
44
- this.externalId = options?.externalId
45
44
  this.threshold = options?.threshold
46
45
  }
47
46
 
48
- static withPersonId(personId, options) {
49
- const result = new VerificationConfig(options)
50
- result.personId = personId
51
- return result
52
- }
53
-
54
- static withExternalId(externalId, options) {
55
- const result = new VerificationConfig(options)
56
- result.externalId = externalId
57
- return result
58
- }
59
-
60
47
  static fromJson(jsonObject) {
61
48
  if (jsonObject == null) return null
62
49
  const result = new VerificationConfig()
@@ -78,7 +65,6 @@ export class VerificationConfig {
78
65
  result.skipStep = jsonObject["skipStep"]
79
66
  result.metadata = jsonObject["metadata"]
80
67
  result.personId = jsonObject["personId"]
81
- result.externalId = jsonObject["externalId"]
82
68
  result.threshold = jsonObject["threshold"]
83
69
 
84
70
  return result
@@ -103,7 +89,6 @@ export class VerificationConfig {
103
89
  "skipStep": this.skipStep,
104
90
  "metadata": this.metadata,
105
91
  "personId": this.personId,
106
- "externalId": this.externalId,
107
92
  "threshold": this.threshold,
108
93
  }
109
94
  }
package/www/cordova.js CHANGED
@@ -3566,10 +3566,10 @@ class VerificationConfig {
3566
3566
  skipStep
3567
3567
  metadata
3568
3568
  personId
3569
- externalId
3570
3569
  threshold
3571
3570
 
3572
- constructor(options) {
3571
+ constructor(personId, options) {
3572
+ this.personId = personId
3573
3573
  this.copyright = options?.copyright ?? true
3574
3574
  this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
3575
3575
  this.closeButtonEnabled = options?.closeButtonEnabled ?? true
@@ -3587,22 +3587,9 @@ class VerificationConfig {
3587
3587
  this.skipStep = options?.skipStep ?? []
3588
3588
  this.metadata = options?.metadata
3589
3589
  this.personId = options?.personId
3590
- this.externalId = options?.externalId
3591
3590
  this.threshold = options?.threshold
3592
3591
  }
3593
3592
 
3594
- static withPersonId(personId, options) {
3595
- const result = new VerificationConfig(options)
3596
- result.personId = personId
3597
- return result
3598
- }
3599
-
3600
- static withExternalId(externalId, options) {
3601
- const result = new VerificationConfig(options)
3602
- result.externalId = externalId
3603
- return result
3604
- }
3605
-
3606
3593
  static fromJson(jsonObject) {
3607
3594
  if (jsonObject == null) return null
3608
3595
  const result = new VerificationConfig()
@@ -3624,7 +3611,6 @@ class VerificationConfig {
3624
3611
  result.skipStep = jsonObject["skipStep"]
3625
3612
  result.metadata = jsonObject["metadata"]
3626
3613
  result.personId = jsonObject["personId"]
3627
- result.externalId = jsonObject["externalId"]
3628
3614
  result.threshold = jsonObject["threshold"]
3629
3615
 
3630
3616
  return result
@@ -3649,7 +3635,6 @@ class VerificationConfig {
3649
3635
  "skipStep": this.skipStep,
3650
3636
  "metadata": this.metadata,
3651
3637
  "personId": this.personId,
3652
- "externalId": this.externalId,
3653
3638
  "threshold": this.threshold,
3654
3639
  }
3655
3640
  }
@@ -20,10 +20,10 @@ export class VerificationConfig {
20
20
  skipStep
21
21
  metadata
22
22
  personId
23
- externalId
24
23
  threshold
25
24
 
26
- constructor(options) {
25
+ constructor(personId, options) {
26
+ this.personId = personId
27
27
  this.copyright = options?.copyright ?? true
28
28
  this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
29
29
  this.closeButtonEnabled = options?.closeButtonEnabled ?? true
@@ -41,22 +41,9 @@ export class VerificationConfig {
41
41
  this.skipStep = options?.skipStep ?? []
42
42
  this.metadata = options?.metadata
43
43
  this.personId = options?.personId
44
- this.externalId = options?.externalId
45
44
  this.threshold = options?.threshold
46
45
  }
47
46
 
48
- static withPersonId(personId, options) {
49
- const result = new VerificationConfig(options)
50
- result.personId = personId
51
- return result
52
- }
53
-
54
- static withExternalId(externalId, options) {
55
- const result = new VerificationConfig(options)
56
- result.externalId = externalId
57
- return result
58
- }
59
-
60
47
  static fromJson(jsonObject) {
61
48
  if (jsonObject == null) return null
62
49
  const result = new VerificationConfig()
@@ -78,7 +65,6 @@ export class VerificationConfig {
78
65
  result.skipStep = jsonObject["skipStep"]
79
66
  result.metadata = jsonObject["metadata"]
80
67
  result.personId = jsonObject["personId"]
81
- result.externalId = jsonObject["externalId"]
82
68
  result.threshold = jsonObject["threshold"]
83
69
 
84
70
  return result
@@ -103,7 +89,6 @@ export class VerificationConfig {
103
89
  "skipStep": this.skipStep,
104
90
  "metadata": this.metadata,
105
91
  "personId": this.personId,
106
- "externalId": this.externalId,
107
92
  "threshold": this.threshold,
108
93
  }
109
94
  }
@@ -89,9 +89,7 @@ export class VerificationConfig {
89
89
 
90
90
  threshold?: number
91
91
 
92
- private constructor();
93
-
94
- static withPersonId(
92
+ constructor(
95
93
  personId: string,
96
94
  options?: {
97
95
  copyright?: boolean
@@ -112,28 +110,5 @@ export class VerificationConfig {
112
110
  metadata?: Record<string, any>
113
111
  threshold?: number
114
112
  }
115
- ): VerificationConfig;
116
-
117
- static withExternalId(
118
- externalId: string,
119
- options?: {
120
- copyright?: boolean
121
- cameraSwitchEnabled?: boolean
122
- closeButtonEnabled?: boolean
123
- torchButtonEnabled?: boolean
124
- vibrateOnSteps?: boolean
125
- cameraPositionAndroid?: number
126
- cameraPositionIOS?: CameraPosition
127
- screenOrientation?: Array<ScreenOrientation>
128
- locationTrackingEnabled?: boolean
129
- preventScreenRecording?: boolean
130
- attemptsCount?: number
131
- recordingProcess?: RecordingProcess
132
- livenessType?: LivenessType
133
- tag?: string
134
- skipStep?: Array<LivenessSkipStep>
135
- metadata?: Record<string, any>
136
- threshold?: number
137
- }
138
- ): VerificationConfig;
113
+ )
139
114
  }