unoverse 0.1.59 → 0.1.61

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.
@@ -5,6 +5,19 @@ cmd_deploy() {
5
5
 
6
6
  local env_prod="$ROOT/.env.production"
7
7
 
8
+ # HAND TERRAFORM ITS TOKEN. By design the DO token lives in doctl's config and never
9
+ # in a repo file (main.tf: empty var falls through to DIGITALOCEAN_TOKEN). deploy
10
+ # authenticated doctl, so deploy passes the token on — process env only, no file.
11
+ # Without this, apply planned 6 resources and then 401'd on an empty credential.
12
+ if [ -z "${DIGITALOCEAN_TOKEN:-}" ]; then
13
+ local _docfg
14
+ for _docfg in "$HOME/Library/Application Support/doctl/config.yaml" "$HOME/.config/doctl/config.yaml"; do
15
+ [ -f "$_docfg" ] || continue
16
+ DIGITALOCEAN_TOKEN=$(awk '/access-token:/{print $2; exit}' "$_docfg")
17
+ if [ -n "$DIGITALOCEAN_TOKEN" ]; then export DIGITALOCEAN_TOKEN; break; fi
18
+ done
19
+ fi
20
+
8
21
  # Missing .env.production is not an error if a ground has been applied — the
9
22
  # file is just a Terraform output, so render it ourselves. Reading state is
10
23
  # not wrapping terraform: apply stays the developer's explicit act.
@@ -96,16 +109,12 @@ cmd_deploy() {
96
109
  fi
97
110
  ok "terraform.tfvars is complete"
98
111
 
99
- # PROVISION FROM RIGHT HERE, if wanted. terraform apply prints its plan and asks
100
- # for its own explicit yes creating billable infrastructure stays a deliberate,
101
- # visible act, it just no longer requires leaving the flow.
112
+ # STRAIGHT INTO TERRAFORM. Its plan plus its own typed "yes" IS the decision gate
113
+ # for billable infrastructure; a [Y/n] in front of it was asking permission to ask
114
+ # permission. Answering "no" is terraform's "no".
115
+ echo ""
116
+ info "Provisioning. Terraform shows the plan and asks for your ${BOLD}yes${NC} before creating anything"
102
117
  echo ""
103
- local REPLY
104
- read -r -p " Provision now? terraform runs here and shows its plan first. [Y/n] " REPLY
105
- if [[ "$REPLY" =~ ^[Nn]$ ]]; then
106
- info "When ready: cd infra/$cloud && terraform init && terraform apply && cd ../.. && unoverse deploy"
107
- exit 0
108
- fi
109
118
  # Terraform is one static binary: install it directly from the official release
110
119
  # rather than sending anyone to brew (whose compile chain can demand Xcode Command
111
120
  # Line Tools updates for a tool that needs no compiling).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
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",