unoverse 0.1.101 → 0.1.102

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.
@@ -366,6 +366,35 @@ _ensure_ground_config() {
366
366
  esac
367
367
  fi
368
368
 
369
+ # CAN THIS MACHINE ACTUALLY REACH WHAT IT IS ABOUT TO BUILD?
370
+ #
371
+ # An EC2 key pair the operator does not hold applies perfectly and then fails at the ship
372
+ # step: eleven minutes of RDS and ElastiCache provisioning, then "Permission denied
373
+ # (publickey)". Generating the ground correctly is not enough — tfvars is the developer's
374
+ # file and `unoverse update` never rewrites it, so a ground made before this check keeps
375
+ # its unusable key forever and fails the same way every time.
376
+ #
377
+ # Checked here, before the plan, because the cost of being wrong is money and eleven
378
+ # minutes, and the fix is one line in a file this command already edits.
379
+ if [ "$cloud" = "aws" ]; then
380
+ local named_key pub_key
381
+ named_key=$(grep -E '^ssh_key_name[[:space:]]*=' "$tfv" 2>/dev/null | sed -E 's/.*"([^"]*)".*/\1/')
382
+ if [ -n "$named_key" ] && ! grep -qE '^operator_public_key[[:space:]]*=[[:space:]]*"ssh-' "$tfv" 2>/dev/null; then
383
+ for pub_key in "$HOME/.ssh/id_ed25519.pub" "$HOME/.ssh/id_rsa.pub" ""; do
384
+ [ -n "$pub_key" ] && [ -f "$pub_key" ] && break
385
+ done
386
+ if [ -n "$pub_key" ]; then
387
+ node -e 'const fs=require("fs");const[f,v]=process.argv.slice(1);let s=fs.readFileSync(f,"utf8");
388
+ s=s.replace(/^ssh_key_name\s*=.*$/m,"ssh_key_name = \"\" # empty = terraform uploads operator_public_key below\noperator_public_key = "+JSON.stringify(v)+" # your key: the deploy ssh-es from this machine");
389
+ fs.writeFileSync(f,s)' "$tfv" "$(cat "$pub_key")"
390
+ ok "SSH key: your own ${DIM}($(basename "$pub_key") — replacing '"'"'$named_key'"'"', whose private half is not on this machine)${NC}"
391
+ else
392
+ warn "No ssh key on this machine. The deploy will build, then fail to reach the server"
393
+ info "Make one with ${BOLD}ssh-keygen -t ed25519${NC} and run this again"
394
+ fi
395
+ fi
396
+ fi
397
+
369
398
  _tf_fill docr_token DOCR_TOKEN "Registry access token (from your Unoverse admin)"
370
399
  _tf_fill openai_api_key OPENAI_API_KEY "OPENAI_API_KEY (powers the platform's AI)"
371
400
  if grep -q '^auth_issuer[[:space:]]*=[[:space:]]*"FILL_ME"' "$tfv" 2>/dev/null; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.101",
3
+ "version": "0.1.102",
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",