unoverse 0.1.61 → 0.1.62

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.
@@ -18,6 +18,28 @@ cmd_deploy() {
18
18
  done
19
19
  fi
20
20
 
21
+ # INFRA CHANGES SHIP TOO. If the ground has pending changes (edited tfvars, a new
22
+ # resource in main.tf from an update), deploy applies them first — through
23
+ # terraform's own plan-and-yes gate — then re-renders the env, since outputs may
24
+ # have changed. Without this, deploy only ever shipped images once a server
25
+ # existed, and infrastructure edits silently rotted.
26
+ local g_applied
27
+ if command -v terraform >/dev/null 2>&1; then
28
+ local g rc
29
+ for g in digitalocean aws; do
30
+ [ -d "$ROOT/infra/$g/.terraform" ] || continue
31
+ terraform -chdir="$ROOT/infra/$g" plan -input=false -detailed-exitcode >/dev/null 2>&1
32
+ rc=$?
33
+ if [ "$rc" = "2" ]; then
34
+ info "Your $g infrastructure has pending changes"
35
+ terraform -chdir="$ROOT/infra/$g" apply || { fail "apply did not complete. Re-run: unoverse deploy"; exit 1; }
36
+ terraform -chdir="$ROOT/infra/$g" output -raw env_production > "$env_prod" 2>/dev/null && ok "Refreshed .env.production from the ground"
37
+ g_applied=1
38
+ fi
39
+ break
40
+ done
41
+ fi
42
+
21
43
  # Missing .env.production is not an error if a ground has been applied — the
22
44
  # file is just a Terraform output, so render it ourselves. Reading state is
23
45
  # not wrapping terraform: apply stays the developer's explicit act.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.61",
3
+ "version": "0.1.62",
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",