@multiplayer-app/session-recorder-react-native 1.0.1-beta.3 → 1.0.1-beta.4
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/LICENSE +1 -2
- package/README.md +216 -155
- package/SessionRecorderNative.podspec +9 -14
- package/android/build.gradle +21 -44
- package/android/gradle.properties +4 -4
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/SessionRecorderNativeConfig.kt +52 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/SessionRecorderNativeModule.kt +860 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/SessionRecorderNativeModuleSpec.kt +51 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/SessionRecorderNativePackage.kt +33 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/model/TargetInfo.kt +9 -0
- package/android/src/main/java/com/multiplayer/sessionrecordernative/util/ViewUtils.kt +72 -0
- package/android/src/main/java/com/xxx/XxxModule.kt +23 -0
- package/ios/SessionRecorderNative.podspec +4 -2
- package/ios/SessionRecorderNative.swift +1 -1
- package/ios/SessionRecorderNativeSpec.swift +3 -3
- package/ios/Xxx.h +5 -0
- package/ios/Xxx.mm +21 -0
- package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js +23 -0
- package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js.map +1 -0
- package/lib/module/components/ScreenRecorderView/index.js +4 -0
- package/lib/module/components/ScreenRecorderView/index.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ErrorBanner.js +64 -0
- package/lib/module/components/SessionRecorderWidget/ErrorBanner.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/FinalPopover.js +74 -0
- package/lib/module/components/SessionRecorderWidget/FinalPopover.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/FloatingButton.js +191 -0
- package/lib/module/components/SessionRecorderWidget/FloatingButton.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js +138 -0
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ModalContainer.js +177 -0
- package/lib/module/components/SessionRecorderWidget/ModalContainer.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ModalHeader.js +27 -0
- package/lib/module/components/SessionRecorderWidget/ModalHeader.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js +133 -0
- package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/icons.js +93 -0
- package/lib/module/components/SessionRecorderWidget/icons.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/index.js +5 -0
- package/lib/module/components/SessionRecorderWidget/index.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/styles.js +173 -0
- package/lib/module/components/SessionRecorderWidget/styles.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/config/constants.js +42 -0
- package/lib/module/config/constants.js.map +1 -0
- package/lib/module/config/defaults.js +81 -0
- package/lib/module/config/defaults.js.map +1 -0
- package/lib/module/config/index.js +9 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/config/masking.js +35 -0
- package/lib/module/config/masking.js.map +1 -0
- package/lib/module/config/session-recorder.js +44 -0
- package/lib/module/config/session-recorder.js.map +1 -0
- package/lib/module/config/validators.js +28 -0
- package/lib/module/config/validators.js.map +1 -0
- package/lib/module/config/widget.js +35 -0
- package/lib/module/config/widget.js.map +1 -0
- package/lib/module/context/SessionRecorderContext.js +93 -0
- package/lib/module/context/SessionRecorderContext.js.map +1 -0
- package/lib/module/context/SessionRecorderStore.js +12 -0
- package/lib/module/context/SessionRecorderStore.js.map +1 -0
- package/lib/module/context/useSessionRecorderStore.js +20 -0
- package/lib/module/context/useSessionRecorderStore.js.map +1 -0
- package/lib/module/context/useStoreSelector.js +27 -0
- package/lib/module/context/useStoreSelector.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/native/SessionRecorderNative.js +74 -0
- package/lib/module/native/SessionRecorderNative.js.map +1 -0
- package/lib/module/native/index.js +4 -0
- package/lib/module/native/index.js.map +1 -0
- package/lib/module/otel/helpers.js +218 -0
- package/lib/module/otel/helpers.js.map +1 -0
- package/lib/module/otel/index.js +95 -0
- package/lib/module/otel/index.js.map +1 -0
- package/lib/module/otel/instrumentations/index.js +102 -0
- package/lib/module/otel/instrumentations/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/patch/index.js +4 -0
- package/lib/module/patch/index.js.map +1 -0
- package/lib/module/patch/xhr.js +116 -0
- package/lib/module/patch/xhr.js.map +1 -0
- package/lib/module/recorder/eventExporter.js +130 -0
- package/lib/module/recorder/eventExporter.js.map +1 -0
- package/lib/module/recorder/gestureRecorder.js +641 -0
- package/lib/module/recorder/gestureRecorder.js.map +1 -0
- package/lib/module/recorder/index.js +168 -0
- package/lib/module/recorder/index.js.map +1 -0
- package/lib/module/recorder/navigationTracker.js +228 -0
- package/lib/module/recorder/navigationTracker.js.map +1 -0
- package/lib/module/recorder/screenRecorder.js +495 -0
- package/lib/module/recorder/screenRecorder.js.map +1 -0
- package/lib/module/services/api.service.js +149 -0
- package/lib/module/services/api.service.js.map +1 -0
- package/lib/module/services/network.service.js +178 -0
- package/lib/module/services/network.service.js.map +1 -0
- package/lib/module/services/screenMaskingService.js +107 -0
- package/lib/module/services/screenMaskingService.js.map +1 -0
- package/lib/module/services/storage.service.js +179 -0
- package/lib/module/services/storage.service.js.map +1 -0
- package/lib/module/session-recorder.js +541 -0
- package/lib/module/session-recorder.js.map +1 -0
- package/lib/module/types/configs.js +4 -0
- package/lib/module/types/configs.js.map +1 -0
- package/lib/module/types/expo-constants.d.js +2 -0
- package/lib/module/types/expo-constants.d.js.map +1 -0
- package/lib/module/types/index.js +11 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/session-recorder.js +68 -0
- package/lib/module/types/session-recorder.js.map +1 -0
- package/lib/module/types/session.js +9 -0
- package/lib/module/types/session.js.map +1 -0
- package/lib/module/utils/app-metadata.js +28 -0
- package/lib/module/utils/app-metadata.js.map +1 -0
- package/lib/module/utils/constants.optional.expo.js +6 -0
- package/lib/module/utils/constants.optional.expo.js.map +1 -0
- package/lib/module/utils/constants.optional.js +8 -0
- package/lib/module/utils/constants.optional.js.map +1 -0
- package/lib/module/utils/createStore.js +27 -0
- package/lib/module/utils/createStore.js.map +1 -0
- package/lib/module/utils/index.js +11 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/logger.js +193 -0
- package/lib/module/utils/logger.js.map +1 -0
- package/lib/module/utils/platform.js +340 -0
- package/lib/module/utils/platform.js.map +1 -0
- package/lib/module/utils/request-utils.js +58 -0
- package/lib/module/utils/request-utils.js.map +1 -0
- package/lib/module/utils/rrweb-events.js +276 -0
- package/lib/module/utils/rrweb-events.js.map +1 -0
- package/lib/module/utils/session.js +21 -0
- package/lib/module/utils/session.js.map +1 -0
- package/lib/module/utils/shallowEqual.js +17 -0
- package/lib/module/utils/shallowEqual.js.map +1 -0
- package/lib/module/utils/time.js +17 -0
- package/lib/module/utils/time.js.map +1 -0
- package/lib/module/utils/type-utils.js +69 -0
- package/lib/module/utils/type-utils.js.map +1 -0
- package/lib/module/version.js +4 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts +6 -0
- package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenRecorderView/index.d.ts +2 -0
- package/lib/typescript/src/components/ScreenRecorderView/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ErrorBanner.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ErrorBanner.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/FinalPopover.d.ts +2 -1
- package/lib/typescript/src/components/SessionRecorderWidget/FinalPopover.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/FloatingButton.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/FloatingButton.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/InitialPopover.d.ts +2 -1
- package/lib/typescript/src/components/SessionRecorderWidget/InitialPopover.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ModalContainer.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ModalContainer.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ModalHeader.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ModalHeader.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/SessionRecorderWidget.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/icons.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/icons.d.ts.map +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts +3 -0
- package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/styles.d.ts +4 -3
- package/lib/typescript/src/components/SessionRecorderWidget/styles.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/constants.d.ts +1 -0
- package/lib/typescript/src/config/constants.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/defaults.d.ts +2 -1
- package/lib/typescript/src/config/defaults.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/index.d.ts +1 -0
- package/lib/typescript/src/config/index.d.ts.map +1 -0
- package/lib/typescript/src/config/masking.d.ts +3 -0
- package/lib/typescript/src/config/masking.d.ts.map +1 -0
- package/lib/typescript/src/config/session-recorder.d.ts +3 -0
- package/lib/typescript/src/config/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/validators.d.ts +1 -0
- package/lib/typescript/src/config/validators.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/widget.d.ts +2 -1
- package/lib/typescript/src/config/widget.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/SessionRecorderContext.d.ts +3 -2
- package/lib/typescript/src/context/SessionRecorderContext.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/SessionRecorderStore.d.ts +2 -1
- package/lib/typescript/src/context/SessionRecorderStore.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/useSessionRecorderStore.d.ts +2 -1
- package/lib/typescript/src/context/useSessionRecorderStore.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/useStoreSelector.d.ts +2 -1
- package/lib/typescript/src/context/useStoreSelector.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/native/SessionRecorderNative.d.ts +21 -3
- package/lib/typescript/src/native/SessionRecorderNative.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/native/index.d.ts +1 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/helpers.d.ts +3 -2
- package/lib/typescript/src/otel/helpers.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/index.d.ts +2 -2
- package/lib/typescript/src/otel/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/instrumentations/index.d.ts +2 -1
- package/lib/typescript/src/otel/instrumentations/index.d.ts.map +1 -0
- package/lib/typescript/src/patch/index.d.ts +2 -0
- package/lib/typescript/src/patch/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/patch/xhr.d.ts +1 -0
- package/lib/typescript/src/patch/xhr.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/eventExporter.d.ts +2 -1
- package/lib/typescript/src/recorder/eventExporter.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/gestureRecorder.d.ts +3 -2
- package/lib/typescript/src/recorder/gestureRecorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/index.d.ts +3 -2
- package/lib/typescript/src/recorder/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/navigationTracker.d.ts +2 -1
- package/lib/typescript/src/recorder/navigationTracker.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/screenRecorder.d.ts +4 -4
- package/lib/typescript/src/recorder/screenRecorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/api.service.d.ts +2 -1
- package/lib/typescript/src/services/api.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/network.service.d.ts +1 -0
- package/lib/typescript/src/services/network.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/screenMaskingService.d.ts +2 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/storage.service.d.ts +2 -1
- package/lib/typescript/src/services/storage.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/session-recorder.d.ts +3 -2
- package/lib/typescript/src/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/configs.d.ts +3 -2
- package/lib/typescript/src/types/configs.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/index.d.ts +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/session-recorder.d.ts +3 -2
- package/lib/typescript/src/types/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/session.d.ts +1 -0
- package/lib/typescript/src/types/session.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/app-metadata.d.ts +1 -0
- package/lib/typescript/src/utils/app-metadata.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/constants.optional.d.ts +1 -0
- package/lib/typescript/src/utils/constants.optional.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/constants.optional.expo.d.ts +1 -0
- package/lib/typescript/src/utils/constants.optional.expo.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/createStore.d.ts +1 -0
- package/lib/typescript/src/utils/createStore.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/index.d.ts +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/logger.d.ts +1 -0
- package/lib/typescript/src/utils/logger.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/platform.d.ts +2 -1
- package/lib/typescript/src/utils/platform.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/request-utils.d.ts +1 -0
- package/lib/typescript/src/utils/request-utils.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/rrweb-events.d.ts +2 -1
- package/lib/typescript/src/utils/rrweb-events.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/session.d.ts +1 -0
- package/lib/typescript/src/utils/session.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/shallowEqual.d.ts +1 -0
- package/lib/typescript/src/utils/shallowEqual.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/time.d.ts +1 -0
- package/lib/typescript/src/utils/time.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/type-utils.d.ts +1 -0
- package/lib/typescript/src/utils/type-utils.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/version.d.ts +1 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/package.json +133 -44
- package/src/components/ScreenRecorderView/ScreenRecorderView.tsx +20 -0
- package/src/components/SessionRecorderWidget/ErrorBanner.tsx +58 -0
- package/src/components/SessionRecorderWidget/FinalPopover.tsx +96 -0
- package/src/components/SessionRecorderWidget/FloatingButton.tsx +176 -0
- package/src/components/SessionRecorderWidget/InitialPopover.tsx +167 -0
- package/src/components/SessionRecorderWidget/ModalContainer.tsx +189 -0
- package/src/components/SessionRecorderWidget/ModalHeader.tsx +24 -0
- package/src/components/SessionRecorderWidget/SessionRecorderWidget.tsx +136 -0
- package/src/components/SessionRecorderWidget/icons.tsx +52 -0
- package/{dist/components/SessionRecorderWidget/index.d.ts → src/components/SessionRecorderWidget/index.ts} +1 -0
- package/src/components/SessionRecorderWidget/styles.ts +169 -0
- package/src/components/index.ts +2 -0
- package/src/config/constants.ts +68 -0
- package/src/config/defaults.ts +101 -0
- package/src/config/index.ts +6 -0
- package/src/config/masking.ts +34 -0
- package/src/config/session-recorder.ts +59 -0
- package/src/config/validators.ts +31 -0
- package/src/config/widget.ts +38 -0
- package/src/context/SessionRecorderContext.tsx +138 -0
- package/src/context/SessionRecorderStore.ts +21 -0
- package/src/context/useSessionRecorderStore.ts +27 -0
- package/src/context/useStoreSelector.ts +34 -0
- package/src/index.ts +10 -0
- package/src/native/SessionRecorderNative.ts +164 -0
- package/src/native/index.ts +1 -0
- package/src/otel/helpers.ts +274 -0
- package/src/otel/index.ts +135 -0
- package/src/otel/instrumentations/index.ts +115 -0
- package/src/patch/index.ts +1 -0
- package/src/patch/xhr.ts +149 -0
- package/src/recorder/eventExporter.ts +155 -0
- package/src/recorder/gestureRecorder.ts +681 -0
- package/src/recorder/index.ts +190 -0
- package/src/recorder/navigationTracker.ts +245 -0
- package/src/recorder/screenRecorder.ts +549 -0
- package/src/services/api.service.ts +215 -0
- package/src/services/network.service.ts +182 -0
- package/src/services/screenMaskingService.ts +122 -0
- package/src/services/storage.service.ts +219 -0
- package/src/session-recorder.ts +591 -0
- package/src/types/configs.ts +96 -0
- package/src/types/expo-constants.d.ts +7 -0
- package/src/types/index.ts +29 -0
- package/src/types/session-recorder.ts +386 -0
- package/src/types/session.ts +65 -0
- package/src/utils/app-metadata.ts +31 -0
- package/src/utils/constants.optional.expo.ts +5 -0
- package/src/utils/constants.optional.ts +16 -0
- package/src/utils/createStore.ts +29 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/logger.ts +216 -0
- package/src/utils/platform.ts +370 -0
- package/src/utils/request-utils.ts +61 -0
- package/src/utils/rrweb-events.ts +316 -0
- package/src/utils/session.ts +19 -0
- package/src/utils/shallowEqual.ts +14 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/type-utils.ts +75 -0
- package/src/version.ts +1 -0
- package/REACT_NATIVE_SETUP.md +0 -91
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradlew +0 -249
- package/android/gradlew.bat +0 -92
- package/copy-react-native-dist.sh +0 -56
- package/dist/components/ScreenRecorderView/ScreenRecorderView.d.ts +0 -5
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js +0 -1
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js.map +0 -1
- package/dist/components/ScreenRecorderView/index.js +0 -1
- package/dist/components/ScreenRecorderView/index.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ErrorBanner.js +0 -1
- package/dist/components/SessionRecorderWidget/ErrorBanner.js.map +0 -1
- package/dist/components/SessionRecorderWidget/FinalPopover.js +0 -1
- package/dist/components/SessionRecorderWidget/FinalPopover.js.map +0 -1
- package/dist/components/SessionRecorderWidget/FloatingButton.js +0 -1
- package/dist/components/SessionRecorderWidget/FloatingButton.js.map +0 -1
- package/dist/components/SessionRecorderWidget/InitialPopover.js +0 -1
- package/dist/components/SessionRecorderWidget/InitialPopover.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ModalContainer.js +0 -1
- package/dist/components/SessionRecorderWidget/ModalContainer.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ModalHeader.js +0 -1
- package/dist/components/SessionRecorderWidget/ModalHeader.js.map +0 -1
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +0 -1
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +0 -1
- package/dist/components/SessionRecorderWidget/icons.js +0 -1
- package/dist/components/SessionRecorderWidget/icons.js.map +0 -1
- package/dist/components/SessionRecorderWidget/index.js +0 -1
- package/dist/components/SessionRecorderWidget/index.js.map +0 -1
- package/dist/components/SessionRecorderWidget/styles.js +0 -1
- package/dist/components/SessionRecorderWidget/styles.js.map +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/config/constants.js +0 -1
- package/dist/config/constants.js.map +0 -1
- package/dist/config/defaults.js +0 -1
- package/dist/config/defaults.js.map +0 -1
- package/dist/config/index.js +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/masking.d.ts +0 -2
- package/dist/config/masking.js +0 -1
- package/dist/config/masking.js.map +0 -1
- package/dist/config/session-recorder.d.ts +0 -2
- package/dist/config/session-recorder.js +0 -1
- package/dist/config/session-recorder.js.map +0 -1
- package/dist/config/validators.js +0 -1
- package/dist/config/validators.js.map +0 -1
- package/dist/config/widget.js +0 -1
- package/dist/config/widget.js.map +0 -1
- package/dist/context/SessionRecorderContext.js +0 -1
- package/dist/context/SessionRecorderContext.js.map +0 -1
- package/dist/context/SessionRecorderStore.js +0 -1
- package/dist/context/SessionRecorderStore.js.map +0 -1
- package/dist/context/useSessionRecorderStore.js +0 -1
- package/dist/context/useSessionRecorderStore.js.map +0 -1
- package/dist/context/useStoreSelector.js +0 -1
- package/dist/context/useStoreSelector.js.map +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +0 -1
- package/dist/native/GestureRecorderNative.d.ts +0 -57
- package/dist/native/GestureRecorderNative.js +0 -1
- package/dist/native/GestureRecorderNative.js.map +0 -1
- package/dist/native/GestureRecorderNativeTurboSpec.d.ts +0 -31
- package/dist/native/GestureRecorderNativeTurboSpec.js +0 -1
- package/dist/native/GestureRecorderNativeTurboSpec.js.map +0 -1
- package/dist/native/SessionRecorderNative.js +0 -1
- package/dist/native/SessionRecorderNative.js.map +0 -1
- package/dist/native/SessionRecorderNativeTurboSpec.d.ts +0 -17
- package/dist/native/SessionRecorderNativeTurboSpec.js +0 -1
- package/dist/native/SessionRecorderNativeTurboSpec.js.map +0 -1
- package/dist/native/index.js +0 -1
- package/dist/native/index.js.map +0 -1
- package/dist/otel/helpers.js +0 -1
- package/dist/otel/helpers.js.map +0 -1
- package/dist/otel/index.js +0 -1
- package/dist/otel/index.js.map +0 -1
- package/dist/otel/instrumentations/index.js +0 -1
- package/dist/otel/instrumentations/index.js.map +0 -1
- package/dist/patch/index.d.ts +0 -1
- package/dist/patch/index.js +0 -1
- package/dist/patch/index.js.map +0 -1
- package/dist/patch/xhr.js +0 -1
- package/dist/patch/xhr.js.map +0 -1
- package/dist/recorder/eventExporter.js +0 -1
- package/dist/recorder/eventExporter.js.map +0 -1
- package/dist/recorder/gestureRecorder.js +0 -1
- package/dist/recorder/gestureRecorder.js.map +0 -1
- package/dist/recorder/index.js +0 -1
- package/dist/recorder/index.js.map +0 -1
- package/dist/recorder/navigationTracker.js +0 -1
- package/dist/recorder/navigationTracker.js.map +0 -1
- package/dist/recorder/screenRecorder.js +0 -1
- package/dist/recorder/screenRecorder.js.map +0 -1
- package/dist/services/api.service.js +0 -1
- package/dist/services/api.service.js.map +0 -1
- package/dist/services/network.service.js +0 -1
- package/dist/services/network.service.js.map +0 -1
- package/dist/services/screenMaskingService.js +0 -1
- package/dist/services/screenMaskingService.js.map +0 -1
- package/dist/services/storage.service.js +0 -1
- package/dist/services/storage.service.js.map +0 -1
- package/dist/session-recorder.js +0 -1
- package/dist/session-recorder.js.map +0 -1
- package/dist/types/configs.js +0 -1
- package/dist/types/configs.js.map +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/session-recorder.js +0 -1
- package/dist/types/session-recorder.js.map +0 -1
- package/dist/types/session.js +0 -1
- package/dist/types/session.js.map +0 -1
- package/dist/utils/app-metadata.js +0 -1
- package/dist/utils/app-metadata.js.map +0 -1
- package/dist/utils/constants.optional.expo.js +0 -1
- package/dist/utils/constants.optional.expo.js.map +0 -1
- package/dist/utils/constants.optional.js +0 -1
- package/dist/utils/constants.optional.js.map +0 -1
- package/dist/utils/createStore.js +0 -1
- package/dist/utils/createStore.js.map +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/platform.js +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/request-utils.js +0 -1
- package/dist/utils/request-utils.js.map +0 -1
- package/dist/utils/rrweb-events.js +0 -1
- package/dist/utils/rrweb-events.js.map +0 -1
- package/dist/utils/session.js +0 -1
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/shallowEqual.js +0 -1
- package/dist/utils/shallowEqual.js.map +0 -1
- package/dist/utils/time.js +0 -1
- package/dist/utils/time.js.map +0 -1
- package/dist/utils/type-utils.js +0 -1
- package/dist/utils/type-utils.js.map +0 -1
- package/dist/version.js +0 -1
- package/dist/version.js.map +0 -1
- package/docs/AUTO_METADATA_DETECTION.md +0 -108
- package/react-native.config.js +0 -13
- /package/{dist/components/ScreenRecorderView/index.d.ts → src/components/ScreenRecorderView/index.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './session-recorder'
|
|
2
|
+
export * from './session'
|
|
3
|
+
export * from './configs'
|
|
4
|
+
|
|
5
|
+
// Import types for use in this file
|
|
6
|
+
import type { eventWithTime } from '@rrweb/types'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface ReactNativeScreenData {
|
|
10
|
+
width: number
|
|
11
|
+
height: number
|
|
12
|
+
base64Image: string
|
|
13
|
+
timestamp: number
|
|
14
|
+
screenName?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ReactNativeTouchData {
|
|
18
|
+
pageX: number
|
|
19
|
+
pageY: number
|
|
20
|
+
target?: string
|
|
21
|
+
pressure?: number
|
|
22
|
+
timestamp: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// Event recording interface
|
|
27
|
+
export interface EventRecorder {
|
|
28
|
+
recordEvent(event: eventWithTime): void
|
|
29
|
+
}
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { type Span } from '@opentelemetry/api';
|
|
2
|
+
import { SessionType } from '@multiplayer-app/session-recorder-common';
|
|
3
|
+
import { type PropagateTraceHeaderCorsUrls } from '@opentelemetry/sdk-trace-web';
|
|
4
|
+
import type { ISession } from './session';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// WidgetButtonPlacement moved to configs.ts
|
|
8
|
+
|
|
9
|
+
export enum SessionState {
|
|
10
|
+
started = '2',
|
|
11
|
+
paused = '1',
|
|
12
|
+
stopped = '0',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Enumeration for widget button placement positions
|
|
17
|
+
*/
|
|
18
|
+
export enum WidgetButtonPlacement {
|
|
19
|
+
topLeft = 'top-left',
|
|
20
|
+
topRight = 'top-right',
|
|
21
|
+
bottomLeft = 'bottom-left',
|
|
22
|
+
bottomRight = 'bottom-right',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Enumeration for log levels
|
|
27
|
+
*/
|
|
28
|
+
export enum LogLevel {
|
|
29
|
+
DEBUG = 0,
|
|
30
|
+
INFO = 1,
|
|
31
|
+
WARN = 2,
|
|
32
|
+
ERROR = 3
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Main configuration interface for the Session Recorder
|
|
37
|
+
* Contains all configurable options for session recording, tracing, and UI
|
|
38
|
+
*/
|
|
39
|
+
export interface SessionRecorderOptions {
|
|
40
|
+
/**
|
|
41
|
+
* The API key used to authenticate with the session debugger service.
|
|
42
|
+
*/
|
|
43
|
+
apiKey: string
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The version of the application using the session debugger.
|
|
47
|
+
*/
|
|
48
|
+
version: string
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The name of the application being debugged.
|
|
52
|
+
*/
|
|
53
|
+
application: string
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The environment where the application is running (e.g., 'production', 'staging').
|
|
57
|
+
*/
|
|
58
|
+
environment: string
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* (Optional) OTLP collector endpoint.
|
|
62
|
+
*/
|
|
63
|
+
exporterEndpoint?: string
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* (Optional) Base URL for the API calls.
|
|
67
|
+
* This allows customization of the API endpoint for sending session data.
|
|
68
|
+
*/
|
|
69
|
+
apiBaseUrl?: string
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* (Optional) An array of URLs or regular expressions that should be ignored by the session debugger.
|
|
73
|
+
* Any URL that partially matches any regex in this array will not be traced.
|
|
74
|
+
* Additionally, URLs that exactly match any string in the array will also be ignored.
|
|
75
|
+
*/
|
|
76
|
+
ignoreUrls?: Array<string | RegExp>
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* (Optional) Enables the continuous recording feature and UI.
|
|
80
|
+
* If false, the UI toggle is hidden and attempts to start a continuous
|
|
81
|
+
* session are ignored.
|
|
82
|
+
* @default true
|
|
83
|
+
*/
|
|
84
|
+
showContinuousRecording?: boolean
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Optional widget configuration
|
|
88
|
+
*/
|
|
89
|
+
widget?: {
|
|
90
|
+
/** Enables/disables the widget entirely
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
enabled?: boolean
|
|
94
|
+
/** Floating button config
|
|
95
|
+
* @default visible: true, placement: 'bottom-right'
|
|
96
|
+
*/
|
|
97
|
+
button?: {
|
|
98
|
+
visible?: boolean
|
|
99
|
+
placement?: WidgetButtonPlacement
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* (Optional) Configuration for customizable UI text and labels
|
|
104
|
+
* @default See PopoverTextConfig defaults
|
|
105
|
+
*/
|
|
106
|
+
textOverrides?: TextOverridesOptions
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* (Optional) Trace ID Ratio for sampling
|
|
111
|
+
* @default 0.15
|
|
112
|
+
*/
|
|
113
|
+
sampleTraceRatio?: number
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* (Optional) URLs or regex patterns for CORS trace header propagation
|
|
117
|
+
*/
|
|
118
|
+
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* (Optional) If true, schematizes document span payload
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
schemifyDocSpanPayload?: boolean
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* (Optional) Maximum size for capturing HTTP payload
|
|
128
|
+
* @default 100000
|
|
129
|
+
*/
|
|
130
|
+
maxCapturingHttpPayloadSize?: number
|
|
131
|
+
|
|
132
|
+
/** If true, captures body in traces
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
captureBody?: boolean
|
|
136
|
+
/** If true, captures headers in traces
|
|
137
|
+
* @default true
|
|
138
|
+
*/
|
|
139
|
+
captureHeaders?: boolean
|
|
140
|
+
/**
|
|
141
|
+
* (Optional) Configuration for masking sensitive data in session recordings
|
|
142
|
+
* @default { maskAllInputs: true, isContentMaskingEnabled: true }
|
|
143
|
+
*/
|
|
144
|
+
masking?: MaskingOptions
|
|
145
|
+
/** Whether to record gestures */
|
|
146
|
+
recordGestures?: boolean
|
|
147
|
+
/** Whether to record navigation */
|
|
148
|
+
recordNavigation?: boolean
|
|
149
|
+
/** Whether to record screen */
|
|
150
|
+
recordScreen?: boolean
|
|
151
|
+
/**
|
|
152
|
+
* (Optional) Logger configuration overrides
|
|
153
|
+
* Allows setting log level, console enabling, and prefix customizations
|
|
154
|
+
*/
|
|
155
|
+
logger?: {
|
|
156
|
+
level?: number
|
|
157
|
+
enabled?: boolean
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Interface for customizable widget text configuration
|
|
164
|
+
* Allows overriding default text labels and messages in the UI
|
|
165
|
+
*/
|
|
166
|
+
export interface TextOverridesOptions {
|
|
167
|
+
/** Title for the initial popover when continuous recording is enabled */
|
|
168
|
+
initialTitleWithContinuous?: string
|
|
169
|
+
/** Title for the initial popover when continuous recording is disabled */
|
|
170
|
+
initialTitleWithoutContinuous?: string
|
|
171
|
+
/** Description for the initial popover when continuous recording is enabled */
|
|
172
|
+
initialDescriptionWithContinuous?: string
|
|
173
|
+
/** Description for the initial popover when continuous recording is disabled */
|
|
174
|
+
initialDescriptionWithoutContinuous?: string
|
|
175
|
+
/** Label for the continuous recording toggle */
|
|
176
|
+
continuousRecordingLabel?: string
|
|
177
|
+
/** Text for the start recording button */
|
|
178
|
+
startRecordingButtonText?: string
|
|
179
|
+
/** Title for the final popover */
|
|
180
|
+
finalTitle?: string
|
|
181
|
+
/** Description for the final popover */
|
|
182
|
+
finalDescription?: string
|
|
183
|
+
/** Placeholder text for the comment textarea */
|
|
184
|
+
commentPlaceholder?: string
|
|
185
|
+
/** Text for the save button in final popover */
|
|
186
|
+
saveButtonText?: string
|
|
187
|
+
/** Text for the cancel button in final popover */
|
|
188
|
+
cancelButtonText?: string
|
|
189
|
+
/** Title for the continuous recording overlay */
|
|
190
|
+
continuousOverlayTitle?: string
|
|
191
|
+
/** Description for the continuous recording overlay */
|
|
192
|
+
continuousOverlayDescription?: string
|
|
193
|
+
/** Text for the save last snapshot button */
|
|
194
|
+
saveLastSnapshotButtonText?: string
|
|
195
|
+
/** Title for the submit session dialog */
|
|
196
|
+
submitDialogTitle?: string
|
|
197
|
+
/** Subtitle for the submit session dialog */
|
|
198
|
+
submitDialogSubtitle?: string
|
|
199
|
+
/** Label for the comment field in submit dialog */
|
|
200
|
+
submitDialogCommentLabel?: string
|
|
201
|
+
/** Placeholder for the comment field in submit dialog */
|
|
202
|
+
submitDialogCommentPlaceholder?: string
|
|
203
|
+
/** Text for the submit button in dialog */
|
|
204
|
+
submitDialogSubmitText?: string
|
|
205
|
+
/** Text for the cancel button in dialog */
|
|
206
|
+
submitDialogCancelText?: string
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Interface for masking configuration options
|
|
211
|
+
* Controls what data is masked in both traces and screen recordings
|
|
212
|
+
*/
|
|
213
|
+
export interface MaskingOptions {
|
|
214
|
+
// Span masking
|
|
215
|
+
/** If true, enables masking for debug span payload in traces */
|
|
216
|
+
isContentMaskingEnabled?: boolean
|
|
217
|
+
/** Custom function for masking body in traces */
|
|
218
|
+
maskBody?: (payload: any, span: Span) => any
|
|
219
|
+
/** Custom function for masking headers in traces */
|
|
220
|
+
maskHeaders?: (headers: any, span: any) => any
|
|
221
|
+
|
|
222
|
+
/** List of body fields to mask in traces */
|
|
223
|
+
maskBodyFieldsList?: string[]
|
|
224
|
+
/** List of headers to mask in traces */
|
|
225
|
+
maskHeadersList?: string[]
|
|
226
|
+
|
|
227
|
+
/** List of headers to include in traces (if specified, only these headers will be captured) */
|
|
228
|
+
headersToInclude?: string[]
|
|
229
|
+
/** List of headers to exclude from traces */
|
|
230
|
+
headersToExclude?: string[]
|
|
231
|
+
|
|
232
|
+
// Screen masking options
|
|
233
|
+
/** Whether to mask text inputs (UITextField, UITextView, React Native text components) */
|
|
234
|
+
maskTextInputs?: boolean
|
|
235
|
+
/** Whether to mask images (UIImageView, React Native Image components) */
|
|
236
|
+
maskImages?: boolean
|
|
237
|
+
/** Whether to mask buttons (UIButton) */
|
|
238
|
+
maskButtons?: boolean
|
|
239
|
+
/** Whether to mask labels (UILabel) */
|
|
240
|
+
maskLabels?: boolean
|
|
241
|
+
/** Whether to mask web views (WKWebView) */
|
|
242
|
+
maskWebViews?: boolean
|
|
243
|
+
/** Whether to mask sandboxed views (system views that don't belong to current process) */
|
|
244
|
+
maskSandboxedViews?: boolean
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Main interface for the Session Recorder
|
|
248
|
+
* Defines the public API for session recording functionality
|
|
249
|
+
*/
|
|
250
|
+
export interface ISessionRecorder {
|
|
251
|
+
/**
|
|
252
|
+
* The current session ID
|
|
253
|
+
*/
|
|
254
|
+
readonly sessionId: string | null
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Whether continuous recording is enabled
|
|
258
|
+
*/
|
|
259
|
+
readonly continuousRecording: boolean
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The current debug session object
|
|
263
|
+
*/
|
|
264
|
+
readonly session: ISession | null
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The type of session (plain or continuous)
|
|
268
|
+
*/
|
|
269
|
+
readonly sessionType: SessionType
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The current state of the session
|
|
273
|
+
*/
|
|
274
|
+
readonly sessionState: SessionState | null
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Session attributes for additional context
|
|
279
|
+
*/
|
|
280
|
+
readonly sessionAttributes: Record<string, any>
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Current error message
|
|
284
|
+
*/
|
|
285
|
+
error: string
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* The HTML button element for the session widget's recorder button
|
|
289
|
+
*/
|
|
290
|
+
readonly sessionWidgetButtonElement: HTMLButtonElement
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Initialize the session debugger with custom configurations
|
|
294
|
+
* @param configs - custom configurations for session debugger
|
|
295
|
+
*/
|
|
296
|
+
init(configs: SessionRecorderOptions): void
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Save the continuous recording session
|
|
300
|
+
* @returns Promise that resolves to the save response
|
|
301
|
+
*/
|
|
302
|
+
save(): Promise<any>
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Start a new session
|
|
306
|
+
* @param type - the type of session to start
|
|
307
|
+
* @param session - optional existing session to start
|
|
308
|
+
*/
|
|
309
|
+
start(type?: SessionType, session?: ISession): void
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Stop the current session with an optional comment
|
|
313
|
+
* @param comment - user-provided comment to include in session feedback metadata
|
|
314
|
+
*/
|
|
315
|
+
stop(comment?: string): Promise<void>
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Cancel the current session
|
|
319
|
+
*/
|
|
320
|
+
cancel(): Promise<void>
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Pause the current session
|
|
324
|
+
*/
|
|
325
|
+
pause(): Promise<void>
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Resume the current session
|
|
329
|
+
*/
|
|
330
|
+
resume(): Promise<void>
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Set the session metadata
|
|
334
|
+
* @param attributes - the attributes to set
|
|
335
|
+
*/
|
|
336
|
+
setSessionAttributes(attributes: Record<string, any>): void
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Interface representing screen capture events
|
|
343
|
+
* Contains metadata about screen recordings
|
|
344
|
+
*/
|
|
345
|
+
export interface ScreenEvent {
|
|
346
|
+
screenName: string
|
|
347
|
+
timestamp: number
|
|
348
|
+
params?: Record<string, any>
|
|
349
|
+
type?: string
|
|
350
|
+
metadata?: Record<string, any>
|
|
351
|
+
dataUrl?: string
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Interface representing gesture/touch events
|
|
356
|
+
* Contains information about user interactions with the screen
|
|
357
|
+
*/
|
|
358
|
+
export interface GestureEvent {
|
|
359
|
+
type: string
|
|
360
|
+
timestamp: number
|
|
361
|
+
x?: number
|
|
362
|
+
y?: number
|
|
363
|
+
direction?: string
|
|
364
|
+
target?: string
|
|
365
|
+
coordinates?: { x: number; y: number }
|
|
366
|
+
targetInfo?: {
|
|
367
|
+
identifier: string
|
|
368
|
+
label?: string
|
|
369
|
+
role?: string
|
|
370
|
+
testId?: string
|
|
371
|
+
text?: string
|
|
372
|
+
}
|
|
373
|
+
metadata?: Record<string, any>
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Interface representing navigation events
|
|
378
|
+
* Contains information about screen/route changes
|
|
379
|
+
*/
|
|
380
|
+
export interface NavigationEvent {
|
|
381
|
+
type: string
|
|
382
|
+
timestamp: number
|
|
383
|
+
routeName?: string
|
|
384
|
+
params?: Record<string, any>
|
|
385
|
+
metadata?: Record<string, any>
|
|
386
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SessionType } from '@multiplayer-app/session-recorder-common'
|
|
2
|
+
|
|
3
|
+
export interface IResourceAttributes {
|
|
4
|
+
browserInfo?: string,
|
|
5
|
+
cookiesEnabled?: string,
|
|
6
|
+
deviceInfo?: string,
|
|
7
|
+
hardwareConcurrency?: number,
|
|
8
|
+
osInfo?: string,
|
|
9
|
+
pixelRatio?: number,
|
|
10
|
+
screenSize?: string,
|
|
11
|
+
packageVersion?: string,
|
|
12
|
+
[key: string]: any
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ISessionAttributes {
|
|
16
|
+
userEmail?: string
|
|
17
|
+
userId?: string,
|
|
18
|
+
userName?: string,
|
|
19
|
+
accountId?: string,
|
|
20
|
+
accountName?: string,
|
|
21
|
+
[key: string]: any
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ISessionView {
|
|
25
|
+
_id: string
|
|
26
|
+
name: string
|
|
27
|
+
components?: string[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ISession {
|
|
31
|
+
_id: string
|
|
32
|
+
shortId: string
|
|
33
|
+
workspace: string
|
|
34
|
+
project: string
|
|
35
|
+
continuousDebugSession?: string
|
|
36
|
+
creationType: SessionType
|
|
37
|
+
name: string
|
|
38
|
+
startedAt: string | Date
|
|
39
|
+
stoppedAt: string | Date
|
|
40
|
+
durationInSeconds?: number
|
|
41
|
+
createdAt: string | Date
|
|
42
|
+
updatedAt: string | Date
|
|
43
|
+
tags: any[]
|
|
44
|
+
|
|
45
|
+
resourceAttributes?: IResourceAttributes
|
|
46
|
+
sessionAttributes?: ISessionAttributes
|
|
47
|
+
views: ISessionView[]
|
|
48
|
+
starred: boolean
|
|
49
|
+
starredItems: string[]
|
|
50
|
+
s3Files: {
|
|
51
|
+
_id?: string
|
|
52
|
+
bucket: string
|
|
53
|
+
key: string
|
|
54
|
+
dataType: DebugSessionDataType
|
|
55
|
+
url?: string
|
|
56
|
+
}[]
|
|
57
|
+
finishedS3Transfer?: boolean
|
|
58
|
+
tempApiKey?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum DebugSessionDataType {
|
|
62
|
+
OTLP_TRACES = 'OTLP_TRACES',
|
|
63
|
+
OTLP_LOGS = 'OTLP_LOGS',
|
|
64
|
+
RRWEB_EVENTS = 'RRWEB_EVENTS',
|
|
65
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated app metadata
|
|
3
|
+
* This file is generated at build time to provide app metadata without developer intervention
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// This file is automatically generated by the build process
|
|
7
|
+
// It extracts metadata from app.json, app.config.js, or package.json
|
|
8
|
+
|
|
9
|
+
export interface AppMetadata {
|
|
10
|
+
name?: string
|
|
11
|
+
version?: string
|
|
12
|
+
bundleId?: string
|
|
13
|
+
buildNumber?: string
|
|
14
|
+
displayName?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Auto-detected values from project configuration files
|
|
18
|
+
export const APP_METADATA: AppMetadata = {
|
|
19
|
+
name: "@multiplayer-app/session-recorder-react-native",
|
|
20
|
+
version: "0.0.1",
|
|
21
|
+
bundleId: undefined,
|
|
22
|
+
buildNumber: undefined,
|
|
23
|
+
displayName: undefined,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get auto-detected app metadata
|
|
28
|
+
*/
|
|
29
|
+
export function getAutoDetectedAppMetadata(): AppMetadata {
|
|
30
|
+
return { ...APP_METADATA }
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Non-Expo fallback: export undefined to avoid bundling expo-constants in non-Expo apps
|
|
2
|
+
// Define a lightweight type that includes only the members we read.
|
|
3
|
+
export type OptionalExpoConstants = {
|
|
4
|
+
expoVersion?: string
|
|
5
|
+
platform?: { ios?: unknown; android?: unknown }
|
|
6
|
+
expoConfig?: {
|
|
7
|
+
name?: string
|
|
8
|
+
version?: string
|
|
9
|
+
ios?: { buildNumber?: string | number; bundleIdentifier?: string }
|
|
10
|
+
android?: { versionCode?: string | number; package?: string }
|
|
11
|
+
}
|
|
12
|
+
} | undefined
|
|
13
|
+
|
|
14
|
+
const OptionalConstants: OptionalExpoConstants = undefined
|
|
15
|
+
|
|
16
|
+
export default OptionalConstants
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type Listener<T> = (state: T, prevState: T) => void
|
|
2
|
+
|
|
3
|
+
export type Store<T> = {
|
|
4
|
+
getState: () => T
|
|
5
|
+
setState: (partial: Partial<T> | ((prev: T) => T), action?: string) => void
|
|
6
|
+
subscribe: (listener: Listener<T>) => () => void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function createStore<T extends object>(initialState: T): Store<T> {
|
|
10
|
+
let state: T = initialState
|
|
11
|
+
const listeners = new Set<Listener<T>>()
|
|
12
|
+
|
|
13
|
+
const getState = () => state
|
|
14
|
+
|
|
15
|
+
const setState: Store<T>["setState"] = (partial) => {
|
|
16
|
+
const prevState = state
|
|
17
|
+
const nextState = typeof partial === 'function' ? (partial as (prev: T) => T)(prevState) : { ...prevState, ...partial } as T
|
|
18
|
+
if (Object.is(nextState, prevState)) return
|
|
19
|
+
state = nextState
|
|
20
|
+
listeners.forEach((l) => l(state, prevState))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const subscribe: Store<T>["subscribe"] = (listener) => {
|
|
24
|
+
listeners.add(listener)
|
|
25
|
+
return () => listeners.delete(listener)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return { getState, setState, subscribe }
|
|
29
|
+
}
|