noibu-react-native 0.0.6 → 0.0.8
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/api/clientConfig.js +3 -2
- package/dist/api/metroplexSocket.js +5 -10
- package/dist/api/storedMetrics.js +3 -2
- package/dist/constants.js +1 -2
- package/dist/entry/init.js +7 -7
- package/dist/monitors/AppNavigationMonitor.d.ts +23 -0
- package/dist/monitors/AppNavigationMonitor.js +63 -0
- package/dist/monitors/clickMonitor.js +1 -1
- package/dist/monitors/httpDataBundler.js +3 -2
- package/dist/monitors/integrations/react-native-navigation-integration.d.ts +19 -0
- package/dist/monitors/integrations/react-native-navigation-integration.js +38 -0
- package/dist/monitors/keyboardInputMonitor.js +0 -1
- package/dist/monitors/requestMonitor.js +2 -1
- package/dist/pageVisit/pageVisitEventError/pageVisitEventError.js +6 -4
- package/dist/types/NavigationIntegration.d.ts +7 -0
- package/dist/types/ReactNative.d.ts +2 -1
- package/dist/utils/function.d.ts +0 -9
- package/dist/utils/function.js +11 -30
- package/package.json +5 -3
- package/dist/monitors/locationChangeMonitor.js +0 -18
package/dist/api/clientConfig.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import uuid from 'react-native-uuid';
|
|
2
2
|
import { MAX_METROPLEX_SOCKET_INNACTIVE_TIME, SEVERITY, NOIBU_BROWSER_ID_KYWRD, PV_SEQ_NUM_RESET_TIME_MINUTES, JS_ENV, MAX_PAGEVISIT_VISITED, CLIENT_LOCK_TIME_MINUTES, GET_SCRIPT_ID, MAX_COLLECT_ERROR_LOG } from '../constants.js';
|
|
3
|
-
import { stringifyJSON, getUserAgent, asString,
|
|
3
|
+
import { stringifyJSON, getUserAgent, asString, makeRequest } from '../utils/function.js';
|
|
4
4
|
import Storage from '../storage/storage.js';
|
|
5
|
+
import { AppNavigationMonitor } from '../monitors/AppNavigationMonitor.js';
|
|
5
6
|
|
|
6
7
|
/** @module ClientConfig */
|
|
7
8
|
/**
|
|
@@ -306,7 +307,7 @@ class ClientConfig {
|
|
|
306
307
|
'maximum limit of collect errors sent.';
|
|
307
308
|
}
|
|
308
309
|
const errorContent = {
|
|
309
|
-
url:
|
|
310
|
+
url: AppNavigationMonitor.getInstance().globalUrl,
|
|
310
311
|
err_msg: errMsg,
|
|
311
312
|
sev: severity,
|
|
312
313
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import uuid from 'react-native-uuid';
|
|
2
|
-
import {
|
|
2
|
+
import { getUserAgent, stringifyJSON } from '../utils/function.js';
|
|
3
3
|
import { addSafeEventListener } from '../utils/eventlistener.js';
|
|
4
|
-
import { GET_METROPLEX_BASE_SOCKET_URL, METROPLEX_FRAG_ROUTE, GET_METROPLEX_POST_URL, METROPLEX_RETRY_FREQUENCY, META_DATA_METROPLEX_TYPE, PAGE_VISIT_META_DATA_ATT_NAME, HTTP_DATA_METROPLEX_TYPE, PAGE_VISIT_HTTP_DATA_ATT_NAME, VIDEO_METROPLEX_TYPE, PAGE_VISIT_VID_FRAG_ATT_NAME, PV_METROPLEX_TYPE, PAGE_VISIT_PART_ATT_NAME, SEQ_NUM_ATT_NAME, WORK_REQUEST_ATT_NAME, PV_EVENTS_ATT_NAME, TYPE_ATT_NAME, USERSTEP_EVENT_TYPE, GET_MAX_METROPLEX_RECONNECTION_NUMBER, MAX_METROPLEX_CONNECTION_COUNT, GET_METROPLEX_CONSECUTIVE_CONNECTION_DELAY, END_AT_ATT_NAME, SEVERITY, OK_SOCKET_MESSAGE, CLOSE_CONNECTION_FORCEFULLY, BLOCK_SOCKET_MESSAGE, STOP_STORING_PV_SOCKET_MESSAGE, STOP_STORING_VID_SOCKET_MESSAGE, MAX_BEACON_PAYLOAD_SIZE, PAGE_VISIT_INFORMATION_ATT_NAME, VIDEO_PART_COUNT_ATT_NAME, IS_LAST_ATT_NAME, BROWSER_ID_ATT_NAME, PV_ID_ATT_NAME, VER_ATT_NAME, CURRENT_PV_VERSION, PV_SEQ_ATT_NAME, ON_URL_ATT_NAME, REF_URL_ATT_NAME, STARTED_AT_ATT_NAME, CONN_COUNT_ATT_NAME, COLLECT_VER_ATT_NAME, CURRENT_NOIBUJS_VERSION, SCRIPT_ID_ATT_NAME, GET_SCRIPT_ID, SCRIPT_INSTANCE_ID_ATT_NAME, METROPLEX_SOCKET_INSTANCE_ID_ATT_NAME, SOCKET_INSTANCE_ID_ATT_NAME,
|
|
4
|
+
import { GET_METROPLEX_BASE_SOCKET_URL, METROPLEX_FRAG_ROUTE, GET_METROPLEX_POST_URL, METROPLEX_RETRY_FREQUENCY, META_DATA_METROPLEX_TYPE, PAGE_VISIT_META_DATA_ATT_NAME, HTTP_DATA_METROPLEX_TYPE, PAGE_VISIT_HTTP_DATA_ATT_NAME, VIDEO_METROPLEX_TYPE, PAGE_VISIT_VID_FRAG_ATT_NAME, PV_METROPLEX_TYPE, PAGE_VISIT_PART_ATT_NAME, SEQ_NUM_ATT_NAME, WORK_REQUEST_ATT_NAME, PV_EVENTS_ATT_NAME, TYPE_ATT_NAME, USERSTEP_EVENT_TYPE, GET_MAX_METROPLEX_RECONNECTION_NUMBER, MAX_METROPLEX_CONNECTION_COUNT, GET_METROPLEX_CONSECUTIVE_CONNECTION_DELAY, END_AT_ATT_NAME, SEVERITY, OK_SOCKET_MESSAGE, CLOSE_CONNECTION_FORCEFULLY, BLOCK_SOCKET_MESSAGE, STOP_STORING_PV_SOCKET_MESSAGE, STOP_STORING_VID_SOCKET_MESSAGE, MAX_BEACON_PAYLOAD_SIZE, PAGE_VISIT_INFORMATION_ATT_NAME, VIDEO_PART_COUNT_ATT_NAME, IS_LAST_ATT_NAME, BROWSER_ID_ATT_NAME, PV_ID_ATT_NAME, VER_ATT_NAME, CURRENT_PV_VERSION, PV_SEQ_ATT_NAME, ON_URL_ATT_NAME, REF_URL_ATT_NAME, STARTED_AT_ATT_NAME, CONN_COUNT_ATT_NAME, COLLECT_VER_ATT_NAME, CURRENT_NOIBUJS_VERSION, SCRIPT_ID_ATT_NAME, GET_SCRIPT_ID, SCRIPT_INSTANCE_ID_ATT_NAME, METROPLEX_SOCKET_INSTANCE_ID_ATT_NAME, SOCKET_INSTANCE_ID_ATT_NAME, HELP_CODE_ATT_NAME } from '../constants.js';
|
|
5
5
|
import ClientConfig from './clientConfig.js';
|
|
6
6
|
import StoredMetrics from './storedMetrics.js';
|
|
7
7
|
import StoredPageVisit from './storedPageVisit.js';
|
|
8
8
|
import { safePerformanceNow } from '../utils/performance.js';
|
|
9
9
|
import { isDateOverwritten } from '../utils/date.js';
|
|
10
10
|
import HelpCode from './helpCode.js';
|
|
11
|
+
import { AppNavigationMonitor } from '../monitors/AppNavigationMonitor.js';
|
|
11
12
|
|
|
12
13
|
/** @module MetroplexSocket */
|
|
13
14
|
|
|
@@ -61,7 +62,7 @@ class MetroplexSocket {
|
|
|
61
62
|
// setting initial URL at the start in order to guarentee that the
|
|
62
63
|
// current page visit has the real initial onURL. Fragments and SPA's
|
|
63
64
|
// can change the URL without reloading the page.
|
|
64
|
-
this.
|
|
65
|
+
this._initialURL = AppNavigationMonitor.getInstance().globalUrl;
|
|
65
66
|
this.initialReferingURL = '';
|
|
66
67
|
this.sessionTimestamp = new Date();
|
|
67
68
|
|
|
@@ -801,7 +802,7 @@ class MetroplexSocket {
|
|
|
801
802
|
[PV_ID_ATT_NAME]: ClientConfig.getInstance().pageVisitId,
|
|
802
803
|
[VER_ATT_NAME]: CURRENT_PV_VERSION,
|
|
803
804
|
[PV_SEQ_ATT_NAME]: await ClientConfig.getInstance().getPageVisitSeq(),
|
|
804
|
-
[ON_URL_ATT_NAME]: this.
|
|
805
|
+
[ON_URL_ATT_NAME]: this._initialURL,
|
|
805
806
|
[REF_URL_ATT_NAME]: this.initialReferingURL,
|
|
806
807
|
[STARTED_AT_ATT_NAME]: this.sessionTimestamp.toISOString(),
|
|
807
808
|
[CONN_COUNT_ATT_NAME]: this.connectionCount,
|
|
@@ -813,12 +814,6 @@ class MetroplexSocket {
|
|
|
813
814
|
[SOCKET_INSTANCE_ID_ATT_NAME]: this.socketInstanceId,
|
|
814
815
|
};
|
|
815
816
|
|
|
816
|
-
// only setting the user language if we can safely access it
|
|
817
|
-
const userLang = getUserLanguage();
|
|
818
|
-
if (userLang) {
|
|
819
|
-
pvi[LANG_ATT_NAME] = userLang;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
817
|
return pvi;
|
|
823
818
|
}
|
|
824
819
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BROWSER_ID_ATT_NAME, PV_ID_ATT_NAME, COLLECT_VER_ATT_NAME, CURRENT_NOIBUJS_VERSION, VER_ATT_NAME, CURRENT_METRICS_VERSION, EXP_VIDEO_LENGTH_ATT_NAME, PV_EXP_VF_SEQ_ATT_NAME, PV_EXP_PART_COUNTER_ATT_NAME, PV_EXP_HTTP_DATA_SEQ_ATT_NAME, PV_HTTP_PAYLOADS_COLLECTED_ATT_NAME, PV_HTTP_PAYLOADS_DROPPED_OVERSIZE_ATT_NAME, PV_HTTP_PAYLOADS_DROPPED_TYPE_ATT_NAME, PV_HTTP_REQUESTS_DROPPED_OVER_LIMIT, VIDEO_CLICKS_ATT_NAME, PV_CLICKS_ATT_NAME, DID_CUT_PV_ATT_NAME, DID_CUT_VID_ATT_NAME, DID_START_VID_ATT_NAME, HTTP_COUNT_EXPECTED_ATT_NAME, ERR_COUNT_EXPECTED_ATT_NAME, ON_URL_ATT_NAME, GET_METROPLEX_METRICS_URL } from '../constants.js';
|
|
2
2
|
import ClientConfig from './clientConfig.js';
|
|
3
|
-
import {
|
|
3
|
+
import { getUserAgent, stringifyJSON } from '../utils/function.js';
|
|
4
4
|
import { addSafeEventListener } from '../utils/eventlistener.js';
|
|
5
|
+
import { AppNavigationMonitor } from '../monitors/AppNavigationMonitor.js';
|
|
5
6
|
|
|
6
7
|
/** @module StoredMetrics */
|
|
7
8
|
|
|
@@ -179,7 +180,7 @@ class StoredMetrics {
|
|
|
179
180
|
[DID_START_VID_ATT_NAME]: this.didStartVideo,
|
|
180
181
|
[HTTP_COUNT_EXPECTED_ATT_NAME]: this.httpCount,
|
|
181
182
|
[ERR_COUNT_EXPECTED_ATT_NAME]: this.errCount,
|
|
182
|
-
[ON_URL_ATT_NAME]:
|
|
183
|
+
[ON_URL_ATT_NAME]: AppNavigationMonitor.getInstance().globalUrl,
|
|
183
184
|
};
|
|
184
185
|
global.fetch(GET_METROPLEX_METRICS_URL(), {
|
|
185
186
|
method: 'POST',
|
package/dist/constants.js
CHANGED
|
@@ -195,7 +195,6 @@ const CSS_CLASS_ATT_NAME = 'class';
|
|
|
195
195
|
const SEQ_NUM_ATT_NAME = 'seq_num';
|
|
196
196
|
const HELP_CODE_ATT_NAME = 'hc';
|
|
197
197
|
const WORK_REQUEST_ATT_NAME = 'wr';
|
|
198
|
-
const LANG_ATT_NAME = 'lang';
|
|
199
198
|
const SCRIPT_ID_ATT_NAME = 'script_id';
|
|
200
199
|
const SCRIPT_INSTANCE_ID_ATT_NAME = 'script_inst_id';
|
|
201
200
|
const METROPLEX_SOCKET_INSTANCE_ID_ATT_NAME = 'mp_sock_inst_id';
|
|
@@ -427,4 +426,4 @@ function JS_ENV() {
|
|
|
427
426
|
// gets the frequency at which the client resends the message that were not confirmed by metroplex
|
|
428
427
|
const METROPLEX_RETRY_FREQUENCY = 30000;
|
|
429
428
|
|
|
430
|
-
export { BLOCKED_HTTP_HEADER_KEYS, BLOCK_SOCKET_MESSAGE, BROWSER_ID_ATT_NAME, CLICK_EVENT_TYPE, CLIENT_LOCK_TIME_MINUTES, CLOSE_CONNECTION_FORCEFULLY, COLLECT_VER_ATT_NAME, CONN_COUNT_ATT_NAME, CONSOLE_FUNCTION_OVERRIDES, CONTENT_LENGTH, CONTENT_TYPE, CSS_CLASS_ATT_NAME, CURRENT_METRICS_VERSION, CURRENT_NOIBUJS_VERSION, CURRENT_PV_VERSION, CUSTOM_ERROR_EVENT_TYPE, CUSTOM_ID_NAME_TYPE, CUSTOM_ID_VALUE_TYPE, DEFAULT_STACK_FRAME_FIELD_VALUE, DEFAULT_WEBSITE_SUBDOMAIN_PATTERN, DID_CUT_PV_ATT_NAME, DID_CUT_VID_ATT_NAME, DID_START_VID_ATT_NAME, END_AT_ATT_NAME, ERROR_EVENT_ERROR_TYPE, ERROR_EVENT_TYPE, ERROR_EVENT_UNHANDLED_REJECTION_TYPE, ERROR_LOG_EVENT_ERROR_TYPE, ERROR_SOURCE_ATT_NAME, ERR_COUNT_EXPECTED_ATT_NAME, EVENT_ERROR_TYPE, EXP_VIDEO_LENGTH_ATT_NAME, FETCH_EXCEPTION_ERROR_TYPE, GET_MAX_METROPLEX_RECONNECTION_NUMBER, GET_METROPLEX_BASE_HTTP_URL, GET_METROPLEX_BASE_SOCKET_URL, GET_METROPLEX_CONSECUTIVE_CONNECTION_DELAY, GET_METROPLEX_METRICS_URL, GET_METROPLEX_POST_URL, GET_SCRIPT_ID, GQL_ERROR_ATT_NAME, GQL_ERROR_TYPE, GQL_EVENT_TYPE, HELP_CODE_ATT_NAME, HTMLID_ATT_NAME, HTTP_BODY_DROPPED_LENGTH_MSG, HTTP_BODY_DROPPED_TYPE_MSG, HTTP_BODY_NULL_STRING, HTTP_CODE_ATT_NAME, HTTP_COUNT_EXPECTED_ATT_NAME, HTTP_DATA_METROPLEX_TYPE, HTTP_DATA_PAYLOAD_ATT_NAME, HTTP_DATA_REQ_HEADERS_ATT_NAME, HTTP_DATA_RESP_HEADERS_ATT_NAME, HTTP_DATA_RESP_PAYLOAD_ATT_NAME, HTTP_EVENT_TYPE, HTTP_METHOD_ATT_NAME, HTTP_PII_BLOCKING_PATTERNS, HTTP_RESP_CODE_ATT_NAME, HTTP_RESP_LENGTH_ATT_NAME, HTTP_RESP_TIME_ATT_NAME, HUMAN_READABLE_CONTENT_TYPE_REGEX, IS_LAST_ATT_NAME, IS_NJS_VERSION_BETA, JS_ENV, JS_ERROR_ATT_NAME, JS_EVENT_TYPE, JS_STACK_FILE_ATT_NAME, JS_STACK_FRAMES_ATT_NAME, JS_STACK_MESSAGE_ATT_NAME, JS_STACK_METHOD_ATT_NAME, KEYBOARD_EVENT_TYPE,
|
|
429
|
+
export { BLOCKED_HTTP_HEADER_KEYS, BLOCK_SOCKET_MESSAGE, BROWSER_ID_ATT_NAME, CLICK_EVENT_TYPE, CLIENT_LOCK_TIME_MINUTES, CLOSE_CONNECTION_FORCEFULLY, COLLECT_VER_ATT_NAME, CONN_COUNT_ATT_NAME, CONSOLE_FUNCTION_OVERRIDES, CONTENT_LENGTH, CONTENT_TYPE, CSS_CLASS_ATT_NAME, CURRENT_METRICS_VERSION, CURRENT_NOIBUJS_VERSION, CURRENT_PV_VERSION, CUSTOM_ERROR_EVENT_TYPE, CUSTOM_ID_NAME_TYPE, CUSTOM_ID_VALUE_TYPE, DEFAULT_STACK_FRAME_FIELD_VALUE, DEFAULT_WEBSITE_SUBDOMAIN_PATTERN, DID_CUT_PV_ATT_NAME, DID_CUT_VID_ATT_NAME, DID_START_VID_ATT_NAME, END_AT_ATT_NAME, ERROR_EVENT_ERROR_TYPE, ERROR_EVENT_TYPE, ERROR_EVENT_UNHANDLED_REJECTION_TYPE, ERROR_LOG_EVENT_ERROR_TYPE, ERROR_SOURCE_ATT_NAME, ERR_COUNT_EXPECTED_ATT_NAME, EVENT_ERROR_TYPE, EXP_VIDEO_LENGTH_ATT_NAME, FETCH_EXCEPTION_ERROR_TYPE, GET_MAX_METROPLEX_RECONNECTION_NUMBER, GET_METROPLEX_BASE_HTTP_URL, GET_METROPLEX_BASE_SOCKET_URL, GET_METROPLEX_CONSECUTIVE_CONNECTION_DELAY, GET_METROPLEX_METRICS_URL, GET_METROPLEX_POST_URL, GET_SCRIPT_ID, GQL_ERROR_ATT_NAME, GQL_ERROR_TYPE, GQL_EVENT_TYPE, HELP_CODE_ATT_NAME, HTMLID_ATT_NAME, HTTP_BODY_DROPPED_LENGTH_MSG, HTTP_BODY_DROPPED_TYPE_MSG, HTTP_BODY_NULL_STRING, HTTP_CODE_ATT_NAME, HTTP_COUNT_EXPECTED_ATT_NAME, HTTP_DATA_METROPLEX_TYPE, HTTP_DATA_PAYLOAD_ATT_NAME, HTTP_DATA_REQ_HEADERS_ATT_NAME, HTTP_DATA_RESP_HEADERS_ATT_NAME, HTTP_DATA_RESP_PAYLOAD_ATT_NAME, HTTP_EVENT_TYPE, HTTP_METHOD_ATT_NAME, HTTP_PII_BLOCKING_PATTERNS, HTTP_RESP_CODE_ATT_NAME, HTTP_RESP_LENGTH_ATT_NAME, HTTP_RESP_TIME_ATT_NAME, HUMAN_READABLE_CONTENT_TYPE_REGEX, IS_LAST_ATT_NAME, IS_NJS_VERSION_BETA, JS_ENV, JS_ERROR_ATT_NAME, JS_EVENT_TYPE, JS_STACK_FILE_ATT_NAME, JS_STACK_FRAMES_ATT_NAME, JS_STACK_MESSAGE_ATT_NAME, JS_STACK_METHOD_ATT_NAME, KEYBOARD_EVENT_TYPE, LOCATION_EVENT_TYPE, MAX_BEACON_PAYLOAD_SIZE, MAX_COLLECT_ERROR_LOG, MAX_CUSTOM_ERRORS_PER_PAGEVISIT, MAX_CUSTOM_IDS_PER_PAGEVISIT, MAX_FRAMES_IN_ARRAY, MAX_HTTP_DATA_EVENT_COUNT, MAX_HTTP_DATA_PAYLOAD_LENGTH, MAX_METROPLEX_CONNECTION_COUNT, MAX_METROPLEX_SOCKET_INNACTIVE_TIME, MAX_PAGEVISIT_EVENTS, MAX_PAGEVISIT_PARTS, MAX_PAGEVISIT_VISITED, MAX_STRING_LENGTH, MAX_TIME_FOR_UNSENT_DATA_MILLIS, META_DATA_METROPLEX_TYPE, METROPLEX_ERROR_ROUTE, METROPLEX_FRAG_ROUTE, METROPLEX_FULL_PV_ROUTE, METROPLEX_METRICS_ROUTE, METROPLEX_RETRY_FREQUENCY, METROPLEX_SOCKET_INSTANCE_ID_ATT_NAME, NOIBUJS_SDK_ADD_ERROR_FROM_JS_FMW_FUNCTION, NOIBUJS_SDK_ADD_ERROR_FUNCTION, NOIBUJS_SDK_ADD_ID_FUNCTION, NOIBUJS_SDK_REQUEST_HELP_CODE, NOIBU_BROWSER_ID_KYWRD, NOIBU_INPUT_URLS, NOIBU_LOCAL_STORAGE_TEST_KEY, NOIBU_STORED_PAGE_VISIT, OCCURRED_AT_ATT_NAME, OK_SOCKET_MESSAGE, ON_URL_ATT_NAME, PAGE_EVENTS_DOCUMENT, PAGE_EVENTS_WINDOW, PAGE_EVENT_TYPE, PAGE_VISIT_HTTP_DATA_ATT_NAME, PAGE_VISIT_INFORMATION_ATT_NAME, PAGE_VISIT_META_DATA_ATT_NAME, PAGE_VISIT_PART_ATT_NAME, PAGE_VISIT_VID_FRAG_ATT_NAME, PII_DIGIT_PATTERN, PII_EMAIL_PATTERN, PII_REDACTION_REPLACEMENT_STRING, PV_CLICKS_ATT_NAME, PV_EVENTS_ATT_NAME, PV_EXP_HTTP_DATA_SEQ_ATT_NAME, PV_EXP_PART_COUNTER_ATT_NAME, PV_EXP_VF_SEQ_ATT_NAME, PV_HTTP_PAYLOADS_COLLECTED_ATT_NAME, PV_HTTP_PAYLOADS_DROPPED_OVERSIZE_ATT_NAME, PV_HTTP_PAYLOADS_DROPPED_TYPE_ATT_NAME, PV_HTTP_REQUESTS_DROPPED_OVER_LIMIT, PV_ID_ATT_NAME, PV_METROPLEX_TYPE, PV_PART_COUNTER_ATT_NAME, PV_SEQ_ATT_NAME, PV_SEQ_NUM_RESET_TIME_MINUTES, REF_URL_ATT_NAME, REQUIRED_DATA_PROCESSING_URLS, RESPONSE_ERROR_TYPE, SCRIPT_ID_ATT_NAME, SCRIPT_INSTANCE_ID_ATT_NAME, SEQ_NUM_ATT_NAME, SEVERITY, SOCKET_INSTANCE_ID_ATT_NAME, SOURCE_ATT_NAME, STARTED_AT_ATT_NAME, STOP_STORING_PV_SOCKET_MESSAGE, STOP_STORING_VID_SOCKET_MESSAGE, TAGNAME_ATT_NAME, TEXT_ATT_NAME, TYPE_ATT_NAME, URL_ATT_NAME, USERSTEP_EVENT_TYPE, VER_ATT_NAME, VIDEO_CLICKS_ATT_NAME, VIDEO_METROPLEX_TYPE, VIDEO_PART_COUNT_ATT_NAME, WHITELIST_HTML_ID_TEXT_REGEX, WORK_REQUEST_ATT_NAME, WRAPPED_EXCEPTION_ERROR_TYPE, XML_HTTP_REQUEST_ERROR_TYPE };
|
package/dist/entry/init.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import uuid from 'react-native-uuid';
|
|
2
|
+
import { KeyboardInputMonitor } from '../monitors/keyboardInputMonitor.js';
|
|
3
|
+
import { ClickMonitor } from '../monitors/clickMonitor.js';
|
|
4
|
+
import { PageMonitor } from '../monitors/pageMonitor.js';
|
|
5
|
+
import { HTTPDataBundler } from '../monitors/httpDataBundler.js';
|
|
2
6
|
import { monitorErrors } from '../monitors/errorMonitor.js';
|
|
3
7
|
import { monitorRequests } from '../monitors/requestMonitor.js';
|
|
4
|
-
import { ClickMonitor } from '../monitors/clickMonitor.js';
|
|
5
|
-
import { KeyboardInputMonitor } from '../monitors/keyboardInputMonitor.js';
|
|
6
|
-
import { monitorLocation } from '../monitors/locationChangeMonitor.js';
|
|
7
|
-
import { PageVisit } from '../pageVisit/pageVisit.js';
|
|
8
8
|
import { GET_METROPLEX_BASE_SOCKET_URL, GET_METROPLEX_BASE_HTTP_URL, SEVERITY, METROPLEX_ERROR_ROUTE } from '../constants.js';
|
|
9
9
|
import ClientConfig from '../api/clientConfig.js';
|
|
10
|
-
import { PageMonitor } from '../monitors/pageMonitor.js';
|
|
11
|
-
import { HTTPDataBundler } from '../monitors/httpDataBundler.js';
|
|
12
10
|
import { isInvalidURLConfig, isNoibuJSAlreadyLoaded } from '../utils/function.js';
|
|
11
|
+
import { PageVisit } from '../pageVisit/pageVisit.js';
|
|
13
12
|
import MetroplexSocket from '../api/metroplexSocket.js';
|
|
14
13
|
import StoredPageVisit from '../api/storedPageVisit.js';
|
|
15
14
|
import HelpCode from '../api/helpCode.js';
|
|
15
|
+
import { AppNavigationMonitor } from '../monitors/AppNavigationMonitor.js';
|
|
16
16
|
|
|
17
17
|
/** @module Init */
|
|
18
18
|
// these are set via rollup
|
|
@@ -56,12 +56,12 @@ function globalInit(customerConfig) {
|
|
|
56
56
|
const keyboardInputMonitor = new KeyboardInputMonitor();
|
|
57
57
|
const clickMonitor = ClickMonitor.getInstance();
|
|
58
58
|
const pageMonitor = PageMonitor.getInstance();
|
|
59
|
+
AppNavigationMonitor.getInstance();
|
|
59
60
|
HTTPDataBundler.getInstance();
|
|
60
61
|
// monitoring calls
|
|
61
62
|
monitorErrors();
|
|
62
63
|
monitorRequests();
|
|
63
64
|
clickMonitor.monitorClicks();
|
|
64
|
-
monitorLocation();
|
|
65
65
|
keyboardInputMonitor.monitor();
|
|
66
66
|
pageMonitor.monitor();
|
|
67
67
|
// todo: disable types here until metroplex socket file moves to ts
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attaches corresponding listener to the passed navigation integration
|
|
3
|
+
*/
|
|
4
|
+
export declare class AppNavigationMonitor {
|
|
5
|
+
private static instance;
|
|
6
|
+
private breadcrumbs;
|
|
7
|
+
/**
|
|
8
|
+
* guesses which navigation is used in app, and registers a listener if found
|
|
9
|
+
*/
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Gets the singleton instance
|
|
13
|
+
*/
|
|
14
|
+
static getInstance(): AppNavigationMonitor;
|
|
15
|
+
/**
|
|
16
|
+
* gets current global url
|
|
17
|
+
*/
|
|
18
|
+
get globalUrl(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Called when the event needs to be emitted
|
|
21
|
+
*/
|
|
22
|
+
private reportLocationChange;
|
|
23
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SEVERITY, URL_ATT_NAME, LOCATION_EVENT_TYPE } from '../constants.js';
|
|
2
|
+
import { getMaxSubstringAllowed } from '../utils/function.js';
|
|
3
|
+
import { InputMonitor } from './inputMonitor.js';
|
|
4
|
+
import { ReactNativeNavigationIntegration } from './integrations/react-native-navigation-integration.js';
|
|
5
|
+
import ClientConfig from '../api/clientConfig.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Attaches corresponding listener to the passed navigation integration
|
|
9
|
+
*/
|
|
10
|
+
class AppNavigationMonitor {
|
|
11
|
+
static instance;
|
|
12
|
+
breadcrumbs = [];
|
|
13
|
+
/**
|
|
14
|
+
* guesses which navigation is used in app, and registers a listener if found
|
|
15
|
+
*/
|
|
16
|
+
constructor() {
|
|
17
|
+
try {
|
|
18
|
+
// eslint-disable-next-line global-require,@typescript-eslint/no-var-requires,import/no-extraneous-dependencies
|
|
19
|
+
const rnNavigation = require('react-native-navigation')?.Navigation;
|
|
20
|
+
if (rnNavigation) {
|
|
21
|
+
new ReactNativeNavigationIntegration().register(rnNavigation, breadcrumbs => {
|
|
22
|
+
this.breadcrumbs = breadcrumbs;
|
|
23
|
+
this.reportLocationChange();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
ClientConfig.getInstance().postNoibuErrorAndOptionallyDisableClient(`AppNavigationMonitor: ${e}`, false, SEVERITY.error);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the singleton instance
|
|
33
|
+
*/
|
|
34
|
+
static getInstance() {
|
|
35
|
+
if (!AppNavigationMonitor.instance) {
|
|
36
|
+
AppNavigationMonitor.instance = new AppNavigationMonitor();
|
|
37
|
+
}
|
|
38
|
+
return AppNavigationMonitor.instance;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* gets current global url
|
|
42
|
+
*/
|
|
43
|
+
get globalUrl() {
|
|
44
|
+
const globalUrl = new URL('https://localhost');
|
|
45
|
+
globalUrl.hostname = ClientConfig.getInstance().customerDomain;
|
|
46
|
+
if (this.breadcrumbs.length) {
|
|
47
|
+
globalUrl.pathname = this.breadcrumbs.join('/');
|
|
48
|
+
}
|
|
49
|
+
return getMaxSubstringAllowed(globalUrl.toString());
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Called when the event needs to be emitted
|
|
53
|
+
*/
|
|
54
|
+
reportLocationChange() {
|
|
55
|
+
const payload = {
|
|
56
|
+
[URL_ATT_NAME]: this.globalUrl,
|
|
57
|
+
};
|
|
58
|
+
// storing the location change in the page visit queue
|
|
59
|
+
InputMonitor.getInstance().addEvent(payload, LOCATION_EVENT_TYPE);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { AppNavigationMonitor };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HUMAN_READABLE_CONTENT_TYPE_REGEX, DEFAULT_WEBSITE_SUBDOMAIN_PATTERN, SEVERITY, HTTP_BODY_NULL_STRING, HTTP_DATA_REQ_HEADERS_ATT_NAME, HTTP_DATA_PAYLOAD_ATT_NAME, HTTP_DATA_RESP_HEADERS_ATT_NAME, HTTP_DATA_RESP_PAYLOAD_ATT_NAME, HTTP_BODY_DROPPED_LENGTH_MSG, HTTP_BODY_DROPPED_TYPE_MSG, MAX_HTTP_DATA_PAYLOAD_LENGTH, CONTENT_TYPE, CONTENT_LENGTH, BLOCKED_HTTP_HEADER_KEYS, PII_REDACTION_REPLACEMENT_STRING, HTTP_PII_BLOCKING_PATTERNS } from '../constants.js';
|
|
2
|
-
import { getProperGlobalUrl, checkHttpDataCollectionEnabled, getHttpPayloadAllowedURLs } from '../utils/function.js';
|
|
3
2
|
import ClientConfig from '../api/clientConfig.js';
|
|
4
3
|
import StoredMetrics from '../api/storedMetrics.js';
|
|
5
4
|
import { safeFromEntries, iterateObjectRecursively } from '../utils/object.js';
|
|
5
|
+
import { checkHttpDataCollectionEnabled, getHttpPayloadAllowedURLs } from '../utils/function.js';
|
|
6
|
+
import { AppNavigationMonitor } from './AppNavigationMonitor.js';
|
|
6
7
|
|
|
7
8
|
/** @module HTTPDataBundler */
|
|
8
9
|
|
|
@@ -19,7 +20,7 @@ class HTTPDataBundler {
|
|
|
19
20
|
);
|
|
20
21
|
|
|
21
22
|
// pull out the domain hostname
|
|
22
|
-
const initialURL =
|
|
23
|
+
const initialURL = AppNavigationMonitor.getInstance().globalUrl;
|
|
23
24
|
this.initialURLPartsReversed = [];
|
|
24
25
|
if (initialURL && initialURL.length > 0) {
|
|
25
26
|
try {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NavigationDelegate } from 'react-native-navigation/lib/dist/src/NavigationDelegate';
|
|
2
|
+
import { NavigationIntegration } from '../../types/NavigationIntegration';
|
|
3
|
+
/**
|
|
4
|
+
* react-native-navigation adapter
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReactNativeNavigationIntegration implements NavigationIntegration {
|
|
7
|
+
private stack;
|
|
8
|
+
private stackPointers;
|
|
9
|
+
/**
|
|
10
|
+
* attaches provided listeners to the integration
|
|
11
|
+
*/
|
|
12
|
+
register(navigation: NavigationDelegate, onNavigation: (breadcrumbs: string[]) => void): void;
|
|
13
|
+
/**
|
|
14
|
+
* Listens to ComponentWillAppear events
|
|
15
|
+
* @param onNavigation
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
private getListener;
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-native-navigation adapter
|
|
3
|
+
*/
|
|
4
|
+
class ReactNativeNavigationIntegration {
|
|
5
|
+
stack = [];
|
|
6
|
+
stackPointers = {};
|
|
7
|
+
/**
|
|
8
|
+
* attaches provided listeners to the integration
|
|
9
|
+
*/
|
|
10
|
+
register(navigation, onNavigation) {
|
|
11
|
+
navigation
|
|
12
|
+
.events()
|
|
13
|
+
.registerComponentWillAppearListener(this.getListener(onNavigation));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Listens to ComponentWillAppear events
|
|
17
|
+
* @param onNavigation
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
getListener(onNavigation) {
|
|
21
|
+
return (event) => {
|
|
22
|
+
if (this.stackPointers[event.componentName] === undefined) {
|
|
23
|
+
this.stackPointers[event.componentName] = this.stack.push(event.componentName);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.stack.forEach((id, i) => {
|
|
27
|
+
if (i >= this.stackPointers[event.componentName]) {
|
|
28
|
+
delete this.stackPointers[id];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.stack.length = this.stackPointers[event.componentName];
|
|
32
|
+
}
|
|
33
|
+
onNavigation(this.stack.slice(1)); // slice 1 to skip root component
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { ReactNativeNavigationIntegration };
|
|
@@ -3,10 +3,11 @@ import { saveErrorToPagevisit } from '../pageVisit/pageVisitEventError/pageVisit
|
|
|
3
3
|
import { PageVisitEventHTTP, isHttpCodeFailure } from '../pageVisit/pageVisitEventHTTP/pageVisitEventHTTP.js';
|
|
4
4
|
import { propWriteableOrMadeWriteable, replace } from '../utils/object.js';
|
|
5
5
|
import 'react-native-device-info';
|
|
6
|
-
import 'react-native-localize';
|
|
7
6
|
import { PV_SEQ_ATT_NAME, XML_HTTP_REQUEST_ERROR_TYPE, GQL_ERROR_TYPE, SEVERITY, RESPONSE_ERROR_TYPE, HTTP_METHOD_ATT_NAME, HTTP_RESP_CODE_ATT_NAME, URL_ATT_NAME, HTTP_RESP_TIME_ATT_NAME, HTTP_RESP_LENGTH_ATT_NAME, FETCH_EXCEPTION_ERROR_TYPE } from '../constants.js';
|
|
8
7
|
import ClientConfig from '../api/clientConfig.js';
|
|
8
|
+
import 'react-native-uuid';
|
|
9
9
|
import { addSafeEventListener } from '../utils/eventlistener.js';
|
|
10
|
+
import '@react-native-async-storage/async-storage';
|
|
10
11
|
import { HTTPDataBundler } from './httpDataBundler.js';
|
|
11
12
|
import GqlErrorValidator from './gqlErrorValidator.js';
|
|
12
13
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isValidURL, getOnURL,
|
|
1
|
+
import { isValidURL, getOnURL, getJSStack, stringifyJSON, getMaxSubstringAllowed } from '../../utils/function.js';
|
|
2
2
|
import { EVENT_ERROR_TYPE, URL_ATT_NAME, ERROR_EVENT_TYPE, ERROR_EVENT_ERROR_TYPE, CUSTOM_ERROR_EVENT_TYPE, ERROR_EVENT_UNHANDLED_REJECTION_TYPE, ERROR_LOG_EVENT_ERROR_TYPE, FETCH_EXCEPTION_ERROR_TYPE, WRAPPED_EXCEPTION_ERROR_TYPE, GQL_ERROR_TYPE, RESPONSE_ERROR_TYPE, XML_HTTP_REQUEST_ERROR_TYPE, ERROR_SOURCE_ATT_NAME, TYPE_ATT_NAME, JS_EVENT_TYPE, JS_ERROR_ATT_NAME, JS_STACK_FRAMES_ATT_NAME, JS_STACK_FILE_ATT_NAME, JS_STACK_METHOD_ATT_NAME, SEVERITY, JS_STACK_MESSAGE_ATT_NAME, HTTP_EVENT_TYPE, NOIBU_INPUT_URLS, HTTP_CODE_ATT_NAME, PV_SEQ_ATT_NAME, GQL_EVENT_TYPE, GQL_ERROR_ATT_NAME } from '../../constants.js';
|
|
3
3
|
import blacklisedDomains from './blacklistedDomains.js';
|
|
4
4
|
import ClientConfig from '../../api/clientConfig.js';
|
|
5
5
|
import { InputMonitor } from '../../monitors/inputMonitor.js';
|
|
6
6
|
import StoredMetrics from '../../api/storedMetrics.js';
|
|
7
|
+
import { AppNavigationMonitor } from '../../monitors/AppNavigationMonitor.js';
|
|
7
8
|
|
|
8
9
|
/** @module PageVisitEventError */
|
|
9
10
|
|
|
@@ -69,7 +70,9 @@ function getPVErrorFromXMLHttpRequest(errPayload, httpDataSeqNum) {
|
|
|
69
70
|
*/
|
|
70
71
|
function getPVErrorFromErrorEvent(errPayload) {
|
|
71
72
|
return {
|
|
72
|
-
[URL_ATT_NAME]: getOnURL(
|
|
73
|
+
[URL_ATT_NAME]: getOnURL(
|
|
74
|
+
errPayload.filename || AppNavigationMonitor.getInstance().globalUrl,
|
|
75
|
+
),
|
|
73
76
|
[TYPE_ATT_NAME]: JS_EVENT_TYPE,
|
|
74
77
|
[JS_ERROR_ATT_NAME]: getJSStack(errPayload.error),
|
|
75
78
|
};
|
|
@@ -80,8 +83,7 @@ function getPVErrorFromErrorEvent(errPayload) {
|
|
|
80
83
|
*/
|
|
81
84
|
function getPVErrorFromErrorLog(errPayload) {
|
|
82
85
|
return {
|
|
83
|
-
|
|
84
|
-
[URL_ATT_NAME]: getOnURL(getProperGlobalUrl()), // todo should be current navigation
|
|
86
|
+
[URL_ATT_NAME]: getOnURL(AppNavigationMonitor.getInstance().globalUrl),
|
|
85
87
|
[TYPE_ATT_NAME]: JS_EVENT_TYPE,
|
|
86
88
|
[JS_ERROR_ATT_NAME]: getJSStack(errPayload),
|
|
87
89
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NavigationDelegate } from 'react-native-navigation/lib/dist/src/NavigationDelegate';
|
|
2
|
+
/**
|
|
3
|
+
* interface enforces constructor signature
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigationIntegration {
|
|
6
|
+
register(navigation: NavigationDelegate, onNavigation: (breadcrumbs: string[]) => void): void;
|
|
7
|
+
}
|
package/dist/utils/function.d.ts
CHANGED
|
@@ -7,13 +7,6 @@ import { JError, JStackFrame } from '../types/PageVisit';
|
|
|
7
7
|
* length :optional, max length that stringToVerify can be
|
|
8
8
|
*/
|
|
9
9
|
export declare function getMaxSubstringAllowed(stringToVerify: string, length?: 1024): string;
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* todo implement navigation
|
|
13
|
-
* getProperGlobalUrl gets the proper global url from the window
|
|
14
|
-
* @returns {string}
|
|
15
|
-
*/
|
|
16
|
-
export declare function getProperGlobalUrl(): string;
|
|
17
10
|
/**
|
|
18
11
|
* Processes the raw stack frames and creates a readable stack in a safe manner
|
|
19
12
|
* @param {StackFrame[]} rawFrames
|
|
@@ -90,8 +83,6 @@ export declare function maskTextInput(text: string): string;
|
|
|
90
83
|
* gets the onURL of a string, defaulting to the location of the webpage
|
|
91
84
|
*/
|
|
92
85
|
export declare function getOnURL(realOnURL: string): string;
|
|
93
|
-
/** gets the user language from the browser */
|
|
94
|
-
export declare function getUserLanguage(): string | null;
|
|
95
86
|
/**
|
|
96
87
|
* Checks if the provided object is an instance of the specified type.
|
|
97
88
|
* It's safer than `instanceof` operator as it handles cases
|
package/dist/utils/function.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import DeviceInfo from 'react-native-device-info';
|
|
2
|
-
import { getLocales } from 'react-native-localize';
|
|
3
2
|
import { parseStack } from './stacktrace-parser.js';
|
|
4
|
-
import {
|
|
3
|
+
import { MAX_STRING_LENGTH, MAX_BEACON_PAYLOAD_SIZE, REQUIRED_DATA_PROCESSING_URLS, PII_EMAIL_PATTERN, PII_REDACTION_REPLACEMENT_STRING, PII_DIGIT_PATTERN, DEFAULT_STACK_FRAME_FIELD_VALUE } from '../constants.js';
|
|
5
4
|
import ClientConfig from '../api/clientConfig.js';
|
|
5
|
+
import { AppNavigationMonitor } from '../monitors/AppNavigationMonitor.js';
|
|
6
6
|
|
|
7
7
|
/** @module Functions */
|
|
8
8
|
/**
|
|
@@ -26,17 +26,6 @@ function getMaxSubstringAllowed(stringToVerify, length = MAX_STRING_LENGTH) {
|
|
|
26
26
|
return stringToVerify;
|
|
27
27
|
return stringToVerify.substring(0, length);
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* todo implement navigation
|
|
32
|
-
* getProperGlobalUrl gets the proper global url from the window
|
|
33
|
-
* @returns {string}
|
|
34
|
-
*/
|
|
35
|
-
function getProperGlobalUrl() {
|
|
36
|
-
const globalUrl = new URL('https://localhost');
|
|
37
|
-
globalUrl.hostname = ClientConfig.getInstance().customerDomain;
|
|
38
|
-
return getMaxSubstringAllowed(globalUrl.toString());
|
|
39
|
-
}
|
|
40
29
|
/**
|
|
41
30
|
* Processes the raw stack frames and creates a readable stack in a safe manner
|
|
42
31
|
* @param {StackFrame[]} rawFrames
|
|
@@ -230,7 +219,12 @@ async function getUserAgent() {
|
|
|
230
219
|
if (userAgentCache) {
|
|
231
220
|
return userAgentCache;
|
|
232
221
|
}
|
|
233
|
-
|
|
222
|
+
try {
|
|
223
|
+
userAgentCache = await DeviceInfo.getUserAgent();
|
|
224
|
+
}
|
|
225
|
+
catch (e) {
|
|
226
|
+
userAgentCache = '';
|
|
227
|
+
}
|
|
234
228
|
return userAgentCache;
|
|
235
229
|
}
|
|
236
230
|
/**
|
|
@@ -286,23 +280,10 @@ function maskTextInput(text) {
|
|
|
286
280
|
* gets the onURL of a string, defaulting to the location of the webpage
|
|
287
281
|
*/
|
|
288
282
|
function getOnURL(realOnURL) {
|
|
289
|
-
let onURL = getProperGlobalUrl();
|
|
290
283
|
if (realOnURL && realOnURL.trim() !== '' && realOnURL !== 'undefined') {
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
return onURL;
|
|
294
|
-
}
|
|
295
|
-
/** gets the user language from the browser */
|
|
296
|
-
function getUserLanguage() {
|
|
297
|
-
const locales = getLocales();
|
|
298
|
-
if (!locales.length) {
|
|
299
|
-
return null;
|
|
300
|
-
}
|
|
301
|
-
const lang = locales[0].languageCode;
|
|
302
|
-
if (lang === '' || !lang) {
|
|
303
|
-
return null;
|
|
284
|
+
return asString(getMaxSubstringAllowed(realOnURL));
|
|
304
285
|
}
|
|
305
|
-
return
|
|
286
|
+
return AppNavigationMonitor.getInstance().globalUrl;
|
|
306
287
|
}
|
|
307
288
|
/**
|
|
308
289
|
* Checks if the provided object is an instance of the specified type.
|
|
@@ -318,4 +299,4 @@ function isInstanceOf(instance, type) {
|
|
|
318
299
|
}
|
|
319
300
|
}
|
|
320
301
|
|
|
321
|
-
export { asString, checkHttpDataCollectionEnabled, getBlockedElements, getHttpPayloadAllowedURLs, getJSStack, getMaxSubstringAllowed, getOnURL,
|
|
302
|
+
export { asString, checkHttpDataCollectionEnabled, getBlockedElements, getHttpPayloadAllowedURLs, getJSStack, getMaxSubstringAllowed, getOnURL, getUserAgent, isInstanceOf, isInvalidURLConfig, isNoibuJSAlreadyLoaded, isStackTrace, isValidURL, makeRequest, maskTextInput, processFrames, stringifyJSON };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noibu-react-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"targetNjsVersion": "1.0.104",
|
|
5
5
|
"description": "React-Native SDK for NoibuJS to collect errors in React-Native applications",
|
|
6
6
|
"main": "dist/entry/index.js",
|
|
@@ -21,14 +21,16 @@
|
|
|
21
21
|
"lint_output": "eslint src -c .eslintrc.json --ext js,ts,jsx,tsx -f json > eslint_report.json",
|
|
22
22
|
"codecov": "codecov"
|
|
23
23
|
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"react-native-navigation": "7"
|
|
26
|
+
},
|
|
24
27
|
"dependencies": {
|
|
25
28
|
"react": ">=16.11.0",
|
|
26
29
|
"react-native": ">=0.63.0",
|
|
27
30
|
"@react-native-async-storage/async-storage": "^1.19.0",
|
|
28
31
|
"react-native-device-info": "^10.6.0",
|
|
29
32
|
"react-native-url-polyfill": "^1.3.0",
|
|
30
|
-
"react-native-uuid": "^2.0.1"
|
|
31
|
-
"react-native-localize": "^3.0.1"
|
|
33
|
+
"react-native-uuid": "^2.0.1"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import 'react-native-device-info';
|
|
2
|
-
import 'react-native-localize';
|
|
3
|
-
import 'react-native-uuid';
|
|
4
|
-
import '@react-native-async-storage/async-storage';
|
|
5
|
-
|
|
6
|
-
/** @module LocationMonitor */
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* will poll the url on a 1 second basis to see if it has changed
|
|
10
|
-
* there is currently no alternative to getting an accurate url
|
|
11
|
-
* change listener
|
|
12
|
-
*/
|
|
13
|
-
function monitorLocation() {
|
|
14
|
-
setInterval(() => {
|
|
15
|
-
}, 1000);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { monitorLocation };
|