jiradc-cli 1.0.15 → 1.0.16-g383ce14.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.
- package/dist/index.js +34 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1500,12 +1500,39 @@ Examples:
|
|
|
1500
1500
|
update3(sprint);
|
|
1501
1501
|
}
|
|
1502
1502
|
|
|
1503
|
+
// src/commands/user/get.ts
|
|
1504
|
+
function get3(parent) {
|
|
1505
|
+
parent.command("get <username>").description("Get a user profile by exact username or key").option("--by-key", "Treat the positional argument as a user key instead of a username").addHelpText("after", "\nExamples:\n jiradc user get jsmith\n jiradc user get JIRAUSER10100 --by-key").action(async (identifier, opts) => {
|
|
1506
|
+
const client = getClient();
|
|
1507
|
+
const result = await client.users.getUser(opts.byKey ? { key: identifier } : { username: identifier });
|
|
1508
|
+
output(transformUser(result));
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1503
1512
|
// src/commands/user/me.ts
|
|
1504
1513
|
function me(parent) {
|
|
1505
|
-
parent.command("me
|
|
1514
|
+
parent.command("me").description("Get the authenticated user profile").addHelpText("after", "\nExamples:\n jiradc user me").action(async () => {
|
|
1506
1515
|
const client = getClient();
|
|
1507
|
-
const result =
|
|
1508
|
-
output(result);
|
|
1516
|
+
const result = await client.users.getMyself();
|
|
1517
|
+
output(transformUser(result));
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
// src/commands/user/search.ts
|
|
1522
|
+
function search3(parent) {
|
|
1523
|
+
parent.command("search <query>").description("Search users by partial username, display name or email").option("--max <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(
|
|
1524
|
+
"after",
|
|
1525
|
+
'\nExamples:\n jiradc user search Drago\n jiradc user search "John Smith"\n jiradc user search dragomir@first.bet --max 5'
|
|
1526
|
+
).action(async (query, opts) => {
|
|
1527
|
+
const client = getClient();
|
|
1528
|
+
const result = await client.users.searchUsers({
|
|
1529
|
+
username: query,
|
|
1530
|
+
startAt: opts.start,
|
|
1531
|
+
maxResults: opts.max,
|
|
1532
|
+
includeActive: true,
|
|
1533
|
+
includeInactive: opts.includeInactive
|
|
1534
|
+
});
|
|
1535
|
+
output(result.map(transformUser));
|
|
1509
1536
|
});
|
|
1510
1537
|
}
|
|
1511
1538
|
|
|
@@ -1516,10 +1543,13 @@ function registerUserCommands(program2) {
|
|
|
1516
1543
|
`
|
|
1517
1544
|
Examples:
|
|
1518
1545
|
$ jiradc user me
|
|
1519
|
-
$ jiradc user
|
|
1546
|
+
$ jiradc user get jsmith
|
|
1547
|
+
$ jiradc user search Drago
|
|
1520
1548
|
`
|
|
1521
1549
|
);
|
|
1522
1550
|
me(user);
|
|
1551
|
+
get3(user);
|
|
1552
|
+
search3(user);
|
|
1523
1553
|
}
|
|
1524
1554
|
|
|
1525
1555
|
// src/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jiradc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16-g383ce14.1",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"commander": "^13.1.0",
|
|
15
|
-
"jira-data-center-client": "1.0.
|
|
15
|
+
"jira-data-center-client": "1.0.34-g383ce14.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "24.10.4",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"tsx": "^4.19.2",
|
|
23
23
|
"typescript": "^5.7.2",
|
|
24
24
|
"vitest": "^4.0.16",
|
|
25
|
-
"config-
|
|
26
|
-
"config-
|
|
25
|
+
"config-eslint": "0.0.0",
|
|
26
|
+
"config-typescript": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.0.0"
|