@multiplayer-app/session-recorder-react-native 0.0.1-alpha.1 → 0.0.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/constants.d.ts +19 -0
- package/dist/config/constants.js +1 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/defaults.d.ts +4 -0
- package/dist/config/defaults.js +1 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/masking.d.ts +2 -30
- package/dist/config/masking.js +1 -1
- package/dist/config/masking.js.map +1 -1
- package/dist/config/session-recorder.d.ts +2 -0
- package/dist/config/session-recorder.js +1 -0
- package/dist/config/session-recorder.js.map +1 -0
- package/dist/config/validators.d.ts +10 -0
- package/dist/config/validators.js +1 -0
- package/dist/config/validators.js.map +1 -0
- package/dist/expo.d.ts +2 -2
- package/dist/expo.js +1 -1
- package/dist/expo.js.map +1 -1
- package/dist/exporters.d.ts +3 -0
- package/dist/exporters.js +1 -0
- package/dist/exporters.js.map +1 -0
- package/dist/index.d.ts +3 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/otel/helpers.d.ts +45 -3
- package/dist/otel/helpers.js +1 -1
- package/dist/otel/helpers.js.map +1 -1
- package/dist/otel/index.d.ts +9 -5
- package/dist/otel/index.js +1 -1
- package/dist/otel/index.js.map +1 -1
- package/dist/otel/instrumentations/index.js +1 -1
- package/dist/otel/instrumentations/index.js.map +1 -1
- package/dist/patch/index.d.ts +1 -0
- package/dist/patch/index.js +1 -0
- package/dist/patch/index.js.map +1 -0
- package/dist/patch/xhr.d.ts +2 -0
- package/dist/patch/xhr.js +1 -0
- package/dist/patch/xhr.js.map +1 -0
- package/dist/recorder/gestureRecorder.js +1 -1
- package/dist/recorder/gestureRecorder.js.map +1 -1
- package/dist/recorder/navigationTracker.js +1 -1
- package/dist/recorder/navigationTracker.js.map +1 -1
- package/dist/recorder/screenRecorder.d.ts +1 -0
- package/dist/recorder/screenRecorder.js +1 -1
- package/dist/recorder/screenRecorder.js.map +1 -1
- package/dist/services/api.service.d.ts +62 -10
- package/dist/services/api.service.js +1 -1
- package/dist/services/api.service.js.map +1 -1
- package/dist/services/storage.service.d.ts +23 -16
- package/dist/services/storage.service.js +1 -1
- package/dist/services/storage.service.js.map +1 -1
- package/dist/session-recorder.d.ts +131 -0
- package/dist/session-recorder.js +1 -0
- package/dist/session-recorder.js.map +1 -0
- package/dist/sessionRecorder.d.ts +113 -34
- package/dist/sessionRecorder.js +1 -1
- package/dist/sessionRecorder.js.map +1 -1
- package/dist/types/index.d.ts +2 -81
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/session-recorder.d.ts +366 -0
- package/dist/types/session-recorder.js +1 -0
- package/dist/types/session-recorder.js.map +1 -0
- package/dist/types/session.d.ts +59 -0
- package/dist/types/session.js +1 -0
- package/dist/types/session.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/platform.d.ts +5 -0
- package/dist/utils/platform.js +1 -1
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/request-utils.d.ts +21 -0
- package/dist/utils/request-utils.js +1 -0
- package/dist/utils/request-utils.js.map +1 -0
- package/dist/utils/session.d.ts +5 -0
- package/dist/utils/session.js +1 -0
- package/dist/utils/session.js.map +1 -0
- package/dist/utils/time.d.ts +4 -0
- package/dist/utils/time.js +1 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/type-utils.d.ts +16 -0
- package/dist/utils/type-utils.js +1 -0
- package/dist/utils/type-utils.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/config/constants.ts +60 -0
- package/src/config/defaults.ts +82 -0
- package/src/config/index.ts +6 -0
- package/src/config/masking.ts +10 -61
- package/src/config/session-recorder.ts +55 -0
- package/src/config/validators.ts +31 -0
- package/src/expo.ts +2 -22
- package/src/index.ts +3 -15
- package/src/otel/helpers.ts +247 -11
- package/src/otel/index.ts +109 -76
- package/src/otel/instrumentations/index.ts +8 -8
- package/src/patch/index.ts +1 -0
- package/src/patch/xhr.ts +142 -0
- package/src/recorder/gestureRecorder.ts +12 -12
- package/src/recorder/navigationTracker.ts +10 -10
- package/src/recorder/screenRecorder.ts +26 -26
- package/src/services/api.service.ts +169 -37
- package/src/services/storage.service.ts +101 -74
- package/src/session-recorder.ts +570 -0
- package/src/types/index.ts +2 -88
- package/src/types/session-recorder.ts +423 -0
- package/src/types/session.ts +65 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/platform.ts +13 -0
- package/src/utils/request-utils.ts +61 -0
- package/src/utils/session.ts +18 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/type-utils.ts +75 -0
- package/src/version.ts +1 -1
- package/examples/sample-expo-app/README.md +0 -142
- package/examples/sample-expo-app/app/(tabs)/_layout.tsx +0 -60
- package/examples/sample-expo-app/app/(tabs)/explore.tsx +0 -110
- package/examples/sample-expo-app/app/(tabs)/index.tsx +0 -125
- package/examples/sample-expo-app/app/(tabs)/posts.tsx +0 -96
- package/examples/sample-expo-app/app/(tabs)/users.tsx +0 -131
- package/examples/sample-expo-app/app/+not-found.tsx +0 -32
- package/examples/sample-expo-app/app/_layout.tsx +0 -53
- package/examples/sample-expo-app/app/post/[id].tsx +0 -199
- package/examples/sample-expo-app/app/user/[id].tsx +0 -270
- package/examples/sample-expo-app/app.json +0 -42
- package/examples/sample-expo-app/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/examples/sample-expo-app/assets/images/adaptive-icon.png +0 -0
- package/examples/sample-expo-app/assets/images/favicon.png +0 -0
- package/examples/sample-expo-app/assets/images/icon.png +0 -0
- package/examples/sample-expo-app/assets/images/partial-react-logo.png +0 -0
- package/examples/sample-expo-app/assets/images/react-logo.png +0 -0
- package/examples/sample-expo-app/assets/images/react-logo@2x.png +0 -0
- package/examples/sample-expo-app/assets/images/react-logo@3x.png +0 -0
- package/examples/sample-expo-app/assets/images/splash-icon.png +0 -0
- package/examples/sample-expo-app/components/Collapsible.tsx +0 -45
- package/examples/sample-expo-app/components/ErrorView.tsx +0 -52
- package/examples/sample-expo-app/components/ExternalLink.tsx +0 -24
- package/examples/sample-expo-app/components/HapticTab.tsx +0 -18
- package/examples/sample-expo-app/components/HelloWave.tsx +0 -40
- package/examples/sample-expo-app/components/LoadingSpinner.tsx +0 -34
- package/examples/sample-expo-app/components/ParallaxScrollView.tsx +0 -82
- package/examples/sample-expo-app/components/ThemedText.tsx +0 -60
- package/examples/sample-expo-app/components/ThemedView.tsx +0 -14
- package/examples/sample-expo-app/components/ui/IconSymbol.ios.tsx +0 -32
- package/examples/sample-expo-app/components/ui/IconSymbol.tsx +0 -41
- package/examples/sample-expo-app/components/ui/TabBarBackground.ios.tsx +0 -19
- package/examples/sample-expo-app/components/ui/TabBarBackground.tsx +0 -6
- package/examples/sample-expo-app/constants/Colors.ts +0 -26
- package/examples/sample-expo-app/eslint.config.js +0 -10
- package/examples/sample-expo-app/hooks/useApi.ts +0 -41
- package/examples/sample-expo-app/hooks/useColorScheme.ts +0 -1
- package/examples/sample-expo-app/hooks/useColorScheme.web.ts +0 -21
- package/examples/sample-expo-app/hooks/useThemeColor.ts +0 -21
- package/examples/sample-expo-app/metro.config.js +0 -26
- package/examples/sample-expo-app/package-lock.json +0 -26296
- package/examples/sample-expo-app/package.json +0 -59
- package/examples/sample-expo-app/scripts/reset-project.js +0 -112
- package/examples/sample-expo-app/services/api.ts +0 -98
- package/examples/sample-expo-app/tsconfig.json +0 -17
- package/examples/sample-expo-app/utils/navigation.ts +0 -19
- package/src/sessionRecorder.ts +0 -367
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { SessionType } from '@multiplayer-app/session-recorder-common';
|
|
2
|
+
import { PropagateTraceHeaderCorsUrls } from '@opentelemetry/sdk-trace-web';
|
|
3
|
+
import { Span } from '@opentelemetry/api';
|
|
4
|
+
import type { ISession } from './session';
|
|
5
|
+
export declare enum WidgetButtonPlacement {
|
|
6
|
+
topLeft = "top-left",
|
|
7
|
+
topRight = "top-right",
|
|
8
|
+
bottomLeft = "bottom-left",
|
|
9
|
+
bottomRight = "bottom-right"
|
|
10
|
+
}
|
|
11
|
+
export interface SessionRecorderOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The API key used to authenticate with the session debugger service.
|
|
14
|
+
*/
|
|
15
|
+
apiKey: string;
|
|
16
|
+
/**
|
|
17
|
+
* The version of the application using the session debugger.
|
|
18
|
+
*/
|
|
19
|
+
version: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the application being debugged.
|
|
22
|
+
*/
|
|
23
|
+
application: string;
|
|
24
|
+
/**
|
|
25
|
+
* The environment where the application is running (e.g., 'production', 'staging').
|
|
26
|
+
*/
|
|
27
|
+
environment: string;
|
|
28
|
+
/**
|
|
29
|
+
* (Optional) OTLP collector endpoint.
|
|
30
|
+
*/
|
|
31
|
+
exporterEndpoint?: string;
|
|
32
|
+
/**
|
|
33
|
+
* (Optional) Base URL for the API calls.
|
|
34
|
+
* This allows customization of the API endpoint for sending session data.
|
|
35
|
+
*/
|
|
36
|
+
apiBaseUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* (Optional) An array of URLs or regular expressions that should be ignored by the session debugger.
|
|
39
|
+
* Any URL that partially matches any regex in this array will not be traced.
|
|
40
|
+
* Additionally, URLs that exactly match any string in the array will also be ignored.
|
|
41
|
+
*/
|
|
42
|
+
ignoreUrls?: Array<string | RegExp>;
|
|
43
|
+
/**
|
|
44
|
+
* (Optional) Determines where the record button should be placed on the screen.
|
|
45
|
+
* Possible values:
|
|
46
|
+
* - 'top-left'
|
|
47
|
+
* - 'top-right'
|
|
48
|
+
* - 'bottom-left'
|
|
49
|
+
* - 'bottom-right'
|
|
50
|
+
*/
|
|
51
|
+
widgetButtonPlacement?: WidgetButtonPlacement;
|
|
52
|
+
/**
|
|
53
|
+
* (Optional) Enables the continuous recording feature and UI.
|
|
54
|
+
* If false, the UI toggle is hidden and attempts to start a continuous
|
|
55
|
+
* session are ignored.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
showContinuousRecording?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* (Optional) If false, the session recording widget will be hidden from the UI.
|
|
61
|
+
* Use this option if you want to enable session recording without a visible UI element.
|
|
62
|
+
* @default showWidget = true
|
|
63
|
+
*/
|
|
64
|
+
showWidget?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* (Optional) Trace ID Ratio for sampling
|
|
67
|
+
* @default 0.15
|
|
68
|
+
*/
|
|
69
|
+
sampleTraceRatio?: number;
|
|
70
|
+
/**
|
|
71
|
+
* (Optional) URLs or regex patterns for CORS trace header propagation
|
|
72
|
+
*/
|
|
73
|
+
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls;
|
|
74
|
+
/**
|
|
75
|
+
* (Optional) If true, schematizes document span payload
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
schemifyDocSpanPayload?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* (Optional) Maximum size for capturing HTTP payload
|
|
81
|
+
* @default 100000
|
|
82
|
+
*/
|
|
83
|
+
maxCapturingHttpPayloadSize?: number;
|
|
84
|
+
/**
|
|
85
|
+
* (Optional) If true, uses post message fallback
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
usePostMessageFallback?: boolean;
|
|
89
|
+
/** If true, captures body in traces
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
captureBody?: boolean;
|
|
93
|
+
/** If true, captures headers in traces
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
captureHeaders?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* (Optional) Configuration for masking sensitive data in session recordings
|
|
99
|
+
* @default { maskAllInputs: true, isContentMaskingEnabled: true }
|
|
100
|
+
*/
|
|
101
|
+
masking?: MaskingConfig;
|
|
102
|
+
/**
|
|
103
|
+
* (Optional) Configuration for customizable UI text and labels
|
|
104
|
+
* @default See PopoverTextConfig defaults
|
|
105
|
+
*/
|
|
106
|
+
widgetTextOverrides?: WidgetTextOverridesConfig;
|
|
107
|
+
/** Whether to record gestures */
|
|
108
|
+
recordGestures?: boolean;
|
|
109
|
+
/** Whether to record navigation */
|
|
110
|
+
recordNavigation?: boolean;
|
|
111
|
+
/** Whether to record screen */
|
|
112
|
+
recordScreen?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Interface for masking configuration
|
|
116
|
+
*/
|
|
117
|
+
export interface MaskingConfig {
|
|
118
|
+
/** If true, enables masking for debug span payload in traces
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
121
|
+
isContentMaskingEnabled?: boolean;
|
|
122
|
+
/** Custom function for masking body in traces */
|
|
123
|
+
maskBody?: (payload: any, span: Span) => any;
|
|
124
|
+
/** Custom function for masking headers in traces */
|
|
125
|
+
maskHeaders?: (headers: any, span: any) => any;
|
|
126
|
+
/** List of body fields to mask in traces */
|
|
127
|
+
maskBodyFieldsList?: string[];
|
|
128
|
+
/** List of headers to mask in traces */
|
|
129
|
+
maskHeadersList?: string[];
|
|
130
|
+
/** List of headers to include in traces (if specified, only these headers will be captured) */
|
|
131
|
+
headersToInclude?: string[];
|
|
132
|
+
/** List of headers to exclude from traces */
|
|
133
|
+
headersToExclude?: string[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Base configuration interface with common properties
|
|
137
|
+
*/
|
|
138
|
+
export interface BaseConfig {
|
|
139
|
+
/** API key for authentication */
|
|
140
|
+
apiKey: string;
|
|
141
|
+
/** Base URL for the API calls */
|
|
142
|
+
apiBaseUrl: string;
|
|
143
|
+
/** Base URL for the API calls */
|
|
144
|
+
exporterEndpoint: string;
|
|
145
|
+
/** Whether to use post message fallback */
|
|
146
|
+
usePostMessageFallback?: boolean;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Configuration interface for the Tracer class
|
|
150
|
+
*/
|
|
151
|
+
export type TracerReactNativeMasking = Pick<MaskingConfig, 'isContentMaskingEnabled' | 'maskBody' | 'maskHeaders' | 'maskBodyFieldsList' | 'maskHeadersList' | 'headersToInclude' | 'headersToExclude'>;
|
|
152
|
+
export interface TracerReactNativeConfig extends BaseConfig {
|
|
153
|
+
/** Application name */
|
|
154
|
+
application: string;
|
|
155
|
+
/** Application version */
|
|
156
|
+
version: string;
|
|
157
|
+
/** Environment (e.g., 'production', 'staging') */
|
|
158
|
+
environment: string;
|
|
159
|
+
/** URLs to ignore during tracing */
|
|
160
|
+
ignoreUrls: Array<string | RegExp>;
|
|
161
|
+
/** Trace ID ratio for sampling */
|
|
162
|
+
sampleTraceRatio: number;
|
|
163
|
+
/** URLs for CORS trace header propagation */
|
|
164
|
+
propagateTraceHeaderCorsUrls: PropagateTraceHeaderCorsUrls;
|
|
165
|
+
/** Whether to schematize document span payload */
|
|
166
|
+
schemifyDocSpanPayload: boolean;
|
|
167
|
+
/** Maximum size for capturing HTTP payload */
|
|
168
|
+
maxCapturingHttpPayloadSize: number;
|
|
169
|
+
/** If true, captures body in traces
|
|
170
|
+
* @default true
|
|
171
|
+
*/
|
|
172
|
+
captureBody: boolean;
|
|
173
|
+
/** If true, captures headers in traces
|
|
174
|
+
* @default true
|
|
175
|
+
*/
|
|
176
|
+
captureHeaders: boolean;
|
|
177
|
+
/** Configuration for masking sensitive data in session recordings */
|
|
178
|
+
masking: TracerReactNativeMasking;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Configuration interface for the Recorder class
|
|
182
|
+
*/
|
|
183
|
+
export interface RecorderConfig extends BaseConfig {
|
|
184
|
+
/** Whether to record gestures */
|
|
185
|
+
recordGestures?: boolean;
|
|
186
|
+
/** Whether to record navigation */
|
|
187
|
+
recordNavigation?: boolean;
|
|
188
|
+
/** Whether to record screen */
|
|
189
|
+
recordScreen?: boolean;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Configuration interface for the SessionWidget class
|
|
193
|
+
*/
|
|
194
|
+
export interface SessionWidgetConfig {
|
|
195
|
+
/** Whether to show the widget */
|
|
196
|
+
showWidget: boolean;
|
|
197
|
+
/** Placement of the widget button */
|
|
198
|
+
widgetButtonPlacement: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
199
|
+
/** Whether continuous recording feature is enabled */
|
|
200
|
+
showContinuousRecording: boolean;
|
|
201
|
+
/** Configuration for customizable UI text and labels */
|
|
202
|
+
widgetTextOverrides: WidgetTextOverridesConfig;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Interface for customizable widget text configuration
|
|
206
|
+
*/
|
|
207
|
+
export interface WidgetTextOverridesConfig {
|
|
208
|
+
/** Title for the initial popover when continuous recording is enabled */
|
|
209
|
+
initialTitleWithContinuous?: string;
|
|
210
|
+
/** Title for the initial popover when continuous recording is disabled */
|
|
211
|
+
initialTitleWithoutContinuous?: string;
|
|
212
|
+
/** Description for the initial popover when continuous recording is enabled */
|
|
213
|
+
initialDescriptionWithContinuous?: string;
|
|
214
|
+
/** Description for the initial popover when continuous recording is disabled */
|
|
215
|
+
initialDescriptionWithoutContinuous?: string;
|
|
216
|
+
/** Label for the continuous recording toggle */
|
|
217
|
+
continuousRecordingLabel?: string;
|
|
218
|
+
/** Text for the start recording button */
|
|
219
|
+
startRecordingButtonText?: string;
|
|
220
|
+
/** Title for the final popover */
|
|
221
|
+
finalTitle?: string;
|
|
222
|
+
/** Description for the final popover */
|
|
223
|
+
finalDescription?: string;
|
|
224
|
+
/** Placeholder text for the comment textarea */
|
|
225
|
+
commentPlaceholder?: string;
|
|
226
|
+
/** Text for the save button in final popover */
|
|
227
|
+
saveButtonText?: string;
|
|
228
|
+
/** Text for the cancel button in final popover */
|
|
229
|
+
cancelButtonText?: string;
|
|
230
|
+
/** Title for the continuous recording overlay */
|
|
231
|
+
continuousOverlayTitle?: string;
|
|
232
|
+
/** Description for the continuous recording overlay */
|
|
233
|
+
continuousOverlayDescription?: string;
|
|
234
|
+
/** Text for the save last snapshot button */
|
|
235
|
+
saveLastSnapshotButtonText?: string;
|
|
236
|
+
/** Title for the submit session dialog */
|
|
237
|
+
submitDialogTitle?: string;
|
|
238
|
+
/** Subtitle for the submit session dialog */
|
|
239
|
+
submitDialogSubtitle?: string;
|
|
240
|
+
/** Label for the comment field in submit dialog */
|
|
241
|
+
submitDialogCommentLabel?: string;
|
|
242
|
+
/** Placeholder for the comment field in submit dialog */
|
|
243
|
+
submitDialogCommentPlaceholder?: string;
|
|
244
|
+
/** Text for the submit button in dialog */
|
|
245
|
+
submitDialogSubmitText?: string;
|
|
246
|
+
/** Text for the cancel button in dialog */
|
|
247
|
+
submitDialogCancelText?: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Configuration interface for the ApiService class
|
|
251
|
+
*/
|
|
252
|
+
export interface ApiServiceConfig extends BaseConfig {
|
|
253
|
+
}
|
|
254
|
+
export interface SessionRecorderConfigs extends Required<SessionRecorderOptions> {
|
|
255
|
+
}
|
|
256
|
+
export declare enum SessionState {
|
|
257
|
+
started = "2",
|
|
258
|
+
paused = "1",
|
|
259
|
+
stopped = "0"
|
|
260
|
+
}
|
|
261
|
+
export interface ISessionRecorder {
|
|
262
|
+
/**
|
|
263
|
+
* The current session ID
|
|
264
|
+
*/
|
|
265
|
+
readonly sessionId: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Whether continuous recording is enabled
|
|
268
|
+
*/
|
|
269
|
+
readonly continuousRecording: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* The current debug session object
|
|
272
|
+
*/
|
|
273
|
+
readonly session: ISession | null;
|
|
274
|
+
/**
|
|
275
|
+
* The type of session (plain or continuous)
|
|
276
|
+
*/
|
|
277
|
+
readonly sessionType: SessionType;
|
|
278
|
+
/**
|
|
279
|
+
* The current state of the session
|
|
280
|
+
*/
|
|
281
|
+
readonly sessionState: SessionState | null;
|
|
282
|
+
/**
|
|
283
|
+
* Session attributes for additional context
|
|
284
|
+
*/
|
|
285
|
+
readonly sessionAttributes: Record<string, any>;
|
|
286
|
+
/**
|
|
287
|
+
* Current error message
|
|
288
|
+
*/
|
|
289
|
+
error: string;
|
|
290
|
+
/**
|
|
291
|
+
* The HTML button element for the session widget's recorder button
|
|
292
|
+
*/
|
|
293
|
+
readonly sessionWidgetButtonElement: HTMLButtonElement;
|
|
294
|
+
/**
|
|
295
|
+
* Initialize the session debugger with custom configurations
|
|
296
|
+
* @param configs - custom configurations for session debugger
|
|
297
|
+
*/
|
|
298
|
+
init(configs: SessionRecorderOptions): void;
|
|
299
|
+
/**
|
|
300
|
+
* Save the continuous recording session
|
|
301
|
+
* @returns Promise that resolves to the save response
|
|
302
|
+
*/
|
|
303
|
+
save(): Promise<any>;
|
|
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
|
+
* Stop the current session with an optional comment
|
|
312
|
+
* @param comment - user-provided comment to include in session feedback metadata
|
|
313
|
+
*/
|
|
314
|
+
stop(comment?: string): Promise<void>;
|
|
315
|
+
/**
|
|
316
|
+
* Cancel the current session
|
|
317
|
+
*/
|
|
318
|
+
cancel(): Promise<void>;
|
|
319
|
+
/**
|
|
320
|
+
* Pause the current session
|
|
321
|
+
*/
|
|
322
|
+
pause(): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Resume the current session
|
|
325
|
+
*/
|
|
326
|
+
resume(): Promise<void>;
|
|
327
|
+
/**
|
|
328
|
+
* Set the session metadata
|
|
329
|
+
* @param attributes - the attributes to set
|
|
330
|
+
*/
|
|
331
|
+
setSessionAttributes(attributes: Record<string, any>): void;
|
|
332
|
+
/**
|
|
333
|
+
* Set a custom click handler for the recording button
|
|
334
|
+
* @param handler - function that will be invoked when the button is clicked
|
|
335
|
+
*/
|
|
336
|
+
set recordingButtonClickHandler(handler: () => boolean | void);
|
|
337
|
+
}
|
|
338
|
+
export type Breaker = {};
|
|
339
|
+
export interface ScreenEvent {
|
|
340
|
+
screenName: string;
|
|
341
|
+
timestamp: number;
|
|
342
|
+
params?: Record<string, any>;
|
|
343
|
+
type?: string;
|
|
344
|
+
metadata?: Record<string, any>;
|
|
345
|
+
dataUrl?: string;
|
|
346
|
+
}
|
|
347
|
+
export interface GestureEvent {
|
|
348
|
+
type: string;
|
|
349
|
+
timestamp: number;
|
|
350
|
+
x?: number;
|
|
351
|
+
y?: number;
|
|
352
|
+
direction?: string;
|
|
353
|
+
target?: string;
|
|
354
|
+
coordinates?: {
|
|
355
|
+
x: number;
|
|
356
|
+
y: number;
|
|
357
|
+
};
|
|
358
|
+
metadata?: Record<string, any>;
|
|
359
|
+
}
|
|
360
|
+
export interface NavigationEvent {
|
|
361
|
+
type: string;
|
|
362
|
+
timestamp: number;
|
|
363
|
+
routeName?: string;
|
|
364
|
+
params?: Record<string, any>;
|
|
365
|
+
metadata?: Record<string, any>;
|
|
366
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WidgetButtonPlacement=exports.SessionState=void 0;var WidgetButtonPlacement;(function(WidgetButtonPlacement){WidgetButtonPlacement["topLeft"]="top-left";WidgetButtonPlacement["topRight"]="top-right";WidgetButtonPlacement["bottomLeft"]="bottom-left";WidgetButtonPlacement["bottomRight"]="bottom-right";})(WidgetButtonPlacement||(exports.WidgetButtonPlacement=WidgetButtonPlacement={}));var SessionState;(function(SessionState){SessionState["started"]="2";SessionState["paused"]="1";SessionState["stopped"]="0";})(SessionState||(exports.SessionState=SessionState={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-recorder.js","sourceRoot":"","sources":["../../src/types/session-recorder.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,6CAAoB,CAAA;IACpB,+CAAsB,CAAA;IACtB,mDAA0B,CAAA;IAC1B,qDAA4B,CAAA;AAC9B,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AA0RD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,4BAAY,CAAA;IACZ,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SessionType } from '@multiplayer-app/session-recorder-common';
|
|
2
|
+
export interface IResourceAttributes {
|
|
3
|
+
browserInfo?: string;
|
|
4
|
+
cookiesEnabled?: string;
|
|
5
|
+
deviceInfo?: string;
|
|
6
|
+
hardwareConcurrency?: number;
|
|
7
|
+
osInfo?: string;
|
|
8
|
+
pixelRatio?: number;
|
|
9
|
+
screenSize?: string;
|
|
10
|
+
packageVersion?: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface ISessionAttributes {
|
|
14
|
+
userEmail?: string;
|
|
15
|
+
userId?: string;
|
|
16
|
+
userName?: string;
|
|
17
|
+
accountId?: string;
|
|
18
|
+
accountName?: string;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
export interface ISessionView {
|
|
22
|
+
_id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
components?: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface ISession {
|
|
27
|
+
_id: string;
|
|
28
|
+
shortId: string;
|
|
29
|
+
workspace: string;
|
|
30
|
+
project: string;
|
|
31
|
+
continuousDebugSession?: string;
|
|
32
|
+
creationType: SessionType;
|
|
33
|
+
name: string;
|
|
34
|
+
startedAt: string | Date;
|
|
35
|
+
stoppedAt: string | Date;
|
|
36
|
+
durationInSeconds?: number;
|
|
37
|
+
createdAt: string | Date;
|
|
38
|
+
updatedAt: string | Date;
|
|
39
|
+
tags: any[];
|
|
40
|
+
resourceAttributes?: IResourceAttributes;
|
|
41
|
+
sessionAttributes?: ISessionAttributes;
|
|
42
|
+
views: ISessionView[];
|
|
43
|
+
starred: boolean;
|
|
44
|
+
starredItems: string[];
|
|
45
|
+
s3Files: {
|
|
46
|
+
_id?: string;
|
|
47
|
+
bucket: string;
|
|
48
|
+
key: string;
|
|
49
|
+
dataType: DebugSessionDataType;
|
|
50
|
+
url?: string;
|
|
51
|
+
}[];
|
|
52
|
+
finishedS3Transfer?: boolean;
|
|
53
|
+
tempApiKey?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare enum DebugSessionDataType {
|
|
56
|
+
OTLP_TRACES = "OTLP_TRACES",
|
|
57
|
+
OTLP_LOGS = "OTLP_LOGS",
|
|
58
|
+
RRWEB_EVENTS = "RRWEB_EVENTS"
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DebugSessionDataType=void 0;var DebugSessionDataType;(function(DebugSessionDataType){DebugSessionDataType["OTLP_TRACES"]="OTLP_TRACES";DebugSessionDataType["OTLP_LOGS"]="OTLP_LOGS";DebugSessionDataType["RRWEB_EVENTS"]="RRWEB_EVENTS";})(DebugSessionDataType||(exports.DebugSessionDataType=DebugSessionDataType={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AA4DA,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,mDAA2B,CAAA;IAC3B,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;AAC/B,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./platform");Object.keys(_platform).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_platform[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _platform[key];}});});var _session=require("./session");Object.keys(_session).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_session[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _session[key];}});});var _time=require("./time");Object.keys(_time).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_time[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _time[key];}});});var _typeUtils=require("./type-utils");Object.keys(_typeUtils).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_typeUtils[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _typeUtils[key];}});});var _requestUtils=require("./request-utils");Object.keys(_requestUtils).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_requestUtils[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _requestUtils[key];}});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
|
package/dist/utils/platform.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IResourceAttributes } from '../types';
|
|
1
2
|
export interface PlatformInfo {
|
|
2
3
|
isExpo: boolean;
|
|
3
4
|
isReactNative: boolean;
|
|
@@ -6,4 +7,8 @@ export interface PlatformInfo {
|
|
|
6
7
|
expoVersion?: string;
|
|
7
8
|
deviceType: string;
|
|
8
9
|
}
|
|
10
|
+
export declare function detectPlatform(): PlatformInfo;
|
|
11
|
+
export declare function getPlatformAttributes(): Record<string, any>;
|
|
12
|
+
export declare function isExpoEnvironment(): boolean;
|
|
9
13
|
export declare function isReactNativeEnvironment(): boolean;
|
|
14
|
+
export declare const getNavigatorInfo: () => IResourceAttributes;
|
package/dist/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.detectPlatform=detectPlatform;exports.getPlatformAttributes=getPlatformAttributes;exports.isExpoEnvironment=isExpoEnvironment;exports.isReactNativeEnvironment=isReactNativeEnvironment;function detectPlatform(){var _a,_b,_c,_d;try{var expoConstants=require('expo-constants');var isExpo=!!((_a=expoConstants["default"])===null||_a===void 0?void 0:_a.expoVersion)||!!expoConstants.expoVersion;if(isExpo){var expoVersion=((_b=expoConstants["default"])===null||_b===void 0?void 0:_b.expoVersion)||expoConstants.expoVersion;var platform=((_c=expoConstants["default"])===null||_c===void 0?void 0:_c.platform)||expoConstants.platform;return{isExpo:true,isReactNative:true,platform:(platform===null||platform===void 0?void 0:platform.ios)?'ios':(platform===null||platform===void 0?void 0:platform.android)?'android':'unknown',expoVersion:expoVersion,deviceType:'expo'};}var _require=require('react-native'),Platform=_require.Platform;return{isExpo:false,isReactNative:true,platform:Platform.OS,platformVersion:(_d=Platform.Version)===null||_d===void 0?void 0:_d.toString(),deviceType:Platform.OS};}catch(error){return{isExpo:false,isReactNative:false,platform:'unknown',deviceType:'unknown'};}}function getPlatformAttributes(){var platformInfo=detectPlatform();var attributes={'platform':platformInfo.isExpo?'expo':'react-native','device.type':platformInfo.deviceType};if(platformInfo.platformVersion){attributes['platform.version']=platformInfo.platformVersion;}if(platformInfo.expoVersion){attributes['expo.version']=platformInfo.expoVersion;}return attributes;}function isExpoEnvironment(){return detectPlatform().isExpo;}function isReactNativeEnvironment(){return detectPlatform().isReactNative;}
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.detectPlatform=detectPlatform;exports.getNavigatorInfo=void 0;exports.getPlatformAttributes=getPlatformAttributes;exports.isExpoEnvironment=isExpoEnvironment;exports.isReactNativeEnvironment=isReactNativeEnvironment;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function detectPlatform(){var _a,_b,_c,_d;try{var expoConstants=require('expo-constants');var isExpo=!!((_a=expoConstants["default"])===null||_a===void 0?void 0:_a.expoVersion)||!!expoConstants.expoVersion;if(isExpo){var expoVersion=((_b=expoConstants["default"])===null||_b===void 0?void 0:_b.expoVersion)||expoConstants.expoVersion;var platform=((_c=expoConstants["default"])===null||_c===void 0?void 0:_c.platform)||expoConstants.platform;return{isExpo:true,isReactNative:true,platform:(platform===null||platform===void 0?void 0:platform.ios)?'ios':(platform===null||platform===void 0?void 0:platform.android)?'android':'unknown',expoVersion:expoVersion,deviceType:'expo'};}var _require=require('react-native'),Platform=_require.Platform;return{isExpo:false,isReactNative:true,platform:Platform.OS,platformVersion:(_d=Platform.Version)===null||_d===void 0?void 0:_d.toString(),deviceType:Platform.OS};}catch(error){return{isExpo:false,isReactNative:false,platform:'unknown',deviceType:'unknown'};}}function getPlatformAttributes(){var platformInfo=detectPlatform();var attributes={'platform':platformInfo.isExpo?'expo':'react-native','device.type':platformInfo.deviceType};if(platformInfo.platformVersion){attributes['platform.version']=platformInfo.platformVersion;}if(platformInfo.expoVersion){attributes['expo.version']=platformInfo.expoVersion;}return attributes;}function isExpoEnvironment(){return detectPlatform().isExpo;}function isReactNativeEnvironment(){return detectPlatform().isReactNative;}var getNavigatorInfo=exports.getNavigatorInfo=function getNavigatorInfo(){return _objectSpread({platform:'react-native',userAgent:'React Native',language:'en',timestamp:new Date().toISOString()},getPlatformAttributes());};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,cAAc;;IAC5B,IAAI,CAAC;QACH,wCAAwC;QACxC,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;QAC/C,MAAM,MAAM,GAAG,CAAC,CAAC,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,WAAW,CAAA,IAAI,CAAC,CAAC,aAAa,CAAC,WAAW,CAAA;QAElF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,WAAW,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,WAAW,KAAI,aAAa,CAAC,WAAW,CAAA;YACnF,MAAM,QAAQ,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,QAAQ,KAAI,aAAa,CAAC,QAAQ,CAAA;YAE1E,OAAO;gBACL,MAAM,EAAE,IAAI;gBACZ,aAAa,EAAE,IAAI;gBACnB,QAAQ,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,EAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBAC3E,WAAW;gBACX,UAAU,EAAE,MAAM;aACnB,CAAA;QACH,CAAC;QAED,qCAAqC;QACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;QAE5C,OAAO;YACL,MAAM,EAAE,KAAK;YACb,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,QAAQ,CAAC,EAA2C;YAC9D,eAAe,EAAE,MAAA,QAAQ,CAAC,OAAO,0CAAE,QAAQ,EAAE;YAC7C,UAAU,EAAE,QAAQ,CAAC,EAAE;SACxB,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,yCAAyC;QACzC,OAAO;YACL,MAAM,EAAE,KAAK;YACb,aAAa,EAAE,KAAK;YACpB,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE,SAAS;SACtB,CAAA;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,MAAM,YAAY,GAAG,cAAc,EAAE,CAAA;IAErC,MAAM,UAAU,GAAwB;QACtC,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc;QACzD,aAAa,EAAE,YAAY,CAAC,UAAU;KACvC,CAAA;IAED,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;QACjC,UAAU,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAAC,eAAe,CAAA;IAC/D,CAAC;IAED,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,UAAU,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,WAAW,CAAA;IACvD,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,cAAc,EAAE,CAAC,MAAM,CAAA;AAChC,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO,cAAc,EAAE,CAAC,aAAa,CAAA;AACvC,CAAC;AAGD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAwB,EAAE;IACxD,OAAO;QACL,QAAQ,EAAE,cAAc;QACxB,SAAS,EAAE,cAAc;QACzB,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,GAAG,qBAAqB,EAAE;KAC3B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request utility functions for React Native
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert FormData to query string (React Native compatible)
|
|
6
|
+
* @param formData - FormData object
|
|
7
|
+
* @returns Query string
|
|
8
|
+
*/
|
|
9
|
+
export declare const formDataToQuery: (formData: any) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Convert object to query string
|
|
12
|
+
* @param obj - Object to convert
|
|
13
|
+
* @returns Query string
|
|
14
|
+
*/
|
|
15
|
+
export declare const objectToQuery: (obj: Record<string, any>) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Parse query string to object
|
|
18
|
+
* @param queryString - Query string to parse
|
|
19
|
+
* @returns Object with parsed parameters
|
|
20
|
+
*/
|
|
21
|
+
export declare const queryToObject: (queryString: string) => Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.queryToObject=exports.objectToQuery=exports.formDataToQuery=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var formDataToQuery=exports.formDataToQuery=function formDataToQuery(formData){if(!formData)return'';var params=new URLSearchParams();if(typeof formData.entries==='function'){var _iterator=_createForOfIteratorHelper(formData.entries()),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _step$value=(0,_slicedToArray2["default"])(_step.value,2),key=_step$value[0],value=_step$value[1];params.append(key,value);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}else if((0,_typeof2["default"])(formData)==='object'){for(var _i=0,_Object$entries=Object.entries(formData);_i<_Object$entries.length;_i++){var _Object$entries$_i=(0,_slicedToArray2["default"])(_Object$entries[_i],2),_key=_Object$entries$_i[0],_value=_Object$entries$_i[1];params.append(_key,String(_value));}}return params.toString();};var objectToQuery=exports.objectToQuery=function objectToQuery(obj){var params=new URLSearchParams();for(var _i2=0,_Object$entries2=Object.entries(obj);_i2<_Object$entries2.length;_i2++){var _Object$entries2$_i=(0,_slicedToArray2["default"])(_Object$entries2[_i2],2),key=_Object$entries2$_i[0],value=_Object$entries2$_i[1];if(value!==null&&value!==undefined){params.append(key,String(value));}}return params.toString();};var queryToObject=exports.queryToObject=function queryToObject(queryString){var params=new URLSearchParams(queryString);var obj={};var _iterator2=_createForOfIteratorHelper(params.entries()),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _step2$value=(0,_slicedToArray2["default"])(_step2.value,2),key=_step2$value[0],value=_step2$value[1];obj[key]=value;}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return obj;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-utils.js","sourceRoot":"","sources":["../../src/utils/request-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAa,EAAU,EAAE;IACvD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAA;IAExB,mDAAmD;IACnD,sCAAsC;IACtC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAA;IAEpC,IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAe,CAAC,CAAA;QACrC,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAA;AAC1B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAwB,EAAU,EAAE;IAChE,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAA;IAEpC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC1C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAA;AAC1B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAmB,EAA0B,EAAE;IAC3E,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAA;IAC/C,MAAM,GAAG,GAA2B,EAAE,CAAA;IAEtC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IAClB,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isSessionActive=exports.isConsoleEvent=void 0;var _constants=require("../config/constants");var isSessionActive=exports.isSessionActive=function isSessionActive(session,continuousRecording){if(!session)return false;if(continuousRecording)return true;var startedAt=new Date(session.startedAt||session.createdAt);var now=new Date();var diff=now.getTime()-startedAt.getTime();return diff<_constants.DEBUG_SESSION_MAX_DURATION_SECONDS*1000;};var isConsoleEvent=exports.isConsoleEvent=function isConsoleEvent(event){var _a;return event.type==='Plugin'&&((_a=event.data)===null||_a===void 0?void 0:_a.plugin)==='rrweb/console@1';};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAA;AAExE;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAY,EAAE,mBAA4B,EAAW,EAAE;IACrF,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,IAAI,mBAAmB;QAAE,OAAO,IAAI,CAAA;IACpC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAA;IAClE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;IACtB,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;IAChD,OAAO,IAAI,GAAG,kCAAkC,GAAG,IAAI,CAAA;AACzD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAU,EAAW,EAAE;;IACpD,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,MAAM,MAAK,iBAAiB,CAAA;AAC5E,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getFormattedDate=void 0;var getFormattedDate=exports.getFormattedDate=function getFormattedDate(date,options){return new Date(date).toLocaleDateString('en-US',options||{month:'short',year:'numeric',day:'numeric',hour:'numeric',minute:'2-digit',second:'2-digit'});};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAmB,EAAE,OAAa,EAAU,EAAE;IAC7E,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CACtC,OAAO,EACP,OAAO,IAAI;QACT,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const hasOwnProperty: (v: PropertyKey) => boolean;
|
|
2
|
+
export declare const isArray: (arg: any) => arg is any[];
|
|
3
|
+
export declare const isUint8Array: (x: unknown) => x is Uint8Array;
|
|
4
|
+
export declare const isFunction: (f: any) => f is (...args: any[]) => any;
|
|
5
|
+
export declare const isObject: (x: unknown) => x is Record<string, any>;
|
|
6
|
+
export declare const isEmptyObject: (x: unknown) => x is Record<string, any>;
|
|
7
|
+
export declare const isUndefined: (x: unknown) => x is undefined;
|
|
8
|
+
export declare const isString: (x: unknown) => x is string;
|
|
9
|
+
export declare const isEmptyString: (x: unknown) => boolean;
|
|
10
|
+
export declare const isNull: (x: unknown) => x is null;
|
|
11
|
+
export declare const isNullish: (x: unknown) => x is null | undefined;
|
|
12
|
+
export declare const isDate: (x: unknown) => x is Date;
|
|
13
|
+
export declare const isNumber: (x: unknown) => x is number;
|
|
14
|
+
export declare const isBoolean: (x: unknown) => x is boolean;
|
|
15
|
+
export declare const isFormData: (x: unknown) => x is FormData;
|
|
16
|
+
export declare const isFile: (x: unknown) => x is File;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isUndefined=exports.isUint8Array=exports.isString=exports.isObject=exports.isNumber=exports.isNullish=exports.isNull=exports.isFunction=exports.isFormData=exports.isFile=exports.isEmptyString=exports.isEmptyObject=exports.isDate=exports.isBoolean=exports.isArray=exports.hasOwnProperty=void 0;var nativeIsArray=Array.isArray;var ObjProto=Object.prototype;var hasOwnProperty=exports.hasOwnProperty=ObjProto.hasOwnProperty;var toString=ObjProto.toString;var isArray=exports.isArray=nativeIsArray||function(obj){return toString.call(obj)==='[object Array]';};var isUint8Array=exports.isUint8Array=function isUint8Array(x){return toString.call(x)==='[object Uint8Array]';};var isFunction=exports.isFunction=function isFunction(f){return typeof f==='function';};var isObject=exports.isObject=function isObject(x){return x===Object(x)&&!isArray(x);};var isEmptyObject=exports.isEmptyObject=function isEmptyObject(x){if(isObject(x)){for(var key in x){if(hasOwnProperty.call(x,key)){return false;}}return true;}return false;};var isUndefined=exports.isUndefined=function isUndefined(x){return x===void 0;};var isString=exports.isString=function isString(x){return toString.call(x)=='[object String]';};var isEmptyString=exports.isEmptyString=function isEmptyString(x){return isString(x)&&x.trim().length===0;};var isNull=exports.isNull=function isNull(x){return x===null;};var isNullish=exports.isNullish=function isNullish(x){return isUndefined(x)||isNull(x);};var isDate=exports.isDate=function isDate(x){return toString.call(x)=='[object Date]';};var isNumber=exports.isNumber=function isNumber(x){return toString.call(x)=='[object Number]';};var isBoolean=exports.isBoolean=function isBoolean(x){return toString.call(x)==='[object Boolean]';};var isFormData=exports.isFormData=function isFormData(x){return x instanceof FormData;};var isFile=exports.isFile=function isFile(x){return x instanceof File;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../src/utils/type-utils.ts"],"names":[],"mappings":"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"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.1-alpha.
|
|
1
|
+
export declare const version = "0.0.1-alpha.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="0.0.1-alpha.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="0.0.1-alpha.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplayer-app/session-recorder-react-native",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
4
|
"description": "Multiplayer Fullstack Session Recorder for React Native",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Multiplayer Software, Inc.",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@opentelemetry/api": "1.9.0",
|
|
91
|
-
"expo": "^49.0.0 || ^52.0.0",
|
|
91
|
+
"expo": "^49.0.0 || ^52.0.0 || ^53.0.0",
|
|
92
92
|
"react": "^18.0.0 || ^19.0.0",
|
|
93
93
|
"react-native": "^0.72.0 || ^0.81.0"
|
|
94
94
|
},
|