unoverse 0.1.157 → 0.1.158

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
@@ -96,8 +96,11 @@ const HELP = [
96
96
  "",
97
97
  ` ${bold("After that")}`,
98
98
  row("studio", "Design components, nodes and agent skills"),
99
- row("publish", "Ship your work to your universe"),
100
- row("login", "Sign in to a universe (publish asks by itself when needed)"),
99
+ row("deploy", "Ship it"),
100
+ ` ${dim("deploy studio your components, nodes and skills your universe")}`,
101
+ ` ${dim("deploy aws your universe → AWS")}`,
102
+ ` ${dim("deploy digitalocean your universe → DigitalOcean")}`,
103
+ row("login", "Sign in to a universe (deploy asks by itself when needed)"),
101
104
  row("update", "Update this CLI"),
102
105
  "",
103
106
  ].join("\n");
@@ -230,19 +233,38 @@ switch (cmd) {
230
233
  break;
231
234
  }
232
235
 
236
+ case "deploy": {
237
+ // ONE VERB FOR THE REMOTE DEVELOPER, the target says what ships. `deploy studio`
238
+ // ships this design workspace's items to the signed-in universe (lint gates it);
239
+ // any other target is the operator's cloud deploy, unchanged. `publish` is the
240
+ // PLATFORM OWNER's word (the release) and stays out of this lane on purpose.
241
+ if (args[0] === "studio") {
242
+ const { findWorkspace } = await import("../lib/workspace.mjs");
243
+ const ws = findWorkspace();
244
+ if (ws?.kind !== "assets") {
245
+ console.log(`\n deploy studio ships a design workspace, and there is none above ${process.cwd()}.\n Start one with: unoverse create\n`);
246
+ process.exit(1);
247
+ }
248
+ const { publish } = await import("../lib/publish.mjs");
249
+ await publish(args.slice(1));
250
+ break;
251
+ }
252
+ if (UNIVERSE) operator(UNIVERSE, ["deploy", ...args]);
253
+ console.log(`\n '${["deploy", args[0]].filter(Boolean).join(" ")}' operates a universe, and this folder is not one.\n cd into your universe — or did you mean: unoverse deploy studio\n`);
254
+ process.exit(1);
255
+ }
256
+
233
257
  case "publish": {
234
- // ONE VERB, the folder decides (LOCAL_STUDIO.md §Publish is terminal-only).
235
- // Nearest marker up from cwd: a design home publish this workspace's items;
236
- // a docker-compose.yml publish is the operator's (the platform release lane).
258
+ // THE PLATFORM OWNER'S VERB. A remote developer never publishes: their word is
259
+ // `deploy studio`, and this says so instead of quietly doing it under the wrong
260
+ // name. In a universe checkout the operator's publish lane runs as before (on a
261
+ // starter kit that lane refuses by itself and names the owner's script).
237
262
  const { findWorkspace } = await import("../lib/workspace.mjs");
238
263
  const ws = findWorkspace();
239
- if (ws?.kind === "assets") {
240
- const { publish } = await import("../lib/publish.mjs");
241
- await publish(args);
242
- } else if (ws?.kind === "universe") {
264
+ if (ws?.kind === "universe") {
243
265
  operator({ root: ws.root, script: OPERATOR }, ["publish", ...args]);
244
266
  } else {
245
- console.log(`\n Nothing to publish here: no design/ workspace and no universe above ${process.cwd()}.\n Start one with: unoverse create\n`);
267
+ console.log(`\n publish is the platform owner's release. To ship your work: unoverse deploy studio\n`);
246
268
  process.exit(1);
247
269
  }
248
270
  break;
package/lib/publish.mjs CHANGED
@@ -86,17 +86,17 @@ export async function publish(args) {
86
86
  let universe = opt("to") ?? config.universe;
87
87
  if (!universe) {
88
88
  if (!process.stdin.isTTY) die("no universe. Pass --to https://your-universe.example, or commit it in unoverse.yaml");
89
- const typed = await ask(`\n Where does this workspace publish to? ${c.dim}(e.g. universe.example.com)${c.off} `);
89
+ const typed = await ask(`\n Where does this workspace deploy to? ${c.dim}(e.g. universe.example.com)${c.off} `);
90
90
  if (!typed) die("no universe given");
91
91
  universe = normaliseUrl(typed);
92
92
  await writeConfig(ws.root, { universe });
93
- console.log(` ${c.green}✓${c.off} saved to unoverse.yaml ${c.dim}(commit it: the whole team publishes there)${c.off}`);
93
+ console.log(` ${c.green}✓${c.off} saved to unoverse.yaml ${c.dim}(commit it: the whole team deploys there)${c.off}`);
94
94
  } else {
95
95
  universe = normaliseUrl(universe);
96
96
  }
97
97
 
98
98
  // ── 1. lint. Nothing is sent if this fails ──────────────────────────────────
99
- console.log(`\n ${c.bold}publish ${project}${c.off} ${c.dim}→ ${universe}${c.off}\n`);
99
+ console.log(`\n ${c.bold}deploy ${project}${c.off} ${c.dim}→ ${universe}${c.off}\n`);
100
100
  process.stdout.write(` ${c.dim}checking…${c.off}`);
101
101
  const { problems, errors } = await lintForPublish(designRoot, project);
102
102
  process.stdout.write("\r \r");
@@ -148,7 +148,7 @@ export async function publish(args) {
148
148
 
149
149
  // ── 4. confirm, unless told not to ──────────────────────────────────────────
150
150
  if (!flag("yes")) {
151
- const answer = await ask(`\n ${toSend} item(s) → ${universe}. Publish? [y/N] `);
151
+ const answer = await ask(`\n ${toSend} item(s) → ${universe}. Deploy? [y/N] `);
152
152
  if (!/^y(es)?$/i.test(answer)) {
153
153
  console.log(` ${c.dim}cancelled${c.off}\n`);
154
154
  process.exit(0);
@@ -161,7 +161,7 @@ export async function publish(args) {
161
161
  for (const s of sent) console.log(` ${c.green}✓${c.off} ${s.mode ?? "sent"} ${c.dim}${s.kind}/${s.name}${c.off}`);
162
162
  for (const f of failed) console.log(` ${c.red}✗${c.off} ${f.kind}/${f.name} ${f.why}`);
163
163
  console.log(
164
- `\n ${failed.length ? c.red + "✗" : c.green + "✓"}${c.off} ${sent.length} published` +
164
+ `\n ${failed.length ? c.red + "✗" : c.green + "✓"}${c.off} ${sent.length} deployed` +
165
165
  (failed.length ? `, ${failed.length} failed` : "") + "\n",
166
166
  );
167
167
  process.exit(failed.length ? 1 : 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.157",
3
+ "version": "0.1.158",
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",