react-native-bootpay-api 13.8.4 → 13.8.43
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/lib/bootpayAnalytics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.userTrace=exports.pageTrace=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNativeBase=_interopRequireDefault(require("react-native-base64"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _reactNative=require("react-native");var getRandomKey=function getRandomKey(length){var text='';var keys='abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ';for(var i=0;i<length;i++)text+=keys.charAt(Math.floor(Math.random()*keys.length));return text;};var getSessionKey=function(){var _ref=(0,_asyncToGenerator2.default)(function*(key,iv){var keyValue=_reactNativeBase.default.encode(key);var ivValue=_reactNativeBase.default.encode(iv);return`${keyValue}##${ivValue}`;});return function getSessionKey(_x,_x2){return _ref.apply(this,arguments);};}();var stringToHex=function stringToHex(str){var hex='';for(var i=0,l=str.length;i<l;i++){hex+=str.charCodeAt(i).toString(16);}return hex;};var userTrace=exports.userTrace=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(applicationId,userId,phone,email,gender,birth,area){try{var payload={"id":userId,"ver":_reactNativeDeviceInfo.default.getVersion(),"application_id":applicationId,"phone":phone,"email":email,"gender":gender,"birth":birth,"area":area};var key=getRandomKey(32);var iv=getRandomKey(16);try{var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.userTrace=exports.pageTrace=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNativeBase=_interopRequireDefault(require("react-native-base64"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _reactNative=require("react-native");var getRandomKey=function getRandomKey(length){var text='';var keys='abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ';for(var i=0;i<length;i++)text+=keys.charAt(Math.floor(Math.random()*keys.length));return text;};var getSessionKey=function(){var _ref=(0,_asyncToGenerator2.default)(function*(key,iv){var keyValue=_reactNativeBase.default.encode(key);var ivValue=_reactNativeBase.default.encode(iv);return`${keyValue}##${ivValue}`;});return function getSessionKey(_x,_x2){return _ref.apply(this,arguments);};}();var stringToHex=function stringToHex(str){var hex='';for(var i=0,l=str.length;i<l;i++){hex+=str.charCodeAt(i).toString(16);}return hex;};var userTrace=exports.userTrace=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(applicationId,userId,phone,email,gender,birth,area){try{var payload={"id":userId,"ver":_reactNativeDeviceInfo.default.getVersion(),"application_id":applicationId,"phone":phone,"email":email,"gender":gender,"birth":birth,"area":area};var key=getRandomKey(32);var iv=getRandomKey(16);try{var data=yield _reactNative.NativeModules.Aes.encrypt(JSON.stringify(payload),stringToHex(key),stringToHex(iv));var response=yield fetch('https://analytics.bootpay.co.kr/login',{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify({data:data,session_key:yield getSessionKey(key,iv)})});var json=yield response.json();return json;}catch(e){console.log(e);}}catch(error){console.error(error);}});return function userTrace(_x3,_x4,_x5,_x6,_x7,_x8,_x9){return _ref2.apply(this,arguments);};}();var pageTrace=exports.pageTrace=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(applicationId,url,pageType,items){try{var payload={"application_id":applicationId,"url":url,"page_type":pageType,"items":items,"referer":''};var key=getRandomKey(32);var iv=getRandomKey(16);try{var data=yield _reactNative.NativeModules.Aes.encrypt(JSON.stringify(payload),stringToHex(key),stringToHex(iv));var response=yield fetch('https://analytics.bootpay.co.kr/call',{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify({data:data,session_key:yield getSessionKey(key,iv)})});var json=yield response.json();return json;}catch(e){console.log(e);}}catch(error){console.error(error);}});return function pageTrace(_x10,_x11,_x12,_x13){return _ref3.apply(this,arguments);};}();
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bootpay-api",
|
|
3
|
-
"version": "13.8.
|
|
3
|
+
"version": "13.8.43",
|
|
4
4
|
"description": "React Native를 위한 bootpay 라이브러리 입니다.",
|
|
5
5
|
"main": "index.tsx",
|
|
6
|
+
"main-internal": "src/index.tsx",
|
|
7
|
+
"react-native": "src/index.tsx",
|
|
6
8
|
"author": "bootpay <bootpay.co.kr@gmail.com>",
|
|
7
9
|
"license": "MIT",
|
|
8
10
|
"homepage": "https://www.bootpay.co.kr",
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
"react-native-sensitive-info": "^5.5.8",
|
|
40
42
|
"@types/react-native-base64": "^0.2.2",
|
|
41
43
|
"react-native-aes-crypto": "^3.0.1",
|
|
42
|
-
"react-native-webview-bootpay": "^13.8.
|
|
44
|
+
"react-native-webview-bootpay": "^13.8.41"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@babel/cli": "^7.20.0",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
require 'json'
|
|
2
2
|
|
|
3
|
+
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
4
|
+
ios_platform = new_arch_enabled ? '11.0' : '9.0'
|
|
5
|
+
|
|
3
6
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
7
|
|
|
5
8
|
Pod::Spec.new do |s|
|
|
@@ -14,7 +17,30 @@ Pod::Spec.new do |s|
|
|
|
14
17
|
s.platforms = { :ios => "9.0", :osx => "10.13" }
|
|
15
18
|
|
|
16
19
|
s.source = { :git => "https://github.com/bootpay/react-native-bootpay-api.git", :tag => "#{s.version}" }
|
|
17
|
-
s.source_files
|
|
20
|
+
s.source_files = "apple/**/*.{h,m,mm,swift}"
|
|
21
|
+
|
|
22
|
+
if defined?(install_modules_dependencies()) != nil
|
|
23
|
+
install_modules_dependencies(s);
|
|
24
|
+
else
|
|
25
|
+
if new_arch_enabled
|
|
26
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
27
|
+
|
|
28
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
|
|
30
|
+
s.pod_target_xcconfig = {
|
|
31
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
32
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
33
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
34
|
+
}
|
|
18
35
|
|
|
19
|
-
|
|
36
|
+
s.dependency "React-RCTFabric"
|
|
37
|
+
s.dependency "React-Codegen"
|
|
38
|
+
s.dependency "RCT-Folly"
|
|
39
|
+
s.dependency "RCTRequired"
|
|
40
|
+
s.dependency "RCTTypeSafety"
|
|
41
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
42
|
+
else
|
|
43
|
+
s.dependency "React-Core"
|
|
44
|
+
end
|
|
45
|
+
end
|
|
20
46
|
end
|
package/react-native.config.js
CHANGED
|
@@ -1,64 +1,24 @@
|
|
|
1
|
-
const project = (() => {
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
try {
|
|
5
|
-
const { configureProjects } = require('react-native-test-app');
|
|
6
|
-
|
|
7
|
-
return configureProjects({
|
|
8
|
-
android: {
|
|
9
|
-
sourceDir: path.join('example', 'android'),
|
|
10
|
-
manifestPath: path.join(__dirname, 'example', 'android'),
|
|
11
|
-
},
|
|
12
|
-
ios: {
|
|
13
|
-
sourceDir: 'example/ios',
|
|
14
|
-
},
|
|
15
|
-
windows: fs.existsSync('example/windows/WebviewExample.sln') && {
|
|
16
|
-
sourceDir: path.join('example', 'windows'),
|
|
17
|
-
solutionFile: path.join('example', 'windows', 'WebviewExample.sln'),
|
|
18
|
-
project: path.join(__dirname, 'example', 'windows'),
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.log('Hello?', e);
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
})();
|
|
26
|
-
|
|
27
|
-
module.exports = {
|
|
28
|
-
dependencies: {
|
|
29
|
-
// Help rn-cli find and autolink this library
|
|
30
|
-
'react-native-bootpay-api': {
|
|
31
|
-
root: __dirname,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
...(project ? { project } : undefined),
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
|
|
38
1
|
// const project = (() => {
|
|
39
2
|
// const fs = require('fs');
|
|
40
3
|
// const path = require('path');
|
|
41
4
|
// try {
|
|
42
|
-
// const {
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
// windowsProjectPath,
|
|
46
|
-
// } = require('react-native-test-app');
|
|
47
|
-
// return {
|
|
5
|
+
// const { configureProjects } = require('react-native-test-app');
|
|
6
|
+
|
|
7
|
+
// return configureProjects({
|
|
48
8
|
// android: {
|
|
49
9
|
// sourceDir: path.join('example', 'android'),
|
|
50
|
-
// manifestPath:
|
|
51
|
-
// path.join(__dirname, 'example', 'android'),
|
|
52
|
-
// ),
|
|
10
|
+
// manifestPath: path.join(__dirname, 'example', 'android'),
|
|
53
11
|
// },
|
|
54
12
|
// ios: {
|
|
55
13
|
// sourceDir: 'example/ios',
|
|
56
14
|
// },
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
15
|
+
// windows: fs.existsSync('example/windows/WebviewExample.sln') && {
|
|
16
|
+
// sourceDir: path.join('example', 'windows'),
|
|
17
|
+
// solutionFile: path.join('example', 'windows', 'WebviewExample.sln'),
|
|
18
|
+
// project: path.join(__dirname, 'example', 'windows'),
|
|
19
|
+
// },
|
|
20
|
+
// });
|
|
21
|
+
// } catch (e) {
|
|
62
22
|
// return undefined;
|
|
63
23
|
// }
|
|
64
24
|
// })();
|
|
@@ -69,6 +29,45 @@ module.exports = {
|
|
|
69
29
|
// 'react-native-bootpay-api': {
|
|
70
30
|
// root: __dirname,
|
|
71
31
|
// },
|
|
72
|
-
// },
|
|
32
|
+
// },
|
|
73
33
|
// ...(project ? { project } : undefined),
|
|
74
34
|
// };
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
const project = (() => {
|
|
38
|
+
const fs = require('fs');
|
|
39
|
+
const path = require('path');
|
|
40
|
+
try {
|
|
41
|
+
const {
|
|
42
|
+
androidManifestPath,
|
|
43
|
+
// iosProjectPath,
|
|
44
|
+
windowsProjectPath,
|
|
45
|
+
} = require('react-native-test-app');
|
|
46
|
+
return {
|
|
47
|
+
android: {
|
|
48
|
+
sourceDir: path.join('example', 'android'),
|
|
49
|
+
manifestPath: androidManifestPath(
|
|
50
|
+
path.join(__dirname, 'example', 'android'),
|
|
51
|
+
),
|
|
52
|
+
},
|
|
53
|
+
ios: {
|
|
54
|
+
sourceDir: 'example/ios',
|
|
55
|
+
},
|
|
56
|
+
// ios: {
|
|
57
|
+
// project: iosProjectPath('example/ios'),
|
|
58
|
+
// },
|
|
59
|
+
};
|
|
60
|
+
} catch (_) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
})();
|
|
64
|
+
|
|
65
|
+
module.exports = {
|
|
66
|
+
dependencies: {
|
|
67
|
+
// Help rn-cli find and autolink this library
|
|
68
|
+
'react-native-bootpay-api': {
|
|
69
|
+
root: __dirname,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
...(project ? { project } : undefined),
|
|
73
|
+
};
|