@geekmidas/cli 10.0.0-alpha.171 → 10.0.0-alpha.173
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-Cs32wo6I.cjs → GoDaddyProvider-CogJfGVY.cjs} +7 -7
- package/dist/{GoDaddyProvider-Cs32wo6I.cjs.map → GoDaddyProvider-CogJfGVY.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-D7CTqN0f.mjs → GoDaddyProvider-uJkNjoF6.mjs} +2 -2
- package/dist/{GoDaddyProvider-D7CTqN0f.mjs.map → GoDaddyProvider-uJkNjoF6.mjs.map} +1 -1
- package/dist/{HostingerProvider-B_3Qs9mT.mjs → HostingerProvider-DJFdGv-x.mjs} +2 -2
- package/dist/{HostingerProvider-B_3Qs9mT.mjs.map → HostingerProvider-DJFdGv-x.mjs.map} +1 -1
- package/dist/{HostingerProvider-D0515Stf.cjs → HostingerProvider-DQEv1dim.cjs} +4 -4
- package/dist/{HostingerProvider-D0515Stf.cjs.map → HostingerProvider-DQEv1dim.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CUjKKENQ.mjs → LegacyStateStore-CEAYSDxQ.mjs} +2 -2
- package/dist/{LegacyStateStore-CUjKKENQ.mjs.map → LegacyStateStore-CEAYSDxQ.mjs.map} +1 -1
- package/dist/{LegacyStateStore-Bv_2L86H.cjs → LegacyStateStore-Du-QYvvW.cjs} +2 -2
- package/dist/{LegacyStateStore-Bv_2L86H.cjs.map → LegacyStateStore-Du-QYvvW.cjs.map} +1 -1
- package/dist/{LocalStateStore-PQ2qJ5VF.cjs → LocalStateStore-CBnOEVUw.cjs} +2 -2
- package/dist/{LocalStateStore-PQ2qJ5VF.cjs.map → LocalStateStore-CBnOEVUw.cjs.map} +1 -1
- package/dist/{LocalStateStore-DXuj1BDq.mjs → LocalStateStore-DyqbqdrE.mjs} +2 -2
- package/dist/{LocalStateStore-DXuj1BDq.mjs.map → LocalStateStore-DyqbqdrE.mjs.map} +1 -1
- package/dist/{S3StateStore-cmS6iUZn.cjs → S3StateStore-BPPv8S_Q.cjs} +5 -5
- package/dist/{S3StateStore-cmS6iUZn.cjs.map → S3StateStore-BPPv8S_Q.cjs.map} +1 -1
- package/dist/{S3StateStore-BGnOwqUp.mjs → S3StateStore-CQ2kN1Pb.mjs} +4 -4
- package/dist/{S3StateStore-BGnOwqUp.mjs.map → S3StateStore-CQ2kN1Pb.mjs.map} +1 -1
- package/dist/{SSMStateStore-BtNGbg8Z.cjs → SSMStateStore-CHy4p884.cjs} +2 -2
- package/dist/{SSMStateStore-BtNGbg8Z.cjs.map → SSMStateStore-CHy4p884.cjs.map} +1 -1
- package/dist/{SSMStateStore-BqXzPBbu.mjs → SSMStateStore-Ca1_Tv6e.mjs} +2 -2
- package/dist/{SSMStateStore-BqXzPBbu.mjs.map → SSMStateStore-Ca1_Tv6e.mjs.map} +1 -1
- package/dist/{add-Dp5xRn-u.cjs → add-nvNmOV4h.cjs} +7 -7
- package/dist/{add-Dp5xRn-u.cjs.map → add-nvNmOV4h.cjs.map} +1 -1
- package/dist/{add-DW2KLCY0.mjs → add-wFkYMhYc.mjs} +5 -5
- package/dist/{add-DW2KLCY0.mjs.map → add-wFkYMhYc.mjs.map} +1 -1
- package/dist/{apps-DYGKg5SP.cjs → apps-CnTjkv-C.cjs} +9 -9
- package/dist/{apps-DYGKg5SP.cjs.map → apps-CnTjkv-C.cjs.map} +1 -1
- package/dist/{apps-DrXwv-0A.mjs → apps-Dh2ito9T.mjs} +4 -4
- package/dist/{apps-DrXwv-0A.mjs.map → apps-Dh2ito9T.mjs.map} +1 -1
- package/dist/{bundler-Swt8wHG9.mjs → bundler-BXS0AEtM.mjs} +6 -6
- package/dist/{bundler-Swt8wHG9.mjs.map → bundler-BXS0AEtM.mjs.map} +1 -1
- package/dist/{bundler-BIfEe05e.cjs → bundler-B_2Mxi7l.cjs} +9 -9
- package/dist/{bundler-BIfEe05e.cjs.map → bundler-B_2Mxi7l.cjs.map} +1 -1
- package/dist/{cli-C9wdKQy_.mjs → cli-CuCePKEc.mjs} +4 -4
- package/dist/{cli-C9wdKQy_.mjs.map → cli-CuCePKEc.mjs.map} +1 -1
- package/dist/{cli-ohJToj0E.cjs → cli-Dew5Ay8s.cjs} +6 -6
- package/dist/{cli-ohJToj0E.cjs.map → cli-Dew5Ay8s.cjs.map} +1 -1
- package/dist/{compose-Br3SQ2bW.cjs → compose-B6emrIOB.cjs} +27 -27
- package/dist/compose-B6emrIOB.cjs.map +1 -0
- package/dist/{compose-BLOnkeaJ.mjs → compose-Cfd5-ubC.mjs} +42 -16
- package/dist/compose-Cfd5-ubC.mjs.map +1 -0
- package/dist/{compose-SNYBstbO.cjs → compose-CpAmz8GF.cjs} +54 -28
- package/dist/compose-CpAmz8GF.cjs.map +1 -0
- package/dist/{compose-iUOeazjW.mjs → compose-DxreKQnX.mjs} +10 -10
- package/dist/compose-DxreKQnX.mjs.map +1 -0
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +20 -20
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.mjs +11 -11
- package/dist/{deploy-DqH8QReb.mjs → deploy-CV-e75Ja.mjs} +14 -25
- package/dist/deploy-CV-e75Ja.mjs.map +1 -0
- package/dist/{deploy-CYyf-Q8N.cjs → deploy-Cy2mXTnI.cjs} +55 -66
- package/dist/deploy-Cy2mXTnI.cjs.map +1 -0
- package/dist/{destroy-B9myEYFT.mjs → destroy-DQllGEWe.mjs} +9 -9
- package/dist/{destroy-B9myEYFT.mjs.map → destroy-DQllGEWe.mjs.map} +1 -1
- package/dist/{destroy-Bp5iHtLf.cjs → destroy-DjUM1nDI.cjs} +24 -24
- package/dist/{destroy-Bp5iHtLf.cjs.map → destroy-DjUM1nDI.cjs.map} +1 -1
- package/dist/{credentials-C2VfI-uf.mjs → dns-DPHKct-l.mjs} +123 -123
- package/dist/dns-DPHKct-l.mjs.map +1 -0
- package/dist/{credentials-BdZhygvW.cjs → dns-efZTlePp.cjs} +122 -122
- package/dist/dns-efZTlePp.cjs.map +1 -0
- package/dist/{docker-BezTRGxN.cjs → docker-1hv2ehU4.cjs} +7 -7
- package/dist/{docker-BezTRGxN.cjs.map → docker-1hv2ehU4.cjs.map} +1 -1
- package/dist/{docker-De_-Ll-A.mjs → docker-CeGpTbYR.mjs} +5 -5
- package/dist/{docker-De_-Ll-A.mjs.map → docker-CeGpTbYR.mjs.map} +1 -1
- package/dist/{dokploy-EsBgWO8W.mjs → dokploy-Cdy9uxyT.mjs} +2 -2
- package/dist/{dokploy-EsBgWO8W.mjs.map → dokploy-Cdy9uxyT.mjs.map} +1 -1
- package/dist/{dokploy-CWCIqro_.cjs → dokploy-DMCSZX9P.cjs} +2 -2
- package/dist/{dokploy-CWCIqro_.cjs.map → dokploy-DMCSZX9P.cjs.map} +1 -1
- package/dist/{eas-8t6PJRni.cjs → eas-B3vFP-9c.cjs} +3 -3
- package/dist/{eas-8t6PJRni.cjs.map → eas-B3vFP-9c.cjs.map} +1 -1
- package/dist/{eas-BalvsiH5.mjs → eas-KsVb80gp.mjs} +3 -3
- package/dist/{eas-BalvsiH5.mjs.map → eas-KsVb80gp.mjs.map} +1 -1
- package/dist/{encryption-CKBmU66R.cjs → encryption-BYpdYmaT.cjs} +6 -6
- package/dist/{encryption-CKBmU66R.cjs.map → encryption-BYpdYmaT.cjs.map} +1 -1
- package/dist/{encryption-B4mWxt4G.mjs → encryption-d_vz6csy.mjs} +3 -3
- package/dist/{encryption-B4mWxt4G.mjs.map → encryption-d_vz6csy.mjs.map} +1 -1
- package/dist/{engine-y8iWIXuv.mjs → engine-CQTK8HEF.mjs} +9 -9
- package/dist/{engine-y8iWIXuv.mjs.map → engine-CQTK8HEF.mjs.map} +1 -1
- package/dist/{engine-BTG46RG-.cjs → engine-DIzP1hty.cjs} +58 -58
- package/dist/{engine-BTG46RG-.cjs.map → engine-DIzP1hty.cjs.map} +1 -1
- package/dist/{github-CeXlzWWA.cjs → github-Chr0rEy5.cjs} +16 -16
- package/dist/{github-CeXlzWWA.cjs.map → github-Chr0rEy5.cjs.map} +1 -1
- package/dist/{github-DvGoKoQO.mjs → github-Ctmgt1Zv.mjs} +7 -7
- package/dist/{github-DvGoKoQO.mjs.map → github-Ctmgt1Zv.mjs.map} +1 -1
- package/dist/{googlePlay-CfzG7jOJ.cjs → googlePlay-C50ZneV3.cjs} +5 -5
- package/dist/{googlePlay-CfzG7jOJ.cjs.map → googlePlay-C50ZneV3.cjs.map} +1 -1
- package/dist/{googlePlay-DWv6CUgM.mjs → googlePlay-D5kL9gs5.mjs} +4 -4
- package/dist/{googlePlay-DWv6CUgM.mjs.map → googlePlay-D5kL9gs5.mjs.map} +1 -1
- package/dist/{iam-FA95ku7l.cjs → iam-CGd_oEyz.cjs} +2 -2
- package/dist/{iam-FA95ku7l.cjs.map → iam-CGd_oEyz.cjs.map} +1 -1
- package/dist/{iam-BE0qX5Lb.mjs → iam-Cs2Ph5f2.mjs} +2 -2
- package/dist/{iam-BE0qX5Lb.mjs.map → iam-Cs2Ph5f2.mjs.map} +1 -1
- package/dist/index.cjs +108 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +62 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{local-DH9at_0c.cjs → local-CxqlHyVX.cjs} +3 -3
- package/dist/{local-DH9at_0c.cjs.map → local-CxqlHyVX.cjs.map} +1 -1
- package/dist/{local-CvRvfktv.mjs → local-Cy6Bb9ta.mjs} +2 -2
- package/dist/{local-CvRvfktv.mjs.map → local-Cy6Bb9ta.mjs.map} +1 -1
- package/dist/{migrate-B1lHo2K2.cjs → migrate-C7AEA5wP.cjs} +6 -6
- package/dist/{migrate-B1lHo2K2.cjs.map → migrate-C7AEA5wP.cjs.map} +1 -1
- package/dist/{migrate-D1iCmQgc.mjs → migrate-DB1lxrIj.mjs} +5 -5
- package/dist/{migrate-D1iCmQgc.mjs.map → migrate-DB1lxrIj.mjs.map} +1 -1
- package/dist/{migrate-NmW2Su8s.mjs → migrate-DU_BqEwZ.mjs} +3 -3
- package/dist/{migrate-NmW2Su8s.mjs.map → migrate-DU_BqEwZ.mjs.map} +1 -1
- package/dist/{migrate-DzOWCnRR.cjs → migrate-uYiBDHF4.cjs} +6 -6
- package/dist/{migrate-DzOWCnRR.cjs.map → migrate-uYiBDHF4.cjs.map} +1 -1
- package/dist/{notes-BdIY7IoB.mjs → notes-C23PJFnm.mjs} +3 -3
- package/dist/{notes-BdIY7IoB.mjs.map → notes-C23PJFnm.mjs.map} +1 -1
- package/dist/{notes-ikElBCC8.cjs → notes-DOj8AhIz.cjs} +3 -3
- package/dist/{notes-ikElBCC8.cjs.map → notes-DOj8AhIz.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-uidxz03Q.cjs → projectBucket-BNxobT1q.cjs} +2 -2
- package/dist/{projectBucket-uidxz03Q.cjs.map → projectBucket-BNxobT1q.cjs.map} +1 -1
- package/dist/{projectBucket-C-FOIic4.mjs → projectBucket-BpwAxov3.mjs} +2 -2
- package/dist/{projectBucket-C-FOIic4.mjs.map → projectBucket-BpwAxov3.mjs.map} +1 -1
- package/dist/{publish-Ujng6o63.mjs → publish-CM2A0e24.mjs} +2 -2
- package/dist/{publish-Ujng6o63.mjs.map → publish-CM2A0e24.mjs.map} +1 -1
- package/dist/{publish-oO_8elIf.cjs → publish-DaFTebR5.cjs} +2 -2
- package/dist/{publish-oO_8elIf.cjs.map → publish-DaFTebR5.cjs.map} +1 -1
- package/dist/{resolve-Lk7fd8Kb.mjs → resolve-DO6xu8Da.mjs} +4 -4
- package/dist/{resolve-Lk7fd8Kb.mjs.map → resolve-DO6xu8Da.mjs.map} +1 -1
- package/dist/{resolve-CTb1gsTO.cjs → resolve-DgHrtRXG.cjs} +4 -4
- package/dist/{resolve-CTb1gsTO.cjs.map → resolve-DgHrtRXG.cjs.map} +1 -1
- package/dist/{rollback-PK4pSOLd.cjs → rollback-6Idn2ozU.cjs} +9 -9
- package/dist/{rollback-PK4pSOLd.cjs.map → rollback-6Idn2ozU.cjs.map} +1 -1
- package/dist/{rollback-B2DhSX-I.mjs → rollback-CmeGUxpC.mjs} +6 -6
- package/dist/{rollback-B2DhSX-I.mjs.map → rollback-CmeGUxpC.mjs.map} +1 -1
- package/dist/{s3-BY5ry__M.mjs → s3-DKFFpPrS.mjs} +3 -3
- package/dist/{s3-BY5ry__M.mjs.map → s3-DKFFpPrS.mjs.map} +1 -1
- package/dist/{s3-FG9qIgEB.cjs → s3-du68lLNe.cjs} +3 -3
- package/dist/{s3-FG9qIgEB.cjs.map → s3-du68lLNe.cjs.map} +1 -1
- package/dist/{serverSetup-BL1sHzRr.mjs → serverSetup-BHxCT8nA.mjs} +6 -6
- package/dist/{serverSetup-BL1sHzRr.mjs.map → serverSetup-BHxCT8nA.mjs.map} +1 -1
- package/dist/{serverSetup-C7fDKGiN.cjs → serverSetup-Uk07rJqu.cjs} +8 -8
- package/dist/{serverSetup-C7fDKGiN.cjs.map → serverSetup-Uk07rJqu.cjs.map} +1 -1
- package/dist/{sniffer-BvhDRsgI.mjs → sniffer-FQzApIZ2.mjs} +7 -7
- package/dist/{sniffer-BvhDRsgI.mjs.map → sniffer-FQzApIZ2.mjs.map} +1 -1
- package/dist/{sniffer-DJp9a2Pg.cjs → sniffer-_XeLyu2-.cjs} +7 -7
- package/dist/{sniffer-DJp9a2Pg.cjs.map → sniffer-_XeLyu2-.cjs.map} +1 -1
- package/dist/{snsSubscriptions-7y2XBXde.mjs → snsSubscriptions-BCLdw-vn.mjs} +5 -78
- package/dist/snsSubscriptions-BCLdw-vn.mjs.map +1 -0
- package/dist/{snsSubscriptions-8t1XFvoc.cjs → snsSubscriptions-By_79DkX.cjs} +20 -111
- package/dist/snsSubscriptions-By_79DkX.cjs.map +1 -0
- package/dist/{sst-8HZe83-M.cjs → sst--n0v4Fch.cjs} +7 -7
- package/dist/{sst-8HZe83-M.cjs.map → sst--n0v4Fch.cjs.map} +1 -1
- package/dist/{sst-CzFd-1om.mjs → sst-CtrAb04-.mjs} +5 -5
- package/dist/{sst-CzFd-1om.mjs.map → sst-CtrAb04-.mjs.map} +1 -1
- package/dist/{stack-j2e8ddGl.mjs → stack-BfK0IV3V.mjs} +139 -12
- package/dist/stack-BfK0IV3V.mjs.map +1 -0
- package/dist/{stack-3tvhk7SU.cjs → stack-mqaJRhoK.cjs} +160 -14
- package/dist/stack-mqaJRhoK.cjs.map +1 -0
- package/dist/{stage-DMv-IfSD.mjs → stage-DsfVOAAA.mjs} +6 -6
- package/dist/{stage-DMv-IfSD.mjs.map → stage-DsfVOAAA.mjs.map} +1 -1
- package/dist/{stage-DCSJii_y.cjs → stage-NGr_EzmY.cjs} +8 -8
- package/dist/{stage-DCSJii_y.cjs.map → stage-NGr_EzmY.cjs.map} +1 -1
- package/dist/{stages-D49CUpBY.cjs → stages-8izznWib.cjs} +2 -2
- package/dist/{stages-D49CUpBY.cjs.map → stages-8izznWib.cjs.map} +1 -1
- package/dist/{stages-CCAAe1tP.mjs → stages-QPWgbm9P.mjs} +2 -2
- package/dist/{stages-CCAAe1tP.mjs.map → stages-QPWgbm9P.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-VLmWgL_N.mjs → terminal-AVJMJvk5.mjs} +2 -2
- package/dist/{terminal-VLmWgL_N.mjs.map → terminal-AVJMJvk5.mjs.map} +1 -1
- package/dist/{terminal-DIEj2Nap.cjs → terminal-BpzSISdv.cjs} +5 -5
- package/dist/{terminal-DIEj2Nap.cjs.map → terminal-BpzSISdv.cjs.map} +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-B0PI9k9p.mjs → workspace-BBa1Ck5j.mjs} +16 -2
- package/dist/workspace-BBa1Ck5j.mjs.map +1 -0
- package/dist/{workspace-LR9DFjU8.cjs → workspace-DirP2-ed.cjs} +21 -7
- package/dist/workspace-DirP2-ed.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/compose-BLOnkeaJ.mjs.map +0 -1
- package/dist/compose-Br3SQ2bW.cjs.map +0 -1
- package/dist/compose-SNYBstbO.cjs.map +0 -1
- package/dist/compose-iUOeazjW.mjs.map +0 -1
- package/dist/credentials-BdZhygvW.cjs.map +0 -1
- package/dist/credentials-C2VfI-uf.mjs.map +0 -1
- package/dist/deploy-CYyf-Q8N.cjs.map +0 -1
- package/dist/deploy-DqH8QReb.mjs.map +0 -1
- package/dist/snsSubscriptions-7y2XBXde.mjs.map +0 -1
- package/dist/snsSubscriptions-8t1XFvoc.cjs.map +0 -1
- package/dist/stack-3tvhk7SU.cjs.map +0 -1
- package/dist/stack-j2e8ddGl.mjs.map +0 -1
- package/dist/workspace-B0PI9k9p.mjs.map +0 -1
- package/dist/workspace-LR9DFjU8.cjs.map +0 -1
|
@@ -1,19 +1,133 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
3
|
-
const
|
|
4
|
-
const require_workspace = require("./workspace-
|
|
5
|
-
const require_apps = require("./apps-
|
|
6
|
-
const require_compose = require("./compose-
|
|
3
|
+
const require_dns = require("./dns-efZTlePp.cjs");
|
|
4
|
+
const require_workspace = require("./workspace-DirP2-ed.cjs");
|
|
5
|
+
const require_apps = require("./apps-CnTjkv-C.cjs");
|
|
6
|
+
const require_compose = require("./compose-CpAmz8GF.cjs");
|
|
7
7
|
const require_SubscriberGenerator = require("./SubscriberGenerator-DMi4siph.cjs");
|
|
8
8
|
const require_types = require("./types-Bl_CwZC9.cjs");
|
|
9
|
-
const require_notes = require("./notes-
|
|
10
|
-
const require_docker = require("./docker-
|
|
9
|
+
const require_notes = require("./notes-DOj8AhIz.cjs");
|
|
10
|
+
const require_docker = require("./docker-1hv2ehU4.cjs");
|
|
11
11
|
let node_path = require("node:path");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
13
13
|
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
14
|
+
let _geekmidas_storage_s3_url = require("@geekmidas/storage/s3-url");
|
|
15
|
+
_geekmidas_storage_s3_url = require_rolldown_runtime.__toESM(_geekmidas_storage_s3_url, 1);
|
|
14
16
|
let yaml = require("yaml");
|
|
15
17
|
let bcryptjs = require("bcryptjs");
|
|
16
18
|
bcryptjs = require_rolldown_runtime.__toESM(bcryptjs, 1);
|
|
19
|
+
//#region src/providers/aws.ts
|
|
20
|
+
/**
|
|
21
|
+
* The AWS account a provider provisions in — the stage's, found the way the
|
|
22
|
+
* SSM and Secrets Manager stores find it.
|
|
23
|
+
*
|
|
24
|
+
* 1. `--profile`, resolved on its own: exported keys left over from another
|
|
25
|
+
* account never win over a profile someone named.
|
|
26
|
+
* 2. `AWS_PROFILE`, else `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` — the
|
|
27
|
+
* deploy's own `aws` credential kind (`storedCredentials`).
|
|
28
|
+
* 3. The SDK's default chain: `~/.aws` default profile, SSO, a role. In CI,
|
|
29
|
+
* whatever `aws-actions/configure-aws-credentials` exported.
|
|
30
|
+
*
|
|
31
|
+
* None of them: the provider has no provisioning credentials, and the stage
|
|
32
|
+
* is treated as `external`.
|
|
33
|
+
*/
|
|
34
|
+
async function awsProvisioningCredentials(lookup) {
|
|
35
|
+
const region = lookup.env.AWS_REGION ?? lookup.env.AWS_DEFAULT_REGION;
|
|
36
|
+
const where = region ? { region } : {};
|
|
37
|
+
if (lookup.profile) return {
|
|
38
|
+
profile: lookup.profile,
|
|
39
|
+
...where
|
|
40
|
+
};
|
|
41
|
+
const stored = await require_dns.storedCredentials({
|
|
42
|
+
env: lookup.env,
|
|
43
|
+
...lookup.home ? { home: lookup.home } : {}
|
|
44
|
+
}).get({
|
|
45
|
+
kind: "aws",
|
|
46
|
+
stage: lookup.stage
|
|
47
|
+
});
|
|
48
|
+
if (stored) return stored;
|
|
49
|
+
try {
|
|
50
|
+
const { fromNodeProviderChain } = await import("@aws-sdk/credential-providers");
|
|
51
|
+
await fromNodeProviderChain({
|
|
52
|
+
timeout: 1e3,
|
|
53
|
+
maxRetries: 0
|
|
54
|
+
})();
|
|
55
|
+
return {
|
|
56
|
+
chain: true,
|
|
57
|
+
...where
|
|
58
|
+
};
|
|
59
|
+
} catch {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An S3-compatible endpoint the environment points the SDK at — the AWS
|
|
65
|
+
* emulator in tests. The SDK reads it itself; it is read here too, because
|
|
66
|
+
* an emulator takes path-style requests, and a key written for one has to
|
|
67
|
+
* say where it is.
|
|
68
|
+
*/
|
|
69
|
+
function awsEndpoint(env, service) {
|
|
70
|
+
return env[`AWS_ENDPOINT_URL_${service}`] ?? env.AWS_ENDPOINT_URL;
|
|
71
|
+
}
|
|
72
|
+
/** An SDK client's config for a provisioning credential. */
|
|
73
|
+
async function awsClientConfig(credential, region) {
|
|
74
|
+
if ("profile" in credential) {
|
|
75
|
+
const { fromIni } = await import("@aws-sdk/credential-providers");
|
|
76
|
+
return {
|
|
77
|
+
region,
|
|
78
|
+
credentials: fromIni({ profile: credential.profile })
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if ("accessKeyId" in credential) return {
|
|
82
|
+
region,
|
|
83
|
+
credentials: {
|
|
84
|
+
accessKeyId: credential.accessKeyId,
|
|
85
|
+
secretAccessKey: credential.secretAccessKey,
|
|
86
|
+
...credential.sessionToken ? { sessionToken: credential.sessionToken } : {}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return { region };
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/providers/s3/plannedOrigin.ts
|
|
93
|
+
/**
|
|
94
|
+
* Where a bucket the `s3` provider is to create signs its links, before it
|
|
95
|
+
* has: the origin of the name and region its first deploy gives it.
|
|
96
|
+
*
|
|
97
|
+
* A site's image inlines its buckets' signed origins, and a protected stage's
|
|
98
|
+
* images are built on every push to the default branch, long before the
|
|
99
|
+
* release that first deploys the stage. The connection the origin is
|
|
100
|
+
* otherwise derived from (`signedOrigins`) is written by that deploy, so
|
|
101
|
+
* without this a stage that has never been deployed cannot be built, and a
|
|
102
|
+
* stage that cannot be built is never deployed.
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* `https://<bucket>.s3.<region>.amazonaws.com` for the bucket's good name.
|
|
106
|
+
*
|
|
107
|
+
* Nothing when it cannot be known ahead: against an S3 emulator
|
|
108
|
+
* (`AWS_ENDPOINT_URL`), or with no region to name. The first deploy names a
|
|
109
|
+
* bucket otherwise only when another account already holds the good name —
|
|
110
|
+
* a suffixed one, which it reports, and whose origin the next build inlines.
|
|
111
|
+
*/
|
|
112
|
+
function plannedSignedOrigin(input, env = process.env) {
|
|
113
|
+
if (awsEndpoint(env, "S3")) return void 0;
|
|
114
|
+
let region;
|
|
115
|
+
try {
|
|
116
|
+
region = require_workspace.s3Region(input, env);
|
|
117
|
+
} catch {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const bucket = require_workspace.bucketName({
|
|
121
|
+
scope: input.scope,
|
|
122
|
+
stage: input.stage,
|
|
123
|
+
id: require_workspace.appKey(input.bucket)
|
|
124
|
+
});
|
|
125
|
+
return _geekmidas_storage_s3_url.signedOrigin({
|
|
126
|
+
bucket,
|
|
127
|
+
region
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
17
131
|
//#region src/compose/routes.ts
|
|
18
132
|
/**
|
|
19
133
|
* Every host a route answers on — its own, its aliases and its redirects —
|
|
@@ -1386,6 +1500,20 @@ function composeStack(input) {
|
|
|
1386
1500
|
const warnings = [];
|
|
1387
1501
|
const objectsProvider = require_workspace.stageProvider(workspace, "objects", stage);
|
|
1388
1502
|
const onCdn = objectsProvider.mode === "provider" && objectsProvider.name === "s3" && require_workspace.servesOnCdn(objectsProvider.config);
|
|
1503
|
+
const plannedOrigins = /* @__PURE__ */ new Map();
|
|
1504
|
+
if (!local && objectsProvider.mode === "provider" && objectsProvider.name === "s3") for (const resource of plan.resources) {
|
|
1505
|
+
if (resource.kind !== "objects") continue;
|
|
1506
|
+
if (services.minio.includes(resource.id)) continue;
|
|
1507
|
+
if (custom[(0, _geekmidas_manifest.providedKeyFor)(resource.id, "objects", "connectionString")] !== void 0) continue;
|
|
1508
|
+
const origin = plannedSignedOrigin({
|
|
1509
|
+
workspace,
|
|
1510
|
+
stage,
|
|
1511
|
+
scope: identity.scope,
|
|
1512
|
+
config: objectsProvider.config,
|
|
1513
|
+
bucket: resource.id
|
|
1514
|
+
});
|
|
1515
|
+
if (origin) plannedOrigins.set((0, _geekmidas_manifest.providedKeyFor)(resource.id, "objects", "signedOrigin"), origin);
|
|
1516
|
+
}
|
|
1389
1517
|
const fileServerUrls = /* @__PURE__ */ new Map();
|
|
1390
1518
|
for (const resource of plan.resources) {
|
|
1391
1519
|
if (resource.kind !== "file-server") continue;
|
|
@@ -1498,7 +1626,7 @@ function composeStack(input) {
|
|
|
1498
1626
|
for (const app of apps) {
|
|
1499
1627
|
const site = manifest[app.id];
|
|
1500
1628
|
if (site?.kind === "site") {
|
|
1501
|
-
const args = require_apps.publicBuildValues(site, manifest, (key) => valueFor(app, key, owners.get(key)), custom, !local && app.build ? { requireFileOrigins: { stage } } : {});
|
|
1629
|
+
const args = require_apps.publicBuildValues(site, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom, !local && app.build ? { requireFileOrigins: { stage } } : {});
|
|
1502
1630
|
if (app.prerender && input.prerenderRun) args[require_apps.PRERENDER_RUN_ARG] = input.prerenderRun;
|
|
1503
1631
|
if (app.build && Object.keys(args).length > 0) app.build.args = args;
|
|
1504
1632
|
const offline = require_apps.offlineBuildHosts(site, manifest, (key) => valueFor(app, key, owners.get(key)));
|
|
@@ -1530,7 +1658,7 @@ function composeStack(input) {
|
|
|
1530
1658
|
mobileApps.push({
|
|
1531
1659
|
name: app.name,
|
|
1532
1660
|
id: app.id,
|
|
1533
|
-
values: require_apps.publicBuildValues(declaration, manifest, (key) => valueFor(app, key, owners.get(key)), custom)
|
|
1661
|
+
values: require_apps.publicBuildValues(declaration, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom)
|
|
1534
1662
|
});
|
|
1535
1663
|
}
|
|
1536
1664
|
for (const worker of input.buildOnly ? [] : workers) {
|
|
@@ -1873,7 +2001,7 @@ function stackApps(workspace, manifest, plan, options) {
|
|
|
1873
2001
|
const { host, aliases, redirects } = appHosts(name, app, workspace, resource, options);
|
|
1874
2002
|
const site = declaration.kind === "site";
|
|
1875
2003
|
const tag = site ? siteTag(options.images.tag, options.stage) : options.images.tag;
|
|
1876
|
-
const ref = require_docker.validateImageRef(
|
|
2004
|
+
const ref = require_docker.validateImageRef(require_dns.imageRef(options.identity, name, options.images.registry, tag));
|
|
1877
2005
|
apps.push({
|
|
1878
2006
|
app: name,
|
|
1879
2007
|
name,
|
|
@@ -1999,8 +2127,8 @@ function stackWildcard(apps, options) {
|
|
|
1999
2127
|
const tls = (() => {
|
|
2000
2128
|
if (options.certificate) return { kind: "stage" };
|
|
2001
2129
|
if (proxy === "traefik") {
|
|
2002
|
-
const dns = workspace.dns ?
|
|
2003
|
-
const root =
|
|
2130
|
+
const dns = workspace.dns ? require_dns.normalizeDnsConfig(workspace.dns) : {};
|
|
2131
|
+
const root = require_dns.findRootDomain(domain, dns);
|
|
2004
2132
|
if (root && dns[root]?.provider === "route53") return { kind: "dns" };
|
|
2005
2133
|
} else if (declaration.hosts) {
|
|
2006
2134
|
const surface = apps.find((a) => a.id === declaration.hosts?.surface);
|
|
@@ -2075,7 +2203,7 @@ function stackProcessors(units, options) {
|
|
|
2075
2203
|
host: unit.app,
|
|
2076
2204
|
port: require_apps.PROCESSOR_PORT,
|
|
2077
2205
|
prefixes: [...new Set(processors.map((p) => p.prefix))].sort(),
|
|
2078
|
-
ref: require_docker.validateImageRef(
|
|
2206
|
+
ref: require_docker.validateImageRef(require_dns.imageRef(options.identity, unit.name, options.images.registry, options.images.tag)),
|
|
2079
2207
|
tag: options.images.tag,
|
|
2080
2208
|
...options.images.mode === "build" ? { build: { dockerfile: `${stackDir(options.stage)}/Dockerfile.${unit.name}` } } : {}
|
|
2081
2209
|
};
|
|
@@ -2089,7 +2217,7 @@ function stackWorkers(units, options) {
|
|
|
2089
2217
|
id: unit.id,
|
|
2090
2218
|
host: unit.app,
|
|
2091
2219
|
port: require_apps.WORKER_PORT,
|
|
2092
|
-
ref: require_docker.validateImageRef(
|
|
2220
|
+
ref: require_docker.validateImageRef(require_dns.imageRef(options.identity, unit.name, options.images.registry, options.images.tag)),
|
|
2093
2221
|
tag: options.images.tag,
|
|
2094
2222
|
...options.images.mode === "build" ? { build: { dockerfile: `${stackDir(options.stage)}/Dockerfile.${unit.name}` } } : {}
|
|
2095
2223
|
}));
|
|
@@ -2456,6 +2584,24 @@ Object.defineProperty(exports, "assertSitePasswords", {
|
|
|
2456
2584
|
return assertSitePasswords;
|
|
2457
2585
|
}
|
|
2458
2586
|
});
|
|
2587
|
+
Object.defineProperty(exports, "awsClientConfig", {
|
|
2588
|
+
enumerable: true,
|
|
2589
|
+
get: function() {
|
|
2590
|
+
return awsClientConfig;
|
|
2591
|
+
}
|
|
2592
|
+
});
|
|
2593
|
+
Object.defineProperty(exports, "awsEndpoint", {
|
|
2594
|
+
enumerable: true,
|
|
2595
|
+
get: function() {
|
|
2596
|
+
return awsEndpoint;
|
|
2597
|
+
}
|
|
2598
|
+
});
|
|
2599
|
+
Object.defineProperty(exports, "awsProvisioningCredentials", {
|
|
2600
|
+
enumerable: true,
|
|
2601
|
+
get: function() {
|
|
2602
|
+
return awsProvisioningCredentials;
|
|
2603
|
+
}
|
|
2604
|
+
});
|
|
2459
2605
|
Object.defineProperty(exports, "claimsOverlap", {
|
|
2460
2606
|
enumerable: true,
|
|
2461
2607
|
get: function() {
|
|
@@ -2565,4 +2711,4 @@ Object.defineProperty(exports, "withLogsPort", {
|
|
|
2565
2711
|
}
|
|
2566
2712
|
});
|
|
2567
2713
|
|
|
2568
|
-
//# sourceMappingURL=stack-
|
|
2714
|
+
//# sourceMappingURL=stack-mqaJRhoK.cjs.map
|