@veriff/react-native-sdk 2.6.0 → 2.7.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.
@@ -0,0 +1 @@
1
+ @DariaRyazhskikhVeriff @MertCelik @yakovshkolnikovveriff
package/app.plugin.js ADDED
@@ -0,0 +1,33 @@
1
+ const {
2
+ withPlugins,
3
+ createRunOncePlugin,
4
+ withProjectBuildGradle,
5
+ } = require('@expo/config-plugins');
6
+
7
+ const pkg = require('@veriff/react-native-sdk/package.json');
8
+
9
+ function getUpdatedProjectGradle(buildGradle) {
10
+ const insertIndex = buildGradle.indexOf('mavenLocal()');
11
+ const updatedBuildGradle = [
12
+ buildGradle.slice(0, insertIndex),
13
+ 'maven { url "https://cdn.veriff.me/android/" } //veriff\n ',
14
+ buildGradle.slice(insertIndex),
15
+ ].join('');
16
+
17
+ return updatedBuildGradle;
18
+ }
19
+
20
+ function withVeriffProjectGradle(expoConfig) {
21
+ return withProjectBuildGradle(expoConfig, config => {
22
+ config.modResults.contents = getUpdatedProjectGradle(
23
+ config.modResults.contents,
24
+ );
25
+ return config;
26
+ });
27
+ }
28
+
29
+ function withVeriff(expoConfig) {
30
+ return withPlugins(expoConfig, [withVeriffProjectGradle]);
31
+ }
32
+
33
+ exports.default = createRunOncePlugin(withVeriff, pkg.name, pkg.version);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veriff/react-native-sdk",
3
3
  "title": "React Native Veriff SDK",
4
- "version": "2.6.0",
4
+ "version": "2.7.0",
5
5
  "description": "React Native SDK for Veriff identity verification",
6
6
  "main": "index.js",
7
7
  "scripts": {