usecloudy 0.3.0 → 0.3.2

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.
Files changed (2) hide show
  1. package/dist/index.js +60 -32
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6467,7 +6467,7 @@ const mergeSpaceOutput = object({
6467
6467
  object({
6468
6468
  workspace: workspaceSlugSchema,
6469
6469
  name: string().min(1).max(100),
6470
- visibility: visibilitySchema.default("public"),
6470
+ visibility: visibilitySchema.default("members"),
6471
6471
  /** List it in this folder of the workspace (folderSchema.id); omitted: the top level. */
6472
6472
  folderId: string().max(64).optional()
6473
6473
  });
@@ -6767,6 +6767,7 @@ const commentSchema = object({
6767
6767
  resolvedAt: number$1().nullable(),
6768
6768
  resolvedBy: userSchema.nullable(),
6769
6769
  resolvedVia: string().nullable(),
6770
+ resolvedVersion: number$1().nullable().default(null),
6770
6771
  editedAt: number$1().nullable(),
6771
6772
  editedBy: userSchema.nullable(),
6772
6773
  editedVia: string().nullable(),
@@ -12780,8 +12781,12 @@ function commentsUrl(shareUrl) {
12780
12781
  */
12781
12782
  function linkLines(space, prefix) {
12782
12783
  const share = space.shareUrl && prefix ? space.shareUrl + prefix : space.shareUrl;
12783
- if (share) return [`Page: ${share}`, `With comments: ${commentsUrl(share)}`];
12784
- return [`Link: ${prefix ? `${space.url}/${prefix}index.html` : space.url}`, `Private: only members of the ${space.workspace.slug} workspace can open it. To make it public, change visibility in the space settings on the website.`];
12784
+ if (share) return [
12785
+ `Page: ${share}`,
12786
+ `With comments: ${commentsUrl(share)}`,
12787
+ `Public: anyone with the link can open it. To make it private: cloudy settings --space ${space.id} --visibility private`
12788
+ ];
12789
+ return [`Link: ${prefix ? `${space.url}/${prefix}index.html` : space.url}`, `Private: only members of the ${space.workspace.slug} workspace can open it. To make it public: cloudy settings --space ${space.id} --visibility public (space admins), or the space's Settings on the website.`];
12785
12790
  }
12786
12791
  /** A local, relative reference, or null for absolute URLs, data:, anchors, etc. Drops ?query and #hash. */
12787
12792
  function localRef(raw) {
@@ -13043,7 +13048,7 @@ function tokenSpace(token) {
13043
13048
  //#endregion
13044
13049
  //#region src/version.ts
13045
13050
  /** This CLI's version, from package.json at build time (tsdown.config.ts). Unbuilt (tests, tsx): "0.0.0-dev". */
13046
- const VERSION = "0.3.0";
13051
+ const VERSION = "0.3.2";
13047
13052
  /**
13048
13053
  * Sent on every API request, so the API can tell which CLI version is calling (and one day tell an old one to
13049
13054
  * upgrade). Without it Node sends just "node", which is what 0.2.2 and older send. The sign-in page shows it too.
@@ -14307,6 +14312,17 @@ const SETTINGS = [
14307
14312
  get: (s) => s.guestComments
14308
14313
  }
14309
14314
  ];
14315
+ /**
14316
+ * `--visibility`: who can open the space. private (members of its workspace) or public (anyone with the link); the
14317
+ * API calls private "members", and members stays an alias, as in `gh repo edit --visibility`.
14318
+ */
14319
+ const VISIBILITY_OPTION = "--visibility <private|public>";
14320
+ function visibilityOf(value) {
14321
+ const v = value.trim().toLowerCase();
14322
+ if (v === "private" || v === "members") return "members";
14323
+ if (v === "public") return "public";
14324
+ throw new CliError(`--visibility takes private or public, not ${value}.`);
14325
+ }
14310
14326
  function onOff(value, option) {
14311
14327
  const v = value.trim().toLowerCase();
14312
14328
  if (v === "on" || v === "true" || v === "yes") return true;
@@ -14316,6 +14332,7 @@ function onOff(value, option) {
14316
14332
  /** The PATCH /v1/spaces/:id body for the flags given; null when there are none. */
14317
14333
  function settingsPatch(opts) {
14318
14334
  const patch = {};
14335
+ if (opts.visibility !== void 0) patch.visibility = visibilityOf(opts.visibility);
14319
14336
  for (const s of SETTINGS) {
14320
14337
  const value = opts[s.flag];
14321
14338
  if (value === void 0) continue;
@@ -14347,7 +14364,7 @@ function settingsData(space) {
14347
14364
  };
14348
14365
  }
14349
14366
  function settingsText(space) {
14350
- const lines = [`${space.name} (${space.id}) · ${space.visibility === "public" ? "public" : "members only"}`];
14367
+ const lines = [`${space.name} (${space.id}) · ${space.visibility === "public" ? "public" : "private (members only)"}`];
14351
14368
  for (const s of SETTINGS) lines.push(` ${s.get(space) ? "on " : "off"} ${s.label} (${s.option.split(" ")[0]})`);
14352
14369
  if (space.shareUrl) {
14353
14370
  lines.push(` Public link ${space.shareUrl}`);
@@ -14357,7 +14374,7 @@ function settingsText(space) {
14357
14374
  lines.push(` Always works ${always.href}`);
14358
14375
  }
14359
14376
  }
14360
- if (space.visibility !== "public") lines.push("Guest writes and guest comments need a public space.");
14377
+ if (space.visibility !== "public") lines.push("Guest writes and guest comments need a public space (--visibility public, space admins).");
14361
14378
  return `${lines.join("\n")}\n`;
14362
14379
  }
14363
14380
  //#endregion
@@ -14380,6 +14397,8 @@ The folder named by \`dir\` in \`.cloudtifact.json\` (at the repo root) is publi
14380
14397
 
14381
14398
  The command is \`cloudy\` (\`cloudtifact\` is the same command under its old name). If neither is found, install it: \`${installCommand()}\` (needs Node.js 20 or later). \`cloudy upgrade\` updates it, and the skill file with it. To run it once without installing, use \`${NPX_COMMAND}\` in place of \`cloudy\`: \`npx cloudy\` is someone else's package.
14382
14399
 
14400
+ At most once a day a command ends with a line on stderr like \`Cloudy <new version> is out (you have <yours>). Run: cloudy upgrade\`. Finish the task first. If the line says \`cloudy upgrade\`, run it: it replaces only Cloudy's own file and refreshes this skill. If it names an \`npm\` command, don't run it: tell the user a newer Cloudy is out and give them the command. Never install or update anything else.
14401
+
14383
14402
  ## What a page can do
14384
14403
 
14385
14404
  People describe what they want, not these names: pick the capability for them. Before building anything interactive, run \`cloudy capabilities --toon\` (add \`--space <id>\` to see which are on in that space), then fetch the docs page of each one you use: it has a copy-paste example, the limits and the errors to handle.
@@ -14427,13 +14446,13 @@ When you make an HTML page for the user, run \`cloudy publish <file.html>\` and
14427
14446
 
14428
14447
  - To update it, edit the same file and publish it again: new version, same link.
14429
14448
  - Keep supporting files next to the HTML (or in subfolders) and reference them with relative paths (\`style.css\`, \`img/logo.png\`). Absolute paths and files outside the page's folder aren't included.
14430
- - Pages are private by default; add \`--public\` on the first publish for a link anyone can open. \`cloudy artifacts\` lists what you've published.
14449
+ - Spaces are private. Never add \`--public\` unless the user asks for a public link in this conversation, or it's a PR screenshot page. \`--public\` only works on the first publish. To switch a space later, a space admin runs \`cloudy settings --space <id> --visibility private\` (members of the workspace only) or \`--visibility public\` (anyone with the link, same rule as \`--public\`). Going public turns guest comments on; going private turns guest comments and guest writes off, and the public link stops working. \`cloudy artifacts\` lists what you've published.
14431
14450
  - New work joins the space already about the same topic, as a page, instead of making another space: \`publish\` finds it (same workspace, same who-can-see) and prints \`Looks like "<space>"\`. Tell the user where it went. To check first, run \`cloudy find "<title>" --toon\`; \`--add-to <id>\` adds the page to a space you pick, \`--new\` makes a separate space when the user wants one.
14432
14451
  - A page that stores something needs the space to allow it: read "What a space can't do" first.
14433
14452
 
14434
14453
  ## Copying a page someone sent you
14435
14454
 
14436
- When the user is sent a Cloudy link and wants their own copy, run \`cloudy copy <url>\`. It publishes the files into a new space in their workspace and prints the new link. Add \`--public\` if they want anyone to open it. \`-o <dir>\` also writes the files locally; \`--no-publish -o <dir>\` writes them without making a space.
14455
+ When the user is sent a Cloudy link and wants their own copy, run \`cloudy copy <url>\`. It publishes the files into a new space in their workspace and prints the new link. It's private; add \`--public\` only if the user asks for a link anyone can open. \`-o <dir>\` also writes the files locally; \`--no-publish -o <dir>\` writes them without making a space.
14437
14456
 
14438
14457
  ## Space files
14439
14458
 
@@ -14476,7 +14495,7 @@ Put the SQL a page needs in \`db/NNN_name.sql\` files next to it (the page's fol
14476
14495
 
14477
14496
  ## Guest writes
14478
14497
 
14479
- For visitors who aren't signed in to add data (a sign-up sheet, a vote, feedback, a high score), the page runs named writes you publish, never its own SQL. The space must be public, and an admin turns on "Pages can save data for people who are not signed in": in the space's Settings, or \`cloudy settings --guest-writes on\` (admins only). If the pages shouldn't show what guests saved (answers, sign-ups), also turn off "Pages can show saved data" (\`--pages-show-data off\`) first. \`cloudy settings\` shows both. \`cloudy settings --link homeideas\` sets the public link (\`--link off\` clears it). Ask the user before you turn guest writes on.
14498
+ For visitors who aren't signed in to add data (a sign-up sheet, a vote, feedback, a high score), the page runs named writes you publish, never its own SQL. The space must be public (ask the user first: spaces are private), and an admin turns on "Pages can save data for people who are not signed in": in the space's Settings, or \`cloudy settings --guest-writes on\` (admins only). If the pages shouldn't show what guests saved (answers, sign-ups), also turn off "Pages can show saved data" (\`--pages-show-data off\`) first. \`cloudy settings\` shows both. \`cloudy settings --link homeideas\` sets the public link (\`--link off\` clears it). Ask the user before you turn guest writes on.
14480
14499
 
14481
14500
  - Put the statements in \`db/guest-writes.sql\` next to the page: \`-- name: vote\` on its own line, then exactly one INSERT, UPDATE or DELETE. \`?\` placeholders take the page's params; \`$guest\` is the name the visitor gave and \`$guest_id\` a stable id for their browser, both filled in by the server. Publish and push upload the whole set (replacing the old one) after the migrations; \`cloudy db guest-writes\` shows what's live.
14482
14501
  - In the page: \`await window.cloudtifact.guest.set(name)\` once (it remembers the name), then \`await window.cloudtifact.db.run("vote", [choice])\`. Without a name it rejects with code \`no_guest\`.
@@ -14549,7 +14568,7 @@ async function skillCopies(home, version = VERSION) {
14549
14568
  * somebody edited by hand survives until the CLI changes. `check` reports and writes nothing.
14550
14569
  */
14551
14570
  async function installSkill(home, opts = {}) {
14552
- const version = opts.version ?? "0.3.0";
14571
+ const version = opts.version ?? "0.3.2";
14553
14572
  const markdown = skillMarkdown(version);
14554
14573
  const copies = await skillCopies(home, version);
14555
14574
  const written = [];
@@ -14861,11 +14880,12 @@ async function runUpdateCheck(source, deps = {}) {
14861
14880
  const latest = await fetchLatest(source);
14862
14881
  const before = await readUpdateCache(env);
14863
14882
  await writeUpdateCache({
14883
+ ...before,
14864
14884
  checkedAt: deps.now ?? Date.now(),
14865
14885
  source,
14866
14886
  ...latest ? { latest } : before?.latest ? { latest: before.latest } : {}
14867
14887
  }, env);
14868
- await refreshSkillCopies(homeDir(env), deps.version ?? "0.3.0");
14888
+ await refreshSkillCopies(homeDir(env), deps.version ?? "0.3.2");
14869
14889
  }
14870
14890
  /** Starts the check in a detached process that outlives this one and is never waited for. */
14871
14891
  function spawnUpdateCheck(entry, source) {
@@ -14882,10 +14902,13 @@ function spawnUpdateCheck(entry, source) {
14882
14902
  child.unref();
14883
14903
  }
14884
14904
  const truthy = (v) => !!v && v !== "0" && v.toLowerCase() !== "false";
14885
- /** Why there's no notice: --json/--toon, piped output, CI, the opt-out, or a build without a version. */
14905
+ /**
14906
+ * Why there's no notice: CI, the opt-outs, `upgrade` (it just did), the agent hook (nobody reads its stderr, and it
14907
+ * would use up the agent's daily line), or a build without a version.
14908
+ */
14886
14909
  function updateNoticeOff(opts) {
14887
14910
  const { env } = opts;
14888
- return truthy(env.CLOUDTIFACT_NO_UPDATE_NOTIFIER) || truthy(env.NO_UPDATE_NOTIFIER) || truthy(env.CI) || !opts.tty || opts.format !== "text" || opts.command === "upgrade" || opts.current.startsWith("0.0.0");
14911
+ return truthy(env.CLOUDTIFACT_NO_UPDATE_NOTIFIER) || truthy(env.NO_UPDATE_NOTIFIER) || truthy(env.CI) || opts.command === "upgrade" || opts.command === "hook" || opts.current.startsWith("0.0.0");
14889
14912
  }
14890
14913
  function updateNoticeLine(latest, current, source) {
14891
14914
  return `Cloudy ${latest} is out (you have ${current}). Run: ${source === "curl" ? "cloudy upgrade" : npmUpgradeCommand()}`;
@@ -14899,15 +14922,17 @@ async function updateNotice(deps) {
14899
14922
  const now = deps.now ?? Date.now();
14900
14923
  const cache = await readUpdateCache(env);
14901
14924
  const mine = cache?.source === deps.source ? cache : null;
14902
- if (!mine || now - mine.checkedAt >= DAY || now < mine.checkedAt) {
14903
- await writeUpdateCache({
14904
- checkedAt: now,
14905
- source: deps.source,
14906
- ...mine?.latest ? { latest: mine.latest } : {}
14907
- }, env);
14908
- deps.check();
14909
- }
14910
- return mine?.latest && isNewer(mine.latest, deps.current) ? updateNoticeLine(mine.latest, deps.current, deps.source) : null;
14925
+ const stale = (at) => at === void 0 || now - at >= DAY || now < at;
14926
+ const due = !mine || stale(mine.checkedAt);
14927
+ const tell = !!mine?.latest && isNewer(mine.latest, deps.current) && (!deps.daily || stale(mine?.toldAt));
14928
+ if (due || tell && deps.daily) await writeUpdateCache({
14929
+ ...mine,
14930
+ checkedAt: due ? now : mine?.checkedAt ?? now,
14931
+ source: deps.source,
14932
+ ...tell && deps.daily ? { toldAt: now } : {}
14933
+ }, env);
14934
+ if (due) deps.check();
14935
+ return tell && mine?.latest ? updateNoticeLine(mine.latest, deps.current, deps.source) : null;
14911
14936
  }
14912
14937
  //#endregion
14913
14938
  //#region src/uploads.ts
@@ -15064,16 +15089,15 @@ const program = new Command().name("cloudy").description("Publish pages and docs
15064
15089
  const tty = !!process.stdout.isTTY && !!process.stderr.isTTY;
15065
15090
  if (updateNoticeOff({
15066
15091
  env: process.env,
15067
- current: "0.3.0",
15068
- format,
15069
- command: cmd.name(),
15070
- tty
15092
+ current: "0.3.2",
15093
+ command: cmd.name()
15071
15094
  })) return;
15072
15095
  const entry = fileURLToPath(import.meta.url);
15073
15096
  const source = isCurlInstall(entry, homeDir()) ? "curl" : "npm";
15074
15097
  const line = await updateNotice({
15075
15098
  current: VERSION,
15076
15099
  source,
15100
+ daily: !tty || format !== "text",
15077
15101
  check: () => spawnUpdateCheck(entry, source)
15078
15102
  });
15079
15103
  if (line) console.error(line);
@@ -15302,7 +15326,11 @@ async function workspaceForNewSpace(client, flag, saved) {
15302
15326
  if (cur.note) console.error(`note: ${cur.note}`);
15303
15327
  return cur;
15304
15328
  }
15305
- program.command("init").description("Link this repo to a space (creating one in the current workspace if needed) and write .cloudtifact.json").option("--dir <dir>", "folder to publish, relative to the repo root").option("--workspace <slug>", "workspace for a new space (default: the current one, see `workspace list`)").addOption(new Option("--visibility <v>", "who can view a new space (default: members)").choices(["public", "members"])).option("--space <id>", "link an existing space (id or link) instead of creating one").option("--name <name>", "name for a new space (default: the repo folder name)").option("-y, --yes", "accept defaults, no prompts").option("--hooks", "also install agent hooks (see `hooks install`)").action(run(async (opts) => {
15329
+ program.command("init").description("Link this repo to a space (creating one in the current workspace if needed) and write .cloudtifact.json").option("--dir <dir>", "folder to publish, relative to the repo root").option("--workspace <slug>", "workspace for a new space (default: the current one, see `workspace list`)").addOption(new Option("--visibility <v>", "who can view a new space (default: private)").choices([
15330
+ "private",
15331
+ "public",
15332
+ "members"
15333
+ ])).option("--space <id>", "link an existing space (id or link) instead of creating one").option("--name <name>", "name for a new space (default: the repo folder name)").option("-y, --yes", "accept defaults, no prompts").option("--hooks", "also install agent hooks (see `hooks install`)").action(run(async (opts) => {
15306
15334
  const { client, config } = await getClient();
15307
15335
  const root = findInitRoot();
15308
15336
  const configFile = path.join(root, REPO_CONFIG_FILE);
@@ -15325,8 +15353,8 @@ program.command("init").description("Link this repo to a space (creating one in
15325
15353
  } else {
15326
15354
  const cur = await workspaceForNewSpace(client, opts.workspace, config.workspace);
15327
15355
  console.log(workspaceLine(cur));
15328
- let visibility = opts.visibility;
15329
- if (!visibility && prompt) visibility = await choose("Who can view it?", ["anyone with the link", `members of ${cur.workspace.slug} only`]) ? "members" : "public";
15356
+ let visibility = opts.visibility ? visibilityOf(opts.visibility) : void 0;
15357
+ if (!visibility && prompt) visibility = await choose("Who can view it?", [`members of ${cur.workspace.slug} only`, "anyone with the link"]) ? "public" : "members";
15330
15358
  const defaultName = path.basename(root);
15331
15359
  const name = opts.name ?? (prompt ? await ask("Space name:", defaultName) : defaultName);
15332
15360
  space = await client.createSpace({
@@ -15581,7 +15609,7 @@ for (const [name, verb] of [["resolve", "Resolved"], ["unresolve", "Reopened"]])
15581
15609
  const c = await (name === "resolve" ? client.resolveComment(commentId) : client.unresolveComment(commentId));
15582
15610
  console.log(`${verb} ${c.id} on ${c.path}.`);
15583
15611
  }));
15584
- program.command("publish").description("Publish an HTML page (with the files it references) or a folder; prints its link").argument("<path>", "an .html file or a folder with index.html").option("--public", "anyone with the link can view (only when first published; default: private)").option("--name <name>", "space name (default: the page's <title>, else the file name)").option("--workspace <slug>", "workspace for a new space (default: the current one, see `workspace list`)").option("--space <id>", "publish as this existing space's main page (id or link), replacing its files").option("--add-to <id>", "add it as a page in this existing space (id or link), keeping the space's other pages").option("--new", "make a new space, even when an existing one looks like the same topic").option("--folder <path>", "file a new space in this folder, like \"Deals/Enterprise\" (see `cloudy folders`)").option("--project <name>", "the project this work belongs to (default: the git repo it's in)").option("--entry <file>", "folder only: the page to publish as index.html").option("-m, --message <message>", "version message").option("--no-db", "don't run the db/*.sql files next to the page").option("--strict", "make a page the space can't back an error, so nothing is published").action(run(async (target, opts) => {
15612
+ program.command("publish").description("Publish an HTML page (with the files it references) or a folder; prints its link").argument("<path>", "an .html file or a folder with index.html").option("--public", "anyone with the link can view (only when first published; default: private). Agents: only when the user asks").option("--name <name>", "space name (default: the page's <title>, else the file name)").option("--workspace <slug>", "workspace for a new space (default: the current one, see `workspace list`)").option("--space <id>", "publish as this existing space's main page (id or link), replacing its files").option("--add-to <id>", "add it as a page in this existing space (id or link), keeping the space's other pages").option("--new", "make a new space, even when an existing one looks like the same topic").option("--folder <path>", "file a new space in this folder, like \"Deals/Enterprise\" (see `cloudy folders`)").option("--project <name>", "the project this work belongs to (default: the git repo it's in)").option("--entry <file>", "folder only: the page to publish as index.html").option("-m, --message <message>", "version message").option("--no-db", "don't run the db/*.sql files next to the page").option("--strict", "make a page the space can't back an error, so nothing is published").action(run(async (target, opts) => {
15585
15613
  if (opts.space && opts.addTo) throw new CliError("Pass --space or --add-to, not both.");
15586
15614
  if ((opts.space || opts.addTo) && opts.new) throw new CliError("--new makes a new space; drop --space/--add-to.");
15587
15615
  const abs = path.resolve(target);
@@ -15697,7 +15725,7 @@ program.command("publish").description("Publish an HTML page (with the files it
15697
15725
  else console.log(`No changes since v${space.latestVersion}: "${space.name}"`);
15698
15726
  for (const line of linkLines(space, prefix)) console.log(line);
15699
15727
  }));
15700
- program.command("copy").description("Make your own copy of a Cloudy page someone sent you: a new space in your workspace").argument("<url>", "a Cloudy page link, space id, or public link").option("--at <n>", "the version to copy (default: the one in the URL, else latest)").option("--name <name>", "name for the new space (default: the original's name)").option("--workspace <slug>", "workspace for the new space (default: the current one, see `workspace list`)").option("--public", "anyone with the link can view (default: private)").option("-o, --output <dir>", "also write the files into this folder").option("--force", "overwrite files in -o").option("--no-publish", "write files with -o and don't make a new space").option("-m, --message <message>", "version message on the new space").option("--strict", "make a page the space can't back an error, so nothing is published").option("--toon", "print TOON (compact, for agents)").option("--json", "print JSON").action(run(async (url, opts) => {
15728
+ program.command("copy").description("Make your own copy of a Cloudy page someone sent you: a new space in your workspace").argument("<url>", "a Cloudy page link, space id, or public link").option("--at <n>", "the version to copy (default: the one in the URL, else latest)").option("--name <name>", "name for the new space (default: the original's name)").option("--workspace <slug>", "workspace for the new space (default: the current one, see `workspace list`)").option("--public", "anyone with the link can view (default: private). Agents: only when the user asks").option("-o, --output <dir>", "also write the files into this folder").option("--force", "overwrite files in -o").option("--no-publish", "write files with -o and don't make a new space").option("-m, --message <message>", "version message on the new space").option("--strict", "make a page the space can't back an error, so nothing is published").option("--toon", "print TOON (compact, for agents)").option("--json", "print JSON").action(run(async (url, opts) => {
15701
15729
  const publish = opts.publish !== false;
15702
15730
  if (!publish && !opts.output) throw new CliError("--no-publish needs -o <dir> to write the files.");
15703
15731
  if (opts.force && !opts.output) throw new CliError("--force only applies with -o.");
@@ -15834,7 +15862,7 @@ program.command("versions").description("List a space's versions, newest first")
15834
15862
  if (!rows.length) return console.log("Nothing pushed yet.");
15835
15863
  for (const v of rows) console.log(`v${v.version} ${v.at} UTC ${byPerson(`@${v.by}`, v.via)}${v.project ? ` · ${v.project}` : ""} +${v.added} ~${v.changed} -${v.removed}${v.message ? ` ${v.message}` : ""}`);
15836
15864
  }));
15837
- program.command("settings").description("Show a space's guest and visitor switches, or flip them (space admins; the same switches as in the app)").option("--space <id>", "space id, public link, or copied URL (default: the first target in .cloudtifact.json)").option(SETTINGS[0].option, SETTINGS[0].label).option(SETTINGS[1].option, `${SETTINGS[1].label} (off keeps the database private from visitors)`).option(SETTINGS[2].option, SETTINGS[2].label).option("--link <name>", "set the public link (letters and numbers, or off to clear it)").option("--toon", "print TOON (compact, for agents)").option("--json", "print JSON").action(run(async (opts) => {
15865
+ program.command("settings").description("Show who can open a space and its guest and visitor switches, or change them (space admins; the same switches as in the app)").option("--space <id>", "space id, public link, or copied URL (default: the first target in .cloudtifact.json)").option(VISIBILITY_OPTION, "who can open it: private (only members of its workspace; members also works) or public (anyone with the link). Going public turns guest comments on; going private turns guest comments and guest writes off").option(SETTINGS[0].option, SETTINGS[0].label).option(SETTINGS[1].option, `${SETTINGS[1].label} (off keeps the database private from visitors)`).option(SETTINGS[2].option, SETTINGS[2].label).option("--link <name>", "set the public link (letters and numbers, or off to clear it)").option("--toon", "print TOON (compact, for agents)").option("--json", "print JSON").action(run(async (opts) => {
15838
15866
  const { spaceId } = await pickSpace(opts.space);
15839
15867
  const patch = settingsPatch(opts);
15840
15868
  const { client } = await getClient();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "usecloudy",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Publish pages and docs to Cloudy as links people comment on, with every version kept and the comments handed back to your agent.",
5
5
  "license": "MIT",
6
6
  "author": "The Cloudy authors",