bitbucket-repository-provider 6.2.8 → 6.2.10
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/README.md +0 -1
- package/package.json +9 -14
- package/types/bitbucket-branch.d.mts +0 -24
- package/types/bitbucket-hook.d.mts +0 -9
- package/types/bitbucket-provider.d.mts +0 -159
- package/types/bitbucket-pull-request.d.mts +0 -46
- package/types/bitbucket-repository-group.d.mts +0 -11
- package/types/bitbucket-repository.d.mts +0 -95
package/README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/bitbucket-repository-provider)
|
|
2
2
|
[](https://spdx.org/licenses/0BSD.html)
|
|
3
|
-
[](https://typescriptlang.org)
|
|
4
3
|
[](https://bundlejs.com/?q=bitbucket-repository-provider)
|
|
5
4
|
[](https://npmjs.org/package/bitbucket-repository-provider)
|
|
6
5
|
[](https://github.com/arlac77/bitbucket-repository-provider/issues)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitbucket-repository-provider",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -24,34 +24,30 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "0BSD",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"prepare": "node --run prepare:typescript",
|
|
28
|
-
"prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
|
|
29
27
|
"test": "node --run test:ava",
|
|
30
28
|
"test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
31
29
|
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
|
|
32
30
|
"docs": "documentation readme --section=API ./src**/*.mjs",
|
|
33
|
-
"lint": "node --run lint:docs
|
|
34
|
-
"lint:docs": "documentation lint ./src**/*.mjs"
|
|
35
|
-
"lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
31
|
+
"lint": "node --run lint:docs",
|
|
32
|
+
"lint:docs": "documentation lint ./src**/*.mjs"
|
|
36
33
|
},
|
|
37
34
|
"dependencies": {
|
|
38
35
|
"content-entry": "^14.2.4",
|
|
39
36
|
"fetch-rate-limit-util": "^4.5.4",
|
|
40
37
|
"matching-iterator": "^2.1.4",
|
|
41
38
|
"one-time-execution-method": "^3.1.3",
|
|
42
|
-
"repository-provider": "^35.5.
|
|
39
|
+
"repository-provider": "^35.5.13"
|
|
43
40
|
},
|
|
44
41
|
"devDependencies": {
|
|
45
|
-
"@types/node": "^24.
|
|
42
|
+
"@types/node": "^24.3.0",
|
|
46
43
|
"ava": "^6.4.1",
|
|
47
44
|
"c8": "^10.1.3",
|
|
48
45
|
"documentation": "^14.0.3",
|
|
49
|
-
"repository-provider-test-support": "^3.1.
|
|
50
|
-
"semantic-release": "^24.2.7"
|
|
51
|
-
"typescript": "^5.9.2"
|
|
46
|
+
"repository-provider-test-support": "^3.1.52",
|
|
47
|
+
"semantic-release": "^24.2.7"
|
|
52
48
|
},
|
|
53
49
|
"engines": {
|
|
54
|
-
"node": ">=22.
|
|
50
|
+
"node": ">=22.18.0"
|
|
55
51
|
},
|
|
56
52
|
"repository": {
|
|
57
53
|
"type": "git",
|
|
@@ -64,8 +60,7 @@
|
|
|
64
60
|
"template": {
|
|
65
61
|
"inheritFrom": [
|
|
66
62
|
"arlac77/template-arlac77-github",
|
|
67
|
-
"arlac77/template-javascript-component"
|
|
68
|
-
"arlac77/template-typescript"
|
|
63
|
+
"arlac77/template-javascript-component"
|
|
69
64
|
]
|
|
70
65
|
}
|
|
71
66
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Branch of a bitbucket repository.
|
|
3
|
-
*/
|
|
4
|
-
export class BitbucketBranch extends Branch {
|
|
5
|
-
initialize(): Promise<void>;
|
|
6
|
-
hash: any;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {string[]|string} patterns
|
|
10
|
-
*/
|
|
11
|
-
entries(patterns: string[] | string): AsyncGenerator<CollectionEntry | BufferContentEntry, void, unknown>;
|
|
12
|
-
/**
|
|
13
|
-
* Commit entries
|
|
14
|
-
* @param {string} message commit message
|
|
15
|
-
* @param {ContentEntry[]} updates content to be commited
|
|
16
|
-
* @param {Object} [options]
|
|
17
|
-
* @return {Promise}
|
|
18
|
-
*/
|
|
19
|
-
commit(message: string, updates: ContentEntry[], options?: any): Promise<any>;
|
|
20
|
-
}
|
|
21
|
-
import { Branch } from "repository-provider";
|
|
22
|
-
import { CollectionEntry } from "content-entry";
|
|
23
|
-
import { BufferContentEntry } from "content-entry";
|
|
24
|
-
import { ContentEntry } from "content-entry";
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider for bitbucket repositories.
|
|
3
|
-
*
|
|
4
|
-
* Supported name schemes are
|
|
5
|
-
* - https://user:aSecret@bitbucket.org/owner/repo-name.git
|
|
6
|
-
* - git+https://user:aSecret@bitbucket.org/owner/repo-name.git
|
|
7
|
-
* - git@bitbucket.org:owner/repo-name.git
|
|
8
|
-
* - owner/repo-name
|
|
9
|
-
* Known environment variables
|
|
10
|
-
* - BITBUCKET_API api
|
|
11
|
-
* - BITBUCKET_TOKEN api token
|
|
12
|
-
* - BITBUCKET_USERNAME username
|
|
13
|
-
* - BITBUCKET_APP_PASSWORD password
|
|
14
|
-
* - BITBUCKET_PASSWORD password
|
|
15
|
-
* @param {Object} config
|
|
16
|
-
* @param {string} config.url provider scm base
|
|
17
|
-
* @param {string} config.api provider api base
|
|
18
|
-
* @param {Object} config.authentication authentication
|
|
19
|
-
* @param {string} config.authentication.type
|
|
20
|
-
* @param {string} config.authentication.username
|
|
21
|
-
* @param {string} config.authentication.password
|
|
22
|
-
*/
|
|
23
|
-
export class BitbucketProvider extends MultiGroupProvider {
|
|
24
|
-
/**
|
|
25
|
-
* Default configuration as given for the cloud privider.
|
|
26
|
-
* @return {Object}
|
|
27
|
-
*/
|
|
28
|
-
static attributes: {
|
|
29
|
-
url: {
|
|
30
|
-
default: string;
|
|
31
|
-
type: string;
|
|
32
|
-
isKey: boolean;
|
|
33
|
-
writable: boolean;
|
|
34
|
-
mandatory: boolean;
|
|
35
|
-
collection: boolean;
|
|
36
|
-
private?: boolean;
|
|
37
|
-
depends?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
set?: Function;
|
|
40
|
-
get?: Function;
|
|
41
|
-
env?: string[] | string;
|
|
42
|
-
};
|
|
43
|
-
api: {
|
|
44
|
-
description: string;
|
|
45
|
-
env: string;
|
|
46
|
-
set: (value: any) => any;
|
|
47
|
-
default: string;
|
|
48
|
-
type: string;
|
|
49
|
-
isKey: boolean;
|
|
50
|
-
writable: boolean;
|
|
51
|
-
mandatory: boolean;
|
|
52
|
-
collection: boolean;
|
|
53
|
-
private?: boolean;
|
|
54
|
-
depends?: string;
|
|
55
|
-
get?: Function;
|
|
56
|
-
};
|
|
57
|
-
"authentication.token": {
|
|
58
|
-
description: string;
|
|
59
|
-
env: string;
|
|
60
|
-
additionalAttributes: {
|
|
61
|
-
"authentication.type": string;
|
|
62
|
-
};
|
|
63
|
-
type: string;
|
|
64
|
-
isKey: boolean;
|
|
65
|
-
writable: boolean;
|
|
66
|
-
mandatory: boolean;
|
|
67
|
-
collection: boolean;
|
|
68
|
-
private?: boolean;
|
|
69
|
-
depends?: string;
|
|
70
|
-
default?: any;
|
|
71
|
-
set?: Function;
|
|
72
|
-
get?: Function;
|
|
73
|
-
};
|
|
74
|
-
"authentication.password": {
|
|
75
|
-
description: string;
|
|
76
|
-
env: string[];
|
|
77
|
-
additionalAttributes: {
|
|
78
|
-
"authentication.type": string;
|
|
79
|
-
};
|
|
80
|
-
type: string;
|
|
81
|
-
isKey: boolean;
|
|
82
|
-
writable: boolean;
|
|
83
|
-
mandatory: boolean;
|
|
84
|
-
collection: boolean;
|
|
85
|
-
private?: boolean;
|
|
86
|
-
depends?: string;
|
|
87
|
-
default?: any;
|
|
88
|
-
set?: Function;
|
|
89
|
-
get?: Function;
|
|
90
|
-
};
|
|
91
|
-
"authentication.username": {
|
|
92
|
-
description: string;
|
|
93
|
-
env: string;
|
|
94
|
-
additionalAttributes: {
|
|
95
|
-
"authentication.type": string;
|
|
96
|
-
};
|
|
97
|
-
type: string;
|
|
98
|
-
isKey: boolean;
|
|
99
|
-
writable: boolean;
|
|
100
|
-
mandatory: boolean;
|
|
101
|
-
collection: boolean;
|
|
102
|
-
private?: boolean;
|
|
103
|
-
depends?: string;
|
|
104
|
-
default?: any;
|
|
105
|
-
set?: Function;
|
|
106
|
-
get?: Function;
|
|
107
|
-
};
|
|
108
|
-
name: {
|
|
109
|
-
env: string;
|
|
110
|
-
type: string;
|
|
111
|
-
isKey: boolean;
|
|
112
|
-
writable: boolean;
|
|
113
|
-
mandatory: boolean;
|
|
114
|
-
collection: boolean;
|
|
115
|
-
private?: boolean;
|
|
116
|
-
depends?: string;
|
|
117
|
-
description?: string;
|
|
118
|
-
default?: any;
|
|
119
|
-
set?: Function;
|
|
120
|
-
get?: Function;
|
|
121
|
-
};
|
|
122
|
-
priority: import("pacc").AttributeDefinition;
|
|
123
|
-
messageDestination: {
|
|
124
|
-
type: string;
|
|
125
|
-
default: Console;
|
|
126
|
-
writable: boolean;
|
|
127
|
-
private: boolean;
|
|
128
|
-
isKey: boolean;
|
|
129
|
-
mandatory: boolean;
|
|
130
|
-
collection: boolean;
|
|
131
|
-
depends?: string;
|
|
132
|
-
description?: string;
|
|
133
|
-
set?: Function;
|
|
134
|
-
get?: Function;
|
|
135
|
-
env?: string[] | string;
|
|
136
|
-
};
|
|
137
|
-
id: import("pacc").AttributeDefinition;
|
|
138
|
-
description: import("pacc").AttributeDefinition;
|
|
139
|
-
};
|
|
140
|
-
get repositoryGroupClass(): typeof BitbucketRepositoryGroup;
|
|
141
|
-
get repositoryClass(): typeof BitbucketRepository;
|
|
142
|
-
get branchClass(): typeof BitbucketBranch;
|
|
143
|
-
get pullRequestClass(): typeof BitbucketPullRequest;
|
|
144
|
-
get hookClass(): typeof BitbucketHook;
|
|
145
|
-
/**
|
|
146
|
-
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories}
|
|
147
|
-
*/
|
|
148
|
-
initializeRepositories(): Promise<void>;
|
|
149
|
-
fetch(url: any, options?: {}): Promise<Response>;
|
|
150
|
-
fetchJSON(url: any, options?: {}): Promise<Response>;
|
|
151
|
-
}
|
|
152
|
-
export default BitbucketProvider;
|
|
153
|
-
import { BitbucketBranch } from "./bitbucket-branch.mjs";
|
|
154
|
-
import { BitbucketRepository } from "./bitbucket-repository.mjs";
|
|
155
|
-
import { BitbucketPullRequest } from "./bitbucket-pull-request.mjs";
|
|
156
|
-
import { BitbucketRepositoryGroup } from "./bitbucket-repository-group.mjs";
|
|
157
|
-
import { BitbucketHook } from "./bitbucket-hook.mjs";
|
|
158
|
-
import { MultiGroupProvider } from "repository-provider";
|
|
159
|
-
export { BitbucketBranch, BitbucketRepository, BitbucketPullRequest, BitbucketRepositoryGroup, BitbucketHook };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pull request inside bitbucket
|
|
3
|
-
*/
|
|
4
|
-
export class BitbucketPullRequest extends PullRequest {
|
|
5
|
-
static mergeStrategies: Set<string>;
|
|
6
|
-
static attributes: {
|
|
7
|
-
state: {
|
|
8
|
-
values: Set<string>;
|
|
9
|
-
writeable: boolean;
|
|
10
|
-
type: string;
|
|
11
|
-
isKey: boolean;
|
|
12
|
-
writable: boolean;
|
|
13
|
-
mandatory: boolean;
|
|
14
|
-
collection: boolean;
|
|
15
|
-
private?: boolean;
|
|
16
|
-
depends?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
default?: any;
|
|
19
|
-
set?: Function;
|
|
20
|
-
get?: Function;
|
|
21
|
-
env?: string[] | string;
|
|
22
|
-
};
|
|
23
|
-
close_source_branch: import("pacc").AttributeDefinition;
|
|
24
|
-
task_count: import("pacc").AttributeDefinition;
|
|
25
|
-
body: import("pacc").AttributeDefinition;
|
|
26
|
-
title: import("pacc").AttributeDefinition;
|
|
27
|
-
url: import("pacc").AttributeDefinition;
|
|
28
|
-
locked: import("pacc").AttributeDefinition;
|
|
29
|
-
merged: import("pacc").AttributeDefinition;
|
|
30
|
-
draft: import("pacc").AttributeDefinition;
|
|
31
|
-
dry: import("pacc").AttributeDefinition;
|
|
32
|
-
empty: import("pacc").AttributeDefinition;
|
|
33
|
-
name: import("pacc").AttributeDefinition;
|
|
34
|
-
id: import("pacc").AttributeDefinition;
|
|
35
|
-
description: import("pacc").AttributeDefinition;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests#post}
|
|
39
|
-
*/
|
|
40
|
-
static open(source: any, destination: any, options: any): Promise<any>;
|
|
41
|
-
/**
|
|
42
|
-
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/merge}
|
|
43
|
-
*/
|
|
44
|
-
_merge(merge_strategy?: string): Promise<any>;
|
|
45
|
-
}
|
|
46
|
-
import { PullRequest } from "repository-provider";
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* a repository hosted on bitbucket
|
|
3
|
-
* @param {RepositoryOwner} owner
|
|
4
|
-
* @param {string} name
|
|
5
|
-
* @param {Object} options
|
|
6
|
-
* @param {string} [options.api]
|
|
7
|
-
* @param {string} [options.group]
|
|
8
|
-
*
|
|
9
|
-
* @property {string} api
|
|
10
|
-
* @property {string} group
|
|
11
|
-
* @property {string} user
|
|
12
|
-
*/
|
|
13
|
-
export class BitbucketRepository extends Repository {
|
|
14
|
-
static attributes: {
|
|
15
|
-
uuid: import("pacc").AttributeDefinition;
|
|
16
|
-
size: import("pacc").AttributeDefinition;
|
|
17
|
-
language: import("pacc").AttributeDefinition;
|
|
18
|
-
fork_policy: {
|
|
19
|
-
default: string;
|
|
20
|
-
type: string;
|
|
21
|
-
isKey: boolean;
|
|
22
|
-
writable: boolean;
|
|
23
|
-
mandatory: boolean;
|
|
24
|
-
collection: boolean;
|
|
25
|
-
private?: boolean;
|
|
26
|
-
depends?: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
set?: Function;
|
|
29
|
-
get?: Function;
|
|
30
|
-
env?: string[] | string;
|
|
31
|
-
};
|
|
32
|
-
url: import("pacc").AttributeDefinition;
|
|
33
|
-
defaultBranchName: {
|
|
34
|
-
default: string;
|
|
35
|
-
type: string;
|
|
36
|
-
isKey: boolean;
|
|
37
|
-
writable: boolean;
|
|
38
|
-
mandatory: boolean;
|
|
39
|
-
collection: boolean;
|
|
40
|
-
private?: boolean;
|
|
41
|
-
depends?: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
set?: Function;
|
|
44
|
-
get? /**
|
|
45
|
-
* Deliver the url of home page.
|
|
46
|
-
* @return {string} '.../overwiew'
|
|
47
|
-
*/: Function;
|
|
48
|
-
env?: string[] | string;
|
|
49
|
-
};
|
|
50
|
-
cloneURL: import("pacc").AttributeDefinition;
|
|
51
|
-
isArchived: import("pacc").AttributeDefinition;
|
|
52
|
-
isLocked: import("pacc").AttributeDefinition;
|
|
53
|
-
isDisabled: import("pacc").AttributeDefinition;
|
|
54
|
-
isTemplate: import("pacc").AttributeDefinition;
|
|
55
|
-
isFork: import("pacc").AttributeDefinition;
|
|
56
|
-
name: import("pacc").AttributeDefinition;
|
|
57
|
-
id: import("pacc").AttributeDefinition;
|
|
58
|
-
description: import("pacc").AttributeDefinition;
|
|
59
|
-
};
|
|
60
|
-
static attributMapping: {
|
|
61
|
-
is_private: string;
|
|
62
|
-
website: string;
|
|
63
|
-
};
|
|
64
|
-
get user(): string;
|
|
65
|
-
/**
|
|
66
|
-
* @see https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-put
|
|
67
|
-
*/
|
|
68
|
-
update(): Promise<any>;
|
|
69
|
-
/**
|
|
70
|
-
* @see https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-hooks-get
|
|
71
|
-
*/
|
|
72
|
-
initializeHooks(): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* {@link https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-group-refs}
|
|
75
|
-
*/
|
|
76
|
-
initializeBranches(): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Create a new branch
|
|
79
|
-
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/refs/branches?_ga=2.65542446.1034690805.1541022941-164225451.1541022941#post}
|
|
80
|
-
* @param {string} name of the new branch to create
|
|
81
|
-
* @param {BitbucketBranch} from
|
|
82
|
-
* @param {Object} options
|
|
83
|
-
* @param {string} [options.message]
|
|
84
|
-
*/
|
|
85
|
-
createBranch(name: string, from: BitbucketBranch, options: {
|
|
86
|
-
message?: string;
|
|
87
|
-
}): Promise<import("repository-provider").Branch>;
|
|
88
|
-
/**
|
|
89
|
-
* {@link https://docs.atlassian.com/bitbucket-server/rest/5.8.0/bitbucket-branch-rest.html#idm45555984542992}
|
|
90
|
-
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/refs/branches/%7Bname%7D#delete}
|
|
91
|
-
*/
|
|
92
|
-
deleteBranch(name: any): Promise<any>;
|
|
93
|
-
}
|
|
94
|
-
import { Repository } from "repository-provider";
|
|
95
|
-
import { BitbucketBranch } from "./bitbucket-branch.mjs";
|