jiradc-cli 1.0.17 → 1.0.18
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/README.md +1 -1
- package/dist/index.js +37 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ All commands output JSON. Add `--pretty` to pretty-print.
|
|
|
93
93
|
|
|
94
94
|
## Pagination
|
|
95
95
|
|
|
96
|
-
Search and list commands accept `--
|
|
96
|
+
Search and list commands accept `--limit` to control page size (Jira DC caps at 50 for agile endpoints). Responses include `nextPage` — pass it back as `--start` to fetch the next page. When `nextPage` is `null`, there are no more results.
|
|
97
97
|
|
|
98
98
|
## Examples
|
|
99
99
|
|
package/dist/index.js
CHANGED
|
@@ -434,15 +434,15 @@ function transformIssueFields(fields) {
|
|
|
434
434
|
|
|
435
435
|
// src/commands/board/issues.ts
|
|
436
436
|
function issues(parent) {
|
|
437
|
-
parent.command("issues").description("Get issues for a board").addArgument(new Argument("<id>", "Board ID").argParser(positiveInt)).option("--
|
|
437
|
+
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").option("--jql <jql>", "Additional JQL filter within the board").addHelpText(
|
|
438
438
|
"after",
|
|
439
|
-
'\nExamples:\n jiradc board issues 42\n jiradc board issues 42 --
|
|
439
|
+
'\nExamples:\n jiradc board issues 42\n jiradc board issues 42 --limit 10\n jiradc board issues 42 --jql "status = Open" --fields summary,status\n jiradc board issues 42 --start 50 --limit 25'
|
|
440
440
|
).action(async (id, opts) => {
|
|
441
441
|
const client = getClient();
|
|
442
442
|
const result = await client.agile.getBoardIssues({
|
|
443
443
|
boardId: id,
|
|
444
|
-
startAt: opts.
|
|
445
|
-
maxResults: opts.
|
|
444
|
+
startAt: opts.start,
|
|
445
|
+
maxResults: opts.limit,
|
|
446
446
|
fields: opts.fields?.split(",").map((f) => f.trim()),
|
|
447
447
|
jql: opts.jql
|
|
448
448
|
});
|
|
@@ -454,13 +454,13 @@ function issues(parent) {
|
|
|
454
454
|
import { Option } from "commander";
|
|
455
455
|
var BOARD_TYPES = ["scrum", "kanban", "simple"];
|
|
456
456
|
function list(parent) {
|
|
457
|
-
parent.command("list").description("List agile boards").option("--
|
|
457
|
+
parent.command("list").description("List agile boards").option("--limit <number>", "Max results (1-1000)", intInRange(1, 1e3), 25).option("--project <key>", "Filter boards by project key or ID").addOption(new Option("--type <type>", "Board type filter").choices(BOARD_TYPES)).option("--name <name>", "Filter boards by name").addHelpText(
|
|
458
458
|
"after",
|
|
459
|
-
'\nExamples:\n jiradc board list\n jiradc board list --
|
|
459
|
+
'\nExamples:\n jiradc board list\n jiradc board list --limit 10\n jiradc board list --project PROJ\n jiradc board list --type scrum --name "Team Board"'
|
|
460
460
|
).action(async (opts) => {
|
|
461
461
|
const client = getClient();
|
|
462
462
|
const result = await client.agile.getBoards({
|
|
463
|
-
maxResults: opts.
|
|
463
|
+
maxResults: opts.limit,
|
|
464
464
|
projectKeyOrId: opts.project,
|
|
465
465
|
type: opts.type,
|
|
466
466
|
name: opts.name
|
|
@@ -477,7 +477,7 @@ function registerBoardCommands(program2) {
|
|
|
477
477
|
Examples:
|
|
478
478
|
$ jiradc board list
|
|
479
479
|
$ jiradc board list --type scrum --project PROJ
|
|
480
|
-
$ jiradc board issues 42 --
|
|
480
|
+
$ jiradc board issues 42 --limit 20
|
|
481
481
|
`
|
|
482
482
|
);
|
|
483
483
|
list(board);
|
|
@@ -615,15 +615,15 @@ Examples:
|
|
|
615
615
|
|
|
616
616
|
// src/commands/field/options.ts
|
|
617
617
|
function options(parent) {
|
|
618
|
-
parent.command("options <id>").description("Get available options for a custom field").option("--query <text>", "Filter options by text").option("--
|
|
618
|
+
parent.command("options <id>").description("Get available options for a custom field").option("--query <text>", "Filter options by text").option("--limit <number>", "Max results to return (1-1000)", intInRange(1, 1e3), 25).option("--page <number>", "Page number (1-indexed)", positiveInt).addHelpText(
|
|
619
619
|
"after",
|
|
620
|
-
'\nExamples:\n jiradc field options 10001\n jiradc field options 10001 --query "High"\n jiradc field options 10001 --
|
|
620
|
+
'\nExamples:\n jiradc field options 10001\n jiradc field options 10001 --query "High"\n jiradc field options 10001 --limit 20 --page 2'
|
|
621
621
|
).action(async (id, opts) => {
|
|
622
622
|
const client = getClient();
|
|
623
623
|
const result = await client.fields.getFieldOptions({
|
|
624
624
|
fieldId: id,
|
|
625
625
|
query: opts.query,
|
|
626
|
-
maxResults: opts.
|
|
626
|
+
maxResults: opts.limit,
|
|
627
627
|
page: opts.page
|
|
628
628
|
});
|
|
629
629
|
output(transformPaged({ ...result, startAt: result.startAt ?? 0 }, transformCustomFieldOption));
|
|
@@ -842,16 +842,16 @@ function attachments(parent) {
|
|
|
842
842
|
|
|
843
843
|
// src/commands/issue/batch-changelog.ts
|
|
844
844
|
function batchChangelog(parent) {
|
|
845
|
-
parent.command("batch-changelog <keys>").description("Get changelogs for multiple issues at once").option("--
|
|
845
|
+
parent.command("batch-changelog <keys>").description("Get changelogs for multiple issues at once").option("--limit <number>", "Max changelog entries per issue (1-50, Jira DC caps at 50)", intInRange(1, 50), 25).addHelpText(
|
|
846
846
|
"after",
|
|
847
|
-
"\nExamples:\n jiradc issue batch-changelog PROJ-1,PROJ-2,PROJ-3\n jiradc issue batch-changelog PROJ-123,PROJ-124 --
|
|
847
|
+
"\nExamples:\n jiradc issue batch-changelog PROJ-1,PROJ-2,PROJ-3\n jiradc issue batch-changelog PROJ-123,PROJ-124 --limit 10"
|
|
848
848
|
).action(async (keys, opts) => {
|
|
849
849
|
const client = getClient();
|
|
850
850
|
const keyList = keys.split(",").map((k) => k.trim());
|
|
851
851
|
const entries = await Promise.all(
|
|
852
852
|
keyList.map(async (key) => {
|
|
853
853
|
try {
|
|
854
|
-
const data = await client.issues.getChangelog({ issueKeyOrId: key, maxResults: opts.
|
|
854
|
+
const data = await client.issues.getChangelog({ issueKeyOrId: key, maxResults: opts.limit });
|
|
855
855
|
return [key, data];
|
|
856
856
|
} catch (error) {
|
|
857
857
|
return [key, { error: error instanceof Error ? error.message : "Unknown error" }];
|
|
@@ -887,9 +887,12 @@ Examples:
|
|
|
887
887
|
|
|
888
888
|
// src/commands/issue/changelog.ts
|
|
889
889
|
function changelog(parent) {
|
|
890
|
-
parent.command("changelog <key>").description("Get changelog for an issue").option("--
|
|
890
|
+
parent.command("changelog <key>").description("Get changelog for an issue").option("--limit <number>", "Max changelog entries (1-50, Jira DC caps at 50)", intInRange(1, 50), 25).addHelpText(
|
|
891
|
+
"after",
|
|
892
|
+
"\nExamples:\n jiradc issue changelog PROJ-123\n jiradc issue changelog PROJ-123 --limit 10"
|
|
893
|
+
).action(async (key, opts) => {
|
|
891
894
|
const client = getClient();
|
|
892
|
-
const result = await client.issues.getChangelog({ issueKeyOrId: key, maxResults: opts.
|
|
895
|
+
const result = await client.issues.getChangelog({ issueKeyOrId: key, maxResults: opts.limit });
|
|
893
896
|
output(result);
|
|
894
897
|
});
|
|
895
898
|
}
|
|
@@ -1133,15 +1136,15 @@ function devStatus(parent) {
|
|
|
1133
1136
|
|
|
1134
1137
|
// src/commands/issue/get-worklog.ts
|
|
1135
1138
|
function getWorklog(parent) {
|
|
1136
|
-
parent.command("get-worklog <key>").description("Get worklogs for an issue").option("--start
|
|
1139
|
+
parent.command("get-worklog <key>").description("Get worklogs for an issue").option("--start <number>", "Starting index for pagination", nonNegativeInt).option("--limit <number>", "Max results per page (1-1000)", intInRange(1, 1e3), 25).addHelpText(
|
|
1137
1140
|
"after",
|
|
1138
|
-
"\nExamples:\n jiradc issue get-worklog PROJ-123\n jiradc issue get-worklog PROJ-123 --
|
|
1141
|
+
"\nExamples:\n jiradc issue get-worklog PROJ-123\n jiradc issue get-worklog PROJ-123 --limit 10\n jiradc issue get-worklog PROJ-123 --start 10 --limit 5"
|
|
1139
1142
|
).action(async (key, opts) => {
|
|
1140
1143
|
const client = getClient();
|
|
1141
1144
|
const result = await client.issues.getWorklogs({
|
|
1142
1145
|
issueKeyOrId: key,
|
|
1143
|
-
startAt: opts.
|
|
1144
|
-
maxResults: opts.
|
|
1146
|
+
startAt: opts.start,
|
|
1147
|
+
maxResults: opts.limit
|
|
1145
1148
|
});
|
|
1146
1149
|
output(transformPaged(result, transformWorklog));
|
|
1147
1150
|
});
|
|
@@ -1229,16 +1232,16 @@ function link(parent) {
|
|
|
1229
1232
|
|
|
1230
1233
|
// src/commands/issue/search.ts
|
|
1231
1234
|
function search2(parent) {
|
|
1232
|
-
parent.command("search <jql>").description("Search issues using JQL").option("--
|
|
1235
|
+
parent.command("search <jql>").description("Search issues using JQL").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 fields to return (defaults to essential fields)").option("--all-fields", "Return all fields instead of defaults").addHelpText(
|
|
1233
1236
|
"after",
|
|
1234
|
-
'\nExamples:\n jiradc issue search "project = PROJ AND status = Open"\n jiradc issue search "assignee = currentUser()" --
|
|
1237
|
+
'\nExamples:\n jiradc issue search "project = PROJ AND status = Open"\n jiradc issue search "assignee = currentUser()" --limit 10 --fields summary,status\n jiradc issue search "project = PROJ" --start 50 --limit 50'
|
|
1235
1238
|
).action(async (jql, opts) => {
|
|
1236
1239
|
const client = getClient();
|
|
1237
1240
|
const fields = opts.allFields ? void 0 : opts.fields?.split(",").map((f) => f.trim()) ?? DEFAULT_FIELDS;
|
|
1238
1241
|
const result = await client.issues.search({
|
|
1239
1242
|
jql,
|
|
1240
|
-
startAt: opts.
|
|
1241
|
-
maxResults: opts.
|
|
1243
|
+
startAt: opts.start,
|
|
1244
|
+
maxResults: opts.limit,
|
|
1242
1245
|
fields
|
|
1243
1246
|
});
|
|
1244
1247
|
output(transformPaged(result, transformIssue));
|
|
@@ -1336,7 +1339,7 @@ function registerIssueCommands(program2) {
|
|
|
1336
1339
|
`
|
|
1337
1340
|
Examples:
|
|
1338
1341
|
$ jiradc issue get PROJ-123
|
|
1339
|
-
$ jiradc issue search "project = PROJ AND status = Open" --
|
|
1342
|
+
$ jiradc issue search "project = PROJ AND status = Open" --limit 10
|
|
1340
1343
|
$ jiradc issue create --project PROJ --type Task --summary "Fix the bug" --priority High
|
|
1341
1344
|
$ jiradc issue update PROJ-123 --fields '{"summary": "New title"}'
|
|
1342
1345
|
$ jiradc issue transition PROJ-123 --to 11
|
|
@@ -1426,15 +1429,15 @@ function create3(parent) {
|
|
|
1426
1429
|
// src/commands/sprint/issues.ts
|
|
1427
1430
|
import { Argument as Argument2 } from "commander";
|
|
1428
1431
|
function issues2(parent) {
|
|
1429
|
-
parent.command("issues").description("Get issues in a sprint").addArgument(new Argument2("<id>", "Sprint ID").argParser(positiveInt)).option("--
|
|
1432
|
+
parent.command("issues").description("Get issues in a sprint").addArgument(new Argument2("<id>", "Sprint 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").option("--jql <jql>", "Additional JQL filter within the sprint").addHelpText(
|
|
1430
1433
|
"after",
|
|
1431
|
-
'\nExamples:\n jiradc sprint issues 100\n jiradc sprint issues 100 --
|
|
1434
|
+
'\nExamples:\n jiradc sprint issues 100\n jiradc sprint issues 100 --limit 20\n jiradc sprint issues 100 --jql "status = Done" --fields summary,status\n jiradc sprint issues 100 --start 50 --limit 25'
|
|
1432
1435
|
).action(async (id, opts) => {
|
|
1433
1436
|
const client = getClient();
|
|
1434
1437
|
const result = await client.agile.getSprintIssues({
|
|
1435
1438
|
sprintId: id,
|
|
1436
|
-
startAt: opts.
|
|
1437
|
-
maxResults: opts.
|
|
1439
|
+
startAt: opts.start,
|
|
1440
|
+
maxResults: opts.limit,
|
|
1438
1441
|
fields: opts.fields?.split(",").map((f) => f.trim()),
|
|
1439
1442
|
jql: opts.jql
|
|
1440
1443
|
});
|
|
@@ -1490,7 +1493,7 @@ function registerSprintCommands(program2) {
|
|
|
1490
1493
|
Examples:
|
|
1491
1494
|
$ jiradc sprint list --board 42
|
|
1492
1495
|
$ jiradc sprint list --board 42 --state active
|
|
1493
|
-
$ jiradc sprint issues 123 --
|
|
1496
|
+
$ jiradc sprint issues 123 --limit 20
|
|
1494
1497
|
$ jiradc sprint create --board 42 --name "Sprint 10" --start-date 2026-04-01 --end-date 2026-04-14
|
|
1495
1498
|
`
|
|
1496
1499
|
);
|
|
@@ -1625,15 +1628,15 @@ function me(parent) {
|
|
|
1625
1628
|
|
|
1626
1629
|
// src/commands/user/search.ts
|
|
1627
1630
|
function search3(parent) {
|
|
1628
|
-
parent.command("search <query>").description("Search users by partial username, display name or email").option("--
|
|
1631
|
+
parent.command("search <query>").description("Search users by partial username, display name or email").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).addHelpText(
|
|
1629
1632
|
"after",
|
|
1630
|
-
'\nExamples:\n jiradc user search Drago\n jiradc user search "John Smith"\n jiradc user search dragomir@first.bet --
|
|
1633
|
+
'\nExamples:\n jiradc user search Drago\n jiradc user search "John Smith"\n jiradc user search dragomir@first.bet --limit 5'
|
|
1631
1634
|
).action(async (query, opts) => {
|
|
1632
1635
|
const client = getClient();
|
|
1633
1636
|
const result = await client.users.searchUsers({
|
|
1634
1637
|
username: query,
|
|
1635
1638
|
startAt: opts.start,
|
|
1636
|
-
maxResults: opts.
|
|
1639
|
+
maxResults: opts.limit,
|
|
1637
1640
|
includeActive: true,
|
|
1638
1641
|
includeInactive: opts.includeInactive
|
|
1639
1642
|
});
|
|
@@ -1688,7 +1691,7 @@ ${styleText("bold", "Environment:")}
|
|
|
1688
1691
|
|
|
1689
1692
|
${styleText("bold", "Examples:")}
|
|
1690
1693
|
${DIM}$${RESET} jiradc user me
|
|
1691
|
-
${DIM}$${RESET} jiradc issue search "project = PROJ AND status = Open" --
|
|
1694
|
+
${DIM}$${RESET} jiradc issue search "project = PROJ AND status = Open" --limit 10
|
|
1692
1695
|
${DIM}$${RESET} jiradc issue get PROJ-123 --fields summary,status
|
|
1693
1696
|
${DIM}$${RESET} jiradc issue create --project PROJ --type Task --summary "Fix the bug"
|
|
1694
1697
|
${DIM}$${RESET} jiradc issue transition PROJ-123 --to 11
|