@scalebun/react-native 1.0.4 → 1.2.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 (400) hide show
  1. package/android/src/main/java/com/scalebun/rn/ota/SlotManager.kt +70 -4
  2. package/dist/scalebun.full.js +33132 -0
  3. package/dist/scalebun.full.js.map +1 -0
  4. package/dist/scalebun.slim.js +29930 -0
  5. package/dist/scalebun.slim.js.map +1 -0
  6. package/lib/commonjs/bootstrap/FeatureRegistry.js +4 -4
  7. package/lib/commonjs/bootstrap/FeatureRegistry.js.map +1 -1
  8. package/lib/commonjs/bootstrap/SDKBootstrapper.js +20 -17
  9. package/lib/commonjs/bootstrap/SDKBootstrapper.js.map +1 -1
  10. package/lib/commonjs/compat/codepush.js +78 -15
  11. package/lib/commonjs/compat/codepush.js.map +1 -1
  12. package/lib/commonjs/core/config/schema.js +412 -219
  13. package/lib/commonjs/core/config/schema.js.map +1 -1
  14. package/lib/commonjs/core/constants/endpoints.js +9 -6
  15. package/lib/commonjs/core/constants/endpoints.js.map +1 -1
  16. package/lib/commonjs/core/constants/protocol.js +31 -0
  17. package/lib/commonjs/core/constants/protocol.js.map +1 -0
  18. package/lib/commonjs/core/constants/timings.js +4 -1
  19. package/lib/commonjs/core/constants/timings.js.map +1 -1
  20. package/lib/commonjs/core/lifecycle/appLifecycle.js +1 -1
  21. package/lib/commonjs/core/lifecycle/appLifecycle.js.map +1 -1
  22. package/lib/commonjs/debug/bootstrap.js +30 -10
  23. package/lib/commonjs/debug/bootstrap.js.map +1 -1
  24. package/lib/commonjs/debug/exportBridge.js +5 -3
  25. package/lib/commonjs/debug/exportBridge.js.map +1 -1
  26. package/lib/commonjs/debug/hostResolver.js +2 -2
  27. package/lib/commonjs/debug/hostResolver.js.map +1 -1
  28. package/lib/commonjs/debug/perfWiring.js +4 -4
  29. package/lib/commonjs/debug/perfWiring.js.map +1 -1
  30. package/lib/commonjs/debug/replayWiring.js +5 -5
  31. package/lib/commonjs/debug/replayWiring.js.map +1 -1
  32. package/lib/commonjs/debug/screenTracking.js +2 -2
  33. package/lib/commonjs/debug/screenTracking.js.map +1 -1
  34. package/lib/commonjs/debug/sessionWiring.js +2 -2
  35. package/lib/commonjs/debug/sessionWiring.js.map +1 -1
  36. package/lib/commonjs/features/crash/NativeCrashFeature.js +1 -1
  37. package/lib/commonjs/features/crash/NativeCrashFeature.js.map +1 -1
  38. package/lib/commonjs/features/crash/globalHandler.js +3 -3
  39. package/lib/commonjs/features/crash/globalHandler.js.map +1 -1
  40. package/lib/commonjs/features/crash/nativeCrashBridge.js +7 -7
  41. package/lib/commonjs/features/crash/nativeCrashBridge.js.map +1 -1
  42. package/lib/commonjs/features/crash/rejectionHandler.js +2 -2
  43. package/lib/commonjs/features/crash/rejectionHandler.js.map +1 -1
  44. package/lib/commonjs/features/engage/EngageArchetypeRenderers.js +0 -9
  45. package/lib/commonjs/features/engage/EngageArchetypeRenderers.js.map +1 -1
  46. package/lib/commonjs/features/engage/EngageInAppView.js +1 -1
  47. package/lib/commonjs/features/engage/EngageInAppView.js.map +1 -1
  48. package/lib/commonjs/features/engage/EngagePromptProvider.js +17 -17
  49. package/lib/commonjs/features/engage/EngagePromptProvider.js.map +1 -1
  50. package/lib/commonjs/features/engage/EngageTransport.js +5 -5
  51. package/lib/commonjs/features/engage/EngageTransport.js.map +1 -1
  52. package/lib/commonjs/features/engage/engagePushTokenBridge.js +4 -4
  53. package/lib/commonjs/features/engage/engagePushTokenBridge.js.map +1 -1
  54. package/lib/commonjs/features/engage/engageShakeBridge.js +2 -2
  55. package/lib/commonjs/features/engage/engageShakeBridge.js.map +1 -1
  56. package/lib/commonjs/features/engage/engageSignals.js +1 -1
  57. package/lib/commonjs/features/engage/engageSignals.js.map +1 -1
  58. package/lib/commonjs/features/engage/engageStoreReviewBridge.js +2 -2
  59. package/lib/commonjs/features/engage/engageStoreReviewBridge.js.map +1 -1
  60. package/lib/commonjs/features/engage/engageTestSeenStore.js +1 -1
  61. package/lib/commonjs/features/engage/engageTestSeenStore.js.map +1 -1
  62. package/lib/commonjs/features/engage/engageThrottle.js +4 -4
  63. package/lib/commonjs/features/engage/engageThrottle.js.map +1 -1
  64. package/lib/commonjs/features/engage/engageTriggerEngine.js +4 -4
  65. package/lib/commonjs/features/engage/engageTriggerEngine.js.map +1 -1
  66. package/lib/commonjs/features/engage/engageWindowInsets.js +1 -1
  67. package/lib/commonjs/features/engage/engageWindowInsets.js.map +1 -1
  68. package/lib/commonjs/features/install-referrer/installReferrer.js +3 -3
  69. package/lib/commonjs/features/install-referrer/installReferrer.js.map +1 -1
  70. package/lib/commonjs/features/journey/calibrationContext.js +0 -9
  71. package/lib/commonjs/features/journey/calibrationContext.js.map +1 -1
  72. package/lib/commonjs/features/journey/journeyManager.js +4 -1
  73. package/lib/commonjs/features/journey/journeyManager.js.map +1 -1
  74. package/lib/commonjs/features/navigation/AutoScreenDetector.js +4 -4
  75. package/lib/commonjs/features/navigation/AutoScreenDetector.js.map +1 -1
  76. package/lib/commonjs/features/ota/OtaOrchestrator.js +27 -18
  77. package/lib/commonjs/features/ota/OtaOrchestrator.js.map +1 -1
  78. package/lib/commonjs/features/ota/geoCountry.js +2 -2
  79. package/lib/commonjs/features/ota/geoCountry.js.map +1 -1
  80. package/lib/commonjs/features/ota/retry.js +2 -2
  81. package/lib/commonjs/features/ota/retry.js.map +1 -1
  82. package/lib/commonjs/features/replay/core/logger/logger.js +0 -4
  83. package/lib/commonjs/features/replay/core/logger/logger.js.map +1 -1
  84. package/lib/commonjs/features/replay/integrations/network/networkAdapter.js +1 -54
  85. package/lib/commonjs/features/replay/integrations/network/networkAdapter.js.map +1 -1
  86. package/lib/commonjs/features/replay/integrations/react-navigation/navigationIntegration.js +1 -1
  87. package/lib/commonjs/features/replay/integrations/react-navigation/navigationIntegration.js.map +1 -1
  88. package/lib/commonjs/features/replay/integrations/touch/ReplayRoot.js +1 -1
  89. package/lib/commonjs/features/replay/integrations/touch/ReplayRoot.js.map +1 -1
  90. package/lib/commonjs/features/replay/pipeline/batching/batchManager.js +1 -1
  91. package/lib/commonjs/features/replay/pipeline/batching/batchManager.js.map +1 -1
  92. package/lib/commonjs/features/replay/pipeline/retry/retryPolicy.js +1 -1
  93. package/lib/commonjs/features/replay/pipeline/retry/retryPolicy.js.map +1 -1
  94. package/lib/commonjs/features/replay/public/api.js +7 -7
  95. package/lib/commonjs/features/replay/public/api.js.map +1 -1
  96. package/lib/commonjs/features/replay/replay/session/sessionOrchestrator.js +9 -9
  97. package/lib/commonjs/features/replay/replay/session/sessionOrchestrator.js.map +1 -1
  98. package/lib/commonjs/features/session/BackendSessionAdapter.js +41 -41
  99. package/lib/commonjs/features/session/BackendSessionAdapter.js.map +1 -1
  100. package/lib/commonjs/features/session/DesktopSessionTransport.js +5 -2
  101. package/lib/commonjs/features/session/DesktopSessionTransport.js.map +1 -1
  102. package/lib/commonjs/features/session/JourneyEventPipeline.js +1 -1
  103. package/lib/commonjs/features/session/JourneyEventPipeline.js.map +1 -1
  104. package/lib/commonjs/features/session/ReplayCaptureManager.js +14 -14
  105. package/lib/commonjs/features/session/ReplayCaptureManager.js.map +1 -1
  106. package/lib/commonjs/features/session/SessionManager.js +9 -9
  107. package/lib/commonjs/features/session/SessionManager.js.map +1 -1
  108. package/lib/commonjs/features/session/SyncDecisionEngine.js +1 -1
  109. package/lib/commonjs/features/session/SyncDecisionEngine.js.map +1 -1
  110. package/lib/commonjs/features/skan/skanBridge.js +6 -15
  111. package/lib/commonjs/features/skan/skanBridge.js.map +1 -1
  112. package/lib/commonjs/features/skan/skanConversionManager.js +5 -5
  113. package/lib/commonjs/features/skan/skanConversionManager.js.map +1 -1
  114. package/lib/commonjs/integrations/fetch/fetchInterceptor.js +1 -1
  115. package/lib/commonjs/integrations/fetch/fetchInterceptor.js.map +1 -1
  116. package/lib/commonjs/integrations/xhr/xhrInterceptor.js +1 -1
  117. package/lib/commonjs/integrations/xhr/xhrInterceptor.js.map +1 -1
  118. package/lib/commonjs/metro/composeSourceMap.js +105 -0
  119. package/lib/commonjs/metro/composeSourceMap.js.map +1 -0
  120. package/lib/commonjs/metro/featureModules.js +131 -0
  121. package/lib/commonjs/metro/featureModules.js.map +1 -0
  122. package/lib/commonjs/metro/index.js +123 -2
  123. package/lib/commonjs/metro/index.js.map +1 -1
  124. package/lib/commonjs/metro/serializerCompose.js +129 -0
  125. package/lib/commonjs/metro/serializerCompose.js.map +1 -0
  126. package/lib/commonjs/pipeline/dispatcher/dispatcher.js +1 -1
  127. package/lib/commonjs/pipeline/dispatcher/dispatcher.js.map +1 -1
  128. package/lib/commonjs/pipeline/queue/flushQueue.js +2 -2
  129. package/lib/commonjs/pipeline/queue/flushQueue.js.map +1 -1
  130. package/lib/commonjs/pipeline/queue/persistentQueue.js +6 -37
  131. package/lib/commonjs/pipeline/queue/persistentQueue.js.map +1 -1
  132. package/lib/commonjs/pipeline/scheduler/flushScheduler.js +1 -1
  133. package/lib/commonjs/pipeline/scheduler/flushScheduler.js.map +1 -1
  134. package/lib/commonjs/public/ScaleBunFacade.js +64 -15
  135. package/lib/commonjs/public/ScaleBunFacade.js.map +1 -1
  136. package/lib/commonjs/push/PushManager.js +3 -3
  137. package/lib/commonjs/push/PushManager.js.map +1 -1
  138. package/lib/commonjs/push/adapters/NativeBridgeAdapter.js +1 -1
  139. package/lib/commonjs/push/adapters/NativeBridgeAdapter.js.map +1 -1
  140. package/lib/commonjs/push/native/nativeNotifications.js +7 -18
  141. package/lib/commonjs/push/native/nativeNotifications.js.map +1 -1
  142. package/lib/commonjs/storage/StorageBackend.js +1 -1
  143. package/lib/commonjs/storage/StorageBackend.js.map +1 -1
  144. package/lib/module/bootstrap/FeatureRegistry.js +4 -4
  145. package/lib/module/bootstrap/FeatureRegistry.js.map +1 -1
  146. package/lib/module/bootstrap/SDKBootstrapper.js +20 -17
  147. package/lib/module/bootstrap/SDKBootstrapper.js.map +1 -1
  148. package/lib/module/compat/codepush.js +77 -14
  149. package/lib/module/compat/codepush.js.map +1 -1
  150. package/lib/module/core/config/schema.js +411 -218
  151. package/lib/module/core/config/schema.js.map +1 -1
  152. package/lib/module/core/constants/endpoints.js +9 -6
  153. package/lib/module/core/constants/endpoints.js.map +1 -1
  154. package/lib/module/core/constants/protocol.js +25 -0
  155. package/lib/module/core/constants/protocol.js.map +1 -0
  156. package/lib/module/core/constants/timings.js +3 -1
  157. package/lib/module/core/constants/timings.js.map +1 -1
  158. package/lib/module/core/lifecycle/appLifecycle.js +1 -1
  159. package/lib/module/core/lifecycle/appLifecycle.js.map +1 -1
  160. package/lib/module/debug/bootstrap.js +30 -9
  161. package/lib/module/debug/bootstrap.js.map +1 -1
  162. package/lib/module/debug/exportBridge.js +5 -3
  163. package/lib/module/debug/exportBridge.js.map +1 -1
  164. package/lib/module/debug/hostResolver.js +2 -2
  165. package/lib/module/debug/hostResolver.js.map +1 -1
  166. package/lib/module/debug/perfWiring.js +4 -4
  167. package/lib/module/debug/perfWiring.js.map +1 -1
  168. package/lib/module/debug/replayWiring.js +5 -5
  169. package/lib/module/debug/replayWiring.js.map +1 -1
  170. package/lib/module/debug/screenTracking.js +2 -2
  171. package/lib/module/debug/screenTracking.js.map +1 -1
  172. package/lib/module/debug/sessionWiring.js +2 -2
  173. package/lib/module/debug/sessionWiring.js.map +1 -1
  174. package/lib/module/features/crash/NativeCrashFeature.js +1 -1
  175. package/lib/module/features/crash/NativeCrashFeature.js.map +1 -1
  176. package/lib/module/features/crash/globalHandler.js +3 -3
  177. package/lib/module/features/crash/globalHandler.js.map +1 -1
  178. package/lib/module/features/crash/nativeCrashBridge.js +7 -7
  179. package/lib/module/features/crash/nativeCrashBridge.js.map +1 -1
  180. package/lib/module/features/crash/rejectionHandler.js +2 -2
  181. package/lib/module/features/crash/rejectionHandler.js.map +1 -1
  182. package/lib/module/features/engage/EngageArchetypeRenderers.js +0 -8
  183. package/lib/module/features/engage/EngageArchetypeRenderers.js.map +1 -1
  184. package/lib/module/features/engage/EngageInAppView.js +1 -1
  185. package/lib/module/features/engage/EngageInAppView.js.map +1 -1
  186. package/lib/module/features/engage/EngagePromptProvider.js +17 -17
  187. package/lib/module/features/engage/EngagePromptProvider.js.map +1 -1
  188. package/lib/module/features/engage/EngageTransport.js +5 -5
  189. package/lib/module/features/engage/EngageTransport.js.map +1 -1
  190. package/lib/module/features/engage/engagePushTokenBridge.js +4 -4
  191. package/lib/module/features/engage/engagePushTokenBridge.js.map +1 -1
  192. package/lib/module/features/engage/engageShakeBridge.js +2 -2
  193. package/lib/module/features/engage/engageShakeBridge.js.map +1 -1
  194. package/lib/module/features/engage/engageSignals.js +1 -1
  195. package/lib/module/features/engage/engageSignals.js.map +1 -1
  196. package/lib/module/features/engage/engageStoreReviewBridge.js +2 -2
  197. package/lib/module/features/engage/engageStoreReviewBridge.js.map +1 -1
  198. package/lib/module/features/engage/engageTestSeenStore.js +1 -1
  199. package/lib/module/features/engage/engageTestSeenStore.js.map +1 -1
  200. package/lib/module/features/engage/engageThrottle.js +4 -4
  201. package/lib/module/features/engage/engageThrottle.js.map +1 -1
  202. package/lib/module/features/engage/engageTriggerEngine.js +4 -4
  203. package/lib/module/features/engage/engageTriggerEngine.js.map +1 -1
  204. package/lib/module/features/engage/engageWindowInsets.js +1 -1
  205. package/lib/module/features/engage/engageWindowInsets.js.map +1 -1
  206. package/lib/module/features/install-referrer/installReferrer.js +3 -3
  207. package/lib/module/features/install-referrer/installReferrer.js.map +1 -1
  208. package/lib/module/features/journey/calibrationContext.js +0 -8
  209. package/lib/module/features/journey/calibrationContext.js.map +1 -1
  210. package/lib/module/features/journey/journeyManager.js +3 -1
  211. package/lib/module/features/journey/journeyManager.js.map +1 -1
  212. package/lib/module/features/navigation/AutoScreenDetector.js +4 -4
  213. package/lib/module/features/navigation/AutoScreenDetector.js.map +1 -1
  214. package/lib/module/features/ota/OtaOrchestrator.js +27 -18
  215. package/lib/module/features/ota/OtaOrchestrator.js.map +1 -1
  216. package/lib/module/features/ota/geoCountry.js +2 -2
  217. package/lib/module/features/ota/geoCountry.js.map +1 -1
  218. package/lib/module/features/ota/retry.js +2 -2
  219. package/lib/module/features/ota/retry.js.map +1 -1
  220. package/lib/module/features/replay/core/logger/logger.js +0 -3
  221. package/lib/module/features/replay/core/logger/logger.js.map +1 -1
  222. package/lib/module/features/replay/integrations/network/networkAdapter.js +1 -52
  223. package/lib/module/features/replay/integrations/network/networkAdapter.js.map +1 -1
  224. package/lib/module/features/replay/integrations/react-navigation/navigationIntegration.js +1 -1
  225. package/lib/module/features/replay/integrations/react-navigation/navigationIntegration.js.map +1 -1
  226. package/lib/module/features/replay/integrations/touch/ReplayRoot.js +1 -1
  227. package/lib/module/features/replay/integrations/touch/ReplayRoot.js.map +1 -1
  228. package/lib/module/features/replay/pipeline/batching/batchManager.js +1 -1
  229. package/lib/module/features/replay/pipeline/batching/batchManager.js.map +1 -1
  230. package/lib/module/features/replay/pipeline/retry/retryPolicy.js +1 -1
  231. package/lib/module/features/replay/pipeline/retry/retryPolicy.js.map +1 -1
  232. package/lib/module/features/replay/public/api.js +7 -7
  233. package/lib/module/features/replay/public/api.js.map +1 -1
  234. package/lib/module/features/replay/replay/session/sessionOrchestrator.js +9 -9
  235. package/lib/module/features/replay/replay/session/sessionOrchestrator.js.map +1 -1
  236. package/lib/module/features/session/BackendSessionAdapter.js +41 -41
  237. package/lib/module/features/session/BackendSessionAdapter.js.map +1 -1
  238. package/lib/module/features/session/DesktopSessionTransport.js +4 -2
  239. package/lib/module/features/session/DesktopSessionTransport.js.map +1 -1
  240. package/lib/module/features/session/JourneyEventPipeline.js +1 -1
  241. package/lib/module/features/session/JourneyEventPipeline.js.map +1 -1
  242. package/lib/module/features/session/ReplayCaptureManager.js +14 -14
  243. package/lib/module/features/session/ReplayCaptureManager.js.map +1 -1
  244. package/lib/module/features/session/SessionManager.js +9 -9
  245. package/lib/module/features/session/SessionManager.js.map +1 -1
  246. package/lib/module/features/session/SyncDecisionEngine.js +1 -1
  247. package/lib/module/features/session/SyncDecisionEngine.js.map +1 -1
  248. package/lib/module/features/skan/skanBridge.js +6 -14
  249. package/lib/module/features/skan/skanBridge.js.map +1 -1
  250. package/lib/module/features/skan/skanConversionManager.js +5 -5
  251. package/lib/module/features/skan/skanConversionManager.js.map +1 -1
  252. package/lib/module/index.js +1 -1
  253. package/lib/module/integrations/fetch/fetchInterceptor.js +1 -1
  254. package/lib/module/integrations/fetch/fetchInterceptor.js.map +1 -1
  255. package/lib/module/integrations/xhr/xhrInterceptor.js +1 -1
  256. package/lib/module/integrations/xhr/xhrInterceptor.js.map +1 -1
  257. package/lib/module/metro/composeSourceMap.js +97 -0
  258. package/lib/module/metro/composeSourceMap.js.map +1 -0
  259. package/lib/module/metro/featureModules.js +123 -0
  260. package/lib/module/metro/featureModules.js.map +1 -0
  261. package/lib/module/metro/index.js +122 -2
  262. package/lib/module/metro/index.js.map +1 -1
  263. package/lib/module/metro/serializerCompose.js +120 -0
  264. package/lib/module/metro/serializerCompose.js.map +1 -0
  265. package/lib/module/pipeline/dispatcher/dispatcher.js +1 -1
  266. package/lib/module/pipeline/dispatcher/dispatcher.js.map +1 -1
  267. package/lib/module/pipeline/queue/flushQueue.js +2 -2
  268. package/lib/module/pipeline/queue/flushQueue.js.map +1 -1
  269. package/lib/module/pipeline/queue/persistentQueue.js +6 -36
  270. package/lib/module/pipeline/queue/persistentQueue.js.map +1 -1
  271. package/lib/module/pipeline/scheduler/flushScheduler.js +1 -1
  272. package/lib/module/pipeline/scheduler/flushScheduler.js.map +1 -1
  273. package/lib/module/public/ScaleBunFacade.js +64 -15
  274. package/lib/module/public/ScaleBunFacade.js.map +1 -1
  275. package/lib/module/push/PushManager.js +3 -3
  276. package/lib/module/push/PushManager.js.map +1 -1
  277. package/lib/module/push/adapters/NativeBridgeAdapter.js +1 -1
  278. package/lib/module/push/adapters/NativeBridgeAdapter.js.map +1 -1
  279. package/lib/module/push/native/nativeNotifications.js +7 -17
  280. package/lib/module/push/native/nativeNotifications.js.map +1 -1
  281. package/lib/module/storage/StorageBackend.js +1 -1
  282. package/lib/module/storage/StorageBackend.js.map +1 -1
  283. package/lib/typescript/bootstrap/SDKBootstrapper.d.ts.map +1 -1
  284. package/lib/typescript/compat/codepush.d.ts +27 -4
  285. package/lib/typescript/compat/codepush.d.ts.map +1 -1
  286. package/lib/typescript/core/config/schema.d.ts +61 -37
  287. package/lib/typescript/core/config/schema.d.ts.map +1 -1
  288. package/lib/typescript/core/constants/endpoints.d.ts +9 -6
  289. package/lib/typescript/core/constants/endpoints.d.ts.map +1 -1
  290. package/lib/typescript/core/constants/protocol.d.ts +23 -0
  291. package/lib/typescript/core/constants/protocol.d.ts.map +1 -0
  292. package/lib/typescript/core/constants/timings.d.ts +1 -1
  293. package/lib/typescript/core/constants/timings.d.ts.map +1 -1
  294. package/lib/typescript/debug/bootstrap.d.ts +0 -1
  295. package/lib/typescript/debug/bootstrap.d.ts.map +1 -1
  296. package/lib/typescript/debug/exportBridge.d.ts.map +1 -1
  297. package/lib/typescript/features/engage/EngageArchetypeRenderers.d.ts +0 -2
  298. package/lib/typescript/features/engage/EngageArchetypeRenderers.d.ts.map +1 -1
  299. package/lib/typescript/features/engage/EngageTransport.d.ts +1 -1
  300. package/lib/typescript/features/engage/EngageTransport.d.ts.map +1 -1
  301. package/lib/typescript/features/journey/calibrationContext.d.ts +0 -1
  302. package/lib/typescript/features/journey/calibrationContext.d.ts.map +1 -1
  303. package/lib/typescript/features/journey/journeyManager.d.ts.map +1 -1
  304. package/lib/typescript/features/ota/OtaOrchestrator.d.ts +6 -0
  305. package/lib/typescript/features/ota/OtaOrchestrator.d.ts.map +1 -1
  306. package/lib/typescript/features/replay/core/logger/logger.d.ts +0 -1
  307. package/lib/typescript/features/replay/core/logger/logger.d.ts.map +1 -1
  308. package/lib/typescript/features/replay/integrations/network/networkAdapter.d.ts +0 -10
  309. package/lib/typescript/features/replay/integrations/network/networkAdapter.d.ts.map +1 -1
  310. package/lib/typescript/features/session/DesktopSessionTransport.d.ts.map +1 -1
  311. package/lib/typescript/features/skan/skanBridge.d.ts +0 -2
  312. package/lib/typescript/features/skan/skanBridge.d.ts.map +1 -1
  313. package/lib/typescript/metro/composeSourceMap.d.ts +26 -0
  314. package/lib/typescript/metro/composeSourceMap.d.ts.map +1 -0
  315. package/lib/typescript/metro/featureModules.d.ts +49 -0
  316. package/lib/typescript/metro/featureModules.d.ts.map +1 -0
  317. package/lib/typescript/metro/index.d.ts +22 -0
  318. package/lib/typescript/metro/index.d.ts.map +1 -1
  319. package/lib/typescript/metro/serializerCompose.d.ts +46 -0
  320. package/lib/typescript/metro/serializerCompose.d.ts.map +1 -0
  321. package/lib/typescript/pipeline/queue/persistentQueue.d.ts +0 -10
  322. package/lib/typescript/pipeline/queue/persistentQueue.d.ts.map +1 -1
  323. package/lib/typescript/public/ScaleBunFacade.d.ts +11 -0
  324. package/lib/typescript/public/ScaleBunFacade.d.ts.map +1 -1
  325. package/lib/typescript/public/types.d.ts +34 -8
  326. package/lib/typescript/public/types.d.ts.map +1 -1
  327. package/lib/typescript/push/native/nativeNotifications.d.ts +0 -6
  328. package/lib/typescript/push/native/nativeNotifications.d.ts.map +1 -1
  329. package/package.json +15 -11
  330. package/src/bootstrap/FeatureRegistry.ts +4 -4
  331. package/src/bootstrap/SDKBootstrapper.ts +20 -17
  332. package/src/compat/codepush.ts +87 -16
  333. package/src/core/config/schema.ts +353 -222
  334. package/src/core/constants/endpoints.ts +9 -6
  335. package/src/core/constants/protocol.ts +24 -0
  336. package/src/core/constants/timings.ts +3 -1
  337. package/src/core/lifecycle/appLifecycle.ts +1 -1
  338. package/src/debug/bootstrap.ts +40 -7
  339. package/src/debug/exportBridge.ts +5 -3
  340. package/src/debug/hostResolver.ts +2 -2
  341. package/src/debug/perfWiring.ts +4 -4
  342. package/src/debug/replayWiring.ts +5 -5
  343. package/src/debug/screenTracking.ts +2 -2
  344. package/src/debug/sessionWiring.ts +2 -2
  345. package/src/features/crash/NativeCrashFeature.ts +1 -1
  346. package/src/features/crash/globalHandler.ts +3 -3
  347. package/src/features/crash/nativeCrashBridge.ts +7 -7
  348. package/src/features/crash/rejectionHandler.ts +2 -2
  349. package/src/features/engage/EngageArchetypeRenderers.tsx +0 -11
  350. package/src/features/engage/EngageInAppView.tsx +1 -1
  351. package/src/features/engage/EngagePromptProvider.tsx +17 -17
  352. package/src/features/engage/EngageTransport.ts +6 -6
  353. package/src/features/engage/engagePushTokenBridge.ts +4 -4
  354. package/src/features/engage/engageShakeBridge.ts +2 -2
  355. package/src/features/engage/engageSignals.ts +1 -1
  356. package/src/features/engage/engageStoreReviewBridge.ts +2 -2
  357. package/src/features/engage/engageTestSeenStore.ts +1 -1
  358. package/src/features/engage/engageThrottle.ts +4 -4
  359. package/src/features/engage/engageTriggerEngine.ts +4 -4
  360. package/src/features/engage/engageWindowInsets.ts +1 -1
  361. package/src/features/install-referrer/installReferrer.ts +3 -3
  362. package/src/features/journey/calibrationContext.ts +0 -9
  363. package/src/features/journey/journeyManager.ts +3 -1
  364. package/src/features/navigation/AutoScreenDetector.ts +4 -4
  365. package/src/features/ota/OtaOrchestrator.ts +27 -18
  366. package/src/features/ota/geoCountry.ts +2 -2
  367. package/src/features/ota/retry.ts +2 -2
  368. package/src/features/replay/core/logger/logger.ts +0 -4
  369. package/src/features/replay/integrations/network/networkAdapter.ts +1 -56
  370. package/src/features/replay/integrations/react-navigation/navigationIntegration.ts +1 -1
  371. package/src/features/replay/integrations/touch/ReplayRoot.tsx +1 -1
  372. package/src/features/replay/pipeline/batching/batchManager.ts +1 -1
  373. package/src/features/replay/pipeline/retry/retryPolicy.ts +1 -1
  374. package/src/features/replay/public/api.ts +7 -7
  375. package/src/features/replay/replay/session/sessionOrchestrator.ts +9 -9
  376. package/src/features/session/BackendSessionAdapter.ts +41 -41
  377. package/src/features/session/DesktopSessionTransport.ts +4 -2
  378. package/src/features/session/JourneyEventPipeline.ts +1 -1
  379. package/src/features/session/ReplayCaptureManager.ts +14 -14
  380. package/src/features/session/SessionManager.ts +9 -9
  381. package/src/features/session/SyncDecisionEngine.ts +1 -1
  382. package/src/features/skan/skanBridge.ts +6 -14
  383. package/src/features/skan/skanConversionManager.ts +5 -5
  384. package/src/index.ts +1 -1
  385. package/src/integrations/fetch/fetchInterceptor.ts +1 -1
  386. package/src/integrations/xhr/xhrInterceptor.ts +1 -1
  387. package/src/metro/composeSourceMap.ts +104 -0
  388. package/src/metro/featureModules.ts +143 -0
  389. package/src/metro/index.ts +173 -1
  390. package/src/metro/serializerCompose.ts +157 -0
  391. package/src/pipeline/dispatcher/dispatcher.ts +1 -1
  392. package/src/pipeline/queue/flushQueue.ts +2 -2
  393. package/src/pipeline/queue/persistentQueue.ts +6 -35
  394. package/src/pipeline/scheduler/flushScheduler.ts +1 -1
  395. package/src/public/ScaleBunFacade.ts +60 -15
  396. package/src/public/types.ts +35 -8
  397. package/src/push/PushManager.ts +3 -3
  398. package/src/push/adapters/NativeBridgeAdapter.ts +1 -1
  399. package/src/push/native/nativeNotifications.ts +7 -16
  400. package/src/storage/StorageBackend.ts +1 -1
