@scalebun/react-native 1.10.4 → 1.10.6
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/android/src/main/java/com/scalebun/replaysdk/tracking/InteractionTracker.kt +19 -0
- package/dist/scalebun.full.js +460 -57
- package/dist/scalebun.slim.js +457 -62
- package/ios/Core/DeviceIdentity.swift +50 -0
- package/ios/Profiler/ScaleBunProfilerModule.swift +2 -8
- package/ios/ReplaySdk.swift +3 -1
- package/lib/commonjs/analytics/EventTracker.js +22 -0
- package/lib/commonjs/bootstrap/SDKBootstrapper.js +17 -3
- package/lib/commonjs/core/config/schema.js +29 -0
- package/lib/commonjs/core/constants/version.js +1 -1
- package/lib/commonjs/core/context/device.js +5 -0
- package/lib/commonjs/debug/redaction.js +227 -41
- package/lib/commonjs/features/journey/ScaleBunDebugRoot.js +9 -1
- package/lib/commonjs/features/navigation/AutoScreenDetector.js +68 -16
- package/lib/commonjs/features/session/BackendSessionAdapter.js +73 -6
- package/lib/commonjs/features/session/SessionManager.js +28 -0
- package/lib/commonjs/public/ScaleBunFacade.js +113 -2
- package/lib/module/analytics/EventTracker.js +22 -0
- package/lib/module/bootstrap/SDKBootstrapper.js +17 -3
- package/lib/module/core/config/schema.js +29 -0
- package/lib/module/core/constants/version.js +1 -1
- package/lib/module/core/context/device.js +5 -0
- package/lib/module/debug/redaction.js +227 -41
- package/lib/module/features/journey/ScaleBunDebugRoot.js +9 -1
- package/lib/module/features/navigation/AutoScreenDetector.js +68 -16
- package/lib/module/features/session/BackendSessionAdapter.js +73 -6
- package/lib/module/features/session/SessionManager.js +28 -0
- package/lib/module/public/ScaleBunFacade.js +114 -3
- package/lib/typescript/analytics/EventTracker.d.ts +15 -0
- package/lib/typescript/core/config/schema.d.ts +8 -0
- package/lib/typescript/core/constants/version.d.ts +1 -1
- package/lib/typescript/core/context/device.d.ts +1 -0
- package/lib/typescript/debug/redaction.d.ts +8 -2
- package/lib/typescript/features/navigation/AutoScreenDetector.d.ts +25 -0
- package/lib/typescript/features/session/BackendSessionAdapter.d.ts +9 -0
- package/lib/typescript/features/session/SessionManager.d.ts +15 -0
- package/lib/typescript/public/ScaleBunFacade.d.ts +44 -2
- package/lib/typescript/public/types.d.ts +1 -1
- package/package.json +6 -2
- package/src/analytics/EventTracker.ts +19 -0
- package/src/bootstrap/SDKBootstrapper.ts +17 -1
- package/src/core/config/schema.ts +22 -0
- package/src/core/constants/version.ts +1 -1
- package/src/core/context/device.ts +6 -0
- package/src/debug/redaction.ts +235 -42
- package/src/features/journey/ScaleBunDebugRoot.tsx +9 -1
- package/src/features/navigation/AutoScreenDetector.ts +70 -16
- package/src/features/session/BackendSessionAdapter.ts +81 -7
- package/src/features/session/SessionManager.ts +31 -0
- package/src/public/ScaleBunFacade.ts +122 -3
- package/src/public/types.ts +1 -1
- package/dist/scalebun.full.js.map +0 -1
- package/dist/scalebun.slim.js.map +0 -1
- package/lib/commonjs/analytics/EventTracker.js.map +0 -1
- package/lib/commonjs/analytics/automaticEvents.js.map +0 -1
- package/lib/commonjs/analytics/batching.js.map +0 -1
- package/lib/commonjs/analytics/eventLane.js.map +0 -1
- package/lib/commonjs/bootstrap/FeatureRegistry.js.map +0 -1
- package/lib/commonjs/bootstrap/SDKBootstrapper.js.map +0 -1
- package/lib/commonjs/bucketing/fnv1a32.js.map +0 -1
- package/lib/commonjs/compat/codepush.js.map +0 -1
- package/lib/commonjs/config/ConfigManager.js.map +0 -1
- package/lib/commonjs/config/configTypes.js.map +0 -1
- package/lib/commonjs/core/architecture.js.map +0 -1
- package/lib/commonjs/core/clock/now.js.map +0 -1
- package/lib/commonjs/core/config/defaults.js.map +0 -1
- package/lib/commonjs/core/config/schema.js.map +0 -1
- package/lib/commonjs/core/constants/endpoints.js.map +0 -1
- package/lib/commonjs/core/constants/protocol.js.map +0 -1
- package/lib/commonjs/core/constants/timings.js.map +0 -1
- package/lib/commonjs/core/constants/version.js.map +0 -1
- package/lib/commonjs/core/context/app.js.map +0 -1
- package/lib/commonjs/core/context/device.js.map +0 -1
- package/lib/commonjs/core/context/session.js.map +0 -1
- package/lib/commonjs/core/context/user.js.map +0 -1
- package/lib/commonjs/core/contracts/IFeature.js.map +0 -1
- package/lib/commonjs/core/di/container.js.map +0 -1
- package/lib/commonjs/core/encoding/base64.js.map +0 -1
- package/lib/commonjs/core/id/deviceId.js.map +0 -1
- package/lib/commonjs/core/id/installationId.js.map +0 -1
- package/lib/commonjs/core/id/sessionId.js.map +0 -1
- package/lib/commonjs/core/lifecycle/appLifecycle.js.map +0 -1
- package/lib/commonjs/core/lifecycle/crashSafe.js.map +0 -1
- package/lib/commonjs/core/logger/errorClassification.js.map +0 -1
- package/lib/commonjs/core/logger/internalLogger.js.map +0 -1
- package/lib/commonjs/core/logger/levels.js.map +0 -1
- package/lib/commonjs/crypto/hmacSha256.js.map +0 -1
- package/lib/commonjs/debug/bootstrap.js.map +0 -1
- package/lib/commonjs/debug/commands.js.map +0 -1
- package/lib/commonjs/debug/configBuilder.js.map +0 -1
- package/lib/commonjs/debug/exportBridge.js.map +0 -1
- package/lib/commonjs/debug/hostResolver.js.map +0 -1
- package/lib/commonjs/debug/index.js.map +0 -1
- package/lib/commonjs/debug/metrics.js.map +0 -1
- package/lib/commonjs/debug/perf.js.map +0 -1
- package/lib/commonjs/debug/perfWiring.js.map +0 -1
- package/lib/commonjs/debug/protocol.js.map +0 -1
- package/lib/commonjs/debug/redaction.js.map +0 -1
- package/lib/commonjs/debug/replayWiring.js.map +0 -1
- package/lib/commonjs/debug/screenTracking.js.map +0 -1
- package/lib/commonjs/debug/sessionWiring.js.map +0 -1
- package/lib/commonjs/debug/stream.js.map +0 -1
- package/lib/commonjs/debug/transport.js.map +0 -1
- package/lib/commonjs/features/bugreport/BugReportFeature.js.map +0 -1
- package/lib/commonjs/features/bugreport/buildPayload.js.map +0 -1
- package/lib/commonjs/features/bugreport/index.js.map +0 -1
- package/lib/commonjs/features/crash/CrashFeature.js.map +0 -1
- package/lib/commonjs/features/crash/CrashReporter.js.map +0 -1
- package/lib/commonjs/features/crash/NativeCrashFeature.js.map +0 -1
- package/lib/commonjs/features/crash/capture.js.map +0 -1
- package/lib/commonjs/features/crash/globalHandler.js.map +0 -1
- package/lib/commonjs/features/crash/index.js.map +0 -1
- package/lib/commonjs/features/crash/nativeCrashBridge.js.map +0 -1
- package/lib/commonjs/features/crash/rejectionHandler.js.map +0 -1
- package/lib/commonjs/features/engage/EngageAnchor.js.map +0 -1
- package/lib/commonjs/features/engage/EngageArchetypeRenderers.js.map +0 -1
- package/lib/commonjs/features/engage/EngageInAppView.js.map +0 -1
- package/lib/commonjs/features/engage/EngageInlinePlacement.js.map +0 -1
- package/lib/commonjs/features/engage/EngagePromptProvider.js.map +0 -1
- package/lib/commonjs/features/engage/EngagePromptView.js.map +0 -1
- package/lib/commonjs/features/engage/EngageTransport.js.map +0 -1
- package/lib/commonjs/features/engage/EngageVariantContent.js.map +0 -1
- package/lib/commonjs/features/engage/__test-support__/reactNativeStub.js.map +0 -1
- package/lib/commonjs/features/engage/attachmentCapture.js.map +0 -1
- package/lib/commonjs/features/engage/captureVoiceAttachment.js.map +0 -1
- package/lib/commonjs/features/engage/engageCoachmarkTour.js.map +0 -1
- package/lib/commonjs/features/engage/engageGameLogic.js.map +0 -1
- package/lib/commonjs/features/engage/engageMediaSizing.js.map +0 -1
- package/lib/commonjs/features/engage/engageMultiStepSheet.js.map +0 -1
- package/lib/commonjs/features/engage/engageOutcome.js.map +0 -1
- package/lib/commonjs/features/engage/engagePushTokenBridge.js.map +0 -1
- package/lib/commonjs/features/engage/engageShakeBridge.js.map +0 -1
- package/lib/commonjs/features/engage/engageSignals.js.map +0 -1
- package/lib/commonjs/features/engage/engageStoreReviewBridge.js.map +0 -1
- package/lib/commonjs/features/engage/engageTestSeenStore.js.map +0 -1
- package/lib/commonjs/features/engage/engageThrottle.js.map +0 -1
- package/lib/commonjs/features/engage/engageTriggerEngine.js.map +0 -1
- package/lib/commonjs/features/engage/engageTypes.js.map +0 -1
- package/lib/commonjs/features/engage/engageVariantResolver.js.map +0 -1
- package/lib/commonjs/features/engage/engageWindowInsets.js.map +0 -1
- package/lib/commonjs/features/engage/gestureTriggerDetector.js.map +0 -1
- package/lib/commonjs/features/engage/transcription/TranscriptionProvider.js.map +0 -1
- package/lib/commonjs/features/install-referrer/installReferrer.js.map +0 -1
- package/lib/commonjs/features/journey/ScaleBunDebugRoot.js.map +0 -1
- package/lib/commonjs/features/journey/ScaleBunFlatList.js.map +0 -1
- package/lib/commonjs/features/journey/ScaleBunImpression.js.map +0 -1
- package/lib/commonjs/features/journey/ScaleBunScrollView.js.map +0 -1
- package/lib/commonjs/features/journey/ScaleBunSectionList.js.map +0 -1
- package/lib/commonjs/features/journey/calibrationContext.js.map +0 -1
- package/lib/commonjs/features/journey/gestureBuffer.js.map +0 -1
- package/lib/commonjs/features/journey/gestureDetector.js.map +0 -1
- package/lib/commonjs/features/journey/impression.js.map +0 -1
- package/lib/commonjs/features/journey/journeyManager.js.map +0 -1
- package/lib/commonjs/features/journey/journeyTypes.js.map +0 -1
- package/lib/commonjs/features/journey/navDetector.js.map +0 -1
- package/lib/commonjs/features/journey/screenshotHelper.js.map +0 -1
- package/lib/commonjs/features/journey/targetRegistry.js.map +0 -1
- package/lib/commonjs/features/journey/touchTarget.js.map +0 -1
- package/lib/commonjs/features/navigation/AutoScreenDetector.js.map +0 -1
- package/lib/commonjs/features/network/NetworkFeature.js.map +0 -1
- package/lib/commonjs/features/network/index.js.map +0 -1
- package/lib/commonjs/features/ota/OtaEventEmitter.js.map +0 -1
- package/lib/commonjs/features/ota/OtaOrchestrator.js.map +0 -1
- package/lib/commonjs/features/ota/OtaTypes.js.map +0 -1
- package/lib/commonjs/features/ota/deviceAttributes.js.map +0 -1
- package/lib/commonjs/features/ota/environment.js.map +0 -1
- package/lib/commonjs/features/ota/geoCountry.js.map +0 -1
- package/lib/commonjs/features/ota/retry.js.map +0 -1
- package/lib/commonjs/features/ota/signature.js.map +0 -1
- package/lib/commonjs/features/ota/useOtaUpdate.js.map +0 -1
- package/lib/commonjs/features/performance/PerformanceFeature.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/AppLaunchCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/AutoScreenLoadCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/CustomTraceCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/FrameMetricsCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/JsStallCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/NetworkPerfCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/ScreenLoadCollector.js.map +0 -1
- package/lib/commonjs/features/performance/collectors/UiHangCollector.js.map +0 -1
- package/lib/commonjs/features/performance/config.js.map +0 -1
- package/lib/commonjs/features/performance/getNativePerformanceModule.js.map +0 -1
- package/lib/commonjs/features/performance/index.js.map +0 -1
- package/lib/commonjs/features/performance/metrics/MetricsEngine.js.map +0 -1
- package/lib/commonjs/features/performance/models.js.map +0 -1
- package/lib/commonjs/features/performance/transport/PerformanceTransport.js.map +0 -1
- package/lib/commonjs/features/profiler/ProfilerFeature.js.map +0 -1
- package/lib/commonjs/features/profiler/config.js.map +0 -1
- package/lib/commonjs/features/profiler/contracts.js.map +0 -1
- package/lib/commonjs/features/profiler/index.js.map +0 -1
- package/lib/commonjs/features/profiler/models.js.map +0 -1
- package/lib/commonjs/features/profiler/transport/ProfilerTransport.js.map +0 -1
- package/lib/commonjs/features/replay/bridge/adapters/bridgeAdapter.js.map +0 -1
- package/lib/commonjs/features/replay/bridge/eventEmitter.js.map +0 -1
- package/lib/commonjs/features/replay/bridge/nativeModule.js.map +0 -1
- package/lib/commonjs/features/replay/core/clock/clock.js.map +0 -1
- package/lib/commonjs/features/replay/core/config/defaults.js.map +0 -1
- package/lib/commonjs/features/replay/core/config/validator.js.map +0 -1
- package/lib/commonjs/features/replay/core/env/environmentDetector.js.map +0 -1
- package/lib/commonjs/features/replay/core/errors/safeCall.js.map +0 -1
- package/lib/commonjs/features/replay/core/ids/sessionId.js.map +0 -1
- package/lib/commonjs/features/replay/core/logger/logger.js.map +0 -1
- package/lib/commonjs/features/replay/core/privacy/privacyTypes.js.map +0 -1
- package/lib/commonjs/features/replay/core/queue/boundedQueue.js.map +0 -1
- package/lib/commonjs/features/replay/integrations/alert/alertInstrumentation.js.map +0 -1
- package/lib/commonjs/features/replay/integrations/logs/consoleIntegration.js.map +0 -1
- package/lib/commonjs/features/replay/integrations/network/networkAdapter.js.map +0 -1
- package/lib/commonjs/features/replay/integrations/react-navigation/navigationIntegration.js.map +0 -1
- package/lib/commonjs/features/replay/integrations/touch/ReplayRoot.js.map +0 -1
- package/lib/commonjs/features/replay/pipeline/batching/batchManager.js.map +0 -1
- package/lib/commonjs/features/replay/pipeline/envelope/envelopeBuilder.js.map +0 -1
- package/lib/commonjs/features/replay/pipeline/retry/retryPolicy.js.map +0 -1
- package/lib/commonjs/features/replay/pipeline/transport/transportTypes.js.map +0 -1
- package/lib/commonjs/features/replay/public/api.js.map +0 -1
- package/lib/commonjs/features/replay/public/enums.js.map +0 -1
- package/lib/commonjs/features/replay/public/types.js.map +0 -1
- package/lib/commonjs/features/replay/replay/breadcrumbs/breadcrumbCollector.js.map +0 -1
- package/lib/commonjs/features/replay/replay/frames/frameModels.js.map +0 -1
- package/lib/commonjs/features/replay/replay/session/sessionOrchestrator.js.map +0 -1
- package/lib/commonjs/features/replay/replay/timeline/timelineModels.js.map +0 -1
- package/lib/commonjs/features/replay/transport/BackendReplayTransport.js.map +0 -1
- package/lib/commonjs/features/replay/transport/CompositeReplayTransport.js.map +0 -1
- package/lib/commonjs/features/replay/transport/DesktopReplayTransport.js.map +0 -1
- package/lib/commonjs/features/replay/transport/ReplayTransport.js.map +0 -1
- package/lib/commonjs/features/session/BackendSessionAdapter.js.map +0 -1
- package/lib/commonjs/features/session/DesktopSessionTransport.js.map +0 -1
- package/lib/commonjs/features/session/JourneyEventPipeline.js.map +0 -1
- package/lib/commonjs/features/session/ReplayCaptureManager.js.map +0 -1
- package/lib/commonjs/features/session/ScrollTracker.js.map +0 -1
- package/lib/commonjs/features/session/SessionManager.js.map +0 -1
- package/lib/commonjs/features/session/SyncDecisionEngine.js.map +0 -1
- package/lib/commonjs/features/session/index.js.map +0 -1
- package/lib/commonjs/features/session/nativeCapture.js.map +0 -1
- package/lib/commonjs/features/session/outboxFrameCapture.js.map +0 -1
- package/lib/commonjs/features/session/sessionTypes.js.map +0 -1
- package/lib/commonjs/features/skan/skanBridge.js.map +0 -1
- package/lib/commonjs/features/skan/skanConversionManager.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/integrations/fetch/fetchInterceptor.js.map +0 -1
- package/lib/commonjs/integrations/navigation/screenTracker.js.map +0 -1
- package/lib/commonjs/integrations/network/bodyCapture.js.map +0 -1
- package/lib/commonjs/integrations/xhr/xhrInterceptor.js.map +0 -1
- package/lib/commonjs/metro/composeSourceMap.js.map +0 -1
- package/lib/commonjs/metro/featureModules.js.map +0 -1
- package/lib/commonjs/metro/index.js.map +0 -1
- package/lib/commonjs/metro/optionalDependencyStub.js.map +0 -1
- package/lib/commonjs/metro/optionalModules.js.map +0 -1
- package/lib/commonjs/metro/serializerCompose.js.map +0 -1
- package/lib/commonjs/pipeline/dispatcher/dispatcher.js.map +0 -1
- package/lib/commonjs/pipeline/envelope/envelope.js.map +0 -1
- package/lib/commonjs/pipeline/envelope/serializer.js.map +0 -1
- package/lib/commonjs/pipeline/processors/dedupe.js.map +0 -1
- package/lib/commonjs/pipeline/processors/enrich.js.map +0 -1
- package/lib/commonjs/pipeline/processors/sampling.js.map +0 -1
- package/lib/commonjs/pipeline/processors/sanitize.js.map +0 -1
- package/lib/commonjs/pipeline/queue/flushQueue.js.map +0 -1
- package/lib/commonjs/pipeline/queue/memoryQueue.js.map +0 -1
- package/lib/commonjs/pipeline/queue/persistentQueue.js.map +0 -1
- package/lib/commonjs/pipeline/queue/queuePolicy.js.map +0 -1
- package/lib/commonjs/pipeline/scheduler/flushScheduler.js.map +0 -1
- package/lib/commonjs/pipeline/scheduler/retryPolicy.js.map +0 -1
- package/lib/commonjs/public/ScaleBunErrorBoundary.js.map +0 -1
- package/lib/commonjs/public/ScaleBunFacade.js.map +0 -1
- package/lib/commonjs/public/ScaleBunProvider.js.map +0 -1
- package/lib/commonjs/public/typedTracker.js.map +0 -1
- package/lib/commonjs/public/types.js.map +0 -1
- package/lib/commonjs/push/PushManager.js.map +0 -1
- package/lib/commonjs/push/adapters/ManualAdapter.js.map +0 -1
- package/lib/commonjs/push/adapters/NativeBridgeAdapter.js.map +0 -1
- package/lib/commonjs/push/adapters/NoopAdapter.js.map +0 -1
- package/lib/commonjs/push/adapters/RNFirebaseMessagingAdapter.js.map +0 -1
- package/lib/commonjs/push/adapters/loadMessaging.js.map +0 -1
- package/lib/commonjs/push/adapters/loadNotifee.js.map +0 -1
- package/lib/commonjs/push/adapters/selectAdapter.js.map +0 -1
- package/lib/commonjs/push/detect/capabilities.js.map +0 -1
- package/lib/commonjs/push/index.js.map +0 -1
- package/lib/commonjs/push/native/nativeNotifications.js.map +0 -1
- package/lib/commonjs/push/types.js.map +0 -1
- package/lib/commonjs/specs/NativeReplaySdk.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunCrash.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunInstallReferrer.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunOta.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunPerformance.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunProfiler.js.map +0 -1
- package/lib/commonjs/specs/NativeScaleBunStorage.js.map +0 -1
- package/lib/commonjs/storage/StorageBackend.js.map +0 -1
- package/lib/commonjs/storage/db/sqlite.js.map +0 -1
- package/lib/commonjs/storage/files/fileStore.js.map +0 -1
- package/lib/commonjs/transport/auth/sdkSession.js.map +0 -1
- package/lib/commonjs/transport/backoff/exponentialJitter.js.map +0 -1
- package/lib/commonjs/transport/http/endpoints.js.map +0 -1
- package/lib/commonjs/transport/http/httpClient.js.map +0 -1
- package/lib/commonjs/transport/rateLimit/retryAfter.js.map +0 -1
- package/lib/commonjs/transport/signing/requestSigner.js.map +0 -1
- package/lib/commonjs/vendor/protocol/index.js.map +0 -1
- package/lib/commonjs/vendor/protocol/internal/validation.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/bridge.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/config.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/events.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/features.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/index.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/platform.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/session-boundary.js.map +0 -1
- package/lib/commonjs/vendor/sdk-contracts/session.js.map +0 -1
- package/lib/module/analytics/EventTracker.js.map +0 -1
- package/lib/module/analytics/automaticEvents.js.map +0 -1
- package/lib/module/analytics/batching.js.map +0 -1
- package/lib/module/analytics/eventLane.js.map +0 -1
- package/lib/module/bootstrap/FeatureRegistry.js.map +0 -1
- package/lib/module/bootstrap/SDKBootstrapper.js.map +0 -1
- package/lib/module/bucketing/fnv1a32.js.map +0 -1
- package/lib/module/compat/codepush.js.map +0 -1
- package/lib/module/config/ConfigManager.js.map +0 -1
- package/lib/module/config/configTypes.js.map +0 -1
- package/lib/module/core/architecture.js.map +0 -1
- package/lib/module/core/clock/now.js.map +0 -1
- package/lib/module/core/config/defaults.js.map +0 -1
- package/lib/module/core/config/schema.js.map +0 -1
- package/lib/module/core/constants/endpoints.js.map +0 -1
- package/lib/module/core/constants/protocol.js.map +0 -1
- package/lib/module/core/constants/timings.js.map +0 -1
- package/lib/module/core/constants/version.js.map +0 -1
- package/lib/module/core/context/app.js.map +0 -1
- package/lib/module/core/context/device.js.map +0 -1
- package/lib/module/core/context/session.js.map +0 -1
- package/lib/module/core/context/user.js.map +0 -1
- package/lib/module/core/contracts/IFeature.js.map +0 -1
- package/lib/module/core/di/container.js.map +0 -1
- package/lib/module/core/encoding/base64.js.map +0 -1
- package/lib/module/core/id/deviceId.js.map +0 -1
- package/lib/module/core/id/installationId.js.map +0 -1
- package/lib/module/core/id/sessionId.js.map +0 -1
- package/lib/module/core/lifecycle/appLifecycle.js.map +0 -1
- package/lib/module/core/lifecycle/crashSafe.js.map +0 -1
- package/lib/module/core/logger/errorClassification.js.map +0 -1
- package/lib/module/core/logger/internalLogger.js.map +0 -1
- package/lib/module/core/logger/levels.js.map +0 -1
- package/lib/module/crypto/hmacSha256.js.map +0 -1
- package/lib/module/debug/bootstrap.js.map +0 -1
- package/lib/module/debug/commands.js.map +0 -1
- package/lib/module/debug/configBuilder.js.map +0 -1
- package/lib/module/debug/exportBridge.js.map +0 -1
- package/lib/module/debug/hostResolver.js.map +0 -1
- package/lib/module/debug/index.js.map +0 -1
- package/lib/module/debug/metrics.js.map +0 -1
- package/lib/module/debug/perf.js.map +0 -1
- package/lib/module/debug/perfWiring.js.map +0 -1
- package/lib/module/debug/protocol.js.map +0 -1
- package/lib/module/debug/redaction.js.map +0 -1
- package/lib/module/debug/replayWiring.js.map +0 -1
- package/lib/module/debug/screenTracking.js.map +0 -1
- package/lib/module/debug/sessionWiring.js.map +0 -1
- package/lib/module/debug/stream.js.map +0 -1
- package/lib/module/debug/transport.js.map +0 -1
- package/lib/module/features/bugreport/BugReportFeature.js.map +0 -1
- package/lib/module/features/bugreport/buildPayload.js.map +0 -1
- package/lib/module/features/bugreport/index.js.map +0 -1
- package/lib/module/features/crash/CrashFeature.js.map +0 -1
- package/lib/module/features/crash/CrashReporter.js.map +0 -1
- package/lib/module/features/crash/NativeCrashFeature.js.map +0 -1
- package/lib/module/features/crash/capture.js.map +0 -1
- package/lib/module/features/crash/globalHandler.js.map +0 -1
- package/lib/module/features/crash/index.js.map +0 -1
- package/lib/module/features/crash/nativeCrashBridge.js.map +0 -1
- package/lib/module/features/crash/rejectionHandler.js.map +0 -1
- package/lib/module/features/engage/EngageAnchor.js.map +0 -1
- package/lib/module/features/engage/EngageArchetypeRenderers.js.map +0 -1
- package/lib/module/features/engage/EngageInAppView.js.map +0 -1
- package/lib/module/features/engage/EngageInlinePlacement.js.map +0 -1
- package/lib/module/features/engage/EngagePromptProvider.js.map +0 -1
- package/lib/module/features/engage/EngagePromptView.js.map +0 -1
- package/lib/module/features/engage/EngageTransport.js.map +0 -1
- package/lib/module/features/engage/EngageVariantContent.js.map +0 -1
- package/lib/module/features/engage/__test-support__/reactNativeStub.js.map +0 -1
- package/lib/module/features/engage/attachmentCapture.js.map +0 -1
- package/lib/module/features/engage/captureVoiceAttachment.js.map +0 -1
- package/lib/module/features/engage/engageCoachmarkTour.js.map +0 -1
- package/lib/module/features/engage/engageGameLogic.js.map +0 -1
- package/lib/module/features/engage/engageMediaSizing.js.map +0 -1
- package/lib/module/features/engage/engageMultiStepSheet.js.map +0 -1
- package/lib/module/features/engage/engageOutcome.js.map +0 -1
- package/lib/module/features/engage/engagePushTokenBridge.js.map +0 -1
- package/lib/module/features/engage/engageShakeBridge.js.map +0 -1
- package/lib/module/features/engage/engageSignals.js.map +0 -1
- package/lib/module/features/engage/engageStoreReviewBridge.js.map +0 -1
- package/lib/module/features/engage/engageTestSeenStore.js.map +0 -1
- package/lib/module/features/engage/engageThrottle.js.map +0 -1
- package/lib/module/features/engage/engageTriggerEngine.js.map +0 -1
- package/lib/module/features/engage/engageTypes.js.map +0 -1
- package/lib/module/features/engage/engageVariantResolver.js.map +0 -1
- package/lib/module/features/engage/engageWindowInsets.js.map +0 -1
- package/lib/module/features/engage/gestureTriggerDetector.js.map +0 -1
- package/lib/module/features/engage/transcription/TranscriptionProvider.js.map +0 -1
- package/lib/module/features/install-referrer/installReferrer.js.map +0 -1
- package/lib/module/features/journey/ScaleBunDebugRoot.js.map +0 -1
- package/lib/module/features/journey/ScaleBunFlatList.js.map +0 -1
- package/lib/module/features/journey/ScaleBunImpression.js.map +0 -1
- package/lib/module/features/journey/ScaleBunScrollView.js.map +0 -1
- package/lib/module/features/journey/ScaleBunSectionList.js.map +0 -1
- package/lib/module/features/journey/calibrationContext.js.map +0 -1
- package/lib/module/features/journey/gestureBuffer.js.map +0 -1
- package/lib/module/features/journey/gestureDetector.js.map +0 -1
- package/lib/module/features/journey/impression.js.map +0 -1
- package/lib/module/features/journey/journeyManager.js.map +0 -1
- package/lib/module/features/journey/journeyTypes.js.map +0 -1
- package/lib/module/features/journey/navDetector.js.map +0 -1
- package/lib/module/features/journey/screenshotHelper.js.map +0 -1
- package/lib/module/features/journey/targetRegistry.js.map +0 -1
- package/lib/module/features/journey/touchTarget.js.map +0 -1
- package/lib/module/features/navigation/AutoScreenDetector.js.map +0 -1
- package/lib/module/features/network/NetworkFeature.js.map +0 -1
- package/lib/module/features/network/index.js.map +0 -1
- package/lib/module/features/ota/OtaEventEmitter.js.map +0 -1
- package/lib/module/features/ota/OtaOrchestrator.js.map +0 -1
- package/lib/module/features/ota/OtaTypes.js.map +0 -1
- package/lib/module/features/ota/deviceAttributes.js.map +0 -1
- package/lib/module/features/ota/environment.js.map +0 -1
- package/lib/module/features/ota/geoCountry.js.map +0 -1
- package/lib/module/features/ota/retry.js.map +0 -1
- package/lib/module/features/ota/signature.js.map +0 -1
- package/lib/module/features/ota/useOtaUpdate.js.map +0 -1
- package/lib/module/features/performance/PerformanceFeature.js.map +0 -1
- package/lib/module/features/performance/collectors/AppLaunchCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/AutoScreenLoadCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/CustomTraceCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/FrameMetricsCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/JsStallCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/NetworkPerfCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/ScreenLoadCollector.js.map +0 -1
- package/lib/module/features/performance/collectors/UiHangCollector.js.map +0 -1
- package/lib/module/features/performance/config.js.map +0 -1
- package/lib/module/features/performance/getNativePerformanceModule.js.map +0 -1
- package/lib/module/features/performance/index.js.map +0 -1
- package/lib/module/features/performance/metrics/MetricsEngine.js.map +0 -1
- package/lib/module/features/performance/models.js.map +0 -1
- package/lib/module/features/performance/transport/PerformanceTransport.js.map +0 -1
- package/lib/module/features/profiler/ProfilerFeature.js.map +0 -1
- package/lib/module/features/profiler/config.js.map +0 -1
- package/lib/module/features/profiler/contracts.js.map +0 -1
- package/lib/module/features/profiler/index.js.map +0 -1
- package/lib/module/features/profiler/models.js.map +0 -1
- package/lib/module/features/profiler/transport/ProfilerTransport.js.map +0 -1
- package/lib/module/features/replay/bridge/adapters/bridgeAdapter.js.map +0 -1
- package/lib/module/features/replay/bridge/eventEmitter.js.map +0 -1
- package/lib/module/features/replay/bridge/nativeModule.js.map +0 -1
- package/lib/module/features/replay/core/clock/clock.js.map +0 -1
- package/lib/module/features/replay/core/config/defaults.js.map +0 -1
- package/lib/module/features/replay/core/config/validator.js.map +0 -1
- package/lib/module/features/replay/core/env/environmentDetector.js.map +0 -1
- package/lib/module/features/replay/core/errors/safeCall.js.map +0 -1
- package/lib/module/features/replay/core/ids/sessionId.js.map +0 -1
- package/lib/module/features/replay/core/logger/logger.js.map +0 -1
- package/lib/module/features/replay/core/privacy/privacyTypes.js.map +0 -1
- package/lib/module/features/replay/core/queue/boundedQueue.js.map +0 -1
- package/lib/module/features/replay/integrations/alert/alertInstrumentation.js.map +0 -1
- package/lib/module/features/replay/integrations/logs/consoleIntegration.js.map +0 -1
- package/lib/module/features/replay/integrations/network/networkAdapter.js.map +0 -1
- package/lib/module/features/replay/integrations/react-navigation/navigationIntegration.js.map +0 -1
- package/lib/module/features/replay/integrations/touch/ReplayRoot.js.map +0 -1
- package/lib/module/features/replay/pipeline/batching/batchManager.js.map +0 -1
- package/lib/module/features/replay/pipeline/envelope/envelopeBuilder.js.map +0 -1
- package/lib/module/features/replay/pipeline/retry/retryPolicy.js.map +0 -1
- package/lib/module/features/replay/pipeline/transport/transportTypes.js.map +0 -1
- package/lib/module/features/replay/public/api.js.map +0 -1
- package/lib/module/features/replay/public/enums.js.map +0 -1
- package/lib/module/features/replay/public/types.js.map +0 -1
- package/lib/module/features/replay/replay/breadcrumbs/breadcrumbCollector.js.map +0 -1
- package/lib/module/features/replay/replay/frames/frameModels.js.map +0 -1
- package/lib/module/features/replay/replay/session/sessionOrchestrator.js.map +0 -1
- package/lib/module/features/replay/replay/timeline/timelineModels.js.map +0 -1
- package/lib/module/features/replay/transport/BackendReplayTransport.js.map +0 -1
- package/lib/module/features/replay/transport/CompositeReplayTransport.js.map +0 -1
- package/lib/module/features/replay/transport/DesktopReplayTransport.js.map +0 -1
- package/lib/module/features/replay/transport/ReplayTransport.js.map +0 -1
- package/lib/module/features/session/BackendSessionAdapter.js.map +0 -1
- package/lib/module/features/session/DesktopSessionTransport.js.map +0 -1
- package/lib/module/features/session/JourneyEventPipeline.js.map +0 -1
- package/lib/module/features/session/ReplayCaptureManager.js.map +0 -1
- package/lib/module/features/session/ScrollTracker.js.map +0 -1
- package/lib/module/features/session/SessionManager.js.map +0 -1
- package/lib/module/features/session/SyncDecisionEngine.js.map +0 -1
- package/lib/module/features/session/index.js.map +0 -1
- package/lib/module/features/session/nativeCapture.js.map +0 -1
- package/lib/module/features/session/outboxFrameCapture.js.map +0 -1
- package/lib/module/features/session/sessionTypes.js.map +0 -1
- package/lib/module/features/skan/skanBridge.js.map +0 -1
- package/lib/module/features/skan/skanConversionManager.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/integrations/fetch/fetchInterceptor.js.map +0 -1
- package/lib/module/integrations/navigation/screenTracker.js.map +0 -1
- package/lib/module/integrations/network/bodyCapture.js.map +0 -1
- package/lib/module/integrations/xhr/xhrInterceptor.js.map +0 -1
- package/lib/module/metro/composeSourceMap.js.map +0 -1
- package/lib/module/metro/featureModules.js.map +0 -1
- package/lib/module/metro/index.js.map +0 -1
- package/lib/module/metro/optionalDependencyStub.js.map +0 -1
- package/lib/module/metro/optionalModules.js.map +0 -1
- package/lib/module/metro/serializerCompose.js.map +0 -1
- package/lib/module/pipeline/dispatcher/dispatcher.js.map +0 -1
- package/lib/module/pipeline/envelope/envelope.js.map +0 -1
- package/lib/module/pipeline/envelope/serializer.js.map +0 -1
- package/lib/module/pipeline/processors/dedupe.js.map +0 -1
- package/lib/module/pipeline/processors/enrich.js.map +0 -1
- package/lib/module/pipeline/processors/sampling.js.map +0 -1
- package/lib/module/pipeline/processors/sanitize.js.map +0 -1
- package/lib/module/pipeline/queue/flushQueue.js.map +0 -1
- package/lib/module/pipeline/queue/memoryQueue.js.map +0 -1
- package/lib/module/pipeline/queue/persistentQueue.js.map +0 -1
- package/lib/module/pipeline/queue/queuePolicy.js.map +0 -1
- package/lib/module/pipeline/scheduler/flushScheduler.js.map +0 -1
- package/lib/module/pipeline/scheduler/retryPolicy.js.map +0 -1
- package/lib/module/public/ScaleBunErrorBoundary.js.map +0 -1
- package/lib/module/public/ScaleBunFacade.js.map +0 -1
- package/lib/module/public/ScaleBunProvider.js.map +0 -1
- package/lib/module/public/typedTracker.js.map +0 -1
- package/lib/module/public/types.js.map +0 -1
- package/lib/module/push/PushManager.js.map +0 -1
- package/lib/module/push/adapters/ManualAdapter.js.map +0 -1
- package/lib/module/push/adapters/NativeBridgeAdapter.js.map +0 -1
- package/lib/module/push/adapters/NoopAdapter.js.map +0 -1
- package/lib/module/push/adapters/RNFirebaseMessagingAdapter.js.map +0 -1
- package/lib/module/push/adapters/loadMessaging.js.map +0 -1
- package/lib/module/push/adapters/loadNotifee.js.map +0 -1
- package/lib/module/push/adapters/selectAdapter.js.map +0 -1
- package/lib/module/push/detect/capabilities.js.map +0 -1
- package/lib/module/push/index.js.map +0 -1
- package/lib/module/push/native/nativeNotifications.js.map +0 -1
- package/lib/module/push/types.js.map +0 -1
- package/lib/module/specs/NativeReplaySdk.js.map +0 -1
- package/lib/module/specs/NativeScaleBunCrash.js.map +0 -1
- package/lib/module/specs/NativeScaleBunInstallReferrer.js.map +0 -1
- package/lib/module/specs/NativeScaleBunOta.js.map +0 -1
- package/lib/module/specs/NativeScaleBunPerformance.js.map +0 -1
- package/lib/module/specs/NativeScaleBunProfiler.js.map +0 -1
- package/lib/module/specs/NativeScaleBunStorage.js.map +0 -1
- package/lib/module/storage/StorageBackend.js.map +0 -1
- package/lib/module/storage/db/sqlite.js.map +0 -1
- package/lib/module/storage/files/fileStore.js.map +0 -1
- package/lib/module/transport/auth/sdkSession.js.map +0 -1
- package/lib/module/transport/backoff/exponentialJitter.js.map +0 -1
- package/lib/module/transport/http/endpoints.js.map +0 -1
- package/lib/module/transport/http/httpClient.js.map +0 -1
- package/lib/module/transport/rateLimit/retryAfter.js.map +0 -1
- package/lib/module/transport/signing/requestSigner.js.map +0 -1
- package/lib/module/vendor/protocol/index.js.map +0 -1
- package/lib/module/vendor/protocol/internal/validation.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/bridge.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/config.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/events.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/features.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/index.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/platform.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/session-boundary.js.map +0 -1
- package/lib/module/vendor/sdk-contracts/session.js.map +0 -1
- package/lib/typescript/analytics/EventTracker.d.ts.map +0 -1
- package/lib/typescript/analytics/automaticEvents.d.ts.map +0 -1
- package/lib/typescript/analytics/batching.d.ts.map +0 -1
- package/lib/typescript/analytics/eventLane.d.ts.map +0 -1
- package/lib/typescript/bootstrap/FeatureRegistry.d.ts.map +0 -1
- package/lib/typescript/bootstrap/SDKBootstrapper.d.ts.map +0 -1
- package/lib/typescript/bucketing/fnv1a32.d.ts.map +0 -1
- package/lib/typescript/compat/codepush.d.ts.map +0 -1
- package/lib/typescript/config/ConfigManager.d.ts.map +0 -1
- package/lib/typescript/config/configTypes.d.ts.map +0 -1
- package/lib/typescript/core/architecture.d.ts.map +0 -1
- package/lib/typescript/core/clock/now.d.ts.map +0 -1
- package/lib/typescript/core/config/defaults.d.ts.map +0 -1
- package/lib/typescript/core/config/schema.d.ts.map +0 -1
- package/lib/typescript/core/constants/endpoints.d.ts.map +0 -1
- package/lib/typescript/core/constants/protocol.d.ts.map +0 -1
- package/lib/typescript/core/constants/timings.d.ts.map +0 -1
- package/lib/typescript/core/constants/version.d.ts.map +0 -1
- package/lib/typescript/core/context/app.d.ts.map +0 -1
- package/lib/typescript/core/context/device.d.ts.map +0 -1
- package/lib/typescript/core/context/session.d.ts.map +0 -1
- package/lib/typescript/core/context/user.d.ts.map +0 -1
- package/lib/typescript/core/contracts/IFeature.d.ts.map +0 -1
- package/lib/typescript/core/di/container.d.ts.map +0 -1
- package/lib/typescript/core/encoding/base64.d.ts.map +0 -1
- package/lib/typescript/core/id/deviceId.d.ts.map +0 -1
- package/lib/typescript/core/id/installationId.d.ts.map +0 -1
- package/lib/typescript/core/id/sessionId.d.ts.map +0 -1
- package/lib/typescript/core/lifecycle/appLifecycle.d.ts.map +0 -1
- package/lib/typescript/core/lifecycle/crashSafe.d.ts.map +0 -1
- package/lib/typescript/core/logger/errorClassification.d.ts.map +0 -1
- package/lib/typescript/core/logger/internalLogger.d.ts.map +0 -1
- package/lib/typescript/core/logger/levels.d.ts.map +0 -1
- package/lib/typescript/crypto/hmacSha256.d.ts.map +0 -1
- package/lib/typescript/debug/bootstrap.d.ts.map +0 -1
- package/lib/typescript/debug/commands.d.ts.map +0 -1
- package/lib/typescript/debug/configBuilder.d.ts.map +0 -1
- package/lib/typescript/debug/exportBridge.d.ts.map +0 -1
- package/lib/typescript/debug/hostResolver.d.ts.map +0 -1
- package/lib/typescript/debug/index.d.ts.map +0 -1
- package/lib/typescript/debug/metrics.d.ts.map +0 -1
- package/lib/typescript/debug/perf.d.ts.map +0 -1
- package/lib/typescript/debug/perfWiring.d.ts.map +0 -1
- package/lib/typescript/debug/protocol.d.ts.map +0 -1
- package/lib/typescript/debug/redaction.d.ts.map +0 -1
- package/lib/typescript/debug/replayWiring.d.ts.map +0 -1
- package/lib/typescript/debug/screenTracking.d.ts.map +0 -1
- package/lib/typescript/debug/sessionWiring.d.ts.map +0 -1
- package/lib/typescript/debug/stream.d.ts.map +0 -1
- package/lib/typescript/debug/transport.d.ts.map +0 -1
- package/lib/typescript/features/bugreport/BugReportFeature.d.ts.map +0 -1
- package/lib/typescript/features/bugreport/buildPayload.d.ts.map +0 -1
- package/lib/typescript/features/bugreport/index.d.ts.map +0 -1
- package/lib/typescript/features/crash/CrashFeature.d.ts.map +0 -1
- package/lib/typescript/features/crash/CrashReporter.d.ts.map +0 -1
- package/lib/typescript/features/crash/NativeCrashFeature.d.ts.map +0 -1
- package/lib/typescript/features/crash/capture.d.ts.map +0 -1
- package/lib/typescript/features/crash/globalHandler.d.ts.map +0 -1
- package/lib/typescript/features/crash/index.d.ts.map +0 -1
- package/lib/typescript/features/crash/nativeCrashBridge.d.ts.map +0 -1
- package/lib/typescript/features/crash/rejectionHandler.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageAnchor.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageArchetypeRenderers.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageInAppView.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageInlinePlacement.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngagePromptProvider.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngagePromptView.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageTransport.d.ts.map +0 -1
- package/lib/typescript/features/engage/EngageVariantContent.d.ts.map +0 -1
- package/lib/typescript/features/engage/attachmentCapture.d.ts.map +0 -1
- package/lib/typescript/features/engage/captureVoiceAttachment.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageCoachmarkTour.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageGameLogic.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageMediaSizing.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageMultiStepSheet.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageOutcome.d.ts.map +0 -1
- package/lib/typescript/features/engage/engagePushTokenBridge.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageShakeBridge.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageSignals.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageStoreReviewBridge.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageTestSeenStore.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageThrottle.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageTriggerEngine.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageTypes.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageVariantResolver.d.ts.map +0 -1
- package/lib/typescript/features/engage/engageWindowInsets.d.ts.map +0 -1
- package/lib/typescript/features/engage/gestureTriggerDetector.d.ts.map +0 -1
- package/lib/typescript/features/engage/transcription/TranscriptionProvider.d.ts.map +0 -1
- package/lib/typescript/features/install-referrer/installReferrer.d.ts.map +0 -1
- package/lib/typescript/features/journey/ScaleBunDebugRoot.d.ts.map +0 -1
- package/lib/typescript/features/journey/ScaleBunFlatList.d.ts.map +0 -1
- package/lib/typescript/features/journey/ScaleBunImpression.d.ts.map +0 -1
- package/lib/typescript/features/journey/ScaleBunScrollView.d.ts.map +0 -1
- package/lib/typescript/features/journey/ScaleBunSectionList.d.ts.map +0 -1
- package/lib/typescript/features/journey/calibrationContext.d.ts.map +0 -1
- package/lib/typescript/features/journey/gestureBuffer.d.ts.map +0 -1
- package/lib/typescript/features/journey/gestureDetector.d.ts.map +0 -1
- package/lib/typescript/features/journey/impression.d.ts.map +0 -1
- package/lib/typescript/features/journey/journeyManager.d.ts.map +0 -1
- package/lib/typescript/features/journey/journeyTypes.d.ts.map +0 -1
- package/lib/typescript/features/journey/navDetector.d.ts.map +0 -1
- package/lib/typescript/features/journey/screenshotHelper.d.ts.map +0 -1
- package/lib/typescript/features/journey/targetRegistry.d.ts.map +0 -1
- package/lib/typescript/features/journey/touchTarget.d.ts.map +0 -1
- package/lib/typescript/features/navigation/AutoScreenDetector.d.ts.map +0 -1
- package/lib/typescript/features/network/NetworkFeature.d.ts.map +0 -1
- package/lib/typescript/features/network/index.d.ts.map +0 -1
- package/lib/typescript/features/ota/OtaEventEmitter.d.ts.map +0 -1
- package/lib/typescript/features/ota/OtaOrchestrator.d.ts.map +0 -1
- package/lib/typescript/features/ota/OtaTypes.d.ts.map +0 -1
- package/lib/typescript/features/ota/deviceAttributes.d.ts.map +0 -1
- package/lib/typescript/features/ota/environment.d.ts.map +0 -1
- package/lib/typescript/features/ota/geoCountry.d.ts.map +0 -1
- package/lib/typescript/features/ota/retry.d.ts.map +0 -1
- package/lib/typescript/features/ota/signature.d.ts.map +0 -1
- package/lib/typescript/features/ota/useOtaUpdate.d.ts.map +0 -1
- package/lib/typescript/features/performance/PerformanceFeature.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/AppLaunchCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/AutoScreenLoadCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/CustomTraceCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/FrameMetricsCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/JsStallCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/NetworkPerfCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/ScreenLoadCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/collectors/UiHangCollector.d.ts.map +0 -1
- package/lib/typescript/features/performance/config.d.ts.map +0 -1
- package/lib/typescript/features/performance/getNativePerformanceModule.d.ts.map +0 -1
- package/lib/typescript/features/performance/index.d.ts.map +0 -1
- package/lib/typescript/features/performance/metrics/MetricsEngine.d.ts.map +0 -1
- package/lib/typescript/features/performance/models.d.ts.map +0 -1
- package/lib/typescript/features/performance/transport/PerformanceTransport.d.ts.map +0 -1
- package/lib/typescript/features/profiler/ProfilerFeature.d.ts.map +0 -1
- package/lib/typescript/features/profiler/config.d.ts.map +0 -1
- package/lib/typescript/features/profiler/contracts.d.ts.map +0 -1
- package/lib/typescript/features/profiler/index.d.ts.map +0 -1
- package/lib/typescript/features/profiler/models.d.ts.map +0 -1
- package/lib/typescript/features/profiler/transport/ProfilerTransport.d.ts.map +0 -1
- package/lib/typescript/features/replay/bridge/adapters/bridgeAdapter.d.ts.map +0 -1
- package/lib/typescript/features/replay/bridge/eventEmitter.d.ts.map +0 -1
- package/lib/typescript/features/replay/bridge/nativeModule.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/clock/clock.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/config/defaults.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/config/validator.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/env/environmentDetector.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/errors/safeCall.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/ids/sessionId.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/logger/logger.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/privacy/privacyTypes.d.ts.map +0 -1
- package/lib/typescript/features/replay/core/queue/boundedQueue.d.ts.map +0 -1
- package/lib/typescript/features/replay/integrations/alert/alertInstrumentation.d.ts.map +0 -1
- package/lib/typescript/features/replay/integrations/logs/consoleIntegration.d.ts.map +0 -1
- package/lib/typescript/features/replay/integrations/network/networkAdapter.d.ts.map +0 -1
- package/lib/typescript/features/replay/integrations/react-navigation/navigationIntegration.d.ts.map +0 -1
- package/lib/typescript/features/replay/integrations/touch/ReplayRoot.d.ts.map +0 -1
- package/lib/typescript/features/replay/pipeline/batching/batchManager.d.ts.map +0 -1
- package/lib/typescript/features/replay/pipeline/envelope/envelopeBuilder.d.ts.map +0 -1
- package/lib/typescript/features/replay/pipeline/retry/retryPolicy.d.ts.map +0 -1
- package/lib/typescript/features/replay/pipeline/transport/transportTypes.d.ts.map +0 -1
- package/lib/typescript/features/replay/public/api.d.ts.map +0 -1
- package/lib/typescript/features/replay/public/enums.d.ts.map +0 -1
- package/lib/typescript/features/replay/public/types.d.ts.map +0 -1
- package/lib/typescript/features/replay/replay/breadcrumbs/breadcrumbCollector.d.ts.map +0 -1
- package/lib/typescript/features/replay/replay/frames/frameModels.d.ts.map +0 -1
- package/lib/typescript/features/replay/replay/session/sessionOrchestrator.d.ts.map +0 -1
- package/lib/typescript/features/replay/replay/timeline/timelineModels.d.ts.map +0 -1
- package/lib/typescript/features/replay/transport/BackendReplayTransport.d.ts.map +0 -1
- package/lib/typescript/features/replay/transport/CompositeReplayTransport.d.ts.map +0 -1
- package/lib/typescript/features/replay/transport/DesktopReplayTransport.d.ts.map +0 -1
- package/lib/typescript/features/replay/transport/ReplayTransport.d.ts.map +0 -1
- package/lib/typescript/features/session/BackendSessionAdapter.d.ts.map +0 -1
- package/lib/typescript/features/session/DesktopSessionTransport.d.ts.map +0 -1
- package/lib/typescript/features/session/JourneyEventPipeline.d.ts.map +0 -1
- package/lib/typescript/features/session/ReplayCaptureManager.d.ts.map +0 -1
- package/lib/typescript/features/session/ScrollTracker.d.ts.map +0 -1
- package/lib/typescript/features/session/SessionManager.d.ts.map +0 -1
- package/lib/typescript/features/session/SyncDecisionEngine.d.ts.map +0 -1
- package/lib/typescript/features/session/index.d.ts.map +0 -1
- package/lib/typescript/features/session/nativeCapture.d.ts.map +0 -1
- package/lib/typescript/features/session/outboxFrameCapture.d.ts.map +0 -1
- package/lib/typescript/features/session/sessionTypes.d.ts.map +0 -1
- package/lib/typescript/features/skan/skanBridge.d.ts.map +0 -1
- package/lib/typescript/features/skan/skanConversionManager.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/integrations/fetch/fetchInterceptor.d.ts.map +0 -1
- package/lib/typescript/integrations/navigation/screenTracker.d.ts.map +0 -1
- package/lib/typescript/integrations/network/bodyCapture.d.ts.map +0 -1
- package/lib/typescript/integrations/xhr/xhrInterceptor.d.ts.map +0 -1
- package/lib/typescript/metro/composeSourceMap.d.ts.map +0 -1
- package/lib/typescript/metro/featureModules.d.ts.map +0 -1
- package/lib/typescript/metro/index.d.ts.map +0 -1
- package/lib/typescript/metro/optionalDependencyStub.d.ts.map +0 -1
- package/lib/typescript/metro/optionalModules.d.ts.map +0 -1
- package/lib/typescript/metro/serializerCompose.d.ts.map +0 -1
- package/lib/typescript/pipeline/dispatcher/dispatcher.d.ts.map +0 -1
- package/lib/typescript/pipeline/envelope/envelope.d.ts.map +0 -1
- package/lib/typescript/pipeline/envelope/serializer.d.ts.map +0 -1
- package/lib/typescript/pipeline/processors/dedupe.d.ts.map +0 -1
- package/lib/typescript/pipeline/processors/enrich.d.ts.map +0 -1
- package/lib/typescript/pipeline/processors/sampling.d.ts.map +0 -1
- package/lib/typescript/pipeline/processors/sanitize.d.ts.map +0 -1
- package/lib/typescript/pipeline/queue/flushQueue.d.ts.map +0 -1
- package/lib/typescript/pipeline/queue/memoryQueue.d.ts.map +0 -1
- package/lib/typescript/pipeline/queue/persistentQueue.d.ts.map +0 -1
- package/lib/typescript/pipeline/queue/queuePolicy.d.ts.map +0 -1
- package/lib/typescript/pipeline/scheduler/flushScheduler.d.ts.map +0 -1
- package/lib/typescript/pipeline/scheduler/retryPolicy.d.ts.map +0 -1
- package/lib/typescript/public/ScaleBunErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/public/ScaleBunFacade.d.ts.map +0 -1
- package/lib/typescript/public/ScaleBunProvider.d.ts.map +0 -1
- package/lib/typescript/public/typedTracker.d.ts.map +0 -1
- package/lib/typescript/public/types.d.ts.map +0 -1
- package/lib/typescript/push/PushManager.d.ts.map +0 -1
- package/lib/typescript/push/adapters/ManualAdapter.d.ts.map +0 -1
- package/lib/typescript/push/adapters/NativeBridgeAdapter.d.ts.map +0 -1
- package/lib/typescript/push/adapters/NoopAdapter.d.ts.map +0 -1
- package/lib/typescript/push/adapters/RNFirebaseMessagingAdapter.d.ts.map +0 -1
- package/lib/typescript/push/adapters/loadMessaging.d.ts.map +0 -1
- package/lib/typescript/push/adapters/loadNotifee.d.ts.map +0 -1
- package/lib/typescript/push/adapters/selectAdapter.d.ts.map +0 -1
- package/lib/typescript/push/detect/capabilities.d.ts.map +0 -1
- package/lib/typescript/push/index.d.ts.map +0 -1
- package/lib/typescript/push/native/nativeNotifications.d.ts.map +0 -1
- package/lib/typescript/push/types.d.ts.map +0 -1
- package/lib/typescript/specs/NativeReplaySdk.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunCrash.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunInstallReferrer.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunOta.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunPerformance.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunProfiler.d.ts.map +0 -1
- package/lib/typescript/specs/NativeScaleBunStorage.d.ts.map +0 -1
- package/lib/typescript/storage/StorageBackend.d.ts.map +0 -1
- package/lib/typescript/storage/db/sqlite.d.ts.map +0 -1
- package/lib/typescript/storage/files/fileStore.d.ts.map +0 -1
- package/lib/typescript/transport/auth/sdkSession.d.ts.map +0 -1
- package/lib/typescript/transport/backoff/exponentialJitter.d.ts.map +0 -1
- package/lib/typescript/transport/http/endpoints.d.ts.map +0 -1
- package/lib/typescript/transport/http/httpClient.d.ts.map +0 -1
- package/lib/typescript/transport/rateLimit/retryAfter.d.ts.map +0 -1
- package/lib/typescript/transport/signing/requestSigner.d.ts.map +0 -1
- package/lib/typescript/vendor/protocol/index.d.ts.map +0 -1
- package/lib/typescript/vendor/protocol/internal/validation.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/bridge.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/config.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/events.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/features.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/index.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/platform.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/session-boundary.d.ts.map +0 -1
- package/lib/typescript/vendor/sdk-contracts/session.d.ts.map +0 -1
|
@@ -10,29 +10,80 @@
|
|
|
10
10
|
|
|
11
11
|
const REDACTED = '[REDACTED]';
|
|
12
12
|
|
|
13
|
+
// ─── Safety limits (SB-25 / SB-27) ───────────────────────────────────────────
|
|
14
|
+
// The PII scanner runs synchronously on the JS thread inside the app's own
|
|
15
|
+
// fetch()/XHR call. Left unbounded it is both a ReDoS vector (a large body of
|
|
16
|
+
// alphanumeric text can make regex matching cost seconds — an Android ANR) and
|
|
17
|
+
// a payload-amplification / exfiltration channel (one warning object per match).
|
|
18
|
+
// These bounds keep every scan linear and its output small.
|
|
19
|
+
|
|
20
|
+
/** Never scan more than this many characters — truncate before matching. */
|
|
21
|
+
const MAX_SCAN_INPUT_CHARS = 16 * 1024;
|
|
22
|
+
/** Abandon a scan once it has spent this long on the JS thread. */
|
|
23
|
+
const SCAN_TIME_BUDGET_MS = 10;
|
|
24
|
+
/** Never emit more than this many PII warnings for a single event. */
|
|
25
|
+
const MAX_PII_WARNINGS = 20;
|
|
26
|
+
/** Never pattern-scrub a string value longer than this (bounded work). */
|
|
27
|
+
const MAX_STRING_SCRUB_CHARS = 64 * 1024;
|
|
28
|
+
|
|
13
29
|
/** Headers that must always be redacted (case-insensitive) */
|
|
14
30
|
const SENSITIVE_HEADERS = new Set(['authorization', 'cookie', 'set-cookie', 'x-api-key', 'x-auth-token', 'proxy-authorization']);
|
|
15
31
|
|
|
16
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* PII detection patterns.
|
|
34
|
+
*
|
|
35
|
+
* SB-25: patterns must be free of catastrophic backtracking. The email pattern
|
|
36
|
+
* uses non-overlapping character classes with bounded quantifiers so it cannot
|
|
37
|
+
* backtrack quadratically on adversarial input like `'a'.repeat(N) + '@' + …`.
|
|
38
|
+
* All quantifiers here are bounded; combined with the input cap above this keeps
|
|
39
|
+
* matching linear in input size.
|
|
40
|
+
*/
|
|
17
41
|
const PII_PATTERNS = [{
|
|
18
42
|
name: 'email',
|
|
19
|
-
pattern: /[
|
|
43
|
+
pattern: /[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9-]{1,63}(?:\.[A-Za-z0-9-]{1,63}){0,8}\.[A-Za-z]{2,24}/g
|
|
20
44
|
}, {
|
|
21
45
|
name: 'phone',
|
|
22
|
-
pattern:
|
|
46
|
+
pattern: /\+?\d{1,3}[-.\s]?\(?\d{2,4}\)?[-.\s]?\d{3,4}[-.\s]?\d{3,4}/g
|
|
23
47
|
}, {
|
|
24
48
|
name: 'ssn',
|
|
25
49
|
pattern: /\b\d{3}-\d{2}-\d{4}\b/g
|
|
26
50
|
}, {
|
|
27
51
|
name: 'credit_card',
|
|
28
52
|
pattern: /\b\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}\b/g
|
|
53
|
+
}, {
|
|
54
|
+
name: 'iban',
|
|
55
|
+
pattern: /\b[A-Z]{2}\d{2}[A-Z0-9]{10,30}\b/g
|
|
56
|
+
}, {
|
|
57
|
+
name: 'jwt',
|
|
58
|
+
pattern: /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g
|
|
29
59
|
}, {
|
|
30
60
|
name: 'ip_address',
|
|
31
61
|
pattern: /\b(?:\d{1,3}\.){3}\d{1,3}\b/g
|
|
32
62
|
}];
|
|
33
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Value patterns used to scrub secrets out of raw string bodies (SB-02).
|
|
66
|
+
* These are applied to string values (including parsed-out JSON string leaves
|
|
67
|
+
* and non-JSON bodies) where a denylisted key name is not available. All are
|
|
68
|
+
* bounded / anchored to avoid backtracking.
|
|
69
|
+
*/
|
|
70
|
+
const VALUE_SCRUB_PATTERNS = [{
|
|
71
|
+
name: 'jwt',
|
|
72
|
+
pattern: /eyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}/g
|
|
73
|
+
}, {
|
|
74
|
+
name: 'email',
|
|
75
|
+
pattern: /[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9-]{1,63}(?:\.[A-Za-z0-9-]{1,63}){0,8}\.[A-Za-z]{2,24}/g
|
|
76
|
+
}, {
|
|
77
|
+
name: 'iban',
|
|
78
|
+
pattern: /\b[A-Z]{2}\d{2}[A-Z0-9]{10,30}\b/g
|
|
79
|
+
}, {
|
|
80
|
+
name: 'credit_card',
|
|
81
|
+
pattern: /\b\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{2,7}\b/g,
|
|
82
|
+
luhn: true
|
|
83
|
+
}];
|
|
84
|
+
|
|
34
85
|
/** Keys in request/response bodies that likely contain sensitive data */
|
|
35
|
-
const SENSITIVE_BODY_KEYS = new Set(['password', 'passwd', 'secret', 'token', 'access_token', 'refresh_token', 'api_key', 'apiKey', 'private_key', 'privateKey', 'credit_card', 'creditCard', '
|
|
86
|
+
const SENSITIVE_BODY_KEYS = new Set(['password', 'passwd', 'secret', 'token', 'access_token', 'refresh_token', 'id_token', 'api_key', 'apiKey', 'private_key', 'privateKey', 'credit_card', 'creditCard', 'ccnumber', 'cardnumber', 'card_number', 'pan', 'cvv', 'cvc', 'ssn', 'social_security', 'nationalid', 'national_id', 'iban', 'otp', 'pin', 'totp', 'mfa', 'mnemonic', 'seed']);
|
|
36
87
|
|
|
37
88
|
// ─── Header Redaction ───────────────────────────────────────────────────────
|
|
38
89
|
|
|
@@ -59,9 +110,68 @@ export function redactHeaders(headers) {
|
|
|
59
110
|
|
|
60
111
|
// ─── Body Redaction ─────────────────────────────────────────────────────────
|
|
61
112
|
|
|
113
|
+
/** Normalize a key for denylist comparison: lowercase, strip separators. */
|
|
114
|
+
function _normalizeKey(key) {
|
|
115
|
+
return key.toLowerCase().replace(/[_\-\s]/g, '');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Normalized denylist so `access_token`, `accessToken` and `Access-Token` all match. */
|
|
119
|
+
const NORMALIZED_SENSITIVE_KEYS = new Set(Array.from(SENSITIVE_BODY_KEYS, _normalizeKey));
|
|
120
|
+
function _isSensitiveKey(key) {
|
|
121
|
+
return NORMALIZED_SENSITIVE_KEYS.has(_normalizeKey(key));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Passes the Luhn checksum — used to avoid over-redacting random 16-digit ids. */
|
|
125
|
+
function _luhnValid(digits) {
|
|
126
|
+
const s = digits.replace(/[^\d]/g, '');
|
|
127
|
+
if (s.length < 12 || s.length > 19) return false;
|
|
128
|
+
let sum = 0;
|
|
129
|
+
let alt = false;
|
|
130
|
+
for (let i = s.length - 1; i >= 0; i--) {
|
|
131
|
+
let d = s.charCodeAt(i) - 48;
|
|
132
|
+
if (alt) {
|
|
133
|
+
d *= 2;
|
|
134
|
+
if (d > 9) d -= 9;
|
|
135
|
+
}
|
|
136
|
+
sum += d;
|
|
137
|
+
alt = !alt;
|
|
138
|
+
}
|
|
139
|
+
return sum % 10 === 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Scrub structured secrets (JWT, email, IBAN, Luhn-valid card) out of a raw
|
|
144
|
+
* string value where no denylisted key name is available (SB-02). Bounded work:
|
|
145
|
+
* the string is capped and every pattern is anchored/bounded.
|
|
146
|
+
*/
|
|
147
|
+
function _scrubSecretsInString(value) {
|
|
148
|
+
if (value.length > MAX_STRING_SCRUB_CHARS) {
|
|
149
|
+
value = value.slice(0, MAX_STRING_SCRUB_CHARS);
|
|
150
|
+
}
|
|
151
|
+
let out = value;
|
|
152
|
+
try {
|
|
153
|
+
for (const {
|
|
154
|
+
pattern,
|
|
155
|
+
luhn
|
|
156
|
+
} of VALUE_SCRUB_PATTERNS) {
|
|
157
|
+
pattern.lastIndex = 0;
|
|
158
|
+
out = out.replace(pattern, m => luhn && !_luhnValid(m) ? m : REDACTED);
|
|
159
|
+
}
|
|
160
|
+
} catch {
|
|
161
|
+
// Never throw — return whatever scrubbing produced so far.
|
|
162
|
+
}
|
|
163
|
+
return out;
|
|
164
|
+
}
|
|
165
|
+
|
|
62
166
|
/**
|
|
63
167
|
* Deep-redact sensitive keys in a body object. Returns a new object.
|
|
64
168
|
* Handles nested objects and arrays. Never throws.
|
|
169
|
+
*
|
|
170
|
+
* SB-02: string bodies (what JSON.stringify produces — i.e. essentially every
|
|
171
|
+
* React Native network body) are no longer passed through untouched. If a string
|
|
172
|
+
* parses as JSON it is deep-redacted and re-serialized; otherwise structured
|
|
173
|
+
* secrets in the string are scrubbed. This closes the "6 of 9 seeded secrets
|
|
174
|
+
* survived" leak while leaving non-sensitive metadata intact.
|
|
65
175
|
*/
|
|
66
176
|
export function redactBody(body, maxDepth = 10) {
|
|
67
177
|
try {
|
|
@@ -74,9 +184,7 @@ function _redactValue(value, depth, maxDepth) {
|
|
|
74
184
|
if (depth > maxDepth) return '[MAX_DEPTH]';
|
|
75
185
|
if (value === null || value === undefined) return value;
|
|
76
186
|
if (typeof value === 'string') {
|
|
77
|
-
|
|
78
|
-
// PII scanning is a separate concern
|
|
79
|
-
return value;
|
|
187
|
+
return _redactString(value, depth, maxDepth);
|
|
80
188
|
}
|
|
81
189
|
if (Array.isArray(value)) {
|
|
82
190
|
return value.map(item => _redactValue(item, depth + 1, maxDepth));
|
|
@@ -84,7 +192,7 @@ function _redactValue(value, depth, maxDepth) {
|
|
|
84
192
|
if (typeof value === 'object') {
|
|
85
193
|
const result = {};
|
|
86
194
|
for (const [key, val] of Object.entries(value)) {
|
|
87
|
-
if (
|
|
195
|
+
if (_isSensitiveKey(key)) {
|
|
88
196
|
result[key] = REDACTED;
|
|
89
197
|
} else {
|
|
90
198
|
result[key] = _redactValue(val, depth + 1, maxDepth);
|
|
@@ -95,66 +203,145 @@ function _redactValue(value, depth, maxDepth) {
|
|
|
95
203
|
return value;
|
|
96
204
|
}
|
|
97
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Redact a string value. If it looks like a JSON object/array, parse it, redact
|
|
208
|
+
* by key, and re-serialize so a serialized body such as
|
|
209
|
+
* `{"password":"...","otp":"..."}` is scrubbed. Otherwise scrub structured
|
|
210
|
+
* secrets out of the raw text.
|
|
211
|
+
*/
|
|
212
|
+
function _redactString(value, depth, maxDepth) {
|
|
213
|
+
const trimmed = value.trimStart();
|
|
214
|
+
if (trimmed.startsWith('{') || trimmed.startsWith('[')) {
|
|
215
|
+
try {
|
|
216
|
+
const parsed = JSON.parse(value);
|
|
217
|
+
if (parsed !== null && typeof parsed === 'object') {
|
|
218
|
+
const redacted = _redactValue(parsed, depth + 1, maxDepth);
|
|
219
|
+
return JSON.stringify(redacted);
|
|
220
|
+
}
|
|
221
|
+
} catch {
|
|
222
|
+
// Not valid JSON — fall through to pattern scrubbing.
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return _scrubSecretsInString(value);
|
|
226
|
+
}
|
|
227
|
+
|
|
98
228
|
// ─── PII Scanning ───────────────────────────────────────────────────────────
|
|
99
229
|
|
|
100
230
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
231
|
+
* Bounded scan context shared across one logical scan (SB-25 / SB-27). Enforces
|
|
232
|
+
* a wall-clock budget and a warning cap while accumulating per-type counts so the
|
|
233
|
+
* final output can report `{ email: 5000 }` instead of 5000 fragment objects.
|
|
103
234
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
235
|
+
|
|
236
|
+
function _newScanContext() {
|
|
237
|
+
return {
|
|
238
|
+
warnings: [],
|
|
239
|
+
byType: {},
|
|
240
|
+
deadline: Date.now() + SCAN_TIME_BUDGET_MS,
|
|
241
|
+
truncated: false,
|
|
242
|
+
total: 0
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function _pushWarning(ctx, type, rawMatch, location) {
|
|
246
|
+
ctx.total += 1;
|
|
247
|
+
ctx.byType[type] = (ctx.byType[type] ?? 0) + 1;
|
|
248
|
+
if (ctx.warnings.length < MAX_PII_WARNINGS) {
|
|
249
|
+
ctx.warnings.push({
|
|
250
|
+
type,
|
|
251
|
+
match: _maskPII(rawMatch),
|
|
252
|
+
location
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
ctx.truncated = true;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Finalize a scan: append a single summary entry carrying per-type counts when
|
|
261
|
+
* anything was dropped, so consumers see the full magnitude without the SDK
|
|
262
|
+
* shipping every matched fragment (SB-27).
|
|
263
|
+
*/
|
|
264
|
+
function _finalizeScan(ctx) {
|
|
265
|
+
if (ctx.truncated) {
|
|
266
|
+
ctx.warnings.push({
|
|
267
|
+
type: '_summary',
|
|
268
|
+
match: `truncated: ${ctx.total} matches`,
|
|
269
|
+
location: `counts:${JSON.stringify(ctx.byType)}`
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
return ctx.warnings;
|
|
273
|
+
}
|
|
274
|
+
function _scanTextInto(text, location, ctx) {
|
|
275
|
+
// SB-25: cap the input before any regex runs, so matching cost is bounded
|
|
276
|
+
// regardless of the (attacker-controlled) body size.
|
|
277
|
+
const input = text.length > MAX_SCAN_INPUT_CHARS ? text.slice(0, MAX_SCAN_INPUT_CHARS) : text;
|
|
106
278
|
try {
|
|
107
279
|
for (const {
|
|
108
280
|
name,
|
|
109
281
|
pattern
|
|
110
282
|
} of PII_PATTERNS) {
|
|
111
|
-
// Reset regex state
|
|
112
283
|
pattern.lastIndex = 0;
|
|
113
|
-
let match = pattern.exec(
|
|
284
|
+
let match = pattern.exec(input);
|
|
114
285
|
while (match) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
286
|
+
_pushWarning(ctx, name, match[0], location);
|
|
287
|
+
// SB-25: abandon the scan if it has exceeded its time budget.
|
|
288
|
+
if (Date.now() > ctx.deadline) {
|
|
289
|
+
ctx.truncated = true;
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
if (pattern.lastIndex === match.index) pattern.lastIndex++; // guard zero-width
|
|
293
|
+
match = pattern.exec(input);
|
|
121
294
|
}
|
|
122
295
|
}
|
|
123
296
|
} catch {
|
|
124
|
-
// Never throw —
|
|
297
|
+
// Never throw — keep whatever was found so far.
|
|
125
298
|
}
|
|
126
|
-
return warnings;
|
|
127
299
|
}
|
|
128
300
|
|
|
129
301
|
/**
|
|
130
|
-
* Scan
|
|
302
|
+
* Scan a string for PII patterns. Returns a bounded list of warnings.
|
|
303
|
+
* Never throws.
|
|
304
|
+
*/
|
|
305
|
+
export function scanForPII(text, location = 'unknown') {
|
|
306
|
+
const ctx = _newScanContext();
|
|
307
|
+
_scanTextInto(text, location, ctx);
|
|
308
|
+
return _finalizeScan(ctx);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Scan an object deeply for PII. Returns a bounded list of warnings.
|
|
131
313
|
* Never throws.
|
|
132
314
|
*/
|
|
133
315
|
export function scanObjectForPII(obj, basePath = '', maxDepth = 10) {
|
|
134
|
-
const
|
|
316
|
+
const ctx = _newScanContext();
|
|
135
317
|
try {
|
|
136
|
-
|
|
318
|
+
_scanObjectInto(obj, basePath, 0, maxDepth, ctx);
|
|
137
319
|
} catch {
|
|
138
320
|
// Never throw
|
|
139
321
|
}
|
|
140
|
-
return
|
|
322
|
+
return _finalizeScan(ctx);
|
|
141
323
|
}
|
|
142
|
-
function
|
|
324
|
+
function _scanObjectInto(value, path, depth, maxDepth, ctx) {
|
|
143
325
|
if (depth > maxDepth || value === null || value === undefined) return;
|
|
326
|
+
if (ctx.truncated || Date.now() > ctx.deadline) {
|
|
327
|
+
ctx.truncated = true;
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
144
330
|
if (typeof value === 'string') {
|
|
145
|
-
|
|
146
|
-
warnings.push(...found);
|
|
331
|
+
_scanTextInto(value, path, ctx);
|
|
147
332
|
return;
|
|
148
333
|
}
|
|
149
334
|
if (Array.isArray(value)) {
|
|
150
|
-
value.
|
|
151
|
-
|
|
152
|
-
|
|
335
|
+
for (let i = 0; i < value.length; i++) {
|
|
336
|
+
if (ctx.truncated) return;
|
|
337
|
+
_scanObjectInto(value[i], `${path}[${i}]`, depth + 1, maxDepth, ctx);
|
|
338
|
+
}
|
|
153
339
|
return;
|
|
154
340
|
}
|
|
155
341
|
if (typeof value === 'object') {
|
|
156
342
|
for (const [key, val] of Object.entries(value)) {
|
|
157
|
-
|
|
343
|
+
if (ctx.truncated) return;
|
|
344
|
+
_scanObjectInto(val, path ? `${path}.${key}` : key, depth + 1, maxDepth, ctx);
|
|
158
345
|
}
|
|
159
346
|
}
|
|
160
347
|
}
|
|
@@ -196,20 +383,19 @@ export function redactUrl(url) {
|
|
|
196
383
|
* Apply full redaction pipeline to a network event.
|
|
197
384
|
*/
|
|
198
385
|
export function redactNetworkEvent(event) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
386
|
+
// One bounded context for the whole event so the aggregate warning count and
|
|
387
|
+
// scan time stay capped across url + request + response (SB-25 / SB-27).
|
|
388
|
+
const ctx = _newScanContext();
|
|
202
389
|
if (event.url) {
|
|
203
|
-
|
|
390
|
+
_scanTextInto(event.url, 'url', ctx);
|
|
204
391
|
}
|
|
205
|
-
|
|
206
|
-
// Scan bodies for PII
|
|
207
392
|
if (event.requestBody) {
|
|
208
|
-
|
|
393
|
+
_scanObjectInto(event.requestBody, 'requestBody', 0, 10, ctx);
|
|
209
394
|
}
|
|
210
395
|
if (event.responseBody) {
|
|
211
|
-
|
|
396
|
+
_scanObjectInto(event.responseBody, 'responseBody', 0, 10, ctx);
|
|
212
397
|
}
|
|
398
|
+
const piiWarnings = _finalizeScan(ctx);
|
|
213
399
|
return {
|
|
214
400
|
url: event.url ? redactUrl(event.url) : '',
|
|
215
401
|
method: event.method ?? 'GET',
|
|
@@ -575,7 +575,15 @@ export function ScaleBunDebugRoot({
|
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
577
|
} catch {/* no-throw */}
|
|
578
|
-
|
|
578
|
+
// 600ms, was 200ms. The race this defer exists for happens on the FIRST tap of a
|
|
579
|
+
// mount: native isn't confirmed yet, JS emitted at 200ms, then the first native
|
|
580
|
+
// event crossed the bridge at ~300-400ms — recording the same tap TWICE, with the
|
|
581
|
+
// JS copy missing normalizedX/Y whenever the async root-view measure hadn't
|
|
582
|
+
// resolved (an interaction the heatmap cannot place). QA hit exactly this pair.
|
|
583
|
+
// The wider defer lets the first native event cancel the JS emission instead; on
|
|
584
|
+
// devices with no native tracker at all it merely delays a background emission,
|
|
585
|
+
// which nothing user-visible waits on.
|
|
586
|
+
}, 600);
|
|
579
587
|
}
|
|
580
588
|
touchStartRef.current = null;
|
|
581
589
|
} catch {/* no-throw */}
|
|
@@ -36,12 +36,22 @@ export class AutoScreenDetector {
|
|
|
36
36
|
_manualScreen = null;
|
|
37
37
|
_manualScreenTs = 0;
|
|
38
38
|
_autoScreen = null;
|
|
39
|
+
/** `name#key` of the last auto-detected screen VISIT — see _extractActiveVisit. */
|
|
40
|
+
_autoVisitSig = null;
|
|
39
41
|
_navigationRef = null;
|
|
40
42
|
_navListenerRemover = null;
|
|
41
43
|
_navListenerWired = false;
|
|
42
44
|
_heuristicTimer = null;
|
|
43
45
|
_started = false;
|
|
44
46
|
_lastEmittedScreen = null;
|
|
47
|
+
_lastEmittedTs = 0;
|
|
48
|
+
/**
|
|
49
|
+
* Cross-source emit dedup window — see _emitScreenChange. Long enough to absorb the manual
|
|
50
|
+
* beacon and the navRef listener both reporting the SAME transition (they land within the
|
|
51
|
+
* 30ms nav debounce plus a render), short enough that a genuine re-visit of the same route
|
|
52
|
+
* a moment later is a new screen view rather than silence.
|
|
53
|
+
*/
|
|
54
|
+
static EMIT_DEDUP_WINDOW_MS = 800;
|
|
45
55
|
_navDebounceTimer = null;
|
|
46
56
|
/** Whether the React Navigation exports were actually replaced — see _autoHookReactNavigation. */
|
|
47
57
|
_autoHookInstalled = false;
|
|
@@ -100,6 +110,7 @@ export class AutoScreenDetector {
|
|
|
100
110
|
if (this.isManualScreenActive()) return;
|
|
101
111
|
if (name !== this._autoScreen) {
|
|
102
112
|
this._autoScreen = name;
|
|
113
|
+
this._autoVisitSig = name; // native lifecycle carries no route key — name-only visit
|
|
103
114
|
this._emitScreenChange(name, 'heuristic');
|
|
104
115
|
}
|
|
105
116
|
} catch {/* no-throw */}
|
|
@@ -162,10 +173,13 @@ export class AutoScreenDetector {
|
|
|
162
173
|
try {
|
|
163
174
|
const state = typeof container.getRootState === 'function' ? container.getRootState() : null;
|
|
164
175
|
if (state) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
// Compared by name#key so a re-VISIT of the same route
|
|
177
|
+
// (new key) is recorded — name-only comparison swallowed it.
|
|
178
|
+
const visit = this._extractActiveVisit(state);
|
|
179
|
+
if (visit && this._visitSig(visit) !== this._autoVisitSig) {
|
|
180
|
+
this._autoScreen = visit.name;
|
|
181
|
+
this._autoVisitSig = this._visitSig(visit);
|
|
182
|
+
this._emitScreenChange(visit.name, 'navRef');
|
|
169
183
|
}
|
|
170
184
|
}
|
|
171
185
|
} catch {/* no-throw */}
|
|
@@ -179,10 +193,11 @@ export class AutoScreenDetector {
|
|
|
179
193
|
if (typeof container.getRootState === 'function') {
|
|
180
194
|
const state = container.getRootState();
|
|
181
195
|
if (state) {
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
this._autoScreen =
|
|
185
|
-
this.
|
|
196
|
+
const visit = this._extractActiveVisit(state);
|
|
197
|
+
if (visit) {
|
|
198
|
+
this._autoScreen = visit.name;
|
|
199
|
+
this._autoVisitSig = this._visitSig(visit);
|
|
200
|
+
this._emitScreenChange(visit.name, 'navRef');
|
|
186
201
|
}
|
|
187
202
|
}
|
|
188
203
|
}
|
|
@@ -218,10 +233,14 @@ export class AutoScreenDetector {
|
|
|
218
233
|
if (navContainer) {
|
|
219
234
|
const state = typeof navContainer.getRootState === 'function' ? navContainer.getRootState() : null;
|
|
220
235
|
if (state) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
236
|
+
// name#key comparison: a re-opened route (same name, fresh key) seen
|
|
237
|
+
// across poll ticks is a new visit even when every intermediate screen
|
|
238
|
+
// fell between polls — the case a name-only diff could never see.
|
|
239
|
+
const visit = this._extractActiveVisit(state);
|
|
240
|
+
if (visit && this._visitSig(visit) !== this._autoVisitSig) {
|
|
241
|
+
this._autoScreen = visit.name;
|
|
242
|
+
this._autoVisitSig = this._visitSig(visit);
|
|
243
|
+
this._emitScreenChange(visit.name, 'heuristic');
|
|
225
244
|
}
|
|
226
245
|
}
|
|
227
246
|
}
|
|
@@ -261,6 +280,22 @@ export class AutoScreenDetector {
|
|
|
261
280
|
* Handles nested navigators by walking to the deepest active route.
|
|
262
281
|
*/
|
|
263
282
|
_extractActiveRoute(state) {
|
|
283
|
+
return this._extractActiveVisit(state)?.name ?? null;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Extract the active route's name AND its React Navigation route `key`.
|
|
288
|
+
*
|
|
289
|
+
* The key is what makes re-VISITS detectable. Comparing names alone collapses two
|
|
290
|
+
* different visits to the same route into one screen view: leave Details, open Details
|
|
291
|
+
* again, and `name === _autoScreen` swallowed the second visit entirely (QA: "opened the
|
|
292
|
+
* same route again and no screen event was recorded"). React Navigation mints a fresh
|
|
293
|
+
* `key` for every pushed route instance, so a re-push of the same name is a NEW key —
|
|
294
|
+
* name+key comparison records each visit while a mere re-render of the same instance
|
|
295
|
+
* (same key) still emits nothing. States without keys degrade to name-only, i.e. the
|
|
296
|
+
* old behaviour, never worse.
|
|
297
|
+
*/
|
|
298
|
+
_extractActiveVisit(state) {
|
|
264
299
|
try {
|
|
265
300
|
if (!state?.routes || typeof state.index !== 'number') return null;
|
|
266
301
|
const activeRoute = state.routes[state.index];
|
|
@@ -268,15 +303,25 @@ export class AutoScreenDetector {
|
|
|
268
303
|
|
|
269
304
|
// If this route has nested state, recurse to find the deepest active route
|
|
270
305
|
if (activeRoute.state?.routes && typeof activeRoute.state.index === 'number') {
|
|
271
|
-
const nested = this.
|
|
306
|
+
const nested = this._extractActiveVisit(activeRoute.state);
|
|
272
307
|
if (nested) return nested;
|
|
273
308
|
}
|
|
274
|
-
|
|
309
|
+
if (!activeRoute.name) return null;
|
|
310
|
+
const rawKey = activeRoute.key;
|
|
311
|
+
return {
|
|
312
|
+
name: activeRoute.name,
|
|
313
|
+
key: typeof rawKey === 'string' ? rawKey : null
|
|
314
|
+
};
|
|
275
315
|
} catch {
|
|
276
316
|
return null;
|
|
277
317
|
}
|
|
278
318
|
}
|
|
279
319
|
|
|
320
|
+
/** `name#key` signature of one screen VISIT — what the auto paths dedup on. */
|
|
321
|
+
_visitSig(visit) {
|
|
322
|
+
return visit.key ? `${visit.name}#${visit.key}` : visit.name;
|
|
323
|
+
}
|
|
324
|
+
|
|
280
325
|
// ─── Lifecycle ──────────────────────────────────────────────────────
|
|
281
326
|
|
|
282
327
|
/** Start auto-detection (idempotent) */
|
|
@@ -466,9 +511,16 @@ export class AutoScreenDetector {
|
|
|
466
511
|
|
|
467
512
|
_emitScreenChange(name, source) {
|
|
468
513
|
try {
|
|
469
|
-
//
|
|
470
|
-
|
|
514
|
+
// Cross-source dedup, TIME-BOUNDED. This used to drop any name equal to the last
|
|
515
|
+
// emitted, forever — so re-entering a route whose departure was never observed
|
|
516
|
+
// (heuristic poll missed the intermediate screen, or the user re-pushed the same
|
|
517
|
+
// route) was swallowed on EVERY path, manual beacons included (QA: "opened the
|
|
518
|
+
// same route again, no screen event"). Same name within the window is still one
|
|
519
|
+
// transition double-reported by two sources; same name after it is a new visit.
|
|
520
|
+
const emitNow = Date.now();
|
|
521
|
+
if (name === this._lastEmittedScreen && emitNow - this._lastEmittedTs < AutoScreenDetector.EMIT_DEDUP_WINDOW_MS) return;
|
|
471
522
|
this._lastEmittedScreen = name;
|
|
523
|
+
this._lastEmittedTs = emitNow;
|
|
472
524
|
for (const cb of this._listeners) {
|
|
473
525
|
try {
|
|
474
526
|
cb(name, source);
|
|
@@ -93,6 +93,13 @@ export class BackendSessionAdapter {
|
|
|
93
93
|
// the flush timer retries, so nothing is lost to a start/child race. The durable native
|
|
94
94
|
// outbox path has its own ordering; this guards only the JS in-memory fallback.
|
|
95
95
|
_startedSessionIds = new Set();
|
|
96
|
+
// §11 offline-start recovery: INGESTION_START payloads whose POST failed (e.g. the app
|
|
97
|
+
// launched with no connectivity). Without this, a failed START was logged and forgotten —
|
|
98
|
+
// the row-ready gate never opened, every child lane re-buffered forever, and the session
|
|
99
|
+
// stayed stuck until an app restart even after the network returned. Each flush tick
|
|
100
|
+
// re-attempts these until acked (network errors keep retrying; permanent 4xx gives up).
|
|
101
|
+
_pendingStartPayloads = new Map();
|
|
102
|
+
_startRetryInFlight = false;
|
|
96
103
|
pendingFrames = [];
|
|
97
104
|
pendingEvents = [];
|
|
98
105
|
pendingNetworkRequests = [];
|
|
@@ -228,11 +235,20 @@ export class BackendSessionAdapter {
|
|
|
228
235
|
}
|
|
229
236
|
};
|
|
230
237
|
__DEV__ && logger.debug(`[BackendSessionAdapter] POST session start: ${session.sessionId}`);
|
|
231
|
-
return this._post(startEndpoint, payload)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
return this._post(startEndpoint, payload).then(() => {
|
|
239
|
+
// §11: row now exists — release the child-lane flush gate for this id.
|
|
240
|
+
this._startedSessionIds.add(session.sessionId);
|
|
241
|
+
this._pendingStartPayloads.delete(session.sessionId);
|
|
242
|
+
__DEV__ && logger.info(`[ScaleBun Replay] backend session upload success`);
|
|
243
|
+
}, err => {
|
|
244
|
+
// Offline-start recovery: keep the payload; the flush timer re-attempts it
|
|
245
|
+
// until the row is acked. A permanent 4xx (rejected key) is not retried —
|
|
246
|
+
// the same payload can never succeed.
|
|
247
|
+
if (!BackendSessionAdapter._isPermanentHttpError(err)) {
|
|
248
|
+
this._pendingStartPayloads.set(session.sessionId, payload);
|
|
249
|
+
}
|
|
250
|
+
logger.info(`[ScaleBun Replay] backend session upload failure`);
|
|
251
|
+
});
|
|
236
252
|
}).catch(() => logger.info(`[ScaleBun Replay] backend session upload failure`));
|
|
237
253
|
}
|
|
238
254
|
sendSessionEnd(session) {
|
|
@@ -327,10 +343,22 @@ export class BackendSessionAdapter {
|
|
|
327
343
|
environment: m?.buildType
|
|
328
344
|
}
|
|
329
345
|
};
|
|
330
|
-
|
|
346
|
+
try {
|
|
347
|
+
await this._post(startEndpoint, payload);
|
|
348
|
+
} catch (err) {
|
|
349
|
+
// Offline-start recovery: keep the payload for the flush-tick retry loop.
|
|
350
|
+
// Without this a session that started with no connectivity NEVER opened its
|
|
351
|
+
// row-ready gate — frames/events re-buffered for the life of the process and
|
|
352
|
+
// only an app restart recovered it, even after the network came back.
|
|
353
|
+
if (!BackendSessionAdapter._isPermanentHttpError(err)) {
|
|
354
|
+
this._pendingStartPayloads.set(session.sessionId, payload);
|
|
355
|
+
}
|
|
356
|
+
throw err;
|
|
357
|
+
}
|
|
331
358
|
// §11: row exists. When recording adopts this analytics id (one-row merge),
|
|
332
359
|
// this also releases the recording child-lane gate (_sessionRowReady).
|
|
333
360
|
this._startedSessionIds.add(session.sessionId);
|
|
361
|
+
this._pendingStartPayloads.delete(session.sessionId);
|
|
334
362
|
// Row is confirmed — replay any events buffered while START was in flight.
|
|
335
363
|
// The pre-ack flush at the top of this method is gated off until now, so
|
|
336
364
|
// this is what actually drains the pre-ready buffer (no premature 404).
|
|
@@ -341,6 +369,42 @@ export class BackendSessionAdapter {
|
|
|
341
369
|
}
|
|
342
370
|
}
|
|
343
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Re-attempt any INGESTION_START whose POST failed (offline app launch). Runs on every
|
|
374
|
+
* flush tick of BOTH lanes — cheap no-op when the map is empty, single-flight guarded.
|
|
375
|
+
* On ack: opens the row-ready gate and drains whichever lane the id belongs to, which is
|
|
376
|
+
* exactly what un-sticks a replay that started offline once connectivity returns.
|
|
377
|
+
*/
|
|
378
|
+
_retryPendingStarts() {
|
|
379
|
+
if (this.destroyed || this._startRetryInFlight || this._pendingStartPayloads.size === 0) return;
|
|
380
|
+
const entry = this._pendingStartPayloads.entries().next().value;
|
|
381
|
+
if (!entry) return;
|
|
382
|
+
const [sessionId, payload] = entry;
|
|
383
|
+
// A stale pending start for a session that already ended AND is not the open analytics
|
|
384
|
+
// session would create a row nothing will ever finalize — drop it instead.
|
|
385
|
+
const stillRelevant = sessionId === this.currentSessionId || sessionId === this._analyticsSessionId;
|
|
386
|
+
if (!stillRelevant) {
|
|
387
|
+
this._pendingStartPayloads.delete(sessionId);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
this._startRetryInFlight = true;
|
|
391
|
+
const startEndpoint = this.config.clientKey ? ENDPOINTS.INGESTION_START : '/replay/sessions';
|
|
392
|
+
this._post(startEndpoint, payload).then(() => {
|
|
393
|
+
this._startedSessionIds.add(sessionId);
|
|
394
|
+
this._pendingStartPayloads.delete(sessionId);
|
|
395
|
+
__DEV__ && logger.info(`[ScaleBun Replay] deferred session start delivered: ${sessionId}`);
|
|
396
|
+
if (sessionId === this._analyticsSessionId) {
|
|
397
|
+
this._flushAnalyticsEvents().catch(() => {});
|
|
398
|
+
}
|
|
399
|
+
}).catch(err => {
|
|
400
|
+
if (BackendSessionAdapter._isPermanentHttpError(err)) {
|
|
401
|
+
this._pendingStartPayloads.delete(sessionId); // will never succeed — stop retrying
|
|
402
|
+
}
|
|
403
|
+
}).finally(() => {
|
|
404
|
+
this._startRetryInFlight = false;
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
344
408
|
/**
|
|
345
409
|
* Enqueue a user track() event. Buffers (bounded, drop-oldest) when the
|
|
346
410
|
* analytics session is not yet open; flushes at >=20 once it is.
|
|
@@ -488,6 +552,7 @@ export class BackendSessionAdapter {
|
|
|
488
552
|
_startAnalyticsFlushTimer() {
|
|
489
553
|
this._stopAnalyticsFlushTimer();
|
|
490
554
|
this.analyticsFlushTimer = setInterval(() => {
|
|
555
|
+
this._retryPendingStarts();
|
|
491
556
|
this._flushAnalyticsEvents().catch(() => {});
|
|
492
557
|
}, this.config.flushIntervalMs);
|
|
493
558
|
}
|
|
@@ -734,6 +799,7 @@ export class BackendSessionAdapter {
|
|
|
734
799
|
this._analyticsSessionId = null;
|
|
735
800
|
this._pendingFinalizeId = null;
|
|
736
801
|
this._startedSessionIds.clear();
|
|
802
|
+
this._pendingStartPayloads.clear();
|
|
737
803
|
}
|
|
738
804
|
|
|
739
805
|
// ─── Internal: Flush ────────────────────────────────────────────────
|
|
@@ -1360,6 +1426,7 @@ export class BackendSessionAdapter {
|
|
|
1360
1426
|
_startFlushTimer() {
|
|
1361
1427
|
this._stopFlushTimer();
|
|
1362
1428
|
this.flushTimer = setInterval(() => {
|
|
1429
|
+
this._retryPendingStarts();
|
|
1363
1430
|
this._flushFrames().catch(() => {});
|
|
1364
1431
|
this._flushEvents().catch(() => {});
|
|
1365
1432
|
this._flushNetwork().catch(() => {});
|