freerasp-react-native 1.0.0 → 1.1.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.
- package/LICENSE +20 -20
- package/README.md +442 -413
- package/android/build.gradle +87 -87
- package/android/gradle.properties +4 -4
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/freeraspreactnative/FreeraspDeviceStateListener.kt +25 -0
- package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +113 -108
- package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt +17 -17
- package/example/Gemfile +6 -6
- package/example/android/app/_BUCK +55 -55
- package/example/android/app/build.gradle +313 -313
- package/example/android/app/build_defs.bzl +19 -19
- package/example/android/app/proguard-rules.pro +10 -10
- package/example/android/app/src/debug/AndroidManifest.xml +13 -13
- package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +73 -73
- package/example/android/app/src/main/AndroidManifest.xml +26 -26
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +48 -48
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +91 -91
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +116 -116
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +36 -36
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
- package/example/android/app/src/main/jni/CMakeLists.txt +7 -7
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -32
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
- package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -65
- package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
- package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
- package/example/android/app/src/main/res/values/strings.xml +3 -3
- package/example/android/app/src/main/res/values/styles.xml +9 -9
- package/example/android/build.gradle +53 -53
- package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/example/android/gradle.properties +40 -40
- package/example/android/gradlew +234 -234
- package/example/android/settings.gradle +11 -11
- package/example/app.json +3 -3
- package/example/assets/checkmark-circle-outline.png +0 -0
- package/example/assets/checkmark-circle-outline.svg +1 -0
- package/example/assets/close-circle-outline.png +0 -0
- package/example/assets/close-circle-outline.svg +1 -0
- package/example/assets/talsec-logo.png +0 -0
- package/example/babel.config.js +17 -17
- package/example/index.js +5 -5
- package/example/ios/File.swift +6 -6
- package/example/ios/FreeraspReactNativeExample/AppDelegate.h +8 -8
- package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +133 -133
- package/example/ios/FreeraspReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
- package/example/ios/FreeraspReactNativeExample/Images.xcassets/Contents.json +6 -6
- package/example/ios/FreeraspReactNativeExample/Info.plist +55 -55
- package/example/ios/FreeraspReactNativeExample/LaunchScreen.storyboard +47 -47
- package/example/ios/FreeraspReactNativeExample/main.m +10 -10
- package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +3 -3
- package/example/ios/FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme +106 -106
- package/example/ios/FreeraspReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -10
- package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +66 -66
- package/example/ios/FreeraspReactNativeExampleTests/Info.plist +24 -24
- package/example/ios/Podfile +43 -43
- package/example/ios/Podfile.lock +590 -584
- package/example/metro.config.js +40 -40
- package/example/package.json +24 -21
- package/example/react-native.config.js +10 -10
- package/example/src/App.tsx +135 -89
- package/example/src/DemoApp.tsx +89 -0
- package/example/src/checks.ts +16 -0
- package/example/src/styles.ts +7 -0
- package/example/yarn.lock +4644 -4154
- package/freerasp-react-native.podspec +36 -36
- package/ios/Debug/TalsecRuntime.xcframework/Info.plist +40 -40
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -222
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -3029
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -77
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -123
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -50
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -456
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -68
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -504
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -125
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +51 -51
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -17
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -3154
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -12
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -450
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -3029
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -77
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -123
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -50
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -456
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -68
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -504
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -125
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -51
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +51 -51
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -17
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -344
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -3154
- package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -12
- package/ios/FreeraspReactNative-Bridging-Header.h +3 -3
- package/ios/FreeraspReactNative.m +14 -14
- package/ios/FreeraspReactNative.swift +57 -53
- package/ios/FreeraspReactNative.xcodeproj/xcshareddata/xcschemes/FreeraspReactNative.xcscheme +67 -67
- package/ios/Release/TalsecRuntime.xcframework/Info.plist +40 -40
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -222
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -3029
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -77
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -123
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -50
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -456
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -68
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -504
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -125
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +51 -51
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -17
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -3154
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -12
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -450
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -3029
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -77
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -123
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -50
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -456
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -68
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -504
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -125
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -51
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +51 -51
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -17
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -344
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -3154
- package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +35 -35
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +161 -161
- package/src/index.tsx +90 -90
- package/ios/TalsecRuntime.xcframework +0 -1
package/example/metro.config.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const escape = require('escape-string-regexp');
|
|
3
|
-
const exclusionList = require('metro-config/src/defaults/exclusionList');
|
|
4
|
-
const pak = require('../package.json');
|
|
5
|
-
|
|
6
|
-
const root = path.resolve(__dirname, '..');
|
|
7
|
-
|
|
8
|
-
const modules = Object.keys({
|
|
9
|
-
...pak.peerDependencies,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
module.exports = {
|
|
13
|
-
projectRoot: __dirname,
|
|
14
|
-
watchFolders: [root],
|
|
15
|
-
|
|
16
|
-
// We need to make sure that only one version is loaded for peerDependencies
|
|
17
|
-
// So we block them at the root, and alias them to the versions in example's node_modules
|
|
18
|
-
resolver: {
|
|
19
|
-
blacklistRE: exclusionList(
|
|
20
|
-
modules.map(
|
|
21
|
-
(m) =>
|
|
22
|
-
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
|
|
23
|
-
)
|
|
24
|
-
),
|
|
25
|
-
|
|
26
|
-
extraNodeModules: modules.reduce((acc, name) => {
|
|
27
|
-
acc[name] = path.join(__dirname, 'node_modules', name);
|
|
28
|
-
return acc;
|
|
29
|
-
}, {}),
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
transformer: {
|
|
33
|
-
getTransformOptions: async () => ({
|
|
34
|
-
transform: {
|
|
35
|
-
experimentalImportSupport: false,
|
|
36
|
-
inlineRequires: true,
|
|
37
|
-
},
|
|
38
|
-
}),
|
|
39
|
-
},
|
|
40
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const escape = require('escape-string-regexp');
|
|
3
|
+
const exclusionList = require('metro-config/src/defaults/exclusionList');
|
|
4
|
+
const pak = require('../package.json');
|
|
5
|
+
|
|
6
|
+
const root = path.resolve(__dirname, '..');
|
|
7
|
+
|
|
8
|
+
const modules = Object.keys({
|
|
9
|
+
...pak.peerDependencies,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
projectRoot: __dirname,
|
|
14
|
+
watchFolders: [root],
|
|
15
|
+
|
|
16
|
+
// We need to make sure that only one version is loaded for peerDependencies
|
|
17
|
+
// So we block them at the root, and alias them to the versions in example's node_modules
|
|
18
|
+
resolver: {
|
|
19
|
+
blacklistRE: exclusionList(
|
|
20
|
+
modules.map(
|
|
21
|
+
(m) =>
|
|
22
|
+
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
|
|
23
|
+
)
|
|
24
|
+
),
|
|
25
|
+
|
|
26
|
+
extraNodeModules: modules.reduce((acc, name) => {
|
|
27
|
+
acc[name] = path.join(__dirname, 'node_modules', name);
|
|
28
|
+
return acc;
|
|
29
|
+
}, {}),
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
transformer: {
|
|
33
|
+
getTransformOptions: async () => ({
|
|
34
|
+
transform: {
|
|
35
|
+
experimentalImportSupport: false,
|
|
36
|
+
inlineRequires: true,
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
};
|
package/example/package.json
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "FreeraspReactNativeExample",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"android": "react-native run-android",
|
|
7
|
-
"ios": "react-native run-ios",
|
|
8
|
-
"start": "react-native start",
|
|
9
|
-
"pods": "pod-install --quiet"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"react": "
|
|
13
|
-
"react
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"babel
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "FreeraspReactNativeExample",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"android": "react-native run-android",
|
|
7
|
+
"ios": "react-native run-ios",
|
|
8
|
+
"start": "react-native start",
|
|
9
|
+
"pods": "pod-install --quiet"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@react-native-material/core": "^1.3.7",
|
|
13
|
+
"react": "18.1.0",
|
|
14
|
+
"react-native": "^0.70.6",
|
|
15
|
+
"react-native-svg": "^13.8.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@babel/core": "^7.12.9",
|
|
19
|
+
"@babel/runtime": "^7.12.5",
|
|
20
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
21
|
+
"metro-react-native-babel-preset": "0.72.3",
|
|
22
|
+
"react-native-svg-transformer": "^1.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const pak = require('../package.json');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
dependencies: {
|
|
6
|
-
[pak.name]: {
|
|
7
|
-
root: path.join(__dirname, '..'),
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const pak = require('../package.json');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
dependencies: {
|
|
6
|
+
[pak.name]: {
|
|
7
|
+
root: path.join(__dirname, '..'),
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
package/example/src/App.tsx
CHANGED
|
@@ -1,89 +1,135 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { useFreeRasp } from 'freerasp-react-native';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { useFreeRasp } from 'freerasp-react-native';
|
|
5
|
+
import { DemoApp } from './DemoApp';
|
|
6
|
+
import { commonChecks, iosChecks } from './checks';
|
|
7
|
+
|
|
8
|
+
const App = () => {
|
|
9
|
+
const [appChecks, setAppChecks] = React.useState([
|
|
10
|
+
...commonChecks,
|
|
11
|
+
...(Platform.OS === 'ios' ? iosChecks : []),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
const config = {
|
|
15
|
+
androidConfig: {
|
|
16
|
+
packageName: 'com.freeraspreactnativeexample',
|
|
17
|
+
certificateHashes: ['your_signing_certificate_hash_base64'],
|
|
18
|
+
// supportedAlternativeStores: ['storeOne', 'storeTwo'],
|
|
19
|
+
},
|
|
20
|
+
iosConfig: {
|
|
21
|
+
appBundleId: 'com.freeraspreactnativeexample',
|
|
22
|
+
appTeamId: 'your_team_ID',
|
|
23
|
+
},
|
|
24
|
+
watcherMail: 'your_email_address@example.com',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const actions = {
|
|
28
|
+
// Android & iOS
|
|
29
|
+
'privilegedAccess': () => {
|
|
30
|
+
setAppChecks((currentState) =>
|
|
31
|
+
currentState.map((threat) =>
|
|
32
|
+
threat.name === 'Privileged Access'
|
|
33
|
+
? { ...threat, status: 'nok' }
|
|
34
|
+
: threat
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
// Android & iOS
|
|
39
|
+
'debug': () => {
|
|
40
|
+
setAppChecks((currentState) =>
|
|
41
|
+
currentState.map((threat) =>
|
|
42
|
+
threat.name === 'Debug' ? { ...threat, status: 'nok' } : threat
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
// Android & iOS
|
|
47
|
+
'simulator': () => {
|
|
48
|
+
setAppChecks((currentState) =>
|
|
49
|
+
currentState.map((threat) =>
|
|
50
|
+
threat.name === 'Simulator' ? { ...threat, status: 'nok' } : threat
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
},
|
|
54
|
+
// Android & iOS
|
|
55
|
+
'appIntegrity': () => {
|
|
56
|
+
setAppChecks((currentState) =>
|
|
57
|
+
currentState.map((threat) =>
|
|
58
|
+
threat.name === 'App Integrity'
|
|
59
|
+
? { ...threat, status: 'nok' }
|
|
60
|
+
: threat
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
// Android & iOS
|
|
65
|
+
'unofficialStore': () => {
|
|
66
|
+
setAppChecks((currentState) =>
|
|
67
|
+
currentState.map((threat) =>
|
|
68
|
+
threat.name === 'Unofficial Store'
|
|
69
|
+
? { ...threat, status: 'nok' }
|
|
70
|
+
: threat
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
// Android & iOS
|
|
75
|
+
'hooks': () => {
|
|
76
|
+
setAppChecks((currentState) =>
|
|
77
|
+
currentState.map((threat) =>
|
|
78
|
+
threat.name === 'Hooks' ? { ...threat, status: 'nok' } : threat
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
// Android & iOS
|
|
83
|
+
'device binding': () => {
|
|
84
|
+
setAppChecks((currentState) =>
|
|
85
|
+
currentState.map((threat) =>
|
|
86
|
+
threat.name === 'Device Binding'
|
|
87
|
+
? { ...threat, status: 'nok' }
|
|
88
|
+
: threat
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
// Android & iOS
|
|
93
|
+
'secureHardwareNotAvailable': () => {
|
|
94
|
+
setAppChecks((currentState) =>
|
|
95
|
+
currentState.map((threat) =>
|
|
96
|
+
threat.name === 'Secure Hardware Not Available'
|
|
97
|
+
? { ...threat, status: 'nok' }
|
|
98
|
+
: threat
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
// Android & iOS
|
|
103
|
+
'passcode': () => {
|
|
104
|
+
setAppChecks((currentState) =>
|
|
105
|
+
currentState.map((threat) =>
|
|
106
|
+
threat.name === 'Passcode' ? { ...threat, status: 'nok' } : threat
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
// iOS only
|
|
111
|
+
'deviceID': () => {
|
|
112
|
+
setAppChecks((currentState) =>
|
|
113
|
+
currentState.map((threat) =>
|
|
114
|
+
threat.name === 'Device ID' ? { ...threat, status: 'nok' } : threat
|
|
115
|
+
)
|
|
116
|
+
);
|
|
117
|
+
},
|
|
118
|
+
// iOS only
|
|
119
|
+
'passcodeChange': () => {
|
|
120
|
+
setAppChecks((currentState) =>
|
|
121
|
+
currentState.map((threat) =>
|
|
122
|
+
threat.name === 'Passcode Change'
|
|
123
|
+
? { ...threat, status: 'nok' }
|
|
124
|
+
: threat
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
useFreeRasp(config, actions);
|
|
131
|
+
|
|
132
|
+
return <DemoApp checks={appChecks} />;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default App;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* eslint-disable react-native/no-inline-styles */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Box, Flex, HStack, Text, VStack } from '@react-native-material/core';
|
|
4
|
+
import CheckmarkCircle from '../assets/checkmark-circle-outline.png';
|
|
5
|
+
import CloseCircle from '../assets/close-circle-outline.png';
|
|
6
|
+
import TalsecLogo from '../assets/talsec-logo.png';
|
|
7
|
+
import { Image } from 'react-native';
|
|
8
|
+
import { Colors } from './styles';
|
|
9
|
+
|
|
10
|
+
export const DemoApp = (props: any) => {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Flex
|
|
14
|
+
fill
|
|
15
|
+
style={{
|
|
16
|
+
backgroundColor: Colors.background,
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
<VStack>
|
|
21
|
+
<Image source={TalsecLogo} style={{ alignSelf: 'center' }} />;
|
|
22
|
+
<Text
|
|
23
|
+
style={{
|
|
24
|
+
alignSelf: 'center',
|
|
25
|
+
fontWeight: 'bold',
|
|
26
|
+
fontSize: 25,
|
|
27
|
+
color: 'white',
|
|
28
|
+
paddingTop: 15,
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
freeRASP checks:
|
|
32
|
+
</Text>
|
|
33
|
+
{props.checks.map((check: any, idx: number) => (
|
|
34
|
+
<Box
|
|
35
|
+
key={idx}
|
|
36
|
+
style={{
|
|
37
|
+
borderColor:
|
|
38
|
+
check.status === 'ok'
|
|
39
|
+
? Colors.checkOkDark
|
|
40
|
+
: Colors.checkNokDark,
|
|
41
|
+
backgroundColor:
|
|
42
|
+
check.status === 'ok'
|
|
43
|
+
? Colors.checkOkLight
|
|
44
|
+
: Colors.checkNokLight,
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
paddingHorizontal: 30,
|
|
47
|
+
paddingVertical: 4,
|
|
48
|
+
marginVertical: 8,
|
|
49
|
+
marginHorizontal: 20,
|
|
50
|
+
borderRadius: 15,
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<HStack style={{ justifyContent: 'space-between' }}>
|
|
54
|
+
<Text
|
|
55
|
+
style={{
|
|
56
|
+
color: check.status === 'ok' ? 'green' : 'rgb(200, 0, 0)',
|
|
57
|
+
fontWeight: 'bold',
|
|
58
|
+
alignSelf: 'center',
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{check.name}
|
|
62
|
+
</Text>
|
|
63
|
+
{check.status === 'ok' ? (
|
|
64
|
+
<Image
|
|
65
|
+
source={CheckmarkCircle}
|
|
66
|
+
style={{
|
|
67
|
+
tintColor: Colors.checkOkDark,
|
|
68
|
+
width: 30,
|
|
69
|
+
height: 30,
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
) : (
|
|
73
|
+
<Image
|
|
74
|
+
source={CloseCircle}
|
|
75
|
+
style={{
|
|
76
|
+
tintColor: Colors.checkNokDark,
|
|
77
|
+
width: 30,
|
|
78
|
+
height: 30,
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
)}
|
|
82
|
+
</HStack>
|
|
83
|
+
</Box>
|
|
84
|
+
))}
|
|
85
|
+
</VStack>
|
|
86
|
+
</Flex>
|
|
87
|
+
</>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const commonChecks = [
|
|
2
|
+
{ name: 'Privileged Access', status: 'ok' },
|
|
3
|
+
{ name: 'Debug', status: 'ok' },
|
|
4
|
+
{ name: 'Simulator', status: 'ok' },
|
|
5
|
+
{ name: 'App Integrity', status: 'ok' },
|
|
6
|
+
{ name: 'Unofficial Store', status: 'ok' },
|
|
7
|
+
{ name: 'Hooks', status: 'ok' },
|
|
8
|
+
{ name: 'Device Binding', status: 'ok' },
|
|
9
|
+
{ name: 'Secure Hardware Not Available', status: 'ok' },
|
|
10
|
+
{ name: 'Passcode', status: 'ok' },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const iosChecks = [
|
|
14
|
+
{ name: 'Device ID', status: 'ok' },
|
|
15
|
+
{ name: 'Passcode Change', status: 'ok' },
|
|
16
|
+
];
|