bbk-cli 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/cli/wrapper.d.ts.map +1 -1
- package/dist/cli/wrapper.js +20 -25
- package/dist/cli/wrapper.js.map +1 -1
- package/dist/commands/helpers.js +1 -1
- package/dist/commands/runner.d.ts.map +1 -1
- package/dist/commands/runner.js +20 -24
- package/dist/commands/runner.js.map +1 -1
- package/dist/utils/bitbucket-client.d.ts +22 -22
- package/dist/utils/bitbucket-client.d.ts.map +1 -1
- package/dist/utils/bitbucket-client.js +11 -11
- package/dist/utils/bitbucket-client.js.map +1 -1
- package/dist/utils/bitbucket-utils.d.ts +94 -14
- package/dist/utils/bitbucket-utils.d.ts.map +1 -1
- package/dist/utils/bitbucket-utils.js +125 -13
- package/dist/utils/bitbucket-utils.js.map +1 -1
- package/dist/utils/config-loader.d.ts +1 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js.map +1 -1
- package/package.json +1 -1
- package/tests/unit/cli/wrapper.test.ts +4 -8
- package/tests/unit/commands/runner.test.ts +5 -11
- package/.claude/bitbucket-config.local.md.example +0 -58
- package/.eslintcache +0 -1
|
@@ -124,7 +124,7 @@ describe('commands/runner', () => {
|
|
|
124
124
|
|
|
125
125
|
await runCommand('get-repository', '{}', null);
|
|
126
126
|
|
|
127
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR: "
|
|
127
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR: "repoSlug" parameter is required');
|
|
128
128
|
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
129
129
|
|
|
130
130
|
exitSpy.mockRestore();
|
|
@@ -214,9 +214,7 @@ describe('commands/runner', () => {
|
|
|
214
214
|
|
|
215
215
|
await runCommand('get-pullrequest', '{}', null);
|
|
216
216
|
|
|
217
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
218
|
-
'ERROR: "workspace", "repoSlug", and "pullRequestId" parameters are required'
|
|
219
|
-
);
|
|
217
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR: "repoSlug" and "pullRequestId" parameters are required');
|
|
220
218
|
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
221
219
|
|
|
222
220
|
exitSpy.mockRestore();
|
|
@@ -306,7 +304,7 @@ describe('commands/runner', () => {
|
|
|
306
304
|
await runCommand('create-pullrequest', '{"workspace":"myworkspace"}', null);
|
|
307
305
|
|
|
308
306
|
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
309
|
-
'ERROR: "
|
|
307
|
+
'ERROR: "repoSlug", "title", "sourceBranch", and "destinationBranch" parameters are required'
|
|
310
308
|
);
|
|
311
309
|
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
312
310
|
|
|
@@ -415,9 +413,7 @@ describe('commands/runner', () => {
|
|
|
415
413
|
|
|
416
414
|
await runCommand('get-issue', '{}', null);
|
|
417
415
|
|
|
418
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
419
|
-
'ERROR: "workspace", "repoSlug", and "issueId" parameters are required'
|
|
420
|
-
);
|
|
416
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR: "repoSlug" and "issueId" parameters are required');
|
|
421
417
|
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
422
418
|
|
|
423
419
|
exitSpy.mockRestore();
|
|
@@ -500,9 +496,7 @@ describe('commands/runner', () => {
|
|
|
500
496
|
|
|
501
497
|
await runCommand('create-issue', '{"workspace":"myworkspace"}', null);
|
|
502
498
|
|
|
503
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
504
|
-
'ERROR: "workspace", "repoSlug", and "title" parameters are required'
|
|
505
|
-
);
|
|
499
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('ERROR: "repoSlug" and "title" parameters are required');
|
|
506
500
|
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
507
501
|
|
|
508
502
|
exitSpy.mockRestore();
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
profiles:
|
|
3
|
-
cloud:
|
|
4
|
-
username: your-username
|
|
5
|
-
password: YOUR_APP_PASSWORD_HERE
|
|
6
|
-
|
|
7
|
-
defaultProfile: cloud
|
|
8
|
-
defaultFormat: json
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Bitbucket API Configuration
|
|
12
|
-
|
|
13
|
-
This file stores your Bitbucket API connection profiles.
|
|
14
|
-
|
|
15
|
-
## Authentication
|
|
16
|
-
|
|
17
|
-
You can authenticate using either:
|
|
18
|
-
|
|
19
|
-
1. **Username + App Password** (recommended):
|
|
20
|
-
```yaml
|
|
21
|
-
profiles:
|
|
22
|
-
cloud:
|
|
23
|
-
username: your-username
|
|
24
|
-
password: your_app_password
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
2. **Token**:
|
|
28
|
-
```yaml
|
|
29
|
-
profiles:
|
|
30
|
-
cloud:
|
|
31
|
-
token: your_api_token
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Creating an App Password
|
|
35
|
-
|
|
36
|
-
1. Go to https://bitbucket.org/account/settings/
|
|
37
|
-
2. Click "App passwords" in the left sidebar
|
|
38
|
-
3. Click "Create app password"
|
|
39
|
-
4. Give it a label and select permissions (repositories:read, pull requests:write, etc.)
|
|
40
|
-
5. Copy the generated app password
|
|
41
|
-
|
|
42
|
-
## Multiple Profiles
|
|
43
|
-
|
|
44
|
-
You can configure multiple profiles for different accounts:
|
|
45
|
-
|
|
46
|
-
```yaml
|
|
47
|
-
profiles:
|
|
48
|
-
personal:
|
|
49
|
-
username: myusername
|
|
50
|
-
password: personal_app_password
|
|
51
|
-
|
|
52
|
-
work:
|
|
53
|
-
username: work-username
|
|
54
|
-
password: work_app_password
|
|
55
|
-
|
|
56
|
-
defaultProfile: personal
|
|
57
|
-
defaultFormat: json
|
|
58
|
-
```
|