@multiplayer-app/session-recorder-react-native 0.0.1-beta.1 → 0.0.1-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/SessionRecorderNative.podspec +29 -0
  2. package/android/build.gradle +32 -0
  3. package/app.plugin.js +42 -0
  4. package/copy-react-native-dist.sh +4 -10
  5. package/dist/components/MaskableComponent.d.ts +22 -0
  6. package/dist/components/MaskableComponent.js +1 -0
  7. package/dist/components/MaskableComponent.js.map +1 -0
  8. package/dist/components/MaskableTextInput.d.ts +14 -0
  9. package/dist/components/MaskableTextInput.js +1 -0
  10. package/dist/components/MaskableTextInput.js.map +1 -0
  11. package/dist/components/SessionRecorderWidget/FinalPopover.d.ts +11 -0
  12. package/dist/components/SessionRecorderWidget/FinalPopover.js +1 -0
  13. package/dist/components/SessionRecorderWidget/FinalPopover.js.map +1 -0
  14. package/dist/components/SessionRecorderWidget/FloatingButton.d.ts +8 -0
  15. package/dist/components/SessionRecorderWidget/FloatingButton.js +1 -0
  16. package/dist/components/SessionRecorderWidget/FloatingButton.js.map +1 -0
  17. package/dist/components/SessionRecorderWidget/InitialPopover.d.ts +13 -0
  18. package/dist/components/SessionRecorderWidget/InitialPopover.js +1 -0
  19. package/dist/components/SessionRecorderWidget/InitialPopover.js.map +1 -0
  20. package/dist/components/SessionRecorderWidget/ModalContainer.d.ts +8 -0
  21. package/dist/components/SessionRecorderWidget/ModalContainer.js +1 -0
  22. package/dist/components/SessionRecorderWidget/ModalContainer.js.map +1 -0
  23. package/dist/components/SessionRecorderWidget/ModalHeader.d.ts +6 -0
  24. package/dist/components/SessionRecorderWidget/ModalHeader.js +1 -0
  25. package/dist/components/SessionRecorderWidget/ModalHeader.js.map +1 -0
  26. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +5 -0
  27. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +1 -0
  28. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -0
  29. package/dist/components/SessionRecorderWidget/icons.d.ts +11 -0
  30. package/dist/components/SessionRecorderWidget/icons.js +1 -0
  31. package/dist/components/SessionRecorderWidget/icons.js.map +1 -0
  32. package/dist/components/SessionRecorderWidget/index.d.ts +2 -0
  33. package/dist/components/SessionRecorderWidget/index.js +1 -0
  34. package/dist/components/SessionRecorderWidget/index.js.map +1 -0
  35. package/dist/components/SessionRecorderWidget/styles.d.ts +145 -0
  36. package/dist/components/SessionRecorderWidget/styles.js +1 -0
  37. package/dist/components/SessionRecorderWidget/styles.js.map +1 -0
  38. package/dist/components/index.d.ts +2 -0
  39. package/dist/components/index.js +1 -1
  40. package/dist/components/index.js.map +1 -1
  41. package/dist/config/defaults.js +1 -1
  42. package/dist/config/defaults.js.map +1 -1
  43. package/dist/config/masking.js +1 -1
  44. package/dist/config/masking.js.map +1 -1
  45. package/dist/context/SessionRecorderContext.d.ts +5 -3
  46. package/dist/context/SessionRecorderContext.js +1 -1
  47. package/dist/context/SessionRecorderContext.js.map +1 -1
  48. package/dist/index.d.ts +0 -1
  49. package/dist/index.js +1 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/native/ScreenMasking.d.ts +21 -0
  52. package/dist/native/ScreenMasking.js +1 -0
  53. package/dist/native/ScreenMasking.js.map +1 -0
  54. package/dist/native/SessionRecorderNative.d.ts +21 -0
  55. package/dist/native/SessionRecorderNative.js +1 -0
  56. package/dist/native/SessionRecorderNative.js.map +1 -0
  57. package/dist/patch/xhr.js +1 -1
  58. package/dist/patch/xhr.js.map +1 -1
  59. package/dist/recorder/screenRecorder.d.ts +1 -0
  60. package/dist/recorder/screenRecorder.js +1 -1
  61. package/dist/recorder/screenRecorder.js.map +1 -1
  62. package/dist/recorder/screenshotManager.d.ts +10 -0
  63. package/dist/recorder/screenshotManager.js +1 -0
  64. package/dist/recorder/screenshotManager.js.map +1 -0
  65. package/dist/services/screenMaskingService.d.ts +39 -0
  66. package/dist/services/screenMaskingService.js +1 -0
  67. package/dist/services/screenMaskingService.js.map +1 -0
  68. package/dist/services/storage.service.d.ts +18 -2
  69. package/dist/services/storage.service.js +1 -1
  70. package/dist/services/storage.service.js.map +1 -1
  71. package/dist/session-recorder.d.ts +2 -1
  72. package/dist/session-recorder.js +1 -1
  73. package/dist/session-recorder.js.map +1 -1
  74. package/dist/types/session-recorder.d.ts +6 -0
  75. package/dist/types/session-recorder.js.map +1 -1
  76. package/dist/utils/componentRegistry.d.ts +64 -0
  77. package/dist/utils/componentRegistry.js +1 -0
  78. package/dist/utils/componentRegistry.js.map +1 -0
  79. package/dist/utils/nativeModuleTest.d.ts +8 -0
  80. package/dist/utils/nativeModuleTest.js +1 -0
  81. package/dist/utils/nativeModuleTest.js.map +1 -0
  82. package/dist/utils/platform.d.ts +3 -0
  83. package/dist/utils/reactNativeHierarchyExtractor.d.ts +38 -0
  84. package/dist/utils/reactNativeHierarchyExtractor.js +1 -0
  85. package/dist/utils/reactNativeHierarchyExtractor.js.map +1 -0
  86. package/dist/utils/screenshotMasker.d.ts +96 -0
  87. package/dist/utils/screenshotMasker.js +1 -0
  88. package/dist/utils/screenshotMasker.js.map +1 -0
  89. package/dist/utils/viewHierarchyTracker.d.ts +89 -0
  90. package/dist/utils/viewHierarchyTracker.js +1 -0
  91. package/dist/utils/viewHierarchyTracker.js.map +1 -0
  92. package/docs/NATIVE_MODULE_SETUP.md +177 -0
  93. package/ios/SessionRecorderNative.m +17 -0
  94. package/ios/SessionRecorderNative.podspec +26 -0
  95. package/ios/SessionRecorderNative.swift +205 -0
  96. package/package.json +22 -7
  97. package/plugin/package.json +20 -0
  98. package/plugin/src/index.js +42 -0
  99. package/react-native.config.js +15 -0
  100. package/RRWEB_INTEGRATION.md +0 -336
  101. package/VIEWSHOT_INTEGRATION_TEST.md +0 -123
  102. package/babel.config.js +0 -13
  103. package/dist/components/GestureCaptureWrapper.d.ts +0 -6
  104. package/dist/components/GestureCaptureWrapper.js +0 -1
  105. package/dist/components/GestureCaptureWrapper.js.map +0 -1
  106. package/dist/expo.d.ts +0 -7
  107. package/dist/expo.js +0 -1
  108. package/dist/expo.js.map +0 -1
  109. package/dist/otel/instrumentations/gestureInstrumentation.d.ts +0 -15
  110. package/dist/otel/instrumentations/gestureInstrumentation.js +0 -1
  111. package/dist/otel/instrumentations/gestureInstrumentation.js.map +0 -1
  112. package/dist/otel/instrumentations/reactNativeInstrumentation.d.ts +0 -8
  113. package/dist/otel/instrumentations/reactNativeInstrumentation.js +0 -1
  114. package/dist/otel/instrumentations/reactNativeInstrumentation.js.map +0 -1
  115. package/dist/otel/instrumentations/reactNavigationInstrumentation.d.ts +0 -13
  116. package/dist/otel/instrumentations/reactNavigationInstrumentation.js +0 -1
  117. package/dist/otel/instrumentations/reactNavigationInstrumentation.js.map +0 -1
  118. package/dist/recorder/gestureHandlerRecorder.d.ts +0 -19
  119. package/dist/recorder/gestureHandlerRecorder.js +0 -1
  120. package/dist/recorder/gestureHandlerRecorder.js.map +0 -1
  121. package/dist/types/rrweb.d.ts +0 -118
  122. package/dist/types/rrweb.js +0 -1
  123. package/dist/types/rrweb.js.map +0 -1
  124. package/docs/AUTO_METADATA_DETECTION.md +0 -108
  125. package/scripts/generate-app-metadata.js +0 -173
  126. package/src/components/GestureCaptureWrapper/GestureCaptureWrapper.tsx +0 -86
  127. package/src/components/GestureCaptureWrapper/index.ts +0 -1
  128. package/src/components/ScreenRecorderView/ScreenRecorderView.tsx +0 -72
  129. package/src/components/ScreenRecorderView/index.ts +0 -1
  130. package/src/components/index.ts +0 -1
  131. package/src/config/constants.ts +0 -60
  132. package/src/config/defaults.ts +0 -82
  133. package/src/config/index.ts +0 -6
  134. package/src/config/masking.ts +0 -27
  135. package/src/config/session-recorder.ts +0 -55
  136. package/src/config/validators.ts +0 -31
  137. package/src/context/SessionRecorderContext.tsx +0 -75
  138. package/src/expo.ts +0 -11
  139. package/src/index.ts +0 -17
  140. package/src/otel/helpers.ts +0 -275
  141. package/src/otel/index.ts +0 -138
  142. package/src/otel/instrumentations/index.ts +0 -115
  143. package/src/patch/index.ts +0 -1
  144. package/src/patch/xhr.ts +0 -142
  145. package/src/recorder/eventExporter.ts +0 -141
  146. package/src/recorder/gestureRecorder.ts +0 -498
  147. package/src/recorder/index.ts +0 -179
  148. package/src/recorder/navigationTracker.ts +0 -449
  149. package/src/recorder/screenRecorder.ts +0 -498
  150. package/src/services/api.service.ts +0 -203
  151. package/src/services/storage.service.ts +0 -158
  152. package/src/session-recorder.ts +0 -600
  153. package/src/types/expo.d.ts +0 -23
  154. package/src/types/index.ts +0 -28
  155. package/src/types/session-recorder.ts +0 -423
  156. package/src/types/session.ts +0 -65
  157. package/src/utils/app-metadata.ts +0 -31
  158. package/src/utils/index.ts +0 -8
  159. package/src/utils/logger.ts +0 -225
  160. package/src/utils/platform.ts +0 -384
  161. package/src/utils/request-utils.ts +0 -61
  162. package/src/utils/rrweb-events.ts +0 -309
  163. package/src/utils/session.ts +0 -18
  164. package/src/utils/time.ts +0 -17
  165. package/src/utils/type-utils.ts +0 -75
  166. package/src/version.ts +0 -1
  167. package/tsconfig.json +0 -24
