freerasp-react-native 3.13.0 → 3.14.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.
Files changed (124) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +4 -2
  3. package/android/build.gradle +1 -1
  4. package/android/gradle.properties +2 -2
  5. package/android/proguard-rules.pro +8 -0
  6. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +59 -10
  7. package/android/src/main/java/com/freeraspreactnative/FreeraspThreatHandler.kt +8 -0
  8. package/android/src/main/java/com/freeraspreactnative/ScreenProtector.kt +164 -0
  9. package/android/src/main/java/com/freeraspreactnative/Threat.kt +5 -1
  10. package/android/src/main/java/com/freeraspreactnative/utils/Extensions.kt +1 -1
  11. package/example/Gemfile +6 -2
  12. package/example/Gemfile.lock +121 -0
  13. package/example/android/app/build.gradle +64 -265
  14. package/example/android/app/src/debug/AndroidManifest.xml +1 -5
  15. package/example/android/app/src/main/AndroidManifest.xml +5 -3
  16. package/example/android/app/src/main/java/com/freerasp/rn/example/MainActivity.kt +22 -0
  17. package/example/android/app/src/main/java/com/freerasp/rn/example/MainApplication.kt +44 -0
  18. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +3 -2
  19. package/example/android/app/src/main/res/values/strings.xml +1 -1
  20. package/example/android/build.gradle +16 -45
  21. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  22. package/example/android/gradle/wrapper/gradle-wrapper.properties +3 -1
  23. package/example/android/gradle.properties +5 -6
  24. package/example/android/gradlew +30 -13
  25. package/example/android/gradlew.bat +21 -16
  26. package/example/android/settings.gradle +5 -10
  27. package/example/app.json +3 -3
  28. package/example/index.js +4 -0
  29. package/example/ios/FreeraspRNExample/AppDelegate.swift +30 -0
  30. package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Info.plist +8 -12
  31. package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/LaunchScreen.storyboard +1 -1
  32. package/example/ios/FreeraspRNExample/PrivacyInfo.xcprivacy +37 -0
  33. package/example/ios/FreeraspRNExample.xcodeproj/project.pbxproj +488 -0
  34. package/example/ios/{FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme → FreeraspRNExample.xcodeproj/xcshareddata/xcschemes/FreeraspRNExample.xcscheme} +12 -12
  35. package/example/ios/{FreeraspReactNativeExample.xcworkspace → FreeraspRNExample.xcworkspace}/contents.xcworkspacedata +1 -1
  36. package/example/ios/Podfile +19 -32
  37. package/example/metro.config.js +13 -14
  38. package/example/package.json +23 -12
  39. package/example/src/App.tsx +18 -0
  40. package/example/src/DemoApp.tsx +181 -79
  41. package/example/src/MalwareModal.tsx +2 -12
  42. package/example/src/checks.ts +2 -0
  43. package/example/yarn.lock +2483 -1624
  44. package/ios/FreeraspReactNative.swift +6 -2
  45. package/ios/TalsecRuntime.xcframework/Info.plist +5 -5
  46. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
  47. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  48. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeResources +87 -87
  49. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
  50. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  51. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +1 -1
  52. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +7 -7
  53. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +4 -4
  54. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +1 -1
  55. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +1 -1
  56. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  57. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +316 -178
  58. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -0
  59. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  60. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +2 -0
  61. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  62. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  63. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
  64. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +7 -7
  65. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +4 -4
  66. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +1 -1
  67. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +1 -1
  68. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  69. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +316 -178
  70. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -0
  71. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  72. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
  73. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +316 -178
  74. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -0
  75. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  76. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -0
  77. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  78. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +33 -33
  79. package/lib/commonjs/index.js +25 -3
  80. package/lib/commonjs/index.js.map +1 -1
  81. package/lib/commonjs/threat.js +3 -1
  82. package/lib/commonjs/threat.js.map +1 -1
  83. package/lib/module/index.js +19 -1
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/threat.js +3 -1
  86. package/lib/module/threat.js.map +1 -1
  87. package/lib/typescript/src/index.d.ts +2 -0
  88. package/lib/typescript/src/index.d.ts.map +1 -1
  89. package/lib/typescript/src/threat.d.ts +2 -0
  90. package/lib/typescript/src/threat.d.ts.map +1 -1
  91. package/lib/typescript/src/types.d.ts +2 -0
  92. package/lib/typescript/src/types.d.ts.map +1 -1
  93. package/package.json +1 -1
  94. package/plugin/build/index.d.ts +1 -0
  95. package/src/index.tsx +24 -0
  96. package/src/threat.ts +6 -0
  97. package/src/types.ts +2 -0
  98. package/example/android/app/_BUCK +0 -55
  99. package/example/android/app/build_defs.bzl +0 -19
  100. package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +0 -73
  101. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +0 -48
  102. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +0 -91
  103. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +0 -116
  104. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +0 -36
  105. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  106. package/example/android/app/src/main/jni/CMakeLists.txt +0 -7
  107. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  108. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  109. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  110. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  111. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  112. package/example/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  113. package/example/android/app/src/main/jni/OnLoad.cpp +0 -11
  114. package/example/ios/File.swift +0 -6
  115. package/example/ios/FreeraspReactNativeExample/AppDelegate.h +0 -8
  116. package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +0 -133
  117. package/example/ios/FreeraspReactNativeExample/main.m +0 -10
  118. package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +0 -3
  119. package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +0 -729
  120. package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  121. package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +0 -66
  122. package/example/ios/FreeraspReactNativeExampleTests/Info.plist +0 -24
  123. /package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
  124. /package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Images.xcassets/Contents.json +0 -0
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,66 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
- #import <XCTest/XCTest.h>
3
-
4
- #import <React/RCTLog.h>
5
- #import <React/RCTRootView.h>
6
-
7
- #define TIMEOUT_SECONDS 600
8
- #define TEXT_TO_LOOK_FOR @"Welcome to React"
9
-
10
- @interface FreeraspReactNativeExampleTests : XCTestCase
11
-
12
- @end
13
-
14
- @implementation FreeraspReactNativeExampleTests
15
-
16
- - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17
- {
18
- if (test(view)) {
19
- return YES;
20
- }
21
- for (UIView *subview in [view subviews]) {
22
- if ([self findSubviewInView:subview matching:test]) {
23
- return YES;
24
- }
25
- }
26
- return NO;
27
- }
28
-
29
- - (void)testRendersWelcomeScreen
30
- {
31
- UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32
- NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33
- BOOL foundElement = NO;
34
-
35
- __block NSString *redboxError = nil;
36
- #ifdef DEBUG
37
- RCTSetLogFunction(
38
- ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39
- if (level >= RCTLogLevelError) {
40
- redboxError = message;
41
- }
42
- });
43
- #endif
44
-
45
- while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46
- [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47
- [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48
-
49
- foundElement = [self findSubviewInView:vc.view
50
- matching:^BOOL(UIView *view) {
51
- if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52
- return YES;
53
- }
54
- return NO;
55
- }];
56
- }
57
-
58
- #ifdef DEBUG
59
- RCTSetLogFunction(RCTDefaultLogFunction);
60
- #endif
61
-
62
- XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63
- XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64
- }
65
-
66
- @end
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>en</string>
7
- <key>CFBundleExecutable</key>
8
- <string>$(EXECUTABLE_NAME)</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>$(PRODUCT_NAME)</string>
15
- <key>CFBundlePackageType</key>
16
- <string>BNDL</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleSignature</key>
20
- <string>????</string>
21
- <key>CFBundleVersion</key>
22
- <string>1</string>
23
- </dict>
24
- </plist>