unoverse 0.1.20 → 0.1.21

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.
@@ -7,6 +7,21 @@ cmd_update() {
7
7
  echo ""
8
8
  timer_start
9
9
 
10
+ # ── Refuse before doing half the job ───────────────────────────────────────────
11
+ # This used to run against an unconfigured folder with Docker down: compose warned
12
+ # about thirty blank variables, then failed on the daemon, after reporting that the
13
+ # code had updated. Ask first.
14
+ if [ ! -f "$ROOT/.env" ]; then
15
+ fail "This universe is not configured yet"
16
+ info "Run ${BOLD}unoverse init${NC} first"
17
+ exit 1
18
+ fi
19
+ if ! docker info >/dev/null 2>&1; then
20
+ fail "Docker is not running. Update pulls images, so it needs the daemon"
21
+ info "Start Docker Desktop, then run ${BOLD}unoverse update${NC} again"
22
+ exit 1
23
+ fi
24
+
10
25
  # ── Developer work is SAFE, by design ──────────────────────────────────────────
11
26
  # `update` refreshes the PLATFORM (its own tracked files) and NEVER touches a developer's
12
27
  # own work. Custom nodes live as UNTRACKED files (apps/unoverse/nodes/<yours>) — `git reset
@@ -27,7 +42,18 @@ cmd_update() {
27
42
  exit 1
28
43
  fi
29
44
 
30
- # Step 1: Code — pull from customer's fork
45
+ # Step 1: Code — pull from customer's fork.
46
+ #
47
+ # NOT EVERY UNIVERSE IS A GIT CLONE. `unoverse create` extracts a tarball, so there is
48
+ # no remote to pull from and never was. That is not a failure: the images carry the
49
+ # platform, and the files here are yours. Skip the step and say which mode you are in,
50
+ # rather than running git commands that all fail and then reporting "Code updated".
51
+ if ! git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1; then
52
+ info "Not a git checkout, so there is no code to pull. Updating images only"
53
+ UNOVERSE_SKIP_GIT=1
54
+ fi
55
+
56
+ if [ "${UNOVERSE_SKIP_GIT:-}" != "1" ]; then
31
57
  printf " ${DIM}●${NC} Pulling latest code..."
32
58
  local git_ok=true
33
59
  local git_log
@@ -89,6 +115,7 @@ cmd_update() {
89
115
  exit 1
90
116
  fi
91
117
  fi
118
+ fi # UNOVERSE_SKIP_GIT
92
119
 
93
120
  # Step 2: Images — login to registry if DOCR_TOKEN is set
94
121
  local docr_token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
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",