@carbon-labs/wc-global-header 0.94.0 → 0.95.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.
@@ -6727,6 +6727,13 @@ class pa {
6727
6727
  stopRefreshSchedule() {
6728
6728
  this.refreshIntervalId && (clearInterval(this.refreshIntervalId), this.refreshIntervalId = null);
6729
6729
  }
6730
+ rescheduleRefresh(o) {
6731
+ this.stopRefreshSchedule();
6732
+ const e = Math.max(0, o - 300 * 1e3);
6733
+ window.setTimeout(() => {
6734
+ this.triggerRefresh(), this.startRefreshSchedule();
6735
+ }, e);
6736
+ }
6730
6737
  async triggerRefresh() {
6731
6738
  const o = this.basePath ? this.basePath + "/v1/solis/session/refresh-token" : "/v1/solis/session/refresh-token";
6732
6739
  try {
@@ -6734,7 +6741,11 @@ class pa {
6734
6741
  method: "GET",
6735
6742
  credentials: "same-origin"
6736
6743
  });
6737
- e.ok ? console.log("Solis token refresh successful") : e.status === 429 ? console.log("Solis token refresh skipped (too recent)") : e.status === 401 || e.status === 403 ? (console.error("Solis token refresh unauthorized - triggering logout"), await this.performLogout()) : console.error("Solis token refresh failed:", e.status);
6744
+ if (e.ok) {
6745
+ console.log("Solis token refresh successful");
6746
+ const s = await e.json().catch(() => null);
6747
+ (s == null ? void 0 : s.ttl) != null && this.rescheduleRefresh(s.ttl * 1e3);
6748
+ } else e.status === 429 ? console.log("Solis token refresh skipped (too recent)") : e.status === 401 || e.status === 403 ? (console.error("Solis token refresh unauthorized - triggering logout"), await this.performLogout()) : console.error("Solis token refresh failed:", e.status);
6738
6749
  } catch (e) {
6739
6750
  console.error("Solis token refresh error:", e.message);
6740
6751
  }
@@ -1,5 +1,5 @@
1
1
  import E from "react";
2
- import { b as A } from "./HybridIpaasHeader-C1d3BtRJ.mjs";
2
+ import { b as A } from "./HybridIpaasHeader-DgQQiBl6.mjs";
3
3
  /**
4
4
  * @license
5
5
  * Copyright 2018 Google LLC
@@ -1,5 +1,5 @@
1
- import { C as se, e as u, r as K, i as F, n as d, j as v, A as X, t as Z, s as q, d as i, f as x, F as U, g as V, o as b, h as Y, k as L, _ as oe, a as W, c as ce, H as D, l as ie } from "./HybridIpaasHeader-C1d3BtRJ.mjs";
2
- import { b as De } from "./HybridIpaasHeader-C1d3BtRJ.mjs";
1
+ import { C as se, e as u, r as K, i as F, n as d, j as v, A as X, t as Z, s as q, d as i, f as x, F as U, g as V, o as b, h as Y, k as L, _ as oe, a as W, c as ce, H as D, l as ie } from "./HybridIpaasHeader-DgQQiBl6.mjs";
2
+ import { b as De } from "./HybridIpaasHeader-DgQQiBl6.mjs";
3
3
  var le = {
4
4
  elem: "svg",
5
5
  attrs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/wc-global-header",
3
- "version": "0.94.0",
3
+ "version": "0.95.0",
4
4
  "author": "Your Name <your@email.com>",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -49,5 +49,5 @@
49
49
  "vite": "^6.4.2",
50
50
  "webdriverio": "^9.23.2"
51
51
  },
52
- "gitHead": "80ff0a4d9a462d7b545a249cfce834a76b4cbdf4"
52
+ "gitHead": "344bd47b017cdd4655ef65a7fc22f05c3ed77cc2"
53
53
  }