@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
@@ -30,6 +30,15 @@ class SlotManager(private val filesDir: File) {
30
30
  private const val BUNDLE_FILENAME = "bundle.jsbundle"
31
31
  private const val META_FILENAME = "meta.json"
32
32
  private const val BOOT_MARKER_FILENAME = "boot_marker"
33
+
34
+ /**
35
+ * Launches a freshly-applied bundle gets to call markHealthy() before the
36
+ * guard treats it as crash-looping. 2 = one retry: a single unlucky boot
37
+ * (OOM kill, user swipe-away during startup) does not cost the update,
38
+ * but a bundle that genuinely cannot start is gone by the second launch.
39
+ */
40
+ private const val MAX_BOOT_ATTEMPTS = 2
41
+ private const val REVERT_RECORD_FILENAME = "last_revert.json"
33
42
  }
34
43
 
35
44
  private val otaRoot: File get() = File(filesDir, OTA_DIR)
@@ -37,6 +46,7 @@ class SlotManager(private val filesDir: File) {
37
46
  private val nextSlot: File get() = File(otaRoot, "next")
38
47
  private val previousSlot: File get() = File(otaRoot, "previous")
39
48
  private val bootMarker: File get() = File(otaRoot, BOOT_MARKER_FILENAME)
49
+ private val revertRecord: File get() = File(otaRoot, REVERT_RECORD_FILENAME)
40
50
 
41
51
  /**
42
52
  * Returns the absolute path to the active JS bundle, or null if no OTA
@@ -157,9 +167,26 @@ class SlotManager(private val filesDir: File) {
157
167
 
158
168
  /**
159
169
  * Revert to previous slot (boot-guard triggered or manual rollback).
170
+ *
171
+ * `reason` is persisted so JS can report WHY the device is no longer on the
172
+ * bundle it installed. Without it an auto-revert was invisible to the
173
+ * dashboard: `bootGuardReverted` was read by the orchestrator and written by
174
+ * nobody, so every crash-guard rollback recorded zero rollbacks.
160
175
  */
161
- fun revert(): Boolean {
176
+ @JvmOverloads
177
+ fun revert(reason: String? = null): Boolean {
162
178
  try {
179
+ if (reason != null) {
180
+ runCatching {
181
+ otaRoot.mkdirs()
182
+ revertRecord.writeText(
183
+ JSONObject()
184
+ .put("reason", reason)
185
+ .put("at", System.currentTimeMillis())
186
+ .toString(),
187
+ )
188
+ }
189
+ }
163
190
  if (!previousSlot.exists()) {
164
191
  Log.w(TAG, "No previous/ to revert to — clearing current/")
165
192
  currentSlot.deleteRecursively()
@@ -228,12 +255,39 @@ class SlotManager(private val filesDir: File) {
228
255
  "Boot guard cannot verify this bundle — marker or meta has no sha256. " +
229
256
  "Leaving it in place; restage with a current SDK to re-enable the check.",
230
257
  )
231
- } else if (currentId != markerId) {
258
+ return
259
+ }
260
+ if (currentId != markerId) {
232
261
  Log.w(TAG, "Boot marker sha256 mismatch — auto-reverting")
233
262
  revert()
263
+ return
234
264
  }
235
- // If they match: this is the first launch of a new bundle.
236
- // The marker stays until markHealthy() is called.
265
+
266
+ // ── Crash-loop revert ────────────────────────────────────────────
267
+ // Matching hashes mean the bundle is INTACT, which says nothing
268
+ // about whether it RUNS. A bundle that throws at JS init installs
269
+ // cleanly, matches every boot, and never reaches markHealthy() — so
270
+ // a hash-only guard let it crash-loop forever, bricking the app
271
+ // until reinstall. That is the exact failure an OTA boot guard
272
+ // exists to prevent.
273
+ //
274
+ // The marker is therefore also a boot-attempt counter: every launch
275
+ // that starts with the marker still present increments it. Reaching
276
+ // the limit means the bundle has been given MAX_BOOT_ATTEMPTS
277
+ // chances to call markHealthy() and never did → revert.
278
+ val attempts = markerJson.optInt("bootAttempts", 0) + 1
279
+ if (attempts >= MAX_BOOT_ATTEMPTS) {
280
+ Log.w(
281
+ TAG,
282
+ "Bundle failed to become healthy in $attempts launch(es) — auto-reverting",
283
+ )
284
+ revert(reason = "boot_crash_guard")
285
+ return
286
+ }
287
+ markerJson.put("bootAttempts", attempts)
288
+ bootMarker.writeText(markerJson.toString())
289
+ FileOutputStream(bootMarker, true).use { it.fd.sync() }
290
+ Log.i(TAG, "Boot guard: attempt $attempts/$MAX_BOOT_ATTEMPTS for this bundle")
237
291
  } catch (e: Exception) {
238
292
  Log.e(TAG, "checkBootGuard() failed — reverting to be safe", e)
239
293
  revert()
@@ -249,6 +303,18 @@ class SlotManager(private val filesDir: File) {
249
303
  state.put("next", readMeta(nextSlot))
250
304
  state.put("previous", readMeta(previousSlot))
251
305
  state.put("bootMarkerPresent", bootMarker.exists())
306
+ // Consume-on-read: the orchestrator turns this into an AUTO_ROLLBACK
307
+ // event exactly once, then the record is gone. Leaving it in place would
308
+ // re-report the same rollback on every subsequent launch.
309
+ if (revertRecord.exists()) {
310
+ runCatching {
311
+ val rec = JSONObject(revertRecord.readText())
312
+ state.put("bootGuardReverted", true)
313
+ state.put("bootGuardRevertReason", rec.optString("reason", "boot_crash_guard"))
314
+ state.put("bootGuardRevertedAt", rec.optLong("at", 0L))
315
+ }
316
+ revertRecord.delete()
317
+ }
252
318
  return state
253
319
  }
254
320