blink 1.1.13 → 1.1.14
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/agent/client/index.d.cts +2 -2
- package/dist/browser/agent/client/index.d.ts +2 -2
- package/dist/browser/agent/index.browser.d.cts +1 -1
- package/dist/browser/agent/index.browser.d.ts +1 -1
- package/dist/browser/{index-DUDNYE9g.d.ts → index-C-Slllhb.d.ts} +1 -1
- package/dist/browser/{index-Crila3ki.d.cts → index-DSU-sZKL.d.cts} +1 -1
- package/dist/browser/{index.browser-B7J1hNLv.d.cts → index.browser-DB9UGGdN.d.cts} +1 -1
- package/dist/browser/{index.browser-DTgCIWGS.d.ts → index.browser-yBhWIAxZ.d.ts} +1 -1
- package/dist/browser/react/index.browser.d.cts +2 -2
- package/dist/browser/react/index.browser.d.ts +2 -2
- package/dist/cli/{auth-DCUw-BJE.js → auth-vk-Wh2Tb.js} +1 -1
- package/dist/cli/{chat-CossSB76.js → chat-1VNeGtdY.js} +1 -1
- package/dist/cli/{dev-CcN8grpt.js → dev-C7WLllYl.js} +67 -61
- package/dist/cli/index.js +3 -3
- package/dist/cli/{init-BViMdcx-.js → init-CcRVlAi3.js} +3 -3
- package/dist/cli/init-DtC2zW4S.js +1 -0
- package/dist/cli/login-65v3CFjc.js +1 -0
- package/dist/cli/{run-BUL7PPMj.js → run-D-Kl9E0k.js} +1 -1
- package/dist/cli/{setup-slack-app-iSP12TZ0.js → setup-slack-app-wU8aMoUF.js} +1 -1
- package/dist/cli/{util-DBfnc6lD.js → util-x4GqZFrj.js} +1 -1
- package/dist/node/agent/index.node.d.cts +1 -1
- package/dist/node/agent/index.node.d.ts +1 -1
- package/dist/node/{index.node-UFiKZRHB.d.cts → index.node-B6plkLLA.d.cts} +1 -1
- package/dist/node/{index.node-BN_MeTbR.d.ts → index.node-BgliWLNt.d.ts} +1 -1
- package/dist/node/react/index.node.d.cts +1 -1
- package/dist/node/react/index.node.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cli/init-DvGLr9mk.js +0 -1
- package/dist/cli/login-SCrT_xUN.js +0 -1
- /package/dist/cli/{dist-AXHevRdg.js → dist-DxkSGwUH.js} +0 -0
- /package/dist/cli/{open-DCYivxgo.js → open-S_jcQ0nw.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../types-DUs3b5a3.cjs";
|
|
2
|
-
import { StreamResponseFormatHeader } from "../../index.browser-
|
|
3
|
-
import { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, streamSSE } from "../../index-
|
|
2
|
+
import { StreamResponseFormatHeader } from "../../index.browser-DB9UGGdN.cjs";
|
|
3
|
+
import { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, streamSSE } from "../../index-DSU-sZKL.cjs";
|
|
4
4
|
export { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, StreamResponseFormatHeader, streamSSE };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../types-keN8L-ZK.js";
|
|
2
|
-
import { StreamResponseFormatHeader } from "../../index.browser-
|
|
3
|
-
import { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, streamSSE } from "../../index-
|
|
2
|
+
import { StreamResponseFormatHeader } from "../../index.browser-yBhWIAxZ.js";
|
|
3
|
+
import { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, streamSSE } from "../../index-C-Slllhb.js";
|
|
4
4
|
export { APIServerURLEnvironmentVariable, CapabilitiesResponse, Client, ClientOptions, StreamResponseFormatHeader, streamSSE };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AgentChat, AgentOtel, AgentStore, Chat, ChatEvent, ChatHandler, ChatResponse, ID, NewMessage, SendBehavior, SendOptions, UpsertedChat } from "../types-DUs3b5a3.cjs";
|
|
2
|
-
import { ContextFromTools, ExtractUIOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat } from "../index.browser-
|
|
2
|
+
import { ContextFromTools, ExtractUIOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat } from "../index.browser-DB9UGGdN.cjs";
|
|
3
3
|
export { AgentChat, AgentOtel, AgentStore, Chat, ChatEvent, ChatHandler, ChatResponse, ContextFromTools, ExtractUIOptions, ID, NewMessage, SendBehavior, SendOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, UpsertedChat, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AgentChat, AgentOtel, AgentStore, Chat, ChatEvent, ChatHandler, ChatResponse, ID, NewMessage, SendBehavior, SendOptions, UpsertedChat } from "../types-keN8L-ZK.js";
|
|
2
|
-
import { ContextFromTools, ExtractUIOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat } from "../index.browser-
|
|
2
|
+
import { ContextFromTools, ExtractUIOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat } from "../index.browser-yBhWIAxZ.js";
|
|
3
3
|
export { AgentChat, AgentOtel, AgentStore, Chat, ChatEvent, ChatHandler, ChatResponse, ContextFromTools, ExtractUIOptions, ID, NewMessage, SendBehavior, SendOptions, StreamResponseFormat, StreamResponseFormatHeader, ToolApprovalOutput, ToolSetWithApproval, ToolWithApproval, ToolWithContext, UIEvent, UIHandler, UIOptionSelect, UIOptionSelectValue, UIOptions, UIOptionsSchema, UpsertedChat, WithUIOptions, isToolApprovalOutput, lastUIOptions, toolWithApproval, tools, withResponseFormat };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ID } from "./types-keN8L-ZK.js";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "./index.browser-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "./index.browser-yBhWIAxZ.js";
|
|
3
3
|
import { UIMessage, UIMessageChunk } from "ai";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/constants.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ID } from "./types-DUs3b5a3.cjs";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "./index.browser-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "./index.browser-DB9UGGdN.cjs";
|
|
3
3
|
import { UIMessage, UIMessageChunk } from "ai";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/constants.d.ts
|
|
@@ -50,7 +50,7 @@ type UIOptions = Record<string, string>;
|
|
|
50
50
|
type WithUIOptions<OPTIONS extends UIOptions, MESSAGE extends UIMessage = UIMessage> = MESSAGE & {
|
|
51
51
|
readonly role: "user";
|
|
52
52
|
readonly metadata: MESSAGE["metadata"] & {
|
|
53
|
-
readonly options
|
|
53
|
+
readonly options?: OPTIONS;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
type ExtractUIOptions<M> = M extends WithUIOptions<infer O> ? O : UIOptions;
|
|
@@ -50,7 +50,7 @@ type UIOptions = Record<string, string>;
|
|
|
50
50
|
type WithUIOptions<OPTIONS extends UIOptions, MESSAGE extends UIMessage = UIMessage> = MESSAGE & {
|
|
51
51
|
readonly role: "user";
|
|
52
52
|
readonly metadata: MESSAGE["metadata"] & {
|
|
53
|
-
readonly options
|
|
53
|
+
readonly options?: OPTIONS;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
type ExtractUIOptions<M> = M extends WithUIOptions<infer O> ? O : UIOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../types-DUs3b5a3.cjs";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "../index.browser-
|
|
3
|
-
import { CapabilitiesResponse, Client } from "../index-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "../index.browser-DB9UGGdN.cjs";
|
|
3
|
+
import { CapabilitiesResponse, Client } from "../index-DSU-sZKL.cjs";
|
|
4
4
|
import { UIMessage } from "ai";
|
|
5
5
|
|
|
6
6
|
//#region src/react/use-options.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../types-keN8L-ZK.js";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "../index.browser-
|
|
3
|
-
import { CapabilitiesResponse, Client } from "../index-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "../index.browser-yBhWIAxZ.js";
|
|
3
|
+
import { CapabilitiesResponse, Client } from "../index-C-Slllhb.js";
|
|
4
4
|
import { UIMessage } from "ai";
|
|
5
5
|
|
|
6
6
|
//#region src/react/use-options.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__reExport as t,__require as n,__toESM as r}from"./chunk-D9KrCrVq.js";import{Client as i,Y as a,require_source as o}from"./dist-
|
|
1
|
+
import{__commonJSMin as e,__reExport as t,__require as n,__toESM as r}from"./chunk-D9KrCrVq.js";import{Client as i,Y as a,require_source as o}from"./dist-DxkSGwUH.js";import{open_default as s}from"./open-S_jcQ0nw.js";import{dirname as c,join as l}from"node:path";import{existsSync as u,mkdirSync as d,readFileSync as f,unlinkSync as p,writeFileSync as m}from"node:fs";var h=e((e=>{e.__esModule=!0;function t(e){return i(e)===`boolean`}function n(e){return i(e)===`object`}function r(e){return i(e)===`string`}function i(e){return typeof e}function a(e){var i=e.meta,a=e.path,o=e.xdg;return{XDGAppPaths:new(function(){function e(s){s===void 0&&(s={});function c(t){return t===void 0&&(t={}),new e(t)}var l=n(s)?s:{name:s},u=l.suffix??``,d=l.isolated??!0,f=[l.name,i.pkgMainFilename(),i.mainFilename()],p=a.parse((f.find(function(e){return r(e)})??`$eval`)+u).name;c.$name=function(){return p},c.$isolated=function(){return d};function m(e){return e??={isolated:d},t(e)?e:e.isolated??d}function h(e){return m(e)?p:``}return c.cache=function(e){return a.join(o.cache(),h(e))},c.config=function(e){return a.join(o.config(),h(e))},c.data=function(e){return a.join(o.data(),h(e))},c.runtime=function(e){return o.runtime()?a.join(o.runtime(),h(e)):void 0},c.state=function(e){return a.join(o.state(),h(e))},c.configDirs=function(e){return o.configDirs().map(function(t){return a.join(t,h(e))})},c.dataDirs=function(e){return o.dataDirs().map(function(t){return a.join(t,h(e))})},c}return e}())}}e.Adapt=a})),g=e((e=>{var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};e.__esModule=!0;function n(e){var n=e.env,r=e.osPaths,i=e.path,a=/^darwin$/i.test(e.process.platform),o=/^win/i.test(e.process.platform);function s(){return r.home()||r.temp()}function c(e,t){return e||i.join.apply(i,t)}var l=function(){return{cache:function(){return c(n.get(`XDG_CACHE_HOME`),[s(),`.cache`])},config:function(){return c(n.get(`XDG_CONFIG_HOME`),[s(),`.config`])},data:function(){return c(n.get(`XDG_DATA_HOME`),[s(),`.local`,`share`])},runtime:function(){return n.get(`XDG_RUNTIME_DIR`)||void 0},state:function(){return c(n.get(`XDG_STATE_HOME`),[s(),`.local`,`state`])}}},u=function(){return{cache:function(){return c(n.get(`XDG_CACHE_HOME`),[s(),`Library`,`Caches`])},config:function(){return c(n.get(`XDG_CONFIG_HOME`),[s(),`Library`,`Preferences`])},data:function(){return c(n.get(`XDG_DATA_HOME`),[s(),`Library`,`Application Support`])},runtime:function(){return n.get(`XDG_RUNTIME_DIR`)||void 0},state:function(){return c(n.get(`XDG_STATE_HOME`),[s(),`Library`,`State`])}}},d=function(){function e(){return c(n.get(`APPDATA`),[s(),`AppData`,`Roaming`])}function t(){return c(n.get(`LOCALAPPDATA`),[s(),`AppData`,`Local`])}return{cache:function(){return c(n.get(`XDG_CACHE_HOME`),[t(),`xdg.cache`])},config:function(){return c(n.get(`XDG_CONFIG_HOME`),[e(),`xdg.config`])},data:function(){return c(n.get(`XDG_DATA_HOME`),[e(),`xdg.data`])},runtime:function(){return n.get(`XDG_RUNTIME_DIR`)||void 0},state:function(){return c(n.get(`XDG_STATE_HOME`),[t(),`xdg.state`])}}};return{XDG:new(function(){function e(){function r(){return new e}var s=a?u():o?d():l();return r.cache=s.cache,r.config=s.config,r.data=s.data,r.runtime=s.runtime,r.state=s.state,r.configDirs=function(){var e=n.get(`XDG_CONFIG_DIRS`);return t([s.config()],e?e.split(i.delimiter):[])},r.dataDirs=function(){var e=n.get(`XDG_DATA_DIRS`);return t([s.data()],e?e.split(i.delimiter):[])},r}return e}())}}e.Adapt=n})),_=e((e=>{var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};e.__esModule=!0;function n(e){return!e}function r(e){var r=e.env,i=e.os,a=e.path,o=/^win/i.test(e.process.platform);function s(t){return t?e.path.normalize(e.path.join(t,`.`)):void 0}function c(){return o?function(){var e=[typeof i.homedir==`function`?i.homedir():void 0,r.get(`USERPROFILE`),r.get(`HOME`),r.get(`HOMEDRIVE`)||r.get(`HOMEPATH`)?a.join(r.get(`HOMEDRIVE`)||``,r.get(`HOMEPATH`)||``):void 0];return s(e.find(function(e){return!n(e)}))}():function(){return s((typeof i.homedir==`function`?i.homedir():void 0)||r.get(`HOME`))}()}function l(){function e(e,n){return e?a.join.apply(a,t([e],n)):void 0}function l(){var e=`/tmp`,t=[typeof i.tmpdir==`function`?i.tmpdir():void 0,r.get(`TMPDIR`),r.get(`TEMP`),r.get(`TMP`)];return s(t.find(function(e){return!n(e)}))||e}function u(){var t=`C:\\Temp`,a=[typeof i.tmpdir==`function`?i.tmpdir:function(){},function(){return r.get(`TEMP`)},function(){return r.get(`TMP`)},function(){return e(r.get(`LOCALAPPDATA`),[`Temp`])},function(){return e(c(),[`AppData`,`Local`,`Temp`])},function(){return e(r.get(`ALLUSERSPROFILE`),[`Temp`])},function(){return e(r.get(`SystemRoot`),[`Temp`])},function(){return e(r.get(`windir`),[`Temp`])},function(){return e(r.get(`SystemDrive`),[`\\`,`Temp`])}].find(function(e){return e&&!n(e())});return a&&s(a())||t}return o?u():l()}return{OSPaths:new(function(){function e(){function t(){return new e}return t.home=c,t.temp=l,t}return e}())}}e.Adapt=r})),v=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};e.__esModule=!0;var a=i(n(`os`)),o=i(n(`path`));e.adapter={atImportPermissions:{env:!0},env:{get:function(e){return process.env[e]}},os:a,path:o,process}})),y=e(((e,t)=>{var n=_(),r=v();t.exports=n.Adapt(r.adapter).OSPaths})),b=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};e.__esModule=!0;var o=i(n(`path`));e.adapter={atImportPermissions:{env:!0},env:{get:function(e){return process.env[e]}},osPaths:a(y()).default,path:o,process}})),x=e(((e,t)=>{var n=g(),r=b();t.exports=n.Adapt(r.adapter).XDG})),S=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};e.__esModule=!0;var o=i(n(`path`)),s=a(x());e.adapter={atImportPermissions:{env:!0,read:!0},meta:{mainFilename:function(){var e=(n!=null&&n.main?n.main:{filename:void 0}).filename;return(e===process.execArgv[0]?void 0:e)||(process._eval===void 0?process.argv[1]:void 0)},pkgMainFilename:function(){return process.pkg?process.execPath:void 0}},path:o,process,xdg:s.default}})),C=r(e(((e,t)=>{var n=h(),r=S();t.exports=n.Adapt(r.adapter).XDGAppPaths}))(),1).default,w=r(o(),1);function T(e){let t=e||O();if(u(t)){let e=f(t,`utf8`);return JSON.parse(e).token}}function E(e,t){let n=t||O();u(c(n))||d(c(n),{recursive:!0}),m(n,JSON.stringify({_:`This is your Blink credentials file. DO NOT SHARE THIS FILE WITH ANYONE!`,token:e}))}function D(e){let t=e||O();u(t)&&p(t)}function O(){let e=C(`blink`).dataDirs();if(e.length===0)throw Error(`No suitable data directory for Blink storage found!`);return l(e[0],`auth.json`)}async function k(){let e=new i,t=T();if(t){e.authToken=t;try{await e.users.me()}catch{t=await M()}}else t=await M();return t}function A(e){let t=!1,n=t=>{(t.toString()===`\r`||t.toString()===`
|
|
2
2
|
`)&&e(),t.toString()===``&&(r(),process.exit(1))},r=()=>{if(!t){t=!0;try{process.stdin.removeListener(`data`,n),process.stdin.setRawMode(!1),process.stdin.pause()}catch{}}};return process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on(`data`,n),{cleanup:r}}async function j(e){try{(await s(e)).once(`error`,t=>{console.log(w.default.yellow(`Could not open the browser. Please visit the URL manually: ${e}`))})}catch{console.log(w.default.yellow(`Could not open the browser. Please visit the URL manually: ${e}`))}}async function M(){let e=new i,t,n=!1,r,o=new Promise(e=>{r=e}),s=e.auth.token((e,n)=>{t=e,console.log(`Visit`,w.default.bold(e),`to authenticate with Blink.`),console.log(w.default.dim(`Press [ENTER] to open the browser`)),r()}),c=A(async()=>{n||(n=!0,await o,await j(t))});await o;let l=a();l.start(`Waiting for authentication...`);try{let t=await s;c.cleanup(),e.authToken=t;let n=await e.users.me();return l.stop(`Congratulations, you are now signed in as ${n.email}!`),E(t),t}catch(e){c.cleanup(),l.stop(`Authentication failed: ${e}`),process.exit(1)}}export{D as deleteAuthToken,T as getAuthToken,M as login,k as loginIfNeeded,E as setAuthToken};
|
|
@@ -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"./server-C8plsU0X-DRRpA-nw.js";import{WorkspaceConnect as n}from"./connect-lKAgssA8.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};
|