unoverse 0.1.157 → 0.1.159

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);
@@ -4,8 +4,8 @@
4
4
  # Printed by the npm CLI when you are standing in a universe folder. It lists what you
5
5
  # can do to a universe, and nothing else. Commands that still exist but are not for
6
6
  # day-to-day operating (ground, dev, build) are deliberately absent: a list you can read
7
- # in one glance is worth more than a complete one. `publish` is listed under Anywhere:
8
- # it is one verb whose lane the folder decides (a design workspace publishes assets, the
7
+ # in one glance is worth more than a complete one. `deploy` is listed under Anywhere:
8
+ # the target says what ships (studio = this workspace's items; aws/digitalocean = the
9
9
  # platform monorepo root releases the platform — LOCAL_STUDIO.md §Publish is terminal-only).
10
10
 
11
11
  cmd_help() {
@@ -16,8 +16,11 @@ cmd_help() {
16
16
  echo -e " ${BOLD}Anywhere${NC}"
17
17
  echo -e " ${GREEN}create${NC} Start something new, here"
18
18
  echo -e " ${GREEN}studio${NC} Author components, nodes, agent skills"
19
- echo -e " ${GREEN}publish${NC} Ship your work ${DIM}(run it in your design workspace; signs you in if needed)${NC}"
20
- echo -e " ${GREEN}login${NC} Sign in to a universe ${DIM}(publish asks by itself; this is for up front)${NC}"
19
+ echo -e " ${GREEN}deploy${NC} Ship it"
20
+ echo -e " ${DIM}deploy studio your components, nodes and skills your universe${NC}"
21
+ echo -e " ${DIM}deploy aws your universe → AWS${NC}"
22
+ echo -e " ${DIM}deploy digitalocean your universe → DigitalOcean${NC}"
23
+ echo -e " ${GREEN}login${NC} Sign in to a universe ${DIM}(deploy asks by itself; this is for up front)${NC}"
21
24
  echo -e " ${GREEN}where${NC} Links to your universe ${DIM}(Canvas, API), checked live${NC}"
22
25
  echo -e " ${GREEN}update${NC} Update this CLI"
23
26
  echo ""
@@ -32,8 +35,7 @@ cmd_help() {
32
35
  # SHOW THE COMMAND, not a description of it. "aws or digitalocean" told a reader the
33
36
  # clouds exist without telling them what to type, so the shape of the command still had
34
37
  # to be guessed. Print the line they will actually run.
35
- echo -e " ${GREEN}deploy${NC} Ship it to a server ${DIM}(first run asks which cloud)${NC}"
36
- echo -e " ${DIM}unoverse deploy aws · unoverse deploy digitalocean${NC}"
38
+ echo -e " ${GREEN}deploy${NC} Ship it to a server ${DIM}(deploy aws · deploy digitalocean; first run asks which cloud)${NC}"
37
39
  echo -e " ${GREEN}destroy${NC} Take it down ${DIM}(shows what goes, and what stays)${NC}"
38
40
  echo -e " ${DIM}unoverse destroy aws · unoverse destroy digitalocean${NC}"
39
41
  echo -e " ${GREEN}db-allow${NC} Let this machine reach the database ${DIM}(run it when you change network)${NC}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.157",
3
+ "version": "0.1.159",
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",