@spiffcommerce/core 26.42.1-beta.34f81c7e-45bc-5e97-9960-4f12e183f3ba → 26.42.1-beta.796f341b-bc66-5f7a-8f69-b0df71fff691

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/index.mjs CHANGED
@@ -15753,7 +15753,7 @@ class ad {
15753
15753
  } catch (a) {
15754
15754
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15755
15755
  }
15756
- }, this.options = t, this.options.applicationKey && Qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.42.1-beta.00fb2ee7-ef47-5106-ad9a-05792bc09859"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15756
+ }, this.options = t, this.options.applicationKey && Qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.42.1-beta.34f81c7e-45bc-5e97-9960-4f12e183f3ba"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15757
15757
  }
15758
15758
  configure(t) {
15759
15759
  mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Or(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16024,10 +16024,8 @@ class ad {
16024
16024
  const t = localStorage.getItem("last-refreshed-cognito-tokens"), e = localStorage.getItem("cognito-tokens");
16025
16025
  if (!t || !e)
16026
16026
  throw console.log("TOKEN DEBUG: bailing"), new Error("No token data in storage.");
16027
- const a = JSON.parse(e);
16028
- console.log(`TOKEN DEBUG: tokens are ${JSON.stringify(a, null, 2)}`);
16029
- const n = (/* @__PURE__ */ new Date()).getTime() / 1e3;
16030
- if (!a.ExpiresIn || a.ExpiresIn < n - parseInt(t)) {
16027
+ const a = JSON.parse(e), n = (/* @__PURE__ */ new Date()).getTime() / 1e3;
16028
+ if (console.log(`TOKEN DEBUG: tokens are ${JSON.stringify(a, null, 2)}, now: ${n}, was: ${t}, diff: ${n - parseInt(t)}`), !a.ExpiresIn || a.ExpiresIn < n - parseInt(t)) {
16031
16029
  const i = await Lt.refreshTokens();
16032
16030
  if (console.log("TOKEN DEBUG: doing a refresh"), i != null && i.AuthenticationResult)
16033
16031
  console.log(`TOKEN DEBUG: refresh result ${JSON.stringify(i.AuthenticationResult, null, 2)}`), localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`);