blink 1.1.12 → 1.1.13
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.cjs +8 -8
- package/dist/browser/agent/client/index.d.cts +2 -2
- package/dist/browser/agent/client/index.d.ts +2 -2
- package/dist/browser/agent/client/index.js +8 -8
- package/dist/browser/agent/index.browser.d.cts +1 -1
- package/dist/browser/agent/index.browser.d.ts +1 -1
- package/dist/browser/{index-DSU-sZKL.d.cts → index-Crila3ki.d.cts} +1 -1
- package/dist/browser/{index-C-Slllhb.d.ts → index-DUDNYE9g.d.ts} +1 -1
- package/dist/browser/{index.browser-DB9UGGdN.d.cts → index.browser-B7J1hNLv.d.cts} +1 -1
- package/dist/browser/{index.browser-yBhWIAxZ.d.ts → index.browser-DTgCIWGS.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 +2 -0
- package/dist/cli/{chat-Jjsxhu91.js → chat-CossSB76.js} +1 -1
- package/dist/cli/{chat-manager-DYZXp8bu.js → chat-manager-XyOX_Hmk.js} +8 -8
- package/dist/cli/connect-C4Z_U2Zf.js +1 -0
- package/dist/cli/{connect-BpfPzXxZ.js → connect-lKAgssA8.js} +1 -1
- package/dist/cli/{dev-HFrCUIkP.js → dev-CcN8grpt.js} +79 -79
- package/dist/cli/{auth-BXRoCHFw.js → dist-AXHevRdg.js} +78 -19
- package/dist/cli/execAsync-SGF4O5TO.js +1 -0
- package/dist/cli/execAsync-yuWNzIOa.js +1 -0
- package/dist/cli/execAsync-zgZE3anO.js +1 -0
- package/dist/cli/{getMachineId-bsd-C9_PO8vg.js → getMachineId-bsd-CNyWjFgv.js} +1 -1
- package/dist/cli/{getMachineId-bsd-aGbXimKO.js → getMachineId-bsd-CbJ9B5uX.js} +1 -1
- package/dist/cli/{getMachineId-bsd-f6XFfE6Q.js → getMachineId-bsd-DD6K1Ylh.js} +1 -1
- package/dist/cli/getMachineId-bsd-DSrNAXcz.js +1 -0
- package/dist/cli/getMachineId-bsd-D_6s5Cdq.js +1 -0
- package/dist/cli/getMachineId-bsd-bqULO5m0.js +1 -0
- package/dist/cli/{getMachineId-bsd-CtuYA53z.js → getMachineId-bsd-hom6rwXG.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CbnZZvCa.js → getMachineId-darwin-B2z5T7Xs.js} +1 -1
- package/dist/cli/{getMachineId-darwin-B_jo3wKe.js → getMachineId-darwin-CCg1DW1T.js} +1 -1
- package/dist/cli/{getMachineId-darwin-D2cTSAMO.js → getMachineId-darwin-CjZYhlFh.js} +1 -1
- package/dist/cli/{getMachineId-darwin-VXBPWUwo.js → getMachineId-darwin-CsiYkPo-.js} +1 -1
- package/dist/cli/getMachineId-darwin-Do9xDlln.js +2 -0
- package/dist/cli/getMachineId-darwin-carDgaew.js +2 -0
- package/dist/cli/getMachineId-darwin-zV0HrpSD.js +2 -0
- package/dist/cli/{getMachineId-linux-CGpaESCu.js → getMachineId-linux--nJ0-hXg.js} +1 -1
- package/dist/cli/{getMachineId-linux-B2Hg9S6u.js → getMachineId-linux-BUWGstOo.js} +1 -1
- package/dist/cli/{getMachineId-linux-D-j0hPgd.js → getMachineId-linux-CFErR3im.js} +1 -1
- package/dist/cli/{getMachineId-linux-sSblsl0f.js → getMachineId-linux-CZHIN7gw.js} +1 -1
- package/dist/cli/getMachineId-linux-DVSYpC_y.js +1 -0
- package/dist/cli/getMachineId-linux-DZtobVSz.js +1 -0
- package/dist/cli/getMachineId-linux-MYg9wcZ6.js +1 -0
- package/dist/cli/{getMachineId-unsupported-B067r1JC.js → getMachineId-unsupported-CT_22mpw.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BHPlHuxR.js → getMachineId-unsupported-CjlL_DiJ.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-B_bl21GL.js → getMachineId-unsupported-DiRlSG-9.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BcNSZ9TD.js → getMachineId-unsupported-Dx9tfp2U.js} +1 -1
- package/dist/cli/getMachineId-unsupported-bzLHzE4h.js +1 -0
- package/dist/cli/getMachineId-unsupported-rhjt9gIv.js +1 -0
- package/dist/cli/getMachineId-unsupported-sqVpruKF.js +1 -0
- package/dist/cli/{getMachineId-win-B1comJH7.js → getMachineId-win-CBB5d89h.js} +1 -1
- package/dist/cli/{getMachineId-win-DHmeC5Ow.js → getMachineId-win-CRfkH29Y.js} +1 -1
- package/dist/cli/{getMachineId-win-bIzpbT9p.js → getMachineId-win-Ca7mM30T.js} +1 -1
- package/dist/cli/{getMachineId-win-Dof2NkV_.js → getMachineId-win-CybVbRb1.js} +1 -1
- package/dist/cli/getMachineId-win-dkRkgiL3.js +1 -0
- package/dist/cli/getMachineId-win-pYcO6KSJ.js +1 -0
- package/dist/cli/getMachineId-win-vPBnzYB3.js +1 -0
- package/dist/cli/ignore-NA4V6Pjc.js +1 -0
- package/dist/cli/index.js +9 -9
- package/dist/cli/{init-Dll2PDYb.js → init-BViMdcx-.js} +29 -4
- package/dist/cli/init-DvGLr9mk.js +1 -0
- package/dist/cli/login-SCrT_xUN.js +1 -0
- package/dist/cli/{run-DtICLjeJ.js → run-BUL7PPMj.js} +1 -1
- package/dist/cli/setup-slack-app-iSP12TZ0.js +1 -0
- package/dist/cli/{token-CwpupgJv.js → token-B1evCYHV.js} +1 -1
- package/dist/cli/token-util-B3-W38hT.js +1 -0
- package/dist/cli/{token-util-BGsva5RI.js → token-util-DFNCn3fC.js} +1 -1
- package/dist/cli/undici-DxKEEM9B.js +1 -0
- package/dist/cli/{util-sYfoyux0.js → util-DBfnc6lD.js} +1 -1
- package/dist/node/agent/index.node.cjs +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/agent/index.node.js +1 -1
- package/dist/node/build/index.cjs +1 -1
- package/dist/node/build/index.d.ts +1 -1
- package/dist/node/build/index.js +1 -1
- package/dist/node/{build-lx6plR19.cjs → build-BzoNpizh.cjs} +4 -4
- package/dist/node/{build-M5Q2ZTGh.js → build-D_L0gFGa.js} +5 -5
- package/dist/node/execAsync-DDSV4gfK.cjs +1 -0
- package/dist/node/execAsync-DQysi_u6.js +1 -0
- package/dist/node/{getMachineId-bsd-CUUgtcEk.cjs → getMachineId-bsd-B84ixt26.cjs} +1 -1
- package/dist/node/{getMachineId-bsd-YA-Qh955.cjs → getMachineId-bsd-BudRe7J9.cjs} +1 -1
- package/dist/node/{getMachineId-bsd-CpiyZ31n.js → getMachineId-bsd-BxqlJcyA.js} +1 -1
- package/dist/node/{getMachineId-bsd-DKc3Wh2z.js → getMachineId-bsd-C10eVJgT.js} +1 -1
- package/dist/node/getMachineId-bsd-D2W6fhXU.js +1 -0
- package/dist/node/getMachineId-bsd-DM9BAly2.cjs +1 -0
- package/dist/node/{getMachineId-darwin-BBDIi9K5.js → getMachineId-darwin-Bf4P0U5b.js} +1 -1
- package/dist/node/{getMachineId-darwin-CcM48gLI.cjs → getMachineId-darwin-BsTWxMfp.cjs} +1 -1
- package/dist/node/{getMachineId-darwin-IcDjLpqm.cjs → getMachineId-darwin-Cyng5kFG.cjs} +1 -1
- package/dist/node/getMachineId-darwin-Dk0tjVME.js +2 -0
- package/dist/node/{getMachineId-darwin-CQ9-5u-a.js → getMachineId-darwin-JB29MQsG.js} +1 -1
- package/dist/node/getMachineId-darwin-ZVi3EKE3.cjs +2 -0
- package/dist/node/{getMachineId-linux-BzwdWZoB.cjs → getMachineId-linux-B-CtXK0L.cjs} +1 -1
- package/dist/node/getMachineId-linux-BPnkHJah.js +1 -0
- package/dist/node/{getMachineId-linux-DMvLmvRp.cjs → getMachineId-linux-CJXPQ8U5.cjs} +1 -1
- package/dist/node/getMachineId-linux-CmMSYp7C.js +1 -0
- package/dist/node/getMachineId-linux-DZ7RMAHq.js +1 -0
- package/dist/node/getMachineId-linux-DmWhhrp6.cjs +1 -0
- package/dist/node/{getMachineId-unsupported-ApoW5rxx.cjs → getMachineId-unsupported--0R36RP6.cjs} +1 -1
- package/dist/node/getMachineId-unsupported-C_4fnT4Z.js +1 -0
- package/dist/node/getMachineId-unsupported-CiZad6mc.js +1 -0
- package/dist/node/{getMachineId-unsupported-DYGwqELh.cjs → getMachineId-unsupported-DM7fz1pP.cjs} +1 -1
- package/dist/node/getMachineId-unsupported-Dtt3HTNZ.js +1 -0
- package/dist/node/getMachineId-unsupported-y6X1AHF8.cjs +1 -0
- package/dist/node/{getMachineId-win-Dfq5UG8G.js → getMachineId-win-C4G-fkEF.js} +1 -1
- package/dist/node/{getMachineId-win-B-bRjIv0.cjs → getMachineId-win-CjJkZMZe.cjs} +1 -1
- package/dist/node/{getMachineId-win-CSKzOPIT.js → getMachineId-win-D1szVnqR.js} +1 -1
- package/dist/node/{getMachineId-win-CoAu5xDr.cjs → getMachineId-win-DDz2FyEp.cjs} +1 -1
- package/dist/node/getMachineId-win-_P_0Nv15.js +1 -0
- package/dist/node/getMachineId-win-e1UzWB2B.cjs +1 -0
- package/dist/node/{index.node-qJt_7e9E.d.ts → index.node-BN_MeTbR.d.ts} +1 -1
- package/dist/node/index.node-CERnwYbK.js +55 -0
- package/dist/node/{index.node-B6plkLLA.d.cts → index.node-UFiKZRHB.d.cts} +1 -1
- package/dist/node/index.node-sb6fILn2.cjs +55 -0
- package/dist/node/react/index.node.cjs +150 -155
- package/dist/node/react/index.node.d.cts +1 -1
- package/dist/node/react/index.node.d.ts +2 -2
- package/dist/node/react/index.node.js +65 -70
- package/dist/node/{token-C10csUbV.cjs → token-Bcs36BIo.cjs} +1 -1
- package/dist/node/{token-B0ivJQut.js → token-DY8sflMu.js} +1 -1
- package/dist/node/{token-util-BwRq8n40.cjs → token-util-B9ankBb5.cjs} +1 -1
- package/dist/node/token-util-BIiR16HV.js +1 -0
- package/dist/node/token-util-BrE-Vihm.cjs +1 -0
- package/dist/node/{token-util-1r_uDcp7.js → token-util-Czyk5fmW.js} +1 -1
- package/package.json +1 -1
- package/dist/cli/connect-O43Nkqhm.js +0 -1
- package/dist/cli/devhook-C-VKp2Vf.js +0 -1
- package/dist/cli/dist-BNbSDxaw.js +0 -45
- package/dist/cli/init-Ii8ZeW1G.js +0 -1
- package/dist/cli/login-BaxIl8sF.js +0 -1
- package/dist/cli/token-util-DsmDyKzB.js +0 -1
- package/dist/cli/undici-Cyjf_ODA.js +0 -1
- package/dist/node/getMachineId-linux-Cc8c4coA.js +0 -1
- package/dist/node/getMachineId-linux-TNXyQsBB.js +0 -1
- package/dist/node/getMachineId-unsupported-CRrpolgF.js +0 -1
- package/dist/node/getMachineId-unsupported-DGhOj3l0.js +0 -1
- package/dist/node/index.node-Bpfi4MhM.cjs +0 -55
- package/dist/node/index.node-CKuelGPD.js +0 -55
- package/dist/node/token-util-CSWJ2yfA.js +0 -1
- package/dist/node/token-util-beB2LRJ9.cjs +0 -1
- /package/dist/cli/{devtools-aLFrISVw.js → devtools-C6zo-VIa.js} +0 -0
- /package/dist/cli/{esm-DE0IicLh.js → esm-CBbRLxmL.js} +0 -0
- /package/dist/cli/{execAsync-BTw463vh.js → execAsync-B4RcmQib.js} +0 -0
- /package/dist/cli/{execAsync-CdrcvA66.js → execAsync-BEK5YUm1.js} +0 -0
- /package/dist/cli/{execAsync-DQQzCKCI.js → execAsync-CpqeGF36.js} +0 -0
- /package/dist/cli/{execAsync-WFKcnjxL.js → execAsync-DXjxl3NT.js} +0 -0
- /package/dist/cli/{server-C8plsU0X-BmosAKXr.js → server-C8plsU0X-DRRpA-nw.js} +0 -0
- /package/dist/cli/{token-error-C6TSmqWz.js → token-error-BH5_eVU3.js} +0 -0
- /package/dist/cli/{undici-v5uUkaRO.js → undici-w5avb4CY.js} +0 -0
- /package/dist/node/{esm-C-vSI1Ww.cjs → esm-0UNjvroT.cjs} +0 -0
- /package/dist/node/{esm-D1GEQyaY.js → esm-CbZfjZBn.js} +0 -0
- /package/dist/node/{index-C28Wm0bG.d.ts → index-Q90WjL1a.d.ts} +0 -0
- /package/dist/node/{token-error-wsvzy87W.js → token-error-488npYdU.js} +0 -0
- /package/dist/node/{token-error-l6zIbPbZ.cjs → token-error-BoNG8ooW.cjs} +0 -0
|
@@ -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-B7J1hNLv.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-DTgCIWGS.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-DUs3b5a3.cjs";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "./index.browser-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "./index.browser-B7J1hNLv.cjs";
|
|
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-keN8L-ZK.js";
|
|
2
|
-
import { UIOptions, UIOptionsSchema } from "./index.browser-
|
|
2
|
+
import { UIOptions, UIOptionsSchema } from "./index.browser-DTgCIWGS.js";
|
|
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-B7J1hNLv.cjs";
|
|
3
|
+
import { CapabilitiesResponse, Client } from "../index-Crila3ki.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-DTgCIWGS.js";
|
|
3
|
+
import { CapabilitiesResponse, Client } from "../index-DUDNYE9g.js";
|
|
4
4
|
import { UIMessage } from "ai";
|
|
5
5
|
|
|
6
6
|
//#region src/react/use-options.d.ts
|
|
@@ -0,0 +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-AXHevRdg.js";import{open_default as s}from"./open-DCYivxgo.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
|
+
`)&&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-DCYivxgo.js";import"./server-C8plsU0X-
|
|
1
|
+
import{import_websocket as e}from"./wrapper-B0SBsJWP.js";import{open_default as t}from"./open-DCYivxgo.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};
|