gemi 0.72.1 → 0.74.0

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 (185) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/ai/index.js.map +1 -1
  3. package/dist/app/index.js +1 -1
  4. package/dist/auth/AuthController.d.ts.map +1 -1
  5. package/dist/auth/AuthManager.d.ts +33 -2
  6. package/dist/auth/AuthManager.d.ts.map +1 -1
  7. package/dist/auth/UserProvider.d.ts +34 -0
  8. package/dist/auth/UserProvider.d.ts.map +1 -1
  9. package/dist/auth/config.d.ts +2 -0
  10. package/dist/auth/config.d.ts.map +1 -1
  11. package/dist/broadcasting/index.js +1 -1
  12. package/dist/bun/plugin.js +1 -1
  13. package/dist/bun/preload.js +1 -1
  14. package/dist/{chunk-3w80kmxr.js → chunk-0yfgptrq.js} +2 -2
  15. package/dist/{chunk-3w80kmxr.js.map → chunk-0yfgptrq.js.map} +1 -1
  16. package/dist/{chunk-x3jwa5mx.js → chunk-14pybfjk.js} +2 -2
  17. package/dist/{chunk-x3jwa5mx.js.map → chunk-14pybfjk.js.map} +1 -1
  18. package/dist/{chunk-385exk8p.js → chunk-15gc8m24.js} +2 -2
  19. package/dist/{chunk-385exk8p.js.map → chunk-15gc8m24.js.map} +1 -1
  20. package/dist/{chunk-b53j44zv.js → chunk-17q5kheg.js} +2 -2
  21. package/dist/{chunk-b53j44zv.js.map → chunk-17q5kheg.js.map} +1 -1
  22. package/dist/{chunk-ev1pe2ry.js → chunk-1k0gv92y.js} +2 -2
  23. package/dist/{chunk-ev1pe2ry.js.map → chunk-1k0gv92y.js.map} +1 -1
  24. package/dist/{chunk-zkpwb3fp.js → chunk-1rnzaqpm.js} +2 -2
  25. package/dist/{chunk-zkpwb3fp.js.map → chunk-1rnzaqpm.js.map} +1 -1
  26. package/dist/{chunk-5fxqzs72.js → chunk-1x8gzkpq.js} +2 -2
  27. package/dist/{chunk-3zv572s2.js.map → chunk-1x8gzkpq.js.map} +1 -1
  28. package/dist/{chunk-ak7jma5c.js → chunk-1yr8qejy.js} +2 -2
  29. package/dist/{chunk-ak7jma5c.js.map → chunk-1yr8qejy.js.map} +1 -1
  30. package/dist/{chunk-gkedmh5f.js → chunk-26rqzgsr.js} +2 -2
  31. package/dist/{chunk-gkedmh5f.js.map → chunk-26rqzgsr.js.map} +1 -1
  32. package/dist/{chunk-wxahf19j.js → chunk-371tt28q.js} +4 -4
  33. package/dist/{chunk-wxahf19j.js.map → chunk-371tt28q.js.map} +1 -1
  34. package/dist/{chunk-3g94pe6x.js → chunk-3dd2gwrj.js} +2 -2
  35. package/dist/{chunk-3g94pe6x.js.map → chunk-3dd2gwrj.js.map} +1 -1
  36. package/dist/{chunk-gjanfny1.js → chunk-3eejq348.js} +3 -3
  37. package/dist/{chunk-gjanfny1.js.map → chunk-3eejq348.js.map} +1 -1
  38. package/dist/{chunk-c6z9f6cp.js → chunk-3nxkn558.js} +2 -2
  39. package/dist/{chunk-c6z9f6cp.js.map → chunk-3nxkn558.js.map} +1 -1
  40. package/dist/{chunk-2a2qd22n.js → chunk-3sdrj0ma.js} +2 -2
  41. package/dist/{chunk-2a2qd22n.js.map → chunk-3sdrj0ma.js.map} +1 -1
  42. package/dist/{chunk-n74re6da.js → chunk-407t1q1d.js} +2 -2
  43. package/dist/{chunk-n74re6da.js.map → chunk-407t1q1d.js.map} +1 -1
  44. package/dist/{chunk-0j8v3dd3.js → chunk-43t1js09.js} +2 -2
  45. package/dist/{chunk-0j8v3dd3.js.map → chunk-43t1js09.js.map} +1 -1
  46. package/dist/{chunk-sm8h95v3.js → chunk-4z5qqq1t.js} +2 -2
  47. package/dist/{chunk-sm8h95v3.js.map → chunk-4z5qqq1t.js.map} +1 -1
  48. package/dist/{chunk-sbeszmmp.js → chunk-62pzr6vf.js} +3 -3
  49. package/dist/{chunk-sbeszmmp.js.map → chunk-62pzr6vf.js.map} +1 -1
  50. package/dist/{chunk-ryynt7wx.js → chunk-7e4rhaqs.js} +2 -2
  51. package/dist/{chunk-ryynt7wx.js.map → chunk-7e4rhaqs.js.map} +1 -1
  52. package/dist/{chunk-xh65fgg1.js → chunk-8ef9n5pk.js} +2 -2
  53. package/dist/{chunk-xh65fgg1.js.map → chunk-8ef9n5pk.js.map} +1 -1
  54. package/dist/{chunk-rnbgw55r.js → chunk-8jgj7vdp.js} +2 -2
  55. package/dist/{chunk-rnbgw55r.js.map → chunk-8jgj7vdp.js.map} +1 -1
  56. package/dist/{chunk-b2bpwb1d.js → chunk-8rqdeyhv.js} +2 -2
  57. package/dist/{chunk-b2bpwb1d.js.map → chunk-8rqdeyhv.js.map} +1 -1
  58. package/dist/{chunk-z99bj1mv.js → chunk-8ypzxfvx.js} +2 -2
  59. package/dist/{chunk-z99bj1mv.js.map → chunk-8ypzxfvx.js.map} +1 -1
  60. package/dist/{chunk-wtyn66c0.js → chunk-9ecgk1c5.js} +2 -2
  61. package/dist/{chunk-wtyn66c0.js.map → chunk-9ecgk1c5.js.map} +1 -1
  62. package/dist/{chunk-ejspccjb.js → chunk-9gn3x603.js} +1 -1
  63. package/dist/{chunk-wa5emk60.js → chunk-9h0cz1f0.js} +2 -2
  64. package/dist/{chunk-wa5emk60.js.map → chunk-9h0cz1f0.js.map} +1 -1
  65. package/dist/{chunk-tfsbtz0j.js → chunk-9p5vwn4d.js} +2 -2
  66. package/dist/{chunk-tfsbtz0j.js.map → chunk-9p5vwn4d.js.map} +1 -1
  67. package/dist/{chunk-vt9tm0xx.js → chunk-9sqw5bjy.js} +2 -2
  68. package/dist/{chunk-vt9tm0xx.js.map → chunk-9sqw5bjy.js.map} +1 -1
  69. package/dist/{chunk-drrxkg9v.js → chunk-a1n0thja.js} +2 -2
  70. package/dist/{chunk-drrxkg9v.js.map → chunk-a1n0thja.js.map} +1 -1
  71. package/dist/{chunk-qm16ep90.js → chunk-a4xxmmct.js} +2 -2
  72. package/dist/{chunk-qm16ep90.js.map → chunk-a4xxmmct.js.map} +1 -1
  73. package/dist/{chunk-544va0er.js → chunk-a82m12q4.js} +3 -3
  74. package/dist/{chunk-544va0er.js.map → chunk-a82m12q4.js.map} +1 -1
  75. package/dist/chunk-achgw308.js +5 -0
  76. package/dist/{chunk-xkt6pnv3.js.map → chunk-achgw308.js.map} +5 -5
  77. package/dist/{chunk-mt1776nd.js → chunk-bm97dwbp.js} +2 -2
  78. package/dist/{chunk-mt1776nd.js.map → chunk-bm97dwbp.js.map} +1 -1
  79. package/dist/{chunk-w316w188.js → chunk-cr2wpeh5.js} +2 -2
  80. package/dist/{chunk-w316w188.js.map → chunk-cr2wpeh5.js.map} +1 -1
  81. package/dist/{chunk-3zv572s2.js → chunk-d6dz2706.js} +2 -2
  82. package/dist/{chunk-5fxqzs72.js.map → chunk-d6dz2706.js.map} +1 -1
  83. package/dist/{chunk-44j2dckn.js → chunk-dz7b35tn.js} +3 -3
  84. package/dist/{chunk-44j2dckn.js.map → chunk-dz7b35tn.js.map} +1 -1
  85. package/dist/{chunk-r4t5a213.js → chunk-evbvpfv6.js} +1 -1
  86. package/dist/{chunk-4yj86ds2.js → chunk-f90k29w1.js} +2 -2
  87. package/dist/{chunk-4yj86ds2.js.map → chunk-f90k29w1.js.map} +1 -1
  88. package/dist/{chunk-gf3y4k0r.js → chunk-fy2f8sq8.js} +2 -2
  89. package/dist/{chunk-gf3y4k0r.js.map → chunk-fy2f8sq8.js.map} +1 -1
  90. package/dist/{chunk-zz0t0pwk.js → chunk-g2hwd2ts.js} +2 -2
  91. package/dist/{chunk-zz0t0pwk.js.map → chunk-g2hwd2ts.js.map} +1 -1
  92. package/dist/{chunk-bt9rjc80.js → chunk-gpys09rg.js} +3 -3
  93. package/dist/{chunk-bt9rjc80.js.map → chunk-gpys09rg.js.map} +1 -1
  94. package/dist/{chunk-awjqnh2x.js → chunk-j9r5w8xf.js} +2 -2
  95. package/dist/{chunk-awjqnh2x.js.map → chunk-j9r5w8xf.js.map} +1 -1
  96. package/dist/{chunk-qcpar2xh.js → chunk-jpej3172.js} +2 -2
  97. package/dist/{chunk-qcpar2xh.js.map → chunk-jpej3172.js.map} +1 -1
  98. package/dist/chunk-krjkgg9v.js +5 -0
  99. package/dist/{chunk-cvm5sm4m.js.map → chunk-krjkgg9v.js.map} +1 -1
  100. package/dist/{chunk-p7tbab19.js → chunk-mc7nbgct.js} +3 -3
  101. package/dist/{chunk-p7tbab19.js.map → chunk-mc7nbgct.js.map} +1 -1
  102. package/dist/{chunk-t2t2qcj4.js → chunk-msqr4d2d.js} +2 -2
  103. package/dist/{chunk-t2t2qcj4.js.map → chunk-msqr4d2d.js.map} +1 -1
  104. package/dist/{chunk-8dvntsme.js → chunk-pjcdekm1.js} +2 -2
  105. package/dist/{chunk-8dvntsme.js.map → chunk-pjcdekm1.js.map} +1 -1
  106. package/dist/{chunk-ebdtwzzr.js → chunk-pjd63e8g.js} +2 -2
  107. package/dist/{chunk-ebdtwzzr.js.map → chunk-pjd63e8g.js.map} +1 -1
  108. package/dist/{chunk-yt96ny9v.js → chunk-pp9c3f5m.js} +2 -2
  109. package/dist/{chunk-yt96ny9v.js.map → chunk-pp9c3f5m.js.map} +1 -1
  110. package/dist/{chunk-ps59yj5b.js → chunk-pxfw8dg1.js} +2 -2
  111. package/dist/{chunk-ps59yj5b.js.map → chunk-pxfw8dg1.js.map} +1 -1
  112. package/dist/{chunk-gn0vhf9n.js → chunk-q60vevbt.js} +2 -2
  113. package/dist/{chunk-gn0vhf9n.js.map → chunk-q60vevbt.js.map} +1 -1
  114. package/dist/{chunk-yvkm7qya.js → chunk-qn7rr4bw.js} +2 -2
  115. package/dist/{chunk-yvkm7qya.js.map → chunk-qn7rr4bw.js.map} +1 -1
  116. package/dist/chunk-smr9jn4z.js +19 -0
  117. package/dist/{chunk-vqxpknyg.js.map → chunk-smr9jn4z.js.map} +11 -11
  118. package/dist/{chunk-47589yz8.js → chunk-t20b1xn4.js} +3 -3
  119. package/dist/{chunk-47589yz8.js.map → chunk-t20b1xn4.js.map} +1 -1
  120. package/dist/{chunk-akbawnmg.js → chunk-w8jyvdgd.js} +2 -2
  121. package/dist/{chunk-akbawnmg.js.map → chunk-w8jyvdgd.js.map} +1 -1
  122. package/dist/{chunk-bjr740m4.js → chunk-wbxmwzdb.js} +1 -1
  123. package/dist/{chunk-88qvsv9w.js → chunk-wtwkzgec.js} +2 -2
  124. package/dist/{chunk-88qvsv9w.js.map → chunk-wtwkzgec.js.map} +1 -1
  125. package/dist/chunk-xrd9xx3c.js +5 -0
  126. package/dist/{chunk-t48gchew.js.map → chunk-xrd9xx3c.js.map} +6 -6
  127. package/dist/{chunk-jgn1jyys.js → chunk-yqb9cpkx.js} +2 -2
  128. package/dist/{chunk-jgn1jyys.js.map → chunk-yqb9cpkx.js.map} +1 -1
  129. package/dist/{chunk-25a65e4r.js → chunk-ywf0kz71.js} +2 -2
  130. package/dist/{chunk-25a65e4r.js.map → chunk-ywf0kz71.js.map} +1 -1
  131. package/dist/{chunk-26n9365a.js → chunk-zat41156.js} +3 -3
  132. package/dist/{chunk-26n9365a.js.map → chunk-zat41156.js.map} +1 -1
  133. package/dist/config/index.js +1 -1
  134. package/dist/console/run.js +2 -2
  135. package/dist/console/run.js.map +1 -1
  136. package/dist/container/index.js +2 -2
  137. package/dist/container/index.js.map +1 -1
  138. package/dist/database/index.js +2 -2
  139. package/dist/database/index.js.map +1 -1
  140. package/dist/email/index.js +2 -2
  141. package/dist/email/index.js.map +1 -1
  142. package/dist/facades/index.js +2 -2
  143. package/dist/facades/index.js.map +1 -1
  144. package/dist/foundation/index.js +2 -2
  145. package/dist/foundation/index.js.map +1 -1
  146. package/dist/http/ApiRouter.d.ts.map +1 -1
  147. package/dist/http/HttpRequest.d.ts +6 -1
  148. package/dist/http/HttpRequest.d.ts.map +1 -1
  149. package/dist/http/index.d.ts +1 -0
  150. package/dist/http/index.d.ts.map +1 -1
  151. package/dist/http/index.js +2 -2
  152. package/dist/http/index.js.map +1 -1
  153. package/dist/http/requestDomain.d.ts +3 -0
  154. package/dist/http/requestDomain.d.ts.map +1 -1
  155. package/dist/http/validate.d.ts +12 -0
  156. package/dist/http/validate.d.ts.map +1 -1
  157. package/dist/i18n/dictionaryRuntime.js +2 -2
  158. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  159. package/dist/i18n/index.js +2 -2
  160. package/dist/i18n/index.js.map +1 -1
  161. package/dist/kernel/index.js +2 -2
  162. package/dist/kernel/index.js.map +1 -1
  163. package/dist/orm/index.js +3 -3
  164. package/dist/orm/index.js.map +1 -1
  165. package/dist/server/index.js +2 -2
  166. package/dist/server/index.js.map +1 -1
  167. package/dist/services/index.js +2 -2
  168. package/dist/services/index.js.map +1 -1
  169. package/dist/services/queue/work.js +2 -2
  170. package/dist/services/queue/work.js.map +1 -1
  171. package/dist/services/router/DomainResolver.d.ts +26 -8
  172. package/dist/services/router/DomainResolver.d.ts.map +1 -1
  173. package/dist/services/router/DomainRouter.d.ts.map +1 -1
  174. package/dist/services/router/config.d.ts +40 -4
  175. package/dist/services/router/config.d.ts.map +1 -1
  176. package/dist/support/index.js +2 -2
  177. package/dist/support/index.js.map +1 -1
  178. package/package.json +1 -1
  179. package/dist/chunk-cvm5sm4m.js +0 -5
  180. package/dist/chunk-t48gchew.js +0 -5
  181. package/dist/chunk-vqxpknyg.js +0 -19
  182. package/dist/chunk-xkt6pnv3.js +0 -5
  183. /package/dist/{chunk-ejspccjb.js.map → chunk-9gn3x603.js.map} +0 -0
  184. /package/dist/{chunk-r4t5a213.js.map → chunk-evbvpfv6.js.map} +0 -0
  185. /package/dist/{chunk-bjr740m4.js.map → chunk-wbxmwzdb.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{i as k,j as l}from"./chunk-t2t2qcj4.js";import{ka as F,oa as L,pa as c}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{md as I,qd as E,rd as T}from"./chunk-vqxpknyg.js";import"./chunk-gn0vhf9n.js";import"./chunk-ngq4n2b3.js";import"./chunk-t48gchew.js";import"./chunk-z99bj1mv.js";import"./chunk-xh65fgg1.js";import"./chunk-sbeszmmp.js";import"./chunk-xkt6pnv3.js";import"./chunk-jgn1jyys.js";import"./chunk-tfsbtz0j.js";import"./chunk-26n9365a.js";import"./chunk-mt1776nd.js";import"./chunk-4yj86ds2.js";import{zg as h}from"./chunk-25a65e4r.js";import{Ag as P}from"./chunk-ryynt7wx.js";import"./chunk-5fxqzs72.js";import{join as A,resolve as CJ,sep as IJ}from"path";import{Duplex as JJ}from"stream";import{constants as C,createBrotliCompress as $J,createGzip as XJ}from"zlib";var ZJ=["br","gzip"],zJ=1024,GJ=5,jJ=19,xJ=6;function HJ(J){if(J===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test(J.trim()))return 1;let $=Number(J.trim());return Number.isFinite($)?Math.min($,1):1}function QJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let X of J.split(",")){let[z,...x]=X.split(";"),W=z.trim().toLowerCase();if(W==="")continue;let Q=1;for(let H of x){let Y=H.indexOf("=");if(Y===-1)continue;if(H.slice(0,Y).trim().toLowerCase()==="q"){Q=HJ(H.slice(Y+1));break}}$.set(W,Q)}return $}function WJ(J,$=ZJ){let X=QJ(J);if(!X)return null;let z=X.get("*"),x=null,W=0;for(let Q of $){let H=X.get(Q)??z??0;if(H>W)x=Q,W=H}return x}function OJ(J,$){if(!J)return!1;return J.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===$)}function KJ(J,$){if(J==="HEAD")return!1;if(!$.body)return!1;if($.status<200||$.status===204||$.status===206||$.status===304)return!1;if($.headers.has("Content-Range"))return!1;let X=$.headers.get("Content-Type");if(!X||!/^\s*text\/html\s*(;|$)/i.test(X))return!1;let z=$.headers.get("Content-Encoding");if(z&&z.trim().toLowerCase()!=="identity")return!1;if(OJ($.headers.get("Cache-Control"),"no-transform"))return!1;let x=$.headers.get("Content-Length");if(x!==null&&Number(x)<zJ)return!1;return!0}function UJ(J){let $=J==="br"?$J({params:{[C.BROTLI_PARAM_QUALITY]:GJ,[C.BROTLI_PARAM_LGWIN]:jJ},flush:C.BROTLI_OPERATION_FLUSH}):XJ({level:xJ,flush:C.Z_SYNC_FLUSH});return JJ.toWeb($)}function YJ(J){let $=J.get("Vary");if(!$){J.set("Vary","Accept-Encoding");return}let X=$.split(",").map((z)=>z.trim().toLowerCase());if(X.includes("*")||X.includes("accept-encoding"))return;J.append("Vary","Accept-Encoding")}function q(J,$){if(!KJ(J.method,$))return $;let X=new Headers($.headers);YJ(X);let z=WJ(J.headers.get("Accept-Encoding"));if(!z)return new Response($.body,{status:$.status,statusText:$.statusText,headers:X});let x;try{x=UJ(z)}catch{return new Response($.body,{status:$.status,statusText:$.statusText,headers:X})}return X.set("Content-Encoding",z),X.delete("Content-Length"),new Response($.body.pipeThrough(x),{status:$.status,statusText:$.statusText,headers:X})}function v(J){let $=J.toString(),X=new Bun.CryptoHasher("sha1");return X.update($),X.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=I;import{stat as SJ}from"fs/promises";var S="app/client.tsx";function f(J,$=F){let X=J[S]?.file;if(!X)return;return{module:L(X,$),preload:R(J,S,$)}}function R(J,$,X=F){let z=[],x=new Set,W=(Q)=>{if(x.has(Q))return;x.add(Q);let H=J[Q];if(!H?.file)return;z.push(L(H.file,X));for(let Y of H.imports??[])W(Y)};return W($),z}var bJ=new RegExp(`^${E}/.+\\.m?js$`);function LJ(J){return bJ.test(J)}function u(J){if(LJ(J))return new Response("window.location.reload();export {}",{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(T(J))return new Response("Not found",{status:404});return}var VJ=`<!DOCTYPE html>
2
+ import{i as k,j as l}from"./chunk-msqr4d2d.js";import{ka as F,oa as L,pa as c}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{md as I,qd as E,rd as T}from"./chunk-smr9jn4z.js";import"./chunk-q60vevbt.js";import"./chunk-ngq4n2b3.js";import"./chunk-xrd9xx3c.js";import"./chunk-8ypzxfvx.js";import"./chunk-8ef9n5pk.js";import"./chunk-62pzr6vf.js";import"./chunk-achgw308.js";import"./chunk-yqb9cpkx.js";import"./chunk-9p5vwn4d.js";import"./chunk-zat41156.js";import"./chunk-bm97dwbp.js";import"./chunk-f90k29w1.js";import{Cg as h}from"./chunk-ywf0kz71.js";import{Dg as P}from"./chunk-7e4rhaqs.js";import"./chunk-1x8gzkpq.js";import{join as A,resolve as CJ,sep as IJ}from"path";import{Duplex as JJ}from"stream";import{constants as C,createBrotliCompress as $J,createGzip as XJ}from"zlib";var ZJ=["br","gzip"],zJ=1024,GJ=5,jJ=19,xJ=6;function HJ(J){if(J===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test(J.trim()))return 1;let $=Number(J.trim());return Number.isFinite($)?Math.min($,1):1}function QJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let X of J.split(",")){let[z,...x]=X.split(";"),W=z.trim().toLowerCase();if(W==="")continue;let Q=1;for(let H of x){let Y=H.indexOf("=");if(Y===-1)continue;if(H.slice(0,Y).trim().toLowerCase()==="q"){Q=HJ(H.slice(Y+1));break}}$.set(W,Q)}return $}function WJ(J,$=ZJ){let X=QJ(J);if(!X)return null;let z=X.get("*"),x=null,W=0;for(let Q of $){let H=X.get(Q)??z??0;if(H>W)x=Q,W=H}return x}function OJ(J,$){if(!J)return!1;return J.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===$)}function KJ(J,$){if(J==="HEAD")return!1;if(!$.body)return!1;if($.status<200||$.status===204||$.status===206||$.status===304)return!1;if($.headers.has("Content-Range"))return!1;let X=$.headers.get("Content-Type");if(!X||!/^\s*text\/html\s*(;|$)/i.test(X))return!1;let z=$.headers.get("Content-Encoding");if(z&&z.trim().toLowerCase()!=="identity")return!1;if(OJ($.headers.get("Cache-Control"),"no-transform"))return!1;let x=$.headers.get("Content-Length");if(x!==null&&Number(x)<zJ)return!1;return!0}function UJ(J){let $=J==="br"?$J({params:{[C.BROTLI_PARAM_QUALITY]:GJ,[C.BROTLI_PARAM_LGWIN]:jJ},flush:C.BROTLI_OPERATION_FLUSH}):XJ({level:xJ,flush:C.Z_SYNC_FLUSH});return JJ.toWeb($)}function YJ(J){let $=J.get("Vary");if(!$){J.set("Vary","Accept-Encoding");return}let X=$.split(",").map((z)=>z.trim().toLowerCase());if(X.includes("*")||X.includes("accept-encoding"))return;J.append("Vary","Accept-Encoding")}function q(J,$){if(!KJ(J.method,$))return $;let X=new Headers($.headers);YJ(X);let z=WJ(J.headers.get("Accept-Encoding"));if(!z)return new Response($.body,{status:$.status,statusText:$.statusText,headers:X});let x;try{x=UJ(z)}catch{return new Response($.body,{status:$.status,statusText:$.statusText,headers:X})}return X.set("Content-Encoding",z),X.delete("Content-Length"),new Response($.body.pipeThrough(x),{status:$.status,statusText:$.statusText,headers:X})}function v(J){let $=J.toString(),X=new Bun.CryptoHasher("sha1");return X.update($),X.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=I;import{stat as SJ}from"fs/promises";var S="app/client.tsx";function f(J,$=F){let X=J[S]?.file;if(!X)return;return{module:L(X,$),preload:R(J,S,$)}}function R(J,$,X=F){let z=[],x=new Set,W=(Q)=>{if(x.has(Q))return;x.add(Q);let H=J[Q];if(!H?.file)return;z.push(L(H.file,X));for(let Y of H.imports??[])W(Y)};return W($),z}var bJ=new RegExp(`^${E}/.+\\.m?js$`);function LJ(J){return bJ.test(J)}function u(J){if(LJ(J))return new Response("window.location.reload();export {}",{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(T(J))return new Response("Not found",{status:404});return}var VJ=`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8" />
@@ -21,4 +21,4 @@ import{i as k,j as l}from"./chunk-t2t2qcj4.js";import{ka as F,oa as L,pa as c}fr
21
21
  </html>`;function _(J,$,X){if(!X)console.error(J);else try{X(J instanceof Error?J:Error(String(J),{cause:J}))}catch(z){console.error(J),console.error(z)}if(P($))return new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}});return new Response(VJ,{status:500,headers:{"Content-Type":"text/html; charset=utf-8"}})}var D=h(),TJ=A(D,"app"),b=A(D,"dist"),m=A(b,"client");function PJ(J){let $;try{$=decodeURIComponent(J)}catch{return null}let X=CJ(m,"."+$.replace("/assets/assets","/assets"));return X.startsWith(m+IJ)?X:null}async function DJ(J){try{return(await SJ(J)).isFile()}catch{return!1}}async function tJ(J,$){let X=await import(`${b}/client/.vite/manifest.json`),z=await import(`${b}/server/.vite/manifest.json`),x=await c(`${b}/client`);process.env.ROOT_DIR=D,process.env.APP_DIR=TJ,process.env.DIST_DIR=b;let W={},Q={},H={},Y={},M={},d=(Z,G)=>`"${Z}": () => import("${G}")`,N=[];for(let Z of["404",...J.getFlatComponentTree.call(J)]){let G=z[`app/views/${Z}.tsx`];if(!G?.file){console.log(`Server file not found for ${Z}`),console.log(G);let O=Object.keys(z),U=`app/views/${Z}.tsx`;console.log(`${U} not found in server manifest`),console.log(O)}let K=await import(`${process.env.DIST_DIR}/server/${G?.file}`);W[Z]=K.default,Q[Z]=K.OpenGraph,H[Z]=K;let j=X[`app/views/${Z}.tsx`];if(j?.css&&j?.css.length>0)Y[Z]=j?.css;if(j)N.push(d(Z,L(j?.file,x))),M[Z]=R(X,`app/views/${Z}.tsx`,x)}let p=`{${N.join(",")}}`,B=f(X,x);if(!B)console.error(`Client manifest has no "${S}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let o=X["app/client.tsx"]?.css??[],n=(await Promise.all(o.map((Z)=>Bun.file(`${b}/client/${Z}`).text()))).join(`
22
22
  `),i=new I({pathname:"/*.:filetype(png|jpg|jpeg|gif|svg|avif|webp|ico|css|js|mjs|map|txt|xml|webmanifest|woff|woff2|ttf|otf|webm|mp4|mp3|pdf)"});async function t(Z){let{pathname:G}=new URL(Z.url),K=T(G)||G.startsWith("/.well-known")||G==="/manifest.json"||i.test({pathname:G}),j=P(G);if(K&&!j){let O=PJ(G);if(!O||!await DJ(O))return u(G)??await w(Z,G);try{let U=Bun.file(O),V=v(U.lastModified);return new Response(U.stream(),{headers:{"Content-Type":U.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(U.size),ETag:V}})}catch(U){return J.onException?.(U),new Response("Not found",{status:404})}}return await w(Z,G)}async function w(Z,G){let K=J.fetch.bind(J);try{let j=await K(Z);if(j instanceof Response)return j;else{let O=[];return O.push({content:n}),await j({getStyles:async(V)=>{if(!V)return k([]);for(let r of V){let s=X[`app/views/${r}.tsx`];for(let g of s?.css??[]){let e=Bun.file(`${process.env.DIST_DIR}/client/${g}`);O.push({id:g,content:await e.text()})}}return k(O)},clientEntry:B,modulePreloadManifest:M,loaders:p,viewImportMap:W,viewModules:H,ogMap:Q,cssManifest:Y,assetBase:x})}}catch(j){return _(j,G,J.onException)}}let a=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",y=Bun.serve({maxRequestBodySize:10737418240,fetch:async(Z,G)=>{if(!Z.headers.get("x-forwarded-for")){let j=G.requestIP(Z);if(j)Z.headers.set("x-forwarded-for",j.address)}let K=await $(Z,(j)=>J.withGlobalMiddleware(j,t,(O)=>_(O,new URL(j.url).pathname,J.onException)));return a?q(Z,K):K},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return l({port:y.port,rootDir:D}),y}export{tJ as httpProd};
23
23
 
24
- //# debugId=52E13FB7BD80332564756E2164756E21
24
+ //# debugId=F9F74A4692F92C2E64756E2164756E21
@@ -11,6 +11,6 @@
11
11
  "import { isApiPath } from \"../services/router/apiPath\";\n\n// The production server's last resort: an error nothing on the way here turned\n// into a response. Request breakers (auth, 404s, 416s) are answered by the\n// dispatchers before this, so what arrives is a genuine failure — and its\n// message and stack are for the developer, not for whoever triggered it. They\n// can carry absolute paths, dependency versions, SQL fragments and column\n// names. The dev server renders them on purpose (`httpDev.ts`); this does not.\n\nconst GENERIC_500_HTML = `<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Internal Server Error</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; display: grid; place-items: center; }\n main { text-align: center; padding: 16px; }\n h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }\n p { margin: 0; opacity: 0.7; }\n </style>\n </head>\n <body>\n <main>\n <h1>Something went wrong</h1>\n <p>Please try again later.</p>\n </main>\n </body>\n</html>`;\n\nexport function unhandledErrorResponse(\n err: unknown,\n pathname: string,\n onException?: (error: Error) => void,\n): Response {\n // `onException` is the report, and the default one `App` installs is a\n // `console.error`, so logging here as well printed every failure twice\n // (three times for `/api`, whose dispatcher logs before rethrowing). Only\n // without a reporter does this log itself.\n //\n // Reported for `/api` too: an app's error tracking should see an API failure\n // that got this far, not only a page one. `onRequestFail` is a different\n // hook (route config, called by the dispatchers), so this is not a second\n // report through the same channel.\n if (!onException) {\n console.error(err);\n } else {\n try {\n // The hook is typed to receive an `Error`; a thrown string or object is\n // wrapped so a reporter reading `.stack` or `.name` gets one.\n onException(err instanceof Error ? err : new Error(String(err), { cause: err }));\n } catch (reportError) {\n // A broken reporter must not turn a 500 into a leaked stack either.\n console.error(err);\n console.error(reportError);\n }\n }\n\n if (isApiPath(pathname)) {\n return new Response(JSON.stringify({ error: \"Internal Server Error\" }), {\n status: 500,\n headers: { \"Content-Type\": \"application/json\" },\n });\n }\n\n return new Response(GENERIC_500_HTML, {\n status: 500,\n headers: { \"Content-Type\": \"text/html; charset=utf-8\" },\n });\n}\n"
12
12
  ],
13
13
  "mappings": ";uuBAAA,SAAS,OAAM,IAAS,QCkBxB,WAAS,UACT,cAAS,oBAAW,WAAsB,QAW1C,FAAM,HAAuC,LAAC,DAAM,AAAM,JAQpD,HAAyB,DAYzB,GAAiB,EACjB,GAAqB,GAGrB,GAAa,EAEnB,SAAS,EAAW,CAAC,EAAiC,CACpD,GAAI,IAAQ,OACV,MAAO,GAKT,GAAI,CAAC,oBAA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I,qBAAuB,EAAE,EACzD,KAAM,QAAQ,IAAI,MAAQ,IAC5B,CAAC,EAID,OAFA,EAAmB,CAAE,KAAM,EAAO,KAAM,SAAQ,CAAC,EAE1C",
14
- "debugId": "52E13FB7BD80332564756E2164756E21",
14
+ "debugId": "F9F74A4692F92C2E64756E2164756E21",
15
15
  "names": []
16
16
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{a,b,c,d,e,f,g}from"./chunk-n74re6da.js";import"./chunk-sm8h95v3.js";import"./chunk-wa5emk60.js";import"./chunk-5fxqzs72.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
2
+ import{a,b,c,d,e,f,g}from"./chunk-407t1q1d.js";import"./chunk-4z5qqq1t.js";import"./chunk-9h0cz1f0.js";import"./chunk-1x8gzkpq.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
3
3
 
4
4
  //# debugId=30E142423ED216F064756E2164756E21
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{k as _t}from"./chunk-3zv572s2.js";import{A as eo,B as ro,C as to,D as oo,E as Lt,F as yo,l as er,n as M,o as vo,p as Eo,q as So,s as Gr,t as zr,u as kt,v as Io,w as cr,x as Po,y as xo,z as ar}from"./chunk-44j2dckn.js";import{G as gt}from"./chunk-385exk8p.js";import"./chunk-x3jwa5mx.js";import{I as hr,J as mt,L as Qt,P as Ue,T as f}from"./chunk-gjanfny1.js";import{U as Oo}from"./chunk-qm16ep90.js";import"./chunk-sm8h95v3.js";import{Y as zt}from"./chunk-ps59yj5b.js";import{Z as Ht}from"./chunk-vt9tm0xx.js";import"./chunk-awjqnh2x.js";import"./chunk-wa5emk60.js";import{ha as Zt}from"./chunk-zz0t0pwk.js";import{Dg as S}from"./chunk-5fxqzs72.js";var A=S((oe)=>{Object.defineProperty(oe,"__esModule",{value:!0});oe.resolveHttpAuthSchemeConfig=oe.defaultSSOOIDCHttpAuthSchemeProvider=oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var Rr=M(),w=hr(),fr=async(e,r,i)=>{return{operation:(0,w.getSmithyContext)(r).operation,region:await(0,w.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=fr;function Fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,i)=>({signingProperties:{config:r,context:i}})}}function Ur(e){return{schemeId:"smithy.api#noAuth"}}var $r=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(Ur(e));break}default:r.push(Fr(e))}return r};oe.defaultSSOOIDCHttpAuthSchemeProvider=$r;var jr=(e)=>{let r=(0,Rr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,w.normalizeProvider)(e.authSchemePreference??[])})};oe.resolveHttpAuthSchemeConfig=jr});var De=S((xe)=>{Object.defineProperty(xe,"__esModule",{value:!0});xe.ruleSet=void 0;var Ee="required",p="fn",d="argv",q="ref",se=!0,ne="isSet",N="booleanEquals",D="error",b="endpoint",I="tree",G="PartitionResult",z="getAttr",pe={[Ee]:!1,type:"string"},de={[Ee]:!0,default:!1,type:"boolean"},ce={[q]:"Endpoint"},Se={[p]:N,[d]:[{[q]:"UseFIPS"},!0]},Ie={[p]:N,[d]:[{[q]:"UseDualStack"},!0]},n={},ae={[p]:z,[d]:[{[q]:G},"supportsFIPS"]},Pe={[q]:G},le={[p]:N,[d]:[!0,{[p]:z,[d]:[Pe,"supportsDualStack"]}]},ue=[Se],Oe=[Ie],ve=[{[q]:"Region"}],Ar={version:"1.0",parameters:{Region:pe,UseDualStack:de,UseFIPS:de,Endpoint:pe},rules:[{conditions:[{[p]:ne,[d]:[ce]}],rules:[{conditions:ue,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{conditions:Oe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{url:ce,properties:n,headers:n},type:b}],type:I},{conditions:[{[p]:ne,[d]:ve}],rules:[{conditions:[{[p]:"aws.partition",[d]:ve,assign:G}],rules:[{conditions:[Se,Ie],rules:[{conditions:[{[p]:N,[d]:[se,ae]},le],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:I},{conditions:ue,rules:[{conditions:[{[p]:N,[d]:[ae,se]}],rules:[{conditions:[{[p]:"stringEquals",[d]:[{[p]:z,[d]:[Pe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:n,headers:n},type:b},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:I},{conditions:Oe,rules:[{conditions:[le],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:I},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I}],type:I},{error:"Invalid Configuration: Missing Region",type:D}]};xe.ruleSet=Ar});var Ne=S((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.defaultEndpointResolver=void 0;var mr=zr(),m=Gr(),Hr=De(),Lr=new m.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tr=(e,r={})=>{return Lr.get(e,()=>(0,m.resolveEndpoint)(Hr.ruleSet,{endpointParams:e,logger:r.logger}))};be.defaultEndpointResolver=Tr;m.customEndpointFunctions.aws=mr.awsEndpointFunctions});var F=S((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.SSOOIDCServiceException=L.__ServiceException=void 0;var he=f();Object.defineProperty(L,"__ServiceException",{enumerable:!0,get:function(){return he.ServiceException}});class H extends he.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,H.prototype)}}L.SSOOIDCServiceException=H});var k=S((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.UnsupportedGrantTypeException=fe.UnauthorizedClientException=fe.SlowDownException=fe.InvalidScopeException=fe.InvalidRequestException=fe.InvalidGrantException=fe.InvalidClientException=fe.InternalServerException=fe.ExpiredTokenException=fe.AuthorizationPendingException=fe.AccessDeniedException=void 0;var l=F();class T extends l.SSOOIDCServiceException{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.AccessDeniedException=T;class B extends l.SSOOIDCServiceException{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}fe.AuthorizationPendingException=B;class V extends l.SSOOIDCServiceException{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}fe.ExpiredTokenException=V;class W extends l.SSOOIDCServiceException{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InternalServerException=W;class Y extends l.SSOOIDCServiceException{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidClientException=Y;class J extends l.SSOOIDCServiceException{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidGrantException=J;class K extends l.SSOOIDCServiceException{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.InvalidRequestException=K;class X extends l.SSOOIDCServiceException{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidScopeException=X;class C extends l.SSOOIDCServiceException{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}fe.SlowDownException=C;class Q extends l.SSOOIDCServiceException{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnauthorizedClientException=Q;class Z extends l.SSOOIDCServiceException{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnsupportedGrantTypeException=Z});var g=S((ze)=>{Object.defineProperty(ze,"__esModule",{value:!0});ze.CreateToken$=ze.CreateTokenResponse$=ze.CreateTokenRequest$=ze.errorTypeRegistries=ze.UnsupportedGrantTypeException$=ze.UnauthorizedClientException$=ze.SlowDownException$=ze.InvalidScopeException$=ze.InvalidRequestException$=ze.InvalidGrantException$=ze.InvalidClientException$=ze.InternalServerException$=ze.ExpiredTokenException$=ze.AuthorizationPendingException$=ze.AccessDeniedException$=ze.SSOOIDCServiceException$=void 0;var kr="AccessDeniedException",gr="AuthorizationPendingException",_r="AccessToken",et="ClientSecret",rt="CreateToken",tt="CreateTokenRequest",ot="CreateTokenResponse",it="CodeVerifier",st="ExpiredTokenException",nt="InvalidClientException",pt="InvalidGrantException",dt="InvalidRequestException",ct="InternalServerException",at="InvalidScopeException",lt="IdToken",ut="RefreshToken",Ot="SlowDownException",vt="UnauthorizedClientException",Et="UnsupportedGrantTypeException",St="accessToken",E="client",It="clientId",Pt="clientSecret",xt="codeVerifier",yt="code",Dt="deviceCode",t="error",bt="expiresIn",u="error_description",qt="grantType",Nt="http",O="httpError",ht="idToken",$e="reason",je="refreshToken",Rt="redirectUri",we="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",ft="scope",Ft="server",Ut="tokenType",o="com.amazonaws.ssooidc",Me=Ue(),v=k(),$t=F(),Ae=Me.TypeRegistry.for(we);ze.SSOOIDCServiceException$=[-3,we,"SSOOIDCServiceException",0,[],[]];Ae.registerError(ze.SSOOIDCServiceException$,$t.SSOOIDCServiceException);var c=Me.TypeRegistry.for(o);ze.AccessDeniedException$=[-3,o,kr,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.AccessDeniedException$,v.AccessDeniedException);ze.AuthorizationPendingException$=[-3,o,gr,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.AuthorizationPendingException$,v.AuthorizationPendingException);ze.ExpiredTokenException$=[-3,o,st,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.ExpiredTokenException$,v.ExpiredTokenException);ze.InternalServerException$=[-3,o,ct,{[t]:Ft,[O]:500},[t,u],[0,0]];c.registerError(ze.InternalServerException$,v.InternalServerException);ze.InvalidClientException$=[-3,o,nt,{[t]:E,[O]:401},[t,u],[0,0]];c.registerError(ze.InvalidClientException$,v.InvalidClientException);ze.InvalidGrantException$=[-3,o,pt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidGrantException$,v.InvalidGrantException);ze.InvalidRequestException$=[-3,o,dt,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.InvalidRequestException$,v.InvalidRequestException);ze.InvalidScopeException$=[-3,o,at,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidScopeException$,v.InvalidScopeException);ze.SlowDownException$=[-3,o,Ot,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.SlowDownException$,v.SlowDownException);ze.UnauthorizedClientException$=[-3,o,vt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnauthorizedClientException$,v.UnauthorizedClientException);ze.UnsupportedGrantTypeException$=[-3,o,Et,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnsupportedGrantTypeException$,v.UnsupportedGrantTypeException);ze.errorTypeRegistries=[Ae,c];var jt=[0,o,_r,8,0],wt=[0,o,et,8,0],Mt=[0,o,it,8,0],At=[0,o,lt,8,0],Ge=[0,o,ut,8,0];ze.CreateTokenRequest$=[3,o,tt,0,[It,Pt,qt,Dt,yt,je,ft,Rt,xt],[0,[()=>wt,0],0,0,0,[()=>Ge,0],64,0,[()=>Mt,0]],3];ze.CreateTokenResponse$=[3,o,ot,0,[St,Ut,bt,je,ht],[[()=>jt,0],0,1,[()=>Ge,0],[()=>At,0]]];ze.CreateToken$=[9,o,rt,{[Nt]:["POST","/token",200]},()=>ze.CreateTokenRequest$,()=>ze.CreateTokenResponse$]});var or=S((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var Tt=M(),Bt=Lt(),Vt=er(),Wt=f(),Yt=Ht(),ge=mt(),_e=zt(),Jt=A(),Kt=Ne(),Xt=g(),Ct=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ge.fromBase64,base64Encoder:e?.base64Encoder??ge.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kt.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jt.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Tt.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vt.NoAuthSigner}],logger:e?.logger??new Wt.NoOpLogger,protocol:e?.protocol??Bt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Xt.errorTypeRegistries,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Yt.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=Ct});var Or=S((lr)=>{Object.defineProperty(lr,"__esModule",{value:!0});lr.getRuntimeConfig=void 0;var io=Zt(),so=io.__importDefault(_t()),ir=M(),sr=eo(),U=cr(),no=ro(),nr=ar(),x=gt(),pr=Qt(),dr=f(),po=to(),co=oo(),ao=kt(),lo=or(),uo=(e)=>{(0,dr.emitWarningIfUnsupportedVersion)(process.version);let r=(0,co.resolveDefaultsModeConfig)(e),i=()=>r().then(dr.loadConfigsForDefaultMode),a=(0,lo.getRuntimeConfig)(e);(0,ir.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,x.loadConfig)(ir.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??po.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,sr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:so.default.version}),maxAttempts:e?.maxAttempts??(0,x.loadConfig)(nr.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,x.loadConfig)(U.NODE_REGION_CONFIG_OPTIONS,{...U.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:pr.NodeHttpHandler.create(e?.requestHandler??i),retryMode:e?.retryMode??(0,x.loadConfig)({...nr.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await i()).retryMode||ao.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??no.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??pr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,x.loadConfig)(U.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,x.loadConfig)(U.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,x.loadConfig)(sr.NODE_APP_ID_CONFIG_OPTIONS,s)}};lr.getRuntimeConfig=uo});var Yo=S((P)=>{var vr=vo(),Do=Eo(),bo=So(),Er=Io(),qo=cr(),_=er(),No=Ue(),ho=Po(),yr=xo(),Sr=ar(),y=f(),Ir=A(),Ro=Or(),Pr=yo(),xr=Oo(),h=g(),$=k(),fo=F(),Fo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Uo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$o=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:i,credentials:a}=e;return{setHttpAuthScheme(s){let R=r.findIndex((j)=>j.schemeId===s.schemeId);if(R===-1)r.push(s);else r.splice(R,1,s)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(s){i=s},httpAuthSchemeProvider(){return i},setCredentials(s){a=s},credentials(){return a}}},jo=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},wo=(e,r)=>{let i=Object.assign(Pr.getAwsRegionExtensionConfiguration(e),y.getDefaultExtensionConfiguration(e),xr.getHttpHandlerExtensionConfiguration(e),$o(e));return r.forEach((a)=>a.configure(i)),Object.assign(e,Pr.resolveAwsRegionExtensionConfiguration(i),y.resolveDefaultRuntimeConfig(i),xr.resolveHttpHandlerRuntimeConfig(i),jo(i))};class ee extends y.Client{config;constructor(...[e]){let r=Ro.getRuntimeConfig(e||{});super(r);this.initConfig=r;let i=Fo(r),a=Er.resolveUserAgentConfig(i),s=Sr.resolveRetryConfig(a),R=qo.resolveRegionConfig(s),j=vr.resolveHostHeaderConfig(R),Dr=yr.resolveEndpointConfig(j),br=Ir.resolveHttpAuthSchemeConfig(Dr),qr=wo(br,e?.extensions||[]);this.config=qr,this.middlewareStack.use(No.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Er.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(ho.getContentLengthPlugin(this.config)),this.middlewareStack.use(vr.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Do.getLoggerPlugin(this.config)),this.middlewareStack.use(bo.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ir.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Nr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends y.Command.classBuilder().ep(Uo).m(function(e,r,i,a){return[yr.getEndpointPlugin(i,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(h.CreateToken$).build(){}var Mo={CreateTokenCommand:re};class te extends ee{}y.createAggregatedClient(Mo,te);var Ao={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Go={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};P.$Command=y.Command;P.__Client=y.Client;P.SSOOIDCServiceException=fo.SSOOIDCServiceException;P.AccessDeniedExceptionReason=Ao;P.CreateTokenCommand=re;P.InvalidRequestExceptionReason=Go;P.SSOOIDC=te;P.SSOOIDCClient=ee;Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=h[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=$[e]})});export default Yo();
2
+ import{k as _t}from"./chunk-d6dz2706.js";import{A as eo,B as ro,C as to,D as oo,E as Lt,F as yo,l as er,n as M,o as vo,p as Eo,q as So,s as Gr,t as zr,u as kt,v as Io,w as cr,x as Po,y as xo,z as ar}from"./chunk-dz7b35tn.js";import{G as gt}from"./chunk-15gc8m24.js";import"./chunk-14pybfjk.js";import{I as hr,J as mt,L as Qt,P as Ue,T as f}from"./chunk-3eejq348.js";import{U as Oo}from"./chunk-a4xxmmct.js";import"./chunk-4z5qqq1t.js";import{Y as zt}from"./chunk-pxfw8dg1.js";import{Z as Ht}from"./chunk-9sqw5bjy.js";import"./chunk-j9r5w8xf.js";import"./chunk-9h0cz1f0.js";import{ha as Zt}from"./chunk-g2hwd2ts.js";import{Gg as S}from"./chunk-1x8gzkpq.js";var A=S((oe)=>{Object.defineProperty(oe,"__esModule",{value:!0});oe.resolveHttpAuthSchemeConfig=oe.defaultSSOOIDCHttpAuthSchemeProvider=oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var Rr=M(),w=hr(),fr=async(e,r,i)=>{return{operation:(0,w.getSmithyContext)(r).operation,region:await(0,w.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};oe.defaultSSOOIDCHttpAuthSchemeParametersProvider=fr;function Fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,i)=>({signingProperties:{config:r,context:i}})}}function Ur(e){return{schemeId:"smithy.api#noAuth"}}var $r=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(Ur(e));break}default:r.push(Fr(e))}return r};oe.defaultSSOOIDCHttpAuthSchemeProvider=$r;var jr=(e)=>{let r=(0,Rr.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,w.normalizeProvider)(e.authSchemePreference??[])})};oe.resolveHttpAuthSchemeConfig=jr});var De=S((xe)=>{Object.defineProperty(xe,"__esModule",{value:!0});xe.ruleSet=void 0;var Ee="required",p="fn",d="argv",q="ref",se=!0,ne="isSet",N="booleanEquals",D="error",b="endpoint",I="tree",G="PartitionResult",z="getAttr",pe={[Ee]:!1,type:"string"},de={[Ee]:!0,default:!1,type:"boolean"},ce={[q]:"Endpoint"},Se={[p]:N,[d]:[{[q]:"UseFIPS"},!0]},Ie={[p]:N,[d]:[{[q]:"UseDualStack"},!0]},n={},ae={[p]:z,[d]:[{[q]:G},"supportsFIPS"]},Pe={[q]:G},le={[p]:N,[d]:[!0,{[p]:z,[d]:[Pe,"supportsDualStack"]}]},ue=[Se],Oe=[Ie],ve=[{[q]:"Region"}],Ar={version:"1.0",parameters:{Region:pe,UseDualStack:de,UseFIPS:de,Endpoint:pe},rules:[{conditions:[{[p]:ne,[d]:[ce]}],rules:[{conditions:ue,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{conditions:Oe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{url:ce,properties:n,headers:n},type:b}],type:I},{conditions:[{[p]:ne,[d]:ve}],rules:[{conditions:[{[p]:"aws.partition",[d]:ve,assign:G}],rules:[{conditions:[Se,Ie],rules:[{conditions:[{[p]:N,[d]:[se,ae]},le],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:I},{conditions:ue,rules:[{conditions:[{[p]:N,[d]:[ae,se]}],rules:[{conditions:[{[p]:"stringEquals",[d]:[{[p]:z,[d]:[Pe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:n,headers:n},type:b},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:I},{conditions:Oe,rules:[{conditions:[le],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:b}],type:I},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:I},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:b}],type:I}],type:I},{error:"Invalid Configuration: Missing Region",type:D}]};xe.ruleSet=Ar});var Ne=S((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.defaultEndpointResolver=void 0;var mr=zr(),m=Gr(),Hr=De(),Lr=new m.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tr=(e,r={})=>{return Lr.get(e,()=>(0,m.resolveEndpoint)(Hr.ruleSet,{endpointParams:e,logger:r.logger}))};be.defaultEndpointResolver=Tr;m.customEndpointFunctions.aws=mr.awsEndpointFunctions});var F=S((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.SSOOIDCServiceException=L.__ServiceException=void 0;var he=f();Object.defineProperty(L,"__ServiceException",{enumerable:!0,get:function(){return he.ServiceException}});class H extends he.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,H.prototype)}}L.SSOOIDCServiceException=H});var k=S((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.UnsupportedGrantTypeException=fe.UnauthorizedClientException=fe.SlowDownException=fe.InvalidScopeException=fe.InvalidRequestException=fe.InvalidGrantException=fe.InvalidClientException=fe.InternalServerException=fe.ExpiredTokenException=fe.AuthorizationPendingException=fe.AccessDeniedException=void 0;var l=F();class T extends l.SSOOIDCServiceException{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.AccessDeniedException=T;class B extends l.SSOOIDCServiceException{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}fe.AuthorizationPendingException=B;class V extends l.SSOOIDCServiceException{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}fe.ExpiredTokenException=V;class W extends l.SSOOIDCServiceException{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InternalServerException=W;class Y extends l.SSOOIDCServiceException{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidClientException=Y;class J extends l.SSOOIDCServiceException{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidGrantException=J;class K extends l.SSOOIDCServiceException{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}fe.InvalidRequestException=K;class X extends l.SSOOIDCServiceException{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}fe.InvalidScopeException=X;class C extends l.SSOOIDCServiceException{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}fe.SlowDownException=C;class Q extends l.SSOOIDCServiceException{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnauthorizedClientException=Q;class Z extends l.SSOOIDCServiceException{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,Z.prototype),this.error=e.error,this.error_description=e.error_description}}fe.UnsupportedGrantTypeException=Z});var g=S((ze)=>{Object.defineProperty(ze,"__esModule",{value:!0});ze.CreateToken$=ze.CreateTokenResponse$=ze.CreateTokenRequest$=ze.errorTypeRegistries=ze.UnsupportedGrantTypeException$=ze.UnauthorizedClientException$=ze.SlowDownException$=ze.InvalidScopeException$=ze.InvalidRequestException$=ze.InvalidGrantException$=ze.InvalidClientException$=ze.InternalServerException$=ze.ExpiredTokenException$=ze.AuthorizationPendingException$=ze.AccessDeniedException$=ze.SSOOIDCServiceException$=void 0;var kr="AccessDeniedException",gr="AuthorizationPendingException",_r="AccessToken",et="ClientSecret",rt="CreateToken",tt="CreateTokenRequest",ot="CreateTokenResponse",it="CodeVerifier",st="ExpiredTokenException",nt="InvalidClientException",pt="InvalidGrantException",dt="InvalidRequestException",ct="InternalServerException",at="InvalidScopeException",lt="IdToken",ut="RefreshToken",Ot="SlowDownException",vt="UnauthorizedClientException",Et="UnsupportedGrantTypeException",St="accessToken",E="client",It="clientId",Pt="clientSecret",xt="codeVerifier",yt="code",Dt="deviceCode",t="error",bt="expiresIn",u="error_description",qt="grantType",Nt="http",O="httpError",ht="idToken",$e="reason",je="refreshToken",Rt="redirectUri",we="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",ft="scope",Ft="server",Ut="tokenType",o="com.amazonaws.ssooidc",Me=Ue(),v=k(),$t=F(),Ae=Me.TypeRegistry.for(we);ze.SSOOIDCServiceException$=[-3,we,"SSOOIDCServiceException",0,[],[]];Ae.registerError(ze.SSOOIDCServiceException$,$t.SSOOIDCServiceException);var c=Me.TypeRegistry.for(o);ze.AccessDeniedException$=[-3,o,kr,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.AccessDeniedException$,v.AccessDeniedException);ze.AuthorizationPendingException$=[-3,o,gr,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.AuthorizationPendingException$,v.AuthorizationPendingException);ze.ExpiredTokenException$=[-3,o,st,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.ExpiredTokenException$,v.ExpiredTokenException);ze.InternalServerException$=[-3,o,ct,{[t]:Ft,[O]:500},[t,u],[0,0]];c.registerError(ze.InternalServerException$,v.InternalServerException);ze.InvalidClientException$=[-3,o,nt,{[t]:E,[O]:401},[t,u],[0,0]];c.registerError(ze.InvalidClientException$,v.InvalidClientException);ze.InvalidGrantException$=[-3,o,pt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidGrantException$,v.InvalidGrantException);ze.InvalidRequestException$=[-3,o,dt,{[t]:E,[O]:400},[t,$e,u],[0,0,0]];c.registerError(ze.InvalidRequestException$,v.InvalidRequestException);ze.InvalidScopeException$=[-3,o,at,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.InvalidScopeException$,v.InvalidScopeException);ze.SlowDownException$=[-3,o,Ot,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.SlowDownException$,v.SlowDownException);ze.UnauthorizedClientException$=[-3,o,vt,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnauthorizedClientException$,v.UnauthorizedClientException);ze.UnsupportedGrantTypeException$=[-3,o,Et,{[t]:E,[O]:400},[t,u],[0,0]];c.registerError(ze.UnsupportedGrantTypeException$,v.UnsupportedGrantTypeException);ze.errorTypeRegistries=[Ae,c];var jt=[0,o,_r,8,0],wt=[0,o,et,8,0],Mt=[0,o,it,8,0],At=[0,o,lt,8,0],Ge=[0,o,ut,8,0];ze.CreateTokenRequest$=[3,o,tt,0,[It,Pt,qt,Dt,yt,je,ft,Rt,xt],[0,[()=>wt,0],0,0,0,[()=>Ge,0],64,0,[()=>Mt,0]],3];ze.CreateTokenResponse$=[3,o,ot,0,[St,Ut,bt,je,ht],[[()=>jt,0],0,1,[()=>Ge,0],[()=>At,0]]];ze.CreateToken$=[9,o,rt,{[Nt]:["POST","/token",200]},()=>ze.CreateTokenRequest$,()=>ze.CreateTokenResponse$]});var or=S((rr)=>{Object.defineProperty(rr,"__esModule",{value:!0});rr.getRuntimeConfig=void 0;var Tt=M(),Bt=Lt(),Vt=er(),Wt=f(),Yt=Ht(),ge=mt(),_e=zt(),Jt=A(),Kt=Ne(),Xt=g(),Ct=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ge.fromBase64,base64Encoder:e?.base64Encoder??ge.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kt.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jt.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Tt.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vt.NoAuthSigner}],logger:e?.logger??new Wt.NoOpLogger,protocol:e?.protocol??Bt.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Xt.errorTypeRegistries,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Yt.parseUrl,utf8Decoder:e?.utf8Decoder??_e.fromUtf8,utf8Encoder:e?.utf8Encoder??_e.toUtf8}};rr.getRuntimeConfig=Ct});var Or=S((lr)=>{Object.defineProperty(lr,"__esModule",{value:!0});lr.getRuntimeConfig=void 0;var io=Zt(),so=io.__importDefault(_t()),ir=M(),sr=eo(),U=cr(),no=ro(),nr=ar(),x=gt(),pr=Qt(),dr=f(),po=to(),co=oo(),ao=kt(),lo=or(),uo=(e)=>{(0,dr.emitWarningIfUnsupportedVersion)(process.version);let r=(0,co.resolveDefaultsModeConfig)(e),i=()=>r().then(dr.loadConfigsForDefaultMode),a=(0,lo.getRuntimeConfig)(e);(0,ir.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,x.loadConfig)(ir.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??po.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,sr.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:so.default.version}),maxAttempts:e?.maxAttempts??(0,x.loadConfig)(nr.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,x.loadConfig)(U.NODE_REGION_CONFIG_OPTIONS,{...U.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:pr.NodeHttpHandler.create(e?.requestHandler??i),retryMode:e?.retryMode??(0,x.loadConfig)({...nr.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await i()).retryMode||ao.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??no.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??pr.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,x.loadConfig)(U.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,x.loadConfig)(U.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,x.loadConfig)(sr.NODE_APP_ID_CONFIG_OPTIONS,s)}};lr.getRuntimeConfig=uo});var Yo=S((P)=>{var vr=vo(),Do=Eo(),bo=So(),Er=Io(),qo=cr(),_=er(),No=Ue(),ho=Po(),yr=xo(),Sr=ar(),y=f(),Ir=A(),Ro=Or(),Pr=yo(),xr=Oo(),h=g(),$=k(),fo=F(),Fo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Uo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$o=(e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:i,credentials:a}=e;return{setHttpAuthScheme(s){let R=r.findIndex((j)=>j.schemeId===s.schemeId);if(R===-1)r.push(s);else r.splice(R,1,s)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(s){i=s},httpAuthSchemeProvider(){return i},setCredentials(s){a=s},credentials(){return a}}},jo=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},wo=(e,r)=>{let i=Object.assign(Pr.getAwsRegionExtensionConfiguration(e),y.getDefaultExtensionConfiguration(e),xr.getHttpHandlerExtensionConfiguration(e),$o(e));return r.forEach((a)=>a.configure(i)),Object.assign(e,Pr.resolveAwsRegionExtensionConfiguration(i),y.resolveDefaultRuntimeConfig(i),xr.resolveHttpHandlerRuntimeConfig(i),jo(i))};class ee extends y.Client{config;constructor(...[e]){let r=Ro.getRuntimeConfig(e||{});super(r);this.initConfig=r;let i=Fo(r),a=Er.resolveUserAgentConfig(i),s=Sr.resolveRetryConfig(a),R=qo.resolveRegionConfig(s),j=vr.resolveHostHeaderConfig(R),Dr=yr.resolveEndpointConfig(j),br=Ir.resolveHttpAuthSchemeConfig(Dr),qr=wo(br,e?.extensions||[]);this.config=qr,this.middlewareStack.use(No.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Er.getUserAgentPlugin(this.config)),this.middlewareStack.use(Sr.getRetryPlugin(this.config)),this.middlewareStack.use(ho.getContentLengthPlugin(this.config)),this.middlewareStack.use(vr.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Do.getLoggerPlugin(this.config)),this.middlewareStack.use(bo.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ir.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(Nr)=>new _.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nr.credentials})})),this.middlewareStack.use(_.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class re extends y.Command.classBuilder().ep(Uo).m(function(e,r,i,a){return[yr.getEndpointPlugin(i,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(h.CreateToken$).build(){}var Mo={CreateTokenCommand:re};class te extends ee{}y.createAggregatedClient(Mo,te);var Ao={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Go={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};P.$Command=y.Command;P.__Client=y.Client;P.SSOOIDCServiceException=fo.SSOOIDCServiceException;P.AccessDeniedExceptionReason=Ao;P.CreateTokenCommand=re;P.InvalidRequestExceptionReason=Go;P.SSOOIDC=te;P.SSOOIDCClient=ee;Object.prototype.hasOwnProperty.call(h,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:h.__proto__});Object.keys(h).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=h[e]});Object.prototype.hasOwnProperty.call($,"__proto__")&&!Object.prototype.hasOwnProperty.call(P,"__proto__")&&Object.defineProperty(P,"__proto__",{enumerable:!0,value:$.__proto__});Object.keys($).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(P,e))P[e]=$[e]})});export default Yo();
3
3
 
4
- //# debugId=4CE716394837A5FB64756E2164756E21
4
+ //# debugId=338DB3B864509DB864756E2164756E21
@@ -13,6 +13,6 @@
13
13
  "'use strict';\n\nvar middlewareHostHeader = require('@aws-sdk/middleware-host-header');\nvar middlewareLogger = require('@aws-sdk/middleware-logger');\nvar middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');\nvar middlewareUserAgent = require('@aws-sdk/middleware-user-agent');\nvar configResolver = require('@smithy/config-resolver');\nvar core = require('@smithy/core');\nvar schema = require('@smithy/core/schema');\nvar middlewareContentLength = require('@smithy/middleware-content-length');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar middlewareRetry = require('@smithy/middleware-retry');\nvar smithyClient = require('@smithy/smithy-client');\nvar httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');\nvar runtimeConfig = require('./runtimeConfig');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar protocolHttp = require('@smithy/protocol-http');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar SSOOIDCServiceException = require('./models/SSOOIDCServiceException');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends smithyClient.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);\n const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);\n const _config_4 = configResolver.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);\n const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));\n this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));\n this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));\n this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateTokenCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSSOOIDCService\", \"CreateToken\", {})\n .n(\"SSOOIDCClient\", \"CreateTokenCommand\")\n .sc(schemas_0.CreateToken$)\n .build() {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\nsmithyClient.createAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.$Command = smithyClient.Command;\nexports.__Client = smithyClient.Client;\nexports.SSOOIDCServiceException = SSOOIDCServiceException.SSOOIDCServiceException;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n"
14
14
  ],
15
15
  "mappings": ";uuBACA,CAAO,SAAe,HAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,yBAAsC,kCAA+C,4CAAsD,OACnJ,IAAM,OACA,OACA,GAAiD,MAAO,EAAQ,EAAS,IAAU,CACrF,MAAO,CACH,WAAY,EAAG,EAAkB,kBAAkB,CAAO,EAAE,UAC5D,OAAS,MAAO,EAAG,EAAkB,mBAAmB,EAAO,MAAM,EAAE,IAClE,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEI,kDAAiD,GACzD,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,YACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAuC,CAAC,IAAmB,CAC7D,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,cAAe,CAChB,EAAQ,KAAK,GAAoC,CAAc,CAAC,EAChE,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEH,wCAAuC,GAC/C,IAAM,GAA8B,CAAC,IAAW,CAC5C,IAAM,GAAY,EAAG,GAAO,0BAA0B,CAAM,EAC5D,OAAO,OAAO,OAAO,EAAU,CAC3B,sBAAuB,EAAG,EAAkB,mBAAmB,EAAO,sBAAwB,CAAC,CAAC,CACpG,CAAC,GAEG,+BAA8B,qBCtDtC,OAAO,eAAe,GAAS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16
+ "debugId": "338DB3B864509DB864756E2164756E21",
17
17
  "names": []
18
18
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{tf as U}from"./chunk-8ypzxfvx.js";import{pg as v}from"./chunk-zat41156.js";import{Cg as m}from"./chunk-ywf0kz71.js";import{Jg as OH}from"./chunk-1x8gzkpq.js";class E{static kind="controller";constructor(){}}class o extends E{}function R(H){let T=new Map;if(!H)return T;for(let K of H.split(";")){let D=K.indexOf("=");if(D===-1)continue;let O=K.slice(0,D).trim();if(!O)continue;T.set(O,K.slice(D+1).trim())}return T}function XH(H){return R(H.headers.get("cookie"))}function P(H){if(!/^\d+$/.test(H))return null;let T=Number(H);return Number.isSafeInteger(T)?T:null}function q(H){if(!H)return null;let T=H.trim();if(!/^bytes=/i.test(T))return null;let D=T.slice(6).split(",").map((Y)=>Y.trim()).filter((Y)=>Y!=="");if(D.length!==1)return null;let O=D[0],J=O.indexOf("-");if(J===-1)return null;let Q=O.slice(0,J),Z=O.slice(J+1);if(Q===""){let Y=P(Z);if(Y===null)return null;return{kind:"suffix",suffixLength:Y}}let G=P(Q);if(G===null)return null;if(Z==="")return{kind:"offset",start:G,end:null};let X=P(Z);if(X===null||X<G)return null;return{kind:"offset",start:G,end:X}}function I(H,T){if(!Number.isFinite(T)||T<=0)return null;let K,D;if(H.kind==="suffix"){if(H.suffixLength<=0)return null;K=Math.max(0,T-H.suffixLength),D=T-1}else{if(H.start>=T)return null;if(K=H.start,D=H.end===null?T-1:Math.min(H.end,T-1),D<K)return null}return{start:K,end:D,length:D-K+1}}function ZH(H){if(H.kind==="suffix")return`bytes=-${H.suffixLength}`;return H.end===null?`bytes=${H.start}-`:`bytes=${H.start}-${H.end}`}function $H(H){if(!H)return null;let T=/^bytes\s+(\d+)-(\d+)\/(\d+)$/i.exec(H.trim());if(!T)return null;let K=P(T[1]),D=P(T[2]),O=P(T[3]);if(K===null||D===null||O===null||D<K)return null;return{start:K,end:D,total:O}}function CH(H,T,K){return`bytes ${H}-${T}/${K}`}function y(H){return`bytes */${H}`}var PH="GEMI_REQUEST_BREAKER_ERROR";class $ extends Error{kind="GEMI_REQUEST_BREAKER_ERROR";payload={api:{},view:{}}}class L extends ${errors={};constructor(H){super("Validation error");this.name="ValidationError",this.errors=H,this.payload={api:{status:400,data:{error:{kind:"validation_error",messages:H}},headers:{"Content-Type":"application/json"}},view:{status:400}}}}function n(H){let[T,K]=H.match(/\d+|\D+/g)??[];if(!T||!K)return 0;let D=Number.parseInt(T);switch(K){case"B":return D;case"KB":return D*1024;case"MB":return D*1024*1024;case"GB":return D*1024*1024*1024;case"TB":return D*1024*1024*1024*1024;default:return 0}}function s(H){switch(H){case"image":return"image";case"png":return"image/png";case"jpg":return"image/jpeg";case"jpeg":return"image/jpeg";case"ttf":return"font/ttf";case"excel":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"csv":return"text/csv";case"word":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"pdf":return"application/pdf";case"json":return"application/json";default:return H}}function k(H){if(typeof H==="string"||Array.isArray(H))return H.length;return}function A(H){return typeof H==="number"&&!Number.isNaN(H)}var l=["required","string","boolean","number","email","password","min","max","gte","lte","file","fileType","fileSize"];class C extends Error{name="InvalidValidationRuleError"}function B(H,T){let K=T===void 0||T.trim()===""?Number.NaN:Number(T);if(Number.isNaN(K))throw new C(`Validation rule "${H}:${T??""}" needs a number, e.g. "${H}:3"`);return K}function b(H){let[T,K]=H.split(":");switch(T){case"required":return(D)=>{if(D instanceof Blob)return D.size>0;if(D===null||D===void 0)return!1;if(typeof D==="string"||Array.isArray(D))return D.length>0;return!0};case"string":return(D)=>typeof D==="string";case"boolean":return(D)=>typeof D==="boolean";case"number":return(D)=>A(D);case"password":return(D)=>{return typeof D==="string"&&/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/.test(D)};case"min":{let D=B(T,K);return(O)=>{let J=k(O);return J!==void 0&&J>=D}}case"max":{let D=B(T,K);return(O)=>{let J=k(O);return J!==void 0&&J<=D}}case"gte":{let D=B(T,K);return(O)=>A(O)&&O>=D}case"lte":{let D=B(T,K);return(O)=>A(O)&&O<=D}case"email":return(D)=>{return typeof D==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(D)};case"file":return(D)=>{return D instanceof Blob};case"fileType":{if(!K)throw new C('Validation rule "fileType" needs a type, e.g. "fileType:png" or "fileType:image"');let D=s(K);return(O)=>O instanceof Blob&&O.type.startsWith(D)}case"fileSize":{let D=n(K??"");if(D===0&&!/^0+(B|KB|MB|GB|TB)$/.test(K??""))throw new C(`Validation rule "fileSize:${K??""}" needs a whole size in B, KB, MB, GB or TB, e.g. "fileSize:5MB"`);return(O)=>O instanceof Blob&&O.size<=D}default:throw new C(`Unknown validation rule "${H}". Known rules: ${l.join(", ")}`)}}var z=new WeakMap;function BH(H,T){z.set(H,{clientAddress:T})}function c(H){return z.has(H)}function MH(H){return z.get(H)?.clientAddress}var f=new WeakMap;function AH(H,T){f.set(H,T)}function g(H){return f.get(H)??null}var N=new WeakMap;function zH(H,T){let K=N.get(H)??[];if(!K.includes(T))N.set(H,[...K,T])}function NH(H){return N.get(H)??[]}class x{data;constructor(H){this.data=H}get(H){return this.data[H]}has(H){return this.data[H]!==void 0}toJSON(){return this.data}}class t{kind;rawRequest;headers;cookies;search;schema={};routePath;params;domain;constructor(H,T,K,D){if(!H){let G=U.getStore().req;this.params=G.params,this.rawRequest=G.rawRequest,this.kind=G.kind,this.routePath=G.routePath,this.domain=G.domain??null}else this.params=T,this.rawRequest=H,this.routePath=D,this.kind=K??"api",this.domain=g(H);this.headers=this.rawRequest.headers;let O=R(this.rawRequest.headers.get("Cookie")),J=new URL(this.rawRequest.url),Q=new Map;for(let[G,X]of J.searchParams)if(Q.has(G)){let Y=Q.get(G);if(Array.isArray(Y))Y.push(X),Q.set(G,Y);else Q.set(G,[Y,X])}else Q.set(G,X);let Z=Object.fromEntries(Q.entries());this.search=new x(Z),this.cookies=O}locale(){return U.getStore().locale}ctx(){return U.getStore()}isModelOriginated(){return c(this.rawRequest)}range(){return q(this.rawRequest.headers.get("Range"))}refine(H){return{}}async parseBody(){let H=new x({});if(this.rawRequest.headers.get("Content-Type")==="application/json"){let T=await this.rawRequest.json();H=new x(T)}if(this.rawRequest.headers.get("Content-Type")==="application/x-www-form-urlencoded"){let T=await this.rawRequest.formData();H=new x(T)}if(this.rawRequest.headers.get("Content-Type")?.startsWith("multipart/form-data")){let T=await this.rawRequest.formData(),K=new Map;for(let[D,O]of T.entries())if(K.has(D)){let J=K.get(D);if(Array.isArray(J))J.push(O),K.set(D,J);else K.set(D,[J,O])}else K.set(D,O);H=new x(Object.fromEntries(K.entries()))}return H}validateInput(H){let T={},K=Object.entries(this.schema).map(([D,O])=>({key:D,rules:Object.entries(O).map(([J,Q])=>({rule:J,message:Q,check:typeof Q==="function"?null:this.ruleFor(D,J)}))}));for(let{key:D,rules:O}of K){let J=H.get(D),Q=O.some(({rule:X})=>X==="required"),Z=J===void 0||J===null||J==="",G=[];for(let{rule:X,message:Y,check:u}of O){let j=Y,M=!1;if(typeof Y==="function")j=Y(J),M=typeof j>"u";else M=u(J);if(M)continue;if(Z&&!Q)continue;if(X==="required"){G.splice(0,G.length,String(j));break}G.push(String(j))}if(G.length>0)T[D]=G}for(let[D,O]of Object.entries(this.refine(H.toJSON())??{})){if(!T[D])T[D]=[];T[D]=[...T[D]??[],O]}if(Object.keys(T).length>0)throw new L(T);return H}ruleFor(H,T){try{return b(T)}catch(K){if(K instanceof C)throw new C(`${this.constructor.name}.schema.${H}: ${K.message}`);throw K}}async input(){return this.validateInput(await this.parseBody())}async safeInput(){let H=await this.parseBody();try{return this.validateInput(H),{isValid:!0,errors:{},input:H}}catch(T){if(!(T instanceof L))throw T;return{isValid:!1,errors:T.errors,input:H}}}}class r extends ${error;constructor(H="Not authorized"){super(H);this.name="AuthorizationError",this.error=H,this.payload={api:{status:401,data:{error:this.error}},view:{}}}}class h extends ${static apiStatus=403;error;constructor(H="Insufficient permissions"){super(H);this.name="InsufficientPermissionsError",this.error=H,this.payload={api:{status:h.apiStatus,data:{error:this.error}},view:{status:403}}}}class V extends ${total;constructor(H){super("Range not satisfiable");this.total=H;this.name="RangeNotSatisfiableError",this.payload={api:{status:416,data:{error:{message:"Range not satisfiable"}},headers:{"Content-Range":y(H),"Accept-Ranges":"bytes","Cache-Control":"no-store"}},view:{}}}}class W extends ${fileName;constructor(H){super("File not found");this.fileName=H;this.name="FileNotFoundError",this.payload={api:{status:404,data:{error:{message:"Not found"}},headers:{"Cache-Control":"no-store"}},view:{}}}}class a extends ${constructor(H={}){super("Authentication error");this.name="AuthenticationError";let T=H.redirectTo??"/auth/sign-in";this.payload={api:{status:401,data:{error:"Authentication error"}},viewData:{status:200,data:{},headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate"},directive:{kind:"Redirect",path:T}},view:{status:302,headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate",Location:T}}}}}class F{static getFacadeAccessor(){throw Error(`Facade [${this.name}] does not implement getFacadeAccessor().`)}static getFacadeRoot(){return v(this.getFacadeAccessor())}}class _{async delete(H){throw Error(`${this.constructor.name} does not implement delete(). Override it to remove objects from this backend.`)}async read(H){let T=typeof H==="string"?{name:H}:H,K=await this.fetch({name:T.name,bucket:T.bucket});if(!K.ok)throw new W(T.name);let D=K.headers.get("Content-Type")??"application/octet-stream",O=K.headers.get("ETag")??void 0,J=K.headers.get("Last-Modified"),Q=J?new Date(J):void 0;if(T.range){let X=await K.blob();return{body:X,start:0,end:X.size-1,total:X.size,partial:!1,type:D,etag:O,lastModified:Q,name:T.name}}let Z=Number(K.headers.get("Content-Length")),G=Number.isFinite(Z)?Z:0;return{body:K.body,start:0,end:G-1,total:G,partial:!1,type:D,etag:O,lastModified:Q,name:T.name}}async size(H){let T=typeof H==="string"?H:H.name,K=typeof H==="string"?void 0:H.bucket,D=await this.fetch({name:T,bucket:K});if(!D.ok)throw new W(T);let O=Number(D.headers.get("Content-Length"));if(Number.isFinite(O))return await D.body?.cancel(),O;return(await D.blob()).size}}import{readdir as e,unlink as HH}from"fs/promises";import{isAbsolute as TH,relative as DH,resolve as d,sep as KH}from"path";class S extends _{configured;constructor(H){super();this.configured=H}get folderPath(){return this.configured??`${m()}/storage`}async put(H,{signal:T}={}){T?.throwIfAborted();let K,D;if(H instanceof Blob)K=H,D=`${Bun.randomUUIDv7()}.${H.type.split("/")[1].split(";")[0]}`;else K=H.body,D=H.name;let O=K instanceof Buffer?K:K instanceof Blob||K instanceof File?Buffer.from(await K.arrayBuffer()):"",J=`${this.folderPath}/${D}`;return T?.throwIfAborted(),await Bun.write(J,O),D}async fetch(H){let T=process.env.BUCKET_NAME,K;if(typeof H==="string")K=H;else T=H.bucket??T,K=H.name;if(!K)throw Error("Object name has to be specified");let D=`${this.folderPath}/${K}`,O=Bun.file(D),J=Bun.file(D).stream(),Q=new Date(O.lastModified).toUTCString();return new Response(J,{headers:{"Content-Type":O.type,"Content-Length":String(O.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":Q}})}async read(H){let T=typeof H==="string"?{name:H}:H,{name:K,range:D=null}=T;if(!K)throw Error("Object name has to be specified");let O=Bun.file(`${this.folderPath}/${K}`);if(!await O.exists())throw new W(K);let J=O.size,Q=D?I(D,J):null;if(D&&!Q)throw new V(J);let Z=Q?.start??0,G=Q?Q.end:J-1;return{body:Q?O.slice(Z,G+1):O,start:Z,end:G,total:J,partial:Boolean(Q),type:O.type||"application/octet-stream",lastModified:new Date(O.lastModified),name:K}}async size(H){let T=typeof H==="string"?H:H.name,K=Bun.file(`${this.folderPath}/${T}`);if(!await K.exists())throw new W(T);return K.size}async delete(H){let T=typeof H==="string"?H:H.name;if(!T)throw Error("Object name has to be specified");let K=d(this.folderPath),D=d(K,T),O=DH(K,D);if(!O||O===".."||O.startsWith(`..${KH}`)||TH(O))throw Error(`Refusing to delete "${T}": it is outside the storage folder`);try{await HH(D)}catch(J){if(J?.code==="ENOENT")return;throw J}}async list(){return await e(this.folderPath)}}function lH(H){return H}function p(){return{driver:new S}}class w{static token="filesystem";driver;constructor(H={}){this.driver=H.driver??p().driver}}import{Buffer as JH}from"buffer";async function i(H){try{return(await import("sharp")).default}catch(T){throw Error(`${H} requires the 'sharp' package. Install it with \`bun add sharp\`.`,{cause:T})}}class GH extends F{static getFacadeAccessor(){return w}static async put(H,T={}){return this.getFacadeRoot().driver.put(H,T)}static async metadata(H){let T=JH.from(await H.arrayBuffer()),K=await i("Storage.metadata()");try{return await K(T).metadata()}catch{return{}}}static async fetch(H){return this.getFacadeRoot().driver.fetch(H)}static async read(H,T={}){let K=typeof H==="string"?{name:H}:{...H},D="range"in T?T.range??null:K.range!==void 0?K.range:U.getStore()?.rangeRequest??null;return this.getFacadeRoot().driver.read({...K,range:D})}static list(H){return this.getFacadeRoot().driver.list(H)}static async delete(H){return this.getFacadeRoot().driver.delete(H)}}
3
+ export{E as Le,o as Me,R as Ne,XH as Oe,BH as Pe,MH as Qe,q as Re,I as Se,ZH as Te,$H as Ue,CH as Ve,y as We,AH as Xe,g as Ye,zH as Ze,NH as _e,PH as $e,$ as af,L as bf,C as cf,t as df,r as ef,h as ff,V as gf,W as hf,a as if,F as jf,i as kf,_ as lf,S as mf,lH as nf,p as of,w as pf,GH as qf};
4
+
5
+ //# debugId=48F1F6A898A1C8F364756E2164756E21
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../http/Controller.ts", "../http/getCookies.ts", "../http/range.ts", "../http/Error.ts", "../http/Router.ts", "../http/modelOriginated.ts", "../http/requestDomain.ts", "../http/validate.ts", "../http/HttpRequest.ts", "../http/errors.ts", "../facades/Facade.ts", "../services/file-storage/drivers/FileStorageDriver.ts", "../services/file-storage/drivers/FileSystemDriver.ts", "../services/file-storage/config.ts", "../services/file-storage/FilesystemManager.ts", "../facades/Storage.ts", "../support/sharp.ts"],
3
+ "sources": ["../http/Controller.ts", "../http/getCookies.ts", "../http/range.ts", "../http/Error.ts", "../http/Router.ts", "../http/validate.ts", "../http/modelOriginated.ts", "../http/requestDomain.ts", "../http/HttpRequest.ts", "../http/errors.ts", "../facades/Facade.ts", "../services/file-storage/drivers/FileStorageDriver.ts", "../services/file-storage/drivers/FileSystemDriver.ts", "../services/file-storage/config.ts", "../services/file-storage/FilesystemManager.ts", "../facades/Storage.ts", "../support/sharp.ts"],
4
4
  "sourcesContent": [
5
5
  "import type { HttpRequest } from \"./HttpRequest\";\n\nexport class Controller {\n static kind = \"controller\" as const;\n\n constructor() {}\n}\n\ntype PromiseOrData<T> = T | Promise<T>;\n\nexport abstract class ResourceController extends Controller {\n abstract store(req: HttpRequest<any, any>): PromiseOrData<any>;\n abstract update(req: HttpRequest<any, any>): PromiseOrData<any>;\n abstract delete(req: HttpRequest<any, any>): PromiseOrData<any>;\n abstract list(req: HttpRequest<any, any>): PromiseOrData<any>;\n abstract show(req: HttpRequest<any, any>): PromiseOrData<any>;\n}\n\nexport type ControllerMethods<\n T extends new () => Controller | ResourceController,\n> = {\n [K in keyof InstanceType<T>]: InstanceType<T>[K] extends Function ? K : never;\n}[keyof InstanceType<T>];\n",
6
6
  "/**\n * Parses a `Cookie` request header into name -> value.\n *\n * Splits each pair on its *first* `=`: base64 padding and JWTs put `=` inside\n * the value, and splitting on every one would cut them off. A segment with no\n * `=` or an empty name is skipped rather than thrown on, since browsers and\n * proxies do send `flag;`-style pairs and the client may not control them.\n * A repeated name keeps its last value.\n *\n * Values are not percent-decoded: server-written cookies (`createCookie`) are\n * unencoded, so decoding here would change any value that happens to contain\n * a `%`. A cookie the browser writes may be encoded — `useLocale` encodes\n * `i18n-locale` — and its reader decodes it if it needs to.\n */\nexport function parseCookieHeader(header: string | null | undefined): Map<string, string> {\n const cookies = new Map<string, string>();\n if (!header) {\n return cookies;\n }\n for (const pair of header.split(\";\")) {\n const eq = pair.indexOf(\"=\");\n if (eq === -1) continue;\n const name = pair.slice(0, eq).trim();\n if (!name) continue;\n cookies.set(name, pair.slice(eq + 1).trim());\n }\n return cookies;\n}\n\nexport function getCookies(req: Request): Map<string, string> {\n return parseCookieHeader(req.headers.get(\"cookie\"));\n}\n",
7
7
  "/**\n * RFC 7233 byte-range parsing and resolution.\n *\n * Deliberately dependency-free: the file storage drivers import `ByteRange`\n * from here, and drivers otherwise import nothing out of `http/`.\n */\n\n/**\n * A parsed but *unresolved* `Range` header. The suffix form carries no absolute\n * offsets — resolving it needs the total size of the object.\n */\nexport type ByteRange =\n | { kind: \"offset\"; start: number; end: number | null }\n | { kind: \"suffix\"; suffixLength: number };\n\n/** Absolute, inclusive, clamped-to-the-object byte offsets. */\nexport type ResolvedRange = { start: number; end: number; length: number };\n\n/** A parsed response `Content-Range` of the `bytes S-E/TOTAL` form. */\nexport type ContentRange = { start: number; end: number; total: number };\n\nfunction parseInteger(raw: string): number | null {\n // Reject anything that isn't a run of ASCII digits. `Number()` would happily\n // take \"0x10\", \" 5\", \"1e3\" and \"+5\", none of which are valid byte-pos.\n if (!/^\\d+$/.test(raw)) {\n return null;\n }\n const value = Number(raw);\n return Number.isSafeInteger(value) ? value : null;\n}\n\n/**\n * Parses a request `Range` header.\n *\n * Returns `null` for anything we cannot or will not serve as a partial\n * response. That is not an error path: RFC 7233 §3.1 requires a recipient to\n * ignore a `Range` it does not understand, and §4.1 lets a server ignore one it\n * does. Every `null` here means \"serve the complete representation with 200\".\n *\n * Only a single range is supported — we never emit `multipart/byteranges`, so a\n * multi-range request is ignored rather than partially honoured.\n */\nexport function parseRangeHeader(\n header: string | null | undefined,\n): ByteRange | null {\n if (!header) {\n return null;\n }\n\n const trimmed = header.trim();\n if (!/^bytes=/i.test(trimmed)) {\n return null;\n }\n\n const specs = trimmed\n .slice(\"bytes=\".length)\n .split(\",\")\n .map((spec) => spec.trim());\n\n // A single trailing comma is tolerated (\"bytes=0-9,\") because some clients\n // emit it. More than one *non-empty* spec is a genuine multi-range request.\n const present = specs.filter((spec) => spec !== \"\");\n if (present.length !== 1) {\n return null;\n }\n\n const spec = present[0];\n const separator = spec.indexOf(\"-\");\n if (separator === -1) {\n return null;\n }\n\n const rawStart = spec.slice(0, separator);\n const rawEnd = spec.slice(separator + 1);\n\n if (rawStart === \"\") {\n // Suffix form: `bytes=-N`, the last N bytes.\n const suffixLength = parseInteger(rawEnd);\n if (suffixLength === null) {\n return null;\n }\n // `bytes=-0` parses cleanly and resolves to unsatisfiable (416). Collapsing\n // it to `null` here would serve the whole file instead, which the spec does\n // not allow. Satisfiability is `resolveRange`'s job alone.\n return { kind: \"suffix\", suffixLength };\n }\n\n const start = parseInteger(rawStart);\n if (start === null) {\n return null;\n }\n\n if (rawEnd === \"\") {\n return { kind: \"offset\", start, end: null };\n }\n\n const end = parseInteger(rawEnd);\n if (end === null || end < start) {\n return null;\n }\n\n return { kind: \"offset\", start, end };\n}\n\n/**\n * Resolves a parsed range against a known total size.\n *\n * Returns `null` when the range is unsatisfiable, which the caller must turn\n * into a 416 rather than a full response.\n */\nexport function resolveRange(\n range: ByteRange,\n total: number,\n): ResolvedRange | null {\n // An empty (or unknown-length) representation has no satisfiable range at\n // all. Handling it here is what keeps `bytes 0--1/0` from ever being built.\n if (!Number.isFinite(total) || total <= 0) {\n return null;\n }\n\n let start: number;\n let end: number;\n\n if (range.kind === \"suffix\") {\n if (range.suffixLength <= 0) {\n return null;\n }\n start = Math.max(0, total - range.suffixLength);\n end = total - 1;\n } else {\n if (range.start >= total) {\n return null;\n }\n start = range.start;\n // An end past the last byte is clamped, not rejected — Chrome routinely\n // asks for `bytes=0-2147483647` when loading a <video>.\n end = range.end === null ? total - 1 : Math.min(range.end, total - 1);\n if (end < start) {\n return null;\n }\n }\n\n return { start, end, length: end - start + 1 };\n}\n\n/** Renders a range back into a `Range` request header for a storage backend. */\nexport function toRangeHeaderValue(range: ByteRange): string {\n if (range.kind === \"suffix\") {\n return `bytes=-${range.suffixLength}`;\n }\n return range.end === null\n ? `bytes=${range.start}-`\n : `bytes=${range.start}-${range.end}`;\n}\n\n/**\n * Parses a response `Content-Range`. Storage backends report the authoritative\n * total size of the object here on a ranged read, which is what lets a driver\n * answer a range without a second round trip for the size.\n *\n * The unsatisfied form used on a 416 has no offsets and returns `null`.\n */\nexport function parseContentRange(\n value: string | null | undefined,\n): ContentRange | null {\n if (!value) {\n return null;\n }\n const match = /^bytes\\s+(\\d+)-(\\d+)\\/(\\d+)$/i.exec(value.trim());\n if (!match) {\n return null;\n }\n const start = parseInteger(match[1]);\n const end = parseInteger(match[2]);\n const total = parseInteger(match[3]);\n if (start === null || end === null || total === null || end < start) {\n return null;\n }\n return { start, end, total };\n}\n\nexport function formatContentRange(\n start: number,\n end: number,\n total: number,\n): string {\n return `bytes ${start}-${end}/${total}`;\n}\n\n/** The `Content-Range` of a 416: no offsets, just the current total size. */\nexport function formatUnsatisfiedContentRange(total: number): string {\n return `bytes */${total}`;\n}\n",
8
8
  "export const GEMI_REQUEST_BREAKER_ERROR = \"GEMI_REQUEST_BREAKER_ERROR\";\n\nexport class RequestBreakerError extends Error {\n public kind = GEMI_REQUEST_BREAKER_ERROR;\n public payload: {\n api: Record<string, any>;\n view: Record<string, any>;\n /**\n * What a `.json` view navigation answers, when that differs from `api`.\n * Absent, it gets `api` — right for most breakers, but not for one that\n * must be a 401 to an API client and a redirect to the client router.\n */\n viewData?: Record<string, any>;\n } = { api: {}, view: {} };\n}\n",
9
9
  "import { RequestBreakerError } from \"./Error\";\nimport type { HttpRequest } from \"./HttpRequest\";\n\ntype MiddlewareResult = Partial<{\n headers: Record<string, string>;\n cookies: Record<string, string>;\n}>;\n\nexport type MiddlewareReturnType =\n | void\n | Promise<MiddlewareResult>\n | MiddlewareResult;\n\nexport type RouterMiddleware = (\n req: HttpRequest,\n ctx: any,\n) => MiddlewareReturnType;\n\nexport class ValidationError extends RequestBreakerError {\n errors: Record<string, string[]> = {};\n constructor(errors: Record<string, string[]>) {\n super(\"Validation error\");\n this.name = \"ValidationError\";\n this.errors = errors;\n this.payload = {\n api: {\n status: 400,\n data: {\n error: {\n kind: \"validation_error\",\n messages: errors,\n },\n },\n headers: {\n \"Content-Type\": \"application/json\",\n },\n },\n view: {\n status: 400,\n },\n };\n }\n}\n",
10
+ "/**\n * The validation rule table: a rule name in, a predicate out.\n *\n * ITS OWN MODULE SO THE TEST DOES NOT NEED A HOOK. This lived in\n * `HttpRequest.ts` and was reached from `validate.test.ts` through\n * `export const __validateForTests = validate`, which is a name that exists\n * only because the thing it aliases was in the wrong file. Two costs, and the\n * second is the one that bites:\n *\n * - `tsc` emits a declaration per source file, so `dist/http/HttpRequest.d.ts`\n * shipped `__validateForTests` to every installed copy of the framework. The\n * JS build bundles, so there is no `dist/http/HttpRequest.js` behind it —\n * the declaration announced an export the tarball could not produce.\n * - A test-only alias is a second name for the same function, so the test\n * reads as if it were poking at something private. It is not: this is the\n * code path every request body goes through. Importing `validate` says so.\n *\n * Nothing outside `HttpRequest` should build predicates by hand — rules are\n * named in a route's schema — but \"internal\" is what an unexported name in an\n * unexported module already means, and it does not need a warning label.\n */\n\n// Formats B KB MB GB TB\n// e.g parseFileSizeString(\"1MB\") => 1024 * 1024\nfunction parseFileSizeString(size: string) {\n const [number, unit] = size.match(/\\d+|\\D+/g) ?? [];\n if (!number || !unit) {\n return 0;\n }\n const fileSize = Number.parseInt(number);\n switch (unit) {\n case \"B\":\n return fileSize;\n case \"KB\":\n return fileSize * 1024;\n case \"MB\":\n return fileSize * 1024 * 1024;\n case \"GB\":\n return fileSize * 1024 * 1024 * 1024;\n case \"TB\":\n return fileSize * 1024 * 1024 * 1024 * 1024;\n default:\n return 0;\n }\n}\n\n// Formats png, jpg, ttf, excel, csv, word, pdf, json\n// Eg. png => image/png\nfunction parseFileTypeString(type: string) {\n switch (type) {\n case \"image\":\n return \"image\";\n case \"png\":\n return \"image/png\";\n case \"jpg\":\n return \"image/jpeg\";\n case \"jpeg\":\n return \"image/jpeg\";\n case \"ttf\":\n return \"font/ttf\";\n case \"excel\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n case \"csv\":\n return \"text/csv\";\n case \"word\":\n return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n case \"pdf\":\n return \"application/pdf\";\n case \"json\":\n return \"application/json\";\n default:\n return type;\n }\n}\n\n/** The length of the things that have one — `undefined` for everything else,\n * rather than the `undefined` that arithmetic silently turns into `false`. */\nfunction lengthOf(value: any): number | undefined {\n if (typeof value === \"string\" || Array.isArray(value)) return value.length;\n return undefined;\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\n/** Every rule `validate` implements. `SchemaKey` in `HttpRequest.ts` offers\n * these and only these: `validate.test-d.ts` checks the two lists agree, and\n * `validate.test.ts` that each one has a case. */\nexport const RULES = [\n \"required\",\n \"string\",\n \"boolean\",\n \"number\",\n \"email\",\n \"password\",\n \"min\",\n \"max\",\n \"gte\",\n \"lte\",\n \"file\",\n \"fileType\",\n \"fileSize\",\n] as const;\n\n/**\n * A schema names a rule `validate` does not have, or gives one a parameter it\n * cannot use. Thrown when the request is validated, not when the body is bad:\n * it is a bug in the schema, so it is a 500 and not a 400.\n */\nexport class InvalidValidationRuleError extends Error {\n name = \"InvalidValidationRuleError\";\n}\n\n/** `min:3` → 3. A parameter that is not a number throws, instead of becoming\n * `NaN` and quietly failing every value. */\nfunction numericParam(rule: string, param: string | undefined): number {\n const n = param === undefined || param.trim() === \"\" ? Number.NaN : Number(param);\n if (Number.isNaN(n)) {\n throw new InvalidValidationRuleError(\n `Validation rule \"${rule}:${param ?? \"\"}\" needs a number, e.g. \"${rule}:3\"`,\n );\n }\n return n;\n}\n\nexport function validate(ruleName: string) {\n const [rule, param] = ruleName.split(\":\");\n switch (rule) {\n /**\n * Present. Not \"non-empty for the two types that happen to have `.length`\".\n *\n * This used to end in `value?.length > 0`, which is `undefined > 0` — so\n * `false` — for every value that is not a string, an array or a Blob. A\n * number failed it. A boolean failed it. A plain object failed it, which on\n * a typed `HttpRequest<{ theme: { … } }>` is the ordinary case, and the app\n * saw a 400 on a request that was correct.\n *\n * `0` and `false` PASS. They are values someone sent, and a rule called\n * `required` asks whether the field is there, not whether it is truthy —\n * conflating those is how a checkbox set to \"no\" and a quantity of zero get\n * rejected as missing. Emptiness is still emptiness where the concept\n * applies: `\"\"` and `[]` fail, as they did before, and so does a zero-byte\n * upload.\n *\n * `{}` passes. It is an object that was sent; whether its contents are\n * adequate is a question for the rules on its fields, not for this one.\n */\n case \"required\":\n return (value: any) => {\n if (value instanceof Blob) {\n return value.size > 0;\n }\n if (value === null || value === undefined) {\n return false;\n }\n if (typeof value === \"string\" || Array.isArray(value)) {\n return value.length > 0;\n }\n return true;\n };\n /**\n * The JSON types, checked with `typeof` like `number`. No coercion: `\"true\"`\n * is not a boolean and `42` is not a string. A form-encoded or multipart\n * body only ever carries strings (and files), so `boolean` and `number` are\n * rules for JSON bodies.\n */\n case \"string\":\n return (value: any) => typeof value === \"string\";\n case \"boolean\":\n return (value: any) => typeof value === \"boolean\";\n case \"number\":\n return (value: any) => isNumber(value);\n /**\n * `RegExp.prototype.test` stringifies its argument, so without the `typeof`\n * check `[\"a@b.co\"]` passed `email` and an array holding a strong password\n * passed `password`.\n */\n case \"password\":\n return (value: any) => {\n // min 8 characters\n // at least one uppercase letter,\n // at least one lowercase letter and one number\n // at least one special character\n const passwordRegex = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/;\n return typeof value === \"string\" && passwordRegex.test(value);\n };\n /**\n * Length, and only length. `min:3` is \"at least three characters\", never\n * \"at least three\".\n *\n * ONE NAME, ONE COMPARISON, deliberately. The tempting fix was to overload\n * these by runtime type — length for a string, magnitude for a number — and\n * that is the shape `required` was already in: a rule whose meaning depends\n * on what it is handed, which reads fine until the value's type is not the\n * one the author pictured. `gte` / `lte` below say which comparison they\n * make in their names, so nothing has to be inferred.\n *\n * Written out rather than left as `value?.length >= n` so that a number\n * fails here for a stated reason instead of by arithmetic on `undefined`.\n */\n case \"min\": {\n const min = numericParam(rule, param);\n return (value: any) => {\n const length = lengthOf(value);\n return length !== undefined && length >= min;\n };\n }\n case \"max\": {\n const max = numericParam(rule, param);\n return (value: any) => {\n const length = lengthOf(value);\n return length !== undefined && length <= max;\n };\n }\n /** Magnitude, for numbers. The counterpart `min` / `max` deliberately are not. */\n case \"gte\": {\n const bound = numericParam(rule, param);\n return (value: any) => isNumber(value) && value >= bound;\n }\n case \"lte\": {\n const bound = numericParam(rule, param);\n return (value: any) => isNumber(value) && value <= bound;\n }\n case \"email\":\n return (value: any) => {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return typeof value === \"string\" && emailRegex.test(value);\n };\n case \"file\":\n return (value: any) => {\n return value instanceof Blob;\n };\n case \"fileType\": {\n if (!param) {\n throw new InvalidValidationRuleError(\n `Validation rule \"fileType\" needs a type, e.g. \"fileType:png\" or \"fileType:image\"`,\n );\n }\n const parsedType = parseFileTypeString(param);\n return (value: any) => value instanceof Blob && value.type.startsWith(parsedType);\n }\n case \"fileSize\": {\n // `parseFileSizeString` answers 0 for anything it cannot read, and a\n // 0-byte ceiling rejects every upload — so `fileSize:5mb` or\n // `fileSize:1.5MB` looked like a limit and was a wall.\n const absoluteSize = parseFileSizeString(param ?? \"\");\n if (absoluteSize === 0 && !/^0+(B|KB|MB|GB|TB)$/.test(param ?? \"\")) {\n throw new InvalidValidationRuleError(\n `Validation rule \"fileSize:${param ?? \"\"}\" needs a whole size in B, KB, MB, GB or TB, e.g. \"fileSize:5MB\"`,\n );\n }\n return (value: any) => value instanceof Blob && value.size <= absoluteSize;\n }\n /**\n * Not `() => true`. That default is how `string` and `boolean` shipped in\n * `SchemaKey` checking nothing (#609): a rule the table does not\n * know looks, from the schema, exactly like one it does. A typo'd or\n * unimplemented rule is a bug in the schema, so it throws.\n */\n default:\n throw new InvalidValidationRuleError(\n `Unknown validation rule \"${ruleName}\". Known rules: ${RULES.join(\", \")}`,\n );\n }\n}\n",
10
11
  "/**\n * The requests the api dispatcher built itself, on a model's behalf, rather\n * than received from a client.\n *\n * Keyed on the `Request` object, not carried in it. A header was the obvious\n * alternative and it is forgeable by construction: anything the synthetic\n * request can carry, a real client can send. Only a module holding this set can\n * add to it, and it is deliberately not re-exported from `http/index.ts`, so no\n * inbound request can put itself here. The only writer is\n * `ApiRouteDispatcher.dispatchAs`, and it marks only the requests it built.\n * App code can call `dispatchAs` — it is trusted — but cannot mark a request of\n * its own.\n *\n * The object, rather than a flag on the request context, because the two\n * places an app asks the question sit on either side of `RequestContext.run`:\n * `onRequestStart` fires before the dispatcher opens the request's store, and a\n * handler's `new SomeRequest()` builds a second `HttpRequest` from inside it.\n * Both wrap the same raw `Request`, so both get the same answer, and nothing has\n * to remember to copy a field from one to the other.\n *\n * A `WeakMap`, so a dispatched request is forgotten with the request. The\n * value is the initiator's client address; see `dispatchedClientAddress`.\n */\nconst dispatched = new WeakMap<Request, { clientAddress: string }>();\n\n/**\n * `clientAddress` is required so the one writer cannot mark a request without\n * saying whose rate-limit budget it spends.\n */\nexport function markModelOriginated(req: Request, clientAddress: string) {\n dispatched.set(req, { clientAddress });\n}\n\nexport function isModelOriginated(req: Request): boolean {\n return dispatched.has(req);\n}\n\n/**\n * The client address `clientIp` resolved from the initiator, for a request the\n * dispatcher built; `undefined` for any other.\n *\n * It rides here for the same reason the marker does. The synthetic request\n * carries credentials only, so it has no `x-forwarded-for`, and\n * `RateLimitMiddleware` would key every tool call from every user on\n * `unknown:<route>`: one budget, which one user's agent loop can spend for\n * everyone. Copying the initiator's `x-forwarded-for` instead would move a\n * client-written header onto a request the server built. Carrying the value\n * `clientIp` already derived from the initiator gives a tool call exactly the\n * address the user's own direct request gets, and nothing more.\n */\nexport function dispatchedClientAddress(req: Request): string | undefined {\n return dispatched.get(req)?.clientAddress;\n}\n",
11
- "// Type-only: `services/router` imports from `http`, so a runtime import here\n// would be circular.\nimport type { ResolvedDomain } from \"../services/router/DomainResolver\";\n\n// Keyed by the raw Request, so the domain `App.fetch` resolved reaches the\n// dispatcher, and every `HttpRequest` built over that Request, without a\n// second AsyncLocalStorage that a streaming render would step outside of.\nconst domains = new WeakMap<Request, ResolvedDomain>();\n\nexport function setRequestDomain(req: Request, domain: ResolvedDomain) {\n domains.set(req, domain);\n}\n\n/** The host group `req` was routed by, or `null` when `route.domains` is not configured. */\nexport function requestDomain(req: Request): ResolvedDomain | null {\n return domains.get(req) ?? null;\n}\n",
12
- "/**\n * The validation rule table: a rule name in, a predicate out.\n *\n * ITS OWN MODULE SO THE TEST DOES NOT NEED A HOOK. This lived in\n * `HttpRequest.ts` and was reached from `validate.test.ts` through\n * `export const __validateForTests = validate`, which is a name that exists\n * only because the thing it aliases was in the wrong file. Two costs, and the\n * second is the one that bites:\n *\n * - `tsc` emits a declaration per source file, so `dist/http/HttpRequest.d.ts`\n * shipped `__validateForTests` to every installed copy of the framework. The\n * JS build bundles, so there is no `dist/http/HttpRequest.js` behind it —\n * the declaration announced an export the tarball could not produce.\n * - A test-only alias is a second name for the same function, so the test\n * reads as if it were poking at something private. It is not: this is the\n * code path every request body goes through. Importing `validate` says so.\n *\n * Nothing outside `HttpRequest` should build predicates by hand — rules are\n * named in a route's schema — but \"internal\" is what an unexported name in an\n * unexported module already means, and it does not need a warning label.\n */\n\n// Formats B KB MB GB TB\n// e.g parseFileSizeString(\"1MB\") => 1024 * 1024\nfunction parseFileSizeString(size: string) {\n const [number, unit] = size.match(/\\d+|\\D+/g) ?? [];\n if (!number || !unit) {\n return 0;\n }\n const fileSize = Number.parseInt(number);\n switch (unit) {\n case \"B\":\n return fileSize;\n case \"KB\":\n return fileSize * 1024;\n case \"MB\":\n return fileSize * 1024 * 1024;\n case \"GB\":\n return fileSize * 1024 * 1024 * 1024;\n case \"TB\":\n return fileSize * 1024 * 1024 * 1024 * 1024;\n default:\n return 0;\n }\n}\n\n// Formats png, jpg, ttf, excel, csv, word, pdf, json\n// Eg. png => image/png\nfunction parseFileTypeString(type: string) {\n switch (type) {\n case \"image\":\n return \"image\";\n case \"png\":\n return \"image/png\";\n case \"jpg\":\n return \"image/jpeg\";\n case \"jpeg\":\n return \"image/jpeg\";\n case \"ttf\":\n return \"font/ttf\";\n case \"excel\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n case \"csv\":\n return \"text/csv\";\n case \"word\":\n return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n case \"pdf\":\n return \"application/pdf\";\n case \"json\":\n return \"application/json\";\n default:\n return type;\n }\n}\n\n/** The length of the things that have one — `undefined` for everything else,\n * rather than the `undefined` that arithmetic silently turns into `false`. */\nfunction lengthOf(value: any): number | undefined {\n if (typeof value === \"string\" || Array.isArray(value)) return value.length;\n return undefined;\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === \"number\" && !Number.isNaN(value);\n}\n\nexport function validate(ruleName: string) {\n const [rule, param] = ruleName.split(\":\");\n switch (rule) {\n /**\n * Present. Not \"non-empty for the two types that happen to have `.length`\".\n *\n * This used to end in `value?.length > 0`, which is `undefined > 0` — so\n * `false` — for every value that is not a string, an array or a Blob. A\n * number failed it. A boolean failed it. A plain object failed it, which on\n * a typed `HttpRequest<{ theme: { … } }>` is the ordinary case, and the app\n * saw a 400 on a request that was correct.\n *\n * `0` and `false` PASS. They are values someone sent, and a rule called\n * `required` asks whether the field is there, not whether it is truthy —\n * conflating those is how a checkbox set to \"no\" and a quantity of zero get\n * rejected as missing. Emptiness is still emptiness where the concept\n * applies: `\"\"` and `[]` fail, as they did before, and so does a zero-byte\n * upload.\n *\n * `{}` passes. It is an object that was sent; whether its contents are\n * adequate is a question for the rules on its fields, not for this one.\n */\n case \"required\":\n return (value: any) => {\n if (value instanceof Blob) {\n return value.size > 0;\n }\n if (value === null || value === undefined) {\n return false;\n }\n if (typeof value === \"string\" || Array.isArray(value)) {\n return value.length > 0;\n }\n return true;\n };\n case \"password\":\n return (value: any) => {\n // min 8 characters\n // at least one uppercase letter,\n // at least one lowercase letter and one number\n // at least one special character\n const passwordRegex = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/;\n return passwordRegex.test(value);\n };\n\n case \"number\":\n return (value: any) => {\n if (typeof value !== \"number\") return false;\n\n return !Number.isNaN(value);\n };\n /**\n * Length, and only length. `min:3` is \"at least three characters\", never\n * \"at least three\".\n *\n * ONE NAME, ONE COMPARISON, deliberately. The tempting fix was to overload\n * these by runtime type — length for a string, magnitude for a number — and\n * that is the shape `required` was already in: a rule whose meaning depends\n * on what it is handed, which reads fine until the value's type is not the\n * one the author pictured. `gte` / `lte` below say which comparison they\n * make in their names, so nothing has to be inferred.\n *\n * Written out rather than left as `value?.length >= n` so that a number\n * fails here for a stated reason instead of by arithmetic on `undefined`.\n */\n case \"min\":\n return (value: any) => {\n const length = lengthOf(value);\n return length !== undefined && length >= Number.parseInt(param);\n };\n case \"max\":\n return (value: any) => {\n const length = lengthOf(value);\n return length !== undefined && length <= Number.parseInt(param);\n };\n /** Magnitude, for numbers. The counterpart `min` / `max` deliberately are not. */\n case \"gte\":\n return (value: any) => isNumber(value) && value >= Number(param);\n case \"lte\":\n return (value: any) => isNumber(value) && value <= Number(param);\n case \"email\":\n return (value: any) => {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return emailRegex.test(value);\n };\n case \"file\":\n return (value: any) => {\n return value instanceof Blob;\n };\n case \"fileType\":\n return (value: Blob) => {\n if (value instanceof Blob) {\n const parsedType = parseFileTypeString(param);\n return value.type.startsWith(parsedType);\n }\n };\n\n case \"fileSize\":\n return (value: Blob) => {\n if (value instanceof Blob) {\n const absoluteSize = parseFileSizeString(param);\n return value.size <= absoluteSize;\n }\n };\n default:\n return () => true;\n }\n}\n",
13
- "import { parseCookieHeader } from \"./getCookies\";\nimport { isModelOriginated } from \"./modelOriginated\";\nimport { parseRangeHeader } from \"./range\";\nimport { RequestContext } from \"./requestContext\";\nimport { requestDomain } from \"./requestDomain\";\nimport { ValidationError } from \"./Router\";\nimport { validate } from \"./validate\";\nimport type { ResolvedDomain } from \"../services/router/DomainResolver\";\n\nclass Input<T> {\n constructor(private data: T) {}\n\n public get<K extends keyof T>(key: K): T[K] {\n return this.data[key];\n }\n\n public has(key: keyof T) {\n return this.data[key] !== undefined;\n }\n\n public toJSON(): T {\n return this.data;\n }\n}\n\ntype StringType = \"string\";\ntype NumberType = \"number\";\ntype BooleanType = \"boolean\";\ntype MinLengthType = `min:${number}`;\ntype MaxLengthType = `max:${number}`;\n/** Magnitude, for numbers — see `validate`'s `min` case for why these are not\n * the same rule wearing different names. */\ntype GreaterOrEqualType = `gte:${number}`;\ntype LessOrEqualType = `lte:${number}`;\ntype RequiredType = \"required\";\ntype FileType = \"file\";\n// Backticks, not quotes. These two were written with double quotes, which makes\n// them the *literal text* `fileType:${string}` rather than a template literal\n// type — so `fileType:image/png`, the only way anyone would ever write the rule,\n// did not typecheck, while the runtime handled it perfectly well.\ntype FileTypeType = `fileType:${string}`;\ntype FileSizeType = `fileSize:${string}`;\ntype SchemaKey =\n | StringType\n | NumberType\n | BooleanType\n | MinLengthType\n | MaxLengthType\n | GreaterOrEqualType\n | LessOrEqualType\n | RequiredType\n | FileType\n | FileTypeType\n | FileSizeType;\n\nexport type Schema<T extends Body> = Record<keyof T, Partial<Record<SchemaKey, string>>>;\n\nexport type Body = Record<string, any>;\nexport type HttpRequestKind = \"view\" | \"api\";\n\nexport class HttpRequest<T extends Body = Record<string, never>, Params = Record<string, never>> {\n kind: HttpRequestKind;\n rawRequest: Request;\n headers: Omit<Headers, \"set\" | \"delete\">;\n cookies: Omit<Map<string, string>, \"set\" | \"delete\">;\n search: Input<any>;\n schema: any = {};\n routePath: string;\n params: Params;\n /**\n * The `route.domains` group this request was routed by — `domain.params`\n * holds a `:param` subdomain's value, or what `custom.resolve` returned for\n * a custom domain. `null` when the app declares no `route.domains`.\n *\n * Kept apart from `params`, which are the path's alone.\n */\n domain: ResolvedDomain | null;\n\n constructor(req?: Request, params?: any, kind?: HttpRequestKind, routePath?: string) {\n if (!req) {\n const _req = RequestContext.getStore().req;\n this.params = _req.params as any;\n this.rawRequest = _req.rawRequest;\n this.kind = _req.kind;\n this.routePath = _req.routePath;\n this.domain = _req.domain ?? null;\n } else {\n this.params = params;\n this.rawRequest = req;\n this.routePath = routePath;\n this.kind = kind ?? \"api\";\n this.domain = requestDomain(req);\n }\n\n this.headers = this.rawRequest.headers;\n\n const cookies = parseCookieHeader(this.rawRequest.headers.get(\"Cookie\"));\n const url = new URL(this.rawRequest.url);\n const map = new Map<string, string | string[]>();\n for (const [key, value] of url.searchParams) {\n if (map.has(key)) {\n const currentValue = map.get(key);\n if (Array.isArray(currentValue)) {\n currentValue.push(value);\n map.set(key, currentValue);\n } else {\n map.set(key, [currentValue, value]);\n }\n } else {\n map.set(key, value);\n }\n }\n const _params = Object.fromEntries(map.entries());\n this.search = new Input(_params);\n this.cookies = cookies;\n }\n\n locale() {\n return RequestContext.getStore().locale;\n }\n\n ctx() {\n return RequestContext.getStore();\n }\n\n /**\n * Whether the framework dispatched this request in-process for a model — a\n * tool call — rather than a client sending it. Readable in `onRequestStart`,\n * in middleware and in the handler alike.\n *\n * No header or cookie can make this true; see `http/modelOriginated.ts`.\n */\n isModelOriginated(): boolean {\n return isModelOriginated(this.rawRequest);\n }\n\n /**\n * The parsed `Range` header, or `null` when absent or unusable. Pass it to\n * `FileStorage.read(name, { range })` to range explicitly; inside a\n * `this.stream()` route `read()` already picks it up on its own.\n */\n range() {\n return parseRangeHeader(this.rawRequest.headers.get(\"Range\"));\n }\n\n refine(_input: any): any {\n return {};\n }\n\n private async parseBody() {\n let inputMap = new Input<T>({} as T);\n if (this.rawRequest.headers.get(\"Content-Type\") === \"application/json\") {\n const body = await this.rawRequest.json();\n inputMap = new Input<T>(body as T);\n }\n if (this.rawRequest.headers.get(\"Content-Type\") === \"application/x-www-form-urlencoded\") {\n const body = (await this.rawRequest.formData()) as any; // TODO: fix type\n inputMap = new Input<T>(body as T);\n }\n\n if (this.rawRequest.headers.get(\"Content-Type\")?.startsWith(\"multipart/form-data\")) {\n const body = (await this.rawRequest.formData()) as any; // TODO: fix type\n const _inputMap = new Map<string, any>();\n for (const [key, value] of body.entries()) {\n if (_inputMap.has(key)) {\n const currentValue = _inputMap.get(key);\n if (Array.isArray(currentValue)) {\n currentValue.push(value);\n _inputMap.set(key, currentValue);\n } else {\n _inputMap.set(key, [currentValue, value] as any);\n }\n } else {\n _inputMap.set(key, value as T[keyof T]);\n }\n }\n inputMap = new Input<T>(Object.fromEntries(_inputMap.entries()) as T);\n }\n return inputMap;\n }\n\n private validateInput(input: Input<T>) {\n const errors: Record<string, string[]> = {};\n for (const [key, rules] of Object.entries(this.schema)) {\n for (const [rule, message] of Object.entries(rules)) {\n const validator = validate(rule);\n\n let _message = message;\n let _isValid = false;\n if (typeof message === \"function\") {\n _message = message(input.get(key));\n _isValid = typeof _message === \"undefined\";\n } else {\n _isValid = validator(input.get(key));\n }\n\n if (_isValid) {\n continue;\n }\n\n if (!input.get(key) && !Object.keys(rules).includes(\"required\")) {\n continue;\n }\n\n if (!errors[key]) {\n errors[key] = [];\n }\n\n if (rule === \"required\") {\n errors[key] = [String(_message)];\n continue;\n }\n\n errors[key].push(String(_message));\n }\n }\n\n for (const [key, value] of Object.entries(this.refine(input.toJSON()) ?? {})) {\n if (!errors[key]) {\n errors[key] = [];\n }\n errors[key] = [...(errors[key] ?? []), value as string];\n }\n\n if (Object.keys(errors).length > 0) {\n throw new ValidationError(errors);\n }\n\n return input;\n }\n\n async input(): Promise<Input<T>> {\n return this.validateInput(await this.parseBody());\n }\n\n async safeInput(): Promise<{\n isValid: boolean;\n errors: Record<string, string[]>;\n input: Input<T>;\n }> {\n const input = await this.parseBody();\n try {\n this.validateInput(input);\n return {\n isValid: true,\n errors: {},\n input,\n };\n } catch (err) {\n if (!(err instanceof ValidationError)) {\n throw err;\n }\n return {\n isValid: false,\n errors: err.errors,\n input,\n };\n }\n }\n}\n",
12
+ "// Type-only: `services/router` imports from `http`, so a runtime import here\n// would be circular.\nimport type { ResolvedDomain } from \"../services/router/DomainResolver\";\n\n// Keyed by the raw Request, so the domain `App.fetch` resolved reaches the\n// dispatcher, and every `HttpRequest` built over that Request, without a\n// second AsyncLocalStorage that a streaming render would step outside of.\nconst domains = new WeakMap<Request, ResolvedDomain>();\n\nexport function setRequestDomain(req: Request, domain: ResolvedDomain) {\n domains.set(req, domain);\n}\n\n/** The host group `req` was routed by, or `null` when `route.domains` is not configured. */\nexport function requestDomain(req: Request): ResolvedDomain | null {\n return domains.get(req) ?? null;\n}\n\n// Headers meant for this app alone — `route.domains.trustProxy.secret` — that\n// a `proxy()` route must not forward upstream with the rest of the client's.\nconst withheld = new WeakMap<Request, string[]>();\n\nexport function withholdFromUpstream(req: Request, header: string) {\n const headers = withheld.get(req) ?? [];\n if (!headers.includes(header)) {\n withheld.set(req, [...headers, header]);\n }\n}\n\n/** The lowercased header names a `proxy()` route drops from `req` before forwarding it. */\nexport function withheldFromUpstream(req: Request): readonly string[] {\n return withheld.get(req) ?? [];\n}\n",
13
+ "import { parseCookieHeader } from \"./getCookies\";\nimport { isModelOriginated } from \"./modelOriginated\";\nimport { parseRangeHeader } from \"./range\";\nimport { RequestContext } from \"./requestContext\";\nimport { requestDomain } from \"./requestDomain\";\nimport { ValidationError } from \"./Router\";\nimport { InvalidValidationRuleError, validate } from \"./validate\";\nimport type { ResolvedDomain } from \"../services/router/DomainResolver\";\n\nclass Input<T> {\n constructor(private data: T) {}\n\n public get<K extends keyof T>(key: K): T[K] {\n return this.data[key];\n }\n\n public has(key: keyof T) {\n return this.data[key] !== undefined;\n }\n\n public toJSON(): T {\n return this.data;\n }\n}\n\ntype StringType = \"string\";\ntype NumberType = \"number\";\ntype BooleanType = \"boolean\";\ntype MinLengthType = `min:${number}`;\ntype MaxLengthType = `max:${number}`;\n/** Magnitude, for numbers — see `validate`'s `min` case for why these are not\n * the same rule wearing different names. */\ntype GreaterOrEqualType = `gte:${number}`;\ntype LessOrEqualType = `lte:${number}`;\ntype RequiredType = \"required\";\ntype FileType = \"file\";\n// Backticks, not quotes. These two were written with double quotes, which makes\n// them the *literal text* `fileType:${string}` rather than a template literal\n// type — so `fileType:image/png`, the only way anyone would ever write the rule,\n// did not typecheck, while the runtime handled it perfectly well.\ntype FileTypeType = `fileType:${string}`;\ntype FileSizeType = `fileSize:${string}`;\ntype EmailType = \"email\";\ntype PasswordType = \"password\";\n/** One entry per rule in `validate`'s `RULES`; `validate.test-d.ts` holds them\n * to each other, so an offered rule cannot go unimplemented again (#609). */\nexport type SchemaKey =\n | StringType\n | NumberType\n | BooleanType\n | MinLengthType\n | MaxLengthType\n | GreaterOrEqualType\n | LessOrEqualType\n | RequiredType\n | FileType\n | FileTypeType\n | FileSizeType\n | EmailType\n | PasswordType;\n\nexport type Schema<T extends Body> = Record<keyof T, Partial<Record<SchemaKey, string>>>;\n\nexport type Body = Record<string, any>;\nexport type HttpRequestKind = \"view\" | \"api\";\n\nexport class HttpRequest<T extends Body = Record<string, never>, Params = Record<string, never>> {\n kind: HttpRequestKind;\n rawRequest: Request;\n headers: Omit<Headers, \"set\" | \"delete\">;\n cookies: Omit<Map<string, string>, \"set\" | \"delete\">;\n search: Input<any>;\n schema: any = {};\n routePath: string;\n params: Params;\n /**\n * The `route.domains` group this request was routed by — `domain.params`\n * holds a `:param` subdomain's value, or what `custom.resolve` returned for\n * a custom domain. `null` when the app declares no `route.domains`.\n *\n * Kept apart from `params`, which are the path's alone.\n */\n domain: ResolvedDomain | null;\n\n constructor(req?: Request, params?: any, kind?: HttpRequestKind, routePath?: string) {\n if (!req) {\n const _req = RequestContext.getStore().req;\n this.params = _req.params as any;\n this.rawRequest = _req.rawRequest;\n this.kind = _req.kind;\n this.routePath = _req.routePath;\n this.domain = _req.domain ?? null;\n } else {\n this.params = params;\n this.rawRequest = req;\n this.routePath = routePath;\n this.kind = kind ?? \"api\";\n this.domain = requestDomain(req);\n }\n\n this.headers = this.rawRequest.headers;\n\n const cookies = parseCookieHeader(this.rawRequest.headers.get(\"Cookie\"));\n const url = new URL(this.rawRequest.url);\n const map = new Map<string, string | string[]>();\n for (const [key, value] of url.searchParams) {\n if (map.has(key)) {\n const currentValue = map.get(key);\n if (Array.isArray(currentValue)) {\n currentValue.push(value);\n map.set(key, currentValue);\n } else {\n map.set(key, [currentValue, value]);\n }\n } else {\n map.set(key, value);\n }\n }\n const _params = Object.fromEntries(map.entries());\n this.search = new Input(_params);\n this.cookies = cookies;\n }\n\n locale() {\n return RequestContext.getStore().locale;\n }\n\n ctx() {\n return RequestContext.getStore();\n }\n\n /**\n * Whether the framework dispatched this request in-process for a model — a\n * tool call — rather than a client sending it. Readable in `onRequestStart`,\n * in middleware and in the handler alike.\n *\n * No header or cookie can make this true; see `http/modelOriginated.ts`.\n */\n isModelOriginated(): boolean {\n return isModelOriginated(this.rawRequest);\n }\n\n /**\n * The parsed `Range` header, or `null` when absent or unusable. Pass it to\n * `FileStorage.read(name, { range })` to range explicitly; inside a\n * `this.stream()` route `read()` already picks it up on its own.\n */\n range() {\n return parseRangeHeader(this.rawRequest.headers.get(\"Range\"));\n }\n\n refine(_input: any): any {\n return {};\n }\n\n private async parseBody() {\n let inputMap = new Input<T>({} as T);\n if (this.rawRequest.headers.get(\"Content-Type\") === \"application/json\") {\n const body = await this.rawRequest.json();\n inputMap = new Input<T>(body as T);\n }\n if (this.rawRequest.headers.get(\"Content-Type\") === \"application/x-www-form-urlencoded\") {\n const body = (await this.rawRequest.formData()) as any; // TODO: fix type\n inputMap = new Input<T>(body as T);\n }\n\n if (this.rawRequest.headers.get(\"Content-Type\")?.startsWith(\"multipart/form-data\")) {\n const body = (await this.rawRequest.formData()) as any; // TODO: fix type\n const _inputMap = new Map<string, any>();\n for (const [key, value] of body.entries()) {\n if (_inputMap.has(key)) {\n const currentValue = _inputMap.get(key);\n if (Array.isArray(currentValue)) {\n currentValue.push(value);\n _inputMap.set(key, currentValue);\n } else {\n _inputMap.set(key, [currentValue, value] as any);\n }\n } else {\n _inputMap.set(key, value as T[keyof T]);\n }\n }\n inputMap = new Input<T>(Object.fromEntries(_inputMap.entries()) as T);\n }\n return inputMap;\n }\n\n private validateInput(input: Input<T>) {\n const errors: Record<string, string[]> = {};\n const fields = Object.entries(this.schema as Record<string, Record<string, unknown>>).map(\n ([key, rules]) => ({\n key,\n // Every rule is looked up before any value is checked, so a schema that\n // names an unknown rule throws on every request, whatever the body —\n // not only on the ones whose earlier rules happened to pass. A function\n // is its own validator: its key is a label, and is not looked up.\n rules: Object.entries(rules).map(([rule, message]) => ({\n rule,\n message,\n check: typeof message === \"function\" ? null : this.ruleFor(key, rule),\n })),\n }),\n );\n\n for (const { key, rules } of fields) {\n const value = input.get(key as keyof T);\n const isRequired = rules.some(({ rule }) => rule === \"required\");\n // Absent: skipped unless `required`. `0` and `false` are values, and are\n // checked like any other — skipping every falsy value let `0` and `false` through a\n // `string` rule and `0` through a `boolean` one.\n const isAbsent = value === undefined || value === null || (value as unknown) === \"\";\n const messages: string[] = [];\n\n for (const { rule, message, check } of rules) {\n let _message = message;\n let _isValid = false;\n if (typeof message === \"function\") {\n _message = message(value);\n _isValid = typeof _message === \"undefined\";\n } else {\n _isValid = check!(value);\n }\n\n if (_isValid) {\n continue;\n }\n\n if (isAbsent && !isRequired) {\n continue;\n }\n\n if (rule === \"required\") {\n // A missing field reports that it is missing, and only that — not\n // also that `undefined` is not a string. Wherever `required` sits\n // among the field's rules.\n messages.splice(0, messages.length, String(_message));\n break;\n }\n\n messages.push(String(_message));\n }\n\n if (messages.length > 0) {\n errors[key] = messages;\n }\n }\n\n for (const [key, value] of Object.entries(this.refine(input.toJSON()) ?? {})) {\n if (!errors[key]) {\n errors[key] = [];\n }\n errors[key] = [...(errors[key] ?? []), value as string];\n }\n\n if (Object.keys(errors).length > 0) {\n throw new ValidationError(errors);\n }\n\n return input;\n }\n\n private ruleFor(key: string, rule: string) {\n try {\n return validate(rule);\n } catch (err) {\n if (err instanceof InvalidValidationRuleError) {\n throw new InvalidValidationRuleError(\n `${this.constructor.name}.schema.${key}: ${err.message}`,\n );\n }\n throw err;\n }\n }\n\n async input(): Promise<Input<T>> {\n return this.validateInput(await this.parseBody());\n }\n\n async safeInput(): Promise<{\n isValid: boolean;\n errors: Record<string, string[]>;\n input: Input<T>;\n }> {\n const input = await this.parseBody();\n try {\n this.validateInput(input);\n return {\n isValid: true,\n errors: {},\n input,\n };\n } catch (err) {\n if (!(err instanceof ValidationError)) {\n throw err;\n }\n return {\n isValid: false,\n errors: err.errors,\n input,\n };\n }\n }\n}\n",
14
14
  "import { RequestBreakerError } from \"./Error\";\nimport { formatUnsatisfiedContentRange } from \"./range\";\n\nexport class AuthorizationError extends RequestBreakerError {\n private error: string;\n constructor(error: string = \"Not authorized\") {\n super(error);\n this.name = \"AuthorizationError\";\n this.error = error;\n this.payload = {\n api: {\n status: 401,\n data: { error: this.error },\n },\n view: {},\n };\n }\n}\n\n/**\n * A signed-in user who is not allowed to do this. Thrown by `Auth.guard()`.\n *\n * 403, not 401: a 401 tells the client to re-authenticate, so a client that\n * sends a 401 to the sign-in page would loop a signed-in user without the role\n * straight back to where they started. A request with no user at all is\n * `AuthenticationError`, which stays 401.\n */\nexport class InsufficientPermissionsError extends RequestBreakerError {\n /**\n * The status of `payload.api`, which answers API routes and `.json` view\n * navigations alike. Before 0.63 it was 401, and a shipped native client may\n * still branch on that — it cannot be rolled forward in the same deploy as\n * the server. Such an app sets this back to 401 once at boot, and removes the\n * line when its clients handle 403:\n *\n * ```ts\n * InsufficientPermissionsError.apiStatus = 401;\n * ```\n *\n * A full page load answers 403 either way; before 0.63 it fell through to\n * the view dispatcher's 400 default, which no client could have relied on.\n */\n static apiStatus: 401 | 403 = 403;\n\n private error: string;\n constructor(error: string = \"Insufficient permissions\") {\n super(error);\n this.name = \"InsufficientPermissionsError\";\n this.error = error;\n this.payload = {\n api: {\n status: InsufficientPermissionsError.apiStatus,\n data: { error: this.error },\n },\n // Without a status a view request would fall through to the\n // dispatcher's 400 default.\n view: { status: 403 },\n };\n }\n}\n\n/**\n * A `Range` that cannot be satisfied against the object's current size.\n *\n * Extends `RequestBreakerError` so a bare `FileStorage.read()` inside an\n * ordinary route still produces a correct 416 — and, importantly, so it does\n * not trip `onRequestFail`. A 416 is the client's header being wrong about the\n * object, not a server failure.\n */\nexport class RangeNotSatisfiableError extends RequestBreakerError {\n constructor(public total: number) {\n super(\"Range not satisfiable\");\n this.name = \"RangeNotSatisfiableError\";\n this.payload = {\n api: {\n status: 416,\n data: { error: { message: \"Range not satisfiable\" } },\n headers: {\n \"Content-Range\": formatUnsatisfiedContentRange(total),\n \"Accept-Ranges\": \"bytes\",\n // Decided by the client's own Range against the object's current\n // length, so it must never be replayed from a cache to a request\n // that did not ask for that window.\n \"Cache-Control\": \"no-store\",\n },\n },\n view: {},\n };\n }\n}\n\nexport class FileNotFoundError extends RequestBreakerError {\n constructor(public fileName: string) {\n super(\"File not found\");\n this.name = \"FileNotFoundError\";\n this.payload = {\n api: {\n status: 404,\n data: { error: { message: \"Not found\" } },\n headers: { \"Cache-Control\": \"no-store\" },\n },\n view: {},\n };\n }\n}\n\n/**\n * No signed-in user. A 401 to an API client; a view request is sent to\n * `redirectTo` instead — a 302 for a page load, and a `Redirect` directive for\n * a `.json` navigation, so the client router follows it rather than leaving\n * the previous page on screen.\n *\n * `redirectTo` is the whole location, intended-URL parameter included.\n * `AuthenticationMiddleware` and `Auth.user()` build it from the request and\n * the `auth.signInPath` config; code throwing this by hand can pass its own.\n */\nexport class AuthenticationError extends RequestBreakerError {\n constructor(options: { redirectTo?: string } = {}) {\n super(\"Authentication error\");\n this.name = \"AuthenticationError\";\n const location = options.redirectTo ?? \"/auth/sign-in\";\n this.payload = {\n api: {\n status: 401,\n data: { error: \"Authentication error\" },\n },\n viewData: {\n status: 200,\n data: {},\n // A refusal is per-visitor, and this one answers 200 so that\n // `loadRoutePayload` reads it at all — which makes it exactly the\n // shape a shared cache would happily store and replay to the next\n // visitor. The `view` payload below says the same thing.\n headers: {\n \"Cache-Control\": \"private, no-cache, no-store, max-age=0, must-revalidate\",\n },\n directive: { kind: \"Redirect\", path: location },\n },\n view: {\n status: 302,\n headers: {\n \"Cache-Control\":\n \"private, no-cache, no-store, max-age=0, must-revalidate\",\n Location: location,\n },\n },\n };\n }\n}\n",
15
15
  "import type { ServiceToken } from \"../container/Container\";\nimport { app } from \"../foundation/app\";\n\n/**\n * Base for the facades that front a container binding. A subclass names the\n * service it proxies with `getFacadeAccessor()` and reaches the live instance\n * through `this.getFacadeRoot()`, so the binding is resolved per call against\n * the Application for the current async context — never captured at module\n * load, which is what makes a facade swappable in tests.\n *\n * Two deliberate divergences from `Illuminate\\Support\\Facades\\Facade`:\n *\n * 1. No `__callStatic`. TypeScript has no typed equivalent, and a Proxy would\n * erase the very signatures that make these facades worth having. Subclasses\n * therefore declare explicit statics that forward to `getFacadeRoot()`.\n *\n * 2. `getFacadeAccessor()` is public, not protected. `getFacadeRoot()` types\n * its `this` structurally in order to infer the service type from the\n * accessor's return, and a protected static is not structurally assignable\n * to that.\n *\n * Facades that resolve nothing from the container — Cookie, Redirect, Url,\n * Meta — do not extend this class.\n */\nexport abstract class Facade {\n static getFacadeAccessor(): ServiceToken<any> {\n throw new Error(\n `Facade [${this.name}] does not implement getFacadeAccessor().`,\n );\n }\n\n static getFacadeRoot<T>(this: {\n getFacadeAccessor(): ServiceToken<T>;\n }): T {\n return app(this.getFacadeAccessor());\n }\n}\n",
16
16
  "import { FileNotFoundError } from \"../../../http/errors\";\nimport type {\n DeleteFileParams,\n IFileStorageDriver,\n PutFileOptions,\n PutFileParams,\n ReadFileParams,\n ReadResult,\n} from \"./types\";\n\nexport abstract class FileStorageDriver implements IFileStorageDriver {\n abstract fetch(params: ReadFileParams | string): Promise<Response>;\n abstract put(\n params: PutFileParams | Blob,\n options?: PutFileOptions,\n ): Promise<string>;\n abstract list(folder: string): Promise<any>;\n\n /**\n * Removes an object. A missing object is not an error: the promise resolves,\n * so cleanup can run twice, or after a write that never landed.\n *\n * Not abstract, for the same reason `read()` is not: a custom driver written\n * before `delete()` existed keeps compiling. It must not keep *working* as if\n * it deleted, though — silently resolving here is exactly the bug `delete()`\n * used to have (#608) — so the default throws and names the driver.\n */\n async delete(_params: DeleteFileParams | string): Promise<void> {\n throw new Error(\n `${this.constructor.name} does not implement delete(). Override it to remove objects from this backend.`,\n );\n }\n\n /**\n * Default `read()` for drivers that only implement `fetch()`.\n *\n * Deliberately not abstract: every driver written before `read()` existed\n * keeps compiling and gains working range support for free. It is not\n * *efficient* though — to serve a range it buffers the whole object so the\n * framework can slice it, which saves no bandwidth from the backend. Any\n * driver whose backend can range natively should override this.\n */\n async read(input: ReadFileParams | string): Promise<ReadResult> {\n const params = typeof input === \"string\" ? { name: input } : input;\n const response = await this.fetch({\n name: params.name,\n bucket: params.bucket,\n });\n\n if (!response.ok) {\n throw new FileNotFoundError(params.name);\n }\n\n const type =\n response.headers.get(\"Content-Type\") ?? \"application/octet-stream\";\n const etag = response.headers.get(\"ETag\") ?? undefined;\n const lastModifiedHeader = response.headers.get(\"Last-Modified\");\n const lastModified = lastModifiedHeader\n ? new Date(lastModifiedHeader)\n : undefined;\n\n if (params.range) {\n const blob = await response.blob();\n return {\n body: blob,\n start: 0,\n end: blob.size - 1,\n total: blob.size,\n // The range was not applied by the backend. Reporting `false` hands\n // the slicing to `createStreamResponse`, which has the total in hand.\n partial: false,\n type,\n etag,\n lastModified,\n name: params.name,\n };\n }\n\n const contentLength = Number(response.headers.get(\"Content-Length\"));\n const total = Number.isFinite(contentLength) ? contentLength : 0;\n\n return {\n body: response.body,\n start: 0,\n end: total - 1,\n total,\n partial: false,\n type,\n etag,\n lastModified,\n name: params.name,\n };\n }\n\n /**\n * Total size of an object. Used to resolve suffix ranges on backends without\n * native suffix support, and to report the total on a 416. Override with a\n * HEAD-style request wherever one is available.\n */\n async size(params: ReadFileParams | string): Promise<number> {\n const name = typeof params === \"string\" ? params : params.name;\n const bucket = typeof params === \"string\" ? undefined : params.bucket;\n const response = await this.fetch({ name, bucket });\n if (!response.ok) {\n throw new FileNotFoundError(name);\n }\n const contentLength = Number(response.headers.get(\"Content-Length\"));\n if (Number.isFinite(contentLength)) {\n await response.body?.cancel();\n return contentLength;\n }\n return (await response.blob()).size;\n }\n}\n",
@@ -20,7 +20,7 @@
20
20
  "//@ts-ignore - type-only; the module itself is loaded on first use by `metadata()`.\nimport type sharp from \"sharp\";\n\nimport { Buffer } from \"node:buffer\";\nimport { loadSharp } from \"../support/sharp\";\nimport type { Prettify } from \"../utils/type\";\n\nimport { RequestContext } from \"../http/requestContext\";\nimport type { ByteRange } from \"../http/range\";\nimport type {\n DeleteFileParams,\n PutFileOptions,\n PutFileParams,\n ReadFileParams,\n ReadResult,\n} from \"../services/file-storage/drivers/types\";\nimport { FilesystemManager } from \"../services/file-storage/FilesystemManager\";\nimport { Facade } from \"./Facade\";\n\ntype Metadata = Prettify<sharp.Metadata>;\n\nexport class Storage extends Facade {\n static getFacadeAccessor() {\n return FilesystemManager;\n }\n\n /**\n * Stores a file and returns its object name. Pass `{ signal }` to cancel the\n * upload, e.g. with the incoming request's signal or `AbortSignal.timeout()`.\n */\n static async put(params: PutFileParams | Blob, options: PutFileOptions = {}) {\n return this.getFacadeRoot().driver.put(params, options);\n }\n\n static async metadata(obj: Blob | File): Promise<Partial<Metadata>> {\n const buffer = Buffer.from(await obj.arrayBuffer());\n // Outside the catch: the empty object below means \"this blob is not an\n // image sharp can read\", and a missing `sharp` install must not be able to\n // hide behind it.\n const sharp = await loadSharp(\"Storage.metadata()\");\n try {\n return await sharp(buffer).metadata();\n } catch {\n return {};\n }\n }\n\n static async fetch(params: ReadFileParams | string) {\n return this.getFacadeRoot().driver.fetch(params);\n }\n\n /**\n * Reads an object as bytes plus metadata, pushing any byte range down to the\n * storage backend so a seek transfers one window rather than the whole file.\n *\n * The range is resolved in this order: an explicit `options.range`, then a\n * `range` on `params`, then the in-flight request's `Range` header when this\n * is called inside a `this.stream()` route. Pass `{ range: null }` to force a\n * full read inside a stream route.\n */\n static async read(\n params: ReadFileParams | string,\n options: { range?: ByteRange | null } = {},\n ): Promise<ReadResult> {\n const base: ReadFileParams =\n typeof params === \"string\" ? { name: params } : { ...params };\n\n const range =\n \"range\" in options\n ? (options.range ?? null)\n : base.range !== undefined\n ? base.range\n : (RequestContext.getStore()?.rangeRequest ?? null);\n\n return this.getFacadeRoot().driver.read({\n ...base,\n range,\n });\n }\n static list(folder: string) {\n return this.getFacadeRoot().driver.list(folder);\n }\n\n /**\n * Removes a stored object. Deleting one that does not exist resolves without\n * throwing, so a cleanup path can retry safely.\n */\n static async delete(params: DeleteFileParams | string): Promise<void> {\n return this.getFacadeRoot().driver.delete(params);\n }\n}\n",
21
21
  "// @ts-ignore - `sharp` is a peer dependency; only its types are wanted here.\nimport type sharpNamespace from \"sharp\";\n\n/**\n * `sharp`, imported on first use rather than at module load.\n *\n * Three modules need it — the `Sharp` optimization driver, the `Storage` facade\n * and the OG-image branch of `ViewRouteDispatcher` — and all three are reachable\n * from the `gemi/services` and `gemi/facades` barrels, which are also the only\n * door an application has to `CronJob`, `Job`, `DB` and `Lang`. A static import\n * made every one of those imports load a native binary (#403).\n *\n * `sharp` is the only one of the four that can be genuinely absent — it is a\n * peer dependency, so an install can skip its platform binary — which is why\n * the failure gets a message naming the caller rather than a bare resolution\n * error. `usedBy` is that name, written as the caller reads in a stack trace.\n *\n * No memo: the module registry already caches a resolved `import()`, and\n * caching the *failure* would make every later call report the first call's\n * stack instead of its own.\n */\nexport async function loadSharp(usedBy: string): Promise<typeof sharpNamespace> {\n try {\n // @ts-ignore - peer dependency, resolved out of the application's own tree\n return (await import(\"sharp\")).default;\n } catch (error) {\n throw new Error(\n `${usedBy} requires the 'sharp' package. Install it with \\`bun add sharp\\`.`,\n { cause: error },\n );\n }\n}\n"
22
22
  ],
23
- "mappings": ";sLAEO,AAAM,LAAW,CACf,MAAO,aAEd,WAAW,EAAG,EAChB,CAIO,MAAe,UAA2B,CAA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