@sumsub/cordova-idensic-mobile-sdk-plugin 1.34.1 → 1.36.1
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/dist/SNSMobileSDK.js +1 -1
- package/package.json +7 -8
- package/plugin.xml +4 -4
- package/scripts/bump_version +297 -0
- package/src/android/build-extras.gradle +5 -4
- package/src/android/build.gradle +3 -3
- package/webpack.config.js +6 -3
package/dist/SNSMobileSDK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(self,e=>{return t={440:t=>{"use strict";t.exports=e},846:(e,t,n)=>{const r=n(440),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function a(e){this.sdkConf=e,this.sdkConf.settings.appFrameworkName="cordova"}function c(){return this.debug=!1,this.handlers={},this.applicantConf={},this.preferredDocumentDefinitions={},this.autoCloseOnApprove=3,this.settings={},this}a.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},a.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var a=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{a(null,e)}).catch(e=>{a(e||new Error("rejected"),null)})}else n(t)}},a.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},a.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},c.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},c.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},c.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},c.prototype.withAnalyticsEnabled=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withAnalyticsEnabled" expects a boolean');return this.isAnalyticsEnabled=e,this},c.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},c.prototype.withApplicantConf=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withApplicantConf" expects a hash');return this.applicantConf=e,this},c.prototype.withPreferredDocumentDefinitions=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withPreferredDocumentDefinitions" expects a hash');return this.preferredDocumentDefinitions=e,this},c.prototype.withSettings=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withSettings" expects a hash');return this.settings=e,this},c.prototype.withStrings=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withStrings" expects a hash');return this.strings=e,this},c.prototype.withTheme=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withTheme" expects a hash');return this.theme=e,this},c.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "baseUrl" must be a string');return this.apiUrl=e,this},c.prototype.withAutoCloseOnApprove=function(e){if("number"!=typeof e)throw new Error('Invalid parameter, "autoCloseOnApprove" expects a number');return this.autoCloseOnApprove=e,this},c.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new a({apiUrl:this.apiUrl,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,applicantConf:this.applicantConf,preferredDocumentDefinitions:this.preferredDocumentDefinitions,settings:this.settings,theme:this.theme,strings:this.strings,isAnalyticsEnabled:this.isAnalyticsEnabled,autoCloseOnApprove:this.autoCloseOnApprove,debug:this.debug})},e.exports={init:function(e,t){return(new c).withAccessToken(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}}},n={},function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}(846);var t,n});
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sumsub/cordova-idensic-mobile-sdk-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "Cordova plugin exposing Sumsub SDK",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "webpack
|
|
6
|
+
"build": "webpack --mode=production"
|
|
7
7
|
},
|
|
8
8
|
"cordova": {
|
|
9
9
|
"id": "cordova-idensic-mobile-sdk-plugin",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@babel/core": "7.
|
|
17
|
-
"@babel/preset-env": "7.
|
|
16
|
+
"@babel/core": "^7.28.0",
|
|
17
|
+
"@babel/preset-env": "^7.28.0",
|
|
18
18
|
"babel-core": "6.26.3",
|
|
19
19
|
"babel-eslint": "10.1.0",
|
|
20
|
-
"babel-loader": "
|
|
20
|
+
"babel-loader": "^9.2.1",
|
|
21
21
|
"babel-preset-es2015": "6.24.1",
|
|
22
22
|
"babel-preset-react": "6.24.1",
|
|
23
23
|
"babel-preset-react-hmre": "1.1.1",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
29
29
|
"eslint-plugin-react": "7.19.0",
|
|
30
30
|
"eslint-plugin-react-hooks": "2.5.0",
|
|
31
|
-
"webpack": "
|
|
32
|
-
"webpack-cli": "
|
|
31
|
+
"webpack": "^5.99.9",
|
|
32
|
+
"webpack-cli": "^5.1.4"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"sumsub",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"author": "Sumsub",
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"main": "webpack.config.js",
|
|
44
|
-
"dependencies": {},
|
|
45
44
|
"repository": {
|
|
46
45
|
"type": "git"
|
|
47
46
|
}
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<plugin id="cordova-idensic-mobile-sdk-plugin" version="1.
|
|
2
|
+
<plugin id="cordova-idensic-mobile-sdk-plugin" version="1.36.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
|
|
4
4
|
<name>cordova-idensic-mobile-sdk-plugin</name>
|
|
5
5
|
<description>Cordova plugin exposing SumSub Mobile SDK</description>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
<param name="android-package" value="com.sumsub.msdk.plugins.cordova.SNSMobileSdkCordovaPlugin" />
|
|
22
22
|
</feature>
|
|
23
23
|
<preference name="android-targetSdkVersion" value="34" />
|
|
24
|
-
<preference name="android-compileSdkVersion" value="
|
|
25
|
-
<preference name="android-buildToolsVersion" value="
|
|
24
|
+
<preference name="android-compileSdkVersion" value="35" />
|
|
25
|
+
<preference name="android-buildToolsVersion" value="35.0.0" />
|
|
26
26
|
</config-file>
|
|
27
27
|
|
|
28
28
|
<config-file target="AndroidManifest.xml" parent="/*">
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<source url="https://cdn.cocoapods.org/"/>
|
|
83
83
|
</config>
|
|
84
84
|
<pods>
|
|
85
|
-
<pod name="IdensicMobileSDK" spec="=1.
|
|
85
|
+
<pod name="IdensicMobileSDK" spec="=1.36.1" />
|
|
86
86
|
</pods>
|
|
87
87
|
</podspec>
|
|
88
88
|
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'optparse'
|
|
5
|
+
|
|
6
|
+
# Usage:
|
|
7
|
+
# scripts/bump_version <new_version> [--ios=IOS_VERSION] [--android=ANDROID_VERSION]
|
|
8
|
+
#
|
|
9
|
+
# Examples:
|
|
10
|
+
# scripts/bump_version 1.36.0
|
|
11
|
+
# scripts/bump_version 1.36.0 --ios=1.34.0
|
|
12
|
+
# scripts/bump_version 1.36.0 --android=1.35.0
|
|
13
|
+
# scripts/bump_version 1.36.0 --ios=1.34.0 --android=1.35.0
|
|
14
|
+
|
|
15
|
+
options = {}
|
|
16
|
+
parser = OptionParser.new do |opts|
|
|
17
|
+
opts.banner = "Usage: #{$PROGRAM_NAME} <new_version> [options]"
|
|
18
|
+
opts.on("--ios=VERSION", "Override iOS version") do |v|
|
|
19
|
+
options[:ios] = v
|
|
20
|
+
end
|
|
21
|
+
opts.on("--android=VERSION", "Override Android version") do |v|
|
|
22
|
+
options[:android] = v
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
parser.parse!
|
|
27
|
+
abort parser.help if ARGV.empty?
|
|
28
|
+
|
|
29
|
+
new_version = ARGV[0]
|
|
30
|
+
ios_version = options[:ios] || new_version
|
|
31
|
+
android_version = options[:android] || new_version
|
|
32
|
+
android_version_code = new_version.gsub(/\.(\d{1})(?!\d)/, '0$1').gsub(/\D/, '')
|
|
33
|
+
|
|
34
|
+
PATTERNS = [
|
|
35
|
+
{
|
|
36
|
+
file: "demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/build-extras.gradle",
|
|
37
|
+
platform: :android,
|
|
38
|
+
pattern: /(implementation "com\.sumsub\.sns:idensic-mobile-sdk(-videoident|-eid|-nfc)?:)([\d.]+)(")/,
|
|
39
|
+
replacement: ->(match, ver) {
|
|
40
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(4)}"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
file: "demo/platforms/android/cordova-idensic-mobile-sdk-plugin/SumSubCordova-build-extras.gradle",
|
|
45
|
+
platform: :android,
|
|
46
|
+
pattern: /(implementation "com\.sumsub\.sns:idensic-mobile-sdk(-videoident|-eid|-nfc)?:)([\d.]+)(")/,
|
|
47
|
+
replacement: ->(match, ver) {
|
|
48
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(4)}"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
file: "src/android/build-extras.gradle",
|
|
53
|
+
platform: :android,
|
|
54
|
+
pattern: /(implementation "com\.sumsub\.sns:idensic-mobile-sdk(-videoident|-eid|-nfc)?:)([\d.]+)(")/,
|
|
55
|
+
replacement: ->(match, ver) {
|
|
56
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(4)}"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
file: "demo/platforms/ios/SumSubCordova.xcodeproj/project.pbxproj",
|
|
61
|
+
platform: :all,
|
|
62
|
+
pattern: /(\s*MARKETING_VERSION\s*=\s*)([\d.]+)(;)/,
|
|
63
|
+
replacement: ->(match, ver) {
|
|
64
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
file: "demo/platforms/ios/SumSubCordova.xcodeproj/project.pbxproj",
|
|
69
|
+
platform: :all,
|
|
70
|
+
pattern: /(\s*CURRENT_PROJECT_VERSION\s*=\s*)([\d.]+)(;)/,
|
|
71
|
+
replacement: ->(match, ver) {
|
|
72
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
file: "demo/platforms/android/android.json",
|
|
77
|
+
platform: :all,
|
|
78
|
+
pattern: /(\s*"cordova-idensic-mobile-sdk-plugin"\s*:\s*")([\d.]+)(",?)/,
|
|
79
|
+
replacement: ->(match, ver) {
|
|
80
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
file: "demo/platforms/ios/platform_www/cordova_plugins.js",
|
|
85
|
+
platform: :all,
|
|
86
|
+
pattern: /(\s*"cordova-idensic-mobile-sdk-plugin"\s*:\s*")([\d.]+)(")/,
|
|
87
|
+
replacement: ->(match, ver) {
|
|
88
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
file: "demo/platforms/android/platform_www/cordova_plugins.js",
|
|
93
|
+
platform: :all,
|
|
94
|
+
pattern: /(\s*"cordova-idensic-mobile-sdk-plugin"\s*:\s*")([\d.]+)(")/,
|
|
95
|
+
replacement: ->(match, ver) {
|
|
96
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
file: "demo/plugins/cordova-idensic-mobile-sdk-plugin/package.json",
|
|
101
|
+
platform: :all,
|
|
102
|
+
pattern: /(\s*"version"\s*:\s*")([\d.]+)(")/,
|
|
103
|
+
replacement: ->(match, ver) {
|
|
104
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
file: "demo/package.json",
|
|
109
|
+
platform: :all,
|
|
110
|
+
pattern: /(\s*"version"\s*:\s*")([\d.]+)(",)/,
|
|
111
|
+
replacement: ->(match, ver) {
|
|
112
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
file: "package.json",
|
|
117
|
+
platform: :all,
|
|
118
|
+
pattern: /(\s*"version"\s*:\s*")([\d.]+)(",)/,
|
|
119
|
+
replacement: ->(match, ver) {
|
|
120
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
file: "demo/platforms/ios/pods.json",
|
|
125
|
+
platform: :ios,
|
|
126
|
+
pattern: /(\s*"spec"\s*:\s*"=)([\d.]+)(",)/,
|
|
127
|
+
replacement: ->(match, ver) {
|
|
128
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
file: "demo/platforms/ios/ios.json",
|
|
133
|
+
platform: :all,
|
|
134
|
+
pattern: /(\s*"cordova-idensic-mobile-sdk-plugin"\s*:\s*"=?)([\d.]+)(")/,
|
|
135
|
+
replacement: ->(match, ver) {
|
|
136
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
file: "demo/platforms/ios/Podfile",
|
|
141
|
+
platform: :ios,
|
|
142
|
+
pattern: /(pod.*', '=)([\d.]+)(')/,
|
|
143
|
+
replacement: ->(match, ver) {
|
|
144
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
file: "demo/config.xml",
|
|
149
|
+
platform: :all,
|
|
150
|
+
pattern: /(<widget .*version=")([\d.]+)(")/,
|
|
151
|
+
replacement: ->(match, ver) {
|
|
152
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
file: "plugin.xml",
|
|
157
|
+
platform: :ios,
|
|
158
|
+
pattern: /(<pod name="IdensicMobileSDK" spec="=)([\d.]+)(")/,
|
|
159
|
+
replacement: ->(match, ver) {
|
|
160
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
file: "demo/platforms/android/app/src/main/AndroidManifest.xml",
|
|
165
|
+
platform: :all,
|
|
166
|
+
pattern: /(android:versionName=")([\d.]+)(")/,
|
|
167
|
+
replacement: ->(match, ver) {
|
|
168
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
file: "plugin.xml",
|
|
173
|
+
platform: :all,
|
|
174
|
+
pattern: /(<plugin.*?version=")([\d.]+)(")/,
|
|
175
|
+
replacement: ->(match, ver) {
|
|
176
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
file: "demo/plugins/cordova-idensic-mobile-sdk-plugin/plugin.xml",
|
|
181
|
+
platform: :all,
|
|
182
|
+
pattern: /(plugin.*?version=")([\d.]+)(")/,
|
|
183
|
+
replacement: ->(match, ver) {
|
|
184
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
file: "demo/plugins/cordova-idensic-mobile-sdk-plugin/plugin.xml",
|
|
189
|
+
platform: :ios,
|
|
190
|
+
pattern: /(<pod name="IdensicMobileSDK" spec="=)([\d.]+)(")/,
|
|
191
|
+
replacement: ->(match, ver) {
|
|
192
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
file: "demo/platforms/ios/SumSubCordova/config.xml",
|
|
197
|
+
platform: :all,
|
|
198
|
+
pattern: /(widget.*?version=")([\d.]+)(")/,
|
|
199
|
+
replacement: ->(match, ver) {
|
|
200
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
file: "demo/platforms/android/app/src/main/res/xml/config.xml",
|
|
205
|
+
platform: :all,
|
|
206
|
+
pattern: /(widget.*?version=")([\d.]+)(")/,
|
|
207
|
+
replacement: ->(match, ver) {
|
|
208
|
+
"#{Regexp.last_match(1)}#{ver}#{Regexp.last_match(3)}"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
{
|
|
214
|
+
file: "demo/config.xml",
|
|
215
|
+
platform: :all,
|
|
216
|
+
pattern: /(widget.*?android-versionCode=")([\d.]+)(")/,
|
|
217
|
+
replacement: ->(match, ver) {
|
|
218
|
+
"#{Regexp.last_match(1)}#{android_version_code}#{Regexp.last_match(3)}"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
file: "demo/platforms/android/app/src/main/AndroidManifest.xml",
|
|
223
|
+
platform: :all,
|
|
224
|
+
pattern: /(manifest.*?android:versionCode=")([\d.]+)(")/,
|
|
225
|
+
replacement: ->(match, ver) {
|
|
226
|
+
"#{Regexp.last_match(1)}#{android_version_code}#{Regexp.last_match(3)}"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
file: "demo/platforms/android/app/src/main/res/xml/config.xml",
|
|
231
|
+
platform: :all,
|
|
232
|
+
pattern: /(widget.*?android-versionCode=")([\d.]+)(")/,
|
|
233
|
+
replacement: ->(match, ver) {
|
|
234
|
+
"#{Regexp.last_match(1)}#{android_version_code}#{Regexp.last_match(3)}"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
file: "demo/platforms/ios/SumSubCordova/config.xml",
|
|
239
|
+
platform: :all,
|
|
240
|
+
pattern: /(widget.*?android-versionCode=")([\d.]+)(")/,
|
|
241
|
+
replacement: ->(match, ver) {
|
|
242
|
+
"#{Regexp.last_match(1)}#{android_version_code}#{Regexp.last_match(3)}"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
|
|
247
|
+
PATTERNS.each do |entry|
|
|
248
|
+
file_path = entry[:file]
|
|
249
|
+
platform = entry[:platform]
|
|
250
|
+
|
|
251
|
+
unless File.exist?(file_path)
|
|
252
|
+
warn "Warning: File #{file_path} not found; skipping."
|
|
253
|
+
next
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
version_used =
|
|
257
|
+
case platform
|
|
258
|
+
when :ios then ios_version
|
|
259
|
+
when :android then android_version
|
|
260
|
+
else new_version
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
file_data = File.read(file_path)
|
|
264
|
+
updated_data = file_data.gsub(entry[:pattern]) do |match|
|
|
265
|
+
entry[:replacement].call(match, version_used)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if updated_data != file_data
|
|
269
|
+
File.write(file_path, updated_data)
|
|
270
|
+
puts "Updated #{file_path}"
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
unless system("/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion #{new_version}\" 'demo/platforms/ios/SumSubCordova/SumSubCordova-Info.plist'")
|
|
275
|
+
abort("Error: Failed to update plist.".red)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
unless system("/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString #{new_version}\" 'demo/platforms/ios/SumSubCordova/SumSubCordova-Info.plist'")
|
|
279
|
+
abort("Error: Failed to update plist.".red)
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
system("npm install")
|
|
283
|
+
|
|
284
|
+
Dir.chdir("demo") do
|
|
285
|
+
system("bundle install")
|
|
286
|
+
system("npm install")
|
|
287
|
+
|
|
288
|
+
system("cd platforms/ios && bundle exec pod update IdensicMobileSDK")
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
changed_files = PATTERNS.map { |entry| entry[:file] }.uniq
|
|
292
|
+
changed_files << "demo/platform/ios/Podfile.lock"
|
|
293
|
+
|
|
294
|
+
system("git add #{changed_files.join(' ')}")
|
|
295
|
+
system("git commit -m 'Bump version to #{new_version}'")
|
|
296
|
+
|
|
297
|
+
puts "Done updating version to #{new_version}"
|
|
@@ -14,10 +14,11 @@ allprojects {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
dependencies {
|
|
17
|
-
implementation "com.sumsub.sns:idensic-mobile-sdk:1.
|
|
18
|
-
// implementation
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk:1.36.1"
|
|
18
|
+
// implementation("com.sumsub.sns:idensic-mobile-sdk:1.36.1-release_1.36.1-SNAPSHOT")
|
|
19
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk-videoident:1.36.1"
|
|
20
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk-eid:1.36.1"
|
|
21
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk-nfc:1.36.1"
|
|
21
22
|
|
|
22
23
|
implementation 'com.google.android.material:material:1.8.0'
|
|
23
24
|
}
|
package/src/android/build.gradle
CHANGED
|
@@ -25,10 +25,10 @@ rootProject.allprojects {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
android {
|
|
28
|
-
compileSdkVersion
|
|
28
|
+
compileSdkVersion 35
|
|
29
29
|
defaultConfig {
|
|
30
|
-
minSdkVersion
|
|
31
|
-
targetSdkVersion
|
|
30
|
+
minSdkVersion 23
|
|
31
|
+
targetSdkVersion 35
|
|
32
32
|
versionCode 1
|
|
33
33
|
versionName "1.0"
|
|
34
34
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
package/webpack.config.js
CHANGED
|
@@ -7,6 +7,7 @@ const FILE_NAME = 'SNSMobileSDK';
|
|
|
7
7
|
const LIBRARY_NAME = 'SNSMobileSDK';
|
|
8
8
|
|
|
9
9
|
module.exports = {
|
|
10
|
+
mode: 'production',
|
|
10
11
|
entry: {
|
|
11
12
|
wrapper: MAIN_FILE,
|
|
12
13
|
},
|
|
@@ -14,8 +15,10 @@ module.exports = {
|
|
|
14
15
|
path: path.join(__dirname, BUILD_PATH),
|
|
15
16
|
filename: `${FILE_NAME}.js`,
|
|
16
17
|
publicPath: '/',
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
library: {
|
|
19
|
+
type: 'umd',
|
|
20
|
+
name: LIBRARY_NAME,
|
|
21
|
+
},
|
|
19
22
|
},
|
|
20
23
|
externals: {
|
|
21
24
|
'cordova/exec': 'cordova/exec',
|
|
@@ -35,7 +38,7 @@ module.exports = {
|
|
|
35
38
|
{
|
|
36
39
|
test: /\.(js)$/,
|
|
37
40
|
exclude: /node_modules/,
|
|
38
|
-
use: ['babel-loader'
|
|
41
|
+
use: ['babel-loader'],
|
|
39
42
|
},
|
|
40
43
|
],
|
|
41
44
|
},
|