freerasp-react-native 5.3.0 → 6.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +2 -0
  3. package/android/build.gradle +3 -3
  4. package/android/proguard-rules.pro +3 -3
  5. package/android/src/main/AndroidManifest.xml +1 -1
  6. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/FreeraspReactNativeModule.kt +177 -17
  7. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/FreeraspReactNativePackage.kt +1 -1
  8. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/PluginThreatHandler.kt +20 -7
  9. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/ScreenProtector.kt +1 -1
  10. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/dispatchers/ExecutionStateDispatcher.kt +3 -3
  11. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/dispatchers/ThreatDispatcher.kt +23 -3
  12. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/events/BaseRaspEvent.kt +1 -1
  13. package/android/src/main/java/app/talsec/rasp/reactnative/events/RaspExecutionStateEvent.kt +22 -0
  14. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/events/ThreatEvent.kt +6 -3
  15. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/exceptions/TalsecException.kt +1 -1
  16. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/interfaces/PluginExecutionStateListener.kt +2 -2
  17. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/interfaces/PluginThreatListener.kt +4 -2
  18. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/models/RNSuspiciousAppInfo.kt +1 -1
  19. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/Extensions.kt +4 -4
  20. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/RandomGenerator.kt +1 -1
  21. package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/Utils.kt +1 -1
  22. package/ios/FreeraspReactNative.swift +17 -8
  23. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
  24. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeResources +88 -88
  25. package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
  26. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  27. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
  28. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +292 -265
  29. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +10 -11
  30. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +4 -6
  31. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/header.h +9 -9
  32. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +147 -112
  33. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +1 -1
  34. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +14 -23
  35. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
  36. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +29 -28
  37. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/websockets.h +10 -10
  38. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  39. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +563 -312
  40. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +10 -3
  41. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  42. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +10 -3
  43. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  44. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/_CodeSignature/CodeResources +35 -35
  45. package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +483 -1088
  46. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
  47. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +4 -4
  48. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +292 -265
  49. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +10 -11
  50. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +4 -6
  51. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/header.h +9 -9
  52. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +147 -112
  53. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +1 -1
  54. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +14 -23
  55. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
  56. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +29 -28
  57. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/websockets.h +10 -10
  58. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  59. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +548 -297
  60. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +10 -3
  61. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  62. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -3
  63. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +548 -297
  64. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +10 -3
  65. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  66. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +10 -3
  67. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  68. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +43 -43
  69. package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +483 -1088
  70. package/ios/TalsecRuntimePackage/Package.swift +2 -2
  71. package/ios/dispatchers/ExecutionStateDispatcher.swift +4 -3
  72. package/ios/models/RaspExecutionStates.swift +10 -3
  73. package/ios/utils/EventIdentifiers.swift +2 -2
  74. package/lib/commonjs/api/listeners/raspExecutionState.js +13 -7
  75. package/lib/commonjs/api/listeners/raspExecutionState.js.map +1 -1
  76. package/lib/commonjs/api/listeners/threat.js +19 -8
  77. package/lib/commonjs/api/listeners/threat.js.map +1 -1
  78. package/lib/commonjs/api/methods/internal.js +20 -0
  79. package/lib/commonjs/api/methods/internal.js.map +1 -0
  80. package/lib/commonjs/api/methods/native.js +113 -21
  81. package/lib/commonjs/api/methods/native.js.map +1 -1
  82. package/lib/commonjs/api/methods/reactNative.js +38 -10
  83. package/lib/commonjs/api/methods/reactNative.js.map +1 -1
  84. package/lib/commonjs/channels/raspExecutionState.js +3 -3
  85. package/lib/commonjs/channels/raspExecutionState.js.map +1 -1
  86. package/lib/commonjs/channels/threat.js +4 -4
  87. package/lib/commonjs/channels/threat.js.map +1 -1
  88. package/lib/commonjs/index.js +23 -0
  89. package/lib/commonjs/index.js.map +1 -1
  90. package/lib/commonjs/models/raspExecutionState.js +4 -2
  91. package/lib/commonjs/models/raspExecutionState.js.map +1 -1
  92. package/lib/commonjs/models/threat.js +2 -1
  93. package/lib/commonjs/models/threat.js.map +1 -1
  94. package/lib/commonjs/types/errors.js +50 -0
  95. package/lib/commonjs/types/errors.js.map +1 -0
  96. package/lib/commonjs/types/types.js +4 -0
  97. package/lib/module/api/listeners/raspExecutionState.js +10 -4
  98. package/lib/module/api/listeners/raspExecutionState.js.map +1 -1
  99. package/lib/module/api/listeners/threat.js +16 -5
  100. package/lib/module/api/listeners/threat.js.map +1 -1
  101. package/lib/module/api/methods/internal.js +13 -0
  102. package/lib/module/api/methods/internal.js.map +1 -0
  103. package/lib/module/api/methods/native.js +106 -17
  104. package/lib/module/api/methods/native.js.map +1 -1
  105. package/lib/module/api/methods/reactNative.js +39 -12
  106. package/lib/module/api/methods/reactNative.js.map +1 -1
  107. package/lib/module/channels/raspExecutionState.js +1 -1
  108. package/lib/module/channels/raspExecutionState.js.map +1 -1
  109. package/lib/module/channels/threat.js +2 -2
  110. package/lib/module/channels/threat.js.map +1 -1
  111. package/lib/module/index.js +2 -0
  112. package/lib/module/index.js.map +1 -1
  113. package/lib/module/models/raspExecutionState.js +4 -2
  114. package/lib/module/models/raspExecutionState.js.map +1 -1
  115. package/lib/module/models/threat.js +2 -1
  116. package/lib/module/models/threat.js.map +1 -1
  117. package/lib/module/types/errors.js +41 -0
  118. package/lib/module/types/errors.js.map +1 -0
  119. package/lib/module/types/types.js +1 -1
  120. package/lib/typescript/src/api/listeners/raspExecutionState.d.ts.map +1 -1
  121. package/lib/typescript/src/api/listeners/threat.d.ts.map +1 -1
  122. package/lib/typescript/src/api/methods/internal.d.ts +7 -0
  123. package/lib/typescript/src/api/methods/internal.d.ts.map +1 -0
  124. package/lib/typescript/src/api/methods/native.d.ts +56 -7
  125. package/lib/typescript/src/api/methods/native.d.ts.map +1 -1
  126. package/lib/typescript/src/api/methods/reactNative.d.ts +11 -2
  127. package/lib/typescript/src/api/methods/reactNative.d.ts.map +1 -1
  128. package/lib/typescript/src/channels/threat.d.ts +1 -0
  129. package/lib/typescript/src/channels/threat.d.ts.map +1 -1
  130. package/lib/typescript/src/index.d.ts +2 -0
  131. package/lib/typescript/src/index.d.ts.map +1 -1
  132. package/lib/typescript/src/models/raspExecutionState.d.ts +3 -1
  133. package/lib/typescript/src/models/raspExecutionState.d.ts.map +1 -1
  134. package/lib/typescript/src/models/threat.d.ts +1 -0
  135. package/lib/typescript/src/models/threat.d.ts.map +1 -1
  136. package/lib/typescript/src/types/errors.d.ts +26 -0
  137. package/lib/typescript/src/types/errors.d.ts.map +1 -0
  138. package/lib/typescript/src/types/types.d.ts +61 -26
  139. package/lib/typescript/src/types/types.d.ts.map +1 -1
  140. package/package.json +1 -1
  141. package/src/api/listeners/raspExecutionState.ts +9 -3
  142. package/src/api/listeners/threat.ts +29 -5
  143. package/src/api/methods/internal.ts +13 -0
  144. package/src/api/methods/native.ts +125 -21
  145. package/src/api/methods/reactNative.ts +46 -16
  146. package/src/channels/raspExecutionState.ts +1 -1
  147. package/src/channels/threat.ts +3 -3
  148. package/src/index.tsx +2 -0
  149. package/src/models/raspExecutionState.ts +8 -2
  150. package/src/models/threat.ts +2 -0
  151. package/src/types/errors.ts +57 -0
  152. package/src/types/types.ts +66 -26
  153. package/android/src/main/java/com/freeraspreactnative/events/RaspExecutionStateEvent.kt +0 -18
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
2
+ // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
3
  // swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TalsecRuntime
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
5
  import CryptoKit
