gemi 0.186.0 → 0.187.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/bin/gemi.js +8 -2
- package/dist/bin/gemi.js.map +4 -4
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-h2t135y3.js → chunk-0bzcxgks.js} +3 -3
- package/dist/{chunk-h2t135y3.js.map → chunk-0bzcxgks.js.map} +1 -1
- package/dist/{chunk-vhyabcw9.js → chunk-0jbwxas3.js} +2 -2
- package/dist/{chunk-vhyabcw9.js.map → chunk-0jbwxas3.js.map} +1 -1
- package/dist/{chunk-7b10n8m8.js → chunk-10sbvn36.js} +2 -2
- package/dist/{chunk-7b10n8m8.js.map → chunk-10sbvn36.js.map} +1 -1
- package/dist/{chunk-q6rse2fh.js → chunk-1ecvjvbg.js} +2 -2
- package/dist/{chunk-q6rse2fh.js.map → chunk-1ecvjvbg.js.map} +1 -1
- package/dist/{chunk-przahq2e.js → chunk-1x1je71f.js} +2 -2
- package/dist/{chunk-przahq2e.js.map → chunk-1x1je71f.js.map} +1 -1
- package/dist/{chunk-a1r1r1z7.js → chunk-2757n2e2.js} +2 -2
- package/dist/{chunk-a1r1r1z7.js.map → chunk-2757n2e2.js.map} +1 -1
- package/dist/{chunk-00sj67nx.js → chunk-28xqs354.js} +2 -2
- package/dist/{chunk-00sj67nx.js.map → chunk-28xqs354.js.map} +1 -1
- package/dist/{chunk-894xp2a6.js → chunk-2a4q9t8c.js} +2 -2
- package/dist/{chunk-894xp2a6.js.map → chunk-2a4q9t8c.js.map} +1 -1
- package/dist/{chunk-kzv3v0tm.js → chunk-2pj5e233.js} +3 -3
- package/dist/{chunk-kzv3v0tm.js.map → chunk-2pj5e233.js.map} +1 -1
- package/dist/{chunk-sn31ps9c.js → chunk-2ys56r3z.js} +2 -2
- package/dist/{chunk-sn31ps9c.js.map → chunk-2ys56r3z.js.map} +1 -1
- package/dist/{chunk-d5ftst76.js → chunk-3cmm9atm.js} +2 -2
- package/dist/{chunk-d5ftst76.js.map → chunk-3cmm9atm.js.map} +1 -1
- package/dist/{chunk-0ahecas6.js → chunk-3t37a4e5.js} +2 -2
- package/dist/{chunk-0ahecas6.js.map → chunk-3t37a4e5.js.map} +1 -1
- package/dist/{chunk-7gnspwra.js → chunk-3yzmzcxn.js} +2 -2
- package/dist/{chunk-7gnspwra.js.map → chunk-3yzmzcxn.js.map} +1 -1
- package/dist/{chunk-g32mpf79.js → chunk-4e99zzkt.js} +2 -2
- package/dist/{chunk-g32mpf79.js.map → chunk-4e99zzkt.js.map} +1 -1
- package/dist/{chunk-2rpz1p8g.js → chunk-5q2v29ma.js} +1 -1
- package/dist/{chunk-ty3kycy4.js → chunk-5sc7j1g0.js} +2 -2
- package/dist/{chunk-ty3kycy4.js.map → chunk-5sc7j1g0.js.map} +1 -1
- package/dist/{chunk-wtdmwmm7.js → chunk-5yj3k754.js} +3 -3
- package/dist/{chunk-wtdmwmm7.js.map → chunk-5yj3k754.js.map} +1 -1
- package/dist/{chunk-ye72q3kx.js → chunk-6cq83t7e.js} +2 -2
- package/dist/{chunk-ye72q3kx.js.map → chunk-6cq83t7e.js.map} +1 -1
- package/dist/{chunk-3fm7gmp5.js → chunk-6m5rt6xg.js} +2 -2
- package/dist/{chunk-3fm7gmp5.js.map → chunk-6m5rt6xg.js.map} +1 -1
- package/dist/{chunk-810nrvt4.js → chunk-7pes8axs.js} +2 -2
- package/dist/{chunk-810nrvt4.js.map → chunk-7pes8axs.js.map} +1 -1
- package/dist/{chunk-2qac05gb.js → chunk-8nxrgzxp.js} +2 -2
- package/dist/{chunk-2qac05gb.js.map → chunk-8nxrgzxp.js.map} +1 -1
- package/dist/{chunk-84j5b07n.js → chunk-9by5yphc.js} +1 -1
- package/dist/{chunk-zenfs4e2.js → chunk-9caq1znh.js} +3 -3
- package/dist/{chunk-zenfs4e2.js.map → chunk-9caq1znh.js.map} +1 -1
- package/dist/{chunk-zyzhqnbm.js → chunk-9sv8skzh.js} +2 -2
- package/dist/{chunk-zyzhqnbm.js.map → chunk-9sv8skzh.js.map} +1 -1
- package/dist/{chunk-3derdn99.js → chunk-aezj1erg.js} +2 -2
- package/dist/{chunk-3derdn99.js.map → chunk-aezj1erg.js.map} +1 -1
- package/dist/{chunk-gtdf51jz.js → chunk-ascbx2kb.js} +1 -1
- package/dist/{chunk-skq4g7qa.js → chunk-b3e27j6t.js} +2 -2
- package/dist/{chunk-skq4g7qa.js.map → chunk-b3e27j6t.js.map} +1 -1
- package/dist/{chunk-9mf6qzxy.js → chunk-bf88yh7q.js} +2 -2
- package/dist/{chunk-9mf6qzxy.js.map → chunk-bf88yh7q.js.map} +1 -1
- package/dist/{chunk-6tferehw.js → chunk-bw2ptzxr.js} +2 -2
- package/dist/{chunk-6tferehw.js.map → chunk-bw2ptzxr.js.map} +1 -1
- package/dist/{chunk-64r5cs5g.js → chunk-c3rn99hm.js} +1 -1
- package/dist/{chunk-a1414jdv.js → chunk-cgxk8pn8.js} +3 -3
- package/dist/{chunk-a1414jdv.js.map → chunk-cgxk8pn8.js.map} +1 -1
- package/dist/{chunk-srsmhbpt.js → chunk-d19x7t1z.js} +2 -2
- package/dist/{chunk-srsmhbpt.js.map → chunk-d19x7t1z.js.map} +1 -1
- package/dist/{chunk-m906xc76.js → chunk-dwt3p2aw.js} +2 -2
- package/dist/{chunk-m906xc76.js.map → chunk-dwt3p2aw.js.map} +1 -1
- package/dist/{chunk-yaacfbky.js → chunk-eeqfp05r.js} +2 -2
- package/dist/{chunk-yaacfbky.js.map → chunk-eeqfp05r.js.map} +1 -1
- package/dist/{chunk-7dhvb6nn.js → chunk-epmtvd6j.js} +2 -2
- package/dist/{chunk-7dhvb6nn.js.map → chunk-epmtvd6j.js.map} +1 -1
- package/dist/{chunk-87nekrjj.js → chunk-gap8ta5q.js} +2 -2
- package/dist/{chunk-87nekrjj.js.map → chunk-gap8ta5q.js.map} +1 -1
- package/dist/chunk-ghf4kgs6.js +5 -0
- package/dist/{chunk-f25x1sn1.js.map → chunk-ghf4kgs6.js.map} +1 -1
- package/dist/{chunk-c07s6w45.js → chunk-gpsqtjx5.js} +1 -1
- package/dist/{chunk-6daabbfj.js → chunk-gw9sy16b.js} +2 -2
- package/dist/{chunk-6daabbfj.js.map → chunk-gw9sy16b.js.map} +1 -1
- package/dist/{chunk-z65e3vdy.js → chunk-hc58rnwq.js} +2 -2
- package/dist/{chunk-z65e3vdy.js.map → chunk-hc58rnwq.js.map} +1 -1
- package/dist/{chunk-87pn20z5.js → chunk-jg1n0b5e.js} +2 -2
- package/dist/{chunk-87pn20z5.js.map → chunk-jg1n0b5e.js.map} +1 -1
- package/dist/{chunk-ecv4mtgh.js → chunk-jqdqpdss.js} +2 -2
- package/dist/{chunk-ecv4mtgh.js.map → chunk-jqdqpdss.js.map} +1 -1
- package/dist/{chunk-7bz43qbt.js → chunk-jx8n3w5j.js} +3 -3
- package/dist/{chunk-7bz43qbt.js.map → chunk-jx8n3w5j.js.map} +1 -1
- package/dist/{chunk-f2tjtwm0.js → chunk-kgsmh0v0.js} +2 -2
- package/dist/{chunk-f2tjtwm0.js.map → chunk-kgsmh0v0.js.map} +1 -1
- package/dist/{chunk-xjb2kzkj.js → chunk-kj6wqkjc.js} +4 -4
- package/dist/{chunk-xjb2kzkj.js.map → chunk-kj6wqkjc.js.map} +1 -1
- package/dist/{chunk-yx03gndz.js → chunk-kqwenh9b.js} +2 -2
- package/dist/{chunk-yx03gndz.js.map → chunk-kqwenh9b.js.map} +1 -1
- package/dist/{chunk-96r16t57.js → chunk-m62jshaz.js} +3 -3
- package/dist/{chunk-96r16t57.js.map → chunk-m62jshaz.js.map} +1 -1
- package/dist/{chunk-beqhakdf.js → chunk-n2vx8eqm.js} +2 -2
- package/dist/{chunk-beqhakdf.js.map → chunk-n2vx8eqm.js.map} +1 -1
- package/dist/chunk-n7nx6hby.js +117 -0
- package/dist/{chunk-0rkastve.js.map → chunk-n7nx6hby.js.map} +15 -8
- package/dist/{chunk-dh4ax9cj.js → chunk-nchyjgpr.js} +2 -2
- package/dist/{chunk-dh4ax9cj.js.map → chunk-nchyjgpr.js.map} +1 -1
- package/dist/{chunk-spmxhsze.js → chunk-nd2vajx0.js} +2 -2
- package/dist/{chunk-spmxhsze.js.map → chunk-nd2vajx0.js.map} +1 -1
- package/dist/{chunk-288ee6av.js → chunk-nwafkabk.js} +2 -2
- package/dist/{chunk-288ee6av.js.map → chunk-nwafkabk.js.map} +1 -1
- package/dist/{chunk-7tm669mw.js → chunk-pcc8v9jc.js} +2 -2
- package/dist/{chunk-7tm669mw.js.map → chunk-pcc8v9jc.js.map} +1 -1
- package/dist/{chunk-mpreff3t.js → chunk-q7nz3b4q.js} +2 -2
- package/dist/{chunk-mpreff3t.js.map → chunk-q7nz3b4q.js.map} +1 -1
- package/dist/{chunk-6d3527qt.js → chunk-qj138p8j.js} +2 -2
- package/dist/{chunk-6d3527qt.js.map → chunk-qj138p8j.js.map} +1 -1
- package/dist/{chunk-tvkdqnhv.js → chunk-rsnm21vr.js} +3 -3
- package/dist/{chunk-tvkdqnhv.js.map → chunk-rsnm21vr.js.map} +1 -1
- package/dist/{chunk-fdpvgeey.js → chunk-rztf3yam.js} +2 -2
- package/dist/{chunk-fdpvgeey.js.map → chunk-rztf3yam.js.map} +1 -1
- package/dist/{chunk-e38xa29v.js → chunk-s52ecbdd.js} +2 -2
- package/dist/{chunk-e38xa29v.js.map → chunk-s52ecbdd.js.map} +1 -1
- package/dist/{chunk-dezd1fn5.js → chunk-s5p7pd7v.js} +2 -2
- package/dist/{chunk-dezd1fn5.js.map → chunk-s5p7pd7v.js.map} +1 -1
- package/dist/{chunk-kcvzs31p.js → chunk-sg8fcsvn.js} +2 -2
- package/dist/{chunk-kcvzs31p.js.map → chunk-sg8fcsvn.js.map} +1 -1
- package/dist/{chunk-xgg9w7ep.js → chunk-tnqvxzbw.js} +2 -2
- package/dist/{chunk-xgg9w7ep.js.map → chunk-tnqvxzbw.js.map} +1 -1
- package/dist/{chunk-rdnxkecg.js → chunk-tns989kw.js} +2 -2
- package/dist/{chunk-rdnxkecg.js.map → chunk-tns989kw.js.map} +1 -1
- package/dist/{chunk-cf5a958j.js → chunk-ttcmvam5.js} +2 -2
- package/dist/{chunk-cf5a958j.js.map → chunk-ttcmvam5.js.map} +1 -1
- package/dist/{chunk-z2k8m02z.js → chunk-twn4yxsd.js} +8 -2
- package/dist/chunk-twn4yxsd.js.map +10 -0
- package/dist/{chunk-vv8vjjez.js → chunk-v7e5gv6w.js} +2 -2
- package/dist/{chunk-vv8vjjez.js.map → chunk-v7e5gv6w.js.map} +1 -1
- package/dist/{chunk-hq710s2a.js → chunk-wd3eyjbj.js} +3 -3
- package/dist/{chunk-hq710s2a.js.map → chunk-wd3eyjbj.js.map} +1 -1
- package/dist/{chunk-krgwft9w.js → chunk-x0983cez.js} +2 -2
- package/dist/{chunk-krgwft9w.js.map → chunk-x0983cez.js.map} +1 -1
- package/dist/{chunk-xmjzyzn6.js → chunk-x0vrrfp7.js} +2 -2
- package/dist/{chunk-xmjzyzn6.js.map → chunk-x0vrrfp7.js.map} +1 -1
- package/dist/{chunk-bg2e7stx.js → chunk-xa2k8dm0.js} +2 -2
- package/dist/{chunk-bg2e7stx.js.map → chunk-xa2k8dm0.js.map} +1 -1
- package/dist/{chunk-vvg3yxrc.js → chunk-xf515fp7.js} +2 -2
- package/dist/{chunk-vvg3yxrc.js.map → chunk-xf515fp7.js.map} +1 -1
- package/dist/{chunk-3jpj6hjh.js → chunk-y4yv9e31.js} +1 -1
- package/dist/{chunk-d9pnjkxr.js → chunk-y8c704wp.js} +2 -2
- package/dist/{chunk-d9pnjkxr.js.map → chunk-y8c704wp.js.map} +1 -1
- package/dist/{chunk-mpt1zsfv.js → chunk-yn2v5axb.js} +2 -2
- package/dist/{chunk-mpt1zsfv.js.map → chunk-yn2v5axb.js.map} +1 -1
- package/dist/{chunk-b55zt46z.js → chunk-zdwgcyjh.js} +2 -2
- package/dist/{chunk-b55zt46z.js.map → chunk-zdwgcyjh.js.map} +1 -1
- package/dist/{chunk-nadkwh8a.js → chunk-znnt70rn.js} +3 -3
- package/dist/{chunk-nadkwh8a.js.map → chunk-znnt70rn.js.map} +1 -1
- package/dist/chunks/{RealtimeClient-C7VTiRUv.js → RealtimeClient-CyGWZr6p.js} +2 -2
- package/dist/chunks/{RealtimeClient-C7VTiRUv.js.map → RealtimeClient-CyGWZr6p.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-Ddumzd7S.js → ThemeProvider-BnmnRvEc.js} +53 -34
- package/dist/chunks/ThemeProvider-BnmnRvEc.js.map +1 -0
- package/dist/chunks/{fetchFileRequest-ClV8HU3g.js → fetchFileRequest-D4fAcY7D.js} +2 -2
- package/dist/chunks/{fetchFileRequest-ClV8HU3g.js.map → fetchFileRequest-D4fAcY7D.js.map} +1 -1
- package/dist/chunks/{live-BAFgp_WN.js → live-B4RW02g2.js} +3 -3
- package/dist/chunks/{live-BAFgp_WN.js.map → live-B4RW02g2.js.map} +1 -1
- package/dist/chunks/{mutationExtras-ozY1Rd1R.js → mutationExtras-DgdYjcaa.js} +2 -2
- package/dist/chunks/{mutationExtras-ozY1Rd1R.js.map → mutationExtras-DgdYjcaa.js.map} +1 -1
- package/dist/chunks/{subscriptionStream-CTiRok5u.js → subscriptionStream-Ca5V54ee.js} +2 -2
- package/dist/chunks/{subscriptionStream-CTiRok5u.js.map → subscriptionStream-Ca5V54ee.js.map} +1 -1
- package/dist/client/QueryManagerContext.d.ts +17 -1
- package/dist/client/QueryManagerContext.d.ts.map +1 -1
- package/dist/client/ServerQueryContext.d.ts +10 -4
- package/dist/client/ServerQueryContext.d.ts.map +1 -1
- package/dist/client/index.js +27 -25
- package/dist/client/index.js.map +1 -1
- package/dist/client/islands.d.ts +47 -2
- package/dist/client/islands.d.ts.map +1 -1
- package/dist/client/useQuery.d.ts.map +1 -1
- 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/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- 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/internal/islandRuntime.d.ts +9 -2
- package/dist/internal/islandRuntime.d.ts.map +1 -1
- package/dist/internal/staticNavigationRuntime.d.ts +2 -2
- package/dist/internal/staticNavigationRuntime.d.ts.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.js +2 -2
- package/dist/services/index.js.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/ServerQueryStore.d.ts +10 -0
- package/dist/services/router/ServerQueryStore.d.ts.map +1 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/staticDocument.d.ts +8 -0
- package/dist/services/router/staticDocument.d.ts.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 +16 -3
- package/dist/testing/index.js.map +1 -1
- package/dist/vite/index.mjs +6 -0
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-0rkastve.js +0 -117
- package/dist/chunk-f25x1sn1.js +0 -5
- package/dist/chunk-z2k8m02z.js.map +0 -10
- package/dist/chunks/ThemeProvider-Ddumzd7S.js.map +0 -1
- /package/dist/{chunk-2rpz1p8g.js.map → chunk-5q2v29ma.js.map} +0 -0
- /package/dist/{chunk-84j5b07n.js.map → chunk-9by5yphc.js.map} +0 -0
- /package/dist/{chunk-gtdf51jz.js.map → chunk-ascbx2kb.js.map} +0 -0
- /package/dist/{chunk-64r5cs5g.js.map → chunk-c3rn99hm.js.map} +0 -0
- /package/dist/{chunk-c07s6w45.js.map → chunk-gpsqtjx5.js.map} +0 -0
- /package/dist/{chunk-3jpj6hjh.js.map → chunk-y4yv9e31.js.map} +0 -0
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { existsSync, readdirSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\n\n/**\n * Finding the classes an application declared and never imported — the walk\n * #322 and #323 both end at.\n *\n * ### Why it has to run the files\n *\n * A job that is written and not listed does not fail; it disappears.\n * `QueueManager.run` looks a dispatched name up in the map its config built and\n * drops what is not there, so the dispatch is simply lost. A cron drifts worse:\n * nothing is waiting on a tick, so a job that never fires reports nothing to\n * anyone. What both come down to is that `app/config/queue.ts` naming every\n * `Job` subclass is the *only* thing putting those classes in the module graph —\n * the list and the directory are two spellings of one set, kept in step by hand.\n *\n * The way out of that is to read the directory, and there is no static read that\n * will do: the class does not exist until its module has run. So **every file\n * walked here is imported**, and a file that *does something* when imported does\n * it here — at boot, in production, on every start. `gemi check models` makes\n * the same trade for the same reason and pays it once per CI run; a caller of\n * this pays it once per process.\n *\n * ### What that asks of a caller\n *\n * **Point it at a directory of class declarations, not at `app/`.** The skip\n * rules on `sourceFiles` drop what certainly is not one — tests, benchmarks,\n * `.d.ts`, vendored packages — and nothing else. Widening the guesses is how a\n * discovery pass ends up quietly covering less than the directory holds, which\n * is the same silence in a new place.\n *\n * **Let a broken file stop the boot.** `discoverClasses` rethrows an import\n * failure naming the file rather than dropping it and carrying on, for the same\n * reason: four classes found out of five looks exactly like five out of five.\n *\n * **Leave a way out.** Discovery is what should happen when an app said\n * nothing. An app that lists its classes explicitly must not reach this file at\n * all — that is the escape hatch for a directory holding something this cannot\n * import, and it is the sentence an error from here should point at.\n *\n * ### One more thing worth knowing\n *\n * This imports by absolute path, while the application imports the same files\n * through the `@/app/*` alias. Bun keys its module registry by the *resolved*\n * path, so those two specifiers land on one module: a job already reached from\n * a controller is not evaluated a second time here, and the class object is the\n * same one. `gemi build` leaves that true in production — `packages: \"external\"`\n * keeps the app's own code out of `dist/server/server.mjs` and resolves it from\n * source at runtime, exactly as `gemi dev` does.\n *\n * Nothing here depends on that holding, and deliberately: `QueueManager` and the\n * `Scheduler`'s cross-reload registry are both keyed by name rather than by\n * class identity, so a build that did inline the app's modules would produce a\n * duplicate class object and still register the right job. Worth knowing before\n * writing a registry keyed the other way.\n */\n\n/**\n * The files under `dir` that could declare a class.\n *\n * Everything underneath it, because apps do group classes into folders, minus\n * what cannot be one. Each of these is going to be *imported*, so the exclusions\n * are about what is certainly not source rather than about what is probably not:\n *\n * - **Declaration files.** `.d.ts` has no runtime module behind it.\n * - **Tests, type tests and benchmarks**, by the suffix a runner already\n * recognises.\n * - **Dot-directories and `node_modules`.**\n * - **Any directory holding a `package.json`.** That is a package that happens\n * to live here — a vendored client, a generated SDK — not this app's source,\n * and importing its entry point runs somebody else's module graph. The\n * template has two under `app/models`.\n *\n * `ignore` is the escape hatch for the rest: a path prefix, relative to `dir`,\n * naming a file or a directory of adjacent code that runs something on import.\n * Nothing is ignored by default.\n *\n * The order is the same on every run over the same tree, which matters because\n * the caller is going to import in it: entries are sorted per directory before\n * recursing, and `readdirSync` order is the filesystem's rather than\n * alphabetical — a tree written `A.ts` then `B.ts` reads back `B.ts` first on\n * the machines this was tested on. Sorting per directory rather than sorting the\n * finished list is deliberate: for a tree holding both `a.ts` and `a/b.ts`, this\n * emits `a/b.ts` first, because the directory sorts before the file.\n *\n * A directory that does not exist yields an empty list rather than throwing.\n * \"The app has no jobs yet\" is an ordinary state and not this function's to\n * complain about — but it is indistinguishable from \"the app's source did not\n * ship\", so a caller that boots on the answer owes the reader a word about which\n * one it got.\n */\nexport function sourceFiles(dir: string, ignore: string[] = []): string[] {\n const out: string[] = [];\n\n const ignored = (path: string) => {\n const rel = relative(dir, path).split(\"\\\\\").join(\"/\");\n return ignore.some(\n (pattern) => rel === pattern || rel.startsWith(`${pattern}/`),\n );\n };\n\n const walk = (current: string) => {\n for (const entry of readdirSync(current, { withFileTypes: true }).sort(\n (a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n )) {\n const path = join(current, entry.name);\n if (ignored(path)) continue;\n\n if (entry.isDirectory()) {\n if (entry.name.startsWith(\".\") || entry.name === \"node_modules\")\n continue;\n if (existsSync(join(path, \"package.json\"))) continue;\n walk(path);\n continue;\n }\n\n if (!entry.name.endsWith(\".ts\") && !entry.name.endsWith(\".tsx\")) continue;\n if (entry.name.endsWith(\".d.ts\")) continue;\n if (/\\.(test|test-d|spec|bench)\\.tsx?$/.test(entry.name)) continue;\n\n out.push(path);\n }\n };\n\n if (!existsSync(dir)) return out;\n\n walk(dir);\n return out;\n}\n\n/**\n * A class, as much of one as this file can name. `abstract` so that a base an\n * app never instantiates directly is a legal argument.\n */\ntype ClassLike = abstract new (...args: never[]) => unknown;\n\n/**\n * A file that would not import, reported with the file that would not import.\n *\n * Separate from a bare rethrow because the stack of a failed dynamic import\n * names the module that failed to *resolve*, several frames deep, and says\n * nothing about the walk that asked for it — so the reader learns that some\n * `?raw` specifier is unresolvable without learning that discovery is what\n * imported it, or that listing the classes explicitly is how they get their boot\n * back.\n */\nexport class DiscoveryError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"DiscoveryError\";\n }\n}\n\n/**\n * Every exported class under `dir` whose prototype chain reaches `base`.\n *\n * `base` is a parameter rather than an import so that this file names no\n * service and stays cheap to depend on — `bin/check-models.ts` uses the walker\n * above and is bundled into `dist/bin/gemi.js`, which is not somewhere gemi's\n * service layer should end up. It is also what lets a test hand in a base class\n * of its own instead of standing up a project that can resolve `gemi/services`.\n *\n * `base` itself is never returned. A directory whose files import their base\n * from a sibling — the shape an app reaches for when several jobs share a gate —\n * re-exports it as often as not, and a framework that scheduled the abstract\n * base along with its subclasses would be running a job nobody wrote.\n *\n * A class is returned once no matter how many exports name it. A barrel in the\n * directory re-exporting everything beside it is the ordinary case, and it makes\n * every class reachable twice.\n *\n * The order is the walk's, and within a file the module namespace's, which the\n * language sorts by name. So the answer is the same on every run — worth having\n * where the caller is a scheduler and the alternative is a boot order that\n * depends on the filesystem.\n *\n * `onSkipped` is handed every export that did *not* match, with the file it came\n * from. Discovery's characteristic failure is a thing the author wrote and this\n * walk cannot see, and by the time an export has been discarded here the\n * information about why is gone — the caller is left holding \"four classes\"\n * where the directory holds five. A caller that can recognise its own\n * near-misses, as `discoverCommands` recognises a builder chain that was never\n * finished, uses this to say so by name instead.\n *\n * @throws DiscoveryError if a walked file cannot be imported. Not a skip: a file\n * that will not load is a class the caller was going to be told about and now is\n * not, which is the failure discovery exists to remove.\n */\nexport async function discoverClasses<T extends ClassLike>(\n dir: string,\n base: T,\n ignore: string[] = [],\n onSkipped?: (value: unknown, file: string) => void,\n): Promise<T[]> {\n const found = new Set<T>();\n\n for (const path of sourceFiles(dir, ignore)) {\n let module: Record<string, unknown>;\n\n try {\n module = (await import(path)) as Record<string, unknown>;\n } catch (error) {\n throw new DiscoveryError(\n `${path} could not be imported, so the classes in it could not be ` +\n `discovered:\\n ${(error as Error).message}\\n` +\n `List the classes explicitly in the config slice for this directory ` +\n `to skip the walk.`,\n { cause: error },\n );\n }\n\n for (const value of Object.values(module)) {\n if (\n typeof value === \"function\" &&\n value !== base &&\n Object.prototype.isPrototypeOf.call(base, value)\n ) {\n found.add(value as unknown as T);\n continue;\n }\n\n onSkipped?.(value, path);\n }\n }\n\n return [...found];\n}\n\n/**\n * The directory an app's `app/` sits in, as the running process can know it.\n *\n * `ROOT_DIR` is the obvious answer and is not available: `Server.start` awaits\n * `waitForBoot()` — every provider's `register` and `boot` — and only then\n * imports the http layer that sets it. Anything resolving paths during boot is\n * earlier than the variable it would want.\n *\n * What it can use is the same rule `httpProd` computes `ROOT_DIR` with a moment\n * later, which is why that file now calls this instead of repeating it. `gemi\n * dev` and `gemi start` both spawn the server with no `cwd`, so the process\n * inherits the CLI's, and the CLI takes `process.cwd()` for the project root\n * itself — `bun/preload.ts` reads `gemi.config` from it on the same assumption.\n *\n * `httpDev` computes a bare `process.cwd()`, so it and `httpProd` already\n * disagree whenever `GEMI_PROJECT_DIR` is set. Nothing in this repo sets it and\n * `gemi start` ignores it when locating the built entry point, so the two rules\n * are the same rule for every configuration that runs today; the divergence is\n * older than this function and wants its own fix.\n */\nexport function projectRoot(): string {\n return join(process.cwd(), process.env.GEMI_PROJECT_DIR ?? \"\");\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAAA,qBAAS,iBAAY,WACrB,eAAS,cAAM,aA2FR,SAAS,CAAW,CAAC,EAAa,EAAmB,CAAC,EAAa,CACxE,IAAM,EAAgB,CAAC,EAEjB,EAAU,CAAC,IAAiB,CAChC,IAAM,EAAM,EAAS,EAAK,CAAI,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,EACpD,OAAO,EAAO,KACZ,CAAC,IAAY,IAAQ,GAAW,EAAI,WAAW,GAAG,IAAU,CAC9D,GAGI,EAAO,CAAC,IAAoB,CAChC,QAAW,KAAS,EAAY,EAAS,CAAE,cAAe,EAAK,CAAC,EAAE,KAChE,CAAC,EAAG,IAAO,EAAE,KAAO,EAAE,KAAO,GAAK,EAAE,KAAO,EAAE,KAAO,EAAI,CAC1D,EAAG,CACD,IAAM,EAAO,EAAK,EAAS,EAAM,IAAI,EACrC,GAAI,EAAQ,CAAI,EAAG,SAEnB,GAAI,EAAM,YAAY,EAAG,CACvB,GAAI,EAAM,KAAK,WAAW,GAAG,GAAK,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9]{2,8})*$/i;function I(j){return _.test(j)}function U(j){return j.split(/[-_]/)[0].toLowerCase()}function H(j,B,N){let R=j?.split(";")[0].trim();if(!R||!I(R))return null;let W=R.replaceAll("_","-").toLowerCase(),J=B.find((X)=>X.toLowerCase()===W);if(J)return J;let K=U(R),S=B.filter((X)=>U(X)===K);if(S.length===0)return null;if(N&&S.includes(N))return N;return S[0]}var C=/^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/;function V(j){let B=[];for(let N of j.split(",")){let[R,...W]=N.split(";"),J=R.trim();if(!J||J!=="*"&&!I(J))continue;let K=1,S=!0;for(let X of W){let[z,O=""]=X.split("=");if(z.trim().toLowerCase()!=="q")continue;let Q=O.trim();if(!C.test(Q)){S=!1;break}K=Number(Q)}if(S)B.push({tag:J,q:K,index:B.length})}return B.sort((N,R)=>R.q-N.q||N.index-R.index)}function E(j,B){let N=j.replaceAll("_","-").toLowerCase(),R=B.replaceAll("_","-").toLowerCase();return R===N||R.startsWith(`${N}-`)}function M(j,B,N){if(!j||B.length===0)return null;let R=V(j),W=R.filter((S)=>S.q===0&&S.tag!=="*").map((S)=>S.tag),J=B.filter((S)=>!W.some((X)=>E(X,S)));if(J.length===0)return null;let K=!1;for(let{tag:S,q:X}of R){if(X===0)continue;if(S==="*"){K=!0;continue}let z=H(S,J,N);if(z)return z}if(!K)return null;return(N&&J.includes(N)?N:J[0])??null}var y="UTC";function G(j){if(typeof j!=="string"||j.length===0)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:j}),!0}catch{return!1}}var Y=new Map,F=500;function $(j,B){let N=Y.get(j);if(N===void 0){if(Y.size>=F)Y.delete(Y.keys().next().value);N=B(),Y.set(j,N)}return N}function P(j){return j instanceof Date?j:new Date(j)}function D(j){return j.dateStyle!==void 0||j.timeStyle!==void 0||j.weekday!==void 0||j.era!==void 0||j.year!==void 0||j.month!==void 0||j.day!==void 0||j.dayPeriod!==void 0||j.hour!==void 0||j.minute!==void 0||j.second!==void 0||j.fractionalSecondDigits!==void 0||j.timeZoneName!==void 0}function x(j){let{locale:B,timeZone:N}=j,R=(J={})=>{let K={...J,timeZone:J.timeZone??N};return $(`dt|${B}|${JSON.stringify(K)}`,()=>{return new Intl.DateTimeFormat(B,K)})},W=(J,K)=>{if(J&&D(J))return J;return{...K,...J}};return{locale:B,timeZone:N,date(J,K){return R(W(K,{dateStyle:"medium"})).format(P(J))},time(J,K){return R(W(K,{timeStyle:"short"})).format(P(J))},dateTime(J,K){return R(W(K,{dateStyle:"medium",timeStyle:"short"})).format(P(J))},number(J,K={}){return $(`n|${B}|${JSON.stringify(K)}`,()=>new Intl.NumberFormat(B,K)).format(J)},relative(J,K,S={}){return $(`r|${B}|${JSON.stringify(S)}`,()=>new Intl.RelativeTimeFormat(B,S)).format(J,K)},list(J,K={}){return $(`l|${B}|${JSON.stringify(K)}`,()=>new Intl.ListFormat(B,K)).format(J)},plural(J,K={}){return $(`p|${B}|${JSON.stringify(K)}`,()=>new Intl.PluralRules(B,K)).select(J)},dateTimeFormat:R}}class b{config;static token="translator";translations={};isEnabled=!1;constructor(j){this.config=j;if(!G(this.config.timeZone))throw Error(`translation.timeZone: "${String(this.config.timeZone)}" is not a time zone this runtime knows. Use an IANA name such as "UTC" or "Europe/Istanbul".`);let B={};for(let[N,R]of Object.entries(this.config.prefetch))for(let W of this.config.supportedLocales){if(!B[W])B[W]={};B[W][N]={};for(let J of R){B[W][N][J.name]={};for(let[K,S]of Object.entries(J.dictionary))this.isEnabled=!0,B[W][N][J.name][K]=S[W]}}this.translations=B}get isLocaleAware(){return this.isEnabled||this.config.supportedLocales.length>0}get supportedLocales(){return this.config.supportedLocales}get defaultLocale(){return this.config.defaultLocale}get components(){return this.config.components}get timeZone(){return this.config.timeZone}detectTimeZone(j){if(j){let B=this.config.detectTimeZone(j);if(G(B))return B}return this.config.timeZone}formatter(j,B){return x({locale:j||this.defaultLocale,timeZone:G(B)?B:this.timeZone})}onLocaleChange(j){return this.config.onLocaleChange(j)}detectLocale(j){let B=this.config.defaultLocale??this.config.supportedLocales[0]??"en-US",N=(K)=>H(K,this.config.supportedLocales,this.config.defaultLocale),R=N(this.config.detectLocale(j));if(R)return R;let W=N(j.cookies.get("i18n-locale"));if(W)return W;let J=M(j.headers.get("accept-language"),this.config.supportedLocales,this.config.defaultLocale);if(J)return J;return B}getPageTranslations(j,B){if(this.translations[j][B])return this.translations[j][B];return{}}}
|
|
3
|
-
export{H as
|
|
3
|
+
export{H as cl,M as dl,y as el,G as fl,x as gl,b as hl};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=93FBEEE50943E71B64756E2164756E21
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"import type { HttpRequest } from \"../http/HttpRequest\";\nimport type { Dictionary } from \"./Dictionary\";\nimport type { TranslationConfig } from \"./config\";\nimport { negotiateLocale, resolveLocale } from \"./resolveLocale\";\nimport {\n createFormatter,\n isValidTimeZone,\n type Formatter,\n} from \"./formatter\";\n\nexport class Translator {\n static token = \"translator\";\n\n translations = {};\n isEnabled = false;\n\n constructor(public config: Required<TranslationConfig>) {\n // Fail at boot rather than on the first page that prints a date: `Intl`\n // throws a `RangeError` for a zone it does not know.\n if (!isValidTimeZone(this.config.timeZone)) {\n throw new Error(\n `translation.timeZone: \"${String(this.config.timeZone)}\" is not a time zone this runtime knows. Use an IANA name such as \"UTC\" or \"Europe/Istanbul\".`,\n );\n }\n\n const translations = {};\n\n for (const [route, dicArray] of Object.entries(this.config.prefetch)) {\n for (const locale of this.config.supportedLocales) {\n if (!translations[locale]) {\n translations[locale] = {};\n }\n translations[locale][route] = {};\n for (const dic of dicArray) {\n translations[locale][route][dic.name] = {};\n for (const [key, value] of Object.entries(dic.dictionary)) {\n this.isEnabled = true;\n translations[locale][route][dic.name][key] = value[locale];\n }\n }\n }\n }\n this.translations = translations;\n }\n\n /**\n * Whether the app does locale-aware routing and rendering at all.\n *\n * `isEnabled` only means the legacy `prefetch` config has dictionaries to\n * serve. An app on `defineDictionary` has an empty `prefetch` and declares\n * its locales through `supportedLocales` alone, so gating on `isEnabled`\n * leaves it without locale detection or a locale URL prefix. Both the render\n * path and the redirect read this, because when they disagreed a migrated app\n * rendered a non-default locale at `/` with no redirect and no `Vary` — one\n * cache fill away from serving that document to everyone.\n */\n get isLocaleAware(): boolean {\n return this.isEnabled || this.config.supportedLocales.length > 0;\n }\n\n get supportedLocales(): string[] {\n return this.config.supportedLocales;\n }\n\n get defaultLocale(): string {\n return this.config.defaultLocale;\n }\n\n get components(): Record<string, Dictionary<any>> {\n return this.config.components;\n }\n\n /** The configured zone; `UTC` unless `translation.timeZone` says otherwise. */\n get timeZone(): string {\n return this.config.timeZone;\n }\n\n /**\n * The zone dates are formatted in for this request: `detectTimeZone`'s\n * answer when it gives a zone `Intl` knows, the configured zone otherwise.\n * A bad value from a cookie must not take the page down, so it is ignored\n * rather than thrown.\n */\n detectTimeZone(req: HttpRequest<any, any> | null | undefined): string {\n if (req) {\n const detected = this.config.detectTimeZone(req);\n if (isValidTimeZone(detected)) {\n return detected;\n }\n }\n return this.config.timeZone;\n }\n\n /**\n * A formatter for `locale` (the default locale when omitted) in `timeZone`\n * (the configured zone when omitted). For server code outside a request —\n * jobs, emails. Inside a request, `Lang.formatter()` picks up the request's\n * locale and zone.\n */\n formatter(locale?: string, timeZone?: string): Formatter {\n return createFormatter({\n locale: locale || this.defaultLocale,\n timeZone: isValidTimeZone(timeZone) ? timeZone : this.timeZone,\n });\n }\n\n onLocaleChange(locale: string): Promise<void> | void {\n return this.config.onLocaleChange(locale);\n }\n\n detectLocale(req: HttpRequest<any, any>) {\n const fallbackLocale =\n this.config.defaultLocale ?? this.config.supportedLocales[0] ?? \"en-US\";\n const resolve = (tag: string | null | undefined) =>\n resolveLocale(tag, this.config.supportedLocales, this.config.defaultLocale);\n\n const detectedLocale = resolve(this.config.detectLocale(req));\n if (detectedLocale) {\n return detectedLocale;\n }\n\n const previousLocale = resolve(req.cookies.get(\"i18n-locale\"));\n if (previousLocale) {\n return previousLocale;\n }\n\n // The best entry by `q` weight the app can serve, even by language alone\n // (`de-AT` → `de-DE`), wins.\n const acceptedLocale = negotiateLocale(\n req.headers.get(\"accept-language\"),\n this.config.supportedLocales,\n this.config.defaultLocale,\n );\n if (acceptedLocale) {\n return acceptedLocale;\n }\n\n return fallbackLocale;\n }\n\n getPageTranslations(locale: string, scope: string) {\n if (this.translations[locale][scope]) {\n return this.translations[locale][scope];\n }\n return {};\n }\n}\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";AAGA,IAAM,EAAa,sCAEZ,SAAS,CAAe,CAAC,EAA0B,CACxD,OAAO,EAAW,KAAK,CAAO,EAGhC,SAAS,CAAU,CAAC,EAAqB,CACvC,OAAO,EAAI,MAAM,MAAM,EAAE,GAAG,YAAY,EAYnC,SAAS,CAAa,CAC3B,EACA,EACA,EACe,CAEf,IAAM,EAAM,GAAW,MAAM,GAAG,EAAE,GAAG,KAAK,EAC1C,GAAI,CAAC,GAAO,CAAC,EAAgB,CAAG,EAC9B,OAAO,KAGT,IAAM,EAAa,EAAI,WAAW,IAAK,GAAG,EAAE,YAAY,EAClD,EAAQ,EAAiB,KAAK,CAAC,IAAM,EAAE,YAAY,IAAM,CAAU,EACzE,GAAI,EACF,OAAO,EAGT,IAAM,EAAW,EAAW,CAAG,EACzB,EAAe,EAAiB,OAAO,CAAC,IAAM,EAAW,CAAC,IAAM,CAAQ,EAC9E,GAAI,EAAa,SAAW,EAC1B,OAAO,KAET,GAAI,GAAiB,EAAa,SAAS,CAAa,EACtD,OAAO,EAET,OAAO,EAAa,GAItB,IAAM,EAAU,uCAShB,SAAS,CAAmB,CAAC,EAAiC,CAC5D,IAAM,EAAgD,CAAC,EACvD,QAAW,KAAS,EAAO,MAAM,GAAG,EAAG,CACrC,IAAO,KAAW,GAAU,EAAM,MAAM,GAAG,EACrC,EAAM,EAAO,KAAK,EACxB,GAAI,CAAC,GAAQ,IAAQ,KAAO,CAAC,EAAgB,CAAG,E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Aa,EAEtE,EAAiB,EAAQ,KAAK,OAAO,aAAa,CAAG,CAAC,EAC5D,GAAI,EACF,OAAO,EAGT,IAAM,EAAiB,EAAQ,EAAI,QAAQ,IAAI,aAAa,CAAC,EAC7D,GAAI,EACF,OAAO,EAKT,IAAM,EAAiB,EACrB,EAAI,QAAQ,IAAI,iBAAiB,EACjC,KAAK,OAAO,iBACZ,KAAK,OAAO,aACd,EACA,GAAI,EACF,OAAO,EAGT,OAAO,EAGT,mBAAmB,CAAC,EAAgB,EAAe,CACjD,GAAI,KAAK,aAAa,GAAQ,GAC5B,OAAO,KAAK,aAAa,GAAQ,GAEnC,MAAO,CAAC,EAEZ",
|
|
10
|
-
"debugId": "
|
|
10
|
+
"debugId": "93FBEEE50943E71B64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -33,6 +33,12 @@ export { h } from ${JSON.stringify("virtual:gemi-island-runtime")};
|
|
|
33
33
|
value: { currentLocale: payload.currentLocale, defaultLocale: payload.defaultLocale, timeZone: payload.timeZone },
|
|
34
34
|
}, element);
|
|
35
35
|
}
|
|
36
|
+
const cache = globalThis[Symbol.for("gemi.islandQueries")];
|
|
37
|
+
if (cache) {
|
|
38
|
+
const queries = document.getElementById("gemi-island-queries");
|
|
39
|
+
if (queries) cache.seed((queries.p = queries.p || JSON.parse(queries.textContent)));
|
|
40
|
+
element = createElement(cache.Provider, null, element);
|
|
41
|
+
}
|
|
36
42
|
return hydrateRoot(marker, element, {
|
|
37
43
|
identifierPrefix: marker.getAttribute("data-uid") || undefined,
|
|
38
44
|
});
|
|
@@ -40,6 +46,6 @@ export { h } from ${JSON.stringify("virtual:gemi-island-runtime")};
|
|
|
40
46
|
import { hydrateRoot } from "react-dom/client";
|
|
41
47
|
export ${z}
|
|
42
48
|
`,Q='const d=document,c=JSON.parse(d.getElementById("gemi-islands").textContent),w=f=>(window.requestIdleCallback||setTimeout)(f),m=(e,o)=>{if(!e.g){e.g=1;import(o.s).then(x=>x.h(e,x.m[o.e])).catch(r=>console.error(r))}};for(const e of d.querySelectorAll("gemi-island")){const o=c.i[e.dataset.island];if(!o)continue;if(o.l=="eager")m(e,o);else if(o.l=="idle"||!window.IntersectionObserver||!e.children.length)w(()=>m(e,o));else{const v=new IntersectionObserver(n=>{if(n.some(x=>x.isIntersecting)){v.disconnect();m(e,o)}});for(const k of e.children)v.observe(k)}}';
|
|
43
|
-
export{B as
|
|
49
|
+
export{B as ol,F as pl,G as ql,J as rl,M as sl,Q as tl};
|
|
44
50
|
|
|
45
|
-
//# debugId=
|
|
51
|
+
//# debugId=68B2BA871C68F20164756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../internal/islandRuntime.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * The browser side of islands, shared by the Vite plugin (which builds it), the\n * servers (which point the loader at it) and the tests.\n *\n * No imports: the Vite plugin is built on its own and the servers load it at\n * boot, so this file stays plain strings.\n */\n\n/**\n * The module that hydrates islands: React, `react-dom/client` and the small\n * `h(marker, Component)` below. A virtual module of gemi's Vite plugin that\n * every island entry imports, so the islands on a page share one copy of\n * React, in one chunk.\n */\nexport const ISLAND_RUNTIME_ID = \"virtual:gemi-island-runtime\";\n\n/** What `resolveId` turns `ISLAND_RUNTIME_ID` into (Vite's virtual-module convention). */\nexport const RESOLVED_ISLAND_RUNTIME_ID = `\\0${ISLAND_RUNTIME_ID}`;\n\n/**\n * The query that turns a module into its island entry: `Counter.tsx?gemi-island`\n * is a module of the plugin's that re-exports `Counter.tsx` as `m` next to the\n * runtime's `h`. It is what a static page imports for an island, and so it\n * is what the client manifest lists, keyed `app/…/Counter.tsx?gemi-island`,\n * with React and `react-dom/client` among its imports.\n */\nexport const ISLAND_ENTRY_QUERY = \"?gemi-island\";\n\n/** The island entry module for `file` (an absolute path or a root-relative URL). */\nexport function islandEntrySource(file: string) {\n return `import * as m from ${JSON.stringify(file)};\nexport { m };\nexport { h } from ${JSON.stringify(ISLAND_RUNTIME_ID)};\n`;\n}\n\n/**\n * `h(marker, Component)`: hydrates one `<gemi-island>` marker with the island's\n * component and the props the server serialised into `data-props`.\n *\n * The island's static children were rendered on the server into a\n * `<gemi-slot>` (the first one that belongs to this marker, not to an island\n * nested in it). They are handed back to the component as that same element\n * with the server's HTML, so hydration matches and React leaves them alone.\n *\n * `data-uid` is the `identifierPrefix` the server rendered the island with, so\n * `useId` agrees on both sides and two islands never share an id.\n *\n * When the page carries `#gemi-island-i18n` (its islands read the page's\n * locale or dictionaries, #1095), the dictionaries in it are seeded into the\n * dictionary registry through `__GEMI_DICT__` and the island's root gets the\n * locale and zone in `IslandI18nContext` (found on `globalThis`, where\n * `gemi/client` puts it), so `useDictionary` resolves synchronously, with the\n * strings the server rendered, and fetches nothing. An island that does not\n * import `gemi/client` has no such context to read, and is left as it was.\n *\n * The island's root reads queries through the cache the page's islands\n * share (found on `globalThis` under `gemi.islandQueries`, where `gemi/client`\n * puts it, #1155). When the page carries `#gemi-island-queries` (its islands\n * read queries the request prefetched), that `{ path: { variantKey: data } }`\n * payload seeds the cache first, so `useQuery` hydrates with the server's\n * data and does not refetch it.\n *\n * Written as a function body with `createElement` and `hydrateRoot` free, so a\n * test can run it against real React without a bundler.\n */\nexport const ISLAND_HYDRATE_SOURCE = `function h(marker, Component) {\n if (typeof Component !== \"function\" && (typeof Component !== \"object\" || Component === null)) {\n throw new Error(\"gemi: island module has no component export for \" + marker.outerHTML.slice(0, 80));\n }\n const json = marker.getAttribute(\"data-props\");\n const props = json ? JSON.parse(json) : {};\n let slot = null;\n for (const candidate of marker.querySelectorAll(\"gemi-slot\")) {\n if (candidate.closest(\"gemi-island\") === marker) {\n slot = candidate;\n break;\n }\n }\n const children = slot\n ? [createElement(\"gemi-slot\", {\n style: { display: \"contents\" },\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: { __html: slot.innerHTML },\n })]\n : [];\n let element = createElement(Component, props, ...children);\n const i18n = document.getElementById(\"gemi-island-i18n\");\n const context = globalThis[Symbol.for(\"gemi.islandI18n\")];\n if (i18n && context) {\n const payload = (i18n.p = i18n.p || JSON.parse(i18n.textContent));\n const dictionaries = (self.__GEMI_DICT__ = self.__GEMI_DICT__ || []);\n for (const entry of payload.dictionaries || []) dictionaries.push(entry);\n element = createElement(context.Provider, {\n value: { currentLocale: payload.currentLocale, defaultLocale: payload.defaultLocale, timeZone: payload.timeZone },\n }, element);\n }\n const cache = globalThis[Symbol.for(\"gemi.islandQueries\")];\n if (cache) {\n const queries = document.getElementById(\"gemi-island-queries\");\n if (queries) cache.seed((queries.p = queries.p || JSON.parse(queries.textContent)));\n element = createElement(cache.Provider, null, element);\n }\n return hydrateRoot(marker, element, {\n identifierPrefix: marker.getAttribute(\"data-uid\") || undefined,\n });\n}`;\n\n/** The runtime module's source, as the plugin serves and builds it. */\nexport const ISLAND_RUNTIME_SOURCE = `import { createElement } from \"react\";\nimport { hydrateRoot } from \"react-dom/client\";\nexport ${ISLAND_HYDRATE_SOURCE}\n`;\n\n/**\n * The island loader, inlined into a static document that uses islands.\n *\n * Kept byte-for-byte constant (the per-page island table travels in a\n * separate `<script type=\"application/json\">`, which a Content Security Policy\n * does not treat as script), so a strict policy can allow it by hash:\n * `script-src 'sha256-…'` with `ISLAND_LOADER_CSP_HASH`. Everything it loads\n * is a plain `import()` of a same-origin (or asset-base) file.\n *\n * The table is `{ i: [{ s: entry URL, e: export, l: load }] }` and each\n * marker's `data-island` indexes `i`. Per marker, on its schedule: import the\n * island's entry (the module as `m`, the runtime's `h`), then\n * `h(marker, m[export])`, which calls `hydrateRoot`. A failure is logged and\n * leaves the server-rendered markup in place.\n */\nexport const ISLAND_LOADER_SOURCE =\n 'const d=document,c=JSON.parse(d.getElementById(\"gemi-islands\").textContent),' +\n \"w=f=>(window.requestIdleCallback||setTimeout)(f),\" +\n \"m=(e,o)=>{if(!e.g){e.g=1;import(o.s).then(x=>x.h(e,x.m[o.e])).catch(r=>console.error(r))}};\" +\n 'for(const e of d.querySelectorAll(\"gemi-island\")){const o=c.i[e.dataset.island];if(!o)continue;' +\n 'if(o.l==\"eager\")m(e,o);else if(o.l==\"idle\"||!window.IntersectionObserver||!e.children.length)w(()=>m(e,o));' +\n \"else{const v=new IntersectionObserver(n=>{if(n.some(x=>x.isIntersecting)){v.disconnect();m(e,o)}});for(const k of e.children)v.observe(k)}}\";\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";AAcO,IAAM,EAAoB,8BAGpB,EAA6B,kCAS7B,EAAqB,eAG3B,SAAS,CAAiB,CAAC,EAAc,CAC9C,MAAO,sBAAsB,KAAK,UAAU,CAAI;AAAA;AAAA,oBAE9B,KAAK,UAlBQ,6BAkBmB;AAAA,EAkC7C,IAAM,EAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA2CxB,EAAwB;AAAA;AAAA,SAE5B;AAAA,EAkBI,EACX",
|
|
8
|
+
"debugId": "68B2BA871C68F20164756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
class K extends Error{lock;token;constructor(x,z,C="its lease ran out or another holder took it"){super(`Lost the lock "${x}" (token ${z}): ${C}.`);this.lock=x;this.token=z;this.name="LockLostError"}}var X=60000,Y=100,Z=(x)=>new Promise((z)=>setTimeout(z,x));class V{store;name;owner;token;ttl;lost;controller=new AbortController;deadline;expiryTimer;renewTimer;done=!1;constructor(x,z,C,B,G,J){this.store=x;this.name=z;this.owner=C;this.token=B;this.ttl=G;this.lost=this.controller.signal,this.deadline=J+G,this.armExpiry()}get expired(){return this.lost.aborted||performance.now()>=this.deadline}async extend(x=this.ttl){if(this.lost.aborted)return!1;let z=performance.now();if(!await this.store.extend(this.name,this.owner,this.token,x))return this.markLost(),!1;if(this.done)return!0;return this.deadline=Math.max(this.deadline,z+x),this.armExpiry(),!0}async isHeld(){if(this.lost.aborted)return!1;let x=await this.store.held(this.name,this.owner,this.token);if(!x)this.markLost();return x}async fence(x){if(this.lost.aborted)throw new K(this.name,this.token);try{return await this.store.fence(this.name,this.owner,this.token,x)}catch(z){if(z instanceof K)this.markLost();throw z}}async release(){if(this.stop(),this.lost.aborted)return!1;return this.store.release(this.name,this.owner,this.token)}startRenewing(){if(this.renewTimer||this.done)return;this.renewTimer=setInterval(()=>{this.extend().catch((x)=>{console.error(`[gemi] Could not renew the lock "${this.name}".`,x)})},Math.max(1,Math.floor(this.ttl/3))),this.renewTimer.unref?.()}markLost(x){if(this.stop(),!this.lost.aborted)this.controller.abort(new K(this.name,this.token,x))}stop(){this.done=!0,clearInterval(this.renewTimer),clearTimeout(this.expiryTimer),this.renewTimer=void 0,this.expiryTimer=void 0}armExpiry(){clearTimeout(this.expiryTimer),this.expiryTimer=setTimeout(()=>this.markLost("its lease ran out before it was renewed"),Math.max(0,this.deadline-performance.now())),this.expiryTimer.unref?.()}}class ${store;static token="locks";constructor(x){this.store=x}async acquire(x,z={}){let C=z.ttl??X;if(!(C>0))throw Error(`A lock's ttl must be a positive number of milliseconds; got ${C}.`);let B=Bun.randomUUIDv7(),G=performance.now()+Math.max(0,z.wait??0);for(;;){let J=performance.now(),M=await this.store.acquire(x,B,C);if(M!==null){let Q=new V(this.store,x,B,M,C,J);if(z.renew)Q.startRenewing();return Q}let O=G-performance.now();if(O<=0)return null;await Z(Math.min(Y,O))}}async run(x,z,C){let B=await this.acquire(x,{...z,renew:z.renew??!0});if(!B)return{acquired:!1};let G;try{G=await C(B)}catch(J){throw await B.release().catch(()=>{}),J}if(B.expired)throw B.markLost(),B.lost.reason;return await B.release(),{acquired:!0,value:G}}}var j={ms:1,s:1000,m:60000,h:3600000,d:86400000,w:604800000};function P(x){if(typeof x==="number"){if(!Number.isFinite(x)||x<0)throw TypeError(`A duration is 0 or more milliseconds; got ${x}.`);return Math.round(x)}let z=/^\s*(\d+(?:\.\d+)?)\s*(ms|s|m|h|d|w)\s*$/.exec(String(x));if(!z)throw TypeError(`"${String(x)}" is not a duration. Use milliseconds, or a number and one of ms, s, m, h, d, w ("30s", "7d").`);return Math.round(Number(z[1])*j[z[2]])}
|
|
3
|
-
export{P as
|
|
3
|
+
export{P as dk,K as ek,V as fk,$ as gk};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=3B02750B5A18679764756E2164756E21
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"/**\n * A length of time: milliseconds as a number, or a number and a unit, such as\n * `\"500ms\"`, `\"30s\"`, `\"5m\"`, `\"2h\"`, `\"7d\"` or `\"1w\"`.\n */\nexport type Duration = number | `${number}${\"ms\" | \"s\" | \"m\" | \"h\" | \"d\" | \"w\"}`;\n\nconst UNITS: Record<string, number> = {\n ms: 1,\n s: 1000,\n m: 60_000,\n h: 60 * 60_000,\n d: 24 * 60 * 60_000,\n w: 7 * 24 * 60 * 60_000,\n};\n\n/** A `Duration` in milliseconds. Throws for anything else, on the caller's stack. */\nexport function toMilliseconds(duration: Duration): number {\n if (typeof duration === \"number\") {\n if (!Number.isFinite(duration) || duration < 0) {\n throw new TypeError(`A duration is 0 or more milliseconds; got ${duration}.`);\n }\n return Math.round(duration);\n }\n const match = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(ms|s|m|h|d|w)\\s*$/.exec(String(duration));\n if (!match) {\n throw new TypeError(\n `\"${String(duration)}\" is not a duration. Use milliseconds, or a number and ` +\n `one of ms, s, m, h, d, w (\"30s\", \"7d\").`,\n );\n }\n return Math.round(Number(match[1]) * UNITS[match[2]!]!);\n}\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";AAwFO,MAAM,U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