@bizkit.io/webclient 0.1.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/README.md +23 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +4 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# vite-plus-starter
|
|
2
|
+
|
|
3
|
+
A starter for creating a Vite Plus project.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
- Install dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
vp install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- Run the unit tests:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
vp test
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- Build the library:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
vp pack
|
|
23
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) 2026 bizkit.io
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
type BizkitToken = {
|
|
6
|
+
token: string;
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
declare function bizkit_init(production: boolean): Promise<void>;
|
|
10
|
+
declare function get_bizkit_token(): Promise<BizkitToken | undefined>;
|
|
11
|
+
declare global {
|
|
12
|
+
function bizkit_init(production: boolean): Promise<void>;
|
|
13
|
+
function get_bizkit_token(): Promise<BizkitToken | undefined>;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BizkitToken, bizkit_init, get_bizkit_token };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Copyright (c) 2026 bizkit.io
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
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};
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bizkit.io/webclient",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Web client to get bizkit.io tokens",
|
|
5
|
+
"homepage": "https://github.com/bizkit.io/webclient#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/bizkit.io/webclient/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": "bizkit.io <dev@bizkit.io>",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/bizkit.io/webclient.git"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./dist/index.js",
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^26.1.1",
|
|
28
|
+
"bumpp": "^11.1.0",
|
|
29
|
+
"typescript": "^7.0.2",
|
|
30
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.5",
|
|
31
|
+
"vite-plus": "0.2.5"
|
|
32
|
+
},
|
|
33
|
+
"devEngines": {
|
|
34
|
+
"packageManager": {
|
|
35
|
+
"name": "pnpm",
|
|
36
|
+
"version": "11.15.1",
|
|
37
|
+
"onFail": "download"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "vp pack",
|
|
42
|
+
"dev": "vp pack --watch",
|
|
43
|
+
"test": "vp test",
|
|
44
|
+
"check": "vp check"
|
|
45
|
+
}
|
|
46
|
+
}
|