jiradc-cli 1.0.37 → 1.0.39

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/README.md +281 -114
  2. package/dist/index.js +211 -81
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -227,6 +227,17 @@ function subEntityOption(cmd, entity, opts = {}) {
227
227
  const description = `${entity.charAt(0).toUpperCase()}${entity.slice(1)} id`;
228
228
  return defineOption(cmd, `--${entity}-id <id>`, description, numeric ? positiveInt : text, opts.mandatory);
229
229
  }
230
+ function paginationOptions(cmd, opts = {}) {
231
+ const max = opts.maxLimit ?? 1e3;
232
+ const def = opts.defaultLimit ?? 25;
233
+ cmd.option("--limit <n>", `Max results per page (1-${max})`, intInRange(1, max), def);
234
+ if (opts.startIsToken) {
235
+ cmd.option("--start <indexOrToken>", "Pagination cursor: 0-based offset or opaque next-page token", text);
236
+ } else {
237
+ cmd.option("--start <index>", "Pagination offset (0-based)", nonNegativeInt);
238
+ }
239
+ return cmd;
240
+ }
230
241
  function bodyOption(cmd, opts = {}) {
231
242
  return textOrFileOption(cmd, "body", { description: "Prose body content", ...opts });
232
243
  }
@@ -677,9 +688,6 @@ async function runCli(program, opts) {
677
688
  import { styleText } from "util";
678
689
  import { Command as Command17 } from "commander";
679
690
 
680
- // src/commands/board/issues.ts
681
- import { Argument } from "commander";
682
-
683
691
  // src/utils/client.ts
684
692
  import { JiraClient } from "jira-data-center-client";
685
693
  function getClient() {
@@ -716,8 +724,12 @@ function transformPaged(response, fn) {
716
724
  const mapped2 = response.values.map(fn);
717
725
  return { startAt, maxResults, total, isLast: startAt + mapped2.length >= total, values: mapped2 };
718
726
  }
719
- const mapped = response.worklogs.map(fn);
720
- return { startAt, maxResults, total, isLast: startAt + mapped.length >= total, worklogs: mapped };
727
+ if ("worklogs" in response) {
728
+ const mapped2 = response.worklogs.map(fn);
729
+ return { startAt, maxResults, total, isLast: startAt + mapped2.length >= total, worklogs: mapped2 };
730
+ }
731
+ const mapped = response.comments.map(fn);
732
+ return { startAt, maxResults, total, isLast: startAt + mapped.length >= total, comments: mapped };
721
733
  }
722
734
 
723
735
  // src/utils/transformers/user.ts
@@ -766,6 +778,31 @@ function transformProject(p) {
766
778
  ...lead ? { lead: transformUser(lead) } : {}
767
779
  };
768
780
  }
781
+ function transformProjectDetail(p) {
782
+ const {
783
+ self: _self,
784
+ avatarUrls: _avatarUrls,
785
+ expand: _expand,
786
+ // Roles arrive as a map of name to REST URL. Nothing in this CLI follows
787
+ // one, so the names alone would be a dead end for the caller.
788
+ roles: _roles,
789
+ lead,
790
+ issueTypes,
791
+ components,
792
+ versions: versions2,
793
+ ...rest
794
+ } = p;
795
+ return {
796
+ ...rest,
797
+ url: projectBrowseUrl(p.key),
798
+ ...lead ? { lead: transformUser(lead) } : {},
799
+ ...issueTypes ? { issueTypes: issueTypes.map((t) => t.name) } : {},
800
+ // Always present on a single-project read, so an absent array means empty
801
+ // rather than unknown.
802
+ components: { count: components?.length ?? 0, use: `jiradc component list --project ${p.key}` },
803
+ versions: { count: versions2?.length ?? 0, use: `jiradc project versions ${p.key}` }
804
+ };
805
+ }
769
806
 
770
807
  // src/utils/transformers/component.ts
