@bizkit.io/webclient 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) 2026 bizkit.io
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
- let e,t;async function n(n){return t?Promise.reject(`already initialized!`):(e=n?`https://w.bizkit.io`:`https://dw.bizkit.io`,new Promise((n,r)=>{function i(){n()}t=document.createElement(`iframe`),t.src=e,t.onload=i,t.referrerPolicy=`no-referrer`,document.body.appendChild(t)}))}async function r(){return t?new Promise((n,r)=>{let i=setTimeout(r,2e3),a=new MessageChannel;a.port1.onmessage=t=>{if(i.close(),t.origin!==e)return r();n(t.data)},t.contentWindow?.postMessage(location.origin,e,[a.port2])}):Promise.reject(`not initialized!`)}window.bizkit_init=n,window.get_bizkit_token=r;export{n as bizkit_init,r as get_bizkit_token};
4
+ let e,t;async function n(n){if(!t)return e=n?`https://w.bizkit.io`:`https://dw.bizkit.io`,new Promise((n,r)=>{function i(){n()}t=document.createElement(`iframe`),t.src=e,t.onload=i,t.referrerPolicy=`no-referrer`,document.body.appendChild(t)})}async function r(){return t?new Promise((n,r)=>{let i=setTimeout(r,2e3),a=new MessageChannel;a.port1.onmessage=t=>{if(i.close(),t.origin!==e)return r();n(t.data)},t.contentWindow?.postMessage(location.origin,e,[a.port2])}):Promise.reject(`not initialized!`)}window.bizkit_init=n,window.get_bizkit_token=r;export{n as bizkit_init,r as get_bizkit_token};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizkit.io/webclient",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Web client to get bizkit.io tokens",
5
5
  "keywords": [
6
6
  "bizkit.io",