mirrorbook 0.5.0 → 0.6.0

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 (3) hide show
  1. package/SKILL.md +1 -1
  2. package/dist/cli.js +7 -5
  3. package/package.json +9 -8
package/SKILL.md CHANGED
@@ -42,4 +42,4 @@ The copy only appears on password-protected sites — setting it on a site with
42
42
 
43
43
  Install this skill for Claude Code with `npx mirrorbook skill --install` (or `--dir ./.claude/skills` for one project); `mirrorbook skill` prints it.
44
44
 
45
- Other commands: `pull <slug> [version] [-o file.zip]` (download a version's files as a zip; owner only, defaults to the live version), `access <slug>`, `ls`, `status <slug>` (lists versions), `rollback <slug> <version>` (alias `set-default`; version is `3`, `#3`, or a deployment id), `rm-version <slug> <version> --yes`, `rm <slug> --yes`, `whoami`. Add `--json` to any of them.
45
+ Other commands: `pull <slug> [version] [-o file.zip]` (download a version's files as a zip; owner only, defaults to the live version), `access <slug>`, `ls` (shows each entry's kind: `site` or `collection`; collections are curated pages made in the console and can't be deployed to), `status <slug>` (lists versions, or the member sites of a collection), `rollback <slug> <version>` (alias `set-default`; version is `3`, `#3`, or a deployment id), `rm-version <slug> <version> --yes`, `rm <slug> --yes`, `whoami`. Add `--json` to any of them.
package/dist/cli.js CHANGED
@@ -246,7 +246,7 @@ import { fileURLToPath } from "url";
246
246
  // package.json
247
247
  var package_default = {
248
248
  name: "mirrorbook",
249
- version: "0.5.0",
249
+ version: "0.6.0",
250
250
  description: "Publish HTML to a shareable URL. Agent-friendly: non-interactive, --json output, stable exit codes.",
251
251
  type: "module",
252
252
  bin: {
@@ -626,17 +626,19 @@ program.command("access").description("Set or change who can open a site: a pass
626
626
  });
627
627
  program.command("ls").description("List your sites").action(async () => {
628
628
  const { sites } = await (await client()).sites();
629
- out(sites.length ? sites.map((s) => `${s.slug.padEnd(28)} ${(s.activeDeploymentId ? "live" : "not live").padEnd(9)} ${s.url}${s.passwordProtected ? " \u{1F512}" : ""}`).join("\n") : "No sites yet", { sites });
629
+ const state = (s) => s.kind === "collection" ? `${s.itemCount} sites` : s.activeDeploymentId ? "live" : "not live";
630
+ out(sites.length ? sites.map((s) => `${s.slug.padEnd(28)} ${(s.kind === "collection" ? "collection" : "site").padEnd(11)} ${state(s).padEnd(9)} ${s.url}${s.passwordProtected ? " \u{1F512}" : ""}`).join("\n") : "No sites yet", { sites });
630
631
  });
631
632
  program.command("status").description("Show a site and its recent versions").argument("<slug>").action(async (slug) => {
632
- const { site, deployments } = await (await client()).site(slug);
633
- const lines = [`${site.slug} ${site.url} (${site.status}, ${site.views} views, ${accessLine(site)})`];
633
+ const { site, deployments, items } = await (await client()).site(slug);
634
+ const lines = [`${site.slug} ${site.url} (${site.status}, ${site.views} views, ${site.kind === "collection" ? `collection of ${site.itemCount}` : accessLine(site)})`];
635
+ for (const i of items ?? []) lines.push(` - ${i.slug.padEnd(26)} ${i.url}`);
634
636
  if (site.requestedSlug && site.requestedSlug !== site.slug) lines.push(` requested as: ${site.requestedSlug}`);
635
637
  for (const d of deployments.slice(0, 20)) {
636
638
  const mark = d.id === site.activeDeploymentId ? "\u25CF" : " ";
637
639
  lines.push(` ${mark} #${String(d.number).padEnd(4)} ${d.createdAt.slice(0, 16).replace("T", " ")} ${describe(d, d.id === site.activeDeploymentId).padEnd(26)} ${d.previewUrl}`);
638
640
  }
639
- out(lines.join("\n"), { site, deployments });
641
+ out(lines.join("\n"), { site, deployments, items: items ?? [] });
640
642
  });
641
643
  program.command("wait").description("Block until a deployment finishes processing").argument("<deploymentId>").option("--timeout <sec>", "max seconds to wait", "300").action(async (id, o) => {
642
644
  const { site, deployment } = await waitFor(await client(), id, Number(o.timeout));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mirrorbook",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Publish HTML to a shareable URL. Agent-friendly: non-interactive, --json output, stable exit codes.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,16 +14,17 @@
14
14
  "engines": {
15
15
  "node": ">=20"
16
16
  },
17
+ "scripts": {
18
+ "dev": "tsx src/cli.ts",
19
+ "build": "tsup",
20
+ "typecheck": "tsc -p .",
21
+ "prepack": "tsup"
22
+ },
17
23
  "devDependencies": {
18
- "@mirrorbook/shared": "0.0.0"
24
+ "@mirrorbook/shared": "workspace:*"
19
25
  },
20
26
  "dependencies": {
21
27
  "commander": "^15.0.0",
22
28
  "fflate": "^0.8.3"
23
- },
24
- "scripts": {
25
- "dev": "tsx src/cli.ts",
26
- "build": "tsup",
27
- "typecheck": "tsc -p ."
28
29
  }
29
- }
30
+ }