@@ -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;IAIjC;QACE,IAAI,CAAC,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAA;QAC1D,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED,kBAAkB,CAAC,QAAkD;QACnE,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAA;IACjC,CAAC;IAED,qBAAqB;IACrB,gBAAgB;QACd,OAAO,OAAO,CAAC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1C,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"}
@@ -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
- }
@@ -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={}));
@@ -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,108 +0,0 @@
1
- # Automatic App Metadata Detection
2
-
3
- The session recorder automatically detects app metadata from your project configuration files **without requiring any developer intervention**.
4
-
5
- ## How It Works
6
-
7
- The library automatically extracts app information from common configuration files in this priority order:
8
-
9
- 1. **`app.json`** - Expo/React Native app configuration
10
- 2. **`app.config.js`** - Dynamic Expo configuration
11
- 3. **`package.json`** - Node.js package configuration (fallback)
12
-
13
- ## Supported Configuration Files
14
-
15
- ### app.json
16
-
17
- ```json
18
- {
19
- "name": "My Awesome App",
20
- "version": "1.2.3",
21
- "displayName": "My App",
22
- "ios": {
23
- "bundleIdentifier": "com.mycompany.myapp",
24
- "buildNumber": "123"
25
- },
26
- "android": {
27
- "package": "com.mycompany.myapp",
28
- "versionCode": 123
29
- }
30
- }
31
- ```
32
-
33
- ### app.config.js
34
-
35
- ```javascript
36
- export default {
37
- name: 'My Awesome App',
38
- version: '1.2.3',
39
- displayName: 'My App',
40
- ios: {
41
- bundleIdentifier: 'com.mycompany.myapp',
42
- buildNumber: '123'
43
- },
44
- android: {
45
- package: 'com.mycompany.myapp',
46
- versionCode: 123
47
- }
48
- }
49
- ```
50
-
51
- ### package.json (fallback)
52
-
53
- ```json
54
- {
55
- "name": "my-awesome-app",
56
- "version": "1.2.3"
57
- }
58
- ```
59
-
60
- ## Detected Metadata
61
-
62
- The following information is automatically extracted:
63
-
64
- - **App Name** - From `name` or `displayName`
65
- - **App Version** - From `version`
66
- - **Bundle ID** - From `ios.bundleIdentifier` or `android.package`
67
- - **Build Number** - From `ios.buildNumber` or `android.versionCode`
68
-
69
- ## Build Process
70
-
71
- The metadata detection happens automatically during the build process:
72
-
73
- 1. The build script scans your project root for configuration files
74
- 2. Extracts relevant metadata from the first found configuration
75
- 3. Generates a TypeScript file with the detected metadata
76
- 4. The session recorder uses this metadata in all recordings
77
-
78
- ## No Developer Action Required
79
-
80
- ✅ **Zero configuration** - Works out of the box
81
- ✅ **Automatic detection** - Scans common config files
82
- ✅ **Build-time generation** - No runtime file reading
83
- ✅ **Fallback support** - Graceful degradation
84
-
85
- ## Manual Override (Optional)
86
-
87
- If you need to override the auto-detected metadata, you can still use the manual configuration:
88
-
89
- ```typescript
90
- import { configureAppMetadata } from '@multiplayer-app/session-recorder-react-native'
91
-
92
- configureAppMetadata({
93
- name: 'Custom App Name',
94
- version: '2.0.0',
95
- bundleId: 'com.custom.app'
96
- })
97
- ```
98
-
99
- ## Priority Order
100
-
101
- The metadata detection follows this priority:
102
-
103
- 1. **Expo Config** (if using Expo)
104
- 2. **Manual Configuration** (if `configureAppMetadata` was called)
105
- 3. **Auto-detected Metadata** (from config files)
106
- 4. **Fallback Values** (defaults)
107
-
108
- This ensures maximum compatibility across different React Native setups while providing rich metadata for debugging sessions.
@@ -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";
@@ -1 +0,0 @@
1
- export * from './GestureCaptureWrapper'
@@ -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
- ]