6
6
  import Darwin
7
7
  import Foundation
@@ -23,7 +23,9 @@ public protocol SecurityThreatHandler {
23
23
  func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
24
24
  }
25
25
  public protocol RaspExecutionState {
26
- func onAllChecksFinished()
26
+ func onCriticalChecksFinished()
27
+ func onFastChecksFinished()
28
+ func onPostponedChecksFinished()
27
29
  }
28
30
  @_hasMissingDesignatedInitializers public class SecurityThreatCenter {
29
31
  @objc deinit
@@ -33,13 +35,16 @@ public struct TalsecConfig {
33
35
  public let appTeamId: Swift.String
34
36
  public let watcherMailAddress: Swift.String?
35
37
  public let isProd: Swift.Bool?
38
+ #if compiler(>=5.3) && $NonescapableTypes
36
39
  public init(appBundleIds: [Swift.String], appTeamId: Swift.String, watcherMailAddress: Swift.String?, isProd: Swift.Bool? = true)
40
+ #endif
37
41
  }
38
42
  @_hasMissingDesignatedInitializers public class Talsec {
39
43
  public static func start(config: TalsecRuntime.TalsecConfig)
40
44
  public static func blockScreenCapture(enable: Swift.Bool, window: UIKit.UIWindow)
41
45
  public static func isScreenCaptureBlocked(in window: UIKit.UIWindow) -> Swift.Bool
42
46
  public static func storeExternalId(externalId: Swift.String)
47
+ public static func removeExternalId()
43
48
  @objc deinit
44
49
  }
45
50
  public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Swift.Equatable {
@@ -58,7 +63,9 @@ public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Sw
58
63
  case screenshot
59
64
  case screenRecording
60
65
  case timeSpoofing
66
+ #if compiler(>=5.3) && $NonescapableTypes
61
67
  public init?(rawValue: Swift.String)
68
+ #endif
62
69
  public typealias AllCases = [TalsecRuntime.SecurityThreat]
63
70
  public typealias RawValue = Swift.String
64
71
  nonisolated public static var allCases: [TalsecRuntime.SecurityThreat] {
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
2
+ // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
3
  // swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TalsecRuntime
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
5
  import CryptoKit
6
6
  import Darwin
7
7
  import Foundation
@@ -23,7 +23,9 @@ public protocol SecurityThreatHandler {
23
23
  func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
24
24
  }
25
25
  public protocol RaspExecutionState {
26
- func onAllChecksFinished()
26
+ func onCriticalChecksFinished()
27
+ func onFastChecksFinished()
28
+ func onPostponedChecksFinished()
27
29
  }
28
30
  @_hasMissingDesignatedInitializers public class SecurityThreatCenter {
29
31
  @objc deinit
@@ -33,13 +35,16 @@ public struct TalsecConfig {
33
35
  public let appTeamId: Swift.String
34
36
  public let watcherMailAddress: Swift.String?
35
37
  public let isProd: Swift.Bool?
38
+ #if compiler(>=5.3) && $NonescapableTypes
36
39
  public init(appBundleIds: [Swift.String], appTeamId: Swift.String, watcherMailAddress: Swift.String?, isProd: Swift.Bool? = true)
40
+ #endif
37
41
  }
38
42
  @_hasMissingDesignatedInitializers public class Talsec {
39
43
  public static func start(config: TalsecRuntime.TalsecConfig)
40
44
  public static func blockScreenCapture(enable: Swift.Bool, window: UIKit.UIWindow)
41
45
  public static func isScreenCaptureBlocked(in window: UIKit.UIWindow) -> Swift.Bool
42
46
  public static func storeExternalId(externalId: Swift.String)
47
+ public static func removeExternalId()
43
48
  @objc deinit
44
49
  }
45
50
  public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Swift.Equatable {
@@ -58,7 +63,9 @@ public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Sw
58
63
  case screenshot
59
64
  case screenRecording
60
65
  case timeSpoofing
66
+ #if compiler(>=5.3) && $NonescapableTypes
61
67
  public init?(rawValue: Swift.String)
68
+ #endif
62
69
  public typealias AllCases = [TalsecRuntime.SecurityThreat]
63
70
  public typealias RawValue = Swift.String
64
71
  nonisolated public static var allCases: [TalsecRuntime.SecurityThreat] {