bitbucketdc-cli 1.0.1 → 1.0.3
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/commit/changes.d.ts +3 -0
- package/dist/commands/commit/changes.d.ts.map +1 -0
- package/dist/commands/commit/changes.js +25 -0
- package/dist/commands/commit/changes.js.map +1 -0
- package/dist/commands/commit/diff.d.ts +3 -0
- package/dist/commands/commit/diff.d.ts.map +1 -0
- package/dist/commands/commit/diff.js +38 -0
- package/dist/commands/commit/diff.js.map +1 -0
- package/dist/commands/commit/index.d.ts +3 -0
- package/dist/commands/commit/index.d.ts.map +1 -0
- package/dist/commands/commit/index.js +16 -0
- package/dist/commands/commit/index.js.map +1 -0
- package/dist/commands/compare/changes.d.ts +3 -0
- package/dist/commands/compare/changes.d.ts.map +1 -0
- package/dist/commands/compare/changes.js +27 -0
- package/dist/commands/compare/changes.js.map +1 -0
- package/dist/commands/compare/diff.d.ts +3 -0
- package/dist/commands/compare/diff.d.ts.map +1 -0
- package/dist/commands/compare/diff.js +32 -0
- package/dist/commands/compare/diff.js.map +1 -0
- package/dist/commands/compare/index.d.ts +3 -0
- package/dist/commands/compare/index.d.ts.map +1 -0
- package/dist/commands/compare/index.js +16 -0
- package/dist/commands/compare/index.js.map +1 -0
- package/dist/commands/file/index.d.ts +3 -0
- package/dist/commands/file/index.d.ts.map +1 -0
- package/dist/commands/file/index.js +16 -0
- package/dist/commands/file/index.js.map +1 -0
- package/dist/commands/file/list.d.ts +3 -0
- package/dist/commands/file/list.d.ts.map +1 -0
- package/dist/commands/file/list.js +26 -0
- package/dist/commands/file/list.js.map +1 -0
- package/dist/commands/file/show.d.ts +3 -0
- package/dist/commands/file/show.d.ts.map +1 -0
- package/dist/commands/file/show.js +24 -0
- package/dist/commands/file/show.js.map +1 -0
- package/dist/commands/pr/activities.d.ts.map +1 -1
- package/dist/commands/pr/activities.js +16 -21
- package/dist/commands/pr/activities.js.map +1 -1
- package/dist/commands/pr/can-merge.d.ts.map +1 -1
- package/dist/commands/pr/can-merge.js +8 -13
- package/dist/commands/pr/can-merge.js.map +1 -1
- package/dist/commands/pr/changes.d.ts.map +1 -1
- package/dist/commands/pr/changes.js +9 -14
- package/dist/commands/pr/changes.js.map +1 -1
- package/dist/commands/pr/comment.d.ts.map +1 -1
- package/dist/commands/pr/comment.js +10 -15
- package/dist/commands/pr/comment.js.map +1 -1
- package/dist/commands/pr/create.d.ts.map +1 -1
- package/dist/commands/pr/create.js +25 -30
- package/dist/commands/pr/create.js.map +1 -1
- package/dist/commands/pr/decline.d.ts.map +1 -1
- package/dist/commands/pr/decline.js +8 -13
- package/dist/commands/pr/decline.js.map +1 -1
- package/dist/commands/pr/delete-comment.d.ts.map +1 -1
- package/dist/commands/pr/delete-comment.js +17 -22
- package/dist/commands/pr/delete-comment.js.map +1 -1
- package/dist/commands/pr/delete.d.ts.map +1 -1
- package/dist/commands/pr/delete.js +8 -13
- package/dist/commands/pr/delete.js.map +1 -1
- package/dist/commands/pr/diff.d.ts.map +1 -1
- package/dist/commands/pr/diff.js +17 -22
- package/dist/commands/pr/diff.js.map +1 -1
- package/dist/commands/pr/edit-comment.d.ts.map +1 -1
- package/dist/commands/pr/edit-comment.js +18 -23
- package/dist/commands/pr/edit-comment.js.map +1 -1
- package/dist/commands/pr/file-comment.d.ts.map +1 -1
- package/dist/commands/pr/file-comment.js +10 -15
- package/dist/commands/pr/file-comment.js.map +1 -1
- package/dist/commands/pr/file-diff.d.ts.map +1 -1
- package/dist/commands/pr/file-diff.js +10 -15
- package/dist/commands/pr/file-diff.js.map +1 -1
- package/dist/commands/pr/get.d.ts.map +1 -1
- package/dist/commands/pr/get.js +8 -13
- package/dist/commands/pr/get.js.map +1 -1
- package/dist/commands/pr/inbox.d.ts.map +1 -1
- package/dist/commands/pr/inbox.js +7 -12
- package/dist/commands/pr/inbox.js.map +1 -1
- package/dist/commands/pr/line-comment.d.ts.map +1 -1
- package/dist/commands/pr/line-comment.js +13 -18
- package/dist/commands/pr/line-comment.js.map +1 -1
- package/dist/commands/pr/merge.d.ts.map +1 -1
- package/dist/commands/pr/merge.js +10 -15
- package/dist/commands/pr/merge.js.map +1 -1
- package/dist/commands/pr/reaction-add.d.ts.map +1 -1
- package/dist/commands/pr/reaction-add.js +10 -15
- package/dist/commands/pr/reaction-add.js.map +1 -1
- package/dist/commands/pr/reaction-remove.d.ts.map +1 -1
- package/dist/commands/pr/reaction-remove.js +10 -15
- package/dist/commands/pr/reaction-remove.js.map +1 -1
- package/dist/commands/pr/review.d.ts.map +1 -1
- package/dist/commands/pr/review.js +9 -14
- package/dist/commands/pr/review.js.map +1 -1
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +13 -18
- package/dist/commands/pr/update.js.map +1 -1
- package/dist/commands/project/list.d.ts.map +1 -1
- package/dist/commands/project/list.js +9 -14
- package/dist/commands/project/list.js.map +1 -1
- package/dist/commands/repo/attachment/download.d.ts.map +1 -1
- package/dist/commands/repo/attachment/download.js +9 -14
- package/dist/commands/repo/attachment/download.js.map +1 -1
- package/dist/commands/repo/attachment/upload.d.ts.map +1 -1
- package/dist/commands/repo/attachment/upload.js +26 -31
- package/dist/commands/repo/attachment/upload.js.map +1 -1
- package/dist/commands/repo/list.d.ts.map +1 -1
- package/dist/commands/repo/list.js +4 -9
- package/dist/commands/repo/list.js.map +1 -1
- package/dist/commands/user/list.d.ts.map +1 -1
- package/dist/commands/user/list.js +4 -9
- package/dist/commands/user/list.js.map +1 -1
- package/dist/commands/user/profile.d.ts.map +1 -1
- package/dist/commands/user/profile.js +4 -9
- package/dist/commands/user/profile.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/client.js +1 -1
- package/dist/utils/client.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from 'commander';
|
|
2
2
|
import { getClient } from '../../utils/client.js';
|
|
3
|
-
import { output
|
|
3
|
+
import { output } from '../../utils/output.js';
|
|
4
4
|
export function lineComment(parent) {
|
|
5
5
|
parent
|
|
6
6
|
.command('line-comment')
|
|
@@ -19,23 +19,18 @@ export function lineComment(parent) {
|
|
|
19
19
|
bitbucketdc pr line-comment --project PROJ --repo my-repo --id 42 --text "Use const here" --path src/main.ts --line 15 --line-type ADDED --file-type TO
|
|
20
20
|
bitbucketdc pr line-comment --project PROJ --repo my-repo --id 42 --text "Was this intentional?" --path src/old.ts --line 8 --line-type REMOVED --file-type FROM`)
|
|
21
21
|
.action(async (opts) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
output(result);
|
|
35
|
-
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
handleError(err);
|
|
38
|
-
}
|
|
22
|
+
const client = getClient();
|
|
23
|
+
const result = await client.pullRequests.addComment({
|
|
24
|
+
projectKey: opts.project,
|
|
25
|
+
repositorySlug: opts.repo,
|
|
26
|
+
pullRequestId: parseInt(opts.id),
|
|
27
|
+
text: opts.text,
|
|
28
|
+
path: opts.path,
|
|
29
|
+
line: parseInt(opts.line),
|
|
30
|
+
lineType: opts.lineType,
|
|
31
|
+
fileType: opts.fileType,
|
|
32
|
+
});
|
|
33
|
+
output(result);
|
|
39
34
|
});
|
|
40
35
|
}
|
|
41
36
|
//# sourceMappingURL=line-comment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-comment.js","sourceRoot":"","sources":["../../../src/commands/pr/line-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
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;YAChC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,IAAI,CAAC,QAA2C;YAC1D,QAAQ,EAAE,IAAI,CAAC,QAAyB;SACzC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,QA2BpC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../utils/output.js';
|
|
3
3
|
export function merge(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('merge')
|
|
@@ -14,20 +14,15 @@ export function merge(parent) {
|
|
|
14
14
|
bitbucketdc pr merge --project PROJ --repo my-repo --id 42 --strategy squash
|
|
15
15
|
bitbucketdc pr merge --project PROJ --repo my-repo --id 42 --message "Merge feature X"`)
|
|
16
16
|
.action(async (opts) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
output(result);
|
|
27
|
-
}
|
|
28
|
-
catch (err) {
|
|
29
|
-
handleError(err);
|
|
30
|
-
}
|
|
17
|
+
const client = getClient();
|
|
18
|
+
const result = await client.pullRequests.merge({
|
|
19
|
+
projectKey: opts.project,
|
|
20
|
+
repositorySlug: opts.repo,
|
|
21
|
+
pullRequestId: opts.id,
|
|
22
|
+
strategyId: opts.strategy,
|
|
23
|
+
message: opts.message,
|
|
24
|
+
});
|
|
25
|
+
output(result);
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=merge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/commands/pr/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/commands/pr/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,KAAK,CAAC,MAAe;IACnC,MAAM;SACH,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,sBAAsB,CAAC;SACnC,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC;SACvD,MAAM,CAAC,iBAAiB,EAAE,iFAAiF,CAAC;SAC5G,MAAM,CAAC,kBAAkB,EAAE,6BAA6B,CAAC;SACzD,WAAW,CACV,OAAO,EACP;;;yFAGmF,CACpF;SACA,MAAM,CAAC,KAAK,EAAE,IAAwF,EAAE,EAAE;QACzG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC;YAC7C,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,IAAI,CAAC,EAAE;YACtB,UAAU,EAAE,IAAI,CAAC,QAAQ;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-add.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/reaction-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"reaction-add.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/reaction-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,QA8B1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from 'commander';
|
|
2
2
|
import { getClient } from '../../utils/client.js';
|
|
3
|
-
import { output
|
|
3
|
+
import { output } from '../../utils/output.js';
|
|
4
4
|
export function reactionAdd(parent) {
|
|
5
5
|
parent
|
|
6
6
|
.command('reaction-add')
|
|
@@ -16,20 +16,15 @@ export function reactionAdd(parent) {
|
|
|
16
16
|
bitbucketdc pr reaction-add --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon thumbsup
|
|
17
17
|
bitbucketdc pr reaction-add --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon heart`)
|
|
18
18
|
.action(async (opts) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
output(result);
|
|
29
|
-
}
|
|
30
|
-
catch (err) {
|
|
31
|
-
handleError(err);
|
|
32
|
-
}
|
|
19
|
+
const client = getClient();
|
|
20
|
+
const result = await client.pullRequests.addReaction({
|
|
21
|
+
projectKey: opts.project,
|
|
22
|
+
repositorySlug: opts.repo,
|
|
23
|
+
pullRequestId: parseInt(opts.id),
|
|
24
|
+
commentId: parseInt(opts.commentId),
|
|
25
|
+
emoticon: opts.emoticon,
|
|
26
|
+
});
|
|
27
|
+
output(result);
|
|
33
28
|
});
|
|
34
29
|
}
|
|
35
30
|
//# sourceMappingURL=reaction-add.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-add.js","sourceRoot":"","sources":["../../../src/commands/pr/reaction-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"reaction-add.js","sourceRoot":"","sources":["../../../src/commands/pr/reaction-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,WAAW,CAAC,MAAe;IACzC,MAAM;SACH,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,0CAA0C,CAAC;SACvD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,cAAc,CAAC,kBAAkB,EAAE,YAAY,CAAC;SAChD,SAAS,CACR,IAAI,MAAM,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;SACtD,OAAO,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;SACzE,mBAAmB,EAAE,CACzB;SACA,WAAW,CACV,OAAO,EACP;;sGAEgG,CACjG;SACA,MAAM,CAAC,KAAK,EAAE,IAAwF,EAAE,EAAE;QACzG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC;YACnD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-remove.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/reaction-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"reaction-remove.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/reaction-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,QA6B7C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from 'commander';
|
|
2
2
|
import { getClient } from '../../utils/client.js';
|
|
3
|
-
import { output
|
|
3
|
+
import { output } from '../../utils/output.js';
|
|
4
4
|
export function reactionRemove(parent) {
|
|
5
5
|
parent
|
|
6
6
|
.command('reaction-remove')
|
|
@@ -15,20 +15,15 @@ export function reactionRemove(parent) {
|
|
|
15
15
|
.addHelpText('after', `\nExamples:
|
|
16
16
|
bitbucketdc pr reaction-remove --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon thumbsup`)
|
|
17
17
|
.action(async (opts) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
output({ removed: true, emoticon: opts.emoticon });
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
handleError(err);
|
|
31
|
-
}
|
|
18
|
+
const client = getClient();
|
|
19
|
+
await client.pullRequests.removeReaction({
|
|
20
|
+
projectKey: opts.project,
|
|
21
|
+
repositorySlug: opts.repo,
|
|
22
|
+
pullRequestId: parseInt(opts.id),
|
|
23
|
+
commentId: parseInt(opts.commentId),
|
|
24
|
+
emoticon: opts.emoticon,
|
|
25
|
+
});
|
|
26
|
+
output({ removed: true, emoticon: opts.emoticon });
|
|
32
27
|
});
|
|
33
28
|
}
|
|
34
29
|
//# sourceMappingURL=reaction-remove.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-remove.js","sourceRoot":"","sources":["../../../src/commands/pr/reaction-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"reaction-remove.js","sourceRoot":"","sources":["../../../src/commands/pr/reaction-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,cAAc,CAAC,MAAe;IAC5C,MAAM;SACH,OAAO,CAAC,iBAAiB,CAAC;SAC1B,WAAW,CAAC,+CAA+C,CAAC;SAC5D,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,cAAc,CAAC,kBAAkB,EAAE,YAAY,CAAC;SAChD,SAAS,CACR,IAAI,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;SAClD,OAAO,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;SACzE,mBAAmB,EAAE,CACzB;SACA,WAAW,CACV,OAAO,EACP;4GACsG,CACvG;SACA,MAAM,CAAC,KAAK,EAAE,IAAwF,EAAE,EAAE;QACzG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC;YACvC,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QA6BrC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from 'commander';
|
|
2
2
|
import { getClient } from '../../utils/client.js';
|
|
3
|
-
import { output
|
|
3
|
+
import { output } from '../../utils/output.js';
|
|
4
4
|
export function review(parent) {
|
|
5
5
|
parent
|
|
6
6
|
.command('review')
|
|
@@ -16,19 +16,14 @@ export function review(parent) {
|
|
|
16
16
|
bitbucketdc pr review --project PROJ --repo my-repo --id 42 --status NEEDS_WORK
|
|
17
17
|
bitbucketdc pr review --project PROJ --repo my-repo --id 42 --status UNAPPROVED`)
|
|
18
18
|
.action(async (opts) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
output(result);
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
handleError(err);
|
|
31
|
-
}
|
|
19
|
+
const client = getClient();
|
|
20
|
+
const result = await client.pullRequests.updateReviewStatus({
|
|
21
|
+
projectKey: opts.project,
|
|
22
|
+
repositorySlug: opts.repo,
|
|
23
|
+
pullRequestId: parseInt(opts.id),
|
|
24
|
+
status: opts.status,
|
|
25
|
+
});
|
|
26
|
+
output(result);
|
|
32
27
|
});
|
|
33
28
|
}
|
|
34
29
|
//# sourceMappingURL=review.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/commands/pr/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/commands/pr/review.ts"],"names":[],"mappings":"A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,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QAgCrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../utils/output.js';
|
|
3
3
|
export function update(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('update')
|
|
@@ -14,24 +14,19 @@ export function update(parent) {
|
|
|
14
14
|
bitbucketdc pr update --project PROJ --repo my-repo --id 42 --description "Updated description"
|
|
15
15
|
bitbucketdc pr update --project PROJ --repo my-repo --id 42 --title "New" --description "Both"`)
|
|
16
16
|
.action(async (opts) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
const client = getClient();
|
|
23
|
-
const result = await client.pullRequests.update({
|
|
24
|
-
projectKey: opts.project,
|
|
25
|
-
repositorySlug: opts.repo,
|
|
26
|
-
pullRequestId: opts.id,
|
|
27
|
-
title: opts.title,
|
|
28
|
-
description: opts.description,
|
|
29
|
-
});
|
|
30
|
-
output(result);
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
handleError(err);
|
|
17
|
+
if (!opts.title && !opts.description) {
|
|
18
|
+
process.stderr.write(`${JSON.stringify({ error: 'At least one of --title or --description is required' })}\n`);
|
|
19
|
+
process.exit(1);
|
|
34
20
|
}
|
|
21
|
+
const client = getClient();
|
|
22
|
+
const result = await client.pullRequests.update({
|
|
23
|
+
projectKey: opts.project,
|
|
24
|
+
repositorySlug: opts.repo,
|
|
25
|
+
pullRequestId: opts.id,
|
|
26
|
+
title: opts.title,
|
|
27
|
+
description: opts.description,
|
|
28
|
+
});
|
|
29
|
+
output(result);
|
|
35
30
|
});
|
|
36
31
|
}
|
|
37
32
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/pr/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/pr/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,gDAAgD,CAAC;SAC7D,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC;SACvD,MAAM,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;SACnD,MAAM,CAAC,sBAAsB,EAAE,8BAA8B,CAAC;SAC9D,WAAW,CACV,OAAO,EACP;;;iGAG2F,CAC5F;SACA,MAAM,CAAC,KAAK,EAAE,IAAyF,EAAE,EAAE;QAC1G,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,sDAAsD,EAAE,CAAC,IAAI,CAAC,CAAC;YAC/G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;YAC9C,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,IAAI,CAAC,EAAE;YACtB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/project/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/project/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,QAsBnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../utils/output.js';
|
|
3
3
|
export function list(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('list')
|
|
@@ -10,19 +10,14 @@ export function list(parent) {
|
|
|
10
10
|
.option('--limit <limit>', 'Maximum number of projects to return', parseInt)
|
|
11
11
|
.addHelpText('after', '\nExamples:\n bitbucketdc project list\n bitbucketdc project list --name "My Project"\n bitbucketdc project list --permission PROJECT_READ --limit 10')
|
|
12
12
|
.action(async (opts) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
output(result);
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
handleError(err);
|
|
25
|
-
}
|
|
13
|
+
const client = getClient();
|
|
14
|
+
const result = await client.projects.list({
|
|
15
|
+
name: opts.name,
|
|
16
|
+
permission: opts.permission,
|
|
17
|
+
start: opts.start,
|
|
18
|
+
limit: opts.limit,
|
|
19
|
+
});
|
|
20
|
+
output(result);
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
23
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/project/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/project/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,eAAe,CAAC;SAC5B,MAAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;SAClE,MAAM,CAAC,2BAA2B,EAAE,yEAAyE,CAAC;SAC9G,MAAM,CAAC,iBAAiB,EAAE,+BAA+B,EAAE,QAAQ,CAAC;SACpE,MAAM,CAAC,iBAAiB,EAAE,sCAAsC,EAAE,QAAQ,CAAC;SAC3E,WAAW,CACV,OAAO,EACP,0JAA0J,CAC3J;SACA,MAAM,CAAC,KAAK,EAAE,IAA4E,EAAE,EAAE;QAC7F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YACxC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,QAsBvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../../utils/output.js';
|
|
3
3
|
export function download(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('download')
|
|
@@ -10,19 +10,14 @@ export function download(parent) {
|
|
|
10
10
|
.requiredOption('--output <path>', 'Destination file path')
|
|
11
11
|
.addHelpText('after', '\nExamples:\n bitbucketdc repo attachment download --project PROJ --repo my-repo --id abc123 --output ./file.png')
|
|
12
12
|
.action(async (opts) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
output({ downloaded: true, path: opts.output, attachmentId: opts.id });
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
handleError(err);
|
|
25
|
-
}
|
|
13
|
+
const client = getClient();
|
|
14
|
+
await client.repositories.downloadAttachment({
|
|
15
|
+
projectKey: opts.project,
|
|
16
|
+
repositorySlug: opts.repo,
|
|
17
|
+
attachmentId: opts.id,
|
|
18
|
+
destinationPath: opts.output,
|
|
19
|
+
});
|
|
20
|
+
output({ downloaded: true, path: opts.output, attachmentId: opts.id });
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
23
|
//# sourceMappingURL=download.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/download.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/download.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,UAAU,QAAQ,CAAC,MAAe;IACtC,MAAM;SACH,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,0CAA0C,CAAC;SACvD,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC;SAChD,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,qBAAqB,EAAE,eAAe,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,WAAW,CACV,OAAO,EACP,mHAAmH,CACpH;SACA,MAAM,CAAC,KAAK,EAAE,IAAmE,EAAE,EAAE;QACpF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC;YAC3C,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,YAAY,EAAE,IAAI,CAAC,EAAE;YACrB,eAAe,EAAE,IAAI,CAAC,MAAM;SAC7B,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QAyCrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../../utils/output.js';
|
|
3
3
|
export function upload(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('upload')
|
|
@@ -9,38 +9,33 @@ export function upload(parent) {
|
|
|
9
9
|
.requiredOption('--files <paths>', 'Comma-separated local file paths')
|
|
10
10
|
.addHelpText('after', '\nExamples:\n bitbucketdc repo attachment upload --project PROJ --repo my-repo --files screenshot.png\n bitbucketdc repo attachment upload --project PROJ --repo my-repo --files file1.png,file2.pdf')
|
|
11
11
|
.action(async (opts) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
failed.push({ filePath, error: err instanceof Error ? err.message : String(err) });
|
|
31
|
-
}
|
|
12
|
+
const client = getClient();
|
|
13
|
+
const filePaths = opts.files
|
|
14
|
+
.split(',')
|
|
15
|
+
.map((p) => p.trim())
|
|
16
|
+
.filter(Boolean);
|
|
17
|
+
const results = [];
|
|
18
|
+
const failed = [];
|
|
19
|
+
for (const filePath of filePaths) {
|
|
20
|
+
try {
|
|
21
|
+
const result = await client.repositories.uploadAttachment({
|
|
22
|
+
projectKey: opts.project,
|
|
23
|
+
repositorySlug: opts.repo,
|
|
24
|
+
filePath,
|
|
25
|
+
});
|
|
26
|
+
results.push({ id: result.id, url: result.url });
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
failed.push({ filePath, error: err instanceof Error ? err.message : String(err) });
|
|
32
30
|
}
|
|
33
|
-
output({
|
|
34
|
-
project: opts.project,
|
|
35
|
-
repo: opts.repo,
|
|
36
|
-
uploaded: results.length,
|
|
37
|
-
attachments: results,
|
|
38
|
-
...(failed.length > 0 && { failed }),
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
catch (err) {
|
|
42
|
-
handleError(err);
|
|
43
31
|
}
|
|
32
|
+
output({
|
|
33
|
+
project: opts.project,
|
|
34
|
+
repo: opts.repo,
|
|
35
|
+
uploaded: results.length,
|
|
36
|
+
attachments: results,
|
|
37
|
+
...(failed.length > 0 && { failed }),
|
|
38
|
+
});
|
|
44
39
|
});
|
|
45
40
|
}
|
|
46
41
|
//# sourceMappingURL=upload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/upload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/upload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,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OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,OAAO,CAAC,MAAM;YACxB,WAAW,EAAE,OAAO;YACpB,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;SACrC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/repo/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/repo/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,QAUnC"}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../utils/output.js';
|
|
3
3
|
export function list(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('list <projectKey>')
|
|
6
6
|
.description('List repositories in a project')
|
|
7
7
|
.addHelpText('after', '\nExamples:\n bitbucketdc repo list PROJ\n bitbucketdc repo list MYPROJ')
|
|
8
8
|
.action(async (projectKey) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
output(result);
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
handleError(err);
|
|
16
|
-
}
|
|
9
|
+
const client = getClient();
|
|
10
|
+
const result = await client.repositories.list({ projectKey });
|
|
11
|
+
output(result);
|
|
17
12
|
});
|
|
18
13
|
}
|
|
19
14
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/repo/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/repo/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,gCAAgC,CAAC;SAC7C,WAAW,CAAC,OAAO,EAAE,2EAA2E,CAAC;SACjG,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;QACnC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC9D,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/user/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/user/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,QAWnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output
|
|
2
|
+
import { output } from '../../utils/output.js';
|
|
3
3
|
export function list(parent) {
|
|
4
4
|
parent
|
|
5
5
|
.command('list')
|
|
@@ -7,14 +7,9 @@ export function list(parent) {
|
|
|
7
7
|
.option('--filter <filter>', 'Filter users by username, name or email (partial match)')
|
|
8
8
|
.addHelpText('after', '\nExamples:\n bitbucketdc user list\n bitbucketdc user list --filter john')
|
|
9
9
|
.action(async (opts) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
output(result);
|
|
14
|
-
}
|
|
15
|
-
catch (err) {
|
|
16
|
-
handleError(err);
|
|
17
|
-
}
|
|
10
|
+
const client = getClient();
|
|
11
|
+
const result = await client.users.getAll(opts.filter ? { filter: opts.filter } : undefined);
|
|
12
|
+
output(result);
|
|
18
13
|
});
|
|
19
14
|
}
|
|
20
15
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/user/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/user/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,gBAAgB,CAAC;SAC7B,MAAM,CAAC,mBAAmB,EAAE,yDAAyD,CAAC;SACtF,WAAW,CAAC,OAAO,EAAE,6EAA6E,CAAC;SACnG,MAAM,CAAC,KAAK,EAAE,IAAyB,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC5F,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/commands/user/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/commands/user/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,QAUtC"}
|