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.
Files changed (121) hide show
  1. package/dist/commands/commit/changes.d.ts +3 -0
  2. package/dist/commands/commit/changes.d.ts.map +1 -0
  3. package/dist/commands/commit/changes.js +25 -0
  4. package/dist/commands/commit/changes.js.map +1 -0
  5. package/dist/commands/commit/diff.d.ts +3 -0
  6. package/dist/commands/commit/diff.d.ts.map +1 -0
  7. package/dist/commands/commit/diff.js +38 -0
  8. package/dist/commands/commit/diff.js.map +1 -0
  9. package/dist/commands/commit/index.d.ts +3 -0
  10. package/dist/commands/commit/index.d.ts.map +1 -0
  11. package/dist/commands/commit/index.js +16 -0
  12. package/dist/commands/commit/index.js.map +1 -0
  13. package/dist/commands/compare/changes.d.ts +3 -0
  14. package/dist/commands/compare/changes.d.ts.map +1 -0
  15. package/dist/commands/compare/changes.js +27 -0
  16. package/dist/commands/compare/changes.js.map +1 -0
  17. package/dist/commands/compare/diff.d.ts +3 -0
  18. package/dist/commands/compare/diff.d.ts.map +1 -0
  19. package/dist/commands/compare/diff.js +32 -0
  20. package/dist/commands/compare/diff.js.map +1 -0
  21. package/dist/commands/compare/index.d.ts +3 -0
  22. package/dist/commands/compare/index.d.ts.map +1 -0
  23. package/dist/commands/compare/index.js +16 -0
  24. package/dist/commands/compare/index.js.map +1 -0
  25. package/dist/commands/file/index.d.ts +3 -0
  26. package/dist/commands/file/index.d.ts.map +1 -0
  27. package/dist/commands/file/index.js +16 -0
  28. package/dist/commands/file/index.js.map +1 -0
  29. package/dist/commands/file/list.d.ts +3 -0
  30. package/dist/commands/file/list.d.ts.map +1 -0
  31. package/dist/commands/file/list.js +26 -0
  32. package/dist/commands/file/list.js.map +1 -0
  33. package/dist/commands/file/show.d.ts +3 -0
  34. package/dist/commands/file/show.d.ts.map +1 -0
  35. package/dist/commands/file/show.js +24 -0
  36. package/dist/commands/file/show.js.map +1 -0
  37. package/dist/commands/pr/activities.d.ts.map +1 -1
  38. package/dist/commands/pr/activities.js +16 -21
  39. package/dist/commands/pr/activities.js.map +1 -1
  40. package/dist/commands/pr/can-merge.d.ts.map +1 -1
  41. package/dist/commands/pr/can-merge.js +8 -13
  42. package/dist/commands/pr/can-merge.js.map +1 -1
  43. package/dist/commands/pr/changes.d.ts.map +1 -1
  44. package/dist/commands/pr/changes.js +9 -14
  45. package/dist/commands/pr/changes.js.map +1 -1
  46. package/dist/commands/pr/comment.d.ts.map +1 -1
  47. package/dist/commands/pr/comment.js +10 -15
  48. package/dist/commands/pr/comment.js.map +1 -1
  49. package/dist/commands/pr/create.d.ts.map +1 -1
  50. package/dist/commands/pr/create.js +25 -30
  51. package/dist/commands/pr/create.js.map +1 -1
  52. package/dist/commands/pr/decline.d.ts.map +1 -1
  53. package/dist/commands/pr/decline.js +8 -13
  54. package/dist/commands/pr/decline.js.map +1 -1
  55. package/dist/commands/pr/delete-comment.d.ts.map +1 -1
  56. package/dist/commands/pr/delete-comment.js +17 -22
  57. package/dist/commands/pr/delete-comment.js.map +1 -1
  58. package/dist/commands/pr/delete.d.ts.map +1 -1
  59. package/dist/commands/pr/delete.js +8 -13
  60. package/dist/commands/pr/delete.js.map +1 -1
  61. package/dist/commands/pr/diff.d.ts.map +1 -1
  62. package/dist/commands/pr/diff.js +17 -22
  63. package/dist/commands/pr/diff.js.map +1 -1
  64. package/dist/commands/pr/edit-comment.d.ts.map +1 -1
  65. package/dist/commands/pr/edit-comment.js +18 -23
  66. package/dist/commands/pr/edit-comment.js.map +1 -1
  67. package/dist/commands/pr/file-comment.d.ts.map +1 -1
  68. package/dist/commands/pr/file-comment.js +10 -15
  69. package/dist/commands/pr/file-comment.js.map +1 -1
  70. package/dist/commands/pr/file-diff.d.ts.map +1 -1
  71. package/dist/commands/pr/file-diff.js +10 -15
  72. package/dist/commands/pr/file-diff.js.map +1 -1
  73. package/dist/commands/pr/get.d.ts.map +1 -1
  74. package/dist/commands/pr/get.js +8 -13
  75. package/dist/commands/pr/get.js.map +1 -1
  76. package/dist/commands/pr/inbox.d.ts.map +1 -1
  77. package/dist/commands/pr/inbox.js +7 -12
  78. package/dist/commands/pr/inbox.js.map +1 -1
  79. package/dist/commands/pr/line-comment.d.ts.map +1 -1
  80. package/dist/commands/pr/line-comment.js +13 -18
  81. package/dist/commands/pr/line-comment.js.map +1 -1
  82. package/dist/commands/pr/merge.d.ts.map +1 -1
  83. package/dist/commands/pr/merge.js +10 -15
  84. package/dist/commands/pr/merge.js.map +1 -1
  85. package/dist/commands/pr/reaction-add.d.ts.map +1 -1
  86. package/dist/commands/pr/reaction-add.js +10 -15
  87. package/dist/commands/pr/reaction-add.js.map +1 -1
  88. package/dist/commands/pr/reaction-remove.d.ts.map +1 -1
  89. package/dist/commands/pr/reaction-remove.js +10 -15
  90. package/dist/commands/pr/reaction-remove.js.map +1 -1
  91. package/dist/commands/pr/review.d.ts.map +1 -1
  92. package/dist/commands/pr/review.js +9 -14
  93. package/dist/commands/pr/review.js.map +1 -1
  94. package/dist/commands/pr/update.d.ts.map +1 -1
  95. package/dist/commands/pr/update.js +13 -18
  96. package/dist/commands/pr/update.js.map +1 -1
  97. package/dist/commands/project/list.d.ts.map +1 -1
  98. package/dist/commands/project/list.js +9 -14
  99. package/dist/commands/project/list.js.map +1 -1
  100. package/dist/commands/repo/attachment/download.d.ts.map +1 -1
  101. package/dist/commands/repo/attachment/download.js +9 -14
  102. package/dist/commands/repo/attachment/download.js.map +1 -1
  103. package/dist/commands/repo/attachment/upload.d.ts.map +1 -1
  104. package/dist/commands/repo/attachment/upload.js +26 -31
  105. package/dist/commands/repo/attachment/upload.js.map +1 -1
  106. package/dist/commands/repo/list.d.ts.map +1 -1
  107. package/dist/commands/repo/list.js +4 -9
  108. package/dist/commands/repo/list.js.map +1 -1
  109. package/dist/commands/user/list.d.ts.map +1 -1
  110. package/dist/commands/user/list.js +4 -9
  111. package/dist/commands/user/list.js.map +1 -1
  112. package/dist/commands/user/profile.d.ts.map +1 -1
  113. package/dist/commands/user/profile.js +4 -9
  114. package/dist/commands/user/profile.js.map +1 -1
  115. package/dist/index.d.ts +1 -1
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +13 -2
  118. package/dist/index.js.map +1 -1
  119. package/dist/utils/client.js +1 -1
  120. package/dist/utils/client.js.map +1 -1
  121. package/package.json +3 -3
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function changes(parent: Command): void;
3
+ //# sourceMappingURL=changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../src/commands/commit/changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAwB7C"}
@@ -0,0 +1,25 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ import { output } from '../../utils/output.js';
3
+ export function changes(parent) {
4
+ parent
5
+ .command('changes')
6
+ .description('List files changed in a specific commit')
7
+ .requiredOption('--project <key>', 'Bitbucket project key')
8
+ .requiredOption('--repo <slug>', 'Repository slug')
9
+ .requiredOption('--commit <hash>', 'Commit hash')
10
+ .option('--limit <n>', 'Number of items to return (default: 25)', parseInt)
11
+ .addHelpText('after', `\nExamples:
12
+ bitbucketdc commit changes --project AI --repo my-app --commit abc123
13
+ bitbucketdc commit changes --project AI --repo my-app --commit abc123 --limit 100`)
14
+ .action(async (opts) => {
15
+ const client = getClient();
16
+ const result = await client.repositories.getCommitChanges({
17
+ projectKey: opts.project,
18
+ repositorySlug: opts.repo,
19
+ commitId: opts.commit,
20
+ limit: opts.limit,
21
+ });
22
+ output(result);
23
+ });
24
+ }
25
+ //# sourceMappingURL=changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../src/commands/commit/changes.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,SAAS,CAAC;SAClB,WAAW,CAAC,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC;SAChD,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP;;oFAE8E,CAC/E;SACA,MAAM,CAAC,KAAK,EAAE,IAAuE,EAAE,EAAE;QACxF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC;YACxD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,QAAQ,EAAE,IAAI,CAAC,MAAM;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function diff(parent: Command): void;
3
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/commands/commit/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA6C1C"}
@@ -0,0 +1,38 @@
1
+ import { Option } from 'commander';
2
+ import { getClient } from '../../utils/client.js';
3
+ import { output } from '../../utils/output.js';
4
+ export function diff(parent) {
5
+ parent
6
+ .command('diff')
7
+ .description('Get diff for a specific commit')
8
+ .requiredOption('--project <key>', 'Bitbucket project key')
9
+ .requiredOption('--repo <slug>', 'Repository slug')
10
+ .requiredOption('--commit <hash>', 'Commit hash')
11
+ .option('--path <path>', 'Scope diff to a single file')
12
+ .option('--context <n>', 'Number of context lines around changes', parseInt)
13
+ .addOption(new Option('--whitespace <mode>', 'Whitespace handling').choices(['show', 'ignore-all']))
14
+ .addOption(new Option('--format <fmt>', 'Response format (default: text)').choices(['text', 'json']))
15
+ .addHelpText('after', `\nExamples:
16
+ bitbucketdc commit diff --project AI --repo my-app --commit abc123
17
+ bitbucketdc commit diff --project AI --repo my-app --commit abc123 --path src/main.ts
18
+ bitbucketdc commit diff --project AI --repo my-app --commit abc123 --format json`)
19
+ .action(async (opts) => {
20
+ const client = getClient();
21
+ const result = await client.repositories.getCommitDiff({
22
+ projectKey: opts.project,
23
+ repositorySlug: opts.repo,
24
+ commitId: opts.commit,
25
+ path: opts.path,
26
+ contextLines: opts.context,
27
+ whitespace: opts.whitespace,
28
+ format: opts.format || 'text',
29
+ });
30
+ if (typeof result === 'string') {
31
+ process.stdout.write(result);
32
+ }
33
+ else {
34
+ output(result);
35
+ }
36
+ });
37
+ }
38
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../src/commands/commit/diff.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,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,gCAAgC,CAAC;SAC7C,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC;SAChD,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,wCAAwC,EAAE,QAAQ,CAAC;SAC3E,SAAS,CAAC,IAAI,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;SACnG,SAAS,CAAC,IAAI,MAAM,CAAC,gBAAgB,EAAE,iCAAiC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;SACpG,WAAW,CACV,OAAO,EACP;;;mFAG6E,CAC9E;SACA,MAAM,CACL,KAAK,EAAE,IAQN,EAAE,EAAE;QACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC;YACrD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,QAAQ,EAAE,IAAI,CAAC,MAAM;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,OAAO;YAC1B,UAAU,EAAE,IAAI,CAAC,UAA+C;YAChE,MAAM,EAAG,IAAI,CAAC,MAA0B,IAAI,MAAM;SACnD,CAAC,CAAC;QACH,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerCommitCommands(program: Command): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/commit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAe7D"}
@@ -0,0 +1,16 @@
1
+ import { changes } from './changes.js';
2
+ import { diff } from './diff.js';
3
+ export function registerCommitCommands(program) {
4
+ const commit = program
5
+ .command('commit')
6
+ .description('Commit inspection operations')
7
+ .addHelpText('after', `
8
+ Examples:
9
+ $ bitbucketdc commit changes --project AI --repo my-app --commit abc123
10
+ $ bitbucketdc commit diff --project AI --repo my-app --commit abc123
11
+ $ bitbucketdc commit diff --project AI --repo my-app --commit abc123 --path src/main.ts
12
+ `);
13
+ changes(commit);
14
+ diff(commit);
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/commit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,MAAM,MAAM,GAAG,OAAO;SACnB,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,8BAA8B,CAAC;SAC3C,WAAW,CACV,OAAO,EACP;;;;;CAKL,CACI,CAAC;IACJ,OAAO,CAAC,MAAM,CAAC,CAAC;IAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function changes(parent: Command): void;
3
+ //# sourceMappingURL=changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../src/commands/compare/changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA0B7C"}
@@ -0,0 +1,27 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ import { output } from '../../utils/output.js';
3
+ export function changes(parent) {
4
+ parent
5
+ .command('changes')
6
+ .description('List files that differ between two refs')
7
+ .requiredOption('--project <key>', 'Bitbucket project key')
8
+ .requiredOption('--repo <slug>', 'Repository slug')
9
+ .requiredOption('--from <ref>', 'Source ref (branch, tag, or commit)')
10
+ .requiredOption('--to <ref>', 'Target ref (branch, tag, or commit)')
11
+ .option('--limit <n>', 'Number of items to return (default: 25)', parseInt)
12
+ .addHelpText('after', `\nExamples:
13
+ bitbucketdc compare changes --project AI --repo my-app --from develop --to main
14
+ bitbucketdc compare changes --project AI --repo my-app --from feature/x --to main --limit 100`)
15
+ .action(async (opts) => {
16
+ const client = getClient();
17
+ const result = await client.repositories.getCompareChanges({
18
+ projectKey: opts.project,
19
+ repositorySlug: opts.repo,
20
+ from: opts.from,
21
+ to: opts.to,
22
+ limit: opts.limit,
23
+ });
24
+ output(result);
25
+ });
26
+ }
27
+ //# sourceMappingURL=changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../src/commands/compare/changes.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,SAAS,CAAC;SAClB,WAAW,CAAC,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,cAAc,EAAE,qCAAqC,CAAC;SACrE,cAAc,CAAC,YAAY,EAAE,qCAAqC,CAAC;SACnE,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP;;gGAE0F,CAC3F;SACA,MAAM,CAAC,KAAK,EAAE,IAAiF,EAAE,EAAE;QAClG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC;YACzD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function diff(parent: Command): void;
3
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/commands/compare/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAwC1C"}
@@ -0,0 +1,32 @@
1
+ import { Option } from 'commander';
2
+ import { getClient } from '../../utils/client.js';
3
+ import { output } from '../../utils/output.js';
4
+ export function diff(parent) {
5
+ parent
6
+ .command('diff')
7
+ .description('Get diff between two refs (structured JSON)')
8
+ .requiredOption('--project <key>', 'Bitbucket project key')
9
+ .requiredOption('--repo <slug>', 'Repository slug')
10
+ .requiredOption('--from <ref>', 'Source ref (branch, tag, or commit)')
11
+ .requiredOption('--to <ref>', 'Target ref (branch, tag, or commit)')
12
+ .option('--path <path>', 'Scope diff to a single file')
13
+ .option('--context <n>', 'Number of context lines around changes', parseInt)
14
+ .addOption(new Option('--whitespace <mode>', 'Whitespace handling').choices(['show', 'ignore-all']))
15
+ .addHelpText('after', `\nExamples:
16
+ bitbucketdc compare diff --project AI --repo my-app --from develop --to main
17
+ bitbucketdc compare diff --project AI --repo my-app --from develop --to main --path src/main.ts`)
18
+ .action(async (opts) => {
19
+ const client = getClient();
20
+ const result = await client.repositories.getCompareDiff({
21
+ projectKey: opts.project,
22
+ repositorySlug: opts.repo,
23
+ from: opts.from,
24
+ to: opts.to,
25
+ path: opts.path,
26
+ contextLines: opts.context,
27
+ whitespace: opts.whitespace,
28
+ });
29
+ output(result);
30
+ });
31
+ }
32
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../src/commands/compare/diff.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,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,6CAA6C,CAAC;SAC1D,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,cAAc,EAAE,qCAAqC,CAAC;SACrE,cAAc,CAAC,YAAY,EAAE,qCAAqC,CAAC;SACnE,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,wCAAwC,EAAE,QAAQ,CAAC;SAC3E,SAAS,CAAC,IAAI,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;SACnG,WAAW,CACV,OAAO,EACP;;kGAE4F,CAC7F;SACA,MAAM,CACL,KAAK,EAAE,IAQN,EAAE,EAAE;QACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC;YACtD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,OAAO;YAC1B,UAAU,EAAE,IAAI,CAAC,UAA+C;SACjE,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CACF,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerCompareCommands(program: Command): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/compare/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAe9D"}
@@ -0,0 +1,16 @@
1
+ import { changes } from './changes.js';
2
+ import { diff } from './diff.js';
3
+ export function registerCompareCommands(program) {
4
+ const compare = program
5
+ .command('compare')
6
+ .description('Compare refs (branches, tags, commits)')
7
+ .addHelpText('after', `
8
+ Examples:
9
+ $ bitbucketdc compare changes --project AI --repo my-app --from develop --to main
10
+ $ bitbucketdc compare diff --project AI --repo my-app --from develop --to main
11
+ $ bitbucketdc compare diff --project AI --repo my-app --from develop --to main --path src/main.ts
12
+ `);
13
+ changes(compare);
14
+ diff(compare);
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/compare/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,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,wCAAwC,CAAC;SACrD,WAAW,CACV,OAAO,EACP;;;;;CAKL,CACI,CAAC;IACJ,OAAO,CAAC,OAAO,CAAC,CAAC;IACjB,IAAI,CAAC,OAAO,CAAC,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerFileCommands(program: Command): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/file/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAe3D"}
@@ -0,0 +1,16 @@
1
+ import { list } from './list.js';
2
+ import { show } from './show.js';
3
+ export function registerFileCommands(program) {
4
+ const file = program
5
+ .command('file')
6
+ .description('File and directory operations')
7
+ .addHelpText('after', `
8
+ Examples:
9
+ $ bitbucketdc file list --project PROJ --repo my-app
10
+ $ bitbucketdc file list --project PROJ --repo my-app --path src/ --at develop
11
+ $ bitbucketdc file show --project PROJ --repo my-app --path README.md
12
+ `);
13
+ list(file);
14
+ show(file);
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/file/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,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,+BAA+B,CAAC;SAC5C,WAAW,CACV,OAAO,EACP;;;;;CAKL,CACI,CAAC;IACJ,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function list(parent: Command): void;
3
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/file/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAyB1C"}
@@ -0,0 +1,26 @@
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 directory contents in a repository')
7
+ .requiredOption('--project <key>', 'Bitbucket project key')
8
+ .requiredOption('--repo <slug>', 'Repository slug')
9
+ .option('--path <path>', 'Directory path (defaults to root)')
10
+ .option('--at <ref>', 'Branch, tag, or commit hash')
11
+ .addHelpText('after', `\nExamples:
12
+ bitbucketdc file list --project PROJ --repo my-app
13
+ bitbucketdc file list --project PROJ --repo my-app --path src/
14
+ bitbucketdc file list --project PROJ --repo my-app --path src/ --at develop`)
15
+ .action(async (opts) => {
16
+ const client = getClient();
17
+ const result = await client.repositories.browse({
18
+ projectKey: opts.project,
19
+ repositorySlug: opts.repo,
20
+ path: opts.path,
21
+ at: opts.at,
22
+ });
23
+ output(result);
24
+ });
25
+ }
26
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/file/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,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,MAAM,CAAC,eAAe,EAAE,mCAAmC,CAAC;SAC5D,MAAM,CAAC,YAAY,EAAE,6BAA6B,CAAC;SACnD,WAAW,CACV,OAAO,EACP;;;8EAGwE,CACzE;SACA,MAAM,CAAC,KAAK,EAAE,IAAmE,EAAE,EAAE;QACpF,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,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;SACZ,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function show(parent: Command): void;
3
+ //# sourceMappingURL=show.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/file/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAwB1C"}
@@ -0,0 +1,24 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ export function show(parent) {
3
+ parent
4
+ .command('show')
5
+ .description('Show raw file content from a repository')
6
+ .requiredOption('--project <key>', 'Bitbucket project key')
7
+ .requiredOption('--repo <slug>', 'Repository slug')
8
+ .requiredOption('--path <path>', 'File path')
9
+ .option('--at <ref>', 'Branch, tag, or commit hash')
10
+ .addHelpText('after', `\nExamples:
11
+ bitbucketdc file show --project PROJ --repo my-app --path README.md
12
+ bitbucketdc file show --project PROJ --repo my-app --path config/settings.yaml --at release/2.0`)
13
+ .action(async (opts) => {
14
+ const client = getClient();
15
+ const result = await client.repositories.getRawContent({
16
+ projectKey: opts.project,
17
+ repositorySlug: opts.repo,
18
+ path: opts.path,
19
+ at: opts.at,
20
+ });
21
+ process.stdout.write(result);
22
+ });
23
+ }
24
+ //# sourceMappingURL=show.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show.js","sourceRoot":"","sources":["../../../src/commands/file/show.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,UAAU,IAAI,CAAC,MAAe;IAClC,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,yCAAyC,CAAC;SACtD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,eAAe,EAAE,WAAW,CAAC;SAC5C,MAAM,CAAC,YAAY,EAAE,6BAA6B,CAAC;SACnD,WAAW,CACV,OAAO,EACP;;kGAE4F,CAC7F;SACA,MAAM,CAAC,KAAK,EAAE,IAAkE,EAAE,EAAE;QACnF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC;YACrD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;SACZ,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,QA6CzC"}
1
+ {"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,QAyCzC"}
@@ -1,5 +1,5 @@
1
1
  import { getClient } from '../../utils/client.js';
2
- import { output, handleError } from '../../utils/output.js';
2
+ import { output } from '../../utils/output.js';
3
3
  export function activities(parent) {
4
4
  parent
5
5
  .command('activities')
@@ -15,27 +15,22 @@ export function activities(parent) {
15
15
  bitbucketdc pr activities --project PROJ --repo my-repo --id 42 --types COMMENTED,REVIEW_COMMENTED
16
16
  bitbucketdc pr activities --project PROJ --repo my-repo --id 42 --types APPROVED,UNAPPROVED --limit 50`)
17
17
  .action(async (opts) => {
18
- try {
19
- const client = getClient();
20
- const result = await client.pullRequests.getActivities({
21
- projectKey: opts.project,
22
- repositorySlug: opts.repo,
23
- pullRequestId: parseInt(opts.id),
24
- start: opts.start,
25
- limit: opts.limit,
26
- });
27
- // Client-side filtering by activity types
28
- if (opts.types) {
29
- const types = opts.types.split(',').map((t) => t.trim());
30
- const filtered = result.values.filter((a) => types.includes(a.action));
31
- output({ ...result, values: filtered, size: filtered.length });
32
- }
33
- else {
34
- output(result);
35
- }
18
+ const client = getClient();
19
+ const result = await client.pullRequests.getActivities({
20
+ projectKey: opts.project,
21
+ repositorySlug: opts.repo,
22
+ pullRequestId: parseInt(opts.id),
23
+ start: opts.start,
24
+ limit: opts.limit,
25
+ });
26
+ // Client-side filtering by activity types
27
+ if (opts.types) {
28
+ const types = opts.types.split(',').map((t) => t.trim());
29
+ const filtered = result.values.filter((a) => types.includes(a.action));
30
+ output({ ...result, values: filtered, size: filtered.length });
36
31
  }
37
- catch (err) {
38
- handleError(err);
32
+ else {
33
+ output(result);
39
34
  }
40
35
  });
41
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"activities.js","sourceRoot":"","sources":["../../../src/commands/pr/activities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,UAAU,CAAC,MAAe;IACxC,MAAM;SACH,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,oEAAoE,CAAC;SACjF,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,MAAM,CACL,iBAAiB,EACjB,wLAAwL,CACzL;SACA,MAAM,CAAC,aAAa,EAAE,4CAA4C,EAAE,QAAQ,CAAC;SAC7E,MAAM,CAAC,aAAa,EAAE,iDAAiD,EAAE,QAAQ,CAAC;SAClF,WAAW,CACV,OAAO,EACP;;;yGAGmG,CACpG;SACA,MAAM,CACL,KAAK,EAAE,IAAmG,EAAE,EAAE;QAC5G,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC;gBACrD,UAAU,EAAE,IAAI,CAAC,OAAO;gBACxB,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;YAEH,0CAA0C;YAC1C,IAAI,I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file":"can-merge.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/can-merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,QAiBvC"}
@@ -1,5 +1,5 @@
1
1
  import { getClient } from '../../utils/client.js';
2
- import { output, handleError } from '../../utils/output.js';
2
+ import { output } from '../../utils/output.js';
3
3
  export function canMerge(parent) {
4
4
  parent
5
5
  .command('can-merge')
@@ -9,18 +9,13 @@ export function canMerge(parent) {
9
9
  .requiredOption('--id <n>', 'Pull request ID', parseInt)
10
10
  .addHelpText('after', '\nExamples:\n bitbucketdc pr can-merge --project PROJ --repo my-repo --id 42')
11
11
  .action(async (opts) => {
12
- try {
13
- const client = getClient();
14
- const result = await client.pullRequests.canMerge({
15
- projectKey: opts.project,
16
- repositorySlug: opts.repo,
17
- pullRequestId: opts.id,
18
- });
19
- output(result);
20
- }
21
- catch (err) {
22
- handleError(err);
23
- }
12
+ const client = getClient();
13
+ const result = await client.pullRequests.canMerge({
14
+ projectKey: opts.project,
15
+ repositorySlug: opts.repo,
16
+ pullRequestId: opts.id,
17
+ });
18
+ output(result);
24
19
  });
25
20
  }
26
21
  //# sourceMappingURL=can-merge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"can-merge.js","sourceRoot":"","sources":["../../../src/commands/pr/can-merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,QAAQ,CAAC,MAAe;IACtC,MAAM;SACH,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,uCAAuC,CAAC;SACpD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,E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AAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,IAAI,CAAC,EAAE;SACvB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,QA0BtC"}
1
+ {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,QAsBtC"}
@@ -1,5 +1,5 @@
1
1
  import { getClient } from '../../utils/client.js';
2
- import { output, handleError } from '../../utils/output.js';
2
+ import { output } from '../../utils/output.js';
3
3
  export function changes(parent) {
4
4
  parent
5
5
  .command('changes')
@@ -10,19 +10,14 @@ export function changes(parent) {
10
10
  .option('--limit <n>', 'Number of items to return (default: 25)', parseInt)
11
11
  .addHelpText('after', '\nExamples:\n bitbucketdc pr changes --project PROJ --repo my-repo --id 42\n bitbucketdc pr changes --project PROJ --repo my-repo --id 42 --limit 100')
12
12
  .action(async (opts) => {
13
- try {
14
- const client = getClient();
15
- const result = await client.pullRequests.getChanges({
16
- projectKey: opts.project,
17
- repositorySlug: opts.repo,
18
- pullRequestId: parseInt(opts.id),
19
- limit: opts.limit,
20
- });
21
- output(result);
22
- }
23
- catch (err) {
24
- handleError(err);
25
- }
13
+ const client = getClient();
14
+ const result = await client.pullRequests.getChanges({
15
+ projectKey: opts.project,
16
+ repositorySlug: opts.repo,
17
+ pullRequestId: parseInt(opts.id),
18
+ limit: opts.limit,
19
+ });
20
+ output(result);
26
21
  });
27
22
  }
28
23
  //# sourceMappingURL=changes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../src/commands/pr/changes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,MAAe;IACrC,MAAM;SACH,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,sCAAsC,CAAC;SACnD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP,yJAAyJ,CAC1J;SACA,MAAM,CAAC,KAAK,EAAE,IAAmE,EAAE,EAAE;QACpF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC;gBAClD,UAAU,EAAE,IAAI,CAAC,OAAO;gBACxB,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChC,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;YACH,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"}
1
+ {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../src/commands/pr/changes.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,SAAS,CAAC;SAClB,WAAW,CAAC,sCAAsC,CAAC;SACnD,cAAc,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;SAC1D,cAAc,CAAC,eAAe,EAAE,iBAAiB,CAAC;SAClD,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC;SAC7C,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP,yJAAyJ,CAC1J;SACA,MAAM,CAAC,KAAK,EAAE,IAAmE,EAAE,EAAE;QACpF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC;YAClD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,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":"comment.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,QA8BtC"}
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,QA0BtC"}
@@ -1,5 +1,5 @@
1
1
  import { getClient } from '../../utils/client.js';
2
- import { output, handleError } from '../../utils/output.js';
2
+ import { output } from '../../utils/output.js';
3
3
  export function comment(parent) {
4
4
  parent
5
5
  .command('comment')
@@ -13,20 +13,15 @@ export function comment(parent) {
13
13
  bitbucketdc pr comment --project PROJ --repo my-repo --id 42 --text "Looks good!"
14
14
  bitbucketdc pr comment --project PROJ --repo my-repo --id 42 --text "I agree" --parent 123`)
15
15
  .action(async (opts) => {
16
- try {
17
- const client = getClient();
18
- const result = await client.pullRequests.addComment({
19
- projectKey: opts.project,
20
- repositorySlug: opts.repo,
21
- pullRequestId: parseInt(opts.id),
22
- text: opts.text,
23
- parentId: opts.parent ? parseInt(opts.parent) : undefined,
24
- });
25
- output(result);
26
- }
27
- catch (err) {
28
- handleError(err);
29
- }
16
+ const client = getClient();
17
+ const result = await client.pullRequests.addComment({
18
+ projectKey: opts.project,
19
+ repositorySlug: opts.repo,
20
+ pullRequestId: parseInt(opts.id),
21
+ text: opts.text,
22
+ parentId: opts.parent ? parseInt(opts.parent) : undefined,
23
+ });
24
+ output(result);
30
25
  });
31
26
  }
32
27
  //# sourceMappingURL=comment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/commands/pr/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,MAAe;IACrC,MAAM;SACH,OAAO,CAAC,SAAS,CAAC;SAClB,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,cAAc,CAAC,eAAe,EAAE,cAAc,CAAC;SAC/C,MAAM,CAAC,cAAc,EAAE,+BAA+B,CAAC;SACvD,WAAW,CACV,OAAO,EACP;;6FAEuF,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F,EAAE,EAAE;QACnG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC;YAClD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;SAC1D,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QAmErC"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,QA+DrC"}