unoverse 0.1.70 → 0.1.72

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.
@@ -114,6 +114,20 @@ _ensure_ground_config() {
114
114
  cur_size=$(grep -E '^size[[:space:]]*=' "$tfv" 2>/dev/null | sed -E 's/.*"([^"]+)".*/\1/')
115
115
  [ -n "$cur_size" ] && info "Size: ${BOLD}${cur_size}${NC} ${DIM}(small · medium · large — change it in terraform.tfvars and deploy again whenever you outgrow it)${NC}"
116
116
 
117
+ # THE DATABASE DECISION, STATED EVERY RUN. It is asked once and then recorded in
118
+ # terraform.tfvars, so later deploys correctly do not re-ask — but silence reads
119
+ # exactly like never having been asked. Say what is in force, the same way Size does.
120
+ local pg_reuse pg_byo
121
+ pg_reuse=$(grep -E '^existing_pg_cluster_name[[:space:]]*=' "$tfv" 2>/dev/null | sed -E 's/.*"([^"]+)".*/\1/')
122
+ pg_byo=$(grep -cE '^byo_postgres_url[[:space:]]*=' "$tfv" 2>/dev/null)
123
+ if [ -n "$pg_reuse" ]; then
124
+ info "Database: ${BOLD}reusing $pg_reuse${NC} ${DIM}(no new cluster, nothing added to your bill)${NC}"
125
+ elif [ "$pg_byo" = "1" ]; then
126
+ info "Database: ${BOLD}your own URL${NC} ${DIM}(byo_postgres_url in terraform.tfvars)${NC}"
127
+ else
128
+ info "Database: ${BOLD}a new managed cluster${NC} ${DIM}(~\$15/month — comment in existing_pg_cluster_name to reuse one instead)${NC}"
129
+ fi
130
+
117
131
  # STRAIGHT INTO TERRAFORM. Its plan plus its own typed "yes" IS the decision gate
118
132
  # for billable infrastructure; a [Y/n] in front of it was asking permission to ask
119
133
  # permission. Answering "no" is terraform's "no".
@@ -207,7 +221,14 @@ cmd_deploy() {
207
221
  exit 1
208
222
  }
209
223
  else
210
- ok "Using your existing infra/$cloud/terraform.tfvars"
224
+ # SAY WHERE THIS IS GOING, first and unmissably. An existing ground already names
225
+ # the cloud, so re-asking every deploy would be noise — but a one-line mention
226
+ # buried above other output reads as never having been asked at all.
227
+ local pretty
228
+ [ "$cloud" = "aws" ] && pretty="AWS" || pretty="DigitalOcean"
229
+ echo ""
230
+ echo -e " ${CYAN}${BOLD}⬡ Deploying to $pretty${NC} ${DIM}(infra/$cloud — delete that folder's terraform.tfvars to choose again)${NC}"
231
+ echo ""
211
232
  fi
212
233
 
213
234
  _ensure_ground_config "$cloud" || exit 1
@@ -74,7 +74,8 @@ case "${1:-}" in
74
74
  info "Docker is not running. Images refresh on the next unoverse start"
75
75
  else
76
76
  # The ground definitions first: they are code, and they update like code.
77
- local _vinfra _g _f _base _changed
77
+ # NO `local` HERE: a case branch in the dispatch is not a function body, and bash
78
+ # errors "local: can only be used in a function" straight to the developer's screen.
78
79
  _vinfra="$GRAVITY_LIB/../infra"
79
80
  if [ -d "$_vinfra" ]; then
80
81
  for _g in digitalocean aws; do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",