File tree 4 files changed +10
-3
lines changed
4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { captureUnhandledRejections } from '../utils/UnhandledRejectionTracking'
26
26
import type { ReproConfig } from '../models/ReproConfig' ;
27
27
import type { FeatureFlag } from '../models/FeatureFlag' ;
28
28
import InstabugConstants from '../utils/InstabugConstants' ;
29
+ import { InstabugRNConfig } from '../utils/config' ;
29
30
30
31
let _currentScreen : string | null = null ;
31
32
let _lastScreen : string | null = null ;
@@ -637,7 +638,7 @@ export const willRedirectToStore = () => {
637
638
* This API has be called when changing the default Metro server port (8081) to exclude the DEV URL from network logging.
638
639
*/
639
640
export const setMetroDevServerPort = ( port : number ) => {
640
- InstabugConstants . METRO_SERVER_URL = port . toString ( ) ;
641
+ InstabugRNConfig . metroDevServerPort = port . toString ( ) ;
641
642
} ;
642
643
643
644
export const componentDidAppearListener = ( event : ComponentDidAppearEvent ) => {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { RequestHandler } from '@apollo/client';
3
3
import InstabugConstants from '../utils/InstabugConstants' ;
4
4
import xhr , { NetworkData , ProgressCallback } from '../utils/XhrNetworkInterceptor' ;
5
5
import { isContentTypeNotAllowed , reportNetworkLog } from '../utils/InstabugUtils' ;
6
+ import { InstabugRNConfig } from '../utils/config' ;
6
7
7
8
export type { NetworkData } ;
8
9
@@ -34,7 +35,7 @@ export const setEnabled = (isEnabled: boolean) => {
34
35
35
36
if ( __DEV__ ) {
36
37
const urlPort = getPortFromUrl ( network . url ) ;
37
- if ( urlPort === InstabugConstants . METRO_SERVER_URL ) {
38
+ if ( urlPort === InstabugRNConfig . metroDevServerPort ) {
38
39
return ;
39
40
}
40
41
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const InstabugConstants = {
11
11
'IBG-RN: Expected key and value passed to setUserAttribute to be of type string' ,
12
12
REMOVE_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE :
13
13
'IBG-RN: Expected key and value passed to removeUserAttribute to be of type string' ,
14
- METRO_SERVER_URL : '8081' ,
14
+ DEFAULT_METRO_SERVER_URL : '8081' ,
15
15
} ;
16
16
17
17
export default InstabugConstants ;
Original file line number Diff line number Diff line change
1
+ import InstabugConstants from './InstabugConstants' ;
2
+
3
+ export const InstabugRNConfig = {
4
+ metroDevServerPort : InstabugConstants . DEFAULT_METRO_SERVER_URL ,
5
+ } ;
You can’t perform that action at this time.
0 commit comments