@geekmidas/cli 10.0.0-alpha.9 → 10.0.0-alpha.91
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 +315 -414
- package/bin/adjacent-tsconfig.mjs +46 -8
- package/bin/gkm.mjs +11 -3
- package/bin/owning-tsconfig-jsx-register.mjs +18 -0
- package/bin/owning-tsconfig-jsx.mjs +108 -0
- package/dist/EndpointGenerator-CVc6Oi1Y.mjs +1021 -0
- package/dist/EndpointGenerator-CVc6Oi1Y.mjs.map +1 -0
- package/dist/EndpointGenerator-CwLjBCFE.cjs +1080 -0
- package/dist/EndpointGenerator-CwLjBCFE.cjs.map +1 -0
- package/dist/GoDaddyProvider-DSStJVAv.mjs +387 -0
- package/dist/GoDaddyProvider-DSStJVAv.mjs.map +1 -0
- package/dist/GoDaddyProvider-DqZ1qD_F.cjs +387 -0
- package/dist/GoDaddyProvider-DqZ1qD_F.cjs.map +1 -0
- package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BI6J7oJr.mjs} +22 -23
- package/dist/HostingerProvider-BI6J7oJr.mjs.map +1 -0
- package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-CyTpG_jy.cjs} +22 -23
- package/dist/HostingerProvider-CyTpG_jy.cjs.map +1 -0
- package/dist/LegacyStateStore-DXmNA7hy.cjs +89 -0
- package/dist/LegacyStateStore-DXmNA7hy.cjs.map +1 -0
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs +89 -0
- package/dist/LegacyStateStore-ZkdmiUFZ.mjs.map +1 -0
- package/dist/LocalStateStore-BBeTlRTH.cjs +178 -0
- package/dist/LocalStateStore-BBeTlRTH.cjs.map +1 -0
- package/dist/LocalStateStore-CU-O0SBp.mjs +167 -0
- package/dist/LocalStateStore-CU-O0SBp.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-B--HV-sW.cjs +541 -0
- package/dist/OpenApiTsGenerator-B--HV-sW.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-CkvsPdgg.mjs +536 -0
- package/dist/OpenApiTsGenerator-CkvsPdgg.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-Br8VMY22.cjs +160 -0
- package/dist/S3StateStore-Br8VMY22.cjs.map +1 -0
- package/dist/S3StateStore-bwxcI_wQ.mjs +161 -0
- package/dist/S3StateStore-bwxcI_wQ.mjs.map +1 -0
- package/dist/SSMStateStore-CsOS0W1y.mjs +154 -0
- package/dist/SSMStateStore-CsOS0W1y.mjs.map +1 -0
- package/dist/SSMStateStore-DoZE1Wi1.cjs +153 -0
- package/dist/SSMStateStore-DoZE1Wi1.cjs.map +1 -0
- package/dist/SubscriberGenerator-BPqQf8fB.mjs +448 -0
- package/dist/SubscriberGenerator-BPqQf8fB.mjs.map +1 -0
- package/dist/SubscriberGenerator-BVn7cQ-2.cjs +489 -0
- package/dist/SubscriberGenerator-BVn7cQ-2.cjs.map +1 -0
- package/dist/add-BSHk5Ngn.mjs +747 -0
- package/dist/add-BSHk5Ngn.mjs.map +1 -0
- package/dist/add-DmmBDV2e.cjs +749 -0
- package/dist/add-DmmBDV2e.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-B-6uEhgP.mjs +71 -0
- package/dist/aws-B-6uEhgP.mjs.map +1 -0
- package/dist/aws-BTawF0F-.cjs +82 -0
- package/dist/aws-BTawF0F-.cjs.map +1 -0
- package/dist/awsStore-7VmS_cZR.cjs +54 -0
- package/dist/awsStore-7VmS_cZR.cjs.map +1 -0
- package/dist/awsStore-B529csle.mjs +43 -0
- package/dist/awsStore-B529csle.mjs.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/{bundler-BY1OmV1e.cjs → bundler-BQJiB7Ub.cjs} +38 -35
- package/dist/bundler-BQJiB7Ub.cjs.map +1 -0
- package/dist/{bundler-Be8Zg4Wd.mjs → bundler-D6eBfVkl.mjs} +36 -32
- package/dist/bundler-D6eBfVkl.mjs.map +1 -0
- package/dist/cli-BE9mqeX8.cjs +69 -0
- package/dist/cli-BE9mqeX8.cjs.map +1 -0
- package/dist/cli-DD-Yk-I5.mjs +69 -0
- package/dist/cli-DD-Yk-I5.mjs.map +1 -0
- package/dist/compose-Bhmf0n4o.mjs +3140 -0
- package/dist/compose-Bhmf0n4o.mjs.map +1 -0
- package/dist/compose-CvpU6ooi.cjs +3265 -0
- package/dist/compose-CvpU6ooi.cjs.map +1 -0
- package/dist/config-CdEcTrjG.d.mts +269 -0
- package/dist/config-CdEcTrjG.d.mts.map +1 -0
- package/dist/config-pST7E0CS.d.cts +269 -0
- package/dist/config-pST7E0CS.d.cts.map +1 -0
- package/dist/config.cjs +420 -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 +404 -4
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-BJqRJNK4.mjs +236 -0
- package/dist/credentialSchemas-BJqRJNK4.mjs.map +1 -0
- package/dist/credentialSchemas-DCR4Wd1W.cjs +271 -0
- package/dist/credentialSchemas-DCR4Wd1W.cjs.map +1 -0
- package/dist/credentials-BKfIugu2.cjs +513 -0
- package/dist/credentials-BKfIugu2.cjs.map +1 -0
- package/dist/credentials-CnVqoXMb.mjs +388 -0
- package/dist/credentials-CnVqoXMb.mjs.map +1 -0
- package/dist/databases-BY-pEImp.cjs +597 -0
- package/dist/databases-BY-pEImp.cjs.map +1 -0
- package/dist/databases-CzszQV0N.mjs +494 -0
- package/dist/databases-CzszQV0N.mjs.map +1 -0
- package/dist/define-DR8xGYfL.mjs +97 -0
- package/dist/define-DR8xGYfL.mjs.map +1 -0
- package/dist/define-DzRz8FgH.cjs +144 -0
- package/dist/define-DzRz8FgH.cjs.map +1 -0
- package/dist/deploy/public.cjs +208 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +649 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +649 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +142 -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-CuHasEA4.cjs +554 -0
- package/dist/deploy-CuHasEA4.cjs.map +1 -0
- package/dist/deploy-QNtx_eWR.mjs +525 -0
- package/dist/deploy-QNtx_eWR.mjs.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-BPelzeGW.mjs +526 -0
- package/dist/discover-BPelzeGW.mjs.map +1 -0
- package/dist/discover-CU0paUyH.d.cts +108 -0
- package/dist/discover-CU0paUyH.d.cts.map +1 -0
- package/dist/discover-D1It5r_h.cjs +599 -0
- package/dist/discover-D1It5r_h.cjs.map +1 -0
- package/dist/discover-DFiJxwfv.d.mts +108 -0
- package/dist/discover-DFiJxwfv.d.mts.map +1 -0
- package/dist/dokploy-CYcMLh9-.mjs +38 -0
- package/dist/dokploy-CYcMLh9-.mjs.map +1 -0
- package/dist/dokploy-DIowwyIB.cjs +38 -0
- package/dist/dokploy-DIowwyIB.cjs.map +1 -0
- package/dist/drivers-DTZzxeIl.mjs +177 -0
- package/dist/drivers-DTZzxeIl.mjs.map +1 -0
- package/dist/drivers-LYSdQDmd.cjs +200 -0
- package/dist/drivers-LYSdQDmd.cjs.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-BrEef7Jk.mjs +88 -0
- package/dist/encryption-BrEef7Jk.mjs.map +1 -0
- package/dist/encryption-CjYdUb2s.cjs +89 -0
- package/dist/encryption-CjYdUb2s.cjs.map +1 -0
- package/dist/engine-2h4k5ICq.mjs +3085 -0
- package/dist/engine-2h4k5ICq.mjs.map +1 -0
- package/dist/engine-BhJ7ZP9K.cjs +3198 -0
- package/dist/engine-BhJ7ZP9K.cjs.map +1 -0
- package/dist/github-B5Bw4HIu.cjs +669 -0
- package/dist/github-B5Bw4HIu.cjs.map +1 -0
- package/dist/github-BCDF6xVH.mjs +669 -0
- package/dist/github-BCDF6xVH.mjs.map +1 -0
- package/dist/{index-C6e-ULLx.d.mts → index-D-F_hTDz.d.cts} +39 -24
- package/dist/index-D-F_hTDz.d.cts.map +1 -0
- package/dist/{index-CR5urhWX.d.cts → index-YFNxR5Ns.d.mts} +39 -24
- package/dist/index-YFNxR5Ns.d.mts.map +1 -0
- package/dist/index.cjs +9487 -12080
- 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 +9420 -12026
- package/dist/index.mjs.map +1 -1
- package/dist/local-BjxDfPvy.cjs +241 -0
- package/dist/local-BjxDfPvy.cjs.map +1 -0
- package/dist/local-IuoIF3CT.mjs +224 -0
- package/dist/local-IuoIF3CT.mjs.map +1 -0
- package/dist/migrate-CGaancHY.cjs +93 -0
- package/dist/migrate-CGaancHY.cjs.map +1 -0
- package/dist/migrate-DWZz9kah.mjs +93 -0
- package/dist/migrate-DWZz9kah.mjs.map +1 -0
- package/dist/migrate-DbtcuOr_.mjs +265 -0
- package/dist/migrate-DbtcuOr_.mjs.map +1 -0
- package/dist/migrate-q2YYLJLE.cjs +270 -0
- package/dist/migrate-q2YYLJLE.cjs.map +1 -0
- package/dist/openapi.cjs +214 -10
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +47 -17
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +47 -17
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -5
- package/dist/openapi.mjs.map +1 -0
- package/dist/provider-C9_-45d5.cjs +56 -0
- package/dist/provider-C9_-45d5.cjs.map +1 -0
- package/dist/provider-q4lsYzYG.mjs +45 -0
- package/dist/provider-q4lsYzYG.mjs.map +1 -0
- package/dist/ready-BpNbORRB.cjs +402 -0
- package/dist/ready-BpNbORRB.cjs.map +1 -0
- package/dist/ready-b6vm0-W-.mjs +373 -0
- package/dist/ready-b6vm0-W-.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-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/{reconcile-CFs8C_1a.mjs → reconcile-Dh1Jk7WE.mjs} +4 -7
- package/dist/reconcile-Dh1Jk7WE.mjs.map +1 -0
- package/dist/resolve-Cns0v6dN.cjs +315 -0
- package/dist/resolve-Cns0v6dN.cjs.map +1 -0
- package/dist/resolve-DNg0icnh.mjs +262 -0
- package/dist/resolve-DNg0icnh.mjs.map +1 -0
- package/dist/rollback-CFrNLmxs.mjs +132 -0
- package/dist/rollback-CFrNLmxs.mjs.map +1 -0
- package/dist/rollback-UIjS25F1.cjs +161 -0
- package/dist/rollback-UIjS25F1.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/runtime-CN_kmqxo.d.cts +90 -0
- package/dist/runtime-CN_kmqxo.d.cts.map +1 -0
- package/dist/runtime-Cjvon3oj.d.mts +90 -0
- package/dist/runtime-Cjvon3oj.d.mts.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-CL--ZDui.cjs +164 -0
- package/dist/sandbox-CL--ZDui.cjs.map +1 -0
- package/dist/sandbox-Dm247NGx.mjs +117 -0
- package/dist/sandbox-Dm247NGx.mjs.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.cts +126 -0
- package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
- package/dist/sandbox-M8UnLhXE.d.mts +126 -0
- package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
- package/dist/{workspace-zoqRbihZ.mjs → schemas-BObwxB_t.cjs} +998 -1659
- package/dist/schemas-BObwxB_t.cjs.map +1 -0
- package/dist/{workspace-C6VJQVtG.cjs → schemas-D-xeKJDD.mjs} +913 -1842
- package/dist/schemas-D-xeKJDD.mjs.map +1 -0
- package/dist/secretsManager-Chs9VV2r.mjs +76 -0
- package/dist/secretsManager-Chs9VV2r.mjs.map +1 -0
- package/dist/secretsManager-DcMlHnRC.cjs +87 -0
- package/dist/secretsManager-DcMlHnRC.cjs.map +1 -0
- package/dist/seeds-CkIPFGNO.cjs +10560 -0
- package/dist/seeds-CkIPFGNO.cjs.map +1 -0
- package/dist/seeds-odfgSCmu.mjs +9538 -0
- package/dist/seeds-odfgSCmu.mjs.map +1 -0
- package/dist/sniffer-BTtX3NUM.mjs +1262 -0
- package/dist/sniffer-BTtX3NUM.mjs.map +1 -0
- package/dist/sniffer-IAQEpsQb.cjs +1333 -0
- package/dist/sniffer-IAQEpsQb.cjs.map +1 -0
- package/dist/sst-BgcOsaBi.cjs +453 -0
- package/dist/sst-BgcOsaBi.cjs.map +1 -0
- package/dist/sst-CJzvyrEz.mjs +430 -0
- package/dist/sst-CJzvyrEz.mjs.map +1 -0
- package/dist/stages-CUn6gvXL.cjs +174 -0
- package/dist/stages-CUn6gvXL.cjs.map +1 -0
- package/dist/stages-CnZRYmkI.mjs +174 -0
- package/dist/stages-CnZRYmkI.mjs.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-D8TPK7o9.mjs +84 -0
- package/dist/terminal-D8TPK7o9.mjs.map +1 -0
- package/dist/terminal-DuapRxh6.cjs +84 -0
- package/dist/terminal-DuapRxh6.cjs.map +1 -0
- package/dist/types-NqX1Hz4P.d.cts +7454 -0
- package/dist/types-NqX1Hz4P.d.cts.map +1 -0
- package/dist/types-ZHuZ89hv.d.mts +7453 -0
- package/dist/types-ZHuZ89hv.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-CJ0lKFq-.mjs +1979 -0
- package/dist/workspace-CJ0lKFq-.mjs.map +1 -0
- package/dist/workspace-CwW3Gkru.cjs +2355 -0
- package/dist/workspace-CwW3Gkru.cjs.map +1 -0
- package/package.json +53 -22
- 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-BZ1F0WuA.cjs +0 -462
- package/dist/config-BZ1F0WuA.cjs.map +0 -1
- package/dist/config-DVVph9yz.mjs +0 -402
- package/dist/config-DVVph9yz.mjs.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-Xamqe_NJ.cjs +0 -2681
- package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
- package/dist/credentials-dP8vRVRv.mjs +0 -2549
- package/dist/credentials-dP8vRVRv.mjs.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-C6e-ULLx.d.mts.map +0 -1
- package/dist/index-CR5urhWX.d.cts.map +0 -1
- package/dist/openapi-SjsgARie.cjs +0 -2075
- package/dist/openapi-SjsgARie.cjs.map +0 -1
- package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
- package/dist/openapi-Xx0A7Wg0.mjs.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-BA8ciTPU.mjs +0 -11
- package/dist/setup-BsZvZP6f.cjs +0 -11
- package/dist/setup-C8KOx8_8.mjs +0 -443
- package/dist/setup-C8KOx8_8.mjs.map +0 -1
- package/dist/setup-hC6hI86f.cjs +0 -473
- package/dist/setup-hC6hI86f.cjs.map +0 -1
- 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-6pkp2RRj.d.mts +0 -2220
- package/dist/types-6pkp2RRj.d.mts.map +0 -1
- package/dist/types-Y3fKQSAK.d.cts +0 -2220
- package/dist/types-Y3fKQSAK.d.cts.map +0 -1
- package/dist/workspace-BzrG_2SI.mjs +0 -8
- package/dist/workspace-C6VJQVtG.cjs.map +0 -1
- package/dist/workspace-XXtNhqJl.cjs +0 -9
- package/dist/workspace-zoqRbihZ.mjs.map +0 -1
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
+
const require_schemas = require("./schemas-BObwxB_t.cjs");
|
|
3
|
+
const require_sandbox = require("./sandbox-CL--ZDui.cjs");
|
|
4
|
+
const require_workerRuntime = require("./workerRuntime-BXfhbe13.cjs");
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let node_async_hooks = require("node:async_hooks");
|
|
8
|
+
let node_util = require("node:util");
|
|
9
|
+
let _geekmidas_constructs_crons = require("@geekmidas/constructs/crons");
|
|
10
|
+
let _geekmidas_constructs_queue = require("@geekmidas/constructs/queue");
|
|
11
|
+
let _geekmidas_constructs_subscribers = require("@geekmidas/constructs/subscribers");
|
|
12
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
13
|
+
let fast_glob = require("fast-glob");
|
|
14
|
+
fast_glob = require_rolldown_runtime.__toESM(fast_glob, 1);
|
|
15
|
+
let lodash_kebabcase = require("lodash.kebabcase");
|
|
16
|
+
lodash_kebabcase = require_rolldown_runtime.__toESM(lodash_kebabcase, 1);
|
|
17
|
+
let node_module = require("node:module");
|
|
18
|
+
let node_url = require("node:url");
|
|
19
|
+
//#region src/output.ts
|
|
20
|
+
/**
|
|
21
|
+
* Where the CLI's progress lines go.
|
|
22
|
+
*
|
|
23
|
+
* Commands write their progress through `output` rather than `console`. Run
|
|
24
|
+
* from the terminal that is the same thing. Run inside `deploy()`, each line
|
|
25
|
+
* goes to the run that wrote it instead — as an event its caller can iterate,
|
|
26
|
+
* and to the logger it was handed — so a deploy embedded in another program
|
|
27
|
+
* does not print over that program's own output.
|
|
28
|
+
*
|
|
29
|
+
* Carried by `AsyncLocalStorage` rather than passed down, because the lines
|
|
30
|
+
* come from everywhere a deploy reaches — the Dockerfile generator, the env
|
|
31
|
+
* sniffer, construct discovery — and two deploys running in one process must
|
|
32
|
+
* not hear each other.
|
|
33
|
+
*/
|
|
34
|
+
const current = new node_async_hooks.AsyncLocalStorage();
|
|
35
|
+
/** Runs `fn` with every line written through `output` sent to `sink`. */
|
|
36
|
+
function withOutput(sink, fn) {
|
|
37
|
+
return current.run(sink, fn);
|
|
38
|
+
}
|
|
39
|
+
function write(level, fallback) {
|
|
40
|
+
return (...args) => {
|
|
41
|
+
const sink = current.getStore();
|
|
42
|
+
if (sink) sink(level, (0, node_util.format)(...args));
|
|
43
|
+
else fallback(...args);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* `console`, for the methods the CLI logs through — routed to the current
|
|
48
|
+
* run's sink when there is one.
|
|
49
|
+
*/
|
|
50
|
+
const output = {
|
|
51
|
+
log: write("info", (...args) => console.log(...args)),
|
|
52
|
+
info: write("info", (...args) => console.info(...args)),
|
|
53
|
+
warn: write("warn", (...args) => console.warn(...args)),
|
|
54
|
+
error: write("error", (...args) => console.error(...args))
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/generators/Generator.ts
|
|
58
|
+
/**
|
|
59
|
+
* Zod v4 maintains a process-wide registry of schemas registered via
|
|
60
|
+
* `.meta({ id })`. When we cache-bust user module imports (by appending a
|
|
61
|
+
* `?t=timestamp` query), those modules re-execute and try to register the
|
|
62
|
+
* same ids again, which throws `ID X already exists in the registry`.
|
|
63
|
+
*
|
|
64
|
+
* Clearing the registry in the CLI process is safe: the user's running
|
|
65
|
+
* server lives in a subprocess and has its own isolated registry.
|
|
66
|
+
*
|
|
67
|
+
* Exported for tests.
|
|
68
|
+
*/
|
|
69
|
+
function clearZodGlobalRegistry() {
|
|
70
|
+
const registry = globalThis.__zod_globalRegistry;
|
|
71
|
+
if (registry && typeof registry.clear === "function") registry.clear();
|
|
72
|
+
}
|
|
73
|
+
var ConstructGenerator = class {
|
|
74
|
+
static async build(context, outputDir, generator, patterns, options) {
|
|
75
|
+
const constructs = await generator.load(patterns);
|
|
76
|
+
return generator.build(context, constructs, outputDir, options);
|
|
77
|
+
}
|
|
78
|
+
async load(patterns, cwd = process.cwd(), bustCache = false) {
|
|
79
|
+
const logger = console;
|
|
80
|
+
const globPatterns = Array.isArray(patterns) ? patterns : patterns ? [patterns] : [];
|
|
81
|
+
const files = fast_glob.default.stream(globPatterns, {
|
|
82
|
+
cwd,
|
|
83
|
+
absolute: true
|
|
84
|
+
});
|
|
85
|
+
if (bustCache) clearZodGlobalRegistry();
|
|
86
|
+
const constructs = [];
|
|
87
|
+
for await (const f of files) try {
|
|
88
|
+
const file = f.toString();
|
|
89
|
+
const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
|
|
90
|
+
for (const [key, construct] of Object.entries(module)) if (this.isConstruct(construct)) constructs.push({
|
|
91
|
+
key,
|
|
92
|
+
name: (0, lodash_kebabcase.default)(key),
|
|
93
|
+
construct,
|
|
94
|
+
path: {
|
|
95
|
+
absolute: file,
|
|
96
|
+
relative: (0, node_path.relative)(process.cwd(), file)
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
} catch (error) {
|
|
100
|
+
const err = error;
|
|
101
|
+
logger.error(`Failed to load ${f}: ${err.message}`);
|
|
102
|
+
if (err.stack) logger.error(err.stack);
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
return constructs;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/owningTsconfigJsx.ts
|
|
110
|
+
const REGISTER = "owning-tsconfig-jsx-register.mjs";
|
|
111
|
+
/** The CLI's `bin/` was not found above the module looking for it. */
|
|
112
|
+
var OwningTsconfigJsxHookMissing = class extends Error {
|
|
113
|
+
from;
|
|
114
|
+
constructor(from) {
|
|
115
|
+
super(`Could not find bin/${REGISTER} in any directory above '${from}'. It ships with @geekmidas/cli beside bin/gkm.mjs; reinstall the package if it is missing.`);
|
|
116
|
+
this.from = from;
|
|
117
|
+
this.name = "OwningTsconfigJsxHookMissing";
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The CLI's `bin/owning-tsconfig-jsx-register.mjs`, as a file URL. Searched
|
|
122
|
+
* upward because this module runs from `src/` in the repo and from a chunk in
|
|
123
|
+
* `dist/` once built, and `bin/` sits beside both.
|
|
124
|
+
*/
|
|
125
|
+
function registerUrl() {
|
|
126
|
+
const from = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
127
|
+
for (let dir = from;; dir = (0, node_path.dirname)(dir)) {
|
|
128
|
+
const candidate = (0, node_path.join)(dir, "bin", REGISTER);
|
|
129
|
+
if ((0, node_fs.existsSync)(candidate)) return (0, node_url.pathToFileURL)(candidate).href;
|
|
130
|
+
if ((0, node_path.dirname)(dir) === dir) throw new OwningTsconfigJsxHookMissing(from);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* `NODE_OPTIONS` for a process that runs app code through tsx, with the hook
|
|
135
|
+
* that compiles each `.tsx` with its own tsconfig's JSX settings (see
|
|
136
|
+
* `bin/owning-tsconfig-jsx.mjs`) put in front of every other `--import`, so it
|
|
137
|
+
* is registered before tsx and reads the source on tsx's behalf.
|
|
138
|
+
*
|
|
139
|
+
* `bin/gkm.mjs` already starts the CLI this way, and its children inherit it;
|
|
140
|
+
* this is for those that set `NODE_OPTIONS` themselves, or whose CLI was
|
|
141
|
+
* started with tsx already imported.
|
|
142
|
+
*/
|
|
143
|
+
function withOwningTsconfigJsx(nodeOptions = "") {
|
|
144
|
+
if (nodeOptions.includes(REGISTER)) return nodeOptions;
|
|
145
|
+
return [`--import=${registerUrl()}`, nodeOptions].filter(Boolean).join(" ");
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/sandbox/worker.ts
|
|
149
|
+
/**
|
|
150
|
+
* Running one of the CLI's own worker scripts inside a sandbox, and reading
|
|
151
|
+
* back the one JSON value it answers with.
|
|
152
|
+
*
|
|
153
|
+
* The worker imports the project's TypeScript — `gkm.config.ts`, construct
|
|
154
|
+
* modules, an app's entry — so it starts with the CLI's own tsx and the two
|
|
155
|
+
* hooks `gkm` itself runs with (JSX by the owning tsconfig, path aliases by
|
|
156
|
+
* the adjacent one). The host process needs none of them loaded: a program
|
|
157
|
+
* calling `deploy()` without `--import tsx` still loads a TypeScript config.
|
|
158
|
+
*/
|
|
159
|
+
const here = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
160
|
+
/**
|
|
161
|
+
* A worker's file: `dist/sandbox/<name>.mjs` once built — whether this module
|
|
162
|
+
* was bundled into `dist/` or sits beside it — or the `.ts` source under tsx.
|
|
163
|
+
*/
|
|
164
|
+
function workerFile(name) {
|
|
165
|
+
return [
|
|
166
|
+
(0, node_path.join)(here, "sandbox", `${name}.mjs`),
|
|
167
|
+
(0, node_path.join)(here, `${name}.mjs`),
|
|
168
|
+
(0, node_path.join)(here, "..", "sandbox", `${name}.mjs`),
|
|
169
|
+
(0, node_path.join)(here, `${name}.ts`)
|
|
170
|
+
].find((path) => (0, node_fs.existsSync)(path)) ?? (0, node_path.join)(here, `${name}.ts`);
|
|
171
|
+
}
|
|
172
|
+
/** tsx, from the CLI's own dependencies — never the project's. */
|
|
173
|
+
function tsxUrl() {
|
|
174
|
+
return (0, node_url.pathToFileURL)((0, node_module.createRequire)(require("url").pathToFileURL(__filename).href).resolve("tsx")).href;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* `node`'s arguments for `script`: the CLI's TypeScript loaders, then any
|
|
178
|
+
* further `imports`, then the script and its `args` — an argument array, so
|
|
179
|
+
* nothing about a path is read by a shell.
|
|
180
|
+
*/
|
|
181
|
+
function nodeWithTsx(script, args, imports = []) {
|
|
182
|
+
return [
|
|
183
|
+
...withOwningTsconfigJsx(`--import=${tsxUrl()}`).split(" "),
|
|
184
|
+
...imports.map((path) => `--import=${(0, node_url.pathToFileURL)(path).href}`),
|
|
185
|
+
script,
|
|
186
|
+
...args
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
/** A worker ended without the answer it exists to give. */
|
|
190
|
+
var SandboxWorkerFailed = class extends Error {
|
|
191
|
+
step;
|
|
192
|
+
exitCode;
|
|
193
|
+
stderr;
|
|
194
|
+
constructor(step, exitCode, stderr) {
|
|
195
|
+
super(`The sandboxed ${step} ended (exit code ${exitCode}) without an answer.${stderr.trim() ? `\n${stderr.trim()}` : ""}\nIts output above says why; the sandbox must be able to run \`node\` with the CLI's own files at the paths they have here.`);
|
|
196
|
+
this.step = step;
|
|
197
|
+
this.exitCode = exitCode;
|
|
198
|
+
this.stderr = stderr;
|
|
199
|
+
this.name = "SandboxWorkerFailed";
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Run worker `name` in `sandbox`, and parse its answer with `schema`.
|
|
204
|
+
*
|
|
205
|
+
* The answer is the last marked line on stdout. Anything else the project's
|
|
206
|
+
* code printed is ignored, and an answer the schema refuses is a failure
|
|
207
|
+
* rather than data — a worker in an isolating sandbox runs code the host does
|
|
208
|
+
* not trust.
|
|
209
|
+
*
|
|
210
|
+
* Within a run (`withSandbox`), the same worker asked the same question is
|
|
211
|
+
* started once; every ask gets its own copy of the answer, and its stderr, as
|
|
212
|
+
* though it had run again.
|
|
213
|
+
*/
|
|
214
|
+
async function runWorker(sandbox, step, options) {
|
|
215
|
+
if (options.secrets) return startWorker(sandbox, step, options);
|
|
216
|
+
const key = JSON.stringify([
|
|
217
|
+
options.name,
|
|
218
|
+
options.cwd,
|
|
219
|
+
options.args,
|
|
220
|
+
options.env ?? {}
|
|
221
|
+
]);
|
|
222
|
+
const answer = await require_sandbox.oncePerRun(sandbox, key, () => startWorker(sandbox, step, options));
|
|
223
|
+
return structuredClone(answer);
|
|
224
|
+
}
|
|
225
|
+
async function startWorker(sandbox, step, options) {
|
|
226
|
+
const result = await sandbox.exec("node", nodeWithTsx(workerFile(options.name), options.args), {
|
|
227
|
+
cwd: options.cwd,
|
|
228
|
+
env: {
|
|
229
|
+
...sandbox.env,
|
|
230
|
+
...options.env
|
|
231
|
+
},
|
|
232
|
+
timeoutMs: options.timeoutMs,
|
|
233
|
+
output: "capture",
|
|
234
|
+
...options.secrets ? { secrets: options.secrets } : {},
|
|
235
|
+
...options.signal ? { signal: options.signal } : {}
|
|
236
|
+
});
|
|
237
|
+
const line = result.stdout.split("\n").reverse().find((l) => l.startsWith(require_workerRuntime.WORKER_RESULT_MARKER));
|
|
238
|
+
if (line) try {
|
|
239
|
+
const parsed = options.schema.safeParse(JSON.parse(line.slice(require_workerRuntime.WORKER_RESULT_MARKER.length)));
|
|
240
|
+
if (parsed.success) return {
|
|
241
|
+
value: parsed.data,
|
|
242
|
+
stderr: result.stderr
|
|
243
|
+
};
|
|
244
|
+
} catch {}
|
|
245
|
+
throw new SandboxWorkerFailed(step, result.exitCode, result.stderr);
|
|
246
|
+
}
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region src/reconcile/discover.ts
|
|
249
|
+
/**
|
|
250
|
+
* Discovery — one glob, one structural test.
|
|
251
|
+
*
|
|
252
|
+
* A glob per kind is the same specialness the construct model removes, and
|
|
253
|
+
* resources have no kind to be listed under: a declared `ObjectStorage` would
|
|
254
|
+
* never be found by `routes:` or `crons:`. So there is one `constructs` glob,
|
|
255
|
+
* every export of every matching module is inspected, and the per-kind
|
|
256
|
+
* `isConstruct` checks collapse into a single question — does it have an id and
|
|
257
|
+
* can it declare?
|
|
258
|
+
*
|
|
259
|
+
* Structural rather than `instanceof` on purpose. A construct from a different
|
|
260
|
+
* copy of `@geekmidas/constructs` — a linked workspace, two versions in a
|
|
261
|
+
* lockfile — is still a construct, and `instanceof` is exactly the check that
|
|
262
|
+
* says otherwise.
|
|
263
|
+
*/
|
|
264
|
+
var discover_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
265
|
+
ConstructDiscoveryFailed: () => ConstructDiscoveryFailed,
|
|
266
|
+
ConstructsNotSerializable: () => ConstructsNotSerializable,
|
|
267
|
+
DuplicateConstruct: () => DuplicateConstruct,
|
|
268
|
+
LiveConstructsUnavailable: () => LiveConstructsUnavailable,
|
|
269
|
+
discover: () => discover,
|
|
270
|
+
isDeclarable: () => isDeclarable
|
|
271
|
+
});
|
|
272
|
+
/** `console`, or the deploy run discovering the manifest. */
|
|
273
|
+
const logger = output;
|
|
274
|
+
/**
|
|
275
|
+
* Whether a module export is a construct.
|
|
276
|
+
*
|
|
277
|
+
* Deliberately loose about what else it carries — a construct that also has a
|
|
278
|
+
* `service` is still a construct, and requiring one would exclude the kinds that
|
|
279
|
+
* own no address.
|
|
280
|
+
*/
|
|
281
|
+
function isDeclarable(value) {
|
|
282
|
+
if (typeof value !== "object" || value === null) return false;
|
|
283
|
+
const candidate = value;
|
|
284
|
+
return typeof candidate.id === "string" && candidate.id.length > 0 && typeof candidate.declare === "function";
|
|
285
|
+
}
|
|
286
|
+
/** What the discovery worker answers. Checked: the worker ran project code. */
|
|
287
|
+
const DiscoverAnswer = require_schemas.discriminatedUnion("reason", [
|
|
288
|
+
require_schemas.object({
|
|
289
|
+
reason: require_schemas.literal("discovered"),
|
|
290
|
+
manifest: require_schemas.record(require_schemas.string(), require_schemas.object({
|
|
291
|
+
id: require_schemas.string(),
|
|
292
|
+
kind: require_schemas.string()
|
|
293
|
+
}).loose()),
|
|
294
|
+
runnables: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string())),
|
|
295
|
+
background: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string())).optional()
|
|
296
|
+
}),
|
|
297
|
+
require_schemas.object({
|
|
298
|
+
reason: require_schemas.literal("live"),
|
|
299
|
+
paths: require_schemas.array(require_schemas.string())
|
|
300
|
+
}),
|
|
301
|
+
require_schemas.object({
|
|
302
|
+
reason: require_schemas.literal("failed"),
|
|
303
|
+
error: require_schemas.object({
|
|
304
|
+
name: require_schemas.string(),
|
|
305
|
+
message: require_schemas.string(),
|
|
306
|
+
id: require_schemas.string().optional(),
|
|
307
|
+
sources: require_schemas.array(require_schemas.string()).optional()
|
|
308
|
+
}).loose()
|
|
309
|
+
})
|
|
310
|
+
]);
|
|
311
|
+
/**
|
|
312
|
+
* The manifest, discovered in `sandbox` and handed back as JSON — or
|
|
313
|
+
* `undefined` when it holds something JSON cannot carry and the sandbox is
|
|
314
|
+
* not isolating, for the caller to discover here as before.
|
|
315
|
+
*/
|
|
316
|
+
async function discoverInSandbox(sandbox, options) {
|
|
317
|
+
const cwd = options.cwd ?? sandbox.root;
|
|
318
|
+
const patterns = typeof options.patterns === "string" ? [options.patterns] : [...options.patterns];
|
|
319
|
+
const { value, stderr } = await runWorker(sandbox, "construct discovery", {
|
|
320
|
+
name: "discover-worker",
|
|
321
|
+
args: [JSON.stringify({
|
|
322
|
+
patterns,
|
|
323
|
+
cwd
|
|
324
|
+
})],
|
|
325
|
+
cwd,
|
|
326
|
+
timeoutMs: DISCOVER_TIMEOUT_MS,
|
|
327
|
+
schema: DiscoverAnswer
|
|
328
|
+
});
|
|
329
|
+
if (stderr.trim()) logger.warn(stderr.replace(/\n$/, ""));
|
|
330
|
+
switch (value.reason) {
|
|
331
|
+
case "discovered":
|
|
332
|
+
if (options.runnables) for (const [owner, edges] of Object.entries(value.runnables)) options.runnables[owner] = edges;
|
|
333
|
+
if (options.background) for (const [owner, files] of Object.entries(value.background ?? {})) options.background[owner] = files;
|
|
334
|
+
return value.manifest;
|
|
335
|
+
case "failed":
|
|
336
|
+
if (value.error.name === "DuplicateConstruct" && value.error.id) throw new DuplicateConstruct(value.error.id, value.error.sources ?? []);
|
|
337
|
+
throw new ConstructDiscoveryFailed(value.error.name, value.error.message);
|
|
338
|
+
case "live":
|
|
339
|
+
if (sandbox.isolating) throw new ConstructsNotSerializable(value.paths);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* A caller asked for the construct objects (`sources`) or a watcher's
|
|
345
|
+
* re-import under an isolating sandbox, where only data comes back.
|
|
346
|
+
*/
|
|
347
|
+
var LiveConstructsUnavailable = class extends Error {
|
|
348
|
+
constructor() {
|
|
349
|
+
super("Discovery was asked for the construct objects themselves under an isolating sandbox, which hands back only data. Run this step without one, or ask only for the manifest.");
|
|
350
|
+
this.name = "LiveConstructsUnavailable";
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
/** How long discovering a project's constructs may take in a sandbox. */
|
|
354
|
+
const DISCOVER_TIMEOUT_MS = 6e4;
|
|
355
|
+
/** Importing a construct module, or declaring one, threw in the sandbox. */
|
|
356
|
+
var ConstructDiscoveryFailed = class extends Error {
|
|
357
|
+
errorName;
|
|
358
|
+
detail;
|
|
359
|
+
constructor(errorName, detail) {
|
|
360
|
+
super(`Discovering constructs failed (${errorName}): ${detail}`);
|
|
361
|
+
this.errorName = errorName;
|
|
362
|
+
this.detail = detail;
|
|
363
|
+
this.name = "ConstructDiscoveryFailed";
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* The constructs' declarations hold something that is not data, and the
|
|
368
|
+
* sandbox they were discovered in hands the deploy nothing but data.
|
|
369
|
+
*/
|
|
370
|
+
var ConstructsNotSerializable = class extends Error {
|
|
371
|
+
paths;
|
|
372
|
+
constructor(paths) {
|
|
373
|
+
super(`The construct manifest holds values that are not plain data at: ${paths.join(", ")}. Under an isolating sandbox the deploy only receives what JSON can carry; deploy with a sandbox that is not isolating if the host trusts this project.`);
|
|
374
|
+
this.paths = paths;
|
|
375
|
+
this.name = "ConstructsNotSerializable";
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* Build the construct manifest for a project.
|
|
380
|
+
*
|
|
381
|
+
* Runs the manifest's own validation before returning, so an app is wrong here
|
|
382
|
+
* — where the error names a file — rather than at deploy.
|
|
383
|
+
*
|
|
384
|
+
* @throws {DuplicateConstruct} when two exports claim one id.
|
|
385
|
+
*/
|
|
386
|
+
async function discover(options) {
|
|
387
|
+
const sandbox = options.sandbox ?? require_sandbox.activeSandbox();
|
|
388
|
+
if (sandbox) {
|
|
389
|
+
if (!options.sources && !options.bustCache) {
|
|
390
|
+
const sandboxed = await discoverInSandbox(sandbox, options);
|
|
391
|
+
if (sandboxed) return sandboxed;
|
|
392
|
+
} else if (sandbox.isolating) throw new LiveConstructsUnavailable();
|
|
393
|
+
}
|
|
394
|
+
const { patterns, cwd = process.cwd(), bustCache = false, sources: out } = options;
|
|
395
|
+
if (bustCache) clearZodGlobalRegistry();
|
|
396
|
+
const manifest = {};
|
|
397
|
+
/** Which file declared each id, for the error when two of them do. */
|
|
398
|
+
const sources = {};
|
|
399
|
+
/**
|
|
400
|
+
* Constructs already seen, by identity.
|
|
401
|
+
*
|
|
402
|
+
* A re-export is the *same object* reached through a second file — ESM
|
|
403
|
+
* bindings are live, so `export * from './database.js'` hands back the
|
|
404
|
+
* binding rather than a copy. Without this, a barrel file made every
|
|
405
|
+
* construct in it appear declared twice, and `constructs/index.ts` is the
|
|
406
|
+
* first thing anyone writes in a shared folder.
|
|
407
|
+
*
|
|
408
|
+
* Identity rather than file is also the more honest rule: what may not
|
|
409
|
+
* happen twice is two *different* constructs claiming one id, and that is
|
|
410
|
+
* still an error below.
|
|
411
|
+
*/
|
|
412
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
413
|
+
const globs = Array.isArray(patterns) ? [...patterns] : [patterns];
|
|
414
|
+
const files = fast_glob.default.stream(globs, {
|
|
415
|
+
cwd,
|
|
416
|
+
absolute: true
|
|
417
|
+
});
|
|
418
|
+
/** Matched files, for the diagnostic below. */
|
|
419
|
+
let matched = 0;
|
|
420
|
+
for await (const found of files) {
|
|
421
|
+
matched++;
|
|
422
|
+
const file = found.toString();
|
|
423
|
+
const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
|
|
424
|
+
for (const [exportName, exported] of Object.entries(module)) {
|
|
425
|
+
if (options.background) recordBackground(options.background, exported, file);
|
|
426
|
+
if (!isDeclarable(exported)) {
|
|
427
|
+
if (options.runnables) recordRunnable(options.runnables, exported);
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
if (seen.has(exported)) continue;
|
|
431
|
+
seen.add(exported);
|
|
432
|
+
if (options.runnables && typeof exported.owner === "string") recordRunnable(options.runnables, exported);
|
|
433
|
+
for (const declaration of exported.declare()) {
|
|
434
|
+
const id = (0, _geekmidas_manifest.canonicalId)(declaration.id);
|
|
435
|
+
const source = (0, node_path.relative)(cwd, file);
|
|
436
|
+
const claimed = sources[id];
|
|
437
|
+
if (claimed !== void 0 && claimed !== source) throw new DuplicateConstruct(id, [claimed, source]);
|
|
438
|
+
manifest[id] = {
|
|
439
|
+
...declaration,
|
|
440
|
+
id
|
|
441
|
+
};
|
|
442
|
+
sources[id] = source;
|
|
443
|
+
if (out) out[id] = {
|
|
444
|
+
file,
|
|
445
|
+
exportName,
|
|
446
|
+
construct: exported
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
(0, _geekmidas_manifest.assertDerivations)(manifest);
|
|
452
|
+
warnIfNothingFound(globs, matched, Object.keys(manifest).length);
|
|
453
|
+
return manifest;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Record where a worker's background work is declared: a cron, a queue
|
|
457
|
+
* consumer or a topic subscriber, under the worker that owns it.
|
|
458
|
+
*/
|
|
459
|
+
function recordBackground(background, exported, file) {
|
|
460
|
+
if (!_geekmidas_constructs_crons.Cron.isCron(exported) && !_geekmidas_constructs_queue.Queue.isQueue(exported) && !_geekmidas_constructs_subscribers.Subscriber.isSubscriber(exported)) return;
|
|
461
|
+
const owner = exported.owner;
|
|
462
|
+
if (typeof owner !== "string") return;
|
|
463
|
+
const key = (0, _geekmidas_manifest.canonicalId)(owner);
|
|
464
|
+
const files = background[key] ?? [];
|
|
465
|
+
background[key] = files;
|
|
466
|
+
if (!files.includes(file)) files.push(file);
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Record a runnable's edges under the construct that owns it — the surface an
|
|
470
|
+
* endpoint was built from, or the worker a cron or subscriber was. Anything
|
|
471
|
+
* with no owner, or that is not a runnable at all, is left alone.
|
|
472
|
+
*/
|
|
473
|
+
function recordRunnable(runnables, exported) {
|
|
474
|
+
if (typeof exported !== "object" || exported === null) return;
|
|
475
|
+
const runnable = exported;
|
|
476
|
+
const owner = typeof runnable.surface?.id === "string" ? runnable.surface.id : typeof runnable.owner === "string" ? runnable.owner : void 0;
|
|
477
|
+
if (!owner || !Array.isArray(runnable.constructs)) return;
|
|
478
|
+
const key = (0, _geekmidas_manifest.canonicalId)(owner);
|
|
479
|
+
const edges = runnables[key] ?? [];
|
|
480
|
+
runnables[key] = edges;
|
|
481
|
+
for (const id of runnable.constructs) {
|
|
482
|
+
if (typeof id !== "string") continue;
|
|
483
|
+
const target = (0, _geekmidas_manifest.canonicalId)(id);
|
|
484
|
+
if (!edges.includes(target)) edges.push(target);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Say so when a glob was configured and found nothing.
|
|
489
|
+
*
|
|
490
|
+
* The glob is not a filter over declarations already known — it is *how they
|
|
491
|
+
* are found*, by importing what it matches. So a file it misses is a
|
|
492
|
+
* declaration that does not exist, and every symptom of that appears somewhere
|
|
493
|
+
* other than the cause: no container starts, no env key is written, and the
|
|
494
|
+
* application fails on first use against a resource it can see in its own
|
|
495
|
+
* source.
|
|
496
|
+
*
|
|
497
|
+
* Nothing reported it before, because an unmatched file is indistinguishable
|
|
498
|
+
* from a file nobody wrote. These two cases are the ones that are *not*
|
|
499
|
+
* ambiguous — a glob was configured, so something was expected.
|
|
500
|
+
*
|
|
501
|
+
* Silent when no glob is configured at all: that is a project which has not
|
|
502
|
+
* adopted constructs, and has nothing to be missing.
|
|
503
|
+
*/
|
|
504
|
+
function warnIfNothingFound(globs, matched, declared) {
|
|
505
|
+
if (globs.length === 0) return;
|
|
506
|
+
if (matched === 0) {
|
|
507
|
+
logger.warn(`\n⚠️ The constructs glob matched no files, so nothing was declared.\n Patterns: ${globs.join(", ")}\n Nothing will be provisioned — no containers, no env keys, no resources.\n A common cause is depth: '*.ts' matches one level, '**/*.ts' matches any.`);
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
if (declared === 0) logger.warn(`\n⚠️ The constructs glob matched ${matched} file(s) but none declared anything.\n Patterns: ${globs.join(", ")}\n Discovery keeps exports with an 'id' that can 'declare()'. A construct that is\n built but never exported is invisible to it.`);
|
|
511
|
+
}
|
|
512
|
+
/** Two constructs claiming one id. */
|
|
513
|
+
var DuplicateConstruct = class extends Error {
|
|
514
|
+
/** The id claimed twice. */
|
|
515
|
+
id;
|
|
516
|
+
/** The files that claimed it. */
|
|
517
|
+
sources;
|
|
518
|
+
constructor(id, sources) {
|
|
519
|
+
super("Two constructs declare the same id");
|
|
520
|
+
this.name = "DuplicateConstruct";
|
|
521
|
+
this.id = id;
|
|
522
|
+
this.sources = sources;
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
//#endregion
|
|
526
|
+
Object.defineProperty(exports, "ConstructDiscoveryFailed", {
|
|
527
|
+
enumerable: true,
|
|
528
|
+
get: function() {
|
|
529
|
+
return ConstructDiscoveryFailed;
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
Object.defineProperty(exports, "ConstructGenerator", {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: function() {
|
|
535
|
+
return ConstructGenerator;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
Object.defineProperty(exports, "ConstructsNotSerializable", {
|
|
539
|
+
enumerable: true,
|
|
540
|
+
get: function() {
|
|
541
|
+
return ConstructsNotSerializable;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
Object.defineProperty(exports, "SandboxWorkerFailed", {
|
|
545
|
+
enumerable: true,
|
|
546
|
+
get: function() {
|
|
547
|
+
return SandboxWorkerFailed;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
Object.defineProperty(exports, "discover", {
|
|
551
|
+
enumerable: true,
|
|
552
|
+
get: function() {
|
|
553
|
+
return discover;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
Object.defineProperty(exports, "discover_exports", {
|
|
557
|
+
enumerable: true,
|
|
558
|
+
get: function() {
|
|
559
|
+
return discover_exports;
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
Object.defineProperty(exports, "isDeclarable", {
|
|
563
|
+
enumerable: true,
|
|
564
|
+
get: function() {
|
|
565
|
+
return isDeclarable;
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
Object.defineProperty(exports, "nodeWithTsx", {
|
|
569
|
+
enumerable: true,
|
|
570
|
+
get: function() {
|
|
571
|
+
return nodeWithTsx;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
Object.defineProperty(exports, "output", {
|
|
575
|
+
enumerable: true,
|
|
576
|
+
get: function() {
|
|
577
|
+
return output;
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
Object.defineProperty(exports, "runWorker", {
|
|
581
|
+
enumerable: true,
|
|
582
|
+
get: function() {
|
|
583
|
+
return runWorker;
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
Object.defineProperty(exports, "withOutput", {
|
|
587
|
+
enumerable: true,
|
|
588
|
+
get: function() {
|
|
589
|
+
return withOutput;
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
Object.defineProperty(exports, "withOwningTsconfigJsx", {
|
|
593
|
+
enumerable: true,
|
|
594
|
+
get: function() {
|
|
595
|
+
return withOwningTsconfigJsx;
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
//# sourceMappingURL=discover-D1It5r_h.cjs.map
|