blink 1.1.35 → 1.1.37
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-B7pruQew.js +126 -0
- package/dist/cli/chat-Dza83RvU.js +1 -0
- package/dist/cli/{chat-manager-cUXPlLU4.js → chat-manager-CIKM5Z0y.js} +1 -1
- package/dist/cli/{compute-server-BFNeHOmk.js → compute-server-qi2ObZrP.js} +1 -1
- package/dist/cli/config-D_lhQ36A.js +1 -0
- package/dist/cli/connect-C6BJxbG5.js +1 -0
- package/dist/cli/connect-lEKh-OPL.js +1 -0
- package/dist/cli/{create-github-app-CaCP607a.js → create-github-app-BeSDE8GT.js} +1 -1
- package/dist/cli/{dev-DOvBAIjm.js → dev-oYr5PvLk.js} +71 -71
- package/dist/cli/{esm-BiWxO8S7.js → esm-C6nUlmX4.js} +1 -1
- package/dist/cli/{getMachineId-bsd-BfwVPdTh.js → getMachineId-bsd-B09GfpQE.js} +1 -1
- package/dist/cli/{getMachineId-bsd-BmhpEQU_.js → getMachineId-bsd-B5inCcKX.js} +1 -1
- package/dist/cli/{getMachineId-bsd-C1eeoY31.js → getMachineId-bsd-BVOanLuZ.js} +1 -1
- package/dist/cli/{getMachineId-bsd-CO9ne--Y.js → getMachineId-bsd-BXrGuboa.js} +1 -1
- package/dist/cli/getMachineId-bsd-CBL_TGNf.js +1 -0
- package/dist/cli/getMachineId-bsd-CbC9XZ_w.js +1 -0
- package/dist/cli/{getMachineId-bsd-D4uBPoNF.js → getMachineId-bsd-CrOdTUu4.js} +1 -1
- package/dist/cli/getMachineId-bsd-Cxy148LG.js +1 -0
- package/dist/cli/{getMachineId-darwin-C0EZ3sY3.js → getMachineId-darwin-BU-w-BnC.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CSfD7gS4.js → getMachineId-darwin-BWTc5KWy.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CgQ9n4TU.js → getMachineId-darwin-BbUfrHce.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CuAzoP7O.js → getMachineId-darwin-BlZzCAQ6.js} +1 -1
- package/dist/cli/getMachineId-darwin-BmmSRa_d.js +2 -0
- package/dist/cli/{getMachineId-darwin-Cpq0Lloc.js → getMachineId-darwin-UHAuN405.js} +1 -1
- package/dist/cli/getMachineId-darwin-hJWBup80.js +2 -0
- package/dist/cli/getMachineId-darwin-rxU3ohHe.js +2 -0
- package/dist/cli/{getMachineId-linux-B1XJTHUh.js → getMachineId-linux-B4EFTMpj.js} +1 -1
- package/dist/cli/{getMachineId-linux-CRUR6LbQ.js → getMachineId-linux-CKBueRrt.js} +1 -1
- package/dist/cli/{getMachineId-linux-CVQNNGui.js → getMachineId-linux-CNhTYXGA.js} +1 -1
- package/dist/cli/{getMachineId-linux-CtdZRCaX.js → getMachineId-linux-D3K2OTZn.js} +1 -1
- package/dist/cli/getMachineId-linux-DaUV--ii.js +1 -0
- package/dist/cli/getMachineId-linux-DrZ26-WQ.js +1 -0
- package/dist/cli/getMachineId-linux-DzK7jzi5.js +1 -0
- package/dist/cli/getMachineId-linux-fpVhDYCz.js +1 -0
- package/dist/cli/{getMachineId-unsupported-B-xvzil1.js → getMachineId-unsupported-16ooXsXU.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BA3eQjiV.js → getMachineId-unsupported-72ceFIVM.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BZCOxs7n.js → getMachineId-unsupported-BKotHSFu.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BjGFauqb.js → getMachineId-unsupported-BSdFT2aC.js} +1 -1
- package/dist/cli/getMachineId-unsupported-CDM0TBdr.js +1 -0
- package/dist/cli/getMachineId-unsupported-Cw89MFW-.js +1 -0
- package/dist/cli/getMachineId-unsupported-DBSoWxG_.js +1 -0
- package/dist/cli/getMachineId-unsupported-cHJvhp02.js +1 -0
- package/dist/cli/{getMachineId-win-AW-Mv9PG.js → getMachineId-win-BAPC_wWc.js} +1 -1
- package/dist/cli/{getMachineId-win-B_2C1cwE.js → getMachineId-win-Bn_WM7bG.js} +1 -1
- package/dist/cli/{getMachineId-win-CUeKGXdr.js → getMachineId-win-Cc69o1Nq.js} +1 -1
- package/dist/cli/{getMachineId-win-BbYxddZ9.js → getMachineId-win-DR3Dm4-5.js} +1 -1
- package/dist/cli/{getMachineId-win-BkozcdSh.js → getMachineId-win-DdInvJHL.js} +1 -1
- package/dist/cli/getMachineId-win-Dig4HMmA.js +1 -0
- package/dist/cli/getMachineId-win-DwHWO0Id.js +1 -0
- package/dist/cli/getMachineId-win-gVqg_Qhn.js +1 -0
- package/dist/cli/index.js +9 -9
- package/dist/cli/{init-LtTUYXzn.js → init-Cq-SlOHe.js} +1 -1
- package/dist/cli/{init-templates-jGRvqLQ6.js → init-templates-Br3bKUNT.js} +3 -3
- package/dist/cli/login-DW6LzfRW.js +1 -0
- package/dist/cli/logout-CSXmq3nW.js +1 -0
- package/dist/cli/pull-B0kjDWZn.js +18 -0
- package/dist/cli/run-CY74Ar9q.js +1 -0
- package/dist/cli/setup-github-app-BB-iG8Lx.js +9 -0
- package/dist/cli/{token-v4NJW7VU.js → token-MaTAy4hv.js} +1 -1
- package/dist/cli/{token-util-BgEcL2NM.js → token-util-Bn01WxFK.js} +1 -1
- package/dist/cli/token-util-DbgI6oFx.js +1 -0
- package/dist/cli/undici-mM2IfLwA.js +1 -0
- package/dist/cli/{util-k3x8m_i5.js → util-D7HypBza.js} +1 -1
- package/dist/node/agent/index.node.cjs +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/context-Ch5QyxHM.js +1 -0
- package/dist/node/context-Cp_cUqvc.cjs +1 -0
- package/dist/node/esm-CSXsVdYr.js +1 -0
- package/dist/node/esm-DAl5TNhv.cjs +1 -0
- package/dist/node/{getMachineId-bsd-O0bNSuuh.cjs → getMachineId-bsd-C0y5EQEK.cjs} +1 -1
- package/dist/node/getMachineId-bsd-j5NqIOc8.js +1 -0
- package/dist/node/getMachineId-darwin-EKLAsCHs.js +2 -0
- package/dist/node/{getMachineId-darwin-DivkCgLG.cjs → getMachineId-darwin-QptN2GTZ.cjs} +1 -1
- package/dist/node/{getMachineId-linux-C8A0ak4z.cjs → getMachineId-linux-B7sBt1Ji.cjs} +1 -1
- package/dist/node/getMachineId-linux-BkKZQ4pT.js +1 -0
- package/dist/node/getMachineId-unsupported-C_PGk8nf.js +1 -0
- package/dist/node/{getMachineId-unsupported-DSRCXJha.cjs → getMachineId-unsupported-DwYXVQg7.cjs} +1 -1
- package/dist/node/getMachineId-win-BJspkM2m.js +1 -0
- package/dist/node/{getMachineId-win-B_okYUv6.cjs → getMachineId-win-C2mMnKyH.cjs} +1 -1
- package/dist/node/index.node-CU27y0G9.js +50 -0
- package/dist/node/index.node-DfJSk6zl.cjs +50 -0
- package/dist/node/internal/index.cjs +1 -0
- package/dist/node/internal/index.d.cts +24 -0
- package/dist/node/internal/index.d.ts +24 -0
- package/dist/node/internal/index.js +1 -0
- package/dist/node/react/index.node.cjs +128 -130
- package/dist/node/react/index.node.d.cts +1 -1
- package/dist/node/react/index.node.d.ts +3 -3
- package/dist/node/react/index.node.js +56 -58
- package/dist/node/{token-BQ-EqDMB.cjs → token-BQFROC8n.cjs} +1 -1
- package/dist/node/{token-B2MtKe6w.js → token-Qko9jH1t.js} +1 -1
- package/dist/node/token-util-BRjrHLnr.cjs +1 -0
- package/dist/node/{token-util-CtaB7NzM.js → token-util-uzFo5Esl.js} +1 -1
- package/package.json +8 -2
- package/dist/cli/auth-DbpOUCTO.js +0 -2
- package/dist/cli/chat-BfOX7Zpn.js +0 -1
- package/dist/cli/connect-3pBvxI6u.js +0 -1
- package/dist/cli/connect-XRcF_tn8.js +0 -1
- package/dist/cli/dist-Ceoe3h7v.js +0 -85
- package/dist/cli/getMachineId-bsd-DVGtITCk.js +0 -1
- package/dist/cli/getMachineId-bsd-MA4oFaCa.js +0 -1
- package/dist/cli/getMachineId-bsd-dbToLPez.js +0 -1
- package/dist/cli/getMachineId-darwin-D6_tdcZj.js +0 -2
- package/dist/cli/getMachineId-darwin-DkExT2qu.js +0 -2
- package/dist/cli/getMachineId-darwin-xoAzTD7x.js +0 -2
- package/dist/cli/getMachineId-linux-DMILcDJR.js +0 -1
- package/dist/cli/getMachineId-linux-Deja7F2k.js +0 -1
- package/dist/cli/getMachineId-linux-DqOGXYgv.js +0 -1
- package/dist/cli/getMachineId-linux-FRx9q8NV.js +0 -1
- package/dist/cli/getMachineId-unsupported-CLWxRb7f.js +0 -1
- package/dist/cli/getMachineId-unsupported-CSVFDvWp.js +0 -1
- package/dist/cli/getMachineId-unsupported-Cp_95R-6.js +0 -1
- package/dist/cli/getMachineId-unsupported-Nd0_Z7NT.js +0 -1
- package/dist/cli/getMachineId-win-CPhFagnx.js +0 -1
- package/dist/cli/getMachineId-win-D3-sMfSu.js +0 -1
- package/dist/cli/getMachineId-win-DFVpvzl3.js +0 -1
- package/dist/cli/login-POW3H6LQ.js +0 -1
- package/dist/cli/run-BHKBjgkK.js +0 -1
- package/dist/cli/setup-github-app-DBiuq7cy.js +0 -9
- package/dist/cli/token-util-3NkPUSqu.js +0 -1
- package/dist/cli/undici-JD4hDNWZ.js +0 -1
- package/dist/cli/util-CUfifM0g.js +0 -5
- package/dist/node/esm-0UNjvroT.cjs +0 -1
- package/dist/node/esm-CbZfjZBn.js +0 -1
- package/dist/node/getMachineId-bsd-Ckr9jSoT.js +0 -1
- package/dist/node/getMachineId-darwin-36SFRv2R.js +0 -2
- package/dist/node/getMachineId-linux-ZoT5w75D.js +0 -1
- package/dist/node/getMachineId-unsupported-XVp8oFCM.js +0 -1
- package/dist/node/getMachineId-win-CGqZ4f4O.js +0 -1
- package/dist/node/index.node-CFR7FTuY.cjs +0 -50
- package/dist/node/index.node-CITcyk6b.js +0 -50
- package/dist/node/token-util-P8_cV3Yu.cjs +0 -1
- /package/dist/cli/{devtools-CwQnB6v7.js → devtools-CS3ukAFj.js} +0 -0
- /package/dist/cli/{execAsync-4IyNgpoN.js → execAsync-9jtK4I3l.js} +0 -0
- /package/dist/cli/{execAsync-B6xSGvuk.js → execAsync-B4_pEoEJ.js} +0 -0
- /package/dist/cli/{execAsync-B8_ZTafx.js → execAsync-BdK7RB6d.js} +0 -0
- /package/dist/cli/{execAsync-B8nelpRN.js → execAsync-Bjxs-bO2.js} +0 -0
- /package/dist/cli/{execAsync-Cj_jF8MF.js → execAsync-CM_C8SBr.js} +0 -0
- /package/dist/cli/{execAsync-Ckbi9Yqe.js → execAsync-CNFaXJjR.js} +0 -0
- /package/dist/cli/{execAsync-CvOpnFex.js → execAsync-Dl3hbWiU.js} +0 -0
- /package/dist/cli/{execAsync-DDBH3pWg.js → execAsync-qGIZ8XA8.js} +0 -0
- /package/dist/cli/{ignore-NA4V6Pjc.js → ignore-ltyKbzfl.js} +0 -0
- /package/dist/cli/{token-error-BHDo_48c.js → token-error-CGIVaIg6.js} +0 -0
- /package/dist/cli/{undici-B5tM_IT9.js → undici-BiTrd9-R.js} +0 -0
- /package/dist/cli/{usingCtx-B1FpoePI.js → usingCtx-CCxav2be.js} +0 -0
- /package/dist/cli/{utils-B3iC7vdW.js → utils-BWKsfIcI.js} +0 -0
- /package/dist/node/{build-EgdtUZTI.cjs → build-BoU84guF.cjs} +0 -0
- /package/dist/node/{build-DYI55eX2.js → build-DBcSkHHH.js} +0 -0
- /package/dist/node/{execAsync-BMxJf0Eg.cjs → execAsync-BN6E2M46.cjs} +0 -0
- /package/dist/node/{execAsync-CY8juV7n.js → execAsync-CoM0jMb2.js} +0 -0
- /package/dist/node/{index-B4OXlWm3.d.ts → index-BcKU69uH.d.ts} +0 -0
- /package/dist/node/{index.node-BbqFCkOX.d.ts → index.node-Cl9AwUCW.d.ts} +0 -0
- /package/dist/node/{token-util--zh4M6Ze.cjs → token-util-CzDIlVhL.cjs} +0 -0
- /package/dist/node/{token-util-RdQsj3MK.js → token-util-DwGWB0np.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-iXuH7AlR.cjs`),t=require(`./token-error-BoNG8ooW.cjs`),n=require(`./token-util
|
|
1
|
+
const e=require(`./chunk-iXuH7AlR.cjs`),t=require(`./token-error-BoNG8ooW.cjs`),n=require(`./token-util-CzDIlVhL.cjs`);var r=e.__commonJSMin(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t.require_token_error(),p=n.require_token_util();async function m(){let{projectId:e,teamId:t}=(0,p.findProjectInfo)(),n=(0,p.loadToken)(e);if(!n||(0,p.isExpired)((0,p.getTokenPayload)(n.token))){let r=(0,p.getVercelCliToken)();if(!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: login to vercel cli`);if(!e)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: project id not found`);if(n=await(0,p.getVercelOidcToken)(r,e,t),!n)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token}}));Object.defineProperty(exports,`default`,{enumerable:!0,get:function(){return r()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e}from"./chunk-D9KrCrVq.js";import{require_token_error as t}from"./token-error-488npYdU.js";import{require_token_util as n}from"./token-util-
|
|
1
|
+
import{__commonJSMin as e}from"./chunk-D9KrCrVq.js";import{require_token_error as t}from"./token-error-488npYdU.js";import{require_token_util as n}from"./token-util-DwGWB0np.js";var r=e(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t(),p=n();async function m(){let{projectId:e,teamId:t}=(0,p.findProjectInfo)(),n=(0,p.loadToken)(e);if(!n||(0,p.isExpired)((0,p.getTokenPayload)(n.token))){let r=(0,p.getVercelCliToken)();if(!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: login to vercel cli`);if(!e)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: project id not found`);if(n=await(0,p.getVercelOidcToken)(r,e,t),!n)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token}}));export default r();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./token-error-BoNG8ooW.cjs`);const e=require(`./token-util-CzDIlVhL.cjs`);Object.defineProperty(exports,`default`,{enumerable:!0,get:function(){return e.require_token_util()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./token-error-488npYdU.js";import{require_token_util as e}from"./token-util-
|
|
1
|
+
import"./token-error-488npYdU.js";import{require_token_util as e}from"./token-util-DwGWB0np.js";export default e();export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blink",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.37",
|
|
4
4
|
"description": "Blink is a tool for building and deploying AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
"import": "./dist/node/react/index.node.js",
|
|
63
63
|
"require": "./dist/node/react/index.node.cjs"
|
|
64
64
|
}
|
|
65
|
+
},
|
|
66
|
+
"./internal": {
|
|
67
|
+
"types": "./dist/node/internal/index.d.ts",
|
|
68
|
+
"import": "./dist/node/internal/index.js",
|
|
69
|
+
"require": "./dist/node/internal/index.cjs"
|
|
65
70
|
}
|
|
66
71
|
},
|
|
67
72
|
"files": [
|
|
@@ -88,7 +93,7 @@
|
|
|
88
93
|
"@ai-sdk/xai": "^2.0.16",
|
|
89
94
|
"@blink-sdk/compute": "^0.0.15",
|
|
90
95
|
"@blink-sdk/events": "workspace:*",
|
|
91
|
-
"@blink.so/api": "^1.
|
|
96
|
+
"@blink.so/api": "^1.1.0",
|
|
92
97
|
"@clack/prompts": "^0.11.0",
|
|
93
98
|
"@hono/node-server": "^1.19.3",
|
|
94
99
|
"@jaaydenh/gemini-cli": "0.11.0-nightly-20251022-2",
|
|
@@ -109,6 +114,7 @@
|
|
|
109
114
|
"@whatwg-node/server": "^0.10.12",
|
|
110
115
|
"@xterm/headless": "^5.5.0",
|
|
111
116
|
"ansi-escapes": "^7.1.1",
|
|
117
|
+
"async-mutex": "^0.5.0",
|
|
112
118
|
"chalk": "^5.6.2",
|
|
113
119
|
"commander": "^14.0.0",
|
|
114
120
|
"dotenv": "^17.2.3",
|
|
@@ -1,2 +0,0 @@
|
|
|
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}from"./dist-Ceoe3h7v.js";import{openUrl as o,source_default as s}from"./util-CUfifM0g.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;function w(e){let t=e||D();if(u(t)){let e=f(t,`utf8`);return JSON.parse(e).token}}function T(e,t){let n=t||D();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 E(e){let t=e||D();u(t)&&p(t)}function D(){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 O(){let e=new i,t=process.env.BLINK_TOKEN||w();if(t){e.authToken=t;try{await e.users.me()}catch{if(process.env.BLINK_TOKEN)throw Error(`BLINK_TOKEN environment variable is invalid`);t=await A()}}else t=await A();return t}function k(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 A(){let e=new i,t,n=!1,r,c=new Promise(e=>{r=e}),l=e.auth.token((e,n)=>{t=e,console.log(`Visit`,s.bold(e),`to authenticate with Blink.`),console.log(s.dim(`Press [ENTER] to open the browser`)),r()}),u=k(async()=>{n||(n=!0,await c,await o(t))});await c;let d=a();d.start(`Waiting for authentication...`);try{let t=await l;u.cleanup(),e.authToken=t;let n=await e.users.me();return d.stop(`Congratulations, you are now signed in as ${n.email}!`),console.log(``),T(t),t}catch(e){u.cleanup(),d.stop(`Authentication failed: ${e}`),process.exit(1)}}export{E as deleteAuthToken,w as getAuthToken,A as login,O as loginIfNeeded,T as setAuthToken};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{import_websocket as e}from"./wrapper-DRdRnzOz.js";import{openUrl as t}from"./util-CUfifM0g.js";import{WorkspaceConnect as n}from"./connect-3pBvxI6u.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.coder.com/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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__require as e}from"./chunk-D9KrCrVq.js";import{wrapper_default as t}from"./wrapper-DRdRnzOz.js";import n from"node:path";import r from"node:fs";import i from"node:os";import{Server as a}from"@blink-sdk/compute-protocol/server";var o=class{listeners=[];get event(){return e=>(this.listeners.push(e),{dispose:()=>{this.listeners=this.listeners.filter(t=>t!==e)}})}emit(e){for(let t=this.listeners.length-1;t>=0;t--)this.listeners[t]?.(e)}dispose(){this.listeners=[]}};const s=n.join(i.tmpdir(),`blink-connect-${process.pid}.log`),c=e=>{if(e instanceof Error)return e.stack??e.message;try{return JSON.stringify(e)}catch{return String(e)}},l=async e=>{let t=`${new Date().toISOString()} ${e}\n`;try{await r.promises.appendFile(s,t,`utf8`)}catch{}};async function u(){let e=process.env.BLINK_URL,t=process.env.BLINK_TOKEN;delete process.env.BLINK_TOKEN,process.env.GIT_TERMINAL_PROMPT=`0`,process.env.GIT_PAGER=`cat`,process.env.GIT_AUTHOR_NAME=`blink-so[bot]`,process.env.GIT_AUTHOR_EMAIL=`211532188+blink-so[bot]@users.noreply.github.com`,process.env.GIT_COMMITTER_NAME=`blink-so[bot]`,process.env.GIT_COMMITTER_EMAIL=`211532188+blink-so[bot]@users.noreply.github.com`,process.env.GIT_CONFIG_COUNT=`1`,process.env.GIT_CONFIG_KEY_0=`credential.https://github.com.helper`,process.env.GIT_CONFIG_VALUE_0=`!gh auth git-credential`,process.addListener(`uncaughtException`,e=>{l(`uncaughtException: ${c(e)}`),d(t,e)}),process.addListener(`unhandledRejection`,e=>{l(`unhandledRejection: ${c(e)}`),d(t,e)});let n=new f({url:e??`wss://blink.so/api/connect`,token:t,createDeploymentFromTar:async n=>{let r=new URL(`/api/static-deployment`,e??`https://blink.coder.com`);return(await(await fetch(r,{method:`POST`,body:n,headers:{"Content-Type":`application/tar`,Authorization:`Bearer ${t}`},duplex:`half`})).json()).deployment_id}});n.onConnect(()=>{console.log(`Connected`),l(`Connected`)}),n.onDisconnect(()=>{console.log(`Disconnected`),l(`Disconnected`)})}const d=async(e,t)=>{let n=new URL(`https://blink.coder.com/api/connect-error`);await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({error:t})})};var f=class{_onConnect=new o;onConnect=this._onConnect.event;_onDisconnect=new o;onDisconnect=this._onDisconnect.event;reconnectTimeout=null;disposed=!1;ws;server;hasReconnectedOnce=!1;constructor(n){this.opts=n;let r;try{r=e(`@lydell/node-pty`)}catch{}typeof Bun<`u`&&(r=void 0),this.server=new a({send:e=>{this.ws.readyState===t.OPEN?this.ws.send(e):console.warn(`Message skipped because connection is closed.`)},createDeploymentFromTar:this.opts.createDeploymentFromTar,nodePty:r}),this.connect()}dispose(){this.disposed||(this.disposed=!0,this.ws.close(),this.reconnectTimeout&&clearTimeout(this.reconnectTimeout))}scheduleReconnect(){if(this.disposed)return;let e=this.opts.immediateReconnectFirst??!0,t=this.opts.reconnectionDelay??2500;!this.hasReconnectedOnce&&e&&(t=0),this.hasReconnectedOnce=!0,this.reconnectTimeout&&clearTimeout(this.reconnectTimeout),this.reconnectTimeout=setTimeout(()=>{this.connect()},t)}connect(){let e=new URL(this.opts.url);e.protocol===`http:`?e.protocol=`ws:`:e.protocol===`https:`&&(e.protocol=`wss:`);let n={};this.opts.token&&(n.Authorization=`Bearer ${this.opts.token}`),this.ws=new t(e.toString(),{headers:n}),this.ws.addEventListener(`open`,()=>{this._onConnect.emit()}),this.ws.addEventListener(`close`,()=>{this._onDisconnect.emit(),!this.disposed&&this.scheduleReconnect()}),this.ws.addEventListener(`error`,e=>{console.error(`Error`,e.message??e)}),this.ws.addEventListener(`message`,e=>{if(typeof e.data==`string`){console.warn(`Message skipped because it is not a buffer.`);return}try{this.server.handleMessage(new Uint8Array(e.data))}catch(e){console.error(`message handler error`,e);try{this.ws.close(1011)}catch{}}})}};export{f as WorkspaceConnect,u as connect};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./wrapper-DRdRnzOz.js";import{WorkspaceConnect as e,connect as t}from"./connect-3pBvxI6u.js";export{e as WorkspaceConnect,t as default};
|