@dench.com/cli 3.8.0-staging.389 → 3.8.2-staging.391

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/meetings.ts CHANGED
@@ -721,7 +721,11 @@ async function runImport(ctx: CrmCliContext): Promise<void> {
721
721
  // ── help ───────────────────────────────────────────────────────────────────
722
722
 
723
723
  function meetingsHelp(): void {
724
- console.log(`Usage: dench meetings <subcommand>
724
+ console.log(meetingsHelpText());
725
+ }
726
+
727
+ export function meetingsHelpText(): string {
728
+ return `Usage: dench meetings <subcommand>
725
729
 
726
730
  A meeting is an ordinary CRM record on the protected \`meeting\` object —
727
731
  create, update and delete it with \`dench crm entries … meeting\`, query it
@@ -778,5 +782,5 @@ Import many calls at once:
778
782
  created/updated meeting gets its transcript, items and attendees.
779
783
  Run it as a signed-in member: meetings are owner-scoped records.
780
784
 
781
- Read public/references/CRM-IMPORT.md ("Importing meetings") before a bulk import.`);
785
+ Read public/references/CRM-IMPORT.md ("Importing meetings") before a bulk import.`;
782
786
  }
package/members.ts CHANGED
@@ -440,7 +440,11 @@ async function callQuery(
440
440
  }
441
441
 
442
442
  function membersHelp(): void {
443
- console.log(`Usage: dench members <subcommand>
443
+ console.log(membersHelpText());
444
+ }
445
+
446
+ export function membersHelpText(): string {
447
+ return `Usage: dench members <subcommand>
444
448
 
445
449
  Workspace members for the active organization. Use these userIds when
446
450
  assigning CRM \`user\`-type cells (e.g. \`Owner\`, \`Assignee\`) so the
@@ -483,5 +487,5 @@ The server best-effort-resolves a name / email passed to a \`user\`
483
487
  field when the match against the roster is unique, but the explicit
484
488
  lookup via \`dench members list\` is the correct pattern. Unknown field
485
489
  names are rejected on write (pass --allow-unknown to bypass).
486
- `);
490
+ `;
487
491
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dench.com/cli",
3
- "version": "3.8.0-staging.389",
3
+ "version": "3.8.2-staging.391",
4
4
  "description": "Dench agent workspace CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/search.ts CHANGED
@@ -519,7 +519,11 @@ async function runAnswerSubcommand(ctx: SearchCliContext): Promise<void> {
519
519
  }
520
520
 
521
521
  function searchHelp(): void {
522
- console.log(`Usage: dench search <subcommand>
522
+ console.log(searchHelpText());
523
+ }
524
+
525
+ export function searchHelpText(): string {
526
+ return `Usage: dench search <subcommand>
523
527
 
524
528
  Live web access through the Dench Cloud Gateway. Auths
525
529
  with DENCH_API_KEY or the active \`dench signin\` agent session. Agent
@@ -566,7 +570,7 @@ Environment variables:
566
570
  DENCH_HOST If it points at localhost, defaults to
567
571
  http://localhost:8787 instead of production.
568
572
 
569
- Exit codes: 0 success, non-zero on gateway / network errors.`);
573
+ Exit codes: 0 success, non-zero on gateway / network errors.`;
570
574
  }
571
575
 
572
576
  // ────────────────────────────────────────────────────────────────────────────
package/tools.ts CHANGED
@@ -1402,8 +1402,8 @@ function redactForDisplay(value: unknown, key?: string): unknown {
1402
1402
  // Help text
1403
1403
  // ---------------------------------------------------------------------------
1404
1404
 
1405
- export function toolHelp() {
1406
- console.log(`Dench tool commands
1405
+ export function toolHelpText(): string {
1406
+ return `Dench tool commands
1407
1407
 
1408
1408
  Usage:
1409
1409
  dench integrations [--json]
@@ -1436,10 +1436,14 @@ Notes:
1436
1436
  LinkedIn tools are QUEUED, not run inline, so account-safety pacing (daily
1437
1437
  caps, working hours, spacing) applies. They return an action_id — poll it with
1438
1438
  LINKEDIN_GET_ACTION_STATUS.
1439
- dench tool connect prints the OAuth redirect URL for the human to open.
1440
- dench tool run output is redacted for display; pass --json for raw output.
1439
+ \`dench tool connect\` prints the OAuth redirect URL for the human to open.
1440
+ \`dench tool run\` output is redacted for display; pass --json for raw output.
1441
1441
  Override the gateway base with DENCH_GATEWAY_URL or GATEWAY_URL.
1442
- `);
1442
+ `;
1443
+ }
1444
+
1445
+ export function toolHelp() {
1446
+ console.log(toolHelpText());
1443
1447
  }
1444
1448
 
1445
1449
  // ---------------------------------------------------------------------------
package/web.ts CHANGED
@@ -20,7 +20,10 @@ class WebCliError extends Error {}
20
20
  const CRAWL_DEFAULT_PAGES = 15;
21
21
  const CRAWL_MAX_PAGES = 50;
22
22
 
23
- function parsePositiveInt(name: string, raw: string | undefined): number | undefined {
23
+ function parsePositiveInt(
24
+ name: string,
25
+ raw: string | undefined,
26
+ ): number | undefined {
24
27
  if (raw === undefined) return undefined;
25
28
  const parsed = Number(raw);
26
29
  if (!Number.isFinite(parsed) || parsed <= 0) {
@@ -125,7 +128,11 @@ function formatMarkdown(data: unknown): string {
125
128
  }
126
129
 
127
130
  export function webHelp(): void {
128
- console.log(`Dench web
131
+ console.log(webHelpText());
132
+ }
133
+
134
+ export function webHelpText(): string {
135
+ return `Dench web
129
136
 
130
137
  Read pages, brand kits, sitemaps, screenshots, and structured extracts
131
138
  through the Dench gateway. Prefer these over writing your own scraper.
@@ -145,7 +152,7 @@ through the Dench gateway. Prefer these over writing your own scraper.
145
152
 
146
153
  Crawl defaults to 15 pages and is hard-capped at 50. Search stays on
147
154
  \`dench search\`. \`dench context\` is workspace orientation, not this.
148
- `);
155
+ `;
149
156
  }
150
157
 
151
158
  async function runWebSubcommand(ctx: WebCliContext): Promise<void> {
@@ -199,7 +206,9 @@ async function runWebSubcommand(ctx: WebCliContext): Promise<void> {
199
206
  assertNoUnknownFlags(rest, "web sitemap");
200
207
  const domain = rest[0];
201
208
  if (!domain) {
202
- throw new WebCliError("Usage: dench web sitemap <domain> [--limit N] [--json]");
209
+ throw new WebCliError(
210
+ "Usage: dench web sitemap <domain> [--limit N] [--json]",
211
+ );
203
212
  }
204
213
  const data = await callWebOp(ctx, "web-sitemap", {
205
214
  domain,
@@ -246,7 +255,11 @@ async function runWebSubcommand(ctx: WebCliContext): Promise<void> {
246
255
  fullScreenshot: fullPage,
247
256
  });
248
257
  const record = asRecord(data);
249
- out(ctx, data, asString(record?.screenshot) ?? JSON.stringify(data, null, 2));
258
+ out(
259
+ ctx,
260
+ data,
261
+ asString(record?.screenshot) ?? JSON.stringify(data, null, 2),
262
+ );
250
263
  return;
251
264
  }
252
265
 
@@ -310,7 +323,8 @@ async function runWebSubcommand(ctx: WebCliContext): Promise<void> {
310
323
  if (sub === "fonts") {
311
324
  assertNoUnknownFlags(rest, "web fonts");
312
325
  const domain = rest[0];
313
- if (!domain) throw new WebCliError("Usage: dench web fonts <domain> [--json]");
326
+ if (!domain)
327
+ throw new WebCliError("Usage: dench web fonts <domain> [--json]");
314
328
  const data = await callWebOp(ctx, "brand-fonts", { domain });
315
329
  out(ctx, data, JSON.stringify(data, null, 2));
316
330
  return;