bitbucketdc-cli 1.0.6 → 1.0.8

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.
Files changed (177) hide show
  1. package/dist/index.js +980 -34
  2. package/package.json +5 -4
  3. package/dist/commands/commit/changes.d.ts +0 -3
  4. package/dist/commands/commit/changes.d.ts.map +0 -1
  5. package/dist/commands/commit/changes.js +0 -27
  6. package/dist/commands/commit/changes.js.map +0 -1
  7. package/dist/commands/commit/diff.d.ts +0 -3
  8. package/dist/commands/commit/diff.d.ts.map +0 -1
  9. package/dist/commands/commit/diff.js +0 -38
  10. package/dist/commands/commit/diff.js.map +0 -1
  11. package/dist/commands/commit/index.d.ts +0 -3
  12. package/dist/commands/commit/index.d.ts.map +0 -1
  13. package/dist/commands/commit/index.js +0 -16
  14. package/dist/commands/commit/index.js.map +0 -1
  15. package/dist/commands/compare/changes.d.ts +0 -3
  16. package/dist/commands/compare/changes.d.ts.map +0 -1
  17. package/dist/commands/compare/changes.js +0 -30
  18. package/dist/commands/compare/changes.js.map +0 -1
  19. package/dist/commands/compare/diff.d.ts +0 -3
  20. package/dist/commands/compare/diff.d.ts.map +0 -1
  21. package/dist/commands/compare/diff.js +0 -32
  22. package/dist/commands/compare/diff.js.map +0 -1
  23. package/dist/commands/compare/index.d.ts +0 -3
  24. package/dist/commands/compare/index.d.ts.map +0 -1
  25. package/dist/commands/compare/index.js +0 -16
  26. package/dist/commands/compare/index.js.map +0 -1
  27. package/dist/commands/file/index.d.ts +0 -3
  28. package/dist/commands/file/index.d.ts.map +0 -1
  29. package/dist/commands/file/index.js +0 -16
  30. package/dist/commands/file/index.js.map +0 -1
  31. package/dist/commands/file/list.d.ts +0 -3
  32. package/dist/commands/file/list.d.ts.map +0 -1
  33. package/dist/commands/file/list.js +0 -30
  34. package/dist/commands/file/list.js.map +0 -1
  35. package/dist/commands/file/show.d.ts +0 -3
  36. package/dist/commands/file/show.d.ts.map +0 -1
  37. package/dist/commands/file/show.js +0 -24
  38. package/dist/commands/file/show.js.map +0 -1
  39. package/dist/commands/pr/activities.d.ts +0 -3
  40. package/dist/commands/pr/activities.d.ts.map +0 -1
  41. package/dist/commands/pr/activities.js +0 -37
  42. package/dist/commands/pr/activities.js.map +0 -1
  43. package/dist/commands/pr/can-merge.d.ts +0 -3
  44. package/dist/commands/pr/can-merge.d.ts.map +0 -1
  45. package/dist/commands/pr/can-merge.js +0 -21
  46. package/dist/commands/pr/can-merge.js.map +0 -1
  47. package/dist/commands/pr/changes.d.ts +0 -3
  48. package/dist/commands/pr/changes.d.ts.map +0 -1
  49. package/dist/commands/pr/changes.js +0 -23
  50. package/dist/commands/pr/changes.js.map +0 -1
  51. package/dist/commands/pr/comment.d.ts +0 -3
  52. package/dist/commands/pr/comment.d.ts.map +0 -1
  53. package/dist/commands/pr/comment.js +0 -27
  54. package/dist/commands/pr/comment.js.map +0 -1
  55. package/dist/commands/pr/create.d.ts +0 -3
  56. package/dist/commands/pr/create.d.ts.map +0 -1
  57. package/dist/commands/pr/create.js +0 -50
  58. package/dist/commands/pr/create.js.map +0 -1
  59. package/dist/commands/pr/decline.d.ts +0 -3
  60. package/dist/commands/pr/decline.d.ts.map +0 -1
  61. package/dist/commands/pr/decline.js +0 -21
  62. package/dist/commands/pr/decline.js.map +0 -1
  63. package/dist/commands/pr/delete-comment.d.ts +0 -3
  64. package/dist/commands/pr/delete-comment.d.ts.map +0 -1
  65. package/dist/commands/pr/delete-comment.js +0 -31
  66. package/dist/commands/pr/delete-comment.js.map +0 -1
  67. package/dist/commands/pr/delete.d.ts +0 -3
  68. package/dist/commands/pr/delete.d.ts.map +0 -1
  69. package/dist/commands/pr/delete.js +0 -21
  70. package/dist/commands/pr/delete.js.map +0 -1
  71. package/dist/commands/pr/diff.d.ts +0 -3
  72. package/dist/commands/pr/diff.d.ts.map +0 -1
  73. package/dist/commands/pr/diff.js +0 -43
  74. package/dist/commands/pr/diff.js.map +0 -1
  75. package/dist/commands/pr/edit-comment.d.ts +0 -3
  76. package/dist/commands/pr/edit-comment.d.ts.map +0 -1
  77. package/dist/commands/pr/edit-comment.js +0 -33
  78. package/dist/commands/pr/edit-comment.js.map +0 -1
  79. package/dist/commands/pr/file-comment.d.ts +0 -3
  80. package/dist/commands/pr/file-comment.d.ts.map +0 -1
  81. package/dist/commands/pr/file-comment.js +0 -25
  82. package/dist/commands/pr/file-comment.js.map +0 -1
  83. package/dist/commands/pr/file-diff.d.ts +0 -3
  84. package/dist/commands/pr/file-diff.d.ts.map +0 -1
  85. package/dist/commands/pr/file-diff.js +0 -25
  86. package/dist/commands/pr/file-diff.js.map +0 -1
  87. package/dist/commands/pr/get.d.ts +0 -3
  88. package/dist/commands/pr/get.d.ts.map +0 -1
  89. package/dist/commands/pr/get.js +0 -21
  90. package/dist/commands/pr/get.js.map +0 -1
  91. package/dist/commands/pr/inbox.d.ts +0 -3
  92. package/dist/commands/pr/inbox.d.ts.map +0 -1
  93. package/dist/commands/pr/inbox.js +0 -19
  94. package/dist/commands/pr/inbox.js.map +0 -1
  95. package/dist/commands/pr/index.d.ts +0 -3
  96. package/dist/commands/pr/index.d.ts.map +0 -1
  97. package/dist/commands/pr/index.js +0 -61
  98. package/dist/commands/pr/index.js.map +0 -1
  99. package/dist/commands/pr/line-comment.d.ts +0 -3
  100. package/dist/commands/pr/line-comment.d.ts.map +0 -1
  101. package/dist/commands/pr/line-comment.js +0 -36
  102. package/dist/commands/pr/line-comment.js.map +0 -1
  103. package/dist/commands/pr/merge.d.ts +0 -3
  104. package/dist/commands/pr/merge.d.ts.map +0 -1
  105. package/dist/commands/pr/merge.js +0 -28
  106. package/dist/commands/pr/merge.js.map +0 -1
  107. package/dist/commands/pr/reaction-add.d.ts +0 -3
  108. package/dist/commands/pr/reaction-add.d.ts.map +0 -1
  109. package/dist/commands/pr/reaction-add.js +0 -30
  110. package/dist/commands/pr/reaction-add.js.map +0 -1
  111. package/dist/commands/pr/reaction-remove.d.ts +0 -3
  112. package/dist/commands/pr/reaction-remove.d.ts.map +0 -1
  113. package/dist/commands/pr/reaction-remove.js +0 -29
  114. package/dist/commands/pr/reaction-remove.js.map +0 -1
  115. package/dist/commands/pr/review.d.ts +0 -3
  116. package/dist/commands/pr/review.d.ts.map +0 -1
  117. package/dist/commands/pr/review.js +0 -29
  118. package/dist/commands/pr/review.js.map +0 -1
  119. package/dist/commands/pr/update.d.ts +0 -3
  120. package/dist/commands/pr/update.d.ts.map +0 -1
  121. package/dist/commands/pr/update.js +0 -32
  122. package/dist/commands/pr/update.js.map +0 -1
  123. package/dist/commands/project/index.d.ts +0 -3
  124. package/dist/commands/project/index.d.ts.map +0 -1
  125. package/dist/commands/project/index.js +0 -13
  126. package/dist/commands/project/index.js.map +0 -1
  127. package/dist/commands/project/list.d.ts +0 -3
  128. package/dist/commands/project/list.d.ts.map +0 -1
  129. package/dist/commands/project/list.js +0 -23
  130. package/dist/commands/project/list.js.map +0 -1
  131. package/dist/commands/repo/attachment/download.d.ts +0 -3
  132. package/dist/commands/repo/attachment/download.d.ts.map +0 -1
  133. package/dist/commands/repo/attachment/download.js +0 -23
  134. package/dist/commands/repo/attachment/download.js.map +0 -1
  135. package/dist/commands/repo/attachment/index.d.ts +0 -3
  136. package/dist/commands/repo/attachment/index.d.ts.map +0 -1
  137. package/dist/commands/repo/attachment/index.js +0 -15
  138. package/dist/commands/repo/attachment/index.js.map +0 -1
  139. package/dist/commands/repo/attachment/upload.d.ts +0 -3
  140. package/dist/commands/repo/attachment/upload.d.ts.map +0 -1
  141. package/dist/commands/repo/attachment/upload.js +0 -41
  142. package/dist/commands/repo/attachment/upload.js.map +0 -1
  143. package/dist/commands/repo/index.d.ts +0 -3
  144. package/dist/commands/repo/index.d.ts.map +0 -1
  145. package/dist/commands/repo/index.js +0 -15
  146. package/dist/commands/repo/index.js.map +0 -1
  147. package/dist/commands/repo/list.d.ts +0 -3
  148. package/dist/commands/repo/list.d.ts.map +0 -1
  149. package/dist/commands/repo/list.js +0 -14
  150. package/dist/commands/repo/list.js.map +0 -1
  151. package/dist/commands/user/index.d.ts +0 -3
  152. package/dist/commands/user/index.d.ts.map +0 -1
  153. package/dist/commands/user/index.js +0 -15
  154. package/dist/commands/user/index.js.map +0 -1
  155. package/dist/commands/user/list.d.ts +0 -3
  156. package/dist/commands/user/list.d.ts.map +0 -1
  157. package/dist/commands/user/list.js +0 -15
  158. package/dist/commands/user/list.js.map +0 -1
  159. package/dist/commands/user/profile.d.ts +0 -3
  160. package/dist/commands/user/profile.d.ts.map +0 -1
  161. package/dist/commands/user/profile.js +0 -14
  162. package/dist/commands/user/profile.js.map +0 -1
  163. package/dist/index.d.ts +0 -3
  164. package/dist/index.d.ts.map +0 -1
  165. package/dist/index.js.map +0 -1
  166. package/dist/utils/client.d.ts +0 -3
  167. package/dist/utils/client.d.ts.map +0 -1
  168. package/dist/utils/client.js +0 -19
  169. package/dist/utils/client.js.map +0 -1
  170. package/dist/utils/output.d.ts +0 -3
  171. package/dist/utils/output.d.ts.map +0 -1
  172. package/dist/utils/output.js +0 -48
  173. package/dist/utils/output.js.map +0 -1
  174. package/dist/utils/strip-response.d.ts +0 -6
  175. package/dist/utils/strip-response.d.ts.map +0 -1
  176. package/dist/utils/strip-response.js +0 -30
  177. package/dist/utils/strip-response.js.map +0 -1
