unoverse 0.1.160 → 0.1.162

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.
package/bin/unoverse.mjs CHANGED
@@ -116,10 +116,27 @@ switch (cmd) {
116
116
  // Those two steps run via `_postupdate` in the NEWLY installed binary, not this
117
117
  // process: this file is being replaced mid-command, and copying the skill from the
118
118
  // old install would pin it one release behind forever.
119
- const r = spawnSync("npm", ["install", "-g", "unoverse@latest"], { stdio: "inherit" });
119
+ // THE REGISTRY IS THE TRUTH, asked directly. `npm install unoverse@latest` resolves
120
+ // `latest` from npm's CACHED metadata, and that cache lags real releases by minutes:
121
+ // three updates in a row can install the same stale version while the registry has
122
+ // long moved on (observed live 2026-08-21, 0.1.160 served repeatedly with 0.1.161
123
+ // published). So update asks the registry itself which version is latest and installs
124
+ // THAT version by exact number with --prefer-online, which is immune to every layer
125
+ // of metadata cache. The registry being unreachable falls back to npm's own idea of
126
+ // latest, which is never worse than before.
127
+ let want = "";
128
+ try {
129
+ const doc = await (await fetch("https://registry.npmjs.org/unoverse", { headers: { accept: "application/vnd.npm.install-v1+json" } })).json();
130
+ want = doc?.["dist-tags"]?.latest ?? "";
131
+ } catch { /* registry unreachable: npm's latest is the best available answer */ }
132
+ const spec = want ? `unoverse@${want}` : "unoverse@latest";
133
+ const r = spawnSync("npm", ["install", "-g", spec, "--prefer-online"], { stdio: "inherit" });
120
134
  if (r.status === 0) {
121
135
  const v = spawnSync("unoverse", ["-v"], { encoding: "utf8" }).stdout?.trim();
122
136
  console.log(`\n ✓ unoverse is now ${v || "up to date"}`);
137
+ if (want && v && v !== want) {
138
+ console.log(` ⚠ the registry's latest is ${want}; npm delivered ${v}. Re-run in a minute, or: npm install -g unoverse@${want}`);
139
+ }
123
140
  spawnSync("unoverse", ["_postupdate"], { stdio: "inherit" });
124
141
  } else {
125
142
  // DO NOT GUESS THE CAUSE. This used to say "(permissions?)" whatever happened, so a
package/lib/login.mjs CHANGED
@@ -174,7 +174,7 @@ export async function login(universeInput, { log = console.log } = {}) {
174
174
  if (!config.authEnabled) {
175
175
  throw new Error(
176
176
  `${origin} has authentication switched off, so there is no account to sign in with.\n` +
177
- ` To publish there, set UNOVERSE_TOKEN to a publish key minted on the universe itself.`,
177
+ ` To deploy there, set UNOVERSE_TOKEN to a deploy key minted on the universe itself.`,
178
178
  );
179
179
  }
180
180
  if (!config.issuer) throw new Error(`${origin} has no identity provider configured.`);
@@ -257,13 +257,13 @@ export async function tokenFor(origin, { interactive = true, log = console.log }
257
257
  } else if (!config.authEnabled) {
258
258
  throw new Error(
259
259
  `${origin} has authentication switched off.\n` +
260
- ` To publish there, set UNOVERSE_TOKEN to a publish key minted on the universe itself.`,
260
+ ` To deploy there, set UNOVERSE_TOKEN to a deploy key minted on the universe itself.`,
261
261
  );
262
262
  }
263
263
 
264
264
  if (!interactive || !process.stdin.isTTY) {
265
265
  throw new Error(
266
- `No credential for ${origin}. In CI, set UNOVERSE_TOKEN to a publish key.\n` +
266
+ `No credential for ${origin}. In CI, set UNOVERSE_TOKEN to a deploy key.\n` +
267
267
  ` At a terminal, run: unoverse login ${origin}`,
268
268
  );
269
269
  }
package/lib/publish.mjs CHANGED
@@ -74,7 +74,7 @@ export async function publish(args) {
74
74
  let project = positional;
75
75
  if (!project) {
76
76
  if (projects.length > 1) {
77
- die(`several projects here. Say which:\n\n unoverse publish <project>\n\n Found: ${projects.join(", ")}`);
77
+ die(`several projects here. Say which:\n\n unoverse deploy studio <project>\n\n Found: ${projects.join(", ")}`);
78
78
  }
79
79
  project = projects[0];
80
80
  } else if (!projects.includes(project)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.160",
3
+ "version": "0.1.162",
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",