gemi 0.109.0 → 0.110.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 +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gemi.js +485 -63
- package/dist/bin/gemi.js.map +12 -8
- package/dist/bun/plugin.js +2 -2
- package/dist/bun/plugin.js.map +1 -1
- package/dist/bun/preload.js +2 -2
- package/dist/bun/preload.js.map +1 -1
- package/dist/{chunk-hgz8sx40.js → chunk-09ypnhjv.js} +3 -3
- package/dist/{chunk-hgz8sx40.js.map → chunk-09ypnhjv.js.map} +1 -1
- package/dist/{chunk-qnq110tw.js → chunk-0d9qsmx2.js} +3 -3
- package/dist/{chunk-qnq110tw.js.map → chunk-0d9qsmx2.js.map} +1 -1
- package/dist/{chunk-m9609t1y.js → chunk-0sjh5v1n.js} +1 -1
- package/dist/{chunk-g5a3ptsa.js → chunk-11fsn5mr.js} +3 -3
- package/dist/{chunk-g5a3ptsa.js.map → chunk-11fsn5mr.js.map} +1 -1
- package/dist/{chunk-whe0x70j.js → chunk-1c1d0e60.js} +3 -3
- package/dist/{chunk-whe0x70j.js.map → chunk-1c1d0e60.js.map} +1 -1
- package/dist/{chunk-rgfzqwpg.js → chunk-1kr25rcg.js} +3 -3
- package/dist/{chunk-rgfzqwpg.js.map → chunk-1kr25rcg.js.map} +1 -1
- package/dist/{chunk-vee4j6ft.js → chunk-1pem26zc.js} +3 -3
- package/dist/{chunk-vee4j6ft.js.map → chunk-1pem26zc.js.map} +1 -1
- package/dist/{chunk-nxxx0m1a.js → chunk-1va15sfq.js} +2 -2
- package/dist/{chunk-nxxx0m1a.js.map → chunk-1va15sfq.js.map} +2 -2
- package/dist/{chunk-wvwee7dn.js → chunk-1yx2e0bh.js} +2 -2
- package/dist/{chunk-wvwee7dn.js.map → chunk-1yx2e0bh.js.map} +1 -1
- package/dist/{chunk-9r3znmqq.js → chunk-303mprnv.js} +2 -2
- package/dist/{chunk-9r3znmqq.js.map → chunk-303mprnv.js.map} +1 -1
- package/dist/{chunk-grs8dnkd.js → chunk-30xjcyzh.js} +2 -2
- package/dist/{chunk-grs8dnkd.js.map → chunk-30xjcyzh.js.map} +1 -1
- package/dist/{chunk-h15eae7g.js → chunk-358sdcx9.js} +3 -3
- package/dist/{chunk-h15eae7g.js.map → chunk-358sdcx9.js.map} +1 -1
- package/dist/{chunk-367kyrdx.js → chunk-3cg7y62b.js} +2 -2
- package/dist/{chunk-367kyrdx.js.map → chunk-3cg7y62b.js.map} +1 -1
- package/dist/{chunk-t26n9vzw.js → chunk-3y8q8x11.js} +2 -2
- package/dist/{chunk-t26n9vzw.js.map → chunk-3y8q8x11.js.map} +1 -1
- package/dist/chunk-4mfrgd5m.js +34 -0
- package/dist/chunk-4mfrgd5m.js.map +10 -0
- package/dist/chunk-5cygrbxv.js +4 -0
- package/dist/{chunk-9qw9fa6z.js.map → chunk-5cygrbxv.js.map} +2 -2
- package/dist/{chunk-tvy2fqza.js → chunk-5stgtwqw.js} +2 -2
- package/dist/{chunk-tvy2fqza.js.map → chunk-5stgtwqw.js.map} +1 -1
- package/dist/chunk-61f4m5px.js +6 -0
- package/dist/{chunk-fe1pcnw6.js.map → chunk-61f4m5px.js.map} +5 -4
- package/dist/chunk-6chz1ktz.js +9 -0
- package/dist/chunk-6chz1ktz.js.map +13 -0
- package/dist/{chunk-wqsdjweb.js → chunk-6vr7f5fq.js} +4 -4
- package/dist/{chunk-wqsdjweb.js.map → chunk-6vr7f5fq.js.map} +1 -1
- package/dist/{chunk-g74qwhvf.js → chunk-7tx5y712.js} +2 -2
- package/dist/{chunk-g74qwhvf.js.map → chunk-7tx5y712.js.map} +1 -1
- package/dist/{chunk-g7fr2cy2.js → chunk-8afxrmdc.js} +3 -3
- package/dist/{chunk-g7fr2cy2.js.map → chunk-8afxrmdc.js.map} +1 -1
- package/dist/{chunk-vwkdfngg.js → chunk-8b2tw2yp.js} +1 -1
- package/dist/{chunk-t3qw9syt.js → chunk-9rchedr4.js} +2 -2
- package/dist/{chunk-t3qw9syt.js.map → chunk-9rchedr4.js.map} +1 -1
- package/dist/{chunk-jm4jn28j.js → chunk-9s851qz8.js} +2 -2
- package/dist/{chunk-jm4jn28j.js.map → chunk-9s851qz8.js.map} +1 -1
- package/dist/{chunk-jc4j61xb.js → chunk-a6453d9s.js} +3 -3
- package/dist/{chunk-jc4j61xb.js.map → chunk-a6453d9s.js.map} +1 -1
- package/dist/{chunk-9m18pknp.js → chunk-bn5yn731.js} +2 -2
- package/dist/{chunk-9m18pknp.js.map → chunk-bn5yn731.js.map} +1 -1
- package/dist/{chunk-t85rca2p.js → chunk-c098fzvk.js} +2 -2
- package/dist/{chunk-t85rca2p.js.map → chunk-c098fzvk.js.map} +1 -1
- package/dist/{chunk-mp5krm14.js → chunk-cttmy1jp.js} +4 -4
- package/dist/{chunk-mp5krm14.js.map → chunk-cttmy1jp.js.map} +2 -2
- package/dist/{chunk-eyg88bgv.js → chunk-cy5qp6mz.js} +3 -3
- package/dist/{chunk-eyg88bgv.js.map → chunk-cy5qp6mz.js.map} +1 -1
- package/dist/{chunk-zys7kecf.js → chunk-ddr4qvvt.js} +3 -3
- package/dist/{chunk-zys7kecf.js.map → chunk-ddr4qvvt.js.map} +1 -1
- package/dist/chunk-e1n8zs3h.js +58 -0
- package/dist/chunk-e1n8zs3h.js.map +14 -0
- package/dist/{chunk-r9gzbjc5.js → chunk-et4pv1b1.js} +1 -1
- package/dist/{chunk-a1g0bahx.js → chunk-frerzsxq.js} +2 -2
- package/dist/{chunk-a1g0bahx.js.map → chunk-frerzsxq.js.map} +1 -1
- package/dist/{chunk-qz9aaw5x.js → chunk-gb37722w.js} +3 -3
- package/dist/{chunk-qz9aaw5x.js.map → chunk-gb37722w.js.map} +1 -1
- package/dist/chunk-h3864a8z.js +17 -0
- package/dist/{chunk-s5aa4hty.js.map → chunk-h3864a8z.js.map} +13 -12
- package/dist/{chunk-zhm3qvrc.js → chunk-h4sw6nt3.js} +3 -3
- package/dist/{chunk-zhm3qvrc.js.map → chunk-h4sw6nt3.js.map} +1 -1
- package/dist/{chunk-5d6eaxab.js → chunk-he7z7y9j.js} +2 -2
- package/dist/{chunk-5d6eaxab.js.map → chunk-he7z7y9j.js.map} +1 -1
- package/dist/{chunk-d2tngs73.js → chunk-hf7a51s3.js} +2 -2
- package/dist/{chunk-d2tngs73.js.map → chunk-hf7a51s3.js.map} +1 -1
- package/dist/chunk-hn67spz6.js +5 -0
- package/dist/{chunk-z9x8x3wq.js.map → chunk-hn67spz6.js.map} +1 -1
- package/dist/{chunk-f7jhkg8x.js → chunk-jbrwt3cs.js} +4 -4
- package/dist/{chunk-f7jhkg8x.js.map → chunk-jbrwt3cs.js.map} +1 -1
- package/dist/{chunk-k1ezptt8.js → chunk-k1vw22t2.js} +2 -2
- package/dist/{chunk-k1ezptt8.js.map → chunk-k1vw22t2.js.map} +1 -1
- package/dist/chunk-k1xt2tw7.js +4 -0
- package/dist/{chunk-rjcsdazt.js.map → chunk-k1xt2tw7.js.map} +2 -2
- package/dist/chunk-k9wgtrc5.js +24 -0
- package/dist/{chunk-w3j53r0a.js.map → chunk-k9wgtrc5.js.map} +4 -4
- package/dist/{chunk-7mc5e61r.js → chunk-kf71mjxa.js} +3 -3
- package/dist/{chunk-7mc5e61r.js.map → chunk-kf71mjxa.js.map} +1 -1
- package/dist/{chunk-vna85rdq.js → chunk-m6ystvtk.js} +2 -2
- package/dist/{chunk-vna85rdq.js.map → chunk-m6ystvtk.js.map} +1 -1
- package/dist/{chunk-qyyxzy04.js → chunk-mb7q7s0a.js} +3 -3
- package/dist/{chunk-qyyxzy04.js.map → chunk-mb7q7s0a.js.map} +1 -1
- package/dist/{chunk-sp2v357a.js → chunk-mn5xw79b.js} +3 -3
- package/dist/{chunk-sp2v357a.js.map → chunk-mn5xw79b.js.map} +1 -1
- package/dist/{chunk-q8k7f11z.js → chunk-mwqg079k.js} +2 -2
- package/dist/{chunk-q8k7f11z.js.map → chunk-mwqg079k.js.map} +1 -1
- package/dist/{chunk-ga533cpz.js → chunk-nncz308h.js} +3 -3
- package/dist/{chunk-ga533cpz.js.map → chunk-nncz308h.js.map} +1 -1
- package/dist/{chunk-hf32yq23.js → chunk-nsvktvp4.js} +2 -2
- package/dist/{chunk-hf32yq23.js.map → chunk-nsvktvp4.js.map} +1 -1
- package/dist/{chunk-3x86bhfn.js → chunk-nvv9wej6.js} +3 -3
- package/dist/{chunk-3x86bhfn.js.map → chunk-nvv9wej6.js.map} +1 -1
- package/dist/chunk-p1aqq0ga.js +16 -0
- package/dist/{chunk-d5sbnzng.js.map → chunk-p1aqq0ga.js.map} +5 -9
- package/dist/chunk-p7r2w4qw.js +5 -0
- package/dist/{chunk-ehasw3qm.js.map → chunk-p7r2w4qw.js.map} +2 -2
- package/dist/{chunk-zz7h6tdr.js → chunk-pwmgqq7z.js} +2 -2
- package/dist/{chunk-zz7h6tdr.js.map → chunk-pwmgqq7z.js.map} +1 -1
- package/dist/chunk-pyj7cd9t.js +4 -0
- package/dist/{chunk-gdsby5jh.js.map → chunk-pyj7cd9t.js.map} +2 -2
- package/dist/{chunk-h6g9g8qc.js → chunk-q9s7kwgt.js} +3 -3
- package/dist/{chunk-h6g9g8qc.js.map → chunk-q9s7kwgt.js.map} +1 -1
- package/dist/{chunk-9hbwvcxn.js → chunk-qd2v93y4.js} +2 -2
- package/dist/{chunk-9hbwvcxn.js.map → chunk-qd2v93y4.js.map} +1 -1
- package/dist/{chunk-tr9mxdth.js → chunk-rfcygmf5.js} +3 -3
- package/dist/{chunk-tr9mxdth.js.map → chunk-rfcygmf5.js.map} +1 -1
- package/dist/{chunk-vsnmdtrs.js → chunk-s6jjy4y9.js} +2 -2
- package/dist/{chunk-vsnmdtrs.js.map → chunk-s6jjy4y9.js.map} +1 -1
- package/dist/{chunk-6zekebzt.js → chunk-sq2wkynk.js} +2 -2
- package/dist/{chunk-6zekebzt.js.map → chunk-sq2wkynk.js.map} +1 -1
- package/dist/{chunk-52vsdnny.js → chunk-td8tha3j.js} +3 -3
- package/dist/{chunk-52vsdnny.js.map → chunk-td8tha3j.js.map} +1 -1
- package/dist/{chunk-t0bp8nrc.js → chunk-tk5q8hkv.js} +4 -4
- package/dist/{chunk-t0bp8nrc.js.map → chunk-tk5q8hkv.js.map} +2 -2
- package/dist/{chunk-dpy08xw4.js → chunk-tq85n8zh.js} +2 -2
- package/dist/{chunk-dpy08xw4.js.map → chunk-tq85n8zh.js.map} +1 -1
- package/dist/{chunk-wdpdqjr1.js → chunk-twnn7r66.js} +2 -2
- package/dist/{chunk-wdpdqjr1.js.map → chunk-twnn7r66.js.map} +1 -1
- package/dist/chunk-w7jsh3xd.js +5 -0
- package/dist/{chunk-1es50p4k.js.map → chunk-w7jsh3xd.js.map} +2 -2
- package/dist/{chunk-zh1t33nq.js → chunk-wsttx9rg.js} +2 -2
- package/dist/{chunk-zh1t33nq.js.map → chunk-wsttx9rg.js.map} +1 -1
- package/dist/{chunk-7ssjzp87.js → chunk-wvsv1jgg.js} +2 -2
- package/dist/{chunk-7ssjzp87.js.map → chunk-wvsv1jgg.js.map} +1 -1
- package/dist/chunk-x78jrs4y.js +4 -0
- package/dist/{chunk-y66ntxbg.js.map → chunk-x78jrs4y.js.map} +2 -2
- package/dist/chunk-xk930yaw.js +5 -0
- package/dist/{chunk-pa3khk46.js.map → chunk-xk930yaw.js.map} +2 -2
- package/dist/chunk-xkc7ftnq.js +9 -0
- package/dist/chunk-xkc7ftnq.js.map +10 -0
- package/dist/{chunk-564zfdd1.js → chunk-yer1r3t3.js} +2 -2
- package/dist/{chunk-564zfdd1.js.map → chunk-yer1r3t3.js.map} +1 -1
- package/dist/{chunk-c8dhvdrs.js → chunk-yqavgpwd.js} +3 -3
- package/dist/{chunk-c8dhvdrs.js.map → chunk-yqavgpwd.js.map} +1 -1
- package/dist/{chunk-hyfzw1fk.js → chunk-z10cas5r.js} +2 -2
- package/dist/{chunk-hyfzw1fk.js.map → chunk-z10cas5r.js.map} +1 -1
- package/dist/{chunk-jgtean4t.js → chunk-zhs1r1z0.js} +3 -3
- package/dist/{chunk-jgtean4t.js.map → chunk-zhs1r1z0.js.map} +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +106 -52
- package/dist/client/index.js.map +1 -1
- package/dist/client/islands.d.ts +99 -56
- package/dist/client/islands.d.ts.map +1 -1
- package/dist/config/index.d.ts +8 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +2 -2
- 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/Lang.d.ts +7 -1
- package/dist/facades/Lang.d.ts.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/CorsMiddleware.d.ts +13 -0
- package/dist/http/CorsMiddleware.d.ts.map +1 -1
- package/dist/http/Middleware.d.ts +11 -0
- package/dist/http/Middleware.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts +29 -0
- package/dist/http/ViewRouter.d.ts.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 +45 -0
- package/dist/internal/islandRuntime.d.ts.map +1 -0
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/orm/context.d.ts +24 -0
- package/dist/orm/context.d.ts.map +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +3 -3
- package/dist/orm/index.js.map +2 -2
- package/dist/server/devFetch.d.ts.map +1 -1
- package/dist/server/httpDev.d.ts.map +1 -1
- package/dist/server/httpProd.d.ts.map +1 -1
- package/dist/server/idleTimeout.d.ts +24 -0
- package/dist/server/idleTimeout.d.ts.map +1 -0
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/modulePreloads.d.ts +7 -6
- package/dist/server/modulePreloads.d.ts.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/services/index.js.map +1 -1
- package/dist/services/middleware/MiddlewareRegistry.d.ts +13 -2
- package/dist/services/middleware/MiddlewareRegistry.d.ts.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/DomainRouter.d.ts +10 -0
- package/dist/services/router/DomainRouter.d.ts.map +1 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts +3 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/staticCache.d.ts +23 -0
- package/dist/services/router/staticCache.d.ts.map +1 -0
- package/dist/services/router/staticDocument.d.ts +39 -17
- package/dist/services/router/staticDocument.d.ts.map +1 -1
- package/dist/stats/bundleStats.d.ts +104 -0
- package/dist/stats/bundleStats.d.ts.map +1 -0
- package/dist/stats/route-table.d.ts +2 -0
- package/dist/stats/route-table.d.ts.map +1 -0
- package/dist/stats/route-table.js +4 -0
- package/dist/stats/route-table.js.map +11 -0
- package/dist/stats/routeTable.d.ts +25 -0
- package/dist/stats/routeTable.d.ts.map +1 -0
- package/dist/stats/run.d.ts +43 -0
- package/dist/stats/run.d.ts.map +1 -0
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/vite/index.mjs +125 -23
- package/dist/vitest/index.d.ts +18 -0
- package/dist/vitest/index.d.ts.map +1 -1
- package/dist/vitest/index.js +2 -2
- package/dist/vitest/index.js.map +3 -3
- package/package.json +2 -1
- package/dist/chunk-1es50p4k.js +0 -5
- package/dist/chunk-9qw9fa6z.js +0 -4
- package/dist/chunk-d5sbnzng.js +0 -18
- package/dist/chunk-ehasw3qm.js +0 -5
- package/dist/chunk-fe1pcnw6.js +0 -6
- package/dist/chunk-fj6yftm7.js +0 -58
- package/dist/chunk-fj6yftm7.js.map +0 -14
- package/dist/chunk-gdsby5jh.js +0 -4
- package/dist/chunk-ngw4xzrt.js +0 -9
- package/dist/chunk-ngw4xzrt.js.map +0 -10
- package/dist/chunk-pa3khk46.js +0 -5
- package/dist/chunk-rjcsdazt.js +0 -4
- package/dist/chunk-s5aa4hty.js +0 -17
- package/dist/chunk-w3j53r0a.js +0 -24
- package/dist/chunk-y66ntxbg.js +0 -4
- package/dist/chunk-z9x8x3wq.js +0 -5
- /package/dist/{chunk-m9609t1y.js.map → chunk-0sjh5v1n.js.map} +0 -0
- /package/dist/{chunk-vwkdfngg.js.map → chunk-8b2tw2yp.js.map} +0 -0
- /package/dist/{chunk-r9gzbjc5.js.map → chunk-et4pv1b1.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";sIAAA,SACA,KACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
|
|
8
|
+
"debugId": "C78074D1908A414C64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{watch as K,existsSync as L,readFileSync as M}from"fs";import{join as O}from"path";function P(G){let A={};for(let C of G.split(`
|
|
3
3
|
`)){let z=C.trim();if(!z||z.startsWith("#"))continue;let B=z.startsWith("export ")?z.slice(7).trim():z,I=B.indexOf("=");if(I===-1)continue;let J=B.slice(0,I).trim();if(!J)continue;let H=B.slice(I+1).trim();if(H.length>=2&&(H.startsWith('"')&&H.endsWith('"')||H.startsWith("'")&&H.endsWith("'")))H=H.slice(1,-1);A[J]=H}return A}function Q(G){let A=Bun.env.NODE_ENV,C=[".env"];if(A)C.push(`.env.${A}`);if(A!=="test"){if(C.push(".env.local"),A)C.push(`.env.${A}.local`)}return C.map((z)=>O(G,z))}function R(G){let A={};for(let z of Q(G))if(L(z))Object.assign(A,P(M(z,"utf8")));let C=[];for(let[z,B]of Object.entries(A))if(process.env[z]!==B)process.env[z]=B,C.push(z);return C}function V(G=process.cwd()){if(globalThis.__gemiEnvWatcher)return;let A;globalThis.__gemiEnvWatcher=K(G,(C,z)=>{if(!z||!String(z).startsWith(".env"))return;clearTimeout(A),A=setTimeout(()=>{try{let B=R(G);if(B.length)console.log(`[gemi] .env reloaded: ${B.join(", ")}`)}catch(B){console.error("[gemi] failed to reload .env:",B)}},50)})}
|
|
4
|
-
export{Q as
|
|
4
|
+
export{Q as Fa,V as Ga};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=5FD06B83FD70863964756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { watch, existsSync, readFileSync, type FSWatcher } from \"node:fs\";\nimport { join } from \"node:path\";\n\ndeclare global {\n // A single directory watcher, kept on globalThis so `bun --hot` reloads (which\n // re-run `Server.start`) don't stack duplicate watchers.\n var __gemiEnvWatcher: FSWatcher | undefined;\n}\n\n// Minimal `.env` parser: `KEY=VALUE` lines, `#` comments, an optional leading\n// `export`, and surrounding single/double quotes stripped. Multi-line values and\n// `${VAR}` interpolation are intentionally not handled (uncommon subset).\nfunction parseEnv(content: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const raw of content.split(\"\\n\")) {\n const line = raw.trim();\n if (!line || line.startsWith(\"#\")) continue;\n const body = line.startsWith(\"export \") ? line.slice(7).trim() : line;\n const eq = body.indexOf(\"=\");\n if (eq === -1) continue;\n const key = body.slice(0, eq).trim();\n if (!key) continue;\n let value = body.slice(eq + 1).trim();\n if (\n value.length >= 2 &&\n ((value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\")))\n ) {\n value = value.slice(1, -1);\n }\n out[key] = value;\n }\n return out;\n}\n\n// The `.env` files Bun loads, in increasing precedence (later overrides earlier).\n// `.env.local` is skipped for `NODE_ENV=test`, matching Bun/dotenv conventions.\nexport function envFiles(rootDir: string): string[] {\n const nodeEnv = process.env.NODE_ENV;\n const names = [\".env\"];\n if (nodeEnv) names.push(`.env.${nodeEnv}`);\n if (nodeEnv !== \"test\") {\n names.push(\".env.local\");\n if (nodeEnv) names.push(`.env.${nodeEnv}.local`);\n }\n return names.map((name) => join(rootDir, name));\n}\n\n// Re-read the env files and apply them to `process.env`. Only adds/updates keys\n// (a value edit is the common case); a key removed from the file keeps its last\n// value until the next full restart, so we never clobber the real OS environment.\nfunction applyEnv(rootDir: string): string[] {\n const merged: Record<string, string> = {};\n for (const file of envFiles(rootDir)) {\n if (existsSync(file)) {\n Object.assign(merged, parseEnv(readFileSync(file, \"utf8\")));\n }\n }\n const changed: string[] = [];\n for (const [key, value] of Object.entries(merged)) {\n if (process.env[key] !== value) {\n process.env[key] = value;\n changed.push(key);\n }\n }\n return changed;\n}\n\n// Watch the project's `.env` files and re-apply them to `process.env` on change,\n// so edits take effect without restarting the dev server. Bun loads `.env` only\n// at startup and does not reload it (even under `--hot`), so this fills that gap.\n// Dev only — called from `Server.start()`'s dev branch, not in production.\n// Idempotent: keeps a single watcher across `bun --hot` reloads.\n//\n// Note: this updates `process.env`, so config read at request time picks up the\n// new value immediately; values a service reads once at boot (e.g. a client\n// constructed from an env var) are cached and won't change until that code\n// re-runs (a hot reload in dev, a restart in prod).\nexport function watchEnv(rootDir: string = process.cwd()) {\n if (globalThis.__gemiEnvWatcher) return;\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n globalThis.__gemiEnvWatcher = watch(rootDir, (_event, filename) => {\n // Non-recursive: only direct children of `rootDir`. Filter to `.env*`.\n if (!filename || !String(filename).startsWith(\".env\")) return;\n clearTimeout(timer);\n timer = setTimeout(() => {\n try {\n const changed = applyEnv(rootDir);\n if (changed.length) {\n console.log(`[gemi] .env reloaded: ${changed.join(\", \")}`);\n }\n } catch (error) {\n console.error(\"[gemi] failed to reload .env:\", error);\n }\n }, 50);\n });\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAAA,gBAAS,gBAAO,kBAAY,WAC5B,eAAS,aAWT,SAAS,CAAQ,CAAC,EAAyC,CACzD,IAAM,EAA8B,CAAC,EACrC,QAAW,KAAO,EAAQ,MAAM;AAAA,CAAI,EAAG,CACrC,IAAM,EAAO,EAAI,KAAK,EACtB,GAAI,CAAC,GAAQ,EAAK,WAAW,GAAG,EAAG,SACnC,IAAM,EAAO,EAAK,WAAW,SAAS,EAAI,EAAK,MAAM,CAAC,EAAE,KAAK,EAAI,EAC3D,EAAK,EAAK,QAAQ,GAAG,EAC3B,GAAI,IAAO,GAAI,SACf,IAAM,EAAM,EAAK,MAAM,EAAG,CAAE,EAAE,KAAK,EACnC,GAAI,CAAC,EAAK,SACV,IAAI,EAAQ,EAAK,MAAM,EAAK,CAAC,EAAE,KAAK,EACpC,GACE,EAAM,QAAU,IACd,EAAM,WAAW,GAAG,GAAK,EAAM,SAAS,GAAG,GAC1C,EAAM,WAAW,GAAG,GAAK,EAAM,SAAS,GAAG,GAE9C,EAAQ,EAAM,MAAM,EAAG,EAAE,EAE3B,EAAI,GAAO,EAEb,OAAO,EAKF,SAAS,CAAQ,CAAC,EAA2B,CAClD,IAAM,EAAU,iBACV,EAAQ,CAAC,MAAM,EACrB,GAAI,EAAS,EAAM,KAAK,QAAQ,GAAS,EACzC,GAAI,IAAY,QAEd,GADA,EAAM,KAAK,YAAY,EACnB,EAAS,EAAM,KAAK,QAAQ,SAAe,EAEjD,OAAO,EAAM,IAAI,CAAC,IAAS,EAAK,EAAS,CAAI,CAAC,EAMhD,SAAS,CAAQ,CAAC,EAA2B,CAC3C,IAAM,EAAiC,CAAC,EACxC,QAAW,KAAQ,EAAS,CAAO,EACjC,GAAI,EAAW,CAAI,EACjB,OAAO,OAAO,EAAQ,EAAS,EAAa,EAAM,MAAM,CAAC,CAAC,EAG9D,IAAM,EAAoB,CAAC,EAC3B,QAAY,EAAK,KAAU,OAAO,QAAQ,CAAM,EAC9C,GAAI,QAAQ,IAAI,KAAS,EACvB,QAAQ,IAAI,GAAO,EACnB,EAAQ,KAAK,CAAG,EAGpB,OAAO,EAaF,SAAS,CAAQ,CAAC,EAAkB,QAAQ,IAAI,EAAG,CACxD,GAAI,WAAW,iBAAkB,OAEjC,IAAI,EACJ,WAAW,iBAAmB,EAAM,EAAS,CAAC,EAAQ,IAAa,CAEjE,GAAI,CAAC,GAAY,CAAC,OAAO,CAAQ,EAAE,WAAW,MAAM,EAAG,OACvD,aAAa,CAAK,EAClB,EAAQ,WAAW,IAAM,CACvB,GAAI,CACF,IAAM,EAAU,EAAS,CAAO,EAChC,GAAI,EAAQ,OACV,QAAQ,IAAI,yBAAyB,EAAQ,KAAK,IAAI,GAAG,EAE3D,MAAO,EAAO,CACd,QAAQ,MAAM,gCAAiC,CAAK,IAErD,EAAE,EACN",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "5FD06B83FD70863964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Fa as y}from"./chunk-5stgtwqw.js";import{createElement as q}from"react";function z(i,n){let b=Object.keys(n).sort((p,g)=>g.length-p.length).map((p)=>p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),s=new RegExp(b.join("|"),"g");return i.replace(s,(p)=>n[p])}async function L(i,n,b=[],s){let p=[...b.map((t)=>`${i}/views/${t}.tsx`),s?`${i}/views/${s}.tsx`:`${i}/views/RootLayout.tsx`],g=new Set;for(let t of p){let u=n.moduleGraph.getModulesByFile(t);if(u)for(let x of u)g.add(x)}let e=[],l=[],c={};for(let t of g)if(t)for(let u of t.importedModules){if(u.file.includes("module.css"))c[u.file]=u.ssrTransformResult.map.sourcesContent.join("");if(u.file.includes(".css"))l.push(u.file)}for(let t of l){let u=await n.transformRequest(t+"?direct"),x=t.includes("module.css"),k="";if(x)k=z(c[t],u.default);e.push({isDev:!0,id:t,content:x?k:u.code})}return e.map((t,u)=>{return q("style",{key:u,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function _(i=[]){return i.map((n,b)=>{return q("style",{key:b,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as J}from"fs";import{basename as N}from"path";import{networkInterfaces as O}from"os";var v={name:"gemi",version:"0.110.0",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*","ide/typescript-plugin/package.json","skills/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./ai":"./ai/index.ts","./ai/client":"./ai/client/index.ts","./testing":"./testing/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./i18n":"./i18n/index.ts","./dictionary":"./i18n/dictionaryRuntime.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./console/run":"./console/run.ts","./queue/work":"./services/queue/work.ts","./stats/route-table":"./stats/route-table.ts","./ide/typescript-plugin":"./ide/typescript-plugin/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts","./vitest":"./vitest/index.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.browser.json && tsc --noEmit -p ide/typescript-plugin/tsconfig.json",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:ts-plugin && bun run build:client-types && bun run build:augmentation","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --external=typescript --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"rm -rf dist/client dist/testing dist/ai/client dist/chunks && vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:ts-plugin":"bun ./scripts/build-ts-plugin.ts","build:types":"tsc -p tsconfig.build.json","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun vitest","test:types":"vitest run --typecheck.only","test:live":"bun --bun vitest run ai/live","test:packaging":"bun --bun vitest run --config vitest.packaging.config.ts","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1","build:augmentation":"bun ./scripts/wire-augmentation.ts"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1","magic-string":"^0.30.17",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",jsdom:"^30.0.1",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",typescript:">=5",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0},typescript:{optional:!0}}};var Q=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],W=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,r=(i,n)=>W?`\x1B[${i}m${n}\x1B[0m`:n,X=(i)=>r("1",i),d=(i)=>r("2",i),j=(i)=>r("36",i),Y=(i)=>r("32",i),Z=(i)=>r("35",i);function $(){return v.version??"?"}function f(i){for(let n of Object.values(O()))for(let b of n??[])if((b.family==="IPv4"||b.family===4)&&!b.internal)return`http://${b.address}:${i}`;return null}function H(i){return y(i).filter((n)=>J(n)).map((n)=>N(n))}function T(i){let{port:n,rootDir:b}=i,s=`http://localhost:${n}`,p=f(n),g=H(b),e=(c,t)=>` ${Y("\u279C")} ${X(c.padEnd(9))}${t}`,l=["",...Q.map((c)=>Z(c)),"",` ${d("gemi")} ${j(`v${$()}`)}`,"",e("Local:",j(s)),e("Network:",p?j(p):d("unavailable")),e("Env:",g.length?g.join(", "):d("none")),""];console.log(l.join(`
|
|
3
|
+
`))}function I(i=process.env.SERVER_IDLE_TIMEOUT){if(i===void 0||i.trim()==="")return 10;let n=Number(i.trim());if(!Number.isInteger(n)||n<0||n>255)throw Error(`SERVER_IDLE_TIMEOUT must be a whole number of seconds from 0 to 255 (0 disables the timeout), got ${JSON.stringify(i)}.`);return n}
|
|
4
|
+
export{L as D,_ as E,T as F,I as G};
|
|
5
|
+
|
|
6
|
+
//# debugId=EB43F409458ADFA564756E2164756E21
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../server/styles.ts", "../server/banner.ts"],
|
|
3
|
+
"sources": ["../server/styles.ts", "../server/banner.ts", "../server/idleTimeout.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { createElement } from \"react\";\nimport { type ModuleNode, type ViteDevServer } from \"vite\";\n\nfunction replaceStrings(text: string, record: Record<string, string>): string {\n const escapedKeys = Object.keys(record)\n .sort((a, b) => b.length - a.length)\n .map((key) => key.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n\n // Create a single regex with all keys\n const regex = new RegExp(escapedKeys.join(\"|\"), \"g\");\n\n return text.replace(regex, (match) => record[match]);\n}\n\nexport async function createDevStyles(\n appDir: string,\n vite: ViteDevServer,\n currentViews: string[] = [],\n /** A static view's own document layout, which replaces `RootLayout`. */\n layout?: string,\n) {\n const views = [\n ...currentViews.map((view) => `${appDir}/views/${view}.tsx`),\n layout ? `${appDir}/views/${layout}.tsx` : `${appDir}/views/RootLayout.tsx`,\n ];\n\n const modules = new Set<ModuleNode>();\n for (const view of views) {\n const mod = vite.moduleGraph.getModulesByFile(view);\n if (mod) {\n for (const m of mod) modules.add(m);\n }\n }\n\n const styles = [];\n const cssModules = [];\n const cssModuleContent: Record<string, string> = {};\n for (const mod of modules as any) {\n if (mod) {\n for (const imported of mod.importedModules) {\n if (imported.file.includes(\"module.css\")) {\n cssModuleContent[imported.file] = imported.ssrTransformResult.map.sourcesContent.join(\"\");\n }\n if (imported.file.includes(\".css\")) {\n cssModules.push(imported.file);\n }\n }\n }\n }\n\n for (const cssModulePath of cssModules) {\n const transform = await vite.transformRequest(cssModulePath + \"?direct\");\n\n const isCssModule = cssModulePath.includes(\"module.css\");\n\n let transformedCssModule = \"\";\n\n if (isCssModule) {\n transformedCssModule = replaceStrings(\n cssModuleContent[cssModulePath],\n // Vite's `TransformResult` type has no `default`, but the CSS-module\n // transform attaches the class-name mapping there at runtime.\n (transform as unknown as { default: Record<string, string> }).default,\n );\n }\n\n styles.push({\n isDev: true,\n id: cssModulePath,\n content: isCssModule ? transformedCssModule : transform.code,\n });\n }\n\n return styles.map((style, i) => {\n return createElement(\"style\", {\n key: i,\n type: \"text/css\",\n \"data-vite-dev-id\": style.id,\n dangerouslySetInnerHTML: { __html: style.content },\n });\n });\n}\n\nexport async function createStyles(styles = []) {\n return styles.map((style, i) => {\n return createElement(\"style\", {\n key: i,\n id: style?.id,\n type: \"text/css\",\n dangerouslySetInnerHTML: { __html: style.content },\n });\n });\n}\n",
|
|
6
|
-
"import { existsSync } from \"node:fs\";\nimport { basename } from \"node:path\";\nimport { networkInterfaces } from \"node:os\";\nimport { envFiles } from \"./watchEnv\";\nimport pkg from \"../package.json\";\n\n// \"GEMI\" — ANSI Shadow figlet font.\nconst ART = [\n \" ██████╗ ███████╗███╗ ███╗██╗\",\n \"██╔════╝ ██╔════╝████╗ ████║██║\",\n \"██║ ███╗█████╗ ██╔████╔██║██║\",\n \"██║ ██║██╔══╝ ██║╚██╔╝██║██║\",\n \"╚██████╔╝███████╗██║ ╚═╝ ██║██║\",\n \" ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝\",\n];\n\nconst useColor = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;\nconst paint = (code: string, text: string) =>\n useColor ? `\\x1b[${code}m${text}\\x1b[0m` : text;\nconst bold = (t: string) => paint(\"1\", t);\nconst dim = (t: string) => paint(\"2\", t);\nconst cyan = (t: string) => paint(\"36\", t);\nconst green = (t: string) => paint(\"32\", t);\nconst magenta = (t: string) => paint(\"35\", t);\n\nfunction gemiVersion(): string {\n return (pkg as { version?: string }).version ?? \"?\";\n}\n\nfunction networkUrl(port: number | string): string | null {\n for (const ifaces of Object.values(networkInterfaces())) {\n for (const iface of ifaces ?? []) {\n // Node <18 reported `family` as the number 4; newer Bun/Node use \"IPv4\".\n const isV4 = iface.family === \"IPv4\" || (iface.family as unknown) === 4;\n if (isV4 && !iface.internal) return `http://${iface.address}:${port}`;\n }\n }\n return null;\n}\n\nfunction loadedEnvFiles(rootDir: string): string[] {\n return envFiles(rootDir)\n .filter((file) => existsSync(file))\n .map((file) => basename(file));\n}\n\nexport function printStartupBanner(params: {\n port: number | string;\n rootDir: string;\n}) {\n const { port, rootDir } = params;\n const local = `http://localhost:${port}`;\n const network = networkUrl(port);\n const env = loadedEnvFiles(rootDir);\n\n const row = (label: string, value: string) =>\n ` ${green(\"➜\")} ${bold(label.padEnd(9))}${value}`;\n\n const out = [\n \"\",\n ...ART.map((line) => magenta(line)),\n \"\",\n ` ${dim(\"gemi\")} ${cyan(`v${gemiVersion()}`)}`,\n \"\",\n row(\"Local:\", cyan(local)),\n row(\"Network:\", network ? cyan(network) : dim(\"unavailable\")),\n row(\"Env:\", env.length ? env.join(\", \") : dim(\"none\")),\n \"\",\n ];\n\n console.log(out.join(\"\\n\"));\n}\n"
|
|
6
|
+
"import { existsSync } from \"node:fs\";\nimport { basename } from \"node:path\";\nimport { networkInterfaces } from \"node:os\";\nimport { envFiles } from \"./watchEnv\";\nimport pkg from \"../package.json\";\n\n// \"GEMI\" — ANSI Shadow figlet font.\nconst ART = [\n \" ██████╗ ███████╗███╗ ███╗██╗\",\n \"██╔════╝ ██╔════╝████╗ ████║██║\",\n \"██║ ███╗█████╗ ██╔████╔██║██║\",\n \"██║ ██║██╔══╝ ██║╚██╔╝██║██║\",\n \"╚██████╔╝███████╗██║ ╚═╝ ██║██║\",\n \" ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝\",\n];\n\nconst useColor = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;\nconst paint = (code: string, text: string) =>\n useColor ? `\\x1b[${code}m${text}\\x1b[0m` : text;\nconst bold = (t: string) => paint(\"1\", t);\nconst dim = (t: string) => paint(\"2\", t);\nconst cyan = (t: string) => paint(\"36\", t);\nconst green = (t: string) => paint(\"32\", t);\nconst magenta = (t: string) => paint(\"35\", t);\n\nfunction gemiVersion(): string {\n return (pkg as { version?: string }).version ?? \"?\";\n}\n\nfunction networkUrl(port: number | string): string | null {\n for (const ifaces of Object.values(networkInterfaces())) {\n for (const iface of ifaces ?? []) {\n // Node <18 reported `family` as the number 4; newer Bun/Node use \"IPv4\".\n const isV4 = iface.family === \"IPv4\" || (iface.family as unknown) === 4;\n if (isV4 && !iface.internal) return `http://${iface.address}:${port}`;\n }\n }\n return null;\n}\n\nfunction loadedEnvFiles(rootDir: string): string[] {\n return envFiles(rootDir)\n .filter((file) => existsSync(file))\n .map((file) => basename(file));\n}\n\nexport function printStartupBanner(params: {\n port: number | string;\n rootDir: string;\n}) {\n const { port, rootDir } = params;\n const local = `http://localhost:${port}`;\n const network = networkUrl(port);\n const env = loadedEnvFiles(rootDir);\n\n const row = (label: string, value: string) =>\n ` ${green(\"➜\")} ${bold(label.padEnd(9))}${value}`;\n\n const out = [\n \"\",\n ...ART.map((line) => magenta(line)),\n \"\",\n ` ${dim(\"gemi\")} ${cyan(`v${gemiVersion()}`)}`,\n \"\",\n row(\"Local:\", cyan(local)),\n row(\"Network:\", network ? cyan(network) : dim(\"unavailable\")),\n row(\"Env:\", env.length ? env.join(\", \") : dim(\"none\")),\n \"\",\n ];\n\n console.log(out.join(\"\\n\"));\n}\n",
|
|
7
|
+
"/**\n * Bun's default, and what both servers use when `SERVER_IDLE_TIMEOUT` is unset.\n */\nexport const DEFAULT_SERVER_IDLE_TIMEOUT = 10;\n\n/**\n * The `idleTimeout` (seconds) both `gemi dev` and `gemi start` pass to\n * `Bun.serve`, from `SERVER_IDLE_TIMEOUT` (#787).\n *\n * One reader for both servers, so a long-poll that works under `gemi start`\n * also works under `gemi dev`. Before this, only `httpProd` read the variable\n * and the dev server always ran at Bun's 10 seconds.\n *\n * It is the time a connection may stay silent, a response that has not started\n * included, before Bun closes it; `0` disables it. It does not apply to an\n * upgraded websocket (the HMR relay included), which has its own\n * `websocket.idleTimeout`.\n *\n * Unset or blank means the default. Anything that is not a whole number from 0\n * to 255 (Bun's own limits) fails the boot with the variable's name, instead\n * of Bun's \"expects idleTimeout to be an integer\", which does not say where the\n * value came from.\n */\nexport function serverIdleTimeout(raw: string | undefined = process.env.SERVER_IDLE_TIMEOUT): number {\n if (raw === undefined || raw.trim() === \"\") return DEFAULT_SERVER_IDLE_TIMEOUT;\n\n const seconds = Number(raw.trim());\n if (!Number.isInteger(seconds) || seconds < 0 || seconds > 255) {\n throw new Error(\n `SERVER_IDLE_TIMEOUT must be a whole number of seconds from 0 to 255 ` +\n `(0 disables the timeout), got ${JSON.stringify(raw)}.`,\n );\n }\n return seconds;\n}\n"
|
|
7
8
|
],
|
|
8
|
-
"m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D,EAEF,OAAO",
|
|
10
|
+
"debugId": "EB43F409458ADFA564756E2164756E21",
|
|
10
11
|
"names": []
|
|
11
12
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{na as w,oa as P,pa as R,qa as b}from"./chunk-frerzsxq.js";import{ta as K,ua as _,va as L,wa as A}from"./chunk-yer1r3t3.js";import{xa as I}from"./chunk-303mprnv.js";import{ya as T,za as E}from"./chunk-p1aqq0ga.js";var i=["gemi","gemi/client","gemi/http","gemi/app","gemi/facades","gemi/email","gemi/kernel","gemi/services","gemi/i18n","gemi/dictionary"];function O(q){return q==="gemi"||q.startsWith("gemi/")}import{parseAstAsync as h}from"vite";var V="virtual:gemi-dict/",x="\x00virtual:gemi-dict/",f=new Set(["gemi/dictionary","gemi/client","gemi/i18n"]),y="gemi/dictionary";function B(){let q=new Map;return{name:"gemi-plugin-dictionary",enforce:"post",resolveId(H){if(H.startsWith(V))return`\x00${H}`;return null},async load(H){if(!H.startsWith(x))return null;let Q=H.slice(x.length),W=Q.lastIndexOf("/"),J=Q.slice(0,W),Y=Q.slice(W+1),$=q.get(J);if(!$){let M=g(J);if(M){try{await this.load({id:M})}catch{}$=q.get(J)}}if(!$)return this.error(`No dictionary registered for "${J}". If this persists, restart the dev server.`),null;let G=_($.translations,Y,$.locales);return`export default ${JSON.stringify(G)};
|
|
3
|
+
`},async transform(H,Q){if(!H.includes("defineDictionary"))return null;if(Q.startsWith("\x00")||Q.includes("/node_modules/"))return null;let W=await h(H),J=new Set;for(let Z of W.body){if(Z.type!=="ImportDeclaration")continue;if(!f.has(Z.source?.value))continue;for(let z of Z.specifiers??[])if(z.type==="ImportSpecifier"&&z.imported?.name==="defineDictionary")J.add(z.local.name)}let Y=[],$=0;if(X(W,(Z)=>{if(Z.type!=="CallExpression")return;let z=Z.callee;if(z?.type==="Identifier"&&J.has(z.name)){Y.push(Z);return}if((z?.type==="Identifier"?z.name:z?.type==="MemberExpression"&&!z.computed?z.property?.name:void 0)==="defineDictionary")$++}),$>0&&p(W,"defineDictionary"))$=0;if($>0)this.warn(`${Q}: ${$} defineDictionary() call(s) could not be traced to an import of "gemi/dictionary", "gemi/client" or "gemi/i18n", so their locales were left inline and will all ship to the browser. Import defineDictionary directly by name rather than through a namespace import or a local re-export.`);if(Y.length===0)return null;let G=new T(H),M=!1;for(let Z of Y){if(Z.arguments?.length<1||Z.arguments?.length>2)this.error({message:"defineDictionary() takes an object literal and an optional options object.",pos:Z.start});let z=m(Z.arguments[0],(j)=>this.error({message:j,pos:Z.arguments[0]?.start??Z.start})),F=v(Z.arguments[1],(j)=>this.error({message:j,pos:Z.arguments[1]?.start??Z.start})),D=A(z),C=`${Buffer.from(Q).toString("base64url")}/${D}`,N=K(z,F);if(N.length===0)this.error({message:'defineDictionary() declares no locales \u2014 every key needs at least one "<locale>": "<string>" entry.',pos:Z.start});if(!F){let j=L(z);if(j)this.error({message:`defineDictionary() cannot infer a source language. Key "${j.againstKey}" lists "${j.againstFirst}" first but "${j.key}" lists "${j.first}" first, so the locale every key falls back to depends on the order `+"they are written in \u2014 moving one key would change what language a reader sees. "+'Pass { sourceLocale: "<locale>" } as the second argument to pin it.',pos:Z.start})}q.set(C,{id:D,locales:N,translations:z});let S=N.map((j)=>`${JSON.stringify(j)}:()=>import(${JSON.stringify(`${V}${C}/${j}`)})`).join(",");G.overwrite(Z.start,Z.end,`__gemi_dict__(${JSON.stringify(D)},{${S}})`),M=!0}if(!M)return null;return G.append(`
|
|
4
|
+
import { __gemi_dict__ } from ${JSON.stringify(y)};
|
|
5
|
+
`),{code:G.toString(),map:G.generateMap({hires:!0})}}}}function g(q){let H=q.indexOf("/");if(H===-1)return null;try{return Buffer.from(q.slice(0,H),"base64url").toString("utf8")}catch{return null}}function m(q,H){if(q?.type!=="ObjectExpression")H("defineDictionary() needs an inline object literal \u2014 it is read at build time, so a variable or spread cannot be resolved.");let Q={};for(let W of q.properties){let J=U(W);if(J===null)H("defineDictionary() keys must be plain string keys \u2014 computed keys and spreads cannot be read at build time.");if(W.value?.type!=="ObjectExpression")H(`defineDictionary() entry "${J}" must be an object of "<locale>": "<string>" pairs.`);let Y={};for(let $ of W.value.properties){let G=U($);if(G===null)H(`defineDictionary() entry "${J}" has a locale key that cannot be read at build time.`);let M=$.value;if(M?.type!=="Literal"||typeof M.value!=="string")H(`defineDictionary() entry "${J}" locale "${G}" must be a string literal. Use {{param}} interpolation instead of a template literal or a function.`);Y[G]=M.value}Q[J]=Y}return Q}function v(q,H){if(q===void 0)return;if(q.type!=="ObjectExpression")H("defineDictionary() options must be an inline object literal \u2014 it is read at build time.");for(let Q of q.properties){if(U(Q)!=="sourceLocale")continue;let W=Q.value;if(W?.type!=="Literal"||typeof W.value!=="string")H("defineDictionary() sourceLocale must be a string literal.");return W.value}return}function p(q,H){let Q=!1;return X(q,(W)=>{if(Q)return;if(W.type==="FunctionDeclaration"&&W.id?.name===H)Q=!0;if(W.type==="VariableDeclarator"&&W.id?.name===H)Q=!0}),Q}function U(q){if(q?.type!=="Property"||q.computed)return null;if(q.key?.type==="Identifier")return q.key.name;if(q.key?.type==="Literal"&&typeof q.key.value==="string")return q.key.value;return null}function X(q,H){if(q===null||typeof q!=="object")return;if(Array.isArray(q)){for(let Q of q)X(Q,H);return}if(typeof q.type==="string")H(q);for(let Q of Object.keys(q)){if(Q==="parent")continue;let W=q[Q];if(W&&typeof W==="object")X(W,H)}}import{mkdir as u,writeFile as c}from"fs/promises";import{dirname as r,join as t}from"path";function k(q){let H;return{name:"gemi-plugin-asset-base",config:(Q,W)=>W.command==="build"&&q?{base:q}:void 0,configResolved(Q){H=Q},async writeBundle(Q){if(!H||H.command!=="build"||H.build.ssr||!Q.dir)return;let W=t(Q.dir,P);await u(r(W),{recursive:!0}),await c(W,`${JSON.stringify({assetBase:d(H.base)})}
|
|
6
|
+
`)}}}function d(q){return q.startsWith("/")||/^[a-z][a-z\d+.-]*:\/\//i.test(q)?R(q):w}var n=async()=>{let q=await I(process.cwd()),{plugins:H=[],...Q}=q.vite??{},W=b(q.assetBase);return[{name:"gemi-plugin-config",enforce:"pre",config:async(J,Y)=>{let $=`${process.cwd()}/app`;return{assetsInclude:["/public"],build:{manifest:!0,ssrEmitAssets:!0,sourcemap:!0,rollupOptions:{input:Array.from(JSON.parse(process.env.GEMI_INPUT??"[]")),preserveEntrySignatures:"strict",...Y.isSsrBuild?{external:O}:{}}},resolve:{alias:{"@/app":$}}}}},{name:"gemi-plugin-user-config",config:()=>Q},k(W),E(),{name:"gemi-plugin-hot-reload",handleHotUpdate({server:J,modules:Y}){if(Y?.[0]?.id?.includes("/app/http/"))return[]}},...H,B()]},Mq=n;
|
|
7
|
+
export{i as la,Mq as ma};
|
|
8
|
+
|
|
9
|
+
//# debugId=4D74FF354E84DE1E64756E2164756E21
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../internal/gemiExternals.ts", "../vite/dictionaryPlugin.ts", "../vite/assetBasePlugin.ts", "../vite/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"// Single source of truth for keeping `gemi` external to the SSR view graph.\n//\n// `gemi` is a linked package, so a bundler will otherwise compile its own copy\n// of gemi's module-level singletons (`RouteStateContext`, `I18nContext`, the\n// `useLocale`/`useRouteData` hooks, ...) into the view chunks — a *different*\n// instance than the running server's `Root` provider, so `useRouteData()` reads\n// the empty default and SSR crashes on `i18n.currentLocale`. Externalizing makes\n// view imports of `gemi/*` resolve to the one Bun-loaded instance.\n//\n// Two consumers, two forms:\n// - dev (`server/httpDev.ts`): Vite's `ssr.external` matches EXACT specifiers\n// only (subpaths are not covered by the bare name, regexes are ignored), so\n// it needs the enumerated list below. When you add a `gemi/*` export that a\n// view may import, add it here too or dev SSR will silently bundle a copy.\n// - build (`vite/index.ts`): rollup's `external` is a subpath-aware predicate,\n// so it uses `isGemiExternal` and needs no maintenance for new subpaths.\n\n// Every `gemi` entrypoint a view module may import. Keep in sync with the\n// view-facing `exports` in package.json (build/server-only subpaths like\n// `vite`, `server`, `bun/*`, and `config` are intentionally omitted — views\n// never import them).\nexport const GEMI_EXTERNAL_SPECIFIERS = [\n \"gemi\",\n \"gemi/client\",\n \"gemi/http\",\n \"gemi/app\",\n \"gemi/facades\",\n \"gemi/email\",\n \"gemi/kernel\",\n \"gemi/services\",\n \"gemi/i18n\",\n // Not optional: `defineDictionary` handles register themselves in a\n // module-level registry that the view router preloads and snapshots through.\n // A bundled second copy would give SSR two registries and empty payloads.\n \"gemi/dictionary\",\n] as const;\n\n// Predicate form for rollup's `external`: covers `gemi` and every `gemi/*`\n// subpath.\nexport function isGemiExternal(id: string): boolean {\n return id === \"gemi\" || id.startsWith(\"gemi/\");\n}\n",
|
|
6
|
+
"import MagicString from \"magic-string\";\nimport { parseAstAsync, type Plugin } from \"vite\";\nimport {\n dictionaryId,\n dictionaryLocales,\n findSourceDisagreement,\n localeStrings,\n type DictionaryTranslations,\n} from \"../i18n/dictionaryShape\";\n\n/**\n * Splits `defineDictionary({...})` literals into one chunk per locale.\n *\n * Authoring keeps every locale in one file next to the component. This rewrites\n * the call so the strings themselves leave the module entirely:\n *\n * const dict = defineDictionary({ title: { \"en-US\": \"Hi\", \"tr-TR\": \"Selam\" } })\n *\n * becomes\n *\n * const dict = __gemi_dict__(\"d_1a2b3c4d5e6f7081\", {\n * \"en-US\": () => import(\"virtual:gemi-dict/<src>/d_.../en-US\"),\n * \"tr-TR\": () => import(\"virtual:gemi-dict/<src>/d_.../tr-TR\"),\n * })\n *\n * An explicit map rather than a template-literal `import()`: the bundler sees\n * static specifiers, so it emits a real chunk per locale and module-preload\n * hints keep working. A page then downloads only the locale it renders in.\n *\n * This is purely an optimization. `defineDictionary` untransformed holds every\n * locale and answers synchronously, which is what keeps `bun test` and server\n * code that never meets the bundler working with no special casing.\n */\n\nconst VIRTUAL_PREFIX = \"virtual:gemi-dict/\";\nconst RESOLVED_PREFIX = \"\\0virtual:gemi-dict/\";\n\n/** Entrypoints that may export `defineDictionary`. */\nconst DICTIONARY_SOURCES = new Set([\"gemi/dictionary\", \"gemi/client\", \"gemi/i18n\"]);\n\n/** Where the rewritten call reads `__gemi_dict__` from.\n *\n * `gemi/dictionary` is a deliberately tiny entrypoint holding only the registry\n * and the handle factory: it is in `GEMI_EXTERNAL_SPECIFIERS`, so under SSR it\n * resolves to the server's own instance and the registry the view router\n * preloads through is the same one the views register into. Pointing this at a\n * bundled copy instead would give the server two registries.\n */\nconst RUNTIME_SOURCE = \"gemi/dictionary\";\n\ninterface Extracted {\n /** The runtime id — a content hash, identical to what `defineDictionary`\n * computes for the same literal, which is what lets the SSR payload seed the\n * client registry. */\n id: string;\n locales: string[];\n translations: DictionaryTranslations;\n}\n\nexport function gemiDictionaryPlugin(): Plugin {\n // virtual key -> extracted dictionary, populated by `transform` and read by\n // `load`. Keyed by the virtual key rather than the runtime id because the key\n // also carries the source module, which is what lets a cold `load` recover.\n //\n // Ordering holds in every mode: a bundler resolves a module's imports only\n // after transforming it, and the virtual specifiers do not exist until this\n // transform writes them. Vite keeps one plugin instance for the life of the\n // dev server (gemi reuses a single Vite instance across `bun --hot` reloads),\n // so the map outlives individual requests.\n const extracted = new Map<string, Extracted>();\n\n return {\n name: \"gemi-plugin-dictionary\",\n // After TS and JSX have been stripped: `parseAstAsync` is a JavaScript\n // parser, so this must not run `pre`.\n enforce: \"post\",\n\n resolveId(id) {\n if (id.startsWith(VIRTUAL_PREFIX)) {\n return `\\0${id}`;\n }\n return null;\n },\n\n async load(id) {\n if (!id.startsWith(RESOLVED_PREFIX)) {\n return null;\n }\n\n const rest = id.slice(RESOLVED_PREFIX.length);\n const slash = rest.lastIndexOf(\"/\");\n const virtualKey = rest.slice(0, slash);\n const locale = rest.slice(slash + 1);\n\n let entry = extracted.get(virtualKey);\n if (!entry) {\n // The parent module was transformed by an earlier process (a warm\n // on-disk cache) so this map never saw it. Force the parent back\n // through the pipeline, which repopulates the entry.\n const sourceId = decodeSourceId(virtualKey);\n if (sourceId) {\n try {\n await this.load({ id: sourceId });\n } catch {\n // Fall through to the error below, which says something useful.\n }\n entry = extracted.get(virtualKey);\n }\n }\n\n if (!entry) {\n this.error(\n `No dictionary registered for \"${virtualKey}\". If this persists, restart the dev server.`,\n );\n return null;\n }\n\n const strings = localeStrings(entry.translations, locale, entry.locales);\n return `export default ${JSON.stringify(strings)};\\n`;\n },\n\n async transform(code, id) {\n // Cheap gate — most modules never mention it.\n if (!code.includes(\"defineDictionary\")) {\n return null;\n }\n if (id.startsWith(\"\\0\") || id.includes(\"/node_modules/\")) {\n return null;\n }\n\n const ast = await parseAstAsync(code);\n\n const localNames = new Set<string>();\n for (const node of ast.body as any[]) {\n if (node.type !== \"ImportDeclaration\") continue;\n if (!DICTIONARY_SOURCES.has(node.source?.value)) continue;\n for (const spec of node.specifiers ?? []) {\n if (\n spec.type === \"ImportSpecifier\" &&\n spec.imported?.name === \"defineDictionary\"\n ) {\n localNames.add(spec.local.name);\n }\n }\n }\n const calls: any[] = [];\n let unresolved = 0;\n walk(ast, (node) => {\n if (node.type !== \"CallExpression\") return;\n const callee = node.callee;\n if (callee?.type === \"Identifier\" && localNames.has(callee.name)) {\n calls.push(node);\n return;\n }\n // A call that *looks* like one and did not resolve to a tracked import:\n // a namespace import (`gemi.defineDictionary(...)`), a re-export through\n // an app-local barrel, or a linked workspace package whose id this\n // skipped. Silently leaving those inline is the fail-open path\n // `readObjectLiteral` refuses to take — every locale would ship to every\n // visitor with no build signal that splitting had stopped applying.\n const name =\n callee?.type === \"Identifier\"\n ? callee.name\n : callee?.type === \"MemberExpression\" && !callee.computed\n ? callee.property?.name\n : undefined;\n if (name === \"defineDictionary\") {\n unresolved++;\n }\n });\n\n // An app is free to have a `defineDictionary` of its own; warning about\n // that would be noise, and noise is how a real warning gets ignored.\n if (unresolved > 0 && declaresOwn(ast, \"defineDictionary\")) {\n unresolved = 0;\n }\n\n if (unresolved > 0) {\n this.warn(\n `${id}: ${unresolved} defineDictionary() call(s) could not be traced to an import of \"gemi/dictionary\", \"gemi/client\" or \"gemi/i18n\", so their locales were left inline and will all ship to the browser. Import defineDictionary directly by name rather than through a namespace import or a local re-export.`,\n );\n }\n\n if (calls.length === 0) {\n return null;\n }\n\n const s = new MagicString(code);\n let rewrote = false;\n\n for (const call of calls) {\n if (call.arguments?.length < 1 || call.arguments?.length > 2) {\n this.error({\n message: `defineDictionary() takes an object literal and an optional options object.`,\n pos: call.start,\n });\n }\n\n const translations = readObjectLiteral(call.arguments[0], (message) =>\n this.error({ message, pos: call.arguments[0]?.start ?? call.start }),\n );\n\n // Read here as well as at runtime, because it decides the fallback\n // order baked into each per-locale chunk. If the two disagreed, a\n // bundled dictionary would fall back differently from the same literal\n // read directly by a controller.\n const sourceLocale = readSourceLocale(call.arguments[1], (message) =>\n this.error({ message, pos: call.arguments[1]?.start ?? call.start }),\n );\n\n const runtimeId = dictionaryId(translations);\n const virtualKey = `${Buffer.from(id).toString(\"base64url\")}/${runtimeId}`;\n const locales = dictionaryLocales(translations, sourceLocale);\n\n if (locales.length === 0) {\n this.error({\n message: `defineDictionary() declares no locales — every key needs at least one \"<locale>\": \"<string>\" entry.`,\n pos: call.start,\n });\n }\n\n // Refused rather than guessed. Without `sourceLocale` the fallback\n // language is whichever locale is seen first while reading the literal,\n // which is stable only while every key carries it. Once one does not,\n // adding a key at the top re-points every other key's fallback — a\n // dictionary-wide change in what language a reader sees, from a diff\n // that added one line, with nothing to notice it. Same reasoning as\n // `readObjectLiteral` below: the alternative to failing here is failing\n // silently in production.\n if (!sourceLocale) {\n const clash = findSourceDisagreement(translations);\n if (clash) {\n this.error({\n message:\n `defineDictionary() cannot infer a source language. Key \"${clash.againstKey}\" lists \"${clash.againstFirst}\" first ` +\n `but \"${clash.key}\" lists \"${clash.first}\" first, so the locale every key falls back to depends on the order ` +\n `they are written in — moving one key would change what language a reader sees. ` +\n `Pass { sourceLocale: \"<locale>\" } as the second argument to pin it.`,\n pos: call.start,\n });\n }\n }\n\n extracted.set(virtualKey, { id: runtimeId, locales, translations });\n\n const loaders = locales\n .map(\n (locale) =>\n `${JSON.stringify(locale)}:()=>import(${JSON.stringify(\n `${VIRTUAL_PREFIX}${virtualKey}/${locale}`,\n )})`,\n )\n .join(\",\");\n\n s.overwrite(\n call.start,\n call.end,\n `__gemi_dict__(${JSON.stringify(runtimeId)},{${loaders}})`,\n );\n rewrote = true;\n }\n\n if (!rewrote) {\n return null;\n }\n\n // Appended, not prepended: an `import` declaration is hoisted wherever it\n // sits, and keeping it off the top leaves every original line where it\n // was for the sourcemap.\n s.append(\n `\\nimport { __gemi_dict__ } from ${JSON.stringify(RUNTIME_SOURCE)};\\n`,\n );\n\n return { code: s.toString(), map: s.generateMap({ hires: true }) };\n },\n };\n}\n\n/**\n * The virtual key carries the source module alongside the content hash, so a\n * cold `load` can find its way back to the module that declared it.\n */\nfunction decodeSourceId(virtualKey: string): string | null {\n const slash = virtualKey.indexOf(\"/\");\n if (slash === -1) return null;\n try {\n return Buffer.from(virtualKey.slice(0, slash), \"base64url\").toString(\n \"utf8\",\n );\n } catch {\n return null;\n }\n}\n\n/**\n * A dictionary has to be readable at build time, so the literal must be fully\n * static. Anything else fails the build with the offending key named — a silent\n * fallback to \"leave this one un-split\" would ship every locale to the browser\n * and nobody would notice.\n */\nfunction readObjectLiteral(\n node: any,\n fail: (message: string) => never,\n): DictionaryTranslations {\n if (node?.type !== \"ObjectExpression\") {\n fail(\n `defineDictionary() needs an inline object literal — it is read at build time, so a variable or spread cannot be resolved.`,\n );\n }\n\n const out: DictionaryTranslations = {};\n for (const prop of node.properties) {\n const key = propertyName(prop);\n if (key === null) {\n fail(\n `defineDictionary() keys must be plain string keys — computed keys and spreads cannot be read at build time.`,\n );\n }\n if (prop.value?.type !== \"ObjectExpression\") {\n fail(\n `defineDictionary() entry \"${key}\" must be an object of \"<locale>\": \"<string>\" pairs.`,\n );\n }\n\n const byLocale: Record<string, string> = {};\n for (const localeProp of prop.value.properties) {\n const locale = propertyName(localeProp);\n if (locale === null) {\n fail(\n `defineDictionary() entry \"${key}\" has a locale key that cannot be read at build time.`,\n );\n }\n const value = localeProp.value;\n if (value?.type !== \"Literal\" || typeof value.value !== \"string\") {\n fail(\n `defineDictionary() entry \"${key}\" locale \"${locale}\" must be a string literal. Use {{param}} interpolation instead of a template literal or a function.`,\n );\n }\n byLocale[locale] = value.value;\n }\n out[key] = byLocale;\n }\n return out;\n}\n\n/** The `sourceLocale` from `defineDictionary`'s optional options argument. */\nfunction readSourceLocale(\n node: any,\n fail: (message: string) => never,\n): string | undefined {\n if (node === undefined) {\n return undefined;\n }\n if (node.type !== \"ObjectExpression\") {\n fail(\n `defineDictionary() options must be an inline object literal — it is read at build time.`,\n );\n }\n for (const prop of node.properties) {\n if (propertyName(prop) !== \"sourceLocale\") continue;\n const value = prop.value;\n if (value?.type !== \"Literal\" || typeof value.value !== \"string\") {\n fail(`defineDictionary() sourceLocale must be a string literal.`);\n }\n return value.value;\n }\n return undefined;\n}\n\n/** Whether the module declares `name` itself, rather than importing it. */\nfunction declaresOwn(ast: any, name: string): boolean {\n let found = false;\n walk(ast, (node) => {\n if (found) return;\n if (node.type === \"FunctionDeclaration\" && node.id?.name === name) {\n found = true;\n }\n if (node.type === \"VariableDeclarator\" && node.id?.name === name) {\n found = true;\n }\n });\n return found;\n}\n\nfunction propertyName(prop: any): string | null {\n if (prop?.type !== \"Property\" || prop.computed) return null;\n if (prop.key?.type === \"Identifier\") return prop.key.name;\n if (prop.key?.type === \"Literal\" && typeof prop.key.value === \"string\") {\n return prop.key.value;\n }\n return null;\n}\n\n/** Minimal ESTree walk — enough to find call expressions, no extra dependency. */\nfunction walk(node: any, visit: (node: any) => void) {\n if (node === null || typeof node !== \"object\") return;\n if (Array.isArray(node)) {\n for (const child of node) walk(child, visit);\n return;\n }\n if (typeof node.type === \"string\") {\n visit(node);\n }\n for (const key of Object.keys(node)) {\n if (key === \"parent\") continue;\n const value = (node as any)[key];\n if (value && typeof value === \"object\") {\n walk(value, visit);\n }\n }\n}\n",
|
|
7
|
+
"import { mkdir, writeFile } from \"node:fs/promises\";\nimport { dirname, join } from \"node:path\";\nimport type { Plugin, ResolvedConfig } from \"vite\";\nimport { ASSET_BASE_RECORD, DEFAULT_ASSET_BASE, normalizeAssetBase } from \"../config/assetBase\";\n\n/**\n * Applies the app's asset base to the build and records the base the build\n * actually used, for `httpProd` to link the document's chunks with.\n *\n * What is recorded is Vite's resolved `base`, not `assetBase`: a `vite.base`\n * set in `gemi.config.ts` reaches Vite too, and the bundle is built with\n * whichever won the config merge. Recording the input instead would let the\n * document and the bundle disagree again the moment both are set.\n *\n * Build only. In dev the chunks come from Vite's dev server on the same\n * origin, and a CDN base there would point the page at files nobody uploaded.\n */\nexport function gemiAssetBasePlugin(assetBase: string | undefined): Plugin {\n let resolved: ResolvedConfig | undefined;\n\n return {\n name: \"gemi-plugin-asset-base\",\n config: (_config, env) =>\n env.command === \"build\" && assetBase ? { base: assetBase } : undefined,\n configResolved(config) {\n resolved = config;\n },\n async writeBundle(options) {\n // One record, from the client build: it is the bundle the browser runs.\n // The SSR build is handed the same base by the hook above, so an asset\n // URL a view renders on the server matches the one it hydrates with.\n if (!resolved || resolved.command !== \"build\" || resolved.build.ssr || !options.dir) {\n return;\n }\n const file = join(options.dir, ASSET_BASE_RECORD);\n await mkdir(dirname(file), { recursive: true });\n await writeFile(file, `${JSON.stringify({ assetBase: documentBase(resolved.base) })}\\n`);\n },\n };\n}\n\n/**\n * The prefix the document should use for a bundle built with `base`.\n *\n * A relative Vite base (`./`, `\"\"`) only reaches Vite through a raw\n * `vite.base`, and it makes the bundle resolve every chunk against the module\n * importing it — i.e. against wherever the document loaded the entry from. So\n * the document keeps its root-relative URLs and the bundle follows it, which is\n * what such an app has been getting all along.\n */\nfunction documentBase(base: string): string {\n return base.startsWith(\"/\") || /^[a-z][a-z\\d+.-]*:\\/\\//i.test(base)\n ? normalizeAssetBase(base)\n : DEFAULT_ASSET_BASE;\n}\n",
|
|
8
|
+
"import type { PluginOption } from \"vite\";\nimport { loadGemiConfig } from \"../config/load\";\nimport { isGemiExternal } from \"../internal/gemiExternals\";\nimport { gemiDictionaryPlugin } from \"./dictionaryPlugin\";\nimport { gemiAssetBasePlugin } from \"./assetBasePlugin\";\nimport { gemiIslandPlugin } from \"./islandPlugin\";\nimport { resolveAssetBase } from \"../config/assetBase\";\n\n// Async so it can load `gemi.config.ts` before returning the plugin list. Both\n// consumers run under Bun (the CLI's `build()` and dev's `createServer`, spawned\n// via `bun`), so the config's TypeScript imports directly. Vite accepts a\n// `Promise<PluginOption[]>` as an entry in its `plugins` array, so gemi passes\n// `plugins: [gemi()]` itself — the app's own Vite plugins (e.g. React) come from\n// `gemi.config.ts` and are appended below, so there is no `vite.config.mjs`.\nconst gemi = async (): Promise<PluginOption[]> => {\n const userConfig = await loadGemiConfig(process.cwd());\n const { plugins: userVitePlugins = [], ...userViteConfig } =\n userConfig.vite ?? {};\n // Resolved here, before any build starts, so a malformed base fails the\n // build instead of shipping a bundle the document cannot link.\n const assetBase = resolveAssetBase(userConfig.assetBase);\n\n return [\n {\n name: \"gemi-plugin-config\",\n enforce: \"pre\",\n config: async (_config, env) => {\n const appPath = `${process.cwd()}/app`;\n return {\n assetsInclude: [\"/public\"],\n build: {\n manifest: true,\n ssrEmitAssets: true,\n // Emit source maps for both the client and SSR view builds so\n // browser devtools and server stack traces map back to app source.\n sourcemap: true,\n rollupOptions: {\n // Island modules are not listed: `gemiIslandPlugin` emits each\n // one (and the island runtime) as a client entry when it sees\n // the `island()` call that uses it.\n input: Array.from<string>(JSON.parse(process.env.GEMI_INPUT ?? \"[]\")),\n // Each view is a build entry, but the app never imports them\n // statically — the client router pulls them in via `import.meta.glob`\n // (a runtime dynamic import). Rolldown's default entry-signature\n // handling therefore sees a view's `export default` as unused and\n // tree-shakes it. For a plain view the component is hoisted into the\n // shared bundle so it still renders, but a view with a module-scope\n // `lazy(() => import(...))` keeps its own chunk alive as a side\n // effect while the \"unused\" default export is dropped — leaving a\n // hollow chunk whose default is `undefined`. Hydration then renders\n // `<undefined/>` → React #306 and the whole page unmounts to blank.\n // `\"strict\"` forces every entry to preserve its exact exports (a\n // facade chunk is emitted if needed), so every view keeps its\n // default regardless of how the router loads it.\n preserveEntrySignatures: \"strict\",\n // For the SSR build, externalize `gemi` (a linked package) and all\n // its subpaths. Otherwise the bundler compiles its own copy of\n // gemi's module-level singletons (`RouteStateContext`,\n // `I18nContext`, the `useLocale`/`useRouteData` hooks, ...) into a\n // shared chunk — a *different* instance than the running server's\n // `Root` provider — so `useRouteData()` reads the empty default and\n // SSR crashes on `i18n.currentLocale`. Externalizing makes the\n // built view chunks `import ... from \"gemi/*\"` at runtime, resolving\n // to the one instance shared with the renderer. (Vite 8's\n // `ssr.external` does not externalize for the build, so this is done\n // at the rollup level.) Mirrors `server/httpDev.ts`'s dev config\n // via the shared `internal/gemiExternals` source of truth.\n ...(env.isSsrBuild ? { external: isGemiExternal } : {}),\n },\n },\n resolve: {\n alias: {\n \"@/app\": appPath,\n },\n },\n };\n },\n },\n // The app's `gemi.config.ts` `vite` config (minus `plugins`, which are\n // appended below) as its own `config` hook. Vite deep-merges every plugin's\n // `config` result, so the app config layers cleanly on top of gemi's base\n // without a manual merge (and without pulling `vite`'s `mergeConfig` into\n // this bundle).\n {\n name: \"gemi-plugin-user-config\",\n config: () => userViteConfig,\n },\n // After the app's `vite` config, so an explicit `assetBase` (or\n // `GEMI_ASSET_BASE`) wins over a `vite.base` set there.\n gemiAssetBasePlugin(assetBase),\n gemiIslandPlugin(),\n {\n name: \"gemi-plugin-hot-reload\",\n handleHotUpdate({ server, modules }) {\n if (modules?.[0]?.id?.includes(\"/app/http/\")) {\n // server.ws.send({\n // type: \"custom\",\n // event: \"http-reload\",\n // data: {\n // id: modules[0].id,\n // },\n // });\n\n return [];\n }\n },\n },\n // App-provided Vite plugins run after gemi's own.\n ...userVitePlugins,\n // Last, and `enforce: \"post\"` on top of that: it parses JavaScript, so TS\n // and JSX have to be gone by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