bitbucket-repository-provider 4.1.24 → 4.2.1
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitbucket-repository-provider",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"content-entry": "^5.0.1",
|
|
34
|
-
"fetch-rate-limit-util": "^
|
|
34
|
+
"fetch-rate-limit-util": "^3.0.4",
|
|
35
35
|
"matching-iterator": "^2.0.4",
|
|
36
36
|
"node-fetch": "^3.2.4",
|
|
37
37
|
"one-time-execution-method": "^3.0.1",
|
|
38
|
-
"repository-provider": "^
|
|
38
|
+
"repository-provider": "^31.2.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"ava": "^4.2.0",
|
|
42
42
|
"c8": "^7.11.3",
|
|
43
43
|
"documentation": "^13.2.5",
|
|
44
|
-
"repository-provider-test-support": "^2.1.
|
|
44
|
+
"repository-provider-test-support": "^2.1.27",
|
|
45
45
|
"semantic-release": "^19.0.2"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
package/src/bitbucket-branch.mjs
CHANGED
|
@@ -107,13 +107,6 @@ export class BitbucketBranch extends Branch {
|
|
|
107
107
|
get entryClass() {
|
|
108
108
|
return BufferContentEntry;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
// TODO move into base object
|
|
112
|
-
get api()
|
|
113
|
-
{
|
|
114
|
-
return this.owner.api;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
110
|
}
|
|
118
111
|
|
|
119
112
|
class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
@@ -177,7 +177,7 @@ export class BitbucketProvider extends MultiGroupProvider {
|
|
|
177
177
|
} catch {}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
fetch(url, options = {}
|
|
180
|
+
fetch(url, options = {}) {
|
|
181
181
|
let authorization;
|
|
182
182
|
|
|
183
183
|
if (this.authentication.username) {
|
|
@@ -203,28 +203,24 @@ export class BitbucketProvider extends MultiGroupProvider {
|
|
|
203
203
|
headers["Content-Type"] = "application/json";
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
options.reporter = (url, ...args) => this.trace(url.toString(), ...args);
|
|
207
|
+
|
|
206
208
|
return stateActionHandler(
|
|
207
209
|
fetch,
|
|
208
210
|
new URL(url, this.api),
|
|
209
211
|
{
|
|
210
212
|
...options,
|
|
211
213
|
headers
|
|
212
|
-
}
|
|
213
|
-
responseHandler,
|
|
214
|
-
actions,
|
|
215
|
-
(url, ...args) => this.trace(url.toString(), ...args)
|
|
214
|
+
}
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
217
|
|
|
219
|
-
fetchJSON(url, options
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
actions
|
|
227
|
-
);
|
|
218
|
+
fetchJSON(url, options = {}) {
|
|
219
|
+
options.postprocess = async response => {
|
|
220
|
+
return { response, json: await response.json() };
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
return this.fetch(url, options);
|
|
228
224
|
}
|
|
229
225
|
}
|
|
230
226
|
|
|
@@ -121,6 +121,6 @@ export class BitbucketPullRequest extends PullRequest {
|
|
|
121
121
|
|
|
122
122
|
get url()
|
|
123
123
|
{
|
|
124
|
-
return `${this.provider.url}/${this.destination.slug}pull-requests/${this.name}`;
|
|
124
|
+
return `${this.provider.url}/${this.destination.slug}/pull-requests/${this.name}`;
|
|
125
125
|
}
|
|
126
126
|
}
|