@pendo/agent 2.301.0 → 2.301.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/dom.esm.js +1 -1
- package/dist/pendo.module.js +67 -46
- package/dist/pendo.module.min.js +8 -8
- package/dist/servers.json +7 -7
- package/package.json +1 -1
package/dist/dom.esm.js
CHANGED
package/dist/pendo.module.js
CHANGED
|
@@ -3904,8 +3904,8 @@ let SERVER = '';
|
|
|
3904
3904
|
let ASSET_HOST = '';
|
|
3905
3905
|
let ASSET_PATH = '';
|
|
3906
3906
|
let DESIGNER_SERVER = '';
|
|
3907
|
-
let VERSION = '2.301.
|
|
3908
|
-
let PACKAGE_VERSION = '2.301.
|
|
3907
|
+
let VERSION = '2.301.2_';
|
|
3908
|
+
let PACKAGE_VERSION = '2.301.2';
|
|
3909
3909
|
let LOADER = 'xhr';
|
|
3910
3910
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3911
3911
|
/**
|
|
@@ -12285,8 +12285,14 @@ const BEACON_GIF_FAILURES = {
|
|
|
12285
12285
|
poll: 'pendo-poll-gif-failure',
|
|
12286
12286
|
agentic: 'pendo-agentic-gif-failure'
|
|
12287
12287
|
};
|
|
12288
|
-
const GUIDE_LOOP_TIMER =
|
|
12289
|
-
|
|
12288
|
+
const GUIDE_LOOP_TIMER = {
|
|
12289
|
+
name: 'pendo-guide-loop',
|
|
12290
|
+
debuggingOnly: true
|
|
12291
|
+
};
|
|
12292
|
+
const EVENT_CAPTURED_TIMER = {
|
|
12293
|
+
name: 'pendo-event-captured',
|
|
12294
|
+
debuggingOnly: true
|
|
12295
|
+
};
|
|
12290
12296
|
const INITIALIZE = 'pendo-initialize';
|
|
12291
12297
|
const TEARDOWN = 'pendo-teardown';
|
|
12292
12298
|
const METRICS = {};
|
|
@@ -12302,12 +12308,8 @@ _.each(BEACON_GIF_FAILURES, (name) => {
|
|
|
12302
12308
|
instrument: counter
|
|
12303
12309
|
};
|
|
12304
12310
|
});
|
|
12305
|
-
METRICS[GUIDE_LOOP_TIMER] =
|
|
12306
|
-
|
|
12307
|
-
};
|
|
12308
|
-
METRICS[EVENT_CAPTURED_TIMER] = {
|
|
12309
|
-
name: EVENT_CAPTURED_TIMER
|
|
12310
|
-
};
|
|
12311
|
+
METRICS[GUIDE_LOOP_TIMER.name] = GUIDE_LOOP_TIMER;
|
|
12312
|
+
METRICS[EVENT_CAPTURED_TIMER.name] = EVENT_CAPTURED_TIMER;
|
|
12311
12313
|
METRICS[INITIALIZE] = {
|
|
12312
12314
|
name: INITIALIZE
|
|
12313
12315
|
};
|
|
@@ -12315,11 +12317,43 @@ METRICS[TEARDOWN] = {
|
|
|
12315
12317
|
name: TEARDOWN
|
|
12316
12318
|
};
|
|
12317
12319
|
|
|
12320
|
+
var debugEnabled = 'debug-enabled';
|
|
12321
|
+
function getDebuggingStorage() {
|
|
12322
|
+
try {
|
|
12323
|
+
const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
|
|
12324
|
+
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
12325
|
+
return { enabled: debuggingStorage };
|
|
12326
|
+
}
|
|
12327
|
+
return debuggingStorage || {};
|
|
12328
|
+
}
|
|
12329
|
+
catch (e) {
|
|
12330
|
+
return {};
|
|
12331
|
+
}
|
|
12332
|
+
}
|
|
12333
|
+
function isDebuggingEnabled(asBoolean = true) {
|
|
12334
|
+
let isEnabled;
|
|
12335
|
+
if (store && store.getters && store.getters['debugger/debuggingEnabled']) {
|
|
12336
|
+
isEnabled = store.getters['debugger/debuggingEnabled']();
|
|
12337
|
+
}
|
|
12338
|
+
else {
|
|
12339
|
+
isEnabled = getDebuggingStorage().enabled === true;
|
|
12340
|
+
}
|
|
12341
|
+
if (asBoolean) {
|
|
12342
|
+
return isEnabled;
|
|
12343
|
+
}
|
|
12344
|
+
else {
|
|
12345
|
+
return isEnabled ? 'Yes' : 'No';
|
|
12346
|
+
}
|
|
12347
|
+
}
|
|
12348
|
+
|
|
12318
12349
|
const PERFORMANCE_SEND_INTERVAL = 1000 * 60 * 10; // 10 minutes
|
|
12319
12350
|
class PerformanceMonitor {
|
|
12320
12351
|
constructor() {
|
|
12321
12352
|
this._isPerformanceApiAvailable = this._checkPerformanceApi();
|
|
12353
|
+
this._sending = false;
|
|
12322
12354
|
this._measuringPerformance = false;
|
|
12355
|
+
this._debugging = false;
|
|
12356
|
+
this._setDebuggingBound = _.bind(this._setDebugging, this);
|
|
12323
12357
|
this.marks = new Set();
|
|
12324
12358
|
this.measures = new Set();
|
|
12325
12359
|
}
|
|
@@ -12328,6 +12362,8 @@ class PerformanceMonitor {
|
|
|
12328
12362
|
return _.noop;
|
|
12329
12363
|
this._measuringPerformance = true;
|
|
12330
12364
|
this._markPerformance(INITIALIZE);
|
|
12365
|
+
this._setDebugging();
|
|
12366
|
+
Events.debuggerLaunched.on(this._setDebuggingBound);
|
|
12331
12367
|
this.interval = setInterval(() => {
|
|
12332
12368
|
this.send();
|
|
12333
12369
|
}, PERFORMANCE_SEND_INTERVAL);
|
|
@@ -12339,13 +12375,19 @@ class PerformanceMonitor {
|
|
|
12339
12375
|
this._markPerformance(TEARDOWN);
|
|
12340
12376
|
this.send();
|
|
12341
12377
|
this._measuringPerformance = false;
|
|
12378
|
+
this._setDebugging();
|
|
12379
|
+
Events.debuggerLaunched.off(this._setDebuggingBound);
|
|
12342
12380
|
this._clearMarksAndMeasures();
|
|
12343
12381
|
clearInterval(this.interval);
|
|
12344
12382
|
}
|
|
12345
|
-
startTimer(name, detail = null) {
|
|
12383
|
+
startTimer({ name, debuggingOnly }, detail = null) {
|
|
12384
|
+
if (debuggingOnly && !this._debugging)
|
|
12385
|
+
return;
|
|
12346
12386
|
this._markPerformance(`${name}-start`, { detail });
|
|
12347
12387
|
}
|
|
12348
|
-
stopTimer(name, detail = null) {
|
|
12388
|
+
stopTimer({ name, debuggingOnly }, detail = null) {
|
|
12389
|
+
if (debuggingOnly && !this._debugging)
|
|
12390
|
+
return;
|
|
12349
12391
|
this._markPerformance(`${name}-stop`, { detail });
|
|
12350
12392
|
this._measurePerformance(name, { detail });
|
|
12351
12393
|
}
|
|
@@ -12369,7 +12411,7 @@ class PerformanceMonitor {
|
|
|
12369
12411
|
return acc;
|
|
12370
12412
|
}, []);
|
|
12371
12413
|
this._clearMarksAndMeasures();
|
|
12372
|
-
if (_.size(payload)) {
|
|
12414
|
+
if (_.size(payload) && this._sending) {
|
|
12373
12415
|
writeMetricsPOST(payload);
|
|
12374
12416
|
}
|
|
12375
12417
|
}
|
|
@@ -12384,6 +12426,12 @@ class PerformanceMonitor {
|
|
|
12384
12426
|
_shouldMeasurePerformance() {
|
|
12385
12427
|
return this._isPerformanceApiAvailable && this._measuringPerformance;
|
|
12386
12428
|
}
|
|
12429
|
+
_setDebugging() {
|
|
12430
|
+
this._debugging = isDebuggingEnabled();
|
|
12431
|
+
}
|
|
12432
|
+
_setSending(sending) {
|
|
12433
|
+
this._sending = sending;
|
|
12434
|
+
}
|
|
12387
12435
|
_markPerformance(name, metadata) {
|
|
12388
12436
|
if (!this._shouldMeasurePerformance())
|
|
12389
12437
|
return;
|
|
@@ -12401,13 +12449,15 @@ class PerformanceMonitor {
|
|
|
12401
12449
|
}
|
|
12402
12450
|
}
|
|
12403
12451
|
_clearMarksAndMeasures() {
|
|
12404
|
-
|
|
12452
|
+
// eslint-disable-next-line agent-eslint-rules/no-array-foreach
|
|
12453
|
+
this.marks.forEach(name => {
|
|
12405
12454
|
performance.clearMarks(name);
|
|
12406
|
-
}
|
|
12455
|
+
});
|
|
12407
12456
|
this.marks.clear();
|
|
12408
|
-
|
|
12457
|
+
// eslint-disable-next-line agent-eslint-rules/no-array-foreach
|
|
12458
|
+
this.measures.forEach(name => {
|
|
12409
12459
|
performance.clearMeasures(name);
|
|
12410
|
-
}
|
|
12460
|
+
});
|
|
12411
12461
|
this.measures.clear();
|
|
12412
12462
|
}
|
|
12413
12463
|
}
|
|
@@ -21581,35 +21631,6 @@ function Wrappable() {
|
|
|
21581
21631
|
return this;
|
|
21582
21632
|
}
|
|
21583
21633
|
|
|
21584
|
-
var debugEnabled = 'debug-enabled';
|
|
21585
|
-
function getDebuggingStorage() {
|
|
21586
|
-
try {
|
|
21587
|
-
const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
|
|
21588
|
-
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
21589
|
-
return { enabled: debuggingStorage };
|
|
21590
|
-
}
|
|
21591
|
-
return debuggingStorage || {};
|
|
21592
|
-
}
|
|
21593
|
-
catch (e) {
|
|
21594
|
-
return {};
|
|
21595
|
-
}
|
|
21596
|
-
}
|
|
21597
|
-
function isDebuggingEnabled(asBoolean = true) {
|
|
21598
|
-
let isEnabled;
|
|
21599
|
-
if (store && store.getters && store.getters['debugger/debuggingEnabled']) {
|
|
21600
|
-
isEnabled = store.getters['debugger/debuggingEnabled']();
|
|
21601
|
-
}
|
|
21602
|
-
else {
|
|
21603
|
-
isEnabled = getDebuggingStorage().enabled === true;
|
|
21604
|
-
}
|
|
21605
|
-
if (asBoolean) {
|
|
21606
|
-
return isEnabled;
|
|
21607
|
-
}
|
|
21608
|
-
else {
|
|
21609
|
-
return isEnabled ? 'Yes' : 'No';
|
|
21610
|
-
}
|
|
21611
|
-
}
|
|
21612
|
-
|
|
21613
21634
|
class GuideTypeIdentifier {
|
|
21614
21635
|
constructor(identificationFn, typeName) {
|
|
21615
21636
|
this.type = typeName;
|