bitbucketdc-cli 1.0.6 → 1.0.7
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/index.js +962 -34
- package/package.json +5 -4
- package/dist/commands/commit/changes.d.ts +0 -3
- package/dist/commands/commit/changes.d.ts.map +0 -1
- package/dist/commands/commit/changes.js +0 -27
- package/dist/commands/commit/changes.js.map +0 -1
- package/dist/commands/commit/diff.d.ts +0 -3
- package/dist/commands/commit/diff.d.ts.map +0 -1
- package/dist/commands/commit/diff.js +0 -38
- package/dist/commands/commit/diff.js.map +0 -1
- package/dist/commands/commit/index.d.ts +0 -3
- package/dist/commands/commit/index.d.ts.map +0 -1
- package/dist/commands/commit/index.js +0 -16
- package/dist/commands/commit/index.js.map +0 -1
- package/dist/commands/compare/changes.d.ts +0 -3
- package/dist/commands/compare/changes.d.ts.map +0 -1
- package/dist/commands/compare/changes.js +0 -30
- package/dist/commands/compare/changes.js.map +0 -1
- package/dist/commands/compare/diff.d.ts +0 -3
- package/dist/commands/compare/diff.d.ts.map +0 -1
- package/dist/commands/compare/diff.js +0 -32
- package/dist/commands/compare/diff.js.map +0 -1
- package/dist/commands/compare/index.d.ts +0 -3
- package/dist/commands/compare/index.d.ts.map +0 -1
- package/dist/commands/compare/index.js +0 -16
- package/dist/commands/compare/index.js.map +0 -1
- package/dist/commands/file/index.d.ts +0 -3
- package/dist/commands/file/index.d.ts.map +0 -1
- package/dist/commands/file/index.js +0 -16
- package/dist/commands/file/index.js.map +0 -1
- package/dist/commands/file/list.d.ts +0 -3
- package/dist/commands/file/list.d.ts.map +0 -1
- package/dist/commands/file/list.js +0 -30
- package/dist/commands/file/list.js.map +0 -1
- package/dist/commands/file/show.d.ts +0 -3
- package/dist/commands/file/show.d.ts.map +0 -1
- package/dist/commands/file/show.js +0 -24
- package/dist/commands/file/show.js.map +0 -1
- package/dist/commands/pr/activities.d.ts +0 -3
- package/dist/commands/pr/activities.d.ts.map +0 -1
- package/dist/commands/pr/activities.js +0 -37
- package/dist/commands/pr/activities.js.map +0 -1
- package/dist/commands/pr/can-merge.d.ts +0 -3
- package/dist/commands/pr/can-merge.d.ts.map +0 -1
- package/dist/commands/pr/can-merge.js +0 -21
- package/dist/commands/pr/can-merge.js.map +0 -1
- package/dist/commands/pr/changes.d.ts +0 -3
- package/dist/commands/pr/changes.d.ts.map +0 -1
- package/dist/commands/pr/changes.js +0 -23
- package/dist/commands/pr/changes.js.map +0 -1
- package/dist/commands/pr/comment.d.ts +0 -3
- package/dist/commands/pr/comment.d.ts.map +0 -1
- package/dist/commands/pr/comment.js +0 -27
- package/dist/commands/pr/comment.js.map +0 -1
- package/dist/commands/pr/create.d.ts +0 -3
- package/dist/commands/pr/create.d.ts.map +0 -1
- package/dist/commands/pr/create.js +0 -50
- package/dist/commands/pr/create.js.map +0 -1
- package/dist/commands/pr/decline.d.ts +0 -3
- package/dist/commands/pr/decline.d.ts.map +0 -1
- package/dist/commands/pr/decline.js +0 -21
- package/dist/commands/pr/decline.js.map +0 -1
- package/dist/commands/pr/delete-comment.d.ts +0 -3
- package/dist/commands/pr/delete-comment.d.ts.map +0 -1
- package/dist/commands/pr/delete-comment.js +0 -31
- package/dist/commands/pr/delete-comment.js.map +0 -1
- package/dist/commands/pr/delete.d.ts +0 -3
- package/dist/commands/pr/delete.d.ts.map +0 -1
- package/dist/commands/pr/delete.js +0 -21
- package/dist/commands/pr/delete.js.map +0 -1
- package/dist/commands/pr/diff.d.ts +0 -3
- package/dist/commands/pr/diff.d.ts.map +0 -1
- package/dist/commands/pr/diff.js +0 -43
- package/dist/commands/pr/diff.js.map +0 -1
- package/dist/commands/pr/edit-comment.d.ts +0 -3
- package/dist/commands/pr/edit-comment.d.ts.map +0 -1
- package/dist/commands/pr/edit-comment.js +0 -33
- package/dist/commands/pr/edit-comment.js.map +0 -1
- package/dist/commands/pr/file-comment.d.ts +0 -3
- package/dist/commands/pr/file-comment.d.ts.map +0 -1
- package/dist/commands/pr/file-comment.js +0 -25
- package/dist/commands/pr/file-comment.js.map +0 -1
- package/dist/commands/pr/file-diff.d.ts +0 -3
- package/dist/commands/pr/file-diff.d.ts.map +0 -1
- package/dist/commands/pr/file-diff.js +0 -25
- package/dist/commands/pr/file-diff.js.map +0 -1
- package/dist/commands/pr/get.d.ts +0 -3
- package/dist/commands/pr/get.d.ts.map +0 -1
- package/dist/commands/pr/get.js +0 -21
- package/dist/commands/pr/get.js.map +0 -1
- package/dist/commands/pr/inbox.d.ts +0 -3
- package/dist/commands/pr/inbox.d.ts.map +0 -1
- package/dist/commands/pr/inbox.js +0 -19
- package/dist/commands/pr/inbox.js.map +0 -1
- package/dist/commands/pr/index.d.ts +0 -3
- package/dist/commands/pr/index.d.ts.map +0 -1
- package/dist/commands/pr/index.js +0 -61
- package/dist/commands/pr/index.js.map +0 -1
- package/dist/commands/pr/line-comment.d.ts +0 -3
- package/dist/commands/pr/line-comment.d.ts.map +0 -1
- package/dist/commands/pr/line-comment.js +0 -36
- package/dist/commands/pr/line-comment.js.map +0 -1
- package/dist/commands/pr/merge.d.ts +0 -3
- package/dist/commands/pr/merge.d.ts.map +0 -1
- package/dist/commands/pr/merge.js +0 -28
- package/dist/commands/pr/merge.js.map +0 -1
- package/dist/commands/pr/reaction-add.d.ts +0 -3
- package/dist/commands/pr/reaction-add.d.ts.map +0 -1
- package/dist/commands/pr/reaction-add.js +0 -30
- package/dist/commands/pr/reaction-add.js.map +0 -1
- package/dist/commands/pr/reaction-remove.d.ts +0 -3
- package/dist/commands/pr/reaction-remove.d.ts.map +0 -1
- package/dist/commands/pr/reaction-remove.js +0 -29
- package/dist/commands/pr/reaction-remove.js.map +0 -1
- package/dist/commands/pr/review.d.ts +0 -3
- package/dist/commands/pr/review.d.ts.map +0 -1
- package/dist/commands/pr/review.js +0 -29
- package/dist/commands/pr/review.js.map +0 -1
- package/dist/commands/pr/update.d.ts +0 -3
- package/dist/commands/pr/update.d.ts.map +0 -1
- package/dist/commands/pr/update.js +0 -32
- package/dist/commands/pr/update.js.map +0 -1
- package/dist/commands/project/index.d.ts +0 -3
- package/dist/commands/project/index.d.ts.map +0 -1
- package/dist/commands/project/index.js +0 -13
- package/dist/commands/project/index.js.map +0 -1
- package/dist/commands/project/list.d.ts +0 -3
- package/dist/commands/project/list.d.ts.map +0 -1
- package/dist/commands/project/list.js +0 -23
- package/dist/commands/project/list.js.map +0 -1
- package/dist/commands/repo/attachment/download.d.ts +0 -3
- package/dist/commands/repo/attachment/download.d.ts.map +0 -1
- package/dist/commands/repo/attachment/download.js +0 -23
- package/dist/commands/repo/attachment/download.js.map +0 -1
- package/dist/commands/repo/attachment/index.d.ts +0 -3
- package/dist/commands/repo/attachment/index.d.ts.map +0 -1
- package/dist/commands/repo/attachment/index.js +0 -15
- package/dist/commands/repo/attachment/index.js.map +0 -1
- package/dist/commands/repo/attachment/upload.d.ts +0 -3
- package/dist/commands/repo/attachment/upload.d.ts.map +0 -1
- package/dist/commands/repo/attachment/upload.js +0 -41
- package/dist/commands/repo/attachment/upload.js.map +0 -1
- package/dist/commands/repo/index.d.ts +0 -3
- package/dist/commands/repo/index.d.ts.map +0 -1
- package/dist/commands/repo/index.js +0 -15
- package/dist/commands/repo/index.js.map +0 -1
- package/dist/commands/repo/list.d.ts +0 -3
- package/dist/commands/repo/list.d.ts.map +0 -1
- package/dist/commands/repo/list.js +0 -14
- package/dist/commands/repo/list.js.map +0 -1
- package/dist/commands/user/index.d.ts +0 -3
- package/dist/commands/user/index.d.ts.map +0 -1
- package/dist/commands/user/index.js +0 -15
- package/dist/commands/user/index.js.map +0 -1
- package/dist/commands/user/list.d.ts +0 -3
- package/dist/commands/user/list.d.ts.map +0 -1
- package/dist/commands/user/list.js +0 -15
- package/dist/commands/user/list.js.map +0 -1
- package/dist/commands/user/profile.d.ts +0 -3
- package/dist/commands/user/profile.d.ts.map +0 -1
- package/dist/commands/user/profile.js +0 -14
- package/dist/commands/user/profile.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/utils/client.d.ts +0 -3
- package/dist/utils/client.d.ts.map +0 -1
- package/dist/utils/client.js +0 -19
- package/dist/utils/client.js.map +0 -1
- package/dist/utils/output.d.ts +0 -3
- package/dist/utils/output.d.ts.map +0 -1
- package/dist/utils/output.js +0 -48
- package/dist/utils/output.js.map +0 -1
- package/dist/utils/strip-response.d.ts +0 -6
- package/dist/utils/strip-response.d.ts.map +0 -1
- package/dist/utils/strip-response.js +0 -30
- package/dist/utils/strip-response.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitbucketdc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,17 +18,18 @@
|
|
|
18
18
|
"@types/node": "24.10.4",
|
|
19
19
|
"dotenv": "17.2.3",
|
|
20
20
|
"eslint": "^9.39.0",
|
|
21
|
+
"tsup": "^8.5.1",
|
|
21
22
|
"tsx": "^4.19.2",
|
|
22
23
|
"typescript": "^5.7.2",
|
|
23
24
|
"vitest": "^4.0.16",
|
|
24
|
-
"config-
|
|
25
|
-
"config-
|
|
25
|
+
"config-typescript": "0.0.0",
|
|
26
|
+
"config-eslint": "0.0.0"
|
|
26
27
|
},
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">=22.0.0"
|
|
29
30
|
},
|
|
30
31
|
"scripts": {
|
|
31
|
-
"build": "
|
|
32
|
+
"build": "tsup",
|
|
32
33
|
"dev": "tsx src/index.ts",
|
|
33
34
|
"lint": "eslint src",
|
|
34
35
|
"lint:fix": "eslint src --fix",
|
|
@@ -1 +0,0 @@
|
|
|
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,CA0B7C"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
.option('--start <n>', 'Start index for pagination (default: 0)', parseInt)
|
|
12
|
-
.addHelpText('after', `\nExamples:
|
|
13
|
-
bitbucketdc commit changes --project AI --repo my-app --commit abc123
|
|
14
|
-
bitbucketdc commit changes --project AI --repo my-app --commit abc123 --limit 100`)
|
|
15
|
-
.action(async (opts) => {
|
|
16
|
-
const client = getClient();
|
|
17
|
-
const result = await client.repositories.getCommitChanges({
|
|
18
|
-
projectKey: opts.project,
|
|
19
|
-
repositorySlug: opts.repo,
|
|
20
|
-
commitId: opts.commit,
|
|
21
|
-
limit: opts.limit,
|
|
22
|
-
start: opts.start,
|
|
23
|
-
});
|
|
24
|
-
output(result);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP;;oFAE8E,CAC/E;SACA,MAAM,CAAC,KAAK,EAAE,IAAuF,EAAE,EAAE;QACxG,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;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,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AAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,CA+B7C"}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
.option('--start <n>', 'Start index for pagination (default: 0)', parseInt)
|
|
13
|
-
.addHelpText('after', `\nExamples:
|
|
14
|
-
bitbucketdc compare changes --project AI --repo my-app --from develop --to main
|
|
15
|
-
bitbucketdc compare changes --project AI --repo my-app --from feature/x --to main --limit 100
|
|
16
|
-
bitbucketdc compare changes --project AI --repo my-app --from develop --to main --start 25`)
|
|
17
|
-
.action(async (opts) => {
|
|
18
|
-
const client = getClient();
|
|
19
|
-
const result = await client.repositories.getCompareChanges({
|
|
20
|
-
projectKey: opts.project,
|
|
21
|
-
repositorySlug: opts.repo,
|
|
22
|
-
from: opts.from,
|
|
23
|
-
to: opts.to,
|
|
24
|
-
limit: opts.limit,
|
|
25
|
-
start: opts.start,
|
|
26
|
-
});
|
|
27
|
-
output(result);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP;;;6FAGuF,CACxF;SACA,MAAM,CACL,KAAK,EAAE,IAAiG,EAAE,EAAE;QAC1G,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;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../src/commands/compare/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC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ources":["../../../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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,CA+B1C"}
|
|
@@ -1,30 +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 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
|
-
.option('--limit <n>', 'Number of items to return (default: 500)', parseInt)
|
|
12
|
-
.option('--start <n>', 'Start index for pagination (default: 0)', parseInt)
|
|
13
|
-
.addHelpText('after', `\nExamples:
|
|
14
|
-
bitbucketdc file list --project PROJ --repo my-app
|
|
15
|
-
bitbucketdc file list --project PROJ --repo my-app --path src/
|
|
16
|
-
bitbucketdc file list --project PROJ --repo my-app --path src/ --at develop`)
|
|
17
|
-
.action(async (opts) => {
|
|
18
|
-
const client = getClient();
|
|
19
|
-
const result = await client.repositories.browse({
|
|
20
|
-
projectKey: opts.project,
|
|
21
|
-
repositorySlug: opts.repo,
|
|
22
|
-
path: opts.path,
|
|
23
|
-
at: opts.at,
|
|
24
|
-
limit: opts.limit,
|
|
25
|
-
start: opts.start,
|
|
26
|
-
});
|
|
27
|
-
output(result);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,CAAC,aAAa,EAAE,0CAA0C,EAAE,QAAQ,CAAC;SAC3E,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,QAAQ,CAAC;SAC1E,WAAW,CACV,OAAO,EACP;;;8EAGwE,CACzE;SACA,MAAM,CACL,KAAK,EAAE,IAAmG,EAAE,EAAE;QAC5G,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;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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,37 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output } from '../../utils/output.js';
|
|
3
|
-
export function activities(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('activities')
|
|
6
|
-
.description('Get activity on a pull request (comments, approvals, merges, etc.)')
|
|
7
|
-
.requiredOption('--project <key>', 'Bitbucket project key')
|
|
8
|
-
.requiredOption('--repo <slug>', 'Repository slug')
|
|
9
|
-
.requiredOption('--id <n>', 'Pull request ID')
|
|
10
|
-
.option('--types <types>', 'Comma-separated activity types (APPROVED, COMMENTED, DECLINED, MERGED, OPENED, REOPENED, RESCOPED, REVIEW_COMMENTED, REVIEW_DISCARDED, REVIEW_FINISHED, REVIEWED, UNAPPROVED, UPDATED)')
|
|
11
|
-
.option('--start <n>', 'Starting index for pagination (default: 0)', parseInt)
|
|
12
|
-
.option('--limit <n>', 'Maximum number of items to return (default: 25)', parseInt)
|
|
13
|
-
.addHelpText('after', `\nExamples:
|
|
14
|
-
bitbucketdc pr activities --project PROJ --repo my-repo --id 42
|
|
15
|
-
bitbucketdc pr activities --project PROJ --repo my-repo --id 42 --types COMMENTED,REVIEW_COMMENTED
|
|
16
|
-
bitbucketdc pr activities --project PROJ --repo my-repo --id 42 --types APPROVED,UNAPPROVED --limit 50`)
|
|
17
|
-
.action(async (opts) => {
|
|
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 });
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
output(result);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=activities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,uBAAuB,CAAC;AAE/C,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,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,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QAEH,0CAA0C;QAC1C,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3F,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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,21 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output } from '../../utils/output.js';
|
|
3
|
-
export function canMerge(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('can-merge')
|
|
6
|
-
.description('Check if a pull request can be merged')
|
|
7
|
-
.requiredOption('--project <key>', 'Bitbucket project key')
|
|
8
|
-
.requiredOption('--repo <slug>', 'Repository slug')
|
|
9
|
-
.requiredOption('--id <n>', 'Pull request ID', parseInt)
|
|
10
|
-
.addHelpText('after', '\nExamples:\n bitbucketdc pr can-merge --project PROJ --repo my-repo --id 42')
|
|
11
|
-
.action(async (opts) => {
|
|
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);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=can-merge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,uBAAuB,CAAC;AAE/C,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,EAAE,iBAAiB,EAAE,QAAQ,CAAC;SACvD,WAAW,CAAC,OAAO,EAAE,+EAA+E,CAAC;SACrG,MAAM,CAAC,KAAK,EAAE,IAAmD,EAAE,EAAE;QACpE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC;YAChD,UAAU,EAAE,IAAI,CAAC,OAAO;YACxB,cAAc,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 +0,0 @@
|
|
|
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,23 +0,0 @@
|
|
|
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 changed files in a pull request')
|
|
7
|
-
.requiredOption('--project <key>', 'Bitbucket project key')
|
|
8
|
-
.requiredOption('--repo <slug>', 'Repository slug')
|
|
9
|
-
.requiredOption('--id <n>', 'Pull request ID')
|
|
10
|
-
.option('--limit <n>', 'Number of items to return (default: 25)', parseInt)
|
|
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
|
-
.action(async (opts) => {
|
|
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);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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,27 +0,0 @@
|
|
|
1
|
-
import { getClient } from '../../utils/client.js';
|
|
2
|
-
import { output } from '../../utils/output.js';
|
|
3
|
-
export function comment(parent) {
|
|
4
|
-
parent
|
|
5
|
-
.command('comment')
|
|
6
|
-
.description('Add a general comment to a pull request')
|
|
7
|
-
.requiredOption('--project <key>', 'Bitbucket project key')
|
|
8
|
-
.requiredOption('--repo <slug>', 'Repository slug')
|
|
9
|
-
.requiredOption('--id <n>', 'Pull request ID')
|
|
10
|
-
.requiredOption('--text <text>', 'Comment text')
|
|
11
|
-
.option('--parent <n>', 'Parent comment ID to reply to')
|
|
12
|
-
.addHelpText('after', `\nExamples:
|
|
13
|
-
bitbucketdc pr comment --project PROJ --repo my-repo --id 42 --text "Looks good!"
|
|
14
|
-
bitbucketdc pr comment --project PROJ --repo my-repo --id 42 --text "I agree" --parent 123`)
|
|
15
|
-
.action(async (opts) => {
|
|
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);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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,UAAU,EAAE,iBAAiB,CAAC;SAC7C,cAAc,CAAC,eAAe,EAAE,cA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