@microsoft/applicationinsights-debugplugin-js 2.7.2-nightly.2111-10 → 2.7.2-nightly.2111-15

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.
Files changed (55) hide show
  1. package/browser/{ai.dbg.2.7.2-nightly.2111-10.cjs.js → ai.dbg.2.7.2-nightly.2111-15.cjs.js} +47 -7
  2. package/browser/ai.dbg.2.7.2-nightly.2111-15.cjs.js.map +1 -0
  3. package/browser/ai.dbg.2.7.2-nightly.2111-15.cjs.min.js +6 -0
  4. package/browser/ai.dbg.2.7.2-nightly.2111-15.cjs.min.js.map +1 -0
  5. package/browser/{ai.dbg.2.7.2-nightly.2111-10.gbl.js → ai.dbg.2.7.2-nightly.2111-15.gbl.js} +47 -7
  6. package/browser/ai.dbg.2.7.2-nightly.2111-15.gbl.js.map +1 -0
  7. package/browser/ai.dbg.2.7.2-nightly.2111-15.gbl.min.js +6 -0
  8. package/browser/ai.dbg.2.7.2-nightly.2111-15.gbl.min.js.map +1 -0
  9. package/browser/ai.dbg.2.7.2-nightly.2111-15.integrity.json +66 -0
  10. package/browser/{ai.dbg.2.7.2-nightly.2111-10.js → ai.dbg.2.7.2-nightly.2111-15.js} +47 -7
  11. package/browser/ai.dbg.2.7.2-nightly.2111-15.js.map +1 -0
  12. package/browser/ai.dbg.2.7.2-nightly.2111-15.min.js +6 -0
  13. package/browser/ai.dbg.2.7.2-nightly.2111-15.min.js.map +1 -0
  14. package/browser/ai.dbg.2.cjs.js +46 -6
  15. package/browser/ai.dbg.2.cjs.js.map +1 -1
  16. package/browser/ai.dbg.2.cjs.min.js +2 -2
  17. package/browser/ai.dbg.2.cjs.min.js.map +1 -1
  18. package/browser/ai.dbg.2.gbl.js +46 -6
  19. package/browser/ai.dbg.2.gbl.js.map +1 -1
  20. package/browser/ai.dbg.2.gbl.min.js +2 -2
  21. package/browser/ai.dbg.2.gbl.min.js.map +1 -1
  22. package/browser/ai.dbg.2.js +46 -6
  23. package/browser/ai.dbg.2.js.map +1 -1
  24. package/browser/ai.dbg.2.min.js +2 -2
  25. package/browser/ai.dbg.2.min.js.map +1 -1
  26. package/dist/applicationinsights-debugplugin-js.d.ts +1 -1
  27. package/dist/applicationinsights-debugplugin-js.js +46 -6
  28. package/dist/applicationinsights-debugplugin-js.js.map +1 -1
  29. package/dist/applicationinsights-debugplugin-js.min.js +2 -2
  30. package/dist/applicationinsights-debugplugin-js.min.js.map +1 -1
  31. package/dist/applicationinsights-debugplugin-js.rollup.d.ts +1 -1
  32. package/dist-esm/DebugPlugin.js +12 -5
  33. package/dist-esm/DebugPlugin.js.map +1 -1
  34. package/dist-esm/applicationinsights-debugplugin-js.js +1 -1
  35. package/dist-esm/components/Dashboard.js +1 -1
  36. package/dist-esm/components/LogEntry.js +1 -1
  37. package/dist-esm/components/debugBins.js +1 -1
  38. package/dist-esm/components/filterList.js +1 -1
  39. package/dist-esm/components/helpers.js +3 -2
  40. package/dist-esm/components/helpers.js.map +1 -1
  41. package/dist-esm/components/styleNodeSrc.js +1 -1
  42. package/dist-esm/interfaces/IDebugPluginConfig.js +1 -1
  43. package/package.json +3 -3
  44. package/src/DebugPlugin.ts +17 -4
  45. package/src/components/helpers.ts +3 -2
  46. package/browser/ai.dbg.2.7.2-nightly.2111-10.cjs.js.map +0 -1
  47. package/browser/ai.dbg.2.7.2-nightly.2111-10.cjs.min.js +0 -6
  48. package/browser/ai.dbg.2.7.2-nightly.2111-10.cjs.min.js.map +0 -1
  49. package/browser/ai.dbg.2.7.2-nightly.2111-10.gbl.js.map +0 -1
  50. package/browser/ai.dbg.2.7.2-nightly.2111-10.gbl.min.js +0 -6
  51. package/browser/ai.dbg.2.7.2-nightly.2111-10.gbl.min.js.map +0 -1
  52. package/browser/ai.dbg.2.7.2-nightly.2111-10.integrity.json +0 -66
  53. package/browser/ai.dbg.2.7.2-nightly.2111-10.js.map +0 -1
  54. package/browser/ai.dbg.2.7.2-nightly.2111-10.min.js +0 -6
  55. package/browser/ai.dbg.2.7.2-nightly.2111-10.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Debug Plugin, 2.7.2-nightly.2111-10
