blink 1.0.6 → 1.0.8
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/browser/control/index.d.cts +16 -16
- package/dist/browser/control/index.d.ts +16 -16
- package/dist/cli/{auth-CpUNsA0k.js → auth-DeHFQhPJ.js} +1 -1
- package/dist/cli/{chat-01Fdrhd_.js → chat-Jjsxhu91.js} +1 -1
- package/dist/cli/{dev-DQh5Ph18.js → dev-BPKpFAM3.js} +99 -420
- package/dist/cli/index.js +3 -3
- package/dist/cli/init-C45jjEXu.js +416 -0
- package/dist/cli/init-DAff8BFO.js +1 -0
- package/dist/cli/login-OOGg9_8j.js +1 -0
- package/dist/cli/{run-Dy4EpNVD.js → run-_bDe0KqM.js} +1 -1
- package/dist/cli/{util-CkrO2lHF.js → util-dGFzG4wT.js} +1 -1
- package/dist/node/agent/index.node.cjs +1 -1
- package/dist/node/agent/index.node.js +1 -1
- package/dist/node/build/index.cjs +1 -1
- package/dist/node/build/index.js +1 -1
- package/dist/node/{build-D_L0gFGa.js → build-M5Q2ZTGh.js} +5 -5
- package/dist/node/{build-BzoNpizh.cjs → build-lx6plR19.cjs} +4 -4
- package/dist/node/{getMachineId-bsd-B84ixt26.cjs → getMachineId-bsd-CUUgtcEk.cjs} +1 -1
- package/dist/node/{getMachineId-bsd-BxqlJcyA.js → getMachineId-bsd-CpiyZ31n.js} +1 -1
- package/dist/node/{getMachineId-bsd-C10eVJgT.js → getMachineId-bsd-DKc3Wh2z.js} +1 -1
- package/dist/node/{getMachineId-bsd-BudRe7J9.cjs → getMachineId-bsd-YA-Qh955.cjs} +1 -1
- package/dist/node/{getMachineId-darwin-Bf4P0U5b.js → getMachineId-darwin-BBDIi9K5.js} +1 -1
- package/dist/node/{getMachineId-darwin-JB29MQsG.js → getMachineId-darwin-CQ9-5u-a.js} +1 -1
- package/dist/node/{getMachineId-darwin-ZVi3EKE3.cjs → getMachineId-darwin-CcM48gLI.cjs} +1 -1
- package/dist/node/{getMachineId-darwin-Cyng5kFG.cjs → getMachineId-darwin-IcDjLpqm.cjs} +1 -1
- package/dist/node/{getMachineId-linux-B-CtXK0L.cjs → getMachineId-linux-BzwdWZoB.cjs} +1 -1
- package/dist/node/{getMachineId-linux-BPnkHJah.js → getMachineId-linux-Cc8c4coA.js} +1 -1
- package/dist/node/{getMachineId-linux-CJXPQ8U5.cjs → getMachineId-linux-DMvLmvRp.cjs} +1 -1
- package/dist/node/{getMachineId-linux-CmMSYp7C.js → getMachineId-linux-TNXyQsBB.js} +1 -1
- package/dist/node/{getMachineId-unsupported--0R36RP6.cjs → getMachineId-unsupported-ApoW5rxx.cjs} +1 -1
- package/dist/node/{getMachineId-unsupported-C_4fnT4Z.js → getMachineId-unsupported-CRrpolgF.js} +1 -1
- package/dist/node/{getMachineId-unsupported-Dtt3HTNZ.js → getMachineId-unsupported-DGhOj3l0.js} +1 -1
- package/dist/node/{getMachineId-unsupported-DM7fz1pP.cjs → getMachineId-unsupported-DYGwqELh.cjs} +1 -1
- package/dist/node/{getMachineId-win-CjJkZMZe.cjs → getMachineId-win-B-bRjIv0.cjs} +1 -1
- package/dist/node/{getMachineId-win-D1szVnqR.js → getMachineId-win-CSKzOPIT.js} +1 -1
- package/dist/node/{getMachineId-win-DDz2FyEp.cjs → getMachineId-win-CoAu5xDr.cjs} +1 -1
- package/dist/node/{getMachineId-win-C4G-fkEF.js → getMachineId-win-Dfq5UG8G.js} +1 -1
- package/dist/node/{index.node-C6sId3jT.cjs → index.node-DN4zHlM1.cjs} +4 -4
- package/dist/node/{index.node-BdbWMIX0.js → index.node-wsvVRWwb.js} +4 -4
- package/dist/node/react/index.node.cjs +455 -94
- package/dist/node/react/index.node.js +141 -121
- package/dist/node/{token-DOfE6QlD.js → token-B0ivJQut.js} +1 -1
- package/dist/node/{token-BBGr-czK.cjs → token-C10csUbV.cjs} +1 -1
- package/dist/node/{token-util-_pz5CtFI.js → token-util-1r_uDcp7.js} +1 -1
- package/dist/node/{token-util-BOoyY0PX.cjs → token-util-BwRq8n40.cjs} +1 -1
- package/dist/node/token-util-CSWJ2yfA.js +1 -0
- package/dist/node/token-util-beB2LRJ9.cjs +1 -0
- package/package.json +1 -1
- package/dist/cli/init-DFXOMY0k.js +0 -83
- package/dist/cli/login-yMSEGrjU.js +0 -1
- package/dist/node/token-util-C_uzN2q9.js +0 -1
- package/dist/node/token-util-D9kCwzE6.cjs +0 -1
- /package/dist/cli/{dist-wyfWuz5A.js → dist-BNbSDxaw.js} +0 -0
- /package/dist/cli/{open-S_jcQ0nw.js → open-DCYivxgo.js} +0 -0
- /package/dist/node/{esm-0UNjvroT.cjs → esm-C-vSI1Ww.cjs} +0 -0
- /package/dist/node/{esm-CbZfjZBn.js → esm-D1GEQyaY.js} +0 -0
- /package/dist/node/{token-error-BoNG8ooW.cjs → token-error-l6zIbPbZ.cjs} +0 -0
- /package/dist/node/{token-error-488npYdU.js → token-error-wsvzy87W.js} +0 -0
|
@@ -65,9 +65,11 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
65
65
|
key: string;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
output:
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
output: {
|
|
69
|
+
error: string;
|
|
70
|
+
};
|
|
71
|
+
outputFormat: "json";
|
|
72
|
+
status: 400;
|
|
71
73
|
} | {
|
|
72
74
|
input: {
|
|
73
75
|
json: {
|
|
@@ -78,11 +80,9 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
78
80
|
key: string;
|
|
79
81
|
};
|
|
80
82
|
};
|
|
81
|
-
output:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
outputFormat: "json";
|
|
85
|
-
status: 400;
|
|
83
|
+
output: null;
|
|
84
|
+
outputFormat: "body";
|
|
85
|
+
status: 204;
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
} & {
|
|
@@ -340,9 +340,11 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
340
340
|
id: string;
|
|
341
341
|
};
|
|
342
342
|
};
|
|
343
|
-
output:
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
output: {
|
|
344
|
+
error: string;
|
|
345
|
+
};
|
|
346
|
+
outputFormat: "json";
|
|
347
|
+
status: 400;
|
|
346
348
|
} | {
|
|
347
349
|
input: {
|
|
348
350
|
json: {
|
|
@@ -355,11 +357,9 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
355
357
|
id: string;
|
|
356
358
|
};
|
|
357
359
|
};
|
|
358
|
-
output:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
outputFormat: "json";
|
|
362
|
-
status: 400;
|
|
360
|
+
output: null;
|
|
361
|
+
outputFormat: "body";
|
|
362
|
+
status: 204;
|
|
363
363
|
};
|
|
364
364
|
};
|
|
365
365
|
} & {
|
|
@@ -65,9 +65,11 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
65
65
|
key: string;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
output:
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
output: {
|
|
69
|
+
error: string;
|
|
70
|
+
};
|
|
71
|
+
outputFormat: "json";
|
|
72
|
+
status: 400;
|
|
71
73
|
} | {
|
|
72
74
|
input: {
|
|
73
75
|
json: {
|
|
@@ -78,11 +80,9 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
78
80
|
key: string;
|
|
79
81
|
};
|
|
80
82
|
};
|
|
81
|
-
output:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
outputFormat: "json";
|
|
85
|
-
status: 400;
|
|
83
|
+
output: null;
|
|
84
|
+
outputFormat: "body";
|
|
85
|
+
status: 204;
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
} & {
|
|
@@ -340,9 +340,11 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
340
340
|
id: string;
|
|
341
341
|
};
|
|
342
342
|
};
|
|
343
|
-
output:
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
output: {
|
|
344
|
+
error: string;
|
|
345
|
+
};
|
|
346
|
+
outputFormat: "json";
|
|
347
|
+
status: 400;
|
|
346
348
|
} | {
|
|
347
349
|
input: {
|
|
348
350
|
json: {
|
|
@@ -355,11 +357,9 @@ declare const api: hono_hono_base0.HonoBase<{
|
|
|
355
357
|
id: string;
|
|
356
358
|
};
|
|
357
359
|
};
|
|
358
|
-
output:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
outputFormat: "json";
|
|
362
|
-
status: 400;
|
|
360
|
+
output: null;
|
|
361
|
+
outputFormat: "body";
|
|
362
|
+
status: 204;
|
|
363
363
|
};
|
|
364
364
|
};
|
|
365
365
|
} & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__commonJSMin as e,__reExport as t,__require as n,__toESM as r}from"./chunk-D9KrCrVq.js";import{Y as i}from"./dist-
|
|
1
|
+
import{__commonJSMin as e,__reExport as t,__require as n,__toESM as r}from"./chunk-D9KrCrVq.js";import{Y as i}from"./dist-BNbSDxaw.js";import{open_default as a}from"./open-DCYivxgo.js";import{createRequire as o}from"node:module";import{dirname as s,join as c}from"path";import{existsSync as l,mkdirSync as u,readFileSync as d,unlinkSync as f,writeFileSync as p}from"fs";import m,{z as h}from"zod";import"zod/v4";import"zod/v3";var g=Object.getOwnPropertyNames,_=(e,t)=>function(){return t||(0,e[g(e)[0]])((t={exports:{}}).exports,t),t.exports},v=o(import.meta.url);h.object({email:h.string().email(),password:h.string().min(8)}),h.object({email:h.string().email(),code:h.string()}),h.object({email:h.string().email(),password:h.string().min(8)});var y=class{constructor(e,t){this.client=e,this.baseURL=t}async token(e,t={timeout:12e4}){return new Promise((n,r)=>{let i=crypto.randomUUID(),a=this.client.websocket(`/api/auth/token?id=${i}`),o=new URL(`/auth?id=${i}`,this.baseURL),s=setTimeout(()=>{r(Error(`Timeout waiting for the user to authenticate`))},t.timeout);a.onerror=e=>{clearTimeout(s),console.log(`error`,e),r(Error(`Failed to connect to server`))},a.onopen=()=>{e(o.toString(),i)},a.onmessage=e=>{typeof e.data==`string`&&(clearTimeout(s),n(e.data))}})}},b=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function x(e){}function S(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=x,onError:n=x,onRetry:r=x,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=C(`${a}${t}`);for(let e of n)d(e);a=r,o=!1}function d(e){if(e===``){p();return}if(e.startsWith(`:`)){i&&i(e.slice(e.startsWith(`: `)?2:1));return}let t=e.indexOf(`:`);if(t!==-1){let n=e.slice(0,t),r=e[t+1]===` `?2:1,i=e.slice(t+r);f(n,i,e);return}f(e,``,e)}function f(e,t,i){switch(e){case`event`:l=t;break;case`data`:c=`${c}${t}
|
|
2
2
|
`;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new b(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new b(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
|
|
3
3
|
`)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function C(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
|
|
4
4
|
`,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{import_websocket as e}from"./wrapper-B0SBsJWP.js";import{open_default as t}from"./open-
|
|
1
|
+
import{import_websocket as e}from"./wrapper-B0SBsJWP.js";import{open_default as t}from"./open-DCYivxgo.js";import"./server-C8plsU0X-BmosAKXr.js";import{WorkspaceConnect as n}from"./connect-BpfPzXxZ.js";async function r(){let r=crypto.randomUUID(),i=new e.default(`wss://blink.so/legacy-auth?id=${r}`);await new Promise((e,t)=>{i.onopen=()=>{e()},i.onerror=e=>{t(e)}});let a=new Promise((e,t)=>{i.onmessage=t=>{e(t.data.toString())}}),o=`https://blink.so/legacy-auth?id=${r}&type=workspace`;console.log(`Opening the following URL in your browser: ${o}`),await t(o);let s=await a,c=new n({url:`wss://blink.so/api/connect`,token:s});c.onConnect(()=>{console.log(`Connected to Blink`)}),c.onDisconnect(()=>{console.log(`Disconnected from Blink`)})}export{r as default};
|