@multiplayer-app/session-recorder-react-native 0.0.1 → 1.0.0-beta.1
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/README.md +708 -83
- package/SessionRecorderNative.podspec +26 -0
- package/android/build.gradle +34 -0
- package/copy-react-native-dist.sh +34 -16
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js +1 -1
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js.map +1 -1
- package/dist/components/SessionRecorderWidget/ErrorBanner.d.ts +7 -0
- package/dist/components/SessionRecorderWidget/ErrorBanner.js +1 -0
- package/dist/components/SessionRecorderWidget/ErrorBanner.js.map +1 -0
- package/dist/components/SessionRecorderWidget/FinalPopover.d.ts +12 -0
- package/dist/components/SessionRecorderWidget/FinalPopover.js +1 -0
- package/dist/components/SessionRecorderWidget/FinalPopover.js.map +1 -0
- package/dist/components/SessionRecorderWidget/FloatingButton.d.ts +8 -0
- package/dist/components/SessionRecorderWidget/FloatingButton.js +1 -0
- package/dist/components/SessionRecorderWidget/FloatingButton.js.map +1 -0
- package/dist/components/SessionRecorderWidget/InitialPopover.d.ts +16 -0
- package/dist/components/SessionRecorderWidget/InitialPopover.js +1 -0
- package/dist/components/SessionRecorderWidget/InitialPopover.js.map +1 -0
- package/dist/components/SessionRecorderWidget/ModalContainer.d.ts +8 -0
- package/dist/components/SessionRecorderWidget/ModalContainer.js +1 -0
- package/dist/components/SessionRecorderWidget/ModalContainer.js.map +1 -0
- package/dist/components/SessionRecorderWidget/ModalHeader.d.ts +6 -0
- package/dist/components/SessionRecorderWidget/ModalHeader.js +1 -0
- package/dist/components/SessionRecorderWidget/ModalHeader.js.map +1 -0
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +5 -0
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +1 -0
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -0
- package/dist/components/SessionRecorderWidget/icons.d.ts +11 -0
- package/dist/components/SessionRecorderWidget/icons.js +1 -0
- package/dist/components/SessionRecorderWidget/icons.js.map +1 -0
- package/dist/components/SessionRecorderWidget/index.d.ts +2 -0
- package/dist/components/SessionRecorderWidget/index.js +1 -0
- package/dist/components/SessionRecorderWidget/index.js.map +1 -0
- package/dist/components/SessionRecorderWidget/styles.d.ts +165 -0
- package/dist/components/SessionRecorderWidget/styles.js +1 -0
- package/dist/components/SessionRecorderWidget/styles.js.map +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/config/constants.js +1 -1
- package/dist/config/constants.js.map +1 -1
- package/dist/config/defaults.d.ts +4 -4
- package/dist/config/defaults.js +1 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/masking.d.ts +2 -2
- package/dist/config/masking.js +1 -1
- package/dist/config/masking.js.map +1 -1
- package/dist/config/session-recorder.js +1 -1
- package/dist/config/session-recorder.js.map +1 -1
- package/dist/config/validators.d.ts +1 -1
- package/dist/config/validators.js +1 -1
- package/dist/config/validators.js.map +1 -1
- package/dist/config/widget.d.ts +9 -0
- package/dist/config/widget.js +1 -0
- package/dist/config/widget.js.map +1 -0
- package/dist/context/SessionRecorderContext.d.ts +12 -3
- package/dist/context/SessionRecorderContext.js +1 -1
- package/dist/context/SessionRecorderContext.js.map +1 -1
- package/dist/context/SessionRecorderStore.d.ts +12 -0
- package/dist/context/SessionRecorderStore.js +1 -0
- package/dist/context/SessionRecorderStore.js.map +1 -0
- package/dist/context/useSessionRecorderStore.d.ts +8 -0
- package/dist/context/useSessionRecorderStore.js +1 -0
- package/dist/context/useSessionRecorderStore.js.map +1 -0
- package/dist/context/useStoreSelector.d.ts +4 -0
- package/dist/context/useStoreSelector.js +1 -0
- package/dist/context/useStoreSelector.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/native/GestureRecorderNative.d.ts +57 -0
- package/dist/native/GestureRecorderNative.js +1 -0
- package/dist/native/GestureRecorderNative.js.map +1 -0
- package/dist/native/SessionRecorderNative.d.ts +33 -0
- package/dist/native/SessionRecorderNative.js +1 -0
- package/dist/native/SessionRecorderNative.js.map +1 -0
- package/dist/native/index.d.ts +2 -0
- package/dist/native/index.js +1 -0
- package/dist/native/index.js.map +1 -0
- package/dist/otel/index.js +1 -1
- package/dist/otel/index.js.map +1 -1
- package/dist/patch/xhr.js +1 -1
- package/dist/patch/xhr.js.map +1 -1
- package/dist/recorder/eventExporter.d.ts +4 -1
- package/dist/recorder/eventExporter.js +1 -1
- package/dist/recorder/eventExporter.js.map +1 -1
- package/dist/recorder/gestureRecorder.d.ts +28 -62
- package/dist/recorder/gestureRecorder.js +1 -1
- package/dist/recorder/gestureRecorder.js.map +1 -1
- package/dist/recorder/index.d.ts +2 -0
- package/dist/recorder/index.js +1 -1
- package/dist/recorder/index.js.map +1 -1
- package/dist/recorder/navigationTracker.d.ts +4 -19
- package/dist/recorder/navigationTracker.js +1 -1
- package/dist/recorder/navigationTracker.js.map +1 -1
- package/dist/recorder/screenRecorder.d.ts +11 -5
- package/dist/recorder/screenRecorder.js +1 -1
- package/dist/recorder/screenRecorder.js.map +1 -1
- package/dist/services/api.service.d.ts +12 -3
- package/dist/services/api.service.js +1 -1
- package/dist/services/api.service.js.map +1 -1
- package/dist/services/network.service.d.ts +46 -0
- package/dist/services/network.service.js +1 -0
- package/dist/services/network.service.js.map +1 -0
- package/dist/services/screenMaskingService.d.ts +47 -0
- package/dist/services/screenMaskingService.js +1 -0
- package/dist/services/screenMaskingService.js.map +1 -0
- package/dist/services/storage.service.d.ts +18 -2
- package/dist/services/storage.service.js +1 -1
- package/dist/services/storage.service.js.map +1 -1
- package/dist/session-recorder.d.ts +18 -33
- package/dist/session-recorder.js +1 -1
- package/dist/session-recorder.js.map +1 -1
- package/dist/types/configs.d.ts +85 -0
- package/dist/types/configs.js +1 -0
- package/dist/types/configs.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/session-recorder.d.ts +105 -132
- package/dist/types/session-recorder.js +1 -1
- package/dist/types/session-recorder.js.map +1 -1
- package/dist/utils/constants.optional.d.ts +21 -0
- package/dist/utils/constants.optional.expo.d.ts +3 -0
- package/dist/utils/constants.optional.expo.js +1 -0
- package/dist/utils/constants.optional.expo.js.map +1 -0
- package/dist/utils/constants.optional.js +1 -0
- package/dist/utils/constants.optional.js.map +1 -0
- package/dist/utils/createStore.d.ts +8 -0
- package/dist/utils/createStore.js +1 -0
- package/dist/utils/createStore.js.map +1 -0
- package/dist/utils/logger.d.ts +2 -7
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/platform.d.ts +11 -0
- package/dist/utils/platform.js +1 -1
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/rrweb-events.d.ts +4 -3
- package/dist/utils/rrweb-events.js +1 -1
- package/dist/utils/rrweb-events.js.map +1 -1
- package/dist/utils/session.d.ts +2 -1
- package/dist/utils/session.js +1 -1
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/shallowEqual.d.ts +1 -0
- package/dist/utils/shallowEqual.js +1 -0
- package/dist/utils/shallowEqual.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/ios/GestureRecorderNative.m +21 -0
- package/ios/GestureRecorderNative.swift +316 -0
- package/ios/SessionRecorderNative.m +17 -0
- package/ios/SessionRecorderNative.podspec +26 -0
- package/ios/SessionRecorderNative.swift +599 -0
- package/package.json +15 -16
- package/react-native.config.js +12 -0
- package/RRWEB_INTEGRATION.md +0 -336
- package/VIEWSHOT_INTEGRATION_TEST.md +0 -123
- package/babel.config.js +0 -13
- package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.d.ts +0 -6
- package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js +0 -1
- package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js.map +0 -1
- package/dist/components/GestureCaptureWrapper/index.d.ts +0 -1
- package/dist/components/GestureCaptureWrapper/index.js +0 -1
- package/dist/components/GestureCaptureWrapper/index.js.map +0 -1
- package/dist/components/GestureCaptureWrapper.d.ts +0 -6
- package/dist/components/GestureCaptureWrapper.js +0 -1
- package/dist/components/GestureCaptureWrapper.js.map +0 -1
- package/dist/expo.d.ts +0 -7
- package/dist/expo.js +0 -1
- package/dist/expo.js.map +0 -1
- package/dist/otel/instrumentations/gestureInstrumentation.d.ts +0 -15
- package/dist/otel/instrumentations/gestureInstrumentation.js +0 -1
- package/dist/otel/instrumentations/gestureInstrumentation.js.map +0 -1
- package/dist/otel/instrumentations/reactNativeInstrumentation.d.ts +0 -8
- package/dist/otel/instrumentations/reactNativeInstrumentation.js +0 -1
- package/dist/otel/instrumentations/reactNativeInstrumentation.js.map +0 -1
- package/dist/otel/instrumentations/reactNavigationInstrumentation.d.ts +0 -13
- package/dist/otel/instrumentations/reactNavigationInstrumentation.js +0 -1
- package/dist/otel/instrumentations/reactNavigationInstrumentation.js.map +0 -1
- package/dist/recorder/gestureHandlerRecorder.d.ts +0 -19
- package/dist/recorder/gestureHandlerRecorder.js +0 -1
- package/dist/recorder/gestureHandlerRecorder.js.map +0 -1
- package/dist/types/rrweb.d.ts +0 -118
- package/dist/types/rrweb.js +0 -1
- package/dist/types/rrweb.js.map +0 -1
- package/scripts/generate-app-metadata.js +0 -173
- package/src/components/GestureCaptureWrapper/GestureCaptureWrapper.tsx +0 -86
- package/src/components/GestureCaptureWrapper/index.ts +0 -1
- package/src/components/ScreenRecorderView/ScreenRecorderView.tsx +0 -72
- package/src/components/ScreenRecorderView/index.ts +0 -1
- package/src/components/index.ts +0 -1
- package/src/config/constants.ts +0 -60
- package/src/config/defaults.ts +0 -82
- package/src/config/index.ts +0 -6
- package/src/config/masking.ts +0 -27
- package/src/config/session-recorder.ts +0 -55
- package/src/config/validators.ts +0 -31
- package/src/context/SessionRecorderContext.tsx +0 -75
- package/src/expo.ts +0 -11
- package/src/index.ts +0 -17
- package/src/otel/helpers.ts +0 -275
- package/src/otel/index.ts +0 -138
- package/src/otel/instrumentations/index.ts +0 -115
- package/src/patch/index.ts +0 -1
- package/src/patch/xhr.ts +0 -142
- package/src/recorder/eventExporter.ts +0 -141
- package/src/recorder/gestureRecorder.ts +0 -498
- package/src/recorder/index.ts +0 -179
- package/src/recorder/navigationTracker.ts +0 -449
- package/src/recorder/screenRecorder.ts +0 -498
- package/src/services/api.service.ts +0 -203
- package/src/services/storage.service.ts +0 -158
- package/src/session-recorder.ts +0 -600
- package/src/types/expo.d.ts +0 -23
- package/src/types/index.ts +0 -28
- package/src/types/session-recorder.ts +0 -423
- package/src/types/session.ts +0 -65
- package/src/utils/app-metadata.ts +0 -31
- package/src/utils/index.ts +0 -8
- package/src/utils/logger.ts +0 -225
- package/src/utils/platform.ts +0 -384
- package/src/utils/request-utils.ts +0 -61
- package/src/utils/rrweb-events.ts +0 -309
- package/src/utils/session.ts +0 -18
- package/src/utils/time.ts +0 -17
- package/src/utils/type-utils.ts +0 -75
- package/src/version.ts +0 -1
- package/tsconfig.json +0 -24
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { SessionState } from '../types';
|
|
3
|
-
export interface GestureHandlerRecorderProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
sessionState: SessionState | null;
|
|
6
|
-
onGestureRecord: (gestureType: string, data: any) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare class GestureHandlerRecorder {
|
|
9
|
-
private gestureInstrumentation;
|
|
10
|
-
private onGestureRecord?;
|
|
11
|
-
constructor();
|
|
12
|
-
setGestureCallback(callback: (gestureType: string, data: any) => void): void;
|
|
13
|
-
createTapGesture(): import("react-native-gesture-handler/lib/typescript/handlers/gestures/tapGesture").TapGesture;
|
|
14
|
-
createPanGesture(): import("react-native-gesture-handler/lib/typescript/handlers/gestures/panGesture").PanGesture;
|
|
15
|
-
createPinchGesture(): import("react-native-gesture-handler/lib/typescript/handlers/gestures/pinchGesture").PinchGesture;
|
|
16
|
-
createLongPressGesture(): import("react-native-gesture-handler/lib/typescript/handlers/gestures/longPressGesture").LongPressGesture;
|
|
17
|
-
private recordGesture;
|
|
18
|
-
createGestureDetector(children: ReactNode, sessionState: SessionState | null): ReactNode;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.GestureHandlerRecorder=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _reactNativeGestureHandler=require("react-native-gesture-handler");var _types=require("../types");var _gestureInstrumentation=require("../otel/instrumentations/gestureInstrumentation");var GestureHandlerRecorder=exports.GestureHandlerRecorder=function(){function GestureHandlerRecorder(){(0,_classCallCheck2["default"])(this,GestureHandlerRecorder);this.gestureInstrumentation=new _gestureInstrumentation.GestureInstrumentation();this.gestureInstrumentation.enable();}return(0,_createClass2["default"])(GestureHandlerRecorder,[{key:"setGestureCallback",value:function setGestureCallback(callback){this.onGestureRecord=callback;}},{key:"createTapGesture",value:function createTapGesture(){var _this=this;return _reactNativeGestureHandler.Gesture.Tap().onStart(function(event){_this.recordGesture('tap',{x:event.x,y:event.y,timestamp:Date.now()});});}},{key:"createPanGesture",value:function createPanGesture(){var _this2=this;return _reactNativeGestureHandler.Gesture.Pan().onStart(function(event){_this2.recordGesture('pan_start',{x:event.x,y:event.y,timestamp:Date.now()});}).onUpdate(function(event){_this2.recordGesture('pan_update',{x:event.x,y:event.y,translationX:event.translationX,translationY:event.translationY,velocityX:event.velocityX,velocityY:event.velocityY,timestamp:Date.now()});}).onEnd(function(event){_this2.recordGesture('pan_end',{x:event.x,y:event.y,translationX:event.translationX,translationY:event.translationY,velocityX:event.velocityX,velocityY:event.velocityY,timestamp:Date.now()});});}},{key:"createPinchGesture",value:function createPinchGesture(){var _this3=this;return _reactNativeGestureHandler.Gesture.Pinch().onStart(function(event){_this3.recordGesture('pinch_start',{scale:event.scale,focalX:event.focalX,focalY:event.focalY,timestamp:Date.now()});}).onUpdate(function(event){_this3.recordGesture('pinch_update',{scale:event.scale,focalX:event.focalX,focalY:event.focalY,timestamp:Date.now()});}).onEnd(function(event){_this3.recordGesture('pinch_end',{scale:event.scale,focalX:event.focalX,focalY:event.focalY,timestamp:Date.now()});});}},{key:"createLongPressGesture",value:function createLongPressGesture(){var _this4=this;return _reactNativeGestureHandler.Gesture.LongPress().minDuration(500).onStart(function(event){_this4.recordGesture('long_press',{x:event.x,y:event.y,duration:500,timestamp:Date.now()});});}},{key:"recordGesture",value:function recordGesture(gestureType,data){switch(gestureType){case'tap':this.gestureInstrumentation.recordTap(data.x,data.y);break;case'pan_start':case'pan_update':case'pan_end':this.gestureInstrumentation.recordPan(data.translationX||0,data.translationY||0);break;case'pinch_start':case'pinch_update':case'pinch_end':this.gestureInstrumentation.recordPinch(data.scale,undefined);break;case'long_press':this.gestureInstrumentation.recordLongPress(data.duration,undefined);break;}if(this.onGestureRecord){this.onGestureRecord(gestureType,data);}}},{key:"createGestureDetector",value:function createGestureDetector(children,sessionState){if(sessionState!==_types.SessionState.started){return children;}var tapGesture=this.createTapGesture();var panGesture=this.createPanGesture();var pinchGesture=this.createPinchGesture();var longPressGesture=this.createLongPressGesture();return children;}}]);}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gestureHandlerRecorder.js","sourceRoot":"","sources":["../../src/recorder/gestureHandlerRecorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAA;AAQxF,MAAM,OAAO,sBAAsB;I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AAW,EAAE,IAAI,CAAC,CAAA;QACzC,CAAC;IACH,CAAC;IAED,sCAAsC;IACtC,qBAAqB,CAAC,QAAmB,EAAE,YAAiC;QAC1E,IAAI,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1C,OAAO,QAAQ,CAAA;QACjB,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC1C,MAAM,YAAY,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAC9C,MAAM,gBAAgB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAA;QAEtD,sEAAsE;QACtE,6EAA6E;QAC7E,0EAA0E;QAC1E,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF"}
|
package/dist/types/rrweb.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RRWeb event types for React Native session recording
|
|
3
|
-
* Based on rrweb specification: https://github.com/rrweb-io/rrweb
|
|
4
|
-
*/
|
|
5
|
-
export declare enum EventType {
|
|
6
|
-
DomContentLoaded = 0,
|
|
7
|
-
Load = 1,
|
|
8
|
-
FullSnapshot = 2,
|
|
9
|
-
IncrementalSnapshot = 3,
|
|
10
|
-
Meta = 4,
|
|
11
|
-
Custom = 5,
|
|
12
|
-
Plugin = 6
|
|
13
|
-
}
|
|
14
|
-
export declare enum IncrementalSource {
|
|
15
|
-
Mutation = 0,
|
|
16
|
-
MouseMove = 1,
|
|
17
|
-
MouseInteraction = 2,
|
|
18
|
-
Scroll = 3,
|
|
19
|
-
ViewportResize = 4,
|
|
20
|
-
Input = 5,
|
|
21
|
-
TouchMove = 6,
|
|
22
|
-
MediaInteraction = 7,
|
|
23
|
-
StyleSheetRule = 8,
|
|
24
|
-
CanvasMutation = 9,
|
|
25
|
-
Font = 10,
|
|
26
|
-
Selection = 11,
|
|
27
|
-
AdoptedStyleSheet = 12
|
|
28
|
-
}
|
|
29
|
-
export declare enum MouseInteractionType {
|
|
30
|
-
MouseUp = 0,
|
|
31
|
-
MouseDown = 1,
|
|
32
|
-
Click = 2,
|
|
33
|
-
ContextMenu = 3,
|
|
34
|
-
DblClick = 4,
|
|
35
|
-
Focus = 5,
|
|
36
|
-
Blur = 6,
|
|
37
|
-
TouchStart = 7,
|
|
38
|
-
TouchMove = 8,
|
|
39
|
-
TouchEnd = 9,
|
|
40
|
-
TouchCancel = 10
|
|
41
|
-
}
|
|
42
|
-
export interface MouseInteractionData {
|
|
43
|
-
type: MouseInteractionType;
|
|
44
|
-
id: number;
|
|
45
|
-
x: number;
|
|
46
|
-
y: number;
|
|
47
|
-
}
|
|
48
|
-
export interface TouchInteractionData {
|
|
49
|
-
type: MouseInteractionType;
|
|
50
|
-
id: number;
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
pressure?: number;
|
|
54
|
-
target?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface FullSnapshotEvent {
|
|
57
|
-
type: EventType.FullSnapshot;
|
|
58
|
-
data: {
|
|
59
|
-
node: SerializedNodeWithId;
|
|
60
|
-
initialOffset: {
|
|
61
|
-
left: number;
|
|
62
|
-
top: number;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
timestamp: number;
|
|
66
|
-
}
|
|
67
|
-
export interface IncrementalSnapshotEvent {
|
|
68
|
-
type: EventType.IncrementalSnapshot;
|
|
69
|
-
data: {
|
|
70
|
-
source: IncrementalSource;
|
|
71
|
-
id?: number;
|
|
72
|
-
x?: number;
|
|
73
|
-
y?: number;
|
|
74
|
-
type?: MouseInteractionType;
|
|
75
|
-
} & Partial<MouseInteractionData> & Partial<TouchInteractionData>;
|
|
76
|
-
timestamp: number;
|
|
77
|
-
}
|
|
78
|
-
export interface SerializedNodeWithId {
|
|
79
|
-
type: number;
|
|
80
|
-
id: number;
|
|
81
|
-
tagName?: string;
|
|
82
|
-
attributes?: Record<string, string>;
|
|
83
|
-
childNodes?: SerializedNodeWithId[];
|
|
84
|
-
textContent?: string;
|
|
85
|
-
style?: Record<string, string>;
|
|
86
|
-
}
|
|
87
|
-
export interface MetaEvent {
|
|
88
|
-
type: EventType.Meta;
|
|
89
|
-
data: {
|
|
90
|
-
href?: string;
|
|
91
|
-
width?: number;
|
|
92
|
-
height?: number;
|
|
93
|
-
[key: string]: any;
|
|
94
|
-
};
|
|
95
|
-
timestamp: number;
|
|
96
|
-
}
|
|
97
|
-
export interface RRWebEvent {
|
|
98
|
-
type: EventType;
|
|
99
|
-
data: any;
|
|
100
|
-
timestamp: number;
|
|
101
|
-
}
|
|
102
|
-
export interface ReactNativeScreenData {
|
|
103
|
-
width: number;
|
|
104
|
-
height: number;
|
|
105
|
-
base64Image: string;
|
|
106
|
-
timestamp: number;
|
|
107
|
-
screenName?: string;
|
|
108
|
-
}
|
|
109
|
-
export interface ReactNativeTouchData {
|
|
110
|
-
pageX: number;
|
|
111
|
-
pageY: number;
|
|
112
|
-
target?: string;
|
|
113
|
-
pressure?: number;
|
|
114
|
-
timestamp: number;
|
|
115
|
-
}
|
|
116
|
-
export interface EventRecorder {
|
|
117
|
-
recordEvent(event: RRWebEvent): void;
|
|
118
|
-
}
|
package/dist/types/rrweb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MouseInteractionType=exports.IncrementalSource=exports.EventType=void 0;var EventType;(function(EventType){EventType[EventType["DomContentLoaded"]=0]="DomContentLoaded";EventType[EventType["Load"]=1]="Load";EventType[EventType["FullSnapshot"]=2]="FullSnapshot";EventType[EventType["IncrementalSnapshot"]=3]="IncrementalSnapshot";EventType[EventType["Meta"]=4]="Meta";EventType[EventType["Custom"]=5]="Custom";EventType[EventType["Plugin"]=6]="Plugin";})(EventType||(exports.EventType=EventType={}));var IncrementalSource;(function(IncrementalSource){IncrementalSource[IncrementalSource["Mutation"]=0]="Mutation";IncrementalSource[IncrementalSource["MouseMove"]=1]="MouseMove";IncrementalSource[IncrementalSource["MouseInteraction"]=2]="MouseInteraction";IncrementalSource[IncrementalSource["Scroll"]=3]="Scroll";IncrementalSource[IncrementalSource["ViewportResize"]=4]="ViewportResize";IncrementalSource[IncrementalSource["Input"]=5]="Input";IncrementalSource[IncrementalSource["TouchMove"]=6]="TouchMove";IncrementalSource[IncrementalSource["MediaInteraction"]=7]="MediaInteraction";IncrementalSource[IncrementalSource["StyleSheetRule"]=8]="StyleSheetRule";IncrementalSource[IncrementalSource["CanvasMutation"]=9]="CanvasMutation";IncrementalSource[IncrementalSource["Font"]=10]="Font";IncrementalSource[IncrementalSource["Selection"]=11]="Selection";IncrementalSource[IncrementalSource["AdoptedStyleSheet"]=12]="AdoptedStyleSheet";})(IncrementalSource||(exports.IncrementalSource=IncrementalSource={}));var MouseInteractionType;(function(MouseInteractionType){MouseInteractionType[MouseInteractionType["MouseUp"]=0]="MouseUp";MouseInteractionType[MouseInteractionType["MouseDown"]=1]="MouseDown";MouseInteractionType[MouseInteractionType["Click"]=2]="Click";MouseInteractionType[MouseInteractionType["ContextMenu"]=3]="ContextMenu";MouseInteractionType[MouseInteractionType["DblClick"]=4]="DblClick";MouseInteractionType[MouseInteractionType["Focus"]=5]="Focus";MouseInteractionType[MouseInteractionType["Blur"]=6]="Blur";MouseInteractionType[MouseInteractionType["TouchStart"]=7]="TouchStart";MouseInteractionType[MouseInteractionType["TouchMove"]=8]="TouchMove";MouseInteractionType[MouseInteractionType["TouchEnd"]=9]="TouchEnd";MouseInteractionType[MouseInteractionType["TouchCancel"]=10]="TouchCancel";})(MouseInteractionType||(exports.MouseInteractionType=MouseInteractionType={}));
|
package/dist/types/rrweb.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rrweb.js","sourceRoot":"","sources":["../../src/types/rrweb.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,iEAAoB,CAAA;IACpB,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,uEAAuB,CAAA;IACvB,yCAAQ,CAAA;IACR,6CAAU,CAAA;IACV,6CAAU,CAAA;AACZ,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAED,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,iEAAY,CAAA;IACZ,mEAAa,CAAA;IACb,iFAAoB,CAAA;IACpB,6DAAU,CAAA;IACV,6EAAkB,CAAA;IAClB,2DAAS,CAAA;IACT,mEAAa,CAAA;IACb,iFAAoB,CAAA;IACpB,6EAAkB,CAAA;IAClB,6EAAkB,CAAA;IAClB,0DAAS,CAAA;IACT,oEAAc,CAAA;IACd,oFAAsB,CAAA;AACxB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B;AAED,MAAM,CAAN,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC9B,qEAAW,CAAA;IACX,yEAAa,CAAA;IACb,iEAAS,CAAA;IACT,6EAAe,CAAA;IACf,uEAAY,CAAA;IACZ,iEAAS,CAAA;IACT,+DAAQ,CAAA;IACR,2EAAc,CAAA;IACd,yEAAa,CAAA;IACb,uEAAY,CAAA;IACZ,8EAAgB,CAAA;AAClB,CAAC,EAZW,oBAAoB,KAApB,oBAAoB,QAY/B"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Build script to automatically extract app metadata from configuration files
|
|
5
|
-
* This runs without developer intervention and generates app-metadata.ts
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const fs = require('fs')
|
|
9
|
-
const path = require('path')
|
|
10
|
-
|
|
11
|
-
function findProjectRoot() {
|
|
12
|
-
let currentDir = process.cwd()
|
|
13
|
-
|
|
14
|
-
// Look for package.json going up the directory tree
|
|
15
|
-
while (currentDir !== path.dirname(currentDir)) {
|
|
16
|
-
if (fs.existsSync(path.join(currentDir, 'package.json'))) {
|
|
17
|
-
return currentDir
|
|
18
|
-
}
|
|
19
|
-
currentDir = path.dirname(currentDir)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return process.cwd()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function extractAppMetadata(projectRoot) {
|
|
26
|
-
const metadata = {
|
|
27
|
-
name: undefined,
|
|
28
|
-
version: undefined,
|
|
29
|
-
bundleId: undefined,
|
|
30
|
-
buildNumber: undefined,
|
|
31
|
-
displayName: undefined,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
// Method 1: Try app.json
|
|
36
|
-
const appJsonPath = path.join(projectRoot, 'app.json')
|
|
37
|
-
if (fs.existsSync(appJsonPath)) {
|
|
38
|
-
const appConfig = JSON.parse(fs.readFileSync(appJsonPath, 'utf8'))
|
|
39
|
-
|
|
40
|
-
metadata.name = appConfig.name || appConfig.displayName
|
|
41
|
-
metadata.version = appConfig.version
|
|
42
|
-
metadata.displayName = appConfig.displayName
|
|
43
|
-
|
|
44
|
-
// Extract bundle ID from platform-specific configs
|
|
45
|
-
if (appConfig.ios?.bundleIdentifier) {
|
|
46
|
-
metadata.bundleId = appConfig.ios.bundleIdentifier
|
|
47
|
-
} else if (appConfig.android?.package) {
|
|
48
|
-
metadata.bundleId = appConfig.android.package
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (appConfig.ios?.buildNumber) {
|
|
52
|
-
metadata.buildNumber = appConfig.ios.buildNumber.toString()
|
|
53
|
-
} else if (appConfig.android?.versionCode) {
|
|
54
|
-
metadata.buildNumber = appConfig.android.versionCode.toString()
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
console.log('✅ Extracted metadata from app.json')
|
|
58
|
-
return metadata
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Method 2: Try app.config.js
|
|
62
|
-
const appConfigJsPath = path.join(projectRoot, 'app.config.js')
|
|
63
|
-
if (fs.existsSync(appConfigJsPath)) {
|
|
64
|
-
try {
|
|
65
|
-
// Clear require cache to get fresh config
|
|
66
|
-
delete require.cache[require.resolve(appConfigJsPath)]
|
|
67
|
-
const appConfig = require(appConfigJsPath)
|
|
68
|
-
|
|
69
|
-
metadata.name = appConfig.name || appConfig.displayName
|
|
70
|
-
metadata.version = appConfig.version
|
|
71
|
-
metadata.displayName = appConfig.displayName
|
|
72
|
-
|
|
73
|
-
// Extract bundle ID from platform-specific configs
|
|
74
|
-
if (appConfig.ios?.bundleIdentifier) {
|
|
75
|
-
metadata.bundleId = appConfig.ios.bundleIdentifier
|
|
76
|
-
} else if (appConfig.android?.package) {
|
|
77
|
-
metadata.bundleId = appConfig.android.package
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (appConfig.ios?.buildNumber) {
|
|
81
|
-
metadata.buildNumber = appConfig.ios.buildNumber.toString()
|
|
82
|
-
} else if (appConfig.android?.versionCode) {
|
|
83
|
-
metadata.buildNumber = appConfig.android.versionCode.toString()
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
console.log('✅ Extracted metadata from app.config.js')
|
|
87
|
-
return metadata
|
|
88
|
-
} catch (error) {
|
|
89
|
-
console.warn('⚠️ Could not parse app.config.js:', error.message)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Method 3: Fallback to package.json
|
|
94
|
-
const packageJsonPath = path.join(projectRoot, 'package.json')
|
|
95
|
-
if (fs.existsSync(packageJsonPath)) {
|
|
96
|
-
const packageConfig = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
97
|
-
|
|
98
|
-
metadata.name = packageConfig.name
|
|
99
|
-
metadata.version = packageConfig.version
|
|
100
|
-
|
|
101
|
-
console.log('✅ Extracted metadata from package.json')
|
|
102
|
-
return metadata
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
} catch (error) {
|
|
106
|
-
console.warn('⚠️ Error extracting app metadata:', error.message)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return metadata
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function generateAppMetadataFile(metadata, outputPath) {
|
|
113
|
-
const content = `/**
|
|
114
|
-
* Auto-generated app metadata
|
|
115
|
-
* This file is generated at build time to provide app metadata without developer intervention
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
// This file is automatically generated by the build process
|
|
119
|
-
// It extracts metadata from app.json, app.config.js, or package.json
|
|
120
|
-
|
|
121
|
-
export interface AppMetadata {
|
|
122
|
-
name?: string
|
|
123
|
-
version?: string
|
|
124
|
-
bundleId?: string
|
|
125
|
-
buildNumber?: string
|
|
126
|
-
displayName?: string
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Auto-detected values from project configuration files
|
|
130
|
-
export const APP_METADATA: AppMetadata = {
|
|
131
|
-
name: ${metadata.name ? `"${metadata.name}"` : 'undefined'},
|
|
132
|
-
version: ${metadata.version ? `"${metadata.version}"` : 'undefined'},
|
|
133
|
-
bundleId: ${metadata.bundleId ? `"${metadata.bundleId}"` : 'undefined'},
|
|
134
|
-
buildNumber: ${metadata.buildNumber ? `"${metadata.buildNumber}"` : 'undefined'},
|
|
135
|
-
displayName: ${metadata.displayName ? `"${metadata.displayName}"` : 'undefined'},
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Get auto-detected app metadata
|
|
140
|
-
*/
|
|
141
|
-
export function getAutoDetectedAppMetadata(): AppMetadata {
|
|
142
|
-
return { ...APP_METADATA }
|
|
143
|
-
}
|
|
144
|
-
`
|
|
145
|
-
|
|
146
|
-
fs.writeFileSync(outputPath, content, 'utf8')
|
|
147
|
-
console.log(`✅ Generated app-metadata.ts`)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function main() {
|
|
151
|
-
const projectRoot = findProjectRoot()
|
|
152
|
-
console.log(`🔍 Looking for app metadata in: ${projectRoot}`)
|
|
153
|
-
|
|
154
|
-
const metadata = extractAppMetadata(projectRoot)
|
|
155
|
-
|
|
156
|
-
// Show what was detected
|
|
157
|
-
console.log('📋 Detected metadata:')
|
|
158
|
-
Object.entries(metadata).forEach(([key, value]) => {
|
|
159
|
-
if (value) {
|
|
160
|
-
console.log(` ${key}: ${value}`)
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
// Generate the TypeScript file
|
|
165
|
-
const outputPath = path.join(__dirname, '../src/utils/app-metadata.ts')
|
|
166
|
-
generateAppMetadataFile(metadata, outputPath)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (require.main === module) {
|
|
170
|
-
main()
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
module.exports = { extractAppMetadata, generateAppMetadataFile }
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, useCallback, useMemo } from 'react'
|
|
2
|
-
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler'
|
|
3
|
-
|
|
4
|
-
export interface GestureCaptureWrapperProps {
|
|
5
|
-
children: ReactNode
|
|
6
|
-
onGestureRecord: (gestureType: string, data: any) => void
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const GestureCaptureWrapper: React.FC<GestureCaptureWrapperProps> = ({ children, onGestureRecord }) => {
|
|
10
|
-
const recordGesture = useCallback(
|
|
11
|
-
(gestureType: string, data: any) => {
|
|
12
|
-
// Record with session recorder
|
|
13
|
-
onGestureRecord(gestureType, data)
|
|
14
|
-
},
|
|
15
|
-
[onGestureRecord]
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
// Create tap gesture
|
|
19
|
-
const tapGesture = useMemo(() => {
|
|
20
|
-
return Gesture.Tap()
|
|
21
|
-
.runOnJS(true)
|
|
22
|
-
.onStart((event) => {
|
|
23
|
-
recordGesture('tap', {
|
|
24
|
-
x: event.x,
|
|
25
|
-
y: event.y,
|
|
26
|
-
timestamp: Date.now()
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
}, [recordGesture])
|
|
30
|
-
|
|
31
|
-
// Create pan gesture (for swipes and drags)
|
|
32
|
-
const panGesture = useMemo(() => {
|
|
33
|
-
return Gesture.Pan()
|
|
34
|
-
.runOnJS(true)
|
|
35
|
-
.onStart((event) => {
|
|
36
|
-
recordGesture('pan_start', {
|
|
37
|
-
x: event.x,
|
|
38
|
-
y: event.y,
|
|
39
|
-
timestamp: Date.now()
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
.onUpdate((event) => {
|
|
43
|
-
recordGesture('pan_update', {
|
|
44
|
-
x: event.x,
|
|
45
|
-
y: event.y,
|
|
46
|
-
translationX: event.translationX,
|
|
47
|
-
translationY: event.translationY,
|
|
48
|
-
velocityX: event.velocityX,
|
|
49
|
-
velocityY: event.velocityY,
|
|
50
|
-
timestamp: Date.now()
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
.onEnd((event) => {
|
|
54
|
-
recordGesture('pan_end', {
|
|
55
|
-
x: event.x,
|
|
56
|
-
y: event.y,
|
|
57
|
-
translationX: event.translationX,
|
|
58
|
-
translationY: event.translationY,
|
|
59
|
-
velocityX: event.velocityX,
|
|
60
|
-
velocityY: event.velocityY,
|
|
61
|
-
timestamp: Date.now()
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
}, [recordGesture])
|
|
65
|
-
|
|
66
|
-
// Create long press gesture
|
|
67
|
-
const longPressGesture = useMemo(() => {
|
|
68
|
-
return Gesture.LongPress()
|
|
69
|
-
.runOnJS(true)
|
|
70
|
-
.minDuration(500)
|
|
71
|
-
.onStart((event) => {
|
|
72
|
-
recordGesture('long_press', {
|
|
73
|
-
x: event.x,
|
|
74
|
-
y: event.y,
|
|
75
|
-
duration: 500,
|
|
76
|
-
timestamp: Date.now()
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
}, [recordGesture])
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
83
|
-
<GestureDetector gesture={Gesture.Simultaneous(tapGesture, panGesture, longPressGesture)}>{children}</GestureDetector>
|
|
84
|
-
</GestureHandlerRootView>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GestureCaptureWrapper";
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import SessionRecorder from '@multiplayer-app/session-recorder-react-native'
|
|
2
|
-
import React, { PropsWithChildren, useCallback } from 'react'
|
|
3
|
-
import { View } from 'react-native'
|
|
4
|
-
import { SessionState } from '../../types'
|
|
5
|
-
import { logger } from '../../utils'
|
|
6
|
-
import { GestureCaptureWrapper } from '../GestureCaptureWrapper'
|
|
7
|
-
|
|
8
|
-
interface ScreenRecorderViewProps extends PropsWithChildren {}
|
|
9
|
-
|
|
10
|
-
export const ScreenRecorderView = ({ children }: ScreenRecorderViewProps) => {
|
|
11
|
-
// Set up gesture recording callback
|
|
12
|
-
const handleGestureRecord = useCallback((gestureType: string, data: any) => {
|
|
13
|
-
if (SessionRecorder.sessionState !== SessionState.started) {
|
|
14
|
-
logger.debug('SessionRecorderContext', 'Gesture recording skipped', {
|
|
15
|
-
client: !!SessionRecorder.sessionState,
|
|
16
|
-
sessionState: SessionRecorder.sessionState
|
|
17
|
-
})
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
logger.debug('SessionRecorderContext', 'Gesture recorded', { gestureType, data })
|
|
21
|
-
try {
|
|
22
|
-
// Record gesture as appropriate touch events
|
|
23
|
-
switch (gestureType) {
|
|
24
|
-
case 'tap':
|
|
25
|
-
// For tap, record both touch start and end
|
|
26
|
-
logger.debug('SessionRecorderContext', 'Recording tap as touch start + end')
|
|
27
|
-
SessionRecorder.recordTouchStart?.(data.x, data.y, undefined, 1.0)
|
|
28
|
-
SessionRecorder.recordTouchEnd?.(data.x, data.y, undefined, 1.0)
|
|
29
|
-
break
|
|
30
|
-
|
|
31
|
-
case 'pan_start':
|
|
32
|
-
logger.debug('SessionRecorderContext', 'Recording pan_start as touch start')
|
|
33
|
-
SessionRecorder.recordTouchStart?.(data.x, data.y, undefined, 1.0)
|
|
34
|
-
break
|
|
35
|
-
|
|
36
|
-
case 'pan_update':
|
|
37
|
-
logger.debug('SessionRecorderContext', 'Recording pan_update as touch move')
|
|
38
|
-
SessionRecorder.recordTouchMove?.(data.x, data.y, undefined, 1.0)
|
|
39
|
-
break
|
|
40
|
-
|
|
41
|
-
case 'pan_end':
|
|
42
|
-
logger.debug('SessionRecorderContext', 'Recording pan_end as touch end')
|
|
43
|
-
SessionRecorder.recordTouchEnd?.(data.x, data.y, undefined, 1.0)
|
|
44
|
-
break
|
|
45
|
-
|
|
46
|
-
case 'long_press':
|
|
47
|
-
logger.debug('SessionRecorderContext', 'Recording long_press as touch start + end')
|
|
48
|
-
SessionRecorder.recordTouchStart?.(data.x, data.y, undefined, 1.0)
|
|
49
|
-
SessionRecorder.recordTouchEnd?.(data.x, data.y, undefined, 1.0)
|
|
50
|
-
break
|
|
51
|
-
default:
|
|
52
|
-
}
|
|
53
|
-
} catch (error) {
|
|
54
|
-
logger.error('SessionRecorderContext', 'Failed to record gesture event', error)
|
|
55
|
-
}
|
|
56
|
-
}, [])
|
|
57
|
-
|
|
58
|
-
// Callback ref to set the viewshot ref immediately when available
|
|
59
|
-
const setViewShotRef = (ref: View | null) => {
|
|
60
|
-
if (ref) {
|
|
61
|
-
SessionRecorder.setViewShotRef?.(ref)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<GestureCaptureWrapper onGestureRecord={handleGestureRecord}>
|
|
67
|
-
<View ref={setViewShotRef} style={{ flex: 1 }}>
|
|
68
|
-
{children}
|
|
69
|
-
</View>
|
|
70
|
-
</GestureCaptureWrapper>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ScreenRecorderView";
|
package/src/components/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GestureCaptureWrapper'
|
package/src/config/constants.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const OTEL_MP_SAMPLE_TRACE_RATIO = 0.15
|
|
3
|
-
|
|
4
|
-
export const SESSION_ID_PROP_NAME = 'multiplayer-session-id'
|
|
5
|
-
|
|
6
|
-
export const SESSION_SHORT_ID_PROP_NAME = 'multiplayer-session-short-id'
|
|
7
|
-
|
|
8
|
-
export const SESSION_CONTINUOUS_DEBUGGING_PROP_NAME = 'multiplayer-session-continuous-debugging'
|
|
9
|
-
|
|
10
|
-
export const SESSION_STATE_PROP_NAME = 'multiplayer-session-state'
|
|
11
|
-
|
|
12
|
-
export const SESSION_TYPE_PROP_NAME = 'multiplayer-session-type'
|
|
13
|
-
|
|
14
|
-
export const SESSION_PROP_NAME = 'multiplayer-session-data'
|
|
15
|
-
|
|
16
|
-
export const SESSION_STARTED_EVENT = 'debug-session:started'
|
|
17
|
-
|
|
18
|
-
export const SESSION_STOPPED_EVENT = 'debug-session:stopped'
|
|
19
|
-
|
|
20
|
-
export const SESSION_SUBSCRIBE_EVENT = 'debug-session:subscribe'
|
|
21
|
-
|
|
22
|
-
export const SESSION_UNSUBSCRIBE_EVENT = 'debug-session:unsubscribe'
|
|
23
|
-
|
|
24
|
-
export const SESSION_AUTO_CREATED = 'debug-session:auto-created'
|
|
25
|
-
|
|
26
|
-
export const SESSION_ADD_EVENT = 'debug-session:rrweb:add-event'
|
|
27
|
-
|
|
28
|
-
export const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000
|
|
29
|
-
|
|
30
|
-
export const SESSION_RESPONSE = 'multiplayer-debug-session-response'
|
|
31
|
-
|
|
32
|
-
export const CONTINUOUS_DEBUGGING_TIMEOUT = 60000 // 1 minutes
|
|
33
|
-
|
|
34
|
-
export const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30 // TODO: move to shared config otel core
|
|
35
|
-
|
|
36
|
-
// // Package version - injected by webpack during build
|
|
37
|
-
// declare const PACKAGE_VERSION: string
|
|
38
|
-
// export const PACKAGE_VERSION_EXPORT = PACKAGE_VERSION || '1.0.0'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// Regex patterns for OpenTelemetry ignore URLs
|
|
42
|
-
export const OTEL_IGNORE_URLS = [
|
|
43
|
-
// Traces endpoint
|
|
44
|
-
/.*\/v1\/traces/,
|
|
45
|
-
// Debug sessions endpoints
|
|
46
|
-
/.*\/v0\/radar\/debug-sessions\/start$/,
|
|
47
|
-
/.*\/v0\/radar\/debug-sessions\/[^/]+\/stop$/,
|
|
48
|
-
/.*\/v0\/radar\/debug-sessions\/[^/]+\/cancel$/,
|
|
49
|
-
|
|
50
|
-
// Continuous debug sessions endpoints
|
|
51
|
-
/.*\/v0\/radar\/continuous-debug-sessions\/start$/,
|
|
52
|
-
/.*\/v0\/radar\/continuous-debug-sessions\/[^/]+\/save$/,
|
|
53
|
-
/.*\/v0\/radar\/continuous-debug-sessions\/[^/]+\/cancel$/,
|
|
54
|
-
|
|
55
|
-
// Remote debug session endpoint
|
|
56
|
-
/.*\/v0\/radar\/remote-debug-session\/check$/,
|
|
57
|
-
|
|
58
|
-
// Or use a more general pattern to catch all radar API endpoints
|
|
59
|
-
// /.*\/v0\/radar\/.*/
|
|
60
|
-
]
|
package/src/config/defaults.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SessionRecorderSdk,
|
|
3
|
-
MULTIPLAYER_BASE_API_URL,
|
|
4
|
-
MULTIPLAYER_OTEL_DEFAULT_TRACES_EXPORTER_HTTP_URL,
|
|
5
|
-
} from '@multiplayer-app/session-recorder-common'
|
|
6
|
-
import {
|
|
7
|
-
MaskingConfig,
|
|
8
|
-
SessionRecorderConfigs,
|
|
9
|
-
WidgetButtonPlacement,
|
|
10
|
-
WidgetTextOverridesConfig,
|
|
11
|
-
} from '../types'
|
|
12
|
-
import {
|
|
13
|
-
OTEL_MP_SAMPLE_TRACE_RATIO,
|
|
14
|
-
DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE,
|
|
15
|
-
} from './constants'
|
|
16
|
-
const { mask, sensitiveFields, sensitiveHeaders } = SessionRecorderSdk
|
|
17
|
-
|
|
18
|
-
export const DEFAULT_MASKING_CONFIG: MaskingConfig = {
|
|
19
|
-
isContentMaskingEnabled: true,
|
|
20
|
-
maskBody: mask(sensitiveFields),
|
|
21
|
-
maskHeaders: mask(sensitiveHeaders),
|
|
22
|
-
maskBodyFieldsList: sensitiveFields,
|
|
23
|
-
maskHeadersList: sensitiveHeaders,
|
|
24
|
-
headersToInclude: [],
|
|
25
|
-
headersToExclude: [],
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const DEFAULT_WIDGET_TEXT_CONFIG: WidgetTextOverridesConfig = {
|
|
29
|
-
initialTitleWithContinuous: 'Encountered an issue?',
|
|
30
|
-
initialTitleWithoutContinuous: 'Encountered an issue?',
|
|
31
|
-
initialDescriptionWithContinuous: 'Record your session so we can see the problem and fix it faster.',
|
|
32
|
-
initialDescriptionWithoutContinuous: 'Record your session so we can see the problem and fix it faster.',
|
|
33
|
-
continuousRecordingLabel: 'Continuous recording',
|
|
34
|
-
startRecordingButtonText: 'Start recording',
|
|
35
|
-
finalTitle: 'Done recording?',
|
|
36
|
-
finalDescription: 'You can also add a quick note with extra context, expectations, or questions. Thank you!',
|
|
37
|
-
commentPlaceholder: 'Add a message...',
|
|
38
|
-
saveButtonText: 'Submit recording',
|
|
39
|
-
cancelButtonText: 'Cancel recording',
|
|
40
|
-
continuousOverlayTitle: 'Save time, skip the reproductions',
|
|
41
|
-
continuousOverlayDescription: 'We keep a rolling record of your recent activity. If something doesn’t work as expected, just save the recording and continue working. No need to worry about exceptions and errors - we automatically save recordings for those!',
|
|
42
|
-
saveLastSnapshotButtonText: 'Save recording',
|
|
43
|
-
submitDialogTitle: 'Save recording',
|
|
44
|
-
submitDialogSubtitle: 'This full-stack session recording will be saved directly to your selected Multiplayer project. All data is automatically correlated end-to-end.',
|
|
45
|
-
submitDialogCommentLabel: 'You can also add context, comments, or notes.',
|
|
46
|
-
submitDialogCommentPlaceholder: 'Add a message...',
|
|
47
|
-
submitDialogSubmitText: 'Save',
|
|
48
|
-
submitDialogCancelText: 'Cancel',
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const BASE_CONFIG: Required<SessionRecorderConfigs> = {
|
|
52
|
-
apiKey: '',
|
|
53
|
-
|
|
54
|
-
version: '',
|
|
55
|
-
application: '',
|
|
56
|
-
environment: '',
|
|
57
|
-
|
|
58
|
-
showWidget: true,
|
|
59
|
-
showContinuousRecording: true,
|
|
60
|
-
widgetButtonPlacement: WidgetButtonPlacement.bottomRight,
|
|
61
|
-
|
|
62
|
-
usePostMessageFallback: false,
|
|
63
|
-
apiBaseUrl: MULTIPLAYER_BASE_API_URL,
|
|
64
|
-
exporterEndpoint: MULTIPLAYER_OTEL_DEFAULT_TRACES_EXPORTER_HTTP_URL,
|
|
65
|
-
|
|
66
|
-
schemifyDocSpanPayload: true,
|
|
67
|
-
|
|
68
|
-
ignoreUrls: [],
|
|
69
|
-
propagateTraceHeaderCorsUrls: [],
|
|
70
|
-
|
|
71
|
-
sampleTraceRatio: OTEL_MP_SAMPLE_TRACE_RATIO,
|
|
72
|
-
maxCapturingHttpPayloadSize: DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE,
|
|
73
|
-
|
|
74
|
-
captureBody: true,
|
|
75
|
-
captureHeaders: true,
|
|
76
|
-
masking: DEFAULT_MASKING_CONFIG,
|
|
77
|
-
widgetTextOverrides: DEFAULT_WIDGET_TEXT_CONFIG,
|
|
78
|
-
|
|
79
|
-
recordScreen: true,
|
|
80
|
-
recordGestures: true,
|
|
81
|
-
recordNavigation: true,
|
|
82
|
-
}
|