jiradc-cli 0.0.17 → 1.0.0
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/commands/issue/search.d.ts.map +1 -1
- package/dist/commands/issue/search.js +1 -4
- package/dist/commands/issue/search.js.map +1 -1
- package/dist/commands/link/create.d.ts +3 -0
- package/dist/commands/link/create.d.ts.map +1 -0
- package/dist/commands/link/create.js +28 -0
- package/dist/commands/link/create.js.map +1 -0
- package/dist/commands/link/index.d.ts +3 -0
- package/dist/commands/link/index.d.ts.map +1 -0
- package/dist/commands/link/index.js +18 -0
- package/dist/commands/link/index.js.map +1 -0
- package/dist/commands/link/remove.d.ts +3 -0
- package/dist/commands/link/remove.d.ts.map +1 -0
- package/dist/commands/link/remove.js +19 -0
- package/dist/commands/link/remove.js.map +1 -0
- package/dist/commands/link/types.d.ts +3 -0
- package/dist/commands/link/types.d.ts.map +1 -0
- package/dist/commands/link/types.js +19 -0
- package/dist/commands/link/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/issue/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/issue/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA2B5C"}
|
|
@@ -10,11 +10,8 @@ export function search(parent) {
|
|
|
10
10
|
.option('--fields <fields>', 'Comma-separated fields to return (defaults to essential fields)')
|
|
11
11
|
.option('--all-fields', 'Return all fields instead of defaults')
|
|
12
12
|
.addHelpText('after', '\nExamples:\n jiradc issue search "project = PROJ AND status = Open"\n jiradc issue search "assignee = currentUser()" --max 10 --fields summary,status\n jiradc issue search "project = PROJ" --start-at 50 --max 50')
|
|
13
|
-
.action(async (
|
|
13
|
+
.action(async (jql, opts) => {
|
|
14
14
|
try {
|
|
15
|
-
// CLI execution environments (Claude Code Bash tool, etc.) escape ! to \!
|
|
16
|
-
// in single-quoted strings — unescape so JQL != operators work correctly
|
|
17
|
-
const jql = rawJql.replace(/\\!/g, '!');
|
|
18
15
|
const client = getClient();
|
|
19
16
|
const fields = opts.allFields ? undefined : (opts.fields?.split(',').map((f) => f.trim()) ?? DEFAULT_FIELDS);
|
|
20
17
|
const result = await client.issues.search({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/commands/issue/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,yBAAyB,CAAC;SACtC,MAAM,CAAC,gBAAgB,EAAE,2BAA2B,EAAE,QAAQ,CAAC;SAC/D,MAAM,CAAC,qBAAqB,EAAE,4CAA4C,EAAE,QAAQ,CAAC;SACrF,MAAM,CAAC,mBAAmB,EAAE,iEAAiE,CAAC;SAC9F,MAAM,CAAC,cAAc,EAAE,uCAAuC,CAAC;SAC/D,WAAW,CACV,OAAO,EACP,yNAAyN,CAC1N;SACA,MAAM,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/commands/issue/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,M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../../src/commands/link/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QA0BrC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|