@geekmidas/cli 10.0.0-alpha.18 → 10.0.0-alpha.181
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 +323 -380
- 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-CBKH87_b.mjs +1043 -0
- package/dist/EndpointGenerator-CBKH87_b.mjs.map +1 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs +1102 -0
- package/dist/EndpointGenerator-iyA3HkOH.cjs.map +1 -0
- package/dist/LegacyStateStore-DvufVJjQ.cjs +124 -0
- package/dist/LegacyStateStore-DvufVJjQ.cjs.map +1 -0
- package/dist/LegacyStateStore-p-_Z8ucw.mjs +124 -0
- package/dist/LegacyStateStore-p-_Z8ucw.mjs.map +1 -0
- package/dist/LocalStateStore-BKAi5XsN.mjs +167 -0
- package/dist/LocalStateStore-BKAi5XsN.mjs.map +1 -0
- package/dist/LocalStateStore-DLDD6udB.cjs +178 -0
- package/dist/LocalStateStore-DLDD6udB.cjs.map +1 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs +534 -0
- package/dist/OpenApiTsGenerator-CoVA3Ykv.mjs.map +1 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs +539 -0
- package/dist/OpenApiTsGenerator-vy-fOJgs.cjs.map +1 -0
- package/dist/S3StateStore-C8thID2w.mjs +223 -0
- package/dist/S3StateStore-C8thID2w.mjs.map +1 -0
- package/dist/S3StateStore-J3FztlVC.cjs +222 -0
- package/dist/S3StateStore-J3FztlVC.cjs.map +1 -0
- package/dist/SSMStateStore-0TQsme40.mjs +205 -0
- package/dist/SSMStateStore-0TQsme40.mjs.map +1 -0
- package/dist/SSMStateStore-DhkkSF1D.cjs +204 -0
- package/dist/SSMStateStore-DhkkSF1D.cjs.map +1 -0
- package/dist/SubscriberGenerator-B3jHf26s.mjs +787 -0
- package/dist/SubscriberGenerator-B3jHf26s.mjs.map +1 -0
- package/dist/SubscriberGenerator-JhwVlWBS.cjs +852 -0
- package/dist/SubscriberGenerator-JhwVlWBS.cjs.map +1 -0
- package/dist/add-DWCzdPLz.mjs +711 -0
- package/dist/add-DWCzdPLz.mjs.map +1 -0
- package/dist/add-gs34ewLG.cjs +713 -0
- package/dist/add-gs34ewLG.cjs.map +1 -0
- package/dist/appPorts-BoXMwolc.mjs +249 -0
- package/dist/appPorts-BoXMwolc.mjs.map +1 -0
- package/dist/appPorts-IW-OZmRi.cjs +296 -0
- package/dist/appPorts-IW-OZmRi.cjs.map +1 -0
- package/dist/apps-C27qrbEe.cjs +5174 -0
- package/dist/apps-C27qrbEe.cjs.map +1 -0
- package/dist/apps-D2oTQasd.mjs +4650 -0
- package/dist/apps-D2oTQasd.mjs.map +1 -0
- package/dist/aws-BXfiWNbi.cjs +108 -0
- package/dist/aws-BXfiWNbi.cjs.map +1 -0
- package/dist/aws-BjvSTTcE.mjs +97 -0
- package/dist/aws-BjvSTTcE.mjs.map +1 -0
- package/dist/awsStore-BYYCmXiq.mjs +121 -0
- package/dist/awsStore-BYYCmXiq.mjs.map +1 -0
- package/dist/awsStore-DKQUElJL.cjs +138 -0
- package/dist/awsStore-DKQUElJL.cjs.map +1 -0
- package/dist/{backup-provisioner-DIVCbfee.mjs → backup-provisioner-C8DnCmxK.mjs} +2 -2
- package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
- package/dist/{backup-provisioner-BmhIO_Yr.cjs → backup-provisioner-oDEsPj02.cjs} +2 -2
- 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-mwH7WOb1.mjs → bundler-CbT4y4H_.mjs} +68 -15
- package/dist/bundler-CbT4y4H_.mjs.map +1 -0
- package/dist/{bundler-mjqGAvu1.cjs → bundler-DGeOugof.cjs} +67 -14
- package/dist/bundler-DGeOugof.cjs.map +1 -0
- package/dist/cli-C-jUNT69.cjs +80 -0
- package/dist/cli-C-jUNT69.cjs.map +1 -0
- package/dist/cli-DKEJryS7.mjs +80 -0
- package/dist/cli-DKEJryS7.mjs.map +1 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts +10 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts.map +1 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts +10 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts.map +1 -0
- package/dist/compose-BpnSP2x7.mjs +2434 -0
- package/dist/compose-BpnSP2x7.mjs.map +1 -0
- package/dist/compose-DJAaJEqL.cjs +2925 -0
- package/dist/compose-DJAaJEqL.cjs.map +1 -0
- package/dist/compose-DmtR2f0l.cjs +3564 -0
- package/dist/compose-DmtR2f0l.cjs.map +1 -0
- package/dist/compose-Glqs13is.mjs +3451 -0
- package/dist/compose-Glqs13is.mjs.map +1 -0
- package/dist/config-BODxZemw.d.mts +291 -0
- package/dist/config-BODxZemw.d.mts.map +1 -0
- package/dist/config-C3U5HulX.d.cts +291 -0
- package/dist/config-C3U5HulX.d.cts.map +1 -0
- package/dist/config.cjs +457 -9
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +4 -117
- package/dist/config.d.mts +4 -117
- package/dist/config.mjs +441 -3
- package/dist/config.mjs.map +1 -0
- package/dist/credentialSchemas-D_85KW2k.mjs +236 -0
- package/dist/credentialSchemas-D_85KW2k.mjs.map +1 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs +271 -0
- package/dist/credentialSchemas-DjK6xKMk.cjs.map +1 -0
- package/dist/databases-CV22HzrI.mjs +588 -0
- package/dist/databases-CV22HzrI.mjs.map +1 -0
- package/dist/databases-DwYYH2mX.cjs +703 -0
- package/dist/databases-DwYYH2mX.cjs.map +1 -0
- package/dist/dbTunnel-DUudiQWj.cjs +154 -0
- package/dist/dbTunnel-DUudiQWj.cjs.map +1 -0
- package/dist/dbTunnel-KgbAh2v1.mjs +154 -0
- package/dist/dbTunnel-KgbAh2v1.mjs.map +1 -0
- package/dist/define-BfrNaY82.mjs +106 -0
- package/dist/define-BfrNaY82.mjs.map +1 -0
- package/dist/define-zKgLY65H.cjs +153 -0
- package/dist/define-zKgLY65H.cjs.map +1 -0
- package/dist/deploy/public.cjs +211 -0
- package/dist/deploy/public.cjs.map +1 -0
- package/dist/deploy/public.d.cts +659 -0
- package/dist/deploy/public.d.cts.map +1 -0
- package/dist/deploy/public.d.mts +659 -0
- package/dist/deploy/public.d.mts.map +1 -0
- package/dist/deploy/public.mjs +144 -0
- package/dist/deploy/public.mjs.map +1 -0
- 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 +1 -1
- package/dist/deploy/sniffer-hooks.mjs +1 -1
- package/dist/deploy/sniffer-loader.cjs +2 -2
- package/dist/deploy/sniffer-loader.mjs +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +2 -2
- package/dist/deploy/sniffer-routes-worker.mjs +1 -1
- package/dist/deploy-UkAiPzTp.mjs +3838 -0
- package/dist/deploy-UkAiPzTp.mjs.map +1 -0
- package/dist/deploy-ycRCutW9.cjs +3894 -0
- package/dist/deploy-ycRCutW9.cjs.map +1 -0
- package/dist/destroy-Cq5Un0kf.mjs +789 -0
- package/dist/destroy-Cq5Un0kf.mjs.map +1 -0
- package/dist/destroy-DzRzQcAR.cjs +790 -0
- package/dist/destroy-DzRzQcAR.cjs.map +1 -0
- package/dist/discover-Dfmn6HQ7.mjs +940 -0
- package/dist/discover-Dfmn6HQ7.mjs.map +1 -0
- package/dist/discover-OXczlq08.cjs +1085 -0
- package/dist/discover-OXczlq08.cjs.map +1 -0
- package/dist/dns-7zc-Mc9k.cjs +2257 -0
- package/dist/dns-7zc-Mc9k.cjs.map +1 -0
- package/dist/dns-dl7WUWmB.mjs +1820 -0
- package/dist/dns-dl7WUWmB.mjs.map +1 -0
- package/dist/docker-BDqp9Pfn.cjs +1798 -0
- package/dist/docker-BDqp9Pfn.cjs.map +1 -0
- package/dist/docker-MjMWQSEN.mjs +1649 -0
- package/dist/docker-MjMWQSEN.mjs.map +1 -0
- package/dist/dokploy-B0xtYCzY.mjs +38 -0
- package/dist/dokploy-B0xtYCzY.mjs.map +1 -0
- package/dist/dokploy-D-pBRnSV.cjs +38 -0
- package/dist/dokploy-D-pBRnSV.cjs.map +1 -0
- package/dist/drivers-BQRb3KsL.mjs +294 -0
- package/dist/drivers-BQRb3KsL.mjs.map +1 -0
- package/dist/drivers-DP7__dJX.cjs +377 -0
- package/dist/drivers-DP7__dJX.cjs.map +1 -0
- package/dist/eas-9danFNrJ.mjs +334 -0
- package/dist/eas-9danFNrJ.mjs.map +1 -0
- package/dist/eas-BJRA27vb.cjs +337 -0
- package/dist/eas-BJRA27vb.cjs.map +1 -0
- package/dist/emit-C4KSXOeS.mjs +153 -0
- package/dist/emit-C4KSXOeS.mjs.map +1 -0
- package/dist/emit-DiW0kbue.cjs +164 -0
- package/dist/emit-DiW0kbue.cjs.map +1 -0
- package/dist/encryption-0IiNCA3O.cjs +90 -0
- package/dist/encryption-0IiNCA3O.cjs.map +1 -0
- package/dist/encryption-ZDhvgGvu.mjs +89 -0
- package/dist/encryption-ZDhvgGvu.mjs.map +1 -0
- package/dist/engine-Csnr6XDu.mjs +3217 -0
- package/dist/engine-Csnr6XDu.mjs.map +1 -0
- package/dist/engine-DpjIgsGn.cjs +3330 -0
- package/dist/engine-DpjIgsGn.cjs.map +1 -0
- package/dist/errors-C9uIyIDt.mjs +27 -0
- package/dist/errors-C9uIyIDt.mjs.map +1 -0
- package/dist/errors-D1x8duqI.cjs +38 -0
- package/dist/errors-D1x8duqI.cjs.map +1 -0
- package/dist/github-Dej8EWxH.mjs +986 -0
- package/dist/github-Dej8EWxH.mjs.map +1 -0
- package/dist/github-HHxVur1m.cjs +987 -0
- package/dist/github-HHxVur1m.cjs.map +1 -0
- package/dist/googlePlay-DNrD-67X.mjs +931 -0
- package/dist/googlePlay-DNrD-67X.mjs.map +1 -0
- package/dist/googlePlay-NK1zgJJm.cjs +931 -0
- package/dist/googlePlay-NK1zgJJm.cjs.map +1 -0
- package/dist/iam-BzFyFf7T.mjs +442 -0
- package/dist/iam-BzFyFf7T.mjs.map +1 -0
- package/dist/iam-WIoKnLBp.cjs +521 -0
- package/dist/iam-WIoKnLBp.cjs.map +1 -0
- package/dist/{index-RCUizGxL.d.cts → index-BKgOlfK2.d.mts} +38 -14
- package/dist/index-BKgOlfK2.d.mts.map +1 -0
- package/dist/{index-B4H4XF7A.d.mts → index-zPzigXh-.d.cts} +38 -14
- package/dist/index-zPzigXh-.d.cts.map +1 -0
- package/dist/index.cjs +14502 -12767
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15137 -13400
- package/dist/index.mjs.map +1 -1
- package/dist/local-BW_VIsx0.cjs +241 -0
- package/dist/local-BW_VIsx0.cjs.map +1 -0
- package/dist/local-CVp-4wDb.mjs +224 -0
- package/dist/local-CVp-4wDb.mjs.map +1 -0
- package/dist/migrate-B8fq5egU.cjs +272 -0
- package/dist/migrate-B8fq5egU.cjs.map +1 -0
- package/dist/migrate-C8yCZ5P3.mjs +181 -0
- package/dist/migrate-C8yCZ5P3.mjs.map +1 -0
- package/dist/migrate-CkSq2f7k.mjs +267 -0
- package/dist/migrate-CkSq2f7k.mjs.map +1 -0
- package/dist/migrate-FOc2erAl.cjs +181 -0
- package/dist/migrate-FOc2erAl.cjs.map +1 -0
- package/dist/next.cjs +59 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +44 -0
- package/dist/next.d.cts.map +1 -0
- package/dist/next.d.mts +44 -0
- package/dist/next.d.mts.map +1 -0
- package/dist/next.mjs +58 -0
- package/dist/next.mjs.map +1 -0
- package/dist/notes--JQyDHim.cjs +510 -0
- package/dist/notes--JQyDHim.cjs.map +1 -0
- package/dist/notes-DXl9qERh.mjs +409 -0
- package/dist/notes-DXl9qERh.mjs.map +1 -0
- package/dist/openapi.cjs +213 -7
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.d.cts +27 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +27 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +208 -2
- package/dist/openapi.mjs.map +1 -0
- package/dist/projectBucket-CGpcWqyY.cjs +263 -0
- package/dist/projectBucket-CGpcWqyY.cjs.map +1 -0
- package/dist/projectBucket-TigJy25c.mjs +222 -0
- package/dist/projectBucket-TigJy25c.mjs.map +1 -0
- package/dist/provider-BvjDbsTR.mjs +46 -0
- package/dist/provider-BvjDbsTR.mjs.map +1 -0
- package/dist/provider-DLhgo-mB.cjs +57 -0
- package/dist/provider-DLhgo-mB.cjs.map +1 -0
- package/dist/publish-BPfW3DWi.mjs +123 -0
- package/dist/publish-BPfW3DWi.mjs.map +1 -0
- package/dist/publish-D4pC6_G0.cjs +124 -0
- package/dist/publish-D4pC6_G0.cjs.map +1 -0
- package/dist/ready-BcV28QoW.mjs +375 -0
- package/dist/ready-BcV28QoW.mjs.map +1 -0
- package/dist/ready-ByQvw4-W.cjs +404 -0
- package/dist/ready-ByQvw4-W.cjs.map +1 -0
- package/dist/reconcile/public.cjs +3 -5
- package/dist/reconcile/public.d.cts +33 -89
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +33 -89
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -3
- package/dist/reconcile--I7V4Klj.mjs +34 -0
- package/dist/reconcile--I7V4Klj.mjs.map +1 -0
- package/dist/reconcile-CuCQBa5-.cjs +34 -0
- package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
- package/dist/resolve-BmBR1vBr.cjs +316 -0
- package/dist/resolve-BmBR1vBr.cjs.map +1 -0
- package/dist/resolve-DA1kORng.mjs +263 -0
- package/dist/resolve-DA1kORng.mjs.map +1 -0
- package/dist/rollback-DlgQDX8m.mjs +136 -0
- package/dist/rollback-DlgQDX8m.mjs.map +1 -0
- package/dist/rollback-tsy4pyEp.cjs +165 -0
- package/dist/rollback-tsy4pyEp.cjs.map +1 -0
- package/dist/runtime-CaejlcZt.d.mts +82 -0
- package/dist/runtime-CaejlcZt.d.mts.map +1 -0
- package/dist/runtime-D3jD4Dvn.d.cts +82 -0
- package/dist/runtime-D3jD4Dvn.d.cts.map +1 -0
- package/dist/s3-BLEF-PQU.cjs +240 -0
- package/dist/s3-BLEF-PQU.cjs.map +1 -0
- package/dist/s3-DVYiOqWs.mjs +240 -0
- package/dist/s3-DVYiOqWs.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 +53 -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 +54 -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/{workspace-CRD9YinV.cjs → schemas-BCwKKA42.mjs} +399 -1179
- package/dist/schemas-BCwKKA42.mjs.map +1 -0
- package/dist/{workspace-Bu3xNCej.mjs → schemas-BQ_v0lEX.cjs} +487 -982
- package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
- package/dist/secretsManager-CjTo6CRq.mjs +113 -0
- package/dist/secretsManager-CjTo6CRq.mjs.map +1 -0
- package/dist/secretsManager-CvmBGjdM.cjs +124 -0
- package/dist/secretsManager-CvmBGjdM.cjs.map +1 -0
- package/dist/seeds-Bc3niNVb.cjs +382 -0
- package/dist/seeds-Bc3niNVb.cjs.map +1 -0
- package/dist/seeds-Ccn0Ru2T.mjs +299 -0
- package/dist/seeds-Ccn0Ru2T.mjs.map +1 -0
- package/dist/serverSetup-B_O65wLb.cjs +685 -0
- package/dist/serverSetup-B_O65wLb.cjs.map +1 -0
- package/dist/serverSetup-Dsy8drIb.mjs +685 -0
- package/dist/serverSetup-Dsy8drIb.mjs.map +1 -0
- package/dist/sniffer-Ckx4cr-o.cjs +1997 -0
- package/dist/sniffer-Ckx4cr-o.cjs.map +1 -0
- package/dist/sniffer-fBefNUuJ.mjs +1824 -0
- package/dist/sniffer-fBefNUuJ.mjs.map +1 -0
- package/dist/snsSubscriptions-BJ0LErGk.mjs +1010 -0
- package/dist/snsSubscriptions-BJ0LErGk.mjs.map +1 -0
- package/dist/snsSubscriptions-ChbFp-QP.cjs +1135 -0
- package/dist/snsSubscriptions-ChbFp-QP.cjs.map +1 -0
- package/dist/sst-BnuPeGyy.cjs +501 -0
- package/dist/sst-BnuPeGyy.cjs.map +1 -0
- package/dist/sst-Y7H_zaEZ.mjs +478 -0
- package/dist/sst-Y7H_zaEZ.mjs.map +1 -0
- package/dist/stack-BAipv5Js.cjs +1887 -0
- package/dist/stack-BAipv5Js.cjs.map +1 -0
- package/dist/stack-BHrGbsGA.mjs +1777 -0
- package/dist/stack-BHrGbsGA.mjs.map +1 -0
- package/dist/stage-BSZ9890H.mjs +303 -0
- package/dist/stage-BSZ9890H.mjs.map +1 -0
- package/dist/stage-D7vBtLXL.cjs +332 -0
- package/dist/stage-D7vBtLXL.cjs.map +1 -0
- package/dist/stages-BeSQQQ4z.cjs +190 -0
- package/dist/stages-BeSQQQ4z.cjs.map +1 -0
- package/dist/stages-DjFKQv08.mjs +190 -0
- package/dist/stages-DjFKQv08.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-B7G-FtkD.cjs +85 -0
- package/dist/terminal-B7G-FtkD.cjs.map +1 -0
- package/dist/terminal-lp8RwHdX.mjs +85 -0
- package/dist/terminal-lp8RwHdX.mjs.map +1 -0
- package/dist/{types-7R81hu0i.d.mts → types-CLxsw-QY.d.cts} +2135 -428
- package/dist/types-CLxsw-QY.d.cts.map +1 -0
- package/dist/{types-N7c2O2m7.d.cts → types-wLlwkSib.d.mts} +2133 -428
- package/dist/types-wLlwkSib.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 +6 -2
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -2
- package/dist/workspace-DJjhfAGf.mjs +3027 -0
- package/dist/workspace-DJjhfAGf.mjs.map +1 -0
- package/dist/workspace-wTLnc1Ef.cjs +3577 -0
- package/dist/workspace-wTLnc1Ef.cjs.map +1 -0
- package/package.json +76 -13
- package/dist/HostingerProvider-BY26bWwB.mjs +0 -243
- package/dist/HostingerProvider-BY26bWwB.mjs.map +0 -1
- package/dist/HostingerProvider-BZFGYYVA.cjs +0 -243
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +0 -1
- package/dist/LocalStateProvider-7HR6SS2t.cjs +0 -48
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +0 -1
- package/dist/LocalStateProvider-D7QyJoLM.mjs +0 -48
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +0 -1
- package/dist/Route53Provider-Cvj40A8I.mjs +0 -209
- package/dist/Route53Provider-Cvj40A8I.mjs.map +0 -1
- package/dist/Route53Provider-DVILBsvV.cjs +0 -209
- package/dist/Route53Provider-DVILBsvV.cjs.map +0 -1
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs +0 -75
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +0 -1
- package/dist/SSMStateProvider-VrQ-yeqd.cjs +0 -74
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +0 -1
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +0 -1
- package/dist/backup-provisioner-DIVCbfee.mjs.map +0 -1
- package/dist/bundler-mjqGAvu1.cjs.map +0 -1
- package/dist/bundler-mwH7WOb1.mjs.map +0 -1
- package/dist/config-DSXI480r.cjs +0 -467
- package/dist/config-DSXI480r.cjs.map +0 -1
- package/dist/config-DdKkoUE1.mjs +0 -414
- package/dist/config-DdKkoUE1.mjs.map +0 -1
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts.map +0 -1
- package/dist/credentials-C6Pfn6GY.cjs +0 -2939
- package/dist/credentials-C6Pfn6GY.cjs.map +0 -1
- package/dist/credentials-lbv-j0Be.mjs +0 -2802
- package/dist/credentials-lbv-j0Be.mjs.map +0 -1
- package/dist/discover-BERGFg8v.cjs +0 -288
- package/dist/discover-BERGFg8v.cjs.map +0 -1
- package/dist/discover-CK-n3w6b.mjs +0 -244
- package/dist/discover-CK-n3w6b.mjs.map +0 -1
- package/dist/emit-BdoPFjZf.cjs +0 -253
- package/dist/emit-BdoPFjZf.cjs.map +0 -1
- package/dist/emit-Bzq7JsMP.mjs +0 -224
- package/dist/emit-Bzq7JsMP.mjs.map +0 -1
- package/dist/generator-LfZU7NlU.mjs +0 -247
- package/dist/generator-LfZU7NlU.mjs.map +0 -1
- package/dist/generator-Wdfp0jCS.cjs +0 -282
- package/dist/generator-Wdfp0jCS.cjs.map +0 -1
- package/dist/github-DlIrXPee.mjs +0 -216
- package/dist/github-DlIrXPee.mjs.map +0 -1
- package/dist/github-n7N9yOff.cjs +0 -216
- package/dist/github-n7N9yOff.cjs.map +0 -1
- package/dist/index-B4H4XF7A.d.mts.map +0 -1
- package/dist/index-RCUizGxL.d.cts.map +0 -1
- package/dist/openapi-B8bu_OXN.cjs +0 -2038
- package/dist/openapi-B8bu_OXN.cjs.map +0 -1
- package/dist/openapi-DfjbhrsM.mjs +0 -1991
- package/dist/openapi-DfjbhrsM.mjs.map +0 -1
- package/dist/reconcile-Cq4cO83R.cjs +0 -136
- package/dist/reconcile-Cq4cO83R.cjs.map +0 -1
- package/dist/reconcile-fmoluZmZ.mjs +0 -113
- package/dist/reconcile-fmoluZmZ.mjs.map +0 -1
- package/dist/ssm-BKN1Cg4z.mjs +0 -60
- package/dist/ssm-BKN1Cg4z.mjs.map +0 -1
- package/dist/ssm-FxeSAt35.cjs +0 -60
- package/dist/ssm-FxeSAt35.cjs.map +0 -1
- package/dist/storage-DgypfSD6.cjs +0 -351
- package/dist/storage-DgypfSD6.cjs.map +0 -1
- package/dist/storage-TP0x118M.mjs +0 -304
- package/dist/storage-TP0x118M.mjs.map +0 -1
- package/dist/transfer-2aRVVJ6I.mjs +0 -122
- package/dist/transfer-2aRVVJ6I.mjs.map +0 -1
- package/dist/transfer-C3WZVmj_.cjs +0 -151
- package/dist/transfer-C3WZVmj_.cjs.map +0 -1
- package/dist/types-7R81hu0i.d.mts.map +0 -1
- package/dist/types-N7c2O2m7.d.cts.map +0 -1
- package/dist/workspace-Bu3xNCej.mjs.map +0 -1
- package/dist/workspace-CRD9YinV.cjs.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { t as GkmError } from "./errors-C9uIyIDt.mjs";
|
|
2
|
+
import { i as DeployTargetNotYetSupported } from "./define-BfrNaY82.mjs";
|
|
3
|
+
//#region src/target/provider.ts
|
|
4
|
+
/**
|
|
5
|
+
* `gkm deploy --provider`, from before there were targets.
|
|
6
|
+
*
|
|
7
|
+
* It named three things, and only one of them ever deployed a workspace:
|
|
8
|
+
* `dokploy` is now the target of that name; `docker` and `aws-lambda` were
|
|
9
|
+
* accepted and always failed, so they are gone with a pointer to what does
|
|
10
|
+
* the job.
|
|
11
|
+
*/
|
|
12
|
+
/** What each removed provider's job is done with now. */
|
|
13
|
+
const REMOVED = {
|
|
14
|
+
docker: "Build images with `gkm docker`, or run the stage as one Docker Compose stack with `gkm compose`",
|
|
15
|
+
"aws-lambda": "Deploy to AWS with SST: set deploy: { default: 'sst' } and run `gkm deploy --stage <stage>`, which runs `sst deploy`"
|
|
16
|
+
};
|
|
17
|
+
/** A `--provider` that no longer exists. */
|
|
18
|
+
var ProviderRemoved = class extends GkmError {
|
|
19
|
+
provider;
|
|
20
|
+
instead;
|
|
21
|
+
constructor(provider, instead) {
|
|
22
|
+
super(`--provider ${provider} has been removed. ${instead}.`);
|
|
23
|
+
this.provider = provider;
|
|
24
|
+
this.instead = instead;
|
|
25
|
+
this.name = "ProviderRemoved";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/** The deprecation `--provider` prints when it still means something. */
|
|
29
|
+
function providerDeprecation(provider) {
|
|
30
|
+
return `--provider is deprecated; use --target ${provider}.`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The target a `--provider` value means. `warn` hears the deprecation; a
|
|
34
|
+
* provider that is gone, or a target not deployable yet, throws.
|
|
35
|
+
*/
|
|
36
|
+
function targetForProvider(provider, warn) {
|
|
37
|
+
const removed = REMOVED[provider];
|
|
38
|
+
if (removed) throw new ProviderRemoved(provider, removed);
|
|
39
|
+
if (provider === "vercel" || provider === "cloudflare") throw new DeployTargetNotYetSupported(provider);
|
|
40
|
+
warn(providerDeprecation(provider));
|
|
41
|
+
return provider;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { targetForProvider as n, ProviderRemoved as t };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=provider-BvjDbsTR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-BvjDbsTR.mjs","names":[],"sources":["../src/target/provider.ts"],"sourcesContent":["/**\n * `gkm deploy --provider`, from before there were targets.\n *\n * It named three things, and only one of them ever deployed a workspace:\n * `dokploy` is now the target of that name; `docker` and `aws-lambda` were\n * accepted and always failed, so they are gone with a pointer to what does\n * the job.\n */\n\nimport { GkmError } from '../errors';\nimport { DeployTargetNotYetSupported } from './builtins';\n\n/** What each removed provider's job is done with now. */\nconst REMOVED: Record<string, string> = {\n\tdocker:\n\t\t'Build images with `gkm docker`, or run the stage as one Docker Compose stack with `gkm compose`',\n\t'aws-lambda':\n\t\t\"Deploy to AWS with SST: set deploy: { default: 'sst' } and run `gkm deploy --stage <stage>`, which runs `sst deploy`\",\n};\n\n/** A `--provider` that no longer exists. */\nexport class ProviderRemoved extends GkmError {\n\tconstructor(\n\t\treadonly provider: string,\n\t\t/** What to use instead. */\n\t\treadonly instead: string,\n\t) {\n\t\tsuper(`--provider ${provider} has been removed. ${instead}.`);\n\t\tthis.name = 'ProviderRemoved';\n\t}\n}\n\n/** The deprecation `--provider` prints when it still means something. */\nexport function providerDeprecation(provider: string): string {\n\treturn `--provider is deprecated; use --target ${provider}.`;\n}\n\n/**\n * The target a `--provider` value means. `warn` hears the deprecation; a\n * provider that is gone, or a target not deployable yet, throws.\n */\nexport function targetForProvider(\n\tprovider: string,\n\twarn: (message: string) => void,\n): string {\n\tconst removed = REMOVED[provider];\n\tif (removed) throw new ProviderRemoved(provider, removed);\n\tif (provider === 'vercel' || provider === 'cloudflare') {\n\t\tthrow new DeployTargetNotYetSupported(provider);\n\t}\n\twarn(providerDeprecation(provider));\n\treturn provider;\n}\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,UAAkC;CACvC,QACC;CACD,cACC;AACF;;AAGA,IAAa,kBAAb,cAAqC,SAAS;CAEnC;CAEA;CAHV,YACC,UAEA,SACC;EACD,MAAM,cAAc,SAAS,qBAAqB,QAAQ,EAAE;EAJnD,KAAA,WAAA;EAEA,KAAA,UAAA;EAGT,KAAK,OAAO;CACb;AACD;;AAGA,SAAgB,oBAAoB,UAA0B;CAC7D,OAAO,0CAA0C,SAAS;AAC3D;;;;;AAMA,SAAgB,kBACf,UACA,MACS;CACT,MAAM,UAAU,QAAQ;CACxB,IAAI,SAAS,MAAM,IAAI,gBAAgB,UAAU,OAAO;CACxD,IAAI,aAAa,YAAY,aAAa,cACzC,MAAM,IAAI,4BAA4B,QAAQ;CAE/C,KAAK,oBAAoB,QAAQ,CAAC;CAClC,OAAO;AACR"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
2
|
+
const require_define = require("./define-zKgLY65H.cjs");
|
|
3
|
+
//#region src/target/provider.ts
|
|
4
|
+
/**
|
|
5
|
+
* `gkm deploy --provider`, from before there were targets.
|
|
6
|
+
*
|
|
7
|
+
* It named three things, and only one of them ever deployed a workspace:
|
|
8
|
+
* `dokploy` is now the target of that name; `docker` and `aws-lambda` were
|
|
9
|
+
* accepted and always failed, so they are gone with a pointer to what does
|
|
10
|
+
* the job.
|
|
11
|
+
*/
|
|
12
|
+
/** What each removed provider's job is done with now. */
|
|
13
|
+
const REMOVED = {
|
|
14
|
+
docker: "Build images with `gkm docker`, or run the stage as one Docker Compose stack with `gkm compose`",
|
|
15
|
+
"aws-lambda": "Deploy to AWS with SST: set deploy: { default: 'sst' } and run `gkm deploy --stage <stage>`, which runs `sst deploy`"
|
|
16
|
+
};
|
|
17
|
+
/** A `--provider` that no longer exists. */
|
|
18
|
+
var ProviderRemoved = class extends require_errors.GkmError {
|
|
19
|
+
provider;
|
|
20
|
+
instead;
|
|
21
|
+
constructor(provider, instead) {
|
|
22
|
+
super(`--provider ${provider} has been removed. ${instead}.`);
|
|
23
|
+
this.provider = provider;
|
|
24
|
+
this.instead = instead;
|
|
25
|
+
this.name = "ProviderRemoved";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/** The deprecation `--provider` prints when it still means something. */
|
|
29
|
+
function providerDeprecation(provider) {
|
|
30
|
+
return `--provider is deprecated; use --target ${provider}.`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The target a `--provider` value means. `warn` hears the deprecation; a
|
|
34
|
+
* provider that is gone, or a target not deployable yet, throws.
|
|
35
|
+
*/
|
|
36
|
+
function targetForProvider(provider, warn) {
|
|
37
|
+
const removed = REMOVED[provider];
|
|
38
|
+
if (removed) throw new ProviderRemoved(provider, removed);
|
|
39
|
+
if (provider === "vercel" || provider === "cloudflare") throw new require_define.DeployTargetNotYetSupported(provider);
|
|
40
|
+
warn(providerDeprecation(provider));
|
|
41
|
+
return provider;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
Object.defineProperty(exports, "ProviderRemoved", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function() {
|
|
47
|
+
return ProviderRemoved;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "targetForProvider", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function() {
|
|
53
|
+
return targetForProvider;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=provider-DLhgo-mB.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-DLhgo-mB.cjs","names":["GkmError","DeployTargetNotYetSupported"],"sources":["../src/target/provider.ts"],"sourcesContent":["/**\n * `gkm deploy --provider`, from before there were targets.\n *\n * It named three things, and only one of them ever deployed a workspace:\n * `dokploy` is now the target of that name; `docker` and `aws-lambda` were\n * accepted and always failed, so they are gone with a pointer to what does\n * the job.\n */\n\nimport { GkmError } from '../errors';\nimport { DeployTargetNotYetSupported } from './builtins';\n\n/** What each removed provider's job is done with now. */\nconst REMOVED: Record<string, string> = {\n\tdocker:\n\t\t'Build images with `gkm docker`, or run the stage as one Docker Compose stack with `gkm compose`',\n\t'aws-lambda':\n\t\t\"Deploy to AWS with SST: set deploy: { default: 'sst' } and run `gkm deploy --stage <stage>`, which runs `sst deploy`\",\n};\n\n/** A `--provider` that no longer exists. */\nexport class ProviderRemoved extends GkmError {\n\tconstructor(\n\t\treadonly provider: string,\n\t\t/** What to use instead. */\n\t\treadonly instead: string,\n\t) {\n\t\tsuper(`--provider ${provider} has been removed. ${instead}.`);\n\t\tthis.name = 'ProviderRemoved';\n\t}\n}\n\n/** The deprecation `--provider` prints when it still means something. */\nexport function providerDeprecation(provider: string): string {\n\treturn `--provider is deprecated; use --target ${provider}.`;\n}\n\n/**\n * The target a `--provider` value means. `warn` hears the deprecation; a\n * provider that is gone, or a target not deployable yet, throws.\n */\nexport function targetForProvider(\n\tprovider: string,\n\twarn: (message: string) => void,\n): string {\n\tconst removed = REMOVED[provider];\n\tif (removed) throw new ProviderRemoved(provider, removed);\n\tif (provider === 'vercel' || provider === 'cloudflare') {\n\t\tthrow new DeployTargetNotYetSupported(provider);\n\t}\n\twarn(providerDeprecation(provider));\n\treturn provider;\n}\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,UAAkC;CACvC,QACC;CACD,cACC;AACF;;AAGA,IAAa,kBAAb,cAAqCA,eAAAA,SAAS;CAEnC;CAEA;CAHV,YACC,UAEA,SACC;EACD,MAAM,cAAc,SAAS,qBAAqB,QAAQ,EAAE;EAJnD,KAAA,WAAA;EAEA,KAAA,UAAA;EAGT,KAAK,OAAO;CACb;AACD;;AAGA,SAAgB,oBAAoB,UAA0B;CAC7D,OAAO,0CAA0C,SAAS;AAC3D;;;;;AAMA,SAAgB,kBACf,UACA,MACS;CACT,MAAM,UAAU,QAAQ;CACxB,IAAI,SAAS,MAAM,IAAI,gBAAgB,UAAU,OAAO;CACxD,IAAI,aAAa,YAAY,aAAa,cACzC,MAAM,IAAIC,eAAAA,4BAA4B,QAAQ;CAE/C,KAAK,oBAAoB,QAAQ,CAAC;CAClC,OAAO;AACR"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { t as GkmError } from "./errors-C9uIyIDt.mjs";
|
|
2
|
+
import { easCli, easSync } from "./eas-9danFNrJ.mjs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
//#region src/mobile/publish.ts
|
|
7
|
+
/**
|
|
8
|
+
* `gkm publish --stage <stage>`: a mobile app shipped for a deployed stage.
|
|
9
|
+
*
|
|
10
|
+
* First the stage's EAS project is synced (`gkm eas:sync`), so what is built
|
|
11
|
+
* reads the stage's values. Then, per platform, the cheapest release that
|
|
12
|
+
* gets the app's current code to the stage's users:
|
|
13
|
+
*
|
|
14
|
+
* - **An update**, when a store build with the same native code is already
|
|
15
|
+
* out: the fingerprint `runtimeVersion: { policy: 'fingerprint' }` gives a
|
|
16
|
+
* build is computed with the stage's profile, and a finished store build
|
|
17
|
+
* of that profile with that fingerprint means only JavaScript changed. It
|
|
18
|
+
* goes out on the stage's channel (`eas update`), which only builds of
|
|
19
|
+
* that runtime receive.
|
|
20
|
+
* - **A store build**, otherwise, submitted to the store as the stage's
|
|
21
|
+
* submit profile says (`eas build --auto-submit`): Android to its Play
|
|
22
|
+
* track; iOS to App Store Connect once `submit.<stage>.ios.ascAppId` is
|
|
23
|
+
* set — without it, iOS is built and not submitted, and gkm says so,
|
|
24
|
+
* rather than leave a prompt nobody in CI can answer.
|
|
25
|
+
*
|
|
26
|
+
* `--build` or `--update` decides instead. An update with no store build to
|
|
27
|
+
* receive it reaches nobody, so `--update` without one is refused.
|
|
28
|
+
*/
|
|
29
|
+
const logger = console;
|
|
30
|
+
/** `--update`, and no store build has this native code. */
|
|
31
|
+
var NoStoreBuildForUpdate = class extends GkmError {
|
|
32
|
+
platform;
|
|
33
|
+
stage;
|
|
34
|
+
fingerprint;
|
|
35
|
+
constructor(platform, stage, fingerprint) {
|
|
36
|
+
super(`No ${platform} store build of '${stage}' has this native code (fingerprint ${fingerprint}), so an update would reach nobody: a phone only takes updates for the runtime it was built with. Build one: gkm publish --stage ${stage} --platform ${platform} --build.`);
|
|
37
|
+
this.platform = platform;
|
|
38
|
+
this.stage = stage;
|
|
39
|
+
this.fingerprint = fingerprint;
|
|
40
|
+
this.name = "NoStoreBuildForUpdate";
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/** `--build` and `--update` together. */
|
|
44
|
+
var PublishModeConflict = class extends GkmError {
|
|
45
|
+
constructor() {
|
|
46
|
+
super("Pass --build or --update, not both: one release per platform.");
|
|
47
|
+
this.name = "PublishModeConflict";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Ship a mobile app for a deployed stage.
|
|
52
|
+
*
|
|
53
|
+
* @throws {NoStoreBuildForUpdate} — and what `easSync` throws
|
|
54
|
+
*/
|
|
55
|
+
async function publish(options, eas) {
|
|
56
|
+
const synced = await easSync(options, eas);
|
|
57
|
+
const cli = eas ?? easCli(synced.root, synced.values);
|
|
58
|
+
const { dir, stage } = synced;
|
|
59
|
+
const profile = stage.stage;
|
|
60
|
+
const easJson = existsSync(join(dir, "eas.json")) ? JSON.parse(readFileSync(join(dir, "eas.json"), "utf8")) : {};
|
|
61
|
+
const iosSubmits = Boolean(easJson.submit?.[profile]?.ios?.ascAppId);
|
|
62
|
+
const platforms = !options.platform || options.platform === "all" ? ["ios", "android"] : [options.platform];
|
|
63
|
+
const releases = [];
|
|
64
|
+
for (const platform of platforms) {
|
|
65
|
+
const fingerprint = await cli.fingerprint(dir, {
|
|
66
|
+
platform,
|
|
67
|
+
profile
|
|
68
|
+
});
|
|
69
|
+
const storeBuild = options.mode === "build" ? void 0 : await cli.storeBuild(dir, {
|
|
70
|
+
platform,
|
|
71
|
+
profile,
|
|
72
|
+
fingerprint
|
|
73
|
+
});
|
|
74
|
+
if (options.mode === "update" && !storeBuild) throw new NoStoreBuildForUpdate(platform, profile, fingerprint);
|
|
75
|
+
const release = options.mode ?? (storeBuild ? "update" : "build");
|
|
76
|
+
const submit = platform === "android" || iosSubmits;
|
|
77
|
+
releases.push({
|
|
78
|
+
platform,
|
|
79
|
+
fingerprint,
|
|
80
|
+
...storeBuild ? { storeBuild } : {},
|
|
81
|
+
release,
|
|
82
|
+
submit: release === "build" && submit
|
|
83
|
+
});
|
|
84
|
+
const why = storeBuild ? `store build ${storeBuild} has this native code` : "no store build has this native code";
|
|
85
|
+
if (release === "update") {
|
|
86
|
+
logger.log(`🔁 ${platform}: an update on '${stage.channel}' (${why})${options.dryRun ? " (dry run)" : ""}`);
|
|
87
|
+
if (options.dryRun) continue;
|
|
88
|
+
await cli.update(dir, {
|
|
89
|
+
platform,
|
|
90
|
+
channel: stage.channel,
|
|
91
|
+
environment: stage.environment,
|
|
92
|
+
message: options.message ?? commitSubject(synced.root, profile)
|
|
93
|
+
});
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const where = platform === "android" ? `submitted to Play's ${stage.android.track} track (${stage.android.releaseStatus})` : iosSubmits ? "submitted to App Store Connect" : `not submitted: submit.${profile}.ios.ascAppId is not set in eas.json`;
|
|
97
|
+
logger.log(`📦 ${platform}: a store build of '${profile}', ${where} (${why})${options.dryRun ? " (dry run)" : ""}`);
|
|
98
|
+
if (options.dryRun) continue;
|
|
99
|
+
await cli.build(dir, {
|
|
100
|
+
platform,
|
|
101
|
+
profile,
|
|
102
|
+
submit,
|
|
103
|
+
wait: options.wait ?? false
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return releases;
|
|
107
|
+
}
|
|
108
|
+
/** The current commit's subject, for an update's message. */
|
|
109
|
+
function commitSubject(root, stage) {
|
|
110
|
+
const result = spawnSync("git", [
|
|
111
|
+
"log",
|
|
112
|
+
"-1",
|
|
113
|
+
"--format=%s"
|
|
114
|
+
], {
|
|
115
|
+
cwd: root,
|
|
116
|
+
encoding: "utf8"
|
|
117
|
+
});
|
|
118
|
+
return (result.status === 0 ? result.stdout.trim() : "") || `gkm publish --stage ${stage}`;
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { PublishModeConflict, publish };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=publish-BPfW3DWi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-BPfW3DWi.mjs","names":[],"sources":["../src/mobile/publish.ts"],"sourcesContent":["/**\n * `gkm publish --stage <stage>`: a mobile app shipped for a deployed stage.\n *\n * First the stage's EAS project is synced (`gkm eas:sync`), so what is built\n * reads the stage's values. Then, per platform, the cheapest release that\n * gets the app's current code to the stage's users:\n *\n * - **An update**, when a store build with the same native code is already\n * out: the fingerprint `runtimeVersion: { policy: 'fingerprint' }` gives a\n * build is computed with the stage's profile, and a finished store build\n * of that profile with that fingerprint means only JavaScript changed. It\n * goes out on the stage's channel (`eas update`), which only builds of\n * that runtime receive.\n * - **A store build**, otherwise, submitted to the store as the stage's\n * submit profile says (`eas build --auto-submit`): Android to its Play\n * track; iOS to App Store Connect once `submit.<stage>.ios.ascAppId` is\n * set — without it, iOS is built and not submitted, and gkm says so,\n * rather than leave a prompt nobody in CI can answer.\n *\n * `--build` or `--update` decides instead. An update with no store build to\n * receive it reaches nobody, so `--update` without one is refused.\n */\n\nimport { spawnSync } from 'node:child_process';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { GkmError } from '../errors';\nimport {\n\ttype EasCli,\n\ttype EasPlatform,\n\ttype EasSyncOptions,\n\teasCli,\n\teasSync,\n} from './eas.js';\n\nconst logger = console;\n\n/** `--update`, and no store build has this native code. */\nexport class NoStoreBuildForUpdate extends GkmError {\n\tconstructor(\n\t\treadonly platform: EasPlatform,\n\t\treadonly stage: string,\n\t\treadonly fingerprint: string,\n\t) {\n\t\tsuper(\n\t\t\t`No ${platform} store build of '${stage}' has this native code ` +\n\t\t\t\t`(fingerprint ${fingerprint}), so an update would reach nobody: a phone ` +\n\t\t\t\t'only takes updates for the runtime it was built with. Build one: ' +\n\t\t\t\t`gkm publish --stage ${stage} --platform ${platform} --build.`,\n\t\t);\n\t\tthis.name = 'NoStoreBuildForUpdate';\n\t}\n}\n\n/** `--build` and `--update` together. */\nexport class PublishModeConflict extends GkmError {\n\tconstructor() {\n\t\tsuper('Pass --build or --update, not both: one release per platform.');\n\t\tthis.name = 'PublishModeConflict';\n\t}\n}\n\nexport interface PublishOptions extends EasSyncOptions {\n\t/** `ios`, `android`, or both (the default). */\n\tplatform?: EasPlatform | 'all';\n\t/** Build, or update, whatever the fingerprint says. */\n\tmode?: 'build' | 'update';\n\t/** Wait for a build to finish (and submit), rather than leave it on EAS. */\n\twait?: boolean;\n\t/** The update's message: the commit's subject by default. */\n\tmessage?: string;\n}\n\n/** What one platform's release was — or, dry, would be. */\nexport interface PlatformRelease {\n\tplatform: EasPlatform;\n\tfingerprint: string;\n\t/** The store build that already has this native code, if one does. */\n\tstoreBuild?: string;\n\trelease: 'build' | 'update';\n\t/** Whether a build is submitted to its store. */\n\tsubmit: boolean;\n}\n\n/**\n * Ship a mobile app for a deployed stage.\n *\n * @throws {NoStoreBuildForUpdate} — and what `easSync` throws\n */\nexport async function publish(\n\toptions: PublishOptions,\n\teas?: EasCli,\n): Promise<PlatformRelease[]> {\n\tconst synced = await easSync(options, eas);\n\tconst cli = eas ?? easCli(synced.root, synced.values);\n\tconst { dir, stage } = synced;\n\tconst profile = stage.stage;\n\n\tconst easJson = existsSync(join(dir, 'eas.json'))\n\t\t? (JSON.parse(readFileSync(join(dir, 'eas.json'), 'utf8')) as {\n\t\t\t\tsubmit?: Record<string, { ios?: { ascAppId?: string } }>;\n\t\t\t})\n\t\t: {};\n\tconst iosSubmits = Boolean(easJson.submit?.[profile]?.ios?.ascAppId);\n\n\tconst platforms: EasPlatform[] =\n\t\t!options.platform || options.platform === 'all'\n\t\t\t? ['ios', 'android']\n\t\t\t: [options.platform];\n\n\tconst releases: PlatformRelease[] = [];\n\tfor (const platform of platforms) {\n\t\tconst fingerprint = await cli.fingerprint(dir, { platform, profile });\n\t\tconst storeBuild =\n\t\t\toptions.mode === 'build'\n\t\t\t\t? undefined\n\t\t\t\t: await cli.storeBuild(dir, { platform, profile, fingerprint });\n\t\tif (options.mode === 'update' && !storeBuild) {\n\t\t\tthrow new NoStoreBuildForUpdate(platform, profile, fingerprint);\n\t\t}\n\t\tconst release = options.mode ?? (storeBuild ? 'update' : 'build');\n\t\tconst submit = platform === 'android' || iosSubmits;\n\t\treleases.push({\n\t\t\tplatform,\n\t\t\tfingerprint,\n\t\t\t...(storeBuild ? { storeBuild } : {}),\n\t\t\trelease,\n\t\t\tsubmit: release === 'build' && submit,\n\t\t});\n\n\t\tconst why = storeBuild\n\t\t\t? `store build ${storeBuild} has this native code`\n\t\t\t: 'no store build has this native code';\n\t\tif (release === 'update') {\n\t\t\tlogger.log(\n\t\t\t\t`🔁 ${platform}: an update on '${stage.channel}' (${why})${options.dryRun ? ' (dry run)' : ''}`,\n\t\t\t);\n\t\t\tif (options.dryRun) continue;\n\t\t\tawait cli.update(dir, {\n\t\t\t\tplatform,\n\t\t\t\tchannel: stage.channel,\n\t\t\t\tenvironment: stage.environment,\n\t\t\t\tmessage: options.message ?? commitSubject(synced.root, profile),\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst where =\n\t\t\tplatform === 'android'\n\t\t\t\t? `submitted to Play's ${stage.android.track} track (${stage.android.releaseStatus})`\n\t\t\t\t: iosSubmits\n\t\t\t\t\t? 'submitted to App Store Connect'\n\t\t\t\t\t: `not submitted: submit.${profile}.ios.ascAppId is not set in eas.json`;\n\t\tlogger.log(\n\t\t\t`📦 ${platform}: a store build of '${profile}', ${where} (${why})${options.dryRun ? ' (dry run)' : ''}`,\n\t\t);\n\t\tif (options.dryRun) continue;\n\t\tawait cli.build(dir, {\n\t\t\tplatform,\n\t\t\tprofile,\n\t\t\tsubmit,\n\t\t\twait: options.wait ?? false,\n\t\t});\n\t}\n\treturn releases;\n}\n\n/** The current commit's subject, for an update's message. */\nfunction commitSubject(root: string, stage: string): string {\n\tconst result = spawnSync('git', ['log', '-1', '--format=%s'], {\n\t\tcwd: root,\n\t\tencoding: 'utf8',\n\t});\n\tconst subject = result.status === 0 ? result.stdout.trim() : '';\n\treturn subject || `gkm publish --stage ${stage}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,SAAS;;AAGf,IAAa,wBAAb,cAA2C,SAAS;CAEzC;CACA;CACA;CAHV,YACC,UACA,OACA,aACC;EACD,MACC,MAAM,SAAS,mBAAmB,MAAM,sCACvB,YAAY,mIAEL,MAAM,cAAc,SAAS,UACtD;EATS,KAAA,WAAA;EACA,KAAA,QAAA;EACA,KAAA,cAAA;EAQT,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,sBAAb,cAAyC,SAAS;CACjD,cAAc;EACb,MAAM,+DAA+D;EACrE,KAAK,OAAO;CACb;AACD;;;;;;AA6BA,eAAsB,QACrB,SACA,KAC6B;CAC7B,MAAM,SAAS,MAAM,QAAQ,SAAS,GAAG;CACzC,MAAM,MAAM,OAAO,OAAO,OAAO,MAAM,OAAO,MAAM;CACpD,MAAM,EAAE,KAAK,UAAU;CACvB,MAAM,UAAU,MAAM;CAEtB,MAAM,UAAU,WAAW,KAAK,KAAK,UAAU,CAAC,IAC5C,KAAK,MAAM,aAAa,KAAK,KAAK,UAAU,GAAG,MAAM,CAAC,IAGvD,CAAC;CACJ,MAAM,aAAa,QAAQ,QAAQ,SAAS,QAAQ,EAAE,KAAK,QAAQ;CAEnE,MAAM,YACL,CAAC,QAAQ,YAAY,QAAQ,aAAa,QACvC,CAAC,OAAO,SAAS,IACjB,CAAC,QAAQ,QAAQ;CAErB,MAAM,WAA8B,CAAC;CACrC,KAAK,MAAM,YAAY,WAAW;EACjC,MAAM,cAAc,MAAM,IAAI,YAAY,KAAK;GAAE;GAAU;EAAQ,CAAC;EACpE,MAAM,aACL,QAAQ,SAAS,UACd,KAAA,IACA,MAAM,IAAI,WAAW,KAAK;GAAE;GAAU;GAAS;EAAY,CAAC;EAChE,IAAI,QAAQ,SAAS,YAAY,CAAC,YACjC,MAAM,IAAI,sBAAsB,UAAU,SAAS,WAAW;EAE/D,MAAM,UAAU,QAAQ,SAAS,aAAa,WAAW;EACzD,MAAM,SAAS,aAAa,aAAa;EACzC,SAAS,KAAK;GACb;GACA;GACA,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;GACnC;GACA,QAAQ,YAAY,WAAW;EAChC,CAAC;EAED,MAAM,MAAM,aACT,eAAe,WAAW,yBAC1B;EACH,IAAI,YAAY,UAAU;GACzB,OAAO,IACN,MAAM,SAAS,kBAAkB,MAAM,QAAQ,KAAK,IAAI,GAAG,QAAQ,SAAS,eAAe,IAC5F;GACA,IAAI,QAAQ,QAAQ;GACpB,MAAM,IAAI,OAAO,KAAK;IACrB;IACA,SAAS,MAAM;IACf,aAAa,MAAM;IACnB,SAAS,QAAQ,WAAW,cAAc,OAAO,MAAM,OAAO;GAC/D,CAAC;GACD;EACD;EAEA,MAAM,QACL,aAAa,YACV,uBAAuB,MAAM,QAAQ,MAAM,UAAU,MAAM,QAAQ,cAAc,KACjF,aACC,mCACA,yBAAyB,QAAQ;EACtC,OAAO,IACN,MAAM,SAAS,sBAAsB,QAAQ,KAAK,MAAM,IAAI,IAAI,GAAG,QAAQ,SAAS,eAAe,IACpG;EACA,IAAI,QAAQ,QAAQ;EACpB,MAAM,IAAI,MAAM,KAAK;GACpB;GACA;GACA;GACA,MAAM,QAAQ,QAAQ;EACvB,CAAC;CACF;CACA,OAAO;AACR;;AAGA,SAAS,cAAc,MAAc,OAAuB;CAC3D,MAAM,SAAS,UAAU,OAAO;EAAC;EAAO;EAAM;CAAa,GAAG;EAC7D,KAAK;EACL,UAAU;CACX,CAAC;CAED,QADgB,OAAO,WAAW,IAAI,OAAO,OAAO,KAAK,IAAI,OAC3C,uBAAuB;AAC1C"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
2
|
+
const require_eas = require("./eas-BJRA27vb.cjs");
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
let node_fs = require("node:fs");
|
|
5
|
+
let node_child_process = require("node:child_process");
|
|
6
|
+
//#region src/mobile/publish.ts
|
|
7
|
+
/**
|
|
8
|
+
* `gkm publish --stage <stage>`: a mobile app shipped for a deployed stage.
|
|
9
|
+
*
|
|
10
|
+
* First the stage's EAS project is synced (`gkm eas:sync`), so what is built
|
|
11
|
+
* reads the stage's values. Then, per platform, the cheapest release that
|
|
12
|
+
* gets the app's current code to the stage's users:
|
|
13
|
+
*
|
|
14
|
+
* - **An update**, when a store build with the same native code is already
|
|
15
|
+
* out: the fingerprint `runtimeVersion: { policy: 'fingerprint' }` gives a
|
|
16
|
+
* build is computed with the stage's profile, and a finished store build
|
|
17
|
+
* of that profile with that fingerprint means only JavaScript changed. It
|
|
18
|
+
* goes out on the stage's channel (`eas update`), which only builds of
|
|
19
|
+
* that runtime receive.
|
|
20
|
+
* - **A store build**, otherwise, submitted to the store as the stage's
|
|
21
|
+
* submit profile says (`eas build --auto-submit`): Android to its Play
|
|
22
|
+
* track; iOS to App Store Connect once `submit.<stage>.ios.ascAppId` is
|
|
23
|
+
* set — without it, iOS is built and not submitted, and gkm says so,
|
|
24
|
+
* rather than leave a prompt nobody in CI can answer.
|
|
25
|
+
*
|
|
26
|
+
* `--build` or `--update` decides instead. An update with no store build to
|
|
27
|
+
* receive it reaches nobody, so `--update` without one is refused.
|
|
28
|
+
*/
|
|
29
|
+
const logger = console;
|
|
30
|
+
/** `--update`, and no store build has this native code. */
|
|
31
|
+
var NoStoreBuildForUpdate = class extends require_errors.GkmError {
|
|
32
|
+
platform;
|
|
33
|
+
stage;
|
|
34
|
+
fingerprint;
|
|
35
|
+
constructor(platform, stage, fingerprint) {
|
|
36
|
+
super(`No ${platform} store build of '${stage}' has this native code (fingerprint ${fingerprint}), so an update would reach nobody: a phone only takes updates for the runtime it was built with. Build one: gkm publish --stage ${stage} --platform ${platform} --build.`);
|
|
37
|
+
this.platform = platform;
|
|
38
|
+
this.stage = stage;
|
|
39
|
+
this.fingerprint = fingerprint;
|
|
40
|
+
this.name = "NoStoreBuildForUpdate";
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/** `--build` and `--update` together. */
|
|
44
|
+
var PublishModeConflict = class extends require_errors.GkmError {
|
|
45
|
+
constructor() {
|
|
46
|
+
super("Pass --build or --update, not both: one release per platform.");
|
|
47
|
+
this.name = "PublishModeConflict";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Ship a mobile app for a deployed stage.
|
|
52
|
+
*
|
|
53
|
+
* @throws {NoStoreBuildForUpdate} — and what `easSync` throws
|
|
54
|
+
*/
|
|
55
|
+
async function publish(options, eas) {
|
|
56
|
+
const synced = await require_eas.easSync(options, eas);
|
|
57
|
+
const cli = eas ?? require_eas.easCli(synced.root, synced.values);
|
|
58
|
+
const { dir, stage } = synced;
|
|
59
|
+
const profile = stage.stage;
|
|
60
|
+
const easJson = (0, node_fs.existsSync)((0, node_path.join)(dir, "eas.json")) ? JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(dir, "eas.json"), "utf8")) : {};
|
|
61
|
+
const iosSubmits = Boolean(easJson.submit?.[profile]?.ios?.ascAppId);
|
|
62
|
+
const platforms = !options.platform || options.platform === "all" ? ["ios", "android"] : [options.platform];
|
|
63
|
+
const releases = [];
|
|
64
|
+
for (const platform of platforms) {
|
|
65
|
+
const fingerprint = await cli.fingerprint(dir, {
|
|
66
|
+
platform,
|
|
67
|
+
profile
|
|
68
|
+
});
|
|
69
|
+
const storeBuild = options.mode === "build" ? void 0 : await cli.storeBuild(dir, {
|
|
70
|
+
platform,
|
|
71
|
+
profile,
|
|
72
|
+
fingerprint
|
|
73
|
+
});
|
|
74
|
+
if (options.mode === "update" && !storeBuild) throw new NoStoreBuildForUpdate(platform, profile, fingerprint);
|
|
75
|
+
const release = options.mode ?? (storeBuild ? "update" : "build");
|
|
76
|
+
const submit = platform === "android" || iosSubmits;
|
|
77
|
+
releases.push({
|
|
78
|
+
platform,
|
|
79
|
+
fingerprint,
|
|
80
|
+
...storeBuild ? { storeBuild } : {},
|
|
81
|
+
release,
|
|
82
|
+
submit: release === "build" && submit
|
|
83
|
+
});
|
|
84
|
+
const why = storeBuild ? `store build ${storeBuild} has this native code` : "no store build has this native code";
|
|
85
|
+
if (release === "update") {
|
|
86
|
+
logger.log(`🔁 ${platform}: an update on '${stage.channel}' (${why})${options.dryRun ? " (dry run)" : ""}`);
|
|
87
|
+
if (options.dryRun) continue;
|
|
88
|
+
await cli.update(dir, {
|
|
89
|
+
platform,
|
|
90
|
+
channel: stage.channel,
|
|
91
|
+
environment: stage.environment,
|
|
92
|
+
message: options.message ?? commitSubject(synced.root, profile)
|
|
93
|
+
});
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const where = platform === "android" ? `submitted to Play's ${stage.android.track} track (${stage.android.releaseStatus})` : iosSubmits ? "submitted to App Store Connect" : `not submitted: submit.${profile}.ios.ascAppId is not set in eas.json`;
|
|
97
|
+
logger.log(`📦 ${platform}: a store build of '${profile}', ${where} (${why})${options.dryRun ? " (dry run)" : ""}`);
|
|
98
|
+
if (options.dryRun) continue;
|
|
99
|
+
await cli.build(dir, {
|
|
100
|
+
platform,
|
|
101
|
+
profile,
|
|
102
|
+
submit,
|
|
103
|
+
wait: options.wait ?? false
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return releases;
|
|
107
|
+
}
|
|
108
|
+
/** The current commit's subject, for an update's message. */
|
|
109
|
+
function commitSubject(root, stage) {
|
|
110
|
+
const result = (0, node_child_process.spawnSync)("git", [
|
|
111
|
+
"log",
|
|
112
|
+
"-1",
|
|
113
|
+
"--format=%s"
|
|
114
|
+
], {
|
|
115
|
+
cwd: root,
|
|
116
|
+
encoding: "utf8"
|
|
117
|
+
});
|
|
118
|
+
return (result.status === 0 ? result.stdout.trim() : "") || `gkm publish --stage ${stage}`;
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
exports.PublishModeConflict = PublishModeConflict;
|
|
122
|
+
exports.publish = publish;
|
|
123
|
+
|
|
124
|
+
//# sourceMappingURL=publish-D4pC6_G0.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-D4pC6_G0.cjs","names":["GkmError","easSync","easCli","existsSync","join","readFileSync","spawnSync"],"sources":["../src/mobile/publish.ts"],"sourcesContent":["/**\n * `gkm publish --stage <stage>`: a mobile app shipped for a deployed stage.\n *\n * First the stage's EAS project is synced (`gkm eas:sync`), so what is built\n * reads the stage's values. Then, per platform, the cheapest release that\n * gets the app's current code to the stage's users:\n *\n * - **An update**, when a store build with the same native code is already\n * out: the fingerprint `runtimeVersion: { policy: 'fingerprint' }` gives a\n * build is computed with the stage's profile, and a finished store build\n * of that profile with that fingerprint means only JavaScript changed. It\n * goes out on the stage's channel (`eas update`), which only builds of\n * that runtime receive.\n * - **A store build**, otherwise, submitted to the store as the stage's\n * submit profile says (`eas build --auto-submit`): Android to its Play\n * track; iOS to App Store Connect once `submit.<stage>.ios.ascAppId` is\n * set — without it, iOS is built and not submitted, and gkm says so,\n * rather than leave a prompt nobody in CI can answer.\n *\n * `--build` or `--update` decides instead. An update with no store build to\n * receive it reaches nobody, so `--update` without one is refused.\n */\n\nimport { spawnSync } from 'node:child_process';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { GkmError } from '../errors';\nimport {\n\ttype EasCli,\n\ttype EasPlatform,\n\ttype EasSyncOptions,\n\teasCli,\n\teasSync,\n} from './eas.js';\n\nconst logger = console;\n\n/** `--update`, and no store build has this native code. */\nexport class NoStoreBuildForUpdate extends GkmError {\n\tconstructor(\n\t\treadonly platform: EasPlatform,\n\t\treadonly stage: string,\n\t\treadonly fingerprint: string,\n\t) {\n\t\tsuper(\n\t\t\t`No ${platform} store build of '${stage}' has this native code ` +\n\t\t\t\t`(fingerprint ${fingerprint}), so an update would reach nobody: a phone ` +\n\t\t\t\t'only takes updates for the runtime it was built with. Build one: ' +\n\t\t\t\t`gkm publish --stage ${stage} --platform ${platform} --build.`,\n\t\t);\n\t\tthis.name = 'NoStoreBuildForUpdate';\n\t}\n}\n\n/** `--build` and `--update` together. */\nexport class PublishModeConflict extends GkmError {\n\tconstructor() {\n\t\tsuper('Pass --build or --update, not both: one release per platform.');\n\t\tthis.name = 'PublishModeConflict';\n\t}\n}\n\nexport interface PublishOptions extends EasSyncOptions {\n\t/** `ios`, `android`, or both (the default). */\n\tplatform?: EasPlatform | 'all';\n\t/** Build, or update, whatever the fingerprint says. */\n\tmode?: 'build' | 'update';\n\t/** Wait for a build to finish (and submit), rather than leave it on EAS. */\n\twait?: boolean;\n\t/** The update's message: the commit's subject by default. */\n\tmessage?: string;\n}\n\n/** What one platform's release was — or, dry, would be. */\nexport interface PlatformRelease {\n\tplatform: EasPlatform;\n\tfingerprint: string;\n\t/** The store build that already has this native code, if one does. */\n\tstoreBuild?: string;\n\trelease: 'build' | 'update';\n\t/** Whether a build is submitted to its store. */\n\tsubmit: boolean;\n}\n\n/**\n * Ship a mobile app for a deployed stage.\n *\n * @throws {NoStoreBuildForUpdate} — and what `easSync` throws\n */\nexport async function publish(\n\toptions: PublishOptions,\n\teas?: EasCli,\n): Promise<PlatformRelease[]> {\n\tconst synced = await easSync(options, eas);\n\tconst cli = eas ?? easCli(synced.root, synced.values);\n\tconst { dir, stage } = synced;\n\tconst profile = stage.stage;\n\n\tconst easJson = existsSync(join(dir, 'eas.json'))\n\t\t? (JSON.parse(readFileSync(join(dir, 'eas.json'), 'utf8')) as {\n\t\t\t\tsubmit?: Record<string, { ios?: { ascAppId?: string } }>;\n\t\t\t})\n\t\t: {};\n\tconst iosSubmits = Boolean(easJson.submit?.[profile]?.ios?.ascAppId);\n\n\tconst platforms: EasPlatform[] =\n\t\t!options.platform || options.platform === 'all'\n\t\t\t? ['ios', 'android']\n\t\t\t: [options.platform];\n\n\tconst releases: PlatformRelease[] = [];\n\tfor (const platform of platforms) {\n\t\tconst fingerprint = await cli.fingerprint(dir, { platform, profile });\n\t\tconst storeBuild =\n\t\t\toptions.mode === 'build'\n\t\t\t\t? undefined\n\t\t\t\t: await cli.storeBuild(dir, { platform, profile, fingerprint });\n\t\tif (options.mode === 'update' && !storeBuild) {\n\t\t\tthrow new NoStoreBuildForUpdate(platform, profile, fingerprint);\n\t\t}\n\t\tconst release = options.mode ?? (storeBuild ? 'update' : 'build');\n\t\tconst submit = platform === 'android' || iosSubmits;\n\t\treleases.push({\n\t\t\tplatform,\n\t\t\tfingerprint,\n\t\t\t...(storeBuild ? { storeBuild } : {}),\n\t\t\trelease,\n\t\t\tsubmit: release === 'build' && submit,\n\t\t});\n\n\t\tconst why = storeBuild\n\t\t\t? `store build ${storeBuild} has this native code`\n\t\t\t: 'no store build has this native code';\n\t\tif (release === 'update') {\n\t\t\tlogger.log(\n\t\t\t\t`🔁 ${platform}: an update on '${stage.channel}' (${why})${options.dryRun ? ' (dry run)' : ''}`,\n\t\t\t);\n\t\t\tif (options.dryRun) continue;\n\t\t\tawait cli.update(dir, {\n\t\t\t\tplatform,\n\t\t\t\tchannel: stage.channel,\n\t\t\t\tenvironment: stage.environment,\n\t\t\t\tmessage: options.message ?? commitSubject(synced.root, profile),\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst where =\n\t\t\tplatform === 'android'\n\t\t\t\t? `submitted to Play's ${stage.android.track} track (${stage.android.releaseStatus})`\n\t\t\t\t: iosSubmits\n\t\t\t\t\t? 'submitted to App Store Connect'\n\t\t\t\t\t: `not submitted: submit.${profile}.ios.ascAppId is not set in eas.json`;\n\t\tlogger.log(\n\t\t\t`📦 ${platform}: a store build of '${profile}', ${where} (${why})${options.dryRun ? ' (dry run)' : ''}`,\n\t\t);\n\t\tif (options.dryRun) continue;\n\t\tawait cli.build(dir, {\n\t\t\tplatform,\n\t\t\tprofile,\n\t\t\tsubmit,\n\t\t\twait: options.wait ?? false,\n\t\t});\n\t}\n\treturn releases;\n}\n\n/** The current commit's subject, for an update's message. */\nfunction commitSubject(root: string, stage: string): string {\n\tconst result = spawnSync('git', ['log', '-1', '--format=%s'], {\n\t\tcwd: root,\n\t\tencoding: 'utf8',\n\t});\n\tconst subject = result.status === 0 ? result.stdout.trim() : '';\n\treturn subject || `gkm publish --stage ${stage}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,SAAS;;AAGf,IAAa,wBAAb,cAA2CA,eAAAA,SAAS;CAEzC;CACA;CACA;CAHV,YACC,UACA,OACA,aACC;EACD,MACC,MAAM,SAAS,mBAAmB,MAAM,sCACvB,YAAY,mIAEL,MAAM,cAAc,SAAS,UACtD;EATS,KAAA,WAAA;EACA,KAAA,QAAA;EACA,KAAA,cAAA;EAQT,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,sBAAb,cAAyCA,eAAAA,SAAS;CACjD,cAAc;EACb,MAAM,+DAA+D;EACrE,KAAK,OAAO;CACb;AACD;;;;;;AA6BA,eAAsB,QACrB,SACA,KAC6B;CAC7B,MAAM,SAAS,MAAMC,YAAAA,QAAQ,SAAS,GAAG;CACzC,MAAM,MAAM,OAAOC,YAAAA,OAAO,OAAO,MAAM,OAAO,MAAM;CACpD,MAAM,EAAE,KAAK,UAAU;CACvB,MAAM,UAAU,MAAM;CAEtB,MAAM,WAAA,GAAUC,QAAAA,WAAAA,EAAAA,GAAWC,UAAAA,KAAAA,CAAK,KAAK,UAAU,CAAC,IAC5C,KAAK,OAAA,GAAMC,QAAAA,aAAAA,EAAAA,GAAaD,UAAAA,KAAAA,CAAK,KAAK,UAAU,GAAG,MAAM,CAAC,IAGvD,CAAC;CACJ,MAAM,aAAa,QAAQ,QAAQ,SAAS,QAAQ,EAAE,KAAK,QAAQ;CAEnE,MAAM,YACL,CAAC,QAAQ,YAAY,QAAQ,aAAa,QACvC,CAAC,OAAO,SAAS,IACjB,CAAC,QAAQ,QAAQ;CAErB,MAAM,WAA8B,CAAC;CACrC,KAAK,MAAM,YAAY,WAAW;EACjC,MAAM,cAAc,MAAM,IAAI,YAAY,KAAK;GAAE;GAAU;EAAQ,CAAC;EACpE,MAAM,aACL,QAAQ,SAAS,UACd,KAAA,IACA,MAAM,IAAI,WAAW,KAAK;GAAE;GAAU;GAAS;EAAY,CAAC;EAChE,IAAI,QAAQ,SAAS,YAAY,CAAC,YACjC,MAAM,IAAI,sBAAsB,UAAU,SAAS,WAAW;EAE/D,MAAM,UAAU,QAAQ,SAAS,aAAa,WAAW;EACzD,MAAM,SAAS,aAAa,aAAa;EACzC,SAAS,KAAK;GACb;GACA;GACA,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;GACnC;GACA,QAAQ,YAAY,WAAW;EAChC,CAAC;EAED,MAAM,MAAM,aACT,eAAe,WAAW,yBAC1B;EACH,IAAI,YAAY,UAAU;GACzB,OAAO,IACN,MAAM,SAAS,kBAAkB,MAAM,QAAQ,KAAK,IAAI,GAAG,QAAQ,SAAS,eAAe,IAC5F;GACA,IAAI,QAAQ,QAAQ;GACpB,MAAM,IAAI,OAAO,KAAK;IACrB;IACA,SAAS,MAAM;IACf,aAAa,MAAM;IACnB,SAAS,QAAQ,WAAW,cAAc,OAAO,MAAM,OAAO;GAC/D,CAAC;GACD;EACD;EAEA,MAAM,QACL,aAAa,YACV,uBAAuB,MAAM,QAAQ,MAAM,UAAU,MAAM,QAAQ,cAAc,KACjF,aACC,mCACA,yBAAyB,QAAQ;EACtC,OAAO,IACN,MAAM,SAAS,sBAAsB,QAAQ,KAAK,MAAM,IAAI,IAAI,GAAG,QAAQ,SAAS,eAAe,IACpG;EACA,IAAI,QAAQ,QAAQ;EACpB,MAAM,IAAI,MAAM,KAAK;GACpB;GACA;GACA;GACA,MAAM,QAAQ,QAAQ;EACvB,CAAC;CACF;CACA,OAAO;AACR;;AAGA,SAAS,cAAc,MAAc,OAAuB;CAC3D,MAAM,UAAA,GAASE,mBAAAA,UAAAA,CAAU,OAAO;EAAC;EAAO;EAAM;CAAa,GAAG;EAC7D,KAAK;EACL,UAAU;CACX,CAAC;CAED,QADgB,OAAO,WAAW,IAAI,OAAO,OAAO,KAAK,IAAI,OAC3C,uBAAuB;AAC1C"}
|