@geekmidas/cli 10.0.0-alpha.1 → 10.0.0-alpha.100
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/README.md +326 -421
- package/bin/adjacent-tsconfig.mjs +97 -0
- package/bin/gkm.mjs +16 -2
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-Br97xgs_.mjs +1031 -0
- package/dist/EndpointGenerator-Br97xgs_.mjs.map +1 -0
- package/dist/EndpointGenerator-By5_tYE9.cjs +1090 -0
- package/dist/EndpointGenerator-By5_tYE9.cjs.map +1 -0
- package/dist/GoDaddyProvider-CVnzcWX5.mjs +388 -0
- package/dist/GoDaddyProvider-CVnzcWX5.mjs.map +1 -0
- package/dist/GoDaddyProvider-DS4Wgu0c.cjs +388 -0
- package/dist/GoDaddyProvider-DS4Wgu0c.cjs.map +1 -0
- package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
- package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
- package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
- package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
- package/dist/LegacyStateStore-C2Xlqy4v.mjs +124 -0
- package/dist/LegacyStateStore-C2Xlqy4v.mjs.map +1 -0
- package/dist/LegacyStateStore-CoHPQMLO.cjs +124 -0
- package/dist/LegacyStateStore-CoHPQMLO.cjs.map +1 -0
- package/dist/LocalStateStore-BGDzf2f8.cjs +178 -0
- package/dist/LocalStateStore-BGDzf2f8.cjs.map +1 -0
- package/dist/LocalStateStore-By59pUve.mjs +167 -0
- package/dist/LocalStateStore-By59pUve.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs +541 -0
- package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-C8aTX--y.mjs +536 -0
- package/dist/OpenApiTsGenerator-C8aTX--y.mjs.map +1 -0
- package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
- package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
- package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
- package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
- package/dist/S3StateStore-CU485pYn.mjs +223 -0
- package/dist/S3StateStore-CU485pYn.mjs.map +1 -0
- package/dist/S3StateStore-Re4LfDTl.cjs +222 -0
- package/dist/S3StateStore-Re4LfDTl.cjs.map +1 -0
- package/dist/SSMStateStore-BquRBbUG.mjs +205 -0
- package/dist/SSMStateStore-BquRBbUG.mjs.map +1 -0
- package/dist/SSMStateStore-CLX4Dm5d.cjs +204 -0
- package/dist/SSMStateStore-CLX4Dm5d.cjs.map +1 -0
- package/dist/SubscriberGenerator-1-IsjIwF.mjs +449 -0
- package/dist/SubscriberGenerator-1-IsjIwF.mjs.map +1 -0
- package/dist/SubscriberGenerator-BlIOdbi-.cjs +490 -0
- package/dist/SubscriberGenerator-BlIOdbi-.cjs.map +1 -0
- package/dist/add-Blv6Q_YA.mjs +718 -0
- package/dist/add-Blv6Q_YA.mjs.map +1 -0
- package/dist/add-C6RhiCBX.cjs +720 -0
- package/dist/add-C6RhiCBX.cjs.map +1 -0
- package/dist/appPorts-C9z9Pzn9.mjs +223 -0
- package/dist/appPorts-C9z9Pzn9.mjs.map +1 -0
- package/dist/appPorts-Cu79hJF6.cjs +264 -0
- package/dist/appPorts-Cu79hJF6.cjs.map +1 -0
- package/dist/aws-8QQ8n-t6.mjs +89 -0
- package/dist/aws-8QQ8n-t6.mjs.map +1 -0
- package/dist/aws-DY9NqQIT.cjs +100 -0
- package/dist/aws-DY9NqQIT.cjs.map +1 -0
- package/dist/awsStore-Bx5nCFnS.mjs +121 -0
- package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
- package/dist/awsStore-u3ehhMoY.cjs +138 -0
- package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
- package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
- package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
- package/dist/backups/runner.cjs +519 -0
- package/dist/backups/runner.cjs.map +1 -0
- package/dist/backups/runner.d.cts +102 -0
- package/dist/backups/runner.d.cts.map +1 -0
- package/dist/backups/runner.d.mts +102 -0
- package/dist/backups/runner.d.mts.map +1 -0
- package/dist/backups/runner.mjs +506 -0
- package/dist/backups/runner.mjs.map +1 -0
- package/dist/{bundler-Be8Zg4Wd.mjs → bundler-Cquc0e8N.mjs} +36 -32
- package/dist/bundler-Cquc0e8N.mjs.map +1 -0
- package/dist/{bundler-BY1OmV1e.cjs → bundler-DAeBIOlG.cjs} +38 -35
- package/dist/bundler-DAeBIOlG.cjs.map +1 -0
- package/dist/cli-DbeqYBTs.cjs +71 -0
- package/dist/cli-DbeqYBTs.cjs.map +1 -0
- package/dist/cli-tWfeiYmO.mjs +71 -0
- package/dist/cli-tWfeiYmO.mjs.map +1 -0
- package/dist/compose-BftbEv0b.mjs +3154 -0
- package/dist/compose-BftbEv0b.mjs.map +1 -0
- package/dist/compose-C_mfrSVH.cjs +3267 -0
- package/dist/compose-C_mfrSVH.cjs.map +1 -0
- package/dist/config-D48erO2j.d.mts +269 -0
- package/dist/config-D48erO2j.d.mts.map +1 -0
- package/dist/config-DHDtsQrB.d.cts +269 -0
- package/dist/config-DHDtsQrB.d.cts.map +1 -0
- package/dist/config.cjs +421 -11
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -120
- package/dist/config.d.mts +4 -120
- package/dist/config.mjs +405 -4
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-DDda4Mmm.cjs +272 -0
- package/dist/credentialSchemas-DDda4Mmm.cjs.map +1 -0
- package/dist/credentialSchemas-DvitraL-.mjs +237 -0
- package/dist/credentialSchemas-DvitraL-.mjs.map +1 -0
- package/dist/credentials-B5N5yKk6.mjs +267 -0
- package/dist/credentials-B5N5yKk6.mjs.map +1 -0
- package/dist/credentials-Zqr3QQYB.cjs +350 -0
- package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
- package/dist/databases-BeGP5eDh.mjs +495 -0
- package/dist/databases-BeGP5eDh.mjs.map +1 -0
- package/dist/databases-DGALFDG3.cjs +598 -0
- package/dist/databases-DGALFDG3.cjs.map +1 -0
- package/dist/define-6poNqm5O.mjs +106 -0
- package/dist/define-6poNqm5O.mjs.map +1 -0
- package/dist/define-crmMcXFS.cjs +153 -0
- package/dist/define-crmMcXFS.cjs.map +1 -0
- package/dist/deploy/public.cjs +212 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +653 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +653 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +145 -0
- package/dist/deploy/public.mjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
- package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
- package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
- package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
- package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
- package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +13 -7
- package/dist/deploy/sniffer-hooks.cjs.map +1 -1
- package/dist/deploy/sniffer-hooks.d.cts +1 -2
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
- package/dist/deploy/sniffer-hooks.d.mts +1 -2
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
- package/dist/deploy/sniffer-hooks.mjs +10 -3
- package/dist/deploy/sniffer-hooks.mjs.map +1 -1
- package/dist/deploy/sniffer-loader.cjs +16 -7
- package/dist/deploy/sniffer-loader.cjs.map +1 -1
- package/dist/deploy/sniffer-loader.d.cts +1 -1
- package/dist/deploy/sniffer-loader.d.mts +1 -1
- package/dist/deploy/sniffer-loader.mjs +14 -3
- package/dist/deploy/sniffer-loader.mjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +11 -11
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +4 -4
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/deploy/sniffer-worker.cjs +15 -6
- package/dist/deploy/sniffer-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-worker.d.cts +1 -3
- package/dist/deploy/sniffer-worker.d.cts.map +1 -1
- package/dist/deploy/sniffer-worker.d.mts +1 -3
- package/dist/deploy/sniffer-worker.d.mts.map +1 -1
- package/dist/deploy/sniffer-worker.mjs +15 -4
- package/dist/deploy/sniffer-worker.mjs.map +1 -1
- package/dist/deploy-BSilGXuR.mjs +2317 -0
- package/dist/deploy-BSilGXuR.mjs.map +1 -0
- package/dist/deploy-CktQpmpU.cjs +2390 -0
- package/dist/deploy-CktQpmpU.cjs.map +1 -0
- package/dist/derive-B4vDpzgP.mjs +150 -0
- package/dist/derive-B4vDpzgP.mjs.map +1 -0
- package/dist/derive-DAbo49sm.cjs +161 -0
- package/dist/derive-DAbo49sm.cjs.map +1 -0
- package/dist/discover-BfhVW_kT.cjs +600 -0
- package/dist/discover-BfhVW_kT.cjs.map +1 -0
- package/dist/discover-CvTtV5ZD.d.cts +108 -0
- package/dist/discover-CvTtV5ZD.d.cts.map +1 -0
- package/dist/discover-W2kab9Lc.d.mts +108 -0
- package/dist/discover-W2kab9Lc.d.mts.map +1 -0
- package/dist/discover-kziEht4W.mjs +527 -0
- package/dist/discover-kziEht4W.mjs.map +1 -0
- package/dist/dns-CQZQL3gj.mjs +926 -0
- package/dist/dns-CQZQL3gj.mjs.map +1 -0
- package/dist/dns-KPxvcCdL.cjs +1057 -0
- package/dist/dns-KPxvcCdL.cjs.map +1 -0
- package/dist/dokploy-B7eMa6Pa.cjs +38 -0
- package/dist/dokploy-B7eMa6Pa.cjs.map +1 -0
- package/dist/dokploy-Dguhz3Uo.mjs +38 -0
- package/dist/dokploy-Dguhz3Uo.mjs.map +1 -0
- package/dist/drivers-BLU1fNs_.cjs +200 -0
- package/dist/drivers-BLU1fNs_.cjs.map +1 -0
- package/dist/drivers-C08LL4E8.mjs +177 -0
- package/dist/drivers-C08LL4E8.mjs.map +1 -0
- package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
- package/dist/emit-C1e8qD08.mjs.map +1 -0
- package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
- package/dist/emit-Dmc1nvdS.cjs.map +1 -0
- package/dist/encryption-CixpDF6e.mjs +89 -0
- package/dist/encryption-CixpDF6e.mjs.map +1 -0
- package/dist/encryption-DrhCX7G6.cjs +90 -0
- package/dist/encryption-DrhCX7G6.cjs.map +1 -0
- package/dist/engine-32gL2ju3.mjs +3082 -0
- package/dist/engine-32gL2ju3.mjs.map +1 -0
- package/dist/engine-CQgycl7o.cjs +3195 -0
- package/dist/engine-CQgycl7o.cjs.map +1 -0
- package/dist/errors-D8Gwp5kU.mjs +23 -0
- package/dist/errors-D8Gwp5kU.mjs.map +1 -0
- package/dist/errors-DMC4Umsb.cjs +34 -0
- package/dist/errors-DMC4Umsb.cjs.map +1 -0
- package/dist/github-DYQ5wvod.mjs +829 -0
- package/dist/github-DYQ5wvod.mjs.map +1 -0
- package/dist/github-DkSCUoWS.cjs +829 -0
- package/dist/github-DkSCUoWS.cjs.map +1 -0
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-BThUzEIp.d.mts → index-8OfpOtSI.d.cts} +39 -24
- package/dist/index-8OfpOtSI.d.cts.map +1 -0
- package/dist/{index-CHB4tSzX.d.cts → index-Dpji6Bxq.d.mts} +39 -24
- package/dist/index-Dpji6Bxq.d.mts.map +1 -0
- package/dist/index.cjs +10483 -11859
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +10527 -11915
- package/dist/index.mjs.map +1 -1
- package/dist/local-BwC2v2Y8.mjs +224 -0
- package/dist/local-BwC2v2Y8.mjs.map +1 -0
- package/dist/local-DNhnkugT.cjs +241 -0
- package/dist/local-DNhnkugT.cjs.map +1 -0
- package/dist/migrate-BoJxKbfR.mjs +181 -0
- package/dist/migrate-BoJxKbfR.mjs.map +1 -0
- package/dist/migrate-CJTyeBul.cjs +271 -0
- package/dist/migrate-CJTyeBul.cjs.map +1 -0
- package/dist/migrate-CxmkvMbw.mjs +266 -0
- package/dist/migrate-CxmkvMbw.mjs.map +1 -0
- package/dist/migrate-ISBZNDKU.cjs +181 -0
- package/dist/migrate-ISBZNDKU.cjs.map +1 -0
- package/dist/openapi.cjs +214 -8
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +72 -15
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +72 -15
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
- package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
- package/dist/projectBucket-C_DN4WzF.mjs +222 -0
- package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
- package/dist/provider-BqpjG9QM.cjs +57 -0
- package/dist/provider-BqpjG9QM.cjs.map +1 -0
- package/dist/provider-CEOKk8NS.mjs +46 -0
- package/dist/provider-CEOKk8NS.mjs.map +1 -0
- package/dist/ready-BtxiI7Qb.cjs +403 -0
- package/dist/ready-BtxiI7Qb.cjs.map +1 -0
- package/dist/ready-CzHNHhI6.mjs +374 -0
- package/dist/ready-CzHNHhI6.mjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +11 -87
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +11 -87
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-CFs8C_1a.mjs → reconcile--I7V4Klj.mjs} +4 -7
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-Bei6BMbw.mjs +263 -0
- package/dist/resolve-Bei6BMbw.mjs.map +1 -0
- package/dist/resolve-qm7FrBj_.cjs +316 -0
- package/dist/resolve-qm7FrBj_.cjs.map +1 -0
- package/dist/rollback-BJ3H4kQ8.mjs +136 -0
- package/dist/rollback-BJ3H4kQ8.mjs.map +1 -0
- package/dist/rollback-Bt4xRXtq.cjs +165 -0
- package/dist/rollback-Bt4xRXtq.cjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/run-BJLIerMM.mjs +133 -0
- package/dist/run-BJLIerMM.mjs.map +1 -0
- package/dist/run-fVZ-rLnc.cjs +174 -0
- package/dist/run-fVZ-rLnc.cjs.map +1 -0
- package/dist/runtime-ACdfK59n.d.cts +82 -0
- package/dist/runtime-ACdfK59n.d.cts.map +1 -0
- package/dist/runtime-YyQuekxi.d.mts +82 -0
- package/dist/runtime-YyQuekxi.d.mts.map +1 -0
- package/dist/s3-CrPoA89T.cjs +215 -0
- package/dist/s3-CrPoA89T.cjs.map +1 -0
- package/dist/s3-DQXZdmCM.mjs +215 -0
- package/dist/s3-DQXZdmCM.mjs.map +1 -0
- package/dist/sandbox/config-worker.cjs +43 -0
- package/dist/sandbox/config-worker.cjs.map +1 -0
- package/dist/sandbox/config-worker.d.cts +1 -0
- package/dist/sandbox/config-worker.d.mts +1 -0
- package/dist/sandbox/config-worker.mjs +44 -0
- package/dist/sandbox/config-worker.mjs.map +1 -0
- package/dist/sandbox/credentials-worker.cjs +54 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +47 -0
- package/dist/sandbox/discover-worker.cjs.map +1 -0
- package/dist/sandbox/discover-worker.d.cts +1 -0
- package/dist/sandbox/discover-worker.d.mts +1 -0
- package/dist/sandbox/discover-worker.mjs +48 -0
- package/dist/sandbox/discover-worker.mjs.map +1 -0
- package/dist/sandbox/migrate-worker.cjs +75 -0
- package/dist/sandbox/migrate-worker.cjs.map +1 -0
- package/dist/sandbox/migrate-worker.d.cts +1 -0
- package/dist/sandbox/migrate-worker.d.mts +1 -0
- package/dist/sandbox/migrate-worker.mjs +76 -0
- package/dist/sandbox/migrate-worker.mjs.map +1 -0
- package/dist/sandbox-C4g1eG31.d.mts +104 -0
- package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
- package/dist/sandbox-CHv3OYXg.cjs +165 -0
- package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
- package/dist/sandbox-CbVB7uOD.mjs +118 -0
- package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
- package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
- package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
- package/dist/schemas-BCwKKA42.mjs +5961 -0
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/schemas-BQ_v0lEX.cjs +6068 -0
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CQORubp9.mjs +97 -0
- package/dist/secretsManager-CQORubp9.mjs.map +1 -0
- package/dist/secretsManager-RAGcEDX1.cjs +108 -0
- package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
- package/dist/seeds-CHIPcMrY.cjs +9115 -0
- package/dist/seeds-CHIPcMrY.cjs.map +1 -0
- package/dist/seeds-E4nUeXTl.mjs +8148 -0
- package/dist/seeds-E4nUeXTl.mjs.map +1 -0
- package/dist/sniffer-bUiSXLMj.mjs +1825 -0
- package/dist/sniffer-bUiSXLMj.mjs.map +1 -0
- package/dist/sniffer-n3TkX6JD.cjs +1998 -0
- package/dist/sniffer-n3TkX6JD.cjs.map +1 -0
- package/dist/sst-B-Uz4cvm.cjs +464 -0
- package/dist/sst-B-Uz4cvm.cjs.map +1 -0
- package/dist/sst-C1pxbFEd.mjs +441 -0
- package/dist/sst-C1pxbFEd.mjs.map +1 -0
- package/dist/stages-DJrOYLZ-.mjs +176 -0
- package/dist/stages-DJrOYLZ-.mjs.map +1 -0
- package/dist/stages-_3RVNG83.cjs +176 -0
- package/dist/stages-_3RVNG83.cjs.map +1 -0
- package/dist/target/public.cjs +15 -0
- package/dist/target/public.d.cts +28 -0
- package/dist/target/public.d.cts.map +1 -0
- package/dist/target/public.d.mts +28 -0
- package/dist/target/public.d.mts.map +1 -0
- package/dist/target/public.mjs +4 -0
- package/dist/terminal-Bs_lNQhL.mjs +85 -0
- package/dist/terminal-Bs_lNQhL.mjs.map +1 -0
- package/dist/terminal-CsQz4oT0.cjs +85 -0
- package/dist/terminal-CsQz4oT0.cjs.map +1 -0
- package/dist/types-B6UXlEkf.d.cts +7650 -0
- package/dist/types-B6UXlEkf.d.cts.map +1 -0
- package/dist/types-HqVPddRK.d.mts +7649 -0
- package/dist/types-HqVPddRK.d.mts.map +1 -0
- package/dist/utils-D2Nk1Nv2.cjs +205 -0
- package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
- package/dist/utils-D_fxUqvU.mjs +156 -0
- package/dist/utils-D_fxUqvU.mjs.map +1 -0
- package/dist/vitest.cjs +65 -0
- package/dist/vitest.cjs.map +1 -0
- package/dist/vitest.d.cts +29 -0
- package/dist/vitest.d.cts.map +1 -0
- package/dist/vitest.d.mts +29 -0
- package/dist/vitest.d.mts.map +1 -0
- package/dist/vitest.mjs +65 -0
- package/dist/vitest.mjs.map +1 -0
- package/dist/workerRuntime-BXfhbe13.cjs +108 -0
- package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
- package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
- package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
- package/dist/workspace/index.cjs +8 -4
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -3
- package/dist/workspace-BwqQnool.cjs +2806 -0
- package/dist/workspace-BwqQnool.cjs.map +1 -0
- package/dist/workspace-D1QbNd55.mjs +2394 -0
- package/dist/workspace-D1QbNd55.mjs.map +1 -0
- package/package.json +73 -40
- package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
- package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
- package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
- package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
- package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
- package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
- package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
- package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
- package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
- package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
- package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
- package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
- package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
- package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
- package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
- package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
- package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
- package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
- package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
- package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
- package/dist/bundler-BY1OmV1e.cjs.map +0 -1
- package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-D8o6I_7Z.mjs +0 -469
- package/dist/config-D8o6I_7Z.mjs.map +0 -1
- package/dist/config-DbPE1KXF.cjs +0 -535
- package/dist/config-DbPE1KXF.cjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-Dh0Q6HzY.mjs +0 -2548
- package/dist/credentials-Dh0Q6HzY.mjs.map +0 -1
- package/dist/credentials-K961ThG3.cjs +0 -2680
- package/dist/credentials-K961ThG3.cjs.map +0 -1
- package/dist/discover-CAlFgYec.mjs +0 -229
- package/dist/discover-CAlFgYec.mjs.map +0 -1
- package/dist/discover-DTmFeloL.cjs +0 -271
- package/dist/discover-DTmFeloL.cjs.map +0 -1
- package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
- package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
- package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
- package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
- package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
- package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
- package/dist/emit-CbcRolsa.cjs.map +0 -1
- package/dist/emit-CiZS_5Ub.mjs.map +0 -1
- package/dist/encryption-C6jaU0hE.cjs +0 -54
- package/dist/encryption-C6jaU0hE.cjs.map +0 -1
- package/dist/encryption-CHzzeR8a.cjs +0 -4
- package/dist/encryption-CQUncu7v.mjs +0 -3
- package/dist/encryption-D-abyhZx.mjs +0 -42
- package/dist/encryption-D-abyhZx.mjs.map +0 -1
- package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
- package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
- package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
- package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs +0 -289
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs +0 -253
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/index-BThUzEIp.d.mts.map +0 -1
- package/dist/index-CHB4tSzX.d.cts.map +0 -1
- package/dist/openapi-CgpMWMmM.mjs +0 -1962
- package/dist/openapi-CgpMWMmM.mjs.map +0 -1
- package/dist/openapi-CljONd_M.cjs +0 -1998
- package/dist/openapi-CljONd_M.cjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/openapi-react-query.cjs +0 -4
- package/dist/openapi-react-query.d.cts +0 -11
- package/dist/openapi-react-query.d.cts.map +0 -1
- package/dist/openapi-react-query.d.mts +0 -11
- package/dist/openapi-react-query.d.mts.map +0 -1
- package/dist/openapi-react-query.mjs +0 -4
- package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
- package/dist/reconcile-D0pimNiy.cjs.map +0 -1
- package/dist/setup-CJiQM2pX.cjs +0 -473
- package/dist/setup-CJiQM2pX.cjs.map +0 -1
- package/dist/setup-DMtU3p41.cjs +0 -11
- package/dist/setup-DOsYueeQ.mjs +0 -443
- package/dist/setup-DOsYueeQ.mjs.map +0 -1
- package/dist/setup-DSutDAlt.mjs +0 -11
- package/dist/storage-BJmzYxt8.cjs +0 -363
- package/dist/storage-BJmzYxt8.cjs.map +0 -1
- package/dist/storage-BM9hGpgv.cjs +0 -7
- package/dist/storage-Bi24WfoW.mjs +0 -297
- package/dist/storage-Bi24WfoW.mjs.map +0 -1
- package/dist/storage-CYlGwWTj.mjs +0 -3
- package/dist/sync-CmEuNZsB.mjs +0 -76
- package/dist/sync-CmEuNZsB.mjs.map +0 -1
- package/dist/sync-D306yOWu.cjs +0 -4
- package/dist/sync-SizaChmC.cjs +0 -93
- package/dist/sync-SizaChmC.cjs.map +0 -1
- package/dist/sync-hOqAWHR6.mjs +0 -3
- package/dist/types-C-arnQ1r.d.mts +0 -2184
- package/dist/types-C-arnQ1r.d.mts.map +0 -1
- package/dist/types-abJQuk7m.d.cts +0 -2184
- package/dist/types-abJQuk7m.d.cts.map +0 -1
- package/dist/workspace-7FqprxuJ.mjs +0 -4323
- package/dist/workspace-7FqprxuJ.mjs.map +0 -1
- package/dist/workspace-8acupeaI.cjs +0 -9
- package/dist/workspace-XvqO9jIv.cjs +0 -4472
- package/dist/workspace-XvqO9jIv.cjs.map +0 -1
- package/dist/workspace-yP5AHnrn.mjs +0 -8
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a module's path aliases through the tsconfig beside it.
|
|
3
|
+
*
|
|
4
|
+
* tsx applies one tsconfig to the whole process — the one in the directory the
|
|
5
|
+
* command ran from. The workspace's `constructs` glob loads every app's code
|
|
6
|
+
* from wherever a command started, so `~/router.ts` in `apps/api` was being
|
|
7
|
+
* read with `apps/web`'s `~` when the command ran there, and resolved to
|
|
8
|
+
* nothing. TypeScript itself resolves an import through the tsconfig that owns
|
|
9
|
+
* the importing file; this does the same at runtime.
|
|
10
|
+
*
|
|
11
|
+
* Registered after tsx, so it runs first. It only answers a non-relative
|
|
12
|
+
* specifier from TypeScript source outside `node_modules` that the adjacent
|
|
13
|
+
* tsconfig's `paths` actually map — everything else, and anything a mapped
|
|
14
|
+
* candidate fails to resolve to, goes to the next resolver untouched.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { dirname } from 'node:path';
|
|
18
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
19
|
+
import { createPathsMatcher, getTsconfig } from 'get-tsconfig';
|
|
20
|
+
|
|
21
|
+
/** Directory → the paths matcher of the tsconfig that owns it, if any. */
|
|
22
|
+
const matchers = new Map();
|
|
23
|
+
/** Shared with `get-tsconfig`, so a config `extends` is read once. */
|
|
24
|
+
const tsconfigCache = new Map();
|
|
25
|
+
|
|
26
|
+
const TS_SOURCE = /\.(?:[cm]?ts|tsx)$/;
|
|
27
|
+
/** Relative, absolute, or carrying a scheme (`node:`, `file:`, `data:`). */
|
|
28
|
+
const NOT_BARE = /^(?:\.{1,2}(?:\/|$)|\/|[a-zA-Z][a-zA-Z\d+.-]*:)/;
|
|
29
|
+
|
|
30
|
+
function matcherFor(directory) {
|
|
31
|
+
if (!matchers.has(directory)) {
|
|
32
|
+
const tsconfig = getTsconfig(directory, 'tsconfig.json', tsconfigCache);
|
|
33
|
+
matchers.set(directory, tsconfig ? createPathsMatcher(tsconfig) : null);
|
|
34
|
+
}
|
|
35
|
+
return matchers.get(directory);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The files a specifier maps to through the importing module's own tsconfig,
|
|
40
|
+
* or nothing when this hook has no business with it.
|
|
41
|
+
*/
|
|
42
|
+
function candidatesFor(specifier, parent) {
|
|
43
|
+
if (!parent?.startsWith('file:') || NOT_BARE.test(specifier)) return [];
|
|
44
|
+
|
|
45
|
+
const parentPath = fileURLToPath(parent);
|
|
46
|
+
if (!TS_SOURCE.test(parentPath) || parentPath.includes('/node_modules/')) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return matcherFor(dirname(parentPath))?.(specifier) ?? [];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** For `module.register()` — the off-thread hooks. */
|
|
54
|
+
export async function resolve(specifier, context, nextResolve) {
|
|
55
|
+
for (const candidate of candidatesFor(specifier, context.parentURL)) {
|
|
56
|
+
try {
|
|
57
|
+
return await nextResolve(pathToFileURL(candidate).href, context);
|
|
58
|
+
} catch {
|
|
59
|
+
// The next mapping, as TypeScript tries them in order.
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return nextResolve(specifier, context);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* For `module.registerHooks()` — the in-thread hooks.
|
|
68
|
+
*
|
|
69
|
+
* tsx 4.23 resolves through these, and they are consulted before anything
|
|
70
|
+
* `register()` installed: its resolver threw on a mapped alias and the
|
|
71
|
+
* off-thread hook above was never asked. Registered the same way, after tsx,
|
|
72
|
+
* this one is asked first again.
|
|
73
|
+
*/
|
|
74
|
+
export function resolveSync(specifier, context, nextResolve) {
|
|
75
|
+
for (const candidate of candidatesFor(specifier, context.parentURL)) {
|
|
76
|
+
try {
|
|
77
|
+
return nextResolve(pathToFileURL(candidate).href, context);
|
|
78
|
+
} catch {
|
|
79
|
+
// The next mapping, as TypeScript tries them in order.
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return nextResolve(specifier, context);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Install this hook the way the running tsx installed its own, so it is asked
|
|
88
|
+
* before tsx's resolver rather than after it.
|
|
89
|
+
*/
|
|
90
|
+
export async function registerAdjacentTsconfig() {
|
|
91
|
+
const { register, registerHooks } = await import('node:module');
|
|
92
|
+
if (registerHooks) {
|
|
93
|
+
registerHooks({ resolve: resolveSync });
|
|
94
|
+
} else {
|
|
95
|
+
register(import.meta.url);
|
|
96
|
+
}
|
|
97
|
+
}
|
package/bin/gkm.mjs
CHANGED
|
@@ -19,6 +19,10 @@ if (
|
|
|
19
19
|
const { createRequire } = await import('node:module');
|
|
20
20
|
const require = createRequire(import.meta.url);
|
|
21
21
|
const tsxPath = pathToFileURL(require.resolve('tsx')).href;
|
|
22
|
+
// Before tsx, so tsx reads each `.tsx` through it and compiles its JSX the
|
|
23
|
+
// way the file's own tsconfig says. See `owning-tsconfig-jsx.mjs`.
|
|
24
|
+
const jsxPath = new URL('./owning-tsconfig-jsx-register.mjs', import.meta.url)
|
|
25
|
+
.href;
|
|
22
26
|
|
|
23
27
|
const { execFileSync } = await import('node:child_process');
|
|
24
28
|
try {
|
|
@@ -26,7 +30,11 @@ if (
|
|
|
26
30
|
stdio: 'inherit',
|
|
27
31
|
env: {
|
|
28
32
|
...process.env,
|
|
29
|
-
|
|
33
|
+
// `--import=<url>`, never `--import <url>`: Next.js re-parses
|
|
34
|
+
// NODE_OPTIONS for its workers, and with two space-separated imports
|
|
35
|
+
// its parser glued them into one specifier `next build` could not find.
|
|
36
|
+
NODE_OPTIONS:
|
|
37
|
+
`${nodeOptions} --import=${jsxPath} --import=${tsxPath}`.trim(),
|
|
30
38
|
},
|
|
31
39
|
});
|
|
32
40
|
} catch (e) {
|
|
@@ -35,5 +43,11 @@ if (
|
|
|
35
43
|
process.exit(0);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
// tsx is loaded
|
|
46
|
+
// tsx is loaded. Resolve each module's path aliases through its own tsconfig
|
|
47
|
+
// rather than the one tsx took from the cwd — registered after tsx, so it is
|
|
48
|
+
// asked first. See `adjacent-tsconfig.mjs`.
|
|
49
|
+
const { registerAdjacentTsconfig } = await import('./adjacent-tsconfig.mjs');
|
|
50
|
+
await registerAdjacentTsconfig();
|
|
51
|
+
|
|
52
|
+
// Run the CLI
|
|
39
53
|
await import('../dist/index.mjs');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `--import` that installs `owning-tsconfig-jsx.mjs` — it must come before
|
|
3
|
+
* tsx's own `--import`, so that tsx reads the source through it.
|
|
4
|
+
*
|
|
5
|
+
* Registered with `module.register()` whatever tsx chose: tsx's in-thread hooks
|
|
6
|
+
* (`registerHooks`, Node 22.22.3+ / 24.11.1+) hand off to the off-thread chain
|
|
7
|
+
* when they load a file, and on older Node tsx registers off-thread too, after
|
|
8
|
+
* this — so either way this hook is asked after tsx, for the file's source.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { register } from 'node:module';
|
|
12
|
+
import { isInternalThread } from 'node:worker_threads';
|
|
13
|
+
|
|
14
|
+
// As tsx guards its own: where Node runs preloads in the hooks thread too,
|
|
15
|
+
// registering from there would hook the hooks.
|
|
16
|
+
if (!isInternalThread) {
|
|
17
|
+
register('./owning-tsconfig-jsx.mjs', import.meta.url);
|
|
18
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile a `.tsx` file's JSX the way the tsconfig that owns it says to.
|
|
3
|
+
*
|
|
4
|
+
* tsx applies one tsconfig to the whole process — the one in the directory the
|
|
5
|
+
* command ran from — and only to the files that tsconfig's `include` covers.
|
|
6
|
+
* `gkm dev` runs each app from its own directory, so a construct's template in
|
|
7
|
+
* the workspace (`constructs/templates/MagicLink.tsx`) was outside the app's
|
|
8
|
+
* `include` and compiled with esbuild's defaults: the classic runtime, which
|
|
9
|
+
* calls `React.createElement` in a file that never imported React, because the
|
|
10
|
+
* root tsconfig's `"jsx": "react-jsx"` said it need not. It threw
|
|
11
|
+
* `React is not defined` at render under `gkm dev` and rendered under
|
|
12
|
+
* `gkm test`, where Vitest compiles each file with its nearest tsconfig.
|
|
13
|
+
*
|
|
14
|
+
* Pointing tsx at the root tsconfig instead would only move the problem: an
|
|
15
|
+
* app may set its own `jsx` or `jsxImportSource` (a Hono app's `hono/jsx`), and
|
|
16
|
+
* one tsconfig per process is the same mistake `adjacent-tsconfig.mjs` exists
|
|
17
|
+
* to undo for path aliases. tsx has no per-file tsconfig, but esbuild — which
|
|
18
|
+
* tsx compiles with — honours JSX pragmas in a file over its options. So this
|
|
19
|
+
* hook, registered before tsx so that it sits between tsx and the file on disk,
|
|
20
|
+
* appends the owning tsconfig's JSX settings to the source as pragmas.
|
|
21
|
+
*
|
|
22
|
+
* The owning tsconfig is the nearest one above the file, as Vitest and
|
|
23
|
+
* `adjacent-tsconfig.mjs` choose it. A file that already carries its own JSX
|
|
24
|
+
* pragma, or whose tsconfig asks for nothing a pragma can say (`preserve`, or
|
|
25
|
+
* no `jsx` at all), is left exactly as it is. The pragma goes at the end, so no
|
|
26
|
+
* line of the file moves and its stack traces still point at the right place.
|
|
27
|
+
*
|
|
28
|
+
* Only ESM sources pass through here: for a CommonJS module tsx reads the file
|
|
29
|
+
* itself, and those keep the process tsconfig's behaviour.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import { dirname } from 'node:path';
|
|
33
|
+
import { fileURLToPath } from 'node:url';
|
|
34
|
+
import { getTsconfig } from 'get-tsconfig';
|
|
35
|
+
|
|
36
|
+
const JSX_SOURCE = /\.[jt]sx$/;
|
|
37
|
+
/** A pragma the file chose for itself, which this hook never overrides. */
|
|
38
|
+
const OWN_PRAGMA = /@jsx(?:Runtime|ImportSource|Frag)?\s/;
|
|
39
|
+
|
|
40
|
+
/** Directory → the pragma its owning tsconfig implies, or `null`. */
|
|
41
|
+
const pragmas = new Map();
|
|
42
|
+
/** Shared with `get-tsconfig`, so a config `extends` is read once. */
|
|
43
|
+
const tsconfigCache = new Map();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The pragma comment that tells esbuild what these compiler options tell
|
|
47
|
+
* TypeScript, or `null` when there is nothing to say.
|
|
48
|
+
*/
|
|
49
|
+
export function jsxPragma(compilerOptions = {}) {
|
|
50
|
+
const jsx = compilerOptions.jsx?.toLowerCase();
|
|
51
|
+
|
|
52
|
+
if (jsx === 'react-jsx' || jsx === 'react-jsxdev') {
|
|
53
|
+
const source = compilerOptions.jsxImportSource ?? 'react';
|
|
54
|
+
return `/* @jsxRuntime automatic @jsxImportSource ${source} */`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (jsx === 'react') {
|
|
58
|
+
const parts = ['@jsxRuntime classic'];
|
|
59
|
+
if (compilerOptions.jsxFactory) {
|
|
60
|
+
parts.push(`@jsx ${compilerOptions.jsxFactory}`);
|
|
61
|
+
}
|
|
62
|
+
if (compilerOptions.jsxFragmentFactory) {
|
|
63
|
+
parts.push(`@jsxFrag ${compilerOptions.jsxFragmentFactory}`);
|
|
64
|
+
}
|
|
65
|
+
return `/* ${parts.join(' ')} */`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// `preserve` and `react-native` leave JSX in the output, which no pragma
|
|
69
|
+
// can ask for; without `jsx` TypeScript compiles no `.tsx` at all.
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function pragmaFor(directory) {
|
|
74
|
+
if (!pragmas.has(directory)) {
|
|
75
|
+
const tsconfig = getTsconfig(directory, 'tsconfig.json', tsconfigCache);
|
|
76
|
+
pragmas.set(directory, jsxPragma(tsconfig?.config.compilerOptions));
|
|
77
|
+
}
|
|
78
|
+
return pragmas.get(directory);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The JSX file at this URL, when it is one of the project's own. */
|
|
82
|
+
function jsxFilePath(url) {
|
|
83
|
+
if (!url.startsWith('file:')) return null;
|
|
84
|
+
|
|
85
|
+
const path = fileURLToPath(url.split(/[?#]/)[0]);
|
|
86
|
+
if (!JSX_SOURCE.test(path) || path.includes('/node_modules/')) return null;
|
|
87
|
+
|
|
88
|
+
return path;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** For `module.register()`, so it runs behind tsx however tsx registered. */
|
|
92
|
+
export async function load(url, context, nextLoad) {
|
|
93
|
+
const loaded = await nextLoad(url, context);
|
|
94
|
+
|
|
95
|
+
const path = jsxFilePath(url);
|
|
96
|
+
if (!path || loaded.source == null) return loaded;
|
|
97
|
+
|
|
98
|
+
const pragma = pragmaFor(dirname(path));
|
|
99
|
+
if (!pragma) return loaded;
|
|
100
|
+
|
|
101
|
+
const source =
|
|
102
|
+
typeof loaded.source === 'string'
|
|
103
|
+
? loaded.source
|
|
104
|
+
: new TextDecoder().decode(loaded.source);
|
|
105
|
+
if (OWN_PRAGMA.test(source)) return loaded;
|
|
106
|
+
|
|
107
|
+
return { ...loaded, source: `${source}\n${pragma}\n` };
|
|
108
|
+
}
|