@sesamy/sesamy-js 1.124.0 → 1.125.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.
- package/dist/auth0-plugin.d.ts +0 -1
- package/dist/auth0-plugin.iife.js +3 -3
- package/dist/auth0-plugin.mjs +389 -373
- package/dist/bootstrap.iife.js +1 -1
- package/dist/bootstrap.mjs +6 -6
- package/dist/sesamy-js.cjs +7 -7
- package/dist/sesamy-js.d.ts +3 -0
- package/dist/sesamy-js.iife.js +7 -7
- package/dist/sesamy-js.mjs +1500 -1453
- package/package.json +2 -2
package/dist/bootstrap.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var sesamyBootstrap=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=e.namespace||`sesamy`,n=e.fallbackSrc,r=e.version||`stable`,i=e.environment===`dev`?`scripts.sesamy.dev`:`scripts.sesamy.com`,a=e.debug?function(...e){try{console.log.apply(console,[`[sesamy-boot]`].concat(e))}catch{}}:function(){},o={};try{let e=document.getElementById(`sesamy-js`);e&&e.textContent&&(o=JSON.parse(e.textContent)||{})}catch{}let s=e.clientId||o.clientId,c=s?`https://`+i+`/s/`+s:``,l=e.src||(s?c+`/sesamy-js/`+r+`.js`:void 0),u=!e.src&&!!c,d=window;if(!e.skipAuthPrefetch&&!d.__sesamyBoot){let t=null;try{let e=sessionStorage.getItem(
|
|
1
|
+
var sesamyBootstrap=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=e.namespace||`sesamy`,n=e.fallbackSrc,r=e.version||`stable`,i=e.environment===`dev`?`scripts.sesamy.dev`:`scripts.sesamy.com`,a=e.debug?function(...e){try{console.log.apply(console,[`[sesamy-boot]`].concat(e))}catch{}}:function(){},o={};try{let e=document.getElementById(`sesamy-js`);e&&e.textContent&&(o=JSON.parse(e.textContent)||{})}catch{}let s=e.clientId||o.clientId,c=s?`https://`+i+`/s/`+s:``,l=e.src||(s?c+`/sesamy-js/`+r+`.js`:void 0),u=!e.src&&!!c,d=window;if(!e.skipAuthPrefetch&&!d.__sesamyBoot){let t=o.auth&&o.auth.vendorId||o.vendorId||s||``,n=t?`sesamy_is_authenticated_`+t:`sesamy_is_authenticated`,r=t?`sesamy:userinfo:`+t:`sesamy:userinfo`,i=null;try{let e=sessionStorage.getItem(r);if(e){let t=JSON.parse(e),n=t._cachedAt;n&&Date.now()-n<=36e5&&(i=t)}}catch{}if(i)d.__sesamyBoot=Promise.resolve(i),a(`userinfo: sessionStorage cache`);else if((`; `+document.cookie).indexOf(`; `+n+`=true`)>=0){var f=e.apiBaseUrl===void 0?o.auth&&o.auth.baseUrl||``:e.apiBaseUrl;a(`userinfo: fetching (hint cookie set)`,f+`/auth/userinfo`),d.__sesamyBoot=fetch(f+`/auth/userinfo`,{credentials:`include`,headers:{Accept:`application/json`}}).then(e=>e.ok?e.json():null).catch(()=>null)}else a(`userinfo: skipped (no hint cookie)`)}else e.skipAuthPrefetch&&a(`userinfo: skipped (skipAuthPrefetch)`);if(!l){a(`no coreSrc — neither clientId nor src resolved; nothing to load`);return}let p=o.auth&&o.auth.useHttpCookies===!0,m=u&&(e.loadAuth0Plugin===void 0?!p:e.loadAuth0Plugin),h=u&&(e.loadCapsulePlugin===void 0?o.capsule&&o.capsule.enabled===!0:e.loadCapsulePlugin),g=u&&!e.skipComponents;a(`chain`,{canChain:u,loadAuth:m,authSource:e.loadAuth0Plugin===void 0?`config`:`option`,loadCapsule:h,capsuleSource:e.loadCapsulePlugin===void 0?`config`:`option`,loadComponents:g});let _=e.auth0PluginVersion||r,v=e.capsulePluginVersion||r,y=e.componentsVersion||r,b=[];m&&b.push(c+`/auth0-plugin/`+_+`.js`),h&&b.push(c+`/capsule-plugin/`+v+`.js`),g&&b.push(c+`/sesamy-components/`+y+`.js`),b.push(l);let x=!1,S=e=>{if(x||!n)return;if(d[t]||d.__sesamyLoaded){a(`fallback: skipped (`+e+`; core loaded)`);return}x=!0,a(`fallback: firing (`+e+`)`,n);let r=document.createElement(`script`);r.src=n,r.async=!0,document.head.appendChild(r)},C=null;for(let t of b){a(`injecting`,t);let n=document.createElement(`script`);n.src=t,n.async=!1,e.debug&&(n.onload=function(){a(`loaded`,t)}),document.head.appendChild(n),t===l&&(C=n)}C&&(C.onerror=function(){S(`core onerror`)}),n&&setTimeout(function(){S(`timeout`)},e.fallbackTimeoutMs||3e3)}function n(e){return`(`+t.toString()+`)(`+JSON.stringify(e)+`);`}var r=[`clientId`,`environment`,`version`,`componentsVersion`,`auth0PluginVersion`,`capsulePluginVersion`,`src`,`fallbackSrc`,`fallbackTimeoutMs`,`apiBaseUrl`,`namespace`,`skipAuthPrefetch`,`skipComponents`,`loadAuth0Plugin`,`loadCapsulePlugin`,`debug`];if(typeof window<`u`){window.sesamyBootstrap=t;try{let e=document.getElementById(`sesamy-js`),n=e&&e.textContent?JSON.parse(e.textContent):null;if(n&&(n.clientId||n.src)){let e={};for(let t of r)n[t]!==void 0&&(e[t]=n[t]);t(e)}}catch{}}return e.renderBootstrapScript=n,e.sesamyBootstrap=t,e})({});
|
package/dist/bootstrap.mjs
CHANGED
|
@@ -11,16 +11,16 @@ function e(e) {
|
|
|
11
11
|
} catch {}
|
|
12
12
|
let s = e.clientId || o.clientId, c = s ? "https://" + i + "/s/" + s : "", l = e.src || (s ? c + "/sesamy-js/" + r + ".js" : void 0), u = !e.src && !!c, d = window;
|
|
13
13
|
if (!e.skipAuthPrefetch && !d.__sesamyBoot) {
|
|
14
|
-
let t = null;
|
|
14
|
+
let t = o.auth && o.auth.vendorId || o.vendorId || s || "", n = t ? "sesamy_is_authenticated_" + t : "sesamy_is_authenticated", r = t ? "sesamy:userinfo:" + t : "sesamy:userinfo", i = null;
|
|
15
15
|
try {
|
|
16
|
-
let e = sessionStorage.getItem(
|
|
16
|
+
let e = sessionStorage.getItem(r);
|
|
17
17
|
if (e) {
|
|
18
|
-
let
|
|
19
|
-
|
|
18
|
+
let t = JSON.parse(e), n = t._cachedAt;
|
|
19
|
+
n && Date.now() - n <= 36e5 && (i = t);
|
|
20
20
|
}
|
|
21
21
|
} catch {}
|
|
22
|
-
if (
|
|
23
|
-
else if (("; " + document.cookie).indexOf(";
|
|
22
|
+
if (i) d.__sesamyBoot = Promise.resolve(i), a("userinfo: sessionStorage cache");
|
|
23
|
+
else if (("; " + document.cookie).indexOf("; " + n + "=true") >= 0) {
|
|
24
24
|
var f = e.apiBaseUrl === void 0 ? o.auth && o.auth.baseUrl || "" : e.apiBaseUrl;
|
|
25
25
|
a("userinfo: fetching (hint cookie set)", f + "/auth/userinfo"), d.__sesamyBoot = fetch(f + "/auth/userinfo", {
|
|
26
26
|
credentials: "include",
|