freerasp-react-native 1.0.0 → 2.0.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 (170) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +423 -413
  3. package/android/build.gradle +90 -87
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +4 -4
  6. package/android/src/main/java/com/freeraspreactnative/FreeraspDeviceStateListener.kt +25 -0
  7. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +125 -108
  8. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt +17 -17
  9. package/example/Gemfile +6 -6
  10. package/example/android/app/_BUCK +55 -55
  11. package/example/android/app/build.gradle +313 -313
  12. package/example/android/app/build_defs.bzl +19 -19
  13. package/example/android/app/proguard-rules.pro +10 -10
  14. package/example/android/app/src/debug/AndroidManifest.xml +13 -13
  15. package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +73 -73
  16. package/example/android/app/src/main/AndroidManifest.xml +26 -26
  17. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +48 -48
  18. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +91 -91
  19. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +116 -116
  20. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +36 -36
  21. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
  22. package/example/android/app/src/main/jni/CMakeLists.txt +7 -7
  23. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -32
  24. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
  25. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
  26. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
  27. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -65
  28. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
  29. package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
  30. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
  31. package/example/android/app/src/main/res/values/strings.xml +3 -3
  32. package/example/android/app/src/main/res/values/styles.xml +9 -9
  33. package/example/android/build.gradle +50 -53
  34. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  35. package/example/android/gradle.properties +40 -40
  36. package/example/android/gradlew +234 -234
  37. package/example/android/settings.gradle +11 -11
  38. package/example/app.json +3 -3
  39. package/example/assets/checkmark-circle-outline.png +0 -0
  40. package/example/assets/checkmark-circle-outline.svg +1 -0
  41. package/example/assets/close-circle-outline.png +0 -0
  42. package/example/assets/close-circle-outline.svg +1 -0
  43. package/example/assets/talsec-logo.png +0 -0
  44. package/example/babel.config.js +17 -17
  45. package/example/index.js +5 -5
  46. package/example/ios/File.swift +6 -6
  47. package/example/ios/FreeraspReactNativeExample/AppDelegate.h +8 -8
  48. package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +133 -133
  49. package/example/ios/FreeraspReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
  50. package/example/ios/FreeraspReactNativeExample/Images.xcassets/Contents.json +6 -6
  51. package/example/ios/FreeraspReactNativeExample/Info.plist +55 -55
  52. package/example/ios/FreeraspReactNativeExample/LaunchScreen.storyboard +47 -47
  53. package/example/ios/FreeraspReactNativeExample/main.m +10 -10
  54. package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +3 -3
  55. package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +4 -2
  56. package/example/ios/FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme +88 -106
  57. package/example/ios/FreeraspReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -10
  58. package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  59. package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +66 -66
  60. package/example/ios/FreeraspReactNativeExampleTests/Info.plist +24 -24
  61. package/example/ios/Podfile +43 -43
  62. package/example/ios/Podfile.lock +590 -584
  63. package/example/metro.config.js +40 -40
  64. package/example/package.json +24 -21
  65. package/example/react-native.config.js +10 -10
  66. package/example/src/App.tsx +136 -89
  67. package/example/src/DemoApp.tsx +89 -0
  68. package/example/src/checks.ts +16 -0
  69. package/example/src/styles.ts +7 -0
  70. package/example/yarn.lock +4644 -4154
  71. package/freerasp-react-native.podspec +36 -36
  72. package/ios/FreeraspReactNative-Bridging-Header.h +3 -3
  73. package/ios/FreeraspReactNative.m +14 -14
  74. package/ios/FreeraspReactNative.swift +62 -53
  75. package/ios/FreeraspReactNative.xcodeproj/xcshareddata/xcschemes/FreeraspReactNative.xcscheme +67 -67
  76. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/Info.plist +40 -40
  77. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  78. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  79. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -222
  80. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  81. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  82. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -77
  83. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/easy.h +123 -123
  84. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  85. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -456
  86. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -68
  87. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  88. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -504
  89. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  90. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  91. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +52 -51
  92. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  93. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  94. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -3154
  95. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -12
  96. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  97. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  98. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -450
  99. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  100. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  101. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -77
  102. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/easy.h +123 -123
  103. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  104. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/multi.h +456 -456
  105. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -68
  106. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  107. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/system.h +504 -504
  108. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  109. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  110. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +52 -51
  111. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +52 -51
  112. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  113. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  114. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -344
  115. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/cacert.pem +3154 -3154
  116. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -12
  117. package/lib/commonjs/index.js.map +1 -1
  118. package/lib/module/index.js.map +1 -1
  119. package/lib/typescript/index.d.ts +36 -35
  120. package/lib/typescript/index.d.ts.map +1 -1
  121. package/package.json +161 -161
  122. package/src/index.tsx +91 -90
  123. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  124. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -222
  125. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  126. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +0 -68
  127. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  128. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  129. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  130. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  131. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  132. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +0 -12
  133. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  134. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -450
  135. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  136. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  137. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  138. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  139. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -51
  140. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  141. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  142. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +0 -12
  143. package/ios/Release/TalsecRuntime.xcframework/Info.plist +0 -40
  144. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  145. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +0 -77
  146. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +0 -123
  147. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  148. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +0 -51
  149. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  150. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  151. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  152. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  153. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +0 -77
  154. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +0 -123
  155. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  156. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  157. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +0 -68
  158. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  159. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  160. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  161. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  162. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  163. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -51
  164. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  165. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +0 -344
  166. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  167. package/ios/TalsecRuntime.xcframework +0 -1
  168. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  169. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  170. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