@@ -53,10 +53,10 @@ class SessionOrchestrator {
53
53
  try {
54
54
  const success = await bridgeAdapter.initialize(config);
55
55
  if (!success) {
56
- logger.info('Native replay module not available — running in transport-only mode');
56
+ __DEV__ && logger.info('Native replay module not available — running in transport-only mode');
57
57
  }
58
58
  } catch (nativeErr: any) {
59
- logger.info('Native replay module not available:', nativeErr?.message);
59
+ __DEV__ && logger.info('Native replay module not available:', nativeErr?.message);
60
60
  }
61
61
 
62
62
  // Listen to native events (no-ops if native not available)
@@ -66,7 +66,7 @@ class SessionOrchestrator {
66
66
  this._appStateSubscription = AppState.addEventListener('change', this._onAppStateChange);
67
67
 
68
68
  this._initialized = true;
69
- logger.info('SessionOrchestrator initialized');
69
+ __DEV__ && logger.info('SessionOrchestrator initialized');
70
70
 
71
71
  // Auto-start if configured
72
72
  if (config.autoStart && config.enabled) {
@@ -93,7 +93,7 @@ class SessionOrchestrator {
93
93
  this._startDurationTimer();
94
94
  this._startFrequencyTimerIfNeeded();
95
95
 
96
- logger.info(`Session started: ${this._sessionId}`);
96
+ __DEV__ && logger.info(`Session started: ${this._sessionId}`);
97
97
  }
98
98
 
99
99
  async stop(): Promise<void> {
@@ -107,7 +107,7 @@ class SessionOrchestrator {
107
107
  this._state = SessionState.Idle;
108
108
  clock.resetClock();
109
109
 
110
- logger.info(`Session stopped: ${this._sessionId}`);
110
+ __DEV__ && logger.info(`Session stopped: ${this._sessionId}`);
111
111
  this._sessionId = null;
112
112
  this._startedAt = 0;
113
113
  }
@@ -117,7 +117,7 @@ class SessionOrchestrator {
117
117
  this._state = SessionState.Paused;
118
118
  this._stopTimers();
119
119
  await bridgeAdapter.pauseSession();
120
- logger.debug('Session paused');
120
+ __DEV__ && logger.debug('Session paused');
121
121
  }
122
122
 
123
123
  async resume(): Promise<void> {
@@ -126,7 +126,7 @@ class SessionOrchestrator {
126
126
  this._startDurationTimer();
127
127
  this._startFrequencyTimerIfNeeded();
128
128
  await bridgeAdapter.resumeSession();
129
- logger.debug('Session resumed');
129
+ __DEV__ && logger.debug('Session resumed');
130
130
  }
131
131
 
132
132
  // ─── Capture ────────────────────────────────────────────────────────
@@ -231,7 +231,7 @@ class SessionOrchestrator {
231
231
 
232
232
  private _setupNativeEventListeners(): void {
233
233
  replayEventEmitter.onSessionStateChanged((event: SessionStateChangedEvent) => {
234
- logger.debug(`Native state: ${event.previousState} → ${event.newState}`);
234
+ __DEV__ && logger.debug(`Native state: ${event.previousState} → ${event.newState}`);
235
235
  });
236
236
 
237
237
  replayEventEmitter.onSessionLimitReached((event: SessionLimitReachedEvent) => {
@@ -278,7 +278,7 @@ class SessionOrchestrator {
278
278
  this._state = SessionState.Idle;
279
279
  this._sessionId = null;
280
280
  this._config = null;
281
- logger.info('SessionOrchestrator destroyed');
281
+ __DEV__ && logger.info('SessionOrchestrator destroyed');
282
282
  }
283
283
  }
284
284
 
@@ -214,9 +214,9 @@ export class BackendSessionAdapter implements SessionTransport {
214
214
  this.objectStorageActive = this.config.useObjectStorage;
215
215
  this.nativeOutboxEnabled =
216
216
  this.config.enableNativeFileOutbox && this.config.nativeOutboxUploadEnabled;
217
- logger.info(`[ScaleBun Replay] backendUpload enabled`);
218
- logger.info(`[ScaleBun Replay] backendBaseUrl: ${this.config.endpoint}`);
219
- logger.info(`[ScaleBun Replay] transport fan-out active: desktop yes, backend yes`);
217
+ __DEV__ && logger.info(`[ScaleBun Replay] backendUpload enabled`);
218
+ __DEV__ && logger.info(`[ScaleBun Replay] backendBaseUrl: ${this.config.endpoint}`);
219
+ __DEV__ && logger.info(`[ScaleBun Replay] transport fan-out active: desktop yes, backend yes`);
220
220
  }
221
221
 
222
222
  // ─── SessionTransport Interface ─────────────────────────────────────
@@ -234,10 +234,10 @@ export class BackendSessionAdapter implements SessionTransport {
234
234
  this.currentSessionId = session.sessionId;
235
235
  this._startFlushTimer();
236
236
 
237
- logger.info(`[ScaleBun Replay] session start requested`);
238
- logger.info(`[ScaleBun Replay] sessionId: ${session.sessionId}`);
239
- logger.info(`[ScaleBun Replay] deviceId: ${session.deviceId}`);
240
- logger.info(`[ScaleBun Replay] recordingSessionId: ${session.sessionId}`);
237
+ __DEV__ && logger.info(`[ScaleBun Replay] session start requested`);
238
+ __DEV__ && logger.info(`[ScaleBun Replay] sessionId: ${session.sessionId}`);
239
+ __DEV__ && logger.info(`[ScaleBun Replay] deviceId: ${session.deviceId}`);
240
+ __DEV__ && logger.info(`[ScaleBun Replay] recordingSessionId: ${session.sessionId}`);
241
241
 
242
242
  // One-row merge: when recording adopted the always-on analytics id
243
243
  // (SessionManager.startSession), the INGESTION_START row already exists.
@@ -245,11 +245,11 @@ export class BackendSessionAdapter implements SessionTransport {
245
245
  // journey/network/errors/perf flush to INGESTION_*(analyticsId). Legacy
246
246
  // mode (no clientKey, distinct minted id) still posts /replay/sessions.
247
247
  if (this.config.clientKey && session.sessionId === this._analyticsSessionId) {
248
- logger.info(`[ScaleBun Replay] recording attached to analytics session ${session.sessionId} (no new row)`);
248
+ __DEV__ && logger.info(`[ScaleBun Replay] recording attached to analytics session ${session.sessionId} (no new row)`);
249
249
  return;
250
250
  }
251
251
 
252
- logger.info(`[ScaleBun Replay] backend session upload started`);
252
+ __DEV__ && logger.info(`[ScaleBun Replay] backend session upload started`);
253
253
 
254
254
  const startEndpoint = this.config.clientKey ? ENDPOINTS.INGESTION_START : '/replay/sessions';
255
255
 
@@ -290,19 +290,19 @@ export class BackendSessionAdapter implements SessionTransport {
290
290
  environment: m?.buildType,
291
291
  },
292
292
  };
293
- logger.debug(`[BackendSessionAdapter] POST session start: ${session.sessionId}`);
293
+ __DEV__ && logger.debug(`[BackendSessionAdapter] POST session start: ${session.sessionId}`);
294
294
  return this._post(startEndpoint, payload);
295
295
  })
296
296
  .then(() => {
297
297
  // §11: row now exists — release the child-lane flush gate for this id.
298
298
  this._startedSessionIds.add(session.sessionId);
299
- logger.info(`[ScaleBun Replay] backend session upload success`);
299
+ __DEV__ && logger.info(`[ScaleBun Replay] backend session upload success`);
300
300
  })
301
301
  .catch(() => logger.info(`[ScaleBun Replay] backend session upload failure`));
302
302
  }
303
303
 
304
304
  sendSessionEnd(session: Session): void {
305
- logger.info(`[ScaleBun Replay] finalize started`);
305
+ __DEV__ && logger.info(`[ScaleBun Replay] finalize started`);
306
306
  // Flush all pending data first, then finalize
307
307
  Promise.all([
308
308
  this._flushFrames(),
@@ -317,7 +317,7 @@ export class BackendSessionAdapter implements SessionTransport {
317
317
  // shared row mid-foreground and orphan later track() events — so flush
318
318
  // (above) but skip finalize. Legacy/distinct-id sessions finalize normally.
319
319
  if (this.config.clientKey && session.sessionId === this._analyticsSessionId) {
320
- logger.info(`[ScaleBun Replay] recording ended; analytics session ${session.sessionId} stays open`);
320
+ __DEV__ && logger.info(`[ScaleBun Replay] recording ended; analytics session ${session.sessionId} stays open`);
321
321
  return;
322
322
  }
323
323
  const finalizeEndpoint = this.config.clientKey
@@ -336,9 +336,9 @@ export class BackendSessionAdapter implements SessionTransport {
336
336
  },
337
337
  );
338
338
  }).then(() => {
339
- logger.info(`[ScaleBun Replay] finalize success`);
339
+ __DEV__ && logger.info(`[ScaleBun Replay] finalize success`);
340
340
  }).catch(() => {
341
- logger.info(`[ScaleBun Replay] finalize failure`);
341
+ __DEV__ && logger.info(`[ScaleBun Replay] finalize failure`);
342
342
  }).finally(() => {
343
343
  this._stopFlushTimer();
344
344
  // Keep the row-ready gate OPEN for a merged analytics session. The analytics
@@ -352,7 +352,7 @@ export class BackendSessionAdapter implements SessionTransport {
352
352
  }
353
353
  // Session end: drain any durably-stored telemetry from the native outbox.
354
354
  this._triggerNativeFlush();
355
- logger.debug(`[BackendSessionAdapter] Session finalized: ${session.sessionId}`);
355
+ __DEV__ && logger.debug(`[BackendSessionAdapter] Session finalized: ${session.sessionId}`);
356
356
  });
357
357
  }
358
358
 
@@ -423,9 +423,9 @@ export class BackendSessionAdapter implements SessionTransport {
423
423
  // The pre-ack flush at the top of this method is gated off until now, so
424
424
  // this is what actually drains the pre-ready buffer (no premature 404).
425
425
  this._flushAnalyticsEvents().catch(() => { });
426
- logger.info(`[ScaleBun Analytics] session start upload success: ${session.sessionId}`);
426
+ __DEV__ && logger.info(`[ScaleBun Analytics] session start upload success: ${session.sessionId}`);
427
427
  } catch {
428
- logger.info(`[ScaleBun Analytics] session start upload failure`);
428
+ __DEV__ && logger.info(`[ScaleBun Analytics] session start upload failure`);
429
429
  }
430
430
  }
431
431
 
@@ -504,7 +504,7 @@ export class BackendSessionAdapter implements SessionTransport {
504
504
  ? ENDPOINTS.INGESTION_EVENTS(sessionId)
505
505
  : `/replay/sessions/${sessionId}/events`;
506
506
  await this._post(eventsEndpoint, { events });
507
- logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} analytics event(s)`);
507
+ __DEV__ && logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} analytics event(s)`);
508
508
  } catch (err) {
509
509
  if (!BackendSessionAdapter._isPermanentHttpError(err)) this.pendingAnalyticsEvents.unshift(...batch);
510
510
  }
@@ -542,10 +542,10 @@ export class BackendSessionAdapter implements SessionTransport {
542
542
  // Confirmed delivered → drop the marker so the foreground reconciler does
543
543
  // NOT re-finalize this id (first half of the no-double-finalize guard).
544
544
  if (this._pendingFinalizeId === sessionId) this._pendingFinalizeId = null;
545
- logger.debug(`[BackendSessionAdapter] Analytics session finalized: ${sessionId}`);
545
+ __DEV__ && logger.debug(`[BackendSessionAdapter] Analytics session finalized: ${sessionId}`);
546
546
  } catch {
547
547
  // Leave the marker set — foreground reconciliation will retry the close.
548
- logger.info(`[ScaleBun Analytics] finalize failure (will reconcile on foreground): ${sessionId}`);
548
+ __DEV__ && logger.info(`[ScaleBun Analytics] finalize failure (will reconcile on foreground): ${sessionId}`);
549
549
  }
550
550
  }
551
551
 
@@ -567,9 +567,9 @@ export class BackendSessionAdapter implements SessionTransport {
567
567
  ? ENDPOINTS.INGESTION_FINALIZE(sessionId)
568
568
  : `/replay/sessions/${sessionId}/finalize`;
569
569
  await this._post(finalizeEndpoint, { endedAt: Date.now() });
570
- logger.info(`[ScaleBun Analytics] reconciled finalize on foreground: ${sessionId}`);
570
+ __DEV__ && logger.info(`[ScaleBun Analytics] reconciled finalize on foreground: ${sessionId}`);
571
571
  } catch {
572
- logger.info(`[ScaleBun Analytics] foreground reconcile finalize failed: ${sessionId}`);
572
+ __DEV__ && logger.info(`[ScaleBun Analytics] foreground reconcile finalize failed: ${sessionId}`);
573
573
  } finally {
574
574
  // Clear after a foreground attempt regardless of outcome: JS is live here
575
575
  // so a transient network error is rare, and the server-side idle-close
@@ -596,11 +596,11 @@ export class BackendSessionAdapter implements SessionTransport {
596
596
  sendEvent(event: JourneyEvent): void {
597
597
  if (this.destroyed) return;
598
598
 
599
- logger.info(`[ScaleBun Replay] event recorded`);
600
- logger.info(` eventId: ${event.eventId}`);
601
- logger.info(` type: ${event.type}`);
602
- logger.info(` timestamp: ${event.ts}`);
603
- logger.info(` sessionId: ${event.sessionId}`);
599
+ __DEV__ && logger.info(`[ScaleBun Replay] event recorded`);
600
+ __DEV__ && logger.info(` eventId: ${event.eventId}`);
601
+ __DEV__ && logger.info(` type: ${event.type}`);
602
+ __DEV__ && logger.info(` timestamp: ${event.ts}`);
603
+ __DEV__ && logger.info(` sessionId: ${event.sessionId}`);
604
604
 
605
605
  this.pendingEvents.push(event);
606
606
 
@@ -612,11 +612,11 @@ export class BackendSessionAdapter implements SessionTransport {
612
612
  sendFrame(frame: ReplayFrame, imageData: string): void {
613
613
  if (this.destroyed) return;
614
614
 
615
- logger.info(`[ScaleBun Replay] frame captured`);
616
- logger.info(` frameId: ${frame.frameId}`);
617
- logger.info(` timestamp: ${frame.ts}`);
618
- logger.info(` sessionId: ${frame.sessionId}`);
619
- logger.info(` width/height: ${frame.width}x${frame.height}`);
615
+ __DEV__ && logger.info(`[ScaleBun Replay] frame captured`);
616
+ __DEV__ && logger.info(` frameId: ${frame.frameId}`);
617
+ __DEV__ && logger.info(` timestamp: ${frame.ts}`);
618
+ __DEV__ && logger.info(` sessionId: ${frame.sessionId}`);
619
+ __DEV__ && logger.info(` width/height: ${frame.width}x${frame.height}`);
620
620
 
621
621
  this.pendingFrames.push({ frame, imageData });
622
622
 
@@ -953,7 +953,7 @@ export class BackendSessionAdapter implements SessionTransport {
953
953
  this.pendingFrames.unshift(...remaining);
954
954
  return;
955
955
  }
956
- logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} frame(s)`);
956
+ __DEV__ && logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} frame(s)`);
957
957
  // Delivered — the durable snapshot (if any) is now redundant. Clear it once
958
958
  // the in-memory buffer is fully drained so a later kill can't replay
959
959
  // already-uploaded frames.
@@ -1054,13 +1054,13 @@ export class BackendSessionAdapter implements SessionTransport {
1054
1054
  batch: Array<{ frame: ReplayFrame; imageData: string }>,
1055
1055
  ): Promise<void> {
1056
1056
  if (batch.length === 0) return;
1057
- logger.info(`[replay.sdk.frame] backend frame upload started`, { count: batch.length });
1057
+ __DEV__ && logger.info(`[replay.sdk.frame] backend frame upload started`, { count: batch.length });
1058
1058
 
1059
1059
  // Object-storage path: presign → PUT bytes → post key-only metadata.
1060
1060
  if (this.objectStorageActive && this.config.clientKey) {
1061
1061
  const result = await this._uploadFramesViaStorage(sessionId, batch);
1062
1062
  if (result === 'sent') {
1063
- logger.info(`[replay.sdk.frame] backend frame upload success (object storage)`);
1063
+ __DEV__ && logger.info(`[replay.sdk.frame] backend frame upload success (object storage)`);
1064
1064
  return;
1065
1065
  }
1066
1066
  // 'disabled' → storage not configured server-side; fall through to inline.
@@ -1072,7 +1072,7 @@ export class BackendSessionAdapter implements SessionTransport {
1072
1072
  ? ENDPOINTS.INGESTION_FRAMES(sessionId)
1073
1073
  : `/replay/sessions/${sessionId}/frames`;
1074
1074
  await this._post(framesEndpoint, { frames });
1075
- logger.info(`[replay.sdk.frame] backend frame upload success`);
1075
+ __DEV__ && logger.info(`[replay.sdk.frame] backend frame upload success`);
1076
1076
  }
1077
1077
 
1078
1078
  // ─── Cross-kill frame recovery ──────────────────────────────────────
@@ -1212,7 +1212,7 @@ export class BackendSessionAdapter implements SessionTransport {
1212
1212
  return;
1213
1213
  }
1214
1214
 
1215
- logger.info(`[replay.sdk.frame] recovering ${items.length} frame(s) for prior session ${sessionId}`);
1215
+ __DEV__ && logger.info(`[replay.sdk.frame] recovering ${items.length} frame(s) for prior session ${sessionId}`);
1216
1216
  /**
1217
1217
  * DELETE ONLY WHAT WAS ACCEPTED.
1218
1218
  *
@@ -1291,7 +1291,7 @@ export class BackendSessionAdapter implements SessionTransport {
1291
1291
  const events = batch.map(e => this._leanEvent(e, e.sessionId));
1292
1292
 
1293
1293
  try {
1294
- logger.info(`[replay.sdk.event] backend event upload started`, { count: batch.length });
1294
+ __DEV__ && logger.info(`[replay.sdk.event] backend event upload started`, { count: batch.length });
1295
1295
  // Durable native outbox owns delivery when active (no duplicate JS POST).
1296
1296
  // The native enqueue is NOT gated on row-readiness: it writes to disk and its
1297
1297
  // uploader handles ordering/retry, so it must accept data even while offline.
@@ -1305,8 +1305,8 @@ export class BackendSessionAdapter implements SessionTransport {
1305
1305
  eventsEndpoint,
1306
1306
  { events },
1307
1307
  );
1308
- logger.info(`[replay.sdk.event] backend event upload success`);
1309
- logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} event(s)`);
1308
+ __DEV__ && logger.info(`[replay.sdk.event] backend event upload success`);
1309
+ __DEV__ && logger.debug(`[BackendSessionAdapter] Flushed ${batch.length} event(s)`);
1310
1310
  } catch (err) {
1311
1311
  if (BackendSessionAdapter._isPermanentHttpError(err)) return;
1312
1312
  logger.warn(`[replay.sdk.error] backend event upload failure`, { count: batch.length });
@@ -11,7 +11,9 @@
11
11
  */
12
12
 
13
13
  import type { DebugTransport } from '../../debug/transport';
14
- import { PROTOCOL_VERSION } from '../../debug/protocol';
14
+ // The SDK-owned constant, not the debug/protocol shim — the shim re-exports from the vendored
15
+ // schema module, which would pull every desktop wire-message schema into production bundles.
16
+ import { PROTOCOL_VERSION } from '../../core/constants/protocol';
15
17
  import { logger } from '../../core/logger/internalLogger';
16
18
  import type {
17
19
  SessionTransport,
@@ -96,7 +98,7 @@ export class DesktopSessionTransport implements SessionTransport {
96
98
  private _send(name: string, data: Record<string, unknown>): void {
97
99
  try {
98
100
  if (this.transport.getState() !== 'connected') {
99
- logger.debug(`[DesktopSessionTransport] Not connected, buffering: ${name}`);
101
+ __DEV__ && logger.debug(`[DesktopSessionTransport] Not connected, buffering: ${name}`);
100
102
  }
101
103
 
102
104
  const msg = {
@@ -206,7 +206,7 @@ export class JourneyEventPipeline {
206
206
  if (evKey === key && (now - ev.ts) < this.config.dedupeWindowMs) {
207
207
  ev.payload = opts?.payload;
208
208
  this.lastEventConfidence = (opts?.payload as any)?.confidence ?? null;
209
- logger.debug('[JourneyEventPipeline] replaced low-confidence event with native-high');
209
+ __DEV__ && logger.debug('[JourneyEventPipeline] replaced low-confidence event with native-high');
210
210
  // Re-emit so transport receives the corrected coordinates.
211
211
  // Backend uses upsert on eventId, so this overwrites the stale record.
212
212
  try { this.onEmit?.(ev); } catch { /* transport must not crash pipeline */ }
@@ -350,10 +350,10 @@ export class ReplayCaptureManager {
350
350
  this.frequencyTimer = setInterval(() => {
351
351
  this.triggerCapture('frequency').catch(() => { });
352
352
  }, intervalMs);
353
- logger.debug(`[ReplayCaptureManager] Frequency mode: every ${intervalMs}ms`);
353
+ __DEV__ && logger.debug(`[ReplayCaptureManager] Frequency mode: every ${intervalMs}ms`);
354
354
  }
355
355
 
356
- logger.debug(`[ReplayCaptureManager] Started (mode=${this.config.captureMode})`);
356
+ __DEV__ && logger.debug(`[ReplayCaptureManager] Started (mode=${this.config.captureMode})`);
357
357
  }
358
358
 
359
359
  /** Stop capture — cancels ALL pending timers and increments generation */
@@ -408,7 +408,7 @@ export class ReplayCaptureManager {
408
408
  // Clear dedup state
409
409
  this.lastCaptureIntent = null;
410
410
 
411
- logger.debug('[ReplayCaptureManager] Stopped (all timers cancelled, generation incremented)');
411
+ __DEV__ && logger.debug('[ReplayCaptureManager] Stopped (all timers cancelled, generation incremented)');
412
412
  }
413
413
 
414
414
  /** Notify of a screen change — triggers cancellable delayed capture */
@@ -450,7 +450,7 @@ export class ReplayCaptureManager {
450
450
  this.pendingInteractionTimeout = null;
451
451
  this.pendingInteractionPoint = undefined;
452
452
  this.pendingInteractionScreen = undefined;
453
- logger.debug(
453
+ __DEV__ && logger.debug(
454
454
  `[ReplayCaptureManager] Pending interaction absorbed by navigation to ${screenName}`,
455
455
  );
456
456
  }
@@ -470,7 +470,7 @@ export class ReplayCaptureManager {
470
470
  absorbedInteractionPoint = stale.interactionPoint;
471
471
  // Evict the stale frame from the frames list
472
472
  this.frames = this.frames.filter(f => f.frameId !== stale.frameId);
473
- logger.debug(
473
+ __DEV__ && logger.debug(
474
474
  `[ReplayCaptureManager] Late absorption: evicted stale interaction frame ` +
475
475
  `${stale.frameId} on ${stale.screen}, navigation to ${screenName}`,
476
476
  );
@@ -490,7 +490,7 @@ export class ReplayCaptureManager {
490
490
  if (this._inFlightInteractionPoint) {
491
491
  absorbedInteractionPoint = this._inFlightInteractionPoint;
492
492
  }
493
- logger.debug(
493
+ __DEV__ && logger.debug(
494
494
  `[ReplayCaptureManager] In-flight interaction suppressed by navigation to ${screenName}`,
495
495
  );
496
496
  }
@@ -531,7 +531,7 @@ export class ReplayCaptureManager {
531
531
  // Semantic dedup: if a navigation capture is pending for the SAME screen,
532
532
  // the navigation frame will represent the post-interaction state.
533
533
  if (this.pendingNavTimeout && this.pendingNavScreen === screen) {
534
- logger.debug('[ReplayCaptureManager] Interaction suppressed — navigation pending for same screen');
534
+ __DEV__ && logger.debug('[ReplayCaptureManager] Interaction suppressed — navigation pending for same screen');
535
535
  return;
536
536
  }
537
537
 
@@ -591,7 +591,7 @@ export class ReplayCaptureManager {
591
591
  clearTimeout(this.pendingNavTimeout);
592
592
  this.pendingNavTimeout = null;
593
593
  this.pendingNavScreen = null;
594
- logger.debug('[ReplayCaptureManager] Navigation capture cancelled — loading-end supersedes for same screen');
594
+ __DEV__ && logger.debug('[ReplayCaptureManager] Navigation capture cancelled — loading-end supersedes for same screen');
595
595
  }
596
596
 
597
597
  // Track which screen this loading capture is for
@@ -674,7 +674,7 @@ export class ReplayCaptureManager {
674
674
 
675
675
  // Same reason + same screen within cooldown → semantic duplicate
676
676
  if (sameReason && sameScreen && withinCooldown) {
677
- logger.debug(
677
+ __DEV__ && logger.debug(
678
678
  `[ReplayCaptureManager] Semantic dedup: ${reason}@${screenName} suppressed ` +
679
679
  `(same intent within ${SAME_INTENT_COOLDOWN_MS}ms)`,
680
680
  );
@@ -739,7 +739,7 @@ export class ReplayCaptureManager {
739
739
  if (this._suppressInFlightInteraction) {
740
740
  this._suppressInFlightInteraction = false;
741
741
  discardStaged();
742
- logger.debug('[ReplayCaptureManager] In-flight interaction suppressed — navigation arrived during capture');
742
+ __DEV__ && logger.debug('[ReplayCaptureManager] In-flight interaction suppressed — navigation arrived during capture');
743
743
  return null;
744
744
  }
745
745
  }
@@ -748,7 +748,7 @@ export class ReplayCaptureManager {
748
748
  // discard the result to prevent stale frames
749
749
  if (gen !== this.captureGeneration) {
750
750
  discardStaged();
751
- logger.debug('[ReplayCaptureManager] Stale capture discarded (generation mismatch)');
751
+ __DEV__ && logger.debug('[ReplayCaptureManager] Stale capture discarded (generation mismatch)');
752
752
  return null;
753
753
  }
754
754
 
@@ -760,7 +760,7 @@ export class ReplayCaptureManager {
760
760
  if (!result) {
761
761
  // Native capture unavailable — log warning, return null
762
762
  // NO JS fallback — this is by design
763
- logger.debug('[ReplayCaptureManager] Native capture returned null — frame not captured');
763
+ __DEV__ && logger.debug('[ReplayCaptureManager] Native capture returned null — frame not captured');
764
764
  return null;
765
765
  }
766
766
 
@@ -784,7 +784,7 @@ export class ReplayCaptureManager {
784
784
  const changeDetection = this.config.changeDetection !== false;
785
785
  if (changeDetection && reason === 'frequency' && !changed && !heartbeatDue) {
786
786
  discardStaged();
787
- logger.debug('[ReplayCaptureManager] Change-trigger suppressed identical frequency frame');
787
+ __DEV__ && logger.debug('[ReplayCaptureManager] Change-trigger suppressed identical frequency frame');
788
788
  return null;
789
789
  }
790
790
 
@@ -891,7 +891,7 @@ export class ReplayCaptureManager {
891
891
  try {
892
892
  const committed = await this.outboxCapture?.commit(meta);
893
893
  if (!committed) {
894
- logger.debug('[ReplayCaptureManager] Outbox commit failed — frame staged but not uploadable');
894
+ __DEV__ && logger.debug('[ReplayCaptureManager] Outbox commit failed — frame staged but not uploadable');
895
895
  }
896
896
  } catch {
897
897
  // Commit failure must not crash capture; orphan is swept later.
@@ -205,7 +205,7 @@ export class SessionManager {
205
205
  */
206
206
  setBackendTransport(transport: BackendSessionAdapter): void {
207
207
  this._backendTransport = transport;
208
- logger.info('[SessionManager] Backend transport attached (replay → backend upload enabled)');
208
+ __DEV__ && logger.info('[SessionManager] Backend transport attached (replay → backend upload enabled)');
209
209
  }
210
210
 
211
211
  /** Expose the backend transport so features can queue network/errors/performance. */
@@ -235,7 +235,7 @@ export class SessionManager {
235
235
  */
236
236
  setDesktopTransport(debugTransport: DebugTransport): void {
237
237
  this.desktopTransport = new DesktopSessionTransport(debugTransport);
238
- logger.info('[SessionManager] Desktop transport attached');
238
+ __DEV__ && logger.info('[SessionManager] Desktop transport attached');
239
239
  }
240
240
 
241
241
  // ─── Session Lifecycle ──────────────────────────────────────────────
@@ -278,7 +278,7 @@ export class SessionManager {
278
278
  // Hot-swap into active capture manager if session is running
279
279
  if (this.active && this.captureManager) {
280
280
  (this.captureManager as any).nativeCapture = captureFn;
281
- logger.info('[SessionManager] Capture function updated (hot-swap)');
281
+ __DEV__ && logger.info('[SessionManager] Capture function updated (hot-swap)');
282
282
  }
283
283
  }
284
284
 
@@ -288,7 +288,7 @@ export class SessionManager {
288
288
  startSession(metadata?: Partial<SessionMetadata>): void {
289
289
  try {
290
290
  if (this.active) {
291
- logger.debug('[SessionManager] Session already active, skipping start');
291
+ __DEV__ && logger.debug('[SessionManager] Session already active, skipping start');
292
292
  return;
293
293
  }
294
294
 
@@ -461,12 +461,12 @@ export class SessionManager {
461
461
  // Set timeout
462
462
  if (this.config.maxDurationMs > 0) {
463
463
  this.timeoutTimer = setTimeout(() => {
464
- logger.debug('[SessionManager] Session timeout reached');
464
+ __DEV__ && logger.debug('[SessionManager] Session timeout reached');
465
465
  this.endSession('timeout');
466
466
  }, this.config.maxDurationMs);
467
467
  }
468
468
 
469
- logger.info(`[SessionManager] Session started: ${sessionId}`);
469
+ __DEV__ && logger.info(`[SessionManager] Session started: ${sessionId}`);
470
470
 
471
471
  // ── Replay initial screen ──────────────────────────────────────
472
472
  // If the user was already on a screen before pressing Record
@@ -566,7 +566,7 @@ export class SessionManager {
566
566
  this.captureManager.clear();
567
567
  // (this.active already set to false above)
568
568
 
569
- logger.info(
569
+ __DEV__ && logger.info(
570
570
  `[SessionManager] Session ended: ${this.session.sessionId} ` +
571
571
  `(${reason}, sync=${decision.shouldSync}, priority=${decision.priority})`,
572
572
  );
@@ -805,7 +805,7 @@ export class SessionManager {
805
805
 
806
806
  const alreadyNormalized = this._normalizeInteractionPayload(p);
807
807
 
808
- logger.debug(
808
+ __DEV__ && logger.debug(
809
809
  `[TapAccuracy] sink platform=${p.platform ?? '?'} space=${p.coordinateSpace ?? '?'} ` +
810
810
  `source=${alreadyNormalized ? (p.confidence === 'high' ? 'native-high' : 'js-precomputed') : 'js-estimated'} ` +
811
811
  `norm=(${p.normalizedX},${p.normalizedY}) base=(${p.viewportWidth}x${p.viewportHeight})`,
@@ -963,7 +963,7 @@ export class SessionManager {
963
963
 
964
964
  this.crashAnchors.push(anchor);
965
965
 
966
- logger.debug(
966
+ __DEV__ && logger.debug(
967
967
  `[SessionManager] Crash anchored: ${crashEventId}, ` +
968
968
  `protected ${anchor.nearbyEventIds.length} events, ` +
969
969
  `${anchor.nearbyFrameIds.length} frames`,
@@ -71,7 +71,7 @@ export class SyncDecisionEngine {
71
71
 
72
72
  const decision = this._policy(enrichedCandidate);
73
73
 
74
- logger.debug(
74
+ __DEV__ && logger.debug(
75
75
  `[SyncDecisionEngine] Session ${candidate.sessionId}: ` +
76
76
  `shouldSync=${decision.shouldSync}, priority=${decision.priority}, ` +
77
77
  `reason="${decision.reason}"`,
@@ -35,27 +35,19 @@ export async function updateSkanConversionValue(
35
35
  try {
36
36
  const mod = getSkanModule();
37
37
  if (!mod?.updateConversionValue) {
38
- logger.debug('[SKAN] Native module unavailable — conversion value not sent');
38
+ __DEV__ && logger.debug('[SKAN] Native module unavailable — conversion value not sent');
39
39
  return false;
40
40
  }
41
41
  const fine = Math.max(0, Math.min(63, Math.round(value)));
42
42
  await mod.updateConversionValue(fine, coarseValue ?? null, !!lockWindow);
43
- logger.debug(`[SKAN] updateConversionValue(${fine}, ${coarseValue ?? '-'}, lock=${lockWindow})`);
43
+ __DEV__ && logger.debug(`[SKAN] updateConversionValue(${fine}, ${coarseValue ?? '-'}, lock=${lockWindow})`);
44
44
  return true;
45
45
  } catch (err) {
46
- logger.debug(`[SKAN] updateConversionValue failed: ${(err as Error)?.message}`);
46
+ __DEV__ && logger.debug(`[SKAN] updateConversionValue failed: ${(err as Error)?.message}`);
47
47
  return false;
48
48
  }
49
49
  }
50
50
 
51
- /** Register the app's SKAdNetwork attribution at first launch (iOS 11.3+). No-op elsewhere. */
52
- export async function registerSkanAttribution(): Promise<void> {
53
- try {
54
- const mod = getSkanModule();
55
- if (!mod?.registerAppForAttribution) return;
56
- await mod.registerAppForAttribution();
57
- logger.debug('[SKAN] registered app for attribution');
58
- } catch {
59
- // No-throw.
60
- }
61
- }
51
+ // (registerSkanAttribution was removed: nothing in the SDK or any consumer ever called it, so SKAN
52
+ // attribution registration never actually happened. If the feature is wanted, wire it from the
53
+ // facade's init path rather than restoring an orphaned export — see git history for the body.)
@@ -106,7 +106,7 @@ export class SkanConversionManager {
106
106
  headers: { 'x-scalebun-client-key': this.clientKey },
107
107
  });
108
108
  if (!res.ok) {
109
- logger.debug(`[SKAN] schema fetch HTTP ${res.status}`);
109
+ __DEV__ && logger.debug(`[SKAN] schema fetch HTTP ${res.status}`);
110
110
  return;
111
111
  }
112
112
  const json: any = await res.json();
@@ -118,12 +118,12 @@ export class SkanConversionManager {
118
118
  } catch {
119
119
  /* no-throw */
120
120
  }
121
- logger.debug(
121
+ __DEV__ && logger.debug(
122
122
  `[SKAN] schema loaded (enabled=${this.enabled}, ${this.schema.length} rules)`,
123
123
  );
124
124
  }
125
125
  } catch (err) {
126
- logger.debug(`[SKAN] schema fetch failed: ${(err as Error)?.message}`);
126
+ __DEV__ && logger.debug(`[SKAN] schema fetch failed: ${(err as Error)?.message}`);
127
127
  }
128
128
  }
129
129
 
@@ -142,12 +142,12 @@ export class SkanConversionManager {
142
142
  this.persist();
143
143
 
144
144
  void this.applyCv(rule.value, rule.coarse, rule.lockWindow ?? false);
145
- logger.debug(
145
+ __DEV__ && logger.debug(
146
146
  `[SKAN] event '${eventName}' → CV ${rule.value}` +
147
147
  `${rule.coarse ? `/${rule.coarse}` : ''}${rule.lockWindow ? ' (locked)' : ''}`,
148
148
  );
149
149
  } catch (err) {
150
- logger.debug(`[SKAN] onEvent('${eventName}') failed: ${(err as Error)?.message}`);
150
+ __DEV__ && logger.debug(`[SKAN] onEvent('${eventName}') failed: ${(err as Error)?.message}`);
151
151
  }
152
152
  }
153
153
 
package/src/index.ts CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  // ─── Default Export: SDK Facade Singleton ───────────────────────────────────
14
14
  // Usage: import ScaleBun from '@scalebun/react-native';
15
- // await ScaleBun.init({ projectId: '...', publishableKey: '...', apiBaseUrl: '...' });
15
+ // await ScaleBun.init({ projectId: '...', publishableKey: '...' });
16
16
 
17
17
  export { default } from './public/ScaleBunFacade';
18
18
  export { ScaleBunProvider } from './public/ScaleBunProvider';
@@ -177,6 +177,6 @@ export function installFetchInterceptor(
177
177
  }
178
178
  };
179
179
 
180
- logger.debug('Fetch Interceptor installed');
180
+ __DEV__ && logger.debug('Fetch Interceptor installed');
181
181
  });
182
182
  }
@@ -226,6 +226,6 @@ export function installXHRInterceptor(
226
226
  return originalSend.apply(this, arguments as any);
227
227
  };
228
228
 
229
- logger.debug('XHR Interceptor installed');
229
+ __DEV__ && logger.debug('XHR Interceptor installed');
230
230
  });
231
231
  }