bitbucket-repository-provider 6.2.10 → 6.3.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/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitbucket-repository-provider",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
7
7
|
},
|
|
8
|
+
"packageManager": "npm@11.6.0+sha512.77f3fb0dbbd881835d7bd1217deabdf7ed77fc4ec4f363df64fc3cb986404abf6c437661041080f5c5d225103508e7c9ea30cb2742b7e942675d05a10af2d7b9",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"default": "./src/bitbucket-provider.mjs"
|
|
@@ -32,22 +33,22 @@
|
|
|
32
33
|
"lint:docs": "documentation lint ./src**/*.mjs"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"content-entry": "^14.2.
|
|
36
|
+
"content-entry": "^14.2.5",
|
|
36
37
|
"fetch-rate-limit-util": "^4.5.4",
|
|
37
38
|
"matching-iterator": "^2.1.4",
|
|
38
39
|
"one-time-execution-method": "^3.1.3",
|
|
39
|
-
"repository-provider": "^35.
|
|
40
|
+
"repository-provider": "^35.6.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^24.
|
|
43
|
+
"@types/node": "^24.5.2",
|
|
43
44
|
"ava": "^6.4.1",
|
|
44
45
|
"c8": "^10.1.3",
|
|
45
46
|
"documentation": "^14.0.3",
|
|
46
|
-
"repository-provider-test-support": "^
|
|
47
|
-
"semantic-release": "^24.2.
|
|
47
|
+
"repository-provider-test-support": "^4.0.0",
|
|
48
|
+
"semantic-release": "^24.2.9"
|
|
48
49
|
},
|
|
49
50
|
"engines": {
|
|
50
|
-
"node": ">=22.
|
|
51
|
+
"node": ">=22.19.5"
|
|
51
52
|
},
|
|
52
53
|
"repository": {
|
|
53
54
|
"type": "git",
|
package/src/bitbucket-hook.mjs
CHANGED
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
url_attribute,
|
|
5
5
|
token_attribute,
|
|
6
6
|
username_attribute,
|
|
7
|
-
password_attribute
|
|
7
|
+
password_attribute,
|
|
8
|
+
object_attribute
|
|
8
9
|
} from "pacc";
|
|
9
10
|
import { MultiGroupProvider } from "repository-provider";
|
|
10
11
|
import { BitbucketBranch } from "./bitbucket-branch.mjs";
|
|
@@ -75,40 +76,38 @@ export class BitbucketProvider extends MultiGroupProvider {
|
|
|
75
76
|
...url_attribute,
|
|
76
77
|
description: "URL of the provider api",
|
|
77
78
|
env: "{{instanceIdentifier}}API",
|
|
78
|
-
|
|
79
|
+
prepareValue: value => (value.endsWith("/") ? value : value + "/"),
|
|
79
80
|
default: `https://api.${domain}/2.0/`
|
|
80
81
|
},
|
|
81
|
-
|
|
82
|
-
...
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
82
|
+
authentication: {
|
|
83
|
+
...object_attribute,
|
|
84
|
+
mandatory: true,
|
|
85
|
+
attributes: {
|
|
86
|
+
token: {
|
|
87
|
+
...token_attribute,
|
|
88
|
+
description: "API token",
|
|
89
|
+
env: "{{instanceIdentifier}}TOKEN",
|
|
90
|
+
additionalValues: { "authentication.type": "token" }
|
|
91
|
+
},
|
|
92
|
+
password: {
|
|
93
|
+
...password_attribute,
|
|
94
|
+
description: "Password for plain authentification",
|
|
95
|
+
env: [
|
|
96
|
+
"{{instanceIdentifier}}APP_PASSWORD",
|
|
97
|
+
"{{instanceIdentifier}}PASSWORD"
|
|
98
|
+
],
|
|
99
|
+
additionalValues: { "authentication.type": "basic" }
|
|
100
|
+
},
|
|
101
|
+
username: {
|
|
102
|
+
...username_attribute,
|
|
103
|
+
description: "Username for plain authentification",
|
|
104
|
+
env: "{{instanceIdentifier}}USERNAME",
|
|
105
|
+
additionalValues: { "authentication.type": "basic" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
101
108
|
}
|
|
102
109
|
};
|
|
103
110
|
|
|
104
|
-
/**
|
|
105
|
-
* @param {Object} options
|
|
106
|
-
* @return {boolean} true if authentication is present
|
|
107
|
-
*/
|
|
108
|
-
static areOptionsSufficcient(options) {
|
|
109
|
-
return options["authentication.type"] !== undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
111
|
get repositoryGroupClass() {
|
|
113
112
|
return BitbucketRepositoryGroup;
|
|
114
113
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { boolean_attribute_writable, count_attribute, default_attribute } from "pacc";
|
|
2
2
|
import { PullRequest, Repository, Branch } from "repository-provider";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -15,7 +15,7 @@ export class BitbucketPullRequest extends PullRequest {
|
|
|
15
15
|
values: this.states,
|
|
16
16
|
writeable: true
|
|
17
17
|
},
|
|
18
|
-
close_source_branch:
|
|
18
|
+
close_source_branch: boolean_attribute_writable,
|
|
19
19
|
task_count: count_attribute
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -7,14 +7,19 @@ import { Repository, RepositoryGroup } from "repository-provider";
|
|
|
7
7
|
export class BitbucketRepositoryGroup extends RepositoryGroup {
|
|
8
8
|
static attributes = {
|
|
9
9
|
...super.attributes,
|
|
10
|
-
uuid: uuid_attribute
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
uuid: uuid_attribute,
|
|
11
|
+
displayName: {
|
|
12
|
+
...super.attributes.displayName,
|
|
13
|
+
externalName: "display_name"
|
|
14
|
+
},
|
|
15
|
+
homePageURL: {
|
|
16
|
+
...super.attributes.homePageURL,
|
|
17
|
+
externalName: "website"
|
|
18
|
+
},
|
|
19
|
+
avatarURL: {
|
|
20
|
+
...super.attributes.avatarURL,
|
|
21
|
+
externalName: "links.avatar.href"
|
|
22
|
+
}
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
/**
|
|
@@ -26,13 +26,12 @@ export class BitbucketRepository extends Repository {
|
|
|
26
26
|
uuid: uuid_attribute,
|
|
27
27
|
size: size_attribute,
|
|
28
28
|
language: language_attribute,
|
|
29
|
-
fork_policy: { ...default_attribute, default: "allow_forks" }
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
website: "homePageURL"
|
|
29
|
+
fork_policy: { ...default_attribute, default: "allow_forks" },
|
|
30
|
+
homePageURL: {
|
|
31
|
+
...super.attributes.homePageURL,
|
|
32
|
+
externalName: "website"
|
|
33
|
+
},
|
|
34
|
+
isPrivate: { ...super.attributes.isPrivate, externalName: "is_private" }
|
|
36
35
|
};
|
|
37
36
|
|
|
38
37
|
get user() {
|