@rudderstack/analytics-js 3.17.0-beta.pr.2212.4806033 → 3.17.0
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/npm/legacy/bundled/cjs/index.cjs +300 -270
- package/dist/npm/legacy/bundled/esm/index.mjs +300 -270
- package/dist/npm/legacy/bundled/umd/index.js +300 -270
- package/dist/npm/legacy/cjs/index.cjs +300 -270
- package/dist/npm/legacy/content-script/cjs/index.cjs +300 -270
- package/dist/npm/legacy/content-script/esm/index.mjs +300 -270
- package/dist/npm/legacy/content-script/umd/index.js +300 -270
- package/dist/npm/legacy/esm/index.mjs +300 -270
- package/dist/npm/legacy/umd/index.js +300 -270
- package/dist/npm/modern/bundled/cjs/index.cjs +86 -88
- package/dist/npm/modern/bundled/esm/index.mjs +86 -88
- package/dist/npm/modern/bundled/umd/index.js +86 -88
- package/dist/npm/modern/cjs/index.cjs +4 -4
- package/dist/npm/modern/content-script/cjs/index.cjs +86 -88
- package/dist/npm/modern/content-script/esm/index.mjs +86 -88
- package/dist/npm/modern/content-script/umd/index.js +86 -88
- package/dist/npm/modern/esm/index.mjs +4 -4
- package/dist/npm/modern/umd/index.js +4 -4
- package/package.json +1 -1
@@ -497,7 +497,7 @@
|
|
497
497
|
error.stacktrace=`${stacktrace}\n${MANUAL_ERROR_IDENTIFIER}`;break;case operaSourceloc:default:// eslint-disable-next-line no-param-reassign
|
498
498
|
error['opera#sourceloc']=`${operaSourceloc}\n${MANUAL_ERROR_IDENTIFIER}`;break;}}}globalThis.dispatchEvent(new ErrorEvent('error',{error,bubbles:true,cancelable:true,composed:true}));};
|
499
499
|
|
500
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0
|
500
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
501
501
|
|
502
502
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
503
503
|
|
@@ -636,7 +636,7 @@
|
|
636
636
|
|
637
637
|
const DEFAULT_STORAGE_ENCRYPTION_VERSION='v3';const DEFAULT_DATA_PLANE_EVENTS_TRANSPORT='xhr';const ConsentManagersToPluginNameMap={iubenda:'IubendaConsentManager',oneTrust:'OneTrustConsentManager',ketch:'KetchConsentManager',custom:'CustomConsentManager'};const StorageEncryptionVersionsToPluginNameMap={[DEFAULT_STORAGE_ENCRYPTION_VERSION]:'StorageEncryption',legacy:'StorageEncryptionLegacy'};const DataPlaneEventsTransportToPluginNameMap={[DEFAULT_DATA_PLANE_EVENTS_TRANSPORT]:'XhrQueue',beacon:'BeaconQueue'};const DEFAULT_DATA_SERVICE_ENDPOINT='rsaRequest';const METRICS_SERVICE_ENDPOINT='rsaMetrics';
|
638
638
|
|
639
|
-
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:
|
639
|
+
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:true,lockPluginsVersion:true,uaChTrackLevel:'none',plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:true,cookie:{}},sendAdblockPage:false,sameDomainCookiesOnly:false,secureCookie:false,sendAdblockPageOptions:{},useServerSideCookies:false};const loadOptionsState=d$1(clone(defaultLoadOptions));
|
640
640
|
|
641
641
|
const DEFAULT_USER_SESSION_VALUES={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{},authToken:null};const SERVER_SIDE_COOKIES_DEBOUNCE_TIME=10;// milliseconds
|
642
642
|
|
@@ -759,8 +759,8 @@
|
|
759
759
|
|
760
760
|
const getErrInstance=(err,errorType)=>{switch(errorType){case ErrorType.UNHANDLEDEXCEPTION:{const{error}=err;return error||err;}case ErrorType.UNHANDLEDREJECTION:{return err.reason;}case ErrorType.HANDLEDEXCEPTION:default:return err;}};const createNewBreadcrumb=message=>({type:'manual',name:message,timestamp:new Date(),metaData:{}});/**
|
761
761
|
* A function to get the Bugsnag release stage for the current environment
|
762
|
-
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise '
|
763
|
-
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'
|
762
|
+
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise 'production' (it'll be replaced with the actual release stage during the build)
|
763
|
+
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'production';};const getAppStateForMetadata=state=>{const stateStr=stringifyWithoutCircular(state,false,APP_STATE_EXCLUDE_KEYS);return stateStr!==null?JSON.parse(stateStr):{};};const getURLWithoutQueryString=()=>{const url=globalThis.location.href.split('?');return url[0];};const getUserDetails=(source,session,lifecycle,autoTrack)=>({id:`${source.value?.id??lifecycle.writeKey.value}..${session.sessionInfo.value.id??'NA'}..${autoTrack.pageLifecycle.pageViewId.value??'NA'}`,name:source.value?.name??'NA'});const getDeviceDetails=(locale,userAgent)=>({locale:locale.value??'NA',userAgent:userAgent.value??'NA',time:new Date()});const getBugsnagErrorEvent=(exception,errorState,state)=>{const{context,lifecycle,session,source,reporting,autoTrack}=state;const{app,locale,userAgent,timezone,screen,library}=context;return {payloadVersion:'5',notifier:{name:NOTIFIER_NAME,version:app.value.version,url:SDK_GITHUB_URL},events:[{exceptions:[clone(exception)],severity:errorState.severity,unhandled:errorState.unhandled,severityReason:errorState.severityReason,app:{version:app.value.version,releaseStage:getReleaseStage(),type:app.value.installType},device:getDeviceDetails(locale,userAgent),request:{url:getURLWithoutQueryString(),clientIp:'[NOT COLLECTED]'},breadcrumbs:clone(reporting.breadcrumbs.value),context:exception.message,metaData:{app:{snippetVersion:library.value.snippetVersion},device:{...screen.value,timezone:timezone.value},// Add rest of the state groups as metadata
|
764
764
|
// so that they show up as separate tabs in the dashboard
|
765
765
|
...getAppStateForMetadata(state)},user:getUserDetails(source,session,lifecycle,autoTrack)}]};};/**
|
766
766
|
* A function to determine whether the error should be promoted to notify or not
|
@@ -1067,172 +1067,170 @@
|
|
1067
1067
|
* @returns Destinations array filtered based on the integration options
|
1068
1068
|
*/const filterDestinations=(intgOpts,destinations)=>{const allOptVal=intgOpts.All??true;return destinations.filter(dest=>{const destDisplayName=dest.displayName;let isDestEnabled;if(allOptVal){isDestEnabled=true;if(isDestIntgConfigFalsy(intgOpts[destDisplayName])){isDestEnabled=false;}}else {isDestEnabled=false;if(isDestIntgConfigTruthy(intgOpts[destDisplayName])){isDestEnabled=true;}}return isDestEnabled;});};
|
1069
1069
|
|
1070
|
-
const ACTIVE_CAMPAIGN_DISPLAY_NAME='ActiveCampaign';const ADOBE_ANALYTICS_DISPLAY_NAME='Adobe Analytics';const ADROLL_DISPLAY_NAME='Adroll';const AM_DISPLAY_NAME='Amplitude';const APPCUES_DISPLAY_NAME='Appcues';const AXEPTIO_DISPLAY_NAME='Axeptio';const BINGADS_DISPLAY_NAME='Bing Ads';const BRAZE_DISPLAY_NAME='Braze';const BUGSNAG_DISPLAY_NAME='Bugsnag';const CHARTBEAT_DISPLAY_NAME='Chartbeat';const CLEVERTAP_DISPLAY_NAME='CleverTap';const COMMANDBAR_DISPLAY_NAME='CommandBar';const CONVERTFLOW_DISPLAY_NAME='Convertflow';const CRITEO_DISPLAY_NAME='Criteo';const CUSTOMERIO_DISPLAY_NAME='Customer IO';const DCM_FLOODLIGHT_DISPLAY_NAME='DCM Floodlight';const DRIP_DISPLAY_NAME='Drip';const ENGAGE_DISPLAY_NAME='Engage';const FACEBOOK_PIXEL_DISPLAY_NAME='Facebook Pixel';const FULLSTORY_DISPLAY_NAME='Fullstory';const GA_DISPLAY_NAME='Google Analytics';const GA360_DISPLAY_NAME='Google Analytics 360';const GA4_DISPLAY_NAME='Google Analytics 4 (GA4)';const GA4_V2_DISPLAY_NAME='Google Analytics 4 (GA4) V2';const GAINSIGHT_PX_DISPLAY_NAME='Gainsight PX';const GOOGLE_OPTIMIZE_DISPLAY_NAME='Google Optimize';const GOOGLEADS_DISPLAY_NAME='Google Ads';const GTM_DISPLAY_NAME='Google Tag Manager';const HEAP_DISPLAY_NAME='Heap.io';const HOTJAR_DISPLAY_NAME='Hotjar';const HS_DISPLAY_NAME='HubSpot';const INTERCOM_DISPLAY_NAME='Intercom';const ITERABLE_DISPLAY_NAME='Iterable';const JUNE_DISPLAY_NAME='JUNE';const KEEN_DISPLAY_NAME='Keen';const KISSMETRICS_DISPLAY_NAME='Kiss Metrics';const KLAVIYO_DISPLAY_NAME='Klaviyo';const LAUNCHDARKLY_DISPLAY_NAME='LaunchDarkly';const LEMNISK_DISPLAY_NAME='Lemnisk Marketing Automation';const LINKEDIN_INSIGHT_TAG_DISPLAY_NAME='Linkedin Insight Tag';const LIVECHAT_DISPLAY_NAME='livechat';const LOTAME_DISPLAY_NAME='Lotame';const LYTICS_DISPLAY_NAME='Lytics';const MATOMO_DISPLAY_NAME='Matomo';const MICROSOFT_CLARITY_DISPLAY_NAME='Microsoft Clarity';const MOENGAGE_DISPLAY_NAME='MoEngage';const MOUSEFLOW_DISPLAY_NAME='Mouseflow';const MP_DISPLAY_NAME='Mixpanel';const NINETAILED_DISPLAY_NAME='Ninetailed';const OLARK_DISPLAY_NAME='Olark';const OPTIMIZELY_DISPLAY_NAME='Optimizely Web';const PENDO_DISPLAY_NAME='Pendo';const PINTEREST_TAG_DISPLAY_NAME='Pinterest Tag';const PODSIGHTS_DISPLAY_NAME='Podsights';const POST_AFFILIATE_PRO_DISPLAY_NAME='Post Affiliate Pro';const POSTHOG_DISPLAY_NAME='PostHog';const PROFITWELL_DISPLAY_NAME='ProfitWell';const QUALAROO_DISPLAY_NAME='Qualaroo';const QUALTRICS_DISPLAY_NAME='Qualtrics';const QUANTUMMETRIC_DISPLAY_NAME='Quantum Metric';const QUORA_PIXEL_DISPLAY_NAME='Quora Pixel';const REDDIT_PIXEL_DISPLAY_NAME='Reddit Pixel';const REFINER_DISPLAY_NAME='Refiner';const ROCKERBOX_DISPLAY_NAME='Rockerbox';const ROLLBAR_DISPLAY_NAME='rollbar';const SATISMETER_DISPLAY_NAME='SatisMeter';const SENDINBLUE_DISPLAY_NAME='Sendinblue';const SENTRY_DISPLAY_NAME='Sentry';const SHYNET_DISPLAY_NAME='Shynet';const SNAP_PIXEL_DISPLAY_NAME='Snap Pixel';const SNAPENGAGE_DISPLAY_NAME='SnapEngage';const SPOTIFYPIXEL_DISPLAY_NAME='Spotify Pixel';const SPRIG_DISPLAY_NAME='Sprig';const TIKTOK_ADS_DISPLAY_NAME='TikTok Ads';const TVSQUARED_DISPLAY_NAME='TVSquared';const VERO_DISPLAY_NAME='Vero';const VWO_DISPLAY_NAME='VWO';const WOOPRA_DISPLAY_NAME='WOOPRA';const XPIXEL_DISPLAY_NAME='XPixel';const YANDEX_METRICA_DISPLAY_NAME='Yandex.Metrica';
|
1070
|
+
const ACTIVE_CAMPAIGN_DISPLAY_NAME='ActiveCampaign';const ADOBE_ANALYTICS_DISPLAY_NAME='Adobe Analytics';const ADROLL_DISPLAY_NAME='Adroll';const AM_DISPLAY_NAME='Amplitude';const APPCUES_DISPLAY_NAME='Appcues';const AXEPTIO_DISPLAY_NAME='Axeptio';const BINGADS_DISPLAY_NAME='Bing Ads';const BRAZE_DISPLAY_NAME='Braze';const BUGSNAG_DISPLAY_NAME='Bugsnag';const CHARTBEAT_DISPLAY_NAME='Chartbeat';const CLEVERTAP_DISPLAY_NAME='CleverTap';const COMMANDBAR_DISPLAY_NAME='CommandBar';const CONVERTFLOW_DISPLAY_NAME='Convertflow';const CRITEO_DISPLAY_NAME='Criteo';const CUSTOMERIO_DISPLAY_NAME='Customer IO';const DCM_FLOODLIGHT_DISPLAY_NAME='DCM Floodlight';const DRIP_DISPLAY_NAME='Drip';const ENGAGE_DISPLAY_NAME='Engage';const FACEBOOK_PIXEL_DISPLAY_NAME='Facebook Pixel';const FULLSTORY_DISPLAY_NAME='Fullstory';const GA_DISPLAY_NAME='Google Analytics';const GA360_DISPLAY_NAME='Google Analytics 360';const GA4_DISPLAY_NAME='Google Analytics 4 (GA4)';const GA4_V2_DISPLAY_NAME='Google Analytics 4 (GA4) V2';const GAINSIGHT_PX_DISPLAY_NAME='Gainsight PX';const GOOGLE_OPTIMIZE_DISPLAY_NAME='Google Optimize';const GOOGLEADS_DISPLAY_NAME='Google Ads';const GTM_DISPLAY_NAME='Google Tag Manager';const HEAP_DISPLAY_NAME='Heap.io';const HOTJAR_DISPLAY_NAME='Hotjar';const HS_DISPLAY_NAME='HubSpot';const INTERCOM_DISPLAY_NAME='Intercom';const ITERABLE_DISPLAY_NAME='Iterable';const JUNE_DISPLAY_NAME='JUNE';const KEEN_DISPLAY_NAME='Keen';const KISSMETRICS_DISPLAY_NAME='Kiss Metrics';const KLAVIYO_DISPLAY_NAME='Klaviyo';const LAUNCHDARKLY_DISPLAY_NAME='LaunchDarkly';const LEMNISK_DISPLAY_NAME='Lemnisk Marketing Automation';const LINKEDIN_INSIGHT_TAG_DISPLAY_NAME='Linkedin Insight Tag';const LIVECHAT_DISPLAY_NAME='livechat';const LOTAME_DISPLAY_NAME='Lotame';const LYTICS_DISPLAY_NAME='Lytics';const MATOMO_DISPLAY_NAME='Matomo';const MICROSOFT_CLARITY_DISPLAY_NAME='Microsoft Clarity';const MOENGAGE_DISPLAY_NAME='MoEngage';const MOUSEFLOW_DISPLAY_NAME='Mouseflow';const MP_DISPLAY_NAME='Mixpanel';const NINETAILED_DISPLAY_NAME='Ninetailed';const OLARK_DISPLAY_NAME='Olark';const OPTIMIZELY_DISPLAY_NAME='Optimizely Web';const PENDO_DISPLAY_NAME='Pendo';const PINTEREST_TAG_DISPLAY_NAME='Pinterest Tag';const PODSIGHTS_DISPLAY_NAME='Podsights';const POST_AFFILIATE_PRO_DISPLAY_NAME='Post Affiliate Pro';const POSTHOG_DISPLAY_NAME='PostHog';const PROFITWELL_DISPLAY_NAME='ProfitWell';const QUALAROO_DISPLAY_NAME='Qualaroo';const QUALTRICS_DISPLAY_NAME='Qualtrics';const QUANTUMMETRIC_DISPLAY_NAME='Quantum Metric';const QUORA_PIXEL_DISPLAY_NAME='Quora Pixel';const REDDIT_PIXEL_DISPLAY_NAME='Reddit Pixel';const REFINER_DISPLAY_NAME='Refiner';const ROCKERBOX_DISPLAY_NAME='Rockerbox';const ROLLBAR_DISPLAY_NAME='rollbar';const SATISMETER_DISPLAY_NAME='SatisMeter';const SENDINBLUE_DISPLAY_NAME='Sendinblue';const SENTRY_DISPLAY_NAME='Sentry';const SHYNET_DISPLAY_NAME='Shynet';const SNAP_PIXEL_DISPLAY_NAME='Snap Pixel';const SNAPENGAGE_DISPLAY_NAME='SnapEngage';const SPOTIFYPIXEL_DISPLAY_NAME='Spotify Pixel';const SPRIG_DISPLAY_NAME='Sprig';const TIKTOK_ADS_DISPLAY_NAME='TikTok Ads';const TVSQUARED_DISPLAY_NAME='TVSquared';const VERO_DISPLAY_NAME='Vero';const VWO_DISPLAY_NAME='VWO';const WOOPRA_DISPLAY_NAME='WOOPRA';const XPIXEL_DISPLAY_NAME='XPixel';const YANDEX_METRICA_DISPLAY_NAME='Yandex.Metrica';
|
1071
1071
|
|
1072
|
-
const DIR_NAME$
|
1072
|
+
const DIR_NAME$1f='AdobeAnalytics';
|
1073
1073
|
|
1074
|
-
const DIR_NAME$
|
1074
|
+
const DIR_NAME$1e='Amplitude';
|
1075
1075
|
|
1076
|
-
const DIR_NAME$
|
1076
|
+
const DIR_NAME$1d='Appcues';
|
1077
1077
|
|
1078
|
-
const DIR_NAME$
|
1078
|
+
const DIR_NAME$1c='BingAds';
|
1079
1079
|
|
1080
|
-
const DIR_NAME$
|
1080
|
+
const DIR_NAME$1b='Braze';
|
1081
1081
|
|
1082
|
-
const DIR_NAME$
|
1082
|
+
const DIR_NAME$1a='Bugsnag';
|
1083
1083
|
|
1084
|
-
const DIR_NAME$
|
1084
|
+
const DIR_NAME$19='Chartbeat';
|
1085
1085
|
|
1086
|
-
const DIR_NAME$
|
1086
|
+
const DIR_NAME$18='Clevertap';
|
1087
1087
|
|
1088
|
-
const DIR_NAME$
|
1088
|
+
const DIR_NAME$17='Criteo';
|
1089
1089
|
|
1090
|
-
const DIR_NAME$
|
1090
|
+
const DIR_NAME$16='CustomerIO';
|
1091
1091
|
|
1092
|
-
const DIR_NAME$
|
1092
|
+
const DIR_NAME$15='Drip';
|
1093
1093
|
|
1094
|
-
const DIR_NAME$
|
1094
|
+
const DIR_NAME$14='FacebookPixel';
|
1095
1095
|
|
1096
|
-
const DIR_NAME$
|
1096
|
+
const DIR_NAME$13='Fullstory';
|
1097
1097
|
|
1098
|
-
const DIR_NAME$
|
1098
|
+
const DIR_NAME$12='GA';
|
1099
1099
|
|
1100
|
-
const DIR_NAME$
|
1100
|
+
const DIR_NAME$11='GA4';
|
1101
1101
|
|
1102
|
-
const DIR_NAME$
|
1102
|
+
const DIR_NAME$10='GA4_V2';
|
1103
1103
|
|
1104
|
-
const DIR_NAME
|
1104
|
+
const DIR_NAME$$='GoogleAds';
|
1105
1105
|
|
1106
|
-
const DIR_NAME
|
1106
|
+
const DIR_NAME$_='GoogleOptimize';
|
1107
1107
|
|
1108
|
-
const DIR_NAME$
|
1108
|
+
const DIR_NAME$Z='GoogleTagManager';
|
1109
1109
|
|
1110
|
-
const DIR_NAME$
|
1110
|
+
const DIR_NAME$Y='Heap';
|
1111
1111
|
|
1112
|
-
const DIR_NAME$
|
1112
|
+
const DIR_NAME$X='Hotjar';
|
1113
1113
|
|
1114
|
-
const DIR_NAME$
|
1114
|
+
const DIR_NAME$W='HubSpot';
|
1115
1115
|
|
1116
|
-
const DIR_NAME$
|
1116
|
+
const DIR_NAME$V='INTERCOM';
|
1117
1117
|
|
1118
|
-
const DIR_NAME$
|
1118
|
+
const DIR_NAME$U='Keen';
|
1119
1119
|
|
1120
|
-
const DIR_NAME$
|
1120
|
+
const DIR_NAME$T='Kissmetrics';
|
1121
1121
|
|
1122
|
-
const DIR_NAME$
|
1122
|
+
const DIR_NAME$S='Klaviyo';
|
1123
1123
|
|
1124
|
-
const DIR_NAME$
|
1124
|
+
const DIR_NAME$R='LaunchDarkly';
|
1125
1125
|
|
1126
|
-
const DIR_NAME$
|
1126
|
+
const DIR_NAME$Q='LinkedInInsightTag';
|
1127
1127
|
|
1128
|
-
const DIR_NAME$
|
1128
|
+
const DIR_NAME$P='Lotame';
|
1129
1129
|
|
1130
|
-
const DIR_NAME$
|
1130
|
+
const DIR_NAME$O='Lytics';
|
1131
1131
|
|
1132
|
-
const DIR_NAME$
|
1132
|
+
const DIR_NAME$N='Mixpanel';
|
1133
1133
|
|
1134
|
-
const DIR_NAME$
|
1134
|
+
const DIR_NAME$M='MoEngage';
|
1135
1135
|
|
1136
|
-
const DIR_NAME$
|
1136
|
+
const DIR_NAME$L='Optimizely';
|
1137
1137
|
|
1138
|
-
const DIR_NAME$
|
1138
|
+
const DIR_NAME$K='Pendo';
|
1139
1139
|
|
1140
|
-
const DIR_NAME$
|
1140
|
+
const DIR_NAME$J='PinterestTag';
|
1141
1141
|
|
1142
|
-
const DIR_NAME$
|
1142
|
+
const DIR_NAME$I='PostAffiliatePro';
|
1143
1143
|
|
1144
|
-
const DIR_NAME$
|
1144
|
+
const DIR_NAME$H='Posthog';
|
1145
1145
|
|
1146
|
-
const DIR_NAME$
|
1146
|
+
const DIR_NAME$G='ProfitWell';
|
1147
1147
|
|
1148
|
-
const DIR_NAME$
|
1148
|
+
const DIR_NAME$F='Qualtrics';
|
1149
1149
|
|
1150
|
-
const DIR_NAME$
|
1150
|
+
const DIR_NAME$E='QuantumMetric';
|
1151
1151
|
|
1152
|
-
const DIR_NAME$
|
1152
|
+
const DIR_NAME$D='RedditPixel';
|
1153
1153
|
|
1154
|
-
const DIR_NAME$
|
1154
|
+
const DIR_NAME$C='Sentry';
|
1155
1155
|
|
1156
|
-
const DIR_NAME$
|
1156
|
+
const DIR_NAME$B='SnapPixel';
|
1157
1157
|
|
1158
|
-
const DIR_NAME$
|
1158
|
+
const DIR_NAME$A='TVSquared';
|
1159
1159
|
|
1160
|
-
const DIR_NAME$
|
1160
|
+
const DIR_NAME$z='VWO';
|
1161
1161
|
|
1162
|
-
const DIR_NAME$
|
1162
|
+
const DIR_NAME$y='GA360';
|
1163
1163
|
|
1164
|
-
const DIR_NAME$
|
1164
|
+
const DIR_NAME$x='Adroll';
|
1165
1165
|
|
1166
|
-
const DIR_NAME$
|
1166
|
+
const DIR_NAME$w='DCMFloodlight';
|
1167
1167
|
|
1168
|
-
const DIR_NAME$
|
1168
|
+
const DIR_NAME$v='Matomo';
|
1169
1169
|
|
1170
|
-
const DIR_NAME$
|
1170
|
+
const DIR_NAME$u='Vero';
|
1171
1171
|
|
1172
|
-
const DIR_NAME$
|
1172
|
+
const DIR_NAME$t='Mouseflow';
|
1173
1173
|
|
1174
|
-
const DIR_NAME$
|
1174
|
+
const DIR_NAME$s='Rockerbox';
|
1175
1175
|
|
1176
|
-
const DIR_NAME$
|
1176
|
+
const DIR_NAME$r='ConvertFlow';
|
1177
1177
|
|
1178
|
-
const DIR_NAME$
|
1178
|
+
const DIR_NAME$q='SnapEngage';
|
1179
1179
|
|
1180
|
-
const DIR_NAME$
|
1180
|
+
const DIR_NAME$p='LiveChat';
|
1181
1181
|
|
1182
|
-
const DIR_NAME$
|
1182
|
+
const DIR_NAME$o='Shynet';
|
1183
1183
|
|
1184
|
-
const DIR_NAME$
|
1184
|
+
const DIR_NAME$n='Woopra';
|
1185
1185
|
|
1186
|
-
const DIR_NAME$
|
1186
|
+
const DIR_NAME$m='RollBar';
|
1187
1187
|
|
1188
|
-
const DIR_NAME$
|
1188
|
+
const DIR_NAME$l='QuoraPixel';
|
1189
1189
|
|
1190
|
-
const DIR_NAME$
|
1190
|
+
const DIR_NAME$k='June';
|
1191
1191
|
|
1192
|
-
const DIR_NAME$
|
1192
|
+
const DIR_NAME$j='Engage';
|
1193
1193
|
|
1194
|
-
const DIR_NAME$
|
1194
|
+
const DIR_NAME$i='Iterable';
|
1195
1195
|
|
1196
|
-
const DIR_NAME$
|
1196
|
+
const DIR_NAME$h='YandexMetrica';
|
1197
1197
|
|
1198
|
-
const DIR_NAME$
|
1198
|
+
const DIR_NAME$g='Refiner';
|
1199
1199
|
|
1200
|
-
const DIR_NAME$
|
1200
|
+
const DIR_NAME$f='Qualaroo';
|
1201
1201
|
|
1202
|
-
const DIR_NAME$
|
1202
|
+
const DIR_NAME$e='Podsights';
|
1203
1203
|
|
1204
|
-
const DIR_NAME$
|
1204
|
+
const DIR_NAME$d='Axeptio';
|
1205
1205
|
|
1206
|
-
const DIR_NAME$
|
1206
|
+
const DIR_NAME$c='Satismeter';
|
1207
1207
|
|
1208
|
-
const DIR_NAME$
|
1208
|
+
const DIR_NAME$b='MicrosoftClarity';
|
1209
1209
|
|
1210
|
-
const DIR_NAME$
|
1210
|
+
const DIR_NAME$a='Sendinblue';
|
1211
1211
|
|
1212
|
-
const DIR_NAME$
|
1212
|
+
const DIR_NAME$9='Olark';
|
1213
1213
|
|
1214
|
-
const DIR_NAME$
|
1214
|
+
const DIR_NAME$8='Lemnisk';
|
1215
1215
|
|
1216
|
-
const DIR_NAME$
|
1216
|
+
const DIR_NAME$7='TiktokAds';
|
1217
1217
|
|
1218
|
-
const DIR_NAME$
|
1218
|
+
const DIR_NAME$6='ActiveCampaign';
|
1219
1219
|
|
1220
|
-
const DIR_NAME$
|
1220
|
+
const DIR_NAME$5='Sprig';
|
1221
1221
|
|
1222
|
-
const DIR_NAME$
|
1222
|
+
const DIR_NAME$4='SpotifyPixel';
|
1223
1223
|
|
1224
|
-
const DIR_NAME$
|
1224
|
+
const DIR_NAME$3='CommandBar';
|
1225
1225
|
|
1226
|
-
const DIR_NAME$
|
1226
|
+
const DIR_NAME$2='Ninetailed';
|
1227
1227
|
|
1228
|
-
const DIR_NAME$
|
1228
|
+
const DIR_NAME$1='Gainsight_PX';
|
1229
1229
|
|
1230
|
-
const DIR_NAME
|
1231
|
-
|
1232
|
-
const DIR_NAME='Userpilot';
|
1230
|
+
const DIR_NAME='XPixel';
|
1233
1231
|
|
1234
1232
|
// map of the destination display names to the destination directory names
|
1235
|
-
const destDisplayNamesToFileNamesMap={[HS_DISPLAY_NAME]:DIR_NAME$
|
1233
|
+
const destDisplayNamesToFileNamesMap={[HS_DISPLAY_NAME]:DIR_NAME$W,[GA_DISPLAY_NAME]:DIR_NAME$12,[HOTJAR_DISPLAY_NAME]:DIR_NAME$X,[GOOGLEADS_DISPLAY_NAME]:DIR_NAME$$,[VWO_DISPLAY_NAME]:DIR_NAME$z,[GTM_DISPLAY_NAME]:DIR_NAME$Z,[BRAZE_DISPLAY_NAME]:DIR_NAME$1b,[INTERCOM_DISPLAY_NAME]:DIR_NAME$V,[KEEN_DISPLAY_NAME]:DIR_NAME$U,[KISSMETRICS_DISPLAY_NAME]:DIR_NAME$T,[CUSTOMERIO_DISPLAY_NAME]:DIR_NAME$16,[CHARTBEAT_DISPLAY_NAME]:DIR_NAME$19,[FACEBOOK_PIXEL_DISPLAY_NAME]:DIR_NAME$14,[LOTAME_DISPLAY_NAME]:DIR_NAME$P,[OPTIMIZELY_DISPLAY_NAME]:DIR_NAME$L,[BUGSNAG_DISPLAY_NAME]:DIR_NAME$1a,[FULLSTORY_DISPLAY_NAME]:DIR_NAME$13,[TVSQUARED_DISPLAY_NAME]:DIR_NAME$A,[GA4_DISPLAY_NAME]:DIR_NAME$11,[GA4_V2_DISPLAY_NAME]:DIR_NAME$10,[MOENGAGE_DISPLAY_NAME]:DIR_NAME$M,[AM_DISPLAY_NAME]:DIR_NAME$1e,[PENDO_DISPLAY_NAME]:DIR_NAME$K,[LYTICS_DISPLAY_NAME]:DIR_NAME$O,[APPCUES_DISPLAY_NAME]:DIR_NAME$1d,[POSTHOG_DISPLAY_NAME]:DIR_NAME$H,[KLAVIYO_DISPLAY_NAME]:DIR_NAME$S,[CLEVERTAP_DISPLAY_NAME]:DIR_NAME$18,[BINGADS_DISPLAY_NAME]:DIR_NAME$1c,[PINTEREST_TAG_DISPLAY_NAME]:DIR_NAME$J,[ADOBE_ANALYTICS_DISPLAY_NAME]:DIR_NAME$1f,[LINKEDIN_INSIGHT_TAG_DISPLAY_NAME]:DIR_NAME$Q,[REDDIT_PIXEL_DISPLAY_NAME]:DIR_NAME$D,[DRIP_DISPLAY_NAME]:DIR_NAME$15,[HEAP_DISPLAY_NAME]:DIR_NAME$Y,[CRITEO_DISPLAY_NAME]:DIR_NAME$17,[MP_DISPLAY_NAME]:DIR_NAME$N,[QUALTRICS_DISPLAY_NAME]:DIR_NAME$F,[PROFITWELL_DISPLAY_NAME]:DIR_NAME$G,[SENTRY_DISPLAY_NAME]:DIR_NAME$C,[QUANTUMMETRIC_DISPLAY_NAME]:DIR_NAME$E,[SNAP_PIXEL_DISPLAY_NAME]:DIR_NAME$B,[POST_AFFILIATE_PRO_DISPLAY_NAME]:DIR_NAME$I,[GOOGLE_OPTIMIZE_DISPLAY_NAME]:DIR_NAME$_,[LAUNCHDARKLY_DISPLAY_NAME]:DIR_NAME$R,[GA360_DISPLAY_NAME]:DIR_NAME$y,[ADROLL_DISPLAY_NAME]:DIR_NAME$x,[DCM_FLOODLIGHT_DISPLAY_NAME]:DIR_NAME$w,[MATOMO_DISPLAY_NAME]:DIR_NAME$v,[VERO_DISPLAY_NAME]:DIR_NAME$u,[MOUSEFLOW_DISPLAY_NAME]:DIR_NAME$t,[ROCKERBOX_DISPLAY_NAME]:DIR_NAME$s,[CONVERTFLOW_DISPLAY_NAME]:DIR_NAME$r,[SNAPENGAGE_DISPLAY_NAME]:DIR_NAME$q,[LIVECHAT_DISPLAY_NAME]:DIR_NAME$p,[SHYNET_DISPLAY_NAME]:DIR_NAME$o,[WOOPRA_DISPLAY_NAME]:DIR_NAME$n,[ROLLBAR_DISPLAY_NAME]:DIR_NAME$m,[QUORA_PIXEL_DISPLAY_NAME]:DIR_NAME$l,[JUNE_DISPLAY_NAME]:DIR_NAME$k,[ENGAGE_DISPLAY_NAME]:DIR_NAME$j,[ITERABLE_DISPLAY_NAME]:DIR_NAME$i,[YANDEX_METRICA_DISPLAY_NAME]:DIR_NAME$h,[REFINER_DISPLAY_NAME]:DIR_NAME$g,[QUALAROO_DISPLAY_NAME]:DIR_NAME$f,[PODSIGHTS_DISPLAY_NAME]:DIR_NAME$e,[AXEPTIO_DISPLAY_NAME]:DIR_NAME$d,[SATISMETER_DISPLAY_NAME]:DIR_NAME$c,[MICROSOFT_CLARITY_DISPLAY_NAME]:DIR_NAME$b,[SENDINBLUE_DISPLAY_NAME]:DIR_NAME$a,[OLARK_DISPLAY_NAME]:DIR_NAME$9,[LEMNISK_DISPLAY_NAME]:DIR_NAME$8,[TIKTOK_ADS_DISPLAY_NAME]:DIR_NAME$7,[ACTIVE_CAMPAIGN_DISPLAY_NAME]:DIR_NAME$6,[SPRIG_DISPLAY_NAME]:DIR_NAME$5,[SPOTIFYPIXEL_DISPLAY_NAME]:DIR_NAME$4,[COMMANDBAR_DISPLAY_NAME]:DIR_NAME$3,[NINETAILED_DISPLAY_NAME]:DIR_NAME$2,[GAINSIGHT_PX_DISPLAY_NAME]:DIR_NAME$1,[XPIXEL_DISPLAY_NAME]:DIR_NAME};
|
1236
1234
|
|
1237
1235
|
/**
|
1238
1236
|
* Determines if the destination SDK code is evaluated
|
@@ -482,7 +482,7 @@ error.stack=`${stack}\n${MANUAL_ERROR_IDENTIFIER}`;break;case stacktrace:// esli
|
|
482
482
|
error.stacktrace=`${stacktrace}\n${MANUAL_ERROR_IDENTIFIER}`;break;case operaSourceloc:default:// eslint-disable-next-line no-param-reassign
|
483
483
|
error['opera#sourceloc']=`${operaSourceloc}\n${MANUAL_ERROR_IDENTIFIER}`;break;}}}globalThis.dispatchEvent(new ErrorEvent('error',{error,bubbles:true,cancelable:true,composed:true}));};
|
484
484
|
|
485
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0
|
485
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
486
486
|
|
487
487
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
488
488
|
|
@@ -621,7 +621,7 @@ const BUILD_TYPE='modern';const SDK_CDN_BASE_URL='https://cdn.rudderlabs.com';co
|
|
621
621
|
|
622
622
|
const DEFAULT_STORAGE_ENCRYPTION_VERSION='v3';const DEFAULT_DATA_PLANE_EVENTS_TRANSPORT='xhr';const ConsentManagersToPluginNameMap={iubenda:'IubendaConsentManager',oneTrust:'OneTrustConsentManager',ketch:'KetchConsentManager',custom:'CustomConsentManager'};const StorageEncryptionVersionsToPluginNameMap={[DEFAULT_STORAGE_ENCRYPTION_VERSION]:'StorageEncryption',legacy:'StorageEncryptionLegacy'};const DataPlaneEventsTransportToPluginNameMap={[DEFAULT_DATA_PLANE_EVENTS_TRANSPORT]:'XhrQueue',beacon:'BeaconQueue'};const DEFAULT_DATA_SERVICE_ENDPOINT='rsaRequest';const METRICS_SERVICE_ENDPOINT='rsaMetrics';
|
623
623
|
|
624
|
-
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:
|
624
|
+
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:true,lockPluginsVersion:true,uaChTrackLevel:'none',plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:true,cookie:{}},sendAdblockPage:false,sameDomainCookiesOnly:false,secureCookie:false,sendAdblockPageOptions:{},useServerSideCookies:false};const loadOptionsState=d(clone(defaultLoadOptions));
|
625
625
|
|
626
626
|
const DEFAULT_USER_SESSION_VALUES={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{},authToken:null};const SERVER_SIDE_COOKIES_DEBOUNCE_TIME=10;// milliseconds
|
627
627
|
|
@@ -744,8 +744,8 @@ const APP_STATE_EXCLUDE_KEYS=['userId','userTraits','groupId','groupTraits','ano
|
|
744
744
|
|
745
745
|
const getErrInstance=(err,errorType)=>{switch(errorType){case ErrorType.UNHANDLEDEXCEPTION:{const{error}=err;return error||err;}case ErrorType.UNHANDLEDREJECTION:{return err.reason;}case ErrorType.HANDLEDEXCEPTION:default:return err;}};const createNewBreadcrumb=message=>({type:'manual',name:message,timestamp:new Date(),metaData:{}});/**
|
746
746
|
* A function to get the Bugsnag release stage for the current environment
|
747
|
-
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise '
|
748
|
-
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'
|
747
|
+
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise 'production' (it'll be replaced with the actual release stage during the build)
|
748
|
+
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'production';};const getAppStateForMetadata=state=>{const stateStr=stringifyWithoutCircular(state,false,APP_STATE_EXCLUDE_KEYS);return stateStr!==null?JSON.parse(stateStr):{};};const getURLWithoutQueryString=()=>{const url=globalThis.location.href.split('?');return url[0];};const getUserDetails=(source,session,lifecycle,autoTrack)=>({id:`${source.value?.id??lifecycle.writeKey.value}..${session.sessionInfo.value.id??'NA'}..${autoTrack.pageLifecycle.pageViewId.value??'NA'}`,name:source.value?.name??'NA'});const getDeviceDetails=(locale,userAgent)=>({locale:locale.value??'NA',userAgent:userAgent.value??'NA',time:new Date()});const getBugsnagErrorEvent=(exception,errorState,state)=>{const{context,lifecycle,session,source,reporting,autoTrack}=state;const{app,locale,userAgent,timezone,screen,library}=context;return {payloadVersion:'5',notifier:{name:NOTIFIER_NAME,version:app.value.version,url:SDK_GITHUB_URL},events:[{exceptions:[clone(exception)],severity:errorState.severity,unhandled:errorState.unhandled,severityReason:errorState.severityReason,app:{version:app.value.version,releaseStage:getReleaseStage(),type:app.value.installType},device:getDeviceDetails(locale,userAgent),request:{url:getURLWithoutQueryString(),clientIp:'[NOT COLLECTED]'},breadcrumbs:clone(reporting.breadcrumbs.value),context:exception.message,metaData:{app:{snippetVersion:library.value.snippetVersion},device:{...screen.value,timezone:timezone.value},// Add rest of the state groups as metadata
|
749
749
|
// so that they show up as separate tabs in the dashboard
|
750
750
|
...getAppStateForMetadata(state)},user:getUserDetails(source,session,lifecycle,autoTrack)}]};};/**
|
751
751
|
* A function to determine whether the error should be promoted to notify or not
|
@@ -488,7 +488,7 @@
|
|
488
488
|
error.stacktrace=`${stacktrace}\n${MANUAL_ERROR_IDENTIFIER}`;break;case operaSourceloc:default:// eslint-disable-next-line no-param-reassign
|
489
489
|
error['opera#sourceloc']=`${operaSourceloc}\n${MANUAL_ERROR_IDENTIFIER}`;break;}}}globalThis.dispatchEvent(new ErrorEvent('error',{error,bubbles:true,cancelable:true,composed:true}));};
|
490
490
|
|
491
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0
|
491
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.17.0';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
492
492
|
|
493
493
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
494
494
|
|
@@ -627,7 +627,7 @@
|
|
627
627
|
|
628
628
|
const DEFAULT_STORAGE_ENCRYPTION_VERSION='v3';const DEFAULT_DATA_PLANE_EVENTS_TRANSPORT='xhr';const ConsentManagersToPluginNameMap={iubenda:'IubendaConsentManager',oneTrust:'OneTrustConsentManager',ketch:'KetchConsentManager',custom:'CustomConsentManager'};const StorageEncryptionVersionsToPluginNameMap={[DEFAULT_STORAGE_ENCRYPTION_VERSION]:'StorageEncryption',legacy:'StorageEncryptionLegacy'};const DataPlaneEventsTransportToPluginNameMap={[DEFAULT_DATA_PLANE_EVENTS_TRANSPORT]:'XhrQueue',beacon:'BeaconQueue'};const DEFAULT_DATA_SERVICE_ENDPOINT='rsaRequest';const METRICS_SERVICE_ENDPOINT='rsaMetrics';
|
629
629
|
|
630
|
-
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:
|
630
|
+
const defaultLoadOptions={configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:DEFAULT_INTEGRATIONS_CONFIG,useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:true,lockPluginsVersion:true,uaChTrackLevel:'none',plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:true,cookie:{}},sendAdblockPage:false,sameDomainCookiesOnly:false,secureCookie:false,sendAdblockPageOptions:{},useServerSideCookies:false};const loadOptionsState=d(clone(defaultLoadOptions));
|
631
631
|
|
632
632
|
const DEFAULT_USER_SESSION_VALUES={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{},authToken:null};const SERVER_SIDE_COOKIES_DEBOUNCE_TIME=10;// milliseconds
|
633
633
|
|
@@ -750,8 +750,8 @@
|
|
750
750
|
|
751
751
|
const getErrInstance=(err,errorType)=>{switch(errorType){case ErrorType.UNHANDLEDEXCEPTION:{const{error}=err;return error||err;}case ErrorType.UNHANDLEDREJECTION:{return err.reason;}case ErrorType.HANDLEDEXCEPTION:default:return err;}};const createNewBreadcrumb=message=>({type:'manual',name:message,timestamp:new Date(),metaData:{}});/**
|
752
752
|
* A function to get the Bugsnag release stage for the current environment
|
753
|
-
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise '
|
754
|
-
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'
|
753
|
+
* @returns 'development' if the host is empty (for file:// protocol etc.) or a dev host (localhost, 127.0.0.1, etc.), otherwise 'production' (it'll be replaced with the actual release stage during the build)
|
754
|
+
*/const getReleaseStage=()=>{const host=globalThis.location.hostname;return !host||host&&DEV_HOSTS.includes(host)?'development':'production';};const getAppStateForMetadata=state=>{const stateStr=stringifyWithoutCircular(state,false,APP_STATE_EXCLUDE_KEYS);return stateStr!==null?JSON.parse(stateStr):{};};const getURLWithoutQueryString=()=>{const url=globalThis.location.href.split('?');return url[0];};const getUserDetails=(source,session,lifecycle,autoTrack)=>({id:`${source.value?.id??lifecycle.writeKey.value}..${session.sessionInfo.value.id??'NA'}..${autoTrack.pageLifecycle.pageViewId.value??'NA'}`,name:source.value?.name??'NA'});const getDeviceDetails=(locale,userAgent)=>({locale:locale.value??'NA',userAgent:userAgent.value??'NA',time:new Date()});const getBugsnagErrorEvent=(exception,errorState,state)=>{const{context,lifecycle,session,source,reporting,autoTrack}=state;const{app,locale,userAgent,timezone,screen,library}=context;return {payloadVersion:'5',notifier:{name:NOTIFIER_NAME,version:app.value.version,url:SDK_GITHUB_URL},events:[{exceptions:[clone(exception)],severity:errorState.severity,unhandled:errorState.unhandled,severityReason:errorState.severityReason,app:{version:app.value.version,releaseStage:getReleaseStage(),type:app.value.installType},device:getDeviceDetails(locale,userAgent),request:{url:getURLWithoutQueryString(),clientIp:'[NOT COLLECTED]'},breadcrumbs:clone(reporting.breadcrumbs.value),context:exception.message,metaData:{app:{snippetVersion:library.value.snippetVersion},device:{...screen.value,timezone:timezone.value},// Add rest of the state groups as metadata
|
755
755
|
// so that they show up as separate tabs in the dashboard
|
756
756
|
...getAppStateForMetadata(state)},user:getUserDetails(source,session,lifecycle,autoTrack)}]};};/**
|
757
757
|
* A function to determine whether the error should be promoted to notify or not
|
package/package.json
CHANGED