@@ -1,12 +1,12 @@
1
- framework module TalsecRuntime {
2
- umbrella header "TalsecRuntime_iOS.h"
3
-
4
- export *
5
- module * { export * }
6
-
7
- explicit module Private {
8
- private header "CryptoBridgingHeader.h"
9
- private header "CurlWrapper.h"
10
- export *
11
- }
12
- }
1
+ framework module TalsecRuntime {
2
+ umbrella header "TalsecRuntime_iOS.h"
3
+
4
+ export *
5
+ module * { export * }
6
+
7
+ explicit module Private {
8
+ private header "CryptoBridgingHeader.h"
9
+ private header "CurlWrapper.h"
10
+ export *
11
+ }
12
+ }
@@ -1 +1 @@
1
- {"version":3,"names":["FreeraspReactNative","NativeModules","eventEmitter","NativeEventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions","useEffect"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;;;;;AAAA;AACA;AAmCA,MAAM;EAAEA;AAAoB,CAAC,GAAGC,0BAAa;AAE7C,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAACH,mBAAmB,CAAC;AAChE,MAAMI,eAAsC,GAAG,EAAE;AAE1C,MAAMC,kBAAkB,GAC7BC,MAAyE,IACtE;EACHF,eAAe,CAACG,IAAI,CAClBL,YAAY,CAACM,WAAW,CAAC,SAAS,EAAE,MAAM;IACxCC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC,CAAC,CACH;EAEDN,eAAe,CAACG,IAAI,CAClBL,YAAY,CAACM,WAAW,CACtB,qBAAqB,EACpBG,CAAsB,IAAK;IAC1BF,OAAO,CAACG,IAAI,CACT,sDAAqDD,CAAC,CAACE,OAAQ,EAAC,CAClE;EACH,CAAC,CACF,CACF;EAED,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,MAAM,CAAC,EAAE;IACrDF,eAAe,CAACG,IAAI,CAACL,YAAY,CAACM,WAAW,CAACM,MAAM,EAAEC,MAAM,CAAC,CAAC;EAChE;AACF,CAAC;AAAC;AAEK,MAAMG,qBAAqB,GAAG,MAAM;EACzCd,eAAe,CAACe,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAAC;AAEK,MAAMC,WAAW,GAAIC,OAAqB,IAAW;EAC1D,OAAOvB,mBAAmB,CAACsB,WAAW,CAACC,OAAO,CAAC;AACjD,CAAC;AAAC;AAEK,MAAMC,WAAW,GAAG,CACzBlB,MAAoB,EACpBmB,OAA0E,KACvE;EACH,IAAAC,gBAAS,EAAC,MAAM;IACdrB,kBAAkB,CAACoB,OAAO,CAAC;IAC3BH,WAAW,CAAChB,MAAM,CAAC;IAEnB,OAAO,MAAM;MACXY,qBAAqB,EAAE;IACzB,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAC;AAAA,eAEalB,mBAAmB;AAAA"}
1
+ {"version":3,"names":["FreeraspReactNative","NativeModules","eventEmitter","NativeEventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeR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B,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAC;AAAA,eAEalB,mBAAmB;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","NativeEventEmitter","NativeModules","FreeraspReactNative","eventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAEEC,kBAAkB,EAClBC,aAAa,QACR,cAAc;AA+BrB,MAAM;EAAEC;AAAoB,CAAC,GAAGD,aAAa;AAE7C,MAAME,YAAY,GAAG,IAAIH,kBAAkB,CAACE,mBAAmB,CAAC;AAChE,MAAME,eAAsC,GAAG,EAAE;AAEjD,OAAO,MAAMC,kBAAkB,GAC7BC,MAAyE,IACtE;EACHF,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CAAC,SAAS,EAAE,MAAM;IACxCC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC,CAAC,CACH;EAEDN,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CACtB,qBAAqB,EACpBG,CAAsB,IAAK;IAC1BF,OAAO,CAACG,IAAI,CACT,sDAAqDD,CAAC,CAACE,OAAQ,EAAC,CAClE;EACH,CAAC,CACF,CACF;EAED,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,MAAM,CAAC,EAAE;IACrDF,eAAe,CAACG,IAAI,CAACJ,YAAY,CAACK,WAAW,CAACM,MAAM,EAAEC,MAAM,CAAC,CAAC;EAChE;AACF,CAAC;AAED,OAAO,MAAMG,qBAAqB,GAAG,MAAM;EACzCd,eAAe,CAACe,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAED,OAAO,MAAMC,WAAW,GAAIC,OAAqB,IAAW;EAC1D,OAAOrB,mBAAmB,CAACoB,WAAW,CAACC,OAAO,CAAC;AACjD,CAAC;AAED,OAAO,MAAMC,WAAW,GAAG,CACzBlB,MAAoB,EACpBmB,OAA0E,KACvE;EACH1B,SAAS,CAAC,MAAM;IACdM,kBAAkB,CAACoB,OAAO,CAAC;IAC3BH,WAAW,CAAChB,MAAM,CAAC;IAEnB,OAAO,MAAM;MACXY,qBAAqB,EAAE;IACzB,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAED,eAAehB,mBAAmB"}
1
+ {"version":3,"names":["useEffect","NativeEventEmitter","NativeModules","FreeraspReactNative","eventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAEEC,kBAAkB,EAClBC,aAAa,QACR,cAAc;AAgCrB,MAAM;EAAEC;AAAoB,CAAC,GAAGD,aAAa;AAE7C,MAAME,YAAY,GAAG,IAAIH,kBAAkB,CAACE,mBAAmB,CAAC;AAChE,MAAME,eAAsC,GAAG,EAAE;AAEjD,OAAO,MAAMC,kBAAkB,GAC7BC,MAAyE,IACtE;EACHF,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CAAC,SAAS,EAAE,MAAM;IACxCC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC,CAAC,CACH;EAEDN,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CACtB,qBAAqB,EACpBG,CAAsB,IAAK;IAC1BF,OAAO,CAACG,IAAI,CACT,sDAAqDD,CAAC,CAACE,OAAQ,EAAC,CAClE;EACH,CAAC,CACF,CACF;EAED,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,MAAM,CAAC,EAAE;IACrDF,eAAe,CAACG,IAAI,CAACJ,YAAY,CAACK,WAAW,CAACM,MAAM,EAAEC,MAAM,CAAC,CAAC;EAChE;AACF,CAAC;AAED,OAAO,MAAMG,qBAAqB,GAAG,MAAM;EACzCd,eAAe,CAACe,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAED,OAAO,MAAMC,WAAW,GAAIC,OAAqB,IAAW;EAC1D,OAAOrB,mBAAmB,CAACoB,WAAW,CAACC,OAAO,CAAC;AACjD,CAAC;AAED,OAAO,MAAMC,WAAW,GAAG,CACzBlB,MAAoB,EACpBmB,OAA0E,KACvE;EACH1B,SAAS,CAAC,MAAM;IACdM,kBAAkB,CAACoB,OAAO,CAAC;IAC3BH,WAAW,CAAChB,MAAM,CAAC;IAEnB,OAAO,MAAM;MACXY,qBAAqB,EAAE;IACzB,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAED,eAAehB,mBAAmB"}
@@ -1,36 +1,37 @@
1
- type TalsecConfig = {
2
- androidConfig: {
3
- packageName: string;
4
- certificateHashes: string[];
5
- supportedAlternativeStores?: string[];
6
- };
7
- iosConfig: {
8
- appBundleId: string;
9
- appTeamId: string;
10
- };
11
- watcherMail: string;
12
- };
13
- type NativeEventEmitterActions = {
14
- 'privilegedAccess'?: () => any;
15
- 'debug'?: () => any;
16
- 'simulator'?: () => any;
17
- 'appIntegrity'?: () => any;
18
- 'unofficialStore'?: () => any;
19
- 'hooks'?: () => any;
20
- 'device binding'?: () => any;
21
- 'deviceID'?: () => any;
22
- 'missingSecureEnclave'?: () => any;
23
- 'passcodeChange'?: () => any;
24
- 'passcode'?: () => any;
25
- 'started'?: () => any;
26
- 'initializationError'?: (reason: {
27
- message: string;
28
- }) => any;
29
- };
30
- declare const FreeraspReactNative: any;
31
- export declare const setThreatListeners: <T extends NativeEventEmitterActions>(config: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>) => void;
32
- export declare const removeThreatListeners: () => void;
33
- export declare const talsecStart: (options: TalsecConfig) => void;
34
- export declare const useFreeRasp: <T extends NativeEventEmitterActions>(config: TalsecConfig, actions: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>) => void;
35
- export default FreeraspReactNative;
1
+ type TalsecConfig = {
2
+ androidConfig?: {
3
+ packageName: string;
4
+ certificateHashes: string[];
5
+ supportedAlternativeStores?: string[];
6
+ };
7
+ iosConfig?: {
8
+ appBundleId: string;
9
+ appTeamId: string;
10
+ };
11
+ watcherMail: string;
12
+ isProd?: boolean;
13
+ };
14
+ type NativeEventEmitterActions = {
15
+ privilegedAccess?: () => any;
16
+ debug?: () => any;
17
+ simulator?: () => any;
18
+ appIntegrity?: () => any;
19
+ unofficialStore?: () => any;
20
+ hooks?: () => any;
21
+ deviceBinding?: () => any;
22
+ deviceID?: () => any;
23
+ passcodeChange?: () => any;
24
+ passcode?: () => any;
25
+ secureHardwareNotAvailable?: () => any;
26
+ started?: () => any;
27
+ initializationError?: (reason: {
28
+ message: string;
29
+ }) => any;
30
+ };
31
+ declare const FreeraspReactNative: any;
32
+ export declare const setThreatListeners: <T extends NativeEventEmitterActions>(config: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>) => void;
33
+ export declare const removeThreatListeners: () => void;
34
+ export declare const talsecStart: (options: TalsecConfig) => void;
35
+ export declare const useFreeRasp: <T extends NativeEventEmitterActions>(config: TalsecConfig, actions: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>) => void;
36
+ export default FreeraspReactNative;
36
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAOA,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAC5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
- {
2
- "name": "freerasp-react-native",
3
- "version": "1.0.0",
4
- "description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
8
- "react-native": "src/index",
9
- "source": "src/index",
10
- "files": [
11
- "src",
12
- "lib",
13
- "android",
14
- "ios",
15
- "cpp",
16
- "example",
17
- "*.podspec",
18
- "!lib/typescript/example",
19
- "!ios/build",
20
- "!android/build",
21
- "!android/gradle",
22
- "!android/gradlew",
23
- "!android/gradlew.bat",
24
- "!android/local.properties",
25
- "!**/__tests__",
26
- "!**/__fixtures__",
27
- "!**/__mocks__",
28
- "!**/.*"
29
- ],
30
- "scripts": {
31
- "typecheck": "tsc --noEmit",
32
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
- "prepack": "bob build",
34
- "release": "release-it",
35
- "example": "yarn --cwd example",
36
- "bootstrap": "yarn example && yarn install && yarn example pods",
37
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38
- },
39
- "keywords": [
40
- "react-native",
41
- "react-native-library",
42
- "react-native-plugin",
43
- "freerasp",
44
- "react-native-security",
45
- "react-native-app-security",
46
- "react-native-tampering-detection",
47
- "react-native-root-detection",
48
- "react-native-app-shielding",
49
- "react-native-rasp",
50
- "react-native-tampering",
51
- "react-native-reverse-engineering",
52
- "react-native-application-security",
53
- "react-native-frida"
54
- ],
55
- "repository": "https://github.com/talsec/Free-RASP-ReactNative",
56
- "author": "Talsec <info@talsec.app> (https://github.com/talsec)",
57
- "license": "MIT",
58
- "bugs": {
59
- "url": "https://github.com/talsec/Free-RASP-ReactNative/issues"
60
- },
61
- "homepage": "https://github.com/talsec/Free-RASP-ReactNative#readme",
62
- "publishConfig": {
63
- "registry": "https://registry.npmjs.org/"
64
- },
65
- "devDependencies": {
66
- "@react-native-community/eslint-config": "^3.0.2",
67
- "@release-it/conventional-changelog": "^5.0.0",
68
- "@types/react": "17.0.21",
69
- "@types/react-native": "0.70.0",
70
- "react": "18.1.0",
71
- "react-native": "0.70.6",
72
- "del-cli": "^5.0.0",
73
- "eslint": "^8.4.1",
74
- "eslint-config-prettier": "^8.5.0",
75
- "eslint-plugin-prettier": "^4.0.0",
76
- "pod-install": "^0.1.0",
77
- "prettier": "^2.0.5",
78
- "react-native-builder-bob": "^0.20.0",
79
- "release-it": "^15.0.0",
80
- "typescript": "^4.5.2"
81
- },
82
- "resolutions": {
83
- "@types/react": "17.0.21"
84
- },
85
- "peerDependencies": {
86
- "react": "^18.1.0",
87
- "react-native": "*"
88
- },
89
- "engines": {
90
- "node": ">= 16.0.0"
91
- },
92
- "packageManager": "^yarn@1.22.15",
93
- "jest": {
94
- "preset": "react-native",
95
- "modulePathIgnorePatterns": [
96
- "<rootDir>/example/node_modules",
97
- "<rootDir>/lib/"
98
- ]
99
- },
100
- "release-it": {
101
- "git": {
102
- "commitMessage": "chore: release ${version}",
103
- "tagName": "v${version}"
104
- },
105
- "npm": {
106
- "publish": true
107
- },
108
- "github": {
109
- "release": true
110
- },
111
- "plugins": {
112
- "@release-it/conventional-changelog": {
113
- "preset": "angular"
114
- }
115
- }
116
- },
117
- "eslintConfig": {
118
- "root": true,
119
- "extends": [
120
- "@react-native-community",
121
- "prettier"
122
- ],
123
- "rules": {
124
- "prettier/prettier": [
125
- "error",
126
- {
127
- "quoteProps": "consistent",
128
- "singleQuote": true,
129
- "tabWidth": 2,
130
- "trailingComma": "es5",
131
- "useTabs": false
132
- }
133
- ]
134
- }
135
- },
136
- "eslintIgnore": [
137
- "node_modules/",
138
- "lib/"
139
- ],
140
- "prettier": {
141
- "quoteProps": "consistent",
142
- "singleQuote": true,
143
- "tabWidth": 2,
144
- "trailingComma": "es5",
145
- "useTabs": false
146
- },
147
- "react-native-builder-bob": {
148
- "source": "src",
149
- "output": "lib",
150
- "targets": [
151
- "commonjs",
152
- "module",
153
- [
154
- "typescript",
155
- {
156
- "project": "tsconfig.build.json"
157
- }
158
- ]
159
- ]
160
- }
161
- }
1
+ {
2
+ "name": "freerasp-react-native",
3
+ "version": "2.0.0",
4
+ "description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "example",
17
+ "*.podspec",
18
+ "!lib/typescript/example",
19
+ "!ios/build",
20
+ "!android/build",
21
+ "!android/gradle",
22
+ "!android/gradlew",
23
+ "!android/gradlew.bat",
24
+ "!android/local.properties",
25
+ "!**/__tests__",
26
+ "!**/__fixtures__",
27
+ "!**/__mocks__",
28
+ "!**/.*"
29
+ ],
30
+ "scripts": {
31
+ "typecheck": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
+ "prepack": "bob build",
34
+ "release": "release-it",
35
+ "example": "yarn --cwd example",
36
+ "bootstrap": "yarn example && yarn install && yarn example pods",
37
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38
+ },
39
+ "keywords": [
40
+ "react-native",
41
+ "react-native-library",
42
+ "react-native-plugin",
43
+ "freerasp",
44
+ "react-native-security",
45
+ "react-native-app-security",
46
+ "react-native-tampering-detection",
47
+ "react-native-root-detection",
48
+ "react-native-app-shielding",
49
+ "react-native-rasp",
50
+ "react-native-tampering",
51
+ "react-native-reverse-engineering",
52
+ "react-native-application-security",
53
+ "react-native-frida"
54
+ ],
55
+ "repository": "https://github.com/talsec/Free-RASP-ReactNative",
56
+ "author": "Talsec <info@talsec.app> (https://github.com/talsec)",
57
+ "license": "MIT",
58
+ "bugs": {
59
+ "url": "https://github.com/talsec/Free-RASP-ReactNative/issues"
60
+ },
61
+ "homepage": "https://github.com/talsec/Free-RASP-ReactNative#readme",
62
+ "publishConfig": {
63
+ "registry": "https://registry.npmjs.org/"
64
+ },
65
+ "devDependencies": {
66
+ "@react-native-community/eslint-config": "^3.0.2",
67
+ "@release-it/conventional-changelog": "^5.0.0",
68
+ "@types/react": "17.0.21",
69
+ "@types/react-native": "0.70.0",
70
+ "del-cli": "^5.0.0",
71
+ "eslint": "^8.4.1",
72
+ "eslint-config-prettier": "^8.5.0",
73
+ "eslint-plugin-prettier": "^4.0.0",
74
+ "pod-install": "^0.1.0",
75
+ "prettier": "^2.0.5",
76
+ "react": "18.1.0",
77
+ "react-native": "0.70.6",
78
+ "react-native-builder-bob": "^0.20.0",
79
+ "release-it": "^15.0.0",
80
+ "typescript": "^4.5.2"
81
+ },
82
+ "resolutions": {
83
+ "@types/react": "17.0.21"
84
+ },
85
+ "peerDependencies": {
86
+ "react": "^18.1.0",
87
+ "react-native": "*"
88
+ },
89
+ "engines": {
90
+ "node": ">= 16.0.0"
91
+ },
92
+ "packageManager": "^yarn@1.22.15",
93
+ "jest": {
94
+ "preset": "react-native",
95
+ "modulePathIgnorePatterns": [
96
+ "<rootDir>/example/node_modules",
97
+ "<rootDir>/lib/"
98
+ ]
99
+ },
100
+ "release-it": {
101
+ "git": {
102
+ "commitMessage": "chore: release ${version}",
103
+ "tagName": "v${version}"
104
+ },
105
+ "npm": {
106
+ "publish": true
107
+ },
108
+ "github": {
109
+ "release": true
110
+ },
111
+ "plugins": {
112
+ "@release-it/conventional-changelog": {
113
+ "preset": "angular"
114
+ }
115
+ }
116
+ },
117
+ "eslintConfig": {
118
+ "root": true,
119
+ "extends": [
120
+ "@react-native-community",
121
+ "prettier"
122
+ ],
123
+ "rules": {
124
+ "prettier/prettier": [
125
+ "error",
126
+ {
127
+ "quoteProps": "consistent",
128
+ "singleQuote": true,
129
+ "tabWidth": 2,
130
+ "trailingComma": "es5",
131
+ "useTabs": false
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ "eslintIgnore": [
137
+ "node_modules/",
138
+ "lib/"
139
+ ],
140
+ "prettier": {
141
+ "quoteProps": "consistent",
142
+ "singleQuote": true,
143
+ "tabWidth": 2,
144
+ "trailingComma": "es5",
145
+ "useTabs": false
146
+ },
147
+ "react-native-builder-bob": {
148
+ "source": "src",
149
+ "output": "lib",
150
+ "targets": [
151
+ "commonjs",
152
+ "module",
153
+ [
154
+ "typescript",
155
+ {
156
+ "project": "tsconfig.build.json"
157
+ }
158
+ ]
159
+ ]
160
+ }
161
+ }
package/src/index.tsx CHANGED
@@ -1,90 +1,91 @@
1
- import { useEffect } from 'react';
2
- import {
3
- EmitterSubscription,
4
- NativeEventEmitter,
5
- NativeModules,
6
- } from 'react-native';
7
-
8
- type TalsecConfig = {
9
- androidConfig: {
10
- packageName: string;
11
- certificateHashes: string[];
12
- supportedAlternativeStores?: string[];
13
- };
14
- iosConfig: {
15
- appBundleId: string;
16
- appTeamId: string;
17
- };
18
- watcherMail: string;
19
- };
20
-
21
- type NativeEventEmitterActions = {
22
- 'privilegedAccess'?: () => any;
23
- 'debug'?: () => any;
24
- 'simulator'?: () => any;
25
- 'appIntegrity'?: () => any;
26
- 'unofficialStore'?: () => any;
27
- 'hooks'?: () => any;
28
- 'device binding'?: () => any;
29
- 'deviceID'?: () => any;
30
- 'missingSecureEnclave'?: () => any;
31
- 'passcodeChange'?: () => any;
32
- 'passcode'?: () => any;
33
- 'started'?: () => any;
34
- 'initializationError'?: (reason: { message: string }) => any;
35
- };
36
-
37
- const { FreeraspReactNative } = NativeModules;
38
-
39
- const eventEmitter = new NativeEventEmitter(FreeraspReactNative);
40
- const activeListeners: EmitterSubscription[] = [];
41
-
42
- export const setThreatListeners = <T extends NativeEventEmitterActions>(
43
- config: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>
44
- ) => {
45
- activeListeners.push(
46
- eventEmitter.addListener('started', () => {
47
- console.log('Talsec initialized.');
48
- })
49
- );
50
-
51
- activeListeners.push(
52
- eventEmitter.addListener(
53
- 'initializationError',
54
- (e: { message: string }) => {
55
- console.warn(
56
- `Error during Talsec Native plugin initialization - ${e.message}`
57
- );
58
- }
59
- )
60
- );
61
-
62
- for (const [threat, action] of Object.entries(config)) {
63
- activeListeners.push(eventEmitter.addListener(threat, action));
64
- }
65
- };
66
-
67
- export const removeThreatListeners = () => {
68
- activeListeners.forEach((listener) => listener.remove());
69
- };
70
-
71
- export const talsecStart = (options: TalsecConfig): void => {
72
- return FreeraspReactNative.talsecStart(options);
73
- };
74
-
75
- export const useFreeRasp = <T extends NativeEventEmitterActions>(
76
- config: TalsecConfig,
77
- actions: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>
78
- ) => {
79
- useEffect(() => {
80
- setThreatListeners(actions);
81
- talsecStart(config);
82
-
83
- return () => {
84
- removeThreatListeners();
85
- };
86
- // eslint-disable-next-line react-hooks/exhaustive-deps
87
- }, []);
88
- };
89
-
90
- export default FreeraspReactNative;
1
+ import { useEffect } from 'react';
2
+ import {
3
+ EmitterSubscription,
4
+ NativeEventEmitter,
5
+ NativeModules,
6
+ } from 'react-native';
7
+
8
+ type TalsecConfig = {
9
+ androidConfig?: {
10
+ packageName: string;
11
+ certificateHashes: string[];
12
+ supportedAlternativeStores?: string[];
13
+ };
14
+ iosConfig?: {
15
+ appBundleId: string;
16
+ appTeamId: string;
17
+ };
18
+ watcherMail: string;
19
+ isProd?: boolean;
20
+ };
21
+
22
+ type NativeEventEmitterActions = {
23
+ privilegedAccess?: () => any;
24
+ debug?: () => any;
25
+ simulator?: () => any;
26
+ appIntegrity?: () => any;
27
+ unofficialStore?: () => any;
28
+ hooks?: () => any;
29
+ deviceBinding?: () => any;
30
+ deviceID?: () => any;
31
+ passcodeChange?: () => any;
32
+ passcode?: () => any;
33
+ secureHardwareNotAvailable?: () => any;
34
+ started?: () => any;
35
+ initializationError?: (reason: { message: string }) => any;
36
+ };
37
+
38
+ const { FreeraspReactNative } = NativeModules;
39
+
40
+ const eventEmitter = new NativeEventEmitter(FreeraspReactNative);
41
+ const activeListeners: EmitterSubscription[] = [];
42
+
43
+ export const setThreatListeners = <T extends NativeEventEmitterActions>(
44
+ config: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>
45
+ ) => {
46
+ activeListeners.push(
47
+ eventEmitter.addListener('started', () => {
48
+ console.log('Talsec initialized.');
49
+ })
50
+ );
51
+
52
+ activeListeners.push(
53
+ eventEmitter.addListener(
54
+ 'initializationError',
55
+ (e: { message: string }) => {
56
+ console.warn(
57
+ `Error during Talsec Native plugin initialization - ${e.message}`
58
+ );
59
+ }
60
+ )
61
+ );
62
+
63
+ for (const [threat, action] of Object.entries(config)) {
64
+ activeListeners.push(eventEmitter.addListener(threat, action));
65
+ }
66
+ };
67
+
68
+ export const removeThreatListeners = () => {
69
+ activeListeners.forEach((listener) => listener.remove());
70
+ };
71
+
72
+ export const talsecStart = (options: TalsecConfig): void => {
73
+ return FreeraspReactNative.talsecStart(options);
74
+ };
75
+
76
+ export const useFreeRasp = <T extends NativeEventEmitterActions>(
77
+ config: TalsecConfig,
78
+ actions: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>
79
+ ) => {
80
+ useEffect(() => {
81
+ setThreatListeners(actions);
82
+ talsecStart(config);
83
+
84
+ return () => {
85
+ removeThreatListeners();
86
+ };
87
+ // eslint-disable-next-line react-hooks/exhaustive-deps
88
+ }, []);
89
+ };
90
+
91
+ export default FreeraspReactNative;