gemi 0.116.0 → 0.118.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/auth/AuthServiceProvider.d.ts.map +1 -1
- package/dist/auth/config.d.ts +27 -0
- package/dist/auth/config.d.ts.map +1 -1
- package/dist/auth/connections/ConnectionManager.d.ts +133 -0
- package/dist/auth/connections/ConnectionManager.d.ts.map +1 -0
- package/dist/auth/connections/ConnectionStore.d.ts +146 -0
- package/dist/auth/connections/ConnectionStore.d.ts.map +1 -0
- package/dist/auth/connections/ConnectionsController.d.ts +23 -0
- package/dist/auth/connections/ConnectionsController.d.ts.map +1 -0
- package/dist/auth/connections/OAuthConnectionProvider.d.ts +105 -0
- package/dist/auth/connections/OAuthConnectionProvider.d.ts.map +1 -0
- package/dist/auth/connections/errors.d.ts +32 -0
- package/dist/auth/connections/errors.d.ts.map +1 -0
- package/dist/auth/oauth/oauthState.d.ts +15 -2
- package/dist/auth/oauth/oauthState.d.ts.map +1 -1
- package/dist/auth/routes.d.ts +13 -0
- package/dist/auth/routes.d.ts.map +1 -1
- package/dist/bin/orm/emit.d.ts.map +1 -1
- package/dist/bin/orm-generator.js +51 -4
- package/dist/bin/orm-generator.js.map +4 -4
- 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-2tzm58j3.js → chunk-01ehxca0.js} +2 -2
- package/dist/{chunk-2tzm58j3.js.map → chunk-01ehxca0.js.map} +1 -1
- package/dist/chunk-0gtyects.js +10 -0
- package/dist/{chunk-yf1njzd5.js.map → chunk-0gtyects.js.map} +6 -5
- package/dist/{chunk-15c2vgaf.js → chunk-1m3hvy3q.js} +2 -2
- package/dist/{chunk-15c2vgaf.js.map → chunk-1m3hvy3q.js.map} +1 -1
- package/dist/{chunk-6cx8ncd4.js → chunk-1z1rj2zq.js} +3 -3
- package/dist/{chunk-6cx8ncd4.js.map → chunk-1z1rj2zq.js.map} +1 -1
- package/dist/{chunk-5stgtwqw.js → chunk-2bja99cq.js} +2 -2
- package/dist/{chunk-5stgtwqw.js.map → chunk-2bja99cq.js.map} +1 -1
- package/dist/{chunk-n672d4g8.js → chunk-30xxc6r7.js} +2 -2
- package/dist/{chunk-n672d4g8.js.map → chunk-30xxc6r7.js.map} +1 -1
- package/dist/{chunk-qjhw8nje.js → chunk-33s2xqv1.js} +1 -1
- package/dist/{chunk-4088szy9.js → chunk-39kyz4k6.js} +3 -3
- package/dist/{chunk-4088szy9.js.map → chunk-39kyz4k6.js.map} +1 -1
- package/dist/chunk-3nf95j9e.js +5 -0
- package/dist/{chunk-1q9kd20m.js.map → chunk-3nf95j9e.js.map} +1 -1
- package/dist/chunk-3zxfd7pn.js +14 -0
- package/dist/{chunk-pn8v6fj2.js.map → chunk-3zxfd7pn.js.map} +11 -6
- package/dist/{chunk-pyk3gzvc.js → chunk-453rmkpm.js} +2 -2
- package/dist/{chunk-pyk3gzvc.js.map → chunk-453rmkpm.js.map} +1 -1
- package/dist/chunk-47h12eme.js +57 -0
- package/dist/{chunk-ms9k0rx6.js.map → chunk-47h12eme.js.map} +15 -11
- package/dist/chunk-490sbcma.js +5 -0
- package/dist/chunk-490sbcma.js.map +12 -0
- package/dist/{chunk-kqxdsv22.js → chunk-4c1kdd8p.js} +2 -2
- package/dist/{chunk-kqxdsv22.js.map → chunk-4c1kdd8p.js.map} +1 -1
- package/dist/{chunk-jdhdrr2k.js → chunk-5cgq9c43.js} +2 -2
- package/dist/{chunk-jdhdrr2k.js.map → chunk-5cgq9c43.js.map} +1 -1
- package/dist/{chunk-9n1hx3mq.js → chunk-5dbpgyrx.js} +3 -3
- package/dist/{chunk-9n1hx3mq.js.map → chunk-5dbpgyrx.js.map} +1 -1
- package/dist/{chunk-eqse2m6n.js → chunk-5ses4tcz.js} +2 -2
- package/dist/{chunk-eqse2m6n.js.map → chunk-5ses4tcz.js.map} +1 -1
- package/dist/{chunk-2z1981d0.js → chunk-675kzd7z.js} +2 -2
- package/dist/{chunk-2z1981d0.js.map → chunk-675kzd7z.js.map} +1 -1
- package/dist/{chunk-p1aqq0ga.js → chunk-6ggmk2eg.js} +3 -3
- package/dist/{chunk-p1aqq0ga.js.map → chunk-6ggmk2eg.js.map} +1 -1
- package/dist/{chunk-mazznq15.js → chunk-76p0rf4d.js} +3 -3
- package/dist/{chunk-mazznq15.js.map → chunk-76p0rf4d.js.map} +1 -1
- package/dist/{chunk-41da9628.js → chunk-8t6dwwz6.js} +1 -1
- package/dist/{chunk-zyt2w03d.js → chunk-8wcpxm41.js} +2 -2
- package/dist/{chunk-zyt2w03d.js.map → chunk-8wcpxm41.js.map} +1 -1
- package/dist/chunk-9pkj7sk6.js +50 -0
- package/dist/chunk-9pkj7sk6.js.map +10 -0
- package/dist/{chunk-jmpw6bqz.js → chunk-a1qt8aky.js} +2 -2
- package/dist/{chunk-jmpw6bqz.js.map → chunk-a1qt8aky.js.map} +1 -1
- package/dist/{chunk-frerzsxq.js → chunk-a22h5cby.js} +2 -2
- package/dist/{chunk-frerzsxq.js.map → chunk-a22h5cby.js.map} +1 -1
- package/dist/{chunk-e573yxpq.js → chunk-aedkrck1.js} +3 -3
- package/dist/{chunk-e573yxpq.js.map → chunk-aedkrck1.js.map} +1 -1
- package/dist/{chunk-vxm6yevm.js → chunk-aqpaw4jq.js} +2 -2
- package/dist/{chunk-vxm6yevm.js.map → chunk-aqpaw4jq.js.map} +1 -1
- package/dist/{chunk-aeh67ynz.js → chunk-bgwtdbfw.js} +3 -3
- package/dist/{chunk-aeh67ynz.js.map → chunk-bgwtdbfw.js.map} +1 -1
- package/dist/{chunk-tw5kwbx4.js → chunk-bz8xssrc.js} +2 -2
- package/dist/{chunk-tw5kwbx4.js.map → chunk-bz8xssrc.js.map} +1 -1
- package/dist/{chunk-tzm3c7n6.js → chunk-cte6ysqd.js} +4 -4
- package/dist/{chunk-tzm3c7n6.js.map → chunk-cte6ysqd.js.map} +1 -1
- package/dist/{chunk-qsrcdzan.js → chunk-cvfg88cx.js} +3 -3
- package/dist/{chunk-qsrcdzan.js.map → chunk-cvfg88cx.js.map} +1 -1
- package/dist/{chunk-1vzks22y.js → chunk-d806cy7p.js} +2 -2
- package/dist/{chunk-1vzks22y.js.map → chunk-d806cy7p.js.map} +1 -1
- package/dist/{chunk-6chz1ktz.js → chunk-de4t48j9.js} +3 -3
- package/dist/{chunk-6chz1ktz.js.map → chunk-de4t48j9.js.map} +1 -1
- package/dist/{chunk-mqfzdfnz.js → chunk-dwpn6fze.js} +2 -2
- package/dist/{chunk-mqfzdfnz.js.map → chunk-dwpn6fze.js.map} +1 -1
- package/dist/{chunk-vbdty91k.js → chunk-ebret82e.js} +3 -3
- package/dist/{chunk-vbdty91k.js.map → chunk-ebret82e.js.map} +1 -1
- package/dist/chunk-eke2frrm.js +9 -0
- package/dist/{chunk-hytt9qyj.js.map → chunk-eke2frrm.js.map} +3 -4
- package/dist/{chunk-yer1r3t3.js → chunk-epvpmakp.js} +2 -2
- package/dist/{chunk-yer1r3t3.js.map → chunk-epvpmakp.js.map} +1 -1
- package/dist/{chunk-fxgxf16k.js → chunk-fsj5k511.js} +2 -2
- package/dist/{chunk-fxgxf16k.js.map → chunk-fsj5k511.js.map} +1 -1
- package/dist/{chunk-t4yh4nf9.js → chunk-g5ppst76.js} +3 -3
- package/dist/{chunk-t4yh4nf9.js.map → chunk-g5ppst76.js.map} +1 -1
- package/dist/{chunk-aazmrxj9.js → chunk-g9hhdcax.js} +2 -2
- package/dist/{chunk-aazmrxj9.js.map → chunk-g9hhdcax.js.map} +1 -1
- package/dist/{chunk-cbqazg9k.js → chunk-gqfqnv3f.js} +2 -2
- package/dist/{chunk-cbqazg9k.js.map → chunk-gqfqnv3f.js.map} +1 -1
- package/dist/chunk-hkf2k2eq.js +5 -0
- package/dist/{chunk-whtzggn6.js.map → chunk-hkf2k2eq.js.map} +3 -4
- package/dist/{chunk-vw8849ys.js → chunk-hm9cjxy2.js} +2 -2
- package/dist/{chunk-m54s6jpr.js.map → chunk-hm9cjxy2.js.map} +1 -1
- package/dist/{chunk-kejwjerj.js → chunk-hr1r3g0d.js} +2 -2
- package/dist/{chunk-kejwjerj.js.map → chunk-hr1r3g0d.js.map} +1 -1
- package/dist/{chunk-3hrj5rwm.js → chunk-hzepfrzy.js} +2 -2
- package/dist/{chunk-3hrj5rwm.js.map → chunk-hzepfrzy.js.map} +1 -1
- package/dist/{chunk-785b41h1.js → chunk-j5858bz7.js} +3 -3
- package/dist/{chunk-785b41h1.js.map → chunk-j5858bz7.js.map} +1 -1
- package/dist/{chunk-d9mar37g.js → chunk-jf6qqzat.js} +2 -2
- package/dist/{chunk-d9mar37g.js.map → chunk-jf6qqzat.js.map} +1 -1
- package/dist/{chunk-1hr4xht1.js → chunk-jg79n382.js} +2 -2
- package/dist/{chunk-1hr4xht1.js.map → chunk-jg79n382.js.map} +1 -1
- package/dist/chunk-k31qfe7a.js +71 -0
- package/dist/chunk-k31qfe7a.js.map +13 -0
- package/dist/{chunk-4mfrgd5m.js → chunk-kk77x2v4.js} +2 -2
- package/dist/{chunk-4mfrgd5m.js.map → chunk-kk77x2v4.js.map} +1 -1
- package/dist/{chunk-1myhm0g3.js → chunk-kkte8nze.js} +3 -3
- package/dist/{chunk-1myhm0g3.js.map → chunk-kkte8nze.js.map} +1 -1
- package/dist/{chunk-hdps9n52.js → chunk-m4kmetpb.js} +3 -3
- package/dist/{chunk-hdps9n52.js.map → chunk-m4kmetpb.js.map} +1 -1
- package/dist/{chunk-gts5p6mw.js → chunk-n4sdm0jn.js} +4 -4
- package/dist/{chunk-gts5p6mw.js.map → chunk-n4sdm0jn.js.map} +1 -1
- package/dist/chunk-nang3847.js +416 -0
- package/dist/chunk-nang3847.js.map +24 -0
- package/dist/{chunk-agyfv3f8.js → chunk-nrezmscd.js} +1 -1
- package/dist/{chunk-xt9tv99x.js → chunk-p83erprx.js} +2 -2
- package/dist/{chunk-xt9tv99x.js.map → chunk-p83erprx.js.map} +1 -1
- package/dist/{chunk-sr942vb1.js → chunk-pkr5dsbk.js} +2 -2
- package/dist/{chunk-sr942vb1.js.map → chunk-pkr5dsbk.js.map} +1 -1
- package/dist/{chunk-yhrye9cm.js → chunk-pqc16rrx.js} +2 -2
- package/dist/{chunk-yhrye9cm.js.map → chunk-pqc16rrx.js.map} +1 -1
- package/dist/{chunk-m54s6jpr.js → chunk-pvz90a49.js} +2 -2
- package/dist/{chunk-vw8849ys.js.map → chunk-pvz90a49.js.map} +1 -1
- package/dist/{chunk-fre6f4nk.js → chunk-q290tgza.js} +2 -2
- package/dist/{chunk-fre6f4nk.js.map → chunk-q290tgza.js.map} +1 -1
- package/dist/{chunk-8rv62v14.js → chunk-qf4bmee9.js} +2 -2
- package/dist/{chunk-8rv62v14.js.map → chunk-qf4bmee9.js.map} +1 -1
- package/dist/chunk-qkxnvpaj.js +5 -0
- package/dist/chunk-qkxnvpaj.js.map +10 -0
- package/dist/chunk-r1favzz4.js +19 -0
- package/dist/{chunk-ktr3k768.js.map → chunk-r1favzz4.js.map} +5 -4
- package/dist/{chunk-303mprnv.js → chunk-r3v2cnrj.js} +2 -2
- package/dist/{chunk-303mprnv.js.map → chunk-r3v2cnrj.js.map} +1 -1
- package/dist/{chunk-x7cpth2f.js → chunk-razjfecn.js} +1 -1
- package/dist/{chunk-t04f3akb.js → chunk-scc0j5k9.js} +2 -2
- package/dist/{chunk-t04f3akb.js.map → chunk-scc0j5k9.js.map} +1 -1
- package/dist/{chunk-56jky6vf.js → chunk-sce5jes2.js} +2 -2
- package/dist/{chunk-56jky6vf.js.map → chunk-sce5jes2.js.map} +1 -1
- package/dist/chunk-sd02ktf2.js +24 -0
- package/dist/{chunk-79xg42e7.js.map → chunk-sd02ktf2.js.map} +2 -2
- package/dist/{chunk-mschc94q.js → chunk-sn04cyw0.js} +2 -2
- package/dist/{chunk-mschc94q.js.map → chunk-sn04cyw0.js.map} +1 -1
- package/dist/{chunk-bra1a1fq.js → chunk-tfdmvxza.js} +2 -2
- package/dist/{chunk-bra1a1fq.js.map → chunk-tfdmvxza.js.map} +1 -1
- package/dist/{chunk-z10cas5r.js → chunk-thz75w6e.js} +2 -2
- package/dist/{chunk-z10cas5r.js.map → chunk-thz75w6e.js.map} +1 -1
- package/dist/{chunk-v1tfdgy1.js → chunk-tzdenj0n.js} +3 -3
- package/dist/{chunk-v1tfdgy1.js.map → chunk-tzdenj0n.js.map} +1 -1
- package/dist/{chunk-98m15b9x.js → chunk-x6v2zex2.js} +2 -2
- package/dist/{chunk-98m15b9x.js.map → chunk-x6v2zex2.js.map} +1 -1
- package/dist/{chunk-d2gfcf85.js → chunk-xfw8zyvn.js} +2 -2
- package/dist/{chunk-d2gfcf85.js.map → chunk-xfw8zyvn.js.map} +1 -1
- package/dist/{chunk-wyw6p3fg.js → chunk-xtzn0qfh.js} +3 -3
- package/dist/{chunk-wyw6p3fg.js.map → chunk-xtzn0qfh.js.map} +1 -1
- package/dist/{chunk-tn2bryy2.js → chunk-xx3zvc3g.js} +2 -2
- package/dist/{chunk-tn2bryy2.js.map → chunk-xx3zvc3g.js.map} +1 -1
- package/dist/{chunk-er3wf6ng.js → chunk-xzn2nmny.js} +2 -2
- package/dist/{chunk-er3wf6ng.js.map → chunk-xzn2nmny.js.map} +1 -1
- package/dist/{chunk-p91b8zcn.js → chunk-xzyy896s.js} +2 -2
- package/dist/{chunk-p91b8zcn.js.map → chunk-xzyy896s.js.map} +1 -1
- package/dist/chunk-y09r0wsw.js +5 -0
- package/dist/chunk-y09r0wsw.js.map +12 -0
- package/dist/{chunk-6d8rvr1v.js → chunk-ygf0z7kk.js} +2 -2
- package/dist/{chunk-6d8rvr1v.js.map → chunk-ygf0z7kk.js.map} +1 -1
- package/dist/chunk-z759yah5.js +5 -0
- package/dist/chunk-z759yah5.js.map +12 -0
- package/dist/client/Head.d.ts.map +1 -1
- package/dist/client/fonts.d.ts +69 -0
- package/dist/client/fonts.d.ts.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +75 -1
- package/dist/client/index.js.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/builtins.d.ts +13 -0
- package/dist/console/builtins.d.ts.map +1 -0
- package/dist/console/run.js +13 -11
- package/dist/console/run.js.map +6 -5
- package/dist/console/runner.d.ts.map +1 -1
- package/dist/console/usage.d.ts +2 -0
- package/dist/console/usage.d.ts.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/Connections.d.ts +36 -0
- package/dist/facades/Connections.d.ts.map +1 -0
- package/dist/facades/Crypt.d.ts +26 -0
- package/dist/facades/Crypt.d.ts.map +1 -0
- package/dist/facades/Meta.d.ts +7 -1
- package/dist/facades/Meta.d.ts.map +1 -1
- package/dist/facades/Storage.d.ts +29 -0
- package/dist/facades/Storage.d.ts.map +1 -1
- package/dist/facades/index.d.ts +2 -0
- package/dist/facades/index.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/HttpRequest.d.ts +1 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/Metadata.d.ts +5 -0
- package/dist/http/Metadata.d.ts.map +1 -1
- package/dist/http/index.d.ts +3 -1
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/requestContext.d.ts +1 -0
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/http/safeFetch/errors.d.ts +10 -0
- package/dist/http/safeFetch/errors.d.ts.map +1 -1
- package/dist/http/safeFetch/index.d.ts +1 -1
- package/dist/http/safeFetch/index.d.ts.map +1 -1
- package/dist/http/sitemap/Robots.d.ts +95 -0
- package/dist/http/sitemap/Robots.d.ts.map +1 -0
- package/dist/http/sitemap/Sitemap.d.ts +145 -0
- package/dist/http/sitemap/Sitemap.d.ts.map +1 -0
- package/dist/http/sitemap/fetchText.d.ts +16 -0
- package/dist/http/sitemap/fetchText.d.ts.map +1 -0
- package/dist/http/sitemap/index.d.ts +3 -0
- package/dist/http/sitemap/index.d.ts.map +1 -0
- package/dist/http/sitemap/xml.d.ts +21 -0
- package/dist/http/sitemap/xml.d.ts.map +1 -0
- package/dist/i18n/Translator.d.ts.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +2 -2
- package/dist/i18n/resolveLocale.d.ts +18 -0
- package/dist/i18n/resolveLocale.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/kernel/providers.d.ts +2 -2
- package/dist/kernel/providers.d.ts.map +1 -1
- package/dist/orm/Model.d.ts.map +1 -1
- package/dist/orm/encryption-rotate.d.ts +44 -0
- package/dist/orm/encryption-rotate.d.ts.map +1 -0
- package/dist/orm/encryption.d.ts +54 -0
- package/dist/orm/encryption.d.ts.map +1 -0
- package/dist/orm/index.d.ts +2 -0
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +3 -3
- package/dist/orm/index.js.map +4 -4
- package/dist/orm/schema.d.ts +25 -1
- package/dist/orm/schema.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/discovery.d.ts +8 -0
- package/dist/services/discovery.d.ts.map +1 -1
- package/dist/services/encryption/Encrypter.d.ts +86 -0
- package/dist/services/encryption/Encrypter.d.ts.map +1 -0
- package/dist/services/encryption/EncryptionServiceProvider.d.ts +13 -0
- package/dist/services/encryption/EncryptionServiceProvider.d.ts.map +1 -0
- package/dist/services/encryption/config.d.ts +36 -0
- package/dist/services/encryption/config.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +12 -1
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +8 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/types.d.ts +17 -0
- package/dist/services/file-storage/drivers/types.d.ts.map +1 -1
- package/dist/services/file-storage/putFromUrl.d.ts +56 -0
- package/dist/services/file-storage/putFromUrl.d.ts.map +1 -0
- package/dist/services/file-storage/sniffContentType.d.ts +33 -0
- package/dist/services/file-storage/sniffContentType.d.ts.map +1 -0
- package/dist/services/index.d.ts +26 -5
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +10 -10
- package/dist/services/index.js.map +4 -3
- package/dist/services/queue/DatabaseQueueDriver.d.ts +117 -7
- package/dist/services/queue/DatabaseQueueDriver.d.ts.map +1 -1
- package/dist/services/queue/Job.d.ts +75 -0
- package/dist/services/queue/Job.d.ts.map +1 -1
- package/dist/services/queue/MemoryQueueDriver.d.ts +32 -2
- package/dist/services/queue/MemoryQueueDriver.d.ts.map +1 -1
- package/dist/services/queue/QueueDriver.d.ts +83 -1
- package/dist/services/queue/QueueDriver.d.ts.map +1 -1
- package/dist/services/queue/QueueManager.d.ts +80 -7
- package/dist/services/queue/QueueManager.d.ts.map +1 -1
- package/dist/services/queue/QueueServiceProvider.d.ts.map +1 -1
- package/dist/services/queue/backoff.d.ts +6 -0
- package/dist/services/queue/backoff.d.ts.map +1 -0
- package/dist/services/queue/batch.d.ts +112 -0
- package/dist/services/queue/batch.d.ts.map +1 -0
- package/dist/services/queue/config.d.ts +9 -0
- package/dist/services/queue/config.d.ts.map +1 -1
- package/dist/services/queue/queueDriverContract.d.ts +5 -0
- package/dist/services/queue/queueDriverContract.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/queue/workflow/DatabaseWorkflowStore.d.ts +89 -0
- package/dist/services/queue/workflow/DatabaseWorkflowStore.d.ts.map +1 -0
- package/dist/services/queue/workflow/MemoryWorkflowStore.d.ts +43 -0
- package/dist/services/queue/workflow/MemoryWorkflowStore.d.ts.map +1 -0
- package/dist/services/queue/workflow/Step.d.ts +202 -0
- package/dist/services/queue/workflow/Step.d.ts.map +1 -0
- package/dist/services/queue/workflow/Workflow.d.ts +124 -0
- package/dist/services/queue/workflow/Workflow.d.ts.map +1 -0
- package/dist/services/queue/workflow/WorkflowRuntime.d.ts +60 -0
- package/dist/services/queue/workflow/WorkflowRuntime.d.ts.map +1 -0
- package/dist/services/queue/workflow/WorkflowStore.d.ts +184 -0
- package/dist/services/queue/workflow/WorkflowStore.d.ts.map +1 -0
- package/dist/services/queue/workflow/duration.d.ts +8 -0
- package/dist/services/queue/workflow/duration.d.ts.map +1 -0
- package/dist/services/queue/workflow/workflowContract.d.ts +30 -0
- package/dist/services/queue/workflow/workflowContract.d.ts.map +1 -0
- package/dist/services/router/ViewRouteDispatcher.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/vitest/index.js +2 -2
- package/dist/vitest/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-1q9kd20m.js +0 -5
- package/dist/chunk-49nyyjfe.js +0 -5
- package/dist/chunk-49nyyjfe.js.map +0 -11
- package/dist/chunk-79xg42e7.js +0 -24
- package/dist/chunk-7vb4eey2.js +0 -217
- package/dist/chunk-7vb4eey2.js.map +0 -16
- package/dist/chunk-hytt9qyj.js +0 -54
- package/dist/chunk-jmg2zsaf.js +0 -5
- package/dist/chunk-jmg2zsaf.js.map +0 -12
- package/dist/chunk-ktr3k768.js +0 -19
- package/dist/chunk-ms9k0rx6.js +0 -46
- package/dist/chunk-pn8v6fj2.js +0 -14
- package/dist/chunk-whtzggn6.js +0 -5
- package/dist/chunk-yf1njzd5.js +0 -10
- /package/dist/{chunk-qjhw8nje.js.map → chunk-33s2xqv1.js.map} +0 -0
- /package/dist/{chunk-41da9628.js.map → chunk-8t6dwwz6.js.map} +0 -0
- /package/dist/{chunk-agyfv3f8.js.map → chunk-nrezmscd.js.map} +0 -0
- /package/dist/{chunk-x7cpth2f.js.map → chunk-razjfecn.js.map} +0 -0
package/dist/config/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-hm9cjxy2.js";function k(b){return b}function q(b){if((process.env.GEMI_REACT_COMPILER??"auto").toLowerCase()==="off")return!1;return b??!0}export{q as reactCompiler,k as defineConfig};
|
|
3
3
|
|
|
4
4
|
//# debugId=2F7F86887FCF6F1A64756E2164756E21
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommandClass } from "./Command";
|
|
2
|
+
/**
|
|
3
|
+
* `gemi run encryption:rotate [Model]` (#844): re-encrypts encrypted columns
|
|
4
|
+
* still under an older key, after `encryption.current` has moved to a new one.
|
|
5
|
+
* Without a model it also re-encrypts the OAuth connection tokens (#845).
|
|
6
|
+
*/
|
|
7
|
+
export declare const EncryptionRotateCommand: typeof import("./Command").Command;
|
|
8
|
+
/**
|
|
9
|
+
* Commands gemi itself provides. Reachable by name from every app, listed
|
|
10
|
+
* after the app's own, and shadowed by an app command of the same name.
|
|
11
|
+
*/
|
|
12
|
+
export declare const frameworkCommands: CommandClass[];
|
|
13
|
+
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../console/builtins.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,oCA2DhC,CAAC;AAYL;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAA8B,CAAC"}
|
package/dist/console/run.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
`),error:(
|
|
4
|
-
`),fail:(
|
|
5
|
-
`)}function
|
|
2
|
+
import{ba as c}from"../chunk-qkxnvpaj.js";import{gb as f,hb as o}from"../chunk-thz75w6e.js";import{kc as A,nc as n,oc as u,yc as r}from"../chunk-r1favzz4.js";import"../chunk-675kzd7z.js";import"../chunk-nang3847.js";import{Qg as g,Ug as v}from"../chunk-k31qfe7a.js";import{dh as h}from"../chunk-y09r0wsw.js";import"../chunk-9pkj7sk6.js";import"../chunk-xx3zvc3g.js";import{Nh as t}from"../chunk-gqfqnv3f.js";import"../chunk-kkte8nze.js";import"../chunk-hr1r3g0d.js";import{Ri as k}from"../chunk-g5ppst76.js";import"../chunk-d806cy7p.js";import"../chunk-8wcpxm41.js";import{$i as a}from"../chunk-jg79n382.js";import"../chunk-hm9cjxy2.js";function E(){let z=Promise.resolve(),J=Promise.resolve(),Y=(Q,G)=>new Promise(($)=>{Q.write(G,()=>$())});return{stdout:(Q)=>{z=Y(process.stdout,Q)},stderr:(Q)=>{J=Y(process.stderr,Q)},flush:async()=>{await Promise.all([z,J])}}}function x(z){let J=z.writers??E();return{args:z.args,options:z.options,argv:z.argv,line:(Y="")=>J.stdout(`${Y}
|
|
3
|
+
`),error:(Y)=>J.stderr(`${Y}
|
|
4
|
+
`),fail:(Y,Q=1)=>{throw new A(Y,Q)}}}import b from"path";var Gz=u("encryption:rotate").describe("Re-encrypt encrypted columns that are still under an older key").arg("model",{description:"The model to rotate. Omit to rotate every model with encrypted columns"}).option("batchSize",{type:"number",default:500,description:"Rows read and rewritten per batch"}).option("dryRun",{type:"boolean",description:"Count what would be re-encrypted, and write nothing"}).option("encryptPlaintext",{type:"boolean",description:"Also encrypt values that are not encrypted yet (a column just marked @gemi.encrypted)"}).handle(async({args:z,options:J,line:Y,fail:Q})=>{let G=z.model?[z.model]:[...new Set(h().map((B)=>B.split(".")[0]))],$=z.model?null:Jz();if(G.length===0&&!$){Y("No model has encrypted columns.");return}if($){let B=await $.rotateEncryption({dryRun:J.dryRun});Y(`OAuth connections: ${B.scanned} rows, ${B.rotated} ${J.dryRun?"to re-encrypt":"re-encrypted"}`)}let _=0;for(let B of G){let V=await c(B,{batchSize:J.batchSize,dryRun:J.dryRun,encryptPlaintext:J.encryptPlaintext});_+=V.plaintext,Y(`${V.model} (${V.fields.join(", ")}): ${V.scanned} rows, ${V.rotated} ${J.dryRun?"to re-encrypt":"re-encrypted"}`+(V.skipped>0?`, ${V.skipped} changed meanwhile (already current)`:"")+(V.plaintext>0?`, ${V.plaintext} not encrypted yet`:""))}if(_>0)Q(`${_} value${_===1?" is":"s are"} not encrypted. If the column was just marked @gemi.encrypted, run again with --encrypt-plaintext.`)});function Jz(){let z=k();if(!z.bound(v))return null;let J=z.make(v);if(Object.keys(J.providers).length===0)return null;let Y=J.store;return Y instanceof g?Y:null}var m=[Gz];function R(z){return z.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Qz(z){let J=new Map,Y=new Map;for(let Q of z){J.set(R(Q.name),Q),J.set(Q.name,Q);let G="alias"in Q?Q.alias:void 0;if(G)Y.set(G,Q)}return{byName:J,byAlias:Y}}function l(z){if(z==="--")return!0;if(!z.startsWith("-"))return!1;if(z==="-")return!1;if(/^-(\d|\.\d)/.test(z))return!1;return!0}function p(z,J){let{byName:Y,byAlias:Q}=Qz(z.options),G=[],$=[],_=new Map,B=!Y.has("help"),V=!Q.has("h"),F=!1,N=!1,W=(X)=>G.push(`Unknown option ${X} for command "${z.commandName}".`),T=(X,Z)=>{if(Z==="--help"||Z==="-h")N=!0;G.push(Z===void 0?`Option ${X} needs a value.`:`Option ${X} needs a value, but the next token is ${JSON.stringify(Z)}, which is another option. If that really is the value, write ${X}=${Z}.`)},j=0;while(j<J.length){let X=J[j];if(X==="--"){$.push(...J.slice(j+1));break}if(X.startsWith("--")){let Z=X.slice(2),K=Z.indexOf("="),M=K===-1?Z:Z.slice(0,K),O=K===-1?void 0:Z.slice(K+1),P=Y.get(M),D=!1;if(!P&&M.startsWith("no-")){let S=Y.get(M.slice(3));if(S&&S.type==="boolean")P=S,D=!0}if(!P&&M==="help"&&B){F=!0,j+=1;continue}if(!P){W(`--${M}`),j+=1;continue}if(P.type==="boolean"){if(O!==void 0&&O!=="true"&&O!=="false")G.push(`Option --${R(P.name)} is a flag and takes no value, but got ${JSON.stringify(O)}.`);else{let S=O===void 0?!0:O==="true";_.set(P.name,D?!S:S)}j+=1;continue}if(O!==void 0){_.set(P.name,O),j+=1;continue}let L=J[j+1];if(L===void 0||l(L)){T(`--${R(P.name)}`,L),j+=1;continue}_.set(P.name,L),j+=2;continue}if(X.startsWith("-")&&X.length>1){let Z=X.slice(1),K=!1;for(let M=0;M<Z.length;M+=1){let O=Q.get(Z[M]);if(!O){if(Z[M]==="h"&&V){F=!0;continue}W(`-${Z[M]}`);break}if(O.type==="boolean"){_.set(O.name,!0);continue}let P=Z.slice(M+1),D=P.startsWith("=")?P.slice(1):P;if(D!==""){_.set(O.name,D);break}let L=J[j+1];if(L===void 0||l(L)){T(`-${O.alias}`,L);break}_.set(O.name,L),K=!0;break}j+=K?2:1;continue}$.push(X),j+=1}let H={},I=0;for(let X of z.args){if(X.variadic){let K=$.slice(I);if(I=$.length,H[X.name]=K,X.required&&K.length===0)G.push(`Missing required argument <${X.name}...>. Command "${z.commandName}" needs at least one.`);continue}let Z=$[I];if(I+=1,Z!==void 0){H[X.name]=Z;continue}if(X.default!==void 0){H[X.name]=X.default;continue}if(X.required)G.push(`Missing required argument <${X.name}>.`);H[X.name]=void 0}if(I<$.length){let X=$.slice(I);G.push(`Unexpected argument${X.length===1?"":"s"} ${X.map((Z)=>JSON.stringify(Z)).join(", ")}. Command "${z.commandName}" takes ${z.args.length} argument${z.args.length===1?"":"s"}.`)}let U={};for(let X of z.options){let Z=_.get(X.name);if(X.type==="boolean"){U[X.name]=Z===void 0?X.default??!1:Boolean(Z);continue}if(Z===void 0){if(X.default!==void 0)U[X.name]=X.default;else if(X.required)G.push(`Missing required option --${R(X.name)}.`),U[X.name]=void 0;else U[X.name]=void 0;continue}let K=String(Z);if(X.type==="number"){let M=Number(K);if(K.trim()===""||!Number.isFinite(M))G.push(`Option --${R(X.name)} expects a number, but got ${JSON.stringify(K)}.`),U[X.name]=void 0;else U[X.name]=M;continue}U[X.name]=K}let q=F&&!N;if(G.length>0)return{ok:!1,help:q,errors:G};return{ok:!0,help:q,args:H,options:U}}function C(z,J=" "){let Y=z.reduce((Q,[G])=>Math.max(Q,G.length),0);return z.map(([Q,G])=>G===""?`${J}${Q}`:`${J}${Q.padEnd(Y)} ${G}`)}function d(z){let J=z.variadic?`${z.name}...`:z.name;return z.required?`<${J}>`:`[${J}]`}function Xz(z){let J=(G)=>z.options.some(G),Y=J((G)=>G.name==="help"||R(G.name)==="help"),Q=J((G)=>("alias"in G)&&G.alias==="h");if(Y&&Q)return[];if(Y)return[["-h","Show this message"]];return[[`${Q?"":"-h, "}--help`,"Show this message"]]}function w(z){let J=[],Y=z.args.map(d).join(" "),Q=["gemi run",z.commandName,z.options.length>0?"[options]":"",Y].filter(Boolean).join(" ");if(J.push(`Usage: ${Q}`),z.description)J.push("",z.description);if(z.args.length>0)J.push("","Arguments:"),J.push(...C(z.args.map((G)=>{let $=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:""].filter(Boolean).join(" ");return[d(G),$]})));return J.push("","Options:"),J.push(...C([...z.options.map((G)=>{let $="alias"in G&&G.alias?`-${G.alias}, `:"",_=G.type==="boolean"?"":` <${G.type}>`,B=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:"","required"in G&&G.required?"(required)":""].filter(Boolean).join(" ");return[`${$}--${R(G.name)}${_}`,B]}),...Xz(z)])),J.join(`
|
|
5
|
+
`)}function i(z){return["Provided by gemi:","",...C(z.map((J)=>[J.commandName,J.description]))].join(`
|
|
6
|
+
`)}function y(z,J){let Y=J.declared?`${z.length} command${z.length===1?"":"s"} declared in app/config/command.ts:`:`Commands in ${J.dir}:`;if(z.length===0)return J.declared?`app/config/command.ts declares no commands.
|
|
6
7
|
|
|
7
|
-
Remove the \`commands\` key from that slice to discover the classes under ${
|
|
8
|
+
Remove the \`commands\` key from that slice to discover the classes under ${J.dir} instead \u2014 a declared list wins, and an empty one `+'means "none, and I mean it".':`No commands found in ${J.dir}.
|
|
8
9
|
|
|
9
|
-
A command is registered by existing: write a file there that exports a \`defineCommand(...).handle(...)\` chain and it will appear here.`;let Q=[...z].sort((G,$)=>G.commandName<$.commandName?-1:G.commandName>$.commandName?1:0);return[
|
|
10
|
-
`)}async function
|
|
11
|
-
`),Q=(
|
|
12
|
-
`),G,$;try{G=await
|
|
10
|
+
A command is registered by existing: write a file there that exports a \`defineCommand(...).handle(...)\` chain and it will appear here.`;let Q=[...z].sort((G,$)=>G.commandName<$.commandName?-1:G.commandName>$.commandName?1:0);return[Y,"",...C(Q.map((G)=>[G.commandName,G.description])),"","Run one with `gemi run <name>`, and see its arguments with `gemi run <name> --help`."].join(`
|
|
11
|
+
`)}async function e(z){let J=z.writers??E(),Y=(_)=>J.stdout(`${_}
|
|
12
|
+
`),Q=(_)=>J.stderr(`${_}
|
|
13
|
+
`),G,$;try{G=await Yz(z.rootDir),G.boot();let _=G.app.config.get("command",{}),B=t(n(),_).commandsDir,V=b.isAbsolute(B)?B:b.join(z.rootDir,B),F=_.commands!==void 0,N=F?_.commands:await r(V),W=new o(N),T={declared:F,dir:B},j=m.filter((Z)=>W.get(Z.commandName)===void 0);if(z.name===void 0){if(Y(y(W.commands,T)),j.length>0)Y(`
|
|
14
|
+
${i(j)}`);return 0}let H=W.get(z.name)??j.find((Z)=>Z.commandName===z.name);if($=H,!H){let Z=W.suggest(z.name);return Q(`No command named \`${z.name}\`.`+(Z.length>0?` Did you mean ${Z.map((K)=>`\`${K}\``).join(", or ")}?`:"")),Q(""),Q(y(W.commands,T)),1}let I={commandName:H.commandName,args:H.args,options:H.options},U=p(I,z.argv);if(U.help)return Y(w(H)),0;if(U.ok===!1){for(let Z of U.errors)Q(Z);return Q(""),Q(w(H)),1}await G.waitForBoot();let q=x({args:U.args,options:U.options,argv:z.argv,writers:J}),X=await G.run(()=>Promise.resolve(new H().run(q)));return s(X,H,Q)}catch(_){if(_ instanceof A)return Q(_.message),s(_.code,$,Q,"called fail() with");if(_ instanceof f||_ instanceof a)return Q(_.message),1;return Q(String(_?.stack??_)),1}finally{G?.destroy()}}async function Yz(z){let J=b.resolve(z,"app/kernel/Kernel.ts"),Y;try{Y=await import(J)}catch(Q){throw new f(`Could not load ${J}:
|
|
13
15
|
${Q.message}
|
|
14
|
-
\`gemi run\` boots your application the way the server does, so it needs the Kernel. Run it from the root of a gemi project.`,{cause:Q})}if(typeof
|
|
16
|
+
\`gemi run\` boots your application the way the server does, so it needs the Kernel. Run it from the root of a gemi project.`,{cause:Q})}if(typeof Y.default!=="function")throw new f(`${J} has no default export. gemi expects the Kernel subclass to be the default export of that file.`);return new Y.default}function s(z,J,Y,Q="returned"){if(z===void 0||z===null)return 0;if(typeof z==="number"&&Number.isInteger(z)&&z>=0&&z<=255)return z;let G=J?`Command "${J.commandName}"`:"The command";return Y(`${G} ${Q} ${JSON.stringify(z)}, which is not an exit `+"code \u2014 an exit code is an integer from 0 to 255. Treating this as a "+"failure."),1}var[Zz,..._z]=process.argv.slice(2),zz=E();e({rootDir:process.cwd(),name:Zz,argv:_z,writers:zz}).then(async(z)=>{await zz.flush(),process.exit(z)});
|
|
15
17
|
|
|
16
|
-
//# debugId=
|
|
18
|
+
//# debugId=9A49AA99B703ACD364756E2164756E21
|
package/dist/console/run.js.map
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../console/context.ts", "../console/runner.ts", "../console/parse.ts", "../console/usage.ts", "../console/run.ts"],
|
|
3
|
+
"sources": ["../console/context.ts", "../console/runner.ts", "../console/builtins.ts", "../console/parse.ts", "../console/usage.ts", "../console/run.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { CommandFailed } from \"./Command\";\n\n/**\n * The single argument a command handler receives.\n *\n * ### Why the output helpers live here and not on `this`\n *\n * The authoring surface is a builder terminating in `.handle(fn)`, and `fn` is\n * an arrow function with no useful `this`. That turns out to be the better\n * arrangement rather than a cost to work around: the helpers are destructured on\n * the first line of the handler, so a reader sees which streams a command writes\n * to before reading any of it, and a test supplies its own writers by passing a\n * context instead of subclassing.\n *\n * ### Why there are three of them\n *\n * The load-bearing thing a framework can own here is **stream discipline, not\n * colour**. A diagnostic printed to stdout is what breaks\n * `TOTAL=$(gemi run count-users)` and what makes a CI grep match a progress line\n * instead of the answer, and that mistake is invisible until somebody pipes the\n * command somewhere.\n *\n * So: `line` is the command's answer and goes to stdout, `error` is a diagnostic\n * and goes to stderr, and `fail` ends the command. Deliberately absent are\n * `info`/`success` (`line` with a colour, and colour is the application's\n * business), `warn` (identical to `error`; two names for one stream is a coin\n * flip at every call site), and tables or progress bars — a console formatting\n * library is a project, not a feature.\n */\nexport interface CommandContext<\n A = Record<string, unknown>,\n O = Record<string, unknown>,\n> {\n /** The positional arguments, by the names `.arg()` declared. */\n args: A;\n\n /** The flags, by the names `.option()` declared. */\n options: O;\n\n /**\n * Everything after the command name, unparsed.\n *\n * The escape hatch, for a command that wants to forward its tail to something\n * else. Present even when parsing succeeded, so a command never has to choose\n * between the declared schema and the raw truth.\n */\n argv: readonly string[];\n\n /** The command's answer, on stdout. */\n line(message?: string): void;\n\n /** A diagnostic, on stderr. Does not end the command. */\n error(message: string): void;\n\n /**\n * Ends the command with a message and an exit code, and no stack.\n *\n * Throws rather than returning, so it type-checks as the last statement of any\n * branch and a caller cannot forget to `return` after it.\n */\n fail(message: string, code?: number): never;\n}\n\n/** Where a context writes. Injectable so tests can capture without spawning. */\nexport interface CommandWriters {\n stdout: (chunk: string) => void;\n stderr: (chunk: string) => void;\n}\n\n/**\n * Writers onto this process's streams, and the means to know they landed.\n *\n * ### Why `flush` exists\n *\n * `process.stdout.write` is asynchronous when stdout is a pipe, and `gemi run`\n * ends in an explicit `process.exit` — which it must, or a command holding a\n * database pool open would finish its work and then sit there. Those two facts\n * together truncate output at the pipe buffer: measured on Bun 1.3.14, a\n * 2,000,000-byte write followed immediately by `process.exit(0)` delivers\n * exactly 65,536 bytes through a pipe, and exits 0 while doing it. So\n * `gemi run export-users | gzip > out.gz` silently stores a fragment — the exact\n * idiom the three-stream design above exists to protect.\n *\n * The fence is the *last* write's completion callback. Chunks are flushed in\n * order, so awaiting the newest one awaits all of them. The obvious alternatives\n * do not work here: a zero-length `write(\"\", cb)` used as a fence delivered only\n * 1,310,720 of those bytes, and `writableLength` reports 0 while data is still\n * pending, so a drain loop exits immediately. Both were measured rather than\n * assumed.\n */\nexport interface ProcessWriters extends CommandWriters {\n /** Resolves once everything written so far has reached the OS. */\n flush(): Promise<void>;\n}\n\nexport function processWriters(): ProcessWriters {\n // One per stream: the last write issued to it, resolved when that write (and\n // therefore every write queued before it) has been handed over.\n let stdout: Promise<void> = Promise.resolve();\n let stderr: Promise<void> = Promise.resolve();\n\n const write = (stream: NodeJS.WriteStream, chunk: string): Promise<void> =>\n new Promise((resolve) => {\n // Resolved on the callback rather than on the return value: `write`\n // returning false means \"buffered\", not \"failed\", and an error here is\n // still a completed attempt — a closed pipe must not hang the exit.\n stream.write(chunk, () => resolve());\n });\n\n return {\n stdout: (chunk) => {\n stdout = write(process.stdout, chunk);\n },\n stderr: (chunk) => {\n stderr = write(process.stderr, chunk);\n },\n flush: async () => {\n await Promise.all([stdout, stderr]);\n },\n };\n}\n\nexport function createContext<A, O>(params: {\n args: A;\n options: O;\n argv: readonly string[];\n writers?: CommandWriters;\n}): CommandContext<A, O> {\n const writers = params.writers ?? processWriters();\n\n return {\n args: params.args,\n options: params.options,\n argv: params.argv,\n line: (message = \"\") => writers.stdout(`${message}\\n`),\n error: (message: string) => writers.stderr(`${message}\\n`),\n fail: (message: string, code = 1) => {\n throw new CommandFailed(message, code);\n },\n };\n}\n",
|
|
6
|
-
"import path from \"node:path\";\n\nimport type { Kernel } from \"../kernel/Kernel\";\nimport { discoverCommands } from \"../services/discovery\";\nimport { DiscoveryError } from \"../support/discover\";\nimport { withDefaults } from \"../support/withDefaults\";\nimport { CommandFailed, type CommandClass } from \"./Command\";\nimport { CommandRegistry } from \"./CommandRegistry\";\nimport { commandConfigDefaults, type CommandConfig } from \"./config\";\nimport { createContext, processWriters, type CommandWriters } from \"./context\";\nimport { ConsoleError } from \"./errors\";\nimport { parseArgv } from \"./parse\";\nimport { renderList, renderUsage } from \"./usage\";\n\nexport { ConsoleError };\n\n/**\n * `gemi run`, from the inside.\n *\n * This runs in a Bun process the CLI spawned, not in the CLI. That is the whole\n * reason the file exists, and it is worth stating here because everything below\n * assumes it:\n *\n * - `dist/bin/gemi.js` bundles its own copy of gemi, while the application's\n * Kernel resolves `gemi/*` to source. Discovery decides membership by\n * walking the prototype chain, so a `Command` base imported into the CLI\n * bundle is a *different class object* from the one `app/commands/*.ts`\n * extends — every command would be invisible, silently. In this process\n * there is one copy and the question does not arise.\n * - `--preload gemi/bun/preload` and the app's own `app/preload.ts` can only\n * be registered at process start, and a command that touches a controller\n * needs the first while the template's models need the second.\n * - Bun fixes its JSX transform and react-dom's export conditions from\n * `NODE_ENV` at startup, so a command that renders an email is only correct\n * in a process that began with the right one.\n *\n * ### Why the ordering below is the ordering\n *\n * Listing commands, reporting an unknown name and printing `--help` all resolve\n * *before* `waitForBoot()`. Those are the three things an operator does most\n * often and the three that need nothing from the application beyond its config,\n * so none of them should open a database connection. Running a command needs the\n * full boot and takes it.\n */\n\nexport interface RunConsoleParams {\n rootDir: string;\n /** The command to run. Absent means \"list what there is\". */\n name?: string;\n /** Everything after the name, exactly as it was typed — including any `--`. */\n argv: readonly string[];\n writers?: CommandWriters;\n}\n\nexport async function runConsole(params: RunConsoleParams): Promise<number> {\n const writers = params.writers ?? processWriters();\n const out = (message: string) => writers.stdout(`${message}\\n`);\n const err = (message: string) => writers.stderr(`${message}\\n`);\n\n let kernel: Kernel | undefined;\n // Hoisted only so the catch can name the command in an exit-code complaint.\n let running: CommandClass | undefined;\n\n try {\n kernel = await loadKernel(params.rootDir);\n kernel.boot();\n\n const slice = kernel.app.config.get<CommandConfig>(\"command\", {});\n const dir = withDefaults(commandConfigDefaults(), slice).commandsDir;\n\n // Resolved against `rootDir` rather than left for `discoverCommands` to hang\n // off `projectRoot()`. In the spawned process the two are the same thing —\n // the CLI spawns with no `cwd`, so the child inherits the project root — but\n // \"the same thing in production\" is how a parameter quietly stops being one.\n // This function already resolves the Kernel against `rootDir`, and a caller\n // that passes a directory only for half of it to be honoured is the kind of\n // thing tests find and nothing else does.\n const commandsDir = path.isAbsolute(dir)\n ? dir\n : path.join(params.rootDir, dir);\n\n // Declared wins, and `[]` is declared. Read before `withDefaults`, which\n // collapses absent and `undefined` into the default `[]` — the same value an\n // app writes when it means \"none, and I mean it\".\n const declared = slice.commands !== undefined;\n const commands = declared\n ? slice.commands!\n : await discoverCommands(commandsDir);\n\n const registry = new CommandRegistry(commands);\n const source = { declared, dir };\n\n if (params.name === undefined) {\n out(renderList(registry.commands, source));\n return 0;\n }\n\n const command = registry.get(params.name);\n running = command;\n\n if (!command) {\n const suggestions = registry.suggest(params.name);\n err(\n `No command named \\`${params.name}\\`.` +\n (suggestions.length > 0\n ? ` Did you mean ${suggestions\n .map((candidate) => `\\`${candidate}\\``)\n .join(\", or \")}?`\n : \"\"),\n );\n err(\"\");\n err(renderList(registry.commands, source));\n return 1;\n }\n\n const spec = {\n commandName: command.commandName,\n args: command.args,\n options: command.options,\n };\n\n const parsed = parseArgv(spec, params.argv);\n\n // Before the error branch, so `--help` works on the invocation that most\n // needs it: the one that is already a usage error. And *from the parse*\n // rather than from a token scan, because only the parse knows that the\n // `--help` in `--message --help` is a value — see `ParseResult[\"help\"]`.\n if (parsed.help) {\n out(renderUsage(command));\n return 0;\n }\n\n // `=== false` rather than `!parsed.ok`: the package compiles with\n // `strictNullChecks` off, and under it a `!x.ok` test does not narrow a\n // discriminated union while an explicit comparison does. The negation\n // compiles to the same check and reads the same, which is exactly why it is\n // worth a line — it fails as a type error here, but the same shape in an\n // untypechecked file would just quietly be `any`.\n if (parsed.ok === false) {\n for (const message of parsed.errors) err(message);\n err(\"\");\n err(renderUsage(command));\n return 1;\n }\n\n // Only now. Everything above answered a question about the application's\n // shape; this is the first line that needs the application itself.\n await kernel.waitForBoot();\n\n const context = createContext({\n args: parsed.args,\n options: parsed.options,\n argv: params.argv,\n writers,\n });\n\n const result = await kernel.run(() =>\n Promise.resolve(\n new (command as new () => { run(ctx: unknown): unknown })().run(\n context,\n ),\n ),\n );\n\n return exitCodeFor(result, command, err);\n } catch (error) {\n // A `CommandFailed`, a `ConsoleError` or a `DiscoveryError` is a sentence\n // written for this moment; anything else is a bug and keeps its stack. The\n // same split `bin/gemi.ts` already applies to `CheckModelsError`.\n //\n // `DiscoveryError` belongs in this list rather than the other because every\n // way of raising one — a command file that will not import, a builder chain\n // that was never finished — is a mistake in the application's own source\n // with the fix named in the message. A stack above it points at this\n // runner's frames, which is not where anybody needs to look.\n if (error instanceof CommandFailed) {\n err(error.message);\n\n // Through the same guard a returned value gets. `fail` takes the same\n // kind of number and the same kind of expression produces it, so\n // ``ctx.fail(`${bad.length} rows failed`, bad.length)`` with 256 bad rows\n // handed 256 straight to `process.exit`, which the shell reports as\n // status **0** — a failed command read as a success by the `&&` chain or\n // CI step waiting on it. 300 arrives as 44; 512 is 0 again.\n return exitCodeFor(error.code, running, err, \"called fail() with\");\n }\n\n if (error instanceof ConsoleError || error instanceof DiscoveryError) {\n err(error.message);\n return 1;\n }\n\n err(String((error as Error)?.stack ?? error));\n return 1;\n } finally {\n // Stops the Scheduler if it was resolved, flushes the container, clears the\n // static instance and disables the kernel context. The caller still exits\n // explicitly — see `run.ts`.\n kernel?.destroy();\n }\n}\n\nasync function loadKernel(rootDir: string): Promise<Kernel> {\n const kernelPath = path.resolve(rootDir, \"app/kernel/Kernel.ts\");\n\n let module: { default?: new () => Kernel };\n try {\n module = await import(kernelPath);\n } catch (error) {\n throw new ConsoleError(\n `Could not load ${kernelPath}:\\n ${(error as Error).message}\\n` +\n `\\`gemi run\\` boots your application the way the server does, so it ` +\n `needs the Kernel. Run it from the root of a gemi project.`,\n { cause: error },\n );\n }\n\n if (typeof module.default !== \"function\") {\n throw new ConsoleError(\n `${kernelPath} has no default export. gemi expects the Kernel subclass ` +\n `to be the default export of that file.`,\n );\n }\n\n return new module.default();\n}\n\n/**\n * What the command asked the shell to see, if a shell can actually see it.\n *\n * An exit status is one byte. Anything else a handler offers is reported rather\n * than coerced, because coercion here is silent and inverts the answer: `return\n * users.length` after 300 backfilled users would exit 44 (300 & 255), and 256\n * would exit **0** — a failure indistinguishable from success to the `&&` chain,\n * CI step or cron wrapper waiting on it.\n *\n * Both ways a command names its status come through here — `return n` and\n * `ctx.fail(msg, n)` — because both take the same kind of number from the same\n * kind of expression, and a guard on only one of them is a guard on neither.\n */\nfunction exitCodeFor(\n result: unknown,\n command: CommandClass | undefined,\n err: (message: string) => void,\n source = \"returned\",\n): number {\n if (result === undefined || result === null) return 0;\n\n if (\n typeof result === \"number\" &&\n Number.isInteger(result) &&\n result >= 0 &&\n result <= 255\n ) {\n return result;\n }\n\n const subject = command ? `Command \"${command.commandName}\"` : \"The command\";\n\n err(\n `${subject} ${source} ${JSON.stringify(result)}, which is not an exit ` +\n `code — an exit code is an integer from 0 to 255. Treating this as a ` +\n `failure.`,\n );\n return 1;\n}\n",
|
|
6
|
+
"import path from \"node:path\";\n\nimport type { Kernel } from \"../kernel/Kernel\";\nimport { discoverCommands } from \"../services/discovery\";\nimport { DiscoveryError } from \"../support/discover\";\nimport { withDefaults } from \"../support/withDefaults\";\nimport { frameworkCommands } from \"./builtins\";\nimport { CommandFailed, type CommandClass } from \"./Command\";\nimport { CommandRegistry } from \"./CommandRegistry\";\nimport { commandConfigDefaults, type CommandConfig } from \"./config\";\nimport { createContext, processWriters, type CommandWriters } from \"./context\";\nimport { ConsoleError } from \"./errors\";\nimport { parseArgv } from \"./parse\";\nimport { renderBuiltins, renderList, renderUsage } from \"./usage\";\n\nexport { ConsoleError };\n\n/**\n * `gemi run`, from the inside.\n *\n * This runs in a Bun process the CLI spawned, not in the CLI. That is the whole\n * reason the file exists, and it is worth stating here because everything below\n * assumes it:\n *\n * - `dist/bin/gemi.js` bundles its own copy of gemi, while the application's\n * Kernel resolves `gemi/*` to source. Discovery decides membership by\n * walking the prototype chain, so a `Command` base imported into the CLI\n * bundle is a *different class object* from the one `app/commands/*.ts`\n * extends — every command would be invisible, silently. In this process\n * there is one copy and the question does not arise.\n * - `--preload gemi/bun/preload` and the app's own `app/preload.ts` can only\n * be registered at process start, and a command that touches a controller\n * needs the first while the template's models need the second.\n * - Bun fixes its JSX transform and react-dom's export conditions from\n * `NODE_ENV` at startup, so a command that renders an email is only correct\n * in a process that began with the right one.\n *\n * ### Why the ordering below is the ordering\n *\n * Listing commands, reporting an unknown name and printing `--help` all resolve\n * *before* `waitForBoot()`. Those are the three things an operator does most\n * often and the three that need nothing from the application beyond its config,\n * so none of them should open a database connection. Running a command needs the\n * full boot and takes it.\n */\n\nexport interface RunConsoleParams {\n rootDir: string;\n /** The command to run. Absent means \"list what there is\". */\n name?: string;\n /** Everything after the name, exactly as it was typed — including any `--`. */\n argv: readonly string[];\n writers?: CommandWriters;\n}\n\nexport async function runConsole(params: RunConsoleParams): Promise<number> {\n const writers = params.writers ?? processWriters();\n const out = (message: string) => writers.stdout(`${message}\\n`);\n const err = (message: string) => writers.stderr(`${message}\\n`);\n\n let kernel: Kernel | undefined;\n // Hoisted only so the catch can name the command in an exit-code complaint.\n let running: CommandClass | undefined;\n\n try {\n kernel = await loadKernel(params.rootDir);\n kernel.boot();\n\n const slice = kernel.app.config.get<CommandConfig>(\"command\", {});\n const dir = withDefaults(commandConfigDefaults(), slice).commandsDir;\n\n // Resolved against `rootDir` rather than left for `discoverCommands` to hang\n // off `projectRoot()`. In the spawned process the two are the same thing —\n // the CLI spawns with no `cwd`, so the child inherits the project root — but\n // \"the same thing in production\" is how a parameter quietly stops being one.\n // This function already resolves the Kernel against `rootDir`, and a caller\n // that passes a directory only for half of it to be honoured is the kind of\n // thing tests find and nothing else does.\n const commandsDir = path.isAbsolute(dir)\n ? dir\n : path.join(params.rootDir, dir);\n\n // Declared wins, and `[]` is declared. Read before `withDefaults`, which\n // collapses absent and `undefined` into the default `[]` — the same value an\n // app writes when it means \"none, and I mean it\".\n const declared = slice.commands !== undefined;\n const commands = declared\n ? slice.commands!\n : await discoverCommands(commandsDir);\n\n const registry = new CommandRegistry(commands);\n const source = { declared, dir };\n\n // gemi's own commands, after the app's: an app command of the same name\n // wins, and the framework's are listed under a heading of their own so\n // the app's listing reads exactly as it did.\n const builtins = frameworkCommands.filter(\n (candidate) => registry.get(candidate.commandName) === undefined,\n );\n\n if (params.name === undefined) {\n out(renderList(registry.commands, source));\n if (builtins.length > 0) out(`\\n${renderBuiltins(builtins)}`);\n return 0;\n }\n\n const command =\n registry.get(params.name) ??\n builtins.find((candidate) => candidate.commandName === params.name);\n running = command;\n\n if (!command) {\n const suggestions = registry.suggest(params.name);\n err(\n `No command named \\`${params.name}\\`.` +\n (suggestions.length > 0\n ? ` Did you mean ${suggestions\n .map((candidate) => `\\`${candidate}\\``)\n .join(\", or \")}?`\n : \"\"),\n );\n err(\"\");\n err(renderList(registry.commands, source));\n return 1;\n }\n\n const spec = {\n commandName: command.commandName,\n args: command.args,\n options: command.options,\n };\n\n const parsed = parseArgv(spec, params.argv);\n\n // Before the error branch, so `--help` works on the invocation that most\n // needs it: the one that is already a usage error. And *from the parse*\n // rather than from a token scan, because only the parse knows that the\n // `--help` in `--message --help` is a value — see `ParseResult[\"help\"]`.\n if (parsed.help) {\n out(renderUsage(command));\n return 0;\n }\n\n // `=== false` rather than `!parsed.ok`: the package compiles with\n // `strictNullChecks` off, and under it a `!x.ok` test does not narrow a\n // discriminated union while an explicit comparison does. The negation\n // compiles to the same check and reads the same, which is exactly why it is\n // worth a line — it fails as a type error here, but the same shape in an\n // untypechecked file would just quietly be `any`.\n if (parsed.ok === false) {\n for (const message of parsed.errors) err(message);\n err(\"\");\n err(renderUsage(command));\n return 1;\n }\n\n // Only now. Everything above answered a question about the application's\n // shape; this is the first line that needs the application itself.\n await kernel.waitForBoot();\n\n const context = createContext({\n args: parsed.args,\n options: parsed.options,\n argv: params.argv,\n writers,\n });\n\n const result = await kernel.run(() =>\n Promise.resolve(\n new (command as new () => { run(ctx: unknown): unknown })().run(\n context,\n ),\n ),\n );\n\n return exitCodeFor(result, command, err);\n } catch (error) {\n // A `CommandFailed`, a `ConsoleError` or a `DiscoveryError` is a sentence\n // written for this moment; anything else is a bug and keeps its stack. The\n // same split `bin/gemi.ts` already applies to `CheckModelsError`.\n //\n // `DiscoveryError` belongs in this list rather than the other because every\n // way of raising one — a command file that will not import, a builder chain\n // that was never finished — is a mistake in the application's own source\n // with the fix named in the message. A stack above it points at this\n // runner's frames, which is not where anybody needs to look.\n if (error instanceof CommandFailed) {\n err(error.message);\n\n // Through the same guard a returned value gets. `fail` takes the same\n // kind of number and the same kind of expression produces it, so\n // ``ctx.fail(`${bad.length} rows failed`, bad.length)`` with 256 bad rows\n // handed 256 straight to `process.exit`, which the shell reports as\n // status **0** — a failed command read as a success by the `&&` chain or\n // CI step waiting on it. 300 arrives as 44; 512 is 0 again.\n return exitCodeFor(error.code, running, err, \"called fail() with\");\n }\n\n if (error instanceof ConsoleError || error instanceof DiscoveryError) {\n err(error.message);\n return 1;\n }\n\n err(String((error as Error)?.stack ?? error));\n return 1;\n } finally {\n // Stops the Scheduler if it was resolved, flushes the container, clears the\n // static instance and disables the kernel context. The caller still exits\n // explicitly — see `run.ts`.\n kernel?.destroy();\n }\n}\n\nasync function loadKernel(rootDir: string): Promise<Kernel> {\n const kernelPath = path.resolve(rootDir, \"app/kernel/Kernel.ts\");\n\n let module: { default?: new () => Kernel };\n try {\n module = await import(kernelPath);\n } catch (error) {\n throw new ConsoleError(\n `Could not load ${kernelPath}:\\n ${(error as Error).message}\\n` +\n `\\`gemi run\\` boots your application the way the server does, so it ` +\n `needs the Kernel. Run it from the root of a gemi project.`,\n { cause: error },\n );\n }\n\n if (typeof module.default !== \"function\") {\n throw new ConsoleError(\n `${kernelPath} has no default export. gemi expects the Kernel subclass ` +\n `to be the default export of that file.`,\n );\n }\n\n return new module.default();\n}\n\n/**\n * What the command asked the shell to see, if a shell can actually see it.\n *\n * An exit status is one byte. Anything else a handler offers is reported rather\n * than coerced, because coercion here is silent and inverts the answer: `return\n * users.length` after 300 backfilled users would exit 44 (300 & 255), and 256\n * would exit **0** — a failure indistinguishable from success to the `&&` chain,\n * CI step or cron wrapper waiting on it.\n *\n * Both ways a command names its status come through here — `return n` and\n * `ctx.fail(msg, n)` — because both take the same kind of number from the same\n * kind of expression, and a guard on only one of them is a guard on neither.\n */\nfunction exitCodeFor(\n result: unknown,\n command: CommandClass | undefined,\n err: (message: string) => void,\n source = \"returned\",\n): number {\n if (result === undefined || result === null) return 0;\n\n if (\n typeof result === \"number\" &&\n Number.isInteger(result) &&\n result >= 0 &&\n result <= 255\n ) {\n return result;\n }\n\n const subject = command ? `Command \"${command.commandName}\"` : \"The command\";\n\n err(\n `${subject} ${source} ${JSON.stringify(result)}, which is not an exit ` +\n `code — an exit code is an integer from 0 to 255. Treating this as a ` +\n `failure.`,\n );\n return 1;\n}\n",
|
|
7
|
+
"import { ConnectionManager } from \"../auth/connections/ConnectionManager\";\nimport { DatabaseConnectionStore } from \"../auth/connections/ConnectionStore\";\nimport { app } from \"../foundation/app\";\nimport { encryptedColumnsInRegistry } from \"../orm/encryption\";\nimport { rotateEncryptedColumns } from \"../orm/encryption-rotate\";\nimport { defineCommand } from \"./builder\";\nimport type { CommandClass } from \"./Command\";\n\n/**\n * `gemi run encryption:rotate [Model]` (#844): re-encrypts encrypted columns\n * still under an older key, after `encryption.current` has moved to a new one.\n * Without a model it also re-encrypts the OAuth connection tokens (#845).\n */\nexport const EncryptionRotateCommand = defineCommand(\"encryption:rotate\")\n .describe(\"Re-encrypt encrypted columns that are still under an older key\")\n .arg(\"model\", {\n description: \"The model to rotate. Omit to rotate every model with encrypted columns\",\n })\n .option(\"batchSize\", {\n type: \"number\",\n default: 500,\n description: \"Rows read and rewritten per batch\",\n })\n .option(\"dryRun\", {\n type: \"boolean\",\n description: \"Count what would be re-encrypted, and write nothing\",\n })\n .option(\"encryptPlaintext\", {\n type: \"boolean\",\n description:\n \"Also encrypt values that are not encrypted yet (a column just marked @gemi.encrypted)\",\n })\n .handle(async ({ args, options, line, fail }) => {\n const models = args.model\n ? [args.model]\n : [...new Set(encryptedColumnsInRegistry().map((column) => column.split(\".\")[0]))];\n // OAuth connection tokens (#845) live in gemi's own table, not a model.\n const connections = args.model ? null : connectionStoreToRotate();\n if (models.length === 0 && !connections) {\n line(\"No model has encrypted columns.\");\n return;\n }\n if (connections) {\n const report = await connections.rotateEncryption({ dryRun: options.dryRun });\n line(\n `OAuth connections: ${report.scanned} rows, ` +\n `${report.rotated} ${options.dryRun ? \"to re-encrypt\" : \"re-encrypted\"}`,\n );\n }\n\n let plaintext = 0;\n for (const model of models) {\n const report = await rotateEncryptedColumns(model, {\n batchSize: options.batchSize,\n dryRun: options.dryRun,\n encryptPlaintext: options.encryptPlaintext,\n });\n plaintext += report.plaintext;\n line(\n `${report.model} (${report.fields.join(\", \")}): ${report.scanned} rows, ` +\n `${report.rotated} ${options.dryRun ? \"to re-encrypt\" : \"re-encrypted\"}` +\n (report.skipped > 0 ? `, ${report.skipped} changed meanwhile (already current)` : \"\") +\n (report.plaintext > 0 ? `, ${report.plaintext} not encrypted yet` : \"\"),\n );\n }\n\n if (plaintext > 0) {\n fail(\n `${plaintext} value${plaintext === 1 ? \" is\" : \"s are\"} not encrypted. If the ` +\n \"column was just marked @gemi.encrypted, run again with --encrypt-plaintext.\",\n );\n }\n });\n\n/** The app's connection store, when it is gemi's table and some provider is configured. */\nfunction connectionStoreToRotate(): DatabaseConnectionStore | null {\n const application = app();\n if (!application.bound(ConnectionManager)) return null;\n const manager = application.make(ConnectionManager);\n if (Object.keys(manager.providers).length === 0) return null;\n const store = manager.store;\n return store instanceof DatabaseConnectionStore ? store : null;\n}\n\n/**\n * Commands gemi itself provides. Reachable by name from every app, listed\n * after the app's own, and shadowed by an app command of the same name.\n */\nexport const frameworkCommands: CommandClass[] = [EncryptionRotateCommand];\n",
|
|
7
8
|
"import type { CommandArgument, CommandOption } from \"./Command\";\n\n/**\n * Turning what an operator typed into what a handler declared it wanted.\n *\n * A pure function over `(spec, argv)`, deliberately: this is where every\n * off-by-one in argument handling lives, and a pure function is one a test can\n * exercise a hundred ways without a project on disk, a spawned process or a\n * booted container. `runner.ts` does the parts that need those.\n *\n * ### Why gemi parses this itself instead of handing it to commander\n *\n * commander is a dependency of this package and would resolve here, and an\n * earlier draft used it. Two things argued it back out. The schema is already\n * declared — named options with a `type`, not commander's `\"-t, --tries <n>\"`\n * flag strings — so using commander means translating one declaration into\n * another and then translating its output back, with the type information lost\n * in the middle. And commander is currently a *CLI-side* concern: `bin/gemi.ts`\n * uses it, and nothing that runs inside an application does. Keeping it that way\n * means a command's parsing has no dependency at all, which matters more here\n * than it looks — this code runs in the application's process, next to the\n * application's own module graph.\n *\n * `usage.ts` renders `--help` from the same spec this reads, so the help and the\n * parser cannot drift.\n */\n\n/** `dryRun` -> `dry-run`. What the operator types. */\nexport function kebab(name: string): string {\n return name\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nexport interface CommandSpec {\n commandName: string;\n args: CommandArgument[];\n options: CommandOption[];\n}\n\nexport type ParseResult = {\n /**\n * The invocation asked for help rather than for work.\n *\n * Reported by the parse rather than by a separate scan, because whether a\n * `--help` is a request for help or the *value* of the option before it is a\n * question only something tracking option arity can answer. A flat token scan\n * reads `--message --help` as a request for help, prints usage and exits 0 —\n * so the message is never sent and a cron wrapper branching on the exit code\n * records a success for work that did not happen.\n *\n * Present on both branches, and the runner checks it first: `--help` has to\n * work on an invocation that would otherwise be a usage error, which is\n * precisely when somebody reaches for it.\n */\n help: boolean;\n} & (\n | {\n ok: true;\n args: Record<string, string | string[] | undefined>;\n options: Record<string, string | number | boolean | undefined>;\n }\n | { ok: false; errors: string[] }\n);\n\nfunction optionIndex(options: CommandOption[]) {\n const byName = new Map<string, CommandOption>();\n const byAlias = new Map<string, CommandOption>();\n\n for (const option of options) {\n // Both spellings resolve, so `--dryRun` works for anyone who typed the\n // declared name out of habit. The kebab form is the documented one.\n byName.set(kebab(option.name), option);\n byName.set(option.name, option);\n const alias = \"alias\" in option ? option.alias : undefined;\n if (alias) byAlias.set(alias, option);\n }\n\n return { byName, byAlias };\n}\n\n/**\n * Whether this invocation is asking for help rather than running.\n *\n * A thin read of the parse, so the two cannot disagree about what counts as a\n * `--help`. See `ParseResult[\"help\"]` for why that question needs a parse at all.\n */\nexport function wantsHelp(spec: CommandSpec, argv: readonly string[]): boolean {\n return parseArgv(spec, argv).help;\n}\n\n/**\n * Whether a token is the next option rather than the previous one's value.\n *\n * `--message --dry-run` should not set `message` to the literal `\"--dry-run\"`\n * and leave `dryRun` false — a dry run that executes for real is the worst shape\n * a parser bug can take. So a value-taking option refuses an option-shaped\n * token and says how to override it.\n *\n * The two exceptions are both real values that happen to start with a dash: a\n * negative number, and a bare `-` (the long-standing spelling of \"stdin\"). For\n * anything else `--opt=value` is the escape hatch, which is how every getopt\n * since the 1980s has handled it.\n */\nfunction looksLikeAnotherOption(token: string): boolean {\n if (token === \"--\") return true;\n if (!token.startsWith(\"-\")) return false;\n if (token === \"-\") return false;\n if (/^-(\\d|\\.\\d)/.test(token)) return false;\n return true;\n}\n\nexport function parseArgv(\n spec: CommandSpec,\n argv: readonly string[],\n): ParseResult {\n const { byName, byAlias } = optionIndex(spec.options);\n const errors: string[] = [];\n const positionals: string[] = [];\n const raw = new Map<string, string | boolean>();\n\n // Split, rather than one guard over both. A command that declares an option\n // called `help` has claimed `--help`, and a command that declares a `-h` alias\n // has claimed `-h` — but neither claims the other, and treating them as one\n // switch means a `.option(\"host\", { alias: \"h\" })` silently removes the long\n // `--help` the command never asked for, while `usage.ts` goes on advertising\n // it. The application's schema wins over the framework's convenience, exactly\n // as far as the application actually reached.\n const helpIsFree = !byName.has(\"help\");\n const shortHelpIsFree = !byAlias.has(\"h\");\n let requested = false;\n\n // Set when the token refused as a value was itself a `--help`, which is the\n // one case where \"did they want help?\" has no honest answer. See the note\n // above the return.\n let ambiguous = false;\n\n const unknown = (token: string) =>\n errors.push(`Unknown option ${token} for command \"${spec.commandName}\".`);\n\n const needsValue = (label: string, next: string | undefined) => {\n if (next === \"--help\" || next === \"-h\") ambiguous = true;\n\n errors.push(\n next === undefined\n ? `Option ${label} needs a value.`\n : `Option ${label} needs a value, but the next token is ` +\n `${JSON.stringify(next)}, which is another option. If that really is ` +\n `the value, write ${label}=${next}.`,\n );\n };\n\n let index = 0;\n while (index < argv.length) {\n const token = argv[index]!;\n\n // Everything after a bare `--` is positional, however it is spelled. This is\n // the escape hatch for an argument that looks like a flag.\n if (token === \"--\") {\n positionals.push(...argv.slice(index + 1));\n break;\n }\n\n if (token.startsWith(\"--\")) {\n const body = token.slice(2);\n const equals = body.indexOf(\"=\");\n const key = equals === -1 ? body : body.slice(0, equals);\n const inline = equals === -1 ? undefined : body.slice(equals + 1);\n\n let option = byName.get(key);\n let negated = false;\n\n // `--no-dry-run` only when there is no option actually called that.\n if (!option && key.startsWith(\"no-\")) {\n const positive = byName.get(key.slice(3));\n if (positive && positive.type === \"boolean\") {\n option = positive;\n negated = true;\n }\n }\n\n // Only once the command's own options have had their chance at the name.\n if (!option && key === \"help\" && helpIsFree) {\n requested = true;\n index += 1;\n continue;\n }\n\n if (!option) {\n unknown(`--${key}`);\n index += 1;\n continue;\n }\n\n if (option.type === \"boolean\") {\n if (inline !== undefined && inline !== \"true\" && inline !== \"false\") {\n errors.push(\n `Option --${kebab(option.name)} is a flag and takes no value, ` +\n `but got ${JSON.stringify(inline)}.`,\n );\n } else {\n const value = inline === undefined ? true : inline === \"true\";\n raw.set(option.name, negated ? !value : value);\n }\n index += 1;\n continue;\n }\n\n if (inline !== undefined) {\n raw.set(option.name, inline);\n index += 1;\n continue;\n }\n\n const next = argv[index + 1];\n if (next === undefined || looksLikeAnotherOption(next)) {\n needsValue(`--${kebab(option.name)}`, next);\n index += 1;\n continue;\n }\n\n raw.set(option.name, next);\n index += 2;\n continue;\n }\n\n if (token.startsWith(\"-\") && token.length > 1) {\n // A cluster: every character is an alias. All but the last must be flags,\n // and the last may take the remainder of the token as its value (`-l50`,\n // `-l=50`) or the next argument.\n const chars = token.slice(1);\n let consumedNext = false;\n\n for (let position = 0; position < chars.length; position += 1) {\n const option = byAlias.get(chars[position]!);\n if (!option) {\n if (chars[position] === \"h\" && shortHelpIsFree) {\n requested = true;\n continue;\n }\n unknown(`-${chars[position]}`);\n break;\n }\n\n if (option.type === \"boolean\") {\n raw.set(option.name, true);\n continue;\n }\n\n const rest = chars.slice(position + 1);\n const inline = rest.startsWith(\"=\") ? rest.slice(1) : rest;\n if (inline !== \"\") {\n raw.set(option.name, inline);\n break;\n }\n\n const next = argv[index + 1];\n if (next === undefined || looksLikeAnotherOption(next)) {\n needsValue(`-${option.alias}`, next);\n break;\n }\n\n raw.set(option.name, next);\n consumedNext = true;\n break;\n }\n\n index += consumedNext ? 2 : 1;\n continue;\n }\n\n positionals.push(token);\n index += 1;\n }\n\n const args: Record<string, string | string[] | undefined> = {};\n let cursor = 0;\n\n for (const declared of spec.args) {\n if (declared.variadic) {\n const collected = positionals.slice(cursor);\n cursor = positionals.length;\n args[declared.name] = collected;\n\n // `required` on a variadic means \"at least one\", and honouring it is the\n // only reading that matches what the operator is shown: `usage.ts` prints\n // `<files...>` for this declaration, which says mandatory. Ignoring it\n // meant `gemi run import-files` with the paths forgotten booted the\n // application, ran the handler over an empty list and exited 0 — a no-op\n // that reads as a successful import.\n if (declared.required && collected.length === 0) {\n errors.push(\n `Missing required argument <${declared.name}...>. Command ` +\n `\"${spec.commandName}\" needs at least one.`,\n );\n }\n continue;\n }\n\n const value = positionals[cursor];\n cursor += 1;\n\n if (value !== undefined) {\n args[declared.name] = value;\n continue;\n }\n\n if (declared.default !== undefined) {\n args[declared.name] = declared.default;\n continue;\n }\n\n if (declared.required) {\n errors.push(`Missing required argument <${declared.name}>.`);\n }\n\n args[declared.name] = undefined;\n }\n\n if (cursor < positionals.length) {\n const extra = positionals.slice(cursor);\n errors.push(\n `Unexpected argument${extra.length === 1 ? \"\" : \"s\"} ` +\n `${extra.map((value) => JSON.stringify(value)).join(\", \")}. ` +\n `Command \"${spec.commandName}\" takes ${spec.args.length} argument` +\n `${spec.args.length === 1 ? \"\" : \"s\"}.`,\n );\n }\n\n const options: Record<string, string | number | boolean | undefined> = {};\n\n for (const declared of spec.options) {\n const supplied = raw.get(declared.name);\n\n if (declared.type === \"boolean\") {\n options[declared.name] =\n supplied === undefined\n ? (declared.default ?? false)\n : Boolean(supplied);\n continue;\n }\n\n if (supplied === undefined) {\n if (declared.default !== undefined) {\n options[declared.name] = declared.default;\n } else if (declared.required) {\n errors.push(`Missing required option --${kebab(declared.name)}.`);\n options[declared.name] = undefined;\n } else {\n options[declared.name] = undefined;\n }\n continue;\n }\n\n const value = String(supplied);\n\n if (declared.type === \"number\") {\n const parsed = Number(value);\n // `Number(\"\")` is 0 and `Number(\" \")` is 0, which is how a typo becomes a\n // plausible-looking number. Reject anything that was not written as one.\n if (value.trim() === \"\" || !Number.isFinite(parsed)) {\n errors.push(\n `Option --${kebab(declared.name)} expects a number, but got ` +\n `${JSON.stringify(value)}.`,\n );\n options[declared.name] = undefined;\n } else {\n options[declared.name] = parsed;\n }\n continue;\n }\n\n options[declared.name] = value;\n }\n\n /**\n * A `--help` refused as a value is not a request for help.\n *\n * `gemi run notify --message --help` has two readings and no way to tell them\n * apart: the operator wanted the usage, or they wanted to send the literal\n * text `--help` and the shell ate their quotes. Answering either one silently\n * is how the reviewer's case goes wrong — showing usage and exiting 0 means\n * the notification was never sent and the wrapper waiting on the status\n * records a success.\n *\n * So the ambiguity is reported instead. `needsValue` has already written the\n * sentence naming both readings and the fix (`--message=--help`), and\n * suppressing the help request here is what lets the operator see it rather\n * than a usage screen with no explanation.\n *\n * Help still wins over an ordinary usage error — `gemi run deploy --help`\n * with `<env>` missing prints the usage, because that is the invocation\n * somebody reaches for `--help` on.\n */\n const help = requested && !ambiguous;\n\n if (errors.length > 0) return { ok: false, help, errors };\n return { ok: true, help, args, options };\n}\n",
|
|
8
|
-
"import type { CommandClass } from \"./Command\";\nimport { kebab } from \"./parse\";\n\n/**\n * Everything `gemi run` prints when it is not running a command.\n *\n * Rendered from the same statics `parse.ts` reads, so the help cannot describe a\n * flag the parser does not accept. That is the only reason this is not a set of\n * template literals next to the code that needs them.\n */\n\nfunction pad(entries: Array<[string, string]>, indent = \" \"): string[] {\n const width = entries.reduce((max, [left]) => Math.max(max, left.length), 0);\n return entries.map(([left, right]) =>\n right === \"\"\n ? `${indent}${left}`\n : `${indent}${left.padEnd(width)} ${right}`,\n );\n}\n\nfunction argSlot(arg: {\n name: string;\n required?: boolean;\n variadic?: boolean;\n}): string {\n const inner = arg.variadic ? `${arg.name}...` : arg.name;\n return arg.required ? `<${inner}>` : `[${inner}]`;\n}\n\n/**\n * The `--help` line, listed only in the spellings the command left free.\n *\n * `parse.ts` yields `--help` to a command that declares an option called `help`\n * and `-h` to one that declares that alias, independently. Printing an\n * unconditional `-h, --help` meant a command with a `-h, --host` was shown two\n * contradictory `-h` entries, one of which did nothing — help that lies about\n * the parser is worse than no help line at all.\n */\nfunction helpEntry(command: CommandClass): Array<[string, string]> {\n const claimed = (\n predicate: (option: CommandClass[\"options\"][number]) => boolean,\n ) => command.options.some(predicate);\n\n const longTaken = claimed(\n (option) => option.name === \"help\" || kebab(option.name) === \"help\",\n );\n const shortTaken = claimed(\n (option) => \"alias\" in option && option.alias === \"h\",\n );\n\n if (longTaken && shortTaken) return [];\n if (longTaken) return [[\"-h\", \"Show this message\"]];\n\n return [[`${shortTaken ? \"\" : \"-h, \"}--help`, \"Show this message\"]];\n}\n\nexport function renderUsage(command: CommandClass): string {\n const lines: string[] = [];\n\n const slots = command.args.map(argSlot).join(\" \");\n const usage = [\n \"gemi run\",\n command.commandName,\n command.options.length > 0 ? \"[options]\" : \"\",\n slots,\n ]\n .filter(Boolean)\n .join(\" \");\n\n lines.push(`Usage: ${usage}`);\n\n if (command.description) {\n lines.push(\"\", command.description);\n }\n\n if (command.args.length > 0) {\n lines.push(\"\", \"Arguments:\");\n lines.push(\n ...pad(\n command.args.map((arg) => {\n const notes = [\n arg.description ?? \"\",\n arg.default !== undefined\n ? `(default: ${JSON.stringify(arg.default)})`\n : \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n return [argSlot(arg), notes] as [string, string];\n }),\n ),\n );\n }\n\n lines.push(\"\", \"Options:\");\n lines.push(\n ...pad([\n ...command.options.map((option) => {\n const alias =\n \"alias\" in option && option.alias ? `-${option.alias}, ` : \"\";\n const value = option.type === \"boolean\" ? \"\" : ` <${option.type}>`;\n const notes = [\n option.description ?? \"\",\n option.default !== undefined\n ? `(default: ${JSON.stringify(option.default)})`\n : \"\",\n \"required\" in option && option.required ? \"(required)\" : \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n return [`${alias}--${kebab(option.name)}${value}`, notes] as [\n string,\n string,\n ];\n }),\n ...helpEntry(command),\n ]),\n );\n\n return lines.join(\"\\n\");\n}\n\nexport function renderList(\n commands: CommandClass[],\n source: { declared: boolean; dir: string },\n): string {\n const heading = source.declared\n ? `${commands.length} command${commands.length === 1 ? \"\" : \"s\"} declared in app/config/command.ts:`\n : `Commands in ${source.dir}:`;\n\n if (commands.length === 0) {\n return source.declared\n ? `app/config/command.ts declares no commands.\\n\\n` +\n `Remove the \\`commands\\` key from that slice to discover the classes ` +\n `under ${source.dir} instead — a declared list wins, and an empty one ` +\n `means \"none, and I mean it\".`\n : `No commands found in ${source.dir}.\\n\\n` +\n `A command is registered by existing: write a file there that exports ` +\n `a \\`defineCommand(...).handle(...)\\` chain and it will appear here.`;\n }\n\n const sorted = [...commands].sort((a, b) =>\n a.commandName < b.commandName ? -1 : a.commandName > b.commandName ? 1 : 0,\n );\n\n return [\n heading,\n \"\",\n ...pad(\n sorted.map(\n (command) =>\n [command.commandName, command.description] as [string, string],\n ),\n ),\n \"\",\n \"Run one with `gemi run <name>`, and see its arguments with \" +\n \"`gemi run <name> --help`.\",\n ].join(\"\\n\");\n}\n",
|
|
9
|
+
"import type { CommandClass } from \"./Command\";\nimport { kebab } from \"./parse\";\n\n/**\n * Everything `gemi run` prints when it is not running a command.\n *\n * Rendered from the same statics `parse.ts` reads, so the help cannot describe a\n * flag the parser does not accept. That is the only reason this is not a set of\n * template literals next to the code that needs them.\n */\n\nfunction pad(entries: Array<[string, string]>, indent = \" \"): string[] {\n const width = entries.reduce((max, [left]) => Math.max(max, left.length), 0);\n return entries.map(([left, right]) =>\n right === \"\"\n ? `${indent}${left}`\n : `${indent}${left.padEnd(width)} ${right}`,\n );\n}\n\nfunction argSlot(arg: {\n name: string;\n required?: boolean;\n variadic?: boolean;\n}): string {\n const inner = arg.variadic ? `${arg.name}...` : arg.name;\n return arg.required ? `<${inner}>` : `[${inner}]`;\n}\n\n/**\n * The `--help` line, listed only in the spellings the command left free.\n *\n * `parse.ts` yields `--help` to a command that declares an option called `help`\n * and `-h` to one that declares that alias, independently. Printing an\n * unconditional `-h, --help` meant a command with a `-h, --host` was shown two\n * contradictory `-h` entries, one of which did nothing — help that lies about\n * the parser is worse than no help line at all.\n */\nfunction helpEntry(command: CommandClass): Array<[string, string]> {\n const claimed = (\n predicate: (option: CommandClass[\"options\"][number]) => boolean,\n ) => command.options.some(predicate);\n\n const longTaken = claimed(\n (option) => option.name === \"help\" || kebab(option.name) === \"help\",\n );\n const shortTaken = claimed(\n (option) => \"alias\" in option && option.alias === \"h\",\n );\n\n if (longTaken && shortTaken) return [];\n if (longTaken) return [[\"-h\", \"Show this message\"]];\n\n return [[`${shortTaken ? \"\" : \"-h, \"}--help`, \"Show this message\"]];\n}\n\nexport function renderUsage(command: CommandClass): string {\n const lines: string[] = [];\n\n const slots = command.args.map(argSlot).join(\" \");\n const usage = [\n \"gemi run\",\n command.commandName,\n command.options.length > 0 ? \"[options]\" : \"\",\n slots,\n ]\n .filter(Boolean)\n .join(\" \");\n\n lines.push(`Usage: ${usage}`);\n\n if (command.description) {\n lines.push(\"\", command.description);\n }\n\n if (command.args.length > 0) {\n lines.push(\"\", \"Arguments:\");\n lines.push(\n ...pad(\n command.args.map((arg) => {\n const notes = [\n arg.description ?? \"\",\n arg.default !== undefined\n ? `(default: ${JSON.stringify(arg.default)})`\n : \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n return [argSlot(arg), notes] as [string, string];\n }),\n ),\n );\n }\n\n lines.push(\"\", \"Options:\");\n lines.push(\n ...pad([\n ...command.options.map((option) => {\n const alias =\n \"alias\" in option && option.alias ? `-${option.alias}, ` : \"\";\n const value = option.type === \"boolean\" ? \"\" : ` <${option.type}>`;\n const notes = [\n option.description ?? \"\",\n option.default !== undefined\n ? `(default: ${JSON.stringify(option.default)})`\n : \"\",\n \"required\" in option && option.required ? \"(required)\" : \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n return [`${alias}--${kebab(option.name)}${value}`, notes] as [\n string,\n string,\n ];\n }),\n ...helpEntry(command),\n ]),\n );\n\n return lines.join(\"\\n\");\n}\n\n/** The framework's own commands, listed under the app's. */\nexport function renderBuiltins(commands: CommandClass[]): string {\n return [\n \"Provided by gemi:\",\n \"\",\n ...pad(\n commands.map(\n (command) => [command.commandName, command.description] as [string, string],\n ),\n ),\n ].join(\"\\n\");\n}\n\nexport function renderList(\n commands: CommandClass[],\n source: { declared: boolean; dir: string },\n): string {\n const heading = source.declared\n ? `${commands.length} command${commands.length === 1 ? \"\" : \"s\"} declared in app/config/command.ts:`\n : `Commands in ${source.dir}:`;\n\n if (commands.length === 0) {\n return source.declared\n ? `app/config/command.ts declares no commands.\\n\\n` +\n `Remove the \\`commands\\` key from that slice to discover the classes ` +\n `under ${source.dir} instead — a declared list wins, and an empty one ` +\n `means \"none, and I mean it\".`\n : `No commands found in ${source.dir}.\\n\\n` +\n `A command is registered by existing: write a file there that exports ` +\n `a \\`defineCommand(...).handle(...)\\` chain and it will appear here.`;\n }\n\n const sorted = [...commands].sort((a, b) =>\n a.commandName < b.commandName ? -1 : a.commandName > b.commandName ? 1 : 0,\n );\n\n return [\n heading,\n \"\",\n ...pad(\n sorted.map(\n (command) =>\n [command.commandName, command.description] as [string, string],\n ),\n ),\n \"\",\n \"Run one with `gemi run <name>`, and see its arguments with \" +\n \"`gemi run <name> --help`.\",\n ].join(\"\\n\");\n}\n",
|
|
9
10
|
"/**\n * The entry point `gemi run` spawns.\n *\n * Exposed through the exports map as `gemi/console/run` and resolved by the CLI\n * out of the *application's* `node_modules`, the same way `dev` and `start`\n * resolve `gemi/bun/preload`. That indirection is the point: the runner has to\n * be the application's copy of gemi, not the one bundled into `dist/bin/gemi.js`\n * — see the note at the top of `runner.ts`.\n *\n * Nothing but argv handling lives here, so that everything worth testing lives\n * in `runConsole`, which returns an exit code instead of taking one.\n */\nimport { processWriters } from \"./context\";\nimport { runConsole } from \"./runner\";\n\n// The tail is forwarded exactly as commander handed it over, `--` and all.\n// commander passes a `--` through as a literal operand (verified: `gemi run x --\n// --weird` arrives as `[\"--\", \"--weird\"]`), and `parse.ts` already treats a `--`\n// as \"everything after this is positional\". Stripping it here — which an earlier\n// draft did — consumed the escape hatch before the only thing that reads it,\n// leaving `-- --weird` reported as an unknown option and `-- --` the only way to\n// pass a flag-shaped value.\nconst [name, ...argv] = process.argv.slice(2);\n\nconst writers = processWriters();\n\n// `.then` rather than a top-level `await`, so this file typechecks under the\n// package's inherited `module: NodeNext` — the same TS1309 that keeps `bun/` out\n// of tsconfig.json's `include`. Bun runs it as ESM either way; this just avoids\n// buying a nested tsconfig for two lines.\nrunConsole({ rootDir: process.cwd(), name, argv, writers }).then(\n async (code) => {\n // Everything written has to reach the OS before the exit below discards it —\n // see `processWriters` for what that costs when it is skipped.\n await writers.flush();\n\n // Explicit, and not belt-and-braces. `kernel.destroy()` stops the scheduler,\n // but an open database pool, a Redis client or an unref'd timer will happily\n // hold the loop open after the work is done — a command that finishes and then\n // sits there, which is the failure `kernel/exit.test.ts` exists for and the\n // one `orm/context.test.ts` names by example.\n process.exit(code);\n },\n);\n"
|
|
10
11
|
],
|
|
11
|
-
"mappings": ";igBA+FO,IAAS,JAAc,HAAmB,JAG/C,DAAI,HAAwB,GAAQ,GAAQ,HACxC,HAAwB,GAAQ,GAAQ,EAEtC,EAAQ,CAAC,EAA4B,IACzC,IAAI,QAAQ,CAAC,IAAY,CAIvB,EAAO,MAAM,EAAO,IAAM,EAAQ,CAAC,EACpC,EAEH,MAAO,CACL,OAAQ,CAAC,IAAU,CACjB,EAAS,EAAM,QAAQ,OAAQ,CAAK,GAEtC,OAAQ,CAAC,IAAU,CACjB,EAAS,EAAM,QAAQ,OAAQ,CAAK,GAEtC,MAAO,SAAY,CACjB,MAAM,QAAQ,IAAI,CAAC,EAAQ,CAAM,CAAC,EAEtC,EAGK,SAAS,CAAmB,CAAC,EAKX,CACvB,IAAM,EAAU,EAAO,SAAW,EAAe,EAEjD,MAAO,CACL,KAAM,EAAO,KACb,QAAS,EAAO,QAChB,KAAM,EAAO,KACb,KAAM,CAAC,EAAU,KAAO,EAAQ,OAAO,GAAG;AAAA,CAAW,EACrD,MAAO,CAAC,IAAoB,EAAQ,OAAO,GA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EV,OAAO,EAGT,IAAM,EAAU,EAAU,YAAY,EAAQ,eAAiB,cAO/D,OALA,EACE,GAAG,KAAW,KAAU,KAAK,UAAU,CAAM,2BAC3C,4EACA,UACJ,EACO,EI7PT,IAAO,MAAS,IAAQ,QAAQ,KAAK,MAAM,CAAC,EAEtC,GAAU,EAAe,EAM/B,EAAW,CAAE,QAAS,QAAQ,IAAI,EAAG,QAAM,QAAM,UAAQ,CAAC,EAAE,KAC1D,MAAO,IAAS,CAGd,MAAM,GAAQ,MAAM,EAOpB,QAAQ,KAAK,CAAI,EAErB",
|
|
13
|
+
"debugId": "9A49AA99B703ACD364756E2164756E21",
|
|
13
14
|
"names": []
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../console/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../console/runner.ts"],"names":[],"mappings":"AAUA,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4J1E"}
|
package/dist/console/usage.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { CommandClass } from "./Command";
|
|
2
2
|
export declare function renderUsage(command: CommandClass): string;
|
|
3
|
+
/** The framework's own commands, listed under the app's. */
|
|
4
|
+
export declare function renderBuiltins(commands: CommandClass[]): string;
|
|
3
5
|
export declare function renderList(commands: CommandClass[], source: {
|
|
4
6
|
declared: boolean;
|
|
5
7
|
dir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../console/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAwD9C,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAgEzD;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,YAAY,EAAE,EACxB,MAAM,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAiCR"}
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../console/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAwD9C,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAgEzD;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAU/D;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,YAAY,EAAE,EACxB,MAAM,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAiCR"}
|
package/dist/container/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Si as e,Ti as o}from"../chunk-d806cy7p.js";import"../chunk-hm9cjxy2.js";export{o as Container,e as BindingResolutionError};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=FC559FB9A6A6835564756E2164756E21
|
package/dist/database/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ja as N}from"../chunk-xtzn0qfh.js";import"../chunk-30xxc6r7.js";import"../chunk-eke2frrm.js";import"../chunk-9pkj7sk6.js";import"../chunk-gqfqnv3f.js";import{di as j,ei as k,gi as w,hi as x,ii as z,ji as A,ki as E,li as F,mi as G,ni as H,oi as I,pi as J,qi as K,ri as L}from"../chunk-hr1r3g0d.js";import"../chunk-hm9cjxy2.js";export{A as isSqlite,E as isMysqlFamily,z as inferDialect,j as defineDatabaseConfig,k as databaseConfigDefaults,w as UnknownDatabaseUrlError,H as UnknownConnectionError,I as ReservedConnectionNameError,x as MissingDatabaseUrlError,N as DatabaseServiceProvider,L as DatabaseManager,G as DEFAULT_CONNECTION,J as CrossConnectionTransactionError,K as Connection,F as AmbiguousSqlitePathError};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=C6C9BBD28456301264756E2164756E21
|
package/dist/email/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Gi as qS,Hi as JS}from"../chunk-cvfg88cx.js";import{Ni as $S}from"../chunk-z759yah5.js";import{Ri as P}from"../chunk-g5ppst76.js";import"../chunk-d806cy7p.js";import"../chunk-hm9cjxy2.js";import{render as s}from"jsx-email";import B from"process";import{Buffer as n}from"buffer";import r from"path";import{fileURLToPath as PS}from"url";import{promisify as yS}from"util";import o from"child_process";import wS,{constants as fS}from"fs/promises";import h from"process";import l,{constants as zS}from"fs/promises";import g from"process";import NS from"os";import W from"fs";import RS from"fs";import b from"fs";var F;function HS(){try{return b.statSync("/.dockerenv"),!0}catch{return!1}}function XS(){try{return b.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function L(){if(F===void 0)F=HS()||XS();return F}var O,US=()=>{try{return RS.statSync("/run/.containerenv"),!0}catch{return!1}};function R(){if(O===void 0)O=US()||L();return O}var u=()=>{if(g.platform!=="linux")return!1;if(NS.release().toLowerCase().includes("microsoft")){if(R())return!1;return!0}try{if(W.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!R()}catch{}if(W.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||W.existsSync("/run/WSL"))return!R();return!1},H=g.env.__IS_WSL_TEST__?u:u();var ES=(()=>{let S;return async function(){if(S)return S;let q="/etc/wsl.conf",J=!1;try{await l.access(q,zS.F_OK),J=!0}catch{}if(!J)return"/mnt/";let K=await l.readFile(q,{encoding:"utf8"}),Q=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(K);if(!Q)return"/mnt/";return S=Q.groups.mountPoint.trim(),S=S.endsWith("/")?S:`${S}/`,S}})(),MS=async()=>{return`${await ES()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},v=async()=>{if(H)return MS();return`${h.env.SYSTEMROOT||h.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`};function X($,S,q){let J=(K)=>Object.defineProperty($,S,{value:K,enumerable:!0,writable:!0});return Object.defineProperty($,S,{configurable:!0,enumerable:!0,get(){let K=q();return J(K),K},set(K){J(K)}}),$}import{promisify as jS}from"util";import j from"process";import{execFile as xS}from"child_process";import{promisify as _S}from"util";import kS from"process";import{execFile as DS}from"child_process";var FS=_S(DS);async function T(){if(kS.platform!=="darwin")throw Error("macOS only");let{stdout:$}=await FS("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),q=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec($)?.groups.id??"com.apple.Safari";if(q==="com.apple.safari")return"com.apple.Safari";return q}import LS from"process";import{promisify as OS}from"util";import{execFile as WS,execFileSync as H0}from"child_process";var vS=OS(WS);async function m($,{humanReadableOutput:S=!0,signal:q}={}){if(LS.platform!=="darwin")throw Error("macOS only");let J=S?[]:["-ss"],K={};if(q)K.signal=q;let{stdout:Q}=await vS("osascript",["-e",$,J],K);return Q.trim()}async function C($){return m(`tell application "Finder" to set app_path to application file id "${$}" as string
|
|
3
3
|
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as TS}from"util";import{execFile as CS}from"child_process";var IS=TS(CS),_={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},E0=new Map(Object.entries(_));class c extends Error{}async function I($=IS){let{stdout:S}=await $("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),q=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(S);if(!q)throw new c(`Cannot find Windows browser in stdout: ${JSON.stringify(S)}`);let{id:J}=q.groups,K=J.lastIndexOf("."),Q=J.lastIndexOf("-"),Z=K===-1?void 0:J.slice(0,K),V=Q===-1?void 0:J.slice(0,Q);return _[J]??_[Z]??_[V]??{name:J,id:J}}var BS=jS(xS),AS=($)=>$.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(S)=>S.toUpperCase());async function x(){if(j.platform==="darwin"){let $=await T();return{name:await C($),id:$}}if(j.platform==="linux"){let{stdout:$}=await BS("xdg-mime",["query","default","x-scheme-handler/http"]),S=$.trim();return{name:AS(S.replace(/.desktop$/,"").replace("-"," ")),id:S}}if(j.platform==="win32")return I();throw Error("Only macOS, Linux, and Windows are supported")}var bS=yS(o.execFile),A=r.dirname(PS(import.meta.url)),d=r.join(A,"xdg-open"),{platform:N,arch:p}=B;async function uS(){let $=await v(),S=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,q=n.from(S,"utf16le").toString("base64"),{stdout:J}=await bS($,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",q],{encoding:"utf8"}),K=J.trim(),Q={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return Q[K]?{id:Q[K]}:{}}var t=async($,S)=>{let q;for(let J of $)try{return await S(J)}catch(K){q=K}throw q},k=async($)=>{if($={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...$},Array.isArray($.app))return t($.app,(V)=>k({...$,app:V}));let{name:S,arguments:q=[]}=$.app??{};if(q=[...q],Array.isArray(S))return t(S,(V)=>k({...$,app:{name:V,arguments:q}}));if(S==="browser"||S==="browserPrivate"){let V={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},Y={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},G=H?await uS():await x();if(G.id in V){let z=V[G.id];if(S==="browserPrivate")q.push(Y[z]);return k({...$,app:{name:U[z],arguments:q}})}throw Error(`${G.name} is not supported as a default browser`)}let J,K=[],Q={};if(N==="darwin"){if(J="open",$.wait)K.push("--wait-apps");if($.background)K.push("--background");if($.newInstance)K.push("--new");if(S)K.push("-a",S)}else if(N==="win32"||H&&!R()&&!S){if(J=await v(),K.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),!H)Q.windowsVerbatimArguments=!0;let V=["Start"];if($.wait)V.push("-Wait");if(S){if(V.push(`"\`"${S}\`""`),$.target)q.push($.target)}else if($.target)V.push(`"${$.target}"`);if(q.length>0)q=q.map((Y)=>`"\`"${Y}\`""`),V.push("-ArgumentList",q.join(","));$.target=n.from(V.join(" "),"utf16le").toString("base64")}else{if(S)J=S;else{let V=!A||A==="/",Y=!1;try{await wS.access(d,fS.X_OK),Y=!0}catch{}J=B.versions.electron??(N==="android"||V||!Y)?"xdg-open":d}if(q.length>0)K.push(...q);if(!$.wait)Q.stdio="ignore",Q.detached=!0}if(N==="darwin"&&q.length>0)K.push("--args",...q);if($.target)K.push($.target);let Z=o.spawn(J,K,Q);if($.wait)return new Promise((V,Y)=>{Z.once("error",Y),Z.once("close",(G)=>{if(!$.allowNonzeroExitCode&&G>0){Y(Error(`Exited with code ${G}`));return}V(Z)})});return Z.unref(),Z},gS=($,S)=>{if(typeof $!=="string")throw TypeError("Expected a `target`");return k({...S,target:$})};function i($){if(typeof $==="string"||Array.isArray($))return $;let{[p]:S}=$;if(!S)throw Error(`${p} is not supported`);return S}function D({[N]:$},{wsl:S}){if(S&&H)return i(S);if(!$)throw Error(`${N} is not supported`);return i($)}var U={};X(U,"chrome",()=>D({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));X(U,"brave",()=>D({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));X(U,"firefox",()=>D({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));X(U,"edge",()=>D({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));X(U,"browser",()=>"browser");X(U,"browserPrivate",()=>"browserPrivate");var a=gS;function hS($){return Array.from($,(S)=>{let q=S.charCodeAt(0);return S==="/"||S==="\\"||q<32||q===127?"_":S}).join("")}async function e($,S,q={}){let J=`${$}/${new Date().toISOString()}${hS(S.subject)}`,K={to:S.to,cc:S.cc,bcc:S.bcc,from:S.from,subject:S.subject,headers:S.headers??{},attachments:S.attachments.map((Q)=>({filename:Q.filename,bytes:Buffer.byteLength(Q.content)})),scheduledAt:S.scheduledAt??null,idempotencyKey:S.idempotencyKey??null,locale:q.locale??null,text:S.text??null};return await Bun.write(`${J}.json`,`${JSON.stringify(K,null,2)}
|
|
4
4
|
`),await Bun.write(`${J}.html`,S.html),`${J}.html`}import{jsx as SS}from"react/jsx-runtime";class KS{from="";to=[];subject="No Subject";cc=[];bcc=[];attachments=[];template;headers={};static async send($){let S=new this,q=P($S).defaultLocale,J=P(JS),{to:K=S.to,from:Q=S.from,subject:Z=typeof S.subject==="string"?S.subject:S.subject[$.locale||q],cc:V=S.cc,bcc:Y=S.bcc,attachments:G=S.attachments,data:z,headers:QS={}}=$,VS={...J.headers??{},...S.headers??{},...QS??{}},y=process.env.EMAIL_DEBUG==="true",E=y?"debug":J.driver?.provider??"custom",w=await J.filterRecipients(K);if(!w.length)return{id:null,provider:E,status:"skipped"};let[YS,ZS]=await Promise.all([S.render({...z,locale:$.locale}),S.renderText({...z,locale:$.locale})]),f={bcc:Y,cc:V,from:Q,subject:Z,to:w,attachments:G,html:YS,headers:VS,text:ZS,scheduledAt:$.scheduledAt,idempotencyKey:$.idempotencyKey};if(y){let GS=await e(`${process.env.ROOT_DIR}/.debug/emails`,f,{locale:$.locale});if(process.env.CI!=="true")await a(GS);return{id:`debug_${crypto.randomUUID()}`,provider:E,status:"debug"}}let M=await qS(J,f);return M.ok?{id:M.id,provider:E,status:"sent"}:{id:M.id,provider:E,status:"failed",error:M.error}}static async preview($){return await new this().render({...$.data,locale:$.locale})}async render($){let S=this.template;return await s(SS(S,{...$}))}async renderText($){let S=this.template;return await s(SS(S,{...$}),{plainText:!0})}}export{KS as Email};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=4BB201AFFC6B362864756E2164756E21
|
package/dist/email/index.js.map
CHANGED
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"import type { SendEmailParams } from \"../services/email/drivers/types\";\n\n/**\n * What `EMAIL_DEBUG=true` records about a send, next to the rendered HTML.\n *\n * The HTML alone can't say who a mail went to: plenty of templates render\n * nothing per recipient, so a test asserting \"this action mailed this user\"\n * could match another send with the same subject. The sidecar holds the\n * envelope the driver would have been handed, with `to` already filtered.\n */\nexport interface DebugEmailRecord {\n to: string[];\n cc: string[];\n bcc: string[];\n from: string;\n subject: string;\n headers: Record<string, string>;\n // Attachment bodies are left out: name and size are enough to assert on.\n attachments: Array<{ filename: string; bytes: number }>;\n scheduledAt: string | null;\n idempotencyKey: string | null;\n locale: string | null;\n text: string | null;\n}\n\n/**\n * A subject as a filename fragment. Path separators would write into a\n * subdirectory (or fail), and control characters aren't valid on every\n * filesystem. Everything else is kept, so a reader matching on the subject\n * substring keeps working.\n */\nexport function debugEmailFileSubject(subject: string) {\n return Array.from(subject, (char) => {\n const code = char.charCodeAt(0);\n return char === \"/\" || char === \"\\\\\" || code < 0x20 || code === 0x7f ? \"_\" : char;\n }).join(\"\");\n}\n\n/**\n * Writes `<dir>/<iso><subject>.json` and then `<dir>/<iso><subject>.html`, and\n * returns the HTML path. The sidecar goes first so a reader that sees the HTML\n * can rely on its envelope being there.\n */\nexport async function writeDebugEmail(\n dir: string,\n params: SendEmailParams,\n options: { locale?: string } = {},\n) {\n const base = `${dir}/${new Date().toISOString()}${debugEmailFileSubject(params.subject)}`;\n\n const record: DebugEmailRecord = {\n to: params.to,\n cc: params.cc,\n bcc: params.bcc,\n from: params.from,\n subject: params.subject,\n headers: params.headers ?? {},\n attachments: params.attachments.map((attachment) => ({\n filename: attachment.filename,\n bytes: Buffer.byteLength(attachment.content),\n })),\n scheduledAt: params.scheduledAt ?? null,\n idempotencyKey: params.idempotencyKey ?? null,\n locale: options.locale ?? null,\n text: params.text ?? null,\n };\n\n await Bun.write(`${base}.json`, `${JSON.stringify(record, null, 2)}\\n`);\n await Bun.write(`${base}.html`, params.html);\n\n return `${base}.html`;\n}\n"
|
|
18
18
|
],
|
|
19
19
|
"mappings": ";uNACA,YAAS,aCDT,kBACA,YAAQ,eACR,oBACA,wBAAQ,aACR,oBAAQ,cACR,6BACA,wBAAY,qBCNZ,uBACA,uBAAY,qBCDZ,uBACA,mBACA,kBCFA,mBCAA,kBAEA,IAAI,EAEJ,SAAS,EAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,EAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,GAAa,GAAK,GAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,GAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,GAAG,SA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U,OAAQ,SAAU,MAAO,EAAO,KAAM,cAG1D,QAAwB,CAEnC,EACA,CAIA,OAAO,MAFU,IAAI,KAAK,EAEJ,OAAO,IACxB,EAAK,KACR,OAAQ,EAAK,MACf,CAAC,OAGa,OAAqC,CAAC,EAAU,CAC9D,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,GAAC,EAAD,IAAc,EAAO,CAAE,OAG7B,WAAyC,CAAC,EAAU,CAClE,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,GAAC,EAAD,IAAc,EAAO,EAAI,CAAE,UAAW,EAAK,CAAC,EAEpE",
|
|
20
|
-
"debugId": "
|
|
20
|
+
"debugId": "4BB201AFFC6B362864756E2164756E21",
|
|
21
21
|
"names": []
|
|
22
22
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OAuthTokenSet } from "../auth/connections/OAuthConnectionProvider";
|
|
2
|
+
import { type ConnectionOwner, ConnectionManager, type FakeConnectionHandler, type ProviderConnection } from "../auth/connections/ConnectionManager";
|
|
3
|
+
import { Facade } from "./Facade";
|
|
4
|
+
/**
|
|
5
|
+
* The OAuth connections users have made to providers in `auth.connections`,
|
|
6
|
+
* for calling those providers' APIs on their behalf:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* const figma = await Connections.for(user, "figma"); // null when not connected
|
|
10
|
+
* const res = await figma.fetch(`/v1/files/${key}`); // bearer token, refresh, one retry on 401
|
|
11
|
+
* await figma.revoke();
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Send a user to `/auth/connections/figma` to connect.
|
|
15
|
+
*/
|
|
16
|
+
export declare class Connections extends Facade {
|
|
17
|
+
static getFacadeAccessor(): typeof ConnectionManager;
|
|
18
|
+
/** The user's connection to `provider`, or `null`. */
|
|
19
|
+
static for(user: ConnectionOwner, provider: string): Promise<ProviderConnection | null>;
|
|
20
|
+
/** Every connection the user has. */
|
|
21
|
+
static list(user: ConnectionOwner): Promise<ProviderConnection[]>;
|
|
22
|
+
/** Stores tokens for the user (replacing an earlier connection to the provider). */
|
|
23
|
+
static save(user: ConnectionOwner, provider: string, tokens: Partial<OAuthTokenSet> & {
|
|
24
|
+
accessToken: string;
|
|
25
|
+
}): Promise<ProviderConnection>;
|
|
26
|
+
/**
|
|
27
|
+
* For tests: connections in memory, and each provider's API answered by
|
|
28
|
+
* `handlers[provider]`. No token or revocation endpoint is called. Seed one
|
|
29
|
+
* with `Connections.save(user, "figma", { accessToken: "test" })`; read what
|
|
30
|
+
* was sent from `Connections.fake(...).fakeRequests`. Undo with `restore()`.
|
|
31
|
+
*/
|
|
32
|
+
static fake(handlers?: Record<string, FakeConnectionHandler>): ConnectionManager;
|
|
33
|
+
/** Undoes `fake`. */
|
|
34
|
+
static restore(): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=Connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Connections.d.ts","sourceRoot":"","sources":["../../facades/Connections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EACL,KAAK,eAAe,EACpB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,qBAAa,WAAY,SAAQ,MAAM;IACrC,MAAM,CAAC,iBAAiB;IAIxB,sDAAsD;IACtD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAIvF,qCAAqC;IACrC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAIjE,oFAAoF;IACpF,MAAM,CAAC,IAAI,CACT,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GACvD,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAM,GAAG,iBAAiB;IAIpF,qBAAqB;IACrB,MAAM,CAAC,OAAO,IAAI,IAAI;CAGvB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Encrypter } from "../services/encryption/Encrypter";
|
|
2
|
+
import { Facade } from "./Facade";
|
|
3
|
+
/**
|
|
4
|
+
* Encrypts and decrypts strings with the app's encryption keys
|
|
5
|
+
* (`app/config/encryption.ts`) — the same keys and envelope as encrypted
|
|
6
|
+
* columns, for a secret that is not a column: a value in a JSON blob, a token
|
|
7
|
+
* in a queued job's payload, a file.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const sealed = Crypt.encrypt(apiKey); // "v1:k1:…"
|
|
11
|
+
* const apiKey = Crypt.decrypt(sealed);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* `decrypt` throws `DecryptionError` for anything it cannot authenticate;
|
|
15
|
+
* it never returns its input.
|
|
16
|
+
*/
|
|
17
|
+
export declare class Crypt extends Facade {
|
|
18
|
+
static getFacadeAccessor(): typeof Encrypter;
|
|
19
|
+
/** `plaintext`, encrypted under the current key. */
|
|
20
|
+
static encrypt(plaintext: string): string;
|
|
21
|
+
/** The plaintext of a value `encrypt` produced, under any configured key. */
|
|
22
|
+
static decrypt(value: string): string;
|
|
23
|
+
/** Whether `value` is under an older key (or not encrypted at all). */
|
|
24
|
+
static needsReencryption(value: string): boolean;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Crypt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Crypt.d.ts","sourceRoot":"","sources":["../../facades/Crypt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAM,SAAQ,MAAM;IAC/B,MAAM,CAAC,iBAAiB;IAIxB,oDAAoD;IACpD,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAIzC,6EAA6E;IAC7E,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIrC,uEAAuE;IACvE,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGjD"}
|
package/dist/facades/Meta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AlternateLink, HtmlAttributes, OpenGraphParams } from "../http/Metadata";
|
|
1
|
+
import type { AlternateLink, HtmlAttributes, MetaFont, OpenGraphParams } from "../http/Metadata";
|
|
2
2
|
export declare class Meta {
|
|
3
3
|
protected name: string;
|
|
4
4
|
static description(description: string): void;
|
|
@@ -14,5 +14,11 @@ export declare class Meta {
|
|
|
14
14
|
static canonical(url: string): void;
|
|
15
15
|
/** `<link rel="alternate" hreflang>` for each language this page exists in, rendered by `<Head />`. */
|
|
16
16
|
static alternates(links: AlternateLink[]): void;
|
|
17
|
+
/**
|
|
18
|
+
* `@font-face` rules for this response, and a `<link rel="preload" as="font">`
|
|
19
|
+
* for each font marked `preload`; `<Head />` renders both. Calls add up.
|
|
20
|
+
* Throws a `TypeError` for a descriptor that isn't a valid CSS value.
|
|
21
|
+
*/
|
|
22
|
+
static fonts(fonts: MetaFont[]): void;
|
|
17
23
|
}
|
|
18
24
|
//# sourceMappingURL=Meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../../facades/Meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../../facades/Meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGjG,qBAAa,IAAI;IACf,SAAS,CAAC,IAAI,SAAU;IACxB,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM;IAGtC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM;IAG1B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe;IAGxC;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc;IAGhD,wDAAwD;IACxD,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM;IAG5B,uGAAuG;IACvG,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE;IAGxC;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE;CAG/B"}
|