@backstage/plugin-scaffolder-backend-module-bitbucket-cloud 0.2.15-next.1 → 0.2.15
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/CHANGELOG.md +22 -0
- package/dist/actions/helpers.cjs.js +9 -9
- package/dist/actions/helpers.cjs.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend-module-bitbucket-cloud
|
|
2
2
|
|
|
3
|
+
## 0.2.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fa255f5: Support for Bitbucket Cloud's API token was added as `appPassword` is deprecated (no new creation from September 9, 2025) and will be removed on June 9, 2026.
|
|
8
|
+
|
|
9
|
+
API token usage example:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
integrations:
|
|
13
|
+
bitbucketCloud:
|
|
14
|
+
- username: user@domain.com
|
|
15
|
+
token: my-token
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/plugin-bitbucket-cloud-common@0.3.4
|
|
20
|
+
- @backstage/integration@1.18.2
|
|
21
|
+
- @backstage/backend-plugin-api@1.5.0
|
|
22
|
+
- @backstage/config@1.3.6
|
|
23
|
+
- @backstage/plugin-scaffolder-node@0.12.1
|
|
24
|
+
|
|
3
25
|
## 0.2.15-next.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
var bitbucket = require('bitbucket');
|
|
4
4
|
|
|
5
5
|
const getBitbucketClient = (config) => {
|
|
6
|
-
if (config.
|
|
6
|
+
if (config.token) {
|
|
7
7
|
return new bitbucket.Bitbucket({
|
|
8
8
|
auth: {
|
|
9
|
-
|
|
10
|
-
password: config.appPassword
|
|
9
|
+
token: config.token
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
|
-
} else if (config.
|
|
12
|
+
} else if (config.username && config.appPassword) {
|
|
14
13
|
return new bitbucket.Bitbucket({
|
|
15
14
|
auth: {
|
|
16
|
-
|
|
15
|
+
username: config.username,
|
|
16
|
+
password: config.appPassword
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
throw new Error(
|
|
21
|
-
`Authorization has not been provided for Bitbucket Cloud. Please add either username
|
|
21
|
+
`Authorization has not been provided for Bitbucket Cloud. Please add either provide a username and token or username and appPassword to the Integrations config`
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
const getAuthorizationHeader = (config) => {
|
|
25
|
-
if (config.username && config.appPassword) {
|
|
25
|
+
if (config.username && (config.token ?? config.appPassword)) {
|
|
26
26
|
const buffer = Buffer.from(
|
|
27
|
-
`${config.username}:${config.appPassword}`,
|
|
27
|
+
`${config.username}:${config.token ?? config.appPassword}`,
|
|
28
28
|
"utf8"
|
|
29
29
|
);
|
|
30
30
|
return `Basic ${buffer.toString("base64")}`;
|
|
@@ -33,7 +33,7 @@ const getAuthorizationHeader = (config) => {
|
|
|
33
33
|
return `Bearer ${config.token}`;
|
|
34
34
|
}
|
|
35
35
|
throw new Error(
|
|
36
|
-
`Authorization has not been provided for Bitbucket Cloud. Please add either username
|
|
36
|
+
`Authorization has not been provided for Bitbucket Cloud. Please add either provide a username and token or username and appPassword to the Integrations config`
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs.js","sources":["../../src/actions/helpers.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Bitbucket } from 'bitbucket';\n\nexport const getBitbucketClient = (config: {\n token?: string;\n username?: string;\n appPassword?: string;\n}) => {\n if (config.
|
|
1
|
+
{"version":3,"file":"helpers.cjs.js","sources":["../../src/actions/helpers.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Bitbucket } from 'bitbucket';\n\nexport const getBitbucketClient = (config: {\n token?: string;\n username?: string;\n appPassword?: string;\n}) => {\n if (config.token) {\n return new Bitbucket({\n auth: {\n token: config.token,\n },\n });\n } else if (config.username && config.appPassword) {\n // TODO: appPassword can be removed once fully\n // deprecated by BitBucket on 9th June 2026.\n return new Bitbucket({\n auth: {\n username: config.username,\n password: config.appPassword,\n },\n });\n }\n throw new Error(\n `Authorization has not been provided for Bitbucket Cloud. Please add either provide a username and token or username and appPassword to the Integrations config`,\n );\n};\n\nexport const getAuthorizationHeader = (config: {\n username?: string;\n appPassword?: string;\n token?: string;\n}) => {\n // TODO: appPassword can be removed once fully\n // deprecated by BitBucket on 9th June 2026.\n if (config.username && (config.token ?? config.appPassword)) {\n const buffer = Buffer.from(\n `${config.username}:${config.token ?? config.appPassword}`,\n 'utf8',\n );\n return `Basic ${buffer.toString('base64')}`;\n }\n\n if (config.token) {\n return `Bearer ${config.token}`;\n }\n\n throw new Error(\n `Authorization has not been provided for Bitbucket Cloud. Please add either provide a username and token or username and appPassword to the Integrations config`,\n );\n};\n"],"names":["Bitbucket"],"mappings":";;;;AAkBO,MAAM,kBAA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
4
4
|
"description": "The Bitbucket Cloud module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -50,21 +50,21 @@
|
|
|
50
50
|
"test": "backstage-cli package test"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@backstage/backend-plugin-api": "1.5.0
|
|
54
|
-
"@backstage/config": "1.3.6
|
|
55
|
-
"@backstage/errors": "1.2.7",
|
|
56
|
-
"@backstage/integration": "1.18.2
|
|
57
|
-
"@backstage/plugin-bitbucket-cloud-common": "0.3.4
|
|
58
|
-
"@backstage/plugin-scaffolder-node": "0.12.1
|
|
53
|
+
"@backstage/backend-plugin-api": "^1.5.0",
|
|
54
|
+
"@backstage/config": "^1.3.6",
|
|
55
|
+
"@backstage/errors": "^1.2.7",
|
|
56
|
+
"@backstage/integration": "^1.18.2",
|
|
57
|
+
"@backstage/plugin-bitbucket-cloud-common": "^0.3.4",
|
|
58
|
+
"@backstage/plugin-scaffolder-node": "^0.12.1",
|
|
59
59
|
"bitbucket": "^2.12.0",
|
|
60
60
|
"fs-extra": "^11.2.0",
|
|
61
61
|
"yaml": "^2.0.0",
|
|
62
62
|
"zod": "^3.22.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@backstage/backend-test-utils": "1.10.0
|
|
66
|
-
"@backstage/cli": "0.34.5
|
|
67
|
-
"@backstage/plugin-scaffolder-node-test-utils": "0.3.5
|
|
65
|
+
"@backstage/backend-test-utils": "^1.10.0",
|
|
66
|
+
"@backstage/cli": "^0.34.5",
|
|
67
|
+
"@backstage/plugin-scaffolder-node-test-utils": "^0.3.5",
|
|
68
68
|
"msw": "^1.0.0"
|
|
69
69
|
}
|
|
70
70
|
}
|