gemi 0.193.0 → 0.194.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.
- package/dist/ai/index.js +2 -2
- package/dist/ai/index.js.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/auth/AuthController.d.ts.map +1 -1
- package/dist/auth/AuthServiceProvider.d.ts +4 -1
- package/dist/auth/AuthServiceProvider.d.ts.map +1 -1
- package/dist/auth/config.d.ts +10 -0
- package/dist/auth/config.d.ts.map +1 -1
- package/dist/auth/fixedCode.d.ts +16 -0
- package/dist/auth/fixedCode.d.ts.map +1 -0
- package/dist/auth/isFixedSignInCode.d.ts +21 -0
- package/dist/auth/isFixedSignInCode.d.ts.map +1 -0
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-9hmm8acy.js → chunk-03q4j7wa.js} +1 -1
- package/dist/{chunk-tvsjq0my.js → chunk-07zfrfbg.js} +2 -2
- package/dist/{chunk-tvsjq0my.js.map → chunk-07zfrfbg.js.map} +1 -1
- package/dist/{chunk-m37vvh99.js → chunk-08m9egzx.js} +2 -2
- package/dist/{chunk-m37vvh99.js.map → chunk-08m9egzx.js.map} +1 -1
- package/dist/{chunk-0mb77yd2.js → chunk-0xssrbar.js} +2 -2
- package/dist/{chunk-0mb77yd2.js.map → chunk-0xssrbar.js.map} +1 -1
- package/dist/{chunk-vr48swd0.js → chunk-1705yamg.js} +2 -2
- package/dist/{chunk-vr48swd0.js.map → chunk-1705yamg.js.map} +1 -1
- package/dist/{chunk-tngf3h1g.js → chunk-1ghbn9jg.js} +2 -2
- package/dist/{chunk-tngf3h1g.js.map → chunk-1ghbn9jg.js.map} +1 -1
- package/dist/chunk-1m7kqf2t.js +117 -0
- package/dist/{chunk-8zeky0fj.js.map → chunk-1m7kqf2t.js.map} +6 -5
- package/dist/{chunk-ejc0mbe3.js → chunk-1x23scpn.js} +2 -2
- package/dist/{chunk-ejc0mbe3.js.map → chunk-1x23scpn.js.map} +1 -1
- package/dist/{chunk-7bbtre2j.js → chunk-1yhvqthv.js} +2 -2
- package/dist/{chunk-7bbtre2j.js.map → chunk-1yhvqthv.js.map} +1 -1
- package/dist/{chunk-xsx69765.js → chunk-228w21t6.js} +2 -2
- package/dist/{chunk-xsx69765.js.map → chunk-228w21t6.js.map} +1 -1
- package/dist/{chunk-thq8tc9x.js → chunk-2485bwzs.js} +3 -3
- package/dist/{chunk-thq8tc9x.js.map → chunk-2485bwzs.js.map} +1 -1
- package/dist/{chunk-7ynahcy6.js → chunk-28fz99pn.js} +2 -2
- package/dist/{chunk-7ynahcy6.js.map → chunk-28fz99pn.js.map} +1 -1
- package/dist/{chunk-zcrhagx5.js → chunk-28macaes.js} +2 -2
- package/dist/{chunk-zcrhagx5.js.map → chunk-28macaes.js.map} +1 -1
- package/dist/{chunk-y67rmd3y.js → chunk-2g2fsr71.js} +2 -2
- package/dist/{chunk-y67rmd3y.js.map → chunk-2g2fsr71.js.map} +1 -1
- package/dist/{chunk-p00rd4ja.js → chunk-2yzv5v3m.js} +2 -2
- package/dist/{chunk-p00rd4ja.js.map → chunk-2yzv5v3m.js.map} +1 -1
- package/dist/{chunk-t86nc1jd.js → chunk-3fcd8a47.js} +2 -2
- package/dist/{chunk-t86nc1jd.js.map → chunk-3fcd8a47.js.map} +1 -1
- package/dist/{chunk-24jgzc8y.js → chunk-3svm89z4.js} +2 -2
- package/dist/{chunk-24jgzc8y.js.map → chunk-3svm89z4.js.map} +1 -1
- package/dist/{chunk-f02anz24.js → chunk-5bfrr8x5.js} +2 -2
- package/dist/{chunk-f02anz24.js.map → chunk-5bfrr8x5.js.map} +1 -1
- package/dist/{chunk-bd14zwmj.js → chunk-5nkg3rmw.js} +2 -2
- package/dist/{chunk-bd14zwmj.js.map → chunk-5nkg3rmw.js.map} +1 -1
- package/dist/{chunk-m3180wkp.js → chunk-63dh2zt4.js} +2 -2
- package/dist/{chunk-m3180wkp.js.map → chunk-63dh2zt4.js.map} +1 -1
- package/dist/{chunk-17mdszc3.js → chunk-6m9qrs6d.js} +2 -2
- package/dist/{chunk-17mdszc3.js.map → chunk-6m9qrs6d.js.map} +1 -1
- package/dist/{chunk-hwq0kk1d.js → chunk-7t60d5qy.js} +1 -1
- package/dist/{chunk-ccx7rt7y.js → chunk-8e17k7ht.js} +2 -2
- package/dist/{chunk-ccx7rt7y.js.map → chunk-8e17k7ht.js.map} +1 -1
- package/dist/{chunk-z1aeh05w.js → chunk-8fdk8bfd.js} +3 -3
- package/dist/{chunk-z1aeh05w.js.map → chunk-8fdk8bfd.js.map} +1 -1
- package/dist/{chunk-9m04tdzh.js → chunk-9hjxpdjt.js} +1 -1
- package/dist/{chunk-tt5qk0xt.js → chunk-a02bmp0q.js} +2 -2
- package/dist/{chunk-tt5qk0xt.js.map → chunk-a02bmp0q.js.map} +1 -1
- package/dist/{chunk-fryj3asn.js → chunk-aycfrzh1.js} +2 -2
- package/dist/{chunk-fryj3asn.js.map → chunk-aycfrzh1.js.map} +1 -1
- package/dist/{chunk-m4r8btey.js → chunk-b6zqjyn1.js} +2 -2
- package/dist/{chunk-m4r8btey.js.map → chunk-b6zqjyn1.js.map} +1 -1
- package/dist/{chunk-qfb6r3cq.js → chunk-bc7hr358.js} +3 -3
- package/dist/{chunk-qfb6r3cq.js.map → chunk-bc7hr358.js.map} +1 -1
- package/dist/{chunk-ce73s4kh.js → chunk-beckfwe9.js} +2 -2
- package/dist/{chunk-ce73s4kh.js.map → chunk-beckfwe9.js.map} +1 -1
- package/dist/chunk-c6khfprk.js +10 -0
- package/dist/{chunk-7k43y71n.js.map → chunk-c6khfprk.js.map} +3 -3
- package/dist/{chunk-rf9c6e49.js → chunk-dfmxvp8p.js} +2 -2
- package/dist/{chunk-rf9c6e49.js.map → chunk-dfmxvp8p.js.map} +1 -1
- package/dist/{chunk-z9pq557m.js → chunk-dn20caf2.js} +2 -2
- package/dist/{chunk-z9pq557m.js.map → chunk-dn20caf2.js.map} +1 -1
- package/dist/{chunk-freerpzc.js → chunk-ejktrxp2.js} +1 -1
- package/dist/{chunk-8pfy75y6.js → chunk-ermvtpy9.js} +3 -3
- package/dist/{chunk-8pfy75y6.js.map → chunk-ermvtpy9.js.map} +1 -1
- package/dist/{chunk-bm7z4vj9.js → chunk-f6css3z6.js} +2 -2
- package/dist/{chunk-bm7z4vj9.js.map → chunk-f6css3z6.js.map} +1 -1
- package/dist/{chunk-0m1a636t.js → chunk-fhfkcmkc.js} +2 -2
- package/dist/{chunk-0m1a636t.js.map → chunk-fhfkcmkc.js.map} +1 -1
- package/dist/{chunk-8em2ebj1.js → chunk-ftvc1a0k.js} +2 -2
- package/dist/{chunk-8em2ebj1.js.map → chunk-ftvc1a0k.js.map} +1 -1
- package/dist/{chunk-5zx4e2wa.js → chunk-g02gqhq0.js} +3 -3
- package/dist/{chunk-5zx4e2wa.js.map → chunk-g02gqhq0.js.map} +1 -1
- package/dist/{chunk-j34ektzj.js → chunk-g7h28xcr.js} +2 -2
- package/dist/{chunk-j34ektzj.js.map → chunk-g7h28xcr.js.map} +1 -1
- package/dist/{chunk-xwz5fmwy.js → chunk-geqdq8hp.js} +3 -3
- package/dist/{chunk-xwz5fmwy.js.map → chunk-geqdq8hp.js.map} +1 -1
- package/dist/{chunk-9dfrsj4m.js → chunk-gmcttf0f.js} +2 -2
- package/dist/{chunk-9dfrsj4m.js.map → chunk-gmcttf0f.js.map} +1 -1
- package/dist/chunk-gn90agsv.js +5 -0
- package/dist/{chunk-waq4kj7n.js.map → chunk-gn90agsv.js.map} +1 -1
- package/dist/{chunk-67zz58cw.js → chunk-h9taahxv.js} +2 -2
- package/dist/{chunk-67zz58cw.js.map → chunk-h9taahxv.js.map} +1 -1
- package/dist/{chunk-wa1xmvgr.js → chunk-hmn6pa78.js} +2 -2
- package/dist/{chunk-wa1xmvgr.js.map → chunk-hmn6pa78.js.map} +1 -1
- package/dist/{chunk-jbee3n3p.js → chunk-hswnqn33.js} +2 -2
- package/dist/{chunk-jbee3n3p.js.map → chunk-hswnqn33.js.map} +1 -1
- package/dist/{chunk-6n44t4hn.js → chunk-j49vh5bs.js} +2 -2
- package/dist/{chunk-6n44t4hn.js.map → chunk-j49vh5bs.js.map} +1 -1
- package/dist/{chunk-m0aq07nj.js → chunk-jq1vwj5g.js} +2 -2
- package/dist/{chunk-m0aq07nj.js.map → chunk-jq1vwj5g.js.map} +1 -1
- package/dist/{chunk-h688s2ba.js → chunk-m08p5mre.js} +2 -2
- package/dist/{chunk-h688s2ba.js.map → chunk-m08p5mre.js.map} +1 -1
- package/dist/{chunk-fbxnxze2.js → chunk-m0dfgmbj.js} +1 -1
- package/dist/{chunk-6rmz0mkm.js → chunk-mc8fdh65.js} +2 -2
- package/dist/{chunk-6rmz0mkm.js.map → chunk-mc8fdh65.js.map} +1 -1
- package/dist/{chunk-efgemgbe.js → chunk-mgdrf89p.js} +2 -2
- package/dist/{chunk-efgemgbe.js.map → chunk-mgdrf89p.js.map} +1 -1
- package/dist/{chunk-7zpjdwfq.js → chunk-n914rs58.js} +3 -3
- package/dist/{chunk-7zpjdwfq.js.map → chunk-n914rs58.js.map} +1 -1
- package/dist/{chunk-6frbegay.js → chunk-nk7nmtng.js} +2 -2
- package/dist/{chunk-6frbegay.js.map → chunk-nk7nmtng.js.map} +1 -1
- package/dist/{chunk-c36sbvnz.js → chunk-p2vasd1z.js} +2 -2
- package/dist/{chunk-c36sbvnz.js.map → chunk-p2vasd1z.js.map} +1 -1
- package/dist/{chunk-6wsmdf51.js → chunk-paawtkza.js} +2 -2
- package/dist/{chunk-6wsmdf51.js.map → chunk-paawtkza.js.map} +1 -1
- package/dist/{chunk-0p76bhy2.js → chunk-pg5hm00s.js} +2 -2
- package/dist/{chunk-0p76bhy2.js.map → chunk-pg5hm00s.js.map} +1 -1
- package/dist/{chunk-bhfwp3gz.js → chunk-pmt2jt9b.js} +2 -2
- package/dist/{chunk-bhfwp3gz.js.map → chunk-pmt2jt9b.js.map} +1 -1
- package/dist/{chunk-etzd00a8.js → chunk-pqr01waj.js} +2 -2
- package/dist/{chunk-etzd00a8.js.map → chunk-pqr01waj.js.map} +1 -1
- package/dist/{chunk-z8dxdqzm.js → chunk-q1aaqhnw.js} +2 -2
- package/dist/{chunk-k1c0xd8r.js.map → chunk-q1aaqhnw.js.map} +1 -1
- package/dist/{chunk-mdrsec0r.js → chunk-qg9pyxg7.js} +2 -2
- package/dist/{chunk-mdrsec0r.js.map → chunk-qg9pyxg7.js.map} +1 -1
- package/dist/{chunk-xzz6ps4z.js → chunk-qjwv9xfq.js} +2 -2
- package/dist/{chunk-xzz6ps4z.js.map → chunk-qjwv9xfq.js.map} +1 -1
- package/dist/{chunk-d0khszc9.js → chunk-qrn6ch3t.js} +2 -2
- package/dist/{chunk-d0khszc9.js.map → chunk-qrn6ch3t.js.map} +1 -1
- package/dist/{chunk-67ex6nem.js → chunk-reaty2mv.js} +3 -3
- package/dist/{chunk-67ex6nem.js.map → chunk-reaty2mv.js.map} +1 -1
- package/dist/{chunk-cx3n8qyr.js → chunk-rp6ss7v3.js} +2 -2
- package/dist/{chunk-cx3n8qyr.js.map → chunk-rp6ss7v3.js.map} +1 -1
- package/dist/{chunk-199nvtrj.js → chunk-scmjmsps.js} +3 -3
- package/dist/{chunk-199nvtrj.js.map → chunk-scmjmsps.js.map} +1 -1
- package/dist/{chunk-k8gn0q91.js → chunk-sqqby94y.js} +1 -1
- package/dist/chunk-svtjfmkc.js +24 -0
- package/dist/{chunk-8ysrmyer.js.map → chunk-svtjfmkc.js.map} +3 -3
- package/dist/{chunk-r7vnxqck.js → chunk-tj7z65ba.js} +2 -2
- package/dist/{chunk-r7vnxqck.js.map → chunk-tj7z65ba.js.map} +1 -1
- package/dist/{chunk-z7mbhc68.js → chunk-trqt1kkd.js} +2 -2
- package/dist/{chunk-z7mbhc68.js.map → chunk-trqt1kkd.js.map} +1 -1
- package/dist/{chunk-ryfty6mj.js → chunk-v20fe53s.js} +3 -3
- package/dist/{chunk-ryfty6mj.js.map → chunk-v20fe53s.js.map} +1 -1
- package/dist/{chunk-k1c0xd8r.js → chunk-vgxkt9vd.js} +2 -2
- package/dist/{chunk-z8dxdqzm.js.map → chunk-vgxkt9vd.js.map} +1 -1
- package/dist/{chunk-1mpwzjxa.js → chunk-wgqppqcn.js} +3 -3
- package/dist/{chunk-1mpwzjxa.js.map → chunk-wgqppqcn.js.map} +1 -1
- package/dist/{chunk-4s7st9y4.js → chunk-wvq3c25z.js} +3 -3
- package/dist/{chunk-4s7st9y4.js.map → chunk-wvq3c25z.js.map} +1 -1
- package/dist/{chunk-sqev442x.js → chunk-zzdvdr5a.js} +4 -4
- package/dist/{chunk-sqev442x.js.map → chunk-zzdvdr5a.js.map} +1 -1
- package/dist/chunks/{RealtimeClient-bPI28SVg.js → RealtimeClient-BVQeh_yg.js} +2 -2
- package/dist/chunks/{RealtimeClient-bPI28SVg.js.map → RealtimeClient-BVQeh_yg.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-BstCYMfV.js → ThemeProvider-G2g5Z1ZS.js} +45 -5
- package/dist/chunks/{ThemeProvider-BstCYMfV.js.map → ThemeProvider-G2g5Z1ZS.js.map} +1 -1
- package/dist/chunks/{fetchFileRequest-BD9pg9RL.js → fetchFileRequest-Bzva9J59.js} +2 -2
- package/dist/chunks/{fetchFileRequest-BD9pg9RL.js.map → fetchFileRequest-Bzva9J59.js.map} +1 -1
- package/dist/chunks/{live-DYLCi077.js → live-C2Sck5PO.js} +3 -3
- package/dist/chunks/{live-DYLCi077.js.map → live-C2Sck5PO.js.map} +1 -1
- package/dist/chunks/{mutationExtras-Bo8pvlEx.js → mutationExtras-HC7AC6zn.js} +2 -2
- package/dist/chunks/{mutationExtras-Bo8pvlEx.js.map → mutationExtras-HC7AC6zn.js.map} +1 -1
- package/dist/chunks/{subscriptionStream-CtwEcda9.js → subscriptionStream-CaTWWJwt.js} +2 -2
- package/dist/chunks/{subscriptionStream-CtwEcda9.js.map → subscriptionStream-CaTWWJwt.js.map} +1 -1
- package/dist/client/chunkLoadRecovery.d.ts +5 -2
- package/dist/client/chunkLoadRecovery.d.ts.map +1 -1
- package/dist/client/index.js +4 -4
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/index.js +3 -3
- package/dist/email/index.js.map +3 -3
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/probe/index.js +2 -2
- package/dist/probe/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +9 -9
- package/dist/services/index.js.map +4 -3
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/stats/route-table.js +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7k43y71n.js +0 -10
- package/dist/chunk-8ysrmyer.js +0 -24
- package/dist/chunk-8zeky0fj.js +0 -117
- package/dist/chunk-waq4kj7n.js +0 -5
- /package/dist/{chunk-9hmm8acy.js.map → chunk-03q4j7wa.js.map} +0 -0
- /package/dist/{chunk-hwq0kk1d.js.map → chunk-7t60d5qy.js.map} +0 -0
- /package/dist/{chunk-9m04tdzh.js.map → chunk-9hjxpdjt.js.map} +0 -0
- /package/dist/{chunk-freerpzc.js.map → chunk-ejktrxp2.js.map} +0 -0
- /package/dist/{chunk-fbxnxze2.js.map → chunk-m0dfgmbj.js.map} +0 -0
- /package/dist/{chunk-k8gn0q91.js.map → chunk-sqqby94y.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{F as
|
|
2
|
+
import{Ul as P}from"./chunk-vgxkt9vd.js";class F{provider="custom";supportsIdempotencyKey=!1;async deliver(j){let x=await this.send(j);return{ok:Boolean(x),id:null}}}class G extends F{apiKey;provider="resend";supportsIdempotencyKey=!0;constructor(j=process.env.RESEND_API_KEY){super();this.apiKey=j}async send(j){return(await this.deliver(j)).ok}async deliver(j){let{Resend:x}=await import("./chunk-trqt1kkd.js"),A=new x(this.apiKey),{idempotencyKey:z,...N}=j,{data:H,error:B}=await A.emails.send(N,z?{idempotencyKey:z}:void 0);if(B)return console.error(B),{ok:!1,id:null,error:B};if(H)return{ok:!0,id:H.id??null};return{ok:!1,id:null}}}function Z(j){return j}function J(){return{driver:new G,headers:{},filterRecipients:(j)=>j}}function Q(j){for(let x=j;x;x=Object.getPrototypeOf(x)){let A=Object.prototype.hasOwnProperty.call(x,"deliver"),z=Object.prototype.hasOwnProperty.call(x,"send");if(A)return!1;if(z)return!0}return!0}async function M(j,x){if(typeof j.deliver==="function"&&!Q(j))return j.deliver(x);return{ok:Boolean(await j.send(x)),id:null}}class U{static token="mail";driver;headers;recipientFilter;constructor(j={}){let x=J();this.driver=j.driver??x.driver,this.headers=j.headers??x.headers,this.recipientFilter=j.filterRecipients??x.filterRecipients}filterRecipients(j){return this.recipientFilter(j)}send(j){return this.driver.send(j)}async deliver(j){return M(this.driver,j)}}
|
|
3
|
+
export{F as el,G as fl,Z as gl,J as hl,M as il,U as jl};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=04D91FB46570829664756E2164756E21
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"import { mailConfigDefaults, type MailConfig } from \"./config\";\nimport { deliverThrough } from \"./deliver\";\nimport type { EmailDriver } from \"./drivers/EmailDriver\";\nimport type { EmailDeliveryResult, SendEmailParams } from \"./drivers/types\";\n\nexport class MailManager {\n static token = \"mail\";\n\n readonly driver: EmailDriver;\n readonly headers: Record<string, string>;\n\n private readonly recipientFilter: NonNullable<MailConfig[\"filterRecipients\"]>;\n\n constructor(config: MailConfig = {}) {\n const defaults = mailConfigDefaults();\n\n this.driver = config.driver ?? defaults.driver;\n this.headers = config.headers ?? defaults.headers;\n this.recipientFilter = config.filterRecipients ?? defaults.filterRecipients;\n }\n\n filterRecipients(emails: string[]): Promise<Array<string>> | Array<string> {\n return this.recipientFilter(emails);\n }\n\n send(params: SendEmailParams) {\n return this.driver.send(params);\n }\n\n /** Like `send`, but reports the outcome and the provider's message id. */\n async deliver(params: SendEmailParams): Promise<EmailDeliveryResult> {\n // A driver that doesn't extend `EmailDriver`, or a subclass that only\n // overrides `send`, is called through `send`.\n return deliverThrough(this.driver, params);\n }\n}\n"
|
|
10
10
|
],
|
|
11
11
|
"mappings": ";yCAEO,MAAe,CAAY,CAKvB,SAAmB,SAMnB,uBAAkC,QASrC,QAAO,CAAC,EAAuD,CACnE,IAAM,EAAK,MAAM,KAAK,KAAK,CAAM,EACjC,MAAO,CAAE,GAAI,QAAQ,CAAE,EAAG,GAAI,IAAK,EAEvC,CCvBO,MAAM,UAAqB,CAAY,CAIxB,OAHF,SAAW,SACX,uBAAyB,GAE3C,WAAW,CAAS,EAAS,QAAQ,IAAI,eAAgB,CACvD,MAAM,EADY,mBAId,KAAI,CAAC,EAAyB,CAClC,OAAQ,MAAM,KAAK,QAAQ,CAAM,GAAG,QAGvB,QAAO,CAAC,EAAuD,CAO5E,IAAQ,UAAW,KAAa,+BAC1B,EAAS,IAAI,EAAO,KAAK,MAAM,GAG7B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AAyB,CAC5B,OAAO,KAAK,OAAO,KAAK,CAAM,OAI1B,QAAO,CAAC,EAAuD,CAGnE,OAAO,EAAe,KAAK,OAAQ,CAAM,EAE7C",
|
|
12
|
-
"debugId": "
|
|
12
|
+
"debugId": "04D91FB46570829664756E2164756E21",
|
|
13
13
|
"names": []
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{S as A}from"./chunk-
|
|
2
|
+
import{S as A}from"./chunk-nk7nmtng.js";import"./chunk-paawtkza.js";import{U as I}from"./chunk-pqr01waj.js";import{V as f}from"./chunk-a02bmp0q.js";import{Ql as t,Ul as T}from"./chunk-vgxkt9vd.js";var N=t(I(),1),a=t(f(),1),d=t(A(),1);import{readFileSync as g}from"fs";var c=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:i,providerId:n,policyArns:m,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:E}=e;if(!E){let{getDefaultRoleAssumerWithWebIdentity:p}=await import("./chunk-mgdrf89p.js").then((m)=>t(m.default,1));E=p({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return E({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:n,PolicyArns:m,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",O="AWS_ROLE_ARN",k="AWS_ROLE_SESSION_NAME",L=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[O],i=e?.roleSessionName??process.env[k];if(!o||!r)throw new a.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await c({...e,webIdentityToken:d.externalDataInterceptor?.getTokenRecord?.()[o]??g(o,{encoding:"ascii"}),roleArn:r,roleSessionName:i})(s);if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{c as fromWebToken,L as fromTokenFile};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=3F402F722ECC367A64756E2164756E21
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";6NAAA,SACA,KACA,KACA,iBAAS,WCHF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,GAClG,8BAA+B,EACrC,GAAI,CAAC,EAA4B,CAC7B,IAAQ,wCAAyC,KAAa,yDAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,IACb,GAAuB,sBACvB,EAAK,kBACZ,CACJ,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDlBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,MAAO,IAA0B,CACzE,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,GAAI,CAAC,GAAwB,CAAC,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,IAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,2BAAyB,iBAAiB,EAAE,IAC1D,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,UACA,iBACJ,CAAC,EAAE,CAAqB,EACxB,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "3F402F722ECC367A64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ah as
|
|
3
|
-
export{g as
|
|
2
|
+
import{Ah as R,Bh as Y,Ch as M,Dh as Q,Eh as O,Fh as y,Lh as U,yh as K,zh as L}from"./chunk-geqdq8hp.js";import{Nj as G,Oj as W}from"./chunk-1705yamg.js";var S=/^\s*::\s*(?:text\s*::\s*)?(jsonb|json)\b(?!\s*\[)/i,I=/^\s*as\s+(jsonb|json)\s*\)/i,P=/\bcast\s*\(\s*$/i,T=new Set;function _(k,B){if(!B.typesParametersFromStatement)return{fragment:k,jsonParameters:T};let q=Y(k),z=new Set,D;for(let H=0;H<q.length-1;H++){let X=q[H+1],$=S.exec(X);if($){D??=[...q],D[H+1]=`::text::${$[1]}${X.slice($[0].length)}`,z.add(H);continue}let J=I.exec(X);if(J&&P.test((D??q)[H]))D??=[...q],D[H+1]=` as text)::${J[1]}${X.slice(J[0].length)}`,z.add(H)}if(!D)return{fragment:k,jsonParameters:z};return{fragment:M(D,k.binders),jsonParameters:z}}function C(k,B){if(k===null||k===void 0)return null;let q=U(k);if(q==="db")return null;if(q==="json")return"null";if(q==="any")throw new W(B,"DB",B,"Prisma.AnyNull is a filter operand \u2014 it asks for a SQL NULL *or* a JSON "+"null \u2014 so it has no single value to bind. Write the one you mean: "+"Prisma.DbNull for the column being NULL, Prisma.JsonNull for the JSON value.");if(typeof k==="string")return k;let z;try{z=JSON.stringify(k)}catch(D){throw new W(B,"DB",B,`A parameter cast to json could not be serialised: ${D instanceof Error?D.message:String(D)}. `+"Bind text you have serialised yourself if the value is not JSON \u2014 a "+"bigint has no JSON form, and neither does a cycle.")}if(z===void 0)throw new W(B,"DB",B,`A ${typeof k} was bound to a parameter cast to json, and has no JSON form. Bind the value it stands for.`);return z}var N=new WeakSet;function Z(k){return N.add(k),k}function V(k){return typeof k==="object"&&k!==null&&N.has(k)}function g(k,...B){if(!Array.isArray(k)||!("raw"in k))throw new G("sql","DB","sql","'sql' is a tagged template \u2014 write sql`select 1`, not sql(\"select 1\"). "+"To put text that is not a value into a statement, use 'unsafeSql', and read what it says first.");let q=[];for(let z=0;z<k.length;z++)if(q.push(L(k[z])),z<B.length)q.push(F(B[z]));return Z(Q(...q))}function m(k,B=", "){if(!Array.isArray(k))throw new W("join","DB","sql",`Expected an array of fragments or values, got ${typeof k}.`);if(k.length===0)return b;let q=k.map(F);if(V(B)){let z=[];for(let D=0;D<q.length;D++){if(D>0)z.push(B);z.push(q[D])}return Z(Q(...z))}return j(B),Z(O(q,B))}var h=/^[\s,]*$|^\s*(?:and|or)\s*$/i;function j(k){if(typeof k==="string"&&h.test(k))return;throw new W("join","DB","sql",typeof k==="string"?`A separator is written into the SQL text, so it may only be glue: whitespace, commas, or 'and' / 'or'. Got ${JSON.stringify(k)}. If that is deliberate, say so with `+"unsafeSql(...) \u2014 and never build one from anything that came from "+"outside the program.":`Expected a separator string or a fragment, got ${k===null?"null":typeof k}.`)}var b=Z(Object.freeze({text:"",binders:Object.freeze([])}));function v(k){if(typeof k!=="string")throw new W("unsafeSql","DB","sql",`Expected a string literal, got ${Array.isArray(k)?"an array":typeof k}. 'unsafeSql' is a plain call, not a tagged template \u2014 a template would `+"interpolate values into the SQL text, which is the one thing it must never do.");return Z(L(k))}function p(k,B,q="query"){if(!V(k))throw new W(q,"DB",q,`Expected a fragment built with 'sql', got ${k===null?"null":typeof k}. A plain string is not accepted here on purpose \u2014 it would be the one `+"path into the SQL text that nobody had to think about.");let z=_(k,B),D=y(z.fragment,B,{model:"DB",operation:q});return{text:D.text,values:K(D.binders)(void 0).map((H,X)=>z.jsonParameters.has(X)?C(H,q):H===null||H===void 0?H??null:B.encodeUntyped(H))}}function F(k){if(V(k))return k;return R(()=>k)}
|
|
3
|
+
export{g as sh,m as th,b as uh,v as vh,p as wh};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=858BEB33CA7DA11664756E2164756E21
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"import type { SqlDialect } from \"./dialect\";\nimport {\n InvalidArgumentError,\n UnsupportedQueryError,\n} from \"./errors\";\nimport {\n type Fragment,\n bindValues,\n concat,\n joinFragments,\n param,\n render,\n sql as text,\n} from \"./compile/fragment\";\nimport { jsonTextParameter, retypeJsonParameters } from \"./json-param\";\n\n/**\n * SQL fragments as first-class values: `sql`, `join`, `empty`, and one door out.\n *\n * The ORM deliberately does not implement every SQL shape — `distinct`, cursor\n * pagination, window functions, recursive CTEs. That is the right call, but it\n * is only half a decision: the shapes it declines have to have somewhere to go,\n * and \"drop to raw SQL\" is not an answer if raw SQL cannot be *composed*.\n *\n * `DB.sql` — Bun's tagged template — covers a single self-contained statement,\n * and that is genuinely all it covers. The shape it cannot express is the common\n * one: a predicate list built conditionally, passed around as a value, and\n * interpolated into a larger statement.\n *\n * ```ts\n * const filters = []\n * if (q) filters.push(sql`name ilike ${`%${q}%`}`)\n * if (organizationId) filters.push(sql`\"organizationId\" = ${organizationId}`)\n *\n * const where = filters.length ? sql`where ${join(filters, \" and \")}` : empty\n * const rows = await DB.query(sql`select * from \"Product\" ${where} limit ${20}`)\n * ```\n *\n * ## This is the compiler's own `Fragment`, made public\n *\n * Not a parallel mechanism. `compile/fragment.ts` has held exactly this shape\n * since iteration 1 — text plus positional binders, composable, never\n * concatenating a value into the text — because that is what invariant 2 needs\n * internally. Reusing it means a public fragment binds by the same rule the\n * compiler's own SQL does, and it means the parameter ceiling, the placeholder\n * numbering and the dialect split are all already handled rather than\n * reimplemented one door down.\n *\n * **Placeholders are assigned at assembly, not at authoring.** SQLite writes\n * `?` and Postgres writes `$1`, `$2`, and a fragment does not know where in the\n * final statement it will land — so `sql` records a *position* and `render`\n * turns it into a placeholder once the whole statement exists. That is what lets\n * the same fragment be nested, reused twice in one statement, or built before\n * the dialect is even known.\n */\n\n/**\n * A composable piece of SQL. Its values are bound parameters, never text.\n *\n * Opaque on purpose: an application builds one with `sql`, combines it with\n * `join`, and hands it to `DB.query` / `DB.execute`. Reading `.text` off it is\n * not part of the contract — it holds parameter *markers* rather than the\n * dialect's placeholders, so it is not the statement that runs.\n */\nexport type SqlFragment = Fragment;\n\n/**\n * Every fragment this module has produced.\n *\n * **Identity, not shape, and the difference is a SQL injection.** `interpolate`\n * splices a fragment as text and binds everything else, so \"is this a fragment\"\n * decides whether a value reaches the statement or a parameter. Asking the\n * *shape* — a `text` string and a `binders` array — makes that decision\n * answerable by anything that can name two properties, and `{\"text\": \"…\",\n * \"binders\": []}` is two lines of JSON:\n *\n * ```ts\n * const body = await request.json()\n * await DB.query(sql`select \"email\" from \"User\" where \"email\" = ${body.email}`)\n * // body.email = { text: `'' union select \"password\" from \"User\"`, binders: [] }\n * // -> select \"email\" from \"User\" where \"email\" = '' union select \"password\" from \"User\"\n * ```\n *\n * That is the intended call site with the intended safe value, and it returned\n * the password column out of a statement selecting only `email`. The internal\n * `Fragment` never had the problem because nothing outside `compile/` could\n * construct one; making the type public is what turned \"text plus binders\" from\n * an implementation detail into a shape an attacker can name. `unsafeSql` is\n * built so that reaching for the escape hatch is a decision — a structural check\n * is a second, unmarked door beside it.\n *\n * A `WeakSet` the module owns cannot be forged: membership is granted only by\n * the constructors below. It registers the *returned* object rather than\n * stamping a property, because `concat` and `joinFragments` return fresh objects\n * — a marker property on the inputs would not survive them, and the version that\n * cannot drift is the one that brands what actually comes out.\n */\nconst FRAGMENTS = new WeakSet<object>();\n\nfunction brand(fragment: Fragment): SqlFragment {\n FRAGMENTS.add(fragment);\n return fragment;\n}\n\n/** Whether a value is a fragment *this module made*, so it splices rather than binds. */\nfunction isFragment(value: unknown): value is Fragment {\n return typeof value === \"object\" && value !== null && FRAGMENTS.has(value);\n}\n\n/**\n * A SQL fragment. Every `${value}` is bound as a parameter; a `${fragment}` is\n * spliced in, carrying its own parameters with it.\n *\n * ```ts\n * sql`where \"id\" = ${id}` // \"id\" = $1, with id bound\n * sql`where ${sql`\"a\" = ${1}`} and ${sql`\"b\" = ${2}`}` // nests to any depth\n * ```\n *\n * An interpolated **array** is bound as one value, not expanded — that is what\n * Postgres's `= any($1)` wants, and it is the only reading that does not depend\n * on the dialect. For a comma-separated list of placeholders, say so with\n * `join`.\n *\n * A value at a `::jsonb` cast the caller wrote is the one parameter with a type\n * behind it, and it is bound as **JSON text** so that the statement means what\n * the same statement meant under Prisma's `$executeRaw`:\n *\n * ```ts\n * sql`… set payload = payload || ${JSON.stringify(patch)}::jsonb` // merges\n * ```\n *\n * Without that the driver would JSON-encode the string and the column would\n * hold the document as a jsonb *string* — which `||` appends as an array\n * element rather than merging. `json-param.ts` has the measurements.\n */\nexport function sql(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): SqlFragment {\n // A defensive check rather than a type error, because the interesting misuse\n // is `sql(userInput)` — a plain call with a string, which would otherwise\n // reach `strings.raw` as `undefined` and produce a fragment of `undefined`\n // text rather than an error. It is also the shape somebody reaches for when\n // they want the escape hatch and have not found `unsafeSql`.\n if (!Array.isArray(strings) || !(\"raw\" in (strings as object))) {\n throw new UnsupportedQueryError(\n \"sql\",\n \"DB\",\n \"sql\",\n `'sql' is a tagged template — write sql\\`select 1\\`, not sql(\"select 1\"). ` +\n `To put text that is not a value into a statement, use 'unsafeSql', ` +\n `and read what it says first.`,\n );\n }\n\n const parts: Fragment[] = [];\n\n for (let i = 0; i < strings.length; i++) {\n parts.push(text(strings[i]));\n if (i < values.length) parts.push(interpolate(values[i]));\n }\n\n return brand(concat(...parts));\n}\n\n/**\n * Fragments — or values — joined by a separator, the way `Array.join` reads.\n *\n * ```ts\n * join(filters, \" and \") // a and b and c\n * join([sql`\"a\" asc`, sql`\"b\" desc`]) // \"a\" asc, \"b\" desc\n * join(ids) // $1, $2, $3 — each bound\n * ```\n *\n * An **empty list produces `empty`**, not a separator and not a syntax error, so\n * `join` composes with a list that turned out to have nothing in it. That is the\n * case a caller forgets, and it is the one that would otherwise emit `where ` and\n * fail at the database rather than here.\n *\n * ## The separator is text, so it is not a free string\n *\n * It goes between the fragments *in the statement*, which makes it the one other\n * place a string could reach the SQL — and this module's whole claim is that\n * `unsafeSql` is **the** door. So a plain-string separator has to be glue and\n * nothing else: whitespace, commas, or a boolean connective. Anything more\n * expressive is legitimate and has to say so:\n *\n * ```ts\n * join(filters, \" and \") // fine\n * join(parts, unsafeSql(\") and (\")) // fine, and visibly a decision\n * join(ids, request.query.sep) // refused\n * ```\n *\n * A **blocklist would not do**, which is why this is an allowlist. The obvious\n * one — reject quotes, semicolons and comment markers — lets this through:\n *\n * join([1, 2], \") or 1=1 union select password from Users where 1=(1\")\n *\n * No quote, no `--`, still an injection. There is no sound way to say \"this\n * arbitrary text is safe glue\", so the rule is that glue is a small closed set\n * and everything else is a fragment somebody built on purpose.\n */\nexport function join(\n values: readonly unknown[],\n separator: string | SqlFragment = \", \",\n): SqlFragment {\n if (!Array.isArray(values)) {\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n `Expected an array of fragments or values, got ${typeof values}.`,\n );\n }\n if (values.length === 0) return empty;\n\n const parts = values.map(interpolate);\n\n if (isFragment(separator)) {\n const woven: Fragment[] = [];\n for (let i = 0; i < parts.length; i++) {\n if (i > 0) woven.push(separator);\n woven.push(parts[i]);\n }\n return brand(concat(...woven));\n }\n\n assertGlue(separator);\n return brand(joinFragments(parts, separator));\n}\n\n/**\n * Whitespace and commas, or a boolean connective surrounded by whitespace.\n *\n * Deliberately small. Every separator a composed statement actually needs is in\n * here — `\", \"`, `\" and \"`, `\" or \"`, `\" \"` — and everything outside it is\n * expressive enough to change what the statement *does*, which is the property\n * that makes it a `unsafeSql` decision rather than a string argument.\n */\nconst GLUE = /^[\\s,]*$|^\\s*(?:and|or)\\s*$/i;\n\nfunction assertGlue(separator: unknown): void {\n if (typeof separator === \"string\" && GLUE.test(separator)) return;\n\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n typeof separator === \"string\"\n ? `A separator is written into the SQL text, so it may only be glue: ` +\n `whitespace, commas, or 'and' / 'or'. Got ` +\n `${JSON.stringify(separator)}. If that is deliberate, say so with ` +\n `unsafeSql(...) — and never build one from anything that came from ` +\n `outside the program.`\n : `Expected a separator string or a fragment, got ${\n separator === null ? \"null\" : typeof separator\n }.`,\n );\n}\n\n/**\n * The fragment that contributes nothing.\n *\n * The point of it is that `where ${empty}` and `where ${filter}` are the same\n * expression — a conditional predicate is a value, not a branch around the\n * statement. Frozen, because it is shared by every caller and a fragment is read\n * as immutable everywhere else.\n */\nexport const empty: SqlFragment = brand(\n Object.freeze({ text: \"\", binders: Object.freeze([]) as [] }),\n);\n\n/**\n * **Text straight into the SQL, with no parameter around it.** The one door in\n * this ORM through which a value reaches the statement text.\n *\n * Everything else in the compiler exists to make this impossible — identifiers\n * come from the generated schema, values are bound — so reaching for it should\n * feel like reaching for it. **Never give it a value that came from a request, a\n * form, a URL, a header, a queue payload or a database row.** There is no\n * escaping here and there will not be: escaping that is \"usually right\" is worse\n * than none, because it survives review.\n *\n * ## Why it exists at all, since that is the fair question\n *\n * Plan quality can depend on *not* parameterising. A partial index declared as\n *\n * ```sql\n * create index … on \"Job\" (…) where \"name\" is distinct from 'reaper'\n * ```\n *\n * is only usable if the planner can prove the query's predicate matches the\n * index's. A bound parameter is opaque at plan time, so `where \"name\" is\n * distinct from $1` does not match — and the query falls back to a sequential\n * scan over the whole table. The constant has to be *in the text*:\n *\n * ```ts\n * const REAPER = unsafeSql(`'reaper'`) // a literal in this file, never input\n * await DB.query(sql`\n * select … from \"Job\" where \"name\" is distinct from ${REAPER} …\n * `)\n * ```\n *\n * A builder with no escape hatch cannot express that at any price, and the\n * workaround — hand-writing the whole statement — loses composition for every\n * other part of it.\n *\n * The same applies to the other things that cannot be parameters in SQL:\n * identifiers, a sort direction, a table name chosen from a fixed set in code.\n * All of them share the rule above — the value is written in the source file, or\n * chosen from a set written in the source file, never passed in.\n */\nexport function unsafeSql(literal: string): SqlFragment {\n if (typeof literal !== \"string\") {\n throw new InvalidArgumentError(\n \"unsafeSql\",\n \"DB\",\n \"sql\",\n `Expected a string literal, got ${\n Array.isArray(literal) ? \"an array\" : typeof literal\n }. 'unsafeSql' is a plain call, not a tagged template — a template would ` +\n `interpolate values into the SQL text, which is the one thing it must ` +\n `never do.`,\n );\n }\n return brand(text(literal));\n}\n\n/**\n * A fragment as the statement a driver can run: the dialect's placeholders in\n * the text, and the values in the order they appear.\n *\n * Separate from the executing, and exported, because it is the half that is a\n * pure function of `(fragment, dialect)` — so a test can assert what a\n * composition emits on both dialects without a database anywhere near it, which\n * is exactly how the rest of the compiler is tested.\n *\n * `render` also applies the parameter ceiling here, which matters more for a\n * hand-built fragment than for a compiled plan: `join(ids)` over a\n * request-derived list is one placeholder per element on SQLite, and 40 000 of\n * them is a driver error rather than a clear one.\n */\nexport function renderFragment(\n fragment: SqlFragment,\n dialect: SqlDialect,\n operation = \"query\",\n): { text: string; values: unknown[] } {\n if (!isFragment(fragment)) {\n throw new InvalidArgumentError(\n operation,\n \"DB\",\n operation,\n `Expected a fragment built with 'sql', got ${\n fragment === null ? \"null\" : typeof fragment\n }. A plain string is not accepted here on purpose — it would be the one ` +\n `path into the SQL text that nobody had to think about.`,\n );\n }\n\n // The one thing a raw parameter can be *told* about its type: a `::jsonb` the\n // caller wrote onto their own placeholder. Where there is one, the parameter\n // is retyped through `text` and its value serialised, because Bun otherwise\n // JSON-encodes a string bound to a `jsonb` parameter and stores the document\n // as a jsonb *string* where Prisma stored the object. See `json-param.ts` —\n // the mechanism, the measurements, and why a string is not serialised here\n // while `fieldParam` serialises one.\n //\n // The dialect is passed because this is not universal, and the reason is\n // narrower than it looks: `::` is Postgres-only syntax, but `cast(? as json)`\n // *parses and runs* on SQLite, where it means NUMERIC affinity — so retyping\n // it would rewrite a working statement into `cast(? as text)::json`, which\n // SQLite cannot parse. `typesParametersFromStatement` is false there.\n const json = retypeJsonParameters(fragment, dialect);\n\n const rendered = render(json.fragment, dialect, { model: \"DB\", operation });\n return {\n text: rendered.text,\n // `encodeUntyped` and not `encode`: there is no field here to ask, which is\n // the whole difference between a fragment's parameters and a compiled\n // plan's. It normalises the two JavaScript types whose SQL form the ORM has\n // already decided — a `Date` and a boolean — so a raw statement compares\n // against ORM-written rows on both dialects rather than only on Postgres.\n values: bindValues(rendered.binders)(undefined).map((value, index) =>\n json.jsonParameters.has(index)\n ? jsonTextParameter(value, operation)\n : value === null || value === undefined\n ? (value ?? null)\n : dialect.encodeUntyped(value),\n ),\n };\n}\n\n/**\n * One interpolated slot: a fragment splices, anything else binds.\n *\n * The binder ignores both its arguments. A compiled plan's binders read the\n * *call's* argument tree, because one plan serves many calls; a fragment is\n * built per call and closes over the value it was given, which is the whole\n * difference between the compiler's fragments and these.\n */\nfunction interpolate(value: unknown): Fragment {\n if (isFragment(value)) return value;\n return param(() => value);\n}\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";gKA0IA,FAAM,EAAgB,qDAehB,EAAgB,8BAQhB,EAAY,mBAGZ,EAA6B,IAAI,IAYhC,SAAS,CAAoB,CAClC,EACA,EAIA,CACA,GAAI,CAAC,EAAQ,6BACX,MAAO,CAAE,WAAU,eAAgB,CAAM,EAG3C,IAAM,EAAW,EAAc,CAAQ,EACjC,EAAiB,IAAI,IACvB,EAKJ,QAAS,EAAQ,EAAG,EAAQ,EAAS,OAAS,EAAG,IAAS,CACxD,IAAM,EAAQ,EAAS,EAAQ,GAEzB,EAAW,EAAc,KAAK,CAAK,EACzC,GAAI,EAAU,CACZ,IAAc,CAAC,GAAG,CAAQ,EAC1B,EAAU,EAAQ,GAChB,WAAW,EAAS,KAAK,EAAM,MAAM,EAAS,GAAG,MAAM,IACzD,EAAe,IAAI,CAAK,EACxB,SAGF,IAAM,EAAK,EAAc,KAAK,CAAK,EAKnC,GAAI,GAAM,EAAU,MAAM,GAAa,GAAU,EAAM,EACrD,IAAc,CAAC,GAAG,CAAQ,EAC1B,EAAU,EAAQ,GAAK,cAAc,EAAG,KAAK,EAAM,MAAM,EAAG,GAAG,MAAM,IACrE,EAAe,IAAI,CAAK,EAI5B,GAAI,CAAC,EAAW,MAAO,CAAE,WAAU,gBAAe,EAClD,MAAO,CACL,SAAU,EAAkB,EAAW,EAAS,OAAO,EACvD,gBACF,EAYK,SAAS,CAAiB,CAAC,EAAgB,EAA4B,CAO5E,GAAI,IAAU,MAAQ,IAAU,OAAW,OAAO,KAKlD,IAAM,EAAW,EAAa,CAAK,EACnC,GAAI,IAAa,KAAM,OAAO,KAC9B,GAAI,IAAa,OAAQ,MAAO,OAChC,GAAI,IAAa,MACf,MAAM,IAAI,EACR,EACA,KACA,EACA,gFACE,0EACA,8EAEJ,EAMF,GAAI,OAAO,IA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
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "858BEB33CA7DA11664756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-vgxkt9vd.js";function R(f,D){let P=new Map;for(let p of[...D.tables].sort())P.set(p,{name:p,columns:[],primaryKey:[],relations:[]});for(let{table:p,...s}of D.columns)P.get(p)?.columns.push(s);for(let{table:p,column:s}of D.primaryKeys)P.get(p)?.primaryKey.push(s);let d=new Map;for(let p of D.foreignKeys){let s=P.get(p.table);if(!s)continue;let M=`${p.table}\x00${p.key}`,q=d.get(M);if(!q)q={name:p.name,columns:[],referencedTable:p.referencedTable,referencedColumns:[],onDelete:p.onDelete,onUpdate:p.onUpdate},d.set(M,q),s.relations.push(q);q.columns.push(p.column),q.referencedColumns.push(p.referencedColumn)}return{dialect:f,tables:[...P.values()]}}async function h(f,D){let P=await f.unsafe(`
|
|
3
3
|
select TABLE_NAME as name
|
|
4
4
|
from information_schema.TABLES
|
|
5
5
|
where TABLE_SCHEMA = database() and TABLE_TYPE = 'BASE TABLE'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{X as p,Y as AJ,Z as DJ,_ as PJ}from"./chunk-1yhvqthv.js";import{pa as b,ta as T,ua as NJ}from"./chunk-bwg7genv.js";import"./chunk-s0z61m9j.js";import{Ig as xJ,Jg as k,Rg as IJ,Sg as MJ,Tg as FJ,re as jJ}from"./chunk-1m7kqf2t.js";import"./chunk-scmjmsps.js";import"./chunk-geqdq8hp.js";import{Yh as ZJ,Zh as XJ,ai as QJ}from"./chunk-v20fe53s.js";import{gj as LJ}from"./chunk-228w21t6.js";import"./chunk-dfmxvp8p.js";import"./chunk-n914rs58.js";import"./chunk-g02gqhq0.js";import"./chunk-1705yamg.js";import"./chunk-1ghbn9jg.js";import"./chunk-gmcttf0f.js";import"./chunk-beckfwe9.js";import"./chunk-wvq3c25z.js";import"./chunk-ftvc1a0k.js";import"./chunk-m08p5mre.js";import"./chunk-8e17k7ht.js";import"./chunk-ermvtpy9.js";import"./chunk-1x23scpn.js";import{yl as GJ}from"./chunk-j49vh5bs.js";import"./chunk-5bfrr8x5.js";import{Ml as _J}from"./chunk-aycfrzh1.js";import{Ol as y}from"./chunk-2g2fsr71.js";import"./chunk-vgxkt9vd.js";import{createHash as U2}from"crypto";import{join as d,resolve as TJ,sep as BJ}from"path";import{Duplex as gJ}from"stream";import{constants as E,createBrotliCompress as fJ,createGzip as mJ}from"zlib";var uJ=["br","gzip"],hJ=1024,cJ=5,pJ=19,dJ=6;function lJ(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 oJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let Z of J.split(",")){let[X,...j]=Z.split(";"),H=X.trim().toLowerCase();if(H==="")continue;let W=1;for(let G of j){let U=G.indexOf("=");if(U===-1)continue;if(G.slice(0,U).trim().toLowerCase()==="q"){W=lJ(G.slice(U+1));break}}$.set(H,W)}return $}function m(J,$=uJ){let Z=oJ(J);if(!Z)return null;let X=Z.get("*"),j=null,H=0;for(let W of $){let G=Z.get(W)??X??0;if(G>H)j=W,H=G}return j}function nJ(J,$){if(!J)return!1;return J.split(",").some((Z)=>Z.trim().toLowerCase().split("=")[0].trim()===$)}function iJ(J,$){if(J==="HEAD")return!1;if($.status<200||$.status===204||$.status===206||$.status===304)return!1;if($.headers.has("Content-Range"))return!1;let Z=$.headers.get("Content-Type");if(!Z||!/^\s*text\/html\s*(;|$)/i.test(Z))return!1;if(!$.body)return!1;let X=$.headers.get("Content-Encoding");if(X&&X.trim().toLowerCase()!=="identity")return!1;if(nJ($.headers.get("Cache-Control"),"no-transform"))return!1;let j=$.headers.get("Content-Length");if(j!==null&&Number(j)<hJ)return!1;return!0}function aJ(J){let $=J==="br"?fJ({params:{[E.BROTLI_PARAM_QUALITY]:cJ,[E.BROTLI_PARAM_LGWIN]:pJ},flush:E.BROTLI_OPERATION_FLUSH}):mJ({level:dJ,flush:E.Z_SYNC_FLUSH});return gJ.toWeb($)}function rJ(J){let $=J.get("Vary");if(!$){J.set("Vary","Accept-Encoding");return}let Z=$.split(",").map((X)=>X.trim().toLowerCase());if(Z.includes("*")||Z.includes("accept-encoding"))return;J.append("Vary","Accept-Encoding")}function s(J,$){if(!iJ(J.method,$))return $;let Z=new Headers($.headers);rJ(Z);let X=m(J.headers.get("Accept-Encoding"));if(!X)return new Response($.body,{status:$.status,statusText:$.statusText,headers:Z});let j;try{j=aJ(X)}catch{return new Response($.body,{status:$.status,statusText:$.statusText,headers:Z})}return Z.set("Content-Encoding",X),Z.delete("Content-Length"),new Response($.body.pipeThrough(j),{status:$.status,statusText:$.statusText,headers:Z})}import{readdir as X2,stat as HJ}from"fs/promises";import{join as Q2}from"path";import{mkdir as F2,readFile as tJ,stat as N2,writeFile as A2}from"fs/promises";import{dirname as P2,join as sJ}from"path";import{promisify as e}from"util";import{brotliCompress as eJ,constants as R2,gzip as J2}from"zlib";var $2=".vite/static-assets.json";var JJ={br:".br",gzip:".gz"},Z2=["br","gzip"],S2=e(eJ),b2=e(J2);async function $J(J){let $;try{$=await tJ(sJ(J,$2),"utf8")}catch{return null}let Z;try{Z=JSON.parse($)?.files}catch{return null}if(!Z||typeof Z!=="object")return null;let X={files:{}};for(let[j,H]of Object.entries(Z)){if(!Array.isArray(H))continue;X.files[j]=Z2.filter((W)=>H.includes(W))}return X}function u(J){let $=J.toString(),Z=new Bun.CryptoHasher("sha1");return Z.update($),Z.digest("hex")}async function WJ(J){let $=new Set;async function Z(X,j){let H;try{H=await X2(X,{withFileTypes:!0})}catch{return}for(let W of H){if(W.name.startsWith("."))continue;if(j&&W.name==="assets")continue;let G=Q2(X,W.name),U=W.isDirectory(),O=W.isFile();if(W.isSymbolicLink())try{let _=await HJ(G);U=_.isDirectory(),O=_.isFile()}catch{continue}if(O)$.add(G);else if(U&&!W.isSymbolicLink())await Z(G,!1)}}return await Z(J,!0),$}var j2="public, max-age=31536000, must-revalidate",H2="public, max-age=31536000, immutable";async function W2(J,$,Z){if(Z.length===0||J.headers.has("Range"))return null;let X=m(J.headers.get("Accept-Encoding"),Z);if(!X)return null;let j=$+JJ[X];try{let H=await HJ(j);return H.isFile()?{encoding:X,path:j,size:H.size}:null}catch{return null}}async function YJ(J,$,Z={}){let X=Bun.file($),j=Z.encodings??[],H={"Content-Type":X.type||"application/octet-stream","Cache-Control":Z.immutable?H2:j2,"Accept-Ranges":"bytes"};if(j.length>0)H.Vary="Accept-Encoding";let W=await W2(J,$,j);if(W){let O=Bun.file(W.path);return new Response(O.stream(),{headers:{...H,"Content-Encoding":W.encoding,"Content-Length":String(W.size),ETag:`${u(O.lastModified)}-${W.encoding}`}})}let G=X.size;H.ETag=u(X.lastModified);let U=ZJ(J.headers.get("Range"));if(U){let O=XJ(U,G);if(!O)return jJ(G);return new Response(X.slice(O.start,O.end+1).stream(),{status:206,headers:{...H,"Content-Range":QJ(O.start,O.end,G),"Content-Length":String(O.length)}})}return new Response(X.stream(),{headers:{...H,"Content-Length":String(G)}})}import{stat as z2}from"fs/promises";var v="app/client.tsx";function OJ(J,$=b){let Z=J[v]?.file;if(!Z)return;return{module:T(Z,$),preload:P(J,v,$)}}function P(J,$,Z=b){let X=[],j=new Set,H=(W)=>{if(j.has(W))return;j.add(W);let G=J[W];if(!G?.file)return;X.push(T(G.file,Z));for(let U of G.imports??[])H(U)};return H($),X}function Y2(J,$,Z=b){let X=new Set(P(J,$,Z)),j=[],H=new Set,W=(U)=>{if(H.has(U))return;H.add(U);let O=J[U];if(!O)return;for(let _ of O.dynamicImports??[])if(!/(^|\/)node_modules\//.test(_)&&!j.includes(_))j.push(_);for(let _ of O.imports??[])W(_)};W($);let G=[];for(let U of j)for(let O of P(J,U,Z))if(!X.has(O))X.add(O),G.push(O);return G}function VJ(J,$){let Z=[],X=new Set,j=new Set,H=(W)=>{if(j.has(W))return;j.add(W);let G=J[W];if(!G)return;for(let U of G.imports??[])H(U);for(let U of G.css??[])if(!X.has(U))X.add(U),Z.push(U)};return H($),Z}function UJ(J,$=b){let Z=new Map;return(X)=>{if(!Z.has(X)){let j=`${X}${GJ}`,H=J[j]?.file;Z.set(X,H?{src:T(H,$),preload:P(J,j,$),dynamicPreload:Y2(J,j,$)}:void 0)}return Z.get(X)}}var zJ="x-gemi-build";function G2(J,$,Z,X){let j=Date.now(),H=function(V){return typeof V==="number"&&j-V>=0&&j-V<Z},W=function(V){try{let z=V?JSON.parse(V):null;return z&&typeof z==="object"&&!Array.isArray(z)?z:{}}catch{return{}}},G=function(V){let z={};for(let I in V)if(H(V[I]))z[I]=V[I];return z},U=function(V){let z=2166136261;for(let I=0;I<V.length;I++)z=Math.imul(z^V.charCodeAt(I),16777619);return(z>>>0).toString(36)},O=null,_={};try{O=window.sessionStorage,_=W(O.getItem(J))}catch{O=null}let F=J+":",N="",A="";try{let V=new URL($,window.location.href);N=U(new URL(window.location.href).origin),A=U(V.origin+V.pathname)}catch{}let C=null;try{let V=window.name;if(!A)C=null;else if(V==="")C={};else if(V.indexOf(F)===0){let z=W(V.slice(F.length)),I=z.m;C=z.o===N&&I&&typeof I==="object"&&!Array.isArray(I)?I:{}}}catch{C=null}if(X==="tidy"){try{let V=window.name;if(C===null||V.indexOf(F)!==0)return"ok";for(let z in C)if(H(C[z]))return"cooldown";window.name=""}catch{}return"ok"}if(H(_[$])||C&&H(C[A]))return"cooldown";if(!O&&!C)return"storage";if(!X)return"ok";if(O)try{let V=G(_);V[$]=j;let z=JSON.stringify(V);if(O.setItem(J,z),O.getItem(J)===z)return"ok"}catch{}if(C)try{let V=G(C);V[A]=j;let z=F+JSON.stringify({o:N,m:V});if(window.name=z,window.name===z)return"ok"}catch{}return"storage"}function KJ(J,$=30000){let Z=JSON.stringify("gemi:chunk-reload"),X=JSON.stringify(`Failed to fetch dynamically imported module: ${J}`);return`var g=${G2.toString()};var r=!1;try{r=navigator.onLine!==!1&&g(${Z},window.location.href,${Number($)},!0)==="ok"}catch(e){}if(r)window.location.reload();else throw new Error(${X});export {}`}var O2=new RegExp(`^${xJ}/.+\\.m?js$`);function h(J){return O2.test(J)}function CJ(J){if(h(J))return new Response(KJ(J),{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(k(J))return new Response("Not found",{status:404});return}var V2=`<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Internal Server Error</title>
|
|
8
|
+
<style>
|
|
9
|
+
body { font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; display: grid; place-items: center; }
|
|
10
|
+
main { text-align: center; padding: 16px; }
|
|
11
|
+
h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
|
|
12
|
+
p { margin: 0; opacity: 0.7; }
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<main>
|
|
17
|
+
<h1>Something went wrong</h1>
|
|
18
|
+
<p>Please try again later.</p>
|
|
19
|
+
</main>
|
|
20
|
+
</body>
|
|
21
|
+
</html>`;function c(J,$,Z){if(!Z)console.error(J);else try{Z(J instanceof Error?J:Error(String(J),{cause:J}))}catch(X){console.error(J),console.error(X)}if(y($))return new Response(JSON.stringify({error:LJ("server_error","Internal Server Error",500)}),{status:500,headers:{"Content-Type":"application/json"}});return new Response(V2,{status:500,headers:{"Content-Type":"text/html; charset=utf-8"}})}var g=_J(),K2=d(g,"app"),M=d(g,"dist"),B=d(M,"client");function x2(J){let $;try{$=decodeURIComponent(J)}catch{return null}let Z=TJ(B,"."+$.replace("/assets/assets","/assets"));return Z.startsWith(B+BJ)?Z:null}async function C2(J){try{return(await z2(J)).isFile()}catch{return!1}}async function x3(J,$){let Z=await import(`${M}/client/.vite/manifest.json`),X=await import(`${M}/server/.vite/manifest.json`),j=await NJ(`${M}/client`);process.env.ROOT_DIR=g,process.env.APP_DIR=K2,process.env.DIST_DIR=M;let H={},W={},G={},U={},O={},_=(Q,Y)=>`"${Q}": () => import("${Y}")`,F=[],N=J.getRequiredViews.call(J);for(let Q of["404",...J.getFlatComponentTree.call(J)]){let Y=X[`app/views/${Q}.tsx`];if(!Y?.file&&N[Q])throw DJ(Q,N[Q]);if(!Y?.file){console.log(`Server file not found for ${Q}`),console.log(Y);let L=Object.keys(X),D=`app/views/${Q}.tsx`;console.log(`${D} not found in server manifest`),console.log(L)}let K=await import(`${process.env.DIST_DIR}/server/${Y?.file}`);H[Q]=K.default,W[Q]=K.OpenGraph,G[Q]=K;let x=Z[`app/views/${Q}.tsx`];if(x?.css&&x?.css.length>0)U[Q]=x?.css;if(x)F.push(_(Q,T(x?.file,j))),O[Q]=P(Z,`app/views/${Q}.tsx`,j)}let A=`{${F.join(",")}}`,C=OJ(Z,j);if(!C)console.error(`Client manifest has no "${v}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let V=Z["app/client.tsx"]?.css??[],z=(await Promise.all(V.map((Q)=>Bun.file(`${M}/client/${Q}`).text()))).join(`
|
|
22
|
+
`),I=UJ(Z,j),l=U2("sha256").update(await Bun.file(`${M}/client/.vite/manifest.json`).text()).digest("base64url").slice(0,12),o=new Map,RJ=(Q)=>{let Y=o.get(Q);if(!Y)Y=Bun.file(`${M}/client/${Q}`).text(),o.set(Q,Y);return Y},SJ=async(Q,Y)=>{let K=new Set;for(let L of Y?[Y,...Q]:Q)for(let D of VJ(Z,`app/views/${L}.tsx`))K.add(D);let x=await Promise.all([...K].map(async(L)=>({id:L,content:await RJ(L)})));return p(Y?x:[{content:z},...x])},bJ=await WJ(B),n=new Map;for(let[Q,Y]of Object.entries((await $J(B))?.files??{})){let K=TJ(B,Q);if(K.startsWith(B+BJ))n.set(K,{immutable:!0,encodings:Y})}async function qJ(Q){let{pathname:Y}=new URL(Q.url);if(y(Y))return await R(Q,Y);let K=x2(Y),x=k(Y),L=!x&&K!==null&&bJ.has(K),D=x||Y.startsWith("/.well-known")||L;if(L&&!(await i(Q)).publicFiles)return await R(Q,Y);if(D){if(!K||!await C2(K)){if(x&&!h(Y)&&(await i(Q)).assetRoutes)return await R(Q,Y);return CJ(Y)??await R(Q,Y)}try{return await YJ(Q,K,n.get(K))}catch(w){return J.onException?.(w),new Response("Not found",{status:404})}}let q=await R(Q,Y);if(Y.endsWith(".json"))try{q.headers.set(zJ,l)}catch{}return q}async function i(Q){try{return await J.staticFiles?.(Q)??{publicFiles:!0,assetRoutes:!1}}catch{return{publicFiles:!1,assetRoutes:!0}}}async function R(Q,Y){let K=J.fetch.bind(J);try{let x=await K(Q);if(x instanceof Response)return x;else{let L=[];return L.push({content:z}),await x({getStyles:async(q,w)=>{let r=q??["404"];if(w?.static)return SJ(r,w.layout);for(let vJ of r){let kJ=Z[`app/views/${vJ}.tsx`];for(let t of kJ?.css??[]){let yJ=Bun.file(`${process.env.DIST_DIR}/client/${t}`);L.push({id:t,content:await yJ.text()})}}return p(L)},clientEntry:C,modulePreloadManifest:O,loaders:A,viewImportMap:H,viewModules:G,ogMap:W,cssManifest:U,assetBase:j,resolveIsland:I,buildId:l})}}catch(x){return c(x,Y,J.onException)}}let wJ=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",a=IJ(process.env.GEMI_TRUST_PROXY),EJ=FJ(process.env),S=J.sockets();if(S&&a.kind==="none"&&!EJ)console.warn("[gemi] Broadcast sockets: GEMI_TRUST_PROXY is not set, so a socket's address is its TCP peer. Behind a proxy or load balancer every client shares the proxy's address, and broadcast.maxConnectionsPerIp caps the whole app per process. Set GEMI_TRUST_PROXY (see forwardedFor) or raise that limit.");let f=Bun.serve({maxRequestBodySize:10737418240,fetch:async(Q,Y)=>{if(MJ(Q.headers,Y.requestIP(Q)?.address??null,a),J.applyTrustedClientIp(Q),S?.matches(Q))return S.upgrade(Q,Y);let K=await $(Q,(x)=>J.withGlobalMiddleware(x,qJ,(L)=>c(L,new URL(x.url).pathname,J.onException)));return wJ?s(Q,K):K},idleTimeout:PJ(),port:process.env.PORT||5173,websocket:S?.websocket});return await S?.start(f),AJ({port:f.port,rootDir:g}),f}export{x3 as httpProd};
|
|
23
|
+
|
|
24
|
+
//# debugId=4281A5E4D8D0619A64756E2164756E21
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"import { mkdir, readFile, stat, writeFile } from \"node:fs/promises\";\nimport { availableParallelism } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { brotliCompress, constants, gzip } from \"node:zlib\";\n\nimport type { ContentEncoding } from \"../server/compression\";\n\n/**\n * Build-time compression of the client bundle (#789).\n *\n * `gemi start` compresses SSR HTML per request, but a hashed chunk is the same\n * bytes for the life of a release, so compressing it per request would spend\n * origin CPU on every visitor for a result that never changes. `gemi build`\n * writes `file.br` (brotli quality 11) and `file.gz` (gzip level 9) next to\n * every compressible build asset instead, once, and the server picks one by\n * `Accept-Encoding`.\n *\n * What the build emitted (and what it carried over from earlier releases, see\n * `previousAssets.ts`) is recorded in `dist/client/.vite/static-assets.json`,\n * with the encodings each file has. The server reads it at boot: a file in the\n * record is a content-hashed build asset, so it is sent as `immutable`, and\n * only the encodings listed for it are offered. A file not in the record (one\n * copied from `public/assets/`, or anything in a build made before this\n * existed) is served as before.\n */\n\n/** Relative to `dist/client`; beside Vite's own manifest, so never served. */\nexport const STATIC_ASSETS_RECORD = \".vite/static-assets.json\";\n\n/**\n * Below this, the encoded body plus its header is not worth a second request\n * representation: a 600-byte chunk saves a few hundred bytes at most, and\n * every file with siblings adds a `stat` per request.\n */\nexport const PRECOMPRESS_MIN_BYTES = 1024;\n\n/**\n * Text-like formats that compress well. Already-compressed formats (images,\n * `woff`/`woff2`, video) are left out: brotli shaves a percent or two off\n * them at best. Source maps are left out because a page never loads one, and\n * only devtools would gain from the extra build time.\n */\nconst COMPRESSIBLE = /\\.(?:m?js|cjs|css|svg|json|webmanifest|wasm|txt|xml|ttf|otf|eot)$/i;\n\nconst TEXT = /\\.(?:m?js|cjs|css|svg|json|webmanifest|txt|xml)$/i;\nconst FONT = /\\.(?:ttf|otf|eot)$/i;\n\nexport const SIBLING_EXTENSION: Record<ContentEncoding, string> = {\n br: \".br\",\n gzip: \".gz\",\n};\n\n/** Server preference: brotli is ~15% smaller than gzip -9 on a JS chunk. */\nconst ENCODINGS: ContentEncoding[] = [\"br\", \"gzip\"];\n\nexport interface StaticAssetsRecord {\n /**\n * Path relative to `dist/client` (`assets/client-DJhrQPW5.js`) → the\n * precompressed siblings it has, in preference order. An empty list is a\n * build asset that is served as identity only (an image, a small file).\n */\n files: Record<string, ContentEncoding[]>;\n}\n\nexport interface PrecompressStats {\n files: number;\n identityBytes: number;\n brBytes: number;\n gzipBytes: number;\n}\n\nconst brotli = promisify(brotliCompress);\nconst gzipAsync = promisify(gzip);\n\nexport function isPrecompressible(file: string): boolean {\n return COMPRESSIBLE.test(file);\n}\n\n/** `true` for `x.js.br` / `x.js.gz`: a sibling, not an asset of its own. */\nexport function isEncodedSibling(file: string): boolean {\n return file.endsWith(\".br\") || file.endsWith(\".gz\");\n}\n\nasync function encode(encoding: ContentEncoding, file: string, input: Buffer): Promise<Buffer> {\n if (encoding === \"gzip\") {\n return gzipAsync(input, { level: 9 });\n }\n return brotli(input, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MAX_QUALITY,\n [constants.BROTLI_PARAM_MODE]: TEXT.test(file)\n ? constants.BROTLI_MODE_TEXT\n : FONT.test(file)\n ? constants.BROTLI_MODE_FONT\n : constants.BROTLI_MODE_GENERIC,\n [constants.BROTLI_PARAM_SIZE_HINT]: input.length,\n },\n });\n}\n\nasync function fileSize(path: string): Promise<number | null> {\n try {\n const info = await stat(path);\n return info.isFile() ? info.size : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Writes the `.br`/`.gz` siblings of `files` (paths relative to `clientDir`)\n * and returns the encodings each one ended up with.\n *\n * A sibling is only kept when it is smaller than the file itself; one that is\n * not would cost bytes on the wire, so the file is served as identity for\n * that encoding. With `reuseExisting`, a sibling already on disk is trusted\n * rather than rebuilt — for files carried from an earlier release, whose\n * siblings were copied with them and match by content hash.\n */\nexport async function precompressAssets(\n clientDir: string,\n files: Iterable<string>,\n options: {\n reuseExisting?: boolean;\n minBytes?: number;\n concurrency?: number;\n } = {},\n): Promise<{ record: StaticAssetsRecord; stats: PrecompressStats }> {\n const minBytes = options.minBytes ?? PRECOMPRESS_MIN_BYTES;\n const record: StaticAssetsRecord = { files: {} };\n const stats: PrecompressStats = {\n files: 0,\n identityBytes: 0,\n brBytes: 0,\n gzipBytes: 0,\n };\n\n const queue = [...new Set(files)];\n for (const file of queue) {\n record.files[file] = [];\n }\n\n async function work(file: string) {\n if (!isPrecompressible(file)) {\n return;\n }\n const path = join(clientDir, file);\n const size = await fileSize(path);\n if (size === null || size < minBytes) {\n return;\n }\n\n let input: Buffer | null = null;\n const available: ContentEncoding[] = [];\n const sizes: Partial<Record<ContentEncoding, number>> = {};\n for (const encoding of ENCODINGS) {\n const siblingPath = path + SIBLING_EXTENSION[encoding];\n const existing = options.reuseExisting ? await fileSize(siblingPath) : null;\n if (existing !== null) {\n if (existing < size) {\n available.push(encoding);\n sizes[encoding] = existing;\n }\n continue;\n }\n input ??= await readFile(path);\n const output = await encode(encoding, file, input);\n if (output.length < size) {\n await writeFile(siblingPath, output);\n available.push(encoding);\n sizes[encoding] = output.length;\n }\n }\n\n record.files[file] = available;\n if (available.length > 0) {\n stats.files += 1;\n stats.identityBytes += size;\n stats.brBytes += sizes.br ?? size;\n stats.gzipBytes += sizes.gzip ?? size;\n }\n }\n\n // zlib's async calls run on the libuv thread pool; a few files in flight\n // keep it busy without reading the whole bundle into memory at once.\n const concurrency = Math.max(1, options.concurrency ?? Math.min(8, availableParallelism()));\n let next = 0;\n await Promise.all(\n Array.from({ length: Math.min(concurrency, queue.length) }, async () => {\n while (next < queue.length) {\n await work(queue[next++]);\n }\n }),\n );\n\n return { record, stats };\n}\n\nexport async function writeStaticAssetsRecord(clientDir: string, record: StaticAssetsRecord) {\n const path = join(clientDir, STATIC_ASSETS_RECORD);\n await mkdir(dirname(path), { recursive: true });\n // Sorted, so two builds of the same tree write the same file.\n const files = Object.fromEntries(\n Object.entries(record.files).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),\n );\n await writeFile(path, `${JSON.stringify({ files }, null, 2)}\\n`);\n}\n\n/**\n * The record a build wrote, or `null` when there is none (a build made before\n * precompression, or an incomplete `dist/`): the server then serves every file\n * as before. A malformed entry is dropped rather than trusted.\n */\nexport async function readStaticAssetsRecord(\n clientDir: string,\n): Promise<StaticAssetsRecord | null> {\n let raw: string;\n try {\n raw = await readFile(join(clientDir, STATIC_ASSETS_RECORD), \"utf8\");\n } catch {\n return null;\n }\n let files: unknown;\n try {\n files = JSON.parse(raw)?.files;\n } catch {\n return null;\n }\n if (!files || typeof files !== \"object\") {\n return null;\n }\n const record: StaticAssetsRecord = { files: {} };\n for (const [file, encodings] of Object.entries(files)) {\n if (!Array.isArray(encodings)) continue;\n record.files[file] = ENCODINGS.filter((encoding) => encodings.includes(encoding));\n }\n return record;\n}\n",
|
|
9
9
|
"export function generateETag(lastModified: number): string {\n // Assuming the last modified timestamp is in milliseconds\n const lastModifiedStr = lastModified.toString();\n\n const hasher = new Bun.CryptoHasher(\"sha1\");\n hasher.update(lastModifiedStr);\n const hash = hasher.digest(\"hex\");\n\n return hash;\n}\n",
|
|
10
10
|
"import { DEFAULT_ASSET_BASE, assetUrl } from \"../config/assetBase\";\nimport { ISLAND_ENTRY_QUERY } from \"../internal/islandRuntime\";\n\n/** The subset of a Vite manifest entry this module reads. */\nexport interface ViteManifestChunk {\n file: string;\n imports?: string[];\n dynamicImports?: string[];\n}\n\nexport type ViteManifest = Record<string, ViteManifestChunk>;\n\n/** Vite's manifest key for the module that boots hydration. */\nexport const CLIENT_ENTRY_KEY = \"app/client.tsx\";\n\n/**\n * How the shell boots hydration in production: `module` is imported from the\n * bootstrap script, `preload` is every chunk that import pulls in — see\n * `clientEntry` in `ViewRouteDispatcher` for why the entry does not go through\n * React's `bootstrapModules`.\n *\n * `undefined` when the manifest has no client entry, which means a `dist/`\n * interrupted between the server and client build passes. Degrading beats\n * throwing here: this runs at boot, so a deref would take down API routes,\n * static assets and health checks over what is only a document concern, and\n * the dispatcher already renders a shell that simply does not hydrate.\n *\n * `assetBase` is the base the client build recorded — see `readBuiltAssetBase`.\n */\nexport function createClientEntry(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): { module: string; preload: string[] } | undefined {\n const file = manifest[CLIENT_ENTRY_KEY]?.file;\n if (!file) {\n return undefined;\n }\n return {\n module: assetUrl(file, assetBase),\n preload: collectModulePreloads(manifest, CLIENT_ENTRY_KEY, assetBase),\n };\n}\n\n/**\n * Every chunk URL that importing `entryKey` pulls in, itself first.\n *\n * The browser can only discover these one parse at a time — it learns about a\n * chunk's static imports after the chunk has arrived and been parsed — so a\n * `layout -> view -> child component` graph costs one round trip per level.\n * Handing the whole list to the shell as `modulepreload` hints turns that\n * chain into one parallel fetch (#352).\n *\n * `dynamicImports` are deliberately left out: those are the pieces the app\n * asked to load lazily, and preloading them would download code the current\n * route may never render.\n */\nexport function collectModulePreloads(\n manifest: ViteManifest,\n entryKey: string,\n assetBase: string = DEFAULT_ASSET_BASE,\n): string[] {\n const urls: string[] = [];\n // Chunk graphs are cyclic often enough (two chunks importing each other\n // through a shared module) that walking them without a visited set hangs.\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk?.file) return;\n urls.push(assetUrl(chunk.file, assetBase));\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n\n walk(entryKey);\n\n return urls;\n}\n\n/**\n * The chunks the static import closure of `entryKey` loads lazily, each with\n * its own static closure, minus what that closure already has: every\n * `import()` in the entry's code (and its static dependencies'), one level\n * deep. An island with `preloadDynamic` gets these preloaded too (#932).\n *\n * Dynamic imports into `node_modules` are left out: those are a library's own\n * lazy pieces (gemi's client loads a few on first use), not the app's.\n */\nexport function collectDynamicPreloads(\n manifest: ViteManifest,\n entryKey: string,\n assetBase: string = DEFAULT_ASSET_BASE,\n): string[] {\n const seen = new Set(collectModulePreloads(manifest, entryKey, assetBase));\n const targets: string[] = [];\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk) return;\n for (const target of chunk.dynamicImports ?? []) {\n if (!/(^|\\/)node_modules\\//.test(target) && !targets.includes(target)) {\n targets.push(target);\n }\n }\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n walk(entryKey);\n\n const urls: string[] = [];\n for (const target of targets) {\n for (const url of collectModulePreloads(manifest, target, assetBase)) {\n if (!seen.has(url)) {\n seen.add(url);\n urls.push(url);\n }\n }\n }\n return urls;\n}\n\n/**\n * Every CSS file the static import closure of `entryKey` carries, in import\n * order and without repeats. Vite lists a chunk's CSS on that chunk only, not\n * on the entries that import it, so a page with no client router to load the\n * rest (a static view) has to walk the graph for it.\n */\nexport function collectCss(manifest: ViteManifest, entryKey: string): string[] {\n const files: string[] = [];\n const seen = new Set<string>();\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key] as ViteManifestChunk & { css?: string[] };\n if (!chunk) return;\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n for (const file of chunk.css ?? []) {\n if (!seen.has(file)) {\n seen.add(file);\n files.push(file);\n }\n }\n };\n\n walk(entryKey);\n return files;\n}\n\n/**\n * Where a static page's islands load from: each island module's entry\n * (`<key>?gemi-island`, the module plus the hydrate function), with the\n * chunks importing it pulls in, itself first. React and `react-dom/client`\n * are among those. `dynamicPreload` is what the entry loads lazily (see\n * `collectDynamicPreloads`), for an island with `preloadDynamic`.\n * `undefined` for a module the client build has no island entry for.\n */\nexport function createIslandResolver(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): (moduleKey: string) => { src: string; preload: string[]; dynamicPreload: string[] } | undefined {\n const cache = new Map<\n string,\n { src: string; preload: string[]; dynamicPreload: string[] } | undefined\n >();\n return (moduleKey) => {\n if (!cache.has(moduleKey)) {\n const key = `${moduleKey}${ISLAND_ENTRY_QUERY}`;\n const file = manifest[key]?.file;\n cache.set(\n moduleKey,\n file\n ? {\n src: assetUrl(file, assetBase),\n preload: collectModulePreloads(manifest, key, assetBase),\n dynamicPreload: collectDynamicPreloads(manifest, key, assetBase),\n }\n : undefined,\n );\n }\n return cache.get(moduleKey);\n };\n}\n",
|
|
11
|
-
"/**\n * Recovery from a chunk that will not load — almost always a document from an\n * earlier release asking for a chunk the server it reached no longer has\n * (#548). The page cannot continue with the module it wanted, and a full load\n * of the URL it was heading to gets it the current release's document.\n *\n * One reload per page, guarded: a reload that lands on the same failure (a\n * chunk that is genuinely missing, a proxy that keeps refusing it) must not\n * become a loop. A `sessionStorage` marker records when each URL was reloaded\n * onto and survives the reload it guards, so a second failure for the same URL\n * inside the cooldown is left to the route's error boundary. Per URL rather\n * than per tab (#1056): while two releases serve at once every navigation can\n * miss, and a tab-wide cooldown sent the second one to the error boundary.\n * Where `sessionStorage` cannot be used, the marker lives in `window.name`\n * instead (#1186); see `chunkReloadGuard`.\n *\n * The same guard covers a navigation whose data came from another build\n * (`recoverFromBuildMismatch`).\n *\n * No DOM or React import at module scope: the server's reload stub\n * (`server/staticAssetMiss.ts`) embeds the same guard as a script.\n */\n\n/** The `sessionStorage` key the guard lives under, shared with the reload stub. */\nexport const CHUNK_RELOAD_MARKER = \"gemi:chunk-reload\";\n\n/**\n * The response header carrying the client build id on a `.json` navigation\n * (#1056). The document carries its own as `buildId`; they differ when the\n * request reached a server running another release.\n */\nexport const BUILD_HEADER = \"x-gemi-build\";\n\n/** How long after a recovery reload onto a URL another one onto it is refused. */\nexport const DEFAULT_CHUNK_RELOAD_COOLDOWN_MS = 30_000;\n\n/**\n * Where the failure surfaced: a route's view chunk during a client-side\n * navigation or hydration, a `vite:preloadError` (a lazy `import()` in app\n * code, through Vite's preload helper), or an app calling\n * `recoverFromChunkLoadError` from its own error boundary.\n */\nexport type ChunkLoadErrorSource = \"navigation\" | \"hydration\" | \"preload\" | \"app\";\n\n/**\n * Why gemi will not reload, or `null` when it will:\n * - `cooldown`: it already reloaded onto this URL within `cooldownMs`.\n * - `offline`: `navigator.onLine` is false — a reload would only fail harder.\n * - `storage`: neither `sessionStorage` nor the `window.name` fallback can\n * hold the guard, so it cannot survive the reload and the loop it prevents\n * could not be ruled out.\n */\nexport type ChunkReloadBlock = \"cooldown\" | \"offline\" | \"storage\" | null;\n\nexport interface ChunkLoadErrorContext {\n error: unknown;\n /** The URL the reload goes to: the page being navigated to. */\n url: string;\n source: ChunkLoadErrorSource;\n /** Why gemi will not reload, or `null` when it is about to. */\n blocked: ChunkReloadBlock;\n}\n\nexport interface BuildMismatchContext {\n /** The URL the full page load goes to: the page being navigated to. */\n url: string;\n /** The build the page was loaded with. */\n clientBuild: string;\n /** The build that answered the navigation. */\n serverBuild: string;\n /** Why gemi will not reload, or `null` when it is about to. */\n blocked: ChunkReloadBlock;\n}\n\nexport interface ChunkLoadRecoveryOptions {\n /** Default 30 000 ms. */\n cooldownMs?: number;\n /**\n * Called for every chunk load failure gemi sees, before it reloads — the\n * place to report it, or to veto the reload (unsaved input, a page that\n * would rather show its own \"a new version is available\" prompt). Return\n * `false` to skip the reload; anything else lets gemi proceed. It is called\n * when the reload is blocked too, with `blocked` saying why.\n */\n onChunkLoadError?: (context: ChunkLoadErrorContext) => boolean | void;\n /**\n * Called when a client-side navigation's data came from another build (a\n * deploy in progress, two releases behind one load balancer), before gemi\n * loads the page in full. Return `false` to skip that and render the data\n * anyway. Called when the load is blocked too, with `blocked` saying why.\n */\n onBuildMismatch?: (context: BuildMismatchContext) => boolean | void;\n}\n\nlet enabled = true;\nlet options: ChunkLoadRecoveryOptions = {};\n/**\n * The full load gemi started and the page is still waiting on: further\n * failures of the same navigation (a route with several views fails once per\n * view) report it as under way instead of starting another.\n *\n * Not a latch for the life of the page: the load can be cancelled — \"Stay\" on\n * a `beforeunload` prompt (a dirty editor), a handler that stops it — and the\n * page then keeps running with no load coming. It holds only for the\n * navigation that started it (`navigationStarted` clears it) and for the\n * cooldown, so a later failure is judged on its own: another URL loads in\n * full, the same URL inside the cooldown is refused (the data renders, the\n * view's error boundary shows), and after the cooldown it loads again.\n */\nlet pendingLoad: { url: string; at: number } | null = null;\n\n/**\n * Sets how gemi recovers from a failed chunk. `false` turns recovery off: the\n * failure goes to the route's error boundary as it did before. `init` calls\n * this with its `chunkLoadRecovery` option.\n */\nexport function configureChunkLoadRecovery(next: ChunkLoadRecoveryOptions | false | undefined) {\n enabled = next !== false;\n options = next || {};\n}\n\n/** For tests: back to the defaults, with no reload in flight. */\nexport function __resetChunkLoadRecovery() {\n enabled = true;\n options = {};\n pendingLoad = null;\n}\n\n/**\n * The router calls this as each client-side navigation starts. A full load\n * still pending from an earlier one was cancelled (the page would be gone\n * otherwise), so it no longer speaks for this navigation's failures.\n */\nexport function navigationStarted() {\n pendingLoad = null;\n}\n\n/** Whether a full load onto `url` is already under way. */\nfunction loadPending(url: string): boolean {\n return (\n pendingLoad !== null &&\n pendingLoad.url === url &&\n withinCooldown(Date.now() - pendingLoad.at, cooldownMs())\n );\n}\n\n/**\n * Whether `error` is a module that failed to load rather than one that loaded\n * and threw. Each engine words it differently:\n *\n * - Chromium: `Failed to fetch dynamically imported module: <url>`\n * - Firefox: `error loading dynamically imported module: <url>`\n * - Safari: `Importing a module script failed.`, and on iOS 16\n * `Importing module '<specifier>' is not found.` (folio#2117)\n * - Vite's preload helper: `Unable to preload CSS for <url>`\n *\n * A view that throws while evaluating is not one of these, and reloading\n * would only hide it.\n */\nexport function isChunkLoadError(error: unknown): boolean {\n if (!error || typeof error !== \"object\") {\n return false;\n }\n const { name, message } = error as { name?: unknown; message?: unknown };\n if (name === \"ChunkLoadError\") {\n return true;\n }\n if (typeof message !== \"string\") {\n return false;\n }\n return CHUNK_LOAD_MESSAGES.some((pattern) => pattern.test(message));\n}\n\nconst CHUNK_LOAD_MESSAGES = [\n /failed to fetch dynamically imported module/i,\n /error loading dynamically imported module/i,\n /importing a module script failed/i,\n /importing module .* is not found/i,\n /unable to preload css/i,\n /failed to load module script/i,\n];\n\n/**\n * Reloads the page onto `url` once for a chunk that failed to load, unless the\n * guard or the app's `onChunkLoadError` says not to. Returns whether a reload\n * was started.\n *\n * Errors that are not chunk failures are ignored (`false`), so an app's error\n * boundary can pass everything it catches here.\n */\nexport function recoverFromChunkLoadError(\n error: unknown,\n { source = \"app\", url }: { source?: ChunkLoadErrorSource; url?: string } = {},\n): boolean {\n if (typeof window === \"undefined\" || !enabled || !isChunkLoadError(error)) {\n return false;\n }\n const target = url ?? window.location.href;\n if (loadPending(target)) {\n // A route with several views fails once per view; the first one reloads.\n return true;\n }\n const blocked = reloadBlock(target);\n\n if (options.onChunkLoadError?.({ error, url: target, source, blocked }) === false) {\n return false;\n }\n return loadInFull(target, blocked);\n}\n\n/**\n * Loads `url` in full because the navigation to it got its data from another\n * build (#1056): the views this page runs were not written for that data, and\n * rendering it anyway is how a deploy turned into \"Something went wrong\". The\n * full load gets a document and views of one build. Same guard as a chunk\n * failure, once per URL per cooldown; a navigation refused here renders the\n * data as before. Returns whether the page load was started.\n */\nexport function recoverFromBuildMismatch({\n url,\n clientBuild,\n serverBuild,\n}: {\n url: string;\n clientBuild: string;\n serverBuild: string;\n}): boolean {\n if (typeof window === \"undefined\" || !enabled) {\n return false;\n }\n if (loadPending(url)) {\n return true;\n }\n const blocked = reloadBlock(url);\n if (options.onBuildMismatch?.({ url, clientBuild, serverBuild, blocked }) === false) {\n return false;\n }\n return loadInFull(url, blocked);\n}\n\n/**\n * The build that answered a `.json` navigation, when it is not `clientBuild`;\n * otherwise `null`. Unknown on either side (dev, a test double, a server from\n * before the header) is not a mismatch.\n */\nexport function otherBuild(response: Response, clientBuild: string | undefined): string | null {\n const served = response.headers?.get?.(BUILD_HEADER);\n return clientBuild && served && served !== clientBuild ? served : null;\n}\n\nfunction loadInFull(target: string, blocked: ChunkReloadBlock): boolean {\n if (blocked !== null || !markReload(target)) {\n return false;\n }\n\n pendingLoad = { url: target, at: Date.now() };\n if (target === window.location.href) {\n window.location.reload();\n } else {\n window.location.assign(target);\n }\n return true;\n}\n\nfunction cooldownMs() {\n return options.cooldownMs ?? DEFAULT_CHUNK_RELOAD_COOLDOWN_MS;\n}\n\nfunction reloadBlock(url: string): ChunkReloadBlock {\n if (typeof navigator !== \"undefined\" && navigator.onLine === false) {\n return \"offline\";\n }\n const verdict = chunkReloadGuard(CHUNK_RELOAD_MARKER, url, cooldownMs(), false);\n return verdict === \"ok\" ? null : verdict;\n}\n\n// A marker from the future (the clock was set back since it was written) is\n// stale rather than a cooldown that lasts until the clock catches up.\nfunction withinCooldown(elapsed: number, cooldownMs: number): boolean {\n return elapsed >= 0 && elapsed < cooldownMs;\n}\n\nfunction markReload(url: string): boolean {\n return chunkReloadGuard(CHUNK_RELOAD_MARKER, url, cooldownMs(), true) === \"ok\";\n}\n\n/**\n * The cross-document guard, shared by the client and the server's reload stub\n * (which embeds this function's source, so it uses nothing but globals and its\n * arguments). With `claim` false it only reads: `\"cooldown\"` when a reload\n * onto `url` was recorded inside `cooldownMs`, `\"storage\"` when no marker can\n * be read at all, otherwise `\"ok\"`. With `claim` true it also records the\n * reload, and answers `\"ok\"` only once the record was written and read back\n * unchanged; a caller navigates on nothing less.\n *\n * Two places can hold the marker:\n *\n * - `sessionStorage[key]`: `{ [url]: at }`, the format earlier releases read\n * and write, so a page from one and a stub from another share the guard.\n * - `window.name`, when `sessionStorage` throws or will not take the write\n * (#1186). It survives a load in the same tab, but it is shared state: the\n * page may use it, and another origin the tab goes to can read it. So it is\n * used only while it is empty or already holds gemi's marker — a value of\n * anyone else's is left exactly as it is, and the guard then fails closed —\n * and it holds no URL: `key + \":\" + { o: hash(origin), m: { [hash(origin +\n * pathname)]: at } }`. A marker written by another origin (`o` differs) or\n * one that does not parse holds no reloads and is replaced on the next\n * write. Two paths whose hashes collide share one cooldown, which only ever\n * refuses a reload.\n *\n * A reload recorded in either place counts. Entries past the cooldown — and\n * from the future, after the clock was set back — are dropped as a new one is\n * written, so the marker holds only the reloads it still guards.\n */\nexport function chunkReloadGuard(\n key: string,\n url: string,\n cooldownMs: number,\n claim: boolean,\n): \"ok\" | \"cooldown\" | \"storage\" {\n const now = Date.now();\n const fresh = function (at: unknown) {\n return typeof at === \"number\" && now - at >= 0 && now - at < cooldownMs;\n };\n const parse = function (raw: string | null): Record<string, unknown> {\n try {\n const value = raw ? JSON.parse(raw) : null;\n return value && typeof value === \"object\" && !Array.isArray(value) ? value : {};\n } catch {\n return {};\n }\n };\n const live = function (marker: Record<string, unknown>) {\n const kept: Record<string, number> = {};\n for (const k in marker) if (fresh(marker[k])) kept[k] = marker[k] as number;\n return kept;\n };\n // FNV-1a, 32 bits, base 36: a short tag, not a secret.\n const hash = function (text: string) {\n let h = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) h = Math.imul(h ^ text.charCodeAt(i), 0x01000193);\n return (h >>> 0).toString(36);\n };\n\n let storage: Storage | null = null;\n let stored: Record<string, unknown> = {};\n try {\n storage = window.sessionStorage;\n stored = parse(storage.getItem(key));\n } catch {\n storage = null;\n }\n\n const prefix = key + \":\";\n let origin = \"\";\n let page = \"\";\n try {\n const target = new URL(url, window.location.href);\n origin = hash(new URL(window.location.href).origin);\n page = hash(target.origin + target.pathname);\n } catch {}\n // `null`: `window.name` is not ours to use (or there is no page to key on).\n let named: Record<string, unknown> | null = null;\n try {\n const name = window.name;\n if (!page) {\n named = null;\n } else if (name === \"\") {\n named = {};\n } else if (name.indexOf(prefix) === 0) {\n const held = parse(name.slice(prefix.length));\n const entries = held.m;\n named =\n held.o === origin && entries && typeof entries === \"object\" && !Array.isArray(entries)\n ? (entries as Record<string, unknown>)\n : {};\n }\n } catch {\n named = null;\n }\n\n if (fresh(stored[url]) || (named && fresh(named[page]))) return \"cooldown\";\n if (!storage && !named) return \"storage\";\n if (!claim) return \"ok\";\n\n if (storage) {\n try {\n const nextStored = live(stored);\n nextStored[url] = now;\n const serialised = JSON.stringify(nextStored);\n storage.setItem(key, serialised);\n if (storage.getItem(key) === serialised) return \"ok\";\n } catch {}\n }\n if (named) {\n try {\n const nextNamed = live(named);\n nextNamed[page] = now;\n const value = prefix + JSON.stringify({ o: origin, m: nextNamed });\n window.name = value;\n if (window.name === value) return \"ok\";\n } catch {}\n }\n return \"storage\";\n}\n\n/**\n * The same guard as a classic script body, for the module the server sends in\n * place of a chunk it does not have. It reloads once per URL per cooldown;\n * inside the cooldown (or with no marker that would survive the reload) it\n * throws an error `isChunkLoadError` recognises, so the importing page's own\n * recovery and error boundary see the failure instead of a module that\n * silently has no exports. It runs `chunkReloadGuard` itself, so it and the\n * page's client share one marker and one reload between them.\n */\nexport function chunkReloadStubScript(\n pathname: string,\n cooldownMs: number = DEFAULT_CHUNK_RELOAD_COOLDOWN_MS,\n): string {\n const key = JSON.stringify(CHUNK_RELOAD_MARKER);\n const error = JSON.stringify(`Failed to fetch dynamically imported module: ${pathname}`);\n return (\n `var g=${chunkReloadGuard.toString()};var r=!1;` +\n `try{r=navigator.onLine!==!1&&g(${key},window.location.href,${Number(cooldownMs)},!0)===\"ok\"}catch(e){}` +\n `if(r)window.location.reload();else throw new Error(${error});export {}`\n );\n}\n",
|
|
11
|
+
"/**\n * Recovery from a chunk that will not load — almost always a document from an\n * earlier release asking for a chunk the server it reached no longer has\n * (#548). The page cannot continue with the module it wanted, and a full load\n * of the URL it was heading to gets it the current release's document.\n *\n * One reload per page, guarded: a reload that lands on the same failure (a\n * chunk that is genuinely missing, a proxy that keeps refusing it) must not\n * become a loop. A `sessionStorage` marker records when each URL was reloaded\n * onto and survives the reload it guards, so a second failure for the same URL\n * inside the cooldown is left to the route's error boundary. Per URL rather\n * than per tab (#1056): while two releases serve at once every navigation can\n * miss, and a tab-wide cooldown sent the second one to the error boundary.\n * Where `sessionStorage` cannot be used, the marker lives in `window.name`\n * instead (#1186); see `chunkReloadGuard`.\n *\n * The same guard covers a navigation whose data came from another build\n * (`recoverFromBuildMismatch`).\n *\n * No DOM or React import at module scope: the server's reload stub\n * (`server/staticAssetMiss.ts`) embeds the same guard as a script.\n */\n\n/** The `sessionStorage` key the guard lives under, shared with the reload stub. */\nexport const CHUNK_RELOAD_MARKER = \"gemi:chunk-reload\";\n\n/**\n * The response header carrying the client build id on a `.json` navigation\n * (#1056). The document carries its own as `buildId`; they differ when the\n * request reached a server running another release.\n */\nexport const BUILD_HEADER = \"x-gemi-build\";\n\n/** How long after a recovery reload onto a URL another one onto it is refused. */\nexport const DEFAULT_CHUNK_RELOAD_COOLDOWN_MS = 30_000;\n\n/**\n * Where the failure surfaced: a route's view chunk during a client-side\n * navigation or hydration, a `vite:preloadError` (a lazy `import()` in app\n * code, through Vite's preload helper), or an app calling\n * `recoverFromChunkLoadError` from its own error boundary.\n */\nexport type ChunkLoadErrorSource = \"navigation\" | \"hydration\" | \"preload\" | \"app\";\n\n/**\n * Why gemi will not reload, or `null` when it will:\n * - `cooldown`: it already reloaded onto this URL within `cooldownMs`.\n * - `offline`: `navigator.onLine` is false — a reload would only fail harder.\n * - `storage`: neither `sessionStorage` nor the `window.name` fallback can\n * hold the guard, so it cannot survive the reload and the loop it prevents\n * could not be ruled out.\n */\nexport type ChunkReloadBlock = \"cooldown\" | \"offline\" | \"storage\" | null;\n\nexport interface ChunkLoadErrorContext {\n error: unknown;\n /** The URL the reload goes to: the page being navigated to. */\n url: string;\n source: ChunkLoadErrorSource;\n /** Why gemi will not reload, or `null` when it is about to. */\n blocked: ChunkReloadBlock;\n}\n\nexport interface BuildMismatchContext {\n /** The URL the full page load goes to: the page being navigated to. */\n url: string;\n /** The build the page was loaded with. */\n clientBuild: string;\n /** The build that answered the navigation. */\n serverBuild: string;\n /** Why gemi will not reload, or `null` when it is about to. */\n blocked: ChunkReloadBlock;\n}\n\nexport interface ChunkLoadRecoveryOptions {\n /** Default 30 000 ms. */\n cooldownMs?: number;\n /**\n * Called for every chunk load failure gemi sees, before it reloads — the\n * place to report it, or to veto the reload (unsaved input, a page that\n * would rather show its own \"a new version is available\" prompt). Return\n * `false` to skip the reload; anything else lets gemi proceed. It is called\n * when the reload is blocked too, with `blocked` saying why.\n */\n onChunkLoadError?: (context: ChunkLoadErrorContext) => boolean | void;\n /**\n * Called when a client-side navigation's data came from another build (a\n * deploy in progress, two releases behind one load balancer), before gemi\n * loads the page in full. Return `false` to skip that and render the data\n * anyway. Called when the load is blocked too, with `blocked` saying why.\n */\n onBuildMismatch?: (context: BuildMismatchContext) => boolean | void;\n}\n\nlet enabled = true;\nlet options: ChunkLoadRecoveryOptions = {};\n/**\n * The full load gemi started and the page is still waiting on: further\n * failures of the same navigation (a route with several views fails once per\n * view) report it as under way instead of starting another.\n *\n * Not a latch for the life of the page: the load can be cancelled — \"Stay\" on\n * a `beforeunload` prompt (a dirty editor), a handler that stops it — and the\n * page then keeps running with no load coming. It holds only for the\n * navigation that started it (`navigationStarted` clears it) and for the\n * cooldown, so a later failure is judged on its own: another URL loads in\n * full, the same URL inside the cooldown is refused (the data renders, the\n * view's error boundary shows), and after the cooldown it loads again.\n */\nlet pendingLoad: { url: string; at: number } | null = null;\n\n/**\n * Sets how gemi recovers from a failed chunk. `false` turns recovery off: the\n * failure goes to the route's error boundary as it did before. `init` calls\n * this with its `chunkLoadRecovery` option.\n */\nexport function configureChunkLoadRecovery(next: ChunkLoadRecoveryOptions | false | undefined) {\n enabled = next !== false;\n options = next || {};\n tidyWindowName();\n}\n\n/** For tests: back to the defaults, with no reload in flight. */\nexport function __resetChunkLoadRecovery() {\n enabled = true;\n options = {};\n pendingLoad = null;\n clearTimeout(tidyTimer);\n tidyTimer = undefined;\n}\n\n/**\n * The router calls this as each client-side navigation starts. A full load\n * still pending from an earlier one was cancelled (the page would be gone\n * otherwise), so it no longer speaks for this navigation's failures.\n */\nexport function navigationStarted() {\n pendingLoad = null;\n}\n\n/** Whether a full load onto `url` is already under way. */\nfunction loadPending(url: string): boolean {\n return (\n pendingLoad !== null &&\n pendingLoad.url === url &&\n withinCooldown(Date.now() - pendingLoad.at, cooldownMs())\n );\n}\n\n/**\n * Whether `error` is a module that failed to load rather than one that loaded\n * and threw. Each engine words it differently:\n *\n * - Chromium: `Failed to fetch dynamically imported module: <url>`\n * - Firefox: `error loading dynamically imported module: <url>`\n * - Safari: `Importing a module script failed.`, and on iOS 16\n * `Importing module '<specifier>' is not found.` (folio#2117)\n * - Vite's preload helper: `Unable to preload CSS for <url>`\n *\n * A view that throws while evaluating is not one of these, and reloading\n * would only hide it.\n */\nexport function isChunkLoadError(error: unknown): boolean {\n if (!error || typeof error !== \"object\") {\n return false;\n }\n const { name, message } = error as { name?: unknown; message?: unknown };\n if (name === \"ChunkLoadError\") {\n return true;\n }\n if (typeof message !== \"string\") {\n return false;\n }\n return CHUNK_LOAD_MESSAGES.some((pattern) => pattern.test(message));\n}\n\nconst CHUNK_LOAD_MESSAGES = [\n /failed to fetch dynamically imported module/i,\n /error loading dynamically imported module/i,\n /importing a module script failed/i,\n /importing module .* is not found/i,\n /unable to preload css/i,\n /failed to load module script/i,\n];\n\n/**\n * Reloads the page onto `url` once for a chunk that failed to load, unless the\n * guard or the app's `onChunkLoadError` says not to. Returns whether a reload\n * was started.\n *\n * Errors that are not chunk failures are ignored (`false`), so an app's error\n * boundary can pass everything it catches here.\n */\nexport function recoverFromChunkLoadError(\n error: unknown,\n { source = \"app\", url }: { source?: ChunkLoadErrorSource; url?: string } = {},\n): boolean {\n if (typeof window === \"undefined\" || !enabled || !isChunkLoadError(error)) {\n return false;\n }\n const target = url ?? window.location.href;\n if (loadPending(target)) {\n // A route with several views fails once per view; the first one reloads.\n return true;\n }\n const blocked = reloadBlock(target);\n\n if (options.onChunkLoadError?.({ error, url: target, source, blocked }) === false) {\n return false;\n }\n return loadInFull(target, blocked);\n}\n\n/**\n * Loads `url` in full because the navigation to it got its data from another\n * build (#1056): the views this page runs were not written for that data, and\n * rendering it anyway is how a deploy turned into \"Something went wrong\". The\n * full load gets a document and views of one build. Same guard as a chunk\n * failure, once per URL per cooldown; a navigation refused here renders the\n * data as before. Returns whether the page load was started.\n */\nexport function recoverFromBuildMismatch({\n url,\n clientBuild,\n serverBuild,\n}: {\n url: string;\n clientBuild: string;\n serverBuild: string;\n}): boolean {\n if (typeof window === \"undefined\" || !enabled) {\n return false;\n }\n if (loadPending(url)) {\n return true;\n }\n const blocked = reloadBlock(url);\n if (options.onBuildMismatch?.({ url, clientBuild, serverBuild, blocked }) === false) {\n return false;\n }\n return loadInFull(url, blocked);\n}\n\n/**\n * The build that answered a `.json` navigation, when it is not `clientBuild`;\n * otherwise `null`. Unknown on either side (dev, a test double, a server from\n * before the header) is not a mismatch.\n */\nexport function otherBuild(response: Response, clientBuild: string | undefined): string | null {\n const served = response.headers?.get?.(BUILD_HEADER);\n return clientBuild && served && served !== clientBuild ? served : null;\n}\n\nfunction loadInFull(target: string, blocked: ChunkReloadBlock): boolean {\n if (blocked !== null || !markReload(target)) {\n return false;\n }\n\n pendingLoad = { url: target, at: Date.now() };\n if (target === window.location.href) {\n window.location.reload();\n } else {\n window.location.assign(target);\n }\n return true;\n}\n\nfunction cooldownMs() {\n return options.cooldownMs ?? DEFAULT_CHUNK_RELOAD_COOLDOWN_MS;\n}\n\nfunction reloadBlock(url: string): ChunkReloadBlock {\n if (typeof navigator !== \"undefined\" && navigator.onLine === false) {\n return \"offline\";\n }\n const verdict = chunkReloadGuard(CHUNK_RELOAD_MARKER, url, cooldownMs(), false);\n return verdict === \"ok\" ? null : verdict;\n}\n\n// A marker from the future (the clock was set back since it was written) is\n// stale rather than a cooldown that lasts until the clock catches up.\nfunction withinCooldown(elapsed: number, cooldownMs: number): boolean {\n return elapsed >= 0 && elapsed < cooldownMs;\n}\n\nfunction markReload(url: string): boolean {\n if (chunkReloadGuard(CHUNK_RELOAD_MARKER, url, cooldownMs(), true) !== \"ok\") return false;\n // The load may yet be cancelled (\"Stay\" on a `beforeunload` prompt), and\n // then this page has to take the `window.name` marker down itself.\n tidyWindowName();\n return true;\n}\n\nlet tidyTimer: ReturnType<typeof setTimeout> | undefined;\n\n/**\n * Takes gemi's marker out of `window.name` (back to `\"\"`) once it guards\n * nothing (#1188): the page may want the name for itself, under the same\n * \"only while it is empty\" rule gemi follows. Now when nothing in it is live,\n * otherwise once the newest entry's cooldown has passed, checked again then\n * since a reload may have been recorded in the meantime. Only a name that\n * holds gemi's marker is ever cleared; see `chunkReloadGuard`'s `\"tidy\"`.\n */\nfunction tidyWindowName() {\n clearTimeout(tidyTimer);\n tidyTimer = undefined;\n if (typeof window === \"undefined\") return;\n let delay: number;\n try {\n if (chunkReloadGuard(CHUNK_RELOAD_MARKER, window.location.href, cooldownMs(), \"tidy\") !== \"cooldown\") {\n return;\n }\n const held = JSON.parse(window.name.slice(CHUNK_RELOAD_MARKER.length + 1));\n // An entry from the future (clock set back) is not live and holds nothing back.\n const now = Date.now();\n const latest = Math.max(\n ...Object.values(held.m).filter((at): at is number => typeof at === \"number\" && at <= now),\n );\n delay = latest + cooldownMs() - now;\n } catch {\n return;\n }\n if (!Number.isFinite(delay)) return;\n tidyTimer = setTimeout(tidyWindowName, Math.max(0, delay) + 1);\n}\n\n/**\n * The cross-document guard, shared by the client and the server's reload stub\n * (which embeds this function's source, so it uses nothing but globals and its\n * arguments). With `claim` false it only reads: `\"cooldown\"` when a reload\n * onto `url` was recorded inside `cooldownMs`, `\"storage\"` when no marker can\n * be read at all, otherwise `\"ok\"`. With `claim` true it also records the\n * reload, and answers `\"ok\"` only once the record was written and read back\n * unchanged; a caller navigates on nothing less. With `\"tidy\"` it only looks\n * at `window.name`: a gemi marker with no live entry for this origin (expired,\n * from the future, another origin's, or one that does not parse) is cleared\n * to `\"\"` and `\"ok\"` answered; `\"cooldown\"` while an entry is still live.\n *\n * Two places can hold the marker:\n *\n * - `sessionStorage[key]`: `{ [url]: at }`, the format earlier releases read\n * and write, so a page from one and a stub from another share the guard.\n * - `window.name`, when `sessionStorage` throws or will not take the write\n * (#1186). It survives a load in the same tab, but it is shared state: the\n * page may use it, and another origin the tab goes to can read it. So it is\n * used only while it is empty or already holds gemi's marker — a value of\n * anyone else's is left exactly as it is, and the guard then fails closed —\n * and it holds no URL: `key + \":\" + { o: hash(origin), m: { [hash(origin +\n * pathname)]: at } }`. A marker written by another origin (`o` differs) or\n * one that does not parse holds no reloads and is replaced on the next\n * write. Two paths whose hashes collide share one cooldown, which only ever\n * refuses a reload.\n *\n * A reload recorded in either place counts. Entries past the cooldown — and\n * from the future, after the clock was set back — are dropped as a new one is\n * written, so the marker holds only the reloads it still guards.\n */\nexport function chunkReloadGuard(\n key: string,\n url: string,\n cooldownMs: number,\n claim: boolean | \"tidy\",\n): \"ok\" | \"cooldown\" | \"storage\" {\n const now = Date.now();\n const fresh = function (at: unknown) {\n return typeof at === \"number\" && now - at >= 0 && now - at < cooldownMs;\n };\n const parse = function (raw: string | null): Record<string, unknown> {\n try {\n const value = raw ? JSON.parse(raw) : null;\n return value && typeof value === \"object\" && !Array.isArray(value) ? value : {};\n } catch {\n return {};\n }\n };\n const live = function (marker: Record<string, unknown>) {\n const kept: Record<string, number> = {};\n for (const k in marker) if (fresh(marker[k])) kept[k] = marker[k] as number;\n return kept;\n };\n // FNV-1a, 32 bits, base 36: a short tag, not a secret.\n const hash = function (text: string) {\n let h = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) h = Math.imul(h ^ text.charCodeAt(i), 0x01000193);\n return (h >>> 0).toString(36);\n };\n\n let storage: Storage | null = null;\n let stored: Record<string, unknown> = {};\n try {\n storage = window.sessionStorage;\n stored = parse(storage.getItem(key));\n } catch {\n storage = null;\n }\n\n const prefix = key + \":\";\n let origin = \"\";\n let page = \"\";\n try {\n const target = new URL(url, window.location.href);\n origin = hash(new URL(window.location.href).origin);\n page = hash(target.origin + target.pathname);\n } catch {}\n // `null`: `window.name` is not ours to use (or there is no page to key on).\n let named: Record<string, unknown> | null = null;\n try {\n const name = window.name;\n if (!page) {\n named = null;\n } else if (name === \"\") {\n named = {};\n } else if (name.indexOf(prefix) === 0) {\n const held = parse(name.slice(prefix.length));\n const entries = held.m;\n named =\n held.o === origin && entries && typeof entries === \"object\" && !Array.isArray(entries)\n ? (entries as Record<string, unknown>)\n : {};\n }\n } catch {\n named = null;\n }\n\n if (claim === \"tidy\") {\n try {\n const current = window.name;\n if (named === null || current.indexOf(prefix) !== 0) return \"ok\";\n for (const k in named) if (fresh(named[k])) return \"cooldown\";\n window.name = \"\";\n } catch {}\n return \"ok\";\n }\n if (fresh(stored[url]) || (named && fresh(named[page]))) return \"cooldown\";\n if (!storage && !named) return \"storage\";\n if (!claim) return \"ok\";\n\n if (storage) {\n try {\n const nextStored = live(stored);\n nextStored[url] = now;\n const serialised = JSON.stringify(nextStored);\n storage.setItem(key, serialised);\n if (storage.getItem(key) === serialised) return \"ok\";\n } catch {}\n }\n if (named) {\n try {\n const nextNamed = live(named);\n nextNamed[page] = now;\n const value = prefix + JSON.stringify({ o: origin, m: nextNamed });\n window.name = value;\n if (window.name === value) return \"ok\";\n } catch {}\n }\n return \"storage\";\n}\n\n/**\n * The same guard as a classic script body, for the module the server sends in\n * place of a chunk it does not have. It reloads once per URL per cooldown;\n * inside the cooldown (or with no marker that would survive the reload) it\n * throws an error `isChunkLoadError` recognises, so the importing page's own\n * recovery and error boundary see the failure instead of a module that\n * silently has no exports. It runs `chunkReloadGuard` itself, so it and the\n * page's client share one marker and one reload between them.\n */\nexport function chunkReloadStubScript(\n pathname: string,\n cooldownMs: number = DEFAULT_CHUNK_RELOAD_COOLDOWN_MS,\n): string {\n const key = JSON.stringify(CHUNK_RELOAD_MARKER);\n const error = JSON.stringify(`Failed to fetch dynamically imported module: ${pathname}`);\n return (\n `var g=${chunkReloadGuard.toString()};var r=!1;` +\n `try{r=navigator.onLine!==!1&&g(${key},window.location.href,${Number(cooldownMs)},!0)===\"ok\"}catch(e){}` +\n `if(r)window.location.reload();else throw new Error(${error});export {}`\n );\n}\n",
|
|
12
12
|
"import { isReservedAssetPath, RESERVED_ROUTE_PREFIX } from \"../services/router/ViewRouteDispatcher\";\nimport { chunkReloadStubScript } from \"../client/chunkLoadRecovery\";\n\n/**\n * A JavaScript module under `/assets/` — the only shape a client build chunk\n * has. Vite writes every chunk into `assets/` with a `.js` extension (`.mjs`\n * is accepted for a build configured to emit it).\n *\n * The extension is matched at the end of the path, not anywhere in it:\n * `includes(\".js\")` also matched `app.js.map` and `data.json`, so a missing\n * source map was answered with a script that reloads the page.\n */\nconst BUILD_CHUNK = new RegExp(`^${RESERVED_ROUTE_PREFIX}/.+\\\\.m?js$`);\n\nexport function isBuildChunkPath(pathname: string): boolean {\n return BUILD_CHUNK.test(pathname);\n}\n\n/**\n * `/assets` or anything under it — the prefix the router refuses to mount a\n * route on at boot, so nothing there is ever the app's to answer. Defined\n * beside that check so the two cannot drift apart.\n */\nexport { isReservedAssetPath };\n\n/**\n * The answer to a static-looking request with no file behind it in\n * `dist/client`, or `undefined` to hand the request to the app.\n *\n * A missing build chunk is almost always a document rendered by another\n * release asking for its own chunks — a deploy between page load and a lazy\n * `import()`, or two releases serving at once. The page cannot continue with\n * the chunk it wanted, so it gets a module that reloads it onto this release's\n * document. Only for build chunks: outside `/assets/` a `.js` path may be an\n * app route, and a classic `<script src>` answered with a reload reloads\n * forever.\n *\n * `no-store` because the stub is a stand-in for one release's chunk, served\n * under that chunk's URL. Cached — by the browser or by an edge in front of\n * the origin — it would outlive the deploy that caused it and answer the\n * request after the real chunk is back.\n *\n * The body is only the reload. An earlier version opened with\n * `if(caches){caches?.delete(distPath)}`, which was wrong three times over:\n * `CacheStorage.delete` takes a cache *name*, not a URL, so a filesystem path\n * matched nothing; that path told anyone who asked for a missing chunk where\n * the server keeps its files; and `caches` is `[SecureContext]`, so on a\n * plain-http origin the bare identifier is not defined at all and reading it\n * threw a `ReferenceError` before the reload below could run — the recovery\n * failing exactly where it was needed.\n *\n * The reload is guarded by the same `sessionStorage` marker the client\n * router's chunk recovery uses (`client/chunkLoadRecovery.ts`), so the stub\n * and the router together reload once per cooldown. A chunk that is still\n * missing after that reload makes the stub throw a chunk-load error instead —\n * the importing `import()` rejects and the route's error boundary shows,\n * where an unguarded reload used to loop.\n */\nexport function staticAssetMiss(pathname: string): Response | undefined {\n if (isBuildChunkPath(pathname)) {\n return new Response(chunkReloadStubScript(pathname), {\n headers: {\n \"Content-Type\": \"application/javascript\",\n \"Cache-Control\": \"no-store\",\n },\n });\n }\n\n // `/assets` is reserved for build output (the router rejects routes there\n // at boot), so a miss is a miss — 404 without paying for an SSR render.\n if (isReservedAssetPath(pathname)) {\n return new Response(\"Not found\", { status: 404 });\n }\n\n // Anywhere else the public-file pattern matched on extension alone, so this\n // may well be an app route — a file route like\n // `this.file(() => Bun.file(...))` mounted at `/files/logo.svg` lands here\n // too. The app answers it rather than a 404 on its behalf.\n return undefined;\n}\n",
|
|
13
13
|
"import { stringEraRefusal } from \"../http/Error\";\nimport { 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(\n JSON.stringify({ error: stringEraRefusal(\"server_error\", \"Internal Server Error\", 500) }),\n {\n status: 500,\n headers: { \"Content-Type\": \"application/json\" },\n },\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"
|
|
14
14
|
],
|
|
15
|
-
"mappings": ";ikCAAA,eAAS,UAET,SAAS,OAAM,IAAS,QCgBxB,WAAS,UACT,cAAS,oBAAW,WAAsB,QAW1C,FAAM,HAAuC,LAAC,DAAM,AAAM,JAQpD,HAAyB,DAYzB,HAAiB,JACjB,HAAqB,HAGrB,HAAa,EAEnB,SAAS,EAAW,CAAC,EAAiC,CACpD,GAAI,IAAQ,OACV,MAAO,GAKT,GAAI,CAAC,oBAAoB,KAAK,EAAI,KAAK,CAAC,EACtC,MAAO,GAET,IAAM,EAAQ,OAAO,EAAI,KAAK,CAAC,EAC/B,OAAO,OAAO,SAAS,CAAK,EAAI,KAAK,IAAI,EAAO,C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KA,OAAO,GAAqB,EAAiB,EAAK,CAAG,EAAI,GAE3D,YAAa,GAAkB,EAC/B,KAAM,QAAQ,IAAI,MAAQ,KAC1B,UAAW,GAAS,SACtB,CAAC,EAKD,OAJA,MAAM,GAAS,MAAM,CAAM,EAE3B,GAAmB,CAAE,KAAM,EAAO,KAAM,SAAQ,CAAC,EAE1C",
|
|
16
|
+
"debugId": "4281A5E4D8D0619A64756E2164756E21",
|
|
17
17
|
"names": []
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Rl as t,Ul as A}from"./chunk-vgxkt9vd.js";var o=t((b)=>{var i=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";b.isArrayBuffer=i});var y=t((g)=>{var m=o(),f=A("buffer"),B=(r,e=0,u=r.byteLength-e)=>{if(!m.isArrayBuffer(r))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return f.Buffer.from(r,e,u)},a=(r,e)=>{if(typeof r!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return e?f.Buffer.from(r,e):f.Buffer.from(r)};g.fromArrayBuffer=B;g.fromString=a});var x=t((w)=>{var n=y(),s=(r)=>{let e=n.fromString(r,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},h=(r)=>{if(typeof r==="string")return s(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},p=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return n.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};w.fromUtf8=s;w.toUint8Array=h;w.toUtf8=p});
|
|
3
3
|
export{o as $,y as aa,x as ba};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=C921C2DDD00F2B6B64756E2164756E21
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"'use strict';\n\nvar utilBufferFrom = require('@smithy/util-buffer-from');\n\nconst fromUtf8 = (input) => {\n const buf = utilBufferFrom.fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\n\nconst toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n\nconst toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n};\n\nexports.fromUtf8 = fromUtf8;\nexports.toUint8Array = toUint8Array;\nexports.toUtf8 = toUtf8;\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";+DAEA,IAAM,EAAgB,CAAC,IAAS,OAAO,cAAgB,YAAc,aAAe,aAChF,OAAO,UAAU,SAAS,KAAK,CAAG,IAAM,uBAEpC,gBAAgB,kBCHxB,IAAI,MACA,cAEE,EAAkB,CAAC,EAAO,EAAS,EAAG,EAAS,EAAM,WAAa,IAAW,CAC/E,GAAI,CAAC,EAAc,cAAc,CAAK,EAClC,MAAU,UAAU,2DAA2D,OAAO,MAAU,IAAQ,EAE5G,OAAO,EAAO,OAAO,KAAK,EAAO,EAAQ,CAAM,GAE7C,EAAa,CAAC,EAAO,IAAa,CACpC,GAAI,OAAO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