2
+ * Application Insights JavaScript SDK - Debug Plugin, 2.7.2-nightly.2111-15
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  this.Microsoft = this.Microsoft || {};
@@ -811,6 +811,22 @@ this.Microsoft = this.Microsoft || {};
811
811
  return _beaconsSupported;
812
812
  }
813
813
 
814
+ var _aiNamespace = null;
815
+ function _getExtensionNamespace() {
816
+ var target = getGlobalInst("Microsoft");
817
+ if (target) {
818
+ _aiNamespace = target["ApplicationInsights"];
819
+ }
820
+ return _aiNamespace;
821
+ }
822
+ function getDebugExt(config) {
823
+ var ns = _aiNamespace;
824
+ if (!ns && config.disableDbgExt !== true) {
825
+ ns = _aiNamespace || _getExtensionNamespace();
826
+ }
827
+ return ns ? ns["ChromeDbgExt"] : null;
828
+ }
829
+
814
830
  var AiNonUserActionablePrefix = "AI (Internal): ";
815
831
  var AiUserActionablePrefix = "AI: ";
816
832
  var AIInternalMessagePrefix = "AITR_";
@@ -894,13 +910,18 @@ this.Microsoft = this.Microsoft || {};
894
910
  }
895
911
  _self.logInternalMessage(severity, message);
896
912
  }
913
+ else {
914
+ _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
915
+ }
897
916
  }
898
917
  };
899
918
  _self.warnToConsole = function (message) {
900
919
  _logToConsole("warn", message);
920
+ _debugExtMsg("warning", message);
901
921
  };
902
922
  _self.errorToConsole = function (message) {
903
923
  _logToConsole("error", message);
924
+ _debugExtMsg("error", message);
904
925
  };
905
926
  _self.resetInternalMessageCount = function () {
906
927
  _messageCount = 0;
@@ -922,12 +943,18 @@ this.Microsoft = this.Microsoft || {};
922
943
  if (severity <= _self.telemetryLoggingLevel()) {
923
944
  _self.queue.push(message);
924
945
  _messageCount++;
946
+ _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
925
947
  }
926
948
  if (_messageCount === _self.maxInternalMessageLimit()) {
927
949
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
928
950
  var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
929
951
  _self.queue.push(throttleMessage);
930
- _self.warnToConsole(throttleLimitMessage);
952
+ if (severity === LoggingSeverity.CRITICAL) {
953
+ _self.errorToConsole(throttleLimitMessage);
954
+ }
955
+ else {
956
+ _self.warnToConsole(throttleLimitMessage);
957
+ }
931
958
  }
932
959
  }
933
960
  };
@@ -941,6 +968,12 @@ this.Microsoft = this.Microsoft || {};
941
968
  function _areInternalMessagesThrottled() {
942
969
  return _messageCount >= _self.maxInternalMessageLimit();
943
970
  }
971
+ function _debugExtMsg(name, data) {
972
+ var dbgExt = getDebugExt(config);
973
+ if (dbgExt && dbgExt.diagLog) {
974
+ dbgExt.diagLog(name, data);
975
+ }
976
+ }
944
977
  });
945
978
  }
946
979
  return DiagnosticLogger;
