blink 0.1.107 → 0.1.108
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/cli/{auth-DjAEZyZZ.js → auth-B_s9F0vP.js} +1 -1
- package/dist/cli/{chat-DX_V608z.js → chat-CLFi7jlw.js} +1 -1
- package/dist/cli/{dev-CHnIFYZD.js → dev-Dyzr8QSB.js} +59 -59
- package/dist/cli/ignore-NA4V6Pjc.js +1 -0
- package/dist/cli/index.js +3 -3
- package/dist/cli/{init-iySs9KUe.js → init-m-BdPD26.js} +1 -1
- package/dist/cli/login-DC5VCVrz.js +1 -0
- package/dist/cli/run-D80Y5w3r.js +1 -0
- package/dist/cli/{main-BdSSlDIs.js → util-BLUkU26y.js} +32 -5
- 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-SyKw4kKs.js → index.node-CA-85Opm.js} +4 -4
- package/dist/node/{index.node-nrQ20r3u.cjs → index.node-UnooY2Tf.cjs} +4 -4
- package/dist/node/react/index.node.cjs +32 -32
- package/dist/node/react/index.node.js +23 -23
- 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/ignore-6Nkv6BEs.js +0 -28
- package/dist/cli/login-DTwQcbaT.js +0 -1
- package/dist/cli/run-9Tt6YpRG.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-BNbSDxaw.js → dist-wyfWuz5A.js} +0 -0
- /package/dist/cli/{open-DCYivxgo.js → open-S_jcQ0nw.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
|
@@ -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-wyfWuz5A.js";import{open_default as a}from"./open-S_jcQ0nw.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,writeFileSync as f}from"fs";import p,{z as m}from"zod";import"zod/v4";import"zod/v3";var h=Object.getOwnPropertyNames,g=(e,t)=>function(){return t||(0,e[h(e)[0]])((t={exports:{}}).exports,t),t.exports},_=o(import.meta.url);m.object({email:m.string().email(),password:m.string().min(8)}),m.object({email:m.string().email(),code:m.string()}),m.object({email:m.string().email(),password:m.string().min(8)});var v=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))}})}},y=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 b(e){}function x(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=b,onError:n=b,onRetry:r=b,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=S(`${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 y(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new y(`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 S(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-S_jcQ0nw.js";import"./node-pty-BfteYoG-.js";import"./server-C8plsU0X-We1KgV-r.js";import{WorkspaceConnect as n}from"./connect-Bw0fihsU.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};
|