771
808
  function componentBrowseUrl(projectKey) {
@@ -1222,7 +1259,19 @@ function transformFolderTree(root) {
1222
1259
  return transformFolderNode(root);
1223
1260
  }
1224
1261
 
1262
+ // src/commands/board/get.ts
1263
+ function get(parent) {
1264
+ const cmd = parent.command("get").description("Get a board by ID").argument("<id>", "Board ID", positiveInt);
1265
+ examples(cmd, ["42"]);
1266
+ cmd.action(async (id) => {
1267
+ const client = getClient();
1268
+ const result = await client.agile.getBoard(id);
1269
+ output(transformBoard(result));
1270
+ });
1271
+ }
1272
+
1225
1273
  // src/commands/board/issues.ts
1274
+ import { Argument } from "commander";
1226
1275
  function issues(parent) {
1227
1276
  const cmd = parent.command("issues").description("Get issues for a board").addArgument(new Argument("<id>", "Board ID").argParser(positiveInt)).option("--limit <number>", "Max results (1-50, Jira DC caps at 50)", intInRange(1, 50), 25).option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--fields <fields>", "Comma-separated field names to return", text).option("--jql <jql>", "Additional JQL filter within the board", text);
1228
1277
  examples(cmd, [
@@ -1265,8 +1314,9 @@ function list(parent) {
1265
1314
  // src/commands/board/index.ts
1266
1315
  function registerBoardCommands(program) {
1267
1316
  const board = program.command("board").description("Board operations");
1268
- examples(board, ["list", "list --type scrum --project PROJ", "issues 42 --limit 20"]);
1317
+ examples(board, ["list", "list --type scrum --project PROJ", "get 42", "issues 42 --limit 20"]);
1269
1318
  list(board);
1319
+ get(board);
1270
1320
  issues(board);
1271
1321
  }
1272
1322
 
@@ -1279,7 +1329,7 @@ var ASSIGNEE_TYPES = [
1279
1329
  "UNASSIGNED"
1280
1330
  ];
1281
1331
  function create(parent) {
1282
- const cmd = parent.command("create").description("Create a new component in a project").requiredOption("--project <key>", "Project key (e.g., AI)", text).requiredOption("--name <name>", "Component name", text).option("--lead <username>", "Username of the component lead", text).addOption(new Option3("--assignee-type <type>", "Assignee strategy").choices(ASSIGNEE_TYPES));
1332
+ const cmd = parent.command("create").description("Create a new component in a project").requiredOption("--project <key>", "Project key (e.g., PROJ)", text).requiredOption("--name <name>", "Component name", text).option("--lead <username>", "Username of the component lead", text).addOption(new Option3("--assignee-type <type>", "Assignee strategy").choices(ASSIGNEE_TYPES));
1283
1333
  textOrFileOption(cmd, "description", { description: "Component description" });
1284
1334
  examples(cmd, [
1285
1335
  "--project PROJ --name Backend",
@@ -1314,7 +1364,7 @@ function deleteComponent(parent) {
1314
1364
  }
1315
1365
 
1316
1366
  // src/commands/component/get.ts
1317
- function get(parent) {
1367
+ function get2(parent) {
1318
1368
  const cmd = parent.command("get").description("Get a component by ID").argument("<id>", "Component ID", positiveInt);
1319
1369
  examples(cmd, ["11289"]);
1320
1370
  cmd.action(async (id) => {
@@ -1337,7 +1387,7 @@ function issueCount(parent) {
1337
1387
 
1338
1388
  // src/commands/component/list.ts
1339
1389
  function list2(parent) {
1340
- const cmd = parent.command("list").description("List all components for a project").requiredOption("--project <key>", "Project key (e.g., AI)", text);
1390
+ const cmd = parent.command("list").description("List all components for a project").requiredOption("--project <key>", "Project key (e.g., PROJ)", text);
1341
1391
  examples(cmd, ["--project PROJ"]);
1342
1392
  cmd.action(async (opts) => {
1343
1393
  const client = getClient();
@@ -1393,20 +1443,36 @@ function registerComponentCommands(program) {
1393
1443
  "issue-count 11289"
1394
1444
  ]);
1395
1445
  list2(component);
1396
- get(component);
1446
+ get2(component);
1397
1447
  create(component);
1398
1448
  update(component);
1399
1449
  deleteComponent(component);
1400
1450
  issueCount(component);
1401
1451
  }
1402
1452
 
1453
+ // src/utils/field-search.ts
1454
+ function tier(field, keyword) {
1455
+ const id = field.id.toLowerCase();
1456
+ const name = (field.name ?? "").toLowerCase();
1457
+ if (id === keyword) return 0;
1458
+ if (name === keyword) return field.custom === true ? 2 : 1;
1459
+ return field.custom === true ? 4 : 3;
1460
+ }
1461
+ function rankFieldMatches(fields, keyword, limit) {
1462
+ const needle = keyword.toLowerCase();
1463
+ const matches = fields.filter(
1464
+ (f) => f.id.toLowerCase().includes(needle) || (f.name ?? "").toLowerCase().includes(needle)
1465
+ );
1466
+ return matches.sort((a, b) => tier(a, needle) - tier(b, needle)).slice(0, limit);
1467
+ }
1468
+
1403
1469
  // src/commands/field/search.ts
1404
1470
  function search(parent) {
1405
- const cmd = parent.command("search").description("Search for fields by name or ID").argument("<keyword>", "Search keyword", text).option("--limit <number>", "Maximum number of results (1-1000)", intInRange(1, 1e3), 25);
1471
+ const cmd = parent.command("search").description("Search for fields by name or ID").argument("<keyword>", "Search keyword", nonEmpty).option("--limit <number>", "Maximum number of results (1-1000)", intInRange(1, 1e3), 25);
1406
1472
  examples(cmd, ["epic", "customfield_10100", "priority --limit 5"]);
1407
1473
  cmd.action(async (keyword, opts) => {
1408
1474
  const client = getClient();
1409
- const result = await client.fields.search(keyword, opts.limit);
1475
+ const result = rankFieldMatches(await client.fields.getAll(), keyword, opts.limit);
1410
1476
  output(result.map(transformField));
1411
1477
  });
1412
1478
  }
@@ -1621,13 +1687,12 @@ function registerAttachmentCommands(parent) {
1621
1687
 
1622
1688
  // src/commands/issue/batch-changelog.ts
1623
1689
  function batchChangelog(parent) {
1624
- const cmd = parent.command("batch-changelog").description("Get changelogs for multiple issues at once").argument("<keys>", "Comma-separated issue keys", text).option("--limit <number>", "Max changelog entries per issue (1-50, Jira DC caps at 50)", intInRange(1, 50), 25);
1690
+ const cmd = parent.command("batch-changelog").description("Get changelogs for multiple issues at once").argument("<keys>", "Comma-separated issue keys", keyList).option("--limit <number>", "Max changelog entries per issue (1-50, Jira DC caps at 50)", intInRange(1, 50), 25);
1625
1691
  examples(cmd, ["PROJ-1,PROJ-2,PROJ-3", "PROJ-123,PROJ-124 --limit 10"]);
1626
1692
  cmd.action(async (keys, opts) => {
1627
1693
  const client = getClient();
1628
- const keyList2 = keys.split(",").map((k) => k.trim());
1629
1694
  const entries = await Promise.all(
1630
- keyList2.map(async (key) => {
1695
+ keys.map(async (key) => {
1631
1696
  try {
1632
1697
  const data = await client.issues.getChangelog({ issueKeyOrId: key, maxResults: opts.limit });
1633
1698
  return [key, data];
@@ -1794,6 +1859,37 @@ function deleteComment(parent) {
1794
1859
  });
1795
1860
  }
1796
1861
 
1862
+ // src/commands/issue/comment/get.ts
1863
+ function get3(parent) {
1864
+ const cmd = parent.command("get").description("Get a single comment on an issue").argument("<key>", "Issue key", issueKey);
1865
+ subEntityOption(cmd, "comment", { mandatory: true });
1866
+ examples(cmd, ["PROJ-123 --comment-id 12345"]);
1867
+ cmd.action(async (key, opts) => {
1868
+ const client = getClient();
1869
+ const result = await client.issues.getComment({
1870
+ issueKeyOrId: key,
1871
+ commentId: String(opts.commentId)
1872
+ });
1873
+ output(transformComment(result));
1874
+ });
1875
+ }
1876
+
1877
+ // src/commands/issue/comment/list.ts
1878
+ function list4(parent) {
1879
+ const cmd = parent.command("list").description("List comments on an issue").argument("<key>", "Issue key", issueKey);
1880
+ paginationOptions(cmd);
1881
+ examples(cmd, ["PROJ-123", "PROJ-123 --limit 10", "PROJ-123 --start 10 --limit 5"]);
1882
+ cmd.action(async (key, opts) => {
1883
+ const client = getClient();
1884
+ const result = await client.issues.getComments({
1885
+ issueKeyOrId: key,
1886
+ startAt: opts.start,
1887
+ maxResults: opts.limit
1888
+ });
1889
+ output(transformPaged(result, transformComment));
1890
+ });
1891
+ }
1892
+
1797
1893
  // src/commands/issue/comment/update.ts
1798
1894
  function update2(parent) {
1799
1895
  const cmd = parent.command("update").description("Update an existing comment").argument("<key>", "Issue key", issueKey);
@@ -1816,10 +1912,14 @@ function update2(parent) {
1816
1912
  function registerCommentCommands(parent) {
1817
1913
  const comment = parent.command("comment").description("Comment operations");
1818
1914
  examples(comment, [
1915
+ "list PROJ-123",
1916
+ "get PROJ-123 --comment-id 12345",
1819
1917
  'create PROJ-123 --body "Fixed in latest build"',
1820
1918
  'update PROJ-123 --comment-id 12345 --body "Updated comment text"',
1821
1919
  "delete PROJ-123 --comment-id 12345"
1822
1920
  ]);
1921
+ list4(comment);
1922
+ get3(comment);
1823
1923
  create2(comment);
1824
1924
  update2(comment);
1825
1925
  deleteComment(comment);
@@ -2012,6 +2112,7 @@ var DEFAULT_FIELDS = [...SEARCH_DEFAULT_FIELDS, "description", "comment"];
2012
2112
  // src/utils/field-selectors.ts
2013
2113
  var WILDCARD = "*";
2014
2114
  var NEGATION = "-";
2115
+ var UNPUBLISHED_SELECTORS = ["parent"];
2015
2116
  function buildFieldNameIndex(fields) {
2016
2117
  const ids = /* @__PURE__ */ new Set();
2017
2118
  const idsByLower = /* @__PURE__ */ new Map();
@@ -2031,6 +2132,10 @@ function buildFieldNameIndex(fields) {
2031
2132
  record(field.name, field.id);
2032
2133
  for (const clause of field.clauseNames ?? []) record(clause, field.id);
2033
2134
  }
2135
+ for (const id of UNPUBLISHED_SELECTORS) {
2136
+ ids.add(id);
2137
+ if (!idsByLower.has(id)) idsByLower.set(id, id);
2138
+ }
2034
2139
  return { ids, idsByLower, byName };
2035
2140
  }
2036
2141
  function candidatesFor(token, index) {
@@ -2114,7 +2219,7 @@ async function selectFields(client, opts, defaults) {
2114
2219
  }
2115
2220
 
2116
2221
  // src/commands/issue/get.ts
2117
- function get2(parent) {
2222
+ function get4(parent) {
2118
2223
  const cmd = parent.command("get").description("Get issue details").argument("<key>", "Issue key", issueKey).option("--fields <fields>", "Comma-separated fields to return, by name or id", text).option("--all-fields", "Return all fields instead of defaults").option("--expand <expand>", 'Expand options (e.g., "transitions", "changelog")', text);
2119
2224
  examples(cmd, [
2120
2225
  "PROJ-123",
@@ -2236,7 +2341,7 @@ async function fetchEveryPage(fetchPage, opts) {
2236
2341
  // src/commands/issue/search.ts
2237
2342
  var MAX_PAGE_SIZE = 50;
2238
2343
  function search2(parent) {
2239
- const cmd = parent.command("search").description("Search issues using JQL").argument("<jql>", "JQL query string", text).option(
2344
+ const cmd = parent.command("search").description("Search issues using JQL").argument("<jql>", "JQL query string", nonEmpty).option(
2240
2345
  "--limit <number>",
2241
2346
  `Max results (1-${MAX_PAGE_SIZE}, Jira DC caps at ${MAX_PAGE_SIZE})`,
2242
2347
  intInRange(1, MAX_PAGE_SIZE),
@@ -2527,7 +2632,7 @@ function deleteWorklog(parent) {
2527
2632
  }
2528
2633
 
2529
2634
  // src/commands/issue/worklog/list.ts
2530
- function list4(parent) {
2635
+ function list5(parent) {
2531
2636
  const cmd = parent.command("list").description("Get worklogs for an issue").argument("<key>", "Issue key", issueKey).option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--limit <number>", "Max results per page (1-1000)", intInRange(1, 1e3), 25);
2532
2637
  examples(cmd, ["PROJ-123", "PROJ-123 --limit 10", "PROJ-123 --start 10 --limit 5"]);
2533
2638
  cmd.action(async (key, opts) => {
@@ -2582,7 +2687,7 @@ function registerWorklogCommands(parent) {
2582
2687
  "delete PROJ-123 --worklog-id 12345"
2583
2688
  ]);
2584
2689
  create4(worklog);
2585
- list4(worklog);
2690
+ list5(worklog);
2586
2691
  update4(worklog);
2587
2692
  deleteWorklog(worklog);
2588
2693
  }
@@ -2598,7 +2703,7 @@ function registerIssueCommands(program) {
2598
2703
  "transition PROJ-123 --to 11",
2599
2704
  "attachment list PROJ-123"
2600
2705
  ]);
2601
- get2(issue);
2706
+ get4(issue);
2602
2707
  search2(issue);
2603
2708
  create3(issue);
2604
2709
  update3(issue);
@@ -2622,8 +2727,19 @@ function registerIssueCommands(program) {
2622
2727
  devStatus(issue);
2623
2728
  }
2624
2729
 
2730
+ // src/commands/project/get.ts
2731
+ function get5(parent) {
2732
+ const cmd = parent.command("get").description("Get a single project by key or ID").argument("<key>", "Project key or ID", nonEmpty);
2733
+ examples(cmd, ["PROJ", "10000"]);
2734
+ cmd.action(async (key) => {
2735
+ const client = getClient();
2736
+ const result = await client.projects.get({ projectKeyOrId: key });
2737
+ output(transformProjectDetail(result));
2738
+ });
2739
+ }
2740
+
2625
2741
  // src/commands/project/list.ts
2626
- function list5(parent) {
2742
+ function list6(parent) {
2627
2743
  const cmd = parent.command("list").description("List all projects").option("--expand <expand>", 'Expand options (e.g., "description,lead")', text).option("--include-archived", "Include archived projects (default: false)");
2628
2744
  examples(cmd, ["", "--expand description,lead", "--include-archived"]);
2629
2745
  cmd.action(async (opts) => {
@@ -2635,7 +2751,7 @@ function list5(parent) {
2635
2751
 
2636
2752
  // src/commands/project/versions.ts
2637
2753
  function versions(parent) {
2638
- const cmd = parent.command("versions").description("Get all versions for a project").argument("<key>", "Project key", text).option("--expand <expand>", "Expand options", text);
2754
+ const cmd = parent.command("versions").description("Get all versions for a project").argument("<key>", "Project key", nonEmpty).option("--expand <expand>", "Expand options", text);
2639
2755
  examples(cmd, ["PROJ", "PROJ --expand operations"]);
2640
2756
  cmd.action(async (key, opts) => {
2641
2757
  const client = getClient();
@@ -2647,8 +2763,9 @@ function versions(parent) {
2647
2763
  // src/commands/project/index.ts
2648
2764
  function registerProjectCommands(program) {
2649
2765
  const project = program.command("project").description("Project operations");
2650
- examples(project, ["list", "versions PROJ"]);
2651
- list5(project);
2766
+ examples(project, ["list", "get PROJ", "versions PROJ"]);
2767
+ get5(project);
2768
+ list6(project);
2652
2769
  versions(project);
2653
2770
  }
2654
2771
 
@@ -2684,6 +2801,17 @@ function deleteSprint(parent) {
2684
2801
  });
2685
2802
  }
2686
2803
 
2804
+ // src/commands/sprint/get.ts
2805
+ function get6(parent) {
2806
+ const cmd = parent.command("get").description("Get a sprint by ID").argument("<id>", "Sprint ID", positiveInt);
2807
+ examples(cmd, ["123"]);
2808
+ cmd.action(async (id) => {
2809
+ const client = getClient();
2810
+ const result = await client.agile.getSprint(id);
2811
+ output(transformSprint(result));
2812
+ });
2813
+ }
2814
+
2687
2815
  // src/commands/sprint/issues.ts
2688
2816
  import { Argument as Argument3 } from "commander";
2689
2817
  function issues2(parent) {
@@ -2710,7 +2838,7 @@ function issues2(parent) {
2710
2838
  // src/commands/sprint/list.ts
2711
2839
  import { Option as Option8 } from "commander";
2712
2840
  var SPRINT_STATES = ["future", "active", "closed"];
2713
- function list6(parent) {
2841
+ function list7(parent) {
2714
2842
  const cmd = parent.command("list").description("List sprints for a board").requiredOption("--board <id>", "Board ID", positiveInt).addOption(new Option8("--state <state>", "Filter by sprint state").choices(SPRINT_STATES));
2715
2843
  examples(cmd, ["--board 42", "--board 42 --state active"]);
2716
2844
  cmd.action(async (opts) => {
@@ -2755,10 +2883,12 @@ function registerSprintCommands(program) {
2755
2883
  examples(sprint, [
2756
2884
  "list --board 42",
2757
2885
  "list --board 42 --state active",
2886
+ "get 123",
2758
2887
  "issues 123 --limit 20",
2759
2888
  'create --board 42 --name "Sprint 10" --start-date 2026-04-01 --end-date 2026-04-14'
2760
2889
  ]);
2761
- list6(sprint);
2890
+ list7(sprint);
2891
+ get6(sprint);
2762
2892
  issues2(sprint);
2763
2893
  create5(sprint);
2764
2894
  update5(sprint);
@@ -2811,7 +2941,7 @@ function create6(parent) {
2811
2941
  }
2812
2942
 
2813
2943
  // src/commands/token/list.ts
2814
- function list7(parent) {
2944
+ function list8(parent) {
2815
2945
  const cmd = parent.command("list").description("List Personal Access Tokens owned by the authenticated user (secrets not included)").option("--basic-username <u>", "Override $JIRA_BASIC_USERNAME", text).option(
2816
2946
  "--basic-password <p>",
2817
2947
  "Override $JIRA_BASIC_PASSWORD (caution: visible in process table; prefer the env var)",
@@ -2855,13 +2985,13 @@ function registerTokenCommands(program) {
2855
2985
  "\nAuth:\n Requires JIRA_BASIC_USERNAME + JIRA_BASIC_PASSWORD\n (or --basic-username / --basic-password on any subcommand)."
2856
2986
  );
2857
2987
  create6(token);
2858
- list7(token);
2988
+ list8(token);
2859
2989
  revoke(token);
2860
2990
  }
2861
2991
 
2862
2992
  // src/commands/user/get.ts
2863
- function get3(parent) {
2864
- const cmd = parent.command("get").description("Get a user profile by exact username or key").argument("<username>", "Username or user key", text).option("--by-key", "Treat the positional argument as a user key instead of a username");
2993
+ function get7(parent) {
2994
+ const cmd = parent.command("get").description("Get a user profile by exact username or key").argument("<username>", "Username or user key", nonEmpty).option("--by-key", "Treat the positional argument as a user key instead of a username");
2865
2995
  examples(cmd, ["jsmith", "JIRAUSER10100 --by-key"]);
2866
2996
  cmd.action(async (identifier, opts) => {
2867
2997
  const client = getClient();
@@ -2883,7 +3013,7 @@ function me(parent) {
2883
3013
 
2884
3014
  // src/commands/user/search.ts
2885
3015
  function search3(parent) {
2886
- const cmd = parent.command("search").description("Search users by partial username, display name or email").argument("<query>", "Search query", text).option("--limit <n>", "Maximum results (1-50)", intInRange(1, 50), 25).option("--start <n>", "Starting index (pagination offset)", nonNegativeInt, 0).option("--include-inactive", "Include inactive users in results", false);
3016
+ const cmd = parent.command("search").description("Search users by partial username, display name or email").argument("<query>", "Search query", nonEmpty).option("--limit <n>", "Maximum results (1-50)", intInRange(1, 50), 25).option("--start <n>", "Starting index (pagination offset)", nonNegativeInt, 0).option("--include-inactive", "Include inactive users in results", false);
2887
3017
  examples(cmd, ["Smith", '"John Smith"', "jsmith@example.com --limit 5"]);
2888
3018
  cmd.action(async (query, opts) => {
2889
3019
  const client = getClient();
@@ -2903,7 +3033,7 @@ function registerUserCommands(program) {
2903
3033
  const user = program.command("user").description("User operations");
2904
3034
  examples(user, ["me", "get jsmith", "search Smith"]);
2905
3035
  me(user);
2906
- get3(user);
3036
+ get7(user);
2907
3037
  search3(user);
2908
3038
  }
2909
3039
 
@@ -2938,8 +3068,8 @@ function add(parent) {
2938
3068
  const keys = new Set(opts.test ?? []);
2939
3069
  if (opts.set) {
2940
3070
  const lists = await Promise.all(opts.set.map((setKey) => client.testSets.listTests({ setKey })));
2941
- for (const list20 of lists) {
2942
- const tests = Array.isArray(list20) ? list20 : list20.tests ?? [];
3071
+ for (const list21 of lists) {
3072
+ const tests = Array.isArray(list21) ? list21 : list21.tests ?? [];
2943
3073
  for (const t of tests) {
2944
3074
  if (t.key) keys.add(String(t.key));
2945
3075
  }
@@ -2986,7 +3116,7 @@ function deleteXrayIssue(client, key) {
2986
3116
 
2987
3117
  // src/commands/xray/execution/create.ts
2988
3118
  function create7(parent) {
2989
- const cmd = parent.command("create").description("Create a new Xray Test Execution issue").requiredOption("--project <key>", "Project key (e.g. AI)", text).requiredOption("--summary <text>", "Test Execution summary (title)", text);
3119
+ const cmd = parent.command("create").description("Create a new Xray Test Execution issue").requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--summary <text>", "Test Execution summary (title)", text);
2990
3120
  textOrFileOption(cmd, "description", { description: "Test Execution description" });
2991
3121
  examples(cmd, [
2992
3122
  '--project PROJ --summary "Sprint 42 regression run"',
@@ -3017,7 +3147,7 @@ function deleteExecution(parent) {
3017
3147
  }
3018
3148
 
3019
3149
  // src/commands/xray/execution/list.ts
3020
- function list8(parent) {
3150
+ function list9(parent) {
3021
3151
  const cmd = parent.command("list").description(
3022
3152
  "List Test Executions that contain a given test (inverse view). For the tests inside an execution, use: xray test list --execution <key>."
3023
3153
  ).requiredOption("--test <key>", "Test issue key whose executions to list (e.g. PROJ-584)", issueKey);
@@ -3068,7 +3198,7 @@ function registerExecutionCommands(xray) {
3068
3198
  deleteExecution(execution2);
3069
3199
  add(execution2);
3070
3200
  remove(execution2);
3071
- list8(execution2);
3201
+ list9(execution2);
3072
3202
  }
3073
3203
 
3074
3204
  // src/commands/xray/export/feature.ts
@@ -3096,7 +3226,7 @@ function registerExportCommands(xray) {
3096
3226
  }
3097
3227
 
3098
3228
  // src/commands/xray/field/list.ts
3099
- function list9(parent) {
3229
+ function list10(parent) {
3100
3230
  const cmd = parent.command("list").description("List Xray custom fields available on this instance");
3101
3231
  examples(cmd, [""]);
3102
3232
  cmd.action(async () => {
@@ -3109,12 +3239,12 @@ function list9(parent) {
3109
3239
  function registerFieldCommands2(xray) {
3110
3240
  const field = xray.command("field").description("Xray field discovery");
3111
3241
  examples(field, ["list"]);
3112
- list9(field);
3242
+ list10(field);
3113
3243
  }
3114
3244
 
3115
3245
  // src/commands/xray/folder/add.ts
3116
3246
  function add2(parent) {
3117
- const cmd = parent.command("add").description("Add tests to a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. QA)", text).requiredOption("--test <keys>", "Comma-separated test issue keys to add (e.g. PROJ-1,PROJ-2)", keyList);
3247
+ const cmd = parent.command("add").description("Add tests to a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--test <keys>", "Comma-separated test issue keys to add (e.g. PROJ-1,PROJ-2)", keyList);
3118
3248
  examples(cmd, ["818 --project PROJ --test PROJ-1", "818 --project PROJ --test PROJ-1,PROJ-2,PROJ-3"]);
3119
3249
  cmd.action(async (folderId, opts) => {
3120
3250
  const client = getClient();
@@ -3129,7 +3259,7 @@ function add2(parent) {
3129
3259
 
3130
3260
  // src/commands/xray/folder/create.ts
3131
3261
  function create8(parent) {
3132
- const cmd = parent.command("create").description("Create a new folder in the test repository").requiredOption("--project <key>", "Project key (e.g. QA)", text).option("--parent-id <id>", "Parent folder id (-1 = root)", integer, -1).requiredOption("--name <text>", "Folder name", text);
3262
+ const cmd = parent.command("create").description("Create a new folder in the test repository").requiredOption("--project <key>", "Project key (e.g. PROJ)", text).option("--parent-id <id>", "Parent folder id (-1 = root)", integer, -1).requiredOption("--name <text>", "Folder name", text);
3133
3263
  examples(cmd, [
3134
3264
  "--project PROJ --name Smoke",
3135
3265
  '--project PROJ --parent-id -1 --name "Regression Suite"',
@@ -3148,7 +3278,7 @@ function create8(parent) {
3148
3278
 
3149
3279
  // src/commands/xray/folder/delete.ts
3150
3280
  function deleteFolder(parent) {
3151
- const cmd = parent.command("delete").description("Delete a folder from the test repository").argument("<folderId>", "Folder id to delete (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. QA)", text);
3281
+ const cmd = parent.command("delete").description("Delete a folder from the test repository").argument("<folderId>", "Folder id to delete (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. PROJ)", text);
3152
3282
  examples(cmd, ["818 --project PROJ", "42 --project PROJ"]);
3153
3283
  cmd.action(async (folderId, opts) => {
3154
3284
  const client = getClient();
@@ -3158,8 +3288,8 @@ function deleteFolder(parent) {
3158
3288
  }
3159
3289
 
3160
3290
  // src/commands/xray/folder/list.ts
3161
- function list10(parent) {
3162
- const cmd = parent.command("list").description("List the test repository folder tree for a project").requiredOption("--project <key>", "Project key (e.g. QA)", text);
3291
+ function list11(parent) {
3292
+ const cmd = parent.command("list").description("List the test repository folder tree for a project").requiredOption("--project <key>", "Project key (e.g. PROJ)", text);
3163
3293
  examples(cmd, ["--project PROJ", "--project PROJ"]);
3164
3294
  cmd.action(async (opts) => {
3165
3295
  const client = getClient();
@@ -3170,7 +3300,7 @@ function list10(parent) {
3170
3300
 
3171
3301
  // src/commands/xray/folder/remove.ts
3172
3302
  function remove2(parent) {
3173
- const cmd = parent.command("remove").description("Remove tests from a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. QA)", text).requiredOption("--test <keys>", "Comma-separated test issue keys to remove (e.g. PROJ-1,PROJ-2)", keyList);
3303
+ const cmd = parent.command("remove").description("Remove tests from a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--test <keys>", "Comma-separated test issue keys to remove (e.g. PROJ-1,PROJ-2)", keyList);
3174
3304
  examples(cmd, ["818 --project PROJ --test PROJ-1", "818 --project PROJ --test PROJ-1,PROJ-2"]);
3175
3305
  cmd.action(async (folderId, opts) => {
3176
3306
  const client = getClient();
@@ -3185,7 +3315,7 @@ function remove2(parent) {
3185
3315
 
3186
3316
  // src/commands/xray/folder/update.ts
3187
3317
  function update7(parent) {
3188
- const cmd = parent.command("update").description("Rename or reorder a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. QA)", text).option("--name <text>", "New folder name", text).option("--rank <id>", "New folder rank/position", positiveInt);
3318
+ const cmd = parent.command("update").description("Rename or reorder a folder in the test repository").argument("<folderId>", "Folder id (from folder list)", positiveInt).requiredOption("--project <key>", "Project key (e.g. PROJ)", text).option("--name <text>", "New folder name", text).option("--rank <id>", "New folder rank/position", positiveInt);
3189
3319
  examples(cmd, [
3190
3320
  '818 --project PROJ --name "New Name"',
3191
3321
  "818 --project PROJ --rank 2",
@@ -3212,7 +3342,7 @@ function registerFolderCommands(xray) {
3212
3342
  "Xray Test Repository folder management (rename/reorder within parent only \u2014 cross-parent moves are UI-only, not supported by the API). To list tests in a folder use: xray test list --folder <id> --project <key>"
3213
3343
  );
3214
3344
  examples(folder, ["list --project PROJ", "create --project PROJ --parent-id -1 --name Smoke"]);
3215
- list10(folder);
3345
+ list11(folder);
3216
3346
  create8(folder);
3217
3347
  update7(folder);
3218
3348
  deleteFolder(folder);
@@ -3230,7 +3360,7 @@ function execution(parent) {
3230
3360
  const cmd = parent.command("execution").description("Import test execution results into Xray").requiredOption("--file <path>", "Path to the result file", filePath).addOption(
3231
3361
  new Option10(
3232
3362
  "--format <format>",
3233
- "Result format. xray/cucumber/behave: JSON body, no --project/--execution required. junit/testng/nunit/xunit/robot: XML body, requires --project OR --execution."
3363
+ "Result format. xray/cucumber/behave: JSON body, no --project/--execution required. junit/testng/nunit/xunit/robot: XML body, requires either --project or --execution."
3234
3364
  ).choices(FORMATS).makeOptionMandatory()
3235
3365
  ).option(
3236
3366
  "--project <text>",
@@ -3320,7 +3450,7 @@ function add3(parent) {
3320
3450
 
3321
3451
  // src/commands/xray/plan/create.ts
3322
3452
  function create9(parent) {
3323
- const cmd = parent.command("create").description("Create a new Xray Test Plan issue").requiredOption("--project <key>", "Project key (e.g. QA)", text).requiredOption("--summary <text>", "Test Plan summary (title)", text);
3453
+ const cmd = parent.command("create").description("Create a new Xray Test Plan issue").requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--summary <text>", "Test Plan summary (title)", text);
3324
3454
  textOrFileOption(cmd, "description", { description: "Test Plan description" });
3325
3455
  examples(cmd, [
3326
3456
  '--project PROJ --summary "Q3 regression plan"',
@@ -3351,7 +3481,7 @@ function deletePlan(parent) {
3351
3481
  }
3352
3482
 
3353
3483
  // src/commands/xray/plan/list.ts
3354
- function list11(parent) {
3484
+ function list12(parent) {
3355
3485
  const cmd = parent.command("list").description(
3356
3486
  "List Test Plans that contain a given test (inverse view). For the tests inside a plan, use: xray test list --plan <key>. For executions in a plan, use: xray execution list --plan <key>."
3357
3487
  ).requiredOption("--test <key>", "Test issue key whose plans to list (e.g. PROJ-574)", issueKey);
@@ -3411,7 +3541,7 @@ function registerPlanCommands(xray) {
3411
3541
  deletePlan(plan);
3412
3542
  add3(plan);
3413
3543
  remove3(plan);
3414
- list11(plan);
3544
+ list12(plan);
3415
3545
  }
3416
3546
 
3417
3547
  // src/commands/xray/precondition/add.ts
@@ -3529,16 +3659,16 @@ function buildPreconditionCustomFields(map, opts) {
3529
3659
  // src/commands/xray/precondition/create.ts
3530
3660
  function create10(parent) {
3531
3661
  const cmd = parent.command("create").description(
3532
- "Create a new Xray Pre-Condition issue. Note: the Pre-Condition issue type is only available in projects that have it configured (e.g. BD); it is not on your project scheme."
3533
- ).requiredOption("--project <key>", "Project key (e.g. BD)", text).requiredOption("--summary <text>", "Pre-Condition summary (title)", text).addOption(
3662
+ "Create a new Xray Pre-Condition issue. Note: the Pre-Condition issue type is only available in projects configured for it; it may not be on your project scheme."
3663
+ ).requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--summary <text>", "Pre-Condition summary (title)", text).addOption(
3534
3664
  new Option11("--type <type>", "Pre-Condition type").choices(["manual", "generic", "cucumber"]).default("manual")
3535
3665
  );
3536
3666
  textOrFileOption(cmd, "condition", { description: "Pre-condition body / definition text" });
3537
3667
  textOrFileOption(cmd, "description", { description: "Pre-Condition issue description" });
3538
3668
  examples(cmd, [
3539
- '--project BD --summary "User is logged in"',
3540
- '--project BD --summary "API key valid" --type generic --condition "apiKey != null"',
3541
- '--project BD --summary "Auth scenario" --type cucumber --condition "Given the user is authenticated"'
3669
+ '--project PROJ --summary "User is logged in"',
3670
+ '--project PROJ --summary "API key valid" --type generic --condition "apiKey != null"',
3671
+ '--project PROJ --summary "Auth scenario" --type cucumber --condition "Given the user is authenticated"'
3542
3672
  ]);
3543
3673
  cmd.action(
3544
3674
  async (opts) => {
@@ -3578,7 +3708,7 @@ function deletePrecondition(parent) {
3578
3708
  }
3579
3709
 
3580
3710
  // src/commands/xray/precondition/list.ts
3581
- function list12(parent) {
3711
+ function list13(parent) {
3582
3712
  const cmd = parent.command("list").description(
3583
3713
  "List Pre-Conditions that apply to a given test (inverse view). For the forward view (tests covered by a precondition), use: xray precondition add/remove."
3584
3714
  ).requiredOption("--test <key>", "Test issue key whose pre-conditions to list (e.g. PROJ-584)", issueKey);
@@ -3648,7 +3778,7 @@ function registerPreconditionCommands(xray) {
3648
3778
  "Xray Pre-Condition issue management (CRUD, membership). Note: Pre-Condition issue type is only available in projects where it is configured (not your project). To list tests covered by a precondition, use: xray test list --precondition <key>."
3649
3779
  );
3650
3780
  examples(precondition, [
3651
- 'create --project BD --summary "User is logged in"',
3781
+ 'create --project PROJ --summary "User is logged in"',
3652
3782
  "add PROJ-50 --test PROJ-1,PROJ-2",
3653
3783
  "list --test PROJ-584"
3654
3784
  ]);
@@ -3657,7 +3787,7 @@ function registerPreconditionCommands(xray) {
3657
3787
  deletePrecondition(precondition);
3658
3788
  add4(precondition);
3659
3789
  remove4(precondition);
3660
- list12(precondition);
3790
+ list13(precondition);
3661
3791
  }
3662
3792
 
3663
3793
  // src/utils/xray/run-id.ts
@@ -3771,7 +3901,7 @@ function deleteEvidence(parent) {
3771
3901
  }
3772
3902
 
3773
3903
  // src/commands/xray/run/evidence/list.ts
3774
- function list13(parent) {
3904
+ function list14(parent) {
3775
3905
  const cmd = parent.command("list").description("List evidence (attachments) on a test run").argument("[runId]", "Test run id (from run list)", positiveInt).option("--execution <key>", "Test execution issue key (used with --test to resolve run id)", issueKey).option("--test <key>", "Test issue key (used with --execution to resolve run id)", issueKey);
3776
3906
  examples(cmd, ["42", "--execution PROJ-1 --test PROJ-2"]);
3777
3907
  cmd.action(async (runId, opts) => {
@@ -3791,12 +3921,12 @@ function registerEvidenceCommands(run) {
3791
3921
  "delete 42 --evidence-id 7"
3792
3922
  ]);
3793
3923
  add6(evidence);
3794
- list13(evidence);
3924
+ list14(evidence);
3795
3925
  deleteEvidence(evidence);
3796
3926
  }
3797
3927
 
3798
3928
  // src/commands/xray/run/field/get.ts
3799
- function get4(parent) {
3929
+ function get8(parent) {
3800
3930
  const cmd = parent.command("get").description("Get a custom field value on a test run").argument("[runId]", "Test run id (from run list)", positiveInt).requiredOption("--field-id <id>", "Custom field id (from xray field list)", text).option("--execution <key>", "Test execution issue key (used with --test to resolve run id)", issueKey).option("--test <key>", "Test issue key (used with --execution to resolve run id)", issueKey);
3801
3931
  examples(cmd, ["42 --field-id customfield_10100", "--execution PROJ-1 --test PROJ-2 --field-id customfield_10100"]);
3802
3932
  cmd.action(async (runId, opts) => {
@@ -3828,12 +3958,12 @@ function set(parent) {
3828
3958
  function registerRunFieldCommands(run) {
3829
3959
  const field = run.command("field").description("Get or set Xray custom field values on a test run");
3830
3960
  examples(field, ["get 42 --field-id customfield_10100", 'set 42 --field-id customfield_10100 --value "approved"']);
3831
- get4(field);
3961
+ get8(field);
3832
3962
  set(field);
3833
3963
  }
3834
3964
 
3835
3965
  // src/commands/xray/run/get.ts
3836
- function get5(parent) {
3966
+ function get9(parent) {
3837
3967
  const cmd = parent.command("get").description("Get a test run by id or by execution + test key").argument("[runId]", "Test run id (from run list)", positiveInt).option("--execution <key>", "Test execution issue key (used with --test to resolve run id)", issueKey).option("--test <key>", "Test issue key (used with --execution to resolve run id)", issueKey);
3838
3968
  examples(cmd, ["42", "--execution PROJ-1 --test PROJ-2"]);
3839
3969
  cmd.action(async (runId, opts) => {
@@ -3845,7 +3975,7 @@ function get5(parent) {
3845
3975
  }
3846
3976
 
3847
3977
  // src/commands/xray/run/list.ts
3848
- function list14(parent) {
3978
+ function list15(parent) {
3849
3979
  const cmd = parent.command("list").description("List test runs for a test execution (CLI-side slice with --limit/--start)").requiredOption("--execution <key>", "Test execution issue key", issueKey).option("--limit <number>", "Max results to return (1-200)", intInRange(1, 200), 50).option("--start <number>", "Starting index for pagination", nonNegativeInt);
3850
3980
  examples(cmd, ["--execution PROJ-1", "--execution PROJ-1 --limit 10", "--execution PROJ-1 --limit 10 --start 10"]);
3851
3981
  cmd.action(async (opts) => {
@@ -3858,7 +3988,7 @@ function list14(parent) {
3858
3988
  }
3859
3989
 
3860
3990
  // src/commands/xray/run/step/list.ts
3861
- function list15(parent) {
3991
+ function list16(parent) {
3862
3992
  const cmd = parent.command("list").description("List step results for a test run").argument("[runId]", "Test run id (from run list)", positiveInt).option("--execution <key>", "Test execution issue key (used with --test to resolve run id)", issueKey).option("--test <key>", "Test issue key (used with --execution to resolve run id)", issueKey);
3863
3993
  examples(cmd, ["42", "--execution PROJ-1 --test PROJ-2"]);
3864
3994
  cmd.action(async (runId, opts) => {
@@ -3905,7 +4035,7 @@ function update10(parent) {
3905
4035
  function registerRunStepCommands(run) {
3906
4036
  const step = run.command("step").description("Manage step results within a test run. See also: xray step for test step definitions.");
3907
4037
  examples(step, ["list --execution PROJ-1 --test PROJ-2", "update 42 --step-id 1 --status PASS"]);
3908
- list15(step);
4038
+ list16(step);
3909
4039
  update10(step);
3910
4040
  }
3911
4041
 
@@ -3951,8 +4081,8 @@ function registerRunCommands(xray) {
3951
4081
  "step list --execution PROJ-1 --test PROJ-2",
3952
4082
  "field get 42 --field-id customfield_10100"
3953
4083
  ]);
3954
- get5(run);
3955
- list14(run);
4084
+ get9(run);
4085
+ list15(run);
3956
4086
  update11(run);
3957
4087
  registerDefectCommands(run);
3958
4088
  registerEvidenceCommands(run);
@@ -3961,7 +4091,7 @@ function registerRunCommands(xray) {
3961
4091
  }
3962
4092
 
3963
4093
  // src/commands/xray/status/list.ts
3964
- function list16(parent) {
4094
+ function list17(parent) {
3965
4095
  const cmd = parent.command("list").description("List configured Xray test (run) statuses").option("--step", "List test-step statuses instead of run statuses");
3966
4096
  examples(cmd, ["", ["--step", "step statuses"]]);
3967
4097
  cmd.action(async (opts) => {
@@ -3975,7 +4105,7 @@ function list16(parent) {
3975
4105
  function registerStatusCommands(xray) {
3976
4106
  const status = xray.command("status").description("Xray status discovery");
3977
4107
  examples(status, ["list", ["list --step", "step statuses"]]);
3978
- list16(status);
4108
+ list17(status);
3979
4109
  }
3980
4110
 
3981
4111
  // src/commands/xray/step/add.ts
@@ -4012,7 +4142,7 @@ function deleteStep(parent) {
4012
4142
  }
4013
4143
 
4014
4144
  // src/commands/xray/step/list.ts
4015
- function list17(parent) {
4145
+ function list18(parent) {
4016
4146
  const cmd = parent.command("list").description("List manual test steps for a Test issue").requiredOption("--test <key>", "Test issue key (e.g. PROJ-584)", issueKey);
4017
4147
  examples(cmd, ["--test PROJ-584"]);
4018
4148
  cmd.action(async (opts) => {
@@ -4055,7 +4185,7 @@ function registerStepCommands(xray) {
4055
4185
  "Manage manual test steps for a Test issue (scope: --test). Steps are ordered by insertion; use step list to see current ids."
4056
4186
  );
4057
4187
  examples(step, ['add --test PROJ-584 --action "Open login" --result "Form shows"', "list --test PROJ-584"]);
4058
- list17(step);
4188
+ list18(step);
4059
4189
  add7(step);
4060
4190
  update12(step);
4061
4191
  deleteStep(step);
@@ -4068,7 +4198,7 @@ var stepsSchema = z5.array(
4068
4198
  z5.object({ action: z5.string(), data: z5.string().optional(), result: z5.string().optional() })
4069
4199
  );
4070
4200
  function create11(parent) {
4071
- const cmd = parent.command("create").description("Create a new Xray Test issue").requiredOption("--project <key>", "Project key (e.g. AI)", text).requiredOption("--summary <text>", "Test summary (title)", text).addOption(
4201
+ const cmd = parent.command("create").description("Create a new Xray Test issue").requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--summary <text>", "Test summary (title)", text).addOption(
4072
4202
  new Option13("--type <type>", "Test type (when cucumber: also pass --gherkin; when generic: --definition)").choices(["manual", "cucumber", "generic"]).default("manual")
4073
4203
  ).addOption(
4074
4204
  new Option13("--cucumber-type <cucumberType>", "Cucumber scenario type (required when --type cucumber)").choices([
@@ -4156,7 +4286,7 @@ function deleteTest(parent) {
4156
4286
  }
4157
4287
 
4158
4288
  // src/commands/xray/test/get.ts
4159
- function get6(parent) {
4289
+ function get10(parent) {
4160
4290
  const cmd = parent.command("get").description("Get one or more Xray test issues by key").argument("<testKey...>", "One or more test issue keys (e.g. PROJ-584)", listOf(issueKey));
4161
4291
  examples(cmd, ["PROJ-584", "PROJ-584 PROJ-585"]);
4162
4292
  cmd.action(async (testKeys) => {
@@ -4167,7 +4297,7 @@ function get6(parent) {
4167
4297
  }
4168
4298
 
4169
4299
  // src/commands/xray/test/list.ts
4170
- function list18(parent) {
4300
+ function list19(parent) {
4171
4301
  const cmd = parent.command("list").description(
4172
4302
  "List Xray Test issues by scope: all tests in a project, or tests belonging to a set, plan, execution, precondition, or folder. Note: use `jiradc issue search` for richer JQL when scoping by project."
4173
4303
  ).option("--project <text>", "Project key \u2014 list all tests in the project (or companion to --folder)", text).option("--set <key>", "Test Set issue key \u2014 list tests in this set", issueKey).option("--plan <key>", "Test Plan issue key \u2014 list tests in this plan", issueKey).option("--execution <key>", "Test Execution issue key \u2014 list tests in this execution", issueKey).option("--precondition <key>", "Precondition issue key \u2014 list tests with this precondition", issueKey).option("--folder <id>", "Folder id \u2014 list tests in this folder (requires --project)", positiveInt).option("--limit <number>", "Max results (1-50, applies to --project scope)", intInRange(1, 50), 25).option("--start <number>", "Starting index for pagination (applies to --project scope)", nonNegativeInt);
@@ -4309,11 +4439,11 @@ function update13(parent) {
4309
4439
  function registerTestCommands(xray) {
4310
4440
  const test = xray.command("test").description("Xray Test issue management (CRUD)");
4311
4441
  examples(test, ["get PROJ-584", 'create --project PROJ --summary "Login" --type manual']);
4312
- get6(test);
4442
+ get10(test);
4313
4443
  create11(test);
4314
4444
  update13(test);
4315
4445
  deleteTest(test);
4316
- list18(test);
4446
+ list19(test);
4317
4447
  }
4318
4448
 
4319
4449
  // src/commands/xray/testset/add.ts
@@ -4329,7 +4459,7 @@ function add8(parent) {
4329
4459
 
4330
4460
  // src/commands/xray/testset/create.ts
4331
4461
  function create12(parent) {
4332
- const cmd = parent.command("create").description("Create a new Xray Test Set issue").requiredOption("--project <key>", "Project key (e.g. AI)", text).requiredOption("--summary <text>", "Test Set summary (title)", text);
4462
+ const cmd = parent.command("create").description("Create a new Xray Test Set issue").requiredOption("--project <key>", "Project key (e.g. PROJ)", text).requiredOption("--summary <text>", "Test Set summary (title)", text);
4333
4463
  textOrFileOption(cmd, "description", { description: "Test Set description" });
4334
4464
  examples(cmd, [
4335
4465
  '--project PROJ --summary "Smoke Test Set"',
@@ -4360,7 +4490,7 @@ function deleteTestset(parent) {
4360
4490
  }
4361
4491
 
4362
4492
  // src/commands/xray/testset/list.ts
4363
- function list19(parent) {
4493
+ function list20(parent) {
4364
4494
  const cmd = parent.command("list").description(
4365
4495
  "List Test Sets that contain a given test (inverse view). For the forward view (tests inside a set), use: xray test list --set <key>"
4366
4496
  ).requiredOption("--test <key>", "Test issue key whose sets to list (e.g. PROJ-584)", issueKey);
@@ -4407,7 +4537,7 @@ function registerTestsetCommands(xray) {
4407
4537
  deleteTestset(testset);
4408
4538
  add8(testset);
4409
4539
  remove6(testset);
4410
- list19(testset);
4540
+ list20(testset);
4411
4541
  }
4412
4542
 
4413
4543
  // src/commands/xray/index.ts