@@ -1,30 +0,0 @@
1
- import { Option } from 'commander';
2
- import { getClient } from '../../utils/client.js';
3
- import { output } from '../../utils/output.js';
4
- export function reactionAdd(parent) {
5
- parent
6
- .command('reaction-add')
7
- .description('Add an emoticon reaction to a PR comment')
8
- .requiredOption('--project <key>', 'Bitbucket project key')
9
- .requiredOption('--repo <slug>', 'Repository slug')
10
- .requiredOption('--id <n>', 'Pull request ID')
11
- .requiredOption('--comment-id <n>', 'Comment ID')
12
- .addOption(new Option('--emoticon <name>', 'Emoticon to react with')
13
- .choices(['thumbsup', 'thumbsdown', 'heart', 'thinking_face', 'laughing'])
14
- .makeOptionMandatory())
15
- .addHelpText('after', `\nExamples:
16
- bitbucketdc pr reaction-add --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon thumbsup
17
- bitbucketdc pr reaction-add --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon heart`)
18
- .action(async (opts) => {
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);
28
- });
29
- }
30
- //# sourceMappingURL=reaction-add.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function reactionRemove(parent: Command): void;
3
- //# sourceMappingURL=reaction-remove.d.ts.map
@@ -1 +0,0 @@
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,29 +0,0 @@
1
- import { Option } from 'commander';
2
- import { getClient } from '../../utils/client.js';
3
- import { output } from '../../utils/output.js';
4
- export function reactionRemove(parent) {
5
- parent
6
- .command('reaction-remove')
7
- .description('Remove an emoticon reaction from a PR comment')
8
- .requiredOption('--project <key>', 'Bitbucket project key')
9
- .requiredOption('--repo <slug>', 'Repository slug')
10
- .requiredOption('--id <n>', 'Pull request ID')
11
- .requiredOption('--comment-id <n>', 'Comment ID')
12
- .addOption(new Option('--emoticon <name>', 'Emoticon to remove')
13
- .choices(['thumbsup', 'thumbsdown', 'heart', 'thinking_face', 'laughing'])
14
- .makeOptionMandatory())
15
- .addHelpText('after', `\nExamples:
16
- bitbucketdc pr reaction-remove --project PROJ --repo my-repo --id 42 --comment-id 123 --emoticon thumbsup`)
17
- .action(async (opts) => {
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 });
27
- });
28
- }
29
- //# sourceMappingURL=reaction-remove.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function review(parent: Command): void;
3
- //# sourceMappingURL=review.d.ts.map
@@ -1 +0,0 @@
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,29 +0,0 @@
1
- import { Option } from 'commander';
2
- import { getClient } from '../../utils/client.js';
3
- import { output } from '../../utils/output.js';
4
- export function review(parent) {
5
- parent
6
- .command('review')
7
- .description('Update review status for a pull request')
8
- .requiredOption('--project <key>', 'Bitbucket project key')
9
- .requiredOption('--repo <slug>', 'Repository slug')
10
- .requiredOption('--id <n>', 'Pull request ID')
11
- .addOption(new Option('--status <status>', 'Review status')
12
- .choices(['APPROVED', 'NEEDS_WORK', 'UNAPPROVED'])
13
- .makeOptionMandatory())
14
- .addHelpText('after', `\nExamples:
15
- bitbucketdc pr review --project PROJ --repo my-repo --id 42 --status APPROVED
16
- bitbucketdc pr review --project PROJ --repo my-repo --id 42 --status NEEDS_WORK
17
- bitbucketdc pr review --project PROJ --repo my-repo --id 42 --status UNAPPROVED`)
18
- .action(async (opts) => {
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);
27
- });
28
- }
29
- //# sourceMappingURL=review.js.map
@@ -1 +0,0 @@
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,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,SAAS,CACR,IAAI,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC;SAC7C,OAAO,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;SACjD,mBAAmB,EAAE,CACzB;SACA,WAAW,CACV,OAAO,EACP;;;kFAG4E,CAC7E;SACA,MAAM,CAAC,KAAK,EAAE,IAAmE,EAAE,EAAE;QACpF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC;YAC1D,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,MAAM,EAAE,IAAI,CAAC,MAAkD;SAChE,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function update(parent: Command): void;
3
- //# sourceMappingURL=update.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"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,32 +0,0 @@
1
- import { getClient } from '../../utils/client.js';
2
- import { output } from '../../utils/output.js';
3
- export function update(parent) {
4
- parent
5
- .command('update')
6
- .description('Update a pull request title and/or description')
7
- .requiredOption('--project <key>', 'Bitbucket project key')
8
- .requiredOption('--repo <slug>', 'Repository slug')
9
- .requiredOption('--id <n>', 'Pull request ID', parseInt)
10
- .option('--title <title>', 'New pull request title')
11
- .option('--description <text>', 'New pull request description')
12
- .addHelpText('after', `\nExamples:
13
- bitbucketdc pr update --project PROJ --repo my-repo --id 42 --title "New title"
14
- bitbucketdc pr update --project PROJ --repo my-repo --id 42 --description "Updated description"
15
- bitbucketdc pr update --project PROJ --repo my-repo --id 42 --title "New" --description "Both"`)
16
- .action(async (opts) => {
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);
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);
30
- });
31
- }
32
- //# sourceMappingURL=update.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerProjectCommands(program: Command): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAavD"}
@@ -1,13 +0,0 @@
1
- import { list } from './list.js';
2
- export function registerProjectCommands(program) {
3
- const project = program
4
- .command('project')
5
- .description('Project operations')
6
- .addHelpText('after', `
7
- Examples:
8
- $ bitbucketdc project list
9
- $ bitbucketdc project list --name "My Project" --limit 10
10
- `);
11
- list(project);
12
- }
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/project/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,oBAAoB,CAAC;SACjC,WAAW,CACV,OAAO,EACP;;;;CAIL,CACI,CAAC;IACJ,IAAI,CAAC,OAAO,CAAC,CAAC;AAChB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function list(parent: Command): void;
3
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
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,23 +0,0 @@
1
- import { getClient } from '../../utils/client.js';
2
- import { output } from '../../utils/output.js';
3
- export function list(parent) {
4
- parent
5
- .command('list')
6
- .description('List projects')
7
- .option('--name <name>', 'Filter projects by name (partial match)')
8
- .option('--permission <permission>', 'Filter by permission (e.g., PROJECT_READ, PROJECT_WRITE, PROJECT_ADMIN)')
9
- .option('--start <start>', 'Starting index for pagination', parseInt)
10
- .option('--limit <limit>', 'Maximum number of projects to return', parseInt)
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
- .action(async (opts) => {
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);
21
- });
22
- }
23
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function download(parent: Command): void;
3
- //# sourceMappingURL=download.d.ts.map
@@ -1 +0,0 @@
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,23 +0,0 @@
1
- import { getClient } from '../../../utils/client.js';
2
- import { output } from '../../../utils/output.js';
3
- export function download(parent) {
4
- parent
5
- .command('download')
6
- .description('Download a repository attachment to disk')
7
- .requiredOption('--project <key>', 'Project key')
8
- .requiredOption('--repo <slug>', 'Repository slug')
9
- .requiredOption('--id <attachmentId>', 'Attachment ID')
10
- .requiredOption('--output <path>', 'Destination file path')
11
- .addHelpText('after', '\nExamples:\n bitbucketdc repo attachment download --project PROJ --repo my-repo --id abc123 --output ./file.png')
12
- .action(async (opts) => {
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 });
21
- });
22
- }
23
- //# sourceMappingURL=download.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerAttachmentCommands(parent: Command): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,OAAO,QAczD"}
@@ -1,15 +0,0 @@
1
- import { download } from './download.js';
2
- import { upload } from './upload.js';
3
- export function registerAttachmentCommands(parent) {
4
- const attachment = parent
5
- .command('attachment')
6
- .description('Attachment operations')
7
- .addHelpText('after', `
8
- Examples:
9
- $ bitbucketdc repo attachment download --project PROJ --repo my-repo --id 706 --output ./image.png
10
- $ bitbucketdc repo attachment upload --project PROJ --repo my-repo --files screenshot.png,report.pdf
11
- `);
12
- download(attachment);
13
- upload(attachment);
14
- }
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/repo/attachment/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,UAAU,0BAA0B,CAAC,MAAe;IACxD,MAAM,UAAU,GAAG,MAAM;SACtB,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,uBAAuB,CAAC;SACpC,WAAW,CACV,OAAO,EACP;;;;CAIL,CACI,CAAC;IACJ,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrB,MAAM,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function upload(parent: Command): void;
3
- //# sourceMappingURL=upload.d.ts.map
@@ -1 +0,0 @@
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,41 +0,0 @@
1
- import { getClient } from '../../../utils/client.js';
2
- import { output } from '../../../utils/output.js';
3
- export function upload(parent) {
4
- parent
5
- .command('upload')
6
- .description('Upload file attachments to a repository')
7
- .requiredOption('--project <key>', 'Project key')
8
- .requiredOption('--repo <slug>', 'Repository slug')
9
- .requiredOption('--files <paths>', 'Comma-separated local file paths')
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
- .action(async (opts) => {
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) });
30
- }
31
- }
32
- output({
33
- project: opts.project,
34
- repo: opts.repo,
35
- uploaded: results.length,
36
- attachments: results,
37
- ...(failed.length > 0 && { failed }),
38
- });
39
- });
40
- }
41
- //# sourceMappingURL=upload.js.map
@@ -1 +0,0 @@
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,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC;SAChD,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;SACrE,WAAW,CACV,OAAO,EACP,wMAAwM,CACzM;SACA,MAAM,CAAC,KAAK,EAAE,IAAsD,EAAE,EAAE;QACvE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;aACzB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,MAAM,CAAC,OAAO,CAAC,CAAC;QACnB,MAAM,OAAO,GAAkC,EAAE,CAAC;QAClD,MAAM,MAAM,GAA0C,EAAE,CAAC;QAEzD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC;oBACxD,UAAU,EAAE,IAAI,CAAC,OAAO;oBACxB,cAAc,EAAE,IAAI,CAAC,IAAI;oBACzB,QAAQ;iBACT,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YACnD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACrF,CAAC;QACH,CAAC;QAED,MAAM,CAAC;YACL,OAAO,EAAE,IAAI,CAAC,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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerRepoCommands(program: Command): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/repo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
@@ -1,15 +0,0 @@
1
- import { registerAttachmentCommands } from './attachment/index.js';
2
- import { list } from './list.js';
3
- export function registerRepoCommands(program) {
4
- const repo = program
5
- .command('repo')
6
- .description('Repository operations')
7
- .addHelpText('after', `
8
- Examples:
9
- $ bitbucketdc repo list PROJ
10
- $ bitbucketdc repo attachment download --project PROJ --repo my-repo --id abc123 --output ./file.png
11
- `);
12
- list(repo);
13
- registerAttachmentCommands(repo);
14
- }
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/repo/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,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;;;;CAIL,CACI,CAAC;IACJ,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,0BAA0B,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function list(parent: Command): void;
3
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { getClient } from '../../utils/client.js';
2
- import { output } from '../../utils/output.js';
3
- export function list(parent) {
4
- parent
5
- .command('list <projectKey>')
6
- .description('List repositories in a project')
7
- .addHelpText('after', '\nExamples:\n bitbucketdc repo list PROJ\n bitbucketdc repo list MYPROJ')
8
- .action(async (projectKey) => {
9
- const client = getClient();
10
- const result = await client.repositories.list({ projectKey });
11
- output(result);
12
- });
13
- }
14
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerUserCommands(program: Command): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
@@ -1,15 +0,0 @@
1
- import { list } from './list.js';
2
- import { profile } from './profile.js';
3
- export function registerUserCommands(program) {
4
- const user = program
5
- .command('user')
6
- .description('User operations')
7
- .addHelpText('after', `
8
- Examples:
9
- $ bitbucketdc user profile jsmith
10
- $ bitbucketdc user list --filter john
11
- `);
12
- profile(user);
13
- list(user);
14
- }
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/user/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,iBAAiB,CAAC;SAC9B,WAAW,CACV,OAAO,EACP;;;;CAIL,CACI,CAAC;IACJ,OAAO,CAAC,IAAI,CAAC,CAAC;IACd,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function list(parent: Command): void;
3
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
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,15 +0,0 @@
1
- import { getClient } from '../../utils/client.js';
2
- import { output } from '../../utils/output.js';
3
- export function list(parent) {
4
- parent
5
- .command('list')
6
- .description('List all users')
7
- .option('--filter <filter>', 'Filter users by username, name or email (partial match)')
8
- .addHelpText('after', '\nExamples:\n bitbucketdc user list\n bitbucketdc user list --filter john')
9
- .action(async (opts) => {
10
- const client = getClient();
11
- const result = await client.users.getAll(opts.filter ? { filter: opts.filter } : undefined);
12
- output(result);
13
- });
14
- }
15
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function profile(parent: Command): void;
3
- //# sourceMappingURL=profile.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
1
- import { getClient } from '../../utils/client.js';
2
- import { output } from '../../utils/output.js';
3
- export function profile(parent) {
4
- parent
5
- .command('profile <username>')
6
- .description('Get a user profile by username')
7
- .addHelpText('after', '\nExamples:\n bitbucketdc user profile jsmith\n bitbucketdc user profile admin')
8
- .action(async (username) => {
9
- const client = getClient();
10
- const result = await client.users.getProfile({ username });
11
- output(result);
12
- });
13
- }
14
- //# sourceMappingURL=profile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../src/commands/user/profile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,OAAO,CAAC,MAAe;IACrC,MAAM;SACH,OAAO,CAAC,oBAAoB,CAAC;SAC7B,WAAW,CAAC,gCAAgC,CAAC;SAC7C,WAAW,CAAC,OAAO,EAAE,kFAAkF,CAAC;SACxG,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;QACjC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3D,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,GAAG,GAAG,SAAS,CAAC;AACtB,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,OAAO;KACJ,IAAI,CAAC,aAAa,CAAC;KACnB,WAAW,CAAC,2BAA2B,CAAC;KACxC,OAAO,CAAC,OAAO,CAAC;KAChB,aAAa,CAAC;IACb,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3C,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IAC1C,uBAAuB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IACvD,sBAAsB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IACtD,0BAA0B,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;CAC3D,CAAC;KACD,WAAW,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,GAAG,8BAA8B,KAAK,IAAI,CAAC;KAC7G,WAAW,CACV,OAAO,EACP;EACF,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC;iDACc,GAAG,wCAAwC,KAAK;6CACpD,GAAG,6DAA6D,KAAK;;EAEhH,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC5B,GAAG,IAAI,KAAK;IACZ,GAAG,IAAI,KAAK;IACZ,GAAG,IAAI,KAAK;IACZ,GAAG,IAAI,KAAK;IACZ,GAAG,IAAI,KAAK;IACZ,GAAG,IAAI,KAAK;CACf,CACE,CAAC;AAEJ,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACjC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,sBAAsB,CAAC,OAAO,CAAC,CAAC;AAChC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACjC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAE5B,IAAI,CAAC;IACH,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;AAC7B,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,WAAW,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { BitbucketClient } from 'bitbucket-data-center-client';
2
- export declare function getClient(): BitbucketClient;
3
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/utils/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,wBAAgB,SAAS,IAAI,eAAe,CAoB3C"}
@@ -1,19 +0,0 @@
1
- import { BitbucketClient } from 'bitbucket-data-center-client';
2
- export function getClient() {
3
- const baseUrl = process.env.BITBUCKET_URL;
4
- const token = process.env.BITBUCKET_TOKEN;
5
- if (!baseUrl || !token) {
6
- const missing = [...(!baseUrl ? ['BITBUCKET_URL'] : []), ...(!token ? ['BITBUCKET_TOKEN'] : [])];
7
- process.stderr.write(`${JSON.stringify({
8
- error: `Missing required environment variables: ${missing.join(', ')}`,
9
- setup: {
10
- BITBUCKET_URL: 'Your Bitbucket Server base URL (e.g., https://bitbucket.example.com)',
11
- BITBUCKET_TOKEN: 'Personal Access Token — generate in Bitbucket > Profile > Personal Access Tokens',
12
- },
13
- hint: 'Export these in your shell profile (e.g., ~/.zshrc).',
14
- })}\n`);
15
- process.exit(1);
16
- }
17
- return new BitbucketClient({ baseUrl, token });
18
- }
19
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/utils/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,UAAU,SAAS;IACvB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAE1C,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjG,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,IAAI,CAAC,SAAS,CAAC;YAChB,KAAK,EAAE,2CAA2C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACtE,KAAK,EAAE;gBACL,aAAa,EAAE,sEAAsE;gBACrF,eAAe,EAAE,kFAAkF;aACpG;YACD,IAAI,EAAE,sDAAsD;SAC7D,CAAC,IAAI,CACP,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,IAAI,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function output(data: unknown): void;
2
- export declare function handleError(err: unknown): void;
3
- //# sourceMappingURL=output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAE1C;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAiD9C"}