@geekmidas/cli 10.0.0-alpha.165 → 10.0.0-alpha.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GoDaddyProvider-C7zClznh.mjs → GoDaddyProvider-Dci0SlN5.mjs} +2 -2
- package/dist/{GoDaddyProvider-C7zClznh.mjs.map → GoDaddyProvider-Dci0SlN5.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-Dx6v4Goj.cjs → GoDaddyProvider-o6DJAsBZ.cjs} +2 -2
- package/dist/{GoDaddyProvider-Dx6v4Goj.cjs.map → GoDaddyProvider-o6DJAsBZ.cjs.map} +1 -1
- package/dist/{HostingerProvider-COuTy74z.cjs → HostingerProvider-BzHPhONW.cjs} +2 -2
- package/dist/{HostingerProvider-COuTy74z.cjs.map → HostingerProvider-BzHPhONW.cjs.map} +1 -1
- package/dist/{HostingerProvider-BALtMnss.mjs → HostingerProvider-Dd5x1zvF.mjs} +2 -2
- package/dist/{HostingerProvider-BALtMnss.mjs.map → HostingerProvider-Dd5x1zvF.mjs.map} +1 -1
- package/dist/{LegacyStateStore-CcNLLGX-.mjs → LegacyStateStore-CpF6rmZc.mjs} +2 -2
- package/dist/{LegacyStateStore-CcNLLGX-.mjs.map → LegacyStateStore-CpF6rmZc.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C0rh3dKV.cjs → LegacyStateStore-tqY0hM8z.cjs} +2 -2
- package/dist/{LegacyStateStore-C0rh3dKV.cjs.map → LegacyStateStore-tqY0hM8z.cjs.map} +1 -1
- package/dist/{LocalStateStore-CxCCBQkS.mjs → LocalStateStore-Adp96xPy.mjs} +2 -2
- package/dist/{LocalStateStore-CxCCBQkS.mjs.map → LocalStateStore-Adp96xPy.mjs.map} +1 -1
- package/dist/{LocalStateStore-Dcq3wd1v.cjs → LocalStateStore-BYMUEGZN.cjs} +2 -2
- package/dist/{LocalStateStore-Dcq3wd1v.cjs.map → LocalStateStore-BYMUEGZN.cjs.map} +1 -1
- package/dist/{S3StateStore-DUwCcCgj.mjs → S3StateStore-13Go3hfM.mjs} +4 -4
- package/dist/{S3StateStore-DUwCcCgj.mjs.map → S3StateStore-13Go3hfM.mjs.map} +1 -1
- package/dist/{S3StateStore-Cgf1owUZ.cjs → S3StateStore-DjXyhGIP.cjs} +4 -4
- package/dist/{S3StateStore-Cgf1owUZ.cjs.map → S3StateStore-DjXyhGIP.cjs.map} +1 -1
- package/dist/{SSMStateStore-A_N_T4b0.mjs → SSMStateStore-CQHUyH-c.mjs} +2 -2
- package/dist/{SSMStateStore-A_N_T4b0.mjs.map → SSMStateStore-CQHUyH-c.mjs.map} +1 -1
- package/dist/{SSMStateStore-BarWA07O.cjs → SSMStateStore-DspMPho-.cjs} +2 -2
- package/dist/{SSMStateStore-BarWA07O.cjs.map → SSMStateStore-DspMPho-.cjs.map} +1 -1
- package/dist/{add-DVSNjsI8.cjs → add-DsxJ0Knr.cjs} +8 -8
- package/dist/{add-DVSNjsI8.cjs.map → add-DsxJ0Knr.cjs.map} +1 -1
- package/dist/{add-DAeCqI9O.mjs → add-Dt8QKSOw.mjs} +7 -7
- package/dist/{add-DAeCqI9O.mjs.map → add-Dt8QKSOw.mjs.map} +1 -1
- package/dist/{apps-S3RMvFyk.cjs → apps-C6s-trVp.cjs} +84 -31
- package/dist/apps-C6s-trVp.cjs.map +1 -0
- package/dist/{apps-Ck_Ie6gN.mjs → apps-w2sRQKCr.mjs} +66 -14
- package/dist/apps-w2sRQKCr.mjs.map +1 -0
- package/dist/{bundler-B_vQ_591.cjs → bundler-AzkSRAuu.cjs} +6 -6
- package/dist/{bundler-B_vQ_591.cjs.map → bundler-AzkSRAuu.cjs.map} +1 -1
- package/dist/{bundler-Bbn0opSb.mjs → bundler-BCWWne6N.mjs} +6 -6
- package/dist/{bundler-Bbn0opSb.mjs.map → bundler-BCWWne6N.mjs.map} +1 -1
- package/dist/{cli-CMykD9Py.mjs → cli-DSGw0Mw-.mjs} +5 -5
- package/dist/{cli-CMykD9Py.mjs.map → cli-DSGw0Mw-.mjs.map} +1 -1
- package/dist/{cli-fs4D-3cd.cjs → cli-OGss08bZ.cjs} +5 -5
- package/dist/{cli-fs4D-3cd.cjs.map → cli-OGss08bZ.cjs.map} +1 -1
- package/dist/{compose-CNJO99Tv.cjs → compose-BqTuzitb.cjs} +6 -6
- package/dist/{compose-CNJO99Tv.cjs.map → compose-BqTuzitb.cjs.map} +1 -1
- package/dist/{compose-BtjZNCC-.mjs → compose-Csegtvq_.mjs} +62 -9
- package/dist/compose-Csegtvq_.mjs.map +1 -0
- package/dist/{compose-DmcYTLhO.cjs → compose-QSBmhr4V.cjs} +73 -8
- package/dist/compose-QSBmhr4V.cjs.map +1 -0
- package/dist/{compose-Cm6EWvjX.mjs → compose-RhuFQmZS.mjs} +6 -6
- package/dist/{compose-Cm6EWvjX.mjs.map → compose-RhuFQmZS.mjs.map} +1 -1
- package/dist/config.cjs +457 -19
- package/dist/config.cjs.map +1 -0
- package/dist/config.mjs +440 -2
- package/dist/config.mjs.map +1 -0
- package/dist/{credentials-DVYgFK_H.cjs → credentials-CORvhcrO.cjs} +6 -6
- package/dist/{credentials-DVYgFK_H.cjs.map → credentials-CORvhcrO.cjs.map} +1 -1
- package/dist/{credentials-C-yuISKH.mjs → credentials-D4DUPPPP.mjs} +6 -6
- package/dist/{credentials-C-yuISKH.mjs.map → credentials-D4DUPPPP.mjs.map} +1 -1
- package/dist/deploy/public.cjs +12 -12
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +12 -12
- package/dist/{deploy-DGXMqTan.cjs → deploy-BwJ7uWXd.cjs} +119 -34
- package/dist/deploy-BwJ7uWXd.cjs.map +1 -0
- package/dist/{deploy-CuSF9y7t.mjs → deploy-DDfnQm8l.mjs} +110 -25
- package/dist/deploy-DDfnQm8l.mjs.map +1 -0
- package/dist/{destroy-DpRGLdt1.mjs → destroy-DKt8S051.mjs} +10 -10
- package/dist/{destroy-DpRGLdt1.mjs.map → destroy-DKt8S051.mjs.map} +1 -1
- package/dist/{destroy-BROvAzQQ.cjs → destroy-nTNRfdy6.cjs} +10 -10
- package/dist/{destroy-BROvAzQQ.cjs.map → destroy-nTNRfdy6.cjs.map} +1 -1
- package/dist/{docker-qq5xNUP2.cjs → docker-Dy1ZJUzV.cjs} +15 -10
- package/dist/docker-Dy1ZJUzV.cjs.map +1 -0
- package/dist/{docker-CRVWdGH9.mjs → docker-Ele34O8z.mjs} +13 -8
- package/dist/{docker-CRVWdGH9.mjs.map → docker-Ele34O8z.mjs.map} +1 -1
- package/dist/{dokploy-DcH7hY84.mjs → dokploy-BrfA2m5K.mjs} +2 -2
- package/dist/{dokploy-DcH7hY84.mjs.map → dokploy-BrfA2m5K.mjs.map} +1 -1
- package/dist/{dokploy-Duyj4-pa.cjs → dokploy-DN2W1YIH.cjs} +2 -2
- package/dist/{dokploy-Duyj4-pa.cjs.map → dokploy-DN2W1YIH.cjs.map} +1 -1
- package/dist/{eas-DqTDImhv.cjs → eas-BRBdxmwe.cjs} +6 -6
- package/dist/{eas-DqTDImhv.cjs.map → eas-BRBdxmwe.cjs.map} +1 -1
- package/dist/{eas-C11dyfIw.mjs → eas-CO3ogve5.mjs} +3 -3
- package/dist/{eas-C11dyfIw.mjs.map → eas-CO3ogve5.mjs.map} +1 -1
- package/dist/{encryption-CsOfA6QT.cjs → encryption-BZ1zgtF5.cjs} +4 -4
- package/dist/{encryption-CsOfA6QT.cjs.map → encryption-BZ1zgtF5.cjs.map} +1 -1
- package/dist/{encryption-DsZwqQyL.mjs → encryption-CHmfNBAy.mjs} +4 -4
- package/dist/{encryption-DsZwqQyL.mjs.map → encryption-CHmfNBAy.mjs.map} +1 -1
- package/dist/{engine-CdU3Oggs.mjs → engine-B3Gmu8-O.mjs} +13 -14
- package/dist/engine-B3Gmu8-O.mjs.map +1 -0
- package/dist/{engine-WllCnGNy.cjs → engine-DewbDHOq.cjs} +13 -14
- package/dist/engine-DewbDHOq.cjs.map +1 -0
- package/dist/{github-B3lKrKIn.cjs → github-DPNgIxdc.cjs} +116 -72
- package/dist/github-DPNgIxdc.cjs.map +1 -0
- package/dist/{github-Bt3V7pdf.mjs → github-DU3iEmJN.mjs} +116 -72
- package/dist/github-DU3iEmJN.mjs.map +1 -0
- package/dist/{googlePlay-B7P3Ahps.cjs → googlePlay-C2jnPqYn.cjs} +5 -5
- package/dist/{googlePlay-B7P3Ahps.cjs.map → googlePlay-C2jnPqYn.cjs.map} +1 -1
- package/dist/{googlePlay-D-6pUHGU.mjs → googlePlay-KPHn9H2f.mjs} +5 -5
- package/dist/{googlePlay-D-6pUHGU.mjs.map → googlePlay-KPHn9H2f.mjs.map} +1 -1
- package/dist/{iam-BVPpX76R.cjs → iam-C2sf6AUi.cjs} +2 -2
- package/dist/{iam-BVPpX76R.cjs.map → iam-C2sf6AUi.cjs.map} +1 -1
- package/dist/{iam-q9ALh-Y5.mjs → iam-CW61VcT3.mjs} +2 -2
- package/dist/{iam-q9ALh-Y5.mjs.map → iam-CW61VcT3.mjs.map} +1 -1
- package/dist/index.cjs +358 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +352 -113
- package/dist/index.mjs.map +1 -1
- package/dist/{local-Cs_aQJ45.cjs → local-BxjA0EXj.cjs} +2 -2
- package/dist/{local-Cs_aQJ45.cjs.map → local-BxjA0EXj.cjs.map} +1 -1
- package/dist/{local-B4H2Lsr6.mjs → local-CwR2DW6i.mjs} +2 -2
- package/dist/{local-B4H2Lsr6.mjs.map → local-CwR2DW6i.mjs.map} +1 -1
- package/dist/{migrate-BQSPfKHa.cjs → migrate-B0a3WY4X.cjs} +6 -6
- package/dist/{migrate-BQSPfKHa.cjs.map → migrate-B0a3WY4X.cjs.map} +1 -1
- package/dist/{migrate-CphnV0sY.cjs → migrate-CYtM1UBH.cjs} +4 -4
- package/dist/{migrate-CphnV0sY.cjs.map → migrate-CYtM1UBH.cjs.map} +1 -1
- package/dist/{migrate-C8JFuMT-.mjs → migrate-DHWy64pc.mjs} +4 -4
- package/dist/{migrate-C8JFuMT-.mjs.map → migrate-DHWy64pc.mjs.map} +1 -1
- package/dist/{migrate-CQ-PNghX.mjs → migrate-vWy2CUoi.mjs} +6 -6
- package/dist/{migrate-CQ-PNghX.mjs.map → migrate-vWy2CUoi.mjs.map} +1 -1
- 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-IlQ35E3R.mjs → notes-9bOfe08J.mjs} +7 -8
- package/dist/notes-9bOfe08J.mjs.map +1 -0
- package/dist/{notes-BtyuHcKA.cjs → notes-DRdlsCYV.cjs} +10 -11
- package/dist/notes-DRdlsCYV.cjs.map +1 -0
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.cjs.map +1 -1
- package/dist/openapi.mjs +2 -2
- package/dist/{projectBucket-SHlF0_Pr.mjs → projectBucket-Cd7sEDhG.mjs} +2 -2
- package/dist/{projectBucket-SHlF0_Pr.mjs.map → projectBucket-Cd7sEDhG.mjs.map} +1 -1
- package/dist/{projectBucket-0Lvy2J0h.cjs → projectBucket-gIQUuhGm.cjs} +2 -2
- package/dist/{projectBucket-0Lvy2J0h.cjs.map → projectBucket-gIQUuhGm.cjs.map} +1 -1
- package/dist/{publish-igpjCzZj.cjs → publish-BgDFx08y.cjs} +2 -2
- package/dist/{publish-igpjCzZj.cjs.map → publish-BgDFx08y.cjs.map} +1 -1
- package/dist/{publish-C9IJb1Ez.mjs → publish-DOxz4mxf.mjs} +2 -2
- package/dist/{publish-C9IJb1Ez.mjs.map → publish-DOxz4mxf.mjs.map} +1 -1
- package/dist/{resolve-5T34quci.cjs → resolve-BhQd4IkT.cjs} +4 -4
- package/dist/{resolve-5T34quci.cjs.map → resolve-BhQd4IkT.cjs.map} +1 -1
- package/dist/{resolve-Cl8CVASM.mjs → resolve-CdDyPOE8.mjs} +4 -4
- package/dist/{resolve-Cl8CVASM.mjs.map → resolve-CdDyPOE8.mjs.map} +1 -1
- package/dist/{rollback-DMPb940C.cjs → rollback-Brc-_HBJ.cjs} +7 -7
- package/dist/{rollback-DMPb940C.cjs.map → rollback-Brc-_HBJ.cjs.map} +1 -1
- package/dist/{rollback-1JLE6qPo.mjs → rollback-CLBKeSMl.mjs} +7 -7
- package/dist/{rollback-1JLE6qPo.mjs.map → rollback-CLBKeSMl.mjs.map} +1 -1
- package/dist/{s3-DkiOi5J1.cjs → s3-CuLmr6Q9.cjs} +3 -3
- package/dist/{s3-DkiOi5J1.cjs.map → s3-CuLmr6Q9.cjs.map} +1 -1
- package/dist/{s3-CCuNLgHk.mjs → s3-D0BIG_ml.mjs} +3 -3
- package/dist/{s3-CCuNLgHk.mjs.map → s3-D0BIG_ml.mjs.map} +1 -1
- package/dist/{serverSetup-C0pLpF5w.mjs → serverSetup-An1fE9nd.mjs} +7 -7
- package/dist/{serverSetup-C0pLpF5w.mjs.map → serverSetup-An1fE9nd.mjs.map} +1 -1
- package/dist/{serverSetup-JYZxj371.cjs → serverSetup-BMpzrB1y.cjs} +7 -7
- package/dist/{serverSetup-JYZxj371.cjs.map → serverSetup-BMpzrB1y.cjs.map} +1 -1
- package/dist/{sniffer-DB4Ocija.cjs → sniffer-9a8wQeeD.cjs} +7 -7
- package/dist/{sniffer-DB4Ocija.cjs.map → sniffer-9a8wQeeD.cjs.map} +1 -1
- package/dist/{sniffer-CiV4xGbe.mjs → sniffer-BObBXR5q.mjs} +7 -7
- package/dist/{sniffer-CiV4xGbe.mjs.map → sniffer-BObBXR5q.mjs.map} +1 -1
- package/dist/{snsSubscriptions-DpYvMVR9.cjs → snsSubscriptions-BRmEdsks.cjs} +3 -3
- package/dist/{snsSubscriptions-DpYvMVR9.cjs.map → snsSubscriptions-BRmEdsks.cjs.map} +1 -1
- package/dist/{snsSubscriptions-C_-6fqBd.mjs → snsSubscriptions-oUTOkG-s.mjs} +3 -3
- package/dist/{snsSubscriptions-C_-6fqBd.mjs.map → snsSubscriptions-oUTOkG-s.mjs.map} +1 -1
- package/dist/{sst-D1oSl_1d.cjs → sst-CJQI9GYW.cjs} +6 -6
- package/dist/{sst-D1oSl_1d.cjs.map → sst-CJQI9GYW.cjs.map} +1 -1
- package/dist/{sst-BUzuE84X.mjs → sst-DVIeKWCH.mjs} +5 -5
- package/dist/{sst-BUzuE84X.mjs.map → sst-DVIeKWCH.mjs.map} +1 -1
- package/dist/{stack-TUs2DY7v.cjs → stack-2jMvQfLo.cjs} +12 -13
- package/dist/{stack-TUs2DY7v.cjs.map → stack-2jMvQfLo.cjs.map} +1 -1
- package/dist/{stack-DhBBTTIa.mjs → stack-kcxH-2tZ.mjs} +7 -8
- package/dist/{stack-DhBBTTIa.mjs.map → stack-kcxH-2tZ.mjs.map} +1 -1
- package/dist/{stage-B3qg7LoZ.cjs → stage-AHgVG7H8.cjs} +7 -7
- package/dist/{stage-B3qg7LoZ.cjs.map → stage-AHgVG7H8.cjs.map} +1 -1
- package/dist/{stage-DuLwZ9wu.mjs → stage-BQSSMJL4.mjs} +7 -7
- package/dist/{stage-DuLwZ9wu.mjs.map → stage-BQSSMJL4.mjs.map} +1 -1
- package/dist/{stages-CW7qtiJ2.mjs → stages-BsK1Ro4s.mjs} +3 -3
- package/dist/{stages-CW7qtiJ2.mjs.map → stages-BsK1Ro4s.mjs.map} +1 -1
- package/dist/{stages-CtqmEJJW.cjs → stages-DpF2K3PZ.cjs} +3 -3
- package/dist/{stages-CtqmEJJW.cjs.map → stages-DpF2K3PZ.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-CXZWPHMW.cjs → terminal-BNjNr7BN.cjs} +2 -2
- package/dist/{terminal-CXZWPHMW.cjs.map → terminal-BNjNr7BN.cjs.map} +1 -1
- package/dist/{terminal-B_TanNPL.mjs → terminal-DWROY7JE.mjs} +2 -2
- package/dist/{terminal-B_TanNPL.mjs.map → terminal-DWROY7JE.mjs.map} +1 -1
- package/dist/types-DEmuMHsS.d.cts.map +1 -1
- package/dist/types-g_S0_RAi.d.mts.map +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-D5Vm2qcy.mjs → workspace-9q4TSHlM.mjs} +330 -3
- package/dist/workspace-9q4TSHlM.mjs.map +1 -0
- package/dist/{workspace-VhzmoxOv.cjs → workspace-Ciw3SnME.cjs} +370 -1
- package/dist/workspace-Ciw3SnME.cjs.map +1 -0
- package/package.json +25 -15
- package/dist/apps-Ck_Ie6gN.mjs.map +0 -1
- package/dist/apps-S3RMvFyk.cjs.map +0 -1
- package/dist/compose-BtjZNCC-.mjs.map +0 -1
- package/dist/compose-DmcYTLhO.cjs.map +0 -1
- package/dist/config-CXj-9eRo.cjs +0 -890
- package/dist/config-CXj-9eRo.cjs.map +0 -1
- package/dist/config-Di0oJwM9.mjs +0 -759
- package/dist/config-Di0oJwM9.mjs.map +0 -1
- package/dist/deploy-CuSF9y7t.mjs.map +0 -1
- package/dist/deploy-DGXMqTan.cjs.map +0 -1
- package/dist/docker-qq5xNUP2.cjs.map +0 -1
- package/dist/engine-CdU3Oggs.mjs.map +0 -1
- package/dist/engine-WllCnGNy.cjs.map +0 -1
- package/dist/github-B3lKrKIn.cjs.map +0 -1
- package/dist/github-Bt3V7pdf.mjs.map +0 -1
- package/dist/notes-BtyuHcKA.cjs.map +0 -1
- package/dist/notes-IlQ35E3R.mjs.map +0 -1
- package/dist/workspace-D5Vm2qcy.mjs.map +0 -1
- package/dist/workspace-VhzmoxOv.cjs.map +0 -1
|
@@ -698,6 +698,322 @@ const S3_PROVISIONING = {
|
|
|
698
698
|
],
|
|
699
699
|
describe: "the stage's AWS account — AWS_PROFILE, or AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY (in CI, what aws-actions/configure-aws-credentials exports)"
|
|
700
700
|
};
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region src/workspace/fileServerLabel.ts
|
|
703
|
+
/**
|
|
704
|
+
* The name a file server answers on.
|
|
705
|
+
*
|
|
706
|
+
* `new FileServer('Assets', …)` is two manifest nodes: the bucket, which keeps
|
|
707
|
+
* the id (`Assets`, `ASSETS_CONNECTION_STRING`), and the surface in front of
|
|
708
|
+
* it, `AssetsServer`. The suffix keeps the two nodes apart, and that is all it
|
|
709
|
+
* is for: the surface's key (`ASSETS_URL`) and its host both take the name the
|
|
710
|
+
* construct was given — `assets.<domain>`, never `assets-server.<domain>`.
|
|
711
|
+
*
|
|
712
|
+
* Read off the surface's id rather than its `of`: with `{ origin }` the bucket
|
|
713
|
+
* is another construct's, and its id is not this file server's name.
|
|
714
|
+
*
|
|
715
|
+
* Every host a file server has — its CDN alias and certificate, its edge
|
|
716
|
+
* route, its local `*.localhost` address, its processors' origin and unit —
|
|
717
|
+
* is built from this one label, so no two of them can disagree.
|
|
718
|
+
*
|
|
719
|
+
* @example fileServerLabel('AssetsServer') // 'assets'
|
|
720
|
+
* @example fileServerLabel('UserUploadsServer') // 'user-uploads'
|
|
721
|
+
*/
|
|
722
|
+
function fileServerLabel(serverId) {
|
|
723
|
+
return (0, _geekmidas_manifest.kebabCase)((0, _geekmidas_manifest.fileServerName)(serverId));
|
|
724
|
+
}
|
|
725
|
+
//#endregion
|
|
726
|
+
//#region src/workspace/subdomains.ts
|
|
727
|
+
/**
|
|
728
|
+
* The subdomains of a stage's domain, as a wildcard site sees them.
|
|
729
|
+
*
|
|
730
|
+
* A site declared `subdomain: '*'` answers on every label nothing else does,
|
|
731
|
+
* so the labels something else does answer on are the ones a tenant can never
|
|
732
|
+
* take. They come from two places and from nowhere else: every app's own
|
|
733
|
+
* label, read off the constructs and never listed by hand, and the names no
|
|
734
|
+
* construct declares (`www`, `mail`, `status`), listed once in the workspace
|
|
735
|
+
* config as `protectedSubdomains`.
|
|
736
|
+
*/
|
|
737
|
+
/** A `protectedSubdomains` entry an app already answers on. */
|
|
738
|
+
var ProtectedSubdomainIsAnApp = class extends require_errors.GkmError {
|
|
739
|
+
subdomain;
|
|
740
|
+
app;
|
|
741
|
+
constructor(subdomain, app) {
|
|
742
|
+
super(`protectedSubdomains lists '${subdomain}', which '${app}' already answers on — a construct's own subdomain is protected without being listed. Remove it from protectedSubdomains.`);
|
|
743
|
+
this.subdomain = subdomain;
|
|
744
|
+
this.app = app;
|
|
745
|
+
this.name = "ProtectedSubdomainIsAnApp";
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
/** Two sites that both answer on every subdomain. */
|
|
749
|
+
var SecondWildcardSite = class extends require_errors.GkmError {
|
|
750
|
+
sites;
|
|
751
|
+
constructor(sites) {
|
|
752
|
+
super(`${sites.join(" and ")} both declare subdomain: '*', and two sites cannot share the same hosts. Keep one wildcard site per project; give the other a subdomain of its own.`);
|
|
753
|
+
this.sites = sites;
|
|
754
|
+
this.name = "SecondWildcardSite";
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
/** A wildcard site whose `hosts` route is on no surface the project declares. */
|
|
758
|
+
var SiteHostsEndpointMissing = class extends require_errors.GkmError {
|
|
759
|
+
site;
|
|
760
|
+
surface;
|
|
761
|
+
path;
|
|
762
|
+
constructor(site, surface, path) {
|
|
763
|
+
super(`'${site}' checks its hosts with GET ${path} on '${surface}', but '${surface}' serves no such route. Export the endpoint from the surface's endpoints, or point \`hosts\` at one it serves.`);
|
|
764
|
+
this.site = site;
|
|
765
|
+
this.surface = surface;
|
|
766
|
+
this.path = path;
|
|
767
|
+
this.name = "SiteHostsEndpointMissing";
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* A file server whose host another construct already answers on.
|
|
772
|
+
*
|
|
773
|
+
* A file server answers on its own name — `FileServer('Assets')` on
|
|
774
|
+
* `assets.<domain>` — so an app named `Assets` beside it would claim the same
|
|
775
|
+
* host, and whichever deployed second would take it from the first.
|
|
776
|
+
*/
|
|
777
|
+
var FileServerHostTaken = class extends require_errors.GkmError {
|
|
778
|
+
fileServer;
|
|
779
|
+
subdomain;
|
|
780
|
+
app;
|
|
781
|
+
constructor(fileServer, subdomain, app) {
|
|
782
|
+
super(`'${fileServer}' answers on '${subdomain}', which '${app}' answers on too, and two constructs cannot share a host. Rename one of them, or give '${app}' a subdomain of its own.`);
|
|
783
|
+
this.fileServer = fileServer;
|
|
784
|
+
this.subdomain = subdomain;
|
|
785
|
+
this.app = app;
|
|
786
|
+
this.name = "FileServerHostTaken";
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
/** The project's one wildcard site, or `undefined` when it has none. */
|
|
790
|
+
function wildcardSite(manifest) {
|
|
791
|
+
return Object.values(manifest).find(_geekmidas_manifest.isWildcardSite);
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Every label an app answers on, by the app it belongs to — what a deploy
|
|
795
|
+
* puts under the stage's domain: a surface's or site's `subdomain` (or its id
|
|
796
|
+
* kebab-cased), each file server and its processors' origin, and each worker,
|
|
797
|
+
* which SNS may push to on a host of its own.
|
|
798
|
+
*
|
|
799
|
+
* The root site's is kept although it answers on the domain itself: which
|
|
800
|
+
* site is the root can change without a tenant's slug changing meaning. The
|
|
801
|
+
* wildcard site has none — its labels are whatever is left.
|
|
802
|
+
*/
|
|
803
|
+
function appSubdomains(manifest) {
|
|
804
|
+
return new Map(claimedLabels(manifest));
|
|
805
|
+
}
|
|
806
|
+
/** Each label a construct answers on, with that construct's id, in manifest order. */
|
|
807
|
+
function* claimedLabels(manifest) {
|
|
808
|
+
for (const [id, declaration] of Object.entries(manifest)) switch (declaration.kind) {
|
|
809
|
+
case "rest-api":
|
|
810
|
+
case "websocket-api":
|
|
811
|
+
yield [declaration.subdomain ?? (0, _geekmidas_manifest.kebabCase)(id), id];
|
|
812
|
+
break;
|
|
813
|
+
case "site":
|
|
814
|
+
if (declaration.subdomain === _geekmidas_manifest.WILDCARD_SUBDOMAIN) break;
|
|
815
|
+
yield [declaration.subdomain ?? (0, _geekmidas_manifest.kebabCase)(id), id];
|
|
816
|
+
break;
|
|
817
|
+
case "file-server":
|
|
818
|
+
yield [fileServerLabel(id), id];
|
|
819
|
+
if (declaration.processors?.length) yield [`${fileServerLabel(id)}-processors`, id];
|
|
820
|
+
break;
|
|
821
|
+
case "worker": yield [(0, _geekmidas_manifest.kebabCase)(id), id];
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* The labels no tenant may take: every app's own and the workspace's
|
|
826
|
+
* `protectedSubdomains`, sorted.
|
|
827
|
+
*/
|
|
828
|
+
function protectedSubdomains(manifest, configured = []) {
|
|
829
|
+
return [.../* @__PURE__ */ new Set([...appSubdomains(manifest).keys(), ...configured])].sort();
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* What a project's subdomains have to satisfy before anything is derived
|
|
833
|
+
* from them.
|
|
834
|
+
*
|
|
835
|
+
* @throws {SecondWildcardSite} when two sites declare `subdomain: '*'`
|
|
836
|
+
* @throws {SiteHostsEndpointMissing} when the wildcard site's `hosts` route is not served
|
|
837
|
+
* @throws {ProtectedSubdomainIsAnApp} when `protectedSubdomains` repeats an app's own
|
|
838
|
+
* @throws {FileServerHostTaken} when a file server's host is another construct's
|
|
839
|
+
*/
|
|
840
|
+
function assertSubdomains(manifest, configured = []) {
|
|
841
|
+
const wildcards = Object.values(manifest).filter(_geekmidas_manifest.isWildcardSite);
|
|
842
|
+
if (wildcards.length > 1) throw new SecondWildcardSite(wildcards.map((site) => site.id).sort());
|
|
843
|
+
const site = wildcards[0];
|
|
844
|
+
if (site?.hosts) {
|
|
845
|
+
const surface = manifest[site.hosts.surface];
|
|
846
|
+
if (!(surface?.kind === "rest-api" && surface.endpoints.some((endpoint) => endpoint.method.toUpperCase() === "GET" && endpoint.path === site.hosts?.path))) throw new SiteHostsEndpointMissing(site.id, site.hosts.surface, site.hosts.path);
|
|
847
|
+
}
|
|
848
|
+
assertFileServerHosts(manifest);
|
|
849
|
+
const labels = appSubdomains(manifest);
|
|
850
|
+
for (const subdomain of configured) {
|
|
851
|
+
const app = labels.get(subdomain);
|
|
852
|
+
if (app) throw new ProtectedSubdomainIsAnApp(subdomain, app);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Every host a file server answers on — its own and its processors' origin —
|
|
857
|
+
* is no other construct's. {@link appSubdomains} keeps one owner per label,
|
|
858
|
+
* so the clash it would hide is found here, before either is deployed.
|
|
859
|
+
*/
|
|
860
|
+
function assertFileServerHosts(manifest) {
|
|
861
|
+
const owners = /* @__PURE__ */ new Map();
|
|
862
|
+
for (const [label, id] of claimedLabels(manifest)) {
|
|
863
|
+
const other = owners.get(label);
|
|
864
|
+
owners.set(label, id);
|
|
865
|
+
if (other === void 0 || other === id) continue;
|
|
866
|
+
if (manifest[id]?.kind === "file-server") throw new FileServerHostTaken(id, label, other);
|
|
867
|
+
if (manifest[other]?.kind === "file-server") throw new FileServerHostTaken(other, label, id);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
//#endregion
|
|
871
|
+
//#region src/workspace/derive.ts
|
|
872
|
+
/**
|
|
873
|
+
* The apps a manifest implies.
|
|
874
|
+
*
|
|
875
|
+
* `gkm.config.ts` used to carry an `apps` block naming every app: its type, its
|
|
876
|
+
* path, its port, its framework, which other apps it depended on. Every one of
|
|
877
|
+
* those facts was already declared. A `StaticSite('Web', { path: 'apps/web' })`
|
|
878
|
+
* and an `apps.web = { type: 'web', path: 'apps/web', framework: 'vite',
|
|
879
|
+
* dependencies: ['api'] }` are the same statement written twice, and only one of
|
|
880
|
+
* them was checked against anything — so the copy in config was free to drift,
|
|
881
|
+
* and a surface config had no entry for simply never deployed.
|
|
882
|
+
*
|
|
883
|
+
* So the list comes from the graph. A `site` is an app, and so is every
|
|
884
|
+
* `rest-api` — one surface, one container, at the `path` it declared.
|
|
885
|
+
*
|
|
886
|
+
* What config still supplies is what no graph can answer: the backends a cache
|
|
887
|
+
* and a mailer resolve to, the deploy endpoint, the stage's domain.
|
|
888
|
+
*/
|
|
889
|
+
/** Which frontend framework builds each site variant. */
|
|
890
|
+
const FRAMEWORKS = {
|
|
891
|
+
static: "vite",
|
|
892
|
+
next: "nextjs",
|
|
893
|
+
tanstack: "tanstack-start"
|
|
894
|
+
};
|
|
895
|
+
/**
|
|
896
|
+
* The app key a construct id becomes.
|
|
897
|
+
*
|
|
898
|
+
* The same kebab form every physical name is built from, so `Api` is `api` in
|
|
899
|
+
* the config, `production-kitchen-sink-api` on Dokploy, and `API_URL` in an
|
|
900
|
+
* environment — one id, three renderings, no second list.
|
|
901
|
+
*/
|
|
902
|
+
function appKey(id) {
|
|
903
|
+
return (0, _geekmidas_manifest.kebabCase)(id);
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* The app serving a surface: its own, always.
|
|
907
|
+
*
|
|
908
|
+
* Every surface gets a container. There is no arrangement in which one runs
|
|
909
|
+
* inside another — two surfaces in a process share a filesystem, an
|
|
910
|
+
* environment, and every credential either was granted, so an auth server
|
|
911
|
+
* beside an API is one bug in the API away from being read by it.
|
|
912
|
+
*/
|
|
913
|
+
function hostOf(manifest, id) {
|
|
914
|
+
const declaration = manifest[id];
|
|
915
|
+
if (!declaration || declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") return void 0;
|
|
916
|
+
return id;
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Local ports, assigned so that adding a site does not renumber the others.
|
|
920
|
+
*
|
|
921
|
+
* Backends first, then the site holding the base domain, then the rest
|
|
922
|
+
* alphabetically. The ordering is arbitrary but it is *fixed*, which is the
|
|
923
|
+
* property that matters: a port that moves when an unrelated app is added is a
|
|
924
|
+
* port nobody can put in a bookmark. A construct that names its own port keeps
|
|
925
|
+
* it, and is skipped here.
|
|
926
|
+
*/
|
|
927
|
+
function assignPorts(apps) {
|
|
928
|
+
const rank = (name, app) => [
|
|
929
|
+
app.type === "backend" ? 0 : app.type === "web" ? 1 : 2,
|
|
930
|
+
app.root ? 0 : 1,
|
|
931
|
+
name
|
|
932
|
+
];
|
|
933
|
+
const ordered = Object.entries(apps).sort(([aName, a], [bName, b]) => {
|
|
934
|
+
const [at, ar, an] = rank(aName, a);
|
|
935
|
+
const [bt, br, bn] = rank(bName, b);
|
|
936
|
+
return at - bt || ar - br || an.localeCompare(bn);
|
|
937
|
+
});
|
|
938
|
+
const taken = new Set(ordered.map(([, app]) => app.port).filter((p) => !!p));
|
|
939
|
+
let next = 3e3;
|
|
940
|
+
for (const [, app] of ordered) {
|
|
941
|
+
if (app.port) continue;
|
|
942
|
+
while (taken.has(next)) next += 1;
|
|
943
|
+
app.port = next;
|
|
944
|
+
taken.add(next);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Whichever site holds the base domain.
|
|
949
|
+
*
|
|
950
|
+
* The convention first — a site named `web` — because it is one people already
|
|
951
|
+
* rely on. Then an explicit `root: true`. A project with one site needs neither.
|
|
952
|
+
*/
|
|
953
|
+
function markRoot(apps) {
|
|
954
|
+
const sites = Object.entries(apps).filter(([, a]) => a.type === "web" && a.subdomain !== _geekmidas_manifest.WILDCARD_SUBDOMAIN);
|
|
955
|
+
if (sites.length === 0) return;
|
|
956
|
+
if (sites.some(([, a]) => a.root)) return;
|
|
957
|
+
const chosen = sites.find(([name]) => name === "web") ?? (sites.length === 1 ? sites[0] : void 0);
|
|
958
|
+
if (chosen) chosen[1].root = true;
|
|
959
|
+
}
|
|
960
|
+
function derivedApps(manifest, workspace) {
|
|
961
|
+
assertSubdomains(manifest, workspace.protectedSubdomains);
|
|
962
|
+
const apps = {};
|
|
963
|
+
const defaultTarget = workspace.deploy?.default ?? "dokploy";
|
|
964
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
965
|
+
if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
|
|
966
|
+
const spec = declaration.kind === "site" || declaration.kind === "mobile-app" ? declaration.app : {
|
|
967
|
+
path: declaration.path,
|
|
968
|
+
...declaration.kind === "rest-api" && declaration.telescope ? { telescope: true } : {}
|
|
969
|
+
};
|
|
970
|
+
const name = appKey(id);
|
|
971
|
+
const configured = workspace.apps[name];
|
|
972
|
+
apps[name] = {
|
|
973
|
+
...configured,
|
|
974
|
+
type: declaration.kind === "site" ? "web" : declaration.kind === "mobile-app" ? "mobile" : "backend",
|
|
975
|
+
path: spec.path,
|
|
976
|
+
port: spec.port ?? configured?.port ?? 0,
|
|
977
|
+
...(declaration.kind === "rest-api" || declaration.kind === "websocket-api" || declaration.kind === "site") && declaration.subdomain ? { subdomain: declaration.subdomain } : {},
|
|
978
|
+
dependencies: [],
|
|
979
|
+
resolvedDeployTarget: configured?.resolvedDeployTarget ?? defaultTarget,
|
|
980
|
+
...declaration.kind === "site" ? {
|
|
981
|
+
framework: configured?.framework ?? FRAMEWORKS[declaration.variant],
|
|
982
|
+
...declaration.root ? { root: true } : {},
|
|
983
|
+
...spec.config ? { config: spec.config } : {}
|
|
984
|
+
} : {},
|
|
985
|
+
...declaration.kind === "mobile-app" ? {
|
|
986
|
+
framework: configured?.framework ?? declaration.variant,
|
|
987
|
+
...spec.config ? { config: spec.config } : {}
|
|
988
|
+
} : {},
|
|
989
|
+
...spec.telescope !== void 0 ? { telescope: spec.telescope } : {},
|
|
990
|
+
...spec.openapi !== void 0 ? { openapi: spec.openapi } : {},
|
|
991
|
+
...spec.runtime !== void 0 ? { runtime: spec.runtime } : {},
|
|
992
|
+
...spec.env !== void 0 ? { env: spec.env } : {},
|
|
993
|
+
...spec.entry !== void 0 ? { entry: spec.entry } : {},
|
|
994
|
+
...configured?.domain ? { domain: configured.domain } : {}
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
998
|
+
if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
|
|
999
|
+
const app = apps[appKey(id)];
|
|
1000
|
+
if (!app) continue;
|
|
1001
|
+
const edges = (0, _geekmidas_manifest.dependenciesOf)(declaration);
|
|
1002
|
+
const names = /* @__PURE__ */ new Set();
|
|
1003
|
+
for (const edge of edges) {
|
|
1004
|
+
if (edge.kind !== "rest-api") continue;
|
|
1005
|
+
const host = hostOf(manifest, edge.target);
|
|
1006
|
+
if (!host) continue;
|
|
1007
|
+
const key = appKey(host);
|
|
1008
|
+
if (key !== appKey(id) && apps[key]) names.add(key);
|
|
1009
|
+
}
|
|
1010
|
+
app.dependencies = [...names].sort();
|
|
1011
|
+
}
|
|
1012
|
+
markRoot(apps);
|
|
1013
|
+
assignPorts(apps);
|
|
1014
|
+
for (const [name, app] of Object.entries(workspace.apps)) if (!apps[name]) apps[name] = app;
|
|
1015
|
+
return apps;
|
|
1016
|
+
}
|
|
701
1017
|
const SUFFIX_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
702
1018
|
/** A name that S3 would refuse — what the name builder never returns. */
|
|
703
1019
|
var InvalidBucketName = class extends require_errors.GkmError {
|
|
@@ -885,6 +1201,17 @@ function emailUserName(scope, stage, id) {
|
|
|
885
1201
|
id
|
|
886
1202
|
});
|
|
887
1203
|
}
|
|
1204
|
+
/**
|
|
1205
|
+
* What an inbox's bucket and its IAM user are named for, after the stage:
|
|
1206
|
+
* `requests-mail`.
|
|
1207
|
+
*/
|
|
1208
|
+
function inboxBucketId(inbox) {
|
|
1209
|
+
return `${appKey(inbox)}-mail`;
|
|
1210
|
+
}
|
|
1211
|
+
/** The SNS topic SES announces an inbox's mail on. */
|
|
1212
|
+
function inboxTopicName(scope, stage, inbox) {
|
|
1213
|
+
return `gkm-${scope}-${stage}-${inboxBucketId(inbox)}`.replace(/[^A-Za-z0-9_-]/g, "-").slice(0, 256);
|
|
1214
|
+
}
|
|
888
1215
|
/** The stage's AWS account, as every AWS provider asks for it. */
|
|
889
1216
|
const SES_PROVISIONING = S3_PROVISIONING;
|
|
890
1217
|
//#endregion
|
|
@@ -2870,6 +3197,12 @@ Object.defineProperty(exports, "appConstructGlobs", {
|
|
|
2870
3197
|
return appConstructGlobs;
|
|
2871
3198
|
}
|
|
2872
3199
|
});
|
|
3200
|
+
Object.defineProperty(exports, "appKey", {
|
|
3201
|
+
enumerable: true,
|
|
3202
|
+
get: function() {
|
|
3203
|
+
return appKey;
|
|
3204
|
+
}
|
|
3205
|
+
});
|
|
2873
3206
|
Object.defineProperty(exports, "assertDeployedStage", {
|
|
2874
3207
|
enumerable: true,
|
|
2875
3208
|
get: function() {
|
|
@@ -2942,12 +3275,24 @@ Object.defineProperty(exports, "deployedProblems", {
|
|
|
2942
3275
|
return deployedProblems;
|
|
2943
3276
|
}
|
|
2944
3277
|
});
|
|
3278
|
+
Object.defineProperty(exports, "derivedApps", {
|
|
3279
|
+
enumerable: true,
|
|
3280
|
+
get: function() {
|
|
3281
|
+
return derivedApps;
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
2945
3284
|
Object.defineProperty(exports, "emailUserName", {
|
|
2946
3285
|
enumerable: true,
|
|
2947
3286
|
get: function() {
|
|
2948
3287
|
return emailUserName;
|
|
2949
3288
|
}
|
|
2950
3289
|
});
|
|
3290
|
+
Object.defineProperty(exports, "fileServerLabel", {
|
|
3291
|
+
enumerable: true,
|
|
3292
|
+
get: function() {
|
|
3293
|
+
return fileServerLabel;
|
|
3294
|
+
}
|
|
3295
|
+
});
|
|
2951
3296
|
Object.defineProperty(exports, "formatValidationErrors", {
|
|
2952
3297
|
enumerable: true,
|
|
2953
3298
|
get: function() {
|
|
@@ -2990,6 +3335,18 @@ Object.defineProperty(exports, "iamUserName", {
|
|
|
2990
3335
|
return iamUserName;
|
|
2991
3336
|
}
|
|
2992
3337
|
});
|
|
3338
|
+
Object.defineProperty(exports, "inboxBucketId", {
|
|
3339
|
+
enumerable: true,
|
|
3340
|
+
get: function() {
|
|
3341
|
+
return inboxBucketId;
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
Object.defineProperty(exports, "inboxTopicName", {
|
|
3345
|
+
enumerable: true,
|
|
3346
|
+
get: function() {
|
|
3347
|
+
return inboxTopicName;
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
2993
3350
|
Object.defineProperty(exports, "isDeployTargetSupported", {
|
|
2994
3351
|
enumerable: true,
|
|
2995
3352
|
get: function() {
|
|
@@ -3032,6 +3389,12 @@ Object.defineProperty(exports, "processConfig", {
|
|
|
3032
3389
|
return processConfig;
|
|
3033
3390
|
}
|
|
3034
3391
|
});
|
|
3392
|
+
Object.defineProperty(exports, "protectedSubdomains", {
|
|
3393
|
+
enumerable: true,
|
|
3394
|
+
get: function() {
|
|
3395
|
+
return protectedSubdomains;
|
|
3396
|
+
}
|
|
3397
|
+
});
|
|
3035
3398
|
Object.defineProperty(exports, "provisioningOf", {
|
|
3036
3399
|
enumerable: true,
|
|
3037
3400
|
get: function() {
|
|
@@ -3116,6 +3479,12 @@ Object.defineProperty(exports, "validateWorkspaceConfig", {
|
|
|
3116
3479
|
return validateWorkspaceConfig;
|
|
3117
3480
|
}
|
|
3118
3481
|
});
|
|
3482
|
+
Object.defineProperty(exports, "wildcardSite", {
|
|
3483
|
+
enumerable: true,
|
|
3484
|
+
get: function() {
|
|
3485
|
+
return wildcardSite;
|
|
3486
|
+
}
|
|
3487
|
+
});
|
|
3119
3488
|
Object.defineProperty(exports, "workspaceConstructGlobs", {
|
|
3120
3489
|
enumerable: true,
|
|
3121
3490
|
get: function() {
|
|
@@ -3129,4 +3498,4 @@ Object.defineProperty(exports, "wrapSingleAppAsWorkspace", {
|
|
|
3129
3498
|
}
|
|
3130
3499
|
});
|
|
3131
3500
|
|
|
3132
|
-
//# sourceMappingURL=workspace-
|
|
3501
|
+
//# sourceMappingURL=workspace-Ciw3SnME.cjs.map
|