@letterstory/cli 0.128.2 → 0.128.3

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/lib/cli.mjs CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  } from "./commands.mjs";
63
63
 
64
64
  // Keep in sync with cli/package.json.
65
- export const VERSION = "0.128.2";
65
+ export const VERSION = "0.128.3";
66
66
 
67
67
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
68
68
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -97,7 +97,12 @@ async function visitsList(ctx) {
97
97
  const { flags, io } = ctx;
98
98
  const result = await call(ctx, "visitors_get_agent_visits");
99
99
  printResult(io, flags, result, (r) => {
100
- const lines = [`${r.total} agent visits since ${r.since} (${r.verified} verified)`];
100
+ const verified = r.verified !== null && r.verified !== undefined ? ` (${r.verified} verified)` : "";
101
+ const lines = [`${r.total} agent visits since ${r.since}${verified}`];
102
+ if (r.source === "visitors" && r.baseline)
103
+ lines.push(
104
+ `Counted from ${r.baseline}, the site's move to its current traffic source${r.lettervisit_verified !== null ? `; LetterVisit verified ${r.lettervisit_verified} since then` : ""}.`
105
+ );
101
106
  const why = Object.entries(r.by_purpose ?? {})
102
107
  .filter(([, n]) => n > 0)
103
108
  .map(([p, n]) => `${PURPOSE_LABELS[p] ?? p} ${n}`);
@@ -105,7 +110,9 @@ async function visitsList(ctx) {
105
110
  if (r.agents?.length) {
106
111
  lines.push("", "Agents:");
107
112
  for (const a of r.agents)
108
- lines.push(` ${a.agent.padEnd(14)} ${String(a.total).padStart(6)} (${a.verified} verified)`);
113
+ lines.push(
114
+ ` ${a.agent.padEnd(22)} ${String(a.total).padStart(6)}${a.verified !== null && a.verified !== undefined ? ` (${a.verified} verified)` : ""}`
115
+ );
109
116
  }
110
117
  if (r.top_paths?.length) {
111
118
  lines.push("", "Most read:");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.128.2",
3
+ "version": "0.128.3",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",