@geekmidas/cli 10.0.0-alpha.165 → 10.0.0-alpha.166
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-Dx6v4Goj.cjs → GoDaddyProvider-DClFHezd.cjs} +2 -2
- package/dist/{GoDaddyProvider-Dx6v4Goj.cjs.map → GoDaddyProvider-DClFHezd.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-C7zClznh.mjs → GoDaddyProvider-mnY-cdD2.mjs} +2 -2
- package/dist/{GoDaddyProvider-C7zClznh.mjs.map → GoDaddyProvider-mnY-cdD2.mjs.map} +1 -1
- package/dist/{HostingerProvider-BALtMnss.mjs → HostingerProvider-39eSGyBa.mjs} +2 -2
- package/dist/{HostingerProvider-BALtMnss.mjs.map → HostingerProvider-39eSGyBa.mjs.map} +1 -1
- package/dist/{HostingerProvider-COuTy74z.cjs → HostingerProvider-BMyz2LnZ.cjs} +2 -2
- package/dist/{HostingerProvider-COuTy74z.cjs.map → HostingerProvider-BMyz2LnZ.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CcNLLGX-.mjs → LegacyStateStore-B2TBaSMq.mjs} +2 -2
- package/dist/{LegacyStateStore-CcNLLGX-.mjs.map → LegacyStateStore-B2TBaSMq.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C0rh3dKV.cjs → LegacyStateStore-BJY7ntQk.cjs} +2 -2
- package/dist/{LegacyStateStore-C0rh3dKV.cjs.map → LegacyStateStore-BJY7ntQk.cjs.map} +1 -1
- package/dist/{LocalStateStore-CxCCBQkS.mjs → LocalStateStore-8LFd-aMA.mjs} +2 -2
- package/dist/{LocalStateStore-CxCCBQkS.mjs.map → LocalStateStore-8LFd-aMA.mjs.map} +1 -1
- package/dist/{LocalStateStore-Dcq3wd1v.cjs → LocalStateStore-BvoEjPi5.cjs} +2 -2
- package/dist/{LocalStateStore-Dcq3wd1v.cjs.map → LocalStateStore-BvoEjPi5.cjs.map} +1 -1
- package/dist/{S3StateStore-DUwCcCgj.mjs → S3StateStore-DMzsqfSa.mjs} +4 -4
- package/dist/{S3StateStore-DUwCcCgj.mjs.map → S3StateStore-DMzsqfSa.mjs.map} +1 -1
- package/dist/{S3StateStore-Cgf1owUZ.cjs → S3StateStore-eeA5NXRa.cjs} +4 -4
- package/dist/{S3StateStore-Cgf1owUZ.cjs.map → S3StateStore-eeA5NXRa.cjs.map} +1 -1
- package/dist/{SSMStateStore-BarWA07O.cjs → SSMStateStore-BUv-du0T.cjs} +2 -2
- package/dist/{SSMStateStore-BarWA07O.cjs.map → SSMStateStore-BUv-du0T.cjs.map} +1 -1
- package/dist/{SSMStateStore-A_N_T4b0.mjs → SSMStateStore-CE2DTAtT.mjs} +2 -2
- package/dist/{SSMStateStore-A_N_T4b0.mjs.map → SSMStateStore-CE2DTAtT.mjs.map} +1 -1
- package/dist/{add-DAeCqI9O.mjs → add-BgCYGJpE.mjs} +6 -6
- package/dist/{add-DAeCqI9O.mjs.map → add-BgCYGJpE.mjs.map} +1 -1
- package/dist/{add-DVSNjsI8.cjs → add-Dp0KQNkQ.cjs} +7 -7
- package/dist/{add-DVSNjsI8.cjs.map → add-Dp0KQNkQ.cjs.map} +1 -1
- package/dist/{apps-Ck_Ie6gN.mjs → apps-CJTOIaz3.mjs} +4 -5
- package/dist/{apps-Ck_Ie6gN.mjs.map → apps-CJTOIaz3.mjs.map} +1 -1
- package/dist/{apps-S3RMvFyk.cjs → apps-DkMR-qvD.cjs} +22 -23
- package/dist/{apps-S3RMvFyk.cjs.map → apps-DkMR-qvD.cjs.map} +1 -1
- package/dist/{bundler-B_vQ_591.cjs → bundler-CA7KimJ0.cjs} +6 -6
- package/dist/{bundler-B_vQ_591.cjs.map → bundler-CA7KimJ0.cjs.map} +1 -1
- package/dist/{bundler-Bbn0opSb.mjs → bundler-Dt1ffXl6.mjs} +6 -6
- package/dist/{bundler-Bbn0opSb.mjs.map → bundler-Dt1ffXl6.mjs.map} +1 -1
- package/dist/{cli-CMykD9Py.mjs → cli-C-fdEb8N.mjs} +5 -5
- package/dist/{cli-CMykD9Py.mjs.map → cli-C-fdEb8N.mjs.map} +1 -1
- package/dist/{cli-fs4D-3cd.cjs → cli-CY1Cp8yN.cjs} +5 -5
- package/dist/{cli-fs4D-3cd.cjs.map → cli-CY1Cp8yN.cjs.map} +1 -1
- package/dist/{compose-CNJO99Tv.cjs → compose-BIm9yNH7.cjs} +6 -6
- package/dist/{compose-CNJO99Tv.cjs.map → compose-BIm9yNH7.cjs.map} +1 -1
- package/dist/{compose-Cm6EWvjX.mjs → compose-CZGeE6QJ.mjs} +6 -6
- package/dist/{compose-Cm6EWvjX.mjs.map → compose-CZGeE6QJ.mjs.map} +1 -1
- package/dist/{compose-DmcYTLhO.cjs → compose-SmuCWWUh.cjs} +8 -8
- package/dist/{compose-DmcYTLhO.cjs.map → compose-SmuCWWUh.cjs.map} +1 -1
- package/dist/{compose-BtjZNCC-.mjs → compose-tX6YTa1U.mjs} +8 -8
- package/dist/{compose-BtjZNCC-.mjs.map → compose-tX6YTa1U.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-CS3Dr-pv.cjs} +6 -6
- package/dist/{credentials-DVYgFK_H.cjs.map → credentials-CS3Dr-pv.cjs.map} +1 -1
- package/dist/{credentials-C-yuISKH.mjs → credentials-V3WgiKmZ.mjs} +6 -6
- package/dist/{credentials-C-yuISKH.mjs.map → credentials-V3WgiKmZ.mjs.map} +1 -1
- package/dist/deploy/public.cjs +12 -12
- package/dist/deploy/public.mjs +12 -12
- package/dist/{deploy-DGXMqTan.cjs → deploy--ia-CGMv.cjs} +25 -25
- package/dist/deploy--ia-CGMv.cjs.map +1 -0
- package/dist/{deploy-CuSF9y7t.mjs → deploy-BWFFSN5p.mjs} +16 -16
- package/dist/deploy-BWFFSN5p.mjs.map +1 -0
- package/dist/{destroy-BROvAzQQ.cjs → destroy-CrxF8Dlk.cjs} +10 -10
- package/dist/{destroy-BROvAzQQ.cjs.map → destroy-CrxF8Dlk.cjs.map} +1 -1
- package/dist/{destroy-DpRGLdt1.mjs → destroy-ZNiKL3--.mjs} +10 -10
- package/dist/{destroy-DpRGLdt1.mjs.map → destroy-ZNiKL3--.mjs.map} +1 -1
- package/dist/{docker-qq5xNUP2.cjs → docker-BtUjo-J_.cjs} +9 -8
- package/dist/{docker-qq5xNUP2.cjs.map → docker-BtUjo-J_.cjs.map} +1 -1
- package/dist/{docker-CRVWdGH9.mjs → docker-DhmU416x.mjs} +6 -5
- package/dist/{docker-CRVWdGH9.mjs.map → docker-DhmU416x.mjs.map} +1 -1
- package/dist/{dokploy-DcH7hY84.mjs → dokploy-BszAUbbA.mjs} +2 -2
- package/dist/{dokploy-DcH7hY84.mjs.map → dokploy-BszAUbbA.mjs.map} +1 -1
- package/dist/{dokploy-Duyj4-pa.cjs → dokploy-ComPiFLl.cjs} +2 -2
- package/dist/{dokploy-Duyj4-pa.cjs.map → dokploy-ComPiFLl.cjs.map} +1 -1
- package/dist/{eas-C11dyfIw.mjs → eas-DQudP2g2.mjs} +3 -3
- package/dist/{eas-C11dyfIw.mjs.map → eas-DQudP2g2.mjs.map} +1 -1
- package/dist/{eas-DqTDImhv.cjs → eas-zxVAWY6c.cjs} +6 -6
- package/dist/{eas-DqTDImhv.cjs.map → eas-zxVAWY6c.cjs.map} +1 -1
- package/dist/{encryption-DsZwqQyL.mjs → encryption-BCaweYBJ.mjs} +4 -4
- package/dist/{encryption-DsZwqQyL.mjs.map → encryption-BCaweYBJ.mjs.map} +1 -1
- package/dist/{encryption-CsOfA6QT.cjs → encryption-CU5O0Y61.cjs} +4 -4
- package/dist/{encryption-CsOfA6QT.cjs.map → encryption-CU5O0Y61.cjs.map} +1 -1
- package/dist/{engine-CdU3Oggs.mjs → engine-BzeCK6e8.mjs} +9 -10
- package/dist/{engine-CdU3Oggs.mjs.map → engine-BzeCK6e8.mjs.map} +1 -1
- package/dist/{engine-WllCnGNy.cjs → engine-xrlcbr1g.cjs} +10 -11
- package/dist/{engine-WllCnGNy.cjs.map → engine-xrlcbr1g.cjs.map} +1 -1
- package/dist/{github-Bt3V7pdf.mjs → github-CHClpJZS.mjs} +116 -72
- package/dist/github-CHClpJZS.mjs.map +1 -0
- package/dist/{github-B3lKrKIn.cjs → github-Jcrqfzg0.cjs} +116 -72
- package/dist/github-Jcrqfzg0.cjs.map +1 -0
- package/dist/{googlePlay-D-6pUHGU.mjs → googlePlay-Dk_pnif9.mjs} +5 -5
- package/dist/{googlePlay-D-6pUHGU.mjs.map → googlePlay-Dk_pnif9.mjs.map} +1 -1
- package/dist/{googlePlay-B7P3Ahps.cjs → googlePlay-e_tIBr4n.cjs} +5 -5
- package/dist/{googlePlay-B7P3Ahps.cjs.map → googlePlay-e_tIBr4n.cjs.map} +1 -1
- package/dist/{iam-BVPpX76R.cjs → iam-B6WLUf_x.cjs} +2 -2
- package/dist/{iam-BVPpX76R.cjs.map → iam-B6WLUf_x.cjs.map} +1 -1
- package/dist/{iam-q9ALh-Y5.mjs → iam-BKfO7u14.mjs} +2 -2
- package/dist/{iam-q9ALh-Y5.mjs.map → iam-BKfO7u14.mjs.map} +1 -1
- package/dist/index.cjs +70 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +64 -64
- package/dist/index.mjs.map +1 -1
- package/dist/{local-B4H2Lsr6.mjs → local-DUi3f-WB.mjs} +2 -2
- package/dist/{local-B4H2Lsr6.mjs.map → local-DUi3f-WB.mjs.map} +1 -1
- package/dist/{local-Cs_aQJ45.cjs → local-Dc2h2Ex3.cjs} +2 -2
- package/dist/{local-Cs_aQJ45.cjs.map → local-Dc2h2Ex3.cjs.map} +1 -1
- package/dist/{migrate-BQSPfKHa.cjs → migrate-BU4eyd7z.cjs} +6 -6
- package/dist/{migrate-BQSPfKHa.cjs.map → migrate-BU4eyd7z.cjs.map} +1 -1
- package/dist/{migrate-CQ-PNghX.mjs → migrate-BxFCXc7M.mjs} +6 -6
- package/dist/{migrate-CQ-PNghX.mjs.map → migrate-BxFCXc7M.mjs.map} +1 -1
- package/dist/{migrate-CphnV0sY.cjs → migrate-CIjcBr96.cjs} +4 -4
- package/dist/{migrate-CphnV0sY.cjs.map → migrate-CIjcBr96.cjs.map} +1 -1
- package/dist/{migrate-C8JFuMT-.mjs → migrate-CbpeVxEW.mjs} +4 -4
- package/dist/{migrate-C8JFuMT-.mjs.map → migrate-CbpeVxEW.mjs.map} +1 -1
- package/dist/{notes-BtyuHcKA.cjs → notes-DJyFkK13.cjs} +7 -8
- package/dist/{notes-BtyuHcKA.cjs.map → notes-DJyFkK13.cjs.map} +1 -1
- package/dist/{notes-IlQ35E3R.mjs → notes-TDHMzdVt.mjs} +3 -4
- package/dist/{notes-IlQ35E3R.mjs.map → notes-TDHMzdVt.mjs.map} +1 -1
- 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-BPzx0b0t.mjs} +2 -2
- package/dist/{projectBucket-SHlF0_Pr.mjs.map → projectBucket-BPzx0b0t.mjs.map} +1 -1
- package/dist/{projectBucket-0Lvy2J0h.cjs → projectBucket-CoskwJC5.cjs} +2 -2
- package/dist/{projectBucket-0Lvy2J0h.cjs.map → projectBucket-CoskwJC5.cjs.map} +1 -1
- package/dist/{publish-igpjCzZj.cjs → publish-DB3-zkpm.cjs} +2 -2
- package/dist/{publish-igpjCzZj.cjs.map → publish-DB3-zkpm.cjs.map} +1 -1
- package/dist/{publish-C9IJb1Ez.mjs → publish-LZ1eb-MI.mjs} +2 -2
- package/dist/{publish-C9IJb1Ez.mjs.map → publish-LZ1eb-MI.mjs.map} +1 -1
- package/dist/{resolve-5T34quci.cjs → resolve-B5_tOTJG.cjs} +4 -4
- package/dist/{resolve-5T34quci.cjs.map → resolve-B5_tOTJG.cjs.map} +1 -1
- package/dist/{resolve-Cl8CVASM.mjs → resolve-jez3Y1S0.mjs} +4 -4
- package/dist/{resolve-Cl8CVASM.mjs.map → resolve-jez3Y1S0.mjs.map} +1 -1
- package/dist/{rollback-DMPb940C.cjs → rollback-BNo1bCLO.cjs} +7 -7
- package/dist/{rollback-DMPb940C.cjs.map → rollback-BNo1bCLO.cjs.map} +1 -1
- package/dist/{rollback-1JLE6qPo.mjs → rollback-BtOfxwo-.mjs} +7 -7
- package/dist/{rollback-1JLE6qPo.mjs.map → rollback-BtOfxwo-.mjs.map} +1 -1
- package/dist/{s3-CCuNLgHk.mjs → s3-Bf_75vVl.mjs} +3 -3
- package/dist/{s3-CCuNLgHk.mjs.map → s3-Bf_75vVl.mjs.map} +1 -1
- package/dist/{s3-DkiOi5J1.cjs → s3-BlPwyu1L.cjs} +3 -3
- package/dist/{s3-DkiOi5J1.cjs.map → s3-BlPwyu1L.cjs.map} +1 -1
- package/dist/{serverSetup-C0pLpF5w.mjs → serverSetup-D0Zor2i4.mjs} +7 -7
- package/dist/{serverSetup-C0pLpF5w.mjs.map → serverSetup-D0Zor2i4.mjs.map} +1 -1
- package/dist/{serverSetup-JYZxj371.cjs → serverSetup-D30vVD6t.cjs} +7 -7
- package/dist/{serverSetup-JYZxj371.cjs.map → serverSetup-D30vVD6t.cjs.map} +1 -1
- package/dist/{sniffer-DB4Ocija.cjs → sniffer-Bw00z3I8.cjs} +7 -7
- package/dist/{sniffer-DB4Ocija.cjs.map → sniffer-Bw00z3I8.cjs.map} +1 -1
- package/dist/{sniffer-CiV4xGbe.mjs → sniffer-DdPDiNmc.mjs} +7 -7
- package/dist/{sniffer-CiV4xGbe.mjs.map → sniffer-DdPDiNmc.mjs.map} +1 -1
- package/dist/{snsSubscriptions-C_-6fqBd.mjs → snsSubscriptions-DBxVTR6Y.mjs} +3 -3
- package/dist/{snsSubscriptions-C_-6fqBd.mjs.map → snsSubscriptions-DBxVTR6Y.mjs.map} +1 -1
- package/dist/{snsSubscriptions-DpYvMVR9.cjs → snsSubscriptions-g7apv_fy.cjs} +3 -3
- package/dist/{snsSubscriptions-DpYvMVR9.cjs.map → snsSubscriptions-g7apv_fy.cjs.map} +1 -1
- package/dist/{sst-D1oSl_1d.cjs → sst-CEs0bMxj.cjs} +6 -6
- package/dist/{sst-D1oSl_1d.cjs.map → sst-CEs0bMxj.cjs.map} +1 -1
- package/dist/{sst-BUzuE84X.mjs → sst-DJ22YDEq.mjs} +5 -5
- package/dist/{sst-BUzuE84X.mjs.map → sst-DJ22YDEq.mjs.map} +1 -1
- package/dist/{stack-TUs2DY7v.cjs → stack-BmG-lKgD.cjs} +12 -13
- package/dist/{stack-TUs2DY7v.cjs.map → stack-BmG-lKgD.cjs.map} +1 -1
- package/dist/{stack-DhBBTTIa.mjs → stack-Ds9jjpE1.mjs} +7 -8
- package/dist/{stack-DhBBTTIa.mjs.map → stack-Ds9jjpE1.mjs.map} +1 -1
- package/dist/{stage-DuLwZ9wu.mjs → stage-D9dfV1Ey.mjs} +7 -7
- package/dist/{stage-DuLwZ9wu.mjs.map → stage-D9dfV1Ey.mjs.map} +1 -1
- package/dist/{stage-B3qg7LoZ.cjs → stage-kGc9L3yB.cjs} +7 -7
- package/dist/{stage-B3qg7LoZ.cjs.map → stage-kGc9L3yB.cjs.map} +1 -1
- package/dist/{stages-CW7qtiJ2.mjs → stages-BL22BLJS.mjs} +3 -3
- package/dist/{stages-CW7qtiJ2.mjs.map → stages-BL22BLJS.mjs.map} +1 -1
- package/dist/{stages-CtqmEJJW.cjs → stages-CN53nNOK.cjs} +3 -3
- package/dist/{stages-CtqmEJJW.cjs.map → stages-CN53nNOK.cjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-B_TanNPL.mjs → terminal-C0A7S7fB.mjs} +2 -2
- package/dist/{terminal-B_TanNPL.mjs.map → terminal-C0A7S7fB.mjs.map} +1 -1
- package/dist/{terminal-CXZWPHMW.cjs → terminal-DVlIWcUb.cjs} +2 -2
- package/dist/{terminal-CXZWPHMW.cjs.map → terminal-DVlIWcUb.cjs.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-D4hzz6Xb.mjs} +331 -3
- package/dist/workspace-D4hzz6Xb.mjs.map +1 -0
- package/dist/{workspace-VhzmoxOv.cjs → workspace-DPSdiv-b.cjs} +371 -1
- package/dist/workspace-DPSdiv-b.cjs.map +1 -0
- package/package.json +15 -15
- 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/github-B3lKrKIn.cjs.map +0 -1
- package/dist/github-Bt3V7pdf.mjs.map +0 -1
- package/dist/workspace-D5Vm2qcy.mjs.map +0 -1
- package/dist/workspace-VhzmoxOv.cjs.map +0 -1
|
@@ -698,6 +698,323 @@ 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_URL`), and the surface in front of it,
|
|
708
|
+
* `AssetsServer` (`ASSETS_SERVER_URL`). The suffix keeps the two nodes and
|
|
709
|
+
* their keys apart, and that is all it is for. A host is not a key, so it
|
|
710
|
+
* takes the name the construct was given: `assets.<domain>`, never
|
|
711
|
+
* `assets-server.<domain>`.
|
|
712
|
+
*
|
|
713
|
+
* Read off the surface's id rather than its `of`: with `{ origin }` the bucket
|
|
714
|
+
* is another construct's, and its id is not this file server's name.
|
|
715
|
+
*
|
|
716
|
+
* Every host a file server has — its CDN alias and certificate, its edge
|
|
717
|
+
* route, its local `*.localhost` address, its processors' origin and unit —
|
|
718
|
+
* is built from this one label, so no two of them can disagree.
|
|
719
|
+
*
|
|
720
|
+
* @example fileServerLabel('AssetsServer') // 'assets'
|
|
721
|
+
* @example fileServerLabel('UserUploadsServer') // 'user-uploads'
|
|
722
|
+
*/
|
|
723
|
+
function fileServerLabel(serverId) {
|
|
724
|
+
return (0, _geekmidas_manifest.kebabCase)(serverId.replace(/Server$/, ""));
|
|
725
|
+
}
|
|
726
|
+
//#endregion
|
|
727
|
+
//#region src/workspace/subdomains.ts
|
|
728
|
+
/**
|
|
729
|
+
* The subdomains of a stage's domain, as a wildcard site sees them.
|
|
730
|
+
*
|
|
731
|
+
* A site declared `subdomain: '*'` answers on every label nothing else does,
|
|
732
|
+
* so the labels something else does answer on are the ones a tenant can never
|
|
733
|
+
* take. They come from two places and from nowhere else: every app's own
|
|
734
|
+
* label, read off the constructs and never listed by hand, and the names no
|
|
735
|
+
* construct declares (`www`, `mail`, `status`), listed once in the workspace
|
|
736
|
+
* config as `protectedSubdomains`.
|
|
737
|
+
*/
|
|
738
|
+
/** A `protectedSubdomains` entry an app already answers on. */
|
|
739
|
+
var ProtectedSubdomainIsAnApp = class extends require_errors.GkmError {
|
|
740
|
+
subdomain;
|
|
741
|
+
app;
|
|
742
|
+
constructor(subdomain, app) {
|
|
743
|
+
super(`protectedSubdomains lists '${subdomain}', which '${app}' already answers on — a construct's own subdomain is protected without being listed. Remove it from protectedSubdomains.`);
|
|
744
|
+
this.subdomain = subdomain;
|
|
745
|
+
this.app = app;
|
|
746
|
+
this.name = "ProtectedSubdomainIsAnApp";
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
/** Two sites that both answer on every subdomain. */
|
|
750
|
+
var SecondWildcardSite = class extends require_errors.GkmError {
|
|
751
|
+
sites;
|
|
752
|
+
constructor(sites) {
|
|
753
|
+
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.`);
|
|
754
|
+
this.sites = sites;
|
|
755
|
+
this.name = "SecondWildcardSite";
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
/** A wildcard site whose `hosts` route is on no surface the project declares. */
|
|
759
|
+
var SiteHostsEndpointMissing = class extends require_errors.GkmError {
|
|
760
|
+
site;
|
|
761
|
+
surface;
|
|
762
|
+
path;
|
|
763
|
+
constructor(site, surface, path) {
|
|
764
|
+
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.`);
|
|
765
|
+
this.site = site;
|
|
766
|
+
this.surface = surface;
|
|
767
|
+
this.path = path;
|
|
768
|
+
this.name = "SiteHostsEndpointMissing";
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* A file server whose host another construct already answers on.
|
|
773
|
+
*
|
|
774
|
+
* A file server answers on its own name — `FileServer('Assets')` on
|
|
775
|
+
* `assets.<domain>` — so an app named `Assets` beside it would claim the same
|
|
776
|
+
* host, and whichever deployed second would take it from the first.
|
|
777
|
+
*/
|
|
778
|
+
var FileServerHostTaken = class extends require_errors.GkmError {
|
|
779
|
+
fileServer;
|
|
780
|
+
subdomain;
|
|
781
|
+
app;
|
|
782
|
+
constructor(fileServer, subdomain, app) {
|
|
783
|
+
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.`);
|
|
784
|
+
this.fileServer = fileServer;
|
|
785
|
+
this.subdomain = subdomain;
|
|
786
|
+
this.app = app;
|
|
787
|
+
this.name = "FileServerHostTaken";
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
/** The project's one wildcard site, or `undefined` when it has none. */
|
|
791
|
+
function wildcardSite(manifest) {
|
|
792
|
+
return Object.values(manifest).find(_geekmidas_manifest.isWildcardSite);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Every label an app answers on, by the app it belongs to — what a deploy
|
|
796
|
+
* puts under the stage's domain: a surface's or site's `subdomain` (or its id
|
|
797
|
+
* kebab-cased), each file server and its processors' origin, and each worker,
|
|
798
|
+
* which SNS may push to on a host of its own.
|
|
799
|
+
*
|
|
800
|
+
* The root site's is kept although it answers on the domain itself: which
|
|
801
|
+
* site is the root can change without a tenant's slug changing meaning. The
|
|
802
|
+
* wildcard site has none — its labels are whatever is left.
|
|
803
|
+
*/
|
|
804
|
+
function appSubdomains(manifest) {
|
|
805
|
+
return new Map(claimedLabels(manifest));
|
|
806
|
+
}
|
|
807
|
+
/** Each label a construct answers on, with that construct's id, in manifest order. */
|
|
808
|
+
function* claimedLabels(manifest) {
|
|
809
|
+
for (const [id, declaration] of Object.entries(manifest)) switch (declaration.kind) {
|
|
810
|
+
case "rest-api":
|
|
811
|
+
case "websocket-api":
|
|
812
|
+
yield [declaration.subdomain ?? (0, _geekmidas_manifest.kebabCase)(id), id];
|
|
813
|
+
break;
|
|
814
|
+
case "site":
|
|
815
|
+
if (declaration.subdomain === _geekmidas_manifest.WILDCARD_SUBDOMAIN) break;
|
|
816
|
+
yield [declaration.subdomain ?? (0, _geekmidas_manifest.kebabCase)(id), id];
|
|
817
|
+
break;
|
|
818
|
+
case "file-server":
|
|
819
|
+
yield [fileServerLabel(id), id];
|
|
820
|
+
if (declaration.processors?.length) yield [`${fileServerLabel(id)}-processors`, id];
|
|
821
|
+
break;
|
|
822
|
+
case "worker": yield [(0, _geekmidas_manifest.kebabCase)(id), id];
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* The labels no tenant may take: every app's own and the workspace's
|
|
827
|
+
* `protectedSubdomains`, sorted.
|
|
828
|
+
*/
|
|
829
|
+
function protectedSubdomains(manifest, configured = []) {
|
|
830
|
+
return [.../* @__PURE__ */ new Set([...appSubdomains(manifest).keys(), ...configured])].sort();
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* What a project's subdomains have to satisfy before anything is derived
|
|
834
|
+
* from them.
|
|
835
|
+
*
|
|
836
|
+
* @throws {SecondWildcardSite} when two sites declare `subdomain: '*'`
|
|
837
|
+
* @throws {SiteHostsEndpointMissing} when the wildcard site's `hosts` route is not served
|
|
838
|
+
* @throws {ProtectedSubdomainIsAnApp} when `protectedSubdomains` repeats an app's own
|
|
839
|
+
* @throws {FileServerHostTaken} when a file server's host is another construct's
|
|
840
|
+
*/
|
|
841
|
+
function assertSubdomains(manifest, configured = []) {
|
|
842
|
+
const wildcards = Object.values(manifest).filter(_geekmidas_manifest.isWildcardSite);
|
|
843
|
+
if (wildcards.length > 1) throw new SecondWildcardSite(wildcards.map((site) => site.id).sort());
|
|
844
|
+
const site = wildcards[0];
|
|
845
|
+
if (site?.hosts) {
|
|
846
|
+
const surface = manifest[site.hosts.surface];
|
|
847
|
+
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);
|
|
848
|
+
}
|
|
849
|
+
assertFileServerHosts(manifest);
|
|
850
|
+
const labels = appSubdomains(manifest);
|
|
851
|
+
for (const subdomain of configured) {
|
|
852
|
+
const app = labels.get(subdomain);
|
|
853
|
+
if (app) throw new ProtectedSubdomainIsAnApp(subdomain, app);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* Every host a file server answers on — its own and its processors' origin —
|
|
858
|
+
* is no other construct's. {@link appSubdomains} keeps one owner per label,
|
|
859
|
+
* so the clash it would hide is found here, before either is deployed.
|
|
860
|
+
*/
|
|
861
|
+
function assertFileServerHosts(manifest) {
|
|
862
|
+
const owners = /* @__PURE__ */ new Map();
|
|
863
|
+
for (const [label, id] of claimedLabels(manifest)) {
|
|
864
|
+
const other = owners.get(label);
|
|
865
|
+
owners.set(label, id);
|
|
866
|
+
if (other === void 0 || other === id) continue;
|
|
867
|
+
if (manifest[id]?.kind === "file-server") throw new FileServerHostTaken(id, label, other);
|
|
868
|
+
if (manifest[other]?.kind === "file-server") throw new FileServerHostTaken(other, label, id);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region src/workspace/derive.ts
|
|
873
|
+
/**
|
|
874
|
+
* The apps a manifest implies.
|
|
875
|
+
*
|
|
876
|
+
* `gkm.config.ts` used to carry an `apps` block naming every app: its type, its
|
|
877
|
+
* path, its port, its framework, which other apps it depended on. Every one of
|
|
878
|
+
* those facts was already declared. A `StaticSite('Web', { path: 'apps/web' })`
|
|
879
|
+
* and an `apps.web = { type: 'web', path: 'apps/web', framework: 'vite',
|
|
880
|
+
* dependencies: ['api'] }` are the same statement written twice, and only one of
|
|
881
|
+
* them was checked against anything — so the copy in config was free to drift,
|
|
882
|
+
* and a surface config had no entry for simply never deployed.
|
|
883
|
+
*
|
|
884
|
+
* So the list comes from the graph. A `site` is an app, and so is every
|
|
885
|
+
* `rest-api` — one surface, one container, at the `path` it declared.
|
|
886
|
+
*
|
|
887
|
+
* What config still supplies is what no graph can answer: the backends a cache
|
|
888
|
+
* and a mailer resolve to, the deploy endpoint, the stage's domain.
|
|
889
|
+
*/
|
|
890
|
+
/** Which frontend framework builds each site variant. */
|
|
891
|
+
const FRAMEWORKS = {
|
|
892
|
+
static: "vite",
|
|
893
|
+
next: "nextjs",
|
|
894
|
+
tanstack: "tanstack-start"
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* The app key a construct id becomes.
|
|
898
|
+
*
|
|
899
|
+
* The same kebab form every physical name is built from, so `Api` is `api` in
|
|
900
|
+
* the config, `production-kitchen-sink-api` on Dokploy, and `API_URL` in an
|
|
901
|
+
* environment — one id, three renderings, no second list.
|
|
902
|
+
*/
|
|
903
|
+
function appKey(id) {
|
|
904
|
+
return (0, _geekmidas_manifest.kebabCase)(id);
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* The app serving a surface: its own, always.
|
|
908
|
+
*
|
|
909
|
+
* Every surface gets a container. There is no arrangement in which one runs
|
|
910
|
+
* inside another — two surfaces in a process share a filesystem, an
|
|
911
|
+
* environment, and every credential either was granted, so an auth server
|
|
912
|
+
* beside an API is one bug in the API away from being read by it.
|
|
913
|
+
*/
|
|
914
|
+
function hostOf(manifest, id) {
|
|
915
|
+
const declaration = manifest[id];
|
|
916
|
+
if (!declaration || declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") return void 0;
|
|
917
|
+
return id;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Local ports, assigned so that adding a site does not renumber the others.
|
|
921
|
+
*
|
|
922
|
+
* Backends first, then the site holding the base domain, then the rest
|
|
923
|
+
* alphabetically. The ordering is arbitrary but it is *fixed*, which is the
|
|
924
|
+
* property that matters: a port that moves when an unrelated app is added is a
|
|
925
|
+
* port nobody can put in a bookmark. A construct that names its own port keeps
|
|
926
|
+
* it, and is skipped here.
|
|
927
|
+
*/
|
|
928
|
+
function assignPorts(apps) {
|
|
929
|
+
const rank = (name, app) => [
|
|
930
|
+
app.type === "backend" ? 0 : app.type === "web" ? 1 : 2,
|
|
931
|
+
app.root ? 0 : 1,
|
|
932
|
+
name
|
|
933
|
+
];
|
|
934
|
+
const ordered = Object.entries(apps).sort(([aName, a], [bName, b]) => {
|
|
935
|
+
const [at, ar, an] = rank(aName, a);
|
|
936
|
+
const [bt, br, bn] = rank(bName, b);
|
|
937
|
+
return at - bt || ar - br || an.localeCompare(bn);
|
|
938
|
+
});
|
|
939
|
+
const taken = new Set(ordered.map(([, app]) => app.port).filter((p) => !!p));
|
|
940
|
+
let next = 3e3;
|
|
941
|
+
for (const [, app] of ordered) {
|
|
942
|
+
if (app.port) continue;
|
|
943
|
+
while (taken.has(next)) next += 1;
|
|
944
|
+
app.port = next;
|
|
945
|
+
taken.add(next);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Whichever site holds the base domain.
|
|
950
|
+
*
|
|
951
|
+
* The convention first — a site named `web` — because it is one people already
|
|
952
|
+
* rely on. Then an explicit `root: true`. A project with one site needs neither.
|
|
953
|
+
*/
|
|
954
|
+
function markRoot(apps) {
|
|
955
|
+
const sites = Object.entries(apps).filter(([, a]) => a.type === "web" && a.subdomain !== _geekmidas_manifest.WILDCARD_SUBDOMAIN);
|
|
956
|
+
if (sites.length === 0) return;
|
|
957
|
+
if (sites.some(([, a]) => a.root)) return;
|
|
958
|
+
const chosen = sites.find(([name]) => name === "web") ?? (sites.length === 1 ? sites[0] : void 0);
|
|
959
|
+
if (chosen) chosen[1].root = true;
|
|
960
|
+
}
|
|
961
|
+
function derivedApps(manifest, workspace) {
|
|
962
|
+
assertSubdomains(manifest, workspace.protectedSubdomains);
|
|
963
|
+
const apps = {};
|
|
964
|
+
const defaultTarget = workspace.deploy?.default ?? "dokploy";
|
|
965
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
966
|
+
if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
|
|
967
|
+
const spec = declaration.kind === "site" || declaration.kind === "mobile-app" ? declaration.app : {
|
|
968
|
+
path: declaration.path,
|
|
969
|
+
...declaration.kind === "rest-api" && declaration.telescope ? { telescope: true } : {}
|
|
970
|
+
};
|
|
971
|
+
const name = appKey(id);
|
|
972
|
+
const configured = workspace.apps[name];
|
|
973
|
+
apps[name] = {
|
|
974
|
+
...configured,
|
|
975
|
+
type: declaration.kind === "site" ? "web" : declaration.kind === "mobile-app" ? "mobile" : "backend",
|
|
976
|
+
path: spec.path,
|
|
977
|
+
port: spec.port ?? configured?.port ?? 0,
|
|
978
|
+
...(declaration.kind === "rest-api" || declaration.kind === "websocket-api" || declaration.kind === "site") && declaration.subdomain ? { subdomain: declaration.subdomain } : {},
|
|
979
|
+
dependencies: [],
|
|
980
|
+
resolvedDeployTarget: configured?.resolvedDeployTarget ?? defaultTarget,
|
|
981
|
+
...declaration.kind === "site" ? {
|
|
982
|
+
framework: configured?.framework ?? FRAMEWORKS[declaration.variant],
|
|
983
|
+
...declaration.root ? { root: true } : {},
|
|
984
|
+
...spec.config ? { config: spec.config } : {}
|
|
985
|
+
} : {},
|
|
986
|
+
...declaration.kind === "mobile-app" ? {
|
|
987
|
+
framework: configured?.framework ?? declaration.variant,
|
|
988
|
+
...spec.config ? { config: spec.config } : {}
|
|
989
|
+
} : {},
|
|
990
|
+
...spec.telescope !== void 0 ? { telescope: spec.telescope } : {},
|
|
991
|
+
...spec.openapi !== void 0 ? { openapi: spec.openapi } : {},
|
|
992
|
+
...spec.runtime !== void 0 ? { runtime: spec.runtime } : {},
|
|
993
|
+
...spec.env !== void 0 ? { env: spec.env } : {},
|
|
994
|
+
...spec.entry !== void 0 ? { entry: spec.entry } : {},
|
|
995
|
+
...configured?.domain ? { domain: configured.domain } : {}
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
for (const [id, declaration] of Object.entries(manifest)) {
|
|
999
|
+
if (declaration.kind !== "site" && declaration.kind !== "mobile-app" && declaration.kind !== "rest-api" && declaration.kind !== "websocket-api") continue;
|
|
1000
|
+
const app = apps[appKey(id)];
|
|
1001
|
+
if (!app) continue;
|
|
1002
|
+
const edges = (0, _geekmidas_manifest.dependenciesOf)(declaration);
|
|
1003
|
+
const names = /* @__PURE__ */ new Set();
|
|
1004
|
+
for (const edge of edges) {
|
|
1005
|
+
if (edge.kind !== "rest-api") continue;
|
|
1006
|
+
const host = hostOf(manifest, edge.target);
|
|
1007
|
+
if (!host) continue;
|
|
1008
|
+
const key = appKey(host);
|
|
1009
|
+
if (key !== appKey(id) && apps[key]) names.add(key);
|
|
1010
|
+
}
|
|
1011
|
+
app.dependencies = [...names].sort();
|
|
1012
|
+
}
|
|
1013
|
+
markRoot(apps);
|
|
1014
|
+
assignPorts(apps);
|
|
1015
|
+
for (const [name, app] of Object.entries(workspace.apps)) if (!apps[name]) apps[name] = app;
|
|
1016
|
+
return apps;
|
|
1017
|
+
}
|
|
701
1018
|
const SUFFIX_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
702
1019
|
/** A name that S3 would refuse — what the name builder never returns. */
|
|
703
1020
|
var InvalidBucketName = class extends require_errors.GkmError {
|
|
@@ -885,6 +1202,17 @@ function emailUserName(scope, stage, id) {
|
|
|
885
1202
|
id
|
|
886
1203
|
});
|
|
887
1204
|
}
|
|
1205
|
+
/**
|
|
1206
|
+
* What an inbox's bucket and its IAM user are named for, after the stage:
|
|
1207
|
+
* `requests-mail`.
|
|
1208
|
+
*/
|
|
1209
|
+
function inboxBucketId(inbox) {
|
|
1210
|
+
return `${appKey(inbox)}-mail`;
|
|
1211
|
+
}
|
|
1212
|
+
/** The SNS topic SES announces an inbox's mail on. */
|
|
1213
|
+
function inboxTopicName(scope, stage, inbox) {
|
|
1214
|
+
return `gkm-${scope}-${stage}-${inboxBucketId(inbox)}`.replace(/[^A-Za-z0-9_-]/g, "-").slice(0, 256);
|
|
1215
|
+
}
|
|
888
1216
|
/** The stage's AWS account, as every AWS provider asks for it. */
|
|
889
1217
|
const SES_PROVISIONING = S3_PROVISIONING;
|
|
890
1218
|
//#endregion
|
|
@@ -2870,6 +3198,12 @@ Object.defineProperty(exports, "appConstructGlobs", {
|
|
|
2870
3198
|
return appConstructGlobs;
|
|
2871
3199
|
}
|
|
2872
3200
|
});
|
|
3201
|
+
Object.defineProperty(exports, "appKey", {
|
|
3202
|
+
enumerable: true,
|
|
3203
|
+
get: function() {
|
|
3204
|
+
return appKey;
|
|
3205
|
+
}
|
|
3206
|
+
});
|
|
2873
3207
|
Object.defineProperty(exports, "assertDeployedStage", {
|
|
2874
3208
|
enumerable: true,
|
|
2875
3209
|
get: function() {
|
|
@@ -2942,12 +3276,24 @@ Object.defineProperty(exports, "deployedProblems", {
|
|
|
2942
3276
|
return deployedProblems;
|
|
2943
3277
|
}
|
|
2944
3278
|
});
|
|
3279
|
+
Object.defineProperty(exports, "derivedApps", {
|
|
3280
|
+
enumerable: true,
|
|
3281
|
+
get: function() {
|
|
3282
|
+
return derivedApps;
|
|
3283
|
+
}
|
|
3284
|
+
});
|
|
2945
3285
|
Object.defineProperty(exports, "emailUserName", {
|
|
2946
3286
|
enumerable: true,
|
|
2947
3287
|
get: function() {
|
|
2948
3288
|
return emailUserName;
|
|
2949
3289
|
}
|
|
2950
3290
|
});
|
|
3291
|
+
Object.defineProperty(exports, "fileServerLabel", {
|
|
3292
|
+
enumerable: true,
|
|
3293
|
+
get: function() {
|
|
3294
|
+
return fileServerLabel;
|
|
3295
|
+
}
|
|
3296
|
+
});
|
|
2951
3297
|
Object.defineProperty(exports, "formatValidationErrors", {
|
|
2952
3298
|
enumerable: true,
|
|
2953
3299
|
get: function() {
|
|
@@ -2990,6 +3336,18 @@ Object.defineProperty(exports, "iamUserName", {
|
|
|
2990
3336
|
return iamUserName;
|
|
2991
3337
|
}
|
|
2992
3338
|
});
|
|
3339
|
+
Object.defineProperty(exports, "inboxBucketId", {
|
|
3340
|
+
enumerable: true,
|
|
3341
|
+
get: function() {
|
|
3342
|
+
return inboxBucketId;
|
|
3343
|
+
}
|
|
3344
|
+
});
|
|
3345
|
+
Object.defineProperty(exports, "inboxTopicName", {
|
|
3346
|
+
enumerable: true,
|
|
3347
|
+
get: function() {
|
|
3348
|
+
return inboxTopicName;
|
|
3349
|
+
}
|
|
3350
|
+
});
|
|
2993
3351
|
Object.defineProperty(exports, "isDeployTargetSupported", {
|
|
2994
3352
|
enumerable: true,
|
|
2995
3353
|
get: function() {
|
|
@@ -3032,6 +3390,12 @@ Object.defineProperty(exports, "processConfig", {
|
|
|
3032
3390
|
return processConfig;
|
|
3033
3391
|
}
|
|
3034
3392
|
});
|
|
3393
|
+
Object.defineProperty(exports, "protectedSubdomains", {
|
|
3394
|
+
enumerable: true,
|
|
3395
|
+
get: function() {
|
|
3396
|
+
return protectedSubdomains;
|
|
3397
|
+
}
|
|
3398
|
+
});
|
|
3035
3399
|
Object.defineProperty(exports, "provisioningOf", {
|
|
3036
3400
|
enumerable: true,
|
|
3037
3401
|
get: function() {
|
|
@@ -3116,6 +3480,12 @@ Object.defineProperty(exports, "validateWorkspaceConfig", {
|
|
|
3116
3480
|
return validateWorkspaceConfig;
|
|
3117
3481
|
}
|
|
3118
3482
|
});
|
|
3483
|
+
Object.defineProperty(exports, "wildcardSite", {
|
|
3484
|
+
enumerable: true,
|
|
3485
|
+
get: function() {
|
|
3486
|
+
return wildcardSite;
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3119
3489
|
Object.defineProperty(exports, "workspaceConstructGlobs", {
|
|
3120
3490
|
enumerable: true,
|
|
3121
3491
|
get: function() {
|
|
@@ -3129,4 +3499,4 @@ Object.defineProperty(exports, "wrapSingleAppAsWorkspace", {
|
|
|
3129
3499
|
}
|
|
3130
3500
|
});
|
|
3131
3501
|
|
|
3132
|
-
//# sourceMappingURL=workspace-
|
|
3502
|
+
//# sourceMappingURL=workspace-DPSdiv-b.cjs.map
|