@scalebun/react-native 1.1.0 → 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.
- package/dist/scalebun.full.js +33132 -0
- package/dist/scalebun.full.js.map +1 -0
- package/dist/scalebun.slim.js +29930 -0
- package/dist/scalebun.slim.js.map +1 -0
- package/lib/commonjs/bootstrap/FeatureRegistry.js +4 -4
- package/lib/commonjs/bootstrap/FeatureRegistry.js.map +1 -1
- package/lib/commonjs/bootstrap/SDKBootstrapper.js +8 -8
- package/lib/commonjs/bootstrap/SDKBootstrapper.js.map +1 -1
- package/lib/commonjs/core/config/schema.js +412 -232
- package/lib/commonjs/core/config/schema.js.map +1 -1
- package/lib/commonjs/core/constants/protocol.js +31 -0
- package/lib/commonjs/core/constants/protocol.js.map +1 -0
- package/lib/commonjs/core/constants/timings.js +4 -1
- package/lib/commonjs/core/constants/timings.js.map +1 -1
- package/lib/commonjs/core/lifecycle/appLifecycle.js +1 -1
- package/lib/commonjs/core/lifecycle/appLifecycle.js.map +1 -1
- package/lib/commonjs/debug/bootstrap.js +30 -10
- package/lib/commonjs/debug/bootstrap.js.map +1 -1
- package/lib/commonjs/debug/exportBridge.js +5 -3
- package/lib/commonjs/debug/exportBridge.js.map +1 -1
- package/lib/commonjs/debug/hostResolver.js +2 -2
- package/lib/commonjs/debug/hostResolver.js.map +1 -1
- package/lib/commonjs/debug/perfWiring.js +4 -4
- package/lib/commonjs/debug/perfWiring.js.map +1 -1
- package/lib/commonjs/debug/replayWiring.js +5 -5
- package/lib/commonjs/debug/replayWiring.js.map +1 -1
- package/lib/commonjs/debug/screenTracking.js +2 -2
- package/lib/commonjs/debug/screenTracking.js.map +1 -1
- package/lib/commonjs/debug/sessionWiring.js +2 -2
- package/lib/commonjs/debug/sessionWiring.js.map +1 -1
- package/lib/commonjs/features/crash/NativeCrashFeature.js +1 -1
- package/lib/commonjs/features/crash/NativeCrashFeature.js.map +1 -1
- package/lib/commonjs/features/crash/globalHandler.js +3 -3
- package/lib/commonjs/features/crash/globalHandler.js.map +1 -1
- package/lib/commonjs/features/crash/nativeCrashBridge.js +7 -7
- package/lib/commonjs/features/crash/nativeCrashBridge.js.map +1 -1
- package/lib/commonjs/features/crash/rejectionHandler.js +2 -2
- package/lib/commonjs/features/crash/rejectionHandler.js.map +1 -1
- package/lib/commonjs/features/engage/EngageArchetypeRenderers.js +0 -9
- package/lib/commonjs/features/engage/EngageArchetypeRenderers.js.map +1 -1
- package/lib/commonjs/features/engage/EngageInAppView.js +1 -1
- package/lib/commonjs/features/engage/EngageInAppView.js.map +1 -1
- package/lib/commonjs/features/engage/EngagePromptProvider.js +17 -17
- package/lib/commonjs/features/engage/EngagePromptProvider.js.map +1 -1
- package/lib/commonjs/features/engage/EngageTransport.js +5 -5
- package/lib/commonjs/features/engage/EngageTransport.js.map +1 -1
- package/lib/commonjs/features/engage/engagePushTokenBridge.js +4 -4
- package/lib/commonjs/features/engage/engagePushTokenBridge.js.map +1 -1
- package/lib/commonjs/features/engage/engageShakeBridge.js +2 -2
- package/lib/commonjs/features/engage/engageShakeBridge.js.map +1 -1
- package/lib/commonjs/features/engage/engageSignals.js +1 -1
- package/lib/commonjs/features/engage/engageSignals.js.map +1 -1
- package/lib/commonjs/features/engage/engageStoreReviewBridge.js +2 -2
- package/lib/commonjs/features/engage/engageStoreReviewBridge.js.map +1 -1
- package/lib/commonjs/features/engage/engageTestSeenStore.js +1 -1
- package/lib/commonjs/features/engage/engageTestSeenStore.js.map +1 -1
- package/lib/commonjs/features/engage/engageThrottle.js +4 -4
- package/lib/commonjs/features/engage/engageThrottle.js.map +1 -1
- package/lib/commonjs/features/engage/engageTriggerEngine.js +4 -4
- package/lib/commonjs/features/engage/engageTriggerEngine.js.map +1 -1
- package/lib/commonjs/features/engage/engageWindowInsets.js +1 -1
- package/lib/commonjs/features/engage/engageWindowInsets.js.map +1 -1
- package/lib/commonjs/features/install-referrer/installReferrer.js +3 -3
- package/lib/commonjs/features/install-referrer/installReferrer.js.map +1 -1
- package/lib/commonjs/features/journey/calibrationContext.js +0 -9
- package/lib/commonjs/features/journey/calibrationContext.js.map +1 -1
- package/lib/commonjs/features/journey/journeyManager.js +4 -1
- package/lib/commonjs/features/journey/journeyManager.js.map +1 -1
- package/lib/commonjs/features/navigation/AutoScreenDetector.js +4 -4
- package/lib/commonjs/features/navigation/AutoScreenDetector.js.map +1 -1
- package/lib/commonjs/features/ota/OtaOrchestrator.js +18 -18
- package/lib/commonjs/features/ota/OtaOrchestrator.js.map +1 -1
- package/lib/commonjs/features/ota/geoCountry.js +2 -2
- package/lib/commonjs/features/ota/geoCountry.js.map +1 -1
- package/lib/commonjs/features/ota/retry.js +2 -2
- package/lib/commonjs/features/ota/retry.js.map +1 -1
- package/lib/commonjs/features/replay/core/logger/logger.js +0 -4
- package/lib/commonjs/features/replay/core/logger/logger.js.map +1 -1
- package/lib/commonjs/features/replay/integrations/network/networkAdapter.js +1 -54
- package/lib/commonjs/features/replay/integrations/network/networkAdapter.js.map +1 -1
- package/lib/commonjs/features/replay/integrations/react-navigation/navigationIntegration.js +1 -1
- package/lib/commonjs/features/replay/integrations/react-navigation/navigationIntegration.js.map +1 -1
- package/lib/commonjs/features/replay/integrations/touch/ReplayRoot.js +1 -1
- package/lib/commonjs/features/replay/integrations/touch/ReplayRoot.js.map +1 -1
- package/lib/commonjs/features/replay/pipeline/batching/batchManager.js +1 -1
- package/lib/commonjs/features/replay/pipeline/batching/batchManager.js.map +1 -1
- package/lib/commonjs/features/replay/pipeline/retry/retryPolicy.js +1 -1
- package/lib/commonjs/features/replay/pipeline/retry/retryPolicy.js.map +1 -1
- package/lib/commonjs/features/replay/public/api.js +7 -7
- package/lib/commonjs/features/replay/public/api.js.map +1 -1
- package/lib/commonjs/features/replay/replay/session/sessionOrchestrator.js +9 -9
- package/lib/commonjs/features/replay/replay/session/sessionOrchestrator.js.map +1 -1
- package/lib/commonjs/features/session/BackendSessionAdapter.js +41 -41
- package/lib/commonjs/features/session/BackendSessionAdapter.js.map +1 -1
- package/lib/commonjs/features/session/DesktopSessionTransport.js +5 -2
- package/lib/commonjs/features/session/DesktopSessionTransport.js.map +1 -1
- package/lib/commonjs/features/session/JourneyEventPipeline.js +1 -1
- package/lib/commonjs/features/session/JourneyEventPipeline.js.map +1 -1
- package/lib/commonjs/features/session/ReplayCaptureManager.js +14 -14
- package/lib/commonjs/features/session/ReplayCaptureManager.js.map +1 -1
- package/lib/commonjs/features/session/SessionManager.js +9 -9
- package/lib/commonjs/features/session/SessionManager.js.map +1 -1
- package/lib/commonjs/features/session/SyncDecisionEngine.js +1 -1
- package/lib/commonjs/features/session/SyncDecisionEngine.js.map +1 -1
- package/lib/commonjs/features/skan/skanBridge.js +6 -15
- package/lib/commonjs/features/skan/skanBridge.js.map +1 -1
- package/lib/commonjs/features/skan/skanConversionManager.js +5 -5
- package/lib/commonjs/features/skan/skanConversionManager.js.map +1 -1
- package/lib/commonjs/integrations/fetch/fetchInterceptor.js +1 -1
- package/lib/commonjs/integrations/fetch/fetchInterceptor.js.map +1 -1
- package/lib/commonjs/integrations/xhr/xhrInterceptor.js +1 -1
- package/lib/commonjs/integrations/xhr/xhrInterceptor.js.map +1 -1
- package/lib/commonjs/metro/composeSourceMap.js +105 -0
- package/lib/commonjs/metro/composeSourceMap.js.map +1 -0
- package/lib/commonjs/metro/featureModules.js +131 -0
- package/lib/commonjs/metro/featureModules.js.map +1 -0
- package/lib/commonjs/metro/index.js +123 -2
- package/lib/commonjs/metro/index.js.map +1 -1
- package/lib/commonjs/metro/serializerCompose.js +129 -0
- package/lib/commonjs/metro/serializerCompose.js.map +1 -0
- package/lib/commonjs/pipeline/dispatcher/dispatcher.js +1 -1
- package/lib/commonjs/pipeline/dispatcher/dispatcher.js.map +1 -1
- package/lib/commonjs/pipeline/queue/flushQueue.js +2 -2
- package/lib/commonjs/pipeline/queue/flushQueue.js.map +1 -1
- package/lib/commonjs/pipeline/queue/persistentQueue.js +6 -37
- package/lib/commonjs/pipeline/queue/persistentQueue.js.map +1 -1
- package/lib/commonjs/pipeline/scheduler/flushScheduler.js +1 -1
- package/lib/commonjs/pipeline/scheduler/flushScheduler.js.map +1 -1
- package/lib/commonjs/public/ScaleBunFacade.js +15 -15
- package/lib/commonjs/public/ScaleBunFacade.js.map +1 -1
- package/lib/commonjs/push/PushManager.js +3 -3
- package/lib/commonjs/push/PushManager.js.map +1 -1
- package/lib/commonjs/push/adapters/NativeBridgeAdapter.js +1 -1
- package/lib/commonjs/push/adapters/NativeBridgeAdapter.js.map +1 -1
- package/lib/commonjs/push/native/nativeNotifications.js +7 -18
- package/lib/commonjs/push/native/nativeNotifications.js.map +1 -1
- package/lib/commonjs/storage/StorageBackend.js +1 -1
- package/lib/commonjs/storage/StorageBackend.js.map +1 -1
- package/lib/module/bootstrap/FeatureRegistry.js +4 -4
- package/lib/module/bootstrap/FeatureRegistry.js.map +1 -1
- package/lib/module/bootstrap/SDKBootstrapper.js +8 -8
- package/lib/module/bootstrap/SDKBootstrapper.js.map +1 -1
- package/lib/module/core/config/schema.js +411 -231
- package/lib/module/core/config/schema.js.map +1 -1
- package/lib/module/core/constants/protocol.js +25 -0
- package/lib/module/core/constants/protocol.js.map +1 -0
- package/lib/module/core/constants/timings.js +3 -1
- package/lib/module/core/constants/timings.js.map +1 -1
- package/lib/module/core/lifecycle/appLifecycle.js +1 -1
- package/lib/module/core/lifecycle/appLifecycle.js.map +1 -1
- package/lib/module/debug/bootstrap.js +30 -9
- package/lib/module/debug/bootstrap.js.map +1 -1
- package/lib/module/debug/exportBridge.js +5 -3
- package/lib/module/debug/exportBridge.js.map +1 -1
- package/lib/module/debug/hostResolver.js +2 -2
- package/lib/module/debug/hostResolver.js.map +1 -1
- package/lib/module/debug/perfWiring.js +4 -4
- package/lib/module/debug/perfWiring.js.map +1 -1
- package/lib/module/debug/replayWiring.js +5 -5
- package/lib/module/debug/replayWiring.js.map +1 -1
- package/lib/module/debug/screenTracking.js +2 -2
- package/lib/module/debug/screenTracking.js.map +1 -1
- package/lib/module/debug/sessionWiring.js +2 -2
- package/lib/module/debug/sessionWiring.js.map +1 -1
- package/lib/module/features/crash/NativeCrashFeature.js +1 -1
- package/lib/module/features/crash/NativeCrashFeature.js.map +1 -1
- package/lib/module/features/crash/globalHandler.js +3 -3
- package/lib/module/features/crash/globalHandler.js.map +1 -1
- package/lib/module/features/crash/nativeCrashBridge.js +7 -7
- package/lib/module/features/crash/nativeCrashBridge.js.map +1 -1
- package/lib/module/features/crash/rejectionHandler.js +2 -2
- package/lib/module/features/crash/rejectionHandler.js.map +1 -1
- package/lib/module/features/engage/EngageArchetypeRenderers.js +0 -8
- package/lib/module/features/engage/EngageArchetypeRenderers.js.map +1 -1
- package/lib/module/features/engage/EngageInAppView.js +1 -1
- package/lib/module/features/engage/EngageInAppView.js.map +1 -1
- package/lib/module/features/engage/EngagePromptProvider.js +17 -17
- package/lib/module/features/engage/EngagePromptProvider.js.map +1 -1
- package/lib/module/features/engage/EngageTransport.js +5 -5
- package/lib/module/features/engage/EngageTransport.js.map +1 -1
- package/lib/module/features/engage/engagePushTokenBridge.js +4 -4
- package/lib/module/features/engage/engagePushTokenBridge.js.map +1 -1
- package/lib/module/features/engage/engageShakeBridge.js +2 -2
- package/lib/module/features/engage/engageShakeBridge.js.map +1 -1
- package/lib/module/features/engage/engageSignals.js +1 -1
- package/lib/module/features/engage/engageSignals.js.map +1 -1
- package/lib/module/features/engage/engageStoreReviewBridge.js +2 -2
- package/lib/module/features/engage/engageStoreReviewBridge.js.map +1 -1
- package/lib/module/features/engage/engageTestSeenStore.js +1 -1
- package/lib/module/features/engage/engageTestSeenStore.js.map +1 -1
- package/lib/module/features/engage/engageThrottle.js +4 -4
- package/lib/module/features/engage/engageThrottle.js.map +1 -1
- package/lib/module/features/engage/engageTriggerEngine.js +4 -4
- package/lib/module/features/engage/engageTriggerEngine.js.map +1 -1
- package/lib/module/features/engage/engageWindowInsets.js +1 -1
- package/lib/module/features/engage/engageWindowInsets.js.map +1 -1
- package/lib/module/features/install-referrer/installReferrer.js +3 -3
- package/lib/module/features/install-referrer/installReferrer.js.map +1 -1
- package/lib/module/features/journey/calibrationContext.js +0 -8
- package/lib/module/features/journey/calibrationContext.js.map +1 -1
- package/lib/module/features/journey/journeyManager.js +3 -1
- package/lib/module/features/journey/journeyManager.js.map +1 -1
- package/lib/module/features/navigation/AutoScreenDetector.js +4 -4
- package/lib/module/features/navigation/AutoScreenDetector.js.map +1 -1
- package/lib/module/features/ota/OtaOrchestrator.js +18 -18
- package/lib/module/features/ota/OtaOrchestrator.js.map +1 -1
- package/lib/module/features/ota/geoCountry.js +2 -2
- package/lib/module/features/ota/geoCountry.js.map +1 -1
- package/lib/module/features/ota/retry.js +2 -2
- package/lib/module/features/ota/retry.js.map +1 -1
- package/lib/module/features/replay/core/logger/logger.js +0 -3
- package/lib/module/features/replay/core/logger/logger.js.map +1 -1
- package/lib/module/features/replay/integrations/network/networkAdapter.js +1 -52
- package/lib/module/features/replay/integrations/network/networkAdapter.js.map +1 -1
- package/lib/module/features/replay/integrations/react-navigation/navigationIntegration.js +1 -1
- package/lib/module/features/replay/integrations/react-navigation/navigationIntegration.js.map +1 -1
- package/lib/module/features/replay/integrations/touch/ReplayRoot.js +1 -1
- package/lib/module/features/replay/integrations/touch/ReplayRoot.js.map +1 -1
- package/lib/module/features/replay/pipeline/batching/batchManager.js +1 -1
- package/lib/module/features/replay/pipeline/batching/batchManager.js.map +1 -1
- package/lib/module/features/replay/pipeline/retry/retryPolicy.js +1 -1
- package/lib/module/features/replay/pipeline/retry/retryPolicy.js.map +1 -1
- package/lib/module/features/replay/public/api.js +7 -7
- package/lib/module/features/replay/public/api.js.map +1 -1
- package/lib/module/features/replay/replay/session/sessionOrchestrator.js +9 -9
- package/lib/module/features/replay/replay/session/sessionOrchestrator.js.map +1 -1
- package/lib/module/features/session/BackendSessionAdapter.js +41 -41
- package/lib/module/features/session/BackendSessionAdapter.js.map +1 -1
- package/lib/module/features/session/DesktopSessionTransport.js +4 -2
- package/lib/module/features/session/DesktopSessionTransport.js.map +1 -1
- package/lib/module/features/session/JourneyEventPipeline.js +1 -1
- package/lib/module/features/session/JourneyEventPipeline.js.map +1 -1
- package/lib/module/features/session/ReplayCaptureManager.js +14 -14
- package/lib/module/features/session/ReplayCaptureManager.js.map +1 -1
- package/lib/module/features/session/SessionManager.js +9 -9
- package/lib/module/features/session/SessionManager.js.map +1 -1
- package/lib/module/features/session/SyncDecisionEngine.js +1 -1
- package/lib/module/features/session/SyncDecisionEngine.js.map +1 -1
- package/lib/module/features/skan/skanBridge.js +6 -14
- package/lib/module/features/skan/skanBridge.js.map +1 -1
- package/lib/module/features/skan/skanConversionManager.js +5 -5
- package/lib/module/features/skan/skanConversionManager.js.map +1 -1
- package/lib/module/integrations/fetch/fetchInterceptor.js +1 -1
- package/lib/module/integrations/fetch/fetchInterceptor.js.map +1 -1
- package/lib/module/integrations/xhr/xhrInterceptor.js +1 -1
- package/lib/module/integrations/xhr/xhrInterceptor.js.map +1 -1
- package/lib/module/metro/composeSourceMap.js +97 -0
- package/lib/module/metro/composeSourceMap.js.map +1 -0
- package/lib/module/metro/featureModules.js +123 -0
- package/lib/module/metro/featureModules.js.map +1 -0
- package/lib/module/metro/index.js +122 -2
- package/lib/module/metro/index.js.map +1 -1
- package/lib/module/metro/serializerCompose.js +120 -0
- package/lib/module/metro/serializerCompose.js.map +1 -0
- package/lib/module/pipeline/dispatcher/dispatcher.js +1 -1
- package/lib/module/pipeline/dispatcher/dispatcher.js.map +1 -1
- package/lib/module/pipeline/queue/flushQueue.js +2 -2
- package/lib/module/pipeline/queue/flushQueue.js.map +1 -1
- package/lib/module/pipeline/queue/persistentQueue.js +6 -36
- package/lib/module/pipeline/queue/persistentQueue.js.map +1 -1
- package/lib/module/pipeline/scheduler/flushScheduler.js +1 -1
- package/lib/module/pipeline/scheduler/flushScheduler.js.map +1 -1
- package/lib/module/public/ScaleBunFacade.js +15 -15
- package/lib/module/public/ScaleBunFacade.js.map +1 -1
- package/lib/module/push/PushManager.js +3 -3
- package/lib/module/push/PushManager.js.map +1 -1
- package/lib/module/push/adapters/NativeBridgeAdapter.js +1 -1
- package/lib/module/push/adapters/NativeBridgeAdapter.js.map +1 -1
- package/lib/module/push/native/nativeNotifications.js +7 -17
- package/lib/module/push/native/nativeNotifications.js.map +1 -1
- package/lib/module/storage/StorageBackend.js +1 -1
- package/lib/module/storage/StorageBackend.js.map +1 -1
- package/lib/typescript/core/config/schema.d.ts +61 -40
- package/lib/typescript/core/config/schema.d.ts.map +1 -1
- package/lib/typescript/core/constants/protocol.d.ts +23 -0
- package/lib/typescript/core/constants/protocol.d.ts.map +1 -0
- package/lib/typescript/core/constants/timings.d.ts +1 -1
- package/lib/typescript/core/constants/timings.d.ts.map +1 -1
- package/lib/typescript/debug/bootstrap.d.ts +0 -1
- package/lib/typescript/debug/bootstrap.d.ts.map +1 -1
- package/lib/typescript/debug/exportBridge.d.ts.map +1 -1
- package/lib/typescript/features/engage/EngageArchetypeRenderers.d.ts +0 -2
- package/lib/typescript/features/engage/EngageArchetypeRenderers.d.ts.map +1 -1
- package/lib/typescript/features/journey/calibrationContext.d.ts +0 -1
- package/lib/typescript/features/journey/calibrationContext.d.ts.map +1 -1
- package/lib/typescript/features/journey/journeyManager.d.ts.map +1 -1
- package/lib/typescript/features/replay/core/logger/logger.d.ts +0 -1
- package/lib/typescript/features/replay/core/logger/logger.d.ts.map +1 -1
- package/lib/typescript/features/replay/integrations/network/networkAdapter.d.ts +0 -10
- package/lib/typescript/features/replay/integrations/network/networkAdapter.d.ts.map +1 -1
- package/lib/typescript/features/session/DesktopSessionTransport.d.ts.map +1 -1
- package/lib/typescript/features/skan/skanBridge.d.ts +0 -2
- package/lib/typescript/features/skan/skanBridge.d.ts.map +1 -1
- package/lib/typescript/metro/composeSourceMap.d.ts +26 -0
- package/lib/typescript/metro/composeSourceMap.d.ts.map +1 -0
- package/lib/typescript/metro/featureModules.d.ts +49 -0
- package/lib/typescript/metro/featureModules.d.ts.map +1 -0
- package/lib/typescript/metro/index.d.ts +22 -0
- package/lib/typescript/metro/index.d.ts.map +1 -1
- package/lib/typescript/metro/serializerCompose.d.ts +46 -0
- package/lib/typescript/metro/serializerCompose.d.ts.map +1 -0
- package/lib/typescript/pipeline/queue/persistentQueue.d.ts +0 -10
- package/lib/typescript/pipeline/queue/persistentQueue.d.ts.map +1 -1
- package/lib/typescript/push/native/nativeNotifications.d.ts +0 -6
- package/lib/typescript/push/native/nativeNotifications.d.ts.map +1 -1
- package/package.json +15 -11
- package/src/bootstrap/FeatureRegistry.ts +4 -4
- package/src/bootstrap/SDKBootstrapper.ts +8 -8
- package/src/core/config/schema.ts +353 -235
- package/src/core/constants/protocol.ts +24 -0
- package/src/core/constants/timings.ts +3 -1
- package/src/core/lifecycle/appLifecycle.ts +1 -1
- package/src/debug/bootstrap.ts +40 -7
- package/src/debug/exportBridge.ts +5 -3
- package/src/debug/hostResolver.ts +2 -2
- package/src/debug/perfWiring.ts +4 -4
- package/src/debug/replayWiring.ts +5 -5
- package/src/debug/screenTracking.ts +2 -2
- package/src/debug/sessionWiring.ts +2 -2
- package/src/features/crash/NativeCrashFeature.ts +1 -1
- package/src/features/crash/globalHandler.ts +3 -3
- package/src/features/crash/nativeCrashBridge.ts +7 -7
- package/src/features/crash/rejectionHandler.ts +2 -2
- package/src/features/engage/EngageArchetypeRenderers.tsx +0 -11
- package/src/features/engage/EngageInAppView.tsx +1 -1
- package/src/features/engage/EngagePromptProvider.tsx +17 -17
- package/src/features/engage/EngageTransport.ts +5 -5
- package/src/features/engage/engagePushTokenBridge.ts +4 -4
- package/src/features/engage/engageShakeBridge.ts +2 -2
- package/src/features/engage/engageSignals.ts +1 -1
- package/src/features/engage/engageStoreReviewBridge.ts +2 -2
- package/src/features/engage/engageTestSeenStore.ts +1 -1
- package/src/features/engage/engageThrottle.ts +4 -4
- package/src/features/engage/engageTriggerEngine.ts +4 -4
- package/src/features/engage/engageWindowInsets.ts +1 -1
- package/src/features/install-referrer/installReferrer.ts +3 -3
- package/src/features/journey/calibrationContext.ts +0 -9
- package/src/features/journey/journeyManager.ts +3 -1
- package/src/features/navigation/AutoScreenDetector.ts +4 -4
- package/src/features/ota/OtaOrchestrator.ts +18 -18
- package/src/features/ota/geoCountry.ts +2 -2
- package/src/features/ota/retry.ts +2 -2
- package/src/features/replay/core/logger/logger.ts +0 -4
- package/src/features/replay/integrations/network/networkAdapter.ts +1 -56
- package/src/features/replay/integrations/react-navigation/navigationIntegration.ts +1 -1
- package/src/features/replay/integrations/touch/ReplayRoot.tsx +1 -1
- package/src/features/replay/pipeline/batching/batchManager.ts +1 -1
- package/src/features/replay/pipeline/retry/retryPolicy.ts +1 -1
- package/src/features/replay/public/api.ts +7 -7
- package/src/features/replay/replay/session/sessionOrchestrator.ts +9 -9
- package/src/features/session/BackendSessionAdapter.ts +41 -41
- package/src/features/session/DesktopSessionTransport.ts +4 -2
- package/src/features/session/JourneyEventPipeline.ts +1 -1
- package/src/features/session/ReplayCaptureManager.ts +14 -14
- package/src/features/session/SessionManager.ts +9 -9
- package/src/features/session/SyncDecisionEngine.ts +1 -1
- package/src/features/skan/skanBridge.ts +6 -14
- package/src/features/skan/skanConversionManager.ts +5 -5
- package/src/integrations/fetch/fetchInterceptor.ts +1 -1
- package/src/integrations/xhr/xhrInterceptor.ts +1 -1
- package/src/metro/composeSourceMap.ts +104 -0
- package/src/metro/featureModules.ts +143 -0
- package/src/metro/index.ts +173 -1
- package/src/metro/serializerCompose.ts +157 -0
- package/src/pipeline/dispatcher/dispatcher.ts +1 -1
- package/src/pipeline/queue/flushQueue.ts +2 -2
- package/src/pipeline/queue/persistentQueue.ts +6 -35
- package/src/pipeline/scheduler/flushScheduler.ts +1 -1
- package/src/public/ScaleBunFacade.ts +15 -15
- package/src/push/PushManager.ts +3 -3
- package/src/push/adapters/NativeBridgeAdapter.ts +1 -1
- package/src/push/native/nativeNotifications.ts +7 -16
- package/src/storage/StorageBackend.ts +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScaleBun SDK — Build-time excludable feature registry.
|
|
3
|
+
*
|
|
4
|
+
* Metro has NO tree shaking: every module reachable from the entry point is bundled regardless of
|
|
5
|
+
* whether it is ever imported by name or ever executed. Measured on this SDK, importing a single
|
|
6
|
+
* tiny function instead of the whole facade changed the bundle by 115 bytes. So the only way a
|
|
7
|
+
* consumer can stop paying for a subsystem they do not use is to make it unreachable at RESOLUTION
|
|
8
|
+
* time, which is what `withScaleBun`'s `features` option does.
|
|
9
|
+
*
|
|
10
|
+
* Each entry lists module paths RELATIVE TO THE PACKAGE ROOT, without extension and without the
|
|
11
|
+
* `lib/module` / `lib/commonjs` / `src` prefix, so one list covers every build output.
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANT: a module belongs here only if it is genuinely unreachable when the feature is off.
|
|
14
|
+
* `debug/` is the cautionary case — it also contains PRODUCTION code:
|
|
15
|
+
* - `debug/redaction` → redactBody / redactNetworkEvent, used by SessionManager,
|
|
16
|
+
* persistentQueue and both network interceptors. Removing it would
|
|
17
|
+
* silently disable payload redaction. It is NOT listed here.
|
|
18
|
+
* - `debug/protocol` → PROTOCOL_VERSION, imported as a VALUE by journeyManager and
|
|
19
|
+
* DesktopSessionTransport. NOT listed here.
|
|
20
|
+
* - `debug/screenTracking` → getTrackedScreen, used by NetworkFeature. NOT listed here.
|
|
21
|
+
* - `debug/bootstrap` → re-exported from the package entry point. NOT listed here; it is
|
|
22
|
+
* instead guarded at runtime (see enableDebug).
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Feature name → the modules that become unreachable when it is disabled.
|
|
26
|
+
*
|
|
27
|
+
* Keep this narrow and evidence-backed. Every addition must be justified by checking who actually
|
|
28
|
+
* imports the module, distinguishing `import type` (erased) from a value import (not erased).
|
|
29
|
+
*/
|
|
30
|
+
export declare const SCALEBUN_FEATURE_MODULES: Readonly<Record<string, readonly string[]>>;
|
|
31
|
+
export type ScaleBunFeatureName = keyof typeof SCALEBUN_FEATURE_MODULES;
|
|
32
|
+
/**
|
|
33
|
+
* Build the set of module suffixes to exclude for a given feature configuration.
|
|
34
|
+
*
|
|
35
|
+
* Every known feature is resolved: an explicit `true`/`false` in `features` wins, otherwise the
|
|
36
|
+
* feature's default applies. Unknown names throw — a typo here would silently ship (or silently
|
|
37
|
+
* keep) code the caller believed they had configured, so it is an error rather than a warning.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveExcludedModules(features: Readonly<Record<string, boolean | undefined>> | undefined): ReadonlySet<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Does `filePath` correspond to one of the excluded module paths?
|
|
42
|
+
*
|
|
43
|
+
* Matches against the tail of the path so a single registry entry covers `lib/module/….js`,
|
|
44
|
+
* `lib/commonjs/….js` and `src/….ts`. Callers MUST have already confirmed the file lives inside
|
|
45
|
+
* the ScaleBun package — matching on the tail alone would also match a host application's own
|
|
46
|
+
* `debug/commands.js`, which must never be stubbed.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isExcludedModule(filePath: string, excluded: ReadonlySet<string>): boolean;
|
|
49
|
+
//# sourceMappingURL=featureModules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureModules.d.ts","sourceRoot":"","sources":["../../../src/metro/featureModules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA2CH;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAShF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,wBAAwB,CAAC;AAexE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,GACpE,WAAW,CAAC,MAAM,CAAC,CAiBrB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CASzF"}
|
|
@@ -59,6 +59,28 @@ export interface WithScaleBunOptions {
|
|
|
59
59
|
* installing — never to silence unrelated missing modules.
|
|
60
60
|
*/
|
|
61
61
|
optionalModules?: readonly string[];
|
|
62
|
+
/**
|
|
63
|
+
* Per-subsystem bundling switches. Metro performs no tree shaking, so a subsystem you never
|
|
64
|
+
* call is still bundled in full; resolution-time exclusion is the only mechanism that removes
|
|
65
|
+
* it. See ./featureModules for the module list behind each name and, importantly, for what
|
|
66
|
+
* deliberately stays (redaction, protocol constants and screen tracking live under `debug/`
|
|
67
|
+
* but are production code).
|
|
68
|
+
*
|
|
69
|
+
* | feature | contents | default | measured cost |
|
|
70
|
+
* |------------|---------------------------------------|---------|---------------|
|
|
71
|
+
* | `devTools` | desktop-debugger bridge + profiler | OFF | ~53 KB |
|
|
72
|
+
*
|
|
73
|
+
* `devTools` is OFF by default because the ScaleBun desktop debugger is a future product —
|
|
74
|
+
* no counterpart exists yet, so the tooling can only dial a socket nobody is listening on.
|
|
75
|
+
* When the desktop app ships, opt in with:
|
|
76
|
+
*
|
|
77
|
+
* withScaleBun(config, { features: { devTools: true } })
|
|
78
|
+
*
|
|
79
|
+
* In a devTools-excluded bundle, `ScaleBun.init({ debugConnection })` logs one clear warning
|
|
80
|
+
* and continues; every production feature (analytics, sessions, replay, crash, network
|
|
81
|
+
* capture, redaction, Engage, OTA, push) is unaffected — verified by differential test.
|
|
82
|
+
*/
|
|
83
|
+
features?: Readonly<Record<string, boolean | undefined>>;
|
|
62
84
|
}
|
|
63
85
|
/**
|
|
64
86
|
* Wrap a Metro configuration so the SDK's optional integration packages resolve
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/metro/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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,EACT,OAAO,GAAE,mBAAwB,GAClC,CAAC,GAAG;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,CA2IvC;AAED,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ArtifactMapping } from './composeSourceMap';
|
|
2
|
+
type MetroModule = {
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
export interface MetroSerializerOptions {
|
|
6
|
+
createModuleId: (filePath: string) => number;
|
|
7
|
+
excludeSource?: boolean;
|
|
8
|
+
processModuleFilter?: (module: MetroModule) => boolean;
|
|
9
|
+
shouldAddToIgnoreList?: (module: MetroModule) => boolean;
|
|
10
|
+
getSourceUrl?: (module: MetroModule) => string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export type MetroSerializerResult = string | {
|
|
14
|
+
code: string;
|
|
15
|
+
map: string;
|
|
16
|
+
};
|
|
17
|
+
export type MetroSerializer = (entryPoint: string, preModules: readonly MetroModule[], graph: {
|
|
18
|
+
dependencies: Map<string, MetroModule>;
|
|
19
|
+
}, options: MetroSerializerOptions) => MetroSerializerResult | Promise<MetroSerializerResult>;
|
|
20
|
+
interface MetroInternals {
|
|
21
|
+
baseJSBundle: (entryPoint: string, preModules: readonly MetroModule[], graph: {
|
|
22
|
+
dependencies: Map<string, MetroModule>;
|
|
23
|
+
}, options: MetroSerializerOptions) => unknown;
|
|
24
|
+
bundleToString: (bundle: unknown) => {
|
|
25
|
+
code: string;
|
|
26
|
+
};
|
|
27
|
+
sourceMapObject: (modules: readonly MetroModule[], options: object) => object;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve Metro's serialization helpers from the HOST's Metro install. Returns null when they
|
|
31
|
+
* cannot be found (exotic Metro version/layout) — callers must degrade gracefully.
|
|
32
|
+
*
|
|
33
|
+
* Resolution is anchored at the APP (project root / cwd), never at this package's own location:
|
|
34
|
+
* `metro` is not a dependency of the SDK, so under pnpm's strict layout a bare require from here
|
|
35
|
+
* finds nothing — and even where it would resolve, the app's Metro is the one whose serializer
|
|
36
|
+
* contract must be matched, not whichever copy happens to sit near the SDK.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveMetroInternals(searchPaths: readonly string[]): MetroInternals | null;
|
|
39
|
+
/** The artifacts a package root can contain, with existence checked once at config time. */
|
|
40
|
+
export declare function discoverArtifacts(packageRoot: string): ArtifactMapping[];
|
|
41
|
+
/**
|
|
42
|
+
* Build the composing serializer. `hostSerializer` is the app's own customSerializer, if any.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createComposingSerializer(artifacts: readonly ArtifactMapping[], internals: MetroInternals, hostSerializer: MetroSerializer | undefined): MetroSerializer;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=serializerCompose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializerCompose.d.ts","sourceRoot":"","sources":["../../../src/metro/serializerCompose.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI5E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,WAAW,sBAAsB;IACnC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC;IACvD,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC;IACzD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,MAAM,CAAC;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAA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
|
|
119
119
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Create a PersistentQueue with the best available backend.
|
|
122
|
-
*
|
|
123
|
-
* If persistence is disabled in config, uses MemoryBackend.
|
|
124
|
-
* Otherwise uses the shared first-party durable backend from createStorageBackend().
|
|
125
|
-
*
|
|
126
|
-
* @param config - Persistence config from SDK init
|
|
127
|
-
* @param backend - Override backend (for tests). If provided, skips auto-detection.
|
|
128
|
-
*/
|
|
129
|
-
export declare function createPersistentQueue(config?: Partial<PersistenceConfig>, backend?: StorageBackend): PersistentQueue;
|
|
130
120
|
//# sourceMappingURL=persistentQueue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistentQueue.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/queue/persistentQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAWnE,MAAM,WAAW,iBAAiB;IAC9B,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,0BAA0B,EAAE,iBAKxC,CAAC;AAmBF,qBAAa,eAAe;IACxB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,IAAI,CAAY;IAExB;;;;;OAKG;gBACS,OAAO,EAAE,cAAc,EAAE,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM;IAa5E;;;;;;OAMG;IACH,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAwB7B;;;;;OAKG;IACH,QAAQ,CAAC,K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E;;;;;;OAMG;IACH,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAwB7B;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,SAAK,GAAG,QAAQ,EAAE;IAwChC;;;;;;;;;OASG;IACH,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI;IAkBrC;;OAEG;IACH,MAAM,IAAI,MAAM;IAIhB;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;;;OAMG;IACH,cAAc,IAAI,QAAQ,EAAE;IAY5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAeb;;;OAGG;IACH,OAAO,CAAC,SAAS;IA4BjB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAoCpB,sCAAsC;IACtC,OAAO,CAAC,SAAS;IAQjB;;OAEG;IACH,OAAO,CAAC,cAAc;IAgBtB,8BAA8B;IAC9B,OAAO,CAAC,YAAY;IAYpB;;;OAGG;IACH,OAAO,CAAC,eAAe;CAW1B"}
|
|
@@ -45,12 +45,6 @@ export declare function subscribeNativeNotificationOpened(onOpened: (data: Recor
|
|
|
45
45
|
* launched by tapping a ScaleBunB notification. Returns the data map or null.
|
|
46
46
|
*/
|
|
47
47
|
export declare function consumeInitialNativeNotification(): Promise<Record<string, string> | null>;
|
|
48
|
-
/**
|
|
49
|
-
* iOS (UNUserNotificationCenter): the native module owns the full notification
|
|
50
|
-
* surface — request authorization, foreground presentation, taps, and cold-start.
|
|
51
|
-
* Presence == iOS ScaleBunEngage exposes the notification delegate methods.
|
|
52
|
-
*/
|
|
53
|
-
export declare function hasNativeNotificationDelegate(): boolean;
|
|
54
48
|
/**
|
|
55
49
|
* iOS: request notification authorization natively. Returns the normalized status
|
|
56
50
|
* ('granted' | 'provisional' | 'denied') or null when unavailable (fail-soft).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/push/native/nativeNotifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,wFAAwF;AACxF,UAAU,yBAAyB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AA2BD,0FAA0F;AAC1F,wBAAgB,4BAA4B,IAAI,OAAO,CAGtD;AAED,kFAAkF;AAClF,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC,OAAO,CAAC,CAcnB;AAED,yFAAyF;AACzF,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CAenB;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAC7C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,GACjD,MAAM,IAAI,CAcZ;AAED;;;GAGG;AACH,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAW/F;
|
|
1
|
+
{"version":3,"file":"nativeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/push/native/nativeNotifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,wFAAwF;AACx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GACxD,MAAM,IAAI,CAcZ;AAED;;;GAGG;AACH,wBAAsB,oCAAoC,IAAI,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAetG"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalebun/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Production-grade React Native SDK for ScaleBun",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "
|
|
8
|
+
"react-native": "dist/scalebun.slim.js",
|
|
9
9
|
"source": "src/index",
|
|
10
10
|
"bin": {
|
|
11
11
|
"scalebun": "bin/scalebun.js"
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"src",
|
|
15
15
|
"lib",
|
|
16
|
+
"dist",
|
|
16
17
|
"bin",
|
|
17
18
|
"android",
|
|
18
19
|
"ios",
|
|
@@ -28,9 +29,9 @@
|
|
|
28
29
|
"exports": {
|
|
29
30
|
".": {
|
|
30
31
|
"types": "./lib/typescript/index.d.ts",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"react-native": "./dist/scalebun.slim.js",
|
|
33
|
+
"import": "./dist/scalebun.slim.js",
|
|
34
|
+
"require": "./lib/commonjs/index.js"
|
|
34
35
|
},
|
|
35
36
|
"./metro": {
|
|
36
37
|
"types": "./lib/typescript/metro/index.d.ts",
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"@types/react": "^18.2.0",
|
|
71
72
|
"@types/react-native": "^0.73.0",
|
|
72
73
|
"del-cli": "^5.1.0",
|
|
74
|
+
"esbuild": "0.25.0",
|
|
73
75
|
"eslint": "^8.57.0",
|
|
74
76
|
"eslint-config-prettier": "^9.1.0",
|
|
75
77
|
"eslint-plugin-prettier": "^5.1.3",
|
|
@@ -82,11 +84,11 @@
|
|
|
82
84
|
"typescript": "^5.4.5"
|
|
83
85
|
},
|
|
84
86
|
"peerDependencies": {
|
|
87
|
+
"@notifee/react-native": ">=5.0.0",
|
|
88
|
+
"expo-router": ">=1.0.0",
|
|
85
89
|
"react": ">=18.0.0",
|
|
86
90
|
"react-native": ">=0.74.0",
|
|
87
|
-
"react-native-view-shot": ">=3.0.0"
|
|
88
|
-
"@notifee/react-native": ">=5.0.0",
|
|
89
|
-
"expo-router": ">=1.0.0"
|
|
91
|
+
"react-native-view-shot": ">=3.0.0"
|
|
90
92
|
},
|
|
91
93
|
"peerDependenciesMeta": {
|
|
92
94
|
"react-native-view-shot": {
|
|
@@ -100,7 +102,9 @@
|
|
|
100
102
|
}
|
|
101
103
|
},
|
|
102
104
|
"dependencies": {
|
|
103
|
-
"@babel/runtime": "^7.25.0"
|
|
105
|
+
"@babel/runtime": "^7.25.0",
|
|
106
|
+
"@jridgewell/sourcemap-codec": "1.5.5",
|
|
107
|
+
"@jridgewell/trace-mapping": "0.3.31"
|
|
104
108
|
},
|
|
105
109
|
"codegenConfig": {
|
|
106
110
|
"name": "ScaleBunSpec",
|
|
@@ -128,8 +132,8 @@
|
|
|
128
132
|
"test": "jest",
|
|
129
133
|
"typecheck": "tsc --noEmit",
|
|
130
134
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
131
|
-
"clean": "del-cli lib",
|
|
132
|
-
"build": "bob build",
|
|
135
|
+
"clean": "del-cli lib dist",
|
|
136
|
+
"build": "bob build && node scripts/build-dist.mjs",
|
|
133
137
|
"watch": "bob build --watch"
|
|
134
138
|
}
|
|
135
139
|
}
|
|
@@ -21,11 +21,11 @@ export class FeatureRegistry {
|
|
|
21
21
|
*/
|
|
22
22
|
register(feature: IFeature): void {
|
|
23
23
|
if (this.features.has(feature.name)) {
|
|
24
|
-
logger.debug(`Feature '${feature.name}' already registered, skipping`);
|
|
24
|
+
__DEV__ && logger.debug(`Feature '${feature.name}' already registered, skipping`);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
this.features.set(feature.name, feature);
|
|
28
|
-
logger.debug(`Feature '${feature.name}' registered`);
|
|
28
|
+
__DEV__ && logger.debug(`Feature '${feature.name}' registered`);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -38,7 +38,7 @@ export class FeatureRegistry {
|
|
|
38
38
|
for (const [name, feature] of this.features) {
|
|
39
39
|
try {
|
|
40
40
|
await feature.initialize(context);
|
|
41
|
-
logger.debug(`Feature '${name}' initialized`);
|
|
41
|
+
__DEV__ && logger.debug(`Feature '${name}' initialized`);
|
|
42
42
|
} catch (err) {
|
|
43
43
|
logger.error(`Feature '${name}' failed to initialize:`, err);
|
|
44
44
|
}
|
|
@@ -55,7 +55,7 @@ export class FeatureRegistry {
|
|
|
55
55
|
for (const [name, feature] of entries) {
|
|
56
56
|
try {
|
|
57
57
|
feature.teardown();
|
|
58
|
-
logger.debug(`Feature '${name}' torn down`);
|
|
58
|
+
__DEV__ && logger.debug(`Feature '${name}' torn down`);
|
|
59
59
|
} catch (err) {
|
|
60
60
|
logger.error(`Feature '${name}' teardown failed:`, err);
|
|
61
61
|
}
|
|
@@ -114,7 +114,7 @@ export class SDKBootstrapper {
|
|
|
114
114
|
// These are flushed immediately so crash-time events are not lost.
|
|
115
115
|
const leftovers = persistentQueue.drainLeftovers();
|
|
116
116
|
if (leftovers.length > 0) {
|
|
117
|
-
logger.info(`[Bootstrap] ${leftovers.length} leftover envelopes from previous run — will flush`);
|
|
117
|
+
__DEV__ && logger.info(`[Bootstrap] ${leftovers.length} leftover envelopes from previous run — will flush`);
|
|
118
118
|
// Re-add to queue so the normal flush cycle picks them up
|
|
119
119
|
for (const envelope of leftovers) {
|
|
120
120
|
persistentQueue.add(envelope);
|
|
@@ -145,9 +145,9 @@ export class SDKBootstrapper {
|
|
|
145
145
|
// ── Backend handshake ──────────────────────────────────
|
|
146
146
|
if (this.config.clientKey) {
|
|
147
147
|
// SaaS mode: clientKey is resolved by SdkKeyGuard on each request — no token handshake needed
|
|
148
|
-
logger.info('[Bootstrap] SaaS mode: clientKey auth active, skipping legacy handshake');
|
|
148
|
+
__DEV__ && logger.info('[Bootstrap] SaaS mode: clientKey auth active, skipping legacy handshake');
|
|
149
149
|
} else {
|
|
150
|
-
logger.debug('Starting handshake...');
|
|
150
|
+
__DEV__ && logger.debug('Starting handshake...');
|
|
151
151
|
const response = await httpClient.post(ENDPOINTS.SESSIONS, {
|
|
152
152
|
projectId: this.config.projectId,
|
|
153
153
|
publishableKey: this.config.publishableKey,
|
|
@@ -340,7 +340,7 @@ export class SDKBootstrapper {
|
|
|
340
340
|
// ── Session Replay Initialization (Core) ───────────────
|
|
341
341
|
if (features.replay !== false) {
|
|
342
342
|
try {
|
|
343
|
-
logger.debug('[Bootstrap] Initializing unified SessionManager');
|
|
343
|
+
__DEV__ && logger.debug('[Bootstrap] Initializing unified SessionManager');
|
|
344
344
|
const sessionManager = SessionManager.getInstance(
|
|
345
345
|
null, // No desktop transport initially
|
|
346
346
|
nativeCapture,
|
|
@@ -424,7 +424,7 @@ export class SDKBootstrapper {
|
|
|
424
424
|
// Desktop transport is attached lazily by sessionWiring.ts when
|
|
425
425
|
// enableDebug() is called (development only — production skips this).
|
|
426
426
|
const isSaaS = !!this.config.clientKey;
|
|
427
|
-
logger.info(
|
|
427
|
+
__DEV__ && logger.info(
|
|
428
428
|
`[ScaleBun Session Wiring] mode=${isSaaS ? 'saas' : 'legacy'} ` +
|
|
429
429
|
`backend=${!!this.config.apiBaseUrl} desktop=pending-debug-connect`
|
|
430
430
|
);
|
|
@@ -484,10 +484,10 @@ export class SDKBootstrapper {
|
|
|
484
484
|
}
|
|
485
485
|
} catch { /* no-throw */ }
|
|
486
486
|
|
|
487
|
-
logger.debug(`[AutoScreen] Screen → '${screenName}' (source: ${source})`);
|
|
487
|
+
__DEV__ && logger.debug(`[AutoScreen] Screen → '${screenName}' (source: ${source})`);
|
|
488
488
|
});
|
|
489
489
|
detector.start();
|
|
490
|
-
logger.info('[Bootstrap] Auto screen detection started');
|
|
490
|
+
__DEV__ && logger.info('[Bootstrap] Auto screen detection started');
|
|
491
491
|
|
|
492
492
|
/**
|
|
493
493
|
* Screen detection that never resolves anything must SAY so.
|
|
@@ -523,7 +523,7 @@ export class SDKBootstrapper {
|
|
|
523
523
|
deviceId: getDeviceId(),
|
|
524
524
|
});
|
|
525
525
|
|
|
526
|
-
logger.info('SDK initialized and session established');
|
|
526
|
+
__DEV__ && logger.info('SDK initialized and session established');
|
|
527
527
|
|
|
528
528
|
return {
|
|
529
529
|
config: this.config,
|