@spiffcommerce/core 26.42.1-beta.a2be3530-7f45-5bf8-9e1b-7442ff43c402 → 26.42.1-beta.ee0ff451-4a2f-5a7c-8284-2f0f72791366
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
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.a2be3530-7f45-5bf8-9e1b-7442ff43c402"), 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);
|
|
@@ -15965,7 +15965,7 @@ class ad {
|
|
|
15965
15965
|
if (!n.ExpiresIn || n.ExpiresIn < i - parseInt(t)) {
|
|
15966
15966
|
const l = await Lt.refreshTokens();
|
|
15967
15967
|
if (l != null && l.AuthenticationResult)
|
|
15968
|
-
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`);
|
|
15968
|
+
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), n.AccessToken = l.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(n));
|
|
15969
15969
|
else
|
|
15970
15970
|
return this.logOut(), console.error("Failed to refresh tokens."), !1;
|
|
15971
15971
|
}
|
|
@@ -16028,7 +16028,7 @@ class ad {
|
|
|
16028
16028
|
if (console.log(`TOKEN DEBUG: tokens are ${JSON.stringify(a, null, 2)}, now: ${n}, was: ${t}, diff: ${n - parseInt(t)}, exp: ${i}`), !a.ExpiresIn || a.ExpiresIn < n - parseInt(t) || i) {
|
|
16029
16029
|
const s = await Lt.refreshTokens();
|
|
16030
16030
|
if (console.log("TOKEN DEBUG: doing a refresh"), s != null && s.AuthenticationResult)
|
|
16031
|
-
console.log(`TOKEN DEBUG: refresh result ${JSON.stringify(s.AuthenticationResult, null, 2)}`), localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`);
|
|
16031
|
+
console.log(`TOKEN DEBUG: refresh result ${JSON.stringify(s.AuthenticationResult, null, 2)}`), localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), a.AccessToken = s.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(a));
|
|
16032
16032
|
else
|
|
16033
16033
|
throw console.log("TOKEN DEBUG: logging out"), this.logOut(), new Error("Failed to refresh tokens.");
|
|
16034
16034
|
}
|