@geekmidas/cli 10.0.0-alpha.186 → 10.0.0-alpha.188
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/{LegacyStateStore-BwHw28fJ.mjs → LegacyStateStore-iI2LW48g.mjs} +2 -2
- package/dist/{LegacyStateStore-BwHw28fJ.mjs.map → LegacyStateStore-iI2LW48g.mjs.map} +1 -1
- package/dist/{LegacyStateStore-LpTY3S7z.cjs → LegacyStateStore-kFahq3hz.cjs} +2 -2
- package/dist/{LegacyStateStore-LpTY3S7z.cjs.map → LegacyStateStore-kFahq3hz.cjs.map} +1 -1
- package/dist/{LocalStateStore-DsdNLm0_.mjs → LocalStateStore-CHKz7oSH.mjs} +2 -2
- package/dist/{LocalStateStore-DsdNLm0_.mjs.map → LocalStateStore-CHKz7oSH.mjs.map} +1 -1
- package/dist/{LocalStateStore-Dpn9kBuK.cjs → LocalStateStore-COvGAS9D.cjs} +2 -2
- package/dist/{LocalStateStore-Dpn9kBuK.cjs.map → LocalStateStore-COvGAS9D.cjs.map} +1 -1
- package/dist/{S3StateStore-Bk_EIWLU.cjs → S3StateStore-CWgPnzYs.cjs} +4 -4
- package/dist/{S3StateStore-Bk_EIWLU.cjs.map → S3StateStore-CWgPnzYs.cjs.map} +1 -1
- package/dist/{S3StateStore-BIpCLzpk.mjs → S3StateStore-Dp36QWGq.mjs} +4 -4
- package/dist/{S3StateStore-BIpCLzpk.mjs.map → S3StateStore-Dp36QWGq.mjs.map} +1 -1
- package/dist/{SSMStateStore-PiZxPXeX.mjs → SSMStateStore-BXJaNkAw.mjs} +2 -2
- package/dist/{SSMStateStore-PiZxPXeX.mjs.map → SSMStateStore-BXJaNkAw.mjs.map} +1 -1
- package/dist/{SSMStateStore-A1bgCF1P.cjs → SSMStateStore-Cfk-we0n.cjs} +2 -2
- package/dist/{SSMStateStore-A1bgCF1P.cjs.map → SSMStateStore-Cfk-we0n.cjs.map} +1 -1
- package/dist/{add-sU71e0Lp.cjs → add-BpQvfbl1.cjs} +3 -3
- package/dist/{add-sU71e0Lp.cjs.map → add-BpQvfbl1.cjs.map} +1 -1
- package/dist/{add-BBhzFpQ7.mjs → add-DryeFO6A.mjs} +3 -3
- package/dist/{add-BBhzFpQ7.mjs.map → add-DryeFO6A.mjs.map} +1 -1
- package/dist/{bundler-BM6lq-36.cjs → bundler-8aBbCVsY.cjs} +6 -6
- package/dist/{bundler-BM6lq-36.cjs.map → bundler-8aBbCVsY.cjs.map} +1 -1
- package/dist/{bundler-QKbRwztS.mjs → bundler-CUBfNgPZ.mjs} +6 -6
- package/dist/{bundler-QKbRwztS.mjs.map → bundler-CUBfNgPZ.mjs.map} +1 -1
- package/dist/{cli-VCAfR-se.mjs → cli-Cj4_6-c_.mjs} +4 -4
- package/dist/{cli-VCAfR-se.mjs.map → cli-Cj4_6-c_.mjs.map} +1 -1
- package/dist/{cli-D_iytris.cjs → cli-DZEgeNYA.cjs} +4 -4
- package/dist/{cli-D_iytris.cjs.map → cli-DZEgeNYA.cjs.map} +1 -1
- package/dist/{compose-D3zc8QN1.cjs → compose-B50nt3WV.cjs} +5 -5
- package/dist/{compose-D3zc8QN1.cjs.map → compose-B50nt3WV.cjs.map} +1 -1
- package/dist/{compose-CX2BF3LG.mjs → compose-C_vg6GOx.mjs} +5 -5
- package/dist/{compose-CX2BF3LG.mjs.map → compose-C_vg6GOx.mjs.map} +1 -1
- package/dist/{config-CTrfNKYd.d.mts → config-DpqIrrRJ.d.mts} +12 -3
- package/dist/config-DpqIrrRJ.d.mts.map +1 -0
- package/dist/{config-D9g_nYIu.d.cts → config-KFyPSS0R.d.cts} +12 -3
- package/dist/config-KFyPSS0R.d.cts.map +1 -0
- package/dist/config.cjs +15 -10
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +15 -10
- package/dist/config.mjs.map +1 -1
- package/dist/{credentials-BMdpNO8R.mjs → credentials-B3lji5Yq.mjs} +6 -5
- package/dist/credentials-B3lji5Yq.mjs.map +1 -0
- package/dist/{credentials-BQ1khM28.cjs → credentials-BIP-iRPn.cjs} +3 -3
- package/dist/{credentials-BQ1khM28.cjs.map → credentials-BIP-iRPn.cjs.map} +1 -1
- package/dist/{credentials-Ci8nKFw4.mjs → credentials-CcEXccxO.mjs} +3 -3
- package/dist/{credentials-Ci8nKFw4.mjs.map → credentials-CcEXccxO.mjs.map} +1 -1
- package/dist/{credentials-C3uaZ80e.cjs → credentials-muaDESyw.cjs} +5 -4
- package/dist/credentials-muaDESyw.cjs.map +1 -0
- package/dist/{dbTunnel-DqtSAdQK.mjs → dbTunnel-BXmuGU8b.mjs} +5 -5
- package/dist/{dbTunnel-DqtSAdQK.mjs.map → dbTunnel-BXmuGU8b.mjs.map} +1 -1
- package/dist/{dbTunnel-D000s0YK.cjs → dbTunnel-BfStDMkg.cjs} +5 -5
- package/dist/{dbTunnel-D000s0YK.cjs.map → dbTunnel-BfStDMkg.cjs.map} +1 -1
- package/dist/deploy/public.cjs +9 -9
- package/dist/deploy/public.d.cts +1 -1
- package/dist/deploy/public.d.mts +1 -1
- package/dist/deploy/public.mjs +9 -9
- package/dist/{deploy-DwtM6VSz.mjs → deploy-BKWc0NFs.mjs} +9 -9
- package/dist/{deploy-DwtM6VSz.mjs.map → deploy-BKWc0NFs.mjs.map} +1 -1
- package/dist/{deploy-DRH6q_2r.cjs → deploy-SRe6K6f2.cjs} +9 -9
- package/dist/{deploy-DRH6q_2r.cjs.map → deploy-SRe6K6f2.cjs.map} +1 -1
- package/dist/{destroy-ChTJ_oUq.cjs → destroy-cDWGXdvz.cjs} +7 -7
- package/dist/{destroy-ChTJ_oUq.cjs.map → destroy-cDWGXdvz.cjs.map} +1 -1
- package/dist/{destroy-C6QwLj3b.mjs → destroy-igN-bUYa.mjs} +7 -7
- package/dist/{destroy-C6QwLj3b.mjs.map → destroy-igN-bUYa.mjs.map} +1 -1
- package/dist/{dokploy-jeO7mz1R.cjs → dokploy-BSDyt4OK.cjs} +2 -2
- package/dist/{dokploy-jeO7mz1R.cjs.map → dokploy-BSDyt4OK.cjs.map} +1 -1
- package/dist/{dokploy-Dm8-eHtx.mjs → dokploy-DlgTAdSK.mjs} +2 -2
- package/dist/{dokploy-Dm8-eHtx.mjs.map → dokploy-DlgTAdSK.mjs.map} +1 -1
- package/dist/{eas-BAitvB5R.cjs → eas-2DGYQ0Qf.cjs} +2 -2
- package/dist/{eas-BAitvB5R.cjs.map → eas-2DGYQ0Qf.cjs.map} +1 -1
- package/dist/{eas-CXYo8hos.mjs → eas-DMg91c_V.mjs} +2 -2
- package/dist/{eas-CXYo8hos.mjs.map → eas-DMg91c_V.mjs.map} +1 -1
- package/dist/{encryption-B7IlQ6VO.mjs → encryption-4tw7AQve.mjs} +2 -2
- package/dist/{encryption-B7IlQ6VO.mjs.map → encryption-4tw7AQve.mjs.map} +1 -1
- package/dist/{encryption-OPCsewWc.cjs → encryption-CS5tEnE1.cjs} +2 -2
- package/dist/{encryption-OPCsewWc.cjs.map → encryption-CS5tEnE1.cjs.map} +1 -1
- package/dist/{engine-a6K99WIl.mjs → engine-4nWsBOM9.mjs} +6 -6
- package/dist/{engine-a6K99WIl.mjs.map → engine-4nWsBOM9.mjs.map} +1 -1
- package/dist/{engine-BSnhQLaB.cjs → engine-DBuoGHhE.cjs} +6 -6
- package/dist/{engine-BSnhQLaB.cjs.map → engine-DBuoGHhE.cjs.map} +1 -1
- package/dist/{github-D4hThtnt.mjs → github-CBexMKt6.mjs} +6 -6
- package/dist/{github-D4hThtnt.mjs.map → github-CBexMKt6.mjs.map} +1 -1
- package/dist/{github-C3gUSbLn.cjs → github-DVmVvYif.cjs} +6 -6
- package/dist/{github-C3gUSbLn.cjs.map → github-DVmVvYif.cjs.map} +1 -1
- package/dist/{googlePlay-C5Q7Zov3.cjs → googlePlay-C3Bn_DCj.cjs} +4 -4
- package/dist/{googlePlay-C5Q7Zov3.cjs.map → googlePlay-C3Bn_DCj.cjs.map} +1 -1
- package/dist/{googlePlay-DIS9PeFB.mjs → googlePlay-jTL8R6Q8.mjs} +4 -4
- package/dist/{googlePlay-DIS9PeFB.mjs.map → googlePlay-jTL8R6Q8.mjs.map} +1 -1
- package/dist/index.cjs +60 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +60 -60
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CMA_7b0_.mjs → local-BejxzczT.mjs} +2 -2
- package/dist/{local-CMA_7b0_.mjs.map → local-BejxzczT.mjs.map} +1 -1
- package/dist/{local-B5R1WWEO.cjs → local-PWkIhiU0.cjs} +2 -2
- package/dist/{local-B5R1WWEO.cjs.map → local-PWkIhiU0.cjs.map} +1 -1
- package/dist/{migrate-BhnCtwMX.mjs → migrate-Bl8oaz7u.mjs} +2 -2
- package/dist/{migrate-BhnCtwMX.mjs.map → migrate-Bl8oaz7u.mjs.map} +1 -1
- package/dist/{migrate-B0041tRF.cjs → migrate-ChKFKdH1.cjs} +4 -4
- package/dist/{migrate-B0041tRF.cjs.map → migrate-ChKFKdH1.cjs.map} +1 -1
- package/dist/{migrate-168wMF5m.mjs → migrate-DpnMqHxD.mjs} +4 -4
- package/dist/{migrate-168wMF5m.mjs.map → migrate-DpnMqHxD.mjs.map} +1 -1
- package/dist/{migrate-BZxh_zU5.cjs → migrate-Dxcfcm3A.cjs} +2 -2
- package/dist/{migrate-BZxh_zU5.cjs.map → migrate-Dxcfcm3A.cjs.map} +1 -1
- package/dist/{projectBucket-hF0-tlq9.mjs → projectBucket-BeCDyZQX.mjs} +2 -2
- package/dist/{projectBucket-hF0-tlq9.mjs.map → projectBucket-BeCDyZQX.mjs.map} +1 -1
- package/dist/{projectBucket-DEBaYEbi.cjs → projectBucket-D4AqCGVr.cjs} +2 -2
- package/dist/{projectBucket-DEBaYEbi.cjs.map → projectBucket-D4AqCGVr.cjs.map} +1 -1
- package/dist/{publish-_lVOoWCy.mjs → publish-CXqI2-U3.mjs} +2 -2
- package/dist/{publish-_lVOoWCy.mjs.map → publish-CXqI2-U3.mjs.map} +1 -1
- package/dist/{publish-B-ffSuAX.cjs → publish-e2lsR2Jq.cjs} +2 -2
- package/dist/{publish-B-ffSuAX.cjs.map → publish-e2lsR2Jq.cjs.map} +1 -1
- package/dist/{resolve-UK4b26dm.mjs → resolve-BMmiH24Y.mjs} +4 -4
- package/dist/{resolve-UK4b26dm.mjs.map → resolve-BMmiH24Y.mjs.map} +1 -1
- package/dist/{resolve-Cs38fbaX.cjs → resolve-BgjyMQZy.cjs} +4 -4
- package/dist/{resolve-Cs38fbaX.cjs.map → resolve-BgjyMQZy.cjs.map} +1 -1
- package/dist/{rollback-B0eg3M0J.mjs → rollback-BpJonwn6.mjs} +6 -6
- package/dist/{rollback-B0eg3M0J.mjs.map → rollback-BpJonwn6.mjs.map} +1 -1
- package/dist/{rollback-DByniS9X.cjs → rollback-Cf1JpbwJ.cjs} +6 -6
- package/dist/{rollback-DByniS9X.cjs.map → rollback-Cf1JpbwJ.cjs.map} +1 -1
- package/dist/{s3-B-IJWFJA.mjs → s3-CRShyAj_.mjs} +2 -2
- package/dist/{s3-B-IJWFJA.mjs.map → s3-CRShyAj_.mjs.map} +1 -1
- package/dist/{s3-4rmPI6wv.cjs → s3-P47E4YMA.cjs} +2 -2
- package/dist/{s3-4rmPI6wv.cjs.map → s3-P47E4YMA.cjs.map} +1 -1
- package/dist/{serverSetup-Cok75j21.mjs → serverSetup-gRotzelq.mjs} +6 -6
- package/dist/{serverSetup-Cok75j21.mjs.map → serverSetup-gRotzelq.mjs.map} +1 -1
- package/dist/{serverSetup-EY5vppoS.cjs → serverSetup-rJUXJgY4.cjs} +6 -6
- package/dist/{serverSetup-EY5vppoS.cjs.map → serverSetup-rJUXJgY4.cjs.map} +1 -1
- package/dist/{sniffer-CcLTONfm.cjs → sniffer-BQOt66oy.cjs} +6 -6
- package/dist/{sniffer-CcLTONfm.cjs.map → sniffer-BQOt66oy.cjs.map} +1 -1
- package/dist/{sniffer-DIyYcOXJ.mjs → sniffer-D82SAjc_.mjs} +6 -6
- package/dist/{sniffer-DIyYcOXJ.mjs.map → sniffer-D82SAjc_.mjs.map} +1 -1
- package/dist/{snsSubscriptions-Bore7t-W.cjs → snsSubscriptions-Ci62xcrq.cjs} +2 -2
- package/dist/{snsSubscriptions-Bore7t-W.cjs.map → snsSubscriptions-Ci62xcrq.cjs.map} +1 -1
- package/dist/{snsSubscriptions-CYEVD7ml.mjs → snsSubscriptions-D-1y_R8M.mjs} +2 -2
- package/dist/{snsSubscriptions-CYEVD7ml.mjs.map → snsSubscriptions-D-1y_R8M.mjs.map} +1 -1
- package/dist/{sst-Bsu5O1Lt.cjs → sst-BBNnVnl2.cjs} +5 -5
- package/dist/{sst-Bsu5O1Lt.cjs.map → sst-BBNnVnl2.cjs.map} +1 -1
- package/dist/{sst-DBH707Na.mjs → sst-CbJS1d--.mjs} +5 -5
- package/dist/{sst-DBH707Na.mjs.map → sst-CbJS1d--.mjs.map} +1 -1
- package/dist/{stack-DU2SunuO.mjs → stack-BXyv__ZA.mjs} +41 -19
- package/dist/stack-BXyv__ZA.mjs.map +1 -0
- package/dist/{stack-CwSx-6ea.cjs → stack-DmZPFXyz.cjs} +40 -18
- package/dist/stack-DmZPFXyz.cjs.map +1 -0
- package/dist/{stage-BgD-kKY3.cjs → stage-CvUrBgxq.cjs} +4 -4
- package/dist/{stage-BgD-kKY3.cjs.map → stage-CvUrBgxq.cjs.map} +1 -1
- package/dist/{stage-BGyx0OjL.mjs → stage-xkuXOSsr.mjs} +4 -4
- package/dist/{stage-BGyx0OjL.mjs.map → stage-xkuXOSsr.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-GyXHsRAl.cjs → terminal-BFUESry5.cjs} +2 -2
- package/dist/{terminal-GyXHsRAl.cjs.map → terminal-BFUESry5.cjs.map} +1 -1
- package/dist/{terminal-BlJ90AIM.mjs → terminal-iOb1b-eG.mjs} +2 -2
- package/dist/{terminal-BlJ90AIM.mjs.map → terminal-iOb1b-eG.mjs.map} +1 -1
- package/package.json +16 -16
- package/dist/config-CTrfNKYd.d.mts.map +0 -1
- package/dist/config-D9g_nYIu.d.cts.map +0 -1
- package/dist/credentials-BMdpNO8R.mjs.map +0 -1
- package/dist/credentials-C3uaZ80e.cjs.map +0 -1
- package/dist/stack-CwSx-6ea.cjs.map +0 -1
- package/dist/stack-DU2SunuO.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_errors = require("./errors-D1x8duqI.cjs");
|
|
3
|
-
const require_credentials = require("./credentials-
|
|
3
|
+
const require_credentials = require("./credentials-BIP-iRPn.cjs");
|
|
4
4
|
const require_workspace = require("./workspace-CTspddnJ.cjs");
|
|
5
|
-
const require_credentials$1 = require("./credentials-
|
|
5
|
+
const require_credentials$1 = require("./credentials-muaDESyw.cjs");
|
|
6
6
|
const require_drivers = require("./drivers-DP7__dJX.cjs");
|
|
7
7
|
const require_SubscriberGenerator = require("./SubscriberGenerator-CxzECrfj.cjs");
|
|
8
8
|
const require_EndpointGenerator = require("./EndpointGenerator-iyA3HkOH.cjs");
|
|
@@ -954,12 +954,21 @@ function credentialOf(options) {
|
|
|
954
954
|
* stored URL naming an old port is the drift resolution replaces. A command
|
|
955
955
|
* whose stage says a value by hand (a deployed stack's) leaves that key out
|
|
956
956
|
* of `resolved`.
|
|
957
|
+
*
|
|
958
|
+
* But for a frontend's stage (`PUBLIC_STAGE_KEYS`), which is a name rather
|
|
959
|
+
* than an address: a stored one is how the stage told its bundle what it is
|
|
960
|
+
* called, and it wins here as it wins in an image build.
|
|
957
961
|
*/
|
|
958
962
|
function stageEnv(stored, resolved) {
|
|
959
|
-
|
|
963
|
+
const env = {
|
|
960
964
|
...stored,
|
|
961
965
|
...resolved
|
|
962
966
|
};
|
|
967
|
+
for (const key of _geekmidas_manifest.PUBLIC_STAGE_KEYS) {
|
|
968
|
+
const value = stored[key];
|
|
969
|
+
if (value !== void 0) env[key] = value;
|
|
970
|
+
}
|
|
971
|
+
return env;
|
|
963
972
|
}
|
|
964
973
|
/**
|
|
965
974
|
* The token a stack's own services prove themselves with at its edge
|
|
@@ -1080,6 +1089,7 @@ function publicEnv(plan, resolved, addresses = {}) {
|
|
|
1080
1089
|
const origins = (0, _geekmidas_manifest.imageOrigins)(resource.imageOrigins.sources, (key) => resolved[key]);
|
|
1081
1090
|
if (origins) env[resource.imageOrigins.key] = origins;
|
|
1082
1091
|
}
|
|
1092
|
+
if (resource.stageKey && resolved[resource.envKey]) env[resource.stageKey] = plan.stage;
|
|
1083
1093
|
}
|
|
1084
1094
|
return env;
|
|
1085
1095
|
}
|
|
@@ -2546,13 +2556,16 @@ var SiteBuildValueUnresolved = class extends require_errors.GkmError {
|
|
|
2546
2556
|
* variant's public prefix (`NEXT_PUBLIC_APP_STORE_URL` on a `next` site) was
|
|
2547
2557
|
* declared public by whoever named it, so it is passed. Anything else is
|
|
2548
2558
|
* not: a secret without the prefix never reaches a site's build.
|
|
2559
|
+
* - **The stage it is built for**, under the prefix (`NEXT_PUBLIC_STAGE`):
|
|
2560
|
+
* what a bundle gates production-only code on, as a process reads `STAGE`.
|
|
2561
|
+
* A stage secret of that name wins, unlike every other derived value.
|
|
2549
2562
|
*
|
|
2550
2563
|
* A value the stage resolves to nothing is left out rather than passed empty
|
|
2551
2564
|
* — except, with `requireFileOrigins`, where its pages load files from.
|
|
2552
2565
|
* A derived value wins over a stage secret of the same name: the site's
|
|
2553
2566
|
* addresses are the construct's, not a copy someone set.
|
|
2554
2567
|
*/
|
|
2555
|
-
function publicBuildValues(site, manifest, resolve, secrets, options
|
|
2568
|
+
function publicBuildValues(site, manifest, resolve, secrets, options) {
|
|
2556
2569
|
const args = {};
|
|
2557
2570
|
const own = (0, _geekmidas_manifest.providedKeyFor)(site.id, site.kind, site.kind === "site" ? "url" : "scheme");
|
|
2558
2571
|
const ownValue = resolve(own);
|
|
@@ -2563,20 +2576,20 @@ function publicBuildValues(site, manifest, resolve, secrets, options = {}) {
|
|
|
2563
2576
|
if (value) args[key] = value;
|
|
2564
2577
|
}
|
|
2565
2578
|
const prefix = _geekmidas_manifest.PUBLIC_PREFIX[site.variant];
|
|
2566
|
-
const
|
|
2567
|
-
if (required) for (const value of (0, _geekmidas_manifest.publicValues)(site, manifest)) {
|
|
2579
|
+
if (options.requireFileOrigins) for (const value of (0, _geekmidas_manifest.publicValues)(site, manifest)) {
|
|
2568
2580
|
if (value.kind === "file-server" && value.role === "url") {
|
|
2569
|
-
if (!resolve(value.key)) throw new SiteBuildValueUnresolved(site.id, value.key,
|
|
2581
|
+
if (!resolve(value.key)) throw new SiteBuildValueUnresolved(site.id, value.key, options.stage);
|
|
2570
2582
|
}
|
|
2571
2583
|
if (value.kind === "objects" && value.role === "signedOrigin") {
|
|
2572
2584
|
const connection = (0, _geekmidas_manifest.providedKeyFor)(value.id, "objects", "connectionString");
|
|
2573
|
-
if (!resolve(value.key) && !resolve(connection)) throw new SiteBuildValueUnresolved(site.id, value.key,
|
|
2585
|
+
if (!resolve(value.key) && !resolve(connection)) throw new SiteBuildValueUnresolved(site.id, value.key, options.stage, connection);
|
|
2574
2586
|
}
|
|
2575
2587
|
}
|
|
2576
2588
|
const images = (0, _geekmidas_manifest.imageOriginsFor)(site, manifest);
|
|
2577
2589
|
const origins = images && (0, _geekmidas_manifest.imageOrigins)(images.sources, (source) => resolve(source) ?? derived[source]);
|
|
2578
2590
|
if (images && origins) args[images.key] = origins;
|
|
2579
2591
|
for (const [key, value] of Object.entries(secrets)) if (key.startsWith(prefix) && args[key] === void 0 && value) args[key] = value;
|
|
2592
|
+
args[(0, _geekmidas_manifest.publicStageKey)(site)] ??= options.stage;
|
|
2580
2593
|
return args;
|
|
2581
2594
|
}
|
|
2582
2595
|
/**
|
|
@@ -5749,10 +5762,10 @@ function localPlan(workspace, manifest, fakes = {}, credentialFakes = {}) {
|
|
|
5749
5762
|
* addresses a *browser* can open, since that is where the bundle runs — the
|
|
5750
5763
|
* host's port for each app, never a name on the compose network.
|
|
5751
5764
|
*/
|
|
5752
|
-
function sitePublicArgs(manifest, appName, env) {
|
|
5765
|
+
function sitePublicArgs(manifest, appName, env, stage) {
|
|
5753
5766
|
const declaration = Object.entries(manifest).find(([id, d]) => d.kind === "site" && require_workspace.appKey(id) === appName)?.[1];
|
|
5754
5767
|
if (declaration?.kind !== "site") return {};
|
|
5755
|
-
return publicBuildValues(declaration, manifest, (key) => env[key], {});
|
|
5768
|
+
return publicBuildValues(declaration, manifest, (key) => env[key], {}, { stage });
|
|
5756
5769
|
}
|
|
5757
5770
|
/**
|
|
5758
5771
|
* Every key a plan resolves, with each container addressed by its service
|
|
@@ -5858,6 +5871,7 @@ function appEnvKeys(manifest, appName) {
|
|
|
5858
5871
|
for (const { key } of (0, _geekmidas_manifest.publicValues)(declaration, manifest)) keys.add(key);
|
|
5859
5872
|
const images = (0, _geekmidas_manifest.imageOriginsFor)(declaration, manifest);
|
|
5860
5873
|
if (images) keys.add(images.key);
|
|
5874
|
+
keys.add((0, _geekmidas_manifest.publicStageKey)(declaration));
|
|
5861
5875
|
}
|
|
5862
5876
|
return keys;
|
|
5863
5877
|
}
|
|
@@ -6069,7 +6083,7 @@ function appServices(workspace, manifest, containers, credentials, fakes = {}, c
|
|
|
6069
6083
|
});
|
|
6070
6084
|
const ports = [`${app.port}:${app.port}`];
|
|
6071
6085
|
if (app.type === "web") {
|
|
6072
|
-
const args = sitePublicArgs(manifest, name, browser);
|
|
6086
|
+
const args = sitePublicArgs(manifest, name, browser, plan.stage);
|
|
6073
6087
|
services[key] = {
|
|
6074
6088
|
image: `${key}:\${TAG:-latest}`,
|
|
6075
6089
|
build: {
|
|
@@ -8003,7 +8017,8 @@ function siteDockerfile(appName, app, options) {
|
|
|
8003
8017
|
const publicUrlArgs = options.publicUrlArgs ?? (declared?.kind === "site" && options.manifest ? [
|
|
8004
8018
|
(0, _geekmidas_manifest.providedKeyFor)(declared.id, declared.kind, "url"),
|
|
8005
8019
|
...Object.keys((0, _geekmidas_manifest.publicEnvFor)(declared, options.manifest)),
|
|
8006
|
-
...[(0, _geekmidas_manifest.imageOriginsFor)(declared, options.manifest)?.key].filter((key) => key !== void 0)
|
|
8020
|
+
...[(0, _geekmidas_manifest.imageOriginsFor)(declared, options.manifest)?.key].filter((key) => key !== void 0),
|
|
8021
|
+
(0, _geekmidas_manifest.publicStageKey)(declared)
|
|
8007
8022
|
] : require_credentials$1.getPublicUrlArgNames(app));
|
|
8008
8023
|
const webOpts = {
|
|
8009
8024
|
...options.image,
|
|
@@ -9857,7 +9872,10 @@ function composeStack(input) {
|
|
|
9857
9872
|
for (const app of apps) {
|
|
9858
9873
|
const site = manifest[app.id];
|
|
9859
9874
|
if (site?.kind === "site") {
|
|
9860
|
-
const args = publicBuildValues(site, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom,
|
|
9875
|
+
const args = publicBuildValues(site, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom, {
|
|
9876
|
+
stage,
|
|
9877
|
+
requireFileOrigins: !local && app.build !== void 0
|
|
9878
|
+
});
|
|
9861
9879
|
if (app.prerender && input.prerenderRun) args[PRERENDER_RUN_ARG] = input.prerenderRun;
|
|
9862
9880
|
Object.assign(args, require_credentials$1.nextBuildValues(site, require_credentials.stageTag(input.images.tag, stage), custom));
|
|
9863
9881
|
if (app.build && Object.keys(args).length > 0) app.build.args = args;
|
|
@@ -9891,7 +9909,7 @@ function composeStack(input) {
|
|
|
9891
9909
|
mobileApps.push({
|
|
9892
9910
|
name: app.name,
|
|
9893
9911
|
id: app.id,
|
|
9894
|
-
values: publicBuildValues(declaration, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom)
|
|
9912
|
+
values: publicBuildValues(declaration, manifest, (key) => valueFor(app, key, owners.get(key)) ?? plannedOrigins.get(key), custom, { stage })
|
|
9895
9913
|
});
|
|
9896
9914
|
}
|
|
9897
9915
|
for (const worker of input.buildOnly ? [] : workers) {
|
|
@@ -10324,7 +10342,9 @@ function recordedSubscriptions(worker, push, recorded = {}) {
|
|
|
10324
10342
|
* A wildcard site on a deployed stage with nowhere to get a certificate for
|
|
10325
10343
|
* its tenants' hosts from. Let's Encrypt issues a wildcard certificate only
|
|
10326
10344
|
* over the DNS challenge, so the stage either brings its own or gives the
|
|
10327
|
-
* proxy a way to get one.
|
|
10345
|
+
* proxy a way to get one. On the stack's own Caddy that is a certificate per
|
|
10346
|
+
* host on demand, and only there is the site's `hosts` route required: the
|
|
10347
|
+
* one place the rule lives.
|
|
10328
10348
|
*/
|
|
10329
10349
|
var WildcardSiteCertificateMissing = class extends require_errors.GkmError {
|
|
10330
10350
|
site;
|
|
@@ -10332,7 +10352,7 @@ var WildcardSiteCertificateMissing = class extends require_errors.GkmError {
|
|
|
10332
10352
|
proxy;
|
|
10333
10353
|
domain;
|
|
10334
10354
|
constructor(site, stage, proxy, domain) {
|
|
10335
|
-
super(proxy === "traefik" ? `'${site}' answers on every subdomain of ${domain}, and '${stage}' has no certificate for them. Set deploy.compose.tls for '${stage}' to a *.${domain} certificate, or manage ${domain} with dns: { '<root domain>': { provider: ${Object.keys(_geekmidas_edge_proxy_traefik.ACME_DNS_CHALLENGES).map((p) => `'${p}'`).join(" | ")} } } so the shared edge gets one over the DNS challenge.` : `'${site}' answers on every subdomain of ${domain}, and '${stage}' has no certificate for them. Set deploy.compose.tls for '${stage}' to a *.${domain} certificate, or
|
|
10355
|
+
super(proxy === "traefik" ? `'${site}' answers on every subdomain of ${domain}, and '${stage}' has no certificate for them. Set deploy.compose.tls for '${stage}' to a *.${domain} certificate, or manage ${domain} with dns: { '<root domain>': { provider: ${Object.keys(_geekmidas_edge_proxy_traefik.ACME_DNS_CHALLENGES).map((p) => `'${p}'`).join(" | ")} } } so the shared edge gets one over the DNS challenge.` : `'${site}' answers on every subdomain of ${domain}, and '${stage}' has no certificate for them. Set deploy.compose.tls for '${stage}' to a *.${domain} certificate, or let Caddy get one per tenant on demand by giving the site \`hosts\` — \`hosts: { surface: api, path: '/tenants/hosts' }\`, a GET route answering 200 for a tenant. On-demand certificates need it: Caddy asks it before issuing one, so no request can make it get certificates for hosts that are no tenant.`);
|
|
10336
10356
|
this.site = site;
|
|
10337
10357
|
this.stage = stage;
|
|
10338
10358
|
this.proxy = proxy;
|
|
@@ -10346,7 +10366,9 @@ var WildcardSiteCertificateMissing = class extends require_errors.GkmError {
|
|
|
10346
10366
|
* first; then, on the shared Traefik edge, a `*.<domain>` one over the DNS
|
|
10347
10367
|
* challenge when a provider the edge can answer it through manages the
|
|
10348
10368
|
* domain (`ACME_DNS_CHALLENGES`); on the stack's own Caddy, one
|
|
10349
|
-
* per host on demand, asked of the site's `hosts` route.
|
|
10369
|
+
* per host on demand, asked of the site's `hosts` route. That last is the
|
|
10370
|
+
* only certificate that needs `hosts`: behind a wildcard one every label but
|
|
10371
|
+
* the protected ones reaches the site, and the app answers an unknown tenant.
|
|
10350
10372
|
*
|
|
10351
10373
|
* @throws {WildcardSiteCertificateMissing} when neither applies
|
|
10352
10374
|
*/
|
|
@@ -11722,4 +11744,4 @@ Object.defineProperty(exports, "writeEdgeRoutes", {
|
|
|
11722
11744
|
}
|
|
11723
11745
|
});
|
|
11724
11746
|
|
|
11725
|
-
//# sourceMappingURL=stack-
|
|
11747
|
+
//# sourceMappingURL=stack-DmZPFXyz.cjs.map
|