jiradc-cli 1.0.1 → 1.0.2
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/package.json +2 -2
- package/dist/commands/link/create.d.ts +0 -3
- package/dist/commands/link/create.d.ts.map +0 -1
- package/dist/commands/link/create.js +0 -28
- package/dist/commands/link/create.js.map +0 -1
- package/dist/commands/link/index.d.ts +0 -3
- package/dist/commands/link/index.d.ts.map +0 -1
- package/dist/commands/link/index.js +0 -18
- package/dist/commands/link/index.js.map +0 -1
- package/dist/commands/link/remove.d.ts +0 -3
- package/dist/commands/link/remove.d.ts.map +0 -1
- package/dist/commands/link/remove.js +0 -19
- package/dist/commands/link/remove.js.map +0 -1
- package/dist/commands/link/types.d.ts +0 -3
- package/dist/commands/link/types.d.ts.map +0 -1
- package/dist/commands/link/types.js +0 -19
- package/dist/commands/link/types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jiradc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"commander": "^13.1.0",
|
|
15
15
|
"dotenv": "17.2.3",
|
|
16
|
-
"jira-data-center-client": "1.0.
|
|
16
|
+
"jira-data-center-client": "1.0.26"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "24.10.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/link/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QA0BrC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output, handleError } from '../../utils/output.js';
|
|
3
|
-
export function create(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('create')
|
|
6
|
-
.description('Create a link between two issues')
|
|
7
|
-
.requiredOption('--type <name>', "Link type name (e.g., 'Blocks', 'Duplicate', 'Relates')")
|
|
8
|
-
.requiredOption('--from <key>', 'Inward issue key (the "is blocked by" side)')
|
|
9
|
-
.requiredOption('--to <key>', 'Outward issue key (the "blocks" side)')
|
|
10
|
-
.option('--comment <text>', 'Optional comment')
|
|
11
|
-
.addHelpText('after', '\nExamples:\n jiradc link create --type Blocks --from PROJ-456 --to PROJ-123\n jiradc link create --type Duplicate --from PROJ-456 --to PROJ-123 --comment "These are duplicates"')
|
|
12
|
-
.action(async (opts) => {
|
|
13
|
-
try {
|
|
14
|
-
const client = getClient();
|
|
15
|
-
await client.links.create({
|
|
16
|
-
typeName: opts.type,
|
|
17
|
-
inwardIssueKey: opts.from,
|
|
18
|
-
outwardIssueKey: opts.to,
|
|
19
|
-
comment: opts.comment,
|
|
20
|
-
});
|
|
21
|
-
output({ created: true, type: opts.type, inward: opts.from, outward: opts.to });
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
handleError(err);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/link/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,kCAAkC,CAAC;SAC/C,cAAc,CAAC,eAAe,EAAE,yDAAyD,CAAC;SAC1F,cAAc,CAAC,cAAc,EAAE,6CAA6C,CAAC;SAC7E,cAAc,CAAC,YAAY,EAAE,uCAAuC,CAAC;SACrE,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;SAC9C,WAAW,CACV,OAAO,EACP,qLAAqL,CACtL;SACA,MAAM,CAAC,KAAK,EAAE,IAAkE,EAAE,EAAE;QACnF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;gBACxB,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,eAAe,EAAE,IAAI,CAAC,EAAE;gBACxB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;YACH,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAClF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAgBpD"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { create } from './create.js';
|
|
2
|
-
import { remove } from './remove.js';
|
|
3
|
-
import { types } from './types.js';
|
|
4
|
-
export function registerLinkCommands(program) {
|
|
5
|
-
const link = program
|
|
6
|
-
.command('link')
|
|
7
|
-
.description('Issue link operations')
|
|
8
|
-
.addHelpText('after', `
|
|
9
|
-
Examples:
|
|
10
|
-
$ jiradc link types
|
|
11
|
-
$ jiradc link create --type "Relates" --from PROJ-123 --to PROJ-200
|
|
12
|
-
$ jiradc link remove 12345
|
|
13
|
-
`);
|
|
14
|
-
types(link);
|
|
15
|
-
create(link);
|
|
16
|
-
remove(link);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/link/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,uBAAuB,CAAC;SACpC,WAAW,CACV,OAAO,EACP;;;;;CAKL,CACI,CAAC;IACJ,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,MAAM,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/link/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QAcrC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output, handleError } from '../../utils/output.js';
|
|
3
|
-
export function remove(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('remove <id>')
|
|
6
|
-
.description('Remove a link between two issues')
|
|
7
|
-
.addHelpText('after', '\nExamples:\n jiradc link remove 12345')
|
|
8
|
-
.action(async (id) => {
|
|
9
|
-
try {
|
|
10
|
-
const client = getClient();
|
|
11
|
-
await client.links.remove({ linkId: id });
|
|
12
|
-
output({ removed: true, linkId: id });
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
handleError(err);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/commands/link/remove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,kCAAkC,CAAC;SAC/C,WAAW,CAAC,OAAO,EAAE,yCAAyC,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,EAAE;QAC3B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;YAC1C,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;QACxC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/link/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,QAcpC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output, handleError } from '../../utils/output.js';
|
|
3
|
-
export function types(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('types')
|
|
6
|
-
.description('List all issue link types')
|
|
7
|
-
.addHelpText('after', '\nExamples:\n jiradc link types')
|
|
8
|
-
.action(async () => {
|
|
9
|
-
try {
|
|
10
|
-
const client = getClient();
|
|
11
|
-
const result = await client.links.getTypes();
|
|
12
|
-
output(result);
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
handleError(err);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/link/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,KAAK,CAAC,MAAe;IACnC,MAAM;SACH,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,2BAA2B,CAAC;SACxC,WAAW,CAAC,OAAO,EAAE,kCAAkC,CAAC;SACxD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC7C,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|