@tracelog/lib 2.2.1-rc.82.7 → 2.2.1

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.
@@ -557,7 +557,7 @@ var LONG_TASK_THROTTLE_MS = 1e3;
557
557
  var MAX_NAVIGATION_HISTORY = 50;
558
558
 
559
559
  // package.json
560
- var version = "2.2.1";
560
+ var version = "2.2.0";
561
561
 
562
562
  // src/constants/version.constants.ts
563
563
  var LIB_VERSION = version;
@@ -848,6 +848,7 @@ var sanitizeString = (value) => {
848
848
  }
849
849
  });
850
850
  }
851
+ sanitized = sanitized.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#x27;").replaceAll("/", "&#x2F;");
851
852
  const result = sanitized.trim();
852
853
  return result;
853
854
  };
@@ -6121,7 +6122,7 @@ var App = class extends StateManager {
6121
6122
  */
6122
6123
  async init(config = {}) {
6123
6124
  if (this.isInitialized) {
6124
- return { sessionId: this.get("sessionId") ?? "" };
6125
+ return;
6125
6126
  }
6126
6127
  this.managers.storage = new StorageManager();
6127
6128
  try {
@@ -6139,7 +6140,6 @@ var App = class extends StateManager {
6139
6140
  log("warn", "Failed to recover persisted events", { error });
6140
6141
  });
6141
6142
  this.isInitialized = true;
6142
- return { sessionId: this.get("sessionId") ?? "" };
6143
6143
  } catch (error) {
6144
6144
  this.destroy(true);
6145
6145
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -6299,15 +6299,6 @@ var App = class extends StateManager {
6299
6299
  getEventManager() {
6300
6300
  return this.managers.event;
6301
6301
  }
6302
- /**
6303
- * Returns the current session ID.
6304
- *
6305
- * @returns The session ID string, or null if not yet initialized
6306
- * @internal Used by api.getSessionId()
6307
- */
6308
- getSessionId() {
6309
- return this.get("sessionId");
6310
- }
6311
6302
  /**
6312
6303
  * Validates metadata object structure and values.
6313
6304
  *
@@ -6420,17 +6411,17 @@ var isInitializing = false;
6420
6411
  var isDestroying = false;
6421
6412
  var init = async (config) => {
6422
6413
  if (typeof window === "undefined" || typeof document === "undefined") {
6423
- return { sessionId: "" };
6414
+ return;
6424
6415
  }
6425
6416
  isDestroying = false;
6426
6417
  if (window.__traceLogDisabled === true) {
6427
- return { sessionId: "" };
6418
+ return;
6428
6419
  }
6429
6420
  if (app) {
6430
- return { sessionId: app.getSessionId() ?? "" };
6421
+ return;
6431
6422
  }
6432
6423
  if (isInitializing) {
6433
- return { sessionId: "" };
6424
+ return;
6434
6425
  }
6435
6426
  isInitializing = true;
6436
6427
  try {
@@ -6459,9 +6450,8 @@ var init = async (config) => {
6459
6450
  reject(new Error(`[TraceLog] Initialization timeout after ${INITIALIZATION_TIMEOUT_MS}ms`));
6460
6451
  }, INITIALIZATION_TIMEOUT_MS);
6461
6452
  });
6462
- const result = await Promise.race([initPromise, timeoutPromise]);
6453
+ await Promise.race([initPromise, timeoutPromise]);
6463
6454
  app = instance;
6464
- return result;
6465
6455
  } catch (error) {
6466
6456
  try {
6467
6457
  instance.destroy(true);
@@ -6587,15 +6577,6 @@ var isInitialized = () => {
6587
6577
  }
6588
6578
  return app !== null;
6589
6579
  };
6590
- var getSessionId = () => {
6591
- if (typeof window === "undefined" || typeof document === "undefined") {
6592
- return null;
6593
- }
6594
- if (!app) {
6595
- return null;
6596
- }
6597
- return app.getSessionId();
6598
- };
6599
6580
  var destroy = () => {
6600
6581
  if (typeof window === "undefined" || typeof document === "undefined") {
6601
6582
  return;
@@ -6669,7 +6650,6 @@ var tracelog = {
6669
6650
  setCustomHeaders,
6670
6651
  removeCustomHeaders,
6671
6652
  isInitialized,
6672
- getSessionId,
6673
6653
  destroy,
6674
6654
  setQaMode: setQaMode2,
6675
6655
  updateGlobalMetadata,