@shumai-one/shumai 0.6.2 → 0.6.4

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.
Files changed (192) hide show
  1. package/bin/{chunk-mcj1xpcc.js → chunk-01vx2chc.js} +2 -2
  2. package/bin/chunk-0epkrexd.js +2 -0
  3. package/bin/chunk-0h5239kt.js +2 -0
  4. package/bin/{chunk-jt0ykktx.js → chunk-0jnstdgf.js} +1 -1
  5. package/bin/{chunk-x03jwaga.js → chunk-0njsjy6x.js} +4 -4
  6. package/bin/{chunk-7naa7tpn.js → chunk-13rq2gtr.js} +2 -2
  7. package/bin/chunk-1aqs9sdh.js +3 -0
  8. package/bin/{chunk-m0q2cgfg.js → chunk-22jbsrka.js} +1 -1
  9. package/bin/chunk-2qknebmd.js +1 -0
  10. package/bin/{chunk-a411xhmm.js → chunk-2qzmh3ae.js} +4 -4
  11. package/bin/{chunk-2nhgdqdg.js → chunk-2tt0b8ym.js} +2 -2
  12. package/bin/{chunk-p3f5aevs.js → chunk-2zm7czk6.js} +1 -1
  13. package/bin/{chunk-p4s95471.js → chunk-396tfwdx.js} +1 -1
  14. package/bin/chunk-3mx4trvh.js +10 -0
  15. package/bin/{chunk-b5rhvzv9.js → chunk-45pb3kzz.js} +2 -2
  16. package/bin/{chunk-q83h0hkx.js → chunk-47fmhzwv.js} +2 -2
  17. package/bin/chunk-4awk4xhq.js +2 -0
  18. package/bin/{chunk-2cdxm1cp.js → chunk-4b2x2qba.js} +23 -23
  19. package/bin/{chunk-knj2s8mg.js → chunk-4rjy7ybr.js} +8 -8
  20. package/bin/{chunk-q8w4mbw4.js → chunk-598x693h.js} +2 -2
  21. package/bin/chunk-5c7ztqs7.js +1 -0
  22. package/bin/{chunk-2jj4j8cn.js → chunk-65dh7x4c.js} +2 -2
  23. package/bin/{chunk-hnkcgvcj.js → chunk-66e2vrky.js} +1 -1
  24. package/bin/{chunk-g22wmpk1.js → chunk-6j3beg6n.js} +2 -2
  25. package/bin/{chunk-cgmebxx6.js → chunk-6ke13k69.js} +1 -1
  26. package/bin/{chunk-7sgrtxbt.js → chunk-6rqakmg0.js} +2 -2
  27. package/bin/{chunk-4mws03es.js → chunk-6ty4tfmf.js} +3 -3
  28. package/bin/chunk-7e9ws6dh.js +129 -0
  29. package/bin/chunk-7mdddkfc.js +1 -0
  30. package/bin/{chunk-q2bew2vc.js → chunk-7q4mgd5x.js} +2 -2
  31. package/bin/chunk-7yv7shad.js +1 -0
  32. package/bin/{chunk-qwpkcp8d.js → chunk-81b8rfv7.js} +2 -2
  33. package/bin/{chunk-atfz7g7e.js → chunk-8a7ymmd4.js} +2 -2
  34. package/bin/chunk-8ac9at5y.js +2 -0
  35. package/bin/{chunk-gxepkvt2.js → chunk-8zcfgz9c.js} +1 -1
  36. package/bin/{chunk-mcw198kg.js → chunk-955kf5kc.js} +8 -8
  37. package/bin/{chunk-jzgbxqdg.js → chunk-978rm9a9.js} +2 -2
  38. package/bin/{chunk-jt02kpfc.js → chunk-9qzbrp4d.js} +2 -2
  39. package/bin/{chunk-tekwpkjf.js → chunk-a283dh05.js} +2 -2
  40. package/bin/chunk-aa2a06cc.js +1 -0
  41. package/bin/{chunk-8cjet7pp.js → chunk-ajr1w3vq.js} +6 -6
  42. package/bin/chunk-akafypge.js +218 -0
  43. package/bin/chunk-amk373q2.js +2 -0
  44. package/bin/chunk-apq2gvvp.js +4 -0
  45. package/bin/chunk-av2w1sez.js +2 -0
  46. package/bin/{chunk-5wapd171.js → chunk-b6kmj34z.js} +12 -12
  47. package/bin/chunk-bkzaw9p8.js +1 -0
  48. package/bin/{chunk-zezje74z.js → chunk-bssb9tar.js} +3 -3
  49. package/bin/chunk-bwvj1aqc.js +1 -0
  50. package/bin/chunk-by9esjn7.js +3 -0
  51. package/bin/chunk-bywk8mbc.js +2 -0
  52. package/bin/{chunk-9xhjy897.js → chunk-c61g9hfa.js} +4 -4
  53. package/bin/{chunk-zrszykjf.js → chunk-cdcgjh8k.js} +1 -1
  54. package/bin/{chunk-yk12hydf.js → chunk-d277evce.js} +4 -4
  55. package/bin/{chunk-55h9ze53.js → chunk-d3brvxh7.js} +2 -2
  56. package/bin/{chunk-9t3p4xp6.js → chunk-dcb1nzf1.js} +1 -1
  57. package/bin/{chunk-mzsw9var.js → chunk-dfbzatq9.js} +2 -2
  58. package/bin/chunk-e0bckx12.js +2 -0
  59. package/bin/{chunk-3ckkwdjx.js → chunk-e2p4s2pj.js} +3 -3
  60. package/bin/chunk-e8zzg57c.js +2 -0
  61. package/bin/{chunk-vp3czaeh.js → chunk-edfaqwaq.js} +2 -2
  62. package/bin/chunk-ehgrp0f9.js +1 -0
  63. package/bin/chunk-evs2aaav.js +12 -0
  64. package/bin/{chunk-s9ksftq2.js → chunk-f5bhcjhw.js} +1 -1
  65. package/bin/{chunk-ns33grgx.js → chunk-fb9dedm2.js} +2 -2
  66. package/bin/{chunk-srxp5jav.js → chunk-ff0mh9p3.js} +32 -32
  67. package/bin/chunk-fpfby5tz.js +1 -0
  68. package/bin/{chunk-eyjfhdp9.js → chunk-gd3b5akr.js} +2 -2
  69. package/bin/{chunk-1wfg56z3.js → chunk-gm1fy3hm.js} +5 -5
  70. package/bin/{chunk-9n1w5dw1.js → chunk-gqkjx7rz.js} +3 -3
  71. package/bin/{chunk-1nvd90g2.js → chunk-h7f5370s.js} +1 -1
  72. package/bin/chunk-hcyhsn8e.js +2 -0
  73. package/bin/{chunk-vcrmjtcz.js → chunk-jxm0gzmf.js} +2 -2
  74. package/bin/{chunk-b7bnp021.js → chunk-k3ggy3xk.js} +2 -2
  75. package/bin/{chunk-257dcd2f.js → chunk-k9vjs21p.js} +2 -2
  76. package/bin/chunk-ka40gv72.js +1 -0
  77. package/bin/chunk-km70p970.js +2 -0
  78. package/bin/{chunk-e4yscwen.js → chunk-m6v8rb39.js} +8 -8
  79. package/bin/chunk-m8spagwp.js +4 -0
  80. package/bin/{chunk-y241cxff.js → chunk-mfh7mg5b.js} +1 -1
  81. package/bin/chunk-n0cn0218.js +2 -0
  82. package/bin/chunk-n54ftsdx.js +2 -0
  83. package/bin/{chunk-02fvcrej.js → chunk-n7cvj15k.js} +7 -7
  84. package/bin/chunk-na5fh7er.js +2 -0
  85. package/bin/chunk-neazdbxy.js +1 -0
  86. package/bin/chunk-nk24qw3m.js +1 -0
  87. package/bin/{chunk-73yncv54.js → chunk-nsbbseff.js} +2 -2
  88. package/bin/chunk-nseef85h.js +1 -0
  89. package/bin/chunk-p35ztj2z.js +3 -0
  90. package/bin/chunk-pcjc9ygv.js +2 -0
  91. package/bin/{chunk-167z646e.js → chunk-pemmtd8q.js} +1 -1
  92. package/bin/{chunk-82tps5n1.js → chunk-pzrqnnpg.js} +1 -1
  93. package/bin/{chunk-a74g6h8a.js → chunk-q43m934j.js} +2 -2
  94. package/bin/{chunk-r1xer8gn.js → chunk-q57m34h0.js} +3 -3
  95. package/bin/chunk-q5k72jz9.js +3 -0
  96. package/bin/chunk-q9fsxakd.js +2 -0
  97. package/bin/chunk-qadpe0ct.js +2 -0
  98. package/bin/chunk-qeypjv4f.css +1 -0
  99. package/bin/chunk-qw92z3wf.js +2 -0
  100. package/bin/chunk-r0byfq1t.js +1 -0
  101. package/bin/chunk-r0q88qw3.js +2 -0
  102. package/bin/chunk-rjhczkh3.js +2 -0
  103. package/bin/{chunk-mwktrwtx.js → chunk-s0wxbybf.js} +1 -1
  104. package/bin/{chunk-q5vkxee3.js → chunk-s4hkcw24.js} +2 -2
  105. package/bin/chunk-szta50g1.js +1 -0
  106. package/bin/chunk-t6cb99gp.js +2 -0
  107. package/bin/chunk-tcr080b9.js +1 -0
  108. package/bin/{chunk-yq32evnn.js → chunk-v4nqx084.js} +5 -5
  109. package/bin/{chunk-ympbfzz4.js → chunk-v7jzc3ye.js} +1 -1
  110. package/bin/{chunk-9zsv6d2f.js → chunk-vbe8wred.js} +1 -1
  111. package/bin/{chunk-hpbn0k9n.js → chunk-vf9s8b5t.js} +2 -2
  112. package/bin/{chunk-m9adtgzk.js → chunk-vk3eqr65.js} +1 -1
  113. package/bin/{chunk-hpwv4am3.js → chunk-vm9bbk97.js} +4 -4
  114. package/bin/{chunk-v05rrxp5.js → chunk-w4gqg27w.js} +2 -2
  115. package/bin/{chunk-x8mjh387.js → chunk-w6ym7tsd.js} +4 -4
  116. package/bin/{chunk-hzkjgcre.js → chunk-ways29d1.js} +1 -1
  117. package/bin/chunk-wesg7tg9.js +1 -0
  118. package/bin/chunk-wmrrapwv.js +2 -0
  119. package/bin/chunk-wnwsjgj8.js +2 -0
  120. package/bin/{chunk-hw6czrya.js → chunk-wrb4xq9v.js} +1 -1
  121. package/bin/{chunk-v5cn90cf.js → chunk-wzrzc07t.js} +2 -2
  122. package/bin/chunk-xd1axsdv.js +2 -0
  123. package/bin/{chunk-cwat1jwx.js → chunk-xk0jmx4s.js} +2 -2
  124. package/bin/{chunk-g6sdezec.js → chunk-y545vfn0.js} +1 -1
  125. package/bin/{chunk-fatmqnp1.js → chunk-y6h885fs.js} +1 -1
  126. package/bin/{chunk-cz13a82m.js → chunk-yncmfr39.js} +2 -2
  127. package/bin/{chunk-01052ssf.js → chunk-yxnz4ypt.js} +11 -11
  128. package/bin/chunk-zc1asygg.js +2 -0
  129. package/bin/{chunk-m82tkhaa.js → chunk-zc7wzcvh.js} +7 -7
  130. package/bin/chunk-zdvhh8mk.js +2 -0
  131. package/bin/{chunk-kvhf12b4.js → chunk-zg0b902x.js} +2 -2
  132. package/bin/{chunk-7v7mypc6.js → chunk-zhq7a7hs.js} +2 -2
  133. package/bin/{chunk-f25fe9th.js → chunk-zmnvskn7.js} +11 -11
  134. package/bin/shumai-app.html +1 -1
  135. package/bin/shumai-app.js +470 -389
  136. package/package.json +7 -7
  137. package/prisma/migrations/20261102032402_add_archive_storage/migration.sql +25 -0
  138. package/prisma/schema.prisma +12 -6
  139. package/bin/chunk-0bj887zm.js +0 -2
  140. package/bin/chunk-1ktk6764.js +0 -10
  141. package/bin/chunk-26qn7fek.js +0 -2
  142. package/bin/chunk-2ne2b54t.js +0 -2
  143. package/bin/chunk-2vbeqczj.js +0 -1
  144. package/bin/chunk-37p6bcx2.js +0 -1
  145. package/bin/chunk-3knfx6dm.js +0 -1
  146. package/bin/chunk-3z85zxkn.js +0 -1
  147. package/bin/chunk-54tbfvya.js +0 -2
  148. package/bin/chunk-56kh5fxc.js +0 -1
  149. package/bin/chunk-576nj64j.js +0 -2
  150. package/bin/chunk-6cnqjngz.js +0 -1
  151. package/bin/chunk-7g46e1wy.js +0 -3
  152. package/bin/chunk-84x8p7v5.js +0 -1
  153. package/bin/chunk-88jg9dq5.js +0 -2
  154. package/bin/chunk-8fyg9dy4.js +0 -2
  155. package/bin/chunk-8gtfgkrn.js +0 -2
  156. package/bin/chunk-8mqbztj8.js +0 -2
  157. package/bin/chunk-8qdtvfx3.css +0 -1
  158. package/bin/chunk-8xb6yz11.js +0 -2
  159. package/bin/chunk-8yjsmr7g.js +0 -2
  160. package/bin/chunk-91rb0jpb.js +0 -2
  161. package/bin/chunk-96qpjght.js +0 -2
  162. package/bin/chunk-9f1xk1nt.js +0 -1
  163. package/bin/chunk-9mk9cvbk.js +0 -1
  164. package/bin/chunk-9nw5w8vh.js +0 -1
  165. package/bin/chunk-ah8fjb6f.js +0 -2
  166. package/bin/chunk-cf5axr8c.js +0 -1
  167. package/bin/chunk-dk42gf7v.js +0 -2
  168. package/bin/chunk-e4f56spj.js +0 -4
  169. package/bin/chunk-eb7mzbfm.js +0 -1
  170. package/bin/chunk-er14d498.js +0 -3
  171. package/bin/chunk-f6avg5qe.js +0 -129
  172. package/bin/chunk-fvx9k1dc.js +0 -2
  173. package/bin/chunk-gtf19jc1.js +0 -2
  174. package/bin/chunk-h1n7jqnw.js +0 -1
  175. package/bin/chunk-hfm82066.js +0 -2
  176. package/bin/chunk-j2s311yc.js +0 -3
  177. package/bin/chunk-kj6h5j5a.js +0 -4
  178. package/bin/chunk-km4gn6b6.js +0 -1
  179. package/bin/chunk-ny1kbmxt.js +0 -2
  180. package/bin/chunk-p3j6ydk1.js +0 -1
  181. package/bin/chunk-pk406dgy.js +0 -2
  182. package/bin/chunk-s1e4qy3q.js +0 -14
  183. package/bin/chunk-swtwaaqe.js +0 -1
  184. package/bin/chunk-tagdrg7p.js +0 -1
  185. package/bin/chunk-twtxnzbv.js +0 -2
  186. package/bin/chunk-v5mcjwxy.js +0 -2
  187. package/bin/chunk-vkzasgxw.js +0 -2
  188. package/bin/chunk-x342vzdx.js +0 -2
  189. package/bin/chunk-xc54vhfz.js +0 -2
  190. package/bin/chunk-xvkwbczx.js +0 -3
  191. package/bin/chunk-z1p13dnc.js +0 -2
  192. package/bin/chunk-zarz3sqn.js +0 -211
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{L,ae}from"./chunk-2jj4j8cn.js";var ic=L(function(ar,m){var{defineProperty:k,getOwnPropertyDescriptor:ee,getOwnPropertyNames:re}=Object,te=Object.prototype.hasOwnProperty,oe=(e,r)=>{for(var t in r)k(e,t,{get:r[t],enumerable:!0})},ne=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of re(r))if(!te.call(e,o)&&o!==t)k(e,o,{get:()=>r[o],enumerable:!(n=ee(r,o))||n.enumerable})}return e},se=(e)=>ne(k({},"__esModule",{value:!0}),e),T={};oe(T,{VercelOidcTokenError:()=>E});m.exports=se(T);class E extends Error{constructor(e,r){super(e);this.name="VercelOidcTokenError",this.cause=r}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var cm=L(function(cr,S){var{defineProperty:y,getOwnPropertyDescriptor:ie,getOwnPropertyNames:ce}=Object,ue=Object.prototype.hasOwnProperty,pe=(e,r)=>{for(var t in r)y(e,t,{get:r[t],enumerable:!0})},le=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of ce(r))if(!ue.call(e,o)&&o!==t)y(e,o,{get:()=>r[o],enumerable:!(n=ie(r,o))||n.enumerable})}return e},fe=(e)=>le(y({},"__esModule",{value:!0}),e),D={};pe(D,{AccessTokenMissingError:()=>x,RefreshAccessTokenFailedError:()=>A});S.exports=fe(D);class x extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class A extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e});this.name="RefreshAccessTokenFailedError"}}});var M=L(function(ur,R){var{create:_e,defineProperty:_,getOwnPropertyDescriptor:de,getOwnPropertyNames:he,getPrototypeOf:ve}=Object,ke=Object.prototype.hasOwnProperty,ye=(e,r)=>{for(var t in r)_(e,t,{get:r[t],enumerable:!0})},V=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of he(r))if(!ke.call(e,o)&&o!==t)_(e,o,{get:()=>r[o],enumerable:!(n=de(r,o))||n.enumerable})}return e},g=(e,r,t)=>(t=e!=null?_e(ve(e)):{},V(r||!e||!e.__esModule?_(t,"default",{value:e,enumerable:!0}):t,e)),we=(e)=>V(_({},"__esModule",{value:!0}),e),C={};ye(C,{findRootDir:()=>Pe,getUserDataDir:()=>be});R.exports=we(C);var p=g(ae("path")),ge=g(ae("fs")),w=g(ae("os")),Oe=ic();function Pe(){try{let e=process.cwd();while(e!==p.default.dirname(e)){let r=p.default.join(e,".vercel");if(ge.default.existsSync(r))return e;e=p.default.dirname(e)}}catch(e){throw new Oe.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function be(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(w.default.platform()){case"darwin":return p.default.join(w.default.homedir(),"Library/Application Support");case"linux":return p.default.join(w.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var B=L(function(pr,J){var{create:je,defineProperty:d,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Ee,getPrototypeOf:me}=Object,De=Object.prototype.hasOwnProperty,xe=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},I=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ee(r))if(!De.call(e,o)&&o!==t)d(e,o,{get:()=>r[o],enumerable:!(n=Te(r,o))||n.enumerable})}return e},N=(e,r,t)=>(t=e!=null?je(me(e)):{},I(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),Ae=(e)=>I(d({},"__esModule",{value:!0}),e),q={};xe(q,{isValidAccessToken:()=>Re,readAuthConfig:()=>Ve,writeAuthConfig:()=>Ce});J.exports=Ae(q);var l=N(ae("fs")),F=N(ae("path")),Se=ac();function U(){let e=(0,Se.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return F.join(e,"auth.json")}function Ve(){try{let e=U();if(!l.existsSync(e))return null;let r=l.readFileSync(e,"utf8");if(!r)return null;return JSON.parse(r)}catch(e){return null}}function Ce(e){let r=U(),t=F.dirname(r);if(!l.existsSync(t))l.mkdirSync(t,{mode:504,recursive:!0});l.writeFileSync(r,JSON.stringify(e,null,2),{mode:384})}function Re(e,r=0){if(!e.token)return!1;if(typeof e.expiresAt!=="number")return!0;let t=Math.floor(Date.now()/1000),n=r/1000;return e.expiresAt>=t+n}});var X=L(function(lr,G){var{defineProperty:b,getOwnPropertyDescriptor:Me,getOwnPropertyNames:Ie}=Object,Ne=Object.prototype.hasOwnProperty,qe=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},Fe=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ie(r))if(!Ne.call(e,o)&&o!==t)b(e,o,{get:()=>r[o],enumerable:!(n=Me(r,o))||n.enumerable})}return e},$e=(e)=>Fe(b({},"__esModule",{value:!0}),e),H={};qe(H,{processTokenResponse:()=>He,refreshTokenRequest:()=>Be});G.exports=$e(H);var O=ae("os"),Ue="https://vercel.com",Je="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",z=`@vercel/oidc node-${process.version} ${(0,O.platform)()} (${(0,O.arch)()}) ${(0,O.hostname)()}`,P=null;async function Le(){if(P)return P;let e=`${Ue}/.well-known/openid-configuration`,r=await fetch(e,{headers:{"user-agent":z}});if(!r.ok)throw Error("Failed to discover OAuth endpoints");let t=await r.json();if(!t||typeof t.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let n=t.token_endpoint;return P=n,n}async function Be(e){let r=await Le();return await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":z},body:new URLSearchParams({client_id:Je,grant_type:"refresh_token",...e})})}async function He(e){let r=await e.json();if(!e.ok){let t=typeof r==="object"&&r&&"error"in r?String(r.error):"Token refresh failed";return[Error(t)]}if(typeof r!=="object"||r===null)return[Error("Invalid token response")];if(typeof r.access_token!=="string")return[Error("Missing access_token in response")];if(r.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof r.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,r]}});var ac=L(function(fr,W){var{create:ze,defineProperty:h,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:Xe,getPrototypeOf:Ye}=Object,Qe=Object.prototype.hasOwnProperty,Ze=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},Q=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Xe(r))if(!Qe.call(e,o)&&o!==t)h(e,o,{get:()=>r[o],enumerable:!(n=Ge(r,o))||n.enumerable})}return e},Z=(e,r,t)=>(t=e!=null?ze(Ye(e)):{},Q(r||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),Ke=(e)=>Q(h({},"__esModule",{value:!0}),e),K={};Ze(K,{assertVercelOidcTokenResponse:()=>j,findProjectInfo:()=>tr,getTokenPayload:()=>sr,getVercelDataDir:()=>We,getVercelOidcToken:()=>rr,getVercelToken:()=>er,isExpired:()=>ir,loadToken:()=>nr,saveToken:()=>or});W.exports=Ke(K);var f=Z(ae("path")),s=Z(ae("fs")),u=ic(),v=M(),a=B(),Y=X(),c=cm();function We(){let r=(0,v.getUserDataDir)();if(!r)return null;return f.join(r,"com.vercel.cli")}async function er(e){let r=(0,a.readAuthConfig)();if(!r?.token)throw new c.AccessTokenMissingError;if((0,a.isValidAccessToken)(r,e?.expirationBufferMs))return r.token;if(!r.refreshToken)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError("No refresh token available");try{let t=await(0,Y.refreshTokenRequest)({refresh_token:r.refreshToken}),[n,o]=await(0,Y.processTokenResponse)(t);if(n||!o)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError(n);let i={token:o.access_token,expiresAt:Math.floor(Date.now()/1000)+o.expires_in};if(o.refresh_token)i.refreshToken=o.refresh_token;return(0,a.writeAuthConfig)(i),i.token}catch(t){if((0,a.writeAuthConfig)({}),t instanceof c.AccessTokenMissingError||t instanceof c.RefreshAccessTokenFailedError)throw t;throw new c.RefreshAccessTokenFailedError(t)}}async function rr(e,r,t){let n=`https://api.vercel.com/v1/projects/${r}/token?source=vercel-oidc-refresh${t?`&teamId=${t}`:""}`,o=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new u.VercelOidcTokenError(`Failed to refresh OIDC token: ${o.statusText}`);let i=await o.json();return j(i),i}function j(e){if(!e||typeof e!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||typeof e.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function tr(){let e=(0,v.findRootDir)();if(!e)throw new u.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let r=f.join(e,".vercel","project.json");if(!s.existsSync(r))throw new u.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let t=JSON.parse(s.readFileSync(r,"utf8"));if(typeof t.projectId!=="string"&&typeof t.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:t.projectId,teamId:t.orgId}}function or(e,r){let t=(0,v.getUserDataDir)();if(!t)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=f.join(t,"com.vercel.token",`${r}.json`),o=JSON.stringify(e);s.mkdirSync(f.dirname(n),{mode:504,recursive:!0}),s.writeFileSync(n,o),s.chmodSync(n,432);return}function nr(e){let r=(0,v.getUserDataDir)();if(!r)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let t=f.join(r,"com.vercel.token",`${e}.json`);if(!s.existsSync(t))return null;let n=JSON.parse(s.readFileSync(t,"utf8"));return j(n),n}function sr(e){let r=e.split(".");if(r.length!==3)throw new u.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let t=r[1].replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function ir(e,r=0){return e.exp*1000<Date.now()+r}});
3
- export{ic,cm,ac};
2
+ import{Z,le}from"./chunk-65dh7x4c.js";var bc=Z(function(ar,m){var{defineProperty:k,getOwnPropertyDescriptor:ee,getOwnPropertyNames:re}=Object,te=Object.prototype.hasOwnProperty,oe=(e,r)=>{for(var t in r)k(e,t,{get:r[t],enumerable:!0})},ne=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of re(r))if(!te.call(e,o)&&o!==t)k(e,o,{get:()=>r[o],enumerable:!(n=ee(r,o))||n.enumerable})}return e},se=(e)=>ne(k({},"__esModule",{value:!0}),e),T={};oe(T,{VercelOidcTokenError:()=>E});m.exports=se(T);class E extends Error{constructor(e,r){super(e);this.name="VercelOidcTokenError",this.cause=r}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var Nm=Z(function(cr,S){var{defineProperty:y,getOwnPropertyDescriptor:ie,getOwnPropertyNames:ae}=Object,ce=Object.prototype.hasOwnProperty,ue=(e,r)=>{for(var t in r)y(e,t,{get:r[t],enumerable:!0})},pe=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of ae(r))if(!ce.call(e,o)&&o!==t)y(e,o,{get:()=>r[o],enumerable:!(n=ie(r,o))||n.enumerable})}return e},fe=(e)=>pe(y({},"__esModule",{value:!0}),e),D={};ue(D,{AccessTokenMissingError:()=>x,RefreshAccessTokenFailedError:()=>A});S.exports=fe(D);class x extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class A extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e});this.name="RefreshAccessTokenFailedError"}}});var M=Z(function(ur,R){var{create:_e,defineProperty:_,getOwnPropertyDescriptor:de,getOwnPropertyNames:he,getPrototypeOf:ve}=Object,ke=Object.prototype.hasOwnProperty,ye=(e,r)=>{for(var t in r)_(e,t,{get:r[t],enumerable:!0})},V=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of he(r))if(!ke.call(e,o)&&o!==t)_(e,o,{get:()=>r[o],enumerable:!(n=de(r,o))||n.enumerable})}return e},g=(e,r,t)=>(t=e!=null?_e(ve(e)):{},V(r||!e||!e.__esModule?_(t,"default",{value:e,enumerable:!0}):t,e)),we=(e)=>V(_({},"__esModule",{value:!0}),e),C={};ye(C,{findRootDir:()=>Pe,getUserDataDir:()=>be});R.exports=we(C);var p=g(le("path")),ge=g(le("fs")),w=g(le("os")),Oe=bc();function Pe(){try{let e=process.cwd();while(e!==p.default.dirname(e)){let r=p.default.join(e,".vercel");if(ge.default.existsSync(r))return e;e=p.default.dirname(e)}}catch(e){throw new Oe.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function be(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(w.default.platform()){case"darwin":return p.default.join(w.default.homedir(),"Library/Application Support");case"linux":return p.default.join(w.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var L=Z(function(pr,J){var{create:je,defineProperty:d,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Ee,getPrototypeOf:me}=Object,De=Object.prototype.hasOwnProperty,xe=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},I=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ee(r))if(!De.call(e,o)&&o!==t)d(e,o,{get:()=>r[o],enumerable:!(n=Te(r,o))||n.enumerable})}return e},N=(e,r,t)=>(t=e!=null?je(me(e)):{},I(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),Ae=(e)=>I(d({},"__esModule",{value:!0}),e),q={};xe(q,{isValidAccessToken:()=>Re,readAuthConfig:()=>Ve,writeAuthConfig:()=>Ce});J.exports=Ae(q);var l=N(le("fs")),F=N(le("path")),Se=wc();function U(){let e=(0,Se.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return F.join(e,"auth.json")}function Ve(){try{let e=U();if(!l.existsSync(e))return null;let r=l.readFileSync(e,"utf8");if(!r)return null;return JSON.parse(r)}catch(e){return null}}function Ce(e){let r=U(),t=F.dirname(r);if(!l.existsSync(t))l.mkdirSync(t,{mode:504,recursive:!0});l.writeFileSync(r,JSON.stringify(e,null,2),{mode:384})}function Re(e,r=0){if(!e.token)return!1;if(typeof e.expiresAt!=="number")return!0;let t=Math.floor(Date.now()/1000),n=r/1000;return e.expiresAt>=t+n}});var G=Z(function(lr,z){var{defineProperty:b,getOwnPropertyDescriptor:Me,getOwnPropertyNames:Ie}=Object,Ne=Object.prototype.hasOwnProperty,qe=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},Fe=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ie(r))if(!Ne.call(e,o)&&o!==t)b(e,o,{get:()=>r[o],enumerable:!(n=Me(r,o))||n.enumerable})}return e},$e=(e)=>Fe(b({},"__esModule",{value:!0}),e),B={};qe(B,{processTokenResponse:()=>He,refreshTokenRequest:()=>Be});z.exports=$e(B);var O=le("os"),Ue="https://vercel.com",Je="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",H=`@vercel/oidc node-${process.version} ${(0,O.platform)()} (${(0,O.arch)()}) ${(0,O.hostname)()}`,P=null;async function Le(){if(P)return P;let e=`${Ue}/.well-known/openid-configuration`,r=await fetch(e,{headers:{"user-agent":H}});if(!r.ok)throw Error("Failed to discover OAuth endpoints");let t=await r.json();if(!t||typeof t.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let n=t.token_endpoint;return P=n,n}async function Be(e){let r=await Le();return await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":H},body:new URLSearchParams({client_id:Je,grant_type:"refresh_token",...e})})}async function He(e){let r=await e.json();if(!e.ok){let t=typeof r==="object"&&r&&"error"in r?String(r.error):"Token refresh failed";return[Error(t)]}if(typeof r!=="object"||r===null)return[Error("Invalid token response")];if(typeof r.access_token!=="string")return[Error("Missing access_token in response")];if(r.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof r.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,r]}});var wc=Z(function(fr,W){var{create:ze,defineProperty:h,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:Xe,getPrototypeOf:Ye}=Object,Qe=Object.prototype.hasOwnProperty,Ze=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},Y=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Xe(r))if(!Qe.call(e,o)&&o!==t)h(e,o,{get:()=>r[o],enumerable:!(n=Ge(r,o))||n.enumerable})}return e},Q=(e,r,t)=>(t=e!=null?ze(Ye(e)):{},Y(r||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),Ke=(e)=>Y(h({},"__esModule",{value:!0}),e),K={};Ze(K,{assertVercelOidcTokenResponse:()=>j,findProjectInfo:()=>tr,getTokenPayload:()=>sr,getVercelDataDir:()=>We,getVercelOidcToken:()=>rr,getVercelToken:()=>er,isExpired:()=>ir,loadToken:()=>nr,saveToken:()=>or});W.exports=Ke(K);var f=Q(le("path")),s=Q(le("fs")),u=bc(),v=M(),a=L(),X=G(),c=Nm();function We(){let r=(0,v.getUserDataDir)();if(!r)return null;return f.join(r,"com.vercel.cli")}async function er(e){let r=(0,a.readAuthConfig)();if(!r?.token)throw new c.AccessTokenMissingError;if((0,a.isValidAccessToken)(r,e?.expirationBufferMs))return r.token;if(!r.refreshToken)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError("No refresh token available");try{let t=await(0,X.refreshTokenRequest)({refresh_token:r.refreshToken}),[n,o]=await(0,X.processTokenResponse)(t);if(n||!o)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError(n);let i={token:o.access_token,expiresAt:Math.floor(Date.now()/1000)+o.expires_in};if(o.refresh_token)i.refreshToken=o.refresh_token;return(0,a.writeAuthConfig)(i),i.token}catch(t){if((0,a.writeAuthConfig)({}),t instanceof c.AccessTokenMissingError||t instanceof c.RefreshAccessTokenFailedError)throw t;throw new c.RefreshAccessTokenFailedError(t)}}async function rr(e,r,t){let n=`https://api.vercel.com/v1/projects/${r}/token?source=vercel-oidc-refresh${t?`&teamId=${t}`:""}`,o=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new u.VercelOidcTokenError(`Failed to refresh OIDC token: ${o.statusText}`);let i=await o.json();return j(i),i}function j(e){if(!e||typeof e!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||typeof e.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function tr(){let e=(0,v.findRootDir)();if(!e)throw new u.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let r=f.join(e,".vercel","project.json");if(!s.existsSync(r))throw new u.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let t=JSON.parse(s.readFileSync(r,"utf8"));if(typeof t.projectId!=="string"&&typeof t.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:t.projectId,teamId:t.orgId}}function or(e,r){let t=(0,v.getUserDataDir)();if(!t)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=f.join(t,"com.vercel.token",`${r}.json`),o=JSON.stringify(e);s.mkdirSync(f.dirname(n),{mode:504,recursive:!0}),s.writeFileSync(n,o),s.chmodSync(n,432);return}function nr(e){let r=(0,v.getUserDataDir)();if(!r)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let t=f.join(r,"com.vercel.token",`${e}.json`);if(!s.existsSync(t))return null;let n=JSON.parse(s.readFileSync(t,"utf8"));return j(n),n}function sr(e){let r=e.split(".");if(r.length!==3)throw new u.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let t=r[1].replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function ir(e,r=0){return e.exp*1000<Date.now()+r}});
3
+ export{bc,Nm,wc};