@@ -2286,7 +2319,7 @@ this.Microsoft = this.Microsoft || {};
2286
2319
  function makeRegex(value) {
2287
2320
  if (value && value.length > 0) {
2288
2321
  value = value.replace(/\\/g, "\\\\");
2289
- value = value.replace(/([\+\?\|\{\[\(\)\^\$\#\.]}])/g, "\\$1");
2322
+ value = value.replace(/([\+\?\|\{\}\[\]\(\)\^\$\#\.\=\!\:\/])/g, "\\$1");
2290
2323
  value = value.replace(/\*/g, ".*");
2291
2324
  return new RegExp("(" + value + ")");
2292
2325
  }
@@ -3267,6 +3300,13 @@ this.Microsoft = this.Microsoft || {};
3267
3300
  }
3268
3301
  return evtPrefix;
3269
3302
  }
3303
+ function _logEntry(theEvent, evtName, kind) {
3304
+ dashboard.newLogEntry(theEvent, dateNow() - startTime, evtName, 0, kind);
3305
+ var dbgExt = getDebugExt(_self.core.config);
3306
+ if (dbgExt && dbgExt.debugMsg) {
3307
+ dbgExt.debugMsg(evtName, theEvent);
3308
+ }
3309
+ }
3270
3310
  function _handleInstPreHook() {
3271
3311
  return function (funcArgs) {
3272
3312
  var orgArgs = [];
@@ -3278,7 +3318,7 @@ this.Microsoft = this.Microsoft || {};
3278
3318
  debugBinParent.addClassToEl("notify");
3279
3319
  }
3280
3320
  var evtPrefix = _getEvtPrefix(funcArgs);
3281
- dashboard.newLogEntry(_createInstrumentObject(funcArgs, orgArgs), dateNow() - startTime, "".concat(evtPrefix), 0, funcArgs.name);
3321
+ _logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs.name);
3282
3322
  if (_theConfig.dumpToConsole() && console && console.log) {
3283
3323
  console.log("[".concat(evtPrefix, "] preProcess - funcArgs: "), funcArgs);
3284
3324
  console.log("[".concat(evtPrefix, "] preProcess - orgArgs: "), orgArgs);
@@ -3296,7 +3336,7 @@ this.Microsoft = this.Microsoft || {};
3296
3336
  if (!debugBinParent.showChildren) {
3297
3337
  debugBinParent.addClassToEl("notify");
3298
3338
  }
3299
- dashboard.newLogEntry(_createInstrumentObject(funcArgs, orgArgs), dateNow() - startTime, "".concat(evtPrefix), 0, funcArgs.name);
3339
+ _logEntry(_createInstrumentObject(funcArgs, orgArgs), evtPrefix, funcArgs.name);
3300
3340
  if (_theConfig.dumpToConsole() && console && console.log) {
3301
3341
  console.log("[".concat(evtPrefix, "] complete"));
3302
3342
  }
@@ -3308,7 +3348,7 @@ this.Microsoft = this.Microsoft || {};
3308
3348
  console.log("[".concat(_self.identifier, ":processTelemetry] complete"));
3309
3349
  }
3310
3350
  if (!debugBins["processTelemetry"] && _theConfig.logProcessTelemetry() === true) {
3311
- dashboard.newLogEntry(event, dateNow() - startTime, "[".concat(_self.identifier, ":processTelemetry[").concat(event.baseType, "]"), 0, "processTelemetry");
3351
+ _logEntry(event, "[".concat(_self.identifier, ":processTelemetry[").concat(event.baseType, "]"), "processTelemetry");
3312
3352
  }
3313
3353
  _self.processNext(event, itemCtx);
3314
3354
  };
@@ -3325,4 +3365,4 @@ this.Microsoft = this.Microsoft || {};
3325
3365
  (function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
3326
3366
 
3327
3367
  })(this.Microsoft.ApplicationInsights = this.Microsoft.ApplicationInsights || {});
3328
- //# sourceMappingURL=ai.dbg.2.7.2-nightly.2111-10.gbl.js.map
3368
+ //# sourceMappingURL=ai.dbg.2.7.2-nightly.2111-15.gbl.js.map