ticketlens 0.3.0 → 0.3.1

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.
@@ -24,6 +24,7 @@ import {
24
24
  printProfilesHelp, printScheduleHelp,
25
25
  printInitHelp, printSwitchHelp, printConfigHelp,
26
26
  printReviewHelp, printStandupHelp, printUpdateSkillHelp,
27
+ printCollisionsHelp,
27
28
  } from '../skills/jtb/scripts/lib/help.mjs';
28
29
  import { createStyler } from '../skills/jtb/scripts/lib/ansi.mjs';
29
30
  import { readCliToken, saveCliToken, deleteCliToken } from '../skills/jtb/scripts/lib/cli-auth.mjs';
@@ -53,6 +54,7 @@ switch (command) {
53
54
  break;
54
55
 
55
56
  case 'collisions': {
57
+ if (cmdArgs.includes('--help') || cmdArgs.includes('-h')) { printCollisionsHelp(); break; }
56
58
  const { runCollisions } = await import('../skills/jtb/scripts/lib/run-collisions.mjs');
57
59
  runCollisions(cmdArgs).catch(err => {
58
60
  process.stderr.write(`Error: ${err.message}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticketlens",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Jira CLI for developers — fetch ticket context, triage your queue, and stop tab-switching. Zero dependencies, all local.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,4 +1,4 @@
1
- <!-- jtb-skill-version: 0.3.0 -->
1
+ <!-- jtb-skill-version: 0.3.1 -->
2
2
  ---
3
3
  name: jtb
4
4
  description: Fetch a Jira ticket's full context (description, comments, linked issues, code references) and assemble a structured TicketBrief for implementation planning. Use when user types /jtb, mentions a Jira ticket key, or wants to plan work from a Jira ticket.
@@ -106,6 +106,10 @@ export function parseCommand(args) {
106
106
  return { command: 'update-skill', args: args.slice(1) };
107
107
  }
108
108
 
109
+ if (first === 'collisions') {
110
+ return { command: 'collisions', args: args.slice(1) };
111
+ }
112
+
109
113
  // Anything that looks like a ticket key or any non-flag arg → fetch
110
114
  return { command: 'fetch', args };
111
115
  }
@@ -644,6 +644,37 @@ export function printUpdateSkillHelp({ stream = process.stdout } = {}) {
644
644
  stream.write(lines.join('\n') + '\n');
645
645
  }
646
646
 
647
+ export function printCollisionsHelp({ stream = process.stdout } = {}) {
648
+ const s = createStyler({ isTTY: stream.isTTY });
649
+ const lines = [
650
+ '',
651
+ ` ${s.bold(s.brand('ticketlens'))} ${s.bold('collisions')} ${s.dim('[--json] [--plain]')}`,
652
+ '',
653
+ ` Show branches where your changed files overlap with a teammate's.`,
654
+ ` Reads the most recent snapshot pushed by you and each teammate (within 7 days).`,
655
+ ` Requires a ${s.bold('Team')} license and at least one teammate in your group.`,
656
+ '',
657
+ ` ${s.bold('OPTIONS')}`,
658
+ '',
659
+ ` ${s.brand('--json')} Output raw JSON array of collision objects`,
660
+ ` ${s.brand('--plain')} Plain text output ${s.dim('(no ANSI colour)')}`,
661
+ ` ${s.brand('-h')}, ${s.brand('--help')} Show this help`,
662
+ '',
663
+ ` ${s.bold('EXAMPLES')}`,
664
+ '',
665
+ ` ${s.dim('$')} ticketlens collisions`,
666
+ ` ${s.dim('$')} ticketlens collisions --json`,
667
+ ` ${s.dim('$')} ticketlens collisions --plain`,
668
+ '',
669
+ ` ${s.bold('NOTES')}`,
670
+ '',
671
+ ` Branch data is captured automatically when you run ${s.brand('ticketlens triage --push')}.`,
672
+ ` Snapshots older than 7 days are ignored.`,
673
+ '',
674
+ ];
675
+ stream.write(lines.join('\n') + '\n');
676
+ }
677
+
647
678
  export function printStandupHelp({ stream = process.stdout } = {}) {
648
679
  const s = createStyler({ isTTY: stream.isTTY });
649
680
  const lines = [
@@ -12,10 +12,15 @@ function apiBase() {
12
12
  }
13
13
 
14
14
  // Derive console queue URL from API base:
15
- // http://ticketlens.test → http://ticketlens.test/console/queue
15
+ // http://api.ticketlens.test → http://ticketlens.test/console/queue
16
16
  // https://api.ticketlens.com → https://app.ticketlens.com/console/queue
17
- function queueUrl(base) {
18
- return base.replace(/^(https?:\/\/)api\./, '$1app.') + '/console/queue';
17
+ export function queueUrl(base) {
18
+ const noApi = base.replace(/^(https?:\/\/)api\./, '$1');
19
+ // Production: ticketlens.com → app.ticketlens.com
20
+ const console = /ticketlens\.com/.test(noApi)
21
+ ? noApi.replace('://', '://app.')
22
+ : noApi;
23
+ return console + '/console/queue';
19
24
  }
20
25
 
21
26
  function buildTicketPayload(scored, rawMap, baseUrl) {