@geekmidas/manifest 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/index.cjs CHANGED
@@ -1012,6 +1012,20 @@ const PUBLIC_PREFIX = {
1012
1012
  expo: "EXPO_PUBLIC_"
1013
1013
  };
1014
1014
  /**
1015
+ * The key a frontend's build reads its stage under — `NEXT_PUBLIC_STAGE`,
1016
+ * `VITE_STAGE`, `EXPO_PUBLIC_STAGE`: the build-time counterpart of the
1017
+ * `STAGE` every deployed process is handed.
1018
+ *
1019
+ * Inlined, so it is the stage the bundle was *built* for: an image promoted
1020
+ * to another stage carries it along. A stage secret of the same name wins —
1021
+ * it is how a stage said its name to the bundle before gkm did.
1022
+ */
1023
+ function publicStageKey(declaration) {
1024
+ return `${PUBLIC_PREFIX[declaration.variant]}STAGE`;
1025
+ }
1026
+ /** Every key a frontend's stage can be inlined under, one per prefix. */
1027
+ const PUBLIC_STAGE_KEYS = [...new Set(Object.values(PUBLIC_PREFIX).map((prefix) => `${prefix}STAGE`))];
1028
+ /**
1015
1029
  * Every public value a site's or a mobile app's edges reach — the one walk of
1016
1030
  * its edges that every target makes, so what a bundle inlines cannot differ
1017
1031
  * between `gkm dev`, a compose build and the AWS target.
@@ -1690,6 +1704,7 @@ exports.MIGRATIONS_ROOT = MIGRATIONS_ROOT;
1690
1704
  exports.NoUrlForStage = NoUrlForStage;
1691
1705
  exports.PUBLIC = PUBLIC;
1692
1706
  exports.PUBLIC_PREFIX = PUBLIC_PREFIX;
1707
+ exports.PUBLIC_STAGE_KEYS = PUBLIC_STAGE_KEYS;
1693
1708
  exports.SECRET_LENGTH = SECRET_LENGTH;
1694
1709
  exports.SECRET_SYMBOLS = SECRET_SYMBOLS;
1695
1710
  exports.TELEMETRY_KEYS = TELEMETRY_KEYS;
@@ -1732,6 +1747,7 @@ exports.parseApiGatewayWebSocketUrl = parseApiGatewayWebSocketUrl;
1732
1747
  exports.providedKeyFor = providedKeyFor;
1733
1748
  exports.provisionOrder = provisionOrder;
1734
1749
  exports.publicEnvFor = publicEnvFor;
1750
+ exports.publicStageKey = publicStageKey;
1735
1751
  exports.publicValues = publicValues;
1736
1752
  exports.reachesServerHalf = reachesServerHalf;
1737
1753
  exports.receiptRecipients = receiptRecipients;